import e, { useMemo as t, useLayoutEffect as n, useEffect as r, useRef as o, useCallback as i, useState as a, useContext as s, memo as l, useReducer as c, createContext as d } from "react";
import { unstable_batchedUpdates as u, createPortal as h } from "react-dom";
import { lz as g, lI as f, lJ as v } from "./ant-design-icons-6bfdc7d5.js";
function p() {
  for (var e2 = arguments.length, n2 = new Array(e2), r2 = 0; r2 < e2; r2++)
    n2[r2] = arguments[r2];
  return t(() => (e3) => {
    n2.forEach((t2) => t2(e3));
  }, n2);
}
const b = "undefined" != typeof window && void 0 !== window.document && void 0 !== window.document.createElement;
function m(e2) {
  const t2 = Object.prototype.toString.call(e2);
  return "[object Window]" === t2 || "[object global]" === t2;
}
function y(e2) {
  return "nodeType" in e2;
}
function w(e2) {
  var t2, n2;
  return e2 ? m(e2) ? e2 : y(e2) && null != (t2 = null == (n2 = e2.ownerDocument) ? void 0 : n2.defaultView) ? t2 : window : window;
}
function x(e2) {
  const { Document: t2 } = w(e2);
  return e2 instanceof t2;
}
function D(e2) {
  return !m(e2) && e2 instanceof w(e2).HTMLElement;
}
function S(e2) {
  return e2 instanceof w(e2).SVGElement;
}
function R(e2) {
  return e2 ? m(e2) ? e2.document : y(e2) ? x(e2) ? e2 : D(e2) || S(e2) ? e2.ownerDocument : document : document : document;
}
const C = b ? n : r;
function E(e2) {
  const t2 = o(e2);
  return C(() => {
    t2.current = e2;
  }), i(function() {
    for (var e3 = arguments.length, n2 = new Array(e3), r2 = 0; r2 < e3; r2++)
      n2[r2] = arguments[r2];
    return null == t2.current ? void 0 : t2.current(...n2);
  }, []);
}
function N() {
  const e2 = o(null);
  return [i((t2, n2) => {
    e2.current = setInterval(t2, n2);
  }, []), i(() => {
    null !== e2.current && (clearInterval(e2.current), e2.current = null);
  }, [])];
}
function I(e2, t2) {
  void 0 === t2 && (t2 = [e2]);
  const n2 = o(e2);
  return C(() => {
    n2.current !== e2 && (n2.current = e2);
  }, t2), n2;
}
function T(e2, n2) {
  const r2 = o();
  return t(() => {
    const t2 = e2(r2.current);
    return r2.current = t2, t2;
  }, [...n2]);
}
function M(e2) {
  const t2 = E(e2), n2 = o(null), r2 = i((e3) => {
    e3 !== n2.current && (null == t2 || t2(e3, n2.current)), n2.current = e3;
  }, []);
  return [n2, r2];
}
let O = {};
function A(e2, n2) {
  return t(() => {
    if (n2)
      return n2;
    const t2 = null == O[e2] ? 0 : O[e2] + 1;
    return O[e2] = t2, e2 + "-" + t2;
  }, [e2, n2]);
}
function L(e2) {
  return function(t2) {
    for (var n2 = arguments.length, r2 = new Array(n2 > 1 ? n2 - 1 : 0), o2 = 1; o2 < n2; o2++)
      r2[o2 - 1] = arguments[o2];
    return r2.reduce((t3, n3) => {
      const r3 = Object.entries(n3);
      for (const [n4, o3] of r3) {
        const r4 = t3[n4];
        null != r4 && (t3[n4] = r4 + e2 * o3);
      }
      return t3;
    }, { ...t2 });
  };
}
const k = L(1), B = L(-1);
function j(e2) {
  return "clientX" in e2 && "clientY" in e2;
}
function P(e2) {
  if (!e2)
    return false;
  const { KeyboardEvent: t2 } = w(e2.target);
  return t2 && e2 instanceof t2;
}
function z(e2) {
  if (!e2)
    return false;
  const { TouchEvent: t2 } = w(e2.target);
  return t2 && e2 instanceof t2;
}
function F(e2) {
  if (z(e2)) {
    if (e2.touches && e2.touches.length) {
      const { clientX: t2, clientY: n2 } = e2.touches[0];
      return { x: t2, y: n2 };
    }
    if (e2.changedTouches && e2.changedTouches.length) {
      const { clientX: t2, clientY: n2 } = e2.changedTouches[0];
      return { x: t2, y: n2 };
    }
  }
  return j(e2) ? { x: e2.clientX, y: e2.clientY } : null;
}
const X = Object.freeze({ Translate: { toString(e2) {
  if (!e2)
    return;
  const { x: t2, y: n2 } = e2;
  return "translate3d(" + (t2 ? Math.round(t2) : 0) + "px, " + (n2 ? Math.round(n2) : 0) + "px, 0)";
} }, Scale: { toString(e2) {
  if (!e2)
    return;
  const { scaleX: t2, scaleY: n2 } = e2;
  return "scaleX(" + t2 + ") scaleY(" + n2 + ")";
} }, Transform: { toString(e2) {
  if (e2)
    return [X.Translate.toString(e2), X.Scale.toString(e2)].join(" ");
} }, Transition: { toString(e2) {
  let { property: t2, duration: n2, easing: r2 } = e2;
  return t2 + " " + n2 + "ms " + r2;
} } }), Y = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
const K = Object.freeze(Object.defineProperty({ __proto__: null, CSS: X, add: k, canUseDOM: b, findFirstFocusableNode: function(e2) {
  return e2.matches(Y) ? e2 : e2.querySelector(Y);
}, getEventCoordinates: F, getOwnerDocument: R, getWindow: w, hasViewportRelativeCoordinates: j, isDocument: x, isHTMLElement: D, isKeyboardEvent: P, isNode: y, isSVGElement: S, isTouchEvent: z, isWindow: m, subtract: B, useCombinedRefs: p, useEvent: E, useInterval: N, useIsomorphicLayoutEffect: C, useLatestValue: I, useLazyMemo: T, useNodeRef: M, usePrevious: function(e2) {
  const t2 = o();
  return r(() => {
    t2.current = e2;
  }, [e2]), t2.current;
}, useUniqueId: A }, Symbol.toStringTag, { value: "Module" })), W = { display: "none" };
function _(e2) {
  let { id: t2, value: n2 } = e2;
  return g("div", { id: t2, style: W, children: n2 });
}
function U(e2) {
  let { id: t2, announcement: n2, ariaLiveType: r2 = "assertive" } = e2;
  return g("div", { id: t2, style: { position: "fixed", width: 1, height: 1, margin: -1, border: 0, padding: 0, overflow: "hidden", clip: "rect(0 0 0 0)", clipPath: "inset(100%)", whiteSpace: "nowrap" }, role: "status", "aria-live": r2, "aria-atomic": true, children: n2 });
}
const $ = { draggable: "\n    To pick up a draggable item, press the space bar.\n    While dragging, use the arrow keys to move the item.\n    Press space again to drop the item in its new position, or press escape to cancel.\n  " }, V = { onDragStart: (e2) => `Picked up draggable item ${e2}.`, onDragOver: (e2, t2) => t2 ? `Draggable item ${e2} was moved over droppable area ${t2}.` : `Draggable item ${e2} is no longer over a droppable area.`, onDragEnd: (e2, t2) => t2 ? `Draggable item ${e2} was dropped over droppable area ${t2}` : `Draggable item ${e2} was dropped.`, onDragCancel: (e2) => `Dragging was cancelled. Draggable item ${e2} was dropped.` };
var q;
function H(...e2) {
}
!function(e2) {
  e2.DragStart = "dragStart", e2.DragMove = "dragMove", e2.DragEnd = "dragEnd", e2.DragCancel = "dragCancel", e2.DragOver = "dragOver", e2.RegisterDroppable = "registerDroppable", e2.SetDroppableDisabled = "setDroppableDisabled", e2.UnregisterDroppable = "unregisterDroppable";
}(q || (q = {}));
class G extends Map {
  get(e2) {
    var t2;
    return null != e2 && null != (t2 = super.get(e2)) ? t2 : void 0;
  }
  toArray() {
    return Array.from(this.values());
  }
  getEnabled() {
    return this.toArray().filter(({ disabled: e2 }) => !e2);
  }
  getNodeFor(e2) {
    var t2, n2;
    return null != (t2 = null == (n2 = this.get(e2)) ? void 0 : n2.node.current) ? t2 : void 0;
  }
}
const J = { activatorEvent: null, active: null, activeNode: null, activeNodeRect: null, collisions: null, containerNodeRect: null, draggableNodes: {}, droppableRects: /* @__PURE__ */ new Map(), droppableContainers: new G(), over: null, dragOverlay: { nodeRef: { current: null }, rect: null, setRef: H }, scrollableAncestors: [], scrollableAncestorRects: [], measureDroppableContainers: H, windowRect: null, measuringScheduled: false }, Q = { activatorEvent: null, activators: [], active: null, activeNodeRect: null, ariaDescribedById: { draggable: "" }, dispatch: H, draggableNodes: {}, over: null, measureDroppableContainers: H }, Z = d(Q), ee = d(J);
function te() {
  return { draggable: { active: null, initialCoordinates: { x: 0, y: 0 }, nodes: {}, translate: { x: 0, y: 0 } }, droppable: { containers: new G() } };
}
function ne(e2, t2) {
  switch (t2.type) {
    case q.DragStart:
      return { ...e2, draggable: { ...e2.draggable, initialCoordinates: t2.initialCoordinates, active: t2.active } };
    case q.DragMove:
      return e2.draggable.active ? { ...e2, draggable: { ...e2.draggable, translate: { x: t2.coordinates.x - e2.draggable.initialCoordinates.x, y: t2.coordinates.y - e2.draggable.initialCoordinates.y } } } : e2;
    case q.DragEnd:
    case q.DragCancel:
      return { ...e2, draggable: { ...e2.draggable, active: null, initialCoordinates: { x: 0, y: 0 }, translate: { x: 0, y: 0 } } };
    case q.RegisterDroppable: {
      const { element: n2 } = t2, { id: r2 } = n2, o2 = new G(e2.droppable.containers);
      return o2.set(r2, n2), { ...e2, droppable: { ...e2.droppable, containers: o2 } };
    }
    case q.SetDroppableDisabled: {
      const { id: n2, key: r2, disabled: o2 } = t2, i2 = e2.droppable.containers.get(n2);
      if (!i2 || r2 !== i2.key)
        return e2;
      const a2 = new G(e2.droppable.containers);
      return a2.set(n2, { ...i2, disabled: o2 }), { ...e2, droppable: { ...e2.droppable, containers: a2 } };
    }
    case q.UnregisterDroppable: {
      const { id: n2, key: r2 } = t2, o2 = e2.droppable.containers.get(n2);
      if (!o2 || r2 !== o2.key)
        return e2;
      const i2 = new G(e2.droppable.containers);
      return i2.delete(n2), { ...e2, droppable: { ...e2.droppable, containers: i2 } };
    }
    default:
      return e2;
  }
}
const re = d({ type: null, event: null });
function oe({ onDragStart: e2, onDragMove: t2, onDragOver: n2, onDragEnd: i2, onDragCancel: a2 }) {
  const l2 = s(re), c2 = o(l2);
  r(() => {
    if (l2 !== c2.current) {
      const { type: r2, event: o2 } = l2;
      switch (r2) {
        case q.DragStart:
          null == e2 || e2(o2);
          break;
        case q.DragMove:
          null == t2 || t2(o2);
          break;
        case q.DragOver:
          null == n2 || n2(o2);
          break;
        case q.DragCancel:
          null == a2 || a2(o2);
          break;
        case q.DragEnd:
          null == i2 || i2(o2);
      }
      c2.current = l2;
    }
  }, [l2, e2, t2, n2, i2, a2]);
}
function ie({ announcements: e2 = V, hiddenTextDescribedById: n2, screenReaderInstructions: o2 }) {
  const { announce: s2, announcement: l2 } = function() {
    const [e3, t2] = a("");
    return { announce: i((e4) => {
      null != e4 && t2(e4);
    }, []), announcement: e3 };
  }(), c2 = A("DndLiveRegion"), [d2, u2] = a(false);
  return r(() => {
    u2(true);
  }, []), oe(t(() => ({ onDragStart({ active: t2 }) {
    s2(e2.onDragStart(t2.id));
  }, onDragMove({ active: t2, over: n3 }) {
    e2.onDragMove && s2(e2.onDragMove(t2.id, null == n3 ? void 0 : n3.id));
  }, onDragOver({ active: t2, over: n3 }) {
    s2(e2.onDragOver(t2.id, null == n3 ? void 0 : n3.id));
  }, onDragEnd({ active: t2, over: n3 }) {
    s2(e2.onDragEnd(t2.id, null == n3 ? void 0 : n3.id));
  }, onDragCancel({ active: t2 }) {
    s2(e2.onDragCancel(t2.id));
  } }), [s2, e2])), d2 ? h(f(v, { children: [g(_, { id: n2, value: o2.draggable }), g(U, { id: c2, announcement: l2 })] }), document.body) : null;
}
const ae = Object.freeze({ x: 0, y: 0 });
function se(e2, t2) {
  return Math.sqrt(Math.pow(e2.x - t2.x, 2) + Math.pow(e2.y - t2.y, 2));
}
function le(e2, t2) {
  const n2 = F(e2);
  if (!n2)
    return "0 0";
  return `${(n2.x - t2.left) / t2.width * 100}% ${(n2.y - t2.top) / t2.height * 100}%`;
}
function ce({ data: { value: e2 } }, { data: { value: t2 } }) {
  return e2 - t2;
}
function de({ data: { value: e2 } }, { data: { value: t2 } }) {
  return t2 - e2;
}
function ue({ left: e2, top: t2, height: n2, width: r2 }) {
  return [{ x: e2, y: t2 }, { x: e2 + r2, y: t2 }, { x: e2, y: t2 + n2 }, { x: e2 + r2, y: t2 + n2 }];
}
function he(e2, t2) {
  if (!e2 || 0 === e2.length)
    return null;
  const [n2] = e2;
  return t2 ? n2[t2] : n2;
}
function ge(e2, t2 = e2.left, n2 = e2.top) {
  return { x: t2 + 0.5 * e2.width, y: n2 + 0.5 * e2.height };
}
const fe = ({ collisionRect: e2, droppableContainers: t2 }) => {
  const n2 = ue(e2), r2 = [];
  for (const e3 of t2) {
    const { id: t3, rect: { current: o2 } } = e3;
    if (o2) {
      const i2 = ue(o2), a2 = n2.reduce((e4, t4, n3) => e4 + se(i2[n3], t4), 0), s2 = Number((a2 / 4).toFixed(4));
      r2.push({ id: t3, data: { droppableContainer: e3, value: s2 } });
    }
  }
  return r2.sort(ce);
};
function ve(e2, t2) {
  const n2 = Math.max(t2.top, e2.top), r2 = Math.max(t2.left, e2.left), o2 = Math.min(t2.left + t2.width, e2.left + e2.width), i2 = Math.min(t2.top + t2.height, e2.top + e2.height), a2 = o2 - r2, s2 = i2 - n2;
  if (r2 < o2 && n2 < i2) {
    const n3 = t2.width * t2.height, r3 = e2.width * e2.height, o3 = a2 * s2;
    return Number((o3 / (n3 + r3 - o3)).toFixed(4));
  }
  return 0;
}
const pe = ({ collisionRect: e2, droppableContainers: t2 }) => {
  const n2 = [];
  for (const r2 of t2) {
    const { id: t3, rect: { current: o2 } } = r2;
    if (o2) {
      const i2 = ve(o2, e2);
      i2 > 0 && n2.push({ id: t3, data: { droppableContainer: r2, value: i2 } });
    }
  }
  return n2.sort(de);
};
function be(e2, t2) {
  const { top: n2, left: r2, bottom: o2, right: i2 } = t2;
  return n2 <= e2.y && e2.y <= o2 && r2 <= e2.x && e2.x <= i2;
}
function me(e2) {
  return function(t2, ...n2) {
    return n2.reduce((t3, n3) => ({ ...t3, top: t3.top + e2 * n3.y, bottom: t3.bottom + e2 * n3.y, left: t3.left + e2 * n3.x, right: t3.right + e2 * n3.x }), { ...t2 });
  };
}
const ye = me(1);
const we = { ignoreTransform: false };
function xe(e2, t2 = we) {
  let n2 = e2.getBoundingClientRect();
  if (t2.ignoreTransform) {
    const { getComputedStyle: t3 } = w(e2), { transform: r3, transformOrigin: o3 } = t3(e2);
    r3 && (n2 = function(e3, t4, n3) {
      let r4, o4, i3, a3, s3;
      if (t4.startsWith("matrix3d("))
        r4 = t4.slice(9, -1).split(/, /), o4 = +r4[0], i3 = +r4[5], a3 = +r4[12], s3 = +r4[13];
      else {
        if (!t4.startsWith("matrix("))
          return e3;
        r4 = t4.slice(7, -1).split(/, /), o4 = +r4[0], i3 = +r4[3], a3 = +r4[4], s3 = +r4[5];
      }
      const l3 = e3.left - a3 - (1 - o4) * parseFloat(n3), c2 = e3.top - s3 - (1 - i3) * parseFloat(n3.slice(n3.indexOf(" ") + 1)), d2 = o4 ? e3.width / o4 : e3.width, u2 = i3 ? e3.height / i3 : e3.height;
      return { width: d2, height: u2, top: c2, right: l3 + d2, bottom: c2 + u2, left: l3 };
    }(n2, r3, o3));
  }
  const { top: r2, left: o2, width: i2, height: a2, bottom: s2, right: l2 } = n2;
  return { top: r2, left: o2, width: i2, height: a2, bottom: s2, right: l2 };
}
function De(e2) {
  return xe(e2, { ignoreTransform: true });
}
function Se(e2) {
  const t2 = [];
  return e2 ? function n2(r2) {
    if (!r2)
      return t2;
    if (x(r2) && null != r2.scrollingElement && !t2.includes(r2.scrollingElement))
      return t2.push(r2.scrollingElement), t2;
    if (!D(r2) || S(r2))
      return t2;
    if (t2.includes(r2))
      return t2;
    const { getComputedStyle: o2 } = w(r2), i2 = o2(r2);
    return r2 !== e2 && function(e3, t3 = w(e3).getComputedStyle(e3)) {
      const n3 = /(auto|scroll|overlay)/;
      return null != ["overflow", "overflowX", "overflowY"].find((e4) => {
        const r3 = t3[e4];
        return "string" == typeof r3 && n3.test(r3);
      });
    }(r2, i2) && t2.push(r2), function(e3, t3 = w(e3).getComputedStyle(e3)) {
      return "fixed" === t3.position;
    }(r2, i2) ? t2 : n2(r2.parentNode);
  }(e2) : t2;
}
function Re(e2) {
  return b && e2 ? m(e2) ? e2 : y(e2) ? x(e2) || e2 === R(e2).scrollingElement ? window : D(e2) ? e2 : null : null : null;
}
function Ce(e2) {
  return m(e2) ? e2.scrollX : e2.scrollLeft;
}
function Ee(e2) {
  return m(e2) ? e2.scrollY : e2.scrollTop;
}
function Ne(e2) {
  return { x: Ce(e2), y: Ee(e2) };
}
var Ie;
function Te(e2) {
  const t2 = { x: 0, y: 0 }, n2 = { x: e2.scrollWidth - e2.clientWidth, y: e2.scrollHeight - e2.clientHeight };
  return { isTop: e2.scrollTop <= t2.y, isLeft: e2.scrollLeft <= t2.x, isBottom: e2.scrollTop >= n2.y, isRight: e2.scrollLeft >= n2.x, maxScroll: n2, minScroll: t2 };
}
!function(e2) {
  e2[e2.Forward = 1] = "Forward", e2[e2.Backward = -1] = "Backward";
}(Ie || (Ie = {}));
const Me = { x: 0.2, y: 0.2 };
function Oe(e2, t2, { top: n2, left: r2, right: o2, bottom: i2 }, a2 = 10, s2 = Me) {
  const { clientHeight: l2, clientWidth: c2 } = e2, d2 = (u2 = e2, b && u2 && u2 === document.scrollingElement ? { top: 0, left: 0, right: c2, bottom: l2, width: c2, height: l2 } : t2);
  var u2;
  const { isTop: h2, isBottom: g2, isLeft: f2, isRight: v2 } = Te(e2), p2 = { x: 0, y: 0 }, m2 = { x: 0, y: 0 }, y2 = d2.height * s2.y, w2 = d2.width * s2.x;
  return !h2 && n2 <= d2.top + y2 ? (p2.y = Ie.Backward, m2.y = a2 * Math.abs((d2.top + y2 - n2) / y2)) : !g2 && i2 >= d2.bottom - y2 && (p2.y = Ie.Forward, m2.y = a2 * Math.abs((d2.bottom - y2 - i2) / y2)), !v2 && o2 >= d2.right - w2 ? (p2.x = Ie.Forward, m2.x = a2 * Math.abs((d2.right - w2 - o2) / w2)) : !f2 && r2 <= d2.left + w2 && (p2.x = Ie.Backward, m2.x = a2 * Math.abs((d2.left + w2 - r2) / w2)), { direction: p2, speed: m2 };
}
function Ae(e2) {
  if (e2 === document.scrollingElement) {
    const { innerWidth: e3, innerHeight: t3 } = window;
    return { top: 0, left: 0, right: e3, bottom: t3, width: e3, height: t3 };
  }
  const { top: t2, left: n2, right: r2, bottom: o2 } = e2.getBoundingClientRect();
  return { top: t2, left: n2, right: r2, bottom: o2, width: e2.clientWidth, height: e2.clientHeight };
}
function Le(e2) {
  return e2.reduce((e3, t2) => k(e3, Ne(t2)), ae);
}
const ke = [["x", ["left", "right"], function(e2) {
  return e2.reduce((e3, t2) => e3 + Ce(t2), 0);
}], ["y", ["top", "bottom"], function(e2) {
  return e2.reduce((e3, t2) => e3 + Ee(t2), 0);
}]];
class Be {
  constructor(e2, t2) {
    this.rect = void 0, this.width = void 0, this.height = void 0, this.top = void 0, this.bottom = void 0, this.right = void 0, this.left = void 0;
    const n2 = Se(t2), r2 = Le(n2);
    this.rect = { ...e2 }, this.width = e2.width, this.height = e2.height;
    for (const [e3, t3, o2] of ke)
      for (const i2 of t3)
        Object.defineProperty(this, i2, { get: () => {
          const t4 = o2(n2), a2 = r2[e3] - t4;
          return this.rect[i2] + a2;
        }, enumerable: true });
    Object.defineProperty(this, "rect", { enumerable: false });
  }
}
var je, Pe, ze, Fe;
!function(e2) {
  e2[e2.Pointer = 0] = "Pointer", e2[e2.DraggableRect = 1] = "DraggableRect";
}(je || (je = {})), function(e2) {
  e2[e2.TreeOrder = 0] = "TreeOrder", e2[e2.ReversedTreeOrder = 1] = "ReversedTreeOrder";
}(Pe || (Pe = {})), function(e2) {
  e2[e2.Always = 0] = "Always", e2[e2.BeforeDragging = 1] = "BeforeDragging", e2[e2.WhileDragging = 2] = "WhileDragging";
}(ze || (ze = {})), function(e2) {
  e2.Optimized = "optimized";
}(Fe || (Fe = {}));
const Xe = /* @__PURE__ */ new Map(), Ye = { measure: De, strategy: ze.WhileDragging, frequency: Fe.Optimized };
function Ke({ onResize: e2, disabled: n2 }) {
  const o2 = t(() => {
    if (n2 || "undefined" == typeof window || void 0 === window.ResizeObserver)
      return;
    const { ResizeObserver: t2 } = window;
    return new t2(e2);
  }, [n2, e2]);
  return r(() => () => null == o2 ? void 0 : o2.disconnect(), [o2]), o2;
}
const We = [];
const _e = Ve(De), Ue = qe(De);
function $e(e2, t2, n2) {
  const r2 = o(e2);
  return T((o2) => e2 ? n2 || !o2 && e2 || e2 !== r2.current ? D(e2) && null == e2.parentNode ? null : new Be(t2(e2), e2) : null != o2 ? o2 : null : null, [e2, n2, t2]);
}
function Ve(e2) {
  return (t2, n2) => $e(t2, e2, n2);
}
function qe(e2) {
  const t2 = [];
  return function(n2, r2) {
    const i2 = o(n2);
    return T((o2) => n2.length ? r2 || !o2 && n2.length || n2 !== i2.current ? n2.map((t3) => new Be(e2(t3), t3)) : null != o2 ? o2 : t2 : t2, [n2, r2]);
  };
}
function He(e2) {
  if (!e2)
    return null;
  if (e2.children.length > 1)
    return e2;
  const t2 = e2.children[0];
  return D(t2) ? t2 : e2;
}
function Ge(e2, n2) {
  return t(() => ({ sensor: e2, options: null != n2 ? n2 : {} }), [e2, n2]);
}
function Je(...e2) {
  return t(() => [...e2].filter((e3) => null != e3), [...e2]);
}
class Qe {
  constructor(e2) {
    this.target = void 0, this.listeners = [], this.removeAll = () => {
      this.listeners.forEach((e3) => {
        var t2;
        return null == (t2 = this.target) ? void 0 : t2.removeEventListener(...e3);
      });
    }, this.target = e2;
  }
  add(e2, t2, n2) {
    var r2;
    null == (r2 = this.target) || r2.addEventListener(e2, t2, n2), this.listeners.push([e2, t2, n2]);
  }
}
function Ze(e2, t2) {
  const n2 = Math.abs(e2.x), r2 = Math.abs(e2.y);
  return "number" == typeof t2 ? Math.sqrt(n2 ** 2 + r2 ** 2) > t2 : "x" in t2 && "y" in t2 ? n2 > t2.x && r2 > t2.y : "x" in t2 ? n2 > t2.x : "y" in t2 && r2 > t2.y;
}
var et, tt;
function nt(e2) {
  e2.preventDefault();
}
function rt(e2) {
  e2.stopPropagation();
}
!function(e2) {
  e2.Click = "click", e2.DragStart = "dragstart", e2.Keydown = "keydown", e2.ContextMenu = "contextmenu", e2.Resize = "resize", e2.SelectionChange = "selectionchange", e2.VisibilityChange = "visibilitychange";
}(et || (et = {})), function(e2) {
  e2.Space = "Space", e2.Down = "ArrowDown", e2.Right = "ArrowRight", e2.Left = "ArrowLeft", e2.Up = "ArrowUp", e2.Esc = "Escape", e2.Enter = "Enter";
}(tt || (tt = {}));
const ot = { start: [tt.Space, tt.Enter], cancel: [tt.Esc], end: [tt.Space, tt.Enter] }, it = (e2, { currentCoordinates: t2 }) => {
  switch (e2.code) {
    case tt.Right:
      return { ...t2, x: t2.x + 25 };
    case tt.Left:
      return { ...t2, x: t2.x - 25 };
    case tt.Down:
      return { ...t2, y: t2.y + 25 };
    case tt.Up:
      return { ...t2, y: t2.y - 25 };
  }
};
class at {
  constructor(e2) {
    this.props = void 0, this.autoScrollEnabled = false, this.coordinates = ae, this.listeners = void 0, this.windowListeners = void 0, this.props = e2;
    const { event: { target: t2 } } = e2;
    this.props = e2, this.listeners = new Qe(R(t2)), this.windowListeners = new Qe(w(t2)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
  }
  attach() {
    this.handleStart(), this.windowListeners.add(et.Resize, this.handleCancel), this.windowListeners.add(et.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(et.Keydown, this.handleKeyDown));
  }
  handleStart() {
    const { activeNode: e2, onStart: t2 } = this.props;
    if (!e2.node.current)
      throw new Error("Active draggable node is undefined");
    const n2 = De(e2.node.current), r2 = { x: n2.left, y: n2.top };
    this.coordinates = r2, t2(r2);
  }
  handleKeyDown(e2) {
    if (P(e2)) {
      const { coordinates: t2 } = this, { active: n2, context: r2, options: o2 } = this.props, { keyboardCodes: i2 = ot, coordinateGetter: a2 = it, scrollBehavior: s2 = "smooth" } = o2, { code: l2 } = e2;
      if (i2.end.includes(l2))
        return void this.handleEnd(e2);
      if (i2.cancel.includes(l2))
        return void this.handleCancel(e2);
      const c2 = a2(e2, { active: n2, context: r2.current, currentCoordinates: t2 });
      if (c2) {
        const n3 = { x: 0, y: 0 }, { scrollableAncestors: o3 } = r2.current;
        for (const r3 of o3) {
          const o4 = e2.code, i3 = B(c2, t2), { isTop: a3, isRight: l3, isLeft: d2, isBottom: u2, maxScroll: h2, minScroll: g2 } = Te(r3), f2 = Ae(r3), v2 = { x: Math.min(o4 === tt.Right ? f2.right - f2.width / 2 : f2.right, Math.max(o4 === tt.Right ? f2.left : f2.left + f2.width / 2, c2.x)), y: Math.min(o4 === tt.Down ? f2.bottom - f2.height / 2 : f2.bottom, Math.max(o4 === tt.Down ? f2.top : f2.top + f2.height / 2, c2.y)) }, p2 = o4 === tt.Right && !l3 || o4 === tt.Left && !d2, b2 = o4 === tt.Down && !u2 || o4 === tt.Up && !a3;
          if (p2 && v2.x !== c2.x) {
            if (o4 === tt.Right && r3.scrollLeft + i3.x <= h2.x || o4 === tt.Left && r3.scrollLeft + i3.x >= g2.x)
              return void r3.scrollBy({ left: i3.x, behavior: s2 });
            n3.x = o4 === tt.Right ? r3.scrollLeft - h2.x : r3.scrollLeft - g2.x, r3.scrollBy({ left: -n3.x, behavior: s2 });
            break;
          }
          if (b2 && v2.y !== c2.y) {
            if (o4 === tt.Down && r3.scrollTop + i3.y <= h2.y || o4 === tt.Up && r3.scrollTop + i3.y >= g2.y)
              return void r3.scrollBy({ top: i3.y, behavior: s2 });
            n3.y = o4 === tt.Down ? r3.scrollTop - h2.y : r3.scrollTop - g2.y, r3.scrollBy({ top: -n3.y, behavior: s2 });
            break;
          }
        }
        this.handleMove(e2, k(c2, n3));
      }
    }
  }
  handleMove(e2, t2) {
    const { onMove: n2 } = this.props;
    e2.preventDefault(), n2(t2), this.coordinates = t2;
  }
  handleEnd(e2) {
    const { onEnd: t2 } = this.props;
    e2.preventDefault(), this.detach(), t2();
  }
  handleCancel(e2) {
    const { onCancel: t2 } = this.props;
    e2.preventDefault(), this.detach(), t2();
  }
  detach() {
    this.listeners.removeAll(), this.windowListeners.removeAll();
  }
}
function st(e2) {
  return Boolean(e2 && "distance" in e2);
}
function lt(e2) {
  return Boolean(e2 && "delay" in e2);
}
at.activators = [{ eventName: "onKeyDown", handler: (e2, { keyboardCodes: t2 = ot, onActivation: n2 }) => {
  const { code: r2 } = e2.nativeEvent;
  return !!t2.start.includes(r2) && (e2.preventDefault(), null == n2 || n2({ event: e2.nativeEvent }), true);
} }];
class ct {
  constructor(e2, t2, n2 = function(e3) {
    const { EventTarget: t3 } = w(e3);
    return e3 instanceof t3 ? e3 : R(e3);
  }(e2.event.target)) {
    var r2;
    this.props = void 0, this.events = void 0, this.autoScrollEnabled = true, this.document = void 0, this.activated = false, this.initialCoordinates = void 0, this.timeoutId = null, this.listeners = void 0, this.documentListeners = void 0, this.windowListeners = void 0, this.props = e2, this.events = t2;
    const { event: o2 } = e2, { target: i2 } = o2;
    this.props = e2, this.events = t2, this.document = R(i2), this.documentListeners = new Qe(this.document), this.listeners = new Qe(n2), this.windowListeners = new Qe(w(i2)), this.initialCoordinates = null != (r2 = F(o2)) ? r2 : ae, this.handleStart = this.handleStart.bind(this), this.handleMove = this.handleMove.bind(this), this.handleEnd = this.handleEnd.bind(this), this.handleCancel = this.handleCancel.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.removeTextSelection = this.removeTextSelection.bind(this), this.attach();
  }
  attach() {
    const { events: e2, props: { options: { activationConstraint: t2 } } } = this;
    if (this.listeners.add(e2.move.name, this.handleMove, { passive: false }), this.listeners.add(e2.end.name, this.handleEnd), this.windowListeners.add(et.Resize, this.handleCancel), this.windowListeners.add(et.DragStart, nt), this.windowListeners.add(et.VisibilityChange, this.handleCancel), this.windowListeners.add(et.ContextMenu, nt), this.documentListeners.add(et.Keydown, this.handleKeydown), t2) {
      if (st(t2))
        return;
      if (lt(t2))
        return void (this.timeoutId = setTimeout(this.handleStart, t2.delay));
    }
    this.handleStart();
  }
  detach() {
    this.listeners.removeAll(), this.windowListeners.removeAll(), setTimeout(this.documentListeners.removeAll, 50), null !== this.timeoutId && (clearTimeout(this.timeoutId), this.timeoutId = null);
  }
  handleStart() {
    const { initialCoordinates: e2 } = this, { onStart: t2 } = this.props;
    e2 && (this.activated = true, this.documentListeners.add(et.Click, rt, { capture: true }), this.removeTextSelection(), this.documentListeners.add(et.SelectionChange, this.removeTextSelection), t2(e2));
  }
  handleMove(e2) {
    var t2;
    const { activated: n2, initialCoordinates: r2, props: o2 } = this, { onMove: i2, options: { activationConstraint: a2 } } = o2;
    if (!r2)
      return;
    const s2 = null != (t2 = F(e2)) ? t2 : ae, l2 = B(r2, s2);
    if (!n2 && a2) {
      if (lt(a2))
        return Ze(l2, a2.tolerance) ? this.handleCancel() : void 0;
      if (st(a2))
        return null != a2.tolerance && Ze(l2, a2.tolerance) ? this.handleCancel() : Ze(l2, a2.distance) ? this.handleStart() : void 0;
    }
    e2.cancelable && e2.preventDefault(), i2(s2);
  }
  handleEnd() {
    const { onEnd: e2 } = this.props;
    this.detach(), e2();
  }
  handleCancel() {
    const { onCancel: e2 } = this.props;
    this.detach(), e2();
  }
  handleKeydown(e2) {
    e2.code === tt.Esc && this.handleCancel();
  }
  removeTextSelection() {
    var e2;
    null == (e2 = this.document.getSelection()) || e2.removeAllRanges();
  }
}
const dt = { move: { name: "pointermove" }, end: { name: "pointerup" } };
class ut extends ct {
  constructor(e2) {
    const { event: t2 } = e2, n2 = R(t2.target);
    super(e2, dt, n2);
  }
}
ut.activators = [{ eventName: "onPointerDown", handler: ({ nativeEvent: e2 }, { onActivation: t2 }) => !(!e2.isPrimary || 0 !== e2.button) && (null == t2 || t2({ event: e2 }), true) }];
const ht = { move: { name: "mousemove" }, end: { name: "mouseup" } };
var gt;
!function(e2) {
  e2[e2.RightClick = 2] = "RightClick";
}(gt || (gt = {}));
class ft extends ct {
  constructor(e2) {
    super(e2, ht, R(e2.event.target));
  }
}
ft.activators = [{ eventName: "onMouseDown", handler: ({ nativeEvent: e2 }, { onActivation: t2 }) => e2.button !== gt.RightClick && (null == t2 || t2({ event: e2 }), true) }];
const vt = { move: { name: "touchmove" }, end: { name: "touchend" } };
class pt extends ct {
  constructor(e2) {
    super(e2, vt);
  }
  static setup() {
    return window.addEventListener(vt.move.name, e2, { capture: false, passive: false }), function() {
      window.removeEventListener(vt.move.name, e2);
    };
    function e2() {
    }
  }
}
function bt(e2, { transform: t2, ...n2 }) {
  return (null == e2 ? void 0 : e2.length) ? e2.reduce((e3, t3) => t3({ transform: e3, ...n2 }), t2) : t2;
}
pt.activators = [{ eventName: "onTouchStart", handler: ({ nativeEvent: e2 }, { onActivation: t2 }) => {
  const { touches: n2 } = e2;
  return !(n2.length > 1) && (null == t2 || t2({ event: e2 }), true);
} }];
const mt = [{ sensor: ut, options: {} }, { sensor: at, options: {} }], yt = { current: {} }, wt = d({ ...ae, scaleX: 1, scaleY: 1 }), xt = l(function({ id: e2, autoScroll: n2 = true, announcements: s2, children: l2, sensors: d2 = mt, collisionDetection: h2 = pe, measuring: v2, modifiers: p2, screenReaderInstructions: m2 = $, ...y2 }) {
  var w2, x2, S2, R2, E2, O2, L2;
  const B2 = c(ne, void 0, te), [j2, P2] = B2, [z2, X2] = a(() => ({ type: null, event: null })), [Y2, K2] = a(false), { draggable: { active: W2, nodes: _2, translate: U2 }, droppable: { containers: V2 } } = j2, H2 = W2 ? _2[W2] : null, G2 = o({ initial: null, translated: null }), J2 = t(() => {
    var e3;
    return null != W2 ? { id: W2, data: null != (e3 = null == H2 ? void 0 : H2.data) ? e3 : yt, rect: G2 } : null;
  }, [W2, H2]), Q2 = o(null), [oe2, se2] = a(null), [le2, ce2] = a(null), de2 = I(y2, Object.values(y2)), ue2 = A("DndDescribedBy", e2), ge2 = t(() => V2.getEnabled(), [V2]), { droppableRects: fe2, measureDroppableContainers: ve2, measuringScheduled: be2 } = function(e3, { dragging: t2, dependencies: n3, config: s3 }) {
    const [l3, c2] = a(null), d3 = null != l3, { frequency: u2, measure: h3, strategy: g2 } = { ...Ye, ...s3 }, f2 = o(e3), v3 = i((e4 = []) => c2((t3) => t3 ? t3.concat(e4) : e4), []), p3 = o(null), b2 = function() {
      switch (g2) {
        case ze.Always:
          return false;
        case ze.BeforeDragging:
          return t2;
        default:
          return !t2;
      }
    }(), m3 = T((n4) => {
      if (b2 && !t2)
        return Xe;
      const r2 = l3;
      if (!n4 || n4 === Xe || f2.current !== e3 || null != r2) {
        const t3 = /* @__PURE__ */ new Map();
        for (let n5 of e3) {
          if (!n5)
            continue;
          if (r2 && r2.length > 0 && !r2.includes(n5.id) && n5.rect.current) {
            t3.set(n5.id, n5.rect.current);
            continue;
          }
          const e4 = n5.node.current, o2 = e4 ? new Be(h3(e4), e4) : null;
          n5.rect.current = o2, o2 && t3.set(n5.id, o2);
        }
        return t3;
      }
      return n4;
    }, [e3, l3, t2, b2, h3]);
    return r(() => {
      f2.current = e3;
    }, [e3]), r(() => {
      b2 || requestAnimationFrame(() => v3());
    }, [t2, b2]), r(() => {
      d3 && c2(null);
    }, [d3]), r(() => {
      b2 || "number" != typeof u2 || null !== p3.current || (p3.current = setTimeout(() => {
        v3(), p3.current = null;
      }, u2));
    }, [u2, b2, v3, ...n3]), { droppableRects: m3, measureDroppableContainers: v3, measuringScheduled: d3 };
  }(ge2, { dragging: Y2, dependencies: [U2.x, U2.y], config: null == v2 ? void 0 : v2.droppable }), me2 = function(e3, t2) {
    const n3 = null !== t2 ? e3[t2] : void 0, r2 = n3 ? n3.node.current : null;
    return T((e4) => {
      var n4;
      return null === t2 ? null : null != (n4 = null != r2 ? r2 : e4) ? n4 : null;
    }, [r2, t2]);
  }(_2, W2), we2 = le2 ? F(le2) : null, Ce2 = $e(me2, null != (w2 = null == v2 || null == (x2 = v2.draggable) ? void 0 : x2.measure) ? w2 : De), Ee2 = _e(me2 ? me2.parentElement : null), Ie2 = o({ active: null, activeNode: me2, collisionRect: null, collisions: null, droppableRects: fe2, draggableNodes: _2, draggingNode: null, draggingNodeRect: null, droppableContainers: V2, over: null, scrollableAncestors: [], scrollAdjustedTranslate: null }), Te2 = V2.getNodeFor(null == (S2 = Ie2.current.over) ? void 0 : S2.id), Me2 = function({ measure: e3 = xe }) {
    const [n3, r2] = a(null), o2 = Ke({ onResize: i((t2) => {
      for (const { target: n4 } of t2)
        if (D(n4)) {
          r2((t3) => {
            const r3 = e3(n4);
            return t3 ? { ...t3, width: r3.width, height: r3.height } : r3;
          });
          break;
        }
    }, [e3]) }), s3 = i((t2) => {
      const n4 = He(t2);
      null == o2 || o2.disconnect(), n4 && (null == o2 || o2.observe(n4)), r2(n4 ? e3(n4) : null);
    }, [e3, o2]), [l3, c2] = M(s3);
    return t(() => ({ nodeRef: l3, rect: n3, setRef: c2 }), [n3, l3, c2]);
  }({ measure: null == v2 || null == (R2 = v2.dragOverlay) ? void 0 : R2.measure }), Ae2 = null != (E2 = Me2.nodeRef.current) ? E2 : me2, ke2 = null != (O2 = Me2.rect) ? O2 : Ce2, Fe2 = o(null), Ve2 = Fe2.current, qe2 = ke2 === Ce2 ? (Je2 = Ve2, (Ge2 = Ce2) && Je2 ? { x: Ge2.left - Je2.left, y: Ge2.top - Je2.top } : ae) : ae;
  var Ge2, Je2;
  const Qe2 = (Ze2 = Ae2 ? Ae2.ownerDocument.defaultView : null, t(() => Ze2 ? function(e3) {
    const t2 = e3.innerWidth, n3 = e3.innerHeight;
    return { top: 0, left: 0, right: t2, bottom: n3, width: t2, height: n3 };
  }(Ze2) : null, [Ze2]));
  var Ze2;
  const et2 = function(e3) {
    const t2 = o(e3), n3 = T((n4) => e3 ? n4 && e3 && t2.current && e3.parentNode === t2.current.parentNode ? n4 : Se(e3) : We, [e3]);
    return r(() => {
      t2.current = e3;
    }, [e3]), n3;
  }(W2 ? null != Te2 ? Te2 : Ae2 : null), tt2 = Ue(et2), nt2 = bt(p2, { transform: { x: U2.x - qe2.x, y: U2.y - qe2.y, scaleX: 1, scaleY: 1 }, activatorEvent: le2, active: J2, activeNodeRect: Ce2, containerNodeRect: Ee2, draggingNodeRect: ke2, over: Ie2.current.over, overlayNodeRect: Me2.rect, scrollableAncestors: et2, scrollableAncestorRects: tt2, windowRect: Qe2 }), rt2 = we2 ? k(we2, U2) : null, ot2 = function(e3) {
    const [n3, s3] = a(null), l3 = o(e3), c2 = i((e4) => {
      const t2 = Re(e4.target);
      t2 && s3((e5) => e5 ? (e5.set(t2, Ne(t2)), new Map(e5)) : null);
    }, []);
    return r(() => {
      const t2 = l3.current;
      if (e3 !== t2) {
        n4(t2);
        const r2 = e3.map((e4) => {
          const t3 = Re(e4);
          return t3 ? (t3.addEventListener("scroll", c2, { passive: true }), [t3, Ne(t3)]) : null;
        }).filter((e4) => null != e4);
        s3(r2.length ? new Map(r2) : null), l3.current = e3;
      }
      return () => {
        n4(e3), n4(t2);
      };
      function n4(e4) {
        e4.forEach((e5) => {
          const t3 = Re(e5);
          null == t3 || t3.removeEventListener("scroll", c2);
        });
      }
    }, [c2, e3]), t(() => e3.length ? n3 ? Array.from(n3.values()).reduce((e4, t2) => k(e4, t2), ae) : Le(e3) : ae, [e3, n3]);
  }(et2), it2 = k(nt2, ot2), at2 = ke2 ? ye(ke2, nt2) : null, st2 = J2 && at2 ? h2({ active: J2, collisionRect: at2, droppableContainers: ge2, pointerCoordinates: rt2 }) : null, lt2 = he(st2, "id"), [ct2, dt2] = a(null), ut2 = function(e3, t2, n3) {
    return { ...e3, scaleX: t2 && n3 ? t2.width / n3.width : 1, scaleY: t2 && n3 ? t2.height / n3.height : 1 };
  }(nt2, null != (L2 = null == ct2 ? void 0 : ct2.rect) ? L2 : null, Ce2), ht2 = i((e3, { sensor: t2, options: n3 }) => {
    if (!Q2.current)
      return;
    const r2 = _2[Q2.current];
    if (!r2)
      return;
    const o2 = new t2({ active: Q2.current, activeNode: r2, event: e3.nativeEvent, options: n3, context: Ie2, onStart(e4) {
      const t3 = Q2.current;
      if (!t3)
        return;
      const n4 = _2[t3];
      if (!n4)
        return;
      const { onDragStart: r3 } = de2.current, o3 = { active: { id: t3, data: n4.data, rect: G2 } };
      u(() => {
        P2({ type: q.DragStart, initialCoordinates: e4, active: t3 }), X2({ type: q.DragStart, event: o3 });
      }), null == r3 || r3(o3);
    }, onMove(e4) {
      P2({ type: q.DragMove, coordinates: e4 });
    }, onEnd: i2(q.DragEnd), onCancel: i2(q.DragCancel) });
    function i2(e4) {
      return async function() {
        const { active: t3, collisions: n4, over: r3, scrollAdjustedTranslate: o3 } = Ie2.current;
        let i3 = null;
        if (t3 && o3) {
          const { cancelDrop: a2 } = de2.current;
          if (i3 = { active: t3, collisions: n4, delta: o3, over: r3 }, e4 === q.DragEnd && "function" == typeof a2) {
            await Promise.resolve(a2(i3)) && (e4 = q.DragCancel);
          }
        }
        Q2.current = null, u(() => {
          if (P2({ type: e4 }), dt2(null), K2(false), se2(null), ce2(null), i3 && X2({ type: e4, event: i3 }), i3) {
            const { onDragCancel: t4, onDragEnd: n5 } = de2.current, r4 = e4 === q.DragEnd ? n5 : t4;
            null == r4 || r4(i3);
          }
        });
      };
    }
    u(() => {
      se2(o2), ce2(e3.nativeEvent);
    });
  }, [_2]), gt2 = i((e3, t2) => (n3, r2) => {
    const o2 = n3.nativeEvent;
    null !== Q2.current || o2.dndKit || o2.defaultPrevented || true === e3(n3, t2.options) && (o2.dndKit = { capturedBy: t2.sensor }, Q2.current = r2, ht2(n3, t2));
  }, [ht2]), ft2 = function(e3, n3) {
    return t(() => e3.reduce((e4, t2) => {
      const { sensor: r2 } = t2;
      return [...e4, ...r2.activators.map((e5) => ({ eventName: e5.eventName, handler: n3(e5.handler, t2) }))];
    }, []), [e3, n3]);
  }(d2, gt2);
  !function(e3) {
    r(() => {
      if (!b)
        return;
      const t2 = e3.map(({ sensor: e4 }) => null == e4.setup ? void 0 : e4.setup());
      return () => {
        for (const e4 of t2)
          null == e4 || e4();
      };
    }, e3.map(({ sensor: e4 }) => e4));
  }(d2), r(() => {
    null != W2 && K2(true);
  }, [W2]), r(() => {
    J2 || (Fe2.current = null), J2 && Ce2 && !Fe2.current && (Fe2.current = Ce2);
  }, [Ce2, J2]), r(() => {
    const { onDragMove: e3 } = de2.current, { active: t2, collisions: n3, over: r2 } = Ie2.current;
    if (!t2)
      return;
    const o2 = { active: t2, collisions: n3, delta: { x: it2.x, y: it2.y }, over: r2 };
    X2({ type: q.DragMove, event: o2 }), null == e3 || e3(o2);
  }, [it2.x, it2.y]), r(() => {
    const { active: e3, collisions: t2, droppableContainers: n3, scrollAdjustedTranslate: r2 } = Ie2.current;
    if (!e3 || !Q2.current || !r2)
      return;
    const { onDragOver: o2 } = de2.current, i2 = n3.get(lt2), a2 = i2 && i2.rect.current ? { id: i2.id, rect: i2.rect.current, data: i2.data, disabled: i2.disabled } : null, s3 = { active: e3, collisions: t2, delta: { x: r2.x, y: r2.y }, over: a2 };
    u(() => {
      dt2(a2), X2({ type: q.DragOver, event: s3 }), null == o2 || o2(s3);
    });
  }, [lt2]), C(() => {
    Ie2.current = { active: J2, activeNode: me2, collisionRect: at2, collisions: st2, droppableRects: fe2, draggableNodes: _2, draggingNode: Ae2, draggingNodeRect: ke2, droppableContainers: V2, over: ct2, scrollableAncestors: et2, scrollAdjustedTranslate: it2 }, G2.current = { initial: ke2, translated: at2 };
  }, [J2, me2, st2, at2, _2, Ae2, ke2, fe2, V2, ct2, et2, it2]), function({ acceleration: e3, activator: n3 = je.Pointer, canScroll: a2, draggingRect: s3, enabled: l3, interval: c2 = 5, order: d3 = Pe.TreeOrder, pointerCoordinates: u2, scrollableAncestors: h3, scrollableAncestorRects: g2, threshold: f2 }) {
    const [v3, p3] = N(), b2 = o({ x: 1, y: 1 }), m3 = t(() => {
      switch (n3) {
        case je.Pointer:
          return u2 ? { top: u2.y, bottom: u2.y, left: u2.x, right: u2.x } : null;
        case je.DraggableRect:
          return s3;
      }
      return null;
    }, [n3, s3, u2]), y3 = o(ae), w3 = o(null), x3 = i(() => {
      const e4 = w3.current;
      if (!e4)
        return;
      const t2 = b2.current.x * y3.current.x, n4 = b2.current.y * y3.current.y;
      e4.scrollBy(t2, n4);
    }, []), D2 = t(() => d3 === Pe.TreeOrder ? [...h3].reverse() : h3, [d3, h3]);
    r(() => {
      if (l3 && h3.length && m3) {
        for (const t2 of D2) {
          if (false === (null == a2 ? void 0 : a2(t2)))
            continue;
          const n4 = h3.indexOf(t2), r2 = g2[n4];
          if (!r2)
            continue;
          const { direction: o2, speed: i2 } = Oe(t2, r2, m3, e3, f2);
          if (i2.x > 0 || i2.y > 0)
            return p3(), w3.current = t2, v3(x3, c2), b2.current = i2, void (y3.current = o2);
        }
        b2.current = { x: 0, y: 0 }, y3.current = { x: 0, y: 0 }, p3();
      } else
        p3();
    }, [e3, x3, a2, p3, l3, c2, JSON.stringify(m3), v3, h3, D2, g2, JSON.stringify(f2)]);
  }({ ...function() {
    const e3 = false === (null == oe2 ? void 0 : oe2.autoScrollEnabled), t2 = "object" == typeof n2 ? false === n2.enabled : false === n2, r2 = !e3 && !t2;
    if ("object" == typeof n2)
      return { ...n2, enabled: r2 };
    return { enabled: r2 };
  }(), draggingRect: at2, pointerCoordinates: rt2, scrollableAncestors: et2, scrollableAncestorRects: tt2 });
  const vt2 = t(() => ({ active: J2, activeNode: me2, activeNodeRect: Ce2, activatorEvent: le2, collisions: st2, containerNodeRect: Ee2, dragOverlay: Me2, draggableNodes: _2, droppableContainers: V2, droppableRects: fe2, over: ct2, measureDroppableContainers: ve2, scrollableAncestors: et2, scrollableAncestorRects: tt2, measuringScheduled: be2, windowRect: Qe2 }), [J2, me2, Ce2, le2, st2, Ee2, Me2, _2, V2, fe2, ct2, ve2, et2, tt2, be2, Qe2]), pt2 = t(() => ({ activatorEvent: le2, activators: ft2, active: J2, activeNodeRect: Ce2, ariaDescribedById: { draggable: ue2 }, dispatch: P2, draggableNodes: _2, over: ct2, measureDroppableContainers: ve2 }), [le2, ft2, J2, Ce2, P2, ue2, _2, ct2, ve2]);
  return f(re.Provider, { value: z2, children: [g(Z.Provider, { value: pt2, children: g(ee.Provider, { value: vt2, children: g(wt.Provider, { value: ut2, children: l2 }) }) }), g(ie, { announcements: s2, hiddenTextDescribedById: ue2, screenReaderInstructions: m2 })] });
}), Dt = d(null), St = "button", Rt = "Droppable";
function Ct({ id: e2, data: n2, disabled: r2 = false, attributes: o2 }) {
  const i2 = A(Rt), { activators: a2, activatorEvent: l2, active: c2, activeNodeRect: d2, ariaDescribedById: u2, draggableNodes: h2, over: g2 } = s(Z), { role: f2 = St, roleDescription: v2 = "draggable", tabIndex: p2 = 0 } = null != o2 ? o2 : {}, b2 = (null == c2 ? void 0 : c2.id) === e2, m2 = s(b2 ? wt : Dt), [y2, w2] = M(), x2 = function(e3, n3) {
    return t(() => e3.reduce((e4, { eventName: t2, handler: r3 }) => (e4[t2] = (e5) => {
      r3(e5, n3);
    }, e4), {}), [e3, n3]);
  }(a2, e2), D2 = I(n2);
  C(() => (h2[e2] = { id: e2, key: i2, node: y2, data: D2 }, () => {
    const t2 = h2[e2];
    t2 && t2.key === i2 && delete h2[e2];
  }), [h2, e2]);
  return { active: c2, activatorEvent: l2, activeNodeRect: d2, attributes: t(() => ({ role: f2, tabIndex: p2, "aria-pressed": !(!b2 || f2 !== St) || void 0, "aria-roledescription": v2, "aria-describedby": u2.draggable }), [f2, p2, b2, v2, u2.draggable]), isDragging: b2, listeners: r2 ? void 0 : x2, node: y2, over: g2, setNodeRef: w2, transform: m2 };
}
function Et() {
  return s(ee);
}
const Nt = "Droppable", It = { timeout: 25 };
function Tt({ data: e2, disabled: t2 = false, id: n2, resizeObserverConfig: a2 }) {
  const l2 = A(Nt), { active: c2, dispatch: d2, over: u2, measureDroppableContainers: h2 } = s(Z), g2 = o(false), f2 = o(null), v2 = o(null), { disabled: p2, updateMeasurementsFor: b2, timeout: m2 } = { ...It, ...a2 }, y2 = I(null != b2 ? b2 : n2), w2 = Ke({ onResize: i(() => {
    g2.current ? (null != v2.current && clearTimeout(v2.current), v2.current = setTimeout(() => {
      h2("string" == typeof y2.current ? [y2.current] : y2.current), v2.current = null;
    }, m2)) : g2.current = true;
  }, [m2]), disabled: p2 || !c2 }), x2 = i((e3, t3) => {
    w2 && (t3 && (w2.unobserve(t3), g2.current = false), e3 && w2.observe(e3));
  }, [w2]), [D2, S2] = M(x2), R2 = I(e2);
  return r(() => {
    w2 && D2.current && (w2.disconnect(), g2.current = false, w2.observe(D2.current));
  }, [D2, w2]), C(() => (d2({ type: q.RegisterDroppable, element: { id: n2, key: l2, disabled: t2, node: D2, rect: f2, data: R2 } }), () => d2({ type: q.UnregisterDroppable, key: l2, id: n2 })), [n2]), r(() => {
    d2({ type: q.SetDroppableDisabled, id: n2, key: l2, disabled: t2 });
  }, [t2]), { active: c2, rect: f2, isOver: (null == u2 ? void 0 : u2.id) === n2, node: D2, over: u2, setNodeRef: S2 };
}
const Mt = { duration: 250, easing: "ease", dragSourceOpacity: 0 };
const Ot = { x: 0, y: 0, scaleX: 1, scaleY: 1 }, At = (e2) => P(e2) ? "transform 250ms ease" : void 0, Lt = e.memo(({ adjustScale: t2 = false, children: n2, dropAnimation: i2 = Mt, style: l2, transition: c2 = At, modifiers: d2, wrapperElement: u2 = "div", className: h2, zIndex: g2 = 999 }) => {
  var f2, v2;
  const { active: p2, activeNodeRect: b2, containerNodeRect: m2, draggableNodes: y2, activatorEvent: w2, over: x2, dragOverlay: D2, scrollableAncestors: S2, scrollableAncestorRects: R2, windowRect: E2 } = Et(), N2 = s(wt), I2 = bt(d2, { activatorEvent: w2, active: p2, activeNodeRect: b2, containerNodeRect: m2, draggingNodeRect: D2.rect, over: x2, overlayNodeRect: D2.rect, scrollableAncestors: S2, scrollableAncestorRects: R2, transform: N2, windowRect: E2 }), M2 = null !== p2, O2 = t2 ? I2 : { ...I2, scaleX: 1, scaleY: 1 }, A2 = T((e2) => M2 ? e2 || (b2 ? { ...b2 } : null) : null, [M2, b2]), L2 = A2 ? { position: "fixed", width: A2.width, height: A2.height, top: A2.top, left: A2.left, zIndex: g2, transform: X.Transform.toString(O2), touchAction: "none", transformOrigin: t2 && w2 ? le(w2, A2) : void 0, transition: "function" == typeof c2 ? c2(w2) : c2, ...l2 } : void 0, k2 = M2 ? { style: L2, children: n2, className: h2, transform: O2 } : void 0, B2 = o(k2), j2 = null != k2 ? k2 : B2.current, { children: P2, transform: z2, ...F2 } = null != j2 ? j2 : {}, Y2 = o(null != (f2 = null == p2 ? void 0 : p2.id) ? f2 : null), K2 = function({ animate: e2, adjustScale: t3, activeId: n3, draggableNodes: r2, duration: o2, dragSourceOpacity: i3, easing: s2, node: l3, transform: c3 }) {
    const [d3, u3] = a(false);
    return C(() => {
      var a2;
      if (!(e2 && n3 && s2 && o2))
        return void (e2 && u3(true));
      const d4 = null == (a2 = r2[n3]) ? void 0 : a2.node.current;
      if (c3 && l3 && d4 && null !== d4.parentNode) {
        const e3 = He(l3);
        if (e3) {
          const n4 = e3.getBoundingClientRect(), r3 = De(d4), a3 = { x: n4.left - r3.left, y: n4.top - r3.top };
          if (Math.abs(a3.x) || Math.abs(a3.y)) {
            const e4 = { scaleX: t3 ? r3.width * c3.scaleX / n4.width : 1, scaleY: t3 ? r3.height * c3.scaleY / n4.height : 1 }, h3 = X.Transform.toString({ x: c3.x - a3.x, y: c3.y - a3.y, ...e4 }), g3 = d4.style.opacity;
            return null != i3 && (d4.style.opacity = `${i3}`), void (l3.animate([{ transform: X.Transform.toString(c3) }, { transform: h3 }], { easing: s2, duration: o2 }).onfinish = () => {
              l3.style.display = "none", u3(true), d4 && null != i3 && (d4.style.opacity = g3);
            });
          }
        }
      }
      u3(true);
    }, [e2, n3, t3, r2, o2, s2, i3, l3, c3]), C(() => {
      d3 && u3(false);
    }, [d3]), d3;
  }({ animate: Boolean(i2 && Y2.current && !p2), adjustScale: t2, activeId: Y2.current, draggableNodes: y2, duration: null == i2 ? void 0 : i2.duration, easing: null == i2 ? void 0 : i2.easing, dragSourceOpacity: null == i2 ? void 0 : i2.dragSourceOpacity, node: D2.nodeRef.current, transform: null == (v2 = B2.current) ? void 0 : v2.transform }), W2 = Boolean(P2 && (n2 || i2 && !K2));
  return r(() => {
    var e2;
    (null == p2 ? void 0 : p2.id) !== Y2.current && (Y2.current = null != (e2 = null == p2 ? void 0 : p2.id) ? e2 : null);
    p2 && B2.current !== k2 && (B2.current = k2);
  }, [p2, k2]), r(() => {
    K2 && (B2.current = void 0);
  }, [K2]), W2 ? e.createElement(Z.Provider, { value: Q }, e.createElement(wt.Provider, { value: Ot }, e.createElement(u2, { ...F2, ref: D2.setRef }, P2))) : null;
}), kt = Object.freeze(Object.defineProperty({ __proto__: null, get AutoScrollActivator() {
  return je;
}, DndContext: xt, DragOverlay: Lt, get KeyboardCode() {
  return tt;
}, KeyboardSensor: at, get MeasuringFrequency() {
  return Fe;
}, get MeasuringStrategy() {
  return ze;
}, MouseSensor: ft, PointerSensor: ut, TouchSensor: pt, get TraversalOrder() {
  return Pe;
}, applyModifiers: bt, closestCenter: ({ collisionRect: e2, droppableContainers: t2 }) => {
  const n2 = ge(e2, e2.left, e2.top), r2 = [];
  for (const e3 of t2) {
    const { id: t3, rect: { current: o2 } } = e3;
    if (o2) {
      const i2 = se(ge(o2), n2);
      r2.push({ id: t3, data: { droppableContainer: e3, value: i2 } });
    }
  }
  return r2.sort(ce);
}, closestCorners: fe, defaultAnnouncements: V, defaultCoordinates: ae, defaultDropAnimation: Mt, getClientRect: xe, getFirstCollision: he, getScrollableAncestors: Se, pointerWithin: ({ droppableContainers: e2, pointerCoordinates: t2 }) => {
  if (!t2)
    return [];
  const n2 = [];
  for (const r2 of e2) {
    const { id: e3, rect: { current: o2 } } = r2;
    if (o2 && be(t2, o2)) {
      const i2 = ue(o2).reduce((e4, n3) => e4 + se(t2, n3), 0), a2 = Number((i2 / 4).toFixed(4));
      n2.push({ id: e3, data: { droppableContainer: r2, value: a2 } });
    }
  }
  return n2.sort(ce);
}, rectIntersection: pe, useDndContext: Et, useDndMonitor: oe, useDraggable: Ct, useDroppable: Tt, useSensor: Ge, useSensors: Je }, Symbol.toStringTag, { value: "Module" }));
function Bt(e2, t2, n2) {
  const r2 = { ...e2 };
  return t2.top + e2.y <= n2.top ? r2.y = n2.top - t2.top : t2.bottom + e2.y >= n2.top + n2.height && (r2.y = n2.top + n2.height - t2.bottom), t2.left + e2.x <= n2.left ? r2.x = n2.left - t2.left : t2.right + e2.x >= n2.left + n2.width && (r2.x = n2.left + n2.width - t2.right), r2;
}
const jt = (e2) => {
  let { transform: t2 } = e2;
  return { ...t2, x: 0 };
}, Pt = Object.freeze(Object.defineProperty({ __proto__: null, createSnapModifier: function(e2) {
  return (t2) => {
    let { transform: n2 } = t2;
    return { ...n2, x: Math.ceil(n2.x / e2) * e2, y: Math.ceil(n2.y / e2) * e2 };
  };
}, restrictToFirstScrollableAncestor: (e2) => {
  let { draggingNodeRect: t2, transform: n2, scrollableAncestorRects: r2 } = e2;
  const o2 = r2[0];
  return t2 && o2 ? Bt(n2, t2, o2) : n2;
}, restrictToHorizontalAxis: (e2) => {
  let { transform: t2 } = e2;
  return { ...t2, y: 0 };
}, restrictToParentElement: (e2) => {
  let { containerNodeRect: t2, draggingNodeRect: n2, transform: r2 } = e2;
  return n2 && t2 ? Bt(r2, n2, t2) : r2;
}, restrictToVerticalAxis: jt, restrictToWindowEdges: (e2) => {
  let { transform: t2, draggingNodeRect: n2, windowRect: r2 } = e2;
  return n2 && r2 ? Bt(t2, n2, r2) : t2;
}, snapCenterToCursor: (e2) => {
  let { activatorEvent: t2, draggingNodeRect: n2, transform: r2 } = e2;
  if (n2 && t2) {
    const e3 = F(t2);
    if (!e3)
      return r2;
    const o2 = e3.x - n2.left, i2 = e3.y - n2.top;
    return { ...r2, x: r2.x + o2 - n2.width / 2, y: r2.y + i2 - n2.height / 2 };
  }
  return r2;
} }, Symbol.toStringTag, { value: "Module" }));
function zt(e2, t2, n2) {
  const r2 = e2.slice();
  return r2.splice(n2 < 0 ? r2.length + n2 : n2, 0, r2.splice(t2, 1)[0]), r2;
}
function Ft(e2, t2) {
  return e2.reduce((e3, n2, r2) => {
    const o2 = t2.get(n2);
    return o2 && (e3[r2] = o2), e3;
  }, Array(e2.length));
}
function Xt(e2) {
  return null !== e2 && e2 >= 0;
}
const Yt = { scaleX: 1, scaleY: 1 };
const Kt = ({ rects: e2, activeIndex: t2, overIndex: n2, index: r2 }) => {
  const o2 = zt(e2, n2, t2), i2 = e2[r2], a2 = o2[r2];
  return a2 && i2 ? { x: a2.left - i2.left, y: a2.top - i2.top, scaleX: a2.width / i2.width, scaleY: a2.height / i2.height } : null;
}, Wt = { scaleX: 1, scaleY: 1 }, _t = ({ activeIndex: e2, activeNodeRect: t2, index: n2, rects: r2, overIndex: o2 }) => {
  var i2;
  const a2 = null != (i2 = r2[e2]) ? i2 : t2;
  if (!a2)
    return null;
  if (n2 === e2) {
    const t3 = r2[o2];
    return t3 ? { x: 0, y: e2 < o2 ? t3.top + t3.height - (a2.top + a2.height) : t3.top - a2.top, ...Wt } : null;
  }
  const s2 = function(e3, t3, n3) {
    const r3 = e3[t3], o3 = e3[t3 - 1], i3 = e3[t3 + 1];
    if (!r3)
      return 0;
    if (n3 < t3)
      return o3 ? r3.top - (o3.top + o3.height) : i3 ? i3.top - (r3.top + r3.height) : 0;
    return i3 ? i3.top - (r3.top + r3.height) : o3 ? r3.top - (o3.top + o3.height) : 0;
  }(r2, n2, e2);
  return n2 > e2 && n2 <= o2 ? { x: 0, y: -a2.height - s2, ...Wt } : n2 < e2 && n2 >= o2 ? { x: 0, y: a2.height + s2, ...Wt } : { x: 0, y: 0, ...Wt };
};
const Ut = "Sortable", $t = e.createContext({ activeIndex: -1, containerId: Ut, disableTransforms: false, items: [], overIndex: -1, useDragOverlay: false, sortedRects: [], strategy: Kt });
function Vt({ children: e2, id: n2, items: i2, strategy: a2 = Kt }) {
  const { active: s2, dragOverlay: l2, droppableRects: c2, over: d2, measureDroppableContainers: u2, measuringScheduled: h2 } = Et(), f2 = A(Ut, n2), v2 = Boolean(null !== l2.rect), p2 = t(() => i2.map((e3) => "string" == typeof e3 ? e3 : e3.id), [i2]), b2 = null != s2, m2 = s2 ? p2.indexOf(s2.id) : -1, y2 = d2 ? p2.indexOf(d2.id) : -1, w2 = o(p2), x2 = (D2 = p2, S2 = w2.current, !(D2.join() === S2.join()));
  var D2, S2;
  const R2 = -1 !== y2 && -1 === m2 || x2;
  C(() => {
    x2 && b2 && !h2 && u2(p2);
  }, [x2, p2, b2, u2, h2]), r(() => {
    w2.current = p2;
  }, [p2]);
  const E2 = t(() => ({ activeIndex: m2, containerId: f2, disableTransforms: R2, items: p2, overIndex: y2, useDragOverlay: v2, sortedRects: Ft(p2, c2), strategy: a2 }), [m2, f2, R2, p2, y2, c2, v2, a2]);
  return g($t.Provider, { value: E2, children: e2 });
}
const qt = ({ id: e2, items: t2, activeIndex: n2, overIndex: r2 }) => zt(t2, n2, r2).indexOf(e2), Ht = ({ containerId: e2, isSorting: t2, wasDragging: n2, index: r2, items: o2, newIndex: i2, previousItems: a2, previousContainerId: s2, transition: l2 }) => !(!l2 || !n2) && ((a2 === o2 || r2 !== i2) && (!!t2 || i2 !== r2 && e2 === s2)), Gt = { duration: 200, easing: "ease" }, Jt = "transform", Qt = X.Transition.toString({ property: Jt, duration: 0, easing: "linear" }), Zt = { roleDescription: "sortable" };
function en({ animateLayoutChanges: e2 = Ht, attributes: n2, disabled: i2, data: l2, getNewIndex: c2 = qt, id: d2, strategy: u2, resizeObserverConfig: h2, transition: g2 = Gt }) {
  const { items: f2, containerId: v2, activeIndex: b2, disableTransforms: m2, sortedRects: y2, overIndex: w2, useDragOverlay: x2, strategy: D2 } = s($t), S2 = f2.indexOf(d2), R2 = t(() => ({ sortable: { containerId: v2, index: S2, items: f2 }, ...l2 }), [v2, l2, S2, f2]), E2 = t(() => f2.slice(f2.indexOf(d2)), [f2, d2]), { rect: N2, node: I2, isOver: T2, setNodeRef: M2 } = Tt({ id: d2, data: R2, resizeObserverConfig: { updateMeasurementsFor: E2, ...h2 } }), { active: O2, activatorEvent: A2, activeNodeRect: L2, attributes: k2, setNodeRef: B2, listeners: j2, isDragging: z2, over: F2, transform: Y2 } = Ct({ id: d2, data: R2, attributes: { ...Zt, ...n2 }, disabled: i2 }), K2 = p(M2, B2), W2 = Boolean(O2), _2 = W2 && !m2 && Xt(b2) && Xt(w2), U2 = !x2 && z2, $2 = U2 && _2 ? Y2 : null, V2 = _2 ? null != $2 ? $2 : (null != u2 ? u2 : D2)({ rects: y2, activeNodeRect: L2, activeIndex: b2, overIndex: w2, index: S2 }) : null, q2 = Xt(b2) && Xt(w2) ? c2({ id: d2, items: f2, activeIndex: b2, overIndex: w2 }) : S2, H2 = null == O2 ? void 0 : O2.id, G2 = o({ activeId: H2, items: f2, newIndex: q2, containerId: v2 }), J2 = f2 !== G2.current.items, Q2 = e2({ active: O2, containerId: v2, isDragging: z2, isSorting: W2, id: d2, index: S2, items: f2, newIndex: G2.current.newIndex, previousItems: G2.current.items, previousContainerId: G2.current.containerId, transition: g2, wasDragging: null != G2.current.activeId }), Z2 = function({ disabled: e3, index: t2, node: n3, rect: i3 }) {
    const [s2, l3] = a(null), c3 = o(t2);
    return C(() => {
      if (!e3 && t2 !== c3.current && n3.current) {
        const e4 = i3.current;
        if (e4) {
          const t3 = xe(n3.current, { ignoreTransform: true }), r2 = { x: e4.left - t3.left, y: e4.top - t3.top, scaleX: e4.width / t3.width, scaleY: e4.height / t3.height };
          (r2.x || r2.y) && l3(r2);
        }
      }
      t2 !== c3.current && (c3.current = t2);
    }, [e3, t2, n3, i3]), r(() => {
      s2 && requestAnimationFrame(() => {
        l3(null);
      });
    }, [s2]), s2;
  }({ disabled: !Q2, index: S2, node: I2, rect: N2 });
  return r(() => {
    W2 && G2.current.newIndex !== q2 && (G2.current.newIndex = q2), v2 !== G2.current.containerId && (G2.current.containerId = v2), f2 !== G2.current.items && (G2.current.items = f2), H2 !== G2.current.activeId && (G2.current.activeId = H2);
  }, [H2, W2, q2, v2, f2]), { active: O2, activeIndex: b2, attributes: k2, rect: N2, index: S2, newIndex: q2, items: f2, isOver: T2, isSorting: W2, isDragging: z2, listeners: j2, node: I2, overIndex: w2, over: F2, setNodeRef: K2, setDroppableNodeRef: M2, setDraggableNodeRef: B2, transform: null != Z2 ? Z2 : V2, transition: function() {
    if (Z2 || J2 && G2.current.newIndex === S2)
      return Qt;
    if (U2 && !P(A2) || !g2)
      return;
    if (W2 || Q2)
      return X.Transition.toString({ ...g2, property: Jt });
    return;
  }() };
}
const tn = [tt.Down, tt.Right, tt.Up, tt.Left], nn = Object.freeze(Object.defineProperty({ __proto__: null, SortableContext: Vt, arrayMove: zt, arraySwap: function(e2, t2, n2) {
  const r2 = e2.slice();
  return r2[t2] = e2[n2], r2[n2] = e2[t2], r2;
}, defaultAnimateLayoutChanges: Ht, defaultNewIndexGetter: qt, horizontalListSortingStrategy: ({ rects: e2, activeNodeRect: t2, activeIndex: n2, overIndex: r2, index: o2 }) => {
  var i2;
  const a2 = null != (i2 = e2[n2]) ? i2 : t2;
  if (!a2)
    return null;
  const s2 = function(e3, t3, n3) {
    const r3 = e3[t3], o3 = e3[t3 - 1], i3 = e3[t3 + 1];
    if (!r3 || !o3 && !i3)
      return 0;
    if (n3 < t3)
      return o3 ? r3.left - (o3.left + o3.width) : i3.left - (r3.left + r3.width);
    return i3 ? i3.left - (r3.left + r3.width) : r3.left - (o3.left + o3.width);
  }(e2, o2, n2);
  if (o2 === n2) {
    const t3 = e2[r2];
    return t3 ? { x: n2 < r2 ? t3.left + t3.width - (a2.left + a2.width) : t3.left - a2.left, y: 0, ...Yt } : null;
  }
  return o2 > n2 && o2 <= r2 ? { x: -a2.width - s2, y: 0, ...Yt } : o2 < n2 && o2 >= r2 ? { x: a2.width + s2, y: 0, ...Yt } : { x: 0, y: 0, ...Yt };
}, rectSortingStrategy: Kt, rectSwappingStrategy: ({ activeIndex: e2, index: t2, rects: n2, overIndex: r2 }) => {
  let o2, i2;
  return t2 === e2 && (o2 = n2[t2], i2 = n2[r2]), t2 === r2 && (o2 = n2[t2], i2 = n2[e2]), i2 && o2 ? { x: i2.left - o2.left, y: i2.top - o2.top, scaleX: i2.width / o2.width, scaleY: i2.height / o2.height } : null;
}, sortableKeyboardCoordinates: (e2, { context: { active: t2, droppableContainers: n2, collisionRect: r2, scrollableAncestors: o2 } }) => {
  if (tn.includes(e2.code)) {
    if (e2.preventDefault(), !t2 || !r2)
      return;
    const i2 = [];
    n2.getEnabled().forEach((t3) => {
      if (!t3 || (null == t3 ? void 0 : t3.disabled))
        return;
      const n3 = null == t3 ? void 0 : t3.rect.current;
      if (n3)
        switch (e2.code) {
          case tt.Down:
            r2.top + r2.height <= n3.top && i2.push(t3);
            break;
          case tt.Up:
            r2.top >= n3.top + n3.height && i2.push(t3);
            break;
          case tt.Left:
            r2.left >= n3.left + n3.width && i2.push(t3);
            break;
          case tt.Right:
            r2.left + r2.width <= n3.left && i2.push(t3);
        }
    });
    const a2 = he(fe({ active: t2, collisionRect: r2, droppableContainers: i2, pointerCoordinates: null }), "id");
    if (null != a2) {
      const e3 = n2.get(a2), t3 = null == e3 ? void 0 : e3.node.current, i3 = null == e3 ? void 0 : e3.rect.current;
      if (t3 && i3) {
        const e4 = Se(t3).some((e5, t4) => o2[t4] !== e5) ? { x: 0, y: 0 } : { x: r2.width - i3.width, y: r2.height - i3.height };
        return { x: i3.left - e4.x, y: i3.top - e4.y };
      }
    }
  }
}, useSortable: en, verticalListSortingStrategy: _t }, Symbol.toStringTag, { value: "Module" }));
export {
  kt as $,
  X as C,
  xt as D,
  ut as P,
  Vt as S,
  Ct as a,
  Je as b,
  Ge as c,
  Lt as d,
  Pt as e,
  nn as f,
  K as g,
  en as h,
  jt as r,
  Tt as u,
  _t as v
};
