@cubone/react-file-manager 1.20.0 → 1.20.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,11 +19,11 @@ function fn() {
19
19
  _t = 1;
20
20
  var e = Pe, r = Symbol.for("react.element"), n = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, a = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
21
21
  function c(l, d, p) {
22
- var f, h = {}, w = null, S = null;
23
- p !== void 0 && (w = "" + p), d.key !== void 0 && (w = "" + d.key), d.ref !== void 0 && (S = d.ref);
22
+ var f, h = {}, w = null, M = null;
23
+ p !== void 0 && (w = "" + p), d.key !== void 0 && (w = "" + d.key), d.ref !== void 0 && (M = d.ref);
24
24
  for (f in d) s.call(d, f) && !i.hasOwnProperty(f) && (h[f] = d[f]);
25
25
  if (l && l.defaultProps) for (f in d = l.defaultProps, d) h[f] === void 0 && (h[f] = d[f]);
26
- return { $$typeof: r, type: l, key: w, ref: S, props: h, _owner: a.current };
26
+ return { $$typeof: r, type: l, key: w, ref: M, props: h, _owner: a.current };
27
27
  }
28
28
  return ze.Fragment = n, ze.jsx = c, ze.jsxs = c, ze;
29
29
  }
@@ -40,11 +40,11 @@ var Ae = {};
40
40
  var Nt;
41
41
  function hn() {
42
42
  return Nt || (Nt = 1, process.env.NODE_ENV !== "production" && function() {
43
- var e = Pe, r = Symbol.for("react.element"), n = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), l = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), M = Symbol.iterator, z = "@@iterator";
44
- function A(o) {
43
+ var e = Pe, r = Symbol.for("react.element"), n = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), l = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), M = Symbol.for("react.offscreen"), S = Symbol.iterator, A = "@@iterator";
44
+ function D(o) {
45
45
  if (o === null || typeof o != "object")
46
46
  return null;
47
- var m = M && o[M] || o[z];
47
+ var m = S && o[S] || o[A];
48
48
  return typeof m == "function" ? m : null;
49
49
  }
50
50
  var j = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
