filecat 4.7.1 → 4.8.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.
Files changed (55) hide show
  1. package/README.md +6 -8
  2. package/build/dist/119.fd4c07b339f4d395a6c6.js +2 -0
  3. package/build/dist/133.c9ea491c9e86447ed7ad.js +1 -0
  4. package/build/dist/29.295d812bf555f011d87a.js +2 -0
  5. package/build/dist/349.d6093d2d681e79e1291f.js +2 -0
  6. package/build/dist/{868.1e86eb72328fa1bdc261.js.LICENSE.txt → 349.d6093d2d681e79e1291f.js.LICENSE.txt} +1 -1
  7. package/build/dist/432.6c5d252be9dc90e332c1.js +2 -0
  8. package/build/dist/{441.9e51a6055ce7fb8f8ea4.js → 441.c6afbf2da36cec614c74.js} +2 -2
  9. package/build/dist/{502.779cee91ac6ead6dc4ea.js → 502.8b581e7886286567121e.js} +2 -2
  10. package/build/dist/523.fab29a675d29b4dfc487.js +2 -0
  11. package/build/dist/567.7895842c9e84fb726817.js +2 -0
  12. package/build/dist/757.3cebefde7338977ef706.js +1 -0
  13. package/build/dist/859.b7ddfa663ba2c84040a7.js +2 -0
  14. package/build/dist/{859.f38e42e308fe8117d239.js.LICENSE.txt → 859.b7ddfa663ba2c84040a7.js.LICENSE.txt} +1 -1
  15. package/build/dist/874.1fc3e6f65b12ea4bbb8d.js +2 -0
  16. package/build/dist/903.cfe48ce0615b1410ade8.js +1 -0
  17. package/build/dist/{943.e0ce78fe8027d57e8bdb.js → 943.a520601861a7076149fe.js} +2 -2
  18. package/build/dist/966.8e08be62957009fa240a.js +2 -0
  19. package/build/dist/index.html +1 -1
  20. package/build/dist/main.f6ebbb770ea3dd09cea4.js +2 -0
  21. package/build/dist/{main.87f0ba91a22cb6dfb881.js.LICENSE.txt → main.f6ebbb770ea3dd09cea4.js.LICENSE.txt} +3 -3
  22. package/build/main.js +1 -227
  23. package/build/main.js.LICENSE.txt +8 -7
  24. package/package.json +2 -2
  25. package/shell/build.js +1 -1
  26. package/shell/config/prebuild-file-path.js +17 -17
  27. package/shell/config/webpack.exe.config.js +1 -1
  28. package/shell/config/webpack.npm.config.js +1 -1
  29. package/shell/config/webpack.worker.get.js +1 -1
  30. package/shell/docker-build.sh +2 -2
  31. package/shell/filecat +1 -1
  32. package/shell/start/run.sh +2 -2
  33. package/build/dist/133.bfcc2466b32bbf88b9ed.js +0 -1
  34. package/build/dist/29.54ccdc8bd1fb82e6dfa1.js +0 -2
  35. package/build/dist/305.af57fdf7dda19f5bef59.js +0 -2
  36. package/build/dist/432.18fa83104eda5c17d342.js +0 -2
  37. package/build/dist/523.d50711dd73ff748dbd8d.js +0 -2
  38. package/build/dist/567.da732c8e40401f8dc477.js +0 -2
  39. package/build/dist/757.e79149e4824bdd6044d7.js +0 -1
  40. package/build/dist/859.f38e42e308fe8117d239.js +0 -2
  41. package/build/dist/868.1e86eb72328fa1bdc261.js +0 -2
  42. package/build/dist/874.65c53193302161627183.js +0 -2
  43. package/build/dist/903.9d8c331bab074bde9b94.js +0 -1
  44. package/build/dist/966.9954cbc5460dc32fbed0.js +0 -2
  45. package/build/dist/main.87f0ba91a22cb6dfb881.js +0 -2
  46. /package/build/dist/{29.54ccdc8bd1fb82e6dfa1.js.LICENSE.txt → 119.fd4c07b339f4d395a6c6.js.LICENSE.txt} +0 -0
  47. /package/build/dist/{305.af57fdf7dda19f5bef59.js.LICENSE.txt → 29.295d812bf555f011d87a.js.LICENSE.txt} +0 -0
  48. /package/build/dist/{432.18fa83104eda5c17d342.js.LICENSE.txt → 432.6c5d252be9dc90e332c1.js.LICENSE.txt} +0 -0
  49. /package/build/dist/{441.9e51a6055ce7fb8f8ea4.js.LICENSE.txt → 441.c6afbf2da36cec614c74.js.LICENSE.txt} +0 -0
  50. /package/build/dist/{502.779cee91ac6ead6dc4ea.js.LICENSE.txt → 502.8b581e7886286567121e.js.LICENSE.txt} +0 -0
  51. /package/build/dist/{523.d50711dd73ff748dbd8d.js.LICENSE.txt → 523.fab29a675d29b4dfc487.js.LICENSE.txt} +0 -0
  52. /package/build/dist/{567.da732c8e40401f8dc477.js.LICENSE.txt → 567.7895842c9e84fb726817.js.LICENSE.txt} +0 -0
  53. /package/build/dist/{874.65c53193302161627183.js.LICENSE.txt → 874.1fc3e6f65b12ea4bbb8d.js.LICENSE.txt} +0 -0
  54. /package/build/dist/{943.e0ce78fe8027d57e8bdb.js.LICENSE.txt → 943.a520601861a7076149fe.js.LICENSE.txt} +0 -0
  55. /package/build/dist/{966.9954cbc5460dc32fbed0.js.LICENSE.txt → 966.8e08be62957009fa240a.js.LICENSE.txt} +0 -0
