fluid-dnd 2.5.0 → 2.5.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.
Files changed (43) hide show
  1. package/dist/{HandlerPublisher-DBjPMiyO.js → HandlerPublisher-CRu7xI9p.js} +1 -1
  2. package/dist/{HandlerPublisher-1MmlNkG3.cjs → HandlerPublisher-CrUNmzg-.cjs} +1 -1
  3. package/dist/core/events/changeDraggableStyles.d.ts +1 -1
  4. package/dist/core/events/dragAndDrop/dragAndDrop.d.ts +1 -1
  5. package/dist/core/events/dragAndDrop/dragAndDrop.js +1 -5
  6. package/dist/core/events/insert.d.ts +1 -1
  7. package/dist/core/events/remove.d.ts +2 -2
  8. package/dist/core/events/remove.js +4 -5
  9. package/dist/core/index.d.ts +0 -6
  10. package/dist/core/index.js +0 -7
  11. package/dist/core/positioning/usePositioning.d.ts +2 -2
  12. package/dist/core/positioning/usePositioning.js +35 -24
  13. package/dist/core/tempChildren.d.ts +2 -2
  14. package/dist/core/tempChildren.js +0 -3
  15. package/dist/core/useDraggable.js +17 -10
  16. package/dist/core/useDroppable.js +1 -3
  17. package/dist/core/utils/GetStyles.d.ts +1 -0
  18. package/dist/core/utils/GetStyles.js +3 -0
  19. package/dist/core/utils/ParseStyles.d.ts +1 -1
  20. package/dist/core/utils/ParseStyles.js +1 -1
  21. package/dist/core/utils/SetStyles.d.ts +1 -6
  22. package/dist/core/utils/SetStyles.js +1 -29
  23. package/dist/core/utils/dom/classList.d.ts +2 -2
  24. package/dist/core/utils/dom/classList.js +2 -11
  25. package/dist/index-BOqB07mI.cjs +1 -0
  26. package/dist/index-CJpjY7r7.js +1130 -0
  27. package/dist/index.cjs +1 -1
  28. package/dist/index.mjs +2 -2
  29. package/dist/{insert-Dd8savAS.js → insert--mO_a1mv.js} +6 -6
  30. package/dist/{insert-T4Y6rI_j.cjs → insert-CEcy9QNd.cjs} +1 -1
  31. package/dist/react/index.cjs +1 -1
  32. package/dist/react/index.mjs +13 -13
  33. package/dist/remove-C4YcWK2S.js +48 -0
  34. package/dist/remove-dSzXNYxs.cjs +1 -0
  35. package/dist/svelte/index.cjs +1 -1
  36. package/dist/svelte/index.mjs +3 -3
  37. package/dist/vue/index.cjs +1 -1
  38. package/dist/vue/index.mjs +3 -3
  39. package/package.json +1 -1
  40. package/dist/index-BdOAK6C7.cjs +0 -1
  41. package/dist/index-HczUoMBK.js +0 -1131
  42. package/dist/remove-BC4sUY1o.cjs +0 -1
  43. package/dist/remove-M01dmTvo.js +0 -48
