@lanaco/lnc-react-ui 3.11.35 → 4.0.2

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 (218) hide show
  1. package/README.md +0 -3
  2. package/dist/Accordion.cjs +6 -0
  3. package/dist/Accordion.js +65 -0
  4. package/dist/AccordionDetails.cjs +7 -0
  5. package/dist/AccordionDetails.js +32 -0
  6. package/dist/AccordionSummary.cjs +12 -0
  7. package/dist/AccordionSummary.js +78 -0
  8. package/dist/ActionsToolbar.cjs +19 -0
  9. package/dist/ActionsToolbar.js +225 -0
  10. package/dist/Alert.cjs +40 -0
  11. package/dist/Alert.js +138 -0
  12. package/dist/Avatar.cjs +16 -0
  13. package/dist/Avatar.js +114 -0
  14. package/dist/Badge.cjs +17 -0
  15. package/dist/Badge.js +70 -0
  16. package/dist/Breadcrumbs.cjs +8 -0
  17. package/dist/Breadcrumbs.js +131 -0
  18. package/dist/Button.cjs +127 -0
  19. package/dist/Button.js +542 -0
  20. package/dist/ButtonGroup.cjs +44 -0
  21. package/dist/ButtonGroup.js +112 -0
  22. package/dist/CheckBoxInput.cjs +118 -0
  23. package/dist/CheckBoxInput.js +348 -0
  24. package/dist/Chip.cjs +27 -0
  25. package/dist/Chip.js +189 -0
  26. package/dist/ColorInput.cjs +60 -0
  27. package/dist/ColorInput.js +256 -0
  28. package/dist/ConfirmationForm.cjs +22 -0
  29. package/dist/ConfirmationForm.js +169 -0
  30. package/dist/Content.cjs +1 -0
  31. package/dist/Content.js +18 -0
  32. package/dist/CustomStyles-CqlCjTgU.cjs +8 -0
  33. package/dist/CustomStyles-nfD3J1mi.js +2881 -0
  34. package/dist/DataView.cjs +1 -0
  35. package/dist/DataView.js +62 -0
  36. package/dist/DateInput.cjs +296 -0
  37. package/dist/DateInput.js +7042 -0
  38. package/dist/DecimalInput.cjs +54 -0
  39. package/dist/DecimalInput.js +697 -0
  40. package/dist/DetailsView.cjs +18 -0
  41. package/dist/DetailsView.js +243 -0
  42. package/dist/DoubleRangeSlider.cjs +114 -0
  43. package/dist/DoubleRangeSlider.js +289 -0
  44. package/dist/DragAndDropFile.cjs +31 -0
  45. package/dist/DragAndDropFile.js +2331 -0
  46. package/dist/DragDropFiles.cjs +14 -0
  47. package/dist/DragDropFiles.js +175 -0
  48. package/dist/Drawer.cjs +6 -0
  49. package/dist/Drawer.js +206 -0
  50. package/dist/Dropdown.cjs +1 -0
  51. package/dist/Dropdown.js +266 -0
  52. package/dist/DropdownItem.cjs +36 -0
  53. package/dist/DropdownItem.js +241 -0
  54. package/dist/DropdownLookup.cjs +1 -0
  55. package/dist/DropdownLookup.js +325 -0
  56. package/dist/DropdownMenu-B6qr13ik.cjs +19 -0
  57. package/dist/DropdownMenu-DZi3TJ8Q.js +1547 -0
  58. package/dist/DropdownMenu.cjs +1 -0
  59. package/dist/DropdownMenu.js +12 -0
  60. package/dist/EditableTable.cjs +21 -0
  61. package/dist/EditableTable.js +462 -0
  62. package/dist/FileInput.cjs +47 -0
  63. package/dist/FileInput.js +206 -0
  64. package/dist/FlexBox.cjs +9 -0
  65. package/dist/FlexBox.js +97 -0
  66. package/dist/FlexGrid.cjs +1 -0
  67. package/dist/FlexGrid.js +78 -0
  68. package/dist/FlexGridItem.cjs +7 -0
  69. package/dist/FlexGridItem.js +97 -0
  70. package/dist/Footer.cjs +1 -0
  71. package/dist/Footer.js +18 -0
  72. package/dist/FormField.cjs +11 -0
  73. package/dist/FormField.js +65 -0
  74. package/dist/FormView.cjs +13 -0
  75. package/dist/FormView.js +354 -0
  76. package/dist/Grid.cjs +13 -0
  77. package/dist/Grid.js +62 -0
  78. package/dist/GridItem.cjs +15 -0
  79. package/dist/GridItem.js +72 -0
  80. package/dist/Header.cjs +1 -0
  81. package/dist/Header.js +18 -0
  82. package/dist/Icon.cjs +8 -0
  83. package/dist/Icon.js +59 -0
  84. package/dist/IconButton.cjs +122 -0
  85. package/dist/IconButton.js +481 -0
  86. package/dist/Kanban.cjs +85 -0
  87. package/dist/Kanban.js +4793 -0
  88. package/dist/KanbanActionsToolbar.cjs +19 -0
  89. package/dist/KanbanActionsToolbar.js +152 -0
  90. package/dist/KanbanCard-ConTmu3w.cjs +30 -0
  91. package/dist/KanbanCard-D9OhU8C6.js +175 -0
  92. package/dist/KanbanCard.cjs +1 -0
  93. package/dist/KanbanCard.js +12 -0
  94. package/dist/KanbanFooter.cjs +5 -0
  95. package/dist/KanbanFooter.js +84 -0
  96. package/dist/KanbanHeader.cjs +15 -0
  97. package/dist/KanbanHeader.js +127 -0
  98. package/dist/KanbanView.cjs +8 -0
  99. package/dist/KanbanView.js +255 -0
  100. package/dist/Link.cjs +15 -0
  101. package/dist/Link.js +62 -0
  102. package/dist/MenuItem.cjs +36 -0
  103. package/dist/MenuItem.js +230 -0
  104. package/dist/Modal.cjs +84 -0
  105. package/dist/Modal.js +372 -0
  106. package/dist/MultiSelectDropdown.cjs +1 -0
  107. package/dist/MultiSelectDropdown.js +261 -0
  108. package/dist/MultiSelectDropdownLookup.cjs +1 -0
  109. package/dist/MultiSelectDropdownLookup.js +274 -0
  110. package/dist/NestedDropdownItem.cjs +6 -0
  111. package/dist/NestedDropdownItem.js +102 -0
  112. package/dist/NestedMenuItem.cjs +6 -0
  113. package/dist/NestedMenuItem.js +115 -0
  114. package/dist/Notification.cjs +83 -0
  115. package/dist/Notification.js +1079 -0
  116. package/dist/NumberInput.cjs +45 -0
  117. package/dist/NumberInput.js +241 -0
  118. package/dist/PageLayout.cjs +26 -0
  119. package/dist/PageLayout.js +92 -0
  120. package/dist/PasswordInput.cjs +47 -0
  121. package/dist/PasswordInput.js +230 -0
  122. package/dist/ProgressBar.cjs +22 -0
  123. package/dist/ProgressBar.js +92 -0
  124. package/dist/RadioGroup.cjs +7 -0
  125. package/dist/RadioGroup.js +104 -0
  126. package/dist/RadioInput.cjs +117 -0
  127. package/dist/RadioInput.js +362 -0
  128. package/dist/RangeSlider.cjs +72 -0
  129. package/dist/RangeSlider.js +253 -0
  130. package/dist/SearchBar.cjs +100 -0
  131. package/dist/SearchBar.js +994 -0
  132. package/dist/Separator.cjs +6 -0
  133. package/dist/Separator.js +37 -0
  134. package/dist/Sidebar.cjs +39 -0
  135. package/dist/Sidebar.js +123 -0
  136. package/dist/Spinner.cjs +38 -0
  137. package/dist/Spinner.js +114 -0
  138. package/dist/Surface.cjs +7 -0
  139. package/dist/Surface.js +60 -0
  140. package/dist/SwipeableDrawer.cjs +33 -0
  141. package/dist/SwipeableDrawer.js +213 -0
  142. package/dist/Table.cjs +170 -0
  143. package/dist/Table.js +1408 -0
  144. package/dist/TableView-Cj5_fbSR.js +481 -0
  145. package/dist/TableView-D8ex512p.cjs +19 -0
  146. package/dist/TableView.cjs +1 -0
  147. package/dist/TableView.js +11 -0
  148. package/dist/Tabs.cjs +7 -0
  149. package/dist/Tabs.js +72 -0
  150. package/dist/TextAreaInput.cjs +33 -0
  151. package/dist/TextAreaInput.js +320 -0
  152. package/dist/TextInput.cjs +45 -0
  153. package/dist/TextInput.js +227 -0
  154. package/dist/ThemeProvider.cjs +113 -0
  155. package/dist/ThemeProvider.js +1340 -0
  156. package/dist/TimeInput.cjs +31 -0
  157. package/dist/TimeInput.js +133 -0
  158. package/dist/Toggle.cjs +151 -0
  159. package/dist/Toggle.js +421 -0
  160. package/dist/TreeMenu.cjs +15 -0
  161. package/dist/TreeMenu.js +108 -0
  162. package/dist/TreeMenuSeparator.cjs +6 -0
  163. package/dist/TreeMenuSeparator.js +40 -0
  164. package/dist/UploadedFile.cjs +39 -0
  165. package/dist/UploadedFile.js +192 -0
  166. package/dist/defineProperty-BHpTtkhC.js +110 -0
  167. package/dist/defineProperty-DHvxLH8G.cjs +1 -0
  168. package/dist/emotion-element-5486c51c.browser.esm-CSejtOeT.js +886 -0
  169. package/dist/emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs +1 -0
  170. package/dist/emotion-is-prop-valid.esm-BzFBwmJz.js +10 -0
  171. package/dist/emotion-is-prop-valid.esm-CMrshNb7.cjs +1 -0
  172. package/dist/emotion-react.browser.esm-DQBL7Wls.cjs +1 -0
  173. package/dist/emotion-react.browser.esm-OWM-uG8Q.js +94 -0
  174. package/dist/emotion-styled.browser.esm-BZSYYThs.js +210 -0
  175. package/dist/emotion-styled.browser.esm-Cbp_XsK4.cjs +1 -0
  176. package/dist/floating-ui.dom-1F2mTXOe.cjs +1 -0
  177. package/dist/floating-ui.dom-BdUovkEr.js +938 -0
  178. package/dist/hoist-non-react-statics.cjs-B8r9S_ak.cjs +15 -0
  179. package/dist/hoist-non-react-statics.cjs-Drf1aBlk.js +235 -0
  180. package/dist/index-BLQWNy78.js +109 -0
  181. package/dist/index-BP5r5zGN.cjs +1 -0
  182. package/dist/index-B_da1uvD.js +451 -0
  183. package/dist/index-BjdOz5Ok.cjs +1 -0
  184. package/dist/index-BklgDeu4.js +42 -0
  185. package/dist/index-C29T0m2a.cjs +174 -0
  186. package/dist/index-CZJEA84h.js +19069 -0
  187. package/dist/index-Cdkz-XH-.js +127 -0
  188. package/dist/index-D5vEbKUT.js +81 -0
  189. package/dist/index-DXnSjbfJ.cjs +20 -0
  190. package/dist/index-Ds9PUTwb.js +667 -0
  191. package/dist/index-Dzkd2i4n.cjs +1 -0
  192. package/dist/index-IO9v6o0I.cjs +5 -0
  193. package/dist/index-P-naJISQ.cjs +1 -0
  194. package/dist/index.cjs +26 -0
  195. package/dist/index.js +378 -0
  196. package/dist/motion-CtkUpWEn.js +3785 -0
  197. package/dist/motion-Oud-wpUz.cjs +1 -0
  198. package/dist/objectWithoutPropertiesLoose-Bz3hwpmU.cjs +1 -0
  199. package/dist/objectWithoutPropertiesLoose-DwEN6RBQ.js +12 -0
  200. package/dist/setPrototypeOf-4aSEnBDm.cjs +1 -0
  201. package/dist/setPrototypeOf-a891FLQJ.js +13 -0
  202. package/dist/style.css +5 -0
  203. package/dist/tslib.es6-ZNVz5r_T.js +90 -0
  204. package/dist/tslib.es6-fPwcSa2V.cjs +1 -0
  205. package/dist/use-isomorphic-layout-effect.browser.esm-CkGv31zs.cjs +1 -0
  206. package/dist/use-isomorphic-layout-effect.browser.esm-DERp5kr6.js +5 -0
  207. package/dist/useUpdateEffect-BtMgpgIV.cjs +1 -0
  208. package/dist/useUpdateEffect-CuYWz7EA.js +15 -0
  209. package/dist/utils-DEke8iwo.js +10196 -0
  210. package/dist/utils-hdRGTsQ7.cjs +13 -0
  211. package/eslint.config.js +38 -0
  212. package/package.json +137 -58
  213. package/vite.config.js +135 -0
  214. package/jest.config.js +0 -7
  215. package/lib/index.esm.js +0 -84028
  216. package/lib/index.js +0 -84165
  217. package/rc1 +0 -0
  218. package/test/jest/__mocks__/styleMock.js +0 -1