@@ -68,13 +68,13 @@ function hn() {
68
68
  var b = !1, u = !1, g = !1, _ = !1, x = !1, R;
69
69
  R = Symbol.for("react.module.reference");
70
70
  function F(o) {
71
- return !!(typeof o == "string" || typeof o == "function" || o === s || o === i || x || o === a || o === p || o === f || _ || o === S || b || u || g || typeof o == "object" && o !== null && (o.$$typeof === w || o.$$typeof === h || o.$$typeof === c || o.$$typeof === l || o.$$typeof === d || // This needs to include all possible module reference object
71
+ return !!(typeof o == "string" || typeof o == "function" || o === s || o === i || x || o === a || o === p || o === f || _ || o === M || b || u || g || typeof o == "object" && o !== null && (o.$$typeof === w || o.$$typeof === h || o.$$typeof === c || o.$$typeof === l || o.$$typeof === d || // This needs to include all possible module reference object
72
72
  // types supported by any Flight configuration anywhere since
73
73
  // we don't know which Flight build this will end up being used
74
74
  // with.
75
75
  o.$$typeof === R || o.getModuleId !== void 0));
76
76
  }
77
- function D(o, m, T) {
77
+ function z(o, m, T) {
78
78
  var B = o.displayName;
79
79
  if (B)
80
80
  return B;
@@ -114,7 +114,7 @@ function hn() {
114
114
  var T = o;
115
115
  return k(T._context) + ".Provider";
116
116
  case d:
117
- return D(o, o.render, "ForwardRef");
117
+ return z(o, o.render, "ForwardRef");
118
118
  case h:
119
119
  var B = o.displayName || null;
120
120
  return B !== null ? B : N(o.type) || "Memo";
@@ -528,7 +528,7 @@ Check the top-level render call using <` + T + ">.");
528
528
  else if (nt(o))
529
529
  o._store && (o._store.validated = !0);
530
530
  else if (o) {
531
- var re = A(o);
531
+ var re = D(o);
532
532
  if (typeof re == "function" && re !== o.entries)
533
533
  for (var ie = re.call(o), Q; !(Q = ie.next()).done; )
534
534
  nt(Q.value) && Mt(Q.value, m);
@@ -961,7 +961,7 @@ const Be = (e = () => {
961
961
  triggerAction: a
962
962
  }) => {
963
963
  var b;
964
- const [i, c] = L(!1), { currentFolder: l } = Ee(), { selectedFiles: d, setSelectedFiles: p, handleDownload: f } = Fe(), { clipBoard: h, setClipBoard: w, handleCutCopy: S, handlePasting: M } = Je(), { activeLayout: z } = Se(), A = [
964
+ const [i, c] = L(!1), { currentFolder: l } = Ee(), { selectedFiles: d, setSelectedFiles: p, handleDownload: f } = Fe(), { clipBoard: h, setClipBoard: w, handleCutCopy: M, handlePasting: S } = Je(), { activeLayout: A } = Se(), D = [
965
965
  {
966
966
  icon: /* @__PURE__ */ t.jsx(mr, { size: 17, strokeWidth: 0.3 }),
967
967
  text: "New folder",
@@ -982,7 +982,7 @@ const Be = (e = () => {
982
982
  }
983
983
  ], j = [
984
984
  {
985
- icon: z === "grid" ? /* @__PURE__ */ t.jsx(gr, { size: 16 }) : /* @__PURE__ */ t.jsx(qe, { size: 16 }),
985
+ icon: A === "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
  },
@@ -995,18 +995,18 @@ const Be = (e = () => {
995
995
  }
996
996
  ];
997
997
  function C() {
998
- M(l);
998
+ S(l);
999
999
  }
1000
1000
  const y = () => {
1001
1001
  f(), p([]);
1002
1002
  };
1003
1003
  return d.length > 0 ? /* @__PURE__ */ t.jsx("div", { className: "toolbar file-selected", children: /* @__PURE__ */ t.jsxs("div", { className: "file-action-container", children: [
1004
1004
  /* @__PURE__ */ t.jsxs("div", { children: [
1005
- /* @__PURE__ */ t.jsxs("button", { className: "item-action file-action", onClick: () => S(!0), children: [
1005
+ /* @__PURE__ */ t.jsxs("button", { className: "item-action file-action", onClick: () => M(!0), children: [
1006
1006
  /* @__PURE__ */ t.jsx(yr, { size: 18 }),
1007
1007
  /* @__PURE__ */ t.jsx("span", { children: "Cut" })
1008
1008
  ] }),
1009
- /* @__PURE__ */ t.jsxs("button", { className: "item-action file-action", onClick: () => S(!1), children: [
1009
+ /* @__PURE__ */ t.jsxs("button", { className: "item-action file-action", onClick: () => M(!1), children: [
1010
1010
  /* @__PURE__ */ t.jsx(vr, { strokeWidth: 0.1, size: 17 }),
1011
1011
  /* @__PURE__ */ t.jsx("span", { children: "Copy" })
1012
1012
  ] }),
@@ -1066,7 +1066,7 @@ const Be = (e = () => {
1066
1066
  }
1067
1067
  )
1068
1068
  ] }) }) : /* @__PURE__ */ t.jsx("div", { className: "toolbar", children: /* @__PURE__ */ t.jsxs("div", { className: "fm-toolbar", children: [
1069
- /* @__PURE__ */ t.jsx("div", { children: A.filter((u) => u.permission).map((u, g) => /* @__PURE__ */ t.jsxs("button", { className: "item-action", onClick: u.onClick, children: [
1069
+ /* @__PURE__ */ t.jsx("div", { children: D.filter((u) => u.permission).map((u, g) => /* @__PURE__ */ t.jsxs("button", { className: "item-action", onClick: u.onClick, children: [
1070
1070
  u.icon,
1071
1071
  /* @__PURE__ */ t.jsx("span", { children: u.text })
1072
1072
  ] }, g)) }),
@@ -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 = fe(f), [S, M] = L(!1), z = qn(), A = i ?? z, j = fe(), C = fe(), y = fe(null), [b, u] = L(null);
1263
+ ), w = fe(f), [M, S] = L(!1), A = qn(), D = i ?? A, 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) {
@@ -1268,8 +1268,8 @@ function ss({
1268
1268
  return;
1269
1269
  const R = y.current;
1270
1270
  for (const F in x) {
1271
- const D = x[F];
1272
- D ? R.style[F] = D : R.style.removeProperty(F);
1271
+ const z = x[F];
1272
+ z ? R.style[F] = z : R.style.removeProperty(F);
1273
1273
  }
1274
1274
  }
1275
1275
  return ns(() => {
@@ -1277,20 +1277,20 @@ function ss({
1277
1277
  return;
1278
1278
  w.current = f;
1279
1279
  function R(k) {
1280
- return A ? 0 : e ?? es(k);
1280
+ return D ? 0 : e ?? es(k);
1281
1281
  }
1282
- const F = (k) => `height ${R(k)}ms ${r}`, D = (k) => {
1282
+ const F = (k) => `height ${R(k)}ms ${r}`, z = (k) => {
1283
1283
  function N() {
1284
1284
  f ? (_({
1285
1285
  height: "",
1286
1286
  overflow: "",
1287
1287
  transition: "",
1288
1288
  display: ""
1289
- }), d("expandEnd")) : (_({ transition: "" }), d("collapseEnd")), M(!1);
1289
+ }), d("expandEnd")) : (_({ transition: "" }), d("collapseEnd")), S(!1);
1290
1290
  }
1291
1291
  C.current && Ut(C.current), C.current = Qn(N, k);
1292
1292
  };
1293
- return M(!0), f ? j.current = requestAnimationFrame(() => {
1293
+ return S(!0), f ? j.current = requestAnimationFrame(() => {
1294
1294
  d("expandStart"), _({
1295
1295
  display: "block",
1296
1296
  overflow: "hidden",
@@ -1298,12 +1298,12 @@ function ss({
1298
1298
  }), j.current = requestAnimationFrame(() => {
1299
1299
  d("expanding");
1300
1300
  const k = Kt(y);
1301
- D(R(k)), y.current && (y.current.style.transition = F(k), y.current.style.height = `${k}px`);
1301
+ z(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
- D(R(k)), _({
1306
+ z(R(k)), _({
1307
1307
  transition: F(k),
1308
1308
  height: `${k}px`
1309
1309
  }), j.current = requestAnimationFrame(() => {
@@ -1318,7 +1318,7 @@ function ss({
1318
1318
  }, [
1319
1319
  f,
1320
1320
  g,
1321
- A,
1321
+ D,
1322
1322
  e,
1323
1323
  r,
1324
1324
  d
@@ -1326,20 +1326,20 @@ function ss({
1326
1326
  isExpanded: f,
1327
1327
  setExpanded: h,
1328
1328
  getToggleProps(x) {
1329
- const { disabled: R, onClick: F, refKey: D, ...k } = {
1329
+ const { disabled: R, onClick: F, refKey: z, ...k } = {
1330
1330
  refKey: "ref",
1331
1331
  onClick() {
1332
1332
  },
1333
1333
  disabled: !1,
1334
1334
  ...x
1335
- }, N = b ? b.tagName === "BUTTON" : void 0, G = x == null ? void 0 : x[D || "ref"], ae = {
1335
+ }, N = b ? b.tagName === "BUTTON" : void 0, G = x == null ? void 0 : x[z || "ref"], ae = {
1336
1336
  id: `react-collapsed-toggle-${p}`,
1337
1337
  "aria-controls": `react-collapsed-panel-${p}`,
1338
1338
  "aria-expanded": f,
1339
1339
  onClick(ee) {
1340
1340
  R || (F == null || F(ee), h((ve) => !ve));
1341
1341
  },
1342
- [D || "ref"]: Xt(G, u)
1342
+ [z || "ref"]: Xt(G, u)
1343
1343
  }, oe = {
1344
1344
  type: "button",
1345
1345
  disabled: R ? !0 : void 0
@@ -1356,17 +1356,17 @@ function ss({
1356
1356
  };
1357
1357
  },
1358
1358
  getCollapseProps(x) {
1359
- const { style: R, refKey: F } = { refKey: "ref", style: {}, ...x }, D = x == null ? void 0 : x[F || "ref"];
1359
+ const { style: R, refKey: F } = { refKey: "ref", style: {}, ...x }, z = x == null ? void 0 : x[F || "ref"];
1360
1360
  return {
1361
1361
  id: `react-collapsed-panel-${p}`,
1362
1362
  "aria-hidden": !f,
1363
1363
  "aria-labelledby": `react-collapsed-toggle-${p}`,
1364
1364
  role: "region",
1365
1365
  ...x,
1366
- [F || "ref"]: Xt(y, D),
1366
+ [F || "ref"]: Xt(y, z),
1367
1367
  style: {
1368
1368
  boxSizing: "border-box",
1369
- ...!S && !f ? {
1369
+ ...!M && !f ? {
1370
1370
  // collapsed and not animating
1371
1371
  display: g === "0px" ? "none" : "block",
1372
1372
  height: g,
@@ -1400,70 +1400,70 @@ function Gt(e) {
1400
1400
  function Jt(e) {
1401
1401
  return H({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M464 128H272l-54.63-54.63c-6-6-14.14-9.37-22.63-9.37H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48zm0 272H48V112h140.12l54.63 54.63c6 6 14.14 9.37 22.63 9.37H464v224z" }, child: [] }] })(e);
1402
1402
  }
1403
- const Lr = ({ folder: e }) => {
1404
- const [r, n] = L(!1), [s, a] = L(!1), { currentPath: i, setCurrentPath: c } = Ee(), l = () => {
1405
- a(!0), c(e.path);
1406
- }, d = (p) => {
1407
- p.stopPropagation(), n((f) => !f);
1403
+ const Lr = ({ folder: e, onFileOpen: r }) => {
1404
+ const [n, s] = L(!1), [a, i] = L(!1), { currentPath: c, setCurrentPath: l } = Ee(), d = () => {
1405
+ i(!0), r(e), l(e.path);
1406
+ }, p = (f) => {
1407
+ f.stopPropagation(), s((h) => !h);
1408
1408
  };
1409
1409
  return te(() => {
1410
- a(i === e.path);
1411
- const p = i.split("/");
1412
- p.pop(), p.join("/") === e.path && n(!0);
1413
- }, [i]), e.subDirectories.length > 0 ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1410
+ i(c === e.path);
1411
+ const f = c.split("/");
1412
+ f.pop(), f.join("/") === e.path && s(!0);
1413
+ }, [c]), e.subDirectories.length > 0 ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1414
1414
  /* @__PURE__ */ t.jsxs(
1415
1415
  "div",
1416
1416
  {
1417
- className: `sb-folders-list-item ${s ? "active-list-item" : ""}`,
1418
- onClick: l,
1417
+ className: `sb-folders-list-item ${a ? "active-list-item" : ""}`,
1418
+ onClick: d,
1419
1419
  children: [
1420
- /* @__PURE__ */ t.jsx("span", { onClick: d, children: /* @__PURE__ */ t.jsx(
1420
+ /* @__PURE__ */ t.jsx("span", { onClick: p, children: /* @__PURE__ */ t.jsx(
1421
1421
  En,
1422
1422
  {
1423
1423
  size: 20,
1424
- className: `folder-icon-default ${r ? "folder-rotate-down" : ""}`
1424
+ className: `folder-icon-default ${n ? "folder-rotate-down" : ""}`
1425
1425
  }
1426
1426
  ) }),
1427
1427
  /* @__PURE__ */ t.jsxs("div", { className: "sb-folder-details", children: [
1428
- r || s ? /* @__PURE__ */ t.jsx(Gt, { size: 20, className: "folder-open-icon" }) : /* @__PURE__ */ t.jsx(Jt, { size: 17, className: "folder-close-icon" }),
1428
+ n || a ? /* @__PURE__ */ t.jsx(Gt, { size: 20, className: "folder-open-icon" }) : /* @__PURE__ */ t.jsx(Jt, { size: 17, className: "folder-close-icon" }),
1429
1429
  /* @__PURE__ */ t.jsx("span", { className: "sb-folder-name", title: e.name, children: e.name })
1430
1430
  ] })
1431
1431
  ]
1432
1432
  }
1433
1433
  ),
1434
- /* @__PURE__ */ t.jsx(os, { open: r, children: /* @__PURE__ */ t.jsx("div", { className: "folder-collapsible", children: e.subDirectories.map((p, f) => /* @__PURE__ */ t.jsx(Lr, { folder: p }, f)) }) })
1434
+ /* @__PURE__ */ t.jsx(os, { open: n, children: /* @__PURE__ */ t.jsx("div", { className: "folder-collapsible", children: e.subDirectories.map((f, h) => /* @__PURE__ */ t.jsx(Lr, { folder: f, onFileOpen: r }, h)) }) })
1435
1435
  ] }) : /* @__PURE__ */ t.jsxs(
1436
1436
  "div",
1437
1437
  {
1438
- className: `sb-folders-list-item ${s ? "active-list-item" : ""}`,
1439
- onClick: l,
1438
+ className: `sb-folders-list-item ${a ? "active-list-item" : ""}`,
1439
+ onClick: d,
1440
1440
  children: [
1441
1441
  /* @__PURE__ */ t.jsx("span", { className: "non-expanable" }),
1442
1442
  /* @__PURE__ */ t.jsxs("div", { className: "sb-folder-details", children: [
1443
- s ? /* @__PURE__ */ t.jsx(Gt, { size: 20, className: "folder-open-icon" }) : /* @__PURE__ */ t.jsx(Jt, { size: 17, className: "folder-close-icon" }),
1443
+ a ? /* @__PURE__ */ t.jsx(Gt, { size: 20, className: "folder-open-icon" }) : /* @__PURE__ */ t.jsx(Jt, { size: 17, className: "folder-close-icon" }),
1444
1444
  /* @__PURE__ */ t.jsx("span", { className: "sb-folder-name", title: e.name, children: e.name })
1445
1445
  ] })
1446
1446
  ]
1447
1447
  }
1448
1448
  );
1449
- }, cs = (e) => e == null ? void 0 : e.split("/").slice(0, -1).join("/"), Or = () => {
1450
- const [e, r] = L([]), { files: n } = Ge(), s = (a, i) => {
1451
- var c;
1452
- return i[a] ? (c = i[a]) == null ? void 0 : c.map((l) => ({
1453
- ...l,
1454
- subDirectories: s(l.path, i)
1449
+ }, cs = (e) => e == null ? void 0 : e.split("/").slice(0, -1).join("/"), Or = ({ onFileOpen: e }) => {
1450
+ const [r, n] = L([]), { files: s } = Ge(), a = (i, c) => {
1451
+ var l;
1452
+ return c[i] ? (l = c[i]) == null ? void 0 : l.map((d) => ({
1453
+ ...d,
1454
+ subDirectories: a(d.path, c)
1455
1455
  })) : [];
1456
1456
  };
1457
1457
  return te(() => {
1458
- if (Array.isArray(n)) {
1459
- const a = n.filter((c) => c.isDirectory), i = Object.groupBy(a, ({ path: c }) => cs(c));
1460
- r(() => s("", i));
1458
+ if (Array.isArray(s)) {
1459
+ const i = s.filter((l) => l.isDirectory), c = Object.groupBy(i, ({ path: l }) => cs(l));
1460
+ n(() => a("", c));
1461
1461
  }
1462
- }, [n]), /* @__PURE__ */ t.jsx("div", { className: "sb-folders-list", children: (e == null ? void 0 : e.length) > 0 ? /* @__PURE__ */ t.jsx(t.Fragment, { children: e == null ? void 0 : e.map((a, i) => /* @__PURE__ */ t.jsx(Lr, { folder: a }, i)) }) : /* @__PURE__ */ t.jsx("div", { className: "empty-nav-pane", children: "Nothing here yet" }) });
1462
+ }, [s]), /* @__PURE__ */ t.jsx("div", { className: "sb-folders-list", children: (r == null ? void 0 : r.length) > 0 ? /* @__PURE__ */ t.jsx(t.Fragment, { children: r == null ? void 0 : r.map((i, c) => /* @__PURE__ */ t.jsx(Lr, { folder: i, onFileOpen: e }, c)) }) : /* @__PURE__ */ t.jsx("div", { className: "empty-nav-pane", children: "Nothing here yet" }) });
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 = fe(null), h = fe([]), w = fe(null), S = Be(() => {
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), M = Be(() => {
1467
1467
  l(!1);
1468
1468
  });
1469
1469
  te(() => {
@@ -1475,14 +1475,14 @@ const kr = () => {
1475
1475
  }));
1476
1476
  }), s([]), i([]);
1477
1477
  }, [d]);
1478
- const M = (C) => {
1478
+ const S = (C) => {
1479
1479
  p(C);
1480
- }, z = () => {
1480
+ }, A = () => {
1481
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
1482
  return C - (b + g);
1483
- }, A = () => {
1483
+ }, D = () => {
1484
1484
  var u;
1485
- const C = z(), y = h.current.reduce((g, _) => _ ? g + _.clientWidth : g, 0), b = ((u = w.current) == null ? void 0 : u.clientWidth) || 0;
1485
+ const C = A(), y = h.current.reduce((g, _) => _ ? g + _.clientWidth : g, 0), b = ((u = w.current) == null ? void 0 : u.clientWidth) || 0;
1486
1486
  return C - (y + b);
1487
1487
  }, j = () => f.current.scrollWidth > f.current.clientWidth;
1488
1488
  return te(() => {
@@ -1490,7 +1490,7 @@ const kr = () => {
1490
1490
  if (j()) {
1491
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
- } else if (n.length > 0 && A() > a.at(-1)) {
1493
+ } else if (n.length > 0 && D() > 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
  }
@@ -1500,7 +1500,7 @@ const kr = () => {
1500
1500
  "span",
1501
1501
  {
1502
1502
  className: "folder-name",
1503
- onClick: () => M(C.path),
1503
+ onClick: () => S(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, {}),
@@ -1519,11 +1519,11 @@ 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((C, y) => /* @__PURE__ */ t.jsx(
1522
+ c && /* @__PURE__ */ t.jsx("ul", { ref: M.ref, className: "hidden-folders-container", children: n.map((C, y) => /* @__PURE__ */ t.jsx(
1523
1523
  "li",
1524
1524
  {
1525
1525
  onClick: () => {
1526
- M(C.path), l(!1);
1526
+ S(C.path), l(!1);
1527
1527
  },
1528
1528
  children: C.name
1529
1529
  },
@@ -1596,16 +1596,20 @@ const Xe = (e) => ({
1596
1596
  rows: c
1597
1597
  }
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
- const [a, i] = L(r.name), [c, l] = L(!1), [d, p] = L(""), [f, h] = L("right"), [w, S] = L("bottom"), M = Be((g) => {
1599
+ const [a, i] = L(r.name), [c, l] = L(!1), [d, p] = L(""), [f, h] = L("right"), [w, M] = L("bottom"), S = Be((g) => {
1600
1600
  g.preventDefault(), g.stopPropagation();
1601
- }), { currentFolder: z, currentPathFiles: A, setCurrentPathFiles: j } = Ee(), { activeLayout: C } = Se(), y = (g) => {
1601
+ }), { currentFolder: A, currentPathFiles: D, 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(), j((x) => x.filter((R) => R.key !== r.key))), /[\\/:*?"<>|]/.test(g.key) ? (g.preventDefault(), p(
1608
+ if (g.key === "Escape") {
1609
+ g.preventDefault(), s.close(), j((x) => x.filter((R) => R.key !== r.key));
1610
+ return;
1611
+ }
1612
+ /[\\/:*?"<>|]/.test(g.key) ? (g.preventDefault(), p(
1609
1613
  `A file name can't contain any of the following characters: \\ / : * ? " < > |`
1610
1614
  ), l(!0)) : (l(!1), p(""));
1611
1615
  };
@@ -1620,26 +1624,26 @@ const Xe = (e) => ({
1620
1624
  function u() {
1621
1625
  var R, F;
1622
1626
  let g = a.trim();
1623
- const _ = A.filter((D) => !(D.key && D.key === r.key));
1624
- if (_.find((D) => D.name.toLowerCase() === g.toLowerCase())) {
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);
1627
+ const _ = D.filter((z) => !(z.key && z.key === r.key));
1628
+ if (_.find((z) => z.name.toLowerCase() === g.toLowerCase())) {
1629
+ p(`This destination already contains a folder named '${g}'.`), l(!0), (R = S.ref.current) == null || R.focus(), (F = S.ref.current) == null || F.select(), S.setIsClicked(!1);
1626
1630
  return;
1627
1631
  }
1628
- g === "" && (g = _r("New Folder", !0, _)), Le(n, "onCreateFolder", g, z), j((D) => D.filter((k) => k.key !== r.key)), s.close();
1632
+ g === "" && (g = _r("New Folder", !0, _)), Le(n, "onCreateFolder", g, A), j((z) => z.filter((k) => k.key !== r.key)), s.close();
1629
1633
  }
1630
1634
  return te(() => {
1631
1635
  var g, _, x;
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, G = N.getBoundingClientRect();
1634
- k.right - G.left > 313 ? h("right") : h("left"), k.bottom - (G.top + N.clientHeight) > 88 ? S("bottom") : S("top");
1636
+ if ((g = S.ref.current) == null || g.focus(), (_ = S.ref.current) == null || _.select(), (x = S.ref) != null && x.current) {
1637
+ const k = e.current.getBoundingClientRect(), N = S.ref.current, G = N.getBoundingClientRect();
1638
+ k.right - G.left > 313 ? h("right") : h("left"), k.bottom - (G.top + N.clientHeight) > 88 ? M("bottom") : M("top");
1635
1639
  }
1636
1640
  }, []), te(() => {
1637
- M.isClicked && u();
1638
- }, [M.isClicked]), /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1641
+ S.isClicked && u();
1642
+ }, [S.isClicked]), /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1639
1643
  /* @__PURE__ */ t.jsx(
1640
1644
  Nr,
1641
1645
  {
1642
- nameInputRef: M.ref,
1646
+ nameInputRef: S.ref,
1643
1647
  maxLength: ls,
1644
1648
  value: a,
1645
1649
  onChange: y,
@@ -1701,7 +1705,7 @@ const Ar = ({
1701
1705
  }
1702
1706
  );
1703
1707
  }, _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: j } = Ee(), { activeLayout: C } = Se(), y = fe(null), b = Be((x) => {
1708
+ const [a, i] = L(r == null ? void 0 : r.name), [c, l] = L(!1), [d, p] = L(!1), [f, h] = L(""), [w, M] = L("right"), [S, A] = L("bottom"), { currentPathFiles: D, setCurrentPathFiles: j } = Ee(), { activeLayout: C } = Se(), y = fe(null), b = Be((x) => {
1705
1709
  var R;
1706
1710
  (R = y.current) != null && R.contains(x.target) || (x.preventDefault(), x.stopPropagation());
1707
1711
  }), u = (x) => {
@@ -1709,6 +1713,12 @@ const Ar = ({
1709
1713
  x.preventDefault(), b.setIsClicked(!0);
1710
1714
  return;
1711
1715
  }
1716
+ if (x.key === "Escape") {
1717
+ x.preventDefault(), j(
1718
+ (F) => F.map((z) => (z.key === r.key && (z.isEditing = !1), z))
1719
+ ), s.close();
1720
+ return;
1721
+ }
1712
1722
  /[\\/:*?"<>|]/.test(x.key) ? (x.preventDefault(), h(
1713
1723
  `A file name can't contain any of the following characters: \\ / : * ? " < > |`
1714
1724
  ), p(!0)) : p(!1);
@@ -1727,7 +1737,7 @@ const Ar = ({
1727
1737
  (R) => R.map((F) => (F.key === r.key && (F.isEditing = !1), F))
1728
1738
  ), s.close();
1729
1739
  return;
1730
- } else if (A.some((R) => R.name === a)) {
1740
+ } else if (D.some((R) => R.name === a)) {
1731
1741
  p(!0), h(`This destination already contains a folder named '${a}'.`), b.setIsClicked(!1);
1732
1742
  return;
1733
1743
  } else if (!r.isDirectory && !x) {
@@ -1740,9 +1750,9 @@ const Ar = ({
1740
1750
  p(!1), Le(n, "onRename", r, a), j((R) => R.filter((F) => F.key !== r.key)), s.close();
1741
1751
  }
1742
1752
  const _ = () => {
1743
- var x, R, F, D, k, N;
1753
+ var x, R, F, z, k, N;
1744
1754
  if ((R = (x = b.ref) == null ? void 0 : x.current) == null || R.focus(), r.isDirectory)
1745
- (D = (F = b.ref) == null ? void 0 : F.current) == null || D.select();
1755
+ (z = (F = b.ref) == null ? void 0 : F.current) == null || z.select();
1746
1756
  else {
1747
1757
  const G = _e(r.name), ae = r.name.length - G.length - 1;
1748
1758
  (N = (k = b.ref) == null ? void 0 : k.current) == null || N.setSelectionRange(0, ae);
@@ -1752,7 +1762,7 @@ const Ar = ({
1752
1762
  var x;
1753
1763
  if (_(), (x = b.ref) != null && x.current) {
1754
1764
  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");
1765
+ k.right - G.left > 313 ? M("right") : M("left"), k.bottom - (G.top + N.clientHeight) > 88 ? A("bottom") : A("top");
1756
1766
  }
1757
1767
  }, []), te(() => {
1758
1768
  b.isClicked && g(!1), _();
@@ -1776,7 +1786,7 @@ const Ar = ({
1776
1786
  {
1777
1787
  message: f,
1778
1788
  xPlacement: w,
1779
- yPlacement: M
1789
+ yPlacement: S
1780
1790
  }
1781
1791
  ),
1782
1792
  /* @__PURE__ */ t.jsx(
@@ -1864,7 +1874,7 @@ const Ar = ({
1864
1874
  setLastSelectedFile: f
1865
1875
  }) => {
1866
1876
  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 = () => {
1877
+ const [h, w] = L(!1), [M, S] = L(0), [A, D] = 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: z, handleCutCopy: k, setClipBoard: N, handlePasting: G } = Je(), ae = fe(null), oe = Xe(it), ce = (z == null ? void 0 : z.isMoving) && z.files.find((Y) => Y.name === r.name && Y.path === r.path), ee = () => {
1868
1878
  i(r), r.isDirectory ? (x(r.path), F([])) : a && d.show("previewFile");
1869
1879
  }, ve = (Y, ue) => {
1870
1880
  if (l.length > 0 && Y) {
@@ -1883,19 +1893,19 @@ const Ar = ({
1883
1893
  if (Y.stopPropagation(), r.isEditing) return;
1884
1894
  ve(Y.shiftKey, Y.ctrlKey);
1885
1895
  const ue = (/* @__PURE__ */ new Date()).getTime();
1886
- if (ue - S < 300) {
1896
+ if (ue - M < 300) {
1887
1897
  ee();
1888
1898
  return;
1889
1899
  }
1890
- M(ue);
1900
+ S(ue);
1891
1901
  }, P = (Y) => {
1892
1902
  Y.key === "Enter" && (Y.stopPropagation(), F([r]), ee());
1893
1903
  }, V = (Y) => {
1894
1904
  Y.stopPropagation(), Y.preventDefault(), !r.isEditing && (h || F([r]), f(r), p(Y, !0));
1895
1905
  }, W = () => {
1896
- A("visible");
1906
+ D("visible");
1897
1907
  }, I = () => {
1898
- !h && A("hidden");
1908
+ !h && D("hidden");
1899
1909
  }, X = (Y) => {
1900
1910
  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
1911
  }, O = (Y) => {
@@ -1908,7 +1918,7 @@ const Ar = ({
1908
1918
  Y.preventDefault(), !(h || !r.isDirectory) && (G(r), C((ue) => ue && ""), b(null));
1909
1919
  };
1910
1920
  return te(() => {
1911
- w(l.includes(e)), A(l.includes(e) ? "visible" : "hidden");
1921
+ w(l.includes(e)), D(l.includes(e) ? "visible" : "hidden");
1912
1922
  }, [l]), /* @__PURE__ */ t.jsxs(
1913
1923
  "div",
1914
1924
  {
@@ -1935,7 +1945,7 @@ const Ar = ({
1935
1945
  name: r.name,
1936
1946
  id: r.name,
1937
1947
  checked: h,
1938
- className: `selection-checkbox ${z}`,
1948
+ className: `selection-checkbox ${A}`,
1939
1949
  onChange: X,
1940
1950
  onClick: (Y) => Y.stopPropagation()
1941
1951
  }
@@ -1986,22 +1996,22 @@ const Ar = ({
1986
1996
  s.icon,
1987
1997
  /* @__PURE__ */ t.jsx("span", { children: s.title })
1988
1998
  ] }, 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 = 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();
1999
+ const [i, c] = L(0), [l, d] = L(0), [p, f] = L(null), [h, w] = L("right"), M = fe(null), S = () => {
2000
+ 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) > _, z = !F, k = C - b.top, N = b.height - k > x, G = !N;
2001
+ F ? (c(`${R}px`), w("right")) : z && (c(`${R - _}px`), w("left")), N ? d(`${k + y.scrollTop}px`) : G && d(`${k + y.scrollTop - x}px`);
1994
2002
  }, A = (j) => {
2003
+ j.preventDefault(), j.stopPropagation();
2004
+ }, D = (j) => {
1995
2005
  f(j);
1996
2006
  };
1997
2007
  if (te(() => {
1998
- s && r.current ? M() : (d(0), c(0), f(null));
2008
+ s && r.current ? S() : (d(0), c(0), f(null));
1999
2009
  }, [s]), s)
2000
2010
  return /* @__PURE__ */ t.jsx(
2001
2011
  "div",
2002
2012
  {
2003
2013
  ref: r,
2004
- onContextMenu: z,
2014
+ onContextMenu: A,
2005
2015
  onClick: (j) => j.stopPropagation(),
2006
2016
  className: `fm-context-menu ${l ? "visible" : "hidden"}`,
2007
2017
  style: {
@@ -2016,7 +2026,7 @@ const Ar = ({
2016
2026
  {
2017
2027
  onClick: j.onClick,
2018
2028
  className: `${j.className ?? ""} ${b ? "active" : ""}`,
2019
- onMouseOver: () => A(C),
2029
+ onMouseOver: () => D(C),
2020
2030
  children: [
2021
2031
  j.icon,
2022
2032
  /* @__PURE__ */ t.jsx("span", { children: j.title }),
@@ -2025,7 +2035,7 @@ const Ar = ({
2025
2035
  b && /* @__PURE__ */ t.jsx(
2026
2036
  ms,
2027
2037
  {
2028
- subMenuRef: S,
2038
+ subMenuRef: M,
2029
2039
  list: j.children,
2030
2040
  position: h
2031
2041
  }
@@ -2044,12 +2054,12 @@ function ys(e) {
2044
2054
  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
2055
  }
2046
2056
  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: j, setSelectedFiles: C, handleDownload: y } = Fe(), { currentPath: b, setCurrentPath: u, currentPathFiles: g, setCurrentPathFiles: _ } = Ee(), { activeLayout: x, setActiveLayout: R } = Se(), F = () => {
2057
+ const [s, a] = L([]), [i, c] = L(!1), [l, d] = L(!1), [p, f] = L({ clickX: 0, clickY: 0 }), [h, w] = L(null), { clipBoard: M, setClipBoard: S, handleCutCopy: A, handlePasting: D } = Je(), { selectedFiles: j, setSelectedFiles: C, handleDownload: y } = Fe(), { currentPath: b, setCurrentPath: u, currentPathFiles: g, setCurrentPathFiles: _ } = Ee(), { activeLayout: x, setActiveLayout: R } = Se(), F = () => {
2048
2058
  h.isDirectory ? (u(h.path), a([]), C([])) : r && n.show("previewFile"), c(!1);
2049
- }, D = (O) => {
2050
- z(O), c(!1);
2059
+ }, z = (O) => {
2060
+ A(O), c(!1);
2051
2061
  }, k = () => {
2052
- A(h), c(!1);
2062
+ D(h), c(!1);
2053
2063
  }, N = () => {
2054
2064
  c(!1), n.show("rename");
2055
2065
  }, G = () => {
@@ -2057,7 +2067,7 @@ const xs = (e, r, n) => {
2057
2067
  }, ae = () => {
2058
2068
  c(!1), n.show("delete");
2059
2069
  }, oe = () => {
2060
- c(!1), Le(e, "onRefresh"), M(null);
2070
+ c(!1), Le(e, "onRefresh"), S(null);
2061
2071
  }, ce = () => {
2062
2072
  n.show("createFolder"), c(!1);
2063
2073
  }, ee = () => {
@@ -2121,19 +2131,19 @@ const xs = (e, r, n) => {
2121
2131
  {
2122
2132
  title: "Cut",
2123
2133
  icon: /* @__PURE__ */ t.jsx(yr, { size: 19 }),
2124
- onClick: () => D(!0)
2134
+ onClick: () => z(!0)
2125
2135
  },
2126
2136
  {
2127
2137
  title: "Copy",
2128
2138
  icon: /* @__PURE__ */ t.jsx(vr, { strokeWidth: 0.1, size: 17 }),
2129
- onClick: () => D(!1),
2139
+ onClick: () => z(!1),
2130
2140
  divider: !(h != null && h.isDirectory)
2131
2141
  },
2132
2142
  {
2133
2143
  title: "Paste",
2134
2144
  icon: /* @__PURE__ */ t.jsx(mt, { size: 18 }),
2135
2145
  onClick: k,
2136
- className: `${S ? "" : "disable-paste"}`,
2146
+ className: `${M ? "" : "disable-paste"}`,
2137
2147
  hidden: !(h != null && h.isDirectory),
2138
2148
  divider: !0
2139
2149
  },
@@ -2229,13 +2239,13 @@ const xs = (e, r, n) => {
2229
2239
  selecCtxItems: f,
2230
2240
  handleContextMenu: h,
2231
2241
  unselectFiles: w,
2232
- visible: S,
2233
- setVisible: M,
2234
- setLastSelectedFile: z,
2235
- selectedFileIndexes: A,
2242
+ visible: M,
2243
+ setVisible: S,
2244
+ setLastSelectedFile: A,
2245
+ selectedFileIndexes: D,
2236
2246
  clickPosition: j,
2237
2247
  isSelectionCtx: C
2238
- } = xs(s, a, i), y = Be(() => M(!1));
2248
+ } = xs(s, a, i), y = Be(() => S(!1));
2239
2249
  return /* @__PURE__ */ t.jsxs(
2240
2250
  "div",
2241
2251
  {
@@ -2256,10 +2266,10 @@ const xs = (e, r, n) => {
2256
2266
  enableFilePreview: a,
2257
2267
  triggerAction: i,
2258
2268
  filesViewRef: l,
2259
- selectedFileIndexes: A,
2269
+ selectedFileIndexes: D,
2260
2270
  handleContextMenu: h,
2261
- setVisible: M,
2262
- setLastSelectedFile: z
2271
+ setVisible: S,
2272
+ setLastSelectedFile: A
2263
2273
  },
2264
2274
  u
2265
2275
  )) }) : /* @__PURE__ */ t.jsx("div", { className: "empty-folder", children: "This folder is empty." }),
@@ -2269,8 +2279,8 @@ const xs = (e, r, n) => {
2269
2279
  filesViewRef: l,
2270
2280
  contextMenuRef: y.ref,
2271
2281
  menuItems: C ? f : p,
2272
- visible: S,
2273
- setVisible: M,
2282
+ visible: M,
2283
+ setVisible: S,
2274
2284
  clickPosition: j
2275
2285
  }
2276
2286
  )
@@ -2323,12 +2333,12 @@ const Ps = ({
2323
2333
  handleFileRemove: c
2324
2334
  }) => {
2325
2335
  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 = fe(), { onError: j } = Ge(), C = (F) => {
2336
+ const [l, d] = L(0), [p, f] = L(!1), [h, w] = L(!1), [M, S] = L(!1), A = Xe(33), D = fe(), { onError: j } = Ge(), C = (F) => {
2327
2337
  d(0), s((k) => ({
2328
2338
  ...k,
2329
2339
  [e]: !1
2330
2340
  }));
2331
- const D = {
2341
+ const z = {
2332
2342
  type: "upload",
2333
2343
  message: "Upload failed.",
2334
2344
  response: {
@@ -2340,14 +2350,14 @@ const Ps = ({
2340
2350
  n(
2341
2351
  (k) => k.map((N, G) => e === G ? {
2342
2352
  ...N,
2343
- error: D.message
2353
+ error: z.message
2344
2354
  } : N)
2345
- ), M(!0), j(D, r.file);
2355
+ ), S(!0), j(z, r.file);
2346
2356
  }, y = (F) => {
2347
2357
  if (!F.error)
2348
- return new Promise((D, k) => {
2358
+ return new Promise((z, k) => {
2349
2359
  const N = new XMLHttpRequest();
2350
- A.current = N, s((ee) => ({
2360
+ D.current = N, s((ee) => ({
2351
2361
  ...ee,
2352
2362
  [e]: !0
2353
2363
  })), N.upload.onprogress = (ee) => {
@@ -2359,7 +2369,7 @@ const Ps = ({
2359
2369
  s((ee) => ({
2360
2370
  ...ee,
2361
2371
  [e]: !1
2362
- })), N.status === 200 || N.status === 201 ? (f(!0), i(N.response), D(N.response)) : (k(N.statusText), C(N));
2372
+ })), N.status === 200 || N.status === 201 ? (f(!0), i(N.response), z(N.response)) : (k(N.statusText), C(N));
2363
2373
  }, N.onerror = () => {
2364
2374
  k(N.statusText), C(N);
2365
2375
  };
@@ -2375,30 +2385,30 @@ const Ps = ({
2375
2385
  });
2376
2386
  };
2377
2387
  te(() => {
2378
- A.current || y(r);
2388
+ D.current || y(r);
2379
2389
  }, []);
2380
2390
  const b = () => {
2381
- A.current && (A.current.abort(), s((F) => ({
2391
+ D.current && (D.current.abort(), s((F) => ({
2382
2392
  ...F,
2383
2393
  [e]: !1
2384
2394
  })), w(!0), d(0));
2385
2395
  }, u = () => {
2386
2396
  r != null && r.file && (n(
2387
- (F) => F.map((D, k) => e === k ? {
2388
- ...D,
2397
+ (F) => F.map((z, k) => e === k ? {
2398
+ ...z,
2389
2399
  error: !1
2390
- } : D)
2391
- ), y({ ...r, error: !1 }), w(!1), M(!1));
2400
+ } : z)
2401
+ ), y({ ...r, error: !1 }), w(!1), S(!1));
2392
2402
  };
2393
2403
  return r.removed ? null : /* @__PURE__ */ t.jsxs("li", { children: [
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 }) }),
2404
+ /* @__PURE__ */ t.jsx("div", { className: "file-icon", children: A[_e((g = r.file) == null ? void 0 : g.name)] ?? /* @__PURE__ */ t.jsx(Ue, { size: 33 }) }),
2395
2405
  /* @__PURE__ */ t.jsxs("div", { className: "file", children: [
2396
2406
  /* @__PURE__ */ t.jsxs("div", { className: "file-details", children: [
2397
2407
  /* @__PURE__ */ t.jsxs("div", { className: "file-info", children: [
2398
2408
  /* @__PURE__ */ t.jsx("span", { className: "file-name text-truncate", title: (_ = r.file) == null ? void 0 : _.name, children: (x = r.file) == null ? void 0 : x.name }),
2399
2409
  /* @__PURE__ */ t.jsx("span", { className: "file-size", children: Ze((R = r.file) == null ? void 0 : R.size) })
2400
2410
  ] }),
2401
- p ? /* @__PURE__ */ t.jsx(as, { title: "Uploaded", className: "upload-success" }) : h || S ? /* @__PURE__ */ t.jsx(Rs, { className: "retry-upload", title: "Retry", onClick: u }) : /* @__PURE__ */ t.jsx(
2411
+ p ? /* @__PURE__ */ t.jsx(as, { title: "Uploaded", className: "upload-success" }) : h || M ? /* @__PURE__ */ t.jsx(Rs, { className: "retry-upload", title: "Retry", onClick: u }) : /* @__PURE__ */ t.jsx(
2402
2412
  "div",
2403
2413
  {
2404
2414
  className: "rm-file",
@@ -2426,9 +2436,9 @@ const Ps = ({
2426
2436
  onFileUploading: s,
2427
2437
  onFileUploaded: a
2428
2438
  }) => {
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) => {
2430
- u.key === "Enter" && M.current.click();
2431
- }, A = (u) => {
2439
+ const [i, c] = L([]), [l, d] = L(!1), [p, f] = L({}), { currentFolder: h, currentPathFiles: w } = Ee(), { onError: M } = Ge(), S = fe(null), A = (u) => {
2440
+ u.key === "Enter" && S.current.click();
2441
+ }, D = (u) => {
2432
2442
  if (n && !n.includes(_e(u.name)))
2433
2443
  return "File type is not allowed.";
2434
2444
  if (w.some(
@@ -2440,8 +2450,8 @@ const Ps = ({
2440
2450
  (g) => !i.some((_) => _.file.name.toLowerCase() === g.name.toLowerCase())
2441
2451
  ), u.length > 0) {
2442
2452
  const g = u.map((_) => {
2443
- const x = s(_, h), R = A(_);
2444
- return R && S({ type: "upload", message: R }, _), {
2453
+ const x = s(_, h), R = D(_);
2454
+ return R && M({ type: "upload", message: R }, _), {
2445
2455
  file: _,
2446
2456
  appendData: x,
2447
2457
  ...R && { error: R }
@@ -2481,12 +2491,12 @@ const Ps = ({
2481
2491
  ] })
2482
2492
  }
2483
2493
  ),
2484
- /* @__PURE__ */ t.jsx("div", { className: "btn-choose-file", children: /* @__PURE__ */ t.jsxs(Ne, { padding: "0", onKeyDown: z, children: [
2494
+ /* @__PURE__ */ t.jsx("div", { className: "btn-choose-file", children: /* @__PURE__ */ t.jsxs(Ne, { padding: "0", onKeyDown: A, children: [
2485
2495
  /* @__PURE__ */ t.jsx("label", { htmlFor: "chooseFile", children: "Choose File" }),
2486
2496
  /* @__PURE__ */ t.jsx(
2487
2497
  "input",
2488
2498
  {
2489
- ref: M,
2499
+ ref: S,
2490
2500
  type: "file",
2491
2501
  id: "chooseFile",
2492
2502
  className: "choose-file-input",
@@ -2518,15 +2528,15 @@ const Ps = ({
2518
2528
  ] })
2519
2529
  ] });
2520
2530
  }, Zt = ["jpg", "jpeg", "png"], Qt = ["mp4", "mov", "avi"], er = ["mp3", "wav", "m4a"], tr = ["txt", "pdf"], Fs = ({ filePreviewPath: e, filePreviewComponent: r }) => {
2521
- var M;
2522
- const [n, s] = L(!0), [a, i] = L(!1), { selectedFiles: c } = Fe(), l = Xe(73), d = (M = _e(c[0].name)) == null ? void 0 : M.toLowerCase(), p = `${e}${c[0].path}`, f = yt(
2531
+ var S;
2532
+ const [n, s] = L(!0), [a, i] = L(!1), { selectedFiles: c } = Fe(), l = Xe(73), d = (S = _e(c[0].name)) == null ? void 0 : S.toLowerCase(), p = `${e}${c[0].path}`, f = yt(
2523
2533
  () => r == null ? void 0 : r(c[0]),
2524
2534
  [r]
2525
2535
  ), h = () => {
2526
2536
  s(!1), i(!1);
2527
2537
  }, w = () => {
2528
2538
  s(!1), i(!0);
2529
- }, S = () => {
2539
+ }, M = () => {
2530
2540
  window.location.href = p;
2531
2541
  };
2532
2542
  return Pe.isValidElement(f) ? f : /* @__PURE__ */ t.jsxs("section", { className: `file-previewer ${d === "pdf" ? "pdf-previewer" : ""}`, children: [
@@ -2543,7 +2553,7 @@ const Ps = ({
2543
2553
  c[0].size && /* @__PURE__ */ t.jsx("span", { children: "-" }),
2544
2554
  /* @__PURE__ */ t.jsx("span", { className: "file-size", children: Ze(c[0].size) })
2545
2555
  ] }),
2546
- /* @__PURE__ */ t.jsx(Ne, { onClick: S, padding: "0.45rem .9rem", children: /* @__PURE__ */ t.jsxs("div", { className: "download-btn", children: [
2556
+ /* @__PURE__ */ t.jsx(Ne, { onClick: M, padding: "0.45rem .9rem", children: /* @__PURE__ */ t.jsxs("div", { className: "download-btn", children: [
2547
2557
  /* @__PURE__ */ t.jsx(jt, { size: 18 }),
2548
2558
  /* @__PURE__ */ t.jsx("span", { children: "Download" })
2549
2559
  ] }) })
@@ -2618,13 +2628,13 @@ const Ps = ({
2618
2628
  e.show("uploadFile");
2619
2629
  }, w = () => {
2620
2630
  s(!0);
2621
- }, S = () => {
2622
- s(!1);
2623
2631
  }, M = () => {
2632
+ s(!1);
2633
+ }, S = () => {
2624
2634
  a(i);
2625
- }, z = () => {
2626
- e.show("rename");
2627
2635
  }, A = () => {
2636
+ e.show("rename");
2637
+ }, D = () => {
2628
2638
  d();
2629
2639
  }, j = () => {
2630
2640
  e.show("delete");
@@ -2643,7 +2653,7 @@ const Ps = ({
2643
2653
  }, x = () => {
2644
2654
  p("list");
2645
2655
  };
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);
2656
+ ye(xe.createFolder, f, e.isActive), ye(xe.uploadFiles, h, e.isActive), ye(xe.cut, w, e.isActive), ye(xe.copy, M, e.isActive), ye(xe.paste, S, e.isActive), ye(xe.rename, A, e.isActive), ye(xe.download, D, 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);
2647
2657
  }, Ms = ({
2648
2658
  fileUploadConfig: e,
2649
2659
  onFileUploading: r,
@@ -2658,7 +2668,7 @@ const Ps = ({
2658
2668
  }) => {
2659
2669
  const [f, h] = L(null), { selectedFiles: w } = Fe();
2660
2670
  Ss(p, a);
2661
- const S = {
2671
+ const M = {
2662
2672
  uploadFile: {
2663
2673
  title: "Upload",
2664
2674
  component: /* @__PURE__ */ t.jsx(
@@ -2692,8 +2702,8 @@ const Ps = ({
2692
2702
  };
2693
2703
  if (te(() => {
2694
2704
  if (p.isActive) {
2695
- const M = p.actionType;
2696
- M === "previewFile" && (S[M].title = (w == null ? void 0 : w.name) ?? "Preview"), h(S[M]);
2705
+ const S = p.actionType;
2706
+ S === "previewFile" && (M[S].title = (w == null ? void 0 : w.name) ?? "Preview"), h(M[S]);
2697
2707
  } else
2698
2708
  h(null);
2699
2709
  }, [p.isActive]), f)
@@ -2735,8 +2745,8 @@ const Ps = ({
2735
2745
  handleMouseMove: (f) => {
2736
2746
  if (!a) return;
2737
2747
  f.preventDefault();
2738
- const w = c.current.getBoundingClientRect(), S = (f.clientX - w.left) / w.width * 100;
2739
- S >= 15 && S <= 60 && s({ col1: S, col2: 100 - S });
2748
+ const w = c.current.getBoundingClientRect(), M = (f.clientX - w.left) / w.width * 100;
2749
+ M >= 15 && M <= 60 && s({ col1: M, col2: 100 - M });
2740
2750
  }
2741
2751
  };
2742
2752
  };
@@ -2753,7 +2763,7 @@ var rr;
2753
2763
  function ks() {
2754
2764
  if (rr) return ne;
2755
2765
  rr = 1;
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;
2766
+ 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, M = e ? Symbol.for("react.memo") : 60115, S = e ? Symbol.for("react.lazy") : 60116, A = e ? Symbol.for("react.block") : 60121, D = e ? Symbol.for("react.fundamental") : 60117, j = e ? Symbol.for("react.responder") : 60118, C = e ? Symbol.for("react.scope") : 60119;
2757
2767
  function y(u) {
2758
2768
  if (typeof u == "object" && u !== null) {
2759
2769
  var g = u.$$typeof;
@@ -2771,8 +2781,8 @@ function ks() {
2771
2781
  switch (u = u && u.$$typeof, u) {
2772
2782
  case l:
2773
2783
  case f:
2774
- case M:
2775
2784
  case S:
2785
+ case M:
2776
2786
  case c:
2777
2787
  return u;
2778
2788
  default:
@@ -2787,7 +2797,7 @@ function ks() {
2787
2797
  function b(u) {
2788
2798
  return y(u) === p;
2789
2799
  }
2790
- return ne.AsyncMode = d, ne.ConcurrentMode = p, ne.ContextConsumer = l, ne.ContextProvider = c, ne.Element = r, ne.ForwardRef = f, ne.Fragment = s, ne.Lazy = M, ne.Memo = S, ne.Portal = n, ne.Profiler = i, ne.StrictMode = a, ne.Suspense = h, ne.isAsyncMode = function(u) {
2800
+ return ne.AsyncMode = d, ne.ConcurrentMode = p, ne.ContextConsumer = l, ne.ContextProvider = c, ne.Element = r, ne.ForwardRef = f, ne.Fragment = s, ne.Lazy = S, ne.Memo = M, ne.Portal = n, ne.Profiler = i, ne.StrictMode = a, ne.Suspense = h, ne.isAsyncMode = function(u) {
2791
2801
  return b(u) || y(u) === d;
2792
2802
  }, ne.isConcurrentMode = b, ne.isContextConsumer = function(u) {
2793
2803
  return y(u) === l;
@@ -2800,9 +2810,9 @@ function ks() {
2800
2810
  }, ne.isFragment = function(u) {
2801
2811
  return y(u) === s;
2802
2812
  }, ne.isLazy = function(u) {
2803
- return y(u) === M;
2804
- }, ne.isMemo = function(u) {
2805
2813
  return y(u) === S;
2814
+ }, ne.isMemo = function(u) {
2815
+ return y(u) === M;
2806
2816
  }, ne.isPortal = function(u) {
2807
2817
  return y(u) === n;
2808
2818
  }, ne.isProfiler = function(u) {
@@ -2812,7 +2822,7 @@ function ks() {
2812
2822
  }, ne.isSuspense = function(u) {
2813
2823
  return y(u) === h;
2814
2824
  }, ne.isValidElementType = function(u) {
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);
2825
+ 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 === S || u.$$typeof === M || u.$$typeof === c || u.$$typeof === l || u.$$typeof === f || u.$$typeof === D || u.$$typeof === j || u.$$typeof === C || u.$$typeof === A);
2816
2826
  }, ne.typeOf = y, ne;
2817
2827
  }
2818
2828
  var se = {};
@@ -2827,10 +2837,10 @@ var se = {};
2827
2837
  var nr;
2828
2838
  function _s() {
2829
2839
  return nr || (nr = 1, process.env.NODE_ENV !== "production" && function() {
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;
2840
+ 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, M = e ? Symbol.for("react.memo") : 60115, S = e ? Symbol.for("react.lazy") : 60116, A = e ? Symbol.for("react.block") : 60121, D = e ? Symbol.for("react.fundamental") : 60117, j = e ? Symbol.for("react.responder") : 60118, C = e ? Symbol.for("react.scope") : 60119;
2831
2841
  function y(E) {
2832
2842
  return typeof E == "string" || typeof E == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
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);
2843
+ E === s || E === p || E === i || E === a || E === h || E === w || typeof E == "object" && E !== null && (E.$$typeof === S || E.$$typeof === M || E.$$typeof === c || E.$$typeof === l || E.$$typeof === f || E.$$typeof === D || E.$$typeof === j || E.$$typeof === C || E.$$typeof === A);
2834
2844
  }
2835
2845
  function b(E) {
2836
2846
  if (typeof E == "object" && E !== null) {
@@ -2851,8 +2861,8 @@ function _s() {
2851
2861
  switch (Y) {
2852
2862
  case l:
2853
2863
  case f:
2854
- case M:
2855
2864
  case S:
2865
+ case M:
2856
2866
  case c:
2857
2867
  return Y;
2858
2868
  default:
@@ -2864,7 +2874,7 @@ function _s() {
2864
2874
  }
2865
2875
  }
2866
2876
  }
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;
2877
+ var u = d, g = p, _ = l, x = c, R = r, F = f, z = s, k = S, N = M, G = n, ae = i, oe = a, ce = h, ee = !1;
2868
2878
  function ve(E) {
2869
2879
  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;
2870
2880
  }
@@ -2887,10 +2897,10 @@ function _s() {
2887
2897
  return b(E) === s;
2888
2898
  }
2889
2899
  function O(E) {
2890
- return b(E) === M;
2900
+ return b(E) === S;
2891
2901
  }
2892
2902
  function $(E) {
2893
- return b(E) === S;
2903
+ return b(E) === M;
2894
2904
  }
2895
2905
  function q(E) {
2896
2906
  return b(E) === n;
@@ -2904,7 +2914,7 @@ function _s() {
2904
2914
  function he(E) {
2905
2915
  return b(E) === h;
2906
2916
  }
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;
2917
+ se.AsyncMode = u, se.ConcurrentMode = g, se.ContextConsumer = _, se.ContextProvider = x, se.Element = R, se.ForwardRef = F, se.Fragment = z, 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;
2908
2918
  }()), se;
2909
2919
  }
2910
2920
  var sr;
@@ -3003,16 +3013,16 @@ function zs() {
3003
3013
  throw w.name = "Invariant Violation", w;
3004
3014
  }
3005
3015
  h = i[f](c, f, d, l, null, r);
3006
- } catch (M) {
3007
- h = M;
3016
+ } catch (S) {
3017
+ h = S;
3008
3018
  }
3009
3019
  if (h && !(h instanceof Error) && e(
3010
3020
  (d || "React class") + ": type specification of " + l + " `" + f + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof h + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
3011
3021
  ), h instanceof Error && !(h.message in n)) {
3012
3022
  n[h.message] = !0;
3013
- var S = p ? p() : "";
3023
+ var M = p ? p() : "";
3014
3024
  e(
3015
- "Failed " + l + " type: " + h.message + (S ?? "")
3025
+ "Failed " + l + " type: " + h.message + (M ?? "")
3016
3026
  );
3017
3027
  }
3018
3028
  }
@@ -3046,7 +3056,7 @@ function As() {
3046
3056
  if (typeof P == "function")
3047
3057
  return P;
3048
3058
  }
3049
- var w = "<<anonymous>>", S = {
3059
+ var w = "<<anonymous>>", M = {
3050
3060
  array: j("array"),
3051
3061
  bigint: j("bigint"),
3052
3062
  bool: j("boolean"),
@@ -3067,14 +3077,14 @@ function As() {
3067
3077
  shape: k,
3068
3078
  exact: N
3069
3079
  };
3070
- function M(v, P) {
3080
+ function S(v, P) {
3071
3081
  return v === P ? v !== 0 || 1 / v === 1 / P : v !== v && P !== P;
3072
3082
  }
3073
- function z(v, P) {
3083
+ function A(v, P) {
3074
3084
  this.message = v, this.data = P && typeof P == "object" ? P : {}, this.stack = "";
3075
3085
  }
3076
- z.prototype = Error.prototype;
3077
- function A(v) {
3086
+ A.prototype = Error.prototype;
3087
+ function D(v) {
3078
3088
  if (process.env.NODE_ENV !== "production")
3079
3089
  var P = {}, V = 0;
3080
3090
  function W(X, O, $, q, Z, U, he) {
@@ -3092,7 +3102,7 @@ function As() {
3092
3102
  ), P[me] = !0, V++);
3093
3103
  }
3094
3104
  }
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);
3105
+ return O[$] == null ? X ? O[$] === null ? new A("The " + Z + " `" + U + "` is marked as required " + ("in `" + q + "`, but its value is `null`.")) : new A("The " + Z + " `" + U + "` is marked as required in " + ("`" + q + "`, but its value is `undefined`.")) : null : v(O, $, q, Z, U);
3096
3106
  }
3097
3107
  var I = W.bind(null, !1);
3098
3108
  return I.isRequired = W.bind(null, !0), I;
@@ -3102,26 +3112,26 @@ function As() {
3102
3112
  var q = V[W], Z = oe(q);
3103
3113
  if (Z !== v) {
3104
3114
  var U = ce(q);
3105
- return new z(
3115
+ return new A(
3106
3116
  "Invalid " + X + " `" + O + "` of type " + ("`" + U + "` supplied to `" + I + "`, expected ") + ("`" + v + "`."),
3107
3117
  { expectedType: v }
3108
3118
  );
3109
3119
  }
3110
3120
  return null;
3111
3121
  }
3112
- return A(P);
3122
+ return D(P);
3113
3123
  }
3114
3124
  function C() {
3115
- return A(c);
3125
+ return D(c);
3116
3126
  }
3117
3127
  function y(v) {
3118
3128
  function P(V, W, I, X, O) {
3119
3129
  if (typeof v != "function")
3120
- return new z("Property `" + O + "` of component `" + I + "` has invalid PropType notation inside arrayOf.");
3130
+ return new A("Property `" + O + "` of component `" + I + "` has invalid PropType notation inside arrayOf.");
3121
3131
  var $ = V[W];
3122
3132
  if (!Array.isArray($)) {
3123
3133
  var q = oe($);
3124
- return new z("Invalid " + X + " `" + O + "` of type " + ("`" + q + "` supplied to `" + I + "`, expected an array."));
3134
+ return new A("Invalid " + X + " `" + O + "` of type " + ("`" + q + "` supplied to `" + I + "`, expected an array."));
3125
3135
  }
3126
3136
  for (var Z = 0; Z < $.length; Z++) {
3127
3137
  var U = v($, Z, I, X, O + "[" + Z + "]", n);
@@ -3130,39 +3140,39 @@ function As() {
3130
3140
  }
3131
3141
  return null;
3132
3142
  }
3133
- return A(P);
3143
+ return D(P);
3134
3144
  }
3135
3145
  function b() {
3136
3146
  function v(P, V, W, I, X) {
3137
3147
  var O = P[V];
3138
3148
  if (!l(O)) {
3139
3149
  var $ = oe(O);
3140
- return new z("Invalid " + I + " `" + X + "` of type " + ("`" + $ + "` supplied to `" + W + "`, expected a single ReactElement."));
3150
+ return new A("Invalid " + I + " `" + X + "` of type " + ("`" + $ + "` supplied to `" + W + "`, expected a single ReactElement."));
3141
3151
  }
3142
3152
  return null;
3143
3153
  }
3144
- return A(v);
3154
+ return D(v);
3145
3155
  }
3146
3156
  function u() {
3147
3157
  function v(P, V, W, I, X) {
3148
3158
  var O = P[V];
3149
3159
  if (!e.isValidElementType(O)) {
3150
3160
  var $ = oe(O);
3151
- return new z("Invalid " + I + " `" + X + "` of type " + ("`" + $ + "` supplied to `" + W + "`, expected a single ReactElement type."));
3161
+ return new A("Invalid " + I + " `" + X + "` of type " + ("`" + $ + "` supplied to `" + W + "`, expected a single ReactElement type."));
3152
3162
  }
3153
3163
  return null;
3154
3164
  }
3155
- return A(v);
3165
+ return D(v);
3156
3166
  }
3157
3167
  function g(v) {
3158
3168
  function P(V, W, I, X, O) {
3159
3169
  if (!(V[W] instanceof v)) {
3160
3170
  var $ = v.name || w, q = ve(V[W]);
3161
- return new z("Invalid " + X + " `" + O + "` of type " + ("`" + q + "` supplied to `" + I + "`, expected ") + ("instance of `" + $ + "`."));
3171
+ return new A("Invalid " + X + " `" + O + "` of type " + ("`" + q + "` supplied to `" + I + "`, expected ") + ("instance of `" + $ + "`."));
3162
3172
  }
3163
3173
  return null;
3164
3174
  }
3165
- return A(P);
3175
+ return D(P);
3166
3176
  }
3167
3177
  function _(v) {
3168
3178
  if (!Array.isArray(v))
@@ -3171,23 +3181,23 @@ function As() {
3171
3181
  ) : i("Invalid argument supplied to oneOf, expected an array.")), c;
3172
3182
  function P(V, W, I, X, O) {
3173
3183
  for (var $ = V[W], q = 0; q < v.length; q++)
3174
- if (M($, v[q]))
3184
+ if (S($, v[q]))
3175
3185
  return null;
3176
3186
  var Z = JSON.stringify(v, function(he, E) {
3177
3187
  var me = ce(E);
3178
3188
  return me === "symbol" ? String(E) : E;
3179
3189
  });
3180
- return new z("Invalid " + X + " `" + O + "` of value `" + String($) + "` " + ("supplied to `" + I + "`, expected one of " + Z + "."));
3190
+ return new A("Invalid " + X + " `" + O + "` of value `" + String($) + "` " + ("supplied to `" + I + "`, expected one of " + Z + "."));
3181
3191
  }
3182
- return A(P);
3192
+ return D(P);
3183
3193
  }
3184
3194
  function x(v) {
3185
3195
  function P(V, W, I, X, O) {
3186
3196
  if (typeof v != "function")
3187
- return new z("Property `" + O + "` of component `" + I + "` has invalid PropType notation inside objectOf.");
3197
+ return new A("Property `" + O + "` of component `" + I + "` has invalid PropType notation inside objectOf.");
3188
3198
  var $ = V[W], q = oe($);
3189
3199
  if (q !== "object")
3190
- return new z("Invalid " + X + " `" + O + "` of type " + ("`" + q + "` supplied to `" + I + "`, expected an object."));
3200
+ return new A("Invalid " + X + " `" + O + "` of type " + ("`" + q + "` supplied to `" + I + "`, expected an object."));
3191
3201
  for (var Z in $)
3192
3202
  if (s($, Z)) {
3193
3203
  var U = v($, Z, I, X, O + "." + Z, n);
@@ -3196,7 +3206,7 @@ function As() {
3196
3206
  }
3197
3207
  return null;
3198
3208
  }
3199
- return A(P);
3209
+ return D(P);
3200
3210
  }
3201
3211
  function R(v) {
3202
3212
  if (!Array.isArray(v))
@@ -3216,18 +3226,18 @@ function As() {
3216
3226
  E.data && s(E.data, "expectedType") && Z.push(E.data.expectedType);
3217
3227
  }
3218
3228
  var me = Z.length > 0 ? ", expected one of type [" + Z.join(", ") + "]" : "";
3219
- return new z("Invalid " + $ + " `" + q + "` supplied to " + ("`" + O + "`" + me + "."));
3229
+ return new A("Invalid " + $ + " `" + q + "` supplied to " + ("`" + O + "`" + me + "."));
3220
3230
  }
3221
- return A(W);
3231
+ return D(W);
3222
3232
  }
3223
3233
  function F() {
3224
3234
  function v(P, V, W, I, X) {
3225
- return G(P[V]) ? null : new z("Invalid " + I + " `" + X + "` supplied to " + ("`" + W + "`, expected a ReactNode."));
3235
+ return G(P[V]) ? null : new A("Invalid " + I + " `" + X + "` supplied to " + ("`" + W + "`, expected a ReactNode."));
3226
3236
  }
3227
- return A(v);
3237
+ return D(v);
3228
3238
  }
3229
- function D(v, P, V, W, I) {
3230
- return new z(
3239
+ function z(v, P, V, W, I) {
3240
+ return new A(
3231
3241
  (v || "React class") + ": " + P + " type `" + V + "." + W + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + I + "`."
3232
3242
  );
3233
3243
  }
@@ -3235,31 +3245,31 @@ function As() {
3235
3245
  function P(V, W, I, X, O) {
3236
3246
  var $ = V[W], q = oe($);
3237
3247
  if (q !== "object")
3238
- return new z("Invalid " + X + " `" + O + "` of type `" + q + "` " + ("supplied to `" + I + "`, expected `object`."));
3248
+ return new A("Invalid " + X + " `" + O + "` of type `" + q + "` " + ("supplied to `" + I + "`, expected `object`."));
3239
3249
  for (var Z in v) {
3240
3250
  var U = v[Z];
3241
3251
  if (typeof U != "function")
3242
- return D(I, X, O, Z, ce(U));
3252
+ return z(I, X, O, Z, ce(U));
3243
3253
  var he = U($, Z, I, X, O + "." + Z, n);
3244
3254
  if (he)
3245
3255
  return he;
3246
3256
  }
3247
3257
  return null;
3248
3258
  }
3249
- return A(P);
3259
+ return D(P);
3250
3260
  }
3251
3261
  function N(v) {
3252
3262
  function P(V, W, I, X, O) {
3253
3263
  var $ = V[W], q = oe($);
3254
3264
  if (q !== "object")
3255
- return new z("Invalid " + X + " `" + O + "` of type `" + q + "` " + ("supplied to `" + I + "`, expected `object`."));
3265
+ return new A("Invalid " + X + " `" + O + "` of type `" + q + "` " + ("supplied to `" + I + "`, expected `object`."));
3256
3266
  var Z = r({}, V[W], v);
3257
3267
  for (var U in Z) {
3258
3268
  var he = v[U];
3259
3269
  if (s(v, U) && typeof he != "function")
3260
- return D(I, X, O, U, ce(he));
3270
+ return z(I, X, O, U, ce(he));
3261
3271
  if (!he)
3262
- return new z(
3272
+ return new A(
3263
3273
  "Invalid " + X + " `" + O + "` key `" + U + "` supplied to `" + I + "`.\nBad object: " + JSON.stringify(V[W], null, " ") + `
3264
3274
  Valid keys: ` + JSON.stringify(Object.keys(v), null, " ")
3265
3275
  );
@@ -3269,7 +3279,7 @@ Valid keys: ` + JSON.stringify(Object.keys(v), null, " ")
3269
3279
  }
3270
3280
  return null;
3271
3281
  }
3272
- return A(P);
3282
+ return D(P);
3273
3283
  }
3274
3284
  function G(v) {
3275
3285
  switch (typeof v) {
@@ -3340,7 +3350,7 @@ Valid keys: ` + JSON.stringify(Object.keys(v), null, " ")
3340
3350
  function ve(v) {
3341
3351
  return !v.constructor || !v.constructor.name ? w : v.constructor.name;
3342
3352
  }
3343
- return S.checkPropTypes = a, S.resetWarningCache = a.resetWarningCache, S.PropTypes = S, S;
3353
+ return M.checkPropTypes = a, M.resetWarningCache = a.resetWarningCache, M.PropTypes = M, M;
3344
3354
  }, ht;
3345
3355
  }
3346
3356
  var pt, ur;
@@ -3430,11 +3440,11 @@ const K = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
3430
3440
  onDelete: h = () => null,
3431
3441
  onLayoutChange: w = () => {
3432
3442
  },
3433
- onRefresh: S,
3434
- onFileOpen: M = () => {
3443
+ onRefresh: M,
3444
+ onFileOpen: S = () => {
3435
3445
  },
3436
- onSelect: z,
3437
- onError: A = () => {
3446
+ onSelect: A,
3447
+ onError: D = () => {
3438
3448
  },
3439
3449
  layout: j = "grid",
3440
3450
  enableFilePreview: C = !0,
@@ -3446,24 +3456,24 @@ const K = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
3446
3456
  initialPath: x = "",
3447
3457
  filePreviewComponent: R,
3448
3458
  primaryColor: F = "#6155b4",
3449
- fontFamily: D = "Nunito Sans, sans-serif"
3459
+ fontFamily: z = "Nunito Sans, sans-serif"
3450
3460
  }) => {
3451
3461
  const k = Ls(), { containerRef: N, colSizes: G, isDragging: ae, handleMouseMove: oe, handleMouseUp: ce, handleMouseDown: ee } = Os(20, 80), ve = {
3452
- "--file-manager-font-family": D,
3462
+ "--file-manager-font-family": z,
3453
3463
  "--file-manager-primary-color": F,
3454
3464
  height: g,
3455
3465
  width: _
3456
3466
  };
3457
3467
  return /* @__PURE__ */ t.jsxs("main", { className: "file-explorer", onContextMenu: (v) => v.preventDefault(), style: ve, children: [
3458
3468
  /* @__PURE__ */ t.jsx(xt, { loading: n }),
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: [
3469
+ /* @__PURE__ */ t.jsx(zn, { filesData: e, onError: D, children: /* @__PURE__ */ t.jsx(Dn, { initialPath: x, children: /* @__PURE__ */ t.jsx(In, { onDownload: f, onSelect: A, children: /* @__PURE__ */ t.jsx($n, { onPaste: d, onCut: c, onCopy: l, children: /* @__PURE__ */ t.jsxs(_n, { layout: j, children: [
3460
3470
  /* @__PURE__ */ t.jsx(
3461
3471
  Sr,
3462
3472
  {
3463
3473
  allowCreateFolder: !0,
3464
3474
  allowUploadFile: !0,
3465
3475
  onLayoutChange: w,
3466
- onRefresh: S,
3476
+ onRefresh: M,
3467
3477
  triggerAction: k
3468
3478
  }
3469
3479
  ),
@@ -3476,7 +3486,7 @@ const K = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
3476
3486
  className: "files-container",
3477
3487
  children: [
3478
3488
  /* @__PURE__ */ t.jsxs("div", { className: "navigation-pane", style: { width: G.col1 + "%" }, children: [
3479
- /* @__PURE__ */ t.jsx(Or, {}),
3489
+ /* @__PURE__ */ t.jsx(Or, { onFileOpen: S }),
3480
3490
  /* @__PURE__ */ t.jsx(
3481
3491
  "div",
3482
3492
  {
@@ -3492,8 +3502,8 @@ const K = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
3492
3502
  {
3493
3503
  onCreateFolder: s,
3494
3504
  onRename: p,
3495
- onFileOpen: M,
3496
- onRefresh: S,
3505
+ onFileOpen: S,
3506
+ onRefresh: M,
3497
3507
  enableFilePreview: C,
3498
3508
  triggerAction: k
3499
3509
  }
@@ -3509,7 +3519,7 @@ const K = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
3509
3519
  onFileUploading: a,
3510
3520
  onFileUploaded: i,
3511
3521
  onDelete: h,
3512
- onRefresh: S,
3522
+ onRefresh: M,
3513
3523
  maxFileSize: y,
3514
3524
  filePreviewPath: b,
3515
3525
  filePreviewComponent: R,