filecat 1.0.32 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/build/dist/29.bundle.js +1 -1
- package/build/dist/308.bundle.js +1 -1
- package/build/dist/34.bundle.js +1 -1
- package/build/dist/432.bundle.js +2 -0
- package/build/dist/445.bundle.js +1 -1
- package/build/dist/467.bundle.js +1 -1
- package/build/dist/502.bundle.js +1 -1
- package/build/dist/623.bundle.js +1 -1
- package/build/dist/654.bundle.js +1 -1
- package/build/dist/674.bundle.js +1 -1
- package/build/dist/734.bundle.js +1 -1
- package/build/dist/811.bundle.js +1 -1
- package/build/dist/869.bundle.js +2 -0
- package/build/dist/874.bundle.js +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 +16 -16
- package/package.json +1 -1
- package/build/dist/421.bundle.js +0 -2
- package/build/dist/665.bundle.js +0 -2
- /package/build/dist/{421.bundle.js.LICENSE.txt → 432.bundle.js.LICENSE.txt} +0 -0
- /package/build/dist/{665.bundle.js.LICENSE.txt → 869.bundle.js.LICENSE.txt} +0 -0
package/README.md
CHANGED
|
@@ -45,6 +45,7 @@ url: http://116.198.245.137:5569/
|
|
|
45
45
|
6. 终端,默认是bash, windwos下是 powershell。
|
|
46
46
|
7. 超大文本日志查看器,对任意大小的文本右键使用作为日志类型查看,点击窗口后可以使用上下键来快速滚动翻页,还可以实时输出内容。
|
|
47
47
|
- ssh代理,ftp代理: 可以管理多个linux服务器,作用和winscp类似,让终端和文件管理更方便。
|
|
48
|
+
- http代理,类似postman 的发送http请求功能
|
|
48
49
|
- 网站,是网址收藏夹,可用于保存服务器上其它的网站
|
|
49
50
|
- ddns
|
|
50
51
|
- http网页代理、rdp代理(windwos远程控制)、rtsp代理播放器,输入直播源,比如监控的url可以实时网页观看
|
package/build/dist/29.bundle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 29.bundle.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[29],{3029:(t,e,r)=>{r.d(e,{N:()=>_});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);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(){s=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 h(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),c=new C(n||[]);return o(a,"_invoke",{value:j(t,r,c)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var y="suspendedStart",v="suspendedYield",d="executing",m="completed",g={};function b(){}function w(){}function E(){}var k={};f(k,a,(function(){return this}));var _=Object.getPrototypeOf,x=_&&_(_(P([])));x&&x!==r&&n.call(x,a)&&(k=x);var L=E.prototype=b.prototype=Object.create(k);function S(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,a,c){var u=p(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=y;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=A(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===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=p(e,r,n);if("normal"===l.type){if(o=n.done?m:v,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,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")),g;var i=p(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 I(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 N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,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(l(e)+" is not iterable")}return w.prototype=E,o(L,"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(L),t},e.awrap=function(t){return{__await:t}},S(O.prototype),f(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(L),f(L,u,"Generator"),f(L,a,(function(){return this})),f(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=P,C.prototype={constructor:C,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(N),!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),N(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;N(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),g}},e}function h(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){h(i,n,o,a,c,"next",t)}function c(t){h(i,n,o,a,c,"throw",t)}a(void 0)}))}}function y(t){return function(t){if(Array.isArray(t))return m(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||d(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 v(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)||d(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 d(t,e){if(t){if("string"==typeof t)return m(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)?m(t,e):void 0}}function m(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 g,b,w=["#ffffff","#fefff8","#fcfdf1","#d3d2dc","#f8f9fd","#ebf4fe","#ebebeb","#e8f7eb","#eaf2f9"],E=[],k=[];function _(t){var e=v((0,n.useState)([]),2),r=e[0],l=e[1],h=v((0,n.useState)(-1),2),d=h[0],m=h[1],_=(0,u.zy)(),x=v((0,n.useState)(!1),2),L=x[0],S=x[1],O=v((0,n.useState)(!1),2),j=O[0],A=O[1],I=v((0,n.useState)([]),2),N=I[0],C=I[1],P=function(t){-1!==d?k[d]._children=t:E=t};(0,n.useEffect)((function(){var e=function(){var e=p(s().mark((function e(){var r;return s().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).map((function(t,e){t.color=(0,i.Lr)(w)})),l(E=r);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[_]);var F=function(){var e=p(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!L){e.next=6;break}if(!t.save){e.next=4;break}return e.next=4,t.save(E);case 4:e.next=7;break;case 6:b=r;case 7:S(!L);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),G=function(t){m(d+1),l(t._children),k.push(t)};return n.createElement("div",{className:"nav_list_div"},-1!==d&&n.createElement(c.rA,{title:"返回",icon:"arrow_back",onClick:function(){l(0===d?E:k[d-1]._children),m(d-1),k.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){g=e}(0,u)},onDrop:function(t){return function(t,e){var n=y(r),o=n[g];n.splice(g,1),n.splice(e,0,o),P(n),l(n)}(0,u)},style:{cursor:L?"move":"pointer"}},n.createElement(o,f({name:e.name,item:e},e,{div:L,target:"_blank",click_dir:G,clickItem:t.clickItem})),L&&(void 0!==N.find((function(t){return t===u}))||j)&&n.createElement("div",{className:j?"":" site_edit "},"dir"===e._type?n.createElement(a.Sm,{value:e.name,handleInputChange:function(t){e.name=t},placeholder:"输入类目名",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}))})),!j&&n.createElement(c.C3,{text:"折叠",clickFun:function(){C((0,i.P1)(N,u))}})),L&&n.createElement("div",{style:{display:"block"}},n.createElement("span",{className:"div-row "},n.createElement(c.C3,{text:"删除",clickFun:function(){var t,e;t=u,(e=y(r)).splice(t,1),P(e),l(e)}}),n.createElement(c.C3,{text:"编辑",clickFun:function(){void 0===N.find((function(t){return t===u}))&&C([].concat(y(N),[u]))}}))))})),L&&n.createElement("div",{style:{display:"block"}},n.createElement(c.rA,{title:"取消",icon:"cancel",onClick:function(){C([]),S(!1),l(b),A(!1)}}),n.createElement(c.rA,{title:"添加",icon:"add",onClick:function(){var t=[].concat(y(r),[{name:"",color:(0,i.Lr)(w)}]);P(t),l(t)}}),n.createElement(c.rA,{title:"添加类目",icon:"add_box",onClick:function(){var t=[].concat(y(r),[{name:"",_type:"dir",_children:[],color:(0,i.Lr)(w)}]);P(t),l(t)}}),n.createElement(c.rA,{title:"全部编辑",icon:j?"unfold_less":"unfold_more",onClick:function(){A(!j)}})),n.createElement(c.rA,{icon:L?"save":"edit",title:L?"保存":"编辑",onClick:F}))}}}]);
|
|
2
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[29],{3029:(t,e,r)=>{r.d(e,{N:()=>S});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);function s(t){return s="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},s(t)}function h(){return h=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},h.apply(null,arguments)}function p(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?p(Object(r),!0).forEach((function(e){v(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function v(t,e,r){return(e=function(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function d(){d=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:S(t,r,c)}),a}function h(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",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function E(){}var _={};l(_,a,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(C([])));x&&x!==r&&n.call(x,a)&&(_=x);var O=E.prototype=g.prototype=Object.create(_);function j(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,i,a,c){var u=h(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==s(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=p;return function(i,a){if(o===v)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=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=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,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=h(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(s(e)+" is not iterable")}return w.prototype=E,o(O,"constructor",{value:E,configurable:!0}),o(E,"constructor",{value:w,configurable:!0}),w.displayName=l(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,l(t,u,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},j(L.prototype),l(L.prototype,c,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new L(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 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 b(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,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)}))}}function g(t){return function(t){if(Array.isArray(t))return _(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 w(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 _(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)?_(t,e):void 0}}function _(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 k,x,O=["#ffffff","#fefff8","#fcfdf1","#d3d2dc","#f8f9fd","#ebf4fe","#ebebeb","#e8f7eb","#eaf2f9"],j=[],L=[];function S(t){var e=w((0,n.useState)([]),2),r=e[0],s=e[1],p=w((0,n.useState)(-1),2),v=p[0],m=p[1],E=(0,u.zy)(),_=w((0,n.useState)(!1),2),S=_[0],P=_[1],A=w((0,n.useState)(!1),2),I=A[0],N=A[1],C=w((0,n.useState)([]),2),T=C[0],D=C[1],F=w((0,l.L4)(f.A.nav_index_add_item_by_now_list),2),G=F[0],Y=(F[1],function(t){-1!==v?L[v]._children=t:j=t});(0,n.useEffect)((function(){var e=function(){var e=b(d().mark((function e(){var r;return d().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).map((function(t,e){t.color=(0,i.Lr)(O)})),s(j=r);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[E]);var z=function(){var e=b(d().mark((function e(){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!S){e.next=6;break}if(!t.save){e.next=4;break}return e.next=4,t.save(j);case 4:e.next=7;break;case 6:x=r;case 7:P(!S);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),M=function(){var e=b(d().mark((function e(){var n;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=[],e.t1=g(r),e.t2=y,e.t3={name:"",color:(0,i.Lr)(O)},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),Y(n),s(n);case 15:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,n.useEffect)((function(){if(G){var t=[].concat(g(r),[y({name:"",color:(0,i.Lr)(O)},G)]);Y(t),s(t),P(!0)}}),[G]);var U=function(t){m(v+1),s(t._children),L.push(t)};return n.createElement("div",{className:"nav_list_div"},-1!==v&&n.createElement(c.rA,{title:"返回",icon:"arrow_back",onClick:function(){s(0===v?j:L[v-1]._children),m(v-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){k=e}(0,u)},onDrop:function(t){return function(t,e){var n=g(r),o=n[k];n.splice(k,1),n.splice(e,0,o),Y(n),s(n)}(0,u)},style:{cursor:S?"move":"pointer"}},n.createElement(o,h({name:e.name,item:e},e,{div:S,target:"_blank",click_dir:U,clickItem:t.clickItem})),S&&(void 0!==T.find((function(t){return t===u}))||I)&&n.createElement("div",{className:I?"":" site_edit "},"dir"===e._type?n.createElement(a.Sm,{value:e.name,handleInputChange:function(t){e.name=t},placeholder:"输入类目名",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}))})),!I&&n.createElement(c.C3,{text:"折叠",clickFun:function(){D((0,i.P1)(T,u))}})),S&&n.createElement("div",{style:{display:"block"}},n.createElement("span",{className:"div-row "},n.createElement(c.C3,{text:"删除",clickFun:function(){var t,e;t=u,(e=g(r)).splice(t,1),Y(e),s(e)}}),n.createElement(c.C3,{text:"编辑",clickFun:function(){void 0===T.find((function(t){return t===u}))&&D([].concat(g(T),[u]))}}))))})),S&&n.createElement("div",{style:{display:"block"}},n.createElement(c.rA,{title:"取消",icon:"cancel",onClick:function(){D([]),P(!1),s(x),N(!1)}}),n.createElement(c.rA,{title:"添加",icon:"add",onClick:M}),n.createElement(c.rA,{title:"添加类目",icon:"add_box",onClick:function(){var t=[].concat(g(r),[{name:"",_type:"dir",_children:[],color:(0,i.Lr)(O)}]);Y(t),s(t)}}),n.createElement(c.rA,{title:"全部编辑",icon:I?"unfold_less":"unfold_more",onClick:function(){N(!I)}})),n.createElement(c.rA,{icon:S?"save":"edit",title:S?"保存":"编辑",onClick:z}))}}}]);
|
package/build/dist/308.bundle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 308.bundle.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[308],{5308:(t,e,r)=>{r.r(e),r.d(e,{default:()=>x});var n=r(6540),o=r(7444),i=r(6417),a=r(4289),c=r(9653),u=r(5726),l=r(2042),f=r(7022),s=r(8247),h=r(7767);function p(t){return p="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},p(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 b?e:b,a=Object.create(i.prototype),c=new I(n||[]);return o(a,"_invoke",{value:j(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",v="suspendedYield",d="executing",m="completed",g={};function b(){}function w(){}function x(){}var E={};l(E,a,(function(){return this}));var L=Object.getPrototypeOf,S=L&&L(L(P([])));S&&S!==r&&n.call(S,a)&&(E=S);var k=x.prototype=b.prototype=Object.create(E);function O(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"==p(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 j(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=_(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:v,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(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,_(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 T(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 N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,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(p(e)+" is not iterable")}return w.prototype=x,o(k,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:w,configurable:!0}),w.displayName=l(x,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,x):(t.__proto__=x,l(t,u,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},O(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()}))},O(k),l(k,u,"Generator"),l(k,a,(function(){return this})),l(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=P,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(N),!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),N(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;N(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),g}},e}function v(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 d(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){v(i,n,o,a,c,"next",t)}function c(t){v(i,n,o,a,c,"throw",t)}a(void 0)}))}}function m(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 g,b=!1,w=1024e3;function x(){var t,e,r=(t=(0,o.L4)(i.A.image_editor),e=2,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 m(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)?m(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.")}()),p=r[0],v=r[1],x=(0,h.Zp)(),E=(0,h.zy)(),L=function(){var t=d(y().mark((function t(){var e,r,n,o,i;return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(b){t.next=11;break}return t.prev=1,t.next=4,(0,u.J)("filerobot-image-editor.min.js");case 4:b=!0,t.next=11;break;case 7:return t.prev=7,t.t0=t.catch(1),(0,l.zN)("加载资源失败"),t.abrupt("return");case 11:e=(0,a.GG)("file",p.path),r=window.FilerobotImageEditor,n=r.TABS,o=r.TOOLS,i={defaultSavedImageName:p.name,source:c.$M.getDownloadUrl(e),onSave:function(){var t=d(y().mark((function t(r,n){var o,i,u,h,v,d,m,g,b;return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=r.imageBase64.split(",")[1],r.mimeType,u=r.extension,h=null!==(o=r.name)&&void 0!==o?o:p.name,v="base64/save/".concat(encodeURIComponent("".concat((0,a.Yp)(e)).concat(h,".").concat(u))),!(i.length<=w)){t.next=11;break}return d={base64_context:i,type:f.t7.all},t.next=9,c.$M.post(v,d);case 9:t.next=24;break;case 11:return m=(0,s.L6)(i,w),(g={base64_context:m[0],type:f.t7.start}).type=f.t7.part,t.next=16,c.$M.post(v+"?type".concat(f.t7.start),g);case 16:b=1;case 17:if(!(b<m.length)){t.next=24;break}return g.base64_context=m[b],t.next=21,c.$M.post(v,g);case 21:b++,t.next=17;break;case 24:(0,l.LW)("保存成功");case 25:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),annotationsCommon:{fill:"#151717",stroke:"#ec0f42",shadowColor:"#151717"},Text:{text:""},Rotate:{angle:90,componentType:"slider"},tabsIds:[Object.values(n)],defaultTabId:n.ANNOTATE,defaultToolId:o.ANNOTATE},(g=new r(document.querySelector("#editor_container"),i)).render({onClose:function(t){g.terminate(),v({}),x(E.pathname)}});case 17:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(){return t.apply(this,arguments)}}();return(0,n.useEffect)((function(){return L(),function(){g&&g.terminate()}}),[]),n.createElement("div",{id:"image-editor-container"},n.createElement("div",{className:"image-editor-context"},n.createElement("div",{id:"editor_container",className:"image-editor-context"})))}},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;"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})}}]);
|
|
2
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[308],{5308:(t,e,r)=>{r.r(e),r.d(e,{default:()=>x});var n=r(6540),o=r(7444),i=r(6417),a=r(4289),c=r(6007),u=r(5726),l=r(2042),f=r(7022),s=r(8247),h=r(7767);function p(t){return p="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},p(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 b?e:b,a=Object.create(i.prototype),c=new I(n||[]);return o(a,"_invoke",{value:j(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",v="suspendedYield",d="executing",m="completed",g={};function b(){}function w(){}function x(){}var E={};l(E,a,(function(){return this}));var L=Object.getPrototypeOf,S=L&&L(L(P([])));S&&S!==r&&n.call(S,a)&&(E=S);var k=x.prototype=b.prototype=Object.create(E);function O(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"==p(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 j(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=_(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:v,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function _(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,_(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 T(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 N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,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(p(e)+" is not iterable")}return w.prototype=x,o(k,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:w,configurable:!0}),w.displayName=l(x,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,x):(t.__proto__=x,l(t,u,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},O(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()}))},O(k),l(k,u,"Generator"),l(k,a,(function(){return this})),l(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=P,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(N),!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),N(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;N(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),g}},e}function v(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 d(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){v(i,n,o,a,c,"next",t)}function c(t){v(i,n,o,a,c,"throw",t)}a(void 0)}))}}function m(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 g,b=!1,w=1024e3;function x(){var t,e,r=(t=(0,o.L4)(i.A.image_editor),e=2,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 m(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)?m(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.")}()),p=r[0],v=r[1],x=(0,h.Zp)(),E=((0,h.zy)(),function(){var t=d(y().mark((function t(){var e,r,n,o,i;return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(b){t.next=11;break}return t.prev=1,t.next=4,(0,u.J)("filerobot-image-editor.min.js");case 4:b=!0,t.next=11;break;case 7:return t.prev=7,t.t0=t.catch(1),(0,l.zN)("加载资源失败"),t.abrupt("return");case 11:e=(0,a.GG)("file",p.path),r=window.FilerobotImageEditor,n=r.TABS,o=r.TOOLS,i={defaultSavedImageName:p.name,source:c.$M.getDownloadUrl(e),onSave:function(){var t=d(y().mark((function t(r,n){var o,i,u,h,v,d,m,g,b;return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=r.imageBase64.split(",")[1],r.mimeType,u=r.extension,h=null!==(o=r.name)&&void 0!==o?o:p.name,v="base64/save/".concat(encodeURIComponent("".concat((0,a.Yp)(e)).concat(h,".").concat(u))),!(i.length<=w)){t.next=11;break}return d={base64_context:i,type:f.t7.all},t.next=9,c.$M.post(v,d);case 9:t.next=24;break;case 11:return m=(0,s.L6)(i,w),(g={base64_context:m[0],type:f.t7.start}).type=f.t7.part,t.next=16,c.$M.post(v+"?type".concat(f.t7.start),g);case 16:b=1;case 17:if(!(b<m.length)){t.next=24;break}return g.base64_context=m[b],t.next=21,c.$M.post(v,g);case 21:b++,t.next=17;break;case 24:(0,l.LW)("保存成功");case 25:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),annotationsCommon:{fill:"#151717",stroke:"#ec0f42",shadowColor:"#151717"},Text:{text:""},Rotate:{angle:90,componentType:"slider"},tabsIds:[Object.values(n)],defaultTabId:n.ANNOTATE,defaultToolId:o.ANNOTATE},(g=new r(document.querySelector("#editor_container"),i)).render({onClose:function(t){g.terminate(),v({}),x((0,a.vX)())}});case 17:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(){return t.apply(this,arguments)}}());return(0,n.useEffect)((function(){return E(),function(){g&&g.terminate()}}),[]),n.createElement("div",{id:"image-editor-container"},n.createElement("div",{className:"image-editor-context"},n.createElement("div",{id:"editor_container",className:"image-editor-context"})))}},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;"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})}}]);
|
package/build/dist/34.bundle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 34.bundle.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[34],{8844:(t,e,r)=>{r.d(e,{B:()=>p});var n=r(6540),o=r(7022),i=r(7444),a=r(4694),c=r(6417),l=r(9653);function u(t){return u="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},u(t)}function f(){f=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",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function h(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 y(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var p="suspendedStart",m="suspendedYield",d="executing",v="completed",g={};function w(){}function b(){}function E(){}var L={};s(L,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(C([])));S&&S!==r&&n.call(S,a)&&(L=S);var k=E.prototype=w.prototype=Object.create(L);function A(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,i,a,c){var l=y(t[o],t,i);if("throw"!==l.type){var f=l.arg,s=f.value;return s&&"object"==u(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(l.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=p;return function(i,a){if(o===d)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 l=_(c,n);if(l){if(l===g)continue;return l}}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=d;var u=y(e,r,n);if("normal"===u.type){if(o=n.done?v:m,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function _(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,_(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 N(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 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(u(e)+" is not iterable")}return b.prototype=E,o(k,"constructor",{value:E,configurable:!0}),o(E,"constructor",{value:b,configurable:!0}),b.displayName=s(E,l,"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,s(t,l,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},A(j.prototype),s(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new j(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(k),s(k,l,"Generator"),s(k,a,(function(){return this})),s(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=C,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(N),!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 l=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)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),N(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;N(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),g}},e}function s(){return s=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},s.apply(null,arguments)}function h(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}function y(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 p(t){var e,r,u,p=(r=(0,i.L4)(c.A.selectedFileList),u=2,function(t){if(Array.isArray(t))return t}(r)||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=[],l=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(r,u)||function(t,e){if(t){if("string"==typeof t)return y(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)?y(t,e):void 0}}(r,u)||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.")}()),m=p[0];function d(){var e;return e=f().mark((function e(r){return f().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)})),d=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){h(i,n,o,a,c,"next",t)}function c(t){h(i,n,o,a,c,"throw",t)}a(void 0)}))},d.apply(this,arguments)}return p[1],n.createElement("div",s({},t.extraAttr,{onClick:function(){!function(t){d.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)(m,t.index),"aria-label":t.name,style:{"--filewidth":null!==(e=t.itemWidth)&&void 0!==e?e:"33%"}}),n.createElement("div",null,t.type===o.Iw.image&&null!=t.path?n.createElement("img",{loading:"lazy",src:l.$M.getDownloadUrl(t.path),alt:t.name}):n.createElement("i",{className:"material-icons"})),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.mtime)),t.children)}},7704:(t,e,r)=>{r.d(e,{$:()=>s});var n=r(6540),o=r(2543),i=r.n(o),a=r(3616),c=(r(9448),r(505)),l=r(2042);function u(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=[],l=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return f(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)?f(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 f(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 s(t){var e=u((0,n.useState)(25),2),r=e[0],o=e[1],f=(0,n.useRef)(null),s=(0,n.useCallback)(new a.FitAddon,[]),h=(0,n.useRef)(null),y=(0,n.useRef)(null),p=u((0,n.useState)(!1),2),m=p[0],d=p[1],v=(0,n.useCallback)(i().throttle((function(t){s.fit();var e=parseFloat(getComputedStyle(h.current).fontSize),r=window.innerHeight/e-4,n=(window.innerHeight-t.clientY)/e,i=2.25+f.current.offsetHeight/e;n<=r&&n>=i&&o(parseFloat(n.toFixed(2)))}),32),[]);(0,n.useEffect)((function(){t.terminal&&(t.terminal.open(y.current),t.terminal.loadAddon(s),s.fit(),t.init&&t.init(t.terminal.rows,t.terminal.cols),t.terminal.attachCustomKeyEventHandler((function(e){if(e.ctrlKey&&"c"===e.key){var r=t.terminal.getSelection();if(r)return(0,c.l)(r),(0,l.LW)("已复制"),e.preventDefault(),t.terminal.focus(),!1}else if("keydown"===e.type&&"v"===e.key&&e.ctrlKey)return!1;return!0})))}),[t.terminal]),(0,n.useEffect)((function(){return function(){t.terminal&&t.terminal.dispose()}}),[]);var g=function(){d(!1),h.current.removeEventListener("pointermove",v)};if(t.show)return t.get_simple?n.createElement("div",{className:"pty",style:{height:"100%"},ref:y}):n.createElement("div",{className:"shell",style:{height:"".concat(r,"em"),display:"".concat(t.file_shell_hidden?"none":"block")},ref:h},n.createElement("div",{className:"shell__divider",ref:f,onPointerDown:function(){d(!0),h.current.addEventListener("pointermove",v)},onPointerUp:g}),n.createElement("div",{className:"pty",style:{height:"".concat(r-1,"em")},ref:y}),m&&n.createElement("div",{className:"shell__overlay",onPointerUp:g}))}},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,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){l=!0,a=t},f:function(){try{c||null==r.return||r.return()}finally{if(l)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;"file"===c.kind&&"function"==typeof c.webkitGetAsEntry&&l(c.webkitGetAsEntry())}}catch(t){a.e(t)}finally{a.f()}}else e(t.files);function l(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),u(t.createReader(),"".concat(n).concat(t.name))}}function u(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;)l(c.value,"".concat(i,"/"))}catch(t){f.e(t)}finally{f.f()}u(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})}}]);
|
|
2
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[34],{8844:(t,e,r)=>{r.d(e,{B:()=>p});var n=r(6540),o=r(7022),i=r(7444),a=r(4694),c=r(6417),l=r(6007);function u(t){return u="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},u(t)}function f(){f=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",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function h(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 y(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var p="suspendedStart",m="suspendedYield",d="executing",v="completed",g={};function w(){}function b(){}function E(){}var L={};s(L,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(C([])));S&&S!==r&&n.call(S,a)&&(L=S);var k=E.prototype=w.prototype=Object.create(L);function A(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,i,a,c){var l=y(t[o],t,i);if("throw"!==l.type){var f=l.arg,s=f.value;return s&&"object"==u(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(l.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=p;return function(i,a){if(o===d)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 l=_(c,n);if(l){if(l===g)continue;return l}}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=d;var u=y(e,r,n);if("normal"===u.type){if(o=n.done?v:m,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function _(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,_(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 N(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 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(u(e)+" is not iterable")}return b.prototype=E,o(k,"constructor",{value:E,configurable:!0}),o(E,"constructor",{value:b,configurable:!0}),b.displayName=s(E,l,"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,s(t,l,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},A(j.prototype),s(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new j(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(k),s(k,l,"Generator"),s(k,a,(function(){return this})),s(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=C,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(N),!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 l=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)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),N(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;N(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),g}},e}function s(){return s=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},s.apply(null,arguments)}function h(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}function y(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 p(t){var e,r,u,p=(r=(0,i.L4)(c.A.selectedFileList),u=2,function(t){if(Array.isArray(t))return t}(r)||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=[],l=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(r,u)||function(t,e){if(t){if("string"==typeof t)return y(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)?y(t,e):void 0}}(r,u)||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.")}()),m=p[0];function d(){var e;return e=f().mark((function e(r){return f().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)})),d=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){h(i,n,o,a,c,"next",t)}function c(t){h(i,n,o,a,c,"throw",t)}a(void 0)}))},d.apply(this,arguments)}return p[1],n.createElement("div",s({},t.extraAttr,{onClick:function(){!function(t){d.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)(m,t.index),"aria-label":t.name,style:{"--filewidth":null!==(e=t.itemWidth)&&void 0!==e?e:"33%"}}),n.createElement("div",null,t.type===o.Iw.image&&null!=t.path?n.createElement("img",{loading:"lazy",src:l.$M.getDownloadUrl(t.path),alt:t.name}):n.createElement("i",{className:"material-icons"})),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.mtime)),t.children)}},7704:(t,e,r)=>{r.d(e,{$:()=>s});var n=r(6540),o=r(2543),i=r.n(o),a=r(3616),c=(r(9448),r(505)),l=r(2042);function u(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=[],l=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return f(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)?f(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 f(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 s(t){var e=u((0,n.useState)(25),2),r=e[0],o=e[1],f=(0,n.useRef)(null),s=(0,n.useCallback)(new a.FitAddon,[]),h=(0,n.useRef)(null),y=(0,n.useRef)(null),p=u((0,n.useState)(!1),2),m=p[0],d=p[1],v=(0,n.useCallback)(i().throttle((function(t){s.fit();var e=parseFloat(getComputedStyle(h.current).fontSize),r=window.innerHeight/e-4,n=(window.innerHeight-t.clientY)/e,i=2.25+f.current.offsetHeight/e;n<=r&&n>=i&&o(parseFloat(n.toFixed(2)))}),32),[]);(0,n.useEffect)((function(){t.terminal&&(t.terminal.open(y.current),t.terminal.loadAddon(s),s.fit(),t.init&&t.init(t.terminal.rows,t.terminal.cols),t.terminal.attachCustomKeyEventHandler((function(e){if(e.ctrlKey&&"c"===e.key){var r=t.terminal.getSelection();if(r)return(0,c.l)(r),(0,l.LW)("已复制"),e.preventDefault(),t.terminal.focus(),!1}else if("keydown"===e.type&&"v"===e.key&&e.ctrlKey)return!1;return!0})))}),[t.terminal]),(0,n.useEffect)((function(){return function(){t.terminal&&t.terminal.dispose()}}),[]);var g=function(){d(!1),h.current.removeEventListener("pointermove",v)};if(t.show)return t.get_simple?n.createElement("div",{className:"pty",style:{height:"100%"},ref:y}):n.createElement("div",{className:"shell",style:{height:"".concat(r,"em"),display:"".concat(t.file_shell_hidden?"none":"block")},ref:h},n.createElement("div",{className:"shell__divider",ref:f,onPointerDown:function(){d(!0),h.current.addEventListener("pointermove",v)},onPointerUp:g}),n.createElement("div",{className:"pty",style:{height:"".concat(r-1,"em")},ref:y}),m&&n.createElement("div",{className:"shell__overlay",onPointerUp:g}))}},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,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){l=!0,a=t},f:function(){try{c||null==r.return||r.return()}finally{if(l)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;"file"===c.kind&&"function"==typeof c.webkitGetAsEntry&&l(c.webkitGetAsEntry())}}catch(t){a.e(t)}finally{a.f()}}else e(t.files);function l(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),u(t.createReader(),"".concat(n).concat(t.name))}}function u(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;)l(c.value,"".concat(i,"/"))}catch(t){f.e(t)}finally{f.f()}u(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})}}]);
|