package/dist/Kanban.js ADDED
@@ -0,0 +1,4793 @@
1
+ import { jsx as ae, jsxs as pn } from "react/jsx-runtime";
2
+ import k, { useEffect as K, useLayoutEffect as hi, useRef as Y, useMemo as j, useCallback as be, useState as he, createContext as kt, memo as pi, useReducer as Yn, useContext as vt, cloneElement as vi, forwardRef as Nr } from "react";
3
+ import { r as At } from "./index-CZJEA84h.js";
4
+ import { c as un, g as bi, P as W } from "./index-Ds9PUTwb.js";
5
+ import { b as Mt, r as Ot, j as Tt } from "./utils-DEke8iwo.js";
6
+ import { c as pr } from "./index-BklgDeu4.js";
7
+ import { n as Pt } from "./emotion-styled.browser.esm-BZSYYThs.js";
8
+ import { u as kn } from "./emotion-element-5486c51c.browser.esm-CSejtOeT.js";
9
+ import { H as yi, K as mi } from "./KanbanCard-D9OhU8C6.js";
10
+ import { c as wi } from "./index-B_da1uvD.js";
11
+ import xi from "./KanbanHeader.js";
12
+ import { u as Ci } from "./useUpdateEffect-CuYWz7EA.js";
13
+ var Di = function(e) {
14
+ K(e, []);
15
+ };
16
+ function Si() {
17
+ for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
18
+ t[n] = arguments[n];
19
+ return j(
20
+ () => (o) => {
21
+ t.forEach((i) => i(o));
22
+ },
23
+ // eslint-disable-next-line react-hooks/exhaustive-deps
24
+ t
25
+ );
26
+ }
27
+ const Dn = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
28
+ function $t(e) {
29
+ const t = Object.prototype.toString.call(e);
30
+ return t === "[object Window]" || // In Electron context the Window object serializes to [object global]
31
+ t === "[object global]";
32
+ }
33
+ function Gn(e) {
34
+ return "nodeType" in e;
35
+ }
36
+ function Se(e) {
37
+ var t, n;
38
+ return e ? $t(e) ? e : Gn(e) && (t = (n = e.ownerDocument) == null ? void 0 : n.defaultView) != null ? t : window : window;
39
+ }
40
+ function Wn(e) {
41
+ const {
42
+ Document: t
43
+ } = Se(e);
44
+ return e instanceof t;
45
+ }
46
+ function Gt(e) {
47
+ return $t(e) ? !1 : e instanceof Se(e).HTMLElement;
48
+ }
49
+ function Mr(e) {
50
+ return e instanceof Se(e).SVGElement;
51
+ }
52
+ function Bt(e) {
53
+ return e ? $t(e) ? e.document : Gn(e) ? Wn(e) ? e : Gt(e) || Mr(e) ? e.ownerDocument : document : document : document;
54
+ }
55
+ const Ue = Dn ? hi : K;
56
+ function Sn(e) {
57
+ const t = Y(e);
58
+ return Ue(() => {
59
+ t.current = e;
60
+ }), be(function() {
61
+ for (var n = arguments.length, o = new Array(n), i = 0; i < n; i++)
62
+ o[i] = arguments[i];
63
+ return t.current == null ? void 0 : t.current(...o);
64
+ }, []);
65
+ }
66
+ function Ri() {
67
+ const e = Y(null), t = be((o, i) => {
68
+ e.current = setInterval(o, i);
69
+ }, []), n = be(() => {
70
+ e.current !== null && (clearInterval(e.current), e.current = null);
71
+ }, []);
72
+ return [t, n];
73
+ }
74
+ function Yt(e, t) {
75
+ t === void 0 && (t = [e]);
76
+ const n = Y(e);
77
+ return Ue(() => {
78
+ n.current !== e && (n.current = e);
79
+ }, t), n;
80
+ }
81
+ function Wt(e, t) {
82
+ const n = Y();
83
+ return j(
84
+ () => {
85
+ const o = e(n.current);
86
+ return n.current = o, o;
87
+ },
88
+ // eslint-disable-next-line react-hooks/exhaustive-deps
89
+ [...t]
90
+ );
91
+ }
92
+ function vn(e) {
93
+ const t = Sn(e), n = Y(null), o = be(
94
+ (i) => {
95
+ i !== n.current && (t == null || t(i, n.current)), n.current = i;
96
+ },
97
+ //eslint-disable-next-line
98
+ []
99
+ );
100
+ return [n, o];
101
+ }
102
+ function bn(e) {
103
+ const t = Y();
104
+ return K(() => {
105
+ t.current = e;
106
+ }, [e]), t.current;
107
+ }
108
+ let Mn = {};
109
+ function qt(e, t) {
110
+ return j(() => {
111
+ if (t)
112
+ return t;
113
+ const n = Mn[e] == null ? 0 : Mn[e] + 1;
114
+ return Mn[e] = n, e + "-" + n;
115
+ }, [e, t]);
116
+ }
117
+ function Lr(e) {
118
+ return function(t) {
119
+ for (var n = arguments.length, o = new Array(n > 1 ? n - 1 : 0), i = 1; i < n; i++)
120
+ o[i - 1] = arguments[i];
121
+ return o.reduce((a, l) => {
122
+ const c = Object.entries(l);
123
+ for (const [d, u] of c) {
124
+ const h = a[d];
125
+ h != null && (a[d] = h + e * u);
126
+ }
127
+ return a;
128
+ }, {
129
+ ...t
130
+ });
131
+ };
132
+ }
133
+ const Nt = /* @__PURE__ */ Lr(1), yn = /* @__PURE__ */ Lr(-1);
134
+ function Ai(e) {
135
+ return "clientX" in e && "clientY" in e;
136
+ }
137
+ function Rn(e) {
138
+ if (!e)
139
+ return !1;
140
+ const {
141
+ KeyboardEvent: t
142
+ } = Se(e.target);
143
+ return t && e instanceof t;
144
+ }
145
+ function Ei(e) {
146
+ if (!e)
147
+ return !1;
148
+ const {
149
+ TouchEvent: t
150
+ } = Se(e.target);
151
+ return t && e instanceof t;
152
+ }
153
+ function mn(e) {
154
+ if (Ei(e)) {
155
+ if (e.touches && e.touches.length) {
156
+ const {
157
+ clientX: t,
158
+ clientY: n
159
+ } = e.touches[0];
160
+ return {
161
+ x: t,
162
+ y: n
163
+ };
164
+ } else if (e.changedTouches && e.changedTouches.length) {
165
+ const {
166
+ clientX: t,
167
+ clientY: n
168
+ } = e.changedTouches[0];
169
+ return {
170
+ x: t,
171
+ y: n
172
+ };
173
+ }
174
+ }
175
+ return Ai(e) ? {
176
+ x: e.clientX,
177
+ y: e.clientY
178
+ } : null;
179
+ }
180
+ const bt = /* @__PURE__ */ Object.freeze({
181
+ Translate: {
182
+ toString(e) {
183
+ if (!e)
184
+ return;
185
+ const {
186
+ x: t,
187
+ y: n
188
+ } = e;
189
+ return "translate3d(" + (t ? Math.round(t) : 0) + "px, " + (n ? Math.round(n) : 0) + "px, 0)";
190
+ }
191
+ },
192
+ Scale: {
193
+ toString(e) {
194
+ if (!e)
195
+ return;
196
+ const {
197
+ scaleX: t,
198
+ scaleY: n
199
+ } = e;
200
+ return "scaleX(" + t + ") scaleY(" + n + ")";
201
+ }
202
+ },
203
+ Transform: {
204
+ toString(e) {
205
+ if (e)
206
+ return [bt.Translate.toString(e), bt.Scale.toString(e)].join(" ");
207
+ }
208
+ },
209
+ Transition: {
210
+ toString(e) {
211
+ let {
212
+ property: t,
213
+ duration: n,
214
+ easing: o
215
+ } = e;
216
+ return t + " " + n + "ms " + o;
217
+ }
218
+ }
219
+ }), vr = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
220
+ function _i(e) {
221
+ return e.matches(vr) ? e : e.querySelector(vr);
222
+ }
223
+ const Ii = {
224
+ display: "none"
225
+ };
226
+ function Oi(e) {
227
+ let {
228
+ id: t,
229
+ value: n
230
+ } = e;
231
+ return k.createElement("div", {
232
+ id: t,
233
+ style: Ii
234
+ }, n);
235
+ }
236
+ function Ti(e) {
237
+ let {
238
+ id: t,
239
+ announcement: n,
240
+ ariaLiveType: o = "assertive"
241
+ } = e;
242
+ const i = {
243
+ position: "fixed",
244
+ width: 1,
245
+ height: 1,
246
+ margin: -1,
247
+ border: 0,
248
+ padding: 0,
249
+ overflow: "hidden",
250
+ clip: "rect(0 0 0 0)",
251
+ clipPath: "inset(100%)",
252
+ whiteSpace: "nowrap"
253
+ };
254
+ return k.createElement("div", {
255
+ id: t,
256
+ style: i,
257
+ role: "status",
258
+ "aria-live": o,
259
+ "aria-atomic": !0
260
+ }, n);
261
+ }
262
+ function Ni() {
263
+ const [e, t] = he("");
264
+ return {
265
+ announce: be((o) => {
266
+ o != null && t(o);
267
+ }, []),
268
+ announcement: e
269
+ };
270
+ }
271
+ const Pr = /* @__PURE__ */ kt(null);
272
+ function Mi(e) {
273
+ const t = vt(Pr);
274
+ K(() => {
275
+ if (!t)
276
+ throw new Error("useDndMonitor must be used within a children of <DndContext>");
277
+ return t(e);
278
+ }, [e, t]);
279
+ }
280
+ function Li() {
281
+ const [e] = he(() => /* @__PURE__ */ new Set()), t = be((o) => (e.add(o), () => e.delete(o)), [e]);
282
+ return [be((o) => {
283
+ let {
284
+ type: i,
285
+ event: a
286
+ } = o;
287
+ e.forEach((l) => {
288
+ var c;
289
+ return (c = l[i]) == null ? void 0 : c.call(l, a);
290
+ });
291
+ }, [e]), t];
292
+ }
293
+ const Pi = {
294
+ draggable: `
295
+ To pick up a draggable item, press the space bar.
296
+ While dragging, use the arrow keys to move the item.
297
+ Press space again to drop the item in its new position, or press escape to cancel.
298
+ `
299
+ }, $i = {
300
+ onDragStart(e) {
301
+ let {
302
+ active: t
303
+ } = e;
304
+ return "Picked up draggable item " + t.id + ".";
305
+ },
306
+ onDragOver(e) {
307
+ let {
308
+ active: t,
309
+ over: n
310
+ } = e;
311
+ return n ? "Draggable item " + t.id + " was moved over droppable area " + n.id + "." : "Draggable item " + t.id + " is no longer over a droppable area.";
312
+ },
313
+ onDragEnd(e) {
314
+ let {
315
+ active: t,
316
+ over: n
317
+ } = e;
318
+ return n ? "Draggable item " + t.id + " was dropped over droppable area " + n.id : "Draggable item " + t.id + " was dropped.";
319
+ },
320
+ onDragCancel(e) {
321
+ let {
322
+ active: t
323
+ } = e;
324
+ return "Dragging was cancelled. Draggable item " + t.id + " was dropped.";
325
+ }
326
+ };
327
+ function Bi(e) {
328
+ let {
329
+ announcements: t = $i,
330
+ container: n,
331
+ hiddenTextDescribedById: o,
332
+ screenReaderInstructions: i = Pi
333
+ } = e;
334
+ const {
335
+ announce: a,
336
+ announcement: l
337
+ } = Ni(), c = qt("DndLiveRegion"), [d, u] = he(!1);
338
+ if (K(() => {
339
+ u(!0);
340
+ }, []), Mi(j(() => ({
341
+ onDragStart(g) {
342
+ let {
343
+ active: w
344
+ } = g;
345
+ a(t.onDragStart({
346
+ active: w
347
+ }));
348
+ },
349
+ onDragMove(g) {
350
+ let {
351
+ active: w,
352
+ over: b
353
+ } = g;
354
+ t.onDragMove && a(t.onDragMove({
355
+ active: w,
356
+ over: b
357
+ }));
358
+ },
359
+ onDragOver(g) {
360
+ let {
361
+ active: w,
362
+ over: b
363
+ } = g;
364
+ a(t.onDragOver({
365
+ active: w,
366
+ over: b
367
+ }));
368
+ },
369
+ onDragEnd(g) {
370
+ let {
371
+ active: w,
372
+ over: b
373
+ } = g;
374
+ a(t.onDragEnd({
375
+ active: w,
376
+ over: b
377
+ }));
378
+ },
379
+ onDragCancel(g) {
380
+ let {
381
+ active: w,
382
+ over: b
383
+ } = g;
384
+ a(t.onDragCancel({
385
+ active: w,
386
+ over: b
387
+ }));
388
+ }
389
+ }), [a, t])), !d)
390
+ return null;
391
+ const h = k.createElement(k.Fragment, null, k.createElement(Oi, {
392
+ id: o,
393
+ value: i.draggable
394
+ }), k.createElement(Ti, {
395
+ id: c,
396
+ announcement: l
397
+ }));
398
+ return n ? At.createPortal(h, n) : h;
399
+ }
400
+ var le;
401
+ (function(e) {
402
+ e.DragStart = "dragStart", e.DragMove = "dragMove", e.DragEnd = "dragEnd", e.DragCancel = "dragCancel", e.DragOver = "dragOver", e.RegisterDroppable = "registerDroppable", e.SetDroppableDisabled = "setDroppableDisabled", e.UnregisterDroppable = "unregisterDroppable";
403
+ })(le || (le = {}));
404
+ function wn() {
405
+ }
406
+ function Ln(e, t) {
407
+ return j(
408
+ () => ({
409
+ sensor: e,
410
+ options: t ?? {}
411
+ }),
412
+ // eslint-disable-next-line react-hooks/exhaustive-deps
413
+ [e, t]
414
+ );
415
+ }
416
+ function zi() {
417
+ for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
418
+ t[n] = arguments[n];
419
+ return j(
420
+ () => [...t].filter((o) => o != null),
421
+ // eslint-disable-next-line react-hooks/exhaustive-deps
422
+ [...t]
423
+ );
424
+ }
425
+ const Je = /* @__PURE__ */ Object.freeze({
426
+ x: 0,
427
+ y: 0
428
+ });
429
+ function qn(e, t) {
430
+ return Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2));
431
+ }
432
+ function Fi(e, t) {
433
+ const n = mn(e);
434
+ if (!n)
435
+ return "0 0";
436
+ const o = {
437
+ x: (n.x - t.left) / t.width * 100,
438
+ y: (n.y - t.top) / t.height * 100
439
+ };
440
+ return o.x + "% " + o.y + "%";
441
+ }
442
+ function Jn(e, t) {
443
+ let {
444
+ data: {
445
+ value: n
446
+ }
447
+ } = e, {
448
+ data: {
449
+ value: o
450
+ }
451
+ } = t;
452
+ return n - o;
453
+ }
454
+ function Ki(e, t) {
455
+ let {
456
+ data: {
457
+ value: n
458
+ }
459
+ } = e, {
460
+ data: {
461
+ value: o
462
+ }
463
+ } = t;
464
+ return o - n;
465
+ }
466
+ function Fn(e) {
467
+ let {
468
+ left: t,
469
+ top: n,
470
+ height: o,
471
+ width: i
472
+ } = e;
473
+ return [{
474
+ x: t,
475
+ y: n
476
+ }, {
477
+ x: t + i,
478
+ y: n
479
+ }, {
480
+ x: t,
481
+ y: n + o
482
+ }, {
483
+ x: t + i,
484
+ y: n + o
485
+ }];
486
+ }
487
+ function Vn(e, t) {
488
+ if (!e || e.length === 0)
489
+ return null;
490
+ const [n] = e;
491
+ return t ? n[t] : n;
492
+ }
493
+ function br(e, t, n) {
494
+ return t === void 0 && (t = e.left), n === void 0 && (n = e.top), {
495
+ x: t + e.width * 0.5,
496
+ y: n + e.height * 0.5
497
+ };
498
+ }
499
+ const yr = (e) => {
500
+ let {
501
+ collisionRect: t,
502
+ droppableRects: n,
503
+ droppableContainers: o
504
+ } = e;
505
+ const i = br(t, t.left, t.top), a = [];
506
+ for (const l of o) {
507
+ const {
508
+ id: c
509
+ } = l, d = n.get(c);
510
+ if (d) {
511
+ const u = qn(br(d), i);
512
+ a.push({
513
+ id: c,
514
+ data: {
515
+ droppableContainer: l,
516
+ value: u
517
+ }
518
+ });
519
+ }
520
+ }
521
+ return a.sort(Jn);
522
+ }, Hi = (e) => {
523
+ let {
524
+ collisionRect: t,
525
+ droppableRects: n,
526
+ droppableContainers: o
527
+ } = e;
528
+ const i = Fn(t), a = [];
529
+ for (const l of o) {
530
+ const {
531
+ id: c
532
+ } = l, d = n.get(c);
533
+ if (d) {
534
+ const u = Fn(d), h = i.reduce((w, b, A) => w + qn(u[A], b), 0), g = Number((h / 4).toFixed(4));
535
+ a.push({
536
+ id: c,
537
+ data: {
538
+ droppableContainer: l,
539
+ value: g
540
+ }
541
+ });
542
+ }
543
+ }
544
+ return a.sort(Jn);
545
+ };
546
+ function Ui(e, t) {
547
+ const n = Math.max(t.top, e.top), o = Math.max(t.left, e.left), i = Math.min(t.left + t.width, e.left + e.width), a = Math.min(t.top + t.height, e.top + e.height), l = i - o, c = a - n;
548
+ if (o < i && n < a) {
549
+ const d = t.width * t.height, u = e.width * e.height, h = l * c, g = h / (d + u - h);
550
+ return Number(g.toFixed(4));
551
+ }
552
+ return 0;
553
+ }
554
+ const $r = (e) => {
555
+ let {
556
+ collisionRect: t,
557
+ droppableRects: n,
558
+ droppableContainers: o
559
+ } = e;
560
+ const i = [];
561
+ for (const a of o) {
562
+ const {
563
+ id: l
564
+ } = a, c = n.get(l);
565
+ if (c) {
566
+ const d = Ui(c, t);
567
+ d > 0 && i.push({
568
+ id: l,
569
+ data: {
570
+ droppableContainer: a,
571
+ value: d
572
+ }
573
+ });
574
+ }
575
+ }
576
+ return i.sort(Ki);
577
+ };
578
+ function Xi(e, t) {
579
+ const {
580
+ top: n,
581
+ left: o,
582
+ bottom: i,
583
+ right: a
584
+ } = t;
585
+ return n <= e.y && e.y <= i && o <= e.x && e.x <= a;
586
+ }
587
+ const ji = (e) => {
588
+ let {
589
+ droppableContainers: t,
590
+ droppableRects: n,
591
+ pointerCoordinates: o
592
+ } = e;
593
+ if (!o)
594
+ return [];
595
+ const i = [];
596
+ for (const a of t) {
597
+ const {
598
+ id: l
599
+ } = a, c = n.get(l);
600
+ if (c && Xi(o, c)) {
601
+ const u = Fn(c).reduce((g, w) => g + qn(o, w), 0), h = Number((u / 4).toFixed(4));
602
+ i.push({
603
+ id: l,
604
+ data: {
605
+ droppableContainer: a,
606
+ value: h
607
+ }
608
+ });
609
+ }
610
+ }
611
+ return i.sort(Jn);
612
+ };
613
+ function Yi(e, t, n) {
614
+ return {
615
+ ...e,
616
+ scaleX: t && n ? t.width / n.width : 1,
617
+ scaleY: t && n ? t.height / n.height : 1
618
+ };
619
+ }
620
+ function Br(e, t) {
621
+ return e && t ? {
622
+ x: e.left - t.left,
623
+ y: e.top - t.top
624
+ } : Je;
625
+ }
626
+ function ki(e) {
627
+ return function(n) {
628
+ for (var o = arguments.length, i = new Array(o > 1 ? o - 1 : 0), a = 1; a < o; a++)
629
+ i[a - 1] = arguments[a];
630
+ return i.reduce((l, c) => ({
631
+ ...l,
632
+ top: l.top + e * c.y,
633
+ bottom: l.bottom + e * c.y,
634
+ left: l.left + e * c.x,
635
+ right: l.right + e * c.x
636
+ }), {
637
+ ...n
638
+ });
639
+ };
640
+ }
641
+ const Gi = /* @__PURE__ */ ki(1);
642
+ function zr(e) {
643
+ if (e.startsWith("matrix3d(")) {
644
+ const t = e.slice(9, -1).split(/, /);
645
+ return {
646
+ x: +t[12],
647
+ y: +t[13],
648
+ scaleX: +t[0],
649
+ scaleY: +t[5]
650
+ };
651
+ } else if (e.startsWith("matrix(")) {
652
+ const t = e.slice(7, -1).split(/, /);
653
+ return {
654
+ x: +t[4],
655
+ y: +t[5],
656
+ scaleX: +t[0],
657
+ scaleY: +t[3]
658
+ };
659
+ }
660
+ return null;
661
+ }
662
+ function Wi(e, t, n) {
663
+ const o = zr(t);
664
+ if (!o)
665
+ return e;
666
+ const {
667
+ scaleX: i,
668
+ scaleY: a,
669
+ x: l,
670
+ y: c
671
+ } = o, d = e.left - l - (1 - i) * parseFloat(n), u = e.top - c - (1 - a) * parseFloat(n.slice(n.indexOf(" ") + 1)), h = i ? e.width / i : e.width, g = a ? e.height / a : e.height;
672
+ return {
673
+ width: h,
674
+ height: g,
675
+ top: u,
676
+ right: d + h,
677
+ bottom: u + g,
678
+ left: d
679
+ };
680
+ }
681
+ const qi = {
682
+ ignoreTransform: !1
683
+ };
684
+ function zt(e, t) {
685
+ t === void 0 && (t = qi);
686
+ let n = e.getBoundingClientRect();
687
+ if (t.ignoreTransform) {
688
+ const {
689
+ transform: u,
690
+ transformOrigin: h
691
+ } = Se(e).getComputedStyle(e);
692
+ u && (n = Wi(n, u, h));
693
+ }
694
+ const {
695
+ top: o,
696
+ left: i,
697
+ width: a,
698
+ height: l,
699
+ bottom: c,
700
+ right: d
701
+ } = n;
702
+ return {
703
+ top: o,
704
+ left: i,
705
+ width: a,
706
+ height: l,
707
+ bottom: c,
708
+ right: d
709
+ };
710
+ }
711
+ function mr(e) {
712
+ return zt(e, {
713
+ ignoreTransform: !0
714
+ });
715
+ }
716
+ function Ji(e) {
717
+ const t = e.innerWidth, n = e.innerHeight;
718
+ return {
719
+ top: 0,
720
+ left: 0,
721
+ right: t,
722
+ bottom: n,
723
+ width: t,
724
+ height: n
725
+ };
726
+ }
727
+ function Vi(e, t) {
728
+ return t === void 0 && (t = Se(e).getComputedStyle(e)), t.position === "fixed";
729
+ }
730
+ function Qi(e, t) {
731
+ t === void 0 && (t = Se(e).getComputedStyle(e));
732
+ const n = /(auto|scroll|overlay)/;
733
+ return ["overflow", "overflowX", "overflowY"].some((i) => {
734
+ const a = t[i];
735
+ return typeof a == "string" ? n.test(a) : !1;
736
+ });
737
+ }
738
+ function Qn(e, t) {
739
+ const n = [];
740
+ function o(i) {
741
+ if (t != null && n.length >= t || !i)
742
+ return n;
743
+ if (Wn(i) && i.scrollingElement != null && !n.includes(i.scrollingElement))
744
+ return n.push(i.scrollingElement), n;
745
+ if (!Gt(i) || Mr(i) || n.includes(i))
746
+ return n;
747
+ const a = Se(e).getComputedStyle(i);
748
+ return i !== e && Qi(i, a) && n.push(i), Vi(i, a) ? n : o(i.parentNode);
749
+ }
750
+ return e ? o(e) : n;
751
+ }
752
+ function Fr(e) {
753
+ const [t] = Qn(e, 1);
754
+ return t ?? null;
755
+ }
756
+ function Pn(e) {
757
+ return !Dn || !e ? null : $t(e) ? e : Gn(e) ? Wn(e) || e === Bt(e).scrollingElement ? window : Gt(e) ? e : null : null;
758
+ }
759
+ function Kr(e) {
760
+ return $t(e) ? e.scrollX : e.scrollLeft;
761
+ }
762
+ function Hr(e) {
763
+ return $t(e) ? e.scrollY : e.scrollTop;
764
+ }
765
+ function Kn(e) {
766
+ return {
767
+ x: Kr(e),
768
+ y: Hr(e)
769
+ };
770
+ }
771
+ var ge;
772
+ (function(e) {
773
+ e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
774
+ })(ge || (ge = {}));
775
+ function Ur(e) {
776
+ return !Dn || !e ? !1 : e === document.scrollingElement;
777
+ }
778
+ function Xr(e) {
779
+ const t = {
780
+ x: 0,
781
+ y: 0
782
+ }, n = Ur(e) ? {
783
+ height: window.innerHeight,
784
+ width: window.innerWidth
785
+ } : {
786
+ height: e.clientHeight,
787
+ width: e.clientWidth
788
+ }, o = {
789
+ x: e.scrollWidth - n.width,
790
+ y: e.scrollHeight - n.height
791
+ }, i = e.scrollTop <= t.y, a = e.scrollLeft <= t.x, l = e.scrollTop >= o.y, c = e.scrollLeft >= o.x;
792
+ return {
793
+ isTop: i,
794
+ isLeft: a,
795
+ isBottom: l,
796
+ isRight: c,
797
+ maxScroll: o,
798
+ minScroll: t
799
+ };
800
+ }
801
+ const Zi = {
802
+ x: 0.2,
803
+ y: 0.2
804
+ };
805
+ function es(e, t, n, o, i) {
806
+ let {
807
+ top: a,
808
+ left: l,
809
+ right: c,
810
+ bottom: d
811
+ } = n;
812
+ o === void 0 && (o = 10), i === void 0 && (i = Zi);
813
+ const {
814
+ isTop: u,
815
+ isBottom: h,
816
+ isLeft: g,
817
+ isRight: w
818
+ } = Xr(e), b = {
819
+ x: 0,
820
+ y: 0
821
+ }, A = {
822
+ x: 0,
823
+ y: 0
824
+ }, v = {
825
+ height: t.height * i.y,
826
+ width: t.width * i.x
827
+ };
828
+ return !u && a <= t.top + v.height ? (b.y = ge.Backward, A.y = o * Math.abs((t.top + v.height - a) / v.height)) : !h && d >= t.bottom - v.height && (b.y = ge.Forward, A.y = o * Math.abs((t.bottom - v.height - d) / v.height)), !w && c >= t.right - v.width ? (b.x = ge.Forward, A.x = o * Math.abs((t.right - v.width - c) / v.width)) : !g && l <= t.left + v.width && (b.x = ge.Backward, A.x = o * Math.abs((t.left + v.width - l) / v.width)), {
829
+ direction: b,
830
+ speed: A
831
+ };
832
+ }
833
+ function ts(e) {
834
+ if (e === document.scrollingElement) {
835
+ const {
836
+ innerWidth: a,
837
+ innerHeight: l
838
+ } = window;
839
+ return {
840
+ top: 0,
841
+ left: 0,
842
+ right: a,
843
+ bottom: l,
844
+ width: a,
845
+ height: l
846
+ };
847
+ }
848
+ const {
849
+ top: t,
850
+ left: n,
851
+ right: o,
852
+ bottom: i
853
+ } = e.getBoundingClientRect();
854
+ return {
855
+ top: t,
856
+ left: n,
857
+ right: o,
858
+ bottom: i,
859
+ width: e.clientWidth,
860
+ height: e.clientHeight
861
+ };
862
+ }
863
+ function jr(e) {
864
+ return e.reduce((t, n) => Nt(t, Kn(n)), Je);
865
+ }
866
+ function ns(e) {
867
+ return e.reduce((t, n) => t + Kr(n), 0);
868
+ }
869
+ function rs(e) {
870
+ return e.reduce((t, n) => t + Hr(n), 0);
871
+ }
872
+ function Yr(e, t) {
873
+ if (t === void 0 && (t = zt), !e)
874
+ return;
875
+ const {
876
+ top: n,
877
+ left: o,
878
+ bottom: i,
879
+ right: a
880
+ } = t(e);
881
+ Fr(e) && (i <= 0 || a <= 0 || n >= window.innerHeight || o >= window.innerWidth) && e.scrollIntoView({
882
+ block: "center",
883
+ inline: "center"
884
+ });
885
+ }
886
+ const os = [["x", ["left", "right"], ns], ["y", ["top", "bottom"], rs]];
887
+ class Zn {
888
+ constructor(t, n) {
889
+ 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;
890
+ const o = Qn(n), i = jr(o);
891
+ this.rect = {
892
+ ...t
893
+ }, this.width = t.width, this.height = t.height;
894
+ for (const [a, l, c] of os)
895
+ for (const d of l)
896
+ Object.defineProperty(this, d, {
897
+ get: () => {
898
+ const u = c(o), h = i[a] - u;
899
+ return this.rect[d] + h;
900
+ },
901
+ enumerable: !0
902
+ });
903
+ Object.defineProperty(this, "rect", {
904
+ enumerable: !1
905
+ });
906
+ }
907
+ }
908
+ class Ht {
909
+ constructor(t) {
910
+ this.target = void 0, this.listeners = [], this.removeAll = () => {
911
+ this.listeners.forEach((n) => {
912
+ var o;
913
+ return (o = this.target) == null ? void 0 : o.removeEventListener(...n);
914
+ });
915
+ }, this.target = t;
916
+ }
917
+ add(t, n, o) {
918
+ var i;
919
+ (i = this.target) == null || i.addEventListener(t, n, o), this.listeners.push([t, n, o]);
920
+ }
921
+ }
922
+ function is(e) {
923
+ const {
924
+ EventTarget: t
925
+ } = Se(e);
926
+ return e instanceof t ? e : Bt(e);
927
+ }
928
+ function $n(e, t) {
929
+ const n = Math.abs(e.x), o = Math.abs(e.y);
930
+ return typeof t == "number" ? Math.sqrt(n ** 2 + o ** 2) > t : "x" in t && "y" in t ? n > t.x && o > t.y : "x" in t ? n > t.x : "y" in t ? o > t.y : !1;
931
+ }
932
+ var He;
933
+ (function(e) {
934
+ e.Click = "click", e.DragStart = "dragstart", e.Keydown = "keydown", e.ContextMenu = "contextmenu", e.Resize = "resize", e.SelectionChange = "selectionchange", e.VisibilityChange = "visibilitychange";
935
+ })(He || (He = {}));
936
+ function wr(e) {
937
+ e.preventDefault();
938
+ }
939
+ function ss(e) {
940
+ e.stopPropagation();
941
+ }
942
+ var L;
943
+ (function(e) {
944
+ e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter";
945
+ })(L || (L = {}));
946
+ const kr = {
947
+ start: [L.Space, L.Enter],
948
+ cancel: [L.Esc],
949
+ end: [L.Space, L.Enter]
950
+ }, as = (e, t) => {
951
+ let {
952
+ currentCoordinates: n
953
+ } = t;
954
+ switch (e.code) {
955
+ case L.Right:
956
+ return {
957
+ ...n,
958
+ x: n.x + 25
959
+ };
960
+ case L.Left:
961
+ return {
962
+ ...n,
963
+ x: n.x - 25
964
+ };
965
+ case L.Down:
966
+ return {
967
+ ...n,
968
+ y: n.y + 25
969
+ };
970
+ case L.Up:
971
+ return {
972
+ ...n,
973
+ y: n.y - 25
974
+ };
975
+ }
976
+ };
977
+ class er {
978
+ constructor(t) {
979
+ this.props = void 0, this.autoScrollEnabled = !1, this.referenceCoordinates = void 0, this.listeners = void 0, this.windowListeners = void 0, this.props = t;
980
+ const {
981
+ event: {
982
+ target: n
983
+ }
984
+ } = t;
985
+ this.props = t, this.listeners = new Ht(Bt(n)), this.windowListeners = new Ht(Se(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
986
+ }
987
+ attach() {
988
+ this.handleStart(), this.windowListeners.add(He.Resize, this.handleCancel), this.windowListeners.add(He.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(He.Keydown, this.handleKeyDown));
989
+ }
990
+ handleStart() {
991
+ const {
992
+ activeNode: t,
993
+ onStart: n
994
+ } = this.props, o = t.node.current;
995
+ o && Yr(o), n(Je);
996
+ }
997
+ handleKeyDown(t) {
998
+ if (Rn(t)) {
999
+ const {
1000
+ active: n,
1001
+ context: o,
1002
+ options: i
1003
+ } = this.props, {
1004
+ keyboardCodes: a = kr,
1005
+ coordinateGetter: l = as,
1006
+ scrollBehavior: c = "smooth"
1007
+ } = i, {
1008
+ code: d
1009
+ } = t;
1010
+ if (a.end.includes(d)) {
1011
+ this.handleEnd(t);
1012
+ return;
1013
+ }
1014
+ if (a.cancel.includes(d)) {
1015
+ this.handleCancel(t);
1016
+ return;
1017
+ }
1018
+ const {
1019
+ collisionRect: u
1020
+ } = o.current, h = u ? {
1021
+ x: u.left,
1022
+ y: u.top
1023
+ } : Je;
1024
+ this.referenceCoordinates || (this.referenceCoordinates = h);
1025
+ const g = l(t, {
1026
+ active: n,
1027
+ context: o.current,
1028
+ currentCoordinates: h
1029
+ });
1030
+ if (g) {
1031
+ const w = yn(g, h), b = {
1032
+ x: 0,
1033
+ y: 0
1034
+ }, {
1035
+ scrollableAncestors: A
1036
+ } = o.current;
1037
+ for (const v of A) {
1038
+ const x = t.code, {
1039
+ isTop: S,
1040
+ isRight: E,
1041
+ isLeft: D,
1042
+ isBottom: R,
1043
+ maxScroll: T,
1044
+ minScroll: _
1045
+ } = Xr(v), O = ts(v), M = {
1046
+ x: Math.min(x === L.Right ? O.right - O.width / 2 : O.right, Math.max(x === L.Right ? O.left : O.left + O.width / 2, g.x)),
1047
+ y: Math.min(x === L.Down ? O.bottom - O.height / 2 : O.bottom, Math.max(x === L.Down ? O.top : O.top + O.height / 2, g.y))
1048
+ }, H = x === L.Right && !E || x === L.Left && !D, U = x === L.Down && !R || x === L.Up && !S;
1049
+ if (H && M.x !== g.x) {
1050
+ const B = v.scrollLeft + w.x, re = x === L.Right && B <= T.x || x === L.Left && B >= _.x;
1051
+ if (re && !w.y) {
1052
+ v.scrollTo({
1053
+ left: B,
1054
+ behavior: c
1055
+ });
1056
+ return;
1057
+ }
1058
+ re ? b.x = v.scrollLeft - B : b.x = x === L.Right ? v.scrollLeft - T.x : v.scrollLeft - _.x, b.x && v.scrollBy({
1059
+ left: -b.x,
1060
+ behavior: c
1061
+ });
1062
+ break;
1063
+ } else if (U && M.y !== g.y) {
1064
+ const B = v.scrollTop + w.y, re = x === L.Down && B <= T.y || x === L.Up && B >= _.y;
1065
+ if (re && !w.x) {
1066
+ v.scrollTo({
1067
+ top: B,
1068
+ behavior: c
1069
+ });
1070
+ return;
1071
+ }
1072
+ re ? b.y = v.scrollTop - B : b.y = x === L.Down ? v.scrollTop - T.y : v.scrollTop - _.y, b.y && v.scrollBy({
1073
+ top: -b.y,
1074
+ behavior: c
1075
+ });
1076
+ break;
1077
+ }
1078
+ }
1079
+ this.handleMove(t, Nt(yn(g, this.referenceCoordinates), b));
1080
+ }
1081
+ }
1082
+ }
1083
+ handleMove(t, n) {
1084
+ const {
1085
+ onMove: o
1086
+ } = this.props;
1087
+ t.preventDefault(), o(n);
1088
+ }
1089
+ handleEnd(t) {
1090
+ const {
1091
+ onEnd: n
1092
+ } = this.props;
1093
+ t.preventDefault(), this.detach(), n();
1094
+ }
1095
+ handleCancel(t) {
1096
+ const {
1097
+ onCancel: n
1098
+ } = this.props;
1099
+ t.preventDefault(), this.detach(), n();
1100
+ }
1101
+ detach() {
1102
+ this.listeners.removeAll(), this.windowListeners.removeAll();
1103
+ }
1104
+ }
1105
+ er.activators = [{
1106
+ eventName: "onKeyDown",
1107
+ handler: (e, t, n) => {
1108
+ let {
1109
+ keyboardCodes: o = kr,
1110
+ onActivation: i
1111
+ } = t, {
1112
+ active: a
1113
+ } = n;
1114
+ const {
1115
+ code: l
1116
+ } = e.nativeEvent;
1117
+ if (o.start.includes(l)) {
1118
+ const c = a.activatorNode.current;
1119
+ return c && e.target !== c ? !1 : (e.preventDefault(), i == null || i({
1120
+ event: e.nativeEvent
1121
+ }), !0);
1122
+ }
1123
+ return !1;
1124
+ }
1125
+ }];
1126
+ function xr(e) {
1127
+ return !!(e && "distance" in e);
1128
+ }
1129
+ function Cr(e) {
1130
+ return !!(e && "delay" in e);
1131
+ }
1132
+ class tr {
1133
+ constructor(t, n, o) {
1134
+ var i;
1135
+ o === void 0 && (o = is(t.event.target)), this.props = void 0, this.events = void 0, this.autoScrollEnabled = !0, this.document = void 0, this.activated = !1, this.initialCoordinates = void 0, this.timeoutId = null, this.listeners = void 0, this.documentListeners = void 0, this.windowListeners = void 0, this.props = t, this.events = n;
1136
+ const {
1137
+ event: a
1138
+ } = t, {
1139
+ target: l
1140
+ } = a;
1141
+ this.props = t, this.events = n, this.document = Bt(l), this.documentListeners = new Ht(this.document), this.listeners = new Ht(o), this.windowListeners = new Ht(Se(l)), this.initialCoordinates = (i = mn(a)) != null ? i : Je, 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();
1142
+ }
1143
+ attach() {
1144
+ const {
1145
+ events: t,
1146
+ props: {
1147
+ options: {
1148
+ activationConstraint: n,
1149
+ bypassActivationConstraint: o
1150
+ }
1151
+ }
1152
+ } = this;
1153
+ if (this.listeners.add(t.move.name, this.handleMove, {
1154
+ passive: !1
1155
+ }), this.listeners.add(t.end.name, this.handleEnd), this.windowListeners.add(He.Resize, this.handleCancel), this.windowListeners.add(He.DragStart, wr), this.windowListeners.add(He.VisibilityChange, this.handleCancel), this.windowListeners.add(He.ContextMenu, wr), this.documentListeners.add(He.Keydown, this.handleKeydown), n) {
1156
+ if (o != null && o({
1157
+ event: this.props.event,
1158
+ activeNode: this.props.activeNode,
1159
+ options: this.props.options
1160
+ }))
1161
+ return this.handleStart();
1162
+ if (Cr(n)) {
1163
+ this.timeoutId = setTimeout(this.handleStart, n.delay);
1164
+ return;
1165
+ }
1166
+ if (xr(n))
1167
+ return;
1168
+ }
1169
+ this.handleStart();
1170
+ }
1171
+ detach() {
1172
+ this.listeners.removeAll(), this.windowListeners.removeAll(), setTimeout(this.documentListeners.removeAll, 50), this.timeoutId !== null && (clearTimeout(this.timeoutId), this.timeoutId = null);
1173
+ }
1174
+ handleStart() {
1175
+ const {
1176
+ initialCoordinates: t
1177
+ } = this, {
1178
+ onStart: n
1179
+ } = this.props;
1180
+ t && (this.activated = !0, this.documentListeners.add(He.Click, ss, {
1181
+ capture: !0
1182
+ }), this.removeTextSelection(), this.documentListeners.add(He.SelectionChange, this.removeTextSelection), n(t));
1183
+ }
1184
+ handleMove(t) {
1185
+ var n;
1186
+ const {
1187
+ activated: o,
1188
+ initialCoordinates: i,
1189
+ props: a
1190
+ } = this, {
1191
+ onMove: l,
1192
+ options: {
1193
+ activationConstraint: c
1194
+ }
1195
+ } = a;
1196
+ if (!i)
1197
+ return;
1198
+ const d = (n = mn(t)) != null ? n : Je, u = yn(i, d);
1199
+ if (!o && c) {
1200
+ if (xr(c)) {
1201
+ if (c.tolerance != null && $n(u, c.tolerance))
1202
+ return this.handleCancel();
1203
+ if ($n(u, c.distance))
1204
+ return this.handleStart();
1205
+ }
1206
+ return Cr(c) && $n(u, c.tolerance) ? this.handleCancel() : void 0;
1207
+ }
1208
+ t.cancelable && t.preventDefault(), l(d);
1209
+ }
1210
+ handleEnd() {
1211
+ const {
1212
+ onEnd: t
1213
+ } = this.props;
1214
+ this.detach(), t();
1215
+ }
1216
+ handleCancel() {
1217
+ const {
1218
+ onCancel: t
1219
+ } = this.props;
1220
+ this.detach(), t();
1221
+ }
1222
+ handleKeydown(t) {
1223
+ t.code === L.Esc && this.handleCancel();
1224
+ }
1225
+ removeTextSelection() {
1226
+ var t;
1227
+ (t = this.document.getSelection()) == null || t.removeAllRanges();
1228
+ }
1229
+ }
1230
+ const ls = {
1231
+ move: {
1232
+ name: "pointermove"
1233
+ },
1234
+ end: {
1235
+ name: "pointerup"
1236
+ }
1237
+ };
1238
+ class Gr extends tr {
1239
+ constructor(t) {
1240
+ const {
1241
+ event: n
1242
+ } = t, o = Bt(n.target);
1243
+ super(t, ls, o);
1244
+ }
1245
+ }
1246
+ Gr.activators = [{
1247
+ eventName: "onPointerDown",
1248
+ handler: (e, t) => {
1249
+ let {
1250
+ nativeEvent: n
1251
+ } = e, {
1252
+ onActivation: o
1253
+ } = t;
1254
+ return !n.isPrimary || n.button !== 0 ? !1 : (o == null || o({
1255
+ event: n
1256
+ }), !0);
1257
+ }
1258
+ }];
1259
+ const cs = {
1260
+ move: {
1261
+ name: "mousemove"
1262
+ },
1263
+ end: {
1264
+ name: "mouseup"
1265
+ }
1266
+ };
1267
+ var Hn;
1268
+ (function(e) {
1269
+ e[e.RightClick = 2] = "RightClick";
1270
+ })(Hn || (Hn = {}));
1271
+ class Wr extends tr {
1272
+ constructor(t) {
1273
+ super(t, cs, Bt(t.event.target));
1274
+ }
1275
+ }
1276
+ Wr.activators = [{
1277
+ eventName: "onMouseDown",
1278
+ handler: (e, t) => {
1279
+ let {
1280
+ nativeEvent: n
1281
+ } = e, {
1282
+ onActivation: o
1283
+ } = t;
1284
+ return n.button === Hn.RightClick ? !1 : (o == null || o({
1285
+ event: n
1286
+ }), !0);
1287
+ }
1288
+ }];
1289
+ const Bn = {
1290
+ move: {
1291
+ name: "touchmove"
1292
+ },
1293
+ end: {
1294
+ name: "touchend"
1295
+ }
1296
+ };
1297
+ class qr extends tr {
1298
+ constructor(t) {
1299
+ super(t, Bn);
1300
+ }
1301
+ static setup() {
1302
+ return window.addEventListener(Bn.move.name, t, {
1303
+ capture: !1,
1304
+ passive: !1
1305
+ }), function() {
1306
+ window.removeEventListener(Bn.move.name, t);
1307
+ };
1308
+ function t() {
1309
+ }
1310
+ }
1311
+ }
1312
+ qr.activators = [{
1313
+ eventName: "onTouchStart",
1314
+ handler: (e, t) => {
1315
+ let {
1316
+ nativeEvent: n
1317
+ } = e, {
1318
+ onActivation: o
1319
+ } = t;
1320
+ const {
1321
+ touches: i
1322
+ } = n;
1323
+ return i.length > 1 ? !1 : (o == null || o({
1324
+ event: n
1325
+ }), !0);
1326
+ }
1327
+ }];
1328
+ var Ut;
1329
+ (function(e) {
1330
+ e[e.Pointer = 0] = "Pointer", e[e.DraggableRect = 1] = "DraggableRect";
1331
+ })(Ut || (Ut = {}));
1332
+ var xn;
1333
+ (function(e) {
1334
+ e[e.TreeOrder = 0] = "TreeOrder", e[e.ReversedTreeOrder = 1] = "ReversedTreeOrder";
1335
+ })(xn || (xn = {}));
1336
+ function us(e) {
1337
+ let {
1338
+ acceleration: t,
1339
+ activator: n = Ut.Pointer,
1340
+ canScroll: o,
1341
+ draggingRect: i,
1342
+ enabled: a,
1343
+ interval: l = 5,
1344
+ order: c = xn.TreeOrder,
1345
+ pointerCoordinates: d,
1346
+ scrollableAncestors: u,
1347
+ scrollableAncestorRects: h,
1348
+ delta: g,
1349
+ threshold: w
1350
+ } = e;
1351
+ const b = fs({
1352
+ delta: g,
1353
+ disabled: !a
1354
+ }), [A, v] = Ri(), x = Y({
1355
+ x: 0,
1356
+ y: 0
1357
+ }), S = Y({
1358
+ x: 0,
1359
+ y: 0
1360
+ }), E = j(() => {
1361
+ switch (n) {
1362
+ case Ut.Pointer:
1363
+ return d ? {
1364
+ top: d.y,
1365
+ bottom: d.y,
1366
+ left: d.x,
1367
+ right: d.x
1368
+ } : null;
1369
+ case Ut.DraggableRect:
1370
+ return i;
1371
+ }
1372
+ }, [n, i, d]), D = Y(null), R = be(() => {
1373
+ const _ = D.current;
1374
+ if (!_)
1375
+ return;
1376
+ const O = x.current.x * S.current.x, M = x.current.y * S.current.y;
1377
+ _.scrollBy(O, M);
1378
+ }, []), T = j(() => c === xn.TreeOrder ? [...u].reverse() : u, [c, u]);
1379
+ K(
1380
+ () => {
1381
+ if (!a || !u.length || !E) {
1382
+ v();
1383
+ return;
1384
+ }
1385
+ for (const _ of T) {
1386
+ if ((o == null ? void 0 : o(_)) === !1)
1387
+ continue;
1388
+ const O = u.indexOf(_), M = h[O];
1389
+ if (!M)
1390
+ continue;
1391
+ const {
1392
+ direction: H,
1393
+ speed: U
1394
+ } = es(_, M, E, t, w);
1395
+ for (const B of ["x", "y"])
1396
+ b[B][H[B]] || (U[B] = 0, H[B] = 0);
1397
+ if (U.x > 0 || U.y > 0) {
1398
+ v(), D.current = _, A(R, l), x.current = U, S.current = H;
1399
+ return;
1400
+ }
1401
+ }
1402
+ x.current = {
1403
+ x: 0,
1404
+ y: 0
1405
+ }, S.current = {
1406
+ x: 0,
1407
+ y: 0
1408
+ }, v();
1409
+ },
1410
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1411
+ [
1412
+ t,
1413
+ R,
1414
+ o,
1415
+ v,
1416
+ a,
1417
+ l,
1418
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1419
+ JSON.stringify(E),
1420
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1421
+ JSON.stringify(b),
1422
+ A,
1423
+ u,
1424
+ T,
1425
+ h,
1426
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1427
+ JSON.stringify(w)
1428
+ ]
1429
+ );
1430
+ }
1431
+ const ds = {
1432
+ x: {
1433
+ [ge.Backward]: !1,
1434
+ [ge.Forward]: !1
1435
+ },
1436
+ y: {
1437
+ [ge.Backward]: !1,
1438
+ [ge.Forward]: !1
1439
+ }
1440
+ };
1441
+ function fs(e) {
1442
+ let {
1443
+ delta: t,
1444
+ disabled: n
1445
+ } = e;
1446
+ const o = bn(t);
1447
+ return Wt((i) => {
1448
+ if (n || !o || !i)
1449
+ return ds;
1450
+ const a = {
1451
+ x: Math.sign(t.x - o.x),
1452
+ y: Math.sign(t.y - o.y)
1453
+ };
1454
+ return {
1455
+ x: {
1456
+ [ge.Backward]: i.x[ge.Backward] || a.x === -1,
1457
+ [ge.Forward]: i.x[ge.Forward] || a.x === 1
1458
+ },
1459
+ y: {
1460
+ [ge.Backward]: i.y[ge.Backward] || a.y === -1,
1461
+ [ge.Forward]: i.y[ge.Forward] || a.y === 1
1462
+ }
1463
+ };
1464
+ }, [n, t, o]);
1465
+ }
1466
+ function gs(e, t) {
1467
+ const n = t !== null ? e.get(t) : void 0, o = n ? n.node.current : null;
1468
+ return Wt((i) => {
1469
+ var a;
1470
+ return t === null ? null : (a = o ?? i) != null ? a : null;
1471
+ }, [o, t]);
1472
+ }
1473
+ function hs(e, t) {
1474
+ return j(() => e.reduce((n, o) => {
1475
+ const {
1476
+ sensor: i
1477
+ } = o, a = i.activators.map((l) => ({
1478
+ eventName: l.eventName,
1479
+ handler: t(l.handler, o)
1480
+ }));
1481
+ return [...n, ...a];
1482
+ }, []), [e, t]);
1483
+ }
1484
+ var Lt;
1485
+ (function(e) {
1486
+ e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging";
1487
+ })(Lt || (Lt = {}));
1488
+ var Un;
1489
+ (function(e) {
1490
+ e.Optimized = "optimized";
1491
+ })(Un || (Un = {}));
1492
+ const Dr = /* @__PURE__ */ new Map();
1493
+ function ps(e, t) {
1494
+ let {
1495
+ dragging: n,
1496
+ dependencies: o,
1497
+ config: i
1498
+ } = t;
1499
+ const [a, l] = he(null), {
1500
+ frequency: c,
1501
+ measure: d,
1502
+ strategy: u
1503
+ } = i, h = Y(e), g = x(), w = Yt(g), b = be(function(S) {
1504
+ S === void 0 && (S = []), !w.current && l((E) => E === null ? S : E.concat(S.filter((D) => !E.includes(D))));
1505
+ }, [w]), A = Y(null), v = Wt((S) => {
1506
+ if (g && !n)
1507
+ return Dr;
1508
+ if (!S || S === Dr || h.current !== e || a != null) {
1509
+ const E = /* @__PURE__ */ new Map();
1510
+ for (let D of e) {
1511
+ if (!D)
1512
+ continue;
1513
+ if (a && a.length > 0 && !a.includes(D.id) && D.rect.current) {
1514
+ E.set(D.id, D.rect.current);
1515
+ continue;
1516
+ }
1517
+ const R = D.node.current, T = R ? new Zn(d(R), R) : null;
1518
+ D.rect.current = T, T && E.set(D.id, T);
1519
+ }
1520
+ return E;
1521
+ }
1522
+ return S;
1523
+ }, [e, a, n, g, d]);
1524
+ return K(() => {
1525
+ h.current = e;
1526
+ }, [e]), K(
1527
+ () => {
1528
+ g || b();
1529
+ },
1530
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1531
+ [n, g]
1532
+ ), K(
1533
+ () => {
1534
+ a && a.length > 0 && l(null);
1535
+ },
1536
+ //eslint-disable-next-line react-hooks/exhaustive-deps
1537
+ [JSON.stringify(a)]
1538
+ ), K(
1539
+ () => {
1540
+ g || typeof c != "number" || A.current !== null || (A.current = setTimeout(() => {
1541
+ b(), A.current = null;
1542
+ }, c));
1543
+ },
1544
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1545
+ [c, g, b, ...o]
1546
+ ), {
1547
+ droppableRects: v,
1548
+ measureDroppableContainers: b,
1549
+ measuringScheduled: a != null
1550
+ };
1551
+ function x() {
1552
+ switch (u) {
1553
+ case Lt.Always:
1554
+ return !1;
1555
+ case Lt.BeforeDragging:
1556
+ return n;
1557
+ default:
1558
+ return !n;
1559
+ }
1560
+ }
1561
+ }
1562
+ function nr(e, t) {
1563
+ return Wt((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
1564
+ }
1565
+ function vs(e, t) {
1566
+ return nr(e, t);
1567
+ }
1568
+ function bs(e) {
1569
+ let {
1570
+ callback: t,
1571
+ disabled: n
1572
+ } = e;
1573
+ const o = Sn(t), i = j(() => {
1574
+ if (n || typeof window > "u" || typeof window.MutationObserver > "u")
1575
+ return;
1576
+ const {
1577
+ MutationObserver: a
1578
+ } = window;
1579
+ return new a(o);
1580
+ }, [o, n]);
1581
+ return K(() => () => i == null ? void 0 : i.disconnect(), [i]), i;
1582
+ }
1583
+ function An(e) {
1584
+ let {
1585
+ callback: t,
1586
+ disabled: n
1587
+ } = e;
1588
+ const o = Sn(t), i = j(
1589
+ () => {
1590
+ if (n || typeof window > "u" || typeof window.ResizeObserver > "u")
1591
+ return;
1592
+ const {
1593
+ ResizeObserver: a
1594
+ } = window;
1595
+ return new a(o);
1596
+ },
1597
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1598
+ [n]
1599
+ );
1600
+ return K(() => () => i == null ? void 0 : i.disconnect(), [i]), i;
1601
+ }
1602
+ function ys(e) {
1603
+ return new Zn(zt(e), e);
1604
+ }
1605
+ function Sr(e, t, n) {
1606
+ t === void 0 && (t = ys);
1607
+ const [o, i] = Yn(c, null), a = bs({
1608
+ callback(d) {
1609
+ if (e)
1610
+ for (const u of d) {
1611
+ const {
1612
+ type: h,
1613
+ target: g
1614
+ } = u;
1615
+ if (h === "childList" && g instanceof HTMLElement && g.contains(e)) {
1616
+ i();
1617
+ break;
1618
+ }
1619
+ }
1620
+ }
1621
+ }), l = An({
1622
+ callback: i
1623
+ });
1624
+ return Ue(() => {
1625
+ i(), e ? (l == null || l.observe(e), a == null || a.observe(document.body, {
1626
+ childList: !0,
1627
+ subtree: !0
1628
+ })) : (l == null || l.disconnect(), a == null || a.disconnect());
1629
+ }, [e]), o;
1630
+ function c(d) {
1631
+ if (!e)
1632
+ return null;
1633
+ if (e.isConnected === !1) {
1634
+ var u;
1635
+ return (u = d ?? n) != null ? u : null;
1636
+ }
1637
+ const h = t(e);
1638
+ return JSON.stringify(d) === JSON.stringify(h) ? d : h;
1639
+ }
1640
+ }
1641
+ function ms(e) {
1642
+ const t = nr(e);
1643
+ return Br(e, t);
1644
+ }
1645
+ const Rr = [];
1646
+ function ws(e) {
1647
+ const t = Y(e), n = Wt((o) => e ? o && o !== Rr && e && t.current && e.parentNode === t.current.parentNode ? o : Qn(e) : Rr, [e]);
1648
+ return K(() => {
1649
+ t.current = e;
1650
+ }, [e]), n;
1651
+ }
1652
+ function xs(e) {
1653
+ const [t, n] = he(null), o = Y(e), i = be((a) => {
1654
+ const l = Pn(a.target);
1655
+ l && n((c) => c ? (c.set(l, Kn(l)), new Map(c)) : null);
1656
+ }, []);
1657
+ return K(() => {
1658
+ const a = o.current;
1659
+ if (e !== a) {
1660
+ l(a);
1661
+ const c = e.map((d) => {
1662
+ const u = Pn(d);
1663
+ return u ? (u.addEventListener("scroll", i, {
1664
+ passive: !0
1665
+ }), [u, Kn(u)]) : null;
1666
+ }).filter((d) => d != null);
1667
+ n(c.length ? new Map(c) : null), o.current = e;
1668
+ }
1669
+ return () => {
1670
+ l(e), l(a);
1671
+ };
1672
+ function l(c) {
1673
+ c.forEach((d) => {
1674
+ const u = Pn(d);
1675
+ u == null || u.removeEventListener("scroll", i);
1676
+ });
1677
+ }
1678
+ }, [i, e]), j(() => e.length ? t ? Array.from(t.values()).reduce((a, l) => Nt(a, l), Je) : jr(e) : Je, [e, t]);
1679
+ }
1680
+ function Ar(e, t) {
1681
+ t === void 0 && (t = []);
1682
+ const n = Y(null);
1683
+ return K(
1684
+ () => {
1685
+ n.current = null;
1686
+ },
1687
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1688
+ t
1689
+ ), K(() => {
1690
+ const o = e !== Je;
1691
+ o && !n.current && (n.current = e), !o && n.current && (n.current = null);
1692
+ }, [e]), n.current ? yn(e, n.current) : Je;
1693
+ }
1694
+ function Cs(e) {
1695
+ K(
1696
+ () => {
1697
+ if (!Dn)
1698
+ return;
1699
+ const t = e.map((n) => {
1700
+ let {
1701
+ sensor: o
1702
+ } = n;
1703
+ return o.setup == null ? void 0 : o.setup();
1704
+ });
1705
+ return () => {
1706
+ for (const n of t)
1707
+ n == null || n();
1708
+ };
1709
+ },
1710
+ // TO-DO: Sensors length could theoretically change which would not be a valid dependency
1711
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1712
+ e.map((t) => {
1713
+ let {
1714
+ sensor: n
1715
+ } = t;
1716
+ return n;
1717
+ })
1718
+ );
1719
+ }
1720
+ function Ds(e, t) {
1721
+ return j(() => e.reduce((n, o) => {
1722
+ let {
1723
+ eventName: i,
1724
+ handler: a
1725
+ } = o;
1726
+ return n[i] = (l) => {
1727
+ a(l, t);
1728
+ }, n;
1729
+ }, {}), [e, t]);
1730
+ }
1731
+ function Jr(e) {
1732
+ return j(() => e ? Ji(e) : null, [e]);
1733
+ }
1734
+ const zn = [];
1735
+ function Ss(e, t) {
1736
+ t === void 0 && (t = zt);
1737
+ const [n] = e, o = Jr(n ? Se(n) : null), [i, a] = Yn(c, zn), l = An({
1738
+ callback: a
1739
+ });
1740
+ return e.length > 0 && i === zn && a(), Ue(() => {
1741
+ e.length ? e.forEach((d) => l == null ? void 0 : l.observe(d)) : (l == null || l.disconnect(), a());
1742
+ }, [e]), i;
1743
+ function c() {
1744
+ return e.length ? e.map((d) => Ur(d) ? o : new Zn(t(d), d)) : zn;
1745
+ }
1746
+ }
1747
+ function Vr(e) {
1748
+ if (!e)
1749
+ return null;
1750
+ if (e.children.length > 1)
1751
+ return e;
1752
+ const t = e.children[0];
1753
+ return Gt(t) ? t : e;
1754
+ }
1755
+ function Rs(e) {
1756
+ let {
1757
+ measure: t
1758
+ } = e;
1759
+ const [n, o] = he(null), i = be((u) => {
1760
+ for (const {
1761
+ target: h
1762
+ } of u)
1763
+ if (Gt(h)) {
1764
+ o((g) => {
1765
+ const w = t(h);
1766
+ return g ? {
1767
+ ...g,
1768
+ width: w.width,
1769
+ height: w.height
1770
+ } : w;
1771
+ });
1772
+ break;
1773
+ }
1774
+ }, [t]), a = An({
1775
+ callback: i
1776
+ }), l = be((u) => {
1777
+ const h = Vr(u);
1778
+ a == null || a.disconnect(), h && (a == null || a.observe(h)), o(h ? t(h) : null);
1779
+ }, [t, a]), [c, d] = vn(l);
1780
+ return j(() => ({
1781
+ nodeRef: c,
1782
+ rect: n,
1783
+ setRef: d
1784
+ }), [n, c, d]);
1785
+ }
1786
+ const As = [{
1787
+ sensor: Gr,
1788
+ options: {}
1789
+ }, {
1790
+ sensor: er,
1791
+ options: {}
1792
+ }], Es = {
1793
+ current: {}
1794
+ }, hn = {
1795
+ draggable: {
1796
+ measure: mr
1797
+ },
1798
+ droppable: {
1799
+ measure: mr,
1800
+ strategy: Lt.WhileDragging,
1801
+ frequency: Un.Optimized
1802
+ },
1803
+ dragOverlay: {
1804
+ measure: zt
1805
+ }
1806
+ };
1807
+ class Xt extends Map {
1808
+ get(t) {
1809
+ var n;
1810
+ return t != null && (n = super.get(t)) != null ? n : void 0;
1811
+ }
1812
+ toArray() {
1813
+ return Array.from(this.values());
1814
+ }
1815
+ getEnabled() {
1816
+ return this.toArray().filter((t) => {
1817
+ let {
1818
+ disabled: n
1819
+ } = t;
1820
+ return !n;
1821
+ });
1822
+ }
1823
+ getNodeFor(t) {
1824
+ var n, o;
1825
+ return (n = (o = this.get(t)) == null ? void 0 : o.node.current) != null ? n : void 0;
1826
+ }
1827
+ }
1828
+ const _s = {
1829
+ activatorEvent: null,
1830
+ active: null,
1831
+ activeNode: null,
1832
+ activeNodeRect: null,
1833
+ collisions: null,
1834
+ containerNodeRect: null,
1835
+ draggableNodes: /* @__PURE__ */ new Map(),
1836
+ droppableRects: /* @__PURE__ */ new Map(),
1837
+ droppableContainers: /* @__PURE__ */ new Xt(),
1838
+ over: null,
1839
+ dragOverlay: {
1840
+ nodeRef: {
1841
+ current: null
1842
+ },
1843
+ rect: null,
1844
+ setRef: wn
1845
+ },
1846
+ scrollableAncestors: [],
1847
+ scrollableAncestorRects: [],
1848
+ measuringConfiguration: hn,
1849
+ measureDroppableContainers: wn,
1850
+ windowRect: null,
1851
+ measuringScheduled: !1
1852
+ }, Qr = {
1853
+ activatorEvent: null,
1854
+ activators: [],
1855
+ active: null,
1856
+ activeNodeRect: null,
1857
+ ariaDescribedById: {
1858
+ draggable: ""
1859
+ },
1860
+ dispatch: wn,
1861
+ draggableNodes: /* @__PURE__ */ new Map(),
1862
+ over: null,
1863
+ measureDroppableContainers: wn
1864
+ }, Jt = /* @__PURE__ */ kt(Qr), Zr = /* @__PURE__ */ kt(_s);
1865
+ function Is() {
1866
+ return {
1867
+ draggable: {
1868
+ active: null,
1869
+ initialCoordinates: {
1870
+ x: 0,
1871
+ y: 0
1872
+ },
1873
+ nodes: /* @__PURE__ */ new Map(),
1874
+ translate: {
1875
+ x: 0,
1876
+ y: 0
1877
+ }
1878
+ },
1879
+ droppable: {
1880
+ containers: new Xt()
1881
+ }
1882
+ };
1883
+ }
1884
+ function Os(e, t) {
1885
+ switch (t.type) {
1886
+ case le.DragStart:
1887
+ return {
1888
+ ...e,
1889
+ draggable: {
1890
+ ...e.draggable,
1891
+ initialCoordinates: t.initialCoordinates,
1892
+ active: t.active
1893
+ }
1894
+ };
1895
+ case le.DragMove:
1896
+ return e.draggable.active ? {
1897
+ ...e,
1898
+ draggable: {
1899
+ ...e.draggable,
1900
+ translate: {
1901
+ x: t.coordinates.x - e.draggable.initialCoordinates.x,
1902
+ y: t.coordinates.y - e.draggable.initialCoordinates.y
1903
+ }
1904
+ }
1905
+ } : e;
1906
+ case le.DragEnd:
1907
+ case le.DragCancel:
1908
+ return {
1909
+ ...e,
1910
+ draggable: {
1911
+ ...e.draggable,
1912
+ active: null,
1913
+ initialCoordinates: {
1914
+ x: 0,
1915
+ y: 0
1916
+ },
1917
+ translate: {
1918
+ x: 0,
1919
+ y: 0
1920
+ }
1921
+ }
1922
+ };
1923
+ case le.RegisterDroppable: {
1924
+ const {
1925
+ element: n
1926
+ } = t, {
1927
+ id: o
1928
+ } = n, i = new Xt(e.droppable.containers);
1929
+ return i.set(o, n), {
1930
+ ...e,
1931
+ droppable: {
1932
+ ...e.droppable,
1933
+ containers: i
1934
+ }
1935
+ };
1936
+ }
1937
+ case le.SetDroppableDisabled: {
1938
+ const {
1939
+ id: n,
1940
+ key: o,
1941
+ disabled: i
1942
+ } = t, a = e.droppable.containers.get(n);
1943
+ if (!a || o !== a.key)
1944
+ return e;
1945
+ const l = new Xt(e.droppable.containers);
1946
+ return l.set(n, {
1947
+ ...a,
1948
+ disabled: i
1949
+ }), {
1950
+ ...e,
1951
+ droppable: {
1952
+ ...e.droppable,
1953
+ containers: l
1954
+ }
1955
+ };
1956
+ }
1957
+ case le.UnregisterDroppable: {
1958
+ const {
1959
+ id: n,
1960
+ key: o
1961
+ } = t, i = e.droppable.containers.get(n);
1962
+ if (!i || o !== i.key)
1963
+ return e;
1964
+ const a = new Xt(e.droppable.containers);
1965
+ return a.delete(n), {
1966
+ ...e,
1967
+ droppable: {
1968
+ ...e.droppable,
1969
+ containers: a
1970
+ }
1971
+ };
1972
+ }
1973
+ default:
1974
+ return e;
1975
+ }
1976
+ }
1977
+ function Ts(e) {
1978
+ let {
1979
+ disabled: t
1980
+ } = e;
1981
+ const {
1982
+ active: n,
1983
+ activatorEvent: o,
1984
+ draggableNodes: i
1985
+ } = vt(Jt), a = bn(o), l = bn(n == null ? void 0 : n.id);
1986
+ return K(() => {
1987
+ if (!t && !o && a && l != null) {
1988
+ if (!Rn(a) || document.activeElement === a.target)
1989
+ return;
1990
+ const c = i.get(l);
1991
+ if (!c)
1992
+ return;
1993
+ const {
1994
+ activatorNode: d,
1995
+ node: u
1996
+ } = c;
1997
+ if (!d.current && !u.current)
1998
+ return;
1999
+ requestAnimationFrame(() => {
2000
+ for (const h of [d.current, u.current]) {
2001
+ if (!h)
2002
+ continue;
2003
+ const g = _i(h);
2004
+ if (g) {
2005
+ g.focus();
2006
+ break;
2007
+ }
2008
+ }
2009
+ });
2010
+ }
2011
+ }, [o, t, i, l, a]), null;
2012
+ }
2013
+ function eo(e, t) {
2014
+ let {
2015
+ transform: n,
2016
+ ...o
2017
+ } = t;
2018
+ return e != null && e.length ? e.reduce((i, a) => a({
2019
+ transform: i,
2020
+ ...o
2021
+ }), n) : n;
2022
+ }
2023
+ function Ns(e) {
2024
+ return j(
2025
+ () => ({
2026
+ draggable: {
2027
+ ...hn.draggable,
2028
+ ...e == null ? void 0 : e.draggable
2029
+ },
2030
+ droppable: {
2031
+ ...hn.droppable,
2032
+ ...e == null ? void 0 : e.droppable
2033
+ },
2034
+ dragOverlay: {
2035
+ ...hn.dragOverlay,
2036
+ ...e == null ? void 0 : e.dragOverlay
2037
+ }
2038
+ }),
2039
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2040
+ [e == null ? void 0 : e.draggable, e == null ? void 0 : e.droppable, e == null ? void 0 : e.dragOverlay]
2041
+ );
2042
+ }
2043
+ function Ms(e) {
2044
+ let {
2045
+ activeNode: t,
2046
+ measure: n,
2047
+ initialRect: o,
2048
+ config: i = !0
2049
+ } = e;
2050
+ const a = Y(!1), {
2051
+ x: l,
2052
+ y: c
2053
+ } = typeof i == "boolean" ? {
2054
+ x: i,
2055
+ y: i
2056
+ } : i;
2057
+ Ue(() => {
2058
+ if (!l && !c || !t) {
2059
+ a.current = !1;
2060
+ return;
2061
+ }
2062
+ if (a.current || !o)
2063
+ return;
2064
+ const u = t == null ? void 0 : t.node.current;
2065
+ if (!u || u.isConnected === !1)
2066
+ return;
2067
+ const h = n(u), g = Br(h, o);
2068
+ if (l || (g.x = 0), c || (g.y = 0), a.current = !0, Math.abs(g.x) > 0 || Math.abs(g.y) > 0) {
2069
+ const w = Fr(u);
2070
+ w && w.scrollBy({
2071
+ top: g.y,
2072
+ left: g.x
2073
+ });
2074
+ }
2075
+ }, [t, l, c, o, n]);
2076
+ }
2077
+ const En = /* @__PURE__ */ kt({
2078
+ ...Je,
2079
+ scaleX: 1,
2080
+ scaleY: 1
2081
+ });
2082
+ var pt;
2083
+ (function(e) {
2084
+ e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
2085
+ })(pt || (pt = {}));
2086
+ const Ls = /* @__PURE__ */ pi(function(t) {
2087
+ var n, o, i, a;
2088
+ let {
2089
+ id: l,
2090
+ accessibility: c,
2091
+ autoScroll: d = !0,
2092
+ children: u,
2093
+ sensors: h = As,
2094
+ collisionDetection: g = $r,
2095
+ measuring: w,
2096
+ modifiers: b,
2097
+ ...A
2098
+ } = t;
2099
+ const v = Yn(Os, void 0, Is), [x, S] = v, [E, D] = Li(), [R, T] = he(pt.Uninitialized), _ = R === pt.Initialized, {
2100
+ draggable: {
2101
+ active: O,
2102
+ nodes: M,
2103
+ translate: H
2104
+ },
2105
+ droppable: {
2106
+ containers: U
2107
+ }
2108
+ } = x, B = O ? M.get(O) : null, re = Y({
2109
+ initial: null,
2110
+ translated: null
2111
+ }), Q = j(() => {
2112
+ var X;
2113
+ return O != null ? {
2114
+ id: O,
2115
+ // It's possible for the active node to unmount while dragging
2116
+ data: (X = B == null ? void 0 : B.data) != null ? X : Es,
2117
+ rect: re
2118
+ } : null;
2119
+ }, [O, B]), Re = Y(null), [Xe, F] = he(null), [J, Le] = he(null), Oe = Yt(A, Object.values(A)), ce = qt("DndDescribedBy", l), Pe = j(() => U.getEnabled(), [U]), V = Ns(w), {
2120
+ droppableRects: we,
2121
+ measureDroppableContainers: je,
2122
+ measuringScheduled: tt
2123
+ } = ps(Pe, {
2124
+ dragging: _,
2125
+ dependencies: [H.x, H.y],
2126
+ config: V.droppable
2127
+ }), Z = gs(M, O), nt = j(() => J ? mn(J) : null, [J]), $e = Qt(), ue = vs(Z, V.draggable.measure);
2128
+ Ms({
2129
+ activeNode: O ? M.get(O) : null,
2130
+ config: $e.layoutShiftCompensation,
2131
+ initialRect: ue,
2132
+ measure: V.draggable.measure
2133
+ });
2134
+ const $ = Sr(Z, V.draggable.measure, ue), rt = Sr(Z ? Z.parentElement : null), Ae = Y({
2135
+ activatorEvent: null,
2136
+ active: null,
2137
+ activeNode: Z,
2138
+ collisionRect: null,
2139
+ collisions: null,
2140
+ droppableRects: we,
2141
+ draggableNodes: M,
2142
+ draggingNode: null,
2143
+ draggingNodeRect: null,
2144
+ droppableContainers: U,
2145
+ over: null,
2146
+ scrollableAncestors: [],
2147
+ scrollAdjustedTranslate: null
2148
+ }), Ve = U.getNodeFor((n = Ae.current.over) == null ? void 0 : n.id), P = Rs({
2149
+ measure: V.dragOverlay.measure
2150
+ }), Qe = (o = P.nodeRef.current) != null ? o : Z, Ye = _ ? (i = P.rect) != null ? i : $ : null, yt = !!(P.nodeRef.current && P.rect), Ee = ms(yt ? null : $), Ze = Jr(Qe ? Se(Qe) : null), p = ws(_ ? Ve ?? Z : null), m = Ss(p), N = eo(b, {
2151
+ transform: {
2152
+ x: H.x - Ee.x,
2153
+ y: H.y - Ee.y,
2154
+ scaleX: 1,
2155
+ scaleY: 1
2156
+ },
2157
+ activatorEvent: J,
2158
+ active: Q,
2159
+ activeNodeRect: $,
2160
+ containerNodeRect: rt,
2161
+ draggingNodeRect: Ye,
2162
+ over: Ae.current.over,
2163
+ overlayNodeRect: P.rect,
2164
+ scrollableAncestors: p,
2165
+ scrollableAncestorRects: m,
2166
+ windowRect: Ze
2167
+ }), q = nt ? Nt(nt, H) : null, G = xs(p), de = Ar(G), ee = Ar(G, [$]), oe = Nt(N, de), pe = Ye ? Gi(Ye, N) : null, ye = Q && pe ? g({
2168
+ active: Q,
2169
+ collisionRect: pe,
2170
+ droppableRects: we,
2171
+ droppableContainers: Pe,
2172
+ pointerCoordinates: q
2173
+ }) : null, ot = Vn(ye, "id"), [te, Te] = he(null), mt = yt ? N : Nt(N, ee), ie = Yi(mt, (a = te == null ? void 0 : te.rect) != null ? a : null, $), fe = be(
2174
+ (X, ne) => {
2175
+ let {
2176
+ sensor: xe,
2177
+ options: ke
2178
+ } = ne;
2179
+ if (Re.current == null)
2180
+ return;
2181
+ const Ce = M.get(Re.current);
2182
+ if (!Ce)
2183
+ return;
2184
+ const Ne = X.nativeEvent, ze = new xe({
2185
+ active: Re.current,
2186
+ activeNode: Ce,
2187
+ event: Ne,
2188
+ options: ke,
2189
+ // Sensors need to be instantiated with refs for arguments that change over time
2190
+ // otherwise they are frozen in time with the stale arguments
2191
+ context: Ae,
2192
+ onStart(Me) {
2193
+ const it = Re.current;
2194
+ if (it == null)
2195
+ return;
2196
+ const Ge = M.get(it);
2197
+ if (!Ge)
2198
+ return;
2199
+ const {
2200
+ onDragStart: dt
2201
+ } = Oe.current, ft = {
2202
+ active: {
2203
+ id: it,
2204
+ data: Ge.data,
2205
+ rect: re
2206
+ }
2207
+ };
2208
+ At.unstable_batchedUpdates(() => {
2209
+ dt == null || dt(ft), T(pt.Initializing), S({
2210
+ type: le.DragStart,
2211
+ initialCoordinates: Me,
2212
+ active: it
2213
+ }), E({
2214
+ type: "onDragStart",
2215
+ event: ft
2216
+ });
2217
+ });
2218
+ },
2219
+ onMove(Me) {
2220
+ S({
2221
+ type: le.DragMove,
2222
+ coordinates: Me
2223
+ });
2224
+ },
2225
+ onEnd: ut(le.DragEnd),
2226
+ onCancel: ut(le.DragCancel)
2227
+ });
2228
+ At.unstable_batchedUpdates(() => {
2229
+ F(ze), Le(X.nativeEvent);
2230
+ });
2231
+ function ut(Me) {
2232
+ return async function() {
2233
+ const {
2234
+ active: Ge,
2235
+ collisions: dt,
2236
+ over: ft,
2237
+ scrollAdjustedTranslate: Et
2238
+ } = Ae.current;
2239
+ let We = null;
2240
+ if (Ge && Et) {
2241
+ const {
2242
+ cancelDrop: wt
2243
+ } = Oe.current;
2244
+ We = {
2245
+ activatorEvent: Ne,
2246
+ active: Ge,
2247
+ collisions: dt,
2248
+ delta: Et,
2249
+ over: ft
2250
+ }, Me === le.DragEnd && typeof wt == "function" && await Promise.resolve(wt(We)) && (Me = le.DragCancel);
2251
+ }
2252
+ Re.current = null, At.unstable_batchedUpdates(() => {
2253
+ S({
2254
+ type: Me
2255
+ }), T(pt.Uninitialized), Te(null), F(null), Le(null);
2256
+ const wt = Me === le.DragEnd ? "onDragEnd" : "onDragCancel";
2257
+ if (We) {
2258
+ const Kt = Oe.current[wt];
2259
+ Kt == null || Kt(We), E({
2260
+ type: wt,
2261
+ event: We
2262
+ });
2263
+ }
2264
+ });
2265
+ };
2266
+ }
2267
+ },
2268
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2269
+ [M]
2270
+ ), Be = be((X, ne) => (xe, ke) => {
2271
+ const Ce = xe.nativeEvent, Ne = M.get(ke);
2272
+ if (
2273
+ // Another sensor is already instantiating
2274
+ Re.current !== null || // No active draggable
2275
+ !Ne || // Event has already been captured
2276
+ Ce.dndKit || Ce.defaultPrevented
2277
+ )
2278
+ return;
2279
+ const ze = {
2280
+ active: Ne
2281
+ };
2282
+ X(xe, ne.options, ze) === !0 && (Ce.dndKit = {
2283
+ capturedBy: ne.sensor
2284
+ }, Re.current = ke, fe(xe, ne));
2285
+ }, [M, fe]), et = hs(h, Be);
2286
+ Cs(h), Ue(() => {
2287
+ $ && R === pt.Initializing && T(pt.Initialized);
2288
+ }, [$, R]), K(
2289
+ () => {
2290
+ const {
2291
+ onDragMove: X
2292
+ } = Oe.current, {
2293
+ active: ne,
2294
+ activatorEvent: xe,
2295
+ collisions: ke,
2296
+ over: Ce
2297
+ } = Ae.current;
2298
+ if (!ne || !xe)
2299
+ return;
2300
+ const Ne = {
2301
+ active: ne,
2302
+ activatorEvent: xe,
2303
+ collisions: ke,
2304
+ delta: {
2305
+ x: oe.x,
2306
+ y: oe.y
2307
+ },
2308
+ over: Ce
2309
+ };
2310
+ At.unstable_batchedUpdates(() => {
2311
+ X == null || X(Ne), E({
2312
+ type: "onDragMove",
2313
+ event: Ne
2314
+ });
2315
+ });
2316
+ },
2317
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2318
+ [oe.x, oe.y]
2319
+ ), K(
2320
+ () => {
2321
+ const {
2322
+ active: X,
2323
+ activatorEvent: ne,
2324
+ collisions: xe,
2325
+ droppableContainers: ke,
2326
+ scrollAdjustedTranslate: Ce
2327
+ } = Ae.current;
2328
+ if (!X || Re.current == null || !ne || !Ce)
2329
+ return;
2330
+ const {
2331
+ onDragOver: Ne
2332
+ } = Oe.current, ze = ke.get(ot), ut = ze && ze.rect.current ? {
2333
+ id: ze.id,
2334
+ rect: ze.rect.current,
2335
+ data: ze.data,
2336
+ disabled: ze.disabled
2337
+ } : null, Me = {
2338
+ active: X,
2339
+ activatorEvent: ne,
2340
+ collisions: xe,
2341
+ delta: {
2342
+ x: Ce.x,
2343
+ y: Ce.y
2344
+ },
2345
+ over: ut
2346
+ };
2347
+ At.unstable_batchedUpdates(() => {
2348
+ Te(ut), Ne == null || Ne(Me), E({
2349
+ type: "onDragOver",
2350
+ event: Me
2351
+ });
2352
+ });
2353
+ },
2354
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2355
+ [ot]
2356
+ ), Ue(() => {
2357
+ Ae.current = {
2358
+ activatorEvent: J,
2359
+ active: Q,
2360
+ activeNode: Z,
2361
+ collisionRect: pe,
2362
+ collisions: ye,
2363
+ droppableRects: we,
2364
+ draggableNodes: M,
2365
+ draggingNode: Qe,
2366
+ draggingNodeRect: Ye,
2367
+ droppableContainers: U,
2368
+ over: te,
2369
+ scrollableAncestors: p,
2370
+ scrollAdjustedTranslate: oe
2371
+ }, re.current = {
2372
+ initial: Ye,
2373
+ translated: pe
2374
+ };
2375
+ }, [Q, Z, ye, pe, M, Qe, Ye, we, U, te, p, oe]), us({
2376
+ ...$e,
2377
+ delta: H,
2378
+ draggingRect: pe,
2379
+ pointerCoordinates: q,
2380
+ scrollableAncestors: p,
2381
+ scrollableAncestorRects: m
2382
+ });
2383
+ const Ft = j(() => ({
2384
+ active: Q,
2385
+ activeNode: Z,
2386
+ activeNodeRect: $,
2387
+ activatorEvent: J,
2388
+ collisions: ye,
2389
+ containerNodeRect: rt,
2390
+ dragOverlay: P,
2391
+ draggableNodes: M,
2392
+ droppableContainers: U,
2393
+ droppableRects: we,
2394
+ over: te,
2395
+ measureDroppableContainers: je,
2396
+ scrollableAncestors: p,
2397
+ scrollableAncestorRects: m,
2398
+ measuringConfiguration: V,
2399
+ measuringScheduled: tt,
2400
+ windowRect: Ze
2401
+ }), [Q, Z, $, J, ye, rt, P, M, U, we, te, je, p, m, V, tt, Ze]), Vt = j(() => ({
2402
+ activatorEvent: J,
2403
+ activators: et,
2404
+ active: Q,
2405
+ activeNodeRect: $,
2406
+ ariaDescribedById: {
2407
+ draggable: ce
2408
+ },
2409
+ dispatch: S,
2410
+ draggableNodes: M,
2411
+ over: te,
2412
+ measureDroppableContainers: je
2413
+ }), [J, et, Q, $, S, ce, M, te, je]);
2414
+ return k.createElement(Pr.Provider, {
2415
+ value: D
2416
+ }, k.createElement(Jt.Provider, {
2417
+ value: Vt
2418
+ }, k.createElement(Zr.Provider, {
2419
+ value: Ft
2420
+ }, k.createElement(En.Provider, {
2421
+ value: ie
2422
+ }, u)), k.createElement(Ts, {
2423
+ disabled: (c == null ? void 0 : c.restoreFocus) === !1
2424
+ })), k.createElement(Bi, {
2425
+ ...c,
2426
+ hiddenTextDescribedById: ce
2427
+ }));
2428
+ function Qt() {
2429
+ const X = (Xe == null ? void 0 : Xe.autoScrollEnabled) === !1, ne = typeof d == "object" ? d.enabled === !1 : d === !1, xe = _ && !X && !ne;
2430
+ return typeof d == "object" ? {
2431
+ ...d,
2432
+ enabled: xe
2433
+ } : {
2434
+ enabled: xe
2435
+ };
2436
+ }
2437
+ }), Ps = /* @__PURE__ */ kt(null), Er = "button", $s = "Droppable";
2438
+ function Bs(e) {
2439
+ let {
2440
+ id: t,
2441
+ data: n,
2442
+ disabled: o = !1,
2443
+ attributes: i
2444
+ } = e;
2445
+ const a = qt($s), {
2446
+ activators: l,
2447
+ activatorEvent: c,
2448
+ active: d,
2449
+ activeNodeRect: u,
2450
+ ariaDescribedById: h,
2451
+ draggableNodes: g,
2452
+ over: w
2453
+ } = vt(Jt), {
2454
+ role: b = Er,
2455
+ roleDescription: A = "draggable",
2456
+ tabIndex: v = 0
2457
+ } = i ?? {}, x = (d == null ? void 0 : d.id) === t, S = vt(x ? En : Ps), [E, D] = vn(), [R, T] = vn(), _ = Ds(l, t), O = Yt(n);
2458
+ Ue(
2459
+ () => (g.set(t, {
2460
+ id: t,
2461
+ key: a,
2462
+ node: E,
2463
+ activatorNode: R,
2464
+ data: O
2465
+ }), () => {
2466
+ const H = g.get(t);
2467
+ H && H.key === a && g.delete(t);
2468
+ }),
2469
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2470
+ [g, t]
2471
+ );
2472
+ const M = j(() => ({
2473
+ role: b,
2474
+ tabIndex: v,
2475
+ "aria-disabled": o,
2476
+ "aria-pressed": x && b === Er ? !0 : void 0,
2477
+ "aria-roledescription": A,
2478
+ "aria-describedby": h.draggable
2479
+ }), [o, b, v, x, A, h.draggable]);
2480
+ return {
2481
+ active: d,
2482
+ activatorEvent: c,
2483
+ activeNodeRect: u,
2484
+ attributes: M,
2485
+ isDragging: x,
2486
+ listeners: o ? void 0 : _,
2487
+ node: E,
2488
+ over: w,
2489
+ setNodeRef: D,
2490
+ setActivatorNodeRef: T,
2491
+ transform: S
2492
+ };
2493
+ }
2494
+ function to() {
2495
+ return vt(Zr);
2496
+ }
2497
+ const zs = "Droppable", Fs = {
2498
+ timeout: 25
2499
+ };
2500
+ function Ks(e) {
2501
+ let {
2502
+ data: t,
2503
+ disabled: n = !1,
2504
+ id: o,
2505
+ resizeObserverConfig: i
2506
+ } = e;
2507
+ const a = qt(zs), {
2508
+ active: l,
2509
+ dispatch: c,
2510
+ over: d,
2511
+ measureDroppableContainers: u
2512
+ } = vt(Jt), h = Y({
2513
+ disabled: n
2514
+ }), g = Y(!1), w = Y(null), b = Y(null), {
2515
+ disabled: A,
2516
+ updateMeasurementsFor: v,
2517
+ timeout: x
2518
+ } = {
2519
+ ...Fs,
2520
+ ...i
2521
+ }, S = Yt(v ?? o), E = be(
2522
+ () => {
2523
+ if (!g.current) {
2524
+ g.current = !0;
2525
+ return;
2526
+ }
2527
+ b.current != null && clearTimeout(b.current), b.current = setTimeout(() => {
2528
+ u(Array.isArray(S.current) ? S.current : [S.current]), b.current = null;
2529
+ }, x);
2530
+ },
2531
+ //eslint-disable-next-line react-hooks/exhaustive-deps
2532
+ [x]
2533
+ ), D = An({
2534
+ callback: E,
2535
+ disabled: A || !l
2536
+ }), R = be((M, H) => {
2537
+ D && (H && (D.unobserve(H), g.current = !1), M && D.observe(M));
2538
+ }, [D]), [T, _] = vn(R), O = Yt(t);
2539
+ return K(() => {
2540
+ !D || !T.current || (D.disconnect(), g.current = !1, D.observe(T.current));
2541
+ }, [T, D]), Ue(
2542
+ () => (c({
2543
+ type: le.RegisterDroppable,
2544
+ element: {
2545
+ id: o,
2546
+ key: a,
2547
+ disabled: n,
2548
+ node: T,
2549
+ rect: w,
2550
+ data: O
2551
+ }
2552
+ }), () => c({
2553
+ type: le.UnregisterDroppable,
2554
+ key: a,
2555
+ id: o
2556
+ })),
2557
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2558
+ [o]
2559
+ ), K(() => {
2560
+ n !== h.current.disabled && (c({
2561
+ type: le.SetDroppableDisabled,
2562
+ id: o,
2563
+ key: a,
2564
+ disabled: n
2565
+ }), h.current.disabled = n);
2566
+ }, [o, a, n, c]), {
2567
+ active: l,
2568
+ rect: w,
2569
+ isOver: (d == null ? void 0 : d.id) === o,
2570
+ node: T,
2571
+ over: d,
2572
+ setNodeRef: _
2573
+ };
2574
+ }
2575
+ function Hs(e) {
2576
+ let {
2577
+ animation: t,
2578
+ children: n
2579
+ } = e;
2580
+ const [o, i] = he(null), [a, l] = he(null), c = bn(n);
2581
+ return !n && !o && c && i(c), Ue(() => {
2582
+ if (!a)
2583
+ return;
2584
+ const d = o == null ? void 0 : o.key, u = o == null ? void 0 : o.props.id;
2585
+ if (d == null || u == null) {
2586
+ i(null);
2587
+ return;
2588
+ }
2589
+ Promise.resolve(t(u, a)).then(() => {
2590
+ i(null);
2591
+ });
2592
+ }, [t, o, a]), k.createElement(k.Fragment, null, n, o ? vi(o, {
2593
+ ref: l
2594
+ }) : null);
2595
+ }
2596
+ const Us = {
2597
+ x: 0,
2598
+ y: 0,
2599
+ scaleX: 1,
2600
+ scaleY: 1
2601
+ };
2602
+ function Xs(e) {
2603
+ let {
2604
+ children: t
2605
+ } = e;
2606
+ return k.createElement(Jt.Provider, {
2607
+ value: Qr
2608
+ }, k.createElement(En.Provider, {
2609
+ value: Us
2610
+ }, t));
2611
+ }
2612
+ const js = {
2613
+ position: "fixed",
2614
+ touchAction: "none"
2615
+ }, Ys = (e) => Rn(e) ? "transform 250ms ease" : void 0, ks = /* @__PURE__ */ Nr((e, t) => {
2616
+ let {
2617
+ as: n,
2618
+ activatorEvent: o,
2619
+ adjustScale: i,
2620
+ children: a,
2621
+ className: l,
2622
+ rect: c,
2623
+ style: d,
2624
+ transform: u,
2625
+ transition: h = Ys
2626
+ } = e;
2627
+ if (!c)
2628
+ return null;
2629
+ const g = i ? u : {
2630
+ ...u,
2631
+ scaleX: 1,
2632
+ scaleY: 1
2633
+ }, w = {
2634
+ ...js,
2635
+ width: c.width,
2636
+ height: c.height,
2637
+ top: c.top,
2638
+ left: c.left,
2639
+ transform: bt.Transform.toString(g),
2640
+ transformOrigin: i && o ? Fi(o, c) : void 0,
2641
+ transition: typeof h == "function" ? h(o) : h,
2642
+ ...d
2643
+ };
2644
+ return k.createElement(n, {
2645
+ className: l,
2646
+ style: w,
2647
+ ref: t
2648
+ }, a);
2649
+ }), no = (e) => (t) => {
2650
+ let {
2651
+ active: n,
2652
+ dragOverlay: o
2653
+ } = t;
2654
+ const i = {}, {
2655
+ styles: a,
2656
+ className: l
2657
+ } = e;
2658
+ if (a != null && a.active)
2659
+ for (const [c, d] of Object.entries(a.active))
2660
+ d !== void 0 && (i[c] = n.node.style.getPropertyValue(c), n.node.style.setProperty(c, d));
2661
+ if (a != null && a.dragOverlay)
2662
+ for (const [c, d] of Object.entries(a.dragOverlay))
2663
+ d !== void 0 && o.node.style.setProperty(c, d);
2664
+ return l != null && l.active && n.node.classList.add(l.active), l != null && l.dragOverlay && o.node.classList.add(l.dragOverlay), function() {
2665
+ for (const [d, u] of Object.entries(i))
2666
+ n.node.style.setProperty(d, u);
2667
+ l != null && l.active && n.node.classList.remove(l.active);
2668
+ };
2669
+ }, Gs = (e) => {
2670
+ let {
2671
+ transform: {
2672
+ initial: t,
2673
+ final: n
2674
+ }
2675
+ } = e;
2676
+ return [{
2677
+ transform: bt.Transform.toString(t)
2678
+ }, {
2679
+ transform: bt.Transform.toString(n)
2680
+ }];
2681
+ }, Ws = {
2682
+ duration: 250,
2683
+ easing: "ease",
2684
+ keyframes: Gs,
2685
+ sideEffects: /* @__PURE__ */ no({
2686
+ styles: {
2687
+ active: {
2688
+ opacity: "0"
2689
+ }
2690
+ }
2691
+ })
2692
+ };
2693
+ function qs(e) {
2694
+ let {
2695
+ config: t,
2696
+ draggableNodes: n,
2697
+ droppableContainers: o,
2698
+ measuringConfiguration: i
2699
+ } = e;
2700
+ return Sn((a, l) => {
2701
+ if (t === null)
2702
+ return;
2703
+ const c = n.get(a);
2704
+ if (!c)
2705
+ return;
2706
+ const d = c.node.current;
2707
+ if (!d)
2708
+ return;
2709
+ const u = Vr(l);
2710
+ if (!u)
2711
+ return;
2712
+ const {
2713
+ transform: h
2714
+ } = Se(l).getComputedStyle(l), g = zr(h);
2715
+ if (!g)
2716
+ return;
2717
+ const w = typeof t == "function" ? t : Js(t);
2718
+ return Yr(d, i.draggable.measure), w({
2719
+ active: {
2720
+ id: a,
2721
+ data: c.data,
2722
+ node: d,
2723
+ rect: i.draggable.measure(d)
2724
+ },
2725
+ draggableNodes: n,
2726
+ dragOverlay: {
2727
+ node: l,
2728
+ rect: i.dragOverlay.measure(u)
2729
+ },
2730
+ droppableContainers: o,
2731
+ measuringConfiguration: i,
2732
+ transform: g
2733
+ });
2734
+ });
2735
+ }
2736
+ function Js(e) {
2737
+ const {
2738
+ duration: t,
2739
+ easing: n,
2740
+ sideEffects: o,
2741
+ keyframes: i
2742
+ } = {
2743
+ ...Ws,
2744
+ ...e
2745
+ };
2746
+ return (a) => {
2747
+ let {
2748
+ active: l,
2749
+ dragOverlay: c,
2750
+ transform: d,
2751
+ ...u
2752
+ } = a;
2753
+ if (!t)
2754
+ return;
2755
+ const h = {
2756
+ x: c.rect.left - l.rect.left,
2757
+ y: c.rect.top - l.rect.top
2758
+ }, g = {
2759
+ scaleX: d.scaleX !== 1 ? l.rect.width * d.scaleX / c.rect.width : 1,
2760
+ scaleY: d.scaleY !== 1 ? l.rect.height * d.scaleY / c.rect.height : 1
2761
+ }, w = {
2762
+ x: d.x - h.x,
2763
+ y: d.y - h.y,
2764
+ ...g
2765
+ }, b = i({
2766
+ ...u,
2767
+ active: l,
2768
+ dragOverlay: c,
2769
+ transform: {
2770
+ initial: d,
2771
+ final: w
2772
+ }
2773
+ }), [A] = b, v = b[b.length - 1];
2774
+ if (JSON.stringify(A) === JSON.stringify(v))
2775
+ return;
2776
+ const x = o == null ? void 0 : o({
2777
+ active: l,
2778
+ dragOverlay: c,
2779
+ ...u
2780
+ }), S = c.node.animate(b, {
2781
+ duration: t,
2782
+ easing: n,
2783
+ fill: "forwards"
2784
+ });
2785
+ return new Promise((E) => {
2786
+ S.onfinish = () => {
2787
+ x == null || x(), E();
2788
+ };
2789
+ });
2790
+ };
2791
+ }
2792
+ let _r = 0;
2793
+ function Vs(e) {
2794
+ return j(() => {
2795
+ if (e != null)
2796
+ return _r++, _r;
2797
+ }, [e]);
2798
+ }
2799
+ const Qs = /* @__PURE__ */ k.memo((e) => {
2800
+ let {
2801
+ adjustScale: t = !1,
2802
+ children: n,
2803
+ dropAnimation: o,
2804
+ style: i,
2805
+ transition: a,
2806
+ modifiers: l,
2807
+ wrapperElement: c = "div",
2808
+ className: d,
2809
+ zIndex: u = 999
2810
+ } = e;
2811
+ const {
2812
+ activatorEvent: h,
2813
+ active: g,
2814
+ activeNodeRect: w,
2815
+ containerNodeRect: b,
2816
+ draggableNodes: A,
2817
+ droppableContainers: v,
2818
+ dragOverlay: x,
2819
+ over: S,
2820
+ measuringConfiguration: E,
2821
+ scrollableAncestors: D,
2822
+ scrollableAncestorRects: R,
2823
+ windowRect: T
2824
+ } = to(), _ = vt(En), O = Vs(g == null ? void 0 : g.id), M = eo(l, {
2825
+ activatorEvent: h,
2826
+ active: g,
2827
+ activeNodeRect: w,
2828
+ containerNodeRect: b,
2829
+ draggingNodeRect: x.rect,
2830
+ over: S,
2831
+ overlayNodeRect: x.rect,
2832
+ scrollableAncestors: D,
2833
+ scrollableAncestorRects: R,
2834
+ transform: _,
2835
+ windowRect: T
2836
+ }), H = nr(w), U = qs({
2837
+ config: o,
2838
+ draggableNodes: A,
2839
+ droppableContainers: v,
2840
+ measuringConfiguration: E
2841
+ }), B = H ? x.setRef : void 0;
2842
+ return k.createElement(Xs, null, k.createElement(Hs, {
2843
+ animation: U
2844
+ }, g && O ? k.createElement(ks, {
2845
+ key: O,
2846
+ id: g.id,
2847
+ ref: B,
2848
+ as: c,
2849
+ activatorEvent: h,
2850
+ adjustScale: t,
2851
+ className: d,
2852
+ transition: a,
2853
+ rect: H,
2854
+ style: {
2855
+ zIndex: u,
2856
+ ...i
2857
+ },
2858
+ transform: M
2859
+ }, n) : null));
2860
+ });
2861
+ function jt(e, t, n) {
2862
+ const o = e.slice();
2863
+ return o.splice(n < 0 ? o.length + n : n, 0, o.splice(t, 1)[0]), o;
2864
+ }
2865
+ function Zs(e, t) {
2866
+ return e.reduce((n, o, i) => {
2867
+ const a = t.get(o);
2868
+ return a && (n[i] = a), n;
2869
+ }, Array(e.length));
2870
+ }
2871
+ function dn(e) {
2872
+ return e !== null && e >= 0;
2873
+ }
2874
+ function ea(e, t) {
2875
+ if (e === t)
2876
+ return !0;
2877
+ if (e.length !== t.length)
2878
+ return !1;
2879
+ for (let n = 0; n < e.length; n++)
2880
+ if (e[n] !== t[n])
2881
+ return !1;
2882
+ return !0;
2883
+ }
2884
+ function ta(e) {
2885
+ return typeof e == "boolean" ? {
2886
+ draggable: e,
2887
+ droppable: e
2888
+ } : e;
2889
+ }
2890
+ const fn = {
2891
+ scaleX: 1,
2892
+ scaleY: 1
2893
+ }, na = (e) => {
2894
+ var t;
2895
+ let {
2896
+ rects: n,
2897
+ activeNodeRect: o,
2898
+ activeIndex: i,
2899
+ overIndex: a,
2900
+ index: l
2901
+ } = e;
2902
+ const c = (t = n[i]) != null ? t : o;
2903
+ if (!c)
2904
+ return null;
2905
+ const d = ra(n, l, i);
2906
+ if (l === i) {
2907
+ const u = n[a];
2908
+ return u ? {
2909
+ x: i < a ? u.left + u.width - (c.left + c.width) : u.left - c.left,
2910
+ y: 0,
2911
+ ...fn
2912
+ } : null;
2913
+ }
2914
+ return l > i && l <= a ? {
2915
+ x: -c.width - d,
2916
+ y: 0,
2917
+ ...fn
2918
+ } : l < i && l >= a ? {
2919
+ x: c.width + d,
2920
+ y: 0,
2921
+ ...fn
2922
+ } : {
2923
+ x: 0,
2924
+ y: 0,
2925
+ ...fn
2926
+ };
2927
+ };
2928
+ function ra(e, t, n) {
2929
+ const o = e[t], i = e[t - 1], a = e[t + 1];
2930
+ return !o || !i && !a ? 0 : n < t ? i ? o.left - (i.left + i.width) : a.left - (o.left + o.width) : a ? a.left - (o.left + o.width) : o.left - (i.left + i.width);
2931
+ }
2932
+ const ro = (e) => {
2933
+ let {
2934
+ rects: t,
2935
+ activeIndex: n,
2936
+ overIndex: o,
2937
+ index: i
2938
+ } = e;
2939
+ const a = jt(t, o, n), l = t[i], c = a[i];
2940
+ return !c || !l ? null : {
2941
+ x: c.left - l.left,
2942
+ y: c.top - l.top,
2943
+ scaleX: c.width / l.width,
2944
+ scaleY: c.height / l.height
2945
+ };
2946
+ }, gn = {
2947
+ scaleX: 1,
2948
+ scaleY: 1
2949
+ }, Ir = (e) => {
2950
+ var t;
2951
+ let {
2952
+ activeIndex: n,
2953
+ activeNodeRect: o,
2954
+ index: i,
2955
+ rects: a,
2956
+ overIndex: l
2957
+ } = e;
2958
+ const c = (t = a[n]) != null ? t : o;
2959
+ if (!c)
2960
+ return null;
2961
+ if (i === n) {
2962
+ const u = a[l];
2963
+ return u ? {
2964
+ x: 0,
2965
+ y: n < l ? u.top + u.height - (c.top + c.height) : u.top - c.top,
2966
+ ...gn
2967
+ } : null;
2968
+ }
2969
+ const d = oa(a, i, n);
2970
+ return i > n && i <= l ? {
2971
+ x: 0,
2972
+ y: -c.height - d,
2973
+ ...gn
2974
+ } : i < n && i >= l ? {
2975
+ x: 0,
2976
+ y: c.height + d,
2977
+ ...gn
2978
+ } : {
2979
+ x: 0,
2980
+ y: 0,
2981
+ ...gn
2982
+ };
2983
+ };
2984
+ function oa(e, t, n) {
2985
+ const o = e[t], i = e[t - 1], a = e[t + 1];
2986
+ return o ? n < t ? i ? o.top - (i.top + i.height) : a ? a.top - (o.top + o.height) : 0 : a ? a.top - (o.top + o.height) : i ? o.top - (i.top + i.height) : 0 : 0;
2987
+ }
2988
+ const oo = "Sortable", io = /* @__PURE__ */ k.createContext({
2989
+ activeIndex: -1,
2990
+ containerId: oo,
2991
+ disableTransforms: !1,
2992
+ items: [],
2993
+ overIndex: -1,
2994
+ useDragOverlay: !1,
2995
+ sortedRects: [],
2996
+ strategy: ro,
2997
+ disabled: {
2998
+ draggable: !1,
2999
+ droppable: !1
3000
+ }
3001
+ });
3002
+ function Or(e) {
3003
+ let {
3004
+ children: t,
3005
+ id: n,
3006
+ items: o,
3007
+ strategy: i = ro,
3008
+ disabled: a = !1
3009
+ } = e;
3010
+ const {
3011
+ active: l,
3012
+ dragOverlay: c,
3013
+ droppableRects: d,
3014
+ over: u,
3015
+ measureDroppableContainers: h
3016
+ } = to(), g = qt(oo, n), w = c.rect !== null, b = j(() => o.map((_) => typeof _ == "object" && "id" in _ ? _.id : _), [o]), A = l != null, v = l ? b.indexOf(l.id) : -1, x = u ? b.indexOf(u.id) : -1, S = Y(b), E = !ea(b, S.current), D = x !== -1 && v === -1 || E, R = ta(a);
3017
+ Ue(() => {
3018
+ E && A && h(b);
3019
+ }, [E, b, A, h]), K(() => {
3020
+ S.current = b;
3021
+ }, [b]);
3022
+ const T = j(
3023
+ () => ({
3024
+ activeIndex: v,
3025
+ containerId: g,
3026
+ disabled: R,
3027
+ disableTransforms: D,
3028
+ items: b,
3029
+ overIndex: x,
3030
+ useDragOverlay: w,
3031
+ sortedRects: Zs(b, d),
3032
+ strategy: i
3033
+ }),
3034
+ // eslint-disable-next-line react-hooks/exhaustive-deps
3035
+ [v, g, R.draggable, R.droppable, D, b, x, d, w, i]
3036
+ );
3037
+ return k.createElement(io.Provider, {
3038
+ value: T
3039
+ }, t);
3040
+ }
3041
+ const ia = (e) => {
3042
+ let {
3043
+ id: t,
3044
+ items: n,
3045
+ activeIndex: o,
3046
+ overIndex: i
3047
+ } = e;
3048
+ return jt(n, o, i).indexOf(t);
3049
+ }, so = (e) => {
3050
+ let {
3051
+ containerId: t,
3052
+ isSorting: n,
3053
+ wasDragging: o,
3054
+ index: i,
3055
+ items: a,
3056
+ newIndex: l,
3057
+ previousItems: c,
3058
+ previousContainerId: d,
3059
+ transition: u
3060
+ } = e;
3061
+ return !u || !o || c !== a && i === l ? !1 : n ? !0 : l !== i && t === d;
3062
+ }, sa = {
3063
+ duration: 200,
3064
+ easing: "ease"
3065
+ }, ao = "transform", aa = /* @__PURE__ */ bt.Transition.toString({
3066
+ property: ao,
3067
+ duration: 0,
3068
+ easing: "linear"
3069
+ }), la = {
3070
+ roleDescription: "sortable"
3071
+ };
3072
+ function ca(e) {
3073
+ let {
3074
+ disabled: t,
3075
+ index: n,
3076
+ node: o,
3077
+ rect: i
3078
+ } = e;
3079
+ const [a, l] = he(null), c = Y(n);
3080
+ return Ue(() => {
3081
+ if (!t && n !== c.current && o.current) {
3082
+ const d = i.current;
3083
+ if (d) {
3084
+ const u = zt(o.current, {
3085
+ ignoreTransform: !0
3086
+ }), h = {
3087
+ x: d.left - u.left,
3088
+ y: d.top - u.top,
3089
+ scaleX: d.width / u.width,
3090
+ scaleY: d.height / u.height
3091
+ };
3092
+ (h.x || h.y) && l(h);
3093
+ }
3094
+ }
3095
+ n !== c.current && (c.current = n);
3096
+ }, [t, n, o, i]), K(() => {
3097
+ a && l(null);
3098
+ }, [a]), a;
3099
+ }
3100
+ function lo(e) {
3101
+ let {
3102
+ animateLayoutChanges: t = so,
3103
+ attributes: n,
3104
+ disabled: o,
3105
+ data: i,
3106
+ getNewIndex: a = ia,
3107
+ id: l,
3108
+ strategy: c,
3109
+ resizeObserverConfig: d,
3110
+ transition: u = sa
3111
+ } = e;
3112
+ const {
3113
+ items: h,
3114
+ containerId: g,
3115
+ activeIndex: w,
3116
+ disabled: b,
3117
+ disableTransforms: A,
3118
+ sortedRects: v,
3119
+ overIndex: x,
3120
+ useDragOverlay: S,
3121
+ strategy: E
3122
+ } = vt(io), D = ua(o, b), R = h.indexOf(l), T = j(() => ({
3123
+ sortable: {
3124
+ containerId: g,
3125
+ index: R,
3126
+ items: h
3127
+ },
3128
+ ...i
3129
+ }), [g, i, R, h]), _ = j(() => h.slice(h.indexOf(l)), [h, l]), {
3130
+ rect: O,
3131
+ node: M,
3132
+ isOver: H,
3133
+ setNodeRef: U
3134
+ } = Ks({
3135
+ id: l,
3136
+ data: T,
3137
+ disabled: D.droppable,
3138
+ resizeObserverConfig: {
3139
+ updateMeasurementsFor: _,
3140
+ ...d
3141
+ }
3142
+ }), {
3143
+ active: B,
3144
+ activatorEvent: re,
3145
+ activeNodeRect: Q,
3146
+ attributes: Re,
3147
+ setNodeRef: Xe,
3148
+ listeners: F,
3149
+ isDragging: J,
3150
+ over: Le,
3151
+ setActivatorNodeRef: Oe,
3152
+ transform: ce
3153
+ } = Bs({
3154
+ id: l,
3155
+ data: T,
3156
+ attributes: {
3157
+ ...la,
3158
+ ...n
3159
+ },
3160
+ disabled: D.draggable
3161
+ }), Pe = Si(U, Xe), V = !!B, we = V && !A && dn(w) && dn(x), je = !S && J, tt = je && we ? ce : null, nt = we ? tt ?? (c ?? E)({
3162
+ rects: v,
3163
+ activeNodeRect: Q,
3164
+ activeIndex: w,
3165
+ overIndex: x,
3166
+ index: R
3167
+ }) : null, $e = dn(w) && dn(x) ? a({
3168
+ id: l,
3169
+ items: h,
3170
+ activeIndex: w,
3171
+ overIndex: x
3172
+ }) : R, ue = B == null ? void 0 : B.id, $ = Y({
3173
+ activeId: ue,
3174
+ items: h,
3175
+ newIndex: $e,
3176
+ containerId: g
3177
+ }), rt = h !== $.current.items, Ae = t({
3178
+ active: B,
3179
+ containerId: g,
3180
+ isDragging: J,
3181
+ isSorting: V,
3182
+ id: l,
3183
+ index: R,
3184
+ items: h,
3185
+ newIndex: $.current.newIndex,
3186
+ previousItems: $.current.items,
3187
+ previousContainerId: $.current.containerId,
3188
+ transition: u,
3189
+ wasDragging: $.current.activeId != null
3190
+ }), Ve = ca({
3191
+ disabled: !Ae,
3192
+ index: R,
3193
+ node: M,
3194
+ rect: O
3195
+ });
3196
+ return K(() => {
3197
+ V && $.current.newIndex !== $e && ($.current.newIndex = $e), g !== $.current.containerId && ($.current.containerId = g), h !== $.current.items && ($.current.items = h);
3198
+ }, [V, $e, g, h]), K(() => {
3199
+ if (ue === $.current.activeId)
3200
+ return;
3201
+ if (ue && !$.current.activeId) {
3202
+ $.current.activeId = ue;
3203
+ return;
3204
+ }
3205
+ const Qe = setTimeout(() => {
3206
+ $.current.activeId = ue;
3207
+ }, 50);
3208
+ return () => clearTimeout(Qe);
3209
+ }, [ue]), {
3210
+ active: B,
3211
+ activeIndex: w,
3212
+ attributes: Re,
3213
+ data: T,
3214
+ rect: O,
3215
+ index: R,
3216
+ newIndex: $e,
3217
+ items: h,
3218
+ isOver: H,
3219
+ isSorting: V,
3220
+ isDragging: J,
3221
+ listeners: F,
3222
+ node: M,
3223
+ overIndex: x,
3224
+ over: Le,
3225
+ setNodeRef: Pe,
3226
+ setActivatorNodeRef: Oe,
3227
+ setDroppableNodeRef: U,
3228
+ setDraggableNodeRef: Xe,
3229
+ transform: Ve ?? nt,
3230
+ transition: P()
3231
+ };
3232
+ function P() {
3233
+ if (
3234
+ // Temporarily disable transitions for a single frame to set up derived transforms
3235
+ Ve || // Or to prevent items jumping to back to their "new" position when items change
3236
+ rt && $.current.newIndex === R
3237
+ )
3238
+ return aa;
3239
+ if (!(je && !Rn(re) || !u) && (V || Ae))
3240
+ return bt.Transition.toString({
3241
+ ...u,
3242
+ property: ao
3243
+ });
3244
+ }
3245
+ }
3246
+ function ua(e, t) {
3247
+ var n, o;
3248
+ return typeof e == "boolean" ? {
3249
+ draggable: e,
3250
+ // Backwards compatibility
3251
+ droppable: !1
3252
+ } : {
3253
+ draggable: (n = e == null ? void 0 : e.draggable) != null ? n : t.draggable,
3254
+ droppable: (o = e == null ? void 0 : e.droppable) != null ? o : t.droppable
3255
+ };
3256
+ }
3257
+ L.Down, L.Right, L.Up, L.Left;
3258
+ const da = (e) => e;
3259
+ function Tr(e, t = da) {
3260
+ return [...new Array(e)].map((n, o) => t(o));
3261
+ }
3262
+ const fa = [
3263
+ L.Down,
3264
+ L.Right,
3265
+ L.Up,
3266
+ L.Left
3267
+ ], ga = (e, { context: { active: t, droppableRects: n, droppableContainers: o, collisionRect: i } }) => {
3268
+ var a;
3269
+ if (fa.includes(e.code)) {
3270
+ if (e.preventDefault(), !t || !i)
3271
+ return;
3272
+ const l = [];
3273
+ o.getEnabled().forEach((u) => {
3274
+ var w;
3275
+ if (!u || u != null && u.disabled)
3276
+ return;
3277
+ const h = n.get(u.id);
3278
+ if (!h)
3279
+ return;
3280
+ const g = u.data.current;
3281
+ if (g) {
3282
+ const { type: b, children: A } = g;
3283
+ if (b === "container" && (A == null ? void 0 : A.length) > 0 && ((w = t.data.current) == null ? void 0 : w.type) !== "container")
3284
+ return;
3285
+ }
3286
+ switch (e.code) {
3287
+ case L.Down:
3288
+ i.top < h.top && l.push(u);
3289
+ break;
3290
+ case L.Up:
3291
+ i.top > h.top && l.push(u);
3292
+ break;
3293
+ case L.Left:
3294
+ i.left >= h.left + h.width && l.push(u);
3295
+ break;
3296
+ case L.Right:
3297
+ i.left + i.width <= h.left && l.push(u);
3298
+ break;
3299
+ }
3300
+ });
3301
+ const c = Hi({
3302
+ active: t,
3303
+ collisionRect: i,
3304
+ droppableRects: n,
3305
+ droppableContainers: l,
3306
+ pointerCoordinates: null
3307
+ }), d = Vn(c, "id");
3308
+ if (d != null) {
3309
+ const u = o.get(d), h = u == null ? void 0 : u.node.current, g = u == null ? void 0 : u.rect.current;
3310
+ if (h && g)
3311
+ return u.id === "placeholder" ? {
3312
+ x: g.left + (g.width - i.width) / 2,
3313
+ y: g.top + (g.height - i.height) / 2
3314
+ } : ((a = u.data.current) == null ? void 0 : a.type) === "container" ? {
3315
+ x: g.left + 20,
3316
+ y: g.top + 74
3317
+ } : {
3318
+ x: g.left,
3319
+ y: g.top
3320
+ };
3321
+ }
3322
+ }
3323
+ }, ha = "_Wrapper_37o6x_33", pa = "_fadeIn_37o6x_41", va = "_dragOverlay_37o6x_44", ba = "_Item_37o6x_53", ya = "_withHandle_37o6x_79", ma = "_dragging_37o6x_83", wa = "_disabled_37o6x_91", xa = "_pop_37o6x_1", Ca = "_color_37o6x_110", Da = "_Remove_37o6x_123", Sa = "_Actions_37o6x_129", qe = {
3324
+ Wrapper: ha,
3325
+ fadeIn: pa,
3326
+ dragOverlay: va,
3327
+ Item: ba,
3328
+ withHandle: ya,
3329
+ dragging: ma,
3330
+ disabled: wa,
3331
+ pop: xa,
3332
+ color: Ca,
3333
+ Remove: Da,
3334
+ Actions: Sa
3335
+ }, Ra = Pt.div`
3336
+ font-family: ${(e) => {
3337
+ var t, n;
3338
+ return (n = (t = e.theme) == null ? void 0 : t.typography) == null ? void 0 : n.fontFamily;
3339
+ }};
3340
+ background-color: ${(e) => Mt(
3341
+ e.theme,
3342
+ "KanbanCard",
3343
+ e.color ? "primary" : e.color,
3344
+ "enabled",
3345
+ "background"
3346
+ )};
3347
+ color: ${(e) => Mt(
3348
+ e.theme,
3349
+ "KanbanCard",
3350
+ e.color ? "primary" : e.color,
3351
+ "enabled",
3352
+ "text"
3353
+ )};
3354
+ &:hover .Actions > * {
3355
+ opacity: 1 !important;
3356
+ }
3357
+ `, Xn = k.memo(
3358
+ k.forwardRef(
3359
+ ({
3360
+ cardProps: e,
3361
+ color: t,
3362
+ dragOverlay: n,
3363
+ dragging: o,
3364
+ disabled: i,
3365
+ fadeIn: a,
3366
+ handle: l,
3367
+ handleProps: c,
3368
+ height: d,
3369
+ index: u,
3370
+ listeners: h,
3371
+ onRemove: g,
3372
+ renderItem: w,
3373
+ sorting: b,
3374
+ transition: A,
3375
+ transform: v,
3376
+ value: x,
3377
+ wrapperStyle: S,
3378
+ className: E,
3379
+ style: D,
3380
+ children: R,
3381
+ ...T
3382
+ }, _) => {
3383
+ const O = kn();
3384
+ return K(() => {
3385
+ if (n)
3386
+ return document.body.style.cursor = "grabbing", () => {
3387
+ document.body.style.cursor = "";
3388
+ };
3389
+ }, [n]), w ? w({
3390
+ dragOverlay: !!n,
3391
+ dragging: !!o,
3392
+ sorting: !!b,
3393
+ index: u,
3394
+ fadeIn: !!a,
3395
+ listeners: h,
3396
+ ref: _,
3397
+ style: D,
3398
+ transform: v,
3399
+ transition: A,
3400
+ value: x
3401
+ }) : /* @__PURE__ */ ae(
3402
+ "li",
3403
+ {
3404
+ className: pr(
3405
+ qe.Wrapper,
3406
+ a && qe.fadeIn,
3407
+ b && qe.sorting,
3408
+ n && qe.dragOverlay
3409
+ ),
3410
+ style: {
3411
+ ...S,
3412
+ transition: [A, S == null ? void 0 : S.transition].filter(Boolean).join(", "),
3413
+ "--translate-x": v ? `${Math.round(v.x)}px` : void 0,
3414
+ "--translate-y": v ? `${Math.round(v.y)}px` : void 0,
3415
+ "--scale-x": v != null && v.scaleX ? `${v.scaleX}` : void 0,
3416
+ "--scale-y": v != null && v.scaleY ? `${v.scaleY}` : void 0,
3417
+ "--index": u,
3418
+ "--color": t
3419
+ },
3420
+ ref: _,
3421
+ children: /* @__PURE__ */ pn(
3422
+ Ra,
3423
+ {
3424
+ theme: O,
3425
+ color: t,
3426
+ className: pr(
3427
+ qe.Item,
3428
+ o && qe.dragging,
3429
+ l && qe.withHandle,
3430
+ n && qe.dragOverlay,
3431
+ i && qe.disabled,
3432
+ t && qe.color
3433
+ ) + " " + E,
3434
+ style: e == null ? void 0 : e.style,
3435
+ "data-cypress": "draggable-item",
3436
+ ...l ? void 0 : h,
3437
+ ...T,
3438
+ tabIndex: l ? void 0 : 0,
3439
+ children: [
3440
+ R,
3441
+ /* @__PURE__ */ ae("span", { className: qe.Actions })
3442
+ ]
3443
+ }
3444
+ )
3445
+ }
3446
+ );
3447
+ }
3448
+ )
3449
+ ), Aa = Pt.div`
3450
+ display: flex;
3451
+ flex: 1;
3452
+ flex-direction: column;
3453
+ grid-auto-rows: max-content;
3454
+ overflow: hidden;
3455
+ box-sizing: border-box;
3456
+ appearance: none;
3457
+ outline: none;
3458
+ min-width: 350px;
3459
+ margin: 10px;
3460
+ border-radius: 5px;
3461
+ min-height: 200px;
3462
+ transition: background-color 350ms ease;
3463
+ background-color: rgba(246, 246, 246, 1);
3464
+ border: 1px solid rgba(0, 0, 0, 0.05);
3465
+ font-size: 1em;
3466
+
3467
+ ${(e) => e.horizontal ? "width: 100%;" : ""}
3468
+ ${(e) => e.shadow ? "box-shadow: 0 1px 10px 0 rgba(34, 33, 81, 0.1);" : ""}
3469
+
3470
+ & ul {
3471
+ display: grid;
3472
+ grid-gap: 10px;
3473
+ grid-template-columns: repeat(var(--columns, 1), 1fr);
3474
+ list-style: none;
3475
+ padding: 20px;
3476
+ margin: 0;
3477
+ ${(e) => e.scrollable ? "overflow-y: auto;" : ""}
3478
+ ${(e) => e.horizontal ? "grid-auto-flow: column;" : ""}
3479
+ ${(e) => e.maxContainerHeight && `max-height: ${e.maxContainerHeight};`}
3480
+ overflow: auto;
3481
+ }
3482
+
3483
+ ${(e) => e.hover ? " background-color: #ebebeb;" : ""}
3484
+
3485
+ &:focus-visible {
3486
+ border-color: transparent;
3487
+ box-shadow: 0 0 0 2px rgba(255, 255, 255, 0), 0 0px 0px 2px #4c9ffe;
3488
+ }
3489
+
3490
+ background-color: ${(e) => Mt(
3491
+ e.theme,
3492
+ "Kanban",
3493
+ e.color,
3494
+ "enabled",
3495
+ "background"
3496
+ )};
3497
+ `, Ea = Pt.div`
3498
+ display: flex;
3499
+ padding: 5px 20px;
3500
+ padding-left: 8px;
3501
+ gap: 12px;
3502
+ align-items: center;
3503
+ background-color: #fff;
3504
+ border-top-left-radius: 5px;
3505
+ border-top-right-radius: 5px;
3506
+ border-bottom: 1px solid rgba(0, 0, 0, 0.08);
3507
+ background-color: ${(e) => Mt(
3508
+ e.theme,
3509
+ "KanbanHeader",
3510
+ e.color,
3511
+ "enabled",
3512
+ "background"
3513
+ )};
3514
+ color: ${(e) => Mt(
3515
+ e.theme,
3516
+ "KanbanHeader",
3517
+ e.color ? "primary" : e.color,
3518
+ "enabled",
3519
+ "text"
3520
+ )};
3521
+ &:hover .Actions > * {
3522
+ opacity: 1 !important;
3523
+ }
3524
+ `, _a = Pt.div`
3525
+ display: flex;
3526
+
3527
+ & > *:first-of-type:not(:last-of-type) {
3528
+ opacity: 0;
3529
+ }
3530
+
3531
+ & > *:first-of-type:not(:last-of-type):focus-visible {
3532
+ opacity: 1;
3533
+ }
3534
+ `, co = Nr((e, t) => {
3535
+ const {
3536
+ children: n,
3537
+ containerId: o,
3538
+ renderFooterContent: i,
3539
+ columns: a = 1,
3540
+ handleProps: l,
3541
+ horizontal: c,
3542
+ hover: d,
3543
+ onClick: u,
3544
+ onRemove: h,
3545
+ label: g,
3546
+ placeholder: w,
3547
+ maxContainerHeight: b,
3548
+ style: A,
3549
+ scrollable: v,
3550
+ shadow: x,
3551
+ unstyled: S,
3552
+ size: E,
3553
+ color: D,
3554
+ ...R
3555
+ } = e, T = kn();
3556
+ return /* @__PURE__ */ pn(
3557
+ Aa,
3558
+ {
3559
+ ...R,
3560
+ ref: t,
3561
+ style: {
3562
+ ...A,
3563
+ "--columns": a
3564
+ },
3565
+ unstyled: S,
3566
+ horizontal: c,
3567
+ hover: d,
3568
+ scrollable: v,
3569
+ shadow: x,
3570
+ onClick: u,
3571
+ tabIndex: u ? 0 : void 0,
3572
+ maxContainerHeight: b,
3573
+ color: D,
3574
+ theme: T,
3575
+ children: [
3576
+ g ? /* @__PURE__ */ pn(Ea, { theme: T, color: D, children: [
3577
+ /* @__PURE__ */ ae(_a, { className: "Actions", children: /* @__PURE__ */ ae(yi, { ...l }) }),
3578
+ g
3579
+ ] }) : null,
3580
+ /* @__PURE__ */ ae("ul", { children: n }),
3581
+ i(o)
3582
+ ]
3583
+ }
3584
+ );
3585
+ });
3586
+ var Cn = { exports: {} };
3587
+ Cn.exports;
3588
+ (function(e, t) {
3589
+ var n = 200, o = "Expected a function", i = "__lodash_hash_undefined__", a = 1, l = 2, c = 1 / 0, d = 9007199254740991, u = 17976931348623157e292, h = NaN, g = "[object Arguments]", w = "[object Array]", b = "[object Boolean]", A = "[object Date]", v = "[object Error]", x = "[object Function]", S = "[object GeneratorFunction]", E = "[object Map]", D = "[object Number]", R = "[object Object]", T = "[object Promise]", _ = "[object RegExp]", O = "[object Set]", M = "[object String]", H = "[object Symbol]", U = "[object WeakMap]", B = "[object ArrayBuffer]", re = "[object DataView]", Q = "[object Float32Array]", Re = "[object Float64Array]", Xe = "[object Int8Array]", F = "[object Int16Array]", J = "[object Int32Array]", Le = "[object Uint8Array]", Oe = "[object Uint8ClampedArray]", ce = "[object Uint16Array]", Pe = "[object Uint32Array]", V = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, we = /^\w*$/, je = /^\./, tt = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Z = /[\\^$.*+?()[\]{}|]/g, nt = /^\s+|\s+$/g, $e = /\\(\\)?/g, ue = /^[-+]0x[0-9a-f]+$/i, $ = /^0b[01]+$/i, rt = /^\[object .+?Constructor\]$/, Ae = /^0o[0-7]+$/i, Ve = /^(?:0|[1-9]\d*)$/, P = {};
3590
+ P[Q] = P[Re] = P[Xe] = P[F] = P[J] = P[Le] = P[Oe] = P[ce] = P[Pe] = !0, P[g] = P[w] = P[B] = P[b] = P[re] = P[A] = P[v] = P[x] = P[E] = P[D] = P[R] = P[_] = P[O] = P[M] = P[U] = !1;
3591
+ var Qe = parseInt, Ye = typeof un == "object" && un && un.Object === Object && un, yt = typeof self == "object" && self && self.Object === Object && self, Ee = Ye || yt || Function("return this")(), Ze = t && !t.nodeType && t, p = Ze && !0 && e && !e.nodeType && e, m = p && p.exports === Ze, N = m && Ye.process, q = function() {
3592
+ try {
3593
+ return N && N.binding("util");
3594
+ } catch {
3595
+ }
3596
+ }(), G = q && q.isTypedArray;
3597
+ function de(r, s) {
3598
+ for (var f = -1, y = r ? r.length : 0; ++f < y; )
3599
+ if (s(r[f], f, r))
3600
+ return !0;
3601
+ return !1;
3602
+ }
3603
+ function ee(r, s, f, y) {
3604
+ for (var I = r.length, C = f + -1; ++C < I; )
3605
+ if (s(r[C], C, r))
3606
+ return C;
3607
+ return -1;
3608
+ }
3609
+ function oe(r) {
3610
+ return function(s) {
3611
+ return s == null ? void 0 : s[r];
3612
+ };
3613
+ }
3614
+ function pe(r, s) {
3615
+ for (var f = -1, y = Array(r); ++f < r; )
3616
+ y[f] = s(f);
3617
+ return y;
3618
+ }
3619
+ function ye(r) {
3620
+ return function(s) {
3621
+ return r(s);
3622
+ };
3623
+ }
3624
+ function ot(r, s) {
3625
+ return r == null ? void 0 : r[s];
3626
+ }
3627
+ function te(r) {
3628
+ var s = !1;
3629
+ if (r != null && typeof r.toString != "function")
3630
+ try {
3631
+ s = !!(r + "");
3632
+ } catch {
3633
+ }
3634
+ return s;
3635
+ }
3636
+ function Te(r) {
3637
+ var s = -1, f = Array(r.size);
3638
+ return r.forEach(function(y, I) {
3639
+ f[++s] = [I, y];
3640
+ }), f;
3641
+ }
3642
+ function mt(r, s) {
3643
+ return function(f) {
3644
+ return r(s(f));
3645
+ };
3646
+ }
3647
+ function ie(r) {
3648
+ var s = -1, f = Array(r.size);
3649
+ return r.forEach(function(y) {
3650
+ f[++s] = y;
3651
+ }), f;
3652
+ }
3653
+ var fe = Array.prototype, Be = Function.prototype, et = Object.prototype, Ft = Ee["__core-js_shared__"], Vt = function() {
3654
+ var r = /[^.]+$/.exec(Ft && Ft.keys && Ft.keys.IE_PROTO || "");
3655
+ return r ? "Symbol(src)_1." + r : "";
3656
+ }(), Qt = Be.toString, X = et.hasOwnProperty, ne = et.toString, xe = RegExp(
3657
+ "^" + Qt.call(X).replace(Z, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
3658
+ ), ke = Ee.Symbol, Ce = Ee.Uint8Array, Ne = et.propertyIsEnumerable, ze = fe.splice, ut = mt(Object.keys, Object), Me = Math.max, it = _t(Ee, "DataView"), Ge = _t(Ee, "Map"), dt = _t(Ee, "Promise"), ft = _t(Ee, "Set"), Et = _t(Ee, "WeakMap"), We = _t(Object, "create"), wt = Ct(it), Kt = Ct(Ge), uo = Ct(dt), fo = Ct(ft), go = Ct(Et), Zt = ke ? ke.prototype : void 0, _n = Zt ? Zt.valueOf : void 0, rr = Zt ? Zt.toString : void 0;
3659
+ function xt(r) {
3660
+ var s = -1, f = r ? r.length : 0;
3661
+ for (this.clear(); ++s < f; ) {
3662
+ var y = r[s];
3663
+ this.set(y[0], y[1]);
3664
+ }
3665
+ }
3666
+ function ho() {
3667
+ this.__data__ = We ? We(null) : {};
3668
+ }
3669
+ function po(r) {
3670
+ return this.has(r) && delete this.__data__[r];
3671
+ }
3672
+ function vo(r) {
3673
+ var s = this.__data__;
3674
+ if (We) {
3675
+ var f = s[r];
3676
+ return f === i ? void 0 : f;
3677
+ }
3678
+ return X.call(s, r) ? s[r] : void 0;
3679
+ }
3680
+ function bo(r) {
3681
+ var s = this.__data__;
3682
+ return We ? s[r] !== void 0 : X.call(s, r);
3683
+ }
3684
+ function yo(r, s) {
3685
+ var f = this.__data__;
3686
+ return f[r] = We && s === void 0 ? i : s, this;
3687
+ }
3688
+ xt.prototype.clear = ho, xt.prototype.delete = po, xt.prototype.get = vo, xt.prototype.has = bo, xt.prototype.set = yo;
3689
+ function st(r) {
3690
+ var s = -1, f = r ? r.length : 0;
3691
+ for (this.clear(); ++s < f; ) {
3692
+ var y = r[s];
3693
+ this.set(y[0], y[1]);
3694
+ }
3695
+ }
3696
+ function mo() {
3697
+ this.__data__ = [];
3698
+ }
3699
+ function wo(r) {
3700
+ var s = this.__data__, f = tn(s, r);
3701
+ if (f < 0)
3702
+ return !1;
3703
+ var y = s.length - 1;
3704
+ return f == y ? s.pop() : ze.call(s, f, 1), !0;
3705
+ }
3706
+ function xo(r) {
3707
+ var s = this.__data__, f = tn(s, r);
3708
+ return f < 0 ? void 0 : s[f][1];
3709
+ }
3710
+ function Co(r) {
3711
+ return tn(this.__data__, r) > -1;
3712
+ }
3713
+ function Do(r, s) {
3714
+ var f = this.__data__, y = tn(f, r);
3715
+ return y < 0 ? f.push([r, s]) : f[y][1] = s, this;
3716
+ }
3717
+ st.prototype.clear = mo, st.prototype.delete = wo, st.prototype.get = xo, st.prototype.has = Co, st.prototype.set = Do;
3718
+ function at(r) {
3719
+ var s = -1, f = r ? r.length : 0;
3720
+ for (this.clear(); ++s < f; ) {
3721
+ var y = r[s];
3722
+ this.set(y[0], y[1]);
3723
+ }
3724
+ }
3725
+ function So() {
3726
+ this.__data__ = {
3727
+ hash: new xt(),
3728
+ map: new (Ge || st)(),
3729
+ string: new xt()
3730
+ };
3731
+ }
3732
+ function Ro(r) {
3733
+ return nn(this, r).delete(r);
3734
+ }
3735
+ function Ao(r) {
3736
+ return nn(this, r).get(r);
3737
+ }
3738
+ function Eo(r) {
3739
+ return nn(this, r).has(r);
3740
+ }
3741
+ function _o(r, s) {
3742
+ return nn(this, r).set(r, s), this;
3743
+ }
3744
+ at.prototype.clear = So, at.prototype.delete = Ro, at.prototype.get = Ao, at.prototype.has = Eo, at.prototype.set = _o;
3745
+ function en(r) {
3746
+ var s = -1, f = r ? r.length : 0;
3747
+ for (this.__data__ = new at(); ++s < f; )
3748
+ this.add(r[s]);
3749
+ }
3750
+ function Io(r) {
3751
+ return this.__data__.set(r, i), this;
3752
+ }
3753
+ function Oo(r) {
3754
+ return this.__data__.has(r);
3755
+ }
3756
+ en.prototype.add = en.prototype.push = Io, en.prototype.has = Oo;
3757
+ function lt(r) {
3758
+ this.__data__ = new st(r);
3759
+ }
3760
+ function To() {
3761
+ this.__data__ = new st();
3762
+ }
3763
+ function No(r) {
3764
+ return this.__data__.delete(r);
3765
+ }
3766
+ function Mo(r) {
3767
+ return this.__data__.get(r);
3768
+ }
3769
+ function Lo(r) {
3770
+ return this.__data__.has(r);
3771
+ }
3772
+ function Po(r, s) {
3773
+ var f = this.__data__;
3774
+ if (f instanceof st) {
3775
+ var y = f.__data__;
3776
+ if (!Ge || y.length < n - 1)
3777
+ return y.push([r, s]), this;
3778
+ f = this.__data__ = new at(y);
3779
+ }
3780
+ return f.set(r, s), this;
3781
+ }
3782
+ lt.prototype.clear = To, lt.prototype.delete = No, lt.prototype.get = Mo, lt.prototype.has = Lo, lt.prototype.set = Po;
3783
+ function $o(r, s) {
3784
+ var f = Dt(r) || dr(r) ? pe(r.length, String) : [], y = f.length, I = !!y;
3785
+ for (var C in r)
3786
+ X.call(r, C) && !(I && (C == "length" || ar(C, y))) && f.push(C);
3787
+ return f;
3788
+ }
3789
+ function tn(r, s) {
3790
+ for (var f = r.length; f--; )
3791
+ if (ur(r[f][0], s))
3792
+ return f;
3793
+ return -1;
3794
+ }
3795
+ function or(r, s) {
3796
+ s = rn(s, r) ? [s] : ir(s);
3797
+ for (var f = 0, y = s.length; r != null && f < y; )
3798
+ r = r[on(s[f++])];
3799
+ return f && f == y ? r : void 0;
3800
+ }
3801
+ function Bo(r) {
3802
+ return ne.call(r);
3803
+ }
3804
+ function zo(r, s) {
3805
+ return r != null && s in Object(r);
3806
+ }
3807
+ function In(r, s, f, y, I) {
3808
+ return r === s ? !0 : r == null || s == null || !It(r) && !sn(s) ? r !== r && s !== s : Fo(r, s, In, f, y, I);
3809
+ }
3810
+ function Fo(r, s, f, y, I, C) {
3811
+ var z = Dt(r), ve = Dt(s), se = w, me = w;
3812
+ z || (se = gt(r), se = se == g ? R : se), ve || (me = gt(s), me = me == g ? R : me);
3813
+ var _e = se == R && !te(r), Ie = me == R && !te(s), De = se == me;
3814
+ if (De && !_e)
3815
+ return C || (C = new lt()), z || ii(r) ? sr(r, s, f, y, I, C) : qo(r, s, se, f, y, I, C);
3816
+ if (!(I & l)) {
3817
+ var Fe = _e && X.call(r, "__wrapped__"), Ke = Ie && X.call(s, "__wrapped__");
3818
+ if (Fe || Ke) {
3819
+ var ht = Fe ? r.value() : r, ct = Ke ? s.value() : s;
3820
+ return C || (C = new lt()), f(ht, ct, y, I, C);
3821
+ }
3822
+ }
3823
+ return De ? (C || (C = new lt()), Jo(r, s, f, y, I, C)) : !1;
3824
+ }
3825
+ function Ko(r, s, f, y) {
3826
+ var I = f.length, C = I;
3827
+ if (r == null)
3828
+ return !C;
3829
+ for (r = Object(r); I--; ) {
3830
+ var z = f[I];
3831
+ if (z[2] ? z[1] !== r[z[0]] : !(z[0] in r))
3832
+ return !1;
3833
+ }
3834
+ for (; ++I < C; ) {
3835
+ z = f[I];
3836
+ var ve = z[0], se = r[ve], me = z[1];
3837
+ if (z[2]) {
3838
+ if (se === void 0 && !(ve in r))
3839
+ return !1;
3840
+ } else {
3841
+ var _e = new lt(), Ie;
3842
+ if (!(Ie === void 0 ? In(me, se, y, a | l, _e) : Ie))
3843
+ return !1;
3844
+ }
3845
+ }
3846
+ return !0;
3847
+ }
3848
+ function Ho(r) {
3849
+ if (!It(r) || ei(r))
3850
+ return !1;
3851
+ var s = gr(r) || te(r) ? xe : rt;
3852
+ return s.test(Ct(r));
3853
+ }
3854
+ function Uo(r) {
3855
+ return sn(r) && Tn(r.length) && !!P[ne.call(r)];
3856
+ }
3857
+ function Xo(r) {
3858
+ return typeof r == "function" ? r : r == null ? fi : typeof r == "object" ? Dt(r) ? ko(r[0], r[1]) : Yo(r) : gi(r);
3859
+ }
3860
+ function jo(r) {
3861
+ if (!ti(r))
3862
+ return ut(r);
3863
+ var s = [];
3864
+ for (var f in Object(r))
3865
+ X.call(r, f) && f != "constructor" && s.push(f);
3866
+ return s;
3867
+ }
3868
+ function Yo(r) {
3869
+ var s = Vo(r);
3870
+ return s.length == 1 && s[0][2] ? cr(s[0][0], s[0][1]) : function(f) {
3871
+ return f === r || Ko(f, r, s);
3872
+ };
3873
+ }
3874
+ function ko(r, s) {
3875
+ return rn(r) && lr(s) ? cr(on(r), s) : function(f) {
3876
+ var y = ui(f, r);
3877
+ return y === void 0 && y === s ? di(f, r) : In(s, y, void 0, a | l);
3878
+ };
3879
+ }
3880
+ function Go(r) {
3881
+ return function(s) {
3882
+ return or(s, r);
3883
+ };
3884
+ }
3885
+ function Wo(r) {
3886
+ if (typeof r == "string")
3887
+ return r;
3888
+ if (an(r))
3889
+ return rr ? rr.call(r) : "";
3890
+ var s = r + "";
3891
+ return s == "0" && 1 / r == -c ? "-0" : s;
3892
+ }
3893
+ function ir(r) {
3894
+ return Dt(r) ? r : ni(r);
3895
+ }
3896
+ function sr(r, s, f, y, I, C) {
3897
+ var z = I & l, ve = r.length, se = s.length;
3898
+ if (ve != se && !(z && se > ve))
3899
+ return !1;
3900
+ var me = C.get(r);
3901
+ if (me && C.get(s))
3902
+ return me == s;
3903
+ var _e = -1, Ie = !0, De = I & a ? new en() : void 0;
3904
+ for (C.set(r, s), C.set(s, r); ++_e < ve; ) {
3905
+ var Fe = r[_e], Ke = s[_e];
3906
+ if (y)
3907
+ var ht = z ? y(Ke, Fe, _e, s, r, C) : y(Fe, Ke, _e, r, s, C);
3908
+ if (ht !== void 0) {
3909
+ if (ht)
3910
+ continue;
3911
+ Ie = !1;
3912
+ break;
3913
+ }
3914
+ if (De) {
3915
+ if (!de(s, function(ct, St) {
3916
+ if (!De.has(St) && (Fe === ct || f(Fe, ct, y, I, C)))
3917
+ return De.add(St);
3918
+ })) {
3919
+ Ie = !1;
3920
+ break;
3921
+ }
3922
+ } else if (!(Fe === Ke || f(Fe, Ke, y, I, C))) {
3923
+ Ie = !1;
3924
+ break;
3925
+ }
3926
+ }
3927
+ return C.delete(r), C.delete(s), Ie;
3928
+ }
3929
+ function qo(r, s, f, y, I, C, z) {
3930
+ switch (f) {
3931
+ case re:
3932
+ if (r.byteLength != s.byteLength || r.byteOffset != s.byteOffset)
3933
+ return !1;
3934
+ r = r.buffer, s = s.buffer;
3935
+ case B:
3936
+ return !(r.byteLength != s.byteLength || !y(new Ce(r), new Ce(s)));
3937
+ case b:
3938
+ case A:
3939
+ case D:
3940
+ return ur(+r, +s);
3941
+ case v:
3942
+ return r.name == s.name && r.message == s.message;
3943
+ case _:
3944
+ case M:
3945
+ return r == s + "";
3946
+ case E:
3947
+ var ve = Te;
3948
+ case O:
3949
+ var se = C & l;
3950
+ if (ve || (ve = ie), r.size != s.size && !se)
3951
+ return !1;
3952
+ var me = z.get(r);
3953
+ if (me)
3954
+ return me == s;
3955
+ C |= a, z.set(r, s);
3956
+ var _e = sr(ve(r), ve(s), y, I, C, z);
3957
+ return z.delete(r), _e;
3958
+ case H:
3959
+ if (_n)
3960
+ return _n.call(r) == _n.call(s);
3961
+ }
3962
+ return !1;
3963
+ }
3964
+ function Jo(r, s, f, y, I, C) {
3965
+ var z = I & l, ve = Nn(r), se = ve.length, me = Nn(s), _e = me.length;
3966
+ if (se != _e && !z)
3967
+ return !1;
3968
+ for (var Ie = se; Ie--; ) {
3969
+ var De = ve[Ie];
3970
+ if (!(z ? De in s : X.call(s, De)))
3971
+ return !1;
3972
+ }
3973
+ var Fe = C.get(r);
3974
+ if (Fe && C.get(s))
3975
+ return Fe == s;
3976
+ var Ke = !0;
3977
+ C.set(r, s), C.set(s, r);
3978
+ for (var ht = z; ++Ie < se; ) {
3979
+ De = ve[Ie];
3980
+ var ct = r[De], St = s[De];
3981
+ if (y)
3982
+ var hr = z ? y(St, ct, De, s, r, C) : y(ct, St, De, r, s, C);
3983
+ if (!(hr === void 0 ? ct === St || f(ct, St, y, I, C) : hr)) {
3984
+ Ke = !1;
3985
+ break;
3986
+ }
3987
+ ht || (ht = De == "constructor");
3988
+ }
3989
+ if (Ke && !ht) {
3990
+ var ln = r.constructor, cn = s.constructor;
3991
+ ln != cn && "constructor" in r && "constructor" in s && !(typeof ln == "function" && ln instanceof ln && typeof cn == "function" && cn instanceof cn) && (Ke = !1);
3992
+ }
3993
+ return C.delete(r), C.delete(s), Ke;
3994
+ }
3995
+ function nn(r, s) {
3996
+ var f = r.__data__;
3997
+ return Zo(s) ? f[typeof s == "string" ? "string" : "hash"] : f.map;
3998
+ }
3999
+ function Vo(r) {
4000
+ for (var s = Nn(r), f = s.length; f--; ) {
4001
+ var y = s[f], I = r[y];
4002
+ s[f] = [y, I, lr(I)];
4003
+ }
4004
+ return s;
4005
+ }
4006
+ function _t(r, s) {
4007
+ var f = ot(r, s);
4008
+ return Ho(f) ? f : void 0;
4009
+ }
4010
+ var gt = Bo;
4011
+ (it && gt(new it(new ArrayBuffer(1))) != re || Ge && gt(new Ge()) != E || dt && gt(dt.resolve()) != T || ft && gt(new ft()) != O || Et && gt(new Et()) != U) && (gt = function(r) {
4012
+ var s = ne.call(r), f = s == R ? r.constructor : void 0, y = f ? Ct(f) : void 0;
4013
+ if (y)
4014
+ switch (y) {
4015
+ case wt:
4016
+ return re;
4017
+ case Kt:
4018
+ return E;
4019
+ case uo:
4020
+ return T;
4021
+ case fo:
4022
+ return O;
4023
+ case go:
4024
+ return U;
4025
+ }
4026
+ return s;
4027
+ });
4028
+ function Qo(r, s, f) {
4029
+ s = rn(s, r) ? [s] : ir(s);
4030
+ for (var y, I = -1, z = s.length; ++I < z; ) {
4031
+ var C = on(s[I]);
4032
+ if (!(y = r != null && f(r, C)))
4033
+ break;
4034
+ r = r[C];
4035
+ }
4036
+ if (y)
4037
+ return y;
4038
+ var z = r ? r.length : 0;
4039
+ return !!z && Tn(z) && ar(C, z) && (Dt(r) || dr(r));
4040
+ }
4041
+ function ar(r, s) {
4042
+ return s = s ?? d, !!s && (typeof r == "number" || Ve.test(r)) && r > -1 && r % 1 == 0 && r < s;
4043
+ }
4044
+ function rn(r, s) {
4045
+ if (Dt(r))
4046
+ return !1;
4047
+ var f = typeof r;
4048
+ return f == "number" || f == "symbol" || f == "boolean" || r == null || an(r) ? !0 : we.test(r) || !V.test(r) || s != null && r in Object(s);
4049
+ }
4050
+ function Zo(r) {
4051
+ var s = typeof r;
4052
+ return s == "string" || s == "number" || s == "symbol" || s == "boolean" ? r !== "__proto__" : r === null;
4053
+ }
4054
+ function ei(r) {
4055
+ return !!Vt && Vt in r;
4056
+ }
4057
+ function ti(r) {
4058
+ var s = r && r.constructor, f = typeof s == "function" && s.prototype || et;
4059
+ return r === f;
4060
+ }
4061
+ function lr(r) {
4062
+ return r === r && !It(r);
4063
+ }
4064
+ function cr(r, s) {
4065
+ return function(f) {
4066
+ return f == null ? !1 : f[r] === s && (s !== void 0 || r in Object(f));
4067
+ };
4068
+ }
4069
+ var ni = On(function(r) {
4070
+ r = ci(r);
4071
+ var s = [];
4072
+ return je.test(r) && s.push(""), r.replace(tt, function(f, y, I, C) {
4073
+ s.push(I ? C.replace($e, "$1") : y || f);
4074
+ }), s;
4075
+ });
4076
+ function on(r) {
4077
+ if (typeof r == "string" || an(r))
4078
+ return r;
4079
+ var s = r + "";
4080
+ return s == "0" && 1 / r == -c ? "-0" : s;
4081
+ }
4082
+ function Ct(r) {
4083
+ if (r != null) {
4084
+ try {
4085
+ return Qt.call(r);
4086
+ } catch {
4087
+ }
4088
+ try {
4089
+ return r + "";
4090
+ } catch {
4091
+ }
4092
+ }
4093
+ return "";
4094
+ }
4095
+ function ri(r, s, f) {
4096
+ var y = r ? r.length : 0;
4097
+ if (!y)
4098
+ return -1;
4099
+ var I = f == null ? 0 : ai(f);
4100
+ return I < 0 && (I = Me(y + I, 0)), ee(r, Xo(s), I);
4101
+ }
4102
+ function On(r, s) {
4103
+ if (typeof r != "function" || s && typeof s != "function")
4104
+ throw new TypeError(o);
4105
+ var f = function() {
4106
+ var y = arguments, I = s ? s.apply(this, y) : y[0], C = f.cache;
4107
+ if (C.has(I))
4108
+ return C.get(I);
4109
+ var z = r.apply(this, y);
4110
+ return f.cache = C.set(I, z), z;
4111
+ };
4112
+ return f.cache = new (On.Cache || at)(), f;
4113
+ }
4114
+ On.Cache = at;
4115
+ function ur(r, s) {
4116
+ return r === s || r !== r && s !== s;
4117
+ }
4118
+ function dr(r) {
4119
+ return oi(r) && X.call(r, "callee") && (!Ne.call(r, "callee") || ne.call(r) == g);
4120
+ }
4121
+ var Dt = Array.isArray;
4122
+ function fr(r) {
4123
+ return r != null && Tn(r.length) && !gr(r);
4124
+ }
4125
+ function oi(r) {
4126
+ return sn(r) && fr(r);
4127
+ }
4128
+ function gr(r) {
4129
+ var s = It(r) ? ne.call(r) : "";
4130
+ return s == x || s == S;
4131
+ }
4132
+ function Tn(r) {
4133
+ return typeof r == "number" && r > -1 && r % 1 == 0 && r <= d;
4134
+ }
4135
+ function It(r) {
4136
+ var s = typeof r;
4137
+ return !!r && (s == "object" || s == "function");
4138
+ }
4139
+ function sn(r) {
4140
+ return !!r && typeof r == "object";
4141
+ }
4142
+ function an(r) {
4143
+ return typeof r == "symbol" || sn(r) && ne.call(r) == H;
4144
+ }
4145
+ var ii = G ? ye(G) : Uo;
4146
+ function si(r) {
4147
+ if (!r)
4148
+ return r === 0 ? r : 0;
4149
+ if (r = li(r), r === c || r === -c) {
4150
+ var s = r < 0 ? -1 : 1;
4151
+ return s * u;
4152
+ }
4153
+ return r === r ? r : 0;
4154
+ }
4155
+ function ai(r) {
4156
+ var s = si(r), f = s % 1;
4157
+ return s === s ? f ? s - f : s : 0;
4158
+ }
4159
+ function li(r) {
4160
+ if (typeof r == "number")
4161
+ return r;
4162
+ if (an(r))
4163
+ return h;
4164
+ if (It(r)) {
4165
+ var s = typeof r.valueOf == "function" ? r.valueOf() : r;
4166
+ r = It(s) ? s + "" : s;
4167
+ }
4168
+ if (typeof r != "string")
4169
+ return r === 0 ? r : +r;
4170
+ r = r.replace(nt, "");
4171
+ var f = $.test(r);
4172
+ return f || Ae.test(r) ? Qe(r.slice(2), f ? 2 : 8) : ue.test(r) ? h : +r;
4173
+ }
4174
+ function ci(r) {
4175
+ return r == null ? "" : Wo(r);
4176
+ }
4177
+ function ui(r, s, f) {
4178
+ var y = r == null ? void 0 : or(r, s);
4179
+ return y === void 0 ? f : y;
4180
+ }
4181
+ function di(r, s) {
4182
+ return r != null && Qo(r, s, zo);
4183
+ }
4184
+ function Nn(r) {
4185
+ return fr(r) ? $o(r) : jo(r);
4186
+ }
4187
+ function fi(r) {
4188
+ return r;
4189
+ }
4190
+ function gi(r) {
4191
+ return rn(r) ? oe(on(r)) : Go(r);
4192
+ }
4193
+ e.exports = ri;
4194
+ })(Cn, Cn.exports);
4195
+ var Ia = Cn.exports;
4196
+ const Rt = /* @__PURE__ */ bi(Ia), Oa = Pt.div``, Ta = Pt.div`
4197
+ box-sizing: border-box;
4198
+ display: flex;
4199
+ flex-direction: ${(e) => e.verticalDisplay ? "column" : "row"};
4200
+ ${(e) => e.horizontalDisplay == !1 && "flex-wrap: wrap;"}
4201
+ overflow: auto;
4202
+ `, Na = (e) => so({ ...e, wasDragging: !0 }), Ma = {
4203
+ sideEffects: no({
4204
+ styles: {
4205
+ active: {
4206
+ opacity: "0.5"
4207
+ }
4208
+ }
4209
+ })
4210
+ }, La = () => {
4211
+ const [e, t] = he(!1);
4212
+ return K(() => {
4213
+ const n = setTimeout(() => t(!0), 500);
4214
+ return () => clearTimeout(n);
4215
+ }, []), e;
4216
+ }, jn = (e, t) => {
4217
+ if (e)
4218
+ return Mt(
4219
+ t,
4220
+ "KanbanCard",
4221
+ e,
4222
+ "enabled",
4223
+ "highlight"
4224
+ );
4225
+ }, Pa = ({
4226
+ children: e,
4227
+ containerId: t,
4228
+ columns: n = 1,
4229
+ disabled: o,
4230
+ id: i,
4231
+ items: a,
4232
+ className: l,
4233
+ renderFooterContent: c,
4234
+ maxContainerHeight: d,
4235
+ style: u,
4236
+ ...h
4237
+ }) => {
4238
+ var R;
4239
+ const {
4240
+ active: g,
4241
+ attributes: w,
4242
+ isDragging: b,
4243
+ listeners: A,
4244
+ over: v,
4245
+ setNodeRef: x,
4246
+ transition: S,
4247
+ transform: E
4248
+ } = lo({
4249
+ id: i,
4250
+ data: {
4251
+ type: "container",
4252
+ children: a
4253
+ },
4254
+ animateLayoutChanges: Na
4255
+ }), D = v ? i === v.id && ((R = g == null ? void 0 : g.data.current) == null ? void 0 : R.type) !== "container" || a.includes(v.id) : !1;
4256
+ return /* @__PURE__ */ ae(
4257
+ co,
4258
+ {
4259
+ ref: o ? void 0 : x,
4260
+ style: {
4261
+ ...u,
4262
+ transition: S,
4263
+ transform: bt.Translate.toString(E),
4264
+ opacity: b ? 0.5 : void 0
4265
+ },
4266
+ className: l,
4267
+ hover: D,
4268
+ handleProps: {
4269
+ ...w,
4270
+ ...A
4271
+ },
4272
+ containerId: t,
4273
+ renderFooterContent: c,
4274
+ maxContainerHeight: d,
4275
+ ...h,
4276
+ children: e
4277
+ }
4278
+ );
4279
+ }, $a = ({
4280
+ disabled: e,
4281
+ id: t,
4282
+ item: n,
4283
+ index: o,
4284
+ renderItem: i,
4285
+ style: a = {},
4286
+ containerId: l,
4287
+ getIndex: c,
4288
+ wrapperStyle: d,
4289
+ cardProps: u,
4290
+ theme: h,
4291
+ renderContent: g,
4292
+ color: w
4293
+ }) => {
4294
+ const {
4295
+ setNodeRef: b,
4296
+ setActivatorNodeRef: A,
4297
+ listeners: v,
4298
+ isDragging: x,
4299
+ isSorting: S,
4300
+ over: E,
4301
+ overIndex: D,
4302
+ transform: R,
4303
+ transition: T,
4304
+ attributes: _
4305
+ } = lo({
4306
+ id: t
4307
+ }), O = La(), M = x && !O;
4308
+ return /* @__PURE__ */ ae(
4309
+ Xn,
4310
+ {
4311
+ ref: e ? void 0 : b,
4312
+ cardProps: u,
4313
+ value: t,
4314
+ dragging: x,
4315
+ sorting: S,
4316
+ handle: (u == null ? void 0 : u.handle) !== !1,
4317
+ handleProps: {
4318
+ ..._,
4319
+ ...v
4320
+ },
4321
+ index: o,
4322
+ wrapperStyle: d({ index: o }),
4323
+ style: {
4324
+ ...a,
4325
+ index: o,
4326
+ value: t,
4327
+ isDragging: x,
4328
+ isSorting: S,
4329
+ overIndex: E ? c(E.id) : D,
4330
+ containerId: l
4331
+ },
4332
+ color: jn(n == null ? void 0 : n.color, h),
4333
+ transition: T,
4334
+ transform: R,
4335
+ fadeIn: M,
4336
+ listeners: v,
4337
+ renderItem: i,
4338
+ children: g(n == null ? void 0 : n.content, t, {
4339
+ ...u,
4340
+ handleProps: { ..._, ...v },
4341
+ item: n,
4342
+ containerId: l
4343
+ })
4344
+ }
4345
+ );
4346
+ }, Ba = k.forwardRef((e, t) => {
4347
+ const {
4348
+ horizontalDisplay: n = !1,
4349
+ verticalDisplay: o = !1,
4350
+ adjustScale: i = !1,
4351
+ itemCount: a = 5,
4352
+ cancelDrop: l,
4353
+ columns: c,
4354
+ handle: d = !1,
4355
+ containerStyle: u,
4356
+ coordinateGetter: h = ga,
4357
+ getItemStyles: g = (p) => ({ ...p }),
4358
+ wrapperStyle: w = (p) => ({ ...p }),
4359
+ minimal: b = !1,
4360
+ modifiers: A,
4361
+ renderItem: v,
4362
+ strategy: x = Ir,
4363
+ scrollable: S,
4364
+ maxContainerHeight: E,
4365
+ cardProps: D,
4366
+ headerProps: R,
4367
+ footerProps: T,
4368
+ //---------------------------
4369
+ data: _ = [],
4370
+ columnInfo: O = {},
4371
+ onColumnMoved: M = () => {
4372
+ },
4373
+ onCardMoved: H = () => {
4374
+ },
4375
+ onCardChangedColumns: U = () => {
4376
+ },
4377
+ //---------------------------
4378
+ color: B = "primary",
4379
+ size: re = "small",
4380
+ children: Q,
4381
+ ...Re
4382
+ } = e, Xe = kn(), [F, J] = he(
4383
+ () => _ ?? {
4384
+ A: Tr(a, (p) => `A${p + 1}`),
4385
+ B: Tr(a, (p) => `B${p + 1}`)
4386
+ }
4387
+ ), [Le, Oe] = he(Object.keys(_)), [ce, Pe] = he(null), V = Y(null), we = Y(!1), je = ce ? Le.includes(ce) : !1, tt = be(
4388
+ (p) => {
4389
+ var G;
4390
+ if (ce && ce in F)
4391
+ return yr({
4392
+ ...p,
4393
+ droppableContainers: p.droppableContainers.filter(
4394
+ (de) => de.id in F
4395
+ )
4396
+ });
4397
+ const m = ji(p), N = m.length > 0 ? (
4398
+ // If there are droppables intersecting with the pointer, return those
4399
+ m
4400
+ ) : $r(p);
4401
+ let q = Vn(N, "id");
4402
+ if (q != null) {
4403
+ if (q in F) {
4404
+ const de = F[q];
4405
+ de.length > 0 && (q = (G = yr({
4406
+ ...p,
4407
+ droppableContainers: p.droppableContainers.filter(
4408
+ (ee) => ee.id !== q && de.map((oe) => oe.id).includes(ee.id)
4409
+ )
4410
+ })[0]) == null ? void 0 : G.id);
4411
+ }
4412
+ return V.current = q, [{ id: q }];
4413
+ }
4414
+ return we.current && (V.current = ce), V.current ? [{ id: V.current }] : [];
4415
+ },
4416
+ [ce, F]
4417
+ ), [Z, nt] = he([]), $e = zi(
4418
+ Ln(Wr),
4419
+ Ln(qr),
4420
+ Ln(er, {
4421
+ coordinateGetter: h
4422
+ })
4423
+ );
4424
+ Di(() => {
4425
+ J(_), Oe(Object.keys(_));
4426
+ }), Ci(() => {
4427
+ J(_), Oe(Object.keys(_));
4428
+ }, [_]), K(() => {
4429
+ requestAnimationFrame(() => {
4430
+ we.current = !1;
4431
+ });
4432
+ }, [F]);
4433
+ const ue = (p) => p in F ? p : Object.keys(F).find(
4434
+ (m) => F[m].map((N) => N.id).includes(p)
4435
+ ), $ = (p) => {
4436
+ const m = ue(p);
4437
+ return m ? Rt(F[m], (N) => N.id == p) : -1;
4438
+ }, rt = () => {
4439
+ Z && J(Z), Pe(null), nt(null);
4440
+ }, Ae = (p) => {
4441
+ Pe(p.active.id), nt(F);
4442
+ }, Ve = (p) => {
4443
+ const { active: m, over: N } = p, q = N == null ? void 0 : N.id;
4444
+ if (q == null || m.id in F)
4445
+ return;
4446
+ const G = ue(q), de = ue(m.id);
4447
+ !G || !de || de !== G && J((ee) => {
4448
+ const oe = ee[de], pe = ee[G], ye = Rt(pe, (Te) => Te.id == q), ot = Rt(oe, (Te) => Te.id == m.id);
4449
+ let te;
4450
+ if (q in ee)
4451
+ te = pe.length + 1;
4452
+ else {
4453
+ const mt = N && m.rect.current.translated && m.rect.current.translated.top > N.rect.top + N.rect.height ? 1 : 0;
4454
+ te = ye >= 0 ? ye + mt : pe.length + 1;
4455
+ }
4456
+ return U(m.id), we.current = !0, {
4457
+ ...ee,
4458
+ [de]: ee[de].filter(
4459
+ (Te) => Te.id != m.id
4460
+ ),
4461
+ [G]: [
4462
+ ...ee[G].slice(0, te),
4463
+ ee[de][ot],
4464
+ ...ee[G].slice(
4465
+ te,
4466
+ ee[G].length
4467
+ )
4468
+ ]
4469
+ };
4470
+ });
4471
+ }, P = (p) => {
4472
+ const { active: m, over: N } = p;
4473
+ var q = !1, G = wi(F);
4474
+ m.id in F && (N != null && N.id) && Oe((ie) => {
4475
+ q = !0;
4476
+ const fe = ie.indexOf(m.id), Be = ie.indexOf(N.id);
4477
+ var et = jt(ie, fe, Be);
4478
+ return m.id !== N.id && M(p, et), et;
4479
+ });
4480
+ const de = ue(m.id);
4481
+ if (!de) {
4482
+ Pe(null);
4483
+ return;
4484
+ }
4485
+ const ee = N == null ? void 0 : N.id;
4486
+ if (ee == null) {
4487
+ Pe(null);
4488
+ return;
4489
+ }
4490
+ const oe = ue(ee);
4491
+ if (oe) {
4492
+ const ie = Rt(
4493
+ F[de],
4494
+ (Be) => Be.id == m.id
4495
+ ), fe = Rt(F[oe], (Be) => Be.id == ee);
4496
+ ie !== fe && (G = {
4497
+ ...G,
4498
+ [oe]: jt(
4499
+ G[oe],
4500
+ ie,
4501
+ fe
4502
+ )
4503
+ }, J((Be) => ({
4504
+ ...Be,
4505
+ [oe]: jt(
4506
+ Be[oe],
4507
+ ie,
4508
+ fe
4509
+ )
4510
+ })));
4511
+ }
4512
+ if (!q) {
4513
+ var pe, ye = null, ot, te = -1, Te = Object.keys(Z), mt = Object.keys(G);
4514
+ Te.forEach((ie) => {
4515
+ if (Z[ie].map((fe) => fe.id.toString()).includes(m.id.toString())) {
4516
+ pe = ie, ot = Rt(Z[ie], (fe) => fe.id == m.id);
4517
+ return;
4518
+ }
4519
+ }), mt.forEach((ie) => {
4520
+ if (G[ie].map((fe) => fe.id.toString()).includes(m.id.toString())) {
4521
+ ye = ie, te = Rt(G[ie], (fe) => fe.id == m.id);
4522
+ return;
4523
+ }
4524
+ }), pe === ye && ot !== te && H(p, G, ye), pe !== ye && U(p, G, ye, pe);
4525
+ }
4526
+ Pe(null);
4527
+ }, Qe = (p) => {
4528
+ var m = null;
4529
+ return Le.forEach((N) => {
4530
+ F[N].forEach((q) => {
4531
+ if (q.id == p) {
4532
+ m = q;
4533
+ return;
4534
+ }
4535
+ });
4536
+ }), /* @__PURE__ */ ae(
4537
+ Xn,
4538
+ {
4539
+ value: p,
4540
+ handle: d,
4541
+ cardProps: D,
4542
+ style: g({
4543
+ containerId: ue(p),
4544
+ overIndex: -1,
4545
+ index: $(p),
4546
+ value: p,
4547
+ isSorting: !0,
4548
+ isDragging: !0,
4549
+ isDragOverlay: !0
4550
+ }),
4551
+ color: jn(m == null ? void 0 : m.color, Xe),
4552
+ wrapperStyle: w({ index: 0 }),
4553
+ renderItem: v,
4554
+ dragOverlay: !0,
4555
+ children: Ze(m == null ? void 0 : m.content, p, { ...D, item: m }) || {
4556
+ name: p
4557
+ }
4558
+ }
4559
+ );
4560
+ }, Ye = (p) => /* @__PURE__ */ ae(
4561
+ co,
4562
+ {
4563
+ label: yt(p),
4564
+ columns: c,
4565
+ style: {
4566
+ height: "100%"
4567
+ },
4568
+ shadow: !0,
4569
+ unstyled: !1,
4570
+ containerId: p,
4571
+ renderFooterContent: Ee,
4572
+ children: F[p].map((m, N) => /* @__PURE__ */ ae(
4573
+ Xn,
4574
+ {
4575
+ cardProps: D,
4576
+ value: m.id,
4577
+ handle: d,
4578
+ style: g({
4579
+ containerId: p,
4580
+ overIndex: -1,
4581
+ index: $(m),
4582
+ value: m,
4583
+ isDragging: !1,
4584
+ isSorting: !1,
4585
+ isDragOverlay: !1
4586
+ }),
4587
+ color: jn(m == null ? void 0 : m.color, Xe),
4588
+ wrapperStyle: w({ index: N }),
4589
+ renderItem: v,
4590
+ children: Ze(m == null ? void 0 : m.content, m == null ? void 0 : m.id, {
4591
+ ...D,
4592
+ item: m,
4593
+ containerId: p
4594
+ })
4595
+ },
4596
+ m.id
4597
+ ))
4598
+ }
4599
+ ), yt = (p) => {
4600
+ let m = c == null ? void 0 : c.find((N) => N.id == (p == null ? void 0 : p.toString()));
4601
+ return Ot(
4602
+ Tt("KANBAN_HEADER", p, Q),
4603
+ {
4604
+ ...R,
4605
+ item: { [p]: F[p] },
4606
+ column: m
4607
+ },
4608
+ m == null ? void 0 : m.header,
4609
+ !0
4610
+ ) || Ot(
4611
+ Tt("KANBAN_HEADER", null, Q),
4612
+ {
4613
+ ...R,
4614
+ item: { [p]: F[p] },
4615
+ column: m
4616
+ },
4617
+ m == null ? void 0 : m.header,
4618
+ !0
4619
+ ) || /* @__PURE__ */ ae(
4620
+ xi,
4621
+ {
4622
+ id: p,
4623
+ color: B,
4624
+ size: re,
4625
+ item: { [p]: F[p] },
4626
+ column: m,
4627
+ ...R,
4628
+ children: m == null ? void 0 : m.header
4629
+ }
4630
+ );
4631
+ }, Ee = (p) => Ot(
4632
+ Tt("KANBAN_FOOTER", p, Q),
4633
+ {
4634
+ ...T,
4635
+ id: p
4636
+ },
4637
+ null
4638
+ ) || Ot(
4639
+ Tt("KANBAN_FOOTER", null, Q),
4640
+ {
4641
+ ...T,
4642
+ id: p
4643
+ },
4644
+ null
4645
+ ), Ze = (p, m, N) => Ot(
4646
+ Tt("KANBAN_CARD", m, Q),
4647
+ {
4648
+ ...N
4649
+ },
4650
+ p,
4651
+ !0
4652
+ ) || Ot(
4653
+ Tt("KANBAN_CARD", null, Q),
4654
+ {
4655
+ ...N
4656
+ },
4657
+ p,
4658
+ !0
4659
+ ) || /* @__PURE__ */ ae(mi, { color: B, size: re, ...N, children: p });
4660
+ return /* @__PURE__ */ ae(Oa, { ref: t, ...Re, children: /* @__PURE__ */ pn(
4661
+ Ls,
4662
+ {
4663
+ measuring: {
4664
+ droppable: {
4665
+ strategy: Lt.Always
4666
+ }
4667
+ },
4668
+ sensors: $e,
4669
+ collisionDetection: tt,
4670
+ modifiers: A,
4671
+ cancelDrop: l,
4672
+ onDragCancel: rt,
4673
+ onDragStart: Ae,
4674
+ onDragOver: Ve,
4675
+ onDragEnd: P,
4676
+ children: [
4677
+ /* @__PURE__ */ ae(
4678
+ Ta,
4679
+ {
4680
+ horizontalDisplay: n,
4681
+ verticalDisplay: o,
4682
+ children: /* @__PURE__ */ ae(
4683
+ Or,
4684
+ {
4685
+ items: [...Le],
4686
+ strategy: o ? Ir : na,
4687
+ children: Le.map((p) => /* @__PURE__ */ ae(
4688
+ Pa,
4689
+ {
4690
+ id: p,
4691
+ label: b ? void 0 : yt(p),
4692
+ items: F[p],
4693
+ color: B,
4694
+ scrollable: S,
4695
+ style: u,
4696
+ unstyled: b,
4697
+ containerId: p,
4698
+ renderFooterContent: Ee,
4699
+ maxContainerHeight: E,
4700
+ ...R,
4701
+ children: /* @__PURE__ */ ae(Or, { items: F[p], strategy: x, children: F[p].map((m, N) => /* @__PURE__ */ ae(
4702
+ $a,
4703
+ {
4704
+ disabled: je || (m == null ? void 0 : m.disabled),
4705
+ id: m.id,
4706
+ item: m,
4707
+ index: N,
4708
+ style: g,
4709
+ wrapperStyle: w,
4710
+ renderItem: v,
4711
+ containerId: p,
4712
+ getIndex: $,
4713
+ cardProps: D,
4714
+ theme: Xe,
4715
+ renderContent: Ze
4716
+ },
4717
+ m.id
4718
+ )) })
4719
+ },
4720
+ p
4721
+ ))
4722
+ }
4723
+ )
4724
+ }
4725
+ ),
4726
+ At.createPortal(
4727
+ /* @__PURE__ */ ae(Qs, { adjustScale: i, dropAnimation: Ma, children: ce ? Le.includes(ce) ? Ye(ce) : Qe(ce) : null }),
4728
+ document.body
4729
+ )
4730
+ ]
4731
+ }
4732
+ ) });
4733
+ });
4734
+ Ba.propTypes = {
4735
+ horizontalDisplay: W.bool,
4736
+ verticalDisplay: W.bool,
4737
+ adjustScale: W.bool,
4738
+ //Number of items in container
4739
+ itemCount: W.bool,
4740
+ cancelDrop: W.func,
4741
+ /**
4742
+ * type of: [{id: `<string | number>`, content: `<string | element>`}, ...]
4743
+ */
4744
+ columns: W.array,
4745
+ handle: W.bool,
4746
+ // containerStyle,
4747
+ // coordinateGetter = multipleContainersCoordinateGetter,
4748
+ getItemStyles: W.func,
4749
+ wrapperStyle: W.func,
4750
+ minimal: W.bool,
4751
+ // modifiers,
4752
+ renderItem: W.func,
4753
+ // strategy = verticalListSortingStrategy,
4754
+ scrollable: W.bool,
4755
+ cardProps: W.any,
4756
+ headerProps: W.any,
4757
+ footerProps: W.any,
4758
+ //---------------------------
4759
+ /**
4760
+ * Type of:
4761
+ * { < string | number >:
4762
+ * array[{ id< string | number >,
4763
+ * name< string >,
4764
+ * content< element >,
4765
+ * color< "primary" | "secondary" | "danger" | "warning" | "information" | "neutral" >]}] }
4766
+ */
4767
+ data: W.object,
4768
+ columnInfo: W.object,
4769
+ onColumnMoved: W.func,
4770
+ onCardMoved: W.func,
4771
+ onCardChangedColumns: W.func,
4772
+ /**
4773
+ * Max height of column container (cards list) before scroll appears.
4774
+ */
4775
+ maxContainerHeight: W.string,
4776
+ //----------------
4777
+ className: W.string,
4778
+ style: W.object,
4779
+ color: W.oneOf([
4780
+ "primary",
4781
+ "secondary",
4782
+ "success",
4783
+ "warning",
4784
+ "danger",
4785
+ "information",
4786
+ "neutral",
4787
+ "gray"
4788
+ ]),
4789
+ size: W.oneOf(["small", "medium", "large"])
4790
+ };
4791
+ export {
4792
+ Ba as default
4793
+ };