@clevertask/react-sortable-tree 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as $, jsxs as fn } from "react/jsx-runtime";
|
|
2
|
+
import F, { useMemo as N, useLayoutEffect as Qn, useEffect as P, useRef as k, useCallback as z, useState as K, createContext as Ke, memo as ut, useReducer as Mt, useContext as De, cloneElement as er, forwardRef as dt } from "react";
|
|
3
3
|
import { unstable_batchedUpdates as je, createPortal as gn } from "react-dom";
|
|
4
4
|
function tr() {
|
|
5
5
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
6
6
|
t[n] = arguments[n];
|
|
7
|
-
return
|
|
7
|
+
return N(
|
|
8
8
|
() => (r) => {
|
|
9
9
|
t.forEach((o) => o(r));
|
|
10
10
|
},
|
|
@@ -13,7 +13,7 @@ function tr() {
|
|
|
13
13
|
);
|
|
14
14
|
}
|
|
15
15
|
const ft = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
16
|
-
function
|
|
16
|
+
function Ne(e) {
|
|
17
17
|
const t = Object.prototype.toString.call(e);
|
|
18
18
|
return t === "[object Window]" || // In Electron context the Window object serializes to [object global]
|
|
19
19
|
t === "[object global]";
|
|
@@ -21,54 +21,54 @@ function Me(e) {
|
|
|
21
21
|
function Lt(e) {
|
|
22
22
|
return "nodeType" in e;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function J(e) {
|
|
25
25
|
var t, n;
|
|
26
|
-
return e ?
|
|
26
|
+
return e ? Ne(e) ? e : Lt(e) && (t = (n = e.ownerDocument) == null ? void 0 : n.defaultView) != null ? t : window : window;
|
|
27
27
|
}
|
|
28
28
|
function Pt(e) {
|
|
29
29
|
const {
|
|
30
30
|
Document: t
|
|
31
|
-
} =
|
|
31
|
+
} = J(e);
|
|
32
32
|
return e instanceof t;
|
|
33
33
|
}
|
|
34
34
|
function Ue(e) {
|
|
35
|
-
return
|
|
35
|
+
return Ne(e) ? !1 : e instanceof J(e).HTMLElement;
|
|
36
36
|
}
|
|
37
37
|
function hn(e) {
|
|
38
|
-
return e instanceof
|
|
38
|
+
return e instanceof J(e).SVGElement;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
return e ?
|
|
40
|
+
function Me(e) {
|
|
41
|
+
return e ? Ne(e) ? e.document : Lt(e) ? Pt(e) ? e : Ue(e) || hn(e) ? e.ownerDocument : document : document : document;
|
|
42
42
|
}
|
|
43
|
-
const ie = ft ? Qn :
|
|
43
|
+
const ie = ft ? Qn : P;
|
|
44
44
|
function gt(e) {
|
|
45
|
-
const t =
|
|
45
|
+
const t = k(e);
|
|
46
46
|
return ie(() => {
|
|
47
47
|
t.current = e;
|
|
48
|
-
}),
|
|
48
|
+
}), z(function() {
|
|
49
49
|
for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
|
|
50
50
|
r[o] = arguments[o];
|
|
51
51
|
return t.current == null ? void 0 : t.current(...r);
|
|
52
52
|
}, []);
|
|
53
53
|
}
|
|
54
54
|
function nr() {
|
|
55
|
-
const e =
|
|
55
|
+
const e = k(null), t = z((r, o) => {
|
|
56
56
|
e.current = setInterval(r, o);
|
|
57
|
-
}, []), n =
|
|
57
|
+
}, []), n = z(() => {
|
|
58
58
|
e.current !== null && (clearInterval(e.current), e.current = null);
|
|
59
59
|
}, []);
|
|
60
60
|
return [t, n];
|
|
61
61
|
}
|
|
62
62
|
function Ye(e, t) {
|
|
63
63
|
t === void 0 && (t = [e]);
|
|
64
|
-
const n =
|
|
64
|
+
const n = k(e);
|
|
65
65
|
return ie(() => {
|
|
66
66
|
n.current !== e && (n.current = e);
|
|
67
67
|
}, t), n;
|
|
68
68
|
}
|
|
69
69
|
function We(e, t) {
|
|
70
|
-
const n =
|
|
71
|
-
return
|
|
70
|
+
const n = k();
|
|
71
|
+
return N(
|
|
72
72
|
() => {
|
|
73
73
|
const r = e(n.current);
|
|
74
74
|
return n.current = r, r;
|
|
@@ -78,7 +78,7 @@ function We(e, t) {
|
|
|
78
78
|
);
|
|
79
79
|
}
|
|
80
80
|
function ot(e) {
|
|
81
|
-
const t = gt(e), n =
|
|
81
|
+
const t = gt(e), n = k(null), r = z(
|
|
82
82
|
(o) => {
|
|
83
83
|
o !== n.current && (t == null || t(o, n.current)), n.current = o;
|
|
84
84
|
},
|
|
@@ -88,14 +88,14 @@ function ot(e) {
|
|
|
88
88
|
return [n, r];
|
|
89
89
|
}
|
|
90
90
|
function it(e) {
|
|
91
|
-
const t =
|
|
92
|
-
return
|
|
91
|
+
const t = k();
|
|
92
|
+
return P(() => {
|
|
93
93
|
t.current = e;
|
|
94
94
|
}, [e]), t.current;
|
|
95
95
|
}
|
|
96
96
|
let wt = {};
|
|
97
97
|
function Je(e, t) {
|
|
98
|
-
return
|
|
98
|
+
return N(() => {
|
|
99
99
|
if (t)
|
|
100
100
|
return t;
|
|
101
101
|
const n = wt[e] == null ? 0 : wt[e] + 1;
|
|
@@ -118,7 +118,7 @@ function pn(e) {
|
|
|
118
118
|
});
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
|
-
const
|
|
121
|
+
const Te = /* @__PURE__ */ pn(1), st = /* @__PURE__ */ pn(-1);
|
|
122
122
|
function rr(e) {
|
|
123
123
|
return "clientX" in e && "clientY" in e;
|
|
124
124
|
}
|
|
@@ -127,7 +127,7 @@ function ht(e) {
|
|
|
127
127
|
return !1;
|
|
128
128
|
const {
|
|
129
129
|
KeyboardEvent: t
|
|
130
|
-
} =
|
|
130
|
+
} = J(e.target);
|
|
131
131
|
return t && e instanceof t;
|
|
132
132
|
}
|
|
133
133
|
function or(e) {
|
|
@@ -135,7 +135,7 @@ function or(e) {
|
|
|
135
135
|
return !1;
|
|
136
136
|
const {
|
|
137
137
|
TouchEvent: t
|
|
138
|
-
} =
|
|
138
|
+
} = J(e.target);
|
|
139
139
|
return t && e instanceof t;
|
|
140
140
|
}
|
|
141
141
|
function at(e) {
|
|
@@ -165,7 +165,7 @@ function at(e) {
|
|
|
165
165
|
y: e.clientY
|
|
166
166
|
} : null;
|
|
167
167
|
}
|
|
168
|
-
const
|
|
168
|
+
const he = /* @__PURE__ */ Object.freeze({
|
|
169
169
|
Translate: {
|
|
170
170
|
toString(e) {
|
|
171
171
|
if (!e)
|
|
@@ -191,7 +191,7 @@ const ge = /* @__PURE__ */ Object.freeze({
|
|
|
191
191
|
Transform: {
|
|
192
192
|
toString(e) {
|
|
193
193
|
if (e)
|
|
194
|
-
return [
|
|
194
|
+
return [he.Translate.toString(e), he.Scale.toString(e)].join(" ");
|
|
195
195
|
}
|
|
196
196
|
},
|
|
197
197
|
Transition: {
|
|
@@ -216,7 +216,7 @@ function ar(e) {
|
|
|
216
216
|
id: t,
|
|
217
217
|
value: n
|
|
218
218
|
} = e;
|
|
219
|
-
return
|
|
219
|
+
return F.createElement("div", {
|
|
220
220
|
id: t,
|
|
221
221
|
style: sr
|
|
222
222
|
}, n);
|
|
@@ -239,7 +239,7 @@ function lr(e) {
|
|
|
239
239
|
clipPath: "inset(100%)",
|
|
240
240
|
whiteSpace: "nowrap"
|
|
241
241
|
};
|
|
242
|
-
return
|
|
242
|
+
return F.createElement("div", {
|
|
243
243
|
id: t,
|
|
244
244
|
style: o,
|
|
245
245
|
role: "status",
|
|
@@ -248,9 +248,9 @@ function lr(e) {
|
|
|
248
248
|
}, n);
|
|
249
249
|
}
|
|
250
250
|
function cr() {
|
|
251
|
-
const [e, t] =
|
|
251
|
+
const [e, t] = K("");
|
|
252
252
|
return {
|
|
253
|
-
announce:
|
|
253
|
+
announce: z((r) => {
|
|
254
254
|
r != null && t(r);
|
|
255
255
|
}, []),
|
|
256
256
|
announcement: e
|
|
@@ -258,16 +258,16 @@ function cr() {
|
|
|
258
258
|
}
|
|
259
259
|
const vn = /* @__PURE__ */ Ke(null);
|
|
260
260
|
function ur(e) {
|
|
261
|
-
const t =
|
|
262
|
-
|
|
261
|
+
const t = De(vn);
|
|
262
|
+
P(() => {
|
|
263
263
|
if (!t)
|
|
264
264
|
throw new Error("useDndMonitor must be used within a children of <DndContext>");
|
|
265
265
|
return t(e);
|
|
266
266
|
}, [e, t]);
|
|
267
267
|
}
|
|
268
268
|
function dr() {
|
|
269
|
-
const [e] =
|
|
270
|
-
return [
|
|
269
|
+
const [e] = K(() => /* @__PURE__ */ new Set()), t = z((r) => (e.add(r), () => e.delete(r)), [e]);
|
|
270
|
+
return [z((r) => {
|
|
271
271
|
let {
|
|
272
272
|
type: o,
|
|
273
273
|
event: i
|
|
@@ -322,64 +322,64 @@ function hr(e) {
|
|
|
322
322
|
const {
|
|
323
323
|
announce: i,
|
|
324
324
|
announcement: s
|
|
325
|
-
} = cr(), a = Je("DndLiveRegion"), [l, c] =
|
|
326
|
-
if (
|
|
325
|
+
} = cr(), a = Je("DndLiveRegion"), [l, c] = K(!1);
|
|
326
|
+
if (P(() => {
|
|
327
327
|
c(!0);
|
|
328
|
-
}, []), ur(
|
|
328
|
+
}, []), ur(N(() => ({
|
|
329
329
|
onDragStart(d) {
|
|
330
330
|
let {
|
|
331
|
-
active:
|
|
331
|
+
active: h
|
|
332
332
|
} = d;
|
|
333
333
|
i(t.onDragStart({
|
|
334
|
-
active:
|
|
334
|
+
active: h
|
|
335
335
|
}));
|
|
336
336
|
},
|
|
337
337
|
onDragMove(d) {
|
|
338
338
|
let {
|
|
339
|
-
active:
|
|
340
|
-
over:
|
|
339
|
+
active: h,
|
|
340
|
+
over: f
|
|
341
341
|
} = d;
|
|
342
342
|
t.onDragMove && i(t.onDragMove({
|
|
343
|
-
active:
|
|
344
|
-
over:
|
|
343
|
+
active: h,
|
|
344
|
+
over: f
|
|
345
345
|
}));
|
|
346
346
|
},
|
|
347
347
|
onDragOver(d) {
|
|
348
348
|
let {
|
|
349
|
-
active:
|
|
350
|
-
over:
|
|
349
|
+
active: h,
|
|
350
|
+
over: f
|
|
351
351
|
} = d;
|
|
352
352
|
i(t.onDragOver({
|
|
353
|
-
active:
|
|
354
|
-
over:
|
|
353
|
+
active: h,
|
|
354
|
+
over: f
|
|
355
355
|
}));
|
|
356
356
|
},
|
|
357
357
|
onDragEnd(d) {
|
|
358
358
|
let {
|
|
359
|
-
active:
|
|
360
|
-
over:
|
|
359
|
+
active: h,
|
|
360
|
+
over: f
|
|
361
361
|
} = d;
|
|
362
362
|
i(t.onDragEnd({
|
|
363
|
-
active:
|
|
364
|
-
over:
|
|
363
|
+
active: h,
|
|
364
|
+
over: f
|
|
365
365
|
}));
|
|
366
366
|
},
|
|
367
367
|
onDragCancel(d) {
|
|
368
368
|
let {
|
|
369
|
-
active:
|
|
370
|
-
over:
|
|
369
|
+
active: h,
|
|
370
|
+
over: f
|
|
371
371
|
} = d;
|
|
372
372
|
i(t.onDragCancel({
|
|
373
|
-
active:
|
|
374
|
-
over:
|
|
373
|
+
active: h,
|
|
374
|
+
over: f
|
|
375
375
|
}));
|
|
376
376
|
}
|
|
377
377
|
}), [i, t])), !l)
|
|
378
378
|
return null;
|
|
379
|
-
const u =
|
|
379
|
+
const u = F.createElement(F.Fragment, null, F.createElement(ar, {
|
|
380
380
|
id: r,
|
|
381
381
|
value: o.draggable
|
|
382
|
-
}),
|
|
382
|
+
}), F.createElement(lr, {
|
|
383
383
|
id: a,
|
|
384
384
|
announcement: s
|
|
385
385
|
}));
|
|
@@ -392,7 +392,7 @@ var X;
|
|
|
392
392
|
function lt() {
|
|
393
393
|
}
|
|
394
394
|
function Gt(e, t) {
|
|
395
|
-
return
|
|
395
|
+
return N(
|
|
396
396
|
() => ({
|
|
397
397
|
sensor: e,
|
|
398
398
|
options: t ?? {}
|
|
@@ -404,7 +404,7 @@ function Gt(e, t) {
|
|
|
404
404
|
function pr() {
|
|
405
405
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
406
406
|
t[n] = arguments[n];
|
|
407
|
-
return
|
|
407
|
+
return N(
|
|
408
408
|
() => [...t].filter((r) => r != null),
|
|
409
409
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
410
410
|
[...t]
|
|
@@ -519,7 +519,7 @@ const mr = (e) => {
|
|
|
519
519
|
id: a
|
|
520
520
|
} = s, l = n.get(a);
|
|
521
521
|
if (l) {
|
|
522
|
-
const c = Zt(l), u = o.reduce((
|
|
522
|
+
const c = Zt(l), u = o.reduce((h, f, m) => h + bn(c[m], f), 0), d = Number((u / 4).toFixed(4));
|
|
523
523
|
i.push({
|
|
524
524
|
id: a,
|
|
525
525
|
data: {
|
|
@@ -634,14 +634,14 @@ function Ir(e, t, n) {
|
|
|
634
634
|
const Rr = {
|
|
635
635
|
ignoreTransform: !1
|
|
636
636
|
};
|
|
637
|
-
function
|
|
637
|
+
function Le(e, t) {
|
|
638
638
|
t === void 0 && (t = Rr);
|
|
639
639
|
let n = e.getBoundingClientRect();
|
|
640
640
|
if (t.ignoreTransform) {
|
|
641
641
|
const {
|
|
642
642
|
transform: c,
|
|
643
643
|
transformOrigin: u
|
|
644
|
-
} =
|
|
644
|
+
} = J(e).getComputedStyle(e);
|
|
645
645
|
c && (n = Ir(n, c, u));
|
|
646
646
|
}
|
|
647
647
|
const {
|
|
@@ -662,7 +662,7 @@ function Pe(e, t) {
|
|
|
662
662
|
};
|
|
663
663
|
}
|
|
664
664
|
function en(e) {
|
|
665
|
-
return
|
|
665
|
+
return Le(e, {
|
|
666
666
|
ignoreTransform: !0
|
|
667
667
|
});
|
|
668
668
|
}
|
|
@@ -678,10 +678,10 @@ function Er(e) {
|
|
|
678
678
|
};
|
|
679
679
|
}
|
|
680
680
|
function Or(e, t) {
|
|
681
|
-
return t === void 0 && (t =
|
|
681
|
+
return t === void 0 && (t = J(e).getComputedStyle(e)), t.position === "fixed";
|
|
682
682
|
}
|
|
683
683
|
function Tr(e, t) {
|
|
684
|
-
t === void 0 && (t =
|
|
684
|
+
t === void 0 && (t = J(e).getComputedStyle(e));
|
|
685
685
|
const n = /(auto|scroll|overlay)/;
|
|
686
686
|
return ["overflow", "overflowX", "overflowY"].some((o) => {
|
|
687
687
|
const i = t[o];
|
|
@@ -697,7 +697,7 @@ function kt(e, t) {
|
|
|
697
697
|
return n.push(o.scrollingElement), n;
|
|
698
698
|
if (!Ue(o) || hn(o) || n.includes(o))
|
|
699
699
|
return n;
|
|
700
|
-
const i =
|
|
700
|
+
const i = J(e).getComputedStyle(o);
|
|
701
701
|
return o !== e && Tr(o, i) && n.push(o), Or(o, i) ? n : r(o.parentNode);
|
|
702
702
|
}
|
|
703
703
|
return e ? r(e) : n;
|
|
@@ -707,13 +707,13 @@ function Dn(e) {
|
|
|
707
707
|
return t ?? null;
|
|
708
708
|
}
|
|
709
709
|
function xt(e) {
|
|
710
|
-
return !ft || !e ? null :
|
|
710
|
+
return !ft || !e ? null : Ne(e) ? e : Lt(e) ? Pt(e) || e === Me(e).scrollingElement ? window : Ue(e) ? e : null : null;
|
|
711
711
|
}
|
|
712
712
|
function Cn(e) {
|
|
713
|
-
return
|
|
713
|
+
return Ne(e) ? e.scrollX : e.scrollLeft;
|
|
714
714
|
}
|
|
715
715
|
function Sn(e) {
|
|
716
|
-
return
|
|
716
|
+
return Ne(e) ? e.scrollY : e.scrollTop;
|
|
717
717
|
}
|
|
718
718
|
function Rt(e) {
|
|
719
719
|
return {
|
|
@@ -721,10 +721,10 @@ function Rt(e) {
|
|
|
721
721
|
y: Sn(e)
|
|
722
722
|
};
|
|
723
723
|
}
|
|
724
|
-
var
|
|
724
|
+
var V;
|
|
725
725
|
(function(e) {
|
|
726
726
|
e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
|
|
727
|
-
})(
|
|
727
|
+
})(V || (V = {}));
|
|
728
728
|
function In(e) {
|
|
729
729
|
return !ft || !e ? !1 : e === document.scrollingElement;
|
|
730
730
|
}
|
|
@@ -767,20 +767,20 @@ function Nr(e, t, n, r, o) {
|
|
|
767
767
|
isTop: c,
|
|
768
768
|
isBottom: u,
|
|
769
769
|
isLeft: d,
|
|
770
|
-
isRight:
|
|
771
|
-
} = Rn(e),
|
|
770
|
+
isRight: h
|
|
771
|
+
} = Rn(e), f = {
|
|
772
772
|
x: 0,
|
|
773
773
|
y: 0
|
|
774
|
-
},
|
|
774
|
+
}, m = {
|
|
775
775
|
x: 0,
|
|
776
776
|
y: 0
|
|
777
|
-
},
|
|
777
|
+
}, g = {
|
|
778
778
|
height: t.height * o.y,
|
|
779
779
|
width: t.width * o.x
|
|
780
780
|
};
|
|
781
|
-
return !c && i <= t.top +
|
|
782
|
-
direction:
|
|
783
|
-
speed:
|
|
781
|
+
return !c && i <= t.top + g.height ? (f.y = V.Backward, m.y = r * Math.abs((t.top + g.height - i) / g.height)) : !u && l >= t.bottom - g.height && (f.y = V.Forward, m.y = r * Math.abs((t.bottom - g.height - l) / g.height)), !h && a >= t.right - g.width ? (f.x = V.Forward, m.x = r * Math.abs((t.right - g.width - a) / g.width)) : !d && s <= t.left + g.width && (f.x = V.Backward, m.x = r * Math.abs((t.left + g.width - s) / g.width)), {
|
|
782
|
+
direction: f,
|
|
783
|
+
speed: m
|
|
784
784
|
};
|
|
785
785
|
}
|
|
786
786
|
function Mr(e) {
|
|
@@ -814,7 +814,7 @@ function Mr(e) {
|
|
|
814
814
|
};
|
|
815
815
|
}
|
|
816
816
|
function En(e) {
|
|
817
|
-
return e.reduce((t, n) =>
|
|
817
|
+
return e.reduce((t, n) => Te(t, Rt(n)), de);
|
|
818
818
|
}
|
|
819
819
|
function Lr(e) {
|
|
820
820
|
return e.reduce((t, n) => t + Cn(n), 0);
|
|
@@ -823,7 +823,7 @@ function Pr(e) {
|
|
|
823
823
|
return e.reduce((t, n) => t + Sn(n), 0);
|
|
824
824
|
}
|
|
825
825
|
function On(e, t) {
|
|
826
|
-
if (t === void 0 && (t =
|
|
826
|
+
if (t === void 0 && (t = Le), !e)
|
|
827
827
|
return;
|
|
828
828
|
const {
|
|
829
829
|
top: n,
|
|
@@ -875,8 +875,8 @@ class Fe {
|
|
|
875
875
|
function Br(e) {
|
|
876
876
|
const {
|
|
877
877
|
EventTarget: t
|
|
878
|
-
} =
|
|
879
|
-
return e instanceof t ? e :
|
|
878
|
+
} = J(e);
|
|
879
|
+
return e instanceof t ? e : Me(e);
|
|
880
880
|
}
|
|
881
881
|
function Dt(e, t) {
|
|
882
882
|
const n = Math.abs(e.x), r = Math.abs(e.y);
|
|
@@ -892,35 +892,35 @@ function tn(e) {
|
|
|
892
892
|
function zr(e) {
|
|
893
893
|
e.stopPropagation();
|
|
894
894
|
}
|
|
895
|
-
var
|
|
895
|
+
var I;
|
|
896
896
|
(function(e) {
|
|
897
897
|
e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter";
|
|
898
|
-
})(
|
|
898
|
+
})(I || (I = {}));
|
|
899
899
|
const Tn = {
|
|
900
|
-
start: [
|
|
901
|
-
cancel: [
|
|
902
|
-
end: [
|
|
900
|
+
start: [I.Space, I.Enter],
|
|
901
|
+
cancel: [I.Esc],
|
|
902
|
+
end: [I.Space, I.Enter]
|
|
903
903
|
}, $r = (e, t) => {
|
|
904
904
|
let {
|
|
905
905
|
currentCoordinates: n
|
|
906
906
|
} = t;
|
|
907
907
|
switch (e.code) {
|
|
908
|
-
case
|
|
908
|
+
case I.Right:
|
|
909
909
|
return {
|
|
910
910
|
...n,
|
|
911
911
|
x: n.x + 25
|
|
912
912
|
};
|
|
913
|
-
case
|
|
913
|
+
case I.Left:
|
|
914
914
|
return {
|
|
915
915
|
...n,
|
|
916
916
|
x: n.x - 25
|
|
917
917
|
};
|
|
918
|
-
case
|
|
918
|
+
case I.Down:
|
|
919
919
|
return {
|
|
920
920
|
...n,
|
|
921
921
|
y: n.y + 25
|
|
922
922
|
};
|
|
923
|
-
case
|
|
923
|
+
case I.Up:
|
|
924
924
|
return {
|
|
925
925
|
...n,
|
|
926
926
|
y: n.y - 25
|
|
@@ -935,7 +935,7 @@ class zt {
|
|
|
935
935
|
target: n
|
|
936
936
|
}
|
|
937
937
|
} = t;
|
|
938
|
-
this.props = t, this.listeners = new Fe(
|
|
938
|
+
this.props = t, this.listeners = new Fe(Me(n)), this.windowListeners = new Fe(J(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
|
|
939
939
|
}
|
|
940
940
|
attach() {
|
|
941
941
|
this.handleStart(), this.windowListeners.add(oe.Resize, this.handleCancel), this.windowListeners.add(oe.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(oe.Keydown, this.handleKeyDown));
|
|
@@ -981,55 +981,55 @@ class zt {
|
|
|
981
981
|
currentCoordinates: u
|
|
982
982
|
});
|
|
983
983
|
if (d) {
|
|
984
|
-
const
|
|
984
|
+
const h = st(d, u), f = {
|
|
985
985
|
x: 0,
|
|
986
986
|
y: 0
|
|
987
987
|
}, {
|
|
988
|
-
scrollableAncestors:
|
|
988
|
+
scrollableAncestors: m
|
|
989
989
|
} = r.current;
|
|
990
|
-
for (const
|
|
990
|
+
for (const g of m) {
|
|
991
991
|
const p = t.code, {
|
|
992
|
-
isTop:
|
|
993
|
-
isRight:
|
|
992
|
+
isTop: b,
|
|
993
|
+
isRight: x,
|
|
994
994
|
isLeft: y,
|
|
995
|
-
isBottom:
|
|
996
|
-
maxScroll:
|
|
997
|
-
minScroll:
|
|
998
|
-
} = Rn(
|
|
999
|
-
x: Math.min(p ===
|
|
1000
|
-
y: Math.min(p ===
|
|
1001
|
-
}, M = p ===
|
|
995
|
+
isBottom: S,
|
|
996
|
+
maxScroll: D,
|
|
997
|
+
minScroll: w
|
|
998
|
+
} = Rn(g), R = Mr(g), E = {
|
|
999
|
+
x: Math.min(p === I.Right ? R.right - R.width / 2 : R.right, Math.max(p === I.Right ? R.left : R.left + R.width / 2, d.x)),
|
|
1000
|
+
y: Math.min(p === I.Down ? R.bottom - R.height / 2 : R.bottom, Math.max(p === I.Down ? R.top : R.top + R.height / 2, d.y))
|
|
1001
|
+
}, M = p === I.Right && !x || p === I.Left && !y, _ = p === I.Down && !S || p === I.Up && !b;
|
|
1002
1002
|
if (M && E.x !== d.x) {
|
|
1003
|
-
const
|
|
1004
|
-
if (
|
|
1005
|
-
|
|
1006
|
-
left:
|
|
1003
|
+
const T = g.scrollLeft + h.x, Z = p === I.Right && T <= D.x || p === I.Left && T >= w.x;
|
|
1004
|
+
if (Z && !h.y) {
|
|
1005
|
+
g.scrollTo({
|
|
1006
|
+
left: T,
|
|
1007
1007
|
behavior: a
|
|
1008
1008
|
});
|
|
1009
1009
|
return;
|
|
1010
1010
|
}
|
|
1011
|
-
|
|
1012
|
-
left: -
|
|
1011
|
+
Z ? f.x = g.scrollLeft - T : f.x = p === I.Right ? g.scrollLeft - D.x : g.scrollLeft - w.x, f.x && g.scrollBy({
|
|
1012
|
+
left: -f.x,
|
|
1013
1013
|
behavior: a
|
|
1014
1014
|
});
|
|
1015
1015
|
break;
|
|
1016
|
-
} else if (
|
|
1017
|
-
const
|
|
1018
|
-
if (
|
|
1019
|
-
|
|
1020
|
-
top:
|
|
1016
|
+
} else if (_ && E.y !== d.y) {
|
|
1017
|
+
const T = g.scrollTop + h.y, Z = p === I.Down && T <= D.y || p === I.Up && T >= w.y;
|
|
1018
|
+
if (Z && !h.x) {
|
|
1019
|
+
g.scrollTo({
|
|
1020
|
+
top: T,
|
|
1021
1021
|
behavior: a
|
|
1022
1022
|
});
|
|
1023
1023
|
return;
|
|
1024
1024
|
}
|
|
1025
|
-
|
|
1026
|
-
top: -
|
|
1025
|
+
Z ? f.y = g.scrollTop - T : f.y = p === I.Down ? g.scrollTop - D.y : g.scrollTop - w.y, f.y && g.scrollBy({
|
|
1026
|
+
top: -f.y,
|
|
1027
1027
|
behavior: a
|
|
1028
1028
|
});
|
|
1029
1029
|
break;
|
|
1030
1030
|
}
|
|
1031
1031
|
}
|
|
1032
|
-
this.handleMove(t,
|
|
1032
|
+
this.handleMove(t, Te(st(d, this.referenceCoordinates), f));
|
|
1033
1033
|
}
|
|
1034
1034
|
}
|
|
1035
1035
|
}
|
|
@@ -1091,7 +1091,7 @@ class $t {
|
|
|
1091
1091
|
} = t, {
|
|
1092
1092
|
target: s
|
|
1093
1093
|
} = i;
|
|
1094
|
-
this.props = t, this.events = n, this.document =
|
|
1094
|
+
this.props = t, this.events = n, this.document = Me(s), this.documentListeners = new Fe(this.document), this.listeners = new Fe(r), this.windowListeners = new Fe(J(s)), this.initialCoordinates = (o = at(i)) != null ? o : de, this.handleStart = this.handleStart.bind(this), this.handleMove = this.handleMove.bind(this), this.handleEnd = this.handleEnd.bind(this), this.handleCancel = this.handleCancel.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.removeTextSelection = this.removeTextSelection.bind(this), this.attach();
|
|
1095
1095
|
}
|
|
1096
1096
|
attach() {
|
|
1097
1097
|
const {
|
|
@@ -1173,7 +1173,7 @@ class $t {
|
|
|
1173
1173
|
this.detach(), t();
|
|
1174
1174
|
}
|
|
1175
1175
|
handleKeydown(t) {
|
|
1176
|
-
t.code ===
|
|
1176
|
+
t.code === I.Esc && this.handleCancel();
|
|
1177
1177
|
}
|
|
1178
1178
|
removeTextSelection() {
|
|
1179
1179
|
var t;
|
|
@@ -1192,7 +1192,7 @@ class _t extends $t {
|
|
|
1192
1192
|
constructor(t) {
|
|
1193
1193
|
const {
|
|
1194
1194
|
event: n
|
|
1195
|
-
} = t, r =
|
|
1195
|
+
} = t, r = Me(n.target);
|
|
1196
1196
|
super(t, _r, r);
|
|
1197
1197
|
}
|
|
1198
1198
|
}
|
|
@@ -1223,7 +1223,7 @@ var Et;
|
|
|
1223
1223
|
})(Et || (Et = {}));
|
|
1224
1224
|
class Fr extends $t {
|
|
1225
1225
|
constructor(t) {
|
|
1226
|
-
super(t, jr,
|
|
1226
|
+
super(t, jr, Me(t.event.target));
|
|
1227
1227
|
}
|
|
1228
1228
|
}
|
|
1229
1229
|
Fr.activators = [{
|
|
@@ -1299,18 +1299,18 @@ function Xr(e) {
|
|
|
1299
1299
|
scrollableAncestors: c,
|
|
1300
1300
|
scrollableAncestorRects: u,
|
|
1301
1301
|
delta: d,
|
|
1302
|
-
threshold:
|
|
1302
|
+
threshold: h
|
|
1303
1303
|
} = e;
|
|
1304
|
-
const
|
|
1304
|
+
const f = Vr({
|
|
1305
1305
|
delta: d,
|
|
1306
1306
|
disabled: !i
|
|
1307
|
-
}), [
|
|
1307
|
+
}), [m, g] = nr(), p = k({
|
|
1308
1308
|
x: 0,
|
|
1309
1309
|
y: 0
|
|
1310
|
-
}),
|
|
1310
|
+
}), b = k({
|
|
1311
1311
|
x: 0,
|
|
1312
1312
|
y: 0
|
|
1313
|
-
}),
|
|
1313
|
+
}), x = N(() => {
|
|
1314
1314
|
switch (n) {
|
|
1315
1315
|
case He.Pointer:
|
|
1316
1316
|
return l ? {
|
|
@@ -1322,73 +1322,73 @@ function Xr(e) {
|
|
|
1322
1322
|
case He.DraggableRect:
|
|
1323
1323
|
return o;
|
|
1324
1324
|
}
|
|
1325
|
-
}, [n, o, l]), y =
|
|
1326
|
-
const
|
|
1327
|
-
if (!
|
|
1325
|
+
}, [n, o, l]), y = k(null), S = z(() => {
|
|
1326
|
+
const w = y.current;
|
|
1327
|
+
if (!w)
|
|
1328
1328
|
return;
|
|
1329
|
-
const R = p.current.x *
|
|
1330
|
-
|
|
1331
|
-
}, []),
|
|
1332
|
-
|
|
1329
|
+
const R = p.current.x * b.current.x, E = p.current.y * b.current.y;
|
|
1330
|
+
w.scrollBy(R, E);
|
|
1331
|
+
}, []), D = N(() => a === ct.TreeOrder ? [...c].reverse() : c, [a, c]);
|
|
1332
|
+
P(
|
|
1333
1333
|
() => {
|
|
1334
|
-
if (!i || !c.length || !
|
|
1335
|
-
|
|
1334
|
+
if (!i || !c.length || !x) {
|
|
1335
|
+
g();
|
|
1336
1336
|
return;
|
|
1337
1337
|
}
|
|
1338
|
-
for (const
|
|
1339
|
-
if ((r == null ? void 0 : r(
|
|
1338
|
+
for (const w of D) {
|
|
1339
|
+
if ((r == null ? void 0 : r(w)) === !1)
|
|
1340
1340
|
continue;
|
|
1341
|
-
const R = c.indexOf(
|
|
1341
|
+
const R = c.indexOf(w), E = u[R];
|
|
1342
1342
|
if (!E)
|
|
1343
1343
|
continue;
|
|
1344
1344
|
const {
|
|
1345
1345
|
direction: M,
|
|
1346
|
-
speed:
|
|
1347
|
-
} = Nr(
|
|
1348
|
-
for (const
|
|
1349
|
-
|
|
1350
|
-
if (
|
|
1351
|
-
|
|
1346
|
+
speed: _
|
|
1347
|
+
} = Nr(w, E, x, t, h);
|
|
1348
|
+
for (const T of ["x", "y"])
|
|
1349
|
+
f[T][M[T]] || (_[T] = 0, M[T] = 0);
|
|
1350
|
+
if (_.x > 0 || _.y > 0) {
|
|
1351
|
+
g(), y.current = w, m(S, s), p.current = _, b.current = M;
|
|
1352
1352
|
return;
|
|
1353
1353
|
}
|
|
1354
1354
|
}
|
|
1355
1355
|
p.current = {
|
|
1356
1356
|
x: 0,
|
|
1357
1357
|
y: 0
|
|
1358
|
-
},
|
|
1358
|
+
}, b.current = {
|
|
1359
1359
|
x: 0,
|
|
1360
1360
|
y: 0
|
|
1361
|
-
},
|
|
1361
|
+
}, g();
|
|
1362
1362
|
},
|
|
1363
1363
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1364
1364
|
[
|
|
1365
1365
|
t,
|
|
1366
|
-
|
|
1366
|
+
S,
|
|
1367
1367
|
r,
|
|
1368
|
-
|
|
1368
|
+
g,
|
|
1369
1369
|
i,
|
|
1370
1370
|
s,
|
|
1371
1371
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1372
|
-
JSON.stringify(
|
|
1372
|
+
JSON.stringify(x),
|
|
1373
1373
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1374
|
-
JSON.stringify(
|
|
1375
|
-
|
|
1374
|
+
JSON.stringify(f),
|
|
1375
|
+
m,
|
|
1376
1376
|
c,
|
|
1377
|
-
|
|
1377
|
+
D,
|
|
1378
1378
|
u,
|
|
1379
1379
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1380
|
-
JSON.stringify(
|
|
1380
|
+
JSON.stringify(h)
|
|
1381
1381
|
]
|
|
1382
1382
|
);
|
|
1383
1383
|
}
|
|
1384
1384
|
const Yr = {
|
|
1385
1385
|
x: {
|
|
1386
|
-
[
|
|
1387
|
-
[
|
|
1386
|
+
[V.Backward]: !1,
|
|
1387
|
+
[V.Forward]: !1
|
|
1388
1388
|
},
|
|
1389
1389
|
y: {
|
|
1390
|
-
[
|
|
1391
|
-
[
|
|
1390
|
+
[V.Backward]: !1,
|
|
1391
|
+
[V.Forward]: !1
|
|
1392
1392
|
}
|
|
1393
1393
|
};
|
|
1394
1394
|
function Vr(e) {
|
|
@@ -1406,12 +1406,12 @@ function Vr(e) {
|
|
|
1406
1406
|
};
|
|
1407
1407
|
return {
|
|
1408
1408
|
x: {
|
|
1409
|
-
[
|
|
1410
|
-
[
|
|
1409
|
+
[V.Backward]: o.x[V.Backward] || i.x === -1,
|
|
1410
|
+
[V.Forward]: o.x[V.Forward] || i.x === 1
|
|
1411
1411
|
},
|
|
1412
1412
|
y: {
|
|
1413
|
-
[
|
|
1414
|
-
[
|
|
1413
|
+
[V.Backward]: o.y[V.Backward] || i.y === -1,
|
|
1414
|
+
[V.Forward]: o.y[V.Forward] || i.y === 1
|
|
1415
1415
|
}
|
|
1416
1416
|
};
|
|
1417
1417
|
}, [n, t, r]);
|
|
@@ -1424,7 +1424,7 @@ function Kr(e, t) {
|
|
|
1424
1424
|
}, [r, t]);
|
|
1425
1425
|
}
|
|
1426
1426
|
function Ur(e, t) {
|
|
1427
|
-
return
|
|
1427
|
+
return N(() => e.reduce((n, r) => {
|
|
1428
1428
|
const {
|
|
1429
1429
|
sensor: o
|
|
1430
1430
|
} = r, i = o.activators.map((s) => ({
|
|
@@ -1434,10 +1434,10 @@ function Ur(e, t) {
|
|
|
1434
1434
|
return [...n, ...i];
|
|
1435
1435
|
}, []), [e, t]);
|
|
1436
1436
|
}
|
|
1437
|
-
var
|
|
1437
|
+
var Ae;
|
|
1438
1438
|
(function(e) {
|
|
1439
1439
|
e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging";
|
|
1440
|
-
})(
|
|
1440
|
+
})(Ae || (Ae = {}));
|
|
1441
1441
|
var Ot;
|
|
1442
1442
|
(function(e) {
|
|
1443
1443
|
e.Optimized = "optimized";
|
|
@@ -1449,63 +1449,63 @@ function Wr(e, t) {
|
|
|
1449
1449
|
dependencies: r,
|
|
1450
1450
|
config: o
|
|
1451
1451
|
} = t;
|
|
1452
|
-
const [i, s] =
|
|
1452
|
+
const [i, s] = K(null), {
|
|
1453
1453
|
frequency: a,
|
|
1454
1454
|
measure: l,
|
|
1455
1455
|
strategy: c
|
|
1456
|
-
} = o, u =
|
|
1457
|
-
|
|
1458
|
-
}, [
|
|
1456
|
+
} = o, u = k(e), d = p(), h = Ye(d), f = z(function(b) {
|
|
1457
|
+
b === void 0 && (b = []), !h.current && s((x) => x === null ? b : x.concat(b.filter((y) => !x.includes(y))));
|
|
1458
|
+
}, [h]), m = k(null), g = We((b) => {
|
|
1459
1459
|
if (d && !n)
|
|
1460
1460
|
return on;
|
|
1461
|
-
if (!
|
|
1462
|
-
const
|
|
1461
|
+
if (!b || b === on || u.current !== e || i != null) {
|
|
1462
|
+
const x = /* @__PURE__ */ new Map();
|
|
1463
1463
|
for (let y of e) {
|
|
1464
1464
|
if (!y)
|
|
1465
1465
|
continue;
|
|
1466
1466
|
if (i && i.length > 0 && !i.includes(y.id) && y.rect.current) {
|
|
1467
|
-
|
|
1467
|
+
x.set(y.id, y.rect.current);
|
|
1468
1468
|
continue;
|
|
1469
1469
|
}
|
|
1470
|
-
const
|
|
1471
|
-
y.rect.current =
|
|
1470
|
+
const S = y.node.current, D = S ? new Bt(l(S), S) : null;
|
|
1471
|
+
y.rect.current = D, D && x.set(y.id, D);
|
|
1472
1472
|
}
|
|
1473
|
-
return
|
|
1473
|
+
return x;
|
|
1474
1474
|
}
|
|
1475
|
-
return
|
|
1475
|
+
return b;
|
|
1476
1476
|
}, [e, i, n, d, l]);
|
|
1477
|
-
return
|
|
1477
|
+
return P(() => {
|
|
1478
1478
|
u.current = e;
|
|
1479
|
-
}, [e]),
|
|
1479
|
+
}, [e]), P(
|
|
1480
1480
|
() => {
|
|
1481
|
-
d ||
|
|
1481
|
+
d || f();
|
|
1482
1482
|
},
|
|
1483
1483
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1484
1484
|
[n, d]
|
|
1485
|
-
),
|
|
1485
|
+
), P(
|
|
1486
1486
|
() => {
|
|
1487
1487
|
i && i.length > 0 && s(null);
|
|
1488
1488
|
},
|
|
1489
1489
|
//eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1490
1490
|
[JSON.stringify(i)]
|
|
1491
|
-
),
|
|
1491
|
+
), P(
|
|
1492
1492
|
() => {
|
|
1493
|
-
d || typeof a != "number" ||
|
|
1494
|
-
|
|
1493
|
+
d || typeof a != "number" || m.current !== null || (m.current = setTimeout(() => {
|
|
1494
|
+
f(), m.current = null;
|
|
1495
1495
|
}, a));
|
|
1496
1496
|
},
|
|
1497
1497
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1498
|
-
[a, d,
|
|
1498
|
+
[a, d, f, ...r]
|
|
1499
1499
|
), {
|
|
1500
|
-
droppableRects:
|
|
1501
|
-
measureDroppableContainers:
|
|
1500
|
+
droppableRects: g,
|
|
1501
|
+
measureDroppableContainers: f,
|
|
1502
1502
|
measuringScheduled: i != null
|
|
1503
1503
|
};
|
|
1504
1504
|
function p() {
|
|
1505
1505
|
switch (c) {
|
|
1506
|
-
case
|
|
1506
|
+
case Ae.Always:
|
|
1507
1507
|
return !1;
|
|
1508
|
-
case
|
|
1508
|
+
case Ae.BeforeDragging:
|
|
1509
1509
|
return n;
|
|
1510
1510
|
default:
|
|
1511
1511
|
return !n;
|
|
@@ -1523,7 +1523,7 @@ function qr(e) {
|
|
|
1523
1523
|
callback: t,
|
|
1524
1524
|
disabled: n
|
|
1525
1525
|
} = e;
|
|
1526
|
-
const r = gt(t), o =
|
|
1526
|
+
const r = gt(t), o = N(() => {
|
|
1527
1527
|
if (n || typeof window > "u" || typeof window.MutationObserver > "u")
|
|
1528
1528
|
return;
|
|
1529
1529
|
const {
|
|
@@ -1531,14 +1531,14 @@ function qr(e) {
|
|
|
1531
1531
|
} = window;
|
|
1532
1532
|
return new i(r);
|
|
1533
1533
|
}, [r, n]);
|
|
1534
|
-
return
|
|
1534
|
+
return P(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
|
|
1535
1535
|
}
|
|
1536
1536
|
function pt(e) {
|
|
1537
1537
|
let {
|
|
1538
1538
|
callback: t,
|
|
1539
1539
|
disabled: n
|
|
1540
1540
|
} = e;
|
|
1541
|
-
const r = gt(t), o =
|
|
1541
|
+
const r = gt(t), o = N(
|
|
1542
1542
|
() => {
|
|
1543
1543
|
if (n || typeof window > "u" || typeof window.ResizeObserver > "u")
|
|
1544
1544
|
return;
|
|
@@ -1550,10 +1550,10 @@ function pt(e) {
|
|
|
1550
1550
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1551
1551
|
[n]
|
|
1552
1552
|
);
|
|
1553
|
-
return
|
|
1553
|
+
return P(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
|
|
1554
1554
|
}
|
|
1555
1555
|
function Gr(e) {
|
|
1556
|
-
return new Bt(
|
|
1556
|
+
return new Bt(Le(e), e);
|
|
1557
1557
|
}
|
|
1558
1558
|
function sn(e, t, n) {
|
|
1559
1559
|
t === void 0 && (t = Gr);
|
|
@@ -1597,17 +1597,17 @@ function Zr(e) {
|
|
|
1597
1597
|
}
|
|
1598
1598
|
const an = [];
|
|
1599
1599
|
function Qr(e) {
|
|
1600
|
-
const t =
|
|
1601
|
-
return
|
|
1600
|
+
const t = k(e), n = We((r) => e ? r && r !== an && e && t.current && e.parentNode === t.current.parentNode ? r : kt(e) : an, [e]);
|
|
1601
|
+
return P(() => {
|
|
1602
1602
|
t.current = e;
|
|
1603
1603
|
}, [e]), n;
|
|
1604
1604
|
}
|
|
1605
1605
|
function eo(e) {
|
|
1606
|
-
const [t, n] =
|
|
1606
|
+
const [t, n] = K(null), r = k(e), o = z((i) => {
|
|
1607
1607
|
const s = xt(i.target);
|
|
1608
1608
|
s && n((a) => a ? (a.set(s, Rt(s)), new Map(a)) : null);
|
|
1609
1609
|
}, []);
|
|
1610
|
-
return
|
|
1610
|
+
return P(() => {
|
|
1611
1611
|
const i = r.current;
|
|
1612
1612
|
if (e !== i) {
|
|
1613
1613
|
s(i);
|
|
@@ -1628,24 +1628,24 @@ function eo(e) {
|
|
|
1628
1628
|
c == null || c.removeEventListener("scroll", o);
|
|
1629
1629
|
});
|
|
1630
1630
|
}
|
|
1631
|
-
}, [o, e]),
|
|
1631
|
+
}, [o, e]), N(() => e.length ? t ? Array.from(t.values()).reduce((i, s) => Te(i, s), de) : En(e) : de, [e, t]);
|
|
1632
1632
|
}
|
|
1633
1633
|
function ln(e, t) {
|
|
1634
1634
|
t === void 0 && (t = []);
|
|
1635
|
-
const n =
|
|
1636
|
-
return
|
|
1635
|
+
const n = k(null);
|
|
1636
|
+
return P(
|
|
1637
1637
|
() => {
|
|
1638
1638
|
n.current = null;
|
|
1639
1639
|
},
|
|
1640
1640
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1641
1641
|
t
|
|
1642
|
-
),
|
|
1642
|
+
), P(() => {
|
|
1643
1643
|
const r = e !== de;
|
|
1644
1644
|
r && !n.current && (n.current = e), !r && n.current && (n.current = null);
|
|
1645
1645
|
}, [e]), n.current ? st(e, n.current) : de;
|
|
1646
1646
|
}
|
|
1647
1647
|
function to(e) {
|
|
1648
|
-
|
|
1648
|
+
P(
|
|
1649
1649
|
() => {
|
|
1650
1650
|
if (!ft)
|
|
1651
1651
|
return;
|
|
@@ -1671,7 +1671,7 @@ function to(e) {
|
|
|
1671
1671
|
);
|
|
1672
1672
|
}
|
|
1673
1673
|
function no(e, t) {
|
|
1674
|
-
return
|
|
1674
|
+
return N(() => e.reduce((n, r) => {
|
|
1675
1675
|
let {
|
|
1676
1676
|
eventName: o,
|
|
1677
1677
|
handler: i
|
|
@@ -1682,12 +1682,12 @@ function no(e, t) {
|
|
|
1682
1682
|
}, {}), [e, t]);
|
|
1683
1683
|
}
|
|
1684
1684
|
function An(e) {
|
|
1685
|
-
return
|
|
1685
|
+
return N(() => e ? Er(e) : null, [e]);
|
|
1686
1686
|
}
|
|
1687
1687
|
const St = [];
|
|
1688
1688
|
function ro(e, t) {
|
|
1689
|
-
t === void 0 && (t =
|
|
1690
|
-
const [n] = e, r = An(n ?
|
|
1689
|
+
t === void 0 && (t = Le);
|
|
1690
|
+
const [n] = e, r = An(n ? J(n) : null), [o, i] = Mt(a, St), s = pt({
|
|
1691
1691
|
callback: i
|
|
1692
1692
|
});
|
|
1693
1693
|
return e.length > 0 && o === St && i(), ie(() => {
|
|
@@ -1709,28 +1709,28 @@ function oo(e) {
|
|
|
1709
1709
|
let {
|
|
1710
1710
|
measure: t
|
|
1711
1711
|
} = e;
|
|
1712
|
-
const [n, r] =
|
|
1712
|
+
const [n, r] = K(null), o = z((c) => {
|
|
1713
1713
|
for (const {
|
|
1714
1714
|
target: u
|
|
1715
1715
|
} of c)
|
|
1716
1716
|
if (Ue(u)) {
|
|
1717
1717
|
r((d) => {
|
|
1718
|
-
const
|
|
1718
|
+
const h = t(u);
|
|
1719
1719
|
return d ? {
|
|
1720
1720
|
...d,
|
|
1721
|
-
width:
|
|
1722
|
-
height:
|
|
1723
|
-
} :
|
|
1721
|
+
width: h.width,
|
|
1722
|
+
height: h.height
|
|
1723
|
+
} : h;
|
|
1724
1724
|
});
|
|
1725
1725
|
break;
|
|
1726
1726
|
}
|
|
1727
1727
|
}, [t]), i = pt({
|
|
1728
1728
|
callback: o
|
|
1729
|
-
}), s =
|
|
1729
|
+
}), s = z((c) => {
|
|
1730
1730
|
const u = Nn(c);
|
|
1731
1731
|
i == null || i.disconnect(), u && (i == null || i.observe(u)), r(u ? t(u) : null);
|
|
1732
1732
|
}, [t, i]), [a, l] = ot(s);
|
|
1733
|
-
return
|
|
1733
|
+
return N(() => ({
|
|
1734
1734
|
nodeRef: a,
|
|
1735
1735
|
rect: n,
|
|
1736
1736
|
setRef: l
|
|
@@ -1750,11 +1750,11 @@ const io = [{
|
|
|
1750
1750
|
},
|
|
1751
1751
|
droppable: {
|
|
1752
1752
|
measure: en,
|
|
1753
|
-
strategy:
|
|
1753
|
+
strategy: Ae.WhileDragging,
|
|
1754
1754
|
frequency: Ot.Optimized
|
|
1755
1755
|
},
|
|
1756
1756
|
dragOverlay: {
|
|
1757
|
-
measure:
|
|
1757
|
+
measure: Le
|
|
1758
1758
|
}
|
|
1759
1759
|
};
|
|
1760
1760
|
class Xe extends Map {
|
|
@@ -1935,8 +1935,8 @@ function uo(e) {
|
|
|
1935
1935
|
active: n,
|
|
1936
1936
|
activatorEvent: r,
|
|
1937
1937
|
draggableNodes: o
|
|
1938
|
-
} =
|
|
1939
|
-
return
|
|
1938
|
+
} = De(qe), i = it(r), s = it(n == null ? void 0 : n.id);
|
|
1939
|
+
return P(() => {
|
|
1940
1940
|
if (!t && !r && i && s != null) {
|
|
1941
1941
|
if (!ht(i) || document.activeElement === i.target)
|
|
1942
1942
|
return;
|
|
@@ -1974,7 +1974,7 @@ function Pn(e, t) {
|
|
|
1974
1974
|
}), n) : n;
|
|
1975
1975
|
}
|
|
1976
1976
|
function fo(e) {
|
|
1977
|
-
return
|
|
1977
|
+
return N(
|
|
1978
1978
|
() => ({
|
|
1979
1979
|
draggable: {
|
|
1980
1980
|
...rt.draggable,
|
|
@@ -2000,7 +2000,7 @@ function go(e) {
|
|
|
2000
2000
|
initialRect: r,
|
|
2001
2001
|
config: o = !0
|
|
2002
2002
|
} = e;
|
|
2003
|
-
const i =
|
|
2003
|
+
const i = k(!1), {
|
|
2004
2004
|
x: s,
|
|
2005
2005
|
y: a
|
|
2006
2006
|
} = typeof o == "boolean" ? {
|
|
@@ -2019,8 +2019,8 @@ function go(e) {
|
|
|
2019
2019
|
return;
|
|
2020
2020
|
const u = n(c), d = wn(u, r);
|
|
2021
2021
|
if (s || (d.x = 0), a || (d.y = 0), i.current = !0, Math.abs(d.x) > 0 || Math.abs(d.y) > 0) {
|
|
2022
|
-
const
|
|
2023
|
-
|
|
2022
|
+
const h = Dn(c);
|
|
2023
|
+
h && h.scrollBy({
|
|
2024
2024
|
top: d.y,
|
|
2025
2025
|
left: d.x
|
|
2026
2026
|
});
|
|
@@ -2032,10 +2032,10 @@ const vt = /* @__PURE__ */ Ke({
|
|
|
2032
2032
|
scaleX: 1,
|
|
2033
2033
|
scaleY: 1
|
|
2034
2034
|
});
|
|
2035
|
-
var
|
|
2035
|
+
var xe;
|
|
2036
2036
|
(function(e) {
|
|
2037
2037
|
e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
|
|
2038
|
-
})(
|
|
2038
|
+
})(xe || (xe = {}));
|
|
2039
2039
|
const ho = /* @__PURE__ */ ut(function(t) {
|
|
2040
2040
|
var n, r, o, i;
|
|
2041
2041
|
let {
|
|
@@ -2045,105 +2045,105 @@ const ho = /* @__PURE__ */ ut(function(t) {
|
|
|
2045
2045
|
children: c,
|
|
2046
2046
|
sensors: u = io,
|
|
2047
2047
|
collisionDetection: d = xr,
|
|
2048
|
-
measuring:
|
|
2049
|
-
modifiers:
|
|
2050
|
-
...
|
|
2048
|
+
measuring: h,
|
|
2049
|
+
modifiers: f,
|
|
2050
|
+
...m
|
|
2051
2051
|
} = t;
|
|
2052
|
-
const
|
|
2052
|
+
const g = Mt(co, void 0, lo), [p, b] = g, [x, y] = dr(), [S, D] = K(xe.Uninitialized), w = S === xe.Initialized, {
|
|
2053
2053
|
draggable: {
|
|
2054
2054
|
active: R,
|
|
2055
2055
|
nodes: E,
|
|
2056
2056
|
translate: M
|
|
2057
2057
|
},
|
|
2058
2058
|
droppable: {
|
|
2059
|
-
containers:
|
|
2059
|
+
containers: _
|
|
2060
2060
|
}
|
|
2061
|
-
} = p,
|
|
2061
|
+
} = p, T = R ? E.get(R) : null, Z = k({
|
|
2062
2062
|
initial: null,
|
|
2063
2063
|
translated: null
|
|
2064
|
-
}),
|
|
2064
|
+
}), Q = N(() => {
|
|
2065
2065
|
var U;
|
|
2066
2066
|
return R != null ? {
|
|
2067
2067
|
id: R,
|
|
2068
2068
|
// It's possible for the active node to unmount while dragging
|
|
2069
|
-
data: (U =
|
|
2070
|
-
rect:
|
|
2069
|
+
data: (U = T == null ? void 0 : T.data) != null ? U : so,
|
|
2070
|
+
rect: Z
|
|
2071
2071
|
} : null;
|
|
2072
|
-
}, [R,
|
|
2073
|
-
droppableRects:
|
|
2074
|
-
measureDroppableContainers:
|
|
2075
|
-
measuringScheduled:
|
|
2076
|
-
} = Wr(
|
|
2077
|
-
dragging:
|
|
2072
|
+
}, [R, T]), ne = k(null), [fe, Ce] = K(null), [W, Se] = K(null), pe = Ye(m, Object.values(m)), ve = Je("DndDescribedBy", s), Pe = N(() => _.getEnabled(), [_]), v = fo(h), {
|
|
2073
|
+
droppableRects: C,
|
|
2074
|
+
measureDroppableContainers: B,
|
|
2075
|
+
measuringScheduled: L
|
|
2076
|
+
} = Wr(Pe, {
|
|
2077
|
+
dragging: w,
|
|
2078
2078
|
dependencies: [M.x, M.y],
|
|
2079
|
-
config:
|
|
2080
|
-
}),
|
|
2079
|
+
config: v.droppable
|
|
2080
|
+
}), A = Kr(E, R), q = N(() => W ? at(W) : null, [W]), H = Zn(), Y = Jr(A, v.draggable.measure);
|
|
2081
2081
|
go({
|
|
2082
2082
|
activeNode: R ? E.get(R) : null,
|
|
2083
|
-
config:
|
|
2084
|
-
initialRect:
|
|
2085
|
-
measure:
|
|
2083
|
+
config: H.layoutShiftCompensation,
|
|
2084
|
+
initialRect: Y,
|
|
2085
|
+
measure: v.draggable.measure
|
|
2086
2086
|
});
|
|
2087
|
-
const O = sn(
|
|
2087
|
+
const O = sn(A, v.draggable.measure, Y), se = sn(A ? A.parentElement : null), G = k({
|
|
2088
2088
|
activatorEvent: null,
|
|
2089
2089
|
active: null,
|
|
2090
|
-
activeNode:
|
|
2090
|
+
activeNode: A,
|
|
2091
2091
|
collisionRect: null,
|
|
2092
2092
|
collisions: null,
|
|
2093
|
-
droppableRects:
|
|
2093
|
+
droppableRects: C,
|
|
2094
2094
|
draggableNodes: E,
|
|
2095
2095
|
draggingNode: null,
|
|
2096
2096
|
draggingNodeRect: null,
|
|
2097
|
-
droppableContainers:
|
|
2097
|
+
droppableContainers: _,
|
|
2098
2098
|
over: null,
|
|
2099
2099
|
scrollableAncestors: [],
|
|
2100
2100
|
scrollAdjustedTranslate: null
|
|
2101
|
-
}),
|
|
2102
|
-
measure:
|
|
2103
|
-
}),
|
|
2101
|
+
}), j = _.getNodeFor((n = G.current.over) == null ? void 0 : n.id), ae = oo({
|
|
2102
|
+
measure: v.dragOverlay.measure
|
|
2103
|
+
}), be = (r = ae.nodeRef.current) != null ? r : A, Ie = w ? (o = ae.rect) != null ? o : O : null, Ft = !!(ae.nodeRef.current && ae.rect), Ht = Zr(Ft ? null : O), mt = An(be ? J(be) : null), me = Qr(w ? j ?? A : null), Ge = ro(me), Ze = Pn(f, {
|
|
2104
2104
|
transform: {
|
|
2105
2105
|
x: M.x - Ht.x,
|
|
2106
2106
|
y: M.y - Ht.y,
|
|
2107
2107
|
scaleX: 1,
|
|
2108
2108
|
scaleY: 1
|
|
2109
2109
|
},
|
|
2110
|
-
activatorEvent:
|
|
2111
|
-
active:
|
|
2110
|
+
activatorEvent: W,
|
|
2111
|
+
active: Q,
|
|
2112
2112
|
activeNodeRect: O,
|
|
2113
|
-
containerNodeRect:
|
|
2114
|
-
draggingNodeRect:
|
|
2115
|
-
over:
|
|
2113
|
+
containerNodeRect: se,
|
|
2114
|
+
draggingNodeRect: Ie,
|
|
2115
|
+
over: G.current.over,
|
|
2116
2116
|
overlayNodeRect: ae.rect,
|
|
2117
|
-
scrollableAncestors:
|
|
2117
|
+
scrollableAncestors: me,
|
|
2118
2118
|
scrollableAncestorRects: Ge,
|
|
2119
2119
|
windowRect: mt
|
|
2120
|
-
}), Xt =
|
|
2121
|
-
active:
|
|
2122
|
-
collisionRect:
|
|
2123
|
-
droppableRects:
|
|
2124
|
-
droppableContainers:
|
|
2120
|
+
}), Xt = q ? Te(q, M) : null, Yt = eo(me), Vn = ln(Yt), Kn = ln(Yt, [O]), Re = Te(Ze, Vn), Ee = Ie ? Sr(Ie, Ze) : null, ke = Q && Ee ? d({
|
|
2121
|
+
active: Q,
|
|
2122
|
+
collisionRect: Ee,
|
|
2123
|
+
droppableRects: C,
|
|
2124
|
+
droppableContainers: Pe,
|
|
2125
2125
|
pointerCoordinates: Xt
|
|
2126
|
-
}) : null, Vt = yn(ke, "id"), [
|
|
2127
|
-
(U,
|
|
2126
|
+
}) : null, Vt = yn(ke, "id"), [ye, Kt] = K(null), Un = Ft ? Ze : Te(Ze, Kn), Wn = Dr(Un, (i = ye == null ? void 0 : ye.rect) != null ? i : null, O), Ut = z(
|
|
2127
|
+
(U, ee) => {
|
|
2128
2128
|
let {
|
|
2129
|
-
sensor:
|
|
2130
|
-
options:
|
|
2131
|
-
} =
|
|
2132
|
-
if (
|
|
2129
|
+
sensor: te,
|
|
2130
|
+
options: we
|
|
2131
|
+
} = ee;
|
|
2132
|
+
if (ne.current == null)
|
|
2133
2133
|
return;
|
|
2134
|
-
const re = E.get(
|
|
2134
|
+
const re = E.get(ne.current);
|
|
2135
2135
|
if (!re)
|
|
2136
2136
|
return;
|
|
2137
|
-
const le = U.nativeEvent,
|
|
2138
|
-
active:
|
|
2137
|
+
const le = U.nativeEvent, ge = new te({
|
|
2138
|
+
active: ne.current,
|
|
2139
2139
|
activeNode: re,
|
|
2140
2140
|
event: le,
|
|
2141
|
-
options:
|
|
2141
|
+
options: we,
|
|
2142
2142
|
// Sensors need to be instantiated with refs for arguments that change over time
|
|
2143
2143
|
// otherwise they are frozen in time with the stale arguments
|
|
2144
|
-
context:
|
|
2144
|
+
context: G,
|
|
2145
2145
|
onStart(ce) {
|
|
2146
|
-
const Be =
|
|
2146
|
+
const Be = ne.current;
|
|
2147
2147
|
if (Be == null)
|
|
2148
2148
|
return;
|
|
2149
2149
|
const ze = E.get(Be);
|
|
@@ -2151,49 +2151,49 @@ const ho = /* @__PURE__ */ ut(function(t) {
|
|
|
2151
2151
|
return;
|
|
2152
2152
|
const {
|
|
2153
2153
|
onDragStart: Qe
|
|
2154
|
-
} =
|
|
2154
|
+
} = pe.current, et = {
|
|
2155
2155
|
active: {
|
|
2156
2156
|
id: Be,
|
|
2157
2157
|
data: ze.data,
|
|
2158
|
-
rect:
|
|
2158
|
+
rect: Z
|
|
2159
2159
|
}
|
|
2160
2160
|
};
|
|
2161
2161
|
je(() => {
|
|
2162
|
-
Qe == null || Qe(et),
|
|
2162
|
+
Qe == null || Qe(et), D(xe.Initializing), b({
|
|
2163
2163
|
type: X.DragStart,
|
|
2164
2164
|
initialCoordinates: ce,
|
|
2165
2165
|
active: Be
|
|
2166
|
-
}),
|
|
2166
|
+
}), x({
|
|
2167
2167
|
type: "onDragStart",
|
|
2168
2168
|
event: et
|
|
2169
2169
|
});
|
|
2170
2170
|
});
|
|
2171
2171
|
},
|
|
2172
2172
|
onMove(ce) {
|
|
2173
|
-
|
|
2173
|
+
b({
|
|
2174
2174
|
type: X.DragMove,
|
|
2175
2175
|
coordinates: ce
|
|
2176
2176
|
});
|
|
2177
2177
|
},
|
|
2178
|
-
onEnd:
|
|
2179
|
-
onCancel:
|
|
2178
|
+
onEnd: Oe(X.DragEnd),
|
|
2179
|
+
onCancel: Oe(X.DragCancel)
|
|
2180
2180
|
});
|
|
2181
2181
|
je(() => {
|
|
2182
|
-
|
|
2182
|
+
Ce(ge), Se(U.nativeEvent);
|
|
2183
2183
|
});
|
|
2184
|
-
function
|
|
2184
|
+
function Oe(ce) {
|
|
2185
2185
|
return async function() {
|
|
2186
2186
|
const {
|
|
2187
2187
|
active: ze,
|
|
2188
2188
|
collisions: Qe,
|
|
2189
2189
|
over: et,
|
|
2190
2190
|
scrollAdjustedTranslate: Jt
|
|
2191
|
-
} =
|
|
2191
|
+
} = G.current;
|
|
2192
2192
|
let $e = null;
|
|
2193
2193
|
if (ze && Jt) {
|
|
2194
2194
|
const {
|
|
2195
2195
|
cancelDrop: _e
|
|
2196
|
-
} =
|
|
2196
|
+
} = pe.current;
|
|
2197
2197
|
$e = {
|
|
2198
2198
|
activatorEvent: le,
|
|
2199
2199
|
active: ze,
|
|
@@ -2202,14 +2202,14 @@ const ho = /* @__PURE__ */ ut(function(t) {
|
|
|
2202
2202
|
over: et
|
|
2203
2203
|
}, ce === X.DragEnd && typeof _e == "function" && await Promise.resolve(_e($e)) && (ce = X.DragCancel);
|
|
2204
2204
|
}
|
|
2205
|
-
|
|
2206
|
-
|
|
2205
|
+
ne.current = null, je(() => {
|
|
2206
|
+
b({
|
|
2207
2207
|
type: ce
|
|
2208
|
-
}),
|
|
2208
|
+
}), D(xe.Uninitialized), Kt(null), Ce(null), Se(null);
|
|
2209
2209
|
const _e = ce === X.DragEnd ? "onDragEnd" : "onDragCancel";
|
|
2210
2210
|
if ($e) {
|
|
2211
|
-
const yt =
|
|
2212
|
-
yt == null || yt($e),
|
|
2211
|
+
const yt = pe.current[_e];
|
|
2212
|
+
yt == null || yt($e), x({
|
|
2213
2213
|
type: _e,
|
|
2214
2214
|
event: $e
|
|
2215
2215
|
});
|
|
@@ -2220,85 +2220,85 @@ const ho = /* @__PURE__ */ ut(function(t) {
|
|
|
2220
2220
|
},
|
|
2221
2221
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2222
2222
|
[E]
|
|
2223
|
-
), Jn =
|
|
2224
|
-
const re =
|
|
2223
|
+
), Jn = z((U, ee) => (te, we) => {
|
|
2224
|
+
const re = te.nativeEvent, le = E.get(we);
|
|
2225
2225
|
if (
|
|
2226
2226
|
// Another sensor is already instantiating
|
|
2227
|
-
|
|
2227
|
+
ne.current !== null || // No active draggable
|
|
2228
2228
|
!le || // Event has already been captured
|
|
2229
2229
|
re.dndKit || re.defaultPrevented
|
|
2230
2230
|
)
|
|
2231
2231
|
return;
|
|
2232
|
-
const
|
|
2232
|
+
const ge = {
|
|
2233
2233
|
active: le
|
|
2234
2234
|
};
|
|
2235
|
-
U(
|
|
2236
|
-
capturedBy:
|
|
2237
|
-
},
|
|
2235
|
+
U(te, ee.options, ge) === !0 && (re.dndKit = {
|
|
2236
|
+
capturedBy: ee.sensor
|
|
2237
|
+
}, ne.current = we, Ut(te, ee));
|
|
2238
2238
|
}, [E, Ut]), Wt = Ur(u, Jn);
|
|
2239
2239
|
to(u), ie(() => {
|
|
2240
|
-
O &&
|
|
2241
|
-
}, [O,
|
|
2240
|
+
O && S === xe.Initializing && D(xe.Initialized);
|
|
2241
|
+
}, [O, S]), P(
|
|
2242
2242
|
() => {
|
|
2243
2243
|
const {
|
|
2244
2244
|
onDragMove: U
|
|
2245
|
-
} =
|
|
2246
|
-
active:
|
|
2247
|
-
activatorEvent:
|
|
2248
|
-
collisions:
|
|
2245
|
+
} = pe.current, {
|
|
2246
|
+
active: ee,
|
|
2247
|
+
activatorEvent: te,
|
|
2248
|
+
collisions: we,
|
|
2249
2249
|
over: re
|
|
2250
|
-
} =
|
|
2251
|
-
if (!
|
|
2250
|
+
} = G.current;
|
|
2251
|
+
if (!ee || !te)
|
|
2252
2252
|
return;
|
|
2253
2253
|
const le = {
|
|
2254
|
-
active:
|
|
2255
|
-
activatorEvent:
|
|
2256
|
-
collisions:
|
|
2254
|
+
active: ee,
|
|
2255
|
+
activatorEvent: te,
|
|
2256
|
+
collisions: we,
|
|
2257
2257
|
delta: {
|
|
2258
|
-
x:
|
|
2259
|
-
y:
|
|
2258
|
+
x: Re.x,
|
|
2259
|
+
y: Re.y
|
|
2260
2260
|
},
|
|
2261
2261
|
over: re
|
|
2262
2262
|
};
|
|
2263
2263
|
je(() => {
|
|
2264
|
-
U == null || U(le),
|
|
2264
|
+
U == null || U(le), x({
|
|
2265
2265
|
type: "onDragMove",
|
|
2266
2266
|
event: le
|
|
2267
2267
|
});
|
|
2268
2268
|
});
|
|
2269
2269
|
},
|
|
2270
2270
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2271
|
-
[
|
|
2272
|
-
),
|
|
2271
|
+
[Re.x, Re.y]
|
|
2272
|
+
), P(
|
|
2273
2273
|
() => {
|
|
2274
2274
|
const {
|
|
2275
2275
|
active: U,
|
|
2276
|
-
activatorEvent:
|
|
2277
|
-
collisions:
|
|
2278
|
-
droppableContainers:
|
|
2276
|
+
activatorEvent: ee,
|
|
2277
|
+
collisions: te,
|
|
2278
|
+
droppableContainers: we,
|
|
2279
2279
|
scrollAdjustedTranslate: re
|
|
2280
|
-
} =
|
|
2281
|
-
if (!U ||
|
|
2280
|
+
} = G.current;
|
|
2281
|
+
if (!U || ne.current == null || !ee || !re)
|
|
2282
2282
|
return;
|
|
2283
2283
|
const {
|
|
2284
2284
|
onDragOver: le
|
|
2285
|
-
} =
|
|
2286
|
-
id:
|
|
2287
|
-
rect:
|
|
2288
|
-
data:
|
|
2289
|
-
disabled:
|
|
2285
|
+
} = pe.current, ge = we.get(Vt), Oe = ge && ge.rect.current ? {
|
|
2286
|
+
id: ge.id,
|
|
2287
|
+
rect: ge.rect.current,
|
|
2288
|
+
data: ge.data,
|
|
2289
|
+
disabled: ge.disabled
|
|
2290
2290
|
} : null, ce = {
|
|
2291
2291
|
active: U,
|
|
2292
|
-
activatorEvent:
|
|
2293
|
-
collisions:
|
|
2292
|
+
activatorEvent: ee,
|
|
2293
|
+
collisions: te,
|
|
2294
2294
|
delta: {
|
|
2295
2295
|
x: re.x,
|
|
2296
2296
|
y: re.y
|
|
2297
2297
|
},
|
|
2298
|
-
over:
|
|
2298
|
+
over: Oe
|
|
2299
2299
|
};
|
|
2300
2300
|
je(() => {
|
|
2301
|
-
Kt(
|
|
2301
|
+
Kt(Oe), le == null || le(ce), x({
|
|
2302
2302
|
type: "onDragOver",
|
|
2303
2303
|
event: ce
|
|
2304
2304
|
});
|
|
@@ -2307,84 +2307,84 @@ const ho = /* @__PURE__ */ ut(function(t) {
|
|
|
2307
2307
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2308
2308
|
[Vt]
|
|
2309
2309
|
), ie(() => {
|
|
2310
|
-
|
|
2311
|
-
activatorEvent:
|
|
2312
|
-
active:
|
|
2313
|
-
activeNode:
|
|
2314
|
-
collisionRect:
|
|
2310
|
+
G.current = {
|
|
2311
|
+
activatorEvent: W,
|
|
2312
|
+
active: Q,
|
|
2313
|
+
activeNode: A,
|
|
2314
|
+
collisionRect: Ee,
|
|
2315
2315
|
collisions: ke,
|
|
2316
|
-
droppableRects:
|
|
2316
|
+
droppableRects: C,
|
|
2317
2317
|
draggableNodes: E,
|
|
2318
|
-
draggingNode:
|
|
2319
|
-
draggingNodeRect:
|
|
2320
|
-
droppableContainers:
|
|
2321
|
-
over:
|
|
2322
|
-
scrollableAncestors:
|
|
2323
|
-
scrollAdjustedTranslate:
|
|
2324
|
-
},
|
|
2325
|
-
initial:
|
|
2326
|
-
translated:
|
|
2318
|
+
draggingNode: be,
|
|
2319
|
+
draggingNodeRect: Ie,
|
|
2320
|
+
droppableContainers: _,
|
|
2321
|
+
over: ye,
|
|
2322
|
+
scrollableAncestors: me,
|
|
2323
|
+
scrollAdjustedTranslate: Re
|
|
2324
|
+
}, Z.current = {
|
|
2325
|
+
initial: Ie,
|
|
2326
|
+
translated: Ee
|
|
2327
2327
|
};
|
|
2328
|
-
}, [
|
|
2329
|
-
...
|
|
2328
|
+
}, [Q, A, ke, Ee, E, be, Ie, C, _, ye, me, Re]), Xr({
|
|
2329
|
+
...H,
|
|
2330
2330
|
delta: M,
|
|
2331
|
-
draggingRect:
|
|
2331
|
+
draggingRect: Ee,
|
|
2332
2332
|
pointerCoordinates: Xt,
|
|
2333
|
-
scrollableAncestors:
|
|
2333
|
+
scrollableAncestors: me,
|
|
2334
2334
|
scrollableAncestorRects: Ge
|
|
2335
2335
|
});
|
|
2336
|
-
const qn =
|
|
2337
|
-
active:
|
|
2338
|
-
activeNode:
|
|
2336
|
+
const qn = N(() => ({
|
|
2337
|
+
active: Q,
|
|
2338
|
+
activeNode: A,
|
|
2339
2339
|
activeNodeRect: O,
|
|
2340
|
-
activatorEvent:
|
|
2340
|
+
activatorEvent: W,
|
|
2341
2341
|
collisions: ke,
|
|
2342
|
-
containerNodeRect:
|
|
2342
|
+
containerNodeRect: se,
|
|
2343
2343
|
dragOverlay: ae,
|
|
2344
2344
|
draggableNodes: E,
|
|
2345
|
-
droppableContainers:
|
|
2346
|
-
droppableRects:
|
|
2347
|
-
over:
|
|
2348
|
-
measureDroppableContainers:
|
|
2349
|
-
scrollableAncestors:
|
|
2345
|
+
droppableContainers: _,
|
|
2346
|
+
droppableRects: C,
|
|
2347
|
+
over: ye,
|
|
2348
|
+
measureDroppableContainers: B,
|
|
2349
|
+
scrollableAncestors: me,
|
|
2350
2350
|
scrollableAncestorRects: Ge,
|
|
2351
|
-
measuringConfiguration:
|
|
2352
|
-
measuringScheduled:
|
|
2351
|
+
measuringConfiguration: v,
|
|
2352
|
+
measuringScheduled: L,
|
|
2353
2353
|
windowRect: mt
|
|
2354
|
-
}), [
|
|
2355
|
-
activatorEvent:
|
|
2354
|
+
}), [Q, A, O, W, ke, se, ae, E, _, C, ye, B, me, Ge, v, L, mt]), Gn = N(() => ({
|
|
2355
|
+
activatorEvent: W,
|
|
2356
2356
|
activators: Wt,
|
|
2357
|
-
active:
|
|
2357
|
+
active: Q,
|
|
2358
2358
|
activeNodeRect: O,
|
|
2359
2359
|
ariaDescribedById: {
|
|
2360
|
-
draggable:
|
|
2360
|
+
draggable: ve
|
|
2361
2361
|
},
|
|
2362
|
-
dispatch:
|
|
2362
|
+
dispatch: b,
|
|
2363
2363
|
draggableNodes: E,
|
|
2364
|
-
over:
|
|
2365
|
-
measureDroppableContainers:
|
|
2366
|
-
}), [
|
|
2367
|
-
return
|
|
2364
|
+
over: ye,
|
|
2365
|
+
measureDroppableContainers: B
|
|
2366
|
+
}), [W, Wt, Q, O, b, ve, E, ye, B]);
|
|
2367
|
+
return F.createElement(vn.Provider, {
|
|
2368
2368
|
value: y
|
|
2369
|
-
},
|
|
2369
|
+
}, F.createElement(qe.Provider, {
|
|
2370
2370
|
value: Gn
|
|
2371
|
-
},
|
|
2371
|
+
}, F.createElement(Ln.Provider, {
|
|
2372
2372
|
value: qn
|
|
2373
|
-
},
|
|
2373
|
+
}, F.createElement(vt.Provider, {
|
|
2374
2374
|
value: Wn
|
|
2375
|
-
}, c)),
|
|
2375
|
+
}, c)), F.createElement(uo, {
|
|
2376
2376
|
disabled: (a == null ? void 0 : a.restoreFocus) === !1
|
|
2377
|
-
})),
|
|
2377
|
+
})), F.createElement(hr, {
|
|
2378
2378
|
...a,
|
|
2379
|
-
hiddenTextDescribedById:
|
|
2379
|
+
hiddenTextDescribedById: ve
|
|
2380
2380
|
}));
|
|
2381
2381
|
function Zn() {
|
|
2382
|
-
const U = (
|
|
2382
|
+
const U = (fe == null ? void 0 : fe.autoScrollEnabled) === !1, ee = typeof l == "object" ? l.enabled === !1 : l === !1, te = w && !U && !ee;
|
|
2383
2383
|
return typeof l == "object" ? {
|
|
2384
2384
|
...l,
|
|
2385
|
-
enabled:
|
|
2385
|
+
enabled: te
|
|
2386
2386
|
} : {
|
|
2387
|
-
enabled:
|
|
2387
|
+
enabled: te
|
|
2388
2388
|
};
|
|
2389
2389
|
}
|
|
2390
2390
|
}), po = /* @__PURE__ */ Ke(null), cn = "button", vo = "Droppable";
|
|
@@ -2402,18 +2402,18 @@ function bo(e) {
|
|
|
2402
2402
|
activeNodeRect: c,
|
|
2403
2403
|
ariaDescribedById: u,
|
|
2404
2404
|
draggableNodes: d,
|
|
2405
|
-
over:
|
|
2406
|
-
} =
|
|
2407
|
-
role:
|
|
2408
|
-
roleDescription:
|
|
2409
|
-
tabIndex:
|
|
2410
|
-
} = o ?? {}, p = (l == null ? void 0 : l.id) === t,
|
|
2405
|
+
over: h
|
|
2406
|
+
} = De(qe), {
|
|
2407
|
+
role: f = cn,
|
|
2408
|
+
roleDescription: m = "draggable",
|
|
2409
|
+
tabIndex: g = 0
|
|
2410
|
+
} = o ?? {}, p = (l == null ? void 0 : l.id) === t, b = De(p ? vt : po), [x, y] = ot(), [S, D] = ot(), w = no(s, t), R = Ye(n);
|
|
2411
2411
|
ie(
|
|
2412
2412
|
() => (d.set(t, {
|
|
2413
2413
|
id: t,
|
|
2414
2414
|
key: i,
|
|
2415
|
-
node:
|
|
2416
|
-
activatorNode:
|
|
2415
|
+
node: x,
|
|
2416
|
+
activatorNode: S,
|
|
2417
2417
|
data: R
|
|
2418
2418
|
}), () => {
|
|
2419
2419
|
const M = d.get(t);
|
|
@@ -2422,30 +2422,30 @@ function bo(e) {
|
|
|
2422
2422
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2423
2423
|
[d, t]
|
|
2424
2424
|
);
|
|
2425
|
-
const E =
|
|
2426
|
-
role:
|
|
2427
|
-
tabIndex:
|
|
2425
|
+
const E = N(() => ({
|
|
2426
|
+
role: f,
|
|
2427
|
+
tabIndex: g,
|
|
2428
2428
|
"aria-disabled": r,
|
|
2429
|
-
"aria-pressed": p &&
|
|
2430
|
-
"aria-roledescription":
|
|
2429
|
+
"aria-pressed": p && f === cn ? !0 : void 0,
|
|
2430
|
+
"aria-roledescription": m,
|
|
2431
2431
|
"aria-describedby": u.draggable
|
|
2432
|
-
}), [r,
|
|
2432
|
+
}), [r, f, g, p, m, u.draggable]);
|
|
2433
2433
|
return {
|
|
2434
2434
|
active: l,
|
|
2435
2435
|
activatorEvent: a,
|
|
2436
2436
|
activeNodeRect: c,
|
|
2437
2437
|
attributes: E,
|
|
2438
2438
|
isDragging: p,
|
|
2439
|
-
listeners: r ? void 0 :
|
|
2440
|
-
node:
|
|
2441
|
-
over:
|
|
2439
|
+
listeners: r ? void 0 : w,
|
|
2440
|
+
node: x,
|
|
2441
|
+
over: h,
|
|
2442
2442
|
setNodeRef: y,
|
|
2443
|
-
setActivatorNodeRef:
|
|
2444
|
-
transform:
|
|
2443
|
+
setActivatorNodeRef: D,
|
|
2444
|
+
transform: b
|
|
2445
2445
|
};
|
|
2446
2446
|
}
|
|
2447
2447
|
function kn() {
|
|
2448
|
-
return
|
|
2448
|
+
return De(Ln);
|
|
2449
2449
|
}
|
|
2450
2450
|
const mo = "Droppable", yo = {
|
|
2451
2451
|
timeout: 25
|
|
@@ -2462,44 +2462,44 @@ function wo(e) {
|
|
|
2462
2462
|
dispatch: a,
|
|
2463
2463
|
over: l,
|
|
2464
2464
|
measureDroppableContainers: c
|
|
2465
|
-
} =
|
|
2465
|
+
} = De(qe), u = k({
|
|
2466
2466
|
disabled: n
|
|
2467
|
-
}), d =
|
|
2468
|
-
disabled:
|
|
2469
|
-
updateMeasurementsFor:
|
|
2467
|
+
}), d = k(!1), h = k(null), f = k(null), {
|
|
2468
|
+
disabled: m,
|
|
2469
|
+
updateMeasurementsFor: g,
|
|
2470
2470
|
timeout: p
|
|
2471
2471
|
} = {
|
|
2472
2472
|
...yo,
|
|
2473
2473
|
...o
|
|
2474
|
-
},
|
|
2474
|
+
}, b = Ye(g ?? r), x = z(
|
|
2475
2475
|
() => {
|
|
2476
2476
|
if (!d.current) {
|
|
2477
2477
|
d.current = !0;
|
|
2478
2478
|
return;
|
|
2479
2479
|
}
|
|
2480
|
-
|
|
2481
|
-
c(Array.isArray(
|
|
2480
|
+
f.current != null && clearTimeout(f.current), f.current = setTimeout(() => {
|
|
2481
|
+
c(Array.isArray(b.current) ? b.current : [b.current]), f.current = null;
|
|
2482
2482
|
}, p);
|
|
2483
2483
|
},
|
|
2484
2484
|
//eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2485
2485
|
[p]
|
|
2486
2486
|
), y = pt({
|
|
2487
|
-
callback:
|
|
2488
|
-
disabled:
|
|
2489
|
-
}),
|
|
2487
|
+
callback: x,
|
|
2488
|
+
disabled: m || !s
|
|
2489
|
+
}), S = z((E, M) => {
|
|
2490
2490
|
y && (M && (y.unobserve(M), d.current = !1), E && y.observe(E));
|
|
2491
|
-
}, [y]), [
|
|
2492
|
-
return
|
|
2493
|
-
!y || !
|
|
2494
|
-
}, [
|
|
2491
|
+
}, [y]), [D, w] = ot(S), R = Ye(t);
|
|
2492
|
+
return P(() => {
|
|
2493
|
+
!y || !D.current || (y.disconnect(), d.current = !1, y.observe(D.current));
|
|
2494
|
+
}, [D, y]), ie(
|
|
2495
2495
|
() => (a({
|
|
2496
2496
|
type: X.RegisterDroppable,
|
|
2497
2497
|
element: {
|
|
2498
2498
|
id: r,
|
|
2499
2499
|
key: i,
|
|
2500
2500
|
disabled: n,
|
|
2501
|
-
node:
|
|
2502
|
-
rect:
|
|
2501
|
+
node: D,
|
|
2502
|
+
rect: h,
|
|
2503
2503
|
data: R
|
|
2504
2504
|
}
|
|
2505
2505
|
}), () => a({
|
|
@@ -2509,7 +2509,7 @@ function wo(e) {
|
|
|
2509
2509
|
})),
|
|
2510
2510
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2511
2511
|
[r]
|
|
2512
|
-
),
|
|
2512
|
+
), P(() => {
|
|
2513
2513
|
n !== u.current.disabled && (a({
|
|
2514
2514
|
type: X.SetDroppableDisabled,
|
|
2515
2515
|
id: r,
|
|
@@ -2518,11 +2518,11 @@ function wo(e) {
|
|
|
2518
2518
|
}), u.current.disabled = n);
|
|
2519
2519
|
}, [r, i, n, a]), {
|
|
2520
2520
|
active: s,
|
|
2521
|
-
rect:
|
|
2521
|
+
rect: h,
|
|
2522
2522
|
isOver: (l == null ? void 0 : l.id) === r,
|
|
2523
|
-
node:
|
|
2523
|
+
node: D,
|
|
2524
2524
|
over: l,
|
|
2525
|
-
setNodeRef:
|
|
2525
|
+
setNodeRef: w
|
|
2526
2526
|
};
|
|
2527
2527
|
}
|
|
2528
2528
|
function xo(e) {
|
|
@@ -2530,7 +2530,7 @@ function xo(e) {
|
|
|
2530
2530
|
animation: t,
|
|
2531
2531
|
children: n
|
|
2532
2532
|
} = e;
|
|
2533
|
-
const [r, o] =
|
|
2533
|
+
const [r, o] = K(null), [i, s] = K(null), a = it(n);
|
|
2534
2534
|
return !n && !r && a && o(a), ie(() => {
|
|
2535
2535
|
if (!i)
|
|
2536
2536
|
return;
|
|
@@ -2542,7 +2542,7 @@ function xo(e) {
|
|
|
2542
2542
|
Promise.resolve(t(c, i)).then(() => {
|
|
2543
2543
|
o(null);
|
|
2544
2544
|
});
|
|
2545
|
-
}, [t, r, i]),
|
|
2545
|
+
}, [t, r, i]), F.createElement(F.Fragment, null, n, r ? er(r, {
|
|
2546
2546
|
ref: s
|
|
2547
2547
|
}) : null);
|
|
2548
2548
|
}
|
|
@@ -2556,9 +2556,9 @@ function Co(e) {
|
|
|
2556
2556
|
let {
|
|
2557
2557
|
children: t
|
|
2558
2558
|
} = e;
|
|
2559
|
-
return
|
|
2559
|
+
return F.createElement(qe.Provider, {
|
|
2560
2560
|
value: Mn
|
|
2561
|
-
},
|
|
2561
|
+
}, F.createElement(vt.Provider, {
|
|
2562
2562
|
value: Do
|
|
2563
2563
|
}, t));
|
|
2564
2564
|
}
|
|
@@ -2583,20 +2583,20 @@ const So = {
|
|
|
2583
2583
|
...c,
|
|
2584
2584
|
scaleX: 1,
|
|
2585
2585
|
scaleY: 1
|
|
2586
|
-
},
|
|
2586
|
+
}, h = {
|
|
2587
2587
|
...So,
|
|
2588
2588
|
width: a.width,
|
|
2589
2589
|
height: a.height,
|
|
2590
2590
|
top: a.top,
|
|
2591
2591
|
left: a.left,
|
|
2592
|
-
transform:
|
|
2592
|
+
transform: he.Transform.toString(d),
|
|
2593
2593
|
transformOrigin: o && r ? vr(r, a) : void 0,
|
|
2594
2594
|
transition: typeof u == "function" ? u(r) : u,
|
|
2595
2595
|
...l
|
|
2596
2596
|
};
|
|
2597
|
-
return
|
|
2597
|
+
return F.createElement(n, {
|
|
2598
2598
|
className: s,
|
|
2599
|
-
style:
|
|
2599
|
+
style: h,
|
|
2600
2600
|
ref: t
|
|
2601
2601
|
}, i);
|
|
2602
2602
|
}), Eo = (e) => (t) => {
|
|
@@ -2627,9 +2627,9 @@ const So = {
|
|
|
2627
2627
|
}
|
|
2628
2628
|
} = e;
|
|
2629
2629
|
return [{
|
|
2630
|
-
transform:
|
|
2630
|
+
transform: he.Transform.toString(t)
|
|
2631
2631
|
}, {
|
|
2632
|
-
transform:
|
|
2632
|
+
transform: he.Transform.toString(n)
|
|
2633
2633
|
}];
|
|
2634
2634
|
}, Tt = {
|
|
2635
2635
|
duration: 250,
|
|
@@ -2664,11 +2664,11 @@ function To(e) {
|
|
|
2664
2664
|
return;
|
|
2665
2665
|
const {
|
|
2666
2666
|
transform: u
|
|
2667
|
-
} =
|
|
2667
|
+
} = J(s).getComputedStyle(s), d = xn(u);
|
|
2668
2668
|
if (!d)
|
|
2669
2669
|
return;
|
|
2670
|
-
const
|
|
2671
|
-
return On(l, o.draggable.measure),
|
|
2670
|
+
const h = typeof t == "function" ? t : Ao(t);
|
|
2671
|
+
return On(l, o.draggable.measure), h({
|
|
2672
2672
|
active: {
|
|
2673
2673
|
id: i,
|
|
2674
2674
|
data: a.data,
|
|
@@ -2711,45 +2711,45 @@ function Ao(e) {
|
|
|
2711
2711
|
}, d = {
|
|
2712
2712
|
scaleX: l.scaleX !== 1 ? s.rect.width * l.scaleX / a.rect.width : 1,
|
|
2713
2713
|
scaleY: l.scaleY !== 1 ? s.rect.height * l.scaleY / a.rect.height : 1
|
|
2714
|
-
},
|
|
2714
|
+
}, h = {
|
|
2715
2715
|
x: l.x - u.x,
|
|
2716
2716
|
y: l.y - u.y,
|
|
2717
2717
|
...d
|
|
2718
|
-
},
|
|
2718
|
+
}, f = o({
|
|
2719
2719
|
...c,
|
|
2720
2720
|
active: s,
|
|
2721
2721
|
dragOverlay: a,
|
|
2722
2722
|
transform: {
|
|
2723
2723
|
initial: l,
|
|
2724
|
-
final:
|
|
2724
|
+
final: h
|
|
2725
2725
|
}
|
|
2726
|
-
}), [
|
|
2727
|
-
if (JSON.stringify(
|
|
2726
|
+
}), [m] = f, g = f[f.length - 1];
|
|
2727
|
+
if (JSON.stringify(m) === JSON.stringify(g))
|
|
2728
2728
|
return;
|
|
2729
2729
|
const p = r == null ? void 0 : r({
|
|
2730
2730
|
active: s,
|
|
2731
2731
|
dragOverlay: a,
|
|
2732
2732
|
...c
|
|
2733
|
-
}),
|
|
2733
|
+
}), b = a.node.animate(f, {
|
|
2734
2734
|
duration: t,
|
|
2735
2735
|
easing: n,
|
|
2736
2736
|
fill: "forwards"
|
|
2737
2737
|
});
|
|
2738
|
-
return new Promise((
|
|
2739
|
-
|
|
2740
|
-
p == null || p(),
|
|
2738
|
+
return new Promise((x) => {
|
|
2739
|
+
b.onfinish = () => {
|
|
2740
|
+
p == null || p(), x();
|
|
2741
2741
|
};
|
|
2742
2742
|
});
|
|
2743
2743
|
};
|
|
2744
2744
|
}
|
|
2745
2745
|
let un = 0;
|
|
2746
2746
|
function No(e) {
|
|
2747
|
-
return
|
|
2747
|
+
return N(() => {
|
|
2748
2748
|
if (e != null)
|
|
2749
2749
|
return un++, un;
|
|
2750
2750
|
}, [e]);
|
|
2751
2751
|
}
|
|
2752
|
-
const Mo = /* @__PURE__ */
|
|
2752
|
+
const Mo = /* @__PURE__ */ F.memo((e) => {
|
|
2753
2753
|
let {
|
|
2754
2754
|
adjustScale: t = !1,
|
|
2755
2755
|
children: n,
|
|
@@ -2764,40 +2764,40 @@ const Mo = /* @__PURE__ */ j.memo((e) => {
|
|
|
2764
2764
|
const {
|
|
2765
2765
|
activatorEvent: u,
|
|
2766
2766
|
active: d,
|
|
2767
|
-
activeNodeRect:
|
|
2768
|
-
containerNodeRect:
|
|
2769
|
-
draggableNodes:
|
|
2770
|
-
droppableContainers:
|
|
2767
|
+
activeNodeRect: h,
|
|
2768
|
+
containerNodeRect: f,
|
|
2769
|
+
draggableNodes: m,
|
|
2770
|
+
droppableContainers: g,
|
|
2771
2771
|
dragOverlay: p,
|
|
2772
|
-
over:
|
|
2773
|
-
measuringConfiguration:
|
|
2772
|
+
over: b,
|
|
2773
|
+
measuringConfiguration: x,
|
|
2774
2774
|
scrollableAncestors: y,
|
|
2775
|
-
scrollableAncestorRects:
|
|
2776
|
-
windowRect:
|
|
2777
|
-
} = kn(),
|
|
2775
|
+
scrollableAncestorRects: S,
|
|
2776
|
+
windowRect: D
|
|
2777
|
+
} = kn(), w = De(vt), R = No(d == null ? void 0 : d.id), E = Pn(s, {
|
|
2778
2778
|
activatorEvent: u,
|
|
2779
2779
|
active: d,
|
|
2780
|
-
activeNodeRect:
|
|
2781
|
-
containerNodeRect:
|
|
2780
|
+
activeNodeRect: h,
|
|
2781
|
+
containerNodeRect: f,
|
|
2782
2782
|
draggingNodeRect: p.rect,
|
|
2783
|
-
over:
|
|
2783
|
+
over: b,
|
|
2784
2784
|
overlayNodeRect: p.rect,
|
|
2785
2785
|
scrollableAncestors: y,
|
|
2786
|
-
scrollableAncestorRects:
|
|
2787
|
-
transform:
|
|
2788
|
-
windowRect:
|
|
2789
|
-
}), M = jt(
|
|
2786
|
+
scrollableAncestorRects: S,
|
|
2787
|
+
transform: w,
|
|
2788
|
+
windowRect: D
|
|
2789
|
+
}), M = jt(h), _ = To({
|
|
2790
2790
|
config: r,
|
|
2791
|
-
draggableNodes:
|
|
2792
|
-
droppableContainers:
|
|
2793
|
-
measuringConfiguration:
|
|
2794
|
-
}),
|
|
2795
|
-
return
|
|
2796
|
-
animation:
|
|
2797
|
-
}, d && R ?
|
|
2791
|
+
draggableNodes: m,
|
|
2792
|
+
droppableContainers: g,
|
|
2793
|
+
measuringConfiguration: x
|
|
2794
|
+
}), T = M ? p.setRef : void 0;
|
|
2795
|
+
return F.createElement(Co, null, F.createElement(xo, {
|
|
2796
|
+
animation: _
|
|
2797
|
+
}, d && R ? F.createElement(Ro, {
|
|
2798
2798
|
key: R,
|
|
2799
2799
|
id: d.id,
|
|
2800
|
-
ref:
|
|
2800
|
+
ref: T,
|
|
2801
2801
|
as: a,
|
|
2802
2802
|
activatorEvent: u,
|
|
2803
2803
|
adjustScale: t,
|
|
@@ -2896,7 +2896,7 @@ function zo(e, t, n) {
|
|
|
2896
2896
|
const r = e[t], o = e[t - 1], i = e[t + 1];
|
|
2897
2897
|
return r ? n < t ? o ? r.top - (o.top + o.height) : i ? i.top - (r.top + r.height) : 0 : i ? i.top - (r.top + r.height) : o ? r.top - (o.top + o.height) : 0 : 0;
|
|
2898
2898
|
}
|
|
2899
|
-
const zn = "Sortable", $n = /* @__PURE__ */
|
|
2899
|
+
const zn = "Sortable", $n = /* @__PURE__ */ F.createContext({
|
|
2900
2900
|
activeIndex: -1,
|
|
2901
2901
|
containerId: zn,
|
|
2902
2902
|
disableTransforms: !1,
|
|
@@ -2924,29 +2924,29 @@ function $o(e) {
|
|
|
2924
2924
|
droppableRects: l,
|
|
2925
2925
|
over: c,
|
|
2926
2926
|
measureDroppableContainers: u
|
|
2927
|
-
} = kn(), d = Je(zn, n),
|
|
2927
|
+
} = kn(), d = Je(zn, n), h = a.rect !== null, f = N(() => r.map((w) => typeof w == "object" && "id" in w ? w.id : w), [r]), m = s != null, g = s ? f.indexOf(s.id) : -1, p = c ? f.indexOf(c.id) : -1, b = k(f), x = !Po(f, b.current), y = p !== -1 && g === -1 || x, S = ko(i);
|
|
2928
2928
|
ie(() => {
|
|
2929
|
-
|
|
2930
|
-
}, [
|
|
2931
|
-
|
|
2932
|
-
}, [
|
|
2933
|
-
const
|
|
2929
|
+
x && m && u(f);
|
|
2930
|
+
}, [x, f, m, u]), P(() => {
|
|
2931
|
+
b.current = f;
|
|
2932
|
+
}, [f]);
|
|
2933
|
+
const D = N(
|
|
2934
2934
|
() => ({
|
|
2935
|
-
activeIndex:
|
|
2935
|
+
activeIndex: g,
|
|
2936
2936
|
containerId: d,
|
|
2937
|
-
disabled:
|
|
2937
|
+
disabled: S,
|
|
2938
2938
|
disableTransforms: y,
|
|
2939
|
-
items:
|
|
2939
|
+
items: f,
|
|
2940
2940
|
overIndex: p,
|
|
2941
|
-
useDragOverlay:
|
|
2942
|
-
sortedRects: Lo(
|
|
2941
|
+
useDragOverlay: h,
|
|
2942
|
+
sortedRects: Lo(f, l),
|
|
2943
2943
|
strategy: o
|
|
2944
2944
|
}),
|
|
2945
2945
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2946
|
-
[
|
|
2946
|
+
[g, d, S.draggable, S.droppable, y, f, p, l, h, o]
|
|
2947
2947
|
);
|
|
2948
|
-
return
|
|
2949
|
-
value:
|
|
2948
|
+
return F.createElement($n.Provider, {
|
|
2949
|
+
value: D
|
|
2950
2950
|
}, t);
|
|
2951
2951
|
}
|
|
2952
2952
|
const _o = (e) => {
|
|
@@ -2973,7 +2973,7 @@ const _o = (e) => {
|
|
|
2973
2973
|
}, Fo = {
|
|
2974
2974
|
duration: 200,
|
|
2975
2975
|
easing: "ease"
|
|
2976
|
-
}, _n = "transform", Ho = /* @__PURE__ */
|
|
2976
|
+
}, _n = "transform", Ho = /* @__PURE__ */ he.Transition.toString({
|
|
2977
2977
|
property: _n,
|
|
2978
2978
|
duration: 0,
|
|
2979
2979
|
easing: "linear"
|
|
@@ -2987,12 +2987,12 @@ function Yo(e) {
|
|
|
2987
2987
|
node: r,
|
|
2988
2988
|
rect: o
|
|
2989
2989
|
} = e;
|
|
2990
|
-
const [i, s] =
|
|
2990
|
+
const [i, s] = K(null), a = k(n);
|
|
2991
2991
|
return ie(() => {
|
|
2992
2992
|
if (!t && n !== a.current && r.current) {
|
|
2993
2993
|
const l = o.current;
|
|
2994
2994
|
if (l) {
|
|
2995
|
-
const c =
|
|
2995
|
+
const c = Le(r.current, {
|
|
2996
2996
|
ignoreTransform: !0
|
|
2997
2997
|
}), u = {
|
|
2998
2998
|
x: l.left - c.left,
|
|
@@ -3004,7 +3004,7 @@ function Yo(e) {
|
|
|
3004
3004
|
}
|
|
3005
3005
|
}
|
|
3006
3006
|
n !== a.current && (a.current = n);
|
|
3007
|
-
}, [t, n, r, o]),
|
|
3007
|
+
}, [t, n, r, o]), P(() => {
|
|
3008
3008
|
i && s(null);
|
|
3009
3009
|
}, [i]), i;
|
|
3010
3010
|
}
|
|
@@ -3023,132 +3023,132 @@ function Vo(e) {
|
|
|
3023
3023
|
const {
|
|
3024
3024
|
items: u,
|
|
3025
3025
|
containerId: d,
|
|
3026
|
-
activeIndex:
|
|
3027
|
-
disabled:
|
|
3028
|
-
disableTransforms:
|
|
3029
|
-
sortedRects:
|
|
3026
|
+
activeIndex: h,
|
|
3027
|
+
disabled: f,
|
|
3028
|
+
disableTransforms: m,
|
|
3029
|
+
sortedRects: g,
|
|
3030
3030
|
overIndex: p,
|
|
3031
|
-
useDragOverlay:
|
|
3032
|
-
strategy:
|
|
3033
|
-
} =
|
|
3031
|
+
useDragOverlay: b,
|
|
3032
|
+
strategy: x
|
|
3033
|
+
} = De($n), y = Ko(r, f), S = u.indexOf(s), D = N(() => ({
|
|
3034
3034
|
sortable: {
|
|
3035
3035
|
containerId: d,
|
|
3036
|
-
index:
|
|
3036
|
+
index: S,
|
|
3037
3037
|
items: u
|
|
3038
3038
|
},
|
|
3039
3039
|
...o
|
|
3040
|
-
}), [d, o,
|
|
3040
|
+
}), [d, o, S, u]), w = N(() => u.slice(u.indexOf(s)), [u, s]), {
|
|
3041
3041
|
rect: R,
|
|
3042
3042
|
node: E,
|
|
3043
3043
|
isOver: M,
|
|
3044
|
-
setNodeRef:
|
|
3044
|
+
setNodeRef: _
|
|
3045
3045
|
} = wo({
|
|
3046
3046
|
id: s,
|
|
3047
|
-
data:
|
|
3047
|
+
data: D,
|
|
3048
3048
|
disabled: y.droppable,
|
|
3049
3049
|
resizeObserverConfig: {
|
|
3050
|
-
updateMeasurementsFor:
|
|
3050
|
+
updateMeasurementsFor: w,
|
|
3051
3051
|
...l
|
|
3052
3052
|
}
|
|
3053
3053
|
}), {
|
|
3054
|
-
active:
|
|
3055
|
-
activatorEvent:
|
|
3056
|
-
activeNodeRect:
|
|
3057
|
-
attributes:
|
|
3058
|
-
setNodeRef:
|
|
3059
|
-
listeners:
|
|
3060
|
-
isDragging:
|
|
3061
|
-
over:
|
|
3062
|
-
setActivatorNodeRef:
|
|
3063
|
-
transform:
|
|
3054
|
+
active: T,
|
|
3055
|
+
activatorEvent: Z,
|
|
3056
|
+
activeNodeRect: Q,
|
|
3057
|
+
attributes: ne,
|
|
3058
|
+
setNodeRef: fe,
|
|
3059
|
+
listeners: Ce,
|
|
3060
|
+
isDragging: W,
|
|
3061
|
+
over: Se,
|
|
3062
|
+
setActivatorNodeRef: pe,
|
|
3063
|
+
transform: ve
|
|
3064
3064
|
} = bo({
|
|
3065
3065
|
id: s,
|
|
3066
|
-
data:
|
|
3066
|
+
data: D,
|
|
3067
3067
|
attributes: {
|
|
3068
3068
|
...Xo,
|
|
3069
3069
|
...n
|
|
3070
3070
|
},
|
|
3071
3071
|
disabled: y.draggable
|
|
3072
|
-
}),
|
|
3073
|
-
rects:
|
|
3074
|
-
activeNodeRect:
|
|
3075
|
-
activeIndex:
|
|
3072
|
+
}), Pe = tr(_, fe), v = !!T, C = v && !m && tt(h) && tt(p), B = !b && W, L = B && C ? ve : null, q = C ? L ?? (a ?? x)({
|
|
3073
|
+
rects: g,
|
|
3074
|
+
activeNodeRect: Q,
|
|
3075
|
+
activeIndex: h,
|
|
3076
3076
|
overIndex: p,
|
|
3077
|
-
index:
|
|
3078
|
-
}) : null,
|
|
3077
|
+
index: S
|
|
3078
|
+
}) : null, H = tt(h) && tt(p) ? i({
|
|
3079
3079
|
id: s,
|
|
3080
3080
|
items: u,
|
|
3081
|
-
activeIndex:
|
|
3081
|
+
activeIndex: h,
|
|
3082
3082
|
overIndex: p
|
|
3083
|
-
}) :
|
|
3084
|
-
activeId:
|
|
3083
|
+
}) : S, Y = T == null ? void 0 : T.id, O = k({
|
|
3084
|
+
activeId: Y,
|
|
3085
3085
|
items: u,
|
|
3086
|
-
newIndex:
|
|
3086
|
+
newIndex: H,
|
|
3087
3087
|
containerId: d
|
|
3088
|
-
}),
|
|
3089
|
-
active:
|
|
3088
|
+
}), se = u !== O.current.items, G = t({
|
|
3089
|
+
active: T,
|
|
3090
3090
|
containerId: d,
|
|
3091
|
-
isDragging:
|
|
3092
|
-
isSorting:
|
|
3091
|
+
isDragging: W,
|
|
3092
|
+
isSorting: v,
|
|
3093
3093
|
id: s,
|
|
3094
|
-
index:
|
|
3094
|
+
index: S,
|
|
3095
3095
|
items: u,
|
|
3096
3096
|
newIndex: O.current.newIndex,
|
|
3097
3097
|
previousItems: O.current.items,
|
|
3098
3098
|
previousContainerId: O.current.containerId,
|
|
3099
3099
|
transition: c,
|
|
3100
3100
|
wasDragging: O.current.activeId != null
|
|
3101
|
-
}),
|
|
3102
|
-
disabled: !
|
|
3103
|
-
index:
|
|
3101
|
+
}), j = Yo({
|
|
3102
|
+
disabled: !G,
|
|
3103
|
+
index: S,
|
|
3104
3104
|
node: E,
|
|
3105
3105
|
rect: R
|
|
3106
3106
|
});
|
|
3107
|
-
return
|
|
3108
|
-
|
|
3109
|
-
}, [
|
|
3110
|
-
if (
|
|
3107
|
+
return P(() => {
|
|
3108
|
+
v && O.current.newIndex !== H && (O.current.newIndex = H), d !== O.current.containerId && (O.current.containerId = d), u !== O.current.items && (O.current.items = u);
|
|
3109
|
+
}, [v, H, d, u]), P(() => {
|
|
3110
|
+
if (Y === O.current.activeId)
|
|
3111
3111
|
return;
|
|
3112
|
-
if (
|
|
3113
|
-
O.current.activeId =
|
|
3112
|
+
if (Y && !O.current.activeId) {
|
|
3113
|
+
O.current.activeId = Y;
|
|
3114
3114
|
return;
|
|
3115
3115
|
}
|
|
3116
|
-
const
|
|
3117
|
-
O.current.activeId =
|
|
3116
|
+
const be = setTimeout(() => {
|
|
3117
|
+
O.current.activeId = Y;
|
|
3118
3118
|
}, 50);
|
|
3119
|
-
return () => clearTimeout(
|
|
3120
|
-
}, [
|
|
3121
|
-
active:
|
|
3122
|
-
activeIndex:
|
|
3123
|
-
attributes:
|
|
3124
|
-
data:
|
|
3119
|
+
return () => clearTimeout(be);
|
|
3120
|
+
}, [Y]), {
|
|
3121
|
+
active: T,
|
|
3122
|
+
activeIndex: h,
|
|
3123
|
+
attributes: ne,
|
|
3124
|
+
data: D,
|
|
3125
3125
|
rect: R,
|
|
3126
|
-
index:
|
|
3127
|
-
newIndex:
|
|
3126
|
+
index: S,
|
|
3127
|
+
newIndex: H,
|
|
3128
3128
|
items: u,
|
|
3129
3129
|
isOver: M,
|
|
3130
|
-
isSorting:
|
|
3131
|
-
isDragging:
|
|
3132
|
-
listeners:
|
|
3130
|
+
isSorting: v,
|
|
3131
|
+
isDragging: W,
|
|
3132
|
+
listeners: Ce,
|
|
3133
3133
|
node: E,
|
|
3134
3134
|
overIndex: p,
|
|
3135
|
-
over:
|
|
3136
|
-
setNodeRef:
|
|
3137
|
-
setActivatorNodeRef:
|
|
3138
|
-
setDroppableNodeRef:
|
|
3139
|
-
setDraggableNodeRef:
|
|
3140
|
-
transform:
|
|
3135
|
+
over: Se,
|
|
3136
|
+
setNodeRef: Pe,
|
|
3137
|
+
setActivatorNodeRef: pe,
|
|
3138
|
+
setDroppableNodeRef: _,
|
|
3139
|
+
setDraggableNodeRef: fe,
|
|
3140
|
+
transform: j ?? q,
|
|
3141
3141
|
transition: ae()
|
|
3142
3142
|
};
|
|
3143
3143
|
function ae() {
|
|
3144
3144
|
if (
|
|
3145
3145
|
// Temporarily disable transitions for a single frame to set up derived transforms
|
|
3146
|
-
|
|
3147
|
-
|
|
3146
|
+
j || // Or to prevent items jumping to back to their "new" position when items change
|
|
3147
|
+
se && O.current.newIndex === S
|
|
3148
3148
|
)
|
|
3149
3149
|
return Ho;
|
|
3150
|
-
if (!(
|
|
3151
|
-
return
|
|
3150
|
+
if (!(B && !ht(Z) || !c) && (v || G))
|
|
3151
|
+
return he.Transition.toString({
|
|
3152
3152
|
...c,
|
|
3153
3153
|
property: _n
|
|
3154
3154
|
});
|
|
@@ -3165,20 +3165,20 @@ function Ko(e, t) {
|
|
|
3165
3165
|
droppable: (r = e == null ? void 0 : e.droppable) != null ? r : t.droppable
|
|
3166
3166
|
};
|
|
3167
3167
|
}
|
|
3168
|
-
|
|
3168
|
+
I.Down, I.Right, I.Up, I.Left;
|
|
3169
3169
|
const Uo = /iPad|iPhone|iPod/.test(navigator.platform);
|
|
3170
3170
|
function Wo(e, t) {
|
|
3171
3171
|
return Math.round(e / t);
|
|
3172
3172
|
}
|
|
3173
3173
|
function At(e, t, n, r, o) {
|
|
3174
|
-
const i = e.findIndex(({ id:
|
|
3174
|
+
const i = e.findIndex(({ id: b }) => b === n), s = e.findIndex(({ id: b }) => b === t), a = e[s], l = Ve(e, s, i), c = l[i - 1], u = l[i + 1], d = Wo(r, o), h = a.depth + d, f = Jo({
|
|
3175
3175
|
previousItem: c
|
|
3176
|
-
}),
|
|
3177
|
-
let
|
|
3178
|
-
return
|
|
3176
|
+
}), m = qo({ nextItem: u });
|
|
3177
|
+
let g = h;
|
|
3178
|
+
return h >= f ? g = f : h < m && (g = m), { depth: g, maxDepth: f, minDepth: m, parentId: p() };
|
|
3179
3179
|
function p() {
|
|
3180
|
-
var
|
|
3181
|
-
return
|
|
3180
|
+
var x;
|
|
3181
|
+
return g === 0 || !c ? null : g === c.depth ? c.parentId : g > c.depth ? c.id : ((x = l.slice(0, i).reverse().find((y) => y.depth === g)) == null ? void 0 : x.parentId) ?? null;
|
|
3182
3182
|
}
|
|
3183
3183
|
}
|
|
3184
3184
|
function Jo({ previousItem: e }) {
|
|
@@ -3253,11 +3253,11 @@ function ri(e, t) {
|
|
|
3253
3253
|
return e.filter((r) => r.parentId && n.includes(r.parentId) ? (r.children.length && n.push(r.id), !1) : !0);
|
|
3254
3254
|
}
|
|
3255
3255
|
const oi = [
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
], ii = [
|
|
3256
|
+
I.Down,
|
|
3257
|
+
I.Right,
|
|
3258
|
+
I.Up,
|
|
3259
|
+
I.Left
|
|
3260
|
+
], ii = [I.Left, I.Right], si = (e, t, n) => (r, {
|
|
3261
3261
|
currentCoordinates: o,
|
|
3262
3262
|
context: { active: i, over: s, collisionRect: a, droppableRects: l, droppableContainers: c }
|
|
3263
3263
|
}) => {
|
|
@@ -3269,7 +3269,7 @@ const oi = [
|
|
|
3269
3269
|
current: { items: u, offset: d }
|
|
3270
3270
|
} = e;
|
|
3271
3271
|
if (ii.includes(r.code) && (s != null && s.id)) {
|
|
3272
|
-
const { depth:
|
|
3272
|
+
const { depth: g, maxDepth: p, minDepth: b } = At(
|
|
3273
3273
|
u,
|
|
3274
3274
|
i.id,
|
|
3275
3275
|
s.id,
|
|
@@ -3277,15 +3277,15 @@ const oi = [
|
|
|
3277
3277
|
n
|
|
3278
3278
|
);
|
|
3279
3279
|
switch (r.code) {
|
|
3280
|
-
case
|
|
3281
|
-
if (
|
|
3280
|
+
case I.Left:
|
|
3281
|
+
if (g > b)
|
|
3282
3282
|
return {
|
|
3283
3283
|
...o,
|
|
3284
3284
|
x: o.x - n
|
|
3285
3285
|
};
|
|
3286
3286
|
break;
|
|
3287
|
-
case
|
|
3288
|
-
if (
|
|
3287
|
+
case I.Right:
|
|
3288
|
+
if (g < p)
|
|
3289
3289
|
return {
|
|
3290
3290
|
...o,
|
|
3291
3291
|
x: o.x + n
|
|
@@ -3294,43 +3294,43 @@ const oi = [
|
|
|
3294
3294
|
}
|
|
3295
3295
|
return;
|
|
3296
3296
|
}
|
|
3297
|
-
const
|
|
3298
|
-
c.forEach((
|
|
3299
|
-
if (
|
|
3297
|
+
const h = [];
|
|
3298
|
+
c.forEach((g) => {
|
|
3299
|
+
if (g != null && g.disabled || g.id === (s == null ? void 0 : s.id))
|
|
3300
3300
|
return;
|
|
3301
|
-
const p = l.get(
|
|
3301
|
+
const p = l.get(g.id);
|
|
3302
3302
|
if (p)
|
|
3303
3303
|
switch (r.code) {
|
|
3304
|
-
case
|
|
3305
|
-
a.top < p.top &&
|
|
3304
|
+
case I.Down:
|
|
3305
|
+
a.top < p.top && h.push(g);
|
|
3306
3306
|
break;
|
|
3307
|
-
case
|
|
3308
|
-
a.top > p.top &&
|
|
3307
|
+
case I.Up:
|
|
3308
|
+
a.top > p.top && h.push(g);
|
|
3309
3309
|
break;
|
|
3310
3310
|
}
|
|
3311
3311
|
});
|
|
3312
|
-
const
|
|
3312
|
+
const f = yr({
|
|
3313
3313
|
active: i,
|
|
3314
3314
|
collisionRect: a,
|
|
3315
3315
|
pointerCoordinates: null,
|
|
3316
3316
|
droppableRects: l,
|
|
3317
|
-
droppableContainers:
|
|
3317
|
+
droppableContainers: h
|
|
3318
3318
|
});
|
|
3319
|
-
let
|
|
3320
|
-
if (
|
|
3321
|
-
const
|
|
3322
|
-
if (
|
|
3323
|
-
const
|
|
3324
|
-
if (y &&
|
|
3325
|
-
const { depth:
|
|
3319
|
+
let m = yn(f, "id");
|
|
3320
|
+
if (m === (s == null ? void 0 : s.id) && f.length > 1 && (m = f[1].id), m && (s != null && s.id)) {
|
|
3321
|
+
const g = l.get(i.id), p = l.get(m), b = c.get(m);
|
|
3322
|
+
if (g && p && b) {
|
|
3323
|
+
const x = u.findIndex(({ id: w }) => w === m), y = u[x], S = u.findIndex(({ id: w }) => w === i.id), D = u[S];
|
|
3324
|
+
if (y && D) {
|
|
3325
|
+
const { depth: w } = At(
|
|
3326
3326
|
u,
|
|
3327
3327
|
i.id,
|
|
3328
|
-
|
|
3329
|
-
(y.depth -
|
|
3328
|
+
m,
|
|
3329
|
+
(y.depth - D.depth) * n,
|
|
3330
3330
|
n
|
|
3331
|
-
), E =
|
|
3331
|
+
), E = x > S ? 1 : -1, M = t ? (a.height - g.height) / 2 : 0;
|
|
3332
3332
|
return {
|
|
3333
|
-
x: p.left +
|
|
3333
|
+
x: p.left + w * n,
|
|
3334
3334
|
y: p.top + E * M
|
|
3335
3335
|
};
|
|
3336
3336
|
}
|
|
@@ -3393,7 +3393,7 @@ var yi = Xn.exports;
|
|
|
3393
3393
|
const Nt = /* @__PURE__ */ mi(yi), wi = "_Action_7i4a4_1", xi = {
|
|
3394
3394
|
Action: wi
|
|
3395
3395
|
}, bt = dt(
|
|
3396
|
-
({ active: e, className: t, cursor: n, style: r, ...o }, i) => /* @__PURE__ */
|
|
3396
|
+
({ active: e, className: t, cursor: n, style: r, ...o }, i) => /* @__PURE__ */ $(
|
|
3397
3397
|
"button",
|
|
3398
3398
|
{
|
|
3399
3399
|
ref: i,
|
|
@@ -3408,9 +3408,9 @@ const Nt = /* @__PURE__ */ mi(yi), wi = "_Action_7i4a4_1", xi = {
|
|
|
3408
3408
|
}
|
|
3409
3409
|
}
|
|
3410
3410
|
)
|
|
3411
|
-
), Di = dt((e, t) => /* @__PURE__ */
|
|
3411
|
+
), Di = dt((e, t) => /* @__PURE__ */ $(bt, { ref: t, cursor: "grab", "data-cypress": "draggable-handle", ...e, children: /* @__PURE__ */ $("svg", { viewBox: "0 0 20 20", width: "12", children: /* @__PURE__ */ $("path", { d: "M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14zm6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6zm0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14z" }) }) }));
|
|
3412
3412
|
function Ci(e) {
|
|
3413
|
-
return /* @__PURE__ */
|
|
3413
|
+
return /* @__PURE__ */ $(
|
|
3414
3414
|
bt,
|
|
3415
3415
|
{
|
|
3416
3416
|
...e,
|
|
@@ -3418,7 +3418,7 @@ function Ci(e) {
|
|
|
3418
3418
|
fill: "rgba(255, 70, 70, 0.95)",
|
|
3419
3419
|
background: "rgba(255, 70, 70, 0.1)"
|
|
3420
3420
|
},
|
|
3421
|
-
children: /* @__PURE__ */
|
|
3421
|
+
children: /* @__PURE__ */ $(
|
|
3422
3422
|
"svg",
|
|
3423
3423
|
{
|
|
3424
3424
|
width: "18",
|
|
@@ -3426,14 +3426,14 @@ function Ci(e) {
|
|
|
3426
3426
|
viewBox: "0 0 18 18",
|
|
3427
3427
|
fill: "none",
|
|
3428
3428
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3429
|
-
children: /* @__PURE__ */
|
|
3429
|
+
children: /* @__PURE__ */ $("path", { d: "M5.5 1C5.22386 1 5 1.22386 5 1.5C5 1.77614 5.22386 2 5.5 2H9.5C9.77614 2 10 1.77614 10 1.5C10 1.22386 9.77614 1 9.5 1H5.5ZM3 3.5C3 3.22386 3.22386 3 3.5 3H5H10H11.5C11.7761 3 12 3.22386 12 3.5C12 3.77614 11.7761 4 11.5 4H11V12C11 12.5523 10.5523 13 10 13H5C4.44772 13 4 12.5523 4 12V4L3.5 4C3.22386 4 3 3.77614 3 3.5ZM5 4H10V12H5V4Z" })
|
|
3430
3430
|
}
|
|
3431
3431
|
)
|
|
3432
3432
|
}
|
|
3433
3433
|
);
|
|
3434
3434
|
}
|
|
3435
3435
|
function Si(e) {
|
|
3436
|
-
return /* @__PURE__ */
|
|
3436
|
+
return /* @__PURE__ */ $(
|
|
3437
3437
|
bt,
|
|
3438
3438
|
{
|
|
3439
3439
|
...e,
|
|
@@ -3441,7 +3441,7 @@ function Si(e) {
|
|
|
3441
3441
|
fill: "rgba(255, 70, 70, 0.95)",
|
|
3442
3442
|
background: "rgba(255, 70, 70, 0.1)"
|
|
3443
3443
|
},
|
|
3444
|
-
children: /* @__PURE__ */
|
|
3444
|
+
children: /* @__PURE__ */ $(
|
|
3445
3445
|
"svg",
|
|
3446
3446
|
{
|
|
3447
3447
|
width: "18",
|
|
@@ -3449,7 +3449,7 @@ function Si(e) {
|
|
|
3449
3449
|
viewBox: "0 0 18 18",
|
|
3450
3450
|
fill: "none",
|
|
3451
3451
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3452
|
-
children: /* @__PURE__ */
|
|
3452
|
+
children: /* @__PURE__ */ $("path", { d: "M8 2.75C8 2.47386 7.77614 2.25 7.5 2.25C7.22386 2.25 7 2.47386 7 2.75V7H2.75C2.47386 7 2.25 7.22386 2.25 7.5C2.25 7.77614 2.47386 8 2.75 8H7V12.25C7 12.5261 7.22386 12.75 7.5 12.75C7.77614 12.75 8 12.5261 8 12.25V8H12.25C12.5261 8 12.75 7.77614 12.75 7.5C12.75 7.22386 12.5261 7 12.25 7H8V2.75Z" })
|
|
3453
3453
|
}
|
|
3454
3454
|
)
|
|
3455
3455
|
}
|
|
@@ -3469,14 +3469,15 @@ const Ii = dt(
|
|
|
3469
3469
|
indicator: c,
|
|
3470
3470
|
collapsed: u,
|
|
3471
3471
|
onCollapse: d,
|
|
3472
|
-
onRemove:
|
|
3473
|
-
onAdd:
|
|
3474
|
-
onLabelClick:
|
|
3475
|
-
style:
|
|
3472
|
+
onRemove: h,
|
|
3473
|
+
onAdd: f,
|
|
3474
|
+
onLabelClick: m,
|
|
3475
|
+
style: g,
|
|
3476
3476
|
value: p,
|
|
3477
|
-
wrapperRef:
|
|
3478
|
-
|
|
3479
|
-
|
|
3477
|
+
wrapperRef: b,
|
|
3478
|
+
renderedItem: x,
|
|
3479
|
+
...y
|
|
3480
|
+
}, S) => /* @__PURE__ */ $(
|
|
3480
3481
|
"li",
|
|
3481
3482
|
{
|
|
3482
3483
|
className: Nt(
|
|
@@ -3487,14 +3488,14 @@ const Ii = dt(
|
|
|
3487
3488
|
r && ue.disableSelection,
|
|
3488
3489
|
o && ue.disableInteraction
|
|
3489
3490
|
),
|
|
3490
|
-
ref:
|
|
3491
|
+
ref: b,
|
|
3491
3492
|
style: {
|
|
3492
3493
|
"--spacing": `${l * n}px`
|
|
3493
3494
|
},
|
|
3494
|
-
...
|
|
3495
|
-
children: /* @__PURE__ */ fn("div", { className: ue.TreeItem, ref:
|
|
3496
|
-
!i && /* @__PURE__ */
|
|
3497
|
-
d && /* @__PURE__ */
|
|
3495
|
+
...y,
|
|
3496
|
+
children: /* @__PURE__ */ fn("div", { className: ue.TreeItem, ref: S, style: g, children: [
|
|
3497
|
+
!i && /* @__PURE__ */ $(Di, { ...a }),
|
|
3498
|
+
d && /* @__PURE__ */ $(
|
|
3498
3499
|
bt,
|
|
3499
3500
|
{
|
|
3500
3501
|
onClick: d,
|
|
@@ -3502,14 +3503,15 @@ const Ii = dt(
|
|
|
3502
3503
|
children: Ri
|
|
3503
3504
|
}
|
|
3504
3505
|
),
|
|
3505
|
-
/* @__PURE__ */
|
|
3506
|
-
!t &&
|
|
3507
|
-
!t && h && /* @__PURE__ */
|
|
3508
|
-
t &&
|
|
3506
|
+
/* @__PURE__ */ $("span", { onClick: m, className: ue.Text, children: p }),
|
|
3507
|
+
!t && x && x,
|
|
3508
|
+
!t && h && /* @__PURE__ */ $(Ci, { onClick: h }),
|
|
3509
|
+
!t && f && /* @__PURE__ */ $(Si, { onClick: f }),
|
|
3510
|
+
t && e && e > 1 ? /* @__PURE__ */ $("span", { className: ue.Count, children: e }) : null
|
|
3509
3511
|
] })
|
|
3510
3512
|
}
|
|
3511
3513
|
)
|
|
3512
|
-
), Ri = /* @__PURE__ */
|
|
3514
|
+
), Ri = /* @__PURE__ */ $("svg", { width: "10", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 70 41", children: /* @__PURE__ */ $("path", { d: "M30.76 39.2402C31.885 40.3638 33.41 40.995 35 40.995C36.59 40.995 38.115 40.3638 39.24 39.2402L68.24 10.2402C69.2998 9.10284 69.8768 7.59846 69.8494 6.04406C69.822 4.48965 69.1923 3.00657 68.093 1.90726C66.9937 0.807959 65.5106 0.178263 63.9562 0.150837C62.4018 0.123411 60.8974 0.700397 59.76 1.76024L35 26.5102L10.24 1.76024C9.10259 0.700397 7.59822 0.123411 6.04381 0.150837C4.4894 0.178263 3.00632 0.807959 1.90702 1.90726C0.807714 3.00657 0.178019 4.48965 0.150593 6.04406C0.123167 7.59846 0.700153 9.10284 1.75999 10.2402L30.76 39.2402Z" }) }), Ei = ut(Ii), Oi = ({ isSorting: e, wasDragging: t }) => !(e || t);
|
|
3513
3515
|
function Ti({ id: e, depth: t, ...n }) {
|
|
3514
3516
|
const {
|
|
3515
3517
|
attributes: r,
|
|
@@ -3524,10 +3526,10 @@ function Ti({ id: e, depth: t, ...n }) {
|
|
|
3524
3526
|
id: e,
|
|
3525
3527
|
animateLayoutChanges: Oi
|
|
3526
3528
|
}), d = {
|
|
3527
|
-
transform:
|
|
3529
|
+
transform: he.Translate.toString(c),
|
|
3528
3530
|
transition: u
|
|
3529
3531
|
};
|
|
3530
|
-
return /* @__PURE__ */
|
|
3532
|
+
return /* @__PURE__ */ $(
|
|
3531
3533
|
Ei,
|
|
3532
3534
|
{
|
|
3533
3535
|
ref: a,
|
|
@@ -3547,15 +3549,15 @@ function Ti({ id: e, depth: t, ...n }) {
|
|
|
3547
3549
|
}
|
|
3548
3550
|
const dn = ut(Ti), Ai = {
|
|
3549
3551
|
droppable: {
|
|
3550
|
-
strategy:
|
|
3552
|
+
strategy: Ae.Always
|
|
3551
3553
|
}
|
|
3552
3554
|
}, Ni = {
|
|
3553
3555
|
keyframes({ transform: e }) {
|
|
3554
3556
|
return [
|
|
3555
|
-
{ opacity: 1, transform:
|
|
3557
|
+
{ opacity: 1, transform: he.Transform.toString(e.initial) },
|
|
3556
3558
|
{
|
|
3557
3559
|
opacity: 0,
|
|
3558
|
-
transform:
|
|
3560
|
+
transform: he.Transform.toString({
|
|
3559
3561
|
...e.final,
|
|
3560
3562
|
x: e.final.x + 5,
|
|
3561
3563
|
y: e.final.y + 5
|
|
@@ -3583,180 +3585,191 @@ function Mi({
|
|
|
3583
3585
|
allowNestedItemAddition: l,
|
|
3584
3586
|
onAddItem: c,
|
|
3585
3587
|
onDragEnd: u,
|
|
3586
|
-
onItemClick: d
|
|
3588
|
+
onItemClick: d,
|
|
3589
|
+
renderItem: h
|
|
3587
3590
|
}) {
|
|
3588
|
-
const [
|
|
3591
|
+
const [f, m] = K(null), [g, p] = K(null), [b, x] = K(0), [y, S] = K(null), D = N(() => {
|
|
3589
3592
|
let v = It(e);
|
|
3590
|
-
const
|
|
3591
|
-
|
|
3592
|
-
(
|
|
3593
|
-
...
|
|
3593
|
+
const C = v.filter(({ parentId: L }) => !L);
|
|
3594
|
+
C.length === 1 && (v = v.map(
|
|
3595
|
+
(L) => L.id === C[0].id ? {
|
|
3596
|
+
...L,
|
|
3594
3597
|
disableDragging: !0
|
|
3595
|
-
} :
|
|
3598
|
+
} : L
|
|
3596
3599
|
));
|
|
3597
|
-
const
|
|
3598
|
-
(
|
|
3600
|
+
const B = v.reduce(
|
|
3601
|
+
(L, { children: A, collapsed: q, id: H }) => (q && A.length && L.push(H), L),
|
|
3599
3602
|
[]
|
|
3600
3603
|
);
|
|
3601
3604
|
return ri(
|
|
3602
3605
|
v,
|
|
3603
|
-
|
|
3606
|
+
f ? [f, ...B] : B
|
|
3604
3607
|
);
|
|
3605
|
-
}, [
|
|
3606
|
-
items:
|
|
3607
|
-
offset:
|
|
3608
|
-
}), [
|
|
3609
|
-
() => si(
|
|
3610
|
-
),
|
|
3608
|
+
}, [f, e]), w = f && g ? At(D, f, g, b, i) : null, R = k({
|
|
3609
|
+
items: D,
|
|
3610
|
+
offset: b
|
|
3611
|
+
}), [E] = K(
|
|
3612
|
+
() => si(R, o, i)
|
|
3613
|
+
), M = pr(
|
|
3611
3614
|
Gt(_t),
|
|
3612
3615
|
Gt(zt, {
|
|
3613
|
-
coordinateGetter:
|
|
3616
|
+
coordinateGetter: E
|
|
3614
3617
|
})
|
|
3615
|
-
),
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
items:
|
|
3619
|
-
offset:
|
|
3618
|
+
), _ = N(() => D.map(({ id: v }) => v), [D]), T = f ? D.find(({ id: v }) => v === f) : null;
|
|
3619
|
+
P(() => {
|
|
3620
|
+
R.current = {
|
|
3621
|
+
items: D,
|
|
3622
|
+
offset: b
|
|
3620
3623
|
};
|
|
3621
|
-
}, [
|
|
3622
|
-
const
|
|
3624
|
+
}, [D, b]);
|
|
3625
|
+
const Z = z(
|
|
3623
3626
|
({ active: { id: v } }) => {
|
|
3624
|
-
|
|
3625
|
-
const
|
|
3626
|
-
|
|
3627
|
-
parentId:
|
|
3627
|
+
m(v), p(v);
|
|
3628
|
+
const C = D.find(({ id: B }) => B === v);
|
|
3629
|
+
C && S({
|
|
3630
|
+
parentId: C.parentId,
|
|
3628
3631
|
overId: v
|
|
3629
3632
|
}), document.body.style.setProperty("cursor", "grabbing");
|
|
3630
3633
|
},
|
|
3631
|
-
[
|
|
3632
|
-
), Q =
|
|
3633
|
-
|
|
3634
|
-
}, []),
|
|
3635
|
-
|
|
3636
|
-
}, []),
|
|
3637
|
-
|
|
3638
|
-
}, []),
|
|
3639
|
-
({ active: v, over:
|
|
3640
|
-
if (
|
|
3641
|
-
const { depth:
|
|
3642
|
-
|
|
3643
|
-
const
|
|
3644
|
-
t(
|
|
3634
|
+
[D]
|
|
3635
|
+
), Q = z(({ delta: v }) => {
|
|
3636
|
+
x(v.x);
|
|
3637
|
+
}, []), ne = z(({ over: v }) => {
|
|
3638
|
+
p((v == null ? void 0 : v.id) ?? null);
|
|
3639
|
+
}, []), fe = z(() => {
|
|
3640
|
+
p(null), m(null), x(0), S(null), document.body.style.setProperty("cursor", "");
|
|
3641
|
+
}, []), Ce = z(
|
|
3642
|
+
({ active: v, over: C }) => {
|
|
3643
|
+
if (fe(), w && C) {
|
|
3644
|
+
const { depth: B, parentId: L } = w, A = JSON.parse(JSON.stringify(It(e))), q = A.findIndex(({ id: j }) => j === C.id), H = A.findIndex(({ id: j }) => j === v.id), Y = A[H];
|
|
3645
|
+
A[H] = { ...Y, depth: B, parentId: L };
|
|
3646
|
+
const O = Ve(A, H, q), se = Go(O), G = Yn(se, A[H].id, L);
|
|
3647
|
+
t(se), u == null || u(G);
|
|
3645
3648
|
}
|
|
3646
3649
|
},
|
|
3647
|
-
[e,
|
|
3648
|
-
),
|
|
3649
|
-
|
|
3650
|
-
}, [
|
|
3650
|
+
[e, w, u, fe, t]
|
|
3651
|
+
), W = z(() => {
|
|
3652
|
+
fe();
|
|
3653
|
+
}, [fe]), Se = z(
|
|
3651
3654
|
(v) => {
|
|
3652
|
-
t((
|
|
3655
|
+
t((C) => ei(C, v));
|
|
3653
3656
|
},
|
|
3654
3657
|
[t]
|
|
3655
|
-
),
|
|
3658
|
+
), pe = z(
|
|
3656
3659
|
({
|
|
3657
3660
|
id: v,
|
|
3658
|
-
canFetchChildren:
|
|
3659
|
-
collapsed:
|
|
3660
|
-
}) =>
|
|
3661
|
-
(
|
|
3661
|
+
canFetchChildren: C,
|
|
3662
|
+
collapsed: B
|
|
3663
|
+
}) => C ? r == null ? void 0 : r(v, !!B) : t(
|
|
3664
|
+
(L) => ti(L, v, (A) => ({ collapsed: !A.collapsed }))
|
|
3662
3665
|
),
|
|
3663
3666
|
[r, t]
|
|
3664
|
-
),
|
|
3665
|
-
(v,
|
|
3666
|
-
if (
|
|
3667
|
+
), ve = z(
|
|
3668
|
+
(v, C, B) => {
|
|
3669
|
+
if (B && w) {
|
|
3667
3670
|
if (v !== "onDragEnd") {
|
|
3668
|
-
if (
|
|
3671
|
+
if (y && w.parentId === y.parentId && B === y.overId)
|
|
3669
3672
|
return;
|
|
3670
|
-
|
|
3671
|
-
parentId:
|
|
3672
|
-
overId:
|
|
3673
|
+
S({
|
|
3674
|
+
parentId: w.parentId,
|
|
3675
|
+
overId: B
|
|
3673
3676
|
});
|
|
3674
3677
|
}
|
|
3675
|
-
const
|
|
3676
|
-
let
|
|
3677
|
-
const
|
|
3678
|
-
if (
|
|
3679
|
-
if (
|
|
3680
|
-
|
|
3678
|
+
const L = JSON.parse(JSON.stringify(It(e))), A = L.findIndex(({ id: j }) => j === B), q = L.findIndex(({ id: j }) => j === C), H = Ve(L, q, A), Y = H[A - 1];
|
|
3679
|
+
let O;
|
|
3680
|
+
const se = v === "onDragEnd" ? "dropped" : "moved", G = v === "onDragEnd" ? "dropped" : "nested";
|
|
3681
|
+
if (Y)
|
|
3682
|
+
if (w.depth > Y.depth)
|
|
3683
|
+
O = `${C} was ${G} under ${Y.id}.`;
|
|
3681
3684
|
else {
|
|
3682
|
-
let
|
|
3683
|
-
for (;
|
|
3684
|
-
const
|
|
3685
|
-
|
|
3685
|
+
let j = Y;
|
|
3686
|
+
for (; j && w.depth < j.depth; ) {
|
|
3687
|
+
const ae = j.parentId;
|
|
3688
|
+
j = H.find(({ id: be }) => be === ae);
|
|
3686
3689
|
}
|
|
3687
|
-
|
|
3690
|
+
j && (O = `${C} was ${se} after ${j.id}.`);
|
|
3688
3691
|
}
|
|
3689
3692
|
else {
|
|
3690
|
-
const
|
|
3691
|
-
|
|
3693
|
+
const j = H[A + 1];
|
|
3694
|
+
O = `${C} was ${se} before ${j.id}.`;
|
|
3692
3695
|
}
|
|
3693
|
-
return
|
|
3696
|
+
return O;
|
|
3694
3697
|
}
|
|
3695
3698
|
},
|
|
3696
|
-
[
|
|
3699
|
+
[y, e, w]
|
|
3697
3700
|
);
|
|
3698
|
-
return /* @__PURE__ */
|
|
3701
|
+
return /* @__PURE__ */ $(
|
|
3699
3702
|
ho,
|
|
3700
3703
|
{
|
|
3701
3704
|
accessibility: { announcements: {
|
|
3702
3705
|
onDragStart({ active: v }) {
|
|
3703
3706
|
return `Picked up ${v.id}.`;
|
|
3704
3707
|
},
|
|
3705
|
-
onDragMove({ active: v, over:
|
|
3706
|
-
return
|
|
3708
|
+
onDragMove({ active: v, over: C }) {
|
|
3709
|
+
return ve("onDragMove", v.id, C == null ? void 0 : C.id);
|
|
3707
3710
|
},
|
|
3708
|
-
onDragOver({ active: v, over:
|
|
3709
|
-
return
|
|
3711
|
+
onDragOver({ active: v, over: C }) {
|
|
3712
|
+
return ve("onDragOver", v.id, C == null ? void 0 : C.id);
|
|
3710
3713
|
},
|
|
3711
|
-
onDragEnd({ active: v, over:
|
|
3712
|
-
return
|
|
3714
|
+
onDragEnd({ active: v, over: C }) {
|
|
3715
|
+
return ve("onDragEnd", v.id, C == null ? void 0 : C.id);
|
|
3713
3716
|
},
|
|
3714
3717
|
onDragCancel({ active: v }) {
|
|
3715
3718
|
return `Moving was cancelled. ${v.id} was dropped in its original position.`;
|
|
3716
3719
|
}
|
|
3717
3720
|
} },
|
|
3718
|
-
sensors:
|
|
3721
|
+
sensors: M,
|
|
3719
3722
|
collisionDetection: mr,
|
|
3720
3723
|
measuring: Ai,
|
|
3721
|
-
onDragStart:
|
|
3724
|
+
onDragStart: Z,
|
|
3722
3725
|
onDragMove: Q,
|
|
3723
|
-
onDragOver:
|
|
3724
|
-
onDragEnd:
|
|
3725
|
-
onDragCancel:
|
|
3726
|
-
children: /* @__PURE__ */ fn($o, { items:
|
|
3727
|
-
|
|
3728
|
-
({
|
|
3726
|
+
onDragOver: ne,
|
|
3727
|
+
onDragEnd: Ce,
|
|
3728
|
+
onDragCancel: W,
|
|
3729
|
+
children: /* @__PURE__ */ fn($o, { items: _, strategy: Bo, children: [
|
|
3730
|
+
D.map(
|
|
3731
|
+
({
|
|
3732
|
+
id: v,
|
|
3733
|
+
label: C,
|
|
3734
|
+
children: B,
|
|
3735
|
+
collapsed: L,
|
|
3736
|
+
depth: A,
|
|
3737
|
+
canFetchChildren: q,
|
|
3738
|
+
disableDragging: H,
|
|
3739
|
+
...Y
|
|
3740
|
+
}) => /* @__PURE__ */ $(
|
|
3729
3741
|
dn,
|
|
3730
3742
|
{
|
|
3731
3743
|
id: v,
|
|
3732
|
-
value:
|
|
3733
|
-
disableDragging: !!
|
|
3734
|
-
depth: v ===
|
|
3744
|
+
value: C,
|
|
3745
|
+
disableDragging: !!H,
|
|
3746
|
+
depth: v === f && w ? w.depth : A,
|
|
3735
3747
|
indentationWidth: i,
|
|
3736
3748
|
indicator: o,
|
|
3737
|
-
collapsed: !!(
|
|
3738
|
-
onCollapse: n && (
|
|
3739
|
-
onRemove: s ? () => a ? a(v) :
|
|
3749
|
+
collapsed: !!(L && (B.length || q)),
|
|
3750
|
+
onCollapse: n && (B.length || q) ? () => pe({ id: v, canFetchChildren: q, collapsed: L }) : void 0,
|
|
3751
|
+
onRemove: s ? () => a ? a(v) : Se(v) : void 0,
|
|
3740
3752
|
onAdd: l ? () => c == null ? void 0 : c(v) : void 0,
|
|
3741
|
-
onLabelClick: d ? () => d(v) : void 0
|
|
3753
|
+
onLabelClick: d ? () => d(v) : void 0,
|
|
3754
|
+
renderedItem: h == null ? void 0 : h({ id: v, label: C, children: B, ...Y })
|
|
3742
3755
|
},
|
|
3743
3756
|
v
|
|
3744
3757
|
)
|
|
3745
3758
|
),
|
|
3746
3759
|
gn(
|
|
3747
|
-
/* @__PURE__ */
|
|
3760
|
+
/* @__PURE__ */ $(
|
|
3748
3761
|
Mo,
|
|
3749
3762
|
{
|
|
3750
3763
|
dropAnimation: Ni,
|
|
3751
3764
|
modifiers: o ? [Li] : void 0,
|
|
3752
|
-
children:
|
|
3765
|
+
children: f && T ? /* @__PURE__ */ $(
|
|
3753
3766
|
dn,
|
|
3754
3767
|
{
|
|
3755
|
-
id:
|
|
3756
|
-
depth:
|
|
3768
|
+
id: f,
|
|
3769
|
+
depth: T.depth,
|
|
3757
3770
|
clone: !0,
|
|
3758
|
-
childCount: ni(e,
|
|
3759
|
-
value:
|
|
3771
|
+
childCount: ni(e, f) + 1,
|
|
3772
|
+
value: T.label,
|
|
3760
3773
|
indentationWidth: i
|
|
3761
3774
|
}
|
|
3762
3775
|
) : null
|