@@ -0,0 +1,1130 @@
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", xt = "handler-class", Bt = "dragging", Yt = "dragging-handler-class", Xt = "dropping", ce = "grabbing", Ge = "grab", Kn = "disable-transition", J = (t, e) => t.classList.contains(e), ht = (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) => J(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, mt = (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 } = I(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
+ }, vt = (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 } = I(t);
53
+ return [e[n], n];
54
+ }, Lt = (t, e) => {
55
+ const { axis: n } = I(t);
56
+ return e[n];
57
+ }, lt = (t, e) => {
58
+ const { borderBeforeWidth: n } = I(t);
59
+ return vt(e, n);
60
+ }, Mt = (t, e) => {
61
+ const { beforeMargin: n } = I(t);
62
+ return vt(e, n);
63
+ }, le = (t, e) => {
64
+ const { beforeMargin: n } = I(t);
65
+ return vt(e, n);
66
+ }, St = (t, e) => {
67
+ const { afterMargin: n } = I(t);
68
+ return vt(e, n);
69
+ }, j = (t, e) => {
70
+ const { before: n } = I(t);
71
+ return e[n];
72
+ }, Dt = (t, e) => {
73
+ const { scrollElement: n } = I(t);
74
+ return [e[n], n];
75
+ }, ct = (t, e) => {
76
+ const { scroll: n } = I(t);
77
+ return e[n];
78
+ }, je = (t, e) => {
79
+ const { inner: n } = I(t);
80
+ return e[n];
81
+ }, zt = (t, e) => {
82
+ const { page: n } = I(t);
83
+ return e[n];
84
+ }, ue = (t, e) => {
85
+ const { offset: n } = I(t);
86
+ return e[n];
87
+ }, I = (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) => J(n, H)), ke = (t, e) => {
108
+ const n = [...e.children].filter((o) => J(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", Ot = "drag", pe = "startDrop", st = "temp-child", he = "cubic-bezier(0.2, 0, 0, 1)", wt = { height: 0, width: 0 }, dt = (t) => window.TouchEvent && t instanceof TouchEvent, K = (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 = wt) => {
126
+ !t || !K(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: u, target: d } = e;
167
+ return {
168
+ clientX: o,
169
+ clientY: r,
170
+ pageX: i,
171
+ pageY: a,
172
+ screenX: f,
173
+ screenY: u,
174
+ target: d,
175
+ offsetX: n,
176
+ offsetY: s
177
+ };
178
+ }, sn = (t) => {
179
+ if (dt(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
+ }, Pt = (t, e, n = "ease-out", s = "transform") => {
187
+ K(t) && (t.style.transitionDuration = `${e}ms`, t.style.transitionTimingFunction = `${n}`, t.style.transitionProperty = `${s}`);
188
+ }, me = (t, e, n) => {
189
+ !t || !K(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
+ K(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, u) => {
227
+ const [d] = z(i, w(t)), h = w(a), x = j(i, f) - j(i, h) + Lt(i, u), [R] = z(i, h), b = R - d, C = x / b, E = d / b, A = 0.25, v = 0.2, M = 0.8;
228
+ let N = 0;
229
+ const W = qe(t, a);
230
+ !W && C < v && C > -E ? N = o(C < 0 ? 0 : C, v) : !W && C > M && C < 1 + E && (N = r(C, M));
231
+ const $ = A * d * N;
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 = (v) => {
243
+ const M = zt(v, R), N = ct(v, window), W = je(v, window), [$] = z(v, w(h)), k = lt(v, h), U = Mt(v, h), Z = M - ue(v, n), Q = ge(h, v);
244
+ if (Z >= N - $ / 2 && Z <= N + W) {
245
+ const g = De(v, x), p = Z - j(v, s) - k - U - N - Q - g;
246
+ return E(v), p;
247
+ }
248
+ return Lt(v, o);
249
+ }, E = (v) => {
250
+ h && J(h, Bt) && v === b && r(b, x, s, o);
251
+ }, A = (v) => {
252
+ const { axis: M } = I(v);
253
+ o[M] = C(v), i(u());
254
+ };
255
+ A(Y), A(q);
256
+ }, u = () => {
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
+ }, bt = (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 += bt(Y, i, r), s += bt(q, i, r)), r && e != o && (n += bt(Y, r, e), s += bt(q, r, e)), { offsetX: n, offsetY: s };
270
+ }, dn = (t, e) => {
271
+ const n = t == null ? void 0 : t.closest(`.${xt}`);
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) - Mt(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
+ }, En = (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
+ }, vn = (t) => {
335
+ const { top: e, left: n } = getComputedStyle(t);
336
+ return [Ht(e), Ht(n)];
337
+ }, jt = (t, e) => {
338
+ const { gap: n } = I(e);
339
+ return En(t, n);
340
+ }, Tn = (t, e) => {
341
+ const [n, s] = jt(t, e);
342
+ return s ? n : 0;
343
+ }, Ee = (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) => K(t) ? t.classList.contains(st) : !1;
352
+ function At(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 mt(t, s) && e == Ot && (i = 0, a = 0), { height: i, width: a };
360
+ }
361
+ const Cn = (t, e, n, s) => {
362
+ const o = St(t, e), r = Mt(t, e), i = Mt(t, s), [a, f] = jt(e.parentElement, t), [u] = z(t, w(e));
363
+ if (f)
364
+ return ee(u, 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(u, 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 = St(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", ve = "cubic-bezier(0.2, 0, 0, 1)", Te = 50, Ce = "width, min-width, height", xn = (t, e, n) => {
382
+ let s = At(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 = wt) => {
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 } = I(e);
396
+ return t[n] - t[s];
397
+ }, wn = (t, e, n) => {
398
+ const [s] = Dt(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] = Dt(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 u = t.tagName == "LI" ? "DIV" : t.tagName, d = document.createElement(u);
410
+ rt(d, st), ut(d);
411
+ const h = xn(o, t, a);
412
+ return Pt(
413
+ d,
414
+ f,
415
+ ve,
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), Ee(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
+ Pt(t, 0, ve, 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 u;
452
+ (u = i.parentNode) == null || u.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: u, value: d } = f;
470
+ r({ index: u, value: e(d, s) });
471
+ },
472
+ onInsertEvent: (f, u) => o(f, e(u, 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) => mt(e, s));
506
+ }
507
+ isNotInsideAnotherDroppable(e, n) {
508
+ return !mt(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 ? (K(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 } = I(t), s = lt(t, e), o = vt(e, n), r = Lt(t, w(e));
545
+ return s + o + r;
546
+ }, In = (t, e) => {
547
+ const [n, s] = vn(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 u = 0, d = 0;
552
+ const h = !!(n < 0 && f);
553
+ if (n === s && !h)
554
+ return oe(
555
+ { height: u, 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
+ u += m, d += p;
570
+ }
571
+ const [E, A] = jt(a, t), [v, M, N] = 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
+ E,
581
+ A,
582
+ t
583
+ ), U = Gn(
584
+ $,
585
+ W,
586
+ k,
587
+ M,
588
+ v,
589
+ E
590
+ ), [Z] = Dt(t, a), Q = h ? Z : $n(a, r, t), g = (C ? U - N : N - U) - Q;
591
+ return t === q ? u += g : t === Y && (d += g), oe(
592
+ { height: u, width: d },
593
+ t,
594
+ o,
595
+ i,
596
+ h
597
+ );
598
+ }
599
+ const $n = (t, e, n) => {
600
+ const [s] = Dt(n, t), [o] = Dt(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 u = o ? t.slice(r + 1, i + 1) : t.slice(r, i);
608
+ return r < 0 && s && (u = t.slice(r + 1, i)), [a, f, u, o];
609
+ }, Yn = (t, e, n, s) => {
610
+ if (t.length == 0)
611
+ return [0, 0, 0];
612
+ const o = St(s, t[0]);
613
+ let r = 0, i = -o;
614
+ for (const [a, f] of t.entries()) {
615
+ const [u] = z(s, w(f)), d = le(s, f);
616
+ n && (r += d), n && a > 0 ? r += e : r = Math.max(r, d), i += r + u, r = St(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 = St(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 = (u) => {
639
+ n(), i(u, !1), _t(u), u.style.top = "", u.style.left = "", Se(u, {
640
+ fixedHeight: "",
641
+ fixedWidth: ""
642
+ });
643
+ }, i = (u, d) => {
644
+ ht(u, Bt, d), a(d, u), e.toggleGrabClass(!d);
645
+ }, a = (u, d) => {
646
+ const h = d.querySelector(s);
647
+ ht(document.body, ce, u), ht(h || d, Yt, u);
648
+ };
649
+ return [r, i, (u, d) => {
650
+ Pt(u, o, he), it(u, 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: u } = t, [d, h, x] = _n(t, o, r), R = (g, p, m, y) => {
656
+ const O = At(g, p, y.direction, m);
657
+ C(g, p, O, m, y);
658
+ }, b = (g, p, m, y, O) => {
659
+ if (!m)
660
+ return;
661
+ const { droppable: T, scroll: B, config: L } = m, S = At(g, p, L.direction, T);
662
+ v(
663
+ g,
664
+ p,
665
+ S,
666
+ y,
667
+ T,
668
+ B,
669
+ L,
670
+ O
671
+ );
672
+ }, C = (g, p, m, y, O) => {
673
+ const [T] = Nt(g, y), B = mt(g, y), { direction: L } = O;
674
+ T.length == 0 && A(m, 1, L, T);
675
+ for (const [S, F] of T.entries()) {
676
+ if (!J(F, H))
677
+ continue;
678
+ const G = E(L, g, F, m);
679
+ if (!B && G)
680
+ m = G;
681
+ else if (!B)
682
+ continue;
683
+ const et = T.length - S;
684
+ A(m, et, L, T), p === fe ? it(F, m) : p === Ot && x(F, m);
685
+ }
686
+ }, E = (g, p, m, y) => {
687
+ const O = w(p), T = w(m), B = j(g, O), L = j(g, T), [S] = z(g, T), F = L + S / 2, G = Lt(g, _e(m)), et = F - G;
688
+ return B > et ? wt : y;
689
+ }, A = (g, p, m, y) => {
690
+ const O = y.filter((B) => J(B, H)).length, [T] = z(m, g);
691
+ T == 0 ? i = Math.max(i, p) : i = Math.min(i, p - 1), i = Math.min(i, O);
692
+ }, v = (g, p, m, y, O, T, B, L) => {
693
+ const [S, F] = Nt(g, O), G = S.toReversed(), et = F === -1 ? G.length : F;
694
+ G.splice(et, 0, g);
695
+ const [Rt, Tt, gt] = M(
696
+ g,
697
+ F,
698
+ G,
699
+ O
700
+ );
701
+ m = At(
702
+ g,
703
+ p,
704
+ B.direction,
705
+ n,
706
+ Rt,
707
+ Tt
708
+ );
709
+ const Ft = Xe(), Ct = Nn(
710
+ B.direction,
711
+ G,
712
+ F,
713
+ gt,
714
+ Ft,
715
+ T,
716
+ y,
717
+ O,
718
+ g
719
+ );
720
+ S.length == 0 && N(void 0, m, g, Ct);
721
+ for (const [It, ft] of S.toReversed().entries()) {
722
+ let yt = m;
723
+ gt - 1 >= It && (yt = wt), p === pe && !J(ft, st) && N(ft, yt, g, Ct);
724
+ }
725
+ W(gt, g, B, O, L);
726
+ }, M = (g, p, m, y) => {
727
+ const T = mt(g, y) ? p : i, B = () => p < T ? [T, T + 1] : p > T ? [T - 1, T] : [T - 1, T + 1], [L, S] = B(), F = m[L] ?? null, G = m[S] ?? null;
728
+ return [F, G, T];
729
+ }, N = (g, p, m, y) => {
730
+ it(g, p), it(m, y);
731
+ }, W = (g, p, m, y, O) => {
732
+ const { onInsertEvent: T, onDragEnd: B } = m;
733
+ rt(p, Xt), U(p, n, y, () => {
734
+ if (Ut(p, Xt), O != null) {
735
+ const L = a(O, !0);
736
+ L != null && (T(g, L, !0), B({ value: L, index: g })), k(p), $();
737
+ }
738
+ });
739
+ }, $ = () => {
740
+ if (s) {
741
+ var g = document.querySelectorAll(
742
+ `${at(s)} > .${H}`
743
+ );
744
+ for (const p of g)
745
+ _t(p);
746
+ }
747
+ }, k = (g) => {
748
+ setTimeout(() => {
749
+ Ut(g, u);
750
+ }, Hn);
751
+ }, U = (g, p, m, y) => {
752
+ setTimeout(() => {
753
+ y && y(), Z(p, m), Q(m), d(g), tt(g, p), tt(g, m);
754
+ }, f);
755
+ }, Z = (g, p) => {
756
+ P(g, p) ? Gt(g, f) : (Gt(g, f, !0), Gt(p, f));
757
+ }, Q = (g) => {
758
+ if (!P(n, g)) {
759
+ var [p] = n.querySelectorAll(`.${st}`);
760
+ p && K(p) && (p.style.height = "0px", p.style.width = "0px");
761
+ }
762
+ }, tt = (g, p) => {
763
+ const [m] = Nt(g, p);
764
+ for (const y of [...m, g])
765
+ _t(y);
766
+ };
767
+ return [R, b, h];
768
+ }
769
+ const re = "onmousedown";
770
+ function zn(t, e, n, s, o) {
771
+ const {
772
+ handlerSelector: r,
773
+ isDraggable: i,
774
+ droppableGroup: a,
775
+ animationDuration: f,
776
+ draggingClass: u,
777
+ droppableClass: d,
778
+ onDragStart: h,
779
+ delayBeforeTouchMoveEvent: x,
780
+ coordinateTransform: R
781
+ } = n, b = Et(a).map((c) => `droppable-group-${c}`).join(" ");
782
+ let C = 0, E = {
783
+ scrollX: 0,
784
+ scrollY: 0
785
+ }, A = { pageX: 0, pageY: 0 }, v, M;
786
+ const [N, W] = pn(
787
+ t,
788
+ R
789
+ ), $ = () => {
790
+ C = 0;
791
+ }, [k, U, Z] = qn(
792
+ n,
793
+ e,
794
+ s,
795
+ b,
796
+ o,
797
+ $
798
+ ), Q = () => {
799
+ rt(t, H);
800
+ }, tt = (c) => {
801
+ rt(c, xt), o.addSubscriber(c);
802
+ }, g = () => {
803
+ if (i(t)) {
804
+ const c = t.querySelector(r);
805
+ tt(c || t);
806
+ }
807
+ }, p = () => {
808
+ g(), Q();
809
+ }, m = (c) => {
810
+ const l = c == null ? void 0 : c.querySelector(`.${xt}`), D = l == null ? void 0 : l.parentElement;
811
+ return l && D && J(D, Vt) && !P(s, D) ? null : l;
812
+ }, y = (c) => {
813
+ const l = m(c) ?? c;
814
+ l && i(c) && ($t(l, re, ft("mousemove", "mouseup")), $t(
815
+ l,
816
+ "ontouchstart",
817
+ ft("touchmove", "touchend"),
818
+ (D) => {
819
+ const V = D.touches[0];
820
+ M = {
821
+ x: V.clientX,
822
+ y: V.clientY
823
+ };
824
+ }
825
+ ), O(l)), P(c, l) || $t(c, re, yt), rt(s, Vt);
826
+ }, O = (c) => {
827
+ const l = c.querySelectorAll("img");
828
+ Array.from(l).forEach((D) => {
829
+ D.onmousedown = () => !1;
830
+ });
831
+ }, T = () => {
832
+ if (A.pageX == 0 && A.pageY == 0 || !S.current)
833
+ return;
834
+ const { droppable: c, config: l } = S.current;
835
+ N(t, c, A, l.direction), k(t, Ot, c, l);
836
+ }, B = (c) => {
837
+ const l = c.querySelectorAll(`.${H}`);
838
+ for (const D of l)
839
+ it(D);
840
+ }, L = (c, l) => {
841
+ l && C == 2 && !P(c == null ? void 0 : c.droppable, l.droppable) && (k(
842
+ t,
843
+ Ot,
844
+ l.droppable,
845
+ l.config
846
+ ), B(l.droppable));
847
+ }, S = new Fn(
848
+ t,
849
+ b,
850
+ s,
851
+ T,
852
+ L,
853
+ n.mapFrom
854
+ ), F = (c) => {
855
+ if (!S.current)
856
+ return;
857
+ const l = b ? Array.from(document.querySelectorAll(at(b))) : [s];
858
+ for (const D of l)
859
+ D.classList.toggle(
860
+ d,
861
+ !c && P(D, S.current.droppable)
862
+ );
863
+ }, G = (c, l = !1) => {
864
+ S.updateConfig(c);
865
+ const D = S.isOutside(c);
866
+ F(D), C === 1 && !l ? Zt(c) : C === 2 && (et(D), Oe(c));
867
+ }, et = (c = !0) => {
868
+ if (!S.current)
869
+ return;
870
+ const { droppable: l } = S.current;
871
+ Pn(l, s, b, f, c), !c && ne(
872
+ t,
873
+ s,
874
+ C == 1,
875
+ S.current
876
+ );
877
+ }, Rt = (c) => {
878
+ if (dt(c) && M && C == 1) {
879
+ const l = c.touches[0], D = Math.abs(l.clientX - M.x), V = Math.abs(l.clientY - M.y);
880
+ if (Math.abs(D) > 5 && Math.abs(V) > 5)
881
+ return clearTimeout(v), !1;
882
+ }
883
+ return !0;
884
+ }, Tt = (c) => {
885
+ clearTimeout(v);
886
+ const l = Wt(c);
887
+ if (dt(c) && c.cancelable && C == 2 && c.preventDefault(), dt(c) && !c.cancelable || !Rt(c)) {
888
+ kt("touchmove", c);
889
+ return;
890
+ }
891
+ G(l, dt(c));
892
+ }, gt = (c, l) => {
893
+ c == "touchmove" ? v = setTimeout(() => {
894
+ l();
895
+ }, x) : l();
896
+ }, Ft = (c, l) => {
897
+ const { clientX: D, clientY: V } = c, nt = document.elementFromPoint(D, V), pt = nt == null ? void 0 : nt.closest(`.${H}`);
898
+ return pt && P(l, pt);
899
+ }, Ct = (c) => {
900
+ const l = n.onGetValue(e);
901
+ return { index: e, element: c, value: l };
902
+ }, It = (c) => {
903
+ S.updateConfig(c), F(S.isOutside(c)), Zt(c);
904
+ }, ft = (c, l) => (D) => {
905
+ if (!Ft(D, t))
906
+ return;
907
+ ot.updateScrolls(s, b);
908
+ const { scrollX: V, scrollY: nt } = window;
909
+ if (E = { scrollX: V, scrollY: nt }, C === 0) {
910
+ C = 1;
911
+ const pt = Ct(t);
912
+ pt && h(pt), gt(c, () => {
913
+ c == "touchmove" && It(D);
914
+ }), document.addEventListener(c, Tt, {
915
+ passive: !1
916
+ }), we(s), document.addEventListener(l, Ae(c), {
917
+ once: !0
918
+ });
919
+ }
920
+ }, yt = (c) => S.updateConfig(c), Ae = (c) => (l) => {
921
+ kt(c, l);
922
+ }, kt = (c, l) => {
923
+ F(!0);
924
+ const D = Wt(l);
925
+ Le(S.isOutside(D)), clearTimeout(v), document.removeEventListener(c, Tt), S.updateConfig(D);
926
+ const V = S.getCurrentConfig(D);
927
+ if (V) {
928
+ const { droppable: nt } = V;
929
+ xe(nt);
930
+ }
931
+ s.onscroll = null, $();
932
+ }, xe = (c) => {
933
+ if (c.onscroll = null, !b)
934
+ return;
935
+ const l = Array.from(
936
+ document.querySelectorAll(at(b))
937
+ );
938
+ for (const D of l)
939
+ K(D) && (D.onscroll = null);
940
+ }, Zt = (c) => {
941
+ S.current && ne(
942
+ t,
943
+ s,
944
+ C == 1,
945
+ S.current
946
+ ), Me(), S.current && k(
947
+ t,
948
+ fe,
949
+ S.current.droppable,
950
+ S.current.config
951
+ ), Re(t), W(c, t);
952
+ }, Me = () => {
953
+ C = 2;
954
+ }, Oe = (c) => {
955
+ const { pageX: l, pageY: D } = c;
956
+ A = { pageX: l, pageY: D }, T();
957
+ }, we = (c) => me(c, "onscroll", Be), Be = () => T(), Le = (c) => {
958
+ if (C !== 2 && C !== 1) {
959
+ $();
960
+ return;
961
+ }
962
+ C = 3, Pe(t), t.classList.contains(Bt) && U(
963
+ t,
964
+ pe,
965
+ c ? S.initial : S.current,
966
+ E,
967
+ e
968
+ );
969
+ }, Pe = (c) => {
970
+ Pt(c, f, he), it(c);
971
+ }, Re = (c) => {
972
+ const { height: l, width: D } = w(c);
973
+ Se(c, {
974
+ fixedHeight: `${l}px`,
975
+ fixedWidth: `${D}px`
976
+ }), Z(c, !0), ht(c, u, !0), c.style.transition = "";
977
+ }, Fe = (c) => {
978
+ import("./remove-C4YcWK2S.js").then((l) => {
979
+ const [D] = l.default(n, s, o, $);
980
+ S.initial && D(e, c, t, S.initial);
981
+ });
982
+ }, Ie = (c, l) => {
983
+ (c === e || c === n.onGetLegth() && e === c - 1) && import("./insert--mO_a1mv.js").then((D) => {
984
+ const [V] = D.default(
985
+ n,
986
+ s,
987
+ o,
988
+ $
989
+ );
990
+ S.initial && V(
991
+ c,
992
+ t,
993
+ s,
994
+ l,
995
+ S.initial
996
+ );
997
+ });
998
+ };
999
+ return p(), y(t), [Fe, Ie];
1000
+ }
1001
+ const jn = (t, e) => {
1002
+ t && Ye(e, t);
1003
+ }, kn = () => {
1004
+ an(document.body, [
1005
+ `.${H}{touch-action:manipulation;user-select:none;box-sizing:border-box!important;-webkit-user-select:none;}`,
1006
+ `.${xt}{pointer-events:auto!important;}`,
1007
+ `.${Ge}{cursor:grab;}`,
1008
+ ".temp-child{touch-action:none;pointer-events:none;box-sizing:border-box!important;}",
1009
+ ".droppable{box-sizing:border-box!important;}",
1010
+ `.${Bt}{position:fixed;z-index:5000;width:var(--fixedWidth)!important;height:var(--fixedHeight)!important;}`,
1011
+ `.${Yt}{pointer-events:none!important;}`,
1012
+ `.${Xt}{pointer-events:none!important;}`,
1013
+ `.${ce}{cursor:grabbing;}`,
1014
+ ".disable-transition{transition:none!important;}"
1015
+ ]);
1016
+ };
1017
+ function Zn(t, e, n, s = "index") {
1018
+ const o = s;
1019
+ let r = [], i = [];
1020
+ const { droppableGroup: a } = t;
1021
+ if (!n)
1022
+ return [r, i];
1023
+ const f = Et(a).map((u) => `droppable-group-${u}`).join(" ");
1024
+ kn(), jn(f, n);
1025
+ for (const u of n.children) {
1026
+ const d = u.getAttribute(o), h = We(d), x = u;
1027
+ if (x && h >= 0) {
1028
+ const [R, b] = zn(
1029
+ x,
1030
+ h,
1031
+ t,
1032
+ n,
1033
+ e
1034
+ );
1035
+ r.push(R), i.push(b);
1036
+ }
1037
+ }
1038
+ return [r, i];
1039
+ }
1040
+ const Un = (t, e) => {
1041
+ const n = (a, f) => t.removeAtEvent(a, f), s = (a, f, u) => t.insertEvent(a, f, u), o = () => t.getLength(), r = (a) => t.getValue(a), i = (a) => a;
1042
+ return {
1043
+ direction: (e == null ? void 0 : e.direction) ?? q,
1044
+ handlerSelector: (e == null ? void 0 : e.handlerSelector) ?? H,
1045
+ draggingClass: (e == null ? void 0 : e.draggingClass) ?? "dragging",
1046
+ droppableClass: (e == null ? void 0 : e.droppableClass) ?? "droppable-hover",
1047
+ isDraggable: (e == null ? void 0 : e.isDraggable) ?? (() => !0),
1048
+ onDragStart: (e == null ? void 0 : e.onDragStart) ?? (() => {
1049
+ }),
1050
+ onDragEnd: (e == null ? void 0 : e.onDragEnd) ?? (() => {
1051
+ }),
1052
+ droppableGroup: e == null ? void 0 : e.droppableGroup,
1053
+ onRemoveAtEvent: n,
1054
+ onInsertEvent: s,
1055
+ onGetLegth: o,
1056
+ onGetValue: r,
1057
+ animationDuration: (e == null ? void 0 : e.animationDuration) ?? 200,
1058
+ removingClass: (e == null ? void 0 : e.removingClass) ?? "removing",
1059
+ insertingFromClass: (e == null ? void 0 : e.insertingFromClass) ?? "from-inserting",
1060
+ delayBeforeRemove: (e == null ? void 0 : e.delayBeforeRemove) ?? 200,
1061
+ delayBeforeInsert: (e == null ? void 0 : e.delayBeforeInsert) ?? 200,
1062
+ mapFrom: (e == null ? void 0 : e.mapFrom) ?? i,
1063
+ delayBeforeTouchMoveEvent: (e == null ? void 0 : e.delayBeforeTouchMoveEvent) ?? 150,
1064
+ coordinateTransform: (e == null ? void 0 : e.coordinateTransform) ?? [(a) => a]
1065
+ };
1066
+ };
1067
+ function es(t, e, n, s = "index") {
1068
+ let o = [], r = [], i;
1069
+ const a = Un(t, n), f = (E) => {
1070
+ for (const A of o)
1071
+ A(E);
1072
+ }, u = (E, A) => {
1073
+ if (a.onGetLegth() === 0)
1074
+ t.insertToListEmpty(a, E, A);
1075
+ else
1076
+ for (const M of r)
1077
+ M(E, A);
1078
+ }, d = (E) => {
1079
+ const [A, v] = Zn(
1080
+ a,
1081
+ e,
1082
+ E,
1083
+ s
1084
+ );
1085
+ o = A, r = v;
1086
+ }, h = (E) => {
1087
+ const A = E.addedNodes.values().filter((M) => !te(M)).toArray(), v = E.removedNodes.values().filter((M) => !te(M)).toArray();
1088
+ return A.length > 0 || v.length > 0;
1089
+ }, x = (E) => {
1090
+ i = Ee(
1091
+ () => {
1092
+ d(E);
1093
+ },
1094
+ E,
1095
+ { childList: !0 },
1096
+ h
1097
+ );
1098
+ }, R = (E) => {
1099
+ rt(E, Vt);
1100
+ }, b = (E) => {
1101
+ ot.addConfig(E, a);
1102
+ };
1103
+ return [f, u, (E) => {
1104
+ if (E)
1105
+ return R(E), b(E), x(E), d(E), ot.removeObsoleteConfigs(), i;
1106
+ }];
1107
+ }
1108
+ export {
1109
+ H as D,
1110
+ Ge as G,
1111
+ rt as a,
1112
+ ne as b,
1113
+ At as c,
1114
+ he as d,
1115
+ Gt as e,
1116
+ _t as f,
1117
+ Nt as g,
1118
+ Qn as h,
1119
+ J as i,
1120
+ ts as j,
1121
+ Kn as k,
1122
+ te as l,
1123
+ it as m,
1124
+ es as n,
1125
+ Ee as o,
1126
+ Ut as r,
1127
+ Pt as s,
1128
+ ht as t,
1129
+ _n as u
1130
+ };