fluid-dnd 1.2.1-beta.0 → 1.3.0-beta.0
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/{HandlerPublisher-CIc7wXW-.js → HandlerPublisher-D01uHwrp.js} +1 -1
- package/dist/{HandlerPublisher-DiGO5iOY.cjs → HandlerPublisher-rYH-wwka.cjs} +1 -1
- package/dist/index/index.cjs +1 -1
- package/dist/index/index.mjs +1 -1
- package/dist/index-D7zMRS0J.cjs +1 -0
- package/dist/{index-BDu6-Hq8.js → index-DFUAc_q_.js} +385 -380
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.mjs +2 -2
- package/dist/svelte/index.cjs +1 -1
- package/dist/svelte/index.mjs +2 -2
- package/dist/vue/index.cjs +1 -1
- package/dist/vue/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/index-Tde6DOzb.cjs +0 -1
@@ -1,30 +1,30 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var k = (t, e, n) =>
|
4
|
-
const Q = "draggable", It = "droppable", Ot = "handler-class", qt = "dragging", Yt = "dragging-handler-class",
|
1
|
+
var be = Object.defineProperty;
|
2
|
+
var Te = (t, e, n) => e in t ? be(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
3
|
+
var k = (t, e, n) => Te(t, typeof e != "symbol" ? e + "" : e, n);
|
4
|
+
const Q = "draggable", It = "droppable", Ot = "handler-class", qt = "dragging", Yt = "dragging-handler-class", Xt = "dropping", se = "grabbing", Ee = "grab", Jt = "disable-transition", et = (t, e) => t.classList.contains(e), Tt = (t, e, n = !1) => {
|
5
5
|
t.classList.toggle(e, n);
|
6
6
|
}, nt = (t, e) => {
|
7
7
|
t.classList.add(e);
|
8
|
-
},
|
8
|
+
}, yt = (t, e) => {
|
9
9
|
t.classList.remove(e);
|
10
|
-
},
|
10
|
+
}, Ce = (t, e) => At(e).every(
|
11
11
|
(n) => et(t, n)
|
12
|
-
), gt = (t) => t ? `.${
|
12
|
+
), gt = (t) => t ? `.${At(t).join(".")}` : "", ye = (t, e) => {
|
13
13
|
if (!e)
|
14
14
|
return;
|
15
|
-
const n =
|
15
|
+
const n = At(e);
|
16
16
|
t.classList.add(...n);
|
17
|
-
},
|
17
|
+
}, At = (t) => t ? t.split(" ").filter((e) => e) : [], _ = "horizontal", U = "vertical", Ae = () => {
|
18
18
|
const { scrollX: t, scrollY: e } = window;
|
19
19
|
return { scrollX: t, scrollY: e };
|
20
|
-
}, zt = (t) => !t || t.trim().length == 0 || t == "normal" ? 0 : parseFloat(t),
|
20
|
+
}, zt = (t) => !t || t.trim().length == 0 || t == "normal" ? 0 : parseFloat(t), xe = (t) => t ? parseInt(t) : -1, we = (t) => {
|
21
21
|
const e = getComputedStyle(t), n = new DOMMatrixReadOnly(e.transform);
|
22
22
|
return {
|
23
23
|
x: n.m41,
|
24
24
|
y: n.m42
|
25
25
|
};
|
26
|
-
}, oe = (t, e) => t.x1 > e.x1 ? oe(e, t) : t.x2 < e.x1 ? 0 : t.x2 >= e.x2 ? t.x2 - t.x1 : t.x2 - e.x1, pt = (t, e) => !
|
27
|
-
const n =
|
26
|
+
}, oe = (t, e) => t.x1 > e.x1 ? oe(e, t) : t.x2 < e.x1 ? 0 : t.x2 >= e.x2 ? t.x2 - t.x1 : t.x2 - e.x1, pt = (t, e) => !Be(t, e), Be = (t, e) => {
|
27
|
+
const n = Lt(t), s = Lt(e), o = Kt(n, s, U), r = Kt(n, s, _);
|
28
28
|
return o >= Math.min(n.height, s.height) / 2 && r >= Math.min(n.width, s.width) / 2;
|
29
29
|
}, Kt = (t, e, n) => {
|
30
30
|
const { before: s, distance: o } = w(n);
|
@@ -38,10 +38,10 @@ const Q = "draggable", It = "droppable", Ot = "handler-class", qt = "dragging",
|
|
38
38
|
x2: e[s] + e[o]
|
39
39
|
}
|
40
40
|
);
|
41
|
-
},
|
41
|
+
}, L = (t, e) => t ? zt(getComputedStyle(t)[e]) : 0, Qt = (t) => {
|
42
42
|
const { scrollLeft: e, scrollTop: n } = t;
|
43
43
|
return { scrollLeft: e, scrollTop: n };
|
44
|
-
},
|
44
|
+
}, Lt = (t) => t.getBoundingClientRect(), w = (t) => {
|
45
45
|
const e = t == _;
|
46
46
|
return {
|
47
47
|
beforeMargin: e ? "marginLeft" : "marginTop",
|
@@ -61,11 +61,11 @@ const Q = "draggable", It = "droppable", Ot = "handler-class", qt = "dragging",
|
|
61
61
|
scrollDistance: e ? "scrollWidth" : "scrollHeight",
|
62
62
|
clientDistance: e ? "clientWidth" : "clientHeight",
|
63
63
|
paddingBefore: e ? "paddingLeft" : "paddingTop",
|
64
|
-
getRect:
|
64
|
+
getRect: Lt
|
65
65
|
};
|
66
|
-
},
|
66
|
+
}, Bt = (t, e) => Re(t, e), re = (t) => [...t.children].filter(
|
67
67
|
(n) => et(n, Q)
|
68
|
-
),
|
68
|
+
), Re = (t, e) => {
|
69
69
|
const n = [...e.children].filter(
|
70
70
|
(o) => et(o, Q) && !o.isEqualNode(t)
|
71
71
|
).toReversed(), s = [...e.children].findLastIndex(
|
@@ -76,7 +76,7 @@ const Q = "draggable", It = "droppable", Ot = "handler-class", qt = "dragging",
|
|
76
76
|
s,
|
77
77
|
e
|
78
78
|
];
|
79
|
-
},
|
79
|
+
}, Oe = (t) => {
|
80
80
|
let e = t.parentElement;
|
81
81
|
for (; e; ) {
|
82
82
|
if (window.getComputedStyle(e).position === "fixed")
|
@@ -88,13 +88,13 @@ const Q = "draggable", It = "droppable", Ot = "handler-class", qt = "dragging",
|
|
88
88
|
const {
|
89
89
|
before: n,
|
90
90
|
borderBeforeWidth: s
|
91
|
-
} = w(e), o =
|
92
|
-
return o ?
|
93
|
-
},
|
91
|
+
} = w(e), o = Oe(t);
|
92
|
+
return o ? Lt(o)[n] + L(o, s) : 0;
|
93
|
+
}, Wt = (t) => window.TouchEvent && t instanceof TouchEvent, rt = (t) => t instanceof HTMLElement, ce = (t) => t instanceof MouseEvent, Le = ["onmouseup", "onmousedown", "onmousemove"], Me = (t, e, n) => {
|
94
94
|
t && (t.style.height = `${e}px`, t.style.width = `${n}px`);
|
95
|
-
},
|
96
|
-
!t || !
|
97
|
-
},
|
95
|
+
}, Et = (t, e, n) => {
|
96
|
+
!t || !rt(t) || (n == 0 && e == 0 ? t.style.transform = "" : t.style.transform = `translate(${n}px,${e}px)`);
|
97
|
+
}, Ne = (t, e, n) => {
|
98
98
|
t[e] = (s) => {
|
99
99
|
if (s.defaultPrevented)
|
100
100
|
return;
|
@@ -102,8 +102,8 @@ const Q = "draggable", It = "droppable", Ot = "handler-class", qt = "dragging",
|
|
102
102
|
n(o);
|
103
103
|
};
|
104
104
|
}, $t = (t, e, n) => {
|
105
|
-
n && (
|
106
|
-
},
|
105
|
+
n && (Fe(e) ? t[e] = n : Ne(t, e, n));
|
106
|
+
}, Fe = (t) => Le.includes(t), Pe = (t) => {
|
107
107
|
const { target: e } = t;
|
108
108
|
return {
|
109
109
|
clientX: 0,
|
@@ -116,8 +116,8 @@ const Q = "draggable", It = "droppable", Ot = "handler-class", qt = "dragging",
|
|
116
116
|
offsetX: 0,
|
117
117
|
offsetY: 0
|
118
118
|
};
|
119
|
-
},
|
120
|
-
const n = (s, o) =>
|
119
|
+
}, $e = (t, e) => {
|
120
|
+
const n = (s, o) => Ie(e, window, o, s);
|
121
121
|
if (ce(t)) {
|
122
122
|
const { offsetX: s, offsetY: o } = t;
|
123
123
|
return [s, o];
|
@@ -129,43 +129,43 @@ const Q = "draggable", It = "droppable", Ot = "handler-class", qt = "dragging",
|
|
129
129
|
];
|
130
130
|
}
|
131
131
|
}, Vt = (t) => {
|
132
|
-
const e =
|
132
|
+
const e = Ge(t);
|
133
133
|
if (!e)
|
134
|
-
return
|
135
|
-
const [n, s] =
|
134
|
+
return Pe(t);
|
135
|
+
const [n, s] = $e(t, e), { clientX: o, clientY: r, pageX: a, pageY: l, screenX: u, screenY: g, target: m } = e;
|
136
136
|
return {
|
137
137
|
clientX: o,
|
138
138
|
clientY: r,
|
139
139
|
pageX: a,
|
140
140
|
pageY: l,
|
141
141
|
screenX: u,
|
142
|
-
screenY:
|
142
|
+
screenY: g,
|
143
143
|
target: m,
|
144
144
|
offsetX: n,
|
145
145
|
offsetY: s
|
146
146
|
};
|
147
|
-
},
|
148
|
-
if (
|
147
|
+
}, Ge = (t) => {
|
148
|
+
if (Wt(t))
|
149
149
|
return t.touches[0] ?? t.changedTouches[0];
|
150
150
|
if (ce(t))
|
151
151
|
return t;
|
152
|
-
},
|
153
|
-
const { page: o, scroll: r, before: a, borderBeforeWidth: l, getRect: u } = w(n),
|
154
|
-
return t[o] - e[r] -
|
155
|
-
},
|
156
|
-
|
152
|
+
}, Ie = (t, e, n, s) => {
|
153
|
+
const { page: o, scroll: r, before: a, borderBeforeWidth: l, getRect: u } = w(n), g = u(s);
|
154
|
+
return t[o] - e[r] - g[a] - L(s, l);
|
155
|
+
}, Nt = (t, e, n = "ease-out", s = "transform") => {
|
156
|
+
rt(t) && (t.style.transitionDuration = `${e}ms`, t.style.transitionTimingFunction = `${n}`, t.style.transitionProperty = `${s}`);
|
157
157
|
}, ae = (t, e, n) => {
|
158
|
-
!t || !
|
158
|
+
!t || !rt(t) || (t[e] = () => {
|
159
159
|
n();
|
160
160
|
});
|
161
|
-
},
|
161
|
+
}, Ye = (t) => {
|
162
162
|
var e = t.querySelector("style");
|
163
163
|
if (!e) {
|
164
164
|
var n = document.createElement("style");
|
165
165
|
return t.appendChild(n), n;
|
166
166
|
}
|
167
167
|
return e;
|
168
|
-
},
|
168
|
+
}, Xe = (t, e) => {
|
169
169
|
const n = /\.-?[_a-zA-Z0-9-*\s<>():]+/g, [s] = e.match(n) || [];
|
170
170
|
for (const o of t.cssRules) {
|
171
171
|
const [r] = o.cssText.match(n) || [];
|
@@ -173,20 +173,20 @@ const Q = "draggable", It = "droppable", Ot = "handler-class", qt = "dragging",
|
|
173
173
|
return !0;
|
174
174
|
}
|
175
175
|
return !1;
|
176
|
-
},
|
176
|
+
}, We = (t, e) => {
|
177
177
|
e.forEach((n) => {
|
178
|
-
|
178
|
+
Ve(t, n);
|
179
179
|
});
|
180
|
-
},
|
180
|
+
}, Ve = (t, e) => {
|
181
181
|
var s;
|
182
|
-
var n =
|
183
|
-
n.sheet && (
|
182
|
+
var n = Ye(t);
|
183
|
+
n.sheet && (Xe(n.sheet, e) || (s = n.sheet) == null || s.insertRule(e, n.sheet.cssRules.length));
|
184
184
|
}, le = (t, e = {}) => {
|
185
185
|
for (const n of Object.keys(e)) {
|
186
186
|
const s = e[n];
|
187
|
-
s != null &&
|
187
|
+
s != null && _e(t, `--${n}`, s);
|
188
188
|
}
|
189
|
-
},
|
189
|
+
}, _e = (t, e, n) => t && t.style.setProperty(e, n), ue = "startDrag", Mt = "drag", jt = "startDrop", He = "drop", at = "temp-child", fe = "cubic-bezier(0.2, 0, 0, 1)", qe = (t) => t === He || t === jt, _t = (t) => !t || t.length == 0 ? 0 : zt(t.replace("px", "")), ze = (t, e) => {
|
190
190
|
const n = getComputedStyle(t)[e];
|
191
191
|
if (n.match("%")) {
|
192
192
|
const o = zt(n.replace("%", "")), { width: r } = t.getBoundingClientRect();
|
@@ -199,161 +199,161 @@ const Q = "draggable", It = "droppable", Ot = "handler-class", qt = "dragging",
|
|
199
199
|
0,
|
200
200
|
!1
|
201
201
|
];
|
202
|
-
const n =
|
202
|
+
const n = ze(t, e), s = getComputedStyle(t).display, o = n > 0 || s === "flex";
|
203
203
|
return [n, o];
|
204
|
-
},
|
204
|
+
}, je = (t) => {
|
205
205
|
const { top: e, left: n } = getComputedStyle(t);
|
206
206
|
return [_t(e), _t(n)];
|
207
|
-
},
|
207
|
+
}, ke = (t, e) => {
|
208
208
|
const { gap: n } = w(e), [s, o] = kt(t, n);
|
209
209
|
return o ? s : 0;
|
210
210
|
};
|
211
|
-
function
|
212
|
-
let { height: a, width: l } =
|
211
|
+
function Ct(t, e, n, s, o = t.previousElementSibling, r = t.nextElementSibling) {
|
212
|
+
let { height: a, width: l } = Ze(
|
213
213
|
n,
|
214
214
|
t,
|
215
215
|
o,
|
216
216
|
r
|
217
217
|
);
|
218
|
-
return pt(t, s) && e ==
|
218
|
+
return pt(t, s) && e == Mt && (a = 0, l = 0), { height: a, width: l };
|
219
219
|
}
|
220
|
-
const
|
220
|
+
const Ze = (t, e, n, s) => {
|
221
221
|
const {
|
222
222
|
afterMargin: o,
|
223
223
|
beforeMargin: r,
|
224
224
|
distance: a,
|
225
225
|
gap: l,
|
226
226
|
getRect: u
|
227
|
-
} = w(t),
|
227
|
+
} = w(t), g = L(e, o), m = L(e, r), D = L(s, r), [B, M] = kt(
|
228
228
|
e.parentElement,
|
229
229
|
l
|
230
230
|
), F = u(e)[a];
|
231
231
|
if (M)
|
232
|
-
return Ut(F, m,
|
233
|
-
const [C, p,
|
232
|
+
return Ut(F, m, g, B, 0, t);
|
233
|
+
const [C, p, b] = Je(
|
234
234
|
n,
|
235
|
-
|
236
|
-
|
235
|
+
D,
|
236
|
+
g,
|
237
237
|
m,
|
238
238
|
o
|
239
239
|
);
|
240
|
-
return Ut(F, p, C, 0,
|
241
|
-
},
|
240
|
+
return Ut(F, p, C, 0, b, t);
|
241
|
+
}, Je = (t, e, n, s, o) => {
|
242
242
|
const r = Math.max(e, n);
|
243
243
|
let a = s, l = e;
|
244
244
|
if (t) {
|
245
|
-
const u =
|
245
|
+
const u = L(
|
246
246
|
t,
|
247
247
|
o
|
248
248
|
);
|
249
249
|
a = Math.max(u, s), l = Math.max(l, u);
|
250
250
|
}
|
251
251
|
return [r, a, l];
|
252
|
-
}, Ut = (t, e, n, s, o, r) =>
|
252
|
+
}, Ut = (t, e, n, s, o, r) => Ke(r, t + e + n + s - o), Ke = (t, e) => t == _ ? { width: e, height: 0 } : { width: 0, height: e }, te = (t, e) => {
|
253
253
|
const {
|
254
254
|
borderBeforeWidth: n,
|
255
255
|
paddingBefore: s,
|
256
256
|
axis: o,
|
257
257
|
getRect: r
|
258
|
-
} = w(t), a =
|
258
|
+
} = w(t), a = L(e, n), l = L(e, s), u = r(e)[o];
|
259
259
|
return a + l + u;
|
260
|
-
},
|
261
|
-
const [n, s] =
|
260
|
+
}, Qe = (t, e) => {
|
261
|
+
const [n, s] = je(e), o = te(U, t);
|
262
262
|
return [
|
263
263
|
te(_, t) - s,
|
264
264
|
o - n
|
265
265
|
];
|
266
266
|
};
|
267
|
-
function
|
268
|
-
let
|
269
|
-
const
|
270
|
-
if (n === s && !
|
267
|
+
function Ue(t, e, n, s, o, r, a, l, u) {
|
268
|
+
let g = 0, m = 0;
|
269
|
+
const D = !!(n < 0 && u);
|
270
|
+
if (n === s && !D)
|
271
271
|
return ee(
|
272
|
-
{ height:
|
272
|
+
{ height: g, width: m },
|
273
273
|
t,
|
274
274
|
o,
|
275
275
|
a,
|
276
|
-
|
276
|
+
D
|
277
277
|
);
|
278
|
-
const [B, M, F, C] =
|
279
|
-
if (
|
280
|
-
const [tt, ot] =
|
281
|
-
|
278
|
+
const [B, M, F, C] = nn(e, n, s, u);
|
279
|
+
if (D) {
|
280
|
+
const [tt, ot] = Qe(l, u);
|
281
|
+
g += ot, m += tt;
|
282
282
|
}
|
283
283
|
const {
|
284
284
|
scrollElement: p,
|
285
|
-
beforeMargin:
|
285
|
+
beforeMargin: b,
|
286
286
|
afterMargin: R,
|
287
|
-
distance:
|
287
|
+
distance: O,
|
288
288
|
gap: Y
|
289
|
-
} = w(t), [
|
289
|
+
} = w(t), [X, $] = kt(l, Y), [
|
290
290
|
st,
|
291
291
|
H,
|
292
292
|
P
|
293
|
-
] =
|
294
|
-
|
293
|
+
] = on(
|
294
|
+
b,
|
295
295
|
R,
|
296
296
|
B,
|
297
297
|
M == null ? void 0 : M.previousElementSibling,
|
298
298
|
C,
|
299
299
|
$,
|
300
|
-
|
301
|
-
), [Z, q, z] =
|
302
|
-
|
300
|
+
D
|
301
|
+
), [Z, q, z] = sn(
|
302
|
+
b,
|
303
303
|
R,
|
304
|
-
|
304
|
+
O,
|
305
305
|
F,
|
306
|
-
|
306
|
+
X,
|
307
307
|
$
|
308
|
-
),
|
308
|
+
), W = en(
|
309
309
|
q,
|
310
310
|
Z,
|
311
311
|
z,
|
312
312
|
H,
|
313
313
|
st,
|
314
|
-
|
315
|
-
), j =
|
316
|
-
return t === U ?
|
317
|
-
{ height:
|
314
|
+
X
|
315
|
+
), j = D ? l[p] : tn(p, l, r), G = (C ? W - P : P - W) - j;
|
316
|
+
return t === U ? g += G : t === _ && (m += G), ee(
|
317
|
+
{ height: g, width: m },
|
318
318
|
t,
|
319
319
|
o,
|
320
320
|
a,
|
321
|
-
|
321
|
+
D
|
322
322
|
);
|
323
323
|
}
|
324
|
-
const
|
324
|
+
const tn = (t, e, n) => {
|
325
325
|
const s = e[t], o = n[t];
|
326
326
|
return s - o;
|
327
|
-
},
|
327
|
+
}, en = (t, e, n, s, o, r) => {
|
328
328
|
const a = Math.max(e, o);
|
329
329
|
return Math.max(n, s) + t + a + r;
|
330
|
-
},
|
330
|
+
}, nn = (t, e, n, s) => {
|
331
331
|
const o = e < n, [r, a] = [e, n].toSorted(
|
332
|
-
(m,
|
332
|
+
(m, D) => m - D
|
333
333
|
), l = t[e] ?? s, u = t[n];
|
334
|
-
let
|
335
|
-
return r < 0 && s && (
|
334
|
+
let g = o ? t.slice(r + 1, a + 1) : t.slice(r, a);
|
335
|
+
return r < 0 && s && (g = t.slice(r + 1, a)), [
|
336
336
|
l,
|
337
337
|
u,
|
338
|
-
|
338
|
+
g,
|
339
339
|
o
|
340
340
|
];
|
341
|
-
},
|
341
|
+
}, sn = (t, e, n, s, o, r) => {
|
342
342
|
if (s.length == 0)
|
343
343
|
return [0, 0, 0];
|
344
|
-
const a =
|
344
|
+
const a = L(s[0], t);
|
345
345
|
let l = 0, u = -a;
|
346
|
-
for (const [
|
347
|
-
const
|
348
|
-
r && (l += B), r &&
|
346
|
+
for (const [g, m] of s.entries()) {
|
347
|
+
const D = m.getBoundingClientRect()[n], B = L(m, t);
|
348
|
+
r && (l += B), r && g > 0 ? l += o : l = Math.max(l, B), u += l + D, l = L(m, e);
|
349
349
|
}
|
350
350
|
return [a, u, l];
|
351
351
|
}, ee = (t, e, n, s, o) => {
|
352
|
-
const { scroll: r, distance: a } = w(e), l = window[r], u = n[r],
|
353
|
-
return t[a] +=
|
354
|
-
},
|
352
|
+
const { scroll: r, distance: a } = w(e), l = window[r], u = n[r], g = o ? 0 : u - 2 * l + s[r];
|
353
|
+
return t[a] += g, t;
|
354
|
+
}, on = (t, e, n, s, o, r, a) => {
|
355
355
|
const l = o ? n.previousElementSibling : s;
|
356
|
-
return
|
356
|
+
return rn(
|
357
357
|
t,
|
358
358
|
e,
|
359
359
|
l,
|
@@ -361,13 +361,13 @@ const Qe = (t, e, n) => {
|
|
361
361
|
r,
|
362
362
|
a
|
363
363
|
);
|
364
|
-
},
|
364
|
+
}, rn = (t, e, n, s, o, r) => {
|
365
365
|
if (o)
|
366
366
|
return [0, 0, 0];
|
367
|
-
const a =
|
367
|
+
const a = L(
|
368
368
|
r ? null : n,
|
369
369
|
e
|
370
|
-
), l =
|
370
|
+
), l = L(s, t);
|
371
371
|
let u = Math.max(a, l);
|
372
372
|
return [a, l, u];
|
373
373
|
}, Zt = (t, e, n, s = () => !0) => {
|
@@ -378,81 +378,81 @@ const Qe = (t, e, n) => {
|
|
378
378
|
}
|
379
379
|
});
|
380
380
|
return o.observe(e, n), o;
|
381
|
-
},
|
381
|
+
}, cn = (t, e, n) => {
|
382
382
|
n != 0 && (e === "vertical" ? t.scrollBy(0, n) : t.scrollBy(n, 0));
|
383
|
-
},
|
383
|
+
}, an = (t, e, n) => {
|
384
384
|
const { scrollDistance: s, clientDistance: o, scrollElement: r } = w(t);
|
385
385
|
return n[r] / (e[s] - e[o]);
|
386
|
-
},
|
387
|
-
let s =
|
386
|
+
}, ln = "startDrag", de = "cubic-bezier(0.2, 0, 0, 1)", ge = 50, Ht = (t) => rt(t) ? t.classList.contains(at) : !1, un = (t, e, n) => {
|
387
|
+
let s = Ct(
|
388
388
|
e,
|
389
|
-
|
389
|
+
ln,
|
390
390
|
n,
|
391
391
|
t
|
392
392
|
);
|
393
|
-
const o =
|
393
|
+
const o = ke(t, n), { distance: r } = w(n);
|
394
394
|
s[r] -= o;
|
395
|
-
const [a, l] =
|
395
|
+
const [a, l] = fn(n, e);
|
396
396
|
return s[l] = a, s;
|
397
|
-
},
|
397
|
+
}, fn = (t, e) => {
|
398
398
|
const n = t == _ ? U : _, { distance: s, getRect: o } = w(n);
|
399
399
|
return [
|
400
400
|
o(e)[s],
|
401
401
|
s
|
402
402
|
];
|
403
403
|
}, ht = (t, e, n) => {
|
404
|
-
|
405
|
-
},
|
404
|
+
Me(t, e, n), t.style.minWidth = `${n}px`;
|
405
|
+
}, dn = (t, e, n) => (s) => {
|
406
406
|
e.contains(t) && (ht(t, n.height, n.width), s.disconnect());
|
407
|
-
},
|
407
|
+
}, gn = (t, e) => {
|
408
408
|
if (!e)
|
409
409
|
return;
|
410
|
-
const { droppable: n, config: s, scroll: o } = t, { direction: r } = s, a =
|
411
|
-
a && (n[
|
410
|
+
const { droppable: n, config: s, scroll: o } = t, { direction: r } = s, a = an(s.direction, n, o) > 0.99, { scrollDistance: l, clientDistance: u, scrollElement: g } = w(r);
|
411
|
+
a && (n[g] = n[l] - n[u]);
|
412
412
|
}, pe = (t, e, n, s) => {
|
413
413
|
if (!n)
|
414
414
|
return;
|
415
415
|
const { droppable: o, config: r } = n, { direction: a, animationDuration: l } = r;
|
416
|
-
if (
|
416
|
+
if (gn(n, e), o.querySelector(`.${at}`) || !t)
|
417
417
|
return;
|
418
|
-
var u = t.tagName == "LI" ? "DIV" : t.tagName,
|
419
|
-
nt(
|
420
|
-
const m =
|
421
|
-
return
|
422
|
-
|
418
|
+
var u = t.tagName == "LI" ? "DIV" : t.tagName, g = document.createElement(u);
|
419
|
+
nt(g, at), ht(g, 0, 0);
|
420
|
+
const m = un(o, t, a);
|
421
|
+
return Nt(
|
422
|
+
g,
|
423
423
|
l,
|
424
424
|
de,
|
425
425
|
"width, min-width, height"
|
426
|
-
), [
|
426
|
+
), [g, m, o];
|
427
427
|
}, Gt = (t, e, n, s, o) => {
|
428
428
|
const r = pe(t, n, s);
|
429
429
|
if (!r)
|
430
430
|
return;
|
431
431
|
const [a, l, u] = r;
|
432
432
|
e.isSameNode(u) && ht(a, l.height, l.width), Zt(
|
433
|
-
|
433
|
+
dn(a, u, l),
|
434
434
|
u,
|
435
435
|
{
|
436
436
|
childList: !0,
|
437
437
|
subtree: !0
|
438
438
|
}
|
439
439
|
), u.appendChild(a);
|
440
|
-
},
|
440
|
+
}, pn = (t, e, n) => {
|
441
441
|
const s = pe(t, e, n);
|
442
442
|
if (!s)
|
443
443
|
return;
|
444
444
|
const [o, r, a] = s;
|
445
|
-
a.appendChild(o),
|
446
|
-
},
|
445
|
+
a.appendChild(o), hn(o, r);
|
446
|
+
}, hn = (t, e) => requestAnimationFrame(() => {
|
447
447
|
ht(t, e.height, e.width), requestAnimationFrame(() => {
|
448
|
-
|
448
|
+
Nt(
|
449
449
|
t,
|
450
450
|
0,
|
451
451
|
de,
|
452
452
|
"width, min-width, height"
|
453
453
|
);
|
454
454
|
});
|
455
|
-
}),
|
455
|
+
}), mn = (t, e, n, s, o = !0) => {
|
456
456
|
if (n) {
|
457
457
|
var r = document.querySelectorAll(
|
458
458
|
`${gt(n)} > .${at}`
|
@@ -462,12 +462,12 @@ const Qe = (t, e, n) => {
|
|
462
462
|
if (l != null && l.isSameNode(e) || !o && (l != null && l.isSameNode(t)))
|
463
463
|
return;
|
464
464
|
ht(a, 0, 0), setTimeout(() => {
|
465
|
-
var
|
466
|
-
(
|
465
|
+
var g;
|
466
|
+
(g = a.parentNode) == null || g.removeChild(a);
|
467
467
|
}, s + ge);
|
468
468
|
});
|
469
469
|
}
|
470
|
-
},
|
470
|
+
}, bt = (t, e, n = !1) => {
|
471
471
|
var s = t.querySelectorAll(`.${at}`);
|
472
472
|
s.forEach((o) => {
|
473
473
|
const r = o;
|
@@ -475,60 +475,60 @@ const Qe = (t, e, n) => {
|
|
475
475
|
t.contains(r) && t.removeChild(r);
|
476
476
|
}, e + ge)) : t.removeChild(o);
|
477
477
|
});
|
478
|
-
},
|
479
|
-
function
|
478
|
+
}, Sn = 50;
|
479
|
+
function vn(t, e, n, s, o, r) {
|
480
480
|
let a = e;
|
481
481
|
const {
|
482
482
|
direction: l,
|
483
483
|
handlerSelector: u,
|
484
|
-
onRemoveAtEvent:
|
484
|
+
onRemoveAtEvent: g,
|
485
485
|
animationDuration: m,
|
486
|
-
delayBeforeInsert:
|
486
|
+
delayBeforeInsert: D,
|
487
487
|
draggingClass: B
|
488
488
|
} = t, M = (i, f, h, S, y) => {
|
489
489
|
if (!S)
|
490
490
|
return;
|
491
|
-
const { droppable:
|
491
|
+
const { droppable: v, config: T } = S, A = Ct(
|
492
492
|
i,
|
493
493
|
f,
|
494
494
|
T.direction,
|
495
|
-
|
495
|
+
v
|
496
496
|
);
|
497
|
-
|
497
|
+
qe(f) ? $(
|
498
498
|
i,
|
499
499
|
f,
|
500
500
|
A,
|
501
501
|
h,
|
502
502
|
S,
|
503
503
|
y
|
504
|
-
) :
|
504
|
+
) : b(
|
505
505
|
i,
|
506
506
|
f,
|
507
507
|
A,
|
508
508
|
S
|
509
509
|
);
|
510
510
|
}, F = (i, f, h, S, y) => {
|
511
|
-
const
|
511
|
+
const v = Ct(
|
512
512
|
f,
|
513
513
|
"insert",
|
514
514
|
t.direction,
|
515
515
|
h
|
516
516
|
), { onInsertEvent: T } = t, A = re(h);
|
517
517
|
for (const [N, x] of A.entries())
|
518
|
-
et(x, Q) && N >= i &&
|
518
|
+
et(x, Q) && N >= i && X(x, v);
|
519
519
|
y(), setTimeout(() => {
|
520
|
-
T(i, S), he(i, h, t), tt(f), V(f, n),
|
521
|
-
},
|
520
|
+
T(i, S), he(i, h, t), tt(f), V(f, n), bt(n, 0, !0);
|
521
|
+
}, D);
|
522
522
|
}, C = (i, f, h, S) => {
|
523
523
|
if (!h || !h.droppable || !h.config)
|
524
524
|
return;
|
525
|
-
const { droppable: y, config:
|
526
|
-
let [T] =
|
525
|
+
const { droppable: y, config: v } = h;
|
526
|
+
let [T] = Bt(f, y);
|
527
527
|
T = [f, ...T].toReversed();
|
528
|
-
const A =
|
528
|
+
const A = Ct(
|
529
529
|
f,
|
530
530
|
"remove",
|
531
|
-
|
531
|
+
v.direction,
|
532
532
|
y
|
533
533
|
);
|
534
534
|
for (const [N, x] of T.entries())
|
@@ -536,12 +536,12 @@ function mn(t, e, n, s, o, r) {
|
|
536
536
|
S(x);
|
537
537
|
}, m));
|
538
538
|
}, p = (i) => {
|
539
|
-
|
539
|
+
bt(n, m, !0), setTimeout(() => {
|
540
540
|
tt(i), V(i, n);
|
541
541
|
}, m);
|
542
|
-
},
|
543
|
-
const { config: y, droppable:
|
544
|
-
T.length == 0 &&
|
542
|
+
}, b = (i, f, h, S) => {
|
543
|
+
const { config: y, droppable: v } = S, [T] = Bt(i, v), A = pt(i, v);
|
544
|
+
T.length == 0 && O(
|
545
545
|
h,
|
546
546
|
1,
|
547
547
|
y.direction,
|
@@ -561,40 +561,40 @@ function mn(t, e, n, s, o, r) {
|
|
561
561
|
else if (!A)
|
562
562
|
continue;
|
563
563
|
const J = T.length - N;
|
564
|
-
|
564
|
+
O(
|
565
565
|
h,
|
566
566
|
J,
|
567
567
|
y.direction,
|
568
568
|
T
|
569
|
-
), f === ue ? Y(x, h) : f ===
|
569
|
+
), f === ue ? Y(x, h) : f === Mt && X(x, h);
|
570
570
|
}
|
571
571
|
}, R = (i, f, h, S) => {
|
572
|
-
const { before: y, distance:
|
573
|
-
return I >
|
574
|
-
},
|
572
|
+
const { before: y, distance: v, axis: T, getRect: A } = w(i), N = A(f), x = A(h), I = N[y], J = x[y], ft = x[v], mt = J + ft / 2, St = we(h)[T], it = mt - St;
|
573
|
+
return I > it ? { height: 0, width: 0 } : S;
|
574
|
+
}, O = (i, f, h, S) => {
|
575
575
|
const y = S.filter(
|
576
576
|
(T) => et(T, Q)
|
577
|
-
).length, { distance:
|
578
|
-
i[
|
577
|
+
).length, { distance: v } = w(h);
|
578
|
+
i[v] == 0 ? a = Math.max(a, f) : a = Math.min(a, f - 1), a = Math.min(a, y);
|
579
579
|
}, Y = (i, f) => {
|
580
580
|
const { width: h, height: S } = f;
|
581
|
-
|
582
|
-
},
|
581
|
+
Et(i, S, h);
|
582
|
+
}, X = (i, f) => {
|
583
583
|
const { width: h, height: S } = f;
|
584
|
-
|
585
|
-
}, $ = (i, f, h, S, y,
|
586
|
-
const { droppable: T, scroll: A, config: N } = y, [x, I] =
|
584
|
+
Et(i, S, h), Nt(i, m, fe);
|
585
|
+
}, $ = (i, f, h, S, y, v) => {
|
586
|
+
const { droppable: T, scroll: A, config: N } = y, [x, I] = Bt(
|
587
587
|
i,
|
588
588
|
T
|
589
589
|
), J = x.toReversed(), ft = I === -1 ? J.length : I;
|
590
590
|
J.splice(ft, 0, i);
|
591
|
-
const [mt, St,
|
591
|
+
const [mt, St, it] = st(
|
592
592
|
i,
|
593
593
|
I,
|
594
594
|
J,
|
595
595
|
T
|
596
596
|
);
|
597
|
-
h =
|
597
|
+
h = Ct(
|
598
598
|
i,
|
599
599
|
f,
|
600
600
|
N.direction,
|
@@ -602,12 +602,12 @@ function mn(t, e, n, s, o, r) {
|
|
602
602
|
mt,
|
603
603
|
St
|
604
604
|
);
|
605
|
-
const
|
605
|
+
const Ft = Ae(), xt = Ue(
|
606
606
|
N.direction,
|
607
607
|
J,
|
608
608
|
I,
|
609
|
-
|
610
|
-
|
609
|
+
it,
|
610
|
+
Ft,
|
611
611
|
A,
|
612
612
|
S,
|
613
613
|
T,
|
@@ -617,43 +617,43 @@ function mn(t, e, n, s, o, r) {
|
|
617
617
|
void 0,
|
618
618
|
h,
|
619
619
|
i,
|
620
|
-
|
620
|
+
xt
|
621
621
|
);
|
622
|
-
for (const [
|
623
|
-
let
|
624
|
-
|
622
|
+
for (const [Pt, wt] of x.toReversed().entries()) {
|
623
|
+
let vt = h;
|
624
|
+
it - 1 >= Pt && (vt = { height: 0, width: 0 }), f === jt && !et(wt, at) && H(
|
625
625
|
wt,
|
626
|
-
|
626
|
+
vt,
|
627
627
|
i,
|
628
|
-
|
628
|
+
xt
|
629
629
|
);
|
630
630
|
}
|
631
631
|
P(
|
632
|
-
|
632
|
+
it,
|
633
633
|
i,
|
634
634
|
N,
|
635
635
|
T,
|
636
|
-
|
636
|
+
v
|
637
637
|
);
|
638
638
|
}, st = (i, f, h, S) => {
|
639
|
-
const
|
639
|
+
const v = pt(i, S) ? f : a, T = () => f < v ? [v, v + 1] : f > v ? [v - 1, v] : [v - 1, v + 1], [A, N] = T(), x = h[A] ?? null, I = h[N] ?? null;
|
640
640
|
return [
|
641
641
|
x,
|
642
642
|
I,
|
643
|
-
|
643
|
+
v
|
644
644
|
];
|
645
645
|
}, H = (i, f, h, S) => {
|
646
|
-
|
646
|
+
Et(i, f.height, f.width), Et(
|
647
647
|
h,
|
648
648
|
S.height,
|
649
649
|
S.width
|
650
650
|
);
|
651
651
|
}, P = (i, f, h, S, y) => {
|
652
|
-
const { onInsertEvent:
|
653
|
-
nt(f,
|
654
|
-
if (
|
655
|
-
const A =
|
656
|
-
A != null && (
|
652
|
+
const { onInsertEvent: v, onDragEnd: T } = h;
|
653
|
+
nt(f, Xt), z(f, n, S, () => {
|
654
|
+
if (yt(f, Xt), y != null) {
|
655
|
+
const A = g(y, !0);
|
656
|
+
A != null && (v(i, A, !0), T({ value: A, index: i })), q(f), Z();
|
657
657
|
}
|
658
658
|
});
|
659
659
|
}, Z = () => {
|
@@ -666,14 +666,14 @@ function mn(t, e, n, s, o, r) {
|
|
666
666
|
}
|
667
667
|
}, q = (i) => {
|
668
668
|
setTimeout(() => {
|
669
|
-
|
670
|
-
},
|
669
|
+
yt(i, B);
|
670
|
+
}, Sn);
|
671
671
|
}, z = (i, f, h, S) => {
|
672
672
|
setTimeout(() => {
|
673
|
-
S && S(),
|
673
|
+
S && S(), W(f, h), j(h), tt(i), V(i, f), V(i, h);
|
674
674
|
}, m);
|
675
|
-
},
|
676
|
-
i.isSameNode(f) ?
|
675
|
+
}, W = (i, f) => {
|
676
|
+
i.isSameNode(f) ? bt(i, m) : (bt(i, m, !0), bt(f, m));
|
677
677
|
}, j = (i) => {
|
678
678
|
if (n.isSameNode(i))
|
679
679
|
return;
|
@@ -681,13 +681,13 @@ function mn(t, e, n, s, o, r) {
|
|
681
681
|
if (!f)
|
682
682
|
return;
|
683
683
|
const { distance: h } = w(l);
|
684
|
-
|
684
|
+
rt(f) && (f.style[h] = "0px");
|
685
685
|
}, V = (i, f) => {
|
686
|
-
const [h] =
|
686
|
+
const [h] = Bt(i, f);
|
687
687
|
for (const S of [...h, i])
|
688
688
|
G(S);
|
689
689
|
}, G = (i) => {
|
690
|
-
|
690
|
+
rt(i) && (i.style.transition = "", i.style.transform = "");
|
691
691
|
}, tt = (i) => {
|
692
692
|
r(), ut(i, !1), i.style.transform = "", i.style.transition = "", i.style.top = "", i.style.left = "", le(i, {
|
693
693
|
fixedHeight: "",
|
@@ -695,9 +695,9 @@ function mn(t, e, n, s, o, r) {
|
|
695
695
|
});
|
696
696
|
}, ot = (i, f) => {
|
697
697
|
const h = f.querySelector(u);
|
698
|
-
|
698
|
+
Tt(document.body, se, i), Tt(h || f, Yt, i);
|
699
699
|
}, ut = (i, f) => {
|
700
|
-
|
700
|
+
Tt(i, qt, f), ot(f, i), o.toggleGrabClass(!f);
|
701
701
|
};
|
702
702
|
return [
|
703
703
|
M,
|
@@ -707,24 +707,24 @@ function mn(t, e, n, s, o, r) {
|
|
707
707
|
ut
|
708
708
|
];
|
709
709
|
}
|
710
|
-
const
|
710
|
+
const Dn = (t) => t.addedNodes.values().filter((n) => !Ht(n)).toArray().length > 0, he = (t, e, n) => {
|
711
711
|
const { insertingFromClass: s, animationDuration: o } = n, r = Zt(() => {
|
712
712
|
const l = re(e)[t];
|
713
713
|
nt(l, s), nt(l, Jt), setTimeout(() => {
|
714
|
-
|
714
|
+
yt(l, Jt), yt(l, s), r.disconnect();
|
715
715
|
}, o);
|
716
716
|
}, e, {
|
717
717
|
childList: !0
|
718
|
-
},
|
719
|
-
},
|
718
|
+
}, Dn);
|
719
|
+
}, Mn = (t, e, n, s) => {
|
720
720
|
if (!e)
|
721
721
|
return;
|
722
722
|
const { onInsertEvent: o, delayBeforeInsert: r } = t;
|
723
723
|
setTimeout(() => {
|
724
724
|
o(n, s), he(n, e, t);
|
725
725
|
}, r);
|
726
|
-
},
|
727
|
-
const n = (l, u) => t.removeAtEvent(l, u), s = (l, u,
|
726
|
+
}, bn = (t, e) => {
|
727
|
+
const n = (l, u) => t.removeAtEvent(l, u), s = (l, u, g) => t.insertEvent(l, u, g), o = () => t.getLength(), r = (l) => t.getValue(l), a = (l) => l;
|
728
728
|
return {
|
729
729
|
direction: (e == null ? void 0 : e.direction) ?? U,
|
730
730
|
handlerSelector: (e == null ? void 0 : e.handlerSelector) ?? Q,
|
@@ -747,17 +747,17 @@ const Sn = (t) => t.addedNodes.values().filter((n) => !Ht(n)).toArray().length >
|
|
747
747
|
delayBeforeInsert: (e == null ? void 0 : e.delayBeforeInsert) ?? 200,
|
748
748
|
mapFrom: (e == null ? void 0 : e.mapFrom) ?? a
|
749
749
|
};
|
750
|
-
},
|
750
|
+
}, Tn = (t, e) => {
|
751
751
|
const { config: n, droppable: s } = t, { onInsertEvent: o, onDragEnd: r } = n;
|
752
752
|
return {
|
753
753
|
...n,
|
754
754
|
onDragEnd: (u) => {
|
755
|
-
const { index:
|
756
|
-
r({ index:
|
755
|
+
const { index: g, value: m } = u;
|
756
|
+
r({ index: g, value: e(m, s) });
|
757
757
|
},
|
758
|
-
onInsertEvent: (u,
|
758
|
+
onInsertEvent: (u, g) => o(u, e(g, s), !0)
|
759
759
|
};
|
760
|
-
},
|
760
|
+
}, En = (t) => {
|
761
761
|
let e = { offsetX: 0, offsetY: 0 }, n = { top: 0, left: 0 }, s = { x: 0, y: 0 };
|
762
762
|
const o = (u) => {
|
763
763
|
t.style.transform = `translate( ${u.x}px, ${u.y}px)`;
|
@@ -765,33 +765,33 @@ const Sn = (t) => t.addedNodes.values().filter((n) => !Ht(n)).toArray().length >
|
|
765
765
|
t.style.top = `${u.top}px`, t.style.left = `${u.left}px`;
|
766
766
|
};
|
767
767
|
return [
|
768
|
-
(u,
|
768
|
+
(u, g, m, D) => {
|
769
769
|
const B = (C) => {
|
770
770
|
const {
|
771
771
|
beforeMargin: p,
|
772
|
-
borderBeforeWidth:
|
772
|
+
borderBeforeWidth: b,
|
773
773
|
before: R,
|
774
|
-
offset:
|
774
|
+
offset: O,
|
775
775
|
scroll: Y,
|
776
|
-
page:
|
776
|
+
page: X,
|
777
777
|
inner: $,
|
778
778
|
distance: st,
|
779
779
|
axis: H,
|
780
780
|
getRect: P
|
781
|
-
} = w(C), Z = m[
|
782
|
-
if (G >= q -
|
781
|
+
} = w(C), Z = m[X], q = window[Y], z = window[$], W = P(u)[st], j = L(u, b), V = L(u, p), G = Z - e[O], tt = ie(u, C);
|
782
|
+
if (G >= q - W / 2 && G <= q + z) {
|
783
783
|
const ut = G - n[R] - j - V - q - tt;
|
784
784
|
return M(C), ut;
|
785
785
|
}
|
786
786
|
return s[H];
|
787
787
|
}, M = (C) => {
|
788
|
-
if (u && et(u, qt) && C ===
|
789
|
-
const { before: p, distance:
|
788
|
+
if (u && et(u, qt) && C === D) {
|
789
|
+
const { before: p, distance: b, axis: R, getRect: O } = w(D), Y = O(u)[b], X = O(g), $ = n[p] - X[p] + s[R], H = X[b] - Y, P = $ / H, Z = Y / H, q = 0.1, z = 0.2, W = 0.8;
|
790
790
|
let j = 0;
|
791
|
-
const V = pt(u,
|
792
|
-
!V && P < z && P > -Z ? j = P / z - 1 : !V && P >
|
791
|
+
const V = pt(u, g);
|
792
|
+
!V && P < z && P > -Z ? j = P / z - 1 : !V && P > W && P < 1 + Z && (j = 1 / (1 - W) * (P - W));
|
793
793
|
const G = q * Y * j;
|
794
|
-
|
794
|
+
cn(g, D, G);
|
795
795
|
}
|
796
796
|
}, F = (C) => {
|
797
797
|
const { axis: p } = w(C);
|
@@ -799,33 +799,33 @@ const Sn = (t) => t.addedNodes.values().filter((n) => !Ht(n)).toArray().length >
|
|
799
799
|
};
|
800
800
|
F(_), F(U);
|
801
801
|
},
|
802
|
-
(u,
|
803
|
-
const [m,
|
802
|
+
(u, g) => {
|
803
|
+
const [m, D, B, M] = An(
|
804
804
|
u,
|
805
|
-
|
805
|
+
g,
|
806
806
|
t
|
807
807
|
);
|
808
808
|
n = {
|
809
809
|
top: m,
|
810
|
-
left:
|
810
|
+
left: D
|
811
811
|
}, r(n), e = { offsetX: B, offsetY: M };
|
812
812
|
}
|
813
813
|
];
|
814
|
-
},
|
814
|
+
}, Rt = (t, e, n) => {
|
815
815
|
const { borderBeforeWidth: s, before: o, getRect: r } = w(t);
|
816
|
-
return r(e)[o] - r(n)[o] -
|
817
|
-
},
|
818
|
-
let { offsetX: n, offsetY: s, target: o } = t, r =
|
816
|
+
return r(e)[o] - r(n)[o] - L(n, s);
|
817
|
+
}, Cn = (t, e) => {
|
818
|
+
let { offsetX: n, offsetY: s, target: o } = t, r = yn(o, e);
|
819
819
|
const a = o;
|
820
|
-
return a && r && !a.isSameNode(r) && (n +=
|
821
|
-
},
|
820
|
+
return a && r && !a.isSameNode(r) && (n += Rt(_, a, r), s += Rt(U, a, r)), r && e != o && (n += Rt(_, r, e), s += Rt(U, r, e)), [n, s];
|
821
|
+
}, yn = (t, e) => {
|
822
822
|
const n = t == null ? void 0 : t.closest(`.${Ot}`);
|
823
823
|
return n && n.isSameNode(e) ? t : n;
|
824
824
|
}, ne = (t, e, n, s) => {
|
825
|
-
const { offset: o, beforeMargin: r, page: a, borderBeforeWidth: l, scroll: u } = w(t),
|
826
|
-
return e[a] - s[o] -
|
827
|
-
},
|
828
|
-
const [s, o] =
|
825
|
+
const { offset: o, beforeMargin: r, page: a, borderBeforeWidth: l, scroll: u } = w(t), g = ie(n, t);
|
826
|
+
return e[a] - s[o] - L(n, r) - L(n, l) - window[u] - g;
|
827
|
+
}, An = (t, e, n) => {
|
828
|
+
const [s, o] = Cn(t, n);
|
829
829
|
return [
|
830
830
|
ne(U, t, e, {
|
831
831
|
offsetX: s,
|
@@ -852,7 +852,7 @@ const Sn = (t) => t.addedNodes.values().filter((n) => !Ht(n)).toArray().length >
|
|
852
852
|
static updateScrolls(e, n) {
|
853
853
|
for (const s of K.configs) {
|
854
854
|
const { droppable: o } = s;
|
855
|
-
(n &&
|
855
|
+
(n && Ce(o, n) || o.isSameNode(e)) && (s.scroll = Qt(o));
|
856
856
|
}
|
857
857
|
}
|
858
858
|
static getConfig(e) {
|
@@ -868,7 +868,7 @@ k(K, "configs", []), k(K, "removeObsoleteConfigs", () => {
|
|
868
868
|
K.configs = e;
|
869
869
|
});
|
870
870
|
let lt = K;
|
871
|
-
class
|
871
|
+
class xn {
|
872
872
|
constructor(e, n, s, o, r, a) {
|
873
873
|
k(this, "initial");
|
874
874
|
k(this, "current");
|
@@ -924,7 +924,7 @@ class yn {
|
|
924
924
|
if (n)
|
925
925
|
return e.isSameNode(this.parent) ? n : {
|
926
926
|
...n,
|
927
|
-
config:
|
927
|
+
config: Tn(n, this.mapFrom)
|
928
928
|
};
|
929
929
|
}
|
930
930
|
getCurrentConfig(e) {
|
@@ -936,7 +936,7 @@ class yn {
|
|
936
936
|
))
|
937
937
|
return this.current;
|
938
938
|
const s = this.getCurrent(n, e);
|
939
|
-
return s ? (
|
939
|
+
return s ? (rt(s) && !s.onscroll && this.setOnScroll(s), this.getConfigFrom(s)) : this.getConfigFrom(this.parent);
|
940
940
|
}
|
941
941
|
updateConfig(e) {
|
942
942
|
const n = this.current;
|
@@ -947,24 +947,24 @@ class yn {
|
|
947
947
|
return !this.getCurrent(s, e, n);
|
948
948
|
}
|
949
949
|
}
|
950
|
-
function
|
950
|
+
function wn(t, e, n, s, o) {
|
951
951
|
const {
|
952
952
|
handlerSelector: r,
|
953
953
|
isDraggable: a,
|
954
954
|
droppableGroup: l,
|
955
955
|
animationDuration: u,
|
956
|
-
delayBeforeRemove:
|
956
|
+
delayBeforeRemove: g,
|
957
957
|
draggingClass: m,
|
958
|
-
removingClass:
|
958
|
+
removingClass: D,
|
959
959
|
onRemoveAtEvent: B,
|
960
960
|
droppableClass: M,
|
961
961
|
onDragStart: F
|
962
|
-
} = n, C =
|
963
|
-
let p = 0,
|
962
|
+
} = n, C = At(l).map((c) => `droppable-group-${c}`).join(" ");
|
963
|
+
let p = 0, b = {
|
964
964
|
scrollX: 0,
|
965
965
|
scrollY: 0
|
966
|
-
}, R = { pageX: 0, pageY: 0 },
|
967
|
-
const [Y,
|
966
|
+
}, R = { pageX: 0, pageY: 0 }, O;
|
967
|
+
const [Y, X] = En(
|
968
968
|
t
|
969
969
|
), [
|
970
970
|
$,
|
@@ -972,7 +972,7 @@ function An(t, e, n, s, o) {
|
|
972
972
|
H,
|
973
973
|
P,
|
974
974
|
Z
|
975
|
-
] =
|
975
|
+
] = vn(
|
976
976
|
n,
|
977
977
|
e,
|
978
978
|
s,
|
@@ -984,50 +984,50 @@ function An(t, e, n, s, o) {
|
|
984
984
|
nt(t, Q);
|
985
985
|
}, z = (c) => {
|
986
986
|
nt(c, Ot), o.addSubscriber(c);
|
987
|
-
},
|
987
|
+
}, W = () => {
|
988
988
|
if (a(t)) {
|
989
989
|
const c = t.querySelector(r);
|
990
990
|
z(c || t);
|
991
991
|
}
|
992
992
|
}, j = () => {
|
993
|
-
|
993
|
+
W(), q();
|
994
994
|
}, V = (c) => {
|
995
|
-
const
|
996
|
-
return
|
995
|
+
const d = c == null ? void 0 : c.querySelector(`.${Ot}`), E = d == null ? void 0 : d.parentElement;
|
996
|
+
return d && E && et(E, It) && !E.isSameNode(s) ? null : d;
|
997
997
|
}, G = (c) => {
|
998
|
-
const
|
999
|
-
|
1000
|
-
|
998
|
+
const d = V(c) ?? c;
|
999
|
+
d && a(c) && ($t(
|
1000
|
+
d,
|
1001
1001
|
"onmousedown",
|
1002
|
-
|
1002
|
+
x("mousemove", "mouseup")
|
1003
1003
|
), $t(
|
1004
|
-
|
1004
|
+
d,
|
1005
1005
|
"ontouchstart",
|
1006
|
-
|
1007
|
-
), tt(
|
1006
|
+
x("touchmove", "touchend")
|
1007
|
+
), tt(d)), c != null && c.isSameNode(d) || $t(c, "onmousedown", I), nt(s, It);
|
1008
1008
|
}, tt = (c) => {
|
1009
|
-
const
|
1010
|
-
Array.from(
|
1009
|
+
const d = c.querySelectorAll("img");
|
1010
|
+
Array.from(d).forEach((E) => {
|
1011
1011
|
E.onmousedown = () => !1;
|
1012
1012
|
});
|
1013
1013
|
}, ot = () => {
|
1014
1014
|
if (R.pageX == 0 && R.pageY == 0 || !i.current)
|
1015
1015
|
return;
|
1016
|
-
const { droppable: c, config:
|
1017
|
-
Y(t, c, R,
|
1016
|
+
const { droppable: c, config: d } = i.current;
|
1017
|
+
Y(t, c, R, d.direction), $(
|
1018
1018
|
t,
|
1019
|
-
|
1020
|
-
|
1019
|
+
Mt,
|
1020
|
+
b,
|
1021
1021
|
i.current
|
1022
1022
|
);
|
1023
|
-
}, ut = (c,
|
1024
|
-
|
1023
|
+
}, ut = (c, d) => {
|
1024
|
+
d && p == 2 && !(c != null && c.droppable.isSameNode(d.droppable)) && $(
|
1025
1025
|
t,
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1026
|
+
Mt,
|
1027
|
+
b,
|
1028
|
+
d
|
1029
1029
|
);
|
1030
|
-
}, i = new
|
1030
|
+
}, i = new xn(
|
1031
1031
|
t,
|
1032
1032
|
C,
|
1033
1033
|
s,
|
@@ -1037,24 +1037,24 @@ function An(t, e, n, s, o) {
|
|
1037
1037
|
), f = (c) => {
|
1038
1038
|
if (!i.current)
|
1039
1039
|
return;
|
1040
|
-
const
|
1040
|
+
const d = C ? Array.from(
|
1041
1041
|
document.querySelectorAll(gt(C))
|
1042
1042
|
) : [s];
|
1043
|
-
for (const E of
|
1043
|
+
for (const E of d)
|
1044
1044
|
E.classList.toggle(
|
1045
1045
|
M,
|
1046
1046
|
!c && E.isSameNode(i.current.droppable)
|
1047
1047
|
);
|
1048
1048
|
}, h = (c) => {
|
1049
1049
|
i.updateConfig(c);
|
1050
|
-
const
|
1051
|
-
f(
|
1050
|
+
const d = i.isOutside(c);
|
1051
|
+
f(d), p === 1 ? St(c) : p === 2 && (S(d), Ft(c));
|
1052
1052
|
}, S = (c = !0) => {
|
1053
1053
|
if (!i.current)
|
1054
1054
|
return;
|
1055
|
-
const { droppable:
|
1056
|
-
|
1057
|
-
|
1055
|
+
const { droppable: d } = i.current;
|
1056
|
+
mn(
|
1057
|
+
d,
|
1058
1058
|
s,
|
1059
1059
|
C,
|
1060
1060
|
u,
|
@@ -1066,95 +1066,100 @@ function An(t, e, n, s, o) {
|
|
1066
1066
|
i.current
|
1067
1067
|
);
|
1068
1068
|
}, y = (c) => {
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1069
|
+
const d = t.getBoundingClientRect();
|
1070
|
+
return c.clientX >= d.left && c.clientX <= d.right && c.clientY >= d.top && c.clientY <= d.bottom;
|
1071
|
+
}, v = (c) => {
|
1072
|
+
const d = Vt(c);
|
1073
|
+
if (Wt(c) && c.cancelable && c.preventDefault(), Wt(c) && !c.cancelable || !y(d)) {
|
1074
|
+
ft("touchmove", c);
|
1072
1075
|
return;
|
1073
|
-
|
1074
|
-
h(
|
1075
|
-
},
|
1076
|
-
c == "touchmove" ?
|
1077
|
-
|
1078
|
-
}, 200) :
|
1079
|
-
},
|
1080
|
-
const { clientX: E, clientY: dt } = c,
|
1081
|
-
return
|
1082
|
-
},
|
1083
|
-
const
|
1084
|
-
return { index: e, element: c, value:
|
1085
|
-
},
|
1086
|
-
if (
|
1076
|
+
}
|
1077
|
+
h(d);
|
1078
|
+
}, T = (c, d) => {
|
1079
|
+
c == "touchmove" ? O = setTimeout(() => {
|
1080
|
+
d();
|
1081
|
+
}, 200) : d();
|
1082
|
+
}, A = (c, d) => {
|
1083
|
+
const { clientX: E, clientY: dt } = c, ct = document.elementFromPoint(E, dt), Dt = ct == null ? void 0 : ct.closest(`.${Q}`);
|
1084
|
+
return Dt && d.isSameNode(Dt);
|
1085
|
+
}, N = (c) => {
|
1086
|
+
const d = n.onGetValue(e);
|
1087
|
+
return { index: e, element: c, value: d };
|
1088
|
+
}, x = (c, d) => (E) => {
|
1089
|
+
if (!A(E, t))
|
1087
1090
|
return;
|
1088
1091
|
lt.updateScrolls(s, C);
|
1089
|
-
const { scrollX: dt, scrollY:
|
1090
|
-
if (
|
1092
|
+
const { scrollX: dt, scrollY: ct } = window;
|
1093
|
+
if (b = { scrollX: dt, scrollY: ct }, p === 0) {
|
1091
1094
|
p = 1;
|
1092
|
-
const
|
1093
|
-
|
1094
|
-
|
1095
|
+
const Dt = N(t);
|
1096
|
+
Dt && F(Dt), T(c, () => {
|
1097
|
+
document.addEventListener(c, v, {
|
1095
1098
|
passive: !1
|
1096
1099
|
});
|
1097
|
-
}),
|
1100
|
+
}), xt(s), document.addEventListener(d, J(c), {
|
1098
1101
|
once: !0
|
1099
1102
|
});
|
1100
1103
|
}
|
1101
|
-
},
|
1104
|
+
}, I = (c) => i.updateConfig(c), J = (c) => (d) => {
|
1105
|
+
ft(c, d);
|
1106
|
+
}, ft = (c, d) => {
|
1102
1107
|
f(!0);
|
1103
|
-
const E = Vt(
|
1104
|
-
clearTimeout(
|
1108
|
+
const E = Vt(d);
|
1109
|
+
clearTimeout(O), wt(i.isOutside(E, !1)), document.removeEventListener(c, v), i.updateConfig(E);
|
1105
1110
|
const dt = i.getCurrentConfig(E);
|
1106
1111
|
if (dt) {
|
1107
|
-
const { droppable:
|
1108
|
-
|
1112
|
+
const { droppable: ct } = dt;
|
1113
|
+
mt(ct);
|
1109
1114
|
}
|
1110
1115
|
s.onscroll = null;
|
1111
|
-
},
|
1116
|
+
}, mt = (c) => {
|
1112
1117
|
if (c.onscroll = null, !C)
|
1113
1118
|
return;
|
1114
|
-
const
|
1119
|
+
const d = Array.from(
|
1115
1120
|
document.querySelectorAll(gt(C))
|
1116
1121
|
);
|
1117
|
-
for (const E of
|
1118
|
-
|
1119
|
-
},
|
1122
|
+
for (const E of d)
|
1123
|
+
rt(E) && (E.onscroll = null);
|
1124
|
+
}, St = (c) => {
|
1120
1125
|
Gt(
|
1121
1126
|
t,
|
1122
1127
|
s,
|
1123
1128
|
p == 1,
|
1124
1129
|
i.current
|
1125
|
-
),
|
1130
|
+
), it(), $(
|
1126
1131
|
t,
|
1127
1132
|
ue,
|
1128
|
-
|
1133
|
+
b,
|
1129
1134
|
i.current
|
1130
|
-
),
|
1131
|
-
},
|
1135
|
+
), me(t), X(c, t);
|
1136
|
+
}, it = () => {
|
1132
1137
|
p = 2;
|
1133
|
-
},
|
1134
|
-
const { pageX:
|
1135
|
-
R = { pageX:
|
1136
|
-
},
|
1138
|
+
}, Ft = (c) => {
|
1139
|
+
const { pageX: d, pageY: E } = c;
|
1140
|
+
R = { pageX: d, pageY: E }, ot();
|
1141
|
+
}, xt = (c) => ae(c, "onscroll", Pt), Pt = () => ot(), wt = (c) => {
|
1137
1142
|
if (p !== 2) {
|
1138
1143
|
p = 0;
|
1139
1144
|
return;
|
1140
1145
|
}
|
1141
|
-
p = 3,
|
1146
|
+
p = 3, vt(t), $(
|
1142
1147
|
t,
|
1143
1148
|
jt,
|
1144
|
-
|
1149
|
+
b,
|
1145
1150
|
c ? i.initial : i.current,
|
1146
1151
|
e
|
1147
1152
|
);
|
1148
|
-
},
|
1149
|
-
|
1150
|
-
},
|
1151
|
-
const { height:
|
1153
|
+
}, vt = (c) => {
|
1154
|
+
Nt(c, u, fe), Et(c, 0, 0);
|
1155
|
+
}, me = (c) => {
|
1156
|
+
const { height: d, width: E } = c.getBoundingClientRect();
|
1152
1157
|
le(c, {
|
1153
|
-
fixedHeight: `${
|
1158
|
+
fixedHeight: `${d}px`,
|
1154
1159
|
fixedWidth: `${E}px`
|
1155
|
-
}), Z(c, !0),
|
1156
|
-
},
|
1157
|
-
|
1160
|
+
}), Z(c, !0), Tt(c, m, !0), c.style.transition = "";
|
1161
|
+
}, Se = (c, d) => {
|
1162
|
+
yt(t, D), Gt(
|
1158
1163
|
t,
|
1159
1164
|
s,
|
1160
1165
|
p == 1,
|
@@ -1162,26 +1167,26 @@ function An(t, e, n, s, o) {
|
|
1162
1167
|
), st(
|
1163
1168
|
c,
|
1164
1169
|
t,
|
1165
|
-
|
1170
|
+
d,
|
1166
1171
|
(E) => {
|
1167
|
-
|
1172
|
+
vt(E), P(t);
|
1168
1173
|
}
|
1169
1174
|
), B(e, !0);
|
1170
|
-
},
|
1175
|
+
}, ve = (c) => {
|
1171
1176
|
if (!i.initial)
|
1172
1177
|
return;
|
1173
|
-
const
|
1174
|
-
c == e && (nt(t,
|
1175
|
-
|
1176
|
-
},
|
1177
|
-
},
|
1178
|
+
const d = i.initial;
|
1179
|
+
c == e && (nt(t, D), setTimeout(() => {
|
1180
|
+
Se(c, d);
|
1181
|
+
}, g));
|
1182
|
+
}, De = (c, d) => {
|
1178
1183
|
(c === e || c === n.onGetLegth() && e === c - 1) && H(
|
1179
1184
|
c,
|
1180
1185
|
t,
|
1181
1186
|
s,
|
1182
|
-
|
1187
|
+
d,
|
1183
1188
|
() => {
|
1184
|
-
|
1189
|
+
pn(
|
1185
1190
|
t,
|
1186
1191
|
p == 1,
|
1187
1192
|
i.initial
|
@@ -1189,25 +1194,25 @@ function An(t, e, n, s, o) {
|
|
1189
1194
|
}
|
1190
1195
|
);
|
1191
1196
|
};
|
1192
|
-
return j(), G(t), [
|
1197
|
+
return j(), G(t), [ve, De];
|
1193
1198
|
}
|
1194
|
-
const
|
1195
|
-
t &&
|
1196
|
-
},
|
1197
|
-
|
1199
|
+
const Bn = (t, e) => {
|
1200
|
+
t && ye(e, t);
|
1201
|
+
}, Rn = () => {
|
1202
|
+
We(document.body, [
|
1198
1203
|
`.${Q}{touch-action:manipulation;user-select:none;box-sizing:border-box!important;-webkit-user-select:none;}`,
|
1199
1204
|
`.${Ot}{pointer-events:auto!important;}`,
|
1200
|
-
`.${
|
1205
|
+
`.${Ee}{cursor:grab;}`,
|
1201
1206
|
".temp-child{touch-action:none;pointer-events:none;box-sizing:border-box!important;}",
|
1202
1207
|
".droppable{box-sizing:border-box!important;}",
|
1203
1208
|
`.${qt}{position:fixed;z-index:5000;width:var(--fixedWidth)!important;height:var(--fixedHeight)!important;}`,
|
1204
1209
|
`.${Yt}{pointer-events:none!important;}`,
|
1205
|
-
`.${
|
1210
|
+
`.${Xt}{pointer-events:none!important;}`,
|
1206
1211
|
`.${se}{cursor:grabbing;}`,
|
1207
1212
|
".disable-transition{transition:none!important;}"
|
1208
1213
|
]);
|
1209
1214
|
};
|
1210
|
-
function
|
1215
|
+
function On(t, e, n, s = "index") {
|
1211
1216
|
const o = s;
|
1212
1217
|
let r = [], a = [];
|
1213
1218
|
const { droppableGroup: l } = t;
|
@@ -1216,14 +1221,14 @@ function Bn(t, e, n, s = "index") {
|
|
1216
1221
|
r,
|
1217
1222
|
a
|
1218
1223
|
];
|
1219
|
-
const u =
|
1220
|
-
|
1221
|
-
for (const
|
1222
|
-
const m =
|
1223
|
-
if (B &&
|
1224
|
-
const [M, F] =
|
1224
|
+
const u = At(l).map((g) => `droppable-group-${g}`).join(" ");
|
1225
|
+
Rn(), Bn(u, n);
|
1226
|
+
for (const g of n.children) {
|
1227
|
+
const m = g.getAttribute(o), D = xe(m), B = g;
|
1228
|
+
if (B && D >= 0) {
|
1229
|
+
const [M, F] = wn(
|
1225
1230
|
B,
|
1226
|
-
|
1231
|
+
D,
|
1227
1232
|
t,
|
1228
1233
|
n,
|
1229
1234
|
e
|
@@ -1236,31 +1241,31 @@ function Bn(t, e, n, s = "index") {
|
|
1236
1241
|
a
|
1237
1242
|
];
|
1238
1243
|
}
|
1239
|
-
function
|
1244
|
+
function Nn(t, e, n, s = "index", o = !0) {
|
1240
1245
|
let r = [], a = [];
|
1241
|
-
const l =
|
1242
|
-
for (const
|
1243
|
-
|
1244
|
-
},
|
1246
|
+
const l = bn(t, n), u = (p) => {
|
1247
|
+
for (const b of r)
|
1248
|
+
b(p);
|
1249
|
+
}, g = (p, b) => {
|
1245
1250
|
if (l.onGetLegth() === 0)
|
1246
|
-
t.insertToListEmpty(l, p,
|
1251
|
+
t.insertToListEmpty(l, p, b);
|
1247
1252
|
else
|
1248
|
-
for (const
|
1249
|
-
|
1253
|
+
for (const O of a)
|
1254
|
+
O(p, b);
|
1250
1255
|
}, m = (p) => {
|
1251
|
-
const [
|
1252
|
-
r =
|
1253
|
-
},
|
1254
|
-
const
|
1255
|
-
return
|
1256
|
+
const [b, R] = On(l, e, p, s);
|
1257
|
+
r = b, a = R;
|
1258
|
+
}, D = (p) => {
|
1259
|
+
const b = p.addedNodes.values().filter((O) => !Ht(O)).toArray(), R = p.removedNodes.values().filter((O) => !Ht(O)).toArray();
|
1260
|
+
return b.length > 0 || R.length > 0;
|
1256
1261
|
}, B = (p) => {
|
1257
1262
|
Zt(
|
1258
|
-
(
|
1259
|
-
m(p), o ||
|
1263
|
+
(b) => {
|
1264
|
+
m(p), o || b.disconnect();
|
1260
1265
|
},
|
1261
1266
|
p,
|
1262
1267
|
{ childList: !0 },
|
1263
|
-
|
1268
|
+
D
|
1264
1269
|
);
|
1265
1270
|
}, M = (p) => {
|
1266
1271
|
nt(p, It);
|
@@ -1270,14 +1275,14 @@ function On(t, e, n, s = "index", o = !0) {
|
|
1270
1275
|
l
|
1271
1276
|
);
|
1272
1277
|
};
|
1273
|
-
return [u,
|
1278
|
+
return [u, g, (p) => {
|
1274
1279
|
p && (M(p), F(p), B(p), m(p), lt.removeObsoleteConfigs());
|
1275
1280
|
}];
|
1276
1281
|
}
|
1277
1282
|
export {
|
1278
|
-
|
1283
|
+
Ee as G,
|
1279
1284
|
nt as a,
|
1280
|
-
|
1281
|
-
|
1282
|
-
|
1285
|
+
Nn as d,
|
1286
|
+
Mn as i,
|
1287
|
+
Tt as t
|
1283
1288
|
};
|