@caspeco/casper-ui-library 9.0.2 → 9.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/README.md +10 -4
  2. package/dist/components/combobox/combobox.d.ts.map +1 -1
  3. package/dist/components/icon/icons/calendar-icon.d.ts +2 -0
  4. package/dist/components/icon/icons/calendar-icon.d.ts.map +1 -0
  5. package/dist/components/icon/icons/calendar-icon.js +8 -0
  6. package/dist/components/icon/icons/cart-icon.js +1 -1
  7. package/dist/components/icon/icons/closed-icon.d.ts +2 -0
  8. package/dist/components/icon/icons/closed-icon.d.ts.map +1 -0
  9. package/dist/components/icon/icons/closed-icon.js +8 -0
  10. package/dist/components/icon/icons/comment-add-icon.d.ts +2 -0
  11. package/dist/components/icon/icons/comment-add-icon.d.ts.map +1 -0
  12. package/dist/components/icon/icons/comment-add-icon.js +8 -0
  13. package/dist/components/icon/icons/comment-icon.js +1 -1
  14. package/dist/components/icon/icons/deliverect-icon.d.ts +2 -0
  15. package/dist/components/icon/icons/deliverect-icon.d.ts.map +1 -0
  16. package/dist/components/icon/icons/deliverect-icon.js +8 -0
  17. package/dist/components/icon/icons/door-closed-icon.d.ts +2 -0
  18. package/dist/components/icon/icons/door-closed-icon.d.ts.map +1 -0
  19. package/dist/components/icon/icons/door-closed-icon.js +8 -0
  20. package/dist/components/icon/icons/door-open-icon.d.ts +2 -0
  21. package/dist/components/icon/icons/door-open-icon.d.ts.map +1 -0
  22. package/dist/components/icon/icons/door-open-icon.js +8 -0
  23. package/dist/components/icon/icons/failed-print-icon.d.ts +2 -0
  24. package/dist/components/icon/icons/failed-print-icon.d.ts.map +1 -0
  25. package/dist/components/icon/icons/failed-print-icon.js +8 -0
  26. package/dist/components/icon/icons/index.d.ts +27 -4
  27. package/dist/components/icon/icons/index.d.ts.map +1 -1
  28. package/dist/components/icon/icons/key-command-icon.d.ts +2 -0
  29. package/dist/components/icon/icons/key-command-icon.d.ts.map +1 -0
  30. package/dist/components/icon/icons/key-command-icon.js +8 -0
  31. package/dist/components/icon/icons/key-enter-icon.d.ts +2 -0
  32. package/dist/components/icon/icons/key-enter-icon.d.ts.map +1 -0
  33. package/dist/components/icon/icons/key-enter-icon.js +8 -0
  34. package/dist/components/icon/icons/key-option-icon.d.ts +2 -0
  35. package/dist/components/icon/icons/key-option-icon.d.ts.map +1 -0
  36. package/dist/components/icon/icons/key-option-icon.js +8 -0
  37. package/dist/components/icon/icons/message-add-icon.d.ts +2 -0
  38. package/dist/components/icon/icons/message-add-icon.d.ts.map +1 -0
  39. package/dist/components/icon/icons/message-add-icon.js +8 -0
  40. package/dist/components/icon/icons/message-icon.js +1 -1
  41. package/dist/components/icon/icons/message-lines-icon.d.ts +2 -0
  42. package/dist/components/icon/icons/message-lines-icon.d.ts.map +1 -0
  43. package/dist/components/icon/icons/message-lines-icon.js +8 -0
  44. package/dist/components/icon/icons/module-home-icon.js +1 -1
  45. package/dist/components/icon/icons/no-cart-icon.d.ts +2 -0
  46. package/dist/components/icon/icons/no-cart-icon.d.ts.map +1 -0
  47. package/dist/components/icon/icons/no-cart-icon.js +8 -0
  48. package/dist/components/icon/icons/note-icon.d.ts +2 -0
  49. package/dist/components/icon/icons/note-icon.d.ts.map +1 -0
  50. package/dist/components/icon/icons/note-icon.js +8 -0
  51. package/dist/components/icon/icons/product-my-pages-icon.d.ts +2 -0
  52. package/dist/components/icon/icons/product-my-pages-icon.d.ts.map +1 -0
  53. package/dist/components/icon/icons/product-my-pages-icon.js +8 -0
  54. package/dist/components/icon/icons/puck-icon.d.ts +2 -0
  55. package/dist/components/icon/icons/puck-icon.d.ts.map +1 -0
  56. package/dist/components/icon/icons/puck-icon.js +8 -0
  57. package/dist/components/icon/icons/redo-icon.d.ts +2 -0
  58. package/dist/components/icon/icons/redo-icon.d.ts.map +1 -0
  59. package/dist/components/icon/icons/redo-icon.js +8 -0
  60. package/dist/components/icon/icons/sidebar-hide-icon.d.ts +2 -0
  61. package/dist/components/icon/icons/sidebar-hide-icon.d.ts.map +1 -0
  62. package/dist/components/icon/icons/sidebar-hide-icon.js +8 -0
  63. package/dist/components/icon/icons/sidebar-left-icon.d.ts +2 -0
  64. package/dist/components/icon/icons/sidebar-left-icon.d.ts.map +1 -0
  65. package/dist/components/icon/icons/sidebar-left-icon.js +8 -0
  66. package/dist/components/icon/icons/sidebar-right-icon.d.ts +2 -0
  67. package/dist/components/icon/icons/sidebar-right-icon.d.ts.map +1 -0
  68. package/dist/components/icon/icons/sidebar-right-icon.js +8 -0
  69. package/dist/components/icon/icons/sidebar-show-icon.d.ts +2 -0
  70. package/dist/components/icon/icons/sidebar-show-icon.d.ts.map +1 -0
  71. package/dist/components/icon/icons/sidebar-show-icon.js +8 -0
  72. package/dist/components/icon/icons/swatch-icon.d.ts +2 -0
  73. package/dist/components/icon/icons/swatch-icon.d.ts.map +1 -0
  74. package/dist/components/icon/icons/swatch-icon.js +8 -0
  75. package/dist/components/icon/icons/trivec-icon.d.ts +2 -0
  76. package/dist/components/icon/icons/trivec-icon.d.ts.map +1 -0
  77. package/dist/components/icon/icons/trivec-icon.js +9 -0
  78. package/dist/components/icon/icons/waste-icon.d.ts +2 -0
  79. package/dist/components/icon/icons/waste-icon.d.ts.map +1 -0
  80. package/dist/components/icon/icons/waste-icon.js +8 -0
  81. package/dist/components/table/table-toolbar-settings.d.ts +15 -1
  82. package/dist/components/table/table-toolbar-settings.d.ts.map +1 -1
  83. package/dist/components/table/table-toolbar-settings.js +71 -44
  84. package/dist/components/table/table-toolbar-settings.spec.d.ts +2 -0
  85. package/dist/components/table/table-toolbar-settings.spec.d.ts.map +1 -0
  86. package/dist/components/table/table.constants.d.ts +2 -0
  87. package/dist/components/table/table.constants.d.ts.map +1 -0
  88. package/dist/components/table/table.constants.js +4 -0
  89. package/dist/components/table/translations.d.ts +14 -0
  90. package/dist/components/table/translations.d.ts.map +1 -1
  91. package/dist/components/table/translations.js +12 -0
  92. package/dist/index.js +727 -681
  93. package/dist/node_modules/@dnd-kit/abstract/index.js +502 -442
  94. package/dist/node_modules/@dnd-kit/dom/index.js +817 -779
  95. package/dist/node_modules/@dnd-kit/dom/sortable.js +260 -262
  96. package/dist/node_modules/@dnd-kit/dom/utilities.js +470 -463
  97. package/dist/node_modules/@dnd-kit/react/hooks.js +26 -26
  98. package/dist/node_modules/@dnd-kit/react/index.js +8 -1
  99. package/dist/node_modules/@dnd-kit/react/sortable.js +45 -46
  100. package/dist/node_modules/@preact/signals-core/dist/signals-core.module.js +11 -11
  101. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +85 -73
  102. package/package.json +20 -18
  103. package/dist/components/icon/icons/tablet-icon.d.ts +0 -2
  104. package/dist/components/icon/icons/tablet-icon.d.ts.map +0 -1
  105. package/dist/components/icon/icons/tablet-icon.js +0 -8
