filecat 4.9.1 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/build/dist/181.f3c8bda26e52b1dd43a1.js +2 -0
  2. package/build/dist/29.afc5801d3e4eba212a81.js +2 -0
  3. package/build/dist/402.f5aaf020a2e40c98e45a.js +2 -0
  4. package/build/dist/432.dc827406e7670d899e8b.js +2 -0
  5. package/build/dist/441.8196626aec2941142764.js +2 -0
  6. package/build/dist/{445.edd7f691ca75a327c44b.js → 445.5acc66a00dd5b30defcf.js} +2 -2
  7. package/build/dist/467.1718633f1b22143149d9.js +2 -0
  8. package/build/dist/523.4e3beb2ee4700d4ace4f.js +2 -0
  9. package/build/dist/567.7ae59d8dfeb8890c5fc8.js +2 -0
  10. package/build/dist/602.2b2ee33c90538c42bcac.js +2 -0
  11. package/build/dist/{659.5505561d89c712e0009c.js → 659.c5a239c2f8f8872cfed0.js} +2 -2
  12. package/build/dist/{674.d30f7012ee924cad7db5.js → 674.d9572e2ef61fbb679acc.js} +2 -2
  13. package/build/dist/757.0e3114cc8fb18e562b2b.js +1 -0
  14. package/build/dist/903.895a90e8b28ac0d3806d.js +1 -0
  15. package/build/dist/91.f533a9c21057cec97935.js +1 -0
  16. package/build/dist/{943.bfdbd186dfc44f6ad0e9.js → 943.87e466300e0b6d1acc14.js} +2 -2
  17. package/build/dist/960.f1dde940c5a55787e620.js +2 -0
  18. package/build/dist/995.6eccaa83ff5c78010a01.js +2 -0
  19. package/build/dist/998.cc16015411a639e6206a.js +2 -0
  20. package/build/dist/dark.css +255 -0
  21. package/build/dist/index.html +1 -1
  22. package/build/dist/main.f7dd8b156e4e14381496.js +2 -0
  23. package/build/main.js +1 -1
  24. package/package.json +3 -3
  25. package/shell/build.js +1 -0
  26. package/shell/config/webpack.web.config.js +2 -1
  27. package/build/dist/181.dca620b20a199752979b.js +0 -2
  28. package/build/dist/29.295d812bf555f011d87a.js +0 -2
  29. package/build/dist/402.30639194e12145c1cf9a.js +0 -2
  30. package/build/dist/432.7b119d694992c084c268.js +0 -2
  31. package/build/dist/441.c6afbf2da36cec614c74.js +0 -2
  32. package/build/dist/467.3781a513321c2c8d059d.js +0 -2
  33. package/build/dist/523.1e36e655cafde2e079f4.js +0 -2
  34. package/build/dist/567.e0283ad19bf0f4828bd6.js +0 -2
  35. package/build/dist/602.63c8d1add28366438440.js +0 -2
  36. package/build/dist/757.0e9976103746517e0445.js +0 -1
  37. package/build/dist/874.1fc3e6f65b12ea4bbb8d.js +0 -2
  38. package/build/dist/903.cfe48ce0615b1410ade8.js +0 -1
  39. package/build/dist/91.9afa1ffafdf0376c2ca7.js +0 -1
  40. package/build/dist/995.a90a78a0461cd49d68df.js +0 -2
  41. package/build/dist/998.35918cc184b275053643.js +0 -2
  42. package/build/dist/main.8d90a69efb4771f23b46.js +0 -2
  43. /package/build/dist/{181.dca620b20a199752979b.js.LICENSE.txt → 181.f3c8bda26e52b1dd43a1.js.LICENSE.txt} +0 -0
  44. /package/build/dist/{29.295d812bf555f011d87a.js.LICENSE.txt → 29.afc5801d3e4eba212a81.js.LICENSE.txt} +0 -0
  45. /package/build/dist/{402.30639194e12145c1cf9a.js.LICENSE.txt → 402.f5aaf020a2e40c98e45a.js.LICENSE.txt} +0 -0
  46. /package/build/dist/{432.7b119d694992c084c268.js.LICENSE.txt → 432.dc827406e7670d899e8b.js.LICENSE.txt} +0 -0
  47. /package/build/dist/{441.c6afbf2da36cec614c74.js.LICENSE.txt → 441.8196626aec2941142764.js.LICENSE.txt} +0 -0
  48. /package/build/dist/{445.edd7f691ca75a327c44b.js.LICENSE.txt → 445.5acc66a00dd5b30defcf.js.LICENSE.txt} +0 -0
  49. /package/build/dist/{467.3781a513321c2c8d059d.js.LICENSE.txt → 467.1718633f1b22143149d9.js.LICENSE.txt} +0 -0
  50. /package/build/dist/{523.1e36e655cafde2e079f4.js.LICENSE.txt → 523.4e3beb2ee4700d4ace4f.js.LICENSE.txt} +0 -0
  51. /package/build/dist/{567.e0283ad19bf0f4828bd6.js.LICENSE.txt → 567.7ae59d8dfeb8890c5fc8.js.LICENSE.txt} +0 -0
  52. /package/build/dist/{602.63c8d1add28366438440.js.LICENSE.txt → 602.2b2ee33c90538c42bcac.js.LICENSE.txt} +0 -0
  53. /package/build/dist/{659.5505561d89c712e0009c.js.LICENSE.txt → 659.c5a239c2f8f8872cfed0.js.LICENSE.txt} +0 -0
  54. /package/build/dist/{674.d30f7012ee924cad7db5.js.LICENSE.txt → 674.d9572e2ef61fbb679acc.js.LICENSE.txt} +0 -0
  55. /package/build/dist/{943.bfdbd186dfc44f6ad0e9.js.LICENSE.txt → 943.87e466300e0b6d1acc14.js.LICENSE.txt} +0 -0
  56. /package/build/dist/{874.1fc3e6f65b12ea4bbb8d.js.LICENSE.txt → 960.f1dde940c5a55787e620.js.LICENSE.txt} +0 -0
  57. /package/build/dist/{995.a90a78a0461cd49d68df.js.LICENSE.txt → 995.6eccaa83ff5c78010a01.js.LICENSE.txt} +0 -0
  58. /package/build/dist/{998.35918cc184b275053643.js.LICENSE.txt → 998.cc16015411a639e6206a.js.LICENSE.txt} +0 -0
  59. /package/build/dist/{main.8d90a69efb4771f23b46.js.LICENSE.txt → main.f7dd8b156e4e14381496.js.LICENSE.txt} +0 -0
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 181.f3c8bda26e52b1dd43a1.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[91,181],{4091:(t,e,r)=>{r.r(e),r.d(e,{default:()=>d});var n=r(6540),o=r(952),i=r.n(o),a=(r(2327),r(1766),r(4854),r(8),r(846),r(975),r(4286),r(766),r(1234),r(7507),r(4522)),c=r.n(a),u=r(7444),l=r(6417),f=r(8247);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){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function p(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=s(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==s(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function y(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 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}}(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 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 d(t){var e=(0,n.useRef)(null),r=y((0,u.L4)(l.A.user_base_info),2),o=r[0],a=(r[1],"dark"===o.user_data.theme?"cloud_editor_dark":"cloud9_day");return(0,n.useEffect)((function(){var r,n,o=i().edit(e.current,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?h(Object(r),!0).forEach((function(e){p(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({value:f.xK.get_value_temp(),showPrintMargin:!1,theme:"ace/theme/".concat(a),mode:null!==(r=t.model)&&void 0!==r?r:c().getModeForPath(null!==(n=t.name)&&void 0!==n?n:"").mode,wrap:!1,highlightActiveLine:!1,fontSize:14},t.options));return o.setOptions({enableBasicAutocompletion:!0,enableSnippets:!0,enableLiveAutocompletion:!0}),o.container.addEventListener("wheel",(function(t){t.preventDefault()})),o.focus(),o.on("change",(function(e){t.on_change&&t.on_change()})),e.current=o,f.xK.set_editor_temp(o),function(){f.xK.set_editor_temp(null),o.destroy()}}),[]),n.createElement("div",{ref:e,style:{height:"100%",width:"100%"}})}i().config.set("basePath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),i().config.set("modePath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),i().config.set("themePath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),i().config.set("workerPath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/"))},7181:(t,e,r)=>{r.r(e),r.d(e,{default:()=>d});var n=r(6540),o=r(5997),i=r(7952),a=r(7444),c=r(6417),u=r(8247),l=r(4091),f=r(4289);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(){h=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),c=new G(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var y="suspendedStart",v="suspendedYield",d="executing",m="completed",g={};function b(){}function w(){}function _(){}var E={};l(E,a,(function(){return this}));var j=Object.getPrototypeOf,O=j&&j(j(I([])));O&&O!==r&&n.call(O,a)&&(E=O);var L=_.prototype=b.prototype=Object.create(E);function x(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,i,a,c){var u=p(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==s(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=y;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=p(e,r,n);if("normal"===l.type){if(o=n.done?m:v,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(s(e)+" is not iterable")}return w.prototype=_,o(L,"constructor",{value:_,configurable:!0}),o(_,"constructor",{value:w,configurable:!0}),w.displayName=l(_,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,l(t,u,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},x(S.prototype),l(S.prototype,c,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new S(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(L),l(L,u,"Generator"),l(L,a,(function(){return this})),l(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,G.prototype={constructor:G,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function p(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,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 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}}(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 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 d(){var t=y((0,a.L4)(c.A.editorSetting),2),e=t[0],r=t[1],s=y((0,n.useState)(!1),2),v=s[0],d=s[1],m=y((0,a.L4)(c.A.fileShellShow),2),g=m[0],b=m[1],w=y((0,a.L4)(c.A.file_shell_hidden),2),_=w[0],E=w[1];function j(){return O.apply(this,arguments)}function O(){var t;return t=h().mark((function t(){return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.save||!v){t.next=5;break}return t.next=3,e.save(u.xK.get_editor_value());case 3:u.xK.set_value_temp(""),d(!1);case 5:case"end":return t.stop()}}),t)})),O=function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){p(i,n,o,a,c,"next",t)}function c(t){p(i,n,o,a,c,"throw",t)}a(void 0)}))},O.apply(this,arguments)}var L=function(t){t.ctrlKey&&"s"===t.key&&(t.preventDefault(),e.save&&v&&j())};(0,n.useEffect)((function(){return function(){d(!1)}}),[e]),(0,n.useEffect)((function(){return document.addEventListener("keydown",L),function(){document.removeEventListener("keydown",L)}}),[v,e]);var x=n.createElement("div",{id:"editor-container"},n.createElement(i.A,{ignore_tags:!0,left_children:[n.createElement(o.rA,{key:1,title:"取消",icon:"close",onClick:function(){u.xK.set_value_temp(""),r({open:!1,model:"",fileName:"",save:null})}}),n.createElement("title",{key:2},e.fileName)]},e.menu_list&&e.menu_list,e.opt_shell&&n.createElement(o.rA,{icon:"terminal",title:"shell",onClick:function(){g.show?E(!_):b({show:!0,path:(0,f.GG)("file",(0,f.vX)())})}}),v&&n.createElement(o.rA,{title:"保存",icon:"save",onClick:j})),n.createElement(l.default,{name:e.fileName,model:e.model,on_change:function(){v||d(!0)}}));return e.open&&x}}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 29.afc5801d3e4eba212a81.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[29],{3029:(t,e,r)=>{r.d(e,{N:()=>I});var n=r(6540),o=r(7444),i=r(6417);function a(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 c(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)?c(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 c(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 u(t){var e=a((0,o.L4)(i.A.user_base_info),2),r=e[0];e[1];return n.createElement("div",null,t.div?n.createElement("div",{className:"nav_list_a",style:{}},t.name):t.clickItem||"dir"===t._type?n.createElement("div",{className:"nav_list_a",style:{background:"dark"!==r.user_data.theme?t.color:null},onClick:function(){"dir"!==t._type?t.clickItem&&t.clickItem(t):t.click_dir(t.item)}},t.name):n.createElement("a",{href:t.url,target:t.target,className:"nav_list_a",style:{background:"dark"!==r.user_data.theme?t.color:null}},t.name))}var l=r(4694),f=r(3033),s=r(5997),h=r(7767),p=r(2389);function y(t){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y(t)}function v(){return v=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},v.apply(null,arguments)}function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function m(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?d(Object(r),!0).forEach((function(e){b(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function b(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=y(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==y(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function g(){g=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),c=new C(n||[]);return o(a,"_invoke",{value:L(t,r,c)}),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",v="executing",d="completed",m={};function b(){}function w(){}function _(){}var E={};l(E,a,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(N([])));x&&x!==r&&n.call(x,a)&&(E=x);var O=_.prototype=b.prototype=Object.create(E);function j(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==y(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function L(e,r,n){var o=h;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===d){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===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function A(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=s(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(y(e)+" is not iterable")}return w.prototype=_,o(O,"constructor",{value:_,configurable:!0}),o(_,"constructor",{value:w,configurable:!0}),w.displayName=l(_,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,l(t,u,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},j(S.prototype),l(S.prototype,c,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new S(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},j(O),l(O,u,"Generator"),l(O,a,(function(){return this})),l(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):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),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function w(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function _(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){w(i,n,o,a,c,"next",t)}function c(t){w(i,n,o,a,c,"throw",t)}a(void 0)}))}}function E(t){return function(t){if(Array.isArray(t))return O(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||x(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 k(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||x(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 x(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}}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}var j,S,L=["#ffffff","#fefff8","#fcfdf1","#d3d2dc","#f8f9fd","#ebf4fe","#ebebeb","#e8f7eb","#eaf2f9"],A=[],P=[];function I(t){var e=k((0,n.useState)([]),2),r=e[0],a=e[1],c=k((0,n.useState)(-1),2),y=c[0],d=c[1],b=(0,h.zy)(),w=k((0,n.useState)(!1),2),x=w[0],O=w[1],I=k((0,n.useState)(!1),2),C=I[0],N=I[1],T=(0,p.Bd)().t,F=k((0,n.useState)([]),2),D=F[0],G=F[1],M=k((0,o.L4)(i.A.nav_index_add_item_by_now_list),2),U=M[0],Y=M[1],$=function(t){-1!==y?P[y]._children=t:A=t};(0,n.useEffect)((function(){var e=function(){var e=_(g().mark((function e(){var r;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.getItems){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,t.getItems();case 4:r=e.sent,a(A=r);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[b]);var z=function(){var e=_(g().mark((function e(){return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!x){e.next=6;break}if(!t.save){e.next=4;break}return e.next=4,t.save(A);case 4:e.next=7;break;case 6:S=r;case 7:O(!x);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),B=function(){var e=_(g().mark((function e(){var n;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=[],e.t1=E(r),e.t2=m,e.t3={name:"",color:(0,l.Lr)(L)},e.t4=t.get_pre_add_item,!e.t4){e.next=9;break}return e.next=8,t.get_pre_add_item();case 8:e.t4=e.sent;case 9:e.t5=e.t4,e.t6=(0,e.t2)(e.t3,e.t5),e.t7=[e.t6],n=e.t0.concat.call(e.t0,e.t1,e.t7),$(n),a(n);case 15:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,n.useEffect)((function(){if(U){var t=[].concat(E(r),[m({name:"",color:(0,l.Lr)(L)},U)]);$(t),a(t),O(!0),Y(void 0)}}),[U]);var q=function(t){d(y+1),a(t._children),P.push(t)};return n.createElement("div",{className:"nav_list_div"},-1!==y&&n.createElement(s.rA,{title:"返回",icon:"arrow_back",onClick:function(){a(0===y?A:P[y-1]._children),d(y-1),P.pop()}}),r.map((function(e,o){return n.createElement("div",{key:o,draggable:!0,onDragOver:function(t){t.preventDefault()},onDragStart:function(t){return function(t,e){j=e}(0,o)},onDrop:function(t){return function(t,e){var n=E(r),o=n[j];n.splice(j,1),n.splice(e,0,o),$(n),a(n)}(0,o)},style:{cursor:x?"move":"pointer"}},n.createElement(u,v({name:e.name,item:e},e,{div:x,target:"_blank",click_dir:q,clickItem:t.clickItem})),x&&(void 0!==D.find((function(t){return t===o}))||C)&&n.createElement("div",{className:C?"":" site_edit "},"dir"===e._type?n.createElement(n.Fragment,null,n.createElement(f.Sm,{value:e.name,handleInputChange:function(t){e.name=t},placeholder:T("输入类目名"),no_border:!0}),n.createElement(f.Sm,{value:e.color,handleInputChange:function(t){e.color=t},placeholder:"color",no_border:!0})):t.items.map((function(t,r){return n.createElement("div",{key:r},n.createElement(f.Sm,{value:e[t.key],handleInputChange:function(r){e[t.key]=r},placeholder:t.preName,no_border:!0}))})),!C&&n.createElement(s.C3,{text:T("折叠"),clickFun:function(){G((0,l.P1)(D,o))}})),x&&n.createElement("div",{style:{display:"block"}},n.createElement("span",{className:"div-row "},n.createElement(s.C3,{text:T("删除"),clickFun:function(){var t,e;t=o,(e=E(r)).splice(t,1),$(e),a(e)}}),n.createElement(s.C3,{text:T("编辑"),clickFun:function(){void 0===D.find((function(t){return t===o}))&&G([].concat(E(D),[o]))}}))))})),x&&n.createElement("div",{style:{display:"block"}},n.createElement(s.rA,{title:T("取消"),icon:"cancel",onClick:function(){G([]),O(!1),S&&(a(S),$(S)),N(!1)}}),n.createElement(s.rA,{title:T("添加"),icon:"add",onClick:B}),n.createElement(s.rA,{title:T("添加类目"),icon:"add_box",onClick:function(){var t=[].concat(E(r),[{name:"",_type:"dir",_children:[],color:"#c1edfb"}]);$(t),a(t)}}),n.createElement(s.rA,{title:T("全部编辑"),icon:C?"unfold_less":"unfold_more",onClick:function(){N(!C)}})),(void 0===t.have_auth_edit||!0===t.have_auth_edit)&&n.createElement(s.rA,{icon:x?"save":"edit",title:T(x?"保存":"编辑"),onClick:z}))}}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 402.f5aaf020a2e40c98e45a.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[402],{3402:(t,e,r)=>{r.r(e),r.d(e,{default:()=>w});var n=r(6540),o=r(7856),i=r(4238),a=r(4944),c=r(7444),u=r(6417),l=r(4405),f=r(505);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(){h=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),c=new N(n||[]);return o(a,"_invoke",{value:j(t,r,c)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var y="suspendedStart",v="suspendedYield",d="executing",m="completed",w={};function g(){}function b(){}function x(){}var L={};l(L,a,(function(){return this}));var _=Object.getPrototypeOf,E=_&&_(_(G([])));E&&E!==r&&n.call(E,a)&&(L=E);var k=x.prototype=g.prototype=Object.create(L);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function F(t,e){function r(o,i,a,c){var u=p(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==s(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function j(e,r,n){var o=y;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===w)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=p(e,r,n);if("normal"===l.type){if(o=n.done?m:v,l.arg===w)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),w;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,w;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,w):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,w)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function G(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(s(e)+" is not iterable")}return b.prototype=x,o(k,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:b,configurable:!0}),b.displayName=l(x,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,l(t,u,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},S(F.prototype),l(F.prototype,c,(function(){return this})),e.AsyncIterator=F,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new F(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(k),l(k,u,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=G,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,w):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),w},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),w}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:G(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),w}},e}function p(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){p(i,n,o,a,c,"next",t)}function c(t){p(i,n,o,a,c,"throw",t)}a(void 0)}))}}function v(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return d(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)?d(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 d(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 m=n.lazy((function(){return r.e(614).then(r.bind(r,5614))}));function w(t){var e=v((0,n.useState)(null),2),r=e[0],s=e[1],p=v((0,c.L4)(u.A.fileShellShow),2),d=p[0],w=(p[1],v((0,c.L4)(u.A.file_shell_hidden),2)),g=w[0],b=(w[1],v((0,n.useState)(!1),2)),x=b[0],L=b[1],_=v((0,c.L4)(u.A.user_base_info),2),E=_[0],k=(_[1],"dark"===E.user_data.theme?"#FFFFFF":"#000000"),S=function(){var t=y(h().mark((function t(){var e,r,n;return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=new o.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:k,cursor:k,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},a.ws.addMsg(i.HK.shell_getting,(function(t){r(t.context)})),a.ws.addMsg(i.HK.shell_copy,(function(t){t.context&&(0,f.l)(t.context),e.focus()})),e.onData(function(){var t=y(h().mark((function t(e){var r;return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new i.hf(i.HK.shell_send)).context=e,t.next=4,a.ws.send(r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),s(e);case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),F=function(){y(h().mark((function t(){return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r&&(r.dispose(),s(null)),a.ws.isAilive()&&a.ws.setPromise(function(){var t=y(h().mark((function t(e){return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.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(){F()}}),[]),(0,n.useEffect)((function(){if(d.show)if(r){if(x){var t=new i.hf(i.HK.shell_cd),e=new l.n;e.init_path=d.path,e.http_token=localStorage.getItem("token"),t.context=e,a.ws.send(t)}}else S(),L(!0);else F()}),[d]);return n.createElement(m,{show:d.show,file_shell_hidden:g,terminal:r,init:function(t,e){r.writeln("open shell... ");var n=new i.hf(i.HK.shell_open),o=new l.n;o.init_path=d.path,o.rows=t,o.cols=e,o.http_token=localStorage.getItem("token"),n.context=o,a.ws.send(n)}})}}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 432.dc827406e7670d899e8b.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[432],{5432:(t,e,r)=>{r.r(e),r.d(e,{default:()=>Ve});var n=r(6540),o=r(5725),a=r(3033),i=r(447),c=r(5997),u=r(4289),l=r(3413),s=r.n(l),f=r(2389);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,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.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&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(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(t){var e=(0,f.Bd)().t,r=h((0,n.useState)(e("毫秒")),2),o=r[0],l=r[1],p=h((0,n.useState)(""),2),y=p[0],d=p[1],m=h((0,n.useState)(""),2),v=m[0],g=m[1];return n.createElement(i.Zp,{title:e("时间转换器"),rightBottomCom:n.createElement(c.C3,{text:e("确定"),clickFun:function(){if(y||v){var t=0,e=""!==y&&0!==y;if(e){if(!(0,u.kf)(y))return void new(s())({type:"error",text:"必须都是数字",timeout:1e3,layout:"bottomLeft"}).show();t=parseInt(y),"分秒"===o&&(t*=1e3)}var r=new Date(e?t:v),n=new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(r);if(g(n),!y){var a=r.getTime();d("毫秒"===o?a:a/1e3)}}else new(s())({type:"error",text:"不能都为空",timeout:1e3,layout:"bottomLeft"}).show()}})},n.createElement(a.l6,{options:[{title:e("毫秒"),value:"毫秒"},{title:e("分秒"),value:"分秒"}],onChange:function(t){l(t)}}),n.createElement(a.Sm,{placeholder:o,value:y,handleInputChange:function(t){d(t)}}),n.createElement(a.Sm,{placeholder:e("格式化时间"),value:v,handleInputChange:function(t){g(t)}}))}var d=r(7952),m=r(6007),v=r(8694),g=r(3459),w=r(3029),b=r(6417),x=r(7444),E=r(8247),_=r(3430);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=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:O(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(F([])));E&&E!==r&&n.call(E,i)&&(b=E);var _=w.prototype=v.prototype=Object.create(b);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function N(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==L(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function O(e,r,n){var o=h;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=A(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function A(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function K(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function F(e){if(e||""===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 g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},k(N.prototype),l(N.prototype,c,(function(){return this})),e.AsyncIterator=N,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new N(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(_),l(_,u,"Generator"),l(_,i,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=F,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(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].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):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),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),K(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;K(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:F(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function k(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function N(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){k(a,n,o,i,c,"next",t)}function c(t){k(a,n,o,i,c,"throw",t)}i(void 0)}))}}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,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.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&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(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 j(t){var e=(0,f.Bd)().t,r=O((0,x.L4)(b.A.header_min),2),i=(r[0],r[1]),u=O((0,n.useState)(""),2),l=u[0],h=u[1],p=O((0,n.useState)(""),2),y=p[0],L=p[1],k=O((0,n.useState)(void 0),2),A=k[0],j=k[1],K=O((0,n.useState)(!1),2),P=K[0],F=K[1],C=(0,E.MH)().check_user_auth,I=function(){var t=N(S().mark((function t(){var e;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=new v.qB).targetProxyUrl="string"==typeof l?l:y,t.next=4,m._U.post("close",e);case 4:if(t.sent.code===g.m.Sucess){t.next=7;break}return t.abrupt("return");case 7:L(""),i(!1);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),T=function(){var t=N(S().mark((function t(e){var r,n,o;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new v.qB).targetProxyUrl="string"==typeof e?e:l,r.sysProxyPort=A,t.next=5,m._U.post("start",r);case 5:if((n=t.sent).code===g.m.Sucess){t.next=8;break}return t.abrupt("return");case 8:o="".concat(window.location.protocol,"//").concat(window.location.hostname,":").concat(n.data),L(o);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();(0,n.useEffect)((function(){return function(){I()}}),[]);var D=function(){var t=N(S().mark((function t(){var e;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m._U.get("tag");case 2:if((e=t.sent).code!==g.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=N(S().mark((function t(e){return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m._U.post("tag/save",e);case 2:t.sent.code!==g.m.Sucess&&new(s())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),M=function(){var t=N(S().mark((function t(e){return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:h(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(d.A,null,n.createElement(a.$Z,{placeholder:e("系统代理端口"),icon:"outlet",value:A,handleInputChange:function(t){t&&(/^\d+$/.test(t)||new(s())({type:"error",text:"不是数字",timeout:1e3,layout:"bottomLeft"}).show(),j(parseInt(t)))},max_width:"10rem"}),n.createElement(a.$Z,{placeholder:e("要代理的url"),icon:"link",value:l,handleInputChange:function(t){h(t)}}),n.createElement(c.rA,{icon:"play_arrow",title:e("开始代理"),onClick:T}),n.createElement(c.rA,{icon:"fullscreen",title:e("全屏"),onClick:function(){F(!P),i(!P)}}),n.createElement(c.rA,{icon:"close",title:e(e("关闭")),onClick:function(){I(),F(!1),h("")}})),n.createElement(o.jW,{isFull:P},n.createElement("div",{id:"browser"},!y&&n.createElement(w.N,{have_auth_edit:C(_.oV.browser_proxy_tag_update),getItems:D,save:G,clickItem:M,items:[{key:"name",preName:e("名字")},{key:"url",preName:"url"},{key:"color",preName:"color"}]}),n.createElement("iframe",{id:"webview",src:y}))))}var K=r(4405),P=r(7374),F=r(7767),C=r(4694),I=r(5726),T=r(7567),D=r(7022),G=r(8844),M=r(2042),B=r(8815),U=r(9214);function R(t){return R="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},R(t)}function H(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,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function V(){V=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new j(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(K([])));E&&E!==r&&n.call(E,i)&&(b=E);var _=w.prototype=v.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==R(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=h;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=N(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function N(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,N(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function K(e){if(e||""===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(R(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},L(S.prototype),l(S.prototype,c,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new S(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(_),l(_,u,"Generator"),l(_,i,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=K,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):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),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:K(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function $(t){return function(t){if(Array.isArray(t))return W(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 J(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function z(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){J(a,n,o,i,c,"next",t)}function c(t){J(a,n,o,i,c,"throw",t)}i(void 0)}))}}function Y(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,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.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&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(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 W(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)?W(t,e):void 0}}function W(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function X(t){var e=Y((0,x.L4)(b.A.selectedFileList),2),r=e[0],o=e[1],a=Y((0,x.L4)(b.A.clickFileList),2),i=a[0],c=a[1],l=Y((0,x.L4)(b.A.editorSetting),2),s=(l[0],l[1]),h=Y((0,x.L4)(b.A.shellNowDir),2),p=h[0],y=(h[1],Y((0,x.L4)(b.A.sshInfo),2)),d=y[0],v=(y[1],Y((0,x.L4)(b.A.nowFileList),2)),g=v[0],w=v[1],_=Y((0,x.L4)(b.A.enterKey),2),L=_[0],S=(_[1],Y((0,x.L4)(b.A.confirm),2)),k=(S[0],S[1]),N=(0,F.Zp)(),O=(0,f.Bd)().t,A=function(){var e=z(V().mark((function e(n,a){var l,f,h,p,y,v,g,b;return V().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(0,C.kW)(r,n))o((0,C.P1)(r,n));else if("ctrl"===L)o([].concat($(r),[n]));else if("shift"===L){if(l=(0,C.a7)(r),f=l.max,h=l.min,p=[],n>=f)for(y=f;y<=n;y++)p.push(y);else for(v=h;v>=n;v--)p.push(v);o(p)}else o([n]);if(c([].concat($(i),[n])),setTimeout((function(){c((0,C.P1)(i,n))}),300),t.type!==D.Iw.folder){e.next=17;break}if(void 0===i.find((function(t){return t===n}))){e.next=15;break}return(g=new K.x).key=d.key,g.dir="/".concat((0,u.GG)("remoteShell",(0,u.vX)())).concat(a),N((0,C.IO)((0,u.vX)(),a)),o([]),c([]),w({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=z(V().mark((function e(){var r,n,o;return V().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=new K.x).key=d.key,r.file="/".concat((0,u.GG)("remoteShell",(0,u.vX)())).concat(a),e.next=5,m.Fg.post("get/file/text",r);case 5:n=e.sent,o=void 0,a.endsWith(D.Iw.workflow_act)?o="ace/mode/yaml":(a.endsWith(D.Iw.draw)||a.endsWith(D.Iw.excalidraw))&&(o="ace/mode/json"),s({model:o,open:!0,fileName:t.name,save:function(){var t=z(V().mark((function t(e){return V().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r.context=e,t.next=3,m.Fg.post("update/file/text",r);case 3:0===t.sent.code&&(E.xK.set_value_temp(""),(0,M.LW)("success"));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}),E.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>B.o5)){e.next=23;break}return k({open:!0,title:O("提示"),sub_title:"文件超过20MB了确定要打开吗?",handle:function(){var t=z(V().mark((function t(){return V().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return k({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)}}(),j=function(){var e=z(V().mark((function e(n){var a,i,c,u,l,s;return V().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=new K.x,Object.assign(a,d),a.target=C.HS.apply(void 0,$(p).concat([n])),i=(0,U.ib)(g,r),c=i.map((function(t){return C.HS.apply(void 0,$(p).concat([t.name]))})),u=H(c),e.prev=6,u.s();case 8:if((l=u.n()).done){e.next=17;break}return s=l.value,a.source=s,e.next=13,m.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),u.e(e.t0);case 22:return e.prev=22,u.f(),e.finish(22);case 25:return o([]),k({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(G.B,{draggable_handle:j,name:t.name,index:t.index,mtime:t.mtime,size:t.size,type:t.type,itemWidth:t.itemWidth,show_mtime:t.show_mtime,click:A})}var q=r(7856),Q=r(4238),tt=r(4944);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 rt(){rt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new j(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(K([])));E&&E!==r&&n.call(E,i)&&(b=E);var _=w.prototype=v.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==et(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=h;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=N(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function N(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,N(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function K(e){if(e||""===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(et(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},L(S.prototype),l(S.prototype,c,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new S(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(_),l(_,u,"Generator"),l(_,i,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=K,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):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),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:K(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function nt(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function ot(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){nt(a,n,o,i,c,"next",t)}function c(t){nt(a,n,o,i,c,"throw",t)}i(void 0)}))}}function at(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,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.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&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return it(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?it(t,e):void 0}}(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 it(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var ct=n.lazy((function(){return r.e(614).then(r.bind(r,5614))}));function ut(t){var e=at((0,n.useState)(null),2),r=e[0],o=e[1],a=at((0,x.L4)(b.A.remoteShellShow),2),i=a[0],c=(a[1],at((0,n.useState)(!1),2)),u=(c[0],c[1]),l=at((0,x.L4)(b.A.sshInfo),2),s=l[0],f=(l[1],at((0,x.L4)(b.A.shellNowDir),2)),h=(f[0],f[1],at((0,x.L4)(b.A.user_base_info),2)),p=h[0],y=(h[1],"dark"===p.user_data.theme?"#FFFFFF":"#000000"),d=function(){var t=ot(rt().mark((function t(){var e,r,n;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=new q.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:y,cursor:y,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},tt.ws.addMsg(Q.HK.remote_shell_getting,(function(t){r(t.context)})),e.onData(function(){var t=ot(rt().mark((function t(e){var r,n;return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new K.x).key=s.key,r.cmd=e,(n=new Q.hf(Q.HK.remote_shell_send)).context=r,t.next=7,tt.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)}}(),m=function(){ot(rt().mark((function t(){return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r&&(r.dispose(),o(null)),tt.ws.isAilive()&&tt.ws.setPromise(function(){var t=ot(rt().mark((function t(e){return rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,tt.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(){m()}}),[]),(0,n.useEffect)((function(){i.show?r||(d(),u(!0)):m()}),[i]);return n.createElement(ct,{show:i.show,terminal:r,init:function(t,e){r.writeln("open shell... ");var n=new Q.hf(Q.HK.remote_shell_open),o=new K.x;o.key=s.key,o.init_path=i.path,o.rows=t,o.cols=e,n.context=o,tt.ws.send(n)}})}var lt=r(1251),st=r(2730),ft=r(9240);function ht(t){return ht="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},ht(t)}function pt(){return pt=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},pt.apply(null,arguments)}function yt(){yt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new j(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(K([])));E&&E!==r&&n.call(E,i)&&(b=E);var _=w.prototype=v.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==ht(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=h;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=N(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function N(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,N(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function K(e){if(e||""===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(ht(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},L(S.prototype),l(S.prototype,c,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new S(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(_),l(_,u,"Generator"),l(_,i,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=K,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):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),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:K(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function dt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=wt(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,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function mt(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function vt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){mt(a,n,o,i,c,"next",t)}function c(t){mt(a,n,o,i,c,"throw",t)}i(void 0)}))}}function gt(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,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.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&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||wt(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 wt(t,e){if(t){if("string"==typeof t)return bt(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)?bt(t,e):void 0}}function bt(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 xt,Et=function(t){return t.block="",t.gallery="gallery",t.list="list",t}({}),_t=Object.values(Et),Lt=280;function St(t){var e=(0,f.Bd)().t,r=(0,n.useRef)(void 0),o=(0,F.zy)(),i=gt((0,x.L4)(b.A.nowFileList),2),l=i[0],h=i[1],p=gt((0,x.L4)(b.A.fileShowType),2),y=p[0],v=p[1],w=gt((0,x.L4)(b.A.uploadFiles),2),E=(w[0],w[1]),_=gt((0,x.L4)(b.A.showPrompt),2),L=(_[0],_[1]),S=gt((0,x.L4)(b.A.selectedFileList),2),k=S[0],N=(S[1],gt((0,x.L4)(b.A.enterKey),2)),O=(N[0],N[1]),A=gt((0,x.L4)(b.A.copyedFileList),2),j=A[0],G=A[1],R=gt((0,x.L4)(b.A.cutedFileList),2),H=R[0],V=R[1],$=gt((0,x.L4)(b.A.selectedFileList),2),J=($[0],$[1]),z=gt((0,x.L4)(b.A.clickFileList),2),Y=(z[0],z[1]),Z=gt((0,x.L4)(b.A.remoteShellShow),2),W=Z[0],q=Z[1],Q=gt((0,x.L4)(b.A.shellNowDir),2),tt=(Q[0],Q[1],gt((0,x.L4)(b.A.sshInfo),2)),et=tt[0],rt=(tt[1],gt((0,n.useState)(void 0),2)),nt=rt[0],ot=rt[1],at=gt((0,n.useState)(""),2),it=at[0],ct=at[1],ht=(0,F.Zp)(),mt=gt((0,x.L4)(b.A.user_base_info),2),wt=mt[0],bt=(mt[1],function(){var t=vt(yt().mark((function t(e){var r,n,o,a,i,c,l,s,f,p,y,d;return yt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new K.x).key=et.key,r.dir=e||"/".concat((0,u.GG)("remoteShell",(0,u.vX)())),t.next=5,m.Fg.post("get/dir",r);case 5:if((n=t.sent).code===g.m.Sucess){t.next=9;break}return(0,M.zN)("连接失败"),t.abrupt("return");case 9:o=n.data||{},a=o.folders,i=o.files,c=dt(null!=i?i:[]);try{for(c.s();!(l=c.n()).done;)(s=l.value).origin_size=s.size,s.size=(0,B.v7)(s.size),s.show_mtime=s.mtime?(0,lt.s)(s.mtime):""}catch(t){c.e(t)}finally{c.f()}f=dt(null!=a?a:[]);try{for(f.s();!(p=f.n()).done;)(y=p.value).show_mtime=y.mtime?(0,lt.s)(y.mtime):""}catch(t){f.e(t)}finally{f.f()}d={folders:a||[],files:i||[]},(0,U.yC)(d,wt.user_data.dir_show_type),h(d),xt=d;case 18:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),Et=function(){var t=vt(yt().mark((function t(){return yt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,bt();case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),St=function(){var t=Math.floor(document.querySelector("main").offsetWidth/Lt);0===t&&(t=1),ot("calc(".concat(100/t,"% - 1em)"))};(0,n.useEffect)((function(){return Ot(),Et(),St(),window.addEventListener("resize",St),function(){window.removeEventListener("resize",St)}}),[o]);var kt=function(){var t=vt(yt().mark((function t(e){var r,n,o,a;return yt().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,I.T)(r);case 8:a=t.sent,E(a),L({show:!0,type:T.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 Ot(){J([]),Y([])}function At(t){new(s())({type:"success",text:t,timeout:1e3,layout:"bottomLeft"}).show()}(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=gt((0,n.useState)(!1),2),Kt=jt[0],Pt=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=l.files.length,r=l.folders.length,n=[],o=0;o<e+r;o++)n.push(o);J(n)}else O("ctrl");else"Escape"===t.key?J([]):"Shift"===t.key&&O("shift")},e=function(t){t.ctrlKey||O("")};return window.addEventListener("keydown",t),window.addEventListener("keyup",e),function(){window.removeEventListener("keydown",t),window.removeEventListener("keyup",e)}}),[l,Kt]);var Ft=function(t){t.target===t.currentTarget&&J([])};return n.createElement("div",{className:"not-select-div"},n.createElement(d.A,{left_children:n.createElement(a.$Z,{handleEnterPress:function(){var t,e;if(xt){J([]),Y([]);var r,n=[],o=[],a=dt(null!==(t=xt.files)&&void 0!==t?t:[]);try{for(a.s();!(r=a.n()).done;){var i=r.value;i.name.includes(it)&&n.push(i)}}catch(t){a.e(t)}finally{a.f()}var c,u=dt(null!==(e=xt.folders)&&void 0!==e?e:[]);try{for(u.s();!(c=u.n()).done;){var l=c.value;l.name.includes(it)&&o.push(l)}}catch(t){u.e(t)}finally{u.f()}h({files:n,folders:o})}},placeholder:e("搜索当前目录"),icon:"search",value:"",handleInputChange:function(t){ct(t)},max_width:"25em"})},k.length>0&&n.createElement(c.rA,{icon:"delete",title:e("删除"),onClick:function(){L({show:!0,type:T.PromptEnum.SshDelete,overlay:!0,data:{}})}}),k.length>0&&n.createElement(c.rA,{icon:"content_copy",title:e("复制"),onClick:function(){var t=(0,U.ib)(l,k);G(t.map((function(t){return"/".concat((0,u.GG)("remoteShell",(0,u.vX)())).concat(t.name)}))),V([]),At("已复制")}}),k.length>0&&n.createElement(c.rA,{icon:"content_cut",title:e("剪切"),onClick:function(){var t=(0,U.ib)(l,k);V(t.map((function(t){return"/".concat((0,u.GG)("remoteShell",(0,u.vX)())).concat(t.name)}))),G([]),At("已剪切")}}),(j.length>0||H.length>0)&&n.createElement(c.rA,{onClick:function(){L({show:!0,type:T.PromptEnum.SshPaste,overlay:!0,data:{}})},icon:"content_paste",title:e("粘贴到此处"),tip:j.length+H.length}),1===k.length&&l.files.length>=1&&l.folders.length>=1&&(0,U.ib)(l,k)[0].type!==D.Iw.folder&&n.createElement(c.rA,{icon:"download",title:e("下载"),onClick:function(){var t=(0,U.ib)(l,k),e="/".concat((0,u.GG)("remoteShell",(0,u.vX)())).concat(decodeURIComponent(t[0].name)),r="/api/ssh/download?file=".concat(e,"&key=").concat(et.key,"&token=").concat(localStorage.getItem("token"));window.open(r)}}),1===k.length&&n.createElement(c.rA,{icon:"edit_attributes",title:e("重命名"),onClick:function(){L({show:!0,type:T.PromptEnum.SshReName,overlay:!0,data:{}})}}),n.createElement(c.rA,{icon:"terminal",title:"shell",onClick:function(){W.show?q({show:!1,path:""}):q({show:!0,path:"/".concat((0,u.GG)("remoteShell",(0,u.vX)()))})}}),n.createElement(c.rA,{icon:"grid_view",title:e("切换样式"),onClick:function(){v((0,C.jH)(_t,y))}}),n.createElement(c.rA,{icon:"create_new_folder",title:e("创建文件夹"),onClick:function(){L({show:!0,type:T.PromptEnum.SshNewDir,overlay:!0,data:{}})}}),n.createElement(c.rA,{icon:"note_add",title:e("创建文本文件"),onClick:function(){L({show:!0,type:T.PromptEnum.SshNewFile,overlay:!0,data:{}})}}),n.createElement(c.rA,{icon:"upload_file",title:"上传",onClick:function(){L({show:!0,type:T.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 c=r[i],u=n?c.webkitRelativePath:"".concat(c.webkitRelativePath).concat(c.name);c.fullPath=u,n&&a.add((0,st.S)(u)),o.push(c)}var l=[];if(n){var s,f=dt(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),E(l),L({show:!0,type:T.PromptEnum.SshUpload,overlay:!1,data:{}})}}}})}}),n.createElement(c.rA,{icon:"close",title:e("关闭"),onClick:function(){t.close()}})),n.createElement(P.e,{baseRoute:"remoteShell",clickFun:Ot,input_path_enter:function(t){(0,ft.Z1)(t)?bt(t):ht((0,ft.Jn)((0,u.vX)(),t)),J([]),Y([]),h({files:[],folders:[]})}}),n.createElement("div",{id:"listing",className:"mosaic file-icons ".concat(y),ref:r,onMouseEnter:function(){Pt(!0)},onMouseLeave:function(){Pt(!1)}},!!l&&!!l.folders&&l.folders.length>0&&n.createElement("h2",null,"文件夹"),!!l&&!!l.folders&&n.createElement("div",{onClick:Ft},l.folders.map((function(t,e){return n.createElement(X,pt({fileHandler:bt,itemWidth:nt,index:e,key:e},t))}))),!!l&&!!l.folders&&l.files.length>0&&n.createElement("h2",{onClick:Ft},"文件"),!!l&&!!l.folders&&n.createElement("div",{onClick:Ft},l.files.map((function(t,e){return n.createElement(X,pt({fileHandler:bt,itemWidth:nt,index:e+l.folders.length,key:e},t))})))),n.createElement(ut,null))}function kt(t){return kt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kt(t)}function Nt(){Nt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new j(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(K([])));E&&E!==r&&n.call(E,i)&&(b=E);var _=w.prototype=v.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==kt(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=h;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=N(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function N(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,N(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function K(e){if(e||""===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(kt(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},L(S.prototype),l(S.prototype,c,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new S(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(_),l(_,u,"Generator"),l(_,i,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=K,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):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),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:K(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function Ot(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function At(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){Ot(a,n,o,i,c,"next",t)}function c(t){Ot(a,n,o,i,c,"throw",t)}i(void 0)}))}}function jt(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,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.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&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Kt(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)?Kt(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 Kt(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 Pt(t){var e=(0,f.Bd)().t,r=(0,F.Zp)(),o=jt((0,n.useState)(""),2),i=o[0],u=o[1],l=jt((0,n.useState)(""),2),h=l[0],p=l[1],y=jt((0,n.useState)(""),2),v=y[0],L=y[1],S=jt((0,n.useState)(""),2),k=S[0],N=S[1],O=jt((0,n.useState)(void 0),2),A=O[0],j=O[1],P=jt((0,n.useState)(""),2),C=P[0],I=P[1],T=jt((0,x.L4)(b.A.shellNowDir),2),D=(T[0],T[1]),G=jt((0,x.L4)(b.A.sshInfo),2),M=G[0],B=G[1],U=(0,E.MH)().check_user_auth,R=function(){var t=At(Nt().mark((function t(){var e;return Nt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=new K.x).key=M.key,t.next=4,m.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=At(Nt().mark((function t(e){var n,o;return Nt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(n=new K.x).password=e?e.password:h,n.domain=e?e.domain:k,n.port=e?e.port:A,n.username=e?e.username:i,n.private_path=e?e.private_path:v,t.next=8,m.Fg.post("start",n);case 8:(o=t.sent)&&o.code===g.m.Sucess&&(n.dir=e?e.dir:C,r((0,ft.Jn)("/toolbox/remoteShell",e.dir)),D([n.dir]),B(o.data));case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),V=function(){var t=At(Nt().mark((function t(){var e;return Nt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m.Fg.get("tag");case 2:if((e=t.sent).code!==g.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)}}(),$=function(){var t=At(Nt().mark((function t(e){return Nt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m.Fg.post("tag/save",e);case 2:t.sent.code!==g.m.Sucess&&new(s())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),J=function(){var t=At(Nt().mark((function t(e){return Nt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return N(e.domain),I(e.dir),j(e.port),u(e.username),p(e.password),L(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(d.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:i,handleInputChange:function(t){return u(t)},max_width:"15rem"}),n.createElement(a.$Z,{placeholder:e("密码"),icon:"password",value:h,handleInputChange:function(t){return p(t)},max_width:"15rem"}),n.createElement(a.$Z,{placeholder:e("私钥路径"),icon:"private_connectivity",value:v,handleInputChange:function(t){return L(t)},max_width:"15rem"}),n.createElement(a.$Z,{placeholder:e("连接地址"),icon:"location_on",value:k,handleInputChange:function(t){N(t)},max_width:"15rem"}),n.createElement(a.$Z,{placeholder:e("端口"),icon:"outlet",value:A,handleInputChange:function(t){t&&(/^\d+$/.test(t)||new(s())({type:"error",text:"不是数字",timeout:1e3,layout:"bottomLeft"}).show(),j(parseInt(t)))},max_width:"7rem"}),n.createElement(c.rA,{icon:"play_arrow",title:e("连接"),onClick:function(){H()}})),M.key?n.createElement(St,{close:R,data:{port:A,password:h,username:i,domain:k,dir:C}}):n.createElement(w.N,{have_auth_edit:U(_.oV.ssh_proxy_tag_update),getItems:V,save:$,clickItem:J,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 Ft(t){return Ft="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},Ft(t)}function Ct(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,It(n.key),n)}}function It(t){var e=function(t,e){if("object"!=Ft(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Ft(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Ft(e)?e:e+""}function Tt(t){switch(t){case 0:return 1;case 2:return 2;default:return 0}}var Dt=function(){return function(t,e,r){return e&&Ct(t.prototype,e),r&&Ct(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 te.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=te.elementOffset(t.canvas);return tt.ws.sendData(Q.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=te.elementOffset(t.canvas);return tt.ws.sendData(Q.HK.mouse,{x:e.clientX-r.left,y:e.clientY-r.top,button:Tt(e.button),isPressed:!0}),e.preventDefault(),!1})),this.canvas.addEventListener("mouseup",(function(e){if(t.activeSession){var r=te.elementOffset(t.canvas);return tt.ws.sendData(Q.HK.mouse,{x:e.clientX-r.left,y:e.clientY-r.top,button:Tt(e.button),isPressed:!1}),e.preventDefault(),!1}})),this.canvas.addEventListener("contextmenu",(function(e){if(t.activeSession){var r=te.elementOffset(t.canvas);return tt.ws.sendData(Q.HK.mouse,{x:e.clientX-r.left,y:e.clientY-r.top,button:Tt(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=te.elementOffset(t.canvas);return tt.ws.sendData(Q.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=te.elementOffset(t.canvas);return tt.ws.sendData(Q.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 tt.ws.sendData(Q.HK.scancode,{code:te.scancode(e),isPressed:!0}),e.preventDefault(),!1})),window.addEventListener("keyup",(function(e){if(t.activeSession)return tt.ws.sendData(Q.HK.scancode,{code:te.scancode(e),isPressed:!1}),e.preventDefault(),!1})),this}},{key:"connect",value:function(t,e,r,n,o){var a=this;tt.ws.addMsg(Q.HK.rdp_connect,(function(t){console.log("[mstsc.js] connected"),a.activeSession=!0})),tt.ws.addMsg(Q.HK.rdp_bitmap,(function(t){var e=t.context;e.data=t.bin_context,a.render.update(e)})),tt.ws.addMsg(Q.HK.rdp_close,(function(t){o(null),console.log("[mstsc.js] close"),a.activeSession=!1})),tt.ws.addMsg(Q.HK.rdp_error,(function(t){a.activeSession=!1}));var i=new Q.hf;i.cmdType=Q.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:te.locale()},tt.ws.send(i)}}])}();function Gt(t){return Gt="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},Gt(t)}function Mt(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,Bt(n.key),n)}}function Bt(t){var e=function(t,e){if("object"!=Gt(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Gt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Gt(e)?e:e+""}var Ut,Rt,Ht,Vt,$t=function(){return function(t,e,r){return e&&Mt(t.prototype,e),r&&Mt(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,c=a*i*4,u=Module._malloc(c),l=new Uint8Array(Module.HEAPU8.buffer,u,c),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,c));return Module._free(n),Module._free(u),{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 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 zt(t,e,r){return(e=function(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+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Yt=(zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Ut={"":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),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Ut,"ArrowDown",57424),"PageDown",57425),"Insert",57426),"Delete",57427),"OSLeft",57435),"OSRight",57436),"ContextMenu",57437),"Power",57438),"BrowserSearch",57445),"BrowserFavorites",57446),zt(zt(zt(zt(zt(zt(zt(Ut,"BrowserRefresh",57447),"BrowserStop",57448),"BrowserForward",57449),"BrowserBack",57450),"LaunchApp1",57451),"LaunchMail",57452),"MediaSelect",57453)),Zt=(zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Rt={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"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Rt,77,"Semicolon"),165,"Quote"),170,"Backslash"),16,"ShiftLeft"),60,"IntlBackslash"),87,"KeyZ"),88,"KeyX"),67,"KeyC"),86,"KeyV"),66,"KeyB"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Rt,78,"KeyN"),188,"KeyM"),59,"Comma"),58,"Period"),161,"Slash"),"16","ShiftRight"),17,"ControlLeft"),91,"OSLeft"),18,"AltLeft"),32,"Space"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Rt,"17","ControlLeft"),"18","AltRight"),"91","OSRight"),93,"ContextMenu"),"17","ControlRight"),37,"ArrowLeft"),38,"ArrowUp"),40,"ArrowDown"),39,"ArrowRight"),144,"NumLock"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Rt,"144","NumLock"),111,"NumpadDivide"),106,"NumpadMultiply"),109,"NumpadSubtract"),103,"Numpad7"),104,"Numpad8"),105,"Numpad9"),107,"NumpadAdd"),100,"Numpad4"),101,"Numpad5"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Rt,102,"Numpad6"),97,"Numpad1"),98,"Numpad2"),99,"Numpad3"),96,"Numpad0"),110,"NumpadDecimal"),"13","NumpadEnter"),"17","ControlLeft"),"67","KeyC"),"17","ControlLeft")),Wt=(zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Ht={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"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Ht,77,"Semicolon"),192,"Quote"),220,"Backslash"),16,"ShiftLeft"),60,"IntlBackslash"),87,"KeyZ"),88,"KeyX"),67,"KeyC"),86,"KeyV"),66,"KeyB"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Ht,78,"KeyN"),188,"KeyM"),190,"Comma"),191,"Period"),223,"Slash"),"16","ShiftRight"),17,"ControlLeft"),91,"OSLeft"),18,"AltLeft"),32,"Space"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Ht,"17","ControlLeft"),"18","AltRight"),"91","OSRight"),93,"ContextMenu"),"17","ControlRight"),37,"ArrowLeft"),38,"ArrowUp"),40,"ArrowDown"),39,"ArrowRight"),144,"NumLock"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Ht,"144","NumLock"),111,"NumpadDivide"),106,"NumpadMultiply"),109,"NumpadSubtract"),103,"Numpad7"),104,"Numpad8"),105,"Numpad9"),107,"NumpadAdd"),100,"Numpad4"),101,"Numpad5"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Ht,102,"Numpad6"),97,"Numpad1"),98,"Numpad2"),99,"Numpad3"),96,"Numpad0"),110,"NumpadDecimal"),"13","NumpadEnter"),"17","ControlLeft"),"67","KeyC"),"17","ControlLeft")),Xt=(zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Vt={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"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Vt,191,"Slash"),"16","ShiftRight"),17,"ControlLeft"),18,"AltLeft"),91,"OSLeft"),32,"Space"),"18","AltRight"),"91","OSRight"),93,"ContextMenu"),"17","ControlRight"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Vt,37,"ArrowLeft"),38,"ArrowUp"),40,"ArrowDown"),39,"ArrowRight"),144,"NumLock"),"144","NumLock"),111,"NumpadDivide"),106,"NumpadMultiply"),109,"NumpadSubtract"),103,"Numpad7"),zt(zt(zt(zt(zt(zt(zt(zt(zt(zt(Vt,104,"Numpad8"),105,"Numpad9"),107,"NumpadAdd"),100,"Numpad4"),101,"Numpad5"),102,"Numpad6"),97,"Numpad1"),98,"Numpad2"),99,"Numpad3"),"13","NumpadEnter"),zt(zt(zt(Vt,96,"Numpad0"),110,"NumpadDecimal"),"17","ControlLeft")),qt={firefox:{fr:Zt,en:Xt},chrome:{fr:Wt,en:Xt}};(te=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 Dt(t)}},Canvas:{create:function(t){return new $t(t)}},scancode:function(t){var e=te.locale();return e=["fr","en"].indexOf(e)>0&&e||"en",Yt[t.code||qt[te.browser()||"firefox"][e][t.keyCode]]}};var Qt,te=new te;function ee(t){return ee="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},ee(t)}function re(){re=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new j(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(K([])));E&&E!==r&&n.call(E,i)&&(b=E);var _=w.prototype=v.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==ee(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=h;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=N(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function N(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,N(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function K(e){if(e||""===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(ee(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},L(S.prototype),l(S.prototype,c,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new S(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(_),l(_,u,"Generator"),l(_,i,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=K,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):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),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:K(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function ne(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function oe(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){ne(a,n,o,i,c,"next",t)}function c(t){ne(a,n,o,i,c,"throw",t)}i(void 0)}))}}function ae(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,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.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&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ie(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)?ie(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 ie(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 ce(){var t=(0,f.Bd)().t,e=ae((0,x.L4)(b.A.header_min),2),r=(e[0],e[1]),i=(0,E.MH)().check_user_auth,u=ae((0,n.useState)(void 0),2),l=u[0],s=u[1],h=ae((0,n.useState)(void 0),2),p=h[0],y=h[1],v=ae((0,n.useState)(void 0),2),L=v[0],S=v[1],k=ae((0,n.useState)(!1),2),N=k[0],O=k[1],A=ae((0,n.useState)(!1),2),j=A[0],K=A[1],P=function(){var t=oe(re().mark((function t(){return re().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,(0,I.J)("rle.js");case 3:Qt=!0,t.next=10;break;case 6:return t.prev=6,t.t0=t.catch(0),(0,M.zN)("加载资源失败"),t.abrupt("return");case 10:case"end":return t.stop()}}),t,null,[[0,6]])})));return function(){return t.apply(this,arguments)}}(),F=null;(0,n.useEffect)((function(){return Qt||P(),function(){F&&(F.close(),F=null)}}),[]);var C=function(e){K(!0),function(n,o,a){if(n=n||e.address,o=o||e.username,a=a||e.password,!n||!o||!a)return(0,M.zN)(t("不允许为空")),void K(!1);!function(t){F||(F=te.client.create(te.$(t)))}("rdpwebview");var i=te.$("rdpwebview");i.style.display="inline",i.width=window.innerWidth,i.height=window.innerHeight,O(!0),r(!0),F.connect(n,"",o,a,(function(t){te.$("rdpwebview").style.display="none",r(!1),K(!1),O(!1)}))}(l,p,L)},T=function(){var t=oe(re().mark((function t(){var e;return re().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return O(!1),t.next=3,tt.ws.sendData(Q.HK.rdp_disconnect,"");case 3:e=te.$("rdpwebview"),e.getContext("2d").clearRect(0,0,e.width,e.height),te.$("rdpwebview").style.display="none",K(!1),r(!1);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),D=function(){var t=oe(re().mark((function t(){var e;return re().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m.J0.get("tag");case 2:if((e=t.sent).code!==g.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=oe(re().mark((function t(e){return re().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m.J0.post("tag/save",e);case 2:t.sent.code!==g.m.Sucess&&(0,M.zN)("网络错误");case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),B=function(){var t=oe(re().mark((function t(e){return re().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:S(e.password),y(e.username),s(e.address),C(e);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(d.A,null,n.createElement(a.$Z,{placeholder:t("地址"),icon:"outlet",value:l,handleInputChange:function(t){return s(t)}}),n.createElement(a.$Z,{placeholder:t("账号"),icon:"http",value:p,handleInputChange:function(t){return y(t)}}),n.createElement(a.$Z,{placeholder:t("密码"),icon:"http",value:L,handleInputChange:function(t){return S(t)}}),!j&&n.createElement(c.rA,{icon:"play_arrow",title:t("连接"),onClick:C}),j&&n.createElement(c.rA,{icon:"close",title:t("关闭"),onClick:T})),n.createElement(o.jW,{isFull:N},!j&&n.createElement(w.N,{have_auth_edit:i(_.oV.rdp_proxy_tag_update),getItems:D,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"}})))}function ue(t){return ue="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},ue(t)}function le(){le=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new j(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(K([])));E&&E!==r&&n.call(E,i)&&(b=E);var _=w.prototype=v.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==ue(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=h;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=N(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function N(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,N(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function K(e){if(e||""===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(ue(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},L(S.prototype),l(S.prototype,c,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new S(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(_),l(_,u,"Generator"),l(_,i,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=K,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):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),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:K(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function se(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function fe(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){se(a,n,o,i,c,"next",t)}function c(t){se(a,n,o,i,c,"throw",t)}i(void 0)}))}}function he(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,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.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&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return pe(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)?pe(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 pe(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 ye(t){var e=(0,f.Bd)().t,r=(0,E.MH)().check_user_auth,o=he((0,n.useState)(""),2),i=o[0],u=o[1],l=function(){var t=fe(le().mark((function t(e){var r;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e||i){t.next=4;break}return new(s())({type:"error",text:"mac地址不能为空",timeout:1e3,layout:"bottomLeft"}).show(),t.abrupt("return");case 4:return t.next=6,m._U.post("wol/exec",{mac:r});case 6:if(t.sent.code===g.m.Sucess){t.next=9;break}return t.abrupt("return");case 9:new(s())({type:"success",text:"发送唤醒命令成功",timeout:1e3,layout:"bottomLeft"}).show();case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),h=function(){var t=fe(le().mark((function t(){var e;return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m._U.get("wol/tag");case 2:if((e=t.sent).code!==g.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)}}(),p=function(){var t=fe(le().mark((function t(e){return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m._U.post("wol/tag/save",e);case 2:t.sent.code!==g.m.Sucess&&new(s())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),y=function(){var t=fe(le().mark((function t(e){return le().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:u(e.mac),l(e.mac);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(d.A,null,n.createElement(c.rA,{icon:"play_arrow",title:e("发送"),onClick:function(){l()}}),n.createElement(a.$Z,{placeholder:e("目标设备mac地址"),icon:"laptop_mac",value:i,handleInputChange:function(t){return u(t)}})),n.createElement(w.N,{have_auth_edit:r(_.oV.wol_proxy_tag_update),getItems:h,save:p,clickItem:y,items:[{key:"name",preName:e("名字")},{key:"mac",preName:"mac"+e("地址")},{key:"color",preName:"color"}]}))}var de,me=r(7481),ve=r(505);function ge(t){return ge="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},ge(t)}function we(){we=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new j(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(K([])));E&&E!==r&&n.call(E,i)&&(b=E);var _=w.prototype=v.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==ge(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=h;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=N(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function N(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,N(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function K(e){if(e||""===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(ge(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},L(S.prototype),l(S.prototype,c,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new S(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(_),l(_,u,"Generator"),l(_,i,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=K,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):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),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:K(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function be(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function xe(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){be(a,n,o,i,c,"next",t)}function c(t){be(a,n,o,i,c,"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,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.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&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return _e(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_e(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _e(t,e){(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 Le(){var t=Ee((0,n.useState)("rsa"),2),e=t[0],r=t[1],u=Ee((0,n.useState)("pem"),2),l=u[0],s=u[1],h=(0,f.Bd)(),p=h.t,y=(h.i18n,Ee((0,x.L4)(b.A.confirm),2)),v=(y[0],y[1]),w=Ee((0,n.useState)(""),2),E=w[0],_=w[1],L=Ee((0,n.useState)(""),2),S=L[0],k=L[1],N=function(){var t=xe(we().mark((function t(){var r;return we().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m.cD.post("generate",{type:e,form:l});case 2:(r=t.sent).code===g.m.Sucess&&(_(r.data.public_key),k(r.data.private_key),de=r.data.home_path);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),O=function(){var t=xe(we().mark((function t(r){var n;return we().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(S&&E){t.next=3;break}return(0,M.zN)("密钥不能为空"),t.abrupt("return");case 3:n="id_"+e,"pub"===r&&(n+=".pub"),v({open:!0,title:p("将覆盖密钥文件"),sub_title:"之前的密钥将作废。 将会作为 ".concat(n,' 文件保存到系统上的"').concat(de,'"目录下,此目录会作为openssh(git)所使用的默认目录。'),handle:function(){var t=xe(we().mark((function t(){return we().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m.cD.post("save_openssh",{name:n,context:"pub"===r?E:S});case 2:t.sent.code===g.m.Sucess&&((0,M.LW)("完成"),v({open:!1,handle:null}));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()});case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(o.xh,null,n.createElement(d.A,null,n.createElement(me.S,{isFlex:!0,columns:[n.createElement(a.l6,{tip:"加密算法",value:e,width:"auto",onChange:function(t){r(t)},options:[{title:p("RSA"),value:"rsa"},{title:p("DSA"),value:"dsa"},{title:p("ECDSA"),value:"ecdsa"}]}),n.createElement(a.l6,{tip:"输出格式",value:l,width:"auto",onChange:function(t){s(t)},options:[{title:p("普通PEM"),value:"pem"},{title:p("opensshPEM"),value:"openssh_pem"}]}),n.createElement(c.rA,{icon:"play_arrow",title:p("生成"),onClick:function(){N()}})]})),n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(i.Zp,{title:"公钥",titleCom:n.createElement(c.rA,{title:"复制",icon:"copy_all",onClick:function(){E&&((0,ve.l)(E),(0,M.LW)("完成"))}}),rightBottomCom:"openssh_pem"===l&&n.createElement(c.C3,{text:p("保存到.ssh目录"),clickFun:function(){O("pub")}})},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(i.Zp,{title:"私钥",titleCom:n.createElement(c.rA,{title:"复制",icon:"copy_all",onClick:function(){S&&((0,ve.l)(S),(0,M.LW)("成功"))}}),rightBottomCom:"openssh_pem"===l&&n.createElement(c.C3,{text:p("保存到.ssh目录"),clickFun:function(){O("pri")}})},n.createElement("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},value:S,onChange:function(t){k(t.target.value)}}))))))}var Se=r(1499),ke=r(1083);function Ne(t){return Ne="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},Ne(t)}function Oe(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Ce(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,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function Ae(t){return function(t){if(Array.isArray(t))return Ie(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Ce(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 je(){je=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new j(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(K([])));E&&E!==r&&n.call(E,i)&&(b=E);var _=w.prototype=v.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==Ne(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=h;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=N(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function N(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,N(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function K(e){if(e||""===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(Ne(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},L(S.prototype),l(S.prototype,c,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new S(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(_),l(_,u,"Generator"),l(_,i,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=K,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):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),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:K(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function Ke(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function Pe(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){Ke(a,n,o,i,c,"next",t)}function c(t){Ke(a,n,o,i,c,"throw",t)}i(void 0)}))}}function Fe(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,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.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&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||Ce(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 Ce(t,e){if(t){if("string"==typeof t)return Ie(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)?Ie(t,e):void 0}}function Ie(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 Te,De,Ge,Me,Be,Ue=n.lazy((function(){return Promise.all([r.e(960),r.e(91)]).then(r.bind(r,4091))}));function Re(){var t=(0,f.Bd)(),e=t.t,r=(t.i18n,Fe((0,x.L4)(b.A.confirm),2)),u=(r[0],r[1],Fe((0,x.L4)(b.A.showPrompt),2)),l=(u[0],u[1]),h=(0,E.MH)().check_user_auth,p=Fe((0,n.useState)(""),2),y=p[0],L=p[1],S=Fe((0,x.L4)(b.A.router_jump),2),k=S[0],N=S[1],O=Fe((0,n.useState)("get"),2),A=O[0],j=O[1],K=Fe((0,n.useState)(""),2),P=K[0],F=K[1],C=Fe((0,n.useState)(void 0),2),I=C[0],D=C[1],G=Fe((0,n.useState)([]),2),U=G[0],R=G[1],H=Fe((0,n.useState)([]),2),V=H[0],$=H[1],J=Fe((0,n.useState)(1),2),z=J[0],Y=J[1],Z=Fe((0,n.useState)(1),2),W=Z[0],X=Z[1],q=Fe((0,n.useState)(1),2),et=q[0],rt=q[1],nt=Fe((0,n.useState)(),2),ot=nt[0],at=nt[1],it=Fe((0,x.L4)(b.A.nav_index_add_item_by_now_list),2),ct=(it[0],it[1]),ut=Fe((0,x.L4)(b.A.prompt_card),2),lt=(ut[0],ut[1]);E.xK.set_value_temp("{}"),(0,n.useEffect)((function(){return Te={},De={},Ge="",Me="",Be="",E.xK.get_editor().session.setMode("ace/mode/json"),k.http_download_map_path&&(D(k.http_download_map_path),N({})),tt.ws.sendData(Q.HK.http_download_water,void 0).then((function(){tt.ws.addMsg(Q.HK.http_download_water,(function(t){var e=t.context;$(e)}))})),function(){tt.ws.unConnect()}}),[]);var st=function(){var t=Pe(je().mark((function t(){var e;return je().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m._U.get("http/tag");case 2:if((e=t.sent).code!==g.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)}}(),ft=function(){var t=Pe(je().mark((function t(e){return je().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m._U.post("http/tag/save",e);case 2:t.sent.code!==g.m.Sucess&&new(s())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ht=function(){var t=Pe(je().mark((function t(e){return je().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:F(e.url),j(e.method),D(e.local_download_path),e.header_type&&pt(e.header_type),e.headers&&(Te=JSON.parse(e.headers),1===e.header_type&&(E.xK.get_editor().setValue(e.headers,-1),E.xK.get_editor().session.setMode("ace/mode/json"))),e.form_data_list&&R(JSON.parse(e.form_data_list)),e.json_data&&(De=JSON.parse(e.json_data)),e.data&&(Ge=e.data),e.body_type&&(X(e.body_type),2===e.header_type&&(1===e.body_type?(E.xK.get_editor().setValue(Ge,-1),E.xK.get_editor().session.setMode("ace/mode/text")):2===e.body_type&&(E.xK.get_editor().setValue(JSON.stringify(De,null,2),-1),E.xK.get_editor().session.setMode("ace/mode/json"))));case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),pt=function(t){try{1===z?Te=JSON.parse(E.xK.get_editor_value()):2===z&&(1===W?Ge=E.xK.get_editor_value():2===W&&(De=JSON.parse(E.xK.get_editor_value())))}catch(t){(0,M.zN)(t.message)}Y(t),1===t?(E.xK.get_editor().setValue(JSON.stringify(Te,null,2),-1),E.xK.get_editor().session.setMode("ace/mode/json")):2===t&&(1===W?(E.xK.get_editor().setValue(Ge,-1),E.xK.get_editor().session.setMode("ace/mode/text")):2===W&&(E.xK.get_editor().setValue(JSON.stringify(De,null,2),-1),E.xK.get_editor().session.setMode("ace/mode/json")))},yt=function(t){if(2===z){if(E.xK.get_editor_value())try{1===W?Ge=E.xK.get_editor_value():2===W&&(De=JSON.parse(E.xK.get_editor_value()))}catch(t){return void(0,M.zN)(t.message)}X(t),1===t?(E.xK.get_editor().setValue(Ge,-1),E.xK.get_editor().session.setMode("ace/mode/text")):2===t&&(E.xK.get_editor().setValue(JSON.stringify(De,null,2),-1),E.xK.get_editor().session.setMode("ace/mode/json"))}},dt=function(t){var e=new v.vr;if(e.url=P,e.method=A,1===z&&(Te=JSON.parse(E.xK.get_editor_value())),e.headers=Te,e.body_type=W,e.header_type=z,W===v.RB.row)2===z&&(Ge=E.xK.get_editor_value()),e.data=Ge,e.json_data=JSON.stringify(De);else if(W===v.RB.json)Te["Content-Type"]="application/json",1===z&&E.xK.get_editor().setValue(JSON.stringify(Te),-1),2===z&&(De=JSON.parse(E.xK.get_editor_value())),e.json_data=JSON.stringify(De),e.data=Ge;else if(W===v.RB.form){Te["Content-Type"]="multipart/form-data",e.form_data_list=U;var r,n=Oe(U);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},mt=function(){var t=Pe(je().mark((function t(){var e,r;return je().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(m._U.have_http_method(A)){t.next=3;break}return(0,M.zN)("不存在的http method"),t.abrupt("return");case 3:if(P){t.next=6;break}return(0,M.zN)("url is empty"),t.abrupt("return");case 6:at(void 0),L(""),(e=new FormData).append("data",JSON.stringify(dt(e))),r="http/send",I&&(r+="?local_download_path=".concat(I)),ke.A.post(m._U.getUrl(r),e,{headers:{"Content-Type":"multipart/form-data",Authorization:localStorage.getItem("token")}}).catch((function(t){(0,M.zN)(t.message)})).then((function(t){if(t){if(t.headers.filecat_remote_code)try{var e=JSON.parse(t.headers.filecat_remote_code);at(200===e?n.createElement("span",{style:{color:"green"}},"200"):e)}catch(t){console.log(t)}Me="object"===Ne(t.data)?JSON.stringify(t.data):t.data;try{t.headers.filecat_remote_raw_headers&&(Be=JSON.stringify(JSON.parse(t.headers.filecat_remote_raw_headers),null,2))}catch(e){Be=JSON.stringify(t.headers.filecat_remote_raw_headers)}1===et?L(Me):2===et&&L(Be)}}));case 13:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),vt=function(){var t=Pe(je().mark((function t(){var e,r,n,o;return je().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e=dt()).local_download_path=I,U){r=Oe(U);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(U),e.headers=JSON.stringify(e.headers),"object"===Ne(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(d.A,null),n.createElement(o.fI,null,n.createElement(o.VP,null,0!==V.length&&n.createElement(i.Zp,{title:"正在下载"},n.createElement("div",null,V.map((function(t,r){var o,a;return n.createElement("div",{key:r},n.createElement("div",{className:"div-row"},n.createElement(c.rA,{icon:"cancel",title:e("取消"),onClick:function(){tt.ws.sendData(Q.HK.http_download_cancel,t.local_download_path)}}),n.createElement(i.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,B.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(i.Zp,{title:"",rightBottomCom:3===W&&2===z&&n.createElement(c.rA,{icon:"add",title:e("添加"),onClick:function(){R([{}].concat(Ae(U)))}})},n.createElement("div",{className:"http_url"},n.createElement(a.$Z,{not_mobile:!0,max_width:"15%",placeholder:e("协议"),icon:"http",value:A,handleInputChange:function(t){j(t)}}),n.createElement(a.$Z,{not_mobile:!0,max_width:"80%",placeholder:e("http url"),icon:"link",value:P,handleInputChange:function(t){F(t)}}),n.createElement(c.rA,{icon:"send",title:e("发送"),onClick:mt}),h(_.oV.http_proxy_tag_update)&&n.createElement(c.rA,{title:e("添加"),icon:"save_as",onClick:function(){if(h(_.oV.http_proxy_tag_update)){var t,r,o=Oe(U);try{for(o.s();!(t=o.n()).done;){if(t.value.is_file)return void(0,M.zN)(e("表单中含有文件,浏览器限制不能添加"))}}catch(t){o.e(t)}finally{o.f()}lt({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:Pe(je().mark((function t(){var e;return je().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,vt();case 2:(e=t.sent).name=r,ct(e),lt({open:!1});case 6:case"end":return t.stop()}}),t)})))},e("确定"))))})}else(0,M.zN)("no permission")}})),n.createElement(me.S,{isFlex:!0,columns:[n.createElement(a.U6,{value:1,name:"h_or_body",context:e("请求头"),selected:1===z,onchange:function(){pt(1)}}),n.createElement(a.U6,{value:2,name:"h_or_body",context:e("请求体"),selected:2===z,onchange:function(){pt(2)}})]}),n.createElement(me.S,{isFlex:!0,columns:[n.createElement(a.U6,{value:1,name:"body",context:e("row"),selected:1===W,onchange:function(){yt(1)}}),n.createElement(a.U6,{value:2,name:"body",context:e("json"),selected:2===W,onchange:function(){yt(2)}}),n.createElement(a.U6,{value:3,name:"body",context:e("form"),selected:3===W,onchange:function(){yt(3)}})]}),n.createElement("div",{className:"http_ace",style:{display:3===W&&2===z?"none":""}},n.createElement(Ue,{name:""})),n.createElement("div",{style:{display:3!==W||2!==z?"none":""}},n.createElement(me.X,{headers:["key",e("值")],rows:U.map((function(t,r){var o=[n.createElement(a.Sm,{value:t.key,handleInputChange:function(e){t.key=e,R(Ae(U))},no_border:!0}),n.createElement(a.Sm,{value:t.value,handleInputChange:function(e){t.value=e,t.is_file=!1,R(Ae(U))},no_border:!0}),n.createElement("div",null,n.createElement(c.rA,{icon:"file_upload",title:e("上传文件"),onClick:function(){return function(t){l({show:!0,type:T.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,Se.hU)()+Date.now().toString(),U[t].value="".concat(o,"(").concat(o.name,")"),U[t].is_file=!0,U[t].fileName=o.name,U[t].fullPath=o.fullPath,R(Ae(U)),U[t].file_object=o,l({overlay:!1,type:"",show:!1,data:{}})}}}})}(r)}}),n.createElement(c.rA,{icon:"delete",title:e("删除"),onClick:function(){return function(t){U.splice(t,1),R(Ae(U))}(r)}}))];return o})),width:"10rem"})),n.createElement("div",{style:{paddingTop:"1rem"}},void 0===I?n.createElement("span",{onClick:function(){D("")}},e("下载到本地目录")):n.createElement(a.Sm,{placeholder:e("本地地址"),value:I,handleInputChange:function(t){D(t)},handlerEnter:function(){I||D(void 0)}}))),n.createElement(i.Zp,{title:ot,titleCom:n.createElement("div",{className:" div-row "},n.createElement(a.U6,{value:1,name:"respone",context:e("响应体"),selected:1===et,onchange:function(){rt(1),L(Me)}}),n.createElement(a.U6,{value:1,name:"respone",context:e("响应头"),selected:2===et,onchange:function(){rt(2),L(Be)}}),n.createElement(c.rA,{title:"复制",icon:"copy_all",onClick:function(){y&&((0,ve.l)(y),(0,M.LW)("完成"))}}))},n.createElement("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},onChange:function(t){L(t.target.value)},value:y}))),n.createElement(o.VP,null,n.createElement(w.N,{getItems:st,save:ft,have_auth_edit:h(_.oV.http_proxy_tag_update),clickItem:ht,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 He=n.lazy((function(){return Promise.all([r.e(859),r.e(257),r.e(654)]).then(r.bind(r,3146))}));function Ve(t){var e=(0,f.Bd)().t,r=(0,E.MH)().check_user_auth,a=[];return r(_.oV.ssh_proxy)&&a.push({index:1,name:"ssh".concat(e("代理")),rto:"remoteShell/*"}),r(_.oV.http_proxy)&&a.push({index:1,name:e("http代理"),rto:"http/"}),r(_.oV.browser_proxy)&&a.push({index:1,name:"".concat(e("浏览器")).concat(e("代理")),rto:"browserproxy/"}),r(_.oV.rdp_proxy)&&a.push({index:1,name:"rdp".concat(e("代理")),rto:"rdp/"}),r(_.oV.wol_proxy)&&a.push({index:1,name:e("网络唤醒"),rto:"netwol/"}),r(_.oV.rtsp_proxy)&&a.push({index:1,name:e("rtsp播放器"),rto:"rtsp/"}),a.push.apply(a,[{index:1,name:e("非对称密钥"),rto:"crypto/"},{index:1,name:e("时间工具"),rto:"timeutil/"}]),n.createElement(o.W1,{optionList:a},r(_.oV.ssh_proxy)&&n.createElement(Pt,null),r(_.oV.http_proxy)&&n.createElement(Re,null),r(_.oV.browser_proxy)&&n.createElement(j,null),r(_.oV.rdp_proxy)&&n.createElement(ce,null),r(_.oV.wol_proxy)&&n.createElement(ye,null),r(_.oV.rtsp_proxy)&&n.createElement(n.Suspense,{fallback:n.createElement("div",null)},n.createElement(He,null)),n.createElement(Le,null),n.createElement(o.xh,null,n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(y,null)))))}},7481:(t,e,r)=>{r.d(e,{S:()=>c,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,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.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&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(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 c(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=c(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,c(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 c(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 u(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:()=>y});var l=i((function t(){u(this,t)})),s=function(t){return t[t.tcp=0]="tcp",t[t.udp=1]="udp",t}({}),f=i((function t(){u(this,t),o(this,"open",!1),o(this,"key",""),o(this,"async_ips",[])})),h=i((function t(){u(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}({}),y=i((function t(){u(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}}}]);