filecat 2.2.1 → 2.2.3
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/build/dist/663.bundle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 663.bundle.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[663],{8062:(t,e,r)=>{r.d(e,{A:()=>c});var n=r(6540);function o(){return o=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},o.apply(null,arguments)}function i(t){return n.createElement("div",{className:"black-tip",onClick:function(){t.click&&t.click(t)},onContextMenu:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),t.onContextMenu&&t.onContextMenu(e,t)}},t.name)}var a=function(t){return n.createElement("li",null,t.click?n.createElement(i,o({},t.node,{name:t.render?t.render(t.node):t.node.name,click:t.click,onContextMenu:t.onContextMenu})):n.createElement("div",null,t.render?t.render(t.node):t.node.name),t.node.children&&t.node.children.length>0&&n.createElement("ul",null,t.node.children.map((function(e,r){return n.createElement(a,{key:r,node:e,click:t.click,onContextMenu:t.onContextMenu,render:t.render})}))))};const c=function(t){return n.createElement("div",{className:"card-tree-view"},n.createElement("ul",null,t.list&&t.list.map((function(e,r){return n.createElement(a,{key:r,node:e,click:t.click,onContextMenu:t.onContextMenu,render:t.render})}))))}},3663:(t,e,r)=>{r.r(e),r.d(e,{FileListShowTypeEmum:()=>Tt,default:()=>Yt});var n=r(6540),o=r(7022),i=r(7444),a=r(6417),c=r(7767),u=r(4694),l=r(4289),f=r(8844),s=r(2869),h=r(4251),p=r(2389),d=r(8247);function y(t){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y(t)}function v(){v=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof w?e:w,a=Object.create(i.prototype),c=new F(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",p="suspendedYield",d="executing",m="completed",g={};function w(){}function b(){}function E(){}var x={};l(x,a,(function(){return this}));var L=Object.getPrototypeOf,_=L&&L(L(C([])));_&&_!==r&&n.call(_,a)&&(x=_);var k=E.prototype=w.prototype=Object.create(x);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function r(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==y(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function 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=O(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?m:p,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=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 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 F(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(y(e)+" is not iterable")}return b.prototype=E,o(k,"constructor",{value:E,configurable:!0}),o(E,"constructor",{value:b,configurable:!0}),b.displayName=l(E,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,l(t,u,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},S(A.prototype),l(A.prototype,c,(function(){return this})),e.AsyncIterator=A,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new A(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(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=C,F.prototype={constructor:F,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(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:C(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function m(t){return function(t){if(Array.isArray(t))return E(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||b(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 g(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 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)||b(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 b(t,e){if(t){if("string"==typeof t)return E(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)?E(t,e):void 0}}function E(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 x(t){var e=w((0,i.L4)(a.A.selectedFileList),2),r=e[0],y=e[1],b=w((0,i.L4)(a.A.clickFileList),2),E=b[0],x=b[1],L=w((0,i.L4)(a.A.enterKey),2),_=L[0],k=(L[1],(0,d.kZ)().click_file),S=((0,p.Bd)().t,(0,c.Zp)()),A=((0,c.zy)(),function(){var e,n=(e=v().mark((function e(n,i){var a,c,f,s,h,p;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(0,u.kW)(r,n))y((0,u.P1)(r,n));else if("ctrl"===_)y([].concat(m(r),[n]));else if("shift"===_){if(a=(0,u.a7)(r),c=a.max,f=a.min,s=[],n>=c)for(h=c;h<=n;h++)s.push(h);else for(p=f;p>=n;p--)s.push(p);y(s)}else y([n]);if(x([].concat(m(E),[n])),setTimeout((function(){x((0,u.P1)(E,n))}),300),t.type!==o.Iw.folder){e.next=13;break}if(void 0===E.find((function(t){return t===n}))){e.next=11;break}return S((0,u.IO)((0,l.vX)(),i)),y([]),x([]),e.abrupt("return");case 11:e.next=15;break;case 13:void 0!==E.find((function(t){return t===n}))&&k({name:i,size:t.origin_size});case 15:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){g(i,n,o,a,c,"next",t)}function c(t){g(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t,e){return n.apply(this,arguments)}}()),j=w((0,i.L4)(a.A.showPrompt),2),O=(j[0],j[1]);return n.createElement(f.B,{extraAttr:{onContextMenu:function(e){!function(t,e,r,n){t.preventDefault();var i=new h.i;i.path=(0,u.IO)((0,l.vX)(),e),i.filename=e,i.x=t.clientX,i.y=t.clientY,i.type=r?o.Iw.folder:(0,h.u)(e),i.size=n,O({show:!0,type:s.PromptEnum.FileMenu,overlay:!1,data:i})}(e,t.name,t.type===o.Iw.folder,t.origin_size)}},name:t.name,index:t.index,mtime:t.mtime,size:t.size,type:t.type,isLink:t.isLink,path:t.path,icon:t.icon,click:A,itemWidth:t.itemWidth})}var L=r(4976);function _(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return k(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?k(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function S(t){var e=(0,c.zy)(),r=_((0,n.useState)([]),2),o=r[0],i=r[1],a=_((0,n.useState)("/"),2),f=a[0],s=a[1];return n.useEffect((function(){var e="",r=(0,l.vX)().split("/");r=r.filter((function(t){return t}));var n=r.indexOf(t.baseRoute),o=[];if(-1!=n){e=(0,u.IO)(r.slice(0,n),t.baseRoute);for(var a=r.slice(n+1),c=0;c<a.length;c++){var f=a[c];o.push({value:f,href:0===c?"".concat(e).concat(f,"/"):(0,u.IO)(o[c-1].href,f)})}s(e),i(o)}}),[e]),n.createElement("div",{className:"breadcrumbs"},n.createElement("span",null,n.createElement("span",{className:"chevron"},n.createElement(L.N_,{to:f,onClick:t.clickFun},n.createElement("i",{className:"material-icons"},"home"))),o.map((function(e,r){return n.createElement("span",{className:"chevron",key:r},n.createElement("i",{className:"material-icons"},"keyboard_arrow_right"),n.createElement(L.N_,{to:e.href,onClick:t.clickFun},decodeURIComponent(e.value)))}))))}var A=r(6007),j=r(5997),O=r(7952),P=r(5726),N=r(3459),F=r(7856),C=r(4238),I=r(4944),G=r(7704),T=r(4405),M=r(505);function z(t){return z="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},z(t)}function Y(){Y=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:S(t,r,c)}),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(N([])));x&&x!==r&&n.call(x,a)&&(b=x);var L=w.prototype=m.prototype=Object.create(b);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(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"==z(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){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===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=y,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?y:p,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,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")),v;var i=s(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;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,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function j(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 O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(z(e)+" is not iterable")}return g.prototype=w,o(L,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},_(k.prototype),l(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(L),l(L,u,"Generator"),l(L,a,(function(){return this})),l(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,P.prototype={constructor:P,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(O),!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,v):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),v},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),O(r),v}},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;O(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function K(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 X(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){K(i,n,o,a,c,"next",t)}function c(t){K(i,n,o,a,c,"throw",t)}a(void 0)}))}}function $(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return U(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?U(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function W(t){var e=$((0,n.useState)(null),2),r=e[0],o=e[1],c=$((0,i.L4)(a.A.fileShellShow),2),u=c[0],l=(c[1],$((0,i.L4)(a.A.file_shell_hidden),2)),f=l[0],s=(l[1],$((0,n.useState)(!1),2)),h=s[0],p=s[1],d=function(){var t=X(Y().mark((function t(){var e,r,n;return Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=new F.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:"#000000",cursor:"#000000",selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4}),n=function(t){e.write(t)},r=function(t){e.clear(),e.write(t),r=n},I.ws.addMsg(C.HK.shell_getting,(function(t){r(t.context)})),I.ws.addMsg(C.HK.shell_copy,(function(t){t.context&&(0,M.l)(t.context),e.focus()})),e.onData(function(){var t=X(Y().mark((function t(e){var r;return Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new C.hf(C.HK.shell_send)).context=e,t.next=4,I.ws.send(r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),o(e);case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),y=function(){X(Y().mark((function t(){return Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r&&(r.dispose(),o(null)),I.ws.isAilive()&&I.ws.setPromise(function(){var t=X(Y().mark((function t(e){return Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,I.ws.unConnect();case 2:e();case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 2:case"end":return t.stop()}}),t)})))()};return(0,n.useEffect)((function(){return function(){y()}}),[]),(0,n.useEffect)((function(){if(u.show)if(r){if(h){var t=new C.hf(C.HK.shell_cd),e=new T.n;e.init_path=u.path,e.http_token=localStorage.getItem("token"),t.context=e,I.ws.send(t)}}else d(),p(!0);else y()}),[u]),n.createElement(G.$,{show:u.show,file_shell_hidden:f,terminal:r,init:function(t,e){r.writeln("[38;2;29;153;243mopen shell...[0m ");var n=new C.hf(C.HK.shell_open),o=new T.n;o.init_path=u.path,o.rows=t,o.cols=e,o.http_token=localStorage.getItem("token"),n.context=o,I.ws.send(n)}})}var D,H,q=r(9214),B=r(5725),R=r(3033),Z=r(2042),J=r(7523),V=r(8815),Q=r(2730),tt=r(447),et=r(7481),rt=r(7071),nt=r(8062);function ot(t){return ot="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},ot(t)}function it(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=st(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function at(t){return function(t){if(Array.isArray(t))return ht(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||st(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 ct(){ct=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:S(t,r,c)}),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(N([])));x&&x!==r&&n.call(x,a)&&(b=x);var L=w.prototype=m.prototype=Object.create(b);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(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"==ot(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){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===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=y,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?y:p,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,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")),v;var i=s(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;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,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function j(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 O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(ot(e)+" is not iterable")}return g.prototype=w,o(L,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},_(k.prototype),l(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(L),l(L,u,"Generator"),l(L,a,(function(){return this})),l(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,P.prototype={constructor:P,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(O),!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,v):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),v},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),O(r),v}},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;O(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function ut(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 lt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){ut(i,n,o,a,c,"next",t)}function c(t){ut(i,n,o,a,c,"throw",t)}a(void 0)}))}}function ft(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)||st(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 st(t,e){if(t){if("string"==typeof t)return ht(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)?ht(t,e):void 0}}function ht(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 pt,dt,yt=-1;function vt(t){var e=(0,p.Bd)().t,r=ft((0,i.L4)(a.A.workflow_show),2),o=(r[0],r[1]),c=ft((0,n.useState)([]),2),u=c[0],f=c[1],s=ft((0,n.useState)([]),2),h=s[0],d=s[1],y=ft((0,n.useState)(!1),2),v=y[0],m=y[1],g=ft((0,n.useState)(void 0),2),w=g[0],b=g[1],E=ft((0,n.useState)([]),2),x=E[0],L=E[1],_=ft((0,n.useState)(-1),2),k=_[0],S=_[1],A=ft((0,n.useState)(10),2),P=A[0],N=(A[1],ft((0,n.useState)(0),2)),T=N[0],M=N[1],z=ft((0,n.useState)(0),2),Y=z[0],K=z[1],X=[e("序号"),e("运行名称"),e("状态"),e("运行时长"),e("日期"),e("操作")],$=[e("名称"),e("状态"),e("cwd"),e("运行时长"),e("操作")],U=function(){var t=lt(ct().mark((function t(e){var r,n,o;return ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new rt._).page_num=null!=e?e:k,r.page_size=P,r.dir_path="".concat((0,l.GG)("file",(0,l.vX)())),t.next=6,I.ws.sendData(C.HK.workflow_get,r);case 6:if(n=t.sent){t.next=9;break}return t.abrupt("return");case 9:o=n.context,f(o.list.map((function(t){var e="string"==typeof t.meta?JSON.parse(t.meta):t.meta;return e.index=t.index,e}))),M(o.total),K(parseInt((o.total/P).toFixed(0)));case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),W=function(){var t=lt(ct().mark((function t(){var e;return ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=new F.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:"#000000",cursor:"#000000",selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4,convertEol:!0}),H=e,b(e);case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();(0,n.useEffect)((function(){return m(!1),D=void 0,H=void 0,yt=-1,U(),lt(ct().mark((function t(){return ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:H&&(H.dispose(),H=null);case 1:case"end":return t.stop()}}),t)})))}),[]);var q=function(){var t=lt(ct().mark((function t(e){var r,n,o,i,a,c;return ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.is_running){t.next=2;break}return t.abrupt("return");case 2:return L([]),(r=new rt._).index=e.index,r.dir_path="".concat((0,l.GG)("file",(0,l.vX)())),t.next=8,I.ws.sendData(C.HK.workflow_get,r);case 8:n=t.sent,o=n.context,i="string"==typeof o.one_data.data?JSON.parse(o.one_data.data):o.one_data.data,a=i.success_list,c=i.fail_list,d([].concat(at(c),at(a)));case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),J=function(t,e,r){if(e){var o,i=it(null!=e?e:[]);try{for(i.s();!(o=i.n()).done;){var a,c,u,l=o.value,f=void 0,s=[];l["use-yml"]?(J(s,void 0,l.use_job_children_list),f="".concat(l["use-yml"]," ;").concat(null!==(c=l.duration)&&void 0!==c?c:-1)):f="".concat(l.run," ;").concat(null!==(u=l.duration)&&void 0!==u?u:-1),f=n.createElement("div",null,n.createElement(tt.fq,{success:void 0===l.code?void 0:0===l.code}),"$",f),t.push({name:f,children:s,extra_data:{code:l.code,context:null!==(a=l.success_message)&&void 0!==a?a:l.fail_message}})}}catch(t){i.e(t)}finally{i.f()}}else if(r){var h,p=it(null!=r?r:[]);try{for(p.s();!(h=p.n()).done;){var d=h.value;t.push({name:d.name,extra_data:{code:d.code,is_job:!0,job_data:d}})}}catch(t){p.e(t)}finally{p.f()}}},V=function(){var t=lt(ct().mark((function t(e){var r,n;return ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=e.steps,J(n=[],null!=r?r:[]),L(n);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Q=function(){var t=lt(ct().mark((function t(e){return ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(w){t.next=3;break}return t.next=3,new Promise((function(t){D=t,m(!0),W()}));case 3:e&&(H.clear(),H.write(e));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ot=function(){var t=lt(ct().mark((function t(e){var r,n,o;return ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==e||null===(r=e.extra_data)||void 0===r||!r.is_job){t.next=4;break}return t.next=3,V(e.extra_data.job_data);case 3:return t.abrupt("return");case 4:if(null==e||null===(n=e.extra_data)||void 0===n||!n.context){t.next=8;break}Q(e.extra_data.context),t.next=11;break;case 8:if(null!=e&&e.extra_data.code){t.next=10;break}return t.abrupt("return");case 10:Q(null!==(o=e.extra_data.code)&&void 0!==o?o:"");case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(O.A,null,w&&n.createElement(j.rA,{icon:"print",title:"打印日志",onClick:function(){m(!v)}}),n.createElement(j.rA,{icon:"close",title:e("关闭"),onClick:function(){o(!1)}})),n.createElement(B.jW,{isFull:!0,more:!0},n.createElement(B.NN,null,n.createElement(B.xh,null,n.createElement(B.fI,null,n.createElement(B.VP,null,n.createElement(tt.uF,{self_title:n.createElement("span",{className:" div-row "},n.createElement("h2",null,e("历史记录"))),titleCom:n.createElement("div",null,n.createElement(j.rA,{icon:"refresh",title:e("刷新"),onClick:function(){}})),rightBottomCom:n.createElement("span",{className:" div-row "},n.createElement("span",null,"total ",T," "),n.createElement(R.Sm,{placeholder:"max page ".concat(Y),handleInputChange:function(t){yt=parseInt(t)},handlerEnter:function(){yt<1||yt>Y?(0,Z.zN)("illegal page num"):U(0-yt)}}),n.createElement(j.rA,{icon:"navigate_before",onClick:function(){var t=k+1;t>-1?(0,Z.zN)("max page num"):(S(t),U(t))},title:"上一页"}),n.createElement(j.rA,{icon:"navigate_next",onClick:function(){var t=k-1;Math.abs(t)>Y?(0,Z.zN)("min page num"):(S(t),U(t))},title:"下一页"}))},n.createElement(et.X,{headers:X,rows:u.map((function(t,r){var o;return o=t.is_running?n.createElement("div",null,n.createElement(tt.fq,null),e("正在运行")):n.createElement("div",null,n.createElement(tt.fq,{success:t.is_success}),t.is_success?e("成功"):e("失败")),[n.createElement("p",null,t.index),n.createElement("p",null,t["run-name"]),o,n.createElement("span",null,t.duration),n.createElement("span",null,t.timestamp),n.createElement("div",null,n.createElement(j.rA,{icon:"details",title:e("详情"),onClick:function(){q(t)}}))]})),width:"10rem"}))),n.createElement(B.VP,null,n.createElement(tt.Zp,{title:e("Job")},n.createElement(et.X,{headers:$,rows:h.map((function(t,r){return[n.createElement("p",null,t.name),n.createElement("div",null,n.createElement(tt.fq,{success:void 0===t.code?void 0:0===t.code}),0===t.code?e("成功"):e("失败")),n.createElement("p",null,t.cwd),n.createElement("span",null,t.duration),n.createElement("div",null,n.createElement(j.rA,{icon:"details",title:e("详情"),onClick:function(){V(t)}}),(!!t.success_message||!!t.fail_message)&&n.createElement(j.rA,{icon:"print",title:e("日志"),onClick:function(){var e;Q(null!==(e=t.success_message)&&void 0!==e?e:t.fail_message)}}))]})),width:"10rem"})),n.createElement(tt.Zp,{title:"Step"},n.createElement(nt.A,{list:x,click:function(t){ot(t)}}))))))),n.createElement("div",{style:{display:v?"":"none"}},n.createElement(G.$,{show:!0,terminal:w,init:function(){D&&(D(1),D=void 0)}})))}function mt(t){return mt="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},mt(t)}function gt(){gt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:S(t,r,c)}),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(N([])));x&&x!==r&&n.call(x,a)&&(b=x);var L=w.prototype=m.prototype=Object.create(b);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(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"==mt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){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===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=y,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?y:p,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,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")),v;var i=s(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;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,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function j(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 O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(mt(e)+" is not iterable")}return g.prototype=w,o(L,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},_(k.prototype),l(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(L),l(L,u,"Generator"),l(L,a,(function(){return this})),l(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,P.prototype={constructor:P,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(O),!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,v):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),v},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),O(r),v}},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;O(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function wt(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 bt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){wt(i,n,o,a,c,"next",t)}function c(t){wt(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Et(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)||xt(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 xt(t,e){if(t){if("string"==typeof t)return Lt(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)?Lt(t,e):void 0}}function Lt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function _t(t){var e=(0,p.Bd)().t,r=Et((0,i.L4)(a.A.workflow_realtime_show),2),o=r[0],c=r[1],u=Et((0,n.useState)([]),2),f=(u[0],u[1],Et((0,n.useState)([]),2)),s=(f[0],f[1],Et((0,n.useState)(!1),2)),h=s[0],d=s[1],y=Et((0,n.useState)(void 0),2),v=y[0],m=(y[1],Et((0,n.useState)([]),2)),g=m[0],w=m[1],b=(e("序号"),e("运行名称"),e("状态"),e("运行时长"),e("日期"),e("操作"),e("名称"),e("状态"),e("cwd"),e("运行时长"),e("操作"),function(t){var e,r=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=xt(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}(t);try{for(r.s();!(e=r.n()).done;){var o,i,a,c=e.value;(null==c||null===(o=c.extra_data)||void 0===o?void 0:o.running_type)===rt.rl.success?c.name=n.createElement("div",null,n.createElement(tt.fq,{success:!0}),c.name):(null==c||null===(i=c.extra_data)||void 0===i?void 0:i.running_type)===rt.rl.fail?c.name=n.createElement("div",null,n.createElement(tt.fq,{success:!1}),c.name):(null==c||null===(a=c.extra_data)||void 0===a?void 0:a.running_type)===rt.rl.running&&(c.name=n.createElement("div",null,n.createElement(tt.fq,{running:!0}),c.name)),c.children&&b(c.children)}}catch(t){r.e(t)}finally{r.f()}}),E=function(){var t=bt(gt().mark((function t(e){var r;return gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(r=new rt.v3).filename_path="".concat((0,l.GG)("file",(0,l.vX)())).concat(o.filename),I.ws.addMsg(C.HK.workflow_realtime_one_rsq,(function(t){!0===t.context.done?(0,Z.LW)("done!"):!1===t.context.done&&(0,Z.zN)("done!");var e=t.context.list;b(e),w(e)})),I.ws.sendData(C.HK.workflow_realtime_one_req,r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return(0,n.useEffect)((function(){return d(!1),pt=void 0,dt=void 0,E(),bt(gt().mark((function t(){return gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:I.ws.removeMsg(C.HK.workflow_realtime_one_rsq),dt&&(dt.dispose(),dt=null);case 2:case"end":return t.stop()}}),t)})))}),[]),n.createElement("div",null,n.createElement(O.A,null,v&&n.createElement(j.rA,{icon:"print",title:"打印日志",onClick:function(){d(!h)}}),n.createElement(j.rA,{icon:"close",title:e("关闭"),onClick:function(){c({open:!1})}})),n.createElement(B.jW,{isFull:!0,more:!0},n.createElement(B.NN,null,n.createElement(nt.A,{list:g,click:function(t){}}))),n.createElement("div",{style:{display:h?"":"none"}},n.createElement(G.$,{show:!0,terminal:v,init:function(){pt&&(pt(1),pt=void 0)}})))}function kt(t){return kt="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},kt(t)}function St(){return St=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},St.apply(null,arguments)}function At(){At=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:S(t,r,c)}),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(N([])));x&&x!==r&&n.call(x,a)&&(b=x);var L=w.prototype=m.prototype=Object.create(b);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(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"==kt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){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===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=y,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?y:p,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,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")),v;var i=s(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;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,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function j(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 O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(kt(e)+" is not iterable")}return g.prototype=w,o(L,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},_(k.prototype),l(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(L),l(L,u,"Generator"),l(L,a,(function(){return this})),l(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,P.prototype={constructor:P,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(O),!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,v):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),v},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),O(r),v}},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;O(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function jt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Ft(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function Ot(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 Pt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Ot(i,n,o,a,c,"next",t)}function c(t){Ot(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Nt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||Ft(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 Ft(t,e){if(t){if("string"==typeof t)return Ct(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)?Ct(t,e):void 0}}function Ct(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 It,Gt,Tt=function(t){return t.block="",t.gallery="gallery",t.list="list",t}({}),Mt=Object.values(Tt),zt=280;function Yt(){var t=Nt((0,i.L4)(a.A.editorSetting),2),e=(t[0],t[1]),r=Nt((0,i.L4)(a.A.file_preview),2),f=(r[0],r[1]),h=(0,p.Bd)().t,y=(0,n.useRef)(null),v=(0,c.zy)(),m=(0,c.Zp)(),g=Nt((0,i.L4)(a.A.nowFileList),2),w=g[0],b=g[1],E=Nt((0,i.L4)(a.A.fileShowType),2),L=E[0],_=E[1],k=Nt((0,i.L4)(a.A.uploadFiles),2),F=(k[0],k[1]),G=Nt((0,i.L4)(a.A.showPrompt),2),T=(G[0],G[1]),M=Nt((0,i.L4)(a.A.selectedFileList),2),z=M[0],Y=(M[1],Nt((0,i.L4)(a.A.copyedFileList),2)),K=Y[0],X=Y[1],$=Nt((0,i.L4)(a.A.enterKey),2),U=($[0],$[1]),D=Nt((0,i.L4)(a.A.cutedFileList),2),H=D[0],et=D[1],nt=Nt((0,i.L4)(a.A.selectedFileList),2),ot=(nt[0],nt[1]),it=Nt((0,i.L4)(a.A.clickFileList),2),at=(it[0],it[1]),ct=Nt((0,i.L4)(a.A.fileShellShow),2),ut=ct[0],lt=ct[1],ft=Nt((0,i.L4)(a.A.file_root_list),2),st=ft[0],ht=(ft[1],Nt((0,i.L4)(a.A.file_root_index),2)),pt=ht[0],dt=ht[1],yt=Nt((0,n.useState)(void 0),2),mt=yt[0],gt=yt[1],wt=Nt((0,n.useState)(""),2),bt=wt[0],Et=wt[1],xt=Nt((0,i.L4)(a.A.workflow_show),2),Lt=xt[0],kt=xt[1],Ot=Nt((0,i.L4)(a.A.workflow_realtime_show),2),Ft=Ot[0],Ct=(Ot[1],Nt((0,n.useState)(!1),2)),Tt=Ct[0],Yt=Ct[1],Kt=(0,n.useContext)(J.F).reloadUserInfo,Xt=(0,d.kZ)().click_file,$t=Nt((0,i.L4)(a.A.prompt_card),2),Ut=($t[0],$t[1]),Wt=(0,d.hg)().file_is_running,Dt=Nt((0,i.L4)(a.A.to_running_files),2),Ht=(Dt[0],Dt[1]),qt=function(){var t=Pt(At().mark((function t(){var e;return At().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=new rt.Nd).dir_path="".concat((0,l.GG)("file",(0,l.vX)())),I.ws.addMsg(C.HK.workflow_realtime,(function(t){var e,r,n=new Set(null!==(e=t.context)&&void 0!==e?e:[]),o=jt(null!=Gt?Gt:[]);try{for(o.s();!(r=o.n()).done;){var i=r.value;n.has(i)||(0,Z.LW)("".concat(i.slice(0,-13)," done!"))}}catch(t){o.e(t)}finally{o.f()}Gt=n,Ht(n)})),t.next=5,I.ws.sendData(C.HK.workflow_realtime,e);case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Bt=function(){var t=Pt(At().mark((function t(){var e,r,n,o,i,a,c,u,f,s;return At().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,A.$M.get(encodeURIComponent((0,l.GG)("file",(0,l.vX)())));case 2:if((n=t.sent).code!==N.m.PreFile){t.next=6;break}return Xt({name:n.message,context:n.data}),t.abrupt("return");case 6:if(n.code===N.m.Sucess){t.next=9;break}return n.message&&(0,Z.zN)(n.message),t.abrupt("return");case 9:o=n.data,i=!1,a=jt(null!==(e=o.files)&&void 0!==e?e:[]);try{for(a.s();!(c=a.n()).done;)(u=c.value).origin_size=u.size,u.size=(0,V.v7)(u.size),u.name.endsWith("workflow.yml")&&!i&&(i=!0,qt())}catch(t){a.e(t)}finally{a.f()}f=jt(null!==(r=o.folders)&&void 0!==r?r:[]);try{for(f.s();!(s=f.n()).done;)s.value.name===rt.SB&&(Yt(!0),i||qt())}catch(t){f.e(t)}finally{f.f()}b(n.data),It=n.data;case 17:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Rt=function(){var t=Math.floor(document.querySelector("main").offsetWidth/zt);0===t&&(t=1),gt("calc(".concat(100/t,"% - 1em)"))};(0,n.useEffect)((function(){var t=function(){var t=Pt(At().mark((function t(){return At().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Bt();case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return t(),e({open:!1}),f({open:!1}),Yt(!1),Gt=void 0,Pt(At().mark((function t(){return At().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,I.ws.unConnect();case 2:Ht(new Set);case 3:case"end":return t.stop()}}),t)})))}),[v]);var Zt=function(){var t=Pt(At().mark((function t(e){var r,n,o,i;return At().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.preventDefault(),r=e.dataTransfer,n=e.target,!(r.files.length<=0)){t.next=5;break}return t.abrupt("return");case 5:for(o=0;o<5;o++)null===n||n.classList.contains("item")||(n=n.parentElement);return t.next=8,(0,P.T)(r);case 8:i=t.sent,F(i),T({show:!0,type:s.PromptEnum.FilesUpload,overlay:!1,data:{}});case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Jt=function(t){t.preventDefault()};function Vt(t){(0,Z.LW)(t)}(0,n.useEffect)((function(){var t=y.current.ownerDocument;return t.addEventListener("dragover",Jt),t.addEventListener("drop",Zt),Rt(),window.addEventListener("resize",Rt),function(){t.removeEventListener("dragover",Jt),t.removeEventListener("drop",Zt),window.removeEventListener("resize",Rt),ut.show&<({show:!1,path:""})}}),[]);var Qt=function(){var t=Pt(At().mark((function t(e){return At().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return dt(e),t.next=3,A.$M.post("base_switch",{root_index:e});case 3:return t.next=5,Kt();case 5:m("/file/"),ot([]),at([]);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),te=function(){var t=Pt(At().mark((function t(){var e,r;return At().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,A.$M.post("file/info",{type:o.Iw.folder,path:(0,l.GG)("file",(0,l.vX)())});case 2:(e=t.sent).code===N.m.Sucess&&Ut({open:!0,title:"信息",context_div:n.createElement("div",null,n.createElement(B.Yh,{left:h("挂载位置磁盘"),right:e.data&&e.data.total_size}),n.createElement(B.Yh,{left:"".concat(h("磁盘剩余")),right:e.data&&e.data.left_size}),n.createElement(B.Yh,{left:"".concat(h("文件系统")),right:e.data&&e.data.fs_type}),n.createElement(B.Yh,{left:"".concat(h("文件夹数")),right:w.folders.length}),n.createElement(B.Yh,{left:"".concat(h("文件数")),right:w.files.length}),n.createElement(B.Yh,{left:"".concat(h("当前位置")),right:n.createElement(tt.xP,{context:null==e||null===(r=e.data)||void 0===r?void 0:r.now_absolute_path})}))});case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),ee=Nt((0,n.useState)(!1),2),re=ee[0],ne=ee[1];(0,n.useEffect)((function(){var t=function(t){if(re)if(t.ctrlKey)if("a"===t.key||"A"===t.key){for(var e=w.files.length,r=w.folders.length,n=[],o=0;o<e+r;o++)n.push(o);ot(n)}else U("ctrl");else"Escape"===t.key?ot([]):"Shift"===t.key&&U("shift")},e=function(t){t.ctrlKey||U("")};return window.addEventListener("keydown",t),window.addEventListener("keyup",e),function(){window.removeEventListener("keydown",t),window.removeEventListener("keyup",e)}}),[w,re]);var oe=function(t){t.target===t.currentTarget&&ot([])};return n.createElement("div",{className:"not-select-div"},n.createElement(O.A,{left_children:n.createElement(R.$Z,{handleEnterPress:function(){var t,e;if(It){ot([]),at([]);var r,n=[],o=[],i=jt(null!==(t=It.files)&&void 0!==t?t:[]);try{for(i.s();!(r=i.n()).done;){var a=r.value;a.name.includes(bt)&&n.push(a)}}catch(t){i.e(t)}finally{i.f()}var c,u=jt(null!==(e=It.folders)&&void 0!==e?e:[]);try{for(u.s();!(c=u.n()).done;){var l=c.value;l.name.includes(bt)&&o.push(l)}}catch(t){u.e(t)}finally{u.f()}b({files:n,folders:o})}},placeholder:h("搜索当前目录"),icon:"search",value:"",handleInputChange:function(t){Et(t)},max_width:"25em"})},z.length>0&&n.createElement(j.rA,{icon:"delete",title:h("删除"),onClick:function(){T({show:!0,type:s.PromptEnum.FilesDelete,overlay:!0,data:{}})}}),z.length>0&&n.createElement(j.rA,{icon:"content_copy",title:h("复制"),onClick:function(){var t=(0,q.i)(w,z);X(t.map((function(t){return(0,q.O)(t.name)}))),et([]),Vt("已复制")}}),z.length>0&&n.createElement(j.rA,{icon:"content_cut",title:h("剪切"),onClick:function(){var t=(0,q.i)(w,z);et(t.map((function(t){return(0,q.O)(t.name)}))),X([]),Vt("已剪切")}}),(K.length>0||H.length>0)&&n.createElement(j.rA,{onClick:function(){T({show:!0,type:s.PromptEnum.Confirm,overlay:!0,data:{}})},icon:"content_paste",title:h("粘贴到此处"),tip:K.length+H.length}),z.length>0&&n.createElement(j.rA,{icon:"download",title:h("下载"),onClick:function(){for(var t=(0,q.i)(w,z),e=0;e<t.length;e++){var r=t[e];t[e]=encodeURIComponent((0,q.O)(r.name))}var n=A.$M.getDownloadUrl(t);window.open(n)}}),z.length>0&&n.createElement(j.rA,{icon:"compress",title:h("压缩"),onClick:function(){for(var t=(0,q.i)(w,z),e=0;e<t.length;e++){var r=t[e];t[e]=(0,q.O)(r.name)}t&&0!==t.length?T({show:!0,type:s.PromptEnum.Compress,overlay:!0,data:{files:t}}):(0,Z.zN)("没有选中")}}),1===z.length&&n.createElement(j.rA,{icon:"edit_attributes",title:h("重命名"),onClick:function(){T({show:!0,type:s.PromptEnum.FileRename,overlay:!0,data:{}})}}),Tt&&n.createElement(j.rA,{icon:"api",title:"workflow",onClick:function(){kt(!Lt)}}),n.createElement(j.rA,{icon:"terminal",title:"shell",onClick:function(){ut.show?lt({show:!1,path:""}):lt({show:!0,path:(0,l.GG)("file",(0,l.vX)())})}}),n.createElement(j.rA,{icon:"grid_view",title:h("切换样式"),onClick:function(){_((0,u.jH)(Mt,L))}}),n.createElement(j.rA,{icon:"create_new_folder",title:h("创建文件夹"),onClick:function(){T({show:!0,type:s.PromptEnum.DirNew,overlay:!0,data:{dir:(0,l.GG)("file",(0,l.vX)())}})}}),n.createElement(j.rA,{icon:"note_add",title:h("创建文本文件"),onClick:function(){T({show:!0,type:s.PromptEnum.FileNew,overlay:!0,data:{dir:(0,l.GG)("file",(0,l.vX)())}})}}),n.createElement(j.rA,{icon:"upload_file",title:"上传",onClick:function(){T({show:!0,type:s.PromptEnum.UploadFile,overlay:!0,data:{call:function(t){var e,r=null===(e=t.currentTarget)||void 0===e?void 0:e.files;if(r){for(var n=!!r[0].webkitRelativePath,o=[],i=new Set,a=0;a<r.length;a++){var c=r[a],u=n?c.webkitRelativePath:"".concat(c.webkitRelativePath).concat(c.name);c.fullPath=u,n&&i.add((0,Q.S)(u)),o.push(c)}var l=[];if(n){var f,h=jt(i);try{for(h.s();!(f=h.n()).done;){var p=f.value;l.push({isDir:!0,fullPath:p,name:p})}}catch(t){h.e(t)}finally{h.f()}}l.push.apply(l,o),F(l),T({show:!0,type:s.PromptEnum.FilesUpload,overlay:!1,data:{}})}}}})}}),n.createElement(j.rA,{icon:"info",title:h("信息"),onClick:te}),n.createElement(B.EF,{title:h("切换目录"),items:st,click:function(t){Qt(t)},pre_value:pt})),n.createElement("div",{id:"listing",className:"mosaic file-icons ".concat(L),ref:y,onMouseEnter:function(){ne(!0)},onMouseLeave:function(){ne(!1)}},n.createElement(S,{baseRoute:"file",clickFun:function(){ot([]),at([])}}),w.folders&&w.folders.length>0&&n.createElement("h2",null,h("文件夹")),w.folders&&n.createElement("div",{onClick:oe},w.folders.map((function(t,e){return n.createElement(x,St({itemWidth:mt,index:e,key:e},t))}))),w.files&&w.files.length>0&&n.createElement("h2",{onClick:oe},h("文件")),w.files&&n.createElement("div",{onClick:oe},w.files.map((function(t,e){return n.createElement(x,St({icon:Wt(t.name)?"refresh":void 0,itemWidth:mt,index:e+w.folders.length,key:e},t))})))),n.createElement(W,null),Lt&&n.createElement(vt,null),Ft.open&&n.createElement(_t,null))}}}]);
|
|
2
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[663],{8062:(t,e,r)=>{r.d(e,{A:()=>c});var n=r(6540);function o(){return o=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},o.apply(null,arguments)}function i(t){return n.createElement("div",{className:"black-tip",onClick:function(){t.click&&t.click(t)},onContextMenu:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),t.onContextMenu&&t.onContextMenu(e,t)}},t.name)}var a=function(t){return n.createElement("li",null,t.click?n.createElement(i,o({},t.node,{name:t.render?t.render(t.node):t.node.name,click:t.click,onContextMenu:t.onContextMenu})):n.createElement("div",null,t.render?t.render(t.node):t.node.name),t.node.children&&t.node.children.length>0&&n.createElement("ul",null,t.node.children.map((function(e,r){return n.createElement(a,{key:r,node:e,click:t.click,onContextMenu:t.onContextMenu,render:t.render})}))))};const c=function(t){return n.createElement("div",{className:"card-tree-view"},n.createElement("ul",null,t.list&&t.list.map((function(e,r){return n.createElement(a,{key:r,node:e,click:t.click,onContextMenu:t.onContextMenu,render:t.render})}))))}},3663:(t,e,r)=>{r.r(e),r.d(e,{FileListShowTypeEmum:()=>Tt,default:()=>Yt});var n=r(6540),o=r(7022),i=r(7444),a=r(6417),c=r(7767),u=r(4694),l=r(4289),f=r(8844),s=r(2869),h=r(4251),p=r(2389),d=r(8247);function y(t){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y(t)}function v(){v=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof w?e:w,a=Object.create(i.prototype),c=new F(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",p="suspendedYield",d="executing",m="completed",g={};function w(){}function b(){}function E(){}var x={};l(x,a,(function(){return this}));var L=Object.getPrototypeOf,_=L&&L(L(C([])));_&&_!==r&&n.call(_,a)&&(x=_);var k=E.prototype=w.prototype=Object.create(x);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function r(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==y(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function 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=O(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?m:p,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=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 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 F(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(y(e)+" is not iterable")}return b.prototype=E,o(k,"constructor",{value:E,configurable:!0}),o(E,"constructor",{value:b,configurable:!0}),b.displayName=l(E,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,l(t,u,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},S(A.prototype),l(A.prototype,c,(function(){return this})),e.AsyncIterator=A,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new A(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(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=C,F.prototype={constructor:F,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(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:C(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function m(t){return function(t){if(Array.isArray(t))return E(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||b(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 g(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 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)||b(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 b(t,e){if(t){if("string"==typeof t)return E(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)?E(t,e):void 0}}function E(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 x(t){var e=w((0,i.L4)(a.A.selectedFileList),2),r=e[0],y=e[1],b=w((0,i.L4)(a.A.clickFileList),2),E=b[0],x=b[1],L=w((0,i.L4)(a.A.enterKey),2),_=L[0],k=(L[1],(0,d.kZ)().click_file),S=((0,p.Bd)().t,(0,c.Zp)()),A=((0,c.zy)(),function(){var e,n=(e=v().mark((function e(n,i){var a,c,f,s,h,p;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(0,u.kW)(r,n))y((0,u.P1)(r,n));else if("ctrl"===_)y([].concat(m(r),[n]));else if("shift"===_){if(a=(0,u.a7)(r),c=a.max,f=a.min,s=[],n>=c)for(h=c;h<=n;h++)s.push(h);else for(p=f;p>=n;p--)s.push(p);y(s)}else y([n]);if(x([].concat(m(E),[n])),setTimeout((function(){x((0,u.P1)(E,n))}),300),t.type!==o.Iw.folder){e.next=13;break}if(void 0===E.find((function(t){return t===n}))){e.next=11;break}return S((0,u.IO)((0,l.vX)(),i)),y([]),x([]),e.abrupt("return");case 11:e.next=15;break;case 13:void 0!==E.find((function(t){return t===n}))&&k({name:i,size:t.origin_size});case 15:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){g(i,n,o,a,c,"next",t)}function c(t){g(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t,e){return n.apply(this,arguments)}}()),j=w((0,i.L4)(a.A.showPrompt),2),O=(j[0],j[1]);return n.createElement(f.B,{extraAttr:{onContextMenu:function(e){!function(t,e,r,n){t.preventDefault();var i=new h.i;i.path=(0,u.IO)((0,l.vX)(),e),i.filename=e,i.x=t.clientX,i.y=t.clientY,i.type=r?o.Iw.folder:(0,h.u)(e),i.size=n,O({show:!0,type:s.PromptEnum.FileMenu,overlay:!1,data:i})}(e,t.name,t.type===o.Iw.folder,t.origin_size)}},name:t.name,index:t.index,mtime:t.mtime,size:t.size,type:t.type,isLink:t.isLink,path:t.path,icon:t.icon,click:A,itemWidth:t.itemWidth})}var L=r(4976);function _(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return k(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?k(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function S(t){var e=(0,c.zy)(),r=_((0,n.useState)([]),2),o=r[0],i=r[1],a=_((0,n.useState)("/"),2),f=a[0],s=a[1];return n.useEffect((function(){var e="",r=(0,l.vX)().split("/");r=r.filter((function(t){return t}));var n=r.indexOf(t.baseRoute),o=[];if(-1!=n){e=(0,u.IO)(r.slice(0,n),t.baseRoute);for(var a=r.slice(n+1),c=0;c<a.length;c++){var f=a[c];o.push({value:f,href:0===c?"".concat(e).concat(f,"/"):(0,u.IO)(o[c-1].href,f)})}s(e),i(o)}}),[e]),n.createElement("div",{className:"breadcrumbs"},n.createElement("span",null,n.createElement("span",{className:"chevron"},n.createElement(L.N_,{to:f,onClick:t.clickFun},n.createElement("i",{className:"material-icons"},"home"))),o.map((function(e,r){return n.createElement("span",{className:"chevron",key:r},n.createElement("i",{className:"material-icons"},"keyboard_arrow_right"),n.createElement(L.N_,{to:e.href,onClick:t.clickFun},decodeURIComponent(e.value)))}))))}var A=r(6007),j=r(5997),O=r(7952),P=r(5726),N=r(3459),F=r(7856),C=r(4238),I=r(4944),G=r(7704),T=r(4405),M=r(505);function z(t){return z="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},z(t)}function Y(){Y=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:S(t,r,c)}),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(N([])));x&&x!==r&&n.call(x,a)&&(b=x);var L=w.prototype=m.prototype=Object.create(b);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(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"==z(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){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===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=y,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?y:p,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,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")),v;var i=s(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;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,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function j(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 O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(z(e)+" is not iterable")}return g.prototype=w,o(L,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},_(k.prototype),l(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(L),l(L,u,"Generator"),l(L,a,(function(){return this})),l(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,P.prototype={constructor:P,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(O),!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,v):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),v},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),O(r),v}},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;O(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function K(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 X(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){K(i,n,o,a,c,"next",t)}function c(t){K(i,n,o,a,c,"throw",t)}a(void 0)}))}}function $(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return U(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?U(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function W(t){var e=$((0,n.useState)(null),2),r=e[0],o=e[1],c=$((0,i.L4)(a.A.fileShellShow),2),u=c[0],l=(c[1],$((0,i.L4)(a.A.file_shell_hidden),2)),f=l[0],s=(l[1],$((0,n.useState)(!1),2)),h=s[0],p=s[1],d=function(){var t=X(Y().mark((function t(){var e,r,n;return Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=new F.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:"#000000",cursor:"#000000",selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4}),n=function(t){e.write(t)},r=function(t){e.clear(),e.write(t),r=n},I.ws.addMsg(C.HK.shell_getting,(function(t){r(t.context)})),I.ws.addMsg(C.HK.shell_copy,(function(t){t.context&&(0,M.l)(t.context),e.focus()})),e.onData(function(){var t=X(Y().mark((function t(e){var r;return Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new C.hf(C.HK.shell_send)).context=e,t.next=4,I.ws.send(r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),o(e);case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),y=function(){X(Y().mark((function t(){return Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r&&(r.dispose(),o(null)),I.ws.isAilive()&&I.ws.setPromise(function(){var t=X(Y().mark((function t(e){return Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,I.ws.unConnect();case 2:e();case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 2:case"end":return t.stop()}}),t)})))()};return(0,n.useEffect)((function(){return function(){y()}}),[]),(0,n.useEffect)((function(){if(u.show)if(r){if(h){var t=new C.hf(C.HK.shell_cd),e=new T.n;e.init_path=u.path,e.http_token=localStorage.getItem("token"),t.context=e,I.ws.send(t)}}else d(),p(!0);else y()}),[u]),n.createElement(G.$,{show:u.show,file_shell_hidden:f,terminal:r,init:function(t,e){r.writeln("[38;2;29;153;243mopen shell...[0m ");var n=new C.hf(C.HK.shell_open),o=new T.n;o.init_path=u.path,o.rows=t,o.cols=e,o.http_token=localStorage.getItem("token"),n.context=o,I.ws.send(n)}})}var D,H,q=r(9214),B=r(5725),R=r(3033),Z=r(2042),J=r(7523),V=r(8815),Q=r(2730),tt=r(447),et=r(7481),rt=r(7071),nt=r(8062);function ot(t){return ot="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},ot(t)}function it(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=st(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function at(t){return function(t){if(Array.isArray(t))return ht(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||st(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 ct(){ct=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:S(t,r,c)}),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(N([])));x&&x!==r&&n.call(x,a)&&(b=x);var L=w.prototype=m.prototype=Object.create(b);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(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"==ot(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){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===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=y,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?y:p,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,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")),v;var i=s(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;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,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function j(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 O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(ot(e)+" is not iterable")}return g.prototype=w,o(L,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},_(k.prototype),l(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(L),l(L,u,"Generator"),l(L,a,(function(){return this})),l(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,P.prototype={constructor:P,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(O),!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,v):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),v},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),O(r),v}},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;O(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function ut(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 lt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){ut(i,n,o,a,c,"next",t)}function c(t){ut(i,n,o,a,c,"throw",t)}a(void 0)}))}}function ft(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)||st(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 st(t,e){if(t){if("string"==typeof t)return ht(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)?ht(t,e):void 0}}function ht(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 pt,dt,yt=-1;function vt(t){var e=(0,p.Bd)().t,r=ft((0,i.L4)(a.A.workflow_show),2),o=(r[0],r[1]),c=ft((0,n.useState)([]),2),u=c[0],f=c[1],s=ft((0,n.useState)([]),2),h=s[0],d=s[1],y=ft((0,n.useState)(!1),2),v=y[0],m=y[1],g=ft((0,n.useState)(void 0),2),w=g[0],b=g[1],E=ft((0,n.useState)([]),2),x=E[0],L=E[1],_=ft((0,n.useState)(-1),2),k=_[0],S=_[1],A=ft((0,n.useState)(10),2),P=A[0],N=(A[1],ft((0,n.useState)(0),2)),T=N[0],M=N[1],z=ft((0,n.useState)(0),2),Y=z[0],K=z[1],X=[e("序号"),e("运行名称"),e("状态"),e("运行时长"),e("日期"),e("操作")],$=[e("名称"),e("状态"),e("cwd"),e("运行时长"),e("操作")],U=function(){var t=lt(ct().mark((function t(e){var r,n,o;return ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new rt._).page_num=null!=e?e:k,r.page_size=P,r.dir_path="".concat((0,l.GG)("file",(0,l.vX)())),t.next=6,I.ws.sendData(C.HK.workflow_get,r);case 6:if(n=t.sent){t.next=9;break}return t.abrupt("return");case 9:o=n.context,f(o.list.map((function(t){var e="string"==typeof t.meta?JSON.parse(t.meta):t.meta;return e.index=t.index,e}))),M(o.total),K(parseInt((o.total/P).toFixed(0)));case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),W=function(){var t=lt(ct().mark((function t(){var e;return ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=new F.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:"#000000",cursor:"#000000",selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4,convertEol:!0}),H=e,b(e);case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();(0,n.useEffect)((function(){return m(!1),D=void 0,H=void 0,yt=-1,U(),lt(ct().mark((function t(){return ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:H&&(H.dispose(),H=null);case 1:case"end":return t.stop()}}),t)})))}),[]);var q=function(){var t=lt(ct().mark((function t(e){var r,n,o,i,a,c;return ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.is_running){t.next=2;break}return t.abrupt("return");case 2:return L([]),(r=new rt._).index=e.index,r.dir_path="".concat((0,l.GG)("file",(0,l.vX)())),t.next=8,I.ws.sendData(C.HK.workflow_get,r);case 8:n=t.sent,o=n.context,i="string"==typeof o.one_data.data?JSON.parse(o.one_data.data):o.one_data.data,a=i.success_list,c=i.fail_list,d([].concat(at(c),at(a)));case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),J=function(t,e,r){if(e){var o,i=it(null!=e?e:[]);try{for(i.s();!(o=i.n()).done;){var a,c,u,l=o.value,f=void 0,s=[];l["use-yml"]?(J(s,void 0,l.use_job_children_list),f="".concat(l["use-yml"]," ;").concat(null!==(c=l.duration)&&void 0!==c?c:-1)):f="".concat(l.run," ;").concat(null!==(u=l.duration)&&void 0!==u?u:-1),f=n.createElement("div",null,n.createElement(tt.fq,{success:void 0===l.code?void 0:0===l.code}),"$",f),t.push({name:f,children:s,extra_data:{code:l.code,context:null!==(a=l.success_message)&&void 0!==a?a:l.fail_message}})}}catch(t){i.e(t)}finally{i.f()}}else if(r){var h,p=it(null!=r?r:[]);try{for(p.s();!(h=p.n()).done;){var d=h.value;t.push({name:d.name,extra_data:{code:d.code,is_job:!0,job_data:d}})}}catch(t){p.e(t)}finally{p.f()}}},V=function(){var t=lt(ct().mark((function t(e){var r,n;return ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=e.steps,J(n=[],null!=r?r:[]),L(n);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Q=function(){var t=lt(ct().mark((function t(e){return ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(w){t.next=3;break}return t.next=3,new Promise((function(t){D=t,m(!0),W()}));case 3:e&&(H.clear(),H.write(e));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ot=function(){var t=lt(ct().mark((function t(e){var r,n,o;return ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==e||null===(r=e.extra_data)||void 0===r||!r.is_job){t.next=4;break}return t.next=3,V(e.extra_data.job_data);case 3:return t.abrupt("return");case 4:if(null==e||null===(n=e.extra_data)||void 0===n||!n.context){t.next=8;break}Q(e.extra_data.context),t.next=11;break;case 8:if(null!=e&&e.extra_data.code){t.next=10;break}return t.abrupt("return");case 10:Q(null!==(o=e.extra_data.code)&&void 0!==o?o:"");case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(O.A,null,w&&n.createElement(j.rA,{icon:"print",title:"打印日志",onClick:function(){m(!v)}}),n.createElement(j.rA,{icon:"close",title:e("关闭"),onClick:function(){o(!1)}})),n.createElement(B.jW,{isFull:!0,more:!0},n.createElement(B.NN,null,n.createElement(B.xh,null,n.createElement(B.fI,null,n.createElement(B.VP,null,n.createElement(tt.uF,{self_title:n.createElement("span",{className:" div-row "},n.createElement("h2",null,e("历史记录"))),titleCom:n.createElement("div",null,n.createElement(j.rA,{icon:"refresh",title:e("刷新"),onClick:function(){}})),rightBottomCom:n.createElement("span",{className:" div-row "},n.createElement("span",null,"total ",T," "),n.createElement(R.Sm,{placeholder:"max page ".concat(Y),handleInputChange:function(t){yt=parseInt(t)},handlerEnter:function(){yt<1||yt>Y?(0,Z.zN)("illegal page num"):U(0-yt)}}),n.createElement(j.rA,{icon:"navigate_before",onClick:function(){var t=k+1;t>-1?(0,Z.zN)("max page num"):(S(t),U(t))},title:"上一页"}),n.createElement(j.rA,{icon:"navigate_next",onClick:function(){var t=k-1;Math.abs(t)>Y?(0,Z.zN)("min page num"):(S(t),U(t))},title:"下一页"}))},n.createElement(et.X,{headers:X,rows:u.map((function(t,r){var o;return o=t.is_running?n.createElement("div",null,n.createElement(tt.fq,null),e("正在运行")):n.createElement("div",null,n.createElement(tt.fq,{success:t.is_success}),t.is_success?e("成功"):e("失败")),[n.createElement("p",null,t.index),n.createElement("p",null,t["run-name"]),o,n.createElement("span",null,t.duration),n.createElement("span",null,t.timestamp),n.createElement("div",null,n.createElement(j.rA,{icon:"details",title:e("详情"),onClick:function(){q(t)}}))]})),width:"10rem"}))),n.createElement(B.VP,null,n.createElement(tt.Zp,{title:e("Job")},n.createElement(et.X,{headers:$,rows:h.map((function(t,r){return[n.createElement("p",null,t.name),n.createElement("div",null,n.createElement(tt.fq,{success:void 0===t.code?void 0:0===t.code}),0===t.code?e("成功"):e("失败")),n.createElement(tt.xP,null,t.cwd),n.createElement("span",null,t.duration),n.createElement("div",null,n.createElement(j.rA,{icon:"details",title:e("详情"),onClick:function(){V(t)}}),(!!t.success_message||!!t.fail_message)&&n.createElement(j.rA,{icon:"print",title:e("日志"),onClick:function(){var e;Q(null!==(e=t.success_message)&&void 0!==e?e:t.fail_message)}}))]})),width:"10rem"})),n.createElement(tt.Zp,{title:"Step"},n.createElement(nt.A,{list:x,click:function(t){ot(t)}}))))))),n.createElement("div",{style:{display:v?"":"none"}},n.createElement(G.$,{show:!0,terminal:w,init:function(){D&&(D(1),D=void 0)}})))}function mt(t){return mt="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},mt(t)}function gt(){gt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:S(t,r,c)}),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(N([])));x&&x!==r&&n.call(x,a)&&(b=x);var L=w.prototype=m.prototype=Object.create(b);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(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"==mt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){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===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=y,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?y:p,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,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")),v;var i=s(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;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,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function j(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 O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(mt(e)+" is not iterable")}return g.prototype=w,o(L,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},_(k.prototype),l(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(L),l(L,u,"Generator"),l(L,a,(function(){return this})),l(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,P.prototype={constructor:P,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(O),!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,v):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),v},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),O(r),v}},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;O(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function wt(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 bt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){wt(i,n,o,a,c,"next",t)}function c(t){wt(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Et(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)||xt(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 xt(t,e){if(t){if("string"==typeof t)return Lt(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)?Lt(t,e):void 0}}function Lt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function _t(t){var e=(0,p.Bd)().t,r=Et((0,i.L4)(a.A.workflow_realtime_show),2),o=r[0],c=r[1],u=Et((0,n.useState)([]),2),f=(u[0],u[1],Et((0,n.useState)([]),2)),s=(f[0],f[1],Et((0,n.useState)(!1),2)),h=s[0],d=s[1],y=Et((0,n.useState)(void 0),2),v=y[0],m=(y[1],Et((0,n.useState)([]),2)),g=m[0],w=m[1],b=(e("序号"),e("运行名称"),e("状态"),e("运行时长"),e("日期"),e("操作"),e("名称"),e("状态"),e("cwd"),e("运行时长"),e("操作"),function(t){var e,r=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=xt(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}(t);try{for(r.s();!(e=r.n()).done;){var o,i,a,c=e.value;(null==c||null===(o=c.extra_data)||void 0===o?void 0:o.running_type)===rt.rl.success?c.name=n.createElement("div",null,n.createElement(tt.fq,{success:!0}),c.name):(null==c||null===(i=c.extra_data)||void 0===i?void 0:i.running_type)===rt.rl.fail?c.name=n.createElement("div",null,n.createElement(tt.fq,{success:!1}),c.name):(null==c||null===(a=c.extra_data)||void 0===a?void 0:a.running_type)===rt.rl.running&&(c.name=n.createElement("div",null,n.createElement(tt.fq,{running:!0}),c.name)),c.children&&b(c.children)}}catch(t){r.e(t)}finally{r.f()}}),E=function(){var t=bt(gt().mark((function t(e){var r;return gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(r=new rt.v3).filename_path="".concat((0,l.GG)("file",(0,l.vX)())).concat(o.filename),I.ws.addMsg(C.HK.workflow_realtime_one_rsq,(function(t){!0===t.context.done?(0,Z.LW)("done!"):!1===t.context.done&&(0,Z.zN)("done!");var e=t.context.list;b(e),w(e)})),I.ws.sendData(C.HK.workflow_realtime_one_req,r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return(0,n.useEffect)((function(){return d(!1),pt=void 0,dt=void 0,E(),bt(gt().mark((function t(){return gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:I.ws.removeMsg(C.HK.workflow_realtime_one_rsq),dt&&(dt.dispose(),dt=null);case 2:case"end":return t.stop()}}),t)})))}),[]),n.createElement("div",null,n.createElement(O.A,null,v&&n.createElement(j.rA,{icon:"print",title:"打印日志",onClick:function(){d(!h)}}),n.createElement(j.rA,{icon:"close",title:e("关闭"),onClick:function(){c({open:!1})}})),n.createElement(B.jW,{isFull:!0,more:!0},n.createElement(B.NN,null,n.createElement(nt.A,{list:g,click:function(t){}}))),n.createElement("div",{style:{display:h?"":"none"}},n.createElement(G.$,{show:!0,terminal:v,init:function(){pt&&(pt(1),pt=void 0)}})))}function kt(t){return kt="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},kt(t)}function St(){return St=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},St.apply(null,arguments)}function At(){At=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:S(t,r,c)}),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(N([])));x&&x!==r&&n.call(x,a)&&(b=x);var L=w.prototype=m.prototype=Object.create(b);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(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"==kt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){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===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=y,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?y:p,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,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")),v;var i=s(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;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,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function j(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 O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(kt(e)+" is not iterable")}return g.prototype=w,o(L,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},_(k.prototype),l(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(L),l(L,u,"Generator"),l(L,a,(function(){return this})),l(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,P.prototype={constructor:P,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(O),!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,v):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),v},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),O(r),v}},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;O(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function jt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Ft(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function Ot(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 Pt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Ot(i,n,o,a,c,"next",t)}function c(t){Ot(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Nt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||Ft(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 Ft(t,e){if(t){if("string"==typeof t)return Ct(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)?Ct(t,e):void 0}}function Ct(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 It,Gt,Tt=function(t){return t.block="",t.gallery="gallery",t.list="list",t}({}),Mt=Object.values(Tt),zt=280;function Yt(){var t=Nt((0,i.L4)(a.A.editorSetting),2),e=(t[0],t[1]),r=Nt((0,i.L4)(a.A.file_preview),2),f=(r[0],r[1]),h=(0,p.Bd)().t,y=(0,n.useRef)(null),v=(0,c.zy)(),m=(0,c.Zp)(),g=Nt((0,i.L4)(a.A.nowFileList),2),w=g[0],b=g[1],E=Nt((0,i.L4)(a.A.fileShowType),2),L=E[0],_=E[1],k=Nt((0,i.L4)(a.A.uploadFiles),2),F=(k[0],k[1]),G=Nt((0,i.L4)(a.A.showPrompt),2),T=(G[0],G[1]),M=Nt((0,i.L4)(a.A.selectedFileList),2),z=M[0],Y=(M[1],Nt((0,i.L4)(a.A.copyedFileList),2)),K=Y[0],X=Y[1],$=Nt((0,i.L4)(a.A.enterKey),2),U=($[0],$[1]),D=Nt((0,i.L4)(a.A.cutedFileList),2),H=D[0],et=D[1],nt=Nt((0,i.L4)(a.A.selectedFileList),2),ot=(nt[0],nt[1]),it=Nt((0,i.L4)(a.A.clickFileList),2),at=(it[0],it[1]),ct=Nt((0,i.L4)(a.A.fileShellShow),2),ut=ct[0],lt=ct[1],ft=Nt((0,i.L4)(a.A.file_root_list),2),st=ft[0],ht=(ft[1],Nt((0,i.L4)(a.A.file_root_index),2)),pt=ht[0],dt=ht[1],yt=Nt((0,n.useState)(void 0),2),mt=yt[0],gt=yt[1],wt=Nt((0,n.useState)(""),2),bt=wt[0],Et=wt[1],xt=Nt((0,i.L4)(a.A.workflow_show),2),Lt=xt[0],kt=xt[1],Ot=Nt((0,i.L4)(a.A.workflow_realtime_show),2),Ft=Ot[0],Ct=(Ot[1],Nt((0,n.useState)(!1),2)),Tt=Ct[0],Yt=Ct[1],Kt=(0,n.useContext)(J.F).reloadUserInfo,Xt=(0,d.kZ)().click_file,$t=Nt((0,i.L4)(a.A.prompt_card),2),Ut=($t[0],$t[1]),Wt=(0,d.hg)().file_is_running,Dt=Nt((0,i.L4)(a.A.to_running_files),2),Ht=(Dt[0],Dt[1]),qt=function(){var t=Pt(At().mark((function t(){var e;return At().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=new rt.Nd).dir_path="".concat((0,l.GG)("file",(0,l.vX)())),I.ws.addMsg(C.HK.workflow_realtime,(function(t){var e,r,n=new Set(null!==(e=t.context)&&void 0!==e?e:[]),o=jt(null!=Gt?Gt:[]);try{for(o.s();!(r=o.n()).done;){var i=r.value;n.has(i)||(0,Z.LW)("".concat(i.slice(0,-13)," done!"))}}catch(t){o.e(t)}finally{o.f()}Gt=n,Ht(n)})),t.next=5,I.ws.sendData(C.HK.workflow_realtime,e);case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Bt=function(){var t=Pt(At().mark((function t(){var e,r,n,o,i,a,c,u,f,s;return At().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,A.$M.get(encodeURIComponent((0,l.GG)("file",(0,l.vX)())));case 2:if((n=t.sent).code!==N.m.PreFile){t.next=6;break}return Xt({name:n.message,context:n.data}),t.abrupt("return");case 6:if(n.code===N.m.Sucess){t.next=9;break}return n.message&&(0,Z.zN)(n.message),t.abrupt("return");case 9:o=n.data,i=!1,a=jt(null!==(e=o.files)&&void 0!==e?e:[]);try{for(a.s();!(c=a.n()).done;)(u=c.value).origin_size=u.size,u.size=(0,V.v7)(u.size),u.name.endsWith("workflow.yml")&&!i&&(i=!0,qt())}catch(t){a.e(t)}finally{a.f()}f=jt(null!==(r=o.folders)&&void 0!==r?r:[]);try{for(f.s();!(s=f.n()).done;)s.value.name===rt.SB&&(Yt(!0),i||qt())}catch(t){f.e(t)}finally{f.f()}b(n.data),It=n.data;case 17:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),Rt=function(){var t=Math.floor(document.querySelector("main").offsetWidth/zt);0===t&&(t=1),gt("calc(".concat(100/t,"% - 1em)"))};(0,n.useEffect)((function(){var t=function(){var t=Pt(At().mark((function t(){return At().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Bt();case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return t(),e({open:!1}),f({open:!1}),Yt(!1),Gt=void 0,Pt(At().mark((function t(){return At().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,I.ws.unConnect();case 2:Ht(new Set);case 3:case"end":return t.stop()}}),t)})))}),[v]);var Zt=function(){var t=Pt(At().mark((function t(e){var r,n,o,i;return At().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.preventDefault(),r=e.dataTransfer,n=e.target,!(r.files.length<=0)){t.next=5;break}return t.abrupt("return");case 5:for(o=0;o<5;o++)null===n||n.classList.contains("item")||(n=n.parentElement);return t.next=8,(0,P.T)(r);case 8:i=t.sent,F(i),T({show:!0,type:s.PromptEnum.FilesUpload,overlay:!1,data:{}});case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Jt=function(t){t.preventDefault()};function Vt(t){(0,Z.LW)(t)}(0,n.useEffect)((function(){var t=y.current.ownerDocument;return t.addEventListener("dragover",Jt),t.addEventListener("drop",Zt),Rt(),window.addEventListener("resize",Rt),function(){t.removeEventListener("dragover",Jt),t.removeEventListener("drop",Zt),window.removeEventListener("resize",Rt),ut.show&<({show:!1,path:""})}}),[]);var Qt=function(){var t=Pt(At().mark((function t(e){return At().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return dt(e),t.next=3,A.$M.post("base_switch",{root_index:e});case 3:return t.next=5,Kt();case 5:m("/file/"),ot([]),at([]);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),te=function(){var t=Pt(At().mark((function t(){var e,r;return At().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,A.$M.post("file/info",{type:o.Iw.folder,path:(0,l.GG)("file",(0,l.vX)())});case 2:(e=t.sent).code===N.m.Sucess&&Ut({open:!0,title:"信息",context_div:n.createElement("div",null,n.createElement(B.Yh,{left:h("挂载位置磁盘"),right:e.data&&e.data.total_size}),n.createElement(B.Yh,{left:"".concat(h("磁盘剩余")),right:e.data&&e.data.left_size}),n.createElement(B.Yh,{left:"".concat(h("文件系统")),right:e.data&&e.data.fs_type}),n.createElement(B.Yh,{left:"".concat(h("文件夹数")),right:w.folders.length}),n.createElement(B.Yh,{left:"".concat(h("文件数")),right:w.files.length}),n.createElement(B.Yh,{left:"".concat(h("当前位置")),right:n.createElement(tt.xP,{context:null==e||null===(r=e.data)||void 0===r?void 0:r.now_absolute_path})}))});case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),ee=Nt((0,n.useState)(!1),2),re=ee[0],ne=ee[1];(0,n.useEffect)((function(){var t=function(t){if(re)if(t.ctrlKey)if("a"===t.key||"A"===t.key){for(var e=w.files.length,r=w.folders.length,n=[],o=0;o<e+r;o++)n.push(o);ot(n)}else U("ctrl");else"Escape"===t.key?ot([]):"Shift"===t.key&&U("shift")},e=function(t){t.ctrlKey||U("")};return window.addEventListener("keydown",t),window.addEventListener("keyup",e),function(){window.removeEventListener("keydown",t),window.removeEventListener("keyup",e)}}),[w,re]);var oe=function(t){t.target===t.currentTarget&&ot([])};return n.createElement("div",{className:"not-select-div"},n.createElement(O.A,{left_children:n.createElement(R.$Z,{handleEnterPress:function(){var t,e;if(It){ot([]),at([]);var r,n=[],o=[],i=jt(null!==(t=It.files)&&void 0!==t?t:[]);try{for(i.s();!(r=i.n()).done;){var a=r.value;a.name.includes(bt)&&n.push(a)}}catch(t){i.e(t)}finally{i.f()}var c,u=jt(null!==(e=It.folders)&&void 0!==e?e:[]);try{for(u.s();!(c=u.n()).done;){var l=c.value;l.name.includes(bt)&&o.push(l)}}catch(t){u.e(t)}finally{u.f()}b({files:n,folders:o})}},placeholder:h("搜索当前目录"),icon:"search",value:"",handleInputChange:function(t){Et(t)},max_width:"25em"})},z.length>0&&n.createElement(j.rA,{icon:"delete",title:h("删除"),onClick:function(){T({show:!0,type:s.PromptEnum.FilesDelete,overlay:!0,data:{}})}}),z.length>0&&n.createElement(j.rA,{icon:"content_copy",title:h("复制"),onClick:function(){var t=(0,q.i)(w,z);X(t.map((function(t){return(0,q.O)(t.name)}))),et([]),Vt("已复制")}}),z.length>0&&n.createElement(j.rA,{icon:"content_cut",title:h("剪切"),onClick:function(){var t=(0,q.i)(w,z);et(t.map((function(t){return(0,q.O)(t.name)}))),X([]),Vt("已剪切")}}),(K.length>0||H.length>0)&&n.createElement(j.rA,{onClick:function(){T({show:!0,type:s.PromptEnum.Confirm,overlay:!0,data:{}})},icon:"content_paste",title:h("粘贴到此处"),tip:K.length+H.length}),z.length>0&&n.createElement(j.rA,{icon:"download",title:h("下载"),onClick:function(){for(var t=(0,q.i)(w,z),e=0;e<t.length;e++){var r=t[e];t[e]=encodeURIComponent((0,q.O)(r.name))}var n=A.$M.getDownloadUrl(t);window.open(n)}}),z.length>0&&n.createElement(j.rA,{icon:"compress",title:h("压缩"),onClick:function(){for(var t=(0,q.i)(w,z),e=0;e<t.length;e++){var r=t[e];t[e]=(0,q.O)(r.name)}t&&0!==t.length?T({show:!0,type:s.PromptEnum.Compress,overlay:!0,data:{files:t}}):(0,Z.zN)("没有选中")}}),1===z.length&&n.createElement(j.rA,{icon:"edit_attributes",title:h("重命名"),onClick:function(){T({show:!0,type:s.PromptEnum.FileRename,overlay:!0,data:{}})}}),Tt&&n.createElement(j.rA,{icon:"api",title:"workflow",onClick:function(){kt(!Lt)}}),n.createElement(j.rA,{icon:"terminal",title:"shell",onClick:function(){ut.show?lt({show:!1,path:""}):lt({show:!0,path:(0,l.GG)("file",(0,l.vX)())})}}),n.createElement(j.rA,{icon:"grid_view",title:h("切换样式"),onClick:function(){_((0,u.jH)(Mt,L))}}),n.createElement(j.rA,{icon:"create_new_folder",title:h("创建文件夹"),onClick:function(){T({show:!0,type:s.PromptEnum.DirNew,overlay:!0,data:{dir:(0,l.GG)("file",(0,l.vX)())}})}}),n.createElement(j.rA,{icon:"note_add",title:h("创建文本文件"),onClick:function(){T({show:!0,type:s.PromptEnum.FileNew,overlay:!0,data:{dir:(0,l.GG)("file",(0,l.vX)())}})}}),n.createElement(j.rA,{icon:"upload_file",title:"上传",onClick:function(){T({show:!0,type:s.PromptEnum.UploadFile,overlay:!0,data:{call:function(t){var e,r=null===(e=t.currentTarget)||void 0===e?void 0:e.files;if(r){for(var n=!!r[0].webkitRelativePath,o=[],i=new Set,a=0;a<r.length;a++){var c=r[a],u=n?c.webkitRelativePath:"".concat(c.webkitRelativePath).concat(c.name);c.fullPath=u,n&&i.add((0,Q.S)(u)),o.push(c)}var l=[];if(n){var f,h=jt(i);try{for(h.s();!(f=h.n()).done;){var p=f.value;l.push({isDir:!0,fullPath:p,name:p})}}catch(t){h.e(t)}finally{h.f()}}l.push.apply(l,o),F(l),T({show:!0,type:s.PromptEnum.FilesUpload,overlay:!1,data:{}})}}}})}}),n.createElement(j.rA,{icon:"info",title:h("信息"),onClick:te}),n.createElement(B.EF,{title:h("切换目录"),items:st,click:function(t){Qt(t)},pre_value:pt})),n.createElement("div",{id:"listing",className:"mosaic file-icons ".concat(L),ref:y,onMouseEnter:function(){ne(!0)},onMouseLeave:function(){ne(!1)}},n.createElement(S,{baseRoute:"file",clickFun:function(){ot([]),at([])}}),w.folders&&w.folders.length>0&&n.createElement("h2",null,h("文件夹")),w.folders&&n.createElement("div",{onClick:oe},w.folders.map((function(t,e){return n.createElement(x,St({itemWidth:mt,index:e,key:e},t))}))),w.files&&w.files.length>0&&n.createElement("h2",{onClick:oe},h("文件")),w.files&&n.createElement("div",{onClick:oe},w.files.map((function(t,e){return n.createElement(x,St({icon:Wt(t.name)?"refresh":void 0,itemWidth:mt,index:e+w.folders.length,key:e},t))})))),n.createElement(W,null),Lt&&n.createElement(vt,null),Ft.open&&n.createElement(_t,null))}}}]);
|