fluid-dnd 2.0.2 → 2.1.1

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