package/README.md CHANGED
@@ -1,23 +1,22 @@
1
1
 
2
2
  # ![](./src/web/meta/resources/img/logo-70.png) FileCat
3
3
 
4
- FileCat is a **web-based server management** tool. It offers features like file management, large-scale log viewing, remote terminal access, system process monitoring, and various network proxies including SSH, RDP, HTTP, and TCP.
4
+ FileCat 是一个基于 Web 的服务器管理工具,集成了文件管理、超大日志查看、远程终端访问、系统进程监控,以及包括 VPN、SSHRDPHTTP、TCP 等多种网络代理功能。
5
5
 
6
- FileCat 是一个基于web的**服务器管理**工具。提供文件管理、超大日志查看、远程终端、系统进程监控,vpn、ssh\rdp\http\tcp各种网络代理等功能。
6
+ FileCat is a web-based server management platform that provides file management, large-scale log viewing, remote terminal access, process monitoring, and various network proxies including VPN, SSH, RDP, HTTP, and TCP.
7
7
 
8
-
9
- ## Install
8
+ ## 安装方式 / Installation
10
9
  不同的安装方式请参考: https://filecat.xiaobaidadada.fun/#/zh-CN/install.md
11
10
 
12
11
  English: https://filecat.xiaobaidadada.fun/#/en/install.md
13
12
 
14
13
 
15
- ## Detailed Features
14
+ ## 功能概览 / Features
16
15
  详细的功能特性请参考文档: https://filecat.xiaobaidadada.fun/
17
16
 
18
17
  备用地址:https://docs.filecat.xiaobaidadada.fun/
19
18
 
20
- ## Demo Experience
19
+ ## 在线演示 / Demo
21
20
  url: http://demo.filecat.xiaobaidadada.fun:5569/
22
21
 
23
22
  账号密码: `admin`/`admin`
@@ -35,8 +34,7 @@ english account: `en_admin`/`en_admin`
35
34
  ## qq群
36
35
  824838674
37
36
  ## Thanks
38
- Some features of this project are based on or inspired by the following projects.
39
-
37
+ 以下项目为 FileCat 提供了灵感或基础
40
38
 
