filecat 5.50.8 → 5.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/build/dist/{133.1198e7c547ab5348a487.js → 133.0f5c2b4b21220468364e.js} +1 -1
  2. package/build/dist/{181.ae539e974520b37354b6.js → 181.802385cb2535220f3821.js} +2 -2
  3. package/build/dist/214.601730564c7092bbf8cc.js +2 -0
  4. package/build/dist/{377.cb0340f3ae54559720ab.js → 377.5e0227a3ecc6ce4e048f.js} +2 -2
  5. package/build/dist/603.000b1e7fabd563443b56.js +2 -0
  6. package/build/dist/811.b651f0b78f8dc24da0ff.js +2 -0
  7. package/build/dist/903.90782cbd7ea1a83206e3.js +1 -0
  8. package/build/dist/{923.fba9f43871428c600902.js → 923.92438b8c326499109cb0.js} +1 -1
  9. package/build/dist/{931.48fb757b23a88b35e7ca.js → 931.55164131a295598b418a.js} +2 -2
  10. package/build/dist/{943.24b700c91c1c267592ac.js → 943.c33010ccba0555bdf261.js} +2 -2
  11. package/build/dist/index.html +1 -1
  12. package/build/dist/main.2588574cdf38e04c2bc5.js +2 -0
  13. package/build/main.js +1 -1
  14. package/package.json +1 -1
  15. package/build/dist/214.d76bdae58c76d429f6ec.js +0 -2
  16. package/build/dist/603.70cd821596b670128f19.js +0 -2
  17. package/build/dist/811.f3b69c125092e09ee6c8.js +0 -2
  18. package/build/dist/903.e23c09f7e3cabf5cc346.js +0 -1
  19. package/build/dist/main.dd972c0f3af3913b74e2.js +0 -2
  20. /package/build/dist/{181.ae539e974520b37354b6.js.LICENSE.txt → 181.802385cb2535220f3821.js.LICENSE.txt} +0 -0
  21. /package/build/dist/{214.d76bdae58c76d429f6ec.js.LICENSE.txt → 214.601730564c7092bbf8cc.js.LICENSE.txt} +0 -0
  22. /package/build/dist/{377.cb0340f3ae54559720ab.js.LICENSE.txt → 377.5e0227a3ecc6ce4e048f.js.LICENSE.txt} +0 -0
  23. /package/build/dist/{603.70cd821596b670128f19.js.LICENSE.txt → 603.000b1e7fabd563443b56.js.LICENSE.txt} +0 -0
  24. /package/build/dist/{811.f3b69c125092e09ee6c8.js.LICENSE.txt → 811.b651f0b78f8dc24da0ff.js.LICENSE.txt} +0 -0
  25. /package/build/dist/{931.48fb757b23a88b35e7ca.js.LICENSE.txt → 931.55164131a295598b418a.js.LICENSE.txt} +0 -0
  26. /package/build/dist/{943.24b700c91c1c267592ac.js.LICENSE.txt → 943.c33010ccba0555bdf261.js.LICENSE.txt} +0 -0
  27. /package/build/dist/{main.dd972c0f3af3913b74e2.js.LICENSE.txt → main.2588574cdf38e04c2bc5.js.LICENSE.txt} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "filecat",
3
- "version": "5.50.8",
3
+ "version": "5.52.0",
4
4
  "description": "FileCat Server Manager",
5
5
  "author": "xiaobaidadada",
