@hybridcore/ui 1.6.11 → 1.6.13
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/{AnimatedTheme-D3VZKKNV.js → AnimatedTheme-ktdO3Bel.js} +6 -6
- package/dist/{AxisRenderer-Doyw-FTI.js → AxisRenderer-BCQoUJw6.js} +6 -6
- package/dist/{AxisRendererY-BylCU67e.js → AxisRendererY-AXWvGU6r.js} +3 -3
- package/dist/{Bullet-C6357hTv.js → Bullet-Djj7Vs9T.js} +1 -1
- package/dist/{Button-DGOT8RcT.js → Button-BLY4PVJC.js} +3 -3
- package/dist/{CategoryAxis-B5uTZjhL.js → CategoryAxis-B6NqW8qd.js} +3 -3
- package/dist/{Circle-DhzVdFBd.js → Circle-BnfBNKBD.js} +1 -1
- package/dist/{ColorSet-DGLMpbL3.js → ColorSet-cyPmWGwh.js} +1 -1
- package/dist/{ColumnSeries-CqJ-563p.js → ColumnSeries-CtRTsn-E.js} +28 -28
- package/dist/{DateAxis-lJZjbAS-.js → DateAxis-DEXKps1S.js} +4 -4
- package/dist/{Entity-4Lr2piVN.js → Entity-BJCuhdq_.js} +14 -14
- package/dist/GaplessDateAxis-B2g2jgSG.js +376 -0
- package/dist/{Hierarchy-DPEcTr0v.js → Hierarchy-CEOK8Gzh.js} +4 -4
- package/dist/{Legend-CTb6rZz_.js → Legend-CFvQiIfn.js} +4 -4
- package/dist/{LineSeries-Dg1aytHA.js → LineSeries-D_IL2qGF.js} +4 -4
- package/dist/{LinearGradient-D1hzMjaW.js → LinearGradient-CxQyCSEB.js} +2 -2
- package/dist/{PieSeries-C9YUWMnA.js → PieSeries-CMH0Z7pz.js} +8 -8
- package/dist/{RoundedRectangle-B23Oh_r6.js → RoundedRectangle-BKLX1LKM.js} +2 -2
- package/dist/{Scrollbar-CSoXoZSe.js → Scrollbar-CTI7_8Qw.js} +4 -4
- package/dist/{Slice-CIP7Vmzu.js → Slice-BUncQh1B.js} +11 -11
- package/dist/{Tick-CRu6rQQy.js → Tick--VhF0xlz.js} +2 -2
- package/dist/{Tooltip-RhAldW7s.js → Tooltip-vyZRZWih.js} +1 -1
- package/dist/{XYCursor-Z-Ral42q.js → XYCursor-CVUSpqb9.js} +3 -3
- package/dist/{ZoomableContainer-D1laxHnA.js → ZoomableContainer-Ca_pDVYQ.js} +2 -2
- package/dist/assets/index.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/components/button/styled.js +1 -1
- package/dist/components/charts/_common/format.js +149 -41
- package/dist/components/charts/_common/tooltip.js +2 -2
- package/dist/components/charts/_common/utils.js +16 -11
- package/dist/components/charts/candlestick/logic.js +34 -35
- package/dist/components/charts/column-line-mix/logic.js +40 -41
- package/dist/components/charts/donut-chart/logic.js +4 -4
- package/dist/components/charts/drill-down-treemap/logic.js +5 -5
- package/dist/components/charts/drill-down-voronoi-treemap/logic.js +5 -5
- package/dist/components/charts/forecast-cone/logic.js +134 -120
- package/dist/components/charts/heatmap/logic.js +9 -9
- package/dist/components/charts/highlighting-line-data/logic.js +10 -10
- package/dist/components/charts/line/logic.js +19 -20
- package/dist/components/charts/logaritmic-scale/logic.js +30 -31
- package/dist/components/charts/multiple-value-axes/logic.js +18 -19
- package/dist/components/charts/nested-pie/logic.js +3 -3
- package/dist/components/charts/packed-circles/logic.js +7 -7
- package/dist/components/charts/pie-chart/logic.js +4 -4
- package/dist/components/charts/stacked-area-radar/logic.js +9 -9
- package/dist/components/charts/stacked-column-chart/logic.js +10 -10
- package/dist/components/charts/xy-chart/logic.js +28 -29
- package/dist/components/collapsible-card/index.js +21 -30
- package/dist/components/collapsible-card/styled.js +16 -14
- package/dist/components/color-picker/index.js +2227 -3357
- package/dist/components/color-picker/styled.js +87 -7
- package/dist/components/confirm/dialog.js +89 -8
- package/dist/components/confirm/index.js +1 -1
- package/dist/components/data-map/index.js +1 -1
- package/dist/components/data-map/logic.js +20 -20
- package/dist/components/data-security-selectors/dissemination-list/index.js +32 -3117
- package/dist/components/date-picker-with-custom-range/index.js +86 -7
- package/dist/components/date-range-picker/index.js +464 -452
- package/dist/components/document-viewer/components/viewer/index.js +1 -1
- package/dist/components/duration-select/index.js +10 -10
- package/dist/components/duration-select/styled.js +1 -1
- package/dist/components/geometry-picker/coordinate/index.js +14 -14
- package/dist/components/geometry-picker/edit/index.js +1 -1
- package/dist/components/geometry-picker/geometry/index.js +1 -1
- package/dist/components/geometry-picker/kml/index.js +11 -11
- package/dist/components/geometry-picker/map/logic.js +145 -3656
- package/dist/components/geometry-picker/map/style.js +18 -17
- package/dist/components/geometry-picker/parser/coordinate-input/logic.js +43 -1255
- package/dist/components/heat-map/index.js +1 -1
- package/dist/components/heat-map/logic.js +77 -1924
- package/dist/components/instance-hierarchy-table/styled.js +18 -16
- package/dist/components/map/helpers/mapbox.js +17 -15
- package/dist/components/map/helpers/ol.js +386 -27
- package/dist/components/map/index.js +11 -10
- package/dist/components/map/logic.js +22 -22
- package/dist/components/map/styled.js +31 -27
- package/dist/components/metric-card/MetricChart.js +9 -9
- package/dist/components/metric-card/logic.js +46 -49
- package/dist/components/phone-input/index.js +10 -9
- package/dist/components/property-mapping/index.js +1 -1
- package/dist/components/prr-map/index.js +1 -1
- package/dist/components/prr-map/logic.js +27 -26
- package/dist/components/range-selector/styled.js +65 -4228
- package/dist/components/raster-grid-map/index.js +1 -1
- package/dist/components/raster-grid-map/logic.js +60 -57
- package/dist/components/simple-pivot-table/index.js +17 -17
- package/dist/components/simple-pivot-table/logic.js +67 -76
- package/dist/components/sortable-list/index.js +1091 -1264
- package/dist/components/template-form/components/property-list/index.js +36 -33
- package/dist/components/template-form/components/property-list/property-list-columns.js +19 -18
- package/dist/components/template-form/components/property-list/property-list-form.js +137 -601
- package/dist/components/template-form/components/recognition-property-list/index.js +40 -37
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +11 -10
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +55 -63
- package/dist/components/tree-select/index.js +16 -16
- package/dist/index.esm-UfGMjYOL.js +197 -0
- package/dist/main.d.ts +67 -8
- package/dist/main.js +176 -175
- package/package.json +1 -1
- package/dist/AccordionSummary-CJppWeqF.js +0 -781
- package/dist/Add-CqcD1PWb.js +0 -403
- package/dist/Box-DqUMmZjL.js +0 -31
- package/dist/Button-C5yquWAB.js +0 -357
- package/dist/ButtonBase-BEF7oTOe.js +0 -887
- package/dist/DataProcessor-WXzhvIg6.js +0 -83
- package/dist/Delete-BdyYpINH.js +0 -23
- package/dist/DialogContent-BvVjD9z3.js +0 -523
- package/dist/FormGroup-CpBsIyYR.js +0 -89
- package/dist/GaplessDateAxis-DowssQ6y.js +0 -296
- package/dist/IconButton-BoGwbvrP.js +0 -184
- package/dist/InputLabel-Dd8RrneV.js +0 -341
- package/dist/MenuItem-DwqJqzuM.js +0 -233
- package/dist/Modal-MUZygjmQ.js +0 -1158
- package/dist/Paper-BkQLdsCI.js +0 -582
- package/dist/Select-DHUl_uG3.js +0 -3916
- package/dist/Source-BSZST_GH.js +0 -4410
- package/dist/SwitchBase-DTndTqI8.js +0 -235
- package/dist/Text-ChJRuaD8.js +0 -2197
- package/dist/TextField-e2oKaUN1.js +0 -669
- package/dist/TransitionGroupContext-BDAp2T0O.js +0 -96
- package/dist/Typography-DgsSLCFC.js +0 -178
- package/dist/Vector-BmuhQO4p.js +0 -3606
- package/dist/Vector-DfTqQEln.js +0 -1735
- package/dist/WKT-2wsDT-nq.js +0 -2310
- package/dist/assertThisInitialized-C1dAyb4j.js +0 -7
- package/dist/assets/index3.css +0 -1
- package/dist/assets/index4.css +0 -1
- package/dist/clsx-OuTLNxxd.js +0 -16
- package/dist/createChainedFunction-C0nujS3O.js +0 -9
- package/dist/createSvgIcon-Ch_cT8az.js +0 -185
- package/dist/createSvgIcon-DuDuASu1.js +0 -62
- package/dist/debounce-46wSf_lW.js +0 -15
- package/dist/dialog-BYRnCztH.js +0 -154
- package/dist/formControlState-vgaj2ksH.js +0 -10
- package/dist/generateUtilityClasses-C3ivN9Ie.js +0 -2973
- package/dist/index-DH6qsPBn.js +0 -153
- package/dist/index-e9xTIYWt.js +0 -1934
- package/dist/index.esm-BLLrbTzY.js +0 -318
- package/dist/math-Bvt2Ubuz.js +0 -704
- package/dist/objectWithoutPropertiesLoose-DJteAcBH.js +0 -22
- package/dist/ol-yOE-NV0X.js +0 -7465
- package/dist/ownerWindow-wg6foiOE.js +0 -10
- package/dist/setPrototypeOf-NPgp4cYc.js +0 -8
- package/dist/styled-SoqbyrkW.js +0 -350
- package/dist/unsupportedProp-DuqR2hj9.js +0 -36
- package/dist/useControlled-BYdyS7Pn.js +0 -31
- package/dist/useFormControl-CatNKXAi.js +0 -10
- package/dist/useId-BW-oWmul.js +0 -19
- package/dist/useMobilePicker-CY8ndYRL.js +0 -8279
- package/dist/useSlot-B_Q4vnX5.js +0 -42
|
@@ -1,784 +1,611 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { jsx as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { useSortableListLogic as
|
|
9
|
-
import { SortableListRoot as
|
|
10
|
-
|
|
11
|
-
import { P as z } from "../../index-C__OZmYy.js";
|
|
12
|
-
import { c as En } from "../../clsx-OuTLNxxd.js";
|
|
13
|
-
import { g as Sn, a as Dn, s as ct, u as _n, c as Cn } from "../../generateUtilityClasses-C3ivN9Ie.js";
|
|
14
|
-
import { T as We } from "../../Typography-DgsSLCFC.js";
|
|
15
|
-
function xn(n) {
|
|
16
|
-
return Dn("MuiCardHeader", n);
|
|
17
|
-
}
|
|
18
|
-
const Ht = Sn("MuiCardHeader", ["root", "avatar", "action", "content", "title", "subheader"]), On = ["action", "avatar", "className", "component", "disableTypography", "subheader", "subheaderTypographyProps", "title", "titleTypographyProps"], In = (n) => {
|
|
19
|
-
const {
|
|
20
|
-
classes: e
|
|
21
|
-
} = n;
|
|
22
|
-
return Cn({
|
|
23
|
-
root: ["root"],
|
|
24
|
-
avatar: ["avatar"],
|
|
25
|
-
action: ["action"],
|
|
26
|
-
content: ["content"],
|
|
27
|
-
title: ["title"],
|
|
28
|
-
subheader: ["subheader"]
|
|
29
|
-
}, xn, e);
|
|
30
|
-
}, Tn = ct("div", {
|
|
31
|
-
name: "MuiCardHeader",
|
|
32
|
-
slot: "Root",
|
|
33
|
-
overridesResolver: (n, e) => Me({
|
|
34
|
-
[`& .${Ht.title}`]: e.title,
|
|
35
|
-
[`& .${Ht.subheader}`]: e.subheader
|
|
36
|
-
}, e.root)
|
|
37
|
-
})({
|
|
38
|
-
display: "flex",
|
|
39
|
-
alignItems: "center",
|
|
40
|
-
padding: 16
|
|
41
|
-
}), An = ct("div", {
|
|
42
|
-
name: "MuiCardHeader",
|
|
43
|
-
slot: "Avatar",
|
|
44
|
-
overridesResolver: (n, e) => e.avatar
|
|
45
|
-
})({
|
|
46
|
-
display: "flex",
|
|
47
|
-
flex: "0 0 auto",
|
|
48
|
-
marginRight: 16
|
|
49
|
-
}), Pn = ct("div", {
|
|
50
|
-
name: "MuiCardHeader",
|
|
51
|
-
slot: "Action",
|
|
52
|
-
overridesResolver: (n, e) => e.action
|
|
53
|
-
})({
|
|
54
|
-
flex: "0 0 auto",
|
|
55
|
-
alignSelf: "flex-start",
|
|
56
|
-
marginTop: -4,
|
|
57
|
-
marginRight: -8,
|
|
58
|
-
marginBottom: -4
|
|
59
|
-
}), Nn = ct("div", {
|
|
60
|
-
name: "MuiCardHeader",
|
|
61
|
-
slot: "Content",
|
|
62
|
-
overridesResolver: (n, e) => e.content
|
|
63
|
-
})({
|
|
64
|
-
flex: "1 1 auto"
|
|
65
|
-
}), qt = /* @__PURE__ */ gn.forwardRef(function(e, t) {
|
|
66
|
-
const o = _n({
|
|
67
|
-
props: e,
|
|
68
|
-
name: "MuiCardHeader"
|
|
69
|
-
}), {
|
|
70
|
-
action: r,
|
|
71
|
-
avatar: i,
|
|
72
|
-
className: a,
|
|
73
|
-
component: s = "div",
|
|
74
|
-
disableTypography: l = !1,
|
|
75
|
-
subheader: c,
|
|
76
|
-
subheaderTypographyProps: p,
|
|
77
|
-
title: f,
|
|
78
|
-
titleTypographyProps: v
|
|
79
|
-
} = o, A = wn(o, On), E = Me({}, o, {
|
|
80
|
-
component: s,
|
|
81
|
-
disableTypography: l
|
|
82
|
-
}), _ = In(E);
|
|
83
|
-
let R = f;
|
|
84
|
-
R != null && R.type !== We && !l && (R = /* @__PURE__ */ ge(We, Me({
|
|
85
|
-
variant: i ? "body2" : "h5",
|
|
86
|
-
className: _.title,
|
|
87
|
-
component: "span",
|
|
88
|
-
display: "block"
|
|
89
|
-
}, v, {
|
|
90
|
-
children: R
|
|
91
|
-
})));
|
|
92
|
-
let Y = c;
|
|
93
|
-
return Y != null && Y.type !== We && !l && (Y = /* @__PURE__ */ ge(We, Me({
|
|
94
|
-
variant: i ? "body2" : "body1",
|
|
95
|
-
className: _.subheader,
|
|
96
|
-
color: "text.secondary",
|
|
97
|
-
component: "span",
|
|
98
|
-
display: "block"
|
|
99
|
-
}, p, {
|
|
100
|
-
children: Y
|
|
101
|
-
}))), /* @__PURE__ */ Rt(Tn, Me({
|
|
102
|
-
className: En(_.root, a),
|
|
103
|
-
as: s,
|
|
104
|
-
ref: t,
|
|
105
|
-
ownerState: E
|
|
106
|
-
}, A, {
|
|
107
|
-
children: [i && /* @__PURE__ */ ge(An, {
|
|
108
|
-
className: _.avatar,
|
|
109
|
-
ownerState: E,
|
|
110
|
-
children: i
|
|
111
|
-
}), /* @__PURE__ */ Rt(Nn, {
|
|
112
|
-
className: _.content,
|
|
113
|
-
ownerState: E,
|
|
114
|
-
children: [R, Y]
|
|
115
|
-
}), r && /* @__PURE__ */ ge(Pn, {
|
|
116
|
-
className: _.action,
|
|
117
|
-
ownerState: E,
|
|
118
|
-
children: r
|
|
119
|
-
})]
|
|
120
|
-
}));
|
|
121
|
-
});
|
|
122
|
-
process.env.NODE_ENV !== "production" && (qt.propTypes = {
|
|
123
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
124
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
125
|
-
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
126
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
127
|
-
/**
|
|
128
|
-
* The action to display in the card header.
|
|
129
|
-
*/
|
|
130
|
-
action: z.node,
|
|
131
|
-
/**
|
|
132
|
-
* The Avatar element to display.
|
|
133
|
-
*/
|
|
134
|
-
avatar: z.node,
|
|
135
|
-
/**
|
|
136
|
-
* @ignore
|
|
137
|
-
*/
|
|
138
|
-
children: z.node,
|
|
139
|
-
/**
|
|
140
|
-
* Override or extend the styles applied to the component.
|
|
141
|
-
*/
|
|
142
|
-
classes: z.object,
|
|
143
|
-
/**
|
|
144
|
-
* @ignore
|
|
145
|
-
*/
|
|
146
|
-
className: z.string,
|
|
147
|
-
/**
|
|
148
|
-
* The component used for the root node.
|
|
149
|
-
* Either a string to use a HTML element or a component.
|
|
150
|
-
*/
|
|
151
|
-
component: z.elementType,
|
|
152
|
-
/**
|
|
153
|
-
* If `true`, `subheader` and `title` won't be wrapped by a Typography component.
|
|
154
|
-
* This can be useful to render an alternative Typography variant by wrapping
|
|
155
|
-
* the `title` text, and optional `subheader` text
|
|
156
|
-
* with the Typography component.
|
|
157
|
-
* @default false
|
|
158
|
-
*/
|
|
159
|
-
disableTypography: z.bool,
|
|
160
|
-
/**
|
|
161
|
-
* The content of the component.
|
|
162
|
-
*/
|
|
163
|
-
subheader: z.node,
|
|
164
|
-
/**
|
|
165
|
-
* These props will be forwarded to the subheader
|
|
166
|
-
* (as long as disableTypography is not `true`).
|
|
167
|
-
*/
|
|
168
|
-
subheaderTypographyProps: z.object,
|
|
169
|
-
/**
|
|
170
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
171
|
-
*/
|
|
172
|
-
sx: z.oneOfType([z.arrayOf(z.oneOfType([z.func, z.object, z.bool])), z.func, z.object]),
|
|
173
|
-
/**
|
|
174
|
-
* The content of the component.
|
|
175
|
-
*/
|
|
176
|
-
title: z.node,
|
|
177
|
-
/**
|
|
178
|
-
* These props will be forwarded to the title
|
|
179
|
-
* (as long as disableTypography is not `true`).
|
|
180
|
-
*/
|
|
181
|
-
titleTypographyProps: z.object
|
|
182
|
-
});
|
|
183
|
-
var Vt = { exports: {} };
|
|
1
|
+
var an = Object.defineProperty;
|
|
2
|
+
var ln = (o, e, t) => e in o ? an(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
3
|
+
var At = (o, e, t) => ln(o, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { jsx as Ge } from "react/jsx-runtime";
|
|
5
|
+
import sn from "@mui/material/CardHeader";
|
|
6
|
+
import { g as Yt } from "../../_commonjsHelpers-BVfed4GL.js";
|
|
7
|
+
import cn from "react";
|
|
8
|
+
import { useSortableListLogic as un } from "./logic.js";
|
|
9
|
+
import { SortableListRoot as dn, SortableListItem as fn } from "./styled.js";
|
|
10
|
+
var Bt = { exports: {} };
|
|
184
11
|
/**!
|
|
185
12
|
* Sortable 1.15.7
|
|
186
13
|
* @author RubaXa <trash@rubaxa.org>
|
|
187
14
|
* @author owenm <owen23355@gmail.com>
|
|
188
15
|
* @license MIT
|
|
189
16
|
*/
|
|
190
|
-
function
|
|
191
|
-
(e == null || e >
|
|
192
|
-
for (var t = 0,
|
|
193
|
-
return
|
|
17
|
+
function vt(o, e) {
|
|
18
|
+
(e == null || e > o.length) && (e = o.length);
|
|
19
|
+
for (var t = 0, n = Array(e); t < e; t++) n[t] = o[t];
|
|
20
|
+
return n;
|
|
194
21
|
}
|
|
195
|
-
function
|
|
196
|
-
if (Array.isArray(
|
|
22
|
+
function hn(o) {
|
|
23
|
+
if (Array.isArray(o)) return vt(o);
|
|
197
24
|
}
|
|
198
|
-
function
|
|
199
|
-
return (e =
|
|
25
|
+
function pn(o, e, t) {
|
|
26
|
+
return (e = En(e)) in o ? Object.defineProperty(o, e, {
|
|
200
27
|
value: t,
|
|
201
28
|
enumerable: !0,
|
|
202
29
|
configurable: !0,
|
|
203
30
|
writable: !0
|
|
204
|
-
}) :
|
|
31
|
+
}) : o[e] = t, o;
|
|
205
32
|
}
|
|
206
|
-
function
|
|
207
|
-
return
|
|
33
|
+
function oe() {
|
|
34
|
+
return oe = Object.assign ? Object.assign.bind() : function(o) {
|
|
208
35
|
for (var e = 1; e < arguments.length; e++) {
|
|
209
36
|
var t = arguments[e];
|
|
210
|
-
for (var
|
|
37
|
+
for (var n in t) ({}).hasOwnProperty.call(t, n) && (o[n] = t[n]);
|
|
211
38
|
}
|
|
212
|
-
return
|
|
213
|
-
},
|
|
39
|
+
return o;
|
|
40
|
+
}, oe.apply(null, arguments);
|
|
214
41
|
}
|
|
215
|
-
function
|
|
216
|
-
if (typeof Symbol < "u" &&
|
|
42
|
+
function gn(o) {
|
|
43
|
+
if (typeof Symbol < "u" && o[Symbol.iterator] != null || o["@@iterator"] != null) return Array.from(o);
|
|
217
44
|
}
|
|
218
|
-
function
|
|
45
|
+
function mn() {
|
|
219
46
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
220
47
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
221
48
|
}
|
|
222
|
-
function
|
|
223
|
-
var t = Object.keys(
|
|
49
|
+
function Pt(o, e) {
|
|
50
|
+
var t = Object.keys(o);
|
|
224
51
|
if (Object.getOwnPropertySymbols) {
|
|
225
|
-
var
|
|
226
|
-
e && (
|
|
227
|
-
return Object.getOwnPropertyDescriptor(
|
|
228
|
-
})), t.push.apply(t,
|
|
52
|
+
var n = Object.getOwnPropertySymbols(o);
|
|
53
|
+
e && (n = n.filter(function(i) {
|
|
54
|
+
return Object.getOwnPropertyDescriptor(o, i).enumerable;
|
|
55
|
+
})), t.push.apply(t, n);
|
|
229
56
|
}
|
|
230
57
|
return t;
|
|
231
58
|
}
|
|
232
|
-
function
|
|
59
|
+
function ce(o) {
|
|
233
60
|
for (var e = 1; e < arguments.length; e++) {
|
|
234
61
|
var t = arguments[e] != null ? arguments[e] : {};
|
|
235
|
-
e % 2 ?
|
|
236
|
-
|
|
237
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
238
|
-
Object.defineProperty(
|
|
62
|
+
e % 2 ? Pt(Object(t), !0).forEach(function(n) {
|
|
63
|
+
pn(o, n, t[n]);
|
|
64
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : Pt(Object(t)).forEach(function(n) {
|
|
65
|
+
Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
|
|
239
66
|
});
|
|
240
67
|
}
|
|
241
|
-
return
|
|
68
|
+
return o;
|
|
242
69
|
}
|
|
243
|
-
function
|
|
244
|
-
if (
|
|
245
|
-
var t,
|
|
70
|
+
function bn(o, e) {
|
|
71
|
+
if (o == null) return {};
|
|
72
|
+
var t, n, i = vn(o, e);
|
|
246
73
|
if (Object.getOwnPropertySymbols) {
|
|
247
|
-
var
|
|
248
|
-
for (
|
|
74
|
+
var r = Object.getOwnPropertySymbols(o);
|
|
75
|
+
for (n = 0; n < r.length; n++) t = r[n], e.indexOf(t) === -1 && {}.propertyIsEnumerable.call(o, t) && (i[t] = o[t]);
|
|
249
76
|
}
|
|
250
|
-
return
|
|
77
|
+
return i;
|
|
251
78
|
}
|
|
252
|
-
function
|
|
253
|
-
if (
|
|
79
|
+
function vn(o, e) {
|
|
80
|
+
if (o == null) return {};
|
|
254
81
|
var t = {};
|
|
255
|
-
for (var
|
|
256
|
-
if (e.indexOf(
|
|
257
|
-
t[
|
|
82
|
+
for (var n in o) if ({}.hasOwnProperty.call(o, n)) {
|
|
83
|
+
if (e.indexOf(n) !== -1) continue;
|
|
84
|
+
t[n] = o[n];
|
|
258
85
|
}
|
|
259
86
|
return t;
|
|
260
87
|
}
|
|
261
|
-
function
|
|
262
|
-
return
|
|
88
|
+
function wn(o) {
|
|
89
|
+
return hn(o) || gn(o) || Sn(o) || mn();
|
|
263
90
|
}
|
|
264
|
-
function
|
|
265
|
-
if (typeof
|
|
266
|
-
var t =
|
|
91
|
+
function yn(o, e) {
|
|
92
|
+
if (typeof o != "object" || !o) return o;
|
|
93
|
+
var t = o[Symbol.toPrimitive];
|
|
267
94
|
if (t !== void 0) {
|
|
268
|
-
var
|
|
269
|
-
if (typeof
|
|
95
|
+
var n = t.call(o, e || "default");
|
|
96
|
+
if (typeof n != "object") return n;
|
|
270
97
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
271
98
|
}
|
|
272
|
-
return (e === "string" ? String : Number)(
|
|
99
|
+
return (e === "string" ? String : Number)(o);
|
|
273
100
|
}
|
|
274
|
-
function
|
|
275
|
-
var e =
|
|
101
|
+
function En(o) {
|
|
102
|
+
var e = yn(o, "string");
|
|
276
103
|
return typeof e == "symbol" ? e : e + "";
|
|
277
104
|
}
|
|
278
|
-
function
|
|
105
|
+
function wt(o) {
|
|
279
106
|
"@babel/helpers - typeof";
|
|
280
|
-
return
|
|
107
|
+
return wt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
281
108
|
return typeof e;
|
|
282
109
|
} : function(e) {
|
|
283
110
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
284
|
-
},
|
|
111
|
+
}, wt(o);
|
|
285
112
|
}
|
|
286
|
-
function
|
|
287
|
-
if (
|
|
288
|
-
if (typeof
|
|
289
|
-
var t = {}.toString.call(
|
|
290
|
-
return t === "Object" &&
|
|
113
|
+
function Sn(o, e) {
|
|
114
|
+
if (o) {
|
|
115
|
+
if (typeof o == "string") return vt(o, e);
|
|
116
|
+
var t = {}.toString.call(o).slice(8, -1);
|
|
117
|
+
return t === "Object" && o.constructor && (t = o.constructor.name), t === "Map" || t === "Set" ? Array.from(o) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? vt(o, e) : void 0;
|
|
291
118
|
}
|
|
292
119
|
}
|
|
293
|
-
var
|
|
294
|
-
function
|
|
120
|
+
var Dn = "1.15.7";
|
|
121
|
+
function ue(o) {
|
|
295
122
|
if (typeof window < "u" && window.navigator)
|
|
296
|
-
return !!/* @__PURE__ */ navigator.userAgent.match(
|
|
123
|
+
return !!/* @__PURE__ */ navigator.userAgent.match(o);
|
|
297
124
|
}
|
|
298
|
-
var
|
|
125
|
+
var de = ue(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), He = ue(/Edge/i), Mt = ue(/firefox/i), Re = ue(/safari/i) && !ue(/chrome/i) && !ue(/android/i), _t = ue(/iP(ad|od|hone)/i), Gt = ue(/chrome/i) && ue(/android/i), Ut = {
|
|
299
126
|
capture: !1,
|
|
300
127
|
passive: !1
|
|
301
128
|
};
|
|
302
|
-
function
|
|
303
|
-
|
|
129
|
+
function x(o, e, t) {
|
|
130
|
+
o.addEventListener(e, t, !de && Ut);
|
|
304
131
|
}
|
|
305
|
-
function
|
|
306
|
-
|
|
132
|
+
function C(o, e, t) {
|
|
133
|
+
o.removeEventListener(e, t, !de && Ut);
|
|
307
134
|
}
|
|
308
|
-
function
|
|
135
|
+
function tt(o, e) {
|
|
309
136
|
if (e) {
|
|
310
|
-
if (e[0] === ">" && (e = e.substring(1)),
|
|
137
|
+
if (e[0] === ">" && (e = e.substring(1)), o)
|
|
311
138
|
try {
|
|
312
|
-
if (
|
|
313
|
-
return
|
|
314
|
-
if (
|
|
315
|
-
return
|
|
316
|
-
if (
|
|
317
|
-
return
|
|
139
|
+
if (o.matches)
|
|
140
|
+
return o.matches(e);
|
|
141
|
+
if (o.msMatchesSelector)
|
|
142
|
+
return o.msMatchesSelector(e);
|
|
143
|
+
if (o.webkitMatchesSelector)
|
|
144
|
+
return o.webkitMatchesSelector(e);
|
|
318
145
|
} catch {
|
|
319
146
|
return !1;
|
|
320
147
|
}
|
|
321
148
|
return !1;
|
|
322
149
|
}
|
|
323
150
|
}
|
|
324
|
-
function
|
|
325
|
-
return
|
|
151
|
+
function zt(o) {
|
|
152
|
+
return o.host && o !== document && o.host.nodeType && o.host !== o ? o.host : o.parentNode;
|
|
326
153
|
}
|
|
327
|
-
function
|
|
328
|
-
if (
|
|
154
|
+
function Q(o, e, t, n) {
|
|
155
|
+
if (o) {
|
|
329
156
|
t = t || document;
|
|
330
157
|
do {
|
|
331
|
-
if (e != null && (e[0] === ">" ?
|
|
332
|
-
return
|
|
333
|
-
if (
|
|
334
|
-
} while (
|
|
158
|
+
if (e != null && (e[0] === ">" ? o.parentNode === t && tt(o, e) : tt(o, e)) || n && o === t)
|
|
159
|
+
return o;
|
|
160
|
+
if (o === t) break;
|
|
161
|
+
} while (o = zt(o));
|
|
335
162
|
}
|
|
336
163
|
return null;
|
|
337
164
|
}
|
|
338
|
-
var
|
|
339
|
-
function
|
|
340
|
-
if (
|
|
341
|
-
if (
|
|
342
|
-
|
|
165
|
+
var Nt = /\s+/g;
|
|
166
|
+
function F(o, e, t) {
|
|
167
|
+
if (o && e)
|
|
168
|
+
if (o.classList)
|
|
169
|
+
o.classList[t ? "add" : "remove"](e);
|
|
343
170
|
else {
|
|
344
|
-
var
|
|
345
|
-
|
|
171
|
+
var n = (" " + o.className + " ").replace(Nt, " ").replace(" " + e + " ", " ");
|
|
172
|
+
o.className = (n + (t ? " " + e : "")).replace(Nt, " ");
|
|
346
173
|
}
|
|
347
174
|
}
|
|
348
|
-
function b(
|
|
349
|
-
var
|
|
350
|
-
if (
|
|
175
|
+
function b(o, e, t) {
|
|
176
|
+
var n = o && o.style;
|
|
177
|
+
if (n) {
|
|
351
178
|
if (t === void 0)
|
|
352
|
-
return document.defaultView && document.defaultView.getComputedStyle ? t = document.defaultView.getComputedStyle(
|
|
353
|
-
!(e in
|
|
179
|
+
return document.defaultView && document.defaultView.getComputedStyle ? t = document.defaultView.getComputedStyle(o, "") : o.currentStyle && (t = o.currentStyle), e === void 0 ? t : t[e];
|
|
180
|
+
!(e in n) && e.indexOf("webkit") === -1 && (e = "-webkit-" + e), n[e] = t + (typeof t == "string" ? "" : "px");
|
|
354
181
|
}
|
|
355
182
|
}
|
|
356
|
-
function
|
|
183
|
+
function we(o, e) {
|
|
357
184
|
var t = "";
|
|
358
|
-
if (typeof
|
|
359
|
-
t =
|
|
185
|
+
if (typeof o == "string")
|
|
186
|
+
t = o;
|
|
360
187
|
else
|
|
361
188
|
do {
|
|
362
|
-
var
|
|
363
|
-
|
|
364
|
-
} while (!e && (
|
|
365
|
-
var
|
|
366
|
-
return
|
|
189
|
+
var n = b(o, "transform");
|
|
190
|
+
n && n !== "none" && (t = n + " " + t);
|
|
191
|
+
} while (!e && (o = o.parentNode));
|
|
192
|
+
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
193
|
+
return i && new i(t);
|
|
367
194
|
}
|
|
368
|
-
function
|
|
369
|
-
if (
|
|
370
|
-
var
|
|
195
|
+
function Wt(o, e, t) {
|
|
196
|
+
if (o) {
|
|
197
|
+
var n = o.getElementsByTagName(e), i = 0, r = n.length;
|
|
371
198
|
if (t)
|
|
372
|
-
for (;
|
|
373
|
-
t(
|
|
374
|
-
return
|
|
199
|
+
for (; i < r; i++)
|
|
200
|
+
t(n[i], i);
|
|
201
|
+
return n;
|
|
375
202
|
}
|
|
376
203
|
return [];
|
|
377
204
|
}
|
|
378
|
-
function
|
|
379
|
-
var
|
|
380
|
-
return
|
|
205
|
+
function se() {
|
|
206
|
+
var o = document.scrollingElement;
|
|
207
|
+
return o || document.documentElement;
|
|
381
208
|
}
|
|
382
|
-
function $(
|
|
383
|
-
if (!(!
|
|
384
|
-
var
|
|
385
|
-
if (
|
|
209
|
+
function $(o, e, t, n, i) {
|
|
210
|
+
if (!(!o.getBoundingClientRect && o !== window)) {
|
|
211
|
+
var r, a, l, s, c, h, f;
|
|
212
|
+
if (o !== window && o.parentNode && o !== se() ? (r = o.getBoundingClientRect(), a = r.top, l = r.left, s = r.bottom, c = r.right, h = r.height, f = r.width) : (a = 0, l = 0, s = window.innerHeight, c = window.innerWidth, h = window.innerHeight, f = window.innerWidth), (e || t) && o !== window && (i = i || o.parentNode, !de))
|
|
386
213
|
do
|
|
387
|
-
if (
|
|
388
|
-
var v =
|
|
389
|
-
a -= v.top + parseInt(b(
|
|
214
|
+
if (i && i.getBoundingClientRect && (b(i, "transform") !== "none" || t && b(i, "position") !== "static")) {
|
|
215
|
+
var v = i.getBoundingClientRect();
|
|
216
|
+
a -= v.top + parseInt(b(i, "border-top-width")), l -= v.left + parseInt(b(i, "border-left-width")), s = a + r.height, c = l + r.width;
|
|
390
217
|
break;
|
|
391
218
|
}
|
|
392
|
-
while (
|
|
393
|
-
if (
|
|
394
|
-
var
|
|
395
|
-
|
|
219
|
+
while (i = i.parentNode);
|
|
220
|
+
if (n && o !== window) {
|
|
221
|
+
var T = we(i || o), D = T && T.a, A = T && T.d;
|
|
222
|
+
T && (a /= A, l /= D, f /= D, h /= A, s = a + h, c = l + f);
|
|
396
223
|
}
|
|
397
224
|
return {
|
|
398
225
|
top: a,
|
|
399
|
-
left:
|
|
400
|
-
bottom:
|
|
226
|
+
left: l,
|
|
227
|
+
bottom: s,
|
|
401
228
|
right: c,
|
|
402
229
|
width: f,
|
|
403
|
-
height:
|
|
230
|
+
height: h
|
|
404
231
|
};
|
|
405
232
|
}
|
|
406
233
|
}
|
|
407
|
-
function
|
|
408
|
-
for (var
|
|
409
|
-
var
|
|
410
|
-
if (a =
|
|
411
|
-
if (
|
|
412
|
-
|
|
234
|
+
function $t(o, e, t) {
|
|
235
|
+
for (var n = pe(o, !0), i = $(o)[e]; n; ) {
|
|
236
|
+
var r = $(n)[t], a = void 0;
|
|
237
|
+
if (a = i >= r, !a) return n;
|
|
238
|
+
if (n === se()) break;
|
|
239
|
+
n = pe(n, !1);
|
|
413
240
|
}
|
|
414
241
|
return !1;
|
|
415
242
|
}
|
|
416
|
-
function
|
|
417
|
-
for (var
|
|
418
|
-
if (a[
|
|
419
|
-
if (
|
|
420
|
-
return a[
|
|
421
|
-
|
|
243
|
+
function Ce(o, e, t, n) {
|
|
244
|
+
for (var i = 0, r = 0, a = o.children; r < a.length; ) {
|
|
245
|
+
if (a[r].style.display !== "none" && a[r] !== y.ghost && (n || a[r] !== y.dragged) && Q(a[r], t.draggable, o, !1)) {
|
|
246
|
+
if (i === e)
|
|
247
|
+
return a[r];
|
|
248
|
+
i++;
|
|
422
249
|
}
|
|
423
|
-
|
|
250
|
+
r++;
|
|
424
251
|
}
|
|
425
252
|
return null;
|
|
426
253
|
}
|
|
427
|
-
function
|
|
428
|
-
for (var t =
|
|
254
|
+
function Ct(o, e) {
|
|
255
|
+
for (var t = o.lastElementChild; t && (t === y.ghost || b(t, "display") === "none" || e && !tt(t, e)); )
|
|
429
256
|
t = t.previousElementSibling;
|
|
430
257
|
return t || null;
|
|
431
258
|
}
|
|
432
|
-
function
|
|
259
|
+
function H(o, e) {
|
|
433
260
|
var t = 0;
|
|
434
|
-
if (!
|
|
261
|
+
if (!o || !o.parentNode)
|
|
435
262
|
return -1;
|
|
436
|
-
for (;
|
|
437
|
-
|
|
263
|
+
for (; o = o.previousElementSibling; )
|
|
264
|
+
o.nodeName.toUpperCase() !== "TEMPLATE" && o !== y.clone && (!e || tt(o, e)) && t++;
|
|
438
265
|
return t;
|
|
439
266
|
}
|
|
440
|
-
function
|
|
441
|
-
var e = 0, t = 0,
|
|
442
|
-
if (
|
|
267
|
+
function Rt(o) {
|
|
268
|
+
var e = 0, t = 0, n = se();
|
|
269
|
+
if (o)
|
|
443
270
|
do {
|
|
444
|
-
var
|
|
445
|
-
e +=
|
|
446
|
-
} while (
|
|
271
|
+
var i = we(o), r = i.a, a = i.d;
|
|
272
|
+
e += o.scrollLeft * r, t += o.scrollTop * a;
|
|
273
|
+
} while (o !== n && (o = o.parentNode));
|
|
447
274
|
return [e, t];
|
|
448
275
|
}
|
|
449
|
-
function
|
|
450
|
-
for (var t in
|
|
451
|
-
if (
|
|
452
|
-
for (var
|
|
453
|
-
if (e.hasOwnProperty(
|
|
276
|
+
function _n(o, e) {
|
|
277
|
+
for (var t in o)
|
|
278
|
+
if (o.hasOwnProperty(t)) {
|
|
279
|
+
for (var n in e)
|
|
280
|
+
if (e.hasOwnProperty(n) && e[n] === o[t][n]) return Number(t);
|
|
454
281
|
}
|
|
455
282
|
return -1;
|
|
456
283
|
}
|
|
457
|
-
function
|
|
458
|
-
if (!
|
|
459
|
-
var t =
|
|
284
|
+
function pe(o, e) {
|
|
285
|
+
if (!o || !o.getBoundingClientRect) return se();
|
|
286
|
+
var t = o, n = !1;
|
|
460
287
|
do
|
|
461
288
|
if (t.clientWidth < t.scrollWidth || t.clientHeight < t.scrollHeight) {
|
|
462
|
-
var
|
|
463
|
-
if (t.clientWidth < t.scrollWidth && (
|
|
464
|
-
if (!t.getBoundingClientRect || t === document.body) return
|
|
465
|
-
if (
|
|
466
|
-
|
|
289
|
+
var i = b(t);
|
|
290
|
+
if (t.clientWidth < t.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || t.clientHeight < t.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
291
|
+
if (!t.getBoundingClientRect || t === document.body) return se();
|
|
292
|
+
if (n || e) return t;
|
|
293
|
+
n = !0;
|
|
467
294
|
}
|
|
468
295
|
}
|
|
469
296
|
while (t = t.parentNode);
|
|
470
|
-
return
|
|
297
|
+
return se();
|
|
471
298
|
}
|
|
472
|
-
function
|
|
473
|
-
if (
|
|
299
|
+
function Cn(o, e) {
|
|
300
|
+
if (o && e)
|
|
474
301
|
for (var t in e)
|
|
475
|
-
e.hasOwnProperty(t) && (
|
|
476
|
-
return
|
|
302
|
+
e.hasOwnProperty(t) && (o[t] = e[t]);
|
|
303
|
+
return o;
|
|
477
304
|
}
|
|
478
|
-
function
|
|
479
|
-
return Math.round(
|
|
305
|
+
function lt(o, e) {
|
|
306
|
+
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);
|
|
480
307
|
}
|
|
481
|
-
var
|
|
482
|
-
function
|
|
308
|
+
var Le;
|
|
309
|
+
function Kt(o, e) {
|
|
483
310
|
return function() {
|
|
484
|
-
if (!
|
|
485
|
-
var t = arguments,
|
|
486
|
-
t.length === 1 ?
|
|
487
|
-
|
|
311
|
+
if (!Le) {
|
|
312
|
+
var t = arguments, n = this;
|
|
313
|
+
t.length === 1 ? o.call(n, t[0]) : o.apply(n, t), Le = setTimeout(function() {
|
|
314
|
+
Le = void 0;
|
|
488
315
|
}, e);
|
|
489
316
|
}
|
|
490
317
|
};
|
|
491
318
|
}
|
|
492
|
-
function
|
|
493
|
-
clearTimeout(
|
|
319
|
+
function On() {
|
|
320
|
+
clearTimeout(Le), Le = void 0;
|
|
494
321
|
}
|
|
495
|
-
function
|
|
496
|
-
|
|
322
|
+
function qt(o, e, t) {
|
|
323
|
+
o.scrollLeft += e, o.scrollTop += t;
|
|
497
324
|
}
|
|
498
|
-
function
|
|
325
|
+
function Ot(o) {
|
|
499
326
|
var e = window.Polymer, t = window.jQuery || window.Zepto;
|
|
500
|
-
return e && e.dom ? e.dom(
|
|
327
|
+
return e && e.dom ? e.dom(o).cloneNode(!0) : t ? t(o).clone(!0)[0] : o.cloneNode(!0);
|
|
501
328
|
}
|
|
502
|
-
function
|
|
503
|
-
b(
|
|
329
|
+
function Lt(o, e) {
|
|
330
|
+
b(o, "position", "absolute"), b(o, "top", e.top), b(o, "left", e.left), b(o, "width", e.width), b(o, "height", e.height);
|
|
504
331
|
}
|
|
505
|
-
function
|
|
506
|
-
b(
|
|
332
|
+
function st(o) {
|
|
333
|
+
b(o, "position", ""), b(o, "top", ""), b(o, "left", ""), b(o, "width", ""), b(o, "height", "");
|
|
507
334
|
}
|
|
508
|
-
function
|
|
509
|
-
var
|
|
510
|
-
return Array.from(
|
|
511
|
-
var
|
|
512
|
-
if (!(!
|
|
513
|
-
var c = $(
|
|
514
|
-
|
|
335
|
+
function Vt(o, e, t) {
|
|
336
|
+
var n = {};
|
|
337
|
+
return Array.from(o.children).forEach(function(i) {
|
|
338
|
+
var r, a, l, s;
|
|
339
|
+
if (!(!Q(i, e.draggable, o, !1) || i.animated || i === t)) {
|
|
340
|
+
var c = $(i);
|
|
341
|
+
n.left = Math.min((r = n.left) !== null && r !== void 0 ? r : 1 / 0, c.left), n.top = Math.min((a = n.top) !== null && a !== void 0 ? a : 1 / 0, c.top), n.right = Math.max((l = n.right) !== null && l !== void 0 ? l : -1 / 0, c.right), n.bottom = Math.max((s = n.bottom) !== null && s !== void 0 ? s : -1 / 0, c.bottom);
|
|
515
342
|
}
|
|
516
|
-
}),
|
|
343
|
+
}), n.width = n.right - n.left, n.height = n.bottom - n.top, n.x = n.left, n.y = n.top, n;
|
|
517
344
|
}
|
|
518
|
-
var
|
|
519
|
-
function
|
|
520
|
-
var
|
|
345
|
+
var z = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
346
|
+
function xn() {
|
|
347
|
+
var o = [], e;
|
|
521
348
|
return {
|
|
522
349
|
captureAnimationState: function() {
|
|
523
|
-
if (
|
|
524
|
-
var
|
|
525
|
-
|
|
526
|
-
if (!(b(
|
|
527
|
-
|
|
528
|
-
target:
|
|
529
|
-
rect: $(
|
|
350
|
+
if (o = [], !!this.options.animation) {
|
|
351
|
+
var n = [].slice.call(this.el.children);
|
|
352
|
+
n.forEach(function(i) {
|
|
353
|
+
if (!(b(i, "display") === "none" || i === y.ghost)) {
|
|
354
|
+
o.push({
|
|
355
|
+
target: i,
|
|
356
|
+
rect: $(i)
|
|
530
357
|
});
|
|
531
|
-
var
|
|
532
|
-
if (
|
|
533
|
-
var a =
|
|
534
|
-
a && (
|
|
358
|
+
var r = ce({}, o[o.length - 1].rect);
|
|
359
|
+
if (i.thisAnimationDuration) {
|
|
360
|
+
var a = we(i, !0);
|
|
361
|
+
a && (r.top -= a.f, r.left -= a.e);
|
|
535
362
|
}
|
|
536
|
-
|
|
363
|
+
i.fromRect = r;
|
|
537
364
|
}
|
|
538
365
|
});
|
|
539
366
|
}
|
|
540
367
|
},
|
|
541
|
-
addAnimationState: function(
|
|
542
|
-
|
|
368
|
+
addAnimationState: function(n) {
|
|
369
|
+
o.push(n);
|
|
543
370
|
},
|
|
544
|
-
removeAnimationState: function(
|
|
545
|
-
|
|
546
|
-
target:
|
|
371
|
+
removeAnimationState: function(n) {
|
|
372
|
+
o.splice(_n(o, {
|
|
373
|
+
target: n
|
|
547
374
|
}), 1);
|
|
548
375
|
},
|
|
549
|
-
animateAll: function(
|
|
550
|
-
var
|
|
376
|
+
animateAll: function(n) {
|
|
377
|
+
var i = this;
|
|
551
378
|
if (!this.options.animation) {
|
|
552
|
-
clearTimeout(e), typeof
|
|
379
|
+
clearTimeout(e), typeof n == "function" && n();
|
|
553
380
|
return;
|
|
554
381
|
}
|
|
555
|
-
var
|
|
556
|
-
|
|
557
|
-
var
|
|
558
|
-
|
|
559
|
-
(
|
|
382
|
+
var r = !1, a = 0;
|
|
383
|
+
o.forEach(function(l) {
|
|
384
|
+
var s = 0, c = l.target, h = c.fromRect, f = $(c), v = c.prevFromRect, T = c.prevToRect, D = l.rect, A = we(c, !0);
|
|
385
|
+
A && (f.top -= A.f, f.left -= A.e), c.toRect = f, c.thisAnimationDuration && lt(v, f) && !lt(h, f) && // Make sure animatingRect is on line between toRect & fromRect
|
|
386
|
+
(D.top - f.top) / (D.left - f.left) === (h.top - f.top) / (h.left - f.left) && (s = Tn(D, v, T, i.options)), lt(f, h) || (c.prevFromRect = h, c.prevToRect = f, s || (s = i.options.animation), i.animate(c, D, f, s)), s && (r = !0, a = Math.max(a, s), clearTimeout(c.animationResetTimer), c.animationResetTimer = setTimeout(function() {
|
|
560
387
|
c.animationTime = 0, c.prevFromRect = null, c.fromRect = null, c.prevToRect = null, c.thisAnimationDuration = null;
|
|
561
|
-
},
|
|
562
|
-
}), clearTimeout(e),
|
|
563
|
-
typeof
|
|
564
|
-
}, a) : typeof
|
|
388
|
+
}, s), c.thisAnimationDuration = s);
|
|
389
|
+
}), clearTimeout(e), r ? e = setTimeout(function() {
|
|
390
|
+
typeof n == "function" && n();
|
|
391
|
+
}, a) : typeof n == "function" && n(), o = [];
|
|
565
392
|
},
|
|
566
|
-
animate: function(
|
|
393
|
+
animate: function(n, i, r, a) {
|
|
567
394
|
if (a) {
|
|
568
|
-
b(
|
|
569
|
-
var
|
|
570
|
-
|
|
571
|
-
b(
|
|
395
|
+
b(n, "transition", ""), b(n, "transform", "");
|
|
396
|
+
var l = we(this.el), s = l && l.a, c = l && l.d, h = (i.left - r.left) / (s || 1), f = (i.top - r.top) / (c || 1);
|
|
397
|
+
n.animatingX = !!h, n.animatingY = !!f, b(n, "transform", "translate3d(" + h + "px," + f + "px,0)"), this.forRepaintDummy = In(n), b(n, "transition", "transform " + a + "ms" + (this.options.easing ? " " + this.options.easing : "")), b(n, "transform", "translate3d(0,0,0)"), typeof n.animated == "number" && clearTimeout(n.animated), n.animated = setTimeout(function() {
|
|
398
|
+
b(n, "transition", ""), b(n, "transform", ""), n.animated = !1, n.animatingX = !1, n.animatingY = !1;
|
|
572
399
|
}, a);
|
|
573
400
|
}
|
|
574
401
|
}
|
|
575
402
|
};
|
|
576
403
|
}
|
|
577
|
-
function
|
|
578
|
-
return
|
|
404
|
+
function In(o) {
|
|
405
|
+
return o.offsetWidth;
|
|
579
406
|
}
|
|
580
|
-
function
|
|
581
|
-
return Math.sqrt(Math.pow(e.top -
|
|
407
|
+
function Tn(o, e, t, n) {
|
|
408
|
+
return Math.sqrt(Math.pow(e.top - o.top, 2) + Math.pow(e.left - o.left, 2)) / Math.sqrt(Math.pow(e.top - t.top, 2) + Math.pow(e.left - t.left, 2)) * n.animation;
|
|
582
409
|
}
|
|
583
|
-
var
|
|
410
|
+
var ye = [], ct = {
|
|
584
411
|
initializeByDefault: !0
|
|
585
|
-
},
|
|
412
|
+
}, Xe = {
|
|
586
413
|
mount: function(e) {
|
|
587
|
-
for (var t in
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
if (
|
|
414
|
+
for (var t in ct)
|
|
415
|
+
ct.hasOwnProperty(t) && !(t in e) && (e[t] = ct[t]);
|
|
416
|
+
ye.forEach(function(n) {
|
|
417
|
+
if (n.pluginName === e.pluginName)
|
|
591
418
|
throw "Sortable: Cannot mount plugin ".concat(e.pluginName, " more than once");
|
|
592
|
-
}),
|
|
419
|
+
}), ye.push(e);
|
|
593
420
|
},
|
|
594
|
-
pluginEvent: function(e, t,
|
|
595
|
-
var
|
|
596
|
-
this.eventCanceled = !1,
|
|
597
|
-
|
|
421
|
+
pluginEvent: function(e, t, n) {
|
|
422
|
+
var i = this;
|
|
423
|
+
this.eventCanceled = !1, n.cancel = function() {
|
|
424
|
+
i.eventCanceled = !0;
|
|
598
425
|
};
|
|
599
|
-
var
|
|
600
|
-
|
|
601
|
-
t[a.pluginName] && (t[a.pluginName][
|
|
426
|
+
var r = e + "Global";
|
|
427
|
+
ye.forEach(function(a) {
|
|
428
|
+
t[a.pluginName] && (t[a.pluginName][r] && t[a.pluginName][r](ce({
|
|
602
429
|
sortable: t
|
|
603
|
-
},
|
|
430
|
+
}, n)), t.options[a.pluginName] && t[a.pluginName][e] && t[a.pluginName][e](ce({
|
|
604
431
|
sortable: t
|
|
605
|
-
},
|
|
432
|
+
}, n)));
|
|
606
433
|
});
|
|
607
434
|
},
|
|
608
|
-
initializePlugins: function(e, t,
|
|
609
|
-
|
|
610
|
-
var
|
|
611
|
-
if (!(!e.options[
|
|
612
|
-
var c = new
|
|
613
|
-
c.sortable = e, c.options = e.options, e[
|
|
435
|
+
initializePlugins: function(e, t, n, i) {
|
|
436
|
+
ye.forEach(function(l) {
|
|
437
|
+
var s = l.pluginName;
|
|
438
|
+
if (!(!e.options[s] && !l.initializeByDefault)) {
|
|
439
|
+
var c = new l(e, t, e.options);
|
|
440
|
+
c.sortable = e, c.options = e.options, e[s] = c, oe(n, c.defaults);
|
|
614
441
|
}
|
|
615
442
|
});
|
|
616
|
-
for (var
|
|
617
|
-
if (e.options.hasOwnProperty(
|
|
618
|
-
var a = this.modifyOption(e,
|
|
619
|
-
typeof a < "u" && (e.options[
|
|
443
|
+
for (var r in e.options)
|
|
444
|
+
if (e.options.hasOwnProperty(r)) {
|
|
445
|
+
var a = this.modifyOption(e, r, e.options[r]);
|
|
446
|
+
typeof a < "u" && (e.options[r] = a);
|
|
620
447
|
}
|
|
621
448
|
},
|
|
622
449
|
getEventProperties: function(e, t) {
|
|
623
|
-
var
|
|
624
|
-
return
|
|
625
|
-
typeof
|
|
626
|
-
}),
|
|
450
|
+
var n = {};
|
|
451
|
+
return ye.forEach(function(i) {
|
|
452
|
+
typeof i.eventProperties == "function" && oe(n, i.eventProperties.call(t[i.pluginName], e));
|
|
453
|
+
}), n;
|
|
627
454
|
},
|
|
628
|
-
modifyOption: function(e, t,
|
|
629
|
-
var
|
|
630
|
-
return
|
|
631
|
-
e[
|
|
632
|
-
}),
|
|
455
|
+
modifyOption: function(e, t, n) {
|
|
456
|
+
var i;
|
|
457
|
+
return ye.forEach(function(r) {
|
|
458
|
+
e[r.pluginName] && r.optionListeners && typeof r.optionListeners[t] == "function" && (i = r.optionListeners[t].call(e[r.pluginName], n));
|
|
459
|
+
}), i;
|
|
633
460
|
}
|
|
634
461
|
};
|
|
635
|
-
function
|
|
636
|
-
var e =
|
|
637
|
-
if (e = e || t && t[
|
|
638
|
-
var
|
|
639
|
-
window.CustomEvent && !
|
|
462
|
+
function Pe(o) {
|
|
463
|
+
var e = o.sortable, t = o.rootEl, n = o.name, i = o.targetEl, r = o.cloneEl, a = o.toEl, l = o.fromEl, s = o.oldIndex, c = o.newIndex, h = o.oldDraggableIndex, f = o.newDraggableIndex, v = o.originalEvent, T = o.putSortable, D = o.extraEventProperties;
|
|
464
|
+
if (e = e || t && t[z], !!e) {
|
|
465
|
+
var A, G = e.options, V = "on" + n.charAt(0).toUpperCase() + n.substr(1);
|
|
466
|
+
window.CustomEvent && !de && !He ? A = new CustomEvent(n, {
|
|
640
467
|
bubbles: !0,
|
|
641
468
|
cancelable: !0
|
|
642
|
-
}) : (
|
|
643
|
-
var
|
|
644
|
-
for (var O in
|
|
645
|
-
|
|
646
|
-
t && t.dispatchEvent(
|
|
469
|
+
}) : (A = document.createEvent("Event"), A.initEvent(n, !0, !0)), A.to = a || t, A.from = l || t, A.item = i || t, A.clone = r, A.oldIndex = s, A.newIndex = c, A.oldDraggableIndex = h, A.newDraggableIndex = f, A.originalEvent = v, A.pullMode = T ? T.lastPutMode : void 0;
|
|
470
|
+
var I = ce(ce({}, D), Xe.getEventProperties(n, e));
|
|
471
|
+
for (var O in I)
|
|
472
|
+
A[O] = I[O];
|
|
473
|
+
t && t.dispatchEvent(A), G[V] && G[V].call(e, A);
|
|
647
474
|
}
|
|
648
475
|
}
|
|
649
|
-
var
|
|
650
|
-
var
|
|
651
|
-
|
|
476
|
+
var An = ["evt"], Z = function(e, t) {
|
|
477
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = n.evt, r = bn(n, An);
|
|
478
|
+
Xe.pluginEvent.bind(y)(e, t, ce({
|
|
652
479
|
dragEl: d,
|
|
653
|
-
parentEl:
|
|
654
|
-
ghostEl:
|
|
655
|
-
rootEl:
|
|
656
|
-
nextEl:
|
|
657
|
-
lastDownEl:
|
|
480
|
+
parentEl: j,
|
|
481
|
+
ghostEl: S,
|
|
482
|
+
rootEl: R,
|
|
483
|
+
nextEl: ve,
|
|
484
|
+
lastDownEl: Ze,
|
|
658
485
|
cloneEl: L,
|
|
659
486
|
cloneHidden: he,
|
|
660
|
-
dragStarted:
|
|
661
|
-
putSortable:
|
|
662
|
-
activeSortable:
|
|
663
|
-
originalEvent:
|
|
664
|
-
oldIndex:
|
|
665
|
-
oldDraggableIndex:
|
|
666
|
-
newIndex:
|
|
667
|
-
newDraggableIndex:
|
|
668
|
-
hideGhostForTarget:
|
|
669
|
-
unhideGhostForTarget:
|
|
487
|
+
dragStarted: Me,
|
|
488
|
+
putSortable: U,
|
|
489
|
+
activeSortable: y.active,
|
|
490
|
+
originalEvent: i,
|
|
491
|
+
oldIndex: _e,
|
|
492
|
+
oldDraggableIndex: Fe,
|
|
493
|
+
newIndex: te,
|
|
494
|
+
newDraggableIndex: fe,
|
|
495
|
+
hideGhostForTarget: en,
|
|
496
|
+
unhideGhostForTarget: tn,
|
|
670
497
|
cloneNowHidden: function() {
|
|
671
498
|
he = !0;
|
|
672
499
|
},
|
|
673
500
|
cloneNowShown: function() {
|
|
674
501
|
he = !1;
|
|
675
502
|
},
|
|
676
|
-
dispatchSortableEvent: function(
|
|
677
|
-
|
|
503
|
+
dispatchSortableEvent: function(l) {
|
|
504
|
+
q({
|
|
678
505
|
sortable: t,
|
|
679
|
-
name:
|
|
680
|
-
originalEvent:
|
|
506
|
+
name: l,
|
|
507
|
+
originalEvent: i
|
|
681
508
|
});
|
|
682
509
|
}
|
|
683
|
-
},
|
|
510
|
+
}, r));
|
|
684
511
|
};
|
|
685
|
-
function
|
|
686
|
-
|
|
687
|
-
putSortable:
|
|
512
|
+
function q(o) {
|
|
513
|
+
Pe(ce({
|
|
514
|
+
putSortable: U,
|
|
688
515
|
cloneEl: L,
|
|
689
516
|
targetEl: d,
|
|
690
|
-
rootEl:
|
|
691
|
-
oldIndex:
|
|
692
|
-
oldDraggableIndex:
|
|
693
|
-
newIndex:
|
|
694
|
-
newDraggableIndex:
|
|
695
|
-
},
|
|
696
|
-
}
|
|
697
|
-
var d,
|
|
698
|
-
if (
|
|
699
|
-
if (
|
|
517
|
+
rootEl: R,
|
|
518
|
+
oldIndex: _e,
|
|
519
|
+
oldDraggableIndex: Fe,
|
|
520
|
+
newIndex: te,
|
|
521
|
+
newDraggableIndex: fe
|
|
522
|
+
}, o));
|
|
523
|
+
}
|
|
524
|
+
var d, j, S, R, ve, Ze, L, he, _e, te, Fe, fe, Ue, U, De = !1, nt = !1, ot = [], me, ae, ut, dt, Ft, kt, Me, Ee, ke, je = !1, ze = !1, Je, W, ft = [], yt = !1, it = [], at = typeof document < "u", We = _t, jt = He || de ? "cssFloat" : "float", Pn = at && !Gt && !_t && "draggable" in document.createElement("div"), Zt = function() {
|
|
525
|
+
if (at) {
|
|
526
|
+
if (de)
|
|
700
527
|
return !1;
|
|
701
|
-
var
|
|
702
|
-
return
|
|
528
|
+
var o = document.createElement("x");
|
|
529
|
+
return o.style.cssText = "pointer-events:auto", o.style.pointerEvents === "auto";
|
|
703
530
|
}
|
|
704
|
-
}(),
|
|
705
|
-
var
|
|
706
|
-
if (
|
|
707
|
-
return
|
|
708
|
-
if (
|
|
709
|
-
return
|
|
710
|
-
if (
|
|
711
|
-
var f =
|
|
712
|
-
return a && (
|
|
531
|
+
}(), Jt = function(e, t) {
|
|
532
|
+
var n = b(e), i = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), r = Ce(e, 0, t), a = Ce(e, 1, t), l = r && b(r), s = a && b(a), c = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + $(r).width, h = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + $(a).width;
|
|
533
|
+
if (n.display === "flex")
|
|
534
|
+
return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
535
|
+
if (n.display === "grid")
|
|
536
|
+
return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
537
|
+
if (r && l.float && l.float !== "none") {
|
|
538
|
+
var f = l.float === "left" ? "left" : "right";
|
|
539
|
+
return a && (s.clear === "both" || s.clear === f) ? "vertical" : "horizontal";
|
|
713
540
|
}
|
|
714
|
-
return
|
|
715
|
-
},
|
|
716
|
-
var
|
|
717
|
-
return
|
|
718
|
-
},
|
|
719
|
-
var
|
|
720
|
-
return
|
|
721
|
-
var
|
|
722
|
-
if (!(!
|
|
723
|
-
var a = $(
|
|
724
|
-
if (
|
|
725
|
-
return
|
|
541
|
+
return r && (l.display === "block" || l.display === "flex" || l.display === "table" || l.display === "grid" || c >= i && n[jt] === "none" || a && n[jt] === "none" && c + h > i) ? "vertical" : "horizontal";
|
|
542
|
+
}, Mn = function(e, t, n) {
|
|
543
|
+
var i = n ? e.left : e.top, r = n ? e.right : e.bottom, a = n ? e.width : e.height, l = n ? t.left : t.top, s = n ? t.right : t.bottom, c = n ? t.width : t.height;
|
|
544
|
+
return i === l || r === s || i + a / 2 === l + c / 2;
|
|
545
|
+
}, Nn = function(e, t) {
|
|
546
|
+
var n;
|
|
547
|
+
return ot.some(function(i) {
|
|
548
|
+
var r = i[z].options.emptyInsertThreshold;
|
|
549
|
+
if (!(!r || Ct(i))) {
|
|
550
|
+
var a = $(i), l = e >= a.left - r && e <= a.right + r, s = t >= a.top - r && t <= a.bottom + r;
|
|
551
|
+
if (l && s)
|
|
552
|
+
return n = i;
|
|
726
553
|
}
|
|
727
|
-
}),
|
|
728
|
-
},
|
|
729
|
-
function t(
|
|
730
|
-
return function(
|
|
731
|
-
var f =
|
|
732
|
-
if (
|
|
554
|
+
}), n;
|
|
555
|
+
}, Qt = function(e) {
|
|
556
|
+
function t(r, a) {
|
|
557
|
+
return function(l, s, c, h) {
|
|
558
|
+
var f = l.options.group.name && s.options.group.name && l.options.group.name === s.options.group.name;
|
|
559
|
+
if (r == null && (a || f))
|
|
733
560
|
return !0;
|
|
734
|
-
if (
|
|
561
|
+
if (r == null || r === !1)
|
|
735
562
|
return !1;
|
|
736
|
-
if (a &&
|
|
737
|
-
return
|
|
738
|
-
if (typeof
|
|
739
|
-
return t(
|
|
740
|
-
var v = (a ?
|
|
741
|
-
return
|
|
563
|
+
if (a && r === "clone")
|
|
564
|
+
return r;
|
|
565
|
+
if (typeof r == "function")
|
|
566
|
+
return t(r(l, s, c, h), a)(l, s, c, h);
|
|
567
|
+
var v = (a ? l : s).options.group.name;
|
|
568
|
+
return r === !0 || typeof r == "string" && r === v || r.join && r.indexOf(v) > -1;
|
|
742
569
|
};
|
|
743
570
|
}
|
|
744
|
-
var
|
|
745
|
-
(!
|
|
746
|
-
name:
|
|
747
|
-
}),
|
|
748
|
-
},
|
|
749
|
-
!
|
|
750
|
-
},
|
|
751
|
-
!
|
|
571
|
+
var n = {}, i = e.group;
|
|
572
|
+
(!i || wt(i) != "object") && (i = {
|
|
573
|
+
name: i
|
|
574
|
+
}), n.name = i.name, n.checkPull = t(i.pull, !0), n.checkPut = t(i.put), n.revertClone = i.revertClone, e.group = n;
|
|
575
|
+
}, en = function() {
|
|
576
|
+
!Zt && S && b(S, "display", "none");
|
|
577
|
+
}, tn = function() {
|
|
578
|
+
!Zt && S && b(S, "display", "");
|
|
752
579
|
};
|
|
753
|
-
|
|
754
|
-
if (
|
|
755
|
-
return
|
|
580
|
+
at && !Gt && document.addEventListener("click", function(o) {
|
|
581
|
+
if (nt)
|
|
582
|
+
return o.preventDefault(), o.stopPropagation && o.stopPropagation(), o.stopImmediatePropagation && o.stopImmediatePropagation(), nt = !1, !1;
|
|
756
583
|
}, !0);
|
|
757
|
-
var
|
|
584
|
+
var be = function(e) {
|
|
758
585
|
if (d) {
|
|
759
586
|
e = e.touches ? e.touches[0] : e;
|
|
760
|
-
var t =
|
|
587
|
+
var t = Nn(e.clientX, e.clientY);
|
|
761
588
|
if (t) {
|
|
762
|
-
var
|
|
763
|
-
for (var
|
|
764
|
-
e.hasOwnProperty(
|
|
765
|
-
|
|
589
|
+
var n = {};
|
|
590
|
+
for (var i in e)
|
|
591
|
+
e.hasOwnProperty(i) && (n[i] = e[i]);
|
|
592
|
+
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[z]._onDragOver(n);
|
|
766
593
|
}
|
|
767
594
|
}
|
|
768
|
-
},
|
|
769
|
-
d && d.parentNode[
|
|
595
|
+
}, $n = function(e) {
|
|
596
|
+
d && d.parentNode[z]._isOutsideThisEl(e.target);
|
|
770
597
|
};
|
|
771
|
-
function
|
|
772
|
-
if (!(
|
|
773
|
-
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(
|
|
774
|
-
this.el =
|
|
598
|
+
function y(o, e) {
|
|
599
|
+
if (!(o && o.nodeType && o.nodeType === 1))
|
|
600
|
+
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));
|
|
601
|
+
this.el = o, this.options = e = oe({}, e), o[z] = this;
|
|
775
602
|
var t = {
|
|
776
603
|
group: null,
|
|
777
604
|
sort: !0,
|
|
778
605
|
disabled: !1,
|
|
779
606
|
store: null,
|
|
780
607
|
handle: null,
|
|
781
|
-
draggable: /^[uo]l$/i.test(
|
|
608
|
+
draggable: /^[uo]l$/i.test(o.nodeName) ? ">li" : ">*",
|
|
782
609
|
swapThreshold: 1,
|
|
783
610
|
// percentage; 0 <= x <= 1
|
|
784
611
|
invertSwap: !1,
|
|
@@ -787,7 +614,7 @@ function w(n, e) {
|
|
|
787
614
|
// will be set to same as swapThreshold if default
|
|
788
615
|
removeCloneOnHide: !0,
|
|
789
616
|
direction: function() {
|
|
790
|
-
return
|
|
617
|
+
return Jt(o, this.options);
|
|
791
618
|
},
|
|
792
619
|
ghostClass: "sortable-ghost",
|
|
793
620
|
chosenClass: "sortable-chosen",
|
|
@@ -797,8 +624,8 @@ function w(n, e) {
|
|
|
797
624
|
preventOnFilter: !0,
|
|
798
625
|
animation: 0,
|
|
799
626
|
easing: null,
|
|
800
|
-
setData: function(a,
|
|
801
|
-
a.setData("Text",
|
|
627
|
+
setData: function(a, l) {
|
|
628
|
+
a.setData("Text", l.textContent);
|
|
802
629
|
},
|
|
803
630
|
dropBubble: !1,
|
|
804
631
|
dragoverBubble: !1,
|
|
@@ -815,96 +642,96 @@ function w(n, e) {
|
|
|
815
642
|
y: 0
|
|
816
643
|
},
|
|
817
644
|
// Disabled on Safari: #1571; Enabled on Safari IOS: #2244
|
|
818
|
-
supportPointer:
|
|
645
|
+
supportPointer: y.supportPointer !== !1 && "PointerEvent" in window && (!Re || _t),
|
|
819
646
|
emptyInsertThreshold: 5
|
|
820
647
|
};
|
|
821
|
-
|
|
822
|
-
for (var
|
|
823
|
-
!(
|
|
824
|
-
|
|
825
|
-
for (var
|
|
826
|
-
|
|
827
|
-
this.nativeDraggable = e.forceFallback ? !1 :
|
|
828
|
-
}
|
|
829
|
-
|
|
648
|
+
Xe.initializePlugins(this, o, t);
|
|
649
|
+
for (var n in t)
|
|
650
|
+
!(n in e) && (e[n] = t[n]);
|
|
651
|
+
Qt(e);
|
|
652
|
+
for (var i in this)
|
|
653
|
+
i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
654
|
+
this.nativeDraggable = e.forceFallback ? !1 : Pn, this.nativeDraggable && (this.options.touchStartThreshold = 1), e.supportPointer ? x(o, "pointerdown", this._onTapStart) : (x(o, "mousedown", this._onTapStart), x(o, "touchstart", this._onTapStart)), this.nativeDraggable && (x(o, "dragover", this), x(o, "dragenter", this)), ot.push(this.el), e.store && e.store.get && this.sort(e.store.get(this) || []), oe(this, xn());
|
|
655
|
+
}
|
|
656
|
+
y.prototype = /** @lends Sortable.prototype */
|
|
830
657
|
{
|
|
831
|
-
constructor:
|
|
658
|
+
constructor: y,
|
|
832
659
|
_isOutsideThisEl: function(e) {
|
|
833
|
-
!this.el.contains(e) && e !== this.el && (
|
|
660
|
+
!this.el.contains(e) && e !== this.el && (Ee = null);
|
|
834
661
|
},
|
|
835
662
|
_getDirection: function(e, t) {
|
|
836
663
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, d) : this.options.direction;
|
|
837
664
|
},
|
|
838
665
|
_onTapStart: function(e) {
|
|
839
666
|
if (e.cancelable) {
|
|
840
|
-
var t = this,
|
|
841
|
-
if (
|
|
842
|
-
if (
|
|
843
|
-
if (
|
|
844
|
-
|
|
667
|
+
var t = this, n = 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, c = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, h = i.filter;
|
|
668
|
+
if (Yn(n), !d && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || i.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Re && s && s.tagName.toUpperCase() === "SELECT") && (s = Q(s, i.draggable, n, !1), !(s && s.animated) && Ze !== s)) {
|
|
669
|
+
if (_e = H(s), Fe = H(s, i.draggable), typeof h == "function") {
|
|
670
|
+
if (h.call(this, e, s, this)) {
|
|
671
|
+
q({
|
|
845
672
|
sortable: t,
|
|
846
673
|
rootEl: c,
|
|
847
674
|
name: "filter",
|
|
848
|
-
targetEl:
|
|
849
|
-
toEl:
|
|
850
|
-
fromEl:
|
|
851
|
-
}),
|
|
675
|
+
targetEl: s,
|
|
676
|
+
toEl: n,
|
|
677
|
+
fromEl: n
|
|
678
|
+
}), Z("filter", t, {
|
|
852
679
|
evt: e
|
|
853
|
-
}),
|
|
680
|
+
}), r && e.preventDefault();
|
|
854
681
|
return;
|
|
855
682
|
}
|
|
856
|
-
} else if (
|
|
857
|
-
if (f =
|
|
858
|
-
return
|
|
683
|
+
} else if (h && (h = h.split(",").some(function(f) {
|
|
684
|
+
if (f = Q(c, f.trim(), n, !1), f)
|
|
685
|
+
return q({
|
|
859
686
|
sortable: t,
|
|
860
687
|
rootEl: f,
|
|
861
688
|
name: "filter",
|
|
862
|
-
targetEl:
|
|
863
|
-
fromEl:
|
|
864
|
-
toEl:
|
|
865
|
-
}),
|
|
689
|
+
targetEl: s,
|
|
690
|
+
fromEl: n,
|
|
691
|
+
toEl: n
|
|
692
|
+
}), Z("filter", t, {
|
|
866
693
|
evt: e
|
|
867
694
|
}), !0;
|
|
868
|
-
}),
|
|
869
|
-
|
|
695
|
+
}), h)) {
|
|
696
|
+
r && e.preventDefault();
|
|
870
697
|
return;
|
|
871
698
|
}
|
|
872
|
-
|
|
699
|
+
i.handle && !Q(c, i.handle, n, !1) || this._prepareDragStart(e, l, s);
|
|
873
700
|
}
|
|
874
701
|
}
|
|
875
702
|
},
|
|
876
|
-
_prepareDragStart: function(e, t,
|
|
877
|
-
var
|
|
878
|
-
if (
|
|
879
|
-
var c = $(
|
|
880
|
-
if (
|
|
703
|
+
_prepareDragStart: function(e, t, n) {
|
|
704
|
+
var i = this, r = i.el, a = i.options, l = r.ownerDocument, s;
|
|
705
|
+
if (n && !d && n.parentNode === r) {
|
|
706
|
+
var c = $(n);
|
|
707
|
+
if (R = r, d = n, j = d.parentNode, ve = d.nextSibling, Ze = n, Ue = a.group, y.dragged = d, me = {
|
|
881
708
|
target: d,
|
|
882
709
|
clientX: (t || e).clientX,
|
|
883
710
|
clientY: (t || e).clientY
|
|
884
|
-
},
|
|
885
|
-
if (
|
|
711
|
+
}, Ft = me.clientX - c.left, kt = me.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, d.style["will-change"] = "all", s = function() {
|
|
712
|
+
if (Z("delayEnded", i, {
|
|
886
713
|
evt: e
|
|
887
|
-
}),
|
|
888
|
-
|
|
714
|
+
}), y.eventCanceled) {
|
|
715
|
+
i._onDrop();
|
|
889
716
|
return;
|
|
890
717
|
}
|
|
891
|
-
|
|
892
|
-
sortable:
|
|
718
|
+
i._disableDelayedDragEvents(), !Mt && i.nativeDraggable && (d.draggable = !0), i._triggerDragStart(e, t), q({
|
|
719
|
+
sortable: i,
|
|
893
720
|
name: "choose",
|
|
894
721
|
originalEvent: e
|
|
895
|
-
}),
|
|
896
|
-
}, a.ignore.split(",").forEach(function(
|
|
897
|
-
|
|
898
|
-
}),
|
|
722
|
+
}), F(d, a.chosenClass, !0);
|
|
723
|
+
}, a.ignore.split(",").forEach(function(h) {
|
|
724
|
+
Wt(d, h.trim(), ht);
|
|
725
|
+
}), x(l, "dragover", be), x(l, "mousemove", be), x(l, "touchmove", be), a.supportPointer ? (x(l, "pointerup", i._onDrop), !this.nativeDraggable && x(l, "pointercancel", i._onDrop)) : (x(l, "mouseup", i._onDrop), x(l, "touchend", i._onDrop), x(l, "touchcancel", i._onDrop)), Mt && this.nativeDraggable && (this.options.touchStartThreshold = 4, d.draggable = !0), Z("delayStart", this, {
|
|
899
726
|
evt: e
|
|
900
|
-
}), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(
|
|
901
|
-
if (
|
|
727
|
+
}), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(He || de))) {
|
|
728
|
+
if (y.eventCanceled) {
|
|
902
729
|
this._onDrop();
|
|
903
730
|
return;
|
|
904
731
|
}
|
|
905
|
-
a.supportPointer ? (
|
|
732
|
+
a.supportPointer ? (x(l, "pointerup", i._disableDelayedDrag), x(l, "pointercancel", i._disableDelayedDrag)) : (x(l, "mouseup", i._disableDelayedDrag), x(l, "touchend", i._disableDelayedDrag), x(l, "touchcancel", i._disableDelayedDrag)), x(l, "mousemove", i._delayedDragTouchMoveHandler), x(l, "touchmove", i._delayedDragTouchMoveHandler), a.supportPointer && x(l, "pointermove", i._delayedDragTouchMoveHandler), i._dragStartTimer = setTimeout(s, a.delay);
|
|
906
733
|
} else
|
|
907
|
-
|
|
734
|
+
s();
|
|
908
735
|
}
|
|
909
736
|
},
|
|
910
737
|
_delayedDragTouchMoveHandler: function(e) {
|
|
@@ -912,28 +739,28 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
912
739
|
Math.max(Math.abs(t.clientX - this._lastX), Math.abs(t.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
913
740
|
},
|
|
914
741
|
_disableDelayedDrag: function() {
|
|
915
|
-
d &&
|
|
742
|
+
d && ht(d), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
916
743
|
},
|
|
917
744
|
_disableDelayedDragEvents: function() {
|
|
918
745
|
var e = this.el.ownerDocument;
|
|
919
|
-
|
|
746
|
+
C(e, "mouseup", this._disableDelayedDrag), C(e, "touchend", this._disableDelayedDrag), C(e, "touchcancel", this._disableDelayedDrag), C(e, "pointerup", this._disableDelayedDrag), C(e, "pointercancel", this._disableDelayedDrag), C(e, "mousemove", this._delayedDragTouchMoveHandler), C(e, "touchmove", this._delayedDragTouchMoveHandler), C(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
920
747
|
},
|
|
921
748
|
_triggerDragStart: function(e, t) {
|
|
922
|
-
t = t || e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ?
|
|
749
|
+
t = t || e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? x(document, "pointermove", this._onTouchMove) : t ? x(document, "touchmove", this._onTouchMove) : x(document, "mousemove", this._onTouchMove) : (x(d, "dragend", this), x(R, "dragstart", this._onDragStart));
|
|
923
750
|
try {
|
|
924
|
-
document.selection ?
|
|
751
|
+
document.selection ? Qe(function() {
|
|
925
752
|
document.selection.empty();
|
|
926
753
|
}) : window.getSelection().removeAllRanges();
|
|
927
754
|
} catch {
|
|
928
755
|
}
|
|
929
756
|
},
|
|
930
757
|
_dragStarted: function(e, t) {
|
|
931
|
-
if (
|
|
932
|
-
|
|
758
|
+
if (De = !1, R && d) {
|
|
759
|
+
Z("dragStarted", this, {
|
|
933
760
|
evt: t
|
|
934
|
-
}), this.nativeDraggable &&
|
|
935
|
-
var
|
|
936
|
-
!e &&
|
|
761
|
+
}), this.nativeDraggable && x(document, "dragover", $n);
|
|
762
|
+
var n = this.options;
|
|
763
|
+
!e && F(d, n.dragClass, !1), F(d, n.ghostClass, !0), y.active = this, e && this._appendGhost(), q({
|
|
937
764
|
sortable: this,
|
|
938
765
|
name: "start",
|
|
939
766
|
originalEvent: t
|
|
@@ -942,230 +769,230 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
942
769
|
this._nulling();
|
|
943
770
|
},
|
|
944
771
|
_emulateDragOver: function() {
|
|
945
|
-
if (
|
|
946
|
-
this._lastX =
|
|
947
|
-
for (var e = document.elementFromPoint(
|
|
772
|
+
if (ae) {
|
|
773
|
+
this._lastX = ae.clientX, this._lastY = ae.clientY, en();
|
|
774
|
+
for (var e = document.elementFromPoint(ae.clientX, ae.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(ae.clientX, ae.clientY), e !== t); )
|
|
948
775
|
t = e;
|
|
949
|
-
if (d.parentNode[
|
|
776
|
+
if (d.parentNode[z]._isOutsideThisEl(e), t)
|
|
950
777
|
do {
|
|
951
|
-
if (t[
|
|
952
|
-
var
|
|
953
|
-
if (
|
|
954
|
-
clientX:
|
|
955
|
-
clientY:
|
|
778
|
+
if (t[z]) {
|
|
779
|
+
var n = void 0;
|
|
780
|
+
if (n = t[z]._onDragOver({
|
|
781
|
+
clientX: ae.clientX,
|
|
782
|
+
clientY: ae.clientY,
|
|
956
783
|
target: e,
|
|
957
784
|
rootEl: t
|
|
958
|
-
}),
|
|
785
|
+
}), n && !this.options.dragoverBubble)
|
|
959
786
|
break;
|
|
960
787
|
}
|
|
961
788
|
e = t;
|
|
962
|
-
} while (t =
|
|
963
|
-
|
|
789
|
+
} while (t = zt(t));
|
|
790
|
+
tn();
|
|
964
791
|
}
|
|
965
792
|
},
|
|
966
793
|
_onTouchMove: function(e) {
|
|
967
|
-
if (
|
|
968
|
-
var t = this.options,
|
|
969
|
-
if (!
|
|
970
|
-
if (
|
|
794
|
+
if (me) {
|
|
795
|
+
var t = this.options, n = t.fallbackTolerance, i = t.fallbackOffset, r = e.touches ? e.touches[0] : e, a = S && we(S, !0), l = S && a && a.a, s = S && a && a.d, c = We && W && Rt(W), h = (r.clientX - me.clientX + i.x) / (l || 1) + (c ? c[0] - ft[0] : 0) / (l || 1), f = (r.clientY - me.clientY + i.y) / (s || 1) + (c ? c[1] - ft[1] : 0) / (s || 1);
|
|
796
|
+
if (!y.active && !De) {
|
|
797
|
+
if (n && Math.max(Math.abs(r.clientX - this._lastX), Math.abs(r.clientY - this._lastY)) < n)
|
|
971
798
|
return;
|
|
972
799
|
this._onDragStart(e, !0);
|
|
973
800
|
}
|
|
974
|
-
if (
|
|
975
|
-
a ? (a.e +=
|
|
801
|
+
if (S) {
|
|
802
|
+
a ? (a.e += h - (ut || 0), a.f += f - (dt || 0)) : a = {
|
|
976
803
|
a: 1,
|
|
977
804
|
b: 0,
|
|
978
805
|
c: 0,
|
|
979
806
|
d: 1,
|
|
980
|
-
e:
|
|
807
|
+
e: h,
|
|
981
808
|
f
|
|
982
809
|
};
|
|
983
810
|
var v = "matrix(".concat(a.a, ",").concat(a.b, ",").concat(a.c, ",").concat(a.d, ",").concat(a.e, ",").concat(a.f, ")");
|
|
984
|
-
b(
|
|
811
|
+
b(S, "webkitTransform", v), b(S, "mozTransform", v), b(S, "msTransform", v), b(S, "transform", v), ut = h, dt = f, ae = r;
|
|
985
812
|
}
|
|
986
813
|
e.cancelable && e.preventDefault();
|
|
987
814
|
}
|
|
988
815
|
},
|
|
989
816
|
_appendGhost: function() {
|
|
990
|
-
if (!
|
|
991
|
-
var e = this.options.fallbackOnBody ? document.body :
|
|
992
|
-
if (
|
|
993
|
-
for (
|
|
994
|
-
|
|
995
|
-
|
|
817
|
+
if (!S) {
|
|
818
|
+
var e = this.options.fallbackOnBody ? document.body : R, t = $(d, !0, We, !0, e), n = this.options;
|
|
819
|
+
if (We) {
|
|
820
|
+
for (W = e; b(W, "position") === "static" && b(W, "transform") === "none" && W !== document; )
|
|
821
|
+
W = W.parentNode;
|
|
822
|
+
W !== document.body && W !== document.documentElement ? (W === document && (W = se()), t.top += W.scrollTop, t.left += W.scrollLeft) : W = se(), ft = Rt(W);
|
|
996
823
|
}
|
|
997
|
-
|
|
824
|
+
S = d.cloneNode(!0), F(S, n.ghostClass, !1), F(S, n.fallbackClass, !0), F(S, n.dragClass, !0), b(S, "transition", ""), b(S, "transform", ""), b(S, "box-sizing", "border-box"), b(S, "margin", 0), b(S, "top", t.top), b(S, "left", t.left), b(S, "width", t.width), b(S, "height", t.height), b(S, "opacity", "0.8"), b(S, "position", We ? "absolute" : "fixed"), b(S, "zIndex", "100000"), b(S, "pointerEvents", "none"), y.ghost = S, e.appendChild(S), b(S, "transform-origin", Ft / parseInt(S.style.width) * 100 + "% " + kt / parseInt(S.style.height) * 100 + "%");
|
|
998
825
|
}
|
|
999
826
|
},
|
|
1000
827
|
_onDragStart: function(e, t) {
|
|
1001
|
-
var
|
|
1002
|
-
if (
|
|
828
|
+
var n = this, i = e.dataTransfer, r = n.options;
|
|
829
|
+
if (Z("dragStart", this, {
|
|
1003
830
|
evt: e
|
|
1004
|
-
}),
|
|
831
|
+
}), y.eventCanceled) {
|
|
1005
832
|
this._onDrop();
|
|
1006
833
|
return;
|
|
1007
834
|
}
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
sortable:
|
|
835
|
+
Z("setupClone", this), y.eventCanceled || (L = Ot(d), L.removeAttribute("id"), L.draggable = !1, L.style["will-change"] = "", this._hideClone(), F(L, this.options.chosenClass, !1), y.clone = L), n.cloneId = Qe(function() {
|
|
836
|
+
Z("clone", n), !y.eventCanceled && (n.options.removeCloneOnHide || R.insertBefore(L, d), n._hideClone(), q({
|
|
837
|
+
sortable: n,
|
|
1011
838
|
name: "clone"
|
|
1012
839
|
}));
|
|
1013
|
-
}), !t &&
|
|
840
|
+
}), !t && F(d, r.dragClass, !0), t ? (nt = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (C(document, "mouseup", n._onDrop), C(document, "touchend", n._onDrop), C(document, "touchcancel", n._onDrop), i && (i.effectAllowed = "move", r.setData && r.setData.call(n, i, d)), x(document, "drop", n), b(d, "transform", "translateZ(0)")), De = !0, n._dragStartId = Qe(n._dragStarted.bind(n, t, e)), x(document, "selectstart", n), Me = !0, window.getSelection().removeAllRanges(), Re && b(document.body, "user-select", "none");
|
|
1014
841
|
},
|
|
1015
842
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
1016
843
|
_onDragOver: function(e) {
|
|
1017
|
-
var t = this.el,
|
|
1018
|
-
if (
|
|
1019
|
-
function
|
|
1020
|
-
|
|
844
|
+
var t = this.el, n = e.target, i, r, a, l = this.options, s = l.group, c = y.active, h = Ue === s, f = l.sort, v = U || c, T, D = this, A = !1;
|
|
845
|
+
if (yt) return;
|
|
846
|
+
function G(re, Ye) {
|
|
847
|
+
Z(re, D, ce({
|
|
1021
848
|
evt: e,
|
|
1022
|
-
isOwner:
|
|
1023
|
-
axis:
|
|
849
|
+
isOwner: h,
|
|
850
|
+
axis: T ? "vertical" : "horizontal",
|
|
1024
851
|
revert: a,
|
|
1025
|
-
dragRect:
|
|
1026
|
-
targetRect:
|
|
852
|
+
dragRect: i,
|
|
853
|
+
targetRect: r,
|
|
1027
854
|
canSort: f,
|
|
1028
855
|
fromSortable: v,
|
|
1029
|
-
target:
|
|
1030
|
-
completed:
|
|
1031
|
-
onMove: function(
|
|
1032
|
-
return
|
|
856
|
+
target: n,
|
|
857
|
+
completed: I,
|
|
858
|
+
onMove: function(xe, Be) {
|
|
859
|
+
return Ke(R, t, d, i, xe, $(xe), e, Be);
|
|
1033
860
|
},
|
|
1034
861
|
changed: O
|
|
1035
|
-
},
|
|
862
|
+
}, Ye));
|
|
1036
863
|
}
|
|
1037
|
-
function
|
|
1038
|
-
|
|
864
|
+
function V() {
|
|
865
|
+
G("dragOverAnimationCapture"), D.captureAnimationState(), D !== v && v.captureAnimationState();
|
|
1039
866
|
}
|
|
1040
|
-
function
|
|
1041
|
-
return
|
|
1042
|
-
insertion:
|
|
1043
|
-
}),
|
|
1044
|
-
|
|
1045
|
-
}),
|
|
867
|
+
function I(re) {
|
|
868
|
+
return G("dragOverCompleted", {
|
|
869
|
+
insertion: re
|
|
870
|
+
}), re && (h ? c._hideClone() : c._showClone(D), D !== v && (F(d, U ? U.options.ghostClass : c.options.ghostClass, !1), F(d, l.ghostClass, !0)), U !== D && D !== y.active ? U = D : D === y.active && U && (U = null), v === D && (D._ignoreWhileAnimating = n), D.animateAll(function() {
|
|
871
|
+
G("dragOverAnimationComplete"), D._ignoreWhileAnimating = null;
|
|
872
|
+
}), D !== v && (v.animateAll(), v._ignoreWhileAnimating = null)), (n === d && !d.animated || n === t && !n.animated) && (Ee = null), !l.dragoverBubble && !e.rootEl && n !== document && (d.parentNode[z]._isOutsideThisEl(e.target), !re && be(e)), !l.dragoverBubble && e.stopPropagation && e.stopPropagation(), A = !0;
|
|
1046
873
|
}
|
|
1047
874
|
function O() {
|
|
1048
|
-
|
|
1049
|
-
sortable:
|
|
875
|
+
te = H(d), fe = H(d, l.draggable), q({
|
|
876
|
+
sortable: D,
|
|
1050
877
|
name: "change",
|
|
1051
878
|
toEl: t,
|
|
1052
|
-
newIndex:
|
|
1053
|
-
newDraggableIndex:
|
|
879
|
+
newIndex: te,
|
|
880
|
+
newDraggableIndex: fe,
|
|
1054
881
|
originalEvent: e
|
|
1055
882
|
});
|
|
1056
883
|
}
|
|
1057
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(),
|
|
1058
|
-
if (d.contains(e.target) ||
|
|
1059
|
-
return
|
|
1060
|
-
if (
|
|
1061
|
-
if (
|
|
884
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = Q(n, l.draggable, t, !0), G("dragOver"), y.eventCanceled) return A;
|
|
885
|
+
if (d.contains(e.target) || n.animated && n.animatingX && n.animatingY || D._ignoreWhileAnimating === n)
|
|
886
|
+
return I(!1);
|
|
887
|
+
if (nt = !1, c && !l.disabled && (h ? f || (a = j !== R) : U === this || (this.lastPutMode = Ue.checkPull(this, c, d, e)) && s.checkPut(this, c, d, e))) {
|
|
888
|
+
if (T = this._getDirection(e, n) === "vertical", i = $(d), G("dragOverValid"), y.eventCanceled) return A;
|
|
1062
889
|
if (a)
|
|
1063
|
-
return
|
|
1064
|
-
var X =
|
|
1065
|
-
if (!X ||
|
|
890
|
+
return j = R, V(), this._hideClone(), G("revert"), y.eventCanceled || (ve ? R.insertBefore(d, ve) : R.appendChild(d)), I(!0);
|
|
891
|
+
var X = Ct(t, l.draggable);
|
|
892
|
+
if (!X || kn(e, T, this) && !X.animated) {
|
|
1066
893
|
if (X === d)
|
|
1067
|
-
return
|
|
1068
|
-
if (X && t === e.target && (
|
|
1069
|
-
return
|
|
1070
|
-
} else if (X &&
|
|
1071
|
-
var ie =
|
|
894
|
+
return I(!1);
|
|
895
|
+
if (X && t === e.target && (n = X), n && (r = $(n)), Ke(R, t, d, i, n, r, e, !!n) !== !1)
|
|
896
|
+
return V(), X && X.nextSibling ? t.insertBefore(d, X.nextSibling) : t.appendChild(d), j = t, O(), I(!0);
|
|
897
|
+
} else if (X && Fn(e, T, this)) {
|
|
898
|
+
var ie = Ce(t, 0, l, !0);
|
|
1072
899
|
if (ie === d)
|
|
1073
|
-
return
|
|
1074
|
-
if (
|
|
1075
|
-
return
|
|
1076
|
-
} else if (
|
|
1077
|
-
|
|
1078
|
-
var
|
|
1079
|
-
|
|
1080
|
-
var
|
|
1081
|
-
if (
|
|
1082
|
-
var
|
|
900
|
+
return I(!1);
|
|
901
|
+
if (n = ie, r = $(n), Ke(R, t, d, i, n, r, e, !1) !== !1)
|
|
902
|
+
return V(), t.insertBefore(d, ie), j = t, O(), I(!0);
|
|
903
|
+
} else if (n.parentNode === t) {
|
|
904
|
+
r = $(n);
|
|
905
|
+
var p = 0, u, m = d.parentNode !== t, g = !Mn(d.animated && d.toRect || i, n.animated && n.toRect || r, T), _ = T ? "top" : "left", w = $t(n, "top", "top") || $t(d, "top", "top"), P = w ? w.scrollTop : void 0;
|
|
906
|
+
Ee !== n && (u = r[_], je = !1, ze = !g && l.invertSwap || m), p = jn(e, n, r, T, g ? 1 : l.swapThreshold, l.invertedSwapThreshold == null ? l.swapThreshold : l.invertedSwapThreshold, ze, Ee === n);
|
|
907
|
+
var M;
|
|
908
|
+
if (p !== 0) {
|
|
909
|
+
var k = H(d);
|
|
1083
910
|
do
|
|
1084
|
-
|
|
1085
|
-
while (
|
|
911
|
+
k -= p, M = j.children[k];
|
|
912
|
+
while (M && (b(M, "display") === "none" || M === S));
|
|
1086
913
|
}
|
|
1087
|
-
if (
|
|
1088
|
-
return
|
|
1089
|
-
|
|
1090
|
-
var
|
|
1091
|
-
|
|
1092
|
-
var
|
|
1093
|
-
if (
|
|
1094
|
-
return (
|
|
914
|
+
if (p === 0 || M === n)
|
|
915
|
+
return I(!1);
|
|
916
|
+
Ee = n, ke = p;
|
|
917
|
+
var B = n.nextElementSibling, K = !1;
|
|
918
|
+
K = p === 1;
|
|
919
|
+
var ge = Ke(R, t, d, i, n, r, e, K);
|
|
920
|
+
if (ge !== !1)
|
|
921
|
+
return (ge === 1 || ge === -1) && (K = ge === 1), yt = !0, setTimeout(Ln, 30), V(), K && !B ? t.appendChild(d) : n.parentNode.insertBefore(d, K ? B : n), w && qt(w, 0, P - w.scrollTop), j = d.parentNode, u !== void 0 && !ze && (Je = Math.abs(u - $(n)[_])), O(), I(!0);
|
|
1095
922
|
}
|
|
1096
923
|
if (t.contains(d))
|
|
1097
|
-
return
|
|
924
|
+
return I(!1);
|
|
1098
925
|
}
|
|
1099
926
|
return !1;
|
|
1100
927
|
},
|
|
1101
928
|
_ignoreWhileAnimating: null,
|
|
1102
929
|
_offMoveEvents: function() {
|
|
1103
|
-
|
|
930
|
+
C(document, "mousemove", this._onTouchMove), C(document, "touchmove", this._onTouchMove), C(document, "pointermove", this._onTouchMove), C(document, "dragover", be), C(document, "mousemove", be), C(document, "touchmove", be);
|
|
1104
931
|
},
|
|
1105
932
|
_offUpEvents: function() {
|
|
1106
933
|
var e = this.el.ownerDocument;
|
|
1107
|
-
|
|
934
|
+
C(e, "mouseup", this._onDrop), C(e, "touchend", this._onDrop), C(e, "pointerup", this._onDrop), C(e, "pointercancel", this._onDrop), C(e, "touchcancel", this._onDrop), C(document, "selectstart", this);
|
|
1108
935
|
},
|
|
1109
936
|
_onDrop: function(e) {
|
|
1110
|
-
var t = this.el,
|
|
1111
|
-
if (
|
|
937
|
+
var t = this.el, n = this.options;
|
|
938
|
+
if (te = H(d), fe = H(d, n.draggable), Z("drop", this, {
|
|
1112
939
|
evt: e
|
|
1113
|
-
}),
|
|
940
|
+
}), j = d && d.parentNode, te = H(d), fe = H(d, n.draggable), y.eventCanceled) {
|
|
1114
941
|
this._nulling();
|
|
1115
942
|
return;
|
|
1116
943
|
}
|
|
1117
|
-
|
|
944
|
+
De = !1, ze = !1, je = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Et(this.cloneId), Et(this._dragStartId), this.nativeDraggable && (C(document, "drop", this), C(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Re && b(document.body, "user-select", ""), b(d, "transform", ""), e && (Me && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), S && S.parentNode && S.parentNode.removeChild(S), (R === j || U && U.lastPutMode !== "clone") && L && L.parentNode && L.parentNode.removeChild(L), d && (this.nativeDraggable && C(d, "dragend", this), ht(d), d.style["will-change"] = "", Me && !De && F(d, U ? U.options.ghostClass : this.options.ghostClass, !1), F(d, this.options.chosenClass, !1), q({
|
|
1118
945
|
sortable: this,
|
|
1119
946
|
name: "unchoose",
|
|
1120
|
-
toEl:
|
|
947
|
+
toEl: j,
|
|
1121
948
|
newIndex: null,
|
|
1122
949
|
newDraggableIndex: null,
|
|
1123
950
|
originalEvent: e
|
|
1124
|
-
}),
|
|
1125
|
-
rootEl:
|
|
951
|
+
}), R !== j ? (te >= 0 && (q({
|
|
952
|
+
rootEl: j,
|
|
1126
953
|
name: "add",
|
|
1127
|
-
toEl:
|
|
1128
|
-
fromEl:
|
|
954
|
+
toEl: j,
|
|
955
|
+
fromEl: R,
|
|
1129
956
|
originalEvent: e
|
|
1130
|
-
}),
|
|
957
|
+
}), q({
|
|
1131
958
|
sortable: this,
|
|
1132
959
|
name: "remove",
|
|
1133
|
-
toEl:
|
|
960
|
+
toEl: j,
|
|
1134
961
|
originalEvent: e
|
|
1135
|
-
}),
|
|
1136
|
-
rootEl:
|
|
962
|
+
}), q({
|
|
963
|
+
rootEl: j,
|
|
1137
964
|
name: "sort",
|
|
1138
|
-
toEl:
|
|
1139
|
-
fromEl:
|
|
965
|
+
toEl: j,
|
|
966
|
+
fromEl: R,
|
|
1140
967
|
originalEvent: e
|
|
1141
|
-
}),
|
|
968
|
+
}), q({
|
|
1142
969
|
sortable: this,
|
|
1143
970
|
name: "sort",
|
|
1144
|
-
toEl:
|
|
971
|
+
toEl: j,
|
|
1145
972
|
originalEvent: e
|
|
1146
|
-
})),
|
|
973
|
+
})), U && U.save()) : te !== _e && te >= 0 && (q({
|
|
1147
974
|
sortable: this,
|
|
1148
975
|
name: "update",
|
|
1149
|
-
toEl:
|
|
976
|
+
toEl: j,
|
|
1150
977
|
originalEvent: e
|
|
1151
|
-
}),
|
|
978
|
+
}), q({
|
|
1152
979
|
sortable: this,
|
|
1153
980
|
name: "sort",
|
|
1154
|
-
toEl:
|
|
981
|
+
toEl: j,
|
|
1155
982
|
originalEvent: e
|
|
1156
|
-
})),
|
|
983
|
+
})), y.active && ((te == null || te === -1) && (te = _e, fe = Fe), q({
|
|
1157
984
|
sortable: this,
|
|
1158
985
|
name: "end",
|
|
1159
|
-
toEl:
|
|
986
|
+
toEl: j,
|
|
1160
987
|
originalEvent: e
|
|
1161
988
|
}), this.save()))), this._nulling();
|
|
1162
989
|
},
|
|
1163
990
|
_nulling: function() {
|
|
1164
|
-
|
|
991
|
+
Z("nulling", this), R = d = j = S = ve = L = Ze = he = me = ae = Me = te = fe = _e = Fe = Ee = ke = U = Ue = y.dragged = y.ghost = y.clone = y.active = null;
|
|
1165
992
|
var e = this.el;
|
|
1166
|
-
|
|
993
|
+
it.forEach(function(t) {
|
|
1167
994
|
e.contains(t) && (t.checked = !0);
|
|
1168
|
-
}),
|
|
995
|
+
}), it.length = ut = dt = 0;
|
|
1169
996
|
},
|
|
1170
997
|
handleEvent: function(e) {
|
|
1171
998
|
switch (e.type) {
|
|
@@ -1175,7 +1002,7 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
1175
1002
|
break;
|
|
1176
1003
|
case "dragenter":
|
|
1177
1004
|
case "dragover":
|
|
1178
|
-
d && (this._onDragOver(e),
|
|
1005
|
+
d && (this._onDragOver(e), Rn(e));
|
|
1179
1006
|
break;
|
|
1180
1007
|
case "selectstart":
|
|
1181
1008
|
e.preventDefault();
|
|
@@ -1187,8 +1014,8 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
1187
1014
|
* @returns {String[]}
|
|
1188
1015
|
*/
|
|
1189
1016
|
toArray: function() {
|
|
1190
|
-
for (var e = [], t,
|
|
1191
|
-
t =
|
|
1017
|
+
for (var e = [], t, n = this.el.children, i = 0, r = n.length, a = this.options; i < r; i++)
|
|
1018
|
+
t = n[i], Q(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || Xn(t));
|
|
1192
1019
|
return e;
|
|
1193
1020
|
},
|
|
1194
1021
|
/**
|
|
@@ -1196,12 +1023,12 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
1196
1023
|
* @param {String[]} order order of the items
|
|
1197
1024
|
*/
|
|
1198
1025
|
sort: function(e, t) {
|
|
1199
|
-
var
|
|
1200
|
-
this.toArray().forEach(function(
|
|
1201
|
-
var
|
|
1202
|
-
|
|
1203
|
-
}, this), t && this.captureAnimationState(), e.forEach(function(
|
|
1204
|
-
|
|
1026
|
+
var n = {}, i = this.el;
|
|
1027
|
+
this.toArray().forEach(function(r, a) {
|
|
1028
|
+
var l = i.children[a];
|
|
1029
|
+
Q(l, this.options.draggable, i, !1) && (n[r] = l);
|
|
1030
|
+
}, this), t && this.captureAnimationState(), e.forEach(function(r) {
|
|
1031
|
+
n[r] && (i.removeChild(n[r]), i.appendChild(n[r]));
|
|
1205
1032
|
}), t && this.animateAll();
|
|
1206
1033
|
},
|
|
1207
1034
|
/**
|
|
@@ -1218,7 +1045,7 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
1218
1045
|
* @returns {HTMLElement|null}
|
|
1219
1046
|
*/
|
|
1220
1047
|
closest: function(e, t) {
|
|
1221
|
-
return
|
|
1048
|
+
return Q(e, t || this.options.draggable, this.el, !1);
|
|
1222
1049
|
},
|
|
1223
1050
|
/**
|
|
1224
1051
|
* Set/get option
|
|
@@ -1227,25 +1054,25 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
1227
1054
|
* @returns {*}
|
|
1228
1055
|
*/
|
|
1229
1056
|
option: function(e, t) {
|
|
1230
|
-
var
|
|
1057
|
+
var n = this.options;
|
|
1231
1058
|
if (t === void 0)
|
|
1232
|
-
return
|
|
1233
|
-
var
|
|
1234
|
-
typeof
|
|
1059
|
+
return n[e];
|
|
1060
|
+
var i = Xe.modifyOption(this, e, t);
|
|
1061
|
+
typeof i < "u" ? n[e] = i : n[e] = t, e === "group" && Qt(n);
|
|
1235
1062
|
},
|
|
1236
1063
|
/**
|
|
1237
1064
|
* Destroy
|
|
1238
1065
|
*/
|
|
1239
1066
|
destroy: function() {
|
|
1240
|
-
|
|
1067
|
+
Z("destroy", this);
|
|
1241
1068
|
var e = this.el;
|
|
1242
|
-
e[
|
|
1069
|
+
e[z] = null, C(e, "mousedown", this._onTapStart), C(e, "touchstart", this._onTapStart), C(e, "pointerdown", this._onTapStart), this.nativeDraggable && (C(e, "dragover", this), C(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(t) {
|
|
1243
1070
|
t.removeAttribute("draggable");
|
|
1244
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
1071
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), ot.splice(ot.indexOf(this.el), 1), this.el = e = null;
|
|
1245
1072
|
},
|
|
1246
1073
|
_hideClone: function() {
|
|
1247
1074
|
if (!he) {
|
|
1248
|
-
if (
|
|
1075
|
+
if (Z("hideClone", this), y.eventCanceled) return;
|
|
1249
1076
|
b(L, "display", "none"), this.options.removeCloneOnHide && L.parentNode && L.parentNode.removeChild(L), he = !0;
|
|
1250
1077
|
}
|
|
1251
1078
|
},
|
|
@@ -1255,111 +1082,111 @@ w.prototype = /** @lends Sortable.prototype */
|
|
|
1255
1082
|
return;
|
|
1256
1083
|
}
|
|
1257
1084
|
if (he) {
|
|
1258
|
-
if (
|
|
1259
|
-
d.parentNode ==
|
|
1085
|
+
if (Z("showClone", this), y.eventCanceled) return;
|
|
1086
|
+
d.parentNode == R && !this.options.group.revertClone ? R.insertBefore(L, d) : ve ? R.insertBefore(L, ve) : R.appendChild(L), this.options.group.revertClone && this.animate(d, L), b(L, "display", ""), he = !1;
|
|
1260
1087
|
}
|
|
1261
1088
|
}
|
|
1262
1089
|
};
|
|
1263
|
-
function
|
|
1264
|
-
|
|
1090
|
+
function Rn(o) {
|
|
1091
|
+
o.dataTransfer && (o.dataTransfer.dropEffect = "move"), o.cancelable && o.preventDefault();
|
|
1265
1092
|
}
|
|
1266
|
-
function
|
|
1267
|
-
var
|
|
1268
|
-
return window.CustomEvent && !
|
|
1093
|
+
function Ke(o, e, t, n, i, r, a, l) {
|
|
1094
|
+
var s, c = o[z], h = c.options.onMove, f;
|
|
1095
|
+
return window.CustomEvent && !de && !He ? s = new CustomEvent("move", {
|
|
1269
1096
|
bubbles: !0,
|
|
1270
1097
|
cancelable: !0
|
|
1271
|
-
}) : (
|
|
1098
|
+
}) : (s = document.createEvent("Event"), s.initEvent("move", !0, !0)), s.to = e, s.from = o, s.dragged = t, s.draggedRect = n, s.related = i || e, s.relatedRect = r || $(e), s.willInsertAfter = l, s.originalEvent = a, o.dispatchEvent(s), h && (f = h.call(c, s, a)), f;
|
|
1272
1099
|
}
|
|
1273
|
-
function
|
|
1274
|
-
|
|
1100
|
+
function ht(o) {
|
|
1101
|
+
o.draggable = !1;
|
|
1275
1102
|
}
|
|
1276
|
-
function
|
|
1277
|
-
|
|
1103
|
+
function Ln() {
|
|
1104
|
+
yt = !1;
|
|
1278
1105
|
}
|
|
1279
|
-
function
|
|
1280
|
-
var
|
|
1281
|
-
return e ?
|
|
1106
|
+
function Fn(o, e, t) {
|
|
1107
|
+
var n = $(Ce(t.el, 0, t.options, !0)), i = Vt(t.el, t.options, S), r = 10;
|
|
1108
|
+
return e ? o.clientX < i.left - r || o.clientY < n.top && o.clientX < n.right : o.clientY < i.top - r || o.clientY < n.bottom && o.clientX < n.left;
|
|
1282
1109
|
}
|
|
1283
|
-
function
|
|
1284
|
-
var
|
|
1285
|
-
return e ?
|
|
1110
|
+
function kn(o, e, t) {
|
|
1111
|
+
var n = $(Ct(t.el, t.options.draggable)), i = Vt(t.el, t.options, S), r = 10;
|
|
1112
|
+
return e ? o.clientX > i.right + r || o.clientY > n.bottom && o.clientX > n.left : o.clientY > i.bottom + r || o.clientX > n.right && o.clientY > n.top;
|
|
1286
1113
|
}
|
|
1287
|
-
function
|
|
1288
|
-
var
|
|
1114
|
+
function jn(o, e, t, n, i, r, a, l) {
|
|
1115
|
+
var s = n ? o.clientY : o.clientX, c = n ? t.height : t.width, h = n ? t.top : t.left, f = n ? t.bottom : t.right, v = !1;
|
|
1289
1116
|
if (!a) {
|
|
1290
|
-
if (
|
|
1291
|
-
if (!
|
|
1117
|
+
if (l && Je < c * i) {
|
|
1118
|
+
if (!je && (ke === 1 ? s > h + c * r / 2 : s < f - c * r / 2) && (je = !0), je)
|
|
1292
1119
|
v = !0;
|
|
1293
|
-
else if (
|
|
1294
|
-
return -
|
|
1295
|
-
} else if (
|
|
1296
|
-
return
|
|
1120
|
+
else if (ke === 1 ? s < h + Je : s > f - Je)
|
|
1121
|
+
return -ke;
|
|
1122
|
+
} else if (s > h + c * (1 - i) / 2 && s < f - c * (1 - i) / 2)
|
|
1123
|
+
return Hn(e);
|
|
1297
1124
|
}
|
|
1298
|
-
return v = v || a, v && (
|
|
1125
|
+
return v = v || a, v && (s < h + c * r / 2 || s > f - c * r / 2) ? s > h + c / 2 ? 1 : -1 : 0;
|
|
1299
1126
|
}
|
|
1300
|
-
function
|
|
1301
|
-
return
|
|
1127
|
+
function Hn(o) {
|
|
1128
|
+
return H(d) < H(o) ? 1 : -1;
|
|
1302
1129
|
}
|
|
1303
|
-
function
|
|
1304
|
-
for (var e =
|
|
1305
|
-
|
|
1306
|
-
return
|
|
1130
|
+
function Xn(o) {
|
|
1131
|
+
for (var e = o.tagName + o.className + o.src + o.href + o.textContent, t = e.length, n = 0; t--; )
|
|
1132
|
+
n += e.charCodeAt(t);
|
|
1133
|
+
return n.toString(36);
|
|
1307
1134
|
}
|
|
1308
|
-
function
|
|
1309
|
-
|
|
1310
|
-
for (var e =
|
|
1311
|
-
var
|
|
1312
|
-
|
|
1135
|
+
function Yn(o) {
|
|
1136
|
+
it.length = 0;
|
|
1137
|
+
for (var e = o.getElementsByTagName("input"), t = e.length; t--; ) {
|
|
1138
|
+
var n = e[t];
|
|
1139
|
+
n.checked && it.push(n);
|
|
1313
1140
|
}
|
|
1314
1141
|
}
|
|
1315
|
-
function
|
|
1316
|
-
return setTimeout(
|
|
1142
|
+
function Qe(o) {
|
|
1143
|
+
return setTimeout(o, 0);
|
|
1317
1144
|
}
|
|
1318
|
-
function
|
|
1319
|
-
return clearTimeout(
|
|
1145
|
+
function Et(o) {
|
|
1146
|
+
return clearTimeout(o);
|
|
1320
1147
|
}
|
|
1321
|
-
|
|
1322
|
-
(
|
|
1148
|
+
at && x(document, "touchmove", function(o) {
|
|
1149
|
+
(y.active || De) && o.cancelable && o.preventDefault();
|
|
1323
1150
|
});
|
|
1324
|
-
|
|
1325
|
-
on:
|
|
1326
|
-
off:
|
|
1151
|
+
y.utils = {
|
|
1152
|
+
on: x,
|
|
1153
|
+
off: C,
|
|
1327
1154
|
css: b,
|
|
1328
|
-
find:
|
|
1155
|
+
find: Wt,
|
|
1329
1156
|
is: function(e, t) {
|
|
1330
|
-
return !!
|
|
1157
|
+
return !!Q(e, t, e, !1);
|
|
1331
1158
|
},
|
|
1332
|
-
extend:
|
|
1333
|
-
throttle:
|
|
1334
|
-
closest:
|
|
1335
|
-
toggleClass:
|
|
1336
|
-
clone:
|
|
1337
|
-
index:
|
|
1338
|
-
nextTick:
|
|
1339
|
-
cancelNextTick:
|
|
1340
|
-
detectDirection:
|
|
1341
|
-
getChild:
|
|
1342
|
-
expando:
|
|
1159
|
+
extend: Cn,
|
|
1160
|
+
throttle: Kt,
|
|
1161
|
+
closest: Q,
|
|
1162
|
+
toggleClass: F,
|
|
1163
|
+
clone: Ot,
|
|
1164
|
+
index: H,
|
|
1165
|
+
nextTick: Qe,
|
|
1166
|
+
cancelNextTick: Et,
|
|
1167
|
+
detectDirection: Jt,
|
|
1168
|
+
getChild: Ce,
|
|
1169
|
+
expando: z
|
|
1343
1170
|
};
|
|
1344
|
-
|
|
1345
|
-
return
|
|
1171
|
+
y.get = function(o) {
|
|
1172
|
+
return o[z];
|
|
1346
1173
|
};
|
|
1347
|
-
|
|
1348
|
-
for (var
|
|
1174
|
+
y.mount = function() {
|
|
1175
|
+
for (var o = arguments.length, e = new Array(o), t = 0; t < o; t++)
|
|
1349
1176
|
e[t] = arguments[t];
|
|
1350
|
-
e[0].constructor === Array && (e = e[0]), e.forEach(function(
|
|
1351
|
-
if (!
|
|
1352
|
-
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(
|
|
1353
|
-
|
|
1177
|
+
e[0].constructor === Array && (e = e[0]), e.forEach(function(n) {
|
|
1178
|
+
if (!n.prototype || !n.prototype.constructor)
|
|
1179
|
+
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));
|
|
1180
|
+
n.utils && (y.utils = ce(ce({}, y.utils), n.utils)), Xe.mount(n);
|
|
1354
1181
|
});
|
|
1355
1182
|
};
|
|
1356
|
-
|
|
1357
|
-
return new
|
|
1183
|
+
y.create = function(o, e) {
|
|
1184
|
+
return new y(o, e);
|
|
1358
1185
|
};
|
|
1359
|
-
|
|
1360
|
-
var
|
|
1361
|
-
function
|
|
1362
|
-
function
|
|
1186
|
+
y.version = Dn;
|
|
1187
|
+
var Y = [], Ne, St, Dt = !1, pt, gt, rt, $e;
|
|
1188
|
+
function Bn() {
|
|
1189
|
+
function o() {
|
|
1363
1190
|
this.defaults = {
|
|
1364
1191
|
scroll: !0,
|
|
1365
1192
|
forceAutoScrollFallback: !1,
|
|
@@ -1370,380 +1197,380 @@ function co() {
|
|
|
1370
1197
|
for (var e in this)
|
|
1371
1198
|
e.charAt(0) === "_" && typeof this[e] == "function" && (this[e] = this[e].bind(this));
|
|
1372
1199
|
}
|
|
1373
|
-
return
|
|
1200
|
+
return o.prototype = {
|
|
1374
1201
|
dragStarted: function(t) {
|
|
1375
|
-
var
|
|
1376
|
-
this.sortable.nativeDraggable ?
|
|
1202
|
+
var n = t.originalEvent;
|
|
1203
|
+
this.sortable.nativeDraggable ? x(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? x(document, "pointermove", this._handleFallbackAutoScroll) : n.touches ? x(document, "touchmove", this._handleFallbackAutoScroll) : x(document, "mousemove", this._handleFallbackAutoScroll);
|
|
1377
1204
|
},
|
|
1378
1205
|
dragOverCompleted: function(t) {
|
|
1379
|
-
var
|
|
1380
|
-
!this.options.dragOverBubble && !
|
|
1206
|
+
var n = t.originalEvent;
|
|
1207
|
+
!this.options.dragOverBubble && !n.rootEl && this._handleAutoScroll(n);
|
|
1381
1208
|
},
|
|
1382
1209
|
drop: function() {
|
|
1383
|
-
this.sortable.nativeDraggable ?
|
|
1210
|
+
this.sortable.nativeDraggable ? C(document, "dragover", this._handleAutoScroll) : (C(document, "pointermove", this._handleFallbackAutoScroll), C(document, "touchmove", this._handleFallbackAutoScroll), C(document, "mousemove", this._handleFallbackAutoScroll)), Ht(), et(), On();
|
|
1384
1211
|
},
|
|
1385
1212
|
nulling: function() {
|
|
1386
|
-
|
|
1213
|
+
rt = St = Ne = Dt = $e = pt = gt = null, Y.length = 0;
|
|
1387
1214
|
},
|
|
1388
1215
|
_handleFallbackAutoScroll: function(t) {
|
|
1389
1216
|
this._handleAutoScroll(t, !0);
|
|
1390
1217
|
},
|
|
1391
|
-
_handleAutoScroll: function(t,
|
|
1392
|
-
var
|
|
1393
|
-
if (
|
|
1394
|
-
|
|
1395
|
-
var
|
|
1396
|
-
|
|
1397
|
-
var c =
|
|
1398
|
-
c !==
|
|
1399
|
-
}, 10),
|
|
1218
|
+
_handleAutoScroll: function(t, n) {
|
|
1219
|
+
var i = this, r = (t.touches ? t.touches[0] : t).clientX, a = (t.touches ? t.touches[0] : t).clientY, l = document.elementFromPoint(r, a);
|
|
1220
|
+
if (rt = t, n || this.options.forceAutoScrollFallback || He || de || Re) {
|
|
1221
|
+
mt(t, this.options, l, n);
|
|
1222
|
+
var s = pe(l, !0);
|
|
1223
|
+
Dt && (!$e || r !== pt || a !== gt) && ($e && Ht(), $e = setInterval(function() {
|
|
1224
|
+
var c = pe(document.elementFromPoint(r, a), !0);
|
|
1225
|
+
c !== s && (s = c, et()), mt(t, i.options, c, n);
|
|
1226
|
+
}, 10), pt = r, gt = a);
|
|
1400
1227
|
} else {
|
|
1401
|
-
if (!this.options.bubbleScroll ||
|
|
1402
|
-
|
|
1228
|
+
if (!this.options.bubbleScroll || pe(l, !0) === se()) {
|
|
1229
|
+
et();
|
|
1403
1230
|
return;
|
|
1404
1231
|
}
|
|
1405
|
-
|
|
1232
|
+
mt(t, this.options, pe(l, !1), !1);
|
|
1406
1233
|
}
|
|
1407
1234
|
}
|
|
1408
|
-
},
|
|
1235
|
+
}, oe(o, {
|
|
1409
1236
|
pluginName: "scroll",
|
|
1410
1237
|
initializeByDefault: !0
|
|
1411
1238
|
});
|
|
1412
1239
|
}
|
|
1413
|
-
function
|
|
1414
|
-
|
|
1415
|
-
clearInterval(
|
|
1416
|
-
}),
|
|
1240
|
+
function et() {
|
|
1241
|
+
Y.forEach(function(o) {
|
|
1242
|
+
clearInterval(o.pid);
|
|
1243
|
+
}), Y = [];
|
|
1417
1244
|
}
|
|
1418
|
-
function
|
|
1419
|
-
clearInterval(
|
|
1245
|
+
function Ht() {
|
|
1246
|
+
clearInterval($e);
|
|
1420
1247
|
}
|
|
1421
|
-
var
|
|
1248
|
+
var mt = Kt(function(o, e, t, n) {
|
|
1422
1249
|
if (e.scroll) {
|
|
1423
|
-
var
|
|
1424
|
-
|
|
1425
|
-
var f = 0, v =
|
|
1250
|
+
var i = (o.touches ? o.touches[0] : o).clientX, r = (o.touches ? o.touches[0] : o).clientY, a = e.scrollSensitivity, l = e.scrollSpeed, s = se(), c = !1, h;
|
|
1251
|
+
St !== t && (St = t, et(), Ne = e.scroll, h = e.scrollFn, Ne === !0 && (Ne = pe(t, !0)));
|
|
1252
|
+
var f = 0, v = Ne;
|
|
1426
1253
|
do {
|
|
1427
|
-
var
|
|
1428
|
-
|
|
1429
|
-
var P = ie && (Math.abs(
|
|
1430
|
-
if (!
|
|
1431
|
-
for (var
|
|
1432
|
-
|
|
1433
|
-
(
|
|
1434
|
-
|
|
1435
|
-
var
|
|
1436
|
-
typeof
|
|
1254
|
+
var T = v, D = $(T), A = D.top, G = D.bottom, V = D.left, I = D.right, O = D.width, X = D.height, ie = void 0, p = void 0, u = T.scrollWidth, m = T.scrollHeight, g = b(T), _ = T.scrollLeft, w = T.scrollTop;
|
|
1255
|
+
T === s ? (ie = O < u && (g.overflowX === "auto" || g.overflowX === "scroll" || g.overflowX === "visible"), p = X < m && (g.overflowY === "auto" || g.overflowY === "scroll" || g.overflowY === "visible")) : (ie = O < u && (g.overflowX === "auto" || g.overflowX === "scroll"), p = X < m && (g.overflowY === "auto" || g.overflowY === "scroll"));
|
|
1256
|
+
var P = ie && (Math.abs(I - i) <= a && _ + O < u) - (Math.abs(V - i) <= a && !!_), M = p && (Math.abs(G - r) <= a && w + X < m) - (Math.abs(A - r) <= a && !!w);
|
|
1257
|
+
if (!Y[f])
|
|
1258
|
+
for (var k = 0; k <= f; k++)
|
|
1259
|
+
Y[k] || (Y[k] = {});
|
|
1260
|
+
(Y[f].vx != P || Y[f].vy != M || Y[f].el !== T) && (Y[f].el = T, Y[f].vx = P, Y[f].vy = M, clearInterval(Y[f].pid), (P != 0 || M != 0) && (c = !0, Y[f].pid = setInterval((function() {
|
|
1261
|
+
n && this.layer === 0 && y.active._onTouchMove(rt);
|
|
1262
|
+
var B = Y[this.layer].vy ? Y[this.layer].vy * l : 0, K = Y[this.layer].vx ? Y[this.layer].vx * l : 0;
|
|
1263
|
+
typeof h == "function" && h.call(y.dragged.parentNode[z], K, B, o, rt, Y[this.layer].el) !== "continue" || qt(Y[this.layer].el, K, B);
|
|
1437
1264
|
}).bind({
|
|
1438
1265
|
layer: f
|
|
1439
1266
|
}), 24))), f++;
|
|
1440
|
-
} while (e.bubbleScroll && v !==
|
|
1441
|
-
|
|
1267
|
+
} while (e.bubbleScroll && v !== s && (v = pe(v, !1)));
|
|
1268
|
+
Dt = c;
|
|
1442
1269
|
}
|
|
1443
|
-
}, 30),
|
|
1444
|
-
var t = e.originalEvent,
|
|
1270
|
+
}, 30), nn = function(e) {
|
|
1271
|
+
var t = e.originalEvent, n = e.putSortable, i = e.dragEl, r = e.activeSortable, a = e.dispatchSortableEvent, l = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
1445
1272
|
if (t) {
|
|
1446
|
-
var c =
|
|
1447
|
-
|
|
1448
|
-
var
|
|
1449
|
-
|
|
1450
|
-
dragEl:
|
|
1451
|
-
putSortable:
|
|
1273
|
+
var c = n || r;
|
|
1274
|
+
l();
|
|
1275
|
+
var h = t.changedTouches && t.changedTouches.length ? t.changedTouches[0] : t, f = document.elementFromPoint(h.clientX, h.clientY);
|
|
1276
|
+
s(), c && !c.el.contains(f) && (a("spill"), this.onSpill({
|
|
1277
|
+
dragEl: i,
|
|
1278
|
+
putSortable: n
|
|
1452
1279
|
}));
|
|
1453
1280
|
}
|
|
1454
1281
|
};
|
|
1455
|
-
function
|
|
1282
|
+
function xt() {
|
|
1456
1283
|
}
|
|
1457
|
-
|
|
1284
|
+
xt.prototype = {
|
|
1458
1285
|
startIndex: null,
|
|
1459
1286
|
dragStart: function(e) {
|
|
1460
1287
|
var t = e.oldDraggableIndex;
|
|
1461
1288
|
this.startIndex = t;
|
|
1462
1289
|
},
|
|
1463
1290
|
onSpill: function(e) {
|
|
1464
|
-
var t = e.dragEl,
|
|
1465
|
-
this.sortable.captureAnimationState(),
|
|
1466
|
-
var
|
|
1467
|
-
|
|
1291
|
+
var t = e.dragEl, n = e.putSortable;
|
|
1292
|
+
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
1293
|
+
var i = Ce(this.sortable.el, this.startIndex, this.options);
|
|
1294
|
+
i ? this.sortable.el.insertBefore(t, i) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
1468
1295
|
},
|
|
1469
|
-
drop:
|
|
1296
|
+
drop: nn
|
|
1470
1297
|
};
|
|
1471
|
-
|
|
1298
|
+
oe(xt, {
|
|
1472
1299
|
pluginName: "revertOnSpill"
|
|
1473
1300
|
});
|
|
1474
|
-
function
|
|
1301
|
+
function It() {
|
|
1475
1302
|
}
|
|
1476
|
-
|
|
1303
|
+
It.prototype = {
|
|
1477
1304
|
onSpill: function(e) {
|
|
1478
|
-
var t = e.dragEl,
|
|
1479
|
-
|
|
1305
|
+
var t = e.dragEl, n = e.putSortable, i = n || this.sortable;
|
|
1306
|
+
i.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), i.animateAll();
|
|
1480
1307
|
},
|
|
1481
|
-
drop:
|
|
1308
|
+
drop: nn
|
|
1482
1309
|
};
|
|
1483
|
-
|
|
1310
|
+
oe(It, {
|
|
1484
1311
|
pluginName: "removeOnSpill"
|
|
1485
1312
|
});
|
|
1486
|
-
var
|
|
1487
|
-
function
|
|
1488
|
-
function
|
|
1313
|
+
var ne;
|
|
1314
|
+
function Gn() {
|
|
1315
|
+
function o() {
|
|
1489
1316
|
this.defaults = {
|
|
1490
1317
|
swapClass: "sortable-swap-highlight"
|
|
1491
1318
|
};
|
|
1492
1319
|
}
|
|
1493
|
-
return
|
|
1320
|
+
return o.prototype = {
|
|
1494
1321
|
dragStart: function(t) {
|
|
1495
|
-
var
|
|
1496
|
-
|
|
1322
|
+
var n = t.dragEl;
|
|
1323
|
+
ne = n;
|
|
1497
1324
|
},
|
|
1498
1325
|
dragOverValid: function(t) {
|
|
1499
|
-
var
|
|
1326
|
+
var n = t.completed, i = t.target, r = t.onMove, a = t.activeSortable, l = t.changed, s = t.cancel;
|
|
1500
1327
|
if (a.options.swap) {
|
|
1501
|
-
var c = this.sortable.el,
|
|
1502
|
-
if (
|
|
1503
|
-
var f =
|
|
1504
|
-
i
|
|
1328
|
+
var c = this.sortable.el, h = this.options;
|
|
1329
|
+
if (i && i !== c) {
|
|
1330
|
+
var f = ne;
|
|
1331
|
+
r(i) !== !1 ? (F(i, h.swapClass, !0), ne = i) : ne = null, f && f !== ne && F(f, h.swapClass, !1);
|
|
1505
1332
|
}
|
|
1506
|
-
|
|
1333
|
+
l(), n(!0), s();
|
|
1507
1334
|
}
|
|
1508
1335
|
},
|
|
1509
1336
|
drop: function(t) {
|
|
1510
|
-
var
|
|
1511
|
-
|
|
1337
|
+
var n = t.activeSortable, i = t.putSortable, r = t.dragEl, a = i || this.sortable, l = this.options;
|
|
1338
|
+
ne && F(ne, l.swapClass, !1), ne && (l.swap || i && i.options.swap) && r !== ne && (a.captureAnimationState(), a !== n && n.captureAnimationState(), Un(r, ne), a.animateAll(), a !== n && n.animateAll());
|
|
1512
1339
|
},
|
|
1513
1340
|
nulling: function() {
|
|
1514
|
-
|
|
1341
|
+
ne = null;
|
|
1515
1342
|
}
|
|
1516
|
-
},
|
|
1343
|
+
}, oe(o, {
|
|
1517
1344
|
pluginName: "swap",
|
|
1518
1345
|
eventProperties: function() {
|
|
1519
1346
|
return {
|
|
1520
|
-
swapItem:
|
|
1347
|
+
swapItem: ne
|
|
1521
1348
|
};
|
|
1522
1349
|
}
|
|
1523
1350
|
});
|
|
1524
1351
|
}
|
|
1525
|
-
function
|
|
1526
|
-
var t =
|
|
1527
|
-
!t || !
|
|
1352
|
+
function Un(o, e) {
|
|
1353
|
+
var t = o.parentNode, n = e.parentNode, i, r;
|
|
1354
|
+
!t || !n || t.isEqualNode(e) || n.isEqualNode(o) || (i = H(o), r = H(e), t.isEqualNode(n) && i < r && r++, t.insertBefore(e, t.children[i]), n.insertBefore(o, n.children[r]));
|
|
1528
1355
|
}
|
|
1529
|
-
var
|
|
1530
|
-
function
|
|
1531
|
-
function
|
|
1356
|
+
var E = [], ee = [], Ie, le, Te = !1, J = !1, Se = !1, N, Ae, qe;
|
|
1357
|
+
function zn() {
|
|
1358
|
+
function o(e) {
|
|
1532
1359
|
for (var t in this)
|
|
1533
1360
|
t.charAt(0) === "_" && typeof this[t] == "function" && (this[t] = this[t].bind(this));
|
|
1534
|
-
e.options.avoidImplicitDeselect || (e.options.supportPointer ?
|
|
1361
|
+
e.options.avoidImplicitDeselect || (e.options.supportPointer ? x(document, "pointerup", this._deselectMultiDrag) : (x(document, "mouseup", this._deselectMultiDrag), x(document, "touchend", this._deselectMultiDrag))), x(document, "keydown", this._checkKeyDown), x(document, "keyup", this._checkKeyUp), this.defaults = {
|
|
1535
1362
|
selectedClass: "sortable-selected",
|
|
1536
1363
|
multiDragKey: null,
|
|
1537
1364
|
avoidImplicitDeselect: !1,
|
|
1538
|
-
setData: function(
|
|
1365
|
+
setData: function(i, r) {
|
|
1539
1366
|
var a = "";
|
|
1540
|
-
|
|
1541
|
-
a += (
|
|
1542
|
-
}) : a =
|
|
1367
|
+
E.length && le === e ? E.forEach(function(l, s) {
|
|
1368
|
+
a += (s ? ", " : "") + l.textContent;
|
|
1369
|
+
}) : a = r.textContent, i.setData("Text", a);
|
|
1543
1370
|
}
|
|
1544
1371
|
};
|
|
1545
1372
|
}
|
|
1546
|
-
return
|
|
1373
|
+
return o.prototype = {
|
|
1547
1374
|
multiDragKeyDown: !1,
|
|
1548
1375
|
isMultiDrag: !1,
|
|
1549
1376
|
delayStartGlobal: function(t) {
|
|
1550
|
-
var
|
|
1551
|
-
|
|
1377
|
+
var n = t.dragEl;
|
|
1378
|
+
N = n;
|
|
1552
1379
|
},
|
|
1553
1380
|
delayEnded: function() {
|
|
1554
|
-
this.isMultiDrag = ~
|
|
1381
|
+
this.isMultiDrag = ~E.indexOf(N);
|
|
1555
1382
|
},
|
|
1556
1383
|
setupClone: function(t) {
|
|
1557
|
-
var
|
|
1384
|
+
var n = t.sortable, i = t.cancel;
|
|
1558
1385
|
if (this.isMultiDrag) {
|
|
1559
|
-
for (var
|
|
1560
|
-
|
|
1561
|
-
|
|
1386
|
+
for (var r = 0; r < E.length; r++)
|
|
1387
|
+
ee.push(Ot(E[r])), ee[r].sortableIndex = E[r].sortableIndex, ee[r].draggable = !1, ee[r].style["will-change"] = "", F(ee[r], this.options.selectedClass, !1), E[r] === N && F(ee[r], this.options.chosenClass, !1);
|
|
1388
|
+
n._hideClone(), i();
|
|
1562
1389
|
}
|
|
1563
1390
|
},
|
|
1564
1391
|
clone: function(t) {
|
|
1565
|
-
var
|
|
1566
|
-
this.isMultiDrag && (this.options.removeCloneOnHide ||
|
|
1392
|
+
var n = t.sortable, i = t.rootEl, r = t.dispatchSortableEvent, a = t.cancel;
|
|
1393
|
+
this.isMultiDrag && (this.options.removeCloneOnHide || E.length && le === n && (Xt(!0, i), r("clone"), a()));
|
|
1567
1394
|
},
|
|
1568
1395
|
showClone: function(t) {
|
|
1569
|
-
var
|
|
1570
|
-
this.isMultiDrag && (
|
|
1396
|
+
var n = t.cloneNowShown, i = t.rootEl, r = t.cancel;
|
|
1397
|
+
this.isMultiDrag && (Xt(!1, i), ee.forEach(function(a) {
|
|
1571
1398
|
b(a, "display", "");
|
|
1572
|
-
}),
|
|
1399
|
+
}), n(), qe = !1, r());
|
|
1573
1400
|
},
|
|
1574
1401
|
hideClone: function(t) {
|
|
1575
|
-
var
|
|
1402
|
+
var n = this;
|
|
1576
1403
|
t.sortable;
|
|
1577
|
-
var
|
|
1578
|
-
this.isMultiDrag && (
|
|
1579
|
-
b(a, "display", "none"),
|
|
1580
|
-
}),
|
|
1404
|
+
var i = t.cloneNowHidden, r = t.cancel;
|
|
1405
|
+
this.isMultiDrag && (ee.forEach(function(a) {
|
|
1406
|
+
b(a, "display", "none"), n.options.removeCloneOnHide && a.parentNode && a.parentNode.removeChild(a);
|
|
1407
|
+
}), i(), qe = !0, r());
|
|
1581
1408
|
},
|
|
1582
1409
|
dragStartGlobal: function(t) {
|
|
1583
|
-
t.sortable, !this.isMultiDrag && le && le.multiDrag._deselectMultiDrag(),
|
|
1584
|
-
|
|
1585
|
-
}),
|
|
1586
|
-
return
|
|
1587
|
-
}),
|
|
1410
|
+
t.sortable, !this.isMultiDrag && le && le.multiDrag._deselectMultiDrag(), E.forEach(function(n) {
|
|
1411
|
+
n.sortableIndex = H(n);
|
|
1412
|
+
}), E = E.sort(function(n, i) {
|
|
1413
|
+
return n.sortableIndex - i.sortableIndex;
|
|
1414
|
+
}), Se = !0;
|
|
1588
1415
|
},
|
|
1589
1416
|
dragStarted: function(t) {
|
|
1590
|
-
var
|
|
1417
|
+
var n = this, i = t.sortable;
|
|
1591
1418
|
if (this.isMultiDrag) {
|
|
1592
|
-
if (this.options.sort && (
|
|
1593
|
-
|
|
1594
|
-
a !==
|
|
1419
|
+
if (this.options.sort && (i.captureAnimationState(), this.options.animation)) {
|
|
1420
|
+
E.forEach(function(a) {
|
|
1421
|
+
a !== N && b(a, "position", "absolute");
|
|
1595
1422
|
});
|
|
1596
|
-
var
|
|
1597
|
-
|
|
1598
|
-
a !==
|
|
1599
|
-
}),
|
|
1423
|
+
var r = $(N, !1, !0, !0);
|
|
1424
|
+
E.forEach(function(a) {
|
|
1425
|
+
a !== N && Lt(a, r);
|
|
1426
|
+
}), J = !0, Te = !0;
|
|
1600
1427
|
}
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
}),
|
|
1428
|
+
i.animateAll(function() {
|
|
1429
|
+
J = !1, Te = !1, n.options.animation && E.forEach(function(a) {
|
|
1430
|
+
st(a);
|
|
1431
|
+
}), n.options.sort && Ve();
|
|
1605
1432
|
});
|
|
1606
1433
|
}
|
|
1607
1434
|
},
|
|
1608
1435
|
dragOver: function(t) {
|
|
1609
|
-
var
|
|
1610
|
-
|
|
1436
|
+
var n = t.target, i = t.completed, r = t.cancel;
|
|
1437
|
+
J && ~E.indexOf(n) && (i(!1), r());
|
|
1611
1438
|
},
|
|
1612
1439
|
revert: function(t) {
|
|
1613
|
-
var
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
target:
|
|
1617
|
-
rect:
|
|
1618
|
-
}),
|
|
1619
|
-
}),
|
|
1440
|
+
var n = t.fromSortable, i = t.rootEl, r = t.sortable, a = t.dragRect;
|
|
1441
|
+
E.length > 1 && (E.forEach(function(l) {
|
|
1442
|
+
r.addAnimationState({
|
|
1443
|
+
target: l,
|
|
1444
|
+
rect: J ? $(l) : a
|
|
1445
|
+
}), st(l), l.fromRect = a, n.removeAnimationState(l);
|
|
1446
|
+
}), J = !1, Wn(!this.options.removeCloneOnHide, i));
|
|
1620
1447
|
},
|
|
1621
1448
|
dragOverCompleted: function(t) {
|
|
1622
|
-
var
|
|
1623
|
-
if (
|
|
1624
|
-
if (
|
|
1625
|
-
var
|
|
1626
|
-
|
|
1627
|
-
v !==
|
|
1628
|
-
}),
|
|
1449
|
+
var n = t.sortable, i = t.isOwner, r = t.insertion, a = t.activeSortable, l = t.parentEl, s = t.putSortable, c = this.options;
|
|
1450
|
+
if (r) {
|
|
1451
|
+
if (i && a._hideClone(), Te = !1, c.animation && E.length > 1 && (J || !i && !a.options.sort && !s)) {
|
|
1452
|
+
var h = $(N, !1, !0, !0);
|
|
1453
|
+
E.forEach(function(v) {
|
|
1454
|
+
v !== N && (Lt(v, h), l.appendChild(v));
|
|
1455
|
+
}), J = !0;
|
|
1629
1456
|
}
|
|
1630
|
-
if (!
|
|
1631
|
-
if (
|
|
1632
|
-
var f =
|
|
1633
|
-
a._showClone(
|
|
1457
|
+
if (!i)
|
|
1458
|
+
if (J || Ve(), E.length > 1) {
|
|
1459
|
+
var f = qe;
|
|
1460
|
+
a._showClone(n), a.options.animation && !qe && f && ee.forEach(function(v) {
|
|
1634
1461
|
a.addAnimationState({
|
|
1635
1462
|
target: v,
|
|
1636
|
-
rect:
|
|
1637
|
-
}), v.fromRect =
|
|
1463
|
+
rect: Ae
|
|
1464
|
+
}), v.fromRect = Ae, v.thisAnimationDuration = null;
|
|
1638
1465
|
});
|
|
1639
1466
|
} else
|
|
1640
|
-
a._showClone(
|
|
1467
|
+
a._showClone(n);
|
|
1641
1468
|
}
|
|
1642
1469
|
},
|
|
1643
1470
|
dragOverAnimationCapture: function(t) {
|
|
1644
|
-
var
|
|
1645
|
-
if (
|
|
1646
|
-
|
|
1647
|
-
}),
|
|
1648
|
-
|
|
1649
|
-
var a =
|
|
1650
|
-
|
|
1471
|
+
var n = t.dragRect, i = t.isOwner, r = t.activeSortable;
|
|
1472
|
+
if (E.forEach(function(l) {
|
|
1473
|
+
l.thisAnimationDuration = null;
|
|
1474
|
+
}), r.options.animation && !i && r.multiDrag.isMultiDrag) {
|
|
1475
|
+
Ae = oe({}, n);
|
|
1476
|
+
var a = we(N, !0);
|
|
1477
|
+
Ae.top -= a.f, Ae.left -= a.e;
|
|
1651
1478
|
}
|
|
1652
1479
|
},
|
|
1653
1480
|
dragOverAnimationComplete: function() {
|
|
1654
|
-
|
|
1481
|
+
J && (J = !1, Ve());
|
|
1655
1482
|
},
|
|
1656
1483
|
drop: function(t) {
|
|
1657
|
-
var
|
|
1658
|
-
if (
|
|
1659
|
-
var f = this.options, v =
|
|
1660
|
-
if (!
|
|
1661
|
-
if (f.multiDragKey && !this.multiDragKeyDown && this._deselectMultiDrag(),
|
|
1662
|
-
|
|
1484
|
+
var n = t.originalEvent, i = t.rootEl, r = t.parentEl, a = t.sortable, l = t.dispatchSortableEvent, s = t.oldIndex, c = t.putSortable, h = c || this.sortable;
|
|
1485
|
+
if (n) {
|
|
1486
|
+
var f = this.options, v = r.children;
|
|
1487
|
+
if (!Se)
|
|
1488
|
+
if (f.multiDragKey && !this.multiDragKeyDown && this._deselectMultiDrag(), F(N, f.selectedClass, !~E.indexOf(N)), ~E.indexOf(N))
|
|
1489
|
+
E.splice(E.indexOf(N), 1), Ie = null, Pe({
|
|
1663
1490
|
sortable: a,
|
|
1664
|
-
rootEl:
|
|
1491
|
+
rootEl: i,
|
|
1665
1492
|
name: "deselect",
|
|
1666
|
-
targetEl:
|
|
1667
|
-
originalEvent:
|
|
1493
|
+
targetEl: N,
|
|
1494
|
+
originalEvent: n
|
|
1668
1495
|
});
|
|
1669
1496
|
else {
|
|
1670
|
-
if (
|
|
1497
|
+
if (E.push(N), Pe({
|
|
1671
1498
|
sortable: a,
|
|
1672
|
-
rootEl:
|
|
1499
|
+
rootEl: i,
|
|
1673
1500
|
name: "select",
|
|
1674
|
-
targetEl:
|
|
1675
|
-
originalEvent:
|
|
1676
|
-
}),
|
|
1677
|
-
var
|
|
1678
|
-
~
|
|
1679
|
-
var
|
|
1680
|
-
|
|
1681
|
-
for (var X = f.filter; O <
|
|
1682
|
-
if (!~
|
|
1683
|
-
var ie = X && (typeof X == "function" ? X.call(a,
|
|
1684
|
-
return
|
|
1501
|
+
targetEl: N,
|
|
1502
|
+
originalEvent: n
|
|
1503
|
+
}), n.shiftKey && Ie && a.el.contains(Ie)) {
|
|
1504
|
+
var T = H(Ie), D = H(N);
|
|
1505
|
+
~T && ~D && T !== D && function() {
|
|
1506
|
+
var I, O;
|
|
1507
|
+
D > T ? (O = T, I = D) : (O = D, I = T + 1);
|
|
1508
|
+
for (var X = f.filter; O < I; O++)
|
|
1509
|
+
if (!~E.indexOf(v[O]) && Q(v[O], f.draggable, r, !1)) {
|
|
1510
|
+
var ie = X && (typeof X == "function" ? X.call(a, n, v[O], a) : X.split(",").some(function(p) {
|
|
1511
|
+
return Q(v[O], p.trim(), r, !1);
|
|
1685
1512
|
}));
|
|
1686
|
-
ie || (
|
|
1513
|
+
ie || (F(v[O], f.selectedClass, !0), E.push(v[O]), Pe({
|
|
1687
1514
|
sortable: a,
|
|
1688
|
-
rootEl:
|
|
1515
|
+
rootEl: i,
|
|
1689
1516
|
name: "select",
|
|
1690
1517
|
targetEl: v[O],
|
|
1691
|
-
originalEvent:
|
|
1518
|
+
originalEvent: n
|
|
1692
1519
|
}));
|
|
1693
1520
|
}
|
|
1694
1521
|
}();
|
|
1695
1522
|
} else
|
|
1696
|
-
|
|
1697
|
-
le =
|
|
1523
|
+
Ie = N;
|
|
1524
|
+
le = h;
|
|
1698
1525
|
}
|
|
1699
|
-
if (
|
|
1700
|
-
if (
|
|
1701
|
-
var
|
|
1702
|
-
if (!
|
|
1703
|
-
if (
|
|
1704
|
-
var O =
|
|
1705
|
-
|
|
1706
|
-
target:
|
|
1526
|
+
if (Se && this.isMultiDrag) {
|
|
1527
|
+
if (J = !1, (r[z].options.sort || r !== i) && E.length > 1) {
|
|
1528
|
+
var A = $(N), G = H(N, ":not(." + this.options.selectedClass + ")");
|
|
1529
|
+
if (!Te && f.animation && (N.thisAnimationDuration = null), h.captureAnimationState(), !Te && (f.animation && (N.fromRect = A, E.forEach(function(I) {
|
|
1530
|
+
if (I.thisAnimationDuration = null, I !== N) {
|
|
1531
|
+
var O = J ? $(I) : A;
|
|
1532
|
+
I.fromRect = O, h.addAnimationState({
|
|
1533
|
+
target: I,
|
|
1707
1534
|
rect: O
|
|
1708
1535
|
});
|
|
1709
1536
|
}
|
|
1710
|
-
})),
|
|
1711
|
-
v[
|
|
1712
|
-
}),
|
|
1713
|
-
var
|
|
1714
|
-
|
|
1715
|
-
if (
|
|
1716
|
-
|
|
1537
|
+
})), Ve(), E.forEach(function(I) {
|
|
1538
|
+
v[G] ? r.insertBefore(I, v[G]) : r.appendChild(I), G++;
|
|
1539
|
+
}), s === H(N))) {
|
|
1540
|
+
var V = !1;
|
|
1541
|
+
E.forEach(function(I) {
|
|
1542
|
+
if (I.sortableIndex !== H(I)) {
|
|
1543
|
+
V = !0;
|
|
1717
1544
|
return;
|
|
1718
1545
|
}
|
|
1719
|
-
}),
|
|
1546
|
+
}), V && (l("update"), l("sort"));
|
|
1720
1547
|
}
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
}),
|
|
1548
|
+
E.forEach(function(I) {
|
|
1549
|
+
st(I);
|
|
1550
|
+
}), h.animateAll();
|
|
1724
1551
|
}
|
|
1725
|
-
le =
|
|
1552
|
+
le = h;
|
|
1726
1553
|
}
|
|
1727
|
-
(
|
|
1728
|
-
|
|
1554
|
+
(i === r || c && c.lastPutMode !== "clone") && ee.forEach(function(I) {
|
|
1555
|
+
I.parentNode && I.parentNode.removeChild(I);
|
|
1729
1556
|
});
|
|
1730
1557
|
}
|
|
1731
1558
|
},
|
|
1732
1559
|
nullingGlobal: function() {
|
|
1733
|
-
this.isMultiDrag =
|
|
1560
|
+
this.isMultiDrag = Se = !1, ee.length = 0;
|
|
1734
1561
|
},
|
|
1735
1562
|
destroyGlobal: function() {
|
|
1736
|
-
this._deselectMultiDrag(),
|
|
1563
|
+
this._deselectMultiDrag(), C(document, "pointerup", this._deselectMultiDrag), C(document, "mouseup", this._deselectMultiDrag), C(document, "touchend", this._deselectMultiDrag), C(document, "keydown", this._checkKeyDown), C(document, "keyup", this._checkKeyUp);
|
|
1737
1564
|
},
|
|
1738
1565
|
_deselectMultiDrag: function(t) {
|
|
1739
|
-
if (!(typeof
|
|
1740
|
-
for (;
|
|
1741
|
-
var
|
|
1742
|
-
|
|
1566
|
+
if (!(typeof Se < "u" && Se) && le === this.sortable && !(t && Q(t.target, this.options.draggable, this.sortable.el, !1)) && !(t && t.button !== 0))
|
|
1567
|
+
for (; E.length; ) {
|
|
1568
|
+
var n = E[0];
|
|
1569
|
+
F(n, this.options.selectedClass, !1), E.shift(), Pe({
|
|
1743
1570
|
sortable: this.sortable,
|
|
1744
1571
|
rootEl: this.sortable.el,
|
|
1745
1572
|
name: "deselect",
|
|
1746
|
-
targetEl:
|
|
1573
|
+
targetEl: n,
|
|
1747
1574
|
originalEvent: t
|
|
1748
1575
|
});
|
|
1749
1576
|
}
|
|
@@ -1754,7 +1581,7 @@ function po() {
|
|
|
1754
1581
|
_checkKeyUp: function(t) {
|
|
1755
1582
|
t.key === this.options.multiDragKey && (this.multiDragKeyDown = !1);
|
|
1756
1583
|
}
|
|
1757
|
-
},
|
|
1584
|
+
}, oe(o, {
|
|
1758
1585
|
// Static methods & properties
|
|
1759
1586
|
pluginName: "multiDrag",
|
|
1760
1587
|
utils: {
|
|
@@ -1763,35 +1590,35 @@ function po() {
|
|
|
1763
1590
|
* @param {HTMLElement} el The element to be selected
|
|
1764
1591
|
*/
|
|
1765
1592
|
select: function(t) {
|
|
1766
|
-
var
|
|
1767
|
-
!
|
|
1593
|
+
var n = t.parentNode[z];
|
|
1594
|
+
!n || !n.options.multiDrag || ~E.indexOf(t) || (le && le !== n && (le.multiDrag._deselectMultiDrag(), le = n), F(t, n.options.selectedClass, !0), E.push(t));
|
|
1768
1595
|
},
|
|
1769
1596
|
/**
|
|
1770
1597
|
* Deselects the provided multi-drag item
|
|
1771
1598
|
* @param {HTMLElement} el The element to be deselected
|
|
1772
1599
|
*/
|
|
1773
1600
|
deselect: function(t) {
|
|
1774
|
-
var
|
|
1775
|
-
!
|
|
1601
|
+
var n = t.parentNode[z], i = E.indexOf(t);
|
|
1602
|
+
!n || !n.options.multiDrag || !~i || (F(t, n.options.selectedClass, !1), E.splice(i, 1));
|
|
1776
1603
|
}
|
|
1777
1604
|
},
|
|
1778
1605
|
eventProperties: function() {
|
|
1779
|
-
var t = this,
|
|
1780
|
-
return
|
|
1781
|
-
|
|
1782
|
-
multiDragElement:
|
|
1783
|
-
index:
|
|
1606
|
+
var t = this, n = [], i = [];
|
|
1607
|
+
return E.forEach(function(r) {
|
|
1608
|
+
n.push({
|
|
1609
|
+
multiDragElement: r,
|
|
1610
|
+
index: r.sortableIndex
|
|
1784
1611
|
});
|
|
1785
1612
|
var a;
|
|
1786
|
-
|
|
1787
|
-
multiDragElement:
|
|
1613
|
+
J && r !== N ? a = -1 : J ? a = H(r, ":not(." + t.options.selectedClass + ")") : a = H(r), i.push({
|
|
1614
|
+
multiDragElement: r,
|
|
1788
1615
|
index: a
|
|
1789
1616
|
});
|
|
1790
1617
|
}), {
|
|
1791
|
-
items:
|
|
1792
|
-
clones: [].concat(
|
|
1793
|
-
oldIndicies:
|
|
1794
|
-
newIndicies:
|
|
1618
|
+
items: wn(E),
|
|
1619
|
+
clones: [].concat(ee),
|
|
1620
|
+
oldIndicies: n,
|
|
1621
|
+
newIndicies: i
|
|
1795
1622
|
};
|
|
1796
1623
|
},
|
|
1797
1624
|
optionListeners: {
|
|
@@ -1801,202 +1628,202 @@ function po() {
|
|
|
1801
1628
|
}
|
|
1802
1629
|
});
|
|
1803
1630
|
}
|
|
1804
|
-
function
|
|
1805
|
-
|
|
1806
|
-
var
|
|
1807
|
-
|
|
1631
|
+
function Wn(o, e) {
|
|
1632
|
+
E.forEach(function(t, n) {
|
|
1633
|
+
var i = e.children[t.sortableIndex + (o ? Number(n) : 0)];
|
|
1634
|
+
i ? e.insertBefore(t, i) : e.appendChild(t);
|
|
1808
1635
|
});
|
|
1809
1636
|
}
|
|
1810
|
-
function
|
|
1811
|
-
|
|
1812
|
-
var
|
|
1813
|
-
|
|
1637
|
+
function Xt(o, e) {
|
|
1638
|
+
ee.forEach(function(t, n) {
|
|
1639
|
+
var i = e.children[t.sortableIndex + (o ? Number(n) : 0)];
|
|
1640
|
+
i ? e.insertBefore(t, i) : e.appendChild(t);
|
|
1814
1641
|
});
|
|
1815
1642
|
}
|
|
1816
|
-
function
|
|
1817
|
-
|
|
1818
|
-
|
|
1643
|
+
function Ve() {
|
|
1644
|
+
E.forEach(function(o) {
|
|
1645
|
+
o !== N && o.parentNode && o.parentNode.removeChild(o);
|
|
1819
1646
|
});
|
|
1820
1647
|
}
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
const
|
|
1648
|
+
y.mount(new Bn());
|
|
1649
|
+
y.mount(It, xt);
|
|
1650
|
+
const Kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1824
1651
|
__proto__: null,
|
|
1825
|
-
MultiDrag:
|
|
1826
|
-
Sortable:
|
|
1827
|
-
Swap:
|
|
1828
|
-
default:
|
|
1829
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1830
|
-
var
|
|
1652
|
+
MultiDrag: zn,
|
|
1653
|
+
Sortable: y,
|
|
1654
|
+
Swap: Gn,
|
|
1655
|
+
default: y
|
|
1656
|
+
}, Symbol.toStringTag, { value: "Module" })), qn = /* @__PURE__ */ Yt(Kn);
|
|
1657
|
+
var on = { exports: {} };
|
|
1831
1658
|
/*!
|
|
1832
1659
|
Copyright (c) 2018 Jed Watson.
|
|
1833
1660
|
Licensed under the MIT License (MIT), see
|
|
1834
1661
|
http://jedwatson.github.io/classnames
|
|
1835
1662
|
*/
|
|
1836
|
-
(function(
|
|
1663
|
+
(function(o) {
|
|
1837
1664
|
(function() {
|
|
1838
1665
|
var e = {}.hasOwnProperty;
|
|
1839
1666
|
function t() {
|
|
1840
|
-
for (var
|
|
1841
|
-
var
|
|
1842
|
-
if (
|
|
1843
|
-
var a = typeof
|
|
1667
|
+
for (var n = [], i = 0; i < arguments.length; i++) {
|
|
1668
|
+
var r = arguments[i];
|
|
1669
|
+
if (r) {
|
|
1670
|
+
var a = typeof r;
|
|
1844
1671
|
if (a === "string" || a === "number")
|
|
1845
|
-
|
|
1846
|
-
else if (Array.isArray(
|
|
1847
|
-
if (
|
|
1848
|
-
var
|
|
1849
|
-
|
|
1672
|
+
n.push(r);
|
|
1673
|
+
else if (Array.isArray(r)) {
|
|
1674
|
+
if (r.length) {
|
|
1675
|
+
var l = t.apply(null, r);
|
|
1676
|
+
l && n.push(l);
|
|
1850
1677
|
}
|
|
1851
1678
|
} else if (a === "object")
|
|
1852
|
-
if (
|
|
1853
|
-
for (var
|
|
1854
|
-
e.call(
|
|
1679
|
+
if (r.toString === Object.prototype.toString)
|
|
1680
|
+
for (var s in r)
|
|
1681
|
+
e.call(r, s) && r[s] && n.push(s);
|
|
1855
1682
|
else
|
|
1856
|
-
|
|
1683
|
+
n.push(r.toString());
|
|
1857
1684
|
}
|
|
1858
1685
|
}
|
|
1859
|
-
return
|
|
1686
|
+
return n.join(" ");
|
|
1860
1687
|
}
|
|
1861
|
-
|
|
1688
|
+
o.exports ? (t.default = t, o.exports = t) : window.classNames = t;
|
|
1862
1689
|
})();
|
|
1863
|
-
})(
|
|
1864
|
-
var
|
|
1865
|
-
function
|
|
1866
|
-
if (!
|
|
1867
|
-
if (
|
|
1868
|
-
throw new Error(
|
|
1869
|
-
var t = typeof e == "function" ? e() : e,
|
|
1870
|
-
throw new Error(
|
|
1690
|
+
})(on);
|
|
1691
|
+
var Vn = on.exports, Zn = process.env.NODE_ENV === "production", bt = "Invariant failed";
|
|
1692
|
+
function Jn(o, e) {
|
|
1693
|
+
if (!o) {
|
|
1694
|
+
if (Zn)
|
|
1695
|
+
throw new Error(bt);
|
|
1696
|
+
var t = typeof e == "function" ? e() : e, n = t ? bt + ": " + t : bt;
|
|
1697
|
+
throw new Error(n);
|
|
1871
1698
|
}
|
|
1872
1699
|
}
|
|
1873
|
-
const
|
|
1700
|
+
const Qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1874
1701
|
__proto__: null,
|
|
1875
|
-
default:
|
|
1876
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1877
|
-
(function(
|
|
1878
|
-
var e =
|
|
1879
|
-
function
|
|
1880
|
-
return
|
|
1702
|
+
default: Jn
|
|
1703
|
+
}, Symbol.toStringTag, { value: "Module" })), eo = /* @__PURE__ */ Yt(Qn);
|
|
1704
|
+
(function(o) {
|
|
1705
|
+
var e = qn, t = Vn, n = cn, i = eo;
|
|
1706
|
+
function r(p) {
|
|
1707
|
+
return p && p.__esModule ? p.default : p;
|
|
1881
1708
|
}
|
|
1882
|
-
function a(
|
|
1883
|
-
Object.defineProperty(
|
|
1709
|
+
function a(p, u, m, g) {
|
|
1710
|
+
Object.defineProperty(p, u, { get: m, set: g, enumerable: !0, configurable: !0 });
|
|
1884
1711
|
}
|
|
1885
|
-
function
|
|
1712
|
+
function l(p, u) {
|
|
1886
1713
|
return Object.keys(u).forEach(function(m) {
|
|
1887
|
-
m === "default" || m === "__esModule" ||
|
|
1714
|
+
m === "default" || m === "__esModule" || p.hasOwnProperty(m) || Object.defineProperty(p, m, {
|
|
1888
1715
|
enumerable: !0,
|
|
1889
1716
|
get: function() {
|
|
1890
1717
|
return u[m];
|
|
1891
1718
|
}
|
|
1892
1719
|
});
|
|
1893
|
-
}),
|
|
1720
|
+
}), p;
|
|
1894
1721
|
}
|
|
1895
|
-
a(
|
|
1896
|
-
function
|
|
1897
|
-
|
|
1722
|
+
a(o.exports, "Sortable", () => $882b6d93070905b3$re_export$Sortable), a(o.exports, "Direction", () => $882b6d93070905b3$re_export$Direction), a(o.exports, "DOMRect", () => $882b6d93070905b3$re_export$DOMRect), a(o.exports, "GroupOptions", () => $882b6d93070905b3$re_export$GroupOptions), a(o.exports, "MoveEvent", () => $882b6d93070905b3$re_export$MoveEvent), a(o.exports, "Options", () => $882b6d93070905b3$re_export$Options), a(o.exports, "PullResult", () => $882b6d93070905b3$re_export$PullResult), a(o.exports, "PutResult", () => $882b6d93070905b3$re_export$PutResult), a(o.exports, "SortableEvent", () => $882b6d93070905b3$re_export$SortableEvent), a(o.exports, "SortableOptions", () => $882b6d93070905b3$re_export$SortableOptions), a(o.exports, "Utils", () => $882b6d93070905b3$re_export$Utils), a(o.exports, "ReactSortable", () => X);
|
|
1723
|
+
function s(p) {
|
|
1724
|
+
p.parentElement !== null && p.parentElement.removeChild(p);
|
|
1898
1725
|
}
|
|
1899
|
-
function c(
|
|
1900
|
-
const g =
|
|
1901
|
-
|
|
1726
|
+
function c(p, u, m) {
|
|
1727
|
+
const g = p.children[m] || null;
|
|
1728
|
+
p.insertBefore(u, g);
|
|
1902
1729
|
}
|
|
1903
|
-
function p
|
|
1904
|
-
|
|
1730
|
+
function h(p) {
|
|
1731
|
+
p.forEach((u) => s(u.element));
|
|
1905
1732
|
}
|
|
1906
|
-
function f(
|
|
1907
|
-
|
|
1733
|
+
function f(p) {
|
|
1734
|
+
p.forEach((u) => {
|
|
1908
1735
|
c(u.parentElement, u.element, u.oldIndex);
|
|
1909
1736
|
});
|
|
1910
1737
|
}
|
|
1911
|
-
function v(
|
|
1912
|
-
const m =
|
|
1913
|
-
parentElement:
|
|
1738
|
+
function v(p, u) {
|
|
1739
|
+
const m = G(p), g = {
|
|
1740
|
+
parentElement: p.from
|
|
1914
1741
|
};
|
|
1915
|
-
let
|
|
1742
|
+
let _ = [];
|
|
1916
1743
|
switch (m) {
|
|
1917
1744
|
case "normal":
|
|
1918
|
-
|
|
1745
|
+
_ = [
|
|
1919
1746
|
{
|
|
1920
|
-
element:
|
|
1921
|
-
newIndex:
|
|
1922
|
-
oldIndex:
|
|
1923
|
-
parentElement:
|
|
1747
|
+
element: p.item,
|
|
1748
|
+
newIndex: p.newIndex,
|
|
1749
|
+
oldIndex: p.oldIndex,
|
|
1750
|
+
parentElement: p.from
|
|
1924
1751
|
}
|
|
1925
1752
|
];
|
|
1926
1753
|
break;
|
|
1927
1754
|
case "swap":
|
|
1928
|
-
const
|
|
1929
|
-
element:
|
|
1930
|
-
oldIndex:
|
|
1931
|
-
newIndex:
|
|
1755
|
+
const M = {
|
|
1756
|
+
element: p.item,
|
|
1757
|
+
oldIndex: p.oldIndex,
|
|
1758
|
+
newIndex: p.newIndex,
|
|
1932
1759
|
...g
|
|
1933
|
-
},
|
|
1934
|
-
element:
|
|
1935
|
-
oldIndex:
|
|
1936
|
-
newIndex:
|
|
1760
|
+
}, k = {
|
|
1761
|
+
element: p.swapItem,
|
|
1762
|
+
oldIndex: p.newIndex,
|
|
1763
|
+
newIndex: p.oldIndex,
|
|
1937
1764
|
...g
|
|
1938
1765
|
};
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1766
|
+
_ = [
|
|
1767
|
+
M,
|
|
1768
|
+
k
|
|
1942
1769
|
];
|
|
1943
1770
|
break;
|
|
1944
1771
|
case "multidrag":
|
|
1945
|
-
|
|
1946
|
-
element:
|
|
1947
|
-
oldIndex:
|
|
1948
|
-
newIndex:
|
|
1772
|
+
_ = p.oldIndicies.map((B, K) => ({
|
|
1773
|
+
element: B.multiDragElement,
|
|
1774
|
+
oldIndex: B.index,
|
|
1775
|
+
newIndex: p.newIndicies[K].index,
|
|
1949
1776
|
...g
|
|
1950
1777
|
}));
|
|
1951
1778
|
break;
|
|
1952
1779
|
}
|
|
1953
|
-
return
|
|
1780
|
+
return V(_, u);
|
|
1954
1781
|
}
|
|
1955
|
-
function
|
|
1956
|
-
const m =
|
|
1957
|
-
return
|
|
1782
|
+
function T(p, u) {
|
|
1783
|
+
const m = D(p, u);
|
|
1784
|
+
return A(p, m);
|
|
1958
1785
|
}
|
|
1959
|
-
function
|
|
1786
|
+
function D(p, u) {
|
|
1960
1787
|
const m = [
|
|
1961
1788
|
...u
|
|
1962
1789
|
];
|
|
1963
|
-
return
|
|
1790
|
+
return p.concat().reverse().forEach((g) => m.splice(g.oldIndex, 1)), m;
|
|
1964
1791
|
}
|
|
1965
|
-
function
|
|
1966
|
-
const
|
|
1792
|
+
function A(p, u, m, g) {
|
|
1793
|
+
const _ = [
|
|
1967
1794
|
...u
|
|
1968
1795
|
];
|
|
1969
|
-
return
|
|
1970
|
-
const P = g && m && g(
|
|
1971
|
-
|
|
1972
|
-
}),
|
|
1796
|
+
return p.forEach((w) => {
|
|
1797
|
+
const P = g && m && g(w.item, m);
|
|
1798
|
+
_.splice(w.newIndex, 0, P || w.item);
|
|
1799
|
+
}), _;
|
|
1973
1800
|
}
|
|
1974
|
-
function
|
|
1975
|
-
return
|
|
1801
|
+
function G(p) {
|
|
1802
|
+
return p.oldIndicies && p.oldIndicies.length > 0 ? "multidrag" : p.swapItem ? "swap" : "normal";
|
|
1976
1803
|
}
|
|
1977
|
-
function
|
|
1978
|
-
return
|
|
1804
|
+
function V(p, u) {
|
|
1805
|
+
return p.map((g) => ({
|
|
1979
1806
|
...g,
|
|
1980
1807
|
item: u[g.oldIndex]
|
|
1981
|
-
})).sort((g,
|
|
1808
|
+
})).sort((g, _) => g.oldIndex - _.oldIndex);
|
|
1982
1809
|
}
|
|
1983
|
-
function
|
|
1984
|
-
const { list: u, setList: m, children: g, tag:
|
|
1985
|
-
return
|
|
1810
|
+
function I(p) {
|
|
1811
|
+
const { list: u, setList: m, children: g, tag: _, style: w, className: P, clone: M, onAdd: k, onChange: B, onChoose: K, onClone: ge, onEnd: re, onFilter: Ye, onRemove: Oe, onSort: xe, onStart: Be, onUnchoose: Tt, onUpdate: no, onMove: oo, onSpill: io, onSelect: ro, onDeselect: ao, ...rn } = p;
|
|
1812
|
+
return rn;
|
|
1986
1813
|
}
|
|
1987
1814
|
const O = {
|
|
1988
1815
|
dragging: null
|
|
1989
1816
|
};
|
|
1990
|
-
class X extends
|
|
1817
|
+
class X extends n.Component {
|
|
1991
1818
|
constructor(u) {
|
|
1992
|
-
super(u), this.ref = /* @__PURE__ */ (0,
|
|
1819
|
+
super(u), this.ref = /* @__PURE__ */ (0, n.createRef)();
|
|
1993
1820
|
const m = [
|
|
1994
1821
|
...u.list
|
|
1995
1822
|
].map((g) => Object.assign(g, {
|
|
1996
1823
|
chosen: !1,
|
|
1997
1824
|
selected: !1
|
|
1998
1825
|
}));
|
|
1999
|
-
u.setList(m, this.sortable, O), i
|
|
1826
|
+
u.setList(m, this.sortable, O), r(i)(
|
|
2000
1827
|
//@ts-expect-error: Doesn't exist. Will deprecate soon.
|
|
2001
1828
|
!u.plugins,
|
|
2002
1829
|
`
|
|
@@ -2009,39 +1836,39 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
|
|
|
2009
1836
|
componentDidMount() {
|
|
2010
1837
|
if (this.ref.current === null) return;
|
|
2011
1838
|
const u = this.makeOptions();
|
|
2012
|
-
|
|
1839
|
+
r(e).create(this.ref.current, u);
|
|
2013
1840
|
}
|
|
2014
1841
|
componentDidUpdate(u) {
|
|
2015
1842
|
u.disabled !== this.props.disabled && this.sortable && this.sortable.option("disabled", this.props.disabled);
|
|
2016
1843
|
}
|
|
2017
1844
|
render() {
|
|
2018
|
-
const { tag: u, style: m, className: g, id:
|
|
1845
|
+
const { tag: u, style: m, className: g, id: _ } = this.props, w = {
|
|
2019
1846
|
style: m,
|
|
2020
1847
|
className: g,
|
|
2021
|
-
id:
|
|
1848
|
+
id: _
|
|
2022
1849
|
}, P = !u || u === null ? "div" : u;
|
|
2023
|
-
return /* @__PURE__ */ (0,
|
|
1850
|
+
return /* @__PURE__ */ (0, n.createElement)(P, {
|
|
2024
1851
|
// @todo - find a way (perhaps with the callback) to allow AntD components to work
|
|
2025
1852
|
ref: this.ref,
|
|
2026
|
-
...
|
|
1853
|
+
...w
|
|
2027
1854
|
}, this.getChildren());
|
|
2028
1855
|
}
|
|
2029
1856
|
getChildren() {
|
|
2030
|
-
const { children: u, dataIdAttr: m, selectedClass: g = "sortable-selected", chosenClass:
|
|
1857
|
+
const { children: u, dataIdAttr: m, selectedClass: g = "sortable-selected", chosenClass: _ = "sortable-chosen", dragClass: w = "sortable-drag", fallbackClass: P = "sortable-falback", ghostClass: M = "sortable-ghost", swapClass: k = "sortable-swap-highlight", filter: B = "sortable-filter", list: K } = this.props;
|
|
2031
1858
|
if (!u || u == null) return null;
|
|
2032
|
-
const
|
|
2033
|
-
return
|
|
2034
|
-
if (
|
|
2035
|
-
const
|
|
2036
|
-
[
|
|
2037
|
-
},
|
|
2038
|
-
[g]:
|
|
2039
|
-
[
|
|
2040
|
-
...
|
|
1859
|
+
const ge = m || "data-id";
|
|
1860
|
+
return n.Children.map(u, (re, Ye) => {
|
|
1861
|
+
if (re === void 0) return;
|
|
1862
|
+
const Oe = K[Ye] || {}, { className: xe } = re.props, Be = typeof B == "string" && {
|
|
1863
|
+
[B.replace(".", "")]: !!Oe.filtered
|
|
1864
|
+
}, Tt = r(t)(xe, {
|
|
1865
|
+
[g]: Oe.selected,
|
|
1866
|
+
[_]: Oe.chosen,
|
|
1867
|
+
...Be
|
|
2041
1868
|
});
|
|
2042
|
-
return /* @__PURE__ */ (0,
|
|
2043
|
-
[
|
|
2044
|
-
className:
|
|
1869
|
+
return /* @__PURE__ */ (0, n.cloneElement)(re, {
|
|
1870
|
+
[ge]: re.key,
|
|
1871
|
+
className: Tt
|
|
2045
1872
|
});
|
|
2046
1873
|
});
|
|
2047
1874
|
}
|
|
@@ -2070,14 +1897,14 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
|
|
|
2070
1897
|
"onClone",
|
|
2071
1898
|
"onFilter",
|
|
2072
1899
|
"onSort"
|
|
2073
|
-
], g =
|
|
2074
|
-
return u.forEach((
|
|
1900
|
+
], g = I(this.props);
|
|
1901
|
+
return u.forEach((w) => g[w] = this.prepareOnHandlerPropAndDOM(w)), m.forEach((w) => g[w] = this.prepareOnHandlerProp(w)), {
|
|
2075
1902
|
...g,
|
|
2076
|
-
onMove: (
|
|
2077
|
-
const { onMove:
|
|
2078
|
-
if (!
|
|
2079
|
-
const
|
|
2080
|
-
return typeof
|
|
1903
|
+
onMove: (w, P) => {
|
|
1904
|
+
const { onMove: M } = this.props, k = w.willInsertAfter || -1;
|
|
1905
|
+
if (!M) return k;
|
|
1906
|
+
const B = M(w, P, this.sortable, O);
|
|
1907
|
+
return typeof B > "u" ? !1 : B;
|
|
2081
1908
|
}
|
|
2082
1909
|
};
|
|
2083
1910
|
}
|
|
@@ -2100,55 +1927,55 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
|
|
|
2100
1927
|
}
|
|
2101
1928
|
// SORTABLE DOM HANDLING
|
|
2102
1929
|
onAdd(u) {
|
|
2103
|
-
const { list: m, setList: g, clone:
|
|
1930
|
+
const { list: m, setList: g, clone: _ } = this.props, w = [
|
|
2104
1931
|
...O.dragging.props.list
|
|
2105
|
-
], P = v(u,
|
|
2106
|
-
|
|
2107
|
-
const
|
|
1932
|
+
], P = v(u, w);
|
|
1933
|
+
h(P);
|
|
1934
|
+
const M = A(P, m, u, _).map((k) => Object.assign(k, {
|
|
2108
1935
|
selected: !1
|
|
2109
1936
|
}));
|
|
2110
|
-
g(
|
|
1937
|
+
g(M, this.sortable, O);
|
|
2111
1938
|
}
|
|
2112
1939
|
onRemove(u) {
|
|
2113
|
-
const { list: m, setList: g } = this.props,
|
|
2114
|
-
f(
|
|
1940
|
+
const { list: m, setList: g } = this.props, _ = G(u), w = v(u, m);
|
|
1941
|
+
f(w);
|
|
2115
1942
|
let P = [
|
|
2116
1943
|
...m
|
|
2117
1944
|
];
|
|
2118
|
-
if (u.pullMode !== "clone") P =
|
|
1945
|
+
if (u.pullMode !== "clone") P = D(w, P);
|
|
2119
1946
|
else {
|
|
2120
|
-
let
|
|
2121
|
-
switch (
|
|
1947
|
+
let M = w;
|
|
1948
|
+
switch (_) {
|
|
2122
1949
|
case "multidrag":
|
|
2123
|
-
|
|
2124
|
-
...
|
|
2125
|
-
element: u.clones[
|
|
1950
|
+
M = w.map((k, B) => ({
|
|
1951
|
+
...k,
|
|
1952
|
+
element: u.clones[B]
|
|
2126
1953
|
}));
|
|
2127
1954
|
break;
|
|
2128
1955
|
case "normal":
|
|
2129
|
-
|
|
2130
|
-
...
|
|
1956
|
+
M = w.map((k) => ({
|
|
1957
|
+
...k,
|
|
2131
1958
|
element: u.clone
|
|
2132
1959
|
}));
|
|
2133
1960
|
break;
|
|
2134
1961
|
case "swap":
|
|
2135
1962
|
default:
|
|
2136
|
-
i
|
|
1963
|
+
r(i)(!0, `mode "${_}" cannot clone. Please remove "props.clone" from <ReactSortable/> when using the "${_}" plugin`);
|
|
2137
1964
|
}
|
|
2138
|
-
|
|
2139
|
-
const
|
|
2140
|
-
P.splice(
|
|
1965
|
+
h(M), w.forEach((k) => {
|
|
1966
|
+
const B = k.oldIndex, K = this.props.clone(k.item, u);
|
|
1967
|
+
P.splice(B, 1, K);
|
|
2141
1968
|
});
|
|
2142
1969
|
}
|
|
2143
|
-
P = P.map((
|
|
1970
|
+
P = P.map((M) => Object.assign(M, {
|
|
2144
1971
|
selected: !1
|
|
2145
1972
|
})), g(P, this.sortable, O);
|
|
2146
1973
|
}
|
|
2147
1974
|
onUpdate(u) {
|
|
2148
|
-
const { list: m, setList: g } = this.props,
|
|
2149
|
-
|
|
2150
|
-
const
|
|
2151
|
-
return g(
|
|
1975
|
+
const { list: m, setList: g } = this.props, _ = v(u, m);
|
|
1976
|
+
h(_), f(_);
|
|
1977
|
+
const w = T(_, m);
|
|
1978
|
+
return g(w, this.sortable, O);
|
|
2152
1979
|
}
|
|
2153
1980
|
onStart() {
|
|
2154
1981
|
O.dragging = this;
|
|
@@ -2157,73 +1984,73 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
|
|
|
2157
1984
|
O.dragging = null;
|
|
2158
1985
|
}
|
|
2159
1986
|
onChoose(u) {
|
|
2160
|
-
const { list: m, setList: g } = this.props,
|
|
2161
|
-
let
|
|
2162
|
-
return P === u.oldIndex && (
|
|
1987
|
+
const { list: m, setList: g } = this.props, _ = m.map((w, P) => {
|
|
1988
|
+
let M = w;
|
|
1989
|
+
return P === u.oldIndex && (M = Object.assign(w, {
|
|
2163
1990
|
chosen: !0
|
|
2164
|
-
})),
|
|
1991
|
+
})), M;
|
|
2165
1992
|
});
|
|
2166
|
-
g(
|
|
1993
|
+
g(_, this.sortable, O);
|
|
2167
1994
|
}
|
|
2168
1995
|
onUnchoose(u) {
|
|
2169
|
-
const { list: m, setList: g } = this.props,
|
|
2170
|
-
let
|
|
2171
|
-
return P === u.oldIndex && (
|
|
1996
|
+
const { list: m, setList: g } = this.props, _ = m.map((w, P) => {
|
|
1997
|
+
let M = w;
|
|
1998
|
+
return P === u.oldIndex && (M = Object.assign(M, {
|
|
2172
1999
|
chosen: !1
|
|
2173
|
-
})),
|
|
2000
|
+
})), M;
|
|
2174
2001
|
});
|
|
2175
|
-
g(
|
|
2002
|
+
g(_, this.sortable, O);
|
|
2176
2003
|
}
|
|
2177
2004
|
onSpill(u) {
|
|
2178
2005
|
const { removeOnSpill: m, revertOnSpill: g } = this.props;
|
|
2179
|
-
m && !g &&
|
|
2006
|
+
m && !g && s(u.item);
|
|
2180
2007
|
}
|
|
2181
2008
|
onSelect(u) {
|
|
2182
|
-
const { list: m, setList: g } = this.props,
|
|
2009
|
+
const { list: m, setList: g } = this.props, _ = m.map((w) => Object.assign(w, {
|
|
2183
2010
|
selected: !1
|
|
2184
2011
|
}));
|
|
2185
|
-
u.newIndicies.forEach((
|
|
2186
|
-
const P =
|
|
2012
|
+
u.newIndicies.forEach((w) => {
|
|
2013
|
+
const P = w.index;
|
|
2187
2014
|
if (P === -1) {
|
|
2188
|
-
console.log(`"${u.type}" had indice of "${
|
|
2015
|
+
console.log(`"${u.type}" had indice of "${w.index}", which is probably -1 and doesn't usually happen here.`), console.log(u);
|
|
2189
2016
|
return;
|
|
2190
2017
|
}
|
|
2191
|
-
|
|
2192
|
-
}), g(
|
|
2018
|
+
_[P].selected = !0;
|
|
2019
|
+
}), g(_, this.sortable, O);
|
|
2193
2020
|
}
|
|
2194
2021
|
onDeselect(u) {
|
|
2195
|
-
const { list: m, setList: g } = this.props,
|
|
2022
|
+
const { list: m, setList: g } = this.props, _ = m.map((w) => Object.assign(w, {
|
|
2196
2023
|
selected: !1
|
|
2197
2024
|
}));
|
|
2198
|
-
u.newIndicies.forEach((
|
|
2199
|
-
const P =
|
|
2200
|
-
P !== -1 && (
|
|
2201
|
-
}), g(
|
|
2025
|
+
u.newIndicies.forEach((w) => {
|
|
2026
|
+
const P = w.index;
|
|
2027
|
+
P !== -1 && (_[P].selected = !0);
|
|
2028
|
+
}), g(_, this.sortable, O);
|
|
2202
2029
|
}
|
|
2203
2030
|
}
|
|
2204
2031
|
/* eslint-disable-next-line */
|
|
2205
|
-
|
|
2032
|
+
At(X, "defaultProps", {
|
|
2206
2033
|
clone: (u) => u
|
|
2207
2034
|
});
|
|
2208
2035
|
var ie = {};
|
|
2209
|
-
|
|
2210
|
-
})(
|
|
2211
|
-
var
|
|
2212
|
-
const
|
|
2213
|
-
const { actions: e } =
|
|
2214
|
-
return /* @__PURE__ */
|
|
2215
|
-
|
|
2036
|
+
l(o.exports, ie);
|
|
2037
|
+
})(Bt);
|
|
2038
|
+
var to = Bt.exports;
|
|
2039
|
+
const go = (o) => {
|
|
2040
|
+
const { actions: e } = un(o);
|
|
2041
|
+
return /* @__PURE__ */ Ge(dn, { sx: o.sx, children: /* @__PURE__ */ Ge(
|
|
2042
|
+
to.ReactSortable,
|
|
2216
2043
|
{
|
|
2217
|
-
list:
|
|
2044
|
+
list: o.items,
|
|
2218
2045
|
setList: e.handleSetList,
|
|
2219
|
-
disabled:
|
|
2220
|
-
children:
|
|
2221
|
-
|
|
2046
|
+
disabled: o.disabled,
|
|
2047
|
+
children: o.items.map((t) => /* @__PURE__ */ Ge(
|
|
2048
|
+
fn,
|
|
2222
2049
|
{
|
|
2223
2050
|
selected: t.selected,
|
|
2224
2051
|
onClick: e.handleClick(t),
|
|
2225
|
-
children: /* @__PURE__ */
|
|
2226
|
-
|
|
2052
|
+
children: /* @__PURE__ */ Ge(
|
|
2053
|
+
sn,
|
|
2227
2054
|
{
|
|
2228
2055
|
title: t.name,
|
|
2229
2056
|
avatar: t.icon,
|
|
@@ -2241,5 +2068,5 @@ const Fo = (n) => {
|
|
|
2241
2068
|
) });
|
|
2242
2069
|
};
|
|
2243
2070
|
export {
|
|
2244
|
-
|
|
2071
|
+
go as SortableList
|
|
2245
2072
|
};
|