@blofin/blofin-ui 0.7.58 → 0.7.59
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.
- package/dist/Badge.es.js +8 -10
- package/dist/Button.es.js +125 -127
- package/dist/Dialog.es.js +10 -180
- package/dist/Divider.es.js +10 -12
- package/dist/Drawer.es.js +51 -44
- package/dist/Form.d.ts +1 -0
- package/dist/Form.es.js +752 -0
- package/dist/ProTable-63e2c020.js +3444 -0
- package/dist/ProTable.es.js +6 -9
- package/dist/Slider.es.js +140 -141
- package/dist/Sort.es.js +10 -144
- package/dist/blofin.css +1 -1
- package/dist/{close-0df24351.js → close-c67ec245.js} +0 -1
- package/dist/clsx.m-b14a941b.js +32 -0
- package/dist/components/Alert/Alert.d.ts +3 -3
- package/dist/components/Alert/styles.d.ts +2 -2
- package/dist/components/Badge/Badge.d.ts +2 -2
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Button/Loading/index.d.ts +2 -2
- package/dist/components/Button/index.d.ts +0 -2
- package/dist/components/Button/styles.d.ts +1 -1
- package/dist/components/Checkbox/styles.d.ts +1 -1
- package/dist/components/CssDropdown/CssDropdown.d.ts +3 -3
- package/dist/components/DatePickerRange/styles.d.ts +1 -0
- package/dist/components/DateTimePicker/ScrollableList.d.ts +1 -1
- package/dist/components/Dialog/Dialog.d.ts +2 -5
- package/dist/components/Dialog/index.d.ts +2 -4
- package/dist/components/Dialog/styles.d.ts +2 -2
- package/dist/components/Drawer/Drawer.d.ts +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts +2 -2
- package/dist/components/Empty/index.d.ts +5 -2
- package/dist/components/Form/Control.d.ts +13 -0
- package/dist/components/Form/Form.d.ts +4 -0
- package/dist/components/Form/FormItem.d.ts +4 -0
- package/dist/components/Form/FormLabel.d.ts +4 -0
- package/dist/components/Form/context.d.ts +6 -0
- package/dist/components/Form/index.d.ts +8 -0
- package/dist/components/Form/interface.d.ts +48 -0
- package/dist/components/Form/store.d.ts +16 -0
- package/dist/components/Form/styles/item.d.ts +5 -0
- package/dist/components/Form/useForm.d.ts +3 -0
- package/dist/components/LabelTextField/LabelTextField.d.ts +6 -6
- package/dist/components/MonthPicker/index.d.ts +17 -2
- package/dist/components/MultiSelect/MultiSelect.d.ts +4 -4
- package/dist/components/Notification/Notification.d.ts +1 -1
- package/dist/components/Pagination/PageOptions.d.ts +1 -1
- package/dist/components/Pagination/Pagination.d.ts +2 -2
- package/dist/components/Picker/hooks/usePickerMethod.d.ts +1 -1
- package/dist/components/Picker/index.d.ts +10 -2
- package/dist/components/Popover/Popover.d.ts +1 -1
- package/dist/components/Popup/index.d.ts +15 -4
- package/dist/components/RadioButton/RadioButton.d.ts +4 -4
- package/dist/components/RadioButton/styles.d.ts +1 -1
- package/dist/components/Select/Select.d.ts +9 -6
- package/dist/components/Slider/Slider.d.ts +2 -2
- package/dist/components/Sort/SortButton.d.ts +5 -5
- package/dist/components/Sort/SortGroup.d.ts +4 -4
- package/dist/components/Sort/index.d.ts +6 -5
- package/dist/components/Sortable/SortItem.d.ts +4 -4
- package/dist/components/Sortable/index.d.ts +11 -3
- package/dist/components/Switch/Switch.d.ts +2 -2
- package/dist/components/Switch/styles.d.ts +3 -3
- package/dist/components/Tab/Tab.d.ts +2 -2
- package/dist/components/Tab/styles.d.ts +1 -1
- package/dist/components/Table/Pagination/index.d.ts +2 -2
- package/dist/components/Table/Table.d.ts +2 -2
- package/dist/components/Table/Tbody/index.d.ts +3 -3
- package/dist/components/Table/Thead/index.d.ts +3 -3
- package/dist/components/Table/context.d.ts +3 -3
- package/dist/components/Table/hooks/useStickyOffset.d.ts +3 -3
- package/dist/components/Table/index.d.ts +3 -3
- package/dist/components/Table/interface.d.ts +4 -4
- package/dist/components/TextField/TextField.d.ts +4 -4
- package/dist/components/TextField/index.d.ts +0 -2
- package/dist/components/TextSelect/TextSelect.d.ts +8 -8
- package/dist/components/Textarea/index.d.ts +15 -2
- package/dist/components/Toast/Toast.d.ts +13 -2
- package/dist/components/Toast/styles.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +5 -4
- package/dist/components/Typography/Typography.d.ts +2 -2
- package/dist/components/Typography/styles.d.ts +1 -1
- package/dist/hooks/useLatest.d.ts +1 -1
- package/dist/hooks/useNotification.d.ts +7 -5
- package/dist/hooks/useToast.d.ts +1 -1
- package/dist/{index-4f94d7fa.js → index-001dd0f7.js} +39 -24
- package/dist/{index-29d37c73.js → index-003572ca.js} +67 -52
- package/dist/{index-57a163fd.js → index-0330bc93.js} +28 -13
- package/dist/{index-d81e15f3.js → index-05bf2879.js} +34 -19
- package/dist/{index-b54ef52a.js → index-0773f9b5.js} +31 -16
- package/dist/{index-6856be22.js → index-0c50dcda.js} +38 -23
- package/dist/{index-7cf9b111.js → index-0e6d56f6.js} +33 -18
- package/dist/{index-a89abb42.js → index-0eb53476.js} +19 -4
- package/dist/{index-0230b5a9.js → index-0f855a91.js} +4 -5
- package/dist/{index-cbc0d36b.js → index-10144af4.js} +30 -15
- package/dist/{index-06d0f2f7.js → index-11dc8e91.js} +28 -13
- package/dist/{index-c6371af1.js → index-14eba896.js} +25 -10
- package/dist/{index-c1381bca.js → index-18869ac6.js} +35 -20
- package/dist/{index-1b2a64df.js → index-189196e6.js} +46 -31
- package/dist/{index-898678dc.js → index-198ccc85.js} +45 -30
- package/dist/{index-e2b960e4.js → index-1b087231.js} +38 -23
- package/dist/{index-f40f45fb.js → index-204cbb23.js} +30 -15
- package/dist/{index-4df0c3e4.js → index-220ed10a.js} +31 -16
- package/dist/{index-67678963.js → index-28a6835c.js} +48 -33
- package/dist/{index-e98ef24f.js → index-2d400fe1.js} +32 -17
- package/dist/{index-e8fb69e0.js → index-2e0c8d16.js} +37 -22
- package/dist/{index-cc1cd309.js → index-2e784550.js} +28 -13
- package/dist/index-304d7874.js +64 -0
- package/dist/{index-12d32536.js → index-3375e2e3.js} +28 -13
- package/dist/{index-954d3973.js → index-36521981.js} +28 -13
- package/dist/{index-cfee583b.js → index-377dc190.js} +36 -21
- package/dist/{index-4f94900a.js → index-390505ce.js} +34 -19
- package/dist/index-40626e62.js +174 -0
- package/dist/{index-b0da3dfd.js → index-41bebee7.js} +39 -24
- package/dist/{index-5fb7b3bc.js → index-45cfa2f3.js} +27 -12
- package/dist/{index-80cc70e4.js → index-47408940.js} +41 -26
- package/dist/{index-141cec17.js → index-4b9249fc.js} +29 -14
- package/dist/index-543e2f77.js +65 -0
- package/dist/index-563cafee.js +64 -0
- package/dist/index-5956ed9f.js +11569 -0
- package/dist/{index-b103ed31.js → index-59c7d611.js} +27 -12
- package/dist/{index-d2f2742e.js → index-5bc791c5.js} +30 -15
- package/dist/{index-03513979.js → index-5f3da225.js} +26 -11
- package/dist/{index-8aa9b1be.js → index-603f0f2a.js} +39 -24
- package/dist/{index-4bc493f0.js → index-636a6216.js} +19 -4
- package/dist/{index-2334248a.js → index-640dc4ab.js} +24 -9
- package/dist/{index-73bfc020.js → index-64ba8d88.js} +47 -32
- package/dist/{index-2ae0474b.js → index-65986673.js} +39 -24
- package/dist/{index-6f728206.js → index-65df0a7b.js} +24 -9
- package/dist/{index-02f669c4.js → index-6e4d9a19.js} +1 -2
- package/dist/{index-360aaaac.js → index-7241c703.js} +46 -31
- package/dist/index-7272669e.js +36 -0
- package/dist/{index-9c73c442.js → index-73673cf3.js} +60 -45
- package/dist/{index-08a64465.js → index-74676234.js} +31 -16
- package/dist/{index-7edb6aec.js → index-770fe605.js} +34 -19
- package/dist/{index-5beeed26.js → index-772d6529.js} +38 -23
- package/dist/{index-6e969585.js → index-797b8f6c.js} +52 -37
- package/dist/{index-a6fa33ce.js → index-7c12aa98.js} +28 -13
- package/dist/{index-5e6ffc2f.js → index-7e7cdd81.js} +1 -2
- package/dist/{index-03169373.js → index-81072b24.js} +37 -22
- package/dist/{index-75190b99.js → index-8684e896.js} +22 -7
- package/dist/{index-7bb9ffdf.js → index-89f184f3.js} +2 -3
- package/dist/{index-40710f09.js → index-8a7c46ae.js} +41 -26
- package/dist/{index-117d018c.js → index-8cec0e82.js} +37 -22
- package/dist/{index-094d2a65.js → index-91062be2.js} +34 -19
- package/dist/{index-d3419554.js → index-9253a5ce.js} +30 -15
- package/dist/index-95c68eda.js +152 -0
- package/dist/{index-956b36a6.js → index-9eaebb69.js} +45 -30
- package/dist/{index-63a66f13.js → index-a4077786.js} +45 -30
- package/dist/{index-e9a1ff7f.js → index-ad2acfd2.js} +19 -4
- package/dist/{index-fdffd6e6.js → index-af60bed6.js} +29 -14
- package/dist/{index-fda88eb4.js → index-b5ff5e93.js} +45 -30
- package/dist/{index-11268759.js → index-bba889fc.js} +33 -18
- package/dist/{index-b7941b97.js → index-c002eb57.js} +23 -8
- package/dist/{index-4c6ad36c.js → index-c73b6cc3.js} +47 -32
- package/dist/{index-60fe7f16.js → index-c81a4a2a.js} +32 -17
- package/dist/{index-f7c4ae83.js → index-c8690f0a.js} +48 -33
- package/dist/{index-79e7317f.js → index-cdaffd70.js} +27 -12
- package/dist/{index-4d780cf4.js → index-cf872561.js} +37 -22
- package/dist/{index-cb1218d8.js → index-dafac81d.js} +25 -10
- package/dist/{index-19d177fe.js → index-db7c7495.js} +31 -16
- package/dist/{index-f1726c63.js → index-dbd4bd27.js} +29 -14
- package/dist/{index-ceae4147.js → index-dc23eb8b.js} +27 -12
- package/dist/{index-9e5efc0a.js → index-dc69cdd8.js} +45 -30
- package/dist/{index-c69f6dfc.js → index-e6091315.js} +36 -21
- package/dist/{index-06ef2e10.js → index-e869e999.js} +28 -13
- package/dist/{index-03d6aef0.js → index-f0c42ec9.js} +33 -18
- package/dist/{index-f64eddcc.js → index-f16b36a5.js} +31 -16
- package/dist/{index-e1a6a03d.js → index-f4d65525.js} +24 -9
- package/dist/index-f53123c7.js +64 -0
- package/dist/{index-770e5f53.js → index-f753119c.js} +27 -12
- package/dist/{index-8585c2f3.js → index-f83dab77.js} +38 -23
- package/dist/{index-6f963c6a.js → index-f852d9b6.js} +35 -20
- package/dist/{index-3ee2bafa.js → index-fa51b278.js} +30 -15
- package/dist/{index-e169373b.js → index-fc135912.js} +25 -10
- package/dist/{index-ef31f5f8.js → index-fcb1ec65.js} +1 -2
- package/dist/{index-d86842c8.js → index-ff943066.js} +34 -19
- package/dist/index.d.ts +48 -36
- package/dist/index.es.js +56 -223
- package/dist/isObjectLike-1b8bbac2.js +44 -0
- package/dist/jsx-runtime-82a9ddf6.js +646 -0
- package/dist/provider/NoticeProvider.d.ts +1 -1
- package/dist/provider/ThemeProvider.d.ts +3 -7
- package/dist/provider/useTheme.d.ts +1 -1
- package/dist/types/component.d.ts +1 -1
- package/dist/utils/helper.d.ts +1 -1
- package/dist/{utils-071abd68.js → utils-cacf528c.js} +1 -2
- package/package.json +3 -2
- package/dist/Calendar.d.ts +0 -1
- package/dist/Calendar.es.js +0 -210
- package/dist/Checkbox.d.ts +0 -1
- package/dist/Checkbox.es.js +0 -138
- package/dist/CssDropdown.d.ts +0 -1
- package/dist/CssDropdown.es.js +0 -38
- package/dist/DatePickerRange.d.ts +0 -1
- package/dist/DatePickerRange.es.js +0 -410
- package/dist/DateTimePicker.d.ts +0 -1
- package/dist/DateTimePicker.es.js +0 -519
- package/dist/Dropdown.d.ts +0 -1
- package/dist/Dropdown.es.js +0 -134
- package/dist/Empty.d.ts +0 -1
- package/dist/Empty.es.js +0 -11
- package/dist/LabelTextField.d.ts +0 -1
- package/dist/LabelTextField.es.js +0 -100
- package/dist/MonthPicker.d.ts +0 -1
- package/dist/MonthPicker.es.js +0 -16
- package/dist/MultiSelect.d.ts +0 -1
- package/dist/MultiSelect.es.js +0 -425
- package/dist/Notification.d.ts +0 -1
- package/dist/Notification.es.js +0 -12
- package/dist/Pagination.d.ts +0 -1
- package/dist/Pagination.es.js +0 -219
- package/dist/Picker.d.ts +0 -1
- package/dist/Picker.es.js +0 -224
- package/dist/Popover.d.ts +0 -1
- package/dist/Popover.es.js +0 -107
- package/dist/Popup.d.ts +0 -1
- package/dist/Popup.es.js +0 -62
- package/dist/ProTable-7a07d8b6.js +0 -565
- package/dist/RadioButton.d.ts +0 -1
- package/dist/RadioButton.es.js +0 -152
- package/dist/Select.d.ts +0 -1
- package/dist/Select.es.js +0 -316
- package/dist/Sortable.d.ts +0 -1
- package/dist/Sortable.es.js +0 -39
- package/dist/Switch.d.ts +0 -1
- package/dist/Switch.es.js +0 -64
- package/dist/Tab.d.ts +0 -1
- package/dist/Tab.es.js +0 -101
- package/dist/Table.d.ts +0 -1
- package/dist/Table.es.js +0 -359
- package/dist/TextField.d.ts +0 -1
- package/dist/TextField.es.js +0 -64
- package/dist/TextSelect.d.ts +0 -1
- package/dist/TextSelect.es.js +0 -17
- package/dist/Textarea.d.ts +0 -1
- package/dist/Textarea.es.js +0 -106
- package/dist/Toast.d.ts +0 -1
- package/dist/Toast.es.js +0 -12
- package/dist/Tooltip.d.ts +0 -1
- package/dist/Tooltip.es.js +0 -144
- package/dist/Typography.d.ts +0 -1
- package/dist/Typography.es.js +0 -74
- package/dist/_commonjsHelpers-1d52fb73.js +0 -9
- package/dist/arrow-down-011b02c7.js +0 -6
- package/dist/arrow-down-l-line-97e4fe24.js +0 -6
- package/dist/arrow-fill-70becd96.js +0 -6
- package/dist/arrow-right-l-line-87881b4d.js +0 -7
- package/dist/close-bg-6d2211ef.js +0 -6
- package/dist/clsx.m-e965ef18.js +0 -22
- package/dist/components/CssDropdown/index.d.ts +0 -2
- package/dist/components/DatePickerRange/index.d.ts +0 -4
- package/dist/components/DateTimePicker/index.d.ts +0 -4
- package/dist/components/Dropdown/index.d.ts +0 -2
- package/dist/components/Empty/Empty.d.ts +0 -5
- package/dist/components/MonthPicker/MonthPicker.d.ts +0 -17
- package/dist/components/MultiSelect/index.d.ts +0 -2
- package/dist/components/Notification/index.d.ts +0 -2
- package/dist/components/Pagination/index.d.ts +0 -3
- package/dist/components/Picker/Picker.d.ts +0 -10
- package/dist/components/Popover/index.d.ts +0 -5
- package/dist/components/Popup/Popup.d.ts +0 -15
- package/dist/components/Sortable/Sortable.d.ts +0 -11
- package/dist/components/Switch/index.d.ts +0 -2
- package/dist/components/Tab/index.d.ts +0 -4
- package/dist/components/TextSelect/index.d.ts +0 -2
- package/dist/components/Textarea/Textarea.d.ts +0 -15
- package/dist/components/Toast/index.d.ts +0 -2
- package/dist/components/Tooltip/index.d.ts +0 -2
- package/dist/components/Typography/index.d.ts +0 -4
- package/dist/enum-0398044b.js +0 -17
- package/dist/helper-221987f8.js +0 -7
- package/dist/index-293f8244.js +0 -49
- package/dist/index-40023d52.js +0 -5322
- package/dist/index-4528ba11.js +0 -49
- package/dist/index-596c785d.js +0 -50
- package/dist/index-67554651.js +0 -49
- package/dist/index-9349bf2d.js +0 -345
- package/dist/index-b7027a1d.js +0 -1295
- package/dist/index-c57db938.js +0 -37
- package/dist/index-eea69add.js +0 -71
- package/dist/index.esm-71578db5.js +0 -1198
- package/dist/index.module-1d7bbdf8.js +0 -7
- package/dist/index.module-86edc823.js +0 -15
- package/dist/index.module-b4239ff5.js +0 -9
- package/dist/index.module-fb41ba3b.js +0 -39
- package/dist/locales-776f0072.js +0 -440
- package/dist/search-b79a3be5.js +0 -6
- package/dist/sortable.esm-1c13d908.js +0 -2896
- package/dist/sortable.esm-8d31c120.js +0 -1275
- package/dist/styles-85a9fe64.js +0 -136
- package/dist/useAlign-916ed3be.js +0 -44
- package/dist/useDelayEvent-f577f6a3.js +0 -1082
- package/dist/useTheme-0688f238.js +0 -16
|
@@ -1,2896 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import $, { useLayoutEffect as Cn, useEffect as A, useRef as O, useMemo as I, useCallback as k, useState as H, createContext as Xe, memo as Rn, useReducer as En, useContext as pe } from "react";
|
|
3
|
-
import { unstable_batchedUpdates as Je, createPortal as In } from "react-dom";
|
|
4
|
-
function An() {
|
|
5
|
-
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
6
|
-
t[n] = arguments[n];
|
|
7
|
-
return I(
|
|
8
|
-
() => (r) => {
|
|
9
|
-
t.forEach((o) => o(r));
|
|
10
|
-
},
|
|
11
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
12
|
-
t
|
|
13
|
-
);
|
|
14
|
-
}
|
|
15
|
-
const it = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
16
|
-
function Ce(e) {
|
|
17
|
-
const t = Object.prototype.toString.call(e);
|
|
18
|
-
return t === "[object Window]" || // In Electron context the Window object serializes to [object global]
|
|
19
|
-
t === "[object global]";
|
|
20
|
-
}
|
|
21
|
-
function mt(e) {
|
|
22
|
-
return "nodeType" in e;
|
|
23
|
-
}
|
|
24
|
-
function X(e) {
|
|
25
|
-
var t, n;
|
|
26
|
-
return e ? Ce(e) ? e : mt(e) && (t = (n = e.ownerDocument) == null ? void 0 : n.defaultView) != null ? t : window : window;
|
|
27
|
-
}
|
|
28
|
-
function xt(e) {
|
|
29
|
-
const {
|
|
30
|
-
Document: t
|
|
31
|
-
} = X(e);
|
|
32
|
-
return e instanceof t;
|
|
33
|
-
}
|
|
34
|
-
function Ye(e) {
|
|
35
|
-
return Ce(e) ? !1 : e instanceof X(e).HTMLElement;
|
|
36
|
-
}
|
|
37
|
-
function Vt(e) {
|
|
38
|
-
return e instanceof X(e).SVGElement;
|
|
39
|
-
}
|
|
40
|
-
function Re(e) {
|
|
41
|
-
return e ? Ce(e) ? e.document : mt(e) ? xt(e) ? e : Ye(e) || Vt(e) ? e.ownerDocument : document : document : document;
|
|
42
|
-
}
|
|
43
|
-
const ne = it ? Cn : A;
|
|
44
|
-
function Dt(e) {
|
|
45
|
-
const t = O(e);
|
|
46
|
-
return ne(() => {
|
|
47
|
-
t.current = e;
|
|
48
|
-
}), k(function() {
|
|
49
|
-
for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
|
|
50
|
-
r[o] = arguments[o];
|
|
51
|
-
return t.current == null ? void 0 : t.current(...r);
|
|
52
|
-
}, []);
|
|
53
|
-
}
|
|
54
|
-
function On() {
|
|
55
|
-
const e = O(null), t = k((r, o) => {
|
|
56
|
-
e.current = setInterval(r, o);
|
|
57
|
-
}, []), n = k(() => {
|
|
58
|
-
e.current !== null && (clearInterval(e.current), e.current = null);
|
|
59
|
-
}, []);
|
|
60
|
-
return [t, n];
|
|
61
|
-
}
|
|
62
|
-
function Fe(e, t) {
|
|
63
|
-
t === void 0 && (t = [e]);
|
|
64
|
-
const n = O(e);
|
|
65
|
-
return ne(() => {
|
|
66
|
-
n.current !== e && (n.current = e);
|
|
67
|
-
}, t), n;
|
|
68
|
-
}
|
|
69
|
-
function je(e, t) {
|
|
70
|
-
const n = O();
|
|
71
|
-
return I(
|
|
72
|
-
() => {
|
|
73
|
-
const r = e(n.current);
|
|
74
|
-
return n.current = r, r;
|
|
75
|
-
},
|
|
76
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
77
|
-
[...t]
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
function et(e) {
|
|
81
|
-
const t = Dt(e), n = O(null), r = k(
|
|
82
|
-
(o) => {
|
|
83
|
-
o !== n.current && (t == null || t(o, n.current)), n.current = o;
|
|
84
|
-
},
|
|
85
|
-
//eslint-disable-next-line
|
|
86
|
-
[]
|
|
87
|
-
);
|
|
88
|
-
return [n, r];
|
|
89
|
-
}
|
|
90
|
-
function vt(e) {
|
|
91
|
-
const t = O();
|
|
92
|
-
return A(() => {
|
|
93
|
-
t.current = e;
|
|
94
|
-
}, [e]), t.current;
|
|
95
|
-
}
|
|
96
|
-
let dt = {};
|
|
97
|
-
function We(e, t) {
|
|
98
|
-
return I(() => {
|
|
99
|
-
if (t)
|
|
100
|
-
return t;
|
|
101
|
-
const n = dt[e] == null ? 0 : dt[e] + 1;
|
|
102
|
-
return dt[e] = n, e + "-" + n;
|
|
103
|
-
}, [e, t]);
|
|
104
|
-
}
|
|
105
|
-
function qt(e) {
|
|
106
|
-
return function(t) {
|
|
107
|
-
for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++)
|
|
108
|
-
r[o - 1] = arguments[o];
|
|
109
|
-
return r.reduce((i, s) => {
|
|
110
|
-
const a = Object.entries(s);
|
|
111
|
-
for (const [l, c] of a) {
|
|
112
|
-
const u = i[l];
|
|
113
|
-
u != null && (i[l] = u + e * c);
|
|
114
|
-
}
|
|
115
|
-
return i;
|
|
116
|
-
}, {
|
|
117
|
-
...t
|
|
118
|
-
});
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
const Se = /* @__PURE__ */ qt(1), tt = /* @__PURE__ */ qt(-1);
|
|
122
|
-
function Tn(e) {
|
|
123
|
-
return "clientX" in e && "clientY" in e;
|
|
124
|
-
}
|
|
125
|
-
function St(e) {
|
|
126
|
-
if (!e)
|
|
127
|
-
return !1;
|
|
128
|
-
const {
|
|
129
|
-
KeyboardEvent: t
|
|
130
|
-
} = X(e.target);
|
|
131
|
-
return t && e instanceof t;
|
|
132
|
-
}
|
|
133
|
-
function Mn(e) {
|
|
134
|
-
if (!e)
|
|
135
|
-
return !1;
|
|
136
|
-
const {
|
|
137
|
-
TouchEvent: t
|
|
138
|
-
} = X(e.target);
|
|
139
|
-
return t && e instanceof t;
|
|
140
|
-
}
|
|
141
|
-
function pt(e) {
|
|
142
|
-
if (Mn(e)) {
|
|
143
|
-
if (e.touches && e.touches.length) {
|
|
144
|
-
const {
|
|
145
|
-
clientX: t,
|
|
146
|
-
clientY: n
|
|
147
|
-
} = e.touches[0];
|
|
148
|
-
return {
|
|
149
|
-
x: t,
|
|
150
|
-
y: n
|
|
151
|
-
};
|
|
152
|
-
} else if (e.changedTouches && e.changedTouches.length) {
|
|
153
|
-
const {
|
|
154
|
-
clientX: t,
|
|
155
|
-
clientY: n
|
|
156
|
-
} = e.changedTouches[0];
|
|
157
|
-
return {
|
|
158
|
-
x: t,
|
|
159
|
-
y: n
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
return Tn(e) ? {
|
|
164
|
-
x: e.clientX,
|
|
165
|
-
y: e.clientY
|
|
166
|
-
} : null;
|
|
167
|
-
}
|
|
168
|
-
const nt = /* @__PURE__ */ Object.freeze({
|
|
169
|
-
Translate: {
|
|
170
|
-
toString(e) {
|
|
171
|
-
if (!e)
|
|
172
|
-
return;
|
|
173
|
-
const {
|
|
174
|
-
x: t,
|
|
175
|
-
y: n
|
|
176
|
-
} = e;
|
|
177
|
-
return "translate3d(" + (t ? Math.round(t) : 0) + "px, " + (n ? Math.round(n) : 0) + "px, 0)";
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
Scale: {
|
|
181
|
-
toString(e) {
|
|
182
|
-
if (!e)
|
|
183
|
-
return;
|
|
184
|
-
const {
|
|
185
|
-
scaleX: t,
|
|
186
|
-
scaleY: n
|
|
187
|
-
} = e;
|
|
188
|
-
return "scaleX(" + t + ") scaleY(" + n + ")";
|
|
189
|
-
}
|
|
190
|
-
},
|
|
191
|
-
Transform: {
|
|
192
|
-
toString(e) {
|
|
193
|
-
if (e)
|
|
194
|
-
return [nt.Translate.toString(e), nt.Scale.toString(e)].join(" ");
|
|
195
|
-
}
|
|
196
|
-
},
|
|
197
|
-
Transition: {
|
|
198
|
-
toString(e) {
|
|
199
|
-
let {
|
|
200
|
-
property: t,
|
|
201
|
-
duration: n,
|
|
202
|
-
easing: r
|
|
203
|
-
} = e;
|
|
204
|
-
return t + " " + n + "ms " + r;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}), Pt = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
|
|
208
|
-
function Nn(e) {
|
|
209
|
-
return e.matches(Pt) ? e : e.querySelector(Pt);
|
|
210
|
-
}
|
|
211
|
-
const Ln = {
|
|
212
|
-
display: "none"
|
|
213
|
-
};
|
|
214
|
-
function zn(e) {
|
|
215
|
-
let {
|
|
216
|
-
id: t,
|
|
217
|
-
value: n
|
|
218
|
-
} = e;
|
|
219
|
-
return $.createElement("div", {
|
|
220
|
-
id: t,
|
|
221
|
-
style: Ln
|
|
222
|
-
}, n);
|
|
223
|
-
}
|
|
224
|
-
function Pn(e) {
|
|
225
|
-
let {
|
|
226
|
-
id: t,
|
|
227
|
-
announcement: n,
|
|
228
|
-
ariaLiveType: r = "assertive"
|
|
229
|
-
} = e;
|
|
230
|
-
const o = {
|
|
231
|
-
position: "fixed",
|
|
232
|
-
top: 0,
|
|
233
|
-
left: 0,
|
|
234
|
-
width: 1,
|
|
235
|
-
height: 1,
|
|
236
|
-
margin: -1,
|
|
237
|
-
border: 0,
|
|
238
|
-
padding: 0,
|
|
239
|
-
overflow: "hidden",
|
|
240
|
-
clip: "rect(0 0 0 0)",
|
|
241
|
-
clipPath: "inset(100%)",
|
|
242
|
-
whiteSpace: "nowrap"
|
|
243
|
-
};
|
|
244
|
-
return $.createElement("div", {
|
|
245
|
-
id: t,
|
|
246
|
-
style: o,
|
|
247
|
-
role: "status",
|
|
248
|
-
"aria-live": r,
|
|
249
|
-
"aria-atomic": !0
|
|
250
|
-
}, n);
|
|
251
|
-
}
|
|
252
|
-
function Bn() {
|
|
253
|
-
const [e, t] = H("");
|
|
254
|
-
return {
|
|
255
|
-
announce: k((r) => {
|
|
256
|
-
r != null && t(r);
|
|
257
|
-
}, []),
|
|
258
|
-
announcement: e
|
|
259
|
-
};
|
|
260
|
-
}
|
|
261
|
-
const Gt = /* @__PURE__ */ Xe(null);
|
|
262
|
-
function kn(e) {
|
|
263
|
-
const t = pe(Gt);
|
|
264
|
-
A(() => {
|
|
265
|
-
if (!t)
|
|
266
|
-
throw new Error("useDndMonitor must be used within a children of <DndContext>");
|
|
267
|
-
return t(e);
|
|
268
|
-
}, [e, t]);
|
|
269
|
-
}
|
|
270
|
-
function Fn() {
|
|
271
|
-
const [e] = H(() => /* @__PURE__ */ new Set()), t = k((r) => (e.add(r), () => e.delete(r)), [e]);
|
|
272
|
-
return [k((r) => {
|
|
273
|
-
let {
|
|
274
|
-
type: o,
|
|
275
|
-
event: i
|
|
276
|
-
} = r;
|
|
277
|
-
e.forEach((s) => {
|
|
278
|
-
var a;
|
|
279
|
-
return (a = s[o]) == null ? void 0 : a.call(s, i);
|
|
280
|
-
});
|
|
281
|
-
}, [e]), t];
|
|
282
|
-
}
|
|
283
|
-
const $n = {
|
|
284
|
-
draggable: `
|
|
285
|
-
To pick up a draggable item, press the space bar.
|
|
286
|
-
While dragging, use the arrow keys to move the item.
|
|
287
|
-
Press space again to drop the item in its new position, or press escape to cancel.
|
|
288
|
-
`
|
|
289
|
-
}, Xn = {
|
|
290
|
-
onDragStart(e) {
|
|
291
|
-
let {
|
|
292
|
-
active: t
|
|
293
|
-
} = e;
|
|
294
|
-
return "Picked up draggable item " + t.id + ".";
|
|
295
|
-
},
|
|
296
|
-
onDragOver(e) {
|
|
297
|
-
let {
|
|
298
|
-
active: t,
|
|
299
|
-
over: n
|
|
300
|
-
} = e;
|
|
301
|
-
return n ? "Draggable item " + t.id + " was moved over droppable area " + n.id + "." : "Draggable item " + t.id + " is no longer over a droppable area.";
|
|
302
|
-
},
|
|
303
|
-
onDragEnd(e) {
|
|
304
|
-
let {
|
|
305
|
-
active: t,
|
|
306
|
-
over: n
|
|
307
|
-
} = e;
|
|
308
|
-
return n ? "Draggable item " + t.id + " was dropped over droppable area " + n.id : "Draggable item " + t.id + " was dropped.";
|
|
309
|
-
},
|
|
310
|
-
onDragCancel(e) {
|
|
311
|
-
let {
|
|
312
|
-
active: t
|
|
313
|
-
} = e;
|
|
314
|
-
return "Dragging was cancelled. Draggable item " + t.id + " was dropped.";
|
|
315
|
-
}
|
|
316
|
-
};
|
|
317
|
-
function Yn(e) {
|
|
318
|
-
let {
|
|
319
|
-
announcements: t = Xn,
|
|
320
|
-
container: n,
|
|
321
|
-
hiddenTextDescribedById: r,
|
|
322
|
-
screenReaderInstructions: o = $n
|
|
323
|
-
} = e;
|
|
324
|
-
const {
|
|
325
|
-
announce: i,
|
|
326
|
-
announcement: s
|
|
327
|
-
} = Bn(), a = We("DndLiveRegion"), [l, c] = H(!1);
|
|
328
|
-
if (A(() => {
|
|
329
|
-
c(!0);
|
|
330
|
-
}, []), kn(I(() => ({
|
|
331
|
-
onDragStart(d) {
|
|
332
|
-
let {
|
|
333
|
-
active: g
|
|
334
|
-
} = d;
|
|
335
|
-
i(t.onDragStart({
|
|
336
|
-
active: g
|
|
337
|
-
}));
|
|
338
|
-
},
|
|
339
|
-
onDragMove(d) {
|
|
340
|
-
let {
|
|
341
|
-
active: g,
|
|
342
|
-
over: f
|
|
343
|
-
} = d;
|
|
344
|
-
t.onDragMove && i(t.onDragMove({
|
|
345
|
-
active: g,
|
|
346
|
-
over: f
|
|
347
|
-
}));
|
|
348
|
-
},
|
|
349
|
-
onDragOver(d) {
|
|
350
|
-
let {
|
|
351
|
-
active: g,
|
|
352
|
-
over: f
|
|
353
|
-
} = d;
|
|
354
|
-
i(t.onDragOver({
|
|
355
|
-
active: g,
|
|
356
|
-
over: f
|
|
357
|
-
}));
|
|
358
|
-
},
|
|
359
|
-
onDragEnd(d) {
|
|
360
|
-
let {
|
|
361
|
-
active: g,
|
|
362
|
-
over: f
|
|
363
|
-
} = d;
|
|
364
|
-
i(t.onDragEnd({
|
|
365
|
-
active: g,
|
|
366
|
-
over: f
|
|
367
|
-
}));
|
|
368
|
-
},
|
|
369
|
-
onDragCancel(d) {
|
|
370
|
-
let {
|
|
371
|
-
active: g,
|
|
372
|
-
over: f
|
|
373
|
-
} = d;
|
|
374
|
-
i(t.onDragCancel({
|
|
375
|
-
active: g,
|
|
376
|
-
over: f
|
|
377
|
-
}));
|
|
378
|
-
}
|
|
379
|
-
}), [i, t])), !l)
|
|
380
|
-
return null;
|
|
381
|
-
const u = $.createElement($.Fragment, null, $.createElement(zn, {
|
|
382
|
-
id: r,
|
|
383
|
-
value: o.draggable
|
|
384
|
-
}), $.createElement(Pn, {
|
|
385
|
-
id: a,
|
|
386
|
-
announcement: s
|
|
387
|
-
}));
|
|
388
|
-
return n ? In(u, n) : u;
|
|
389
|
-
}
|
|
390
|
-
var N;
|
|
391
|
-
(function(e) {
|
|
392
|
-
e.DragStart = "dragStart", e.DragMove = "dragMove", e.DragEnd = "dragEnd", e.DragCancel = "dragCancel", e.DragOver = "dragOver", e.RegisterDroppable = "registerDroppable", e.SetDroppableDisabled = "setDroppableDisabled", e.UnregisterDroppable = "unregisterDroppable";
|
|
393
|
-
})(N || (N = {}));
|
|
394
|
-
function rt() {
|
|
395
|
-
}
|
|
396
|
-
function uo(e, t) {
|
|
397
|
-
return I(
|
|
398
|
-
() => ({
|
|
399
|
-
sensor: e,
|
|
400
|
-
options: t ?? {}
|
|
401
|
-
}),
|
|
402
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
403
|
-
[e, t]
|
|
404
|
-
);
|
|
405
|
-
}
|
|
406
|
-
function fo() {
|
|
407
|
-
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
408
|
-
t[n] = arguments[n];
|
|
409
|
-
return I(
|
|
410
|
-
() => [...t].filter((r) => r != null),
|
|
411
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
412
|
-
[...t]
|
|
413
|
-
);
|
|
414
|
-
}
|
|
415
|
-
const _ = /* @__PURE__ */ Object.freeze({
|
|
416
|
-
x: 0,
|
|
417
|
-
y: 0
|
|
418
|
-
});
|
|
419
|
-
function jn(e, t) {
|
|
420
|
-
return Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2));
|
|
421
|
-
}
|
|
422
|
-
function Wn(e, t) {
|
|
423
|
-
let {
|
|
424
|
-
data: {
|
|
425
|
-
value: n
|
|
426
|
-
}
|
|
427
|
-
} = e, {
|
|
428
|
-
data: {
|
|
429
|
-
value: r
|
|
430
|
-
}
|
|
431
|
-
} = t;
|
|
432
|
-
return n - r;
|
|
433
|
-
}
|
|
434
|
-
function Un(e, t) {
|
|
435
|
-
let {
|
|
436
|
-
data: {
|
|
437
|
-
value: n
|
|
438
|
-
}
|
|
439
|
-
} = e, {
|
|
440
|
-
data: {
|
|
441
|
-
value: r
|
|
442
|
-
}
|
|
443
|
-
} = t;
|
|
444
|
-
return r - n;
|
|
445
|
-
}
|
|
446
|
-
function Hn(e, t) {
|
|
447
|
-
if (!e || e.length === 0)
|
|
448
|
-
return null;
|
|
449
|
-
const [n] = e;
|
|
450
|
-
return t ? n[t] : n;
|
|
451
|
-
}
|
|
452
|
-
function Bt(e, t, n) {
|
|
453
|
-
return t === void 0 && (t = e.left), n === void 0 && (n = e.top), {
|
|
454
|
-
x: t + e.width * 0.5,
|
|
455
|
-
y: n + e.height * 0.5
|
|
456
|
-
};
|
|
457
|
-
}
|
|
458
|
-
const ho = (e) => {
|
|
459
|
-
let {
|
|
460
|
-
collisionRect: t,
|
|
461
|
-
droppableRects: n,
|
|
462
|
-
droppableContainers: r
|
|
463
|
-
} = e;
|
|
464
|
-
const o = Bt(t, t.left, t.top), i = [];
|
|
465
|
-
for (const s of r) {
|
|
466
|
-
const {
|
|
467
|
-
id: a
|
|
468
|
-
} = s, l = n.get(a);
|
|
469
|
-
if (l) {
|
|
470
|
-
const c = jn(Bt(l), o);
|
|
471
|
-
i.push({
|
|
472
|
-
id: a,
|
|
473
|
-
data: {
|
|
474
|
-
droppableContainer: s,
|
|
475
|
-
value: c
|
|
476
|
-
}
|
|
477
|
-
});
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
return i.sort(Wn);
|
|
481
|
-
};
|
|
482
|
-
function Kn(e, t) {
|
|
483
|
-
const n = Math.max(t.top, e.top), r = Math.max(t.left, e.left), o = Math.min(t.left + t.width, e.left + e.width), i = Math.min(t.top + t.height, e.top + e.height), s = o - r, a = i - n;
|
|
484
|
-
if (r < o && n < i) {
|
|
485
|
-
const l = t.width * t.height, c = e.width * e.height, u = s * a, d = u / (l + c - u);
|
|
486
|
-
return Number(d.toFixed(4));
|
|
487
|
-
}
|
|
488
|
-
return 0;
|
|
489
|
-
}
|
|
490
|
-
const Vn = (e) => {
|
|
491
|
-
let {
|
|
492
|
-
collisionRect: t,
|
|
493
|
-
droppableRects: n,
|
|
494
|
-
droppableContainers: r
|
|
495
|
-
} = e;
|
|
496
|
-
const o = [];
|
|
497
|
-
for (const i of r) {
|
|
498
|
-
const {
|
|
499
|
-
id: s
|
|
500
|
-
} = i, a = n.get(s);
|
|
501
|
-
if (a) {
|
|
502
|
-
const l = Kn(a, t);
|
|
503
|
-
l > 0 && o.push({
|
|
504
|
-
id: s,
|
|
505
|
-
data: {
|
|
506
|
-
droppableContainer: i,
|
|
507
|
-
value: l
|
|
508
|
-
}
|
|
509
|
-
});
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
return o.sort(Un);
|
|
513
|
-
};
|
|
514
|
-
function qn(e, t, n) {
|
|
515
|
-
return {
|
|
516
|
-
...e,
|
|
517
|
-
scaleX: t && n ? t.width / n.width : 1,
|
|
518
|
-
scaleY: t && n ? t.height / n.height : 1
|
|
519
|
-
};
|
|
520
|
-
}
|
|
521
|
-
function Jt(e, t) {
|
|
522
|
-
return e && t ? {
|
|
523
|
-
x: e.left - t.left,
|
|
524
|
-
y: e.top - t.top
|
|
525
|
-
} : _;
|
|
526
|
-
}
|
|
527
|
-
function Gn(e) {
|
|
528
|
-
return function(n) {
|
|
529
|
-
for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
|
|
530
|
-
o[i - 1] = arguments[i];
|
|
531
|
-
return o.reduce((s, a) => ({
|
|
532
|
-
...s,
|
|
533
|
-
top: s.top + e * a.y,
|
|
534
|
-
bottom: s.bottom + e * a.y,
|
|
535
|
-
left: s.left + e * a.x,
|
|
536
|
-
right: s.right + e * a.x
|
|
537
|
-
}), {
|
|
538
|
-
...n
|
|
539
|
-
});
|
|
540
|
-
};
|
|
541
|
-
}
|
|
542
|
-
const Jn = /* @__PURE__ */ Gn(1);
|
|
543
|
-
function _n(e) {
|
|
544
|
-
if (e.startsWith("matrix3d(")) {
|
|
545
|
-
const t = e.slice(9, -1).split(/, /);
|
|
546
|
-
return {
|
|
547
|
-
x: +t[12],
|
|
548
|
-
y: +t[13],
|
|
549
|
-
scaleX: +t[0],
|
|
550
|
-
scaleY: +t[5]
|
|
551
|
-
};
|
|
552
|
-
} else if (e.startsWith("matrix(")) {
|
|
553
|
-
const t = e.slice(7, -1).split(/, /);
|
|
554
|
-
return {
|
|
555
|
-
x: +t[4],
|
|
556
|
-
y: +t[5],
|
|
557
|
-
scaleX: +t[0],
|
|
558
|
-
scaleY: +t[3]
|
|
559
|
-
};
|
|
560
|
-
}
|
|
561
|
-
return null;
|
|
562
|
-
}
|
|
563
|
-
function Qn(e, t, n) {
|
|
564
|
-
const r = _n(t);
|
|
565
|
-
if (!r)
|
|
566
|
-
return e;
|
|
567
|
-
const {
|
|
568
|
-
scaleX: o,
|
|
569
|
-
scaleY: i,
|
|
570
|
-
x: s,
|
|
571
|
-
y: a
|
|
572
|
-
} = r, l = e.left - s - (1 - o) * parseFloat(n), c = e.top - a - (1 - i) * parseFloat(n.slice(n.indexOf(" ") + 1)), u = o ? e.width / o : e.width, d = i ? e.height / i : e.height;
|
|
573
|
-
return {
|
|
574
|
-
width: u,
|
|
575
|
-
height: d,
|
|
576
|
-
top: c,
|
|
577
|
-
right: l + u,
|
|
578
|
-
bottom: c + d,
|
|
579
|
-
left: l
|
|
580
|
-
};
|
|
581
|
-
}
|
|
582
|
-
const Zn = {
|
|
583
|
-
ignoreTransform: !1
|
|
584
|
-
};
|
|
585
|
-
function Ee(e, t) {
|
|
586
|
-
t === void 0 && (t = Zn);
|
|
587
|
-
let n = e.getBoundingClientRect();
|
|
588
|
-
if (t.ignoreTransform) {
|
|
589
|
-
const {
|
|
590
|
-
transform: c,
|
|
591
|
-
transformOrigin: u
|
|
592
|
-
} = X(e).getComputedStyle(e);
|
|
593
|
-
c && (n = Qn(n, c, u));
|
|
594
|
-
}
|
|
595
|
-
const {
|
|
596
|
-
top: r,
|
|
597
|
-
left: o,
|
|
598
|
-
width: i,
|
|
599
|
-
height: s,
|
|
600
|
-
bottom: a,
|
|
601
|
-
right: l
|
|
602
|
-
} = n;
|
|
603
|
-
return {
|
|
604
|
-
top: r,
|
|
605
|
-
left: o,
|
|
606
|
-
width: i,
|
|
607
|
-
height: s,
|
|
608
|
-
bottom: a,
|
|
609
|
-
right: l
|
|
610
|
-
};
|
|
611
|
-
}
|
|
612
|
-
function kt(e) {
|
|
613
|
-
return Ee(e, {
|
|
614
|
-
ignoreTransform: !0
|
|
615
|
-
});
|
|
616
|
-
}
|
|
617
|
-
function er(e) {
|
|
618
|
-
const t = e.innerWidth, n = e.innerHeight;
|
|
619
|
-
return {
|
|
620
|
-
top: 0,
|
|
621
|
-
left: 0,
|
|
622
|
-
right: t,
|
|
623
|
-
bottom: n,
|
|
624
|
-
width: t,
|
|
625
|
-
height: n
|
|
626
|
-
};
|
|
627
|
-
}
|
|
628
|
-
function tr(e, t) {
|
|
629
|
-
return t === void 0 && (t = X(e).getComputedStyle(e)), t.position === "fixed";
|
|
630
|
-
}
|
|
631
|
-
function nr(e, t) {
|
|
632
|
-
t === void 0 && (t = X(e).getComputedStyle(e));
|
|
633
|
-
const n = /(auto|scroll|overlay)/;
|
|
634
|
-
return ["overflow", "overflowX", "overflowY"].some((o) => {
|
|
635
|
-
const i = t[o];
|
|
636
|
-
return typeof i == "string" ? n.test(i) : !1;
|
|
637
|
-
});
|
|
638
|
-
}
|
|
639
|
-
function Ct(e, t) {
|
|
640
|
-
const n = [];
|
|
641
|
-
function r(o) {
|
|
642
|
-
if (t != null && n.length >= t || !o)
|
|
643
|
-
return n;
|
|
644
|
-
if (xt(o) && o.scrollingElement != null && !n.includes(o.scrollingElement))
|
|
645
|
-
return n.push(o.scrollingElement), n;
|
|
646
|
-
if (!Ye(o) || Vt(o) || n.includes(o))
|
|
647
|
-
return n;
|
|
648
|
-
const i = X(e).getComputedStyle(o);
|
|
649
|
-
return o !== e && nr(o, i) && n.push(o), tr(o, i) ? n : r(o.parentNode);
|
|
650
|
-
}
|
|
651
|
-
return e ? r(e) : n;
|
|
652
|
-
}
|
|
653
|
-
function _t(e) {
|
|
654
|
-
const [t] = Ct(e, 1);
|
|
655
|
-
return t ?? null;
|
|
656
|
-
}
|
|
657
|
-
function ft(e) {
|
|
658
|
-
return !it || !e ? null : Ce(e) ? e : mt(e) ? xt(e) || e === Re(e).scrollingElement ? window : Ye(e) ? e : null : null;
|
|
659
|
-
}
|
|
660
|
-
function Qt(e) {
|
|
661
|
-
return Ce(e) ? e.scrollX : e.scrollLeft;
|
|
662
|
-
}
|
|
663
|
-
function Zt(e) {
|
|
664
|
-
return Ce(e) ? e.scrollY : e.scrollTop;
|
|
665
|
-
}
|
|
666
|
-
function bt(e) {
|
|
667
|
-
return {
|
|
668
|
-
x: Qt(e),
|
|
669
|
-
y: Zt(e)
|
|
670
|
-
};
|
|
671
|
-
}
|
|
672
|
-
var z;
|
|
673
|
-
(function(e) {
|
|
674
|
-
e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
|
|
675
|
-
})(z || (z = {}));
|
|
676
|
-
function en(e) {
|
|
677
|
-
return !it || !e ? !1 : e === document.scrollingElement;
|
|
678
|
-
}
|
|
679
|
-
function tn(e) {
|
|
680
|
-
const t = {
|
|
681
|
-
x: 0,
|
|
682
|
-
y: 0
|
|
683
|
-
}, n = en(e) ? {
|
|
684
|
-
height: window.innerHeight,
|
|
685
|
-
width: window.innerWidth
|
|
686
|
-
} : {
|
|
687
|
-
height: e.clientHeight,
|
|
688
|
-
width: e.clientWidth
|
|
689
|
-
}, r = {
|
|
690
|
-
x: e.scrollWidth - n.width,
|
|
691
|
-
y: e.scrollHeight - n.height
|
|
692
|
-
}, o = e.scrollTop <= t.y, i = e.scrollLeft <= t.x, s = e.scrollTop >= r.y, a = e.scrollLeft >= r.x;
|
|
693
|
-
return {
|
|
694
|
-
isTop: o,
|
|
695
|
-
isLeft: i,
|
|
696
|
-
isBottom: s,
|
|
697
|
-
isRight: a,
|
|
698
|
-
maxScroll: r,
|
|
699
|
-
minScroll: t
|
|
700
|
-
};
|
|
701
|
-
}
|
|
702
|
-
const rr = {
|
|
703
|
-
x: 0.2,
|
|
704
|
-
y: 0.2
|
|
705
|
-
};
|
|
706
|
-
function or(e, t, n, r, o) {
|
|
707
|
-
let {
|
|
708
|
-
top: i,
|
|
709
|
-
left: s,
|
|
710
|
-
right: a,
|
|
711
|
-
bottom: l
|
|
712
|
-
} = n;
|
|
713
|
-
r === void 0 && (r = 10), o === void 0 && (o = rr);
|
|
714
|
-
const {
|
|
715
|
-
isTop: c,
|
|
716
|
-
isBottom: u,
|
|
717
|
-
isLeft: d,
|
|
718
|
-
isRight: g
|
|
719
|
-
} = tn(e), f = {
|
|
720
|
-
x: 0,
|
|
721
|
-
y: 0
|
|
722
|
-
}, E = {
|
|
723
|
-
x: 0,
|
|
724
|
-
y: 0
|
|
725
|
-
}, h = {
|
|
726
|
-
height: t.height * o.y,
|
|
727
|
-
width: t.width * o.x
|
|
728
|
-
};
|
|
729
|
-
return !c && i <= t.top + h.height ? (f.y = z.Backward, E.y = r * Math.abs((t.top + h.height - i) / h.height)) : !u && l >= t.bottom - h.height && (f.y = z.Forward, E.y = r * Math.abs((t.bottom - h.height - l) / h.height)), !g && a >= t.right - h.width ? (f.x = z.Forward, E.x = r * Math.abs((t.right - h.width - a) / h.width)) : !d && s <= t.left + h.width && (f.x = z.Backward, E.x = r * Math.abs((t.left + h.width - s) / h.width)), {
|
|
730
|
-
direction: f,
|
|
731
|
-
speed: E
|
|
732
|
-
};
|
|
733
|
-
}
|
|
734
|
-
function ir(e) {
|
|
735
|
-
if (e === document.scrollingElement) {
|
|
736
|
-
const {
|
|
737
|
-
innerWidth: i,
|
|
738
|
-
innerHeight: s
|
|
739
|
-
} = window;
|
|
740
|
-
return {
|
|
741
|
-
top: 0,
|
|
742
|
-
left: 0,
|
|
743
|
-
right: i,
|
|
744
|
-
bottom: s,
|
|
745
|
-
width: i,
|
|
746
|
-
height: s
|
|
747
|
-
};
|
|
748
|
-
}
|
|
749
|
-
const {
|
|
750
|
-
top: t,
|
|
751
|
-
left: n,
|
|
752
|
-
right: r,
|
|
753
|
-
bottom: o
|
|
754
|
-
} = e.getBoundingClientRect();
|
|
755
|
-
return {
|
|
756
|
-
top: t,
|
|
757
|
-
left: n,
|
|
758
|
-
right: r,
|
|
759
|
-
bottom: o,
|
|
760
|
-
width: e.clientWidth,
|
|
761
|
-
height: e.clientHeight
|
|
762
|
-
};
|
|
763
|
-
}
|
|
764
|
-
function nn(e) {
|
|
765
|
-
return e.reduce((t, n) => Se(t, bt(n)), _);
|
|
766
|
-
}
|
|
767
|
-
function sr(e) {
|
|
768
|
-
return e.reduce((t, n) => t + Qt(n), 0);
|
|
769
|
-
}
|
|
770
|
-
function ar(e) {
|
|
771
|
-
return e.reduce((t, n) => t + Zt(n), 0);
|
|
772
|
-
}
|
|
773
|
-
function lr(e, t) {
|
|
774
|
-
if (t === void 0 && (t = Ee), !e)
|
|
775
|
-
return;
|
|
776
|
-
const {
|
|
777
|
-
top: n,
|
|
778
|
-
left: r,
|
|
779
|
-
bottom: o,
|
|
780
|
-
right: i
|
|
781
|
-
} = t(e);
|
|
782
|
-
_t(e) && (o <= 0 || i <= 0 || n >= window.innerHeight || r >= window.innerWidth) && e.scrollIntoView({
|
|
783
|
-
block: "center",
|
|
784
|
-
inline: "center"
|
|
785
|
-
});
|
|
786
|
-
}
|
|
787
|
-
const cr = [["x", ["left", "right"], sr], ["y", ["top", "bottom"], ar]];
|
|
788
|
-
class Rt {
|
|
789
|
-
constructor(t, n) {
|
|
790
|
-
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;
|
|
791
|
-
const r = Ct(n), o = nn(r);
|
|
792
|
-
this.rect = {
|
|
793
|
-
...t
|
|
794
|
-
}, this.width = t.width, this.height = t.height;
|
|
795
|
-
for (const [i, s, a] of cr)
|
|
796
|
-
for (const l of s)
|
|
797
|
-
Object.defineProperty(this, l, {
|
|
798
|
-
get: () => {
|
|
799
|
-
const c = a(r), u = o[i] - c;
|
|
800
|
-
return this.rect[l] + u;
|
|
801
|
-
},
|
|
802
|
-
enumerable: !0
|
|
803
|
-
});
|
|
804
|
-
Object.defineProperty(this, "rect", {
|
|
805
|
-
enumerable: !1
|
|
806
|
-
});
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
class Pe {
|
|
810
|
-
constructor(t) {
|
|
811
|
-
this.target = void 0, this.listeners = [], this.removeAll = () => {
|
|
812
|
-
this.listeners.forEach((n) => {
|
|
813
|
-
var r;
|
|
814
|
-
return (r = this.target) == null ? void 0 : r.removeEventListener(...n);
|
|
815
|
-
});
|
|
816
|
-
}, this.target = t;
|
|
817
|
-
}
|
|
818
|
-
add(t, n, r) {
|
|
819
|
-
var o;
|
|
820
|
-
(o = this.target) == null || o.addEventListener(t, n, r), this.listeners.push([t, n, r]);
|
|
821
|
-
}
|
|
822
|
-
}
|
|
823
|
-
function ur(e) {
|
|
824
|
-
const {
|
|
825
|
-
EventTarget: t
|
|
826
|
-
} = X(e);
|
|
827
|
-
return e instanceof t ? e : Re(e);
|
|
828
|
-
}
|
|
829
|
-
function ht(e, t) {
|
|
830
|
-
const n = Math.abs(e.x), r = Math.abs(e.y);
|
|
831
|
-
return typeof t == "number" ? Math.sqrt(n ** 2 + r ** 2) > t : "x" in t && "y" in t ? n > t.x && r > t.y : "x" in t ? n > t.x : "y" in t ? r > t.y : !1;
|
|
832
|
-
}
|
|
833
|
-
var q;
|
|
834
|
-
(function(e) {
|
|
835
|
-
e.Click = "click", e.DragStart = "dragstart", e.Keydown = "keydown", e.ContextMenu = "contextmenu", e.Resize = "resize", e.SelectionChange = "selectionchange", e.VisibilityChange = "visibilitychange";
|
|
836
|
-
})(q || (q = {}));
|
|
837
|
-
function Ft(e) {
|
|
838
|
-
e.preventDefault();
|
|
839
|
-
}
|
|
840
|
-
function dr(e) {
|
|
841
|
-
e.stopPropagation();
|
|
842
|
-
}
|
|
843
|
-
var x;
|
|
844
|
-
(function(e) {
|
|
845
|
-
e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter", e.Tab = "Tab";
|
|
846
|
-
})(x || (x = {}));
|
|
847
|
-
const rn = {
|
|
848
|
-
start: [x.Space, x.Enter],
|
|
849
|
-
cancel: [x.Esc],
|
|
850
|
-
end: [x.Space, x.Enter, x.Tab]
|
|
851
|
-
}, fr = (e, t) => {
|
|
852
|
-
let {
|
|
853
|
-
currentCoordinates: n
|
|
854
|
-
} = t;
|
|
855
|
-
switch (e.code) {
|
|
856
|
-
case x.Right:
|
|
857
|
-
return {
|
|
858
|
-
...n,
|
|
859
|
-
x: n.x + 25
|
|
860
|
-
};
|
|
861
|
-
case x.Left:
|
|
862
|
-
return {
|
|
863
|
-
...n,
|
|
864
|
-
x: n.x - 25
|
|
865
|
-
};
|
|
866
|
-
case x.Down:
|
|
867
|
-
return {
|
|
868
|
-
...n,
|
|
869
|
-
y: n.y + 25
|
|
870
|
-
};
|
|
871
|
-
case x.Up:
|
|
872
|
-
return {
|
|
873
|
-
...n,
|
|
874
|
-
y: n.y - 25
|
|
875
|
-
};
|
|
876
|
-
}
|
|
877
|
-
};
|
|
878
|
-
class on {
|
|
879
|
-
constructor(t) {
|
|
880
|
-
this.props = void 0, this.autoScrollEnabled = !1, this.referenceCoordinates = void 0, this.listeners = void 0, this.windowListeners = void 0, this.props = t;
|
|
881
|
-
const {
|
|
882
|
-
event: {
|
|
883
|
-
target: n
|
|
884
|
-
}
|
|
885
|
-
} = t;
|
|
886
|
-
this.props = t, this.listeners = new Pe(Re(n)), this.windowListeners = new Pe(X(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
|
|
887
|
-
}
|
|
888
|
-
attach() {
|
|
889
|
-
this.handleStart(), this.windowListeners.add(q.Resize, this.handleCancel), this.windowListeners.add(q.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(q.Keydown, this.handleKeyDown));
|
|
890
|
-
}
|
|
891
|
-
handleStart() {
|
|
892
|
-
const {
|
|
893
|
-
activeNode: t,
|
|
894
|
-
onStart: n
|
|
895
|
-
} = this.props, r = t.node.current;
|
|
896
|
-
r && lr(r), n(_);
|
|
897
|
-
}
|
|
898
|
-
handleKeyDown(t) {
|
|
899
|
-
if (St(t)) {
|
|
900
|
-
const {
|
|
901
|
-
active: n,
|
|
902
|
-
context: r,
|
|
903
|
-
options: o
|
|
904
|
-
} = this.props, {
|
|
905
|
-
keyboardCodes: i = rn,
|
|
906
|
-
coordinateGetter: s = fr,
|
|
907
|
-
scrollBehavior: a = "smooth"
|
|
908
|
-
} = o, {
|
|
909
|
-
code: l
|
|
910
|
-
} = t;
|
|
911
|
-
if (i.end.includes(l)) {
|
|
912
|
-
this.handleEnd(t);
|
|
913
|
-
return;
|
|
914
|
-
}
|
|
915
|
-
if (i.cancel.includes(l)) {
|
|
916
|
-
this.handleCancel(t);
|
|
917
|
-
return;
|
|
918
|
-
}
|
|
919
|
-
const {
|
|
920
|
-
collisionRect: c
|
|
921
|
-
} = r.current, u = c ? {
|
|
922
|
-
x: c.left,
|
|
923
|
-
y: c.top
|
|
924
|
-
} : _;
|
|
925
|
-
this.referenceCoordinates || (this.referenceCoordinates = u);
|
|
926
|
-
const d = s(t, {
|
|
927
|
-
active: n,
|
|
928
|
-
context: r.current,
|
|
929
|
-
currentCoordinates: u
|
|
930
|
-
});
|
|
931
|
-
if (d) {
|
|
932
|
-
const g = tt(d, u), f = {
|
|
933
|
-
x: 0,
|
|
934
|
-
y: 0
|
|
935
|
-
}, {
|
|
936
|
-
scrollableAncestors: E
|
|
937
|
-
} = r.current;
|
|
938
|
-
for (const h of E) {
|
|
939
|
-
const v = t.code, {
|
|
940
|
-
isTop: w,
|
|
941
|
-
isRight: m,
|
|
942
|
-
isLeft: p,
|
|
943
|
-
isBottom: D,
|
|
944
|
-
maxScroll: S,
|
|
945
|
-
minScroll: C
|
|
946
|
-
} = tn(h), y = ir(h), b = {
|
|
947
|
-
x: Math.min(v === x.Right ? y.right - y.width / 2 : y.right, Math.max(v === x.Right ? y.left : y.left + y.width / 2, d.x)),
|
|
948
|
-
y: Math.min(v === x.Down ? y.bottom - y.height / 2 : y.bottom, Math.max(v === x.Down ? y.top : y.top + y.height / 2, d.y))
|
|
949
|
-
}, M = v === x.Right && !m || v === x.Left && !p, L = v === x.Down && !D || v === x.Up && !w;
|
|
950
|
-
if (M && b.x !== d.x) {
|
|
951
|
-
const T = h.scrollLeft + g.x, G = v === x.Right && T <= S.x || v === x.Left && T >= C.x;
|
|
952
|
-
if (G && !g.y) {
|
|
953
|
-
h.scrollTo({
|
|
954
|
-
left: T,
|
|
955
|
-
behavior: a
|
|
956
|
-
});
|
|
957
|
-
return;
|
|
958
|
-
}
|
|
959
|
-
G ? f.x = h.scrollLeft - T : f.x = v === x.Right ? h.scrollLeft - S.x : h.scrollLeft - C.x, f.x && h.scrollBy({
|
|
960
|
-
left: -f.x,
|
|
961
|
-
behavior: a
|
|
962
|
-
});
|
|
963
|
-
break;
|
|
964
|
-
} else if (L && b.y !== d.y) {
|
|
965
|
-
const T = h.scrollTop + g.y, G = v === x.Down && T <= S.y || v === x.Up && T >= C.y;
|
|
966
|
-
if (G && !g.x) {
|
|
967
|
-
h.scrollTo({
|
|
968
|
-
top: T,
|
|
969
|
-
behavior: a
|
|
970
|
-
});
|
|
971
|
-
return;
|
|
972
|
-
}
|
|
973
|
-
G ? f.y = h.scrollTop - T : f.y = v === x.Down ? h.scrollTop - S.y : h.scrollTop - C.y, f.y && h.scrollBy({
|
|
974
|
-
top: -f.y,
|
|
975
|
-
behavior: a
|
|
976
|
-
});
|
|
977
|
-
break;
|
|
978
|
-
}
|
|
979
|
-
}
|
|
980
|
-
this.handleMove(t, Se(tt(d, this.referenceCoordinates), f));
|
|
981
|
-
}
|
|
982
|
-
}
|
|
983
|
-
}
|
|
984
|
-
handleMove(t, n) {
|
|
985
|
-
const {
|
|
986
|
-
onMove: r
|
|
987
|
-
} = this.props;
|
|
988
|
-
t.preventDefault(), r(n);
|
|
989
|
-
}
|
|
990
|
-
handleEnd(t) {
|
|
991
|
-
const {
|
|
992
|
-
onEnd: n
|
|
993
|
-
} = this.props;
|
|
994
|
-
t.preventDefault(), this.detach(), n();
|
|
995
|
-
}
|
|
996
|
-
handleCancel(t) {
|
|
997
|
-
const {
|
|
998
|
-
onCancel: n
|
|
999
|
-
} = this.props;
|
|
1000
|
-
t.preventDefault(), this.detach(), n();
|
|
1001
|
-
}
|
|
1002
|
-
detach() {
|
|
1003
|
-
this.listeners.removeAll(), this.windowListeners.removeAll();
|
|
1004
|
-
}
|
|
1005
|
-
}
|
|
1006
|
-
on.activators = [{
|
|
1007
|
-
eventName: "onKeyDown",
|
|
1008
|
-
handler: (e, t, n) => {
|
|
1009
|
-
let {
|
|
1010
|
-
keyboardCodes: r = rn,
|
|
1011
|
-
onActivation: o
|
|
1012
|
-
} = t, {
|
|
1013
|
-
active: i
|
|
1014
|
-
} = n;
|
|
1015
|
-
const {
|
|
1016
|
-
code: s
|
|
1017
|
-
} = e.nativeEvent;
|
|
1018
|
-
if (r.start.includes(s)) {
|
|
1019
|
-
const a = i.activatorNode.current;
|
|
1020
|
-
return a && e.target !== a ? !1 : (e.preventDefault(), o == null || o({
|
|
1021
|
-
event: e.nativeEvent
|
|
1022
|
-
}), !0);
|
|
1023
|
-
}
|
|
1024
|
-
return !1;
|
|
1025
|
-
}
|
|
1026
|
-
}];
|
|
1027
|
-
function $t(e) {
|
|
1028
|
-
return !!(e && "distance" in e);
|
|
1029
|
-
}
|
|
1030
|
-
function Xt(e) {
|
|
1031
|
-
return !!(e && "delay" in e);
|
|
1032
|
-
}
|
|
1033
|
-
class Et {
|
|
1034
|
-
constructor(t, n, r) {
|
|
1035
|
-
var o;
|
|
1036
|
-
r === void 0 && (r = ur(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;
|
|
1037
|
-
const {
|
|
1038
|
-
event: i
|
|
1039
|
-
} = t, {
|
|
1040
|
-
target: s
|
|
1041
|
-
} = i;
|
|
1042
|
-
this.props = t, this.events = n, this.document = Re(s), this.documentListeners = new Pe(this.document), this.listeners = new Pe(r), this.windowListeners = new Pe(X(s)), this.initialCoordinates = (o = pt(i)) != null ? o : _, 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();
|
|
1043
|
-
}
|
|
1044
|
-
attach() {
|
|
1045
|
-
const {
|
|
1046
|
-
events: t,
|
|
1047
|
-
props: {
|
|
1048
|
-
options: {
|
|
1049
|
-
activationConstraint: n,
|
|
1050
|
-
bypassActivationConstraint: r
|
|
1051
|
-
}
|
|
1052
|
-
}
|
|
1053
|
-
} = this;
|
|
1054
|
-
if (this.listeners.add(t.move.name, this.handleMove, {
|
|
1055
|
-
passive: !1
|
|
1056
|
-
}), this.listeners.add(t.end.name, this.handleEnd), t.cancel && this.listeners.add(t.cancel.name, this.handleCancel), this.windowListeners.add(q.Resize, this.handleCancel), this.windowListeners.add(q.DragStart, Ft), this.windowListeners.add(q.VisibilityChange, this.handleCancel), this.windowListeners.add(q.ContextMenu, Ft), this.documentListeners.add(q.Keydown, this.handleKeydown), n) {
|
|
1057
|
-
if (r != null && r({
|
|
1058
|
-
event: this.props.event,
|
|
1059
|
-
activeNode: this.props.activeNode,
|
|
1060
|
-
options: this.props.options
|
|
1061
|
-
}))
|
|
1062
|
-
return this.handleStart();
|
|
1063
|
-
if (Xt(n)) {
|
|
1064
|
-
this.timeoutId = setTimeout(this.handleStart, n.delay), this.handlePending(n);
|
|
1065
|
-
return;
|
|
1066
|
-
}
|
|
1067
|
-
if ($t(n)) {
|
|
1068
|
-
this.handlePending(n);
|
|
1069
|
-
return;
|
|
1070
|
-
}
|
|
1071
|
-
}
|
|
1072
|
-
this.handleStart();
|
|
1073
|
-
}
|
|
1074
|
-
detach() {
|
|
1075
|
-
this.listeners.removeAll(), this.windowListeners.removeAll(), setTimeout(this.documentListeners.removeAll, 50), this.timeoutId !== null && (clearTimeout(this.timeoutId), this.timeoutId = null);
|
|
1076
|
-
}
|
|
1077
|
-
handlePending(t, n) {
|
|
1078
|
-
const {
|
|
1079
|
-
active: r,
|
|
1080
|
-
onPending: o
|
|
1081
|
-
} = this.props;
|
|
1082
|
-
o(r, t, this.initialCoordinates, n);
|
|
1083
|
-
}
|
|
1084
|
-
handleStart() {
|
|
1085
|
-
const {
|
|
1086
|
-
initialCoordinates: t
|
|
1087
|
-
} = this, {
|
|
1088
|
-
onStart: n
|
|
1089
|
-
} = this.props;
|
|
1090
|
-
t && (this.activated = !0, this.documentListeners.add(q.Click, dr, {
|
|
1091
|
-
capture: !0
|
|
1092
|
-
}), this.removeTextSelection(), this.documentListeners.add(q.SelectionChange, this.removeTextSelection), n(t));
|
|
1093
|
-
}
|
|
1094
|
-
handleMove(t) {
|
|
1095
|
-
var n;
|
|
1096
|
-
const {
|
|
1097
|
-
activated: r,
|
|
1098
|
-
initialCoordinates: o,
|
|
1099
|
-
props: i
|
|
1100
|
-
} = this, {
|
|
1101
|
-
onMove: s,
|
|
1102
|
-
options: {
|
|
1103
|
-
activationConstraint: a
|
|
1104
|
-
}
|
|
1105
|
-
} = i;
|
|
1106
|
-
if (!o)
|
|
1107
|
-
return;
|
|
1108
|
-
const l = (n = pt(t)) != null ? n : _, c = tt(o, l);
|
|
1109
|
-
if (!r && a) {
|
|
1110
|
-
if ($t(a)) {
|
|
1111
|
-
if (a.tolerance != null && ht(c, a.tolerance))
|
|
1112
|
-
return this.handleCancel();
|
|
1113
|
-
if (ht(c, a.distance))
|
|
1114
|
-
return this.handleStart();
|
|
1115
|
-
}
|
|
1116
|
-
if (Xt(a) && ht(c, a.tolerance))
|
|
1117
|
-
return this.handleCancel();
|
|
1118
|
-
this.handlePending(a, c);
|
|
1119
|
-
return;
|
|
1120
|
-
}
|
|
1121
|
-
t.cancelable && t.preventDefault(), s(l);
|
|
1122
|
-
}
|
|
1123
|
-
handleEnd() {
|
|
1124
|
-
const {
|
|
1125
|
-
onAbort: t,
|
|
1126
|
-
onEnd: n
|
|
1127
|
-
} = this.props;
|
|
1128
|
-
this.detach(), this.activated || t(this.props.active), n();
|
|
1129
|
-
}
|
|
1130
|
-
handleCancel() {
|
|
1131
|
-
const {
|
|
1132
|
-
onAbort: t,
|
|
1133
|
-
onCancel: n
|
|
1134
|
-
} = this.props;
|
|
1135
|
-
this.detach(), this.activated || t(this.props.active), n();
|
|
1136
|
-
}
|
|
1137
|
-
handleKeydown(t) {
|
|
1138
|
-
t.code === x.Esc && this.handleCancel();
|
|
1139
|
-
}
|
|
1140
|
-
removeTextSelection() {
|
|
1141
|
-
var t;
|
|
1142
|
-
(t = this.document.getSelection()) == null || t.removeAllRanges();
|
|
1143
|
-
}
|
|
1144
|
-
}
|
|
1145
|
-
const hr = {
|
|
1146
|
-
cancel: {
|
|
1147
|
-
name: "pointercancel"
|
|
1148
|
-
},
|
|
1149
|
-
move: {
|
|
1150
|
-
name: "pointermove"
|
|
1151
|
-
},
|
|
1152
|
-
end: {
|
|
1153
|
-
name: "pointerup"
|
|
1154
|
-
}
|
|
1155
|
-
};
|
|
1156
|
-
class sn extends Et {
|
|
1157
|
-
constructor(t) {
|
|
1158
|
-
const {
|
|
1159
|
-
event: n
|
|
1160
|
-
} = t, r = Re(n.target);
|
|
1161
|
-
super(t, hr, r);
|
|
1162
|
-
}
|
|
1163
|
-
}
|
|
1164
|
-
sn.activators = [{
|
|
1165
|
-
eventName: "onPointerDown",
|
|
1166
|
-
handler: (e, t) => {
|
|
1167
|
-
let {
|
|
1168
|
-
nativeEvent: n
|
|
1169
|
-
} = e, {
|
|
1170
|
-
onActivation: r
|
|
1171
|
-
} = t;
|
|
1172
|
-
return !n.isPrimary || n.button !== 0 ? !1 : (r == null || r({
|
|
1173
|
-
event: n
|
|
1174
|
-
}), !0);
|
|
1175
|
-
}
|
|
1176
|
-
}];
|
|
1177
|
-
const gr = {
|
|
1178
|
-
move: {
|
|
1179
|
-
name: "mousemove"
|
|
1180
|
-
},
|
|
1181
|
-
end: {
|
|
1182
|
-
name: "mouseup"
|
|
1183
|
-
}
|
|
1184
|
-
};
|
|
1185
|
-
var wt;
|
|
1186
|
-
(function(e) {
|
|
1187
|
-
e[e.RightClick = 2] = "RightClick";
|
|
1188
|
-
})(wt || (wt = {}));
|
|
1189
|
-
class vr extends Et {
|
|
1190
|
-
constructor(t) {
|
|
1191
|
-
super(t, gr, Re(t.event.target));
|
|
1192
|
-
}
|
|
1193
|
-
}
|
|
1194
|
-
vr.activators = [{
|
|
1195
|
-
eventName: "onMouseDown",
|
|
1196
|
-
handler: (e, t) => {
|
|
1197
|
-
let {
|
|
1198
|
-
nativeEvent: n
|
|
1199
|
-
} = e, {
|
|
1200
|
-
onActivation: r
|
|
1201
|
-
} = t;
|
|
1202
|
-
return n.button === wt.RightClick ? !1 : (r == null || r({
|
|
1203
|
-
event: n
|
|
1204
|
-
}), !0);
|
|
1205
|
-
}
|
|
1206
|
-
}];
|
|
1207
|
-
const gt = {
|
|
1208
|
-
cancel: {
|
|
1209
|
-
name: "touchcancel"
|
|
1210
|
-
},
|
|
1211
|
-
move: {
|
|
1212
|
-
name: "touchmove"
|
|
1213
|
-
},
|
|
1214
|
-
end: {
|
|
1215
|
-
name: "touchend"
|
|
1216
|
-
}
|
|
1217
|
-
};
|
|
1218
|
-
class pr extends Et {
|
|
1219
|
-
constructor(t) {
|
|
1220
|
-
super(t, gt);
|
|
1221
|
-
}
|
|
1222
|
-
static setup() {
|
|
1223
|
-
return window.addEventListener(gt.move.name, t, {
|
|
1224
|
-
capture: !1,
|
|
1225
|
-
passive: !1
|
|
1226
|
-
}), function() {
|
|
1227
|
-
window.removeEventListener(gt.move.name, t);
|
|
1228
|
-
};
|
|
1229
|
-
function t() {
|
|
1230
|
-
}
|
|
1231
|
-
}
|
|
1232
|
-
}
|
|
1233
|
-
pr.activators = [{
|
|
1234
|
-
eventName: "onTouchStart",
|
|
1235
|
-
handler: (e, t) => {
|
|
1236
|
-
let {
|
|
1237
|
-
nativeEvent: n
|
|
1238
|
-
} = e, {
|
|
1239
|
-
onActivation: r
|
|
1240
|
-
} = t;
|
|
1241
|
-
const {
|
|
1242
|
-
touches: o
|
|
1243
|
-
} = n;
|
|
1244
|
-
return o.length > 1 ? !1 : (r == null || r({
|
|
1245
|
-
event: n
|
|
1246
|
-
}), !0);
|
|
1247
|
-
}
|
|
1248
|
-
}];
|
|
1249
|
-
var Be;
|
|
1250
|
-
(function(e) {
|
|
1251
|
-
e[e.Pointer = 0] = "Pointer", e[e.DraggableRect = 1] = "DraggableRect";
|
|
1252
|
-
})(Be || (Be = {}));
|
|
1253
|
-
var ot;
|
|
1254
|
-
(function(e) {
|
|
1255
|
-
e[e.TreeOrder = 0] = "TreeOrder", e[e.ReversedTreeOrder = 1] = "ReversedTreeOrder";
|
|
1256
|
-
})(ot || (ot = {}));
|
|
1257
|
-
function br(e) {
|
|
1258
|
-
let {
|
|
1259
|
-
acceleration: t,
|
|
1260
|
-
activator: n = Be.Pointer,
|
|
1261
|
-
canScroll: r,
|
|
1262
|
-
draggingRect: o,
|
|
1263
|
-
enabled: i,
|
|
1264
|
-
interval: s = 5,
|
|
1265
|
-
order: a = ot.TreeOrder,
|
|
1266
|
-
pointerCoordinates: l,
|
|
1267
|
-
scrollableAncestors: c,
|
|
1268
|
-
scrollableAncestorRects: u,
|
|
1269
|
-
delta: d,
|
|
1270
|
-
threshold: g
|
|
1271
|
-
} = e;
|
|
1272
|
-
const f = yr({
|
|
1273
|
-
delta: d,
|
|
1274
|
-
disabled: !i
|
|
1275
|
-
}), [E, h] = On(), v = O({
|
|
1276
|
-
x: 0,
|
|
1277
|
-
y: 0
|
|
1278
|
-
}), w = O({
|
|
1279
|
-
x: 0,
|
|
1280
|
-
y: 0
|
|
1281
|
-
}), m = I(() => {
|
|
1282
|
-
switch (n) {
|
|
1283
|
-
case Be.Pointer:
|
|
1284
|
-
return l ? {
|
|
1285
|
-
top: l.y,
|
|
1286
|
-
bottom: l.y,
|
|
1287
|
-
left: l.x,
|
|
1288
|
-
right: l.x
|
|
1289
|
-
} : null;
|
|
1290
|
-
case Be.DraggableRect:
|
|
1291
|
-
return o;
|
|
1292
|
-
}
|
|
1293
|
-
}, [n, o, l]), p = O(null), D = k(() => {
|
|
1294
|
-
const C = p.current;
|
|
1295
|
-
if (!C)
|
|
1296
|
-
return;
|
|
1297
|
-
const y = v.current.x * w.current.x, b = v.current.y * w.current.y;
|
|
1298
|
-
C.scrollBy(y, b);
|
|
1299
|
-
}, []), S = I(() => a === ot.TreeOrder ? [...c].reverse() : c, [a, c]);
|
|
1300
|
-
A(
|
|
1301
|
-
() => {
|
|
1302
|
-
if (!i || !c.length || !m) {
|
|
1303
|
-
h();
|
|
1304
|
-
return;
|
|
1305
|
-
}
|
|
1306
|
-
for (const C of S) {
|
|
1307
|
-
if ((r == null ? void 0 : r(C)) === !1)
|
|
1308
|
-
continue;
|
|
1309
|
-
const y = c.indexOf(C), b = u[y];
|
|
1310
|
-
if (!b)
|
|
1311
|
-
continue;
|
|
1312
|
-
const {
|
|
1313
|
-
direction: M,
|
|
1314
|
-
speed: L
|
|
1315
|
-
} = or(C, b, m, t, g);
|
|
1316
|
-
for (const T of ["x", "y"])
|
|
1317
|
-
f[T][M[T]] || (L[T] = 0, M[T] = 0);
|
|
1318
|
-
if (L.x > 0 || L.y > 0) {
|
|
1319
|
-
h(), p.current = C, E(D, s), v.current = L, w.current = M;
|
|
1320
|
-
return;
|
|
1321
|
-
}
|
|
1322
|
-
}
|
|
1323
|
-
v.current = {
|
|
1324
|
-
x: 0,
|
|
1325
|
-
y: 0
|
|
1326
|
-
}, w.current = {
|
|
1327
|
-
x: 0,
|
|
1328
|
-
y: 0
|
|
1329
|
-
}, h();
|
|
1330
|
-
},
|
|
1331
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1332
|
-
[
|
|
1333
|
-
t,
|
|
1334
|
-
D,
|
|
1335
|
-
r,
|
|
1336
|
-
h,
|
|
1337
|
-
i,
|
|
1338
|
-
s,
|
|
1339
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1340
|
-
JSON.stringify(m),
|
|
1341
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1342
|
-
JSON.stringify(f),
|
|
1343
|
-
E,
|
|
1344
|
-
c,
|
|
1345
|
-
S,
|
|
1346
|
-
u,
|
|
1347
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1348
|
-
JSON.stringify(g)
|
|
1349
|
-
]
|
|
1350
|
-
);
|
|
1351
|
-
}
|
|
1352
|
-
const wr = {
|
|
1353
|
-
x: {
|
|
1354
|
-
[z.Backward]: !1,
|
|
1355
|
-
[z.Forward]: !1
|
|
1356
|
-
},
|
|
1357
|
-
y: {
|
|
1358
|
-
[z.Backward]: !1,
|
|
1359
|
-
[z.Forward]: !1
|
|
1360
|
-
}
|
|
1361
|
-
};
|
|
1362
|
-
function yr(e) {
|
|
1363
|
-
let {
|
|
1364
|
-
delta: t,
|
|
1365
|
-
disabled: n
|
|
1366
|
-
} = e;
|
|
1367
|
-
const r = vt(t);
|
|
1368
|
-
return je((o) => {
|
|
1369
|
-
if (n || !r || !o)
|
|
1370
|
-
return wr;
|
|
1371
|
-
const i = {
|
|
1372
|
-
x: Math.sign(t.x - r.x),
|
|
1373
|
-
y: Math.sign(t.y - r.y)
|
|
1374
|
-
};
|
|
1375
|
-
return {
|
|
1376
|
-
x: {
|
|
1377
|
-
[z.Backward]: o.x[z.Backward] || i.x === -1,
|
|
1378
|
-
[z.Forward]: o.x[z.Forward] || i.x === 1
|
|
1379
|
-
},
|
|
1380
|
-
y: {
|
|
1381
|
-
[z.Backward]: o.y[z.Backward] || i.y === -1,
|
|
1382
|
-
[z.Forward]: o.y[z.Forward] || i.y === 1
|
|
1383
|
-
}
|
|
1384
|
-
};
|
|
1385
|
-
}, [n, t, r]);
|
|
1386
|
-
}
|
|
1387
|
-
function mr(e, t) {
|
|
1388
|
-
const n = t != null ? e.get(t) : void 0, r = n ? n.node.current : null;
|
|
1389
|
-
return je((o) => {
|
|
1390
|
-
var i;
|
|
1391
|
-
return t == null ? null : (i = r ?? o) != null ? i : null;
|
|
1392
|
-
}, [r, t]);
|
|
1393
|
-
}
|
|
1394
|
-
function xr(e, t) {
|
|
1395
|
-
return I(() => e.reduce((n, r) => {
|
|
1396
|
-
const {
|
|
1397
|
-
sensor: o
|
|
1398
|
-
} = r, i = o.activators.map((s) => ({
|
|
1399
|
-
eventName: s.eventName,
|
|
1400
|
-
handler: t(s.handler, r)
|
|
1401
|
-
}));
|
|
1402
|
-
return [...n, ...i];
|
|
1403
|
-
}, []), [e, t]);
|
|
1404
|
-
}
|
|
1405
|
-
var $e;
|
|
1406
|
-
(function(e) {
|
|
1407
|
-
e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging";
|
|
1408
|
-
})($e || ($e = {}));
|
|
1409
|
-
var yt;
|
|
1410
|
-
(function(e) {
|
|
1411
|
-
e.Optimized = "optimized";
|
|
1412
|
-
})(yt || (yt = {}));
|
|
1413
|
-
const Yt = /* @__PURE__ */ new Map();
|
|
1414
|
-
function Dr(e, t) {
|
|
1415
|
-
let {
|
|
1416
|
-
dragging: n,
|
|
1417
|
-
dependencies: r,
|
|
1418
|
-
config: o
|
|
1419
|
-
} = t;
|
|
1420
|
-
const [i, s] = H(null), {
|
|
1421
|
-
frequency: a,
|
|
1422
|
-
measure: l,
|
|
1423
|
-
strategy: c
|
|
1424
|
-
} = o, u = O(e), d = v(), g = Fe(d), f = k(function(w) {
|
|
1425
|
-
w === void 0 && (w = []), !g.current && s((m) => m === null ? w : m.concat(w.filter((p) => !m.includes(p))));
|
|
1426
|
-
}, [g]), E = O(null), h = je((w) => {
|
|
1427
|
-
if (d && !n)
|
|
1428
|
-
return Yt;
|
|
1429
|
-
if (!w || w === Yt || u.current !== e || i != null) {
|
|
1430
|
-
const m = /* @__PURE__ */ new Map();
|
|
1431
|
-
for (let p of e) {
|
|
1432
|
-
if (!p)
|
|
1433
|
-
continue;
|
|
1434
|
-
if (i && i.length > 0 && !i.includes(p.id) && p.rect.current) {
|
|
1435
|
-
m.set(p.id, p.rect.current);
|
|
1436
|
-
continue;
|
|
1437
|
-
}
|
|
1438
|
-
const D = p.node.current, S = D ? new Rt(l(D), D) : null;
|
|
1439
|
-
p.rect.current = S, S && m.set(p.id, S);
|
|
1440
|
-
}
|
|
1441
|
-
return m;
|
|
1442
|
-
}
|
|
1443
|
-
return w;
|
|
1444
|
-
}, [e, i, n, d, l]);
|
|
1445
|
-
return A(() => {
|
|
1446
|
-
u.current = e;
|
|
1447
|
-
}, [e]), A(
|
|
1448
|
-
() => {
|
|
1449
|
-
d || f();
|
|
1450
|
-
},
|
|
1451
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1452
|
-
[n, d]
|
|
1453
|
-
), A(
|
|
1454
|
-
() => {
|
|
1455
|
-
i && i.length > 0 && s(null);
|
|
1456
|
-
},
|
|
1457
|
-
//eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1458
|
-
[JSON.stringify(i)]
|
|
1459
|
-
), A(
|
|
1460
|
-
() => {
|
|
1461
|
-
d || typeof a != "number" || E.current !== null || (E.current = setTimeout(() => {
|
|
1462
|
-
f(), E.current = null;
|
|
1463
|
-
}, a));
|
|
1464
|
-
},
|
|
1465
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1466
|
-
[a, d, f, ...r]
|
|
1467
|
-
), {
|
|
1468
|
-
droppableRects: h,
|
|
1469
|
-
measureDroppableContainers: f,
|
|
1470
|
-
measuringScheduled: i != null
|
|
1471
|
-
};
|
|
1472
|
-
function v() {
|
|
1473
|
-
switch (c) {
|
|
1474
|
-
case $e.Always:
|
|
1475
|
-
return !1;
|
|
1476
|
-
case $e.BeforeDragging:
|
|
1477
|
-
return n;
|
|
1478
|
-
default:
|
|
1479
|
-
return !n;
|
|
1480
|
-
}
|
|
1481
|
-
}
|
|
1482
|
-
}
|
|
1483
|
-
function an(e, t) {
|
|
1484
|
-
return je((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
|
|
1485
|
-
}
|
|
1486
|
-
function Sr(e, t) {
|
|
1487
|
-
return an(e, t);
|
|
1488
|
-
}
|
|
1489
|
-
function Cr(e) {
|
|
1490
|
-
let {
|
|
1491
|
-
callback: t,
|
|
1492
|
-
disabled: n
|
|
1493
|
-
} = e;
|
|
1494
|
-
const r = Dt(t), o = I(() => {
|
|
1495
|
-
if (n || typeof window > "u" || typeof window.MutationObserver > "u")
|
|
1496
|
-
return;
|
|
1497
|
-
const {
|
|
1498
|
-
MutationObserver: i
|
|
1499
|
-
} = window;
|
|
1500
|
-
return new i(r);
|
|
1501
|
-
}, [r, n]);
|
|
1502
|
-
return A(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
|
|
1503
|
-
}
|
|
1504
|
-
function st(e) {
|
|
1505
|
-
let {
|
|
1506
|
-
callback: t,
|
|
1507
|
-
disabled: n
|
|
1508
|
-
} = e;
|
|
1509
|
-
const r = Dt(t), o = I(
|
|
1510
|
-
() => {
|
|
1511
|
-
if (n || typeof window > "u" || typeof window.ResizeObserver > "u")
|
|
1512
|
-
return;
|
|
1513
|
-
const {
|
|
1514
|
-
ResizeObserver: i
|
|
1515
|
-
} = window;
|
|
1516
|
-
return new i(r);
|
|
1517
|
-
},
|
|
1518
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1519
|
-
[n]
|
|
1520
|
-
);
|
|
1521
|
-
return A(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
|
|
1522
|
-
}
|
|
1523
|
-
function Rr(e) {
|
|
1524
|
-
return new Rt(Ee(e), e);
|
|
1525
|
-
}
|
|
1526
|
-
function jt(e, t, n) {
|
|
1527
|
-
t === void 0 && (t = Rr);
|
|
1528
|
-
const [r, o] = H(null);
|
|
1529
|
-
function i() {
|
|
1530
|
-
o((l) => {
|
|
1531
|
-
if (!e)
|
|
1532
|
-
return null;
|
|
1533
|
-
if (e.isConnected === !1) {
|
|
1534
|
-
var c;
|
|
1535
|
-
return (c = l ?? n) != null ? c : null;
|
|
1536
|
-
}
|
|
1537
|
-
const u = t(e);
|
|
1538
|
-
return JSON.stringify(l) === JSON.stringify(u) ? l : u;
|
|
1539
|
-
});
|
|
1540
|
-
}
|
|
1541
|
-
const s = Cr({
|
|
1542
|
-
callback(l) {
|
|
1543
|
-
if (e)
|
|
1544
|
-
for (const c of l) {
|
|
1545
|
-
const {
|
|
1546
|
-
type: u,
|
|
1547
|
-
target: d
|
|
1548
|
-
} = c;
|
|
1549
|
-
if (u === "childList" && d instanceof HTMLElement && d.contains(e)) {
|
|
1550
|
-
i();
|
|
1551
|
-
break;
|
|
1552
|
-
}
|
|
1553
|
-
}
|
|
1554
|
-
}
|
|
1555
|
-
}), a = st({
|
|
1556
|
-
callback: i
|
|
1557
|
-
});
|
|
1558
|
-
return ne(() => {
|
|
1559
|
-
i(), e ? (a == null || a.observe(e), s == null || s.observe(document.body, {
|
|
1560
|
-
childList: !0,
|
|
1561
|
-
subtree: !0
|
|
1562
|
-
})) : (a == null || a.disconnect(), s == null || s.disconnect());
|
|
1563
|
-
}, [e]), r;
|
|
1564
|
-
}
|
|
1565
|
-
function Er(e) {
|
|
1566
|
-
const t = an(e);
|
|
1567
|
-
return Jt(e, t);
|
|
1568
|
-
}
|
|
1569
|
-
const Wt = [];
|
|
1570
|
-
function Ir(e) {
|
|
1571
|
-
const t = O(e), n = je((r) => e ? r && r !== Wt && e && t.current && e.parentNode === t.current.parentNode ? r : Ct(e) : Wt, [e]);
|
|
1572
|
-
return A(() => {
|
|
1573
|
-
t.current = e;
|
|
1574
|
-
}, [e]), n;
|
|
1575
|
-
}
|
|
1576
|
-
function Ar(e) {
|
|
1577
|
-
const [t, n] = H(null), r = O(e), o = k((i) => {
|
|
1578
|
-
const s = ft(i.target);
|
|
1579
|
-
s && n((a) => a ? (a.set(s, bt(s)), new Map(a)) : null);
|
|
1580
|
-
}, []);
|
|
1581
|
-
return A(() => {
|
|
1582
|
-
const i = r.current;
|
|
1583
|
-
if (e !== i) {
|
|
1584
|
-
s(i);
|
|
1585
|
-
const a = e.map((l) => {
|
|
1586
|
-
const c = ft(l);
|
|
1587
|
-
return c ? (c.addEventListener("scroll", o, {
|
|
1588
|
-
passive: !0
|
|
1589
|
-
}), [c, bt(c)]) : null;
|
|
1590
|
-
}).filter((l) => l != null);
|
|
1591
|
-
n(a.length ? new Map(a) : null), r.current = e;
|
|
1592
|
-
}
|
|
1593
|
-
return () => {
|
|
1594
|
-
s(e), s(i);
|
|
1595
|
-
};
|
|
1596
|
-
function s(a) {
|
|
1597
|
-
a.forEach((l) => {
|
|
1598
|
-
const c = ft(l);
|
|
1599
|
-
c == null || c.removeEventListener("scroll", o);
|
|
1600
|
-
});
|
|
1601
|
-
}
|
|
1602
|
-
}, [o, e]), I(() => e.length ? t ? Array.from(t.values()).reduce((i, s) => Se(i, s), _) : nn(e) : _, [e, t]);
|
|
1603
|
-
}
|
|
1604
|
-
function Ut(e, t) {
|
|
1605
|
-
t === void 0 && (t = []);
|
|
1606
|
-
const n = O(null);
|
|
1607
|
-
return A(
|
|
1608
|
-
() => {
|
|
1609
|
-
n.current = null;
|
|
1610
|
-
},
|
|
1611
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1612
|
-
t
|
|
1613
|
-
), A(() => {
|
|
1614
|
-
const r = e !== _;
|
|
1615
|
-
r && !n.current && (n.current = e), !r && n.current && (n.current = null);
|
|
1616
|
-
}, [e]), n.current ? tt(e, n.current) : _;
|
|
1617
|
-
}
|
|
1618
|
-
function Or(e) {
|
|
1619
|
-
A(
|
|
1620
|
-
() => {
|
|
1621
|
-
if (!it)
|
|
1622
|
-
return;
|
|
1623
|
-
const t = e.map((n) => {
|
|
1624
|
-
let {
|
|
1625
|
-
sensor: r
|
|
1626
|
-
} = n;
|
|
1627
|
-
return r.setup == null ? void 0 : r.setup();
|
|
1628
|
-
});
|
|
1629
|
-
return () => {
|
|
1630
|
-
for (const n of t)
|
|
1631
|
-
n == null || n();
|
|
1632
|
-
};
|
|
1633
|
-
},
|
|
1634
|
-
// TO-DO: Sensors length could theoretically change which would not be a valid dependency
|
|
1635
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1636
|
-
e.map((t) => {
|
|
1637
|
-
let {
|
|
1638
|
-
sensor: n
|
|
1639
|
-
} = t;
|
|
1640
|
-
return n;
|
|
1641
|
-
})
|
|
1642
|
-
);
|
|
1643
|
-
}
|
|
1644
|
-
function Tr(e, t) {
|
|
1645
|
-
return I(() => e.reduce((n, r) => {
|
|
1646
|
-
let {
|
|
1647
|
-
eventName: o,
|
|
1648
|
-
handler: i
|
|
1649
|
-
} = r;
|
|
1650
|
-
return n[o] = (s) => {
|
|
1651
|
-
i(s, t);
|
|
1652
|
-
}, n;
|
|
1653
|
-
}, {}), [e, t]);
|
|
1654
|
-
}
|
|
1655
|
-
function ln(e) {
|
|
1656
|
-
return I(() => e ? er(e) : null, [e]);
|
|
1657
|
-
}
|
|
1658
|
-
const Ht = [];
|
|
1659
|
-
function Mr(e, t) {
|
|
1660
|
-
t === void 0 && (t = Ee);
|
|
1661
|
-
const [n] = e, r = ln(n ? X(n) : null), [o, i] = H(Ht);
|
|
1662
|
-
function s() {
|
|
1663
|
-
i(() => e.length ? e.map((l) => en(l) ? r : new Rt(t(l), l)) : Ht);
|
|
1664
|
-
}
|
|
1665
|
-
const a = st({
|
|
1666
|
-
callback: s
|
|
1667
|
-
});
|
|
1668
|
-
return ne(() => {
|
|
1669
|
-
a == null || a.disconnect(), s(), e.forEach((l) => a == null ? void 0 : a.observe(l));
|
|
1670
|
-
}, [e]), o;
|
|
1671
|
-
}
|
|
1672
|
-
function Nr(e) {
|
|
1673
|
-
if (!e)
|
|
1674
|
-
return null;
|
|
1675
|
-
if (e.children.length > 1)
|
|
1676
|
-
return e;
|
|
1677
|
-
const t = e.children[0];
|
|
1678
|
-
return Ye(t) ? t : e;
|
|
1679
|
-
}
|
|
1680
|
-
function Lr(e) {
|
|
1681
|
-
let {
|
|
1682
|
-
measure: t
|
|
1683
|
-
} = e;
|
|
1684
|
-
const [n, r] = H(null), o = k((c) => {
|
|
1685
|
-
for (const {
|
|
1686
|
-
target: u
|
|
1687
|
-
} of c)
|
|
1688
|
-
if (Ye(u)) {
|
|
1689
|
-
r((d) => {
|
|
1690
|
-
const g = t(u);
|
|
1691
|
-
return d ? {
|
|
1692
|
-
...d,
|
|
1693
|
-
width: g.width,
|
|
1694
|
-
height: g.height
|
|
1695
|
-
} : g;
|
|
1696
|
-
});
|
|
1697
|
-
break;
|
|
1698
|
-
}
|
|
1699
|
-
}, [t]), i = st({
|
|
1700
|
-
callback: o
|
|
1701
|
-
}), s = k((c) => {
|
|
1702
|
-
const u = Nr(c);
|
|
1703
|
-
i == null || i.disconnect(), u && (i == null || i.observe(u)), r(u ? t(u) : null);
|
|
1704
|
-
}, [t, i]), [a, l] = et(s);
|
|
1705
|
-
return I(() => ({
|
|
1706
|
-
nodeRef: a,
|
|
1707
|
-
rect: n,
|
|
1708
|
-
setRef: l
|
|
1709
|
-
}), [n, a, l]);
|
|
1710
|
-
}
|
|
1711
|
-
const zr = [{
|
|
1712
|
-
sensor: sn,
|
|
1713
|
-
options: {}
|
|
1714
|
-
}, {
|
|
1715
|
-
sensor: on,
|
|
1716
|
-
options: {}
|
|
1717
|
-
}], Pr = {
|
|
1718
|
-
current: {}
|
|
1719
|
-
}, Ze = {
|
|
1720
|
-
draggable: {
|
|
1721
|
-
measure: kt
|
|
1722
|
-
},
|
|
1723
|
-
droppable: {
|
|
1724
|
-
measure: kt,
|
|
1725
|
-
strategy: $e.WhileDragging,
|
|
1726
|
-
frequency: yt.Optimized
|
|
1727
|
-
},
|
|
1728
|
-
dragOverlay: {
|
|
1729
|
-
measure: Ee
|
|
1730
|
-
}
|
|
1731
|
-
};
|
|
1732
|
-
class ke extends Map {
|
|
1733
|
-
get(t) {
|
|
1734
|
-
var n;
|
|
1735
|
-
return t != null && (n = super.get(t)) != null ? n : void 0;
|
|
1736
|
-
}
|
|
1737
|
-
toArray() {
|
|
1738
|
-
return Array.from(this.values());
|
|
1739
|
-
}
|
|
1740
|
-
getEnabled() {
|
|
1741
|
-
return this.toArray().filter((t) => {
|
|
1742
|
-
let {
|
|
1743
|
-
disabled: n
|
|
1744
|
-
} = t;
|
|
1745
|
-
return !n;
|
|
1746
|
-
});
|
|
1747
|
-
}
|
|
1748
|
-
getNodeFor(t) {
|
|
1749
|
-
var n, r;
|
|
1750
|
-
return (n = (r = this.get(t)) == null ? void 0 : r.node.current) != null ? n : void 0;
|
|
1751
|
-
}
|
|
1752
|
-
}
|
|
1753
|
-
const Br = {
|
|
1754
|
-
activatorEvent: null,
|
|
1755
|
-
active: null,
|
|
1756
|
-
activeNode: null,
|
|
1757
|
-
activeNodeRect: null,
|
|
1758
|
-
collisions: null,
|
|
1759
|
-
containerNodeRect: null,
|
|
1760
|
-
draggableNodes: /* @__PURE__ */ new Map(),
|
|
1761
|
-
droppableRects: /* @__PURE__ */ new Map(),
|
|
1762
|
-
droppableContainers: /* @__PURE__ */ new ke(),
|
|
1763
|
-
over: null,
|
|
1764
|
-
dragOverlay: {
|
|
1765
|
-
nodeRef: {
|
|
1766
|
-
current: null
|
|
1767
|
-
},
|
|
1768
|
-
rect: null,
|
|
1769
|
-
setRef: rt
|
|
1770
|
-
},
|
|
1771
|
-
scrollableAncestors: [],
|
|
1772
|
-
scrollableAncestorRects: [],
|
|
1773
|
-
measuringConfiguration: Ze,
|
|
1774
|
-
measureDroppableContainers: rt,
|
|
1775
|
-
windowRect: null,
|
|
1776
|
-
measuringScheduled: !1
|
|
1777
|
-
}, kr = {
|
|
1778
|
-
activatorEvent: null,
|
|
1779
|
-
activators: [],
|
|
1780
|
-
active: null,
|
|
1781
|
-
activeNodeRect: null,
|
|
1782
|
-
ariaDescribedById: {
|
|
1783
|
-
draggable: ""
|
|
1784
|
-
},
|
|
1785
|
-
dispatch: rt,
|
|
1786
|
-
draggableNodes: /* @__PURE__ */ new Map(),
|
|
1787
|
-
over: null,
|
|
1788
|
-
measureDroppableContainers: rt
|
|
1789
|
-
}, at = /* @__PURE__ */ Xe(kr), cn = /* @__PURE__ */ Xe(Br);
|
|
1790
|
-
function Fr() {
|
|
1791
|
-
return {
|
|
1792
|
-
draggable: {
|
|
1793
|
-
active: null,
|
|
1794
|
-
initialCoordinates: {
|
|
1795
|
-
x: 0,
|
|
1796
|
-
y: 0
|
|
1797
|
-
},
|
|
1798
|
-
nodes: /* @__PURE__ */ new Map(),
|
|
1799
|
-
translate: {
|
|
1800
|
-
x: 0,
|
|
1801
|
-
y: 0
|
|
1802
|
-
}
|
|
1803
|
-
},
|
|
1804
|
-
droppable: {
|
|
1805
|
-
containers: new ke()
|
|
1806
|
-
}
|
|
1807
|
-
};
|
|
1808
|
-
}
|
|
1809
|
-
function $r(e, t) {
|
|
1810
|
-
switch (t.type) {
|
|
1811
|
-
case N.DragStart:
|
|
1812
|
-
return {
|
|
1813
|
-
...e,
|
|
1814
|
-
draggable: {
|
|
1815
|
-
...e.draggable,
|
|
1816
|
-
initialCoordinates: t.initialCoordinates,
|
|
1817
|
-
active: t.active
|
|
1818
|
-
}
|
|
1819
|
-
};
|
|
1820
|
-
case N.DragMove:
|
|
1821
|
-
return e.draggable.active == null ? e : {
|
|
1822
|
-
...e,
|
|
1823
|
-
draggable: {
|
|
1824
|
-
...e.draggable,
|
|
1825
|
-
translate: {
|
|
1826
|
-
x: t.coordinates.x - e.draggable.initialCoordinates.x,
|
|
1827
|
-
y: t.coordinates.y - e.draggable.initialCoordinates.y
|
|
1828
|
-
}
|
|
1829
|
-
}
|
|
1830
|
-
};
|
|
1831
|
-
case N.DragEnd:
|
|
1832
|
-
case N.DragCancel:
|
|
1833
|
-
return {
|
|
1834
|
-
...e,
|
|
1835
|
-
draggable: {
|
|
1836
|
-
...e.draggable,
|
|
1837
|
-
active: null,
|
|
1838
|
-
initialCoordinates: {
|
|
1839
|
-
x: 0,
|
|
1840
|
-
y: 0
|
|
1841
|
-
},
|
|
1842
|
-
translate: {
|
|
1843
|
-
x: 0,
|
|
1844
|
-
y: 0
|
|
1845
|
-
}
|
|
1846
|
-
}
|
|
1847
|
-
};
|
|
1848
|
-
case N.RegisterDroppable: {
|
|
1849
|
-
const {
|
|
1850
|
-
element: n
|
|
1851
|
-
} = t, {
|
|
1852
|
-
id: r
|
|
1853
|
-
} = n, o = new ke(e.droppable.containers);
|
|
1854
|
-
return o.set(r, n), {
|
|
1855
|
-
...e,
|
|
1856
|
-
droppable: {
|
|
1857
|
-
...e.droppable,
|
|
1858
|
-
containers: o
|
|
1859
|
-
}
|
|
1860
|
-
};
|
|
1861
|
-
}
|
|
1862
|
-
case N.SetDroppableDisabled: {
|
|
1863
|
-
const {
|
|
1864
|
-
id: n,
|
|
1865
|
-
key: r,
|
|
1866
|
-
disabled: o
|
|
1867
|
-
} = t, i = e.droppable.containers.get(n);
|
|
1868
|
-
if (!i || r !== i.key)
|
|
1869
|
-
return e;
|
|
1870
|
-
const s = new ke(e.droppable.containers);
|
|
1871
|
-
return s.set(n, {
|
|
1872
|
-
...i,
|
|
1873
|
-
disabled: o
|
|
1874
|
-
}), {
|
|
1875
|
-
...e,
|
|
1876
|
-
droppable: {
|
|
1877
|
-
...e.droppable,
|
|
1878
|
-
containers: s
|
|
1879
|
-
}
|
|
1880
|
-
};
|
|
1881
|
-
}
|
|
1882
|
-
case N.UnregisterDroppable: {
|
|
1883
|
-
const {
|
|
1884
|
-
id: n,
|
|
1885
|
-
key: r
|
|
1886
|
-
} = t, o = e.droppable.containers.get(n);
|
|
1887
|
-
if (!o || r !== o.key)
|
|
1888
|
-
return e;
|
|
1889
|
-
const i = new ke(e.droppable.containers);
|
|
1890
|
-
return i.delete(n), {
|
|
1891
|
-
...e,
|
|
1892
|
-
droppable: {
|
|
1893
|
-
...e.droppable,
|
|
1894
|
-
containers: i
|
|
1895
|
-
}
|
|
1896
|
-
};
|
|
1897
|
-
}
|
|
1898
|
-
default:
|
|
1899
|
-
return e;
|
|
1900
|
-
}
|
|
1901
|
-
}
|
|
1902
|
-
function Xr(e) {
|
|
1903
|
-
let {
|
|
1904
|
-
disabled: t
|
|
1905
|
-
} = e;
|
|
1906
|
-
const {
|
|
1907
|
-
active: n,
|
|
1908
|
-
activatorEvent: r,
|
|
1909
|
-
draggableNodes: o
|
|
1910
|
-
} = pe(at), i = vt(r), s = vt(n == null ? void 0 : n.id);
|
|
1911
|
-
return A(() => {
|
|
1912
|
-
if (!t && !r && i && s != null) {
|
|
1913
|
-
if (!St(i) || document.activeElement === i.target)
|
|
1914
|
-
return;
|
|
1915
|
-
const a = o.get(s);
|
|
1916
|
-
if (!a)
|
|
1917
|
-
return;
|
|
1918
|
-
const {
|
|
1919
|
-
activatorNode: l,
|
|
1920
|
-
node: c
|
|
1921
|
-
} = a;
|
|
1922
|
-
if (!l.current && !c.current)
|
|
1923
|
-
return;
|
|
1924
|
-
requestAnimationFrame(() => {
|
|
1925
|
-
for (const u of [l.current, c.current]) {
|
|
1926
|
-
if (!u)
|
|
1927
|
-
continue;
|
|
1928
|
-
const d = Nn(u);
|
|
1929
|
-
if (d) {
|
|
1930
|
-
d.focus();
|
|
1931
|
-
break;
|
|
1932
|
-
}
|
|
1933
|
-
}
|
|
1934
|
-
});
|
|
1935
|
-
}
|
|
1936
|
-
}, [r, t, o, s, i]), null;
|
|
1937
|
-
}
|
|
1938
|
-
function Yr(e, t) {
|
|
1939
|
-
let {
|
|
1940
|
-
transform: n,
|
|
1941
|
-
...r
|
|
1942
|
-
} = t;
|
|
1943
|
-
return e != null && e.length ? e.reduce((o, i) => i({
|
|
1944
|
-
transform: o,
|
|
1945
|
-
...r
|
|
1946
|
-
}), n) : n;
|
|
1947
|
-
}
|
|
1948
|
-
function jr(e) {
|
|
1949
|
-
return I(
|
|
1950
|
-
() => ({
|
|
1951
|
-
draggable: {
|
|
1952
|
-
...Ze.draggable,
|
|
1953
|
-
...e == null ? void 0 : e.draggable
|
|
1954
|
-
},
|
|
1955
|
-
droppable: {
|
|
1956
|
-
...Ze.droppable,
|
|
1957
|
-
...e == null ? void 0 : e.droppable
|
|
1958
|
-
},
|
|
1959
|
-
dragOverlay: {
|
|
1960
|
-
...Ze.dragOverlay,
|
|
1961
|
-
...e == null ? void 0 : e.dragOverlay
|
|
1962
|
-
}
|
|
1963
|
-
}),
|
|
1964
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1965
|
-
[e == null ? void 0 : e.draggable, e == null ? void 0 : e.droppable, e == null ? void 0 : e.dragOverlay]
|
|
1966
|
-
);
|
|
1967
|
-
}
|
|
1968
|
-
function Wr(e) {
|
|
1969
|
-
let {
|
|
1970
|
-
activeNode: t,
|
|
1971
|
-
measure: n,
|
|
1972
|
-
initialRect: r,
|
|
1973
|
-
config: o = !0
|
|
1974
|
-
} = e;
|
|
1975
|
-
const i = O(!1), {
|
|
1976
|
-
x: s,
|
|
1977
|
-
y: a
|
|
1978
|
-
} = typeof o == "boolean" ? {
|
|
1979
|
-
x: o,
|
|
1980
|
-
y: o
|
|
1981
|
-
} : o;
|
|
1982
|
-
ne(() => {
|
|
1983
|
-
if (!s && !a || !t) {
|
|
1984
|
-
i.current = !1;
|
|
1985
|
-
return;
|
|
1986
|
-
}
|
|
1987
|
-
if (i.current || !r)
|
|
1988
|
-
return;
|
|
1989
|
-
const c = t == null ? void 0 : t.node.current;
|
|
1990
|
-
if (!c || c.isConnected === !1)
|
|
1991
|
-
return;
|
|
1992
|
-
const u = n(c), d = Jt(u, r);
|
|
1993
|
-
if (s || (d.x = 0), a || (d.y = 0), i.current = !0, Math.abs(d.x) > 0 || Math.abs(d.y) > 0) {
|
|
1994
|
-
const g = _t(c);
|
|
1995
|
-
g && g.scrollBy({
|
|
1996
|
-
top: d.y,
|
|
1997
|
-
left: d.x
|
|
1998
|
-
});
|
|
1999
|
-
}
|
|
2000
|
-
}, [t, s, a, r, n]);
|
|
2001
|
-
}
|
|
2002
|
-
const un = /* @__PURE__ */ Xe({
|
|
2003
|
-
..._,
|
|
2004
|
-
scaleX: 1,
|
|
2005
|
-
scaleY: 1
|
|
2006
|
-
});
|
|
2007
|
-
var ge;
|
|
2008
|
-
(function(e) {
|
|
2009
|
-
e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
|
|
2010
|
-
})(ge || (ge = {}));
|
|
2011
|
-
const go = /* @__PURE__ */ Rn(function(t) {
|
|
2012
|
-
var n, r, o, i;
|
|
2013
|
-
let {
|
|
2014
|
-
id: s,
|
|
2015
|
-
accessibility: a,
|
|
2016
|
-
autoScroll: l = !0,
|
|
2017
|
-
children: c,
|
|
2018
|
-
sensors: u = zr,
|
|
2019
|
-
collisionDetection: d = Vn,
|
|
2020
|
-
measuring: g,
|
|
2021
|
-
modifiers: f,
|
|
2022
|
-
...E
|
|
2023
|
-
} = t;
|
|
2024
|
-
const h = En($r, void 0, Fr), [v, w] = h, [m, p] = Fn(), [D, S] = H(ge.Uninitialized), C = D === ge.Initialized, {
|
|
2025
|
-
draggable: {
|
|
2026
|
-
active: y,
|
|
2027
|
-
nodes: b,
|
|
2028
|
-
translate: M
|
|
2029
|
-
},
|
|
2030
|
-
droppable: {
|
|
2031
|
-
containers: L
|
|
2032
|
-
}
|
|
2033
|
-
} = v, T = y != null ? b.get(y) : null, G = O({
|
|
2034
|
-
initial: null,
|
|
2035
|
-
translated: null
|
|
2036
|
-
}), J = I(() => {
|
|
2037
|
-
var B;
|
|
2038
|
-
return y != null ? {
|
|
2039
|
-
id: y,
|
|
2040
|
-
// It's possible for the active node to unmount while dragging
|
|
2041
|
-
data: (B = T == null ? void 0 : T.data) != null ? B : Pr,
|
|
2042
|
-
rect: G
|
|
2043
|
-
} : null;
|
|
2044
|
-
}, [y, T]), Q = O(null), [Ie, Ue] = H(null), [Y, He] = H(null), re = Fe(E, Object.values(E)), Ae = We("DndDescribedBy", s), Ke = I(() => L.getEnabled(), [L]), F = jr(g), {
|
|
2045
|
-
droppableRects: oe,
|
|
2046
|
-
measureDroppableContainers: ve,
|
|
2047
|
-
measuringScheduled: Oe
|
|
2048
|
-
} = Dr(Ke, {
|
|
2049
|
-
dragging: C,
|
|
2050
|
-
dependencies: [M.x, M.y],
|
|
2051
|
-
config: F.droppable
|
|
2052
|
-
}), K = mr(b, y), Ve = I(() => Y ? pt(Y) : null, [Y]), le = Sn(), ie = Sr(K, F.draggable.measure);
|
|
2053
|
-
Wr({
|
|
2054
|
-
activeNode: y != null ? b.get(y) : null,
|
|
2055
|
-
config: le.layoutShiftCompensation,
|
|
2056
|
-
initialRect: ie,
|
|
2057
|
-
measure: F.draggable.measure
|
|
2058
|
-
});
|
|
2059
|
-
const R = jt(K, F.draggable.measure, ie), Te = jt(K ? K.parentElement : null), Z = O({
|
|
2060
|
-
activatorEvent: null,
|
|
2061
|
-
active: null,
|
|
2062
|
-
activeNode: K,
|
|
2063
|
-
collisionRect: null,
|
|
2064
|
-
collisions: null,
|
|
2065
|
-
droppableRects: oe,
|
|
2066
|
-
draggableNodes: b,
|
|
2067
|
-
draggingNode: null,
|
|
2068
|
-
draggingNodeRect: null,
|
|
2069
|
-
droppableContainers: L,
|
|
2070
|
-
over: null,
|
|
2071
|
-
scrollableAncestors: [],
|
|
2072
|
-
scrollAdjustedTranslate: null
|
|
2073
|
-
}), be = L.getNodeFor((n = Z.current.over) == null ? void 0 : n.id), se = Lr({
|
|
2074
|
-
measure: F.dragOverlay.measure
|
|
2075
|
-
}), we = (r = se.nodeRef.current) != null ? r : K, ye = C ? (o = se.rect) != null ? o : R : null, It = !!(se.nodeRef.current && se.rect), At = Er(It ? null : R), lt = ln(we ? X(we) : null), ce = Ir(C ? be ?? K : null), qe = Mr(ce), Ge = Yr(f, {
|
|
2076
|
-
transform: {
|
|
2077
|
-
x: M.x - At.x,
|
|
2078
|
-
y: M.y - At.y,
|
|
2079
|
-
scaleX: 1,
|
|
2080
|
-
scaleY: 1
|
|
2081
|
-
},
|
|
2082
|
-
activatorEvent: Y,
|
|
2083
|
-
active: J,
|
|
2084
|
-
activeNodeRect: R,
|
|
2085
|
-
containerNodeRect: Te,
|
|
2086
|
-
draggingNodeRect: ye,
|
|
2087
|
-
over: Z.current.over,
|
|
2088
|
-
overlayNodeRect: se.rect,
|
|
2089
|
-
scrollableAncestors: ce,
|
|
2090
|
-
scrollableAncestorRects: qe,
|
|
2091
|
-
windowRect: lt
|
|
2092
|
-
}), Ot = Ve ? Se(Ve, M) : null, Tt = Ar(ce), pn = Ut(Tt), bn = Ut(Tt, [R]), me = Se(Ge, pn), xe = ye ? Jn(ye, Ge) : null, Me = J && xe ? d({
|
|
2093
|
-
active: J,
|
|
2094
|
-
collisionRect: xe,
|
|
2095
|
-
droppableRects: oe,
|
|
2096
|
-
droppableContainers: Ke,
|
|
2097
|
-
pointerCoordinates: Ot
|
|
2098
|
-
}) : null, Mt = Hn(Me, "id"), [ue, Nt] = H(null), wn = It ? Ge : Se(Ge, bn), yn = qn(wn, (i = ue == null ? void 0 : ue.rect) != null ? i : null, R), ct = O(null), Lt = k(
|
|
2099
|
-
(B, j) => {
|
|
2100
|
-
let {
|
|
2101
|
-
sensor: W,
|
|
2102
|
-
options: de
|
|
2103
|
-
} = j;
|
|
2104
|
-
if (Q.current == null)
|
|
2105
|
-
return;
|
|
2106
|
-
const V = b.get(Q.current);
|
|
2107
|
-
if (!V)
|
|
2108
|
-
return;
|
|
2109
|
-
const U = B.nativeEvent, ee = new W({
|
|
2110
|
-
active: Q.current,
|
|
2111
|
-
activeNode: V,
|
|
2112
|
-
event: U,
|
|
2113
|
-
options: de,
|
|
2114
|
-
// Sensors need to be instantiated with refs for arguments that change over time
|
|
2115
|
-
// otherwise they are frozen in time with the stale arguments
|
|
2116
|
-
context: Z,
|
|
2117
|
-
onAbort(P) {
|
|
2118
|
-
if (!b.get(P))
|
|
2119
|
-
return;
|
|
2120
|
-
const {
|
|
2121
|
-
onDragAbort: te
|
|
2122
|
-
} = re.current, ae = {
|
|
2123
|
-
id: P
|
|
2124
|
-
};
|
|
2125
|
-
te == null || te(ae), m({
|
|
2126
|
-
type: "onDragAbort",
|
|
2127
|
-
event: ae
|
|
2128
|
-
});
|
|
2129
|
-
},
|
|
2130
|
-
onPending(P, fe, te, ae) {
|
|
2131
|
-
if (!b.get(P))
|
|
2132
|
-
return;
|
|
2133
|
-
const {
|
|
2134
|
-
onDragPending: Le
|
|
2135
|
-
} = re.current, he = {
|
|
2136
|
-
id: P,
|
|
2137
|
-
constraint: fe,
|
|
2138
|
-
initialCoordinates: te,
|
|
2139
|
-
offset: ae
|
|
2140
|
-
};
|
|
2141
|
-
Le == null || Le(he), m({
|
|
2142
|
-
type: "onDragPending",
|
|
2143
|
-
event: he
|
|
2144
|
-
});
|
|
2145
|
-
},
|
|
2146
|
-
onStart(P) {
|
|
2147
|
-
const fe = Q.current;
|
|
2148
|
-
if (fe == null)
|
|
2149
|
-
return;
|
|
2150
|
-
const te = b.get(fe);
|
|
2151
|
-
if (!te)
|
|
2152
|
-
return;
|
|
2153
|
-
const {
|
|
2154
|
-
onDragStart: ae
|
|
2155
|
-
} = re.current, Ne = {
|
|
2156
|
-
activatorEvent: U,
|
|
2157
|
-
active: {
|
|
2158
|
-
id: fe,
|
|
2159
|
-
data: te.data,
|
|
2160
|
-
rect: G
|
|
2161
|
-
}
|
|
2162
|
-
};
|
|
2163
|
-
Je(() => {
|
|
2164
|
-
ae == null || ae(Ne), S(ge.Initializing), w({
|
|
2165
|
-
type: N.DragStart,
|
|
2166
|
-
initialCoordinates: P,
|
|
2167
|
-
active: fe
|
|
2168
|
-
}), m({
|
|
2169
|
-
type: "onDragStart",
|
|
2170
|
-
event: Ne
|
|
2171
|
-
}), Ue(ct.current), He(U);
|
|
2172
|
-
});
|
|
2173
|
-
},
|
|
2174
|
-
onMove(P) {
|
|
2175
|
-
w({
|
|
2176
|
-
type: N.DragMove,
|
|
2177
|
-
coordinates: P
|
|
2178
|
-
});
|
|
2179
|
-
},
|
|
2180
|
-
onEnd: De(N.DragEnd),
|
|
2181
|
-
onCancel: De(N.DragCancel)
|
|
2182
|
-
});
|
|
2183
|
-
ct.current = ee;
|
|
2184
|
-
function De(P) {
|
|
2185
|
-
return async function() {
|
|
2186
|
-
const {
|
|
2187
|
-
active: te,
|
|
2188
|
-
collisions: ae,
|
|
2189
|
-
over: Ne,
|
|
2190
|
-
scrollAdjustedTranslate: Le
|
|
2191
|
-
} = Z.current;
|
|
2192
|
-
let he = null;
|
|
2193
|
-
if (te && Le) {
|
|
2194
|
-
const {
|
|
2195
|
-
cancelDrop: ze
|
|
2196
|
-
} = re.current;
|
|
2197
|
-
he = {
|
|
2198
|
-
activatorEvent: U,
|
|
2199
|
-
active: te,
|
|
2200
|
-
collisions: ae,
|
|
2201
|
-
delta: Le,
|
|
2202
|
-
over: Ne
|
|
2203
|
-
}, P === N.DragEnd && typeof ze == "function" && await Promise.resolve(ze(he)) && (P = N.DragCancel);
|
|
2204
|
-
}
|
|
2205
|
-
Q.current = null, Je(() => {
|
|
2206
|
-
w({
|
|
2207
|
-
type: P
|
|
2208
|
-
}), S(ge.Uninitialized), Nt(null), Ue(null), He(null), ct.current = null;
|
|
2209
|
-
const ze = P === N.DragEnd ? "onDragEnd" : "onDragCancel";
|
|
2210
|
-
if (he) {
|
|
2211
|
-
const ut = re.current[ze];
|
|
2212
|
-
ut == null || ut(he), m({
|
|
2213
|
-
type: ze,
|
|
2214
|
-
event: he
|
|
2215
|
-
});
|
|
2216
|
-
}
|
|
2217
|
-
});
|
|
2218
|
-
};
|
|
2219
|
-
}
|
|
2220
|
-
},
|
|
2221
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2222
|
-
[b]
|
|
2223
|
-
), mn = k((B, j) => (W, de) => {
|
|
2224
|
-
const V = W.nativeEvent, U = b.get(de);
|
|
2225
|
-
if (
|
|
2226
|
-
// Another sensor is already instantiating
|
|
2227
|
-
Q.current !== null || // No active draggable
|
|
2228
|
-
!U || // Event has already been captured
|
|
2229
|
-
V.dndKit || V.defaultPrevented
|
|
2230
|
-
)
|
|
2231
|
-
return;
|
|
2232
|
-
const ee = {
|
|
2233
|
-
active: U
|
|
2234
|
-
};
|
|
2235
|
-
B(W, j.options, ee) === !0 && (V.dndKit = {
|
|
2236
|
-
capturedBy: j.sensor
|
|
2237
|
-
}, Q.current = de, Lt(W, j));
|
|
2238
|
-
}, [b, Lt]), zt = xr(u, mn);
|
|
2239
|
-
Or(u), ne(() => {
|
|
2240
|
-
R && D === ge.Initializing && S(ge.Initialized);
|
|
2241
|
-
}, [R, D]), A(
|
|
2242
|
-
() => {
|
|
2243
|
-
const {
|
|
2244
|
-
onDragMove: B
|
|
2245
|
-
} = re.current, {
|
|
2246
|
-
active: j,
|
|
2247
|
-
activatorEvent: W,
|
|
2248
|
-
collisions: de,
|
|
2249
|
-
over: V
|
|
2250
|
-
} = Z.current;
|
|
2251
|
-
if (!j || !W)
|
|
2252
|
-
return;
|
|
2253
|
-
const U = {
|
|
2254
|
-
active: j,
|
|
2255
|
-
activatorEvent: W,
|
|
2256
|
-
collisions: de,
|
|
2257
|
-
delta: {
|
|
2258
|
-
x: me.x,
|
|
2259
|
-
y: me.y
|
|
2260
|
-
},
|
|
2261
|
-
over: V
|
|
2262
|
-
};
|
|
2263
|
-
Je(() => {
|
|
2264
|
-
B == null || B(U), m({
|
|
2265
|
-
type: "onDragMove",
|
|
2266
|
-
event: U
|
|
2267
|
-
});
|
|
2268
|
-
});
|
|
2269
|
-
},
|
|
2270
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2271
|
-
[me.x, me.y]
|
|
2272
|
-
), A(
|
|
2273
|
-
() => {
|
|
2274
|
-
const {
|
|
2275
|
-
active: B,
|
|
2276
|
-
activatorEvent: j,
|
|
2277
|
-
collisions: W,
|
|
2278
|
-
droppableContainers: de,
|
|
2279
|
-
scrollAdjustedTranslate: V
|
|
2280
|
-
} = Z.current;
|
|
2281
|
-
if (!B || Q.current == null || !j || !V)
|
|
2282
|
-
return;
|
|
2283
|
-
const {
|
|
2284
|
-
onDragOver: U
|
|
2285
|
-
} = re.current, ee = de.get(Mt), De = ee && ee.rect.current ? {
|
|
2286
|
-
id: ee.id,
|
|
2287
|
-
rect: ee.rect.current,
|
|
2288
|
-
data: ee.data,
|
|
2289
|
-
disabled: ee.disabled
|
|
2290
|
-
} : null, P = {
|
|
2291
|
-
active: B,
|
|
2292
|
-
activatorEvent: j,
|
|
2293
|
-
collisions: W,
|
|
2294
|
-
delta: {
|
|
2295
|
-
x: V.x,
|
|
2296
|
-
y: V.y
|
|
2297
|
-
},
|
|
2298
|
-
over: De
|
|
2299
|
-
};
|
|
2300
|
-
Je(() => {
|
|
2301
|
-
Nt(De), U == null || U(P), m({
|
|
2302
|
-
type: "onDragOver",
|
|
2303
|
-
event: P
|
|
2304
|
-
});
|
|
2305
|
-
});
|
|
2306
|
-
},
|
|
2307
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2308
|
-
[Mt]
|
|
2309
|
-
), ne(() => {
|
|
2310
|
-
Z.current = {
|
|
2311
|
-
activatorEvent: Y,
|
|
2312
|
-
active: J,
|
|
2313
|
-
activeNode: K,
|
|
2314
|
-
collisionRect: xe,
|
|
2315
|
-
collisions: Me,
|
|
2316
|
-
droppableRects: oe,
|
|
2317
|
-
draggableNodes: b,
|
|
2318
|
-
draggingNode: we,
|
|
2319
|
-
draggingNodeRect: ye,
|
|
2320
|
-
droppableContainers: L,
|
|
2321
|
-
over: ue,
|
|
2322
|
-
scrollableAncestors: ce,
|
|
2323
|
-
scrollAdjustedTranslate: me
|
|
2324
|
-
}, G.current = {
|
|
2325
|
-
initial: ye,
|
|
2326
|
-
translated: xe
|
|
2327
|
-
};
|
|
2328
|
-
}, [J, K, Me, xe, b, we, ye, oe, L, ue, ce, me]), br({
|
|
2329
|
-
...le,
|
|
2330
|
-
delta: M,
|
|
2331
|
-
draggingRect: xe,
|
|
2332
|
-
pointerCoordinates: Ot,
|
|
2333
|
-
scrollableAncestors: ce,
|
|
2334
|
-
scrollableAncestorRects: qe
|
|
2335
|
-
});
|
|
2336
|
-
const xn = I(() => ({
|
|
2337
|
-
active: J,
|
|
2338
|
-
activeNode: K,
|
|
2339
|
-
activeNodeRect: R,
|
|
2340
|
-
activatorEvent: Y,
|
|
2341
|
-
collisions: Me,
|
|
2342
|
-
containerNodeRect: Te,
|
|
2343
|
-
dragOverlay: se,
|
|
2344
|
-
draggableNodes: b,
|
|
2345
|
-
droppableContainers: L,
|
|
2346
|
-
droppableRects: oe,
|
|
2347
|
-
over: ue,
|
|
2348
|
-
measureDroppableContainers: ve,
|
|
2349
|
-
scrollableAncestors: ce,
|
|
2350
|
-
scrollableAncestorRects: qe,
|
|
2351
|
-
measuringConfiguration: F,
|
|
2352
|
-
measuringScheduled: Oe,
|
|
2353
|
-
windowRect: lt
|
|
2354
|
-
}), [J, K, R, Y, Me, Te, se, b, L, oe, ue, ve, ce, qe, F, Oe, lt]), Dn = I(() => ({
|
|
2355
|
-
activatorEvent: Y,
|
|
2356
|
-
activators: zt,
|
|
2357
|
-
active: J,
|
|
2358
|
-
activeNodeRect: R,
|
|
2359
|
-
ariaDescribedById: {
|
|
2360
|
-
draggable: Ae
|
|
2361
|
-
},
|
|
2362
|
-
dispatch: w,
|
|
2363
|
-
draggableNodes: b,
|
|
2364
|
-
over: ue,
|
|
2365
|
-
measureDroppableContainers: ve
|
|
2366
|
-
}), [Y, zt, J, R, w, Ae, b, ue, ve]);
|
|
2367
|
-
return $.createElement(Gt.Provider, {
|
|
2368
|
-
value: p
|
|
2369
|
-
}, $.createElement(at.Provider, {
|
|
2370
|
-
value: Dn
|
|
2371
|
-
}, $.createElement(cn.Provider, {
|
|
2372
|
-
value: xn
|
|
2373
|
-
}, $.createElement(un.Provider, {
|
|
2374
|
-
value: yn
|
|
2375
|
-
}, c)), $.createElement(Xr, {
|
|
2376
|
-
disabled: (a == null ? void 0 : a.restoreFocus) === !1
|
|
2377
|
-
})), $.createElement(Yn, {
|
|
2378
|
-
...a,
|
|
2379
|
-
hiddenTextDescribedById: Ae
|
|
2380
|
-
}));
|
|
2381
|
-
function Sn() {
|
|
2382
|
-
const B = (Ie == null ? void 0 : Ie.autoScrollEnabled) === !1, j = typeof l == "object" ? l.enabled === !1 : l === !1, W = C && !B && !j;
|
|
2383
|
-
return typeof l == "object" ? {
|
|
2384
|
-
...l,
|
|
2385
|
-
enabled: W
|
|
2386
|
-
} : {
|
|
2387
|
-
enabled: W
|
|
2388
|
-
};
|
|
2389
|
-
}
|
|
2390
|
-
}), Ur = /* @__PURE__ */ Xe(null), Kt = "button", Hr = "Draggable";
|
|
2391
|
-
function Kr(e) {
|
|
2392
|
-
let {
|
|
2393
|
-
id: t,
|
|
2394
|
-
data: n,
|
|
2395
|
-
disabled: r = !1,
|
|
2396
|
-
attributes: o
|
|
2397
|
-
} = e;
|
|
2398
|
-
const i = We(Hr), {
|
|
2399
|
-
activators: s,
|
|
2400
|
-
activatorEvent: a,
|
|
2401
|
-
active: l,
|
|
2402
|
-
activeNodeRect: c,
|
|
2403
|
-
ariaDescribedById: u,
|
|
2404
|
-
draggableNodes: d,
|
|
2405
|
-
over: g
|
|
2406
|
-
} = pe(at), {
|
|
2407
|
-
role: f = Kt,
|
|
2408
|
-
roleDescription: E = "draggable",
|
|
2409
|
-
tabIndex: h = 0
|
|
2410
|
-
} = o ?? {}, v = (l == null ? void 0 : l.id) === t, w = pe(v ? un : Ur), [m, p] = et(), [D, S] = et(), C = Tr(s, t), y = Fe(n);
|
|
2411
|
-
ne(
|
|
2412
|
-
() => (d.set(t, {
|
|
2413
|
-
id: t,
|
|
2414
|
-
key: i,
|
|
2415
|
-
node: m,
|
|
2416
|
-
activatorNode: D,
|
|
2417
|
-
data: y
|
|
2418
|
-
}), () => {
|
|
2419
|
-
const M = d.get(t);
|
|
2420
|
-
M && M.key === i && d.delete(t);
|
|
2421
|
-
}),
|
|
2422
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2423
|
-
[d, t]
|
|
2424
|
-
);
|
|
2425
|
-
const b = I(() => ({
|
|
2426
|
-
role: f,
|
|
2427
|
-
tabIndex: h,
|
|
2428
|
-
"aria-disabled": r,
|
|
2429
|
-
"aria-pressed": v && f === Kt ? !0 : void 0,
|
|
2430
|
-
"aria-roledescription": E,
|
|
2431
|
-
"aria-describedby": u.draggable
|
|
2432
|
-
}), [r, f, h, v, E, u.draggable]);
|
|
2433
|
-
return {
|
|
2434
|
-
active: l,
|
|
2435
|
-
activatorEvent: a,
|
|
2436
|
-
activeNodeRect: c,
|
|
2437
|
-
attributes: b,
|
|
2438
|
-
isDragging: v,
|
|
2439
|
-
listeners: r ? void 0 : C,
|
|
2440
|
-
node: m,
|
|
2441
|
-
over: g,
|
|
2442
|
-
setNodeRef: p,
|
|
2443
|
-
setActivatorNodeRef: S,
|
|
2444
|
-
transform: w
|
|
2445
|
-
};
|
|
2446
|
-
}
|
|
2447
|
-
function Vr() {
|
|
2448
|
-
return pe(cn);
|
|
2449
|
-
}
|
|
2450
|
-
const qr = "Droppable", Gr = {
|
|
2451
|
-
timeout: 25
|
|
2452
|
-
};
|
|
2453
|
-
function Jr(e) {
|
|
2454
|
-
let {
|
|
2455
|
-
data: t,
|
|
2456
|
-
disabled: n = !1,
|
|
2457
|
-
id: r,
|
|
2458
|
-
resizeObserverConfig: o
|
|
2459
|
-
} = e;
|
|
2460
|
-
const i = We(qr), {
|
|
2461
|
-
active: s,
|
|
2462
|
-
dispatch: a,
|
|
2463
|
-
over: l,
|
|
2464
|
-
measureDroppableContainers: c
|
|
2465
|
-
} = pe(at), u = O({
|
|
2466
|
-
disabled: n
|
|
2467
|
-
}), d = O(!1), g = O(null), f = O(null), {
|
|
2468
|
-
disabled: E,
|
|
2469
|
-
updateMeasurementsFor: h,
|
|
2470
|
-
timeout: v
|
|
2471
|
-
} = {
|
|
2472
|
-
...Gr,
|
|
2473
|
-
...o
|
|
2474
|
-
}, w = Fe(h ?? r), m = k(
|
|
2475
|
-
() => {
|
|
2476
|
-
if (!d.current) {
|
|
2477
|
-
d.current = !0;
|
|
2478
|
-
return;
|
|
2479
|
-
}
|
|
2480
|
-
f.current != null && clearTimeout(f.current), f.current = setTimeout(() => {
|
|
2481
|
-
c(Array.isArray(w.current) ? w.current : [w.current]), f.current = null;
|
|
2482
|
-
}, v);
|
|
2483
|
-
},
|
|
2484
|
-
//eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2485
|
-
[v]
|
|
2486
|
-
), p = st({
|
|
2487
|
-
callback: m,
|
|
2488
|
-
disabled: E || !s
|
|
2489
|
-
}), D = k((b, M) => {
|
|
2490
|
-
p && (M && (p.unobserve(M), d.current = !1), b && p.observe(b));
|
|
2491
|
-
}, [p]), [S, C] = et(D), y = Fe(t);
|
|
2492
|
-
return A(() => {
|
|
2493
|
-
!p || !S.current || (p.disconnect(), d.current = !1, p.observe(S.current));
|
|
2494
|
-
}, [S, p]), A(
|
|
2495
|
-
() => (a({
|
|
2496
|
-
type: N.RegisterDroppable,
|
|
2497
|
-
element: {
|
|
2498
|
-
id: r,
|
|
2499
|
-
key: i,
|
|
2500
|
-
disabled: n,
|
|
2501
|
-
node: S,
|
|
2502
|
-
rect: g,
|
|
2503
|
-
data: y
|
|
2504
|
-
}
|
|
2505
|
-
}), () => a({
|
|
2506
|
-
type: N.UnregisterDroppable,
|
|
2507
|
-
key: i,
|
|
2508
|
-
id: r
|
|
2509
|
-
})),
|
|
2510
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2511
|
-
[r]
|
|
2512
|
-
), A(() => {
|
|
2513
|
-
n !== u.current.disabled && (a({
|
|
2514
|
-
type: N.SetDroppableDisabled,
|
|
2515
|
-
id: r,
|
|
2516
|
-
key: i,
|
|
2517
|
-
disabled: n
|
|
2518
|
-
}), u.current.disabled = n);
|
|
2519
|
-
}, [r, i, n, a]), {
|
|
2520
|
-
active: s,
|
|
2521
|
-
rect: g,
|
|
2522
|
-
isOver: (l == null ? void 0 : l.id) === r,
|
|
2523
|
-
node: S,
|
|
2524
|
-
over: l,
|
|
2525
|
-
setNodeRef: C
|
|
2526
|
-
};
|
|
2527
|
-
}
|
|
2528
|
-
function dn(e, t, n) {
|
|
2529
|
-
const r = e.slice();
|
|
2530
|
-
return r.splice(n < 0 ? r.length + n : n, 0, r.splice(t, 1)[0]), r;
|
|
2531
|
-
}
|
|
2532
|
-
function _r(e, t) {
|
|
2533
|
-
return e.reduce((n, r, o) => {
|
|
2534
|
-
const i = t.get(r);
|
|
2535
|
-
return i && (n[o] = i), n;
|
|
2536
|
-
}, Array(e.length));
|
|
2537
|
-
}
|
|
2538
|
-
function _e(e) {
|
|
2539
|
-
return e !== null && e >= 0;
|
|
2540
|
-
}
|
|
2541
|
-
function Qr(e, t) {
|
|
2542
|
-
if (e === t)
|
|
2543
|
-
return !0;
|
|
2544
|
-
if (e.length !== t.length)
|
|
2545
|
-
return !1;
|
|
2546
|
-
for (let n = 0; n < e.length; n++)
|
|
2547
|
-
if (e[n] !== t[n])
|
|
2548
|
-
return !1;
|
|
2549
|
-
return !0;
|
|
2550
|
-
}
|
|
2551
|
-
function Zr(e) {
|
|
2552
|
-
return typeof e == "boolean" ? {
|
|
2553
|
-
draggable: e,
|
|
2554
|
-
droppable: e
|
|
2555
|
-
} : e;
|
|
2556
|
-
}
|
|
2557
|
-
const Qe = {
|
|
2558
|
-
scaleX: 1,
|
|
2559
|
-
scaleY: 1
|
|
2560
|
-
}, vo = (e) => {
|
|
2561
|
-
var t;
|
|
2562
|
-
let {
|
|
2563
|
-
rects: n,
|
|
2564
|
-
activeNodeRect: r,
|
|
2565
|
-
activeIndex: o,
|
|
2566
|
-
overIndex: i,
|
|
2567
|
-
index: s
|
|
2568
|
-
} = e;
|
|
2569
|
-
const a = (t = n[o]) != null ? t : r;
|
|
2570
|
-
if (!a)
|
|
2571
|
-
return null;
|
|
2572
|
-
const l = eo(n, s, o);
|
|
2573
|
-
if (s === o) {
|
|
2574
|
-
const c = n[i];
|
|
2575
|
-
return c ? {
|
|
2576
|
-
x: o < i ? c.left + c.width - (a.left + a.width) : c.left - a.left,
|
|
2577
|
-
y: 0,
|
|
2578
|
-
...Qe
|
|
2579
|
-
} : null;
|
|
2580
|
-
}
|
|
2581
|
-
return s > o && s <= i ? {
|
|
2582
|
-
x: -a.width - l,
|
|
2583
|
-
y: 0,
|
|
2584
|
-
...Qe
|
|
2585
|
-
} : s < o && s >= i ? {
|
|
2586
|
-
x: a.width + l,
|
|
2587
|
-
y: 0,
|
|
2588
|
-
...Qe
|
|
2589
|
-
} : {
|
|
2590
|
-
x: 0,
|
|
2591
|
-
y: 0,
|
|
2592
|
-
...Qe
|
|
2593
|
-
};
|
|
2594
|
-
};
|
|
2595
|
-
function eo(e, t, n) {
|
|
2596
|
-
const r = e[t], o = e[t - 1], i = e[t + 1];
|
|
2597
|
-
return !r || !o && !i ? 0 : n < t ? o ? r.left - (o.left + o.width) : i.left - (r.left + r.width) : i ? i.left - (r.left + r.width) : r.left - (o.left + o.width);
|
|
2598
|
-
}
|
|
2599
|
-
const fn = (e) => {
|
|
2600
|
-
let {
|
|
2601
|
-
rects: t,
|
|
2602
|
-
activeIndex: n,
|
|
2603
|
-
overIndex: r,
|
|
2604
|
-
index: o
|
|
2605
|
-
} = e;
|
|
2606
|
-
const i = dn(t, r, n), s = t[o], a = i[o];
|
|
2607
|
-
return !a || !s ? null : {
|
|
2608
|
-
x: a.left - s.left,
|
|
2609
|
-
y: a.top - s.top,
|
|
2610
|
-
scaleX: a.width / s.width,
|
|
2611
|
-
scaleY: a.height / s.height
|
|
2612
|
-
};
|
|
2613
|
-
}, hn = "Sortable", gn = /* @__PURE__ */ $.createContext({
|
|
2614
|
-
activeIndex: -1,
|
|
2615
|
-
containerId: hn,
|
|
2616
|
-
disableTransforms: !1,
|
|
2617
|
-
items: [],
|
|
2618
|
-
overIndex: -1,
|
|
2619
|
-
useDragOverlay: !1,
|
|
2620
|
-
sortedRects: [],
|
|
2621
|
-
strategy: fn,
|
|
2622
|
-
disabled: {
|
|
2623
|
-
draggable: !1,
|
|
2624
|
-
droppable: !1
|
|
2625
|
-
}
|
|
2626
|
-
});
|
|
2627
|
-
function po(e) {
|
|
2628
|
-
let {
|
|
2629
|
-
children: t,
|
|
2630
|
-
id: n,
|
|
2631
|
-
items: r,
|
|
2632
|
-
strategy: o = fn,
|
|
2633
|
-
disabled: i = !1
|
|
2634
|
-
} = e;
|
|
2635
|
-
const {
|
|
2636
|
-
active: s,
|
|
2637
|
-
dragOverlay: a,
|
|
2638
|
-
droppableRects: l,
|
|
2639
|
-
over: c,
|
|
2640
|
-
measureDroppableContainers: u
|
|
2641
|
-
} = Vr(), d = We(hn, n), g = a.rect !== null, f = I(() => r.map((C) => typeof C == "object" && "id" in C ? C.id : C), [r]), E = s != null, h = s ? f.indexOf(s.id) : -1, v = c ? f.indexOf(c.id) : -1, w = O(f), m = !Qr(f, w.current), p = v !== -1 && h === -1 || m, D = Zr(i);
|
|
2642
|
-
ne(() => {
|
|
2643
|
-
m && E && u(f);
|
|
2644
|
-
}, [m, f, E, u]), A(() => {
|
|
2645
|
-
w.current = f;
|
|
2646
|
-
}, [f]);
|
|
2647
|
-
const S = I(
|
|
2648
|
-
() => ({
|
|
2649
|
-
activeIndex: h,
|
|
2650
|
-
containerId: d,
|
|
2651
|
-
disabled: D,
|
|
2652
|
-
disableTransforms: p,
|
|
2653
|
-
items: f,
|
|
2654
|
-
overIndex: v,
|
|
2655
|
-
useDragOverlay: g,
|
|
2656
|
-
sortedRects: _r(f, l),
|
|
2657
|
-
strategy: o
|
|
2658
|
-
}),
|
|
2659
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2660
|
-
[h, d, D.draggable, D.droppable, p, f, v, l, g, o]
|
|
2661
|
-
);
|
|
2662
|
-
return $.createElement(gn.Provider, {
|
|
2663
|
-
value: S
|
|
2664
|
-
}, t);
|
|
2665
|
-
}
|
|
2666
|
-
const to = (e) => {
|
|
2667
|
-
let {
|
|
2668
|
-
id: t,
|
|
2669
|
-
items: n,
|
|
2670
|
-
activeIndex: r,
|
|
2671
|
-
overIndex: o
|
|
2672
|
-
} = e;
|
|
2673
|
-
return dn(n, r, o).indexOf(t);
|
|
2674
|
-
}, no = (e) => {
|
|
2675
|
-
let {
|
|
2676
|
-
containerId: t,
|
|
2677
|
-
isSorting: n,
|
|
2678
|
-
wasDragging: r,
|
|
2679
|
-
index: o,
|
|
2680
|
-
items: i,
|
|
2681
|
-
newIndex: s,
|
|
2682
|
-
previousItems: a,
|
|
2683
|
-
previousContainerId: l,
|
|
2684
|
-
transition: c
|
|
2685
|
-
} = e;
|
|
2686
|
-
return !c || !r || a !== i && o === s ? !1 : n ? !0 : s !== o && t === l;
|
|
2687
|
-
}, ro = {
|
|
2688
|
-
duration: 200,
|
|
2689
|
-
easing: "ease"
|
|
2690
|
-
}, vn = "transform", oo = /* @__PURE__ */ nt.Transition.toString({
|
|
2691
|
-
property: vn,
|
|
2692
|
-
duration: 0,
|
|
2693
|
-
easing: "linear"
|
|
2694
|
-
}), io = {
|
|
2695
|
-
roleDescription: "sortable"
|
|
2696
|
-
};
|
|
2697
|
-
function so(e) {
|
|
2698
|
-
let {
|
|
2699
|
-
disabled: t,
|
|
2700
|
-
index: n,
|
|
2701
|
-
node: r,
|
|
2702
|
-
rect: o
|
|
2703
|
-
} = e;
|
|
2704
|
-
const [i, s] = H(null), a = O(n);
|
|
2705
|
-
return ne(() => {
|
|
2706
|
-
if (!t && n !== a.current && r.current) {
|
|
2707
|
-
const l = o.current;
|
|
2708
|
-
if (l) {
|
|
2709
|
-
const c = Ee(r.current, {
|
|
2710
|
-
ignoreTransform: !0
|
|
2711
|
-
}), u = {
|
|
2712
|
-
x: l.left - c.left,
|
|
2713
|
-
y: l.top - c.top,
|
|
2714
|
-
scaleX: l.width / c.width,
|
|
2715
|
-
scaleY: l.height / c.height
|
|
2716
|
-
};
|
|
2717
|
-
(u.x || u.y) && s(u);
|
|
2718
|
-
}
|
|
2719
|
-
}
|
|
2720
|
-
n !== a.current && (a.current = n);
|
|
2721
|
-
}, [t, n, r, o]), A(() => {
|
|
2722
|
-
i && s(null);
|
|
2723
|
-
}, [i]), i;
|
|
2724
|
-
}
|
|
2725
|
-
function bo(e) {
|
|
2726
|
-
let {
|
|
2727
|
-
animateLayoutChanges: t = no,
|
|
2728
|
-
attributes: n,
|
|
2729
|
-
disabled: r,
|
|
2730
|
-
data: o,
|
|
2731
|
-
getNewIndex: i = to,
|
|
2732
|
-
id: s,
|
|
2733
|
-
strategy: a,
|
|
2734
|
-
resizeObserverConfig: l,
|
|
2735
|
-
transition: c = ro
|
|
2736
|
-
} = e;
|
|
2737
|
-
const {
|
|
2738
|
-
items: u,
|
|
2739
|
-
containerId: d,
|
|
2740
|
-
activeIndex: g,
|
|
2741
|
-
disabled: f,
|
|
2742
|
-
disableTransforms: E,
|
|
2743
|
-
sortedRects: h,
|
|
2744
|
-
overIndex: v,
|
|
2745
|
-
useDragOverlay: w,
|
|
2746
|
-
strategy: m
|
|
2747
|
-
} = pe(gn), p = ao(r, f), D = u.indexOf(s), S = I(() => ({
|
|
2748
|
-
sortable: {
|
|
2749
|
-
containerId: d,
|
|
2750
|
-
index: D,
|
|
2751
|
-
items: u
|
|
2752
|
-
},
|
|
2753
|
-
...o
|
|
2754
|
-
}), [d, o, D, u]), C = I(() => u.slice(u.indexOf(s)), [u, s]), {
|
|
2755
|
-
rect: y,
|
|
2756
|
-
node: b,
|
|
2757
|
-
isOver: M,
|
|
2758
|
-
setNodeRef: L
|
|
2759
|
-
} = Jr({
|
|
2760
|
-
id: s,
|
|
2761
|
-
data: S,
|
|
2762
|
-
disabled: p.droppable,
|
|
2763
|
-
resizeObserverConfig: {
|
|
2764
|
-
updateMeasurementsFor: C,
|
|
2765
|
-
...l
|
|
2766
|
-
}
|
|
2767
|
-
}), {
|
|
2768
|
-
active: T,
|
|
2769
|
-
activatorEvent: G,
|
|
2770
|
-
activeNodeRect: J,
|
|
2771
|
-
attributes: Q,
|
|
2772
|
-
setNodeRef: Ie,
|
|
2773
|
-
listeners: Ue,
|
|
2774
|
-
isDragging: Y,
|
|
2775
|
-
over: He,
|
|
2776
|
-
setActivatorNodeRef: re,
|
|
2777
|
-
transform: Ae
|
|
2778
|
-
} = Kr({
|
|
2779
|
-
id: s,
|
|
2780
|
-
data: S,
|
|
2781
|
-
attributes: {
|
|
2782
|
-
...io,
|
|
2783
|
-
...n
|
|
2784
|
-
},
|
|
2785
|
-
disabled: p.draggable
|
|
2786
|
-
}), Ke = An(L, Ie), F = !!T, oe = F && !E && _e(g) && _e(v), ve = !w && Y, Oe = ve && oe ? Ae : null, Ve = oe ? Oe ?? (a ?? m)({
|
|
2787
|
-
rects: h,
|
|
2788
|
-
activeNodeRect: J,
|
|
2789
|
-
activeIndex: g,
|
|
2790
|
-
overIndex: v,
|
|
2791
|
-
index: D
|
|
2792
|
-
}) : null, le = _e(g) && _e(v) ? i({
|
|
2793
|
-
id: s,
|
|
2794
|
-
items: u,
|
|
2795
|
-
activeIndex: g,
|
|
2796
|
-
overIndex: v
|
|
2797
|
-
}) : D, ie = T == null ? void 0 : T.id, R = O({
|
|
2798
|
-
activeId: ie,
|
|
2799
|
-
items: u,
|
|
2800
|
-
newIndex: le,
|
|
2801
|
-
containerId: d
|
|
2802
|
-
}), Te = u !== R.current.items, Z = t({
|
|
2803
|
-
active: T,
|
|
2804
|
-
containerId: d,
|
|
2805
|
-
isDragging: Y,
|
|
2806
|
-
isSorting: F,
|
|
2807
|
-
id: s,
|
|
2808
|
-
index: D,
|
|
2809
|
-
items: u,
|
|
2810
|
-
newIndex: R.current.newIndex,
|
|
2811
|
-
previousItems: R.current.items,
|
|
2812
|
-
previousContainerId: R.current.containerId,
|
|
2813
|
-
transition: c,
|
|
2814
|
-
wasDragging: R.current.activeId != null
|
|
2815
|
-
}), be = so({
|
|
2816
|
-
disabled: !Z,
|
|
2817
|
-
index: D,
|
|
2818
|
-
node: b,
|
|
2819
|
-
rect: y
|
|
2820
|
-
});
|
|
2821
|
-
return A(() => {
|
|
2822
|
-
F && R.current.newIndex !== le && (R.current.newIndex = le), d !== R.current.containerId && (R.current.containerId = d), u !== R.current.items && (R.current.items = u);
|
|
2823
|
-
}, [F, le, d, u]), A(() => {
|
|
2824
|
-
if (ie === R.current.activeId)
|
|
2825
|
-
return;
|
|
2826
|
-
if (ie != null && R.current.activeId == null) {
|
|
2827
|
-
R.current.activeId = ie;
|
|
2828
|
-
return;
|
|
2829
|
-
}
|
|
2830
|
-
const we = setTimeout(() => {
|
|
2831
|
-
R.current.activeId = ie;
|
|
2832
|
-
}, 50);
|
|
2833
|
-
return () => clearTimeout(we);
|
|
2834
|
-
}, [ie]), {
|
|
2835
|
-
active: T,
|
|
2836
|
-
activeIndex: g,
|
|
2837
|
-
attributes: Q,
|
|
2838
|
-
data: S,
|
|
2839
|
-
rect: y,
|
|
2840
|
-
index: D,
|
|
2841
|
-
newIndex: le,
|
|
2842
|
-
items: u,
|
|
2843
|
-
isOver: M,
|
|
2844
|
-
isSorting: F,
|
|
2845
|
-
isDragging: Y,
|
|
2846
|
-
listeners: Ue,
|
|
2847
|
-
node: b,
|
|
2848
|
-
overIndex: v,
|
|
2849
|
-
over: He,
|
|
2850
|
-
setNodeRef: Ke,
|
|
2851
|
-
setActivatorNodeRef: re,
|
|
2852
|
-
setDroppableNodeRef: L,
|
|
2853
|
-
setDraggableNodeRef: Ie,
|
|
2854
|
-
transform: be ?? Ve,
|
|
2855
|
-
transition: se()
|
|
2856
|
-
};
|
|
2857
|
-
function se() {
|
|
2858
|
-
if (
|
|
2859
|
-
// Temporarily disable transitions for a single frame to set up derived transforms
|
|
2860
|
-
be || // Or to prevent items jumping to back to their "new" position when items change
|
|
2861
|
-
Te && R.current.newIndex === D
|
|
2862
|
-
)
|
|
2863
|
-
return oo;
|
|
2864
|
-
if (!(ve && !St(G) || !c) && (F || Z))
|
|
2865
|
-
return nt.Transition.toString({
|
|
2866
|
-
...c,
|
|
2867
|
-
property: vn
|
|
2868
|
-
});
|
|
2869
|
-
}
|
|
2870
|
-
}
|
|
2871
|
-
function ao(e, t) {
|
|
2872
|
-
var n, r;
|
|
2873
|
-
return typeof e == "boolean" ? {
|
|
2874
|
-
draggable: e,
|
|
2875
|
-
// Backwards compatibility
|
|
2876
|
-
droppable: !1
|
|
2877
|
-
} : {
|
|
2878
|
-
draggable: (n = e == null ? void 0 : e.draggable) != null ? n : t.draggable,
|
|
2879
|
-
droppable: (r = e == null ? void 0 : e.droppable) != null ? r : t.droppable
|
|
2880
|
-
};
|
|
2881
|
-
}
|
|
2882
|
-
x.Down, x.Right, x.Up, x.Left;
|
|
2883
|
-
export {
|
|
2884
|
-
nt as C,
|
|
2885
|
-
go as D,
|
|
2886
|
-
on as K,
|
|
2887
|
-
sn as P,
|
|
2888
|
-
po as S,
|
|
2889
|
-
fo as a,
|
|
2890
|
-
uo as b,
|
|
2891
|
-
ho as c,
|
|
2892
|
-
no as d,
|
|
2893
|
-
dn as e,
|
|
2894
|
-
vo as h,
|
|
2895
|
-
bo as u
|
|
2896
|
-
};
|