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