6
6
  "scripts": {
@@ -1,2 +0,0 @@
1
- /*! For license information please see 214.d76bdae58c76d429f6ec.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[214],{4694(t,n,e){function r(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||i(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 o(t,n){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=i(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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 u,a=!0,c=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return a=t.done,t},e:function(t){c=!0,u=t},f:function(){try{a||null==e.return||e.return()}finally{if(c)throw u}}}}function i(t,n){if(t){if("string"==typeof t)return u(t,n);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?u(t,n):void 0}}function u(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=Array(n);e<n;e++)r[e]=t[e];return r}function a(t,n){var e=c(t,n);return null===e||e===t.length-1?t[0]:t[e+1]}function c(t,n){for(var e=0;e<t.length;e++)if(t[e]===n)return e;return null}function f(t,n){var e=c(t,n);return null===e?null:t[e]}function l(t){if(!t)return{};var n,e,r,i=o(t);try{for(i.s();!(r=i.n()).done;){var u=r.value;(void 0===n||n<u)&&(n=u),(void 0===e||e>u)&&(e=u)}}catch(t){i.e(t)}finally{i.f()}return{max:n,min:e}}function s(t,n){var e=t.indexOf(n),o=r(t);return o.splice(e,1),o}function v(){for(var t="",n=0;n<arguments.length;n++){var e=n<0||arguments.length<=n?void 0:arguments[n];0===n?("/"!==e[0]&&(e="/"+e),"/"!==e[e.length-1]&&(e+="/")):n===arguments.length-1?"/"!==e[e.list-1]&&-1===e.indexOf(".")&&(e+="/"):("/"===e[0]&&(e=e.slice(1,e.length-1)),"/"!==e[e.length-1]&&(e+="/")),t+=e}return t}function d(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];for(var r=n[0],o=1;o<n.length;o++)"/"!==n[o][n[o].length-1]?r+="/"+n[o]:r+=n[o];return r}function y(t,n){var e,r=[],i=o(n);try{for(i.s();!(e=i.n()).done;){var u=e.value;r.push(t[u])}}catch(t){i.e(t)}finally{i.f()}return r}function m(t,n){var e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||0===t.length)return t;for(var r=0;r<t.length;r++)for(var o=t.length-1;o>r;o--){var i=n?n(t[o]):t[o],u=n?n(t[o-1]):t[o-1],a=t[o];i<u?e&&(t[o]=t[o-1],t[o-1]=a):i>u&&(e||(t[o]=t[o-1],t[o-1]=a))}return t}function h(t,n){if(0===t.length)return null;var e,r,o=(e=0,r=t.length,e===r?-1:Math.floor(Math.random()*(r-e))+e);return n&&o===n?h(t,n):t[o]}function p(t,n){if(n)for(var e=0;e<t.length;e++)if(n(t[e]))return t.splice(e,1)[0]}e.d(n,{Bd:()=>y,HS:()=>d,I:()=>p,IO:()=>v,Lr:()=>h,P1:()=>s,a7:()=>l,di:()=>m,jH:()=>a,kW:()=>f})},9844(t,n,e){function r(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,e=null;return function(){for(var r=this,o=arguments.length,i=new Array(o),u=0;u<o;u++)i[u]=arguments[u];clearTimeout(e),e=setTimeout(function(){t.apply(r,i)},n)}}function o(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,e=0;return function(){var r=Date.now();if(r-e>=n){e=r;for(var o=arguments.length,i=new Array(o),u=0;u<o;u++)i[u]=arguments[u];t.apply(this,i)}}}e.d(n,{nF:()=>o,sg:()=>r})},3496(t,n,e){e.d(n,{s:()=>r});var r=function(t){return t.setting_sys_option_status_save="sys_option/status/save",t.setting_customer_router="customer_router",t.setting_customer_router_save="customer_router/save",t.setting_customer_workflow_router="customer_router/workflow",t.setting_customer_workflow_router_save="customer_router/workflow/save",t.user_save_user_file_list_show_type="save_user_file_list_show_type",t}({})},9214(t,n,e){e.d(n,{LL:()=>x,OJ:()=>I,Ok:()=>k,SQ:()=>O,UK:()=>T,V$:()=>z,VD:()=>W,Vs:()=>F,Ys:()=>P,ei:()=>j,ib:()=>S,yC:()=>L});var r=e(4694),o=e(4289),i=e(3430),u=e(7444),a=e(6417),c=e(5726),f=e(6540),l=e(2042),s=e(9844),v=e(505),d=e(4284),y=e(3496),m=e(7523);function h(){var t,n,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",o=e.toStringTag||"@@toStringTag";function i(e,r,o,i){var c=r&&r.prototype instanceof a?r:a,f=Object.create(c.prototype);return p(f,"_invoke",function(e,r,o){var i,a,c,f=0,l=o||[],s=!1,v={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(n,e){return i=n,a=0,c=t,v.n=e,u}};function d(e,r){for(a=e,c=r,n=0;!s&&f&&!o&&n<l.length;n++){var o,i=l[n],d=v.p,y=i[2];e>3?(o=y===r)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=d&&((o=e<2&&d<i[1])?(a=0,v.v=r,v.n=i[1]):d<y&&(o=e<3||i[0]>r||r>y)&&(i[4]=e,i[5]=r,v.n=y,a=0))}if(o||e>1)return u;throw s=!0,r}return function(o,l,y){if(f>1)throw TypeError("Generator is already running");for(s&&1===l&&d(l,y),a=l,c=y;(n=a<2?t:c)||!s;){i||(a?a<3?(a>1&&(v.n=-1),d(a,c)):v.n=c:v.v=c);try{if(f=2,i){if(a||(o="next"),n=i[o]){if(!(n=n.call(i,c)))throw TypeError("iterator result is not an object");if(!n.done)return n;c=n.value,a<2&&(a=0)}else 1===a&&(n=i.return)&&n.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((n=(s=v.n<0)?c:e.call(r,v))!==u)break}catch(n){i=t,a=1,c=n}finally{f=1}}return{value:n,done:s}}}(e,o,i),!0),f}var u={};function a(){}function c(){}function f(){}n=Object.getPrototypeOf;var l=[][r]?n(n([][r]())):(p(n={},r,function(){return this}),n),s=f.prototype=a.prototype=Object.create(l);function v(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,p(t,o,"GeneratorFunction")),t.prototype=Object.create(s),t}return c.prototype=f,p(s,"constructor",f),p(f,"constructor",c),c.displayName="GeneratorFunction",p(f,o,"GeneratorFunction"),p(s),p(s,o,"Generator"),p(s,r,function(){return this}),p(s,"toString",function(){return"[object Generator]"}),(h=function(){return{w:i,m:v}})()}function p(t,n,e,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}p=function(t,n,e,r){function i(n,e){p(t,n,function(t){return this._invoke(n,e,t)})}n?o?o(t,n,{value:e,enumerable:!r,configurable:!r,writable:!r}):t[n]=e:(i("next",0),i("throw",1),i("return",2))},p(t,n,e,r)}function g(t,n,e,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void e(t)}a.done?n(c):Promise.resolve(c).then(r,o)}function w(t){return function(){var n=this,e=arguments;return new Promise(function(r,o){var i=t.apply(n,e);function u(t){g(i,r,o,u,a,"next",t)}function a(t){g(i,r,o,u,a,"throw",t)}u(void 0)})}}function b(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var r,o,i,u,a=[],c=!0,f=!1;try{if(i=(e=e.call(t)).next,0===n){if(Object(e)!==e)return;c=!1}else for(;!(c=(r=i.call(e)).done)&&(a.push(r.value),a.length!==n);c=!0);}catch(t){f=!0,o=t}finally{try{if(!c&&null!=e.return&&(u=e.return(),Object(u)!==u))return}finally{if(f)throw o}}return a}}(t,n)||E(t,n)||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 _(t){return function(t){if(Array.isArray(t))return A(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 E(t,n){if(t){if("string"==typeof t)return A(t,n);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?A(t,n):void 0}}function A(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=Array(n);e<n;e++)r[e]=t[e];return r}function S(t,n){var e=[];return t.folders&&e.push.apply(e,_(t.folders)),t.files&&e.push.apply(e,_(t.files)),(0,r.Bd)(e,n)}function k(t){return"".concat((0,o.GG)("file",(0,o.vX)())).concat(t)}function L(t,n){switch(n){case i.t8.size_max_min:case i.t8.size_min_max:var e=n===i.t8.size_min_max;(0,r.di)(t.files,function(t){return t.size},e),(0,r.di)(t.folders,function(t){return t.size},e);break;case i.t8.time_minx_max:case i.t8.time_max_min:var o=n===i.t8.time_minx_max;(0,r.di)(t.files,function(t){return t.mtime},o),(0,r.di)(t.folders,function(t){return t.mtime},o);break;case i.t8.name:(0,r.di)(t.folders,function(t){return t.name})}}function x(t,n){for(var e={},r={},o=0;o<t.length;o++){var i=t[o],u={r:i.note,items:[],v:{tag:"quick_cmd",cmd:i.cmd}};if(null==i.father_index)n.push(u),null!=i.index&&(e[i.index]=u,null!=r[i.index]&&u.items.push(r[i.index]));else{r[i.father_index]=u;var a=e[i.father_index];a&&a.items.push(u)}}}function j(t,n){var e=b((0,u.L4)(a.A.showPrompt),2),r=(e[0],e[1]),o=b((0,u.L4)(a.A.uploadFiles),2),i=(o[0],o[1]),l=function(){var t=w(h().m(function t(e){var o,u,a,f;return h().w(function(t){for(;;)switch(t.n){case 0:if(e.preventDefault(),e.stopPropagation(),o=e.dataTransfer,u=e.target,!(o.files.length<=0)){t.n=1;break}return t.a(2);case 1:for(a=0;a<5;a++)null===u||u.classList.contains("item")||(u=u.parentElement);return t.n=2,(0,c.T)(o);case 2:f=t.v,i(f),r({show:!0,type:n,overlay:!1,data:{}});case 3:return t.a(2)}},t)}));return function(n){return t.apply(this,arguments)}}(),s=function(t){t.preventDefault()};return t&&(0,f.useEffect)(function(){var n=t.current.ownerDocument;return n.addEventListener("dragover",s),n.addEventListener("drop",l),function(){n.removeEventListener("dragover",s),n.removeEventListener("drop",l)}},[]),{drop:l,dragover:s}}function T(t,n,e){var r=b((0,u.L4)(a.A.selectedFileList),2),o=(r[0],r[1]),i=b((0,u.L4)(a.A.enterKey),2),c=(i[0],i[1]),l=b((0,f.useState)(!1),2),s=l[0],v=l[1];(0,f.useEffect)(function(){var t=e.current;if(t){var n=function(){return v(!0)},r=function(){return v(!1)};return t.addEventListener("mouseenter",n),t.addEventListener("mouseleave",r),function(){t.removeEventListener("mouseenter",n),t.removeEventListener("mouseleave",r)}}},[]),(0,f.useEffect)(function(){var e=function(e){if(s)if(e.ctrlKey)if("a"===e.key||"A"===e.key){for(var r,i,u=null!==(r=null==t?void 0:t.length)&&void 0!==r?r:0,a=null!==(i=null==n?void 0:n.length)&&void 0!==i?i:0,f=[],l=0;l<u+a;l++)f.push(l);o(f)}else c("ctrl");else"Escape"===e.key?o([]):"Shift"===e.key&&c("shift")},r=function(t){t.ctrlKey||c("")};return window.addEventListener("keydown",e),window.addEventListener("keyup",r),function(){window.removeEventListener("keydown",e),window.removeEventListener("keyup",r)}},[t,n,s])}function O(t,n,e){(0,f.useEffect)(function(){var r=0,o=function(){var o=t.current;o&&(r<o.scrollTop&&o.scrollTop+o.clientHeight+500>=o.scrollHeight?n():r>o.scrollTop&&o.scrollTop-300<=0&&e(),r=o.scrollTop)};t.current.addEventListener("scroll",(0,s.sg)(o));return function(){var n;null==t||null===(n=t.current)||void 0===n||n.removeEventListener("scroll",o)}},[])}function I(){var t=b((0,f.useState)(a.A.file_item_width_atom),2),n=t[0],e=t[1],r=function(){var t=Math.floor(document.querySelector("main").offsetWidth/280);0===t&&(t=1),e("calc(".concat(100/t,"% - 1em)"))};return(0,f.useEffect)(function(){return r(),window.addEventListener("resize",r),function(){window.removeEventListener("resize",r)}},[]),n}function P(t){t.endsWith(".workflow.yml")?(0,l.LW)("".concat(t.slice(0,-13)," done!")):t.endsWith(".act")&&(0,l.LW)("".concat(t.slice(0,-4)," done!"))}function z(t){t.endsWith(".workflow.yml")?(0,l.zN)("".concat(t.slice(0,-13)," failed!")):t.endsWith(".act")&&(0,l.zN)("".concat(t.slice(0,-4)," failed!"))}var G=(0,s.nF)(function(t){(0,v.lW)(t),(0,l.LW)("复制成功")});function W(){(0,f.useEffect)(function(){var t=document.querySelectorAll(".copy-btn"),n=function(){t.forEach(function(t){t.removeEventListener("click",function(){var t=this.getAttribute("data-code");G(t)})})};return n(),t.forEach(function(t){t.addEventListener("click",function(){var t=this.getAttribute("data-code");G(t)})}),function(){n()}},[])}function F(){var t=b((0,u.L4)(a.A.user_base_info),2),n=t[0],e=(t[1],(0,f.useContext)(m.F).initUserInfo);return w(h().m(function t(){var o,u,a;return h().w(function(t){for(;;)switch(t.n){case 0:return a=(0,r.jH)(i.Ko,null!==(o=null==n||null===(u=n.user_data)||void 0===u?void 0:u.file_list_show_type)&&void 0!==o?o:""),t.n=1,d.wm.post(y.s.user_save_user_file_list_show_type,{type:a});case 1:e();case 2:return t.a(2)}},t)}))}},5726(t,n,e){function r(t,n){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=function(t,n){if(t){if("string"==typeof t)return o(t,n);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?o(t,n):void 0}}(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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 u,a=!0,c=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return a=t.done,t},e:function(t){c=!0,u=t},f:function(){try{a||null==e.return||e.return()}finally{if(c)throw u}}}}function o(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=Array(n);e<n;e++)r[e]=t[e];return r}function i(t){return new Promise(function(n){var e=0,o=[];if(void 0!==t.items){var i,u=r(t.items);try{for(u.s();!(i=u.n()).done;){var a=i.value;if("file"===a.kind&&"function"==typeof a.webkitGetAsEntry)c(a.webkitGetAsEntry())}}catch(t){u.e(t)}finally{u.f()}}else n(t.files);function c(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(t.isFile)e++,t.file(function(t){e--,t.fullPath="".concat(r).concat(t.name),o.push(t),0===e&&n(o)});else if(t.isDirectory){var i={isDir:!0,size:0,fullPath:"".concat(r).concat(t.name),name:t.name};o.push(i),f(t.createReader(),"".concat(r).concat(t.name))}}function f(t,i){e++,t.readEntries(function(u){if(e--,u.length>0){var a,l=r(u);try{for(l.s();!(a=l.n()).done;){c(a.value,"".concat(i,"/"))}}catch(t){l.e(t)}finally{l.f()}f(t,"".concat(i,"/"))}0===e&&n(o)})}})}function u(t){return new Promise(function(n,e){var r=document.createElement("script");r.src=t,r.async=!0,r.onload=function(){n(null),console.log("脚本加载完成")},r.onerror=function(){e(e),console.error("脚本加载失败")},document.body.appendChild(r)})}e.d(n,{J:()=>u,T:()=>i})}}]);
@@ -1,2 +0,0 @@
1
- /*! For license information please see 603.70cd821596b670128f19.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[603],{8603(e,t,n){n.r(t),n.d(t,{default:()=>N});var r=n(6540),o=n(5725),a=n(447),i=n(7444),c=n(6417),l=n(96),u=n(5997),s=n(4251),f=n(4289),m=n(7361),d=n(4284),h=n(3459),p=n(3033),v=n(2389),y=n(2042),_=n(7952),b=n(6960),w=n(8815),g=n(8247),E=n(505);function k(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var l=r&&r.prototype instanceof c?r:c,u=Object.create(l.prototype);return S(u,"_invoke",function(n,r,o){var a,c,l,u=0,s=o||[],f=!1,m={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return a=t,c=0,l=e,m.n=n,i}};function d(n,r){for(c=n,l=r,t=0;!f&&u&&!o&&t<s.length;t++){var o,a=s[t],d=m.p,h=a[2];n>3?(o=h===r)&&(l=a[(c=a[4])?5:(c=3,3)],a[4]=a[5]=e):a[0]<=d&&((o=n<2&&d<a[1])?(c=0,m.v=r,m.n=a[1]):d<h&&(o=n<3||a[0]>r||r>h)&&(a[4]=n,a[5]=r,m.n=h,c=0))}if(o||n>1)return i;throw f=!0,r}return function(o,s,h){if(u>1)throw TypeError("Generator is already running");for(f&&1===s&&d(s,h),c=s,l=h;(t=c<2?e:l)||!f;){a||(c?c<3?(c>1&&(m.n=-1),d(c,l)):m.n=l:m.v=l);try{if(u=2,a){if(c||(o="next"),t=a[o]){if(!(t=t.call(a,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,c<2&&(c=0)}else 1===c&&(t=a.return)&&t.call(a),c<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),c=1);a=e}else if((t=(f=m.n<0)?l:n.call(r,m))!==i)break}catch(t){a=e,c=1,l=t}finally{u=1}}return{value:t,done:f}}}(n,o,a),!0),u}var i={};function c(){}function l(){}function u(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(S(t={},r,function(){return this}),t),f=u.prototype=c.prototype=Object.create(s);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,S(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=u,S(f,"constructor",u),S(u,"constructor",l),l.displayName="GeneratorFunction",S(u,o,"GeneratorFunction"),S(f),S(f,o,"Generator"),S(f,r,function(){return this}),S(f,"toString",function(){return"[object Generator]"}),(k=function(){return{w:a,m}})()}function S(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}S=function(e,t,n,r){function a(t,n){S(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},S(e,t,n,r)}function j(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=O(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 a,i=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw a}}}}function x(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function F(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||O(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,t){if(e){if("string"==typeof e)return A(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function N(){var e=F((0,r.useState)(null),2),t=e[0],n=e[1],S=(0,r.useRef)(),O=(0,r.useRef)(),A=F((0,i.L4)(c.A.prompt_card),2),N=(A[0],A[1]),C=(0,v.Bd)().t,I=F((0,i.L4)(c.A.selectedFileList),2),z=I[0],T=I[1],G=F((0,i.L4)(c.A.clickFileList),2),L=(G[0],G[1]),M=(0,g.kZ)().click_file,$=function(){var e,t=(e=k().m(function e(){var t,o,a,i,c,l,u;return k().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,d.$M.post("share",{id:S.current,token:O.current});case 1:if((t=e.v).code===h.m.Success){(a={is_dir:t.data.is_dir}).items=null!==(o=t.data.files)&&void 0!==o?o:[],i=j(a.items);try{for(i.s();!(c=i.n()).done;)(l=c.value).show_mtime=l.mtime?(0,b.s)(l.mtime):"",l.size=(0,w.v7)(l.size)}catch(e){i.e(e)}finally{i.f()}a.is_dir||(u=t.data.files[0],a.name=u.name,a.size=u.size,a.show_mtime=u.show_mtime),n(a),localStorage.setItem("file_share_token_".concat(S.current),O.current)}else t.code===h.m.need_token_share&&(localStorage.removeItem("file_share_token_".concat(S.current)),(0,y.zN)("需要正确的访问token"),N({open:!0,title:"share file",confirm:function(){N({open:!1}),$()},context_div:r.createElement("div",{className:"card-content"},r.createElement(p.Sm,{placeholderOut:C("请输入访问token"),value:"",handleInputChange:function(e){O.current=e}}))}));case 2:return e.a(2)}},e)}),function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function i(e){x(a,r,o,i,c,"next",e)}function c(e){x(a,r,o,i,c,"throw",e)}i(void 0)})});return function(){return t.apply(this,arguments)}}();if((0,r.useEffect)(function(){var e=(0,f.oW)("".concat((0,f.GG)(m.o.share,(0,f.vX)())));S.current=e,O.current=localStorage.getItem("file_share_token_".concat(e)),$()},[]),!t)return r.createElement(o.jW,{isFull:!0},r.createElement("div",{className:"common-box common-box-center"},"Loading..."));return r.createElement(r.Fragment,null,r.createElement(_.A,{left_children:r.createElement(r.Fragment,null,r.createElement("h2",null,"Share ",t.is_dir?"Folder":"File"))},z.length>0&&r.createElement(u.rA,{icon:"download",title:C("下载"),onClick:function(){for(var e=[],n=0;n<z.length;n++){var r=t.items[z[n]];e.push(encodeURIComponent(r.path))}var o=d.$M.getDownloadUrlV2(e,"share_download",{share_id:S.current,share_token:O.current});window.open(o)}})),r.createElement(o.xh,null,r.createElement(o.jW,{isFull:!0},r.createElement("div",{className:"common-box "},t.is_dir?r.createElement(l.QW,{share:{share_id:S.current,share_token:O.current},handleContextMenu:function(){},file_list:t.items,clickBlank:function(e){e.target===e.currentTarget&&(T([]),L([]))}}):r.createElement(a.uF,null,r.createElement("div",{style:{height:"25rem"},className:"common-box common-box-center"},r.createElement("div",{className:"file-icons"},r.createElement("div",{"data-type":(0,s.uL)(t.name),"data-dir":t.is_dir,"aria-label":t.name},r.createElement("i",{className:"material-icons",style:{fontSize:"10rem",display:"inline-block",lineHeight:1},"aria-label":t.name}))),r.createElement("div",{className:""},t.name),r.createElement("div",{className:""},t.size),r.createElement("div",{className:""},t.show_mtime),r.createElement(u.C3,{text:"download",clickFun:function(){var e=d.$M.getDownloadUrlV2(t.items[0].path,"share_download",{share_id:S.current,share_token:O.current});window.open(e)}}),r.createElement(u.C3,{text:"copy url",clickFun:function(){var e=d.$M.getDownloadUrlV2(t.items[0].path,"share_download",{share_id:S.current,share_token:O.current}),n=d.$M.get_full_url(e);(0,E.lW)(n),(0,y.LW)(n)}}),r.createElement(u.C3,{text:"preview",clickFun:function(){var e=t.items[0];M({file_path:e.path,file_url:d.$M.getDownloadUrlV2(e.path,"share_download",{share_id:S.current,share_token:O.current}),name:e.name,size:e.origin_size,opt_shell:!0,mtime:e.mtime,not_type_tip:C("未知类型,请下载查看")})}})))))))}}}]);
@@ -1,2 +0,0 @@
1
- /*! For license information please see 811.f3b69c125092e09ee6c8.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[811],{2811(e,t,n){n.r(t),n.d(t,{default:()=>h});var r=n(6540),a=n(4943),o=n(7444),i=n(6417),u=n(4284),c=n(4289),l=n(2042),f=n(7767);function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,u=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){l=!0,a=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(l)throw a}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function v(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function o(n,r,a,o){var c=r&&r.prototype instanceof u?r:u,l=Object.create(c.prototype);return p(l,"_invoke",function(n,r,a){var o,u,c,l=0,f=a||[],s=!1,m={p:0,n:0,v:e,a:v,f:v.bind(e,4),d:function(t,n){return o=t,u=0,c=e,m.n=n,i}};function v(n,r){for(u=n,c=r,t=0;!s&&l&&!a&&t<f.length;t++){var a,o=f[t],v=m.p,p=o[2];n>3?(a=p===r)&&(c=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=v&&((a=n<2&&v<o[1])?(u=0,m.v=r,m.n=o[1]):v<p&&(a=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,m.n=p,u=0))}if(a||n>1)return i;throw s=!0,r}return function(a,f,p){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&v(f,p),u=f,c=p;(t=u<2?e:c)||!s;){o||(u?u<3?(u>1&&(m.n=-1),v(u,c)):m.n=c:m.v=c);try{if(l=2,o){if(u||(a="next"),t=o[a]){if(!(t=t.call(o,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(c=TypeError("The iterator does not provide a '"+a+"' method"),u=1);o=e}else if((t=(s=m.n<0)?c:n.call(r,m))!==i)break}catch(t){o=e,u=1,c=t}finally{l=1}}return{value:t,done:s}}}(n,a,o),!0),l}var i={};function u(){}function c(){}function l(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(p(t={},r,function(){return this}),t),s=l.prototype=u.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,p(e,a,"GeneratorFunction")),e.prototype=Object.create(s),e}return c.prototype=l,p(s,"constructor",l),p(l,"constructor",c),c.displayName="GeneratorFunction",p(l,a,"GeneratorFunction"),p(s),p(s,a,"Generator"),p(s,r,function(){return this}),p(s,"toString",function(){return"[object Generator]"}),(v=function(){return{w:o,m}})()}function p(e,t,n,r){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}p=function(e,t,n,r){function o(t,n){p(e,t,function(e){return this._invoke(t,n,e)})}t?a?a(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},p(e,t,n,r)}function d(e,t,n,r,a,o,i){try{var u=e[o](i),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,a)}function y(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){d(o,r,a,i,u,"next",e)}function u(e){d(o,r,a,i,u,"throw",e)}i(void 0)})}}function h(){var e=s((0,o.L4)(i.A.excalidraw_editor),2),t=e[0],n=e[1],m=s((0,r.useState)(null),2),p=m[0],d=m[1],h=(0,f.Zp)(),b=((0,f.zy)(),function(){var e=y(v().m(function e(){var n;return v().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,u.$M.get("".concat(encodeURIComponent((0,c.GG)("file",(0,c.vX)()))).concat(t.name));case 1:return n=e.v,e.a(2,JSON.parse(n.data))}},e)}));return function(){return e.apply(this,arguments)}}());(0,r.useEffect)(function(){b()},[t]);var M=function(){var e=y(v().m(function e(){var n,r;return v().w(function(e){for(;;)switch(e.n){case 0:return n=p.getSceneElements(),r={elements:n},e.n=1,u.$M.post("save/".concat(encodeURIComponent((0,c.GG)("file",(0,c.vX)()))).concat(t.name),{context:JSON.stringify(r)});case 1:0===e.v.code&&(0,l.LW)("保存成功");case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return r.createElement("div",{id:"excalidraw-container"},r.createElement("div",{className:"excalidraw-context"},r.createElement(a.Excalidraw,{langCode:"zh-CN",initialData:b(),excalidrawAPI:function(e){return d(e)},UIOptions:{dockedSidebarBreakpoint:0}},r.createElement(a.MainMenu,null,r.createElement(a.MainMenu.Item,{onSelect:function(){n({}),h((0,c.vX)())}},"关闭"),r.createElement(a.MainMenu.Item,{onSelect:M},"保存到服务器"),r.createElement(a.MainMenu.Group,{title:"Excalidraw items"},r.createElement(a.MainMenu.DefaultItems.LoadScene,null),r.createElement(a.MainMenu.DefaultItems.Export,null),r.createElement(a.MainMenu.DefaultItems.SaveToActiveFile,null),r.createElement(a.MainMenu.DefaultItems.SaveAsImage,null),r.createElement(a.MainMenu.DefaultItems.ClearCanvas,null),r.createElement(a.MainMenu.DefaultItems.ToggleTheme,null),r.createElement(a.MainMenu.DefaultItems.ChangeCanvasBackground,null))))))}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[903],{4903(e,t,r){r.r(t),r.d(t,{default:()=>s});var n=r(6540),l=r(7444),a=r(6417),i=r(5997),o=r(7952),c=r(2389);function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,l,a,i,o=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(e){u=!0,l=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw l}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var m=n.lazy(function(){return Promise.all([r.e(916),r.e(214),r.e(10)]).then(r.bind(r,4299))});function s(e){var t=(0,c.Bd)().t,r=u((0,l.L4)(a.A.markdown),2),f=r[0],s=r[1];if(f.context)return n.createElement("div",{id:"md-container"},n.createElement(o.A,{ignore_tags:!0,left_children:[n.createElement(i.rA,{key:1,title:t("取消"),icon:"close",onClick:function(){s({context:"",filename:""})}}),n.createElement("title",{key:2},f.filename)]}),n.createElement("div",{className:"md-context markdown-body "},n.createElement(m,{context:f.context})))}}}]);