@object-ui/plugin-kanban 0.3.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +20 -0
- package/CHANGELOG.md +14 -0
- package/dist/KanbanEnhanced-BMreTWOT.js +894 -0
- package/dist/KanbanImpl--kTNN_B8.js +144 -0
- package/dist/index-a4_RI-v7.js +579 -0
- package/dist/index.js +6 -3
- package/dist/index.umd.cjs +6 -3
- package/dist/{KanbanImpl-CUWM-JC-.js → sortable.esm-ZHwgFQIO.js} +1053 -1183
- package/dist/src/KanbanEnhanced.d.ts +36 -0
- package/dist/src/KanbanEnhanced.d.ts.map +1 -0
- package/dist/src/ObjectKanban.d.ts +10 -0
- package/dist/src/ObjectKanban.d.ts.map +1 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +21 -1
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +11 -8
- package/src/KanbanEnhanced.tsx +394 -0
- package/src/ObjectKanban.msw.test.tsx +91 -0
- package/src/ObjectKanban.tsx +188 -0
- package/src/__tests__/KanbanEnhanced.test.tsx +259 -0
- package/src/index.test.ts +9 -9
- package/src/index.tsx +111 -5
- package/src/registration.test.tsx +26 -0
- package/src/types.ts +25 -0
- package/vite.config.ts +13 -0
- package/vitest.config.ts +12 -0
- package/vitest.setup.ts +1 -0
- package/dist/index-BV3FWhCb.js +0 -395
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import { unstable_batchedUpdates as et, createPortal as Yn } from "react-dom";
|
|
5
|
-
import { Badge as en, ScrollArea as Kn, Card as Wn, CardHeader as Hn, CardTitle as Un, CardDescription as Vn, CardContent as qn } from "@object-ui/components";
|
|
6
|
-
function Gn() {
|
|
1
|
+
import M, { useRef as I, useMemo as A, useLayoutEffect as Nn, useEffect as T, useCallback as F, useState as $, memo as Mn, useReducer as Ln, useContext as ve, createContext as je, cloneElement as Pn, forwardRef as zn } from "react";
|
|
2
|
+
import { unstable_batchedUpdates as Qe, createPortal as kn } from "react-dom";
|
|
3
|
+
function Bn() {
|
|
7
4
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
8
5
|
t[n] = arguments[n];
|
|
9
6
|
return A(
|
|
@@ -14,62 +11,62 @@ function Gn() {
|
|
|
14
11
|
t
|
|
15
12
|
);
|
|
16
13
|
}
|
|
17
|
-
const
|
|
18
|
-
function
|
|
14
|
+
const lt = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
15
|
+
function Re(e) {
|
|
19
16
|
const t = Object.prototype.toString.call(e);
|
|
20
17
|
return t === "[object Window]" || // In Electron context the Window object serializes to [object global]
|
|
21
18
|
t === "[object global]";
|
|
22
19
|
}
|
|
23
|
-
function
|
|
20
|
+
function St(e) {
|
|
24
21
|
return "nodeType" in e;
|
|
25
22
|
}
|
|
26
|
-
function
|
|
23
|
+
function X(e) {
|
|
27
24
|
var t, n;
|
|
28
|
-
return e ?
|
|
25
|
+
return e ? Re(e) ? e : St(e) && (t = (n = e.ownerDocument) == null ? void 0 : n.defaultView) != null ? t : window : window;
|
|
29
26
|
}
|
|
30
|
-
function
|
|
27
|
+
function Ct(e) {
|
|
31
28
|
const {
|
|
32
29
|
Document: t
|
|
33
|
-
} =
|
|
30
|
+
} = X(e);
|
|
34
31
|
return e instanceof t;
|
|
35
32
|
}
|
|
36
|
-
function
|
|
37
|
-
return
|
|
33
|
+
function Ye(e) {
|
|
34
|
+
return Re(e) ? !1 : e instanceof X(e).HTMLElement;
|
|
38
35
|
}
|
|
39
|
-
function
|
|
40
|
-
return e instanceof
|
|
36
|
+
function Jt(e) {
|
|
37
|
+
return e instanceof X(e).SVGElement;
|
|
41
38
|
}
|
|
42
|
-
function
|
|
43
|
-
return e ?
|
|
39
|
+
function Ee(e) {
|
|
40
|
+
return e ? Re(e) ? e.document : St(e) ? Ct(e) ? e : Ye(e) || Jt(e) ? e.ownerDocument : document : document : document;
|
|
44
41
|
}
|
|
45
|
-
const
|
|
46
|
-
function
|
|
47
|
-
const t =
|
|
48
|
-
return
|
|
42
|
+
const _ = lt ? Nn : T;
|
|
43
|
+
function ct(e) {
|
|
44
|
+
const t = I(e);
|
|
45
|
+
return _(() => {
|
|
49
46
|
t.current = e;
|
|
50
|
-
}),
|
|
47
|
+
}), F(function() {
|
|
51
48
|
for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
|
|
52
49
|
r[o] = arguments[o];
|
|
53
50
|
return t.current == null ? void 0 : t.current(...r);
|
|
54
51
|
}, []);
|
|
55
52
|
}
|
|
56
|
-
function
|
|
57
|
-
const e =
|
|
53
|
+
function Fn() {
|
|
54
|
+
const e = I(null), t = F((r, o) => {
|
|
58
55
|
e.current = setInterval(r, o);
|
|
59
|
-
}, []), n =
|
|
56
|
+
}, []), n = F(() => {
|
|
60
57
|
e.current !== null && (clearInterval(e.current), e.current = null);
|
|
61
58
|
}, []);
|
|
62
59
|
return [t, n];
|
|
63
60
|
}
|
|
64
|
-
function
|
|
61
|
+
function $e(e, t) {
|
|
65
62
|
t === void 0 && (t = [e]);
|
|
66
|
-
const n =
|
|
67
|
-
return
|
|
63
|
+
const n = I(e);
|
|
64
|
+
return _(() => {
|
|
68
65
|
n.current !== e && (n.current = e);
|
|
69
66
|
}, t), n;
|
|
70
67
|
}
|
|
71
|
-
function
|
|
72
|
-
const n =
|
|
68
|
+
function Ke(e, t) {
|
|
69
|
+
const n = I();
|
|
73
70
|
return A(
|
|
74
71
|
() => {
|
|
75
72
|
const r = e(n.current);
|
|
@@ -79,8 +76,8 @@ function He(e, t) {
|
|
|
79
76
|
[...t]
|
|
80
77
|
);
|
|
81
78
|
}
|
|
82
|
-
function
|
|
83
|
-
const t =
|
|
79
|
+
function nt(e) {
|
|
80
|
+
const t = ct(e), n = I(null), r = F(
|
|
84
81
|
(o) => {
|
|
85
82
|
o !== n.current && t?.(o, n.current), n.current = o;
|
|
86
83
|
},
|
|
@@ -89,30 +86,30 @@ function ot(e) {
|
|
|
89
86
|
);
|
|
90
87
|
return [n, r];
|
|
91
88
|
}
|
|
92
|
-
function
|
|
93
|
-
const t =
|
|
89
|
+
function rt(e) {
|
|
90
|
+
const t = I();
|
|
94
91
|
return T(() => {
|
|
95
92
|
t.current = e;
|
|
96
93
|
}, [e]), t.current;
|
|
97
94
|
}
|
|
98
|
-
let
|
|
99
|
-
function
|
|
95
|
+
let pt = {};
|
|
96
|
+
function We(e, t) {
|
|
100
97
|
return A(() => {
|
|
101
98
|
if (t)
|
|
102
99
|
return t;
|
|
103
|
-
const n =
|
|
104
|
-
return
|
|
100
|
+
const n = pt[e] == null ? 0 : pt[e] + 1;
|
|
101
|
+
return pt[e] = n, e + "-" + n;
|
|
105
102
|
}, [e, t]);
|
|
106
103
|
}
|
|
107
|
-
function
|
|
104
|
+
function _t(e) {
|
|
108
105
|
return function(t) {
|
|
109
106
|
for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++)
|
|
110
107
|
r[o - 1] = arguments[o];
|
|
111
108
|
return r.reduce((i, s) => {
|
|
112
109
|
const a = Object.entries(s);
|
|
113
110
|
for (const [l, c] of a) {
|
|
114
|
-
const
|
|
115
|
-
|
|
111
|
+
const u = i[l];
|
|
112
|
+
u != null && (i[l] = u + e * c);
|
|
116
113
|
}
|
|
117
114
|
return i;
|
|
118
115
|
}, {
|
|
@@ -120,28 +117,28 @@ function nn(e) {
|
|
|
120
117
|
});
|
|
121
118
|
};
|
|
122
119
|
}
|
|
123
|
-
const
|
|
124
|
-
function
|
|
120
|
+
const Ce = /* @__PURE__ */ _t(1), ot = /* @__PURE__ */ _t(-1);
|
|
121
|
+
function $n(e) {
|
|
125
122
|
return "clientX" in e && "clientY" in e;
|
|
126
123
|
}
|
|
127
|
-
function
|
|
124
|
+
function ut(e) {
|
|
128
125
|
if (!e)
|
|
129
126
|
return !1;
|
|
130
127
|
const {
|
|
131
128
|
KeyboardEvent: t
|
|
132
|
-
} =
|
|
129
|
+
} = X(e.target);
|
|
133
130
|
return t && e instanceof t;
|
|
134
131
|
}
|
|
135
|
-
function
|
|
132
|
+
function Xn(e) {
|
|
136
133
|
if (!e)
|
|
137
134
|
return !1;
|
|
138
135
|
const {
|
|
139
136
|
TouchEvent: t
|
|
140
|
-
} =
|
|
137
|
+
} = X(e.target);
|
|
141
138
|
return t && e instanceof t;
|
|
142
139
|
}
|
|
143
|
-
function
|
|
144
|
-
if (
|
|
140
|
+
function it(e) {
|
|
141
|
+
if (Xn(e)) {
|
|
145
142
|
if (e.touches && e.touches.length) {
|
|
146
143
|
const {
|
|
147
144
|
clientX: t,
|
|
@@ -162,7 +159,7 @@ function at(e) {
|
|
|
162
159
|
};
|
|
163
160
|
}
|
|
164
161
|
}
|
|
165
|
-
return
|
|
162
|
+
return $n(e) ? {
|
|
166
163
|
x: e.clientX,
|
|
167
164
|
y: e.clientY
|
|
168
165
|
} : null;
|
|
@@ -206,24 +203,24 @@ const be = /* @__PURE__ */ Object.freeze({
|
|
|
206
203
|
return t + " " + n + "ms " + r;
|
|
207
204
|
}
|
|
208
205
|
}
|
|
209
|
-
}),
|
|
210
|
-
function
|
|
211
|
-
return e.matches(
|
|
206
|
+
}), Bt = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
|
|
207
|
+
function jn(e) {
|
|
208
|
+
return e.matches(Bt) ? e : e.querySelector(Bt);
|
|
212
209
|
}
|
|
213
|
-
const
|
|
210
|
+
const Yn = {
|
|
214
211
|
display: "none"
|
|
215
212
|
};
|
|
216
|
-
function
|
|
213
|
+
function Kn(e) {
|
|
217
214
|
let {
|
|
218
215
|
id: t,
|
|
219
216
|
value: n
|
|
220
217
|
} = e;
|
|
221
|
-
return
|
|
218
|
+
return M.createElement("div", {
|
|
222
219
|
id: t,
|
|
223
|
-
style:
|
|
220
|
+
style: Yn
|
|
224
221
|
}, n);
|
|
225
222
|
}
|
|
226
|
-
function
|
|
223
|
+
function Wn(e) {
|
|
227
224
|
let {
|
|
228
225
|
id: t,
|
|
229
226
|
announcement: n,
|
|
@@ -243,7 +240,7 @@ function nr(e) {
|
|
|
243
240
|
clipPath: "inset(100%)",
|
|
244
241
|
whiteSpace: "nowrap"
|
|
245
242
|
};
|
|
246
|
-
return
|
|
243
|
+
return M.createElement("div", {
|
|
247
244
|
id: t,
|
|
248
245
|
style: o,
|
|
249
246
|
role: "status",
|
|
@@ -251,27 +248,27 @@ function nr(e) {
|
|
|
251
248
|
"aria-atomic": !0
|
|
252
249
|
}, n);
|
|
253
250
|
}
|
|
254
|
-
function
|
|
255
|
-
const [e, t] =
|
|
251
|
+
function Un() {
|
|
252
|
+
const [e, t] = $("");
|
|
256
253
|
return {
|
|
257
|
-
announce:
|
|
254
|
+
announce: F((r) => {
|
|
258
255
|
r != null && t(r);
|
|
259
256
|
}, []),
|
|
260
257
|
announcement: e
|
|
261
258
|
};
|
|
262
259
|
}
|
|
263
|
-
const
|
|
264
|
-
function
|
|
265
|
-
const t =
|
|
260
|
+
const Qt = /* @__PURE__ */ je(null);
|
|
261
|
+
function Hn(e) {
|
|
262
|
+
const t = ve(Qt);
|
|
266
263
|
T(() => {
|
|
267
264
|
if (!t)
|
|
268
265
|
throw new Error("useDndMonitor must be used within a children of <DndContext>");
|
|
269
266
|
return t(e);
|
|
270
267
|
}, [e, t]);
|
|
271
268
|
}
|
|
272
|
-
function
|
|
273
|
-
const [e] =
|
|
274
|
-
return [
|
|
269
|
+
function Vn() {
|
|
270
|
+
const [e] = $(() => /* @__PURE__ */ new Set()), t = F((r) => (e.add(r), () => e.delete(r)), [e]);
|
|
271
|
+
return [F((r) => {
|
|
275
272
|
let {
|
|
276
273
|
type: o,
|
|
277
274
|
event: i
|
|
@@ -282,13 +279,13 @@ function ir() {
|
|
|
282
279
|
});
|
|
283
280
|
}, [e]), t];
|
|
284
281
|
}
|
|
285
|
-
const
|
|
282
|
+
const qn = {
|
|
286
283
|
draggable: `
|
|
287
284
|
To pick up a draggable item, press the space bar.
|
|
288
285
|
While dragging, use the arrow keys to move the item.
|
|
289
286
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
290
287
|
`
|
|
291
|
-
},
|
|
288
|
+
}, Gn = {
|
|
292
289
|
onDragStart(e) {
|
|
293
290
|
let {
|
|
294
291
|
active: t
|
|
@@ -316,86 +313,86 @@ const sr = {
|
|
|
316
313
|
return "Dragging was cancelled. Draggable item " + t.id + " was dropped.";
|
|
317
314
|
}
|
|
318
315
|
};
|
|
319
|
-
function
|
|
316
|
+
function Jn(e) {
|
|
320
317
|
let {
|
|
321
|
-
announcements: t =
|
|
318
|
+
announcements: t = Gn,
|
|
322
319
|
container: n,
|
|
323
320
|
hiddenTextDescribedById: r,
|
|
324
|
-
screenReaderInstructions: o =
|
|
321
|
+
screenReaderInstructions: o = qn
|
|
325
322
|
} = e;
|
|
326
323
|
const {
|
|
327
324
|
announce: i,
|
|
328
325
|
announcement: s
|
|
329
|
-
} =
|
|
326
|
+
} = Un(), a = We("DndLiveRegion"), [l, c] = $(!1);
|
|
330
327
|
if (T(() => {
|
|
331
328
|
c(!0);
|
|
332
|
-
}, []),
|
|
333
|
-
onDragStart(
|
|
329
|
+
}, []), Hn(A(() => ({
|
|
330
|
+
onDragStart(d) {
|
|
334
331
|
let {
|
|
335
|
-
active:
|
|
336
|
-
} =
|
|
332
|
+
active: g
|
|
333
|
+
} = d;
|
|
337
334
|
i(t.onDragStart({
|
|
338
|
-
active:
|
|
335
|
+
active: g
|
|
339
336
|
}));
|
|
340
337
|
},
|
|
341
|
-
onDragMove(
|
|
338
|
+
onDragMove(d) {
|
|
342
339
|
let {
|
|
343
|
-
active:
|
|
340
|
+
active: g,
|
|
344
341
|
over: f
|
|
345
|
-
} =
|
|
342
|
+
} = d;
|
|
346
343
|
t.onDragMove && i(t.onDragMove({
|
|
347
|
-
active:
|
|
344
|
+
active: g,
|
|
348
345
|
over: f
|
|
349
346
|
}));
|
|
350
347
|
},
|
|
351
|
-
onDragOver(
|
|
348
|
+
onDragOver(d) {
|
|
352
349
|
let {
|
|
353
|
-
active:
|
|
350
|
+
active: g,
|
|
354
351
|
over: f
|
|
355
|
-
} =
|
|
352
|
+
} = d;
|
|
356
353
|
i(t.onDragOver({
|
|
357
|
-
active:
|
|
354
|
+
active: g,
|
|
358
355
|
over: f
|
|
359
356
|
}));
|
|
360
357
|
},
|
|
361
|
-
onDragEnd(
|
|
358
|
+
onDragEnd(d) {
|
|
362
359
|
let {
|
|
363
|
-
active:
|
|
360
|
+
active: g,
|
|
364
361
|
over: f
|
|
365
|
-
} =
|
|
362
|
+
} = d;
|
|
366
363
|
i(t.onDragEnd({
|
|
367
|
-
active:
|
|
364
|
+
active: g,
|
|
368
365
|
over: f
|
|
369
366
|
}));
|
|
370
367
|
},
|
|
371
|
-
onDragCancel(
|
|
368
|
+
onDragCancel(d) {
|
|
372
369
|
let {
|
|
373
|
-
active:
|
|
370
|
+
active: g,
|
|
374
371
|
over: f
|
|
375
|
-
} =
|
|
372
|
+
} = d;
|
|
376
373
|
i(t.onDragCancel({
|
|
377
|
-
active:
|
|
374
|
+
active: g,
|
|
378
375
|
over: f
|
|
379
376
|
}));
|
|
380
377
|
}
|
|
381
378
|
}), [i, t])), !l)
|
|
382
379
|
return null;
|
|
383
|
-
const
|
|
380
|
+
const u = M.createElement(M.Fragment, null, M.createElement(Kn, {
|
|
384
381
|
id: r,
|
|
385
382
|
value: o.draggable
|
|
386
|
-
}),
|
|
383
|
+
}), M.createElement(Wn, {
|
|
387
384
|
id: a,
|
|
388
385
|
announcement: s
|
|
389
386
|
}));
|
|
390
|
-
return n ?
|
|
387
|
+
return n ? kn(u, n) : u;
|
|
391
388
|
}
|
|
392
|
-
var
|
|
389
|
+
var P;
|
|
393
390
|
(function(e) {
|
|
394
391
|
e.DragStart = "dragStart", e.DragMove = "dragMove", e.DragEnd = "dragEnd", e.DragCancel = "dragCancel", e.DragOver = "dragOver", e.RegisterDroppable = "registerDroppable", e.SetDroppableDisabled = "setDroppableDisabled", e.UnregisterDroppable = "unregisterDroppable";
|
|
395
|
-
})(
|
|
396
|
-
function
|
|
392
|
+
})(P || (P = {}));
|
|
393
|
+
function st() {
|
|
397
394
|
}
|
|
398
|
-
function
|
|
395
|
+
function Ao(e, t) {
|
|
399
396
|
return A(
|
|
400
397
|
() => ({
|
|
401
398
|
sensor: e,
|
|
@@ -405,7 +402,7 @@ function cr(e, t) {
|
|
|
405
402
|
[e, t]
|
|
406
403
|
);
|
|
407
404
|
}
|
|
408
|
-
function
|
|
405
|
+
function Oo() {
|
|
409
406
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
410
407
|
t[n] = arguments[n];
|
|
411
408
|
return A(
|
|
@@ -414,15 +411,15 @@ function dr() {
|
|
|
414
411
|
[...t]
|
|
415
412
|
);
|
|
416
413
|
}
|
|
417
|
-
const
|
|
414
|
+
const Q = /* @__PURE__ */ Object.freeze({
|
|
418
415
|
x: 0,
|
|
419
416
|
y: 0
|
|
420
417
|
});
|
|
421
|
-
function
|
|
418
|
+
function _n(e, t) {
|
|
422
419
|
return Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2));
|
|
423
420
|
}
|
|
424
|
-
function
|
|
425
|
-
const n =
|
|
421
|
+
function Qn(e, t) {
|
|
422
|
+
const n = it(e);
|
|
426
423
|
if (!n)
|
|
427
424
|
return "0 0";
|
|
428
425
|
const r = {
|
|
@@ -431,7 +428,7 @@ function fr(e, t) {
|
|
|
431
428
|
};
|
|
432
429
|
return r.x + "% " + r.y + "%";
|
|
433
430
|
}
|
|
434
|
-
function
|
|
431
|
+
function Zn(e, t) {
|
|
435
432
|
let {
|
|
436
433
|
data: {
|
|
437
434
|
value: n
|
|
@@ -443,7 +440,7 @@ function gr(e, t) {
|
|
|
443
440
|
} = t;
|
|
444
441
|
return n - r;
|
|
445
442
|
}
|
|
446
|
-
function
|
|
443
|
+
function er(e, t) {
|
|
447
444
|
let {
|
|
448
445
|
data: {
|
|
449
446
|
value: n
|
|
@@ -455,7 +452,7 @@ function hr(e, t) {
|
|
|
455
452
|
} = t;
|
|
456
453
|
return r - n;
|
|
457
454
|
}
|
|
458
|
-
function
|
|
455
|
+
function Ft(e) {
|
|
459
456
|
let {
|
|
460
457
|
left: t,
|
|
461
458
|
top: n,
|
|
@@ -476,45 +473,45 @@ function Yt(e) {
|
|
|
476
473
|
y: n + r
|
|
477
474
|
}];
|
|
478
475
|
}
|
|
479
|
-
function
|
|
476
|
+
function tr(e, t) {
|
|
480
477
|
if (!e || e.length === 0)
|
|
481
478
|
return null;
|
|
482
479
|
const [n] = e;
|
|
483
480
|
return n[t];
|
|
484
481
|
}
|
|
485
|
-
const
|
|
482
|
+
const Io = (e) => {
|
|
486
483
|
let {
|
|
487
484
|
collisionRect: t,
|
|
488
485
|
droppableRects: n,
|
|
489
486
|
droppableContainers: r
|
|
490
487
|
} = e;
|
|
491
|
-
const o =
|
|
488
|
+
const o = Ft(t), i = [];
|
|
492
489
|
for (const s of r) {
|
|
493
490
|
const {
|
|
494
491
|
id: a
|
|
495
492
|
} = s, l = n.get(a);
|
|
496
493
|
if (l) {
|
|
497
|
-
const c =
|
|
494
|
+
const c = Ft(l), u = o.reduce((g, f, x) => g + _n(c[x], f), 0), d = Number((u / 4).toFixed(4));
|
|
498
495
|
i.push({
|
|
499
496
|
id: a,
|
|
500
497
|
data: {
|
|
501
498
|
droppableContainer: s,
|
|
502
|
-
value:
|
|
499
|
+
value: d
|
|
503
500
|
}
|
|
504
501
|
});
|
|
505
502
|
}
|
|
506
503
|
}
|
|
507
|
-
return i.sort(
|
|
504
|
+
return i.sort(Zn);
|
|
508
505
|
};
|
|
509
|
-
function
|
|
506
|
+
function nr(e, t) {
|
|
510
507
|
const n = Math.max(t.top, e.top), r = Math.max(t.left, e.left), o = Math.min(t.left + t.width, e.left + e.width), i = Math.min(t.top + t.height, e.top + e.height), s = o - r, a = i - n;
|
|
511
508
|
if (r < o && n < i) {
|
|
512
|
-
const l = t.width * t.height, c = e.width * e.height,
|
|
513
|
-
return Number(
|
|
509
|
+
const l = t.width * t.height, c = e.width * e.height, u = s * a, d = u / (l + c - u);
|
|
510
|
+
return Number(d.toFixed(4));
|
|
514
511
|
}
|
|
515
512
|
return 0;
|
|
516
513
|
}
|
|
517
|
-
const
|
|
514
|
+
const rr = (e) => {
|
|
518
515
|
let {
|
|
519
516
|
collisionRect: t,
|
|
520
517
|
droppableRects: n,
|
|
@@ -526,7 +523,7 @@ const mr = (e) => {
|
|
|
526
523
|
id: s
|
|
527
524
|
} = i, a = n.get(s);
|
|
528
525
|
if (a) {
|
|
529
|
-
const l =
|
|
526
|
+
const l = nr(a, t);
|
|
530
527
|
l > 0 && o.push({
|
|
531
528
|
id: s,
|
|
532
529
|
data: {
|
|
@@ -536,22 +533,22 @@ const mr = (e) => {
|
|
|
536
533
|
});
|
|
537
534
|
}
|
|
538
535
|
}
|
|
539
|
-
return o.sort(
|
|
536
|
+
return o.sort(er);
|
|
540
537
|
};
|
|
541
|
-
function
|
|
538
|
+
function or(e, t, n) {
|
|
542
539
|
return {
|
|
543
540
|
...e,
|
|
544
541
|
scaleX: t && n ? t.width / n.width : 1,
|
|
545
542
|
scaleY: t && n ? t.height / n.height : 1
|
|
546
543
|
};
|
|
547
544
|
}
|
|
548
|
-
function
|
|
545
|
+
function Zt(e, t) {
|
|
549
546
|
return e && t ? {
|
|
550
547
|
x: e.left - t.left,
|
|
551
548
|
y: e.top - t.top
|
|
552
|
-
} :
|
|
549
|
+
} : Q;
|
|
553
550
|
}
|
|
554
|
-
function
|
|
551
|
+
function ir(e) {
|
|
555
552
|
return function(n) {
|
|
556
553
|
for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
|
|
557
554
|
o[i - 1] = arguments[i];
|
|
@@ -566,8 +563,8 @@ function xr(e) {
|
|
|
566
563
|
});
|
|
567
564
|
};
|
|
568
565
|
}
|
|
569
|
-
const
|
|
570
|
-
function
|
|
566
|
+
const sr = /* @__PURE__ */ ir(1);
|
|
567
|
+
function en(e) {
|
|
571
568
|
if (e.startsWith("matrix3d(")) {
|
|
572
569
|
const t = e.slice(9, -1).split(/, /);
|
|
573
570
|
return {
|
|
@@ -587,8 +584,8 @@ function sn(e) {
|
|
|
587
584
|
}
|
|
588
585
|
return null;
|
|
589
586
|
}
|
|
590
|
-
function
|
|
591
|
-
const r =
|
|
587
|
+
function ar(e, t, n) {
|
|
588
|
+
const r = en(t);
|
|
592
589
|
if (!r)
|
|
593
590
|
return e;
|
|
594
591
|
const {
|
|
@@ -596,28 +593,28 @@ function Dr(e, t, n) {
|
|
|
596
593
|
scaleY: i,
|
|
597
594
|
x: s,
|
|
598
595
|
y: a
|
|
599
|
-
} = r, l = e.left - s - (1 - o) * parseFloat(n), c = e.top - a - (1 - i) * parseFloat(n.slice(n.indexOf(" ") + 1)),
|
|
596
|
+
} = r, l = e.left - s - (1 - o) * parseFloat(n), c = e.top - a - (1 - i) * parseFloat(n.slice(n.indexOf(" ") + 1)), u = o ? e.width / o : e.width, d = i ? e.height / i : e.height;
|
|
600
597
|
return {
|
|
601
|
-
width:
|
|
602
|
-
height:
|
|
598
|
+
width: u,
|
|
599
|
+
height: d,
|
|
603
600
|
top: c,
|
|
604
|
-
right: l +
|
|
605
|
-
bottom: c +
|
|
601
|
+
right: l + u,
|
|
602
|
+
bottom: c + d,
|
|
606
603
|
left: l
|
|
607
604
|
};
|
|
608
605
|
}
|
|
609
|
-
const
|
|
606
|
+
const lr = {
|
|
610
607
|
ignoreTransform: !1
|
|
611
608
|
};
|
|
612
609
|
function Ae(e, t) {
|
|
613
|
-
t === void 0 && (t =
|
|
610
|
+
t === void 0 && (t = lr);
|
|
614
611
|
let n = e.getBoundingClientRect();
|
|
615
612
|
if (t.ignoreTransform) {
|
|
616
613
|
const {
|
|
617
614
|
transform: c,
|
|
618
|
-
transformOrigin:
|
|
619
|
-
} =
|
|
620
|
-
c && (n =
|
|
615
|
+
transformOrigin: u
|
|
616
|
+
} = X(e).getComputedStyle(e);
|
|
617
|
+
c && (n = ar(n, c, u));
|
|
621
618
|
}
|
|
622
619
|
const {
|
|
623
620
|
top: r,
|
|
@@ -636,12 +633,12 @@ function Ae(e, t) {
|
|
|
636
633
|
right: l
|
|
637
634
|
};
|
|
638
635
|
}
|
|
639
|
-
function
|
|
636
|
+
function $t(e) {
|
|
640
637
|
return Ae(e, {
|
|
641
638
|
ignoreTransform: !0
|
|
642
639
|
});
|
|
643
640
|
}
|
|
644
|
-
function
|
|
641
|
+
function cr(e) {
|
|
645
642
|
const t = e.innerWidth, n = e.innerHeight;
|
|
646
643
|
return {
|
|
647
644
|
top: 0,
|
|
@@ -652,62 +649,62 @@ function Sr(e) {
|
|
|
652
649
|
height: n
|
|
653
650
|
};
|
|
654
651
|
}
|
|
655
|
-
function
|
|
656
|
-
return t === void 0 && (t =
|
|
652
|
+
function ur(e, t) {
|
|
653
|
+
return t === void 0 && (t = X(e).getComputedStyle(e)), t.position === "fixed";
|
|
657
654
|
}
|
|
658
|
-
function
|
|
659
|
-
t === void 0 && (t =
|
|
655
|
+
function dr(e, t) {
|
|
656
|
+
t === void 0 && (t = X(e).getComputedStyle(e));
|
|
660
657
|
const n = /(auto|scroll|overlay)/;
|
|
661
658
|
return ["overflow", "overflowX", "overflowY"].some((o) => {
|
|
662
659
|
const i = t[o];
|
|
663
660
|
return typeof i == "string" ? n.test(i) : !1;
|
|
664
661
|
});
|
|
665
662
|
}
|
|
666
|
-
function
|
|
663
|
+
function Rt(e, t) {
|
|
667
664
|
const n = [];
|
|
668
665
|
function r(o) {
|
|
669
666
|
if (t != null && n.length >= t || !o)
|
|
670
667
|
return n;
|
|
671
|
-
if (
|
|
668
|
+
if (Ct(o) && o.scrollingElement != null && !n.includes(o.scrollingElement))
|
|
672
669
|
return n.push(o.scrollingElement), n;
|
|
673
|
-
if (!
|
|
670
|
+
if (!Ye(o) || Jt(o) || n.includes(o))
|
|
674
671
|
return n;
|
|
675
|
-
const i =
|
|
676
|
-
return o !== e &&
|
|
672
|
+
const i = X(e).getComputedStyle(o);
|
|
673
|
+
return o !== e && dr(o, i) && n.push(o), ur(o, i) ? n : r(o.parentNode);
|
|
677
674
|
}
|
|
678
675
|
return e ? r(e) : n;
|
|
679
676
|
}
|
|
680
|
-
function
|
|
681
|
-
const [t] =
|
|
677
|
+
function tn(e) {
|
|
678
|
+
const [t] = Rt(e, 1);
|
|
682
679
|
return t ?? null;
|
|
683
680
|
}
|
|
684
|
-
function
|
|
685
|
-
return !
|
|
681
|
+
function bt(e) {
|
|
682
|
+
return !lt || !e ? null : Re(e) ? e : St(e) ? Ct(e) || e === Ee(e).scrollingElement ? window : Ye(e) ? e : null : null;
|
|
686
683
|
}
|
|
687
|
-
function
|
|
688
|
-
return
|
|
684
|
+
function nn(e) {
|
|
685
|
+
return Re(e) ? e.scrollX : e.scrollLeft;
|
|
689
686
|
}
|
|
690
|
-
function
|
|
691
|
-
return
|
|
687
|
+
function rn(e) {
|
|
688
|
+
return Re(e) ? e.scrollY : e.scrollTop;
|
|
692
689
|
}
|
|
693
|
-
function
|
|
690
|
+
function wt(e) {
|
|
694
691
|
return {
|
|
695
|
-
x:
|
|
696
|
-
y:
|
|
692
|
+
x: nn(e),
|
|
693
|
+
y: rn(e)
|
|
697
694
|
};
|
|
698
695
|
}
|
|
699
|
-
var
|
|
696
|
+
var z;
|
|
700
697
|
(function(e) {
|
|
701
698
|
e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
|
|
702
|
-
})(
|
|
703
|
-
function
|
|
704
|
-
return !
|
|
699
|
+
})(z || (z = {}));
|
|
700
|
+
function on(e) {
|
|
701
|
+
return !lt || !e ? !1 : e === document.scrollingElement;
|
|
705
702
|
}
|
|
706
|
-
function
|
|
703
|
+
function sn(e) {
|
|
707
704
|
const t = {
|
|
708
705
|
x: 0,
|
|
709
706
|
y: 0
|
|
710
|
-
}, n =
|
|
707
|
+
}, n = on(e) ? {
|
|
711
708
|
height: window.innerHeight,
|
|
712
709
|
width: window.innerWidth
|
|
713
710
|
} : {
|
|
@@ -726,39 +723,39 @@ function un(e) {
|
|
|
726
723
|
minScroll: t
|
|
727
724
|
};
|
|
728
725
|
}
|
|
729
|
-
const
|
|
726
|
+
const fr = {
|
|
730
727
|
x: 0.2,
|
|
731
728
|
y: 0.2
|
|
732
729
|
};
|
|
733
|
-
function
|
|
730
|
+
function gr(e, t, n, r, o) {
|
|
734
731
|
let {
|
|
735
732
|
top: i,
|
|
736
733
|
left: s,
|
|
737
734
|
right: a,
|
|
738
735
|
bottom: l
|
|
739
736
|
} = n;
|
|
740
|
-
r === void 0 && (r = 10), o === void 0 && (o =
|
|
737
|
+
r === void 0 && (r = 10), o === void 0 && (o = fr);
|
|
741
738
|
const {
|
|
742
739
|
isTop: c,
|
|
743
|
-
isBottom:
|
|
744
|
-
isLeft:
|
|
745
|
-
isRight:
|
|
746
|
-
} =
|
|
740
|
+
isBottom: u,
|
|
741
|
+
isLeft: d,
|
|
742
|
+
isRight: g
|
|
743
|
+
} = sn(e), f = {
|
|
747
744
|
x: 0,
|
|
748
745
|
y: 0
|
|
749
|
-
},
|
|
746
|
+
}, x = {
|
|
750
747
|
x: 0,
|
|
751
748
|
y: 0
|
|
752
|
-
},
|
|
749
|
+
}, h = {
|
|
753
750
|
height: t.height * o.y,
|
|
754
751
|
width: t.width * o.x
|
|
755
752
|
};
|
|
756
|
-
return !c && i <= t.top +
|
|
753
|
+
return !c && i <= t.top + h.height ? (f.y = z.Backward, x.y = r * Math.abs((t.top + h.height - i) / h.height)) : !u && l >= t.bottom - h.height && (f.y = z.Forward, x.y = r * Math.abs((t.bottom - h.height - l) / h.height)), !g && a >= t.right - h.width ? (f.x = z.Forward, x.x = r * Math.abs((t.right - h.width - a) / h.width)) : !d && s <= t.left + h.width && (f.x = z.Backward, x.x = r * Math.abs((t.left + h.width - s) / h.width)), {
|
|
757
754
|
direction: f,
|
|
758
|
-
speed:
|
|
755
|
+
speed: x
|
|
759
756
|
};
|
|
760
757
|
}
|
|
761
|
-
function
|
|
758
|
+
function hr(e) {
|
|
762
759
|
if (e === document.scrollingElement) {
|
|
763
760
|
const {
|
|
764
761
|
innerWidth: i,
|
|
@@ -788,16 +785,16 @@ function Ar(e) {
|
|
|
788
785
|
height: e.clientHeight
|
|
789
786
|
};
|
|
790
787
|
}
|
|
791
|
-
function
|
|
792
|
-
return e.reduce((t, n) =>
|
|
788
|
+
function an(e) {
|
|
789
|
+
return e.reduce((t, n) => Ce(t, wt(n)), Q);
|
|
793
790
|
}
|
|
794
|
-
function
|
|
795
|
-
return e.reduce((t, n) => t +
|
|
791
|
+
function vr(e) {
|
|
792
|
+
return e.reduce((t, n) => t + nn(n), 0);
|
|
796
793
|
}
|
|
797
|
-
function
|
|
798
|
-
return e.reduce((t, n) => t +
|
|
794
|
+
function pr(e) {
|
|
795
|
+
return e.reduce((t, n) => t + rn(n), 0);
|
|
799
796
|
}
|
|
800
|
-
function
|
|
797
|
+
function ln(e, t) {
|
|
801
798
|
if (t === void 0 && (t = Ae), !e)
|
|
802
799
|
return;
|
|
803
800
|
const {
|
|
@@ -806,25 +803,25 @@ function gn(e, t) {
|
|
|
806
803
|
bottom: o,
|
|
807
804
|
right: i
|
|
808
805
|
} = t(e);
|
|
809
|
-
|
|
806
|
+
tn(e) && (o <= 0 || i <= 0 || n >= window.innerHeight || r >= window.innerWidth) && e.scrollIntoView({
|
|
810
807
|
block: "center",
|
|
811
808
|
inline: "center"
|
|
812
809
|
});
|
|
813
810
|
}
|
|
814
|
-
const
|
|
815
|
-
class
|
|
811
|
+
const br = [["x", ["left", "right"], vr], ["y", ["top", "bottom"], pr]];
|
|
812
|
+
class Et {
|
|
816
813
|
constructor(t, n) {
|
|
817
814
|
this.rect = void 0, this.width = void 0, this.height = void 0, this.top = void 0, this.bottom = void 0, this.right = void 0, this.left = void 0;
|
|
818
|
-
const r =
|
|
815
|
+
const r = Rt(n), o = an(r);
|
|
819
816
|
this.rect = {
|
|
820
817
|
...t
|
|
821
818
|
}, this.width = t.width, this.height = t.height;
|
|
822
|
-
for (const [i, s, a] of
|
|
819
|
+
for (const [i, s, a] of br)
|
|
823
820
|
for (const l of s)
|
|
824
821
|
Object.defineProperty(this, l, {
|
|
825
822
|
get: () => {
|
|
826
|
-
const c = a(r),
|
|
827
|
-
return this.rect[l] +
|
|
823
|
+
const c = a(r), u = o[i] - c;
|
|
824
|
+
return this.rect[l] + u;
|
|
828
825
|
},
|
|
829
826
|
enumerable: !0
|
|
830
827
|
});
|
|
@@ -833,7 +830,7 @@ class It {
|
|
|
833
830
|
});
|
|
834
831
|
}
|
|
835
832
|
}
|
|
836
|
-
class
|
|
833
|
+
class ke {
|
|
837
834
|
constructor(t) {
|
|
838
835
|
this.target = void 0, this.listeners = [], this.removeAll = () => {
|
|
839
836
|
this.listeners.forEach((n) => {
|
|
@@ -847,62 +844,62 @@ class Be {
|
|
|
847
844
|
(o = this.target) == null || o.addEventListener(t, n, r), this.listeners.push([t, n, r]);
|
|
848
845
|
}
|
|
849
846
|
}
|
|
850
|
-
function
|
|
847
|
+
function yr(e) {
|
|
851
848
|
const {
|
|
852
849
|
EventTarget: t
|
|
853
|
-
} =
|
|
854
|
-
return e instanceof t ? e :
|
|
850
|
+
} = X(e);
|
|
851
|
+
return e instanceof t ? e : Ee(e);
|
|
855
852
|
}
|
|
856
|
-
function
|
|
853
|
+
function yt(e, t) {
|
|
857
854
|
const n = Math.abs(e.x), r = Math.abs(e.y);
|
|
858
855
|
return typeof t == "number" ? Math.sqrt(n ** 2 + r ** 2) > t : "x" in t && "y" in t ? n > t.x && r > t.y : "x" in t ? n > t.x : "y" in t ? r > t.y : !1;
|
|
859
856
|
}
|
|
860
|
-
var
|
|
857
|
+
var q;
|
|
861
858
|
(function(e) {
|
|
862
859
|
e.Click = "click", e.DragStart = "dragstart", e.Keydown = "keydown", e.ContextMenu = "contextmenu", e.Resize = "resize", e.SelectionChange = "selectionchange", e.VisibilityChange = "visibilitychange";
|
|
863
|
-
})(
|
|
864
|
-
function
|
|
860
|
+
})(q || (q = {}));
|
|
861
|
+
function Xt(e) {
|
|
865
862
|
e.preventDefault();
|
|
866
863
|
}
|
|
867
|
-
function
|
|
864
|
+
function mr(e) {
|
|
868
865
|
e.stopPropagation();
|
|
869
866
|
}
|
|
870
|
-
var
|
|
867
|
+
var C;
|
|
871
868
|
(function(e) {
|
|
872
869
|
e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter", e.Tab = "Tab";
|
|
873
|
-
})(
|
|
874
|
-
const
|
|
875
|
-
start: [
|
|
876
|
-
cancel: [
|
|
877
|
-
end: [
|
|
878
|
-
},
|
|
870
|
+
})(C || (C = {}));
|
|
871
|
+
const cn = {
|
|
872
|
+
start: [C.Space, C.Enter],
|
|
873
|
+
cancel: [C.Esc],
|
|
874
|
+
end: [C.Space, C.Enter, C.Tab]
|
|
875
|
+
}, wr = (e, t) => {
|
|
879
876
|
let {
|
|
880
877
|
currentCoordinates: n
|
|
881
878
|
} = t;
|
|
882
879
|
switch (e.code) {
|
|
883
|
-
case
|
|
880
|
+
case C.Right:
|
|
884
881
|
return {
|
|
885
882
|
...n,
|
|
886
883
|
x: n.x + 25
|
|
887
884
|
};
|
|
888
|
-
case
|
|
885
|
+
case C.Left:
|
|
889
886
|
return {
|
|
890
887
|
...n,
|
|
891
888
|
x: n.x - 25
|
|
892
889
|
};
|
|
893
|
-
case
|
|
890
|
+
case C.Down:
|
|
894
891
|
return {
|
|
895
892
|
...n,
|
|
896
893
|
y: n.y + 25
|
|
897
894
|
};
|
|
898
|
-
case
|
|
895
|
+
case C.Up:
|
|
899
896
|
return {
|
|
900
897
|
...n,
|
|
901
898
|
y: n.y - 25
|
|
902
899
|
};
|
|
903
900
|
}
|
|
904
901
|
};
|
|
905
|
-
class
|
|
902
|
+
class un {
|
|
906
903
|
constructor(t) {
|
|
907
904
|
this.props = void 0, this.autoScrollEnabled = !1, this.referenceCoordinates = void 0, this.listeners = void 0, this.windowListeners = void 0, this.props = t;
|
|
908
905
|
const {
|
|
@@ -910,27 +907,27 @@ class vn {
|
|
|
910
907
|
target: n
|
|
911
908
|
}
|
|
912
909
|
} = t;
|
|
913
|
-
this.props = t, this.listeners = new
|
|
910
|
+
this.props = t, this.listeners = new ke(Ee(n)), this.windowListeners = new ke(X(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
|
|
914
911
|
}
|
|
915
912
|
attach() {
|
|
916
|
-
this.handleStart(), this.windowListeners.add(
|
|
913
|
+
this.handleStart(), this.windowListeners.add(q.Resize, this.handleCancel), this.windowListeners.add(q.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(q.Keydown, this.handleKeyDown));
|
|
917
914
|
}
|
|
918
915
|
handleStart() {
|
|
919
916
|
const {
|
|
920
917
|
activeNode: t,
|
|
921
918
|
onStart: n
|
|
922
919
|
} = this.props, r = t.node.current;
|
|
923
|
-
r &&
|
|
920
|
+
r && ln(r), n(Q);
|
|
924
921
|
}
|
|
925
922
|
handleKeyDown(t) {
|
|
926
|
-
if (
|
|
923
|
+
if (ut(t)) {
|
|
927
924
|
const {
|
|
928
925
|
active: n,
|
|
929
926
|
context: r,
|
|
930
927
|
options: o
|
|
931
928
|
} = this.props, {
|
|
932
|
-
keyboardCodes: i =
|
|
933
|
-
coordinateGetter: s =
|
|
929
|
+
keyboardCodes: i = cn,
|
|
930
|
+
coordinateGetter: s = wr,
|
|
934
931
|
scrollBehavior: a = "smooth"
|
|
935
932
|
} = o, {
|
|
936
933
|
code: l
|
|
@@ -945,66 +942,66 @@ class vn {
|
|
|
945
942
|
}
|
|
946
943
|
const {
|
|
947
944
|
collisionRect: c
|
|
948
|
-
} = r.current,
|
|
945
|
+
} = r.current, u = c ? {
|
|
949
946
|
x: c.left,
|
|
950
947
|
y: c.top
|
|
951
|
-
} :
|
|
952
|
-
this.referenceCoordinates || (this.referenceCoordinates =
|
|
953
|
-
const
|
|
948
|
+
} : Q;
|
|
949
|
+
this.referenceCoordinates || (this.referenceCoordinates = u);
|
|
950
|
+
const d = s(t, {
|
|
954
951
|
active: n,
|
|
955
952
|
context: r.current,
|
|
956
|
-
currentCoordinates:
|
|
953
|
+
currentCoordinates: u
|
|
957
954
|
});
|
|
958
|
-
if (
|
|
959
|
-
const
|
|
955
|
+
if (d) {
|
|
956
|
+
const g = ot(d, u), f = {
|
|
960
957
|
x: 0,
|
|
961
958
|
y: 0
|
|
962
959
|
}, {
|
|
963
|
-
scrollableAncestors:
|
|
960
|
+
scrollableAncestors: x
|
|
964
961
|
} = r.current;
|
|
965
|
-
for (const
|
|
962
|
+
for (const h of x) {
|
|
966
963
|
const v = t.code, {
|
|
967
|
-
isTop:
|
|
964
|
+
isTop: p,
|
|
968
965
|
isRight: y,
|
|
969
|
-
isLeft:
|
|
966
|
+
isLeft: b,
|
|
970
967
|
isBottom: D,
|
|
971
|
-
maxScroll:
|
|
972
|
-
minScroll:
|
|
973
|
-
} =
|
|
974
|
-
x: Math.min(v ===
|
|
975
|
-
y: Math.min(v ===
|
|
976
|
-
},
|
|
977
|
-
if (
|
|
978
|
-
const
|
|
979
|
-
if (
|
|
980
|
-
|
|
981
|
-
left:
|
|
968
|
+
maxScroll: S,
|
|
969
|
+
minScroll: R
|
|
970
|
+
} = sn(h), m = hr(h), w = {
|
|
971
|
+
x: Math.min(v === C.Right ? m.right - m.width / 2 : m.right, Math.max(v === C.Right ? m.left : m.left + m.width / 2, d.x)),
|
|
972
|
+
y: Math.min(v === C.Down ? m.bottom - m.height / 2 : m.bottom, Math.max(v === C.Down ? m.top : m.top + m.height / 2, d.y))
|
|
973
|
+
}, N = v === C.Right && !y || v === C.Left && !b, L = v === C.Down && !D || v === C.Up && !p;
|
|
974
|
+
if (N && w.x !== d.x) {
|
|
975
|
+
const O = h.scrollLeft + g.x, G = v === C.Right && O <= S.x || v === C.Left && O >= R.x;
|
|
976
|
+
if (G && !g.y) {
|
|
977
|
+
h.scrollTo({
|
|
978
|
+
left: O,
|
|
982
979
|
behavior: a
|
|
983
980
|
});
|
|
984
981
|
return;
|
|
985
982
|
}
|
|
986
|
-
|
|
983
|
+
G ? f.x = h.scrollLeft - O : f.x = v === C.Right ? h.scrollLeft - S.x : h.scrollLeft - R.x, f.x && h.scrollBy({
|
|
987
984
|
left: -f.x,
|
|
988
985
|
behavior: a
|
|
989
986
|
});
|
|
990
987
|
break;
|
|
991
|
-
} else if (
|
|
992
|
-
const
|
|
993
|
-
if (
|
|
994
|
-
|
|
995
|
-
top:
|
|
988
|
+
} else if (L && w.y !== d.y) {
|
|
989
|
+
const O = h.scrollTop + g.y, G = v === C.Down && O <= S.y || v === C.Up && O >= R.y;
|
|
990
|
+
if (G && !g.x) {
|
|
991
|
+
h.scrollTo({
|
|
992
|
+
top: O,
|
|
996
993
|
behavior: a
|
|
997
994
|
});
|
|
998
995
|
return;
|
|
999
996
|
}
|
|
1000
|
-
|
|
997
|
+
G ? f.y = h.scrollTop - O : f.y = v === C.Down ? h.scrollTop - S.y : h.scrollTop - R.y, f.y && h.scrollBy({
|
|
1001
998
|
top: -f.y,
|
|
1002
999
|
behavior: a
|
|
1003
1000
|
});
|
|
1004
1001
|
break;
|
|
1005
1002
|
}
|
|
1006
1003
|
}
|
|
1007
|
-
this.handleMove(t,
|
|
1004
|
+
this.handleMove(t, Ce(ot(d, this.referenceCoordinates), f));
|
|
1008
1005
|
}
|
|
1009
1006
|
}
|
|
1010
1007
|
}
|
|
@@ -1030,11 +1027,11 @@ class vn {
|
|
|
1030
1027
|
this.listeners.removeAll(), this.windowListeners.removeAll();
|
|
1031
1028
|
}
|
|
1032
1029
|
}
|
|
1033
|
-
|
|
1030
|
+
un.activators = [{
|
|
1034
1031
|
eventName: "onKeyDown",
|
|
1035
1032
|
handler: (e, t, n) => {
|
|
1036
1033
|
let {
|
|
1037
|
-
keyboardCodes: r =
|
|
1034
|
+
keyboardCodes: r = cn,
|
|
1038
1035
|
onActivation: o
|
|
1039
1036
|
} = t, {
|
|
1040
1037
|
active: i
|
|
@@ -1051,22 +1048,22 @@ vn.activators = [{
|
|
|
1051
1048
|
return !1;
|
|
1052
1049
|
}
|
|
1053
1050
|
}];
|
|
1054
|
-
function
|
|
1051
|
+
function jt(e) {
|
|
1055
1052
|
return !!(e && "distance" in e);
|
|
1056
1053
|
}
|
|
1057
|
-
function
|
|
1054
|
+
function Yt(e) {
|
|
1058
1055
|
return !!(e && "delay" in e);
|
|
1059
1056
|
}
|
|
1060
1057
|
class At {
|
|
1061
1058
|
constructor(t, n, r) {
|
|
1062
1059
|
var o;
|
|
1063
|
-
r === void 0 && (r =
|
|
1060
|
+
r === void 0 && (r = yr(t.event.target)), this.props = void 0, this.events = void 0, this.autoScrollEnabled = !0, this.document = void 0, this.activated = !1, this.initialCoordinates = void 0, this.timeoutId = null, this.listeners = void 0, this.documentListeners = void 0, this.windowListeners = void 0, this.props = t, this.events = n;
|
|
1064
1061
|
const {
|
|
1065
1062
|
event: i
|
|
1066
1063
|
} = t, {
|
|
1067
1064
|
target: s
|
|
1068
1065
|
} = i;
|
|
1069
|
-
this.props = t, this.events = n, this.document =
|
|
1066
|
+
this.props = t, this.events = n, this.document = Ee(s), this.documentListeners = new ke(this.document), this.listeners = new ke(r), this.windowListeners = new ke(X(s)), this.initialCoordinates = (o = it(i)) != null ? o : Q, 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();
|
|
1070
1067
|
}
|
|
1071
1068
|
attach() {
|
|
1072
1069
|
const {
|
|
@@ -1080,18 +1077,18 @@ class At {
|
|
|
1080
1077
|
} = this;
|
|
1081
1078
|
if (this.listeners.add(t.move.name, this.handleMove, {
|
|
1082
1079
|
passive: !1
|
|
1083
|
-
}), this.listeners.add(t.end.name, this.handleEnd), t.cancel && this.listeners.add(t.cancel.name, this.handleCancel), this.windowListeners.add(
|
|
1080
|
+
}), this.listeners.add(t.end.name, this.handleEnd), t.cancel && this.listeners.add(t.cancel.name, this.handleCancel), this.windowListeners.add(q.Resize, this.handleCancel), this.windowListeners.add(q.DragStart, Xt), this.windowListeners.add(q.VisibilityChange, this.handleCancel), this.windowListeners.add(q.ContextMenu, Xt), this.documentListeners.add(q.Keydown, this.handleKeydown), n) {
|
|
1084
1081
|
if (r != null && r({
|
|
1085
1082
|
event: this.props.event,
|
|
1086
1083
|
activeNode: this.props.activeNode,
|
|
1087
1084
|
options: this.props.options
|
|
1088
1085
|
}))
|
|
1089
1086
|
return this.handleStart();
|
|
1090
|
-
if (
|
|
1087
|
+
if (Yt(n)) {
|
|
1091
1088
|
this.timeoutId = setTimeout(this.handleStart, n.delay), this.handlePending(n);
|
|
1092
1089
|
return;
|
|
1093
1090
|
}
|
|
1094
|
-
if (
|
|
1091
|
+
if (jt(n)) {
|
|
1095
1092
|
this.handlePending(n);
|
|
1096
1093
|
return;
|
|
1097
1094
|
}
|
|
@@ -1114,9 +1111,9 @@ class At {
|
|
|
1114
1111
|
} = this, {
|
|
1115
1112
|
onStart: n
|
|
1116
1113
|
} = this.props;
|
|
1117
|
-
t && (this.activated = !0, this.documentListeners.add(
|
|
1114
|
+
t && (this.activated = !0, this.documentListeners.add(q.Click, mr, {
|
|
1118
1115
|
capture: !0
|
|
1119
|
-
}), this.removeTextSelection(), this.documentListeners.add(
|
|
1116
|
+
}), this.removeTextSelection(), this.documentListeners.add(q.SelectionChange, this.removeTextSelection), n(t));
|
|
1120
1117
|
}
|
|
1121
1118
|
handleMove(t) {
|
|
1122
1119
|
var n;
|
|
@@ -1132,15 +1129,15 @@ class At {
|
|
|
1132
1129
|
} = i;
|
|
1133
1130
|
if (!o)
|
|
1134
1131
|
return;
|
|
1135
|
-
const l = (n =
|
|
1132
|
+
const l = (n = it(t)) != null ? n : Q, c = ot(o, l);
|
|
1136
1133
|
if (!r && a) {
|
|
1137
|
-
if (
|
|
1138
|
-
if (a.tolerance != null &&
|
|
1134
|
+
if (jt(a)) {
|
|
1135
|
+
if (a.tolerance != null && yt(c, a.tolerance))
|
|
1139
1136
|
return this.handleCancel();
|
|
1140
|
-
if (
|
|
1137
|
+
if (yt(c, a.distance))
|
|
1141
1138
|
return this.handleStart();
|
|
1142
1139
|
}
|
|
1143
|
-
if (
|
|
1140
|
+
if (Yt(a) && yt(c, a.tolerance))
|
|
1144
1141
|
return this.handleCancel();
|
|
1145
1142
|
this.handlePending(a, c);
|
|
1146
1143
|
return;
|
|
@@ -1162,14 +1159,14 @@ class At {
|
|
|
1162
1159
|
this.detach(), this.activated || t(this.props.active), n();
|
|
1163
1160
|
}
|
|
1164
1161
|
handleKeydown(t) {
|
|
1165
|
-
t.code ===
|
|
1162
|
+
t.code === C.Esc && this.handleCancel();
|
|
1166
1163
|
}
|
|
1167
1164
|
removeTextSelection() {
|
|
1168
1165
|
var t;
|
|
1169
1166
|
(t = this.document.getSelection()) == null || t.removeAllRanges();
|
|
1170
1167
|
}
|
|
1171
1168
|
}
|
|
1172
|
-
const
|
|
1169
|
+
const xr = {
|
|
1173
1170
|
cancel: {
|
|
1174
1171
|
name: "pointercancel"
|
|
1175
1172
|
},
|
|
@@ -1180,15 +1177,15 @@ const Pr = {
|
|
|
1180
1177
|
name: "pointerup"
|
|
1181
1178
|
}
|
|
1182
1179
|
};
|
|
1183
|
-
class
|
|
1180
|
+
class dn extends At {
|
|
1184
1181
|
constructor(t) {
|
|
1185
1182
|
const {
|
|
1186
1183
|
event: n
|
|
1187
|
-
} = t, r =
|
|
1188
|
-
super(t,
|
|
1184
|
+
} = t, r = Ee(n.target);
|
|
1185
|
+
super(t, xr, r);
|
|
1189
1186
|
}
|
|
1190
1187
|
}
|
|
1191
|
-
|
|
1188
|
+
dn.activators = [{
|
|
1192
1189
|
eventName: "onPointerDown",
|
|
1193
1190
|
handler: (e, t) => {
|
|
1194
1191
|
let {
|
|
@@ -1201,7 +1198,7 @@ Ot.activators = [{
|
|
|
1201
1198
|
}), !0);
|
|
1202
1199
|
}
|
|
1203
1200
|
}];
|
|
1204
|
-
const
|
|
1201
|
+
const Dr = {
|
|
1205
1202
|
move: {
|
|
1206
1203
|
name: "mousemove"
|
|
1207
1204
|
},
|
|
@@ -1209,16 +1206,16 @@ const zr = {
|
|
|
1209
1206
|
name: "mouseup"
|
|
1210
1207
|
}
|
|
1211
1208
|
};
|
|
1212
|
-
var
|
|
1209
|
+
var xt;
|
|
1213
1210
|
(function(e) {
|
|
1214
1211
|
e[e.RightClick = 2] = "RightClick";
|
|
1215
|
-
})(
|
|
1216
|
-
class
|
|
1212
|
+
})(xt || (xt = {}));
|
|
1213
|
+
class Sr extends At {
|
|
1217
1214
|
constructor(t) {
|
|
1218
|
-
super(t,
|
|
1215
|
+
super(t, Dr, Ee(t.event.target));
|
|
1219
1216
|
}
|
|
1220
1217
|
}
|
|
1221
|
-
|
|
1218
|
+
Sr.activators = [{
|
|
1222
1219
|
eventName: "onMouseDown",
|
|
1223
1220
|
handler: (e, t) => {
|
|
1224
1221
|
let {
|
|
@@ -1226,12 +1223,12 @@ Br.activators = [{
|
|
|
1226
1223
|
} = e, {
|
|
1227
1224
|
onActivation: r
|
|
1228
1225
|
} = t;
|
|
1229
|
-
return n.button ===
|
|
1226
|
+
return n.button === xt.RightClick ? !1 : (r?.({
|
|
1230
1227
|
event: n
|
|
1231
1228
|
}), !0);
|
|
1232
1229
|
}
|
|
1233
1230
|
}];
|
|
1234
|
-
const
|
|
1231
|
+
const mt = {
|
|
1235
1232
|
cancel: {
|
|
1236
1233
|
name: "touchcancel"
|
|
1237
1234
|
},
|
|
@@ -1242,22 +1239,22 @@ const wt = {
|
|
|
1242
1239
|
name: "touchend"
|
|
1243
1240
|
}
|
|
1244
1241
|
};
|
|
1245
|
-
class
|
|
1242
|
+
class Cr extends At {
|
|
1246
1243
|
constructor(t) {
|
|
1247
|
-
super(t,
|
|
1244
|
+
super(t, mt);
|
|
1248
1245
|
}
|
|
1249
1246
|
static setup() {
|
|
1250
|
-
return window.addEventListener(
|
|
1247
|
+
return window.addEventListener(mt.move.name, t, {
|
|
1251
1248
|
capture: !1,
|
|
1252
1249
|
passive: !1
|
|
1253
1250
|
}), function() {
|
|
1254
|
-
window.removeEventListener(
|
|
1251
|
+
window.removeEventListener(mt.move.name, t);
|
|
1255
1252
|
};
|
|
1256
1253
|
function t() {
|
|
1257
1254
|
}
|
|
1258
1255
|
}
|
|
1259
1256
|
}
|
|
1260
|
-
|
|
1257
|
+
Cr.activators = [{
|
|
1261
1258
|
eventName: "onTouchStart",
|
|
1262
1259
|
handler: (e, t) => {
|
|
1263
1260
|
let {
|
|
@@ -1273,152 +1270,152 @@ Fr.activators = [{
|
|
|
1273
1270
|
}), !0);
|
|
1274
1271
|
}
|
|
1275
1272
|
}];
|
|
1276
|
-
var
|
|
1273
|
+
var Be;
|
|
1277
1274
|
(function(e) {
|
|
1278
1275
|
e[e.Pointer = 0] = "Pointer", e[e.DraggableRect = 1] = "DraggableRect";
|
|
1279
|
-
})(
|
|
1280
|
-
var
|
|
1276
|
+
})(Be || (Be = {}));
|
|
1277
|
+
var at;
|
|
1281
1278
|
(function(e) {
|
|
1282
1279
|
e[e.TreeOrder = 0] = "TreeOrder", e[e.ReversedTreeOrder = 1] = "ReversedTreeOrder";
|
|
1283
|
-
})(
|
|
1284
|
-
function
|
|
1280
|
+
})(at || (at = {}));
|
|
1281
|
+
function Rr(e) {
|
|
1285
1282
|
let {
|
|
1286
1283
|
acceleration: t,
|
|
1287
|
-
activator: n =
|
|
1284
|
+
activator: n = Be.Pointer,
|
|
1288
1285
|
canScroll: r,
|
|
1289
1286
|
draggingRect: o,
|
|
1290
1287
|
enabled: i,
|
|
1291
1288
|
interval: s = 5,
|
|
1292
|
-
order: a =
|
|
1289
|
+
order: a = at.TreeOrder,
|
|
1293
1290
|
pointerCoordinates: l,
|
|
1294
1291
|
scrollableAncestors: c,
|
|
1295
|
-
scrollableAncestorRects:
|
|
1296
|
-
delta:
|
|
1297
|
-
threshold:
|
|
1292
|
+
scrollableAncestorRects: u,
|
|
1293
|
+
delta: d,
|
|
1294
|
+
threshold: g
|
|
1298
1295
|
} = e;
|
|
1299
|
-
const f =
|
|
1300
|
-
delta:
|
|
1296
|
+
const f = Ar({
|
|
1297
|
+
delta: d,
|
|
1301
1298
|
disabled: !i
|
|
1302
|
-
}), [
|
|
1299
|
+
}), [x, h] = Fn(), v = I({
|
|
1303
1300
|
x: 0,
|
|
1304
1301
|
y: 0
|
|
1305
|
-
}),
|
|
1302
|
+
}), p = I({
|
|
1306
1303
|
x: 0,
|
|
1307
1304
|
y: 0
|
|
1308
1305
|
}), y = A(() => {
|
|
1309
1306
|
switch (n) {
|
|
1310
|
-
case
|
|
1307
|
+
case Be.Pointer:
|
|
1311
1308
|
return l ? {
|
|
1312
1309
|
top: l.y,
|
|
1313
1310
|
bottom: l.y,
|
|
1314
1311
|
left: l.x,
|
|
1315
1312
|
right: l.x
|
|
1316
1313
|
} : null;
|
|
1317
|
-
case
|
|
1314
|
+
case Be.DraggableRect:
|
|
1318
1315
|
return o;
|
|
1319
1316
|
}
|
|
1320
|
-
}, [n, o, l]),
|
|
1321
|
-
const
|
|
1322
|
-
if (!
|
|
1317
|
+
}, [n, o, l]), b = I(null), D = F(() => {
|
|
1318
|
+
const R = b.current;
|
|
1319
|
+
if (!R)
|
|
1323
1320
|
return;
|
|
1324
|
-
const
|
|
1325
|
-
|
|
1326
|
-
}, []),
|
|
1321
|
+
const m = v.current.x * p.current.x, w = v.current.y * p.current.y;
|
|
1322
|
+
R.scrollBy(m, w);
|
|
1323
|
+
}, []), S = A(() => a === at.TreeOrder ? [...c].reverse() : c, [a, c]);
|
|
1327
1324
|
T(
|
|
1328
1325
|
() => {
|
|
1329
1326
|
if (!i || !c.length || !y) {
|
|
1330
|
-
|
|
1327
|
+
h();
|
|
1331
1328
|
return;
|
|
1332
1329
|
}
|
|
1333
|
-
for (const
|
|
1334
|
-
if (r?.(
|
|
1330
|
+
for (const R of S) {
|
|
1331
|
+
if (r?.(R) === !1)
|
|
1335
1332
|
continue;
|
|
1336
|
-
const
|
|
1337
|
-
if (!
|
|
1333
|
+
const m = c.indexOf(R), w = u[m];
|
|
1334
|
+
if (!w)
|
|
1338
1335
|
continue;
|
|
1339
1336
|
const {
|
|
1340
|
-
direction:
|
|
1341
|
-
speed:
|
|
1342
|
-
} =
|
|
1343
|
-
for (const
|
|
1344
|
-
f[
|
|
1345
|
-
if (
|
|
1346
|
-
|
|
1337
|
+
direction: N,
|
|
1338
|
+
speed: L
|
|
1339
|
+
} = gr(R, w, y, t, g);
|
|
1340
|
+
for (const O of ["x", "y"])
|
|
1341
|
+
f[O][N[O]] || (L[O] = 0, N[O] = 0);
|
|
1342
|
+
if (L.x > 0 || L.y > 0) {
|
|
1343
|
+
h(), b.current = R, x(D, s), v.current = L, p.current = N;
|
|
1347
1344
|
return;
|
|
1348
1345
|
}
|
|
1349
1346
|
}
|
|
1350
1347
|
v.current = {
|
|
1351
1348
|
x: 0,
|
|
1352
1349
|
y: 0
|
|
1353
|
-
},
|
|
1350
|
+
}, p.current = {
|
|
1354
1351
|
x: 0,
|
|
1355
1352
|
y: 0
|
|
1356
|
-
},
|
|
1353
|
+
}, h();
|
|
1357
1354
|
},
|
|
1358
1355
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1359
1356
|
[
|
|
1360
1357
|
t,
|
|
1361
1358
|
D,
|
|
1362
1359
|
r,
|
|
1363
|
-
|
|
1360
|
+
h,
|
|
1364
1361
|
i,
|
|
1365
1362
|
s,
|
|
1366
1363
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1367
1364
|
JSON.stringify(y),
|
|
1368
1365
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1369
1366
|
JSON.stringify(f),
|
|
1370
|
-
p,
|
|
1371
|
-
c,
|
|
1372
1367
|
x,
|
|
1373
|
-
|
|
1368
|
+
c,
|
|
1369
|
+
S,
|
|
1370
|
+
u,
|
|
1374
1371
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1375
|
-
JSON.stringify(
|
|
1372
|
+
JSON.stringify(g)
|
|
1376
1373
|
]
|
|
1377
1374
|
);
|
|
1378
1375
|
}
|
|
1379
|
-
const
|
|
1376
|
+
const Er = {
|
|
1380
1377
|
x: {
|
|
1381
|
-
[
|
|
1382
|
-
[
|
|
1378
|
+
[z.Backward]: !1,
|
|
1379
|
+
[z.Forward]: !1
|
|
1383
1380
|
},
|
|
1384
1381
|
y: {
|
|
1385
|
-
[
|
|
1386
|
-
[
|
|
1382
|
+
[z.Backward]: !1,
|
|
1383
|
+
[z.Forward]: !1
|
|
1387
1384
|
}
|
|
1388
1385
|
};
|
|
1389
|
-
function
|
|
1386
|
+
function Ar(e) {
|
|
1390
1387
|
let {
|
|
1391
1388
|
delta: t,
|
|
1392
1389
|
disabled: n
|
|
1393
1390
|
} = e;
|
|
1394
|
-
const r =
|
|
1395
|
-
return
|
|
1391
|
+
const r = rt(t);
|
|
1392
|
+
return Ke((o) => {
|
|
1396
1393
|
if (n || !r || !o)
|
|
1397
|
-
return
|
|
1394
|
+
return Er;
|
|
1398
1395
|
const i = {
|
|
1399
1396
|
x: Math.sign(t.x - r.x),
|
|
1400
1397
|
y: Math.sign(t.y - r.y)
|
|
1401
1398
|
};
|
|
1402
1399
|
return {
|
|
1403
1400
|
x: {
|
|
1404
|
-
[
|
|
1405
|
-
[
|
|
1401
|
+
[z.Backward]: o.x[z.Backward] || i.x === -1,
|
|
1402
|
+
[z.Forward]: o.x[z.Forward] || i.x === 1
|
|
1406
1403
|
},
|
|
1407
1404
|
y: {
|
|
1408
|
-
[
|
|
1409
|
-
[
|
|
1405
|
+
[z.Backward]: o.y[z.Backward] || i.y === -1,
|
|
1406
|
+
[z.Forward]: o.y[z.Forward] || i.y === 1
|
|
1410
1407
|
}
|
|
1411
1408
|
};
|
|
1412
1409
|
}, [n, t, r]);
|
|
1413
1410
|
}
|
|
1414
|
-
function
|
|
1411
|
+
function Or(e, t) {
|
|
1415
1412
|
const n = t != null ? e.get(t) : void 0, r = n ? n.node.current : null;
|
|
1416
|
-
return
|
|
1413
|
+
return Ke((o) => {
|
|
1417
1414
|
var i;
|
|
1418
1415
|
return t == null ? null : (i = r ?? o) != null ? i : null;
|
|
1419
1416
|
}, [r, t]);
|
|
1420
1417
|
}
|
|
1421
|
-
function
|
|
1418
|
+
function Ir(e, t) {
|
|
1422
1419
|
return A(() => e.reduce((n, r) => {
|
|
1423
1420
|
const {
|
|
1424
1421
|
sensor: o
|
|
@@ -1429,54 +1426,54 @@ function Wr(e, t) {
|
|
|
1429
1426
|
return [...n, ...i];
|
|
1430
1427
|
}, []), [e, t]);
|
|
1431
1428
|
}
|
|
1432
|
-
var
|
|
1429
|
+
var Xe;
|
|
1433
1430
|
(function(e) {
|
|
1434
1431
|
e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging";
|
|
1435
|
-
})(
|
|
1436
|
-
var
|
|
1432
|
+
})(Xe || (Xe = {}));
|
|
1433
|
+
var Dt;
|
|
1437
1434
|
(function(e) {
|
|
1438
1435
|
e.Optimized = "optimized";
|
|
1439
|
-
})(
|
|
1440
|
-
const
|
|
1441
|
-
function
|
|
1436
|
+
})(Dt || (Dt = {}));
|
|
1437
|
+
const Kt = /* @__PURE__ */ new Map();
|
|
1438
|
+
function Tr(e, t) {
|
|
1442
1439
|
let {
|
|
1443
1440
|
dragging: n,
|
|
1444
1441
|
dependencies: r,
|
|
1445
1442
|
config: o
|
|
1446
1443
|
} = t;
|
|
1447
|
-
const [i, s] =
|
|
1444
|
+
const [i, s] = $(null), {
|
|
1448
1445
|
frequency: a,
|
|
1449
1446
|
measure: l,
|
|
1450
1447
|
strategy: c
|
|
1451
|
-
} = o,
|
|
1452
|
-
|
|
1453
|
-
}, [
|
|
1454
|
-
if (
|
|
1455
|
-
return
|
|
1456
|
-
if (!
|
|
1448
|
+
} = o, u = I(e), d = v(), g = $e(d), f = F(function(p) {
|
|
1449
|
+
p === void 0 && (p = []), !g.current && s((y) => y === null ? p : y.concat(p.filter((b) => !y.includes(b))));
|
|
1450
|
+
}, [g]), x = I(null), h = Ke((p) => {
|
|
1451
|
+
if (d && !n)
|
|
1452
|
+
return Kt;
|
|
1453
|
+
if (!p || p === Kt || u.current !== e || i != null) {
|
|
1457
1454
|
const y = /* @__PURE__ */ new Map();
|
|
1458
|
-
for (let
|
|
1459
|
-
if (!
|
|
1455
|
+
for (let b of e) {
|
|
1456
|
+
if (!b)
|
|
1460
1457
|
continue;
|
|
1461
|
-
if (i && i.length > 0 && !i.includes(
|
|
1462
|
-
y.set(
|
|
1458
|
+
if (i && i.length > 0 && !i.includes(b.id) && b.rect.current) {
|
|
1459
|
+
y.set(b.id, b.rect.current);
|
|
1463
1460
|
continue;
|
|
1464
1461
|
}
|
|
1465
|
-
const D =
|
|
1466
|
-
|
|
1462
|
+
const D = b.node.current, S = D ? new Et(l(D), D) : null;
|
|
1463
|
+
b.rect.current = S, S && y.set(b.id, S);
|
|
1467
1464
|
}
|
|
1468
1465
|
return y;
|
|
1469
1466
|
}
|
|
1470
|
-
return
|
|
1471
|
-
}, [e, i, n,
|
|
1467
|
+
return p;
|
|
1468
|
+
}, [e, i, n, d, l]);
|
|
1472
1469
|
return T(() => {
|
|
1473
|
-
|
|
1470
|
+
u.current = e;
|
|
1474
1471
|
}, [e]), T(
|
|
1475
1472
|
() => {
|
|
1476
|
-
|
|
1473
|
+
d || f();
|
|
1477
1474
|
},
|
|
1478
1475
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1479
|
-
[n,
|
|
1476
|
+
[n, d]
|
|
1480
1477
|
), T(
|
|
1481
1478
|
() => {
|
|
1482
1479
|
i && i.length > 0 && s(null);
|
|
@@ -1485,40 +1482,40 @@ function Hr(e, t) {
|
|
|
1485
1482
|
[JSON.stringify(i)]
|
|
1486
1483
|
), T(
|
|
1487
1484
|
() => {
|
|
1488
|
-
|
|
1489
|
-
f(),
|
|
1485
|
+
d || typeof a != "number" || x.current !== null || (x.current = setTimeout(() => {
|
|
1486
|
+
f(), x.current = null;
|
|
1490
1487
|
}, a));
|
|
1491
1488
|
},
|
|
1492
1489
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1493
|
-
[a,
|
|
1490
|
+
[a, d, f, ...r]
|
|
1494
1491
|
), {
|
|
1495
|
-
droppableRects:
|
|
1492
|
+
droppableRects: h,
|
|
1496
1493
|
measureDroppableContainers: f,
|
|
1497
1494
|
measuringScheduled: i != null
|
|
1498
1495
|
};
|
|
1499
1496
|
function v() {
|
|
1500
1497
|
switch (c) {
|
|
1501
|
-
case
|
|
1498
|
+
case Xe.Always:
|
|
1502
1499
|
return !1;
|
|
1503
|
-
case
|
|
1500
|
+
case Xe.BeforeDragging:
|
|
1504
1501
|
return n;
|
|
1505
1502
|
default:
|
|
1506
1503
|
return !n;
|
|
1507
1504
|
}
|
|
1508
1505
|
}
|
|
1509
1506
|
}
|
|
1510
|
-
function
|
|
1511
|
-
return
|
|
1507
|
+
function Ot(e, t) {
|
|
1508
|
+
return Ke((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
|
|
1512
1509
|
}
|
|
1513
|
-
function
|
|
1514
|
-
return
|
|
1510
|
+
function Nr(e, t) {
|
|
1511
|
+
return Ot(e, t);
|
|
1515
1512
|
}
|
|
1516
|
-
function
|
|
1513
|
+
function Mr(e) {
|
|
1517
1514
|
let {
|
|
1518
1515
|
callback: t,
|
|
1519
1516
|
disabled: n
|
|
1520
1517
|
} = e;
|
|
1521
|
-
const r =
|
|
1518
|
+
const r = ct(t), o = A(() => {
|
|
1522
1519
|
if (n || typeof window > "u" || typeof window.MutationObserver > "u")
|
|
1523
1520
|
return;
|
|
1524
1521
|
const {
|
|
@@ -1528,12 +1525,12 @@ function Vr(e) {
|
|
|
1528
1525
|
}, [r, n]);
|
|
1529
1526
|
return T(() => () => o?.disconnect(), [o]), o;
|
|
1530
1527
|
}
|
|
1531
|
-
function
|
|
1528
|
+
function dt(e) {
|
|
1532
1529
|
let {
|
|
1533
1530
|
callback: t,
|
|
1534
1531
|
disabled: n
|
|
1535
1532
|
} = e;
|
|
1536
|
-
const r =
|
|
1533
|
+
const r = ct(t), o = A(
|
|
1537
1534
|
() => {
|
|
1538
1535
|
if (n || typeof window > "u" || typeof window.ResizeObserver > "u")
|
|
1539
1536
|
return;
|
|
@@ -1547,12 +1544,12 @@ function gt(e) {
|
|
|
1547
1544
|
);
|
|
1548
1545
|
return T(() => () => o?.disconnect(), [o]), o;
|
|
1549
1546
|
}
|
|
1550
|
-
function
|
|
1551
|
-
return new
|
|
1547
|
+
function Lr(e) {
|
|
1548
|
+
return new Et(Ae(e), e);
|
|
1552
1549
|
}
|
|
1553
|
-
function
|
|
1554
|
-
t === void 0 && (t =
|
|
1555
|
-
const [r, o] =
|
|
1550
|
+
function Wt(e, t, n) {
|
|
1551
|
+
t === void 0 && (t = Lr);
|
|
1552
|
+
const [r, o] = $(null);
|
|
1556
1553
|
function i() {
|
|
1557
1554
|
o((l) => {
|
|
1558
1555
|
if (!e)
|
|
@@ -1561,59 +1558,59 @@ function qt(e, t, n) {
|
|
|
1561
1558
|
var c;
|
|
1562
1559
|
return (c = l ?? n) != null ? c : null;
|
|
1563
1560
|
}
|
|
1564
|
-
const
|
|
1565
|
-
return JSON.stringify(l) === JSON.stringify(
|
|
1561
|
+
const u = t(e);
|
|
1562
|
+
return JSON.stringify(l) === JSON.stringify(u) ? l : u;
|
|
1566
1563
|
});
|
|
1567
1564
|
}
|
|
1568
|
-
const s =
|
|
1565
|
+
const s = Mr({
|
|
1569
1566
|
callback(l) {
|
|
1570
1567
|
if (e)
|
|
1571
1568
|
for (const c of l) {
|
|
1572
1569
|
const {
|
|
1573
|
-
type:
|
|
1574
|
-
target:
|
|
1570
|
+
type: u,
|
|
1571
|
+
target: d
|
|
1575
1572
|
} = c;
|
|
1576
|
-
if (
|
|
1573
|
+
if (u === "childList" && d instanceof HTMLElement && d.contains(e)) {
|
|
1577
1574
|
i();
|
|
1578
1575
|
break;
|
|
1579
1576
|
}
|
|
1580
1577
|
}
|
|
1581
1578
|
}
|
|
1582
|
-
}), a =
|
|
1579
|
+
}), a = dt({
|
|
1583
1580
|
callback: i
|
|
1584
1581
|
});
|
|
1585
|
-
return
|
|
1582
|
+
return _(() => {
|
|
1586
1583
|
i(), e ? (a?.observe(e), s?.observe(document.body, {
|
|
1587
1584
|
childList: !0,
|
|
1588
1585
|
subtree: !0
|
|
1589
1586
|
})) : (a?.disconnect(), s?.disconnect());
|
|
1590
1587
|
}, [e]), r;
|
|
1591
1588
|
}
|
|
1592
|
-
function
|
|
1593
|
-
const t =
|
|
1594
|
-
return
|
|
1589
|
+
function Pr(e) {
|
|
1590
|
+
const t = Ot(e);
|
|
1591
|
+
return Zt(e, t);
|
|
1595
1592
|
}
|
|
1596
|
-
const
|
|
1597
|
-
function
|
|
1598
|
-
const t =
|
|
1593
|
+
const Ut = [];
|
|
1594
|
+
function zr(e) {
|
|
1595
|
+
const t = I(e), n = Ke((r) => e ? r && r !== Ut && e && t.current && e.parentNode === t.current.parentNode ? r : Rt(e) : Ut, [e]);
|
|
1599
1596
|
return T(() => {
|
|
1600
1597
|
t.current = e;
|
|
1601
1598
|
}, [e]), n;
|
|
1602
1599
|
}
|
|
1603
|
-
function
|
|
1604
|
-
const [t, n] =
|
|
1605
|
-
const s =
|
|
1606
|
-
s && n((a) => a ? (a.set(s,
|
|
1600
|
+
function kr(e) {
|
|
1601
|
+
const [t, n] = $(null), r = I(e), o = F((i) => {
|
|
1602
|
+
const s = bt(i.target);
|
|
1603
|
+
s && n((a) => a ? (a.set(s, wt(s)), new Map(a)) : null);
|
|
1607
1604
|
}, []);
|
|
1608
1605
|
return T(() => {
|
|
1609
1606
|
const i = r.current;
|
|
1610
1607
|
if (e !== i) {
|
|
1611
1608
|
s(i);
|
|
1612
1609
|
const a = e.map((l) => {
|
|
1613
|
-
const c =
|
|
1610
|
+
const c = bt(l);
|
|
1614
1611
|
return c ? (c.addEventListener("scroll", o, {
|
|
1615
1612
|
passive: !0
|
|
1616
|
-
}), [c,
|
|
1613
|
+
}), [c, wt(c)]) : null;
|
|
1617
1614
|
}).filter((l) => l != null);
|
|
1618
1615
|
n(a.length ? new Map(a) : null), r.current = e;
|
|
1619
1616
|
}
|
|
@@ -1622,15 +1619,15 @@ function _r(e) {
|
|
|
1622
1619
|
};
|
|
1623
1620
|
function s(a) {
|
|
1624
1621
|
a.forEach((l) => {
|
|
1625
|
-
const c =
|
|
1622
|
+
const c = bt(l);
|
|
1626
1623
|
c?.removeEventListener("scroll", o);
|
|
1627
1624
|
});
|
|
1628
1625
|
}
|
|
1629
|
-
}, [o, e]), A(() => e.length ? t ? Array.from(t.values()).reduce((i, s) =>
|
|
1626
|
+
}, [o, e]), A(() => e.length ? t ? Array.from(t.values()).reduce((i, s) => Ce(i, s), Q) : an(e) : Q, [e, t]);
|
|
1630
1627
|
}
|
|
1631
|
-
function
|
|
1628
|
+
function Ht(e, t) {
|
|
1632
1629
|
t === void 0 && (t = []);
|
|
1633
|
-
const n =
|
|
1630
|
+
const n = I(null);
|
|
1634
1631
|
return T(
|
|
1635
1632
|
() => {
|
|
1636
1633
|
n.current = null;
|
|
@@ -1638,14 +1635,14 @@ function Jt(e, t) {
|
|
|
1638
1635
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1639
1636
|
t
|
|
1640
1637
|
), T(() => {
|
|
1641
|
-
const r = e !==
|
|
1638
|
+
const r = e !== Q;
|
|
1642
1639
|
r && !n.current && (n.current = e), !r && n.current && (n.current = null);
|
|
1643
|
-
}, [e]), n.current ?
|
|
1640
|
+
}, [e]), n.current ? ot(e, n.current) : Q;
|
|
1644
1641
|
}
|
|
1645
|
-
function
|
|
1642
|
+
function Br(e) {
|
|
1646
1643
|
T(
|
|
1647
1644
|
() => {
|
|
1648
|
-
if (!
|
|
1645
|
+
if (!lt)
|
|
1649
1646
|
return;
|
|
1650
1647
|
const t = e.map((n) => {
|
|
1651
1648
|
let {
|
|
@@ -1668,7 +1665,7 @@ function Qr(e) {
|
|
|
1668
1665
|
})
|
|
1669
1666
|
);
|
|
1670
1667
|
}
|
|
1671
|
-
function
|
|
1668
|
+
function Fr(e, t) {
|
|
1672
1669
|
return A(() => e.reduce((n, r) => {
|
|
1673
1670
|
let {
|
|
1674
1671
|
eventName: o,
|
|
@@ -1679,84 +1676,84 @@ function Zr(e, t) {
|
|
|
1679
1676
|
}, n;
|
|
1680
1677
|
}, {}), [e, t]);
|
|
1681
1678
|
}
|
|
1682
|
-
function
|
|
1683
|
-
return A(() => e ?
|
|
1679
|
+
function fn(e) {
|
|
1680
|
+
return A(() => e ? cr(e) : null, [e]);
|
|
1684
1681
|
}
|
|
1685
|
-
const
|
|
1686
|
-
function
|
|
1682
|
+
const Vt = [];
|
|
1683
|
+
function $r(e, t) {
|
|
1687
1684
|
t === void 0 && (t = Ae);
|
|
1688
|
-
const [n] = e, r =
|
|
1685
|
+
const [n] = e, r = fn(n ? X(n) : null), [o, i] = $(Vt);
|
|
1689
1686
|
function s() {
|
|
1690
|
-
i(() => e.length ? e.map((l) =>
|
|
1687
|
+
i(() => e.length ? e.map((l) => on(l) ? r : new Et(t(l), l)) : Vt);
|
|
1691
1688
|
}
|
|
1692
|
-
const a =
|
|
1689
|
+
const a = dt({
|
|
1693
1690
|
callback: s
|
|
1694
1691
|
});
|
|
1695
|
-
return
|
|
1692
|
+
return _(() => {
|
|
1696
1693
|
a?.disconnect(), s(), e.forEach((l) => a?.observe(l));
|
|
1697
1694
|
}, [e]), o;
|
|
1698
1695
|
}
|
|
1699
|
-
function
|
|
1696
|
+
function gn(e) {
|
|
1700
1697
|
if (!e)
|
|
1701
1698
|
return null;
|
|
1702
1699
|
if (e.children.length > 1)
|
|
1703
1700
|
return e;
|
|
1704
1701
|
const t = e.children[0];
|
|
1705
|
-
return
|
|
1702
|
+
return Ye(t) ? t : e;
|
|
1706
1703
|
}
|
|
1707
|
-
function
|
|
1704
|
+
function Xr(e) {
|
|
1708
1705
|
let {
|
|
1709
1706
|
measure: t
|
|
1710
1707
|
} = e;
|
|
1711
|
-
const [n, r] =
|
|
1708
|
+
const [n, r] = $(null), o = F((c) => {
|
|
1712
1709
|
for (const {
|
|
1713
|
-
target:
|
|
1710
|
+
target: u
|
|
1714
1711
|
} of c)
|
|
1715
|
-
if (
|
|
1716
|
-
r((
|
|
1717
|
-
const
|
|
1718
|
-
return
|
|
1719
|
-
...
|
|
1720
|
-
width:
|
|
1721
|
-
height:
|
|
1722
|
-
} :
|
|
1712
|
+
if (Ye(u)) {
|
|
1713
|
+
r((d) => {
|
|
1714
|
+
const g = t(u);
|
|
1715
|
+
return d ? {
|
|
1716
|
+
...d,
|
|
1717
|
+
width: g.width,
|
|
1718
|
+
height: g.height
|
|
1719
|
+
} : g;
|
|
1723
1720
|
});
|
|
1724
1721
|
break;
|
|
1725
1722
|
}
|
|
1726
|
-
}, [t]), i =
|
|
1723
|
+
}, [t]), i = dt({
|
|
1727
1724
|
callback: o
|
|
1728
|
-
}), s =
|
|
1729
|
-
const
|
|
1730
|
-
i?.disconnect(),
|
|
1731
|
-
}, [t, i]), [a, l] =
|
|
1725
|
+
}), s = F((c) => {
|
|
1726
|
+
const u = gn(c);
|
|
1727
|
+
i?.disconnect(), u && i?.observe(u), r(u ? t(u) : null);
|
|
1728
|
+
}, [t, i]), [a, l] = nt(s);
|
|
1732
1729
|
return A(() => ({
|
|
1733
1730
|
nodeRef: a,
|
|
1734
1731
|
rect: n,
|
|
1735
1732
|
setRef: l
|
|
1736
1733
|
}), [n, a, l]);
|
|
1737
1734
|
}
|
|
1738
|
-
const
|
|
1739
|
-
sensor:
|
|
1735
|
+
const jr = [{
|
|
1736
|
+
sensor: dn,
|
|
1740
1737
|
options: {}
|
|
1741
1738
|
}, {
|
|
1742
|
-
sensor:
|
|
1739
|
+
sensor: un,
|
|
1743
1740
|
options: {}
|
|
1744
|
-
}],
|
|
1741
|
+
}], Yr = {
|
|
1745
1742
|
current: {}
|
|
1746
|
-
},
|
|
1743
|
+
}, tt = {
|
|
1747
1744
|
draggable: {
|
|
1748
|
-
measure:
|
|
1745
|
+
measure: $t
|
|
1749
1746
|
},
|
|
1750
1747
|
droppable: {
|
|
1751
|
-
measure:
|
|
1752
|
-
strategy:
|
|
1753
|
-
frequency:
|
|
1748
|
+
measure: $t,
|
|
1749
|
+
strategy: Xe.WhileDragging,
|
|
1750
|
+
frequency: Dt.Optimized
|
|
1754
1751
|
},
|
|
1755
1752
|
dragOverlay: {
|
|
1756
1753
|
measure: Ae
|
|
1757
1754
|
}
|
|
1758
1755
|
};
|
|
1759
|
-
class
|
|
1756
|
+
class Fe extends Map {
|
|
1760
1757
|
get(t) {
|
|
1761
1758
|
var n;
|
|
1762
1759
|
return t != null && (n = super.get(t)) != null ? n : void 0;
|
|
@@ -1777,7 +1774,7 @@ class $e extends Map {
|
|
|
1777
1774
|
return (n = (r = this.get(t)) == null ? void 0 : r.node.current) != null ? n : void 0;
|
|
1778
1775
|
}
|
|
1779
1776
|
}
|
|
1780
|
-
const
|
|
1777
|
+
const Kr = {
|
|
1781
1778
|
activatorEvent: null,
|
|
1782
1779
|
active: null,
|
|
1783
1780
|
activeNode: null,
|
|
@@ -1786,22 +1783,22 @@ const oo = {
|
|
|
1786
1783
|
containerNodeRect: null,
|
|
1787
1784
|
draggableNodes: /* @__PURE__ */ new Map(),
|
|
1788
1785
|
droppableRects: /* @__PURE__ */ new Map(),
|
|
1789
|
-
droppableContainers: /* @__PURE__ */ new
|
|
1786
|
+
droppableContainers: /* @__PURE__ */ new Fe(),
|
|
1790
1787
|
over: null,
|
|
1791
1788
|
dragOverlay: {
|
|
1792
1789
|
nodeRef: {
|
|
1793
1790
|
current: null
|
|
1794
1791
|
},
|
|
1795
1792
|
rect: null,
|
|
1796
|
-
setRef:
|
|
1793
|
+
setRef: st
|
|
1797
1794
|
},
|
|
1798
1795
|
scrollableAncestors: [],
|
|
1799
1796
|
scrollableAncestorRects: [],
|
|
1800
|
-
measuringConfiguration:
|
|
1801
|
-
measureDroppableContainers:
|
|
1797
|
+
measuringConfiguration: tt,
|
|
1798
|
+
measureDroppableContainers: st,
|
|
1802
1799
|
windowRect: null,
|
|
1803
1800
|
measuringScheduled: !1
|
|
1804
|
-
},
|
|
1801
|
+
}, hn = {
|
|
1805
1802
|
activatorEvent: null,
|
|
1806
1803
|
activators: [],
|
|
1807
1804
|
active: null,
|
|
@@ -1809,12 +1806,12 @@ const oo = {
|
|
|
1809
1806
|
ariaDescribedById: {
|
|
1810
1807
|
draggable: ""
|
|
1811
1808
|
},
|
|
1812
|
-
dispatch:
|
|
1809
|
+
dispatch: st,
|
|
1813
1810
|
draggableNodes: /* @__PURE__ */ new Map(),
|
|
1814
1811
|
over: null,
|
|
1815
|
-
measureDroppableContainers:
|
|
1816
|
-
},
|
|
1817
|
-
function
|
|
1812
|
+
measureDroppableContainers: st
|
|
1813
|
+
}, Ue = /* @__PURE__ */ je(hn), vn = /* @__PURE__ */ je(Kr);
|
|
1814
|
+
function Wr() {
|
|
1818
1815
|
return {
|
|
1819
1816
|
draggable: {
|
|
1820
1817
|
active: null,
|
|
@@ -1829,13 +1826,13 @@ function io() {
|
|
|
1829
1826
|
}
|
|
1830
1827
|
},
|
|
1831
1828
|
droppable: {
|
|
1832
|
-
containers: new
|
|
1829
|
+
containers: new Fe()
|
|
1833
1830
|
}
|
|
1834
1831
|
};
|
|
1835
1832
|
}
|
|
1836
|
-
function
|
|
1833
|
+
function Ur(e, t) {
|
|
1837
1834
|
switch (t.type) {
|
|
1838
|
-
case
|
|
1835
|
+
case P.DragStart:
|
|
1839
1836
|
return {
|
|
1840
1837
|
...e,
|
|
1841
1838
|
draggable: {
|
|
@@ -1844,7 +1841,7 @@ function so(e, t) {
|
|
|
1844
1841
|
active: t.active
|
|
1845
1842
|
}
|
|
1846
1843
|
};
|
|
1847
|
-
case
|
|
1844
|
+
case P.DragMove:
|
|
1848
1845
|
return e.draggable.active == null ? e : {
|
|
1849
1846
|
...e,
|
|
1850
1847
|
draggable: {
|
|
@@ -1855,8 +1852,8 @@ function so(e, t) {
|
|
|
1855
1852
|
}
|
|
1856
1853
|
}
|
|
1857
1854
|
};
|
|
1858
|
-
case
|
|
1859
|
-
case
|
|
1855
|
+
case P.DragEnd:
|
|
1856
|
+
case P.DragCancel:
|
|
1860
1857
|
return {
|
|
1861
1858
|
...e,
|
|
1862
1859
|
draggable: {
|
|
@@ -1872,12 +1869,12 @@ function so(e, t) {
|
|
|
1872
1869
|
}
|
|
1873
1870
|
}
|
|
1874
1871
|
};
|
|
1875
|
-
case
|
|
1872
|
+
case P.RegisterDroppable: {
|
|
1876
1873
|
const {
|
|
1877
1874
|
element: n
|
|
1878
1875
|
} = t, {
|
|
1879
1876
|
id: r
|
|
1880
|
-
} = n, o = new
|
|
1877
|
+
} = n, o = new Fe(e.droppable.containers);
|
|
1881
1878
|
return o.set(r, n), {
|
|
1882
1879
|
...e,
|
|
1883
1880
|
droppable: {
|
|
@@ -1886,7 +1883,7 @@ function so(e, t) {
|
|
|
1886
1883
|
}
|
|
1887
1884
|
};
|
|
1888
1885
|
}
|
|
1889
|
-
case
|
|
1886
|
+
case P.SetDroppableDisabled: {
|
|
1890
1887
|
const {
|
|
1891
1888
|
id: n,
|
|
1892
1889
|
key: r,
|
|
@@ -1894,7 +1891,7 @@ function so(e, t) {
|
|
|
1894
1891
|
} = t, i = e.droppable.containers.get(n);
|
|
1895
1892
|
if (!i || r !== i.key)
|
|
1896
1893
|
return e;
|
|
1897
|
-
const s = new
|
|
1894
|
+
const s = new Fe(e.droppable.containers);
|
|
1898
1895
|
return s.set(n, {
|
|
1899
1896
|
...i,
|
|
1900
1897
|
disabled: o
|
|
@@ -1906,14 +1903,14 @@ function so(e, t) {
|
|
|
1906
1903
|
}
|
|
1907
1904
|
};
|
|
1908
1905
|
}
|
|
1909
|
-
case
|
|
1906
|
+
case P.UnregisterDroppable: {
|
|
1910
1907
|
const {
|
|
1911
1908
|
id: n,
|
|
1912
1909
|
key: r
|
|
1913
1910
|
} = t, o = e.droppable.containers.get(n);
|
|
1914
1911
|
if (!o || r !== o.key)
|
|
1915
1912
|
return e;
|
|
1916
|
-
const i = new
|
|
1913
|
+
const i = new Fe(e.droppable.containers);
|
|
1917
1914
|
return i.delete(n), {
|
|
1918
1915
|
...e,
|
|
1919
1916
|
droppable: {
|
|
@@ -1926,7 +1923,7 @@ function so(e, t) {
|
|
|
1926
1923
|
return e;
|
|
1927
1924
|
}
|
|
1928
1925
|
}
|
|
1929
|
-
function
|
|
1926
|
+
function Hr(e) {
|
|
1930
1927
|
let {
|
|
1931
1928
|
disabled: t
|
|
1932
1929
|
} = e;
|
|
@@ -1934,10 +1931,10 @@ function ao(e) {
|
|
|
1934
1931
|
active: n,
|
|
1935
1932
|
activatorEvent: r,
|
|
1936
1933
|
draggableNodes: o
|
|
1937
|
-
} =
|
|
1934
|
+
} = ve(Ue), i = rt(r), s = rt(n?.id);
|
|
1938
1935
|
return T(() => {
|
|
1939
1936
|
if (!t && !r && i && s != null) {
|
|
1940
|
-
if (!
|
|
1937
|
+
if (!ut(i) || document.activeElement === i.target)
|
|
1941
1938
|
return;
|
|
1942
1939
|
const a = o.get(s);
|
|
1943
1940
|
if (!a)
|
|
@@ -1949,12 +1946,12 @@ function ao(e) {
|
|
|
1949
1946
|
if (!l.current && !c.current)
|
|
1950
1947
|
return;
|
|
1951
1948
|
requestAnimationFrame(() => {
|
|
1952
|
-
for (const
|
|
1953
|
-
if (!
|
|
1949
|
+
for (const u of [l.current, c.current]) {
|
|
1950
|
+
if (!u)
|
|
1954
1951
|
continue;
|
|
1955
|
-
const
|
|
1956
|
-
if (
|
|
1957
|
-
|
|
1952
|
+
const d = jn(u);
|
|
1953
|
+
if (d) {
|
|
1954
|
+
d.focus();
|
|
1958
1955
|
break;
|
|
1959
1956
|
}
|
|
1960
1957
|
}
|
|
@@ -1962,7 +1959,7 @@ function ao(e) {
|
|
|
1962
1959
|
}
|
|
1963
1960
|
}, [r, t, o, s, i]), null;
|
|
1964
1961
|
}
|
|
1965
|
-
function
|
|
1962
|
+
function pn(e, t) {
|
|
1966
1963
|
let {
|
|
1967
1964
|
transform: n,
|
|
1968
1965
|
...r
|
|
@@ -1972,19 +1969,19 @@ function xn(e, t) {
|
|
|
1972
1969
|
...r
|
|
1973
1970
|
}), n) : n;
|
|
1974
1971
|
}
|
|
1975
|
-
function
|
|
1972
|
+
function Vr(e) {
|
|
1976
1973
|
return A(
|
|
1977
1974
|
() => ({
|
|
1978
1975
|
draggable: {
|
|
1979
|
-
...
|
|
1976
|
+
...tt.draggable,
|
|
1980
1977
|
...e?.draggable
|
|
1981
1978
|
},
|
|
1982
1979
|
droppable: {
|
|
1983
|
-
...
|
|
1980
|
+
...tt.droppable,
|
|
1984
1981
|
...e?.droppable
|
|
1985
1982
|
},
|
|
1986
1983
|
dragOverlay: {
|
|
1987
|
-
...
|
|
1984
|
+
...tt.dragOverlay,
|
|
1988
1985
|
...e?.dragOverlay
|
|
1989
1986
|
}
|
|
1990
1987
|
}),
|
|
@@ -1992,21 +1989,21 @@ function lo(e) {
|
|
|
1992
1989
|
[e?.draggable, e?.droppable, e?.dragOverlay]
|
|
1993
1990
|
);
|
|
1994
1991
|
}
|
|
1995
|
-
function
|
|
1992
|
+
function qr(e) {
|
|
1996
1993
|
let {
|
|
1997
1994
|
activeNode: t,
|
|
1998
1995
|
measure: n,
|
|
1999
1996
|
initialRect: r,
|
|
2000
1997
|
config: o = !0
|
|
2001
1998
|
} = e;
|
|
2002
|
-
const i =
|
|
1999
|
+
const i = I(!1), {
|
|
2003
2000
|
x: s,
|
|
2004
2001
|
y: a
|
|
2005
2002
|
} = typeof o == "boolean" ? {
|
|
2006
2003
|
x: o,
|
|
2007
2004
|
y: o
|
|
2008
2005
|
} : o;
|
|
2009
|
-
|
|
2006
|
+
_(() => {
|
|
2010
2007
|
if (!s && !a || !t) {
|
|
2011
2008
|
i.current = !1;
|
|
2012
2009
|
return;
|
|
@@ -2016,229 +2013,229 @@ function co(e) {
|
|
|
2016
2013
|
const c = t?.node.current;
|
|
2017
2014
|
if (!c || c.isConnected === !1)
|
|
2018
2015
|
return;
|
|
2019
|
-
const
|
|
2020
|
-
if (s || (
|
|
2021
|
-
const
|
|
2022
|
-
|
|
2023
|
-
top:
|
|
2024
|
-
left:
|
|
2016
|
+
const u = n(c), d = Zt(u, r);
|
|
2017
|
+
if (s || (d.x = 0), a || (d.y = 0), i.current = !0, Math.abs(d.x) > 0 || Math.abs(d.y) > 0) {
|
|
2018
|
+
const g = tn(c);
|
|
2019
|
+
g && g.scrollBy({
|
|
2020
|
+
top: d.y,
|
|
2021
|
+
left: d.x
|
|
2025
2022
|
});
|
|
2026
2023
|
}
|
|
2027
2024
|
}, [t, s, a, r, n]);
|
|
2028
2025
|
}
|
|
2029
|
-
const
|
|
2030
|
-
...
|
|
2026
|
+
const ft = /* @__PURE__ */ je({
|
|
2027
|
+
...Q,
|
|
2031
2028
|
scaleX: 1,
|
|
2032
2029
|
scaleY: 1
|
|
2033
2030
|
});
|
|
2034
|
-
var
|
|
2031
|
+
var he;
|
|
2035
2032
|
(function(e) {
|
|
2036
2033
|
e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
|
|
2037
|
-
})(
|
|
2038
|
-
const
|
|
2034
|
+
})(he || (he = {}));
|
|
2035
|
+
const To = /* @__PURE__ */ Mn(function(t) {
|
|
2039
2036
|
var n, r, o, i;
|
|
2040
2037
|
let {
|
|
2041
2038
|
id: s,
|
|
2042
2039
|
accessibility: a,
|
|
2043
2040
|
autoScroll: l = !0,
|
|
2044
2041
|
children: c,
|
|
2045
|
-
sensors:
|
|
2046
|
-
collisionDetection:
|
|
2047
|
-
measuring:
|
|
2042
|
+
sensors: u = jr,
|
|
2043
|
+
collisionDetection: d = rr,
|
|
2044
|
+
measuring: g,
|
|
2048
2045
|
modifiers: f,
|
|
2049
|
-
...
|
|
2046
|
+
...x
|
|
2050
2047
|
} = t;
|
|
2051
|
-
const
|
|
2048
|
+
const h = Ln(Ur, void 0, Wr), [v, p] = h, [y, b] = Vn(), [D, S] = $(he.Uninitialized), R = D === he.Initialized, {
|
|
2052
2049
|
draggable: {
|
|
2053
|
-
active:
|
|
2054
|
-
nodes:
|
|
2055
|
-
translate:
|
|
2050
|
+
active: m,
|
|
2051
|
+
nodes: w,
|
|
2052
|
+
translate: N
|
|
2056
2053
|
},
|
|
2057
2054
|
droppable: {
|
|
2058
|
-
containers:
|
|
2055
|
+
containers: L
|
|
2059
2056
|
}
|
|
2060
|
-
} = v,
|
|
2057
|
+
} = v, O = m != null ? w.get(m) : null, G = I({
|
|
2061
2058
|
initial: null,
|
|
2062
2059
|
translated: null
|
|
2063
|
-
}),
|
|
2064
|
-
var
|
|
2065
|
-
return
|
|
2066
|
-
id:
|
|
2060
|
+
}), J = A(() => {
|
|
2061
|
+
var B;
|
|
2062
|
+
return m != null ? {
|
|
2063
|
+
id: m,
|
|
2067
2064
|
// It's possible for the active node to unmount while dragging
|
|
2068
|
-
data: (
|
|
2069
|
-
rect:
|
|
2065
|
+
data: (B = O?.data) != null ? B : Yr,
|
|
2066
|
+
rect: G
|
|
2070
2067
|
} : null;
|
|
2071
|
-
}, [
|
|
2072
|
-
droppableRects:
|
|
2073
|
-
measureDroppableContainers:
|
|
2074
|
-
measuringScheduled:
|
|
2075
|
-
} =
|
|
2076
|
-
dragging:
|
|
2077
|
-
dependencies: [
|
|
2078
|
-
config:
|
|
2079
|
-
}),
|
|
2080
|
-
|
|
2081
|
-
activeNode:
|
|
2082
|
-
config:
|
|
2083
|
-
initialRect:
|
|
2084
|
-
measure:
|
|
2068
|
+
}, [m, O]), Z = I(null), [Oe, He] = $(null), [Y, Ve] = $(null), re = $e(x, Object.values(x)), Ie = We("DndDescribedBy", s), qe = A(() => L.getEnabled(), [L]), j = Vr(g), {
|
|
2069
|
+
droppableRects: oe,
|
|
2070
|
+
measureDroppableContainers: pe,
|
|
2071
|
+
measuringScheduled: Te
|
|
2072
|
+
} = Tr(qe, {
|
|
2073
|
+
dragging: R,
|
|
2074
|
+
dependencies: [N.x, N.y],
|
|
2075
|
+
config: j.droppable
|
|
2076
|
+
}), H = Or(w, m), Ge = A(() => Y ? it(Y) : null, [Y]), le = Tn(), ie = Nr(H, j.draggable.measure);
|
|
2077
|
+
qr({
|
|
2078
|
+
activeNode: m != null ? w.get(m) : null,
|
|
2079
|
+
config: le.layoutShiftCompensation,
|
|
2080
|
+
initialRect: ie,
|
|
2081
|
+
measure: j.draggable.measure
|
|
2085
2082
|
});
|
|
2086
|
-
const
|
|
2083
|
+
const E = Wt(H, j.draggable.measure, ie), Ne = Wt(H ? H.parentElement : null), ee = I({
|
|
2087
2084
|
activatorEvent: null,
|
|
2088
2085
|
active: null,
|
|
2089
|
-
activeNode:
|
|
2086
|
+
activeNode: H,
|
|
2090
2087
|
collisionRect: null,
|
|
2091
2088
|
collisions: null,
|
|
2092
|
-
droppableRects:
|
|
2093
|
-
draggableNodes:
|
|
2089
|
+
droppableRects: oe,
|
|
2090
|
+
draggableNodes: w,
|
|
2094
2091
|
draggingNode: null,
|
|
2095
2092
|
draggingNodeRect: null,
|
|
2096
|
-
droppableContainers:
|
|
2093
|
+
droppableContainers: L,
|
|
2097
2094
|
over: null,
|
|
2098
2095
|
scrollableAncestors: [],
|
|
2099
2096
|
scrollAdjustedTranslate: null
|
|
2100
|
-
}),
|
|
2101
|
-
measure:
|
|
2102
|
-
}),
|
|
2097
|
+
}), ye = L.getNodeFor((n = ee.current.over) == null ? void 0 : n.id), se = Xr({
|
|
2098
|
+
measure: j.dragOverlay.measure
|
|
2099
|
+
}), me = (r = se.nodeRef.current) != null ? r : H, we = R ? (o = se.rect) != null ? o : E : null, It = !!(se.nodeRef.current && se.rect), Tt = Pr(It ? null : E), gt = fn(me ? X(me) : null), ce = zr(R ? ye ?? H : null), Je = $r(ce), _e = pn(f, {
|
|
2103
2100
|
transform: {
|
|
2104
|
-
x:
|
|
2105
|
-
y:
|
|
2101
|
+
x: N.x - Tt.x,
|
|
2102
|
+
y: N.y - Tt.y,
|
|
2106
2103
|
scaleX: 1,
|
|
2107
2104
|
scaleY: 1
|
|
2108
2105
|
},
|
|
2109
|
-
activatorEvent:
|
|
2110
|
-
active:
|
|
2111
|
-
activeNodeRect:
|
|
2112
|
-
containerNodeRect:
|
|
2113
|
-
draggingNodeRect:
|
|
2114
|
-
over:
|
|
2115
|
-
overlayNodeRect:
|
|
2116
|
-
scrollableAncestors:
|
|
2117
|
-
scrollableAncestorRects:
|
|
2118
|
-
windowRect:
|
|
2119
|
-
}),
|
|
2120
|
-
active:
|
|
2121
|
-
collisionRect:
|
|
2122
|
-
droppableRects:
|
|
2123
|
-
droppableContainers:
|
|
2124
|
-
pointerCoordinates:
|
|
2125
|
-
}) : null,
|
|
2126
|
-
(
|
|
2106
|
+
activatorEvent: Y,
|
|
2107
|
+
active: J,
|
|
2108
|
+
activeNodeRect: E,
|
|
2109
|
+
containerNodeRect: Ne,
|
|
2110
|
+
draggingNodeRect: we,
|
|
2111
|
+
over: ee.current.over,
|
|
2112
|
+
overlayNodeRect: se.rect,
|
|
2113
|
+
scrollableAncestors: ce,
|
|
2114
|
+
scrollableAncestorRects: Je,
|
|
2115
|
+
windowRect: gt
|
|
2116
|
+
}), Nt = Ge ? Ce(Ge, N) : null, Mt = kr(ce), Sn = Ht(Mt), Cn = Ht(Mt, [E]), xe = Ce(_e, Sn), De = we ? sr(we, _e) : null, Me = J && De ? d({
|
|
2117
|
+
active: J,
|
|
2118
|
+
collisionRect: De,
|
|
2119
|
+
droppableRects: oe,
|
|
2120
|
+
droppableContainers: qe,
|
|
2121
|
+
pointerCoordinates: Nt
|
|
2122
|
+
}) : null, Lt = tr(Me, "id"), [ue, Pt] = $(null), Rn = It ? _e : Ce(_e, Cn), En = or(Rn, (i = ue?.rect) != null ? i : null, E), ht = I(null), zt = F(
|
|
2123
|
+
(B, K) => {
|
|
2127
2124
|
let {
|
|
2128
|
-
sensor:
|
|
2129
|
-
options:
|
|
2130
|
-
} =
|
|
2131
|
-
if (
|
|
2125
|
+
sensor: W,
|
|
2126
|
+
options: de
|
|
2127
|
+
} = K;
|
|
2128
|
+
if (Z.current == null)
|
|
2132
2129
|
return;
|
|
2133
|
-
const
|
|
2134
|
-
if (!
|
|
2130
|
+
const V = w.get(Z.current);
|
|
2131
|
+
if (!V)
|
|
2135
2132
|
return;
|
|
2136
|
-
const
|
|
2137
|
-
active:
|
|
2138
|
-
activeNode:
|
|
2139
|
-
event:
|
|
2140
|
-
options:
|
|
2133
|
+
const U = B.nativeEvent, te = new W({
|
|
2134
|
+
active: Z.current,
|
|
2135
|
+
activeNode: V,
|
|
2136
|
+
event: U,
|
|
2137
|
+
options: de,
|
|
2141
2138
|
// Sensors need to be instantiated with refs for arguments that change over time
|
|
2142
2139
|
// otherwise they are frozen in time with the stale arguments
|
|
2143
|
-
context:
|
|
2144
|
-
onAbort(
|
|
2145
|
-
if (!
|
|
2140
|
+
context: ee,
|
|
2141
|
+
onAbort(k) {
|
|
2142
|
+
if (!w.get(k))
|
|
2146
2143
|
return;
|
|
2147
2144
|
const {
|
|
2148
|
-
onDragAbort:
|
|
2149
|
-
} =
|
|
2150
|
-
id:
|
|
2145
|
+
onDragAbort: ne
|
|
2146
|
+
} = re.current, ae = {
|
|
2147
|
+
id: k
|
|
2151
2148
|
};
|
|
2152
|
-
|
|
2149
|
+
ne?.(ae), y({
|
|
2153
2150
|
type: "onDragAbort",
|
|
2154
|
-
event:
|
|
2151
|
+
event: ae
|
|
2155
2152
|
});
|
|
2156
2153
|
},
|
|
2157
|
-
onPending(
|
|
2158
|
-
if (!
|
|
2154
|
+
onPending(k, fe, ne, ae) {
|
|
2155
|
+
if (!w.get(k))
|
|
2159
2156
|
return;
|
|
2160
2157
|
const {
|
|
2161
2158
|
onDragPending: Pe
|
|
2162
|
-
} =
|
|
2163
|
-
id:
|
|
2164
|
-
constraint:
|
|
2165
|
-
initialCoordinates:
|
|
2166
|
-
offset:
|
|
2159
|
+
} = re.current, ge = {
|
|
2160
|
+
id: k,
|
|
2161
|
+
constraint: fe,
|
|
2162
|
+
initialCoordinates: ne,
|
|
2163
|
+
offset: ae
|
|
2167
2164
|
};
|
|
2168
|
-
Pe?.(
|
|
2165
|
+
Pe?.(ge), y({
|
|
2169
2166
|
type: "onDragPending",
|
|
2170
|
-
event:
|
|
2167
|
+
event: ge
|
|
2171
2168
|
});
|
|
2172
2169
|
},
|
|
2173
|
-
onStart(
|
|
2174
|
-
const
|
|
2175
|
-
if (
|
|
2170
|
+
onStart(k) {
|
|
2171
|
+
const fe = Z.current;
|
|
2172
|
+
if (fe == null)
|
|
2176
2173
|
return;
|
|
2177
|
-
const
|
|
2178
|
-
if (!
|
|
2174
|
+
const ne = w.get(fe);
|
|
2175
|
+
if (!ne)
|
|
2179
2176
|
return;
|
|
2180
2177
|
const {
|
|
2181
|
-
onDragStart:
|
|
2182
|
-
} =
|
|
2183
|
-
activatorEvent:
|
|
2178
|
+
onDragStart: ae
|
|
2179
|
+
} = re.current, Le = {
|
|
2180
|
+
activatorEvent: U,
|
|
2184
2181
|
active: {
|
|
2185
|
-
id:
|
|
2186
|
-
data:
|
|
2187
|
-
rect:
|
|
2182
|
+
id: fe,
|
|
2183
|
+
data: ne.data,
|
|
2184
|
+
rect: G
|
|
2188
2185
|
}
|
|
2189
2186
|
};
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
type:
|
|
2193
|
-
initialCoordinates:
|
|
2194
|
-
active:
|
|
2187
|
+
Qe(() => {
|
|
2188
|
+
ae?.(Le), S(he.Initializing), p({
|
|
2189
|
+
type: P.DragStart,
|
|
2190
|
+
initialCoordinates: k,
|
|
2191
|
+
active: fe
|
|
2195
2192
|
}), y({
|
|
2196
2193
|
type: "onDragStart",
|
|
2197
|
-
event:
|
|
2198
|
-
}),
|
|
2194
|
+
event: Le
|
|
2195
|
+
}), He(ht.current), Ve(U);
|
|
2199
2196
|
});
|
|
2200
2197
|
},
|
|
2201
|
-
onMove(
|
|
2202
|
-
|
|
2203
|
-
type:
|
|
2204
|
-
coordinates:
|
|
2198
|
+
onMove(k) {
|
|
2199
|
+
p({
|
|
2200
|
+
type: P.DragMove,
|
|
2201
|
+
coordinates: k
|
|
2205
2202
|
});
|
|
2206
2203
|
},
|
|
2207
|
-
onEnd:
|
|
2208
|
-
onCancel:
|
|
2204
|
+
onEnd: Se(P.DragEnd),
|
|
2205
|
+
onCancel: Se(P.DragCancel)
|
|
2209
2206
|
});
|
|
2210
|
-
|
|
2211
|
-
function
|
|
2207
|
+
ht.current = te;
|
|
2208
|
+
function Se(k) {
|
|
2212
2209
|
return async function() {
|
|
2213
2210
|
const {
|
|
2214
|
-
active:
|
|
2215
|
-
collisions:
|
|
2216
|
-
over:
|
|
2211
|
+
active: ne,
|
|
2212
|
+
collisions: ae,
|
|
2213
|
+
over: Le,
|
|
2217
2214
|
scrollAdjustedTranslate: Pe
|
|
2218
|
-
} =
|
|
2219
|
-
let
|
|
2220
|
-
if (
|
|
2215
|
+
} = ee.current;
|
|
2216
|
+
let ge = null;
|
|
2217
|
+
if (ne && Pe) {
|
|
2221
2218
|
const {
|
|
2222
2219
|
cancelDrop: ze
|
|
2223
|
-
} =
|
|
2224
|
-
|
|
2225
|
-
activatorEvent:
|
|
2226
|
-
active:
|
|
2227
|
-
collisions:
|
|
2220
|
+
} = re.current;
|
|
2221
|
+
ge = {
|
|
2222
|
+
activatorEvent: U,
|
|
2223
|
+
active: ne,
|
|
2224
|
+
collisions: ae,
|
|
2228
2225
|
delta: Pe,
|
|
2229
|
-
over:
|
|
2230
|
-
},
|
|
2226
|
+
over: Le
|
|
2227
|
+
}, k === P.DragEnd && typeof ze == "function" && await Promise.resolve(ze(ge)) && (k = P.DragCancel);
|
|
2231
2228
|
}
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
type:
|
|
2235
|
-
}),
|
|
2236
|
-
const ze =
|
|
2237
|
-
if (
|
|
2238
|
-
const
|
|
2239
|
-
|
|
2229
|
+
Z.current = null, Qe(() => {
|
|
2230
|
+
p({
|
|
2231
|
+
type: k
|
|
2232
|
+
}), S(he.Uninitialized), Pt(null), He(null), Ve(null), ht.current = null;
|
|
2233
|
+
const ze = k === P.DragEnd ? "onDragEnd" : "onDragCancel";
|
|
2234
|
+
if (ge) {
|
|
2235
|
+
const vt = re.current[ze];
|
|
2236
|
+
vt?.(ge), y({
|
|
2240
2237
|
type: ze,
|
|
2241
|
-
event:
|
|
2238
|
+
event: ge
|
|
2242
2239
|
});
|
|
2243
2240
|
}
|
|
2244
2241
|
});
|
|
@@ -2246,319 +2243,319 @@ const uo = /* @__PURE__ */ Bn(function(t) {
|
|
|
2246
2243
|
}
|
|
2247
2244
|
},
|
|
2248
2245
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2249
|
-
[
|
|
2250
|
-
),
|
|
2251
|
-
const
|
|
2246
|
+
[w]
|
|
2247
|
+
), An = F((B, K) => (W, de) => {
|
|
2248
|
+
const V = W.nativeEvent, U = w.get(de);
|
|
2252
2249
|
if (
|
|
2253
2250
|
// Another sensor is already instantiating
|
|
2254
|
-
|
|
2255
|
-
!
|
|
2256
|
-
|
|
2251
|
+
Z.current !== null || // No active draggable
|
|
2252
|
+
!U || // Event has already been captured
|
|
2253
|
+
V.dndKit || V.defaultPrevented
|
|
2257
2254
|
)
|
|
2258
2255
|
return;
|
|
2259
|
-
const
|
|
2260
|
-
active:
|
|
2256
|
+
const te = {
|
|
2257
|
+
active: U
|
|
2261
2258
|
};
|
|
2262
|
-
|
|
2263
|
-
capturedBy:
|
|
2264
|
-
},
|
|
2265
|
-
}, [
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
}, [
|
|
2259
|
+
B(W, K.options, te) === !0 && (V.dndKit = {
|
|
2260
|
+
capturedBy: K.sensor
|
|
2261
|
+
}, Z.current = de, zt(W, K));
|
|
2262
|
+
}, [w, zt]), kt = Ir(u, An);
|
|
2263
|
+
Br(u), _(() => {
|
|
2264
|
+
E && D === he.Initializing && S(he.Initialized);
|
|
2265
|
+
}, [E, D]), T(
|
|
2269
2266
|
() => {
|
|
2270
2267
|
const {
|
|
2271
|
-
onDragMove:
|
|
2272
|
-
} =
|
|
2273
|
-
active:
|
|
2274
|
-
activatorEvent:
|
|
2275
|
-
collisions:
|
|
2276
|
-
over:
|
|
2277
|
-
} =
|
|
2278
|
-
if (!
|
|
2268
|
+
onDragMove: B
|
|
2269
|
+
} = re.current, {
|
|
2270
|
+
active: K,
|
|
2271
|
+
activatorEvent: W,
|
|
2272
|
+
collisions: de,
|
|
2273
|
+
over: V
|
|
2274
|
+
} = ee.current;
|
|
2275
|
+
if (!K || !W)
|
|
2279
2276
|
return;
|
|
2280
|
-
const
|
|
2281
|
-
active:
|
|
2282
|
-
activatorEvent:
|
|
2283
|
-
collisions:
|
|
2277
|
+
const U = {
|
|
2278
|
+
active: K,
|
|
2279
|
+
activatorEvent: W,
|
|
2280
|
+
collisions: de,
|
|
2284
2281
|
delta: {
|
|
2285
|
-
x:
|
|
2286
|
-
y:
|
|
2282
|
+
x: xe.x,
|
|
2283
|
+
y: xe.y
|
|
2287
2284
|
},
|
|
2288
|
-
over:
|
|
2285
|
+
over: V
|
|
2289
2286
|
};
|
|
2290
|
-
|
|
2291
|
-
|
|
2287
|
+
Qe(() => {
|
|
2288
|
+
B?.(U), y({
|
|
2292
2289
|
type: "onDragMove",
|
|
2293
|
-
event:
|
|
2290
|
+
event: U
|
|
2294
2291
|
});
|
|
2295
2292
|
});
|
|
2296
2293
|
},
|
|
2297
2294
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2298
|
-
[
|
|
2295
|
+
[xe.x, xe.y]
|
|
2299
2296
|
), T(
|
|
2300
2297
|
() => {
|
|
2301
2298
|
const {
|
|
2302
|
-
active:
|
|
2303
|
-
activatorEvent:
|
|
2304
|
-
collisions:
|
|
2305
|
-
droppableContainers:
|
|
2306
|
-
scrollAdjustedTranslate:
|
|
2307
|
-
} =
|
|
2308
|
-
if (!
|
|
2299
|
+
active: B,
|
|
2300
|
+
activatorEvent: K,
|
|
2301
|
+
collisions: W,
|
|
2302
|
+
droppableContainers: de,
|
|
2303
|
+
scrollAdjustedTranslate: V
|
|
2304
|
+
} = ee.current;
|
|
2305
|
+
if (!B || Z.current == null || !K || !V)
|
|
2309
2306
|
return;
|
|
2310
2307
|
const {
|
|
2311
|
-
onDragOver:
|
|
2312
|
-
} =
|
|
2313
|
-
id:
|
|
2314
|
-
rect:
|
|
2315
|
-
data:
|
|
2316
|
-
disabled:
|
|
2317
|
-
} : null,
|
|
2318
|
-
active:
|
|
2319
|
-
activatorEvent:
|
|
2320
|
-
collisions:
|
|
2308
|
+
onDragOver: U
|
|
2309
|
+
} = re.current, te = de.get(Lt), Se = te && te.rect.current ? {
|
|
2310
|
+
id: te.id,
|
|
2311
|
+
rect: te.rect.current,
|
|
2312
|
+
data: te.data,
|
|
2313
|
+
disabled: te.disabled
|
|
2314
|
+
} : null, k = {
|
|
2315
|
+
active: B,
|
|
2316
|
+
activatorEvent: K,
|
|
2317
|
+
collisions: W,
|
|
2321
2318
|
delta: {
|
|
2322
|
-
x:
|
|
2323
|
-
y:
|
|
2319
|
+
x: V.x,
|
|
2320
|
+
y: V.y
|
|
2324
2321
|
},
|
|
2325
|
-
over:
|
|
2322
|
+
over: Se
|
|
2326
2323
|
};
|
|
2327
|
-
|
|
2328
|
-
|
|
2324
|
+
Qe(() => {
|
|
2325
|
+
Pt(Se), U?.(k), y({
|
|
2329
2326
|
type: "onDragOver",
|
|
2330
|
-
event:
|
|
2327
|
+
event: k
|
|
2331
2328
|
});
|
|
2332
2329
|
});
|
|
2333
2330
|
},
|
|
2334
2331
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2335
|
-
[
|
|
2336
|
-
),
|
|
2337
|
-
|
|
2338
|
-
activatorEvent:
|
|
2339
|
-
active:
|
|
2340
|
-
activeNode:
|
|
2341
|
-
collisionRect:
|
|
2342
|
-
collisions:
|
|
2343
|
-
droppableRects:
|
|
2344
|
-
draggableNodes:
|
|
2345
|
-
draggingNode:
|
|
2346
|
-
draggingNodeRect:
|
|
2347
|
-
droppableContainers:
|
|
2332
|
+
[Lt]
|
|
2333
|
+
), _(() => {
|
|
2334
|
+
ee.current = {
|
|
2335
|
+
activatorEvent: Y,
|
|
2336
|
+
active: J,
|
|
2337
|
+
activeNode: H,
|
|
2338
|
+
collisionRect: De,
|
|
2339
|
+
collisions: Me,
|
|
2340
|
+
droppableRects: oe,
|
|
2341
|
+
draggableNodes: w,
|
|
2342
|
+
draggingNode: me,
|
|
2343
|
+
draggingNodeRect: we,
|
|
2344
|
+
droppableContainers: L,
|
|
2348
2345
|
over: ue,
|
|
2349
|
-
scrollableAncestors:
|
|
2350
|
-
scrollAdjustedTranslate:
|
|
2351
|
-
},
|
|
2352
|
-
initial:
|
|
2353
|
-
translated:
|
|
2346
|
+
scrollableAncestors: ce,
|
|
2347
|
+
scrollAdjustedTranslate: xe
|
|
2348
|
+
}, G.current = {
|
|
2349
|
+
initial: we,
|
|
2350
|
+
translated: De
|
|
2354
2351
|
};
|
|
2355
|
-
}, [
|
|
2356
|
-
...
|
|
2357
|
-
delta:
|
|
2358
|
-
draggingRect:
|
|
2359
|
-
pointerCoordinates:
|
|
2360
|
-
scrollableAncestors:
|
|
2361
|
-
scrollableAncestorRects:
|
|
2352
|
+
}, [J, H, Me, De, w, me, we, oe, L, ue, ce, xe]), Rr({
|
|
2353
|
+
...le,
|
|
2354
|
+
delta: N,
|
|
2355
|
+
draggingRect: De,
|
|
2356
|
+
pointerCoordinates: Nt,
|
|
2357
|
+
scrollableAncestors: ce,
|
|
2358
|
+
scrollableAncestorRects: Je
|
|
2362
2359
|
});
|
|
2363
|
-
const
|
|
2364
|
-
active:
|
|
2365
|
-
activeNode:
|
|
2366
|
-
activeNodeRect:
|
|
2367
|
-
activatorEvent:
|
|
2368
|
-
collisions:
|
|
2369
|
-
containerNodeRect:
|
|
2370
|
-
dragOverlay:
|
|
2371
|
-
draggableNodes:
|
|
2372
|
-
droppableContainers:
|
|
2373
|
-
droppableRects:
|
|
2360
|
+
const On = A(() => ({
|
|
2361
|
+
active: J,
|
|
2362
|
+
activeNode: H,
|
|
2363
|
+
activeNodeRect: E,
|
|
2364
|
+
activatorEvent: Y,
|
|
2365
|
+
collisions: Me,
|
|
2366
|
+
containerNodeRect: Ne,
|
|
2367
|
+
dragOverlay: se,
|
|
2368
|
+
draggableNodes: w,
|
|
2369
|
+
droppableContainers: L,
|
|
2370
|
+
droppableRects: oe,
|
|
2374
2371
|
over: ue,
|
|
2375
|
-
measureDroppableContainers:
|
|
2376
|
-
scrollableAncestors:
|
|
2377
|
-
scrollableAncestorRects:
|
|
2378
|
-
measuringConfiguration:
|
|
2379
|
-
measuringScheduled:
|
|
2380
|
-
windowRect:
|
|
2381
|
-
}), [
|
|
2382
|
-
activatorEvent:
|
|
2383
|
-
activators:
|
|
2384
|
-
active:
|
|
2385
|
-
activeNodeRect:
|
|
2372
|
+
measureDroppableContainers: pe,
|
|
2373
|
+
scrollableAncestors: ce,
|
|
2374
|
+
scrollableAncestorRects: Je,
|
|
2375
|
+
measuringConfiguration: j,
|
|
2376
|
+
measuringScheduled: Te,
|
|
2377
|
+
windowRect: gt
|
|
2378
|
+
}), [J, H, E, Y, Me, Ne, se, w, L, oe, ue, pe, ce, Je, j, Te, gt]), In = A(() => ({
|
|
2379
|
+
activatorEvent: Y,
|
|
2380
|
+
activators: kt,
|
|
2381
|
+
active: J,
|
|
2382
|
+
activeNodeRect: E,
|
|
2386
2383
|
ariaDescribedById: {
|
|
2387
|
-
draggable:
|
|
2384
|
+
draggable: Ie
|
|
2388
2385
|
},
|
|
2389
|
-
dispatch:
|
|
2390
|
-
draggableNodes:
|
|
2386
|
+
dispatch: p,
|
|
2387
|
+
draggableNodes: w,
|
|
2391
2388
|
over: ue,
|
|
2392
|
-
measureDroppableContainers:
|
|
2393
|
-
}), [
|
|
2394
|
-
return
|
|
2395
|
-
value:
|
|
2396
|
-
},
|
|
2397
|
-
value:
|
|
2398
|
-
},
|
|
2399
|
-
value:
|
|
2400
|
-
},
|
|
2401
|
-
value:
|
|
2402
|
-
}, c)),
|
|
2389
|
+
measureDroppableContainers: pe
|
|
2390
|
+
}), [Y, kt, J, E, p, Ie, w, ue, pe]);
|
|
2391
|
+
return M.createElement(Qt.Provider, {
|
|
2392
|
+
value: b
|
|
2393
|
+
}, M.createElement(Ue.Provider, {
|
|
2394
|
+
value: In
|
|
2395
|
+
}, M.createElement(vn.Provider, {
|
|
2396
|
+
value: On
|
|
2397
|
+
}, M.createElement(ft.Provider, {
|
|
2398
|
+
value: En
|
|
2399
|
+
}, c)), M.createElement(Hr, {
|
|
2403
2400
|
disabled: a?.restoreFocus === !1
|
|
2404
|
-
})),
|
|
2401
|
+
})), M.createElement(Jn, {
|
|
2405
2402
|
...a,
|
|
2406
|
-
hiddenTextDescribedById:
|
|
2403
|
+
hiddenTextDescribedById: Ie
|
|
2407
2404
|
}));
|
|
2408
|
-
function
|
|
2409
|
-
const
|
|
2405
|
+
function Tn() {
|
|
2406
|
+
const B = Oe?.autoScrollEnabled === !1, K = typeof l == "object" ? l.enabled === !1 : l === !1, W = R && !B && !K;
|
|
2410
2407
|
return typeof l == "object" ? {
|
|
2411
2408
|
...l,
|
|
2412
|
-
enabled:
|
|
2409
|
+
enabled: W
|
|
2413
2410
|
} : {
|
|
2414
|
-
enabled:
|
|
2411
|
+
enabled: W
|
|
2415
2412
|
};
|
|
2416
2413
|
}
|
|
2417
|
-
}),
|
|
2418
|
-
function
|
|
2414
|
+
}), Gr = /* @__PURE__ */ je(null), qt = "button", Jr = "Draggable";
|
|
2415
|
+
function _r(e) {
|
|
2419
2416
|
let {
|
|
2420
2417
|
id: t,
|
|
2421
2418
|
data: n,
|
|
2422
2419
|
disabled: r = !1,
|
|
2423
2420
|
attributes: o
|
|
2424
2421
|
} = e;
|
|
2425
|
-
const i =
|
|
2422
|
+
const i = We(Jr), {
|
|
2426
2423
|
activators: s,
|
|
2427
2424
|
activatorEvent: a,
|
|
2428
2425
|
active: l,
|
|
2429
2426
|
activeNodeRect: c,
|
|
2430
|
-
ariaDescribedById:
|
|
2431
|
-
draggableNodes:
|
|
2432
|
-
over:
|
|
2433
|
-
} =
|
|
2434
|
-
role: f =
|
|
2435
|
-
roleDescription:
|
|
2436
|
-
tabIndex:
|
|
2437
|
-
} = o ?? {}, v = l?.id === t,
|
|
2438
|
-
|
|
2439
|
-
() => (
|
|
2427
|
+
ariaDescribedById: u,
|
|
2428
|
+
draggableNodes: d,
|
|
2429
|
+
over: g
|
|
2430
|
+
} = ve(Ue), {
|
|
2431
|
+
role: f = qt,
|
|
2432
|
+
roleDescription: x = "draggable",
|
|
2433
|
+
tabIndex: h = 0
|
|
2434
|
+
} = o ?? {}, v = l?.id === t, p = ve(v ? ft : Gr), [y, b] = nt(), [D, S] = nt(), R = Fr(s, t), m = $e(n);
|
|
2435
|
+
_(
|
|
2436
|
+
() => (d.set(t, {
|
|
2440
2437
|
id: t,
|
|
2441
2438
|
key: i,
|
|
2442
2439
|
node: y,
|
|
2443
2440
|
activatorNode: D,
|
|
2444
|
-
data:
|
|
2441
|
+
data: m
|
|
2445
2442
|
}), () => {
|
|
2446
|
-
const
|
|
2447
|
-
|
|
2443
|
+
const N = d.get(t);
|
|
2444
|
+
N && N.key === i && d.delete(t);
|
|
2448
2445
|
}),
|
|
2449
2446
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2450
|
-
[
|
|
2447
|
+
[d, t]
|
|
2451
2448
|
);
|
|
2452
|
-
const
|
|
2449
|
+
const w = A(() => ({
|
|
2453
2450
|
role: f,
|
|
2454
|
-
tabIndex:
|
|
2451
|
+
tabIndex: h,
|
|
2455
2452
|
"aria-disabled": r,
|
|
2456
|
-
"aria-pressed": v && f ===
|
|
2457
|
-
"aria-roledescription":
|
|
2458
|
-
"aria-describedby":
|
|
2459
|
-
}), [r, f,
|
|
2453
|
+
"aria-pressed": v && f === qt ? !0 : void 0,
|
|
2454
|
+
"aria-roledescription": x,
|
|
2455
|
+
"aria-describedby": u.draggable
|
|
2456
|
+
}), [r, f, h, v, x, u.draggable]);
|
|
2460
2457
|
return {
|
|
2461
2458
|
active: l,
|
|
2462
2459
|
activatorEvent: a,
|
|
2463
2460
|
activeNodeRect: c,
|
|
2464
|
-
attributes:
|
|
2461
|
+
attributes: w,
|
|
2465
2462
|
isDragging: v,
|
|
2466
|
-
listeners: r ? void 0 :
|
|
2463
|
+
listeners: r ? void 0 : R,
|
|
2467
2464
|
node: y,
|
|
2468
|
-
over:
|
|
2469
|
-
setNodeRef:
|
|
2470
|
-
setActivatorNodeRef:
|
|
2471
|
-
transform:
|
|
2465
|
+
over: g,
|
|
2466
|
+
setNodeRef: b,
|
|
2467
|
+
setActivatorNodeRef: S,
|
|
2468
|
+
transform: p
|
|
2472
2469
|
};
|
|
2473
2470
|
}
|
|
2474
|
-
function
|
|
2475
|
-
return
|
|
2471
|
+
function bn() {
|
|
2472
|
+
return ve(vn);
|
|
2476
2473
|
}
|
|
2477
|
-
const
|
|
2474
|
+
const Qr = "Droppable", Zr = {
|
|
2478
2475
|
timeout: 25
|
|
2479
2476
|
};
|
|
2480
|
-
function
|
|
2477
|
+
function eo(e) {
|
|
2481
2478
|
let {
|
|
2482
2479
|
data: t,
|
|
2483
2480
|
disabled: n = !1,
|
|
2484
2481
|
id: r,
|
|
2485
2482
|
resizeObserverConfig: o
|
|
2486
2483
|
} = e;
|
|
2487
|
-
const i =
|
|
2484
|
+
const i = We(Qr), {
|
|
2488
2485
|
active: s,
|
|
2489
2486
|
dispatch: a,
|
|
2490
2487
|
over: l,
|
|
2491
2488
|
measureDroppableContainers: c
|
|
2492
|
-
} =
|
|
2489
|
+
} = ve(Ue), u = I({
|
|
2493
2490
|
disabled: n
|
|
2494
|
-
}),
|
|
2495
|
-
disabled:
|
|
2496
|
-
updateMeasurementsFor:
|
|
2491
|
+
}), d = I(!1), g = I(null), f = I(null), {
|
|
2492
|
+
disabled: x,
|
|
2493
|
+
updateMeasurementsFor: h,
|
|
2497
2494
|
timeout: v
|
|
2498
2495
|
} = {
|
|
2499
|
-
...
|
|
2496
|
+
...Zr,
|
|
2500
2497
|
...o
|
|
2501
|
-
},
|
|
2498
|
+
}, p = $e(h ?? r), y = F(
|
|
2502
2499
|
() => {
|
|
2503
|
-
if (!
|
|
2504
|
-
|
|
2500
|
+
if (!d.current) {
|
|
2501
|
+
d.current = !0;
|
|
2505
2502
|
return;
|
|
2506
2503
|
}
|
|
2507
2504
|
f.current != null && clearTimeout(f.current), f.current = setTimeout(() => {
|
|
2508
|
-
c(Array.isArray(
|
|
2505
|
+
c(Array.isArray(p.current) ? p.current : [p.current]), f.current = null;
|
|
2509
2506
|
}, v);
|
|
2510
2507
|
},
|
|
2511
2508
|
//eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2512
2509
|
[v]
|
|
2513
|
-
),
|
|
2510
|
+
), b = dt({
|
|
2514
2511
|
callback: y,
|
|
2515
|
-
disabled:
|
|
2516
|
-
}), D =
|
|
2517
|
-
|
|
2518
|
-
}, [
|
|
2512
|
+
disabled: x || !s
|
|
2513
|
+
}), D = F((w, N) => {
|
|
2514
|
+
b && (N && (b.unobserve(N), d.current = !1), w && b.observe(w));
|
|
2515
|
+
}, [b]), [S, R] = nt(D), m = $e(t);
|
|
2519
2516
|
return T(() => {
|
|
2520
|
-
!
|
|
2521
|
-
}, [
|
|
2517
|
+
!b || !S.current || (b.disconnect(), d.current = !1, b.observe(S.current));
|
|
2518
|
+
}, [S, b]), T(
|
|
2522
2519
|
() => (a({
|
|
2523
|
-
type:
|
|
2520
|
+
type: P.RegisterDroppable,
|
|
2524
2521
|
element: {
|
|
2525
2522
|
id: r,
|
|
2526
2523
|
key: i,
|
|
2527
2524
|
disabled: n,
|
|
2528
|
-
node:
|
|
2529
|
-
rect:
|
|
2530
|
-
data:
|
|
2525
|
+
node: S,
|
|
2526
|
+
rect: g,
|
|
2527
|
+
data: m
|
|
2531
2528
|
}
|
|
2532
2529
|
}), () => a({
|
|
2533
|
-
type:
|
|
2530
|
+
type: P.UnregisterDroppable,
|
|
2534
2531
|
key: i,
|
|
2535
2532
|
id: r
|
|
2536
2533
|
})),
|
|
2537
2534
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2538
2535
|
[r]
|
|
2539
2536
|
), T(() => {
|
|
2540
|
-
n !==
|
|
2541
|
-
type:
|
|
2537
|
+
n !== u.current.disabled && (a({
|
|
2538
|
+
type: P.SetDroppableDisabled,
|
|
2542
2539
|
id: r,
|
|
2543
2540
|
key: i,
|
|
2544
2541
|
disabled: n
|
|
2545
|
-
}),
|
|
2542
|
+
}), u.current.disabled = n);
|
|
2546
2543
|
}, [r, i, n, a]), {
|
|
2547
2544
|
active: s,
|
|
2548
|
-
rect:
|
|
2545
|
+
rect: g,
|
|
2549
2546
|
isOver: l?.id === r,
|
|
2550
|
-
node:
|
|
2547
|
+
node: S,
|
|
2551
2548
|
over: l,
|
|
2552
|
-
setNodeRef:
|
|
2549
|
+
setNodeRef: R
|
|
2553
2550
|
};
|
|
2554
2551
|
}
|
|
2555
|
-
function
|
|
2552
|
+
function to(e) {
|
|
2556
2553
|
let {
|
|
2557
2554
|
animation: t,
|
|
2558
2555
|
children: n
|
|
2559
2556
|
} = e;
|
|
2560
|
-
const [r, o] =
|
|
2561
|
-
return !n && !r && a && o(a),
|
|
2557
|
+
const [r, o] = $(null), [i, s] = $(null), a = rt(n);
|
|
2558
|
+
return !n && !r && a && o(a), _(() => {
|
|
2562
2559
|
if (!i)
|
|
2563
2560
|
return;
|
|
2564
2561
|
const l = r?.key, c = r?.props.id;
|
|
@@ -2569,30 +2566,30 @@ function mo(e) {
|
|
|
2569
2566
|
Promise.resolve(t(c, i)).then(() => {
|
|
2570
2567
|
o(null);
|
|
2571
2568
|
});
|
|
2572
|
-
}, [t, r, i]),
|
|
2569
|
+
}, [t, r, i]), M.createElement(M.Fragment, null, n, r ? Pn(r, {
|
|
2573
2570
|
ref: s
|
|
2574
2571
|
}) : null);
|
|
2575
2572
|
}
|
|
2576
|
-
const
|
|
2573
|
+
const no = {
|
|
2577
2574
|
x: 0,
|
|
2578
2575
|
y: 0,
|
|
2579
2576
|
scaleX: 1,
|
|
2580
2577
|
scaleY: 1
|
|
2581
2578
|
};
|
|
2582
|
-
function
|
|
2579
|
+
function ro(e) {
|
|
2583
2580
|
let {
|
|
2584
2581
|
children: t
|
|
2585
2582
|
} = e;
|
|
2586
|
-
return
|
|
2587
|
-
value:
|
|
2588
|
-
},
|
|
2589
|
-
value:
|
|
2583
|
+
return M.createElement(Ue.Provider, {
|
|
2584
|
+
value: hn
|
|
2585
|
+
}, M.createElement(ft.Provider, {
|
|
2586
|
+
value: no
|
|
2590
2587
|
}, t));
|
|
2591
2588
|
}
|
|
2592
|
-
const
|
|
2589
|
+
const oo = {
|
|
2593
2590
|
position: "fixed",
|
|
2594
2591
|
touchAction: "none"
|
|
2595
|
-
},
|
|
2592
|
+
}, io = (e) => ut(e) ? "transform 250ms ease" : void 0, so = /* @__PURE__ */ zn((e, t) => {
|
|
2596
2593
|
let {
|
|
2597
2594
|
as: n,
|
|
2598
2595
|
activatorEvent: r,
|
|
@@ -2602,31 +2599,31 @@ const wo = {
|
|
|
2602
2599
|
rect: a,
|
|
2603
2600
|
style: l,
|
|
2604
2601
|
transform: c,
|
|
2605
|
-
transition:
|
|
2602
|
+
transition: u = io
|
|
2606
2603
|
} = e;
|
|
2607
2604
|
if (!a)
|
|
2608
2605
|
return null;
|
|
2609
|
-
const
|
|
2606
|
+
const d = o ? c : {
|
|
2610
2607
|
...c,
|
|
2611
2608
|
scaleX: 1,
|
|
2612
2609
|
scaleY: 1
|
|
2613
|
-
},
|
|
2614
|
-
...
|
|
2610
|
+
}, g = {
|
|
2611
|
+
...oo,
|
|
2615
2612
|
width: a.width,
|
|
2616
2613
|
height: a.height,
|
|
2617
2614
|
top: a.top,
|
|
2618
2615
|
left: a.left,
|
|
2619
|
-
transform: be.Transform.toString(
|
|
2620
|
-
transformOrigin: o && r ?
|
|
2621
|
-
transition: typeof
|
|
2616
|
+
transform: be.Transform.toString(d),
|
|
2617
|
+
transformOrigin: o && r ? Qn(r, a) : void 0,
|
|
2618
|
+
transition: typeof u == "function" ? u(r) : u,
|
|
2622
2619
|
...l
|
|
2623
2620
|
};
|
|
2624
|
-
return
|
|
2621
|
+
return M.createElement(n, {
|
|
2625
2622
|
className: s,
|
|
2626
|
-
style:
|
|
2623
|
+
style: g,
|
|
2627
2624
|
ref: t
|
|
2628
2625
|
}, i);
|
|
2629
|
-
}),
|
|
2626
|
+
}), ao = (e) => (t) => {
|
|
2630
2627
|
let {
|
|
2631
2628
|
active: n,
|
|
2632
2629
|
dragOverlay: r
|
|
@@ -2646,7 +2643,7 @@ const wo = {
|
|
|
2646
2643
|
n.node.style.setProperty(l, c);
|
|
2647
2644
|
s != null && s.active && n.node.classList.remove(s.active);
|
|
2648
2645
|
};
|
|
2649
|
-
},
|
|
2646
|
+
}, lo = (e) => {
|
|
2650
2647
|
let {
|
|
2651
2648
|
transform: {
|
|
2652
2649
|
initial: t,
|
|
@@ -2658,11 +2655,11 @@ const wo = {
|
|
|
2658
2655
|
}, {
|
|
2659
2656
|
transform: be.Transform.toString(n)
|
|
2660
2657
|
}];
|
|
2661
|
-
},
|
|
2658
|
+
}, co = {
|
|
2662
2659
|
duration: 250,
|
|
2663
2660
|
easing: "ease",
|
|
2664
|
-
keyframes:
|
|
2665
|
-
sideEffects: /* @__PURE__ */
|
|
2661
|
+
keyframes: lo,
|
|
2662
|
+
sideEffects: /* @__PURE__ */ ao({
|
|
2666
2663
|
styles: {
|
|
2667
2664
|
active: {
|
|
2668
2665
|
opacity: "0"
|
|
@@ -2670,14 +2667,14 @@ const wo = {
|
|
|
2670
2667
|
}
|
|
2671
2668
|
})
|
|
2672
2669
|
};
|
|
2673
|
-
function
|
|
2670
|
+
function uo(e) {
|
|
2674
2671
|
let {
|
|
2675
2672
|
config: t,
|
|
2676
2673
|
draggableNodes: n,
|
|
2677
2674
|
droppableContainers: r,
|
|
2678
2675
|
measuringConfiguration: o
|
|
2679
2676
|
} = e;
|
|
2680
|
-
return
|
|
2677
|
+
return ct((i, s) => {
|
|
2681
2678
|
if (t === null)
|
|
2682
2679
|
return;
|
|
2683
2680
|
const a = n.get(i);
|
|
@@ -2686,16 +2683,16 @@ function No(e) {
|
|
|
2686
2683
|
const l = a.node.current;
|
|
2687
2684
|
if (!l)
|
|
2688
2685
|
return;
|
|
2689
|
-
const c =
|
|
2686
|
+
const c = gn(s);
|
|
2690
2687
|
if (!c)
|
|
2691
2688
|
return;
|
|
2692
2689
|
const {
|
|
2693
|
-
transform:
|
|
2694
|
-
} =
|
|
2695
|
-
if (!
|
|
2690
|
+
transform: u
|
|
2691
|
+
} = X(s).getComputedStyle(s), d = en(u);
|
|
2692
|
+
if (!d)
|
|
2696
2693
|
return;
|
|
2697
|
-
const
|
|
2698
|
-
return
|
|
2694
|
+
const g = typeof t == "function" ? t : fo(t);
|
|
2695
|
+
return ln(l, o.draggable.measure), g({
|
|
2699
2696
|
active: {
|
|
2700
2697
|
id: i,
|
|
2701
2698
|
data: a.data,
|
|
@@ -2709,18 +2706,18 @@ function No(e) {
|
|
|
2709
2706
|
},
|
|
2710
2707
|
droppableContainers: r,
|
|
2711
2708
|
measuringConfiguration: o,
|
|
2712
|
-
transform:
|
|
2709
|
+
transform: d
|
|
2713
2710
|
});
|
|
2714
2711
|
});
|
|
2715
2712
|
}
|
|
2716
|
-
function
|
|
2713
|
+
function fo(e) {
|
|
2717
2714
|
const {
|
|
2718
2715
|
duration: t,
|
|
2719
2716
|
easing: n,
|
|
2720
2717
|
sideEffects: r,
|
|
2721
2718
|
keyframes: o
|
|
2722
2719
|
} = {
|
|
2723
|
-
...
|
|
2720
|
+
...co,
|
|
2724
2721
|
...e
|
|
2725
2722
|
};
|
|
2726
2723
|
return (i) => {
|
|
@@ -2732,51 +2729,51 @@ function Io(e) {
|
|
|
2732
2729
|
} = i;
|
|
2733
2730
|
if (!t)
|
|
2734
2731
|
return;
|
|
2735
|
-
const
|
|
2732
|
+
const u = {
|
|
2736
2733
|
x: a.rect.left - s.rect.left,
|
|
2737
2734
|
y: a.rect.top - s.rect.top
|
|
2738
|
-
},
|
|
2735
|
+
}, d = {
|
|
2739
2736
|
scaleX: l.scaleX !== 1 ? s.rect.width * l.scaleX / a.rect.width : 1,
|
|
2740
2737
|
scaleY: l.scaleY !== 1 ? s.rect.height * l.scaleY / a.rect.height : 1
|
|
2741
|
-
},
|
|
2742
|
-
x: l.x -
|
|
2743
|
-
y: l.y -
|
|
2744
|
-
...
|
|
2738
|
+
}, g = {
|
|
2739
|
+
x: l.x - u.x,
|
|
2740
|
+
y: l.y - u.y,
|
|
2741
|
+
...d
|
|
2745
2742
|
}, f = o({
|
|
2746
2743
|
...c,
|
|
2747
2744
|
active: s,
|
|
2748
2745
|
dragOverlay: a,
|
|
2749
2746
|
transform: {
|
|
2750
2747
|
initial: l,
|
|
2751
|
-
final:
|
|
2748
|
+
final: g
|
|
2752
2749
|
}
|
|
2753
|
-
}), [
|
|
2754
|
-
if (JSON.stringify(
|
|
2750
|
+
}), [x] = f, h = f[f.length - 1];
|
|
2751
|
+
if (JSON.stringify(x) === JSON.stringify(h))
|
|
2755
2752
|
return;
|
|
2756
2753
|
const v = r?.({
|
|
2757
2754
|
active: s,
|
|
2758
2755
|
dragOverlay: a,
|
|
2759
2756
|
...c
|
|
2760
|
-
}),
|
|
2757
|
+
}), p = a.node.animate(f, {
|
|
2761
2758
|
duration: t,
|
|
2762
2759
|
easing: n,
|
|
2763
2760
|
fill: "forwards"
|
|
2764
2761
|
});
|
|
2765
2762
|
return new Promise((y) => {
|
|
2766
|
-
|
|
2763
|
+
p.onfinish = () => {
|
|
2767
2764
|
v?.(), y();
|
|
2768
2765
|
};
|
|
2769
2766
|
});
|
|
2770
2767
|
};
|
|
2771
2768
|
}
|
|
2772
|
-
let
|
|
2773
|
-
function
|
|
2769
|
+
let Gt = 0;
|
|
2770
|
+
function go(e) {
|
|
2774
2771
|
return A(() => {
|
|
2775
2772
|
if (e != null)
|
|
2776
|
-
return
|
|
2773
|
+
return Gt++, Gt;
|
|
2777
2774
|
}, [e]);
|
|
2778
2775
|
}
|
|
2779
|
-
const
|
|
2776
|
+
const No = /* @__PURE__ */ M.memo((e) => {
|
|
2780
2777
|
let {
|
|
2781
2778
|
adjustScale: t = !1,
|
|
2782
2779
|
children: n,
|
|
@@ -2789,69 +2786,69 @@ const Oo = /* @__PURE__ */ j.memo((e) => {
|
|
|
2789
2786
|
zIndex: c = 999
|
|
2790
2787
|
} = e;
|
|
2791
2788
|
const {
|
|
2792
|
-
activatorEvent:
|
|
2793
|
-
active:
|
|
2794
|
-
activeNodeRect:
|
|
2789
|
+
activatorEvent: u,
|
|
2790
|
+
active: d,
|
|
2791
|
+
activeNodeRect: g,
|
|
2795
2792
|
containerNodeRect: f,
|
|
2796
|
-
draggableNodes:
|
|
2797
|
-
droppableContainers:
|
|
2793
|
+
draggableNodes: x,
|
|
2794
|
+
droppableContainers: h,
|
|
2798
2795
|
dragOverlay: v,
|
|
2799
|
-
over:
|
|
2796
|
+
over: p,
|
|
2800
2797
|
measuringConfiguration: y,
|
|
2801
|
-
scrollableAncestors:
|
|
2798
|
+
scrollableAncestors: b,
|
|
2802
2799
|
scrollableAncestorRects: D,
|
|
2803
|
-
windowRect:
|
|
2804
|
-
} =
|
|
2805
|
-
activatorEvent:
|
|
2806
|
-
active:
|
|
2807
|
-
activeNodeRect:
|
|
2800
|
+
windowRect: S
|
|
2801
|
+
} = bn(), R = ve(ft), m = go(d?.id), w = pn(s, {
|
|
2802
|
+
activatorEvent: u,
|
|
2803
|
+
active: d,
|
|
2804
|
+
activeNodeRect: g,
|
|
2808
2805
|
containerNodeRect: f,
|
|
2809
2806
|
draggingNodeRect: v.rect,
|
|
2810
|
-
over:
|
|
2807
|
+
over: p,
|
|
2811
2808
|
overlayNodeRect: v.rect,
|
|
2812
|
-
scrollableAncestors:
|
|
2809
|
+
scrollableAncestors: b,
|
|
2813
2810
|
scrollableAncestorRects: D,
|
|
2814
|
-
transform:
|
|
2815
|
-
windowRect:
|
|
2816
|
-
}),
|
|
2811
|
+
transform: R,
|
|
2812
|
+
windowRect: S
|
|
2813
|
+
}), N = Ot(g), L = uo({
|
|
2817
2814
|
config: r,
|
|
2818
|
-
draggableNodes:
|
|
2819
|
-
droppableContainers:
|
|
2815
|
+
draggableNodes: x,
|
|
2816
|
+
droppableContainers: h,
|
|
2820
2817
|
measuringConfiguration: y
|
|
2821
|
-
}),
|
|
2822
|
-
return
|
|
2823
|
-
animation:
|
|
2824
|
-
},
|
|
2825
|
-
key:
|
|
2826
|
-
id:
|
|
2827
|
-
ref:
|
|
2818
|
+
}), O = N ? v.setRef : void 0;
|
|
2819
|
+
return M.createElement(ro, null, M.createElement(to, {
|
|
2820
|
+
animation: L
|
|
2821
|
+
}, d && m ? M.createElement(so, {
|
|
2822
|
+
key: m,
|
|
2823
|
+
id: d.id,
|
|
2824
|
+
ref: O,
|
|
2828
2825
|
as: a,
|
|
2829
|
-
activatorEvent:
|
|
2826
|
+
activatorEvent: u,
|
|
2830
2827
|
adjustScale: t,
|
|
2831
2828
|
className: l,
|
|
2832
2829
|
transition: i,
|
|
2833
|
-
rect:
|
|
2830
|
+
rect: N,
|
|
2834
2831
|
style: {
|
|
2835
2832
|
zIndex: c,
|
|
2836
2833
|
...o
|
|
2837
2834
|
},
|
|
2838
|
-
transform:
|
|
2835
|
+
transform: w
|
|
2839
2836
|
}, n) : null));
|
|
2840
2837
|
});
|
|
2841
|
-
function
|
|
2838
|
+
function yn(e, t, n) {
|
|
2842
2839
|
const r = e.slice();
|
|
2843
2840
|
return r.splice(n < 0 ? r.length + n : n, 0, r.splice(t, 1)[0]), r;
|
|
2844
2841
|
}
|
|
2845
|
-
function
|
|
2842
|
+
function ho(e, t) {
|
|
2846
2843
|
return e.reduce((n, r, o) => {
|
|
2847
2844
|
const i = t.get(r);
|
|
2848
2845
|
return i && (n[o] = i), n;
|
|
2849
2846
|
}, Array(e.length));
|
|
2850
2847
|
}
|
|
2851
|
-
function
|
|
2848
|
+
function Ze(e) {
|
|
2852
2849
|
return e !== null && e >= 0;
|
|
2853
2850
|
}
|
|
2854
|
-
function
|
|
2851
|
+
function vo(e, t) {
|
|
2855
2852
|
if (e === t)
|
|
2856
2853
|
return !0;
|
|
2857
2854
|
if (e.length !== t.length)
|
|
@@ -2861,30 +2858,30 @@ function Mo(e, t) {
|
|
|
2861
2858
|
return !1;
|
|
2862
2859
|
return !0;
|
|
2863
2860
|
}
|
|
2864
|
-
function
|
|
2861
|
+
function po(e) {
|
|
2865
2862
|
return typeof e == "boolean" ? {
|
|
2866
2863
|
draggable: e,
|
|
2867
2864
|
droppable: e
|
|
2868
2865
|
} : e;
|
|
2869
2866
|
}
|
|
2870
|
-
const
|
|
2867
|
+
const mn = (e) => {
|
|
2871
2868
|
let {
|
|
2872
2869
|
rects: t,
|
|
2873
2870
|
activeIndex: n,
|
|
2874
2871
|
overIndex: r,
|
|
2875
2872
|
index: o
|
|
2876
2873
|
} = e;
|
|
2877
|
-
const i =
|
|
2874
|
+
const i = yn(t, r, n), s = t[o], a = i[o];
|
|
2878
2875
|
return !a || !s ? null : {
|
|
2879
2876
|
x: a.left - s.left,
|
|
2880
2877
|
y: a.top - s.top,
|
|
2881
2878
|
scaleX: a.width / s.width,
|
|
2882
2879
|
scaleY: a.height / s.height
|
|
2883
2880
|
};
|
|
2884
|
-
},
|
|
2881
|
+
}, et = {
|
|
2885
2882
|
scaleX: 1,
|
|
2886
2883
|
scaleY: 1
|
|
2887
|
-
},
|
|
2884
|
+
}, Mo = (e) => {
|
|
2888
2885
|
var t;
|
|
2889
2886
|
let {
|
|
2890
2887
|
activeIndex: n,
|
|
@@ -2901,48 +2898,48 @@ const Dn = (e) => {
|
|
|
2901
2898
|
return c ? {
|
|
2902
2899
|
x: 0,
|
|
2903
2900
|
y: n < s ? c.top + c.height - (a.top + a.height) : c.top - a.top,
|
|
2904
|
-
...
|
|
2901
|
+
...et
|
|
2905
2902
|
} : null;
|
|
2906
2903
|
}
|
|
2907
|
-
const l =
|
|
2904
|
+
const l = bo(i, o, n);
|
|
2908
2905
|
return o > n && o <= s ? {
|
|
2909
2906
|
x: 0,
|
|
2910
2907
|
y: -a.height - l,
|
|
2911
|
-
...
|
|
2908
|
+
...et
|
|
2912
2909
|
} : o < n && o >= s ? {
|
|
2913
2910
|
x: 0,
|
|
2914
2911
|
y: a.height + l,
|
|
2915
|
-
...
|
|
2912
|
+
...et
|
|
2916
2913
|
} : {
|
|
2917
2914
|
x: 0,
|
|
2918
2915
|
y: 0,
|
|
2919
|
-
...
|
|
2916
|
+
...et
|
|
2920
2917
|
};
|
|
2921
2918
|
};
|
|
2922
|
-
function
|
|
2919
|
+
function bo(e, t, n) {
|
|
2923
2920
|
const r = e[t], o = e[t - 1], i = e[t + 1];
|
|
2924
2921
|
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;
|
|
2925
2922
|
}
|
|
2926
|
-
const
|
|
2923
|
+
const wn = "Sortable", xn = /* @__PURE__ */ M.createContext({
|
|
2927
2924
|
activeIndex: -1,
|
|
2928
|
-
containerId:
|
|
2925
|
+
containerId: wn,
|
|
2929
2926
|
disableTransforms: !1,
|
|
2930
2927
|
items: [],
|
|
2931
2928
|
overIndex: -1,
|
|
2932
2929
|
useDragOverlay: !1,
|
|
2933
2930
|
sortedRects: [],
|
|
2934
|
-
strategy:
|
|
2931
|
+
strategy: mn,
|
|
2935
2932
|
disabled: {
|
|
2936
2933
|
draggable: !1,
|
|
2937
2934
|
droppable: !1
|
|
2938
2935
|
}
|
|
2939
2936
|
});
|
|
2940
|
-
function
|
|
2937
|
+
function Lo(e) {
|
|
2941
2938
|
let {
|
|
2942
2939
|
children: t,
|
|
2943
2940
|
id: n,
|
|
2944
2941
|
items: r,
|
|
2945
|
-
strategy: o =
|
|
2942
|
+
strategy: o = mn,
|
|
2946
2943
|
disabled: i = !1
|
|
2947
2944
|
} = e;
|
|
2948
2945
|
const {
|
|
@@ -2950,41 +2947,41 @@ function Po(e) {
|
|
|
2950
2947
|
dragOverlay: a,
|
|
2951
2948
|
droppableRects: l,
|
|
2952
2949
|
over: c,
|
|
2953
|
-
measureDroppableContainers:
|
|
2954
|
-
} =
|
|
2955
|
-
|
|
2956
|
-
y &&
|
|
2957
|
-
}, [y, f,
|
|
2958
|
-
|
|
2950
|
+
measureDroppableContainers: u
|
|
2951
|
+
} = bn(), d = We(wn, n), g = a.rect !== null, f = A(() => r.map((R) => typeof R == "object" && "id" in R ? R.id : R), [r]), x = s != null, h = s ? f.indexOf(s.id) : -1, v = c ? f.indexOf(c.id) : -1, p = I(f), y = !vo(f, p.current), b = v !== -1 && h === -1 || y, D = po(i);
|
|
2952
|
+
_(() => {
|
|
2953
|
+
y && x && u(f);
|
|
2954
|
+
}, [y, f, x, u]), T(() => {
|
|
2955
|
+
p.current = f;
|
|
2959
2956
|
}, [f]);
|
|
2960
|
-
const
|
|
2957
|
+
const S = A(
|
|
2961
2958
|
() => ({
|
|
2962
|
-
activeIndex:
|
|
2963
|
-
containerId:
|
|
2959
|
+
activeIndex: h,
|
|
2960
|
+
containerId: d,
|
|
2964
2961
|
disabled: D,
|
|
2965
|
-
disableTransforms:
|
|
2962
|
+
disableTransforms: b,
|
|
2966
2963
|
items: f,
|
|
2967
2964
|
overIndex: v,
|
|
2968
|
-
useDragOverlay:
|
|
2969
|
-
sortedRects:
|
|
2965
|
+
useDragOverlay: g,
|
|
2966
|
+
sortedRects: ho(f, l),
|
|
2970
2967
|
strategy: o
|
|
2971
2968
|
}),
|
|
2972
2969
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2973
|
-
[
|
|
2970
|
+
[h, d, D.draggable, D.droppable, b, f, v, l, g, o]
|
|
2974
2971
|
);
|
|
2975
|
-
return
|
|
2976
|
-
value:
|
|
2972
|
+
return M.createElement(xn.Provider, {
|
|
2973
|
+
value: S
|
|
2977
2974
|
}, t);
|
|
2978
2975
|
}
|
|
2979
|
-
const
|
|
2976
|
+
const yo = (e) => {
|
|
2980
2977
|
let {
|
|
2981
2978
|
id: t,
|
|
2982
2979
|
items: n,
|
|
2983
2980
|
activeIndex: r,
|
|
2984
2981
|
overIndex: o
|
|
2985
2982
|
} = e;
|
|
2986
|
-
return
|
|
2987
|
-
},
|
|
2983
|
+
return yn(n, r, o).indexOf(t);
|
|
2984
|
+
}, mo = (e) => {
|
|
2988
2985
|
let {
|
|
2989
2986
|
containerId: t,
|
|
2990
2987
|
isSorting: n,
|
|
@@ -2997,37 +2994,37 @@ const zo = (e) => {
|
|
|
2997
2994
|
transition: c
|
|
2998
2995
|
} = e;
|
|
2999
2996
|
return !c || !r || a !== i && o === s ? !1 : n ? !0 : s !== o && t === l;
|
|
3000
|
-
},
|
|
2997
|
+
}, wo = {
|
|
3001
2998
|
duration: 200,
|
|
3002
2999
|
easing: "ease"
|
|
3003
|
-
},
|
|
3004
|
-
property:
|
|
3000
|
+
}, Dn = "transform", xo = /* @__PURE__ */ be.Transition.toString({
|
|
3001
|
+
property: Dn,
|
|
3005
3002
|
duration: 0,
|
|
3006
3003
|
easing: "linear"
|
|
3007
|
-
}),
|
|
3004
|
+
}), Do = {
|
|
3008
3005
|
roleDescription: "sortable"
|
|
3009
3006
|
};
|
|
3010
|
-
function
|
|
3007
|
+
function So(e) {
|
|
3011
3008
|
let {
|
|
3012
3009
|
disabled: t,
|
|
3013
3010
|
index: n,
|
|
3014
3011
|
node: r,
|
|
3015
3012
|
rect: o
|
|
3016
3013
|
} = e;
|
|
3017
|
-
const [i, s] =
|
|
3018
|
-
return
|
|
3014
|
+
const [i, s] = $(null), a = I(n);
|
|
3015
|
+
return _(() => {
|
|
3019
3016
|
if (!t && n !== a.current && r.current) {
|
|
3020
3017
|
const l = o.current;
|
|
3021
3018
|
if (l) {
|
|
3022
3019
|
const c = Ae(r.current, {
|
|
3023
3020
|
ignoreTransform: !0
|
|
3024
|
-
}),
|
|
3021
|
+
}), u = {
|
|
3025
3022
|
x: l.left - c.left,
|
|
3026
3023
|
y: l.top - c.top,
|
|
3027
3024
|
scaleX: l.width / c.width,
|
|
3028
3025
|
scaleY: l.height / c.height
|
|
3029
3026
|
};
|
|
3030
|
-
(
|
|
3027
|
+
(u.x || u.y) && s(u);
|
|
3031
3028
|
}
|
|
3032
3029
|
}
|
|
3033
3030
|
n !== a.current && (a.current = n);
|
|
@@ -3035,153 +3032,153 @@ function Yo(e) {
|
|
|
3035
3032
|
i && s(null);
|
|
3036
3033
|
}, [i]), i;
|
|
3037
3034
|
}
|
|
3038
|
-
function
|
|
3035
|
+
function Po(e) {
|
|
3039
3036
|
let {
|
|
3040
|
-
animateLayoutChanges: t =
|
|
3037
|
+
animateLayoutChanges: t = mo,
|
|
3041
3038
|
attributes: n,
|
|
3042
3039
|
disabled: r,
|
|
3043
3040
|
data: o,
|
|
3044
|
-
getNewIndex: i =
|
|
3041
|
+
getNewIndex: i = yo,
|
|
3045
3042
|
id: s,
|
|
3046
3043
|
strategy: a,
|
|
3047
3044
|
resizeObserverConfig: l,
|
|
3048
|
-
transition: c =
|
|
3045
|
+
transition: c = wo
|
|
3049
3046
|
} = e;
|
|
3050
3047
|
const {
|
|
3051
|
-
items:
|
|
3052
|
-
containerId:
|
|
3053
|
-
activeIndex:
|
|
3048
|
+
items: u,
|
|
3049
|
+
containerId: d,
|
|
3050
|
+
activeIndex: g,
|
|
3054
3051
|
disabled: f,
|
|
3055
|
-
disableTransforms:
|
|
3056
|
-
sortedRects:
|
|
3052
|
+
disableTransforms: x,
|
|
3053
|
+
sortedRects: h,
|
|
3057
3054
|
overIndex: v,
|
|
3058
|
-
useDragOverlay:
|
|
3055
|
+
useDragOverlay: p,
|
|
3059
3056
|
strategy: y
|
|
3060
|
-
} =
|
|
3057
|
+
} = ve(xn), b = Co(r, f), D = u.indexOf(s), S = A(() => ({
|
|
3061
3058
|
sortable: {
|
|
3062
|
-
containerId:
|
|
3059
|
+
containerId: d,
|
|
3063
3060
|
index: D,
|
|
3064
|
-
items:
|
|
3061
|
+
items: u
|
|
3065
3062
|
},
|
|
3066
3063
|
...o
|
|
3067
|
-
}), [
|
|
3068
|
-
rect:
|
|
3069
|
-
node:
|
|
3070
|
-
isOver:
|
|
3071
|
-
setNodeRef:
|
|
3072
|
-
} =
|
|
3064
|
+
}), [d, o, D, u]), R = A(() => u.slice(u.indexOf(s)), [u, s]), {
|
|
3065
|
+
rect: m,
|
|
3066
|
+
node: w,
|
|
3067
|
+
isOver: N,
|
|
3068
|
+
setNodeRef: L
|
|
3069
|
+
} = eo({
|
|
3073
3070
|
id: s,
|
|
3074
|
-
data:
|
|
3075
|
-
disabled:
|
|
3071
|
+
data: S,
|
|
3072
|
+
disabled: b.droppable,
|
|
3076
3073
|
resizeObserverConfig: {
|
|
3077
|
-
updateMeasurementsFor:
|
|
3074
|
+
updateMeasurementsFor: R,
|
|
3078
3075
|
...l
|
|
3079
3076
|
}
|
|
3080
3077
|
}), {
|
|
3081
|
-
active:
|
|
3082
|
-
activatorEvent:
|
|
3083
|
-
activeNodeRect:
|
|
3084
|
-
attributes:
|
|
3078
|
+
active: O,
|
|
3079
|
+
activatorEvent: G,
|
|
3080
|
+
activeNodeRect: J,
|
|
3081
|
+
attributes: Z,
|
|
3085
3082
|
setNodeRef: Oe,
|
|
3086
|
-
listeners:
|
|
3087
|
-
isDragging:
|
|
3088
|
-
over:
|
|
3089
|
-
setActivatorNodeRef:
|
|
3090
|
-
transform:
|
|
3091
|
-
} =
|
|
3083
|
+
listeners: He,
|
|
3084
|
+
isDragging: Y,
|
|
3085
|
+
over: Ve,
|
|
3086
|
+
setActivatorNodeRef: re,
|
|
3087
|
+
transform: Ie
|
|
3088
|
+
} = _r({
|
|
3092
3089
|
id: s,
|
|
3093
|
-
data:
|
|
3090
|
+
data: S,
|
|
3094
3091
|
attributes: {
|
|
3095
|
-
...
|
|
3092
|
+
...Do,
|
|
3096
3093
|
...n
|
|
3097
3094
|
},
|
|
3098
|
-
disabled:
|
|
3099
|
-
}),
|
|
3100
|
-
rects:
|
|
3101
|
-
activeNodeRect:
|
|
3102
|
-
activeIndex:
|
|
3095
|
+
disabled: b.draggable
|
|
3096
|
+
}), qe = Bn(L, Oe), j = !!O, oe = j && !x && Ze(g) && Ze(v), pe = !p && Y, Te = pe && oe ? Ie : null, Ge = oe ? Te ?? (a ?? y)({
|
|
3097
|
+
rects: h,
|
|
3098
|
+
activeNodeRect: J,
|
|
3099
|
+
activeIndex: g,
|
|
3103
3100
|
overIndex: v,
|
|
3104
3101
|
index: D
|
|
3105
|
-
}) : null,
|
|
3102
|
+
}) : null, le = Ze(g) && Ze(v) ? i({
|
|
3106
3103
|
id: s,
|
|
3107
|
-
items:
|
|
3108
|
-
activeIndex:
|
|
3104
|
+
items: u,
|
|
3105
|
+
activeIndex: g,
|
|
3109
3106
|
overIndex: v
|
|
3110
|
-
}) : D,
|
|
3111
|
-
activeId:
|
|
3112
|
-
items:
|
|
3113
|
-
newIndex:
|
|
3114
|
-
containerId:
|
|
3115
|
-
}),
|
|
3116
|
-
active:
|
|
3117
|
-
containerId:
|
|
3118
|
-
isDragging:
|
|
3119
|
-
isSorting:
|
|
3107
|
+
}) : D, ie = O?.id, E = I({
|
|
3108
|
+
activeId: ie,
|
|
3109
|
+
items: u,
|
|
3110
|
+
newIndex: le,
|
|
3111
|
+
containerId: d
|
|
3112
|
+
}), Ne = u !== E.current.items, ee = t({
|
|
3113
|
+
active: O,
|
|
3114
|
+
containerId: d,
|
|
3115
|
+
isDragging: Y,
|
|
3116
|
+
isSorting: j,
|
|
3120
3117
|
id: s,
|
|
3121
3118
|
index: D,
|
|
3122
|
-
items:
|
|
3123
|
-
newIndex:
|
|
3124
|
-
previousItems:
|
|
3125
|
-
previousContainerId:
|
|
3119
|
+
items: u,
|
|
3120
|
+
newIndex: E.current.newIndex,
|
|
3121
|
+
previousItems: E.current.items,
|
|
3122
|
+
previousContainerId: E.current.containerId,
|
|
3126
3123
|
transition: c,
|
|
3127
|
-
wasDragging:
|
|
3128
|
-
}),
|
|
3129
|
-
disabled: !
|
|
3124
|
+
wasDragging: E.current.activeId != null
|
|
3125
|
+
}), ye = So({
|
|
3126
|
+
disabled: !ee,
|
|
3130
3127
|
index: D,
|
|
3131
|
-
node:
|
|
3132
|
-
rect:
|
|
3128
|
+
node: w,
|
|
3129
|
+
rect: m
|
|
3133
3130
|
});
|
|
3134
3131
|
return T(() => {
|
|
3135
|
-
|
|
3136
|
-
}, [
|
|
3137
|
-
if (
|
|
3132
|
+
j && E.current.newIndex !== le && (E.current.newIndex = le), d !== E.current.containerId && (E.current.containerId = d), u !== E.current.items && (E.current.items = u);
|
|
3133
|
+
}, [j, le, d, u]), T(() => {
|
|
3134
|
+
if (ie === E.current.activeId)
|
|
3138
3135
|
return;
|
|
3139
|
-
if (
|
|
3140
|
-
|
|
3136
|
+
if (ie != null && E.current.activeId == null) {
|
|
3137
|
+
E.current.activeId = ie;
|
|
3141
3138
|
return;
|
|
3142
3139
|
}
|
|
3143
|
-
const
|
|
3144
|
-
|
|
3140
|
+
const me = setTimeout(() => {
|
|
3141
|
+
E.current.activeId = ie;
|
|
3145
3142
|
}, 50);
|
|
3146
|
-
return () => clearTimeout(
|
|
3147
|
-
}, [
|
|
3148
|
-
active:
|
|
3149
|
-
activeIndex:
|
|
3150
|
-
attributes:
|
|
3151
|
-
data:
|
|
3152
|
-
rect:
|
|
3143
|
+
return () => clearTimeout(me);
|
|
3144
|
+
}, [ie]), {
|
|
3145
|
+
active: O,
|
|
3146
|
+
activeIndex: g,
|
|
3147
|
+
attributes: Z,
|
|
3148
|
+
data: S,
|
|
3149
|
+
rect: m,
|
|
3153
3150
|
index: D,
|
|
3154
|
-
newIndex:
|
|
3155
|
-
items:
|
|
3156
|
-
isOver:
|
|
3157
|
-
isSorting:
|
|
3158
|
-
isDragging:
|
|
3159
|
-
listeners:
|
|
3160
|
-
node:
|
|
3151
|
+
newIndex: le,
|
|
3152
|
+
items: u,
|
|
3153
|
+
isOver: N,
|
|
3154
|
+
isSorting: j,
|
|
3155
|
+
isDragging: Y,
|
|
3156
|
+
listeners: He,
|
|
3157
|
+
node: w,
|
|
3161
3158
|
overIndex: v,
|
|
3162
|
-
over:
|
|
3163
|
-
setNodeRef:
|
|
3164
|
-
setActivatorNodeRef:
|
|
3165
|
-
setDroppableNodeRef:
|
|
3159
|
+
over: Ve,
|
|
3160
|
+
setNodeRef: qe,
|
|
3161
|
+
setActivatorNodeRef: re,
|
|
3162
|
+
setDroppableNodeRef: L,
|
|
3166
3163
|
setDraggableNodeRef: Oe,
|
|
3167
|
-
transform:
|
|
3168
|
-
transition:
|
|
3164
|
+
transform: ye ?? Ge,
|
|
3165
|
+
transition: se()
|
|
3169
3166
|
};
|
|
3170
|
-
function
|
|
3167
|
+
function se() {
|
|
3171
3168
|
if (
|
|
3172
3169
|
// Temporarily disable transitions for a single frame to set up derived transforms
|
|
3173
|
-
|
|
3174
|
-
|
|
3170
|
+
ye || // Or to prevent items jumping to back to their "new" position when items change
|
|
3171
|
+
Ne && E.current.newIndex === D
|
|
3175
3172
|
)
|
|
3176
|
-
return
|
|
3177
|
-
if (!(
|
|
3173
|
+
return xo;
|
|
3174
|
+
if (!(pe && !ut(G) || !c) && (j || ee))
|
|
3178
3175
|
return be.Transition.toString({
|
|
3179
3176
|
...c,
|
|
3180
|
-
property:
|
|
3177
|
+
property: Dn
|
|
3181
3178
|
});
|
|
3182
3179
|
}
|
|
3183
3180
|
}
|
|
3184
|
-
function
|
|
3181
|
+
function Co(e, t) {
|
|
3185
3182
|
var n, r;
|
|
3186
3183
|
return typeof e == "boolean" ? {
|
|
3187
3184
|
draggable: e,
|
|
@@ -3192,144 +3189,17 @@ function Ko(e, t) {
|
|
|
3192
3189
|
droppable: (r = e?.droppable) != null ? r : t.droppable
|
|
3193
3190
|
};
|
|
3194
3191
|
}
|
|
3195
|
-
|
|
3196
|
-
const Nn = (...e) => e.filter(Boolean).join(" ");
|
|
3197
|
-
function In({ card: e }) {
|
|
3198
|
-
const {
|
|
3199
|
-
attributes: t,
|
|
3200
|
-
listeners: n,
|
|
3201
|
-
setNodeRef: r,
|
|
3202
|
-
transform: o,
|
|
3203
|
-
transition: i,
|
|
3204
|
-
isDragging: s
|
|
3205
|
-
} = En({ id: e.id }), a = {
|
|
3206
|
-
transform: be.Transform.toString(o),
|
|
3207
|
-
transition: i,
|
|
3208
|
-
opacity: s ? 0.5 : void 0
|
|
3209
|
-
};
|
|
3210
|
-
return /* @__PURE__ */ L.jsx("div", { ref: r, style: a, ...t, ...n, children: /* @__PURE__ */ L.jsxs(Wn, { className: "mb-2 cursor-grab active:cursor-grabbing border-border bg-card/60 hover:border-primary/40 hover:shadow-lg hover:shadow-primary/10 transition-all duration-300 group", children: [
|
|
3211
|
-
/* @__PURE__ */ L.jsxs(Hn, { className: "p-4", children: [
|
|
3212
|
-
/* @__PURE__ */ L.jsx(Un, { className: "text-sm font-medium font-mono tracking-tight text-foreground group-hover:text-primary transition-colors", children: e.title }),
|
|
3213
|
-
e.description && /* @__PURE__ */ L.jsx(Vn, { className: "text-xs text-muted-foreground font-mono", children: e.description })
|
|
3214
|
-
] }),
|
|
3215
|
-
e.badges && e.badges.length > 0 && /* @__PURE__ */ L.jsx(qn, { className: "p-4 pt-0", children: /* @__PURE__ */ L.jsx("div", { className: "flex flex-wrap gap-1", children: e.badges.map((l, c) => /* @__PURE__ */ L.jsx(en, { variant: l.variant || "default", className: "text-xs", children: l.label }, c)) }) })
|
|
3216
|
-
] }) });
|
|
3217
|
-
}
|
|
3218
|
-
function Wo({
|
|
3219
|
-
column: e,
|
|
3220
|
-
cards: t
|
|
3221
|
-
}) {
|
|
3222
|
-
const n = t || [], { setNodeRef: r } = En({
|
|
3223
|
-
id: e.id,
|
|
3224
|
-
data: {
|
|
3225
|
-
type: "column"
|
|
3226
|
-
}
|
|
3227
|
-
}), o = e.limit && n.length >= e.limit;
|
|
3228
|
-
return /* @__PURE__ */ L.jsxs(
|
|
3229
|
-
"div",
|
|
3230
|
-
{
|
|
3231
|
-
ref: r,
|
|
3232
|
-
className: Nn(
|
|
3233
|
-
"flex flex-col w-80 flex-shrink-0 rounded-lg border border-border bg-card/20 backdrop-blur-sm shadow-xl",
|
|
3234
|
-
e.className
|
|
3235
|
-
),
|
|
3236
|
-
children: [
|
|
3237
|
-
/* @__PURE__ */ L.jsx("div", { className: "p-4 border-b border-border/50 bg-muted/20", children: /* @__PURE__ */ L.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
3238
|
-
/* @__PURE__ */ L.jsx("h3", { className: "font-mono text-sm font-semibold tracking-wider text-primary/90 uppercase", children: e.title }),
|
|
3239
|
-
/* @__PURE__ */ L.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3240
|
-
/* @__PURE__ */ L.jsxs("span", { className: "font-mono text-xs text-muted-foreground", children: [
|
|
3241
|
-
n.length,
|
|
3242
|
-
e.limit && ` / ${e.limit}`
|
|
3243
|
-
] }),
|
|
3244
|
-
o && /* @__PURE__ */ L.jsx(en, { variant: "destructive", className: "text-xs", children: "Full" })
|
|
3245
|
-
] })
|
|
3246
|
-
] }) }),
|
|
3247
|
-
/* @__PURE__ */ L.jsx(Kn, { className: "flex-1 p-4", children: /* @__PURE__ */ L.jsx(
|
|
3248
|
-
Po,
|
|
3249
|
-
{
|
|
3250
|
-
items: n.map((i) => i.id),
|
|
3251
|
-
strategy: jo,
|
|
3252
|
-
children: /* @__PURE__ */ L.jsx("div", { className: "space-y-2", children: n.map((i) => /* @__PURE__ */ L.jsx(In, { card: i }, i.id)) })
|
|
3253
|
-
}
|
|
3254
|
-
) })
|
|
3255
|
-
]
|
|
3256
|
-
}
|
|
3257
|
-
);
|
|
3258
|
-
}
|
|
3259
|
-
function Go({ columns: e, onCardMove: t, className: n }) {
|
|
3260
|
-
const [r, o] = ye.useState(null), i = ye.useMemo(() => (e || []).map((p) => ({
|
|
3261
|
-
...p,
|
|
3262
|
-
cards: p.cards || []
|
|
3263
|
-
})), [e]), [s, a] = ye.useState(i);
|
|
3264
|
-
ye.useEffect(() => {
|
|
3265
|
-
a(i);
|
|
3266
|
-
}, [i]);
|
|
3267
|
-
const l = dr(
|
|
3268
|
-
cr(Ot, {
|
|
3269
|
-
activationConstraint: {
|
|
3270
|
-
distance: 8
|
|
3271
|
-
}
|
|
3272
|
-
})
|
|
3273
|
-
), c = (p) => {
|
|
3274
|
-
const { active: g } = p, v = u(g.id);
|
|
3275
|
-
o(v);
|
|
3276
|
-
}, d = (p) => {
|
|
3277
|
-
const { active: g, over: v } = p;
|
|
3278
|
-
if (o(null), !v) return;
|
|
3279
|
-
const b = g.id, y = v.id;
|
|
3280
|
-
if (b === y) return;
|
|
3281
|
-
const m = h(b), D = h(y) || f(y);
|
|
3282
|
-
if (!(!m || !D))
|
|
3283
|
-
if (m.id === D.id) {
|
|
3284
|
-
const x = [...m.cards], S = x.findIndex((R) => R.id === b), w = x.findIndex((R) => R.id === y), C = Mt(x, S, w);
|
|
3285
|
-
a(
|
|
3286
|
-
(R) => R.map(
|
|
3287
|
-
(O) => O.id === m.id ? { ...O, cards: C } : O
|
|
3288
|
-
)
|
|
3289
|
-
);
|
|
3290
|
-
} else {
|
|
3291
|
-
const x = [...m.cards], S = [...D.cards], w = x.findIndex((E) => E.id === b), R = y === D.id ? S.length : S.findIndex((E) => E.id === y), [O] = x.splice(w, 1);
|
|
3292
|
-
S.splice(R, 0, O), a(
|
|
3293
|
-
(E) => E.map((z) => z.id === m.id ? { ...z, cards: x } : z.id === D.id ? { ...z, cards: S } : z)
|
|
3294
|
-
), t && t(b, m.id, D.id, R);
|
|
3295
|
-
}
|
|
3296
|
-
}, u = ye.useCallback(
|
|
3297
|
-
(p) => {
|
|
3298
|
-
for (const g of s) {
|
|
3299
|
-
const v = g.cards.find((b) => b.id === p);
|
|
3300
|
-
if (v) return v;
|
|
3301
|
-
}
|
|
3302
|
-
return null;
|
|
3303
|
-
},
|
|
3304
|
-
[s]
|
|
3305
|
-
), h = ye.useCallback(
|
|
3306
|
-
(p) => s.find((g) => g.cards.some((v) => v.id === p)) || null,
|
|
3307
|
-
[s]
|
|
3308
|
-
), f = ye.useCallback(
|
|
3309
|
-
(p) => s.find((g) => g.id === p) || null,
|
|
3310
|
-
[s]
|
|
3311
|
-
);
|
|
3312
|
-
return /* @__PURE__ */ L.jsxs(
|
|
3313
|
-
uo,
|
|
3314
|
-
{
|
|
3315
|
-
sensors: l,
|
|
3316
|
-
collisionDetection: pr,
|
|
3317
|
-
onDragStart: c,
|
|
3318
|
-
onDragEnd: d,
|
|
3319
|
-
children: [
|
|
3320
|
-
/* @__PURE__ */ L.jsx("div", { className: Nn("flex gap-4 overflow-x-auto p-4", n), children: s.map((p) => /* @__PURE__ */ L.jsx(
|
|
3321
|
-
Wo,
|
|
3322
|
-
{
|
|
3323
|
-
column: p,
|
|
3324
|
-
cards: p.cards
|
|
3325
|
-
},
|
|
3326
|
-
p.id
|
|
3327
|
-
)) }),
|
|
3328
|
-
/* @__PURE__ */ L.jsx(Oo, { children: r ? /* @__PURE__ */ L.jsx(In, { card: r }) : null })
|
|
3329
|
-
]
|
|
3330
|
-
}
|
|
3331
|
-
);
|
|
3332
|
-
}
|
|
3192
|
+
C.Down, C.Right, C.Up, C.Left;
|
|
3333
3193
|
export {
|
|
3334
|
-
|
|
3194
|
+
be as C,
|
|
3195
|
+
To as D,
|
|
3196
|
+
dn as P,
|
|
3197
|
+
Lo as S,
|
|
3198
|
+
Ao as a,
|
|
3199
|
+
No as b,
|
|
3200
|
+
Io as c,
|
|
3201
|
+
yn as d,
|
|
3202
|
+
Po as e,
|
|
3203
|
+
Oo as u,
|
|
3204
|
+
Mo as v
|
|
3335
3205
|
};
|