@@ -1,48 +1,48 @@
1
- import { Plugin as ue, DragDropManager as ur, resolveCustomizable as qe, Sensor as Te, ActivationController as hr, CorePlugin as ft, descriptor as fr, Droppable as pr, Draggable as vr, configurator as pt, ActivationConstraint as an } from "../abstract/index.js";
2
- import { canScroll as mr, detectScrollIntent as gr, scheduler as $e, isKeyboardEvent as vt, getRoot as Me, generateUniqueId as et, isSafari as br, Listeners as ln, isElement as le, isHTMLElement as cn, getFrameTransform as Ie, getEventCoordinates as ce, getDocuments as yr, getDocument as Ne, scrollIntoViewIfNeeded as _r, DOMRectangle as N, ScrollDirection as R, getScrollableAncestors as Ht, isInteractiveElement as wr, isTextInput as Sr, PositionObserver as Er, isDocument as xr, isShadowRoot as kr, getComputedStyles as dn, parseTranslate as un, getFixedPositionOffset as hn, Styles as Ar, supportsPopover as Vt, showPopover as we, getWindow as fn, prefersReducedMotion as pn, getElementFromPoint as Dr, isPointerEvent as Or, getFrameElement as qt, cloneElement as Cr, supportsStyle as Gt, getFinalKeyframe as Pr, animateTransform as Tr, ProxiedElements as Jt } from "./utilities.js";
3
- import { computed as tt, deepEqual as $r, effects as Mr, reactive as F, derived as Ge } from "../state/dist/index.js";
4
- import { Axes as vn, Point as Ir, Rectangle as mn, exceedsDistance as nt } from "../geometry/dist/index.js";
5
- import { defaultCollisionDetection as Rr } from "../collision/dist/index.js";
6
- import { effect as J, untracked as M, signal as gn, batch as Wr } from "../../@preact/signals-core/dist/signals-core.module.js";
7
- var Lr = Object.create, mt = Object.defineProperty, Fr = Object.defineProperties, zr = Object.getOwnPropertyDescriptor, Nr = Object.getOwnPropertyDescriptors, Re = Object.getOwnPropertySymbols, bn = Object.prototype.hasOwnProperty, yn = Object.prototype.propertyIsEnumerable, _n = (e, t) => (t = Symbol[e]) ? t : /* @__PURE__ */ Symbol.for("Symbol." + e), he = (e) => {
1
+ import { Plugin as he, DragDropManager as xr, resolveCustomizable as it, Sensor as ze, ActivationController as kr, CorePlugin as St, descriptor as Ar, Droppable as Dr, Draggable as Or, configurator as Ce, ActivationConstraint as wn } from "../abstract/index.js";
2
+ import { getRoot as Ne, generateUniqueId as ct, isSafari as Cr, scheduler as je, Listeners as Sn, isElement as le, isHTMLElement as En, getFrameTransform as Xe, getEventCoordinates as ce, getDocuments as Pr, getDocument as Et, scrollIntoViewIfNeeded as Tr, DOMRectangle as V, canScroll as $r, detectScrollIntent as Ir, isKeyboardEvent as xt, isInteractiveElement as Mr, isTextInput as Rr, ScrollDirection as F, getScrollableAncestors as an, PositionObserver as Lr, isDocument as Wr, isShadowRoot as Fr, getComputedStyles as xn, parseTransform as zr, parseTranslate as kn, getFixedPositionOffset as An, Styles as Nr, supportsPopover as ln, showPopover as ae, getWindow as Dn, prefersReducedMotion as On, getElementFromPoint as jr, isPointerEvent as Xr, getFrameElement as cn, cloneElement as Kr, supportsStyle as dn, getFinalKeyframe as Ur, animateTransform as Yr, ProxiedElements as un } from "./utilities.js";
3
+ import { computed as hn, deepEqual as Br, effects as Vr, reactive as j, derived as st } from "../state/dist/index.js";
4
+ import { Axes as Cn, Point as Hr, Rectangle as kt, exceedsDistance as dt } from "../geometry/dist/index.js";
5
+ import { defaultCollisionDetection as qr } from "../collision/dist/index.js";
6
+ import { effect as fe, untracked as W, signal as Pn, batch as Gr } from "../../@preact/signals-core/dist/signals-core.module.js";
7
+ var Jr = Object.create, At = Object.defineProperty, Qr = Object.defineProperties, Zr = Object.getOwnPropertyDescriptor, ei = Object.getOwnPropertyDescriptors, Ke = Object.getOwnPropertySymbols, Tn = Object.prototype.hasOwnProperty, $n = Object.prototype.propertyIsEnumerable, In = (e, t) => (t = Symbol[e]) ? t : /* @__PURE__ */ Symbol.for("Symbol." + e), pe = (e) => {
8
8
  throw TypeError(e);
9
- }, rt = (e, t, n) => t in e ? mt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Se = (e, t) => {
9
+ }, ut = (e, t, n) => t in e ? At(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ke = (e, t) => {
10
10
  for (var n in t || (t = {}))
11
- bn.call(t, n) && rt(e, n, t[n]);
12
- if (Re)
13
- for (var n of Re(t))
14
- yn.call(t, n) && rt(e, n, t[n]);
11
+ Tn.call(t, n) && ut(e, n, t[n]);
12
+ if (Ke)
13
+ for (var n of Ke(t))
14
+ $n.call(t, n) && ut(e, n, t[n]);
15
15
  return e;
16
- }, gt = (e, t) => Fr(e, Nr(t)), Qt = (e, t) => mt(e, "name", { value: t, configurable: !0 }), wn = (e, t) => {
16
+ }, Dt = (e, t) => Qr(e, ei(t)), fn = (e, t) => At(e, "name", { value: t, configurable: !0 }), Mn = (e, t) => {
17
17
  var n = {};
18
18
  for (var r in e)
19
- bn.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
20
- if (e != null && Re)
21
- for (var r of Re(e))
22
- t.indexOf(r) < 0 && yn.call(e, r) && (n[r] = e[r]);
19
+ Tn.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
20
+ if (e != null && Ke)
21
+ for (var r of Ke(e))
22
+ t.indexOf(r) < 0 && $n.call(e, r) && (n[r] = e[r]);
23
23
  return n;
24
- }, fe = (e) => {
24
+ }, ve = (e) => {
25
25
  var t;
26
- return [, , , Lr((t = e?.[_n("metadata")]) != null ? t : null)];
27
- }, Sn = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], me = (e) => e !== void 0 && typeof e != "function" ? he("Function expected") : e, Kr = (e, t, n, r, i) => ({ kind: Sn[e], name: t, metadata: r, addInitializer: (s) => n._ ? he("Already initialized") : i.push(me(s || null)) }), Q = (e, t) => rt(t, _n("metadata"), e[3]), x = (e, t, n, r) => {
28
- for (var i = 0, s = e[t >> 1], o = s && s.length; i < o; i++) t & 1 ? s[i].call(n) : r = s[i].call(n, r);
26
+ return [, , , Jr((t = e?.[In("metadata")]) != null ? t : null)];
27
+ }, Rn = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], _e = (e) => e !== void 0 && typeof e != "function" ? pe("Function expected") : e, ti = (e, t, n, r, i) => ({ kind: Rn[e], name: t, metadata: r, addInitializer: (s) => n._ ? pe("Already initialized") : i.push(_e(s || null)) }), ee = (e, t) => ut(t, In("metadata"), e[3]), A = (e, t, n, r) => {
28
+ for (var i = 0, s = e[t >> 1], a = s && s.length; i < a; i++) t & 1 ? s[i].call(n) : r = s[i].call(n, r);
29
29
  return r;
30
- }, $ = (e, t, n, r, i, s) => {
31
- var o, a, l, f, d, c = t & 7, h = !!(t & 8), u = !!(t & 16), p = c > 3 ? e.length + 1 : c ? h ? 1 : 2 : 0, w = Sn[c + 5], k = c > 3 && (e[p - 1] = []), C = e[p] || (e[p] = []), b = c && (!u && !h && (i = i.prototype), c < 5 && (c > 3 || !u) && zr(c < 4 ? i : { get [n]() {
32
- return y(this, s);
33
- }, set [n](m) {
34
- return O(this, s, m);
30
+ }, R = (e, t, n, r, i, s) => {
31
+ var a, o, d, c, u, l = t & 7, h = !!(t & 8), v = !!(t & 16), g = l > 3 ? e.length + 1 : l ? h ? 1 : 2 : 0, w = Rn[l + 5], D = l > 3 && (e[g - 1] = []), x = e[g] || (e[g] = []), f = l && (!v && !h && (i = i.prototype), l < 5 && (l > 3 || !v) && Zr(l < 4 ? i : { get [n]() {
32
+ return _(this, s);
33
+ }, set [n](p) {
34
+ return $(this, s, p);
35
35
  } }, n));
36
- c ? u && c < 4 && Qt(s, (c > 2 ? "set " : c > 1 ? "get " : "") + n) : Qt(i, n);
37
- for (var g = r.length - 1; g >= 0; g--)
38
- f = Kr(c, n, l = {}, e[3], C), c && (f.static = h, f.private = u, d = f.access = { has: u ? (m) => Ur(i, m) : (m) => n in m }, c ^ 3 && (d.get = u ? (m) => (c ^ 1 ? y : G)(m, i, c ^ 4 ? s : b.get) : (m) => m[n]), c > 2 && (d.set = u ? (m, v) => O(m, i, v, c ^ 4 ? s : b.set) : (m, v) => m[n] = v)), a = (0, r[g])(c ? c < 4 ? u ? s : b[w] : c > 4 ? void 0 : { get: b.get, set: b.set } : i, f), l._ = 1, c ^ 4 || a === void 0 ? me(a) && (c > 4 ? k.unshift(a) : c ? u ? s = a : b[w] = a : i = a) : typeof a != "object" || a === null ? he("Object expected") : (me(o = a.get) && (b.get = o), me(o = a.set) && (b.set = o), me(o = a.init) && k.unshift(o));
39
- return c || Q(e, i), b && mt(i, n, b), u ? c ^ 4 ? s : b : i;
40
- }, bt = (e, t, n) => t.has(e) || he("Cannot " + n), Ur = (e, t) => Object(t) !== t ? he('Cannot use the "in" operator on this value') : e.has(t), y = (e, t, n) => (bt(e, t, "read from private field"), n ? n.call(e) : t.get(e)), E = (e, t, n) => t.has(e) ? he("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), O = (e, t, n, r) => (bt(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), G = (e, t, n) => (bt(e, t, "access private method"), n), Zt = {
36
+ l ? v && l < 4 && fn(s, (l > 2 ? "set " : l > 1 ? "get " : "") + n) : fn(i, n);
37
+ for (var m = r.length - 1; m >= 0; m--)
38
+ c = ti(l, n, d = {}, e[3], x), l && (c.static = h, c.private = v, u = c.access = { has: v ? (p) => ni(i, p) : (p) => n in p }, l ^ 3 && (u.get = v ? (p) => (l ^ 1 ? _ : Z)(p, i, l ^ 4 ? s : f.get) : (p) => p[n]), l > 2 && (u.set = v ? (p, y) => $(p, i, y, l ^ 4 ? s : f.set) : (p, y) => p[n] = y)), o = (0, r[m])(l ? l < 4 ? v ? s : f[w] : l > 4 ? void 0 : { get: f.get, set: f.set } : i, c), d._ = 1, l ^ 4 || o === void 0 ? _e(o) && (l > 4 ? D.unshift(o) : l ? v ? s = o : f[w] = o : i = o) : typeof o != "object" || o === null ? pe("Object expected") : (_e(a = o.get) && (f.get = a), _e(a = o.set) && (f.set = a), _e(a = o.init) && D.unshift(a));
39
+ return l || ee(e, i), f && At(i, n, f), v ? l ^ 4 ? s : f : i;
40
+ }, Ot = (e, t, n) => t.has(e) || pe("Cannot " + n), ni = (e, t) => Object(t) !== t ? pe('Cannot use the "in" operator on this value') : e.has(t), _ = (e, t, n) => (Ot(e, t, "read from private field"), n ? n.call(e) : t.get(e)), S = (e, t, n) => t.has(e) ? pe("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), $ = (e, t, n, r) => (Ot(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), Z = (e, t, n) => (Ot(e, t, "access private method"), n), pn = {
41
41
  role: "button",
42
42
  roleDescription: "draggable"
43
- }, Xr = "dnd-kit-description", Yr = "dnd-kit-announcement", jr = {
43
+ }, ri = "dnd-kit-description", ii = "dnd-kit-announcement", si = {
44
44
  draggable: "To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item in a given direction. Press space again to drop the item in its new position, or press escape to cancel."
45
- }, Br = {
45
+ }, oi = {
46
46
  dragstart({ operation: { source: e } }) {
47
47
  if (e)
48
48
  return `Picked up draggable item ${e.id}.`;
@@ -56,187 +56,169 @@ var Lr = Object.create, mt = Object.defineProperty, Fr = Object.defineProperties
56
56
  return n ? `Dragging was cancelled. Draggable item ${e.id} was dropped.` : t ? `Draggable item ${e.id} was dropped over droppable target ${t.id}` : `Draggable item ${e.id} was dropped.`;
57
57
  }
58
58
  };
59
- function Hr(e) {
59
+ function ai(e) {
60
60
  const t = e.tagName.toLowerCase();
61
61
  return ["input", "select", "textarea", "a", "button"].includes(t);
62
62
  }
63
- function Vr(e, t) {
63
+ function li(e, t) {
64
64
  const n = document.createElement("div");
65
65
  return n.id = e, n.style.setProperty("display", "none"), n.textContent = t, n;
66
66
  }
67
- function qr(e) {
67
+ function ci(e) {
68
68
  const t = document.createElement("div");
69
69
  return t.id = e, t.setAttribute("role", "status"), t.setAttribute("aria-live", "polite"), t.setAttribute("aria-atomic", "true"), t.style.setProperty("position", "fixed"), t.style.setProperty("width", "1px"), t.style.setProperty("height", "1px"), t.style.setProperty("margin", "-1px"), t.style.setProperty("border", "0"), t.style.setProperty("padding", "0"), t.style.setProperty("overflow", "hidden"), t.style.setProperty("clip", "rect(0 0 0 0)"), t.style.setProperty("clip-path", "inset(100%)"), t.style.setProperty("white-space", "nowrap"), t;
70
70
  }
71
- var Gr = ["dragover", "dragmove"], Jr = class extends ue {
71
+ var di = ["dragover", "dragmove"], ui = class extends he {
72
72
  constructor(e, t) {
73
73
  super(e);
74
74
  const {
75
75
  id: n,
76
76
  idPrefix: {
77
- description: r = Xr,
78
- announcement: i = Yr
77
+ description: r = ri,
78
+ announcement: i = ii
79
79
  } = {},
80
- announcements: s = Br,
81
- screenReaderInstructions: o = jr,
82
- debounce: a = 500
83
- } = t ?? {}, l = n ? `${r}-${n}` : et(r), f = n ? `${i}-${n}` : et(i);
84
- let d, c, h, u;
85
- const p = (v = u) => {
86
- !h || !v || h?.nodeValue !== v && (h.nodeValue = v);
87
- }, w = () => $e.schedule(p), k = Qr(
80
+ announcements: s = oi,
81
+ screenReaderInstructions: a = si,
82
+ debounce: o = 500
83
+ } = t ?? {}, d = n ? `${r}-${n}` : ct(r), c = n ? `${i}-${n}` : ct(i);
84
+ let u, l, h, v;
85
+ const g = (y = v) => {
86
+ !h || !y || h?.nodeValue !== y && (h.nodeValue = y);
87
+ }, w = () => je.schedule(g), D = hi(
88
88
  w,
89
- a
90
- ), C = Object.entries(s).map(
91
- ([v, P]) => this.manager.monitor.addEventListener(
92
- v,
93
- (S, z) => {
94
- const U = h;
95
- if (!U) return;
96
- const X = P?.(S, z);
97
- X && U.nodeValue !== X && (u = X, Gr.includes(v) ? k() : (w(), k.cancel()));
89
+ o
90
+ ), x = Object.entries(s).map(
91
+ ([y, C]) => this.manager.monitor.addEventListener(
92
+ y,
93
+ (E, L) => {
94
+ const T = h;
95
+ if (!T) return;
96
+ const P = C?.(E, L);
97
+ P && T.nodeValue !== P && (v = P, di.includes(y) ? D() : (w(), D.cancel()));
98
98
  }
99
99
  )
100
- ), b = () => {
101
- let v = [];
102
- d?.isConnected || (d = Vr(
103
- l,
104
- o.draggable
105
- ), v.push(d)), c?.isConnected || (c = qr(f), h = document.createTextNode(""), c.appendChild(h), v.push(c)), v.length > 0 && document.body.append(...v);
106
- }, g = /* @__PURE__ */ new Set();
107
- function m() {
108
- for (const v of g)
109
- v();
100
+ ), f = () => {
101
+ let y = [];
102
+ u?.isConnected || (u = li(
103
+ d,
104
+ a.draggable
105
+ ), y.push(u)), l?.isConnected || (l = ci(c), h = document.createTextNode(""), l.appendChild(h), y.push(l)), y.length > 0 && document.body.append(...y);
106
+ }, m = /* @__PURE__ */ new Set();
107
+ function p() {
108
+ for (const y of m)
109
+ y();
110
110
  }
111
111
  this.registerEffect(() => {
112
- var v;
113
- g.clear();
114
- for (const P of this.manager.registry.draggables.value) {
115
- const S = (v = P.handle) != null ? v : P.element;
116
- if (S) {
117
- (!d || !c) && g.add(b), (!Hr(S) || br()) && !S.hasAttribute("tabindex") && g.add(() => S.setAttribute("tabindex", "0")), !S.hasAttribute("role") && S.tagName.toLowerCase() !== "button" && g.add(
118
- () => S.setAttribute("role", Zt.role)
119
- ), S.hasAttribute("aria-roledescription") || g.add(
120
- () => S.setAttribute(
112
+ var y;
113
+ m.clear();
114
+ for (const C of this.manager.registry.draggables.value) {
115
+ const E = (y = C.handle) != null ? y : C.element;
116
+ if (E) {
117
+ (!u || !l) && m.add(f), (!ai(E) || Cr()) && !E.hasAttribute("tabindex") && m.add(() => E.setAttribute("tabindex", "0")), !E.hasAttribute("role") && E.tagName.toLowerCase() !== "button" && m.add(
118
+ () => E.setAttribute("role", pn.role)
119
+ ), E.hasAttribute("aria-roledescription") || m.add(
120
+ () => E.setAttribute(
121
121
  "aria-roledescription",
122
- Zt.roleDescription
122
+ pn.roleDescription
123
123
  )
124
- ), S.hasAttribute("aria-describedby") || g.add(
125
- () => S.setAttribute("aria-describedby", l)
124
+ ), E.hasAttribute("aria-describedby") || m.add(
125
+ () => E.setAttribute("aria-describedby", d)
126
126
  );
127
- for (const U of ["aria-pressed", "aria-grabbed"]) {
128
- const X = String(P.isDragging);
129
- S.getAttribute(U) !== X && g.add(() => S.setAttribute(U, X));
127
+ for (const T of ["aria-pressed", "aria-grabbed"]) {
128
+ const P = String(C.isDragging);
129
+ E.getAttribute(T) !== P && m.add(() => E.setAttribute(T, P));
130
130
  }
131
- const z = String(P.disabled);
132
- S.getAttribute("aria-disabled") !== z && g.add(
133
- () => S.setAttribute("aria-disabled", z)
131
+ const L = String(C.disabled);
132
+ E.getAttribute("aria-disabled") !== L && m.add(
133
+ () => E.setAttribute("aria-disabled", L)
134
134
  );
135
135
  }
136
136
  }
137
- g.size > 0 && $e.schedule(m);
137
+ m.size > 0 && je.schedule(p);
138
138
  }), this.destroy = () => {
139
- super.destroy(), d?.remove(), c?.remove(), C.forEach((v) => v());
139
+ super.destroy(), u?.remove(), l?.remove(), x.forEach((y) => y());
140
140
  };
141
141
  }
142
142
  };
143
- function Qr(e, t) {
143
+ function hi(e, t) {
144
144
  let n;
145
145
  const r = () => {
146
146
  clearTimeout(n), n = setTimeout(e, t);
147
147
  };
148
148
  return r.cancel = () => clearTimeout(n), r;
149
149
  }
150
- var Zr = class extends ue {
151
- constructor(e, t) {
152
- super(e, t), this.manager = e;
153
- const n = tt(
154
- () => {
155
- var r;
156
- return Ne((r = this.manager.dragOperation.source) == null ? void 0 : r.element);
157
- }
158
- );
159
- this.destroy = J(() => {
160
- var r;
161
- const { dragOperation: i } = this.manager, { cursor: s = "grabbing", nonce: o } = (r = this.options) != null ? r : {};
162
- if (i.status.initialized) {
163
- const a = n.value, l = a.createElement("style");
164
- return o && l.setAttribute("nonce", o), l.textContent = `* { cursor: ${s} !important; }`, a.head.appendChild(l), () => l.remove();
165
- }
166
- });
167
- }
168
- }, We = /* @__PURE__ */ new Map(), En, xn, kn, An, it, ye, K, yt, de, Dn, On, Cn, Pn, Z = class extends (it = ft, An = [F], kn = [Ge], xn = [Ge], En = [Ge], it) {
169
- constructor(e) {
170
- super(e), x(K, 5, this), E(this, de), E(this, ye, /* @__PURE__ */ new Set()), E(this, yt, x(K, 8, this, /* @__PURE__ */ new Set())), x(K, 11, this), this.registerEffect(G(this, de, Dn));
150
+ var Ue = /* @__PURE__ */ new Map(), Ln, Wn, Fn, zn, ht, Ee, N, Ct, de, Nn, jn, Xn, Kn, H = class extends (ht = St, zn = [j], Fn = [st], Wn = [st], Ln = [st], ht) {
151
+ constructor(t, n) {
152
+ super(t, n), A(N, 5, this), S(this, de), S(this, Ee, /* @__PURE__ */ new Set()), S(this, Ct, A(N, 8, this, /* @__PURE__ */ new Set())), A(N, 11, this), this.registerEffect(Z(this, de, Nn));
171
153
  }
172
154
  /**
173
155
  * Registers CSS rules to be injected into the active drag operation's
174
- * document and shadow roots. The StyleSheetManager handles tracking
156
+ * document and shadow roots. The StyleInjector handles tracking
175
157
  * which roots need the styles and cleaning up when they're no longer needed.
176
158
  *
177
159
  * Returns a cleanup function that unregisters the rules.
178
160
  */
179
- register(e) {
180
- return y(this, ye).add(e), () => {
181
- y(this, ye).delete(e);
161
+ register(t) {
162
+ return _(this, Ee).add(t), () => {
163
+ _(this, Ee).delete(t);
182
164
  };
183
165
  }
184
166
  /**
185
167
  * Adds an additional root to track for style injection.
186
168
  * Returns a cleanup function that removes the root.
187
169
  */
188
- addRoot(e) {
189
- return M(() => {
190
- const t = new Set(this.additionalRoots);
191
- t.add(e), this.additionalRoots = t;
170
+ addRoot(t) {
171
+ return W(() => {
172
+ const n = new Set(this.additionalRoots);
173
+ n.add(t), this.additionalRoots = n;
192
174
  }), () => {
193
- M(() => {
194
- const t = new Set(this.additionalRoots);
195
- t.delete(e), this.additionalRoots = t;
175
+ W(() => {
176
+ const n = new Set(this.additionalRoots);
177
+ n.delete(t), this.additionalRoots = n;
196
178
  });
197
179
  };
198
180
  }
199
181
  get sourceRoot() {
200
- var e;
201
- const { source: t } = this.manager.dragOperation;
202
- return Me((e = t?.element) != null ? e : null);
182
+ var t;
183
+ const { source: n } = this.manager.dragOperation;
184
+ return Ne((t = n?.element) != null ? t : null);
203
185
  }
204
186
  get targetRoot() {
205
- var e;
206
- const { target: t } = this.manager.dragOperation;
207
- return Me((e = t?.element) != null ? e : null);
187
+ var t;
188
+ const { target: n } = this.manager.dragOperation;
189
+ return Ne((t = n?.element) != null ? t : null);
208
190
  }
209
191
  get roots() {
210
- const { status: e } = this.manager.dragOperation;
211
- if (e.initializing || e.initialized) {
212
- const t = [this.sourceRoot, this.targetRoot].filter(
213
- (n) => n != null
192
+ const { status: t } = this.manager.dragOperation;
193
+ if (t.initializing || t.initialized) {
194
+ const n = [this.sourceRoot, this.targetRoot].filter(
195
+ (r) => r != null
214
196
  );
215
- return /* @__PURE__ */ new Set([...t, ...this.additionalRoots]);
197
+ return /* @__PURE__ */ new Set([...n, ...this.additionalRoots]);
216
198
  }
217
199
  return /* @__PURE__ */ new Set();
218
200
  }
219
201
  };
220
- K = fe(it);
221
- ye = /* @__PURE__ */ new WeakMap();
222
- yt = /* @__PURE__ */ new WeakMap();
202
+ N = ve(ht);
203
+ Ee = /* @__PURE__ */ new WeakMap();
204
+ Ct = /* @__PURE__ */ new WeakMap();
223
205
  de = /* @__PURE__ */ new WeakSet();
224
- Dn = function() {
206
+ Nn = function() {
225
207
  const { roots: e } = this, t = [];
226
208
  for (const n of e)
227
- for (const r of y(this, ye))
228
- t.push(G(this, de, On).call(this, n, r));
209
+ for (const r of _(this, Ee))
210
+ t.push(Z(this, de, jn).call(this, n, r));
229
211
  return () => {
230
212
  for (const n of t)
231
213
  n();
232
214
  };
233
215
  };
234
- On = function(e, t) {
235
- let n = We.get(e);
236
- n || (n = /* @__PURE__ */ new Map(), We.set(e, n));
216
+ jn = function(e, t) {
217
+ let n = Ue.get(e);
218
+ n || (n = /* @__PURE__ */ new Map(), Ue.set(e, n));
237
219
  let r = n.get(t);
238
220
  if (!r) {
239
- const s = xr(e) ? G(this, de, Cn).call(this, e, n, t) : G(this, de, Pn).call(this, e, n, t);
221
+ const s = Wr(e) ? Z(this, de, Xn).call(this, e, n, t) : Z(this, de, Kn).call(this, e, n, t);
240
222
  if (!s)
241
223
  return () => {
242
224
  };
@@ -248,25 +230,26 @@ On = function(e, t) {
248
230
  i || (i = !0, r.refCount--, r.refCount === 0 && r.cleanup());
249
231
  };
250
232
  };
251
- Cn = function(e, t, n) {
252
- const r = e.createElement("style");
253
- r.textContent = n, e.head.prepend(r);
254
- const i = new MutationObserver((s) => {
255
- for (const o of s)
256
- for (const a of Array.from(o.removedNodes))
257
- if (a === r) {
258
- e.head.prepend(r);
233
+ Xn = function(e, t, n) {
234
+ var r;
235
+ const i = e.createElement("style"), { nonce: s } = (r = this.options) != null ? r : {};
236
+ s && i.setAttribute("nonce", s), i.textContent = n, e.head.prepend(i);
237
+ const a = new MutationObserver((o) => {
238
+ for (const d of o)
239
+ for (const c of Array.from(d.removedNodes))
240
+ if (c === i) {
241
+ e.head.prepend(i);
259
242
  return;
260
243
  }
261
244
  });
262
- return i.observe(e.head, { childList: !0 }), {
245
+ return a.observe(e.head, { childList: !0 }), {
263
246
  refCount: 0,
264
247
  cleanup: () => {
265
- i.disconnect(), r.remove(), t.delete(n), t.size === 0 && We.delete(e);
248
+ a.disconnect(), i.remove(), t.delete(n), t.size === 0 && Ue.delete(e);
266
249
  }
267
250
  };
268
251
  };
269
- Pn = function(e, t, n) {
252
+ Kn = function(e, t, n) {
270
253
  !("adoptedStyleSheets" in e && Array.isArray(e.adoptedStyleSheets)) && process.env.NODE_ENV !== "production" && console.error(
271
254
  "Cannot inject styles: This browser doesn't support adoptedStyleSheets"
272
255
  );
@@ -279,67 +262,84 @@ Pn = function(e, t, n) {
279
262
  return s.replaceSync(n), e.adoptedStyleSheets.push(s), {
280
263
  refCount: 0,
281
264
  cleanup: () => {
282
- var o;
283
- if (kr(e) && ((o = e.host) != null && o.isConnected)) {
284
- const a = e.adoptedStyleSheets.indexOf(s);
285
- a !== -1 && e.adoptedStyleSheets.splice(a, 1);
265
+ var a;
266
+ if (Fr(e) && ((a = e.host) != null && a.isConnected)) {
267
+ const o = e.adoptedStyleSheets.indexOf(s);
268
+ o !== -1 && e.adoptedStyleSheets.splice(o, 1);
286
269
  }
287
- t.delete(n), t.size === 0 && We.delete(e);
270
+ t.delete(n), t.size === 0 && Ue.delete(e);
288
271
  }
289
272
  };
290
273
  };
291
- $(K, 4, "additionalRoots", An, Z, yt);
292
- $(K, 2, "sourceRoot", kn, Z);
293
- $(K, 2, "targetRoot", xn, Z);
294
- $(K, 2, "roots", En, Z);
295
- Q(K, Z);
296
- var De = "data-dnd-", st = `${De}dropping`, D = "--dnd-", L = `${De}dragging`, Le = `${De}placeholder`, ei = [
297
- L,
298
- Le,
274
+ R(N, 4, "additionalRoots", zn, H, Ct);
275
+ R(N, 2, "sourceRoot", Fn, H);
276
+ R(N, 2, "targetRoot", Wn, H);
277
+ R(N, 2, "roots", Ln, H);
278
+ ee(N, H);
279
+ H.configure = Ce(H);
280
+ var He = H, fi = class extends he {
281
+ constructor(e, t) {
282
+ super(e, t), this.manager = e;
283
+ const { cursor: n = "grabbing" } = t ?? {}, r = e.registry.plugins.get(
284
+ He
285
+ ), i = r?.register(
286
+ `* { cursor: ${n} !important; }`
287
+ );
288
+ if (i) {
289
+ const s = this.destroy.bind(this);
290
+ this.destroy = () => {
291
+ i(), s();
292
+ };
293
+ }
294
+ }
295
+ }, Pe = "data-dnd-", ft = `${Pe}dropping`, O = "--dnd-", z = `${Pe}dragging`, Ye = `${Pe}placeholder`, pi = [
296
+ z,
297
+ Ye,
299
298
  "popover",
300
299
  "aria-pressed",
301
300
  "aria-grabbing"
302
- ], ti = ["view-transition-name"], ni = `
303
- :is(:root,:host) [${L}] {
301
+ ], vi = ["view-transition-name"], mi = `
302
+ :is(:root,:host) [${z}] {
304
303
  position: fixed !important;
305
304
  pointer-events: none !important;
306
305
  touch-action: none;
307
306
  z-index: calc(infinity);
308
307
  will-change: translate;
309
- top: var(${D}top, 0px) !important;
310
- left: var(${D}left, 0px) !important;
308
+ top: var(${O}top, 0px) !important;
309
+ left: var(${O}left, 0px) !important;
311
310
  right: unset !important;
312
311
  bottom: unset !important;
313
- width: var(${D}width, auto);
314
- max-width: var(${D}width, auto);
315
- height: var(${D}height, auto);
316
- max-height: var(${D}height, auto);
317
- transition: var(${D}transition) !important;
312
+ width: var(${O}width, auto);
313
+ max-width: var(${O}width, auto);
314
+ height: var(${O}height, auto);
315
+ max-height: var(${O}height, auto);
316
+ transform: var(${O}transform, none) !important;
317
+ transition: var(${O}transition) !important;
318
318
  }
319
319
 
320
- :is(:root,:host) [${Le}] {
320
+ :is(:root,:host) [${Ye}] {
321
321
  transition: none;
322
322
  }
323
323
 
324
- :is(:root,:host) [${Le}='hidden'] {
324
+ :is(:root,:host) [${Ye}='hidden'] {
325
325
  visibility: hidden;
326
326
  }
327
327
 
328
- [${L}] * {
328
+ [${z}] * {
329
329
  pointer-events: none !important;
330
330
  }
331
331
 
332
- [${L}]:not([${st}]) {
333
- translate: var(${D}translate) !important;
332
+ [${z}]:not([${ft}]) {
333
+ translate: var(${O}translate) !important;
334
334
  }
335
335
 
336
- [${L}][style*='${D}scale'] {
337
- scale: var(${D}scale) !important;
338
- transform-origin: var(${D}transform-origin) !important;
336
+ [${z}][style*='${O}scale'] {
337
+ scale: var(${O}scale) !important;
338
+ transform-origin: var(${O}transform-origin) !important;
339
339
  }
340
340
 
341
341
  @layer dnd-kit {
342
- :where([${L}][popover]) {
342
+ :where([${z}][popover]) {
343
343
  overflow: visible;
344
344
  background: unset;
345
345
  border: unset;
@@ -353,86 +353,86 @@ var De = "data-dnd-", st = `${De}dropping`, D = "--dnd-", L = `${De}dragging`, L
353
353
  }
354
354
  }
355
355
  }
356
- [${L}]::backdrop, [${De}overlay]:not([${L}]) {
356
+ [${z}]::backdrop, [${Pe}overlay]:not([${z}]) {
357
357
  display: none;
358
358
  visibility: hidden;
359
359
  }
360
360
  `.replace(/\n+/g, " ").replace(/\s+/g, " ").trim();
361
- function ri(e, t = "hidden") {
362
- return M(() => {
361
+ function gi(e, t = "hidden") {
362
+ return W(() => {
363
363
  const { element: n, manager: r } = e;
364
364
  if (!n || !r) return;
365
- const i = ii(
365
+ const i = yi(
366
366
  n,
367
367
  r.registry.droppables
368
- ), s = [], o = Cr(n), { remove: a } = o;
369
- return si(i, o, s), oi(o, t), o.remove = () => {
370
- s.forEach((l) => l()), a.call(o);
371
- }, o;
368
+ ), s = [], a = Kr(n), { remove: o } = a;
369
+ return bi(i, a, s), _i(a, t), a.remove = () => {
370
+ s.forEach((d) => d()), o.call(a);
371
+ }, a;
372
372
  });
373
373
  }
374
- function ii(e, t) {
374
+ function yi(e, t) {
375
375
  const n = /* @__PURE__ */ new Map();
376
376
  for (const r of t)
377
377
  if (r.element && (e === r.element || e.contains(r.element))) {
378
- const i = `${De}${et("dom-id")}`;
378
+ const i = `${Pe}${ct("dom-id")}`;
379
379
  r.element.setAttribute(i, ""), n.set(r, i);
380
380
  }
381
381
  return n;
382
382
  }
383
- function si(e, t, n) {
383
+ function bi(e, t, n) {
384
384
  for (const [r, i] of e) {
385
385
  if (!r.element) continue;
386
- const s = `[${i}]`, o = t.matches(s) ? t : t.querySelector(s);
387
- if (r.element.removeAttribute(i), !o) continue;
388
- const a = r.element;
389
- r.proxy = o, o.removeAttribute(i), Jt.set(a, o), n.push(() => {
390
- Jt.delete(a), r.proxy = void 0;
386
+ const s = `[${i}]`, a = t.matches(s) ? t : t.querySelector(s);
387
+ if (r.element.removeAttribute(i), !a) continue;
388
+ const o = r.element;
389
+ r.proxy = a, a.removeAttribute(i), un.set(o, a), n.push(() => {
390
+ un.delete(o), r.proxy = void 0;
391
391
  });
392
392
  }
393
393
  }
394
- function oi(e, t = "hidden") {
395
- e.setAttribute("inert", "true"), e.setAttribute("tab-index", "-1"), e.setAttribute("aria-hidden", "true"), e.setAttribute(Le, t);
394
+ function _i(e, t = "hidden") {
395
+ e.setAttribute("inert", "true"), e.setAttribute("tab-index", "-1"), e.setAttribute("aria-hidden", "true"), e.setAttribute(Ye, t);
396
396
  }
397
- function Tn(e, t) {
398
- return e === t ? !0 : qt(e) === qt(t);
397
+ function Un(e, t) {
398
+ return e === t ? !0 : cn(e) === cn(t);
399
399
  }
400
- function en(e) {
400
+ function vn(e) {
401
401
  const { target: t } = e;
402
- "newState" in e && e.newState === "closed" && le(t) && t.hasAttribute("popover") && requestAnimationFrame(() => we(t));
402
+ "newState" in e && e.newState === "closed" && le(t) && t.hasAttribute("popover") && requestAnimationFrame(() => ae(t));
403
403
  }
404
- function ot(e) {
404
+ function pt(e) {
405
405
  return e.tagName === "TR";
406
406
  }
407
- function ai(e, t, n) {
407
+ function wi(e, t, n) {
408
408
  const r = new MutationObserver((i) => {
409
409
  let s = !1;
410
- for (const o of i) {
411
- if (o.target !== e) {
410
+ for (const a of i) {
411
+ if (a.target !== e) {
412
412
  s = !0;
413
413
  continue;
414
414
  }
415
- if (o.type !== "attributes")
415
+ if (a.type !== "attributes")
416
416
  continue;
417
- const a = o.attributeName;
418
- if (a.startsWith("aria-") || ei.includes(a))
417
+ const o = a.attributeName;
418
+ if (o.startsWith("aria-") || pi.includes(o))
419
419
  continue;
420
- const l = e.getAttribute(a);
421
- if (a === "style") {
422
- if (Gt(e) && Gt(t)) {
423
- const f = e.style;
424
- for (const d of Array.from(t.style))
425
- f.getPropertyValue(d) === "" && t.style.removeProperty(d);
426
- for (const d of Array.from(f)) {
427
- if (ti.includes(d) || d.startsWith(D))
420
+ const d = e.getAttribute(o);
421
+ if (o === "style") {
422
+ if (dn(e) && dn(t)) {
423
+ const c = e.style;
424
+ for (const u of Array.from(t.style))
425
+ c.getPropertyValue(u) === "" && t.style.removeProperty(u);
426
+ for (const u of Array.from(c)) {
427
+ if (vi.includes(u) || u.startsWith(O))
428
428
  continue;
429
- const c = f.getPropertyValue(d);
430
- t.style.setProperty(d, c);
429
+ const l = c.getPropertyValue(u);
430
+ t.style.setProperty(u, l);
431
431
  }
432
432
  }
433
- } else l !== null ? t.setAttribute(a, l) : t.removeAttribute(a);
433
+ } else d !== null ? t.setAttribute(o, d) : t.removeAttribute(o);
434
434
  }
435
- s && n && (t.innerHTML = e.innerHTML);
435
+ s && n && t.replaceChildren(...e.cloneNode(!0).childNodes);
436
436
  });
437
437
  return r.observe(e, {
438
438
  attributes: !0,
@@ -440,400 +440,415 @@ function ai(e, t, n) {
440
440
  childList: !0
441
441
  }), r;
442
442
  }
443
- function li(e, t, n) {
443
+ function Si(e, t, n) {
444
444
  const r = new MutationObserver((i) => {
445
445
  for (const s of i)
446
446
  if (s.addedNodes.length !== 0)
447
- for (const o of Array.from(s.addedNodes)) {
448
- if (o.contains(e) && e.nextElementSibling !== t) {
449
- e.insertAdjacentElement("afterend", t), we(n);
447
+ for (const a of Array.from(s.addedNodes)) {
448
+ if (a.contains(e) && e.nextElementSibling !== t) {
449
+ e.insertAdjacentElement("afterend", t), ae(n);
450
450
  return;
451
451
  }
452
- if (o.contains(t) && t.previousElementSibling !== e) {
453
- t.insertAdjacentElement("beforebegin", e), we(n);
452
+ if (a.contains(t) && t.previousElementSibling !== e) {
453
+ t.insertAdjacentElement("beforebegin", e), ae(n);
454
454
  return;
455
455
  }
456
456
  }
457
+ e.isConnected && t.isConnected && e.nextElementSibling !== t && (e.insertAdjacentElement("afterend", t), ae(n));
457
458
  });
458
459
  return r.observe(e.ownerDocument.body, {
459
460
  childList: !0,
460
461
  subtree: !0
461
462
  }), r;
462
463
  }
463
- function ci(e) {
464
+ function Ei(e) {
464
465
  return new ResizeObserver(() => {
465
- var t, n;
466
- const r = new N(e.placeholder, {
466
+ var t, n, r;
467
+ const i = new V(e.placeholder, {
467
468
  frameTransform: e.frameTransform,
468
469
  ignoreTransforms: !0
469
- }), i = (t = e.transformOrigin) != null ? t : { x: 1, y: 1 }, s = (e.width - r.width) * i.x + e.delta.x, o = (e.height - r.height) * i.y + e.delta.y, a = hn();
470
+ }), s = (t = e.transformOrigin) != null ? t : { x: 1, y: 1 }, a = (e.width - i.width) * s.x + e.delta.x, o = (e.height - i.height) * s.y + e.delta.y, d = An();
470
471
  if (e.styles.set(
471
472
  {
472
- width: r.width - e.widthOffset,
473
- height: r.height - e.heightOffset,
474
- top: e.top + o + a.y,
475
- left: e.left + s + a.x
473
+ width: i.width - e.widthOffset,
474
+ height: i.height - e.heightOffset,
475
+ top: e.top + o + d.y,
476
+ left: e.left + a + d.x
476
477
  },
477
- D
478
- ), (n = e.getElementMutationObserver()) == null || n.takeRecords(), ot(e.element) && ot(e.placeholder)) {
479
- const l = Array.from(e.element.cells), f = Array.from(e.placeholder.cells);
480
- e.getSavedCellWidths() || e.setSavedCellWidths(l.map((d) => d.style.width));
481
- for (const [d, c] of l.entries()) {
482
- const h = f[d];
483
- c.style.width = `${h.getBoundingClientRect().width}px`;
478
+ O
479
+ ), (n = e.getElementMutationObserver()) == null || n.takeRecords(), pt(e.element) && pt(e.placeholder)) {
480
+ const w = Array.from(e.element.cells), D = Array.from(e.placeholder.cells);
481
+ e.getSavedCellWidths() || e.setSavedCellWidths(w.map((x) => x.style.width));
482
+ for (const [x, f] of w.entries()) {
483
+ const m = D[x];
484
+ f.style.width = `${m.getBoundingClientRect().width}px`;
484
485
  }
485
486
  }
486
- e.dragOperation.shape = new N(e.feedbackElement);
487
+ const c = (r = e.getTranslate()) != null ? r : { x: 0, y: 0 }, u = e.left + a + d.x + c.x, l = e.top + o + d.y + c.y, h = i.width - e.widthOffset, v = i.height - e.heightOffset, g = e.frameTransform;
488
+ e.dragOperation.shape = new kt(
489
+ u * g.scaleX + g.x,
490
+ l * g.scaleY + g.y,
491
+ h * g.scaleX,
492
+ v * g.scaleY
493
+ );
487
494
  });
488
495
  }
489
- var di = 250, ui = "ease";
490
- function hi(e) {
496
+ var xi = 250, ki = "ease";
497
+ function Ai(e) {
491
498
  var t, n, r, i;
492
499
  const { animation: s } = e;
493
500
  if (typeof s == "function") {
494
- const b = s({
501
+ const f = s({
502
+ source: e.source,
495
503
  element: e.element,
496
504
  feedbackElement: e.feedbackElement,
497
505
  placeholder: e.placeholder,
498
506
  translate: e.translate,
499
507
  moved: e.moved
500
508
  });
501
- Promise.resolve(b).then(() => {
509
+ Promise.resolve(f).then(() => {
502
510
  e.cleanup(), requestAnimationFrame(e.restoreFocus);
503
511
  });
504
512
  return;
505
513
  }
506
514
  const {
507
- duration: o = di,
508
- easing: a = ui
515
+ duration: a = xi,
516
+ easing: o = ki
509
517
  } = s ?? {};
510
- we(e.feedbackElement);
511
- const [, l] = (t = Pr(
518
+ ae(e.feedbackElement);
519
+ const [, d] = (t = Ur(
512
520
  e.feedbackElement,
513
- (b) => "translate" in b
521
+ (f) => "translate" in f
514
522
  )) != null ? t : [];
515
- l?.pause();
516
- const f = (n = e.placeholder) != null ? n : e.element, d = {
517
- frameTransform: Tn(e.feedbackElement, f) ? null : void 0
518
- }, c = new N(e.feedbackElement, d), h = (r = un(dn(e.feedbackElement).translate)) != null ? r : e.translate, u = new N(f, d), p = mn.delta(c, u, e.alignment), w = {
519
- x: h.x - p.x,
520
- y: h.y - p.y
521
- }, k = Math.round(c.intrinsicHeight) !== Math.round(u.intrinsicHeight) ? {
523
+ d?.pause();
524
+ const c = (n = e.placeholder) != null ? n : e.element, u = {
525
+ frameTransform: Un(e.feedbackElement, c) ? null : void 0
526
+ }, l = new V(e.feedbackElement, u), h = (r = kn(xn(e.feedbackElement).translate)) != null ? r : e.translate, v = new V(c, u), g = kt.delta(l, v, e.alignment), w = {
527
+ x: h.x - g.x,
528
+ y: h.y - g.y
529
+ }, D = Math.round(l.intrinsicHeight) !== Math.round(v.intrinsicHeight) ? {
522
530
  minHeight: [
523
- `${c.intrinsicHeight}px`,
524
- `${u.intrinsicHeight}px`
531
+ `${l.intrinsicHeight}px`,
532
+ `${v.intrinsicHeight}px`
525
533
  ],
526
534
  maxHeight: [
527
- `${c.intrinsicHeight}px`,
528
- `${u.intrinsicHeight}px`
535
+ `${l.intrinsicHeight}px`,
536
+ `${v.intrinsicHeight}px`
529
537
  ]
530
- } : {}, C = Math.round(c.intrinsicWidth) !== Math.round(u.intrinsicWidth) ? {
538
+ } : {}, x = Math.round(l.intrinsicWidth) !== Math.round(v.intrinsicWidth) ? {
531
539
  minWidth: [
532
- `${c.intrinsicWidth}px`,
533
- `${u.intrinsicWidth}px`
540
+ `${l.intrinsicWidth}px`,
541
+ `${v.intrinsicWidth}px`
534
542
  ],
535
543
  maxWidth: [
536
- `${c.intrinsicWidth}px`,
537
- `${u.intrinsicWidth}px`
544
+ `${l.intrinsicWidth}px`,
545
+ `${v.intrinsicWidth}px`
538
546
  ]
539
547
  } : {};
540
- e.styles.set({ transition: e.transition }, D), e.feedbackElement.setAttribute(st, ""), (i = e.getElementMutationObserver()) == null || i.takeRecords(), Tr({
548
+ e.styles.set({ transition: e.transition }, O), e.feedbackElement.setAttribute(ft, ""), (i = e.getElementMutationObserver()) == null || i.takeRecords(), Yr({
541
549
  element: e.feedbackElement,
542
- keyframes: gt(Se(Se({}, k), C), {
550
+ keyframes: Dt(ke(ke({}, D), x), {
543
551
  translate: [
544
552
  `${h.x}px ${h.y}px 0`,
545
553
  `${w.x}px ${w.y}px 0`
546
554
  ]
547
555
  }),
548
556
  options: {
549
- duration: pn(fn(e.feedbackElement)) ? 0 : e.moved || e.feedbackElement !== e.element ? o : 0,
550
- easing: a
557
+ duration: On(Dn(e.feedbackElement)) ? 0 : e.moved || e.feedbackElement !== e.element ? a : 0,
558
+ easing: o
551
559
  }
552
560
  }).then(() => {
553
- e.feedbackElement.removeAttribute(st), l?.finish(), e.cleanup(), requestAnimationFrame(e.restoreFocus);
561
+ e.feedbackElement.removeAttribute(ft), d?.finish(), e.cleanup(), requestAnimationFrame(e.restoreFocus);
554
562
  });
555
563
  }
556
- var $n, at, Ee, _t, Pe, Mn, In, xe = class extends (at = ue, $n = [F], at) {
564
+ var Yn, vt, Ae, Pt, Fe, Bn, Vn, ue = class extends (vt = he, Yn = [j], vt) {
557
565
  constructor(t, n) {
558
- super(t, n), E(this, Pe), E(this, _t, x(Ee, 8, this)), x(Ee, 11, this), this.state = {
566
+ super(t, n), S(this, Fe), S(this, Pt, A(Ae, 8, this)), A(Ae, 11, this), this.state = {
559
567
  initial: {},
560
568
  current: {}
561
569
  };
562
570
  const r = t.registry.plugins.get(
563
- Z
564
- ), i = r?.register(ni);
571
+ He
572
+ ), i = r?.register(mi);
565
573
  if (i) {
566
574
  const s = this.destroy.bind(this);
567
575
  this.destroy = () => {
568
576
  i(), s();
569
577
  };
570
578
  }
571
- this.registerEffect(G(this, Pe, Mn).bind(this, r)), this.registerEffect(G(this, Pe, In));
579
+ this.registerEffect(Z(this, Fe, Bn).bind(this, r)), this.registerEffect(Z(this, Fe, Vn));
572
580
  }
573
581
  };
574
- Ee = fe(at);
575
- _t = /* @__PURE__ */ new WeakMap();
576
- Pe = /* @__PURE__ */ new WeakSet();
577
- Mn = function(e) {
582
+ Ae = ve(vt);
583
+ Pt = /* @__PURE__ */ new WeakMap();
584
+ Fe = /* @__PURE__ */ new WeakSet();
585
+ Bn = function(e) {
578
586
  const { overlay: t } = this;
579
587
  if (!t || !e) return;
580
- const n = Me(t);
588
+ const n = Ne(t);
581
589
  if (n)
582
590
  return e.addRoot(n);
583
591
  };
584
- In = function() {
585
- var e, t, n;
586
- const { state: r, manager: i, options: s } = this, { dragOperation: o } = i, { position: a, source: l, status: f } = o;
587
- if (f.idle) {
588
- r.current = {}, r.initial = {};
592
+ Vn = function() {
593
+ var e, t, n, r, i, s, a;
594
+ const { state: o, manager: d, options: c } = this, { dragOperation: u } = d, { position: l, source: h, status: v } = u;
595
+ if (v.idle) {
596
+ o.current = {}, o.initial = {};
589
597
  return;
590
598
  }
591
- if (!l) return;
592
- const { element: d, feedback: c } = l;
593
- if (!d || c === "none" || !f.initialized || f.initializing)
599
+ if (!h) return;
600
+ const { element: g } = h, w = h.pluginConfig(ue), D = (t = (e = w?.feedback) != null ? e : c?.feedback) != null ? t : "default", x = typeof D == "function" ? D(h, d) : D;
601
+ if (!g || x === "none" || !v.initialized || v.initializing)
594
602
  return;
595
- const { initial: h } = r, u = (e = this.overlay) != null ? e : d, p = Ie(u), w = Ie(d), k = !Tn(d, u), C = new N(d, {
596
- frameTransform: k ? w : null,
597
- ignoreTransforms: !k
598
- }), b = {
599
- x: w.scaleX / p.scaleX,
600
- y: w.scaleY / p.scaleY
603
+ const { initial: f } = o, m = (n = this.overlay) != null ? n : g, p = Xe(m), y = Xe(g), C = !Un(g, m), E = new V(g, {
604
+ frameTransform: C ? y : null,
605
+ ignoreTransforms: !C
606
+ }), L = {
607
+ x: y.scaleX / p.scaleX,
608
+ y: y.scaleY / p.scaleY
601
609
  };
602
- let { width: g, height: m, top: v, left: P } = C;
603
- k && (g = g / b.x, m = m / b.y);
604
- const S = new Ar(u), {
605
- transition: z,
606
- translate: U,
607
- boxSizing: X,
608
- paddingBlockStart: qn,
609
- paddingBlockEnd: Gn,
610
- paddingInlineStart: Jn,
611
- paddingInlineEnd: Qn,
612
- borderInlineStartWidth: Zn,
613
- borderInlineEndWidth: er,
614
- borderBlockStartWidth: tr,
615
- borderBlockEndWidth: nr
616
- } = dn(d), Ct = c === "clone", Pt = X === "content-box", Tt = Pt ? parseInt(Jn) + parseInt(Qn) + parseInt(Zn) + parseInt(er) : 0, $t = Pt ? parseInt(qn) + parseInt(Gn) + parseInt(tr) + parseInt(nr) : 0, T = c !== "move" && !this.overlay ? ri(l, Ct ? "clone" : "hidden") : null, Xe = M(
617
- () => vt(i.dragOperation.activatorEvent)
610
+ let { width: T, height: P, top: Te, left: $e } = E;
611
+ C && (T = T / L.x, P = P / L.y);
612
+ const me = new Nr(m), Ge = xn(g), {
613
+ transition: zt,
614
+ translate: Nt,
615
+ boxSizing: ar,
616
+ paddingBlockStart: lr,
617
+ paddingBlockEnd: cr,
618
+ paddingInlineStart: dr,
619
+ paddingInlineEnd: ur,
620
+ borderInlineStartWidth: hr,
621
+ borderInlineEndWidth: fr,
622
+ borderBlockStartWidth: pr,
623
+ borderBlockEndWidth: vr
624
+ } = Ge, Ie = zt.split(",").filter((b) => !/^\s*(transform|translate|scale)\b/.test(b)).join(","), q = zr(Ge), mr = Ge.transform, jt = x === "clone", Xt = ar === "content-box", Kt = Xt ? parseInt(dr) + parseInt(ur) + parseInt(hr) + parseInt(fr) : 0, Ut = Xt ? parseInt(lr) + parseInt(cr) + parseInt(pr) + parseInt(vr) : 0, I = x !== "move" && !this.overlay ? gi(h, jt ? "clone" : "hidden") : null, Je = W(
625
+ () => xt(d.dragOperation.activatorEvent)
618
626
  );
619
- if (U !== "none") {
620
- const _ = un(U);
621
- _ && !h.translate && (h.translate = _);
622
- }
623
- if (!h.transformOrigin) {
624
- const _ = M(() => a.current);
625
- h.transformOrigin = {
626
- x: (_.x - P * p.scaleX - p.x) / (g * p.scaleX),
627
- y: (_.y - v * p.scaleY - p.y) / (m * p.scaleY)
627
+ if (!f.translate) {
628
+ if (this.overlay && q)
629
+ f.translate = { x: q.x, y: q.y };
630
+ else if (Nt !== "none") {
631
+ const b = kn(Nt);
632
+ b && (f.translate = b);
633
+ }
634
+ }
635
+ if (!f.transformOrigin) {
636
+ const b = W(() => l.current), k = $e + ((r = q?.x) != null ? r : 0), M = Te + ((i = q?.y) != null ? i : 0);
637
+ f.transformOrigin = {
638
+ x: (b.x - k * p.scaleX - p.x) / (T * p.scaleX),
639
+ y: (b.y - M * p.scaleY - p.y) / (P * p.scaleY)
628
640
  };
629
641
  }
630
- const { transformOrigin: ee } = h, Mt = v * p.scaleY + p.y, It = P * p.scaleX + p.x;
631
- if (!h.coordinates && (h.coordinates = {
632
- x: It,
633
- y: Mt
634
- }, b.x !== 1 || b.y !== 1)) {
635
- const { scaleX: _, scaleY: A } = w, { x: W, y: te } = ee;
636
- h.coordinates.x += (g * _ - g) * W, h.coordinates.y += (m * A - m) * te;
637
- }
638
- h.dimensions || (h.dimensions = { width: g, height: m }), h.frameTransform || (h.frameTransform = p);
639
- const Rt = {
640
- x: h.coordinates.x - It,
641
- y: h.coordinates.y - Mt
642
- }, Wt = {
643
- width: (h.dimensions.width * h.frameTransform.scaleX - g * p.scaleX) * ee.x,
644
- height: (h.dimensions.height * h.frameTransform.scaleY - m * p.scaleY) * ee.y
645
- }, Ye = {
646
- x: Rt.x / p.scaleX + Wt.width,
647
- y: Rt.y / p.scaleY + Wt.height
648
- }, Lt = {
649
- left: P + Ye.x,
650
- top: v + Ye.y
642
+ const { transformOrigin: te } = f, Yt = Te * p.scaleY + p.y, Bt = $e * p.scaleX + p.x;
643
+ if (!f.coordinates && (f.coordinates = {
644
+ x: Bt,
645
+ y: Yt
646
+ }, L.x !== 1 || L.y !== 1)) {
647
+ const { scaleX: b, scaleY: k } = y, { x: M, y: X } = te;
648
+ f.coordinates.x += (T * b - T) * M, f.coordinates.y += (P * k - P) * X;
649
+ }
650
+ f.dimensions || (f.dimensions = { width: T, height: P }), f.frameTransform || (f.frameTransform = p);
651
+ const Vt = {
652
+ x: f.coordinates.x - Bt,
653
+ y: f.coordinates.y - Yt
654
+ }, Ht = {
655
+ width: (f.dimensions.width * f.frameTransform.scaleX - T * p.scaleX) * te.x,
656
+ height: (f.dimensions.height * f.frameTransform.scaleY - P * p.scaleY) * te.y
657
+ }, Qe = {
658
+ x: Vt.x / p.scaleX + Ht.width,
659
+ y: Vt.y / p.scaleY + Ht.height
660
+ }, qt = {
661
+ left: $e + Qe.x,
662
+ top: Te + Qe.y
651
663
  };
652
- u.setAttribute(L, "true");
653
- const Ft = M(() => o.transform), zt = (t = h.translate) != null ? t : { x: 0, y: 0 }, rr = Ft.x * p.scaleX + zt.x, ir = Ft.y * p.scaleY + zt.y, Nt = hn();
654
- S.set(
664
+ m.setAttribute(z, "true");
665
+ const Gt = W(() => u.transform), Jt = (s = f.translate) != null ? s : { x: 0, y: 0 }, gr = Gt.x * p.scaleX + Jt.x, yr = Gt.y * p.scaleY + Jt.y, Qt = An();
666
+ me.set(
655
667
  {
656
- width: g - Tt,
657
- height: m - $t,
658
- top: Lt.top + Nt.y,
659
- left: Lt.left + Nt.x,
660
- translate: `${rr}px ${ir}px 0`,
661
- transition: z ? `${z}, translate 0ms linear` : "",
662
- scale: k ? `${b.x} ${b.y}` : "",
663
- "transform-origin": `${ee.x * 100}% ${ee.y * 100}%`
668
+ width: T - Kt,
669
+ height: P - Ut,
670
+ top: qt.top + Qt.y,
671
+ left: qt.left + Qt.x,
672
+ translate: `${gr}px ${yr}px 0`,
673
+ transform: this.overlay ? "none" : mr,
674
+ transition: Ie ? `${Ie}, translate 0ms linear` : "translate 0ms linear",
675
+ scale: C ? `${L.x} ${L.y}` : "",
676
+ "transform-origin": `${te.x * 100}% ${te.y * 100}%`
664
677
  },
665
- D
666
- ), T && (d.insertAdjacentElement("afterend", T), s?.rootElement && (typeof s.rootElement == "function" ? s.rootElement(l) : s.rootElement).appendChild(d)), Vt(u) && (u.hasAttribute("popover") || u.setAttribute("popover", "manual"), we(u), u.addEventListener("beforetoggle", en));
667
- let H, je, Oe;
668
- const Kt = ci({
669
- placeholder: T,
670
- element: d,
671
- feedbackElement: u,
678
+ O
679
+ ), I && (g.insertAdjacentElement("afterend", I), c?.rootElement && (typeof c.rootElement == "function" ? c.rootElement(h) : c.rootElement).appendChild(g)), ln(m) && (m.hasAttribute("popover") || m.setAttribute("popover", "manual"), ae(m), m.addEventListener("beforetoggle", vn));
680
+ let G, Ze, Me;
681
+ const Zt = Ei({
682
+ placeholder: I,
683
+ element: g,
684
+ feedbackElement: m,
672
685
  frameTransform: p,
673
- transformOrigin: ee,
674
- width: g,
675
- height: m,
676
- top: v,
677
- left: P,
678
- widthOffset: Tt,
679
- heightOffset: $t,
680
- delta: Ye,
681
- styles: S,
682
- dragOperation: o,
683
- getElementMutationObserver: () => H,
684
- getSavedCellWidths: () => Oe,
685
- setSavedCellWidths: (_) => {
686
- Oe = _;
686
+ transformOrigin: te,
687
+ width: T,
688
+ height: P,
689
+ top: Te,
690
+ left: $e,
691
+ widthOffset: Kt,
692
+ heightOffset: Ut,
693
+ delta: Qe,
694
+ styles: me,
695
+ dragOperation: u,
696
+ getTranslate: () => o.current.translate,
697
+ getElementMutationObserver: () => G,
698
+ getSavedCellWidths: () => Me,
699
+ setSavedCellWidths: (b) => {
700
+ Me = b;
687
701
  }
688
- }), Ut = new N(u);
689
- M(() => o.shape = Ut);
690
- const Be = fn(u), Xt = (_) => {
691
- this.manager.actions.stop({ event: _ });
692
- }, sr = pn(Be);
693
- Xe && Be.addEventListener("resize", Xt), M(() => l.status) === "idle" && requestAnimationFrame(() => l.status = "dragging"), T && (Kt.observe(T), H = ai(
694
- d,
695
- T,
696
- Ct
697
- ), je = li(
698
- d,
699
- T,
700
- u
702
+ }), en = new V(m);
703
+ W(() => u.shape = en);
704
+ const et = Dn(m), tn = (b) => {
705
+ this.manager.actions.stop({ event: b });
706
+ }, br = On(et);
707
+ Je && et.addEventListener("resize", tn), W(() => h.status) === "idle" && requestAnimationFrame(() => h.status = "dragging"), I && (Zt.observe(I), G = wi(
708
+ g,
709
+ I,
710
+ jt
711
+ ), Ze = Si(
712
+ g,
713
+ I,
714
+ m
701
715
  ));
702
- const Yt = (n = i.dragOperation.source) == null ? void 0 : n.id, or = () => {
703
- var _;
704
- if (!Xe || Yt == null) return;
705
- const A = i.registry.draggables.get(Yt), W = (_ = A?.handle) != null ? _ : A?.element;
706
- cn(W) && W.focus();
707
- }, He = () => {
708
- var _;
709
- if (H?.disconnect(), je?.disconnect(), Kt.disconnect(), Be.removeEventListener("resize", Xt), Vt(u) && (u.removeEventListener(
716
+ const nn = (a = d.dragOperation.source) == null ? void 0 : a.id, _r = () => {
717
+ var b;
718
+ if (!Je || nn == null) return;
719
+ const k = d.registry.draggables.get(nn), M = (b = k?.handle) != null ? b : k?.element;
720
+ En(M) && M.focus();
721
+ }, tt = () => {
722
+ var b;
723
+ if (G?.disconnect(), Ze?.disconnect(), Zt.disconnect(), et.removeEventListener("resize", tn), ln(m) && (m.removeEventListener(
710
724
  "beforetoggle",
711
- en
712
- ), u.removeAttribute("popover")), u.removeAttribute(L), S.reset(), Oe && ot(d)) {
713
- const W = Array.from(d.cells);
714
- for (const [te, ne] of W.entries())
715
- ne.style.width = (_ = Oe[te]) != null ? _ : "";
725
+ vn
726
+ ), m.removeAttribute("popover")), m.removeAttribute(z), me.reset(), Me && pt(g)) {
727
+ const X = Array.from(g.cells);
728
+ for (const [nt, Re] of X.entries())
729
+ Re.style.width = (b = Me[nt]) != null ? b : "";
716
730
  }
717
- l.status = "idle";
718
- const A = r.current.translate != null;
719
- T && (A || T.parentElement !== u.parentElement) && u.isConnected && T.replaceWith(u), T?.remove();
720
- }, ar = s?.dropAnimation, jt = this, lr = Mr(
731
+ h.status = "idle";
732
+ const k = o.current.translate != null, M = u.status.dragging;
733
+ I && (!M && k || I.parentElement !== m.parentElement) && m.isConnected && I.replaceWith(m), I?.remove();
734
+ }, wr = c?.dropAnimation, rn = this, Sr = Vr(
721
735
  // Update transform on move
722
736
  () => {
723
- var _;
724
- const { transform: A, status: W } = o;
725
- if (!(!A.x && !A.y && !r.current.translate) && W.dragging) {
726
- const te = (_ = h.translate) != null ? _ : { x: 0, y: 0 }, ne = {
727
- x: A.x / p.scaleX + te.x,
728
- y: A.y / p.scaleY + te.y
729
- }, Bt = r.current.translate, cr = M(() => o.modifiers), Ve = M(() => {
730
- var pe;
731
- return (pe = o.shape) == null ? void 0 : pe.current;
732
- }), dr = Xe && !sr ? "250ms cubic-bezier(0.25, 1, 0.5, 1)" : "0ms linear";
733
- if (S.set(
737
+ var b, k, M;
738
+ const { transform: X, status: nt } = u;
739
+ if (!(!X.x && !X.y && !o.current.translate) && nt.dragging) {
740
+ const Re = (b = f.translate) != null ? b : { x: 0, y: 0 }, Le = {
741
+ x: X.x / p.scaleX + Re.x,
742
+ y: X.y / p.scaleY + Re.y
743
+ }, sn = o.current.translate, Er = W(() => u.modifiers), rt = W(() => {
744
+ var ye;
745
+ return (ye = u.shape) == null ? void 0 : ye.current;
746
+ }), ge = c?.keyboardTransition, on = Je && !br && ge !== null ? `${(k = ge?.duration) != null ? k : 250}ms ${(M = ge?.easing) != null ? M : "cubic-bezier(0.25, 1, 0.5, 1)"}` : "0ms linear";
747
+ if (me.set(
734
748
  {
735
- transition: `${z}, translate ${dr}`,
736
- translate: `${ne.x}px ${ne.y}px 0`
749
+ transition: Ie ? `${Ie}, translate ${on}` : `translate ${on}`,
750
+ translate: `${Le.x}px ${Le.y}px 0`
737
751
  },
738
- D
739
- ), H?.takeRecords(), Ve && Ve !== Ut && Bt && !cr.length) {
740
- const pe = Ir.delta(ne, Bt);
741
- o.shape = mn.from(
742
- Ve.boundingRectangle
752
+ O
753
+ ), G?.takeRecords(), rt && rt !== en && sn && !Er.length) {
754
+ const ye = Hr.delta(Le, sn);
755
+ u.shape = kt.from(
756
+ rt.boundingRectangle
743
757
  ).translate(
744
- pe.x * p.scaleX,
745
- pe.y * p.scaleY
758
+ ye.x * p.scaleX,
759
+ ye.y * p.scaleY
746
760
  );
747
761
  } else
748
- o.shape = new N(u);
749
- r.current.translate = ne;
762
+ u.shape = new V(m);
763
+ o.current.translate = Le;
750
764
  }
751
765
  },
752
766
  // Drop animation
753
767
  function() {
754
- if (o.status.dropped) {
755
- this.dispose(), l.status = "dropping";
756
- const _ = jt.dropAnimation !== void 0 ? jt.dropAnimation : ar;
757
- let A = r.current.translate;
758
- const W = A != null;
759
- if (!A && d !== u && (A = { x: 0, y: 0 }), !A || _ === null) {
760
- He();
768
+ if (u.status.dropped) {
769
+ this.dispose(), h.status = "dropping";
770
+ const b = w?.dropAnimation !== void 0 ? w.dropAnimation : rn.dropAnimation !== void 0 ? rn.dropAnimation : wr;
771
+ let k = o.current.translate;
772
+ const M = k != null;
773
+ if (!k && g !== m && (k = { x: 0, y: 0 }), !k || b === null) {
774
+ tt();
761
775
  return;
762
776
  }
763
- i.renderer.rendering.then(() => {
764
- hi({
765
- element: d,
766
- feedbackElement: u,
767
- placeholder: T,
768
- translate: A,
769
- moved: W,
770
- transition: z,
771
- alignment: l.alignment,
772
- styles: S,
773
- animation: _ ?? void 0,
774
- getElementMutationObserver: () => H,
775
- cleanup: He,
776
- restoreFocus: or
777
+ d.renderer.rendering.then(() => {
778
+ Ai({
779
+ source: h,
780
+ element: g,
781
+ feedbackElement: m,
782
+ placeholder: I,
783
+ translate: k,
784
+ moved: M,
785
+ transition: zt,
786
+ alignment: h.alignment,
787
+ styles: me,
788
+ animation: b ?? void 0,
789
+ getElementMutationObserver: () => G,
790
+ cleanup: tt,
791
+ restoreFocus: _r
777
792
  });
778
793
  });
779
794
  }
780
795
  }
781
796
  );
782
797
  return () => {
783
- He(), lr();
798
+ tt(), Sr();
784
799
  };
785
800
  };
786
- $(Ee, 4, "overlay", $n, xe, _t);
787
- Q(Ee, xe);
788
- xe.configure = pt(xe);
789
- var fi = xe, ve = !0, pi = !1, Rn, Wn, Ln, Fn, j, wt, St;
790
- Fn = (Ln = [F], R.Forward), Wn = (Rn = [F], R.Reverse);
791
- var ke = class {
801
+ R(Ae, 4, "overlay", Yn, ue, Pt);
802
+ ee(Ae, ue);
803
+ ue.configure = Ce(ue);
804
+ var Di = ue, be = !0, Oi = !1, Hn, qn, Gn, Jn, U, Tt, $t;
805
+ Jn = (Gn = [j], F.Forward), qn = (Hn = [j], F.Reverse);
806
+ var De = class {
792
807
  constructor() {
793
- E(this, wt, x(j, 8, this, ve)), x(j, 11, this), E(this, St, x(j, 12, this, ve)), x(j, 15, this);
808
+ S(this, Tt, A(U, 8, this, be)), A(U, 11, this), S(this, $t, A(U, 12, this, be)), A(U, 15, this);
794
809
  }
795
810
  isLocked(e) {
796
- return e === R.Idle ? !1 : e == null ? this[R.Forward] === ve && this[R.Reverse] === ve : this[e] === ve;
811
+ return e === F.Idle ? !1 : e == null ? this[F.Forward] === be && this[F.Reverse] === be : this[e] === be;
797
812
  }
798
813
  unlock(e) {
799
- e !== R.Idle && (this[e] = pi);
814
+ e !== F.Idle && (this[e] = Oi);
800
815
  }
801
816
  };
802
- j = fe(null);
803
- wt = /* @__PURE__ */ new WeakMap();
804
- St = /* @__PURE__ */ new WeakMap();
805
- $(j, 4, Fn, Ln, ke, wt);
806
- $(j, 4, Wn, Rn, ke, St);
807
- Q(j, ke);
808
- var vi = [R.Forward, R.Reverse], tn = class {
817
+ U = ve(null);
818
+ Tt = /* @__PURE__ */ new WeakMap();
819
+ $t = /* @__PURE__ */ new WeakMap();
820
+ R(U, 4, Jn, Gn, De, Tt);
821
+ R(U, 4, qn, Hn, De, $t);
822
+ ee(U, De);
823
+ var Ci = [F.Forward, F.Reverse], mn = class {
809
824
  constructor() {
810
- this.x = new ke(), this.y = new ke();
825
+ this.x = new De(), this.y = new De();
811
826
  }
812
827
  isLocked() {
813
828
  return this.x.isLocked() && this.y.isLocked();
814
829
  }
815
- }, mi = class extends ue {
830
+ }, Pi = class extends he {
816
831
  constructor(e) {
817
832
  super(e);
818
- const t = gn(new tn());
833
+ const t = Pn(new mn());
819
834
  let n = null;
820
- this.signal = t, J(() => {
835
+ this.signal = t, fe(() => {
821
836
  const { status: r } = e.dragOperation;
822
837
  if (!r.initialized) {
823
- n = null, t.value = new tn();
838
+ n = null, t.value = new mn();
824
839
  return;
825
840
  }
826
841
  const { delta: i } = e.dragOperation.position;
827
842
  if (n) {
828
843
  const s = {
829
- x: nn(i.x, n.x),
830
- y: nn(i.y, n.y)
831
- }, o = t.peek();
832
- Wr(() => {
833
- for (const a of vn)
834
- for (const l of vi)
835
- s[a] === l && o[a].unlock(l);
836
- t.value = o;
844
+ x: gn(i.x, n.x),
845
+ y: gn(i.y, n.y)
846
+ }, a = t.peek();
847
+ Gr(() => {
848
+ for (const o of Cn)
849
+ for (const d of Ci)
850
+ s[o] === d && a[o].unlock(d);
851
+ t.value = a;
837
852
  });
838
853
  }
839
854
  n = i;
@@ -843,106 +858,108 @@ var vi = [R.Forward, R.Reverse], tn = class {
843
858
  return this.signal.peek();
844
859
  }
845
860
  };
846
- function nn(e, t) {
861
+ function gn(e, t) {
847
862
  return Math.sign(e - t);
848
863
  }
849
- var zn, lt, Ae, Et, Y, ct, Ke = class extends (lt = ft, zn = [F], lt) {
864
+ var Qn, mt, Oe, It, K, gt, qe = class extends (mt = St, Qn = [j], mt) {
850
865
  constructor(e) {
851
- super(e), E(this, Et, x(Ae, 8, this, !1)), x(Ae, 11, this), E(this, Y), E(this, ct, () => {
852
- if (!y(this, Y))
866
+ super(e), S(this, It, A(Oe, 8, this, !1)), A(Oe, 11, this), S(this, K), S(this, gt, () => {
867
+ if (!_(this, K))
853
868
  return;
854
- const { element: s, by: o } = y(this, Y);
855
- o.y && (s.scrollTop += o.y), o.x && (s.scrollLeft += o.x);
856
- }), this.scroll = (s) => {
869
+ const { element: s, by: a } = _(this, K);
870
+ a.y && (s.scrollTop += a.y), a.x && (s.scrollLeft += a.x);
871
+ }), this.scroll = (s, a) => {
857
872
  var o;
858
873
  if (this.disabled)
859
874
  return !1;
860
- const a = this.getScrollableElements();
861
- if (!a)
862
- return O(this, Y, void 0), !1;
863
- const { position: l } = this.manager.dragOperation, f = l?.current;
864
- if (f) {
865
- const { by: d } = s ?? {}, c = d ? {
866
- x: rn(d.x),
867
- y: rn(d.y)
868
- } : void 0, h = c ? void 0 : this.scrollIntentTracker.current;
869
- if (h?.isLocked())
875
+ const d = this.getScrollableElements();
876
+ if (!d)
877
+ return $(this, K, void 0), !1;
878
+ const { position: c } = this.manager.dragOperation, u = c?.current;
879
+ if (u) {
880
+ const { by: l } = s ?? {}, h = l ? {
881
+ x: yn(l.x),
882
+ y: yn(l.y)
883
+ } : void 0, v = h ? void 0 : this.scrollIntentTracker.current;
884
+ if (v?.isLocked())
870
885
  return !1;
871
- for (const u of a) {
872
- const p = mr(u, d);
873
- if (p.x || p.y) {
874
- const { speed: w, direction: k } = gr(
886
+ for (const g of d) {
887
+ const w = $r(g, l);
888
+ if (w.x || w.y) {
889
+ const { speed: D, direction: x } = Ir(
890
+ g,
875
891
  u,
876
- f,
877
- c
892
+ h,
893
+ a?.acceleration,
894
+ a?.threshold
878
895
  );
879
- if (h)
880
- for (const C of vn)
881
- h[C].isLocked(k[C]) && (w[C] = 0, k[C] = 0);
882
- if (k.x || k.y) {
883
- const { x: C, y: b } = d ?? k, g = C * w.x, m = b * w.y;
884
- if (g || m) {
885
- const v = (o = y(this, Y)) == null ? void 0 : o.by;
886
- if (this.autoScrolling && v && (v.x && !g || v.y && !m))
896
+ if (v)
897
+ for (const f of Cn)
898
+ v[f].isLocked(x[f]) && (D[f] = 0, x[f] = 0);
899
+ if (x.x || x.y) {
900
+ const { x: f, y: m } = l ?? x, p = f * D.x, y = m * D.y;
901
+ if (p || y) {
902
+ const C = (o = _(this, K)) == null ? void 0 : o.by;
903
+ if (this.autoScrolling && C && (C.x && !p || C.y && !y))
887
904
  continue;
888
- return O(this, Y, {
889
- element: u,
905
+ return $(this, K, {
906
+ element: g,
890
907
  by: {
891
- x: g,
892
- y: m
908
+ x: p,
909
+ y
893
910
  }
894
- }), $e.schedule(y(this, ct)), !0;
911
+ }), je.schedule(_(this, gt)), !0;
895
912
  }
896
913
  }
897
914
  }
898
915
  }
899
916
  }
900
- return O(this, Y, void 0), !1;
917
+ return $(this, K, void 0), !1;
901
918
  };
902
919
  let t = null, n = null;
903
- const r = tt(() => {
904
- const { position: s, source: o } = e.dragOperation;
920
+ const r = hn(() => {
921
+ const { position: s, source: a } = e.dragOperation;
905
922
  if (!s)
906
923
  return null;
907
- const a = Dr(
908
- Me(o?.element),
924
+ const o = jr(
925
+ Ne(a?.element),
909
926
  s.current
910
927
  );
911
- return a && (t = a), a ?? t;
912
- }), i = tt(() => {
913
- const s = r.value, { documentElement: o } = Ne(s);
914
- if (!s || s === o) {
915
- const { target: a } = e.dragOperation, l = a?.element;
916
- if (l) {
917
- const f = Ht(l, {
928
+ return o && (t = o), o ?? t;
929
+ }), i = hn(() => {
930
+ const s = r.value, { documentElement: a } = Et(s);
931
+ if (!s || s === a) {
932
+ const { target: o } = e.dragOperation, d = o?.element;
933
+ if (d) {
934
+ const c = an(d, {
918
935
  excludeElement: !1
919
936
  });
920
- return n = f, f;
937
+ return n = c, c;
921
938
  }
922
939
  }
923
940
  if (s) {
924
- const a = Ht(s, {
941
+ const o = an(s, {
925
942
  excludeElement: !1
926
943
  });
927
- return this.autoScrolling && n && a.size < n?.size ? n : (n = a, a);
944
+ return this.autoScrolling && n && o.size < n?.size ? n : (n = o, o);
928
945
  }
929
946
  return n = null, null;
930
- }, $r);
931
- this.getScrollableElements = () => i.value, this.scrollIntentTracker = new mi(e), this.destroy = e.monitor.addEventListener("dragmove", (s) => {
932
- this.disabled || s.defaultPrevented || !vt(e.dragOperation.activatorEvent) || !s.by || this.scroll({ by: s.by }) && s.preventDefault();
947
+ }, Br);
948
+ this.getScrollableElements = () => i.value, this.scrollIntentTracker = new Pi(e), this.destroy = e.monitor.addEventListener("dragmove", (s) => {
949
+ this.disabled || s.defaultPrevented || !xt(e.dragOperation.activatorEvent) || !s.by || this.scroll({ by: s.by }) && s.preventDefault();
933
950
  });
934
951
  }
935
952
  };
936
- Ae = fe(lt);
937
- Et = /* @__PURE__ */ new WeakMap();
938
- Y = /* @__PURE__ */ new WeakMap();
939
- ct = /* @__PURE__ */ new WeakMap();
940
- $(Ae, 4, "autoScrolling", zn, Ke, Et);
941
- Q(Ae, Ke);
942
- function rn(e) {
943
- return e > 0 ? R.Forward : e < 0 ? R.Reverse : R.Idle;
953
+ Oe = ve(mt);
954
+ It = /* @__PURE__ */ new WeakMap();
955
+ K = /* @__PURE__ */ new WeakMap();
956
+ gt = /* @__PURE__ */ new WeakMap();
957
+ R(Oe, 4, "autoScrolling", Qn, qe, It);
958
+ ee(Oe, qe);
959
+ function yn(e) {
960
+ return e > 0 ? F.Forward : e < 0 ? F.Reverse : F.Idle;
944
961
  }
945
- var gi = class {
962
+ var Ti = class {
946
963
  constructor(e) {
947
964
  this.scheduler = e, this.pending = !1, this.tasks = /* @__PURE__ */ new Set(), this.resolvers = /* @__PURE__ */ new Set(), this.flush = () => {
948
965
  const { tasks: t, resolvers: n } = this;
@@ -956,82 +973,98 @@ var gi = class {
956
973
  schedule(e) {
957
974
  return this.tasks.add(e), this.pending || (this.pending = !0, this.scheduler(this.flush)), new Promise((t) => this.resolvers.add(t));
958
975
  }
959
- }, bi = new gi((e) => {
976
+ }, $i = new Ti((e) => {
960
977
  typeof requestAnimationFrame == "function" ? requestAnimationFrame(e) : e();
961
- }), yi = 10, Nn = class extends ue {
962
- constructor(e, t) {
963
- super(e);
964
- const n = e.registry.plugins.get(Ke);
965
- if (!n)
978
+ }), Ii = 10, yt = class extends he {
979
+ constructor(t, n) {
980
+ super(t, n);
981
+ const r = t.registry.plugins.get(qe);
982
+ if (!r)
966
983
  throw new Error("AutoScroller plugin depends on Scroller plugin");
967
- this.destroy = J(() => {
984
+ this.destroy = fe(() => {
985
+ var i, s, a;
968
986
  if (this.disabled)
969
987
  return;
970
- const { position: r, status: i } = e.dragOperation;
971
- if (i.dragging)
972
- if (n.scroll()) {
973
- n.autoScrolling = !0;
974
- const o = setInterval(
975
- () => bi.schedule(n.scroll),
976
- yi
988
+ const { position: o, status: d } = t.dragOperation;
989
+ if (d.dragging) {
990
+ const c = {
991
+ acceleration: (i = this.options) == null ? void 0 : i.acceleration,
992
+ threshold: typeof ((s = this.options) == null ? void 0 : s.threshold) == "number" ? { x: this.options.threshold, y: this.options.threshold } : (a = this.options) == null ? void 0 : a.threshold
993
+ };
994
+ if (r.scroll(void 0, c)) {
995
+ r.autoScrolling = !0;
996
+ const l = setInterval(
997
+ () => $i.schedule(
998
+ () => r.scroll(void 0, c)
999
+ ),
1000
+ Ii
977
1001
  );
978
1002
  return () => {
979
- clearInterval(o);
1003
+ clearInterval(l);
980
1004
  };
981
1005
  } else
982
- n.autoScrolling = !1;
1006
+ r.autoScrolling = !1;
1007
+ }
983
1008
  });
984
1009
  }
985
- }, sn = {
1010
+ };
1011
+ yt.configure = Ce(yt);
1012
+ var Zn = yt, bn = {
986
1013
  capture: !0,
987
1014
  passive: !0
988
- }, ge, _i = class extends ft {
1015
+ }, we, Mi = class extends St {
989
1016
  constructor(e) {
990
- super(e), E(this, ge), this.handleScroll = () => {
991
- y(this, ge) == null && O(this, ge, setTimeout(() => {
992
- this.manager.collisionObserver.forceUpdate(!1), O(this, ge, void 0);
1017
+ super(e), S(this, we), this.handleScroll = () => {
1018
+ _(this, we) == null && $(this, we, setTimeout(() => {
1019
+ this.manager.collisionObserver.forceUpdate(!1), $(this, we, void 0);
993
1020
  }, 50));
994
1021
  };
995
1022
  const { dragOperation: t } = this.manager;
996
- this.destroy = J(() => {
1023
+ this.destroy = fe(() => {
997
1024
  var n, r, i;
998
1025
  if (t.status.dragging) {
999
- const o = (i = (r = (n = t.source) == null ? void 0 : n.element) == null ? void 0 : r.ownerDocument) != null ? i : document;
1000
- return o.addEventListener("scroll", this.handleScroll, sn), () => {
1001
- o.removeEventListener(
1026
+ const a = (i = (r = (n = t.source) == null ? void 0 : n.element) == null ? void 0 : r.ownerDocument) != null ? i : document;
1027
+ return a.addEventListener("scroll", this.handleScroll, bn), () => {
1028
+ a.removeEventListener(
1002
1029
  "scroll",
1003
1030
  this.handleScroll,
1004
- sn
1031
+ bn
1005
1032
  );
1006
1033
  };
1007
1034
  }
1008
1035
  });
1009
1036
  }
1010
1037
  };
1011
- ge = /* @__PURE__ */ new WeakMap();
1012
- var wi = class extends ue {
1013
- constructor(e, t) {
1014
- super(e, t), this.manager = e, this.destroy = J(() => {
1015
- var n;
1016
- const { dragOperation: r } = this.manager, { nonce: i } = (n = this.options) != null ? n : {};
1017
- if (r.status.initialized) {
1018
- const s = document.createElement("style");
1019
- return i && s.setAttribute("nonce", i), s.textContent = "* { user-select: none !important; -webkit-user-select: none !important; }", document.head.appendChild(s), Je(), document.addEventListener("selectionchange", Je, {
1038
+ we = /* @__PURE__ */ new WeakMap();
1039
+ var Ri = "* { user-select: none !important; -webkit-user-select: none !important; }", Li = class extends he {
1040
+ constructor(e) {
1041
+ super(e), this.manager = e;
1042
+ const t = e.registry.plugins.get(
1043
+ He
1044
+ ), n = t?.register(Ri);
1045
+ if (this.destroy = fe(() => {
1046
+ const { dragOperation: r } = this.manager;
1047
+ if (r.status.initialized)
1048
+ return ot(), document.addEventListener("selectionchange", ot, {
1020
1049
  capture: !0
1021
1050
  }), () => {
1022
- document.removeEventListener("selectionchange", Je, {
1051
+ document.removeEventListener("selectionchange", ot, {
1023
1052
  capture: !0
1024
- }), s.remove();
1053
+ });
1025
1054
  };
1026
- }
1027
- });
1055
+ }), n) {
1056
+ const r = this.destroy.bind(this);
1057
+ this.destroy = () => {
1058
+ n(), r();
1059
+ };
1060
+ }
1028
1061
  }
1029
1062
  };
1030
- function Je() {
1063
+ function ot() {
1031
1064
  var e;
1032
1065
  (e = document.getSelection()) == null || e.removeAllRanges();
1033
1066
  }
1034
- var be = Object.freeze({
1067
+ var Se = Object.freeze({
1035
1068
  offset: 10,
1036
1069
  keyboardCodes: {
1037
1070
  start: ["Space", "Enter"],
@@ -1047,27 +1080,27 @@ var be = Object.freeze({
1047
1080
  const r = (n = t.handle) != null ? n : t.element;
1048
1081
  return e.target !== r;
1049
1082
  }
1050
- }), ie, Fe = class extends Te {
1083
+ }), re, Be = class extends ze {
1051
1084
  constructor(t, n) {
1052
- super(t), this.manager = t, this.options = n, E(this, ie, []), this.listeners = new ln(), this.handleSourceKeyDown = (r, i, s) => {
1085
+ super(t), this.manager = t, this.options = n, S(this, re, []), this.listeners = new Sn(), this.handleSourceKeyDown = (r, i, s) => {
1053
1086
  if (this.disabled || r.defaultPrevented || !le(r.target) || i.disabled)
1054
1087
  return;
1055
1088
  const {
1056
- keyboardCodes: o = be.keyboardCodes,
1057
- preventActivation: a = be.preventActivation
1089
+ keyboardCodes: a = Se.keyboardCodes,
1090
+ preventActivation: o = Se.preventActivation
1058
1091
  } = s ?? {};
1059
- o.start.includes(r.code) && this.manager.dragOperation.status.idle && (a?.(r, i) || this.handleStart(r, i, s));
1092
+ a.start.includes(r.code) && this.manager.dragOperation.status.idle && (o?.(r, i) || this.handleStart(r, i, s));
1060
1093
  };
1061
1094
  }
1062
1095
  bind(t, n = this.options) {
1063
- return J(() => {
1096
+ return fe(() => {
1064
1097
  var i;
1065
- const s = (i = t.handle) != null ? i : t.element, o = (a) => {
1066
- vt(a) && this.handleSourceKeyDown(a, t, n);
1098
+ const s = (i = t.handle) != null ? i : t.element, a = (o) => {
1099
+ xt(o) && this.handleSourceKeyDown(o, t, n);
1067
1100
  };
1068
1101
  if (s)
1069
- return s.addEventListener("keydown", o), () => {
1070
- s.removeEventListener("keydown", o);
1102
+ return s.addEventListener("keydown", a), () => {
1103
+ s.removeEventListener("keydown", a);
1071
1104
  };
1072
1105
  });
1073
1106
  }
@@ -1075,8 +1108,8 @@ var be = Object.freeze({
1075
1108
  const { element: i } = n;
1076
1109
  if (!i)
1077
1110
  throw new Error("Source draggable does not have an associated element");
1078
- t.preventDefault(), t.stopImmediatePropagation(), _r(i);
1079
- const { center: s } = new N(i);
1111
+ t.preventDefault(), t.stopImmediatePropagation(), Tr(i);
1112
+ const { center: s } = new V(i);
1080
1113
  if (this.manager.actions.start({
1081
1114
  event: t,
1082
1115
  coordinates: {
@@ -1086,26 +1119,26 @@ var be = Object.freeze({
1086
1119
  source: n
1087
1120
  }).signal.aborted) return this.cleanup();
1088
1121
  this.sideEffects();
1089
- const a = Ne(i), l = [
1090
- this.listeners.bind(a, [
1122
+ const o = Et(i), d = [
1123
+ this.listeners.bind(o, [
1091
1124
  {
1092
1125
  type: "keydown",
1093
- listener: (f) => this.handleKeyDown(f, n, r),
1126
+ listener: (c) => this.handleKeyDown(c, n, r),
1094
1127
  options: { capture: !0 }
1095
1128
  }
1096
1129
  ])
1097
1130
  ];
1098
- y(this, ie).push(...l);
1131
+ _(this, re).push(...d);
1099
1132
  }
1100
1133
  handleKeyDown(t, n, r) {
1101
- const { keyboardCodes: i = be.keyboardCodes } = r ?? {};
1102
- if (re(t, [...i.end, ...i.cancel])) {
1134
+ const { keyboardCodes: i = Se.keyboardCodes } = r ?? {};
1135
+ if (ne(t, [...i.end, ...i.cancel])) {
1103
1136
  t.preventDefault();
1104
- const s = re(t, i.cancel);
1137
+ const s = ne(t, i.cancel);
1105
1138
  this.handleEnd(t, s);
1106
1139
  return;
1107
1140
  }
1108
- re(t, i.up) ? this.handleMove("up", t) : re(t, i.down) && this.handleMove("down", t), re(t, i.left) ? this.handleMove("left", t) : re(t, i.right) && this.handleMove("right", t);
1141
+ ne(t, i.up) ? this.handleMove("up", t) : ne(t, i.down) && this.handleMove("down", t), ne(t, i.left) ? this.handleMove("left", t) : ne(t, i.right) && this.handleMove("right", t);
1109
1142
  }
1110
1143
  handleEnd(t, n) {
1111
1144
  this.manager.actions.stop({
@@ -1115,72 +1148,72 @@ var be = Object.freeze({
1115
1148
  }
1116
1149
  handleMove(t, n) {
1117
1150
  var r, i;
1118
- const { shape: s } = this.manager.dragOperation, o = n.shiftKey ? 5 : 1;
1119
- let a = {
1151
+ const { shape: s } = this.manager.dragOperation, a = n.shiftKey ? 5 : 1;
1152
+ let o = {
1120
1153
  x: 0,
1121
1154
  y: 0
1122
- }, l = (i = (r = this.options) == null ? void 0 : r.offset) != null ? i : be.offset;
1123
- if (typeof l == "number" && (l = { x: l, y: l }), !!s) {
1155
+ }, d = (i = (r = this.options) == null ? void 0 : r.offset) != null ? i : Se.offset;
1156
+ if (typeof d == "number" && (d = { x: d, y: d }), !!s) {
1124
1157
  switch (t) {
1125
1158
  case "up":
1126
- a = { x: 0, y: -l.y * o };
1159
+ o = { x: 0, y: -d.y * a };
1127
1160
  break;
1128
1161
  case "down":
1129
- a = { x: 0, y: l.y * o };
1162
+ o = { x: 0, y: d.y * a };
1130
1163
  break;
1131
1164
  case "left":
1132
- a = { x: -l.x * o, y: 0 };
1165
+ o = { x: -d.x * a, y: 0 };
1133
1166
  break;
1134
1167
  case "right":
1135
- a = { x: l.x * o, y: 0 };
1168
+ o = { x: d.x * a, y: 0 };
1136
1169
  break;
1137
1170
  }
1138
- (a.x || a.y) && (n.preventDefault(), this.manager.actions.move({
1171
+ (o.x || o.y) && (n.preventDefault(), this.manager.actions.move({
1139
1172
  event: n,
1140
- by: a
1173
+ by: o
1141
1174
  }));
1142
1175
  }
1143
1176
  }
1144
1177
  sideEffects() {
1145
- const t = this.manager.registry.plugins.get(Nn);
1146
- t?.disabled === !1 && (t.disable(), y(this, ie).push(() => {
1178
+ const t = this.manager.registry.plugins.get(Zn);
1179
+ t?.disabled === !1 && (t.disable(), _(this, re).push(() => {
1147
1180
  t.enable();
1148
1181
  }));
1149
1182
  }
1150
1183
  cleanup() {
1151
- y(this, ie).forEach((t) => t()), O(this, ie, []);
1184
+ _(this, re).forEach((t) => t()), $(this, re, []);
1152
1185
  }
1153
1186
  destroy() {
1154
1187
  this.cleanup(), this.listeners.clear();
1155
1188
  }
1156
1189
  };
1157
- ie = /* @__PURE__ */ new WeakMap();
1158
- Fe.configure = pt(Fe);
1159
- Fe.defaults = be;
1160
- var Si = Fe;
1161
- function re(e, t) {
1190
+ re = /* @__PURE__ */ new WeakMap();
1191
+ Be.configure = Ce(Be);
1192
+ Be.defaults = Se;
1193
+ var Wi = Be;
1194
+ function ne(e, t) {
1162
1195
  return t.includes(e.code);
1163
1196
  }
1164
- var V, Ei = class extends an {
1197
+ var J, Fi = class extends wn {
1165
1198
  constructor() {
1166
- super(...arguments), E(this, V);
1199
+ super(...arguments), S(this, J);
1167
1200
  }
1168
1201
  onEvent(e) {
1169
1202
  switch (e.type) {
1170
1203
  case "pointerdown":
1171
- O(this, V, ce(e));
1204
+ $(this, J, ce(e));
1172
1205
  break;
1173
1206
  case "pointermove":
1174
- if (!y(this, V)) return;
1207
+ if (!_(this, J)) return;
1175
1208
  const { x: t, y: n } = ce(e), r = {
1176
- x: t - y(this, V).x,
1177
- y: n - y(this, V).y
1209
+ x: t - _(this, J).x,
1210
+ y: n - _(this, J).y
1178
1211
  }, { tolerance: i } = this.options;
1179
- if (i && nt(r, i)) {
1212
+ if (i && dt(r, i)) {
1180
1213
  this.abort();
1181
1214
  return;
1182
1215
  }
1183
- nt(r, this.options.value) && this.activate(e);
1216
+ dt(r, this.options.value) && this.activate(e);
1184
1217
  break;
1185
1218
  case "pointerup":
1186
1219
  this.abort();
@@ -1188,29 +1221,29 @@ var V, Ei = class extends an {
1188
1221
  }
1189
1222
  }
1190
1223
  abort() {
1191
- O(this, V, void 0);
1224
+ $(this, J, void 0);
1192
1225
  }
1193
1226
  };
1194
- V = /* @__PURE__ */ new WeakMap();
1195
- var se, q, xi = class extends an {
1227
+ J = /* @__PURE__ */ new WeakMap();
1228
+ var ie, Q, zi = class extends wn {
1196
1229
  constructor() {
1197
- super(...arguments), E(this, se), E(this, q);
1230
+ super(...arguments), S(this, ie), S(this, Q);
1198
1231
  }
1199
1232
  onEvent(e) {
1200
1233
  switch (e.type) {
1201
1234
  case "pointerdown":
1202
- O(this, q, ce(e)), O(this, se, setTimeout(
1235
+ $(this, Q, ce(e)), $(this, ie, setTimeout(
1203
1236
  () => this.activate(e),
1204
1237
  this.options.value
1205
1238
  ));
1206
1239
  break;
1207
1240
  case "pointermove":
1208
- if (!y(this, q)) return;
1241
+ if (!_(this, Q)) return;
1209
1242
  const { x: t, y: n } = ce(e), r = {
1210
- x: t - y(this, q).x,
1211
- y: n - y(this, q).y
1243
+ x: t - _(this, Q).x,
1244
+ y: n - _(this, Q).y
1212
1245
  };
1213
- nt(r, this.options.tolerance) && this.abort();
1246
+ dt(r, this.options.tolerance) && this.abort();
1214
1247
  break;
1215
1248
  case "pointerup":
1216
1249
  this.abort();
@@ -1218,37 +1251,37 @@ var se, q, xi = class extends an {
1218
1251
  }
1219
1252
  }
1220
1253
  abort() {
1221
- y(this, se) && (clearTimeout(y(this, se)), O(this, q, void 0), O(this, se, void 0));
1254
+ _(this, ie) && (clearTimeout(_(this, ie)), $(this, Q, void 0), $(this, ie, void 0));
1222
1255
  }
1223
1256
  };
1224
- se = /* @__PURE__ */ new WeakMap();
1225
- q = /* @__PURE__ */ new WeakMap();
1226
- var ae = class {
1257
+ ie = /* @__PURE__ */ new WeakMap();
1258
+ Q = /* @__PURE__ */ new WeakMap();
1259
+ var oe = class {
1227
1260
  };
1228
- ae.Delay = xi;
1229
- ae.Distance = Ei;
1230
- var dt = Object.freeze({
1261
+ oe.Delay = zi;
1262
+ oe.Distance = Fi;
1263
+ var bt = Object.freeze({
1231
1264
  activationConstraints(e, t) {
1232
1265
  var n;
1233
1266
  const { pointerType: r, target: i } = e;
1234
1267
  if (!(r === "mouse" && le(i) && (t.handle === i || (n = t.handle) != null && n.contains(i))))
1235
1268
  return r === "touch" ? [
1236
- new ae.Delay({ value: 250, tolerance: 5 })
1237
- ] : Sr(i) && !e.defaultPrevented ? [
1238
- new ae.Delay({ value: 200, tolerance: 0 })
1269
+ new oe.Delay({ value: 250, tolerance: 5 })
1270
+ ] : Rr(i) && !e.defaultPrevented ? [
1271
+ new oe.Delay({ value: 200, tolerance: 0 })
1239
1272
  ] : [
1240
- new ae.Delay({ value: 200, tolerance: 10 }),
1241
- new ae.Distance({ value: 5 })
1273
+ new oe.Delay({ value: 200, tolerance: 10 }),
1274
+ new oe.Distance({ value: 5 })
1242
1275
  ];
1243
1276
  },
1244
1277
  preventActivation(e, t) {
1245
1278
  var n;
1246
1279
  const { target: r } = e;
1247
- return r === t.element || r === t.handle || !le(r) || (n = t.handle) != null && n.contains(r) ? !1 : wr(r);
1280
+ return r === t.element || r === t.handle || !le(r) || (n = t.handle) != null && n.contains(r) ? !1 : Mr(r);
1248
1281
  }
1249
- }), oe, ze = class extends Te {
1282
+ }), se, Ve = class extends ze {
1250
1283
  constructor(t, n) {
1251
- super(t), this.manager = t, this.options = n, E(this, oe, /* @__PURE__ */ new Set()), this.listeners = new ln(), this.latest = {
1284
+ super(t), this.manager = t, this.options = n, S(this, se, /* @__PURE__ */ new Set()), this.listeners = new Sn(), this.latest = {
1252
1285
  event: void 0,
1253
1286
  coordinates: void 0
1254
1287
  }, this.handleMove = () => {
@@ -1257,41 +1290,41 @@ var dt = Object.freeze({
1257
1290
  }, this.handleCancel = this.handleCancel.bind(this), this.handlePointerUp = this.handlePointerUp.bind(this), this.handleKeyDown = this.handleKeyDown.bind(this);
1258
1291
  }
1259
1292
  activationConstraints(t, n, r = this.options) {
1260
- const { activationConstraints: i = dt.activationConstraints } = r ?? {};
1293
+ const { activationConstraints: i = bt.activationConstraints } = r ?? {};
1261
1294
  return typeof i == "function" ? i(t, n) : i;
1262
1295
  }
1263
1296
  bind(t, n = this.options) {
1264
- return J(() => {
1297
+ return fe(() => {
1265
1298
  var i;
1266
- const s = new AbortController(), { signal: o } = s, a = (f) => {
1267
- Or(f) && this.handlePointerDown(f, t, n);
1299
+ const s = new AbortController(), { signal: a } = s, o = (c) => {
1300
+ Xr(c) && this.handlePointerDown(c, t, n);
1268
1301
  };
1269
- let l = [(i = t.handle) != null ? i : t.element];
1270
- n?.activatorElements && (Array.isArray(n.activatorElements) ? l = n.activatorElements : l = n.activatorElements(t));
1271
- for (const f of l)
1272
- f && (Oi(f.ownerDocument.defaultView), f.addEventListener("pointerdown", a, { signal: o }));
1302
+ let d = [(i = t.handle) != null ? i : t.element];
1303
+ n?.activatorElements && (Array.isArray(n.activatorElements) ? d = n.activatorElements : d = n.activatorElements(t));
1304
+ for (const c of d)
1305
+ c && (Ki(c.ownerDocument.defaultView), c.addEventListener("pointerdown", o, { signal: a }));
1273
1306
  return () => s.abort();
1274
1307
  });
1275
1308
  }
1276
1309
  handlePointerDown(t, n, r) {
1277
- if (this.disabled || !t.isPrimary || t.button !== 0 || !le(t.target) || n.disabled || Ai(t) || !this.manager.dragOperation.status.idle)
1310
+ if (this.disabled || !t.isPrimary || t.button !== 0 || !le(t.target) || n.disabled || ji(t) || !this.manager.dragOperation.status.idle)
1278
1311
  return;
1279
- const { preventActivation: i = dt.preventActivation } = r ?? {};
1312
+ const { preventActivation: i = bt.preventActivation } = r ?? {};
1280
1313
  if (i?.(t, n))
1281
1314
  return;
1282
- const { target: s } = t, o = cn(s) && s.draggable && s.getAttribute("draggable") === "true", a = Ie(n.element), { x: l, y: f } = ce(t);
1315
+ const { target: s } = t, a = En(s) && s.draggable && s.getAttribute("draggable") === "true", o = Xe(n.element), { x: d, y: c } = ce(t);
1283
1316
  this.initialCoordinates = {
1284
- x: l * a.scaleX + a.x,
1285
- y: f * a.scaleY + a.y
1317
+ x: d * o.scaleX + o.x,
1318
+ y: c * o.scaleY + o.y
1286
1319
  };
1287
- const d = this.activationConstraints(t, n, r);
1320
+ const u = this.activationConstraints(t, n, r);
1288
1321
  t.sensor = this;
1289
- const c = new hr(
1290
- d,
1322
+ const l = new kr(
1323
+ u,
1291
1324
  (w) => this.handleStart(n, w)
1292
1325
  );
1293
- c.signal.onabort = () => this.handleCancel(t), c.onEvent(t), this.controller = c;
1294
- const h = yr(), u = this.listeners.bind(h, [
1326
+ l.signal.onabort = () => this.handleCancel(t), l.onEvent(t), this.controller = l;
1327
+ const h = Pr(), v = this.listeners.bind(h, [
1295
1328
  {
1296
1329
  type: "pointermove",
1297
1330
  listener: (w) => this.handlePointerMove(w, n)
@@ -1310,15 +1343,15 @@ var dt = Object.freeze({
1310
1343
  {
1311
1344
  // Cancel activation if there is a competing Drag and Drop interaction
1312
1345
  type: "dragstart",
1313
- listener: o ? this.handleCancel : Ce,
1346
+ listener: a ? this.handleCancel : We,
1314
1347
  options: {
1315
1348
  capture: !0
1316
1349
  }
1317
1350
  }
1318
- ]), p = () => {
1319
- u(), this.initialCoordinates = void 0;
1351
+ ]), g = () => {
1352
+ v(), this.initialCoordinates = void 0;
1320
1353
  };
1321
- y(this, oe).add(p);
1354
+ _(this, se).add(g);
1322
1355
  }
1323
1356
  handlePointerMove(t, n) {
1324
1357
  var r, i;
@@ -1327,8 +1360,8 @@ var dt = Object.freeze({
1327
1360
  return;
1328
1361
  }
1329
1362
  if (this.manager.dragOperation.status.dragging) {
1330
- const s = ce(t), o = Ie(n.element);
1331
- s.x = s.x * o.scaleX + o.x, s.y = s.y * o.scaleY + o.y, t.preventDefault(), t.stopPropagation(), this.latest.event = t, this.latest.coordinates = s, $e.schedule(this.handleMove);
1363
+ const s = ce(t), a = Xe(n.element);
1364
+ s.x = s.x * a.scaleX + a.x, s.y = s.y * a.scaleY + a.y, t.preventDefault(), t.stopPropagation(), this.latest.event = t, this.latest.coordinates = s, je.schedule(this.handleMove);
1332
1365
  }
1333
1366
  }
1334
1367
  handlePointerUp(t) {
@@ -1353,13 +1386,18 @@ var dt = Object.freeze({
1353
1386
  source: t
1354
1387
  }).signal.aborted) return this.cleanup();
1355
1388
  n.preventDefault();
1356
- const a = Ne(n.target).body;
1357
- a.setPointerCapture(n.pointerId);
1358
- const l = le(n.target) ? [n.target, a] : a, f = this.listeners.bind(l, [
1389
+ const o = Et(n.target).body;
1390
+ try {
1391
+ o.setPointerCapture(n.pointerId);
1392
+ } catch {
1393
+ this.handleCancel(n);
1394
+ return;
1395
+ }
1396
+ const d = le(n.target) ? [n.target, o] : o, c = this.listeners.bind(d, [
1359
1397
  {
1360
1398
  // Prevent scrolling on touch devices
1361
1399
  type: "touchmove",
1362
- listener: Ce,
1400
+ listener: We,
1363
1401
  options: {
1364
1402
  passive: !1
1365
1403
  }
@@ -1367,149 +1405,149 @@ var dt = Object.freeze({
1367
1405
  {
1368
1406
  // Prevent click events
1369
1407
  type: "click",
1370
- listener: Ce
1408
+ listener: We
1371
1409
  },
1372
1410
  {
1373
1411
  type: "contextmenu",
1374
- listener: Ce
1412
+ listener: We
1375
1413
  },
1376
1414
  {
1377
1415
  type: "keydown",
1378
1416
  listener: this.handleKeyDown
1379
1417
  }
1380
1418
  ]);
1381
- y(this, oe).add(f);
1419
+ _(this, se).add(c);
1382
1420
  }
1383
1421
  handleCancel(t) {
1384
1422
  const { dragOperation: n } = this.manager;
1385
1423
  n.status.initialized && this.manager.actions.stop({ event: t, canceled: !0 }), this.cleanup();
1386
1424
  }
1387
1425
  cleanup() {
1388
- this.latest = {
1426
+ const { controller: t } = this;
1427
+ this.controller = void 0, t && !t.signal.aborted && t.abort(), this.latest = {
1389
1428
  event: void 0,
1390
1429
  coordinates: void 0
1391
- }, y(this, oe).forEach((t) => t()), y(this, oe).clear();
1430
+ }, _(this, se).forEach((n) => n()), _(this, se).clear();
1392
1431
  }
1393
1432
  destroy() {
1394
1433
  this.cleanup(), this.listeners.clear();
1395
1434
  }
1396
1435
  };
1397
- oe = /* @__PURE__ */ new WeakMap();
1398
- ze.configure = pt(ze);
1399
- ze.defaults = dt;
1400
- var ki = ze;
1401
- function Ai(e) {
1436
+ se = /* @__PURE__ */ new WeakMap();
1437
+ Ve.configure = Ce(Ve);
1438
+ Ve.defaults = bt;
1439
+ var Ni = Ve;
1440
+ function ji(e) {
1402
1441
  return "sensor" in e;
1403
1442
  }
1404
- function Ce(e) {
1443
+ function We(e) {
1405
1444
  e.preventDefault();
1406
1445
  }
1407
- function Di() {
1446
+ function Xi() {
1408
1447
  }
1409
- var on = /* @__PURE__ */ new WeakSet();
1410
- function Oi(e) {
1411
- !e || on.has(e) || (e.addEventListener("touchmove", Di, {
1448
+ var _n = /* @__PURE__ */ new WeakSet();
1449
+ function Ki(e) {
1450
+ !e || _n.has(e) || (e.addEventListener("touchmove", Xi, {
1412
1451
  capture: !1,
1413
1452
  passive: !1
1414
- }), on.add(e));
1453
+ }), _n.add(e));
1415
1454
  }
1416
- var Qe = {
1455
+ var at = {
1417
1456
  modifiers: [],
1418
- plugins: [Jr, Nn, Zr, fi, wi],
1419
- sensors: [ki, Si]
1420
- }, Fi = class extends ur {
1457
+ plugins: [ui, Zn, fi, Di, Li],
1458
+ sensors: [Ni, Wi]
1459
+ }, ts = class extends xr {
1421
1460
  constructor(e = {}) {
1422
- const t = qe(e.plugins, Qe.plugins), n = qe(e.sensors, Qe.sensors), r = qe(e.modifiers, Qe.modifiers);
1423
- super(gt(Se({}, e), {
1424
- plugins: [_i, Ke, Z, ...t],
1461
+ const t = it(e.plugins, at.plugins), n = it(e.sensors, at.sensors), r = it(
1462
+ e.modifiers,
1463
+ at.modifiers
1464
+ );
1465
+ super(Dt(ke({}, e), {
1466
+ plugins: [Mi, qe, He, ...t],
1425
1467
  sensors: n,
1426
1468
  modifiers: r
1427
1469
  }));
1428
1470
  }
1429
- }, Kn, Un, Xn, ut, I, xt, kt, At, Ue = class extends (ut = vr, Xn = [F], Un = [F], Kn = [F], ut) {
1471
+ }, er, tr, _t, Y, Mt, Rt, Lt = class extends (_t = Or, tr = [j], er = [j], _t) {
1430
1472
  constructor(e, t) {
1431
1473
  var n = e, {
1432
1474
  element: r,
1433
1475
  effects: i = () => [],
1434
- handle: s,
1435
- feedback: o = "default"
1436
- } = n, a = wn(n, [
1476
+ handle: s
1477
+ } = n, a = Mn(n, [
1437
1478
  "element",
1438
1479
  "effects",
1439
- "handle",
1440
- "feedback"
1480
+ "handle"
1441
1481
  ]);
1442
1482
  super(
1443
- Se({
1483
+ ke({
1444
1484
  effects: () => [
1445
1485
  ...i(),
1446
1486
  () => {
1447
- var l, f;
1448
- const { manager: d } = this;
1449
- if (!d) return;
1450
- const h = ((f = (l = this.sensors) == null ? void 0 : l.map(fr)) != null ? f : [
1451
- ...d.sensors
1452
- ]).map((u) => {
1453
- const p = u instanceof Te ? u : d.registry.register(u.plugin), w = u instanceof Te ? void 0 : u.options;
1454
- return p.bind(this, w);
1487
+ var o, d;
1488
+ const { manager: c } = this;
1489
+ if (!c) return;
1490
+ const l = ((d = (o = this.sensors) == null ? void 0 : o.map(Ar)) != null ? d : [
1491
+ ...c.sensors
1492
+ ]).map((h) => {
1493
+ const v = h instanceof ze ? h : c.registry.register(h.plugin), g = h instanceof ze ? void 0 : h.options;
1494
+ return v.bind(this, g);
1455
1495
  });
1456
1496
  return function() {
1457
- h.forEach((p) => p());
1497
+ l.forEach((v) => v());
1458
1498
  };
1459
1499
  }
1460
1500
  ]
1461
1501
  }, a),
1462
1502
  t
1463
- ), E(this, xt, x(I, 8, this)), x(I, 11, this), E(this, kt, x(I, 12, this)), x(I, 15, this), E(this, At, x(I, 16, this)), x(I, 19, this), this.element = r, this.handle = s, this.feedback = o;
1503
+ ), S(this, Mt, A(Y, 8, this)), A(Y, 11, this), S(this, Rt, A(Y, 12, this)), A(Y, 15, this), this.element = r, this.handle = s;
1464
1504
  }
1465
1505
  };
1466
- I = fe(ut);
1467
- xt = /* @__PURE__ */ new WeakMap();
1468
- kt = /* @__PURE__ */ new WeakMap();
1469
- At = /* @__PURE__ */ new WeakMap();
1470
- $(I, 4, "handle", Xn, Ue, xt);
1471
- $(I, 4, "element", Un, Ue, kt);
1472
- $(I, 4, "feedback", Kn, Ue, At);
1473
- Q(I, Ue);
1474
- var Yn, jn, ht, B, Dt, Ze, Bn, Hn, _e, Ot, Vn = class extends (ht = pr, jn = [F], Yn = [F], ht) {
1506
+ Y = ve(_t);
1507
+ Mt = /* @__PURE__ */ new WeakMap();
1508
+ Rt = /* @__PURE__ */ new WeakMap();
1509
+ R(Y, 4, "handle", tr, Lt, Mt);
1510
+ R(Y, 4, "element", er, Lt, Rt);
1511
+ ee(Y, Lt);
1512
+ var nr, rr, wt, B, Wt, lt, ir, sr, xe, Ft, or = class extends (wt = Dr, rr = [j], nr = [j], wt) {
1475
1513
  constructor(e, t) {
1476
- var n = e, { element: r, effects: i = () => [] } = n, s = wn(n, ["element", "effects"]);
1477
- const { collisionDetector: o = Rr } = s, a = (f) => {
1478
- const { manager: d, element: c } = this;
1479
- if (!c || f === null) {
1514
+ var n = e, { element: r, effects: i = () => [] } = n, s = Mn(n, ["element", "effects"]);
1515
+ const { collisionDetector: a = qr } = s, o = (c) => {
1516
+ const { manager: u, element: l } = this;
1517
+ if (!l || c === null) {
1480
1518
  this.shape = void 0;
1481
1519
  return;
1482
1520
  }
1483
- if (!d) return;
1484
- const h = new N(c), u = M(() => this.shape);
1485
- return h && u?.equals(h) ? u : (this.shape = h, h);
1486
- }, l = gn(!1);
1521
+ if (!u) return;
1522
+ const h = new V(l), v = W(() => this.shape);
1523
+ return h && v?.equals(h) ? v : (this.shape = h, h);
1524
+ }, d = Pn(!1);
1487
1525
  super(
1488
- gt(Se({}, s), {
1489
- collisionDetector: o,
1526
+ Dt(ke({}, s), {
1527
+ collisionDetector: a,
1490
1528
  effects: () => [
1491
1529
  ...i(),
1492
1530
  () => {
1493
- const { element: f, manager: d } = this;
1494
- if (!d) return;
1495
- const { dragOperation: c } = d, { source: h } = c;
1496
- l.value = !!(h && c.status.initialized && f && !this.disabled && this.accepts(h));
1531
+ const { element: c, manager: u } = this;
1532
+ if (!u) return;
1533
+ const { dragOperation: l } = u, { source: h } = l;
1534
+ d.value = !!(h && l.status.initialized && c && !this.disabled && this.accepts(h));
1497
1535
  },
1498
1536
  () => {
1499
- const { element: f } = this;
1500
- if (l.value && f) {
1501
- const d = new Er(
1502
- f,
1503
- a
1537
+ const { element: c } = this;
1538
+ if (d.value && c) {
1539
+ const u = new Lr(
1540
+ c,
1541
+ o
1504
1542
  );
1505
1543
  return () => {
1506
- d.disconnect(), this.shape = void 0;
1544
+ u.disconnect(), this.shape = void 0;
1507
1545
  };
1508
1546
  }
1509
1547
  },
1510
1548
  () => {
1511
- var f;
1512
- if ((f = this.manager) != null && f.dragOperation.status.initialized)
1549
+ var c;
1550
+ if ((c = this.manager) != null && c.dragOperation.status.initialized)
1513
1551
  return () => {
1514
1552
  this.shape = void 0;
1515
1553
  };
@@ -1517,38 +1555,38 @@ var Yn, jn, ht, B, Dt, Ze, Bn, Hn, _e, Ot, Vn = class extends (ht = pr, jn = [F]
1517
1555
  ]
1518
1556
  }),
1519
1557
  t
1520
- ), E(this, _e), E(this, Dt, x(B, 8, this)), x(B, 11, this), E(this, Ot, x(B, 12, this)), x(B, 15, this), this.element = r, this.refreshShape = () => a();
1558
+ ), S(this, xe), S(this, Wt, A(B, 8, this)), A(B, 11, this), S(this, Ft, A(B, 12, this)), A(B, 15, this), this.element = r, this.refreshShape = () => o();
1521
1559
  }
1522
1560
  set element(e) {
1523
- O(this, _e, e, Hn);
1561
+ $(this, xe, e, sr);
1524
1562
  }
1525
1563
  get element() {
1526
1564
  var e;
1527
- return (e = this.proxy) != null ? e : y(this, _e, Bn);
1565
+ return (e = this.proxy) != null ? e : _(this, xe, ir);
1528
1566
  }
1529
1567
  };
1530
- B = fe(ht);
1531
- Dt = /* @__PURE__ */ new WeakMap();
1532
- _e = /* @__PURE__ */ new WeakSet();
1533
- Ot = /* @__PURE__ */ new WeakMap();
1534
- Ze = $(B, 20, "#element", jn, _e, Dt), Bn = Ze.get, Hn = Ze.set;
1535
- $(B, 4, "proxy", Yn, Vn, Ot);
1536
- Q(B, Vn);
1568
+ B = ve(wt);
1569
+ Wt = /* @__PURE__ */ new WeakMap();
1570
+ xe = /* @__PURE__ */ new WeakSet();
1571
+ Ft = /* @__PURE__ */ new WeakMap();
1572
+ lt = R(B, 20, "#element", rr, xe, Wt), ir = lt.get, sr = lt.set;
1573
+ R(B, 4, "proxy", nr, or, Ft);
1574
+ ee(B, or);
1537
1575
  export {
1538
- Jr as Accessibility,
1539
- Nn as AutoScroller,
1540
- Zr as Cursor,
1541
- Fi as DragDropManager,
1542
- Ue as Draggable,
1543
- Vn as Droppable,
1544
- fi as Feedback,
1545
- Si as KeyboardSensor,
1546
- ae as PointerActivationConstraints,
1547
- ki as PointerSensor,
1548
- wi as PreventSelection,
1549
- _i as ScrollListener,
1550
- Ke as Scroller,
1551
- Z as StyleSheetManager,
1552
- Qe as defaultPreset,
1553
- qe as resolveCustomizable
1576
+ ui as Accessibility,
1577
+ Zn as AutoScroller,
1578
+ fi as Cursor,
1579
+ ts as DragDropManager,
1580
+ Lt as Draggable,
1581
+ or as Droppable,
1582
+ Di as Feedback,
1583
+ Wi as KeyboardSensor,
1584
+ oe as PointerActivationConstraints,
1585
+ Ni as PointerSensor,
1586
+ Li as PreventSelection,
1587
+ Mi as ScrollListener,
1588
+ qe as Scroller,
1589
+ He as StyleInjector,
1590
+ at as defaultPreset,
1591
+ it as resolveCustomizable
1554
1592
  };