fluid-dnd 1.3.0-beta.0 → 1.3.1-beta.0

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