@clevertask/react-sortable-tree 0.0.1 → 0.0.3

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.
@@ -1,5 +1,5 @@
1
- import { jsx as _, jsxs as fn } from "react/jsx-runtime";
2
- import j, { useMemo as T, useLayoutEffect as Qn, useEffect as k, useRef as z, useCallback as $, useState as V, createContext as Ke, memo as ut, useReducer as Nt, useContext as we, cloneElement as er, forwardRef as dt } from "react";
1
+ import { jsx as $, jsxs as fn } from "react/jsx-runtime";
2
+ import F, { useMemo as T, useLayoutEffect as Qn, useEffect as P, useRef as k, useCallback as z, useState as V, createContext as Ke, memo as ut, useReducer as Nt, useContext as De, cloneElement as er, forwardRef as dt } from "react";
3
3
  import { unstable_batchedUpdates as je, createPortal as gn } from "react-dom";
4
4
  function tr() {
5
5
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
@@ -13,7 +13,7 @@ function tr() {
13
13
  );
14
14
  }
15
15
  const ft = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
16
- function Ne(e) {
16
+ function Me(e) {
17
17
  const t = Object.prototype.toString.call(e);
18
18
  return t === "[object Window]" || // In Electron context the Window object serializes to [object global]
19
19
  t === "[object global]";
@@ -21,53 +21,53 @@ function Ne(e) {
21
21
  function Lt(e) {
22
22
  return "nodeType" in e;
23
23
  }
24
- function G(e) {
24
+ function J(e) {
25
25
  var t, n;
26
- return e ? Ne(e) ? e : Lt(e) && (t = (n = e.ownerDocument) == null ? void 0 : n.defaultView) != null ? t : window : window;
26
+ return e ? Me(e) ? e : Lt(e) && (t = (n = e.ownerDocument) == null ? void 0 : n.defaultView) != null ? t : window : window;
27
27
  }
28
28
  function Pt(e) {
29
29
  const {
30
30
  Document: t
31
- } = G(e);
31
+ } = J(e);
32
32
  return e instanceof t;
33
33
  }
34
34
  function Ue(e) {
35
- return Ne(e) ? !1 : e instanceof G(e).HTMLElement;
35
+ return Me(e) ? !1 : e instanceof J(e).HTMLElement;
36
36
  }
37
37
  function hn(e) {
38
- return e instanceof G(e).SVGElement;
38
+ return e instanceof J(e).SVGElement;
39
39
  }
40
- function Le(e) {
41
- return e ? Ne(e) ? e.document : Lt(e) ? Pt(e) ? e : Ue(e) || hn(e) ? e.ownerDocument : document : document : document;
40
+ function Ne(e) {
41
+ return e ? Me(e) ? e.document : Lt(e) ? Pt(e) ? e : Ue(e) || hn(e) ? e.ownerDocument : document : document : document;
42
42
  }
43
- const ie = ft ? Qn : k;
43
+ const ie = ft ? Qn : P;
44
44
  function gt(e) {
45
- const t = z(e);
45
+ const t = k(e);
46
46
  return ie(() => {
47
47
  t.current = e;
48
- }), $(function() {
48
+ }), z(function() {
49
49
  for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
50
50
  r[o] = arguments[o];
51
51
  return t.current == null ? void 0 : t.current(...r);
52
52
  }, []);
53
53
  }
54
54
  function nr() {
55
- const e = z(null), t = $((r, o) => {
55
+ const e = k(null), t = z((r, o) => {
56
56
  e.current = setInterval(r, o);
57
- }, []), n = $(() => {
57
+ }, []), n = z(() => {
58
58
  e.current !== null && (clearInterval(e.current), e.current = null);
59
59
  }, []);
60
60
  return [t, n];
61
61
  }
62
62
  function Ye(e, t) {
63
63
  t === void 0 && (t = [e]);
64
- const n = z(e);
64
+ const n = k(e);
65
65
  return ie(() => {
66
66
  n.current !== e && (n.current = e);
67
67
  }, t), n;
68
68
  }
69
69
  function We(e, t) {
70
- const n = z();
70
+ const n = k();
71
71
  return T(
72
72
  () => {
73
73
  const r = e(n.current);
@@ -78,7 +78,7 @@ function We(e, t) {
78
78
  );
79
79
  }
80
80
  function ot(e) {
81
- const t = gt(e), n = z(null), r = $(
81
+ const t = gt(e), n = k(null), r = z(
82
82
  (o) => {
83
83
  o !== n.current && (t == null || t(o, n.current)), n.current = o;
84
84
  },
@@ -88,8 +88,8 @@ function ot(e) {
88
88
  return [n, r];
89
89
  }
90
90
  function it(e) {
91
- const t = z();
92
- return k(() => {
91
+ const t = k();
92
+ return P(() => {
93
93
  t.current = e;
94
94
  }, [e]), t.current;
95
95
  }
@@ -127,7 +127,7 @@ function ht(e) {
127
127
  return !1;
128
128
  const {
129
129
  KeyboardEvent: t
130
- } = G(e.target);
130
+ } = J(e.target);
131
131
  return t && e instanceof t;
132
132
  }
133
133
  function or(e) {
@@ -135,7 +135,7 @@ function or(e) {
135
135
  return !1;
136
136
  const {
137
137
  TouchEvent: t
138
- } = G(e.target);
138
+ } = J(e.target);
139
139
  return t && e instanceof t;
140
140
  }
141
141
  function at(e) {
@@ -165,7 +165,7 @@ function at(e) {
165
165
  y: e.clientY
166
166
  } : null;
167
167
  }
168
- const ge = /* @__PURE__ */ Object.freeze({
168
+ const he = /* @__PURE__ */ Object.freeze({
169
169
  Translate: {
170
170
  toString(e) {
171
171
  if (!e)
@@ -191,7 +191,7 @@ const ge = /* @__PURE__ */ Object.freeze({
191
191
  Transform: {
192
192
  toString(e) {
193
193
  if (e)
194
- return [ge.Translate.toString(e), ge.Scale.toString(e)].join(" ");
194
+ return [he.Translate.toString(e), he.Scale.toString(e)].join(" ");
195
195
  }
196
196
  },
197
197
  Transition: {
@@ -216,7 +216,7 @@ function ar(e) {
216
216
  id: t,
217
217
  value: n
218
218
  } = e;
219
- return j.createElement("div", {
219
+ return F.createElement("div", {
220
220
  id: t,
221
221
  style: sr
222
222
  }, n);
@@ -239,7 +239,7 @@ function lr(e) {
239
239
  clipPath: "inset(100%)",
240
240
  whiteSpace: "nowrap"
241
241
  };
242
- return j.createElement("div", {
242
+ return F.createElement("div", {
243
243
  id: t,
244
244
  style: o,
245
245
  role: "status",
@@ -250,7 +250,7 @@ function lr(e) {
250
250
  function cr() {
251
251
  const [e, t] = V("");
252
252
  return {
253
- announce: $((r) => {
253
+ announce: z((r) => {
254
254
  r != null && t(r);
255
255
  }, []),
256
256
  announcement: e
@@ -258,16 +258,16 @@ function cr() {
258
258
  }
259
259
  const vn = /* @__PURE__ */ Ke(null);
260
260
  function ur(e) {
261
- const t = we(vn);
262
- k(() => {
261
+ const t = De(vn);
262
+ P(() => {
263
263
  if (!t)
264
264
  throw new Error("useDndMonitor must be used within a children of <DndContext>");
265
265
  return t(e);
266
266
  }, [e, t]);
267
267
  }
268
268
  function dr() {
269
- const [e] = V(() => /* @__PURE__ */ new Set()), t = $((r) => (e.add(r), () => e.delete(r)), [e]);
270
- return [$((r) => {
269
+ const [e] = V(() => /* @__PURE__ */ new Set()), t = z((r) => (e.add(r), () => e.delete(r)), [e]);
270
+ return [z((r) => {
271
271
  let {
272
272
  type: o,
273
273
  event: i
@@ -323,63 +323,63 @@ function hr(e) {
323
323
  announce: i,
324
324
  announcement: s
325
325
  } = cr(), a = Je("DndLiveRegion"), [l, c] = V(!1);
326
- if (k(() => {
326
+ if (P(() => {
327
327
  c(!0);
328
328
  }, []), ur(T(() => ({
329
329
  onDragStart(d) {
330
330
  let {
331
- active: f
331
+ active: h
332
332
  } = d;
333
333
  i(t.onDragStart({
334
- active: f
334
+ active: h
335
335
  }));
336
336
  },
337
337
  onDragMove(d) {
338
338
  let {
339
- active: f,
340
- over: h
339
+ active: h,
340
+ over: f
341
341
  } = d;
342
342
  t.onDragMove && i(t.onDragMove({
343
- active: f,
344
- over: h
343
+ active: h,
344
+ over: f
345
345
  }));
346
346
  },
347
347
  onDragOver(d) {
348
348
  let {
349
- active: f,
350
- over: h
349
+ active: h,
350
+ over: f
351
351
  } = d;
352
352
  i(t.onDragOver({
353
- active: f,
354
- over: h
353
+ active: h,
354
+ over: f
355
355
  }));
356
356
  },
357
357
  onDragEnd(d) {
358
358
  let {
359
- active: f,
360
- over: h
359
+ active: h,
360
+ over: f
361
361
  } = d;
362
362
  i(t.onDragEnd({
363
- active: f,
364
- over: h
363
+ active: h,
364
+ over: f
365
365
  }));
366
366
  },
367
367
  onDragCancel(d) {
368
368
  let {
369
- active: f,
370
- over: h
369
+ active: h,
370
+ over: f
371
371
  } = d;
372
372
  i(t.onDragCancel({
373
- active: f,
374
- over: h
373
+ active: h,
374
+ over: f
375
375
  }));
376
376
  }
377
377
  }), [i, t])), !l)
378
378
  return null;
379
- const u = j.createElement(j.Fragment, null, j.createElement(ar, {
379
+ const u = F.createElement(F.Fragment, null, F.createElement(ar, {
380
380
  id: r,
381
381
  value: o.draggable
382
- }), j.createElement(lr, {
382
+ }), F.createElement(lr, {
383
383
  id: a,
384
384
  announcement: s
385
385
  }));
@@ -519,7 +519,7 @@ const mr = (e) => {
519
519
  id: a
520
520
  } = s, l = n.get(a);
521
521
  if (l) {
522
- const c = Zt(l), u = o.reduce((f, h, b) => f + bn(c[b], h), 0), d = Number((u / 4).toFixed(4));
522
+ const c = Zt(l), u = o.reduce((h, f, m) => h + bn(c[m], f), 0), d = Number((u / 4).toFixed(4));
523
523
  i.push({
524
524
  id: a,
525
525
  data: {
@@ -634,14 +634,14 @@ function Ir(e, t, n) {
634
634
  const Rr = {
635
635
  ignoreTransform: !1
636
636
  };
637
- function Pe(e, t) {
637
+ function Le(e, t) {
638
638
  t === void 0 && (t = Rr);
639
639
  let n = e.getBoundingClientRect();
640
640
  if (t.ignoreTransform) {
641
641
  const {
642
642
  transform: c,
643
643
  transformOrigin: u
644
- } = G(e).getComputedStyle(e);
644
+ } = J(e).getComputedStyle(e);
645
645
  c && (n = Ir(n, c, u));
646
646
  }
647
647
  const {
@@ -662,7 +662,7 @@ function Pe(e, t) {
662
662
  };
663
663
  }
664
664
  function en(e) {
665
- return Pe(e, {
665
+ return Le(e, {
666
666
  ignoreTransform: !0
667
667
  });
668
668
  }
@@ -678,10 +678,10 @@ function Er(e) {
678
678
  };
679
679
  }
680
680
  function Or(e, t) {
681
- return t === void 0 && (t = G(e).getComputedStyle(e)), t.position === "fixed";
681
+ return t === void 0 && (t = J(e).getComputedStyle(e)), t.position === "fixed";
682
682
  }
683
- function Tr(e, t) {
684
- t === void 0 && (t = G(e).getComputedStyle(e));
683
+ function Ar(e, t) {
684
+ t === void 0 && (t = J(e).getComputedStyle(e));
685
685
  const n = /(auto|scroll|overlay)/;
686
686
  return ["overflow", "overflowX", "overflowY"].some((o) => {
687
687
  const i = t[o];
@@ -697,8 +697,8 @@ function kt(e, t) {
697
697
  return n.push(o.scrollingElement), n;
698
698
  if (!Ue(o) || hn(o) || n.includes(o))
699
699
  return n;
700
- const i = G(e).getComputedStyle(o);
701
- return o !== e && Tr(o, i) && n.push(o), Or(o, i) ? n : r(o.parentNode);
700
+ const i = J(e).getComputedStyle(o);
701
+ return o !== e && Ar(o, i) && n.push(o), Or(o, i) ? n : r(o.parentNode);
702
702
  }
703
703
  return e ? r(e) : n;
704
704
  }
@@ -707,13 +707,13 @@ function Dn(e) {
707
707
  return t ?? null;
708
708
  }
709
709
  function xt(e) {
710
- return !ft || !e ? null : Ne(e) ? e : Lt(e) ? Pt(e) || e === Le(e).scrollingElement ? window : Ue(e) ? e : null : null;
710
+ return !ft || !e ? null : Me(e) ? e : Lt(e) ? Pt(e) || e === Ne(e).scrollingElement ? window : Ue(e) ? e : null : null;
711
711
  }
712
712
  function Cn(e) {
713
- return Ne(e) ? e.scrollX : e.scrollLeft;
713
+ return Me(e) ? e.scrollX : e.scrollLeft;
714
714
  }
715
715
  function Sn(e) {
716
- return Ne(e) ? e.scrollY : e.scrollTop;
716
+ return Me(e) ? e.scrollY : e.scrollTop;
717
717
  }
718
718
  function Rt(e) {
719
719
  return {
@@ -751,7 +751,7 @@ function Rn(e) {
751
751
  minScroll: t
752
752
  };
753
753
  }
754
- const Ar = {
754
+ const Tr = {
755
755
  x: 0.2,
756
756
  y: 0.2
757
757
  };
@@ -762,25 +762,25 @@ function Mr(e, t, n, r, o) {
762
762
  right: a,
763
763
  bottom: l
764
764
  } = n;
765
- r === void 0 && (r = 10), o === void 0 && (o = Ar);
765
+ r === void 0 && (r = 10), o === void 0 && (o = Tr);
766
766
  const {
767
767
  isTop: c,
768
768
  isBottom: u,
769
769
  isLeft: d,
770
- isRight: f
771
- } = Rn(e), h = {
770
+ isRight: h
771
+ } = Rn(e), f = {
772
772
  x: 0,
773
773
  y: 0
774
- }, b = {
774
+ }, m = {
775
775
  x: 0,
776
776
  y: 0
777
777
  }, g = {
778
778
  height: t.height * o.y,
779
779
  width: t.width * o.x
780
780
  };
781
- return !c && i <= t.top + g.height ? (h.y = Y.Backward, b.y = r * Math.abs((t.top + g.height - i) / g.height)) : !u && l >= t.bottom - g.height && (h.y = Y.Forward, b.y = r * Math.abs((t.bottom - g.height - l) / g.height)), !f && a >= t.right - g.width ? (h.x = Y.Forward, b.x = r * Math.abs((t.right - g.width - a) / g.width)) : !d && s <= t.left + g.width && (h.x = Y.Backward, b.x = r * Math.abs((t.left + g.width - s) / g.width)), {
782
- direction: h,
783
- speed: b
781
+ return !c && i <= t.top + g.height ? (f.y = Y.Backward, m.y = r * Math.abs((t.top + g.height - i) / g.height)) : !u && l >= t.bottom - g.height && (f.y = Y.Forward, m.y = r * Math.abs((t.bottom - g.height - l) / g.height)), !h && a >= t.right - g.width ? (f.x = Y.Forward, m.x = r * Math.abs((t.right - g.width - a) / g.width)) : !d && s <= t.left + g.width && (f.x = Y.Backward, m.x = r * Math.abs((t.left + g.width - s) / g.width)), {
782
+ direction: f,
783
+ speed: m
784
784
  };
785
785
  }
786
786
  function Nr(e) {
@@ -823,7 +823,7 @@ function Pr(e) {
823
823
  return e.reduce((t, n) => t + Sn(n), 0);
824
824
  }
825
825
  function On(e, t) {
826
- if (t === void 0 && (t = Pe), !e)
826
+ if (t === void 0 && (t = Le), !e)
827
827
  return;
828
828
  const {
829
829
  top: n,
@@ -875,8 +875,8 @@ class Fe {
875
875
  function zr(e) {
876
876
  const {
877
877
  EventTarget: t
878
- } = G(e);
879
- return e instanceof t ? e : Le(e);
878
+ } = J(e);
879
+ return e instanceof t ? e : Ne(e);
880
880
  }
881
881
  function Dt(e, t) {
882
882
  const n = Math.abs(e.x), r = Math.abs(e.y);
@@ -896,7 +896,7 @@ var S;
896
896
  (function(e) {
897
897
  e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter";
898
898
  })(S || (S = {}));
899
- const Tn = {
899
+ const An = {
900
900
  start: [S.Space, S.Enter],
901
901
  cancel: [S.Esc],
902
902
  end: [S.Space, S.Enter]
@@ -935,7 +935,7 @@ class Bt {
935
935
  target: n
936
936
  }
937
937
  } = t;
938
- this.props = t, this.listeners = new Fe(Le(n)), this.windowListeners = new Fe(G(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
938
+ this.props = t, this.listeners = new Fe(Ne(n)), this.windowListeners = new Fe(J(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
939
939
  }
940
940
  attach() {
941
941
  this.handleStart(), this.windowListeners.add(oe.Resize, this.handleCancel), this.windowListeners.add(oe.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(oe.Keydown, this.handleKeyDown));
@@ -954,7 +954,7 @@ class Bt {
954
954
  context: r,
955
955
  options: o
956
956
  } = this.props, {
957
- keyboardCodes: i = Tn,
957
+ keyboardCodes: i = An,
958
958
  coordinateGetter: s = $r,
959
959
  scrollBehavior: a = "smooth"
960
960
  } = o, {
@@ -981,55 +981,55 @@ class Bt {
981
981
  currentCoordinates: u
982
982
  });
983
983
  if (d) {
984
- const f = st(d, u), h = {
984
+ const h = st(d, u), f = {
985
985
  x: 0,
986
986
  y: 0
987
987
  }, {
988
- scrollableAncestors: b
988
+ scrollableAncestors: m
989
989
  } = r.current;
990
- for (const g of b) {
990
+ for (const g of m) {
991
991
  const p = t.code, {
992
- isTop: m,
993
- isRight: w,
992
+ isTop: b,
993
+ isRight: D,
994
994
  isLeft: y,
995
- isBottom: C,
995
+ isBottom: R,
996
996
  maxScroll: x,
997
- minScroll: I
998
- } = Rn(g), R = Nr(g), E = {
999
- x: Math.min(p === S.Right ? R.right - R.width / 2 : R.right, Math.max(p === S.Right ? R.left : R.left + R.width / 2, d.x)),
1000
- y: Math.min(p === S.Down ? R.bottom - R.height / 2 : R.bottom, Math.max(p === S.Down ? R.top : R.top + R.height / 2, d.y))
1001
- }, N = p === S.Right && !w || p === S.Left && !y, B = p === S.Down && !C || p === S.Up && !m;
997
+ minScroll: w
998
+ } = Rn(g), I = Nr(g), E = {
999
+ x: Math.min(p === S.Right ? I.right - I.width / 2 : I.right, Math.max(p === S.Right ? I.left : I.left + I.width / 2, d.x)),
1000
+ y: Math.min(p === S.Down ? I.bottom - I.height / 2 : I.bottom, Math.max(p === S.Down ? I.top : I.top + I.height / 2, d.y))
1001
+ }, N = p === S.Right && !D || p === S.Left && !y, _ = p === S.Down && !R || p === S.Up && !b;
1002
1002
  if (N && E.x !== d.x) {
1003
- const A = g.scrollLeft + f.x, Z = p === S.Right && A <= x.x || p === S.Left && A >= I.x;
1004
- if (Z && !f.y) {
1003
+ const A = g.scrollLeft + h.x, Z = p === S.Right && A <= x.x || p === S.Left && A >= w.x;
1004
+ if (Z && !h.y) {
1005
1005
  g.scrollTo({
1006
1006
  left: A,
1007
1007
  behavior: a
1008
1008
  });
1009
1009
  return;
1010
1010
  }
1011
- Z ? h.x = g.scrollLeft - A : h.x = p === S.Right ? g.scrollLeft - x.x : g.scrollLeft - I.x, h.x && g.scrollBy({
1012
- left: -h.x,
1011
+ Z ? f.x = g.scrollLeft - A : f.x = p === S.Right ? g.scrollLeft - x.x : g.scrollLeft - w.x, f.x && g.scrollBy({
1012
+ left: -f.x,
1013
1013
  behavior: a
1014
1014
  });
1015
1015
  break;
1016
- } else if (B && E.y !== d.y) {
1017
- const A = g.scrollTop + f.y, Z = p === S.Down && A <= x.y || p === S.Up && A >= I.y;
1018
- if (Z && !f.x) {
1016
+ } else if (_ && E.y !== d.y) {
1017
+ const A = g.scrollTop + h.y, Z = p === S.Down && A <= x.y || p === S.Up && A >= w.y;
1018
+ if (Z && !h.x) {
1019
1019
  g.scrollTo({
1020
1020
  top: A,
1021
1021
  behavior: a
1022
1022
  });
1023
1023
  return;
1024
1024
  }
1025
- Z ? h.y = g.scrollTop - A : h.y = p === S.Down ? g.scrollTop - x.y : g.scrollTop - I.y, h.y && g.scrollBy({
1026
- top: -h.y,
1025
+ Z ? f.y = g.scrollTop - A : f.y = p === S.Down ? g.scrollTop - x.y : g.scrollTop - w.y, f.y && g.scrollBy({
1026
+ top: -f.y,
1027
1027
  behavior: a
1028
1028
  });
1029
1029
  break;
1030
1030
  }
1031
1031
  }
1032
- this.handleMove(t, Ae(st(d, this.referenceCoordinates), h));
1032
+ this.handleMove(t, Ae(st(d, this.referenceCoordinates), f));
1033
1033
  }
1034
1034
  }
1035
1035
  }
@@ -1059,7 +1059,7 @@ Bt.activators = [{
1059
1059
  eventName: "onKeyDown",
1060
1060
  handler: (e, t, n) => {
1061
1061
  let {
1062
- keyboardCodes: r = Tn,
1062
+ keyboardCodes: r = An,
1063
1063
  onActivation: o
1064
1064
  } = t, {
1065
1065
  active: i
@@ -1091,7 +1091,7 @@ class $t {
1091
1091
  } = t, {
1092
1092
  target: s
1093
1093
  } = i;
1094
- this.props = t, this.events = n, this.document = Le(s), this.documentListeners = new Fe(this.document), this.listeners = new Fe(r), this.windowListeners = new Fe(G(s)), this.initialCoordinates = (o = at(i)) != null ? o : de, this.handleStart = this.handleStart.bind(this), this.handleMove = this.handleMove.bind(this), this.handleEnd = this.handleEnd.bind(this), this.handleCancel = this.handleCancel.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.removeTextSelection = this.removeTextSelection.bind(this), this.attach();
1094
+ this.props = t, this.events = n, this.document = Ne(s), this.documentListeners = new Fe(this.document), this.listeners = new Fe(r), this.windowListeners = new Fe(J(s)), this.initialCoordinates = (o = at(i)) != null ? o : de, this.handleStart = this.handleStart.bind(this), this.handleMove = this.handleMove.bind(this), this.handleEnd = this.handleEnd.bind(this), this.handleCancel = this.handleCancel.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.removeTextSelection = this.removeTextSelection.bind(this), this.attach();
1095
1095
  }
1096
1096
  attach() {
1097
1097
  const {
@@ -1192,7 +1192,7 @@ class _t extends $t {
1192
1192
  constructor(t) {
1193
1193
  const {
1194
1194
  event: n
1195
- } = t, r = Le(n.target);
1195
+ } = t, r = Ne(n.target);
1196
1196
  super(t, _r, r);
1197
1197
  }
1198
1198
  }
@@ -1223,7 +1223,7 @@ var Et;
1223
1223
  })(Et || (Et = {}));
1224
1224
  class Fr extends $t {
1225
1225
  constructor(t) {
1226
- super(t, jr, Le(t.event.target));
1226
+ super(t, jr, Ne(t.event.target));
1227
1227
  }
1228
1228
  }
1229
1229
  Fr.activators = [{
@@ -1299,18 +1299,18 @@ function Xr(e) {
1299
1299
  scrollableAncestors: c,
1300
1300
  scrollableAncestorRects: u,
1301
1301
  delta: d,
1302
- threshold: f
1302
+ threshold: h
1303
1303
  } = e;
1304
- const h = Vr({
1304
+ const f = Vr({
1305
1305
  delta: d,
1306
1306
  disabled: !i
1307
- }), [b, g] = nr(), p = z({
1307
+ }), [m, g] = nr(), p = k({
1308
1308
  x: 0,
1309
1309
  y: 0
1310
- }), m = z({
1310
+ }), b = k({
1311
1311
  x: 0,
1312
1312
  y: 0
1313
- }), w = T(() => {
1313
+ }), D = T(() => {
1314
1314
  switch (n) {
1315
1315
  case He.Pointer:
1316
1316
  return l ? {
@@ -1322,40 +1322,40 @@ function Xr(e) {
1322
1322
  case He.DraggableRect:
1323
1323
  return o;
1324
1324
  }
1325
- }, [n, o, l]), y = z(null), C = $(() => {
1326
- const I = y.current;
1327
- if (!I)
1325
+ }, [n, o, l]), y = k(null), R = z(() => {
1326
+ const w = y.current;
1327
+ if (!w)
1328
1328
  return;
1329
- const R = p.current.x * m.current.x, E = p.current.y * m.current.y;
1330
- I.scrollBy(R, E);
1329
+ const I = p.current.x * b.current.x, E = p.current.y * b.current.y;
1330
+ w.scrollBy(I, E);
1331
1331
  }, []), x = T(() => a === ct.TreeOrder ? [...c].reverse() : c, [a, c]);
1332
- k(
1332
+ P(
1333
1333
  () => {
1334
- if (!i || !c.length || !w) {
1334
+ if (!i || !c.length || !D) {
1335
1335
  g();
1336
1336
  return;
1337
1337
  }
1338
- for (const I of x) {
1339
- if ((r == null ? void 0 : r(I)) === !1)
1338
+ for (const w of x) {
1339
+ if ((r == null ? void 0 : r(w)) === !1)
1340
1340
  continue;
1341
- const R = c.indexOf(I), E = u[R];
1341
+ const I = c.indexOf(w), E = u[I];
1342
1342
  if (!E)
1343
1343
  continue;
1344
1344
  const {
1345
1345
  direction: N,
1346
- speed: B
1347
- } = Mr(I, E, w, t, f);
1346
+ speed: _
1347
+ } = Mr(w, E, D, t, h);
1348
1348
  for (const A of ["x", "y"])
1349
- h[A][N[A]] || (B[A] = 0, N[A] = 0);
1350
- if (B.x > 0 || B.y > 0) {
1351
- g(), y.current = I, b(C, s), p.current = B, m.current = N;
1349
+ f[A][N[A]] || (_[A] = 0, N[A] = 0);
1350
+ if (_.x > 0 || _.y > 0) {
1351
+ g(), y.current = w, m(R, s), p.current = _, b.current = N;
1352
1352
  return;
1353
1353
  }
1354
1354
  }
1355
1355
  p.current = {
1356
1356
  x: 0,
1357
1357
  y: 0
1358
- }, m.current = {
1358
+ }, b.current = {
1359
1359
  x: 0,
1360
1360
  y: 0
1361
1361
  }, g();
@@ -1363,21 +1363,21 @@ function Xr(e) {
1363
1363
  // eslint-disable-next-line react-hooks/exhaustive-deps
1364
1364
  [
1365
1365
  t,
1366
- C,
1366
+ R,
1367
1367
  r,
1368
1368
  g,
1369
1369
  i,
1370
1370
  s,
1371
1371
  // eslint-disable-next-line react-hooks/exhaustive-deps
1372
- JSON.stringify(w),
1372
+ JSON.stringify(D),
1373
1373
  // eslint-disable-next-line react-hooks/exhaustive-deps
1374
- JSON.stringify(h),
1375
- b,
1374
+ JSON.stringify(f),
1375
+ m,
1376
1376
  c,
1377
1377
  x,
1378
1378
  u,
1379
1379
  // eslint-disable-next-line react-hooks/exhaustive-deps
1380
- JSON.stringify(f)
1380
+ JSON.stringify(h)
1381
1381
  ]
1382
1382
  );
1383
1383
  }
@@ -1434,10 +1434,10 @@ function Ur(e, t) {
1434
1434
  return [...n, ...i];
1435
1435
  }, []), [e, t]);
1436
1436
  }
1437
- var Me;
1437
+ var Te;
1438
1438
  (function(e) {
1439
1439
  e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging";
1440
- })(Me || (Me = {}));
1440
+ })(Te || (Te = {}));
1441
1441
  var Ot;
1442
1442
  (function(e) {
1443
1443
  e.Optimized = "optimized";
@@ -1453,59 +1453,59 @@ function Wr(e, t) {
1453
1453
  frequency: a,
1454
1454
  measure: l,
1455
1455
  strategy: c
1456
- } = o, u = z(e), d = p(), f = Ye(d), h = $(function(m) {
1457
- m === void 0 && (m = []), !f.current && s((w) => w === null ? m : w.concat(m.filter((y) => !w.includes(y))));
1458
- }, [f]), b = z(null), g = We((m) => {
1456
+ } = o, u = k(e), d = p(), h = Ye(d), f = z(function(b) {
1457
+ b === void 0 && (b = []), !h.current && s((D) => D === null ? b : D.concat(b.filter((y) => !D.includes(y))));
1458
+ }, [h]), m = k(null), g = We((b) => {
1459
1459
  if (d && !n)
1460
1460
  return on;
1461
- if (!m || m === on || u.current !== e || i != null) {
1462
- const w = /* @__PURE__ */ new Map();
1461
+ if (!b || b === on || u.current !== e || i != null) {
1462
+ const D = /* @__PURE__ */ new Map();
1463
1463
  for (let y of e) {
1464
1464
  if (!y)
1465
1465
  continue;
1466
1466
  if (i && i.length > 0 && !i.includes(y.id) && y.rect.current) {
1467
- w.set(y.id, y.rect.current);
1467
+ D.set(y.id, y.rect.current);
1468
1468
  continue;
1469
1469
  }
1470
- const C = y.node.current, x = C ? new zt(l(C), C) : null;
1471
- y.rect.current = x, x && w.set(y.id, x);
1470
+ const R = y.node.current, x = R ? new zt(l(R), R) : null;
1471
+ y.rect.current = x, x && D.set(y.id, x);
1472
1472
  }
1473
- return w;
1473
+ return D;
1474
1474
  }
1475
- return m;
1475
+ return b;
1476
1476
  }, [e, i, n, d, l]);
1477
- return k(() => {
1477
+ return P(() => {
1478
1478
  u.current = e;
1479
- }, [e]), k(
1479
+ }, [e]), P(
1480
1480
  () => {
1481
- d || h();
1481
+ d || f();
1482
1482
  },
1483
1483
  // eslint-disable-next-line react-hooks/exhaustive-deps
1484
1484
  [n, d]
1485
- ), k(
1485
+ ), P(
1486
1486
  () => {
1487
1487
  i && i.length > 0 && s(null);
1488
1488
  },
1489
1489
  //eslint-disable-next-line react-hooks/exhaustive-deps
1490
1490
  [JSON.stringify(i)]
1491
- ), k(
1491
+ ), P(
1492
1492
  () => {
1493
- d || typeof a != "number" || b.current !== null || (b.current = setTimeout(() => {
1494
- h(), b.current = null;
1493
+ d || typeof a != "number" || m.current !== null || (m.current = setTimeout(() => {
1494
+ f(), m.current = null;
1495
1495
  }, a));
1496
1496
  },
1497
1497
  // eslint-disable-next-line react-hooks/exhaustive-deps
1498
- [a, d, h, ...r]
1498
+ [a, d, f, ...r]
1499
1499
  ), {
1500
1500
  droppableRects: g,
1501
- measureDroppableContainers: h,
1501
+ measureDroppableContainers: f,
1502
1502
  measuringScheduled: i != null
1503
1503
  };
1504
1504
  function p() {
1505
1505
  switch (c) {
1506
- case Me.Always:
1506
+ case Te.Always:
1507
1507
  return !1;
1508
- case Me.BeforeDragging:
1508
+ case Te.BeforeDragging:
1509
1509
  return n;
1510
1510
  default:
1511
1511
  return !n;
@@ -1531,7 +1531,7 @@ function qr(e) {
1531
1531
  } = window;
1532
1532
  return new i(r);
1533
1533
  }, [r, n]);
1534
- return k(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
1534
+ return P(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
1535
1535
  }
1536
1536
  function pt(e) {
1537
1537
  let {
@@ -1550,10 +1550,10 @@ function pt(e) {
1550
1550
  // eslint-disable-next-line react-hooks/exhaustive-deps
1551
1551
  [n]
1552
1552
  );
1553
- return k(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
1553
+ return P(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
1554
1554
  }
1555
1555
  function Gr(e) {
1556
- return new zt(Pe(e), e);
1556
+ return new zt(Le(e), e);
1557
1557
  }
1558
1558
  function sn(e, t, n) {
1559
1559
  t === void 0 && (t = Gr);
@@ -1597,17 +1597,17 @@ function Zr(e) {
1597
1597
  }
1598
1598
  const an = [];
1599
1599
  function Qr(e) {
1600
- const t = z(e), n = We((r) => e ? r && r !== an && e && t.current && e.parentNode === t.current.parentNode ? r : kt(e) : an, [e]);
1601
- return k(() => {
1600
+ const t = k(e), n = We((r) => e ? r && r !== an && e && t.current && e.parentNode === t.current.parentNode ? r : kt(e) : an, [e]);
1601
+ return P(() => {
1602
1602
  t.current = e;
1603
1603
  }, [e]), n;
1604
1604
  }
1605
1605
  function eo(e) {
1606
- const [t, n] = V(null), r = z(e), o = $((i) => {
1606
+ const [t, n] = V(null), r = k(e), o = z((i) => {
1607
1607
  const s = xt(i.target);
1608
1608
  s && n((a) => a ? (a.set(s, Rt(s)), new Map(a)) : null);
1609
1609
  }, []);
1610
- return k(() => {
1610
+ return P(() => {
1611
1611
  const i = r.current;
1612
1612
  if (e !== i) {
1613
1613
  s(i);
@@ -1632,20 +1632,20 @@ function eo(e) {
1632
1632
  }
1633
1633
  function ln(e, t) {
1634
1634
  t === void 0 && (t = []);
1635
- const n = z(null);
1636
- return k(
1635
+ const n = k(null);
1636
+ return P(
1637
1637
  () => {
1638
1638
  n.current = null;
1639
1639
  },
1640
1640
  // eslint-disable-next-line react-hooks/exhaustive-deps
1641
1641
  t
1642
- ), k(() => {
1642
+ ), P(() => {
1643
1643
  const r = e !== de;
1644
1644
  r && !n.current && (n.current = e), !r && n.current && (n.current = null);
1645
1645
  }, [e]), n.current ? st(e, n.current) : de;
1646
1646
  }
1647
1647
  function to(e) {
1648
- k(
1648
+ P(
1649
1649
  () => {
1650
1650
  if (!ft)
1651
1651
  return;
@@ -1681,13 +1681,13 @@ function no(e, t) {
1681
1681
  }, n;
1682
1682
  }, {}), [e, t]);
1683
1683
  }
1684
- function An(e) {
1684
+ function Tn(e) {
1685
1685
  return T(() => e ? Er(e) : null, [e]);
1686
1686
  }
1687
1687
  const St = [];
1688
1688
  function ro(e, t) {
1689
- t === void 0 && (t = Pe);
1690
- const [n] = e, r = An(n ? G(n) : null), [o, i] = Nt(a, St), s = pt({
1689
+ t === void 0 && (t = Le);
1690
+ const [n] = e, r = Tn(n ? J(n) : null), [o, i] = Nt(a, St), s = pt({
1691
1691
  callback: i
1692
1692
  });
1693
1693
  return e.length > 0 && o === St && i(), ie(() => {
@@ -1709,24 +1709,24 @@ function oo(e) {
1709
1709
  let {
1710
1710
  measure: t
1711
1711
  } = e;
1712
- const [n, r] = V(null), o = $((c) => {
1712
+ const [n, r] = V(null), o = z((c) => {
1713
1713
  for (const {
1714
1714
  target: u
1715
1715
  } of c)
1716
1716
  if (Ue(u)) {
1717
1717
  r((d) => {
1718
- const f = t(u);
1718
+ const h = t(u);
1719
1719
  return d ? {
1720
1720
  ...d,
1721
- width: f.width,
1722
- height: f.height
1723
- } : f;
1721
+ width: h.width,
1722
+ height: h.height
1723
+ } : h;
1724
1724
  });
1725
1725
  break;
1726
1726
  }
1727
1727
  }, [t]), i = pt({
1728
1728
  callback: o
1729
- }), s = $((c) => {
1729
+ }), s = z((c) => {
1730
1730
  const u = Mn(c);
1731
1731
  i == null || i.disconnect(), u && (i == null || i.observe(u)), r(u ? t(u) : null);
1732
1732
  }, [t, i]), [a, l] = ot(s);
@@ -1750,11 +1750,11 @@ const io = [{
1750
1750
  },
1751
1751
  droppable: {
1752
1752
  measure: en,
1753
- strategy: Me.WhileDragging,
1753
+ strategy: Te.WhileDragging,
1754
1754
  frequency: Ot.Optimized
1755
1755
  },
1756
1756
  dragOverlay: {
1757
- measure: Pe
1757
+ measure: Le
1758
1758
  }
1759
1759
  };
1760
1760
  class Xe extends Map {
@@ -1935,8 +1935,8 @@ function uo(e) {
1935
1935
  active: n,
1936
1936
  activatorEvent: r,
1937
1937
  draggableNodes: o
1938
- } = we(qe), i = it(r), s = it(n == null ? void 0 : n.id);
1939
- return k(() => {
1938
+ } = De(qe), i = it(r), s = it(n == null ? void 0 : n.id);
1939
+ return P(() => {
1940
1940
  if (!t && !r && i && s != null) {
1941
1941
  if (!ht(i) || document.activeElement === i.target)
1942
1942
  return;
@@ -2000,7 +2000,7 @@ function go(e) {
2000
2000
  initialRect: r,
2001
2001
  config: o = !0
2002
2002
  } = e;
2003
- const i = z(!1), {
2003
+ const i = k(!1), {
2004
2004
  x: s,
2005
2005
  y: a
2006
2006
  } = typeof o == "boolean" ? {
@@ -2019,8 +2019,8 @@ function go(e) {
2019
2019
  return;
2020
2020
  const u = n(c), d = wn(u, r);
2021
2021
  if (s || (d.x = 0), a || (d.y = 0), i.current = !0, Math.abs(d.x) > 0 || Math.abs(d.y) > 0) {
2022
- const f = Dn(c);
2023
- f && f.scrollBy({
2022
+ const h = Dn(c);
2023
+ h && h.scrollBy({
2024
2024
  top: d.y,
2025
2025
  left: d.x
2026
2026
  });
@@ -2032,10 +2032,10 @@ const vt = /* @__PURE__ */ Ke({
2032
2032
  scaleX: 1,
2033
2033
  scaleY: 1
2034
2034
  });
2035
- var ye;
2035
+ var xe;
2036
2036
  (function(e) {
2037
2037
  e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
2038
- })(ye || (ye = {}));
2038
+ })(xe || (xe = {}));
2039
2039
  const ho = /* @__PURE__ */ ut(function(t) {
2040
2040
  var n, r, o, i;
2041
2041
  let {
@@ -2045,103 +2045,103 @@ const ho = /* @__PURE__ */ ut(function(t) {
2045
2045
  children: c,
2046
2046
  sensors: u = io,
2047
2047
  collisionDetection: d = xr,
2048
- measuring: f,
2049
- modifiers: h,
2050
- ...b
2048
+ measuring: h,
2049
+ modifiers: f,
2050
+ ...m
2051
2051
  } = t;
2052
- const g = Nt(co, void 0, lo), [p, m] = g, [w, y] = dr(), [C, x] = V(ye.Uninitialized), I = C === ye.Initialized, {
2052
+ const g = Nt(co, void 0, lo), [p, b] = g, [D, y] = dr(), [R, x] = V(xe.Uninitialized), w = R === xe.Initialized, {
2053
2053
  draggable: {
2054
- active: R,
2054
+ active: I,
2055
2055
  nodes: E,
2056
2056
  translate: N
2057
2057
  },
2058
2058
  droppable: {
2059
- containers: B
2059
+ containers: _
2060
2060
  }
2061
- } = p, A = R ? E.get(R) : null, Z = z({
2061
+ } = p, A = I ? E.get(I) : null, Z = k({
2062
2062
  initial: null,
2063
2063
  translated: null
2064
2064
  }), Q = T(() => {
2065
- var U;
2066
- return R != null ? {
2067
- id: R,
2065
+ var K;
2066
+ return I != null ? {
2067
+ id: I,
2068
2068
  // It's possible for the active node to unmount while dragging
2069
- data: (U = A == null ? void 0 : A.data) != null ? U : so,
2069
+ data: (K = A == null ? void 0 : A.data) != null ? K : so,
2070
2070
  rect: Z
2071
2071
  } : null;
2072
- }, [R, A]), ne = z(null), [xe, De] = V(null), [J, Ce] = V(null), se = Ye(b, Object.values(b)), Se = Je("DndDescribedBy", s), v = T(() => B.getEnabled(), [B]), D = fo(f), {
2073
- droppableRects: P,
2074
- measureDroppableContainers: M,
2075
- measuringScheduled: F
2076
- } = Wr(v, {
2077
- dragging: I,
2072
+ }, [I, A]), ne = k(null), [fe, Ce] = V(null), [W, Se] = V(null), pe = Ye(m, Object.values(m)), ve = Je("DndDescribedBy", s), Pe = T(() => _.getEnabled(), [_]), v = fo(h), {
2073
+ droppableRects: C,
2074
+ measureDroppableContainers: B,
2075
+ measuringScheduled: L
2076
+ } = Wr(Pe, {
2077
+ dragging: w,
2078
2078
  dependencies: [N.x, N.y],
2079
- config: D.droppable
2080
- }), H = Kr(E, R), K = T(() => J ? at(J) : null, [J]), q = Zn(), W = Jr(H, D.draggable.measure);
2079
+ config: v.droppable
2080
+ }), M = Kr(E, I), q = T(() => W ? at(W) : null, [W]), H = Zn(), U = Jr(M, v.draggable.measure);
2081
2081
  go({
2082
- activeNode: R ? E.get(R) : null,
2083
- config: q.layoutShiftCompensation,
2084
- initialRect: W,
2085
- measure: D.draggable.measure
2082
+ activeNode: I ? E.get(I) : null,
2083
+ config: H.layoutShiftCompensation,
2084
+ initialRect: U,
2085
+ measure: v.draggable.measure
2086
2086
  });
2087
- const O = sn(H, D.draggable.measure, W), he = sn(H ? H.parentElement : null), L = z({
2087
+ const O = sn(M, v.draggable.measure, U), se = sn(M ? M.parentElement : null), G = k({
2088
2088
  activatorEvent: null,
2089
2089
  active: null,
2090
- activeNode: H,
2090
+ activeNode: M,
2091
2091
  collisionRect: null,
2092
2092
  collisions: null,
2093
- droppableRects: P,
2093
+ droppableRects: C,
2094
2094
  draggableNodes: E,
2095
2095
  draggingNode: null,
2096
2096
  draggingNodeRect: null,
2097
- droppableContainers: B,
2097
+ droppableContainers: _,
2098
2098
  over: null,
2099
2099
  scrollableAncestors: [],
2100
2100
  scrollAdjustedTranslate: null
2101
- }), pe = B.getNodeFor((n = L.current.over) == null ? void 0 : n.id), ae = oo({
2102
- measure: D.dragOverlay.measure
2103
- }), Ie = (r = ae.nodeRef.current) != null ? r : H, Re = I ? (o = ae.rect) != null ? o : O : null, Ft = !!(ae.nodeRef.current && ae.rect), Ht = Zr(Ft ? null : O), mt = An(Ie ? G(Ie) : null), ve = Qr(I ? pe ?? H : null), Ge = ro(ve), Ze = Pn(h, {
2101
+ }), j = _.getNodeFor((n = G.current.over) == null ? void 0 : n.id), ae = oo({
2102
+ measure: v.dragOverlay.measure
2103
+ }), be = (r = ae.nodeRef.current) != null ? r : M, Ie = w ? (o = ae.rect) != null ? o : O : null, Ft = !!(ae.nodeRef.current && ae.rect), Ht = Zr(Ft ? null : O), mt = Tn(be ? J(be) : null), me = Qr(w ? j ?? M : null), Ge = ro(me), Ze = Pn(f, {
2104
2104
  transform: {
2105
2105
  x: N.x - Ht.x,
2106
2106
  y: N.y - Ht.y,
2107
2107
  scaleX: 1,
2108
2108
  scaleY: 1
2109
2109
  },
2110
- activatorEvent: J,
2110
+ activatorEvent: W,
2111
2111
  active: Q,
2112
2112
  activeNodeRect: O,
2113
- containerNodeRect: he,
2114
- draggingNodeRect: Re,
2115
- over: L.current.over,
2113
+ containerNodeRect: se,
2114
+ draggingNodeRect: Ie,
2115
+ over: G.current.over,
2116
2116
  overlayNodeRect: ae.rect,
2117
- scrollableAncestors: ve,
2117
+ scrollableAncestors: me,
2118
2118
  scrollableAncestorRects: Ge,
2119
2119
  windowRect: mt
2120
- }), Xt = K ? Ae(K, N) : null, Yt = eo(ve), Vn = ln(Yt), Kn = ln(Yt, [O]), Ee = Ae(Ze, Vn), Oe = Re ? Sr(Re, Ze) : null, ke = Q && Oe ? d({
2120
+ }), Xt = q ? Ae(q, N) : null, Yt = eo(me), Vn = ln(Yt), Kn = ln(Yt, [O]), Re = Ae(Ze, Vn), Ee = Ie ? Sr(Ie, Ze) : null, ke = Q && Ee ? d({
2121
2121
  active: Q,
2122
- collisionRect: Oe,
2123
- droppableRects: P,
2124
- droppableContainers: v,
2122
+ collisionRect: Ee,
2123
+ droppableRects: C,
2124
+ droppableContainers: Pe,
2125
2125
  pointerCoordinates: Xt
2126
- }) : null, Vt = yn(ke, "id"), [be, Kt] = V(null), Un = Ft ? Ze : Ae(Ze, Kn), Wn = Dr(Un, (i = be == null ? void 0 : be.rect) != null ? i : null, O), Ut = $(
2127
- (U, ee) => {
2126
+ }) : null, Vt = yn(ke, "id"), [ye, Kt] = V(null), Un = Ft ? Ze : Ae(Ze, Kn), Wn = Dr(Un, (i = ye == null ? void 0 : ye.rect) != null ? i : null, O), Ut = z(
2127
+ (K, ee) => {
2128
2128
  let {
2129
2129
  sensor: te,
2130
- options: me
2130
+ options: we
2131
2131
  } = ee;
2132
2132
  if (ne.current == null)
2133
2133
  return;
2134
2134
  const re = E.get(ne.current);
2135
2135
  if (!re)
2136
2136
  return;
2137
- const le = U.nativeEvent, fe = new te({
2137
+ const le = K.nativeEvent, ge = new te({
2138
2138
  active: ne.current,
2139
2139
  activeNode: re,
2140
2140
  event: le,
2141
- options: me,
2141
+ options: we,
2142
2142
  // Sensors need to be instantiated with refs for arguments that change over time
2143
2143
  // otherwise they are frozen in time with the stale arguments
2144
- context: L,
2144
+ context: G,
2145
2145
  onStart(ce) {
2146
2146
  const ze = ne.current;
2147
2147
  if (ze == null)
@@ -2151,7 +2151,7 @@ const ho = /* @__PURE__ */ ut(function(t) {
2151
2151
  return;
2152
2152
  const {
2153
2153
  onDragStart: Qe
2154
- } = se.current, et = {
2154
+ } = pe.current, et = {
2155
2155
  active: {
2156
2156
  id: ze,
2157
2157
  data: Be.data,
@@ -2159,41 +2159,41 @@ const ho = /* @__PURE__ */ ut(function(t) {
2159
2159
  }
2160
2160
  };
2161
2161
  je(() => {
2162
- Qe == null || Qe(et), x(ye.Initializing), m({
2162
+ Qe == null || Qe(et), x(xe.Initializing), b({
2163
2163
  type: X.DragStart,
2164
2164
  initialCoordinates: ce,
2165
2165
  active: ze
2166
- }), w({
2166
+ }), D({
2167
2167
  type: "onDragStart",
2168
2168
  event: et
2169
2169
  });
2170
2170
  });
2171
2171
  },
2172
2172
  onMove(ce) {
2173
- m({
2173
+ b({
2174
2174
  type: X.DragMove,
2175
2175
  coordinates: ce
2176
2176
  });
2177
2177
  },
2178
- onEnd: Te(X.DragEnd),
2179
- onCancel: Te(X.DragCancel)
2178
+ onEnd: Oe(X.DragEnd),
2179
+ onCancel: Oe(X.DragCancel)
2180
2180
  });
2181
2181
  je(() => {
2182
- De(fe), Ce(U.nativeEvent);
2182
+ Ce(ge), Se(K.nativeEvent);
2183
2183
  });
2184
- function Te(ce) {
2184
+ function Oe(ce) {
2185
2185
  return async function() {
2186
2186
  const {
2187
2187
  active: Be,
2188
2188
  collisions: Qe,
2189
2189
  over: et,
2190
2190
  scrollAdjustedTranslate: Jt
2191
- } = L.current;
2191
+ } = G.current;
2192
2192
  let $e = null;
2193
2193
  if (Be && Jt) {
2194
2194
  const {
2195
2195
  cancelDrop: _e
2196
- } = se.current;
2196
+ } = pe.current;
2197
2197
  $e = {
2198
2198
  activatorEvent: le,
2199
2199
  active: Be,
@@ -2203,13 +2203,13 @@ const ho = /* @__PURE__ */ ut(function(t) {
2203
2203
  }, ce === X.DragEnd && typeof _e == "function" && await Promise.resolve(_e($e)) && (ce = X.DragCancel);
2204
2204
  }
2205
2205
  ne.current = null, je(() => {
2206
- m({
2206
+ b({
2207
2207
  type: ce
2208
- }), x(ye.Uninitialized), Kt(null), De(null), Ce(null);
2208
+ }), x(xe.Uninitialized), Kt(null), Ce(null), Se(null);
2209
2209
  const _e = ce === X.DragEnd ? "onDragEnd" : "onDragCancel";
2210
2210
  if ($e) {
2211
- const yt = se.current[_e];
2212
- yt == null || yt($e), w({
2211
+ const yt = pe.current[_e];
2212
+ yt == null || yt($e), D({
2213
2213
  type: _e,
2214
2214
  event: $e
2215
2215
  });
@@ -2220,8 +2220,8 @@ const ho = /* @__PURE__ */ ut(function(t) {
2220
2220
  },
2221
2221
  // eslint-disable-next-line react-hooks/exhaustive-deps
2222
2222
  [E]
2223
- ), Jn = $((U, ee) => (te, me) => {
2224
- const re = te.nativeEvent, le = E.get(me);
2223
+ ), Jn = z((K, ee) => (te, we) => {
2224
+ const re = te.nativeEvent, le = E.get(we);
2225
2225
  if (
2226
2226
  // Another sensor is already instantiating
2227
2227
  ne.current !== null || // No active draggable
@@ -2229,76 +2229,76 @@ const ho = /* @__PURE__ */ ut(function(t) {
2229
2229
  re.dndKit || re.defaultPrevented
2230
2230
  )
2231
2231
  return;
2232
- const fe = {
2232
+ const ge = {
2233
2233
  active: le
2234
2234
  };
2235
- U(te, ee.options, fe) === !0 && (re.dndKit = {
2235
+ K(te, ee.options, ge) === !0 && (re.dndKit = {
2236
2236
  capturedBy: ee.sensor
2237
- }, ne.current = me, Ut(te, ee));
2237
+ }, ne.current = we, Ut(te, ee));
2238
2238
  }, [E, Ut]), Wt = Ur(u, Jn);
2239
2239
  to(u), ie(() => {
2240
- O && C === ye.Initializing && x(ye.Initialized);
2241
- }, [O, C]), k(
2240
+ O && R === xe.Initializing && x(xe.Initialized);
2241
+ }, [O, R]), P(
2242
2242
  () => {
2243
2243
  const {
2244
- onDragMove: U
2245
- } = se.current, {
2244
+ onDragMove: K
2245
+ } = pe.current, {
2246
2246
  active: ee,
2247
2247
  activatorEvent: te,
2248
- collisions: me,
2248
+ collisions: we,
2249
2249
  over: re
2250
- } = L.current;
2250
+ } = G.current;
2251
2251
  if (!ee || !te)
2252
2252
  return;
2253
2253
  const le = {
2254
2254
  active: ee,
2255
2255
  activatorEvent: te,
2256
- collisions: me,
2256
+ collisions: we,
2257
2257
  delta: {
2258
- x: Ee.x,
2259
- y: Ee.y
2258
+ x: Re.x,
2259
+ y: Re.y
2260
2260
  },
2261
2261
  over: re
2262
2262
  };
2263
2263
  je(() => {
2264
- U == null || U(le), w({
2264
+ K == null || K(le), D({
2265
2265
  type: "onDragMove",
2266
2266
  event: le
2267
2267
  });
2268
2268
  });
2269
2269
  },
2270
2270
  // eslint-disable-next-line react-hooks/exhaustive-deps
2271
- [Ee.x, Ee.y]
2272
- ), k(
2271
+ [Re.x, Re.y]
2272
+ ), P(
2273
2273
  () => {
2274
2274
  const {
2275
- active: U,
2275
+ active: K,
2276
2276
  activatorEvent: ee,
2277
2277
  collisions: te,
2278
- droppableContainers: me,
2278
+ droppableContainers: we,
2279
2279
  scrollAdjustedTranslate: re
2280
- } = L.current;
2281
- if (!U || ne.current == null || !ee || !re)
2280
+ } = G.current;
2281
+ if (!K || ne.current == null || !ee || !re)
2282
2282
  return;
2283
2283
  const {
2284
2284
  onDragOver: le
2285
- } = se.current, fe = me.get(Vt), Te = fe && fe.rect.current ? {
2286
- id: fe.id,
2287
- rect: fe.rect.current,
2288
- data: fe.data,
2289
- disabled: fe.disabled
2285
+ } = pe.current, ge = we.get(Vt), Oe = ge && ge.rect.current ? {
2286
+ id: ge.id,
2287
+ rect: ge.rect.current,
2288
+ data: ge.data,
2289
+ disabled: ge.disabled
2290
2290
  } : null, ce = {
2291
- active: U,
2291
+ active: K,
2292
2292
  activatorEvent: ee,
2293
2293
  collisions: te,
2294
2294
  delta: {
2295
2295
  x: re.x,
2296
2296
  y: re.y
2297
2297
  },
2298
- over: Te
2298
+ over: Oe
2299
2299
  };
2300
2300
  je(() => {
2301
- Kt(Te), le == null || le(ce), w({
2301
+ Kt(Oe), le == null || le(ce), D({
2302
2302
  type: "onDragOver",
2303
2303
  event: ce
2304
2304
  });
@@ -2307,79 +2307,79 @@ const ho = /* @__PURE__ */ ut(function(t) {
2307
2307
  // eslint-disable-next-line react-hooks/exhaustive-deps
2308
2308
  [Vt]
2309
2309
  ), ie(() => {
2310
- L.current = {
2311
- activatorEvent: J,
2310
+ G.current = {
2311
+ activatorEvent: W,
2312
2312
  active: Q,
2313
- activeNode: H,
2314
- collisionRect: Oe,
2313
+ activeNode: M,
2314
+ collisionRect: Ee,
2315
2315
  collisions: ke,
2316
- droppableRects: P,
2316
+ droppableRects: C,
2317
2317
  draggableNodes: E,
2318
- draggingNode: Ie,
2319
- draggingNodeRect: Re,
2320
- droppableContainers: B,
2321
- over: be,
2322
- scrollableAncestors: ve,
2323
- scrollAdjustedTranslate: Ee
2318
+ draggingNode: be,
2319
+ draggingNodeRect: Ie,
2320
+ droppableContainers: _,
2321
+ over: ye,
2322
+ scrollableAncestors: me,
2323
+ scrollAdjustedTranslate: Re
2324
2324
  }, Z.current = {
2325
- initial: Re,
2326
- translated: Oe
2325
+ initial: Ie,
2326
+ translated: Ee
2327
2327
  };
2328
- }, [Q, H, ke, Oe, E, Ie, Re, P, B, be, ve, Ee]), Xr({
2329
- ...q,
2328
+ }, [Q, M, ke, Ee, E, be, Ie, C, _, ye, me, Re]), Xr({
2329
+ ...H,
2330
2330
  delta: N,
2331
- draggingRect: Oe,
2331
+ draggingRect: Ee,
2332
2332
  pointerCoordinates: Xt,
2333
- scrollableAncestors: ve,
2333
+ scrollableAncestors: me,
2334
2334
  scrollableAncestorRects: Ge
2335
2335
  });
2336
2336
  const qn = T(() => ({
2337
2337
  active: Q,
2338
- activeNode: H,
2338
+ activeNode: M,
2339
2339
  activeNodeRect: O,
2340
- activatorEvent: J,
2340
+ activatorEvent: W,
2341
2341
  collisions: ke,
2342
- containerNodeRect: he,
2342
+ containerNodeRect: se,
2343
2343
  dragOverlay: ae,
2344
2344
  draggableNodes: E,
2345
- droppableContainers: B,
2346
- droppableRects: P,
2347
- over: be,
2348
- measureDroppableContainers: M,
2349
- scrollableAncestors: ve,
2345
+ droppableContainers: _,
2346
+ droppableRects: C,
2347
+ over: ye,
2348
+ measureDroppableContainers: B,
2349
+ scrollableAncestors: me,
2350
2350
  scrollableAncestorRects: Ge,
2351
- measuringConfiguration: D,
2352
- measuringScheduled: F,
2351
+ measuringConfiguration: v,
2352
+ measuringScheduled: L,
2353
2353
  windowRect: mt
2354
- }), [Q, H, O, J, ke, he, ae, E, B, P, be, M, ve, Ge, D, F, mt]), Gn = T(() => ({
2355
- activatorEvent: J,
2354
+ }), [Q, M, O, W, ke, se, ae, E, _, C, ye, B, me, Ge, v, L, mt]), Gn = T(() => ({
2355
+ activatorEvent: W,
2356
2356
  activators: Wt,
2357
2357
  active: Q,
2358
2358
  activeNodeRect: O,
2359
2359
  ariaDescribedById: {
2360
- draggable: Se
2360
+ draggable: ve
2361
2361
  },
2362
- dispatch: m,
2362
+ dispatch: b,
2363
2363
  draggableNodes: E,
2364
- over: be,
2365
- measureDroppableContainers: M
2366
- }), [J, Wt, Q, O, m, Se, E, be, M]);
2367
- return j.createElement(vn.Provider, {
2364
+ over: ye,
2365
+ measureDroppableContainers: B
2366
+ }), [W, Wt, Q, O, b, ve, E, ye, B]);
2367
+ return F.createElement(vn.Provider, {
2368
2368
  value: y
2369
- }, j.createElement(qe.Provider, {
2369
+ }, F.createElement(qe.Provider, {
2370
2370
  value: Gn
2371
- }, j.createElement(Ln.Provider, {
2371
+ }, F.createElement(Ln.Provider, {
2372
2372
  value: qn
2373
- }, j.createElement(vt.Provider, {
2373
+ }, F.createElement(vt.Provider, {
2374
2374
  value: Wn
2375
- }, c)), j.createElement(uo, {
2375
+ }, c)), F.createElement(uo, {
2376
2376
  disabled: (a == null ? void 0 : a.restoreFocus) === !1
2377
- })), j.createElement(hr, {
2377
+ })), F.createElement(hr, {
2378
2378
  ...a,
2379
- hiddenTextDescribedById: Se
2379
+ hiddenTextDescribedById: ve
2380
2380
  }));
2381
2381
  function Zn() {
2382
- const U = (xe == null ? void 0 : xe.autoScrollEnabled) === !1, ee = typeof l == "object" ? l.enabled === !1 : l === !1, te = I && !U && !ee;
2382
+ const K = (fe == null ? void 0 : fe.autoScrollEnabled) === !1, ee = typeof l == "object" ? l.enabled === !1 : l === !1, te = w && !K && !ee;
2383
2383
  return typeof l == "object" ? {
2384
2384
  ...l,
2385
2385
  enabled: te
@@ -2402,19 +2402,19 @@ function bo(e) {
2402
2402
  activeNodeRect: c,
2403
2403
  ariaDescribedById: u,
2404
2404
  draggableNodes: d,
2405
- over: f
2406
- } = we(qe), {
2407
- role: h = cn,
2408
- roleDescription: b = "draggable",
2405
+ over: h
2406
+ } = De(qe), {
2407
+ role: f = cn,
2408
+ roleDescription: m = "draggable",
2409
2409
  tabIndex: g = 0
2410
- } = o ?? {}, p = (l == null ? void 0 : l.id) === t, m = we(p ? vt : po), [w, y] = ot(), [C, x] = ot(), I = no(s, t), R = Ye(n);
2410
+ } = o ?? {}, p = (l == null ? void 0 : l.id) === t, b = De(p ? vt : po), [D, y] = ot(), [R, x] = ot(), w = no(s, t), I = Ye(n);
2411
2411
  ie(
2412
2412
  () => (d.set(t, {
2413
2413
  id: t,
2414
2414
  key: i,
2415
- node: w,
2416
- activatorNode: C,
2417
- data: R
2415
+ node: D,
2416
+ activatorNode: R,
2417
+ data: I
2418
2418
  }), () => {
2419
2419
  const N = d.get(t);
2420
2420
  N && N.key === i && d.delete(t);
@@ -2423,29 +2423,29 @@ function bo(e) {
2423
2423
  [d, t]
2424
2424
  );
2425
2425
  const E = T(() => ({
2426
- role: h,
2426
+ role: f,
2427
2427
  tabIndex: g,
2428
2428
  "aria-disabled": r,
2429
- "aria-pressed": p && h === cn ? !0 : void 0,
2430
- "aria-roledescription": b,
2429
+ "aria-pressed": p && f === cn ? !0 : void 0,
2430
+ "aria-roledescription": m,
2431
2431
  "aria-describedby": u.draggable
2432
- }), [r, h, g, p, b, u.draggable]);
2432
+ }), [r, f, g, p, m, u.draggable]);
2433
2433
  return {
2434
2434
  active: l,
2435
2435
  activatorEvent: a,
2436
2436
  activeNodeRect: c,
2437
2437
  attributes: E,
2438
2438
  isDragging: p,
2439
- listeners: r ? void 0 : I,
2440
- node: w,
2441
- over: f,
2439
+ listeners: r ? void 0 : w,
2440
+ node: D,
2441
+ over: h,
2442
2442
  setNodeRef: y,
2443
2443
  setActivatorNodeRef: x,
2444
- transform: m
2444
+ transform: b
2445
2445
  };
2446
2446
  }
2447
2447
  function kn() {
2448
- return we(Ln);
2448
+ return De(Ln);
2449
2449
  }
2450
2450
  const mo = "Droppable", yo = {
2451
2451
  timeout: 25
@@ -2462,34 +2462,34 @@ function wo(e) {
2462
2462
  dispatch: a,
2463
2463
  over: l,
2464
2464
  measureDroppableContainers: c
2465
- } = we(qe), u = z({
2465
+ } = De(qe), u = k({
2466
2466
  disabled: n
2467
- }), d = z(!1), f = z(null), h = z(null), {
2468
- disabled: b,
2467
+ }), d = k(!1), h = k(null), f = k(null), {
2468
+ disabled: m,
2469
2469
  updateMeasurementsFor: g,
2470
2470
  timeout: p
2471
2471
  } = {
2472
2472
  ...yo,
2473
2473
  ...o
2474
- }, m = Ye(g ?? r), w = $(
2474
+ }, b = Ye(g ?? r), D = z(
2475
2475
  () => {
2476
2476
  if (!d.current) {
2477
2477
  d.current = !0;
2478
2478
  return;
2479
2479
  }
2480
- h.current != null && clearTimeout(h.current), h.current = setTimeout(() => {
2481
- c(Array.isArray(m.current) ? m.current : [m.current]), h.current = null;
2480
+ f.current != null && clearTimeout(f.current), f.current = setTimeout(() => {
2481
+ c(Array.isArray(b.current) ? b.current : [b.current]), f.current = null;
2482
2482
  }, p);
2483
2483
  },
2484
2484
  //eslint-disable-next-line react-hooks/exhaustive-deps
2485
2485
  [p]
2486
2486
  ), y = pt({
2487
- callback: w,
2488
- disabled: b || !s
2489
- }), C = $((E, N) => {
2487
+ callback: D,
2488
+ disabled: m || !s
2489
+ }), R = z((E, N) => {
2490
2490
  y && (N && (y.unobserve(N), d.current = !1), E && y.observe(E));
2491
- }, [y]), [x, I] = ot(C), R = Ye(t);
2492
- return k(() => {
2491
+ }, [y]), [x, w] = ot(R), I = Ye(t);
2492
+ return P(() => {
2493
2493
  !y || !x.current || (y.disconnect(), d.current = !1, y.observe(x.current));
2494
2494
  }, [x, y]), ie(
2495
2495
  () => (a({
@@ -2499,8 +2499,8 @@ function wo(e) {
2499
2499
  key: i,
2500
2500
  disabled: n,
2501
2501
  node: x,
2502
- rect: f,
2503
- data: R
2502
+ rect: h,
2503
+ data: I
2504
2504
  }
2505
2505
  }), () => a({
2506
2506
  type: X.UnregisterDroppable,
@@ -2509,7 +2509,7 @@ function wo(e) {
2509
2509
  })),
2510
2510
  // eslint-disable-next-line react-hooks/exhaustive-deps
2511
2511
  [r]
2512
- ), k(() => {
2512
+ ), P(() => {
2513
2513
  n !== u.current.disabled && (a({
2514
2514
  type: X.SetDroppableDisabled,
2515
2515
  id: r,
@@ -2518,11 +2518,11 @@ function wo(e) {
2518
2518
  }), u.current.disabled = n);
2519
2519
  }, [r, i, n, a]), {
2520
2520
  active: s,
2521
- rect: f,
2521
+ rect: h,
2522
2522
  isOver: (l == null ? void 0 : l.id) === r,
2523
2523
  node: x,
2524
2524
  over: l,
2525
- setNodeRef: I
2525
+ setNodeRef: w
2526
2526
  };
2527
2527
  }
2528
2528
  function xo(e) {
@@ -2542,7 +2542,7 @@ function xo(e) {
2542
2542
  Promise.resolve(t(c, i)).then(() => {
2543
2543
  o(null);
2544
2544
  });
2545
- }, [t, r, i]), j.createElement(j.Fragment, null, n, r ? er(r, {
2545
+ }, [t, r, i]), F.createElement(F.Fragment, null, n, r ? er(r, {
2546
2546
  ref: s
2547
2547
  }) : null);
2548
2548
  }
@@ -2556,9 +2556,9 @@ function Co(e) {
2556
2556
  let {
2557
2557
  children: t
2558
2558
  } = e;
2559
- return j.createElement(qe.Provider, {
2559
+ return F.createElement(qe.Provider, {
2560
2560
  value: Nn
2561
- }, j.createElement(vt.Provider, {
2561
+ }, F.createElement(vt.Provider, {
2562
2562
  value: Do
2563
2563
  }, t));
2564
2564
  }
@@ -2583,20 +2583,20 @@ const So = {
2583
2583
  ...c,
2584
2584
  scaleX: 1,
2585
2585
  scaleY: 1
2586
- }, f = {
2586
+ }, h = {
2587
2587
  ...So,
2588
2588
  width: a.width,
2589
2589
  height: a.height,
2590
2590
  top: a.top,
2591
2591
  left: a.left,
2592
- transform: ge.Transform.toString(d),
2592
+ transform: he.Transform.toString(d),
2593
2593
  transformOrigin: o && r ? vr(r, a) : void 0,
2594
2594
  transition: typeof u == "function" ? u(r) : u,
2595
2595
  ...l
2596
2596
  };
2597
- return j.createElement(n, {
2597
+ return F.createElement(n, {
2598
2598
  className: s,
2599
- style: f,
2599
+ style: h,
2600
2600
  ref: t
2601
2601
  }, i);
2602
2602
  }), Eo = (e) => (t) => {
@@ -2627,11 +2627,11 @@ const So = {
2627
2627
  }
2628
2628
  } = e;
2629
2629
  return [{
2630
- transform: ge.Transform.toString(t)
2630
+ transform: he.Transform.toString(t)
2631
2631
  }, {
2632
- transform: ge.Transform.toString(n)
2632
+ transform: he.Transform.toString(n)
2633
2633
  }];
2634
- }, Tt = {
2634
+ }, At = {
2635
2635
  duration: 250,
2636
2636
  easing: "ease",
2637
2637
  keyframes: Oo,
@@ -2643,7 +2643,7 @@ const So = {
2643
2643
  }
2644
2644
  })
2645
2645
  };
2646
- function To(e) {
2646
+ function Ao(e) {
2647
2647
  let {
2648
2648
  config: t,
2649
2649
  draggableNodes: n,
@@ -2664,11 +2664,11 @@ function To(e) {
2664
2664
  return;
2665
2665
  const {
2666
2666
  transform: u
2667
- } = G(s).getComputedStyle(s), d = xn(u);
2667
+ } = J(s).getComputedStyle(s), d = xn(u);
2668
2668
  if (!d)
2669
2669
  return;
2670
- const f = typeof t == "function" ? t : Ao(t);
2671
- return On(l, o.draggable.measure), f({
2670
+ const h = typeof t == "function" ? t : To(t);
2671
+ return On(l, o.draggable.measure), h({
2672
2672
  active: {
2673
2673
  id: i,
2674
2674
  data: a.data,
@@ -2686,14 +2686,14 @@ function To(e) {
2686
2686
  });
2687
2687
  });
2688
2688
  }
2689
- function Ao(e) {
2689
+ function To(e) {
2690
2690
  const {
2691
2691
  duration: t,
2692
2692
  easing: n,
2693
2693
  sideEffects: r,
2694
2694
  keyframes: o
2695
2695
  } = {
2696
- ...Tt,
2696
+ ...At,
2697
2697
  ...e
2698
2698
  };
2699
2699
  return (i) => {
@@ -2711,33 +2711,33 @@ function Ao(e) {
2711
2711
  }, d = {
2712
2712
  scaleX: l.scaleX !== 1 ? s.rect.width * l.scaleX / a.rect.width : 1,
2713
2713
  scaleY: l.scaleY !== 1 ? s.rect.height * l.scaleY / a.rect.height : 1
2714
- }, f = {
2714
+ }, h = {
2715
2715
  x: l.x - u.x,
2716
2716
  y: l.y - u.y,
2717
2717
  ...d
2718
- }, h = o({
2718
+ }, f = o({
2719
2719
  ...c,
2720
2720
  active: s,
2721
2721
  dragOverlay: a,
2722
2722
  transform: {
2723
2723
  initial: l,
2724
- final: f
2724
+ final: h
2725
2725
  }
2726
- }), [b] = h, g = h[h.length - 1];
2727
- if (JSON.stringify(b) === JSON.stringify(g))
2726
+ }), [m] = f, g = f[f.length - 1];
2727
+ if (JSON.stringify(m) === JSON.stringify(g))
2728
2728
  return;
2729
2729
  const p = r == null ? void 0 : r({
2730
2730
  active: s,
2731
2731
  dragOverlay: a,
2732
2732
  ...c
2733
- }), m = a.node.animate(h, {
2733
+ }), b = a.node.animate(f, {
2734
2734
  duration: t,
2735
2735
  easing: n,
2736
2736
  fill: "forwards"
2737
2737
  });
2738
- return new Promise((w) => {
2739
- m.onfinish = () => {
2740
- p == null || p(), w();
2738
+ return new Promise((D) => {
2739
+ b.onfinish = () => {
2740
+ p == null || p(), D();
2741
2741
  };
2742
2742
  });
2743
2743
  };
@@ -2749,7 +2749,7 @@ function Mo(e) {
2749
2749
  return un++, un;
2750
2750
  }, [e]);
2751
2751
  }
2752
- const No = /* @__PURE__ */ j.memo((e) => {
2752
+ const No = /* @__PURE__ */ F.memo((e) => {
2753
2753
  let {
2754
2754
  adjustScale: t = !1,
2755
2755
  children: n,
@@ -2764,38 +2764,38 @@ const No = /* @__PURE__ */ j.memo((e) => {
2764
2764
  const {
2765
2765
  activatorEvent: u,
2766
2766
  active: d,
2767
- activeNodeRect: f,
2768
- containerNodeRect: h,
2769
- draggableNodes: b,
2767
+ activeNodeRect: h,
2768
+ containerNodeRect: f,
2769
+ draggableNodes: m,
2770
2770
  droppableContainers: g,
2771
2771
  dragOverlay: p,
2772
- over: m,
2773
- measuringConfiguration: w,
2772
+ over: b,
2773
+ measuringConfiguration: D,
2774
2774
  scrollableAncestors: y,
2775
- scrollableAncestorRects: C,
2775
+ scrollableAncestorRects: R,
2776
2776
  windowRect: x
2777
- } = kn(), I = we(vt), R = Mo(d == null ? void 0 : d.id), E = Pn(s, {
2777
+ } = kn(), w = De(vt), I = Mo(d == null ? void 0 : d.id), E = Pn(s, {
2778
2778
  activatorEvent: u,
2779
2779
  active: d,
2780
- activeNodeRect: f,
2781
- containerNodeRect: h,
2780
+ activeNodeRect: h,
2781
+ containerNodeRect: f,
2782
2782
  draggingNodeRect: p.rect,
2783
- over: m,
2783
+ over: b,
2784
2784
  overlayNodeRect: p.rect,
2785
2785
  scrollableAncestors: y,
2786
- scrollableAncestorRects: C,
2787
- transform: I,
2786
+ scrollableAncestorRects: R,
2787
+ transform: w,
2788
2788
  windowRect: x
2789
- }), N = jt(f), B = To({
2789
+ }), N = jt(h), _ = Ao({
2790
2790
  config: r,
2791
- draggableNodes: b,
2791
+ draggableNodes: m,
2792
2792
  droppableContainers: g,
2793
- measuringConfiguration: w
2793
+ measuringConfiguration: D
2794
2794
  }), A = N ? p.setRef : void 0;
2795
- return j.createElement(Co, null, j.createElement(xo, {
2796
- animation: B
2797
- }, d && R ? j.createElement(Ro, {
2798
- key: R,
2795
+ return F.createElement(Co, null, F.createElement(xo, {
2796
+ animation: _
2797
+ }, d && I ? F.createElement(Ro, {
2798
+ key: I,
2799
2799
  id: d.id,
2800
2800
  ref: A,
2801
2801
  as: a,
@@ -2896,7 +2896,7 @@ function Bo(e, t, n) {
2896
2896
  const r = e[t], o = e[t - 1], i = e[t + 1];
2897
2897
  return r ? n < t ? o ? r.top - (o.top + o.height) : i ? i.top - (r.top + r.height) : 0 : i ? i.top - (r.top + r.height) : o ? r.top - (o.top + o.height) : 0 : 0;
2898
2898
  }
2899
- const Bn = "Sortable", $n = /* @__PURE__ */ j.createContext({
2899
+ const Bn = "Sortable", $n = /* @__PURE__ */ F.createContext({
2900
2900
  activeIndex: -1,
2901
2901
  containerId: Bn,
2902
2902
  disableTransforms: !1,
@@ -2924,28 +2924,28 @@ function $o(e) {
2924
2924
  droppableRects: l,
2925
2925
  over: c,
2926
2926
  measureDroppableContainers: u
2927
- } = kn(), d = Je(Bn, n), f = a.rect !== null, h = T(() => r.map((I) => typeof I == "object" && "id" in I ? I.id : I), [r]), b = s != null, g = s ? h.indexOf(s.id) : -1, p = c ? h.indexOf(c.id) : -1, m = z(h), w = !Po(h, m.current), y = p !== -1 && g === -1 || w, C = ko(i);
2927
+ } = kn(), d = Je(Bn, n), h = a.rect !== null, f = T(() => r.map((w) => typeof w == "object" && "id" in w ? w.id : w), [r]), m = s != null, g = s ? f.indexOf(s.id) : -1, p = c ? f.indexOf(c.id) : -1, b = k(f), D = !Po(f, b.current), y = p !== -1 && g === -1 || D, R = ko(i);
2928
2928
  ie(() => {
2929
- w && b && u(h);
2930
- }, [w, h, b, u]), k(() => {
2931
- m.current = h;
2932
- }, [h]);
2929
+ D && m && u(f);
2930
+ }, [D, f, m, u]), P(() => {
2931
+ b.current = f;
2932
+ }, [f]);
2933
2933
  const x = T(
2934
2934
  () => ({
2935
2935
  activeIndex: g,
2936
2936
  containerId: d,
2937
- disabled: C,
2937
+ disabled: R,
2938
2938
  disableTransforms: y,
2939
- items: h,
2939
+ items: f,
2940
2940
  overIndex: p,
2941
- useDragOverlay: f,
2942
- sortedRects: Lo(h, l),
2941
+ useDragOverlay: h,
2942
+ sortedRects: Lo(f, l),
2943
2943
  strategy: o
2944
2944
  }),
2945
2945
  // eslint-disable-next-line react-hooks/exhaustive-deps
2946
- [g, d, C.draggable, C.droppable, y, h, p, l, f, o]
2946
+ [g, d, R.draggable, R.droppable, y, f, p, l, h, o]
2947
2947
  );
2948
- return j.createElement($n.Provider, {
2948
+ return F.createElement($n.Provider, {
2949
2949
  value: x
2950
2950
  }, t);
2951
2951
  }
@@ -2973,7 +2973,7 @@ const _o = (e) => {
2973
2973
  }, Fo = {
2974
2974
  duration: 200,
2975
2975
  easing: "ease"
2976
- }, _n = "transform", Ho = /* @__PURE__ */ ge.Transition.toString({
2976
+ }, _n = "transform", Ho = /* @__PURE__ */ he.Transition.toString({
2977
2977
  property: _n,
2978
2978
  duration: 0,
2979
2979
  easing: "linear"
@@ -2987,12 +2987,12 @@ function Yo(e) {
2987
2987
  node: r,
2988
2988
  rect: o
2989
2989
  } = e;
2990
- const [i, s] = V(null), a = z(n);
2990
+ const [i, s] = V(null), a = k(n);
2991
2991
  return ie(() => {
2992
2992
  if (!t && n !== a.current && r.current) {
2993
2993
  const l = o.current;
2994
2994
  if (l) {
2995
- const c = Pe(r.current, {
2995
+ const c = Le(r.current, {
2996
2996
  ignoreTransform: !0
2997
2997
  }), u = {
2998
2998
  x: l.left - c.left,
@@ -3004,7 +3004,7 @@ function Yo(e) {
3004
3004
  }
3005
3005
  }
3006
3006
  n !== a.current && (a.current = n);
3007
- }, [t, n, r, o]), k(() => {
3007
+ }, [t, n, r, o]), P(() => {
3008
3008
  i && s(null);
3009
3009
  }, [i]), i;
3010
3010
  }
@@ -3023,31 +3023,31 @@ function Vo(e) {
3023
3023
  const {
3024
3024
  items: u,
3025
3025
  containerId: d,
3026
- activeIndex: f,
3027
- disabled: h,
3028
- disableTransforms: b,
3026
+ activeIndex: h,
3027
+ disabled: f,
3028
+ disableTransforms: m,
3029
3029
  sortedRects: g,
3030
3030
  overIndex: p,
3031
- useDragOverlay: m,
3032
- strategy: w
3033
- } = we($n), y = Ko(r, h), C = u.indexOf(s), x = T(() => ({
3031
+ useDragOverlay: b,
3032
+ strategy: D
3033
+ } = De($n), y = Ko(r, f), R = u.indexOf(s), x = T(() => ({
3034
3034
  sortable: {
3035
3035
  containerId: d,
3036
- index: C,
3036
+ index: R,
3037
3037
  items: u
3038
3038
  },
3039
3039
  ...o
3040
- }), [d, o, C, u]), I = T(() => u.slice(u.indexOf(s)), [u, s]), {
3041
- rect: R,
3040
+ }), [d, o, R, u]), w = T(() => u.slice(u.indexOf(s)), [u, s]), {
3041
+ rect: I,
3042
3042
  node: E,
3043
3043
  isOver: N,
3044
- setNodeRef: B
3044
+ setNodeRef: _
3045
3045
  } = wo({
3046
3046
  id: s,
3047
3047
  data: x,
3048
3048
  disabled: y.droppable,
3049
3049
  resizeObserverConfig: {
3050
- updateMeasurementsFor: I,
3050
+ updateMeasurementsFor: w,
3051
3051
  ...l
3052
3052
  }
3053
3053
  }), {
@@ -3055,12 +3055,12 @@ function Vo(e) {
3055
3055
  activatorEvent: Z,
3056
3056
  activeNodeRect: Q,
3057
3057
  attributes: ne,
3058
- setNodeRef: xe,
3059
- listeners: De,
3060
- isDragging: J,
3061
- over: Ce,
3062
- setActivatorNodeRef: se,
3063
- transform: Se
3058
+ setNodeRef: fe,
3059
+ listeners: Ce,
3060
+ isDragging: W,
3061
+ over: Se,
3062
+ setActivatorNodeRef: pe,
3063
+ transform: ve
3064
3064
  } = bo({
3065
3065
  id: s,
3066
3066
  data: x,
@@ -3069,86 +3069,86 @@ function Vo(e) {
3069
3069
  ...n
3070
3070
  },
3071
3071
  disabled: y.draggable
3072
- }), v = tr(B, xe), D = !!A, P = D && !b && tt(f) && tt(p), M = !m && J, F = M && P ? Se : null, K = P ? F ?? (a ?? w)({
3072
+ }), Pe = tr(_, fe), v = !!A, C = v && !m && tt(h) && tt(p), B = !b && W, L = B && C ? ve : null, q = C ? L ?? (a ?? D)({
3073
3073
  rects: g,
3074
3074
  activeNodeRect: Q,
3075
- activeIndex: f,
3075
+ activeIndex: h,
3076
3076
  overIndex: p,
3077
- index: C
3078
- }) : null, q = tt(f) && tt(p) ? i({
3077
+ index: R
3078
+ }) : null, H = tt(h) && tt(p) ? i({
3079
3079
  id: s,
3080
3080
  items: u,
3081
- activeIndex: f,
3081
+ activeIndex: h,
3082
3082
  overIndex: p
3083
- }) : C, W = A == null ? void 0 : A.id, O = z({
3084
- activeId: W,
3083
+ }) : R, U = A == null ? void 0 : A.id, O = k({
3084
+ activeId: U,
3085
3085
  items: u,
3086
- newIndex: q,
3086
+ newIndex: H,
3087
3087
  containerId: d
3088
- }), he = u !== O.current.items, L = t({
3088
+ }), se = u !== O.current.items, G = t({
3089
3089
  active: A,
3090
3090
  containerId: d,
3091
- isDragging: J,
3092
- isSorting: D,
3091
+ isDragging: W,
3092
+ isSorting: v,
3093
3093
  id: s,
3094
- index: C,
3094
+ index: R,
3095
3095
  items: u,
3096
3096
  newIndex: O.current.newIndex,
3097
3097
  previousItems: O.current.items,
3098
3098
  previousContainerId: O.current.containerId,
3099
3099
  transition: c,
3100
3100
  wasDragging: O.current.activeId != null
3101
- }), pe = Yo({
3102
- disabled: !L,
3103
- index: C,
3101
+ }), j = Yo({
3102
+ disabled: !G,
3103
+ index: R,
3104
3104
  node: E,
3105
- rect: R
3105
+ rect: I
3106
3106
  });
3107
- return k(() => {
3108
- D && O.current.newIndex !== q && (O.current.newIndex = q), d !== O.current.containerId && (O.current.containerId = d), u !== O.current.items && (O.current.items = u);
3109
- }, [D, q, d, u]), k(() => {
3110
- if (W === O.current.activeId)
3107
+ return P(() => {
3108
+ v && O.current.newIndex !== H && (O.current.newIndex = H), d !== O.current.containerId && (O.current.containerId = d), u !== O.current.items && (O.current.items = u);
3109
+ }, [v, H, d, u]), P(() => {
3110
+ if (U === O.current.activeId)
3111
3111
  return;
3112
- if (W && !O.current.activeId) {
3113
- O.current.activeId = W;
3112
+ if (U && !O.current.activeId) {
3113
+ O.current.activeId = U;
3114
3114
  return;
3115
3115
  }
3116
- const Ie = setTimeout(() => {
3117
- O.current.activeId = W;
3116
+ const be = setTimeout(() => {
3117
+ O.current.activeId = U;
3118
3118
  }, 50);
3119
- return () => clearTimeout(Ie);
3120
- }, [W]), {
3119
+ return () => clearTimeout(be);
3120
+ }, [U]), {
3121
3121
  active: A,
3122
- activeIndex: f,
3122
+ activeIndex: h,
3123
3123
  attributes: ne,
3124
3124
  data: x,
3125
- rect: R,
3126
- index: C,
3127
- newIndex: q,
3125
+ rect: I,
3126
+ index: R,
3127
+ newIndex: H,
3128
3128
  items: u,
3129
3129
  isOver: N,
3130
- isSorting: D,
3131
- isDragging: J,
3132
- listeners: De,
3130
+ isSorting: v,
3131
+ isDragging: W,
3132
+ listeners: Ce,
3133
3133
  node: E,
3134
3134
  overIndex: p,
3135
- over: Ce,
3136
- setNodeRef: v,
3137
- setActivatorNodeRef: se,
3138
- setDroppableNodeRef: B,
3139
- setDraggableNodeRef: xe,
3140
- transform: pe ?? K,
3135
+ over: Se,
3136
+ setNodeRef: Pe,
3137
+ setActivatorNodeRef: pe,
3138
+ setDroppableNodeRef: _,
3139
+ setDraggableNodeRef: fe,
3140
+ transform: j ?? q,
3141
3141
  transition: ae()
3142
3142
  };
3143
3143
  function ae() {
3144
3144
  if (
3145
3145
  // Temporarily disable transitions for a single frame to set up derived transforms
3146
- pe || // Or to prevent items jumping to back to their "new" position when items change
3147
- he && O.current.newIndex === C
3146
+ j || // Or to prevent items jumping to back to their "new" position when items change
3147
+ se && O.current.newIndex === R
3148
3148
  )
3149
3149
  return Ho;
3150
- if (!(M && !ht(Z) || !c) && (D || L))
3151
- return ge.Transition.toString({
3150
+ if (!(B && !ht(Z) || !c) && (v || G))
3151
+ return he.Transition.toString({
3152
3152
  ...c,
3153
3153
  property: _n
3154
3154
  });
@@ -3170,15 +3170,15 @@ const Uo = /iPad|iPhone|iPod/.test(navigator.platform);
3170
3170
  function Wo(e, t) {
3171
3171
  return Math.round(e / t);
3172
3172
  }
3173
- function At(e, t, n, r, o) {
3174
- const i = e.findIndex(({ id: m }) => m === n), s = e.findIndex(({ id: m }) => m === t), a = e[s], l = Ve(e, s, i), c = l[i - 1], u = l[i + 1], d = Wo(r, o), f = a.depth + d, h = Jo({
3173
+ function Tt(e, t, n, r, o) {
3174
+ const i = e.findIndex(({ id: b }) => b === n), s = e.findIndex(({ id: b }) => b === t), a = e[s], l = Ve(e, s, i), c = l[i - 1], u = l[i + 1], d = Wo(r, o), h = a.depth + d, f = Jo({
3175
3175
  previousItem: c
3176
- }), b = qo({ nextItem: u });
3177
- let g = f;
3178
- return f >= h ? g = h : f < b && (g = b), { depth: g, maxDepth: h, minDepth: b, parentId: p() };
3176
+ }), m = qo({ nextItem: u });
3177
+ let g = h;
3178
+ return h >= f ? g = f : h < m && (g = m), { depth: g, maxDepth: f, minDepth: m, parentId: p() };
3179
3179
  function p() {
3180
- var w;
3181
- return g === 0 || !c ? null : g === c.depth ? c.parentId : g > c.depth ? c.id : ((w = l.slice(0, i).reverse().find((y) => y.depth === g)) == null ? void 0 : w.parentId) ?? null;
3180
+ var D;
3181
+ return g === 0 || !c ? null : g === c.depth ? c.parentId : g > c.depth ? c.id : ((D = l.slice(0, i).reverse().find((y) => y.depth === g)) == null ? void 0 : D.parentId) ?? null;
3182
3182
  }
3183
3183
  }
3184
3184
  function Jo({ previousItem: e }) {
@@ -3204,38 +3204,33 @@ function Go(e) {
3204
3204
  function Zo(e, t) {
3205
3205
  return e.find(({ id: n }) => n === t);
3206
3206
  }
3207
- function Fn(e, t) {
3208
- for (const n of e) {
3209
- const { id: r, children: o } = n;
3210
- if (r === t)
3211
- return n;
3212
- if (o.length) {
3213
- const i = Fn(o, t);
3214
- if (i)
3215
- return i;
3216
- }
3217
- }
3218
- }
3219
3207
  function Qo(e, t) {
3208
+ return Fn(e, t);
3209
+ }
3210
+ function ei(e, t) {
3220
3211
  const { items: n, itemMap: r } = e, o = new Map(r);
3221
3212
  function i(a) {
3222
3213
  return a.filter((l) => l.id === t ? (o.delete(t), !1) : (l.children.length && (l.children = i(l.children)), !0));
3223
3214
  }
3224
3215
  return { items: i(n), itemMap: o };
3225
3216
  }
3226
- function ei(e, t, n) {
3227
- const { items: r, itemMap: o } = e, i = o.get(t);
3217
+ function ti(e, t, n) {
3218
+ const { items: r, itemMap: o } = e, i = Fn(e, t);
3228
3219
  if (!i) return e;
3229
3220
  const s = { ...i, ...n(i) }, a = new Map(o);
3230
3221
  a.set(t, s);
3231
3222
  function l(u) {
3232
- return u.map((d) => d.id === t ? (s.children && s.children.forEach((f) => {
3233
- a.set(f.id, f);
3223
+ return u.map((d) => d.id === t ? (s.children && s.children.forEach((h) => {
3224
+ a.set(h.id, h);
3234
3225
  }), s) : d.children.length ? { ...d, children: l(d.children) } : d);
3235
3226
  }
3236
3227
  return { items: l(r), itemMap: a };
3237
3228
  }
3238
- function ti(e) {
3229
+ function Fn(e, t) {
3230
+ const { itemMap: n } = e;
3231
+ return n.get(t);
3232
+ }
3233
+ function ni(e) {
3239
3234
  const t = /* @__PURE__ */ new Map();
3240
3235
  function n(r) {
3241
3236
  t.set(r.id, r), r.children.forEach(n);
@@ -3245,32 +3240,32 @@ function ti(e) {
3245
3240
  function Hn(e, t = 0) {
3246
3241
  return e.reduce((n, { children: r }) => r.length ? Hn(r, n + 1) : n + 1, t);
3247
3242
  }
3248
- function ni(e, t) {
3249
- const n = Fn(e, t);
3243
+ function ri(e, t) {
3244
+ const n = Qo(e, t);
3250
3245
  return n ? Hn(n.children) : 0;
3251
3246
  }
3252
- function ri(e, t) {
3247
+ function oi(e, t) {
3253
3248
  const n = [...t];
3254
3249
  return e.filter((r) => r.parentId && n.includes(r.parentId) ? (r.children.length && n.push(r.id), !1) : !0);
3255
3250
  }
3256
- const oi = [
3251
+ const ii = [
3257
3252
  S.Down,
3258
3253
  S.Right,
3259
3254
  S.Up,
3260
3255
  S.Left
3261
- ], ii = [S.Left, S.Right], si = (e, t, n) => (r, {
3256
+ ], si = [S.Left, S.Right], ai = (e, t, n) => (r, {
3262
3257
  currentCoordinates: o,
3263
3258
  context: { active: i, over: s, collisionRect: a, droppableRects: l, droppableContainers: c }
3264
3259
  }) => {
3265
- if (oi.includes(r.code)) {
3260
+ if (ii.includes(r.code)) {
3266
3261
  if (!i || !a)
3267
3262
  return;
3268
3263
  r.preventDefault();
3269
3264
  const {
3270
3265
  current: { items: u, offset: d }
3271
3266
  } = e;
3272
- if (ii.includes(r.code) && (s != null && s.id)) {
3273
- const { depth: g, maxDepth: p, minDepth: m } = At(
3267
+ if (si.includes(r.code) && (s != null && s.id)) {
3268
+ const { depth: g, maxDepth: p, minDepth: b } = Tt(
3274
3269
  u,
3275
3270
  i.id,
3276
3271
  s.id,
@@ -3279,7 +3274,7 @@ const oi = [
3279
3274
  );
3280
3275
  switch (r.code) {
3281
3276
  case S.Left:
3282
- if (g > m)
3277
+ if (g > b)
3283
3278
  return {
3284
3279
  ...o,
3285
3280
  x: o.x - n
@@ -3295,7 +3290,7 @@ const oi = [
3295
3290
  }
3296
3291
  return;
3297
3292
  }
3298
- const f = [];
3293
+ const h = [];
3299
3294
  c.forEach((g) => {
3300
3295
  if (g != null && g.disabled || g.id === (s == null ? void 0 : s.id))
3301
3296
  return;
@@ -3303,55 +3298,55 @@ const oi = [
3303
3298
  if (p)
3304
3299
  switch (r.code) {
3305
3300
  case S.Down:
3306
- a.top < p.top && f.push(g);
3301
+ a.top < p.top && h.push(g);
3307
3302
  break;
3308
3303
  case S.Up:
3309
- a.top > p.top && f.push(g);
3304
+ a.top > p.top && h.push(g);
3310
3305
  break;
3311
3306
  }
3312
3307
  });
3313
- const h = yr({
3308
+ const f = yr({
3314
3309
  active: i,
3315
3310
  collisionRect: a,
3316
3311
  pointerCoordinates: null,
3317
3312
  droppableRects: l,
3318
- droppableContainers: f
3313
+ droppableContainers: h
3319
3314
  });
3320
- let b = yn(h, "id");
3321
- if (b === (s == null ? void 0 : s.id) && h.length > 1 && (b = h[1].id), b && (s != null && s.id)) {
3322
- const g = l.get(i.id), p = l.get(b), m = c.get(b);
3323
- if (g && p && m) {
3324
- const w = u.findIndex(({ id: I }) => I === b), y = u[w], C = u.findIndex(({ id: I }) => I === i.id), x = u[C];
3315
+ let m = yn(f, "id");
3316
+ if (m === (s == null ? void 0 : s.id) && f.length > 1 && (m = f[1].id), m && (s != null && s.id)) {
3317
+ const g = l.get(i.id), p = l.get(m), b = c.get(m);
3318
+ if (g && p && b) {
3319
+ const D = u.findIndex(({ id: w }) => w === m), y = u[D], R = u.findIndex(({ id: w }) => w === i.id), x = u[R];
3325
3320
  if (y && x) {
3326
- const { depth: I } = At(
3321
+ const { depth: w } = Tt(
3327
3322
  u,
3328
3323
  i.id,
3329
- b,
3324
+ m,
3330
3325
  (y.depth - x.depth) * n,
3331
3326
  n
3332
- ), E = w > C ? 1 : -1, N = t ? (a.height - g.height) / 2 : 0;
3327
+ ), E = D > R ? 1 : -1, N = t ? (a.height - g.height) / 2 : 0;
3333
3328
  return {
3334
- x: p.left + I * n,
3329
+ x: p.left + w * n,
3335
3330
  y: p.top + E * N
3336
3331
  };
3337
3332
  }
3338
3333
  }
3339
3334
  }
3340
3335
  }
3341
- }, ai = "_Wrapper_1ewsl_1", li = "_clone_1ewsl_8", ci = "_TreeItem_1ewsl_16", ui = "_ghost_1ewsl_23", di = "_indicator_1ewsl_23", fi = "_Text_1ewsl_78", gi = "_Count_1ewsl_90", hi = "_disableInteraction_1ewsl_106", pi = "_disableSelection_1ewsl_110", vi = "_Collapse_1ewsl_118", bi = "_collapsed_1ewsl_122", ue = {
3342
- Wrapper: ai,
3343
- clone: li,
3344
- TreeItem: ci,
3345
- ghost: ui,
3346
- indicator: di,
3347
- Text: fi,
3348
- Count: gi,
3349
- disableInteraction: hi,
3350
- disableSelection: pi,
3351
- Collapse: vi,
3352
- collapsed: bi
3336
+ }, li = "_Wrapper_wguit_1", ci = "_clone_wguit_8", ui = "_TreeItem_wguit_16", di = "_ghost_wguit_23", fi = "_indicator_wguit_23", gi = "_Text_wguit_78", hi = "_Count_wguit_90", pi = "_disableInteraction_wguit_106", vi = "_disableSelection_wguit_110", bi = "_Collapse_wguit_118", mi = "_collapsed_wguit_122", ue = {
3337
+ Wrapper: li,
3338
+ clone: ci,
3339
+ TreeItem: ui,
3340
+ ghost: di,
3341
+ indicator: fi,
3342
+ Text: gi,
3343
+ Count: hi,
3344
+ disableInteraction: pi,
3345
+ disableSelection: vi,
3346
+ Collapse: bi,
3347
+ collapsed: mi
3353
3348
  };
3354
- function mi(e) {
3349
+ function yi(e) {
3355
3350
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
3356
3351
  }
3357
3352
  var Xn = { exports: {} };
@@ -3390,16 +3385,16 @@ var Xn = { exports: {} };
3390
3385
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
3391
3386
  })();
3392
3387
  })(Xn);
3393
- var yi = Xn.exports;
3394
- const Mt = /* @__PURE__ */ mi(yi), wi = "_Action_1vzup_1", xi = {
3395
- Action: wi
3388
+ var wi = Xn.exports;
3389
+ const Mt = /* @__PURE__ */ yi(wi), xi = "_Action_7i4a4_1", Di = {
3390
+ Action: xi
3396
3391
  }, bt = dt(
3397
- ({ active: e, className: t, cursor: n, style: r, ...o }, i) => /* @__PURE__ */ _(
3392
+ ({ active: e, className: t, cursor: n, style: r, ...o }, i) => /* @__PURE__ */ $(
3398
3393
  "button",
3399
3394
  {
3400
3395
  ref: i,
3401
3396
  ...o,
3402
- className: Mt(xi.Action, t),
3397
+ className: Mt(Di.Action, t),
3403
3398
  tabIndex: 0,
3404
3399
  style: {
3405
3400
  ...r,
@@ -3409,20 +3404,9 @@ const Mt = /* @__PURE__ */ mi(yi), wi = "_Action_1vzup_1", xi = {
3409
3404
  }
3410
3405
  }
3411
3406
  )
3412
- ), Di = dt(
3413
- (e, t) => /* @__PURE__ */ _(
3414
- bt,
3415
- {
3416
- ref: t,
3417
- cursor: "grab",
3418
- "data-cypress": "draggable-handle",
3419
- ...e,
3420
- children: /* @__PURE__ */ _("svg", { viewBox: "0 0 20 20", width: "12", children: /* @__PURE__ */ _("path", { d: "M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14zm6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6zm0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14z" }) })
3421
- }
3422
- )
3423
- );
3424
- function Ci(e) {
3425
- return /* @__PURE__ */ _(
3407
+ ), Ci = dt((e, t) => /* @__PURE__ */ $(bt, { ref: t, cursor: "grab", "data-cypress": "draggable-handle", ...e, children: /* @__PURE__ */ $("svg", { viewBox: "0 0 20 20", width: "12", children: /* @__PURE__ */ $("path", { d: "M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14zm6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6zm0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14z" }) }) }));
3408
+ function Si(e) {
3409
+ return /* @__PURE__ */ $(
3426
3410
  bt,
3427
3411
  {
3428
3412
  ...e,
@@ -3430,7 +3414,7 @@ function Ci(e) {
3430
3414
  fill: "rgba(255, 70, 70, 0.95)",
3431
3415
  background: "rgba(255, 70, 70, 0.1)"
3432
3416
  },
3433
- children: /* @__PURE__ */ _(
3417
+ children: /* @__PURE__ */ $(
3434
3418
  "svg",
3435
3419
  {
3436
3420
  width: "18",
@@ -3438,14 +3422,14 @@ function Ci(e) {
3438
3422
  viewBox: "0 0 18 18",
3439
3423
  fill: "none",
3440
3424
  xmlns: "http://www.w3.org/2000/svg",
3441
- children: /* @__PURE__ */ _("path", { d: "M5.5 1C5.22386 1 5 1.22386 5 1.5C5 1.77614 5.22386 2 5.5 2H9.5C9.77614 2 10 1.77614 10 1.5C10 1.22386 9.77614 1 9.5 1H5.5ZM3 3.5C3 3.22386 3.22386 3 3.5 3H5H10H11.5C11.7761 3 12 3.22386 12 3.5C12 3.77614 11.7761 4 11.5 4H11V12C11 12.5523 10.5523 13 10 13H5C4.44772 13 4 12.5523 4 12V4L3.5 4C3.22386 4 3 3.77614 3 3.5ZM5 4H10V12H5V4Z" })
3425
+ children: /* @__PURE__ */ $("path", { d: "M5.5 1C5.22386 1 5 1.22386 5 1.5C5 1.77614 5.22386 2 5.5 2H9.5C9.77614 2 10 1.77614 10 1.5C10 1.22386 9.77614 1 9.5 1H5.5ZM3 3.5C3 3.22386 3.22386 3 3.5 3H5H10H11.5C11.7761 3 12 3.22386 12 3.5C12 3.77614 11.7761 4 11.5 4H11V12C11 12.5523 10.5523 13 10 13H5C4.44772 13 4 12.5523 4 12V4L3.5 4C3.22386 4 3 3.77614 3 3.5ZM5 4H10V12H5V4Z" })
3442
3426
  }
3443
3427
  )
3444
3428
  }
3445
3429
  );
3446
3430
  }
3447
- function Si(e) {
3448
- return /* @__PURE__ */ _(
3431
+ function Ii(e) {
3432
+ return /* @__PURE__ */ $(
3449
3433
  bt,
3450
3434
  {
3451
3435
  ...e,
@@ -3453,7 +3437,7 @@ function Si(e) {
3453
3437
  fill: "rgba(255, 70, 70, 0.95)",
3454
3438
  background: "rgba(255, 70, 70, 0.1)"
3455
3439
  },
3456
- children: /* @__PURE__ */ _(
3440
+ children: /* @__PURE__ */ $(
3457
3441
  "svg",
3458
3442
  {
3459
3443
  width: "18",
@@ -3461,13 +3445,13 @@ function Si(e) {
3461
3445
  viewBox: "0 0 18 18",
3462
3446
  fill: "none",
3463
3447
  xmlns: "http://www.w3.org/2000/svg",
3464
- children: /* @__PURE__ */ _("path", { d: "M8 2.75C8 2.47386 7.77614 2.25 7.5 2.25C7.22386 2.25 7 2.47386 7 2.75V7H2.75C2.47386 7 2.25 7.22386 2.25 7.5C2.25 7.77614 2.47386 8 2.75 8H7V12.25C7 12.5261 7.22386 12.75 7.5 12.75C7.77614 12.75 8 12.5261 8 12.25V8H12.25C12.5261 8 12.75 7.77614 12.75 7.5C12.75 7.22386 12.5261 7 12.25 7H8V2.75Z" })
3448
+ children: /* @__PURE__ */ $("path", { d: "M8 2.75C8 2.47386 7.77614 2.25 7.5 2.25C7.22386 2.25 7 2.47386 7 2.75V7H2.75C2.47386 7 2.25 7.22386 2.25 7.5C2.25 7.77614 2.47386 8 2.75 8H7V12.25C7 12.5261 7.22386 12.75 7.5 12.75C7.77614 12.75 8 12.5261 8 12.25V8H12.25C12.5261 8 12.75 7.77614 12.75 7.5C12.75 7.22386 12.5261 7 12.25 7H8V2.75Z" })
3465
3449
  }
3466
3450
  )
3467
3451
  }
3468
3452
  );
3469
3453
  }
3470
- const Ii = dt(
3454
+ const Ri = dt(
3471
3455
  ({
3472
3456
  childCount: e,
3473
3457
  clone: t,
@@ -3481,14 +3465,14 @@ const Ii = dt(
3481
3465
  indicator: c,
3482
3466
  collapsed: u,
3483
3467
  onCollapse: d,
3484
- onRemove: f,
3485
- onAdd: h,
3486
- onLabelClick: b,
3468
+ onRemove: h,
3469
+ onAdd: f,
3470
+ onLabelClick: m,
3487
3471
  style: g,
3488
3472
  value: p,
3489
- wrapperRef: m,
3490
- ...w
3491
- }, y) => /* @__PURE__ */ _(
3473
+ wrapperRef: b,
3474
+ ...D
3475
+ }, y) => /* @__PURE__ */ $(
3492
3476
  "li",
3493
3477
  {
3494
3478
  className: Mt(
@@ -3499,22 +3483,29 @@ const Ii = dt(
3499
3483
  r && ue.disableSelection,
3500
3484
  o && ue.disableInteraction
3501
3485
  ),
3502
- ref: m,
3486
+ ref: b,
3503
3487
  style: {
3504
3488
  "--spacing": `${l * n}px`
3505
3489
  },
3506
- ...w,
3490
+ ...D,
3507
3491
  children: /* @__PURE__ */ fn("div", { className: ue.TreeItem, ref: y, style: g, children: [
3508
- !i && /* @__PURE__ */ _(Di, { ...a }),
3509
- d && /* @__PURE__ */ _(bt, { onClick: d, className: Mt(ue.Collapse, u && ue.collapsed), children: Ri }),
3510
- /* @__PURE__ */ _("span", { onClick: b, className: ue.Text, children: p }),
3511
- !t && f && /* @__PURE__ */ _(Ci, { onClick: f }),
3512
- !t && h && /* @__PURE__ */ _(Si, { onClick: h }),
3513
- t && e && e > 1 ? /* @__PURE__ */ _("span", { className: ue.Count, children: e }) : null
3492
+ !i && /* @__PURE__ */ $(Ci, { ...a }),
3493
+ d && /* @__PURE__ */ $(
3494
+ bt,
3495
+ {
3496
+ onClick: d,
3497
+ className: Mt(ue.Collapse, u && ue.collapsed),
3498
+ children: Ei
3499
+ }
3500
+ ),
3501
+ /* @__PURE__ */ $("span", { onClick: m, className: ue.Text, children: p }),
3502
+ !t && h && /* @__PURE__ */ $(Si, { onClick: h }),
3503
+ !t && f && /* @__PURE__ */ $(Ii, { onClick: f }),
3504
+ t && e && e > 1 ? /* @__PURE__ */ $("span", { className: ue.Count, children: e }) : null
3514
3505
  ] })
3515
3506
  }
3516
3507
  )
3517
- ), Ri = /* @__PURE__ */ _("svg", { width: "10", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 70 41", children: /* @__PURE__ */ _("path", { d: "M30.76 39.2402C31.885 40.3638 33.41 40.995 35 40.995C36.59 40.995 38.115 40.3638 39.24 39.2402L68.24 10.2402C69.2998 9.10284 69.8768 7.59846 69.8494 6.04406C69.822 4.48965 69.1923 3.00657 68.093 1.90726C66.9937 0.807959 65.5106 0.178263 63.9562 0.150837C62.4018 0.123411 60.8974 0.700397 59.76 1.76024L35 26.5102L10.24 1.76024C9.10259 0.700397 7.59822 0.123411 6.04381 0.150837C4.4894 0.178263 3.00632 0.807959 1.90702 1.90726C0.807714 3.00657 0.178019 4.48965 0.150593 6.04406C0.123167 7.59846 0.700153 9.10284 1.75999 10.2402L30.76 39.2402Z" }) }), Ei = ut(Ii), Oi = ({ isSorting: e, wasDragging: t }) => !(e || t);
3508
+ ), Ei = /* @__PURE__ */ $("svg", { width: "10", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 70 41", children: /* @__PURE__ */ $("path", { d: "M30.76 39.2402C31.885 40.3638 33.41 40.995 35 40.995C36.59 40.995 38.115 40.3638 39.24 39.2402L68.24 10.2402C69.2998 9.10284 69.8768 7.59846 69.8494 6.04406C69.822 4.48965 69.1923 3.00657 68.093 1.90726C66.9937 0.807959 65.5106 0.178263 63.9562 0.150837C62.4018 0.123411 60.8974 0.700397 59.76 1.76024L35 26.5102L10.24 1.76024C9.10259 0.700397 7.59822 0.123411 6.04381 0.150837C4.4894 0.178263 3.00632 0.807959 1.90702 1.90726C0.807714 3.00657 0.178019 4.48965 0.150593 6.04406C0.123167 7.59846 0.700153 9.10284 1.75999 10.2402L30.76 39.2402Z" }) }), Oi = ut(Ri), Ai = ({ isSorting: e, wasDragging: t }) => !(e || t);
3518
3509
  function Ti({ id: e, depth: t, ...n }) {
3519
3510
  const {
3520
3511
  attributes: r,
@@ -3527,13 +3518,13 @@ function Ti({ id: e, depth: t, ...n }) {
3527
3518
  transition: u
3528
3519
  } = Vo({
3529
3520
  id: e,
3530
- animateLayoutChanges: Oi
3521
+ animateLayoutChanges: Ai
3531
3522
  }), d = {
3532
- transform: ge.Translate.toString(c),
3523
+ transform: he.Translate.toString(c),
3533
3524
  transition: u
3534
3525
  };
3535
- return /* @__PURE__ */ _(
3536
- Ei,
3526
+ return /* @__PURE__ */ $(
3527
+ Oi,
3537
3528
  {
3538
3529
  ref: a,
3539
3530
  wrapperRef: l,
@@ -3550,17 +3541,17 @@ function Ti({ id: e, depth: t, ...n }) {
3550
3541
  }
3551
3542
  );
3552
3543
  }
3553
- const dn = ut(Ti), Ai = {
3544
+ const dn = ut(Ti), Mi = {
3554
3545
  droppable: {
3555
- strategy: Me.Always
3546
+ strategy: Te.Always
3556
3547
  }
3557
- }, Mi = {
3548
+ }, Ni = {
3558
3549
  keyframes({ transform: e }) {
3559
3550
  return [
3560
- { opacity: 1, transform: ge.Transform.toString(e.initial) },
3551
+ { opacity: 1, transform: he.Transform.toString(e.initial) },
3561
3552
  {
3562
3553
  opacity: 0,
3563
- transform: ge.Transform.toString({
3554
+ transform: he.Transform.toString({
3564
3555
  ...e.final,
3565
3556
  x: e.final.x + 5,
3566
3557
  y: e.final.y + 5
@@ -3571,14 +3562,14 @@ const dn = ut(Ti), Ai = {
3571
3562
  easing: "ease-out",
3572
3563
  sideEffects({ active: e }) {
3573
3564
  e.node.animate([{ opacity: 0 }, { opacity: 1 }], {
3574
- duration: Tt.duration,
3575
- easing: Tt.easing
3565
+ duration: At.duration,
3566
+ easing: At.easing
3576
3567
  });
3577
3568
  }
3578
3569
  };
3579
- function Ni({
3580
- items: e,
3581
- onItemsChange: t,
3570
+ function Li({
3571
+ treeStructure: e,
3572
+ setTreeStructure: t,
3582
3573
  isCollapsible: n,
3583
3574
  onLazyLoadChildren: r,
3584
3575
  showDropIndicator: o = !1,
@@ -3590,167 +3581,178 @@ function Ni({
3590
3581
  onDragEnd: u,
3591
3582
  onItemClick: d
3592
3583
  }) {
3593
- const [f, h] = V(null), [b, g] = V(null), [p, m] = V(0), [w, y] = V(null), C = T(() => {
3594
- let v = It(e);
3595
- const D = v.filter(({ parentId: M }) => !M);
3596
- D.length === 1 && (v = v.map(
3597
- (M) => M.id === D[0].id ? {
3598
- ...M,
3584
+ const h = T(() => e.items, [e.items]), [f, m] = V(null), [g, p] = V(null), [b, D] = V(0), [y, R] = V(null), x = T(() => {
3585
+ let v = It(h);
3586
+ const C = v.filter(({ parentId: L }) => !L);
3587
+ C.length === 1 && (v = v.map(
3588
+ (L) => L.id === C[0].id ? {
3589
+ ...L,
3599
3590
  disableDragging: !0
3600
- } : M
3591
+ } : L
3601
3592
  ));
3602
- const P = v.reduce((M, { children: F, collapsed: H, id: K }) => (H && F.length && M.push(K), M), []);
3603
- return ri(v, f ? [f, ...P] : P);
3604
- }, [f, e]), x = f && b ? At(C, f, b, p, i) : null, I = z({
3605
- items: C,
3606
- offset: p
3607
- }), [R] = V(
3608
- () => si(I, o, i)
3609
- ), E = pr(
3593
+ const B = v.reduce(
3594
+ (L, { children: M, collapsed: q, id: H }) => (q && M.length && L.push(H), L),
3595
+ []
3596
+ );
3597
+ return oi(
3598
+ v,
3599
+ f ? [f, ...B] : B
3600
+ );
3601
+ }, [f, h]), w = f && g ? Tt(x, f, g, b, i) : null, I = k({
3602
+ items: x,
3603
+ offset: b
3604
+ }), [E] = V(
3605
+ () => ai(I, o, i)
3606
+ ), N = pr(
3610
3607
  Gt(_t),
3611
3608
  Gt(Bt, {
3612
- coordinateGetter: R
3609
+ coordinateGetter: E
3613
3610
  })
3614
- ), N = T(() => C.map(({ id: v }) => v), [C]), B = f ? C.find(({ id: v }) => v === f) : null;
3615
- k(() => {
3611
+ ), _ = T(() => x.map(({ id: v }) => v), [x]), A = f ? x.find(({ id: v }) => v === f) : null;
3612
+ P(() => {
3616
3613
  I.current = {
3617
- items: C,
3618
- offset: p
3614
+ items: x,
3615
+ offset: b
3619
3616
  };
3620
- }, [C, p]);
3621
- const A = $(
3617
+ }, [x, b]);
3618
+ const Z = z(
3622
3619
  ({ active: { id: v } }) => {
3623
- h(v), g(v);
3624
- const D = C.find(({ id: P }) => P === v);
3625
- D && y({
3626
- parentId: D.parentId,
3620
+ m(v), p(v);
3621
+ const C = x.find(({ id: B }) => B === v);
3622
+ C && R({
3623
+ parentId: C.parentId,
3627
3624
  overId: v
3628
3625
  }), document.body.style.setProperty("cursor", "grabbing");
3629
3626
  },
3630
- [C]
3631
- ), Z = $(({ delta: v }) => {
3632
- m(v.x);
3633
- }, []), Q = $(({ over: v }) => {
3634
- g((v == null ? void 0 : v.id) ?? null);
3635
- }, []), ne = $(
3636
- ({ active: v, over: D }) => {
3637
- if (De(), x && D) {
3638
- const { depth: P, parentId: M } = x, F = JSON.parse(JSON.stringify(It(e))), H = F.findIndex(({ id: L }) => L === D.id), K = F.findIndex(({ id: L }) => L === v.id), q = F[K];
3639
- F[K] = { ...q, depth: P, parentId: M };
3640
- const W = Ve(F, K, H), O = Go(W), he = Yn(O, F[K].id, M);
3641
- t(ti(O)), u == null || u(he);
3627
+ [x]
3628
+ ), Q = z(({ delta: v }) => {
3629
+ D(v.x);
3630
+ }, []), ne = z(({ over: v }) => {
3631
+ p((v == null ? void 0 : v.id) ?? null);
3632
+ }, []), fe = z(() => {
3633
+ p(null), m(null), D(0), R(null), document.body.style.setProperty("cursor", "");
3634
+ }, []), Ce = z(
3635
+ ({ active: v, over: C }) => {
3636
+ if (fe(), w && C) {
3637
+ const { depth: B, parentId: L } = w, M = JSON.parse(JSON.stringify(It(h))), q = M.findIndex(({ id: j }) => j === C.id), H = M.findIndex(({ id: j }) => j === v.id), U = M[H];
3638
+ M[H] = { ...U, depth: B, parentId: L };
3639
+ const O = Ve(M, H, q), se = Go(O), G = Yn(se, M[H].id, L);
3640
+ t(ni(se)), u == null || u(G);
3642
3641
  }
3643
3642
  },
3644
- [e, x]
3645
- ), xe = $(() => {
3646
- De();
3647
- }, []), De = $(() => {
3648
- g(null), h(null), m(0), y(null), document.body.style.setProperty("cursor", "");
3649
- }, []), J = $((v) => {
3650
- t((D) => Qo(D, v));
3651
- }, []), Ce = $(
3643
+ [h, w, u, fe, t]
3644
+ ), W = z(() => {
3645
+ fe();
3646
+ }, [fe]), Se = z(
3647
+ (v) => {
3648
+ t((C) => ei(C, v));
3649
+ },
3650
+ [t]
3651
+ ), pe = z(
3652
3652
  ({
3653
3653
  id: v,
3654
- canFetchChildren: D,
3655
- collapsed: P
3656
- }) => D ? r == null ? void 0 : r(v, !!P) : t(
3657
- (M) => ei(M, v, (F) => ({ collapsed: !F.collapsed }))
3654
+ canFetchChildren: C,
3655
+ collapsed: B
3656
+ }) => C ? r == null ? void 0 : r(v, !!B) : t(
3657
+ (L) => ti(L, v, (M) => ({ collapsed: !M.collapsed }))
3658
3658
  ),
3659
- []
3660
- ), se = $(
3661
- (v, D, P) => {
3662
- if (P && x) {
3659
+ [r, t]
3660
+ ), ve = z(
3661
+ (v, C, B) => {
3662
+ if (B && w) {
3663
3663
  if (v !== "onDragEnd") {
3664
- if (w && x.parentId === w.parentId && P === w.overId)
3664
+ if (y && w.parentId === y.parentId && B === y.overId)
3665
3665
  return;
3666
- y({
3667
- parentId: x.parentId,
3668
- overId: P
3666
+ R({
3667
+ parentId: w.parentId,
3668
+ overId: B
3669
3669
  });
3670
3670
  }
3671
- const M = JSON.parse(JSON.stringify(It(e))), F = M.findIndex(({ id: L }) => L === P), H = M.findIndex(({ id: L }) => L === D), K = Ve(M, H, F), q = K[F - 1];
3672
- let W;
3673
- const O = v === "onDragEnd" ? "dropped" : "moved", he = v === "onDragEnd" ? "dropped" : "nested";
3674
- if (q)
3675
- if (x.depth > q.depth)
3676
- W = `${D} was ${he} under ${q.id}.`;
3671
+ const L = JSON.parse(JSON.stringify(It(h))), M = L.findIndex(({ id: j }) => j === B), q = L.findIndex(({ id: j }) => j === C), H = Ve(L, q, M), U = H[M - 1];
3672
+ let O;
3673
+ const se = v === "onDragEnd" ? "dropped" : "moved", G = v === "onDragEnd" ? "dropped" : "nested";
3674
+ if (U)
3675
+ if (w.depth > U.depth)
3676
+ O = `${C} was ${G} under ${U.id}.`;
3677
3677
  else {
3678
- let L = q;
3679
- for (; L && x.depth < L.depth; ) {
3680
- const pe = L.parentId;
3681
- L = K.find(({ id: ae }) => ae === pe);
3678
+ let j = U;
3679
+ for (; j && w.depth < j.depth; ) {
3680
+ const ae = j.parentId;
3681
+ j = H.find(({ id: be }) => be === ae);
3682
3682
  }
3683
- L && (W = `${D} was ${O} after ${L.id}.`);
3683
+ j && (O = `${C} was ${se} after ${j.id}.`);
3684
3684
  }
3685
3685
  else {
3686
- const L = K[F + 1];
3687
- W = `${D} was ${O} before ${L.id}.`;
3686
+ const j = H[M + 1];
3687
+ O = `${C} was ${se} before ${j.id}.`;
3688
3688
  }
3689
- return W;
3689
+ return O;
3690
3690
  }
3691
3691
  },
3692
- [w, e, x]
3692
+ [y, h, w]
3693
3693
  );
3694
- return /* @__PURE__ */ _(
3694
+ return /* @__PURE__ */ $(
3695
3695
  ho,
3696
3696
  {
3697
3697
  accessibility: { announcements: {
3698
3698
  onDragStart({ active: v }) {
3699
3699
  return `Picked up ${v.id}.`;
3700
3700
  },
3701
- onDragMove({ active: v, over: D }) {
3702
- return se("onDragMove", v.id, D == null ? void 0 : D.id);
3701
+ onDragMove({ active: v, over: C }) {
3702
+ return ve("onDragMove", v.id, C == null ? void 0 : C.id);
3703
3703
  },
3704
- onDragOver({ active: v, over: D }) {
3705
- return se("onDragOver", v.id, D == null ? void 0 : D.id);
3704
+ onDragOver({ active: v, over: C }) {
3705
+ return ve("onDragOver", v.id, C == null ? void 0 : C.id);
3706
3706
  },
3707
- onDragEnd({ active: v, over: D }) {
3708
- return se("onDragEnd", v.id, D == null ? void 0 : D.id);
3707
+ onDragEnd({ active: v, over: C }) {
3708
+ return ve("onDragEnd", v.id, C == null ? void 0 : C.id);
3709
3709
  },
3710
3710
  onDragCancel({ active: v }) {
3711
3711
  return `Moving was cancelled. ${v.id} was dropped in its original position.`;
3712
3712
  }
3713
3713
  } },
3714
- sensors: E,
3714
+ sensors: N,
3715
3715
  collisionDetection: mr,
3716
- measuring: Ai,
3717
- onDragStart: A,
3718
- onDragMove: Z,
3719
- onDragOver: Q,
3720
- onDragEnd: ne,
3721
- onDragCancel: xe,
3722
- children: /* @__PURE__ */ fn($o, { items: N, strategy: zo, children: [
3723
- C.map(({ id: v, label: D, children: P, collapsed: M, depth: F, canFetchChildren: H, disableDragging: K }) => /* @__PURE__ */ _(
3724
- dn,
3725
- {
3726
- id: v,
3727
- value: D,
3728
- disableDragging: !!K,
3729
- depth: v === f && x ? x.depth : F,
3730
- indentationWidth: i,
3731
- indicator: o,
3732
- collapsed: !!(M && (P.length || H)),
3733
- onCollapse: n && (P.length || H) ? () => Ce({ id: v, canFetchChildren: H, collapsed: M }) : void 0,
3734
- onRemove: s ? () => a ? a(v) : J(v) : void 0,
3735
- onAdd: l ? () => c == null ? void 0 : c(v) : void 0,
3736
- onLabelClick: d ? () => d(v) : void 0
3737
- },
3738
- v
3739
- )),
3716
+ measuring: Mi,
3717
+ onDragStart: Z,
3718
+ onDragMove: Q,
3719
+ onDragOver: ne,
3720
+ onDragEnd: Ce,
3721
+ onDragCancel: W,
3722
+ children: /* @__PURE__ */ fn($o, { items: _, strategy: zo, children: [
3723
+ x.map(
3724
+ ({ id: v, label: C, children: B, collapsed: L, depth: M, canFetchChildren: q, disableDragging: H }) => /* @__PURE__ */ $(
3725
+ dn,
3726
+ {
3727
+ id: v,
3728
+ value: C,
3729
+ disableDragging: !!H,
3730
+ depth: v === f && w ? w.depth : M,
3731
+ indentationWidth: i,
3732
+ indicator: o,
3733
+ collapsed: !!(L && (B.length || q)),
3734
+ onCollapse: n && (B.length || q) ? () => pe({ id: v, canFetchChildren: q, collapsed: L }) : void 0,
3735
+ onRemove: s ? () => a ? a(v) : Se(v) : void 0,
3736
+ onAdd: l ? () => c == null ? void 0 : c(v) : void 0,
3737
+ onLabelClick: d ? () => d(v) : void 0
3738
+ },
3739
+ v
3740
+ )
3741
+ ),
3740
3742
  gn(
3741
- /* @__PURE__ */ _(
3743
+ /* @__PURE__ */ $(
3742
3744
  No,
3743
3745
  {
3744
- dropAnimation: Mi,
3745
- modifiers: o ? [Li] : void 0,
3746
- children: f && B ? /* @__PURE__ */ _(
3746
+ dropAnimation: Ni,
3747
+ modifiers: o ? [Pi] : void 0,
3748
+ children: f && A ? /* @__PURE__ */ $(
3747
3749
  dn,
3748
3750
  {
3749
3751
  id: f,
3750
- depth: B.depth,
3752
+ depth: A.depth,
3751
3753
  clone: !0,
3752
- childCount: ni(e, f) + 1,
3753
- value: B.label,
3754
+ childCount: ri(e, f) + 1,
3755
+ value: A.label,
3754
3756
  indentationWidth: i
3755
3757
  }
3756
3758
  ) : null
@@ -3762,7 +3764,7 @@ function Ni({
3762
3764
  }
3763
3765
  );
3764
3766
  }
3765
- const Li = ({ transform: e }) => ({
3767
+ const Pi = ({ transform: e }) => ({
3766
3768
  ...e,
3767
3769
  y: e.y - 25
3768
3770
  });
@@ -3779,11 +3781,11 @@ function Yn(e, t, n = null) {
3779
3781
  }
3780
3782
  return null;
3781
3783
  }
3782
- const Bi = ut(Ni);
3784
+ const $i = ut(Li);
3783
3785
  export {
3784
- Bi as SortableTree,
3785
- ti as createOptimizedTreeStructure,
3786
- Qo as removeItemById,
3787
- ei as setTreeItemProperties
3786
+ $i as SortableTree,
3787
+ ni as createOptimizedTreeStructure,
3788
+ ei as removeItemById,
3789
+ ti as setTreeItemProperties
3788
3790
  };
3789
3791
  //# sourceMappingURL=react-sortable-tree.js.map