@cubone/react-file-manager 1.19.0 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -30
- package/dist/react-file-manager.es.js +467 -464
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as De from "react";
|
|
2
|
-
import Pe, { useState as L, useRef as
|
|
2
|
+
import Pe, { useState as L, useRef as fe, useEffect as te, createContext as Ie, useContext as $e, useCallback as fr, useLayoutEffect as un, useMemo as yt } from "react";
|
|
3
3
|
function dn(e) {
|
|
4
4
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
5
5
|
}
|
|
@@ -47,8 +47,8 @@ function hn() {
|
|
|
47
47
|
var m = M && o[M] || o[z];
|
|
48
48
|
return typeof m == "function" ? m : null;
|
|
49
49
|
}
|
|
50
|
-
var
|
|
51
|
-
function
|
|
50
|
+
var j = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
51
|
+
function C(o) {
|
|
52
52
|
{
|
|
53
53
|
for (var m = arguments.length, T = new Array(m > 1 ? m - 1 : 0), B = 1; B < m; B++)
|
|
54
54
|
T[B - 1] = arguments[B];
|
|
@@ -57,10 +57,10 @@ function hn() {
|
|
|
57
57
|
}
|
|
58
58
|
function y(o, m, T) {
|
|
59
59
|
{
|
|
60
|
-
var B =
|
|
60
|
+
var B = j.ReactDebugCurrentFrame, re = B.getStackAddendum();
|
|
61
61
|
re !== "" && (m += "%s", T = T.concat([re]));
|
|
62
|
-
var ie = T.map(function(
|
|
63
|
-
return String(
|
|
62
|
+
var ie = T.map(function(Q) {
|
|
63
|
+
return String(Q);
|
|
64
64
|
});
|
|
65
65
|
ie.unshift("Warning: " + m), Function.prototype.apply.call(console[o], console, ie);
|
|
66
66
|
}
|
|
@@ -87,7 +87,7 @@ function hn() {
|
|
|
87
87
|
function N(o) {
|
|
88
88
|
if (o == null)
|
|
89
89
|
return null;
|
|
90
|
-
if (typeof o.tag == "number" &&
|
|
90
|
+
if (typeof o.tag == "number" && C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
|
|
91
91
|
return o.displayName || o.name || null;
|
|
92
92
|
if (typeof o == "string")
|
|
93
93
|
return o;
|
|
@@ -119,9 +119,9 @@ function hn() {
|
|
|
119
119
|
var B = o.displayName || null;
|
|
120
120
|
return B !== null ? B : N(o.type) || "Memo";
|
|
121
121
|
case w: {
|
|
122
|
-
var re = o, ie = re._payload,
|
|
122
|
+
var re = o, ie = re._payload, Q = re._init;
|
|
123
123
|
try {
|
|
124
|
-
return N(
|
|
124
|
+
return N(Q(ie));
|
|
125
125
|
} catch {
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
@@ -129,14 +129,14 @@ function hn() {
|
|
|
129
129
|
}
|
|
130
130
|
return null;
|
|
131
131
|
}
|
|
132
|
-
var
|
|
132
|
+
var G = Object.assign, ae = 0, oe, ce, ee, ve, v, P, V;
|
|
133
133
|
function W() {
|
|
134
134
|
}
|
|
135
135
|
W.__reactDisabledLog = !0;
|
|
136
136
|
function I() {
|
|
137
137
|
{
|
|
138
|
-
if (
|
|
139
|
-
|
|
138
|
+
if (ae === 0) {
|
|
139
|
+
oe = console.log, ce = console.info, ee = console.warn, ve = console.error, v = console.group, P = console.groupCollapsed, V = console.groupEnd;
|
|
140
140
|
var o = {
|
|
141
141
|
configurable: !0,
|
|
142
142
|
enumerable: !0,
|
|
@@ -153,46 +153,46 @@ function hn() {
|
|
|
153
153
|
groupEnd: o
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
|
-
|
|
156
|
+
ae++;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
function X() {
|
|
160
160
|
{
|
|
161
|
-
if (
|
|
161
|
+
if (ae--, ae === 0) {
|
|
162
162
|
var o = {
|
|
163
163
|
configurable: !0,
|
|
164
164
|
enumerable: !0,
|
|
165
165
|
writable: !0
|
|
166
166
|
};
|
|
167
167
|
Object.defineProperties(console, {
|
|
168
|
-
log:
|
|
169
|
-
value:
|
|
168
|
+
log: G({}, o, {
|
|
169
|
+
value: oe
|
|
170
170
|
}),
|
|
171
|
-
info:
|
|
172
|
-
value:
|
|
171
|
+
info: G({}, o, {
|
|
172
|
+
value: ce
|
|
173
173
|
}),
|
|
174
|
-
warn:
|
|
175
|
-
value:
|
|
174
|
+
warn: G({}, o, {
|
|
175
|
+
value: ee
|
|
176
176
|
}),
|
|
177
|
-
error:
|
|
178
|
-
value:
|
|
177
|
+
error: G({}, o, {
|
|
178
|
+
value: ve
|
|
179
179
|
}),
|
|
180
|
-
group:
|
|
180
|
+
group: G({}, o, {
|
|
181
181
|
value: v
|
|
182
182
|
}),
|
|
183
|
-
groupCollapsed:
|
|
183
|
+
groupCollapsed: G({}, o, {
|
|
184
184
|
value: P
|
|
185
185
|
}),
|
|
186
|
-
groupEnd:
|
|
186
|
+
groupEnd: G({}, o, {
|
|
187
187
|
value: V
|
|
188
188
|
})
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
|
-
|
|
191
|
+
ae < 0 && C("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
var O =
|
|
195
|
-
function
|
|
194
|
+
var O = j.ReactCurrentDispatcher, $;
|
|
195
|
+
function q(o, m, T) {
|
|
196
196
|
{
|
|
197
197
|
if ($ === void 0)
|
|
198
198
|
try {
|
|
@@ -205,16 +205,16 @@ function hn() {
|
|
|
205
205
|
` + $ + o;
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
var Z = !1,
|
|
208
|
+
var Z = !1, U;
|
|
209
209
|
{
|
|
210
|
-
var
|
|
211
|
-
|
|
210
|
+
var he = typeof WeakMap == "function" ? WeakMap : Map;
|
|
211
|
+
U = new he();
|
|
212
212
|
}
|
|
213
213
|
function E(o, m) {
|
|
214
214
|
if (!o || Z)
|
|
215
215
|
return "";
|
|
216
216
|
{
|
|
217
|
-
var T =
|
|
217
|
+
var T = U.get(o);
|
|
218
218
|
if (T !== void 0)
|
|
219
219
|
return T;
|
|
220
220
|
}
|
|
@@ -226,62 +226,62 @@ function hn() {
|
|
|
226
226
|
ie = O.current, O.current = null, I();
|
|
227
227
|
try {
|
|
228
228
|
if (m) {
|
|
229
|
-
var
|
|
229
|
+
var Q = function() {
|
|
230
230
|
throw Error();
|
|
231
231
|
};
|
|
232
|
-
if (Object.defineProperty(
|
|
232
|
+
if (Object.defineProperty(Q.prototype, "props", {
|
|
233
233
|
set: function() {
|
|
234
234
|
throw Error();
|
|
235
235
|
}
|
|
236
236
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
237
237
|
try {
|
|
238
|
-
Reflect.construct(
|
|
239
|
-
} catch (
|
|
240
|
-
B =
|
|
238
|
+
Reflect.construct(Q, []);
|
|
239
|
+
} catch (je) {
|
|
240
|
+
B = je;
|
|
241
241
|
}
|
|
242
|
-
Reflect.construct(o, [],
|
|
242
|
+
Reflect.construct(o, [], Q);
|
|
243
243
|
} else {
|
|
244
244
|
try {
|
|
245
|
-
|
|
246
|
-
} catch (
|
|
247
|
-
B =
|
|
245
|
+
Q.call();
|
|
246
|
+
} catch (je) {
|
|
247
|
+
B = je;
|
|
248
248
|
}
|
|
249
|
-
o.call(
|
|
249
|
+
o.call(Q.prototype);
|
|
250
250
|
}
|
|
251
251
|
} else {
|
|
252
252
|
try {
|
|
253
253
|
throw Error();
|
|
254
|
-
} catch (
|
|
255
|
-
B =
|
|
254
|
+
} catch (je) {
|
|
255
|
+
B = je;
|
|
256
256
|
}
|
|
257
257
|
o();
|
|
258
258
|
}
|
|
259
|
-
} catch (
|
|
260
|
-
if (
|
|
261
|
-
for (var J =
|
|
262
|
-
`),
|
|
263
|
-
`),
|
|
264
|
-
|
|
265
|
-
for (;
|
|
266
|
-
if (J[
|
|
267
|
-
if (
|
|
259
|
+
} catch (je) {
|
|
260
|
+
if (je && B && typeof je.stack == "string") {
|
|
261
|
+
for (var J = je.stack.split(`
|
|
262
|
+
`), ge = B.stack.split(`
|
|
263
|
+
`), le = J.length - 1, de = ge.length - 1; le >= 1 && de >= 0 && J[le] !== ge[de]; )
|
|
264
|
+
de--;
|
|
265
|
+
for (; le >= 1 && de >= 0; le--, de--)
|
|
266
|
+
if (J[le] !== ge[de]) {
|
|
267
|
+
if (le !== 1 || de !== 1)
|
|
268
268
|
do
|
|
269
|
-
if (
|
|
269
|
+
if (le--, de--, de < 0 || J[le] !== ge[de]) {
|
|
270
270
|
var be = `
|
|
271
|
-
` + J[
|
|
272
|
-
return o.displayName && be.includes("<anonymous>") && (be = be.replace("<anonymous>", o.displayName)), typeof o == "function" &&
|
|
271
|
+
` + J[le].replace(" at new ", " at ");
|
|
272
|
+
return o.displayName && be.includes("<anonymous>") && (be = be.replace("<anonymous>", o.displayName)), typeof o == "function" && U.set(o, be), be;
|
|
273
273
|
}
|
|
274
|
-
while (
|
|
274
|
+
while (le >= 1 && de >= 0);
|
|
275
275
|
break;
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
} finally {
|
|
279
279
|
Z = !1, O.current = ie, X(), Error.prepareStackTrace = re;
|
|
280
280
|
}
|
|
281
|
-
var ke = o ? o.displayName || o.name : "", Me = ke ?
|
|
282
|
-
return typeof o == "function" &&
|
|
281
|
+
var ke = o ? o.displayName || o.name : "", Me = ke ? q(ke) : "";
|
|
282
|
+
return typeof o == "function" && U.set(o, Me), Me;
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function me(o, m, T) {
|
|
285
285
|
return E(o, !1);
|
|
286
286
|
}
|
|
287
287
|
function Te(o) {
|
|
@@ -294,17 +294,17 @@ function hn() {
|
|
|
294
294
|
if (typeof o == "function")
|
|
295
295
|
return E(o, Te(o));
|
|
296
296
|
if (typeof o == "string")
|
|
297
|
-
return
|
|
297
|
+
return q(o);
|
|
298
298
|
switch (o) {
|
|
299
299
|
case p:
|
|
300
|
-
return
|
|
300
|
+
return q("Suspense");
|
|
301
301
|
case f:
|
|
302
|
-
return
|
|
302
|
+
return q("SuspenseList");
|
|
303
303
|
}
|
|
304
304
|
if (typeof o == "object")
|
|
305
305
|
switch (o.$$typeof) {
|
|
306
306
|
case d:
|
|
307
|
-
return
|
|
307
|
+
return me(o.render);
|
|
308
308
|
case h:
|
|
309
309
|
return Y(o.type, m, T);
|
|
310
310
|
case w: {
|
|
@@ -317,7 +317,7 @@ function hn() {
|
|
|
317
317
|
}
|
|
318
318
|
return "";
|
|
319
319
|
}
|
|
320
|
-
var
|
|
320
|
+
var ue = Object.prototype.hasOwnProperty, Ce = {}, Re = j.ReactDebugCurrentFrame;
|
|
321
321
|
function we(o) {
|
|
322
322
|
if (o) {
|
|
323
323
|
var m = o._owner, T = Y(o.type, o._source, m ? m.type : null);
|
|
@@ -327,20 +327,20 @@ function hn() {
|
|
|
327
327
|
}
|
|
328
328
|
function He(o, m, T, B, re) {
|
|
329
329
|
{
|
|
330
|
-
var ie = Function.call.bind(
|
|
331
|
-
for (var
|
|
332
|
-
if (ie(o,
|
|
330
|
+
var ie = Function.call.bind(ue);
|
|
331
|
+
for (var Q in o)
|
|
332
|
+
if (ie(o, Q)) {
|
|
333
333
|
var J = void 0;
|
|
334
334
|
try {
|
|
335
|
-
if (typeof o[
|
|
336
|
-
var
|
|
337
|
-
throw
|
|
335
|
+
if (typeof o[Q] != "function") {
|
|
336
|
+
var ge = Error((B || "React class") + ": " + T + " type `" + Q + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[Q] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
337
|
+
throw ge.name = "Invariant Violation", ge;
|
|
338
338
|
}
|
|
339
|
-
J = o[
|
|
340
|
-
} catch (
|
|
341
|
-
J =
|
|
339
|
+
J = o[Q](m, Q, B, T, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
340
|
+
} catch (le) {
|
|
341
|
+
J = le;
|
|
342
342
|
}
|
|
343
|
-
J && !(J instanceof Error) && (we(re),
|
|
343
|
+
J && !(J instanceof Error) && (we(re), C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", B || "React class", T, Q, typeof J), we(null)), J instanceof Error && !(J.message in Ce) && (Ce[J.message] = !0, we(re), C("Failed %s type: %s", T, J.message), we(null));
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
}
|
|
@@ -366,24 +366,24 @@ function hn() {
|
|
|
366
366
|
}
|
|
367
367
|
function wt(o) {
|
|
368
368
|
if (Vr(o))
|
|
369
|
-
return
|
|
369
|
+
return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Wr(o)), bt(o);
|
|
370
370
|
}
|
|
371
|
-
var Et =
|
|
371
|
+
var Et = j.ReactCurrentOwner, Yr = {
|
|
372
372
|
key: !0,
|
|
373
373
|
ref: !0,
|
|
374
374
|
__self: !0,
|
|
375
375
|
__source: !0
|
|
376
376
|
}, Rt, Pt;
|
|
377
|
-
function
|
|
378
|
-
if (
|
|
377
|
+
function qr(o) {
|
|
378
|
+
if (ue.call(o, "ref")) {
|
|
379
379
|
var m = Object.getOwnPropertyDescriptor(o, "ref").get;
|
|
380
380
|
if (m && m.isReactWarning)
|
|
381
381
|
return !1;
|
|
382
382
|
}
|
|
383
383
|
return o.ref !== void 0;
|
|
384
384
|
}
|
|
385
|
-
function
|
|
386
|
-
if (
|
|
385
|
+
function Ur(o) {
|
|
386
|
+
if (ue.call(o, "key")) {
|
|
387
387
|
var m = Object.getOwnPropertyDescriptor(o, "key").get;
|
|
388
388
|
if (m && m.isReactWarning)
|
|
389
389
|
return !1;
|
|
@@ -396,7 +396,7 @@ function hn() {
|
|
|
396
396
|
function Xr(o, m) {
|
|
397
397
|
{
|
|
398
398
|
var T = function() {
|
|
399
|
-
Rt || (Rt = !0,
|
|
399
|
+
Rt || (Rt = !0, C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", m));
|
|
400
400
|
};
|
|
401
401
|
T.isReactWarning = !0, Object.defineProperty(o, "key", {
|
|
402
402
|
get: T,
|
|
@@ -407,7 +407,7 @@ function hn() {
|
|
|
407
407
|
function Gr(o, m) {
|
|
408
408
|
{
|
|
409
409
|
var T = function() {
|
|
410
|
-
Pt || (Pt = !0,
|
|
410
|
+
Pt || (Pt = !0, C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", m));
|
|
411
411
|
};
|
|
412
412
|
T.isReactWarning = !0, Object.defineProperty(o, "ref", {
|
|
413
413
|
get: T,
|
|
@@ -415,7 +415,7 @@ function hn() {
|
|
|
415
415
|
});
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
var Jr = function(o, m, T, B, re, ie,
|
|
418
|
+
var Jr = function(o, m, T, B, re, ie, Q) {
|
|
419
419
|
var J = {
|
|
420
420
|
// This tag allows us to uniquely identify this as a React Element
|
|
421
421
|
$$typeof: r,
|
|
@@ -423,7 +423,7 @@ function hn() {
|
|
|
423
423
|
type: o,
|
|
424
424
|
key: m,
|
|
425
425
|
ref: T,
|
|
426
|
-
props:
|
|
426
|
+
props: Q,
|
|
427
427
|
// Record the component responsible for creating this element.
|
|
428
428
|
_owner: ie
|
|
429
429
|
};
|
|
@@ -446,23 +446,23 @@ function hn() {
|
|
|
446
446
|
};
|
|
447
447
|
function Zr(o, m, T, B, re) {
|
|
448
448
|
{
|
|
449
|
-
var ie,
|
|
450
|
-
T !== void 0 && (wt(T), J = "" + T),
|
|
449
|
+
var ie, Q = {}, J = null, ge = null;
|
|
450
|
+
T !== void 0 && (wt(T), J = "" + T), Ur(m) && (wt(m.key), J = "" + m.key), qr(m) && (ge = m.ref, Kr(m, re));
|
|
451
451
|
for (ie in m)
|
|
452
|
-
|
|
452
|
+
ue.call(m, ie) && !Yr.hasOwnProperty(ie) && (Q[ie] = m[ie]);
|
|
453
453
|
if (o && o.defaultProps) {
|
|
454
|
-
var
|
|
455
|
-
for (ie in
|
|
456
|
-
|
|
454
|
+
var le = o.defaultProps;
|
|
455
|
+
for (ie in le)
|
|
456
|
+
Q[ie] === void 0 && (Q[ie] = le[ie]);
|
|
457
457
|
}
|
|
458
|
-
if (J ||
|
|
459
|
-
var
|
|
460
|
-
J && Xr(
|
|
458
|
+
if (J || ge) {
|
|
459
|
+
var de = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
|
|
460
|
+
J && Xr(Q, de), ge && Gr(Q, de);
|
|
461
461
|
}
|
|
462
|
-
return Jr(o, J,
|
|
462
|
+
return Jr(o, J, ge, re, B, Et.current, Q);
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
|
-
var tt =
|
|
465
|
+
var tt = j.ReactCurrentOwner, Tt = j.ReactDebugCurrentFrame;
|
|
466
466
|
function Oe(o) {
|
|
467
467
|
if (o) {
|
|
468
468
|
var m = o._owner, T = Y(o.type, o._source, m ? m.type : null);
|
|
@@ -513,7 +513,7 @@ Check the top-level render call using <` + T + ">.");
|
|
|
513
513
|
return;
|
|
514
514
|
St[T] = !0;
|
|
515
515
|
var B = "";
|
|
516
|
-
o && o._owner && o._owner !== tt.current && (B = " It was passed a child from " + N(o._owner.type) + "."), Oe(o),
|
|
516
|
+
o && o._owner && o._owner !== tt.current && (B = " It was passed a child from " + N(o._owner.type) + "."), Oe(o), C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', T, B), Oe(null);
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
519
|
function Lt(o, m) {
|
|
@@ -530,8 +530,8 @@ Check the top-level render call using <` + T + ">.");
|
|
|
530
530
|
else if (o) {
|
|
531
531
|
var re = A(o);
|
|
532
532
|
if (typeof re == "function" && re !== o.entries)
|
|
533
|
-
for (var ie = re.call(o),
|
|
534
|
-
nt(
|
|
533
|
+
for (var ie = re.call(o), Q; !(Q = ie.next()).done; )
|
|
534
|
+
nt(Q.value) && Mt(Q.value, m);
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
537
|
}
|
|
@@ -555,9 +555,9 @@ Check the top-level render call using <` + T + ">.");
|
|
|
555
555
|
} else if (m.PropTypes !== void 0 && !rt) {
|
|
556
556
|
rt = !0;
|
|
557
557
|
var re = N(m);
|
|
558
|
-
|
|
558
|
+
C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", re || "Unknown");
|
|
559
559
|
}
|
|
560
|
-
typeof m.getDefaultProps == "function" && !m.getDefaultProps.isReactClassApproved &&
|
|
560
|
+
typeof m.getDefaultProps == "function" && !m.getDefaultProps.isReactClassApproved && C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
561
561
|
}
|
|
562
562
|
}
|
|
563
563
|
function rn(o) {
|
|
@@ -565,29 +565,29 @@ Check the top-level render call using <` + T + ">.");
|
|
|
565
565
|
for (var m = Object.keys(o.props), T = 0; T < m.length; T++) {
|
|
566
566
|
var B = m[T];
|
|
567
567
|
if (B !== "children" && B !== "key") {
|
|
568
|
-
Oe(o),
|
|
568
|
+
Oe(o), C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", B), Oe(null);
|
|
569
569
|
break;
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
|
-
o.ref !== null && (Oe(o),
|
|
572
|
+
o.ref !== null && (Oe(o), C("Invalid attribute `ref` supplied to `React.Fragment`."), Oe(null));
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
575
|
var Ot = {};
|
|
576
576
|
function kt(o, m, T, B, re, ie) {
|
|
577
577
|
{
|
|
578
|
-
var
|
|
579
|
-
if (!
|
|
578
|
+
var Q = F(o);
|
|
579
|
+
if (!Q) {
|
|
580
580
|
var J = "";
|
|
581
581
|
(o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (J += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
582
|
-
var
|
|
583
|
-
|
|
584
|
-
var
|
|
585
|
-
o === null ?
|
|
582
|
+
var ge = Qr();
|
|
583
|
+
ge ? J += ge : J += Ft();
|
|
584
|
+
var le;
|
|
585
|
+
o === null ? le = "null" : et(o) ? le = "array" : o !== void 0 && o.$$typeof === r ? (le = "<" + (N(o.type) || "Unknown") + " />", J = " Did you accidentally export a JSX literal instead of a component?") : le = typeof o, C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", le, J);
|
|
586
586
|
}
|
|
587
|
-
var
|
|
588
|
-
if (
|
|
589
|
-
return
|
|
590
|
-
if (
|
|
587
|
+
var de = Zr(o, m, T, re, ie);
|
|
588
|
+
if (de == null)
|
|
589
|
+
return de;
|
|
590
|
+
if (Q) {
|
|
591
591
|
var be = m.children;
|
|
592
592
|
if (be !== void 0)
|
|
593
593
|
if (B)
|
|
@@ -596,17 +596,17 @@ Check the top-level render call using <` + T + ">.");
|
|
|
596
596
|
Lt(be[ke], o);
|
|
597
597
|
Object.freeze && Object.freeze(be);
|
|
598
598
|
} else
|
|
599
|
-
|
|
599
|
+
C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
600
600
|
else
|
|
601
601
|
Lt(be, o);
|
|
602
602
|
}
|
|
603
|
-
if (
|
|
604
|
-
var Me = N(o),
|
|
603
|
+
if (ue.call(m, "key")) {
|
|
604
|
+
var Me = N(o), je = Object.keys(m).filter(function(ln) {
|
|
605
605
|
return ln !== "key";
|
|
606
|
-
}), st =
|
|
606
|
+
}), st = je.length > 0 ? "{key: someKey, " + je.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
607
607
|
if (!Ot[Me + st]) {
|
|
608
|
-
var cn =
|
|
609
|
-
|
|
608
|
+
var cn = je.length > 0 ? "{" + je.join(": ..., ") + ": ...}" : "{}";
|
|
609
|
+
C(`A props object containing a "key" prop is being spread into JSX:
|
|
610
610
|
let props = %s;
|
|
611
611
|
<%s {...props} />
|
|
612
612
|
React keys must be passed directly to JSX without using spread:
|
|
@@ -614,7 +614,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
614
614
|
<%s key={someKey} {...props} />`, st, Me, cn, Me), Ot[Me + st] = !0;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
|
-
return o === s ? rn(
|
|
617
|
+
return o === s ? rn(de) : tn(de), de;
|
|
618
618
|
}
|
|
619
619
|
}
|
|
620
620
|
function nn(o, m, T) {
|
|
@@ -709,11 +709,11 @@ function pr(e) {
|
|
|
709
709
|
}, r.attr), pr(r.child)));
|
|
710
710
|
}
|
|
711
711
|
function H(e) {
|
|
712
|
-
return (r) => /* @__PURE__ */ Pe.createElement(
|
|
712
|
+
return (r) => /* @__PURE__ */ Pe.createElement(jn, Ve({
|
|
713
713
|
attr: Ye({}, e.attr)
|
|
714
714
|
}, r), pr(e.child));
|
|
715
715
|
}
|
|
716
|
-
function
|
|
716
|
+
function jn(e) {
|
|
717
717
|
var r = (n) => {
|
|
718
718
|
var {
|
|
719
719
|
attr: s,
|
|
@@ -736,10 +736,10 @@ function Cn(e) {
|
|
|
736
736
|
};
|
|
737
737
|
return zt !== void 0 ? /* @__PURE__ */ Pe.createElement(zt.Consumer, null, (n) => r(n)) : r(hr);
|
|
738
738
|
}
|
|
739
|
-
function
|
|
739
|
+
function Cn(e) {
|
|
740
740
|
return H({ tag: "svg", attr: { version: "1.1", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M16 8c-0.020-1.045-0.247-2.086-0.665-3.038-0.417-0.953-1.023-1.817-1.766-2.53s-1.624-1.278-2.578-1.651c-0.953-0.374-1.978-0.552-2.991-0.531-1.013 0.020-2.021 0.24-2.943 0.646-0.923 0.405-1.758 0.992-2.449 1.712s-1.237 1.574-1.597 2.497c-0.361 0.923-0.533 1.914-0.512 2.895 0.020 0.981 0.234 1.955 0.627 2.847 0.392 0.892 0.961 1.7 1.658 2.368s1.523 1.195 2.416 1.543c0.892 0.348 1.851 0.514 2.799 0.493 0.949-0.020 1.89-0.227 2.751-0.608 0.862-0.379 1.642-0.929 2.287-1.604s1.154-1.472 1.488-2.335c0.204-0.523 0.342-1.069 0.415-1.622 0.019 0.001 0.039 0.002 0.059 0.002 0.552 0 1-0.448 1-1 0-0.028-0.001-0.056-0.004-0.083h0.004zM14.411 10.655c-0.367 0.831-0.898 1.584-1.55 2.206s-1.422 1.112-2.254 1.434c-0.832 0.323-1.723 0.476-2.608 0.454-0.884-0.020-1.759-0.215-2.56-0.57-0.801-0.354-1.526-0.867-2.125-1.495s-1.071-1.371-1.38-2.173c-0.31-0.801-0.457-1.66-0.435-2.512s0.208-1.694 0.551-2.464c0.342-0.77 0.836-1.468 1.441-2.044s1.321-1.029 2.092-1.326c0.771-0.298 1.596-0.438 2.416-0.416s1.629 0.202 2.368 0.532c0.74 0.329 1.41 0.805 1.963 1.387s0.988 1.27 1.272 2.011c0.285 0.74 0.418 1.532 0.397 2.32h0.004c-0.002 0.027-0.004 0.055-0.004 0.083 0 0.516 0.39 0.94 0.892 0.994-0.097 0.544-0.258 1.075-0.481 1.578z" }, child: [] }] })(e);
|
|
741
741
|
}
|
|
742
|
-
const xt = ({ loading: e = !1, className: r }) => e ? /* @__PURE__ */ t.jsx("div", { className: `loader-container ${r}`, children: /* @__PURE__ */ t.jsx(
|
|
742
|
+
const xt = ({ loading: e = !1, className: r }) => e ? /* @__PURE__ */ t.jsx("div", { className: `loader-container ${r}`, children: /* @__PURE__ */ t.jsx(Cn, { className: "spinner" }) }) : null;
|
|
743
743
|
function vr(e) {
|
|
744
744
|
return H({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1z" }, child: [] }] })(e);
|
|
745
745
|
}
|
|
@@ -773,13 +773,13 @@ function Rn(e) {
|
|
|
773
773
|
function Pn(e) {
|
|
774
774
|
return H({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" }, child: [] }] })(e);
|
|
775
775
|
}
|
|
776
|
-
function
|
|
776
|
+
function jr(e) {
|
|
777
777
|
return H({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0V0z" }, child: [] }, { tag: "path", attr: { d: "M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z" }, child: [] }] })(e);
|
|
778
778
|
}
|
|
779
|
-
function
|
|
779
|
+
function jt(e) {
|
|
780
780
|
return H({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zm-1-4-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5 5-5z" }, child: [] }] })(e);
|
|
781
781
|
}
|
|
782
|
-
function
|
|
782
|
+
function Cr(e) {
|
|
783
783
|
return H({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5-5 5z" }, child: [] }] })(e);
|
|
784
784
|
}
|
|
785
785
|
function Tn(e) {
|
|
@@ -800,7 +800,7 @@ function Sn(e) {
|
|
|
800
800
|
function Mn(e) {
|
|
801
801
|
return H({ tag: "svg", attr: { viewBox: "0 0 640 512" }, child: [{ tag: "path", attr: { d: "M128 0C92.7 0 64 28.7 64 64l0 224-44.8 0C8.6 288 0 296.6 0 307.2C0 349.6 34.4 384 76.8 384L320 384l0-96-192 0 0-224 320 0 0 32 64 0 0-32c0-35.3-28.7-64-64-64L128 0zM512 128l-112 0c-26.5 0-48 21.5-48 48l0 288c0 26.5 21.5 48 48 48l192 0c26.5 0 48-21.5 48-48l0-208-96 0c-17.7 0-32-14.3-32-32l0-96zm32 0l0 96 96 0-96-96z" }, child: [] }] })(e);
|
|
802
802
|
}
|
|
803
|
-
function
|
|
803
|
+
function qe(e) {
|
|
804
804
|
return H({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M64 144a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L192 64zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zM64 464a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm48-208a48 48 0 1 0 -96 0 48 48 0 1 0 96 0z" }, child: [] }] })(e);
|
|
805
805
|
}
|
|
806
806
|
function It(e) {
|
|
@@ -833,7 +833,7 @@ function Wt(e) {
|
|
|
833
833
|
function kn(e) {
|
|
834
834
|
return H({ tag: "svg", attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16l48 0c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l48 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm48 112c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm0 64c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm-6.3 71.8L82.1 335.9c-1.4 5.4-2.1 10.9-2.1 16.4c0 35.2 28.8 63.7 64 63.7s64-28.5 64-63.7c0-5.5-.7-11.1-2.1-16.4l-23.5-88.2c-3.7-14-16.4-23.8-30.9-23.8l-14.8 0c-14.5 0-27.2 9.7-30.9 23.8zM128 336l32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z" }, child: [] }] })(e);
|
|
835
835
|
}
|
|
836
|
-
function
|
|
836
|
+
function Ue(e) {
|
|
837
837
|
return H({ tag: "svg", attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M320 464c8.8 0 16-7.2 16-16l0-288-80 0c-17.7 0-32-14.3-32-32l0-80L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16l256 0zM0 64C0 28.7 28.7 0 64 0L229.5 0c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64z" }, child: [] }] })(e);
|
|
838
838
|
}
|
|
839
839
|
function Vt(e) {
|
|
@@ -844,7 +844,7 @@ function mt(e) {
|
|
|
844
844
|
}
|
|
845
845
|
const Be = (e = () => {
|
|
846
846
|
}) => {
|
|
847
|
-
const [r, n] = L(!1), s =
|
|
847
|
+
const [r, n] = L(!1), s = fe(null), a = (i) => {
|
|
848
848
|
var c;
|
|
849
849
|
(c = s.current) != null && c.contains(i.target) ? n(!1) : (n(!0), e(i, s));
|
|
850
850
|
};
|
|
@@ -869,7 +869,7 @@ const Be = (e = () => {
|
|
|
869
869
|
{
|
|
870
870
|
key: "list",
|
|
871
871
|
name: "List",
|
|
872
|
-
icon: /* @__PURE__ */ t.jsx(
|
|
872
|
+
icon: /* @__PURE__ */ t.jsx(qe, { size: 18 })
|
|
873
873
|
}
|
|
874
874
|
], c = (l) => {
|
|
875
875
|
a(l), r(l), e(!1);
|
|
@@ -899,7 +899,7 @@ const Be = (e = () => {
|
|
|
899
899
|
const r = e.filter((i) => i.isDirectory), n = e.filter((i) => !i.isDirectory), s = Yt(r), a = Yt(n);
|
|
900
900
|
return [...s, ...a];
|
|
901
901
|
}, Pr = Ie(), Dn = ({ children: e, initialPath: r }) => {
|
|
902
|
-
const { files: n } = Ge(), s =
|
|
902
|
+
const { files: n } = Ge(), s = fe(!1), [a, i] = L(""), [c, l] = L(null), [d, p] = L([]);
|
|
903
903
|
return te(() => {
|
|
904
904
|
Array.isArray(n) && n.length > 0 && (p(() => {
|
|
905
905
|
const f = n.filter((h) => h.path === `${a}/${h.name}`);
|
|
@@ -969,7 +969,7 @@ const Be = (e = () => {
|
|
|
969
969
|
onClick: () => a.show("createFolder")
|
|
970
970
|
},
|
|
971
971
|
{
|
|
972
|
-
icon: /* @__PURE__ */ t.jsx(
|
|
972
|
+
icon: /* @__PURE__ */ t.jsx(Cr, { size: 18 }),
|
|
973
973
|
text: "Upload",
|
|
974
974
|
permission: r,
|
|
975
975
|
onClick: () => a.show("uploadFile")
|
|
@@ -978,11 +978,11 @@ const Be = (e = () => {
|
|
|
978
978
|
icon: /* @__PURE__ */ t.jsx(mt, { size: 18 }),
|
|
979
979
|
text: "Paste",
|
|
980
980
|
permission: !!h,
|
|
981
|
-
onClick:
|
|
981
|
+
onClick: C
|
|
982
982
|
}
|
|
983
|
-
],
|
|
983
|
+
], j = [
|
|
984
984
|
{
|
|
985
|
-
icon: z === "grid" ? /* @__PURE__ */ t.jsx(gr, { size: 16 }) : /* @__PURE__ */ t.jsx(
|
|
985
|
+
icon: z === "grid" ? /* @__PURE__ */ t.jsx(gr, { size: 16 }) : /* @__PURE__ */ t.jsx(qe, { size: 16 }),
|
|
986
986
|
title: "Change View",
|
|
987
987
|
onClick: () => c((u) => !u)
|
|
988
988
|
},
|
|
@@ -994,7 +994,7 @@ const Be = (e = () => {
|
|
|
994
994
|
}
|
|
995
995
|
}
|
|
996
996
|
];
|
|
997
|
-
function
|
|
997
|
+
function C() {
|
|
998
998
|
M(l);
|
|
999
999
|
}
|
|
1000
1000
|
const y = () => {
|
|
@@ -1014,7 +1014,7 @@ const Be = (e = () => {
|
|
|
1014
1014
|
"button",
|
|
1015
1015
|
{
|
|
1016
1016
|
className: "item-action file-action",
|
|
1017
|
-
onClick:
|
|
1017
|
+
onClick: C,
|
|
1018
1018
|
children: [
|
|
1019
1019
|
/* @__PURE__ */ t.jsx(mt, { size: 18 }),
|
|
1020
1020
|
/* @__PURE__ */ t.jsx("span", { children: "Paste" })
|
|
@@ -1033,7 +1033,7 @@ const Be = (e = () => {
|
|
|
1033
1033
|
}
|
|
1034
1034
|
),
|
|
1035
1035
|
!d.isDirectory && /* @__PURE__ */ t.jsxs("button", { className: "item-action file-action", onClick: y, children: [
|
|
1036
|
-
/* @__PURE__ */ t.jsx(
|
|
1036
|
+
/* @__PURE__ */ t.jsx(jt, { size: 19 }),
|
|
1037
1037
|
/* @__PURE__ */ t.jsx("span", { children: "Download" })
|
|
1038
1038
|
] }),
|
|
1039
1039
|
/* @__PURE__ */ t.jsxs(
|
|
@@ -1042,7 +1042,7 @@ const Be = (e = () => {
|
|
|
1042
1042
|
className: "item-action file-action",
|
|
1043
1043
|
onClick: () => a.show("delete"),
|
|
1044
1044
|
children: [
|
|
1045
|
-
/* @__PURE__ */ t.jsx(
|
|
1045
|
+
/* @__PURE__ */ t.jsx(jr, { size: 19 }),
|
|
1046
1046
|
/* @__PURE__ */ t.jsx("span", { children: "Delete" })
|
|
1047
1047
|
]
|
|
1048
1048
|
}
|
|
@@ -1071,9 +1071,9 @@ const Be = (e = () => {
|
|
|
1071
1071
|
/* @__PURE__ */ t.jsx("span", { children: u.text })
|
|
1072
1072
|
] }, g)) }),
|
|
1073
1073
|
/* @__PURE__ */ t.jsxs("div", { children: [
|
|
1074
|
-
|
|
1074
|
+
j.map((u, g) => /* @__PURE__ */ t.jsxs("div", { className: "toolbar-left-items", children: [
|
|
1075
1075
|
/* @__PURE__ */ t.jsx("button", { className: "item-action icon-only", title: u.title, onClick: u.onClick, children: u.icon }),
|
|
1076
|
-
g !==
|
|
1076
|
+
g !== j.length - 1 && /* @__PURE__ */ t.jsx("div", { className: "item-separator" })
|
|
1077
1077
|
] }, g)),
|
|
1078
1078
|
i && /* @__PURE__ */ t.jsx(
|
|
1079
1079
|
Nn,
|
|
@@ -1115,7 +1115,7 @@ var Wn = class extends Error {
|
|
|
1115
1115
|
}
|
|
1116
1116
|
}, Ke = (...e) => Hn(e[0], `[react-collapsed] -- ${e[1]}`);
|
|
1117
1117
|
function Mr(e) {
|
|
1118
|
-
const r =
|
|
1118
|
+
const r = fe(e);
|
|
1119
1119
|
return te(() => {
|
|
1120
1120
|
r.current = e;
|
|
1121
1121
|
}), fr((...n) => {
|
|
@@ -1124,7 +1124,7 @@ function Mr(e) {
|
|
|
1124
1124
|
}, []);
|
|
1125
1125
|
}
|
|
1126
1126
|
function Vn(e, r, n) {
|
|
1127
|
-
const [s, a] = L(r), i =
|
|
1127
|
+
const [s, a] = L(r), i = fe(typeof e < "u"), c = i.current ? e : s, l = Mr(n), d = fr(
|
|
1128
1128
|
(p) => {
|
|
1129
1129
|
const h = typeof p == "function" ? p(c) : p;
|
|
1130
1130
|
i.current || a(h), l == null || l(h);
|
|
@@ -1142,7 +1142,7 @@ function Vn(e, r, n) {
|
|
|
1142
1142
|
}, [e]), [c, d];
|
|
1143
1143
|
}
|
|
1144
1144
|
var Yn = "(prefers-reduced-motion: reduce)";
|
|
1145
|
-
function
|
|
1145
|
+
function qn() {
|
|
1146
1146
|
const [e, r] = L(!1);
|
|
1147
1147
|
return te(() => {
|
|
1148
1148
|
if (typeof window > "u" || typeof window.matchMedia != "function")
|
|
@@ -1162,16 +1162,16 @@ function Un() {
|
|
|
1162
1162
|
};
|
|
1163
1163
|
}, []), e;
|
|
1164
1164
|
}
|
|
1165
|
-
var
|
|
1165
|
+
var Un = De.useId || (() => {
|
|
1166
1166
|
});
|
|
1167
1167
|
function Kn() {
|
|
1168
|
-
return
|
|
1168
|
+
return Un() ?? "";
|
|
1169
1169
|
}
|
|
1170
|
-
var Xn = typeof window < "u" ? De.useLayoutEffect : De.useEffect, at = !1, Gn = 0,
|
|
1170
|
+
var Xn = typeof window < "u" ? De.useLayoutEffect : De.useEffect, at = !1, Gn = 0, qt = () => ++Gn;
|
|
1171
1171
|
function Jn(e) {
|
|
1172
|
-
const r = e || (at ?
|
|
1172
|
+
const r = e || (at ? qt() : null), [n, s] = De.useState(r);
|
|
1173
1173
|
return Xn(() => {
|
|
1174
|
-
n === null && s(
|
|
1174
|
+
n === null && s(qt());
|
|
1175
1175
|
}, []), De.useEffect(() => {
|
|
1176
1176
|
at === !1 && (at = !0);
|
|
1177
1177
|
}, []), n != null ? String(n) : void 0;
|
|
@@ -1189,7 +1189,7 @@ function Qn(e, r) {
|
|
|
1189
1189
|
}
|
|
1190
1190
|
return a(), s;
|
|
1191
1191
|
}
|
|
1192
|
-
function
|
|
1192
|
+
function Ut(e) {
|
|
1193
1193
|
e.id && cancelAnimationFrame(e.id);
|
|
1194
1194
|
}
|
|
1195
1195
|
function Kt(e) {
|
|
@@ -1260,7 +1260,7 @@ function ss({
|
|
|
1260
1260
|
const d = Mr(n), p = Zn(c ? `${c}` : void 0), [f, h] = Vn(
|
|
1261
1261
|
s,
|
|
1262
1262
|
a
|
|
1263
|
-
), w =
|
|
1263
|
+
), w = fe(f), [S, M] = L(!1), z = qn(), A = i ?? z, j = fe(), C = fe(), y = fe(null), [b, u] = L(null);
|
|
1264
1264
|
rs(y);
|
|
1265
1265
|
const g = `${l.collapsedHeight || 0}px`;
|
|
1266
1266
|
function _(x) {
|
|
@@ -1288,32 +1288,32 @@ function ss({
|
|
|
1288
1288
|
display: ""
|
|
1289
1289
|
}), d("expandEnd")) : (_({ transition: "" }), d("collapseEnd")), M(!1);
|
|
1290
1290
|
}
|
|
1291
|
-
|
|
1291
|
+
C.current && Ut(C.current), C.current = Qn(N, k);
|
|
1292
1292
|
};
|
|
1293
|
-
return M(!0), f ?
|
|
1293
|
+
return M(!0), f ? j.current = requestAnimationFrame(() => {
|
|
1294
1294
|
d("expandStart"), _({
|
|
1295
1295
|
display: "block",
|
|
1296
1296
|
overflow: "hidden",
|
|
1297
1297
|
height: g
|
|
1298
|
-
}),
|
|
1298
|
+
}), j.current = requestAnimationFrame(() => {
|
|
1299
1299
|
d("expanding");
|
|
1300
1300
|
const k = Kt(y);
|
|
1301
1301
|
D(R(k)), y.current && (y.current.style.transition = F(k), y.current.style.height = `${k}px`);
|
|
1302
1302
|
});
|
|
1303
|
-
}) :
|
|
1303
|
+
}) : j.current = requestAnimationFrame(() => {
|
|
1304
1304
|
d("collapseStart");
|
|
1305
1305
|
const k = Kt(y);
|
|
1306
1306
|
D(R(k)), _({
|
|
1307
1307
|
transition: F(k),
|
|
1308
1308
|
height: `${k}px`
|
|
1309
|
-
}),
|
|
1309
|
+
}), j.current = requestAnimationFrame(() => {
|
|
1310
1310
|
d("collapsing"), _({
|
|
1311
1311
|
height: g,
|
|
1312
1312
|
overflow: "hidden"
|
|
1313
1313
|
});
|
|
1314
1314
|
});
|
|
1315
1315
|
}), () => {
|
|
1316
|
-
|
|
1316
|
+
j.current && cancelAnimationFrame(j.current), C.current && Ut(C.current);
|
|
1317
1317
|
};
|
|
1318
1318
|
}, [
|
|
1319
1319
|
f,
|
|
@@ -1332,26 +1332,26 @@ function ss({
|
|
|
1332
1332
|
},
|
|
1333
1333
|
disabled: !1,
|
|
1334
1334
|
...x
|
|
1335
|
-
}, N = b ? b.tagName === "BUTTON" : void 0,
|
|
1335
|
+
}, N = b ? b.tagName === "BUTTON" : void 0, G = x == null ? void 0 : x[D || "ref"], ae = {
|
|
1336
1336
|
id: `react-collapsed-toggle-${p}`,
|
|
1337
1337
|
"aria-controls": `react-collapsed-panel-${p}`,
|
|
1338
1338
|
"aria-expanded": f,
|
|
1339
|
-
onClick(
|
|
1340
|
-
R || (F == null || F(
|
|
1339
|
+
onClick(ee) {
|
|
1340
|
+
R || (F == null || F(ee), h((ve) => !ve));
|
|
1341
1341
|
},
|
|
1342
|
-
[D || "ref"]: Xt(
|
|
1343
|
-
},
|
|
1342
|
+
[D || "ref"]: Xt(G, u)
|
|
1343
|
+
}, oe = {
|
|
1344
1344
|
type: "button",
|
|
1345
1345
|
disabled: R ? !0 : void 0
|
|
1346
|
-
},
|
|
1346
|
+
}, ce = {
|
|
1347
1347
|
"aria-disabled": R ? !0 : void 0,
|
|
1348
1348
|
role: "button",
|
|
1349
1349
|
tabIndex: R ? -1 : 0
|
|
1350
1350
|
};
|
|
1351
|
-
return N === !1 ? { ...
|
|
1352
|
-
...oe,
|
|
1351
|
+
return N === !1 ? { ...ae, ...ce, ...k } : N === !0 ? { ...ae, ...oe, ...k } : {
|
|
1353
1352
|
...ae,
|
|
1354
|
-
...
|
|
1353
|
+
...oe,
|
|
1354
|
+
...ce,
|
|
1355
1355
|
...k
|
|
1356
1356
|
};
|
|
1357
1357
|
},
|
|
@@ -1463,48 +1463,48 @@ const Lr = ({ folder: e }) => {
|
|
|
1463
1463
|
};
|
|
1464
1464
|
Or.displayName = "NavigationPane";
|
|
1465
1465
|
const kr = () => {
|
|
1466
|
-
const [e, r] = L([]), [n, s] = L([]), [a, i] = L([]), [c, l] = L(!1), { currentPath: d, setCurrentPath: p } = Ee(), f =
|
|
1466
|
+
const [e, r] = L([]), [n, s] = L([]), [a, i] = L([]), [c, l] = L(!1), { currentPath: d, setCurrentPath: p } = Ee(), f = fe(null), h = fe([]), w = fe(null), S = Be(() => {
|
|
1467
1467
|
l(!1);
|
|
1468
1468
|
});
|
|
1469
1469
|
te(() => {
|
|
1470
1470
|
r(() => {
|
|
1471
|
-
let
|
|
1471
|
+
let C = "";
|
|
1472
1472
|
return d == null ? void 0 : d.split("/").map((y) => ({
|
|
1473
1473
|
name: y || "Home",
|
|
1474
|
-
path: y === "" ? y :
|
|
1474
|
+
path: y === "" ? y : C += `/${y}`
|
|
1475
1475
|
}));
|
|
1476
1476
|
}), s([]), i([]);
|
|
1477
1477
|
}, [d]);
|
|
1478
|
-
const M = (
|
|
1479
|
-
p(
|
|
1478
|
+
const M = (C) => {
|
|
1479
|
+
p(C);
|
|
1480
1480
|
}, z = () => {
|
|
1481
|
-
const
|
|
1482
|
-
return
|
|
1481
|
+
const C = f.current.clientWidth, y = getComputedStyle(f.current), b = parseFloat(y.paddingLeft), u = n.length > 0 ? 1 : 0, g = parseFloat(y.gap) * (e.length + u);
|
|
1482
|
+
return C - (b + g);
|
|
1483
1483
|
}, A = () => {
|
|
1484
1484
|
var u;
|
|
1485
|
-
const
|
|
1486
|
-
return
|
|
1487
|
-
},
|
|
1485
|
+
const C = z(), y = h.current.reduce((g, _) => _ ? g + _.clientWidth : g, 0), b = ((u = w.current) == null ? void 0 : u.clientWidth) || 0;
|
|
1486
|
+
return C - (y + b);
|
|
1487
|
+
}, j = () => f.current.scrollWidth > f.current.clientWidth;
|
|
1488
1488
|
return te(() => {
|
|
1489
|
-
var
|
|
1490
|
-
if (
|
|
1491
|
-
const y = e[1], b = (
|
|
1489
|
+
var C;
|
|
1490
|
+
if (j()) {
|
|
1491
|
+
const y = e[1], b = (C = h.current[1]) == null ? void 0 : C.clientWidth;
|
|
1492
1492
|
i((u) => [...u, b]), s((u) => [...u, y]), r((u) => u.filter((g, _) => _ !== 1));
|
|
1493
1493
|
} else if (n.length > 0 && A() > a.at(-1)) {
|
|
1494
1494
|
const y = [e[0], n.at(-1), ...e.slice(1)];
|
|
1495
1495
|
r(y), s((b) => b.slice(0, -1)), i((b) => b.slice(0, -1));
|
|
1496
1496
|
}
|
|
1497
|
-
}, [
|
|
1498
|
-
/* @__PURE__ */ t.jsx("div", { className: "breadcrumb", ref: f, children: e.map((
|
|
1497
|
+
}, [j]), /* @__PURE__ */ t.jsxs("div", { className: "bread-crumb-container", children: [
|
|
1498
|
+
/* @__PURE__ */ t.jsx("div", { className: "breadcrumb", ref: f, children: e.map((C, y) => /* @__PURE__ */ t.jsxs("div", { style: { display: "contents" }, children: [
|
|
1499
1499
|
/* @__PURE__ */ t.jsxs(
|
|
1500
1500
|
"span",
|
|
1501
1501
|
{
|
|
1502
1502
|
className: "folder-name",
|
|
1503
|
-
onClick: () => M(
|
|
1503
|
+
onClick: () => M(C.path),
|
|
1504
1504
|
ref: (b) => h.current[y] = b,
|
|
1505
1505
|
children: [
|
|
1506
1506
|
y === 0 ? /* @__PURE__ */ t.jsx(bn, {}) : /* @__PURE__ */ t.jsx(Tn, {}),
|
|
1507
|
-
|
|
1507
|
+
C.name
|
|
1508
1508
|
]
|
|
1509
1509
|
}
|
|
1510
1510
|
),
|
|
@@ -1519,13 +1519,13 @@ const kr = () => {
|
|
|
1519
1519
|
}
|
|
1520
1520
|
)
|
|
1521
1521
|
] }, y)) }),
|
|
1522
|
-
c && /* @__PURE__ */ t.jsx("ul", { ref: S.ref, className: "hidden-folders-container", children: n.map((
|
|
1522
|
+
c && /* @__PURE__ */ t.jsx("ul", { ref: S.ref, className: "hidden-folders-container", children: n.map((C, y) => /* @__PURE__ */ t.jsx(
|
|
1523
1523
|
"li",
|
|
1524
1524
|
{
|
|
1525
1525
|
onClick: () => {
|
|
1526
|
-
M(
|
|
1526
|
+
M(C.path), l(!1);
|
|
1527
1527
|
},
|
|
1528
|
-
children:
|
|
1528
|
+
children: C.name
|
|
1529
1529
|
},
|
|
1530
1530
|
y
|
|
1531
1531
|
)) })
|
|
@@ -1598,14 +1598,14 @@ const Xe = (e) => ({
|
|
|
1598
1598
|
), zr = ({ message: e, xPlacement: r, yPlacement: n }) => /* @__PURE__ */ t.jsx("p", { className: `error-tooltip ${r} ${n}`, children: e }), ls = 220, us = ({ filesViewRef: e, file: r, onCreateFolder: n, triggerAction: s }) => {
|
|
1599
1599
|
const [a, i] = L(r.name), [c, l] = L(!1), [d, p] = L(""), [f, h] = L("right"), [w, S] = L("bottom"), M = Be((g) => {
|
|
1600
1600
|
g.preventDefault(), g.stopPropagation();
|
|
1601
|
-
}), { currentFolder: z, currentPathFiles: A, setCurrentPathFiles:
|
|
1601
|
+
}), { currentFolder: z, currentPathFiles: A, setCurrentPathFiles: j } = Ee(), { activeLayout: C } = Se(), y = (g) => {
|
|
1602
1602
|
i(g.target.value), l(!1);
|
|
1603
1603
|
}, b = (g) => {
|
|
1604
1604
|
if (g.stopPropagation(), g.key === "Enter") {
|
|
1605
1605
|
g.preventDefault(), u();
|
|
1606
1606
|
return;
|
|
1607
1607
|
}
|
|
1608
|
-
g.key === "Escape" && (g.preventDefault(), s.close(),
|
|
1608
|
+
g.key === "Escape" && (g.preventDefault(), s.close(), j((x) => x.filter((R) => R.key !== r.key))), /[\\/:*?"<>|]/.test(g.key) ? (g.preventDefault(), p(
|
|
1609
1609
|
`A file name can't contain any of the following characters: \\ / : * ? " < > |`
|
|
1610
1610
|
), l(!0)) : (l(!1), p(""));
|
|
1611
1611
|
};
|
|
@@ -1625,13 +1625,13 @@ const Xe = (e) => ({
|
|
|
1625
1625
|
p(`This destination already contains a folder named '${g}'.`), l(!0), (R = M.ref.current) == null || R.focus(), (F = M.ref.current) == null || F.select(), M.setIsClicked(!1);
|
|
1626
1626
|
return;
|
|
1627
1627
|
}
|
|
1628
|
-
g === "" && (g = _r("New Folder", !0, _)), Le(n, "onCreateFolder", g, z),
|
|
1628
|
+
g === "" && (g = _r("New Folder", !0, _)), Le(n, "onCreateFolder", g, z), j((D) => D.filter((k) => k.key !== r.key)), s.close();
|
|
1629
1629
|
}
|
|
1630
1630
|
return te(() => {
|
|
1631
1631
|
var g, _, x;
|
|
1632
1632
|
if ((g = M.ref.current) == null || g.focus(), (_ = M.ref.current) == null || _.select(), (x = M.ref) != null && x.current) {
|
|
1633
|
-
const k = e.current.getBoundingClientRect(), N = M.ref.current,
|
|
1634
|
-
k.right -
|
|
1633
|
+
const k = e.current.getBoundingClientRect(), N = M.ref.current, G = N.getBoundingClientRect();
|
|
1634
|
+
k.right - G.left > 313 ? h("right") : h("left"), k.bottom - (G.top + N.clientHeight) > 88 ? S("bottom") : S("top");
|
|
1635
1635
|
}
|
|
1636
1636
|
}, []), te(() => {
|
|
1637
1637
|
M.isClicked && u();
|
|
@@ -1645,7 +1645,7 @@ const Xe = (e) => ({
|
|
|
1645
1645
|
onChange: y,
|
|
1646
1646
|
onKeyDown: b,
|
|
1647
1647
|
onClick: (g) => g.stopPropagation(),
|
|
1648
|
-
...
|
|
1648
|
+
...C === "list" && { rows: 1 }
|
|
1649
1649
|
}
|
|
1650
1650
|
),
|
|
1651
1651
|
c && /* @__PURE__ */ t.jsx(
|
|
@@ -1679,7 +1679,7 @@ const Ar = ({
|
|
|
1679
1679
|
contentClassName: i = "",
|
|
1680
1680
|
closeButton: c = !0
|
|
1681
1681
|
}) => {
|
|
1682
|
-
const l =
|
|
1682
|
+
const l = fe(null), d = (p) => {
|
|
1683
1683
|
p.key === "Escape" && n(!1);
|
|
1684
1684
|
};
|
|
1685
1685
|
return te(() => {
|
|
@@ -1701,7 +1701,7 @@ const Ar = ({
|
|
|
1701
1701
|
}
|
|
1702
1702
|
);
|
|
1703
1703
|
}, _e = (e) => e.split(".").pop(), fs = 220, hs = ({ filesViewRef: e, file: r, onRename: n, triggerAction: s }) => {
|
|
1704
|
-
const [a, i] = L(r == null ? void 0 : r.name), [c, l] = L(!1), [d, p] = L(!1), [f, h] = L(""), [w, S] = L("right"), [M, z] = L("bottom"), { currentPathFiles: A, setCurrentPathFiles:
|
|
1704
|
+
const [a, i] = L(r == null ? void 0 : r.name), [c, l] = L(!1), [d, p] = L(!1), [f, h] = L(""), [w, S] = L("right"), [M, z] = L("bottom"), { currentPathFiles: A, setCurrentPathFiles: j } = Ee(), { activeLayout: C } = Se(), y = fe(null), b = Be((x) => {
|
|
1705
1705
|
var R;
|
|
1706
1706
|
(R = y.current) != null && R.contains(x.target) || (x.preventDefault(), x.stopPropagation());
|
|
1707
1707
|
}), u = (x) => {
|
|
@@ -1723,7 +1723,7 @@ const Ar = ({
|
|
|
1723
1723
|
}, [d]);
|
|
1724
1724
|
function g(x) {
|
|
1725
1725
|
if (a === "" || a === r.name) {
|
|
1726
|
-
|
|
1726
|
+
j(
|
|
1727
1727
|
(R) => R.map((F) => (F.key === r.key && (F.isEditing = !1), F))
|
|
1728
1728
|
), s.close();
|
|
1729
1729
|
return;
|
|
@@ -1737,22 +1737,22 @@ const Ar = ({
|
|
|
1737
1737
|
return;
|
|
1738
1738
|
}
|
|
1739
1739
|
}
|
|
1740
|
-
p(!1), Le(n, "onRename", r, a),
|
|
1740
|
+
p(!1), Le(n, "onRename", r, a), j((R) => R.filter((F) => F.key !== r.key)), s.close();
|
|
1741
1741
|
}
|
|
1742
1742
|
const _ = () => {
|
|
1743
1743
|
var x, R, F, D, k, N;
|
|
1744
1744
|
if ((R = (x = b.ref) == null ? void 0 : x.current) == null || R.focus(), r.isDirectory)
|
|
1745
1745
|
(D = (F = b.ref) == null ? void 0 : F.current) == null || D.select();
|
|
1746
1746
|
else {
|
|
1747
|
-
const
|
|
1748
|
-
(N = (k = b.ref) == null ? void 0 : k.current) == null || N.setSelectionRange(0,
|
|
1747
|
+
const G = _e(r.name), ae = r.name.length - G.length - 1;
|
|
1748
|
+
(N = (k = b.ref) == null ? void 0 : k.current) == null || N.setSelectionRange(0, ae);
|
|
1749
1749
|
}
|
|
1750
1750
|
};
|
|
1751
1751
|
return te(() => {
|
|
1752
1752
|
var x;
|
|
1753
1753
|
if (_(), (x = b.ref) != null && x.current) {
|
|
1754
|
-
const k = e.current.getBoundingClientRect(), N = b.ref.current,
|
|
1755
|
-
k.right -
|
|
1754
|
+
const k = e.current.getBoundingClientRect(), N = b.ref.current, G = N.getBoundingClientRect();
|
|
1755
|
+
k.right - G.left > 313 ? S("right") : S("left"), k.bottom - (G.top + N.clientHeight) > 88 ? z("bottom") : z("top");
|
|
1756
1756
|
}
|
|
1757
1757
|
}, []), te(() => {
|
|
1758
1758
|
b.isClicked && g(!1), _();
|
|
@@ -1768,7 +1768,7 @@ const Ar = ({
|
|
|
1768
1768
|
},
|
|
1769
1769
|
onKeyDown: u,
|
|
1770
1770
|
onClick: (x) => x.stopPropagation(),
|
|
1771
|
-
...
|
|
1771
|
+
...C === "list" && { rows: 1 }
|
|
1772
1772
|
}
|
|
1773
1773
|
),
|
|
1774
1774
|
d && /* @__PURE__ */ t.jsx(
|
|
@@ -1798,7 +1798,7 @@ const Ar = ({
|
|
|
1798
1798
|
{
|
|
1799
1799
|
type: "secondary",
|
|
1800
1800
|
onClick: () => {
|
|
1801
|
-
|
|
1801
|
+
j(
|
|
1802
1802
|
(x) => x.map((R) => (R.key === r.key && (R.isEditing = !1), R))
|
|
1803
1803
|
), l(!1), s.close();
|
|
1804
1804
|
},
|
|
@@ -1863,33 +1863,33 @@ const Ar = ({
|
|
|
1863
1863
|
handleContextMenu: p,
|
|
1864
1864
|
setLastSelectedFile: f
|
|
1865
1865
|
}) => {
|
|
1866
|
-
var
|
|
1867
|
-
const [h, w] = L(!1), [S, M] = L(0), [z, A] = L("hidden"), [
|
|
1866
|
+
var he, E, me, Te;
|
|
1867
|
+
const [h, w] = L(!1), [S, M] = L(0), [z, A] = L("hidden"), [j, C] = L(""), [y, b] = L(null), { activeLayout: u } = Se(), g = u === "grid" ? 48 : 20, _ = Xe(g), { setCurrentPath: x, currentPathFiles: R } = Ee(), { setSelectedFiles: F } = Fe(), { clipBoard: D, handleCutCopy: k, setClipBoard: N, handlePasting: G } = Je(), ae = fe(null), oe = Xe(it), ce = (D == null ? void 0 : D.isMoving) && D.files.find((Y) => Y.name === r.name && Y.path === r.path), ee = () => {
|
|
1868
1868
|
i(r), r.isDirectory ? (x(r.path), F([])) : a && d.show("previewFile");
|
|
1869
|
-
},
|
|
1869
|
+
}, ve = (Y, ue) => {
|
|
1870
1870
|
if (l.length > 0 && Y) {
|
|
1871
|
-
let
|
|
1871
|
+
let Ce = !1, Re = l[0], we = e;
|
|
1872
1872
|
if (Re >= we) {
|
|
1873
1873
|
const Qe = Re;
|
|
1874
|
-
Re = we, we = Qe,
|
|
1874
|
+
Re = we, we = Qe, Ce = !0;
|
|
1875
1875
|
}
|
|
1876
1876
|
const He = R.slice(Re, we + 1);
|
|
1877
|
-
F(
|
|
1878
|
-
} else l.length > 0 &&
|
|
1879
|
-
const Re =
|
|
1880
|
-
return
|
|
1877
|
+
F(Ce ? He.reverse() : He);
|
|
1878
|
+
} else l.length > 0 && ue ? F((Ce) => {
|
|
1879
|
+
const Re = Ce.filter((we) => we.path !== r.path);
|
|
1880
|
+
return Ce.length === Re.length ? [...Ce, r] : Re;
|
|
1881
1881
|
}) : F([r]);
|
|
1882
1882
|
}, v = (Y) => {
|
|
1883
1883
|
if (Y.stopPropagation(), r.isEditing) return;
|
|
1884
|
-
|
|
1885
|
-
const
|
|
1886
|
-
if (
|
|
1887
|
-
|
|
1884
|
+
ve(Y.shiftKey, Y.ctrlKey);
|
|
1885
|
+
const ue = (/* @__PURE__ */ new Date()).getTime();
|
|
1886
|
+
if (ue - S < 300) {
|
|
1887
|
+
ee();
|
|
1888
1888
|
return;
|
|
1889
1889
|
}
|
|
1890
|
-
M(
|
|
1890
|
+
M(ue);
|
|
1891
1891
|
}, P = (Y) => {
|
|
1892
|
-
Y.key === "Enter" && (Y.stopPropagation(), F([r]),
|
|
1892
|
+
Y.key === "Enter" && (Y.stopPropagation(), F([r]), ee());
|
|
1893
1893
|
}, V = (Y) => {
|
|
1894
1894
|
Y.stopPropagation(), Y.preventDefault(), !r.isEditing && (h || F([r]), f(r), p(Y, !0));
|
|
1895
1895
|
}, W = () => {
|
|
@@ -1897,22 +1897,22 @@ const Ar = ({
|
|
|
1897
1897
|
}, I = () => {
|
|
1898
1898
|
!h && A("hidden");
|
|
1899
1899
|
}, X = (Y) => {
|
|
1900
|
-
Y.target.checked ? F((
|
|
1900
|
+
Y.target.checked ? F((ue) => [...ue, r]) : F((ue) => ue.filter((Ce) => Ce.name !== r.name && Ce.path !== r.path)), w(Y.target.checked);
|
|
1901
1901
|
}, O = (Y) => {
|
|
1902
|
-
Y.dataTransfer.setDragImage(
|
|
1903
|
-
}, $ = () => N(null),
|
|
1904
|
-
Y.preventDefault(), h || !r.isDirectory ? Y.dataTransfer.dropEffect = "none" : (b({ x: Y.clientX, y: Y.clientY + 12 }), Y.dataTransfer.dropEffect = "copy",
|
|
1902
|
+
Y.dataTransfer.setDragImage(ae.current, 30, 50), Y.dataTransfer.effectAllowed = "copy", k(!0);
|
|
1903
|
+
}, $ = () => N(null), q = (Y) => {
|
|
1904
|
+
Y.preventDefault(), h || !r.isDirectory ? Y.dataTransfer.dropEffect = "none" : (b({ x: Y.clientX, y: Y.clientY + 12 }), Y.dataTransfer.dropEffect = "copy", C("file-drop-zone"));
|
|
1905
1905
|
}, Z = (Y) => {
|
|
1906
|
-
Y.currentTarget.contains(Y.relatedTarget) || (
|
|
1907
|
-
},
|
|
1908
|
-
Y.preventDefault(), !(h || !r.isDirectory) && (
|
|
1906
|
+
Y.currentTarget.contains(Y.relatedTarget) || (C((ue) => ue && ""), b(null));
|
|
1907
|
+
}, U = (Y) => {
|
|
1908
|
+
Y.preventDefault(), !(h || !r.isDirectory) && (G(r), C((ue) => ue && ""), b(null));
|
|
1909
1909
|
};
|
|
1910
1910
|
return te(() => {
|
|
1911
1911
|
w(l.includes(e)), A(l.includes(e) ? "visible" : "hidden");
|
|
1912
1912
|
}, [l]), /* @__PURE__ */ t.jsxs(
|
|
1913
1913
|
"div",
|
|
1914
1914
|
{
|
|
1915
|
-
className: `file-item-container ${
|
|
1915
|
+
className: `file-item-container ${j} ${h || r.isEditing ? "file-selected" : ""} ${ce ? "file-moving" : ""}`,
|
|
1916
1916
|
tabIndex: 0,
|
|
1917
1917
|
title: r.name,
|
|
1918
1918
|
onClick: v,
|
|
@@ -1923,10 +1923,10 @@ const Ar = ({
|
|
|
1923
1923
|
draggable: h,
|
|
1924
1924
|
onDragStart: O,
|
|
1925
1925
|
onDragEnd: $,
|
|
1926
|
-
onDragEnter:
|
|
1927
|
-
onDragOver:
|
|
1926
|
+
onDragEnter: q,
|
|
1927
|
+
onDragOver: q,
|
|
1928
1928
|
onDragLeave: Z,
|
|
1929
|
-
onDrop:
|
|
1929
|
+
onDrop: U,
|
|
1930
1930
|
children: [
|
|
1931
1931
|
/* @__PURE__ */ t.jsxs("div", { className: "file-item", children: [
|
|
1932
1932
|
!r.isEditing && /* @__PURE__ */ t.jsx(
|
|
@@ -1940,7 +1940,7 @@ const Ar = ({
|
|
|
1940
1940
|
onClick: (Y) => Y.stopPropagation()
|
|
1941
1941
|
}
|
|
1942
1942
|
),
|
|
1943
|
-
r.isDirectory ? /* @__PURE__ */ t.jsx(Vt, { size: g }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: _[(E = (
|
|
1943
|
+
r.isDirectory ? /* @__PURE__ */ t.jsx(Vt, { size: g }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: _[(E = (he = r.name) == null ? void 0 : he.split(".").pop()) == null ? void 0 : E.toLowerCase()] ?? /* @__PURE__ */ t.jsx(Ue, { size: g }) }),
|
|
1944
1944
|
r.isEditing ? /* @__PURE__ */ t.jsx("div", { className: `rename-file-container ${u}`, children: d.actionType === "createFolder" ? /* @__PURE__ */ t.jsx(
|
|
1945
1945
|
us,
|
|
1946
1946
|
{
|
|
@@ -1977,7 +1977,7 @@ const Ar = ({
|
|
|
1977
1977
|
]
|
|
1978
1978
|
}
|
|
1979
1979
|
),
|
|
1980
|
-
/* @__PURE__ */ t.jsx("div", { ref:
|
|
1980
|
+
/* @__PURE__ */ t.jsx("div", { ref: ae, className: "drag-icon", children: r.isDirectory ? /* @__PURE__ */ t.jsx(Vt, { size: it }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: oe[(Te = (me = r.name) == null ? void 0 : me.split(".").pop()) == null ? void 0 : Te.toLowerCase()] ?? /* @__PURE__ */ t.jsx(Ue, { size: it }) }) })
|
|
1981
1981
|
]
|
|
1982
1982
|
}
|
|
1983
1983
|
);
|
|
@@ -1986,13 +1986,13 @@ const Ar = ({
|
|
|
1986
1986
|
s.icon,
|
|
1987
1987
|
/* @__PURE__ */ t.jsx("span", { children: s.title })
|
|
1988
1988
|
] }, s.title)) }), gs = ({ filesViewRef: e, contextMenuRef: r, menuItems: n, visible: s, clickPosition: a }) => {
|
|
1989
|
-
const [i, c] = L(0), [l, d] = L(0), [p, f] = L(null), [h, w] = L("right"), S =
|
|
1990
|
-
const { clickX:
|
|
1991
|
-
F ? (c(`${R}px`), w("right")) : D && (c(`${R - _}px`), w("left")), N ? d(`${k + y.scrollTop}px`) :
|
|
1992
|
-
}, z = (
|
|
1993
|
-
|
|
1994
|
-
}, A = (
|
|
1995
|
-
f(
|
|
1989
|
+
const [i, c] = L(0), [l, d] = L(0), [p, f] = L(null), [h, w] = L("right"), S = fe(null), M = () => {
|
|
1990
|
+
const { clickX: j, clickY: C } = a, y = e.current, b = y.getBoundingClientRect(), u = y.offsetWidth - y.clientWidth, g = r.current.getBoundingClientRect(), _ = g.width, x = g.height, R = j - b.left, F = b.width - (R + u) > _, D = !F, k = C - b.top, N = b.height - k > x, G = !N;
|
|
1991
|
+
F ? (c(`${R}px`), w("right")) : D && (c(`${R - _}px`), w("left")), N ? d(`${k + y.scrollTop}px`) : G && d(`${k + y.scrollTop - x}px`);
|
|
1992
|
+
}, z = (j) => {
|
|
1993
|
+
j.preventDefault(), j.stopPropagation();
|
|
1994
|
+
}, A = (j) => {
|
|
1995
|
+
f(j);
|
|
1996
1996
|
};
|
|
1997
1997
|
if (te(() => {
|
|
1998
1998
|
s && r.current ? M() : (d(0), c(0), f(null));
|
|
@@ -2002,31 +2002,31 @@ const Ar = ({
|
|
|
2002
2002
|
{
|
|
2003
2003
|
ref: r,
|
|
2004
2004
|
onContextMenu: z,
|
|
2005
|
-
onClick: (
|
|
2005
|
+
onClick: (j) => j.stopPropagation(),
|
|
2006
2006
|
className: `fm-context-menu ${l ? "visible" : "hidden"}`,
|
|
2007
2007
|
style: {
|
|
2008
2008
|
top: l,
|
|
2009
2009
|
left: i
|
|
2010
2010
|
},
|
|
2011
|
-
children: /* @__PURE__ */ t.jsx("div", { className: "file-context-menu-list", children: /* @__PURE__ */ t.jsx("ul", { children: n.filter((
|
|
2012
|
-
const y =
|
|
2011
|
+
children: /* @__PURE__ */ t.jsx("div", { className: "file-context-menu-list", children: /* @__PURE__ */ t.jsx("ul", { children: n.filter((j) => !j.hidden).map((j, C) => {
|
|
2012
|
+
const y = j.hasOwnProperty("children"), b = p === C && y;
|
|
2013
2013
|
return /* @__PURE__ */ t.jsxs("div", { children: [
|
|
2014
2014
|
/* @__PURE__ */ t.jsxs(
|
|
2015
2015
|
"li",
|
|
2016
2016
|
{
|
|
2017
|
-
onClick:
|
|
2018
|
-
className: `${
|
|
2019
|
-
onMouseOver: () => A(
|
|
2017
|
+
onClick: j.onClick,
|
|
2018
|
+
className: `${j.className ?? ""} ${b ? "active" : ""}`,
|
|
2019
|
+
onMouseOver: () => A(C),
|
|
2020
2020
|
children: [
|
|
2021
|
-
|
|
2022
|
-
/* @__PURE__ */ t.jsx("span", { children:
|
|
2021
|
+
j.icon,
|
|
2022
|
+
/* @__PURE__ */ t.jsx("span", { children: j.title }),
|
|
2023
2023
|
y && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2024
2024
|
/* @__PURE__ */ t.jsx(Sn, { size: 14, className: "list-expand-icon" }),
|
|
2025
2025
|
b && /* @__PURE__ */ t.jsx(
|
|
2026
2026
|
ms,
|
|
2027
2027
|
{
|
|
2028
2028
|
subMenuRef: S,
|
|
2029
|
-
list:
|
|
2029
|
+
list: j.children,
|
|
2030
2030
|
position: h
|
|
2031
2031
|
}
|
|
2032
2032
|
)
|
|
@@ -2034,8 +2034,8 @@ const Ar = ({
|
|
|
2034
2034
|
]
|
|
2035
2035
|
}
|
|
2036
2036
|
),
|
|
2037
|
-
|
|
2038
|
-
] },
|
|
2037
|
+
j.divider && /* @__PURE__ */ t.jsx("div", { className: "divider" })
|
|
2038
|
+
] }, j.title);
|
|
2039
2039
|
}) }) })
|
|
2040
2040
|
}
|
|
2041
2041
|
);
|
|
@@ -2044,30 +2044,30 @@ function ys(e) {
|
|
|
2044
2044
|
return H({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z" }, child: [] }] })(e);
|
|
2045
2045
|
}
|
|
2046
2046
|
const xs = (e, r, n) => {
|
|
2047
|
-
const [s, a] = L([]), [i, c] = L(!1), [l, d] = L(!1), [p, f] = L({ clickX: 0, clickY: 0 }), [h, w] = L(null), { clipBoard: S, setClipBoard: M, handleCutCopy: z, handlePasting: A } = Je(), { selectedFiles:
|
|
2048
|
-
h.isDirectory ? (u(h.path), a([]),
|
|
2047
|
+
const [s, a] = L([]), [i, c] = L(!1), [l, d] = L(!1), [p, f] = L({ clickX: 0, clickY: 0 }), [h, w] = L(null), { clipBoard: S, setClipBoard: M, handleCutCopy: z, handlePasting: A } = Je(), { selectedFiles: j, setSelectedFiles: C, handleDownload: y } = Fe(), { currentPath: b, setCurrentPath: u, currentPathFiles: g, setCurrentPathFiles: _ } = Ee(), { activeLayout: x, setActiveLayout: R } = Se(), F = () => {
|
|
2048
|
+
h.isDirectory ? (u(h.path), a([]), C([])) : r && n.show("previewFile"), c(!1);
|
|
2049
2049
|
}, D = (O) => {
|
|
2050
2050
|
z(O), c(!1);
|
|
2051
2051
|
}, k = () => {
|
|
2052
2052
|
A(h), c(!1);
|
|
2053
2053
|
}, N = () => {
|
|
2054
2054
|
c(!1), n.show("rename");
|
|
2055
|
-
},
|
|
2055
|
+
}, G = () => {
|
|
2056
2056
|
y(), c(!1);
|
|
2057
|
-
}, oe = () => {
|
|
2058
|
-
c(!1), n.show("delete");
|
|
2059
2057
|
}, ae = () => {
|
|
2058
|
+
c(!1), n.show("delete");
|
|
2059
|
+
}, oe = () => {
|
|
2060
2060
|
c(!1), Le(e, "onRefresh"), M(null);
|
|
2061
|
-
},
|
|
2061
|
+
}, ce = () => {
|
|
2062
2062
|
n.show("createFolder"), c(!1);
|
|
2063
|
-
},
|
|
2063
|
+
}, ee = () => {
|
|
2064
2064
|
c(!1), n.show("uploadFile");
|
|
2065
|
-
},
|
|
2066
|
-
|
|
2065
|
+
}, ve = () => {
|
|
2066
|
+
C(g), c(!1);
|
|
2067
2067
|
}, v = [
|
|
2068
2068
|
{
|
|
2069
2069
|
title: "View",
|
|
2070
|
-
icon: x === "grid" ? /* @__PURE__ */ t.jsx(Dt, { size: 18 }) : /* @__PURE__ */ t.jsx(
|
|
2070
|
+
icon: x === "grid" ? /* @__PURE__ */ t.jsx(Dt, { size: 18 }) : /* @__PURE__ */ t.jsx(qe, { size: 18 }),
|
|
2071
2071
|
onClick: () => {
|
|
2072
2072
|
},
|
|
2073
2073
|
children: [
|
|
@@ -2081,7 +2081,7 @@ const xs = (e, r, n) => {
|
|
|
2081
2081
|
},
|
|
2082
2082
|
{
|
|
2083
2083
|
title: "List",
|
|
2084
|
-
icon: /* @__PURE__ */ t.jsx(
|
|
2084
|
+
icon: /* @__PURE__ */ t.jsx(qe, { size: 18 }),
|
|
2085
2085
|
selected: x === "list",
|
|
2086
2086
|
onClick: () => {
|
|
2087
2087
|
R("list"), c(!1);
|
|
@@ -2092,29 +2092,29 @@ const xs = (e, r, n) => {
|
|
|
2092
2092
|
{
|
|
2093
2093
|
title: "Refresh",
|
|
2094
2094
|
icon: /* @__PURE__ */ t.jsx(xr, { size: 18 }),
|
|
2095
|
-
onClick:
|
|
2095
|
+
onClick: oe,
|
|
2096
2096
|
divider: !0
|
|
2097
2097
|
},
|
|
2098
2098
|
{
|
|
2099
2099
|
title: "New folder",
|
|
2100
2100
|
icon: /* @__PURE__ */ t.jsx(mr, { size: 18 }),
|
|
2101
|
-
onClick:
|
|
2101
|
+
onClick: ce
|
|
2102
2102
|
},
|
|
2103
2103
|
{
|
|
2104
2104
|
title: "Upload",
|
|
2105
|
-
icon: /* @__PURE__ */ t.jsx(
|
|
2106
|
-
onClick:
|
|
2105
|
+
icon: /* @__PURE__ */ t.jsx(Cr, { size: 18 }),
|
|
2106
|
+
onClick: ee,
|
|
2107
2107
|
divider: !0
|
|
2108
2108
|
},
|
|
2109
2109
|
{
|
|
2110
2110
|
title: "Select all",
|
|
2111
2111
|
icon: /* @__PURE__ */ t.jsx(Fn, { size: 18 }),
|
|
2112
|
-
onClick:
|
|
2112
|
+
onClick: ve
|
|
2113
2113
|
}
|
|
2114
2114
|
], P = [
|
|
2115
2115
|
{
|
|
2116
2116
|
title: "Open",
|
|
2117
|
-
icon: h != null && h.isDirectory ? /* @__PURE__ */ t.jsx(ys, { size: 20 }) : /* @__PURE__ */ t.jsx(
|
|
2117
|
+
icon: h != null && h.isDirectory ? /* @__PURE__ */ t.jsx(ys, { size: 20 }) : /* @__PURE__ */ t.jsx(Ue, { size: 16 }),
|
|
2118
2118
|
onClick: F,
|
|
2119
2119
|
divider: !0
|
|
2120
2120
|
},
|
|
@@ -2141,18 +2141,18 @@ const xs = (e, r, n) => {
|
|
|
2141
2141
|
title: "Rename",
|
|
2142
2142
|
icon: /* @__PURE__ */ t.jsx(br, { size: 19 }),
|
|
2143
2143
|
onClick: N,
|
|
2144
|
-
hidden:
|
|
2144
|
+
hidden: j.length > 1
|
|
2145
2145
|
},
|
|
2146
2146
|
{
|
|
2147
2147
|
title: "Download",
|
|
2148
|
-
icon: /* @__PURE__ */ t.jsx(
|
|
2149
|
-
onClick:
|
|
2148
|
+
icon: /* @__PURE__ */ t.jsx(jt, { size: 18 }),
|
|
2149
|
+
onClick: G,
|
|
2150
2150
|
hidden: h == null ? void 0 : h.isDirectory
|
|
2151
2151
|
},
|
|
2152
2152
|
{
|
|
2153
2153
|
title: "Delete",
|
|
2154
|
-
icon: /* @__PURE__ */ t.jsx(
|
|
2155
|
-
onClick:
|
|
2154
|
+
icon: /* @__PURE__ */ t.jsx(jr, { size: 19 }),
|
|
2155
|
+
onClick: ae
|
|
2156
2156
|
}
|
|
2157
2157
|
], V = () => {
|
|
2158
2158
|
_((O) => [
|
|
@@ -2166,9 +2166,9 @@ const xs = (e, r, n) => {
|
|
|
2166
2166
|
}
|
|
2167
2167
|
]);
|
|
2168
2168
|
}, W = () => {
|
|
2169
|
-
_((O) => (O[s.at(-1)] && (O[s.at(-1)].isEditing = !0), O)), a([]),
|
|
2169
|
+
_((O) => (O[s.at(-1)] && (O[s.at(-1)].isEditing = !0), O)), a([]), C([]);
|
|
2170
2170
|
}, I = () => {
|
|
2171
|
-
a([]),
|
|
2171
|
+
a([]), C((O) => O.length > 0 ? [] : O);
|
|
2172
2172
|
}, X = (O, $ = !1) => {
|
|
2173
2173
|
O.preventDefault(), f({ clickX: O.clientX, clickY: O.clientY }), d($), !$ && I(), c(!0);
|
|
2174
2174
|
};
|
|
@@ -2183,10 +2183,10 @@ const xs = (e, r, n) => {
|
|
|
2183
2183
|
break;
|
|
2184
2184
|
}
|
|
2185
2185
|
}, [n.isActive]), te(() => {
|
|
2186
|
-
a([]),
|
|
2186
|
+
a([]), C([]);
|
|
2187
2187
|
}, [b]), te(() => {
|
|
2188
|
-
|
|
2189
|
-
}, [
|
|
2188
|
+
j.length > 0 ? a(() => j.map((O) => g.findIndex(($) => $.path === O.path))) : a([]);
|
|
2189
|
+
}, [j, g]), {
|
|
2190
2190
|
emptySelecCtxItems: v,
|
|
2191
2191
|
selecCtxItems: P,
|
|
2192
2192
|
handleContextMenu: X,
|
|
@@ -2198,7 +2198,7 @@ const xs = (e, r, n) => {
|
|
|
2198
2198
|
clickPosition: p,
|
|
2199
2199
|
isSelectionCtx: l
|
|
2200
2200
|
};
|
|
2201
|
-
},
|
|
2201
|
+
}, js = ({ unselectFiles: e }) => {
|
|
2202
2202
|
const [r, n] = L(!1), { selectedFiles: s, setSelectedFiles: a } = Fe(), { currentPathFiles: i } = Ee(), c = yt(() => i.length > 0 && s.length === i.length, [s, i]), l = (d) => {
|
|
2203
2203
|
d.target.checked ? (a(i), n(!0)) : e();
|
|
2204
2204
|
};
|
|
@@ -2224,7 +2224,7 @@ const xs = (e, r, n) => {
|
|
|
2224
2224
|
enableFilePreview: a,
|
|
2225
2225
|
triggerAction: i
|
|
2226
2226
|
}) => {
|
|
2227
|
-
const { currentPathFiles: c } = Ee(), l =
|
|
2227
|
+
const { currentPathFiles: c } = Ee(), l = fe(null), { activeLayout: d } = Se(), {
|
|
2228
2228
|
emptySelecCtxItems: p,
|
|
2229
2229
|
selecCtxItems: f,
|
|
2230
2230
|
handleContextMenu: h,
|
|
@@ -2233,8 +2233,8 @@ const xs = (e, r, n) => {
|
|
|
2233
2233
|
setVisible: M,
|
|
2234
2234
|
setLastSelectedFile: z,
|
|
2235
2235
|
selectedFileIndexes: A,
|
|
2236
|
-
clickPosition:
|
|
2237
|
-
isSelectionCtx:
|
|
2236
|
+
clickPosition: j,
|
|
2237
|
+
isSelectionCtx: C
|
|
2238
2238
|
} = xs(s, a, i), y = Be(() => M(!1));
|
|
2239
2239
|
return /* @__PURE__ */ t.jsxs(
|
|
2240
2240
|
"div",
|
|
@@ -2244,7 +2244,7 @@ const xs = (e, r, n) => {
|
|
|
2244
2244
|
onContextMenu: h,
|
|
2245
2245
|
onClick: w,
|
|
2246
2246
|
children: [
|
|
2247
|
-
d === "list" && /* @__PURE__ */ t.jsx(
|
|
2247
|
+
d === "list" && /* @__PURE__ */ t.jsx(js, { unselectFiles: w }),
|
|
2248
2248
|
(c == null ? void 0 : c.length) > 0 ? /* @__PURE__ */ t.jsx(t.Fragment, { children: c.map((b, u) => /* @__PURE__ */ t.jsx(
|
|
2249
2249
|
vs,
|
|
2250
2250
|
{
|
|
@@ -2268,10 +2268,10 @@ const xs = (e, r, n) => {
|
|
|
2268
2268
|
{
|
|
2269
2269
|
filesViewRef: l,
|
|
2270
2270
|
contextMenuRef: y.ref,
|
|
2271
|
-
menuItems:
|
|
2271
|
+
menuItems: C ? f : p,
|
|
2272
2272
|
visible: S,
|
|
2273
2273
|
setVisible: M,
|
|
2274
|
-
clickPosition:
|
|
2274
|
+
clickPosition: j
|
|
2275
2275
|
}
|
|
2276
2276
|
)
|
|
2277
2277
|
]
|
|
@@ -2279,7 +2279,7 @@ const xs = (e, r, n) => {
|
|
|
2279
2279
|
);
|
|
2280
2280
|
};
|
|
2281
2281
|
Ir.displayName = "FileList";
|
|
2282
|
-
const
|
|
2282
|
+
const Cs = ({ triggerAction: e, onDelete: r }) => {
|
|
2283
2283
|
const [n, s] = L(""), { selectedFiles: a, setSelectedFiles: i } = Fe();
|
|
2284
2284
|
te(() => {
|
|
2285
2285
|
s(() => {
|
|
@@ -2323,7 +2323,7 @@ const Ps = ({
|
|
|
2323
2323
|
handleFileRemove: c
|
|
2324
2324
|
}) => {
|
|
2325
2325
|
var g, _, x, R;
|
|
2326
|
-
const [l, d] = L(0), [p, f] = L(!1), [h, w] = L(!1), [S, M] = L(!1), z = Xe(33), A =
|
|
2326
|
+
const [l, d] = L(0), [p, f] = L(!1), [h, w] = L(!1), [S, M] = L(!1), z = Xe(33), A = fe(), { onError: j } = Ge(), C = (F) => {
|
|
2327
2327
|
d(0), s((k) => ({
|
|
2328
2328
|
...k,
|
|
2329
2329
|
[e]: !1
|
|
@@ -2338,37 +2338,39 @@ const Ps = ({
|
|
|
2338
2338
|
}
|
|
2339
2339
|
};
|
|
2340
2340
|
n(
|
|
2341
|
-
(k) => k.map((N,
|
|
2341
|
+
(k) => k.map((N, G) => e === G ? {
|
|
2342
2342
|
...N,
|
|
2343
2343
|
error: D.message
|
|
2344
2344
|
} : N)
|
|
2345
|
-
), M(!0),
|
|
2345
|
+
), M(!0), j(D, r.file);
|
|
2346
2346
|
}, y = (F) => {
|
|
2347
2347
|
if (!F.error)
|
|
2348
2348
|
return new Promise((D, k) => {
|
|
2349
2349
|
const N = new XMLHttpRequest();
|
|
2350
|
-
A.current = N, s((
|
|
2351
|
-
...
|
|
2350
|
+
A.current = N, s((ee) => ({
|
|
2351
|
+
...ee,
|
|
2352
2352
|
[e]: !0
|
|
2353
|
-
})), N.upload.onprogress = (
|
|
2354
|
-
if (
|
|
2355
|
-
const
|
|
2356
|
-
d(
|
|
2353
|
+
})), N.upload.onprogress = (ee) => {
|
|
2354
|
+
if (ee.lengthComputable) {
|
|
2355
|
+
const ve = Math.round(ee.loaded / ee.total * 100);
|
|
2356
|
+
d(ve);
|
|
2357
2357
|
}
|
|
2358
2358
|
}, N.onload = () => {
|
|
2359
|
-
s((
|
|
2360
|
-
...
|
|
2359
|
+
s((ee) => ({
|
|
2360
|
+
...ee,
|
|
2361
2361
|
[e]: !1
|
|
2362
|
-
})), N.status === 200 || N.status === 201 ? (f(!0), i(N.response), D(N.response)) : (k(N.statusText),
|
|
2362
|
+
})), N.status === 200 || N.status === 201 ? (f(!0), i(N.response), D(N.response)) : (k(N.statusText), C(N));
|
|
2363
2363
|
}, N.onerror = () => {
|
|
2364
|
-
k(N.statusText),
|
|
2365
|
-
}
|
|
2366
|
-
const
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2364
|
+
k(N.statusText), C(N);
|
|
2365
|
+
};
|
|
2366
|
+
const G = (a == null ? void 0 : a.method) || "POST";
|
|
2367
|
+
N.open(G, a == null ? void 0 : a.url, !0);
|
|
2368
|
+
const ae = a == null ? void 0 : a.headers;
|
|
2369
|
+
for (let ee in ae)
|
|
2370
|
+
N.setRequestHeader(ee, ae[ee]);
|
|
2371
|
+
const oe = new FormData(), ce = F == null ? void 0 : F.appendData;
|
|
2372
|
+
for (let ee in ce)
|
|
2373
|
+
ce[ee] && oe.append(ee, ce[ee]);
|
|
2372
2374
|
oe.append("file", F.file), N.send(oe);
|
|
2373
2375
|
});
|
|
2374
2376
|
};
|
|
@@ -2389,7 +2391,7 @@ const Ps = ({
|
|
|
2389
2391
|
), y({ ...r, error: !1 }), w(!1), M(!1));
|
|
2390
2392
|
};
|
|
2391
2393
|
return r.removed ? null : /* @__PURE__ */ t.jsxs("li", { children: [
|
|
2392
|
-
/* @__PURE__ */ t.jsx("div", { className: "file-icon", children: z[_e((g = r.file) == null ? void 0 : g.name)] ?? /* @__PURE__ */ t.jsx(
|
|
2394
|
+
/* @__PURE__ */ t.jsx("div", { className: "file-icon", children: z[_e((g = r.file) == null ? void 0 : g.name)] ?? /* @__PURE__ */ t.jsx(Ue, { size: 33 }) }),
|
|
2393
2395
|
/* @__PURE__ */ t.jsxs("div", { className: "file", children: [
|
|
2394
2396
|
/* @__PURE__ */ t.jsxs("div", { className: "file-details", children: [
|
|
2395
2397
|
/* @__PURE__ */ t.jsxs("div", { className: "file-info", children: [
|
|
@@ -2424,7 +2426,7 @@ const Ps = ({
|
|
|
2424
2426
|
onFileUploading: s,
|
|
2425
2427
|
onFileUploaded: a
|
|
2426
2428
|
}) => {
|
|
2427
|
-
const [i, c] = L([]), [l, d] = L(!1), [p, f] = L({}), { currentFolder: h, currentPathFiles: w } = Ee(), { onError: S } = Ge(), M =
|
|
2429
|
+
const [i, c] = L([]), [l, d] = L(!1), [p, f] = L({}), { currentFolder: h, currentPathFiles: w } = Ee(), { onError: S } = Ge(), M = fe(null), z = (u) => {
|
|
2428
2430
|
u.key === "Enter" && M.current.click();
|
|
2429
2431
|
}, A = (u) => {
|
|
2430
2432
|
if (n && !n.includes(_e(u.name)))
|
|
@@ -2433,7 +2435,7 @@ const Ps = ({
|
|
|
2433
2435
|
(x) => x.name.toLowerCase() === u.name.toLowerCase() && !x.isDirectory
|
|
2434
2436
|
)) return "File already exists.";
|
|
2435
2437
|
if (r && u.size > r) return `Maximum upload size is ${Ze(r, 0)}.`;
|
|
2436
|
-
},
|
|
2438
|
+
}, j = (u) => {
|
|
2437
2439
|
if (u = u.filter(
|
|
2438
2440
|
(g) => !i.some((_) => _.file.name.toLowerCase() === g.name.toLowerCase())
|
|
2439
2441
|
), u.length > 0) {
|
|
@@ -2447,13 +2449,13 @@ const Ps = ({
|
|
|
2447
2449
|
});
|
|
2448
2450
|
c((_) => [..._, ...g]);
|
|
2449
2451
|
}
|
|
2450
|
-
},
|
|
2452
|
+
}, C = (u) => {
|
|
2451
2453
|
u.preventDefault(), d(!1);
|
|
2452
2454
|
const g = Array.from(u.dataTransfer.files);
|
|
2453
|
-
|
|
2455
|
+
j(g);
|
|
2454
2456
|
}, y = (u) => {
|
|
2455
2457
|
const g = Array.from(u.target.files);
|
|
2456
|
-
|
|
2458
|
+
j(g);
|
|
2457
2459
|
}, b = (u) => {
|
|
2458
2460
|
c((g) => {
|
|
2459
2461
|
const _ = g.map((x, R) => u === R ? {
|
|
@@ -2469,7 +2471,7 @@ const Ps = ({
|
|
|
2469
2471
|
"div",
|
|
2470
2472
|
{
|
|
2471
2473
|
className: `draggable-file-input ${l ? "dragging" : ""}`,
|
|
2472
|
-
onDrop:
|
|
2474
|
+
onDrop: C,
|
|
2473
2475
|
onDragOver: (u) => u.preventDefault(),
|
|
2474
2476
|
onDragEnter: () => d(!0),
|
|
2475
2477
|
onDragLeave: () => d(!1),
|
|
@@ -2542,7 +2544,7 @@ const Ps = ({
|
|
|
2542
2544
|
/* @__PURE__ */ t.jsx("span", { className: "file-size", children: Ze(c[0].size) })
|
|
2543
2545
|
] }),
|
|
2544
2546
|
/* @__PURE__ */ t.jsx(Ne, { onClick: S, padding: "0.45rem .9rem", children: /* @__PURE__ */ t.jsxs("div", { className: "download-btn", children: [
|
|
2545
|
-
/* @__PURE__ */ t.jsx(
|
|
2547
|
+
/* @__PURE__ */ t.jsx(jt, { size: 18 }),
|
|
2546
2548
|
/* @__PURE__ */ t.jsx("span", { children: "Download" })
|
|
2547
2549
|
] }) })
|
|
2548
2550
|
] }),
|
|
@@ -2573,8 +2575,8 @@ const Ps = ({
|
|
|
2573
2575
|
}
|
|
2574
2576
|
) })
|
|
2575
2577
|
] });
|
|
2576
|
-
}, ct = (e) => e.toLowerCase(),
|
|
2577
|
-
const s =
|
|
2578
|
+
}, ct = (e) => e.toLowerCase(), ye = (e, r, n = !1) => {
|
|
2579
|
+
const s = fe(/* @__PURE__ */ new Set([])), a = yt(() => new Set(e.map((d) => ct(d))), [e]), i = (d) => {
|
|
2578
2580
|
if (!d.repeat && (s.current.add(ct(d.key)), a.isSubsetOf(s.current) && !n)) {
|
|
2579
2581
|
d.preventDefault(), r(d);
|
|
2580
2582
|
return;
|
|
@@ -2587,7 +2589,7 @@ const Ps = ({
|
|
|
2587
2589
|
te(() => (window.addEventListener("keydown", i), window.addEventListener("keyup", c), window.addEventListener("blur", l), () => {
|
|
2588
2590
|
window.removeEventListener("keydown", i), window.removeEventListener("keyup", c), window.removeEventListener("blur", l);
|
|
2589
2591
|
}), [a, r, n]);
|
|
2590
|
-
},
|
|
2592
|
+
}, xe = {
|
|
2591
2593
|
createFolder: ["Alt", "Shift", "N"],
|
|
2592
2594
|
uploadFiles: ["Control", "U"],
|
|
2593
2595
|
cut: ["Control", "X"],
|
|
@@ -2624,9 +2626,9 @@ const Ps = ({
|
|
|
2624
2626
|
e.show("rename");
|
|
2625
2627
|
}, A = () => {
|
|
2626
2628
|
d();
|
|
2627
|
-
}, C = () => {
|
|
2628
|
-
e.show("delete");
|
|
2629
2629
|
}, j = () => {
|
|
2630
|
+
e.show("delete");
|
|
2631
|
+
}, C = () => {
|
|
2630
2632
|
c.length > 0 && l([c[0]]);
|
|
2631
2633
|
}, y = () => {
|
|
2632
2634
|
c.length > 0 && l([c.at(-1)]);
|
|
@@ -2641,7 +2643,7 @@ const Ps = ({
|
|
|
2641
2643
|
}, x = () => {
|
|
2642
2644
|
p("list");
|
|
2643
2645
|
};
|
|
2644
|
-
|
|
2646
|
+
ye(xe.createFolder, f, e.isActive), ye(xe.uploadFiles, h, e.isActive), ye(xe.cut, w, e.isActive), ye(xe.copy, S, e.isActive), ye(xe.paste, M, e.isActive), ye(xe.rename, z, e.isActive), ye(xe.download, A, e.isActive), ye(xe.delete, j, e.isActive), ye(xe.jumpToFirst, C, e.isActive), ye(xe.jumpToLast, y, e.isActive), ye(xe.selectAll, b, e.isActive), ye(xe.clearSelection, u, e.isActive), ye(xe.refresh, g, e.isActive), ye(xe.gridLayout, _, e.isActive), ye(xe.listLayout, x, e.isActive);
|
|
2645
2647
|
}, Ms = ({
|
|
2646
2648
|
fileUploadConfig: e,
|
|
2647
2649
|
onFileUploading: r,
|
|
@@ -2673,7 +2675,7 @@ const Ps = ({
|
|
|
2673
2675
|
},
|
|
2674
2676
|
delete: {
|
|
2675
2677
|
title: "Delete",
|
|
2676
|
-
component: /* @__PURE__ */ t.jsx(
|
|
2678
|
+
component: /* @__PURE__ */ t.jsx(Cs, { triggerAction: p, onDelete: s }),
|
|
2677
2679
|
width: "25%"
|
|
2678
2680
|
},
|
|
2679
2681
|
previewFile: {
|
|
@@ -2718,7 +2720,7 @@ const Ps = ({
|
|
|
2718
2720
|
}
|
|
2719
2721
|
};
|
|
2720
2722
|
}, Os = (e, r) => {
|
|
2721
|
-
const [n, s] = L({ col1: e, col2: r }), [a, i] = L(!1), c =
|
|
2723
|
+
const [n, s] = L({ col1: e, col2: r }), [a, i] = L(!1), c = fe(null);
|
|
2722
2724
|
return {
|
|
2723
2725
|
containerRef: c,
|
|
2724
2726
|
colSizes: n,
|
|
@@ -2751,7 +2753,7 @@ var rr;
|
|
|
2751
2753
|
function ks() {
|
|
2752
2754
|
if (rr) return ne;
|
|
2753
2755
|
rr = 1;
|
|
2754
|
-
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, s = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, c = e ? Symbol.for("react.provider") : 60109, l = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, f = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, w = e ? Symbol.for("react.suspense_list") : 60120, S = e ? Symbol.for("react.memo") : 60115, M = e ? Symbol.for("react.lazy") : 60116, z = e ? Symbol.for("react.block") : 60121, A = e ? Symbol.for("react.fundamental") : 60117,
|
|
2756
|
+
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, s = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, c = e ? Symbol.for("react.provider") : 60109, l = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, f = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, w = e ? Symbol.for("react.suspense_list") : 60120, S = e ? Symbol.for("react.memo") : 60115, M = e ? Symbol.for("react.lazy") : 60116, z = e ? Symbol.for("react.block") : 60121, A = e ? Symbol.for("react.fundamental") : 60117, j = e ? Symbol.for("react.responder") : 60118, C = e ? Symbol.for("react.scope") : 60119;
|
|
2755
2757
|
function y(u) {
|
|
2756
2758
|
if (typeof u == "object" && u !== null) {
|
|
2757
2759
|
var g = u.$$typeof;
|
|
@@ -2810,7 +2812,7 @@ function ks() {
|
|
|
2810
2812
|
}, ne.isSuspense = function(u) {
|
|
2811
2813
|
return y(u) === h;
|
|
2812
2814
|
}, ne.isValidElementType = function(u) {
|
|
2813
|
-
return typeof u == "string" || typeof u == "function" || u === s || u === p || u === i || u === a || u === h || u === w || typeof u == "object" && u !== null && (u.$$typeof === M || u.$$typeof === S || u.$$typeof === c || u.$$typeof === l || u.$$typeof === f || u.$$typeof === A || u.$$typeof ===
|
|
2815
|
+
return typeof u == "string" || typeof u == "function" || u === s || u === p || u === i || u === a || u === h || u === w || typeof u == "object" && u !== null && (u.$$typeof === M || u.$$typeof === S || u.$$typeof === c || u.$$typeof === l || u.$$typeof === f || u.$$typeof === A || u.$$typeof === j || u.$$typeof === C || u.$$typeof === z);
|
|
2814
2816
|
}, ne.typeOf = y, ne;
|
|
2815
2817
|
}
|
|
2816
2818
|
var se = {};
|
|
@@ -2825,15 +2827,15 @@ var se = {};
|
|
|
2825
2827
|
var nr;
|
|
2826
2828
|
function _s() {
|
|
2827
2829
|
return nr || (nr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
2828
|
-
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, s = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, c = e ? Symbol.for("react.provider") : 60109, l = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, f = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, w = e ? Symbol.for("react.suspense_list") : 60120, S = e ? Symbol.for("react.memo") : 60115, M = e ? Symbol.for("react.lazy") : 60116, z = e ? Symbol.for("react.block") : 60121, A = e ? Symbol.for("react.fundamental") : 60117,
|
|
2830
|
+
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, s = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, c = e ? Symbol.for("react.provider") : 60109, l = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, f = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, w = e ? Symbol.for("react.suspense_list") : 60120, S = e ? Symbol.for("react.memo") : 60115, M = e ? Symbol.for("react.lazy") : 60116, z = e ? Symbol.for("react.block") : 60121, A = e ? Symbol.for("react.fundamental") : 60117, j = e ? Symbol.for("react.responder") : 60118, C = e ? Symbol.for("react.scope") : 60119;
|
|
2829
2831
|
function y(E) {
|
|
2830
2832
|
return typeof E == "string" || typeof E == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
2831
|
-
E === s || E === p || E === i || E === a || E === h || E === w || typeof E == "object" && E !== null && (E.$$typeof === M || E.$$typeof === S || E.$$typeof === c || E.$$typeof === l || E.$$typeof === f || E.$$typeof === A || E.$$typeof ===
|
|
2833
|
+
E === s || E === p || E === i || E === a || E === h || E === w || typeof E == "object" && E !== null && (E.$$typeof === M || E.$$typeof === S || E.$$typeof === c || E.$$typeof === l || E.$$typeof === f || E.$$typeof === A || E.$$typeof === j || E.$$typeof === C || E.$$typeof === z);
|
|
2832
2834
|
}
|
|
2833
2835
|
function b(E) {
|
|
2834
2836
|
if (typeof E == "object" && E !== null) {
|
|
2835
|
-
var
|
|
2836
|
-
switch (
|
|
2837
|
+
var me = E.$$typeof;
|
|
2838
|
+
switch (me) {
|
|
2837
2839
|
case r:
|
|
2838
2840
|
var Te = E.type;
|
|
2839
2841
|
switch (Te) {
|
|
@@ -2854,17 +2856,17 @@ function _s() {
|
|
|
2854
2856
|
case c:
|
|
2855
2857
|
return Y;
|
|
2856
2858
|
default:
|
|
2857
|
-
return
|
|
2859
|
+
return me;
|
|
2858
2860
|
}
|
|
2859
2861
|
}
|
|
2860
2862
|
case n:
|
|
2861
|
-
return
|
|
2863
|
+
return me;
|
|
2862
2864
|
}
|
|
2863
2865
|
}
|
|
2864
2866
|
}
|
|
2865
|
-
var u = d, g = p, _ = l, x = c, R = r, F = f, D = s, k = M, N = S,
|
|
2866
|
-
function
|
|
2867
|
-
return
|
|
2867
|
+
var u = d, g = p, _ = l, x = c, R = r, F = f, D = s, k = M, N = S, G = n, ae = i, oe = a, ce = h, ee = !1;
|
|
2868
|
+
function ve(E) {
|
|
2869
|
+
return ee || (ee = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), v(E) || b(E) === d;
|
|
2868
2870
|
}
|
|
2869
2871
|
function v(E) {
|
|
2870
2872
|
return b(E) === p;
|
|
@@ -2890,19 +2892,19 @@ function _s() {
|
|
|
2890
2892
|
function $(E) {
|
|
2891
2893
|
return b(E) === S;
|
|
2892
2894
|
}
|
|
2893
|
-
function
|
|
2895
|
+
function q(E) {
|
|
2894
2896
|
return b(E) === n;
|
|
2895
2897
|
}
|
|
2896
2898
|
function Z(E) {
|
|
2897
2899
|
return b(E) === i;
|
|
2898
2900
|
}
|
|
2899
|
-
function
|
|
2901
|
+
function U(E) {
|
|
2900
2902
|
return b(E) === a;
|
|
2901
2903
|
}
|
|
2902
|
-
function
|
|
2904
|
+
function he(E) {
|
|
2903
2905
|
return b(E) === h;
|
|
2904
2906
|
}
|
|
2905
|
-
se.AsyncMode = u, se.ConcurrentMode = g, se.ContextConsumer = _, se.ContextProvider = x, se.Element = R, se.ForwardRef = F, se.Fragment = D, se.Lazy = k, se.Memo = N, se.Portal =
|
|
2907
|
+
se.AsyncMode = u, se.ConcurrentMode = g, se.ContextConsumer = _, se.ContextProvider = x, se.Element = R, se.ForwardRef = F, se.Fragment = D, se.Lazy = k, se.Memo = N, se.Portal = G, se.Profiler = ae, se.StrictMode = oe, se.Suspense = ce, se.isAsyncMode = ve, se.isConcurrentMode = v, se.isContextConsumer = P, se.isContextProvider = V, se.isElement = W, se.isForwardRef = I, se.isFragment = X, se.isLazy = O, se.isMemo = $, se.isPortal = q, se.isProfiler = Z, se.isStrictMode = U, se.isSuspense = he, se.isValidElementType = y, se.typeOf = b;
|
|
2906
2908
|
}()), se;
|
|
2907
2909
|
}
|
|
2908
2910
|
var sr;
|
|
@@ -2961,7 +2963,7 @@ function Ns() {
|
|
|
2961
2963
|
}, lt;
|
|
2962
2964
|
}
|
|
2963
2965
|
var ut, ar;
|
|
2964
|
-
function
|
|
2966
|
+
function Ct() {
|
|
2965
2967
|
if (ar) return ut;
|
|
2966
2968
|
ar = 1;
|
|
2967
2969
|
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
@@ -2978,7 +2980,7 @@ function zs() {
|
|
|
2978
2980
|
var e = function() {
|
|
2979
2981
|
};
|
|
2980
2982
|
if (process.env.NODE_ENV !== "production") {
|
|
2981
|
-
var r =
|
|
2983
|
+
var r = Ct(), n = {}, s = Br();
|
|
2982
2984
|
e = function(i) {
|
|
2983
2985
|
var c = "Warning: " + i;
|
|
2984
2986
|
typeof console < "u" && console.error(c);
|
|
@@ -3024,7 +3026,7 @@ var ht, lr;
|
|
|
3024
3026
|
function As() {
|
|
3025
3027
|
if (lr) return ht;
|
|
3026
3028
|
lr = 1;
|
|
3027
|
-
var e = $r(), r = Ns(), n =
|
|
3029
|
+
var e = $r(), r = Ns(), n = Ct(), s = Br(), a = zs(), i = function() {
|
|
3028
3030
|
};
|
|
3029
3031
|
process.env.NODE_ENV !== "production" && (i = function(l) {
|
|
3030
3032
|
var d = "Warning: " + l;
|
|
@@ -3045,15 +3047,15 @@ function As() {
|
|
|
3045
3047
|
return P;
|
|
3046
3048
|
}
|
|
3047
3049
|
var w = "<<anonymous>>", S = {
|
|
3048
|
-
array:
|
|
3049
|
-
bigint:
|
|
3050
|
-
bool:
|
|
3051
|
-
func:
|
|
3052
|
-
number:
|
|
3053
|
-
object:
|
|
3054
|
-
string:
|
|
3055
|
-
symbol:
|
|
3056
|
-
any:
|
|
3050
|
+
array: j("array"),
|
|
3051
|
+
bigint: j("bigint"),
|
|
3052
|
+
bool: j("boolean"),
|
|
3053
|
+
func: j("function"),
|
|
3054
|
+
number: j("number"),
|
|
3055
|
+
object: j("object"),
|
|
3056
|
+
string: j("string"),
|
|
3057
|
+
symbol: j("symbol"),
|
|
3058
|
+
any: C(),
|
|
3057
3059
|
arrayOf: y,
|
|
3058
3060
|
element: b(),
|
|
3059
3061
|
elementType: u(),
|
|
@@ -3075,33 +3077,33 @@ function As() {
|
|
|
3075
3077
|
function A(v) {
|
|
3076
3078
|
if (process.env.NODE_ENV !== "production")
|
|
3077
3079
|
var P = {}, V = 0;
|
|
3078
|
-
function W(X, O, $,
|
|
3079
|
-
if (
|
|
3080
|
+
function W(X, O, $, q, Z, U, he) {
|
|
3081
|
+
if (q = q || w, U = U || $, he !== n) {
|
|
3080
3082
|
if (d) {
|
|
3081
3083
|
var E = new Error(
|
|
3082
3084
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
3083
3085
|
);
|
|
3084
3086
|
throw E.name = "Invariant Violation", E;
|
|
3085
3087
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
3086
|
-
var
|
|
3087
|
-
!P[
|
|
3088
|
+
var me = q + ":" + $;
|
|
3089
|
+
!P[me] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
3088
3090
|
V < 3 && (i(
|
|
3089
|
-
"You are manually calling a React.PropTypes validation function for the `" +
|
|
3090
|
-
), P[
|
|
3091
|
+
"You are manually calling a React.PropTypes validation function for the `" + U + "` prop on `" + q + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
3092
|
+
), P[me] = !0, V++);
|
|
3091
3093
|
}
|
|
3092
3094
|
}
|
|
3093
|
-
return O[$] == null ? X ? O[$] === null ? new z("The " + Z + " `" +
|
|
3095
|
+
return O[$] == null ? X ? O[$] === null ? new z("The " + Z + " `" + U + "` is marked as required " + ("in `" + q + "`, but its value is `null`.")) : new z("The " + Z + " `" + U + "` is marked as required in " + ("`" + q + "`, but its value is `undefined`.")) : null : v(O, $, q, Z, U);
|
|
3094
3096
|
}
|
|
3095
3097
|
var I = W.bind(null, !1);
|
|
3096
3098
|
return I.isRequired = W.bind(null, !0), I;
|
|
3097
3099
|
}
|
|
3098
|
-
function
|
|
3100
|
+
function j(v) {
|
|
3099
3101
|
function P(V, W, I, X, O, $) {
|
|
3100
|
-
var
|
|
3102
|
+
var q = V[W], Z = oe(q);
|
|
3101
3103
|
if (Z !== v) {
|
|
3102
|
-
var
|
|
3104
|
+
var U = ce(q);
|
|
3103
3105
|
return new z(
|
|
3104
|
-
"Invalid " + X + " `" + O + "` of type " + ("`" +
|
|
3106
|
+
"Invalid " + X + " `" + O + "` of type " + ("`" + U + "` supplied to `" + I + "`, expected ") + ("`" + v + "`."),
|
|
3105
3107
|
{ expectedType: v }
|
|
3106
3108
|
);
|
|
3107
3109
|
}
|
|
@@ -3109,7 +3111,7 @@ function As() {
|
|
|
3109
3111
|
}
|
|
3110
3112
|
return A(P);
|
|
3111
3113
|
}
|
|
3112
|
-
function
|
|
3114
|
+
function C() {
|
|
3113
3115
|
return A(c);
|
|
3114
3116
|
}
|
|
3115
3117
|
function y(v) {
|
|
@@ -3118,13 +3120,13 @@ function As() {
|
|
|
3118
3120
|
return new z("Property `" + O + "` of component `" + I + "` has invalid PropType notation inside arrayOf.");
|
|
3119
3121
|
var $ = V[W];
|
|
3120
3122
|
if (!Array.isArray($)) {
|
|
3121
|
-
var
|
|
3122
|
-
return new z("Invalid " + X + " `" + O + "` of type " + ("`" +
|
|
3123
|
+
var q = oe($);
|
|
3124
|
+
return new z("Invalid " + X + " `" + O + "` of type " + ("`" + q + "` supplied to `" + I + "`, expected an array."));
|
|
3123
3125
|
}
|
|
3124
3126
|
for (var Z = 0; Z < $.length; Z++) {
|
|
3125
|
-
var
|
|
3126
|
-
if (
|
|
3127
|
-
return
|
|
3127
|
+
var U = v($, Z, I, X, O + "[" + Z + "]", n);
|
|
3128
|
+
if (U instanceof Error)
|
|
3129
|
+
return U;
|
|
3128
3130
|
}
|
|
3129
3131
|
return null;
|
|
3130
3132
|
}
|
|
@@ -3134,7 +3136,7 @@ function As() {
|
|
|
3134
3136
|
function v(P, V, W, I, X) {
|
|
3135
3137
|
var O = P[V];
|
|
3136
3138
|
if (!l(O)) {
|
|
3137
|
-
var $ =
|
|
3139
|
+
var $ = oe(O);
|
|
3138
3140
|
return new z("Invalid " + I + " `" + X + "` of type " + ("`" + $ + "` supplied to `" + W + "`, expected a single ReactElement."));
|
|
3139
3141
|
}
|
|
3140
3142
|
return null;
|
|
@@ -3145,7 +3147,7 @@ function As() {
|
|
|
3145
3147
|
function v(P, V, W, I, X) {
|
|
3146
3148
|
var O = P[V];
|
|
3147
3149
|
if (!e.isValidElementType(O)) {
|
|
3148
|
-
var $ =
|
|
3150
|
+
var $ = oe(O);
|
|
3149
3151
|
return new z("Invalid " + I + " `" + X + "` of type " + ("`" + $ + "` supplied to `" + W + "`, expected a single ReactElement type."));
|
|
3150
3152
|
}
|
|
3151
3153
|
return null;
|
|
@@ -3155,8 +3157,8 @@ function As() {
|
|
|
3155
3157
|
function g(v) {
|
|
3156
3158
|
function P(V, W, I, X, O) {
|
|
3157
3159
|
if (!(V[W] instanceof v)) {
|
|
3158
|
-
var $ = v.name || w,
|
|
3159
|
-
return new z("Invalid " + X + " `" + O + "` of type " + ("`" +
|
|
3160
|
+
var $ = v.name || w, q = ve(V[W]);
|
|
3161
|
+
return new z("Invalid " + X + " `" + O + "` of type " + ("`" + q + "` supplied to `" + I + "`, expected ") + ("instance of `" + $ + "`."));
|
|
3160
3162
|
}
|
|
3161
3163
|
return null;
|
|
3162
3164
|
}
|
|
@@ -3168,12 +3170,12 @@ function As() {
|
|
|
3168
3170
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
3169
3171
|
) : i("Invalid argument supplied to oneOf, expected an array.")), c;
|
|
3170
3172
|
function P(V, W, I, X, O) {
|
|
3171
|
-
for (var $ = V[W],
|
|
3172
|
-
if (M($, v[
|
|
3173
|
+
for (var $ = V[W], q = 0; q < v.length; q++)
|
|
3174
|
+
if (M($, v[q]))
|
|
3173
3175
|
return null;
|
|
3174
|
-
var Z = JSON.stringify(v, function(
|
|
3175
|
-
var
|
|
3176
|
-
return
|
|
3176
|
+
var Z = JSON.stringify(v, function(he, E) {
|
|
3177
|
+
var me = ce(E);
|
|
3178
|
+
return me === "symbol" ? String(E) : E;
|
|
3177
3179
|
});
|
|
3178
3180
|
return new z("Invalid " + X + " `" + O + "` of value `" + String($) + "` " + ("supplied to `" + I + "`, expected one of " + Z + "."));
|
|
3179
3181
|
}
|
|
@@ -3183,14 +3185,14 @@ function As() {
|
|
|
3183
3185
|
function P(V, W, I, X, O) {
|
|
3184
3186
|
if (typeof v != "function")
|
|
3185
3187
|
return new z("Property `" + O + "` of component `" + I + "` has invalid PropType notation inside objectOf.");
|
|
3186
|
-
var $ = V[W],
|
|
3187
|
-
if (
|
|
3188
|
-
return new z("Invalid " + X + " `" + O + "` of type " + ("`" +
|
|
3188
|
+
var $ = V[W], q = oe($);
|
|
3189
|
+
if (q !== "object")
|
|
3190
|
+
return new z("Invalid " + X + " `" + O + "` of type " + ("`" + q + "` supplied to `" + I + "`, expected an object."));
|
|
3189
3191
|
for (var Z in $)
|
|
3190
3192
|
if (s($, Z)) {
|
|
3191
|
-
var
|
|
3192
|
-
if (
|
|
3193
|
-
return
|
|
3193
|
+
var U = v($, Z, I, X, O + "." + Z, n);
|
|
3194
|
+
if (U instanceof Error)
|
|
3195
|
+
return U;
|
|
3194
3196
|
}
|
|
3195
3197
|
return null;
|
|
3196
3198
|
}
|
|
@@ -3203,24 +3205,24 @@ function As() {
|
|
|
3203
3205
|
var V = v[P];
|
|
3204
3206
|
if (typeof V != "function")
|
|
3205
3207
|
return i(
|
|
3206
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " +
|
|
3208
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ee(V) + " at index " + P + "."
|
|
3207
3209
|
), c;
|
|
3208
3210
|
}
|
|
3209
|
-
function W(I, X, O, $,
|
|
3210
|
-
for (var Z = [],
|
|
3211
|
-
var
|
|
3211
|
+
function W(I, X, O, $, q) {
|
|
3212
|
+
for (var Z = [], U = 0; U < v.length; U++) {
|
|
3213
|
+
var he = v[U], E = he(I, X, O, $, q, n);
|
|
3212
3214
|
if (E == null)
|
|
3213
3215
|
return null;
|
|
3214
3216
|
E.data && s(E.data, "expectedType") && Z.push(E.data.expectedType);
|
|
3215
3217
|
}
|
|
3216
|
-
var
|
|
3217
|
-
return new z("Invalid " + $ + " `" +
|
|
3218
|
+
var me = Z.length > 0 ? ", expected one of type [" + Z.join(", ") + "]" : "";
|
|
3219
|
+
return new z("Invalid " + $ + " `" + q + "` supplied to " + ("`" + O + "`" + me + "."));
|
|
3218
3220
|
}
|
|
3219
3221
|
return A(W);
|
|
3220
3222
|
}
|
|
3221
3223
|
function F() {
|
|
3222
3224
|
function v(P, V, W, I, X) {
|
|
3223
|
-
return
|
|
3225
|
+
return G(P[V]) ? null : new z("Invalid " + I + " `" + X + "` supplied to " + ("`" + W + "`, expected a ReactNode."));
|
|
3224
3226
|
}
|
|
3225
3227
|
return A(v);
|
|
3226
3228
|
}
|
|
@@ -3231,16 +3233,16 @@ function As() {
|
|
|
3231
3233
|
}
|
|
3232
3234
|
function k(v) {
|
|
3233
3235
|
function P(V, W, I, X, O) {
|
|
3234
|
-
var $ = V[W],
|
|
3235
|
-
if (
|
|
3236
|
-
return new z("Invalid " + X + " `" + O + "` of type `" +
|
|
3236
|
+
var $ = V[W], q = oe($);
|
|
3237
|
+
if (q !== "object")
|
|
3238
|
+
return new z("Invalid " + X + " `" + O + "` of type `" + q + "` " + ("supplied to `" + I + "`, expected `object`."));
|
|
3237
3239
|
for (var Z in v) {
|
|
3238
|
-
var
|
|
3239
|
-
if (typeof
|
|
3240
|
-
return D(I, X, O, Z,
|
|
3241
|
-
var
|
|
3242
|
-
if (
|
|
3243
|
-
return
|
|
3240
|
+
var U = v[Z];
|
|
3241
|
+
if (typeof U != "function")
|
|
3242
|
+
return D(I, X, O, Z, ce(U));
|
|
3243
|
+
var he = U($, Z, I, X, O + "." + Z, n);
|
|
3244
|
+
if (he)
|
|
3245
|
+
return he;
|
|
3244
3246
|
}
|
|
3245
3247
|
return null;
|
|
3246
3248
|
}
|
|
@@ -3248,20 +3250,20 @@ function As() {
|
|
|
3248
3250
|
}
|
|
3249
3251
|
function N(v) {
|
|
3250
3252
|
function P(V, W, I, X, O) {
|
|
3251
|
-
var $ = V[W],
|
|
3252
|
-
if (
|
|
3253
|
-
return new z("Invalid " + X + " `" + O + "` of type `" +
|
|
3253
|
+
var $ = V[W], q = oe($);
|
|
3254
|
+
if (q !== "object")
|
|
3255
|
+
return new z("Invalid " + X + " `" + O + "` of type `" + q + "` " + ("supplied to `" + I + "`, expected `object`."));
|
|
3254
3256
|
var Z = r({}, V[W], v);
|
|
3255
|
-
for (var
|
|
3256
|
-
var
|
|
3257
|
-
if (s(v,
|
|
3258
|
-
return D(I, X, O,
|
|
3259
|
-
if (!
|
|
3257
|
+
for (var U in Z) {
|
|
3258
|
+
var he = v[U];
|
|
3259
|
+
if (s(v, U) && typeof he != "function")
|
|
3260
|
+
return D(I, X, O, U, ce(he));
|
|
3261
|
+
if (!he)
|
|
3260
3262
|
return new z(
|
|
3261
|
-
"Invalid " + X + " `" + O + "` key `" +
|
|
3263
|
+
"Invalid " + X + " `" + O + "` key `" + U + "` supplied to `" + I + "`.\nBad object: " + JSON.stringify(V[W], null, " ") + `
|
|
3262
3264
|
Valid keys: ` + JSON.stringify(Object.keys(v), null, " ")
|
|
3263
3265
|
);
|
|
3264
|
-
var E =
|
|
3266
|
+
var E = he($, U, I, X, O + "." + U, n);
|
|
3265
3267
|
if (E)
|
|
3266
3268
|
return E;
|
|
3267
3269
|
}
|
|
@@ -3269,7 +3271,7 @@ Valid keys: ` + JSON.stringify(Object.keys(v), null, " ")
|
|
|
3269
3271
|
}
|
|
3270
3272
|
return A(P);
|
|
3271
3273
|
}
|
|
3272
|
-
function
|
|
3274
|
+
function G(v) {
|
|
3273
3275
|
switch (typeof v) {
|
|
3274
3276
|
case "number":
|
|
3275
3277
|
case "string":
|
|
@@ -3279,7 +3281,7 @@ Valid keys: ` + JSON.stringify(Object.keys(v), null, " ")
|
|
|
3279
3281
|
return !v;
|
|
3280
3282
|
case "object":
|
|
3281
3283
|
if (Array.isArray(v))
|
|
3282
|
-
return v.every(
|
|
3284
|
+
return v.every(G);
|
|
3283
3285
|
if (v === null || l(v))
|
|
3284
3286
|
return !0;
|
|
3285
3287
|
var P = h(v);
|
|
@@ -3287,12 +3289,12 @@ Valid keys: ` + JSON.stringify(Object.keys(v), null, " ")
|
|
|
3287
3289
|
var V = P.call(v), W;
|
|
3288
3290
|
if (P !== v.entries) {
|
|
3289
3291
|
for (; !(W = V.next()).done; )
|
|
3290
|
-
if (!
|
|
3292
|
+
if (!G(W.value))
|
|
3291
3293
|
return !1;
|
|
3292
3294
|
} else
|
|
3293
3295
|
for (; !(W = V.next()).done; ) {
|
|
3294
3296
|
var I = W.value;
|
|
3295
|
-
if (I && !
|
|
3297
|
+
if (I && !G(I[1]))
|
|
3296
3298
|
return !1;
|
|
3297
3299
|
}
|
|
3298
3300
|
} else
|
|
@@ -3302,17 +3304,17 @@ Valid keys: ` + JSON.stringify(Object.keys(v), null, " ")
|
|
|
3302
3304
|
return !1;
|
|
3303
3305
|
}
|
|
3304
3306
|
}
|
|
3305
|
-
function
|
|
3307
|
+
function ae(v, P) {
|
|
3306
3308
|
return v === "symbol" ? !0 : P ? P["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && P instanceof Symbol : !1;
|
|
3307
3309
|
}
|
|
3308
|
-
function
|
|
3310
|
+
function oe(v) {
|
|
3309
3311
|
var P = typeof v;
|
|
3310
|
-
return Array.isArray(v) ? "array" : v instanceof RegExp ? "object" :
|
|
3312
|
+
return Array.isArray(v) ? "array" : v instanceof RegExp ? "object" : ae(P, v) ? "symbol" : P;
|
|
3311
3313
|
}
|
|
3312
|
-
function
|
|
3314
|
+
function ce(v) {
|
|
3313
3315
|
if (typeof v > "u" || v === null)
|
|
3314
3316
|
return "" + v;
|
|
3315
|
-
var P =
|
|
3317
|
+
var P = oe(v);
|
|
3316
3318
|
if (P === "object") {
|
|
3317
3319
|
if (v instanceof Date)
|
|
3318
3320
|
return "date";
|
|
@@ -3321,8 +3323,8 @@ Valid keys: ` + JSON.stringify(Object.keys(v), null, " ")
|
|
|
3321
3323
|
}
|
|
3322
3324
|
return P;
|
|
3323
3325
|
}
|
|
3324
|
-
function
|
|
3325
|
-
var P =
|
|
3326
|
+
function ee(v) {
|
|
3327
|
+
var P = ce(v);
|
|
3326
3328
|
switch (P) {
|
|
3327
3329
|
case "array":
|
|
3328
3330
|
case "object":
|
|
@@ -3335,7 +3337,7 @@ Valid keys: ` + JSON.stringify(Object.keys(v), null, " ")
|
|
|
3335
3337
|
return P;
|
|
3336
3338
|
}
|
|
3337
3339
|
}
|
|
3338
|
-
function
|
|
3340
|
+
function ve(v) {
|
|
3339
3341
|
return !v.constructor || !v.constructor.name ? w : v.constructor.name;
|
|
3340
3342
|
}
|
|
3341
3343
|
return S.checkPropTypes = a, S.resetWarningCache = a.resetWarningCache, S.PropTypes = S, S;
|
|
@@ -3345,7 +3347,7 @@ var pt, ur;
|
|
|
3345
3347
|
function Ds() {
|
|
3346
3348
|
if (ur) return pt;
|
|
3347
3349
|
ur = 1;
|
|
3348
|
-
var e =
|
|
3350
|
+
var e = Ct();
|
|
3349
3351
|
function r() {
|
|
3350
3352
|
}
|
|
3351
3353
|
function n() {
|
|
@@ -3395,7 +3397,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
3395
3397
|
} else
|
|
3396
3398
|
gt.exports = Ds()();
|
|
3397
3399
|
var Bs = gt.exports;
|
|
3398
|
-
const
|
|
3400
|
+
const K = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
|
|
3399
3401
|
const s = e[r];
|
|
3400
3402
|
if (s && isNaN(Date.parse(s)))
|
|
3401
3403
|
return new Error(
|
|
@@ -3434,8 +3436,8 @@ const G = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
|
|
|
3434
3436
|
onSelect: z,
|
|
3435
3437
|
onError: A = () => {
|
|
3436
3438
|
},
|
|
3437
|
-
layout:
|
|
3438
|
-
enableFilePreview:
|
|
3439
|
+
layout: j = "grid",
|
|
3440
|
+
enableFilePreview: C = !0,
|
|
3439
3441
|
maxFileSize: y,
|
|
3440
3442
|
filePreviewPath: b,
|
|
3441
3443
|
acceptedFileTypes: u,
|
|
@@ -3446,15 +3448,15 @@ const G = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
|
|
|
3446
3448
|
primaryColor: F = "#6155b4",
|
|
3447
3449
|
fontFamily: D = "Nunito Sans, sans-serif"
|
|
3448
3450
|
}) => {
|
|
3449
|
-
const k = Ls(), { containerRef: N, colSizes:
|
|
3451
|
+
const k = Ls(), { containerRef: N, colSizes: G, isDragging: ae, handleMouseMove: oe, handleMouseUp: ce, handleMouseDown: ee } = Os(20, 80), ve = {
|
|
3450
3452
|
"--file-manager-font-family": D,
|
|
3451
3453
|
"--file-manager-primary-color": F,
|
|
3452
3454
|
height: g,
|
|
3453
3455
|
width: _
|
|
3454
3456
|
};
|
|
3455
|
-
return /* @__PURE__ */ t.jsxs("main", { className: "file-explorer", onContextMenu: (v) => v.preventDefault(), style:
|
|
3457
|
+
return /* @__PURE__ */ t.jsxs("main", { className: "file-explorer", onContextMenu: (v) => v.preventDefault(), style: ve, children: [
|
|
3456
3458
|
/* @__PURE__ */ t.jsx(xt, { loading: n }),
|
|
3457
|
-
/* @__PURE__ */ t.jsx(zn, { filesData: e, onError: A, children: /* @__PURE__ */ t.jsx(Dn, { initialPath: x, children: /* @__PURE__ */ t.jsx(In, { onDownload: f, onSelect: z, children: /* @__PURE__ */ t.jsx($n, { onPaste: d, onCut: c, onCopy: l, children: /* @__PURE__ */ t.jsxs(_n, { layout:
|
|
3459
|
+
/* @__PURE__ */ t.jsx(zn, { filesData: e, onError: A, children: /* @__PURE__ */ t.jsx(Dn, { initialPath: x, children: /* @__PURE__ */ t.jsx(In, { onDownload: f, onSelect: z, children: /* @__PURE__ */ t.jsx($n, { onPaste: d, onCut: c, onCopy: l, children: /* @__PURE__ */ t.jsxs(_n, { layout: j, children: [
|
|
3458
3460
|
/* @__PURE__ */ t.jsx(
|
|
3459
3461
|
Sr,
|
|
3460
3462
|
{
|
|
@@ -3469,21 +3471,21 @@ const G = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
|
|
|
3469
3471
|
"section",
|
|
3470
3472
|
{
|
|
3471
3473
|
ref: N,
|
|
3472
|
-
onMouseMove:
|
|
3473
|
-
onMouseUp:
|
|
3474
|
+
onMouseMove: oe,
|
|
3475
|
+
onMouseUp: ce,
|
|
3474
3476
|
className: "files-container",
|
|
3475
3477
|
children: [
|
|
3476
|
-
/* @__PURE__ */ t.jsxs("div", { className: "navigation-pane", style: { width:
|
|
3478
|
+
/* @__PURE__ */ t.jsxs("div", { className: "navigation-pane", style: { width: G.col1 + "%" }, children: [
|
|
3477
3479
|
/* @__PURE__ */ t.jsx(Or, {}),
|
|
3478
3480
|
/* @__PURE__ */ t.jsx(
|
|
3479
3481
|
"div",
|
|
3480
3482
|
{
|
|
3481
|
-
className: `sidebar-resize ${
|
|
3482
|
-
onMouseDown:
|
|
3483
|
+
className: `sidebar-resize ${ae ? "sidebar-dragging" : ""}`,
|
|
3484
|
+
onMouseDown: ee
|
|
3483
3485
|
}
|
|
3484
3486
|
)
|
|
3485
3487
|
] }),
|
|
3486
|
-
/* @__PURE__ */ t.jsxs("div", { className: "folders-preview", style: { width:
|
|
3488
|
+
/* @__PURE__ */ t.jsxs("div", { className: "folders-preview", style: { width: G.col2 + "%" }, children: [
|
|
3487
3489
|
/* @__PURE__ */ t.jsx(kr, {}),
|
|
3488
3490
|
/* @__PURE__ */ t.jsx(
|
|
3489
3491
|
Ir,
|
|
@@ -3492,7 +3494,7 @@ const G = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
|
|
|
3492
3494
|
onRename: p,
|
|
3493
3495
|
onFileOpen: M,
|
|
3494
3496
|
onRefresh: S,
|
|
3495
|
-
enableFilePreview:
|
|
3497
|
+
enableFilePreview: C,
|
|
3496
3498
|
triggerAction: k
|
|
3497
3499
|
}
|
|
3498
3500
|
)
|
|
@@ -3520,45 +3522,46 @@ const G = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
|
|
|
3520
3522
|
};
|
|
3521
3523
|
Hr.displayName = "FileManager";
|
|
3522
3524
|
Hr.propTypes = {
|
|
3523
|
-
files:
|
|
3524
|
-
|
|
3525
|
-
name:
|
|
3526
|
-
isDirectory:
|
|
3527
|
-
path:
|
|
3525
|
+
files: K.arrayOf(
|
|
3526
|
+
K.shape({
|
|
3527
|
+
name: K.string.isRequired,
|
|
3528
|
+
isDirectory: K.bool.isRequired,
|
|
3529
|
+
path: K.string.isRequired,
|
|
3528
3530
|
updatedAt: Hs,
|
|
3529
|
-
size:
|
|
3531
|
+
size: K.number
|
|
3530
3532
|
})
|
|
3531
3533
|
).isRequired,
|
|
3532
|
-
fileUploadConfig:
|
|
3534
|
+
fileUploadConfig: K.shape({
|
|
3533
3535
|
url: dr,
|
|
3534
|
-
headers:
|
|
3536
|
+
headers: K.objectOf(K.string),
|
|
3537
|
+
method: K.oneOf(["POST", "PUT"])
|
|
3535
3538
|
}),
|
|
3536
|
-
isLoading:
|
|
3537
|
-
onCreateFolder:
|
|
3538
|
-
onFileUploading:
|
|
3539
|
-
onFileUploaded:
|
|
3540
|
-
onRename:
|
|
3541
|
-
onDelete:
|
|
3542
|
-
onCut:
|
|
3543
|
-
onCopy:
|
|
3544
|
-
onPaste:
|
|
3545
|
-
onDownload:
|
|
3546
|
-
onLayoutChange:
|
|
3547
|
-
onRefresh:
|
|
3548
|
-
onFileOpen:
|
|
3549
|
-
onSelect:
|
|
3550
|
-
onError:
|
|
3551
|
-
layout:
|
|
3552
|
-
maxFileSize:
|
|
3553
|
-
enableFilePreview:
|
|
3539
|
+
isLoading: K.bool,
|
|
3540
|
+
onCreateFolder: K.func,
|
|
3541
|
+
onFileUploading: K.func,
|
|
3542
|
+
onFileUploaded: K.func,
|
|
3543
|
+
onRename: K.func,
|
|
3544
|
+
onDelete: K.func,
|
|
3545
|
+
onCut: K.func,
|
|
3546
|
+
onCopy: K.func,
|
|
3547
|
+
onPaste: K.func,
|
|
3548
|
+
onDownload: K.func,
|
|
3549
|
+
onLayoutChange: K.func,
|
|
3550
|
+
onRefresh: K.func,
|
|
3551
|
+
onFileOpen: K.func,
|
|
3552
|
+
onSelect: K.func,
|
|
3553
|
+
onError: K.func,
|
|
3554
|
+
layout: K.oneOf(["grid", "list"]),
|
|
3555
|
+
maxFileSize: K.number,
|
|
3556
|
+
enableFilePreview: K.bool,
|
|
3554
3557
|
filePreviewPath: dr,
|
|
3555
|
-
acceptedFileTypes:
|
|
3556
|
-
height:
|
|
3557
|
-
width:
|
|
3558
|
-
initialPath:
|
|
3559
|
-
filePreviewComponent:
|
|
3560
|
-
primaryColor:
|
|
3561
|
-
fontFamily:
|
|
3558
|
+
acceptedFileTypes: K.string,
|
|
3559
|
+
height: K.oneOfType([K.string, K.number]),
|
|
3560
|
+
width: K.oneOfType([K.string, K.number]),
|
|
3561
|
+
initialPath: K.string,
|
|
3562
|
+
filePreviewComponent: K.func,
|
|
3563
|
+
primaryColor: K.string,
|
|
3564
|
+
fontFamily: K.string
|
|
3562
3565
|
};
|
|
3563
3566
|
export {
|
|
3564
3567
|
Hr as FileManager
|