filecat 1.0.14 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/build/dist/29.bundle.js +2 -0
- package/build/dist/29.bundle.js.LICENSE.txt +1 -0
- package/build/dist/665.bundle.js +1 -1
- package/build/dist/734.bundle.js +1 -1
- package/build/dist/868.bundle.js +1 -1
- package/build/dist/868.bundle.js.LICENSE.txt +1 -1
- package/build/dist/892.bundle.js +1 -1
- package/build/dist/943.bundle.js +1 -1
- package/build/dist/977.bundle.js +1 -1
- package/build/dist/bundle.js +1 -1
- package/build/main.js +1 -1
- package/build/unrar.wasm +0 -0
- package/package.json +1 -1
- package/shell/build.js +1 -3
package/build/dist/734.bundle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 734.bundle.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[734],{4734:(t,e,r)=>{r.r(e),r.d(e,{FileListShowTypeEmum:()=>ct,default:()=>ft});var n=r(6540),o=r(7022),i=r(7444),a=r(6417),c=r(7767),u=r(4694),l=r(8844),f=r(5489),s=r(4251),h=r(2389),p=r(8247);function y(t){return y="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},y(t)}function v(){v=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 w?e:w,a=Object.create(i.prototype),c=new I(n||[]);return o(a,"_invoke",{value:O(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 h="suspendedStart",p="suspendedYield",d="executing",m="completed",g={};function w(){}function b(){}function E(){}var L={};l(L,a,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(N([])));k&&k!==r&&n.call(k,a)&&(L=k);var _=E.prototype=w.prototype=Object.create(L);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function A(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"==y(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 O(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===m){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=j(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===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?m:p,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function j(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,j(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=s(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 F(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 P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(F,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(y(e)+" is not iterable")}return b.prototype=E,o(_,"constructor",{value:E,configurable:!0}),o(E,"constructor",{value:b,configurable:!0}),b.displayName=l(E,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(A.prototype),l(A.prototype,c,(function(){return this})),e.AsyncIterator=A,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new A(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(_),l(_,u,"Generator"),l(_,a,(function(){return this})),l(_,"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(P),!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),P(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;P(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 d(t){return function(t){if(Array.isArray(t))return b(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||w(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 m(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,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)||w(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 w(t,e){if(t){if("string"==typeof t)return b(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)?b(t,e):void 0}}function b(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 E(t){var e=g((0,i.L4)(a.A.selectedFileList),2),r=e[0],y=e[1],w=g((0,i.L4)(a.A.clickFileList),2),b=w[0],E=w[1],L=g((0,i.L4)(a.A.enterKey),2),x=L[0],k=(L[1],(0,p.kZ)().click_file),_=((0,h.Bd)().t,(0,c.Zp)()),S=(0,c.zy)(),A=function(){var e,n=(e=v().mark((function e(n,i){var a,c,l,f,s,h;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(0,u.kW)(r,n))y((0,u.P1)(r,n));else if("ctrl"===x)y([].concat(d(r),[n]));else if("shift"===x){if(a=(0,u.a7)(r),c=a.max,l=a.min,f=[],n>=c)for(s=c;s<=n;s++)f.push(s);else for(h=l;h>=n;h--)f.push(h);y(f)}else y([n]);if(E([].concat(d(b),[n])),setTimeout((function(){E((0,u.P1)(b,n))}),300),t.type!==o.Iw.folder){e.next=13;break}if(void 0===b.find((function(t){return t===n}))){e.next=11;break}return _((0,u.IO)(S.pathname,i)),y([]),E([]),e.abrupt("return");case 11:e.next=15;break;case 13:void 0!==b.find((function(t){return t===n}))&&k({name:i});case 15:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){m(i,n,o,a,c,"next",t)}function c(t){m(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t,e){return n.apply(this,arguments)}}(),O=g((0,i.L4)(a.A.showPrompt),2),j=(O[0],O[1]);return n.createElement(l.B,{extraAttr:{onContextMenu:function(e){!function(t,e,r){t.preventDefault();var n=new s.i;n.path=(0,u.IO)(S.pathname,e),n.filename=e,n.x=t.clientX,n.y=t.clientY,n.type=r?o.Iw.folder:(0,s.u)(e),j({show:!0,type:f.PromptEnum.FileMenu,overlay:!1,data:n})}(e,t.name,t.type===o.Iw.folder)}},name:t.name,index:t.index,mtime:t.mtime,size:t.size,type:t.type,isLink:t.isLink,path:t.path,click:A,itemWidth:t.itemWidth})}var L=r(4976);function x(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)||function(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}}(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 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}function _(t){var e=(0,c.zy)(),r=x((0,n.useState)([]),2),o=r[0],i=r[1],a=x((0,n.useState)("/"),2),l=a[0],f=a[1];return n.useEffect((function(){var r="",n=e.pathname.split("/");n=n.filter((function(t){return t}));var o=n.indexOf(t.baseRoute),a=[];if(-1!=o){r=(0,u.IO)(n.slice(0,o),t.baseRoute);for(var c=n.slice(o+1),l=0;l<c.length;l++){var s=c[l];a.push({value:s,href:0===l?"".concat(r).concat(s,"/"):(0,u.IO)(a[l-1].href,s)})}f(r),i(a)}}),[e]),n.createElement("div",{className:"breadcrumbs"},n.createElement("span",null,n.createElement("span",{className:"chevron"},n.createElement(L.N_,{to:l,onClick:t.clickFun},n.createElement("i",{className:"material-icons"},"home"))),o.map((function(e,r){return n.createElement("span",{className:"chevron",key:r},n.createElement("i",{className:"material-icons"},"keyboard_arrow_right"),n.createElement(L.N_,{to:e.href,onClick:t.clickFun},decodeURIComponent(e.value)))}))))}var S=r(9653),A=r(5997),O=r(7952),j=r(5726),F=r(4289),P=r(3459),I=r(7856),N=r(4238),G=r(4944),C=r(7704),T=r(4405);function M(t){return M="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},M(t)}function Y(){Y=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 m?e:m,a=Object.create(i.prototype),c=new F(n||[]);return o(a,"_invoke",{value:S(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 h="suspendedStart",p="suspendedYield",y="executing",v="completed",d={};function m(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var E=Object.getPrototypeOf,L=E&&E(E(P([])));L&&L!==r&&n.call(L,a)&&(b=L);var x=w.prototype=m.prototype=Object.create(b);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(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"==M(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 S(e,r,n){var o=h;return function(i,a){if(o===y)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=A(c,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,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?v:p,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function A(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,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=s(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;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,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function O(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function P(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(M(e)+" is not iterable")}return g.prototype=w,o(x,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(x),l(x,u,"Generator"),l(x,a,(function(){return this})),l(x,"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=P,F.prototype={constructor:F,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(j),!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,d):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),d},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),j(r),d}},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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function z(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 $(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){z(i,n,o,a,c,"next",t)}function c(t){z(i,n,o,a,c,"throw",t)}a(void 0)}))}}function K(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)||function(t,e){if(t){if("string"==typeof t)return U(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)?U(t,e):void 0}}(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 U(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 D(t){var e=K((0,n.useState)(null),2),r=e[0],o=e[1],c=K((0,i.L4)(a.A.fileShellShow),2),u=c[0],l=(c[1],K((0,i.L4)(a.A.file_shell_hidden),2)),f=l[0],s=(l[1],K((0,n.useState)(!1),2)),h=s[0],p=s[1],y=function(){var t=$(Y().mark((function t(){var e,r,n;return Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=new I.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:"#000000",cursor:"#000000",selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4}),n=function(t){e.write(t)},r=function(t){e.clear(),e.write(t),r=n},G.ws.addMsg(N.HK.shell_getting,(function(t){r(t.context)})),e.onData(function(){var t=$(Y().mark((function t(e){var r;return Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new N.hf(N.HK.shell_send)).context=e,t.next=4,G.ws.send(r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),o(e);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),v=function(){$(Y().mark((function t(){return Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r&&(r.dispose(),o(null)),G.ws.isAilive()&&G.ws.setPromise(function(){var t=$(Y().mark((function t(e){var r;return Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new N.hf(N.HK.shell_cancel)).context="",G.ws.unSubscribeUnconnect(),t.next=5,G.ws.send(r);case 5:return t.next=7,G.ws.unConnect();case 7:e();case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 2:case"end":return t.stop()}}),t)})))()};return(0,n.useEffect)((function(){return function(){v()}}),[]),(0,n.useEffect)((function(){if(u.show)if(r){if(h){var t=new N.hf(N.HK.shell_cd),e=new T.n;e.init_path=u.path,e.http_token=localStorage.getItem("token"),t.context=e,G.ws.send(t)}}else y(),p(!0);else v()}),[u]),n.createElement(C.$,{show:u.show,file_shell_hidden:f,terminal:r,init:function(t,e){r.writeln("[38;2;29;153;243mopen shell...[0m ");var n=new N.hf(N.HK.shell_open),o=new T.n;o.init_path=u.path,o.rows=t,o.cols=e,o.http_token=localStorage.getItem("token"),n.context=o,G.ws.send(n)}})}var W=r(9214),H=r(3413),R=r.n(H),B=r(5725),Z=r(3033),q=r(2042),X=r(7523);function J(t){return J="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},J(t)}function Q(){return Q=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},Q.apply(null,arguments)}function V(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=ot(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}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 i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function tt(){tt=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 m?e:m,a=Object.create(i.prototype),c=new F(n||[]);return o(a,"_invoke",{value:S(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 h="suspendedStart",p="suspendedYield",y="executing",v="completed",d={};function m(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var E=Object.getPrototypeOf,L=E&&E(E(P([])));L&&L!==r&&n.call(L,a)&&(b=L);var x=w.prototype=m.prototype=Object.create(b);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(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"==J(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 S(e,r,n){var o=h;return function(i,a){if(o===y)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=A(c,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,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?v:p,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function A(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,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=s(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;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,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function O(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function P(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(J(e)+" is not iterable")}return g.prototype=w,o(x,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(x),l(x,u,"Generator"),l(x,a,(function(){return this})),l(x,"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=P,F.prototype={constructor:F,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(j),!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,d):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),d},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),j(r),d}},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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function et(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 rt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){et(i,n,o,a,c,"next",t)}function c(t){et(i,n,o,a,c,"throw",t)}a(void 0)}))}}function nt(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)||ot(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 ot(t,e){if(t){if("string"==typeof t)return it(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)?it(t,e):void 0}}function it(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 at,ct=function(t){return t.block="",t.gallery="gallery",t.list="list",t}({}),ut=Object.values(ct),lt=280;function ft(){var t=nt((0,i.L4)(a.A.editorSetting),2),e=(t[0],t[1]),r=nt((0,i.L4)(a.A.file_preview),2),l=(r[0],r[1]),s=(0,h.Bd)().t,y=(0,n.useRef)(null),v=(0,c.zy)(),d=(0,c.Zp)(),m=nt((0,i.L4)(a.A.nowFileList),2),g=m[0],w=m[1],b=nt((0,i.L4)(a.A.fileShowType),2),L=b[0],x=b[1],k=nt((0,i.L4)(a.A.uploadFiles),2),I=(k[0],k[1]),N=nt((0,i.L4)(a.A.showPrompt),2),G=(N[0],N[1]),C=nt((0,i.L4)(a.A.selectedFileList),2),T=C[0],M=(C[1],nt((0,i.L4)(a.A.copyedFileList),2)),Y=M[0],z=M[1],$=nt((0,i.L4)(a.A.enterKey),2),K=($[0],$[1]),U=nt((0,i.L4)(a.A.cutedFileList),2),H=U[0],J=U[1],et=nt((0,i.L4)(a.A.selectedFileList),2),ot=(et[0],et[1]),it=nt((0,i.L4)(a.A.clickFileList),2),ct=(it[0],it[1]),ft=nt((0,i.L4)(a.A.fileShellShow),2),st=ft[0],ht=ft[1],pt=nt((0,i.L4)(a.A.file_root_list),2),yt=pt[0],vt=(pt[1],nt((0,i.L4)(a.A.file_root_index),2)),dt=vt[0],mt=vt[1],gt=nt((0,n.useState)(void 0),2),wt=gt[0],bt=gt[1],Et=nt((0,n.useState)(""),2),Lt=Et[0],xt=Et[1],kt=(0,n.useContext)(X.F).reloadUserInfo,_t=(0,p.kZ)().click_file,St=nt((0,i.L4)(a.A.prompt_card),2),At=(St[0],St[1]),Ot=function(){var t=rt(tt().mark((function t(){var e;return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,S.$M.get((0,F.GG)("file",v.pathname));case 2:if((e=t.sent).code!==P.m.PreFile){t.next=6;break}return _t({name:e.message,context:e.data}),t.abrupt("return");case 6:if(e.code===P.m.Sucess){t.next=9;break}return e.message&&(0,q.zN)(e.message),t.abrupt("return");case 9:w(e.data),at=e.data;case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),jt=function(){var t=Math.floor(document.querySelector("main").offsetWidth/lt);0===t&&(t=1),bt("calc(".concat(100/t,"% - 1em)"))};(0,n.useEffect)((function(){var t=function(){var t=rt(tt().mark((function t(){return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Ot();case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();t(),e({open:!1}),l({open:!1})}),[v]);var Ft=function(){var t=rt(tt().mark((function t(e){var r,n,o,i;return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.preventDefault(),r=e.dataTransfer,n=e.target,!(r.files.length<=0)){t.next=5;break}return t.abrupt("return");case 5:for(o=0;o<5;o++)null===n||n.classList.contains("item")||(n=n.parentElement);return t.next=8,(0,j.T)(r);case 8:i=t.sent,I(i),G({show:!0,type:f.PromptEnum.FilesUpload,overlay:!1,data:{}});case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Pt=function(t){t.preventDefault()};function It(t){new(R())({type:"success",text:t,timeout:1e3,layout:"bottomLeft"}).show()}(0,n.useEffect)((function(){var t=y.current.ownerDocument;return t.addEventListener("dragover",Pt),t.addEventListener("drop",Ft),jt(),window.addEventListener("resize",jt),function(){t.removeEventListener("dragover",Pt),t.removeEventListener("drop",Ft),window.removeEventListener("resize",jt),st.show&&ht({show:!1,path:""})}}),[]);var Nt=function(){var t=rt(tt().mark((function t(e){return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return mt(e),t.next=3,S.$M.post("base_switch",{root_index:e});case 3:return t.next=5,kt();case 5:d("/file/"),ot([]),ct([]);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Gt=function(){var t=rt(tt().mark((function t(){var e;return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,S.$M.post("file/info",{type:o.Iw.folder,path:(0,F.GG)("file",v.pathname)});case 2:(e=t.sent).code===P.m.Sucess&&At({open:!0,title:"信息",context_div:n.createElement("div",null,n.createElement(B.Yh,{left:s("挂载位置磁盘"),right:e.data&&e.data.total_size}),n.createElement(B.Yh,{left:"".concat(s("磁盘剩余")),right:e.data&&e.data.left_size}),n.createElement(B.Yh,{left:"".concat(s("文件系统")),right:e.data&&e.data.fs_type}),n.createElement(B.Yh,{left:"".concat(s("文件夹数")),right:g.folders.length}),n.createElement(B.Yh,{left:"".concat(s("文件数")),right:g.files.length}))});case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();(0,n.useEffect)((function(){var t=function(t){if(t.ctrlKey)if("a"===t.key||"A"===t.key){for(var e=g.files.length,r=g.folders.length,n=[],o=0;o<e+r;o++)n.push(o);ot(n)}else K("ctrl");else"Escape"===t.key?ot([]):"Shift"===t.key&&K("shift")},e=function(t){t.ctrlKey||K("")};return window.addEventListener("keydown",t),window.addEventListener("keyup",e),function(){window.removeEventListener("keydown",t),window.removeEventListener("keyup",e)}}),[g]);var Ct=function(t){t.target===t.currentTarget&&ot([])};return n.createElement("div",{className:"not-select-div"},n.createElement(O.A,{left_children:n.createElement(Z.$Z,{handleEnterPress:function(){var t,e;if(at){ot([]),ct([]);var r,n=[],o=[],i=V(null!==(t=at.files)&&void 0!==t?t:[]);try{for(i.s();!(r=i.n()).done;){var a=r.value;a.name.includes(Lt)&&n.push(a)}}catch(t){i.e(t)}finally{i.f()}var c,u=V(null!==(e=at.folders)&&void 0!==e?e:[]);try{for(u.s();!(c=u.n()).done;){var l=c.value;l.name.includes(Lt)&&o.push(l)}}catch(t){u.e(t)}finally{u.f()}w({files:n,folders:o})}},placeholder:s("搜索当前目录"),icon:"search",value:"",handleInputChange:function(t){xt(t)},max_width:"25em"})},T.length>0&&n.createElement(A.rA,{icon:"delete",title:s("删除"),onClick:function(){G({show:!0,type:f.PromptEnum.FilesDelete,overlay:!0,data:{}})}}),T.length>0&&n.createElement(A.rA,{icon:"content_copy",title:s("复制"),onClick:function(){var t=(0,W.i)(g,T);z(t.map((function(t){return(0,W.O)(v,t.name)}))),J([]),It("已复制")}}),T.length>0&&n.createElement(A.rA,{icon:"content_cut",title:s("剪切"),onClick:function(){var t=(0,W.i)(g,T);J(t.map((function(t){return(0,W.O)(v,t.name)}))),z([]),It("已剪切")}}),(Y.length>0||H.length>0)&&n.createElement(A.rA,{onClick:function(){G({show:!0,type:f.PromptEnum.Confirm,overlay:!0,data:{}})},icon:"content_paste",title:s("粘贴到此处"),tip:Y.length+H.length}),T.length>0&&n.createElement(A.rA,{icon:"download",title:s("下载"),onClick:function(){for(var t=(0,W.i)(g,T),e=0;e<t.length;e++){var r=t[e];t[e]=(0,W.O)(v,r.name)}var n=S.$M.getDownloadUrl(t);window.open(n)}}),T.length>0&&n.createElement(A.rA,{icon:"compress",title:s("压缩"),onClick:function(){for(var t=(0,W.i)(g,T),e=0;e<t.length;e++){var r=t[e];t[e]=(0,W.O)(v,r.name)}t&&0!==t.length?G({show:!0,type:f.PromptEnum.Compress,overlay:!0,data:{files:t}}):(0,q.zN)("没有选中")}}),1===T.length&&n.createElement(A.rA,{icon:"edit_attributes",title:s("重命名"),onClick:function(){G({show:!0,type:f.PromptEnum.FileRename,overlay:!0,data:{}})}}),n.createElement(A.rA,{icon:"terminal",title:"shell",onClick:function(){st.show?ht({show:!1,path:""}):ht({show:!0,path:(0,F.GG)("file",v.pathname)})}}),n.createElement(A.rA,{icon:"grid_view",title:s("切换样式"),onClick:function(){x((0,u.jH)(ut,L))}}),n.createElement(A.rA,{icon:"create_new_folder",title:s("创建文件夹"),onClick:function(){G({show:!0,type:f.PromptEnum.DirNew,overlay:!0,data:{dir:(0,F.GG)("file",v.pathname)}})}}),n.createElement(A.rA,{icon:"note_add",title:s("创建文本文件"),onClick:function(){G({show:!0,type:f.PromptEnum.FileNew,overlay:!0,data:{dir:(0,F.GG)("file",v.pathname)}})}}),n.createElement(A.rA,{icon:"info",title:s("信息"),onClick:Gt}),n.createElement(B.EF,{title:s("切换目录"),items:yt,click:function(t){Nt(t)},pre_value:dt})),n.createElement("div",{id:"listing",className:"mosaic file-icons ".concat(L),ref:y},n.createElement(_,{baseRoute:"file",clickFun:function(){ot([]),ct([])}}),g.folders&&g.folders.length>0&&n.createElement("h2",null,s("文件夹")),g.folders&&n.createElement("div",{onClick:Ct},g.folders.map((function(t,e){return n.createElement(E,Q({itemWidth:wt,index:e,key:e},t))}))),g.files&&g.files.length>0&&n.createElement("h2",{onClick:Ct},s("文件")),g.files&&n.createElement("div",{onClick:Ct},g.files.map((function(t,e){return n.createElement(E,Q({itemWidth:wt,index:e+g.folders.length,key:e},t))})))),n.createElement(D,null))}}}]);
|
|
2
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[734],{4734:(t,e,r)=>{r.r(e),r.d(e,{FileListShowTypeEmum:()=>ct,default:()=>ft});var n=r(6540),o=r(7022),i=r(7444),a=r(6417),c=r(7767),u=r(4694),l=r(8844),f=r(5489),s=r(4251),h=r(2389),p=r(8247);function y(t){return y="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},y(t)}function v(){v=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 w?e:w,a=Object.create(i.prototype),c=new I(n||[]);return o(a,"_invoke",{value:O(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 h="suspendedStart",p="suspendedYield",d="executing",m="completed",g={};function w(){}function b(){}function E(){}var L={};l(L,a,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(N([])));k&&k!==r&&n.call(k,a)&&(L=k);var _=E.prototype=w.prototype=Object.create(L);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function A(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"==y(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 O(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===m){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=j(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===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?m:p,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function j(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,j(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=s(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 F(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 P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(F,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(y(e)+" is not iterable")}return b.prototype=E,o(_,"constructor",{value:E,configurable:!0}),o(E,"constructor",{value:b,configurable:!0}),b.displayName=l(E,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(A.prototype),l(A.prototype,c,(function(){return this})),e.AsyncIterator=A,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new A(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(_),l(_,u,"Generator"),l(_,a,(function(){return this})),l(_,"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(P),!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),P(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;P(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 d(t){return function(t){if(Array.isArray(t))return b(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||w(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 m(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,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)||w(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 w(t,e){if(t){if("string"==typeof t)return b(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)?b(t,e):void 0}}function b(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 E(t){var e=g((0,i.L4)(a.A.selectedFileList),2),r=e[0],y=e[1],w=g((0,i.L4)(a.A.clickFileList),2),b=w[0],E=w[1],L=g((0,i.L4)(a.A.enterKey),2),x=L[0],k=(L[1],(0,p.kZ)().click_file),_=((0,h.Bd)().t,(0,c.Zp)()),S=(0,c.zy)(),A=function(){var e,n=(e=v().mark((function e(n,i){var a,c,l,f,s,h;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(0,u.kW)(r,n))y((0,u.P1)(r,n));else if("ctrl"===x)y([].concat(d(r),[n]));else if("shift"===x){if(a=(0,u.a7)(r),c=a.max,l=a.min,f=[],n>=c)for(s=c;s<=n;s++)f.push(s);else for(h=l;h>=n;h--)f.push(h);y(f)}else y([n]);if(E([].concat(d(b),[n])),setTimeout((function(){E((0,u.P1)(b,n))}),300),t.type!==o.Iw.folder){e.next=13;break}if(void 0===b.find((function(t){return t===n}))){e.next=11;break}return _((0,u.IO)(S.pathname,i)),y([]),E([]),e.abrupt("return");case 11:e.next=15;break;case 13:void 0!==b.find((function(t){return t===n}))&&k({name:i});case 15:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){m(i,n,o,a,c,"next",t)}function c(t){m(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t,e){return n.apply(this,arguments)}}(),O=g((0,i.L4)(a.A.showPrompt),2),j=(O[0],O[1]);return n.createElement(l.B,{extraAttr:{onContextMenu:function(e){!function(t,e,r){t.preventDefault();var n=new s.i;n.path=(0,u.IO)(S.pathname,e),n.filename=e,n.x=t.clientX,n.y=t.clientY,n.type=r?o.Iw.folder:(0,s.u)(e),j({show:!0,type:f.PromptEnum.FileMenu,overlay:!1,data:n})}(e,t.name,t.type===o.Iw.folder)}},name:t.name,index:t.index,mtime:t.mtime,size:t.size,type:t.type,isLink:t.isLink,path:t.path,click:A,itemWidth:t.itemWidth})}var L=r(4976);function x(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)||function(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}}(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 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}function _(t){var e=(0,c.zy)(),r=x((0,n.useState)([]),2),o=r[0],i=r[1],a=x((0,n.useState)("/"),2),l=a[0],f=a[1];return n.useEffect((function(){var r="",n=e.pathname.split("/");n=n.filter((function(t){return t}));var o=n.indexOf(t.baseRoute),a=[];if(-1!=o){r=(0,u.IO)(n.slice(0,o),t.baseRoute);for(var c=n.slice(o+1),l=0;l<c.length;l++){var s=c[l];a.push({value:s,href:0===l?"".concat(r).concat(s,"/"):(0,u.IO)(a[l-1].href,s)})}f(r),i(a)}}),[e]),n.createElement("div",{className:"breadcrumbs"},n.createElement("span",null,n.createElement("span",{className:"chevron"},n.createElement(L.N_,{to:l,onClick:t.clickFun},n.createElement("i",{className:"material-icons"},"home"))),o.map((function(e,r){return n.createElement("span",{className:"chevron",key:r},n.createElement("i",{className:"material-icons"},"keyboard_arrow_right"),n.createElement(L.N_,{to:e.href,onClick:t.clickFun},decodeURIComponent(e.value)))}))))}var S=r(9653),A=r(5997),O=r(7952),j=r(5726),F=r(4289),P=r(3459),I=r(7856),N=r(4238),G=r(4944),C=r(7704),T=r(4405);function M(t){return M="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},M(t)}function Y(){Y=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 m?e:m,a=Object.create(i.prototype),c=new F(n||[]);return o(a,"_invoke",{value:S(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 h="suspendedStart",p="suspendedYield",y="executing",v="completed",d={};function m(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var E=Object.getPrototypeOf,L=E&&E(E(P([])));L&&L!==r&&n.call(L,a)&&(b=L);var x=w.prototype=m.prototype=Object.create(b);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(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"==M(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 S(e,r,n){var o=h;return function(i,a){if(o===y)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=A(c,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,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?v:p,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function A(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,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=s(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;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,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function O(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function P(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(M(e)+" is not iterable")}return g.prototype=w,o(x,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(x),l(x,u,"Generator"),l(x,a,(function(){return this})),l(x,"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=P,F.prototype={constructor:F,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(j),!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,d):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),d},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),j(r),d}},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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function z(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 $(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){z(i,n,o,a,c,"next",t)}function c(t){z(i,n,o,a,c,"throw",t)}a(void 0)}))}}function K(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)||function(t,e){if(t){if("string"==typeof t)return U(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)?U(t,e):void 0}}(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 U(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 D(t){var e=K((0,n.useState)(null),2),r=e[0],o=e[1],c=K((0,i.L4)(a.A.fileShellShow),2),u=c[0],l=(c[1],K((0,i.L4)(a.A.file_shell_hidden),2)),f=l[0],s=(l[1],K((0,n.useState)(!1),2)),h=s[0],p=s[1],y=function(){var t=$(Y().mark((function t(){var e,r,n;return Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=new I.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:"#000000",cursor:"#000000",selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4}),n=function(t){e.write(t)},r=function(t){e.clear(),e.write(t),r=n},G.ws.addMsg(N.HK.shell_getting,(function(t){r(t.context)})),e.onData(function(){var t=$(Y().mark((function t(e){var r;return Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new N.hf(N.HK.shell_send)).context=e,t.next=4,G.ws.send(r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),o(e);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),v=function(){$(Y().mark((function t(){return Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r&&(r.dispose(),o(null)),G.ws.isAilive()&&G.ws.setPromise(function(){var t=$(Y().mark((function t(e){var r;return Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new N.hf(N.HK.shell_cancel)).context="",G.ws.unSubscribeUnconnect(),t.next=5,G.ws.send(r);case 5:return t.next=7,G.ws.unConnect();case 7:e();case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 2:case"end":return t.stop()}}),t)})))()};return(0,n.useEffect)((function(){return function(){v()}}),[]),(0,n.useEffect)((function(){if(u.show)if(r){if(h){var t=new N.hf(N.HK.shell_cd),e=new T.n;e.init_path=u.path,e.http_token=localStorage.getItem("token"),t.context=e,G.ws.send(t)}}else y(),p(!0);else v()}),[u]),n.createElement(C.$,{show:u.show,file_shell_hidden:f,terminal:r,init:function(t,e){r.writeln("[38;2;29;153;243mopen shell...[0m ");var n=new N.hf(N.HK.shell_open),o=new T.n;o.init_path=u.path,o.rows=t,o.cols=e,o.http_token=localStorage.getItem("token"),n.context=o,G.ws.send(n)}})}var W=r(9214),H=r(3413),R=r.n(H),B=r(5725),Z=r(3033),q=r(2042),X=r(7523);function J(t){return J="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},J(t)}function Q(){return Q=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},Q.apply(null,arguments)}function V(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=ot(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}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 i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function tt(){tt=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 m?e:m,a=Object.create(i.prototype),c=new F(n||[]);return o(a,"_invoke",{value:S(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 h="suspendedStart",p="suspendedYield",y="executing",v="completed",d={};function m(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var E=Object.getPrototypeOf,L=E&&E(E(P([])));L&&L!==r&&n.call(L,a)&&(b=L);var x=w.prototype=m.prototype=Object.create(b);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(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"==J(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 S(e,r,n){var o=h;return function(i,a){if(o===y)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=A(c,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,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?v:p,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function A(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,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=s(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;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,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function O(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function P(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(J(e)+" is not iterable")}return g.prototype=w,o(x,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(_.prototype),l(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(x),l(x,u,"Generator"),l(x,a,(function(){return this})),l(x,"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=P,F.prototype={constructor:F,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(j),!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,d):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),d},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),j(r),d}},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;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function et(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 rt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){et(i,n,o,a,c,"next",t)}function c(t){et(i,n,o,a,c,"throw",t)}a(void 0)}))}}function nt(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)||ot(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 ot(t,e){if(t){if("string"==typeof t)return it(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)?it(t,e):void 0}}function it(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 at,ct=function(t){return t.block="",t.gallery="gallery",t.list="list",t}({}),ut=Object.values(ct),lt=280;function ft(){var t=nt((0,i.L4)(a.A.editorSetting),2),e=(t[0],t[1]),r=nt((0,i.L4)(a.A.file_preview),2),l=(r[0],r[1]),s=(0,h.Bd)().t,y=(0,n.useRef)(null),v=(0,c.zy)(),d=(0,c.Zp)(),m=nt((0,i.L4)(a.A.nowFileList),2),g=m[0],w=m[1],b=nt((0,i.L4)(a.A.fileShowType),2),L=b[0],x=b[1],k=nt((0,i.L4)(a.A.uploadFiles),2),I=(k[0],k[1]),N=nt((0,i.L4)(a.A.showPrompt),2),G=(N[0],N[1]),C=nt((0,i.L4)(a.A.selectedFileList),2),T=C[0],M=(C[1],nt((0,i.L4)(a.A.copyedFileList),2)),Y=M[0],z=M[1],$=nt((0,i.L4)(a.A.enterKey),2),K=($[0],$[1]),U=nt((0,i.L4)(a.A.cutedFileList),2),H=U[0],J=U[1],et=nt((0,i.L4)(a.A.selectedFileList),2),ot=(et[0],et[1]),it=nt((0,i.L4)(a.A.clickFileList),2),ct=(it[0],it[1]),ft=nt((0,i.L4)(a.A.fileShellShow),2),st=ft[0],ht=ft[1],pt=nt((0,i.L4)(a.A.file_root_list),2),yt=pt[0],vt=(pt[1],nt((0,i.L4)(a.A.file_root_index),2)),dt=vt[0],mt=vt[1],gt=nt((0,n.useState)(void 0),2),wt=gt[0],bt=gt[1],Et=nt((0,n.useState)(""),2),Lt=Et[0],xt=Et[1],kt=(0,n.useContext)(X.F).reloadUserInfo,_t=(0,p.kZ)().click_file,St=nt((0,i.L4)(a.A.prompt_card),2),At=(St[0],St[1]),Ot=function(){var t=rt(tt().mark((function t(){var e;return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,S.$M.get((0,F.GG)("file",v.pathname));case 2:if((e=t.sent).code!==P.m.PreFile){t.next=6;break}return _t({name:e.message,context:e.data}),t.abrupt("return");case 6:if(e.code===P.m.Sucess){t.next=9;break}return e.message&&(0,q.zN)(e.message),t.abrupt("return");case 9:w(e.data),at=e.data;case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),jt=function(){var t=Math.floor(document.querySelector("main").offsetWidth/lt);0===t&&(t=1),bt("calc(".concat(100/t,"% - 1em)"))};(0,n.useEffect)((function(){var t=function(){var t=rt(tt().mark((function t(){return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Ot();case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();t(),e({open:!1}),l({open:!1})}),[v]);var Ft=function(){var t=rt(tt().mark((function t(e){var r,n,o,i;return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.preventDefault(),r=e.dataTransfer,n=e.target,!(r.files.length<=0)){t.next=5;break}return t.abrupt("return");case 5:for(o=0;o<5;o++)null===n||n.classList.contains("item")||(n=n.parentElement);return t.next=8,(0,j.T)(r);case 8:i=t.sent,I(i),G({show:!0,type:f.PromptEnum.FilesUpload,overlay:!1,data:{}});case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Pt=function(t){t.preventDefault()};function It(t){new(R())({type:"success",text:t,timeout:1e3,layout:"bottomLeft"}).show()}(0,n.useEffect)((function(){var t=y.current.ownerDocument;return t.addEventListener("dragover",Pt),t.addEventListener("drop",Ft),jt(),window.addEventListener("resize",jt),function(){t.removeEventListener("dragover",Pt),t.removeEventListener("drop",Ft),window.removeEventListener("resize",jt),st.show&&ht({show:!1,path:""})}}),[]);var Nt=function(){var t=rt(tt().mark((function t(e){return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return mt(e),t.next=3,S.$M.post("base_switch",{root_index:e});case 3:return t.next=5,kt();case 5:d("/file/"),ot([]),ct([]);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Gt=function(){var t=rt(tt().mark((function t(){var e;return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,S.$M.post("file/info",{type:o.Iw.folder,path:(0,F.GG)("file",v.pathname)});case 2:(e=t.sent).code===P.m.Sucess&&At({open:!0,title:"信息",context_div:n.createElement("div",null,n.createElement(B.Yh,{left:s("挂载位置磁盘"),right:e.data&&e.data.total_size}),n.createElement(B.Yh,{left:"".concat(s("磁盘剩余")),right:e.data&&e.data.left_size}),n.createElement(B.Yh,{left:"".concat(s("文件系统")),right:e.data&&e.data.fs_type}),n.createElement(B.Yh,{left:"".concat(s("文件夹数")),right:g.folders.length}),n.createElement(B.Yh,{left:"".concat(s("文件数")),right:g.files.length}))});case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Ct=nt((0,n.useState)(!1),2),Tt=Ct[0],Mt=Ct[1];(0,n.useEffect)((function(){var t=function(t){if(Tt)if(t.ctrlKey)if("a"===t.key||"A"===t.key){for(var e=g.files.length,r=g.folders.length,n=[],o=0;o<e+r;o++)n.push(o);ot(n)}else K("ctrl");else"Escape"===t.key?ot([]):"Shift"===t.key&&K("shift")},e=function(t){t.ctrlKey||K("")};return window.addEventListener("keydown",t),window.addEventListener("keyup",e),function(){window.removeEventListener("keydown",t),window.removeEventListener("keyup",e)}}),[g,Tt]);var Yt=function(t){t.target===t.currentTarget&&ot([])};return n.createElement("div",{className:"not-select-div"},n.createElement(O.A,{left_children:n.createElement(Z.$Z,{handleEnterPress:function(){var t,e;if(at){ot([]),ct([]);var r,n=[],o=[],i=V(null!==(t=at.files)&&void 0!==t?t:[]);try{for(i.s();!(r=i.n()).done;){var a=r.value;a.name.includes(Lt)&&n.push(a)}}catch(t){i.e(t)}finally{i.f()}var c,u=V(null!==(e=at.folders)&&void 0!==e?e:[]);try{for(u.s();!(c=u.n()).done;){var l=c.value;l.name.includes(Lt)&&o.push(l)}}catch(t){u.e(t)}finally{u.f()}w({files:n,folders:o})}},placeholder:s("搜索当前目录"),icon:"search",value:"",handleInputChange:function(t){xt(t)},max_width:"25em"})},T.length>0&&n.createElement(A.rA,{icon:"delete",title:s("删除"),onClick:function(){G({show:!0,type:f.PromptEnum.FilesDelete,overlay:!0,data:{}})}}),T.length>0&&n.createElement(A.rA,{icon:"content_copy",title:s("复制"),onClick:function(){var t=(0,W.i)(g,T);z(t.map((function(t){return(0,W.O)(v,t.name)}))),J([]),It("已复制")}}),T.length>0&&n.createElement(A.rA,{icon:"content_cut",title:s("剪切"),onClick:function(){var t=(0,W.i)(g,T);J(t.map((function(t){return(0,W.O)(v,t.name)}))),z([]),It("已剪切")}}),(Y.length>0||H.length>0)&&n.createElement(A.rA,{onClick:function(){G({show:!0,type:f.PromptEnum.Confirm,overlay:!0,data:{}})},icon:"content_paste",title:s("粘贴到此处"),tip:Y.length+H.length}),T.length>0&&n.createElement(A.rA,{icon:"download",title:s("下载"),onClick:function(){for(var t=(0,W.i)(g,T),e=0;e<t.length;e++){var r=t[e];t[e]=(0,W.O)(v,r.name)}var n=S.$M.getDownloadUrl(t);window.open(n)}}),T.length>0&&n.createElement(A.rA,{icon:"compress",title:s("压缩"),onClick:function(){for(var t=(0,W.i)(g,T),e=0;e<t.length;e++){var r=t[e];t[e]=(0,W.O)(v,r.name)}t&&0!==t.length?G({show:!0,type:f.PromptEnum.Compress,overlay:!0,data:{files:t}}):(0,q.zN)("没有选中")}}),1===T.length&&n.createElement(A.rA,{icon:"edit_attributes",title:s("重命名"),onClick:function(){G({show:!0,type:f.PromptEnum.FileRename,overlay:!0,data:{}})}}),n.createElement(A.rA,{icon:"terminal",title:"shell",onClick:function(){st.show?ht({show:!1,path:""}):ht({show:!0,path:(0,F.GG)("file",v.pathname)})}}),n.createElement(A.rA,{icon:"grid_view",title:s("切换样式"),onClick:function(){x((0,u.jH)(ut,L))}}),n.createElement(A.rA,{icon:"create_new_folder",title:s("创建文件夹"),onClick:function(){G({show:!0,type:f.PromptEnum.DirNew,overlay:!0,data:{dir:(0,F.GG)("file",v.pathname)}})}}),n.createElement(A.rA,{icon:"note_add",title:s("创建文本文件"),onClick:function(){G({show:!0,type:f.PromptEnum.FileNew,overlay:!0,data:{dir:(0,F.GG)("file",v.pathname)}})}}),n.createElement(A.rA,{icon:"info",title:s("信息"),onClick:Gt}),n.createElement(B.EF,{title:s("切换目录"),items:yt,click:function(t){Nt(t)},pre_value:dt})),n.createElement("div",{id:"listing",className:"mosaic file-icons ".concat(L),ref:y,onMouseEnter:function(){Mt(!0)},onMouseLeave:function(){Mt(!1)}},n.createElement(_,{baseRoute:"file",clickFun:function(){ot([]),ct([])}}),g.folders&&g.folders.length>0&&n.createElement("h2",null,s("文件夹")),g.folders&&n.createElement("div",{onClick:Yt},g.folders.map((function(t,e){return n.createElement(E,Q({itemWidth:wt,index:e,key:e},t))}))),g.files&&g.files.length>0&&n.createElement("h2",{onClick:Yt},s("文件")),g.files&&n.createElement("div",{onClick:Yt},g.files.map((function(t,e){return n.createElement(E,Q({itemWidth:wt,index:e+g.folders.length,key:e},t))})))),n.createElement(D,null))}}}]);
|