@cubone/react-file-manager 1.20.0 → 1.20.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.
@@ -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";
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"), F = Symbol.iterator, z = "@@iterator";
44
44
  function A(o) {
45
45
  if (o === null || typeof o != "object")
46
46
  return null;
47
- var m = M && o[M] || o[z];
47
+ var m = F && o[F] || o[z];
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;
@@ -67,8 +67,8 @@ function hn() {
67
67
  }
68
68
  var b = !1, u = !1, g = !1, _ = !1, x = !1, R;
69
69
  R = Symbol.for("react.module.reference");
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
70
+ function S(o) {
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.
@@ -575,7 +575,7 @@ Check the top-level render call using <` + T + ">.");
575
575
  var Ot = {};
576
576
  function kt(o, m, T, B, re, ie) {
577
577
  {
578
- var Q = F(o);
578
+ var Q = S(o);
579
579
  if (!Q) {
580
580
  var J = "";
581
581
  (o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (J += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
@@ -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: F } = Je(), { activeLayout: z } = Se(), A = [
965
965
  {
966
966
  icon: /* @__PURE__ */ t.jsx(mr, { size: 17, strokeWidth: 0.3 }),
967
967
  text: "New folder",
@@ -995,18 +995,18 @@ const Be = (e = () => {
995
995
  }
996
996
  ];
997
997
  function C() {
998
- M(l);
998
+ F(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
  ] }),
@@ -1260,16 +1260,16 @@ 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, F] = L(!1), z = qn(), A = i ?? z, j = fe(), C = fe(), y = fe(null), [b, u] = L(null);
1264
1264
  rs(y);
1265
1265
  const g = `${l.collapsedHeight || 0}px`;
1266
1266
  function _(x) {
1267
1267
  if (!y.current)
1268
1268
  return;
1269
1269
  const R = y.current;
1270
- for (const F in x) {
1271
- const D = x[F];
1272
- D ? R.style[F] = D : R.style.removeProperty(F);
1270
+ for (const S in x) {
1271
+ const D = x[S];
1272
+ D ? R.style[S] = D : R.style.removeProperty(S);
1273
1273
  }
1274
1274
  }
1275
1275
  return ns(() => {
@@ -1279,18 +1279,18 @@ function ss({
1279
1279
  function R(k) {
1280
1280
  return A ? 0 : e ?? es(k);
1281
1281
  }
1282
- const F = (k) => `height ${R(k)}ms ${r}`, D = (k) => {
1282
+ const S = (k) => `height ${R(k)}ms ${r}`, D = (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")), F(!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 F(!0), f ? j.current = requestAnimationFrame(() => {
1294
1294
  d("expandStart"), _({
1295
1295
  display: "block",
1296
1296
  overflow: "hidden",
@@ -1298,13 +1298,13 @@ 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
+ D(R(k)), y.current && (y.current.style.transition = S(k), y.current.style.height = `${k}px`);
1302
1302
  });
1303
1303
  }) : j.current = requestAnimationFrame(() => {
1304
1304
  d("collapseStart");
1305
1305
  const k = Kt(y);
1306
1306
  D(R(k)), _({
1307
- transition: F(k),
1307
+ transition: S(k),
1308
1308
  height: `${k}px`
1309
1309
  }), j.current = requestAnimationFrame(() => {
1310
1310
  d("collapsing"), _({
@@ -1326,7 +1326,7 @@ 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: S, refKey: D, ...k } = {
1330
1330
  refKey: "ref",
1331
1331
  onClick() {
1332
1332
  },
@@ -1337,7 +1337,7 @@ function ss({
1337
1337
  "aria-controls": `react-collapsed-panel-${p}`,
1338
1338
  "aria-expanded": f,
1339
1339
  onClick(ee) {
1340
- R || (F == null || F(ee), h((ve) => !ve));
1340
+ R || (S == null || S(ee), h((ve) => !ve));
1341
1341
  },
1342
1342
  [D || "ref"]: Xt(G, u)
1343
1343
  }, oe = {
@@ -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: S } = { refKey: "ref", style: {}, ...x }, D = x == null ? void 0 : x[S || "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
+ [S || "ref"]: Xt(y, D),
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,7 +1475,7 @@ const kr = () => {
1475
1475
  }));
1476
1476
  }), s([]), i([]);
1477
1477
  }, [d]);
1478
- const M = (C) => {
1478
+ const F = (C) => {
1479
1479
  p(C);
1480
1480
  }, z = () => {
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);
@@ -1500,7 +1500,7 @@ const kr = () => {
1500
1500
  "span",
1501
1501
  {
1502
1502
  className: "folder-name",
1503
- onClick: () => M(C.path),
1503
+ onClick: () => F(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
+ F(C.path), l(!1);
1527
1527
  },
1528
1528
  children: C.name
1529
1529
  },
@@ -1596,7 +1596,7 @@ 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"), F = Be((g) => {
1600
1600
  g.preventDefault(), g.stopPropagation();
1601
1601
  }), { currentFolder: z, currentPathFiles: A, setCurrentPathFiles: j } = Ee(), { activeLayout: C } = Se(), y = (g) => {
1602
1602
  i(g.target.value), l(!1);
@@ -1618,28 +1618,28 @@ const Xe = (e) => ({
1618
1618
  }
1619
1619
  }, [c]);
1620
1620
  function u() {
1621
- var R, F;
1621
+ var R, S;
1622
1622
  let g = a.trim();
1623
1623
  const _ = A.filter((D) => !(D.key && D.key === r.key));
1624
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);
1625
+ p(`This destination already contains a folder named '${g}'.`), l(!0), (R = F.ref.current) == null || R.focus(), (S = F.ref.current) == null || S.select(), F.setIsClicked(!1);
1626
1626
  return;
1627
1627
  }
1628
1628
  g === "" && (g = _r("New Folder", !0, _)), Le(n, "onCreateFolder", g, z), j((D) => D.filter((k) => k.key !== r.key)), s.close();
1629
1629
  }
1630
1630
  return te(() => {
1631
1631
  var g, _, x;
1632
- 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");
1632
+ if ((g = F.ref.current) == null || g.focus(), (_ = F.ref.current) == null || _.select(), (x = F.ref) != null && x.current) {
1633
+ const k = e.current.getBoundingClientRect(), N = F.ref.current, G = N.getBoundingClientRect();
1634
+ k.right - G.left > 313 ? h("right") : h("left"), k.bottom - (G.top + N.clientHeight) > 88 ? M("bottom") : M("top");
1635
1635
  }
1636
1636
  }, []), te(() => {
1637
- M.isClicked && u();
1638
- }, [M.isClicked]), /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1637
+ F.isClicked && u();
1638
+ }, [F.isClicked]), /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1639
1639
  /* @__PURE__ */ t.jsx(
1640
1640
  Nr,
1641
1641
  {
1642
- nameInputRef: M.ref,
1642
+ nameInputRef: F.ref,
1643
1643
  maxLength: ls,
1644
1644
  value: a,
1645
1645
  onChange: y,
@@ -1701,7 +1701,7 @@ const Ar = ({
1701
1701
  }
1702
1702
  );
1703
1703
  }, _e = (e) => e.split(".").pop(), fs = 220, hs = ({ filesViewRef: e, file: r, onRename: n, triggerAction: s }) => {
1704
- const [a, i] = L(r == null ? void 0 : r.name), [c, l] = L(!1), [d, p] = L(!1), [f, h] = L(""), [w, S] = L("right"), [M, z] = L("bottom"), { currentPathFiles: A, setCurrentPathFiles: j } = Ee(), { activeLayout: C } = Se(), y = fe(null), b = Be((x) => {
1704
+ 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"), [F, z] = L("bottom"), { currentPathFiles: A, setCurrentPathFiles: j } = Ee(), { activeLayout: C } = Se(), y = fe(null), b = Be((x) => {
1705
1705
  var R;
1706
1706
  (R = y.current) != null && R.contains(x.target) || (x.preventDefault(), x.stopPropagation());
1707
1707
  }), u = (x) => {
@@ -1724,25 +1724,25 @@ const Ar = ({
1724
1724
  function g(x) {
1725
1725
  if (a === "" || a === r.name) {
1726
1726
  j(
1727
- (R) => R.map((F) => (F.key === r.key && (F.isEditing = !1), F))
1727
+ (R) => R.map((S) => (S.key === r.key && (S.isEditing = !1), S))
1728
1728
  ), s.close();
1729
1729
  return;
1730
1730
  } else if (A.some((R) => R.name === a)) {
1731
1731
  p(!0), h(`This destination already contains a folder named '${a}'.`), b.setIsClicked(!1);
1732
1732
  return;
1733
1733
  } else if (!r.isDirectory && !x) {
1734
- const R = _e(r.name), F = _e(a);
1735
- if (R !== F) {
1734
+ const R = _e(r.name), S = _e(a);
1735
+ if (R !== S) {
1736
1736
  l(!0);
1737
1737
  return;
1738
1738
  }
1739
1739
  }
1740
- p(!1), Le(n, "onRename", r, a), j((R) => R.filter((F) => F.key !== r.key)), s.close();
1740
+ p(!1), Le(n, "onRename", r, a), j((R) => R.filter((S) => S.key !== r.key)), s.close();
1741
1741
  }
1742
1742
  const _ = () => {
1743
- var x, R, F, D, k, N;
1743
+ var x, R, S, D, k, N;
1744
1744
  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();
1745
+ (D = (S = b.ref) == null ? void 0 : S.current) == null || D.select();
1746
1746
  else {
1747
1747
  const G = _e(r.name), ae = r.name.length - G.length - 1;
1748
1748
  (N = (k = b.ref) == null ? void 0 : k.current) == null || N.setSelectionRange(0, ae);
@@ -1752,7 +1752,7 @@ const Ar = ({
1752
1752
  var x;
1753
1753
  if (_(), (x = b.ref) != null && x.current) {
1754
1754
  const k = e.current.getBoundingClientRect(), N = b.ref.current, G = N.getBoundingClientRect();
1755
- k.right - G.left > 313 ? S("right") : S("left"), k.bottom - (G.top + N.clientHeight) > 88 ? z("bottom") : z("top");
1755
+ k.right - G.left > 313 ? M("right") : M("left"), k.bottom - (G.top + N.clientHeight) > 88 ? z("bottom") : z("top");
1756
1756
  }
1757
1757
  }, []), te(() => {
1758
1758
  b.isClicked && g(!1), _();
@@ -1776,7 +1776,7 @@ const Ar = ({
1776
1776
  {
1777
1777
  message: f,
1778
1778
  xPlacement: w,
1779
- yPlacement: M
1779
+ yPlacement: F
1780
1780
  }
1781
1781
  ),
1782
1782
  /* @__PURE__ */ t.jsx(
@@ -1864,8 +1864,8 @@ const Ar = ({
1864
1864
  setLastSelectedFile: f
1865
1865
  }) => {
1866
1866
  var he, E, me, Te;
1867
- const [h, w] = L(!1), [S, M] = L(0), [z, A] = L("hidden"), [j, C] = L(""), [y, b] = L(null), { activeLayout: u } = Se(), g = u === "grid" ? 48 : 20, _ = Xe(g), { setCurrentPath: x, currentPathFiles: R } = Ee(), { setSelectedFiles: F } = Fe(), { clipBoard: D, handleCutCopy: k, setClipBoard: N, handlePasting: G } = Je(), ae = fe(null), oe = Xe(it), ce = (D == null ? void 0 : D.isMoving) && D.files.find((Y) => Y.name === r.name && Y.path === r.path), ee = () => {
1868
- i(r), r.isDirectory ? (x(r.path), F([])) : a && d.show("previewFile");
1867
+ const [h, w] = L(!1), [M, F] = 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: S } = Fe(), { clipBoard: D, handleCutCopy: k, setClipBoard: N, handlePasting: G } = Je(), ae = fe(null), oe = Xe(it), ce = (D == null ? void 0 : D.isMoving) && D.files.find((Y) => Y.name === r.name && Y.path === r.path), ee = () => {
1868
+ i(r), r.isDirectory ? (x(r.path), S([])) : a && d.show("previewFile");
1869
1869
  }, ve = (Y, ue) => {
1870
1870
  if (l.length > 0 && Y) {
1871
1871
  let Ce = !1, Re = l[0], we = e;
@@ -1874,30 +1874,30 @@ const Ar = ({
1874
1874
  Re = we, we = Qe, Ce = !0;
1875
1875
  }
1876
1876
  const He = R.slice(Re, we + 1);
1877
- F(Ce ? He.reverse() : He);
1878
- } else l.length > 0 && ue ? F((Ce) => {
1877
+ S(Ce ? He.reverse() : He);
1878
+ } else l.length > 0 && ue ? S((Ce) => {
1879
1879
  const Re = Ce.filter((we) => we.path !== r.path);
1880
1880
  return Ce.length === Re.length ? [...Ce, r] : Re;
1881
- }) : F([r]);
1881
+ }) : S([r]);
1882
1882
  }, v = (Y) => {
1883
1883
  if (Y.stopPropagation(), r.isEditing) return;
1884
1884
  ve(Y.shiftKey, Y.ctrlKey);
1885
1885
  const ue = (/* @__PURE__ */ new Date()).getTime();
1886
- if (ue - S < 300) {
1886
+ if (ue - M < 300) {
1887
1887
  ee();
1888
1888
  return;
1889
1889
  }
1890
- M(ue);
1890
+ F(ue);
1891
1891
  }, P = (Y) => {
1892
- Y.key === "Enter" && (Y.stopPropagation(), F([r]), ee());
1892
+ Y.key === "Enter" && (Y.stopPropagation(), S([r]), ee());
1893
1893
  }, V = (Y) => {
1894
- Y.stopPropagation(), Y.preventDefault(), !r.isEditing && (h || F([r]), f(r), p(Y, !0));
1894
+ Y.stopPropagation(), Y.preventDefault(), !r.isEditing && (h || S([r]), f(r), p(Y, !0));
1895
1895
  }, W = () => {
1896
1896
  A("visible");
1897
1897
  }, I = () => {
1898
1898
  !h && A("hidden");
1899
1899
  }, X = (Y) => {
1900
- Y.target.checked ? F((ue) => [...ue, r]) : F((ue) => ue.filter((Ce) => Ce.name !== r.name && Ce.path !== r.path)), w(Y.target.checked);
1900
+ Y.target.checked ? S((ue) => [...ue, r]) : S((ue) => ue.filter((Ce) => Ce.name !== r.name && Ce.path !== r.path)), w(Y.target.checked);
1901
1901
  }, O = (Y) => {
1902
1902
  Y.dataTransfer.setDragImage(ae.current, 30, 50), Y.dataTransfer.effectAllowed = "copy", k(!0);
1903
1903
  }, $ = () => N(null), q = (Y) => {
@@ -1986,16 +1986,16 @@ const Ar = ({
1986
1986
  s.icon,
1987
1987
  /* @__PURE__ */ t.jsx("span", { children: s.title })
1988
1988
  ] }, s.title)) }), gs = ({ filesViewRef: e, contextMenuRef: r, menuItems: n, visible: s, clickPosition: a }) => {
1989
- const [i, c] = L(0), [l, d] = L(0), [p, f] = L(null), [h, w] = L("right"), S = 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`);
1989
+ const [i, c] = L(0), [l, d] = L(0), [p, f] = L(null), [h, w] = L("right"), M = fe(null), F = () => {
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, S = b.width - (R + u) > _, D = !S, k = C - b.top, N = b.height - k > x, G = !N;
1991
+ S ? (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
1992
  }, z = (j) => {
1993
1993
  j.preventDefault(), j.stopPropagation();
1994
1994
  }, A = (j) => {
1995
1995
  f(j);
1996
1996
  };
1997
1997
  if (te(() => {
1998
- s && r.current ? M() : (d(0), c(0), f(null));
1998
+ s && r.current ? F() : (d(0), c(0), f(null));
1999
1999
  }, [s]), s)
2000
2000
  return /* @__PURE__ */ t.jsx(
2001
2001
  "div",
@@ -2025,7 +2025,7 @@ const Ar = ({
2025
2025
  b && /* @__PURE__ */ t.jsx(
2026
2026
  ms,
2027
2027
  {
2028
- subMenuRef: S,
2028
+ subMenuRef: M,
2029
2029
  list: j.children,
2030
2030
  position: h
2031
2031
  }
@@ -2044,7 +2044,7 @@ function ys(e) {
2044
2044
  return H({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z" }, child: [] }] })(e);
2045
2045
  }
2046
2046
  const xs = (e, r, n) => {
2047
- const [s, a] = L([]), [i, c] = L(!1), [l, d] = L(!1), [p, f] = L({ clickX: 0, clickY: 0 }), [h, w] = L(null), { clipBoard: S, setClipBoard: M, handleCutCopy: z, handlePasting: A } = Je(), { selectedFiles: j, setSelectedFiles: C, handleDownload: y } = Fe(), { currentPath: b, setCurrentPath: u, currentPathFiles: g, setCurrentPathFiles: _ } = Ee(), { activeLayout: x, setActiveLayout: R } = Se(), F = () => {
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: M, setClipBoard: F, 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(), S = () => {
2048
2048
  h.isDirectory ? (u(h.path), a([]), C([])) : r && n.show("previewFile"), c(!1);
2049
2049
  }, D = (O) => {
2050
2050
  z(O), c(!1);
@@ -2057,7 +2057,7 @@ const xs = (e, r, n) => {
2057
2057
  }, ae = () => {
2058
2058
  c(!1), n.show("delete");
2059
2059
  }, oe = () => {
2060
- c(!1), Le(e, "onRefresh"), M(null);
2060
+ c(!1), Le(e, "onRefresh"), F(null);
2061
2061
  }, ce = () => {
2062
2062
  n.show("createFolder"), c(!1);
2063
2063
  }, ee = () => {
@@ -2115,7 +2115,7 @@ const xs = (e, r, n) => {
2115
2115
  {
2116
2116
  title: "Open",
2117
2117
  icon: h != null && h.isDirectory ? /* @__PURE__ */ t.jsx(ys, { size: 20 }) : /* @__PURE__ */ t.jsx(Ue, { size: 16 }),
2118
- onClick: F,
2118
+ onClick: S,
2119
2119
  divider: !0
2120
2120
  },
2121
2121
  {
@@ -2133,7 +2133,7 @@ const xs = (e, r, n) => {
2133
2133
  title: "Paste",
2134
2134
  icon: /* @__PURE__ */ t.jsx(mt, { size: 18 }),
2135
2135
  onClick: k,
2136
- className: `${S ? "" : "disable-paste"}`,
2136
+ className: `${M ? "" : "disable-paste"}`,
2137
2137
  hidden: !(h != null && h.isDirectory),
2138
2138
  divider: !0
2139
2139
  },
@@ -2229,13 +2229,13 @@ const xs = (e, r, n) => {
2229
2229
  selecCtxItems: f,
2230
2230
  handleContextMenu: h,
2231
2231
  unselectFiles: w,
2232
- visible: S,
2233
- setVisible: M,
2232
+ visible: M,
2233
+ setVisible: F,
2234
2234
  setLastSelectedFile: z,
2235
2235
  selectedFileIndexes: A,
2236
2236
  clickPosition: j,
2237
2237
  isSelectionCtx: C
2238
- } = xs(s, a, i), y = Be(() => M(!1));
2238
+ } = xs(s, a, i), y = Be(() => F(!1));
2239
2239
  return /* @__PURE__ */ t.jsxs(
2240
2240
  "div",
2241
2241
  {
@@ -2258,7 +2258,7 @@ const xs = (e, r, n) => {
2258
2258
  filesViewRef: l,
2259
2259
  selectedFileIndexes: A,
2260
2260
  handleContextMenu: h,
2261
- setVisible: M,
2261
+ setVisible: F,
2262
2262
  setLastSelectedFile: z
2263
2263
  },
2264
2264
  u
@@ -2269,8 +2269,8 @@ const xs = (e, r, n) => {
2269
2269
  filesViewRef: l,
2270
2270
  contextMenuRef: y.ref,
2271
2271
  menuItems: C ? f : p,
2272
- visible: S,
2273
- setVisible: M,
2272
+ visible: M,
2273
+ setVisible: F,
2274
2274
  clickPosition: j
2275
2275
  }
2276
2276
  )
@@ -2323,7 +2323,7 @@ const Ps = ({
2323
2323
  handleFileRemove: c
2324
2324
  }) => {
2325
2325
  var g, _, x, R;
2326
- const [l, d] = L(0), [p, f] = L(!1), [h, w] = L(!1), [S, M] = L(!1), z = Xe(33), A = fe(), { onError: j } = Ge(), C = (F) => {
2326
+ const [l, d] = L(0), [p, f] = L(!1), [h, w] = L(!1), [M, F] = L(!1), z = Xe(33), A = fe(), { onError: j } = Ge(), C = (S) => {
2327
2327
  d(0), s((k) => ({
2328
2328
  ...k,
2329
2329
  [e]: !1
@@ -2332,9 +2332,9 @@ const Ps = ({
2332
2332
  type: "upload",
2333
2333
  message: "Upload failed.",
2334
2334
  response: {
2335
- status: F.status,
2336
- statusText: F.statusText,
2337
- data: F.response
2335
+ status: S.status,
2336
+ statusText: S.statusText,
2337
+ data: S.response
2338
2338
  }
2339
2339
  };
2340
2340
  n(
@@ -2342,9 +2342,9 @@ const Ps = ({
2342
2342
  ...N,
2343
2343
  error: D.message
2344
2344
  } : N)
2345
- ), M(!0), j(D, r.file);
2346
- }, y = (F) => {
2347
- if (!F.error)
2345
+ ), F(!0), j(D, r.file);
2346
+ }, y = (S) => {
2347
+ if (!S.error)
2348
2348
  return new Promise((D, k) => {
2349
2349
  const N = new XMLHttpRequest();
2350
2350
  A.current = N, s((ee) => ({
@@ -2368,27 +2368,27 @@ const Ps = ({
2368
2368
  const ae = a == null ? void 0 : a.headers;
2369
2369
  for (let ee in ae)
2370
2370
  N.setRequestHeader(ee, ae[ee]);
2371
- const oe = new FormData(), ce = F == null ? void 0 : F.appendData;
2371
+ const oe = new FormData(), ce = S == null ? void 0 : S.appendData;
2372
2372
  for (let ee in ce)
2373
2373
  ce[ee] && oe.append(ee, ce[ee]);
2374
- oe.append("file", F.file), N.send(oe);
2374
+ oe.append("file", S.file), N.send(oe);
2375
2375
  });
2376
2376
  };
2377
2377
  te(() => {
2378
2378
  A.current || y(r);
2379
2379
  }, []);
2380
2380
  const b = () => {
2381
- A.current && (A.current.abort(), s((F) => ({
2382
- ...F,
2381
+ A.current && (A.current.abort(), s((S) => ({
2382
+ ...S,
2383
2383
  [e]: !1
2384
2384
  })), w(!0), d(0));
2385
2385
  }, u = () => {
2386
2386
  r != null && r.file && (n(
2387
- (F) => F.map((D, k) => e === k ? {
2387
+ (S) => S.map((D, k) => e === k ? {
2388
2388
  ...D,
2389
2389
  error: !1
2390
2390
  } : D)
2391
- ), y({ ...r, error: !1 }), w(!1), M(!1));
2391
+ ), y({ ...r, error: !1 }), w(!1), F(!1));
2392
2392
  };
2393
2393
  return r.removed ? null : /* @__PURE__ */ t.jsxs("li", { children: [
2394
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 }) }),
@@ -2398,7 +2398,7 @@ const Ps = ({
2398
2398
  /* @__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
2399
  /* @__PURE__ */ t.jsx("span", { className: "file-size", children: Ze((R = r.file) == null ? void 0 : R.size) })
2400
2400
  ] }),
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(
2401
+ 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
2402
  "div",
2403
2403
  {
2404
2404
  className: "rm-file",
@@ -2426,8 +2426,8 @@ const Ps = ({
2426
2426
  onFileUploading: s,
2427
2427
  onFileUploaded: a
2428
2428
  }) => {
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();
2429
+ const [i, c] = L([]), [l, d] = L(!1), [p, f] = L({}), { currentFolder: h, currentPathFiles: w } = Ee(), { onError: M } = Ge(), F = fe(null), z = (u) => {
2430
+ u.key === "Enter" && F.current.click();
2431
2431
  }, A = (u) => {
2432
2432
  if (n && !n.includes(_e(u.name)))
2433
2433
  return "File type is not allowed.";
@@ -2441,7 +2441,7 @@ const Ps = ({
2441
2441
  ), u.length > 0) {
2442
2442
  const g = u.map((_) => {
2443
2443
  const x = s(_, h), R = A(_);
2444
- return R && S({ type: "upload", message: R }, _), {
2444
+ return R && M({ type: "upload", message: R }, _), {
2445
2445
  file: _,
2446
2446
  appendData: x,
2447
2447
  ...R && { error: R }
@@ -2486,7 +2486,7 @@ const Ps = ({
2486
2486
  /* @__PURE__ */ t.jsx(
2487
2487
  "input",
2488
2488
  {
2489
- ref: M,
2489
+ ref: F,
2490
2490
  type: "file",
2491
2491
  id: "chooseFile",
2492
2492
  className: "choose-file-input",
@@ -2518,15 +2518,15 @@ const Ps = ({
2518
2518
  ] })
2519
2519
  ] });
2520
2520
  }, 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(
2521
+ var F;
2522
+ const [n, s] = L(!0), [a, i] = L(!1), { selectedFiles: c } = Fe(), l = Xe(73), d = (F = _e(c[0].name)) == null ? void 0 : F.toLowerCase(), p = `${e}${c[0].path}`, f = yt(
2523
2523
  () => r == null ? void 0 : r(c[0]),
2524
2524
  [r]
2525
2525
  ), h = () => {
2526
2526
  s(!1), i(!1);
2527
2527
  }, w = () => {
2528
2528
  s(!1), i(!0);
2529
- }, S = () => {
2529
+ }, M = () => {
2530
2530
  window.location.href = p;
2531
2531
  };
2532
2532
  return Pe.isValidElement(f) ? f : /* @__PURE__ */ t.jsxs("section", { className: `file-previewer ${d === "pdf" ? "pdf-previewer" : ""}`, children: [
@@ -2543,7 +2543,7 @@ const Ps = ({
2543
2543
  c[0].size && /* @__PURE__ */ t.jsx("span", { children: "-" }),
2544
2544
  /* @__PURE__ */ t.jsx("span", { className: "file-size", children: Ze(c[0].size) })
2545
2545
  ] }),
2546
- /* @__PURE__ */ t.jsx(Ne, { onClick: S, padding: "0.45rem .9rem", children: /* @__PURE__ */ t.jsxs("div", { className: "download-btn", children: [
2546
+ /* @__PURE__ */ t.jsx(Ne, { onClick: M, padding: "0.45rem .9rem", children: /* @__PURE__ */ t.jsxs("div", { className: "download-btn", children: [
2547
2547
  /* @__PURE__ */ t.jsx(jt, { size: 18 }),
2548
2548
  /* @__PURE__ */ t.jsx("span", { children: "Download" })
2549
2549
  ] }) })
@@ -2618,9 +2618,9 @@ const Ps = ({
2618
2618
  e.show("uploadFile");
2619
2619
  }, w = () => {
2620
2620
  s(!0);
2621
- }, S = () => {
2622
- s(!1);
2623
2621
  }, M = () => {
2622
+ s(!1);
2623
+ }, F = () => {
2624
2624
  a(i);
2625
2625
  }, z = () => {
2626
2626
  e.show("rename");
@@ -2643,7 +2643,7 @@ const Ps = ({
2643
2643
  }, x = () => {
2644
2644
  p("list");
2645
2645
  };
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);
2646
+ 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, F, 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);
2647
2647
  }, Ms = ({
2648
2648
  fileUploadConfig: e,
2649
2649
  onFileUploading: r,
@@ -2658,7 +2658,7 @@ const Ps = ({
2658
2658
  }) => {
2659
2659
  const [f, h] = L(null), { selectedFiles: w } = Fe();
2660
2660
  Ss(p, a);
2661
- const S = {
2661
+ const M = {
2662
2662
  uploadFile: {
2663
2663
  title: "Upload",
2664
2664
  component: /* @__PURE__ */ t.jsx(
@@ -2692,8 +2692,8 @@ const Ps = ({
2692
2692
  };
2693
2693
  if (te(() => {
2694
2694
  if (p.isActive) {
2695
- const M = p.actionType;
2696
- M === "previewFile" && (S[M].title = (w == null ? void 0 : w.name) ?? "Preview"), h(S[M]);
2695
+ const F = p.actionType;
2696
+ F === "previewFile" && (M[F].title = (w == null ? void 0 : w.name) ?? "Preview"), h(M[F]);
2697
2697
  } else
2698
2698
  h(null);
2699
2699
  }, [p.isActive]), f)
@@ -2735,8 +2735,8 @@ const Ps = ({
2735
2735
  handleMouseMove: (f) => {
2736
2736
  if (!a) return;
2737
2737
  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 });
2738
+ const w = c.current.getBoundingClientRect(), M = (f.clientX - w.left) / w.width * 100;
2739
+ M >= 15 && M <= 60 && s({ col1: M, col2: 100 - M });
2740
2740
  }
2741
2741
  };
2742
2742
  };
@@ -2753,7 +2753,7 @@ var rr;
2753
2753
  function ks() {
2754
2754
  if (rr) return ne;
2755
2755
  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;
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, M = e ? Symbol.for("react.memo") : 60115, F = 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;
2757
2757
  function y(u) {
2758
2758
  if (typeof u == "object" && u !== null) {
2759
2759
  var g = u.$$typeof;
@@ -2771,8 +2771,8 @@ function ks() {
2771
2771
  switch (u = u && u.$$typeof, u) {
2772
2772
  case l:
2773
2773
  case f:
2774
+ case F:
2774
2775
  case M:
2775
- case S:
2776
2776
  case c:
2777
2777
  return u;
2778
2778
  default:
@@ -2787,7 +2787,7 @@ function ks() {
2787
2787
  function b(u) {
2788
2788
  return y(u) === p;
2789
2789
  }
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) {
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 = F, ne.Memo = M, ne.Portal = n, ne.Profiler = i, ne.StrictMode = a, ne.Suspense = h, ne.isAsyncMode = function(u) {
2791
2791
  return b(u) || y(u) === d;
2792
2792
  }, ne.isConcurrentMode = b, ne.isContextConsumer = function(u) {
2793
2793
  return y(u) === l;
@@ -2800,9 +2800,9 @@ function ks() {
2800
2800
  }, ne.isFragment = function(u) {
2801
2801
  return y(u) === s;
2802
2802
  }, ne.isLazy = function(u) {
2803
- return y(u) === M;
2803
+ return y(u) === F;
2804
2804
  }, ne.isMemo = function(u) {
2805
- return y(u) === S;
2805
+ return y(u) === M;
2806
2806
  }, ne.isPortal = function(u) {
2807
2807
  return y(u) === n;
2808
2808
  }, ne.isProfiler = function(u) {
@@ -2812,7 +2812,7 @@ function ks() {
2812
2812
  }, ne.isSuspense = function(u) {
2813
2813
  return y(u) === h;
2814
2814
  }, 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);
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 === F || u.$$typeof === M || u.$$typeof === c || u.$$typeof === l || u.$$typeof === f || u.$$typeof === A || u.$$typeof === j || u.$$typeof === C || u.$$typeof === z);
2816
2816
  }, ne.typeOf = y, ne;
2817
2817
  }
2818
2818
  var se = {};
@@ -2827,10 +2827,10 @@ var se = {};
2827
2827
  var nr;
2828
2828
  function _s() {
2829
2829
  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;
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, M = e ? Symbol.for("react.memo") : 60115, F = 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;
2831
2831
  function y(E) {
2832
2832
  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);
2833
+ E === s || E === p || E === i || E === a || E === h || E === w || typeof E == "object" && E !== null && (E.$$typeof === F || E.$$typeof === M || E.$$typeof === c || E.$$typeof === l || E.$$typeof === f || E.$$typeof === A || E.$$typeof === j || E.$$typeof === C || E.$$typeof === z);
2834
2834
  }
2835
2835
  function b(E) {
2836
2836
  if (typeof E == "object" && E !== null) {
@@ -2851,8 +2851,8 @@ function _s() {
2851
2851
  switch (Y) {
2852
2852
  case l:
2853
2853
  case f:
2854
+ case F:
2854
2855
  case M:
2855
- case S:
2856
2856
  case c:
2857
2857
  return Y;
2858
2858
  default:
@@ -2864,7 +2864,7 @@ function _s() {
2864
2864
  }
2865
2865
  }
2866
2866
  }
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;
2867
+ var u = d, g = p, _ = l, x = c, R = r, S = f, D = s, k = F, N = M, G = n, ae = i, oe = a, ce = h, ee = !1;
2868
2868
  function ve(E) {
2869
2869
  return ee || (ee = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), v(E) || b(E) === d;
2870
2870
  }
@@ -2887,10 +2887,10 @@ function _s() {
2887
2887
  return b(E) === s;
2888
2888
  }
2889
2889
  function O(E) {
2890
- return b(E) === M;
2890
+ return b(E) === F;
2891
2891
  }
2892
2892
  function $(E) {
2893
- return b(E) === S;
2893
+ return b(E) === M;
2894
2894
  }
2895
2895
  function q(E) {
2896
2896
  return b(E) === n;
@@ -2904,7 +2904,7 @@ function _s() {
2904
2904
  function he(E) {
2905
2905
  return b(E) === h;
2906
2906
  }
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;
2907
+ se.AsyncMode = u, se.ConcurrentMode = g, se.ContextConsumer = _, se.ContextProvider = x, se.Element = R, se.ForwardRef = S, 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;
2908
2908
  }()), se;
2909
2909
  }
2910
2910
  var sr;
@@ -3003,16 +3003,16 @@ function zs() {
3003
3003
  throw w.name = "Invariant Violation", w;
3004
3004
  }
3005
3005
  h = i[f](c, f, d, l, null, r);
3006
- } catch (M) {
3007
- h = M;
3006
+ } catch (F) {
3007
+ h = F;
3008
3008
  }
3009
3009
  if (h && !(h instanceof Error) && e(
3010
3010
  (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
3011
  ), h instanceof Error && !(h.message in n)) {
3012
3012
  n[h.message] = !0;
3013
- var S = p ? p() : "";
3013
+ var M = p ? p() : "";
3014
3014
  e(
3015
- "Failed " + l + " type: " + h.message + (S ?? "")
3015
+ "Failed " + l + " type: " + h.message + (M ?? "")
3016
3016
  );
3017
3017
  }
3018
3018
  }
@@ -3046,7 +3046,7 @@ function As() {
3046
3046
  if (typeof P == "function")
3047
3047
  return P;
3048
3048
  }
3049
- var w = "<<anonymous>>", S = {
3049
+ var w = "<<anonymous>>", M = {
3050
3050
  array: j("array"),
3051
3051
  bigint: j("bigint"),
3052
3052
  bool: j("boolean"),
@@ -3060,14 +3060,14 @@ function As() {
3060
3060
  element: b(),
3061
3061
  elementType: u(),
3062
3062
  instanceOf: g,
3063
- node: F(),
3063
+ node: S(),
3064
3064
  objectOf: x,
3065
3065
  oneOf: _,
3066
3066
  oneOfType: R,
3067
3067
  shape: k,
3068
3068
  exact: N
3069
3069
  };
3070
- function M(v, P) {
3070
+ function F(v, P) {
3071
3071
  return v === P ? v !== 0 || 1 / v === 1 / P : v !== v && P !== P;
3072
3072
  }
3073
3073
  function z(v, P) {
@@ -3171,7 +3171,7 @@ function As() {
3171
3171
  ) : i("Invalid argument supplied to oneOf, expected an array.")), c;
3172
3172
  function P(V, W, I, X, O) {
3173
3173
  for (var $ = V[W], q = 0; q < v.length; q++)
3174
- if (M($, v[q]))
3174
+ if (F($, v[q]))
3175
3175
  return null;
3176
3176
  var Z = JSON.stringify(v, function(he, E) {
3177
3177
  var me = ce(E);
@@ -3220,7 +3220,7 @@ function As() {
3220
3220
  }
3221
3221
  return A(W);
3222
3222
  }
3223
- function F() {
3223
+ function S() {
3224
3224
  function v(P, V, W, I, X) {
3225
3225
  return G(P[V]) ? null : new z("Invalid " + I + " `" + X + "` supplied to " + ("`" + W + "`, expected a ReactNode."));
3226
3226
  }
@@ -3340,7 +3340,7 @@ Valid keys: ` + JSON.stringify(Object.keys(v), null, " ")
3340
3340
  function ve(v) {
3341
3341
  return !v.constructor || !v.constructor.name ? w : v.constructor.name;
3342
3342
  }
3343
- return S.checkPropTypes = a, S.resetWarningCache = a.resetWarningCache, S.PropTypes = S, S;
3343
+ return M.checkPropTypes = a, M.resetWarningCache = a.resetWarningCache, M.PropTypes = M, M;
3344
3344
  }, ht;
3345
3345
  }
3346
3346
  var pt, ur;
@@ -3430,8 +3430,8 @@ const K = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
3430
3430
  onDelete: h = () => null,
3431
3431
  onLayoutChange: w = () => {
3432
3432
  },
3433
- onRefresh: S,
3434
- onFileOpen: M = () => {
3433
+ onRefresh: M,
3434
+ onFileOpen: F = () => {
3435
3435
  },
3436
3436
  onSelect: z,
3437
3437
  onError: A = () => {
@@ -3445,12 +3445,12 @@ const K = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
3445
3445
  width: _ = "100%",
3446
3446
  initialPath: x = "",
3447
3447
  filePreviewComponent: R,
3448
- primaryColor: F = "#6155b4",
3448
+ primaryColor: S = "#6155b4",
3449
3449
  fontFamily: D = "Nunito Sans, sans-serif"
3450
3450
  }) => {
3451
3451
  const k = Ls(), { containerRef: N, colSizes: G, isDragging: ae, handleMouseMove: oe, handleMouseUp: ce, handleMouseDown: ee } = Os(20, 80), ve = {
3452
3452
  "--file-manager-font-family": D,
3453
- "--file-manager-primary-color": F,
3453
+ "--file-manager-primary-color": S,
3454
3454
  height: g,
3455
3455
  width: _
3456
3456
  };
@@ -3463,7 +3463,7 @@ const K = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
3463
3463
  allowCreateFolder: !0,
3464
3464
  allowUploadFile: !0,
3465
3465
  onLayoutChange: w,
3466
- onRefresh: S,
3466
+ onRefresh: M,
3467
3467
  triggerAction: k
3468
3468
  }
3469
3469
  ),
@@ -3476,7 +3476,7 @@ const K = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
3476
3476
  className: "files-container",
3477
3477
  children: [
3478
3478
  /* @__PURE__ */ t.jsxs("div", { className: "navigation-pane", style: { width: G.col1 + "%" }, children: [
3479
- /* @__PURE__ */ t.jsx(Or, {}),
3479
+ /* @__PURE__ */ t.jsx(Or, { onFileOpen: F }),
3480
3480
  /* @__PURE__ */ t.jsx(
3481
3481
  "div",
3482
3482
  {
@@ -3492,8 +3492,8 @@ const K = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
3492
3492
  {
3493
3493
  onCreateFolder: s,
3494
3494
  onRename: p,
3495
- onFileOpen: M,
3496
- onRefresh: S,
3495
+ onFileOpen: F,
3496
+ onRefresh: M,
3497
3497
  enableFilePreview: C,
3498
3498
  triggerAction: k
3499
3499
  }
@@ -3509,7 +3509,7 @@ const K = /* @__PURE__ */ dn(Bs), Hs = (e, r, n) => {
3509
3509
  onFileUploading: a,
3510
3510
  onFileUploaded: i,
3511
3511
  onDelete: h,
3512
- onRefresh: S,
3512
+ onRefresh: M,
3513
3513
  maxFileSize: y,
3514
3514
  filePreviewPath: b,
3515
3515
  filePreviewComponent: R,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cubone/react-file-manager",
3
3
  "private": false,
4
- "version": "1.20.0",
4
+ "version": "1.20.1",
5
5
  "type": "module",
6
6
  "module": "dist/react-file-manager.es.js",
7
7
  "files": [