filecat 5.5.0 → 5.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/dist/100.4ce45d3eec8264b44c9c.js +2 -0
- package/build/dist/181.12763c5fbc32b8cac35d.js +2 -0
- package/build/dist/209.aee70e6ab20d454889a8.js +2 -0
- package/build/dist/29.9561a2c5f5d5bba63b38.js +2 -0
- package/build/dist/308.c20ee9f59499ae6abb08.js +2 -0
- package/build/dist/402.3a2296c0b1386119122c.js +2 -0
- package/build/dist/441.857f440f8eedacd167ac.js +2 -0
- package/build/dist/445.a4c75534b454d5fef239.js +2 -0
- package/build/dist/467.f09e5b1d4ca4aaaf0cb2.js +2 -0
- package/build/dist/502.7a2ceb4a9a8a9efa9e87.js +2 -0
- package/build/dist/523.8046c545fa76b417e62d.js +2 -0
- package/build/dist/542.719493048047ffe24db5.js +2 -0
- package/build/dist/567.8abe85972ae925aa4663.js +2 -0
- package/build/dist/602.cd79559e9d72c5c22620.js +2 -0
- package/build/dist/636.2adc05dedf0c7b738e01.js +2 -0
- package/build/dist/659.5606fcf2d08a2f77d2ba.js +2 -0
- package/build/dist/674.e35581e8d546b194dd1f.js +2 -0
- package/build/dist/759.9aaa338cd257824585fa.js +2 -0
- package/build/dist/811.b23544a9eda5f48ffd4d.js +2 -0
- package/build/dist/827.427dd2f56c508a34e94f.js +2 -0
- package/build/dist/859.1c85214fa7c79f1b781d.js +2 -0
- package/build/dist/892.1ed47341032d7cbfedfd.js +2 -0
- package/build/dist/{943.09b30670ce9eacb614e4.js → 943.69283a5f76a7b862c996.js} +2 -2
- package/build/dist/960.2850e42e8766c3184235.js +2 -0
- package/build/dist/995.3340f5c2fc4e4e5819dd.js +2 -0
- package/build/dist/998.f350f3779f2384820f72.js +2 -0
- package/build/dist/index.html +1 -1
- package/build/dist/main.80d3d7e9cb5346923008.js +2 -0
- package/build/main.js +1 -1
- package/package.json +2 -1
- package/build/dist/100.8ebdf32f93ebb89fd5a9.js +0 -2
- package/build/dist/181.31a1ee669b1ed24fc18b.js +0 -2
- package/build/dist/209.f1a40bd227438c6b6d52.js +0 -2
- package/build/dist/29.32ef9d7ae7852a43f56c.js +0 -2
- package/build/dist/308.ae38e35cffd396a547c8.js +0 -2
- package/build/dist/402.f1c3549907e68dd44141.js +0 -2
- package/build/dist/441.75ad05e9094d7e4988b4.js +0 -2
- package/build/dist/445.435d91c360ea1eff3335.js +0 -2
- package/build/dist/467.1d9a78f736c194dee524.js +0 -2
- package/build/dist/502.90aaa83acd526e7dbcc4.js +0 -2
- package/build/dist/523.98924862563ceccea472.js +0 -2
- package/build/dist/542.1a50f0139e70cfd968cc.js +0 -2
- package/build/dist/567.8000d6e03db0ce0cc9ae.js +0 -2
- package/build/dist/602.75ab14d4601f1adb427b.js +0 -2
- package/build/dist/636.4179d693832acf72881b.js +0 -2
- package/build/dist/659.91897ba31bcbaaf376bf.js +0 -2
- package/build/dist/674.d3efa9ef8434d58f023b.js +0 -2
- package/build/dist/759.deb9c1d4f58040bc8816.js +0 -2
- package/build/dist/811.148ebc3a727004dfa32a.js +0 -2
- package/build/dist/827.c175a16183659c8d162d.js +0 -2
- package/build/dist/859.ce5bfc77f8fa54a65a03.js +0 -2
- package/build/dist/892.fd015e3e3451c95aacca.js +0 -2
- package/build/dist/960.32060178ec62652f0ee0.js +0 -2
- package/build/dist/995.06d930af0980ee592fbc.js +0 -2
- package/build/dist/998.65cab2e5f11705458d1a.js +0 -2
- package/build/dist/main.a6dc1190b635d4719a46.js +0 -2
- /package/build/dist/{100.8ebdf32f93ebb89fd5a9.js.LICENSE.txt → 100.4ce45d3eec8264b44c9c.js.LICENSE.txt} +0 -0
- /package/build/dist/{181.31a1ee669b1ed24fc18b.js.LICENSE.txt → 181.12763c5fbc32b8cac35d.js.LICENSE.txt} +0 -0
- /package/build/dist/{209.f1a40bd227438c6b6d52.js.LICENSE.txt → 209.aee70e6ab20d454889a8.js.LICENSE.txt} +0 -0
- /package/build/dist/{29.32ef9d7ae7852a43f56c.js.LICENSE.txt → 29.9561a2c5f5d5bba63b38.js.LICENSE.txt} +0 -0
- /package/build/dist/{308.ae38e35cffd396a547c8.js.LICENSE.txt → 308.c20ee9f59499ae6abb08.js.LICENSE.txt} +0 -0
- /package/build/dist/{402.f1c3549907e68dd44141.js.LICENSE.txt → 402.3a2296c0b1386119122c.js.LICENSE.txt} +0 -0
- /package/build/dist/{441.75ad05e9094d7e4988b4.js.LICENSE.txt → 441.857f440f8eedacd167ac.js.LICENSE.txt} +0 -0
- /package/build/dist/{445.435d91c360ea1eff3335.js.LICENSE.txt → 445.a4c75534b454d5fef239.js.LICENSE.txt} +0 -0
- /package/build/dist/{467.1d9a78f736c194dee524.js.LICENSE.txt → 467.f09e5b1d4ca4aaaf0cb2.js.LICENSE.txt} +0 -0
- /package/build/dist/{502.90aaa83acd526e7dbcc4.js.LICENSE.txt → 502.7a2ceb4a9a8a9efa9e87.js.LICENSE.txt} +0 -0
- /package/build/dist/{523.98924862563ceccea472.js.LICENSE.txt → 523.8046c545fa76b417e62d.js.LICENSE.txt} +0 -0
- /package/build/dist/{542.1a50f0139e70cfd968cc.js.LICENSE.txt → 542.719493048047ffe24db5.js.LICENSE.txt} +0 -0
- /package/build/dist/{567.8000d6e03db0ce0cc9ae.js.LICENSE.txt → 567.8abe85972ae925aa4663.js.LICENSE.txt} +0 -0
- /package/build/dist/{602.75ab14d4601f1adb427b.js.LICENSE.txt → 602.cd79559e9d72c5c22620.js.LICENSE.txt} +0 -0
- /package/build/dist/{636.4179d693832acf72881b.js.LICENSE.txt → 636.2adc05dedf0c7b738e01.js.LICENSE.txt} +0 -0
- /package/build/dist/{659.91897ba31bcbaaf376bf.js.LICENSE.txt → 659.5606fcf2d08a2f77d2ba.js.LICENSE.txt} +0 -0
- /package/build/dist/{674.d3efa9ef8434d58f023b.js.LICENSE.txt → 674.e35581e8d546b194dd1f.js.LICENSE.txt} +0 -0
- /package/build/dist/{759.deb9c1d4f58040bc8816.js.LICENSE.txt → 759.9aaa338cd257824585fa.js.LICENSE.txt} +0 -0
- /package/build/dist/{811.148ebc3a727004dfa32a.js.LICENSE.txt → 811.b23544a9eda5f48ffd4d.js.LICENSE.txt} +0 -0
- /package/build/dist/{827.c175a16183659c8d162d.js.LICENSE.txt → 827.427dd2f56c508a34e94f.js.LICENSE.txt} +0 -0
- /package/build/dist/{859.ce5bfc77f8fa54a65a03.js.LICENSE.txt → 859.1c85214fa7c79f1b781d.js.LICENSE.txt} +0 -0
- /package/build/dist/{892.fd015e3e3451c95aacca.js.LICENSE.txt → 892.1ed47341032d7cbfedfd.js.LICENSE.txt} +0 -0
- /package/build/dist/{943.09b30670ce9eacb614e4.js.LICENSE.txt → 943.69283a5f76a7b862c996.js.LICENSE.txt} +0 -0
- /package/build/dist/{960.32060178ec62652f0ee0.js.LICENSE.txt → 960.2850e42e8766c3184235.js.LICENSE.txt} +0 -0
- /package/build/dist/{995.06d930af0980ee592fbc.js.LICENSE.txt → 995.3340f5c2fc4e4e5819dd.js.LICENSE.txt} +0 -0
- /package/build/dist/{998.65cab2e5f11705458d1a.js.LICENSE.txt → 998.f350f3779f2384820f72.js.LICENSE.txt} +0 -0
- /package/build/dist/{main.a6dc1190b635d4719a46.js.LICENSE.txt → main.80d3d7e9cb5346923008.js.LICENSE.txt} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 602.75ab14d4601f1adb427b.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[602],{1251:(t,e,r)=>{r.d(e,{s:()=>f});var n=r(2635),o=1,i=60*o,a=24*i,c=30*a,u=365*a,l=6e4;function f(t){t=t>1e12?t:1e3*t;var e=Date.now(),r=Math.abs(e-t)/l;return r<o?n.Ay.t("小于一分钟"):r<i?"".concat(r.toFixed(0)," ").concat(n.Ay.t("分钟前")):r<a?"".concat((r/i).toFixed(0)," ").concat(n.Ay.t("小时前")):r<c?"".concat((r/a).toFixed(0)," ").concat(n.Ay.t("天前")):r<u?"".concat((r/c).toFixed(0)," ").concat(n.Ay.t("月前")):"".concat((r/u).toFixed(0)," ").concat(n.Ay.t("年前"))}},5726:(t,e,r)=>{function n(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return o(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){u=!0,a=t},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw a}}}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function i(t){return new Promise((function(e){var r=0,o=[];if(void 0!==t.items){var i,a=n(t.items);try{for(a.s();!(i=a.n()).done;){var c=i.value;if("file"===c.kind&&"function"==typeof c.webkitGetAsEntry)u(c.webkitGetAsEntry())}}catch(t){a.e(t)}finally{a.f()}}else e(t.files);function u(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(t.isFile)r++,t.file((function(t){r--,t.fullPath="".concat(n).concat(t.name),o.push(t),0===r&&e(o)}));else if(t.isDirectory){var i={isDir:!0,size:0,fullPath:"".concat(n).concat(t.name),name:t.name};o.push(i),l(t.createReader(),"".concat(n).concat(t.name))}}function l(t,i){r++,t.readEntries((function(a){if(r--,a.length>0){var c,f=n(a);try{for(f.s();!(c=f.n()).done;){u(c.value,"".concat(i,"/"))}}catch(t){f.e(t)}finally{f.f()}l(t,"".concat(i,"/"))}0===r&&e(o)}))}}))}function a(t){return new Promise((function(e,r){var n=document.createElement("script");n.src=t,n.async=!0,n.onload=function(){e(null),console.log("脚本加载完成")},n.onerror=function(){r(r),console.error("脚本加载失败")},document.body.appendChild(n)}))}r.d(e,{J:()=>a,T:()=>i})},7374:(t,e,r)=>{r.d(e,{e:()=>h});var n=r(6540),o=r(7767),i=r(4976),a=r(4694),c=r(4289),u=r(3033),l=r(5725);function f(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 s(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)?s(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 s(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 h(t){var e=(0,o.zy)(),r=f((0,n.useState)([]),2),s=r[0],h=r[1],d=f((0,n.useState)("/"),2),y=d[0],m=d[1],p=f((0,n.useState)(void 0),2),v=p[0],g=p[1];n.useEffect((function(){var e="",r=(0,c.vX)().split("/");r=r.filter((function(t){return t}));var n=r.indexOf(t.baseRoute),o=[];if(-1!=n){e=(0,a.IO)(r.slice(0,n),t.baseRoute);for(var i=r.slice(n+1),u=0;u<i.length;u++){var l=i[u];o.push({value:l,href:0===u?"".concat(e).concat(l,"/"):(0,a.IO)(o[u-1].href,l)})}m(e),h(o)}}),[e]);var b=function(e){e.stopPropagation(),t.clickFun(e)};return n.createElement("div",{className:"breadcrumbs",onClick:function(t){g(void 0!==v?void 0:"")}},n.createElement(n.Fragment,null,void 0===v?n.createElement(n.Fragment,null,n.createElement("span",{className:"chevron"},n.createElement(i.N_,{to:y,onClick:b},n.createElement("i",{className:"material-icons"},"home"))),s.map((function(t,e){return n.createElement("span",{className:"chevron",key:e},n.createElement("i",{className:"material-icons"},"keyboard_arrow_right"),n.createElement(i.N_,{to:t.href,onClick:b},decodeURIComponent(t.value)))}))):n.createElement(l.QM,{click:function(){g(void 0)},children:n.createElement(u.Sm,{width:"100%",maxWidth:"60%",placeholder:"输入跳转的目录",handlerEnter:function(e){t.input_path_enter&&t.input_path_enter(e),g(void 0)}})})))}},8844:(t,e,r)=>{r.d(e,{B:()=>g});var n=r(6540),o=r(7022),i=r(7444),a=r(4694),c=r(6417),u=r(6007);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function f(){return f=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},f.apply(null,arguments)}function s(t){return function(t){if(Array.isArray(t))return v(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||p(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(){h=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r,n){Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function f(e,r,n,o){var i=r&&r.prototype instanceof y?r:y,a=Object.create(i.prototype);return u(a,"_invoke",function(e,r,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=A(c,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new k(o||[])),!0),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 d={};function y(){}function m(){}function p(){}var v={};u(v,i,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(O([])));b&&b!==r&&n.call(b,i)&&(v=b);var w=p.prototype=y.prototype=Object.create(v);function E(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var f=u.arg,h=f.value;return h&&"object"==l(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(h).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var o;u(this,"_invoke",(function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}),!0)}function A(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=s(o,e.i,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.r]=a.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){this.tryEntries.push(t)}function _(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function k(t){this.tryEntries=[[-1]],t.forEach(S,this),this.reset(!0)}function O(e){if(null!=e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=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 a.next=a}}throw new TypeError(l(e)+" is not iterable")}return m.prototype=p,u(w,"constructor",p),u(p,"constructor",m),u(p,c,m.displayName="GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,u(t,c,"GeneratorFunction")),t.prototype=Object.create(w),t},e.awrap=function(t){return{__await:t}},E(x.prototype),u(x.prototype,a,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(w),u(w,c,"Generator"),u(w,i,(function(){return this})),u(w,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=O,k.prototype={constructor:k,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){a.type="throw",a.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],c=this.prev,u=i[1],l=i[2];if(-1===i[0])return n("end"),!1;if(!u&&!l)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=c){if(c<u)return this.method="next",this.arg=t,n(u),!0;if(c<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o[2],d):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:O(e),r,n},"next"===this.method&&(this.arg=t),d}},e}function d(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 y(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){d(i,n,o,a,c,"next",t)}function c(t){d(i,n,o,a,c,"throw",t)}a(void 0)}))}}function m(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)||p(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 p(t,e){if(t){if("string"==typeof t)return v(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(t,e):void 0}}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function g(t){var e,r,l=m((0,i.L4)(c.A.selectedFileList),2),d=l[0],p=l[1],v=m((0,i.L4)(c.A.nowFileList),2),g=v[0],b=(v[1],m((0,i.L4)(c.A.confirm),2)),w=(b[0],b[1]),E=m((0,i.L4)(c.A.user_base_info),2),x=E[0];E[1];function A(){return(A=y(h().mark((function e(r){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.click&&t.click(r,t.name);case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return n.createElement("div",f({},t.extraAttr,{onClick:function(){!function(t){A.apply(this,arguments)}(t.index)},className:"item",role:"button","data-type":t.isLink?"invalid_link":t.type,"data-dir":!t.type||t.type===o.Iw.folder,"aria-selected":null!==(0,a.kW)(d,t.index),"aria-label":t.name,style:{"--filewidth":null!==(e=t.itemWidth)&&void 0!==e?e:"33%"},onDragStart:function(e){return r=t.index,void(d.find((function(t){return t===r}))||p([].concat(s(d),[r])));var r},onDrop:function(e){return function(e,r){for(var n,o=e.dataTransfer,i=!1,a=0;a<o.items.length;a++)if("file"===o.items[a].kind){i=!0;break}i||g.folders.length<=r||w({open:!0,title:"确定将文件移动并覆盖到".concat(g.folders[r].name,"吗?"),handle:(n=y(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.draggable_handle(g.folders[r].name);case 2:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})})}(e,t.index)},draggable:void 0!==t.draggable_handle}),void 0===t.icon&&n.createElement("div",null,t.type!==o.Iw.image||null==t.path||null!=x&&null!==(r=x.user_data)&&void 0!==r&&r.not_pre_show_image?n.createElement("i",{className:"material-icons"}):n.createElement("img",{loading:"lazy",src:u.$M.getDownloadUrl(t.path,{mtime:t.mtime,cache:1}),alt:t.name})),void 0!==t.icon&&n.createElement("div",{className:"rotating-div"},n.createElement("span",{className:"material-icons"},t.icon)),n.createElement("div",null,n.createElement("p",{className:"name"},t.name),t.size?n.createElement("p",null,t.size):n.createElement("p",null,"—"),n.createElement("p",null,t.show_mtime)),t.children)}}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 636.4179d693832acf72881b.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[636],{1636:(t,e,n)=>{n.r(e),n.d(e,{default:()=>C});var r=n(2389),o=n(6540),i=n(7444),a=n(6417),u=n(4238),c=n(4944),l=n(447),f=n(5997),s=n(7952),h=n(5725),d=n(7071),p=n(4289),v=n(8062),y=n(7856);function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function g(){g=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n,r){Object.defineProperty(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r})}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(e,n,r,o){var i=n&&n.prototype instanceof h?n:h,a=Object.create(i.prototype);return c(a,"_invoke",function(e,n,r){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var u=r.delegate;if(u){var c=k(u,r);if(c){if(c===s)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(1===o)throw o=4,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=3;var l=f(e,n,r);if("normal"===l.type){if(o=r.done?4:2,l.arg===s)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=4,r.method="throw",r.arg=l.arg)}}}(e,r,new j(o||[])),!0),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var s={};function h(){}function d(){}function p(){}var v={};c(v,i,(function(){return this}));var y=Object.getPrototypeOf,w=y&&y(y(O([])));w&&w!==n&&r.call(w,i)&&(v=w);var b=p.prototype=h.prototype=Object.create(v);function E(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==m(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}),!0)}function k(e,n){var r=n.method,o=e.i[r];if(o===t)return n.delegate=null,"throw"===r&&e.i.return&&(n.method="return",n.arg=t,k(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),s;var i=f(o,e.i,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,s;var a=i.arg;return a?a.done?(n[e.r]=a.value,n.next=e.n,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,s):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,s)}function _(t){this.tryEntries.push(t)}function S(e){var n=e[4]||{};n.type="normal",n.arg=t,e[4]=n}function j(t){this.tryEntries=[[-1]],t.forEach(_,this),this.reset(!0)}function O(e){if(null!=e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(m(e)+" is not iterable")}return d.prototype=p,c(b,"constructor",p),c(p,"constructor",d),c(p,u,d.displayName="GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},e.awrap=function(t){return{__await:t}},E(x.prototype),c(x.prototype,a,(function(){return this})),e.AsyncIterator=x,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new x(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(b),c(b,u,"Generator"),c(b,i,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.unshift(r);return function t(){for(;n.length;)if((r=n.pop())in e)return t.value=r,t.done=!1,t;return t.done=!0,t}},e.values=O,j.prototype={constructor:j,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(S),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(t){a.type="throw",a.arg=e,n.next=t}for(var o=n.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],l=i[2];if(-1===i[0])return r("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,r(c),!0;if(u<l)return r(l),!1}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r[0]>-1&&r[0]<=this.prev&&this.prev<r[2]){var o=r;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o[2],s):this.complete(i)},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),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n[2]===t)return this.complete(n[4],n[3]),S(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n[0]===t){var r=n[4];if("throw"===r.type){var o=r.arg;S(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={i:O(e),r:n,n:r},"next"===this.method&&(this.arg=t),s}},e}function w(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function b(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){w(i,r,o,a,u,"next",t)}function u(t){w(i,r,o,a,u,"throw",t)}a(void 0)}))}}function E(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=k(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function x(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||k(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){if(t){if("string"==typeof t)return _(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(t,e):void 0}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var S,j,O=o.lazy((function(){return n.e(614).then(n.bind(n,5614))}));function C(t){var e=(0,r.Bd)().t,n=x((0,i.L4)(a.A.workflow_realtime_show),2),m=n[0],w=n[1],k=x((0,o.useState)([]),2),_=(k[0],k[1],x((0,o.useState)([]),2)),C=(_[0],_[1],x((0,o.useState)(!1),2)),A=C[0],M=C[1],F=x((0,o.useState)(void 0),2),P=F[0],N=F[1],G=x((0,o.useState)([]),2),I=G[0],T=G[1],q=function(t){var e,n=E(t);try{for(n.s();!(e=n.n()).done;){var r,i,a,u=e.value;(null==u||null===(r=u.extra_data)||void 0===r?void 0:r.running_type)===d.rl.success?u.name=o.createElement("div",null,o.createElement(l.fq,{success:!0}),u.name):(null==u||null===(i=u.extra_data)||void 0===i?void 0:i.running_type)===d.rl.fail?u.name=o.createElement("div",null,o.createElement(l.fq,{success:!1}),u.name):(null==u||null===(a=u.extra_data)||void 0===a?void 0:a.running_type)===d.rl.running&&(u.name=o.createElement("div",null,o.createElement(l.fq,{running:!0}),u.name)),u.children&&q(u.children)}}catch(t){n.e(t)}finally{n.f()}},B=function(){var t=b(g().mark((function t(e){var n;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(n=new d.v3).filename_path="".concat((0,p.GG)("file",(0,p.vX)())).concat(m.filename),c.ws.addMsg(u.HK.workflow_realtime_one_rsq,(function(t){if(t.context.list&&t.context.list.length>0){var e=t.context.list;q(e),T(e)}t.context.new_log&&K(t.context.new_log)})),c.ws.sendData(u.HK.workflow_realtime_one_req,n);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),H=function(){var t=b(g().mark((function t(){var e;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=new y.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}),j=e,N(e);case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();(0,o.useEffect)((function(){return M(!1),S=void 0,j=void 0,B(),b(g().mark((function t(){return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:c.ws.removeMsg(u.HK.workflow_realtime_one_rsq),j&&(j.dispose(),j=null);case 2:case"end":return t.stop()}}),t)})))}),[]);var K=function(){var t=b(g().mark((function t(e){return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(j){t.next=3;break}return t.next=3,new Promise((function(t){S=t,M(!0),H()}));case 3:e&&j.write(e);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return o.createElement("div",null,o.createElement(s.A,null,P&&o.createElement(f.rA,{icon:"print",title:"打印日志",onClick:function(){M(!A)}}),o.createElement(f.rA,{icon:"close",title:e("关闭"),onClick:function(){w({open:!1})}})),o.createElement(h.jW,{isFull:!0,more:!0},o.createElement(h.NN,null,o.createElement(v.A,{list:I,click:function(t){}}))),o.createElement("div",{style:{display:A?"":"none"}},o.createElement(O,{show:!0,terminal:P,init:function(){S&&(S(1),S=void 0)}})))}},8062:(t,e,n)=>{n.d(e,{A:()=>u});var r=n(6540);function o(){return o=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o.apply(null,arguments)}function i(t){return r.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 r.createElement("li",null,t.click?r.createElement(i,o({},t.node,{name:t.render?t.render(t.node):t.node.name,click:t.click,onContextMenu:t.onContextMenu})):r.createElement("div",null,t.render?t.render(t.node):t.node.name),t.node.children&&t.node.children.length>0&&r.createElement("ul",null,t.node.children.map((function(e,n){return r.createElement(a,{key:n,node:e,click:t.click,onContextMenu:t.onContextMenu,render:t.render})}))))};const u=function(t){return r.createElement("div",{className:"card-tree-view"},r.createElement("ul",null,t.list&&t.list.map((function(e,n){return r.createElement(a,{key:n,node:e,click:t.click,onContextMenu:t.onContextMenu,render:t.render})}))))}}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 659.91897ba31bcbaaf376bf.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[659],{3659:(e,t,n)=>{n.r(t),n.d(t,{default:()=>P});var r=n(2389),a=n(6540),o=n(7444),i=n(6417),u=n(4238),c=n(4944),l=n(447),s=n(5997),f=n(2042),d=n(7952),h=n(5725),m=n(7481),p=n(3033),v=n(7071),y=n(4289),w=n(8062),g=n(7856),b=n(8815);function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function x(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=C(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}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 o,i=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){u=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(u)throw o}}}}function _(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||C(e)||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 k(){k=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r})}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(t,n,r,a){var o=n&&n.prototype instanceof d?n:d,i=Object.create(o.prototype);return c(i,"_invoke",function(t,n,r){var a=1;return function(o,i){if(3===a)throw Error("Generator is already running");if(4===a){if("throw"===o)throw i;return{value:e,done:!0}}for(r.method=o,r.arg=i;;){var u=r.delegate;if(u){var c=x(u,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(1===a)throw a=4,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=3;var l=s(t,n,r);if("normal"===l.type){if(a=r.done?4:2,l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(a=4,r.method="throw",r.arg=l.arg)}}}(t,r,new A(a||[])),!0),i}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var f={};function d(){}function h(){}function m(){}var p={};c(p,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(j([])));y&&y!==n&&r.call(y,o)&&(p=y);var w=m.prototype=d.prototype=Object.create(p);function g(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function n(a,o,i,u){var c=s(e[a],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==E(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,u)}),(function(e){n("throw",e,i,u)})):t.resolve(f).then((function(e){l.value=e,i(l)}),(function(e){return n("throw",e,i,u)}))}u(c.arg)}var a;c(this,"_invoke",(function(e,r){function o(){return new t((function(t,a){n(e,r,t,a)}))}return a=a?a.then(o,o):o()}),!0)}function x(t,n){var r=n.method,a=t.i[r];if(a===e)return n.delegate=null,"throw"===r&&t.i.return&&(n.method="return",n.arg=e,x(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=s(a,t.i,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,f;var i=o.arg;return i?i.done?(n[t.r]=i.value,n.next=t.n,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,f):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}function _(e){this.tryEntries.push(e)}function S(t){var n=t[4]||{};n.type="normal",n.arg=e,t[4]=n}function A(e){this.tryEntries=[[-1]],e.forEach(_,this),this.reset(!0)}function j(t){if(null!=t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(E(t)+" is not iterable")}return h.prototype=m,c(w,"constructor",m),c(m,"constructor",h),c(m,u,h.displayName="GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,c(e,u,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},g(b.prototype),c(b.prototype,i,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,a,o){void 0===o&&(o=Promise);var i=new b(l(e,n,r,a),o);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},g(w),c(w,u,"Generator"),c(w,o,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},t.values=j,A.prototype={constructor:A,reset:function(t){if(this.prev=this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0][4];if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(e){i.type="throw",i.arg=t,n.next=e}for(var a=n.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o[4],u=this.prev,c=o[1],l=o[2];if(-1===o[0])return r("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=o[0]&&o[0]<=u){if(u<c)return this.method="next",this.arg=e,r(c),!0;if(u<l)return r(l),!1}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r[0]>-1&&r[0]<=this.prev&&this.prev<r[2]){var a=r;break}}a&&("break"===e||"continue"===e)&&a[0]<=t&&t<=a[2]&&(a=null);var o=a?a[4]:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a[2],f):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n[2]===e)return this.complete(n[4],n[3]),S(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n[0]===e){var r=n[4];if("throw"===r.type){var a=r.arg;S(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={i:j(t),r:n,n:r},"next"===this.method&&(this.arg=e),f}},t}function S(e,t,n,r,a,o,i){try{var u=e[o](i),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,a)}function A(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){S(o,r,a,i,u,"next",e)}function u(e){S(o,r,a,i,u,"throw",e)}i(void 0)}))}}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,u=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){l=!0,a=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(l)throw a}}return u}}(e,t)||C(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){if(e){if("string"==typeof e)return O(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(e,t):void 0}}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var N,I,M=a.lazy((function(){return n.e(614).then(n.bind(n,5614))})),F=-1;function P(e){var t=(0,r.Bd)().t,n=j((0,o.L4)(i.A.workflow_show),2),E=(n[0],n[1]),S=j((0,a.useState)([]),2),C=S[0],O=S[1],P=j((0,a.useState)([]),2),G=P[0],T=P[1],X=j((0,a.useState)(!1),2),q=X[0],z=X[1],B=j((0,a.useState)(void 0),2),J=B[0],$=B[1],D=j((0,a.useState)([]),2),H=D[0],K=D[1],W=j((0,a.useState)(-1),2),U=W[0],V=W[1],Z=j((0,a.useState)(10),2),L=Z[0],Y=(Z[1],j((0,a.useState)(0),2)),Q=(Y[0],Y[1]),R=j((0,a.useState)(0),2),ee=R[0],te=R[1],ne=j((0,a.useState)(""),2),re=ne[0],ae=ne[1],oe=j((0,a.useState)(!1),2),ie=oe[0],ue=oe[1],ce=[t("序号"),t("运行名称"),t("状态"),t("运行时长"),t("日期"),t("操作")],le=[t("名称"),t("状态"),t("cwd"),t("运行时长"),t("操作")],se=function(){var e=A(k().mark((function e(t){var n,r,a;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=new v._).page_num=null!=t?t:U,n.page_size=L,n.dir_path="".concat((0,y.GG)("file",(0,y.vX)())),e.next=6,c.ws.sendData(u.HK.workflow_get,n);case 6:if(r=e.sent){e.next=9;break}return e.abrupt("return");case 9:a=r.context,O(a.list.map((function(e){var t="string"==typeof e.meta?JSON.parse(e.meta):e.meta;return t.index=e.index,t}))),Q(a.total),te((0,b.gw)(a.total,L));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),fe=function(){var e=A(k().mark((function e(t){var n,r,a;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=new v._).search_name=t,n.dir_path="".concat((0,y.GG)("file",(0,y.vX)())),ue(!0),e.next=6,c.ws.sendData(u.HK.workflow_search_by_run_name,n);case 6:if(r=e.sent){e.next=9;break}return e.abrupt("return");case 9:a=r.context,O(a.list.map((function(e){var t="string"==typeof e.meta?JSON.parse(e.meta):e.meta;return t.index=e.index,t}))),Q(a.total),te((0,b.gw)(a.total,L)),V(0),ue(!1);case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),de=function(){var e=A(k().mark((function e(){var t;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=new g.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}),I=t,$(t);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,a.useEffect)((function(){return z(!1),N=void 0,I=void 0,F=-1,se(),A(k().mark((function e(){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:I&&(I.dispose(),I=null);case 1:case"end":return e.stop()}}),e)})))}),[]);var he=function(){var e=A(k().mark((function e(t){var n,r,a,o,i,l;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.is_running){e.next=2;break}return e.abrupt("return");case 2:return K([]),(n=new v._).index=t.index,n.dir_path="".concat((0,y.GG)("file",(0,y.vX)())),e.next=8,c.ws.sendData(u.HK.workflow_get,n);case 8:r=e.sent,a=r.context,o="string"==typeof a.one_data.data?JSON.parse(a.one_data.data):a.one_data.data,i=o.success_list,l=o.fail_list,T([].concat(_(l),_(i)));case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),me=function(e,t,n){if(t){var r,o=x(null!=t?t:[]);try{for(o.s();!(r=o.n()).done;){var i,u,c,s=r.value,f=void 0,d=[];if(s["use-yml"])me(d,void 0,s.use_job_children_list),f="".concat(s["use-yml"]," ;").concat(null!==(u=s.duration)&&void 0!==u?u:-1);else f="".concat(s.run," ;").concat(null!==(c=s.duration)&&void 0!==c?c:-1);f=a.createElement("div",null,a.createElement(l.fq,{success:void 0===s.code?void 0:0===s.code}),"$",f),e.push({name:f,children:d,extra_data:{code:s.code,context:null!==(i=s.success_message)&&void 0!==i?i:s.fail_message}})}}catch(e){o.e(e)}finally{o.f()}}else if(n){var h,m=x(null!=n?n:[]);try{for(m.s();!(h=m.n()).done;){var p=h.value,v=a.createElement("div",null,a.createElement(l.fq,{success:void 0===p.code?void 0:0===p.code}),"$",p.name);e.push({name:v,extra_data:{code:p.code,is_job:!0,job_data:p}})}}catch(e){m.e(e)}finally{m.f()}}},pe=function(){var e=A(k().mark((function e(t){var n,r;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.steps,me(r=[],null!=n?n:[]),K(r);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ve=function(){var e=A(k().mark((function e(t){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(I){e.next=3;break}return e.next=3,new Promise((function(e){N=e,z(!0),de()}));case 3:t&&(I.reset(),I.write(t));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ye=function(){var e=A(k().mark((function e(t){var n,r,a;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==t||null===(n=t.extra_data)||void 0===n||!n.is_job){e.next=4;break}return e.next=3,pe(t.extra_data.job_data);case 3:return e.abrupt("return");case 4:if(null==t||null===(r=t.extra_data)||void 0===r||!r.context){e.next=8;break}ve(t.extra_data.context),e.next=11;break;case 8:if(null!=t&&t.extra_data.code){e.next=10;break}return e.abrupt("return");case 10:ve(null!==(a=t.extra_data.code)&&void 0!==a?a:"");case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return a.createElement("div",null,a.createElement(d.A,null,J&&a.createElement(s.rA,{icon:"print",title:"打印日志",onClick:function(){z(!q)}}),a.createElement(s.rA,{icon:"close",title:t("关闭"),onClick:function(){E(!1)}})),a.createElement(h.jW,{isFull:!0,more:!0},a.createElement(h.NN,null,a.createElement(h.xh,null,a.createElement(h.fI,null,a.createElement(h.VP,null,a.createElement(l.uF,{self_title:a.createElement("span",{className:" div-row "},a.createElement("h2",null,t("历史记录"))),titleCom:a.createElement("div",{className:" div-row "},a.createElement(p.Sm,{disabled:ie,value:re,placeholder:"搜索运行名称(支持正则)",handleInputChange:function(e){ae(re)},handlerEnter:function(e){fe(e)}})),rightBottomCom:a.createElement("span",{className:" div-row "},a.createElement("span",null,Math.abs(U),"/",ee),a.createElement(p.Sm,{placeholder:"max page ".concat(ee),handleInputChange:function(e){F=parseInt(e)},handlerEnter:function(){if(F<1||F>ee)(0,f.zN)("illegal page num");else{var e=0-F;V(e),se(e)}}}),a.createElement(s.rA,{icon:"navigate_before",onClick:function(){var e=U+1;e>-1?(0,f.zN)("max page num"):(V(e),se(e))},title:"上一页"}),a.createElement(s.rA,{icon:"navigate_next",onClick:function(){var e=U-1;Math.abs(e)>ee?(0,f.zN)("min page num"):(V(e),se(e))},title:"下一页"}))},a.createElement(m.X,{headers:ce,rows:C.map((function(e,n){var r;return r=e.is_running?a.createElement("div",null,a.createElement(l.fq,null),t("正在运行")):a.createElement("div",null,a.createElement(l.fq,{success:e.is_success}),e.is_success?t("成功"):t("失败")),[a.createElement("p",null,e.index),a.createElement("p",{style:{wordWrap:"break-word"}},e["run-name"]),r,a.createElement("span",null,e.duration),a.createElement("span",null,e.timestamp),a.createElement("div",null,a.createElement(s.rA,{icon:"details",title:t("详情"),onClick:function(){he(e)}}))]})),width:"10rem"}))),a.createElement(h.VP,null,a.createElement(l.Zp,{title:t("Job")},a.createElement(m.X,{headers:le,rows:G.map((function(e,n){return[a.createElement("p",null,e.name),a.createElement("div",null,a.createElement(l.fq,{success:void 0===e.code?void 0:0===e.code}),0===e.code?t("成功"):t("失败")),a.createElement(l.xP,null,e.cwd),a.createElement("span",null,e.duration),a.createElement("div",null,a.createElement(s.rA,{icon:"details",title:t("详情"),onClick:function(){pe(e)}}),(!!e.success_message||!!e.fail_message)&&a.createElement(s.rA,{icon:"print",title:t("日志"),onClick:function(){var t;ve(null!==(t=e.success_message)&&void 0!==t?t:e.fail_message)}}))]})),width:"10rem"})),a.createElement(l.Zp,{title:"Step"},a.createElement(w.A,{list:H,click:function(e){ye(e)}}))))))),a.createElement("div",{style:{display:q?"":"none"}},a.createElement(M,{show:!0,terminal:J,init:function(){N&&(N(1),N=void 0)}})))}},7481:(e,t,n)=>{n.d(t,{S:()=>u,X:()=>i});var r=n(6540);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,u=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(e){l=!0,a=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(l)throw a}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function i(e){var t,n=a(r.useState([]),2),o=n[0],i=n[1];return(0,r.useEffect)((function(){e.children?i(Array.isArray(e.children)?e.children:[e.children]):i(e.rows)}),[e.rows,e.children]),r.createElement("table",null,r.createElement("thead",null,r.createElement("tr",null,null===(t=e.headers)||void 0===t?void 0:t.map((function(e,t){return r.createElement("th",{key:t},e)})))),r.createElement("tbody",null,o.map((function(t,n){return r.createElement("tr",{key:n,onContextMenu:function(){e.handleContextMenu&&e.handleContextMenu(t)}},t.map((function(t,n){var a;return r.createElement("td",{style:{width:null!==(a=e.width)&&void 0!==a?a:"auto"},key:n,className:n===o.length-1?"small":""},t)})))}))))}function u(e){return r.createElement("div",{style:{display:e.isFlex?"flex":"block"}},e.columns.map((function(e,t){return r.createElement("div",{key:t},e)})))}},8062:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(6540);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(null,arguments)}function o(e){return r.createElement("div",{className:"black-tip",onClick:function(){e.click&&e.click(e)},onContextMenu:function(t){t.stopPropagation(),t.nativeEvent.stopImmediatePropagation(),e.onContextMenu&&e.onContextMenu(t,e)}},e.name)}var i=function(e){return r.createElement("li",null,e.click?r.createElement(o,a({},e.node,{name:e.render?e.render(e.node):e.node.name,click:e.click,onContextMenu:e.onContextMenu})):r.createElement("div",null,e.render?e.render(e.node):e.node.name),e.node.children&&e.node.children.length>0&&r.createElement("ul",null,e.node.children.map((function(t,n){return r.createElement(i,{key:n,node:t,click:e.click,onContextMenu:e.onContextMenu,render:e.render})}))))};const u=function(e){return r.createElement("div",{className:"card-tree-view"},r.createElement("ul",null,e.list&&e.list.map((function(t,n){return r.createElement(i,{key:n,node:t,click:e.click,onContextMenu:e.onContextMenu,render:e.render})}))))}}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 674.d3efa9ef8434d58f023b.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[674],{2674:(t,e,r)=>{r.r(e),r.d(e,{default:()=>M});var n=r(6540),o=r(6417),i=r(7444),a=r(5997),u=r(7952),c=r(7022);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function s(){s=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function f(e,r,n,o){var i=r&&r.prototype instanceof y?r:y,a=Object.create(i.prototype);return c(a,"_invoke",function(e,r,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===p)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===p)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new j(o||[])),!0),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p={};function y(){}function d(){}function v(){}var m={};c(m,i,(function(){return this}));var g=Object.getPrototypeOf,w=g&&g(g(O([])));w&&w!==r&&n.call(w,i)&&(m=w);var b=v.prototype=y.prototype=Object.create(m);function x(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,a,u){var c=h(t[o],t,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==l(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}),!0)}function k(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var i=h(o,e.i,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,p;var a=i.arg;return a?a.done?(r[e.r]=a.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,p):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,p)}function _(t){this.tryEntries.push(t)}function S(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function j(t){this.tryEntries=[[-1]],t.forEach(_,this),this.reset(!0)}function O(e){if(null!=e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=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 a.next=a}}throw new TypeError(l(e)+" is not iterable")}return d.prototype=v,c(b,"constructor",v),c(v,"constructor",d),c(v,u,d.displayName="GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},e.awrap=function(t){return{__await:t}},x(E.prototype),c(E.prototype,a,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new E(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(b),c(b,u,"Generator"),c(b,i,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=O,j.prototype={constructor:j,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(S),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){a.type="throw",a.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],l=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o[2],p):this.complete(i)},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),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),S(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;S(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:O(e),r,n},"next"===this.method&&(this.arg=t),p}},e}function f(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function h(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){f(i,n,o,a,u,"next",t)}function u(t){f(i,n,o,a,u,"throw",t)}a(void 0)}))}}function p(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,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return y(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(t,e):void 0}}(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 y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function d(t){var e=p((0,n.useState)(!1),2),r=e[0],o=e[1],i=p((0,n.useState)([]),2),a=i[0],u=i[1],l=function(t){u(t)},f=function(){var e=h(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("folder"!==t.type){e.next=7;break}if(r||!t.click||a){e.next=4;break}return e.next=4,t.click(t,l,t.pre_path);case 4:o(!r),e.next=10;break;case 7:if(!t.click){e.next=10;break}return e.next=10,t.click(t,l,t.pre_path);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),y=function(){var e=h(s().mark((function e(){var r,n=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.length>0&&void 0!==n[0]&&n[0],"folder"!==t.type||r){e.next=6;break}return e.next=4,t.click(t,l,t.pre_path);case 4:e.next=7;break;case 6:t.fatherNowToggleExpansion&&t.fatherNowToggleExpansion();case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,n.useEffect)((function(){u(t.children)}),[t.children]),n.createElement("div",{className:"studio-item"},n.createElement("div",{onClick:f,onContextMenu:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),t.handleContextMenu&&t.handleContextMenu(e,t.name,t.pre_path,t.type===c.Iw.folder,y)},className:"studio-item-title"},n.createElement("i",{className:"material-icons studio-item-title-tag"},"file"==t.type?"":r?"arrow_drop_down":"arrow_right"),n.createElement("i",{className:"material-icons","file-type":t.type},"folder"===t.type?"folder":"text_snippet"),n.createElement("span",{className:"studio-item-name"},t.name)),r&&a&&n.createElement("div",{style:{marginLeft:20}},a.map((function(e,r){return n.createElement(n.Fragment,{key:r},n.createElement(d,{type:e.type,size:e.size,click:t.click,name:e.name,key:r,children:e.children,pre_path:"".concat(t.pre_path).concat(e.name).concat(e.type===c.Iw.folder?"/":""),handleContextMenu:t.handleContextMenu,fatherNowToggleExpansion:y}))}))))}function v(t){return n.createElement("div",null,t.list.map((function(e,r){return n.createElement(d,{pre_path:"".concat(t.pre_path).concat(e.name).concat(e.type===c.Iw.folder?"/":""),key:r,name:e.name,type:e.type,handleContextMenu:t.handleContextMenu,fatherNowToggleExpansion:t.fatherNowToggleExpansion,children:e.children,click:t.click,size:e.size})})))}var m=r(6007),g=r(4289),w=r(3459),b=r(8247),x=r(2543),E=r.n(x),k=r(4251),_=r(7567),S=r(2389),j=r(8815);function O(t){return O="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},O(t)}function N(){N=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var i=r&&r.prototype instanceof h?r:h,a=Object.create(i.prototype);return c(a,"_invoke",function(e,r,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=x(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new _(o||[])),!0),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function p(){}function y(){}var d={};c(d,i,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(S([])));m&&m!==r&&n.call(m,i)&&(d=m);var g=y.prototype=h.prototype=Object.create(d);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==O(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}),!0)}function x(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,x(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=s(o,e.i,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,f;var a=i.arg;return a?a.done?(r[e.r]=a.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function E(t){this.tryEntries.push(t)}function k(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function _(t){this.tryEntries=[[-1]],t.forEach(E,this),this.reset(!0)}function S(e){if(null!=e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=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 a.next=a}}throw new TypeError(O(e)+" is not iterable")}return p.prototype=y,c(g,"constructor",y),c(y,"constructor",p),c(y,u,p.displayName="GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,a,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new b(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(g),c(g,u,"Generator"),c(g,i,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=S,_.prototype={constructor:_,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(k),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){a.type="throw",a.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],l=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o[2],f):this.complete(i)},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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),k(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;k(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:S(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function P(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=I(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,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function A(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function C(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){A(i,n,o,a,u,"next",t)}function u(t){A(i,n,o,a,u,"throw",t)}a(void 0)}))}}function G(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||I(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 I(t,e){if(t){if("string"==typeof t)return T(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?T(t,e):void 0}}function T(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 F=n.lazy((function(){return Promise.all([r.e(960),r.e(91)]).then(r.bind(r,4091))}));function M(t){var e=G((0,i.L4)(o.A.studio),2),r=e[0],l=e[1],s=G((0,n.useState)([]),2),f=s[0],h=s[1],p=G((0,n.useState)(""),2),y=p[0],d=p[1],x=G((0,n.useState)(""),2),O=(x[0],x[1]),A=G((0,n.useState)(!1),2),I=(A[0],A[1],G((0,n.useState)({path:"",name:""}),2)),T=I[0],M=I[1],L=G((0,n.useState)(""),2),z=L[0],D=L[1],U=G((0,i.L4)(o.A.confirm),2),$=(U[0],U[1]),R=G((0,n.useState)(!1),2),K=R[0],Y=R[1],B=G((0,i.L4)(o.A.fileShellShow),2),W=B[0],X=B[1],q=G((0,i.L4)(o.A.file_shell_hidden),2),H=q[0],J=q[1],Q=(0,n.useRef)(null),V=(0,n.useRef)(null),Z=G((0,n.useState)(!1),2),tt=Z[0],et=Z[1],rt=G((0,n.useState)(16),2),nt=rt[0],ot=rt[1],it=G((0,i.L4)(o.A.showPrompt),2),at=(it[0],it[1]),ut=(0,S.Bd)().t;var ct=function(){var t=C(N().mark((function t(){var e,n,o,i,a,u,c;return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=(0,g.GG)("file",r.folder_path),d(e),t.next=4,m.$M.post("studio/get/item",{path:e});case 4:if((n=t.sent).code===w.m.Sucess){o=[],i=[],a=P(n.data.list);try{for(a.s();!(u=a.n()).done;)"folder"===(c=u.value).type?o.push(c):"file"===c.type&&i.push(c)}catch(t){a.e(t)}finally{a.f()}h([].concat(o,i))}case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();(0,n.useEffect)((function(){O(""),M({}),Y(!1),r.folder_path&&ct()}),[r]);var lt=function(){var t=C(N().mark((function t(e,r){var n;return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m.$M.get("".concat(encodeURIComponent(r)));case 2:n=t.sent,O(n.data),b.xK.set_value_temp(n.data),M({path:r,name:e}),D(r);case 7:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),st=function(t,e){t.size>j.o5?$({open:!0,handle:function(){lt(t.name,e),$({open:!1,handle:null}),Y(!1)},title:"超过20MB了还要打开吗?"}):lt(t.name,e)},ft=function(){var t=C(N().mark((function t(e,r,n){var o,i,a,u,c,l;return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("folder"!==e.type){t.next=7;break}return t.next=3,m.$M.post("studio/get/item",{path:"".concat(n)});case 3:if((o=t.sent).code===w.m.Sucess){i=[],a=[],u=P(o.data.list);try{for(u.s();!(c=u.n()).done;)"folder"===(l=c.value).type?i.push(l):"file"===l.type&&a.push(l)}catch(t){u.e(t)}finally{u.f()}r([].concat(i,a))}t.next=11;break;case 7:if(!K){t.next=10;break}return $({open:!0,handle:function(){$({open:!1,handle:null}),Y(!1),st(e,n)},title:"确定不保存就切换吗?"}),t.abrupt("return");case 10:st(e,n);case 11:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}();function ht(){return pt.apply(this,arguments)}function pt(){return(pt=C(N().mark((function t(){var e;return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(K){t.next=2;break}return t.abrupt("return");case 2:return e={context:b.xK.get_editor_value()},t.next=5,m.$M.post("save/".concat(encodeURIComponent(z)),e);case 5:0===t.sent.code&&Y(!1);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var yt=function(t){t.ctrlKey&&"s"===t.key&&(t.preventDefault(),K&&ht())};(0,n.useEffect)((function(){return document.addEventListener("keydown",yt),function(){document.removeEventListener("keydown",yt)}}),[K]);var dt=(0,n.useCallback)(E().throttle((function(t){var e=parseFloat(getComputedStyle(V.current).fontSize),r=window.innerWidth/e-4,n=t.clientX/e,o=2.25+Q.current.offsetWidth/e;n<=r&&n>=o&&ot(parseFloat(n.toFixed(2)))}),32),[]),vt=function(){et(!1),V.current.removeEventListener("pointermove",dt)},mt=[{r:ut("创建文件"),v:"创建文件"},{r:ut("创建目录"),v:"创建目录"},{r:ut("重命名"),v:"重命名"},{r:ut("删除"),v:"删除"}],gt=[{r:ut("重命名"),v:"重命名"},{r:ut("删除"),v:"删除"}],wt=function(t,e,r,n,o){t.preventDefault();var i=new k.i;i.path=r,i.filename=e,i.x=t.clientX,i.y=t.clientY,i.items=n?mt:gt,o===ct&&(i.items=i.items.slice(0,2)),i.type=n?c.Iw.studio_folder:c.Iw.studio_file;var a=function(t){o(t)};i.textClick=function(t){switch(t){case"创建文件":at({show:!0,type:_.PromptEnum.FileNew,overlay:!0,data:{dir:r,call:a}});break;case"创建目录":at({show:!0,type:_.PromptEnum.DirNew,overlay:!0,data:{dir:r,call:a}});break;case"删除":if(K&&(T.path===r||T.path.includes(r))){at({show:!0,type:_.PromptEnum.FilesDelete,overlay:!0,data:{path:r,call:function(){a(n),Y(!1),M({}),O(""),b.xK.set_value_temp("")}}});break}at({show:!0,type:_.PromptEnum.FilesDelete,overlay:!0,data:{path:r,call:n?function(){a(!0)}:a}});break;case"重命名":at({show:!0,type:_.PromptEnum.FileRename,overlay:!0,data:{path:r,dir:(0,g.Yp)(r),call:function(){a(!0)},filename:e}})}},at({show:!0,type:_.PromptEnum.FileMenu,overlay:!1,data:i})};return n.createElement("div",{className:"studio"},n.createElement(u.A,{ignore_tags:!0,left_children:[n.createElement(a.rA,{key:1,title:"取消",icon:"close",onClick:function(){l({}),X({show:!1,path:""}),J(void 0)}}),n.createElement("title",{key:2},T.name)]},n.createElement(a.rA,{icon:"terminal",title:"shell",onClick:function(){void 0===H?W.show?X({show:!1,path:""}):(X({show:!0,path:(0,g.GG)("file",r.folder_path)}),J(!1)):J(!H)}}),K&&n.createElement(a.rA,{title:"保存",icon:"save",onClick:ht})),n.createElement("div",{className:"studio-body",ref:V},n.createElement("div",{className:"studio-nav",style:{width:"".concat(nt-1,"em")},onContextMenu:function(t){wt(t,T.name,(0,g.GG)("file",r.folder_path),!0,ct)}},n.createElement(v,{pre_path:y,list:f,click:ft,handleContextMenu:wt,fatherNowToggleExpansion:ct})),n.createElement("div",{className:"studio__divider",ref:Q,onPointerDown:function(){et(!0),V.current.addEventListener("pointermove",dt)},onPointerUp:vt}),tt&&n.createElement("div",{className:"shell__overlay",onPointerUp:vt}),n.createElement("div",{className:"studio-editor",key:T.path},T.name&&n.createElement(F,{name:T.name,on_change:function(){K||Y(!0)}}))))}}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 759.deb9c1d4f58040bc8816.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[759],{542:()=>{},5601:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>G});var n,o=r(6540),a=r(2389),i=r(7444),u=r(6417),c=r(4944),A=r(4238),s=r(6007),f=r(3459),l=r(3033),h=r(5997),p=r(3029),d=r(7952),y=(r(2341),r(9879)),v=r(8257),m=r.n(v),g=r(8965),w=r(2042),Y=r(4777),x=r(8247),S=r(3430);function b(t){return b="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},b(t)}function j(){j=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(e,r,n,o){var a=r&&r.prototype instanceof l?r:l,i=Object.create(a.prototype);return c(i,"_invoke",function(e,r,n){var o=1;return function(a,i){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var c=Y(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var A=s(e,r,n);if("normal"===A.type){if(o=n.done?4:2,A.arg===f)continue;return{value:A.arg,done:n.done}}"throw"===A.type&&(o=4,n.method="throw",n.arg=A.arg)}}}(e,n,new E(o||[])),!0),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f={};function l(){}function h(){}function p(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(B([])));v&&v!==r&&n.call(v,a)&&(d=v);var m=p.prototype=l.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function r(o,a,i,u){var c=s(t[o],t,a);if("throw"!==c.type){var A=c.arg,f=A.value;return f&&"object"==b(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,u)}),(function(t){r("throw",t,i,u)})):e.resolve(f).then((function(t){A.value=t,i(A)}),(function(t){return r("throw",t,i,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}),!0)}function Y(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,Y(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var a=s(o,e.i,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,f;var i=a.arg;return i?i.done?(r[e.r]=i.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function x(t){this.tryEntries.push(t)}function S(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function E(t){this.tryEntries=[[-1]],t.forEach(x,this),this.reset(!0)}function B(e){if(null!=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(b(e)+" is not iterable")}return h.prototype=p,c(m,"constructor",p),c(p,"constructor",h),c(p,u,h.displayName="GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,u,"GeneratorFunction")),t.prototype=Object.create(m),t},e.awrap=function(t){return{__await:t}},g(w.prototype),c(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new w(A(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(m),c(m,u,"Generator"),c(m,a,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=B,E.prototype={constructor:E,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(S),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){i.type="throw",i.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a[4],u=this.prev,c=a[1],A=a[2];if(-1===a[0])return n("end"),!1;if(!c&&!A)throw Error("try statement without catch or finally");if(null!=a[0]&&a[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<A)return n(A),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var a=o?o[4]:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;S(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:B(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function E(t,e,r,n,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function B(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){E(a,n,o,i,u,"next",t)}function u(t){E(a,n,o,i,u,"throw",t)}i(void 0)}))}}function k(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,u=[],c=!0,A=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){A=!0,o=t}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(A)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return P(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)?P(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 P(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function G(){var t=(0,a.Bd)().t,e=k((0,o.useState)(void 0),2),r=e[0],v=e[1],b=k((0,o.useState)(!1),2),E=b[0],P=b[1],G=k((0,i.L4)(u.A.user_base_info),2),N=G[0],z=(G[1],(0,x.MH)().check_user_auth),F=(0,o.useRef)(null),H=(0,o.useRef)(null),L=function(){var e=B(j().mark((function e(r){var o;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(N.sysSoftWare&&N.sysSoftWare[Y.jk.ffmpeg]&&N.sysSoftWare[Y.jk.ffmpeg].installed){e.next=3;break}return(0,w.zN)(t("找不到ffmpeg")),e.abrupt("return");case 3:return o={controls:!0,width:640,height:360},H.current=(0,y.default)(F.current,o),m().isSupported()?((n=m().createPlayer({type:"flv",url:g.I.getOtherWebSocketUrl(A.HK.rtsp_get,{url:r}),isLive:!0})).attachMediaElement(F.current),n.load(),n.load()):(0,w.zN)("FLV.js is not supported in this browser."),e.abrupt("return",(function(){}));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();(0,o.useEffect)((function(){return function(){n&&(n.pause(),n.unload(),n.detachMediaElement(),n.destroy(),n=null),H.current&&H.current.dispose()}}),[]);var M=function(t){P(!0),L(t.address?t.address:r)},K=function(){var t=B(j().mark((function t(){return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c.ws.sendData(A.HK.rdp_disconnect,"");case 2:P(!1);case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),O=function(){var t=B(j().mark((function t(){var e;return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.K4.get("tag");case 2:if((e=t.sent).code!==f.m.Sucess){t.next=5;break}return t.abrupt("return",e.data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),I=function(){var t=B(j().mark((function t(e){return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.K4.post("tag/save",e);case 2:t.sent.code!==f.m.Sucess&&(0,w.zN)("网络错误");case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),D=function(){var t=B(j().mark((function t(e){return j().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:v(e.address),M(e);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return o.createElement("div",null,o.createElement(d.A,null,o.createElement(l.$Z,{max_width:"40rem",placeholder:t(" rtsp://username:password@ip:port/path"),icon:"link",value:r,handleInputChange:function(t){return v(t)}}),!E&&o.createElement(h.rA,{icon:"play_arrow",title:t("连接"),onClick:M}),E&&o.createElement(h.rA,{icon:"close",title:t("关闭"),onClick:K})),!E&&o.createElement(p.N,{have_auth_edit:z(S.oV.rtsp_proxy_tag_update),getItems:O,save:I,clickItem:D,items:[{key:"name",preName:t("名字")},{key:"address",preName:t("地址")},{key:"color",preName:"color"}]}),o.createElement("canvas",{id:"rdpwebview",style:{display:"none"}}),o.createElement("div",{style:{display:E?"block":"none"}},o.createElement("video",{ref:F,className:"video-js vjs-default-skin"})))}},7422:t=>{"use strict";t.exports="data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABTsAAsAAAAAIpAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV32Y21hcAAAAYQAAAEJAAAD5p42+VxnbHlmAAACkAAADtIAABckI4l972hlYWQAABFkAAAAKwAAADYsvIjpaGhlYQAAEZAAAAAdAAAAJA+RCL1obXR4AAARsAAAABcAAAC8Q2YAAGxvY2EAABHIAAAAYAAAAGB7CIGGbWF4cAAAEigAAAAfAAAAIAFAAI9uYW1lAAASSAAAASUAAAIK1cf1oHBvc3QAABNwAAABfAAAAnXdFqh1eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGR7yDiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGPHcRdyA4RZgQRADaGCyYAAHic7dPXbcMwAEXRK1vuvffem749XAbKV3bjBA6fXsaIgMMLEWoQJaAEFKNnlELyQ4K27zib5PNF6vl8yld+TKr5kH0+cUw0xv00Hwvx2DResUyFKrV4XoMmLdp06NKjz4AhI8ZMmDJjzoIlK9Zs2LJjz4EjJ85cuHLjziPe/0UWL17mf2tqKLz/9jK9f8tXpGCoRdPKhtS0RqFkWvVQNtSKoVYNtWaoddPXEBqG2jQ9XWgZattQO4baNdSeofYNdWCoQ0MdGerYUCeGOjXUmaHODXVhqEtDXRnq2lA3hro11J2h7g31YKhHQz0Z6tlQL4Z6NdSbod4N9WGoT9MfHF6GmhnZLxyDcRMAAAB4nJ1YC1hU17U+a5/HMA4iA3NmVBDmoQwP5TFnHlFeA4gYiUFRQINoSCBAyK3G2yi+0aipYtFcHYo2xsb4NiY3+VrNxSaX5uvt495ozNdoYoxmem2/L8HGpLc+InB279pnhlGr5mvL4eyz99nrrL32eu1/DQcc/okdYgdHOA6MQKp4r9gx0EcMHMezOalVasW5BM7NcXoSb9fFgE6KtSSBxWz1FYDPG+vMBGcKb9cebu2VS5s2aaTkCvRSf6C7Y+Ppibm5E09v7IDs2/3uZQtbD0zIyppwoHXh/93ukmyYgdePNRp65p5v+3v/9otQl2O7wP34cT88p8Md2YxpYLQZoRcy6FlSBRnwnGAe6BPMSCZo+7NJVqS0cE4uHendzhSnbPH6TDqL1+Nme5LZXkCHnGyoH0kne30WH+gswhm3q+pt/mTas9NLS64GnjmSlTPw0wVQT/ewRaBgxtydy3cuUB9/6SW+vb5yRvr+t0eOfPKJZ/9t3+4tL7xj32Xd3thCxi+ge6ifdsAN+l5+wi5HQ/cCoeull1AszS7CUfEcJzK7sKWJAdJhCd0sPM4+EY7QDm5ov08hXRQXE5bf6PV5Q5+IjW7X7Nku92Ask4l2hCRRD6TPqISiCJeQna3SCFwrhrNzXHzo4yFevBwxpzxk8WCIIfkvVEKVy32SbT8n68gzgaslpaiO2zIGIyuSb7RNf9HSuN26y/7OC1tgEmpiyA6aD4qcgTOiLThwGG0eB694FI8NHLLN6OBlRVaMxNAFS4JdXUG6mW8PwpKuYLCLXKGbu8iwYNdgO06Sn3Th+/vyZAxs8Ro30DjHe9gy8Fywi24OMm7Qyzh3MTZVOMYhLBnoC+J79lpTUyQmorjhnMwlcQ5uPEYGpDjsOkkH49BjQLQBqs3jFtFdJNlksYmoQFDArLh8Xh+Qd6Ghcsb6FUuehDi+U/lqD71K/qiegeV1imcwjl7ExwiSrf4BZyCujV6cVcFo6VX+G9IcPyFjJnUufbU/jzrL1X99as36reXl8K32nFaOr+E8jWJEcJ55DpMVfSMe95/AJaOsGBH2GJCNpiRQbK4C8BjdmQA22QY2j03Em13i2YHqtNLU1NI04Yj2HJgA6fQc6VPNpA/D+Ryks554NnVy2mB72uRUfPLsqR4N0LOBQKArwJYO+5W2fgZX8oC1HR6HjNaQTVIG2FPwnTcXXGZZfNB7TE6pTKZUwaw91XWLAoFFGcnB5PHjsckgBjbWutrL+0h5Y1xw3DRGDumsnXb3MJwXrJIN5U7m0rgJ3yG5w4he5ckFG4pmNEkOm0/xOO4r4yL87wqtQM+hiJIVp+6iG2wPBKD35ElGkDx+UfC2v1mFG1o+M3AjNFty8biKMXwzyxnZLds8wYD2BxmCPHAldPOeLsy/0BugftYhVYFAhO8SqQ0j3oK7dHJZnI/jxmUS4onlxskSF8thmvNZjIrRZwEPxr0lBuLRuz3oy/FOHCsxwOPYh2M+e9u3J5pgPYz9gp6G7C9m0A11F9ddqKMfV+4sbq45/YspOysXvT+3pdFdYNg2fHbW8Dz301MqDVuGrz0Fuh0YMW8mddrpqzST7rV9BcvqPoNvadRndWp0p8HvbiqrFj5yFQ/vNFSXDpxpLEFWp+DcrF3FT1afWshFcmCfeAMjEvO65i0Y6XijQfSRPWx3TV/Df7Km3E1l+kLt56s/rwVzuRusNMhudznkwdLaS+QNdeal2jDPP4l9qHc98vTYZOSkxzD+njBWVWjFPKgipx6DkWvXQiW8OYcewVHE5yukinDMcfGgc0opDltYKDxIGBedkzc6jSfE7tlvESCDFUw0Hx0opS+U0lHCxNottbNWSxX9zZVvEhKWUSyBpaXwBc2a98M6UqPeXAs/GDon8Ax7hsthO8cM5HU7Ad0UvRR9lHmtyQKZ4MAe814X5h9MSUkQmhf96eVJ6p90OjIiqSIjvykvr2l5U55O/fPQKD+jIomYpNyGJQ25uQ2kIikRfAmuBHCPsWqkSDEqgZ5KDI2sifS/R43MbZg0idFHbCPNxXxZws1ACVE6hAhOdJwRkJLFBLPZpRGYJ50pko6XzMkgmSx40ljik6AQcKhFnLcQE6rF7PXFe1Ocoj0T3AXgSgJTDIhHRfHlYZKuSzc6uievOJGXY+i5GJkkTp7UM3y0LqATDbtFcbdBxO7o4T25JYlEjoH0uynUh8rapkxp62QN70svSF+hT4gGPlovlmcm/ComLi7mV4kTykV9NFWjE/QrwgQ4uIcAP0rQF4VZYRP2o3PhHHzfPMJj9Ir+uzKUlrH49ntT18AVvj1sc3YGjUT/Mt2Dxawa8ArcA7bCQIpvfwAYu22vEG/No/5RvPdA7g+AelLrPwzy+LtkLPhnpIxH14m4EYq8eeMHbPEPNm6G7Nv9B4jcFPZ8bJj0SEjP3MPgQdKTqqEoy2v6G32P/Y6dxOv04AxnoAeq+GILvUavtYCBXm+BaIhuodcfrN5B/V2EYMCPh+SxavjGyPwV0x4CJgUPGT0mQaODGBACIJZGsMXwAD0LGXx7l3CdAcKMIKI+f5CepWeD0BvyU/GcdBxPF8SwejC6LGZmAURFdsSWKR5HyHld2kbdIZO1Ixx+bnnzU7n5+blPNV9jnUDWhP2tC68tbN3PVIldsQPxSAcSpjOav7Q05uXn5zW2LLvDXn9B6syscPy9iDLEMmSrJz6nYuWMipukjM0AH8JkGS+XFyMRkzSCH7KD/hwm172SAyZYumHlefr5AddrtA0O0TnwaVZxcRY9Bfukn9Gf05N1r9DV9MoBsJ1f+ZrqUvtPHizJAntWybv7hmqLt6QLuK6ZS9Fqi1jO5rDoWPZXXII5Tgajg53cIXCjDCGIcYrRIY2n6+mXOa/W0bdhau3ryiEYe2FV/5oeaIYK/5w5frCyll6/cYO8DiNhw6t1MBWmznt91QX62UF1N7l0eHBZTRGpKaqpKVIPF9UcIzmReud9TSY75+K899GHbBu6wjoR7RKKZVYiYxSPf5/2wJT5e3NAhmUbVn5KLx1Ujg0+BGvpAIh0DezInTkzF37KVocxrKU3r1+XLtAe2lO3l66kfQfB/unKY+q8N375Ru8bc4pJXfEcESU95q+p8ZNZRTWH1d9FzvUdYXk5rLkcdkEisoKKVHQW/b3GEx6tPaYcoJfOr9wAbSBnv1IHpep0OExr4LPMkpJM+j7sly7UHkOzXjoAZljHCGiyegtNlwljM0v+c19ET9Pvst09a2Mtgcf5/ZSzYO5h1156+eyydfAsxGa9XAuF6vzjh6CssLq6ECysperXX0sX5h5ZdpZe3guxsGIPEtHk/aqXX1hVqP5HYVVVISkrrNqvXorIc+5Ou91Hnr/LcD2afi6eX7UBloOcs7cOpqgGaNfs1g7bNbs9z6wASaylN69d0/TFTIz6Ws8+oGV3mE2612wRTHKcVUbhjKadebloMc+dyXgMVtVK6BwMB/+mVW09igdRBWaRtNQX59d/VD//xdQ0TCiYNj1KT9sq6Wdu5WTbqk3qDXyDaLa1fv621LS01G3z61sD6lH8lAxDLicV921s6Bf92JOYvzNYCL1khbqBXEFUzC521N5NyzNaQIWhjyFyDoBIVrAjmv2UEaLlI+c6zw1jmVIPLLLZZUTj6GxGHW+mq1tgHXR2D85p4Q934+jLbtjVLcyCdS10NVzpHqxp4Q/hK7WopY/NRGx9HGsPGdFjOjcpjBnGYMVqY/4eqT5khWEHWUup2A/pTw7pdWgsWft7ETUERL96nRg0HNFPmCYba6pylECaExX89A9WLUOVB4oKLu/o1oqSYHCgLzBUlAz8hNFDRpeSU1XT+LRmDUgPaKbYdHDn9suF/tu13nHJij0N97LfS0QmqONuyONk7zvUI6Qa0pF9f2+oABL92AT6e0U//z9YqAiWtJLU1JK0gS+1aacwamiNqK067u9ZQ8f1d4qLodMzz3uL89Z68V/Hnr++hXWUuHgw8dfi972PeTyPefu3aNNucemQ74qFuIaJnVkOu4Q+yjuwmmC1FqZpl1i4uzoPxjkpPf3Xv545tl26Rr+dOvUd+omqJzch9dOeU7f10Y64nMcKK137DccIZq2WdXtdZjbEoLSzHwiMtrjYLDxpHQW8gjMX6XFYAE2zSWVD04EGYSs9MbO6sEo20BMEAB4mpvSypsKjZ4Stgzb+c3A9/MQT2+vrBy+qvyFxLUtLlSRF/Ri2wjfZ2dus2Q8lXx4608/jnqK5OOap6NY2PSjYYnECCjiEeLJll/pbmqfeIK+ps3+MxrlEhqmTPipVP7kqlF4VhpEb6r+Q7YOJg38kJ9SHBf3NBl6+9YchfbUjb5ahLSzUM3kPHmwFAsZ5rpai0S7E5xWzZ1j+fW7zsUWP2g5NXTw52ySCTrgG0+lbw60l2Y/CB185CoA8NK+tbRKxfjy6pm5hzQRRR+cMqv1Jbiw6STivtEvt3DRcy0QEh92JlUGo2PG4tSKHl00YD6xc8CK+YPYyy3io2lN8BcSjKRzrIV6ypOAobqxViJPaT9M9Hy5szY33mp7OX/Zu89L/7Ww5vqY2Y8b0pKgoiUhG5cPDPzq8qTV/WkzUOIvXVVA96kmjcBrr3HrYC/Wn+fYP6Z7T1rqy3zknbvqma/FvVk96fNXGkuaXrdHW5JGSxZT/2I/O73v+yNWafMdzc5NdxYurHs6h86e01sLKLz9EBrg+x36rxAaED7hRnAMx7Vzu+9wabh3zG8XLQjx0ablUJzmxdErxYT3kzQSd0SSafVqF5PXgpp0OyYJ1EyNHpGUZmvK575ySzd85JSqF7IBzSAbMM04+MbE58xF3/njXOGecSaermlw2y9PsSQdytLJVr8t+wg+rR8cZYoeNxVIzNdk3Bngi8U5LAlgTFoQnzJCa5EsCgYhCaGL+qPj7TdhG31p9tej3R04N//PXxNwJvyUqwaJqRPJY98TJ5TPndmflRAkAhBfe46sfKW5wizSge08Xb7Ca/GUVs55trngkKkrUS2WPzKttaaqq+idmahugkY+W6fN0I6i3gPt/x88U4wAAeJxjYGRgYADiGU9YXsXz23xl4GZnAIFH7fO+IdMc/WBxDgYmEAUASbMKwAB4nGNgZGBgZwABjj4Ghv//OfoZGBlQgT4ARicDZAAAAHicY2BgYGAfxJijD8Fmu4EqBwCSpgKpAAAAAAAADgBoAH4AzADgAQIBQgFsAZgB7gIuAooC0AL8A2IDjAOoA+AEMASwBNoFCAVaBcAGCAYuBnAGrAb2B04HigfSCCoIcAiGCJwIyAkkCVYJiAmsCfIKIApWCsQLknicY2BkYGDQZ2hmYGcAASYg5gJCBob/YD4DABqrAdAAeJxdkE1qg0AYhl8Tk9AIoVDaVSmzahcF87PMARLIMoFAl0ZHY1BHdBJIT9AT9AQ9RQ9Qeqy+yteNMzDzfM+88w0K4BY/cNAMB6N2bUaPPBLukybCLvleeAAPj8JD+hfhMV7hC3u4wxs7OO4NzQSZcI/8Ltwnfwi75E/hAR7wJTyk/xYeY49fYQ/PztM+jbTZ7LY6OWdBJdX/pqs6NYWa+zMxa13oKrA6Uoerqi/JwtpYxZXJ1coUVmeZUWVlTjq0/tHacjmdxuL90OR8O0UEDYMNdtiSEpz5XQGqzlm30kzUdAYFFOb8R7NOZk0q2lwAyz1i7oAr1xoXvrOgtYhZx8wY5KRV269JZ5yGpmzPTjQhvY9je6vEElPOuJP3mWKnP5M3V+YAAAB4nG2ReVPbMBDF/ULi2EkDBFqO3gdHLxUzDB9IkdexBllydRD49ihO3Ckz7B/a31utZnafkkGyiXnyclxhgB0MMUKKMTLkmGCKV5hhF3vYxxwHOMRrvMERjnGCU7zFO7zHB3zEJ3zGF3zFN5zhHBe4xHf8wE/8wm8w/MEVimTYKv44XR9MSCsUjVoeHE3vjQoNsSZ4mmxZmVWPjSz7jlou6/0qKOWEJdKMtCe793/hQfqxa6XWZHMXFl56RS4TvPXSaDeoy0zUUZB109KstDK8lHo5q6Qi1hcOnqkImubPS6aqRq7mlnaEWabub4iYblba3SRmgldS0+FWdhNtt04F14JUaqkl7tcpOpJtErvNt3Bd9HRT5JWxK25Ldjvp6br4hzfFiIdSmlzTg2fSUzNrLd1LE1ynxq4OVaVoKLjzJ60UPtj1RKzHzsbjly6inVnFBS2MucviPncU7Rr7lfTxRepDs1A2j3ZHRc7PuzFYSfE3ZOd4kjwBy227hA=="}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 811.148ebc3a727004dfa32a.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[811],{2811:(t,e,r)=>{r.r(e),r.d(e,{default:()=>d});var n=r(6540),o=r(4943),a=r(7444),i=r(6417),u=r(6007),c=r(4289),l=r(2042),f=r(7767);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function h(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,a,i,u=[],c=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return p(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)?p(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 p(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 y(){y=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var a=r&&r.prototype instanceof p?r:p,i=Object.create(a.prototype);return c(i,"_invoke",function(e,r,n){var o=1;return function(a,i){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var c=M(u,n);if(c){if(c===h)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===h)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new O(o||[])),!0),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h={};function p(){}function v(){}function m(){}var d={};c(d,a,(function(){return this}));var g=Object.getPrototypeOf,w=g&&g(g(k([])));w&&w!==r&&n.call(w,a)&&(d=w);var b=m.prototype=p.prototype=Object.create(d);function E(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,a,i,u){var c=f(t[o],t,a);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==s(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,i,u)}),(function(t){r("throw",t,i,u)})):e.resolve(h).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}),!0)}function M(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,M(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var a=f(o,e.i,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,h;var i=a.arg;return i?i.done?(r[e.r]=i.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,h):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function S(t){this.tryEntries.push(t)}function I(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function O(t){this.tryEntries=[[-1]],t.forEach(S,this),this.reset(!0)}function k(e){if(null!=e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(s(e)+" is not iterable")}return v.prototype=m,c(b,"constructor",m),c(m,"constructor",v),c(m,u,v.displayName="GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,c(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},e.awrap=function(t){return{__await:t}},E(x.prototype),c(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new x(l(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(b),c(b,u,"Generator"),c(b,a,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=k,O.prototype={constructor:O,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){i.type="throw",i.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a[4],u=this.prev,c=a[1],l=a[2];if(-1===a[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=a[0]&&a[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var a=o?o[4]:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o[2],h):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),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),I(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:k(e),r,n},"next"===this.method&&(this.arg=t),h}},e}function v(t,e,r,n,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function m(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){v(a,n,o,i,u,"next",t)}function u(t){v(a,n,o,i,u,"throw",t)}i(void 0)}))}}function d(){var t=h((0,a.L4)(i.A.excalidraw_editor),2),e=t[0],r=t[1],s=h((0,n.useState)(null),2),p=s[0],v=s[1],d=(0,f.Zp)(),g=((0,f.zy)(),function(){var t=m(y().mark((function t(){var r;return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,u.$M.get("".concat(encodeURIComponent((0,c.GG)("file",(0,c.vX)()))).concat(e.name));case 2:return r=t.sent,t.abrupt("return",JSON.parse(r.data));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}());(0,n.useEffect)((function(){g()}),[e]);var w=function(){var t=m(y().mark((function t(){var r,n;return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=p.getSceneElements(),n={elements:r},t.next=4,u.$M.post("save/".concat(encodeURIComponent((0,c.GG)("file",(0,c.vX)()))).concat(e.name),{context:JSON.stringify(n)});case 4:0===t.sent.code&&(0,l.LW)("保存成功");case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return n.createElement("div",{id:"excalidraw-container"},n.createElement("div",{className:"excalidraw-context"},n.createElement(o.Excalidraw,{langCode:"zh-CN",initialData:g(),excalidrawAPI:function(t){return v(t)},UIOptions:{dockedSidebarBreakpoint:0}},n.createElement(o.MainMenu,null,n.createElement(o.MainMenu.Item,{onSelect:function(){r({}),d((0,c.vX)())}},"关闭"),n.createElement(o.MainMenu.Item,{onSelect:w},"保存到服务器"),n.createElement(o.MainMenu.Group,{title:"Excalidraw items"},n.createElement(o.MainMenu.DefaultItems.LoadScene,null),n.createElement(o.MainMenu.DefaultItems.Export,null),n.createElement(o.MainMenu.DefaultItems.SaveToActiveFile,null),n.createElement(o.MainMenu.DefaultItems.SaveAsImage,null),n.createElement(o.MainMenu.DefaultItems.ClearCanvas,null),n.createElement(o.MainMenu.DefaultItems.ToggleTheme,null),n.createElement(o.MainMenu.DefaultItems.ChangeCanvasBackground,null))))))}}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 827.c175a16183659c8d162d.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[827],{2827:(t,e,r)=>{r.r(e),r.d(e,{default:()=>ke});var n=r(6540),o=r(5725),a=r(3033),i=r(5997),u=r(3413),c=r.n(u),l=r(7952),s=r(6007),f=r(8694),h=r(3459),p=r(3029),d=r(2389),y=r(6417),m=r(7444),v=r(8247),g=r(3430),w=r(2042);function b(t){return b="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},b(t)}function x(){x=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var a=r&&r.prototype instanceof h?r:h,i=Object.create(a.prototype);return c(i,"_invoke",function(e,r,n){var o=1;return function(a,i){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new N(o||[])),!0),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};c(y,a,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(A([])));v&&v!==r&&n.call(v,a)&&(y=v);var g=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,a,i,u){var c=s(t[o],t,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==b(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,u)}),(function(t){r("throw",t,i,u)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}),!0)}function _(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,_(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var a=s(o,e.i,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,f;var i=a.arg;return i?i.done?(r[e.r]=i.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function S(t){this.tryEntries.push(t)}function k(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function N(t){this.tryEntries=[[-1]],t.forEach(S,this),this.reset(!0)}function A(e){if(null!=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(b(e)+" is not iterable")}return p.prototype=d,c(g,"constructor",d),c(d,"constructor",p),c(d,u,p.displayName="GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},w(E.prototype),c(E.prototype,i,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(l(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},w(g),c(g,u,"Generator"),c(g,a,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=A,N.prototype={constructor:N,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(k),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){i.type="throw",i.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a[4],u=this.prev,c=a[1],l=a[2];if(-1===a[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=a[0]&&a[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var a=o?o[4]:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),k(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;k(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:A(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function E(t,e,r,n,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function _(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){E(a,n,o,i,u,"next",t)}function u(t){E(a,n,o,i,u,"throw",t)}i(void 0)}))}}function S(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,a,i,u=[],c=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(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 N(t){var e=(0,d.Bd)().t,r=S((0,m.L4)(y.A.header_min),2),u=(r[0],r[1]),b=S((0,n.useState)(""),2),E=b[0],k=b[1],N=S((0,n.useState)(""),2),A=N[0],O=N[1],j=S((0,n.useState)(void 0),2),K=j[0],F=j[1],P=S((0,n.useState)(!1),2),L=P[0],C=P[1],I=(0,v.MH)().check_user_auth,D=function(){var t=_(x().mark((function t(){var e;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=new f.qB).targetProxyUrl="string"==typeof E?E:A,t.next=4,s._U.post("close",e);case 4:if(t.sent.code===h.m.Sucess){t.next=7;break}return t.abrupt("return");case 7:O(""),u(!1);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),T=function(){var t=_(x().mark((function t(e){var r,n,o;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=new f.qB).targetProxyUrl="string"==typeof e?e:E,r.targetProxyUrl.startsWith("http")){t.next=5;break}return(0,w.zN)("must start with http[s]://"),t.abrupt("return");case 5:return r.sysProxyPort=K,t.next=8,s._U.post("start",r);case 8:if((n=t.sent).code===h.m.Sucess){t.next=11;break}return t.abrupt("return");case 11:o="".concat(window.location.protocol,"//").concat(window.location.hostname,":").concat(n.data),O(o);case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();(0,n.useEffect)((function(){return function(){D()}}),[]);var M=function(){var t=_(x().mark((function t(){var e;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s._U.get("tag");case 2:if((e=t.sent).code!==h.m.Sucess){t.next=5;break}return t.abrupt("return",e.data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),G=function(){var t=_(x().mark((function t(e){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s._U.post("tag/save",e);case 2:t.sent.code!==h.m.Sucess&&new(c())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),B=function(){var t=_(x().mark((function t(e){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:k(e.url),T(e.url);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(l.A,null,n.createElement(a.$Z,{placeholder:e("系统代理端口"),icon:"outlet",value:K,handleInputChange:function(t){t&&(/^\d+$/.test(t)||new(c())({type:"error",text:"不是数字",timeout:1e3,layout:"bottomLeft"}).show(),F(parseInt(t)))},max_width:"10rem"}),n.createElement(a.$Z,{placeholder:e("要代理的url"),icon:"link",value:E,handleInputChange:function(t){k(t)}}),n.createElement(i.rA,{icon:"play_arrow",title:e("开始代理"),onClick:T}),n.createElement(i.rA,{icon:"fullscreen",title:e("全屏"),onClick:function(){C(!L),u(!L)}}),n.createElement(i.rA,{icon:"close",title:e(e("关闭")),onClick:function(){D(),C(!1),k("")}})),n.createElement(o.jW,{isFull:L},n.createElement("div",{id:"browser"},!A&&n.createElement(p.N,{have_auth_edit:I(g.oV.browser_proxy_tag_update),getItems:M,save:G,clickItem:B,items:[{key:"name",preName:e("名字")},{key:"url",preName:"url"},{key:"color",preName:"color"}]}),n.createElement("iframe",{id:"webview",src:A}))))}var A=r(4405),O=r(7374),j=r(7767),K=r(4694),F=r(5726),P=r(7567),L=r(7022),C=r(4289),I=r(8844),D=r(8815),T=r(9214);function M(t){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},M(t)}function G(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=z(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 a,i=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){u=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(u)throw a}}}}function B(){B=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var a=r&&r.prototype instanceof h?r:h,i=Object.create(a.prototype);return c(i,"_invoke",function(e,r,n){var o=1;return function(a,i){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var c=x(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new S(o||[])),!0),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};c(y,a,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(k([])));v&&v!==r&&n.call(v,a)&&(y=v);var g=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,a,i,u){var c=s(t[o],t,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==M(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,u)}),(function(t){r("throw",t,i,u)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}),!0)}function x(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,x(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var a=s(o,e.i,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,f;var i=a.arg;return i?i.done?(r[e.r]=i.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function E(t){this.tryEntries.push(t)}function _(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function S(t){this.tryEntries=[[-1]],t.forEach(E,this),this.reset(!0)}function k(e){if(null!=e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(M(e)+" is not iterable")}return p.prototype=d,c(g,"constructor",d),c(d,"constructor",p),c(d,u,p.displayName="GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,i,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new b(l(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},w(g),c(g,u,"Generator"),c(g,a,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=k,S.prototype={constructor:S,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){i.type="throw",i.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a[4],u=this.prev,c=a[1],l=a[2];if(-1===a[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=a[0]&&a[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var a=o?o[4]:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:k(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function U(t){return function(t){if(Array.isArray(t))return V(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||z(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 R(t,e,r,n,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function H(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){R(a,n,o,i,u,"next",t)}function u(t){R(a,n,o,i,u,"throw",t)}i(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,a,i,u=[],c=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||z(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 z(t,e){if(t){if("string"==typeof t)return V(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?V(t,e):void 0}}function V(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function Z(t){var e=$((0,m.L4)(y.A.selectedFileList),2),r=e[0],o=e[1],a=$((0,m.L4)(y.A.clickFileList),2),i=a[0],u=a[1],c=$((0,m.L4)(y.A.editorSetting),2),l=(c[0],c[1]),f=$((0,m.L4)(y.A.shellNowDir),2),h=f[0],p=(f[1],$((0,m.L4)(y.A.sshInfo),2)),g=p[0],b=(p[1],$((0,m.L4)(y.A.nowFileList),2)),x=b[0],E=b[1],_=$((0,m.L4)(y.A.enterKey),2),S=_[0],k=(_[1],$((0,m.L4)(y.A.confirm),2)),N=(k[0],k[1]),O=(0,j.Zp)(),F=(0,d.Bd)().t,P=function(){var e=H(B().mark((function e(n,a){var c,f,h,p,d,y,m,b;return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(0,K.kW)(r,n))o((0,K.P1)(r,n));else if("ctrl"===S)o([].concat(U(r),[n]));else if("shift"===S){if(c=(0,K.a7)(r),f=c.max,h=c.min,p=[],n>=f)for(d=f;d<=n;d++)p.push(d);else for(y=h;y>=n;y--)p.push(y);o(p)}else o([n]);if(u([].concat(U(i),[n])),setTimeout((function(){u((0,K.P1)(i,n))}),300),t.type!==L.Iw.folder){e.next=17;break}if(void 0===i.find((function(t){return t===n}))){e.next=15;break}return(m=new A.x).key=g.key,m.dir="/".concat((0,C.GG)("remoteShell",(0,C.vX)())).concat(a),O((0,K.IO)((0,C.vX)(),a)),o([]),u([]),E({files:[],folders:[]}),e.abrupt("return");case 15:e.next=26;break;case 17:if(void 0===i.find((function(t){return t===n}))){e.next=26;break}if(b=function(){var e=H(B().mark((function e(){var r,n,o;return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=new A.x).key=g.key,r.file="/".concat((0,C.GG)("remoteShell",(0,C.vX)())).concat(a),e.next=5,s.Fg.post("get/file/text",r);case 5:n=e.sent,o=void 0,a.endsWith(L.Iw.workflow_act)?o="ace/mode/yaml":(a.endsWith(L.Iw.draw)||a.endsWith(L.Iw.excalidraw))&&(o="ace/mode/json"),l({model:o,open:!0,fileName:t.name,save:function(){var t=H(B().mark((function t(e){return B().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r.context=e,t.next=3,s.Fg.post("update/file/text",r);case 3:0===t.sent.code&&(v.xK.set_value_temp(""),(0,w.LW)("success"));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}),v.xK.set_value_temp(n.data);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),!("number"==typeof t.origin_size&&t.origin_size>D.o5)){e.next=23;break}return N({open:!0,title:F("提示"),sub_title:"文件超过20MB了确定要打开吗?",handle:function(){var t=H(B().mark((function t(){return B().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return N({open:!1,handle:null}),t.next=3,b();case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()}),e.abrupt("return");case 23:return e.next=25,b();case 25:return e.abrupt("return");case 26:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),M=function(){var e=H(B().mark((function e(n){var a,i,u,c,l,f;return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=new A.x,Object.assign(a,g),a.target=K.HS.apply(void 0,U(h).concat([n])),i=(0,T.ib)(x,r),u=i.map((function(t){return K.HS.apply(void 0,U(h).concat([t.name]))})),c=G(u),e.prev=6,c.s();case 8:if((l=c.n()).done){e.next=17;break}return f=l.value,a.source=f,e.next=13,s.Fg.post("move",a);case 13:if(e.sent){e.next=15;break}return e.abrupt("return",!1);case 15:e.next=8;break;case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(6),c.e(e.t0);case 22:return e.prev=22,c.f(),e.finish(22);case 25:return o([]),N({open:!1,handle:null}),e.next=29,t.fileHandler();case 29:case"end":return e.stop()}}),e,null,[[6,19,22,25]])})));return function(t){return e.apply(this,arguments)}}();return n.createElement(I.B,{draggable_handle:M,name:t.name,index:t.index,mtime:t.mtime,size:t.size,type:t.type,itemWidth:t.itemWidth,show_mtime:t.show_mtime,click:P})}var W=r(7856),X=r(4238),J=r(4944);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 q(){q=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var a=r&&r.prototype instanceof h?r:h,i=Object.create(a.prototype);return c(i,"_invoke",function(e,r,n){var o=1;return function(a,i){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var c=x(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new S(o||[])),!0),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};c(y,a,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(k([])));v&&v!==r&&n.call(v,a)&&(y=v);var g=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,a,i,u){var c=s(t[o],t,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==Y(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,u)}),(function(t){r("throw",t,i,u)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}),!0)}function x(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,x(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var a=s(o,e.i,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,f;var i=a.arg;return i?i.done?(r[e.r]=i.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function E(t){this.tryEntries.push(t)}function _(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function S(t){this.tryEntries=[[-1]],t.forEach(E,this),this.reset(!0)}function k(e){if(null!=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 p.prototype=d,c(g,"constructor",d),c(d,"constructor",p),c(d,u,p.displayName="GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,i,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new b(l(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},w(g),c(g,u,"Generator"),c(g,a,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=k,S.prototype={constructor:S,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){i.type="throw",i.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a[4],u=this.prev,c=a[1],l=a[2];if(-1===a[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=a[0]&&a[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var a=o?o[4]:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:k(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function Q(t,e,r,n,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function tt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){Q(a,n,o,i,u,"next",t)}function u(t){Q(a,n,o,i,u,"throw",t)}i(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,a,i,u=[],c=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return rt(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)?rt(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 rt(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 nt=n.lazy((function(){return r.e(614).then(r.bind(r,5614))}));function ot(t){var e=et((0,n.useState)(null),2),r=e[0],o=e[1],a=et((0,m.L4)(y.A.remoteShellShow),2),i=a[0],u=(a[1],et((0,n.useState)(!1),2)),c=(u[0],u[1]),l=et((0,m.L4)(y.A.sshInfo),2),s=l[0],f=(l[1],et((0,m.L4)(y.A.shellNowDir),2)),h=(f[0],f[1],et((0,m.L4)(y.A.user_base_info),2)),p=h[0],d=(h[1],"dark"===p.user_data.theme?"#FFFFFF":"#000000"),v=function(){var t=tt(q().mark((function t(){var e,r,n;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=new W.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:d,cursor:d,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},J.ws.addMsg(X.HK.remote_shell_getting,(function(t){r(t.context)})),e.onData(function(){var t=tt(q().mark((function t(e){var r,n;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new A.x).key=s.key,r.cmd=e,(n=new X.hf(X.HK.remote_shell_send)).context=r,t.next=7,J.ws.send(n);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),o(e);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),g=function(){tt(q().mark((function t(){return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r&&(r.dispose(),o(null)),J.ws.isAilive()&&J.ws.setPromise(function(){var t=tt(q().mark((function t(e){return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,J.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)})))()};(0,n.useEffect)((function(){return function(){g()}}),[]),(0,n.useEffect)((function(){i.show?r||(v(),c(!0)):g()}),[i]);return n.createElement(nt,{show:i.show,terminal:r,init:function(t,e){r.writeln("[38;2;29;153;243mopen shell...[0m ");var n=new X.hf(X.HK.remote_shell_open),o=new A.x;o.key=s.key,o.init_path=i.path,o.rows=t,o.cols=e,n.context=o,J.ws.send(n)}})}var at=r(1251),it=r(2730),ut=r(9240);function ct(t){return ct="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},ct(t)}function lt(){return lt=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},lt.apply(null,arguments)}function st(){st=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var a=r&&r.prototype instanceof h?r:h,i=Object.create(a.prototype);return c(i,"_invoke",function(e,r,n){var o=1;return function(a,i){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var c=x(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new S(o||[])),!0),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};c(y,a,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(k([])));v&&v!==r&&n.call(v,a)&&(y=v);var g=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,a,i,u){var c=s(t[o],t,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==ct(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,u)}),(function(t){r("throw",t,i,u)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}),!0)}function x(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,x(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var a=s(o,e.i,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,f;var i=a.arg;return i?i.done?(r[e.r]=i.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function E(t){this.tryEntries.push(t)}function _(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function S(t){this.tryEntries=[[-1]],t.forEach(E,this),this.reset(!0)}function k(e){if(null!=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(ct(e)+" is not iterable")}return p.prototype=d,c(g,"constructor",d),c(d,"constructor",p),c(d,u,p.displayName="GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,i,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new b(l(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},w(g),c(g,u,"Generator"),c(g,a,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=k,S.prototype={constructor:S,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){i.type="throw",i.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a[4],u=this.prev,c=a[1],l=a[2];if(-1===a[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=a[0]&&a[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var a=o?o[4]:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:k(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function ft(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=yt(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 a,i=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){u=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(u)throw a}}}}function ht(t,e,r,n,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function pt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){ht(a,n,o,i,u,"next",t)}function u(t){ht(a,n,o,i,u,"throw",t)}i(void 0)}))}}function dt(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,a,i,u=[],c=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||yt(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 yt(t,e){if(t){if("string"==typeof t)return mt(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)?mt(t,e):void 0}}function mt(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 vt,gt=function(t){return t.block="",t.gallery="gallery",t.list="list",t}({}),wt=Object.values(gt),bt=280;function xt(t){var e=(0,d.Bd)().t,r=(0,n.useRef)(void 0),o=(0,j.zy)(),u=dt((0,m.L4)(y.A.nowFileList),2),c=u[0],f=u[1],p=dt((0,m.L4)(y.A.fileShowType),2),v=p[0],g=p[1],b=dt((0,m.L4)(y.A.uploadFiles),2),x=(b[0],b[1]),E=dt((0,m.L4)(y.A.showPrompt),2),_=(E[0],E[1]),S=dt((0,m.L4)(y.A.selectedFileList),2),k=S[0],N=(S[1],dt((0,m.L4)(y.A.enterKey),2)),I=(N[0],N[1]),M=dt((0,m.L4)(y.A.copyedFileList),2),G=M[0],B=M[1],U=dt((0,m.L4)(y.A.cutedFileList),2),R=U[0],H=U[1],$=dt((0,m.L4)(y.A.selectedFileList),2),z=($[0],$[1]),V=dt((0,m.L4)(y.A.clickFileList),2),W=(V[0],V[1]),X=dt((0,m.L4)(y.A.remoteShellShow),2),J=X[0],Y=X[1],q=dt((0,m.L4)(y.A.shellNowDir),2),Q=(q[0],q[1],dt((0,m.L4)(y.A.sshInfo),2)),tt=Q[0],et=(Q[1],dt((0,n.useState)(void 0),2)),rt=et[0],nt=et[1],ct=dt((0,n.useState)(""),2),ht=ct[0],yt=ct[1],mt=(0,j.Zp)(),gt=dt((0,m.L4)(y.A.user_base_info),2),xt=gt[0],Et=(gt[1],function(){var t=pt(st().mark((function t(e){var r,n,o,a,i,u,c,l,p,d,y,m;return st().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new A.x).key=tt.key,r.dir=e||"/".concat((0,C.GG)("remoteShell",(0,C.vX)())),t.next=5,s.Fg.post("get/dir",r);case 5:if((n=t.sent).code===h.m.Sucess){t.next=9;break}return(0,w.zN)("连接失败"),t.abrupt("return");case 9:o=n.data||{},a=o.folders,i=o.files,u=ft(null!=i?i:[]);try{for(u.s();!(c=u.n()).done;)(l=c.value).origin_size=l.size,l.size=(0,D.v7)(l.size),l.show_mtime=l.mtime?(0,at.s)(l.mtime):""}catch(t){u.e(t)}finally{u.f()}p=ft(null!=a?a:[]);try{for(p.s();!(d=p.n()).done;)(y=d.value).show_mtime=y.mtime?(0,at.s)(y.mtime):""}catch(t){p.e(t)}finally{p.f()}m={folders:a||[],files:i||[]},(0,T.yC)(m,xt.user_data.dir_show_type),f(m),vt=m;case 18:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),_t=function(){var t=pt(st().mark((function t(){return st().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Et();case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),St=function(){var t=Math.floor(document.querySelector("main").offsetWidth/bt);0===t&&(t=1),nt("calc(".concat(100/t,"% - 1em)"))};(0,n.useEffect)((function(){return At(),_t(),St(),window.addEventListener("resize",St),function(){window.removeEventListener("resize",St)}}),[o]);var kt=function(){var t=pt(st().mark((function t(e){var r,n,o,a;return st().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,F.T)(r);case 8:a=t.sent,x(a),_({show:!0,type:P.PromptEnum.SshUpload,overlay:!1,data:{}});case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Nt=function(t){t.preventDefault()};function At(){z([]),W([])}function Ot(t){(0,w.LW)(t)}(0,n.useEffect)((function(){var e=r.current.ownerDocument;return e.addEventListener("dragover",Nt),e.addEventListener("drop",kt),function(){t.close(),e.removeEventListener("dragover",Nt),e.removeEventListener("drop",kt)}}),[]);var jt=dt((0,n.useState)(!1),2),Kt=jt[0],Ft=jt[1];(0,n.useEffect)((function(){var t=function(t){if(Kt)if(t.ctrlKey)if("a"===t.key||"A"===t.key){for(var e=c.files.length,r=c.folders.length,n=[],o=0;o<e+r;o++)n.push(o);z(n)}else I("ctrl");else"Escape"===t.key?z([]):"Shift"===t.key&&I("shift")},e=function(t){t.ctrlKey||I("")};return window.addEventListener("keydown",t),window.addEventListener("keyup",e),function(){window.removeEventListener("keydown",t),window.removeEventListener("keyup",e)}}),[c,Kt]);var Pt=function(t){t.target===t.currentTarget&&z([])};return n.createElement("div",{className:"not-select-div"},n.createElement(l.A,{left_children:n.createElement(a.$Z,{handleEnterPress:function(){var t,e;if(vt){z([]),W([]);var r,n=[],o=[],a=ft(null!==(t=vt.files)&&void 0!==t?t:[]);try{for(a.s();!(r=a.n()).done;){var i=r.value;i.name.includes(ht)&&n.push(i)}}catch(t){a.e(t)}finally{a.f()}var u,c=ft(null!==(e=vt.folders)&&void 0!==e?e:[]);try{for(c.s();!(u=c.n()).done;){var l=u.value;l.name.includes(ht)&&o.push(l)}}catch(t){c.e(t)}finally{c.f()}f({files:n,folders:o})}},placeholder:e("搜索当前目录"),icon:"search",value:"",handleInputChange:function(t){yt(t)},max_width:"25em"})},k.length>0&&n.createElement(i.rA,{icon:"delete",title:e("删除"),onClick:function(){_({show:!0,type:P.PromptEnum.SshDelete,overlay:!0,data:{}})}}),k.length>0&&n.createElement(i.rA,{icon:"content_copy",title:e("复制"),onClick:function(){var t=(0,T.ib)(c,k);B(t.map((function(t){return"/".concat((0,C.GG)("remoteShell",(0,C.vX)())).concat(t.name)}))),H([]),Ot("已复制")}}),k.length>0&&n.createElement(i.rA,{icon:"content_cut",title:e("剪切"),onClick:function(){var t=(0,T.ib)(c,k);H(t.map((function(t){return"/".concat((0,C.GG)("remoteShell",(0,C.vX)())).concat(t.name)}))),B([]),Ot("已剪切")}}),(G.length>0||R.length>0)&&n.createElement(i.rA,{onClick:function(){_({show:!0,type:P.PromptEnum.SshPaste,overlay:!0,data:{}})},icon:"content_paste",title:e("粘贴到此处"),tip:G.length+R.length}),1===k.length&&c.files.length>=1&&(0,T.ib)(c,k)[0].type!==L.Iw.folder&&n.createElement(i.rA,{icon:"download",title:e("下载"),onClick:function(){var t=(0,T.ib)(c,k),e="/".concat((0,C.GG)("remoteShell",(0,C.vX)())).concat(decodeURIComponent(t[0].name)),r="/api/ssh/download?file=".concat(e,"&key=").concat(tt.key,"&token=").concat(localStorage.getItem("token"));window.open(r)}}),1===k.length&&n.createElement(i.rA,{icon:"edit_attributes",title:e("重命名"),onClick:function(){_({show:!0,type:P.PromptEnum.SshReName,overlay:!0,data:{}})}}),n.createElement(i.rA,{icon:"terminal",title:"shell",onClick:function(){J.show?Y({show:!1,path:""}):Y({show:!0,path:"/".concat((0,C.GG)("remoteShell",(0,C.vX)()))})}}),n.createElement(i.rA,{icon:"grid_view",title:e("切换样式"),onClick:function(){g((0,K.jH)(wt,v))}}),n.createElement(i.rA,{icon:"create_new_folder",title:e("创建文件夹"),onClick:function(){_({show:!0,type:P.PromptEnum.SshNewDir,overlay:!0,data:{}})}}),n.createElement(i.rA,{icon:"note_add",title:e("创建文本文件"),onClick:function(){_({show:!0,type:P.PromptEnum.SshNewFile,overlay:!0,data:{}})}}),n.createElement(i.rA,{icon:"upload_file",title:"上传",onClick:function(){_({show:!0,type:P.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=[],a=new Set,i=0;i<r.length;i++){var u=r[i],c=n?u.webkitRelativePath:"".concat(u.webkitRelativePath).concat(u.name);u.fullPath=c,n&&a.add((0,it.S)(c)),o.push(u)}var l=[];if(n){var s,f=ft(a);try{for(f.s();!(s=f.n()).done;){var h=s.value;l.push({isDir:!0,fullPath:h,name:h})}}catch(t){f.e(t)}finally{f.f()}}l.push.apply(l,o),x(l),_({show:!0,type:P.PromptEnum.SshUpload,overlay:!1,data:{}})}}}})}}),n.createElement(i.rA,{icon:"close",title:e("关闭"),onClick:function(){t.close()}})),n.createElement(O.e,{baseRoute:"remoteShell",clickFun:At,input_path_enter:function(t){(0,ut.Z1)(t)?Et(t):mt((0,ut.Jn)((0,C.vX)(),t)),z([]),W([]),f({files:[],folders:[]})}}),n.createElement("div",{id:"listing",className:"mosaic file-icons ".concat(v),ref:r,onMouseEnter:function(){Ft(!0)},onMouseLeave:function(){Ft(!1)}},!!c&&!!c.folders&&c.folders.length>0&&n.createElement("h2",null,"文件夹"),!!c&&!!c.folders&&n.createElement("div",{onClick:Pt},c.folders.map((function(t,e){return n.createElement(Z,lt({fileHandler:Et,itemWidth:rt,index:e,key:e},t))}))),!!c&&!!c.folders&&c.files.length>0&&n.createElement("h2",{onClick:Pt},"文件"),!!c&&!!c.folders&&n.createElement("div",{onClick:Pt},c.files.map((function(t,e){return n.createElement(Z,lt({fileHandler:Et,itemWidth:rt,index:e+c.folders.length,key:e},t))})))),n.createElement(ot,null))}function Et(t){return Et="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},Et(t)}function _t(){_t=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var a=r&&r.prototype instanceof h?r:h,i=Object.create(a.prototype);return c(i,"_invoke",function(e,r,n){var o=1;return function(a,i){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var c=x(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new S(o||[])),!0),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};c(y,a,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(k([])));v&&v!==r&&n.call(v,a)&&(y=v);var g=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,a,i,u){var c=s(t[o],t,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==Et(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,u)}),(function(t){r("throw",t,i,u)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}),!0)}function x(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,x(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var a=s(o,e.i,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,f;var i=a.arg;return i?i.done?(r[e.r]=i.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function E(t){this.tryEntries.push(t)}function _(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function S(t){this.tryEntries=[[-1]],t.forEach(E,this),this.reset(!0)}function k(e){if(null!=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(Et(e)+" is not iterable")}return p.prototype=d,c(g,"constructor",d),c(d,"constructor",p),c(d,u,p.displayName="GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,i,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new b(l(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},w(g),c(g,u,"Generator"),c(g,a,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=k,S.prototype={constructor:S,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){i.type="throw",i.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a[4],u=this.prev,c=a[1],l=a[2];if(-1===a[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=a[0]&&a[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var a=o?o[4]:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:k(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function St(t,e,r,n,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function kt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){St(a,n,o,i,u,"next",t)}function u(t){St(a,n,o,i,u,"throw",t)}i(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,a,i,u=[],c=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return At(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)?At(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 At(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 Ot(t){var e=(0,d.Bd)().t,r=(0,j.Zp)(),o=Nt((0,n.useState)(""),2),u=o[0],f=o[1],w=Nt((0,n.useState)(""),2),b=w[0],x=w[1],E=Nt((0,n.useState)(""),2),_=E[0],S=E[1],k=Nt((0,n.useState)(""),2),N=k[0],O=k[1],K=Nt((0,n.useState)(void 0),2),F=K[0],P=K[1],L=Nt((0,n.useState)(""),2),C=L[0],I=L[1],D=Nt((0,m.L4)(y.A.shellNowDir),2),T=(D[0],D[1]),M=Nt((0,m.L4)(y.A.sshInfo),2),G=M[0],B=M[1],U=(0,v.MH)().check_user_auth,R=function(){var t=kt(_t().mark((function t(){var e;return _t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=new A.x).key=G.key,t.next=4,s.Fg.post("close",e);case 4:t.sent,B({});case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),H=function(){var t=kt(_t().mark((function t(e){var n,o;return _t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(n=new A.x).password=e?e.password:b,n.domain=e?e.domain:N,n.port=e?e.port:F,n.username=e?e.username:u,n.private_path=e?e.private_path:_,t.next=8,s.Fg.post("start",n);case 8:(o=t.sent)&&o.code===h.m.Sucess&&(n.dir=e?e.dir:C,r((0,ut.Jn)("/proxy/remoteShell",e.dir)),T([n.dir]),B(o.data));case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),$=function(){var t=kt(_t().mark((function t(){var e;return _t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.Fg.get("tag");case 2:if((e=t.sent).code!==h.m.Sucess){t.next=5;break}return t.abrupt("return",e.data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),z=function(){var t=kt(_t().mark((function t(e){return _t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.Fg.post("tag/save",e);case 2:t.sent.code!==h.m.Sucess&&new(c())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),V=function(){var t=kt(_t().mark((function t(e){return _t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return O(e.domain),I(e.dir),P(e.port),f(e.username),x(e.password),S(e.private_path),t.next=8,H(e);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(l.A,null,n.createElement(a.$Z,{placeholder:e("目录"),icon:"home",value:C,handleInputChange:function(t){return I(t)},max_width:"15rem"}),n.createElement(a.$Z,{placeholder:e("账号"),icon:"verified_user",value:u,handleInputChange:function(t){return f(t)},max_width:"15rem"}),n.createElement(a.$Z,{placeholder:e("密码"),icon:"password",value:b,handleInputChange:function(t){return x(t)},max_width:"15rem"}),n.createElement(a.$Z,{placeholder:e("私钥路径"),icon:"private_connectivity",value:_,handleInputChange:function(t){return S(t)},max_width:"15rem"}),n.createElement(a.$Z,{placeholder:e("连接地址"),icon:"location_on",value:N,handleInputChange:function(t){O(t)},max_width:"15rem"}),n.createElement(a.$Z,{placeholder:e("端口"),icon:"outlet",value:F,handleInputChange:function(t){t&&(/^\d+$/.test(t)||new(c())({type:"error",text:"不是数字",timeout:1e3,layout:"bottomLeft"}).show(),P(parseInt(t)))},max_width:"7rem"}),n.createElement(i.rA,{icon:"play_arrow",title:e("连接"),onClick:function(){H()}})),G.key?n.createElement(xt,{close:R,data:{port:F,password:b,username:u,domain:N,dir:C}}):n.createElement(p.N,{have_auth_edit:U(g.oV.ssh_proxy_tag_update),getItems:$,save:z,clickItem:V,items:[{key:"name",preName:e("名字")},{key:"domain",preName:e("地址")},{key:"port",preName:e("端口")},{key:"username",preName:e("账号")},{key:"password",preName:e("密码")},{key:"private_path",preName:e("私钥路径")},{key:"dir",preName:e("访问目录")},{key:"color",preName:"color"}]}))}function jt(t){return jt="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},jt(t)}function Kt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ft(n.key),n)}}function Ft(t){var e=function(t,e){if("object"!=jt(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=jt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==jt(e)?e:e+""}function Pt(t){switch(t){case 0:return 1;case 2:return 2;default:return 0}}var Lt=function(){return function(t,e,r){return e&&Kt(t.prototype,e),r&&Kt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.canvas=e,this.render=new Jt.Canvas.create(this.canvas),this.activeSession=!1,this.install()}),[{key:"close",value:function(){this.activeSession=!1}},{key:"install",value:function(){var t=this;return this.canvas.addEventListener("mousemove",(function(e){var r=Jt.elementOffset(t.canvas);return J.ws.sendData(X.HK.mouse,{x:e.clientX-r.left,y:e.clientY-r.top,button:0,isPressed:!1}),e.preventDefault||t.activeSession(),!1})),this.canvas.addEventListener("mousedown",(function(e){var r=Jt.elementOffset(t.canvas);return J.ws.sendData(X.HK.mouse,{x:e.clientX-r.left,y:e.clientY-r.top,button:Pt(e.button),isPressed:!0}),e.preventDefault(),!1})),this.canvas.addEventListener("mouseup",(function(e){if(t.activeSession){var r=Jt.elementOffset(t.canvas);return J.ws.sendData(X.HK.mouse,{x:e.clientX-r.left,y:e.clientY-r.top,button:Pt(e.button),isPressed:!1}),e.preventDefault(),!1}})),this.canvas.addEventListener("contextmenu",(function(e){if(t.activeSession){var r=Jt.elementOffset(t.canvas);return J.ws.sendData(X.HK.mouse,{x:e.clientX-r.left,y:e.clientY-r.top,button:Pt(e.button),isPressed:!1}),e.preventDefault(),!1}})),this.canvas.addEventListener("DOMMouseScroll",(function(e){if(t.activeSession){var r=e.detail,n=Math.round(15*Math.abs(r)/8),o=Jt.elementOffset(t.canvas);return J.ws.sendData(X.HK.wheel,{x:e.clientX-o.left,y:e.clientY-o.top,step:n,isNegative:r>0,isHorizontal:!1}),e.preventDefault(),!1}})),this.canvas.addEventListener("mousewheel",(function(e){if(t.activeSession){var r=Math.abs(e.deltaX)>Math.abs(e.deltaY),n=r?e.deltaX:e.deltaY,o=Math.round(15*Math.abs(n)/8),a=Jt.elementOffset(t.canvas);return J.ws.sendData(X.HK.wheel,{x:e.clientX-a.left,y:e.clientY-a.top,step:o,isNegative:n>0,isHorizontal:r}),e.preventDefault(),!1}})),window.addEventListener("keydown",(function(e){if(t.activeSession)return J.ws.sendData(X.HK.scancode,{code:Jt.scancode(e),isPressed:!0}),e.preventDefault(),!1})),window.addEventListener("keyup",(function(e){if(t.activeSession)return J.ws.sendData(X.HK.scancode,{code:Jt.scancode(e),isPressed:!1}),e.preventDefault(),!1})),this}},{key:"connect",value:function(t,e,r,n,o){var a=this;J.ws.addMsg(X.HK.rdp_connect,(function(t){console.log("[mstsc.js] connected"),a.activeSession=!0})),J.ws.addMsg(X.HK.rdp_bitmap,(function(t){var e=t.context;e.data=t.bin_context,a.render.update(e)})),J.ws.addMsg(X.HK.rdp_close,(function(t){o(null),console.log("[mstsc.js] close"),a.activeSession=!1})),J.ws.addMsg(X.HK.rdp_error,(function(t){a.activeSession=!1}));var i=new X.hf;i.cmdType=X.HK.infos,i.context={ip:t.indexOf(":")>-1?t.split(":")[0]:t,port:t.indexOf(":")>-1?parseInt(t.split(":")[1]):3389,screen:{width:this.canvas.width,height:this.canvas.height},domain:e,username:r,password:n,locale:Jt.locale()},J.ws.send(i)}}])}();function Ct(t){return Ct="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},Ct(t)}function It(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Dt(n.key),n)}}function Dt(t){var e=function(t,e){if("object"!=Ct(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Ct(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Ct(e)?e:e+""}var Tt,Mt,Gt,Bt,Ut=function(){return function(t,e,r){return e&&It(t.prototype,e),r&&It(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.canvas=e,this.ctx=e.getContext("2d")}),[{key:"update",value:function(t){var e=null;e=t.isCompress?function(t){var e=null;switch(t.bitsPerPixel){case 15:e="bitmap_decompress_15";break;case 16:e="bitmap_decompress_16";break;case 24:e="bitmap_decompress_24";break;case 32:e="bitmap_decompress_32";break;default:throw"invalid bitmap data format"}var r=new Uint8Array(t.data),n=Module._malloc(r.length),o=new Uint8Array(Module.HEAPU8.buffer,n,r.length);o.set(r);var a=t.destRight-t.destLeft+1,i=t.destBottom-t.destTop+1,u=a*i*4,c=Module._malloc(u),l=new Uint8Array(Module.HEAPU8.buffer,c,u),s=(Module.ccall(e,"number",["number","number","number","number","number","number","number","number"],[l.byteOffset,a,i,t.width,t.height,o.byteOffset,r.length]),new Uint8ClampedArray(l.buffer,l.byteOffset,u));return Module._free(n),Module._free(c),{width:a,height:i,data:s}}(t):function(t){return{width:t.width,height:t.height,data:new Uint8ClampedArray(t.data)}}(t);var r=this.ctx.createImageData(e.width,e.height);r.data.set(e.data),this.ctx.putImageData(r,t.destLeft,t.destTop)}}])}();function Rt(t){return Rt="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},Rt(t)}function Ht(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=Rt(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Rt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Rt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var $t=(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Tt={"":0,Escape:1,Digit1:2,Digit2:3,Digit3:4,Digit4:5,Digit5:6,Digit6:7,Digit7:8,Digit8:9,Digit9:10,Digit0:11,Minus:12,Equal:13,Backspace:14,Tab:15,KeyQ:16,KeyW:17,KeyE:18,KeyR:19,KeyT:20,KeyY:21,KeyU:22,KeyI:23,KeyO:24,KeyP:25,BracketLeft:26,BracketRight:27,Enter:28,ControlLeft:29,KeyA:30,KeyS:31,KeyD:32,KeyF:33,KeyG:34,KeyH:35,KeyJ:36,KeyK:37,KeyL:38,Semicolon:39,Quote:40,Backquote:41,ShiftLeft:42,Backslash:43,KeyZ:44,KeyX:45,KeyC:46,KeyV:47,KeyB:48,KeyN:49,KeyM:50,Comma:51,Period:52,Slash:53,ShiftRight:54,NumpadMultiply:55,AltLeft:56,Space:57,CapsLock:58,F1:59,F2:60,F3:61,F4:62,F5:63,F6:64,F7:65,F8:66,F9:67,F10:68,Pause:69,ScrollLock:70,Numpad7:71,Numpad8:72,Numpad9:73,NumpadSubtract:74,Numpad4:75,Numpad5:76,Numpad6:77,NumpadAdd:78,Numpad1:79,Numpad2:80,Numpad3:81,Numpad0:82,NumpadDecimal:83,PrintScreen:84,IntlBackslash:86,F11:87,F12:88,NumpadEqual:89,F13:100,F14:101,F15:102,F16:103,F17:104,F18:105,F19:106,F20:107,F21:108,F22:109,F23:110,KanaMode:112,Lang2:113,Lang1:114,IntlRo:115,F24:118,Convert:121,NonConvert:123,IntlYen:125,NumpadComma:126,MediaTrackPrevious:57360,MediaTrackNext:57369,NumpadEnter:57372,ControlRight:57373,VolumeMute:57376,LaunchApp2:57377,MediaPlayPause:57378,MediaStop:57380,VolumeDown:57390,VolumeUp:57392,BrowserHome:57394,NumpadDivide:57397},"PrintScreen",57399),"AltRight",57400),"NumLock",57413),"Pause",57414),"Home",57415),"ArrowUp",57416),"PageUp",57417),"ArrowLeft",57419),"ArrowRight",57421),"End",57423),Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Tt,"ArrowDown",57424),"PageDown",57425),"Insert",57426),"Delete",57427),"OSLeft",57435),"OSRight",57436),"ContextMenu",57437),"Power",57438),"BrowserSearch",57445),"BrowserFavorites",57446),Ht(Ht(Ht(Ht(Ht(Ht(Ht(Tt,"BrowserRefresh",57447),"BrowserStop",57448),"BrowserForward",57449),"BrowserBack",57450),"LaunchApp1",57451),"LaunchMail",57452),"MediaSelect",57453)),zt=(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Mt={27:"Escape",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",0:"Backquote",49:"Digit1",50:"Digit2",51:"Digit3",52:"Digit4",53:"Digit5",54:"Digit6",55:"Digit7",56:"Digit8",57:"Digit9",48:"Digit0",169:"Minus",61:"Equal",8:"Backspace",9:"Tab",65:"KeyQ",90:"KeyW",69:"KeyE",82:"KeyR",84:"KeyT",89:"KeyY",85:"KeyU",73:"KeyI",79:"KeyO",80:"KeyP",160:"BracketLeft",164:"BracketRight",13:"Enter",20:"CapsLock"},"20","CapsLock"),81,"KeyA"),83,"KeyS"),68,"KeyD"),70,"KeyF"),71,"KeyG"),72,"KeyH"),74,"KeyJ"),75,"KeyK"),76,"KeyL"),Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Mt,77,"Semicolon"),165,"Quote"),170,"Backslash"),16,"ShiftLeft"),60,"IntlBackslash"),87,"KeyZ"),88,"KeyX"),67,"KeyC"),86,"KeyV"),66,"KeyB"),Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Mt,78,"KeyN"),188,"KeyM"),59,"Comma"),58,"Period"),161,"Slash"),"16","ShiftRight"),17,"ControlLeft"),91,"OSLeft"),18,"AltLeft"),32,"Space"),Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Mt,"17","ControlLeft"),"18","AltRight"),"91","OSRight"),93,"ContextMenu"),"17","ControlRight"),37,"ArrowLeft"),38,"ArrowUp"),40,"ArrowDown"),39,"ArrowRight"),144,"NumLock"),Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Mt,"144","NumLock"),111,"NumpadDivide"),106,"NumpadMultiply"),109,"NumpadSubtract"),103,"Numpad7"),104,"Numpad8"),105,"Numpad9"),107,"NumpadAdd"),100,"Numpad4"),101,"Numpad5"),Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Mt,102,"Numpad6"),97,"Numpad1"),98,"Numpad2"),99,"Numpad3"),96,"Numpad0"),110,"NumpadDecimal"),"13","NumpadEnter"),"17","ControlLeft"),"67","KeyC"),"17","ControlLeft")),Vt=(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Gt={27:"Escape",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",0:"Backquote",49:"Digit1",50:"Digit2",51:"Digit3",52:"Digit4",53:"Digit5",54:"Digit6",55:"Digit7",56:"Digit8",57:"Digit9",48:"Digit0",219:"Minus",187:"Equal",8:"Backspace",9:"Tab",65:"KeyQ",90:"KeyW",69:"KeyE",82:"KeyR",84:"KeyT",89:"KeyY",85:"KeyU",73:"KeyI",79:"KeyO",80:"KeyP",221:"BracketLeft",186:"BracketRight",13:"Enter",20:"CapsLock"},"20","CapsLock"),81,"KeyA"),83,"KeyS"),68,"KeyD"),70,"KeyF"),71,"KeyG"),72,"KeyH"),74,"KeyJ"),75,"KeyK"),76,"KeyL"),Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Gt,77,"Semicolon"),192,"Quote"),220,"Backslash"),16,"ShiftLeft"),60,"IntlBackslash"),87,"KeyZ"),88,"KeyX"),67,"KeyC"),86,"KeyV"),66,"KeyB"),Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Gt,78,"KeyN"),188,"KeyM"),190,"Comma"),191,"Period"),223,"Slash"),"16","ShiftRight"),17,"ControlLeft"),91,"OSLeft"),18,"AltLeft"),32,"Space"),Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Gt,"17","ControlLeft"),"18","AltRight"),"91","OSRight"),93,"ContextMenu"),"17","ControlRight"),37,"ArrowLeft"),38,"ArrowUp"),40,"ArrowDown"),39,"ArrowRight"),144,"NumLock"),Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Gt,"144","NumLock"),111,"NumpadDivide"),106,"NumpadMultiply"),109,"NumpadSubtract"),103,"Numpad7"),104,"Numpad8"),105,"Numpad9"),107,"NumpadAdd"),100,"Numpad4"),101,"Numpad5"),Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Gt,102,"Numpad6"),97,"Numpad1"),98,"Numpad2"),99,"Numpad3"),96,"Numpad0"),110,"NumpadDecimal"),"13","NumpadEnter"),"17","ControlLeft"),"67","KeyC"),"17","ControlLeft")),Zt=(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Bt={27:"Escape",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",192:"Backquote",49:"Digit1",50:"Digit2",51:"Digit3",52:"Digit4",53:"Digit5",54:"Digit6",55:"Digit7",56:"Digit8",57:"Digit9",48:"Digit0",173:"Minus",61:"Equal",8:"Backspace",9:"Tab",81:"KeyQ",87:"KeyW",69:"KeyE",82:"KeyR",84:"KeyT",89:"KeyY",85:"KeyU",73:"KeyI",79:"KeyO",80:"KeyP",219:"BracketLeft",221:"BracketRight",13:"Enter",20:"CapsLock",65:"KeyA",83:"KeyS",68:"KeyD",70:"KeyF",71:"KeyG",72:"KeyH",74:"KeyJ",75:"KeyK",76:"KeyL",59:"Semicolon",222:"Quote",220:"Backslash",16:"ShiftLeft"},"220","IntlBackslash"),90,"KeyZ"),88,"KeyX"),67,"KeyC"),86,"KeyV"),66,"KeyB"),78,"KeyN"),77,"KeyM"),188,"Comma"),190,"Period"),Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Bt,191,"Slash"),"16","ShiftRight"),17,"ControlLeft"),18,"AltLeft"),91,"OSLeft"),32,"Space"),"18","AltRight"),"91","OSRight"),93,"ContextMenu"),"17","ControlRight"),Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Bt,37,"ArrowLeft"),38,"ArrowUp"),40,"ArrowDown"),39,"ArrowRight"),144,"NumLock"),"144","NumLock"),111,"NumpadDivide"),106,"NumpadMultiply"),109,"NumpadSubtract"),103,"Numpad7"),Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Ht(Bt,104,"Numpad8"),105,"Numpad9"),107,"NumpadAdd"),100,"Numpad4"),101,"Numpad5"),102,"Numpad6"),97,"Numpad1"),98,"Numpad2"),99,"Numpad3"),"13","NumpadEnter"),Ht(Ht(Ht(Bt,96,"Numpad0"),110,"NumpadDecimal"),"17","ControlLeft")),Wt={firefox:{fr:zt,en:Zt},chrome:{fr:Vt,en:Zt}};(Jt=function(){}).prototype={$:function(t){return document.getElementById(t)},elementOffset:function(t){for(var e=0,r=0;t&&!isNaN(t.offsetLeft)&&!isNaN(t.offsetTop);)e+=t.offsetLeft-t.scrollLeft,r+=t.offsetTop-t.scrollTop,t=t.offsetParent;return{top:r,left:e}},browser:function(){return"undefined"!=typeof InstallTrigger?"firefox":window.chrome?"chrome":document.docuemntMode?"ie":null},locale:function(){return window.navigator.userLanguage||window.navigator.language},client:{create:function(t){return new Lt(t)}},Canvas:{create:function(t){return new Ut(t)}},scancode:function(t){var e=Jt.locale();return e=["fr","en"].indexOf(e)>0&&e||"en",$t[t.code||Wt[Jt.browser()||"firefox"][e][t.keyCode]]}};var Xt,Jt=new Jt;function Yt(t){return Yt="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},Yt(t)}function qt(){qt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var a=r&&r.prototype instanceof h?r:h,i=Object.create(a.prototype);return c(i,"_invoke",function(e,r,n){var o=1;return function(a,i){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var c=x(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new S(o||[])),!0),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};c(y,a,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(k([])));v&&v!==r&&n.call(v,a)&&(y=v);var g=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,a,i,u){var c=s(t[o],t,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==Yt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,u)}),(function(t){r("throw",t,i,u)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}),!0)}function x(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,x(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var a=s(o,e.i,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,f;var i=a.arg;return i?i.done?(r[e.r]=i.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function E(t){this.tryEntries.push(t)}function _(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function S(t){this.tryEntries=[[-1]],t.forEach(E,this),this.reset(!0)}function k(e){if(null!=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(Yt(e)+" is not iterable")}return p.prototype=d,c(g,"constructor",d),c(d,"constructor",p),c(d,u,p.displayName="GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,i,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new b(l(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},w(g),c(g,u,"Generator"),c(g,a,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=k,S.prototype={constructor:S,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){i.type="throw",i.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a[4],u=this.prev,c=a[1],l=a[2];if(-1===a[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=a[0]&&a[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var a=o?o[4]:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:k(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function Qt(t,e,r,n,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function te(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){Qt(a,n,o,i,u,"next",t)}function u(t){Qt(a,n,o,i,u,"throw",t)}i(void 0)}))}}function ee(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,a,i,u=[],c=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return re(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)?re(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 re(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 ne(){var t=(0,d.Bd)().t,e=ee((0,m.L4)(y.A.header_min),2),r=(e[0],e[1]),u=(0,v.MH)().check_user_auth,c=ee((0,n.useState)(void 0),2),f=c[0],b=c[1],x=ee((0,n.useState)(void 0),2),E=x[0],_=x[1],S=ee((0,n.useState)(void 0),2),k=S[0],N=S[1],A=ee((0,n.useState)(!1),2),O=A[0],j=A[1],K=ee((0,n.useState)(!1),2),P=K[0],L=K[1],C=function(){var t=te(qt().mark((function t(){return qt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,(0,F.J)("rle.js");case 3:Xt=!0,t.next=10;break;case 6:return t.prev=6,t.t0=t.catch(0),(0,w.zN)("加载资源失败"),t.abrupt("return");case 10:case"end":return t.stop()}}),t,null,[[0,6]])})));return function(){return t.apply(this,arguments)}}(),I=null;(0,n.useEffect)((function(){return Xt||C(),function(){I&&(I.close(),I=null)}}),[]);var D=function(e){L(!0),function(n,o,a){if(n=n||e.address,o=o||e.username,a=a||e.password,!n||!o||!a)return(0,w.zN)(t("不允许为空")),void L(!1);!function(t){I||(I=Jt.client.create(Jt.$(t)))}("rdpwebview");var i=Jt.$("rdpwebview");i.style.display="inline",i.width=window.innerWidth,i.height=window.innerHeight,j(!0),r(!0),I.connect(n,"",o,a,(function(t){Jt.$("rdpwebview").style.display="none",r(!1),L(!1),j(!1)}))}(f,E,k)},T=function(){var t=te(qt().mark((function t(){var e;return qt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return j(!1),t.next=3,J.ws.sendData(X.HK.rdp_disconnect,"");case 3:e=Jt.$("rdpwebview"),e.getContext("2d").clearRect(0,0,e.width,e.height),Jt.$("rdpwebview").style.display="none",L(!1),r(!1);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),M=function(){var t=te(qt().mark((function t(){var e;return qt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.J0.get("tag");case 2:if((e=t.sent).code!==h.m.Sucess){t.next=5;break}return t.abrupt("return",e.data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),G=function(){var t=te(qt().mark((function t(e){return qt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.J0.post("tag/save",e);case 2:t.sent.code!==h.m.Sucess&&(0,w.zN)("网络错误");case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),B=function(){var t=te(qt().mark((function t(e){return qt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:N(e.password),_(e.username),b(e.address),D(e);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(l.A,null,n.createElement(a.$Z,{placeholder:t("地址"),icon:"outlet",value:f,handleInputChange:function(t){return b(t)}}),n.createElement(a.$Z,{placeholder:t("账号"),icon:"http",value:E,handleInputChange:function(t){return _(t)}}),n.createElement(a.$Z,{placeholder:t("密码"),icon:"http",value:k,handleInputChange:function(t){return N(t)}}),!P&&n.createElement(i.rA,{icon:"play_arrow",title:t("连接"),onClick:D}),P&&n.createElement(i.rA,{icon:"close",title:t("关闭"),onClick:T})),n.createElement(o.jW,{isFull:O},!P&&n.createElement(p.N,{have_auth_edit:u(g.oV.rdp_proxy_tag_update),getItems:M,save:G,clickItem:B,items:[{key:"name",preName:t("名字")},{key:"address",preName:t("地址")},{key:"username",preName:t("账号")},{key:"password",preName:t("密码")},{key:"color",preName:"color"}]}),n.createElement("canvas",{id:"rdpwebview",style:{display:"none"}})))}var oe=r(7481),ae=r(447),ie=r(505),ue=r(1499),ce=r(1083);function le(t){return le="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},le(t)}function se(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=me(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 a,i=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){u=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(u)throw a}}}}function fe(t){return function(t){if(Array.isArray(t))return ve(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||me(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 he(){he=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var a=r&&r.prototype instanceof h?r:h,i=Object.create(a.prototype);return c(i,"_invoke",function(e,r,n){var o=1;return function(a,i){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var c=x(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new S(o||[])),!0),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};c(y,a,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(k([])));v&&v!==r&&n.call(v,a)&&(y=v);var g=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,a,i,u){var c=s(t[o],t,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==le(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,u)}),(function(t){r("throw",t,i,u)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}),!0)}function x(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,x(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var a=s(o,e.i,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,f;var i=a.arg;return i?i.done?(r[e.r]=i.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function E(t){this.tryEntries.push(t)}function _(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function S(t){this.tryEntries=[[-1]],t.forEach(E,this),this.reset(!0)}function k(e){if(null!=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(le(e)+" is not iterable")}return p.prototype=d,c(g,"constructor",d),c(d,"constructor",p),c(d,u,p.displayName="GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,i,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new b(l(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},w(g),c(g,u,"Generator"),c(g,a,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=k,S.prototype={constructor:S,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){i.type="throw",i.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a[4],u=this.prev,c=a[1],l=a[2];if(-1===a[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=a[0]&&a[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var a=o?o[4]:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:k(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function pe(t,e,r,n,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function de(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){pe(a,n,o,i,u,"next",t)}function u(t){pe(a,n,o,i,u,"throw",t)}i(void 0)}))}}function ye(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,a,i,u=[],c=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||me(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 me(t,e){if(t){if("string"==typeof t)return ve(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)?ve(t,e):void 0}}function ve(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 ge,we,be,xe,Ee=n.lazy((function(){return Promise.all([r.e(960),r.e(91)]).then(r.bind(r,4091))}));function _e(){var t=(0,d.Bd)(),e=t.t,r=(t.i18n,ye((0,m.L4)(y.A.confirm),2)),u=(r[0],r[1],ye((0,m.L4)(y.A.showPrompt),2)),c=(u[0],u[1]),b=(0,v.MH)().check_user_auth,x=ye((0,n.useState)(""),2),E=x[0],_=x[1],S=ye((0,m.L4)(y.A.router_jump),2),k=S[0],N=S[1],A=ye((0,n.useState)("get"),2),O=A[0],j=A[1],K=ye((0,n.useState)(""),2),F=K[0],L=K[1],C=ye((0,n.useState)(void 0),2),I=C[0],T=C[1],M=ye((0,n.useState)([]),2),G=M[0],B=M[1],U=ye((0,n.useState)([]),2),R=U[0],H=U[1],$=ye((0,n.useState)(1),2),z=$[0],V=$[1],Z=ye((0,n.useState)(1),2),W=Z[0],Y=Z[1],q=ye((0,n.useState)(1),2),Q=q[0],tt=q[1],et=ye((0,n.useState)(),2),rt=et[0],nt=et[1],ot=ye((0,m.L4)(y.A.nav_index_add_item_by_now_list),2),at=(ot[0],ot[1]),it=ye((0,m.L4)(y.A.prompt_card),2),ut=(it[0],it[1]);v.xK.set_value_temp("{}",0),v.xK.set_value_temp("",1),(0,n.useEffect)((function(){return ge={},we="",be="",xe="",v.xK.get_editor(0).session.setMode("ace/mode/json"),k.http_download_map_path&&(T(k.http_download_map_path),N({})),J.ws.sendData(X.HK.http_download_water,void 0).then((function(){J.ws.addMsg(X.HK.http_download_water,(function(t){var e=t.context;H(e)}))})),function(){J.ws.unConnect()}}),[]);var ct=function(){var t=de(he().mark((function t(){var e;return he().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s._U.get("http/tag");case 2:if((e=t.sent).code!==h.m.Sucess){t.next=5;break}return t.abrupt("return",e.data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),lt=function(){var t=de(he().mark((function t(e){return he().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s._U.post("http/tag/save",e);case 2:t.sent.code!==h.m.Sucess&&new Noty({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),st=function(){var t=de(he().mark((function t(e){return he().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:L(e.url),j(e.method),T(e.local_download_path),e.header_type&&ft(e.header_type),e.headers&&(ge=JSON.parse(e.headers),1===e.header_type&&(v.xK.get_editor(0).setValue(e.headers,-1),v.xK.get_editor(0).session.setMode("ace/mode/json"))),e.form_data_list&&B(JSON.parse(e.form_data_list)),e.data&&(we=e.data),e.body_type&&(Y(e.body_type),v.xK.get_editor(1).setValue(e.data,-1),1===e.body_type?v.xK.get_editor(1).session.setMode("ace/mode/text"):2===e.body_type&&v.xK.get_editor(1).session.setMode("ace/mode/json"));case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ft=function(t){V(t)},ht=function(t){Y(t),1===t?v.xK.get_editor(1).session.setMode("ace/mode/text"):2===t&&v.xK.get_editor(1).session.setMode("ace/mode/json")},pt=function(t){var e=new f.vr;if(e.url=F,e.method=O,1===z&&(ge=JSON.parse(v.xK.get_editor_value(0))),e.headers=ge,e.body_type=W,e.header_type=z,W===f.RB.row)we=v.xK.get_editor_value(1),e.data=we;else if(W===f.RB.json)ge["Content-Type"]="application/json",we=v.xK.get_editor_value(1),e.data=we;else if(W===f.RB.form){ge["Content-Type"]="multipart/form-data",e.form_data_list=G;var r,n=se(G);try{for(n.s();!(r=n.n()).done;){var o=r.value;o.key&&o.is_file&&t&&t.append(o.fullPath,o.file_object)}}catch(t){n.e(t)}finally{n.f()}}return e},dt=function(){var t=de(he().mark((function t(){var e,r;return he().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s._U.have_http_method(O)){t.next=3;break}return(0,w.zN)("不存在的http method"),t.abrupt("return");case 3:if(F){t.next=6;break}return(0,w.zN)("url is empty"),t.abrupt("return");case 6:nt(void 0),_(""),(e=new FormData).append("data",JSON.stringify(pt(e))),r="http/send",I&&(r+="?local_download_path=".concat(I)),ce.A.post(s._U.getUrl(r),e,{headers:{"Content-Type":"multipart/form-data",Authorization:localStorage.getItem("token")}}).catch((function(t){(0,w.zN)(t.message)})).then((function(t){if(t){if(t.headers.filecat_remote_code)try{var e=JSON.parse(t.headers.filecat_remote_code);nt(200===e?n.createElement("span",{style:{color:"green"}},"200"):e)}catch(t){console.log(t)}be="object"===le(t.data)?JSON.stringify(t.data):t.data;try{t.headers.filecat_remote_raw_headers&&(xe=JSON.stringify(JSON.parse(t.headers.filecat_remote_raw_headers),null,2))}catch(e){xe=JSON.stringify(t.headers.filecat_remote_raw_headers)}1===Q?_(be):2===Q&&_(xe)}}));case 13:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),yt=function(){var t=de(he().mark((function t(){var e,r,n,o;return he().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e=pt()).local_download_path=I,G){r=se(G);try{for(r.s();!(n=r.n()).done;)(o=n.value).is_file&&(o.file_object=void 0)}catch(t){r.e(t)}finally{r.f()}}return e.form_data_list=JSON.stringify(G),e.headers=JSON.stringify(e.headers),"object"===le(e.data)&&(e.data=JSON.stringify(e.data)),t.abrupt("return",e);case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(o.xh,null,n.createElement(l.A,null),n.createElement(o.fI,null,n.createElement(o.VP,null,0!==R.length&&n.createElement(ae.Zp,{title:"正在下载"},n.createElement("div",null,R.map((function(t,r){var o,a;return n.createElement("div",{key:r},n.createElement("div",{className:"div-row"},n.createElement(i.rA,{icon:"cancel",title:e("取消"),onClick:function(){J.ws.sendData(X.HK.http_download_cancel,t.local_download_path)}}),n.createElement(ae.xP,{context:t.filename,tip_context:t.local_download_path}),n.createElement("span",{style:{paddingLeft:".3rem",color:"green"}},"".concat(null!==(o=t.progresses)&&void 0!==o?o:0,"% ").concat(t.loaded?(0,D.v7)(t.loaded):"","MB / ").concat(null!==(a=t.seep)&&void 0!==a?a:"","MB/s "))),n.createElement("div",{style:{width:t.progresses?"".concat(t.progresses,"%"):"0",backgroundColor:"#40c4ff",height:"5px",transition:"0.2s ease width",borderRadius:"10px"}}))})))),n.createElement(ae.Zp,{title:"",rightBottomCom:3===W&&2===z&&n.createElement(i.rA,{icon:"add",title:e("添加"),onClick:function(){B([{}].concat(fe(G)))}})},n.createElement("div",{className:"http_url"},n.createElement(a.$Z,{not_mobile:!0,max_width:"15%",placeholder:e("协议"),icon:"http",value:O,handleInputChange:function(t){j(t)}}),n.createElement(a.$Z,{not_mobile:!0,max_width:"80%",placeholder:e("http url"),icon:"link",value:F,handleInputChange:function(t){L(t)}}),n.createElement(i.rA,{icon:"send",title:e("发送"),onClick:dt}),b(g.oV.http_proxy_tag_update)&&n.createElement(i.rA,{title:e("添加"),icon:"save_as",onClick:function(){if(b(g.oV.http_proxy_tag_update)){var t,r,o=se(G);try{for(o.s();!(t=o.n()).done;){if(t.value.is_file)return void(0,w.zN)(e("表单中含有文件,浏览器限制不能添加"))}}catch(t){o.e(t)}finally{o.f()}ut({open:!0,title:e("信息"),context_div:n.createElement("div",null,n.createElement("div",{className:"card-content"},n.createElement(a.Sm,{placeholderOut:e("输入标签名"),handleInputChange:function(t){return r=t}})),n.createElement("div",{className:"card-action"},n.createElement("button",{className:"button button--flat",onClick:de(he().mark((function t(){var e;return he().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,yt();case 2:(e=t.sent).name=r,at(e),ut({open:!1});case 6:case"end":return t.stop()}}),t)})))},e("确定"))))})}else(0,w.zN)("no permission")}})),n.createElement(oe.S,{isFlex:!0,columns:[n.createElement(a.U6,{value:1,name:"h_or_body",context:e("请求头"),selected:1===z,onchange:function(){ft(1)}}),n.createElement(a.U6,{value:2,name:"h_or_body",context:e("请求体"),selected:2===z,onchange:function(){ft(2)}})]}),2===z&&n.createElement(oe.S,{isFlex:!0,columns:[n.createElement(a.U6,{value:1,name:"body",context:e("row"),selected:1===W,onchange:function(){ht(1)}}),n.createElement(a.U6,{value:2,name:"body",context:e("json"),selected:2===W,onchange:function(){ht(2)}}),n.createElement(a.U6,{value:3,name:"body",context:e("form"),selected:3===W,onchange:function(){ht(3)}})]}),n.createElement("div",{className:"http_ace",style:{display:1===z?"":"none"}},n.createElement(Ee,{name:"",editor_id:0})),n.createElement("div",{className:"http_ace",style:{display:2===z&&3!==W?"":"none"}},n.createElement(Ee,{name:"",editor_id:1})),n.createElement("div",{style:{display:3!==W||2!==z?"none":""}},n.createElement(oe.X,{headers:["key",e("值")],rows:G.map((function(t,r){var o=[n.createElement(a.Sm,{value:t.key,handleInputChange:function(e){t.key=e,B(fe(G))},no_border:!0}),n.createElement(a.Sm,{value:t.value,handleInputChange:function(e){t.value=e,t.is_file=!1,B(fe(G))},no_border:!0}),n.createElement("div",null,n.createElement(i.rA,{icon:"file_upload",title:e("上传文件"),onClick:function(){return function(t){c({show:!0,type:P.PromptEnum.UploadFile,overlay:!0,data:{extra_data:{only_file:!0},call:function(e){var r,n=null===(r=e.currentTarget)||void 0===r?void 0:r.files;if(n){var o=n[0];o.fullPath=(0,ue.hU)()+Date.now().toString(),G[t].value="".concat(o,"(").concat(o.name,")"),G[t].is_file=!0,G[t].fileName=o.name,G[t].fullPath=o.fullPath,B(fe(G)),G[t].file_object=o,c({overlay:!1,type:"",show:!1,data:{}})}}}})}(r)}}),n.createElement(i.rA,{icon:"delete",title:e("删除"),onClick:function(){return function(t){G.splice(t,1),B(fe(G))}(r)}}))];return o})),width:"10rem"})),n.createElement("div",{style:{paddingTop:"1rem"}},void 0===I?n.createElement("span",{onClick:function(){T("")}},e("下载到本地目录")):n.createElement(a.Sm,{placeholder:e("本地地址"),value:I,handleInputChange:function(t){T(t)},handlerEnter:function(){I||T(void 0)}}))),n.createElement(ae.Zp,{title:rt,titleCom:n.createElement("div",{className:" div-row "},n.createElement(a.U6,{value:1,name:"respone",context:e("响应体"),selected:1===Q,onchange:function(){tt(1),_(be)}}),n.createElement(a.U6,{value:1,name:"respone",context:e("响应头"),selected:2===Q,onchange:function(){tt(2),_(xe)}}),n.createElement(i.rA,{title:"复制",icon:"copy_all",onClick:function(){E&&((0,ie.l)(E),(0,w.LW)("完成"))}}))},n.createElement("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},onChange:function(t){_(t.target.value)},value:E}))),n.createElement(o.VP,null,n.createElement(p.N,{getItems:ct,save:lt,have_auth_edit:b(g.oV.http_proxy_tag_update),clickItem:st,items:[{key:"name",preName:e("名字")},{key:"url",preName:"url"},{key:"method",preName:"method"},{key:"headers",preName:"headers"},{key:"data",preName:"data"},{key:"form_data_list",preName:"form_data_list"},{key:"local_download_path",preName:"local_download_path"},{key:"color",preName:"color"}]})))))}var Se=n.lazy((function(){return Promise.all([r.e(859),r.e(257),r.e(759)]).then(r.bind(r,5601))}));function ke(t){var e=(0,d.Bd)().t,r=(0,v.MH)().check_user_auth,a=[];return r(g.oV.http_proxy)&&a.push({index:1,name:e("http代理"),rto:"http/"}),r(g.oV.ssh_proxy)&&a.push({index:1,name:"ssh".concat(e("代理")),rto:"remoteShell/*"}),r(g.oV.browser_proxy)&&a.push({index:1,name:"".concat(e("浏览器")).concat(e("代理")),rto:"browserproxy/"}),r(g.oV.rdp_proxy)&&a.push({index:1,name:"rdp".concat(e("代理")),rto:"rdp/"}),r(g.oV.rtsp_proxy)&&a.push({index:1,name:e("rtsp播放器"),rto:"rtsp/"}),n.createElement(o.W1,{optionList:a},r(g.oV.http_proxy)&&n.createElement(_e,null),r(g.oV.ssh_proxy)&&n.createElement(Ot,null),r(g.oV.browser_proxy)&&n.createElement(N,null),r(g.oV.rdp_proxy)&&n.createElement(ne,null),r(g.oV.rtsp_proxy)&&n.createElement(n.Suspense,{fallback:n.createElement("div",null)},n.createElement(Se,null)),n.createElement(Crypto,null))}},7481:(t,e,r)=>{r.d(e,{S:()=>u,X:()=>i});var n=r(6540);function o(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,a,i,u=[],c=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return a(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)?a(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 a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function i(t){var e,r=o(n.useState([]),2),a=r[0],i=r[1];return(0,n.useEffect)((function(){t.children?i(Array.isArray(t.children)?t.children:[t.children]):i(t.rows)}),[t.rows,t.children]),n.createElement("table",null,n.createElement("thead",null,n.createElement("tr",null,null===(e=t.headers)||void 0===e?void 0:e.map((function(t,e){return n.createElement("th",{key:e},t)})))),n.createElement("tbody",null,a.map((function(e,r){return n.createElement("tr",{key:r,onContextMenu:function(){t.handleContextMenu&&t.handleContextMenu(e)}},e.map((function(e,r){var o;return n.createElement("td",{style:{width:null!==(o=t.width)&&void 0!==o?o:"auto"},key:r,className:r===a.length-1?"small":""},e)})))}))))}function u(t){return n.createElement("div",{style:{display:t.isFlex?"flex":"block"}},t.columns.map((function(t,e){return n.createElement("div",{key:e},t)})))}},8694:(t,e,r)=>{function n(t){return n="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},n(t)}function o(t,e,r){return(e=u(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function i(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,{$K:()=>f,RB:()=>p,qB:()=>l,vo:()=>h,vr:()=>d});var l=i((function t(){c(this,t)})),s=function(t){return t[t.tcp=0]="tcp",t[t.udp=1]="udp",t}({}),f=i((function t(){c(this,t),o(this,"open",!1),o(this,"key",""),o(this,"async_ips",[])})),h=i((function t(){c(this,t),o(this,"open",!1),o(this,"key",""),o(this,"model",s.udp)})),p=function(t){return t[t.row=1]="row",t[t.json=2]="json",t[t.form=3]="form",t}({}),d=i((function t(){c(this,t)}))},9240:(t,e)=>{function r(t){const e=t.lastIndexOf(".");return-1===e||0===e?"":t.slice(e)}function n(t){let e="\\";for(const r of t)if("/"===r||"\\"===r){e=r;break}return e}e.Jn=function(t,e){let r=n(t);if("."===e)return t;if(".."===e){if(t.length>1){let e=t[t.length-1]===r?1:0;for(let n=t.length-1-e;n>=0;n--)if(t[n]===r)return t.substring(0,n+1)}return t}return t.endsWith(r)&&e.startsWith(r)?t.slice(0,-1)+e:t.endsWith(r)||e.startsWith(r)?t+e:t+r+e},e.Z1=function(t){if("string"!=typeof t)return!1;return/^[a-zA-Z]:[\\\/]/.test(t)||/^\//.test(t)};const o={".com":4,".exe":3,".bat":2,".cmd":1}}}]);
|