41
39
  - [filebrowser](https://github.com/filebrowser/filebrowser)
42
40
  - [MeshCentral](https://github.com/Ylianst/MeshCentral)
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 119.fd4c07b339f4d395a6c6.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[119],{1251:(t,e,r)=>{r.d(e,{s:()=>f});var n=r(2635),o=1,i=60*o,a=24*i,c=30*a,u=365*a,l=6e4;function f(t){t=t>1e12?t:1e3*t;var e=Date.now(),r=Math.abs(e-t)/l;return r<o?n.Ay.t("小于一分钟"):r<i?"".concat(r.toFixed(0)).concat(n.Ay.t("分钟前")):r<a?"".concat((r/i).toFixed(0)).concat(n.Ay.t("小时前")):r<c?"".concat((r/a).toFixed(0)).concat(n.Ay.t("天前")):r<u?"".concat((r/c).toFixed(0)).concat(n.Ay.t("月前")):"".concat((r/u).toFixed(0)).concat(n.Ay.t("年前"))}},5726:(t,e,r)=>{function n(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return o(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){u=!0,a=t},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw a}}}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function i(t){return new Promise((function(e){var r=0,o=[];if(void 0!==t.items){var i,a=n(t.items);try{for(a.s();!(i=a.n()).done;){var c=i.value;if("file"===c.kind&&"function"==typeof c.webkitGetAsEntry)u(c.webkitGetAsEntry())}}catch(t){a.e(t)}finally{a.f()}}else e(t.files);function u(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(t.isFile)r++,t.file((function(t){r--,t.fullPath="".concat(n).concat(t.name),o.push(t),0===r&&e(o)}));else if(t.isDirectory){var i={isDir:!0,size:0,fullPath:"".concat(n).concat(t.name),name:t.name};o.push(i),l(t.createReader(),"".concat(n).concat(t.name))}}function l(t,i){r++,t.readEntries((function(a){if(r--,a.length>0){var c,f=n(a);try{for(f.s();!(c=f.n()).done;){u(c.value,"".concat(i,"/"))}}catch(t){f.e(t)}finally{f.f()}l(t,"".concat(i,"/"))}0===r&&e(o)}))}}))}function a(t){return new Promise((function(e,r){var n=document.createElement("script");n.src=t,n.async=!0,n.onload=function(){e(null),console.log("脚本加载完成")},n.onerror=function(){r(r),console.error("脚本加载失败")},document.body.appendChild(n)}))}r.d(e,{J:()=>a,T:()=>i})},8844:(t,e,r)=>{r.d(e,{B:()=>g});var n=r(6540),o=r(7022),i=r(7444),a=r(4694),c=r(6417),u=r(6007);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function f(){return f=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},f.apply(null,arguments)}function s(t){return function(t){if(Array.isArray(t))return v(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||m(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(){h=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),c=new I(n||[]);return o(a,"_invoke",{value:j(t,r,c)}),a}function y(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",d="suspendedYield",m="executing",v="completed",g={};function b(){}function w(){}function E(){}var x={};f(x,a,(function(){return this}));var L=Object.getPrototypeOf,A=L&&L(L(N([])));A&&A!==r&&n.call(A,a)&&(x=A);var k=E.prototype=b.prototype=Object.create(x);function S(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,c){var u=y(t[o],t,i);if("throw"!==u.type){var f=u.arg,s=f.value;return s&&"object"==l(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function j(e,r,n){var o=p;return function(i,a){if(o===m)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var l=y(e,r,n);if("normal"===l.type){if(o=n.done?v:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=y(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function F(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(l(e)+" is not iterable")}return w.prototype=E,o(k,"constructor",{value:E,configurable:!0}),o(E,"constructor",{value:w,configurable:!0}),w.displayName=f(E,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,f(t,u,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},S(_.prototype),f(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(k),f(k,u,"Generator"),f(k,a,(function(){return this})),f(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(F),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),F(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;F(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function y(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function p(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){y(i,n,o,a,c,"next",t)}function c(t){y(i,n,o,a,c,"throw",t)}a(void 0)}))}}function d(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||m(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(t,e){if(t){if("string"==typeof t)return v(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(t,e):void 0}}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function g(t){var e,r,l=d((0,i.L4)(c.A.selectedFileList),2),y=l[0],m=l[1],v=d((0,i.L4)(c.A.nowFileList),2),g=v[0],b=(v[1],d((0,i.L4)(c.A.confirm),2)),w=(b[0],b[1]),E=d((0,i.L4)(c.A.user_base_info),2),x=E[0];E[1];function L(){return(L=p(h().mark((function e(r){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.click&&t.click(r,t.name);case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return n.createElement("div",f({},t.extraAttr,{onClick:function(){!function(t){L.apply(this,arguments)}(t.index)},className:"item",role:"button","data-type":t.isLink?"invalid_link":t.type,"data-dir":!t.type||t.type===o.Iw.folder,"aria-selected":null!==(0,a.kW)(y,t.index),"aria-label":t.name,style:{"--filewidth":null!==(e=t.itemWidth)&&void 0!==e?e:"33%"},onDragStart:function(e){return r=t.index,void(y.find((function(t){return t===r}))||m([].concat(s(y),[r])));var r},onDrop:function(e){return function(e,r){for(var n,o=e.dataTransfer,i=!1,a=0;a<o.items.length;a++)if("file"===o.items[a].kind){i=!0;break}i||g.folders.length<=r||w({open:!0,title:"确定将文件移动并覆盖到".concat(g.folders[r].name,"吗?"),handle:(n=p(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.draggable_handle(g.folders[r].name);case 2:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})})}(e,t.index)},draggable:void 0!==t.draggable_handle}),void 0===t.icon&&n.createElement("div",null,t.type!==o.Iw.image||null==t.path||null!=x&&null!==(r=x.user_data)&&void 0!==r&&r.not_pre_show_image?n.createElement("i",{className:"material-icons"}):n.createElement("img",{loading:"lazy",src:u.$M.getDownloadUrl(t.path,{mtime:t.mtime,cache:1}),alt:t.name})),void 0!==t.icon&&n.createElement("div",{className:"rotating-div"},n.createElement("span",{className:"material-icons"},t.icon)),n.createElement("div",null,n.createElement("p",{className:"name"},t.name),t.size?n.createElement("p",null,t.size):n.createElement("p",null,"—"),n.createElement("p",null,t.show_mtime)),t.children)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[133],{7133:(e,t,r)=>{r.r(t),r.d(t,{default:()=>d});var n=r(6540),a=r(5997),l=r(7952),i=r(7444),c=r(6417),o=r(7022);function u(e){var t=(0,n.useRef)(null),r=(0,n.useRef)(null);return n.createElement("div",{className:"image-ex-container",ref:t,style:{height:"100%"}},n.createElement("img",{className:"image-ex-img image-ex-img-center",ref:r,src:e.path,alt:""}))}var f=r(2389);function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,l,i,c=[],o=!0,u=!1;try{if(l=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;o=!1}else for(;!(o=(n=l.call(r)).done)&&(c.push(n.value),c.length!==t);o=!0);}catch(e){u=!0,a=e}finally{try{if(!o&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var p=n.lazy((function(){return Promise.all([r.e(859),r.e(100)]).then(r.bind(r,9160))}));function d(e){var t=(0,f.Bd)().t,r=s((0,i.L4)(c.A.file_preview),2),m=r[0],d=r[1];if(m.open){var v;switch(m.type){case o.Iw.video:v=n.createElement(p,{source:m.url,options:{autoplay:!1}});break;case o.Iw.image:v=n.createElement(u,{path:m.url});break;case o.Iw.pdf:v=n.createElement("object",{className:"pdf",data:m.url+"&show=1",type:"application/pdf"})}var y=n.createElement("div",{id:"previewer"},n.createElement(l.A,{ignore_tags:!0,left_children:[n.createElement(a.rA,{key:1,title:t("取消"),icon:"close",onClick:function(){d({open:!1})}})]}),n.createElement("div",{className:"preview"},v));return m.open&&y}}}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 29.295d812bf555f011d87a.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[29],{3029:(t,e,r)=>{r.d(e,{N:()=>P});var n=r(6540);function o(t){return n.createElement("div",null,t.div?n.createElement("div",{className:"nav_list_a",style:{background:t.color}},t.name):t.clickItem||"dir"===t._type?n.createElement("div",{className:"nav_list_a",style:{background:t.color},onClick:function(){"dir"!==t._type?t.clickItem&&t.clickItem(t):t.click_dir(t.item)}},t.name):n.createElement("a",{href:t.url,target:t.target,className:"nav_list_a",style:{background:t.color}},t.name))}var i=r(4694),a=r(3033),c=r(5997),u=r(7767),l=r(7444),f=r(6417),s=r(2389);function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}function p(){return p=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},p.apply(null,arguments)}function v(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function y(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?v(Object(r),!0).forEach((function(e){d(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function d(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=h(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==h(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function m(){m=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),c=new N(n||[]);return o(a,"_invoke",{value:L(t,r,c)}),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",v="suspendedYield",y="executing",d="completed",b={};function g(){}function w(){}function _(){}var E={};l(E,a,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(C([])));x&&x!==r&&n.call(x,a)&&(E=x);var O=_.prototype=g.prototype=Object.create(E);function j(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==h(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function L(e,r,n){var o=p;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===b)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?d:v,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=s(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function C(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(h(e)+" is not iterable")}return w.prototype=_,o(O,"constructor",{value:_,configurable:!0}),o(_,"constructor",{value:w,configurable:!0}),w.displayName=l(_,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,l(t,u,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},j(S.prototype),l(S.prototype,c,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new S(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},j(O),l(O,u,"Generator"),l(O,a,(function(){return this})),l(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=C,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,b):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),b},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:C(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},e}function b(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function g(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){b(i,n,o,a,c,"next",t)}function c(t){b(i,n,o,a,c,"throw",t)}a(void 0)}))}}function w(t){return function(t){if(Array.isArray(t))return k(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||E(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||E(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(t,e){if(t){if("string"==typeof t)return k(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?k(t,e):void 0}}function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var x,O,j=["#ffffff","#fefff8","#fcfdf1","#d3d2dc","#f8f9fd","#ebf4fe","#ebebeb","#e8f7eb","#eaf2f9"],S=[],L=[];function P(t){var e=_((0,n.useState)([]),2),r=e[0],h=e[1],v=_((0,n.useState)(-1),2),d=v[0],b=v[1],E=(0,u.zy)(),k=_((0,n.useState)(!1),2),P=k[0],A=k[1],I=_((0,n.useState)(!1),2),N=I[0],C=I[1],F=(0,s.Bd)().t,T=_((0,n.useState)([]),2),D=T[0],G=T[1],Y=_((0,l.L4)(f.A.nav_index_add_item_by_now_list),2),z=Y[0],B=Y[1],M=function(t){-1!==d?L[d]._children=t:S=t};(0,n.useEffect)((function(){var e=function(){var e=g(m().mark((function e(){var r;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.getItems){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,t.getItems();case 4:r=e.sent,h(S=r);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[E]);var U=function(){var e=g(m().mark((function e(){return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!P){e.next=6;break}if(!t.save){e.next=4;break}return e.next=4,t.save(S);case 4:e.next=7;break;case 6:O=r;case 7:A(!P);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),$=function(){var e=g(m().mark((function e(){var n;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=[],e.t1=w(r),e.t2=y,e.t3={name:"",color:(0,i.Lr)(j)},e.t4=t.get_pre_add_item,!e.t4){e.next=9;break}return e.next=8,t.get_pre_add_item();case 8:e.t4=e.sent;case 9:e.t5=e.t4,e.t6=(0,e.t2)(e.t3,e.t5),e.t7=[e.t6],n=e.t0.concat.call(e.t0,e.t1,e.t7),M(n),h(n);case 15:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,n.useEffect)((function(){if(z){var t=[].concat(w(r),[y({name:"",color:(0,i.Lr)(j)},z)]);M(t),h(t),A(!0),B(void 0)}}),[z]);var q=function(t){b(d+1),h(t._children),L.push(t)};return n.createElement("div",{className:"nav_list_div"},-1!==d&&n.createElement(c.rA,{title:"返回",icon:"arrow_back",onClick:function(){h(0===d?S:L[d-1]._children),b(d-1),L.pop()}}),r.map((function(e,u){return n.createElement("div",{key:u,draggable:!0,onDragOver:function(t){t.preventDefault()},onDragStart:function(t){return function(t,e){x=e}(0,u)},onDrop:function(t){return function(t,e){var n=w(r),o=n[x];n.splice(x,1),n.splice(e,0,o),M(n),h(n)}(0,u)},style:{cursor:P?"move":"pointer"}},n.createElement(o,p({name:e.name,item:e},e,{div:P,target:"_blank",click_dir:q,clickItem:t.clickItem})),P&&(void 0!==D.find((function(t){return t===u}))||N)&&n.createElement("div",{className:N?"":" site_edit "},"dir"===e._type?n.createElement(n.Fragment,null,n.createElement(a.Sm,{value:e.name,handleInputChange:function(t){e.name=t},placeholder:F("输入类目名"),no_border:!0}),n.createElement(a.Sm,{value:e.color,handleInputChange:function(t){e.color=t},placeholder:"color",no_border:!0})):t.items.map((function(t,r){return n.createElement("div",{key:r},n.createElement(a.Sm,{value:e[t.key],handleInputChange:function(r){e[t.key]=r},placeholder:t.preName,no_border:!0}))})),!N&&n.createElement(c.C3,{text:F("折叠"),clickFun:function(){G((0,i.P1)(D,u))}})),P&&n.createElement("div",{style:{display:"block"}},n.createElement("span",{className:"div-row "},n.createElement(c.C3,{text:F("删除"),clickFun:function(){var t,e;t=u,(e=w(r)).splice(t,1),M(e),h(e)}}),n.createElement(c.C3,{text:F("编辑"),clickFun:function(){void 0===D.find((function(t){return t===u}))&&G([].concat(w(D),[u]))}}))))})),P&&n.createElement("div",{style:{display:"block"}},n.createElement(c.rA,{title:F("取消"),icon:"cancel",onClick:function(){G([]),A(!1),O&&(h(O),M(O)),C(!1)}}),n.createElement(c.rA,{title:F("添加"),icon:"add",onClick:$}),n.createElement(c.rA,{title:F("添加类目"),icon:"add_box",onClick:function(){var t=[].concat(w(r),[{name:"",_type:"dir",_children:[],color:"#c1edfb"}]);M(t),h(t)}}),n.createElement(c.rA,{title:F("全部编辑"),icon:N?"unfold_less":"unfold_more",onClick:function(){C(!N)}})),(void 0===t.have_auth_edit||!0===t.have_auth_edit)&&n.createElement(c.rA,{icon:P?"save":"edit",title:F(P?"保存":"编辑"),onClick:U}))}}}]);