@cubone/react-file-manager 1.26.3 → 1.27.1
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 +36 -35
- package/dist/react-file-manager.es.js +457 -447
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as c, jsxs as z, Fragment as fe } from "react/jsx-runtime";
|
|
2
2
|
import * as Re from "react";
|
|
3
|
-
import $e, { useState as R, useRef as
|
|
3
|
+
import $e, { useState as R, useRef as re, useEffect as Q, createContext as Pe, useContext as Le, useLayoutEffect as Bn, useCallback as cn, useMemo as Ge } from "react";
|
|
4
4
|
var dn = {
|
|
5
5
|
color: void 0,
|
|
6
6
|
size: void 0,
|
|
@@ -217,7 +217,7 @@ function ut(n) {
|
|
|
217
217
|
}
|
|
218
218
|
const Me = (n = () => {
|
|
219
219
|
}) => {
|
|
220
|
-
const [e, t] = R(!1), o =
|
|
220
|
+
const [e, t] = R(!1), o = re(null), s = (i) => {
|
|
221
221
|
var r;
|
|
222
222
|
(r = o.current) != null && r.contains(i.target) ? t(!1) : (t(!0), n(i, o));
|
|
223
223
|
};
|
|
@@ -230,7 +230,7 @@ const Me = (n = () => {
|
|
|
230
230
|
return ["list", "grid"].includes(i) ? i : "grid";
|
|
231
231
|
}
|
|
232
232
|
return /* @__PURE__ */ c(bn.Provider, { value: { activeLayout: t, setActiveLayout: o }, children: n });
|
|
233
|
-
}, ye = () => Le(bn),
|
|
233
|
+
}, ye = () => Le(bn), B = (n) => typeof n == "string", Ae = () => {
|
|
234
234
|
let n, e;
|
|
235
235
|
const t = new Promise((o, s) => {
|
|
236
236
|
n = o, e = s;
|
|
@@ -240,8 +240,8 @@ const Me = (n = () => {
|
|
|
240
240
|
n.forEach((o) => {
|
|
241
241
|
e[o] && (t[o] = e[o]);
|
|
242
242
|
});
|
|
243
|
-
}, po = /###/g, Lt = (n) => n && n.indexOf("###") > -1 ? n.replace(po, ".") : n, Tt = (n) => !n ||
|
|
244
|
-
const o =
|
|
243
|
+
}, po = /###/g, Lt = (n) => n && n.indexOf("###") > -1 ? n.replace(po, ".") : n, Tt = (n) => !n || B(n), ze = (n, e, t) => {
|
|
244
|
+
const o = B(e) ? e.split(".") : e;
|
|
245
245
|
let s = 0;
|
|
246
246
|
for (; s < o.length - 1; ) {
|
|
247
247
|
if (Tt(n)) return {};
|
|
@@ -283,7 +283,7 @@ const Me = (n = () => {
|
|
|
283
283
|
return o !== void 0 ? o : Be(e, t);
|
|
284
284
|
}, xn = (n, e, t) => {
|
|
285
285
|
for (const o in e)
|
|
286
|
-
o !== "__proto__" && o !== "constructor" && (o in n ?
|
|
286
|
+
o !== "__proto__" && o !== "constructor" && (o in n ? B(n[o]) || n[o] instanceof String || B(e[o]) || e[o] instanceof String ? t && (n[o] = e[o]) : xn(n[o], e[o], t) : n[o] = e[o]);
|
|
287
287
|
return n;
|
|
288
288
|
}, Se = (n) => n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
289
289
|
var go = {
|
|
@@ -294,7 +294,7 @@ var go = {
|
|
|
294
294
|
"'": "'",
|
|
295
295
|
"/": "/"
|
|
296
296
|
};
|
|
297
|
-
const vo = (n) =>
|
|
297
|
+
const vo = (n) => B(n) ? n.replace(/[&<>"'\/]/g, (e) => go[e]) : n;
|
|
298
298
|
class $o {
|
|
299
299
|
constructor(e) {
|
|
300
300
|
this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
@@ -385,7 +385,7 @@ class Ye {
|
|
|
385
385
|
return this.forward(t, "warn", "WARNING DEPRECATED: ", !0);
|
|
386
386
|
}
|
|
387
387
|
forward(e, t, o, s) {
|
|
388
|
-
return s && !this.debug ? null : (
|
|
388
|
+
return s && !this.debug ? null : (B(e[0]) && (e[0] = `${o}${this.prefix} ${e[0]}`), this.logger[t](e));
|
|
389
389
|
}
|
|
390
390
|
create(e) {
|
|
391
391
|
return new Ye(this.logger, {
|
|
@@ -452,9 +452,9 @@ class zt extends Je {
|
|
|
452
452
|
let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
453
453
|
const i = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, r = s.ignoreJSONStructure !== void 0 ? s.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
|
454
454
|
let l;
|
|
455
|
-
e.indexOf(".") > -1 ? l = e.split(".") : (l = [e, t], o && (Array.isArray(o) ? l.push(...o) :
|
|
455
|
+
e.indexOf(".") > -1 ? l = e.split(".") : (l = [e, t], o && (Array.isArray(o) ? l.push(...o) : B(o) && i ? l.push(...o.split(i)) : l.push(o)));
|
|
456
456
|
const a = Be(this.data, l);
|
|
457
|
-
return !a && !t && !o && e.indexOf(".") > -1 && (e = l[0], t = l[1], o = l.slice(2).join(".")), a || !r || !
|
|
457
|
+
return !a && !t && !o && e.indexOf(".") > -1 && (e = l[0], t = l[1], o = l.slice(2).join(".")), a || !r || !B(o) ? a : ft((u = (d = this.data) == null ? void 0 : d[e]) == null ? void 0 : u[t], o, i);
|
|
458
458
|
}
|
|
459
459
|
addResource(e, t, o, s) {
|
|
460
460
|
let i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
|
|
@@ -469,7 +469,7 @@ class zt extends Je {
|
|
|
469
469
|
silent: !1
|
|
470
470
|
};
|
|
471
471
|
for (const i in o)
|
|
472
|
-
(
|
|
472
|
+
(B(o[i]) || Array.isArray(o[i])) && this.addResource(e, t, i, o[i], {
|
|
473
473
|
silent: !0
|
|
474
474
|
});
|
|
475
475
|
s.silent || this.emit("added", e, t, o);
|
|
@@ -518,7 +518,7 @@ var Cn = {
|
|
|
518
518
|
}), e;
|
|
519
519
|
}
|
|
520
520
|
};
|
|
521
|
-
const Rt = {}, Ot = (n) => !
|
|
521
|
+
const Rt = {}, Ot = (n) => !B(n) && typeof n != "boolean" && typeof n != "number";
|
|
522
522
|
class Ke extends Je {
|
|
523
523
|
constructor(e) {
|
|
524
524
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
@@ -547,14 +547,14 @@ class Ke extends Je {
|
|
|
547
547
|
if (a && a.length > 0)
|
|
548
548
|
return {
|
|
549
549
|
key: e,
|
|
550
|
-
namespaces:
|
|
550
|
+
namespaces: B(i) ? [i] : i
|
|
551
551
|
};
|
|
552
552
|
const d = e.split(o);
|
|
553
553
|
(o !== s || o === s && this.options.ns.indexOf(d[0]) > -1) && (i = d.shift()), e = d.join(s);
|
|
554
554
|
}
|
|
555
555
|
return {
|
|
556
556
|
key: e,
|
|
557
|
-
namespaces:
|
|
557
|
+
namespaces: B(i) ? [i] : i
|
|
558
558
|
};
|
|
559
559
|
}
|
|
560
560
|
translate(e, t, o) {
|
|
@@ -589,13 +589,13 @@ class Ke extends Je {
|
|
|
589
589
|
}
|
|
590
590
|
const f = this.resolve(e, t);
|
|
591
591
|
let p = f == null ? void 0 : f.res;
|
|
592
|
-
const h = (f == null ? void 0 : f.usedKey) || r, m = (f == null ? void 0 : f.exactUsedKey) || r, v = ["[object Number]", "[object Function]", "[object RegExp]"], S = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, N = !this.i18nFormat || this.i18nFormat.handleAsObject, O = t.count !== void 0 && !
|
|
592
|
+
const h = (f == null ? void 0 : f.usedKey) || r, m = (f == null ? void 0 : f.exactUsedKey) || r, v = ["[object Number]", "[object Function]", "[object RegExp]"], S = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, N = !this.i18nFormat || this.i18nFormat.handleAsObject, O = t.count !== void 0 && !B(t.count), F = Ke.hasDefaultValue(t), L = O ? this.pluralResolver.getSuffix(d, t.count, t) : "", g = t.ordinal && O ? this.pluralResolver.getSuffix(d, t.count, {
|
|
593
593
|
ordinal: !1
|
|
594
594
|
}) : "", T = O && !t.ordinal && t.count === 0, x = T && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${L}`] || t[`defaultValue${g}`] || t.defaultValue;
|
|
595
595
|
let w = p;
|
|
596
596
|
N && !p && F && (w = x);
|
|
597
597
|
const $ = Ot(w), b = Object.prototype.toString.apply(w);
|
|
598
|
-
if (N && w && $ && v.indexOf(b) < 0 && !(
|
|
598
|
+
if (N && w && $ && v.indexOf(b) < 0 && !(B(S) && Array.isArray(w))) {
|
|
599
599
|
if (!t.returnObjects && !this.options.returnObjects) {
|
|
600
600
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
601
601
|
const C = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h, w, {
|
|
@@ -622,7 +622,7 @@ class Ke extends Je {
|
|
|
622
622
|
}
|
|
623
623
|
p = E;
|
|
624
624
|
}
|
|
625
|
-
} else if (N &&
|
|
625
|
+
} else if (N && B(S) && Array.isArray(p))
|
|
626
626
|
p = p.join(S), p && (p = this.extendTranslation(p, e, t, o));
|
|
627
627
|
else {
|
|
628
628
|
let C = !1, E = !1;
|
|
@@ -630,29 +630,29 @@ class Ke extends Je {
|
|
|
630
630
|
const k = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && E ? void 0 : p, _ = F && x !== p && this.options.updateMissing;
|
|
631
631
|
if (E || C || _) {
|
|
632
632
|
if (this.logger.log(_ ? "updateKey" : "missingKey", d, a, r, _ ? x : p), i) {
|
|
633
|
-
const
|
|
633
|
+
const q = this.resolve(r, {
|
|
634
634
|
...t,
|
|
635
635
|
keySeparator: !1
|
|
636
636
|
});
|
|
637
|
-
|
|
637
|
+
q && q.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
|
|
638
638
|
}
|
|
639
639
|
let J = [];
|
|
640
|
-
const
|
|
641
|
-
if (this.options.saveMissingTo === "fallback" &&
|
|
642
|
-
for (let
|
|
643
|
-
J.push(
|
|
640
|
+
const ne = this.languageUtils.getFallbackCodes(this.options.fallbackLng, t.lng || this.language);
|
|
641
|
+
if (this.options.saveMissingTo === "fallback" && ne && ne[0])
|
|
642
|
+
for (let q = 0; q < ne.length; q++)
|
|
643
|
+
J.push(ne[q]);
|
|
644
644
|
else this.options.saveMissingTo === "all" ? J = this.languageUtils.toResolveHierarchy(t.lng || this.language) : J.push(t.lng || this.language);
|
|
645
|
-
const
|
|
646
|
-
var
|
|
647
|
-
const
|
|
648
|
-
this.options.missingKeyHandler ? this.options.missingKeyHandler(
|
|
645
|
+
const se = (q, y, P) => {
|
|
646
|
+
var V;
|
|
647
|
+
const j = F && P !== p ? P : k;
|
|
648
|
+
this.options.missingKeyHandler ? this.options.missingKeyHandler(q, a, y, j, _, t) : (V = this.backendConnector) != null && V.saveMissing && this.backendConnector.saveMissing(q, a, y, j, _, t), this.emit("missingKey", q, a, y, p);
|
|
649
649
|
};
|
|
650
|
-
this.options.saveMissing && (this.options.saveMissingPlurals && O ? J.forEach((
|
|
651
|
-
const y = this.pluralResolver.getSuffixes(
|
|
650
|
+
this.options.saveMissing && (this.options.saveMissingPlurals && O ? J.forEach((q) => {
|
|
651
|
+
const y = this.pluralResolver.getSuffixes(q, t);
|
|
652
652
|
T && t[`defaultValue${this.options.pluralSeparator}zero`] && y.indexOf(`${this.options.pluralSeparator}zero`) < 0 && y.push(`${this.options.pluralSeparator}zero`), y.forEach((P) => {
|
|
653
|
-
|
|
653
|
+
se([q], r + P, t[`defaultValue${P}`] || x);
|
|
654
654
|
});
|
|
655
|
-
}) :
|
|
655
|
+
}) : se(J, r, x));
|
|
656
656
|
}
|
|
657
657
|
p = this.extendTranslation(p, e, t, f, o), E && p === r && this.options.appendNamespaceToMissingKey && (p = `${a}:${r}`), (E || C) && this.options.parseMissingKeyHandler && (p = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${a}:${r}` : r, C ? p : void 0));
|
|
658
658
|
}
|
|
@@ -676,13 +676,13 @@ class Ke extends Je {
|
|
|
676
676
|
...o.interpolation
|
|
677
677
|
}
|
|
678
678
|
});
|
|
679
|
-
const f =
|
|
679
|
+
const f = B(e) && (((u = o == null ? void 0 : o.interpolation) == null ? void 0 : u.skipOnVariables) !== void 0 ? o.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
|
|
680
680
|
let p;
|
|
681
681
|
if (f) {
|
|
682
682
|
const m = e.match(this.interpolator.nestingRegexp);
|
|
683
683
|
p = m && m.length;
|
|
684
684
|
}
|
|
685
|
-
let h = o.replace && !
|
|
685
|
+
let h = o.replace && !B(o.replace) ? o.replace : o;
|
|
686
686
|
if (this.options.interpolation.defaultVariables && (h = {
|
|
687
687
|
...this.options.interpolation.defaultVariables,
|
|
688
688
|
...h
|
|
@@ -696,7 +696,7 @@ class Ke extends Je {
|
|
|
696
696
|
return (i == null ? void 0 : i[0]) === v[0] && !o.context ? (r.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${t[0]}`), null) : r.translate(...v, t);
|
|
697
697
|
}, o)), o.interpolation && this.interpolator.reset();
|
|
698
698
|
}
|
|
699
|
-
const l = o.postProcess || this.options.postProcess, a =
|
|
699
|
+
const l = o.postProcess || this.options.postProcess, a = B(l) ? [l] : l;
|
|
700
700
|
return e != null && (a != null && a.length) && o.applyPostProcessor !== !1 && (e = Cn.handle(a, e, t, this.options && this.options.postProcessPassResolved ? {
|
|
701
701
|
i18nResolved: {
|
|
702
702
|
...s,
|
|
@@ -707,13 +707,13 @@ class Ke extends Je {
|
|
|
707
707
|
}
|
|
708
708
|
resolve(e) {
|
|
709
709
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o, s, i, r, l;
|
|
710
|
-
return
|
|
710
|
+
return B(e) && (e = [e]), e.forEach((a) => {
|
|
711
711
|
if (this.isValidLookup(o)) return;
|
|
712
712
|
const d = this.extractFromKey(a, t), u = d.key;
|
|
713
713
|
s = u;
|
|
714
714
|
let f = d.namespaces;
|
|
715
715
|
this.options.fallbackNS && (f = f.concat(this.options.fallbackNS));
|
|
716
|
-
const p = t.count !== void 0 && !
|
|
716
|
+
const p = t.count !== void 0 && !B(t.count), h = p && !t.ordinal && t.count === 0, m = t.context !== void 0 && (B(t.context) || typeof t.context == "number") && t.context !== "", v = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
|
|
717
717
|
f.forEach((S) => {
|
|
718
718
|
var N, O;
|
|
719
719
|
this.isValidLookup(o) || (l = S, !Rt[`${v[0]}-${S}`] && ((N = this.utils) != null && N.hasLoadedNamespace) && !((O = this.utils) != null && O.hasLoadedNamespace(l)) && (Rt[`${v[0]}-${S}`] = !0, this.logger.warn(`key "${s}" for languages "${v.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), v.forEach((F) => {
|
|
@@ -755,7 +755,7 @@ class Ke extends Je {
|
|
|
755
755
|
}
|
|
756
756
|
getUsedParamsDetails() {
|
|
757
757
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
758
|
-
const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], o = e.replace && !
|
|
758
|
+
const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], o = e.replace && !B(e.replace);
|
|
759
759
|
let s = o ? e.replace : e;
|
|
760
760
|
if (o && typeof e.count < "u" && (s.count = e.count), this.options.interpolation.defaultVariables && (s = {
|
|
761
761
|
...this.options.interpolation.defaultVariables,
|
|
@@ -792,7 +792,7 @@ class Mt {
|
|
|
792
792
|
return this.formatLanguageCode(t[0]);
|
|
793
793
|
}
|
|
794
794
|
formatLanguageCode(e) {
|
|
795
|
-
if (
|
|
795
|
+
if (B(e) && e.indexOf("-") > -1) {
|
|
796
796
|
let t;
|
|
797
797
|
try {
|
|
798
798
|
t = Intl.getCanonicalLocales(e)[0];
|
|
@@ -827,7 +827,7 @@ class Mt {
|
|
|
827
827
|
}
|
|
828
828
|
getFallbackCodes(e, t) {
|
|
829
829
|
if (!e) return [];
|
|
830
|
-
if (typeof e == "function" && (e = e(t)),
|
|
830
|
+
if (typeof e == "function" && (e = e(t)), B(e) && (e = [e]), Array.isArray(e)) return e;
|
|
831
831
|
if (!t) return e.default || [];
|
|
832
832
|
let o = e[t];
|
|
833
833
|
return o || (o = e[this.getScriptPartFromCode(t)]), o || (o = e[this.formatLanguageCode(t)]), o || (o = e[this.getLanguagePartFromCode(t)]), o || (o = e.default), o || [];
|
|
@@ -836,7 +836,7 @@ class Mt {
|
|
|
836
836
|
const o = this.getFallbackCodes(t || this.options.fallbackLng || [], e), s = [], i = (r) => {
|
|
837
837
|
r && (this.isSupportedCode(r) ? s.push(r) : this.logger.warn(`rejecting language code not found in supportedLngs: ${r}`));
|
|
838
838
|
};
|
|
839
|
-
return
|
|
839
|
+
return B(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && i(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && i(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && i(this.getLanguagePartFromCode(e))) : B(e) && i(this.formatLanguageCode(e)), o.forEach((r) => {
|
|
840
840
|
s.indexOf(r) < 0 && i(this.formatLanguageCode(r));
|
|
841
841
|
}), s;
|
|
842
842
|
}
|
|
@@ -907,7 +907,7 @@ class Co {
|
|
|
907
907
|
}
|
|
908
908
|
const Dt = function(n, e, t) {
|
|
909
909
|
let o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, i = mo(n, e, t);
|
|
910
|
-
return !i && s &&
|
|
910
|
+
return !i && s && B(t) && (i = ft(n, t, o), i === void 0 && (i = ft(e, t, o))), i;
|
|
911
911
|
}, tt = (n) => n.replace(/\$/g, "$$$$");
|
|
912
912
|
class So {
|
|
913
913
|
constructor() {
|
|
@@ -981,7 +981,7 @@ class So {
|
|
|
981
981
|
if (r = d(v), r === void 0)
|
|
982
982
|
if (typeof u == "function") {
|
|
983
983
|
const N = u(e, i, s);
|
|
984
|
-
r =
|
|
984
|
+
r = B(N) ? N : "";
|
|
985
985
|
} else if (s && Object.prototype.hasOwnProperty.call(s, v))
|
|
986
986
|
r = "";
|
|
987
987
|
else if (f) {
|
|
@@ -989,7 +989,7 @@ class So {
|
|
|
989
989
|
continue;
|
|
990
990
|
} else
|
|
991
991
|
this.logger.warn(`missed to pass in variable ${v} for interpolating ${e}`), r = "";
|
|
992
|
-
else !
|
|
992
|
+
else !B(r) && !this.useRawValueToEscape && (r = Pt(r));
|
|
993
993
|
const S = m.safeValue(r);
|
|
994
994
|
if (e = e.replace(i[0], S), f ? (m.regex.lastIndex += r.length, m.regex.lastIndex -= i[0].length) : m.regex.lastIndex = 0, l++, l >= this.maxReplaces)
|
|
995
995
|
break;
|
|
@@ -1020,14 +1020,14 @@ class So {
|
|
|
1020
1020
|
let a = [];
|
|
1021
1021
|
r = {
|
|
1022
1022
|
...o
|
|
1023
|
-
}, r = r.replace && !
|
|
1023
|
+
}, r = r.replace && !B(r.replace) ? r.replace : r, r.applyPostProcessor = !1, delete r.defaultValue;
|
|
1024
1024
|
let d = !1;
|
|
1025
1025
|
if (s[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(s[1])) {
|
|
1026
1026
|
const u = s[1].split(this.formatSeparator).map((f) => f.trim());
|
|
1027
1027
|
s[1] = u.shift(), a = u, d = !0;
|
|
1028
1028
|
}
|
|
1029
|
-
if (i = t(l.call(this, s[1].trim(), r), r), i && s[0] === e && !
|
|
1030
|
-
|
|
1029
|
+
if (i = t(l.call(this, s[1].trim(), r), r), i && s[0] === e && !B(i)) return i;
|
|
1030
|
+
B(i) || (i = Pt(i)), i || (this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`), i = ""), d && (i = a.reduce((u, f) => this.format(u, f, o.lng, {
|
|
1031
1031
|
...o,
|
|
1032
1032
|
interpolationkey: s[1].trim()
|
|
1033
1033
|
}), i.trim())), e = e.replace(s[0], i), this.regexp.lastIndex = 0;
|
|
@@ -1236,7 +1236,7 @@ class Po extends Je {
|
|
|
1236
1236
|
let o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, s = arguments.length > 3 ? arguments[3] : void 0;
|
|
1237
1237
|
if (!this.backend)
|
|
1238
1238
|
return this.logger.warn("No backend was added via i18next.use. Will not load resources."), s && s();
|
|
1239
|
-
|
|
1239
|
+
B(e) && (e = this.languageUtils.toResolveHierarchy(e)), B(t) && (t = [t]);
|
|
1240
1240
|
const i = this.queueLoad(e, t, o, s);
|
|
1241
1241
|
if (!i.toLoad.length)
|
|
1242
1242
|
return i.pending.length || s(), null;
|
|
@@ -1322,7 +1322,7 @@ const Ut = () => ({
|
|
|
1322
1322
|
appendNamespaceToCIMode: !1,
|
|
1323
1323
|
overloadTranslationOptionHandler: (n) => {
|
|
1324
1324
|
let e = {};
|
|
1325
|
-
if (typeof n[1] == "object" && (e = n[1]),
|
|
1325
|
+
if (typeof n[1] == "object" && (e = n[1]), B(n[1]) && (e.defaultValue = n[1]), B(n[2]) && (e.tDescription = n[2]), typeof n[2] == "object" || typeof n[3] == "object") {
|
|
1326
1326
|
const t = n[3] || n[2];
|
|
1327
1327
|
Object.keys(t).forEach((o) => {
|
|
1328
1328
|
e[o] = t[o];
|
|
@@ -1345,7 +1345,7 @@ const Ut = () => ({
|
|
|
1345
1345
|
}
|
|
1346
1346
|
}), Ht = (n) => {
|
|
1347
1347
|
var e, t;
|
|
1348
|
-
return
|
|
1348
|
+
return B(n.ns) && (n.ns = [n.ns]), B(n.fallbackLng) && (n.fallbackLng = [n.fallbackLng]), B(n.fallbackNS) && (n.fallbackNS = [n.fallbackNS]), ((t = (e = n.supportedLngs) == null ? void 0 : e.indexOf) == null ? void 0 : t.call(e, "cimode")) < 0 && (n.supportedLngs = n.supportedLngs.concat(["cimode"])), typeof n.initImmediate == "boolean" && (n.initAsync = n.initImmediate), n;
|
|
1349
1349
|
}, ke = () => {
|
|
1350
1350
|
}, Lo = (n) => {
|
|
1351
1351
|
Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((t) => {
|
|
@@ -1368,7 +1368,7 @@ class Oe extends Je {
|
|
|
1368
1368
|
init() {
|
|
1369
1369
|
var e = this;
|
|
1370
1370
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, o = arguments.length > 1 ? arguments[1] : void 0;
|
|
1371
|
-
this.isInitializing = !0, typeof t == "function" && (o = t, t = {}), t.defaultNS == null && t.ns && (
|
|
1371
|
+
this.isInitializing = !0, typeof t == "function" && (o = t, t = {}), t.defaultNS == null && t.ns && (B(t.ns) ? t.defaultNS = t.ns : t.ns.indexOf("translation") < 0 && (t.defaultNS = t.ns[0]));
|
|
1372
1372
|
const s = Ut();
|
|
1373
1373
|
this.options = {
|
|
1374
1374
|
...s,
|
|
@@ -1428,7 +1428,7 @@ class Oe extends Je {
|
|
|
1428
1428
|
loadResources(e) {
|
|
1429
1429
|
var i, r;
|
|
1430
1430
|
let o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ke;
|
|
1431
|
-
const s =
|
|
1431
|
+
const s = B(e) ? e : this.language;
|
|
1432
1432
|
if (typeof e == "function" && (o = e), !this.options.resources || this.options.partialBundledLanguages) {
|
|
1433
1433
|
if ((s == null ? void 0 : s.toLowerCase()) === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return o();
|
|
1434
1434
|
const l = [], a = (d) => {
|
|
@@ -1480,7 +1480,7 @@ class Oe extends Je {
|
|
|
1480
1480
|
}, l = (a) => {
|
|
1481
1481
|
var u, f;
|
|
1482
1482
|
!e && !a && this.services.languageDetector && (a = []);
|
|
1483
|
-
const d = this.services.languageUtils.getBestMatchFromCodes(
|
|
1483
|
+
const d = this.services.languageUtils.getBestMatchFromCodes(B(a) ? [a] : a);
|
|
1484
1484
|
d && (this.language || i(d), this.translator.language || this.translator.changeLanguage(d), (f = (u = this.services.languageDetector) == null ? void 0 : u.cacheUserLanguage) == null || f.call(u, d)), this.loadResources(d, (p) => {
|
|
1485
1485
|
r(p, d);
|
|
1486
1486
|
});
|
|
@@ -1504,7 +1504,7 @@ class Oe extends Je {
|
|
|
1504
1504
|
let h;
|
|
1505
1505
|
return a.keyPrefix && Array.isArray(r) ? h = r.map((m) => `${a.keyPrefix}${p}${m}`) : h = a.keyPrefix ? `${a.keyPrefix}${p}${r}` : r, s.t(h, a);
|
|
1506
1506
|
};
|
|
1507
|
-
return
|
|
1507
|
+
return B(e) ? i.lng = e : i.lngs = e, i.ns = t, i.keyPrefix = o, i;
|
|
1508
1508
|
}
|
|
1509
1509
|
t() {
|
|
1510
1510
|
var s;
|
|
@@ -1541,7 +1541,7 @@ class Oe extends Je {
|
|
|
1541
1541
|
}
|
|
1542
1542
|
loadNamespaces(e, t) {
|
|
1543
1543
|
const o = Ae();
|
|
1544
|
-
return this.options.ns ? (
|
|
1544
|
+
return this.options.ns ? (B(e) && (e = [e]), e.forEach((s) => {
|
|
1545
1545
|
this.options.ns.indexOf(s) < 0 && this.options.ns.push(s);
|
|
1546
1546
|
}), this.loadResources((s) => {
|
|
1547
1547
|
o.resolve(), t && t(s);
|
|
@@ -1549,7 +1549,7 @@ class Oe extends Je {
|
|
|
1549
1549
|
}
|
|
1550
1550
|
loadLanguages(e, t) {
|
|
1551
1551
|
const o = Ae();
|
|
1552
|
-
|
|
1552
|
+
B(e) && (e = [e]);
|
|
1553
1553
|
const s = this.options.preload || [], i = e.filter((r) => s.indexOf(r) < 0 && this.services.languageUtils.isSupportedCode(r));
|
|
1554
1554
|
return i.length ? (this.options.preload = s.concat(i), this.loadResources((r) => {
|
|
1555
1555
|
o.resolve(), t && t(r);
|
|
@@ -2616,12 +2616,12 @@ const To = "مجلد جديد", Ao = "رفع", zo = "لصق", Ro = "تغيير
|
|
|
2616
2616
|
}, r = [...o].sort(i), l = [...s].sort(i);
|
|
2617
2617
|
return [...r, ...l];
|
|
2618
2618
|
}, Nn = Pe(), sv = ({ children: n, initialPath: e, onFolderChange: t }) => {
|
|
2619
|
-
const { files: o } = Xe(), s =
|
|
2619
|
+
const { files: o } = Xe(), s = re(!1), [i, r] = R(""), [l, a] = R(null), [d, u] = R([]), [f, p] = R({ key: "name", direction: "asc" });
|
|
2620
2620
|
return Q(() => {
|
|
2621
|
-
Array.isArray(o) && o.length > 0
|
|
2621
|
+
Array.isArray(o) && o.length > 0 ? (u(() => {
|
|
2622
2622
|
const h = o.filter((m) => m.path === `${i}/${m.name}`);
|
|
2623
2623
|
return ov(h, f.key, f.direction);
|
|
2624
|
-
}), a(() => o.find((h) => h.path === i) ?? null));
|
|
2624
|
+
}), a(() => o.find((h) => h.path === i) ?? null)) : (u([]), a(null));
|
|
2625
2625
|
}, [o, i, f]), Q(() => {
|
|
2626
2626
|
if (!s.current && Array.isArray(o) && o.length > 0) {
|
|
2627
2627
|
const h = o.some((m) => m.isDirectory && m.path === e) ? e : "";
|
|
@@ -2655,15 +2655,15 @@ const To = "مجلد جديد", Ao = "رفع", zo = "لصق", Ro = "تغيير
|
|
|
2655
2655
|
} catch (o) {
|
|
2656
2656
|
console.error(o.message);
|
|
2657
2657
|
}
|
|
2658
|
-
}, En = Pe(), iv = ({ children: n, onDownload: e, onSelect: t }) => {
|
|
2659
|
-
const [
|
|
2658
|
+
}, En = Pe(), iv = ({ children: n, onDownload: e, onSelect: t, onSelectionChange: o }) => {
|
|
2659
|
+
const [s, i] = R([]);
|
|
2660
2660
|
Q(() => {
|
|
2661
|
-
|
|
2662
|
-
}, [
|
|
2663
|
-
const
|
|
2664
|
-
xe(e, "onDownload",
|
|
2661
|
+
t == null || t(s), o == null || o(s);
|
|
2662
|
+
}, [s]);
|
|
2663
|
+
const r = () => {
|
|
2664
|
+
xe(e, "onDownload", s);
|
|
2665
2665
|
};
|
|
2666
|
-
return /* @__PURE__ */ c(En.Provider, { value: { selectedFiles:
|
|
2666
|
+
return /* @__PURE__ */ c(En.Provider, { value: { selectedFiles: s, setSelectedFiles: i, handleDownload: r }, children: n });
|
|
2667
2667
|
}, ve = () => Le(En), Pn = Pe(), rv = ({ children: n, onPaste: e, onCut: t, onCopy: o }) => {
|
|
2668
2668
|
const [s, i] = R(null), { selectedFiles: r, setSelectedFiles: l } = ve(), a = (u) => {
|
|
2669
2669
|
i({
|
|
@@ -2831,7 +2831,7 @@ var cv = class extends Error {
|
|
|
2831
2831
|
}
|
|
2832
2832
|
}, qe = (...n) => lv(n[0], `[react-collapsed] -- ${n[1]}`);
|
|
2833
2833
|
function Tn(n) {
|
|
2834
|
-
const e =
|
|
2834
|
+
const e = re(n);
|
|
2835
2835
|
return Q(() => {
|
|
2836
2836
|
e.current = n;
|
|
2837
2837
|
}), cn((...t) => {
|
|
@@ -2840,7 +2840,7 @@ function Tn(n) {
|
|
|
2840
2840
|
}, []);
|
|
2841
2841
|
}
|
|
2842
2842
|
function dv(n, e, t) {
|
|
2843
|
-
const [o, s] = R(e), i =
|
|
2843
|
+
const [o, s] = R(e), i = re(typeof n < "u"), r = i.current ? n : o, l = Tn(t), a = cn(
|
|
2844
2844
|
(d) => {
|
|
2845
2845
|
const f = typeof d == "function" ? d(r) : d;
|
|
2846
2846
|
i.current || s(f), l == null || l(f);
|
|
@@ -2976,7 +2976,7 @@ function Sv({
|
|
|
2976
2976
|
const a = Tn(t), d = $v(r ? `${r}` : void 0), [u, f] = dv(
|
|
2977
2977
|
o,
|
|
2978
2978
|
s
|
|
2979
|
-
), p =
|
|
2979
|
+
), p = re(u), [h, m] = R(!1), v = fv(), S = i ?? v, N = re(), O = re(), F = re(null), [L, g] = R(null);
|
|
2980
2980
|
xv(F);
|
|
2981
2981
|
const T = `${l.collapsedHeight || 0}px`;
|
|
2982
2982
|
function x(w) {
|
|
@@ -3052,22 +3052,22 @@ function Sv({
|
|
|
3052
3052
|
id: `react-collapsed-toggle-${d}`,
|
|
3053
3053
|
"aria-controls": `react-collapsed-panel-${d}`,
|
|
3054
3054
|
"aria-expanded": u,
|
|
3055
|
-
onClick(
|
|
3056
|
-
$ || (b == null || b(
|
|
3055
|
+
onClick(se) {
|
|
3056
|
+
$ || (b == null || b(se), f((q) => !q));
|
|
3057
3057
|
},
|
|
3058
3058
|
[C || "ref"]: Wt(k, g)
|
|
3059
3059
|
}, J = {
|
|
3060
3060
|
type: "button",
|
|
3061
3061
|
disabled: $ ? !0 : void 0
|
|
3062
|
-
},
|
|
3062
|
+
}, ne = {
|
|
3063
3063
|
"aria-disabled": $ ? !0 : void 0,
|
|
3064
3064
|
role: "button",
|
|
3065
3065
|
tabIndex: $ ? -1 : 0
|
|
3066
3066
|
};
|
|
3067
|
-
return M === !1 ? { ..._, ...
|
|
3067
|
+
return M === !1 ? { ..._, ...ne, ...E } : M === !0 ? { ..._, ...J, ...E } : {
|
|
3068
3068
|
..._,
|
|
3069
3069
|
...J,
|
|
3070
|
-
...
|
|
3070
|
+
...ne,
|
|
3071
3071
|
...E
|
|
3072
3072
|
};
|
|
3073
3073
|
},
|
|
@@ -3181,7 +3181,7 @@ zn.displayName = "NavigationPane";
|
|
|
3181
3181
|
function Lv(n) {
|
|
3182
3182
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
3183
3183
|
}
|
|
3184
|
-
var Ie = { exports: {} }, De = { exports: {} },
|
|
3184
|
+
var Ie = { exports: {} }, De = { exports: {} }, ee = {};
|
|
3185
3185
|
/** @license React v16.13.1
|
|
3186
3186
|
* react-is.production.min.js
|
|
3187
3187
|
*
|
|
@@ -3192,7 +3192,7 @@ var Ie = { exports: {} }, De = { exports: {} }, te = {};
|
|
|
3192
3192
|
*/
|
|
3193
3193
|
var qt;
|
|
3194
3194
|
function Tv() {
|
|
3195
|
-
if (qt) return
|
|
3195
|
+
if (qt) return ee;
|
|
3196
3196
|
qt = 1;
|
|
3197
3197
|
var n = typeof Symbol == "function" && Symbol.for, e = n ? Symbol.for("react.element") : 60103, t = n ? Symbol.for("react.portal") : 60106, o = n ? Symbol.for("react.fragment") : 60107, s = n ? Symbol.for("react.strict_mode") : 60108, i = n ? Symbol.for("react.profiler") : 60114, r = n ? Symbol.for("react.provider") : 60109, l = n ? Symbol.for("react.context") : 60110, a = n ? Symbol.for("react.async_mode") : 60111, d = n ? Symbol.for("react.concurrent_mode") : 60111, u = n ? Symbol.for("react.forward_ref") : 60112, f = n ? Symbol.for("react.suspense") : 60113, p = n ? Symbol.for("react.suspense_list") : 60120, h = n ? Symbol.for("react.memo") : 60115, m = n ? Symbol.for("react.lazy") : 60116, v = n ? Symbol.for("react.block") : 60121, S = n ? Symbol.for("react.fundamental") : 60117, N = n ? Symbol.for("react.responder") : 60118, O = n ? Symbol.for("react.scope") : 60119;
|
|
3198
3198
|
function F(g) {
|
|
@@ -3228,35 +3228,35 @@ function Tv() {
|
|
|
3228
3228
|
function L(g) {
|
|
3229
3229
|
return F(g) === d;
|
|
3230
3230
|
}
|
|
3231
|
-
return
|
|
3231
|
+
return ee.AsyncMode = a, ee.ConcurrentMode = d, ee.ContextConsumer = l, ee.ContextProvider = r, ee.Element = e, ee.ForwardRef = u, ee.Fragment = o, ee.Lazy = m, ee.Memo = h, ee.Portal = t, ee.Profiler = i, ee.StrictMode = s, ee.Suspense = f, ee.isAsyncMode = function(g) {
|
|
3232
3232
|
return L(g) || F(g) === a;
|
|
3233
|
-
},
|
|
3233
|
+
}, ee.isConcurrentMode = L, ee.isContextConsumer = function(g) {
|
|
3234
3234
|
return F(g) === l;
|
|
3235
|
-
},
|
|
3235
|
+
}, ee.isContextProvider = function(g) {
|
|
3236
3236
|
return F(g) === r;
|
|
3237
|
-
},
|
|
3237
|
+
}, ee.isElement = function(g) {
|
|
3238
3238
|
return typeof g == "object" && g !== null && g.$$typeof === e;
|
|
3239
|
-
},
|
|
3239
|
+
}, ee.isForwardRef = function(g) {
|
|
3240
3240
|
return F(g) === u;
|
|
3241
|
-
},
|
|
3241
|
+
}, ee.isFragment = function(g) {
|
|
3242
3242
|
return F(g) === o;
|
|
3243
|
-
},
|
|
3243
|
+
}, ee.isLazy = function(g) {
|
|
3244
3244
|
return F(g) === m;
|
|
3245
|
-
},
|
|
3245
|
+
}, ee.isMemo = function(g) {
|
|
3246
3246
|
return F(g) === h;
|
|
3247
|
-
},
|
|
3247
|
+
}, ee.isPortal = function(g) {
|
|
3248
3248
|
return F(g) === t;
|
|
3249
|
-
},
|
|
3249
|
+
}, ee.isProfiler = function(g) {
|
|
3250
3250
|
return F(g) === i;
|
|
3251
|
-
},
|
|
3251
|
+
}, ee.isStrictMode = function(g) {
|
|
3252
3252
|
return F(g) === s;
|
|
3253
|
-
},
|
|
3253
|
+
}, ee.isSuspense = function(g) {
|
|
3254
3254
|
return F(g) === f;
|
|
3255
|
-
},
|
|
3255
|
+
}, ee.isValidElementType = function(g) {
|
|
3256
3256
|
return typeof g == "string" || typeof g == "function" || g === o || g === d || g === i || g === s || g === f || g === p || typeof g == "object" && g !== null && (g.$$typeof === m || g.$$typeof === h || g.$$typeof === r || g.$$typeof === l || g.$$typeof === u || g.$$typeof === S || g.$$typeof === N || g.$$typeof === O || g.$$typeof === v);
|
|
3257
|
-
},
|
|
3257
|
+
}, ee.typeOf = F, ee;
|
|
3258
3258
|
}
|
|
3259
|
-
var
|
|
3259
|
+
var te = {};
|
|
3260
3260
|
/** @license React v16.13.1
|
|
3261
3261
|
* react-is.development.js
|
|
3262
3262
|
*
|
|
@@ -3305,9 +3305,9 @@ function Av() {
|
|
|
3305
3305
|
}
|
|
3306
3306
|
}
|
|
3307
3307
|
}
|
|
3308
|
-
var g = a, T = d, x = l, w = r, $ = e, b = u, C = o, E = m, M = h, k = t, _ = i, J = s,
|
|
3309
|
-
function
|
|
3310
|
-
return
|
|
3308
|
+
var g = a, T = d, x = l, w = r, $ = e, b = u, C = o, E = m, M = h, k = t, _ = i, J = s, ne = f, se = !1;
|
|
3309
|
+
function q(A) {
|
|
3310
|
+
return se || (se = !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.")), y(A) || L(A) === a;
|
|
3311
3311
|
}
|
|
3312
3312
|
function y(A) {
|
|
3313
3313
|
return L(A) === d;
|
|
@@ -3315,10 +3315,10 @@ function Av() {
|
|
|
3315
3315
|
function P(A) {
|
|
3316
3316
|
return L(A) === l;
|
|
3317
3317
|
}
|
|
3318
|
-
function
|
|
3318
|
+
function j(A) {
|
|
3319
3319
|
return L(A) === r;
|
|
3320
3320
|
}
|
|
3321
|
-
function
|
|
3321
|
+
function V(A) {
|
|
3322
3322
|
return typeof A == "object" && A !== null && A.$$typeof === e;
|
|
3323
3323
|
}
|
|
3324
3324
|
function U(A) {
|
|
@@ -3327,26 +3327,26 @@ function Av() {
|
|
|
3327
3327
|
function G(A) {
|
|
3328
3328
|
return L(A) === o;
|
|
3329
3329
|
}
|
|
3330
|
-
function
|
|
3330
|
+
function W(A) {
|
|
3331
3331
|
return L(A) === m;
|
|
3332
3332
|
}
|
|
3333
|
-
function
|
|
3333
|
+
function Y(A) {
|
|
3334
3334
|
return L(A) === h;
|
|
3335
3335
|
}
|
|
3336
|
-
function
|
|
3336
|
+
function K(A) {
|
|
3337
3337
|
return L(A) === t;
|
|
3338
3338
|
}
|
|
3339
|
-
function
|
|
3339
|
+
function X(A) {
|
|
3340
3340
|
return L(A) === i;
|
|
3341
3341
|
}
|
|
3342
|
-
function
|
|
3342
|
+
function D(A) {
|
|
3343
3343
|
return L(A) === s;
|
|
3344
3344
|
}
|
|
3345
|
-
function
|
|
3345
|
+
function ie(A) {
|
|
3346
3346
|
return L(A) === f;
|
|
3347
3347
|
}
|
|
3348
|
-
|
|
3349
|
-
}()),
|
|
3348
|
+
te.AsyncMode = g, te.ConcurrentMode = T, te.ContextConsumer = x, te.ContextProvider = w, te.Element = $, te.ForwardRef = b, te.Fragment = C, te.Lazy = E, te.Memo = M, te.Portal = k, te.Profiler = _, te.StrictMode = J, te.Suspense = ne, te.isAsyncMode = q, te.isConcurrentMode = y, te.isContextConsumer = P, te.isContextProvider = j, te.isElement = V, te.isForwardRef = U, te.isFragment = G, te.isLazy = W, te.isMemo = Y, te.isPortal = K, te.isProfiler = X, te.isStrictMode = D, te.isSuspense = ie, te.isValidElementType = F, te.typeOf = L;
|
|
3349
|
+
}()), te;
|
|
3350
3350
|
}
|
|
3351
3351
|
var Gt;
|
|
3352
3352
|
function Rn() {
|
|
@@ -3517,34 +3517,34 @@ function Ov() {
|
|
|
3517
3517
|
v.prototype = Error.prototype;
|
|
3518
3518
|
function S(y) {
|
|
3519
3519
|
if (process.env.NODE_ENV !== "production")
|
|
3520
|
-
var P = {},
|
|
3521
|
-
function
|
|
3522
|
-
if (
|
|
3520
|
+
var P = {}, j = 0;
|
|
3521
|
+
function V(G, W, Y, K, X, D, ie) {
|
|
3522
|
+
if (K = K || p, D = D || Y, ie !== t) {
|
|
3523
3523
|
if (a) {
|
|
3524
3524
|
var A = new Error(
|
|
3525
3525
|
"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"
|
|
3526
3526
|
);
|
|
3527
3527
|
throw A.name = "Invariant Violation", A;
|
|
3528
3528
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
3529
|
-
var pe =
|
|
3529
|
+
var pe = K + ":" + Y;
|
|
3530
3530
|
!P[pe] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
3531
|
-
|
|
3532
|
-
"You are manually calling a React.PropTypes validation function for the `" +
|
|
3533
|
-
), P[pe] = !0,
|
|
3531
|
+
j < 3 && (i(
|
|
3532
|
+
"You are manually calling a React.PropTypes validation function for the `" + D + "` prop on `" + K + "`. 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."
|
|
3533
|
+
), P[pe] = !0, j++);
|
|
3534
3534
|
}
|
|
3535
3535
|
}
|
|
3536
|
-
return Y
|
|
3536
|
+
return W[Y] == null ? G ? W[Y] === null ? new v("The " + X + " `" + D + "` is marked as required " + ("in `" + K + "`, but its value is `null`.")) : new v("The " + X + " `" + D + "` is marked as required in " + ("`" + K + "`, but its value is `undefined`.")) : null : y(W, Y, K, X, D);
|
|
3537
3537
|
}
|
|
3538
|
-
var U =
|
|
3539
|
-
return U.isRequired =
|
|
3538
|
+
var U = V.bind(null, !1);
|
|
3539
|
+
return U.isRequired = V.bind(null, !0), U;
|
|
3540
3540
|
}
|
|
3541
3541
|
function N(y) {
|
|
3542
|
-
function P(
|
|
3543
|
-
var
|
|
3544
|
-
if (
|
|
3545
|
-
var
|
|
3542
|
+
function P(j, V, U, G, W, Y) {
|
|
3543
|
+
var K = j[V], X = J(K);
|
|
3544
|
+
if (X !== y) {
|
|
3545
|
+
var D = ne(K);
|
|
3546
3546
|
return new v(
|
|
3547
|
-
"Invalid " + G + " `" +
|
|
3547
|
+
"Invalid " + G + " `" + W + "` of type " + ("`" + D + "` supplied to `" + U + "`, expected ") + ("`" + y + "`."),
|
|
3548
3548
|
{ expectedType: y }
|
|
3549
3549
|
);
|
|
3550
3550
|
}
|
|
@@ -3556,50 +3556,50 @@ function Ov() {
|
|
|
3556
3556
|
return S(r);
|
|
3557
3557
|
}
|
|
3558
3558
|
function F(y) {
|
|
3559
|
-
function P(
|
|
3559
|
+
function P(j, V, U, G, W) {
|
|
3560
3560
|
if (typeof y != "function")
|
|
3561
|
-
return new v("Property `" +
|
|
3562
|
-
var
|
|
3563
|
-
if (!Array.isArray(
|
|
3564
|
-
var
|
|
3565
|
-
return new v("Invalid " + G + " `" +
|
|
3561
|
+
return new v("Property `" + W + "` of component `" + U + "` has invalid PropType notation inside arrayOf.");
|
|
3562
|
+
var Y = j[V];
|
|
3563
|
+
if (!Array.isArray(Y)) {
|
|
3564
|
+
var K = J(Y);
|
|
3565
|
+
return new v("Invalid " + G + " `" + W + "` of type " + ("`" + K + "` supplied to `" + U + "`, expected an array."));
|
|
3566
3566
|
}
|
|
3567
|
-
for (var
|
|
3568
|
-
var
|
|
3569
|
-
if (
|
|
3570
|
-
return
|
|
3567
|
+
for (var X = 0; X < Y.length; X++) {
|
|
3568
|
+
var D = y(Y, X, U, G, W + "[" + X + "]", t);
|
|
3569
|
+
if (D instanceof Error)
|
|
3570
|
+
return D;
|
|
3571
3571
|
}
|
|
3572
3572
|
return null;
|
|
3573
3573
|
}
|
|
3574
3574
|
return S(P);
|
|
3575
3575
|
}
|
|
3576
3576
|
function L() {
|
|
3577
|
-
function y(P,
|
|
3578
|
-
var
|
|
3579
|
-
if (!l(
|
|
3580
|
-
var
|
|
3581
|
-
return new v("Invalid " + U + " `" + G + "` of type " + ("`" +
|
|
3577
|
+
function y(P, j, V, U, G) {
|
|
3578
|
+
var W = P[j];
|
|
3579
|
+
if (!l(W)) {
|
|
3580
|
+
var Y = J(W);
|
|
3581
|
+
return new v("Invalid " + U + " `" + G + "` of type " + ("`" + Y + "` supplied to `" + V + "`, expected a single ReactElement."));
|
|
3582
3582
|
}
|
|
3583
3583
|
return null;
|
|
3584
3584
|
}
|
|
3585
3585
|
return S(y);
|
|
3586
3586
|
}
|
|
3587
3587
|
function g() {
|
|
3588
|
-
function y(P,
|
|
3589
|
-
var
|
|
3590
|
-
if (!n.isValidElementType(
|
|
3591
|
-
var
|
|
3592
|
-
return new v("Invalid " + U + " `" + G + "` of type " + ("`" +
|
|
3588
|
+
function y(P, j, V, U, G) {
|
|
3589
|
+
var W = P[j];
|
|
3590
|
+
if (!n.isValidElementType(W)) {
|
|
3591
|
+
var Y = J(W);
|
|
3592
|
+
return new v("Invalid " + U + " `" + G + "` of type " + ("`" + Y + "` supplied to `" + V + "`, expected a single ReactElement type."));
|
|
3593
3593
|
}
|
|
3594
3594
|
return null;
|
|
3595
3595
|
}
|
|
3596
3596
|
return S(y);
|
|
3597
3597
|
}
|
|
3598
3598
|
function T(y) {
|
|
3599
|
-
function P(
|
|
3600
|
-
if (!(
|
|
3601
|
-
var
|
|
3602
|
-
return new v("Invalid " + G + " `" +
|
|
3599
|
+
function P(j, V, U, G, W) {
|
|
3600
|
+
if (!(j[V] instanceof y)) {
|
|
3601
|
+
var Y = y.name || p, K = q(j[V]);
|
|
3602
|
+
return new v("Invalid " + G + " `" + W + "` of type " + ("`" + K + "` supplied to `" + U + "`, expected ") + ("instance of `" + Y + "`."));
|
|
3603
3603
|
}
|
|
3604
3604
|
return null;
|
|
3605
3605
|
}
|
|
@@ -3610,30 +3610,30 @@ function Ov() {
|
|
|
3610
3610
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? i(
|
|
3611
3611
|
"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])."
|
|
3612
3612
|
) : i("Invalid argument supplied to oneOf, expected an array.")), r;
|
|
3613
|
-
function P(
|
|
3614
|
-
for (var
|
|
3615
|
-
if (m(
|
|
3613
|
+
function P(j, V, U, G, W) {
|
|
3614
|
+
for (var Y = j[V], K = 0; K < y.length; K++)
|
|
3615
|
+
if (m(Y, y[K]))
|
|
3616
3616
|
return null;
|
|
3617
|
-
var
|
|
3618
|
-
var pe =
|
|
3617
|
+
var X = JSON.stringify(y, function(ie, A) {
|
|
3618
|
+
var pe = ne(A);
|
|
3619
3619
|
return pe === "symbol" ? String(A) : A;
|
|
3620
3620
|
});
|
|
3621
|
-
return new v("Invalid " + G + " `" +
|
|
3621
|
+
return new v("Invalid " + G + " `" + W + "` of value `" + String(Y) + "` " + ("supplied to `" + U + "`, expected one of " + X + "."));
|
|
3622
3622
|
}
|
|
3623
3623
|
return S(P);
|
|
3624
3624
|
}
|
|
3625
3625
|
function w(y) {
|
|
3626
|
-
function P(
|
|
3626
|
+
function P(j, V, U, G, W) {
|
|
3627
3627
|
if (typeof y != "function")
|
|
3628
|
-
return new v("Property `" +
|
|
3629
|
-
var
|
|
3630
|
-
if (
|
|
3631
|
-
return new v("Invalid " + G + " `" +
|
|
3632
|
-
for (var
|
|
3633
|
-
if (o(
|
|
3634
|
-
var
|
|
3635
|
-
if (
|
|
3636
|
-
return
|
|
3628
|
+
return new v("Property `" + W + "` of component `" + U + "` has invalid PropType notation inside objectOf.");
|
|
3629
|
+
var Y = j[V], K = J(Y);
|
|
3630
|
+
if (K !== "object")
|
|
3631
|
+
return new v("Invalid " + G + " `" + W + "` of type " + ("`" + K + "` supplied to `" + U + "`, expected an object."));
|
|
3632
|
+
for (var X in Y)
|
|
3633
|
+
if (o(Y, X)) {
|
|
3634
|
+
var D = y(Y, X, U, G, W + "." + X, t);
|
|
3635
|
+
if (D instanceof Error)
|
|
3636
|
+
return D;
|
|
3637
3637
|
}
|
|
3638
3638
|
return null;
|
|
3639
3639
|
}
|
|
@@ -3643,68 +3643,68 @@ function Ov() {
|
|
|
3643
3643
|
if (!Array.isArray(y))
|
|
3644
3644
|
return process.env.NODE_ENV !== "production" && i("Invalid argument supplied to oneOfType, expected an instance of array."), r;
|
|
3645
3645
|
for (var P = 0; P < y.length; P++) {
|
|
3646
|
-
var
|
|
3647
|
-
if (typeof
|
|
3646
|
+
var j = y[P];
|
|
3647
|
+
if (typeof j != "function")
|
|
3648
3648
|
return i(
|
|
3649
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " +
|
|
3649
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + se(j) + " at index " + P + "."
|
|
3650
3650
|
), r;
|
|
3651
3651
|
}
|
|
3652
|
-
function
|
|
3653
|
-
for (var
|
|
3654
|
-
var
|
|
3652
|
+
function V(U, G, W, Y, K) {
|
|
3653
|
+
for (var X = [], D = 0; D < y.length; D++) {
|
|
3654
|
+
var ie = y[D], A = ie(U, G, W, Y, K, t);
|
|
3655
3655
|
if (A == null)
|
|
3656
3656
|
return null;
|
|
3657
|
-
A.data && o(A.data, "expectedType") &&
|
|
3657
|
+
A.data && o(A.data, "expectedType") && X.push(A.data.expectedType);
|
|
3658
3658
|
}
|
|
3659
|
-
var pe =
|
|
3660
|
-
return new v("Invalid " +
|
|
3659
|
+
var pe = X.length > 0 ? ", expected one of type [" + X.join(", ") + "]" : "";
|
|
3660
|
+
return new v("Invalid " + Y + " `" + K + "` supplied to " + ("`" + W + "`" + pe + "."));
|
|
3661
3661
|
}
|
|
3662
|
-
return S(
|
|
3662
|
+
return S(V);
|
|
3663
3663
|
}
|
|
3664
3664
|
function b() {
|
|
3665
|
-
function y(P,
|
|
3666
|
-
return k(P[
|
|
3665
|
+
function y(P, j, V, U, G) {
|
|
3666
|
+
return k(P[j]) ? null : new v("Invalid " + U + " `" + G + "` supplied to " + ("`" + V + "`, expected a ReactNode."));
|
|
3667
3667
|
}
|
|
3668
3668
|
return S(y);
|
|
3669
3669
|
}
|
|
3670
|
-
function C(y, P,
|
|
3670
|
+
function C(y, P, j, V, U) {
|
|
3671
3671
|
return new v(
|
|
3672
|
-
(y || "React class") + ": " + P + " type `" +
|
|
3672
|
+
(y || "React class") + ": " + P + " type `" + j + "." + V + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + U + "`."
|
|
3673
3673
|
);
|
|
3674
3674
|
}
|
|
3675
3675
|
function E(y) {
|
|
3676
|
-
function P(
|
|
3677
|
-
var
|
|
3678
|
-
if (
|
|
3679
|
-
return new v("Invalid " + G + " `" +
|
|
3680
|
-
for (var
|
|
3681
|
-
var
|
|
3682
|
-
if (typeof
|
|
3683
|
-
return C(U, G,
|
|
3684
|
-
var
|
|
3685
|
-
if (
|
|
3686
|
-
return
|
|
3676
|
+
function P(j, V, U, G, W) {
|
|
3677
|
+
var Y = j[V], K = J(Y);
|
|
3678
|
+
if (K !== "object")
|
|
3679
|
+
return new v("Invalid " + G + " `" + W + "` of type `" + K + "` " + ("supplied to `" + U + "`, expected `object`."));
|
|
3680
|
+
for (var X in y) {
|
|
3681
|
+
var D = y[X];
|
|
3682
|
+
if (typeof D != "function")
|
|
3683
|
+
return C(U, G, W, X, ne(D));
|
|
3684
|
+
var ie = D(Y, X, U, G, W + "." + X, t);
|
|
3685
|
+
if (ie)
|
|
3686
|
+
return ie;
|
|
3687
3687
|
}
|
|
3688
3688
|
return null;
|
|
3689
3689
|
}
|
|
3690
3690
|
return S(P);
|
|
3691
3691
|
}
|
|
3692
3692
|
function M(y) {
|
|
3693
|
-
function P(
|
|
3694
|
-
var
|
|
3695
|
-
if (
|
|
3696
|
-
return new v("Invalid " + G + " `" +
|
|
3697
|
-
var
|
|
3698
|
-
for (var
|
|
3699
|
-
var
|
|
3700
|
-
if (o(y,
|
|
3701
|
-
return C(U, G,
|
|
3702
|
-
if (!
|
|
3693
|
+
function P(j, V, U, G, W) {
|
|
3694
|
+
var Y = j[V], K = J(Y);
|
|
3695
|
+
if (K !== "object")
|
|
3696
|
+
return new v("Invalid " + G + " `" + W + "` of type `" + K + "` " + ("supplied to `" + U + "`, expected `object`."));
|
|
3697
|
+
var X = e({}, j[V], y);
|
|
3698
|
+
for (var D in X) {
|
|
3699
|
+
var ie = y[D];
|
|
3700
|
+
if (o(y, D) && typeof ie != "function")
|
|
3701
|
+
return C(U, G, W, D, ne(ie));
|
|
3702
|
+
if (!ie)
|
|
3703
3703
|
return new v(
|
|
3704
|
-
"Invalid " + G + " `" +
|
|
3704
|
+
"Invalid " + G + " `" + W + "` key `" + D + "` supplied to `" + U + "`.\nBad object: " + JSON.stringify(j[V], null, " ") + `
|
|
3705
3705
|
Valid keys: ` + JSON.stringify(Object.keys(y), null, " ")
|
|
3706
3706
|
);
|
|
3707
|
-
var A =
|
|
3707
|
+
var A = ie(Y, D, U, G, W + "." + D, t);
|
|
3708
3708
|
if (A)
|
|
3709
3709
|
return A;
|
|
3710
3710
|
}
|
|
@@ -3727,14 +3727,14 @@ Valid keys: ` + JSON.stringify(Object.keys(y), null, " ")
|
|
|
3727
3727
|
return !0;
|
|
3728
3728
|
var P = f(y);
|
|
3729
3729
|
if (P) {
|
|
3730
|
-
var
|
|
3730
|
+
var j = P.call(y), V;
|
|
3731
3731
|
if (P !== y.entries) {
|
|
3732
|
-
for (; !(
|
|
3733
|
-
if (!k(
|
|
3732
|
+
for (; !(V = j.next()).done; )
|
|
3733
|
+
if (!k(V.value))
|
|
3734
3734
|
return !1;
|
|
3735
3735
|
} else
|
|
3736
|
-
for (; !(
|
|
3737
|
-
var U =
|
|
3736
|
+
for (; !(V = j.next()).done; ) {
|
|
3737
|
+
var U = V.value;
|
|
3738
3738
|
if (U && !k(U[1]))
|
|
3739
3739
|
return !1;
|
|
3740
3740
|
}
|
|
@@ -3752,7 +3752,7 @@ Valid keys: ` + JSON.stringify(Object.keys(y), null, " ")
|
|
|
3752
3752
|
var P = typeof y;
|
|
3753
3753
|
return Array.isArray(y) ? "array" : y instanceof RegExp ? "object" : _(P, y) ? "symbol" : P;
|
|
3754
3754
|
}
|
|
3755
|
-
function
|
|
3755
|
+
function ne(y) {
|
|
3756
3756
|
if (typeof y > "u" || y === null)
|
|
3757
3757
|
return "" + y;
|
|
3758
3758
|
var P = J(y);
|
|
@@ -3764,8 +3764,8 @@ Valid keys: ` + JSON.stringify(Object.keys(y), null, " ")
|
|
|
3764
3764
|
}
|
|
3765
3765
|
return P;
|
|
3766
3766
|
}
|
|
3767
|
-
function
|
|
3768
|
-
var P =
|
|
3767
|
+
function se(y) {
|
|
3768
|
+
var P = ne(y);
|
|
3769
3769
|
switch (P) {
|
|
3770
3770
|
case "array":
|
|
3771
3771
|
case "object":
|
|
@@ -3778,7 +3778,7 @@ Valid keys: ` + JSON.stringify(Object.keys(y), null, " ")
|
|
|
3778
3778
|
return P;
|
|
3779
3779
|
}
|
|
3780
3780
|
}
|
|
3781
|
-
function
|
|
3781
|
+
function q(y) {
|
|
3782
3782
|
return !y.constructor || !y.constructor.name ? p : y.constructor.name;
|
|
3783
3783
|
}
|
|
3784
3784
|
return h.checkPropTypes = s, h.resetWarningCache = s.resetWarningCache, h.PropTypes = h, h;
|
|
@@ -3843,7 +3843,7 @@ function kv() {
|
|
|
3843
3843
|
return Ie.exports;
|
|
3844
3844
|
}
|
|
3845
3845
|
var Iv = /* @__PURE__ */ kv();
|
|
3846
|
-
const
|
|
3846
|
+
const I = /* @__PURE__ */ Lv(Iv);
|
|
3847
3847
|
function Dv(n) {
|
|
3848
3848
|
return H({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M18 3a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h12zm0 2h-9v14h9a1 1 0 0 0 .993 -.883l.007 -.117v-12a1 1 0 0 0 -.883 -.993l-.117 -.007zm-2.293 4.293a1 1 0 0 1 .083 1.32l-.083 .094l-1.292 1.293l1.292 1.293a1 1 0 0 1 .083 1.32l-.083 .094a1 1 0 0 1 -1.32 .083l-.094 -.083l-2 -2a1 1 0 0 1 -.083 -1.32l.083 -.094l2 -2a1 1 0 0 1 1.414 0z" }, child: [] }] })(n);
|
|
3849
3849
|
}
|
|
@@ -3851,9 +3851,9 @@ function Uv(n) {
|
|
|
3851
3851
|
return H({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z" }, child: [] }, { tag: "path", attr: { d: "M9 4v16" }, child: [] }, { tag: "path", attr: { d: "M14 10l2 2l-2 2" }, child: [] }] })(n);
|
|
3852
3852
|
}
|
|
3853
3853
|
const gt = ({ collapsibleNav: n, isNavigationPaneOpen: e, setNavigationPaneOpen: t }) => {
|
|
3854
|
-
const [o, s] = R([]), [i, r] = R([]), [l, a] = R([]), [d, u] = R(!1), { currentPath: f, setCurrentPath: p, onFolderChange: h } = he(), m =
|
|
3854
|
+
const [o, s] = R([]), [i, r] = R([]), [l, a] = R([]), [d, u] = R(!1), { currentPath: f, setCurrentPath: p, onFolderChange: h } = he(), m = re(null), v = re([]), S = re(null), N = Me(() => {
|
|
3855
3855
|
u(!1);
|
|
3856
|
-
}), O = de(), F =
|
|
3856
|
+
}), O = de(), F = re(null);
|
|
3857
3857
|
Q(() => {
|
|
3858
3858
|
s(() => {
|
|
3859
3859
|
let w = "";
|
|
@@ -3943,8 +3943,8 @@ const gt = ({ collapsibleNav: n, isNavigationPaneOpen: e, setNavigationPaneOpen:
|
|
|
3943
3943
|
};
|
|
3944
3944
|
gt.displayName = "BreadCrumb";
|
|
3945
3945
|
gt.propTypes = {
|
|
3946
|
-
isNavigationPaneOpen:
|
|
3947
|
-
setNavigationPaneOpen:
|
|
3946
|
+
isNavigationPaneOpen: I.bool.isRequired,
|
|
3947
|
+
setNavigationPaneOpen: I.func.isRequired
|
|
3948
3948
|
};
|
|
3949
3949
|
const _e = (n) => ({
|
|
3950
3950
|
pdf: /* @__PURE__ */ c(lo, { size: n }),
|
|
@@ -4097,7 +4097,7 @@ const Dn = ({
|
|
|
4097
4097
|
contentClassName: i = "",
|
|
4098
4098
|
closeButton: r = !0
|
|
4099
4099
|
}) => {
|
|
4100
|
-
const l =
|
|
4100
|
+
const l = re(null), a = de(), d = (u) => {
|
|
4101
4101
|
u.key === "Escape" && t(!1);
|
|
4102
4102
|
};
|
|
4103
4103
|
return Q(() => {
|
|
@@ -4127,7 +4127,7 @@ const Dn = ({
|
|
|
4127
4127
|
}
|
|
4128
4128
|
);
|
|
4129
4129
|
}, Ne = (n) => n.split(".").pop(), Bv = 220, Wv = ({ filesViewRef: n, file: e, onRename: t, triggerAction: o }) => {
|
|
4130
|
-
const [s, i] = R(e == null ? void 0 : e.name), [r, l] = R(!1), [a, d] = R(!1), [u, f] = R(""), [p, h] = R("right"), [m, v] = R("bottom"), { currentPathFiles: S, setCurrentPathFiles: N } = he(), { activeLayout: O } = ye(), F = de(), L =
|
|
4130
|
+
const [s, i] = R(e == null ? void 0 : e.name), [r, l] = R(!1), [a, d] = R(!1), [u, f] = R(""), [p, h] = R("right"), [m, v] = R("bottom"), { currentPathFiles: S, setCurrentPathFiles: N } = he(), { activeLayout: O } = ye(), F = de(), L = re(null), g = Me(($) => {
|
|
4131
4131
|
var b;
|
|
4132
4132
|
(b = L.current) != null && b.contains($.target) || ($.preventDefault(), $.stopPropagation());
|
|
4133
4133
|
}), T = ($) => {
|
|
@@ -4296,10 +4296,10 @@ const Dn = ({
|
|
|
4296
4296
|
draggable: f
|
|
4297
4297
|
}) => {
|
|
4298
4298
|
var pe, we, Te, vt;
|
|
4299
|
-
const [p, h] = R(!1), [m, v] = R(0), [S, N] = R("hidden"), [O, F] = R(""), [L, g] = R(null), { activeLayout: T } = ye(), x = T === "grid" ? 48 : 20, w = _e(x), { setCurrentPath: $, currentPathFiles: b, onFolderChange: C } = he(), { setSelectedFiles: E } = ve(), { clipBoard: M, handleCutCopy: k, setClipBoard: _, handlePasting: J } = Ze(),
|
|
4299
|
+
const [p, h] = R(!1), [m, v] = R(0), [S, N] = R("hidden"), [O, F] = R(""), [L, g] = R(null), { activeLayout: T } = ye(), x = T === "grid" ? 48 : 20, w = _e(x), { setCurrentPath: $, currentPathFiles: b, onFolderChange: C } = he(), { setSelectedFiles: E } = ve(), { clipBoard: M, handleCutCopy: k, setClipBoard: _, handlePasting: J } = Ze(), ne = re(null), se = _e(ct), q = (M == null ? void 0 : M.isMoving) && M.files.find((Z) => Z.name === e.name && Z.path === e.path), y = () => {
|
|
4300
4300
|
i(e), e.isDirectory ? ($(e.path), C == null || C(e.path), E([])) : s && a.show("previewFile");
|
|
4301
|
-
}, P = (
|
|
4302
|
-
if (l.length > 0 &&
|
|
4301
|
+
}, P = (Z, ue) => {
|
|
4302
|
+
if (l.length > 0 && Z) {
|
|
4303
4303
|
let ge = !1, be = l[0], Ce = n;
|
|
4304
4304
|
if (be >= Ce) {
|
|
4305
4305
|
const Vn = be;
|
|
@@ -4311,53 +4311,53 @@ const Dn = ({
|
|
|
4311
4311
|
const be = ge.filter((Ce) => Ce.path !== e.path);
|
|
4312
4312
|
return ge.length === be.length ? [...ge, e] : be;
|
|
4313
4313
|
}) : E([e]);
|
|
4314
|
-
},
|
|
4315
|
-
if (
|
|
4316
|
-
P(
|
|
4314
|
+
}, j = (Z) => {
|
|
4315
|
+
if (Z.stopPropagation(), e.isEditing) return;
|
|
4316
|
+
P(Z.shiftKey, Z.ctrlKey);
|
|
4317
4317
|
const ue = (/* @__PURE__ */ new Date()).getTime();
|
|
4318
4318
|
if (ue - m < 300) {
|
|
4319
4319
|
y();
|
|
4320
4320
|
return;
|
|
4321
4321
|
}
|
|
4322
4322
|
v(ue);
|
|
4323
|
-
},
|
|
4324
|
-
|
|
4325
|
-
}, U = (
|
|
4326
|
-
|
|
4323
|
+
}, V = (Z) => {
|
|
4324
|
+
Z.key === "Enter" && (Z.stopPropagation(), E([e]), y());
|
|
4325
|
+
}, U = (Z) => {
|
|
4326
|
+
Z.stopPropagation(), Z.preventDefault(), !e.isEditing && (p || E([e]), u(e), d(Z, !0));
|
|
4327
4327
|
}, G = () => {
|
|
4328
4328
|
N("visible");
|
|
4329
|
-
},
|
|
4329
|
+
}, W = () => {
|
|
4330
4330
|
!p && N("hidden");
|
|
4331
|
-
},
|
|
4332
|
-
|
|
4333
|
-
},
|
|
4334
|
-
|
|
4335
|
-
},
|
|
4336
|
-
|
|
4337
|
-
},
|
|
4338
|
-
|
|
4339
|
-
}, A = (
|
|
4340
|
-
|
|
4331
|
+
}, Y = (Z) => {
|
|
4332
|
+
Z.target.checked ? E((ue) => [...ue, e]) : E((ue) => ue.filter((ge) => ge.name !== e.name && ge.path !== e.path)), h(Z.target.checked);
|
|
4333
|
+
}, K = (Z) => {
|
|
4334
|
+
Z.dataTransfer.setDragImage(ne.current, 30, 50), Z.dataTransfer.effectAllowed = "copy", k(!0);
|
|
4335
|
+
}, X = () => _(null), D = (Z) => {
|
|
4336
|
+
Z.preventDefault(), p || !e.isDirectory ? Z.dataTransfer.dropEffect = "none" : (g({ x: Z.clientX, y: Z.clientY + 12 }), Z.dataTransfer.dropEffect = "copy", F("file-drop-zone"));
|
|
4337
|
+
}, ie = (Z) => {
|
|
4338
|
+
Z.currentTarget.contains(Z.relatedTarget) || (F((ue) => ue && ""), g(null));
|
|
4339
|
+
}, A = (Z) => {
|
|
4340
|
+
Z.preventDefault(), !(p || !e.isDirectory) && (J(e), F((ue) => ue && ""), g(null));
|
|
4341
4341
|
};
|
|
4342
4342
|
return Q(() => {
|
|
4343
4343
|
h(l.includes(n)), N(l.includes(n) ? "visible" : "hidden");
|
|
4344
4344
|
}, [l]), /* @__PURE__ */ z(
|
|
4345
4345
|
"div",
|
|
4346
4346
|
{
|
|
4347
|
-
className: `file-item-container ${O} ${p || e.isEditing ? "file-selected" : ""} ${
|
|
4347
|
+
className: `file-item-container ${O} ${p || e.isEditing ? "file-selected" : ""} ${q ? "file-moving" : ""}`,
|
|
4348
4348
|
tabIndex: 0,
|
|
4349
4349
|
title: e.name,
|
|
4350
|
-
onClick:
|
|
4351
|
-
onKeyDown:
|
|
4350
|
+
onClick: j,
|
|
4351
|
+
onKeyDown: V,
|
|
4352
4352
|
onContextMenu: U,
|
|
4353
4353
|
onMouseOver: G,
|
|
4354
|
-
onMouseLeave:
|
|
4354
|
+
onMouseLeave: W,
|
|
4355
4355
|
draggable: p && f,
|
|
4356
|
-
onDragStart:
|
|
4357
|
-
onDragEnd:
|
|
4358
|
-
onDragEnter:
|
|
4359
|
-
onDragOver:
|
|
4360
|
-
onDragLeave:
|
|
4356
|
+
onDragStart: K,
|
|
4357
|
+
onDragEnd: X,
|
|
4358
|
+
onDragEnter: D,
|
|
4359
|
+
onDragOver: D,
|
|
4360
|
+
onDragLeave: ie,
|
|
4361
4361
|
onDrop: A,
|
|
4362
4362
|
children: [
|
|
4363
4363
|
/* @__PURE__ */ z("div", { className: "file-item", children: [
|
|
@@ -4368,8 +4368,8 @@ const Dn = ({
|
|
|
4368
4368
|
id: e.name,
|
|
4369
4369
|
checked: p,
|
|
4370
4370
|
className: `selection-checkbox ${S}`,
|
|
4371
|
-
onChange:
|
|
4372
|
-
onClick: (
|
|
4371
|
+
onChange: Y,
|
|
4372
|
+
onClick: (Z) => Z.stopPropagation()
|
|
4373
4373
|
}
|
|
4374
4374
|
),
|
|
4375
4375
|
e.isDirectory ? /* @__PURE__ */ c(Et, { size: x }) : /* @__PURE__ */ c(fe, { children: w[(we = (pe = e.name) == null ? void 0 : pe.split(".").pop()) == null ? void 0 : we.toLowerCase()] ?? /* @__PURE__ */ c(Ve, { size: x }) }),
|
|
@@ -4409,7 +4409,7 @@ const Dn = ({
|
|
|
4409
4409
|
]
|
|
4410
4410
|
}
|
|
4411
4411
|
),
|
|
4412
|
-
/* @__PURE__ */ c("div", { ref:
|
|
4412
|
+
/* @__PURE__ */ c("div", { ref: ne, className: "drag-icon", children: e.isDirectory ? /* @__PURE__ */ c(Et, { size: ct }) : /* @__PURE__ */ c(fe, { children: se[(vt = (Te = e.name) == null ? void 0 : Te.split(".").pop()) == null ? void 0 : vt.toLowerCase()] ?? /* @__PURE__ */ c(Ve, { size: ct }) }) })
|
|
4413
4413
|
]
|
|
4414
4414
|
}
|
|
4415
4415
|
);
|
|
@@ -4418,7 +4418,7 @@ const Dn = ({
|
|
|
4418
4418
|
o.icon,
|
|
4419
4419
|
/* @__PURE__ */ c("span", { children: o.title })
|
|
4420
4420
|
] }, o.title)) }), _v = ({ filesViewRef: n, contextMenuRef: e, menuItems: t, visible: o, clickPosition: s }) => {
|
|
4421
|
-
const [i, r] = R(0), [l, a] = R(0), [d, u] = R(null), [f, p] = R("right"), h =
|
|
4421
|
+
const [i, r] = R(0), [l, a] = R(0), [d, u] = R(null), [f, p] = R("right"), h = re(null), m = () => {
|
|
4422
4422
|
const { clickX: N, clickY: O } = s, F = n.current, L = F.getBoundingClientRect(), g = F.offsetWidth - F.clientWidth, T = e.current.getBoundingClientRect(), x = T.width, w = T.height, $ = N - L.left, b = L.width - ($ + g) > x, C = !b, E = O - L.top, M = L.height - E > w, k = !M;
|
|
4423
4423
|
b ? (r(`${$}px`), p("right")) : C && (r(`${$ - x}px`), p("left")), M ? a(`${E + F.scrollTop}px`) : k && a(`${E + F.scrollTop - w}px`);
|
|
4424
4424
|
}, v = (N) => {
|
|
@@ -4478,23 +4478,23 @@ function Gv(n) {
|
|
|
4478
4478
|
const Jv = (n, e, t, o, s) => {
|
|
4479
4479
|
const [i, r] = R([]), [l, a] = R(!1), [d, u] = R(!1), [f, p] = R({ clickX: 0, clickY: 0 }), [h, m] = R(null), { clipBoard: v, setClipBoard: S, handleCutCopy: N, handlePasting: O } = Ze(), { selectedFiles: F, setSelectedFiles: L, handleDownload: g } = ve(), { currentPath: T, setCurrentPath: x, currentPathFiles: w, setCurrentPathFiles: $, onFolderChange: b } = he(), { activeLayout: C, setActiveLayout: E } = ye(), M = de(), k = () => {
|
|
4480
4480
|
s(h), h.isDirectory ? (x(h.path), b == null || b(h.path), r([]), L([])) : e && t.show("previewFile"), a(!1);
|
|
4481
|
-
}, _ = (
|
|
4482
|
-
N(
|
|
4481
|
+
}, _ = (D) => {
|
|
4482
|
+
N(D), a(!1);
|
|
4483
4483
|
}, J = () => {
|
|
4484
4484
|
O(h), a(!1);
|
|
4485
|
-
},
|
|
4485
|
+
}, ne = () => {
|
|
4486
4486
|
a(!1), t.show("rename");
|
|
4487
|
-
},
|
|
4487
|
+
}, se = () => {
|
|
4488
4488
|
g(), a(!1);
|
|
4489
|
-
},
|
|
4489
|
+
}, q = () => {
|
|
4490
4490
|
a(!1), t.show("delete");
|
|
4491
4491
|
}, y = () => {
|
|
4492
4492
|
a(!1), xe(n, "onRefresh"), S(null);
|
|
4493
4493
|
}, P = () => {
|
|
4494
4494
|
t.show("createFolder"), a(!1);
|
|
4495
|
-
}, B = () => {
|
|
4496
|
-
a(!1), t.show("uploadFile");
|
|
4497
4495
|
}, j = () => {
|
|
4496
|
+
a(!1), t.show("uploadFile");
|
|
4497
|
+
}, V = () => {
|
|
4498
4498
|
L(w), a(!1);
|
|
4499
4499
|
}, U = [
|
|
4500
4500
|
{
|
|
@@ -4537,14 +4537,14 @@ const Jv = (n, e, t, o, s) => {
|
|
|
4537
4537
|
{
|
|
4538
4538
|
title: M("upload"),
|
|
4539
4539
|
icon: /* @__PURE__ */ c($n, { size: 18 }),
|
|
4540
|
-
onClick:
|
|
4540
|
+
onClick: j,
|
|
4541
4541
|
divider: !0,
|
|
4542
4542
|
hidden: !o.upload
|
|
4543
4543
|
},
|
|
4544
4544
|
{
|
|
4545
4545
|
title: M("selectAll"),
|
|
4546
4546
|
icon: /* @__PURE__ */ c(so, { size: 18 }),
|
|
4547
|
-
onClick:
|
|
4547
|
+
onClick: V
|
|
4548
4548
|
}
|
|
4549
4549
|
], G = [
|
|
4550
4550
|
{
|
|
@@ -4578,59 +4578,59 @@ const Jv = (n, e, t, o, s) => {
|
|
|
4578
4578
|
{
|
|
4579
4579
|
title: M("rename"),
|
|
4580
4580
|
icon: /* @__PURE__ */ c(yn, { size: 19 }),
|
|
4581
|
-
onClick:
|
|
4581
|
+
onClick: ne,
|
|
4582
4582
|
hidden: F.length > 1,
|
|
4583
4583
|
hidden: !o.rename
|
|
4584
4584
|
},
|
|
4585
4585
|
{
|
|
4586
4586
|
title: M("download"),
|
|
4587
4587
|
icon: /* @__PURE__ */ c(ht, { size: 18 }),
|
|
4588
|
-
onClick:
|
|
4588
|
+
onClick: se,
|
|
4589
4589
|
hidden: !o.download
|
|
4590
4590
|
},
|
|
4591
4591
|
{
|
|
4592
4592
|
title: M("delete"),
|
|
4593
4593
|
icon: /* @__PURE__ */ c(vn, { size: 19 }),
|
|
4594
|
-
onClick:
|
|
4594
|
+
onClick: q,
|
|
4595
4595
|
hidden: !o.delete
|
|
4596
4596
|
}
|
|
4597
|
-
],
|
|
4598
|
-
$((
|
|
4599
|
-
...
|
|
4597
|
+
], W = () => {
|
|
4598
|
+
$((D) => [
|
|
4599
|
+
...D,
|
|
4600
4600
|
{
|
|
4601
|
-
name: Mn("New Folder", !0,
|
|
4601
|
+
name: Mn("New Folder", !0, D),
|
|
4602
4602
|
isDirectory: !0,
|
|
4603
4603
|
path: T,
|
|
4604
4604
|
isEditing: !0,
|
|
4605
4605
|
key: (/* @__PURE__ */ new Date()).valueOf()
|
|
4606
4606
|
}
|
|
4607
4607
|
]);
|
|
4608
|
-
},
|
|
4609
|
-
$((
|
|
4610
|
-
},
|
|
4611
|
-
r([]), L((
|
|
4612
|
-
},
|
|
4613
|
-
|
|
4608
|
+
}, Y = () => {
|
|
4609
|
+
$((D) => (D[i.at(-1)] ? D[i.at(-1)].isEditing = !0 : t.close(), D)), r([]), L([]);
|
|
4610
|
+
}, K = () => {
|
|
4611
|
+
r([]), L((D) => D.length > 0 ? [] : D);
|
|
4612
|
+
}, X = (D, ie = !1) => {
|
|
4613
|
+
D.preventDefault(), p({ clickX: D.clientX, clickY: D.clientY }), u(ie), !ie && K(), a(!0);
|
|
4614
4614
|
};
|
|
4615
4615
|
return Q(() => {
|
|
4616
4616
|
if (t.isActive)
|
|
4617
4617
|
switch (t.actionType) {
|
|
4618
4618
|
case "createFolder":
|
|
4619
|
-
|
|
4619
|
+
W();
|
|
4620
4620
|
break;
|
|
4621
4621
|
case "rename":
|
|
4622
|
-
|
|
4622
|
+
Y();
|
|
4623
4623
|
break;
|
|
4624
4624
|
}
|
|
4625
4625
|
}, [t.isActive]), Q(() => {
|
|
4626
4626
|
r([]), L([]);
|
|
4627
4627
|
}, [T]), Q(() => {
|
|
4628
|
-
F.length > 0 ? r(() => F.map((
|
|
4628
|
+
F.length > 0 ? r(() => F.map((D) => w.findIndex((ie) => ie.path === D.path))) : r([]);
|
|
4629
4629
|
}, [F, w]), {
|
|
4630
4630
|
emptySelecCtxItems: U,
|
|
4631
4631
|
selecCtxItems: G,
|
|
4632
|
-
handleContextMenu:
|
|
4633
|
-
unselectFiles:
|
|
4632
|
+
handleContextMenu: X,
|
|
4633
|
+
unselectFiles: K,
|
|
4634
4634
|
visible: l,
|
|
4635
4635
|
setVisible: a,
|
|
4636
4636
|
setLastSelectedFile: m,
|
|
@@ -4706,7 +4706,7 @@ const Jv = (n, e, t, o, s) => {
|
|
|
4706
4706
|
triggerAction: i,
|
|
4707
4707
|
permissions: r
|
|
4708
4708
|
}) => {
|
|
4709
|
-
const { currentPathFiles: l, sortConfig: a, setSortConfig: d } = he(), u =
|
|
4709
|
+
const { currentPathFiles: l, sortConfig: a, setSortConfig: d } = he(), u = re(null), { activeLayout: f } = ye(), p = de(), {
|
|
4710
4710
|
emptySelecCtxItems: h,
|
|
4711
4711
|
selecCtxItems: m,
|
|
4712
4712
|
handleContextMenu: v,
|
|
@@ -4812,7 +4812,7 @@ const o4 = ({
|
|
|
4812
4812
|
handleFileRemove: r
|
|
4813
4813
|
}) => {
|
|
4814
4814
|
var x, w, $, b;
|
|
4815
|
-
const [l, a] = R(0), [d, u] = R(!1), [f, p] = R(!1), [h, m] = R(!1), v = _e(33), S =
|
|
4815
|
+
const [l, a] = R(0), [d, u] = R(!1), [f, p] = R(!1), [h, m] = R(!1), v = _e(33), S = re(), { onError: N } = Xe(), O = de(), F = (C) => {
|
|
4816
4816
|
a(0), o((M) => ({
|
|
4817
4817
|
...M,
|
|
4818
4818
|
[n]: !1
|
|
@@ -4836,17 +4836,17 @@ const o4 = ({
|
|
|
4836
4836
|
if (!C.error)
|
|
4837
4837
|
return new Promise((E, M) => {
|
|
4838
4838
|
const k = new XMLHttpRequest();
|
|
4839
|
-
S.current = k, o((
|
|
4840
|
-
...
|
|
4839
|
+
S.current = k, o((q) => ({
|
|
4840
|
+
...q,
|
|
4841
4841
|
[n]: !0
|
|
4842
|
-
})), k.upload.onprogress = (
|
|
4843
|
-
if (
|
|
4844
|
-
const y = Math.round(
|
|
4842
|
+
})), k.upload.onprogress = (q) => {
|
|
4843
|
+
if (q.lengthComputable) {
|
|
4844
|
+
const y = Math.round(q.loaded / q.total * 100);
|
|
4845
4845
|
a(y);
|
|
4846
4846
|
}
|
|
4847
4847
|
}, k.onload = () => {
|
|
4848
|
-
o((
|
|
4849
|
-
...
|
|
4848
|
+
o((q) => ({
|
|
4849
|
+
...q,
|
|
4850
4850
|
[n]: !1
|
|
4851
4851
|
})), k.status === 200 || k.status === 201 ? (u(!0), i(k.response), E(k.response)) : (M(k.statusText), F(k));
|
|
4852
4852
|
}, k.onerror = () => {
|
|
@@ -4855,12 +4855,12 @@ const o4 = ({
|
|
|
4855
4855
|
const _ = (s == null ? void 0 : s.method) || "POST";
|
|
4856
4856
|
k.open(_, s == null ? void 0 : s.url, !0);
|
|
4857
4857
|
const J = s == null ? void 0 : s.headers;
|
|
4858
|
-
for (let
|
|
4859
|
-
k.setRequestHeader(
|
|
4860
|
-
const
|
|
4861
|
-
for (let
|
|
4862
|
-
|
|
4863
|
-
|
|
4858
|
+
for (let q in J)
|
|
4859
|
+
k.setRequestHeader(q, J[q]);
|
|
4860
|
+
const ne = new FormData(), se = C == null ? void 0 : C.appendData;
|
|
4861
|
+
for (let q in se)
|
|
4862
|
+
se[q] && ne.append(q, se[q]);
|
|
4863
|
+
ne.append("file", C.file), k.send(ne);
|
|
4864
4864
|
});
|
|
4865
4865
|
};
|
|
4866
4866
|
Q(() => {
|
|
@@ -4915,7 +4915,7 @@ const o4 = ({
|
|
|
4915
4915
|
onFileUploading: o,
|
|
4916
4916
|
onFileUploaded: s
|
|
4917
4917
|
}) => {
|
|
4918
|
-
const [i, r] = R([]), [l, a] = R(!1), [d, u] = R({}), { currentFolder: f, currentPathFiles: p } = he(), { onError: h } = Xe(), m =
|
|
4918
|
+
const [i, r] = R([]), [l, a] = R(!1), [d, u] = R({}), { currentFolder: f, currentPathFiles: p } = he(), { onError: h } = Xe(), m = re(null), v = de(), S = (T) => {
|
|
4919
4919
|
T.key === "Enter" && m.current.click();
|
|
4920
4920
|
}, N = (T) => {
|
|
4921
4921
|
if (t && !t.includes(Ne(T.name)))
|
|
@@ -5065,7 +5065,7 @@ const o4 = ({
|
|
|
5065
5065
|
) })
|
|
5066
5066
|
] });
|
|
5067
5067
|
}, dt = (n) => n.toLowerCase(), le = (n, e, t = !1) => {
|
|
5068
|
-
const o =
|
|
5068
|
+
const o = re(/* @__PURE__ */ new Set([])), s = Ge(() => new Set(n.map((a) => dt(a))), [n]), i = (a) => {
|
|
5069
5069
|
if (!a.repeat && (o.current.add(dt(a.key)), s.isSubsetOf(o.current) && !t)) {
|
|
5070
5070
|
a.preventDefault(), e(a);
|
|
5071
5071
|
return;
|
|
@@ -5206,7 +5206,7 @@ const o4 = ({
|
|
|
5206
5206
|
}
|
|
5207
5207
|
};
|
|
5208
5208
|
}, c4 = (n, e) => {
|
|
5209
|
-
const [t, o] = R({ col1: n, col2: e }), [s, i] = R(!1), r =
|
|
5209
|
+
const [t, o] = R({ col1: n, col2: e }), [s, i] = R(!1), r = re(null);
|
|
5210
5210
|
return {
|
|
5211
5211
|
containerRef: r,
|
|
5212
5212
|
colSizes: t,
|
|
@@ -5272,178 +5272,188 @@ const o4 = ({
|
|
|
5272
5272
|
onFolderChange: v = () => {
|
|
5273
5273
|
},
|
|
5274
5274
|
onSelect: S,
|
|
5275
|
-
|
|
5275
|
+
onSelectionChange: N,
|
|
5276
|
+
onError: O = () => {
|
|
5276
5277
|
},
|
|
5277
|
-
layout:
|
|
5278
|
-
enableFilePreview:
|
|
5279
|
-
maxFileSize:
|
|
5280
|
-
filePreviewPath:
|
|
5281
|
-
acceptedFileTypes:
|
|
5282
|
-
height:
|
|
5283
|
-
width:
|
|
5284
|
-
initialPath:
|
|
5285
|
-
filePreviewComponent:
|
|
5286
|
-
primaryColor:
|
|
5287
|
-
fontFamily:
|
|
5288
|
-
language:
|
|
5289
|
-
permissions:
|
|
5290
|
-
collapsibleNav:
|
|
5291
|
-
defaultNavExpanded:
|
|
5278
|
+
layout: F = "grid",
|
|
5279
|
+
enableFilePreview: L = !0,
|
|
5280
|
+
maxFileSize: g,
|
|
5281
|
+
filePreviewPath: T,
|
|
5282
|
+
acceptedFileTypes: x,
|
|
5283
|
+
height: w = "600px",
|
|
5284
|
+
width: $ = "100%",
|
|
5285
|
+
initialPath: b = "",
|
|
5286
|
+
filePreviewComponent: C,
|
|
5287
|
+
primaryColor: E = "#6155b4",
|
|
5288
|
+
fontFamily: M = "Nunito Sans, sans-serif",
|
|
5289
|
+
language: k = "en",
|
|
5290
|
+
permissions: _ = {},
|
|
5291
|
+
collapsibleNav: J = !1,
|
|
5292
|
+
defaultNavExpanded: ne = !0
|
|
5292
5293
|
}) => {
|
|
5293
|
-
const [
|
|
5294
|
-
"--file-manager-font-family":
|
|
5295
|
-
"--file-manager-primary-color":
|
|
5296
|
-
height:
|
|
5297
|
-
width:
|
|
5298
|
-
},
|
|
5299
|
-
() => ({ ...u4, ...
|
|
5300
|
-
[
|
|
5294
|
+
const [se, q] = R(ne), y = l4(), { containerRef: P, colSizes: j, isDragging: V, handleMouseMove: U, handleMouseUp: G, handleMouseDown: W } = c4(20, 80), Y = {
|
|
5295
|
+
"--file-manager-font-family": M,
|
|
5296
|
+
"--file-manager-primary-color": E,
|
|
5297
|
+
height: w,
|
|
5298
|
+
width: $
|
|
5299
|
+
}, K = Ge(
|
|
5300
|
+
() => ({ ...u4, ..._ }),
|
|
5301
|
+
[_]
|
|
5301
5302
|
);
|
|
5302
|
-
return /* @__PURE__ */ z("main", { className: "file-explorer", onContextMenu: (
|
|
5303
|
+
return /* @__PURE__ */ z("main", { className: "file-explorer", onContextMenu: (X) => X.preventDefault(), style: Y, children: [
|
|
5303
5304
|
/* @__PURE__ */ c(pt, { loading: t }),
|
|
5304
|
-
/* @__PURE__ */ c(ev, { language:
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5305
|
+
/* @__PURE__ */ c(ev, { language: k, children: /* @__PURE__ */ c(nv, { filesData: n, onError: O, children: /* @__PURE__ */ c(sv, { initialPath: b, onFolderChange: v, children: /* @__PURE__ */ c(
|
|
5306
|
+
iv,
|
|
5307
|
+
{
|
|
5308
|
+
onDownload: u,
|
|
5309
|
+
onSelect: S,
|
|
5310
|
+
onSelectionChange: N,
|
|
5311
|
+
children: /* @__PURE__ */ c(rv, { onPaste: a, onCut: r, onCopy: l, children: /* @__PURE__ */ z(uo, { layout: F, children: [
|
|
5312
|
+
/* @__PURE__ */ c(
|
|
5313
|
+
Ln,
|
|
5314
|
+
{
|
|
5315
|
+
onLayoutChange: p,
|
|
5316
|
+
onRefresh: h,
|
|
5317
|
+
triggerAction: y,
|
|
5318
|
+
permissions: K
|
|
5319
|
+
}
|
|
5320
|
+
),
|
|
5321
|
+
/* @__PURE__ */ z(
|
|
5322
|
+
"section",
|
|
5323
|
+
{
|
|
5324
|
+
ref: P,
|
|
5325
|
+
onMouseMove: U,
|
|
5326
|
+
onMouseUp: G,
|
|
5327
|
+
className: "files-container",
|
|
5328
|
+
children: [
|
|
5329
|
+
/* @__PURE__ */ z(
|
|
5330
|
+
"div",
|
|
5331
|
+
{
|
|
5332
|
+
className: `navigation-pane ${se ? "open" : "closed"}`,
|
|
5333
|
+
style: {
|
|
5334
|
+
width: j.col1 + "%"
|
|
5335
|
+
},
|
|
5336
|
+
children: [
|
|
5337
|
+
/* @__PURE__ */ c(zn, { onFileOpen: m }),
|
|
5338
|
+
/* @__PURE__ */ c(
|
|
5339
|
+
"div",
|
|
5340
|
+
{
|
|
5341
|
+
className: `sidebar-resize ${V ? "sidebar-dragging" : ""}`,
|
|
5342
|
+
onMouseDown: W
|
|
5343
|
+
}
|
|
5344
|
+
)
|
|
5345
|
+
]
|
|
5346
|
+
}
|
|
5347
|
+
),
|
|
5348
|
+
/* @__PURE__ */ z(
|
|
5349
|
+
"div",
|
|
5350
|
+
{
|
|
5351
|
+
className: "folders-preview",
|
|
5352
|
+
style: { width: (se ? j.col2 : 100) + "%" },
|
|
5353
|
+
children: [
|
|
5354
|
+
/* @__PURE__ */ c(
|
|
5355
|
+
gt,
|
|
5356
|
+
{
|
|
5357
|
+
collapsibleNav: J,
|
|
5358
|
+
isNavigationPaneOpen: se,
|
|
5359
|
+
setNavigationPaneOpen: q
|
|
5360
|
+
}
|
|
5361
|
+
),
|
|
5362
|
+
/* @__PURE__ */ c(
|
|
5363
|
+
Hn,
|
|
5364
|
+
{
|
|
5365
|
+
onCreateFolder: o,
|
|
5366
|
+
onRename: d,
|
|
5367
|
+
onFileOpen: m,
|
|
5368
|
+
onRefresh: h,
|
|
5369
|
+
enableFilePreview: L,
|
|
5370
|
+
triggerAction: y,
|
|
5371
|
+
permissions: K
|
|
5372
|
+
}
|
|
5373
|
+
)
|
|
5374
|
+
]
|
|
5375
|
+
}
|
|
5376
|
+
)
|
|
5377
|
+
]
|
|
5378
|
+
}
|
|
5379
|
+
),
|
|
5380
|
+
/* @__PURE__ */ c(
|
|
5381
|
+
a4,
|
|
5382
|
+
{
|
|
5383
|
+
fileUploadConfig: e,
|
|
5384
|
+
onFileUploading: s,
|
|
5385
|
+
onFileUploaded: i,
|
|
5386
|
+
onDelete: f,
|
|
5387
|
+
onRefresh: h,
|
|
5388
|
+
maxFileSize: g,
|
|
5389
|
+
filePreviewPath: T,
|
|
5390
|
+
filePreviewComponent: C,
|
|
5391
|
+
acceptedFileTypes: x,
|
|
5392
|
+
triggerAction: y,
|
|
5393
|
+
permissions: K
|
|
5394
|
+
}
|
|
5395
|
+
)
|
|
5396
|
+
] }) })
|
|
5397
|
+
}
|
|
5398
|
+
) }) }) })
|
|
5390
5399
|
] });
|
|
5391
5400
|
};
|
|
5392
5401
|
jn.displayName = "FileManager";
|
|
5393
5402
|
jn.propTypes = {
|
|
5394
|
-
files:
|
|
5395
|
-
|
|
5396
|
-
name:
|
|
5397
|
-
isDirectory:
|
|
5398
|
-
path:
|
|
5403
|
+
files: I.arrayOf(
|
|
5404
|
+
I.shape({
|
|
5405
|
+
name: I.string.isRequired,
|
|
5406
|
+
isDirectory: I.bool.isRequired,
|
|
5407
|
+
path: I.string.isRequired,
|
|
5399
5408
|
updatedAt: d4,
|
|
5400
|
-
size:
|
|
5409
|
+
size: I.number
|
|
5401
5410
|
})
|
|
5402
5411
|
).isRequired,
|
|
5403
|
-
fileUploadConfig:
|
|
5412
|
+
fileUploadConfig: I.shape({
|
|
5404
5413
|
url: ln,
|
|
5405
|
-
headers:
|
|
5406
|
-
method:
|
|
5414
|
+
headers: I.objectOf(I.string),
|
|
5415
|
+
method: I.oneOf(["POST", "PUT"])
|
|
5407
5416
|
}),
|
|
5408
|
-
isLoading:
|
|
5409
|
-
onCreateFolder:
|
|
5410
|
-
onFileUploading:
|
|
5411
|
-
onFileUploaded:
|
|
5412
|
-
onRename:
|
|
5413
|
-
onDelete:
|
|
5414
|
-
onCut:
|
|
5415
|
-
onCopy:
|
|
5416
|
-
onPaste:
|
|
5417
|
-
onDownload:
|
|
5418
|
-
onLayoutChange:
|
|
5419
|
-
onRefresh:
|
|
5420
|
-
onFileOpen:
|
|
5421
|
-
onFolderChange:
|
|
5422
|
-
onSelect:
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5417
|
+
isLoading: I.bool,
|
|
5418
|
+
onCreateFolder: I.func,
|
|
5419
|
+
onFileUploading: I.func,
|
|
5420
|
+
onFileUploaded: I.func,
|
|
5421
|
+
onRename: I.func,
|
|
5422
|
+
onDelete: I.func,
|
|
5423
|
+
onCut: I.func,
|
|
5424
|
+
onCopy: I.func,
|
|
5425
|
+
onPaste: I.func,
|
|
5426
|
+
onDownload: I.func,
|
|
5427
|
+
onLayoutChange: I.func,
|
|
5428
|
+
onRefresh: I.func,
|
|
5429
|
+
onFileOpen: I.func,
|
|
5430
|
+
onFolderChange: I.func,
|
|
5431
|
+
onSelect: I.func,
|
|
5432
|
+
onSelectionChange: I.func,
|
|
5433
|
+
onError: I.func,
|
|
5434
|
+
layout: I.oneOf(["grid", "list"]),
|
|
5435
|
+
maxFileSize: I.number,
|
|
5436
|
+
enableFilePreview: I.bool,
|
|
5427
5437
|
filePreviewPath: ln,
|
|
5428
|
-
acceptedFileTypes:
|
|
5429
|
-
height:
|
|
5430
|
-
width:
|
|
5431
|
-
initialPath:
|
|
5432
|
-
filePreviewComponent:
|
|
5433
|
-
primaryColor:
|
|
5434
|
-
fontFamily:
|
|
5435
|
-
language:
|
|
5436
|
-
permissions:
|
|
5437
|
-
create:
|
|
5438
|
-
upload:
|
|
5439
|
-
move:
|
|
5440
|
-
copy:
|
|
5441
|
-
rename:
|
|
5442
|
-
download:
|
|
5443
|
-
delete:
|
|
5438
|
+
acceptedFileTypes: I.string,
|
|
5439
|
+
height: I.oneOfType([I.string, I.number]),
|
|
5440
|
+
width: I.oneOfType([I.string, I.number]),
|
|
5441
|
+
initialPath: I.string,
|
|
5442
|
+
filePreviewComponent: I.func,
|
|
5443
|
+
primaryColor: I.string,
|
|
5444
|
+
fontFamily: I.string,
|
|
5445
|
+
language: I.string,
|
|
5446
|
+
permissions: I.shape({
|
|
5447
|
+
create: I.bool,
|
|
5448
|
+
upload: I.bool,
|
|
5449
|
+
move: I.bool,
|
|
5450
|
+
copy: I.bool,
|
|
5451
|
+
rename: I.bool,
|
|
5452
|
+
download: I.bool,
|
|
5453
|
+
delete: I.bool
|
|
5444
5454
|
}),
|
|
5445
|
-
collapsibleNav:
|
|
5446
|
-
defaultNavExpanded:
|
|
5455
|
+
collapsibleNav: I.bool,
|
|
5456
|
+
defaultNavExpanded: I.bool
|
|
5447
5457
|
};
|
|
5448
5458
|
export {
|
|
5449
5459
|
jn as FileManager
|