@react-aria/dnd 3.0.0-alpha.3 → 3.0.0-alpha.4

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/main.js CHANGED
@@ -1,2431 +1,1817 @@
1
- var {
2
- useMessageFormatter
3
- } = require("@react-aria/i18n");
4
-
5
- var _reactDom = $parcel$interopDefault(require("react-dom"));
6
-
7
- var {
8
- useId,
9
- useDescription,
10
- mergeProps,
11
- getScrollParent,
12
- isIOS,
13
- isWebKit,
14
- chain
15
- } = require("@react-aria/utils");
16
-
17
- var {
18
- getInteractionModality,
19
- useInteractionModality,
20
- setInteractionModality,
21
- useFocus
22
- } = require("@react-aria/interactions");
23
-
24
- var _babelRuntimeHelpersWrapAsyncGenerator = $parcel$interopDefault(require("@babel/runtime/helpers/wrapAsyncGenerator"));
25
-
26
- var _babelRuntimeHelpersAwaitAsyncGenerator = $parcel$interopDefault(require("@babel/runtime/helpers/awaitAsyncGenerator"));
27
-
28
- var {
29
- ariaHideOutside
30
- } = require("@react-aria/overlays");
31
-
32
- var {
33
- announce
34
- } = require("@react-aria/live-announcer");
35
-
36
- var {
37
- useRef,
38
- useState,
39
- useEffect,
40
- useLayoutEffect,
41
- useCallback
42
- } = require("react");
43
-
44
- var _babelRuntimeHelpersInteropRequireDefault = $parcel$interopDefault(require("@babel/runtime/helpers/interopRequireDefault"));
1
+ var $4on3C$react = require("react");
2
+ var $4on3C$reactdom = require("react-dom");
3
+ var $4on3C$reactariautils = require("@react-aria/utils");
4
+ var $4on3C$reactariai18n = require("@react-aria/i18n");
5
+ var $4on3C$reactarialiveannouncer = require("@react-aria/live-announcer");
6
+ var $4on3C$reactariaoverlays = require("@react-aria/overlays");
7
+ var $4on3C$reactariainteractions = require("@react-aria/interactions");
8
+
9
+ function $parcel$exportWildcard(dest, source) {
10
+ Object.keys(source).forEach(function(key) {
11
+ if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
12
+ return;
13
+ }
45
14
 
46
- var _babelRuntimeHelpersExtends = $parcel$interopDefault(require("@babel/runtime/helpers/extends"));
15
+ Object.defineProperty(dest, key, {
16
+ enumerable: true,
17
+ get: function get() {
18
+ return source[key];
19
+ }
20
+ });
21
+ });
47
22
 
23
+ return dest;
24
+ }
48
25
  function $parcel$interopDefault(a) {
49
26
  return a && a.__esModule ? a.default : a;
50
27
  }
51
-
52
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/src/constants.ts
53
- var $b29ea0269b2ea2bf4827b4fa19ddc83e$var$_temp;
54
-
55
- /*
56
- * Copyright 2020 Adobe. All rights reserved.
57
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
58
- * you may not use this file except in compliance with the License. You may obtain a copy
59
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
60
- *
61
- * Unless required by applicable law or agreed to in writing, software distributed under
62
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
63
- * OF ANY KIND, either express or implied. See the License for the specific language
64
- * governing permissions and limitations under the License.
65
- */
66
- let $b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_OPERATION; // See https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/effectAllowed
67
-
68
- (function (DROP_OPERATION) {
69
- DROP_OPERATION[DROP_OPERATION["none"] = 0] = "none";
70
- DROP_OPERATION[DROP_OPERATION["cancel"] = 0] = "cancel";
71
- DROP_OPERATION[DROP_OPERATION["move"] = 1] = "move";
72
- DROP_OPERATION[DROP_OPERATION["copy"] = 2] = "copy";
73
- DROP_OPERATION[DROP_OPERATION["link"] = 4] = "link";
74
- DROP_OPERATION[DROP_OPERATION["all"] = 7] = "all";
75
- })($b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_OPERATION || ($b29ea0269b2ea2bf4827b4fa19ddc83e$var$_temp = $b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_OPERATION = {}, $b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_OPERATION, $b29ea0269b2ea2bf4827b4fa19ddc83e$var$_temp));
76
-
77
- const $b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_OPERATION_ALLOWED = _babelRuntimeHelpersExtends({}, $b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_OPERATION, {
78
- copyMove: $b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_OPERATION.copy | $b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_OPERATION.move,
79
- copyLink: $b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_OPERATION.copy | $b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_OPERATION.link,
80
- linkMove: $b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_OPERATION.link | $b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_OPERATION.move,
81
- all: $b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_OPERATION.all,
82
- uninitialized: $b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_OPERATION.all
83
- });
84
-
85
- const $b29ea0269b2ea2bf4827b4fa19ddc83e$export$EFFECT_ALLOWED = $b29ea0269b2ea2bf4827b4fa19ddc83e$var$invert($b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_OPERATION_ALLOWED);
86
- const $b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_EFFECT = $b29ea0269b2ea2bf4827b4fa19ddc83e$var$invert($b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_OPERATION);
87
- const $b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_EFFECT_TO_DROP_OPERATION = {
88
- none: 'cancel',
89
- link: 'link',
90
- copy: 'copy',
91
- move: 'move'
28
+ function $parcel$export(e, n, v, s) {
29
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
30
+ }
31
+ var $d067e40b40cb0a24$exports = {};
32
+
33
+ $parcel$export($d067e40b40cb0a24$exports, "useDrag", () => $d067e40b40cb0a24$export$7941f8aafa4b6021);
34
+
35
+
36
+
37
+ let $8e4046ff5ec007bd$export$60b7b4bcf3903d8e;
38
+ (function($8e4046ff5ec007bd$export$60b7b4bcf3903d8e) {
39
+ $8e4046ff5ec007bd$export$60b7b4bcf3903d8e[$8e4046ff5ec007bd$export$60b7b4bcf3903d8e["none"] = 0] = "none";
40
+ $8e4046ff5ec007bd$export$60b7b4bcf3903d8e[$8e4046ff5ec007bd$export$60b7b4bcf3903d8e["cancel"] = 0] = "cancel";
41
+ $8e4046ff5ec007bd$export$60b7b4bcf3903d8e[$8e4046ff5ec007bd$export$60b7b4bcf3903d8e["move"] = 1] = "move";
42
+ $8e4046ff5ec007bd$export$60b7b4bcf3903d8e[$8e4046ff5ec007bd$export$60b7b4bcf3903d8e["copy"] = 2] = "copy";
43
+ $8e4046ff5ec007bd$export$60b7b4bcf3903d8e[$8e4046ff5ec007bd$export$60b7b4bcf3903d8e["link"] = 4] = "link";
44
+ $8e4046ff5ec007bd$export$60b7b4bcf3903d8e[$8e4046ff5ec007bd$export$60b7b4bcf3903d8e["all"] = 7] = "all";
45
+ })($8e4046ff5ec007bd$export$60b7b4bcf3903d8e || ($8e4046ff5ec007bd$export$60b7b4bcf3903d8e = {
46
+ }));
47
+ const $8e4046ff5ec007bd$export$9bbdfc78cf083e16 = {
48
+ ...$8e4046ff5ec007bd$export$60b7b4bcf3903d8e,
49
+ copyMove: $8e4046ff5ec007bd$export$60b7b4bcf3903d8e.copy | $8e4046ff5ec007bd$export$60b7b4bcf3903d8e.move,
50
+ copyLink: $8e4046ff5ec007bd$export$60b7b4bcf3903d8e.copy | $8e4046ff5ec007bd$export$60b7b4bcf3903d8e.link,
51
+ linkMove: $8e4046ff5ec007bd$export$60b7b4bcf3903d8e.link | $8e4046ff5ec007bd$export$60b7b4bcf3903d8e.move,
52
+ all: $8e4046ff5ec007bd$export$60b7b4bcf3903d8e.all,
53
+ uninitialized: $8e4046ff5ec007bd$export$60b7b4bcf3903d8e.all
92
54
  };
93
- const $b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_OPERATION_TO_DROP_EFFECT = $b29ea0269b2ea2bf4827b4fa19ddc83e$var$invert($b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_EFFECT_TO_DROP_OPERATION);
94
-
95
- function $b29ea0269b2ea2bf4827b4fa19ddc83e$var$invert(object) {
96
- let res = {};
97
-
98
- for (let key in object) {
99
- res[object[key]] = key;
100
- }
101
-
102
- return res;
55
+ const $8e4046ff5ec007bd$export$dd0165308d8bff45 = $8e4046ff5ec007bd$var$invert($8e4046ff5ec007bd$export$9bbdfc78cf083e16);
56
+ const $8e4046ff5ec007bd$export$d7ebf00f36b7a95e = $8e4046ff5ec007bd$var$invert($8e4046ff5ec007bd$export$60b7b4bcf3903d8e);
57
+ const $8e4046ff5ec007bd$export$608ecc6f1b23c35d = {
58
+ none: 'cancel',
59
+ link: 'link',
60
+ copy: 'copy',
61
+ move: 'move'
62
+ };
63
+ const $8e4046ff5ec007bd$export$5eacb0769d26d3b2 = $8e4046ff5ec007bd$var$invert($8e4046ff5ec007bd$export$608ecc6f1b23c35d);
64
+ function $8e4046ff5ec007bd$var$invert(object) {
65
+ let res = {
66
+ };
67
+ for(let key in object)res[object[key]] = key;
68
+ return res;
103
69
  }
70
+ const $8e4046ff5ec007bd$export$4a7729b856e9a690 = new Set([
71
+ 'text/plain',
72
+ 'text/uri-list',
73
+ 'text/html'
74
+ ]);
75
+ const $8e4046ff5ec007bd$export$fd9f9fc120c5402d = 'application/vnd.react-aria.items+json';
76
+ const $8e4046ff5ec007bd$export$f8fc6581787339b3 = 'application/octet-stream';
104
77
 
105
- const $b29ea0269b2ea2bf4827b4fa19ddc83e$export$NATIVE_DRAG_TYPES = new Set(['text/plain', 'text/uri-list', 'text/html']);
106
- const $b29ea0269b2ea2bf4827b4fa19ddc83e$export$CUSTOM_DRAG_TYPE = 'application/vnd.react-aria.items+json';
107
- const $b29ea0269b2ea2bf4827b4fa19ddc83e$export$GENERIC_TYPE = 'application/octet-stream';
108
- const $bc29619458500c186021634c18dc$var$droppableCollectionIds = new WeakMap();
109
-
110
- function $bc29619458500c186021634c18dc$export$useDroppableCollectionId(state) {
111
- let id = useId();
112
- $bc29619458500c186021634c18dc$var$droppableCollectionIds.set(state, id);
113
- return id;
114
- }
115
78
 
116
- function $bc29619458500c186021634c18dc$export$getDroppableCollectionId(state) {
117
- let id = $bc29619458500c186021634c18dc$var$droppableCollectionIds.get(state);
118
79
 
119
- if (!id) {
120
- throw new Error('Droppable item outside a droppable collection');
121
- }
122
80
 
123
- return id;
81
+ const $c1cba3854dc3a167$var$droppableCollectionIds = new WeakMap();
82
+ function $c1cba3854dc3a167$export$b1601eb39394a581(state) {
83
+ let id = $4on3C$reactariautils.useId();
84
+ $c1cba3854dc3a167$var$droppableCollectionIds.set(state, id);
85
+ return id;
124
86
  }
125
-
126
- function $bc29619458500c186021634c18dc$export$getTypes(items) {
127
- let types = new Set();
128
-
129
- for (let item of items) {
130
- for (let type of Object.keys(item)) {
131
- types.add(type);
132
- }
133
- }
134
-
135
- return types;
87
+ function $c1cba3854dc3a167$export$3093291712f09a77(state) {
88
+ let id = $c1cba3854dc3a167$var$droppableCollectionIds.get(state);
89
+ if (!id) throw new Error('Droppable item outside a droppable collection');
90
+ return id;
136
91
  }
137
-
138
- function $bc29619458500c186021634c18dc$var$mapModality(modality) {
139
- if (!modality) {
140
- modality = 'virtual';
141
- }
142
-
143
- if (modality === 'pointer') {
144
- modality = 'virtual';
145
- }
146
-
147
- if (modality === 'virtual' && 'ontouchstart' in window) {
148
- modality = 'touch';
149
- }
150
-
151
- return modality;
92
+ function $c1cba3854dc3a167$export$e1d41611756c6326(items) {
93
+ let types = new Set();
94
+ for (let item of items)for (let type of Object.keys(item))types.add(type);
95
+ return types;
152
96
  }
153
-
154
- function $bc29619458500c186021634c18dc$export$useDragModality() {
155
- return $bc29619458500c186021634c18dc$var$mapModality(useInteractionModality());
97
+ function $c1cba3854dc3a167$var$mapModality(modality) {
98
+ if (!modality) modality = 'virtual';
99
+ if (modality === 'pointer') modality = 'virtual';
100
+ if (modality === 'virtual' && 'ontouchstart' in window) modality = 'touch';
101
+ return modality;
156
102
  }
157
-
158
- function $bc29619458500c186021634c18dc$export$getDragModality() {
159
- return $bc29619458500c186021634c18dc$var$mapModality(getInteractionModality());
103
+ function $c1cba3854dc3a167$export$49bac5d6d4b352ea() {
104
+ return $c1cba3854dc3a167$var$mapModality($4on3C$reactariainteractions.useInteractionModality());
160
105
  }
161
-
162
- function $bc29619458500c186021634c18dc$export$writeToDataTransfer(dataTransfer, items) {
163
- // The data transfer API doesn't support more than one item of a given type at once.
164
- // In addition, only a small set of types are supported natively for transfer between applications.
165
- // We allow for both multiple items, as well as multiple representations of a single item.
166
- // In order to make our API work with the native API, we serialize all items to JSON and
167
- // store as a single native item. We only need to do this if there is more than one item
168
- // of the same type, or if an item has more than one representation. Otherwise the native
169
- // API is sufficient.
170
- //
171
- // The DataTransferItemList API also theoretically supports adding files, which would enable
172
- // dragging binary data out of the browser onto the user's desktop for example. Unfortunately,
173
- // this does not currently work in any browser, so it is not currently supported by our API.
174
- // See e.g. https://bugs.chromium.org/p/chromium/issues/detail?id=438479.
175
- let groupedByType = new Map();
176
- let needsCustomData = false;
177
- let customData = [];
178
-
179
- for (let item of items) {
180
- let types = Object.keys(item);
181
-
182
- if (types.length > 1) {
183
- needsCustomData = true;
184
- }
185
-
186
- let dataByType = {};
187
-
188
- for (let type of types) {
189
- let typeItems = groupedByType.get(type);
190
-
191
- if (!typeItems) {
192
- typeItems = [];
193
- groupedByType.set(type, typeItems);
194
- } else {
195
- needsCustomData = true;
196
- }
197
-
198
- let data = item[type];
199
- dataByType[type] = data;
200
- typeItems.push(data);
201
- }
202
-
203
- customData.push(dataByType);
204
- }
205
-
206
- for (let [type, items] of groupedByType) {
207
- if ($b29ea0269b2ea2bf4827b4fa19ddc83e$export$NATIVE_DRAG_TYPES.has(type)) {
208
- // Only one item of a given type can be set on a data transfer.
209
- // Join all of the items together separated by newlines.
210
- let data = items.join('\n');
211
- dataTransfer.items.add(data, type);
212
- } else {
213
- // Set data to the first item so we have access to the list of types.
214
- dataTransfer.items.add(items[0], type);
215
- }
216
- }
217
-
218
- if (needsCustomData) {
219
- let data = JSON.stringify(customData);
220
- dataTransfer.items.add(data, $b29ea0269b2ea2bf4827b4fa19ddc83e$export$CUSTOM_DRAG_TYPE);
221
- }
106
+ function $c1cba3854dc3a167$export$1fb2158d224b542c() {
107
+ return $c1cba3854dc3a167$var$mapModality($4on3C$reactariainteractions.getInteractionModality());
222
108
  }
223
-
224
- class $bc29619458500c186021634c18dc$export$DragTypes {
225
- constructor(dataTransfer) {
226
- this.types = void 0;
227
- this.includesUnknownTypes = void 0;
228
- this.types = new Set();
229
- let hasFiles = false;
230
-
231
- for (let item of dataTransfer.items) {
232
- if (item.type !== $b29ea0269b2ea2bf4827b4fa19ddc83e$export$CUSTOM_DRAG_TYPE) {
233
- if (item.kind === 'file') {
234
- hasFiles = true;
109
+ function $c1cba3854dc3a167$export$f9c1490890ddd063(dataTransfer, items) {
110
+ // The data transfer API doesn't support more than one item of a given type at once.
111
+ // In addition, only a small set of types are supported natively for transfer between applications.
112
+ // We allow for both multiple items, as well as multiple representations of a single item.
113
+ // In order to make our API work with the native API, we serialize all items to JSON and
114
+ // store as a single native item. We only need to do this if there is more than one item
115
+ // of the same type, or if an item has more than one representation. Otherwise the native
116
+ // API is sufficient.
117
+ //
118
+ // The DataTransferItemList API also theoretically supports adding files, which would enable
119
+ // dragging binary data out of the browser onto the user's desktop for example. Unfortunately,
120
+ // this does not currently work in any browser, so it is not currently supported by our API.
121
+ // See e.g. https://bugs.chromium.org/p/chromium/issues/detail?id=438479.
122
+ let groupedByType = new Map();
123
+ let needsCustomData = false;
124
+ let customData = [];
125
+ for (let item of items){
126
+ let types = Object.keys(item);
127
+ if (types.length > 1) needsCustomData = true;
128
+ let dataByType = {
129
+ };
130
+ for (let type of types){
131
+ let typeItems = groupedByType.get(type);
132
+ if (!typeItems) {
133
+ typeItems = [];
134
+ groupedByType.set(type, typeItems);
135
+ } else needsCustomData = true;
136
+ let data = item[type];
137
+ dataByType[type] = data;
138
+ typeItems.push(data);
235
139
  }
236
-
237
- if (item.type) {
238
- this.types.add(item.type);
239
- } else {
240
- // Files with unknown types or extensions that don't map to a known mime type
241
- // are sometimes exposed as an empty string by the browser. Map to a generic
242
- // mime type instead. Note that this could also be a directory as there's no
243
- // way to determine if something is a file or directory until drop.
244
- this.types.add($b29ea0269b2ea2bf4827b4fa19ddc83e$export$GENERIC_TYPE);
140
+ customData.push(dataByType);
141
+ }
142
+ for (let [type, items1] of groupedByType)if ($8e4046ff5ec007bd$export$4a7729b856e9a690.has(type)) {
143
+ // Only one item of a given type can be set on a data transfer.
144
+ // Join all of the items together separated by newlines.
145
+ let data = items1.join('\n');
146
+ dataTransfer.items.add(data, type);
147
+ } else // Set data to the first item so we have access to the list of types.
148
+ dataTransfer.items.add(items1[0], type);
149
+ if (needsCustomData) {
150
+ let data = JSON.stringify(customData);
151
+ dataTransfer.items.add(data, $8e4046ff5ec007bd$export$fd9f9fc120c5402d);
152
+ }
153
+ }
154
+ class $c1cba3854dc3a167$export$7f04ce188c91447c {
155
+ constructor(dataTransfer){
156
+ this.types = new Set();
157
+ let hasFiles = false;
158
+ for (let item of dataTransfer.items)if (item.type !== $8e4046ff5ec007bd$export$fd9f9fc120c5402d) {
159
+ if (item.kind === 'file') hasFiles = true;
160
+ if (item.type) this.types.add(item.type);
161
+ else // Files with unknown types or extensions that don't map to a known mime type
162
+ // are sometimes exposed as an empty string by the browser. Map to a generic
163
+ // mime type instead. Note that this could also be a directory as there's no
164
+ // way to determine if something is a file or directory until drop.
165
+ this.types.add($8e4046ff5ec007bd$export$f8fc6581787339b3);
245
166
  }
246
- }
247
- } // In Safari, when dragging files, the dataTransfer.items list is empty, but dataTransfer.types contains "Files".
248
- // Unfortunately, this doesn't tell us what types of files the user is dragging, so we need to assume that any
249
- // type the user checks for is included. See https://bugs.webkit.org/show_bug.cgi?id=223517.
250
-
251
-
252
- this.includesUnknownTypes = !hasFiles && dataTransfer.types.includes('Files');
253
- }
254
-
255
- has(type) {
256
- if (this.includesUnknownTypes) {
257
- return true;
167
+ // In Safari, when dragging files, the dataTransfer.items list is empty, but dataTransfer.types contains "Files".
168
+ // Unfortunately, this doesn't tell us what types of files the user is dragging, so we need to assume that any
169
+ // type the user checks for is included. See https://bugs.webkit.org/show_bug.cgi?id=223517.
170
+ this.includesUnknownTypes = !hasFiles && dataTransfer.types.includes('Files');
171
+ }
172
+ has(type) {
173
+ if (this.includesUnknownTypes) return true;
174
+ return this.types.has(type);
258
175
  }
259
-
260
- return this.types.has(type);
261
- }
262
-
263
176
  }
264
-
265
- function $bc29619458500c186021634c18dc$export$readFromDataTransfer(dataTransfer) {
266
- let items = []; // If our custom drag type is available, use that. This is a JSON serialized
267
- // representation of all items in the drag, set when there are multiple items
268
- // of the same type, or an individual item has multiple representations.
269
-
270
- let hasCustomType = false;
271
-
272
- if (dataTransfer.types.includes($b29ea0269b2ea2bf4827b4fa19ddc83e$export$CUSTOM_DRAG_TYPE)) {
273
- try {
274
- let data = dataTransfer.getData($b29ea0269b2ea2bf4827b4fa19ddc83e$export$CUSTOM_DRAG_TYPE);
275
- let parsed = JSON.parse(data);
276
-
277
- for (let item of parsed) {
278
- items.push({
279
- kind: 'text',
280
- types: new Set(Object.keys(item)),
281
- getText: type => Promise.resolve(item[type])
177
+ function $c1cba3854dc3a167$export$d9e760437831f8b3(dataTransfer) {
178
+ let items = [];
179
+ // If our custom drag type is available, use that. This is a JSON serialized
180
+ // representation of all items in the drag, set when there are multiple items
181
+ // of the same type, or an individual item has multiple representations.
182
+ let hasCustomType = false;
183
+ if (dataTransfer.types.includes($8e4046ff5ec007bd$export$fd9f9fc120c5402d)) try {
184
+ let data = dataTransfer.getData($8e4046ff5ec007bd$export$fd9f9fc120c5402d);
185
+ let parsed = JSON.parse(data);
186
+ for (let item of parsed)items.push({
187
+ kind: 'text',
188
+ types: new Set(Object.keys(item)),
189
+ getText: (type)=>Promise.resolve(item[type])
282
190
  });
283
- }
284
-
285
- hasCustomType = true;
286
- } catch (e) {// ignore
287
- }
288
- } // Otherwise, map native drag items to items of a single representation.
289
-
290
-
291
- if (!hasCustomType) {
292
- let stringItems = new Map();
293
-
294
- for (let item of dataTransfer.items) {
295
- if (item.kind === 'string') {
296
- // The data for all formats must be read here because the data transfer gets
297
- // cleared out after the event handler finishes. If the item has an empty string
298
- // as a type, the mime type is unknown. Map to a generic mime type instead.
299
- stringItems.set(item.type || $b29ea0269b2ea2bf4827b4fa19ddc83e$export$GENERIC_TYPE, dataTransfer.getData(item.type));
300
- } else if (item.kind === 'file') {
301
- // Despite the name, webkitGetAsEntry is also implemented in Firefox and Edge.
302
- // In the future, we may use getAsFileSystemHandle instead, but that's currently
303
- // only implemented in Chrome.
304
- if (typeof item.webkitGetAsEntry === 'function') {
305
- let entry = item.webkitGetAsEntry();
306
-
307
- if (!entry) {
308
- // For some reason, Firefox includes an item with type image/png when copy
309
- // and pasting any file or directory (no matter the type), but returns `null` for both
310
- // item.getAsFile() and item.webkitGetAsEntry(). Safari works as expected. Ignore this
311
- // item if this happens. See https://bugzilla.mozilla.org/show_bug.cgi?id=1699743.
312
- // This was recently fixed in Chrome Canary: https://bugs.chromium.org/p/chromium/issues/detail?id=1175483.
313
- continue;
314
- }
315
-
316
- if (entry.isFile) {
317
- items.push($bc29619458500c186021634c18dc$var$createFileItem(item.getAsFile()));
318
- } else if (entry.isDirectory) {
319
- items.push($bc29619458500c186021634c18dc$var$createDirectoryItem(entry));
320
- }
321
- } else {
322
- // Assume it's a file.
323
- items.push($bc29619458500c186021634c18dc$var$createFileItem(item.getAsFile()));
191
+ hasCustomType = true;
192
+ } catch (e) {
193
+ // ignore
194
+ }
195
+ // Otherwise, map native drag items to items of a single representation.
196
+ if (!hasCustomType) {
197
+ let stringItems = new Map();
198
+ for (let item of dataTransfer.items){
199
+ if (item.kind === 'string') // The data for all formats must be read here because the data transfer gets
200
+ // cleared out after the event handler finishes. If the item has an empty string
201
+ // as a type, the mime type is unknown. Map to a generic mime type instead.
202
+ stringItems.set(item.type || $8e4046ff5ec007bd$export$f8fc6581787339b3, dataTransfer.getData(item.type));
203
+ else if (item.kind === 'file') {
204
+ // Despite the name, webkitGetAsEntry is also implemented in Firefox and Edge.
205
+ // In the future, we may use getAsFileSystemHandle instead, but that's currently
206
+ // only implemented in Chrome.
207
+ if (typeof item.webkitGetAsEntry === 'function') {
208
+ let entry = item.webkitGetAsEntry();
209
+ if (!entry) continue;
210
+ if (entry.isFile) items.push($c1cba3854dc3a167$var$createFileItem(item.getAsFile()));
211
+ else if (entry.isDirectory) items.push($c1cba3854dc3a167$var$createDirectoryItem(entry));
212
+ } else // Assume it's a file.
213
+ items.push($c1cba3854dc3a167$var$createFileItem(item.getAsFile()));
214
+ }
324
215
  }
325
- }
326
- } // All string items are different representations of the same item. There's no way to have
327
- // multiple string items at once in the current DataTransfer API.
328
-
329
-
330
- if (stringItems.size > 0) {
331
- items.push({
332
- kind: 'text',
333
- types: new Set(stringItems.keys()),
334
- getText: type => Promise.resolve(stringItems.get(type))
335
- });
216
+ // All string items are different representations of the same item. There's no way to have
217
+ // multiple string items at once in the current DataTransfer API.
218
+ if (stringItems.size > 0) items.push({
219
+ kind: 'text',
220
+ types: new Set(stringItems.keys()),
221
+ getText: (type)=>Promise.resolve(stringItems.get(type))
222
+ });
336
223
  }
337
- }
338
-
339
- return items;
340
- }
341
-
342
- function $bc29619458500c186021634c18dc$var$blobToString(blob) {
343
- if (typeof blob.text === 'function') {
344
- return blob.text();
345
- } // Safari doesn't have the Blob#text() method yet...
346
-
347
-
348
- return new Promise((resolve, reject) => {
349
- let reader = new FileReader();
350
-
351
- reader.onload = () => {
352
- resolve(reader.result);
353
- };
354
-
355
- reader.onerror = reject;
356
- reader.readAsText(blob);
357
- });
224
+ return items;
358
225
  }
359
-
360
- function $bc29619458500c186021634c18dc$var$createFileItem(file) {
361
- return {
362
- kind: 'file',
363
- type: file.type || $b29ea0269b2ea2bf4827b4fa19ddc83e$export$GENERIC_TYPE,
364
- name: file.name,
365
- getText: () => $bc29619458500c186021634c18dc$var$blobToString(file),
366
- getFile: () => Promise.resolve(file)
367
- };
226
+ function $c1cba3854dc3a167$var$blobToString(blob) {
227
+ if (typeof blob.text === 'function') return blob.text();
228
+ // Safari doesn't have the Blob#text() method yet...
229
+ return new Promise((resolve, reject)=>{
230
+ let reader = new FileReader;
231
+ reader.onload = ()=>{
232
+ resolve(reader.result);
233
+ };
234
+ reader.onerror = reject;
235
+ reader.readAsText(blob);
236
+ });
368
237
  }
369
-
370
- function $bc29619458500c186021634c18dc$var$createDirectoryItem(entry) {
371
- return {
372
- kind: 'directory',
373
- name: entry.name,
374
- getEntries: () => $bc29619458500c186021634c18dc$var$_getEntries2(entry)
375
- };
238
+ function $c1cba3854dc3a167$var$createFileItem(file) {
239
+ return {
240
+ kind: 'file',
241
+ type: file.type || $8e4046ff5ec007bd$export$f8fc6581787339b3,
242
+ name: file.name,
243
+ getText: ()=>$c1cba3854dc3a167$var$blobToString(file)
244
+ ,
245
+ getFile: ()=>Promise.resolve(file)
246
+ };
376
247
  }
377
-
378
- function $bc29619458500c186021634c18dc$var$_getEntries2(_x) {
379
- return $bc29619458500c186021634c18dc$var$_getEntries.apply(this, arguments);
248
+ function $c1cba3854dc3a167$var$createDirectoryItem(entry) {
249
+ return {
250
+ kind: 'directory',
251
+ name: entry.name,
252
+ getEntries: ()=>$c1cba3854dc3a167$var$getEntries(entry)
253
+ };
380
254
  }
381
-
382
- function $bc29619458500c186021634c18dc$var$_getEntries() {
383
- $bc29619458500c186021634c18dc$var$_getEntries = _babelRuntimeHelpersWrapAsyncGenerator(function* (item) {
384
- let reader = item.createReader(); // We must call readEntries repeatedly because there may be a limit to the
255
+ async function* $c1cba3854dc3a167$var$getEntries(item) {
256
+ let reader = item.createReader();
257
+ // We must call readEntries repeatedly because there may be a limit to the
385
258
  // number of entries that are returned at once.
386
-
387
259
  let entries;
388
-
389
260
  do {
390
- entries = yield _babelRuntimeHelpersAwaitAsyncGenerator(new Promise((resolve, reject) => {
391
- reader.readEntries(resolve, reject);
392
- }));
393
-
394
- for (let entry of entries) {
395
- if (entry.isFile) {
396
- let file = yield _babelRuntimeHelpersAwaitAsyncGenerator($bc29619458500c186021634c18dc$var$getEntryFile(entry));
397
- yield $bc29619458500c186021634c18dc$var$createFileItem(file);
398
- } else if (entry.isDirectory) {
399
- yield $bc29619458500c186021634c18dc$var$createDirectoryItem(entry);
261
+ entries = await new Promise((resolve, reject)=>{
262
+ reader.readEntries(resolve, reject);
263
+ });
264
+ for (let entry of entries){
265
+ if (entry.isFile) {
266
+ let file = await $c1cba3854dc3a167$var$getEntryFile(entry);
267
+ yield $c1cba3854dc3a167$var$createFileItem(file);
268
+ } else if (entry.isDirectory) yield $c1cba3854dc3a167$var$createDirectoryItem(entry);
400
269
  }
401
- }
402
- } while (entries.length > 0);
403
- });
404
- return $bc29619458500c186021634c18dc$var$_getEntries.apply(this, arguments);
270
+ }while (entries.length > 0)
405
271
  }
406
-
407
- function $bc29619458500c186021634c18dc$var$getEntryFile(entry) {
408
- return new Promise((resolve, reject) => entry.file(resolve, reject));
272
+ function $c1cba3854dc3a167$var$getEntryFile(entry) {
273
+ return new Promise((resolve, reject)=>entry.file(resolve, reject)
274
+ );
409
275
  }
410
276
 
411
- let $a75d092e5c30878812fba78e$var$dropTargets = new Map();
412
- let $a75d092e5c30878812fba78e$var$dropItems = new Map();
413
- let $a75d092e5c30878812fba78e$var$dragSession = null;
414
- let $a75d092e5c30878812fba78e$var$subscriptions = new Set();
415
-
416
- function $a75d092e5c30878812fba78e$export$registerDropTarget(target) {
417
- var _dragSession;
418
277
 
419
- $a75d092e5c30878812fba78e$var$dropTargets.set(target.element, target);
420
- (_dragSession = $a75d092e5c30878812fba78e$var$dragSession) == null ? void 0 : _dragSession.updateValidDropTargets();
421
- return () => {
422
- var _dragSession2;
423
278
 
424
- $a75d092e5c30878812fba78e$var$dropTargets.delete(target.element);
425
- (_dragSession2 = $a75d092e5c30878812fba78e$var$dragSession) == null ? void 0 : _dragSession2.updateValidDropTargets();
426
- };
279
+ let $d69e2bc1de15721f$var$dropTargets = new Map();
280
+ let $d69e2bc1de15721f$var$dropItems = new Map();
281
+ let $d69e2bc1de15721f$var$dragSession = null;
282
+ let $d69e2bc1de15721f$var$subscriptions = new Set();
283
+ function $d69e2bc1de15721f$export$c28d9fb4a54e471a(target) {
284
+ $d69e2bc1de15721f$var$dropTargets.set(target.element, target);
285
+ $d69e2bc1de15721f$var$dragSession?.updateValidDropTargets();
286
+ return ()=>{
287
+ $d69e2bc1de15721f$var$dropTargets.delete(target.element);
288
+ $d69e2bc1de15721f$var$dragSession?.updateValidDropTargets();
289
+ };
427
290
  }
428
-
429
- function $a75d092e5c30878812fba78e$export$registerDropItem(item) {
430
- $a75d092e5c30878812fba78e$var$dropItems.set(item.element, item);
431
- return () => {
432
- $a75d092e5c30878812fba78e$var$dropItems.delete(item.element);
433
- };
291
+ function $d69e2bc1de15721f$export$aef80212ac99c003(item) {
292
+ $d69e2bc1de15721f$var$dropItems.set(item.element, item);
293
+ return ()=>{
294
+ $d69e2bc1de15721f$var$dropItems.delete(item.element);
295
+ };
434
296
  }
435
-
436
- function $a75d092e5c30878812fba78e$export$beginDragging(target, formatMessage) {
437
- if ($a75d092e5c30878812fba78e$var$dragSession) {
438
- throw new Error('Cannot begin dragging while already dragging');
439
- }
440
-
441
- $a75d092e5c30878812fba78e$var$dragSession = new $a75d092e5c30878812fba78e$var$DragSession(target, formatMessage);
442
- requestAnimationFrame(() => {
443
- $a75d092e5c30878812fba78e$var$dragSession.setup();
444
-
445
- if ($bc29619458500c186021634c18dc$export$getDragModality() === 'keyboard') {
446
- $a75d092e5c30878812fba78e$var$dragSession.next();
447
- }
448
- });
449
-
450
- for (let cb of $a75d092e5c30878812fba78e$var$subscriptions) {
451
- cb();
452
- }
297
+ function $d69e2bc1de15721f$export$549dbcf8649bf3b2(target, formatMessage) {
298
+ if ($d69e2bc1de15721f$var$dragSession) throw new Error('Cannot begin dragging while already dragging');
299
+ $d69e2bc1de15721f$var$dragSession = new $d69e2bc1de15721f$var$DragSession(target, formatMessage);
300
+ requestAnimationFrame(()=>{
301
+ $d69e2bc1de15721f$var$dragSession.setup();
302
+ if ($c1cba3854dc3a167$export$1fb2158d224b542c() === 'keyboard') $d69e2bc1de15721f$var$dragSession.next();
303
+ });
304
+ for (let cb of $d69e2bc1de15721f$var$subscriptions)cb();
453
305
  }
454
-
455
- function $a75d092e5c30878812fba78e$export$useDragSession() {
456
- let [session, setSession] = useState($a75d092e5c30878812fba78e$var$dragSession);
457
- useEffect(() => {
458
- let cb = () => setSession($a75d092e5c30878812fba78e$var$dragSession);
459
-
460
- $a75d092e5c30878812fba78e$var$subscriptions.add(cb);
461
- return () => {
462
- $a75d092e5c30878812fba78e$var$subscriptions.delete(cb);
463
- };
464
- }, []);
465
- return session;
306
+ function $d69e2bc1de15721f$export$418e185dd3f1b968() {
307
+ let [session, setSession] = $4on3C$react.useState($d69e2bc1de15721f$var$dragSession);
308
+ $4on3C$react.useEffect(()=>{
309
+ let cb = ()=>setSession($d69e2bc1de15721f$var$dragSession)
310
+ ;
311
+ $d69e2bc1de15721f$var$subscriptions.add(cb);
312
+ return ()=>{
313
+ $d69e2bc1de15721f$var$subscriptions.delete(cb);
314
+ };
315
+ }, []);
316
+ return session;
466
317
  }
467
-
468
- function $a75d092e5c30878812fba78e$var$endDragging() {
469
- $a75d092e5c30878812fba78e$var$dragSession = null;
470
-
471
- for (let cb of $a75d092e5c30878812fba78e$var$subscriptions) {
472
- cb();
473
- }
318
+ function $d69e2bc1de15721f$var$endDragging() {
319
+ $d69e2bc1de15721f$var$dragSession = null;
320
+ for (let cb of $d69e2bc1de15721f$var$subscriptions)cb();
474
321
  }
475
-
476
- const $a75d092e5c30878812fba78e$var$CANCELED_EVENTS = ['pointerdown', 'pointermove', 'pointerenter', 'pointerleave', 'pointerover', 'pointerout', 'pointerup', 'mousedown', 'mousemove', 'mouseenter', 'mouseleave', 'mouseover', 'mouseout', 'mouseup', 'touchstart', 'touchmove', 'touchend', 'keyup', 'focusin', 'focusout'];
477
- const $a75d092e5c30878812fba78e$var$CLICK_EVENTS = ['pointerup', 'mouseup', 'touchend'];
478
- const $a75d092e5c30878812fba78e$var$MESSAGES = {
479
- keyboard: 'dragStartedKeyboard',
480
- touch: 'dragStartedTouch',
481
- virtual: 'dragStartedVirtual'
322
+ const $d69e2bc1de15721f$var$CANCELED_EVENTS = [
323
+ 'pointerdown',
324
+ 'pointermove',
325
+ 'pointerenter',
326
+ 'pointerleave',
327
+ 'pointerover',
328
+ 'pointerout',
329
+ 'pointerup',
330
+ 'mousedown',
331
+ 'mousemove',
332
+ 'mouseenter',
333
+ 'mouseleave',
334
+ 'mouseover',
335
+ 'mouseout',
336
+ 'mouseup',
337
+ 'touchstart',
338
+ 'touchmove',
339
+ 'touchend',
340
+ 'keyup',
341
+ 'focusin',
342
+ 'focusout'
343
+ ];
344
+ const $d69e2bc1de15721f$var$CLICK_EVENTS = [
345
+ 'pointerup',
346
+ 'mouseup',
347
+ 'touchend'
348
+ ];
349
+ const $d69e2bc1de15721f$var$MESSAGES = {
350
+ keyboard: 'dragStartedKeyboard',
351
+ touch: 'dragStartedTouch',
352
+ virtual: 'dragStartedVirtual'
482
353
  };
483
-
484
- class $a75d092e5c30878812fba78e$var$DragSession {
485
- constructor(target, formatMessage) {
486
- this.dragTarget = void 0;
487
- this.validDropTargets = void 0;
488
- this.currentDropTarget = void 0;
489
- this.currentDropItem = void 0;
490
- this.dropOperation = void 0;
491
- this.mutationObserver = void 0;
492
- this.mutationImmediate = void 0;
493
- this.restoreAriaHidden = void 0;
494
- this.formatMessage = void 0;
495
- this.dragTarget = target;
496
- this.formatMessage = formatMessage;
497
- this.onKeyDown = this.onKeyDown.bind(this);
498
- this.onFocus = this.onFocus.bind(this);
499
- this.onBlur = this.onBlur.bind(this);
500
- this.onClick = this.onClick.bind(this);
501
- this.cancelEvent = this.cancelEvent.bind(this);
502
- }
503
-
504
- setup() {
505
- document.addEventListener('keydown', this.onKeyDown, true);
506
- window.addEventListener('focus', this.onFocus, true);
507
- window.addEventListener('blur', this.onBlur, true);
508
- document.addEventListener('click', this.onClick, true);
509
-
510
- for (let event of $a75d092e5c30878812fba78e$var$CANCELED_EVENTS) {
511
- document.addEventListener(event, this.cancelEvent, true);
512
- }
513
-
514
- this.mutationObserver = new MutationObserver(() => {
515
- // JSDOM has a bug where MutationObserver enters an infinite loop if mutations
516
- // occur inside a MutationObserver callback. If running in Node, wait until
517
- // the next tick to update valid drop targets.
518
- // See https://github.com/jsdom/jsdom/issues/3096
519
- if (typeof setImmediate === 'function') {
520
- this.mutationImmediate = setImmediate(() => this.updateValidDropTargets());
521
- } else {
354
+ class $d69e2bc1de15721f$var$DragSession {
355
+ constructor(target, formatMessage){
356
+ this.dragTarget = target;
357
+ this.formatMessage = formatMessage;
358
+ this.onKeyDown = this.onKeyDown.bind(this);
359
+ this.onFocus = this.onFocus.bind(this);
360
+ this.onBlur = this.onBlur.bind(this);
361
+ this.onClick = this.onClick.bind(this);
362
+ this.cancelEvent = this.cancelEvent.bind(this);
363
+ }
364
+ setup() {
365
+ document.addEventListener('keydown', this.onKeyDown, true);
366
+ window.addEventListener('focus', this.onFocus, true);
367
+ window.addEventListener('blur', this.onBlur, true);
368
+ document.addEventListener('click', this.onClick, true);
369
+ for (let event of $d69e2bc1de15721f$var$CANCELED_EVENTS)document.addEventListener(event, this.cancelEvent, true);
370
+ this.mutationObserver = new MutationObserver(()=>this.updateValidDropTargets()
371
+ );
522
372
  this.updateValidDropTargets();
523
- }
524
- });
525
- this.updateValidDropTargets();
526
- announce(this.formatMessage($a75d092e5c30878812fba78e$var$MESSAGES[$bc29619458500c186021634c18dc$export$getDragModality()]));
527
- }
528
-
529
- teardown() {
530
- document.removeEventListener('keydown', this.onKeyDown, true);
531
- window.removeEventListener('focus', this.onFocus, true);
532
- window.removeEventListener('blur', this.onBlur, true);
533
- document.removeEventListener('click', this.onClick, true);
534
-
535
- for (let event of $a75d092e5c30878812fba78e$var$CANCELED_EVENTS) {
536
- document.removeEventListener(event, this.cancelEvent, true);
537
- }
538
-
539
- this.mutationObserver.disconnect();
540
- this.restoreAriaHidden();
541
-
542
- if (this.mutationImmediate) {
543
- clearImmediate(this.mutationImmediate);
544
- }
545
- }
546
-
547
- onKeyDown(e) {
548
- var _this$currentDropTarg;
549
-
550
- this.cancelEvent(e);
551
-
552
- if (e.key === 'Escape') {
553
- this.cancel();
554
- return;
555
- }
556
-
557
- if (e.key === 'Enter') {
558
- if (e.altKey) {
559
- this.activate();
560
- } else {
561
- this.drop();
562
- }
563
-
564
- return;
565
- }
566
-
567
- if (e.key === 'Tab' && !(e.metaKey || e.altKey || e.ctrlKey)) {
568
- if (e.shiftKey) {
569
- this.previous();
570
- } else {
571
- this.next();
572
- }
573
- }
574
-
575
- if (typeof ((_this$currentDropTarg = this.currentDropTarget) == null ? void 0 : _this$currentDropTarg.onKeyDown) === 'function') {
576
- this.currentDropTarget.onKeyDown(e, this.dragTarget);
577
- }
578
- }
579
-
580
- onFocus(e) {
581
- // Prevent focus events, except to the original drag target.
582
- if (e.target !== this.dragTarget.element) {
583
- this.cancelEvent(e);
584
- } // Ignore focus events on the window/document (JSDOM). Will be handled in onBlur, below.
585
-
586
-
587
- if (!(e.target instanceof HTMLElement) || e.target === this.dragTarget.element) {
588
- return;
589
- }
590
-
591
- let dropTarget = this.validDropTargets.find(target => target.element.contains(e.target));
592
-
593
- if (!dropTarget) {
594
- if (this.currentDropTarget) {
595
- this.currentDropTarget.element.focus();
596
- } else {
597
- this.dragTarget.element.focus();
598
- }
599
-
600
- return;
601
- }
602
-
603
- let item = $a75d092e5c30878812fba78e$var$dropItems.get(e.target);
604
- this.setCurrentDropTarget(dropTarget, item);
605
- }
606
-
607
- onBlur(e) {
608
- if (e.target !== this.dragTarget.element) {
609
- this.cancelEvent(e);
610
- } // If nothing is gaining focus, or e.relatedTarget is the window/document (JSDOM),
611
- // restore focus back to the current drop target if any, or the original drag target.
612
-
613
-
614
- if (!e.relatedTarget || !(e.relatedTarget instanceof HTMLElement)) {
615
- if (this.currentDropTarget) {
616
- this.currentDropTarget.element.focus();
617
- } else {
618
- this.dragTarget.element.focus();
619
- }
620
- }
621
- }
622
-
623
- onClick(e) {
624
- this.cancelEvent(e);
625
-
626
- if (e.detail !== 0) {
627
- return;
628
- }
629
-
630
- if (e.target === this.dragTarget.element) {
631
- this.cancel();
632
- return;
633
- }
634
-
635
- let dropTarget = this.validDropTargets.find(target => target.element.contains(e.target));
636
-
637
- if (dropTarget) {
638
- let item = $a75d092e5c30878812fba78e$var$dropItems.get(e.target);
639
- this.setCurrentDropTarget(dropTarget, item);
640
- this.drop(item);
641
- }
642
- }
643
-
644
- cancelEvent(e) {
645
- // Allow default for events that might cancel a click event
646
- if (!$a75d092e5c30878812fba78e$var$CLICK_EVENTS.includes(e.type)) {
647
- e.preventDefault();
648
- }
649
-
650
- e.stopPropagation();
651
- e.stopImmediatePropagation();
652
- }
653
-
654
- updateValidDropTargets() {
655
- if (!this.mutationObserver) {
656
- return;
657
- }
658
-
659
- this.mutationObserver.disconnect();
660
-
661
- if (this.restoreAriaHidden) {
662
- this.restoreAriaHidden();
663
- }
664
-
665
- this.validDropTargets = $a75d092e5c30878812fba78e$var$findValidDropTargets(this.dragTarget);
666
-
667
- if (this.currentDropTarget && !this.validDropTargets.includes(this.currentDropTarget)) {
668
- this.setCurrentDropTarget(this.validDropTargets[0]);
669
- } // Find valid drop items within collections
670
-
671
-
672
- let types = $bc29619458500c186021634c18dc$export$getTypes(this.dragTarget.items);
673
- let validDropItems = [...$a75d092e5c30878812fba78e$var$dropItems.values()].filter(item => {
674
- if (typeof item.getDropOperation === 'function') {
675
- return item.getDropOperation(types, this.dragTarget.allowedDropOperations) !== 'cancel';
676
- }
677
-
678
- return true;
679
- }); // Filter out drop targets that contain valid items. We don't want to stop hiding elements
680
- // other than the drop items that exist inside the collection.
681
-
682
- let visibleDropTargets = this.validDropTargets.filter(target => !validDropItems.some(item => target.element.contains(item.element)));
683
- this.restoreAriaHidden = ariaHideOutside([this.dragTarget.element, ...validDropItems.map(item => item.element), ...visibleDropTargets.map(target => target.element)]);
684
- this.mutationObserver.observe(document.body, {
685
- subtree: true,
686
- attributes: true,
687
- attributeFilter: ['aria-hidden']
688
- });
689
- }
690
-
691
- next() {
692
- if (!this.currentDropTarget) {
693
- this.setCurrentDropTarget(this.validDropTargets[0]);
694
- return;
695
- }
696
-
697
- let index = this.validDropTargets.indexOf(this.currentDropTarget);
698
-
699
- if (index < 0) {
700
- this.setCurrentDropTarget(this.validDropTargets[0]);
701
- return;
702
- } // If we've reached the end of the valid drop targets, cycle back to the original drag target.
703
- // This lets the user cancel the drag in case they don't have an Escape key (e.g. iPad keyboard case).
704
-
705
-
706
- if (index === this.validDropTargets.length - 1) {
707
- if (!this.dragTarget.element.closest('[aria-hidden="true"]')) {
708
- this.setCurrentDropTarget(null);
709
- this.dragTarget.element.focus();
710
- } else {
711
- this.setCurrentDropTarget(this.validDropTargets[0]);
712
- }
713
- } else {
714
- this.setCurrentDropTarget(this.validDropTargets[index + 1]);
715
- }
716
- }
717
-
718
- previous() {
719
- if (!this.currentDropTarget) {
720
- this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);
721
- return;
722
- }
723
-
724
- let index = this.validDropTargets.indexOf(this.currentDropTarget);
725
-
726
- if (index < 0) {
727
- this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);
728
- return;
729
- } // If we've reached the start of the valid drop targets, cycle back to the original drag target.
730
- // This lets the user cancel the drag in case they don't have an Escape key (e.g. iPad keyboard case).
731
-
732
-
733
- if (index === 0) {
734
- if (!this.dragTarget.element.closest('[aria-hidden="true"]')) {
735
- this.setCurrentDropTarget(null);
736
- this.dragTarget.element.focus();
737
- } else {
738
- this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);
739
- }
740
- } else {
741
- this.setCurrentDropTarget(this.validDropTargets[index - 1]);
742
- }
743
- }
744
-
745
- setCurrentDropTarget(dropTarget, item) {
746
- if (dropTarget !== this.currentDropTarget) {
747
- if (this.currentDropTarget && typeof this.currentDropTarget.onDropExit === 'function') {
748
- let rect = this.currentDropTarget.element.getBoundingClientRect();
749
- this.currentDropTarget.onDropExit({
750
- type: 'dropexit',
751
- x: rect.left + rect.width / 2,
752
- y: rect.top + rect.height / 2
753
- });
754
- }
755
-
756
- this.currentDropTarget = dropTarget;
757
-
758
- if (dropTarget) {
759
- if (typeof dropTarget.onDropEnter === 'function') {
760
- let rect = dropTarget.element.getBoundingClientRect();
761
- dropTarget.onDropEnter({
762
- type: 'dropenter',
763
- x: rect.left + rect.width / 2,
764
- y: rect.top + rect.height / 2
765
- }, this.dragTarget);
373
+ $4on3C$reactarialiveannouncer.announce(this.formatMessage($d69e2bc1de15721f$var$MESSAGES[$c1cba3854dc3a167$export$1fb2158d224b542c()]));
374
+ }
375
+ teardown() {
376
+ document.removeEventListener('keydown', this.onKeyDown, true);
377
+ window.removeEventListener('focus', this.onFocus, true);
378
+ window.removeEventListener('blur', this.onBlur, true);
379
+ document.removeEventListener('click', this.onClick, true);
380
+ for (let event of $d69e2bc1de15721f$var$CANCELED_EVENTS)document.removeEventListener(event, this.cancelEvent, true);
381
+ this.mutationObserver.disconnect();
382
+ this.restoreAriaHidden();
383
+ if (this.mutationImmediate) clearImmediate(this.mutationImmediate);
384
+ }
385
+ onKeyDown(e) {
386
+ this.cancelEvent(e);
387
+ if (e.key === 'Escape') {
388
+ this.cancel();
389
+ return;
766
390
  }
767
-
768
- if (!item) {
769
- dropTarget == null ? void 0 : dropTarget.element.focus();
391
+ if (e.key === 'Enter') {
392
+ if (e.altKey) this.activate();
393
+ else this.drop();
394
+ return;
770
395
  }
771
- }
772
- }
773
-
774
- if (item !== this.currentDropItem) {
775
- if (item && typeof this.currentDropTarget.onDropTargetEnter === 'function') {
776
- this.currentDropTarget.onDropTargetEnter(item == null ? void 0 : item.target);
777
- }
778
-
779
- item == null ? void 0 : item.element.focus();
780
- this.currentDropItem = item;
781
- }
782
- }
783
-
784
- end() {
785
- this.teardown();
786
-
787
- if (typeof this.dragTarget.onDragEnd === 'function') {
788
- let target = this.currentDropTarget && this.dropOperation !== 'cancel' ? this.currentDropTarget : this.dragTarget;
789
- let rect = target.element.getBoundingClientRect();
790
- this.dragTarget.onDragEnd({
791
- type: 'dragend',
792
- x: rect.x + rect.width / 2,
793
- y: rect.y + rect.height / 2,
794
- dropOperation: this.dropOperation
795
- });
796
- }
797
-
798
- this.setCurrentDropTarget(null);
799
- $a75d092e5c30878812fba78e$var$endDragging();
800
- }
801
-
802
- cancel() {
803
- this.end();
804
-
805
- if (!this.dragTarget.element.closest('[aria-hidden="true"]')) {
806
- this.dragTarget.element.focus();
807
- }
808
-
809
- announce(this.formatMessage('dropCanceled'));
810
- }
811
-
812
- drop(item) {
813
- if (!this.currentDropTarget) {
814
- this.cancel();
815
- return;
816
- }
817
-
818
- if (typeof (item == null ? void 0 : item.getDropOperation) === 'function') {
819
- let types = $bc29619458500c186021634c18dc$export$getTypes(this.dragTarget.items);
820
- this.dropOperation = item.getDropOperation(types, this.dragTarget.allowedDropOperations);
821
- } else if (typeof this.currentDropTarget.getDropOperation === 'function') {
822
- let types = $bc29619458500c186021634c18dc$export$getTypes(this.dragTarget.items);
823
- this.dropOperation = this.currentDropTarget.getDropOperation(types, this.dragTarget.allowedDropOperations);
824
- } else {
825
- // TODO: show menu ??
826
- this.dropOperation = this.dragTarget.allowedDropOperations[0];
827
- }
828
-
829
- if (typeof this.currentDropTarget.onDrop === 'function') {
830
- let items = this.dragTarget.items.map(item => ({
831
- kind: 'text',
832
- types: new Set(Object.keys(item)),
833
- getText: type => Promise.resolve(item[type])
834
- }));
835
- let rect = this.currentDropTarget.element.getBoundingClientRect();
836
- this.currentDropTarget.onDrop({
837
- type: 'drop',
838
- x: rect.left + rect.width / 2,
839
- y: rect.top + rect.height / 2,
840
- items,
841
- dropOperation: this.dropOperation
842
- }, item == null ? void 0 : item.target);
843
- }
844
-
845
- this.end();
846
- announce(this.formatMessage('dropComplete'));
847
- }
848
-
849
- activate() {
850
- if (this.currentDropTarget && typeof this.currentDropTarget.onDropActivate === 'function') {
851
- let rect = this.currentDropTarget.element.getBoundingClientRect();
852
- this.currentDropTarget.onDropActivate({
853
- type: 'dropactivate',
854
- x: rect.left + rect.width / 2,
855
- y: rect.top + rect.height / 2
856
- });
857
- }
858
- }
859
-
860
- }
861
-
862
- function $a75d092e5c30878812fba78e$var$findValidDropTargets(options) {
863
- let types = $bc29619458500c186021634c18dc$export$getTypes(options.items);
864
- return [...$a75d092e5c30878812fba78e$var$dropTargets.values()].filter(target => {
865
- if (target.element.closest('[aria-hidden="true"]')) {
866
- return false;
867
- }
868
-
869
- if (typeof target.getDropOperation === 'function') {
870
- return target.getDropOperation(types, options.allowedDropOperations) !== 'cancel';
871
- }
872
-
873
- return true;
874
- });
875
- }
876
-
877
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/ar-AE.json
878
- var $a049e8a273c8713c08cfdce886954f2$exports = {};
879
- $a049e8a273c8713c08cfdce886954f2$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"اضغط Enter لبدء السحب.\",\"dragDescriptionTouch\":\"اضغط مرتين لبدء السحب.\",\"dragDescriptionVirtual\":\"انقر لبدء السحب.\",\"dragItem\":\"اسحب {itemText}\",\"dragSelectedItems\":\"اسحب {count, plural, one {# عنصر محدد} other {# عناصر محددة}}\",\"dragStartedKeyboard\":\"بدأ السحب. اضغط Tab للانتقال إلى موضع الإفلات، ثم اضغط Enter للإفلات، أو اضغط Escape للإلغاء.\",\"dragStartedTouch\":\"بدأ السحب. انتقل إلى موضع الإفلات، ثم اضغط مرتين للإفلات.\",\"dragStartedVirtual\":\"بدأ السحب. انتقل إلى مكان الإفلات، ثم انقر أو اضغط Enter للإفلات.\",\"dropCanceled\":\"تم إلغاء الإفلات.\",\"dropComplete\":\"اكتمل الإفلات.\",\"dropDescriptionKeyboard\":\"اضغط Enter للإفلات. اضغط Escape لإلغاء السحب.\",\"dropDescriptionTouch\":\"اضغط مرتين للإفلات.\",\"dropDescriptionVirtual\":\"انقر للإفلات.\",\"dropIndicator\":\"مؤشر الإفلات\",\"dropOnItem\":\"إفلات {itemText}\",\"dropOnRoot\":\"الإفلات\",\"endDragKeyboard\":\"السحب. اضغط Enter لإلغاء السحب.\",\"endDragTouch\":\"السحب. اضغط مرتين لإلغاء السحب.\",\"endDragVirtual\":\"السحب. انقر لإلغاء السحب.\",\"insertAfter\":\"أدخل بعد {itemText}\",\"insertBefore\":\"أدخل قبل {itemText}\",\"insertBetween\":\"أدخل بين {beforeItemText} و {afterItemText}\"}");
880
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/bg-BG.json
881
- var $c7bef18aeb1fd3dc6bd9bba10397f8b2$exports = {};
882
- $c7bef18aeb1fd3dc6bd9bba10397f8b2$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Натиснете „Enter“, за да започнете да плъзгате.\",\"dragDescriptionTouch\":\"Натиснете двукратно, за да започнете да плъзгате.\",\"dragDescriptionVirtual\":\"Щракнете, за да започнете да плъзгате.\",\"dragItem\":\"Плъзни {itemText}\",\"dragSelectedItems\":\"Плъзни {count, plural, one {# избран елемент} other {# избрани елемента}}\",\"dragStartedKeyboard\":\"Започна плъзгане. Натиснете „Tab“, за да се придвижите до целта, след което натиснете „Enter“ за пускане или натиснете „Escape“ за отмяна.\",\"dragStartedTouch\":\"Започна плъзгане. Придвижете се до целта, след което натиснете двукратно, за да пуснете.\",\"dragStartedVirtual\":\"Започна плъзгане. Придвижете се до целта, след което щракнете или натиснете „Enter“ за пускане.\",\"dropCanceled\":\"Пускането е отменено.\",\"dropComplete\":\"Пускането е завършено.\",\"dropDescriptionKeyboard\":\"Натиснете „Enter“ за пускане. Натиснете „Escape“ за отмяна на плъзгането.\",\"dropDescriptionTouch\":\"Натиснете двукратно за пускане.\",\"dropDescriptionVirtual\":\"Щракнете за пускане.\",\"dropIndicator\":\"индикатор за пускане\",\"dropOnItem\":\"Пусни върху {itemText}\",\"dropOnRoot\":\"Пусни върху\",\"endDragKeyboard\":\"Плъзгане. Натиснете „Enter“ за отмяна на плъзгането.\",\"endDragTouch\":\"Плъзгане. Натиснете двукратно за отмяна на плъзгането.\",\"endDragVirtual\":\"Плъзгане. Щракнете за отмяна.\",\"insertAfter\":\"Вмъкни след {itemText}\",\"insertBefore\":\"Вмъкни преди {itemText}\",\"insertBetween\":\"Вмъкни между {beforeItemText} и {afterItemText}\"}");
883
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/cs-CZ.json
884
- var $c5f1e0261e291b1341633fe9c018c96$exports = {};
885
- $c5f1e0261e291b1341633fe9c018c96$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Stisknutím klávesy Enter začnete s přetahováním.\",\"dragDescriptionTouch\":\"Poklepáním začnete s přetahováním.\",\"dragDescriptionVirtual\":\"Kliknutím začnete s přetahováním.\",\"dragItem\":\"Přetáhnout {itemText}\",\"dragSelectedItems\":\"Přetáhnout {count, plural, one {# vybranou položku} few {# vybrané položky} other {# vybraných položek}}\",\"dragStartedKeyboard\":\"Začněte s přetahováním. Po stisknutí klávesy Tab najděte požadovaný cíl a stisknutím klávesy Enter přetažení dokončete nebo stisknutím klávesy Esc akci zrušte.\",\"dragStartedTouch\":\"Začněte s přetahováním. Najděte požadovaný cíl a poklepáním přetažení dokončete.\",\"dragStartedVirtual\":\"Začněte s přetahováním. Najděte požadovaný cíl a kliknutím nebo stisknutím klávesy Enter přetažení dokončete.\",\"dropCanceled\":\"Přetažení bylo zrušeno.\",\"dropComplete\":\"Přetažení bylo dokončeno.\",\"dropDescriptionKeyboard\":\"Stisknutím klávesy Enter přetažení dokončete nebo stisknutím klávesy Esc akci zrušte.\",\"dropDescriptionTouch\":\"Poklepáním přetažení dokončete.\",\"dropDescriptionVirtual\":\"Kliknutím objekt přetáhněte.\",\"dropIndicator\":\"indikátor přetažení\",\"dropOnItem\":\"Přetáhnout na {itemText}\",\"dropOnRoot\":\"Přetáhnout na\",\"endDragKeyboard\":\"Probíhá přetahování. Stisknutím klávesy Enter přetažení zrušíte.\",\"endDragTouch\":\"Probíhá přetahování. Poklepáním přetažení zrušíte.\",\"endDragVirtual\":\"Probíhá přetahování. Kliknutím přetažení zrušíte.\",\"insertAfter\":\"Vložit za {itemText}\",\"insertBefore\":\"Vložit před {itemText}\",\"insertBetween\":\"Vložit mezi {beforeItemText} a {afterItemText}\"}");
886
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/da-DK.json
887
- var $f3c32be8e4431e03a321f5417e1843b$exports = {};
888
- $f3c32be8e4431e03a321f5417e1843b$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Tryk på Enter for at starte med at trække.\",\"dragDescriptionTouch\":\"Dobbelttryk for at starte med at trække.\",\"dragDescriptionVirtual\":\"Klik for at starte med at trække.\",\"dragItem\":\"Træk {itemText}\",\"dragSelectedItems\":\"Træk {count, plural, one {# valgt element} other {# valgte elementer}}\",\"dragStartedKeyboard\":\"Startet med at trække. Tryk på Tab for at gå til et slip-mål, tryk derefter på Enter for at slippe, eller tryk på Escape for at annullere.\",\"dragStartedTouch\":\"Startet med at trække. Gå til et slip-mål, og dobbelttryk derefter for at slippe.\",\"dragStartedVirtual\":\"Startet med at trække. Gå til et slip-mål, og klik eller tryk derefter på enter for at slippe.\",\"dropCanceled\":\"Slip annulleret.\",\"dropComplete\":\"Slip fuldført.\",\"dropDescriptionKeyboard\":\"Tryk på Enter for at slippe. Tryk på Escape for at annullere trækning.\",\"dropDescriptionTouch\":\"Dobbelttryk for at slippe.\",\"dropDescriptionVirtual\":\"Klik for at slippe.\",\"dropIndicator\":\"slip-indikator\",\"dropOnItem\":\"Slip på {itemText}\",\"dropOnRoot\":\"Slip på\",\"endDragKeyboard\":\"Trækning. Tryk på enter for at annullere træk.\",\"endDragTouch\":\"Trækning. Dobbelttryk for at annullere træk.\",\"endDragVirtual\":\"Trækning. Klik for at annullere trækning.\",\"insertAfter\":\"Indsæt efter {itemText}\",\"insertBefore\":\"Indsæt før {itemText}\",\"insertBetween\":\"Indsæt mellem {beforeItemText} og {afterItemText}\"}");
889
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/de-DE.json
890
- var $ad0d5ee9d1c1e0643b04e955a34882a6$exports = {};
891
- $ad0d5ee9d1c1e0643b04e955a34882a6$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Drücken Sie die Eingabetaste, um den Ziehvorgang zu starten.\",\"dragDescriptionTouch\":\"Tippen Sie doppelt, um den Ziehvorgang zu starten.\",\"dragDescriptionVirtual\":\"Zum Starten des Ziehvorgangs klicken.\",\"dragItem\":\"{itemText} ziehen\",\"dragSelectedItems\":\"{count, plural, one {# ausgewähltes Objekt} other {# ausgewählte Objekte}} ziehen\",\"dragStartedKeyboard\":\"Ziehvorgang gestartet. Drücken Sie die Tabulatortaste, um zu einem Ablegeziel zu navigieren und drücken Sie dann die Eingabetaste, um das Objekt abzulegen, oder Escape, um den Vorgang abzubrechen.\",\"dragStartedTouch\":\"Ziehvorgang gestartet. Navigieren Sie zu einem Ablegeziel und tippen Sie doppelt, um das Objekt abzulegen.\",\"dragStartedVirtual\":\"Ziehvorgang gestartet. Navigieren Sie zu einem Ablegeziel und klicken Sie oder drücken Sie die Eingabetaste, um das Objekt abzulegen.\",\"dropCanceled\":\"Ablegen abgebrochen.\",\"dropComplete\":\"Ablegen abgeschlossen.\",\"dropDescriptionKeyboard\":\"Drücken Sie die Eingabetaste, um das Objekt abzulegen. Drücken Sie Escape, um den Vorgang abzubrechen.\",\"dropDescriptionTouch\":\"Tippen Sie doppelt, um das Objekt abzulegen.\",\"dropDescriptionVirtual\":\"Zum Ablegen klicken.\",\"dropIndicator\":\"Ablegeanzeiger\",\"dropOnItem\":\"Auf {itemText} ablegen\",\"dropOnRoot\":\"Ablegen auf\",\"endDragKeyboard\":\"Ziehvorgang läuft. Drücken Sie die Eingabetaste, um den Vorgang abzubrechen.\",\"endDragTouch\":\"Ziehvorgang läuft. Tippen Sie doppelt, um den Vorgang abzubrechen.\",\"endDragVirtual\":\"Ziehvorgang läuft. Klicken Sie, um den Vorgang abzubrechen.\",\"insertAfter\":\"Nach {itemText} einfügen\",\"insertBefore\":\"Vor {itemText} einfügen\",\"insertBetween\":\"Zwischen {beforeItemText} und {afterItemText} einfügen\"}");
892
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/el-GR.json
893
- var $f208c93cf9a0c52cc9fefaad0e63f8$exports = {};
894
- $f208c93cf9a0c52cc9fefaad0e63f8$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Πατήστε Enter για έναρξη της μεταφοράς.\",\"dragDescriptionTouch\":\"Πατήστε δύο φορές για έναρξη της μεταφοράς.\",\"dragDescriptionVirtual\":\"Κάντε κλικ για να ξεκινήσετε τη μεταφορά.\",\"dragItem\":\"Μεταφορά {itemText}\",\"dragSelectedItems\":\"Μεταφορά σε {count, plural, one {# επιλεγμένο στοιχείο} other {# επιλεγμένα στοιχεία}}\",\"dragStartedKeyboard\":\"Η μεταφορά ξεκίνησε. Πατήστε το πλήκτρο Tab για να μεταβείτε σε έναν προορισμό απόθεσης και, στη συνέχεια, πατήστε Enter για απόθεση ή πατήστε Escape για ακύρωση.\",\"dragStartedTouch\":\"Η μεταφορά ξεκίνησε. Μεταβείτε σε έναν προορισμό απόθεσης και, στη συνέχεια, πατήστε δύο φορές για απόθεση.\",\"dragStartedVirtual\":\"Η μεταφορά ξεκίνησε. Μεταβείτε σε έναν προορισμό απόθεσης και, στη συνέχεια, κάντε κλικ ή πατήστε Enter για απόθεση.\",\"dropCanceled\":\"Η απόθεση ακυρώθηκε.\",\"dropComplete\":\"Η απόθεση ολοκληρώθηκε.\",\"dropDescriptionKeyboard\":\"Πατήστε Enter για απόθεση. Πατήστε Escape για ακύρωση της μεταφοράς.\",\"dropDescriptionTouch\":\"Πατήστε δύο φορές για απόθεση.\",\"dropDescriptionVirtual\":\"Κάντε κλικ για απόθεση.\",\"dropIndicator\":\"δείκτης απόθεσης\",\"dropOnItem\":\"Απόθεση σε {itemText}\",\"dropOnRoot\":\"Απόθεση σε\",\"endDragKeyboard\":\"Μεταφορά σε εξέλιξη. Πατήστε Enter για ακύρωση της μεταφοράς.\",\"endDragTouch\":\"Μεταφορά σε εξέλιξη. Πατήστε δύο φορές για ακύρωση της μεταφοράς.\",\"endDragVirtual\":\"Μεταφορά σε εξέλιξη. Κάντε κλικ για ακύρωση της μεταφοράς.\",\"insertAfter\":\"Εισαγωγή μετά από {itemText}\",\"insertBefore\":\"Εισαγωγή πριν από {itemText}\",\"insertBetween\":\"Εισαγωγή μεταξύ {beforeItemText} και {afterItemText}\"}");
895
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/en-US.json
896
- var $ece80d58838919a4624d1c28b393f77$exports = {};
897
- $ece80d58838919a4624d1c28b393f77$exports = JSON.parse("{\"dragItem\":\"Drag {itemText}\",\"dragSelectedItems\":\"Drag {count, plural, one {# selected item} other {# selected items}}\",\"dragDescriptionKeyboard\":\"Press Enter to start dragging.\",\"dragDescriptionTouch\":\"Double tap to start dragging.\",\"dragDescriptionVirtual\":\"Click to start dragging.\",\"dragStartedKeyboard\":\"Started dragging. Press Tab to navigate to a drop target, then press Enter to drop, or press Escape to cancel.\",\"dragStartedTouch\":\"Started dragging. Navigate to a drop target, then double tap to drop.\",\"dragStartedVirtual\":\"Started dragging. Navigate to a drop target, then click or press Enter to drop.\",\"endDragKeyboard\":\"Dragging. Press Enter to cancel drag.\",\"endDragTouch\":\"Dragging. Double tap to cancel drag.\",\"endDragVirtual\":\"Dragging. Click to cancel drag.\",\"dropDescriptionKeyboard\":\"Press Enter to drop. Press Escape to cancel drag.\",\"dropDescriptionTouch\":\"Double tap to drop.\",\"dropDescriptionVirtual\":\"Click to drop.\",\"dropCanceled\":\"Drop canceled.\",\"dropComplete\":\"Drop complete.\",\"dropIndicator\":\"drop indicator\",\"dropOnRoot\":\"Drop on\",\"dropOnItem\":\"Drop on {itemText}\",\"insertBefore\":\"Insert before {itemText}\",\"insertBetween\":\"Insert between {beforeItemText} and {afterItemText}\",\"insertAfter\":\"Insert after {itemText}\"}");
898
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/es-ES.json
899
- var $ee9761bb92f87937ffa91c74828ae143$exports = {};
900
- $ee9761bb92f87937ffa91c74828ae143$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Pulse Intro para empezar a arrastrar.\",\"dragDescriptionTouch\":\"Pulse dos veces para iniciar el arrastre.\",\"dragDescriptionVirtual\":\"Haga clic para iniciar el arrastre.\",\"dragItem\":\"Arrastrar {itemText}\",\"dragSelectedItems\":\"Arrastrar {count, plural, one {# elemento seleccionado} other {# elementos seleccionados}}\",\"dragStartedKeyboard\":\"Se ha empezado a arrastrar. Pulse el tabulador para ir al destino de colocación y, a continuación, pulse Intro para soltar, o pulse Escape para cancelar.\",\"dragStartedTouch\":\"Se ha empezado a arrastrar. Vaya al destino de colocación y, a continuación, pulse dos veces para soltar.\",\"dragStartedVirtual\":\"Se ha empezado a arrastrar. Vaya al destino de colocación y, a continuación, haga clic o pulse Intro para soltar.\",\"dropCanceled\":\"Se ha cancelado la colocación.\",\"dropComplete\":\"Colocación finalizada.\",\"dropDescriptionKeyboard\":\"Pulse Intro para soltar. Pulse Escape para cancelar el arrastre.\",\"dropDescriptionTouch\":\"Pulse dos veces para soltar.\",\"dropDescriptionVirtual\":\"Haga clic para soltar.\",\"dropIndicator\":\"indicador de colocación\",\"dropOnItem\":\"Soltar en {itemText}\",\"dropOnRoot\":\"Soltar en\",\"endDragKeyboard\":\"Arrastrando. Pulse Intro para cancelar el arrastre.\",\"endDragTouch\":\"Arrastrando. Pulse dos veces para cancelar el arrastre.\",\"endDragVirtual\":\"Arrastrando. Haga clic para cancelar el arrastre.\",\"insertAfter\":\"Insertar después de {itemText}\",\"insertBefore\":\"Insertar antes de {itemText}\",\"insertBetween\":\"Insertar entre {beforeItemText} y {afterItemText}\"}");
901
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/et-EE.json
902
- var $f49178596b64270de232b4c1afb184af$exports = {};
903
- $f49178596b64270de232b4c1afb184af$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Lohistamise alustamiseks vajutage klahvi Enter.\",\"dragDescriptionTouch\":\"Topeltpuudutage lohistamise alustamiseks.\",\"dragDescriptionVirtual\":\"Klõpsake lohistamise alustamiseks.\",\"dragItem\":\"Lohista {itemText}\",\"dragSelectedItems\":\"Lohista {count, plural, one {# valitud üksust} other {# valitud üksust}}\",\"dragStartedKeyboard\":\"Alustati lohistamist. Kukutamise sihtmärgi juurde navigeerimiseks vajutage klahvi Tab, seejärel vajutage kukutamiseks klahvi Enter või loobumiseks klahvi Escape.\",\"dragStartedTouch\":\"Alustati lohistamist. Navigeerige kukutamise sihtmärgi juurde ja topeltpuudutage kukutamiseks.\",\"dragStartedVirtual\":\"Alustati lohistamist. Navigeerige kukutamise sihtmärgi juurde ja kukutamiseks klõpsake või vajutage klahvi Enter.\",\"dropCanceled\":\"Lohistamisest loobuti.\",\"dropComplete\":\"Lohistamine on tehtud.\",\"dropDescriptionKeyboard\":\"Kukutamiseks vajutage klahvi Enter. Lohistamisest loobumiseks vajutage klahvi Escape.\",\"dropDescriptionTouch\":\"Kukutamiseks topeltpuudutage.\",\"dropDescriptionVirtual\":\"Kukutamiseks klõpsake.\",\"dropIndicator\":\"lohistamise indikaator\",\"dropOnItem\":\"Kukuta asukohta {itemText}\",\"dropOnRoot\":\"Kukuta asukohta\",\"endDragKeyboard\":\"Lohistamine. Lohistamisest loobumiseks vajutage klahvi Enter.\",\"endDragTouch\":\"Lohistamine. Lohistamisest loobumiseks topeltpuudutage.\",\"endDragVirtual\":\"Lohistamine. Lohistamisest loobumiseks klõpsake.\",\"insertAfter\":\"Sisesta {itemText} järele\",\"insertBefore\":\"Sisesta {itemText} ette\",\"insertBetween\":\"Sisesta {beforeItemText} ja {afterItemText} vahele\"}");
904
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/fi-FI.json
905
- var $f9bca27008bd46e848c441473e52$exports = {};
906
- $f9bca27008bd46e848c441473e52$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Aloita vetäminen painamalla Enter-näppäintä.\",\"dragDescriptionTouch\":\"Aloita vetäminen kaksoisnapauttamalla.\",\"dragDescriptionVirtual\":\"Aloita vetäminen napsauttamalla.\",\"dragItem\":\"Vedä kohdetta {itemText}\",\"dragSelectedItems\":\"Vedä {count, plural, one {# valittua kohdetta} other {# valittua kohdetta}}\",\"dragStartedKeyboard\":\"Vetäminen aloitettu. Siirry pudotuskohteeseen painamalla sarkainnäppäintä ja sitten pudota painamalla Enter-näppäintä tai peruuta painamalla Escape-näppäintä.\",\"dragStartedTouch\":\"Vetäminen aloitettu. Siirry pudotuskohteeseen ja pudota kaksoisnapauttamalla.\",\"dragStartedVirtual\":\"Vetäminen aloitettu. Siirry pudotuskohteeseen ja pudota napsauttamalla tai painamalla Enter-näppäintä.\",\"dropCanceled\":\"Pudotus peruutettu.\",\"dropComplete\":\"Pudotus suoritettu.\",\"dropDescriptionKeyboard\":\"Pudota painamalla Enter-näppäintä. Peruuta vetäminen painamalla Escape-näppäintä.\",\"dropDescriptionTouch\":\"Pudota kaksoisnapauttamalla.\",\"dropDescriptionVirtual\":\"Pudota napsauttamalla.\",\"dropIndicator\":\"pudotuksen ilmaisin\",\"dropOnItem\":\"Pudota kohteeseen {itemText}\",\"dropOnRoot\":\"Pudota kohteeseen\",\"endDragKeyboard\":\"Vedetään. Peruuta vetäminen painamalla Enter-näppäintä.\",\"endDragTouch\":\"Vedetään. Peruuta vetäminen kaksoisnapauttamalla.\",\"endDragVirtual\":\"Vedetään. Peruuta vetäminen napsauttamalla.\",\"insertAfter\":\"Lisää kohteen {itemText} jälkeen\",\"insertBefore\":\"Lisää ennen kohdetta {itemText}\",\"insertBetween\":\"Lisää kohteiden {beforeItemText} ja {afterItemText} väliin\"}");
907
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/fr-FR.json
908
- var $abf7975536d94242592c6ec084b35c3f$exports = {};
909
- $abf7975536d94242592c6ec084b35c3f$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Appuyez sur Entrée pour commencer le déplacement.\",\"dragDescriptionTouch\":\"Touchez deux fois pour commencer le déplacement.\",\"dragDescriptionVirtual\":\"Cliquez pour commencer le déplacement.\",\"dragItem\":\"Déplacer {itemText}\",\"dragSelectedItems\":\"Déplacer {count, plural, one {# élément sélectionné} other {# éléments sélectionnés}}\",\"dragStartedKeyboard\":\"Déplacement commencé. Appuyez sur Tabulation pour accéder à une cible de dépôt, puis appuyez sur Entrée pour déposer, ou appuyez sur Échap pour annuler.\",\"dragStartedTouch\":\"Déplacement commencé. Accédez à une cible de dépôt, puis touchez deux fois pour déposer.\",\"dragStartedVirtual\":\"Déplacement commencé. Accédez à une cible de dépôt, puis cliquez ou appuyez sur Entrée pour déposer.\",\"dropCanceled\":\"Dépôt annulé.\",\"dropComplete\":\"Dépôt terminé.\",\"dropDescriptionKeyboard\":\"Appuyez sur Entrée pour déposer. Appuyez sur Échap pour annuler le déplacement.\",\"dropDescriptionTouch\":\"Touchez deux fois pour déposer.\",\"dropDescriptionVirtual\":\"Cliquez pour déposer.\",\"dropIndicator\":\"indicateur de dépôt\",\"dropOnItem\":\"Déposer sur {itemText}\",\"dropOnRoot\":\"Déposer sur\",\"endDragKeyboard\":\"Déplacement. Appuyez sur Entrée pour annuler le déplacement.\",\"endDragTouch\":\"Déplacement. Touchez deux fois pour annuler le déplacement.\",\"endDragVirtual\":\"Déplacement. Cliquez pour annuler le déplacement.\",\"insertAfter\":\"Insérer après {itemText}\",\"insertBefore\":\"Insérer avant {itemText}\",\"insertBetween\":\"Insérer entre {beforeItemText} et {afterItemText}\"}");
910
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/he-IL.json
911
- var $a71b397b5a3444fd4218686dd8961d3$exports = {};
912
- $a71b397b5a3444fd4218686dd8961d3$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"הקש על Enter כדי להתחיל לגרור.\",\"dragDescriptionTouch\":\"הקש פעמיים כדי להתחיל בגרירה.\",\"dragDescriptionVirtual\":\"לחץ כדי להתחיל לגרור.\",\"dragItem\":\"גרור את {itemText}\",\"dragSelectedItems\":\"גרור {count, plural, one {פריט נבחר #} other {# פריטים שנבחרו}}\",\"dragStartedKeyboard\":\"התחלת לגרור. הקש על Tab כדי לנווט לנקודת הגרירה ולאחר מכן הקש על Enter כדי לשחרר או על Escape כדי לבטל.\",\"dragStartedTouch\":\"התחלת לגרור. נווט לנקודת השחרור ולאחר מכן הקש פעמיים כדי לשחרר.\",\"dragStartedVirtual\":\"התחלת לגרור. נווט לנקודת השחרור ולאחר מכן לחץ או הקש על Enter כדי לשחרר.\",\"dropCanceled\":\"השחרור בוטל.\",\"dropComplete\":\"השחרור הושלם.\",\"dropDescriptionKeyboard\":\"הקש על Enter כדי לשחרר. הקש על Escape כדי לבטל את הגרירה.\",\"dropDescriptionTouch\":\"הקש פעמיים כדי לשחרר.\",\"dropDescriptionVirtual\":\"לחץ כדי לשחרר.\",\"dropIndicator\":\"מחוון שחרור\",\"dropOnItem\":\"שחרר על {itemText}\",\"dropOnRoot\":\"שחרר על\",\"endDragKeyboard\":\"גורר. הקש על Enter כדי לבטל את הגרירה.\",\"endDragTouch\":\"גורר. הקש פעמיים כדי לבטל את הגרירה.\",\"endDragVirtual\":\"גורר. לחץ כדי לבטל את הגרירה.\",\"insertAfter\":\"הוסף אחרי {itemText}\",\"insertBefore\":\"הוסף לפני {itemText}\",\"insertBetween\":\"הוסף בין {beforeItemText} לבין {afterItemText}\"}");
913
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/hr-HR.json
914
- var $a14560c06b1711b5b49bc92b5237$exports = {};
915
- $a14560c06b1711b5b49bc92b5237$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Pritisnite Enter da biste počeli povlačiti.\",\"dragDescriptionTouch\":\"Dvaput dodirnite da biste počeli povlačiti.\",\"dragDescriptionVirtual\":\"Kliknite da biste počeli povlačiti.\",\"dragItem\":\"Povucite stavku {itemText}\",\"dragSelectedItems\":\"Povucite {count, plural, one {# odabranu stavku} other {ovoliko odabranih stavki: #}}\",\"dragStartedKeyboard\":\"Počeli ste povlačiti. Pritisnite tipku tabulatora da biste došli do cilja ispuštanja, a zatim Enter da biste ispustili stavku ili Escape da biste prekinuli povlačenje.\",\"dragStartedTouch\":\"Počeli ste povlačiti. Dođite do cilja ispuštanja, a zatim dvaput dodirnite da biste ispustili stavku.\",\"dragStartedVirtual\":\"Počeli ste povlačiti. Dođite do cilja ispuštanja, a zatim kliknite ili pritisnite Enter da biste ispustili stavku.\",\"dropCanceled\":\"Povlačenje je prekinuto.\",\"dropComplete\":\"Ispuštanje je dovršeno.\",\"dropDescriptionKeyboard\":\"Pritisnite Enter da biste ispustili stavku. Pritisnite Escape da biste prekinuli povlačenje.\",\"dropDescriptionTouch\":\"Dvaput dodirnite da biste ispustili stavku.\",\"dropDescriptionVirtual\":\"Kliknite da biste ispustili stavku.\",\"dropIndicator\":\"pokazatelj ispuštanja\",\"dropOnItem\":\"Ispustite na stavku {itemText}\",\"dropOnRoot\":\"Ispustite na\",\"endDragKeyboard\":\"Povlačenje. Pritisnite Enter da biste prekinuli povlačenje.\",\"endDragTouch\":\"Povlačenje. Dvaput dodirnite da biste prekinuli povlačenje.\",\"endDragVirtual\":\"Povlačenje. Kliknite da biste prekinuli povlačenje.\",\"insertAfter\":\"Umetnite iza stavke {itemText}\",\"insertBefore\":\"Ispustite ispred stavke {itemText}\",\"insertBetween\":\"Umetnite između stavki {beforeItemText} i {afterItemText}\"}");
916
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/hu-HU.json
917
- var $e2f05728cdfadbce63b4a6a5c67263f3$exports = {};
918
- $e2f05728cdfadbce63b4a6a5c67263f3$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Nyomja le az Enter billentyűt a húzás megkezdéséhez.\",\"dragDescriptionTouch\":\"Koppintson duplán a húzás megkezdéséhez.\",\"dragDescriptionVirtual\":\"Kattintson a húzás megkezdéséhez.\",\"dragItem\":\"{itemText} húzása\",\"dragSelectedItems\":\"{count, plural, one {# kijelölt elem} other {# kijelölt elem}} húzása\",\"dragStartedKeyboard\":\"Húzás megkezdve. Nyomja le a Tab billentyűt az elengedési célhoz navigálásához, majd nyomja le az Enter billentyűt az elengedéshez, vagy nyomja le az Escape billentyűt a megszakításhoz.\",\"dragStartedTouch\":\"Húzás megkezdve. Navigáljon egy elengedési célhoz, majd koppintson duplán az elengedéshez.\",\"dragStartedVirtual\":\"Húzás megkezdve. Navigáljon egy elengedési célhoz, majd kattintson vagy nyomja le az Enter billentyűt az elengedéshez.\",\"dropCanceled\":\"Elengedés megszakítva.\",\"dropComplete\":\"Elengedés teljesítve.\",\"dropDescriptionKeyboard\":\"Nyomja le az Enter billentyűt az elengedéshez. Nyomja le az Escape billentyűt a húzás megszakításához.\",\"dropDescriptionTouch\":\"Koppintson duplán az elengedéshez.\",\"dropDescriptionVirtual\":\"Kattintson az elengedéshez.\",\"dropIndicator\":\"elengedésjelző\",\"dropOnItem\":\"Elengedés erre: {itemText}\",\"dropOnRoot\":\"Elengedés erre:\",\"endDragKeyboard\":\"Húzás folyamatban. Nyomja le az Enter billentyűt a húzás megszakításához.\",\"endDragTouch\":\"Húzás folyamatban. Koppintson duplán a húzás megszakításához.\",\"endDragVirtual\":\"Húzás folyamatban. Kattintson a húzás megszakításához.\",\"insertAfter\":\"Beszúrás {itemText} után\",\"insertBefore\":\"Beszúrás {itemText} elé\",\"insertBetween\":\"Beszúrás {beforeItemText} és {afterItemText} közé\"}");
919
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/it-IT.json
920
- var $da3198fd20b34c609578436051c8e7f$exports = {};
921
- $da3198fd20b34c609578436051c8e7f$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Premi Invio per iniziare a trascinare.\",\"dragDescriptionTouch\":\"Tocca due volte per iniziare a trascinare.\",\"dragDescriptionVirtual\":\"Fai clic per iniziare a trascinare.\",\"dragItem\":\"Trascina {itemText}\",\"dragSelectedItems\":\"Trascina {count, plural, one {# altro elemento selezionato} other {# altri elementi selezionati}}\",\"dragStartedKeyboard\":\"Hai iniziato a trascinare. Premi Tab per arrivare sull’area di destinazione, quindi premi Invio per rilasciare o Esc per annullare.\",\"dragStartedTouch\":\"Hai iniziato a trascinare. Arriva sull’area di destinazione, quindi tocca due volte per rilasciare.\",\"dragStartedVirtual\":\"Hai iniziato a trascinare. Arriva sull’area di destinazione, quindi fai clic o premi Invio per rilasciare.\",\"dropCanceled\":\"Rilascio annullato.\",\"dropComplete\":\"Rilascio completato.\",\"dropDescriptionKeyboard\":\"Premi Invio per rilasciare. Premi Esc per annullare.\",\"dropDescriptionTouch\":\"Tocca due volte per rilasciare.\",\"dropDescriptionVirtual\":\"Fai clic per rilasciare.\",\"dropIndicator\":\"indicatore di rilascio\",\"dropOnItem\":\"Rilascia su {itemText}\",\"dropOnRoot\":\"Rilascia su\",\"endDragKeyboard\":\"Trascinamento. Premi Invio per annullare.\",\"endDragTouch\":\"Trascinamento. Tocca due volte per annullare.\",\"endDragVirtual\":\"Trascinamento. Fai clic per annullare.\",\"insertAfter\":\"Inserisci dopo {itemText}\",\"insertBefore\":\"Inserisci prima di {itemText}\",\"insertBetween\":\"Inserisci tra {beforeItemText} e {afterItemText}\"}");
922
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/ja-JP.json
923
- var $a6ff3a43ed70d88abb08383457364ed7$exports = {};
924
- $a6ff3a43ed70d88abb08383457364ed7$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Enter キーを押してドラッグを開始してください。\",\"dragDescriptionTouch\":\"ダブルタップしてドラッグを開始します。\",\"dragDescriptionVirtual\":\"クリックしてドラッグを開始します。\",\"dragItem\":\"{itemText} をドラッグ\",\"dragSelectedItems\":\"{count, plural, one {# 個の選択項目} other {# 個の選択項目}} をドラッグ\",\"dragStartedKeyboard\":\"ドラッグを開始します。Tab キーを押してドロップターゲットにいどうし、Enter キーを押してドロップするか、Esc キーを押してキャンセルします。\",\"dragStartedTouch\":\"ドラッグを開始しました。ドロップのターゲットに移動し、ダブルタップしてドロップします。\",\"dragStartedVirtual\":\"ドラッグを開始しました。ドロップのターゲットに移動し、クリックまたは Enter キーを押してドロップします。\",\"dropCanceled\":\"ドロップがキャンセルされました。\",\"dropComplete\":\"ドロップが完了しました。\",\"dropDescriptionKeyboard\":\"Enter キーを押してドロップします。Esc キーを押してドラッグをキャンセルします。\",\"dropDescriptionTouch\":\"ダブルタップしてドロップします。\",\"dropDescriptionVirtual\":\"クリックしてドロップします。\",\"dropIndicator\":\"ドロップインジケーター\",\"dropOnItem\":\"{itemText} にドロップ\",\"dropOnRoot\":\"ドロップ場所\",\"endDragKeyboard\":\"ドラッグしています。Enter キーを押してドラッグをキャンセルします。\",\"endDragTouch\":\"ドラッグしています。ダブルタップしてドラッグをキャンセルします。\",\"endDragVirtual\":\"ドラッグしています。クリックしてドラッグをキャンセルします。\",\"insertAfter\":\"{itemText} の後に挿入\",\"insertBefore\":\"{itemText} の前に挿入\",\"insertBetween\":\"{beforeItemText} と {afterItemText} の間に挿入\"}");
925
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/ko-KR.json
926
- var $dfbfd4f7dc34546b5bb0af666347fbd0$exports = {};
927
- $dfbfd4f7dc34546b5bb0af666347fbd0$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"드래그를 시작하려면 Enter를 누르세요.\",\"dragDescriptionTouch\":\"드래그를 시작하려면 더블 탭하세요.\",\"dragDescriptionVirtual\":\"드래그를 시작하려면 클릭하세요.\",\"dragItem\":\"{itemText} 드래그\",\"dragSelectedItems\":\"{count, plural, one {#개 선택 항목} other {#개 선택 항목}} 드래그\",\"dragStartedKeyboard\":\"드래그가 시작되었습니다. Tab을 눌러 드롭 대상으로 이동한 다음 Enter를 눌러 드롭하거나 Esc를 눌러 취소하세요.\",\"dragStartedTouch\":\"드래그가 시작되었습니다. 드롭 대상으로 이동한 다음 더블 탭하여 드롭하세요.\",\"dragStartedVirtual\":\"드래그가 시작되었습니다. 드롭 대상으로 이동한 다음 클릭하거나 Enter를 눌러 드롭하세요.\",\"dropCanceled\":\"드롭이 취소되었습니다.\",\"dropComplete\":\"드롭이 완료되었습니다.\",\"dropDescriptionKeyboard\":\"드롭하려면 Enter를 누르세요. 드래그를 취소하려면 Esc를 누르세요.\",\"dropDescriptionTouch\":\"더블 탭하여 드롭하세요.\",\"dropDescriptionVirtual\":\"드롭하려면 클릭하세요.\",\"dropIndicator\":\"드롭 표시기\",\"dropOnItem\":\"{itemText}에 드롭\",\"dropOnRoot\":\"드롭 대상\",\"endDragKeyboard\":\"드래그 중입니다. 드래그를 취소하려면 Enter를 누르세요.\",\"endDragTouch\":\"드래그 중입니다. 드래그를 취소하려면 더블 탭하세요.\",\"endDragVirtual\":\"드래그 중입니다. 드래그를 취소하려면 클릭하세요.\",\"insertAfter\":\"{itemText} 이후에 삽입\",\"insertBefore\":\"{itemText} 이전에 삽입\",\"insertBetween\":\"{beforeItemText} 및 {afterItemText} 사이에 삽입\"}");
928
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/lt-LT.json
929
- var $c53389022087f7b6afc79a9c99ef48f$exports = {};
930
- $c53389022087f7b6afc79a9c99ef48f$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Paspauskite „Enter“, kad pradėtumėte vilkti.\",\"dragDescriptionTouch\":\"Palieskite dukart, kad pradėtumėte vilkti.\",\"dragDescriptionVirtual\":\"Spustelėkite, kad pradėtumėte vilkti.\",\"dragItem\":\"Vilkti {itemText}\",\"dragSelectedItems\":\"Vilkti {count, plural, one {# pasirinktą elementą} other {# pasirinktus elementus}}\",\"dragStartedKeyboard\":\"Pradėta vilkti. Paspauskite „Tab“, kad pereitumėte į tiesioginę paskirties vietą, tada paspauskite „Enter“, kad numestumėte, arba „Escape“, kad atšauktumėte.\",\"dragStartedTouch\":\"Pradėta vilkti. Eikite į tiesioginę paskirties vietą, tada palieskite dukart, kad numestumėte.\",\"dragStartedVirtual\":\"Pradėta vilkti. Eikite į tiesioginę paskirties vietą ir spustelėkite arba paspauskite „Enter“, kad numestumėte.\",\"dropCanceled\":\"Numetimas atšauktas.\",\"dropComplete\":\"Numesta.\",\"dropDescriptionKeyboard\":\"Paspauskite „Enter“, kad numestumėte. Paspauskite „Escape“, kad atšauktumėte vilkimą.\",\"dropDescriptionTouch\":\"Palieskite dukart, kad numestumėte.\",\"dropDescriptionVirtual\":\"Spustelėkite, kad numestumėte.\",\"dropIndicator\":\"numetimo indikatorius\",\"dropOnItem\":\"Numesti ant {itemText}\",\"dropOnRoot\":\"Numesti ant\",\"endDragKeyboard\":\"Velkama. Paspauskite „Enter“, kad atšauktumėte vilkimą.\",\"endDragTouch\":\"Velkama. Spustelėkite dukart, kad atšauktumėte vilkimą.\",\"endDragVirtual\":\"Velkama. Spustelėkite, kad atšauktumėte vilkimą.\",\"insertAfter\":\"Įterpti po {itemText}\",\"insertBefore\":\"Įterpti prieš {itemText}\",\"insertBetween\":\"Įterpti tarp {beforeItemText} ir {afterItemText}\"}");
931
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/lv-LV.json
932
- var $cca63ba6085d5d7fd3ffb0a4e8fc18$exports = {};
933
- $cca63ba6085d5d7fd3ffb0a4e8fc18$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Nospiediet Enter, lai sāktu vilkšanu.\",\"dragDescriptionTouch\":\"Veiciet dubultskārienu, lai sāktu vilkšanu.\",\"dragDescriptionVirtual\":\"Noklikšķiniet, lai sāktu vilkšanu.\",\"dragItem\":\"Velciet {itemText}\",\"dragSelectedItems\":\"Velciet {count, plural, one {# atlasīto vienumu} other {# atlasītos vienumus}}\",\"dragStartedKeyboard\":\"Uzsākta vilkšana. Nospiediet taustiņu Tab, lai pārietu uz nomešanas mērķi, pēc tam nospiediet Enter, lai nomestu, vai nospiediet Escape, lai atceltu.\",\"dragStartedTouch\":\"Uzsākta vilkšana. Pārejiet uz nomešanas mērķi, pēc tam veiciet dubultskārienu, lai nomestu.\",\"dragStartedVirtual\":\"Uzsākta vilkšana. Pārejiet uz nomešanas mērķi, pēc tam nospiediet Enter, lai nomestu.\",\"dropCanceled\":\"Nomešana atcelta.\",\"dropComplete\":\"Nomešana pabeigta.\",\"dropDescriptionKeyboard\":\"Nospiediet Enter, lai nomestu. Nospiediet Escape, lai atceltu vilkšanu.\",\"dropDescriptionTouch\":\"Veiciet dubultskārienu, lai nomestu.\",\"dropDescriptionVirtual\":\"Noklikšķiniet, lai nomestu.\",\"dropIndicator\":\"nomešanas indikators\",\"dropOnItem\":\"Nometiet uz {itemText}\",\"dropOnRoot\":\"Nometiet uz\",\"endDragKeyboard\":\"Notiek vilkšana. Nospiediet Enter, lai atceltu vilkšanu.\",\"endDragTouch\":\"Notiek vilkšana. Veiciet dubultskārienu, lai atceltu vilkšanu.\",\"endDragVirtual\":\"Notiek vilkšana. Noklikšķiniet, lai atceltu vilkšanu.\",\"insertAfter\":\"Ievietojiet pēc {itemText}\",\"insertBefore\":\"Ievietojiet pirms {itemText}\",\"insertBetween\":\"Ievietojiet starp {beforeItemText} un {afterItemText}\"}");
934
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/nb-NO.json
935
- var $d46abea5f59e687d0510d2bd4f77$exports = {};
936
- $d46abea5f59e687d0510d2bd4f77$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Trykk på Enter for å begynne å dra.\",\"dragDescriptionTouch\":\"Dobbelttrykk for å begynne å dra.\",\"dragDescriptionVirtual\":\"Klikk for å begynne å dra.\",\"dragItem\":\"Dra {itemText}\",\"dragSelectedItems\":\"Dra {count, plural, one {# merket element} other {# merkede elementer}}\",\"dragStartedKeyboard\":\"Begynte å dra. Trykk på Tab for å navigere til et mål, og trykk deretter på Enter for å slippe eller på Esc for å avbryte.\",\"dragStartedTouch\":\"Begynte å dra. Naviger til et mål, og dobbelttrykk for å slippe.\",\"dragStartedVirtual\":\"Begynte å dra. Naviger til et mål, og klikk eller trykk på Enter for å slippe.\",\"dropCanceled\":\"Avbrøt slipping.\",\"dropComplete\":\"Slippingen er fullført.\",\"dropDescriptionKeyboard\":\"Trykk på Enter for å slippe. Trykk på Esc hvis du vil avbryte draingen.\",\"dropDescriptionTouch\":\"Dobbelttrykk for å slippe.\",\"dropDescriptionVirtual\":\"Klikk for å slippe.\",\"dropIndicator\":\"slippeindikator\",\"dropOnItem\":\"Slipp på {itemText}\",\"dropOnRoot\":\"Slipp på\",\"endDragKeyboard\":\"Drar. Trykk på Enter hvis du vil avbryte.\",\"endDragTouch\":\"Drar. Dobbelttrykk hvis du vil avbryte.\",\"endDragVirtual\":\"Drar. Klikk hvis du vil avbryte.\",\"insertAfter\":\"Sett inn etter {itemText}\",\"insertBefore\":\"Sett inn før {itemText}\",\"insertBetween\":\"Sett inn mellom {beforeItemText} og {afterItemText}\"}");
937
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/nl-NL.json
938
- var $ac6e3e2426b7582528543cbf5379fc$exports = {};
939
- $ac6e3e2426b7582528543cbf5379fc$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Druk op Enter om te slepen.\",\"dragDescriptionTouch\":\"Dubbeltik om te slepen.\",\"dragDescriptionVirtual\":\"Klik om met slepen te starten.\",\"dragItem\":\"{itemText} slepen\",\"dragSelectedItems\":\"{count, plural, one {# geselecteerd item} other {# geselecteerde items}} slepen\",\"dragStartedKeyboard\":\"Begonnen met slepen. Druk op Tab om naar een locatie te gaan. Druk dan op Enter om neer te zetten, of op Esc om te annuleren.\",\"dragStartedTouch\":\"Begonnen met slepen. Ga naar de gewenste locatie en dubbeltik om neer te zetten.\",\"dragStartedVirtual\":\"Begonnen met slepen. Ga naar de gewenste locatie en klik of druk op Enter om neer te zetten.\",\"dropCanceled\":\"Neerzetten geannuleerd.\",\"dropComplete\":\"Neerzetten voltooid.\",\"dropDescriptionKeyboard\":\"Druk op Enter om neer te zetten. Druk op Esc om het slepen te annuleren.\",\"dropDescriptionTouch\":\"Dubbeltik om neer te zetten.\",\"dropDescriptionVirtual\":\"Klik om neer te zetten.\",\"dropIndicator\":\"aanwijzer voor neerzetten\",\"dropOnItem\":\"Neerzetten op {itemText}\",\"dropOnRoot\":\"Neerzetten op\",\"endDragKeyboard\":\"Bezig met slepen. Druk op Enter om te annuleren.\",\"endDragTouch\":\"Bezig met slepen. Dubbeltik om te annuleren.\",\"endDragVirtual\":\"Bezig met slepen. Klik om te annuleren.\",\"insertAfter\":\"Plaatsen na {itemText}\",\"insertBefore\":\"Plaatsen vóór {itemText}\",\"insertBetween\":\"Plaatsen tussen {beforeItemText} en {afterItemText}\"}");
940
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/pl-PL.json
941
- var $b97f849030ab4d8852eb85ed8b71$exports = {};
942
- $b97f849030ab4d8852eb85ed8b71$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Naciśnij Enter, aby rozpocząć przeciąganie.\",\"dragDescriptionTouch\":\"Dotknij dwukrotnie, aby rozpocząć przeciąganie.\",\"dragDescriptionVirtual\":\"Kliknij, aby rozpocząć przeciąganie.\",\"dragItem\":\"Przeciągnij {itemText}\",\"dragSelectedItems\":\"Przeciągnij {count, plural, one {# wybrany element} other {# wybranych elementów}}\",\"dragStartedKeyboard\":\"Rozpoczęto przeciąganie. Naciśnij Tab, aby wybrać miejsce docelowe, a następnie naciśnij Enter, aby upuścić, lub Escape, aby anulować.\",\"dragStartedTouch\":\"Rozpoczęto przeciąganie. Wybierz miejsce, w którym chcesz upuścić element, a następnie dotknij dwukrotnie, aby upuścić.F\",\"dragStartedVirtual\":\"Rozpoczęto przeciąganie. Wybierz miejsce, w którym chcesz upuścić element, a następnie kliknij lub naciśnij Enter, aby upuścić.\",\"dropCanceled\":\"Anulowano upuszczenie.\",\"dropComplete\":\"Zakończono upuszczanie.\",\"dropDescriptionKeyboard\":\"Naciśnij Enter, aby upuścić. Naciśnij Escape, aby anulować przeciągnięcie.\",\"dropDescriptionTouch\":\"Dotknij dwukrotnie, aby upuścić.\",\"dropDescriptionVirtual\":\"Kliknij, aby upuścić.\",\"dropIndicator\":\"wskaźnik upuszczenia\",\"dropOnItem\":\"Upuść na {itemText}\",\"dropOnRoot\":\"Upuść\",\"endDragKeyboard\":\"Przeciąganie. Naciśnij Enter, aby anulować przeciągnięcie.\",\"endDragTouch\":\"Przeciąganie. Kliknij dwukrotnie, aby anulować przeciągnięcie.\",\"endDragVirtual\":\"Przeciąganie. Kliknij, aby anulować przeciąganie.\",\"insertAfter\":\"Umieść za {itemText}\",\"insertBefore\":\"Umieść przed {itemText}\",\"insertBetween\":\"Umieść między {beforeItemText} i {afterItemText}\"}");
943
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/pt-BR.json
944
- var $efb2848f59f1d35ef3478522b3937c$exports = {};
945
- $efb2848f59f1d35ef3478522b3937c$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Pressione Enter para começar a arrastar.\",\"dragDescriptionTouch\":\"Toque duas vezes para começar a arrastar.\",\"dragDescriptionVirtual\":\"Clique para começar a arrastar.\",\"dragItem\":\"Arrastar {itemText}\",\"dragSelectedItems\":\"Arrastar {count, plural, one {# item selecionado} other {# itens selecionados}}\",\"dragStartedKeyboard\":\"Comece a arrastar. Pressione Tab para navegar até um alvo e, em seguida, pressione Enter para soltar ou pressione Escape para cancelar.\",\"dragStartedTouch\":\"Comece a arrastar. Navegue até um alvo e toque duas vezes para soltar.\",\"dragStartedVirtual\":\"Comece a arrastar. Navegue até um alvo e clique ou pressione Enter para soltar.\",\"dropCanceled\":\"Liberação cancelada.\",\"dropComplete\":\"Liberação concluída.\",\"dropDescriptionKeyboard\":\"Pressione Enter para soltar. Pressione Escape para cancelar.\",\"dropDescriptionTouch\":\"Toque duas vezes para soltar.\",\"dropDescriptionVirtual\":\"Clique para soltar.\",\"dropIndicator\":\"indicador de liberação\",\"dropOnItem\":\"Soltar em {itemText}\",\"dropOnRoot\":\"Soltar\",\"endDragKeyboard\":\"Arrastando. Pressione Enter para cancelar.\",\"endDragTouch\":\"Arrastando. Toque duas vezes para cancelar.\",\"endDragVirtual\":\"Arrastando. Clique para cancelar.\",\"insertAfter\":\"Inserir após {itemText}\",\"insertBefore\":\"Inserir antes de {itemText}\",\"insertBetween\":\"Inserir entre {beforeItemText} e {afterItemText}\"}");
946
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/pt-PT.json
947
- var $c96a96ffd3dfe2ce9bb15340774c6248$exports = {};
948
- $c96a96ffd3dfe2ce9bb15340774c6248$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Prima Enter para iniciar o arrasto.\",\"dragDescriptionTouch\":\"Faça duplo toque para começar a arrastar.\",\"dragDescriptionVirtual\":\"Clique para iniciar o arrasto.\",\"dragItem\":\"Arrastar {itemText}\",\"dragSelectedItems\":\"Arrastar {count, plural, one {# item selecionado} outro {# itens selecionados}}\",\"dragStartedKeyboard\":\"Arrasto iniciado. Prima a tecla de tabulação para navegar para um destino para largar, e em seguida prima Enter para largar ou prima Escape para cancelar.\",\"dragStartedTouch\":\"Arrasto iniciado. Navegue para um destino para largar, e em seguida faça duplo toque para largar.\",\"dragStartedVirtual\":\"Arrasto iniciado. Navegue para um destino para largar, e em seguida clique ou prima Enter para largar.\",\"dropCanceled\":\"Largar cancelado.\",\"dropComplete\":\"Largar completo.\",\"dropDescriptionKeyboard\":\"Prima Enter para largar. Prima Escape para cancelar o arrasto.\",\"dropDescriptionTouch\":\"Faça duplo toque para largar.\",\"dropDescriptionVirtual\":\"Clique para largar.\",\"dropIndicator\":\"Indicador de largar\",\"dropOnItem\":\"Largar em {itemText}\",\"dropOnRoot\":\"Largar em\",\"endDragKeyboard\":\"A arrastar. Prima Enter para cancelar o arrasto.\",\"endDragTouch\":\"A arrastar. Faça duplo toque para cancelar o arrasto.\",\"endDragVirtual\":\"A arrastar. Clique para cancelar o arrasto.\",\"insertAfter\":\"Inserir depois de {itemText}\",\"insertBefore\":\"Inserir antes de {itemText}\",\"insertBetween\":\"Inserir entre {beforeItemText} e {afterItemText}\"}");
949
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/ro-RO.json
950
- var $cb9664dfd31ac427c76d10c47a7$exports = {};
951
- $cb9664dfd31ac427c76d10c47a7$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Apăsați pe Enter pentru a începe glisarea.\",\"dragDescriptionTouch\":\"Atingeți de două ori pentru a începe să glisați.\",\"dragDescriptionVirtual\":\"Faceți clic pentru a începe glisarea.\",\"dragItem\":\"Glisați {itemText}\",\"dragSelectedItems\":\"Glisați {count, plural, one {# element selectat} other {# elemente selectate}}\",\"dragStartedKeyboard\":\"A început glisarea. Apăsați pe Tab pentru a naviga la o țintă de fixare, apoi apăsați pe Enter pentru a fixa sau apăsați pe Escape pentru a anula glisarea.\",\"dragStartedTouch\":\"A început glisarea. Navigați la o țintă de fixare, apoi atingeți de două ori pentru a fixa.\",\"dragStartedVirtual\":\"A început glisarea. Navigați la o țintă de fixare, apoi faceți clic sau apăsați pe Enter pentru a fixa.\",\"dropCanceled\":\"Fixare anulată.\",\"dropComplete\":\"Fixare finalizată.\",\"dropDescriptionKeyboard\":\"Apăsați pe Enter pentru a fixa. Apăsați pe Escape pentru a anula glisarea.\",\"dropDescriptionTouch\":\"Atingeți de două ori pentru a fixa.\",\"dropDescriptionVirtual\":\"Faceți clic pentru a fixa.\",\"dropIndicator\":\"indicator de fixare\",\"dropOnItem\":\"Fixați pe {itemText}\",\"dropOnRoot\":\"Fixare pe\",\"endDragKeyboard\":\"Se glisează. Apăsați pe Enter pentru a anula glisarea.\",\"endDragTouch\":\"Se glisează. Atingeți de două ori pentru a anula glisarea.\",\"endDragVirtual\":\"Se glisează. Faceți clic pentru a anula glisarea.\",\"insertAfter\":\"Inserați după {itemText}\",\"insertBefore\":\"Inserați înainte de {itemText}\",\"insertBetween\":\"Inserați între {beforeItemText} și {afterItemText}\"}");
952
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/ru-RU.json
953
- var $bb92c9cdbfedd40707a909cb02212287$exports = {};
954
- $bb92c9cdbfedd40707a909cb02212287$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Нажмите клавишу Enter для начала перетаскивания.\",\"dragDescriptionTouch\":\"Дважды нажмите для начала перетаскивания.\",\"dragDescriptionVirtual\":\"Щелкните для начала перетаскивания.\",\"dragItem\":\"Перетащить {itemText}\",\"dragSelectedItems\":\"Перетащить {count, plural, one {# выбранный элемент} other {# выбранных элем}}\",\"dragStartedKeyboard\":\"Начато перетаскивание. Нажмите клавишу Tab для выбора цели, затем нажмите клавишу Enter, чтобы применить перетаскивание, или клавишу Escape для отмены действия.\",\"dragStartedTouch\":\"Начато перетаскивание. Выберите цель, затем дважды нажмите, чтобы применить перетаскивание.\",\"dragStartedVirtual\":\"Начато перетаскивание. Нажмите клавишу Tab для выбора цели, затем нажмите клавишу Enter, чтобы применить перетаскивание.\",\"dropCanceled\":\"Перетаскивание отменено.\",\"dropComplete\":\"Перетаскивание завершено.\",\"dropDescriptionKeyboard\":\"Нажмите клавишу Enter, чтобы применить перетаскивание. Нажмите клавишу Escape для отмены.\",\"dropDescriptionTouch\":\"Дважды нажмите, чтобы применить перетаскивание.\",\"dropDescriptionVirtual\":\"Щелкните, чтобы применить перетаскивание.\",\"dropIndicator\":\"индикатор перетаскивания\",\"dropOnItem\":\"Перетащить на {itemText}\",\"dropOnRoot\":\"Перетащить на\",\"endDragKeyboard\":\"Перетаскивание. Нажмите клавишу Enter для отмены.\",\"endDragTouch\":\"Перетаскивание. Дважды нажмите для отмены.\",\"endDragVirtual\":\"Перетаскивание. Щелкните для отмены.\",\"insertAfter\":\"Вставить после {itemText}\",\"insertBefore\":\"Вставить перед {itemText}\",\"insertBetween\":\"Вставить между {beforeItemText} и {afterItemText}\"}");
955
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/sk-SK.json
956
- var $b67be7ae378fbe0a6b6d5b2bfc2a6a$exports = {};
957
- $b67be7ae378fbe0a6b6d5b2bfc2a6a$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Stlačením klávesu Enter začnete presúvanie.\",\"dragDescriptionTouch\":\"Dvojitým kliknutím začnete presúvanie.\",\"dragDescriptionVirtual\":\"Kliknutím začnete presúvanie.\",\"dragItem\":\"Presunúť položku {itemText}\",\"dragSelectedItems\":\"Presunúť {count, plural, one {# vybratú položku} other {# vybraté položky}}\",\"dragStartedKeyboard\":\"Presúvanie sa začalo. Do cieľového umiestnenia prejdete stlačením klávesu Tab. Ak chcete položku umiestniť, stlačte kláves Enter alebo stlačte kláves Esc, ak chcete presúvanie zrušiť.\",\"dragStartedTouch\":\"Presúvanie sa začalo. Prejdite na cieľové umiestnenie a dvojitým kliknutím umiestnite položku.\",\"dragStartedVirtual\":\"Presúvanie sa začalo. Prejdite na cieľové umiestnenie a kliknutím alebo stlačením klávesu Enter umiestnite položku.\",\"dropCanceled\":\"Umiestnenie zrušené.\",\"dropComplete\":\"Umiestnenie dokončené.\",\"dropDescriptionKeyboard\":\"Stlačením klávesu Enter umiestnite položku. Stlačením klávesu Esc zrušíte presúvanie.\",\"dropDescriptionTouch\":\"Dvojitým kliknutím umiestnite položku.\",\"dropDescriptionVirtual\":\"Kliknutím umiestnite položku.\",\"dropIndicator\":\"indikátor umiestnenia\",\"dropOnItem\":\"Umiestniť na položku {itemText}\",\"dropOnRoot\":\"Umiestniť na\",\"endDragKeyboard\":\"Prebieha presúvanie. Ak ho chcete zrušiť, stlačte kláves Enter.\",\"endDragTouch\":\"Prebieha presúvanie. Dvojitým kliknutím ho môžete zrušiť.\",\"endDragVirtual\":\"Prebieha presúvanie.\",\"insertAfter\":\"Vložiť za položku {itemText}\",\"insertBefore\":\"Vložiť pred položku {itemText}\",\"insertBetween\":\"Vložiť medzi položky {beforeItemText} a {afterItemText}\"}");
958
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/sl-SI.json
959
- var $a75b2e8c856626127ded0a4974ec55e4$exports = {};
960
- $a75b2e8c856626127ded0a4974ec55e4$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Pritisnite tipko Enter za začetek vlečenja.\",\"dragDescriptionTouch\":\"Dvotapnite za začetek vlečenja.\",\"dragDescriptionVirtual\":\"Kliknite za začetek vlečenja.\",\"dragItem\":\"Povleci {itemText}\",\"dragSelectedItems\":\"Povlecite {count, plural, one {# izbran element} other {izbrane elemente (#)}}\",\"dragStartedKeyboard\":\"Vlečenje se je začelo. Pritisnite tipko Tab za pomik na mesto, kamor želite spustiti elemente, in pritisnite tipko Enter, da jih spustite, ali tipko Escape, da prekličete postopek.\",\"dragStartedTouch\":\"Vlečenje se je začelo. Pomaknite se na mesto, kamor želite spustiti elemente, in dvotapnite, da jih spustite.\",\"dragStartedVirtual\":\"Vlečenje se je začelo. Pomaknite se na mesto, kamor želite spustiti elemente, in kliknite ali pritisnite tipko Enter, da jih spustite.\",\"dropCanceled\":\"Spust je preklican.\",\"dropComplete\":\"Spust je končan.\",\"dropDescriptionKeyboard\":\"Pritisnite tipko Enter, da spustite. Pritisnite tipko Escape, da prekličete vlečenje.\",\"dropDescriptionTouch\":\"Dvotapnite, da spustite.\",\"dropDescriptionVirtual\":\"Kliknite, da spustite.\",\"dropIndicator\":\"indikator spusta\",\"dropOnItem\":\"Spusti na mesto {itemText}\",\"dropOnRoot\":\"Spusti na mesto\",\"endDragKeyboard\":\"Vlečenje. Pritisnite tipko Enter za preklic vlečenja.\",\"endDragTouch\":\"Vlečenje. Dvotapnite za preklic vlečenja.\",\"endDragVirtual\":\"Vlečenje. Kliknite, da prekličete vlečenje.\",\"insertAfter\":\"Vstavi za {itemText}\",\"insertBefore\":\"Vstavi pred {itemText}\",\"insertBetween\":\"Vstavi med {beforeItemText} in {afterItemText}\"}");
961
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/sr-SP.json
962
- var $ab0b9e23c57c52b70f6a9b9a6ad3bc$exports = {};
963
- $ab0b9e23c57c52b70f6a9b9a6ad3bc$exports = JSON.parse("{\"dragItem\":\"Prevucite {itemText}\",\"dragSelectedItems\":\"Prevucite {count, plural, one {# izabranu stavku} other {# izabrane stavke}}\",\"dragDescriptionKeyboard\":\"Pritisnite Enter da biste započeli prevlačenje..\",\"dragDescriptionTouch\":\"Dvaput dodirnite za otpuštanje.\",\"dragDescriptionVirtual\":\"Kliknite da biste započeli prevlačenje.\",\"dragStartedKeyboard\":\"Prevlačenje je započeto. Pritisnite Tab da biste otišli do cilja za otpuštanje, zatim pritisnite Enter za ispuštanje ili pritisnite Escape za otkazivanje.\",\"dragStartedTouch\":\"Prevlačenje je započeto. Idite do cilja za otpuštanje, a zatim dvaput dodirnite za otpuštanje.\",\"dragStartedVirtual\":\"Prevlačenje je započeto. Idite do cilja za otpuštanje, a zatim kliknite ili pritinite Enter za otpuštanje.\",\"endDragKeyboard\":\"Prevlačenje u toku. Pritisnite Enter da biste otkazali prevlačenje.\",\"endDragTouch\":\"Prevlačenje u toku. Dvaput dodirnite da biste otkazali prevlačenje.\",\"endDragVirtual\":\"Prevlačenje u toku. Kliknite da biste otkazali prevlačenje.\",\"dropDescriptionKeyboard\":\"Pritisnite Enter da biste otpustili. Pritisnite Escape da biste otkazali prevlačenje.\",\"dropDescriptionTouch\":\"Dvaput dodirnite za otpuštanje.\",\"dropDescriptionVirtual\":\"Kliknite za otpuštanje.\",\"dropCanceled\":\"Otpuštanje je otkazano.\",\"dropComplete\":\"Prevlačenje je završeno.\",\"dropIndicator\":\"Indikator otpuštanja\",\"dropOnRoot\":\"Otpusti na\",\"dropOnItem\":\"Otpusti na {itemText}\",\"insertBefore\":\"Umetnite ispred {itemText}\",\"insertBetween\":\"Umetnite između {beforeItemText} i {afterItemText}\",\"insertAfter\":\"Umetnite posle {itemText}\"}");
964
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/sv-SE.json
965
- var $be4af2b5be692205e2859aabe9f9$exports = {};
966
- $be4af2b5be692205e2859aabe9f9$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Tryck på enter för att börja dra.\",\"dragDescriptionTouch\":\"Dubbeltryck för att börja dra.\",\"dragDescriptionVirtual\":\"Klicka för att börja dra.\",\"dragItem\":\"Dra {itemText}\",\"dragSelectedItems\":\"Dra {count, plural, one {# valt objekt} other {# valda objekt}}\",\"dragStartedKeyboard\":\"Börja dra. Tryck på tabb för att navigera till målet, tryck på enter för att släppa eller på escape för att avbryta.\",\"dragStartedTouch\":\"Börja dra. Navigera till ett mål och dubbeltryck för att släppa.\",\"dragStartedVirtual\":\"Börja dra. Navigera till ett mål och klicka eller tryck på enter för att släppa.\",\"dropCanceled\":\"Släppåtgärd avbröts.\",\"dropComplete\":\"Släppåtgärd klar.\",\"dropDescriptionKeyboard\":\"Tryck på enter för att släppa. Tryck på escape för att avbryta dragåtgärd.\",\"dropDescriptionTouch\":\"Dubbeltryck för att släppa.\",\"dropDescriptionVirtual\":\"Klicka för att släppa.\",\"dropIndicator\":\"släppindikator\",\"dropOnItem\":\"Släpp på {itemText}\",\"dropOnRoot\":\"Släpp på\",\"endDragKeyboard\":\"Drar. Tryck på enter för att avbryta dragåtgärd.\",\"endDragTouch\":\"Drar. Dubbeltryck för att avbryta dragåtgärd.\",\"endDragVirtual\":\"Drar. Klicka för att avbryta dragåtgärd.\",\"insertAfter\":\"Infoga efter {itemText}\",\"insertBefore\":\"Infoga före {itemText}\",\"insertBetween\":\"Infoga mellan {beforeItemText} och {afterItemText}\"}");
967
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/tr-TR.json
968
- var $dc264784e2c46ff8f1a7c0bb75a813$exports = {};
969
- $dc264784e2c46ff8f1a7c0bb75a813$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Sürüklemeyi başlatmak için Enter'a basın.\",\"dragDescriptionTouch\":\"Sürüklemeyi başlatmak için çift tıklayın.\",\"dragDescriptionVirtual\":\"Sürüklemeyi başlatmak için tıklayın.\",\"dragItem\":\"{itemText}’i sürükle\",\"dragSelectedItems\":\"Sürükle {count, plural, one {# seçili öge} other {# seçili öge}}\",\"dragStartedKeyboard\":\"Sürükleme başlatıldı. Bir bırakma hedefine gitmek için Tab’a basın, ardından bırakmak için Enter’a basın veya iptal etmek için Escape’e basın.\",\"dragStartedTouch\":\"Sürükleme başlatıldı. Bir bırakma hedefine gidin, ardından bırakmak için çift tıklayın.\",\"dragStartedVirtual\":\"Sürükleme başlatıldı. Bir bırakma hedefine gidin, ardından bırakmak için Enter’a tıklayın veya basın.\",\"dropCanceled\":\"Bırakma iptal edildi.\",\"dropComplete\":\"Bırakma tamamlandı.\",\"dropDescriptionKeyboard\":\"Bırakmak için Enter'a basın. Sürüklemeyi iptal etmek için Escape'e basın.\",\"dropDescriptionTouch\":\"Bırakmak için çift tıklayın.\",\"dropDescriptionVirtual\":\"Bırakmak için tıklayın.\",\"dropIndicator\":\"bırakma göstergesi\",\"dropOnItem\":\"{itemText} üzerine bırak\",\"dropOnRoot\":\"Bırakın\",\"endDragKeyboard\":\"Sürükleme. Sürüklemeyi iptal etmek için Enter'a basın.\",\"endDragTouch\":\"Sürükleme. Sürüklemeyi iptal etmek için çift tıklayın.\",\"endDragVirtual\":\"Sürükleme. Sürüklemeyi iptal etmek için tıklayın.\",\"insertAfter\":\"{itemText}’den sonra gir\",\"insertBefore\":\"{itemText}’den önce gir\",\"insertBetween\":\"{beforeItemText} ve {afterItemText} arasına gir\"}");
970
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/uk-UA.json
971
- var $bc7a04ab96250610a6ca8cd77cc1$exports = {};
972
- $bc7a04ab96250610a6ca8cd77cc1$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Натисніть Enter, щоб почати перетягування.\",\"dragDescriptionTouch\":\"Натисніть двічі, щоб почати перетягування.\",\"dragDescriptionVirtual\":\"Натисніть, щоб почати перетягування.\",\"dragItem\":\"Перетягнути {itemText}\",\"dragSelectedItems\":\"Перетягніть {count, plural, one {# вибраний елемент} other {# вибраних елем}}\",\"dragStartedKeyboard\":\"Перетягування почалося. Натисніть Tab, щоб перейти до цілі перетягування, потім натисніть Enter, щоб перетягнути, або Escape, щоб скасувати.\",\"dragStartedTouch\":\"Перетягування почалося. Перейдіть до цілі перетягування, потім натисніть двічі, щоб перетягнути.\",\"dragStartedVirtual\":\"Перетягування почалося. Перейдіть до цілі перетягування, потім натисніть Enter, щоб перетягнути.\",\"dropCanceled\":\"Перетягування скасовано.\",\"dropComplete\":\"Перетягування завершено.\",\"dropDescriptionKeyboard\":\"Натисніть Enter, щоб перетягнути. Натисніть Escape, щоб скасувати перетягування.\",\"dropDescriptionTouch\":\"Натисніть двічі, щоб перетягнути.\",\"dropDescriptionVirtual\":\"Натисніть, щоб перетягнути.\",\"dropIndicator\":\"індикатор перетягування\",\"dropOnItem\":\"Перетягнути на {itemText}\",\"dropOnRoot\":\"Перетягнути на\",\"endDragKeyboard\":\"Триває перетягування. Натисніть Enter, щоб скасувати перетягування.\",\"endDragTouch\":\"Триває перетягування. Натисніть двічі, щоб скасувати перетягування.\",\"endDragVirtual\":\"Триває перетягування. Натисніть, щоб скасувати перетягування.\",\"insertAfter\":\"Вставити після {itemText}\",\"insertBefore\":\"Вставити перед {itemText}\",\"insertBetween\":\"Вставити між {beforeItemText} і {afterItemText}\"}");
973
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/zh-CN.json
974
- var $d4f2d0b8fbcdf0615175b386b62b0$exports = {};
975
- $d4f2d0b8fbcdf0615175b386b62b0$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"按 Enter 开始拖动。\",\"dragDescriptionTouch\":\"双击开始拖动。\",\"dragDescriptionVirtual\":\"单击开始拖动。\",\"dragItem\":\"拖动 {itemText}\",\"dragSelectedItems\":\"拖动 {count, plural, one {# 选中项目} other {# 选中项目}}\",\"dragStartedKeyboard\":\"已开始拖动。按 Tab 导航到放置目标,然后按 Enter 放置或按 Escape 取消。\",\"dragStartedTouch\":\"已开始拖动。导航到放置目标,然后双击放置。\",\"dragStartedVirtual\":\"已开始拖动。导航到放置目标,然后单击或按 Enter 放置。\",\"dropCanceled\":\"放置已取消。\",\"dropComplete\":\"放置已完成。\",\"dropDescriptionKeyboard\":\"按 Enter 放置。按 Escape 取消拖动。\",\"dropDescriptionTouch\":\"双击放置。\",\"dropDescriptionVirtual\":\"单击放置。\",\"dropIndicator\":\"放置标记\",\"dropOnItem\":\"放置于 {itemText}\",\"dropOnRoot\":\"放置于\",\"endDragKeyboard\":\"正在拖动。按 Enter 取消拖动。\",\"endDragTouch\":\"正在拖动。双击取消拖动。\",\"endDragVirtual\":\"正在拖动。单击取消拖动。\",\"insertAfter\":\"插入到 {itemText} 之后\",\"insertBefore\":\"插入到 {itemText} 之前\",\"insertBetween\":\"插入到 {beforeItemText} 和 {afterItemText} 之间\"}");
976
- // ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/zh-TW.json
977
- var $e61399ec3e66f955ad58888dbe8848db$exports = {};
978
- $e61399ec3e66f955ad58888dbe8848db$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"按 Enter 鍵以開始拖曳。\",\"dragDescriptionTouch\":\"輕點兩下以開始拖曳。\",\"dragDescriptionVirtual\":\"按一下滑鼠以開始拖曳。\",\"dragItem\":\"拖曳「{itemText}」\",\"dragSelectedItems\":\"拖曳 {count, plural, one {# 個選定項目} other {# 個選定項目}}\",\"dragStartedKeyboard\":\"已開始拖曳。按 Tab 鍵以瀏覽至放置目標,然後按 Enter 鍵以放置,或按 Escape 鍵以取消。\",\"dragStartedTouch\":\"已開始拖曳。瀏覽至放置目標,然後輕點兩下以放置。\",\"dragStartedVirtual\":\"已開始拖曳。瀏覽至放置目標,然後按一下滑鼠或按 Enter 鍵以放置。\",\"dropCanceled\":\"放置已取消。\",\"dropComplete\":\"放置已完成。\",\"dropDescriptionKeyboard\":\"按 Enter 鍵以放置。按 Escape 鍵以取消拖曳。\",\"dropDescriptionTouch\":\"輕點兩下以放置。\",\"dropDescriptionVirtual\":\"按一下滑鼠以放置。\",\"dropIndicator\":\"放置指示器\",\"dropOnItem\":\"放置在「{itemText}」上\",\"dropOnRoot\":\"放置在\",\"endDragKeyboard\":\"拖曳中。按 Enter 鍵以取消拖曳。\",\"endDragTouch\":\"拖曳中。輕點兩下以取消拖曳。\",\"endDragVirtual\":\"拖曳中。按一下滑鼠以取消拖曳。\",\"insertAfter\":\"插入至「{itemText}」之後\",\"insertBefore\":\"插入至「{itemText}」之前\",\"insertBetween\":\"插入至「{beforeItemText}」和「{afterItemText}」之間\"}");
979
- // @ts-ignore
980
- const $faa3fd9c929dcb7fde0b75ef821032d3$var$intlMessages = {
981
- "ar-AE": _babelRuntimeHelpersInteropRequireDefault($a049e8a273c8713c08cfdce886954f2$exports).default,
982
- "bg-BG": _babelRuntimeHelpersInteropRequireDefault($c7bef18aeb1fd3dc6bd9bba10397f8b2$exports).default,
983
- "cs-CZ": _babelRuntimeHelpersInteropRequireDefault($c5f1e0261e291b1341633fe9c018c96$exports).default,
984
- "da-DK": _babelRuntimeHelpersInteropRequireDefault($f3c32be8e4431e03a321f5417e1843b$exports).default,
985
- "de-DE": _babelRuntimeHelpersInteropRequireDefault($ad0d5ee9d1c1e0643b04e955a34882a6$exports).default,
986
- "el-GR": _babelRuntimeHelpersInteropRequireDefault($f208c93cf9a0c52cc9fefaad0e63f8$exports).default,
987
- "en-US": _babelRuntimeHelpersInteropRequireDefault($ece80d58838919a4624d1c28b393f77$exports).default,
988
- "es-ES": _babelRuntimeHelpersInteropRequireDefault($ee9761bb92f87937ffa91c74828ae143$exports).default,
989
- "et-EE": _babelRuntimeHelpersInteropRequireDefault($f49178596b64270de232b4c1afb184af$exports).default,
990
- "fi-FI": _babelRuntimeHelpersInteropRequireDefault($f9bca27008bd46e848c441473e52$exports).default,
991
- "fr-FR": _babelRuntimeHelpersInteropRequireDefault($abf7975536d94242592c6ec084b35c3f$exports).default,
992
- "he-IL": _babelRuntimeHelpersInteropRequireDefault($a71b397b5a3444fd4218686dd8961d3$exports).default,
993
- "hr-HR": _babelRuntimeHelpersInteropRequireDefault($a14560c06b1711b5b49bc92b5237$exports).default,
994
- "hu-HU": _babelRuntimeHelpersInteropRequireDefault($e2f05728cdfadbce63b4a6a5c67263f3$exports).default,
995
- "it-IT": _babelRuntimeHelpersInteropRequireDefault($da3198fd20b34c609578436051c8e7f$exports).default,
996
- "ja-JP": _babelRuntimeHelpersInteropRequireDefault($a6ff3a43ed70d88abb08383457364ed7$exports).default,
997
- "ko-KR": _babelRuntimeHelpersInteropRequireDefault($dfbfd4f7dc34546b5bb0af666347fbd0$exports).default,
998
- "lt-LT": _babelRuntimeHelpersInteropRequireDefault($c53389022087f7b6afc79a9c99ef48f$exports).default,
999
- "lv-LV": _babelRuntimeHelpersInteropRequireDefault($cca63ba6085d5d7fd3ffb0a4e8fc18$exports).default,
1000
- "nb-NO": _babelRuntimeHelpersInteropRequireDefault($d46abea5f59e687d0510d2bd4f77$exports).default,
1001
- "nl-NL": _babelRuntimeHelpersInteropRequireDefault($ac6e3e2426b7582528543cbf5379fc$exports).default,
1002
- "pl-PL": _babelRuntimeHelpersInteropRequireDefault($b97f849030ab4d8852eb85ed8b71$exports).default,
1003
- "pt-BR": _babelRuntimeHelpersInteropRequireDefault($efb2848f59f1d35ef3478522b3937c$exports).default,
1004
- "pt-PT": _babelRuntimeHelpersInteropRequireDefault($c96a96ffd3dfe2ce9bb15340774c6248$exports).default,
1005
- "ro-RO": _babelRuntimeHelpersInteropRequireDefault($cb9664dfd31ac427c76d10c47a7$exports).default,
1006
- "ru-RU": _babelRuntimeHelpersInteropRequireDefault($bb92c9cdbfedd40707a909cb02212287$exports).default,
1007
- "sk-SK": _babelRuntimeHelpersInteropRequireDefault($b67be7ae378fbe0a6b6d5b2bfc2a6a$exports).default,
1008
- "sl-SI": _babelRuntimeHelpersInteropRequireDefault($a75b2e8c856626127ded0a4974ec55e4$exports).default,
1009
- "sr-SP": _babelRuntimeHelpersInteropRequireDefault($ab0b9e23c57c52b70f6a9b9a6ad3bc$exports).default,
1010
- "sv-SE": _babelRuntimeHelpersInteropRequireDefault($be4af2b5be692205e2859aabe9f9$exports).default,
1011
- "tr-TR": _babelRuntimeHelpersInteropRequireDefault($dc264784e2c46ff8f1a7c0bb75a813$exports).default,
1012
- "uk-UA": _babelRuntimeHelpersInteropRequireDefault($bc7a04ab96250610a6ca8cd77cc1$exports).default,
1013
- "zh-CN": _babelRuntimeHelpersInteropRequireDefault($d4f2d0b8fbcdf0615175b386b62b0$exports).default,
1014
- "zh-TW": _babelRuntimeHelpersInteropRequireDefault($e61399ec3e66f955ad58888dbe8848db$exports).default
1015
- };
1016
- const $faa3fd9c929dcb7fde0b75ef821032d3$var$MESSAGES = {
1017
- keyboard: {
1018
- start: 'dragDescriptionKeyboard',
1019
- end: 'endDragKeyboard'
1020
- },
1021
- touch: {
1022
- start: 'dragDescriptionTouch',
1023
- end: 'endDragTouch'
1024
- },
1025
- virtual: {
1026
- start: 'dragDescriptionVirtual',
1027
- end: 'endDragVirtual'
1028
- }
1029
- };
1030
-
1031
- function useDrag(options) {
1032
- let formatMessage = useMessageFormatter($faa3fd9c929dcb7fde0b75ef821032d3$var$intlMessages);
1033
- let state = useRef({
1034
- options,
1035
- x: 0,
1036
- y: 0
1037
- }).current;
1038
- state.options = options;
1039
- let [isDragging, setDragging] = useState(false);
1040
-
1041
- let onDragStart = e => {
1042
- let items = options.getItems();
1043
- $bc29619458500c186021634c18dc$export$writeToDataTransfer(e.dataTransfer, items);
1044
-
1045
- if (typeof options.getAllowedDropOperations === 'function') {
1046
- let allowedOperations = options.getAllowedDropOperations();
1047
- let allowed = $b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_OPERATION.none;
1048
-
1049
- for (let operation of allowedOperations) {
1050
- allowed |= $b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_OPERATION[operation] || $b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_OPERATION.none;
1051
- }
1052
-
1053
- e.dataTransfer.effectAllowed = $b29ea0269b2ea2bf4827b4fa19ddc83e$export$EFFECT_ALLOWED[allowed] || 'none';
1054
- } // If there is a renderPreview function, use it to render a custom preview image that will
1055
- // appear under the pointer while dragging. If not, the element itself is dragged by the browser.
1056
-
1057
-
1058
- if (typeof options.renderPreview === 'function') {
1059
- let preview = options.renderPreview(items);
1060
-
1061
- if (preview) {
1062
- // Create an off-screen div to render the preview into.
1063
- let node = document.createElement('div');
1064
- node.style.zIndex = '-100';
1065
- node.style.position = 'absolute';
1066
- node.style.top = '0';
1067
- node.style.left = '-100000px';
1068
- document.body.appendChild(node); // Call renderPreview to get a JSX element, and render it into the div with React DOM.
1069
-
1070
- _reactDom.render(preview, node); // Compute the offset that the preview will appear under the mouse.
1071
- // If possible, this is based on the point the user clicked on the target.
1072
- // If the preview is much smaller, then just use the center point of the preview.
1073
-
1074
-
1075
- let size = node.getBoundingClientRect();
1076
- let rect = e.currentTarget.getBoundingClientRect();
1077
- let x = e.clientX - rect.x;
1078
- let y = e.clientY - rect.y;
1079
-
1080
- if (x > size.width || y > size.height) {
1081
- x = size.width / 2;
1082
- y = size.height / 2;
396
+ if (e.key === 'Tab' && !(e.metaKey || e.altKey || e.ctrlKey)) {
397
+ if (e.shiftKey) this.previous();
398
+ else this.next();
1083
399
  }
1084
-
1085
- e.dataTransfer.setDragImage(node, x, y); // Remove the preview from the DOM after a frame so the browser has time to paint.
1086
-
1087
- requestAnimationFrame(() => {
1088
- document.body.removeChild(node);
1089
- });
1090
- }
1091
- }
1092
-
1093
- if (typeof options.onDragStart === 'function') {
1094
- options.onDragStart({
1095
- type: 'dragstart',
1096
- x: e.clientX,
1097
- y: e.clientY
1098
- });
1099
- }
1100
-
1101
- state.x = e.clientX;
1102
- state.y = e.clientY; // Wait a frame before we set dragging to true so that the browser has time to
1103
- // render the preview image before we update the element that has been dragged.
1104
-
1105
- requestAnimationFrame(() => {
1106
- setDragging(true);
1107
- });
1108
- };
1109
-
1110
- let onDrag = e => {
1111
- if (e.clientX === state.x && e.clientY === state.y) {
1112
- return;
1113
- }
1114
-
1115
- if (typeof options.onDragMove === 'function') {
1116
- options.onDragMove({
1117
- type: 'dragmove',
1118
- x: e.clientX,
1119
- y: e.clientY
1120
- });
1121
- }
1122
-
1123
- state.x = e.clientX;
1124
- state.y = e.clientY;
1125
- };
1126
-
1127
- let onDragEnd = e => {
1128
- if (typeof options.onDragEnd === 'function') {
1129
- options.onDragEnd({
1130
- type: 'dragend',
1131
- x: e.clientX,
1132
- y: e.clientY,
1133
- dropOperation: $b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_EFFECT_TO_DROP_OPERATION[e.dataTransfer.dropEffect]
1134
- });
1135
- }
1136
-
1137
- setDragging(false);
1138
- };
1139
-
1140
- let onPress = e => {
1141
- if (e.pointerType !== 'keyboard' && e.pointerType !== 'virtual') {
1142
- return;
1143
- }
1144
-
1145
- if (typeof state.options.onDragStart === 'function') {
1146
- let rect = e.target.getBoundingClientRect();
1147
- state.options.onDragStart({
1148
- type: 'dragstart',
1149
- x: rect.x + rect.width / 2,
1150
- y: rect.y + rect.height / 2
1151
- });
1152
- }
1153
-
1154
- $a75d092e5c30878812fba78e$export$beginDragging({
1155
- element: e.target,
1156
- items: state.options.getItems(),
1157
- allowedDropOperations: typeof state.options.getAllowedDropOperations === 'function' ? state.options.getAllowedDropOperations() : ['move', 'copy', 'link'],
1158
-
1159
- onDragEnd(e) {
1160
- setDragging(false);
1161
-
1162
- if (typeof state.options.onDragEnd === 'function') {
1163
- state.options.onDragEnd(e);
400
+ if (typeof this.currentDropTarget?.onKeyDown === 'function') this.currentDropTarget.onKeyDown(e, this.dragTarget);
401
+ }
402
+ onFocus(e) {
403
+ // Prevent focus events, except to the original drag target.
404
+ if (e.target !== this.dragTarget.element) this.cancelEvent(e);
405
+ // Ignore focus events on the window/document (JSDOM). Will be handled in onBlur, below.
406
+ if (!(e.target instanceof HTMLElement) || e.target === this.dragTarget.element) return;
407
+ let dropTarget = this.validDropTargets.find((target)=>target.element.contains(e.target)
408
+ );
409
+ if (!dropTarget) {
410
+ if (this.currentDropTarget) this.currentDropTarget.element.focus();
411
+ else this.dragTarget.element.focus();
412
+ return;
413
+ }
414
+ let item = $d69e2bc1de15721f$var$dropItems.get(e.target);
415
+ this.setCurrentDropTarget(dropTarget, item);
416
+ }
417
+ onBlur(e) {
418
+ if (e.target !== this.dragTarget.element) this.cancelEvent(e);
419
+ // If nothing is gaining focus, or e.relatedTarget is the window/document (JSDOM),
420
+ // restore focus back to the current drop target if any, or the original drag target.
421
+ if (!e.relatedTarget || !(e.relatedTarget instanceof HTMLElement)) {
422
+ if (this.currentDropTarget) this.currentDropTarget.element.focus();
423
+ else this.dragTarget.element.focus();
1164
424
  }
1165
- }
1166
-
1167
- }, formatMessage);
1168
- setDragging(true);
1169
- };
1170
-
1171
- let modality = $bc29619458500c186021634c18dc$export$useDragModality();
1172
- let descriptionProps = useDescription(formatMessage(!isDragging ? $faa3fd9c929dcb7fde0b75ef821032d3$var$MESSAGES[modality].start : $faa3fd9c929dcb7fde0b75ef821032d3$var$MESSAGES[modality].end));
1173
- return {
1174
- dragProps: {
1175
- draggable: 'true',
1176
- onDragStart,
1177
- onDrag,
1178
- onDragEnd
1179
- },
1180
- dragButtonProps: _babelRuntimeHelpersExtends({}, descriptionProps, {
1181
- onPress
1182
- }),
1183
- isDragging
1184
- };
1185
- }
1186
-
1187
- exports.useDrag = useDrag;
1188
- // @ts-ignore
1189
- const $ca75888e192994dbb11ae05e54$var$intlMessages = {
1190
- "ar-AE": _babelRuntimeHelpersInteropRequireDefault($a049e8a273c8713c08cfdce886954f2$exports).default,
1191
- "bg-BG": _babelRuntimeHelpersInteropRequireDefault($c7bef18aeb1fd3dc6bd9bba10397f8b2$exports).default,
1192
- "cs-CZ": _babelRuntimeHelpersInteropRequireDefault($c5f1e0261e291b1341633fe9c018c96$exports).default,
1193
- "da-DK": _babelRuntimeHelpersInteropRequireDefault($f3c32be8e4431e03a321f5417e1843b$exports).default,
1194
- "de-DE": _babelRuntimeHelpersInteropRequireDefault($ad0d5ee9d1c1e0643b04e955a34882a6$exports).default,
1195
- "el-GR": _babelRuntimeHelpersInteropRequireDefault($f208c93cf9a0c52cc9fefaad0e63f8$exports).default,
1196
- "en-US": _babelRuntimeHelpersInteropRequireDefault($ece80d58838919a4624d1c28b393f77$exports).default,
1197
- "es-ES": _babelRuntimeHelpersInteropRequireDefault($ee9761bb92f87937ffa91c74828ae143$exports).default,
1198
- "et-EE": _babelRuntimeHelpersInteropRequireDefault($f49178596b64270de232b4c1afb184af$exports).default,
1199
- "fi-FI": _babelRuntimeHelpersInteropRequireDefault($f9bca27008bd46e848c441473e52$exports).default,
1200
- "fr-FR": _babelRuntimeHelpersInteropRequireDefault($abf7975536d94242592c6ec084b35c3f$exports).default,
1201
- "he-IL": _babelRuntimeHelpersInteropRequireDefault($a71b397b5a3444fd4218686dd8961d3$exports).default,
1202
- "hr-HR": _babelRuntimeHelpersInteropRequireDefault($a14560c06b1711b5b49bc92b5237$exports).default,
1203
- "hu-HU": _babelRuntimeHelpersInteropRequireDefault($e2f05728cdfadbce63b4a6a5c67263f3$exports).default,
1204
- "it-IT": _babelRuntimeHelpersInteropRequireDefault($da3198fd20b34c609578436051c8e7f$exports).default,
1205
- "ja-JP": _babelRuntimeHelpersInteropRequireDefault($a6ff3a43ed70d88abb08383457364ed7$exports).default,
1206
- "ko-KR": _babelRuntimeHelpersInteropRequireDefault($dfbfd4f7dc34546b5bb0af666347fbd0$exports).default,
1207
- "lt-LT": _babelRuntimeHelpersInteropRequireDefault($c53389022087f7b6afc79a9c99ef48f$exports).default,
1208
- "lv-LV": _babelRuntimeHelpersInteropRequireDefault($cca63ba6085d5d7fd3ffb0a4e8fc18$exports).default,
1209
- "nb-NO": _babelRuntimeHelpersInteropRequireDefault($d46abea5f59e687d0510d2bd4f77$exports).default,
1210
- "nl-NL": _babelRuntimeHelpersInteropRequireDefault($ac6e3e2426b7582528543cbf5379fc$exports).default,
1211
- "pl-PL": _babelRuntimeHelpersInteropRequireDefault($b97f849030ab4d8852eb85ed8b71$exports).default,
1212
- "pt-BR": _babelRuntimeHelpersInteropRequireDefault($efb2848f59f1d35ef3478522b3937c$exports).default,
1213
- "pt-PT": _babelRuntimeHelpersInteropRequireDefault($c96a96ffd3dfe2ce9bb15340774c6248$exports).default,
1214
- "ro-RO": _babelRuntimeHelpersInteropRequireDefault($cb9664dfd31ac427c76d10c47a7$exports).default,
1215
- "ru-RU": _babelRuntimeHelpersInteropRequireDefault($bb92c9cdbfedd40707a909cb02212287$exports).default,
1216
- "sk-SK": _babelRuntimeHelpersInteropRequireDefault($b67be7ae378fbe0a6b6d5b2bfc2a6a$exports).default,
1217
- "sl-SI": _babelRuntimeHelpersInteropRequireDefault($a75b2e8c856626127ded0a4974ec55e4$exports).default,
1218
- "sr-SP": _babelRuntimeHelpersInteropRequireDefault($ab0b9e23c57c52b70f6a9b9a6ad3bc$exports).default,
1219
- "sv-SE": _babelRuntimeHelpersInteropRequireDefault($be4af2b5be692205e2859aabe9f9$exports).default,
1220
- "tr-TR": _babelRuntimeHelpersInteropRequireDefault($dc264784e2c46ff8f1a7c0bb75a813$exports).default,
1221
- "uk-UA": _babelRuntimeHelpersInteropRequireDefault($bc7a04ab96250610a6ca8cd77cc1$exports).default,
1222
- "zh-CN": _babelRuntimeHelpersInteropRequireDefault($d4f2d0b8fbcdf0615175b386b62b0$exports).default,
1223
- "zh-TW": _babelRuntimeHelpersInteropRequireDefault($e61399ec3e66f955ad58888dbe8848db$exports).default
1224
- };
1225
- const $ca75888e192994dbb11ae05e54$var$MESSAGES = {
1226
- keyboard: 'dropDescriptionKeyboard',
1227
- touch: 'dropDescriptionTouch',
1228
- virtual: 'dropDescriptionVirtual'
1229
- };
1230
-
1231
- function $ca75888e192994dbb11ae05e54$export$useVirtualDrop() {
1232
- let formatMessage = useMessageFormatter($ca75888e192994dbb11ae05e54$var$intlMessages);
1233
- let modality = $bc29619458500c186021634c18dc$export$useDragModality();
1234
- let dragSession = $a75d092e5c30878812fba78e$export$useDragSession();
1235
- let descriptionProps = useDescription(dragSession ? formatMessage($ca75888e192994dbb11ae05e54$var$MESSAGES[modality]) : '');
1236
- return {
1237
- dropProps: _babelRuntimeHelpersExtends({}, descriptionProps, {
1238
- // Mobile Safari does not properly bubble click events on elements except links or inputs
1239
- // unless there is an onclick handler bound directly to the element itself. By adding this
1240
- // handler, React will take care of adding that for us, and we are able to handle document
1241
- // level click events in the DragManager.
1242
- // See https://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
1243
- onClick: () => {}
1244
- })
1245
- };
1246
- }
1247
-
1248
- const $db0591c71140b157a950096251935c$var$DROP_ACTIVATE_TIMEOUT = 800;
1249
-
1250
- function useDrop(options) {
1251
- let [isDropTarget, setDropTarget] = useState(false);
1252
- let state = useRef({
1253
- x: 0,
1254
- y: 0,
1255
- dragEnterCount: 0,
1256
- dropEffect: 'none',
1257
- dropActivateTimer: null
1258
- }).current;
1259
-
1260
- let onDragOver = e => {
1261
- e.preventDefault();
1262
- e.stopPropagation();
1263
-
1264
- if (e.clientX === state.x && e.clientY === state.y) {
1265
- e.dataTransfer.dropEffect = state.dropEffect;
1266
- return;
1267
- }
1268
-
1269
- state.x = e.clientX;
1270
- state.y = e.clientY;
1271
-
1272
- if (typeof options.getDropOperationForPoint === 'function') {
1273
- let allowedOperations = $db0591c71140b157a950096251935c$var$effectAllowedToOperations(e.dataTransfer.effectAllowed);
1274
- let types = new $bc29619458500c186021634c18dc$export$DragTypes(e.dataTransfer);
1275
- let rect = e.currentTarget.getBoundingClientRect();
1276
- let dropOperation = options.getDropOperationForPoint(types, allowedOperations, state.x - rect.x, state.y - rect.y);
1277
- state.dropEffect = $b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_OPERATION_TO_DROP_EFFECT[dropOperation] || 'none';
1278
425
  }
1279
-
1280
- e.dataTransfer.dropEffect = state.dropEffect;
1281
-
1282
- if (typeof options.onDropMove === 'function') {
1283
- let rect = e.currentTarget.getBoundingClientRect();
1284
- options.onDropMove({
1285
- type: 'dropmove',
1286
- x: state.x - rect.x,
1287
- y: state.y - rect.y
1288
- });
426
+ onClick(e) {
427
+ this.cancelEvent(e);
428
+ if (e.detail !== 0) return;
429
+ if (e.target === this.dragTarget.element) {
430
+ this.cancel();
431
+ return;
432
+ }
433
+ let dropTarget = this.validDropTargets.find((target)=>target.element.contains(e.target)
434
+ );
435
+ if (dropTarget) {
436
+ let item = $d69e2bc1de15721f$var$dropItems.get(e.target);
437
+ this.setCurrentDropTarget(dropTarget, item);
438
+ this.drop(item);
439
+ }
1289
440
  }
1290
-
1291
- clearTimeout(state.dropActivateTimer);
1292
-
1293
- if (typeof options.onDropActivate === 'function' && state.dropEffect !== 'none') {
1294
- let rect = e.currentTarget.getBoundingClientRect();
1295
- state.dropActivateTimer = setTimeout(() => {
1296
- options.onDropActivate({
1297
- type: 'dropactivate',
1298
- x: state.x - rect.x,
1299
- y: state.y - rect.y
441
+ cancelEvent(e) {
442
+ // Allow default for events that might cancel a click event
443
+ if (!$d69e2bc1de15721f$var$CLICK_EVENTS.includes(e.type)) e.preventDefault();
444
+ e.stopPropagation();
445
+ e.stopImmediatePropagation();
446
+ }
447
+ updateValidDropTargets() {
448
+ if (!this.mutationObserver) return;
449
+ this.mutationObserver.disconnect();
450
+ if (this.restoreAriaHidden) this.restoreAriaHidden();
451
+ this.validDropTargets = $d69e2bc1de15721f$var$findValidDropTargets(this.dragTarget);
452
+ if (this.currentDropTarget && !this.validDropTargets.includes(this.currentDropTarget)) this.setCurrentDropTarget(this.validDropTargets[0]);
453
+ // Find valid drop items within collections
454
+ let types = $c1cba3854dc3a167$export$e1d41611756c6326(this.dragTarget.items);
455
+ let validDropItems = [
456
+ ...$d69e2bc1de15721f$var$dropItems.values()
457
+ ].filter((item)=>{
458
+ if (typeof item.getDropOperation === 'function') return item.getDropOperation(types, this.dragTarget.allowedDropOperations) !== 'cancel';
459
+ return true;
460
+ });
461
+ // Filter out drop targets that contain valid items. We don't want to stop hiding elements
462
+ // other than the drop items that exist inside the collection.
463
+ let visibleDropTargets = this.validDropTargets.filter((target)=>!validDropItems.some((item)=>target.element.contains(item.element)
464
+ )
465
+ );
466
+ this.restoreAriaHidden = $4on3C$reactariaoverlays.ariaHideOutside([
467
+ this.dragTarget.element,
468
+ ...validDropItems.map((item)=>item.element
469
+ ),
470
+ ...visibleDropTargets.map((target)=>target.element
471
+ )
472
+ ]);
473
+ this.mutationObserver.observe(document.body, {
474
+ subtree: true,
475
+ attributes: true,
476
+ attributeFilter: [
477
+ 'aria-hidden'
478
+ ]
1300
479
  });
1301
- }, $db0591c71140b157a950096251935c$var$DROP_ACTIVATE_TIMEOUT);
1302
- }
1303
- };
1304
-
1305
- let onDragEnter = e => {
1306
- e.stopPropagation();
1307
- state.dragEnterCount++;
1308
-
1309
- if (state.dragEnterCount > 1) {
1310
- return;
1311
- }
1312
-
1313
- let allowedOperations = $db0591c71140b157a950096251935c$var$effectAllowedToOperations(e.dataTransfer.effectAllowed);
1314
- let dropOperation = allowedOperations[0];
1315
-
1316
- if (typeof options.getDropOperation === 'function') {
1317
- let types = new $bc29619458500c186021634c18dc$export$DragTypes(e.dataTransfer);
1318
- dropOperation = options.getDropOperation(types, allowedOperations);
1319
- }
1320
-
1321
- if (dropOperation !== 'cancel') {
1322
- setDropTarget(true);
1323
- }
1324
-
1325
- if (typeof options.getDropOperationForPoint === 'function') {
1326
- let types = new $bc29619458500c186021634c18dc$export$DragTypes(e.dataTransfer);
1327
- let rect = e.currentTarget.getBoundingClientRect();
1328
- dropOperation = options.getDropOperationForPoint(types, allowedOperations, e.clientX - rect.x, e.clientY - rect.y);
1329
- }
1330
-
1331
- state.dropEffect = $b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_OPERATION_TO_DROP_EFFECT[dropOperation] || 'none';
1332
- e.dataTransfer.dropEffect = state.dropEffect;
1333
-
1334
- if (typeof options.onDropEnter === 'function' && dropOperation !== 'cancel') {
1335
- let rect = e.currentTarget.getBoundingClientRect();
1336
- options.onDropEnter({
1337
- type: 'dropenter',
1338
- x: e.clientX - rect.x,
1339
- y: e.clientY - rect.y
1340
- });
1341
480
  }
1342
-
1343
- state.x = e.clientX;
1344
- state.y = e.clientY;
1345
- };
1346
-
1347
- let onDragLeave = e => {
1348
- e.stopPropagation();
1349
- state.dragEnterCount--;
1350
-
1351
- if (state.dragEnterCount > 0) {
1352
- return;
481
+ next() {
482
+ if (!this.currentDropTarget) {
483
+ this.setCurrentDropTarget(this.validDropTargets[0]);
484
+ return;
485
+ }
486
+ let index = this.validDropTargets.indexOf(this.currentDropTarget);
487
+ if (index < 0) {
488
+ this.setCurrentDropTarget(this.validDropTargets[0]);
489
+ return;
490
+ }
491
+ // If we've reached the end of the valid drop targets, cycle back to the original drag target.
492
+ // This lets the user cancel the drag in case they don't have an Escape key (e.g. iPad keyboard case).
493
+ if (index === this.validDropTargets.length - 1) {
494
+ if (!this.dragTarget.element.closest('[aria-hidden="true"]')) {
495
+ this.setCurrentDropTarget(null);
496
+ this.dragTarget.element.focus();
497
+ } else this.setCurrentDropTarget(this.validDropTargets[0]);
498
+ } else this.setCurrentDropTarget(this.validDropTargets[index + 1]);
499
+ }
500
+ previous() {
501
+ if (!this.currentDropTarget) {
502
+ this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);
503
+ return;
504
+ }
505
+ let index = this.validDropTargets.indexOf(this.currentDropTarget);
506
+ if (index < 0) {
507
+ this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);
508
+ return;
509
+ }
510
+ // If we've reached the start of the valid drop targets, cycle back to the original drag target.
511
+ // This lets the user cancel the drag in case they don't have an Escape key (e.g. iPad keyboard case).
512
+ if (index === 0) {
513
+ if (!this.dragTarget.element.closest('[aria-hidden="true"]')) {
514
+ this.setCurrentDropTarget(null);
515
+ this.dragTarget.element.focus();
516
+ } else this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);
517
+ } else this.setCurrentDropTarget(this.validDropTargets[index - 1]);
518
+ }
519
+ setCurrentDropTarget(dropTarget, item) {
520
+ if (dropTarget !== this.currentDropTarget) {
521
+ if (this.currentDropTarget && typeof this.currentDropTarget.onDropExit === 'function') {
522
+ let rect = this.currentDropTarget.element.getBoundingClientRect();
523
+ this.currentDropTarget.onDropExit({
524
+ type: 'dropexit',
525
+ x: rect.left + rect.width / 2,
526
+ y: rect.top + rect.height / 2
527
+ });
528
+ }
529
+ this.currentDropTarget = dropTarget;
530
+ if (dropTarget) {
531
+ if (typeof dropTarget.onDropEnter === 'function') {
532
+ let rect = dropTarget.element.getBoundingClientRect();
533
+ dropTarget.onDropEnter({
534
+ type: 'dropenter',
535
+ x: rect.left + rect.width / 2,
536
+ y: rect.top + rect.height / 2
537
+ }, this.dragTarget);
538
+ }
539
+ if (!item) dropTarget?.element.focus();
540
+ }
541
+ }
542
+ if (item !== this.currentDropItem) {
543
+ if (item && typeof this.currentDropTarget.onDropTargetEnter === 'function') this.currentDropTarget.onDropTargetEnter(item?.target);
544
+ item?.element.focus();
545
+ this.currentDropItem = item;
546
+ }
1353
547
  }
1354
-
1355
- if (typeof options.onDropExit === 'function' && state.dropEffect !== 'none') {
1356
- let rect = e.currentTarget.getBoundingClientRect();
1357
- options.onDropExit({
1358
- type: 'dropexit',
1359
- x: e.clientX - rect.x,
1360
- y: e.clientY - rect.y
1361
- });
548
+ end() {
549
+ this.teardown();
550
+ if (typeof this.dragTarget.onDragEnd === 'function') {
551
+ let target = this.currentDropTarget && this.dropOperation !== 'cancel' ? this.currentDropTarget : this.dragTarget;
552
+ let rect = target.element.getBoundingClientRect();
553
+ this.dragTarget.onDragEnd({
554
+ type: 'dragend',
555
+ x: rect.x + rect.width / 2,
556
+ y: rect.y + rect.height / 2,
557
+ dropOperation: this.dropOperation
558
+ });
559
+ }
560
+ this.setCurrentDropTarget(null);
561
+ $d69e2bc1de15721f$var$endDragging();
1362
562
  }
1363
-
1364
- setDropTarget(false);
1365
- clearTimeout(state.dropActivateTimer);
1366
- };
1367
-
1368
- let onDrop = e => {
1369
- e.preventDefault();
1370
- e.stopPropagation();
1371
-
1372
- if (typeof options.onDrop === 'function') {
1373
- let dropOperation = $b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_EFFECT_TO_DROP_OPERATION[state.dropEffect];
1374
- let items = $bc29619458500c186021634c18dc$export$readFromDataTransfer(e.dataTransfer);
1375
- let rect = e.currentTarget.getBoundingClientRect();
1376
- let event = {
1377
- type: 'drop',
1378
- x: e.clientX - rect.x,
1379
- y: e.clientY - rect.y,
1380
- items,
1381
- dropOperation
1382
- }; // Wait a frame to dispatch the drop event so that we ensure the dragend event fires first.
1383
- // Otherwise, if onDrop removes the original dragged element from the DOM, dragend will never be fired.
1384
- // This behavior is consistent across browsers, but see this issue for details:
1385
- // https://bugzilla.mozilla.org/show_bug.cgi?id=460801
1386
-
1387
- setTimeout(() => {
1388
- options.onDrop(event);
1389
- }, 0);
563
+ cancel() {
564
+ this.end();
565
+ if (!this.dragTarget.element.closest('[aria-hidden="true"]')) this.dragTarget.element.focus();
566
+ $4on3C$reactarialiveannouncer.announce(this.formatMessage('dropCanceled'));
1390
567
  }
1391
-
1392
- if (typeof options.onDropExit === 'function') {
1393
- let rect = e.currentTarget.getBoundingClientRect();
1394
- options.onDropExit({
1395
- type: 'dropexit',
1396
- x: e.clientX - rect.x,
1397
- y: e.clientY - rect.y
1398
- });
568
+ drop(item1) {
569
+ if (!this.currentDropTarget) {
570
+ this.cancel();
571
+ return;
572
+ }
573
+ if (typeof item1?.getDropOperation === 'function') {
574
+ let types = $c1cba3854dc3a167$export$e1d41611756c6326(this.dragTarget.items);
575
+ this.dropOperation = item1.getDropOperation(types, this.dragTarget.allowedDropOperations);
576
+ } else if (typeof this.currentDropTarget.getDropOperation === 'function') {
577
+ let types = $c1cba3854dc3a167$export$e1d41611756c6326(this.dragTarget.items);
578
+ this.dropOperation = this.currentDropTarget.getDropOperation(types, this.dragTarget.allowedDropOperations);
579
+ } else // TODO: show menu ??
580
+ this.dropOperation = this.dragTarget.allowedDropOperations[0];
581
+ if (typeof this.currentDropTarget.onDrop === 'function') {
582
+ let items = this.dragTarget.items.map((item)=>({
583
+ kind: 'text',
584
+ types: new Set(Object.keys(item)),
585
+ getText: (type)=>Promise.resolve(item[type])
586
+ })
587
+ );
588
+ let rect = this.currentDropTarget.element.getBoundingClientRect();
589
+ this.currentDropTarget.onDrop({
590
+ type: 'drop',
591
+ x: rect.left + rect.width / 2,
592
+ y: rect.top + rect.height / 2,
593
+ items: items,
594
+ dropOperation: this.dropOperation
595
+ }, item1?.target);
596
+ }
597
+ this.end();
598
+ $4on3C$reactarialiveannouncer.announce(this.formatMessage('dropComplete'));
599
+ }
600
+ activate() {
601
+ if (this.currentDropTarget && typeof this.currentDropTarget.onDropActivate === 'function') {
602
+ let rect = this.currentDropTarget.element.getBoundingClientRect();
603
+ this.currentDropTarget.onDropActivate({
604
+ type: 'dropactivate',
605
+ x: rect.left + rect.width / 2,
606
+ y: rect.top + rect.height / 2
607
+ });
608
+ }
1399
609
  }
610
+ }
611
+ function $d69e2bc1de15721f$var$findValidDropTargets(options) {
612
+ let types = $c1cba3854dc3a167$export$e1d41611756c6326(options.items);
613
+ return [
614
+ ...$d69e2bc1de15721f$var$dropTargets.values()
615
+ ].filter((target)=>{
616
+ if (target.element.closest('[aria-hidden="true"]')) return false;
617
+ if (typeof target.getDropOperation === 'function') return target.getDropOperation(types, options.allowedDropOperations) !== 'cancel';
618
+ return true;
619
+ });
620
+ }
1400
621
 
1401
- state.dragEnterCount = 0;
1402
- setDropTarget(false);
1403
- clearTimeout(state.dropActivateTimer);
1404
- };
1405
622
 
1406
- let optionsRef = useRef(options);
1407
- optionsRef.current = options;
1408
- useLayoutEffect(() => $a75d092e5c30878812fba78e$export$registerDropTarget({
1409
- element: optionsRef.current.ref.current,
1410
- getDropOperation: optionsRef.current.getDropOperation,
1411
623
 
1412
- onDropEnter(e) {
1413
- setDropTarget(true);
624
+ var $a0e2171154b8c4fe$exports = {};
625
+ var $e1076e638f72e513$exports = {};
626
+ $e1076e638f72e513$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"اضغط Enter لبدء السحب.\",\"dragDescriptionTouch\":\"اضغط مرتين لبدء السحب.\",\"dragDescriptionVirtual\":\"انقر لبدء السحب.\",\"dragItem\":\"اسحب {itemText}\",\"dragSelectedItems\":\"اسحب {count, plural, one {# عنصر محدد} other {# عناصر محددة}}\",\"dragStartedKeyboard\":\"بدأ السحب. اضغط Tab للانتقال إلى موضع الإفلات، ثم اضغط Enter للإفلات، أو اضغط Escape للإلغاء.\",\"dragStartedTouch\":\"بدأ السحب. انتقل إلى موضع الإفلات، ثم اضغط مرتين للإفلات.\",\"dragStartedVirtual\":\"بدأ السحب. انتقل إلى مكان الإفلات، ثم انقر أو اضغط Enter للإفلات.\",\"dropCanceled\":\"تم إلغاء الإفلات.\",\"dropComplete\":\"اكتمل الإفلات.\",\"dropDescriptionKeyboard\":\"اضغط Enter للإفلات. اضغط Escape لإلغاء السحب.\",\"dropDescriptionTouch\":\"اضغط مرتين للإفلات.\",\"dropDescriptionVirtual\":\"انقر للإفلات.\",\"dropIndicator\":\"مؤشر الإفلات\",\"dropOnItem\":\"إفلات {itemText}\",\"dropOnRoot\":\"الإفلات\",\"endDragKeyboard\":\"السحب. اضغط Enter لإلغاء السحب.\",\"endDragTouch\":\"السحب. اضغط مرتين لإلغاء السحب.\",\"endDragVirtual\":\"السحب. انقر لإلغاء السحب.\",\"insertAfter\":\"أدخل بعد {itemText}\",\"insertBefore\":\"أدخل قبل {itemText}\",\"insertBetween\":\"أدخل بين {beforeItemText} و {afterItemText}\"}");
1414
627
 
1415
- if (typeof optionsRef.current.onDropEnter === 'function') {
1416
- optionsRef.current.onDropEnter(e);
1417
- }
1418
- },
1419
628
 
1420
- onDropExit(e) {
1421
- setDropTarget(false);
629
+ var $5247825c4c521ecd$exports = {};
630
+ $5247825c4c521ecd$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Натиснете „Enter“, за да започнете да плъзгате.\",\"dragDescriptionTouch\":\"Натиснете двукратно, за да започнете да плъзгате.\",\"dragDescriptionVirtual\":\"Щракнете, за да започнете да плъзгате.\",\"dragItem\":\"Плъзни {itemText}\",\"dragSelectedItems\":\"Плъзни {count, plural, one {# избран елемент} other {# избрани елемента}}\",\"dragStartedKeyboard\":\"Започна плъзгане. Натиснете „Tab“, за да се придвижите до целта, след което натиснете „Enter“ за пускане или натиснете „Escape“ за отмяна.\",\"dragStartedTouch\":\"Започна плъзгане. Придвижете се до целта, след което натиснете двукратно, за да пуснете.\",\"dragStartedVirtual\":\"Започна плъзгане. Придвижете се до целта, след което щракнете или натиснете „Enter“ за пускане.\",\"dropCanceled\":\"Пускането е отменено.\",\"dropComplete\":\"Пускането е завършено.\",\"dropDescriptionKeyboard\":\"Натиснете „Enter“ за пускане. Натиснете „Escape“ за отмяна на плъзгането.\",\"dropDescriptionTouch\":\"Натиснете двукратно за пускане.\",\"dropDescriptionVirtual\":\"Щракнете за пускане.\",\"dropIndicator\":\"индикатор за пускане\",\"dropOnItem\":\"Пусни върху {itemText}\",\"dropOnRoot\":\"Пусни върху\",\"endDragKeyboard\":\"Плъзгане. Натиснете „Enter“ за отмяна на плъзгането.\",\"endDragTouch\":\"Плъзгане. Натиснете двукратно за отмяна на плъзгането.\",\"endDragVirtual\":\"Плъзгане. Щракнете за отмяна.\",\"insertAfter\":\"Вмъкни след {itemText}\",\"insertBefore\":\"Вмъкни преди {itemText}\",\"insertBetween\":\"Вмъкни между {beforeItemText} и {afterItemText}\"}");
1422
631
 
1423
- if (typeof optionsRef.current.onDropExit === 'function') {
1424
- optionsRef.current.onDropExit(e);
1425
- }
1426
- },
1427
632
 
1428
- onDrop(e) {
1429
- if (typeof optionsRef.current.onDrop === 'function') {
1430
- optionsRef.current.onDrop(e);
1431
- }
1432
- },
633
+ var $679c7987be73b33a$exports = {};
634
+ $679c7987be73b33a$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Stisknutím klávesy Enter začnete s přetahováním.\",\"dragDescriptionTouch\":\"Poklepáním začnete s přetahováním.\",\"dragDescriptionVirtual\":\"Kliknutím začnete s přetahováním.\",\"dragItem\":\"Přetáhnout {itemText}\",\"dragSelectedItems\":\"Přetáhnout {count, plural, one {# vybranou položku} few {# vybrané položky} other {# vybraných položek}}\",\"dragStartedKeyboard\":\"Začněte s přetahováním. Po stisknutí klávesy Tab najděte požadovaný cíl a stisknutím klávesy Enter přetažení dokončete nebo stisknutím klávesy Esc akci zrušte.\",\"dragStartedTouch\":\"Začněte s přetahováním. Najděte požadovaný cíl a poklepáním přetažení dokončete.\",\"dragStartedVirtual\":\"Začněte s přetahováním. Najděte požadovaný cíl a kliknutím nebo stisknutím klávesy Enter přetažení dokončete.\",\"dropCanceled\":\"Přetažení bylo zrušeno.\",\"dropComplete\":\"Přetažení bylo dokončeno.\",\"dropDescriptionKeyboard\":\"Stisknutím klávesy Enter přetažení dokončete nebo stisknutím klávesy Esc akci zrušte.\",\"dropDescriptionTouch\":\"Poklepáním přetažení dokončete.\",\"dropDescriptionVirtual\":\"Kliknutím objekt přetáhněte.\",\"dropIndicator\":\"indikátor přetažení\",\"dropOnItem\":\"Přetáhnout na {itemText}\",\"dropOnRoot\":\"Přetáhnout na\",\"endDragKeyboard\":\"Probíhá přetahování. Stisknutím klávesy Enter přetažení zrušíte.\",\"endDragTouch\":\"Probíhá přetahování. Poklepáním přetažení zrušíte.\",\"endDragVirtual\":\"Probíhá přetahování. Kliknutím přetažení zrušíte.\",\"insertAfter\":\"Vložit za {itemText}\",\"insertBefore\":\"Vložit před {itemText}\",\"insertBetween\":\"Vložit mezi {beforeItemText} a {afterItemText}\"}");
1433
635
 
1434
- onDropActivate(e) {
1435
- if (typeof optionsRef.current.onDropActivate === 'function') {
1436
- optionsRef.current.onDropActivate(e);
1437
- }
1438
- }
1439
636
 
1440
- }), [optionsRef]);
1441
- let {
1442
- dropProps
1443
- } = $ca75888e192994dbb11ae05e54$export$useVirtualDrop();
1444
- return {
1445
- dropProps: _babelRuntimeHelpersExtends({}, dropProps, {
1446
- onDragEnter,
1447
- onDragOver,
1448
- onDragLeave,
1449
- onDrop
1450
- }),
1451
- isDropTarget
1452
- };
1453
- }
637
+ var $1c6be209d930911d$exports = {};
638
+ $1c6be209d930911d$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Tryk på Enter for at starte med at trække.\",\"dragDescriptionTouch\":\"Dobbelttryk for at starte med at trække.\",\"dragDescriptionVirtual\":\"Klik for at starte med at trække.\",\"dragItem\":\"Træk {itemText}\",\"dragSelectedItems\":\"Træk {count, plural, one {# valgt element} other {# valgte elementer}}\",\"dragStartedKeyboard\":\"Startet med at trække. Tryk på Tab for at gå til et slip-mål, tryk derefter på Enter for at slippe, eller tryk på Escape for at annullere.\",\"dragStartedTouch\":\"Startet med at trække. Gå til et slip-mål, og dobbelttryk derefter for at slippe.\",\"dragStartedVirtual\":\"Startet med at trække. Gå til et slip-mål, og klik eller tryk derefter på enter for at slippe.\",\"dropCanceled\":\"Slip annulleret.\",\"dropComplete\":\"Slip fuldført.\",\"dropDescriptionKeyboard\":\"Tryk på Enter for at slippe. Tryk på Escape for at annullere trækning.\",\"dropDescriptionTouch\":\"Dobbelttryk for at slippe.\",\"dropDescriptionVirtual\":\"Klik for at slippe.\",\"dropIndicator\":\"slip-indikator\",\"dropOnItem\":\"Slip på {itemText}\",\"dropOnRoot\":\"Slip på\",\"endDragKeyboard\":\"Trækning. Tryk på enter for at annullere træk.\",\"endDragTouch\":\"Trækning. Dobbelttryk for at annullere træk.\",\"endDragVirtual\":\"Trækning. Klik for at annullere trækning.\",\"insertAfter\":\"Indsæt efter {itemText}\",\"insertBefore\":\"Indsæt før {itemText}\",\"insertBetween\":\"Indsæt mellem {beforeItemText} og {afterItemText}\"}");
1454
639
 
1455
- exports.useDrop = useDrop;
1456
640
 
1457
- function $db0591c71140b157a950096251935c$var$effectAllowedToOperations(effectAllowed) {
1458
- let allowedOperationsBits = $b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_OPERATION_ALLOWED[effectAllowed];
1459
- let allowedOperations = [];
641
+ var $0c5c28ae829fbcc5$exports = {};
642
+ $0c5c28ae829fbcc5$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Drücken Sie die Eingabetaste, um den Ziehvorgang zu starten.\",\"dragDescriptionTouch\":\"Tippen Sie doppelt, um den Ziehvorgang zu starten.\",\"dragDescriptionVirtual\":\"Zum Starten des Ziehvorgangs klicken.\",\"dragItem\":\"{itemText} ziehen\",\"dragSelectedItems\":\"{count, plural, one {# ausgewähltes Objekt} other {# ausgewählte Objekte}} ziehen\",\"dragStartedKeyboard\":\"Ziehvorgang gestartet. Drücken Sie die Tabulatortaste, um zu einem Ablegeziel zu navigieren und drücken Sie dann die Eingabetaste, um das Objekt abzulegen, oder Escape, um den Vorgang abzubrechen.\",\"dragStartedTouch\":\"Ziehvorgang gestartet. Navigieren Sie zu einem Ablegeziel und tippen Sie doppelt, um das Objekt abzulegen.\",\"dragStartedVirtual\":\"Ziehvorgang gestartet. Navigieren Sie zu einem Ablegeziel und klicken Sie oder drücken Sie die Eingabetaste, um das Objekt abzulegen.\",\"dropCanceled\":\"Ablegen abgebrochen.\",\"dropComplete\":\"Ablegen abgeschlossen.\",\"dropDescriptionKeyboard\":\"Drücken Sie die Eingabetaste, um das Objekt abzulegen. Drücken Sie Escape, um den Vorgang abzubrechen.\",\"dropDescriptionTouch\":\"Tippen Sie doppelt, um das Objekt abzulegen.\",\"dropDescriptionVirtual\":\"Zum Ablegen klicken.\",\"dropIndicator\":\"Ablegeanzeiger\",\"dropOnItem\":\"Auf {itemText} ablegen\",\"dropOnRoot\":\"Ablegen auf\",\"endDragKeyboard\":\"Ziehvorgang läuft. Drücken Sie die Eingabetaste, um den Vorgang abzubrechen.\",\"endDragTouch\":\"Ziehvorgang läuft. Tippen Sie doppelt, um den Vorgang abzubrechen.\",\"endDragVirtual\":\"Ziehvorgang läuft. Klicken Sie, um den Vorgang abzubrechen.\",\"insertAfter\":\"Nach {itemText} einfügen\",\"insertBefore\":\"Vor {itemText} einfügen\",\"insertBetween\":\"Zwischen {beforeItemText} und {afterItemText} einfügen\"}");
1460
643
 
1461
- if (allowedOperationsBits & $b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_OPERATION.move) {
1462
- allowedOperations.push('move');
1463
- }
1464
644
 
1465
- if (allowedOperationsBits & $b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_OPERATION.copy) {
1466
- allowedOperations.push('copy');
1467
- }
645
+ var $362719e545ebbe59$exports = {};
646
+ $362719e545ebbe59$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Πατήστε Enter για έναρξη της μεταφοράς.\",\"dragDescriptionTouch\":\"Πατήστε δύο φορές για έναρξη της μεταφοράς.\",\"dragDescriptionVirtual\":\"Κάντε κλικ για να ξεκινήσετε τη μεταφορά.\",\"dragItem\":\"Μεταφορά {itemText}\",\"dragSelectedItems\":\"Μεταφορά σε {count, plural, one {# επιλεγμένο στοιχείο} other {# επιλεγμένα στοιχεία}}\",\"dragStartedKeyboard\":\"Η μεταφορά ξεκίνησε. Πατήστε το πλήκτρο Tab για να μεταβείτε σε έναν προορισμό απόθεσης και, στη συνέχεια, πατήστε Enter για απόθεση ή πατήστε Escape για ακύρωση.\",\"dragStartedTouch\":\"Η μεταφορά ξεκίνησε. Μεταβείτε σε έναν προορισμό απόθεσης και, στη συνέχεια, πατήστε δύο φορές για απόθεση.\",\"dragStartedVirtual\":\"Η μεταφορά ξεκίνησε. Μεταβείτε σε έναν προορισμό απόθεσης και, στη συνέχεια, κάντε κλικ ή πατήστε Enter για απόθεση.\",\"dropCanceled\":\"Η απόθεση ακυρώθηκε.\",\"dropComplete\":\"Η απόθεση ολοκληρώθηκε.\",\"dropDescriptionKeyboard\":\"Πατήστε Enter για απόθεση. Πατήστε Escape για ακύρωση της μεταφοράς.\",\"dropDescriptionTouch\":\"Πατήστε δύο φορές για απόθεση.\",\"dropDescriptionVirtual\":\"Κάντε κλικ για απόθεση.\",\"dropIndicator\":\"δείκτης απόθεσης\",\"dropOnItem\":\"Απόθεση σε {itemText}\",\"dropOnRoot\":\"Απόθεση σε\",\"endDragKeyboard\":\"Μεταφορά σε εξέλιξη. Πατήστε Enter για ακύρωση της μεταφοράς.\",\"endDragTouch\":\"Μεταφορά σε εξέλιξη. Πατήστε δύο φορές για ακύρωση της μεταφοράς.\",\"endDragVirtual\":\"Μεταφορά σε εξέλιξη. Κάντε κλικ για ακύρωση της μεταφοράς.\",\"insertAfter\":\"Εισαγωγή μετά από {itemText}\",\"insertBefore\":\"Εισαγωγή πριν από {itemText}\",\"insertBetween\":\"Εισαγωγή μεταξύ {beforeItemText} και {afterItemText}\"}");
1468
647
 
1469
- if (allowedOperationsBits & $b29ea0269b2ea2bf4827b4fa19ddc83e$export$DROP_OPERATION.link) {
1470
- allowedOperations.push('link');
1471
- }
1472
648
 
1473
- return allowedOperations;
1474
- }
649
+ var $bf5ca542ddbd7e1e$exports = {};
650
+ $bf5ca542ddbd7e1e$exports = JSON.parse("{\"dragItem\":\"Drag {itemText}\",\"dragSelectedItems\":\"Drag {count, plural, one {# selected item} other {# selected items}}\",\"dragDescriptionKeyboard\":\"Press Enter to start dragging.\",\"dragDescriptionTouch\":\"Double tap to start dragging.\",\"dragDescriptionVirtual\":\"Click to start dragging.\",\"dragStartedKeyboard\":\"Started dragging. Press Tab to navigate to a drop target, then press Enter to drop, or press Escape to cancel.\",\"dragStartedTouch\":\"Started dragging. Navigate to a drop target, then double tap to drop.\",\"dragStartedVirtual\":\"Started dragging. Navigate to a drop target, then click or press Enter to drop.\",\"endDragKeyboard\":\"Dragging. Press Enter to cancel drag.\",\"endDragTouch\":\"Dragging. Double tap to cancel drag.\",\"endDragVirtual\":\"Dragging. Click to cancel drag.\",\"dropDescriptionKeyboard\":\"Press Enter to drop. Press Escape to cancel drag.\",\"dropDescriptionTouch\":\"Double tap to drop.\",\"dropDescriptionVirtual\":\"Click to drop.\",\"dropCanceled\":\"Drop canceled.\",\"dropComplete\":\"Drop complete.\",\"dropIndicator\":\"drop indicator\",\"dropOnRoot\":\"Drop on\",\"dropOnItem\":\"Drop on {itemText}\",\"insertBefore\":\"Insert before {itemText}\",\"insertBetween\":\"Insert between {beforeItemText} and {afterItemText}\",\"insertAfter\":\"Insert after {itemText}\"}");
1475
651
 
1476
- const $cf2100581419e36b2fe8caccc6dbd4b$var$AUTOSCROLL_AREA_SIZE = 20;
1477
652
 
1478
- function $cf2100581419e36b2fe8caccc6dbd4b$export$useAutoScroll(ref) {
1479
- let scrollableRef = useRef(null);
1480
- useEffect(() => {
1481
- if (ref.current) {
1482
- scrollableRef.current = getScrollParent(ref.current);
1483
- }
1484
- }, [ref]);
1485
- let state = useRef({
1486
- timer: null,
1487
- dx: 0,
1488
- dy: 0
1489
- }).current;
1490
- let scroll = useCallback(() => {
1491
- scrollableRef.current.scrollLeft += state.dx;
1492
- scrollableRef.current.scrollTop += state.dy;
1493
-
1494
- if (state.timer) {
1495
- state.timer = requestAnimationFrame(scroll);
1496
- }
1497
- }, [scrollableRef, state]);
1498
- return {
1499
- move(x, y) {
1500
- // Most browsers auto scroll natively, but WebKit on macOS does not (iOS does 🤷‍♂️).
1501
- // https://bugs.webkit.org/show_bug.cgi?id=222636
1502
- if (!isWebKit() || isIOS() || !scrollableRef.current) {
1503
- return;
1504
- }
653
+ var $249f7c6f2b021a36$exports = {};
654
+ $249f7c6f2b021a36$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Pulse Intro para empezar a arrastrar.\",\"dragDescriptionTouch\":\"Pulse dos veces para iniciar el arrastre.\",\"dragDescriptionVirtual\":\"Haga clic para iniciar el arrastre.\",\"dragItem\":\"Arrastrar {itemText}\",\"dragSelectedItems\":\"Arrastrar {count, plural, one {# elemento seleccionado} other {# elementos seleccionados}}\",\"dragStartedKeyboard\":\"Se ha empezado a arrastrar. Pulse el tabulador para ir al destino de colocación y, a continuación, pulse Intro para soltar, o pulse Escape para cancelar.\",\"dragStartedTouch\":\"Se ha empezado a arrastrar. Vaya al destino de colocación y, a continuación, pulse dos veces para soltar.\",\"dragStartedVirtual\":\"Se ha empezado a arrastrar. Vaya al destino de colocación y, a continuación, haga clic o pulse Intro para soltar.\",\"dropCanceled\":\"Se ha cancelado la colocación.\",\"dropComplete\":\"Colocación finalizada.\",\"dropDescriptionKeyboard\":\"Pulse Intro para soltar. Pulse Escape para cancelar el arrastre.\",\"dropDescriptionTouch\":\"Pulse dos veces para soltar.\",\"dropDescriptionVirtual\":\"Haga clic para soltar.\",\"dropIndicator\":\"indicador de colocación\",\"dropOnItem\":\"Soltar en {itemText}\",\"dropOnRoot\":\"Soltar en\",\"endDragKeyboard\":\"Arrastrando. Pulse Intro para cancelar el arrastre.\",\"endDragTouch\":\"Arrastrando. Pulse dos veces para cancelar el arrastre.\",\"endDragVirtual\":\"Arrastrando. Haga clic para cancelar el arrastre.\",\"insertAfter\":\"Insertar después de {itemText}\",\"insertBefore\":\"Insertar antes de {itemText}\",\"insertBetween\":\"Insertar entre {beforeItemText} y {afterItemText}\"}");
1505
655
 
1506
- let box = scrollableRef.current.getBoundingClientRect();
1507
- let left = $cf2100581419e36b2fe8caccc6dbd4b$var$AUTOSCROLL_AREA_SIZE;
1508
- let top = $cf2100581419e36b2fe8caccc6dbd4b$var$AUTOSCROLL_AREA_SIZE;
1509
- let bottom = box.height - $cf2100581419e36b2fe8caccc6dbd4b$var$AUTOSCROLL_AREA_SIZE;
1510
- let right = box.width - $cf2100581419e36b2fe8caccc6dbd4b$var$AUTOSCROLL_AREA_SIZE;
1511
-
1512
- if (x < left || x > right || y < top || y > bottom) {
1513
- if (x < left) {
1514
- state.dx = x - left;
1515
- } else if (x > right) {
1516
- state.dx = x - right;
1517
- }
1518
656
 
1519
- if (y < top) {
1520
- state.dy = y - top;
1521
- } else if (y > bottom) {
1522
- state.dy = y - bottom;
1523
- }
657
+ var $a306aec76fcd0c95$exports = {};
658
+ $a306aec76fcd0c95$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Lohistamise alustamiseks vajutage klahvi Enter.\",\"dragDescriptionTouch\":\"Topeltpuudutage lohistamise alustamiseks.\",\"dragDescriptionVirtual\":\"Klõpsake lohistamise alustamiseks.\",\"dragItem\":\"Lohista {itemText}\",\"dragSelectedItems\":\"Lohista {count, plural, one {# valitud üksust} other {# valitud üksust}}\",\"dragStartedKeyboard\":\"Alustati lohistamist. Kukutamise sihtmärgi juurde navigeerimiseks vajutage klahvi Tab, seejärel vajutage kukutamiseks klahvi Enter või loobumiseks klahvi Escape.\",\"dragStartedTouch\":\"Alustati lohistamist. Navigeerige kukutamise sihtmärgi juurde ja topeltpuudutage kukutamiseks.\",\"dragStartedVirtual\":\"Alustati lohistamist. Navigeerige kukutamise sihtmärgi juurde ja kukutamiseks klõpsake või vajutage klahvi Enter.\",\"dropCanceled\":\"Lohistamisest loobuti.\",\"dropComplete\":\"Lohistamine on tehtud.\",\"dropDescriptionKeyboard\":\"Kukutamiseks vajutage klahvi Enter. Lohistamisest loobumiseks vajutage klahvi Escape.\",\"dropDescriptionTouch\":\"Kukutamiseks topeltpuudutage.\",\"dropDescriptionVirtual\":\"Kukutamiseks klõpsake.\",\"dropIndicator\":\"lohistamise indikaator\",\"dropOnItem\":\"Kukuta asukohta {itemText}\",\"dropOnRoot\":\"Kukuta asukohta\",\"endDragKeyboard\":\"Lohistamine. Lohistamisest loobumiseks vajutage klahvi Enter.\",\"endDragTouch\":\"Lohistamine. Lohistamisest loobumiseks topeltpuudutage.\",\"endDragVirtual\":\"Lohistamine. Lohistamisest loobumiseks klõpsake.\",\"insertAfter\":\"Sisesta {itemText} järele\",\"insertBefore\":\"Sisesta {itemText} ette\",\"insertBetween\":\"Sisesta {beforeItemText} ja {afterItemText} vahele\"}");
1524
659
 
1525
- if (!state.timer) {
1526
- state.timer = requestAnimationFrame(scroll);
1527
- }
1528
- } else {
1529
- this.stop();
1530
- }
1531
- },
1532
660
 
1533
- stop() {
1534
- if (state.timer) {
1535
- cancelAnimationFrame(state.timer);
1536
- state.timer = null;
1537
- }
1538
- }
661
+ var $6eb0560f4ff183ff$exports = {};
662
+ $6eb0560f4ff183ff$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Aloita vetäminen painamalla Enter-näppäintä.\",\"dragDescriptionTouch\":\"Aloita vetäminen kaksoisnapauttamalla.\",\"dragDescriptionVirtual\":\"Aloita vetäminen napsauttamalla.\",\"dragItem\":\"Vedä kohdetta {itemText}\",\"dragSelectedItems\":\"Vedä {count, plural, one {# valittua kohdetta} other {# valittua kohdetta}}\",\"dragStartedKeyboard\":\"Vetäminen aloitettu. Siirry pudotuskohteeseen painamalla sarkainnäppäintä ja sitten pudota painamalla Enter-näppäintä tai peruuta painamalla Escape-näppäintä.\",\"dragStartedTouch\":\"Vetäminen aloitettu. Siirry pudotuskohteeseen ja pudota kaksoisnapauttamalla.\",\"dragStartedVirtual\":\"Vetäminen aloitettu. Siirry pudotuskohteeseen ja pudota napsauttamalla tai painamalla Enter-näppäintä.\",\"dropCanceled\":\"Pudotus peruutettu.\",\"dropComplete\":\"Pudotus suoritettu.\",\"dropDescriptionKeyboard\":\"Pudota painamalla Enter-näppäintä. Peruuta vetäminen painamalla Escape-näppäintä.\",\"dropDescriptionTouch\":\"Pudota kaksoisnapauttamalla.\",\"dropDescriptionVirtual\":\"Pudota napsauttamalla.\",\"dropIndicator\":\"pudotuksen ilmaisin\",\"dropOnItem\":\"Pudota kohteeseen {itemText}\",\"dropOnRoot\":\"Pudota kohteeseen\",\"endDragKeyboard\":\"Vedetään. Peruuta vetäminen painamalla Enter-näppäintä.\",\"endDragTouch\":\"Vedetään. Peruuta vetäminen kaksoisnapauttamalla.\",\"endDragVirtual\":\"Vedetään. Peruuta vetäminen napsauttamalla.\",\"insertAfter\":\"Lisää kohteen {itemText} jälkeen\",\"insertBefore\":\"Lisää ennen kohdetta {itemText}\",\"insertBetween\":\"Lisää kohteiden {beforeItemText} ja {afterItemText} väliin\"}");
1539
663
 
1540
- };
1541
- }
1542
664
 
1543
- const $ab6d833b5804400cb02efc69c9302a$var$DROP_POSITIONS = ['before', 'on', 'after'];
1544
-
1545
- function useDroppableCollection(props, state, ref) {
1546
- let localState = useRef({
1547
- props,
1548
- state,
1549
- nextTarget: null,
1550
- dropOperation: null
1551
- }).current;
1552
- localState.props = props;
1553
- localState.state = state;
1554
- let autoScroll = $cf2100581419e36b2fe8caccc6dbd4b$export$useAutoScroll(ref);
1555
- let {
1556
- dropProps
1557
- } = useDrop({
1558
- ref,
1559
-
1560
- onDropEnter(e) {
1561
- let target = props.getDropTargetFromPoint(e.x, e.y);
1562
- state.setTarget(target);
1563
- },
665
+ var $a9309d69baecc54a$exports = {};
666
+ $a9309d69baecc54a$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Appuyez sur Entrée pour commencer le déplacement.\",\"dragDescriptionTouch\":\"Touchez deux fois pour commencer le déplacement.\",\"dragDescriptionVirtual\":\"Cliquez pour commencer le déplacement.\",\"dragItem\":\"Déplacer {itemText}\",\"dragSelectedItems\":\"Déplacer {count, plural, one {# élément sélectionné} other {# éléments sélectionnés}}\",\"dragStartedKeyboard\":\"Déplacement commencé. Appuyez sur Tabulation pour accéder à une cible de dépôt, puis appuyez sur Entrée pour déposer, ou appuyez sur Échap pour annuler.\",\"dragStartedTouch\":\"Déplacement commencé. Accédez à une cible de dépôt, puis touchez deux fois pour déposer.\",\"dragStartedVirtual\":\"Déplacement commencé. Accédez à une cible de dépôt, puis cliquez ou appuyez sur Entrée pour déposer.\",\"dropCanceled\":\"Dépôt annulé.\",\"dropComplete\":\"Dépôt terminé.\",\"dropDescriptionKeyboard\":\"Appuyez sur Entrée pour déposer. Appuyez sur Échap pour annuler le déplacement.\",\"dropDescriptionTouch\":\"Touchez deux fois pour déposer.\",\"dropDescriptionVirtual\":\"Cliquez pour déposer.\",\"dropIndicator\":\"indicateur de dépôt\",\"dropOnItem\":\"Déposer sur {itemText}\",\"dropOnRoot\":\"Déposer sur\",\"endDragKeyboard\":\"Déplacement. Appuyez sur Entrée pour annuler le déplacement.\",\"endDragTouch\":\"Déplacement. Touchez deux fois pour annuler le déplacement.\",\"endDragVirtual\":\"Déplacement. Cliquez pour annuler le déplacement.\",\"insertAfter\":\"Insérer après {itemText}\",\"insertBefore\":\"Insérer avant {itemText}\",\"insertBetween\":\"Insérer entre {beforeItemText} et {afterItemText}\"}");
1564
667
 
1565
- onDropMove(e) {
1566
- state.setTarget(localState.nextTarget);
1567
- autoScroll.move(e.x, e.y);
1568
- },
1569
668
 
1570
- getDropOperationForPoint(types, allowedOperations, x, y) {
1571
- let target = props.getDropTargetFromPoint(x, y);
669
+ var $c306e39910a4b3d3$exports = {};
670
+ $c306e39910a4b3d3$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"הקש על Enter כדי להתחיל לגרור.\",\"dragDescriptionTouch\":\"הקש פעמיים כדי להתחיל בגרירה.\",\"dragDescriptionVirtual\":\"לחץ כדי להתחיל לגרור.\",\"dragItem\":\"גרור את {itemText}\",\"dragSelectedItems\":\"גרור {count, plural, one {פריט נבחר #} other {# פריטים שנבחרו}}\",\"dragStartedKeyboard\":\"התחלת לגרור. הקש על Tab כדי לנווט לנקודת הגרירה ולאחר מכן הקש על Enter כדי לשחרר או על Escape כדי לבטל.\",\"dragStartedTouch\":\"התחלת לגרור. נווט לנקודת השחרור ולאחר מכן הקש פעמיים כדי לשחרר.\",\"dragStartedVirtual\":\"התחלת לגרור. נווט לנקודת השחרור ולאחר מכן לחץ או הקש על Enter כדי לשחרר.\",\"dropCanceled\":\"השחרור בוטל.\",\"dropComplete\":\"השחרור הושלם.\",\"dropDescriptionKeyboard\":\"הקש על Enter כדי לשחרר. הקש על Escape כדי לבטל את הגרירה.\",\"dropDescriptionTouch\":\"הקש פעמיים כדי לשחרר.\",\"dropDescriptionVirtual\":\"לחץ כדי לשחרר.\",\"dropIndicator\":\"מחוון שחרור\",\"dropOnItem\":\"שחרר על {itemText}\",\"dropOnRoot\":\"שחרר על\",\"endDragKeyboard\":\"גורר. הקש על Enter כדי לבטל את הגרירה.\",\"endDragTouch\":\"גורר. הקש פעמיים כדי לבטל את הגרירה.\",\"endDragVirtual\":\"גורר. לחץ כדי לבטל את הגרירה.\",\"insertAfter\":\"הוסף אחרי {itemText}\",\"insertBefore\":\"הוסף לפני {itemText}\",\"insertBetween\":\"הוסף בין {beforeItemText} לבין {afterItemText}\"}");
1572
671
 
1573
- if (!target) {
1574
- localState.dropOperation = 'cancel';
1575
- localState.nextTarget = null;
1576
- return 'cancel';
1577
- }
1578
672
 
1579
- if (state.isDropTarget(target)) {
1580
- localState.nextTarget = target;
1581
- return localState.dropOperation;
1582
- }
673
+ var $383c29c6b563fed3$exports = {};
674
+ $383c29c6b563fed3$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Pritisnite Enter da biste počeli povlačiti.\",\"dragDescriptionTouch\":\"Dvaput dodirnite da biste počeli povlačiti.\",\"dragDescriptionVirtual\":\"Kliknite da biste počeli povlačiti.\",\"dragItem\":\"Povucite stavku {itemText}\",\"dragSelectedItems\":\"Povucite {count, plural, one {# odabranu stavku} other {ovoliko odabranih stavki: #}}\",\"dragStartedKeyboard\":\"Počeli ste povlačiti. Pritisnite tipku tabulatora da biste došli do cilja ispuštanja, a zatim Enter da biste ispustili stavku ili Escape da biste prekinuli povlačenje.\",\"dragStartedTouch\":\"Počeli ste povlačiti. Dođite do cilja ispuštanja, a zatim dvaput dodirnite da biste ispustili stavku.\",\"dragStartedVirtual\":\"Počeli ste povlačiti. Dođite do cilja ispuštanja, a zatim kliknite ili pritisnite Enter da biste ispustili stavku.\",\"dropCanceled\":\"Povlačenje je prekinuto.\",\"dropComplete\":\"Ispuštanje je dovršeno.\",\"dropDescriptionKeyboard\":\"Pritisnite Enter da biste ispustili stavku. Pritisnite Escape da biste prekinuli povlačenje.\",\"dropDescriptionTouch\":\"Dvaput dodirnite da biste ispustili stavku.\",\"dropDescriptionVirtual\":\"Kliknite da biste ispustili stavku.\",\"dropIndicator\":\"pokazatelj ispuštanja\",\"dropOnItem\":\"Ispustite na stavku {itemText}\",\"dropOnRoot\":\"Ispustite na\",\"endDragKeyboard\":\"Povlačenje. Pritisnite Enter da biste prekinuli povlačenje.\",\"endDragTouch\":\"Povlačenje. Dvaput dodirnite da biste prekinuli povlačenje.\",\"endDragVirtual\":\"Povlačenje. Kliknite da biste prekinuli povlačenje.\",\"insertAfter\":\"Umetnite iza stavke {itemText}\",\"insertBefore\":\"Ispustite ispred stavke {itemText}\",\"insertBetween\":\"Umetnite između stavki {beforeItemText} i {afterItemText}\"}");
1583
675
 
1584
- localState.dropOperation = state.getDropOperation(target, types, allowedOperations); // If the target doesn't accept the drop, see if the root accepts it instead.
1585
676
 
1586
- if (localState.dropOperation === 'cancel') {
1587
- let rootTarget = {
1588
- type: 'root'
1589
- };
1590
- let dropOperation = state.getDropOperation(rootTarget, types, allowedOperations);
677
+ var $f37e1d1f1c577681$exports = {};
678
+ $f37e1d1f1c577681$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Nyomja le az Enter billentyűt a húzás megkezdéséhez.\",\"dragDescriptionTouch\":\"Koppintson duplán a húzás megkezdéséhez.\",\"dragDescriptionVirtual\":\"Kattintson a húzás megkezdéséhez.\",\"dragItem\":\"{itemText} húzása\",\"dragSelectedItems\":\"{count, plural, one {# kijelölt elem} other {# kijelölt elem}} húzása\",\"dragStartedKeyboard\":\"Húzás megkezdve. Nyomja le a Tab billentyűt az elengedési célhoz navigálásához, majd nyomja le az Enter billentyűt az elengedéshez, vagy nyomja le az Escape billentyűt a megszakításhoz.\",\"dragStartedTouch\":\"Húzás megkezdve. Navigáljon egy elengedési célhoz, majd koppintson duplán az elengedéshez.\",\"dragStartedVirtual\":\"Húzás megkezdve. Navigáljon egy elengedési célhoz, majd kattintson vagy nyomja le az Enter billentyűt az elengedéshez.\",\"dropCanceled\":\"Elengedés megszakítva.\",\"dropComplete\":\"Elengedés teljesítve.\",\"dropDescriptionKeyboard\":\"Nyomja le az Enter billentyűt az elengedéshez. Nyomja le az Escape billentyűt a húzás megszakításához.\",\"dropDescriptionTouch\":\"Koppintson duplán az elengedéshez.\",\"dropDescriptionVirtual\":\"Kattintson az elengedéshez.\",\"dropIndicator\":\"elengedésjelző\",\"dropOnItem\":\"Elengedés erre: {itemText}\",\"dropOnRoot\":\"Elengedés erre:\",\"endDragKeyboard\":\"Húzás folyamatban. Nyomja le az Enter billentyűt a húzás megszakításához.\",\"endDragTouch\":\"Húzás folyamatban. Koppintson duplán a húzás megszakításához.\",\"endDragVirtual\":\"Húzás folyamatban. Kattintson a húzás megszakításához.\",\"insertAfter\":\"Beszúrás {itemText} után\",\"insertBefore\":\"Beszúrás {itemText} elé\",\"insertBetween\":\"Beszúrás {beforeItemText} és {afterItemText} közé\"}");
1591
679
 
1592
- if (dropOperation !== 'cancel') {
1593
- target = rootTarget;
1594
- localState.dropOperation = dropOperation;
1595
- }
1596
- }
1597
680
 
1598
- localState.nextTarget = localState.dropOperation === 'cancel' ? null : target;
1599
- return localState.dropOperation;
1600
- },
681
+ var $57684896b9b64945$exports = {};
682
+ $57684896b9b64945$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Premi Invio per iniziare a trascinare.\",\"dragDescriptionTouch\":\"Tocca due volte per iniziare a trascinare.\",\"dragDescriptionVirtual\":\"Fai clic per iniziare a trascinare.\",\"dragItem\":\"Trascina {itemText}\",\"dragSelectedItems\":\"Trascina {count, plural, one {# altro elemento selezionato} other {# altri elementi selezionati}}\",\"dragStartedKeyboard\":\"Hai iniziato a trascinare. Premi Tab per arrivare sull’area di destinazione, quindi premi Invio per rilasciare o Esc per annullare.\",\"dragStartedTouch\":\"Hai iniziato a trascinare. Arriva sull’area di destinazione, quindi tocca due volte per rilasciare.\",\"dragStartedVirtual\":\"Hai iniziato a trascinare. Arriva sull’area di destinazione, quindi fai clic o premi Invio per rilasciare.\",\"dropCanceled\":\"Rilascio annullato.\",\"dropComplete\":\"Rilascio completato.\",\"dropDescriptionKeyboard\":\"Premi Invio per rilasciare. Premi Esc per annullare.\",\"dropDescriptionTouch\":\"Tocca due volte per rilasciare.\",\"dropDescriptionVirtual\":\"Fai clic per rilasciare.\",\"dropIndicator\":\"indicatore di rilascio\",\"dropOnItem\":\"Rilascia su {itemText}\",\"dropOnRoot\":\"Rilascia su\",\"endDragKeyboard\":\"Trascinamento. Premi Invio per annullare.\",\"endDragTouch\":\"Trascinamento. Tocca due volte per annullare.\",\"endDragVirtual\":\"Trascinamento. Fai clic per annullare.\",\"insertAfter\":\"Inserisci dopo {itemText}\",\"insertBefore\":\"Inserisci prima di {itemText}\",\"insertBetween\":\"Inserisci tra {beforeItemText} e {afterItemText}\"}");
1601
683
 
1602
- onDropExit() {
1603
- state.setTarget(null);
1604
- autoScroll.stop();
1605
- },
1606
684
 
1607
- onDropActivate(e) {
1608
- var _state$target, _state$target2;
685
+ var $124f9b9a50d68f08$exports = {};
686
+ $124f9b9a50d68f08$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Enter キーを押してドラッグを開始してください。\",\"dragDescriptionTouch\":\"ダブルタップしてドラッグを開始します。\",\"dragDescriptionVirtual\":\"クリックしてドラッグを開始します。\",\"dragItem\":\"{itemText} をドラッグ\",\"dragSelectedItems\":\"{count, plural, one {# 個の選択項目} other {# 個の選択項目}} をドラッグ\",\"dragStartedKeyboard\":\"ドラッグを開始します。Tab キーを押してドロップターゲットにいどうし、Enter キーを押してドロップするか、Esc キーを押してキャンセルします。\",\"dragStartedTouch\":\"ドラッグを開始しました。ドロップのターゲットに移動し、ダブルタップしてドロップします。\",\"dragStartedVirtual\":\"ドラッグを開始しました。ドロップのターゲットに移動し、クリックまたは Enter キーを押してドロップします。\",\"dropCanceled\":\"ドロップがキャンセルされました。\",\"dropComplete\":\"ドロップが完了しました。\",\"dropDescriptionKeyboard\":\"Enter キーを押してドロップします。Esc キーを押してドラッグをキャンセルします。\",\"dropDescriptionTouch\":\"ダブルタップしてドロップします。\",\"dropDescriptionVirtual\":\"クリックしてドロップします。\",\"dropIndicator\":\"ドロップインジケーター\",\"dropOnItem\":\"{itemText} にドロップ\",\"dropOnRoot\":\"ドロップ場所\",\"endDragKeyboard\":\"ドラッグしています。Enter キーを押してドラッグをキャンセルします。\",\"endDragTouch\":\"ドラッグしています。ダブルタップしてドラッグをキャンセルします。\",\"endDragVirtual\":\"ドラッグしています。クリックしてドラッグをキャンセルします。\",\"insertAfter\":\"{itemText} の後に挿入\",\"insertBefore\":\"{itemText} の前に挿入\",\"insertBetween\":\"{beforeItemText} と {afterItemText} の間に挿入\"}");
1609
687
 
1610
- if (((_state$target = state.target) == null ? void 0 : _state$target.type) === 'item' && ((_state$target2 = state.target) == null ? void 0 : _state$target2.dropPosition) === 'on' && typeof props.onDropActivate === 'function') {
1611
- props.onDropActivate({
1612
- type: 'dropactivate',
1613
- x: e.x,
1614
- // todo
1615
- y: e.y,
1616
- target: state.target
1617
- });
1618
- }
1619
- },
1620
688
 
1621
- onDrop(e) {
1622
- if (state.target && typeof props.onDrop === 'function') {
1623
- onDrop(e, state.target);
1624
- }
1625
- }
689
+ var $4e7a70c1eb8efae2$exports = {};
690
+ $4e7a70c1eb8efae2$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"드래그를 시작하려면 Enter를 누르세요.\",\"dragDescriptionTouch\":\"드래그를 시작하려면 더블 탭하세요.\",\"dragDescriptionVirtual\":\"드래그를 시작하려면 클릭하세요.\",\"dragItem\":\"{itemText} 드래그\",\"dragSelectedItems\":\"{count, plural, one {#개 선택 항목} other {#개 선택 항목}} 드래그\",\"dragStartedKeyboard\":\"드래그가 시작되었습니다. Tab을 눌러 드롭 대상으로 이동한 다음 Enter를 눌러 드롭하거나 Esc를 눌러 취소하세요.\",\"dragStartedTouch\":\"드래그가 시작되었습니다. 드롭 대상으로 이동한 다음 더블 탭하여 드롭하세요.\",\"dragStartedVirtual\":\"드래그가 시작되었습니다. 드롭 대상으로 이동한 다음 클릭하거나 Enter를 눌러 드롭하세요.\",\"dropCanceled\":\"드롭이 취소되었습니다.\",\"dropComplete\":\"드롭이 완료되었습니다.\",\"dropDescriptionKeyboard\":\"드롭하려면 Enter를 누르세요. 드래그를 취소하려면 Esc를 누르세요.\",\"dropDescriptionTouch\":\"더블 탭하여 드롭하세요.\",\"dropDescriptionVirtual\":\"드롭하려면 클릭하세요.\",\"dropIndicator\":\"드롭 표시기\",\"dropOnItem\":\"{itemText}에 드롭\",\"dropOnRoot\":\"드롭 대상\",\"endDragKeyboard\":\"드래그 중입니다. 드래그를 취소하려면 Enter를 누르세요.\",\"endDragTouch\":\"드래그 중입니다. 드래그를 취소하려면 더블 탭하세요.\",\"endDragVirtual\":\"드래그 중입니다. 드래그를 취소하려면 클릭하세요.\",\"insertAfter\":\"{itemText} 이후에 삽입\",\"insertBefore\":\"{itemText} 이전에 삽입\",\"insertBetween\":\"{beforeItemText} 및 {afterItemText} 사이에 삽입\"}");
1626
691
 
1627
- });
1628
- let droppingState = useRef(null);
1629
- let onDrop = useCallback((e, target) => {
1630
- let {
1631
- state
1632
- } = localState; // Focus the collection.
1633
-
1634
- state.selectionManager.setFocused(true); // Save some state of the collection/selection before the drop occurs so we can compare later.
1635
-
1636
- let focusedKey = state.selectionManager.focusedKey;
1637
- droppingState.current = {
1638
- timeout: null,
1639
- focusedKey,
1640
- collection: state.collection,
1641
- selectedKeys: state.selectionManager.selectedKeys
1642
- };
1643
- localState.props.onDrop({
1644
- type: 'drop',
1645
- x: e.x,
1646
- // todo
1647
- y: e.y,
1648
- target,
1649
- items: e.items,
1650
- dropOperation: e.dropOperation
1651
- }); // Wait for a short time period after the onDrop is called to allow the data to be read asynchronously
1652
- // and for React to re-render. If an insert occurs during this time, it will be selected/focused below.
1653
- // If items are not "immediately" inserted by the onDrop handler, the application will need to handle
1654
- // selecting and focusing those items themselves.
1655
-
1656
- droppingState.current.timeout = setTimeout(() => {
1657
- // If focus didn't move already (e.g. due to an insert), and the user dropped on an item,
1658
- // focus that item and show the focus ring to give the user feedback that the drop occurred.
1659
- // Also show the focus ring if the focused key is not selected, e.g. in case of a reorder.
1660
- let {
1661
- state
1662
- } = localState;
1663
-
1664
- if (state.selectionManager.focusedKey === focusedKey) {
1665
- if (target.type === 'item' && target.dropPosition === 'on' && state.collection.getItem(target.key) != null) {
1666
- state.selectionManager.setFocusedKey(target.key);
1667
- state.selectionManager.setFocused(true);
1668
- setInteractionModality('keyboard');
1669
- } else if (!state.selectionManager.isSelected(focusedKey)) {
1670
- setInteractionModality('keyboard');
1671
- }
1672
- }
1673
692
 
1674
- droppingState.current = null;
1675
- }, 50);
1676
- }, [localState]); // eslint-disable-next-line arrow-body-style
693
+ var $18a908ad59f24b71$exports = {};
694
+ $18a908ad59f24b71$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Paspauskite „Enter“, kad pradėtumėte vilkti.\",\"dragDescriptionTouch\":\"Palieskite dukart, kad pradėtumėte vilkti.\",\"dragDescriptionVirtual\":\"Spustelėkite, kad pradėtumėte vilkti.\",\"dragItem\":\"Vilkti {itemText}\",\"dragSelectedItems\":\"Vilkti {count, plural, one {# pasirinktą elementą} other {# pasirinktus elementus}}\",\"dragStartedKeyboard\":\"Pradėta vilkti. Paspauskite „Tab“, kad pereitumėte į tiesioginę paskirties vietą, tada paspauskite „Enter“, kad numestumėte, arba „Escape“, kad atšauktumėte.\",\"dragStartedTouch\":\"Pradėta vilkti. Eikite į tiesioginę paskirties vietą, tada palieskite dukart, kad numestumėte.\",\"dragStartedVirtual\":\"Pradėta vilkti. Eikite į tiesioginę paskirties vietą ir spustelėkite arba paspauskite „Enter“, kad numestumėte.\",\"dropCanceled\":\"Numetimas atšauktas.\",\"dropComplete\":\"Numesta.\",\"dropDescriptionKeyboard\":\"Paspauskite „Enter“, kad numestumėte. Paspauskite „Escape“, kad atšauktumėte vilkimą.\",\"dropDescriptionTouch\":\"Palieskite dukart, kad numestumėte.\",\"dropDescriptionVirtual\":\"Spustelėkite, kad numestumėte.\",\"dropIndicator\":\"numetimo indikatorius\",\"dropOnItem\":\"Numesti ant {itemText}\",\"dropOnRoot\":\"Numesti ant\",\"endDragKeyboard\":\"Velkama. Paspauskite „Enter“, kad atšauktumėte vilkimą.\",\"endDragTouch\":\"Velkama. Spustelėkite dukart, kad atšauktumėte vilkimą.\",\"endDragVirtual\":\"Velkama. Spustelėkite, kad atšauktumėte vilkimą.\",\"insertAfter\":\"Įterpti po {itemText}\",\"insertBefore\":\"Įterpti prieš {itemText}\",\"insertBetween\":\"Įterpti tarp {beforeItemText} ir {afterItemText}\"}");
1677
695
 
1678
- useEffect(() => {
1679
- return () => {
1680
- if (droppingState.current) {
1681
- clearTimeout(droppingState.current.timeout);
1682
- }
1683
- };
1684
- }, []);
1685
- useLayoutEffect(() => {
1686
- // If an insert occurs during a drop, we want to immediately select these items to give
1687
- // feedback to the user that a drop occurred. Only do this if the selection didn't change
1688
- // since the drop started so we don't override if the user or application did something.
1689
- if (droppingState.current && state.selectionManager.isFocused && state.collection.size > droppingState.current.collection.size && state.selectionManager.isSelectionEqual(droppingState.current.selectedKeys)) {
1690
- let newKeys = new Set();
1691
-
1692
- for (let key of state.collection.getKeys()) {
1693
- if (!droppingState.current.collection.getItem(key)) {
1694
- newKeys.add(key);
1695
- }
1696
- }
1697
696
 
1698
- state.selectionManager.setSelectedKeys(newKeys); // If the focused item didn't change since the drop occurred, also focus the first
1699
- // inserted item. If selection is disabled, then also show the focus ring so there
1700
- // is some indication that items were added.
697
+ var $e9b69ae5de94453e$exports = {};
698
+ $e9b69ae5de94453e$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Nospiediet Enter, lai sāktu vilkšanu.\",\"dragDescriptionTouch\":\"Veiciet dubultskārienu, lai sāktu vilkšanu.\",\"dragDescriptionVirtual\":\"Noklikšķiniet, lai sāktu vilkšanu.\",\"dragItem\":\"Velciet {itemText}\",\"dragSelectedItems\":\"Velciet {count, plural, one {# atlasīto vienumu} other {# atlasītos vienumus}}\",\"dragStartedKeyboard\":\"Uzsākta vilkšana. Nospiediet taustiņu Tab, lai pārietu uz nomešanas mērķi, pēc tam nospiediet Enter, lai nomestu, vai nospiediet Escape, lai atceltu.\",\"dragStartedTouch\":\"Uzsākta vilkšana. Pārejiet uz nomešanas mērķi, pēc tam veiciet dubultskārienu, lai nomestu.\",\"dragStartedVirtual\":\"Uzsākta vilkšana. Pārejiet uz nomešanas mērķi, pēc tam nospiediet Enter, lai nomestu.\",\"dropCanceled\":\"Nomešana atcelta.\",\"dropComplete\":\"Nomešana pabeigta.\",\"dropDescriptionKeyboard\":\"Nospiediet Enter, lai nomestu. Nospiediet Escape, lai atceltu vilkšanu.\",\"dropDescriptionTouch\":\"Veiciet dubultskārienu, lai nomestu.\",\"dropDescriptionVirtual\":\"Noklikšķiniet, lai nomestu.\",\"dropIndicator\":\"nomešanas indikators\",\"dropOnItem\":\"Nometiet uz {itemText}\",\"dropOnRoot\":\"Nometiet uz\",\"endDragKeyboard\":\"Notiek vilkšana. Nospiediet Enter, lai atceltu vilkšanu.\",\"endDragTouch\":\"Notiek vilkšana. Veiciet dubultskārienu, lai atceltu vilkšanu.\",\"endDragVirtual\":\"Notiek vilkšana. Noklikšķiniet, lai atceltu vilkšanu.\",\"insertAfter\":\"Ievietojiet pēc {itemText}\",\"insertBefore\":\"Ievietojiet pirms {itemText}\",\"insertBetween\":\"Ievietojiet starp {beforeItemText} un {afterItemText}\"}");
1701
699
 
1702
- if (state.selectionManager.focusedKey === droppingState.current.focusedKey) {
1703
- let first = newKeys.keys().next().value;
1704
- state.selectionManager.setFocusedKey(first);
1705
700
 
1706
- if (state.selectionManager.selectionMode === 'none') {
1707
- setInteractionModality('keyboard');
1708
- }
1709
- }
701
+ var $28e302ddfe8a4bf5$exports = {};
702
+ $28e302ddfe8a4bf5$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Trykk på Enter for å begynne å dra.\",\"dragDescriptionTouch\":\"Dobbelttrykk for å begynne å dra.\",\"dragDescriptionVirtual\":\"Klikk for å begynne å dra.\",\"dragItem\":\"Dra {itemText}\",\"dragSelectedItems\":\"Dra {count, plural, one {# merket element} other {# merkede elementer}}\",\"dragStartedKeyboard\":\"Begynte å dra. Trykk på Tab for å navigere til et mål, og trykk deretter på Enter for å slippe eller på Esc for å avbryte.\",\"dragStartedTouch\":\"Begynte å dra. Naviger til et mål, og dobbelttrykk for å slippe.\",\"dragStartedVirtual\":\"Begynte å dra. Naviger til et mål, og klikk eller trykk på Enter for å slippe.\",\"dropCanceled\":\"Avbrøt slipping.\",\"dropComplete\":\"Slippingen er fullført.\",\"dropDescriptionKeyboard\":\"Trykk på Enter for å slippe. Trykk på Esc hvis du vil avbryte draingen.\",\"dropDescriptionTouch\":\"Dobbelttrykk for å slippe.\",\"dropDescriptionVirtual\":\"Klikk for å slippe.\",\"dropIndicator\":\"slippeindikator\",\"dropOnItem\":\"Slipp på {itemText}\",\"dropOnRoot\":\"Slipp på\",\"endDragKeyboard\":\"Drar. Trykk på Enter hvis du vil avbryte.\",\"endDragTouch\":\"Drar. Dobbelttrykk hvis du vil avbryte.\",\"endDragVirtual\":\"Drar. Klikk hvis du vil avbryte.\",\"insertAfter\":\"Sett inn etter {itemText}\",\"insertBefore\":\"Sett inn før {itemText}\",\"insertBetween\":\"Sett inn mellom {beforeItemText} og {afterItemText}\"}");
1710
703
 
1711
- droppingState.current = null;
1712
- }
1713
- });
1714
- useEffect(() => {
1715
- let getNextTarget = function getNextTarget(target, wrap) {
1716
- if (wrap === void 0) {
1717
- wrap = true;
1718
- }
1719
704
 
1720
- if (!target) {
1721
- return {
1722
- type: 'root'
1723
- };
1724
- }
705
+ var $8b329d015984c2b2$exports = {};
706
+ $8b329d015984c2b2$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Druk op Enter om te slepen.\",\"dragDescriptionTouch\":\"Dubbeltik om te slepen.\",\"dragDescriptionVirtual\":\"Klik om met slepen te starten.\",\"dragItem\":\"{itemText} slepen\",\"dragSelectedItems\":\"{count, plural, one {# geselecteerd item} other {# geselecteerde items}} slepen\",\"dragStartedKeyboard\":\"Begonnen met slepen. Druk op Tab om naar een locatie te gaan. Druk dan op Enter om neer te zetten, of op Esc om te annuleren.\",\"dragStartedTouch\":\"Begonnen met slepen. Ga naar de gewenste locatie en dubbeltik om neer te zetten.\",\"dragStartedVirtual\":\"Begonnen met slepen. Ga naar de gewenste locatie en klik of druk op Enter om neer te zetten.\",\"dropCanceled\":\"Neerzetten geannuleerd.\",\"dropComplete\":\"Neerzetten voltooid.\",\"dropDescriptionKeyboard\":\"Druk op Enter om neer te zetten. Druk op Esc om het slepen te annuleren.\",\"dropDescriptionTouch\":\"Dubbeltik om neer te zetten.\",\"dropDescriptionVirtual\":\"Klik om neer te zetten.\",\"dropIndicator\":\"aanwijzer voor neerzetten\",\"dropOnItem\":\"Neerzetten op {itemText}\",\"dropOnRoot\":\"Neerzetten op\",\"endDragKeyboard\":\"Bezig met slepen. Druk op Enter om te annuleren.\",\"endDragTouch\":\"Bezig met slepen. Dubbeltik om te annuleren.\",\"endDragVirtual\":\"Bezig met slepen. Klik om te annuleren.\",\"insertAfter\":\"Plaatsen na {itemText}\",\"insertBefore\":\"Plaatsen vóór {itemText}\",\"insertBetween\":\"Plaatsen tussen {beforeItemText} en {afterItemText}\"}");
1725
707
 
1726
- let {
1727
- keyboardDelegate
1728
- } = localState.props;
1729
- let nextKey = target.type === 'item' ? keyboardDelegate.getKeyBelow(target.key) : keyboardDelegate.getFirstKey();
1730
- let dropPosition = 'before';
1731
708
 
1732
- if (target.type === 'item') {
1733
- let positionIndex = $ab6d833b5804400cb02efc69c9302a$var$DROP_POSITIONS.indexOf(target.dropPosition);
1734
- let nextDropPosition = $ab6d833b5804400cb02efc69c9302a$var$DROP_POSITIONS[positionIndex + 1];
709
+ var $32ac997d901e8006$exports = {};
710
+ $32ac997d901e8006$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Naciśnij Enter, aby rozpocząć przeciąganie.\",\"dragDescriptionTouch\":\"Dotknij dwukrotnie, aby rozpocząć przeciąganie.\",\"dragDescriptionVirtual\":\"Kliknij, aby rozpocząć przeciąganie.\",\"dragItem\":\"Przeciągnij {itemText}\",\"dragSelectedItems\":\"Przeciągnij {count, plural, one {# wybrany element} other {# wybranych elementów}}\",\"dragStartedKeyboard\":\"Rozpoczęto przeciąganie. Naciśnij Tab, aby wybrać miejsce docelowe, a następnie naciśnij Enter, aby upuścić, lub Escape, aby anulować.\",\"dragStartedTouch\":\"Rozpoczęto przeciąganie. Wybierz miejsce, w którym chcesz upuścić element, a następnie dotknij dwukrotnie, aby upuścić.F\",\"dragStartedVirtual\":\"Rozpoczęto przeciąganie. Wybierz miejsce, w którym chcesz upuścić element, a następnie kliknij lub naciśnij Enter, aby upuścić.\",\"dropCanceled\":\"Anulowano upuszczenie.\",\"dropComplete\":\"Zakończono upuszczanie.\",\"dropDescriptionKeyboard\":\"Naciśnij Enter, aby upuścić. Naciśnij Escape, aby anulować przeciągnięcie.\",\"dropDescriptionTouch\":\"Dotknij dwukrotnie, aby upuścić.\",\"dropDescriptionVirtual\":\"Kliknij, aby upuścić.\",\"dropIndicator\":\"wskaźnik upuszczenia\",\"dropOnItem\":\"Upuść na {itemText}\",\"dropOnRoot\":\"Upuść\",\"endDragKeyboard\":\"Przeciąganie. Naciśnij Enter, aby anulować przeciągnięcie.\",\"endDragTouch\":\"Przeciąganie. Kliknij dwukrotnie, aby anulować przeciągnięcie.\",\"endDragVirtual\":\"Przeciąganie. Kliknij, aby anulować przeciąganie.\",\"insertAfter\":\"Umieść za {itemText}\",\"insertBefore\":\"Umieść przed {itemText}\",\"insertBetween\":\"Umieść między {beforeItemText} i {afterItemText}\"}");
1735
711
 
1736
- if (positionIndex < $ab6d833b5804400cb02efc69c9302a$var$DROP_POSITIONS.length - 1 && !(nextDropPosition === 'after' && nextKey != null)) {
1737
- return {
1738
- type: 'item',
1739
- key: target.key,
1740
- dropPosition: nextDropPosition
1741
- };
1742
- } // If the last drop position was 'after', then 'before' on the next key is equivalent.
1743
- // Switch to 'on' instead.
1744
712
 
713
+ var $980d9cf229cf60df$exports = {};
714
+ $980d9cf229cf60df$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Pressione Enter para começar a arrastar.\",\"dragDescriptionTouch\":\"Toque duas vezes para começar a arrastar.\",\"dragDescriptionVirtual\":\"Clique para começar a arrastar.\",\"dragItem\":\"Arrastar {itemText}\",\"dragSelectedItems\":\"Arrastar {count, plural, one {# item selecionado} other {# itens selecionados}}\",\"dragStartedKeyboard\":\"Comece a arrastar. Pressione Tab para navegar até um alvo e, em seguida, pressione Enter para soltar ou pressione Escape para cancelar.\",\"dragStartedTouch\":\"Comece a arrastar. Navegue até um alvo e toque duas vezes para soltar.\",\"dragStartedVirtual\":\"Comece a arrastar. Navegue até um alvo e clique ou pressione Enter para soltar.\",\"dropCanceled\":\"Liberação cancelada.\",\"dropComplete\":\"Liberação concluída.\",\"dropDescriptionKeyboard\":\"Pressione Enter para soltar. Pressione Escape para cancelar.\",\"dropDescriptionTouch\":\"Toque duas vezes para soltar.\",\"dropDescriptionVirtual\":\"Clique para soltar.\",\"dropIndicator\":\"indicador de liberação\",\"dropOnItem\":\"Soltar em {itemText}\",\"dropOnRoot\":\"Soltar\",\"endDragKeyboard\":\"Arrastando. Pressione Enter para cancelar.\",\"endDragTouch\":\"Arrastando. Toque duas vezes para cancelar.\",\"endDragVirtual\":\"Arrastando. Clique para cancelar.\",\"insertAfter\":\"Inserir após {itemText}\",\"insertBefore\":\"Inserir antes de {itemText}\",\"insertBetween\":\"Inserir entre {beforeItemText} e {afterItemText}\"}");
1745
715
 
1746
- if (target.dropPosition === 'after') {
1747
- dropPosition = 'on';
1748
- }
1749
- }
1750
716
 
1751
- if (nextKey == null) {
1752
- if (wrap) {
1753
- return {
1754
- type: 'root'
1755
- };
1756
- }
717
+ var $429c069033ac65fb$exports = {};
718
+ $429c069033ac65fb$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Prima Enter para iniciar o arrasto.\",\"dragDescriptionTouch\":\"Faça duplo toque para começar a arrastar.\",\"dragDescriptionVirtual\":\"Clique para iniciar o arrasto.\",\"dragItem\":\"Arrastar {itemText}\",\"dragSelectedItems\":\"Arrastar {count, plural, one {# item selecionado} outro {# itens selecionados}}\",\"dragStartedKeyboard\":\"Arrasto iniciado. Prima a tecla de tabulação para navegar para um destino para largar, e em seguida prima Enter para largar ou prima Escape para cancelar.\",\"dragStartedTouch\":\"Arrasto iniciado. Navegue para um destino para largar, e em seguida faça duplo toque para largar.\",\"dragStartedVirtual\":\"Arrasto iniciado. Navegue para um destino para largar, e em seguida clique ou prima Enter para largar.\",\"dropCanceled\":\"Largar cancelado.\",\"dropComplete\":\"Largar completo.\",\"dropDescriptionKeyboard\":\"Prima Enter para largar. Prima Escape para cancelar o arrasto.\",\"dropDescriptionTouch\":\"Faça duplo toque para largar.\",\"dropDescriptionVirtual\":\"Clique para largar.\",\"dropIndicator\":\"Indicador de largar\",\"dropOnItem\":\"Largar em {itemText}\",\"dropOnRoot\":\"Largar em\",\"endDragKeyboard\":\"A arrastar. Prima Enter para cancelar o arrasto.\",\"endDragTouch\":\"A arrastar. Faça duplo toque para cancelar o arrasto.\",\"endDragVirtual\":\"A arrastar. Clique para cancelar o arrasto.\",\"insertAfter\":\"Inserir depois de {itemText}\",\"insertBefore\":\"Inserir antes de {itemText}\",\"insertBetween\":\"Inserir entre {beforeItemText} e {afterItemText}\"}");
1757
719
 
1758
- return null;
1759
- }
1760
720
 
1761
- return {
1762
- type: 'item',
1763
- key: nextKey,
1764
- dropPosition
1765
- };
1766
- };
721
+ var $5944d5a872573520$exports = {};
722
+ $5944d5a872573520$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Apăsați pe Enter pentru a începe glisarea.\",\"dragDescriptionTouch\":\"Atingeți de două ori pentru a începe să glisați.\",\"dragDescriptionVirtual\":\"Faceți clic pentru a începe glisarea.\",\"dragItem\":\"Glisați {itemText}\",\"dragSelectedItems\":\"Glisați {count, plural, one {# element selectat} other {# elemente selectate}}\",\"dragStartedKeyboard\":\"A început glisarea. Apăsați pe Tab pentru a naviga la o țintă de fixare, apoi apăsați pe Enter pentru a fixa sau apăsați pe Escape pentru a anula glisarea.\",\"dragStartedTouch\":\"A început glisarea. Navigați la o țintă de fixare, apoi atingeți de două ori pentru a fixa.\",\"dragStartedVirtual\":\"A început glisarea. Navigați la o țintă de fixare, apoi faceți clic sau apăsați pe Enter pentru a fixa.\",\"dropCanceled\":\"Fixare anulată.\",\"dropComplete\":\"Fixare finalizată.\",\"dropDescriptionKeyboard\":\"Apăsați pe Enter pentru a fixa. Apăsați pe Escape pentru a anula glisarea.\",\"dropDescriptionTouch\":\"Atingeți de două ori pentru a fixa.\",\"dropDescriptionVirtual\":\"Faceți clic pentru a fixa.\",\"dropIndicator\":\"indicator de fixare\",\"dropOnItem\":\"Fixați pe {itemText}\",\"dropOnRoot\":\"Fixare pe\",\"endDragKeyboard\":\"Se glisează. Apăsați pe Enter pentru a anula glisarea.\",\"endDragTouch\":\"Se glisează. Atingeți de două ori pentru a anula glisarea.\",\"endDragVirtual\":\"Se glisează. Faceți clic pentru a anula glisarea.\",\"insertAfter\":\"Inserați după {itemText}\",\"insertBefore\":\"Inserați înainte de {itemText}\",\"insertBetween\":\"Inserați între {beforeItemText} și {afterItemText}\"}");
1767
723
 
1768
- let getPreviousTarget = function getPreviousTarget(target, wrap) {
1769
- if (wrap === void 0) {
1770
- wrap = true;
1771
- }
1772
724
 
1773
- let {
1774
- keyboardDelegate
1775
- } = localState.props;
1776
- let nextKey = (target == null ? void 0 : target.type) === 'item' ? keyboardDelegate.getKeyAbove(target.key) : keyboardDelegate.getLastKey();
1777
- let dropPosition = !target || target.type === 'root' ? 'after' : 'on';
725
+ var $5bd34815177e0598$exports = {};
726
+ $5bd34815177e0598$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Нажмите клавишу Enter для начала перетаскивания.\",\"dragDescriptionTouch\":\"Дважды нажмите для начала перетаскивания.\",\"dragDescriptionVirtual\":\"Щелкните для начала перетаскивания.\",\"dragItem\":\"Перетащить {itemText}\",\"dragSelectedItems\":\"Перетащить {count, plural, one {# выбранный элемент} other {# выбранных элем}}\",\"dragStartedKeyboard\":\"Начато перетаскивание. Нажмите клавишу Tab для выбора цели, затем нажмите клавишу Enter, чтобы применить перетаскивание, или клавишу Escape для отмены действия.\",\"dragStartedTouch\":\"Начато перетаскивание. Выберите цель, затем дважды нажмите, чтобы применить перетаскивание.\",\"dragStartedVirtual\":\"Начато перетаскивание. Нажмите клавишу Tab для выбора цели, затем нажмите клавишу Enter, чтобы применить перетаскивание.\",\"dropCanceled\":\"Перетаскивание отменено.\",\"dropComplete\":\"Перетаскивание завершено.\",\"dropDescriptionKeyboard\":\"Нажмите клавишу Enter, чтобы применить перетаскивание. Нажмите клавишу Escape для отмены.\",\"dropDescriptionTouch\":\"Дважды нажмите, чтобы применить перетаскивание.\",\"dropDescriptionVirtual\":\"Щелкните, чтобы применить перетаскивание.\",\"dropIndicator\":\"индикатор перетаскивания\",\"dropOnItem\":\"Перетащить на {itemText}\",\"dropOnRoot\":\"Перетащить на\",\"endDragKeyboard\":\"Перетаскивание. Нажмите клавишу Enter для отмены.\",\"endDragTouch\":\"Перетаскивание. Дважды нажмите для отмены.\",\"endDragVirtual\":\"Перетаскивание. Щелкните для отмены.\",\"insertAfter\":\"Вставить после {itemText}\",\"insertBefore\":\"Вставить перед {itemText}\",\"insertBetween\":\"Вставить между {beforeItemText} и {afterItemText}\"}");
1778
727
 
1779
- if ((target == null ? void 0 : target.type) === 'item') {
1780
- let positionIndex = $ab6d833b5804400cb02efc69c9302a$var$DROP_POSITIONS.indexOf(target.dropPosition);
1781
- let nextDropPosition = $ab6d833b5804400cb02efc69c9302a$var$DROP_POSITIONS[positionIndex - 1];
1782
728
 
1783
- if (positionIndex > 0 && nextDropPosition !== 'after') {
1784
- return {
1785
- type: 'item',
1786
- key: target.key,
1787
- dropPosition: nextDropPosition
1788
- };
1789
- } // If the last drop position was 'before', then 'after' on the previous key is equivalent.
1790
- // Switch to 'on' instead.
729
+ var $fd4fe85d82ae4b8e$exports = {};
730
+ $fd4fe85d82ae4b8e$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Stlačením klávesu Enter začnete presúvanie.\",\"dragDescriptionTouch\":\"Dvojitým kliknutím začnete presúvanie.\",\"dragDescriptionVirtual\":\"Kliknutím začnete presúvanie.\",\"dragItem\":\"Presunúť položku {itemText}\",\"dragSelectedItems\":\"Presunúť {count, plural, one {# vybratú položku} other {# vybraté položky}}\",\"dragStartedKeyboard\":\"Presúvanie sa začalo. Do cieľového umiestnenia prejdete stlačením klávesu Tab. Ak chcete položku umiestniť, stlačte kláves Enter alebo stlačte kláves Esc, ak chcete presúvanie zrušiť.\",\"dragStartedTouch\":\"Presúvanie sa začalo. Prejdite na cieľové umiestnenie a dvojitým kliknutím umiestnite položku.\",\"dragStartedVirtual\":\"Presúvanie sa začalo. Prejdite na cieľové umiestnenie a kliknutím alebo stlačením klávesu Enter umiestnite položku.\",\"dropCanceled\":\"Umiestnenie zrušené.\",\"dropComplete\":\"Umiestnenie dokončené.\",\"dropDescriptionKeyboard\":\"Stlačením klávesu Enter umiestnite položku. Stlačením klávesu Esc zrušíte presúvanie.\",\"dropDescriptionTouch\":\"Dvojitým kliknutím umiestnite položku.\",\"dropDescriptionVirtual\":\"Kliknutím umiestnite položku.\",\"dropIndicator\":\"indikátor umiestnenia\",\"dropOnItem\":\"Umiestniť na položku {itemText}\",\"dropOnRoot\":\"Umiestniť na\",\"endDragKeyboard\":\"Prebieha presúvanie. Ak ho chcete zrušiť, stlačte kláves Enter.\",\"endDragTouch\":\"Prebieha presúvanie. Dvojitým kliknutím ho môžete zrušiť.\",\"endDragVirtual\":\"Prebieha presúvanie.\",\"insertAfter\":\"Vložiť za položku {itemText}\",\"insertBefore\":\"Vložiť pred položku {itemText}\",\"insertBetween\":\"Vložiť medzi položky {beforeItemText} a {afterItemText}\"}");
1791
731
 
1792
732
 
1793
- if (target.dropPosition === 'before') {
1794
- dropPosition = 'on';
1795
- }
1796
- }
733
+ var $165d6bd72ce97cf9$exports = {};
734
+ $165d6bd72ce97cf9$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Pritisnite tipko Enter za začetek vlečenja.\",\"dragDescriptionTouch\":\"Dvotapnite za začetek vlečenja.\",\"dragDescriptionVirtual\":\"Kliknite za začetek vlečenja.\",\"dragItem\":\"Povleci {itemText}\",\"dragSelectedItems\":\"Povlecite {count, plural, one {# izbran element} other {izbrane elemente (#)}}\",\"dragStartedKeyboard\":\"Vlečenje se je začelo. Pritisnite tipko Tab za pomik na mesto, kamor želite spustiti elemente, in pritisnite tipko Enter, da jih spustite, ali tipko Escape, da prekličete postopek.\",\"dragStartedTouch\":\"Vlečenje se je začelo. Pomaknite se na mesto, kamor želite spustiti elemente, in dvotapnite, da jih spustite.\",\"dragStartedVirtual\":\"Vlečenje se je začelo. Pomaknite se na mesto, kamor želite spustiti elemente, in kliknite ali pritisnite tipko Enter, da jih spustite.\",\"dropCanceled\":\"Spust je preklican.\",\"dropComplete\":\"Spust je končan.\",\"dropDescriptionKeyboard\":\"Pritisnite tipko Enter, da spustite. Pritisnite tipko Escape, da prekličete vlečenje.\",\"dropDescriptionTouch\":\"Dvotapnite, da spustite.\",\"dropDescriptionVirtual\":\"Kliknite, da spustite.\",\"dropIndicator\":\"indikator spusta\",\"dropOnItem\":\"Spusti na mesto {itemText}\",\"dropOnRoot\":\"Spusti na mesto\",\"endDragKeyboard\":\"Vlečenje. Pritisnite tipko Enter za preklic vlečenja.\",\"endDragTouch\":\"Vlečenje. Dvotapnite za preklic vlečenja.\",\"endDragVirtual\":\"Vlečenje. Kliknite, da prekličete vlečenje.\",\"insertAfter\":\"Vstavi za {itemText}\",\"insertBefore\":\"Vstavi pred {itemText}\",\"insertBetween\":\"Vstavi med {beforeItemText} in {afterItemText}\"}");
1797
735
 
1798
- if (nextKey == null) {
1799
- if (wrap) {
1800
- return {
1801
- type: 'root'
1802
- };
1803
- }
1804
736
 
1805
- return null;
1806
- }
737
+ var $dc9b5237d38f3817$exports = {};
738
+ $dc9b5237d38f3817$exports = JSON.parse("{\"dragItem\":\"Prevucite {itemText}\",\"dragSelectedItems\":\"Prevucite {count, plural, one {# izabranu stavku} other {# izabrane stavke}}\",\"dragDescriptionKeyboard\":\"Pritisnite Enter da biste započeli prevlačenje..\",\"dragDescriptionTouch\":\"Dvaput dodirnite za otpuštanje.\",\"dragDescriptionVirtual\":\"Kliknite da biste započeli prevlačenje.\",\"dragStartedKeyboard\":\"Prevlačenje je započeto. Pritisnite Tab da biste otišli do cilja za otpuštanje, zatim pritisnite Enter za ispuštanje ili pritisnite Escape za otkazivanje.\",\"dragStartedTouch\":\"Prevlačenje je započeto. Idite do cilja za otpuštanje, a zatim dvaput dodirnite za otpuštanje.\",\"dragStartedVirtual\":\"Prevlačenje je započeto. Idite do cilja za otpuštanje, a zatim kliknite ili pritinite Enter za otpuštanje.\",\"endDragKeyboard\":\"Prevlačenje u toku. Pritisnite Enter da biste otkazali prevlačenje.\",\"endDragTouch\":\"Prevlačenje u toku. Dvaput dodirnite da biste otkazali prevlačenje.\",\"endDragVirtual\":\"Prevlačenje u toku. Kliknite da biste otkazali prevlačenje.\",\"dropDescriptionKeyboard\":\"Pritisnite Enter da biste otpustili. Pritisnite Escape da biste otkazali prevlačenje.\",\"dropDescriptionTouch\":\"Dvaput dodirnite za otpuštanje.\",\"dropDescriptionVirtual\":\"Kliknite za otpuštanje.\",\"dropCanceled\":\"Otpuštanje je otkazano.\",\"dropComplete\":\"Prevlačenje je završeno.\",\"dropIndicator\":\"Indikator otpuštanja\",\"dropOnRoot\":\"Otpusti na\",\"dropOnItem\":\"Otpusti na {itemText}\",\"insertBefore\":\"Umetnite ispred {itemText}\",\"insertBetween\":\"Umetnite između {beforeItemText} i {afterItemText}\",\"insertAfter\":\"Umetnite posle {itemText}\"}");
1807
739
 
1808
- return {
1809
- type: 'item',
1810
- key: nextKey,
1811
- dropPosition
1812
- };
1813
- };
1814
740
 
1815
- let nextValidTarget = function nextValidTarget(target, types, allowedDropOperations, getNextTarget, wrap) {
1816
- if (wrap === void 0) {
1817
- wrap = true;
1818
- }
741
+ var $fc3016bdba8283ce$exports = {};
742
+ $fc3016bdba8283ce$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Tryck enter för att börja dra.\",\"dragDescriptionTouch\":\"Dubbeltryck för att börja dra.\",\"dragDescriptionVirtual\":\"Klicka för att börja dra.\",\"dragItem\":\"Dra {itemText}\",\"dragSelectedItems\":\"Dra {count, plural, one {# valt objekt} other {# valda objekt}}\",\"dragStartedKeyboard\":\"Börja dra. Tryck på tabb för att navigera till målet, tryck på enter för att släppa eller på escape för att avbryta.\",\"dragStartedTouch\":\"Börja dra. Navigera till ett mål och dubbeltryck för att släppa.\",\"dragStartedVirtual\":\"Börja dra. Navigera till ett mål och klicka eller tryck på enter för att släppa.\",\"dropCanceled\":\"Släppåtgärd avbröts.\",\"dropComplete\":\"Släppåtgärd klar.\",\"dropDescriptionKeyboard\":\"Tryck på enter för att släppa. Tryck på escape för att avbryta dragåtgärd.\",\"dropDescriptionTouch\":\"Dubbeltryck för att släppa.\",\"dropDescriptionVirtual\":\"Klicka för att släppa.\",\"dropIndicator\":\"släppindikator\",\"dropOnItem\":\"Släpp på {itemText}\",\"dropOnRoot\":\"Släpp på\",\"endDragKeyboard\":\"Drar. Tryck på enter för att avbryta dragåtgärd.\",\"endDragTouch\":\"Drar. Dubbeltryck för att avbryta dragåtgärd.\",\"endDragVirtual\":\"Drar. Klicka för att avbryta dragåtgärd.\",\"insertAfter\":\"Infoga efter {itemText}\",\"insertBefore\":\"Infoga före {itemText}\",\"insertBetween\":\"Infoga mellan {beforeItemText} och {afterItemText}\"}");
1819
743
 
1820
- let seenRoot = 0;
1821
- let operation;
1822
744
 
1823
- do {
1824
- let nextTarget = getNextTarget(target, wrap);
745
+ var $359db1fb988d3e0a$exports = {};
746
+ $359db1fb988d3e0a$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Sürüklemeyi başlatmak için Enter'a basın.\",\"dragDescriptionTouch\":\"Sürüklemeyi başlatmak için çift tıklayın.\",\"dragDescriptionVirtual\":\"Sürüklemeyi başlatmak için tıklayın.\",\"dragItem\":\"{itemText}’i sürükle\",\"dragSelectedItems\":\"Sürükle {count, plural, one {# seçili öge} other {# seçili öge}}\",\"dragStartedKeyboard\":\"Sürükleme başlatıldı. Bir bırakma hedefine gitmek için Tab’a basın, ardından bırakmak için Enter’a basın veya iptal etmek için Escape’e basın.\",\"dragStartedTouch\":\"Sürükleme başlatıldı. Bir bırakma hedefine gidin, ardından bırakmak için çift tıklayın.\",\"dragStartedVirtual\":\"Sürükleme başlatıldı. Bir bırakma hedefine gidin, ardından bırakmak için Enter’a tıklayın veya basın.\",\"dropCanceled\":\"Bırakma iptal edildi.\",\"dropComplete\":\"Bırakma tamamlandı.\",\"dropDescriptionKeyboard\":\"Bırakmak için Enter'a basın. Sürüklemeyi iptal etmek için Escape'e basın.\",\"dropDescriptionTouch\":\"Bırakmak için çift tıklayın.\",\"dropDescriptionVirtual\":\"Bırakmak için tıklayın.\",\"dropIndicator\":\"bırakma göstergesi\",\"dropOnItem\":\"{itemText} üzerine bırak\",\"dropOnRoot\":\"Bırakın\",\"endDragKeyboard\":\"Sürükleme. Sürüklemeyi iptal etmek için Enter'a basın.\",\"endDragTouch\":\"Sürükleme. Sürüklemeyi iptal etmek için çift tıklayın.\",\"endDragVirtual\":\"Sürükleme. Sürüklemeyi iptal etmek için tıklayın.\",\"insertAfter\":\"{itemText}’den sonra gir\",\"insertBefore\":\"{itemText}’den önce gir\",\"insertBetween\":\"{beforeItemText} ve {afterItemText} arasına gir\"}");
1825
747
 
1826
- if (!nextTarget) {
1827
- return null;
1828
- }
1829
748
 
1830
- target = nextTarget;
1831
- operation = localState.state.getDropOperation(nextTarget, types, allowedDropOperations);
749
+ var $231565b2fb81d522$exports = {};
750
+ $231565b2fb81d522$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Натисніть Enter, щоб почати перетягування.\",\"dragDescriptionTouch\":\"Натисніть двічі, щоб почати перетягування.\",\"dragDescriptionVirtual\":\"Натисніть, щоб почати перетягування.\",\"dragItem\":\"Перетягнути {itemText}\",\"dragSelectedItems\":\"Перетягніть {count, plural, one {# вибраний елемент} other {# вибраних елем}}\",\"dragStartedKeyboard\":\"Перетягування почалося. Натисніть Tab, щоб перейти до цілі перетягування, потім натисніть Enter, щоб перетягнути, або Escape, щоб скасувати.\",\"dragStartedTouch\":\"Перетягування почалося. Перейдіть до цілі перетягування, потім натисніть двічі, щоб перетягнути.\",\"dragStartedVirtual\":\"Перетягування почалося. Перейдіть до цілі перетягування, потім натисніть Enter, щоб перетягнути.\",\"dropCanceled\":\"Перетягування скасовано.\",\"dropComplete\":\"Перетягування завершено.\",\"dropDescriptionKeyboard\":\"Натисніть Enter, щоб перетягнути. Натисніть Escape, щоб скасувати перетягування.\",\"dropDescriptionTouch\":\"Натисніть двічі, щоб перетягнути.\",\"dropDescriptionVirtual\":\"Натисніть, щоб перетягнути.\",\"dropIndicator\":\"індикатор перетягування\",\"dropOnItem\":\"Перетягнути на {itemText}\",\"dropOnRoot\":\"Перетягнути на\",\"endDragKeyboard\":\"Триває перетягування. Натисніть Enter, щоб скасувати перетягування.\",\"endDragTouch\":\"Триває перетягування. Натисніть двічі, щоб скасувати перетягування.\",\"endDragVirtual\":\"Триває перетягування. Натисніть, щоб скасувати перетягування.\",\"insertAfter\":\"Вставити після {itemText}\",\"insertBefore\":\"Вставити перед {itemText}\",\"insertBetween\":\"Вставити між {beforeItemText} і {afterItemText}\"}");
1832
751
 
1833
- if (target.type === 'root') {
1834
- seenRoot++;
1835
- }
1836
- } while (operation === 'cancel' && !localState.state.isDropTarget(target) && seenRoot < 2);
1837
752
 
1838
- if (operation === 'cancel') {
1839
- return null;
1840
- }
753
+ var $9b078ce55391bbf3$exports = {};
754
+ $9b078ce55391bbf3$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"按 Enter 开始拖动。\",\"dragDescriptionTouch\":\"双击开始拖动。\",\"dragDescriptionVirtual\":\"单击开始拖动。\",\"dragItem\":\"拖动 {itemText}\",\"dragSelectedItems\":\"拖动 {count, plural, one {# 选中项目} other {# 选中项目}}\",\"dragStartedKeyboard\":\"已开始拖动。按 Tab 导航到放置目标,然后按 Enter 放置或按 Escape 取消。\",\"dragStartedTouch\":\"已开始拖动。导航到放置目标,然后双击放置。\",\"dragStartedVirtual\":\"已开始拖动。导航到放置目标,然后单击或按 Enter 放置。\",\"dropCanceled\":\"放置已取消。\",\"dropComplete\":\"放置已完成。\",\"dropDescriptionKeyboard\":\"按 Enter 放置。按 Escape 取消拖动。\",\"dropDescriptionTouch\":\"双击放置。\",\"dropDescriptionVirtual\":\"单击放置。\",\"dropIndicator\":\"放置标记\",\"dropOnItem\":\"放置于 {itemText}\",\"dropOnRoot\":\"放置于\",\"endDragKeyboard\":\"正在拖动。按 Enter 取消拖动。\",\"endDragTouch\":\"正在拖动。双击取消拖动。\",\"endDragVirtual\":\"正在拖动。单击取消拖动。\",\"insertAfter\":\"插入到 {itemText} 之后\",\"insertBefore\":\"插入到 {itemText} 之前\",\"insertBetween\":\"插入到 {beforeItemText} 和 {afterItemText} 之间\"}");
1841
755
 
1842
- return target;
1843
- };
1844
756
 
1845
- return $a75d092e5c30878812fba78e$export$registerDropTarget({
1846
- element: ref.current,
757
+ var $94eee9f9dd033f7e$exports = {};
758
+ $94eee9f9dd033f7e$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"按 Enter 鍵以開始拖曳。\",\"dragDescriptionTouch\":\"輕點兩下以開始拖曳。\",\"dragDescriptionVirtual\":\"按一下滑鼠以開始拖曳。\",\"dragItem\":\"拖曳「{itemText}」\",\"dragSelectedItems\":\"拖曳 {count, plural, one {# 個選定項目} other {# 個選定項目}}\",\"dragStartedKeyboard\":\"已開始拖曳。按 Tab 鍵以瀏覽至放置目標,然後按 Enter 鍵以放置,或按 Escape 鍵以取消。\",\"dragStartedTouch\":\"已開始拖曳。瀏覽至放置目標,然後輕點兩下以放置。\",\"dragStartedVirtual\":\"已開始拖曳。瀏覽至放置目標,然後按一下滑鼠或按 Enter 鍵以放置。\",\"dropCanceled\":\"放置已取消。\",\"dropComplete\":\"放置已完成。\",\"dropDescriptionKeyboard\":\"按 Enter 鍵以放置。按 Escape 鍵以取消拖曳。\",\"dropDescriptionTouch\":\"輕點兩下以放置。\",\"dropDescriptionVirtual\":\"按一下滑鼠以放置。\",\"dropIndicator\":\"放置指示器\",\"dropOnItem\":\"放置在「{itemText}」上\",\"dropOnRoot\":\"放置在\",\"endDragKeyboard\":\"拖曳中。按 Enter 鍵以取消拖曳。\",\"endDragTouch\":\"拖曳中。輕點兩下以取消拖曳。\",\"endDragVirtual\":\"拖曳中。按一下滑鼠以取消拖曳。\",\"insertAfter\":\"插入至「{itemText}」之後\",\"insertBefore\":\"插入至「{itemText}」之前\",\"insertBetween\":\"插入至「{beforeItemText}」和「{afterItemText}」之間\"}");
1847
759
 
1848
- getDropOperation(types, allowedOperations) {
1849
- if (localState.state.target) {
1850
- return localState.state.getDropOperation(localState.state.target, types, allowedOperations);
1851
- } // Check if any of the targets accept the drop.
1852
- // TODO: should we have a faster way of doing this or e.g. for pagination?
1853
760
 
761
+ $a0e2171154b8c4fe$exports = {
762
+ "ar-AE": $e1076e638f72e513$exports,
763
+ "bg-BG": $5247825c4c521ecd$exports,
764
+ "cs-CZ": $679c7987be73b33a$exports,
765
+ "da-DK": $1c6be209d930911d$exports,
766
+ "de-DE": $0c5c28ae829fbcc5$exports,
767
+ "el-GR": $362719e545ebbe59$exports,
768
+ "en-US": $bf5ca542ddbd7e1e$exports,
769
+ "es-ES": $249f7c6f2b021a36$exports,
770
+ "et-EE": $a306aec76fcd0c95$exports,
771
+ "fi-FI": $6eb0560f4ff183ff$exports,
772
+ "fr-FR": $a9309d69baecc54a$exports,
773
+ "he-IL": $c306e39910a4b3d3$exports,
774
+ "hr-HR": $383c29c6b563fed3$exports,
775
+ "hu-HU": $f37e1d1f1c577681$exports,
776
+ "it-IT": $57684896b9b64945$exports,
777
+ "ja-JP": $124f9b9a50d68f08$exports,
778
+ "ko-KR": $4e7a70c1eb8efae2$exports,
779
+ "lt-LT": $18a908ad59f24b71$exports,
780
+ "lv-LV": $e9b69ae5de94453e$exports,
781
+ "nb-NO": $28e302ddfe8a4bf5$exports,
782
+ "nl-NL": $8b329d015984c2b2$exports,
783
+ "pl-PL": $32ac997d901e8006$exports,
784
+ "pt-BR": $980d9cf229cf60df$exports,
785
+ "pt-PT": $429c069033ac65fb$exports,
786
+ "ro-RO": $5944d5a872573520$exports,
787
+ "ru-RU": $5bd34815177e0598$exports,
788
+ "sk-SK": $fd4fe85d82ae4b8e$exports,
789
+ "sl-SI": $165d6bd72ce97cf9$exports,
790
+ "sr-SP": $dc9b5237d38f3817$exports,
791
+ "sv-SE": $fc3016bdba8283ce$exports,
792
+ "tr-TR": $359db1fb988d3e0a$exports,
793
+ "uk-UA": $231565b2fb81d522$exports,
794
+ "zh-CN": $9b078ce55391bbf3$exports,
795
+ "zh-TW": $94eee9f9dd033f7e$exports
796
+ };
1854
797
 
1855
- let target = nextValidTarget(null, types, allowedOperations, getNextTarget);
1856
- return target ? 'move' : 'cancel';
1857
- },
1858
798
 
1859
- onDropEnter(e, drag) {
1860
- let types = $bc29619458500c186021634c18dc$export$getTypes(drag.items);
1861
- let selectionManager = localState.state.selectionManager;
1862
- let target; // When entering the droppable collection for the first time, the default drop target
1863
- // is after the focused key.
1864
799
 
1865
- let key = selectionManager.focusedKey;
1866
- let dropPosition = 'after'; // If the focused key is a cell, get the parent item instead.
1867
- // For now, we assume that individual cells cannot be dropped on.
1868
800
 
1869
- let item = localState.state.collection.getItem(key);
1870
801
 
1871
- if ((item == null ? void 0 : item.type) === 'cell') {
1872
- key = item.parentKey;
1873
- } // If the focused item is also selected, the default drop target is after the last selected item.
1874
- // But if the focused key is the first selected item, then default to before the first selected item.
1875
- // This is to make reordering lists slightly easier. If you select top down, we assume you want to
1876
- // move the items down. If you select bottom up, we assume you want to move the items up.
1877
802
 
1878
803
 
1879
- if (selectionManager.isSelected(key)) {
1880
- if (selectionManager.selectedKeys.size > 1 && selectionManager.firstSelectedKey === key) {
1881
- dropPosition = 'before';
1882
- } else {
1883
- key = selectionManager.lastSelectedKey;
1884
- }
804
+ const $d067e40b40cb0a24$var$MESSAGES = {
805
+ keyboard: {
806
+ start: 'dragDescriptionKeyboard',
807
+ end: 'endDragKeyboard'
808
+ },
809
+ touch: {
810
+ start: 'dragDescriptionTouch',
811
+ end: 'endDragTouch'
812
+ },
813
+ virtual: {
814
+ start: 'dragDescriptionVirtual',
815
+ end: 'endDragVirtual'
816
+ }
817
+ };
818
+ function $d067e40b40cb0a24$export$7941f8aafa4b6021(options) {
819
+ let formatMessage = $4on3C$reactariai18n.useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($a0e2171154b8c4fe$exports)));
820
+ let state = $4on3C$react.useRef({
821
+ options: options,
822
+ x: 0,
823
+ y: 0
824
+ }).current;
825
+ state.options = options;
826
+ let [isDragging, setDragging] = $4on3C$react.useState(false);
827
+ let onDragStart = (e)=>{
828
+ let items = options.getItems();
829
+ $c1cba3854dc3a167$export$f9c1490890ddd063(e.dataTransfer, items);
830
+ if (typeof options.getAllowedDropOperations === 'function') {
831
+ let allowedOperations = options.getAllowedDropOperations();
832
+ let allowed = $8e4046ff5ec007bd$export$60b7b4bcf3903d8e.none;
833
+ for (let operation of allowedOperations)allowed |= $8e4046ff5ec007bd$export$60b7b4bcf3903d8e[operation] || $8e4046ff5ec007bd$export$60b7b4bcf3903d8e.none;
834
+ e.dataTransfer.effectAllowed = $8e4046ff5ec007bd$export$dd0165308d8bff45[allowed] || 'none';
1885
835
  }
1886
-
1887
- if (key != null) {
1888
- target = {
1889
- type: 'item',
1890
- key,
1891
- dropPosition
1892
- }; // If the default target is not valid, find the next one that is.
1893
-
1894
- if (localState.state.getDropOperation(target, types, drag.allowedDropOperations) === 'cancel') {
1895
- var _nextValidTarget;
1896
-
1897
- target = (_nextValidTarget = nextValidTarget(target, types, drag.allowedDropOperations, getNextTarget, false)) != null ? _nextValidTarget : nextValidTarget(target, types, drag.allowedDropOperations, getPreviousTarget, false);
1898
- }
1899
- } // If no focused key, then start from the root.
836
+ // If there is a renderPreview function, use it to render a custom preview image that will
837
+ // appear under the pointer while dragging. If not, the element itself is dragged by the browser.
838
+ if (typeof options.renderPreview === 'function') {
839
+ let preview = options.renderPreview(items);
840
+ if (preview) {
841
+ // Create an off-screen div to render the preview into.
842
+ let node = document.createElement('div');
843
+ node.style.zIndex = '-100';
844
+ node.style.position = 'absolute';
845
+ node.style.top = '0';
846
+ node.style.left = '-100000px';
847
+ document.body.appendChild(node);
848
+ // Call renderPreview to get a JSX element, and render it into the div with React DOM.
849
+ ($parcel$interopDefault($4on3C$reactdom)).render(preview, node);
850
+ // Compute the offset that the preview will appear under the mouse.
851
+ // If possible, this is based on the point the user clicked on the target.
852
+ // If the preview is much smaller, then just use the center point of the preview.
853
+ let size = node.getBoundingClientRect();
854
+ let rect = e.currentTarget.getBoundingClientRect();
855
+ let x = e.clientX - rect.x;
856
+ let y = e.clientY - rect.y;
857
+ if (x > size.width || y > size.height) {
858
+ x = size.width / 2;
859
+ y = size.height / 2;
860
+ }
861
+ e.dataTransfer.setDragImage(node, x, y);
862
+ // Remove the preview from the DOM after a frame so the browser has time to paint.
863
+ requestAnimationFrame(()=>{
864
+ document.body.removeChild(node);
865
+ });
866
+ }
867
+ }
868
+ if (typeof options.onDragStart === 'function') options.onDragStart({
869
+ type: 'dragstart',
870
+ x: e.clientX,
871
+ y: e.clientY
872
+ });
873
+ state.x = e.clientX;
874
+ state.y = e.clientY;
875
+ // Wait a frame before we set dragging to true so that the browser has time to
876
+ // render the preview image before we update the element that has been dragged.
877
+ requestAnimationFrame(()=>{
878
+ setDragging(true);
879
+ });
880
+ };
881
+ let onDrag = (e)=>{
882
+ if (e.clientX === state.x && e.clientY === state.y) return;
883
+ if (typeof options.onDragMove === 'function') options.onDragMove({
884
+ type: 'dragmove',
885
+ x: e.clientX,
886
+ y: e.clientY
887
+ });
888
+ state.x = e.clientX;
889
+ state.y = e.clientY;
890
+ };
891
+ let onDragEnd = (e)=>{
892
+ if (typeof options.onDragEnd === 'function') options.onDragEnd({
893
+ type: 'dragend',
894
+ x: e.clientX,
895
+ y: e.clientY,
896
+ dropOperation: $8e4046ff5ec007bd$export$608ecc6f1b23c35d[e.dataTransfer.dropEffect]
897
+ });
898
+ setDragging(false);
899
+ };
900
+ let onPress = (e1)=>{
901
+ if (e1.pointerType !== 'keyboard' && e1.pointerType !== 'virtual') return;
902
+ if (typeof state.options.onDragStart === 'function') {
903
+ let rect = e1.target.getBoundingClientRect();
904
+ state.options.onDragStart({
905
+ type: 'dragstart',
906
+ x: rect.x + rect.width / 2,
907
+ y: rect.y + rect.height / 2
908
+ });
909
+ }
910
+ $d69e2bc1de15721f$export$549dbcf8649bf3b2({
911
+ element: e1.target,
912
+ items: state.options.getItems(),
913
+ allowedDropOperations: typeof state.options.getAllowedDropOperations === 'function' ? state.options.getAllowedDropOperations() : [
914
+ 'move',
915
+ 'copy',
916
+ 'link'
917
+ ],
918
+ onDragEnd (e) {
919
+ setDragging(false);
920
+ if (typeof state.options.onDragEnd === 'function') state.options.onDragEnd(e);
921
+ }
922
+ }, formatMessage);
923
+ setDragging(true);
924
+ };
925
+ let modality = $c1cba3854dc3a167$export$49bac5d6d4b352ea();
926
+ let descriptionProps = $4on3C$reactariautils.useDescription(formatMessage(!isDragging ? $d067e40b40cb0a24$var$MESSAGES[modality].start : $d067e40b40cb0a24$var$MESSAGES[modality].end));
927
+ return {
928
+ dragProps: {
929
+ draggable: 'true',
930
+ onDragStart: onDragStart,
931
+ onDrag: onDrag,
932
+ onDragEnd: onDragEnd
933
+ },
934
+ dragButtonProps: {
935
+ ...descriptionProps,
936
+ onPress: onPress
937
+ },
938
+ isDragging: isDragging
939
+ };
940
+ }
1900
941
 
1901
942
 
1902
- if (!target) {
1903
- target = nextValidTarget(null, types, drag.allowedDropOperations, getNextTarget);
1904
- }
943
+ var $444fab3ca6c3b038$exports = {};
1905
944
 
1906
- localState.state.setTarget(target);
1907
- },
945
+ $parcel$export($444fab3ca6c3b038$exports, "useDrop", () => $444fab3ca6c3b038$export$ccdee5eaf73cf661);
1908
946
 
1909
- onDropExit() {
1910
- localState.state.setTarget(null);
1911
- },
1912
947
 
1913
- onDropTargetEnter(target) {
1914
- localState.state.setTarget(target);
1915
- },
1916
948
 
1917
- onDropActivate(e) {
1918
- var _localState$state$tar, _localState$state$tar2;
1919
949
 
1920
- if (((_localState$state$tar = localState.state.target) == null ? void 0 : _localState$state$tar.type) === 'item' && ((_localState$state$tar2 = localState.state.target) == null ? void 0 : _localState$state$tar2.dropPosition) === 'on' && typeof localState.props.onDropActivate === 'function') {
1921
- localState.props.onDropActivate({
1922
- type: 'dropactivate',
1923
- x: e.x,
1924
- // todo
1925
- y: e.y,
1926
- target: localState.state.target
1927
- });
1928
- }
1929
- },
1930
950
 
1931
- onDrop(e, target) {
1932
- if (localState.state.target && typeof localState.props.onDrop === 'function') {
1933
- onDrop(e, target || localState.state.target);
1934
- }
1935
- },
1936
-
1937
- onKeyDown(e, drag) {
1938
- let {
1939
- keyboardDelegate
1940
- } = localState.props;
1941
- let types = $bc29619458500c186021634c18dc$export$getTypes(drag.items);
1942
-
1943
- switch (e.key) {
1944
- case 'ArrowDown':
1945
- {
1946
- if (keyboardDelegate.getKeyBelow) {
1947
- let target = nextValidTarget(localState.state.target, types, drag.allowedDropOperations, getNextTarget);
1948
- localState.state.setTarget(target);
1949
- }
1950
951
 
1951
- break;
1952
- }
1953
952
 
1954
- case 'ArrowUp':
1955
- {
1956
- if (keyboardDelegate.getKeyAbove) {
1957
- let target = nextValidTarget(localState.state.target, types, drag.allowedDropOperations, getPreviousTarget);
1958
- localState.state.setTarget(target);
1959
- }
1960
953
 
1961
- break;
1962
- }
1963
954
 
1964
- case 'Home':
1965
- {
1966
- if (keyboardDelegate.getFirstKey) {
1967
- let target = nextValidTarget(null, types, drag.allowedDropOperations, getNextTarget);
1968
- localState.state.setTarget(target);
1969
- }
1970
955
 
1971
- break;
956
+ const $116cc020faed051c$var$MESSAGES = {
957
+ keyboard: 'dropDescriptionKeyboard',
958
+ touch: 'dropDescriptionTouch',
959
+ virtual: 'dropDescriptionVirtual'
960
+ };
961
+ function $116cc020faed051c$export$62447ad3d2ec7da6() {
962
+ let formatMessage = $4on3C$reactariai18n.useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($a0e2171154b8c4fe$exports)));
963
+ let modality = $c1cba3854dc3a167$export$49bac5d6d4b352ea();
964
+ let dragSession = $d69e2bc1de15721f$export$418e185dd3f1b968();
965
+ let descriptionProps = $4on3C$reactariautils.useDescription(dragSession ? formatMessage($116cc020faed051c$var$MESSAGES[modality]) : '');
966
+ return {
967
+ dropProps: {
968
+ ...descriptionProps,
969
+ // Mobile Safari does not properly bubble click events on elements except links or inputs
970
+ // unless there is an onclick handler bound directly to the element itself. By adding this
971
+ // handler, React will take care of adding that for us, and we are able to handle document
972
+ // level click events in the DragManager.
973
+ // See https://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
974
+ onClick: ()=>{
1972
975
  }
976
+ }
977
+ };
978
+ }
1973
979
 
1974
- case 'End':
1975
- {
1976
- if (keyboardDelegate.getLastKey) {
1977
- let target = nextValidTarget(null, types, drag.allowedDropOperations, getPreviousTarget);
1978
- localState.state.setTarget(target);
1979
- }
1980
980
 
1981
- break;
981
+ const $444fab3ca6c3b038$var$DROP_ACTIVATE_TIMEOUT = 800;
982
+ function $444fab3ca6c3b038$export$ccdee5eaf73cf661(options) {
983
+ let [isDropTarget, setDropTarget] = $4on3C$react.useState(false);
984
+ let state = $4on3C$react.useRef({
985
+ x: 0,
986
+ y: 0,
987
+ dragEnterCount: 0,
988
+ dropEffect: 'none',
989
+ dropActivateTimer: null
990
+ }).current;
991
+ let onDragOver = (e)=>{
992
+ e.preventDefault();
993
+ e.stopPropagation();
994
+ if (e.clientX === state.x && e.clientY === state.y) {
995
+ e.dataTransfer.dropEffect = state.dropEffect;
996
+ return;
997
+ }
998
+ state.x = e.clientX;
999
+ state.y = e.clientY;
1000
+ if (typeof options.getDropOperationForPoint === 'function') {
1001
+ let allowedOperations = $444fab3ca6c3b038$var$effectAllowedToOperations(e.dataTransfer.effectAllowed);
1002
+ let types = new $c1cba3854dc3a167$export$7f04ce188c91447c(e.dataTransfer);
1003
+ let rect = e.currentTarget.getBoundingClientRect();
1004
+ let dropOperation = options.getDropOperationForPoint(types, allowedOperations, state.x - rect.x, state.y - rect.y);
1005
+ state.dropEffect = $8e4046ff5ec007bd$export$5eacb0769d26d3b2[dropOperation] || 'none';
1006
+ }
1007
+ e.dataTransfer.dropEffect = state.dropEffect;
1008
+ if (typeof options.onDropMove === 'function') {
1009
+ let rect = e.currentTarget.getBoundingClientRect();
1010
+ options.onDropMove({
1011
+ type: 'dropmove',
1012
+ x: state.x - rect.x,
1013
+ y: state.y - rect.y
1014
+ });
1015
+ }
1016
+ clearTimeout(state.dropActivateTimer);
1017
+ if (typeof options.onDropActivate === 'function' && state.dropEffect !== 'none') {
1018
+ let rect = e.currentTarget.getBoundingClientRect();
1019
+ state.dropActivateTimer = setTimeout(()=>{
1020
+ options.onDropActivate({
1021
+ type: 'dropactivate',
1022
+ x: state.x - rect.x,
1023
+ y: state.y - rect.y
1024
+ });
1025
+ }, $444fab3ca6c3b038$var$DROP_ACTIVATE_TIMEOUT);
1026
+ }
1027
+ };
1028
+ let onDragEnter = (e)=>{
1029
+ e.stopPropagation();
1030
+ state.dragEnterCount++;
1031
+ if (state.dragEnterCount > 1) return;
1032
+ let allowedOperations = $444fab3ca6c3b038$var$effectAllowedToOperations(e.dataTransfer.effectAllowed);
1033
+ let dropOperation = allowedOperations[0];
1034
+ if (typeof options.getDropOperation === 'function') {
1035
+ let types = new $c1cba3854dc3a167$export$7f04ce188c91447c(e.dataTransfer);
1036
+ dropOperation = options.getDropOperation(types, allowedOperations);
1037
+ }
1038
+ if (dropOperation !== 'cancel') setDropTarget(true);
1039
+ if (typeof options.getDropOperationForPoint === 'function') {
1040
+ let types = new $c1cba3854dc3a167$export$7f04ce188c91447c(e.dataTransfer);
1041
+ let rect = e.currentTarget.getBoundingClientRect();
1042
+ dropOperation = options.getDropOperationForPoint(types, allowedOperations, e.clientX - rect.x, e.clientY - rect.y);
1043
+ }
1044
+ state.dropEffect = $8e4046ff5ec007bd$export$5eacb0769d26d3b2[dropOperation] || 'none';
1045
+ e.dataTransfer.dropEffect = state.dropEffect;
1046
+ if (typeof options.onDropEnter === 'function' && dropOperation !== 'cancel') {
1047
+ let rect = e.currentTarget.getBoundingClientRect();
1048
+ options.onDropEnter({
1049
+ type: 'dropenter',
1050
+ x: e.clientX - rect.x,
1051
+ y: e.clientY - rect.y
1052
+ });
1053
+ }
1054
+ state.x = e.clientX;
1055
+ state.y = e.clientY;
1056
+ };
1057
+ let onDragLeave = (e)=>{
1058
+ e.stopPropagation();
1059
+ state.dragEnterCount--;
1060
+ if (state.dragEnterCount > 0) return;
1061
+ if (typeof options.onDropExit === 'function' && state.dropEffect !== 'none') {
1062
+ let rect = e.currentTarget.getBoundingClientRect();
1063
+ options.onDropExit({
1064
+ type: 'dropexit',
1065
+ x: e.clientX - rect.x,
1066
+ y: e.clientY - rect.y
1067
+ });
1068
+ }
1069
+ setDropTarget(false);
1070
+ clearTimeout(state.dropActivateTimer);
1071
+ };
1072
+ let onDrop = (e)=>{
1073
+ e.preventDefault();
1074
+ e.stopPropagation();
1075
+ if (typeof options.onDrop === 'function') {
1076
+ let dropOperation = $8e4046ff5ec007bd$export$608ecc6f1b23c35d[state.dropEffect];
1077
+ let items = $c1cba3854dc3a167$export$d9e760437831f8b3(e.dataTransfer);
1078
+ let rect = e.currentTarget.getBoundingClientRect();
1079
+ let event = {
1080
+ type: 'drop',
1081
+ x: e.clientX - rect.x,
1082
+ y: e.clientY - rect.y,
1083
+ items: items,
1084
+ dropOperation: dropOperation
1085
+ };
1086
+ // Wait a frame to dispatch the drop event so that we ensure the dragend event fires first.
1087
+ // Otherwise, if onDrop removes the original dragged element from the DOM, dragend will never be fired.
1088
+ // This behavior is consistent across browsers, but see this issue for details:
1089
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=460801
1090
+ setTimeout(()=>{
1091
+ options.onDrop(event);
1092
+ }, 0);
1093
+ }
1094
+ if (typeof options.onDropExit === 'function') {
1095
+ let rect = e.currentTarget.getBoundingClientRect();
1096
+ options.onDropExit({
1097
+ type: 'dropexit',
1098
+ x: e.clientX - rect.x,
1099
+ y: e.clientY - rect.y
1100
+ });
1101
+ }
1102
+ state.dragEnterCount = 0;
1103
+ setDropTarget(false);
1104
+ clearTimeout(state.dropActivateTimer);
1105
+ };
1106
+ let optionsRef = $4on3C$react.useRef(options);
1107
+ optionsRef.current = options;
1108
+ $4on3C$reactariautils.useLayoutEffect(()=>$d69e2bc1de15721f$export$c28d9fb4a54e471a({
1109
+ element: optionsRef.current.ref.current,
1110
+ getDropOperation: optionsRef.current.getDropOperation,
1111
+ onDropEnter (e) {
1112
+ setDropTarget(true);
1113
+ if (typeof optionsRef.current.onDropEnter === 'function') optionsRef.current.onDropEnter(e);
1114
+ },
1115
+ onDropExit (e) {
1116
+ setDropTarget(false);
1117
+ if (typeof optionsRef.current.onDropExit === 'function') optionsRef.current.onDropExit(e);
1118
+ },
1119
+ onDrop (e) {
1120
+ if (typeof optionsRef.current.onDrop === 'function') optionsRef.current.onDrop(e);
1121
+ },
1122
+ onDropActivate (e) {
1123
+ if (typeof optionsRef.current.onDropActivate === 'function') optionsRef.current.onDropActivate(e);
1982
1124
  }
1125
+ })
1126
+ , [
1127
+ optionsRef
1128
+ ]);
1129
+ let { dropProps: dropProps } = $116cc020faed051c$export$62447ad3d2ec7da6();
1130
+ return {
1131
+ dropProps: {
1132
+ ...dropProps,
1133
+ onDragEnter: onDragEnter,
1134
+ onDragOver: onDragOver,
1135
+ onDragLeave: onDragLeave,
1136
+ onDrop: onDrop
1137
+ },
1138
+ isDropTarget: isDropTarget
1139
+ };
1140
+ }
1141
+ function $444fab3ca6c3b038$var$effectAllowedToOperations(effectAllowed) {
1142
+ let allowedOperationsBits = $8e4046ff5ec007bd$export$9bbdfc78cf083e16[effectAllowed];
1143
+ let allowedOperations = [];
1144
+ if (allowedOperationsBits & $8e4046ff5ec007bd$export$60b7b4bcf3903d8e.move) allowedOperations.push('move');
1145
+ if (allowedOperationsBits & $8e4046ff5ec007bd$export$60b7b4bcf3903d8e.copy) allowedOperations.push('copy');
1146
+ if (allowedOperationsBits & $8e4046ff5ec007bd$export$60b7b4bcf3903d8e.link) allowedOperations.push('link');
1147
+ return allowedOperations;
1148
+ }
1983
1149
 
1984
- case 'PageDown':
1985
- {
1986
- if (keyboardDelegate.getKeyPageBelow) {
1987
- var _target;
1988
1150
 
1989
- let target = localState.state.target;
1151
+ var $f56fb52b53faaf3d$exports = {};
1990
1152
 
1991
- if (!target) {
1992
- target = nextValidTarget(null, types, drag.allowedDropOperations, getNextTarget);
1993
- } else {
1994
- // If on the root, go to the item a page below the top. Otherwise a page below the current item.
1995
- let nextKey = keyboardDelegate.getKeyPageBelow(target.type === 'item' ? target.key : keyboardDelegate.getFirstKey());
1996
- let dropPosition = target.type === 'item' ? target.dropPosition : 'after'; // If there is no next key, or we are starting on the last key, jump to the last possible position.
1153
+ $parcel$export($f56fb52b53faaf3d$exports, "useDroppableCollection", () => $f56fb52b53faaf3d$export$f4e2f423c21f7b04);
1997
1154
 
1998
- if (nextKey == null || target.type === 'item' && target.key === keyboardDelegate.getLastKey()) {
1999
- nextKey = keyboardDelegate.getLastKey();
2000
- dropPosition = 'after';
2001
- }
2002
1155
 
2003
- target = {
2004
- type: 'item',
2005
- key: nextKey,
2006
- dropPosition
2007
- }; // If the target does not accept the drop, find the next valid target.
2008
- // If no next valid target, find the previous valid target.
2009
1156
 
2010
- let operation = localState.state.getDropOperation(target, types, drag.allowedDropOperations);
2011
1157
 
2012
- if (operation === 'cancel') {
2013
- var _nextValidTarget2;
2014
1158
 
2015
- target = (_nextValidTarget2 = nextValidTarget(target, types, drag.allowedDropOperations, getNextTarget, false)) != null ? _nextValidTarget2 : nextValidTarget(target, types, drag.allowedDropOperations, getPreviousTarget, false);
2016
- }
2017
- }
2018
1159
 
2019
- localState.state.setTarget((_target = target) != null ? _target : localState.state.target);
2020
- }
2021
1160
 
2022
- break;
1161
+ const $0337847923f488b7$var$AUTOSCROLL_AREA_SIZE = 20;
1162
+ function $0337847923f488b7$export$6323452ca4533ed8(ref) {
1163
+ let scrollableRef = $4on3C$react.useRef(null);
1164
+ $4on3C$react.useEffect(()=>{
1165
+ if (ref.current) scrollableRef.current = $4on3C$reactariautils.getScrollParent(ref.current);
1166
+ }, [
1167
+ ref
1168
+ ]);
1169
+ let state = $4on3C$react.useRef({
1170
+ timer: null,
1171
+ dx: 0,
1172
+ dy: 0
1173
+ }).current;
1174
+ let scroll = $4on3C$react.useCallback(()=>{
1175
+ scrollableRef.current.scrollLeft += state.dx;
1176
+ scrollableRef.current.scrollTop += state.dy;
1177
+ if (state.timer) state.timer = requestAnimationFrame(scroll);
1178
+ }, [
1179
+ scrollableRef,
1180
+ state
1181
+ ]);
1182
+ return {
1183
+ move (x, y) {
1184
+ // Most browsers auto scroll natively, but WebKit on macOS does not (iOS does 🤷‍♂️).
1185
+ // https://bugs.webkit.org/show_bug.cgi?id=222636
1186
+ if (!$4on3C$reactariautils.isWebKit() || $4on3C$reactariautils.isIOS() || !scrollableRef.current) return;
1187
+ let box = scrollableRef.current.getBoundingClientRect();
1188
+ let left = $0337847923f488b7$var$AUTOSCROLL_AREA_SIZE;
1189
+ let top = $0337847923f488b7$var$AUTOSCROLL_AREA_SIZE;
1190
+ let bottom = box.height - $0337847923f488b7$var$AUTOSCROLL_AREA_SIZE;
1191
+ let right = box.width - $0337847923f488b7$var$AUTOSCROLL_AREA_SIZE;
1192
+ if (x < left || x > right || y < top || y > bottom) {
1193
+ if (x < left) state.dx = x - left;
1194
+ else if (x > right) state.dx = x - right;
1195
+ if (y < top) state.dy = y - top;
1196
+ else if (y > bottom) state.dy = y - bottom;
1197
+ if (!state.timer) state.timer = requestAnimationFrame(scroll);
1198
+ } else this.stop();
1199
+ },
1200
+ stop () {
1201
+ if (state.timer) {
1202
+ cancelAnimationFrame(state.timer);
1203
+ state.timer = null;
2023
1204
  }
1205
+ }
1206
+ };
1207
+ }
2024
1208
 
2025
- case 'PageUp':
2026
- {
2027
- var _target2;
2028
1209
 
2029
- if (!keyboardDelegate.getKeyPageAbove) {
2030
- break;
2031
- }
2032
1210
 
2033
- let target = localState.state.target;
2034
1211
 
2035
- if (!target) {
2036
- target = nextValidTarget(null, types, drag.allowedDropOperations, getPreviousTarget);
2037
- } else if (target.type === 'item') {
2038
- // If at the top already, switch to the root. Otherwise navigate a page up.
2039
- if (target.key === keyboardDelegate.getFirstKey()) {
2040
- target = {
1212
+ const $f56fb52b53faaf3d$var$DROP_POSITIONS = [
1213
+ 'before',
1214
+ 'on',
1215
+ 'after'
1216
+ ];
1217
+ function $f56fb52b53faaf3d$export$f4e2f423c21f7b04(props, state1, ref) {
1218
+ let localState = $4on3C$react.useRef({
1219
+ props: props,
1220
+ state: state1,
1221
+ nextTarget: null,
1222
+ dropOperation: null
1223
+ }).current;
1224
+ localState.props = props;
1225
+ localState.state = state1;
1226
+ let autoScroll = $0337847923f488b7$export$6323452ca4533ed8(ref);
1227
+ let { dropProps: dropProps } = $444fab3ca6c3b038$export$ccdee5eaf73cf661({
1228
+ ref: ref,
1229
+ onDropEnter (e) {
1230
+ let target = props.getDropTargetFromPoint(e.x, e.y);
1231
+ state1.setTarget(target);
1232
+ },
1233
+ onDropMove (e) {
1234
+ state1.setTarget(localState.nextTarget);
1235
+ autoScroll.move(e.x, e.y);
1236
+ },
1237
+ getDropOperationForPoint (types, allowedOperations, x, y) {
1238
+ let target = props.getDropTargetFromPoint(x, y);
1239
+ if (!target) {
1240
+ localState.dropOperation = 'cancel';
1241
+ localState.nextTarget = null;
1242
+ return 'cancel';
1243
+ }
1244
+ if (state1.isDropTarget(target)) {
1245
+ localState.nextTarget = target;
1246
+ return localState.dropOperation;
1247
+ }
1248
+ localState.dropOperation = state1.getDropOperation(target, types, allowedOperations);
1249
+ // If the target doesn't accept the drop, see if the root accepts it instead.
1250
+ if (localState.dropOperation === 'cancel') {
1251
+ let rootTarget = {
2041
1252
  type: 'root'
2042
- };
2043
- } else {
2044
- let nextKey = keyboardDelegate.getKeyPageAbove(target.key);
2045
- let dropPosition = target.dropPosition;
2046
-
2047
- if (nextKey == null) {
2048
- nextKey = keyboardDelegate.getFirstKey();
2049
- dropPosition = 'before';
2050
- }
2051
-
2052
- target = {
2053
- type: 'item',
2054
- key: nextKey,
2055
- dropPosition
2056
- };
2057
- } // If the target does not accept the drop, find the previous valid target.
2058
- // If no next valid target, find the next valid target.
2059
-
2060
-
2061
- let operation = localState.state.getDropOperation(target, types, drag.allowedDropOperations);
2062
-
2063
- if (operation === 'cancel') {
2064
- var _nextValidTarget3;
2065
-
2066
- target = (_nextValidTarget3 = nextValidTarget(target, types, drag.allowedDropOperations, getPreviousTarget, false)) != null ? _nextValidTarget3 : nextValidTarget(target, types, drag.allowedDropOperations, getNextTarget, false);
1253
+ };
1254
+ let dropOperation = state1.getDropOperation(rootTarget, types, allowedOperations);
1255
+ if (dropOperation !== 'cancel') {
1256
+ target = rootTarget;
1257
+ localState.dropOperation = dropOperation;
2067
1258
  }
2068
- }
2069
-
2070
- localState.state.setTarget((_target2 = target) != null ? _target2 : localState.state.target);
2071
- break;
2072
1259
  }
1260
+ localState.nextTarget = localState.dropOperation === 'cancel' ? null : target;
1261
+ return localState.dropOperation;
1262
+ },
1263
+ onDropExit () {
1264
+ state1.setTarget(null);
1265
+ autoScroll.stop();
1266
+ },
1267
+ onDropActivate (e) {
1268
+ if (state1.target?.type === 'item' && state1.target?.dropPosition === 'on' && typeof props.onDropActivate === 'function') props.onDropActivate({
1269
+ type: 'dropactivate',
1270
+ x: e.x,
1271
+ y: e.y,
1272
+ target: state1.target
1273
+ });
1274
+ },
1275
+ onDrop (e) {
1276
+ if (state1.target && typeof props.onDrop === 'function') onDrop(e, state1.target);
2073
1277
  }
2074
- }
2075
-
2076
1278
  });
2077
- }, [localState, ref, onDrop]);
2078
- let id = $bc29619458500c186021634c18dc$export$useDroppableCollectionId(state);
2079
- return {
2080
- collectionProps: mergeProps(dropProps, {
2081
- id,
2082
- // Remove description from collection element. If dropping on the entire collection,
2083
- // there should be a drop indicator that has this description, so no need to double announce.
2084
- 'aria-describedby': null
2085
- })
2086
- };
2087
- }
2088
-
2089
- exports.useDroppableCollection = useDroppableCollection;
2090
-
2091
- function useDroppableItem(options, state, ref) {
2092
- let {
2093
- dropProps
2094
- } = $ca75888e192994dbb11ae05e54$export$useVirtualDrop();
2095
- useEffect(() => {
2096
- if (ref.current) {
2097
- return $a75d092e5c30878812fba78e$export$registerDropItem({
2098
- element: ref.current,
2099
- target: options.target,
2100
-
2101
- getDropOperation(types, allowedOperations) {
2102
- return state.getDropOperation(options.target, types, allowedOperations);
1279
+ let droppingState = $4on3C$react.useRef(null);
1280
+ let onDrop = $4on3C$react.useCallback((e, target)=>{
1281
+ let { state: state2 } = localState;
1282
+ // Focus the collection.
1283
+ state2.selectionManager.setFocused(true);
1284
+ // Save some state of the collection/selection before the drop occurs so we can compare later.
1285
+ let focusedKey = state2.selectionManager.focusedKey;
1286
+ droppingState.current = {
1287
+ timeout: null,
1288
+ focusedKey: focusedKey,
1289
+ collection: state2.collection,
1290
+ selectedKeys: state2.selectionManager.selectedKeys
1291
+ };
1292
+ localState.props.onDrop({
1293
+ type: 'drop',
1294
+ x: e.x,
1295
+ y: e.y,
1296
+ target: target,
1297
+ items: e.items,
1298
+ dropOperation: e.dropOperation
1299
+ });
1300
+ // Wait for a short time period after the onDrop is called to allow the data to be read asynchronously
1301
+ // and for React to re-render. If an insert occurs during this time, it will be selected/focused below.
1302
+ // If items are not "immediately" inserted by the onDrop handler, the application will need to handle
1303
+ // selecting and focusing those items themselves.
1304
+ droppingState.current.timeout = setTimeout(()=>{
1305
+ // If focus didn't move already (e.g. due to an insert), and the user dropped on an item,
1306
+ // focus that item and show the focus ring to give the user feedback that the drop occurred.
1307
+ // Also show the focus ring if the focused key is not selected, e.g. in case of a reorder.
1308
+ let { state: state } = localState;
1309
+ if (state.selectionManager.focusedKey === focusedKey) {
1310
+ if (target.type === 'item' && target.dropPosition === 'on' && state.collection.getItem(target.key) != null) {
1311
+ state.selectionManager.setFocusedKey(target.key);
1312
+ state.selectionManager.setFocused(true);
1313
+ $4on3C$reactariainteractions.setInteractionModality('keyboard');
1314
+ } else if (!state.selectionManager.isSelected(focusedKey)) $4on3C$reactariainteractions.setInteractionModality('keyboard');
1315
+ }
1316
+ droppingState.current = null;
1317
+ }, 50);
1318
+ }, [
1319
+ localState
1320
+ ]);
1321
+ // eslint-disable-next-line arrow-body-style
1322
+ $4on3C$react.useEffect(()=>{
1323
+ return ()=>{
1324
+ if (droppingState.current) clearTimeout(droppingState.current.timeout);
1325
+ };
1326
+ }, []);
1327
+ $4on3C$reactariautils.useLayoutEffect(()=>{
1328
+ // If an insert occurs during a drop, we want to immediately select these items to give
1329
+ // feedback to the user that a drop occurred. Only do this if the selection didn't change
1330
+ // since the drop started so we don't override if the user or application did something.
1331
+ if (droppingState.current && state1.selectionManager.isFocused && state1.collection.size > droppingState.current.collection.size && state1.selectionManager.isSelectionEqual(droppingState.current.selectedKeys)) {
1332
+ let newKeys = new Set();
1333
+ for (let key of state1.collection.getKeys())if (!droppingState.current.collection.getItem(key)) newKeys.add(key);
1334
+ state1.selectionManager.setSelectedKeys(newKeys);
1335
+ // If the focused item didn't change since the drop occurred, also focus the first
1336
+ // inserted item. If selection is disabled, then also show the focus ring so there
1337
+ // is some indication that items were added.
1338
+ if (state1.selectionManager.focusedKey === droppingState.current.focusedKey) {
1339
+ let first = newKeys.keys().next().value;
1340
+ state1.selectionManager.setFocusedKey(first);
1341
+ if (state1.selectionManager.selectionMode === 'none') $4on3C$reactariainteractions.setInteractionModality('keyboard');
1342
+ }
1343
+ droppingState.current = null;
2103
1344
  }
2104
-
2105
- });
2106
- }
2107
- }, [ref, options.target, state]);
2108
- let dragSession = $a75d092e5c30878812fba78e$export$useDragSession();
2109
- let isValidDropTarget = dragSession && state.getDropOperation(options.target, $bc29619458500c186021634c18dc$export$getTypes(dragSession.dragTarget.items), dragSession.dragTarget.allowedDropOperations) !== 'cancel';
2110
- let isDropTarget = state.isDropTarget(options.target);
2111
- useEffect(() => {
2112
- if (dragSession && isDropTarget && ref.current) {
2113
- ref.current.focus();
2114
- }
2115
- }, [isDropTarget, dragSession, ref]);
2116
- return {
2117
- dropProps: _babelRuntimeHelpersExtends({}, dropProps, {
2118
- 'aria-hidden': !dragSession || isValidDropTarget ? undefined : 'true'
2119
- })
2120
- };
2121
- }
2122
-
2123
- exports.useDroppableItem = useDroppableItem;
2124
- // @ts-ignore
2125
- const $e2ffcaef12f0c83baf595a484787300$var$intlMessages = {
2126
- "ar-AE": _babelRuntimeHelpersInteropRequireDefault($a049e8a273c8713c08cfdce886954f2$exports).default,
2127
- "bg-BG": _babelRuntimeHelpersInteropRequireDefault($c7bef18aeb1fd3dc6bd9bba10397f8b2$exports).default,
2128
- "cs-CZ": _babelRuntimeHelpersInteropRequireDefault($c5f1e0261e291b1341633fe9c018c96$exports).default,
2129
- "da-DK": _babelRuntimeHelpersInteropRequireDefault($f3c32be8e4431e03a321f5417e1843b$exports).default,
2130
- "de-DE": _babelRuntimeHelpersInteropRequireDefault($ad0d5ee9d1c1e0643b04e955a34882a6$exports).default,
2131
- "el-GR": _babelRuntimeHelpersInteropRequireDefault($f208c93cf9a0c52cc9fefaad0e63f8$exports).default,
2132
- "en-US": _babelRuntimeHelpersInteropRequireDefault($ece80d58838919a4624d1c28b393f77$exports).default,
2133
- "es-ES": _babelRuntimeHelpersInteropRequireDefault($ee9761bb92f87937ffa91c74828ae143$exports).default,
2134
- "et-EE": _babelRuntimeHelpersInteropRequireDefault($f49178596b64270de232b4c1afb184af$exports).default,
2135
- "fi-FI": _babelRuntimeHelpersInteropRequireDefault($f9bca27008bd46e848c441473e52$exports).default,
2136
- "fr-FR": _babelRuntimeHelpersInteropRequireDefault($abf7975536d94242592c6ec084b35c3f$exports).default,
2137
- "he-IL": _babelRuntimeHelpersInteropRequireDefault($a71b397b5a3444fd4218686dd8961d3$exports).default,
2138
- "hr-HR": _babelRuntimeHelpersInteropRequireDefault($a14560c06b1711b5b49bc92b5237$exports).default,
2139
- "hu-HU": _babelRuntimeHelpersInteropRequireDefault($e2f05728cdfadbce63b4a6a5c67263f3$exports).default,
2140
- "it-IT": _babelRuntimeHelpersInteropRequireDefault($da3198fd20b34c609578436051c8e7f$exports).default,
2141
- "ja-JP": _babelRuntimeHelpersInteropRequireDefault($a6ff3a43ed70d88abb08383457364ed7$exports).default,
2142
- "ko-KR": _babelRuntimeHelpersInteropRequireDefault($dfbfd4f7dc34546b5bb0af666347fbd0$exports).default,
2143
- "lt-LT": _babelRuntimeHelpersInteropRequireDefault($c53389022087f7b6afc79a9c99ef48f$exports).default,
2144
- "lv-LV": _babelRuntimeHelpersInteropRequireDefault($cca63ba6085d5d7fd3ffb0a4e8fc18$exports).default,
2145
- "nb-NO": _babelRuntimeHelpersInteropRequireDefault($d46abea5f59e687d0510d2bd4f77$exports).default,
2146
- "nl-NL": _babelRuntimeHelpersInteropRequireDefault($ac6e3e2426b7582528543cbf5379fc$exports).default,
2147
- "pl-PL": _babelRuntimeHelpersInteropRequireDefault($b97f849030ab4d8852eb85ed8b71$exports).default,
2148
- "pt-BR": _babelRuntimeHelpersInteropRequireDefault($efb2848f59f1d35ef3478522b3937c$exports).default,
2149
- "pt-PT": _babelRuntimeHelpersInteropRequireDefault($c96a96ffd3dfe2ce9bb15340774c6248$exports).default,
2150
- "ro-RO": _babelRuntimeHelpersInteropRequireDefault($cb9664dfd31ac427c76d10c47a7$exports).default,
2151
- "ru-RU": _babelRuntimeHelpersInteropRequireDefault($bb92c9cdbfedd40707a909cb02212287$exports).default,
2152
- "sk-SK": _babelRuntimeHelpersInteropRequireDefault($b67be7ae378fbe0a6b6d5b2bfc2a6a$exports).default,
2153
- "sl-SI": _babelRuntimeHelpersInteropRequireDefault($a75b2e8c856626127ded0a4974ec55e4$exports).default,
2154
- "sr-SP": _babelRuntimeHelpersInteropRequireDefault($ab0b9e23c57c52b70f6a9b9a6ad3bc$exports).default,
2155
- "sv-SE": _babelRuntimeHelpersInteropRequireDefault($be4af2b5be692205e2859aabe9f9$exports).default,
2156
- "tr-TR": _babelRuntimeHelpersInteropRequireDefault($dc264784e2c46ff8f1a7c0bb75a813$exports).default,
2157
- "uk-UA": _babelRuntimeHelpersInteropRequireDefault($bc7a04ab96250610a6ca8cd77cc1$exports).default,
2158
- "zh-CN": _babelRuntimeHelpersInteropRequireDefault($d4f2d0b8fbcdf0615175b386b62b0$exports).default,
2159
- "zh-TW": _babelRuntimeHelpersInteropRequireDefault($e61399ec3e66f955ad58888dbe8848db$exports).default
2160
- };
2161
-
2162
- function useDropIndicator(props, state, ref) {
2163
- let {
2164
- target
2165
- } = props;
2166
- let {
2167
- collection
2168
- } = state;
2169
- let formatMessage = useMessageFormatter($e2ffcaef12f0c83baf595a484787300$var$intlMessages);
2170
- let dragSession = $a75d092e5c30878812fba78e$export$useDragSession();
2171
- let {
2172
- dropProps
2173
- } = useDroppableItem(props, state, ref);
2174
- let id = useId();
2175
-
2176
- let getText = key => {
2177
- var _collection$getItem;
2178
-
2179
- return (_collection$getItem = collection.getItem(key)) == null ? void 0 : _collection$getItem.textValue;
2180
- };
2181
-
2182
- let label = '';
2183
- let labelledBy;
2184
-
2185
- if (target.type === 'root') {
2186
- label = formatMessage('dropOnRoot');
2187
- labelledBy = id + " " + $bc29619458500c186021634c18dc$export$getDroppableCollectionId(state);
2188
- } else if (target.dropPosition === 'on') {
2189
- label = formatMessage('dropOnItem', {
2190
- itemText: getText(target.key)
2191
1345
  });
2192
- } else {
2193
- let before = target.dropPosition === 'before' ? collection.getKeyBefore(target.key) : target.key;
2194
- let after = target.dropPosition === 'after' ? collection.getKeyAfter(target.key) : target.key;
2195
-
2196
- if (before && after) {
2197
- label = formatMessage('insertBetween', {
2198
- beforeItemText: getText(before),
2199
- afterItemText: getText(after)
2200
- });
2201
- } else if (before) {
2202
- label = formatMessage('insertAfter', {
2203
- itemText: getText(before)
2204
- });
2205
- } else if (after) {
2206
- label = formatMessage('insertBefore', {
2207
- itemText: getText(after)
2208
- });
2209
- }
2210
- }
2211
-
2212
- return {
2213
- dropIndicatorProps: _babelRuntimeHelpersExtends({}, dropProps, {
2214
- id,
2215
- 'aria-roledescription': formatMessage('dropIndicator'),
2216
- 'aria-label': label,
2217
- 'aria-labelledby': labelledBy,
2218
- 'aria-hidden': !dragSession ? 'true' : dropProps['aria-hidden'],
2219
- tabIndex: -1
2220
- })
2221
- };
1346
+ $4on3C$react.useEffect(()=>{
1347
+ let getNextTarget1 = (target, wrap = true)=>{
1348
+ if (!target) return {
1349
+ type: 'root'
1350
+ };
1351
+ let { keyboardDelegate: keyboardDelegate } = localState.props;
1352
+ let nextKey = target.type === 'item' ? keyboardDelegate.getKeyBelow(target.key) : keyboardDelegate.getFirstKey();
1353
+ let dropPosition = 'before';
1354
+ if (target.type === 'item') {
1355
+ let positionIndex = $f56fb52b53faaf3d$var$DROP_POSITIONS.indexOf(target.dropPosition);
1356
+ let nextDropPosition = $f56fb52b53faaf3d$var$DROP_POSITIONS[positionIndex + 1];
1357
+ if (positionIndex < $f56fb52b53faaf3d$var$DROP_POSITIONS.length - 1 && !(nextDropPosition === 'after' && nextKey != null)) return {
1358
+ type: 'item',
1359
+ key: target.key,
1360
+ dropPosition: nextDropPosition
1361
+ };
1362
+ // If the last drop position was 'after', then 'before' on the next key is equivalent.
1363
+ // Switch to 'on' instead.
1364
+ if (target.dropPosition === 'after') dropPosition = 'on';
1365
+ }
1366
+ if (nextKey == null) {
1367
+ if (wrap) return {
1368
+ type: 'root'
1369
+ };
1370
+ return null;
1371
+ }
1372
+ return {
1373
+ type: 'item',
1374
+ key: nextKey,
1375
+ dropPosition: dropPosition
1376
+ };
1377
+ };
1378
+ let getPreviousTarget = (target, wrap = true)=>{
1379
+ let { keyboardDelegate: keyboardDelegate } = localState.props;
1380
+ let nextKey = target?.type === 'item' ? keyboardDelegate.getKeyAbove(target.key) : keyboardDelegate.getLastKey();
1381
+ let dropPosition = !target || target.type === 'root' ? 'after' : 'on';
1382
+ if (target?.type === 'item') {
1383
+ let positionIndex = $f56fb52b53faaf3d$var$DROP_POSITIONS.indexOf(target.dropPosition);
1384
+ let nextDropPosition = $f56fb52b53faaf3d$var$DROP_POSITIONS[positionIndex - 1];
1385
+ if (positionIndex > 0 && nextDropPosition !== 'after') return {
1386
+ type: 'item',
1387
+ key: target.key,
1388
+ dropPosition: nextDropPosition
1389
+ };
1390
+ // If the last drop position was 'before', then 'after' on the previous key is equivalent.
1391
+ // Switch to 'on' instead.
1392
+ if (target.dropPosition === 'before') dropPosition = 'on';
1393
+ }
1394
+ if (nextKey == null) {
1395
+ if (wrap) return {
1396
+ type: 'root'
1397
+ };
1398
+ return null;
1399
+ }
1400
+ return {
1401
+ type: 'item',
1402
+ key: nextKey,
1403
+ dropPosition: dropPosition
1404
+ };
1405
+ };
1406
+ let nextValidTarget = (target, types, allowedDropOperations, getNextTarget, wrap = true)=>{
1407
+ let seenRoot = 0;
1408
+ let operation;
1409
+ do {
1410
+ let nextTarget = getNextTarget(target, wrap);
1411
+ if (!nextTarget) return null;
1412
+ target = nextTarget;
1413
+ operation = localState.state.getDropOperation(nextTarget, types, allowedDropOperations);
1414
+ if (target.type === 'root') seenRoot++;
1415
+ }while (operation === 'cancel' && !localState.state.isDropTarget(target) && seenRoot < 2)
1416
+ if (operation === 'cancel') return null;
1417
+ return target;
1418
+ };
1419
+ return $d69e2bc1de15721f$export$c28d9fb4a54e471a({
1420
+ element: ref.current,
1421
+ getDropOperation (types, allowedOperations) {
1422
+ if (localState.state.target) return localState.state.getDropOperation(localState.state.target, types, allowedOperations);
1423
+ // Check if any of the targets accept the drop.
1424
+ // TODO: should we have a faster way of doing this or e.g. for pagination?
1425
+ let target = nextValidTarget(null, types, allowedOperations, getNextTarget1);
1426
+ return target ? 'move' : 'cancel';
1427
+ },
1428
+ onDropEnter (e, drag) {
1429
+ let types = $c1cba3854dc3a167$export$e1d41611756c6326(drag.items);
1430
+ let selectionManager = localState.state.selectionManager;
1431
+ let target;
1432
+ // When entering the droppable collection for the first time, the default drop target
1433
+ // is after the focused key.
1434
+ let key = selectionManager.focusedKey;
1435
+ let dropPosition = 'after';
1436
+ // If the focused key is a cell, get the parent item instead.
1437
+ // For now, we assume that individual cells cannot be dropped on.
1438
+ let item = localState.state.collection.getItem(key);
1439
+ if (item?.type === 'cell') key = item.parentKey;
1440
+ // If the focused item is also selected, the default drop target is after the last selected item.
1441
+ // But if the focused key is the first selected item, then default to before the first selected item.
1442
+ // This is to make reordering lists slightly easier. If you select top down, we assume you want to
1443
+ // move the items down. If you select bottom up, we assume you want to move the items up.
1444
+ if (selectionManager.isSelected(key)) {
1445
+ if (selectionManager.selectedKeys.size > 1 && selectionManager.firstSelectedKey === key) dropPosition = 'before';
1446
+ else key = selectionManager.lastSelectedKey;
1447
+ }
1448
+ if (key != null) {
1449
+ target = {
1450
+ type: 'item',
1451
+ key: key,
1452
+ dropPosition: dropPosition
1453
+ };
1454
+ // If the default target is not valid, find the next one that is.
1455
+ if (localState.state.getDropOperation(target, types, drag.allowedDropOperations) === 'cancel') target = nextValidTarget(target, types, drag.allowedDropOperations, getNextTarget1, false) ?? nextValidTarget(target, types, drag.allowedDropOperations, getPreviousTarget, false);
1456
+ }
1457
+ // If no focused key, then start from the root.
1458
+ if (!target) target = nextValidTarget(null, types, drag.allowedDropOperations, getNextTarget1);
1459
+ localState.state.setTarget(target);
1460
+ },
1461
+ onDropExit () {
1462
+ localState.state.setTarget(null);
1463
+ },
1464
+ onDropTargetEnter (target) {
1465
+ localState.state.setTarget(target);
1466
+ },
1467
+ onDropActivate (e) {
1468
+ if (localState.state.target?.type === 'item' && localState.state.target?.dropPosition === 'on' && typeof localState.props.onDropActivate === 'function') localState.props.onDropActivate({
1469
+ type: 'dropactivate',
1470
+ x: e.x,
1471
+ y: e.y,
1472
+ target: localState.state.target
1473
+ });
1474
+ },
1475
+ onDrop (e, target) {
1476
+ if (localState.state.target && typeof localState.props.onDrop === 'function') onDrop(e, target || localState.state.target);
1477
+ },
1478
+ onKeyDown (e, drag) {
1479
+ let { keyboardDelegate: keyboardDelegate } = localState.props;
1480
+ let types = $c1cba3854dc3a167$export$e1d41611756c6326(drag.items);
1481
+ switch(e.key){
1482
+ case 'ArrowDown':
1483
+ if (keyboardDelegate.getKeyBelow) {
1484
+ let target = nextValidTarget(localState.state.target, types, drag.allowedDropOperations, getNextTarget1);
1485
+ localState.state.setTarget(target);
1486
+ }
1487
+ break;
1488
+ case 'ArrowUp':
1489
+ if (keyboardDelegate.getKeyAbove) {
1490
+ let target = nextValidTarget(localState.state.target, types, drag.allowedDropOperations, getPreviousTarget);
1491
+ localState.state.setTarget(target);
1492
+ }
1493
+ break;
1494
+ case 'Home':
1495
+ if (keyboardDelegate.getFirstKey) {
1496
+ let target = nextValidTarget(null, types, drag.allowedDropOperations, getNextTarget1);
1497
+ localState.state.setTarget(target);
1498
+ }
1499
+ break;
1500
+ case 'End':
1501
+ if (keyboardDelegate.getLastKey) {
1502
+ let target = nextValidTarget(null, types, drag.allowedDropOperations, getPreviousTarget);
1503
+ localState.state.setTarget(target);
1504
+ }
1505
+ break;
1506
+ case 'PageDown':
1507
+ if (keyboardDelegate.getKeyPageBelow) {
1508
+ let target = localState.state.target;
1509
+ if (!target) target = nextValidTarget(null, types, drag.allowedDropOperations, getNextTarget1);
1510
+ else {
1511
+ // If on the root, go to the item a page below the top. Otherwise a page below the current item.
1512
+ let nextKey = keyboardDelegate.getKeyPageBelow(target.type === 'item' ? target.key : keyboardDelegate.getFirstKey());
1513
+ let dropPosition = target.type === 'item' ? target.dropPosition : 'after';
1514
+ // If there is no next key, or we are starting on the last key, jump to the last possible position.
1515
+ if (nextKey == null || target.type === 'item' && target.key === keyboardDelegate.getLastKey()) {
1516
+ nextKey = keyboardDelegate.getLastKey();
1517
+ dropPosition = 'after';
1518
+ }
1519
+ target = {
1520
+ type: 'item',
1521
+ key: nextKey,
1522
+ dropPosition: dropPosition
1523
+ };
1524
+ // If the target does not accept the drop, find the next valid target.
1525
+ // If no next valid target, find the previous valid target.
1526
+ let operation = localState.state.getDropOperation(target, types, drag.allowedDropOperations);
1527
+ if (operation === 'cancel') target = nextValidTarget(target, types, drag.allowedDropOperations, getNextTarget1, false) ?? nextValidTarget(target, types, drag.allowedDropOperations, getPreviousTarget, false);
1528
+ }
1529
+ localState.state.setTarget(target ?? localState.state.target);
1530
+ }
1531
+ break;
1532
+ case 'PageUp':
1533
+ {
1534
+ if (!keyboardDelegate.getKeyPageAbove) break;
1535
+ let target = localState.state.target;
1536
+ if (!target) target = nextValidTarget(null, types, drag.allowedDropOperations, getPreviousTarget);
1537
+ else if (target.type === 'item') {
1538
+ // If at the top already, switch to the root. Otherwise navigate a page up.
1539
+ if (target.key === keyboardDelegate.getFirstKey()) target = {
1540
+ type: 'root'
1541
+ };
1542
+ else {
1543
+ let nextKey = keyboardDelegate.getKeyPageAbove(target.key);
1544
+ let dropPosition = target.dropPosition;
1545
+ if (nextKey == null) {
1546
+ nextKey = keyboardDelegate.getFirstKey();
1547
+ dropPosition = 'before';
1548
+ }
1549
+ target = {
1550
+ type: 'item',
1551
+ key: nextKey,
1552
+ dropPosition: dropPosition
1553
+ };
1554
+ }
1555
+ // If the target does not accept the drop, find the previous valid target.
1556
+ // If no next valid target, find the next valid target.
1557
+ let operation = localState.state.getDropOperation(target, types, drag.allowedDropOperations);
1558
+ if (operation === 'cancel') target = nextValidTarget(target, types, drag.allowedDropOperations, getPreviousTarget, false) ?? nextValidTarget(target, types, drag.allowedDropOperations, getNextTarget1, false);
1559
+ }
1560
+ localState.state.setTarget(target ?? localState.state.target);
1561
+ break;
1562
+ }
1563
+ }
1564
+ }
1565
+ });
1566
+ }, [
1567
+ localState,
1568
+ ref,
1569
+ onDrop
1570
+ ]);
1571
+ let id = $c1cba3854dc3a167$export$b1601eb39394a581(state1);
1572
+ return {
1573
+ collectionProps: $4on3C$reactariautils.mergeProps(dropProps, {
1574
+ id: id,
1575
+ // Remove description from collection element. If dropping on the entire collection,
1576
+ // there should be a drop indicator that has this description, so no need to double announce.
1577
+ 'aria-describedby': null
1578
+ })
1579
+ };
2222
1580
  }
2223
1581
 
2224
- exports.useDropIndicator = useDropIndicator;
2225
- // @ts-ignore
2226
- const $a1d519dfa8f428d414c97a867b60c6f$var$intlMessages = {
2227
- "ar-AE": _babelRuntimeHelpersInteropRequireDefault($a049e8a273c8713c08cfdce886954f2$exports).default,
2228
- "bg-BG": _babelRuntimeHelpersInteropRequireDefault($c7bef18aeb1fd3dc6bd9bba10397f8b2$exports).default,
2229
- "cs-CZ": _babelRuntimeHelpersInteropRequireDefault($c5f1e0261e291b1341633fe9c018c96$exports).default,
2230
- "da-DK": _babelRuntimeHelpersInteropRequireDefault($f3c32be8e4431e03a321f5417e1843b$exports).default,
2231
- "de-DE": _babelRuntimeHelpersInteropRequireDefault($ad0d5ee9d1c1e0643b04e955a34882a6$exports).default,
2232
- "el-GR": _babelRuntimeHelpersInteropRequireDefault($f208c93cf9a0c52cc9fefaad0e63f8$exports).default,
2233
- "en-US": _babelRuntimeHelpersInteropRequireDefault($ece80d58838919a4624d1c28b393f77$exports).default,
2234
- "es-ES": _babelRuntimeHelpersInteropRequireDefault($ee9761bb92f87937ffa91c74828ae143$exports).default,
2235
- "et-EE": _babelRuntimeHelpersInteropRequireDefault($f49178596b64270de232b4c1afb184af$exports).default,
2236
- "fi-FI": _babelRuntimeHelpersInteropRequireDefault($f9bca27008bd46e848c441473e52$exports).default,
2237
- "fr-FR": _babelRuntimeHelpersInteropRequireDefault($abf7975536d94242592c6ec084b35c3f$exports).default,
2238
- "he-IL": _babelRuntimeHelpersInteropRequireDefault($a71b397b5a3444fd4218686dd8961d3$exports).default,
2239
- "hr-HR": _babelRuntimeHelpersInteropRequireDefault($a14560c06b1711b5b49bc92b5237$exports).default,
2240
- "hu-HU": _babelRuntimeHelpersInteropRequireDefault($e2f05728cdfadbce63b4a6a5c67263f3$exports).default,
2241
- "it-IT": _babelRuntimeHelpersInteropRequireDefault($da3198fd20b34c609578436051c8e7f$exports).default,
2242
- "ja-JP": _babelRuntimeHelpersInteropRequireDefault($a6ff3a43ed70d88abb08383457364ed7$exports).default,
2243
- "ko-KR": _babelRuntimeHelpersInteropRequireDefault($dfbfd4f7dc34546b5bb0af666347fbd0$exports).default,
2244
- "lt-LT": _babelRuntimeHelpersInteropRequireDefault($c53389022087f7b6afc79a9c99ef48f$exports).default,
2245
- "lv-LV": _babelRuntimeHelpersInteropRequireDefault($cca63ba6085d5d7fd3ffb0a4e8fc18$exports).default,
2246
- "nb-NO": _babelRuntimeHelpersInteropRequireDefault($d46abea5f59e687d0510d2bd4f77$exports).default,
2247
- "nl-NL": _babelRuntimeHelpersInteropRequireDefault($ac6e3e2426b7582528543cbf5379fc$exports).default,
2248
- "pl-PL": _babelRuntimeHelpersInteropRequireDefault($b97f849030ab4d8852eb85ed8b71$exports).default,
2249
- "pt-BR": _babelRuntimeHelpersInteropRequireDefault($efb2848f59f1d35ef3478522b3937c$exports).default,
2250
- "pt-PT": _babelRuntimeHelpersInteropRequireDefault($c96a96ffd3dfe2ce9bb15340774c6248$exports).default,
2251
- "ro-RO": _babelRuntimeHelpersInteropRequireDefault($cb9664dfd31ac427c76d10c47a7$exports).default,
2252
- "ru-RU": _babelRuntimeHelpersInteropRequireDefault($bb92c9cdbfedd40707a909cb02212287$exports).default,
2253
- "sk-SK": _babelRuntimeHelpersInteropRequireDefault($b67be7ae378fbe0a6b6d5b2bfc2a6a$exports).default,
2254
- "sl-SI": _babelRuntimeHelpersInteropRequireDefault($a75b2e8c856626127ded0a4974ec55e4$exports).default,
2255
- "sr-SP": _babelRuntimeHelpersInteropRequireDefault($ab0b9e23c57c52b70f6a9b9a6ad3bc$exports).default,
2256
- "sv-SE": _babelRuntimeHelpersInteropRequireDefault($be4af2b5be692205e2859aabe9f9$exports).default,
2257
- "tr-TR": _babelRuntimeHelpersInteropRequireDefault($dc264784e2c46ff8f1a7c0bb75a813$exports).default,
2258
- "uk-UA": _babelRuntimeHelpersInteropRequireDefault($bc7a04ab96250610a6ca8cd77cc1$exports).default,
2259
- "zh-CN": _babelRuntimeHelpersInteropRequireDefault($d4f2d0b8fbcdf0615175b386b62b0$exports).default,
2260
- "zh-TW": _babelRuntimeHelpersInteropRequireDefault($e61399ec3e66f955ad58888dbe8848db$exports).default
2261
- };
2262
-
2263
- function useDraggableItem(props, state) {
2264
- let formatMessage = useMessageFormatter($a1d519dfa8f428d414c97a867b60c6f$var$intlMessages);
2265
- let {
2266
- dragProps,
2267
- dragButtonProps
2268
- } = useDrag({
2269
- getItems() {
2270
- return state.getItems(props.key);
2271
- },
2272
1582
 
2273
- renderPreview() {
2274
- return state.renderPreview(props.key);
2275
- },
1583
+ var $bfcc97d22144d9f4$exports = {};
2276
1584
 
2277
- onDragStart(e) {
2278
- state.startDrag(props.key, e);
2279
- },
1585
+ $parcel$export($bfcc97d22144d9f4$exports, "useDroppableItem", () => $bfcc97d22144d9f4$export$f7b0c5d28b66b6a5);
2280
1586
 
2281
- onDragMove(e) {
2282
- state.moveDrag(e);
2283
- },
2284
1587
 
2285
- onDragEnd(e) {
2286
- state.endDrag(e);
2287
- }
2288
1588
 
2289
- });
2290
- let item = state.collection.getItem(props.key);
2291
- let numSelectedKeys = state.selectionManager.selectedKeys.size;
2292
- let isSelected = state.selectionManager.isSelected(props.key);
2293
- let message;
2294
-
2295
- if (isSelected && numSelectedKeys > 1) {
2296
- message = formatMessage('dragSelectedItems', {
2297
- count: numSelectedKeys
2298
- });
2299
- } else {
2300
- var _item$textValue;
2301
1589
 
2302
- message = formatMessage('dragItem', {
2303
- itemText: (_item$textValue = item == null ? void 0 : item.textValue) != null ? _item$textValue : ''
2304
- });
2305
- }
2306
-
2307
- return {
2308
- dragProps,
2309
- dragButtonProps: _babelRuntimeHelpersExtends({}, dragButtonProps, {
2310
- 'aria-label': message
2311
- })
2312
- };
1590
+ function $bfcc97d22144d9f4$export$f7b0c5d28b66b6a5(options, state, ref) {
1591
+ let { dropProps: dropProps } = $116cc020faed051c$export$62447ad3d2ec7da6();
1592
+ $4on3C$react.useEffect(()=>{
1593
+ if (ref.current) return $d69e2bc1de15721f$export$aef80212ac99c003({
1594
+ element: ref.current,
1595
+ target: options.target,
1596
+ getDropOperation (types, allowedOperations) {
1597
+ return state.getDropOperation(options.target, types, allowedOperations);
1598
+ }
1599
+ });
1600
+ }, [
1601
+ ref,
1602
+ options.target,
1603
+ state
1604
+ ]);
1605
+ let dragSession = $d69e2bc1de15721f$export$418e185dd3f1b968();
1606
+ let isValidDropTarget = dragSession && state.getDropOperation(options.target, $c1cba3854dc3a167$export$e1d41611756c6326(dragSession.dragTarget.items), dragSession.dragTarget.allowedDropOperations) !== 'cancel';
1607
+ let isDropTarget = state.isDropTarget(options.target);
1608
+ $4on3C$react.useEffect(()=>{
1609
+ if (dragSession && isDropTarget && ref.current) ref.current.focus();
1610
+ }, [
1611
+ isDropTarget,
1612
+ dragSession,
1613
+ ref
1614
+ ]);
1615
+ return {
1616
+ dropProps: {
1617
+ ...dropProps,
1618
+ 'aria-hidden': !dragSession || isValidDropTarget ? undefined : 'true'
1619
+ }
1620
+ };
2313
1621
  }
2314
1622
 
2315
- exports.useDraggableItem = useDraggableItem;
2316
- const $c1be8e43b63c7fad889cec0e3e2f47d5$var$globalEvents = new Map();
2317
1623
 
2318
- function $c1be8e43b63c7fad889cec0e3e2f47d5$var$addGlobalEventListener(event, fn) {
2319
- let eventData = $c1be8e43b63c7fad889cec0e3e2f47d5$var$globalEvents.get(event);
1624
+ var $dd3402c2521ab910$exports = {};
1625
+
1626
+ $parcel$export($dd3402c2521ab910$exports, "useDropIndicator", () => $dd3402c2521ab910$export$8d0e41d2815afac5);
1627
+
2320
1628
 
2321
- if (!eventData) {
2322
- let handlers = new Set();
2323
1629
 
2324
- let listener = e => {
2325
- for (let handler of handlers) {
2326
- handler(e);
2327
- }
2328
- };
2329
1630
 
2330
- eventData = {
2331
- listener,
2332
- handlers
2333
- };
2334
- $c1be8e43b63c7fad889cec0e3e2f47d5$var$globalEvents.set(event, eventData);
2335
- document.addEventListener(event, listener);
2336
- }
2337
1631
 
2338
- eventData.handlers.add(fn);
2339
- return () => {
2340
- eventData.handlers.delete(fn);
2341
1632
 
2342
- if (eventData.handlers.size === 0) {
2343
- document.removeEventListener(event, eventData.listener);
2344
- $c1be8e43b63c7fad889cec0e3e2f47d5$var$globalEvents.delete(event);
1633
+ function $dd3402c2521ab910$export$8d0e41d2815afac5(props, state, ref) {
1634
+ let { target: target } = props;
1635
+ let { collection: collection } = state;
1636
+ let formatMessage = $4on3C$reactariai18n.useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($a0e2171154b8c4fe$exports)));
1637
+ let dragSession = $d69e2bc1de15721f$export$418e185dd3f1b968();
1638
+ let { dropProps: dropProps } = $bfcc97d22144d9f4$export$f7b0c5d28b66b6a5(props, state, ref);
1639
+ let id = $4on3C$reactariautils.useId();
1640
+ let getText = (key)=>collection.getItem(key)?.textValue
1641
+ ;
1642
+ let label = '';
1643
+ let labelledBy;
1644
+ if (target.type === 'root') {
1645
+ label = formatMessage('dropOnRoot');
1646
+ labelledBy = `${id} ${$c1cba3854dc3a167$export$3093291712f09a77(state)}`;
1647
+ } else if (target.dropPosition === 'on') label = formatMessage('dropOnItem', {
1648
+ itemText: getText(target.key)
1649
+ });
1650
+ else {
1651
+ let before = target.dropPosition === 'before' ? collection.getKeyBefore(target.key) : target.key;
1652
+ let after = target.dropPosition === 'after' ? collection.getKeyAfter(target.key) : target.key;
1653
+ if (before && after) label = formatMessage('insertBetween', {
1654
+ beforeItemText: getText(before),
1655
+ afterItemText: getText(after)
1656
+ });
1657
+ else if (before) label = formatMessage('insertAfter', {
1658
+ itemText: getText(before)
1659
+ });
1660
+ else if (after) label = formatMessage('insertBefore', {
1661
+ itemText: getText(after)
1662
+ });
2345
1663
  }
2346
- };
1664
+ return {
1665
+ dropIndicatorProps: {
1666
+ ...dropProps,
1667
+ id: id,
1668
+ 'aria-roledescription': formatMessage('dropIndicator'),
1669
+ 'aria-label': label,
1670
+ 'aria-labelledby': labelledBy,
1671
+ 'aria-hidden': !dragSession ? 'true' : dropProps['aria-hidden'],
1672
+ tabIndex: -1
1673
+ }
1674
+ };
2347
1675
  }
2348
1676
 
2349
- function useClipboard(options) {
2350
- let ref = useRef(options);
2351
- ref.current = options;
2352
- let isFocusedRef = useRef(false);
2353
- let {
2354
- focusProps
2355
- } = useFocus({
2356
- onFocusChange: isFocused => {
2357
- isFocusedRef.current = isFocused;
2358
- }
2359
- });
2360
- useEffect(() => {
2361
- let onBeforeCopy = e => {
2362
- // Enable the "Copy" menu item in Safari if this element is focused and copying is supported.
2363
- let options = ref.current;
2364
1677
 
2365
- if (isFocusedRef.current && options.getItems) {
2366
- e.preventDefault();
2367
- }
2368
- };
1678
+ var $ef813332c2b7144e$exports = {};
2369
1679
 
2370
- let onCopy = e => {
2371
- let options = ref.current;
1680
+ $parcel$export($ef813332c2b7144e$exports, "useDraggableItem", () => $ef813332c2b7144e$export$b35afafff42da2d9);
2372
1681
 
2373
- if (!isFocusedRef.current || !options.getItems) {
2374
- return;
2375
- }
2376
1682
 
2377
- e.preventDefault();
2378
- $bc29619458500c186021634c18dc$export$writeToDataTransfer(e.clipboardData, options.getItems());
2379
- options.onCopy == null ? void 0 : options.onCopy();
1683
+
1684
+ function $ef813332c2b7144e$export$b35afafff42da2d9(props, state) {
1685
+ let formatMessage = $4on3C$reactariai18n.useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($a0e2171154b8c4fe$exports)));
1686
+ let { dragProps: dragProps , dragButtonProps: dragButtonProps } = $d067e40b40cb0a24$export$7941f8aafa4b6021({
1687
+ getItems () {
1688
+ return state.getItems(props.key);
1689
+ },
1690
+ renderPreview () {
1691
+ return state.renderPreview(props.key);
1692
+ },
1693
+ onDragStart (e) {
1694
+ state.startDrag(props.key, e);
1695
+ },
1696
+ onDragMove (e) {
1697
+ state.moveDrag(e);
1698
+ },
1699
+ onDragEnd (e) {
1700
+ state.endDrag(e);
1701
+ }
1702
+ });
1703
+ let item = state.collection.getItem(props.key);
1704
+ let numSelectedKeys = state.selectionManager.selectedKeys.size;
1705
+ let isSelected = state.selectionManager.isSelected(props.key);
1706
+ let message;
1707
+ if (isSelected && numSelectedKeys > 1) message = formatMessage('dragSelectedItems', {
1708
+ count: numSelectedKeys
1709
+ });
1710
+ else message = formatMessage('dragItem', {
1711
+ itemText: item?.textValue ?? ''
1712
+ });
1713
+ return {
1714
+ dragProps: dragProps,
1715
+ dragButtonProps: {
1716
+ ...dragButtonProps,
1717
+ 'aria-label': message
1718
+ }
2380
1719
  };
1720
+ }
2381
1721
 
2382
- let onBeforeCut = e => {
2383
- let options = ref.current;
2384
1722
 
2385
- if (isFocusedRef.current && options.onCut && options.getItems) {
2386
- e.preventDefault();
2387
- }
2388
- };
1723
+ var $0e4f47463d859da8$exports = {};
2389
1724
 
2390
- let onCut = e => {
2391
- let options = ref.current;
1725
+ $parcel$export($0e4f47463d859da8$exports, "useClipboard", () => $0e4f47463d859da8$export$2314ca2a3e892862);
2392
1726
 
2393
- if (!isFocusedRef.current || !options.onCut || !options.getItems) {
2394
- return;
2395
- }
2396
1727
 
2397
- e.preventDefault();
2398
- $bc29619458500c186021634c18dc$export$writeToDataTransfer(e.clipboardData, options.getItems());
2399
- options.onCut();
2400
- };
2401
1728
 
2402
- let onBeforePaste = e => {
2403
- let options = ref.current; // Unfortunately, e.clipboardData.types is not available in this event so we always
2404
- // have to enable the Paste menu item even if the type of data is unsupported.
2405
1729
 
2406
- if (isFocusedRef.current && options.onPaste) {
2407
- e.preventDefault();
2408
- }
1730
+ const $0e4f47463d859da8$var$globalEvents = new Map();
1731
+ function $0e4f47463d859da8$var$addGlobalEventListener(event, fn) {
1732
+ let eventData = $0e4f47463d859da8$var$globalEvents.get(event);
1733
+ if (!eventData) {
1734
+ let handlers = new Set();
1735
+ let listener = (e)=>{
1736
+ for (let handler of handlers)handler(e);
1737
+ };
1738
+ eventData = {
1739
+ listener: listener,
1740
+ handlers: handlers
1741
+ };
1742
+ $0e4f47463d859da8$var$globalEvents.set(event, eventData);
1743
+ document.addEventListener(event, listener);
1744
+ }
1745
+ eventData.handlers.add(fn);
1746
+ return ()=>{
1747
+ eventData.handlers.delete(fn);
1748
+ if (eventData.handlers.size === 0) {
1749
+ document.removeEventListener(event, eventData.listener);
1750
+ $0e4f47463d859da8$var$globalEvents.delete(event);
1751
+ }
2409
1752
  };
1753
+ }
1754
+ function $0e4f47463d859da8$export$2314ca2a3e892862(options1) {
1755
+ let ref = $4on3C$react.useRef(options1);
1756
+ ref.current = options1;
1757
+ let isFocusedRef = $4on3C$react.useRef(false);
1758
+ let { focusProps: focusProps } = $4on3C$reactariainteractions.useFocus({
1759
+ onFocusChange: (isFocused)=>{
1760
+ isFocusedRef.current = isFocused;
1761
+ }
1762
+ });
1763
+ $4on3C$react.useEffect(()=>{
1764
+ let onBeforeCopy = (e)=>{
1765
+ // Enable the "Copy" menu item in Safari if this element is focused and copying is supported.
1766
+ let options = ref.current;
1767
+ if (isFocusedRef.current && options.getItems) e.preventDefault();
1768
+ };
1769
+ let onCopy = (e)=>{
1770
+ let options = ref.current;
1771
+ if (!isFocusedRef.current || !options.getItems) return;
1772
+ e.preventDefault();
1773
+ $c1cba3854dc3a167$export$f9c1490890ddd063(e.clipboardData, options.getItems());
1774
+ options.onCopy?.();
1775
+ };
1776
+ let onBeforeCut = (e)=>{
1777
+ let options = ref.current;
1778
+ if (isFocusedRef.current && options.onCut && options.getItems) e.preventDefault();
1779
+ };
1780
+ let onCut = (e)=>{
1781
+ let options = ref.current;
1782
+ if (!isFocusedRef.current || !options.onCut || !options.getItems) return;
1783
+ e.preventDefault();
1784
+ $c1cba3854dc3a167$export$f9c1490890ddd063(e.clipboardData, options.getItems());
1785
+ options.onCut();
1786
+ };
1787
+ let onBeforePaste = (e)=>{
1788
+ let options = ref.current;
1789
+ // Unfortunately, e.clipboardData.types is not available in this event so we always
1790
+ // have to enable the Paste menu item even if the type of data is unsupported.
1791
+ if (isFocusedRef.current && options.onPaste) e.preventDefault();
1792
+ };
1793
+ let onPaste = (e)=>{
1794
+ let options = ref.current;
1795
+ if (!isFocusedRef.current || !options.onPaste) return;
1796
+ e.preventDefault();
1797
+ let items = $c1cba3854dc3a167$export$d9e760437831f8b3(e.clipboardData);
1798
+ options.onPaste(items);
1799
+ };
1800
+ return $4on3C$reactariautils.chain($0e4f47463d859da8$var$addGlobalEventListener('beforecopy', onBeforeCopy), $0e4f47463d859da8$var$addGlobalEventListener('copy', onCopy), $0e4f47463d859da8$var$addGlobalEventListener('beforecut', onBeforeCut), $0e4f47463d859da8$var$addGlobalEventListener('cut', onCut), $0e4f47463d859da8$var$addGlobalEventListener('beforepaste', onBeforePaste), $0e4f47463d859da8$var$addGlobalEventListener('paste', onPaste));
1801
+ }, []);
1802
+ return {
1803
+ clipboardProps: focusProps
1804
+ };
1805
+ }
2410
1806
 
2411
- let onPaste = e => {
2412
- let options = ref.current;
2413
-
2414
- if (!isFocusedRef.current || !options.onPaste) {
2415
- return;
2416
- }
2417
1807
 
2418
- e.preventDefault();
2419
- let items = $bc29619458500c186021634c18dc$export$readFromDataTransfer(e.clipboardData);
2420
- options.onPaste(items);
2421
- };
1808
+ $parcel$exportWildcard(module.exports, $d067e40b40cb0a24$exports);
1809
+ $parcel$exportWildcard(module.exports, $444fab3ca6c3b038$exports);
1810
+ $parcel$exportWildcard(module.exports, $f56fb52b53faaf3d$exports);
1811
+ $parcel$exportWildcard(module.exports, $bfcc97d22144d9f4$exports);
1812
+ $parcel$exportWildcard(module.exports, $dd3402c2521ab910$exports);
1813
+ $parcel$exportWildcard(module.exports, $ef813332c2b7144e$exports);
1814
+ $parcel$exportWildcard(module.exports, $0e4f47463d859da8$exports);
2422
1815
 
2423
- return chain($c1be8e43b63c7fad889cec0e3e2f47d5$var$addGlobalEventListener('beforecopy', onBeforeCopy), $c1be8e43b63c7fad889cec0e3e2f47d5$var$addGlobalEventListener('copy', onCopy), $c1be8e43b63c7fad889cec0e3e2f47d5$var$addGlobalEventListener('beforecut', onBeforeCut), $c1be8e43b63c7fad889cec0e3e2f47d5$var$addGlobalEventListener('cut', onCut), $c1be8e43b63c7fad889cec0e3e2f47d5$var$addGlobalEventListener('beforepaste', onBeforePaste), $c1be8e43b63c7fad889cec0e3e2f47d5$var$addGlobalEventListener('paste', onPaste));
2424
- }, []);
2425
- return {
2426
- clipboardProps: focusProps
2427
- };
2428
- }
2429
1816
 
2430
- exports.useClipboard = useClipboard;
2431
1817
  //# sourceMappingURL=main.js.map