filecat 5.60.6 → 5.62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/dist/10.c2c625264a1bc27d0420.js +1 -0
- package/build/dist/{133.0f5c2b4b21220468364e.js → 133.a2e4dbfe2f646d472b98.js} +1 -1
- package/build/dist/181.b5b4f3c7c421b22bc3fa.js +2 -0
- package/build/dist/{214.b5982f0f1d367b0cf250.js → 214.c7b5e98c50aad2e909e8.js} +2 -2
- package/build/dist/245.d55323707361aa01b479.js +2 -0
- package/build/dist/{247.024df5bffa6d7d81409b.js → 247.b933248752fc7a237d5b.js} +2 -2
- package/build/dist/{27.53a424e0af4ae35c9d08.js → 27.400b810abd623461be7e.js} +2 -2
- package/build/dist/29.ee4b96cc9795a102c731.js +2 -0
- package/build/dist/{296.ca2ea54f4a612600255d.js → 296.952ce4abf5d35c8dc178.js} +2 -2
- package/build/dist/308.0f217c7d43edf05d3ac1.js +2 -0
- package/build/dist/377.4333014a77752daa03c5.js +2 -0
- package/build/dist/{402.e6e6f416b6be3f9c0544.js → 402.dd9739c901620fca148e.js} +2 -2
- package/build/dist/441.d5fac54c44eebe3daf39.js +2 -0
- package/build/dist/488.905be404d0c56f0670d6.js +2 -0
- package/build/dist/{502.ca82d5437c1f450f77d7.js → 502.1a98387d7790e9366c86.js} +2 -2
- package/build/dist/{542.ac5f498510943d96bd1a.js → 542.8bb8a93ba9aa1759d85e.js} +2 -2
- package/build/dist/584.6d8d1690fa1c518714b0.js +2 -0
- package/build/dist/603.7217c0bd2aed442c0820.js +2 -0
- package/build/dist/636.545a51ee06d7662cb778.js +2 -0
- package/build/dist/659.c986fbf168c86fa50dba.js +2 -0
- package/build/dist/{661.bbe2069c38534a919223.js → 661.a2ef7762262fae92e102.js} +2 -2
- package/build/dist/690.8598c948f49bdc4ca810.js +2 -0
- package/build/dist/692.8925f59f0d91334c080a.js +1 -0
- package/build/dist/{704.93dd342435087dfa4c10.js → 704.0e40582259e36e16846a.js} +2 -2
- package/build/dist/714.a7a84494f1e9af1591db.js +2 -0
- package/build/dist/759.34df0c3c4b1e16503c04.js +2 -0
- package/build/dist/{811.b651f0b78f8dc24da0ff.js → 811.34161e8c46d2cfbcfbee.js} +2 -2
- package/build/dist/84.2cc87efebc8294111bb5.js +2 -0
- package/build/dist/{903.90782cbd7ea1a83206e3.js → 903.2a636ed6c19c1ba80fa5.js} +1 -1
- package/build/dist/{91.85d2728c06c427bf4e25.js → 91.6bfd78afec8b2d3019c0.js} +1 -1
- package/build/dist/923.a2b8f11453534afe4f9e.js +1 -0
- package/build/dist/931.f0add425e14d73f96d15.js +2 -0
- package/build/dist/{943.21f95e5852b774d5ea50.js → 943.9420ca5a31aca56e36af.js} +2 -2
- package/build/dist/{962.b57a462fb415d5f3a8af.js → 962.a01d935236eddfcd5325.js} +2 -2
- package/build/dist/963.516a1438dea44de07374.js +2 -0
- package/build/dist/963.516a1438dea44de07374.js.LICENSE.txt +1 -0
- package/build/dist/index.html +1 -1
- package/build/dist/main.1625ba191e88a8e297c1.js +2 -0
- package/build/main.js +1 -1
- package/package.json +1 -1
- package/build/dist/10.3cae34a0a51efbbdf037.js +0 -1
- package/build/dist/181.802385cb2535220f3821.js +0 -2
- package/build/dist/29.33dd0fc62ee34750a9a6.js +0 -2
- package/build/dist/308.4381e0f200ac6fa45936.js +0 -2
- package/build/dist/377.e2490b44f0ff85fdcb8c.js +0 -2
- package/build/dist/441.415bad44726b9147d451.js +0 -2
- package/build/dist/53.497b03335da0f0ae730a.js +0 -2
- package/build/dist/584.ed8e90c60b6bb075b893.js +0 -2
- package/build/dist/603.000b1e7fabd563443b56.js +0 -2
- package/build/dist/636.7baec6fc866ed96dab0d.js +0 -2
- package/build/dist/659.f7dbe6534e8eea39b69a.js +0 -2
- package/build/dist/690.86d5623d460512252951.js +0 -2
- package/build/dist/759.7e32f38374a01f5957ff.js +0 -2
- package/build/dist/84.b2f4bbd47cc661ac6c05.js +0 -2
- package/build/dist/916.9613bd081a0e66ce4683.js +0 -1
- package/build/dist/923.b91c334a82f869e8419e.js +0 -1
- package/build/dist/931.e442bfb7b59e3e241c55.js +0 -2
- package/build/dist/963.fbce0a4701e26f2746df.js +0 -2
- package/build/dist/984.a6ec3f5b3d39e3265ad7.js +0 -2
- package/build/dist/main.eed3c487b877c12bb0f8.js +0 -2
- /package/build/dist/{181.802385cb2535220f3821.js.LICENSE.txt → 181.b5b4f3c7c421b22bc3fa.js.LICENSE.txt} +0 -0
- /package/build/dist/{214.b5982f0f1d367b0cf250.js.LICENSE.txt → 214.c7b5e98c50aad2e909e8.js.LICENSE.txt} +0 -0
- /package/build/dist/{247.024df5bffa6d7d81409b.js.LICENSE.txt → 245.d55323707361aa01b479.js.LICENSE.txt} +0 -0
- /package/build/dist/{27.53a424e0af4ae35c9d08.js.LICENSE.txt → 247.b933248752fc7a237d5b.js.LICENSE.txt} +0 -0
- /package/build/dist/{29.33dd0fc62ee34750a9a6.js.LICENSE.txt → 27.400b810abd623461be7e.js.LICENSE.txt} +0 -0
- /package/build/dist/{296.ca2ea54f4a612600255d.js.LICENSE.txt → 29.ee4b96cc9795a102c731.js.LICENSE.txt} +0 -0
- /package/build/dist/{308.4381e0f200ac6fa45936.js.LICENSE.txt → 296.952ce4abf5d35c8dc178.js.LICENSE.txt} +0 -0
- /package/build/dist/{377.e2490b44f0ff85fdcb8c.js.LICENSE.txt → 308.0f217c7d43edf05d3ac1.js.LICENSE.txt} +0 -0
- /package/build/dist/{402.e6e6f416b6be3f9c0544.js.LICENSE.txt → 377.4333014a77752daa03c5.js.LICENSE.txt} +0 -0
- /package/build/dist/{441.415bad44726b9147d451.js.LICENSE.txt → 402.dd9739c901620fca148e.js.LICENSE.txt} +0 -0
- /package/build/dist/{502.ca82d5437c1f450f77d7.js.LICENSE.txt → 441.d5fac54c44eebe3daf39.js.LICENSE.txt} +0 -0
- /package/build/dist/{53.497b03335da0f0ae730a.js.LICENSE.txt → 488.905be404d0c56f0670d6.js.LICENSE.txt} +0 -0
- /package/build/dist/{542.ac5f498510943d96bd1a.js.LICENSE.txt → 502.1a98387d7790e9366c86.js.LICENSE.txt} +0 -0
- /package/build/dist/{584.ed8e90c60b6bb075b893.js.LICENSE.txt → 542.8bb8a93ba9aa1759d85e.js.LICENSE.txt} +0 -0
- /package/build/dist/{603.000b1e7fabd563443b56.js.LICENSE.txt → 584.6d8d1690fa1c518714b0.js.LICENSE.txt} +0 -0
- /package/build/dist/{636.7baec6fc866ed96dab0d.js.LICENSE.txt → 603.7217c0bd2aed442c0820.js.LICENSE.txt} +0 -0
- /package/build/dist/{659.f7dbe6534e8eea39b69a.js.LICENSE.txt → 636.545a51ee06d7662cb778.js.LICENSE.txt} +0 -0
- /package/build/dist/{661.bbe2069c38534a919223.js.LICENSE.txt → 659.c986fbf168c86fa50dba.js.LICENSE.txt} +0 -0
- /package/build/dist/{690.86d5623d460512252951.js.LICENSE.txt → 661.a2ef7762262fae92e102.js.LICENSE.txt} +0 -0
- /package/build/dist/{704.93dd342435087dfa4c10.js.LICENSE.txt → 690.8598c948f49bdc4ca810.js.LICENSE.txt} +0 -0
- /package/build/dist/{759.7e32f38374a01f5957ff.js.LICENSE.txt → 704.0e40582259e36e16846a.js.LICENSE.txt} +0 -0
- /package/build/dist/{811.b651f0b78f8dc24da0ff.js.LICENSE.txt → 714.a7a84494f1e9af1591db.js.LICENSE.txt} +0 -0
- /package/build/dist/{84.b2f4bbd47cc661ac6c05.js.LICENSE.txt → 759.34df0c3c4b1e16503c04.js.LICENSE.txt} +0 -0
- /package/build/dist/{931.e442bfb7b59e3e241c55.js.LICENSE.txt → 811.34161e8c46d2cfbcfbee.js.LICENSE.txt} +0 -0
- /package/build/dist/{962.b57a462fb415d5f3a8af.js.LICENSE.txt → 84.2cc87efebc8294111bb5.js.LICENSE.txt} +0 -0
- /package/build/dist/{963.fbce0a4701e26f2746df.js.LICENSE.txt → 931.f0add425e14d73f96d15.js.LICENSE.txt} +0 -0
- /package/build/dist/{943.21f95e5852b774d5ea50.js.LICENSE.txt → 943.9420ca5a31aca56e36af.js.LICENSE.txt} +0 -0
- /package/build/dist/{984.a6ec3f5b3d39e3265ad7.js.LICENSE.txt → 962.a01d935236eddfcd5325.js.LICENSE.txt} +0 -0
- /package/build/dist/{main.eed3c487b877c12bb0f8.js.LICENSE.txt → main.1625ba191e88a8e297c1.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 441.d5fac54c44eebe3daf39.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[441],{7481(e,t,n){n.d(t,{S:()=>i,X:()=>c});var r=n(6540);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(e){var t,n=o(r.useState([]),2),a=n[0],c=n[1];return(0,r.useEffect)(function(){e.children?c(Array.isArray(e.children)?e.children:[e.children]):c(e.rows)},[e.rows,e.children]),r.createElement("table",null,r.createElement("thead",null,r.createElement("tr",null,null===(t=e.headers)||void 0===t?void 0:t.map(function(e,t){return r.createElement("th",{key:t},e)}))),r.createElement("tbody",null,a.map(function(t,n){return r.createElement("tr",{key:n,onContextMenu:function(){e.handleContextMenu&&e.handleContextMenu(t)}},t.map(function(n,o){var a;return r.createElement("td",{style:{width:null!==(a=e.width)&&void 0!==a?a:"auto"},key:o,className:o===t.length-1?"small":""},n)}))})))}function i(e){return r.createElement("div",{style:{display:e.isFlex?"flex":"block"}},e.columns.map(function(e,t){return r.createElement("div",{key:t},e)}))}},8062(e,t,n){n.d(t,{A:()=>i});var r=n(6540);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(null,arguments)}function a(e){return r.createElement("div",{className:"black-tip",onClick:function(){e.click&&e.click(e)},onContextMenu:function(t){t.stopPropagation(),t.nativeEvent.stopImmediatePropagation(),e.onContextMenu&&e.onContextMenu(t,e)}},e.name)}var c=function(e){return r.createElement("li",null,e.click?r.createElement(a,o({},e.node,{name:e.render?e.render(e.node):e.node.name,click:e.click,onContextMenu:e.onContextMenu})):r.createElement("div",null,e.render?e.render(e.node):e.node.name),e.node.children&&e.node.children.length>0&&r.createElement("ul",null,e.node.children.map(function(t,n){return r.createElement(c,{key:n,node:t,click:e.click,onContextMenu:e.onContextMenu,render:e.render})})))};const i=function(e){return r.createElement("div",{className:"card-tree-view"},r.createElement("ul",null,e.list&&e.list.map(function(t,n){return r.createElement(c,{key:n,node:t,click:e.click,onContextMenu:e.onContextMenu,render:e.render})})))}},3441(e,t,n){n.r(t),n.d(t,{default:()=>dt});var r=n(6540),o=n(5725),a=n(447),c=n(6349);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const l=function(e){var t=e.percentage,n=(0,r.useRef)(null),o=i((0,r.useState)(null),2),a=o[0],u=o[1];return(0,r.useEffect)(function(){var e=n.current.getContext("2d"),r=new c.Ay(e,{type:"doughnut",data:{labels:["use","left"],datasets:[{data:[t,100-t],backgroundColor:["#007bff","#f0f0f0"],borderWidth:0}]},options:{plugins:{legend:{display:!1},tooltip:{enabled:!1}},elements:{arc:{borderWidth:0}}}});return u(r),function(){r.destroy()}},[]),(0,r.useEffect)(function(){a&&(a.data.datasets[0].data=[t,100-t],a.update())},[t]),r.createElement("div",{style:{width:"8rem",overflow:"hidden"}},r.createElement("canvas",{ref:n}))};var f=n(4188),s=n(4944),m=n(4284),d=n(7952),p=n(5997),y=n(7481),h=n(3459),v=n(2389),b=n(7444),E=n(6417),w=n(4777),g=n(2042);function S(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var u=r&&r.prototype instanceof i?r:i,l=Object.create(u.prototype);return _(l,"_invoke",function(n,r,o){var a,i,u,l=0,f=o||[],s=!1,m={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return a=t,i=0,u=e,m.n=n,c}};function d(n,r){for(i=n,u=r,t=0;!s&&l&&!o&&t<f.length;t++){var o,a=f[t],d=m.p,p=a[2];n>3?(o=p===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=d&&((o=n<2&&d<a[1])?(i=0,m.v=r,m.n=a[1]):d<p&&(o=n<3||a[0]>r||r>p)&&(a[4]=n,a[5]=r,m.n=p,i=0))}if(o||n>1)return c;throw s=!0,r}return function(o,f,p){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&d(f,p),i=f,u=p;(t=i<2?e:u)||!s;){a||(i?i<3?(i>1&&(m.n=-1),d(i,u)):m.n=u:m.v=u);try{if(l=2,a){if(i||(o="next"),t=a[o]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,i<2&&(i=0)}else 1===i&&(t=a.return)&&t.call(a),i<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=e}else if((t=(s=m.n<0)?u:n.call(r,m))!==c)break}catch(t){a=e,i=1,u=t}finally{l=1}}return{value:t,done:s}}}(n,o,a),!0),l}var c={};function i(){}function u(){}function l(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(_(t={},r,function(){return this}),t),s=l.prototype=i.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,_(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return u.prototype=l,_(s,"constructor",l),_(l,"constructor",u),u.displayName="GeneratorFunction",_(l,o,"GeneratorFunction"),_(s),_(s,o,"Generator"),_(s,r,function(){return this}),_(s,"toString",function(){return"[object Generator]"}),(S=function(){return{w:a,m}})()}function _(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}_=function(e,t,n,r){function a(t,n){_(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},_(e,t,n,r)}function x(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=j(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){i=!0,a=e},f:function(){try{c||null==n.return||n.return()}finally{if(i)throw a}}}}function k(e,t,n,r,o,a,c){try{var i=e[a](c),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(r,o)}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw o}}return i}}(e,t)||j(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(e,t){if(e){if("string"==typeof e)return O(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(e,t):void 0}}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function P(e){var t=(0,v.Bd)().t,n=A((0,b.L4)(E.AG.disk),2),c=(n[0],n[1]),i=A((0,r.useState)({}),2),u=i[0],l=i[1],f=A((0,r.useState)([]),2),s=f[0],w=f[1],g=[t("名字"),t("当前值"),t("历史最低"),t("临界值")],_=function(){var n,o=(n=S().m(function n(){var o,a,c,i,u,f,s;return S().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,m.Yu.post("sys/disk/info",{name:e.name});case 1:if((o=n.v).code===h.m.Success){c=[],i=x(null!==(a=o.data.ata_smart_attributes)&&void 0!==a?a:[]);try{for(i.s();!(u=i.n()).done;)f=u.value,s=void 0,f[1]>=f[2]?s="var(--icon-green)":f[1]<=f[3]&&(s="var(--icon-red)"),f[0]=r.createElement("span",{style:{color:s}},t(f[0])),c.push(f)}catch(e){i.e(e)}finally{i.f()}w(o.data.ata_smart_attributes),l(o.data)}case 2:return n.a(2)}},n)}),function(){var e=this,t=arguments;return new Promise(function(r,o){var a=n.apply(e,t);function c(e){k(a,r,o,c,i,"next",e)}function i(e){k(a,r,o,c,i,"throw",e)}c(void 0)})});return function(){return o.apply(this,arguments)}}();return(0,r.useEffect)(function(){_()},[]),r.createElement("div",null,r.createElement(d.A,null,r.createElement(p.rA,{icon:"close",title:t("关闭"),onClick:function(){c({})}})),r.createElement(o.jW,{isFull:!0,more:!0},r.createElement(o.NN,null,r.createElement(o.fI,null,r.createElement(o.VP,{widthPer:30},r.createElement(o.xh,null,r.createElement(a.Zp,{title:t("基本信息")},r.createElement(o.Yh,{left:t("名字"),right:e.name}),r.createElement(o.Yh,{left:t("厂商名称"),right:e.typeName}),r.createElement(o.Yh,{left:t("类型"),right:e.type}),r.createElement(o.Yh,{left:t("容量"),right:e.total}))),r.createElement(o.xh,null,r.createElement(a.Zp,{title:t("物理信息")},r.createElement(o.Yh,{left:t("是否健康"),right:!0===u.smart_status?"是":"否"}),r.createElement(o.Yh,{left:t("设备型号"),right:u.model_name}),r.createElement(o.Yh,{left:t("序列号"),right:u.serial_number}),r.createElement(o.Yh,{left:t("固件版本"),right:u.firmware_version}),r.createElement(o.Yh,{left:t("转速(每分钟)"),right:u.rotation_rate}),r.createElement(o.Yh,{left:t("通电时长(小时)"),right:u.power_on_time_hours}),r.createElement(o.Yh,{left:t("通电次数"),right:u.power_cycle_count}),r.createElement(o.Yh,{left:t("温度(°C)"),right:u.temperature}),r.createElement(o.Yh,{left:t("通信协议"),right:u.device_protocol})))),r.createElement(o.VP,{widthPer:50},r.createElement(o.xh,null,null!=s&&s.length?r.createElement(a.uF,{title:t("ATA/SATA详细信息")},r.createElement(y.X,{headers:g,rows:s,width:"10rem"})):r.createElement(r.Fragment,null),u.nvme_smart?r.createElement(a.Zp,{title:t("NVME详细信息")},r.createElement(o.Yh,{left:t("NVMe 可用备用块(%)"),right:u.nvme_smart.available_spare}),r.createElement(o.Yh,{left:t("NVMe 已使用寿命(%)"),right:u.nvme_smart.percentage_used}),r.createElement(o.Yh,{left:t("NVMe 读取量"),right:u.nvme_smart.data_units_read}),r.createElement(o.Yh,{left:t("NVMe 写入量"),right:u.nvme_smart.data_units_written}),r.createElement(o.Yh,{left:t("NVMe 通电次数"),right:u.nvme_smart.power_cycles}),r.createElement(o.Yh,{left:t("NVMe 通电时长(小时)"),right:u.nvme_smart.power_on_hours}),r.createElement(o.Yh,{left:t("NVMe 非正常关机"),right:u.nvme_smart.unsafe_shutdowns}),r.createElement(o.Yh,{left:t("NVMe 媒体错误"),right:u.nvme_smart.media_errors}),r.createElement(o.Yh,{left:t("NVMe 错误日志数"),right:u.nvme_smart.num_err_log_entries})):r.createElement(r.Fragment,null)))))))}var I=function(e){return e[e.mount=0]="mount",e}({}),T=n(8062),C=n(8247),F=n(3430);function G(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=H(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){i=!0,a=e},f:function(){try{c||null==n.return||n.return()}finally{if(i)throw a}}}}function M(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var u=r&&r.prototype instanceof i?r:i,l=Object.create(u.prototype);return V(l,"_invoke",function(n,r,o){var a,i,u,l=0,f=o||[],s=!1,m={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return a=t,i=0,u=e,m.n=n,c}};function d(n,r){for(i=n,u=r,t=0;!s&&l&&!o&&t<f.length;t++){var o,a=f[t],d=m.p,p=a[2];n>3?(o=p===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=d&&((o=n<2&&d<a[1])?(i=0,m.v=r,m.n=a[1]):d<p&&(o=n<3||a[0]>r||r>p)&&(a[4]=n,a[5]=r,m.n=p,i=0))}if(o||n>1)return c;throw s=!0,r}return function(o,f,p){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&d(f,p),i=f,u=p;(t=i<2?e:u)||!s;){a||(i?i<3?(i>1&&(m.n=-1),d(i,u)):m.n=u:m.v=u);try{if(l=2,a){if(i||(o="next"),t=a[o]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,i<2&&(i=0)}else 1===i&&(t=a.return)&&t.call(a),i<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=e}else if((t=(s=m.n<0)?u:n.call(r,m))!==c)break}catch(t){a=e,i=1,u=t}finally{l=1}}return{value:t,done:s}}}(n,o,a),!0),l}var c={};function i(){}function u(){}function l(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(V(t={},r,function(){return this}),t),s=l.prototype=i.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,V(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return u.prototype=l,V(s,"constructor",l),V(l,"constructor",u),u.displayName="GeneratorFunction",V(l,o,"GeneratorFunction"),V(s),V(s,o,"Generator"),V(s,r,function(){return this}),V(s,"toString",function(){return"[object Generator]"}),(M=function(){return{w:a,m}})()}function V(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}V=function(e,t,n,r){function a(t,n){V(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},V(e,t,n,r)}function Y(e,t,n,r,o,a,c){try{var i=e[a](c),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(r,o)}function N(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function c(e){Y(a,r,o,c,i,"next",e)}function i(e){Y(a,r,o,c,i,"throw",e)}c(void 0)})}}function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw o}}return i}}(e,t)||H(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(e,t){if(e){if("string"==typeof e)return K(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?K(e,t):void 0}}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var U=function(e){return r.createElement("div",{style:{border:"2px solid black",padding:"10px",width:"300px",height:"300px",position:"relative"}},e.name,e.lvms.map(function(e,t){return r.createElement("div",{key:t,style:{margin:"5px",height:"".concat(40,"px"),display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid "}},e.name)}))};function $(){return r.createElement("div",{style:{position:"relative",height:"300px",margin:"10px",width:"30px",display:"flex",alignItems:"center",justifyContent:"center"}},r.createElement("div",{style:{width:0,height:0,borderTop:"10px solid transparent",borderBottom:"10px solid transparent",borderLeft:"10px solid black"}}))}function W(){var e=(0,v.Bd)().t,t=L((0,b.L4)(E.AG.disk),2),n=(t[0],t[1]),c=L((0,r.useState)({}),2),i=(c[0],c[1],L((0,r.useState)([]),2)),u=i[0],l=i[1],f=L((0,r.useState)([]),2),s=f[0],w=f[1],S=L((0,b.L4)(E.AG.showPrompt),2),_=(S[0],S[1],(0,C.MH)().check_user_auth),x=L((0,r.useState)([]),2),k=x[0],A=(x[1],(0,C.kZ)().click_file),j=L((0,b.L4)(E.AG.prompt_card),2),O=(j[0],j[1]),P=[e("挂载点"),"uuid",e("类型"),e("文件系统类型"),e("文件系统容量"),e("卷容量"),e("设备路径"),e("分区表类型")],V=function(){var e=N(M().m(function e(){var t;return M().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,m.Yu.get("disk/blk");case 1:return(t=e.v).code===h.m.Success&&l(t.data),e.a(2,t.code)}},e)}));return function(){return e.apply(this,arguments)}}(),Y=function(){var e=N(M().m(function e(){return M().w(function(e){for(;;)switch(e.n){case 0:V();case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();(0,r.useEffect)(function(){Y()},[]);var H=[r.createElement(p.rA,{icon:"info",title:e("提示"),onClick:N(M().m(function e(){return M().w(function(e){for(;;)switch(e.n){case 0:O({open:!0,title:"信息",context_div:r.createElement("div",null,r.createElement("ul",null,r.createElement("li",null,"通用格式:","<文件系统> <挂载点> <类型> <挂载选项> <dump> <fsck> "),r.createElement("li",null,"文件系统,有多种格式",r.createElement("ul",null,r.createElement("li",null,"1(usb口默认名称)./dev/sda1"),r.createElement("li",null,"2(唯一Id).UUID=123e4567-e89b-12d3-a456-426614174000"),r.createElement("li",null,"3.LABEL=DATA"))),r.createElement("li",null,"挂载点,就是文件路径,例如 /mnt/data ,这个目录要提前创建,且为空"),r.createElement("li",null,"类型,就是文件系统类型,对于系统不支持的类型,例如ntfs需要额外前提安装ntfs-3g"),r.createElement("li",null,'挂载选项的值只能是以下这些,可以用 "," 同时使用多个选项',r.createElement("ul",null,r.createElement("li",null,"defaults:使用默认挂载选项"),r.createElement("li",null,"noatime:不更新访问时间,提高性能"),r.createElement("li",null,"auto:系统启动时自动挂载"),r.createElement("li",null,"rw:以读写方式挂载"),r.createElement("li",null,"nofail:防止启动阻塞,挂载失败系统继续执行"),r.createElement("li",null,"...等"))),r.createElement("li",null,"dump 0是需要备份 1是不需要备份"),r.createElement("li",null,"Fsck 整数值0是不检查,文件系统检查顺序越小越先检查"),r.createElement("li",null,"提示:只有含有文件系统的逻辑卷,或者分区才可以进行挂载。")))});case 1:return e.a(2)}},e)}))}),r.createElement(p.rA,{key:1,icon:"update",title:e("更新挂载"),onClick:N(M().m(function e(){return M().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,m.Yu.post("cmd/exe",{type:I.mount});case 1:e.v.code===h.m.Success&&(0,g.LW)("挂载文件已生效");case 2:return e.a(2)}},e)}))})],K=function(){var e=N(M().m(function e(){var t;return M().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,m.Yu.get("get_fstab");case 1:return t=e.v,e.a(2,t.data)}},e)}));return function(){return e.apply(this,arguments)}}(),W=function(){var e=N(M().m(function e(t){return M().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,m.Yu.post("save_fstab",{content:t});case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(d.A,null,r.createElement(p.rA,{icon:"close",title:e("关闭"),onClick:function(){n({})}})),r.createElement(o.jW,{isFull:!0,more:!0},r.createElement(o.NN,null,r.createElement(o.fI,null,r.createElement(o.VP,{widthPer:40},r.createElement(a.Zp,{title:e("物理块(硬盘)设备、逻辑卷、物理卷"),titleCom:r.createElement("div",null,_(F.oV.sys_disk_mount)&&r.createElement(p.rA,{icon:"file_open",title:e("打开挂载文件"),onClick:N(M().m(function e(){return M().w(function(e){for(;;)switch(e.n){case 0:A({name:"fstab(谨慎修改,内容错误会导致系统无法启动)",model:"text",get_file_fun:K,save_file_fun:W,menu_list:H});case 1:return e.a(2)}},e)}))}),r.createElement(p.rA,{icon:"update",title:e("刷新"),onClick:N(M().m(function e(){var t,n;return M().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,V();case 1:if(t=e.v,n=h.m.Success,t!==n){e.n=2;break}(0,g.LW)("刷新成功");case 2:return e.a(2)}},e)}))}))},r.createElement(y.X,{headers:P,rows:s,width:"10rem"}),r.createElement(T.A,{list:u,render:function(e){var t=e.name;return e.label&&(t+="(".concat(e.label,")")),e.mountpoint?r.createElement("span",null,t,r.createElement("span",{style:{color:"green"}},"(已挂载)")):t},onContextMenu:function(e,t){e.preventDefault()},click:function(t){var n="";if(t.mountpoint)for(var o=0;o<t.mountpoints.length;o++)n+=t.mountpoints[o]+";";w([[r.createElement(a.xP,null,n),r.createElement(a.xP,null,t.uuid),e(t.type),e(t.fstype),t.fssize,t.size,r.createElement(a.xP,null,t.path),t.pttype]])}}))),r.createElement(o.VP,{widthPer:60},k.map(function(t,n){var c,i=[],u=G(t.pv_list);try{for(u.s();!(c=u.n()).done;){var l=c.value;i.push({name:"".concat(l.name,"---(").concat(l.size,")---(").concat(l.free_size,")")})}}catch(e){u.e(e)}finally{u.f()}var f,s=[],m=G(t.lv_list);try{for(m.s();!(f=m.n()).done;){var d=f.value;s.push({name:"".concat(d.name,"---(").concat(d.size,")")})}}catch(e){m.e(e)}finally{m.f()}return r.createElement(a.Zp,{key:n},r.createElement(o.n5,null,r.createElement(U,{name:e("物理卷"),lvms:i}),r.createElement($,null),r.createElement(U,{name:"".concat(e("逻辑卷"),"---(").concat(t.name,")---size(").concat(t.size,")"),lvms:[]}),r.createElement($,null),r.createElement(U,{name:e("逻辑卷"),lvms:s})))}))))))}var Z=n(8815);function B(e){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B(e)}function z(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(B(e)+" is not iterable")}function X(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ee(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){i=!0,a=e},f:function(){try{c||null==n.return||n.return()}finally{if(i)throw a}}}}function q(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var u=r&&r.prototype instanceof i?r:i,l=Object.create(u.prototype);return D(l,"_invoke",function(n,r,o){var a,i,u,l=0,f=o||[],s=!1,m={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return a=t,i=0,u=e,m.n=n,c}};function d(n,r){for(i=n,u=r,t=0;!s&&l&&!o&&t<f.length;t++){var o,a=f[t],d=m.p,p=a[2];n>3?(o=p===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=d&&((o=n<2&&d<a[1])?(i=0,m.v=r,m.n=a[1]):d<p&&(o=n<3||a[0]>r||r>p)&&(a[4]=n,a[5]=r,m.n=p,i=0))}if(o||n>1)return c;throw s=!0,r}return function(o,f,p){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&d(f,p),i=f,u=p;(t=i<2?e:u)||!s;){a||(i?i<3?(i>1&&(m.n=-1),d(i,u)):m.n=u:m.v=u);try{if(l=2,a){if(i||(o="next"),t=a[o]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,i<2&&(i=0)}else 1===i&&(t=a.return)&&t.call(a),i<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=e}else if((t=(s=m.n<0)?u:n.call(r,m))!==c)break}catch(t){a=e,i=1,u=t}finally{l=1}}return{value:t,done:s}}}(n,o,a),!0),l}var c={};function i(){}function u(){}function l(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(D(t={},r,function(){return this}),t),s=l.prototype=i.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,D(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return u.prototype=l,D(s,"constructor",l),D(l,"constructor",u),u.displayName="GeneratorFunction",D(l,o,"GeneratorFunction"),D(s),D(s,o,"Generator"),D(s,r,function(){return this}),D(s,"toString",function(){return"[object Generator]"}),(q=function(){return{w:a,m}})()}function D(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}D=function(e,t,n,r){function a(t,n){D(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},D(e,t,n,r)}function J(e,t,n,r,o,a,c){try{var i=e[a](c),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(r,o)}function R(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function c(e){J(a,r,o,c,i,"next",e)}function i(e){J(a,r,o,c,i,"throw",e)}c(void 0)})}}function Q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw o}}return i}}(e,t)||ee(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ee(e,t){if(e){if("string"==typeof e)return te(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?te(e,t):void 0}}function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ne=!0;function re(e){var t=(0,v.Bd)().t,n=[t("名字"),t("厂商名称"),t("类型"),t("容量")],c=[t("名字"),t("物理硬盘"),t("文件系统类型"),t("挂载位置"),t("总容量"),t("剩余容量")],i=Q((0,b.L4)(E.AG.user_base_info),2),u=i[0],S=(i[1],Q((0,r.useState)(0),2)),_=S[0],x=S[1],k=Q((0,r.useState)(0),2),A=k[0],j=k[1],O=Q((0,r.useState)(0),2),I=O[0],T=O[1],C=Q((0,r.useState)(0),2),G=C[0],M=C[1],V=Q((0,r.useState)(0),2),Y=V[0],N=V[1],L=Q((0,r.useState)({}),2),H=L[0],K=L[1],U=Q((0,r.useState)(!1),2),$=U[0],B=U[1],D=Q((0,r.useState)(!1),2),J=D[0],ee=D[1],te=Q((0,r.useState)(!1),2),re=te[0],oe=te[1],ae=Q((0,r.useState)(ne),2),ce=ae[0],ie=ae[1],ue=Q((0,r.useState)(null),2),le=ue[0],fe=ue[1],se=Q((0,r.useState)([]),2),me=se[0],de=se[1],pe=Q((0,r.useState)([]),2),ye=pe[0],he=pe[1],ve=Q((0,b.L4)(E.AG.user_base_info),2),be=ve[0],Ee=(ve[1],Q((0,b.L4)(E.AG.disk),2)),we=Ee[0],ge=Ee[1],Se=function(){var e=R(q().m(function e(){var t;return q().w(function(e){for(;;)switch(e.n){case 0:if(ne){e.n=1;break}return e.a(2);case 1:return t=new f.hf(f.HK.sys_get),e.n=2,s.ws.send(t);case 2:s.ws.addMsg(f.HK.sys_getting,function(e){var t,n,r,o,a;M(null===(t=e.context)||void 0===t?void 0:t.cpu_currentLoad);var c=null===(n=e.context)||void 0===n?void 0:n.memLeft,i=null===(r=e.context)||void 0===r?void 0:r.memTotal;j(c),T(i),x((i-c)/i*100),fe(null===(o=e.context)||void 0===o?void 0:o.node_memory_usage),N(null===(a=e.context)||void 0===a?void 0:a.node_cpu_usage)});case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),_e=function(){var e=R(q().m(function e(){return q().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Se();case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),xe=function(){var e=R(q().m(function e(){var t,n;return q().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,m.Yu.get("base");case 1:(t=e.v).code===h.m.Success&&(n=t.data,K(n));case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),ke=function(){var e=R(q().m(function e(){var n,o,c,i,u,l,f,s;return q().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.n=1,m.Yu.get("disk");case 1:if((n=e.v).code!==h.m.Success){e.n=9;break}o=n.data,c=[],i=!0,be.sysSoftWare&&be.sysSoftWare[w.jk.smartmontools]&&be.sysSoftWare[w.jk.smartmontools].installed||(i=!1),u=X(null!=o?o:[]),e.p=2,f=q().m(function e(){var n;return q().w(function(e){for(;;)switch(e.n){case 0:n=l.value,c.push([r.createElement(a.xP,{context:n.name}),n.typeName,n.type,n.total,r.createElement(p.rA,{icon:"health_and_safety",title:t("查看健康信息"),onClick:function(){i?ge({type:"check",data:n}):(0,g.zN)("没有安装smartmontools")}})]);case 1:return e.a(2)}},e)}),u.s();case 3:if((l=u.n()).done){e.n=5;break}return e.d(z(f()),4);case 4:e.n=3;break;case 5:e.n=7;break;case 6:e.p=6,s=e.v,u.e(s);case 7:return e.p=7,u.f(),e.f(7);case 8:de(c);case 9:return e.a(2)}},e,null,[[2,6,7,8]])}));return function(){return e.apply(this,arguments)}}(),Ae=function(){var e=R(q().m(function e(){var t,n,o,c,i,u;return q().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,m.Yu.get("filedisk");case 1:if((t=e.v).code===h.m.Success){n=t.data,o=[],c=X(null!=n?n:[]);try{for(c.s();!(i=c.n()).done;)u=i.value,o.push([r.createElement(a.xP,{context:u.name}),r.createElement(a.xP,{context:u.device_name}),u.fsType,r.createElement(a.xP,{context:u.mount}),u.total,u.available])}catch(e){c.e(e)}finally{c.f()}he(o)}case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return(0,r.useEffect)(function(){return _e(),function(){s.ws.sendData(f.HK.sys_cancel,{})}},[]),r.createElement("div",null,r.createElement(d.A,null,u.sys===F.XM.linux&&r.createElement(p.rA,{icon:"sd_card",title:"硬盘挂载",onClick:function(){ge({type:"mount"})}}),r.createElement(p.Z$,{defaultStatus:!1,text:t("基本信息"),clickFun:function(e){B(e),e&&xe()}}),r.createElement(p.Z$,{defaultStatus:!1,text:t("物理硬盘"),clickFun:function(e){ee(e),e&&ke()}}),r.createElement(p.Z$,{defaultStatus:!1,text:t("文件硬盘"),clickFun:function(e){oe(e),e&&Ae()}}),r.createElement(p.Z$,{defaultStatus:ce,text:t("实时信息"),clickFun:function(e){ie(e),ne=e,Se()}})),r.createElement(o.xh,null,ce&&r.createElement(o.fI,null,r.createElement(o.VP,{widthPer:33},r.createElement(a.Zp,{title:"Sys "+t("内存")},r.createElement(o.fI,null,r.createElement(o.VP,null,r.createElement(l,{percentage:_})),r.createElement(o.VP,null,r.createElement(o.fI,null,r.createElement(o.VP,{widthPer:100},r.createElement("div",null,r.createElement(o.Yh,{left:t("总容量"),center:"".concat(I,"G")}))),r.createElement(o.VP,{widthPer:100},r.createElement(o.Yh,{left:t("剩余"),center:"".concat(A,"G")}))))))),r.createElement(o.VP,{widthPer:33},r.createElement(a.Zp,{title:"Sys cpu"},r.createElement(o.fI,null,r.createElement(o.VP,null,r.createElement(l,{percentage:G})),r.createElement(o.VP,null,r.createElement(o.fI,null,r.createElement(o.Yh,{left:t("使用率"),center:G})))))),r.createElement(o.VP,{widthPer:33},r.createElement(a.Zp,{title:"FileCat"},r.createElement(o.fI,null,r.createElement(o.VP,null,r.createElement(o.qV,{content:t("内存")}),r.createElement(o.qV,{content:"total: "+(0,Z.v7)(null==le?void 0:le.rss)}),r.createElement(o.qV,{content:"object: "+(0,Z.v7)(null==le?void 0:le.heapTotal)}),r.createElement(o.qV,{content:"obj-use: "+(0,Z.v7)(null==le?void 0:le.heapUsed)}),r.createElement(o.qV,{content:"external: "+(0,Z.v7)(null==le?void 0:le.external)}),r.createElement(o.qV,{content:"buffer: "+(0,Z.v7)(null==le?void 0:le.arrayBuffers)})),r.createElement(o.VP,null,r.createElement(o.qV,{content:"cpu growth rate: "+Y})))))),r.createElement(o.fI,null,$&&r.createElement(o.VP,null,r.createElement(a.Zp,{title:t("基本信息")},r.createElement(o.Yh,{left:t("总内存"),right:H.mem_total}),r.createElement(o.Yh,{left:"cpu ".concat(t("制造商")),right:H.cpu_manufacturer}),r.createElement(o.Yh,{left:"cpu ".concat(t("品牌")),right:H.cpu_brand}),r.createElement(o.Yh,{left:"cpu ".concat(t("逻辑核心")),right:H.cpu_core_num}),r.createElement(o.Yh,{left:"cpu ".concat(t("物理核心")),right:H.cpu_phy_core_num}),r.createElement(o.Yh,{left:"cpu ".concat(t("最大"),"hz"),right:H.cpu_speed_hz}),r.createElement(o.Yh,{left:"".concat(t("当前系统"),":pid;ppid"),right:H.pid_ppid}),r.createElement(o.Yh,{left:t("运行用户"),right:H.user}))),J&&r.createElement(o.VP,null,r.createElement(a.uF,{title:t("物理硬盘")},r.createElement(y.X,{headers:n,rows:me,width:"10rem"}))),re&&r.createElement(o.VP,null,r.createElement(a.uF,{title:t("文件硬盘")},r.createElement(y.X,{headers:c,rows:ye,width:"10rem"}))))),we&&"check"===we.type&&r.createElement(P,we.data),we&&"mount"===we.type&&r.createElement(W,null))}function oe(e){return r.createElement("h2",{className:"message"},r.createElement("i",{className:"material-icons"},"sentiment_dissatisfied"),r.createElement("span",null,e.context))}var ae=n(3033),ce=n(7856),ie=n(4405);function ue(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var u=r&&r.prototype instanceof i?r:i,l=Object.create(u.prototype);return le(l,"_invoke",function(n,r,o){var a,i,u,l=0,f=o||[],s=!1,m={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return a=t,i=0,u=e,m.n=n,c}};function d(n,r){for(i=n,u=r,t=0;!s&&l&&!o&&t<f.length;t++){var o,a=f[t],d=m.p,p=a[2];n>3?(o=p===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=d&&((o=n<2&&d<a[1])?(i=0,m.v=r,m.n=a[1]):d<p&&(o=n<3||a[0]>r||r>p)&&(a[4]=n,a[5]=r,m.n=p,i=0))}if(o||n>1)return c;throw s=!0,r}return function(o,f,p){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&d(f,p),i=f,u=p;(t=i<2?e:u)||!s;){a||(i?i<3?(i>1&&(m.n=-1),d(i,u)):m.n=u:m.v=u);try{if(l=2,a){if(i||(o="next"),t=a[o]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,i<2&&(i=0)}else 1===i&&(t=a.return)&&t.call(a),i<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=e}else if((t=(s=m.n<0)?u:n.call(r,m))!==c)break}catch(t){a=e,i=1,u=t}finally{l=1}}return{value:t,done:s}}}(n,o,a),!0),l}var c={};function i(){}function u(){}function l(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(le(t={},r,function(){return this}),t),s=l.prototype=i.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,le(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return u.prototype=l,le(s,"constructor",l),le(l,"constructor",u),u.displayName="GeneratorFunction",le(l,o,"GeneratorFunction"),le(s),le(s,o,"Generator"),le(s,r,function(){return this}),le(s,"toString",function(){return"[object Generator]"}),(ue=function(){return{w:a,m}})()}function le(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}le=function(e,t,n,r){function a(t,n){le(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},le(e,t,n,r)}function fe(e,t,n,r,o,a,c){try{var i=e[a](c),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(r,o)}function se(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function c(e){fe(a,r,o,c,i,"next",e)}function i(e){fe(a,r,o,c,i,"throw",e)}c(void 0)})}}function me(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return de(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?de(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function de(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var pe=r.lazy(function(){return n.e(614).then(n.bind(n,5614))});function ye(e){var t=me((0,r.useState)(null),2),n=t[0],o=t[1],a=me((0,b.L4)(E.AG.dockerShellShow),2),c=a[0],i=(a[1],me((0,b.L4)(E.AG.user_base_info),2)),u=i[0],l=(i[1],"dark"===u.user_data.theme?"#FFFFFF":"#000000"),m=function(){var e=se(ue().m(function e(){var t,n,r;return ue().w(function(e){for(;;)switch(e.n){case 0:t=new ce.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:l,cursor:l,selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4,convertEol:!0}),s.ws.subscribeUnconnect(d),r=function(e){t.write(e)},n=function(e){t.clear(),t.write(e),n=r},s.ws.addMsg("logs"===c.type?f.HK.docker_shell_logs_getting:f.HK.docker_shell_exec_getting,function(e){"error"===e.context&&d(),n(e.context)}),"exec"===c.type&&t.onData(function(){var e=se(ue().m(function e(t){var n;return ue().w(function(e){for(;;)switch(e.n){case 0:return(n=new f.hf(f.HK.docker_shell_exec)).context=t,e.n=1,s.ws.send(n);case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()),o(t);case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),d=function(){se(ue().m(function e(){return ue().w(function(e){for(;;)switch(e.n){case 0:n&&(n.writeln("[38;2;29;153;243mclose![0m "),n.dispose(),o(null));case 1:return e.a(2)}},e)}))()};(0,r.useEffect)(function(){c.show?m():d()},[c]),(0,r.useEffect)(function(){return function(){d()}},[]);return r.createElement(pe,{show:c.show,terminal:n,init:function(e,t){n.writeln("[38;2;29;153;243mconnect...[0m ");var r,o=new ie.n;o.rows=e,o.cols=t,o.dockerId=c.dockerId,(r="logs"===c.type?new f.hf(f.HK.docker_shell_logs):new f.hf(f.HK.docker_shell_exec_open)).context=o,s.ws.send(r)}})}var he=n(7690);function ve(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var u=r&&r.prototype instanceof i?r:i,l=Object.create(u.prototype);return be(l,"_invoke",function(n,r,o){var a,i,u,l=0,f=o||[],s=!1,m={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return a=t,i=0,u=e,m.n=n,c}};function d(n,r){for(i=n,u=r,t=0;!s&&l&&!o&&t<f.length;t++){var o,a=f[t],d=m.p,p=a[2];n>3?(o=p===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=d&&((o=n<2&&d<a[1])?(i=0,m.v=r,m.n=a[1]):d<p&&(o=n<3||a[0]>r||r>p)&&(a[4]=n,a[5]=r,m.n=p,i=0))}if(o||n>1)return c;throw s=!0,r}return function(o,f,p){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&d(f,p),i=f,u=p;(t=i<2?e:u)||!s;){a||(i?i<3?(i>1&&(m.n=-1),d(i,u)):m.n=u:m.v=u);try{if(l=2,a){if(i||(o="next"),t=a[o]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,i<2&&(i=0)}else 1===i&&(t=a.return)&&t.call(a),i<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=e}else if((t=(s=m.n<0)?u:n.call(r,m))!==c)break}catch(t){a=e,i=1,u=t}finally{l=1}}return{value:t,done:s}}}(n,o,a),!0),l}var c={};function i(){}function u(){}function l(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(be(t={},r,function(){return this}),t),s=l.prototype=i.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,be(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return u.prototype=l,be(s,"constructor",l),be(l,"constructor",u),u.displayName="GeneratorFunction",be(l,o,"GeneratorFunction"),be(s),be(s,o,"Generator"),be(s,r,function(){return this}),be(s,"toString",function(){return"[object Generator]"}),(ve=function(){return{w:a,m}})()}function be(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}be=function(e,t,n,r){function a(t,n){be(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},be(e,t,n,r)}function Ee(e){return function(e){if(Array.isArray(e))return ke(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||xe(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function we(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=xe(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){i=!0,a=e},f:function(){try{c||null==n.return||n.return()}finally{if(i)throw a}}}}function ge(e,t,n,r,o,a,c){try{var i=e[a](c),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(r,o)}function Se(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function c(e){ge(a,r,o,c,i,"next",e)}function i(e){ge(a,r,o,c,i,"throw",e)}c(void 0)})}}function _e(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw o}}return i}}(e,t)||xe(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xe(e,t){if(e){if("string"==typeof e)return ke(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ke(e,t):void 0}}function ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Ae="",je=[],Oe=!1;function Pe(e){var t=(0,v.Bd)().t,n=_e((0,r.useState)({}),2),c=n[0],i=n[1],u=_e((0,r.useState)([]),2),l=u[0],w=u[1],S=_e((0,r.useState)([]),2),_=S[0],x=S[1],k=(0,C.MH)().check_user_auth,A=_e((0,b.L4)(E.AG.dockerShellShow),2),j=A[0],O=A[1],P=_e((0,b.L4)(E.AG.showPrompt),2),I=(P[0],P[1]),T=_e((0,b.L4)(E.AG.confirm),2),G=(T[0],T[1]),M=_e((0,r.useState)(Ae),2),V=M[0],Y=M[1],N=_e((0,r.useState)(["id",t("名字"),t("镜像"),t("命令"),t("状态"),t("内存"),"cpu%",t("选择")]),2),L=N[0],H=(N[1],_e((0,r.useState)([]),2)),K=H[0],U=H[1],$=_e((0,r.useState)(void 0),2),W=$[0],Z=$[1],B=_e((0,r.useState)(!1),2),z=B[0],X=B[1],q=["id",t("name"),t("create时间"),t("大小"),r.createElement("span",null,"选中",r.createElement(p.rA,{icon:"check_box",title:"全选",onClick:function(){Oe=!Oe;for(var e={},t=0;t<_.length&&Oe;t++)e[_[t][0].props.context]=1;i(e)}}))],D=function(){var e=Se(ve().m(function e(){var t;return ve().w(function(e){for(;;)switch(e.n){case 0:return w([]),U([]),t=new f.hf(f.HK.docker_get),e.n=1,s.ws.send(t);case 1:s.ws.addMsg(f.HK.docker_getting,function(e){var t=[];if(Ae){var n,o=we(e.context);try{for(o.s();!(n=o.n()).done;){var c,i=n.value,u=we(i);try{for(u.s();!(c=u.n()).done;){var l=c.value;if("".concat(l).includes(Ae)){t.push(i);break}}}catch(e){u.e(e)}finally{u.f()}}}catch(e){o.e(e)}finally{o.f()}}else t.push.apply(t,Ee(e.context));w(t.map(function(e){var t=e.map(function(e){return r.createElement(a.xP,{context:e})});return t.push(r.createElement(p.rA,{icon:"place",title:"选中",onClick:function(){U(t)}})),t}))});case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();(0,r.useEffect)(function(){return Y(Ae),D(),function(){Se(ve().m(function e(){return ve().w(function(e){for(;;)switch(e.n){case 0:O({show:!1,type:"",dockerId:""});case 1:return e.a(2)}},e)}))()}},[]),(0,r.useEffect)(function(){Ae=V},[V]);var J=function(){var e=new f.hf("logs"===j.type?f.HK.docker_shell_logs_cancel:f.HK.docker_shell_exec_cancel);e.context="",s.ws.send(e)},R=function(e){var t=new f.hf(f.HK.docker_switch);t.context={type:e,dockerId:K[0].props.context},U([]),s.ws.send(t)},Q=function(){var e=Se(ve().m(function e(){var t,n,o,c,i,u,l;return ve().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,m.Yu.get("docker/images");case 1:if((t=e.v).code===h.m.Success){for(o=null!==(n=t.data)&&void 0!==n?n:[],c=[],i=0;i<o.length;i++)u=o[i],l=[r.createElement(a.xP,{context:u[0]}),r.createElement(a.xP,{context:u[1]}),u[2],u[3],""],c.push(l);je=c,x(c)}case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),ee=function(){var e=Se(ve().m(function e(){return ve().w(function(e){for(;;)switch(e.n){case 0:G({open:!0,title:t("确定删除选中的镜像吗"),handle:function(){var e=Se(ve().m(function e(){var t,n;return ve().w(function(e){for(;;)switch(e.n){case 0:return t=Object.keys(c),e.n=1,m.Yu.post("docker/check/delete",{ids:t});case 1:if((n=e.v).code!==h.m.Success){e.n=4;break}if(0!==n.data.length){e.n=3;break}return e.n=2,m.Yu.post("docker/delete",{ids:t});case 2:e.v.code===h.m.Success&&((0,g.LW)("删除完成"),Q(),G({open:!1,handle:null})),e.n=4;break;case 3:(0,g.N9)("有镜像正在运行".concat(JSON.stringify(n.data)));case 4:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}()});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),te=function(){var e=Se(ve().m(function e(){var t;return ve().w(function(e){for(;;)switch(e.n){case 0:return t=new f.hf(f.HK.docker_get),e.n=1,s.ws.send(t);case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(d.A,{left_children:r.createElement(p.Z$,{defaultStatus:!1,text:t("docker镜像"),clickFun:function(e){X(e),e?(Q(),U([])):(D(),x([]),i({}))}})},Object.keys(c).length>0&&r.createElement(p.rA,{icon:"delete",title:t("删除镜像"),onClick:ee}),K.length>0&&r.createElement("div",null,K[1].props.context),K.length>0&&r.createElement("div",null,k(F.oV.docker_container_update)&&r.createElement(p.rA,{icon:"delete",title:t("删除容器"),onClick:function(){I({show:!0,overlay:!0,type:he.PromptEnum.DockerDel,data:{dockerId:K[0].props.context,name:K[1].props.context}})}}),r.createElement(p.rA,{icon:"print",title:t("打印日志"),onClick:function(){j.show?(O({show:!1,type:"",dockerId:""}),J()):O({show:!0,dockerId:K[0].props.context,type:"logs"})}}),k(F.oV.docker_container_update)&&r.createElement(p.rA,{icon:"personal_video",title:t("执行命令"),onClick:function(){j.show?(O({show:!1,type:"",dockerId:""}),J()):O({show:!0,dockerId:K[0].props.context,type:"exec"})}}),k(F.oV.docker_container_update)&&K[4].props.context.includes("Up")&&r.createElement(p.rA,{icon:"stop",title:t("停止"),onClick:function(){return R("stop")}}),k(F.oV.docker_container_update)&&!K[4].props.context.includes("Up")&&r.createElement(p.rA,{icon:"play_arrow",title:t("开启"),onClick:function(){R("start")}})),(0!==l.length||V)&&!z&&r.createElement(p.rA,{icon:"refresh",title:t("列表更新"),onClick:te})),r.createElement(o.xh,null,z&&r.createElement(o.fI,null,r.createElement(o.VP,{widthPer:80},r.createElement(a.uF,{title:"".concat(t("镜像")," (").concat(_.length,")"),titleCom:r.createElement(ae.Sm,{placeholder:t("过滤镜像"),value:W,handleInputChange:function(e){Z(e)},handlerEnter:function(){var e=[];if(W){var t,n=we(_);try{for(n.s();!(t=n.n()).done;){var r=t.value;(r[0].props.context.includes(W)||r[1].props.context.includes(W))&&e.push(r)}}catch(e){n.e(e)}finally{n.f()}x(e)}else x(je)}})},r.createElement(y.X,{headers:q,rows:_.map(function(e,n){return e[4]=r.createElement(ae.GL,{context:t(""),selected:c[e[0].props.context],onchange:function(){var t,n;t=e[0].props.context,n={},Object.assign(n,c),n[t]?delete n[t]:n[t]=1,i(n)}}),e}),width:"10rem"})))),0===l.length&&!V&&!z&&r.createElement(oe,{context:t("检测不到docker,主机可能没有安装docker or 容器为空")}),(0!==l.length||V)&&!z&&r.createElement(o.fI,null,r.createElement(o.VP,{widthPer:80},r.createElement(a.uF,{title:"".concat(t("容器")," (").concat(l.length,")"),titleCom:r.createElement(ae.Sm,{placeholder:t("过滤"),value:V,handleInputChange:function(e){Y(e)}})},r.createElement(y.X,{headers:L,rows:l,width:"10rem"}))))),r.createElement(ye,null))}var Ie=n(4694);function Te(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var u=r&&r.prototype instanceof i?r:i,l=Object.create(u.prototype);return Ce(l,"_invoke",function(n,r,o){var a,i,u,l=0,f=o||[],s=!1,m={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return a=t,i=0,u=e,m.n=n,c}};function d(n,r){for(i=n,u=r,t=0;!s&&l&&!o&&t<f.length;t++){var o,a=f[t],d=m.p,p=a[2];n>3?(o=p===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=d&&((o=n<2&&d<a[1])?(i=0,m.v=r,m.n=a[1]):d<p&&(o=n<3||a[0]>r||r>p)&&(a[4]=n,a[5]=r,m.n=p,i=0))}if(o||n>1)return c;throw s=!0,r}return function(o,f,p){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&d(f,p),i=f,u=p;(t=i<2?e:u)||!s;){a||(i?i<3?(i>1&&(m.n=-1),d(i,u)):m.n=u:m.v=u);try{if(l=2,a){if(i||(o="next"),t=a[o]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,i<2&&(i=0)}else 1===i&&(t=a.return)&&t.call(a),i<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=e}else if((t=(s=m.n<0)?u:n.call(r,m))!==c)break}catch(t){a=e,i=1,u=t}finally{l=1}}return{value:t,done:s}}}(n,o,a),!0),l}var c={};function i(){}function u(){}function l(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(Ce(t={},r,function(){return this}),t),s=l.prototype=i.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,Ce(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return u.prototype=l,Ce(s,"constructor",l),Ce(l,"constructor",u),u.displayName="GeneratorFunction",Ce(l,o,"GeneratorFunction"),Ce(s),Ce(s,o,"Generator"),Ce(s,r,function(){return this}),Ce(s,"toString",function(){return"[object Generator]"}),(Te=function(){return{w:a,m}})()}function Ce(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Ce=function(e,t,n,r){function a(t,n){Ce(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},Ce(e,t,n,r)}function Fe(e){return function(e){if(Array.isArray(e))return Ne(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ye(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ge(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Ye(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){i=!0,a=e},f:function(){try{c||null==n.return||n.return()}finally{if(i)throw a}}}}function Me(e,t,n,r,o,a,c){try{var i=e[a](c),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(r,o)}function Ve(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw o}}return i}}(e,t)||Ye(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ye(e,t){if(e){if("string"==typeof e)return Ne(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ne(e,t):void 0}}function Ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Le="",He=!1,Ke=!1;function Ue(e){var t=(0,v.Bd)().t,n=Ve((0,r.useState)([]),2),c=n[0],i=n[1],u=Ve((0,r.useState)([]),2),l=u[0],m=u[1],h=Ve((0,r.useState)(0),2),b=h[0],E=h[1],w=Ve((0,r.useState)(""),2),g=w[0],S=w[1],_=Ve((0,r.useState)(["pid",t("名字"),t("创建用户"),r.createElement("span",null,t("内存"),r.createElement(p.rA,{icon:"sort",title:t("升序"),onClick:function(){He=!He}})),r.createElement("span",null,"cpu%",r.createElement(p.rA,{icon:"sort",title:t("升序"),onClick:function(){Ke=!Ke}})),t("选择")]),2),x=_[0],k=(_[1],(0,C.MH)().check_user_auth),A=function(){var e,n=(e=Te().m(function e(){var n;return Te().w(function(e){for(;;)switch(e.n){case 0:return i([]),E(0),m([]),n=new f.hf(f.HK.process_get),e.n=1,s.ws.send(n);case 1:s.ws.addMsg(f.HK.process_getting,function(e){var n=[];if(Le){var o,c=Ge(e.context);try{for(c.s();!(o=c.n()).done;){var u,l=o.value,f=Ge(l);try{for(f.s();!(u=f.n()).done;){var s=u.value;if("".concat(s).includes(Le)){n.push(l);break}}}catch(e){f.e(e)}finally{f.f()}}}catch(e){c.e(e)}finally{c.f()}}else n.push.apply(n,Fe(e.context));He&&(0,Ie.di)(n,function(e){return e[3]},!1),Ke&&(0,Ie.di)(n,function(e){return e[4]},!1);var d=n.map(function(e){var n=e.map(function(e,t){return r.createElement(a.xP,{context:3===t?(0,Z.v7)(e):e})});return n.push(r.createElement(p.rA,{icon:"place",title:t("选中"),onClick:function(){m(n)}})),n});E(n.length),i(d)});case 2:return e.a(2)}},e)}),function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function c(e){Me(a,r,o,c,i,"next",e)}function i(e){Me(a,r,o,c,i,"throw",e)}c(void 0)})});return function(){return n.apply(this,arguments)}}();(0,r.useEffect)(function(){S(Le),A()},[]),(0,r.useEffect)(function(){Le=g},[g]);return r.createElement("div",null,r.createElement(d.A,null,l.length>0&&r.createElement("div",null,l[1].props.context),l.length>0&&k(F.oV.sys_process_close)&&r.createElement("div",null,r.createElement(p.rA,{icon:"stop",title:t("停止"),onClick:function(){var e=new f.hf(f.HK.process_close);e.context={pid:l[0].props.context},m([]),s.ws.send(e)}}))),r.createElement(o.xh,null,0!==c.length||Le?r.createElement(o.fI,null,r.createElement(o.VP,{widthPer:80},r.createElement(a.uF,{title:"".concat(t("进程")," (").concat(b,")"),titleCom:r.createElement(ae.Sm,{placeholder:t("过滤"),value:g,handleInputChange:function(e){S(e)}})},r.createElement(y.X,{headers:x,rows:c,width:"10rem"})))):r.createElement(oe,{context:t("加载中请等待...")})))}function $e(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var u=r&&r.prototype instanceof i?r:i,l=Object.create(u.prototype);return We(l,"_invoke",function(n,r,o){var a,i,u,l=0,f=o||[],s=!1,m={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return a=t,i=0,u=e,m.n=n,c}};function d(n,r){for(i=n,u=r,t=0;!s&&l&&!o&&t<f.length;t++){var o,a=f[t],d=m.p,p=a[2];n>3?(o=p===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=d&&((o=n<2&&d<a[1])?(i=0,m.v=r,m.n=a[1]):d<p&&(o=n<3||a[0]>r||r>p)&&(a[4]=n,a[5]=r,m.n=p,i=0))}if(o||n>1)return c;throw s=!0,r}return function(o,f,p){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&d(f,p),i=f,u=p;(t=i<2?e:u)||!s;){a||(i?i<3?(i>1&&(m.n=-1),d(i,u)):m.n=u:m.v=u);try{if(l=2,a){if(i||(o="next"),t=a[o]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,i<2&&(i=0)}else 1===i&&(t=a.return)&&t.call(a),i<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=e}else if((t=(s=m.n<0)?u:n.call(r,m))!==c)break}catch(t){a=e,i=1,u=t}finally{l=1}}return{value:t,done:s}}}(n,o,a),!0),l}var c={};function i(){}function u(){}function l(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(We(t={},r,function(){return this}),t),s=l.prototype=i.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,We(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return u.prototype=l,We(s,"constructor",l),We(l,"constructor",u),u.displayName="GeneratorFunction",We(l,o,"GeneratorFunction"),We(s),We(s,o,"Generator"),We(s,r,function(){return this}),We(s,"toString",function(){return"[object Generator]"}),($e=function(){return{w:a,m}})()}function We(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}We=function(e,t,n,r){function a(t,n){We(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},We(e,t,n,r)}function Ze(e,t,n,r,o,a,c){try{var i=e[a](c),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(r,o)}function Be(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function c(e){Ze(a,r,o,c,i,"next",e)}function i(e){Ze(a,r,o,c,i,"throw",e)}c(void 0)})}}function ze(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Xe(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xe(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var qe=r.lazy(function(){return n.e(614).then(n.bind(n,5614))});function De(e){var t=ze((0,r.useState)(null),2),n=t[0],o=t[1],a=ze((0,b.L4)(E.AG.systemd_shell_show),2),c=a[0],i=(a[1],ze((0,b.L4)(E.AG.user_base_info),2)),u=i[0],l=(i[1],"dark"===u.user_data.theme?"#FFFFFF":"#000000"),m=function(){var e=Be($e().m(function e(){var t;return $e().w(function(e){for(;;)switch(e.n){case 0:t=new ce.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:l,cursor:l,selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4,convertEol:!0}),s.ws.subscribeUnconnect(d),s.ws.addMsg(f.HK.systemd_logs_getting,function(e){"error"===e.context&&d(),t.write(e.context)}),o(t);case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),d=function(){Be($e().m(function e(){return $e().w(function(e){for(;;)switch(e.n){case 0:n&&(n.writeln("[38;2;29;153;243mclose![0m "),n.dispose(),o(null));case 1:return e.a(2)}},e)}))()};(0,r.useEffect)(function(){if(c.show){m();var e=function(e){};return document.addEventListener("cancel_systemd_logs",e),function(){document.removeEventListener("cancel_systemd_logs",e)}}d()},[c]),(0,r.useEffect)(function(){return function(){d()}},[]);return r.createElement(qe,{show:c.show,terminal:n,init:function(e,t){n.writeln("[38;2;29;153;243mconnect...[0m ");var r={unit_name:c.unit_name},o=new f.hf(f.HK.systemd_logs_get);o.context=r,s.ws.send(o)}})}function Je(e){return Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Je(e)}function Re(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(Je(e)+" is not iterable")}function Qe(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var u=r&&r.prototype instanceof i?r:i,l=Object.create(u.prototype);return et(l,"_invoke",function(n,r,o){var a,i,u,l=0,f=o||[],s=!1,m={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return a=t,i=0,u=e,m.n=n,c}};function d(n,r){for(i=n,u=r,t=0;!s&&l&&!o&&t<f.length;t++){var o,a=f[t],d=m.p,p=a[2];n>3?(o=p===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=d&&((o=n<2&&d<a[1])?(i=0,m.v=r,m.n=a[1]):d<p&&(o=n<3||a[0]>r||r>p)&&(a[4]=n,a[5]=r,m.n=p,i=0))}if(o||n>1)return c;throw s=!0,r}return function(o,f,p){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&d(f,p),i=f,u=p;(t=i<2?e:u)||!s;){a||(i?i<3?(i>1&&(m.n=-1),d(i,u)):m.n=u:m.v=u);try{if(l=2,a){if(i||(o="next"),t=a[o]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,i<2&&(i=0)}else 1===i&&(t=a.return)&&t.call(a),i<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=e}else if((t=(s=m.n<0)?u:n.call(r,m))!==c)break}catch(t){a=e,i=1,u=t}finally{l=1}}return{value:t,done:s}}}(n,o,a),!0),l}var c={};function i(){}function u(){}function l(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(et(t={},r,function(){return this}),t),s=l.prototype=i.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,et(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return u.prototype=l,et(s,"constructor",l),et(l,"constructor",u),u.displayName="GeneratorFunction",et(l,o,"GeneratorFunction"),et(s),et(s,o,"Generator"),et(s,r,function(){return this}),et(s,"toString",function(){return"[object Generator]"}),(Qe=function(){return{w:a,m}})()}function et(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}et=function(e,t,n,r){function a(t,n){et(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},et(e,t,n,r)}function tt(e){return function(e){if(Array.isArray(e))return it(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ct(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ct(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){i=!0,a=e},f:function(){try{c||null==n.return||n.return()}finally{if(i)throw a}}}}function rt(e,t,n,r,o,a,c){try{var i=e[a](c),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(r,o)}function ot(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function c(e){rt(a,r,o,c,i,"next",e)}function i(e){rt(a,r,o,c,i,"throw",e)}c(void 0)})}}function at(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw o}}return i}}(e,t)||ct(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ct(e,t){if(e){if("string"==typeof e)return it(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?it(e,t):void 0}}function it(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ut,lt="";function ft(e){var t=(0,v.Bd)().t,n=(0,C.MH)().check_user_auth,c=at((0,b.L4)(E.AG.systemd_shell_show),2),i=c[0],u=c[1],l=at((0,b.L4)(E.AG.confirm),2),w=(l[0],l[1]),S=at((0,r.useState)(["pid","name","process",t("创建用户"),t("内存"),t("cpu%"),t("active状态"),t("选择")]),2),_=S[0],x=(S[1],at((0,r.useState)(["单元名字","加载状态",t("active(sub)状态"),t("描述"),t("选择")]),2)),k=x[0],A=(x[1],at((0,r.useState)([]),2)),j=A[0],O=A[1],P=at((0,r.useState)([]),2),I=P[0],T=P[1],G=at((0,r.useState)([]),2),M=G[0],V=G[1],Y=at((0,r.useState)(!1),2),N=Y[0],L=Y[1],H=at((0,r.useState)([]),2),K=H[0],U=H[1],$=at((0,r.useState)(""),2),W=$[0],B=$[1],z=at((0,r.useState)(""),2),X=z[0],q=z[1],D=at((0,r.useState)(new Set),2),J=D[0],R=D[1],Q=at((0,b.L4)(E.AG.editorSetting),2),ee=(Q[0],Q[1]),te=function(){var e=ot(Qe().m(function e(){var t;return Qe().w(function(e){for(;;)switch(e.n){case 0:return O([]),V([]),t=new f.hf(f.HK.systemd_inside_get),e.n=1,s.ws.send(t);case 1:s.ws.addMsg(f.HK.systemd_inside_getting,function(e){var t=[];if(lt){var n,o=nt(e.context);try{for(o.s();!(n=o.n()).done;){var c,i=n.value,u=nt(i);try{for(u.s();!(c=u.n()).done;){var l=c.value;if("".concat(l).includes(lt)){t.push(i);break}}}catch(e){u.e(e)}finally{u.f()}}}catch(e){o.e(e)}finally{o.f()}}else t.push.apply(t,tt(e.context));O(t.map(function(e){var t=e.map(function(e,t){return r.createElement(a.xP,{context:4===t?(0,Z.v7)(e):e})});return t.push(r.createElement(p.rA,{icon:"place",title:"选中",onClick:function(){V(t)}})),t}))});case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();(0,r.useEffect)(function(){q(lt),te()},[]),(0,r.useEffect)(function(){lt=X},[X]);var ne=function(e){if(i.show){u({show:!1,unit_name:""});var t=new CustomEvent("cancel_systemd_logs",{detail:{}});document.dispatchEvent(t)}else u({show:!0,unit_name:e})},re=function(){var e=ot(Qe().m(function e(t){return Qe().w(function(e){for(;;)switch(e.n){case 0:w({open:!0,handle:function(){var e=ot(Qe().m(function e(){return Qe().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,m.Yu.post("systemd/sys/delete",{unit_name:t});case 1:e.v.code===h.m.Success&&((0,g.LW)("删除成功"),w({open:!1,handle:null}));case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}()});case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),ce=function(){var e=ot(Qe().m(function e(t){return Qe().w(function(e){for(;;)switch(e.n){case 0:w({open:!0,handle:function(){var e=ot(Qe().m(function e(){return Qe().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,m.Yu.post("systemd/delete",{unit_name:t});case 1:e.v.code===h.m.Success&&((0,g.LW)("删除成功"),w({open:!1,handle:null}));case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}()});case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),ie=function(){var e=ot(Qe().m(function e(){var t,n,o,c,i,u,l,f;return Qe().w(function(e){for(;;)switch(e.p=e.n){case 0:return T([]),U([]),e.n=1,m.Yu.get("systemd/inside/all");case 1:if((t=e.v).code===h.m.Success){e.n=2;break}return e.a(2);case 2:return R(new Set(t.data)),e.n=3,m.Yu.get("systemd/allget");case 3:if((n=e.v).code!==h.m.Success){e.n=11;break}o=n.data,c=[],i=nt(null!=o?o:[]),e.p=4,l=Qe().m(function e(){var t,n;return Qe().w(function(e){for(;;)switch(e.n){case 0:t=u.value,n=[r.createElement(a.xP,{context:t.unit}),t.load,"".concat(t.active,"(").concat(t.sub,")"),r.createElement(a.xP,{context:t.description})],c.push([].concat(n,[r.createElement(p.rA,{icon:"place",title:"添加",onClick:function(){U([].concat(n))}})]));case 1:return e.a(2)}},e)}),i.s();case 5:if((u=i.n()).done){e.n=7;break}return e.d(Re(l()),6);case 6:e.n=5;break;case 7:e.n=9;break;case 8:e.p=8,f=e.v,i.e(f);case 9:return e.p=9,i.f(),e.f(9);case 10:ut=c,T(c);case 11:return e.a(2)}},e,null,[[4,8,9,10]])}));return function(){return e.apply(this,arguments)}}(),ue=function(){var e=ot(Qe().m(function e(t){var n;return Qe().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,m.Yu.post("systemd/add",{unit_name:t});case 1:(n=e.v).code===h.m.Success&&(R(new Set(n.data)),(0,g.LW)("添加成功"));case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),le=function(){var t=ot(Qe().m(function t(n){var r;return Qe().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,m.Yu.post("systemd/get/context",{unit_name:n});case 1:(r=t.v).code===h.m.Success&&(ee({model:"text",open:!0,fileName:e.name,save:function(){var e=ot(Qe().m(function e(t){var n;return Qe().w(function(e){for(;;)switch(e.n){case 0:return n={context:t},"/"===r.data.path[0]&&(r.data.path=r.data.path.slice(1)),e.n=1,m.$M.post("save/".concat(r.data.path),n);case 1:e.v.code===h.m.Success&&(C.xK.set_value_temp(""),ee({open:!1,model:"",fileName:"",save:null}));case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()}),C.xK.set_value_temp(r.data.context));case 2:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(d.A,{left_children:r.createElement(p.Z$,{defaultStatus:!1,text:t("系统systemd单元"),clickFun:function(e){L(e),e?(ie(),V([])):U([])}})},M.length>0&&r.createElement("div",null,M[1].props.context),K.length>0&&r.createElement("div",null,K[0].props.context),M.length>0&&r.createElement("div",null,n(F.oV.systemd_update)&&r.createElement(p.rA,{icon:"delete",title:"从实时监控删除",onClick:function(){ce(M[1].props.context)}}),r.createElement(p.rA,{icon:"print",title:"打印日志",onClick:function(){ne(M[1].props.context)}})),K.length>0&&r.createElement("div",null,n(F.oV.systemd_update)&&r.createElement(p.rA,{icon:"delete",title:"删除系统上的sytemd",onClick:function(){re(K[0].props.context)}}),r.createElement(p.rA,{icon:"print",title:"打印日志",onClick:function(){ne(K[0].props.context)}}),n(F.oV.systemd_update)&&r.createElement(p.rA,{icon:"text_fields",title:"sytemd文件内容",onClick:function(){le(K[0].props.context)}}),n(F.oV.systemd_update)&&!J.has(K[0].props.context)&&r.createElement(p.rA,{icon:"plus_one",title:"添加到管理",onClick:function(){return ue(K[0].props.context)}}))),r.createElement(o.xh,null,N&&r.createElement(o.fI,null,r.createElement(o.VP,{widthPer:80},r.createElement(a.uF,{title:"systemd系统单元(".concat(I.length,")"),titleCom:r.createElement(ae.Sm,{placeholder:"过滤单元",value:W,handleInputChange:function(e){B(e)},handlerEnter:function(){var e=[];if(W){var t,n=nt(ut);try{for(n.s();!(t=n.n()).done;){var r=t.value;(r[0].props.context.includes(W)||r[3].props.context.includes(W))&&e.push(r)}}catch(e){n.e(e)}finally{n.f()}T(e)}else T(ut)}})},r.createElement(y.X,{headers:k,rows:I,width:"10rem"})))),0===j.length&&!N&&r.createElement(oe,{context:"没有管理的单元 or 加载中请等待..."}),0!==j.length&&!N&&r.createElement(o.fI,null,r.createElement(o.VP,{widthPer:80},r.createElement(a.uF,{title:"filecat监控单元(".concat(j.length,")"),titleCom:r.createElement(ae.Sm,{placeholder:"过滤单元",value:X,handleInputChange:function(e){q(e)}})},r.createElement(y.X,{headers:_,rows:j,width:"10rem"}))))),r.createElement(De,null))}function st(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return mt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mt(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function dt(e){var t=(0,v.Bd)().t,n=st((0,b.L4)(E.AG.user_base_info),2),a=n[0],c=(n[1],[{index:1,name:t("系统性能"),rto:"sys/",component:r.createElement(re,null)},{index:2,name:t("系统进程"),rto:"process/",component:r.createElement(Ue,null)},{index:3,name:t("docker容器"),rto:"docker/",component:r.createElement(Pe,null)}]);return a.sys===F.XM.linux&&c.push({index:4,name:t("systemd"),rto:"systemd/",component:r.createElement(ft,null)}),r.createElement(o.W1,{optionList:c})}}}]);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 488.905be404d0c56f0670d6.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[91,488],{447(e,t,n){n.d(t,{WA:()=>v,ZI:()=>y,Zp:()=>f,fq:()=>b,gz:()=>p,uF:()=>m,xP:()=>d});var r=n(6540),o=n(3413),l=n.n(o),a=n(505);function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,l,a,c=[],i=!0,u=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(r=l.call(n)).done)&&(c.push(r.value),c.length!==t);i=!0);}catch(e){u=!0,o=e}finally{try{if(!i&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var u=function(e){return e[e.common=0]="common",e[e.full=1]="full",e}(u||{});function s(e,t){var n=t===u.common?"card-content":t===u.full?"card-content full":"";return r.createElement("div",{className:"card",style:{}},r.createElement("div",{className:"card-title"},e.self_title?e.self_title:r.createElement("h2",null,e.title),r.createElement("div",{className:"not-select-div"},e.titleCom&&e.titleCom)),r.createElement("div",{className:n},e.children),r.createElement("div",{className:"card-action card-action-bottom-right"},e.rightBottomCom))}function f(e){return s(e,u.common)}function m(e){return s(e,u.full)}function d(e){var t,n,o,c=(0,r.useRef)(null);return r.createElement("div",{className:"card-text"},r.createElement("div",{className:"card-text-context"},null!==(t=e.context)&&void 0!==t?t:e.children),r.createElement("div",{className:"card-text-tip",ref:c,onClick:function(){var t,n;(0,a.lW)(null!==(t=null!==(n=e.tip_context)&&void 0!==n?n:e.context)&&void 0!==t?t:e.children),new(l())({type:"info",text:"复制完成",timeout:1e3,layout:"bottomLeft"}).show()}},null!==(n=null!==(o=e.tip_context)&&void 0!==o?o:e.context)&&void 0!==n?n:e.children))}function v(e){var t,n;return r.createElement("div",{className:"card-text"},r.createElement("div",{className:"card-text-context"},null!==(t=e.context)&&void 0!==t?t:e.children),r.createElement("div",{className:"card-text-tip"},null!==(n=e.context)&&void 0!==n?n:e.children))}function y(e){var t,n;return r.createElement("div",{className:"card floating",onKeyPress:function(t){"Enter"===t.key&&e.confirm_enter&&e.confirm_enter()}},r.createElement("div",{className:"card-title"},r.createElement("h2",null,e.title)),r.createElement("div",{className:"card-content"},e.context&&Array.isArray(e.context)?e.context.map(function(e,t){return r.createElement(r.Fragment,{key:t},e)}):e.context),r.createElement("div",{className:"card-action"},r.createElement("button",{className:"button button--flat button--grey",onClick:e.cancel},null!==(t=e.cancel_t)&&void 0!==t?t:"cancel"),r.createElement("button",{className:"button button--flat",onClick:e.confirm},null!==(n=e.confirm_t)&&void 0!==n?n:"confirm")))}function p(e){return r.createElement("div",{className:"progress-card"},r.createElement("div",{className:"progress-per"},r.createElement("div",{style:{width:"".concat(e.progress,"%")}})))}var b=function(e){var t=c((0,r.useState)("var(--iconTertiary)"),2),n=t[0],o=t[1];(0,r.useEffect)(function(){null==e.ok?null==e.success?null!=e.running&&o("var(--icon-yellow)"):!0===e.success?o("var(--icon-green)"):!1===e.success&&o("var(--icon-red)"):o(e.ok?"var(--icon-green)":"var(--iconTertiary)")},[e]);var l={width:"10px",height:"10px",borderRadius:"50%",backgroundColor:n,display:"inline-block"};return r.createElement("div",{style:l})}},7481(e,t,n){n.d(t,{S:()=>c,X:()=>a});var r=n(6540);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,l,a,c=[],i=!0,u=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(r=l.call(n)).done)&&(c.push(r.value),c.length!==t);i=!0);}catch(e){u=!0,o=e}finally{try{if(!i&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(e){var t,n=o(r.useState([]),2),l=n[0],a=n[1];return(0,r.useEffect)(function(){e.children?a(Array.isArray(e.children)?e.children:[e.children]):a(e.rows)},[e.rows,e.children]),r.createElement("table",null,r.createElement("thead",null,r.createElement("tr",null,null===(t=e.headers)||void 0===t?void 0:t.map(function(e,t){return r.createElement("th",{key:t},e)}))),r.createElement("tbody",null,l.map(function(t,n){return r.createElement("tr",{key:n,onContextMenu:function(){e.handleContextMenu&&e.handleContextMenu(t)}},t.map(function(n,o){var l;return r.createElement("td",{style:{width:null!==(l=e.width)&&void 0!==l?l:"auto"},key:o,className:o===t.length-1?"small":""},n)}))})))}function c(e){return r.createElement("div",{style:{display:e.isFlex?"flex":"block"}},e.columns.map(function(e,t){return r.createElement("div",{key:t},e)}))}},4091(e,t,n){n.r(t),n.d(t,{default:()=>y});var r=n(6540),o=n(952),l=(n(2327),n(1766),n(4854),n(8),n(846),n(975),n(4286),n(766),n(1234),n(7507),n(7268),n(4522)),a=n.n(l),c=n(7444),i=n(6417),u=n(8247);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function m(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==s(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,l,a,c=[],i=!0,u=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(r=l.call(n)).done)&&(c.push(r.value),c.length!==t);i=!0);}catch(e){u=!0,o=e}finally{try{if(!i&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return v(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function y(e){var t=(0,r.useRef)(null),n=d((0,c.L4)(i.AG.user_base_info),2),l=n[0],s=(n[1],"dark"===l.user_data.theme?"cloud_editor_dark":"cloud9_day");return(0,r.useEffect)(function(){var n,r,l=o.edit(t.current,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({value:u.xK.get_value_temp(e.editor_id),showPrintMargin:!1,theme:"ace/theme/".concat(s),mode:null!==(n=e.model)&&void 0!==n?n:a().getModeForPath(null!==(r=e.name)&&void 0!==r?r:"").mode,wrap:!1,highlightActiveLine:!1,fontSize:14},e.options));return l.setOptions({}),l.container.addEventListener("wheel",function(e){e.preventDefault()}),l.focus(),l.on("change",function(t){e.on_change&&e.on_change()}),t.current=l,l.formatCode=function(){var e=o.require("ace/ext/beautify"),n=t.current;n&&e.beautify(n.session)},u.xK.set_editor_temp(l,e.editor_id),function(){u.xK.delete_editor_temp(e.editor_id),l.destroy()}},[]),r.createElement("div",{ref:t,style:{height:"100%",width:"100%"}})}o.config.set("basePath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),o.config.set("modePath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),o.config.set("themePath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),o.config.set("workerPath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),o.config.set("basePath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/"))},4488(e,t,n){n.r(t),n.d(t,{default:()=>E});var r=n(6540),o=n(7952),l=n(5997),a=n(4284),c=n(7767),i=n(7481),u=n(447),s=n(7444),f=n(6417),m=n(4091),d=n(8247);function v(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function l(n,r,o,l){var i=r&&r.prototype instanceof c?r:c,u=Object.create(i.prototype);return y(u,"_invoke",function(n,r,o){var l,c,i,u=0,s=o||[],f=!1,m={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return l=t,c=0,i=e,m.n=n,a}};function d(n,r){for(c=n,i=r,t=0;!f&&u&&!o&&t<s.length;t++){var o,l=s[t],d=m.p,v=l[2];n>3?(o=v===r)&&(i=l[(c=l[4])?5:(c=3,3)],l[4]=l[5]=e):l[0]<=d&&((o=n<2&&d<l[1])?(c=0,m.v=r,m.n=l[1]):d<v&&(o=n<3||l[0]>r||r>v)&&(l[4]=n,l[5]=r,m.n=v,c=0))}if(o||n>1)return a;throw f=!0,r}return function(o,s,v){if(u>1)throw TypeError("Generator is already running");for(f&&1===s&&d(s,v),c=s,i=v;(t=c<2?e:i)||!f;){l||(c?c<3?(c>1&&(m.n=-1),d(c,i)):m.n=i:m.v=i);try{if(u=2,l){if(c||(o="next"),t=l[o]){if(!(t=t.call(l,i)))throw TypeError("iterator result is not an object");if(!t.done)return t;i=t.value,c<2&&(c=0)}else 1===c&&(t=l.return)&&t.call(l),c<2&&(i=TypeError("The iterator does not provide a '"+o+"' method"),c=1);l=e}else if((t=(f=m.n<0)?i:n.call(r,m))!==a)break}catch(t){l=e,c=1,i=t}finally{u=1}}return{value:t,done:f}}}(n,o,l),!0),u}var a={};function c(){}function i(){}function u(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(y(t={},r,function(){return this}),t),f=u.prototype=c.prototype=Object.create(s);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,y(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return i.prototype=u,y(f,"constructor",u),y(u,"constructor",i),i.displayName="GeneratorFunction",y(u,o,"GeneratorFunction"),y(f),y(f,o,"Generator"),y(f,r,function(){return this}),y(f,"toString",function(){return"[object Generator]"}),(v=function(){return{w:l,m}})()}function y(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}y=function(e,t,n,r){function l(t,n){y(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(l("next",0),l("throw",1),l("return",2))},y(e,t,n,r)}function p(e,t,n,r,o,l,a){try{var c=e[l](a),i=c.value}catch(e){return void n(e)}c.done?t(i):Promise.resolve(i).then(r,o)}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,l,a,c=[],i=!0,u=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(r=l.call(n)).done)&&(c.push(r.value),c.length!==t);i=!0);}catch(e){u=!0,o=e}finally{try{if(!i&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return h(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function E(){var e,t,n,y,h=(0,c.Zp)(),E=b((0,s.L4)(f.AG.sqlite_query_context),1)[0],_=(0,r.useMemo)(function(){var e;return null!==(e=null==E?void 0:E.path)&&void 0!==e?e:""},[null==E?void 0:E.path]),w=(0,r.useMemo)(function(){return null!=E&&E.path?"".concat((null==E?void 0:E.name)||"数据库"," | ").concat(E.path):"未选择数据库"},[null==E?void 0:E.name,null==E?void 0:E.path]),S=97,x=b((0,r.useState)(""),2),j=x[0],O=x[1],k=b((0,r.useState)("table"),2),A=k[0],N=k[1],P=b((0,r.useState)(!1),2),C=P[0],q=P[1],I=b((0,r.useState)(""),2),M=I[0],T=I[1],F=b((0,r.useState)(null),2),K=F[0],G=F[1];(0,r.useEffect)(function(){d.xK.set_value_temp(j,S)},[j]),(0,r.useEffect)(function(){O(""),T(""),G(null),N("table"),d.xK.set_value_temp("",S),_||T("请先从文件右键打开一个数据库")},[_,null==E?void 0:E.open]);var L=function(){var e,t=(e=v().m(function e(){var t,n,r,o,l;return v().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=(null!==(t=d.xK.get_editor_value(S))&&void 0!==t?t:j).trim(),_){e.n=1;break}return T("请先从文件右键打开一个数据库"),G(null),e.a(2);case 1:if(n){e.n=2;break}return T("请输入 SQL 语句"),G(null),e.a(2);case 2:return q(!0),T(""),e.p=3,e.n=4,a.$M.post("sqlite/query",{path:_,sql:n});case 4:r=e.v,G(r.data),N("table"),e.n=6;break;case 5:e.p=5,l=e.v,T(null!==(o=null==l?void 0:l.message)&&void 0!==o?o:"".concat(l)),G(null);case 6:return e.p=6,q(!1),e.f(6);case 7:return e.a(2)}},e,null,[[3,5,6,7]])}),function(){var t=this,n=arguments;return new Promise(function(r,o){var l=e.apply(t,n);function a(e){p(l,r,o,a,c,"next",e)}function c(e){p(l,r,o,a,c,"throw",e)}a(void 0)})});return function(){return t.apply(this,arguments)}}(),D=null!=K&&null!==(e=K.columns)&&void 0!==e&&e.length?K.columns:Object.keys(null!==(t=null==K||null===(n=K.rows)||void 0===n?void 0:n[0])&&void 0!==t?t:{}),J=(null!==(y=null==K?void 0:K.rows)&&void 0!==y?y:[]).map(function(e){return D.map(function(t){return null==(n=e[t])?"":"object"===g(n)?JSON.stringify(n):"".concat(n);var n})});return r.createElement("div",{className:"db-query-page"},r.createElement(o.A,{ignore_tags:!0,left_children:[r.createElement(l.rA,{key:"back",icon:"arrow_back",title:"返回",onClick:function(){return h(-1)}}),r.createElement(l.rA,{key:"run",icon:"play_arrow",title:"执行",onClick:L}),r.createElement(l.rA,{key:"table",icon:"table_chart",title:"表格视图",onClick:function(){return N("table")}}),r.createElement(l.rA,{key:"json",icon:"data_object",title:"原 JSON",onClick:function(){return N("json")}})],children:r.createElement(u.xP,{context:w,tip_context:"点击复制数据库信息"})}),r.createElement("div",{className:"db-query-page__content"},r.createElement(u.Zp,{title:"SQL 查询",rightBottomCom:r.createElement("div",{className:"db-query-page__actions"},r.createElement(l.C3,{text:C?"查询中...":"执行查询",clickFun:L}),r.createElement(l.C3,{text:"清空",clickFun:function(){d.xK.set_value_temp("",S);var e=d.xK.get_editor(S);e&&e.setValue("",-1),O("")}}),r.createElement(l.C3,{text:"table"===A?"表格视图":"切换到表格",clickFun:function(){return N("table")}}),r.createElement(l.C3,{text:"json"===A?"原 JSON":"切换到 JSON",clickFun:function(){return N("json")}}))},r.createElement("div",{className:"db-query-page__editor"},r.createElement(m.default,{name:"sqlite.sql",editor_id:S,model:"ace/mode/sql",on_change:function(){var e,t=null!==(e=d.xK.get_editor_value(S))&&void 0!==e?e:"";O(t)},options:{showPrintMargin:!1,highlightActiveLine:!0,wrap:!0}})),M&&r.createElement("div",{className:"db-query-page__error"},M)),r.createElement(u.Zp,{title:"查询结果",titleCom:r.createElement("span",null,K?"".concat(K.row_count," 行"):"暂无结果")},K&&"table"===A&&r.createElement(i.X,{headers:D,rows:J}),K&&"json"===A&&r.createElement("pre",{className:"db-query-page__result-json"},JSON.stringify(K.rows,null,2)),!K&&!M&&r.createElement("div",{className:"db-query-page__hint"},"先输入查询语句,再执行。支持 `select`、`with`、`pragma`、`explain`。"),!K&&M&&r.createElement("div",{className:"db-query-page__hint"},M))))}}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see 502.
|
|
2
|
-
(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[502,627],{5219(t){!function(){var e=function(t,n){var r=this;e.count=(e.count||0)+1,this.count=e.count,this.isOpened=!1,this.input=i(t),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-autocomplete","list"),this.input.setAttribute("aria-expanded","false"),this.input.setAttribute("aria-controls","awesomplete_list_"+this.count),this.input.setAttribute("aria-owns","awesomplete_list_"+this.count),this.input.setAttribute("role","combobox"),this.options=n=n||{},function(t,e,n){for(var r in e){var i=e[r],o=t.input.getAttribute("data-"+r.toLowerCase());t[r]="number"==typeof i?parseInt(o):!1===i?null!==o:i instanceof Function?null:o,t[r]||0===t[r]||(t[r]=r in n?n[r]:i)}}(this,{minChars:2,maxItems:10,autoFirst:!1,data:e.DATA,filter:e.FILTER_CONTAINS,sort:!1!==n.sort&&e.SORT_BYLENGTH,container:e.CONTAINER,item:e.ITEM,replace:e.REPLACE,tabSelect:!1,listLabel:"Results List",statusNoResults:"No results found",statusXResults:"{0} results found",statusTypeXChar:"Type {0} or more characters for results"},n),this.index=-1,this.container=this.container(t),this.ul=i.create("ul",{hidden:"hidden",role:"listbox",id:"awesomplete_list_"+this.count,inside:this.container,"aria-label":this.listLabel}),this.status=i.create("span",{className:"visually-hidden",role:"status","aria-live":"assertive","aria-atomic":!0,inside:this.container,textContent:""}),this._events={input:{input:this.evaluate.bind(this),blur:this.close.bind(this,{reason:"blur"}),keydown:function(t){var e=t.keyCode;r.opened&&(13===e&&r.selected||9===e&&r.selected&&r.tabSelect?(t.preventDefault(),r.select(void 0,void 0,t)):27===e?r.close({reason:"esc"}):38!==e&&40!==e||(t.preventDefault(),r[38===e?"previous":"next"]()))}},form:{submit:this.close.bind(this,{reason:"submit"})},ul:{mousedown:function(t){t.preventDefault()},click:function(t){var e=t.target;if(e!==this){for(;e&&!/li/i.test(e.nodeName);)e=e.parentNode;e&&0===t.button&&(t.preventDefault(),r.select(e,t.target,t))}}}},i.bind(this.input,this._events.input),i.bind(this.input.form,this._events.form),i.bind(this.ul,this._events.ul),this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||n.list||[],e.all.push(this)};function n(t){var e=Array.isArray(t)?{label:t[0],value:t[1]}:"object"==typeof t&&"label"in t&&"value"in t?t:{label:t,value:t};this.label=e.label||e.value,this.value=e.value}e.prototype={set list(t){if(Array.isArray(t))this._list=t;else if("string"==typeof t&&t.indexOf(",")>-1)this._list=t.split(/\s*,\s*/);else if((t=i(t))&&t.children){var e=[];r.apply(t.children).forEach(function(t){if(!t.disabled){var n=t.textContent.trim(),r=t.value||n,i=t.label||n;""!==r&&e.push({label:i,value:r})}}),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return this.isOpened},close:function(t){this.opened&&(this.input.setAttribute("aria-expanded","false"),this.ul.setAttribute("hidden",""),this.isOpened=!1,this.index=-1,this.status.setAttribute("hidden",""),this.input.setAttribute("aria-activedescendant",""),i.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.input.setAttribute("aria-expanded","true"),this.ul.removeAttribute("hidden"),this.isOpened=!0,this.status.removeAttribute("hidden"),this.autoFirst&&-1===this.index&&this.goto(0),i.fire(this.input,"awesomplete-open")},destroy:function(){if(i.unbind(this.input,this._events.input),i.unbind(this.input.form,this._events.form),!this.options.container){var t=this.container.parentNode;t.insertBefore(this.input,this.container),t.removeChild(this.container)}this.input.removeAttribute("autocomplete"),this.input.removeAttribute("aria-autocomplete"),this.input.removeAttribute("aria-expanded"),this.input.removeAttribute("aria-controls"),this.input.removeAttribute("aria-owns"),this.input.removeAttribute("role");var n=e.all.indexOf(this);-1!==n&&e.all.splice(n,1)},next:function(){var t=this.ul.children.length;this.goto(this.index<t-1?this.index+1:t?0:-1)},previous:function(){var t=this.ul.children.length,e=this.index-1;this.goto(this.selected&&-1!==e?e:t-1)},goto:function(t){var e=this.ul.children;this.selected&&e[this.index].setAttribute("aria-selected","false"),this.index=t,t>-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.input.setAttribute("aria-activedescendant",this.ul.id+"_item_"+this.index),this.ul.scrollTop=e[t].offsetTop-this.ul.clientHeight+e[t].clientHeight,i.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e,n){if(t?this.index=i.siblingIndex(t):t=this.ul.children[this.index],t){var r=this.suggestions[this.index];i.fire(this.input,"awesomplete-select",{text:r,origin:e||t,originalEvent:n})&&(this.replace(r),this.close({reason:"select"}),i.fire(this.input,"awesomplete-selectcomplete",{text:r,originalEvent:n}))}},evaluate:function(){var t=this,e=this.input.value;e.length>=this.minChars&&this._list&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map(function(r){return new n(t.data(r,e))}).filter(function(n){return t.filter(n,e)}),!1!==this.sort&&(this.suggestions=this.suggestions.sort(this.sort)),this.suggestions=this.suggestions.slice(0,this.maxItems),this.suggestions.forEach(function(n,r){t.ul.appendChild(t.item(n,e,r))}),0===this.ul.children.length?(this.status.textContent=this.statusNoResults,this.close({reason:"nomatches"})):(this.input.setAttribute("aria-activedescendant",""),this.open(),this.status.textContent=this.statusXResults.replaceAll("{0}",this.ul.children.length))):(this.close({reason:"nomatches"}),this.minChar<=1||e.length>=this.minChars?this.status.textContent=this.statusNoResults:this.status.textContent=this.statusTypeXChar.replaceAll("{0}",this.minChars))}},e.all=[],e.FILTER_CONTAINS=function(t,e){return RegExp(i.regExpEscape(e.trim()),"i").test(t)},e.FILTER_STARTSWITH=function(t,e){return RegExp("^"+i.regExpEscape(e.trim()),"i").test(t)},e.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:t<e?-1:1},e.CONTAINER=function(t){return i.create("div",{className:"awesomplete",around:t})},e.ITEM=function(t,e,n){var r=""===e.trim()?t:t.replace(RegExp(i.regExpEscape(e.trim()),"gi"),"<mark>$&</mark>");return i.create("li",{innerHTML:r,role:"option","aria-selected":"false",tabindex:"-1",id:"awesomplete_list_"+this.count+"_item_"+n})},e.REPLACE=function(t){this.input.value=t.value},e.DATA=function(t){return t},Object.defineProperty(n.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),n.prototype.toString=n.prototype.valueOf=function(){return""+this.label};var r=Array.prototype.slice;function i(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function o(t,e){return r.call((e||document).querySelectorAll(t))}function a(){o("input.awesomplete").forEach(function(t){new e(t)})}i.create=function(t,e){var n=document.createElement(t);for(var r in e){var o=e[r];if("inside"===r)i(o).appendChild(n);else if("around"===r){var a=i(o);a.parentNode.insertBefore(n,a),n.appendChild(a),null!=a.getAttribute("autofocus")&&a.focus()}else r in n?n[r]=o:n.setAttribute(r,o)}return n},i.bind=function(t,e){if(t)for(var n in e){var r=e[n];n.split(/\s+/).forEach(function(e){t.addEventListener(e,r)})}},i.unbind=function(t,e){if(t)for(var n in e){var r=e[n];n.split(/\s+/).forEach(function(e){t.removeEventListener(e,r)})}},i.fire=function(t,e,n){var r=document.createEvent("HTMLEvents");for(var i in r.initEvent(e,!0,!0),n)r[i]=n[i];return t.dispatchEvent(r)},i.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},i.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof self&&(self.Awesomplete=e),"undefined"!=typeof Document&&("loading"!==document.readyState?a():document.addEventListener("DOMContentLoaded",a)),e.$=i,e.$$=o,t.exports&&(t.exports=e)}()},4694(t,e,n){"use strict";function r(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||o(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 i(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=o(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,l=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){s=!0,a=t},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw a}}}}function o(t,e){if(t){if("string"==typeof t)return a(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function l(t,e){var n=s(t,e);return null===n||n===t.length-1?t[0]:t[n+1]}function s(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return null}function c(t,e){var n=s(t,e);return null===n?null:t[n]}function u(t){if(!t)return{};var e,n,r,o=i(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;(void 0===e||e<a)&&(e=a),(void 0===n||n>a)&&(n=a)}}catch(t){o.e(t)}finally{o.f()}return{max:e,min:n}}function f(t,e){var n=t.indexOf(e),i=r(t);return i.splice(n,1),i}function h(){for(var t="",e=0;e<arguments.length;e++){var n=e<0||arguments.length<=e?void 0:arguments[e];0===e?("/"!==n[0]&&(n="/"+n),"/"!==n[n.length-1]&&(n+="/")):e===arguments.length-1?"/"!==n[n.list-1]&&-1===n.indexOf(".")&&(n+="/"):("/"===n[0]&&(n=n.slice(1,n.length-1)),"/"!==n[n.length-1]&&(n+="/")),t+=n}return t}function d(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=e[0],i=1;i<e.length;i++)"/"!==e[i][e[i].length-1]?r+="/"+e[i]:r+=e[i];return r}function p(t,e){var n,r=[],o=i(e);try{for(o.s();!(n=o.n()).done;){var a=n.value;r.push(t[a])}}catch(t){o.e(t)}finally{o.f()}return r}function m(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||0===t.length)return t;for(var r=0;r<t.length;r++)for(var i=t.length-1;i>r;i--){var o=e?e(t[i]):t[i],a=e?e(t[i-1]):t[i-1],l=t[i];o<a?n&&(t[i]=t[i-1],t[i-1]=l):o>a&&(n||(t[i]=t[i-1],t[i-1]=l))}return t}function v(t,e){if(0===t.length)return null;var n,r,i=(n=0,r=t.length,n===r?-1:Math.floor(Math.random()*(r-n))+n);return e&&i===e?v(t,e):t[i]}function b(t,e){if(e)for(var n=0;n<t.length;n++)if(e(t[n]))return t.splice(n,1)[0]}n.d(e,{Bd:()=>p,HS:()=>d,I:()=>b,IO:()=>h,Lr:()=>v,P1:()=>f,a7:()=>u,di:()=>m,jH:()=>l,kW:()=>c})},447(t,e,n){"use strict";n.d(e,{WA:()=>p,ZI:()=>m,Zp:()=>f,fq:()=>b,gz:()=>v,uF:()=>h,xP:()=>d});var r=n(6540),i=n(3413),o=n.n(i),a=n(505);function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return s(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var c=function(t){return t[t.common=0]="common",t[t.full=1]="full",t}(c||{});function u(t,e){var n=e===c.common?"card-content":e===c.full?"card-content full":"";return r.createElement("div",{className:"card",style:{}},r.createElement("div",{className:"card-title"},t.self_title?t.self_title:r.createElement("h2",null,t.title),r.createElement("div",{className:"not-select-div"},t.titleCom&&t.titleCom)),r.createElement("div",{className:n},t.children),r.createElement("div",{className:"card-action card-action-bottom-right"},t.rightBottomCom))}function f(t){return u(t,c.common)}function h(t){return u(t,c.full)}function d(t){var e,n,i,l=(0,r.useRef)(null);return r.createElement("div",{className:"card-text"},r.createElement("div",{className:"card-text-context"},null!==(e=t.context)&&void 0!==e?e:t.children),r.createElement("div",{className:"card-text-tip",ref:l,onClick:function(){var e,n;(0,a.lW)(null!==(e=null!==(n=t.tip_context)&&void 0!==n?n:t.context)&&void 0!==e?e:t.children),new(o())({type:"info",text:"复制完成",timeout:1e3,layout:"bottomLeft"}).show()}},null!==(n=null!==(i=t.tip_context)&&void 0!==i?i:t.context)&&void 0!==n?n:t.children))}function p(t){var e,n;return r.createElement("div",{className:"card-text"},r.createElement("div",{className:"card-text-context"},null!==(e=t.context)&&void 0!==e?e:t.children),r.createElement("div",{className:"card-text-tip"},null!==(n=t.context)&&void 0!==n?n:t.children))}function m(t){var e,n;return r.createElement("div",{className:"card floating",onKeyPress:function(e){"Enter"===e.key&&t.confirm_enter&&t.confirm_enter()}},r.createElement("div",{className:"card-title"},r.createElement("h2",null,t.title)),r.createElement("div",{className:"card-content"},t.context&&Array.isArray(t.context)?t.context.map(function(t,e){return r.createElement(r.Fragment,{key:e},t)}):t.context),r.createElement("div",{className:"card-action"},r.createElement("button",{className:"button button--flat button--grey",onClick:t.cancel},null!==(e=t.cancel_t)&&void 0!==e?e:"cancel"),r.createElement("button",{className:"button button--flat",onClick:t.confirm},null!==(n=t.confirm_t)&&void 0!==n?n:"confirm")))}function v(t){return r.createElement("div",{className:"progress-card"},r.createElement("div",{className:"progress-per"},r.createElement("div",{style:{width:"".concat(t.progress,"%")}})))}var b=function(t){var e=l((0,r.useState)("var(--iconTertiary)"),2),n=e[0],i=e[1];(0,r.useEffect)(function(){null==t.ok?null==t.success?null!=t.running&&i("var(--icon-yellow)"):!0===t.success?i("var(--icon-green)"):!1===t.success&&i("var(--icon-red)"):i(t.ok?"var(--icon-green)":"var(--iconTertiary)")},[t]);var o={width:"10px",height:"10px",borderRadius:"50%",backgroundColor:n,display:"inline-block"};return r.createElement("div",{style:o})}},3033(t,e,n){"use strict";n.d(e,{$Z:()=>f,GL:()=>b,Sm:()=>d,U6:()=>v,cA:()=>p,l6:()=>m});var r=n(6540),i=n(5219),o=n.n(i);n(9145);function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function l(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=s(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=s(r))return r;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:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}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 c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function f(t){var e=(0,r.useRef)(null),n=c(r.useState(""),2),i=n[0],o=n[1];return(0,r.useEffect)(function(){var n=t.value;null==n&&(n=""),e.current.value=n,o(t.value||"")},[t.value]),r.createElement("div",{id:"search",className:"",style:{maxWidth:t.max_width,display:t.not_mobile?"block":void 0}},r.createElement("div",{id:"input"},r.createElement("i",{className:"material-icons"},t.icon),r.createElement("input",{type:"text",ref:e,placeholder:i||t.placeholder,onChange:function(e){t.handleInputChange&&t.handleInputChange(e.target.value,e.target),o(e.target.value)},onKeyPress:function(e){"Enter"===e.key&&t.handleEnterPress&&t.handleEnterPress()}})))}function h(t){var e=(0,r.useRef)(null),n=c(r.useState(""),2),i=n[0],a=n[1],l=c(r.useState("input input--block awesomplete"),2),u=l[0],f=l[1];(0,r.useEffect)(function(){a(null==t.value?"":t.value),t.focus&&e.current&&e.current.focus(),t.no_border&&f("input input--block awesomplete input--no_border")},[t.value,t.focus,t.no_border]);var h=(0,r.useRef)(t.handleInputChange);return(0,r.useEffect)(function(){h.current=t.handleInputChange},[t.handleInputChange]),(0,r.useEffect)(function(){if(null!=t.options&&e.current){var n=t.options.map(function(t){return"object"===s(t)&&null!==t?{label:t.label,value:t.value}:String(t)}),r=new(o())(e.current,{list:n,minChars:0,autoFirst:!0}),i=function(){var t;null===(t=e.current)||void 0===t||t.dispatchEvent(new Event("input"))},l=function(t){var n,r,i,o=null!==(n=null!==(r=t.text.label)&&void 0!==r?r:t.text.value)&&void 0!==n?n:t.text,l=null!==(i=t.text.value)&&void 0!==i?i:t.text;a(o),requestAnimationFrame(function(){e.current&&(e.current.value=o)}),h.current&&h.current(l,e.current)};return e.current.addEventListener("focus",i),e.current.addEventListener("awesomplete-selectcomplete",l),function(){e.current&&(e.current.removeEventListener("focus",i),e.current.removeEventListener("awesomplete-selectcomplete",l)),r.destroy()}}},[t.options]),r.createElement(r.Fragment,null,t.placeholderOut&&r.createElement("p",null,t.placeholderOut),r.createElement("div",{style:{display:"flex",alignItems:"center",width:t.width,maxWidth:t.maxWidth}},t.left_placeholder&&r.createElement("div",{style:{flex:"0 0 auto",marginRight:"4px"}},t.left_placeholder),r.createElement("input",{style:{flex:1,minWidth:0},onClick:function(t){return t.stopPropagation()},disabled:!!t.disabled,className:u,type:t.type,placeholder:t.placeholder,onChange:function(e){var n=e.target.value;a(n),t.handleInputChange&&t.handleInputChange(n,e.target)},onKeyPress:function(e){"Enter"===e.key&&t.handlerEnter&&t.handlerEnter(e.currentTarget.value)},value:i,ref:e}),t.right_placeholder&&r.createElement("div",{style:{flex:"0 0 auto",marginLeft:"4px"}},t.right_placeholder)))}function d(t){return h(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach(function(e){l(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t))}function p(t){return h({placeholder:t.placeholder,type:"password",handleInputChange:t.handleInputChange,handlerEnter:t.handleEnterPress,maxWidth:t.maxWidth,width:t.width,value:t.value})}function m(t){return r.createElement("div",{style:{display:"flex"}},t.tip&&r.createElement("p",{className:"input input_left "},t.tip),r.createElement("select",{defaultValue:t.defaultValue,value:t.value,style:{width:t.width},disabled:!!t.disabled,className:"input input--block ".concat(t.no_border?"input--no_border":""),onChange:function(e){return t.onChange(e.target.value)}},t.options.map(function(t,e){return r.createElement("option",{key:e,value:t.value},t.title)})))}function v(t){var e;return r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"radio",checked:t.selected,name:null!==(e=t.name)&&void 0!==e?e:"common_name",value:t.value,className:"input_radio",onChange:function(){t.onchange&&t.onchange(t.value)}}),t.context)}function b(t){var e,n=c((0,r.useState)(!1),2),i=n[0],o=n[1];return(0,r.useEffect)(function(){o(!!t.selected)},[t.selected]),r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"checkbox",disabled:null!==(e=t.is_disable)&&void 0!==e&&e,checked:i,onChange:function(){t.onchange&&t.onchange()}}),t.context)}},2502(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>P});var r=n(6540),i=n(4188),o=n(4944),a=n(7444),l=n(6417),s=n(7952),c=n(5997),u=n(7022),f=n(4289),h=n(2042),d=n(3033),p=n(2389),m=n(4694),v=n(447);function b(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=A(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function g(t){return function(t){if(Array.isArray(t))return k(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||A(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 y(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,c=Object.create(s.prototype);return x(c,"_invoke",function(n,r,i){var o,l,s,c=0,u=i||[],f=!1,h={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return o=e,l=0,s=t,h.n=n,a}};function d(n,r){for(l=n,s=r,e=0;!f&&c&&!i&&e<u.length;e++){var i,o=u[e],d=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=d&&((i=n<2&&d<o[1])?(l=0,h.v=r,h.n=o[1]):d<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,l=0))}if(i||n>1)return a;throw f=!0,r}return function(i,u,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&d(u,p),l=u,s=p;(e=l<2?t:s)||!f;){o||(l?l<3?(l>1&&(h.n=-1),d(l,s)):h.n=s:h.v=s);try{if(c=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(f=h.n<0)?s:n.call(r,h))!==a)break}catch(e){o=t,l=1,s=e}finally{c=1}}return{value:e,done:f}}}(n,i,o),!0),c}var a={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][r]?e(e([][r]())):(x(e={},r,function(){return this}),e),f=c.prototype=l.prototype=Object.create(u);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,x(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=c,x(f,"constructor",c),x(c,"constructor",s),s.displayName="GeneratorFunction",x(c,i,"GeneratorFunction"),x(f),x(f,i,"Generator"),x(f,r,function(){return this}),x(f,"toString",function(){return"[object Generator]"}),(y=function(){return{w:o,m:h}})()}function x(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}x=function(t,e,n,r){function o(e,n){x(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},x(t,e,n,r)}function _(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function w(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){_(o,r,i,a,l,"next",t)}function l(t){_(o,r,i,a,l,"throw",t)}a(void 0)})}}function E(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(t,e)||A(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){if(t){if("string"==typeof t)return k(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(t,e):void 0}}function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var S,C=300,O=!1,I=0,T=!0,N=[],j=-1,L=[];function P(t){var e=E((0,a.L4)(l.A.log_viewer),2),n=e[0],x=e[1],_=(0,r.useRef)(null),A=E((0,r.useState)(0),2),k=A[0],P=A[1],R=E((0,r.useState)(100),2),H=R[0],M=R[1],D=E((0,r.useState)(!1),2),F=D[0],z=D[1],$=E((0,r.useState)(""),2),W=$[0],G=$[1],K=E((0,r.useState)(0),2),B=K[0],q=K[1],U=E((0,r.useState)(0),2),X=U[0],Z=U[1],Y=E((0,r.useState)(0),2),V=(Y[0],Y[1]),J=(0,p.Bd)().t,Q=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4?arguments[4]:void 0,o=document.createElement("div");return-1===j?o.textContent=t:o.innerHTML=t,o.style.whiteSpace="pre-wrap",o.style.overflowWrap="break-word",o.setAttribute("position","".concat(e)),o.setAttribute("start_position","".concat(n)),r?(_.current.insertBefore(o,i),N.unshift(o)):(_.current.appendChild(o),N.push(o)),o},tt=function(t){var e=(0,m.I)(N,function(e){return e===t});e&&_.current.removeChild(e)},et=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(t){var i=Array.isArray(t)?t:t.split("\n");if(r){for(var o,a=0;a<i.length;a++)o=Q(i[a],e[a],n[a],!0,0===a?_.current.firstChild:o);if(N.length>C)for(var l=N.length-1;l>=C;)tt(N[N.length-1]),l--}else{for(var s=0;s<i.length;s++)Q(i[s],e[s],n[s]);if(N.length>C)for(var c=N.length-C;c>0;)tt(N[0]),c--}}},nt=function(){var t=w(y().m(function t(){var e,r,a,l,s;return y().w(function(t){for(;;)switch(t.n){case 0:return S.encoding=n.encoding,S.context="",t.n=1,o.ws.sendData(i.HK.log_viewer,S);case 1:if(e=t.v){if(r=e.context,S=r,r.find_back_enter_index&&r.context_list.length>0)for(a=0;a<r.context_list.length;a++)l=new RegExp(r.query_text,"g"),r.context_list[a]=r.context_list[a].replace(l,'<span style="color: blue;">'.concat(r.query_text,"</span>"));S.find_back_enter_index=!1,et(r.context_list,r.context_position_list,r.context_start_position_list,S.back),S.context_list.length>0&&(S.back&&N.length>0?(S.context_list.length>N.length?P(Math.floor(100*parseInt(N[S.context_list.length-N.length].getAttribute("position"))/S.max_size)):P(Math.floor(100*parseInt(N[N.length-S.context_list.length].getAttribute("position"))/S.max_size)),T=!1):P(Math.floor(100*(null!==(s=S.context_position_list[S.context_position_list.length-1])&&void 0!==s?s:0)/S.max_size)))}case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),rt=function(t){O||(O=!0,P(100),o.ws.addMsg(i.HK.log_viewer_watch,function(t){var e=t.context;e&&(S=e,et(e.context_list,e.context_position_list,e.context_start_position_list,!1),_.current.scrollTop=_.current.scrollHeight)}),S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],S.position=t,o.ws.sendData(i.HK.log_viewer_watch,S),z(!0))},it=function(){var t=w(y().m(function t(){var e,r;return y().w(function(t){for(;;)switch(t.n){case 0:return e=function(){var t=w(y().m(function t(){var e,n,r;return y().w(function(t){for(;;)switch(t.n){case 0:if(!(e=_.current)){t.n=7;break}if(!O){t.n=1;break}return I=e.scrollTop,t.a(2);case 1:if(!(I<e.scrollTop&&N.length>0&&e.scrollTop+e.clientHeight+500>=e.scrollHeight)){t.n=4;break}if(!((n=parseInt(N[N.length-1].getAttribute("position")))>=S.max_size)){t.n=2;break}return rt(n),t.a(2);case 2:return S.line=20,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],S.back=!1,S.position=n,t.n=3,nt();case 3:t.n=6;break;case 4:if(!(I>e.scrollTop&&N.length>0&&e.scrollTop-300<=0)){t.n=6;break}if(!((r=parseInt(N[0].getAttribute("start_position")))<=0)){t.n=5;break}return T||(T=!0,(0,h.N9)("到达顶部")),I=e.scrollTop,t.a(2);case 5:return S.line=10,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],S.back=!0,S.position=r,t.n=6,nt();case 6:I=e.scrollTop;case 7:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),_.current.addEventListener("scroll",e),r=function(t){var e=_.current;if(e){t.preventDefault();t.deltaY>0?e.scrollTop+=20:e.scrollTop-=20}},_.current.addEventListener("wheel",r,{passive:!1}),z(!1),q(0),Z(0),G(""),O=!1,V(0),I=0,L=[],j=-1,N=[],(S=new u.d2).line=C,S.path="".concat((0,f.GG)("file",(0,f.vX)())).concat(n.fileName),S.token=localStorage.getItem("token"),t.n=1,nt();case 1:o.ws.addMsg(i.HK.search_file_progress,function(t){try{q(parseInt(t.context))}catch(t){(0,h.zN)(t.message)}}),o.ws.addMsg(i.HK.search_file_index,function(t){try{var e;(e=L).push.apply(e,g(t.context)),V(t.context.length)}catch(t){(0,h.zN)(t.message)}});case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),ot=function(){var t=w(y().m(function t(){return y().w(function(t){for(;;)switch(t.n){case 0:_.current&&_.current.remove(),N=[];case 1:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();if((0,r.useEffect)(function(){n.show?it():ot()},[n]),(0,r.useEffect)(function(){return function(){ot()}},[]),n.show){var at=function(){var t=w(y().m(function t(){var e,n,r,i,o;return y().w(function(t){for(;;)switch(t.p=t.n){case 0:if(S.line=C,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],e=0,t.p=1,!((e=parseInt(H))>100||e<0)){t.n=2;break}throw(0,h.zN)("范围在0-100"),"超过最大范围";case 2:n=b(N);try{for(n.s();!(r=n.n()).done;)i=r.value,_.current.removeChild(i)}catch(t){n.e(t)}finally{n.f()}N=[],t.n=4;break;case 3:return t.p=3,o=t.v,(0,h.N9)(o),t.a(2);case 4:return S.back=e>=100,S.position=Math.floor(S.max_size*(e/100)),t.n=5,nt();case 5:return t.a(2)}},t,null,[[1,3]])}));return function(){return t.apply(this,arguments)}}(),lt=function(){var t=w(y().m(function t(){var e,n,r;return y().w(function(t){for(;;)switch(t.n){case 0:if(!O){t.n=1;break}return t.a(2);case 1:S.line=C,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],e=b(N);try{for(e.s();!(n=e.n()).done;)r=n.value,_.current.removeChild(r)}catch(t){e.e(t)}finally{e.f()}return N=[],S.back=!0,S.position=S.max_size,t.n=2,nt();case 2:_.current.scrollTop=_.current.scrollHeight,rt(S.max_size);case 3:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),st=function(){var t=w(y().m(function t(){return y().w(function(t){for(;;)switch(t.n){case 0:if(W){t.n=1;break}return t.a(2);case 1:q(.1),Z(0),V(0),j=-1,L=[],S.query_text=W,S.encoding=n.encoding,o.ws.sendData(i.HK.search_file,S);case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),ct=function(){var t=w(y().m(function t(){var e,n,r,i;return y().w(function(t){for(;;)switch(t.n){case 0:if(0!==L.length){t.n=1;break}return t.a(2);case 1:S.line=C,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],e=b(N);try{for(e.s();!(n=e.n()).done;)r=n.value,_.current.removeChild(r)}catch(t){e.e(t)}finally{e.f()}return N=[],i=j+1>=L.length?0:j+1,Z(i+1),j=i,S.find_back_enter_index=!0,S.back=!1,S.position=L[j],t.n=2,nt();case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),ut=function(){var t=w(y().m(function t(){var e,n,r,i;return y().w(function(t){for(;;)switch(t.n){case 0:if(0!==L.length){t.n=1;break}return t.a(2);case 1:S.line=C,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],e=b(N);try{for(e.s();!(n=e.n()).done;)r=n.value,_.current.removeChild(r)}catch(t){e.e(t)}finally{e.f()}return N=[],i=j-1<0?L.length-1:j-1,Z(i+1),j=i,S.back=!1,S.find_back_enter_index=!0,S.position=L[j],t.n=2,nt();case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();return r.createElement("div",{id:"editor-container"},r.createElement(s.A,{ignore_tags:!0,left_children:[r.createElement(c.rA,{key:1,title:J("取消"),icon:"close",onClick:function(){x({show:!1})}}),r.createElement("div",{key:2,style:{width:"4rem"}},r.createElement(v.WA,{context:n.fileName})),r.createElement(r.Fragment,{key:3}," ",r.createElement(d.$Z,{handleEnterPress:st,placeholder:J("回车搜索整个文件"),icon:"search",value:W,handleInputChange:function(t){G(t)},max_width:"25em"})),W&&r.createElement("div",{key:5,style:{paddingLeft:"1.5rem",cursor:"pointer"},onClick:ct},"↓"),W&&r.createElement("div",{key:6,style:{paddingLeft:"1.5rem",cursor:"pointer"},onClick:ut},"↑"),W&&r.createElement("div",{key:7,style:{paddingLeft:"1.5rem"}},X,"/",L.length),W&&r.createElement("div",{key:8,style:{paddingLeft:"1.5rem"}},"搜索进度$",B,"%"),0!==B&&100!==B&&r.createElement(c.rA,{key:4,title:J("取消"),icon:"cancel",onClick:function(){o.ws.sendData(i.HK.search_file_cancel,{}),G(""),q(0)}})]},r.createElement("span",{style:{paddingRight:".5rem"}},n.encoding),F&&r.createElement(r.Fragment,null,r.createElement("span",{style:{color:"var(--icon-green)",whiteSpace:"pre"}},"正在实时监听 "),r.createElement(c.rA,{icon:"close",title:J("关闭实时"),onClick:function(){O&&(O=!1,z(!1),o.ws.sendData(i.HK.log_viewer_watch_cancel,S))}})),r.createElement("span",null,"当前加载进度",k),r.createElement(d.$Z,{max_width:"10rem",placeholder:J("跳转进度"),icon:"percent",value:H,handleInputChange:function(t){M(t)}}),r.createElement(c.rA,{icon:"play_arrow",title:J("跳转进度"),onClick:at}),r.createElement(c.rA,{icon:"text_rotate_vertical",title:J("滑动到文件最底部,实时输出"),onClick:lt})),r.createElement("div",{style:{height:"100%"}},r.createElement("div",{ref:_,style:{overflowY:"auto",height:"100%"}})))}}},1028(t,e,n){"use strict";n.d(e,{A:()=>l});var r=n(1601),i=n.n(r),o=n(6314),a=n.n(o)()(i());a.push([t.id,'.awesomplete [hidden] {\n display: none;\n}\n\n.awesomplete .visually-hidden {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n}\n\n.awesomplete {\n display: inline-block;\n position: relative;\n}\n\n.awesomplete > input {\n display: block;\n}\n\n.awesomplete > ul {\n position: absolute;\n left: 0;\n z-index: 1;\n min-width: 100%;\n box-sizing: border-box;\n list-style: none;\n padding: 0;\n margin: 0;\n background: #fff;\n}\n\n.awesomplete > ul:empty {\n display: none;\n}\n\n.awesomplete > ul {\n\tborder-radius: .3em;\n\tmargin: .2em 0 0;\n\tbackground: hsla(0,0%,100%,.9);\n\tbackground: linear-gradient(to bottom right, white, hsla(0,0%,100%,.8));\n\tborder: 1px solid rgba(0,0,0,.3);\n\tbox-shadow: .05em .2em .6em rgba(0,0,0,.2);\n\ttext-shadow: none;\n}\n\n@supports (transform: scale(0)) {\n\t.awesomplete > ul {\n\t\ttransition: .3s cubic-bezier(.4,.2,.5,1.4);\n\t\ttransform-origin: 1.43em -.43em;\n\t}\n\t\n\t.awesomplete > ul[hidden],\n\t.awesomplete > ul:empty {\n\t\topacity: 0;\n\t\ttransform: scale(0);\n\t\tdisplay: block;\n\t\tvisibility: hidden;\n\t\ttransition-timing-function: ease;\n\t}\n}\n\n\t/* Pointer */\n\t.awesomplete > ul:before {\n\t\tcontent: "";\n\t\tposition: absolute;\n\t\ttop: -.43em;\n\t\tleft: 1em;\n\t\twidth: 0; height: 0;\n\t\tpadding: .4em;\n\t\tbackground: white;\n\t\tborder: inherit;\n\t\tborder-right: 0;\n\t\tborder-bottom: 0;\n\t\t-webkit-transform: rotate(45deg);\n\t\ttransform: rotate(45deg);\n\t}\n\n\t.awesomplete > ul > li {\n\t\tposition: relative;\n\t\tpadding: .2em .5em;\n\t\tcursor: pointer;\n\t}\n\t\n\t.awesomplete > ul > li:hover {\n\t\tbackground: hsl(200, 40%, 80%);\n\t\tcolor: black;\n\t}\n\t\n\t.awesomplete > ul > li[aria-selected="true"] {\n\t\tbackground: hsl(205, 40%, 40%);\n\t\tcolor: white;\n\t}\n\t\n\t\t.awesomplete mark {\n\t\t\tbackground: hsl(65, 100%, 50%);\n\t\t}\n\t\t\n\t\t.awesomplete li:hover mark {\n\t\t\tbackground: hsl(68, 100%, 41%);\n\t\t}\n\t\t\n\t\t.awesomplete li[aria-selected="true"] mark {\n\t\t\tbackground: hsl(86, 100%, 21%);\n\t\t\tcolor: inherit;\n\t\t}\n',""]);const l=a},9145(t,e,n){"use strict";var r=n(5072),i=n.n(r),o=n(7825),a=n.n(o),l=n(7659),s=n.n(l),c=n(5056),u=n.n(c),f=n(540),h=n.n(f),d=n(1113),p=n.n(d),m=n(1028),v={};v.styleTagTransform=p(),v.setAttributes=u(),v.insert=s().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=h();i()(m.A,v),m.A&&m.A.locals&&m.A.locals}}]);
|
|
1
|
+
/*! For license information please see 502.1a98387d7790e9366c86.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[502,627],{5219(t){!function(){var e=function(t,n){var r=this;e.count=(e.count||0)+1,this.count=e.count,this.isOpened=!1,this.input=i(t),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-autocomplete","list"),this.input.setAttribute("aria-expanded","false"),this.input.setAttribute("aria-controls","awesomplete_list_"+this.count),this.input.setAttribute("aria-owns","awesomplete_list_"+this.count),this.input.setAttribute("role","combobox"),this.options=n=n||{},function(t,e,n){for(var r in e){var i=e[r],o=t.input.getAttribute("data-"+r.toLowerCase());t[r]="number"==typeof i?parseInt(o):!1===i?null!==o:i instanceof Function?null:o,t[r]||0===t[r]||(t[r]=r in n?n[r]:i)}}(this,{minChars:2,maxItems:10,autoFirst:!1,data:e.DATA,filter:e.FILTER_CONTAINS,sort:!1!==n.sort&&e.SORT_BYLENGTH,container:e.CONTAINER,item:e.ITEM,replace:e.REPLACE,tabSelect:!1,listLabel:"Results List",statusNoResults:"No results found",statusXResults:"{0} results found",statusTypeXChar:"Type {0} or more characters for results"},n),this.index=-1,this.container=this.container(t),this.ul=i.create("ul",{hidden:"hidden",role:"listbox",id:"awesomplete_list_"+this.count,inside:this.container,"aria-label":this.listLabel}),this.status=i.create("span",{className:"visually-hidden",role:"status","aria-live":"assertive","aria-atomic":!0,inside:this.container,textContent:""}),this._events={input:{input:this.evaluate.bind(this),blur:this.close.bind(this,{reason:"blur"}),keydown:function(t){var e=t.keyCode;r.opened&&(13===e&&r.selected||9===e&&r.selected&&r.tabSelect?(t.preventDefault(),r.select(void 0,void 0,t)):27===e?r.close({reason:"esc"}):38!==e&&40!==e||(t.preventDefault(),r[38===e?"previous":"next"]()))}},form:{submit:this.close.bind(this,{reason:"submit"})},ul:{mousedown:function(t){t.preventDefault()},click:function(t){var e=t.target;if(e!==this){for(;e&&!/li/i.test(e.nodeName);)e=e.parentNode;e&&0===t.button&&(t.preventDefault(),r.select(e,t.target,t))}}}},i.bind(this.input,this._events.input),i.bind(this.input.form,this._events.form),i.bind(this.ul,this._events.ul),this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||n.list||[],e.all.push(this)};function n(t){var e=Array.isArray(t)?{label:t[0],value:t[1]}:"object"==typeof t&&"label"in t&&"value"in t?t:{label:t,value:t};this.label=e.label||e.value,this.value=e.value}e.prototype={set list(t){if(Array.isArray(t))this._list=t;else if("string"==typeof t&&t.indexOf(",")>-1)this._list=t.split(/\s*,\s*/);else if((t=i(t))&&t.children){var e=[];r.apply(t.children).forEach(function(t){if(!t.disabled){var n=t.textContent.trim(),r=t.value||n,i=t.label||n;""!==r&&e.push({label:i,value:r})}}),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return this.isOpened},close:function(t){this.opened&&(this.input.setAttribute("aria-expanded","false"),this.ul.setAttribute("hidden",""),this.isOpened=!1,this.index=-1,this.status.setAttribute("hidden",""),this.input.setAttribute("aria-activedescendant",""),i.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.input.setAttribute("aria-expanded","true"),this.ul.removeAttribute("hidden"),this.isOpened=!0,this.status.removeAttribute("hidden"),this.autoFirst&&-1===this.index&&this.goto(0),i.fire(this.input,"awesomplete-open")},destroy:function(){if(i.unbind(this.input,this._events.input),i.unbind(this.input.form,this._events.form),!this.options.container){var t=this.container.parentNode;t.insertBefore(this.input,this.container),t.removeChild(this.container)}this.input.removeAttribute("autocomplete"),this.input.removeAttribute("aria-autocomplete"),this.input.removeAttribute("aria-expanded"),this.input.removeAttribute("aria-controls"),this.input.removeAttribute("aria-owns"),this.input.removeAttribute("role");var n=e.all.indexOf(this);-1!==n&&e.all.splice(n,1)},next:function(){var t=this.ul.children.length;this.goto(this.index<t-1?this.index+1:t?0:-1)},previous:function(){var t=this.ul.children.length,e=this.index-1;this.goto(this.selected&&-1!==e?e:t-1)},goto:function(t){var e=this.ul.children;this.selected&&e[this.index].setAttribute("aria-selected","false"),this.index=t,t>-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.input.setAttribute("aria-activedescendant",this.ul.id+"_item_"+this.index),this.ul.scrollTop=e[t].offsetTop-this.ul.clientHeight+e[t].clientHeight,i.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e,n){if(t?this.index=i.siblingIndex(t):t=this.ul.children[this.index],t){var r=this.suggestions[this.index];i.fire(this.input,"awesomplete-select",{text:r,origin:e||t,originalEvent:n})&&(this.replace(r),this.close({reason:"select"}),i.fire(this.input,"awesomplete-selectcomplete",{text:r,originalEvent:n}))}},evaluate:function(){var t=this,e=this.input.value;e.length>=this.minChars&&this._list&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map(function(r){return new n(t.data(r,e))}).filter(function(n){return t.filter(n,e)}),!1!==this.sort&&(this.suggestions=this.suggestions.sort(this.sort)),this.suggestions=this.suggestions.slice(0,this.maxItems),this.suggestions.forEach(function(n,r){t.ul.appendChild(t.item(n,e,r))}),0===this.ul.children.length?(this.status.textContent=this.statusNoResults,this.close({reason:"nomatches"})):(this.input.setAttribute("aria-activedescendant",""),this.open(),this.status.textContent=this.statusXResults.replaceAll("{0}",this.ul.children.length))):(this.close({reason:"nomatches"}),this.minChar<=1||e.length>=this.minChars?this.status.textContent=this.statusNoResults:this.status.textContent=this.statusTypeXChar.replaceAll("{0}",this.minChars))}},e.all=[],e.FILTER_CONTAINS=function(t,e){return RegExp(i.regExpEscape(e.trim()),"i").test(t)},e.FILTER_STARTSWITH=function(t,e){return RegExp("^"+i.regExpEscape(e.trim()),"i").test(t)},e.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:t<e?-1:1},e.CONTAINER=function(t){return i.create("div",{className:"awesomplete",around:t})},e.ITEM=function(t,e,n){var r=""===e.trim()?t:t.replace(RegExp(i.regExpEscape(e.trim()),"gi"),"<mark>$&</mark>");return i.create("li",{innerHTML:r,role:"option","aria-selected":"false",tabindex:"-1",id:"awesomplete_list_"+this.count+"_item_"+n})},e.REPLACE=function(t){this.input.value=t.value},e.DATA=function(t){return t},Object.defineProperty(n.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),n.prototype.toString=n.prototype.valueOf=function(){return""+this.label};var r=Array.prototype.slice;function i(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function o(t,e){return r.call((e||document).querySelectorAll(t))}function a(){o("input.awesomplete").forEach(function(t){new e(t)})}i.create=function(t,e){var n=document.createElement(t);for(var r in e){var o=e[r];if("inside"===r)i(o).appendChild(n);else if("around"===r){var a=i(o);a.parentNode.insertBefore(n,a),n.appendChild(a),null!=a.getAttribute("autofocus")&&a.focus()}else r in n?n[r]=o:n.setAttribute(r,o)}return n},i.bind=function(t,e){if(t)for(var n in e){var r=e[n];n.split(/\s+/).forEach(function(e){t.addEventListener(e,r)})}},i.unbind=function(t,e){if(t)for(var n in e){var r=e[n];n.split(/\s+/).forEach(function(e){t.removeEventListener(e,r)})}},i.fire=function(t,e,n){var r=document.createEvent("HTMLEvents");for(var i in r.initEvent(e,!0,!0),n)r[i]=n[i];return t.dispatchEvent(r)},i.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},i.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof self&&(self.Awesomplete=e),"undefined"!=typeof Document&&("loading"!==document.readyState?a():document.addEventListener("DOMContentLoaded",a)),e.$=i,e.$$=o,t.exports&&(t.exports=e)}()},4694(t,e,n){"use strict";function r(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||o(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 i(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=o(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,l=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){s=!0,a=t},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw a}}}}function o(t,e){if(t){if("string"==typeof t)return a(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function l(t,e){var n=s(t,e);return null===n||n===t.length-1?t[0]:t[n+1]}function s(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return null}function c(t,e){var n=s(t,e);return null===n?null:t[n]}function u(t){if(!t)return{};var e,n,r,o=i(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;(void 0===e||e<a)&&(e=a),(void 0===n||n>a)&&(n=a)}}catch(t){o.e(t)}finally{o.f()}return{max:e,min:n}}function f(t,e){var n=t.indexOf(e),i=r(t);return i.splice(n,1),i}function h(){for(var t="",e=0;e<arguments.length;e++){var n=e<0||arguments.length<=e?void 0:arguments[e];0===e?("/"!==n[0]&&(n="/"+n),"/"!==n[n.length-1]&&(n+="/")):e===arguments.length-1?"/"!==n[n.list-1]&&-1===n.indexOf(".")&&(n+="/"):("/"===n[0]&&(n=n.slice(1,n.length-1)),"/"!==n[n.length-1]&&(n+="/")),t+=n}return t}function d(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=e[0],i=1;i<e.length;i++)"/"!==e[i][e[i].length-1]?r+="/"+e[i]:r+=e[i];return r}function p(t,e){var n,r=[],o=i(e);try{for(o.s();!(n=o.n()).done;){var a=n.value;r.push(t[a])}}catch(t){o.e(t)}finally{o.f()}return r}function m(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||0===t.length)return t;for(var r=0;r<t.length;r++)for(var i=t.length-1;i>r;i--){var o=e?e(t[i]):t[i],a=e?e(t[i-1]):t[i-1],l=t[i];o<a?n&&(t[i]=t[i-1],t[i-1]=l):o>a&&(n||(t[i]=t[i-1],t[i-1]=l))}return t}function v(t,e){if(0===t.length)return null;var n,r,i=(n=0,r=t.length,n===r?-1:Math.floor(Math.random()*(r-n))+n);return e&&i===e?v(t,e):t[i]}function b(t,e){if(e)for(var n=0;n<t.length;n++)if(e(t[n]))return t.splice(n,1)[0]}n.d(e,{Bd:()=>p,HS:()=>d,I:()=>b,IO:()=>h,Lr:()=>v,P1:()=>f,a7:()=>u,di:()=>m,jH:()=>l,kW:()=>c})},447(t,e,n){"use strict";n.d(e,{WA:()=>p,ZI:()=>m,Zp:()=>f,fq:()=>b,gz:()=>v,uF:()=>h,xP:()=>d});var r=n(6540),i=n(3413),o=n.n(i),a=n(505);function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return s(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var c=function(t){return t[t.common=0]="common",t[t.full=1]="full",t}(c||{});function u(t,e){var n=e===c.common?"card-content":e===c.full?"card-content full":"";return r.createElement("div",{className:"card",style:{}},r.createElement("div",{className:"card-title"},t.self_title?t.self_title:r.createElement("h2",null,t.title),r.createElement("div",{className:"not-select-div"},t.titleCom&&t.titleCom)),r.createElement("div",{className:n},t.children),r.createElement("div",{className:"card-action card-action-bottom-right"},t.rightBottomCom))}function f(t){return u(t,c.common)}function h(t){return u(t,c.full)}function d(t){var e,n,i,l=(0,r.useRef)(null);return r.createElement("div",{className:"card-text"},r.createElement("div",{className:"card-text-context"},null!==(e=t.context)&&void 0!==e?e:t.children),r.createElement("div",{className:"card-text-tip",ref:l,onClick:function(){var e,n;(0,a.lW)(null!==(e=null!==(n=t.tip_context)&&void 0!==n?n:t.context)&&void 0!==e?e:t.children),new(o())({type:"info",text:"复制完成",timeout:1e3,layout:"bottomLeft"}).show()}},null!==(n=null!==(i=t.tip_context)&&void 0!==i?i:t.context)&&void 0!==n?n:t.children))}function p(t){var e,n;return r.createElement("div",{className:"card-text"},r.createElement("div",{className:"card-text-context"},null!==(e=t.context)&&void 0!==e?e:t.children),r.createElement("div",{className:"card-text-tip"},null!==(n=t.context)&&void 0!==n?n:t.children))}function m(t){var e,n;return r.createElement("div",{className:"card floating",onKeyPress:function(e){"Enter"===e.key&&t.confirm_enter&&t.confirm_enter()}},r.createElement("div",{className:"card-title"},r.createElement("h2",null,t.title)),r.createElement("div",{className:"card-content"},t.context&&Array.isArray(t.context)?t.context.map(function(t,e){return r.createElement(r.Fragment,{key:e},t)}):t.context),r.createElement("div",{className:"card-action"},r.createElement("button",{className:"button button--flat button--grey",onClick:t.cancel},null!==(e=t.cancel_t)&&void 0!==e?e:"cancel"),r.createElement("button",{className:"button button--flat",onClick:t.confirm},null!==(n=t.confirm_t)&&void 0!==n?n:"confirm")))}function v(t){return r.createElement("div",{className:"progress-card"},r.createElement("div",{className:"progress-per"},r.createElement("div",{style:{width:"".concat(t.progress,"%")}})))}var b=function(t){var e=l((0,r.useState)("var(--iconTertiary)"),2),n=e[0],i=e[1];(0,r.useEffect)(function(){null==t.ok?null==t.success?null!=t.running&&i("var(--icon-yellow)"):!0===t.success?i("var(--icon-green)"):!1===t.success&&i("var(--icon-red)"):i(t.ok?"var(--icon-green)":"var(--iconTertiary)")},[t]);var o={width:"10px",height:"10px",borderRadius:"50%",backgroundColor:n,display:"inline-block"};return r.createElement("div",{style:o})}},3033(t,e,n){"use strict";n.d(e,{$Z:()=>f,GL:()=>b,Sm:()=>d,U6:()=>v,cA:()=>p,l6:()=>m});var r=n(6540),i=n(5219),o=n.n(i);n(9145);function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function l(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=s(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=s(r))return r;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:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}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 c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function f(t){var e=(0,r.useRef)(null),n=c(r.useState(""),2),i=n[0],o=n[1];return(0,r.useEffect)(function(){var n=t.value;null==n&&(n=""),e.current.value=n,o(t.value||"")},[t.value]),r.createElement("div",{id:"search",className:"",style:{maxWidth:t.max_width,display:t.not_mobile?"block":void 0}},r.createElement("div",{id:"input"},r.createElement("i",{className:"material-icons"},t.icon),r.createElement("input",{type:"text",ref:e,placeholder:i||t.placeholder,onChange:function(e){t.handleInputChange&&t.handleInputChange(e.target.value,e.target),o(e.target.value)},onKeyPress:function(e){"Enter"===e.key&&t.handleEnterPress&&t.handleEnterPress()}})))}function h(t){var e=(0,r.useRef)(null),n=c(r.useState(""),2),i=n[0],a=n[1],l=c(r.useState("input input--block awesomplete"),2),u=l[0],f=l[1];(0,r.useEffect)(function(){a(null==t.value?"":t.value),t.focus&&e.current&&e.current.focus(),t.no_border&&f("input input--block awesomplete input--no_border")},[t.value,t.focus,t.no_border]);var h=(0,r.useRef)(t.handleInputChange);return(0,r.useEffect)(function(){h.current=t.handleInputChange},[t.handleInputChange]),(0,r.useEffect)(function(){if(null!=t.options&&e.current){var n=t.options.map(function(t){return"object"===s(t)&&null!==t?{label:t.label,value:t.value}:String(t)}),r=new(o())(e.current,{list:n,minChars:0,autoFirst:!0}),i=function(){var t;null===(t=e.current)||void 0===t||t.dispatchEvent(new Event("input"))},l=function(t){var n,r,i,o=null!==(n=null!==(r=t.text.label)&&void 0!==r?r:t.text.value)&&void 0!==n?n:t.text,l=null!==(i=t.text.value)&&void 0!==i?i:t.text;a(o),requestAnimationFrame(function(){e.current&&(e.current.value=o)}),h.current&&h.current(l,e.current)};return e.current.addEventListener("focus",i),e.current.addEventListener("awesomplete-selectcomplete",l),function(){e.current&&(e.current.removeEventListener("focus",i),e.current.removeEventListener("awesomplete-selectcomplete",l)),r.destroy()}}},[t.options]),r.createElement(r.Fragment,null,t.placeholderOut&&r.createElement("p",null,t.placeholderOut),r.createElement("div",{style:{display:"flex",alignItems:"center",width:t.width,maxWidth:t.maxWidth}},t.left_placeholder&&r.createElement("div",{style:{flex:"0 0 auto",marginRight:"4px"}},t.left_placeholder),r.createElement("input",{style:{flex:1,minWidth:0},onClick:function(t){return t.stopPropagation()},disabled:!!t.disabled,className:u,type:t.type,placeholder:t.placeholder,onChange:function(e){var n=e.target.value;a(n),t.handleInputChange&&t.handleInputChange(n,e.target)},onKeyPress:function(e){"Enter"===e.key&&t.handlerEnter&&t.handlerEnter(e.currentTarget.value)},value:i,ref:e}),t.right_placeholder&&r.createElement("div",{style:{flex:"0 0 auto",marginLeft:"4px"}},t.right_placeholder)))}function d(t){return h(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach(function(e){l(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t))}function p(t){return h({placeholder:t.placeholder,type:"password",handleInputChange:t.handleInputChange,handlerEnter:t.handleEnterPress,maxWidth:t.maxWidth,width:t.width,value:t.value})}function m(t){return r.createElement("div",{style:{display:"flex"}},t.tip&&r.createElement("p",{className:"input input_left "},t.tip),r.createElement("select",{defaultValue:t.defaultValue,value:t.value,style:{width:t.width},disabled:!!t.disabled,className:"input input--block ".concat(t.no_border?"input--no_border":""),onChange:function(e){return t.onChange(e.target.value)}},t.options.map(function(t,e){return r.createElement("option",{key:e,value:t.value},t.title)})))}function v(t){var e;return r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"radio",checked:t.selected,name:null!==(e=t.name)&&void 0!==e?e:"common_name",value:t.value,className:"input_radio",onChange:function(){t.onchange&&t.onchange(t.value)}}),t.context)}function b(t){var e,n=c((0,r.useState)(!1),2),i=n[0],o=n[1];return(0,r.useEffect)(function(){o(!!t.selected)},[t.selected]),r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"checkbox",disabled:null!==(e=t.is_disable)&&void 0!==e&&e,checked:i,onChange:function(){t.onchange&&t.onchange()}}),t.context)}},2502(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>P});var r=n(6540),i=n(4188),o=n(4944),a=n(7444),l=n(6417),s=n(7952),c=n(5997),u=n(7022),f=n(4289),h=n(2042),d=n(3033),p=n(2389),m=n(4694),v=n(447);function b(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=A(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function g(t){return function(t){if(Array.isArray(t))return k(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||A(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 y(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,c=Object.create(s.prototype);return x(c,"_invoke",function(n,r,i){var o,l,s,c=0,u=i||[],f=!1,h={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return o=e,l=0,s=t,h.n=n,a}};function d(n,r){for(l=n,s=r,e=0;!f&&c&&!i&&e<u.length;e++){var i,o=u[e],d=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=d&&((i=n<2&&d<o[1])?(l=0,h.v=r,h.n=o[1]):d<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,l=0))}if(i||n>1)return a;throw f=!0,r}return function(i,u,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&d(u,p),l=u,s=p;(e=l<2?t:s)||!f;){o||(l?l<3?(l>1&&(h.n=-1),d(l,s)):h.n=s:h.v=s);try{if(c=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(f=h.n<0)?s:n.call(r,h))!==a)break}catch(e){o=t,l=1,s=e}finally{c=1}}return{value:e,done:f}}}(n,i,o),!0),c}var a={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][r]?e(e([][r]())):(x(e={},r,function(){return this}),e),f=c.prototype=l.prototype=Object.create(u);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,x(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=c,x(f,"constructor",c),x(c,"constructor",s),s.displayName="GeneratorFunction",x(c,i,"GeneratorFunction"),x(f),x(f,i,"Generator"),x(f,r,function(){return this}),x(f,"toString",function(){return"[object Generator]"}),(y=function(){return{w:o,m:h}})()}function x(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}x=function(t,e,n,r){function o(e,n){x(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},x(t,e,n,r)}function _(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function w(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){_(o,r,i,a,l,"next",t)}function l(t){_(o,r,i,a,l,"throw",t)}a(void 0)})}}function E(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(t,e)||A(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){if(t){if("string"==typeof t)return k(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(t,e):void 0}}function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var S,C=300,O=!1,I=0,T=!0,N=[],j=-1,L=[];function P(t){var e=E((0,a.L4)(l.AG.log_viewer),2),n=e[0],x=e[1],_=(0,r.useRef)(null),A=E((0,r.useState)(0),2),k=A[0],P=A[1],R=E((0,r.useState)(100),2),H=R[0],M=R[1],D=E((0,r.useState)(!1),2),F=D[0],z=D[1],$=E((0,r.useState)(""),2),G=$[0],W=$[1],K=E((0,r.useState)(0),2),B=K[0],q=K[1],U=E((0,r.useState)(0),2),X=U[0],Z=U[1],Y=E((0,r.useState)(0),2),V=(Y[0],Y[1]),J=(0,p.Bd)().t,Q=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4?arguments[4]:void 0,o=document.createElement("div");return-1===j?o.textContent=t:o.innerHTML=t,o.style.whiteSpace="pre-wrap",o.style.overflowWrap="break-word",o.setAttribute("position","".concat(e)),o.setAttribute("start_position","".concat(n)),r?(_.current.insertBefore(o,i),N.unshift(o)):(_.current.appendChild(o),N.push(o)),o},tt=function(t){var e=(0,m.I)(N,function(e){return e===t});e&&_.current.removeChild(e)},et=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(t){var i=Array.isArray(t)?t:t.split("\n");if(r){for(var o,a=0;a<i.length;a++)o=Q(i[a],e[a],n[a],!0,0===a?_.current.firstChild:o);if(N.length>C)for(var l=N.length-1;l>=C;)tt(N[N.length-1]),l--}else{for(var s=0;s<i.length;s++)Q(i[s],e[s],n[s]);if(N.length>C)for(var c=N.length-C;c>0;)tt(N[0]),c--}}},nt=function(){var t=w(y().m(function t(){var e,r,a,l,s;return y().w(function(t){for(;;)switch(t.n){case 0:return S.encoding=n.encoding,S.context="",t.n=1,o.ws.sendData(i.HK.log_viewer,S);case 1:if(e=t.v){if(r=e.context,S=r,r.find_back_enter_index&&r.context_list.length>0)for(a=0;a<r.context_list.length;a++)l=new RegExp(r.query_text,"g"),r.context_list[a]=r.context_list[a].replace(l,'<span style="color: blue;">'.concat(r.query_text,"</span>"));S.find_back_enter_index=!1,et(r.context_list,r.context_position_list,r.context_start_position_list,S.back),S.context_list.length>0&&(S.back&&N.length>0?(S.context_list.length>N.length?P(Math.floor(100*parseInt(N[S.context_list.length-N.length].getAttribute("position"))/S.max_size)):P(Math.floor(100*parseInt(N[N.length-S.context_list.length].getAttribute("position"))/S.max_size)),T=!1):P(Math.floor(100*(null!==(s=S.context_position_list[S.context_position_list.length-1])&&void 0!==s?s:0)/S.max_size)))}case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),rt=function(t){O||(O=!0,P(100),o.ws.addMsg(i.HK.log_viewer_watch,function(t){var e=t.context;e&&(S=e,et(e.context_list,e.context_position_list,e.context_start_position_list,!1),_.current.scrollTop=_.current.scrollHeight)}),S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],S.position=t,o.ws.sendData(i.HK.log_viewer_watch,S),z(!0))},it=function(){var t=w(y().m(function t(){var e,r;return y().w(function(t){for(;;)switch(t.n){case 0:return e=function(){var t=w(y().m(function t(){var e,n,r;return y().w(function(t){for(;;)switch(t.n){case 0:if(!(e=_.current)){t.n=7;break}if(!O){t.n=1;break}return I=e.scrollTop,t.a(2);case 1:if(!(I<e.scrollTop&&N.length>0&&e.scrollTop+e.clientHeight+500>=e.scrollHeight)){t.n=4;break}if(!((n=parseInt(N[N.length-1].getAttribute("position")))>=S.max_size)){t.n=2;break}return rt(n),t.a(2);case 2:return S.line=20,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],S.back=!1,S.position=n,t.n=3,nt();case 3:t.n=6;break;case 4:if(!(I>e.scrollTop&&N.length>0&&e.scrollTop-300<=0)){t.n=6;break}if(!((r=parseInt(N[0].getAttribute("start_position")))<=0)){t.n=5;break}return T||(T=!0,(0,h.N9)("到达顶部")),I=e.scrollTop,t.a(2);case 5:return S.line=10,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],S.back=!0,S.position=r,t.n=6,nt();case 6:I=e.scrollTop;case 7:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),_.current.addEventListener("scroll",e),r=function(t){var e=_.current;if(e){t.preventDefault();t.deltaY>0?e.scrollTop+=20:e.scrollTop-=20}},_.current.addEventListener("wheel",r,{passive:!1}),z(!1),q(0),Z(0),W(""),O=!1,V(0),I=0,L=[],j=-1,N=[],(S=new u.d2).line=C,S.path="".concat((0,f.GG)("file",(0,f.vX)())).concat(n.fileName),S.token=localStorage.getItem("token"),t.n=1,nt();case 1:o.ws.addMsg(i.HK.search_file_progress,function(t){try{q(parseInt(t.context))}catch(t){(0,h.zN)(t.message)}}),o.ws.addMsg(i.HK.search_file_index,function(t){try{var e;(e=L).push.apply(e,g(t.context)),V(t.context.length)}catch(t){(0,h.zN)(t.message)}});case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),ot=function(){var t=w(y().m(function t(){return y().w(function(t){for(;;)switch(t.n){case 0:_.current&&_.current.remove(),N=[];case 1:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();if((0,r.useEffect)(function(){n.show?it():ot()},[n]),(0,r.useEffect)(function(){return function(){ot()}},[]),n.show){var at=function(){var t=w(y().m(function t(){var e,n,r,i,o;return y().w(function(t){for(;;)switch(t.p=t.n){case 0:if(S.line=C,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],e=0,t.p=1,!((e=parseInt(H))>100||e<0)){t.n=2;break}throw(0,h.zN)("范围在0-100"),"超过最大范围";case 2:n=b(N);try{for(n.s();!(r=n.n()).done;)i=r.value,_.current.removeChild(i)}catch(t){n.e(t)}finally{n.f()}N=[],t.n=4;break;case 3:return t.p=3,o=t.v,(0,h.N9)(o),t.a(2);case 4:return S.back=e>=100,S.position=Math.floor(S.max_size*(e/100)),t.n=5,nt();case 5:return t.a(2)}},t,null,[[1,3]])}));return function(){return t.apply(this,arguments)}}(),lt=function(){var t=w(y().m(function t(){var e,n,r;return y().w(function(t){for(;;)switch(t.n){case 0:if(!O){t.n=1;break}return t.a(2);case 1:S.line=C,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],e=b(N);try{for(e.s();!(n=e.n()).done;)r=n.value,_.current.removeChild(r)}catch(t){e.e(t)}finally{e.f()}return N=[],S.back=!0,S.position=S.max_size,t.n=2,nt();case 2:_.current.scrollTop=_.current.scrollHeight,rt(S.max_size);case 3:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),st=function(){var t=w(y().m(function t(){return y().w(function(t){for(;;)switch(t.n){case 0:if(G){t.n=1;break}return t.a(2);case 1:q(.1),Z(0),V(0),j=-1,L=[],S.query_text=G,S.encoding=n.encoding,o.ws.sendData(i.HK.search_file,S);case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),ct=function(){var t=w(y().m(function t(){var e,n,r,i;return y().w(function(t){for(;;)switch(t.n){case 0:if(0!==L.length){t.n=1;break}return t.a(2);case 1:S.line=C,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],e=b(N);try{for(e.s();!(n=e.n()).done;)r=n.value,_.current.removeChild(r)}catch(t){e.e(t)}finally{e.f()}return N=[],i=j+1>=L.length?0:j+1,Z(i+1),j=i,S.find_back_enter_index=!0,S.back=!1,S.position=L[j],t.n=2,nt();case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),ut=function(){var t=w(y().m(function t(){var e,n,r,i;return y().w(function(t){for(;;)switch(t.n){case 0:if(0!==L.length){t.n=1;break}return t.a(2);case 1:S.line=C,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],e=b(N);try{for(e.s();!(n=e.n()).done;)r=n.value,_.current.removeChild(r)}catch(t){e.e(t)}finally{e.f()}return N=[],i=j-1<0?L.length-1:j-1,Z(i+1),j=i,S.back=!1,S.find_back_enter_index=!0,S.position=L[j],t.n=2,nt();case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();return r.createElement("div",{id:"editor-container"},r.createElement(s.A,{ignore_tags:!0,left_children:[r.createElement(c.rA,{key:1,title:J("取消"),icon:"close",onClick:function(){x({show:!1})}}),r.createElement("div",{key:2,style:{width:"4rem"}},r.createElement(v.WA,{context:n.fileName})),r.createElement(r.Fragment,{key:3}," ",r.createElement(d.$Z,{handleEnterPress:st,placeholder:J("回车搜索整个文件"),icon:"search",value:G,handleInputChange:function(t){W(t)},max_width:"25em"})),G&&r.createElement("div",{key:5,style:{paddingLeft:"1.5rem",cursor:"pointer"},onClick:ct},"↓"),G&&r.createElement("div",{key:6,style:{paddingLeft:"1.5rem",cursor:"pointer"},onClick:ut},"↑"),G&&r.createElement("div",{key:7,style:{paddingLeft:"1.5rem"}},X,"/",L.length),G&&r.createElement("div",{key:8,style:{paddingLeft:"1.5rem"}},"搜索进度$",B,"%"),0!==B&&100!==B&&r.createElement(c.rA,{key:4,title:J("取消"),icon:"cancel",onClick:function(){o.ws.sendData(i.HK.search_file_cancel,{}),W(""),q(0)}})]},r.createElement("span",{style:{paddingRight:".5rem"}},n.encoding),F&&r.createElement(r.Fragment,null,r.createElement("span",{style:{color:"var(--icon-green)",whiteSpace:"pre"}},"正在实时监听 "),r.createElement(c.rA,{icon:"close",title:J("关闭实时"),onClick:function(){O&&(O=!1,z(!1),o.ws.sendData(i.HK.log_viewer_watch_cancel,S))}})),r.createElement("span",null,"当前加载进度",k),r.createElement(d.$Z,{max_width:"10rem",placeholder:J("跳转进度"),icon:"percent",value:H,handleInputChange:function(t){M(t)}}),r.createElement(c.rA,{icon:"play_arrow",title:J("跳转进度"),onClick:at}),r.createElement(c.rA,{icon:"text_rotate_vertical",title:J("滑动到文件最底部,实时输出"),onClick:lt})),r.createElement("div",{style:{height:"100%"}},r.createElement("div",{ref:_,style:{overflowY:"auto",height:"100%"}})))}}},1028(t,e,n){"use strict";n.d(e,{A:()=>l});var r=n(1601),i=n.n(r),o=n(6314),a=n.n(o)()(i());a.push([t.id,'.awesomplete [hidden] {\n display: none;\n}\n\n.awesomplete .visually-hidden {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n}\n\n.awesomplete {\n display: inline-block;\n position: relative;\n}\n\n.awesomplete > input {\n display: block;\n}\n\n.awesomplete > ul {\n position: absolute;\n left: 0;\n z-index: 1;\n min-width: 100%;\n box-sizing: border-box;\n list-style: none;\n padding: 0;\n margin: 0;\n background: #fff;\n}\n\n.awesomplete > ul:empty {\n display: none;\n}\n\n.awesomplete > ul {\n\tborder-radius: .3em;\n\tmargin: .2em 0 0;\n\tbackground: hsla(0,0%,100%,.9);\n\tbackground: linear-gradient(to bottom right, white, hsla(0,0%,100%,.8));\n\tborder: 1px solid rgba(0,0,0,.3);\n\tbox-shadow: .05em .2em .6em rgba(0,0,0,.2);\n\ttext-shadow: none;\n}\n\n@supports (transform: scale(0)) {\n\t.awesomplete > ul {\n\t\ttransition: .3s cubic-bezier(.4,.2,.5,1.4);\n\t\ttransform-origin: 1.43em -.43em;\n\t}\n\t\n\t.awesomplete > ul[hidden],\n\t.awesomplete > ul:empty {\n\t\topacity: 0;\n\t\ttransform: scale(0);\n\t\tdisplay: block;\n\t\tvisibility: hidden;\n\t\ttransition-timing-function: ease;\n\t}\n}\n\n\t/* Pointer */\n\t.awesomplete > ul:before {\n\t\tcontent: "";\n\t\tposition: absolute;\n\t\ttop: -.43em;\n\t\tleft: 1em;\n\t\twidth: 0; height: 0;\n\t\tpadding: .4em;\n\t\tbackground: white;\n\t\tborder: inherit;\n\t\tborder-right: 0;\n\t\tborder-bottom: 0;\n\t\t-webkit-transform: rotate(45deg);\n\t\ttransform: rotate(45deg);\n\t}\n\n\t.awesomplete > ul > li {\n\t\tposition: relative;\n\t\tpadding: .2em .5em;\n\t\tcursor: pointer;\n\t}\n\t\n\t.awesomplete > ul > li:hover {\n\t\tbackground: hsl(200, 40%, 80%);\n\t\tcolor: black;\n\t}\n\t\n\t.awesomplete > ul > li[aria-selected="true"] {\n\t\tbackground: hsl(205, 40%, 40%);\n\t\tcolor: white;\n\t}\n\t\n\t\t.awesomplete mark {\n\t\t\tbackground: hsl(65, 100%, 50%);\n\t\t}\n\t\t\n\t\t.awesomplete li:hover mark {\n\t\t\tbackground: hsl(68, 100%, 41%);\n\t\t}\n\t\t\n\t\t.awesomplete li[aria-selected="true"] mark {\n\t\t\tbackground: hsl(86, 100%, 21%);\n\t\t\tcolor: inherit;\n\t\t}\n',""]);const l=a},9145(t,e,n){"use strict";var r=n(5072),i=n.n(r),o=n(7825),a=n.n(o),l=n(7659),s=n.n(l),c=n(5056),u=n.n(c),f=n(540),h=n.n(f),d=n(1113),p=n.n(d),m=n(1028),v={};v.styleTagTransform=p(),v.setAttributes=u(),v.insert=s().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=h();i()(m.A,v),m.A&&m.A.locals&&m.A.locals}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see 542.
|
|
2
|
-
(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[542,627],{5219(t){!function(){var e=function(t,n){var i=this;e.count=(e.count||0)+1,this.count=e.count,this.isOpened=!1,this.input=r(t),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-autocomplete","list"),this.input.setAttribute("aria-expanded","false"),this.input.setAttribute("aria-controls","awesomplete_list_"+this.count),this.input.setAttribute("aria-owns","awesomplete_list_"+this.count),this.input.setAttribute("role","combobox"),this.options=n=n||{},function(t,e,n){for(var i in e){var r=e[i],o=t.input.getAttribute("data-"+i.toLowerCase());t[i]="number"==typeof r?parseInt(o):!1===r?null!==o:r instanceof Function?null:o,t[i]||0===t[i]||(t[i]=i in n?n[i]:r)}}(this,{minChars:2,maxItems:10,autoFirst:!1,data:e.DATA,filter:e.FILTER_CONTAINS,sort:!1!==n.sort&&e.SORT_BYLENGTH,container:e.CONTAINER,item:e.ITEM,replace:e.REPLACE,tabSelect:!1,listLabel:"Results List",statusNoResults:"No results found",statusXResults:"{0} results found",statusTypeXChar:"Type {0} or more characters for results"},n),this.index=-1,this.container=this.container(t),this.ul=r.create("ul",{hidden:"hidden",role:"listbox",id:"awesomplete_list_"+this.count,inside:this.container,"aria-label":this.listLabel}),this.status=r.create("span",{className:"visually-hidden",role:"status","aria-live":"assertive","aria-atomic":!0,inside:this.container,textContent:""}),this._events={input:{input:this.evaluate.bind(this),blur:this.close.bind(this,{reason:"blur"}),keydown:function(t){var e=t.keyCode;i.opened&&(13===e&&i.selected||9===e&&i.selected&&i.tabSelect?(t.preventDefault(),i.select(void 0,void 0,t)):27===e?i.close({reason:"esc"}):38!==e&&40!==e||(t.preventDefault(),i[38===e?"previous":"next"]()))}},form:{submit:this.close.bind(this,{reason:"submit"})},ul:{mousedown:function(t){t.preventDefault()},click:function(t){var e=t.target;if(e!==this){for(;e&&!/li/i.test(e.nodeName);)e=e.parentNode;e&&0===t.button&&(t.preventDefault(),i.select(e,t.target,t))}}}},r.bind(this.input,this._events.input),r.bind(this.input.form,this._events.form),r.bind(this.ul,this._events.ul),this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||n.list||[],e.all.push(this)};function n(t){var e=Array.isArray(t)?{label:t[0],value:t[1]}:"object"==typeof t&&"label"in t&&"value"in t?t:{label:t,value:t};this.label=e.label||e.value,this.value=e.value}e.prototype={set list(t){if(Array.isArray(t))this._list=t;else if("string"==typeof t&&t.indexOf(",")>-1)this._list=t.split(/\s*,\s*/);else if((t=r(t))&&t.children){var e=[];i.apply(t.children).forEach(function(t){if(!t.disabled){var n=t.textContent.trim(),i=t.value||n,r=t.label||n;""!==i&&e.push({label:r,value:i})}}),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return this.isOpened},close:function(t){this.opened&&(this.input.setAttribute("aria-expanded","false"),this.ul.setAttribute("hidden",""),this.isOpened=!1,this.index=-1,this.status.setAttribute("hidden",""),this.input.setAttribute("aria-activedescendant",""),r.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.input.setAttribute("aria-expanded","true"),this.ul.removeAttribute("hidden"),this.isOpened=!0,this.status.removeAttribute("hidden"),this.autoFirst&&-1===this.index&&this.goto(0),r.fire(this.input,"awesomplete-open")},destroy:function(){if(r.unbind(this.input,this._events.input),r.unbind(this.input.form,this._events.form),!this.options.container){var t=this.container.parentNode;t.insertBefore(this.input,this.container),t.removeChild(this.container)}this.input.removeAttribute("autocomplete"),this.input.removeAttribute("aria-autocomplete"),this.input.removeAttribute("aria-expanded"),this.input.removeAttribute("aria-controls"),this.input.removeAttribute("aria-owns"),this.input.removeAttribute("role");var n=e.all.indexOf(this);-1!==n&&e.all.splice(n,1)},next:function(){var t=this.ul.children.length;this.goto(this.index<t-1?this.index+1:t?0:-1)},previous:function(){var t=this.ul.children.length,e=this.index-1;this.goto(this.selected&&-1!==e?e:t-1)},goto:function(t){var e=this.ul.children;this.selected&&e[this.index].setAttribute("aria-selected","false"),this.index=t,t>-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.input.setAttribute("aria-activedescendant",this.ul.id+"_item_"+this.index),this.ul.scrollTop=e[t].offsetTop-this.ul.clientHeight+e[t].clientHeight,r.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e,n){if(t?this.index=r.siblingIndex(t):t=this.ul.children[this.index],t){var i=this.suggestions[this.index];r.fire(this.input,"awesomplete-select",{text:i,origin:e||t,originalEvent:n})&&(this.replace(i),this.close({reason:"select"}),r.fire(this.input,"awesomplete-selectcomplete",{text:i,originalEvent:n}))}},evaluate:function(){var t=this,e=this.input.value;e.length>=this.minChars&&this._list&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map(function(i){return new n(t.data(i,e))}).filter(function(n){return t.filter(n,e)}),!1!==this.sort&&(this.suggestions=this.suggestions.sort(this.sort)),this.suggestions=this.suggestions.slice(0,this.maxItems),this.suggestions.forEach(function(n,i){t.ul.appendChild(t.item(n,e,i))}),0===this.ul.children.length?(this.status.textContent=this.statusNoResults,this.close({reason:"nomatches"})):(this.input.setAttribute("aria-activedescendant",""),this.open(),this.status.textContent=this.statusXResults.replaceAll("{0}",this.ul.children.length))):(this.close({reason:"nomatches"}),this.minChar<=1||e.length>=this.minChars?this.status.textContent=this.statusNoResults:this.status.textContent=this.statusTypeXChar.replaceAll("{0}",this.minChars))}},e.all=[],e.FILTER_CONTAINS=function(t,e){return RegExp(r.regExpEscape(e.trim()),"i").test(t)},e.FILTER_STARTSWITH=function(t,e){return RegExp("^"+r.regExpEscape(e.trim()),"i").test(t)},e.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:t<e?-1:1},e.CONTAINER=function(t){return r.create("div",{className:"awesomplete",around:t})},e.ITEM=function(t,e,n){var i=""===e.trim()?t:t.replace(RegExp(r.regExpEscape(e.trim()),"gi"),"<mark>$&</mark>");return r.create("li",{innerHTML:i,role:"option","aria-selected":"false",tabindex:"-1",id:"awesomplete_list_"+this.count+"_item_"+n})},e.REPLACE=function(t){this.input.value=t.value},e.DATA=function(t){return t},Object.defineProperty(n.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),n.prototype.toString=n.prototype.valueOf=function(){return""+this.label};var i=Array.prototype.slice;function r(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function o(t,e){return i.call((e||document).querySelectorAll(t))}function a(){o("input.awesomplete").forEach(function(t){new e(t)})}r.create=function(t,e){var n=document.createElement(t);for(var i in e){var o=e[i];if("inside"===i)r(o).appendChild(n);else if("around"===i){var a=r(o);a.parentNode.insertBefore(n,a),n.appendChild(a),null!=a.getAttribute("autofocus")&&a.focus()}else i in n?n[i]=o:n.setAttribute(i,o)}return n},r.bind=function(t,e){if(t)for(var n in e){var i=e[n];n.split(/\s+/).forEach(function(e){t.addEventListener(e,i)})}},r.unbind=function(t,e){if(t)for(var n in e){var i=e[n];n.split(/\s+/).forEach(function(e){t.removeEventListener(e,i)})}},r.fire=function(t,e,n){var i=document.createEvent("HTMLEvents");for(var r in i.initEvent(e,!0,!0),n)i[r]=n[r];return t.dispatchEvent(i)},r.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},r.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof self&&(self.Awesomplete=e),"undefined"!=typeof Document&&("loading"!==document.readyState?a():document.addEventListener("DOMContentLoaded",a)),e.$=r,e.$$=o,t.exports&&(t.exports=e)}()},3033(t,e,n){"use strict";n.d(e,{$Z:()=>h,GL:()=>b,Sm:()=>d,U6:()=>v,cA:()=>f,l6:()=>m});var i=n(6540),r=n(5219),o=n.n(r);n(9145);function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function s(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=l(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=l(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==l(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}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 u(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){u=!0,r=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return c(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?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 n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function h(t){var e=(0,i.useRef)(null),n=u(i.useState(""),2),r=n[0],o=n[1];return(0,i.useEffect)(function(){var n=t.value;null==n&&(n=""),e.current.value=n,o(t.value||"")},[t.value]),i.createElement("div",{id:"search",className:"",style:{maxWidth:t.max_width,display:t.not_mobile?"block":void 0}},i.createElement("div",{id:"input"},i.createElement("i",{className:"material-icons"},t.icon),i.createElement("input",{type:"text",ref:e,placeholder:r||t.placeholder,onChange:function(e){t.handleInputChange&&t.handleInputChange(e.target.value,e.target),o(e.target.value)},onKeyPress:function(e){"Enter"===e.key&&t.handleEnterPress&&t.handleEnterPress()}})))}function p(t){var e=(0,i.useRef)(null),n=u(i.useState(""),2),r=n[0],a=n[1],s=u(i.useState("input input--block awesomplete"),2),c=s[0],h=s[1];(0,i.useEffect)(function(){a(null==t.value?"":t.value),t.focus&&e.current&&e.current.focus(),t.no_border&&h("input input--block awesomplete input--no_border")},[t.value,t.focus,t.no_border]);var p=(0,i.useRef)(t.handleInputChange);return(0,i.useEffect)(function(){p.current=t.handleInputChange},[t.handleInputChange]),(0,i.useEffect)(function(){if(null!=t.options&&e.current){var n=t.options.map(function(t){return"object"===l(t)&&null!==t?{label:t.label,value:t.value}:String(t)}),i=new(o())(e.current,{list:n,minChars:0,autoFirst:!0}),r=function(){var t;null===(t=e.current)||void 0===t||t.dispatchEvent(new Event("input"))},s=function(t){var n,i,r,o=null!==(n=null!==(i=t.text.label)&&void 0!==i?i:t.text.value)&&void 0!==n?n:t.text,s=null!==(r=t.text.value)&&void 0!==r?r:t.text;a(o),requestAnimationFrame(function(){e.current&&(e.current.value=o)}),p.current&&p.current(s,e.current)};return e.current.addEventListener("focus",r),e.current.addEventListener("awesomplete-selectcomplete",s),function(){e.current&&(e.current.removeEventListener("focus",r),e.current.removeEventListener("awesomplete-selectcomplete",s)),i.destroy()}}},[t.options]),i.createElement(i.Fragment,null,t.placeholderOut&&i.createElement("p",null,t.placeholderOut),i.createElement("div",{style:{display:"flex",alignItems:"center",width:t.width,maxWidth:t.maxWidth}},t.left_placeholder&&i.createElement("div",{style:{flex:"0 0 auto",marginRight:"4px"}},t.left_placeholder),i.createElement("input",{style:{flex:1,minWidth:0},onClick:function(t){return t.stopPropagation()},disabled:!!t.disabled,className:c,type:t.type,placeholder:t.placeholder,onChange:function(e){var n=e.target.value;a(n),t.handleInputChange&&t.handleInputChange(n,e.target)},onKeyPress:function(e){"Enter"===e.key&&t.handlerEnter&&t.handlerEnter(e.currentTarget.value)},value:r,ref:e}),t.right_placeholder&&i.createElement("div",{style:{flex:"0 0 auto",marginLeft:"4px"}},t.right_placeholder)))}function d(t){return p(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach(function(e){s(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t))}function f(t){return p({placeholder:t.placeholder,type:"password",handleInputChange:t.handleInputChange,handlerEnter:t.handleEnterPress,maxWidth:t.maxWidth,width:t.width,value:t.value})}function m(t){return i.createElement("div",{style:{display:"flex"}},t.tip&&i.createElement("p",{className:"input input_left "},t.tip),i.createElement("select",{defaultValue:t.defaultValue,value:t.value,style:{width:t.width},disabled:!!t.disabled,className:"input input--block ".concat(t.no_border?"input--no_border":""),onChange:function(e){return t.onChange(e.target.value)}},t.options.map(function(t,e){return i.createElement("option",{key:e,value:t.value},t.title)})))}function v(t){var e;return i.createElement("div",{className:"input_radio_row"},i.createElement("input",{type:"radio",checked:t.selected,name:null!==(e=t.name)&&void 0!==e?e:"common_name",value:t.value,className:"input_radio",onChange:function(){t.onchange&&t.onchange(t.value)}}),t.context)}function b(t){var e,n=u((0,i.useState)(!1),2),r=n[0],o=n[1];return(0,i.useEffect)(function(){o(!!t.selected)},[t.selected]),i.createElement("div",{className:"input_radio_row"},i.createElement("input",{type:"checkbox",disabled:null!==(e=t.is_disable)&&void 0!==e&&e,checked:r,onChange:function(){t.onchange&&t.onchange()}}),t.context)}},2542(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>w});var i=n(1728),r=n(6540),o=n(7444),a=n(3033),s=n(5997),l=n(7767),u=n(4284),c=n(6417),h=n(5725),p=n(2389),d=n(7523),f=n(2042),m=n(1469);function v(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function o(n,i,r,o){var l=i&&i.prototype instanceof s?i:s,u=Object.create(l.prototype);return b(u,"_invoke",function(n,i,r){var o,s,l,u=0,c=r||[],h=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return o=e,s=0,l=t,p.n=n,a}};function d(n,i){for(s=n,l=i,e=0;!h&&u&&!r&&e<c.length;e++){var r,o=c[e],d=p.p,f=o[2];n>3?(r=f===i)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=d&&((r=n<2&&d<o[1])?(s=0,p.v=i,p.n=o[1]):d<f&&(r=n<3||o[0]>i||i>f)&&(o[4]=n,o[5]=i,p.n=f,s=0))}if(r||n>1)return a;throw h=!0,i}return function(r,c,f){if(u>1)throw TypeError("Generator is already running");for(h&&1===c&&d(c,f),s=c,l=f;(e=s<2?t:l)||!h;){o||(s?s<3?(s>1&&(p.n=-1),d(s,l)):p.n=l:p.v=l);try{if(u=2,o){if(s||(r="next"),e=o[r]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+r+"' method"),s=1);o=t}else if((e=(h=p.n<0)?l:n.call(i,p))!==a)break}catch(e){o=t,s=1,l=e}finally{u=1}}return{value:e,done:h}}}(n,r,o),!0),u}var a={};function s(){}function l(){}function u(){}e=Object.getPrototypeOf;var c=[][i]?e(e([][i]())):(b(e={},i,function(){return this}),e),h=u.prototype=s.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,b(t,r,"GeneratorFunction")),t.prototype=Object.create(h),t}return l.prototype=u,b(h,"constructor",u),b(u,"constructor",l),l.displayName="GeneratorFunction",b(u,r,"GeneratorFunction"),b(h),b(h,r,"Generator"),b(h,i,function(){return this}),b(h,"toString",function(){return"[object Generator]"}),(v=function(){return{w:o,m:p}})()}function b(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}b=function(t,e,n,i){function o(e,n){b(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},b(t,e,n,i)}function g(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}function y(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){u=!0,r=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return E(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?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 n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}m.m.init();const w=function(){var t,e=(0,l.Zp)(),n=y((0,r.useState)(""),2),b=n[0],E=n[1],w=y((0,r.useState)(""),2),x=w[0],A=w[1],_=(0,r.useContext)(d.F).initUserInfo,O=y((0,o.L4)(c.A.custom_fun_opt),2),C=(O[0],O[1]),S=(0,p.Bd)().t;function k(){return T.apply(this,arguments)}function T(){var t;return t=v().m(function t(){var n,i;return v().w(function(t){for(;;)switch(t.n){case 0:return n={username:b,password:x},t.n=1,u.wm.post("login",n,!1);case 1:0===(i=t.v).code?(localStorage.setItem("token",i.data),_(),C(""),e("/file")):(0,f.zN)(i.message);case 2:return t.a(2)}},t)}),T=function(){var e=this,n=arguments;return new Promise(function(i,r){var o=t.apply(e,n);function a(t){g(o,i,r,a,s,"next",t)}function s(t){g(o,i,r,a,s,"throw",t)}a(void 0)})},T.apply(this,arguments)}return(0,r.useEffect)(function(){localStorage.getItem("token")&&e("/file")},[]),r.createElement(h.Y5,null,r.createElement("h1",null,null!==(t=m.m.web_site_title)&&void 0!==t?t:"FileCat"),r.createElement("div",{className:"self_win_center_content"},r.createElement(a.Sm,{placeholder:S("账号"),handleInputChange:function(t){E(t)}}),r.createElement(a.cA,{placeholder:S("密码"),handleInputChange:function(t){A(t)},handleEnterPress:k}),r.createElement(s.$n,{text:S("登录"),clickFun:k}),i.A.has("tcp_client_num_id")&&r.createElement(s.$n,{text:S("代理退出"),clickFun:function(){i.A.delete("tcp_client_num_id"),window.location.reload()}})))}},1028(t,e,n){"use strict";n.d(e,{A:()=>s});var i=n(1601),r=n.n(i),o=n(6314),a=n.n(o)()(r());a.push([t.id,'.awesomplete [hidden] {\n display: none;\n}\n\n.awesomplete .visually-hidden {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n}\n\n.awesomplete {\n display: inline-block;\n position: relative;\n}\n\n.awesomplete > input {\n display: block;\n}\n\n.awesomplete > ul {\n position: absolute;\n left: 0;\n z-index: 1;\n min-width: 100%;\n box-sizing: border-box;\n list-style: none;\n padding: 0;\n margin: 0;\n background: #fff;\n}\n\n.awesomplete > ul:empty {\n display: none;\n}\n\n.awesomplete > ul {\n\tborder-radius: .3em;\n\tmargin: .2em 0 0;\n\tbackground: hsla(0,0%,100%,.9);\n\tbackground: linear-gradient(to bottom right, white, hsla(0,0%,100%,.8));\n\tborder: 1px solid rgba(0,0,0,.3);\n\tbox-shadow: .05em .2em .6em rgba(0,0,0,.2);\n\ttext-shadow: none;\n}\n\n@supports (transform: scale(0)) {\n\t.awesomplete > ul {\n\t\ttransition: .3s cubic-bezier(.4,.2,.5,1.4);\n\t\ttransform-origin: 1.43em -.43em;\n\t}\n\t\n\t.awesomplete > ul[hidden],\n\t.awesomplete > ul:empty {\n\t\topacity: 0;\n\t\ttransform: scale(0);\n\t\tdisplay: block;\n\t\tvisibility: hidden;\n\t\ttransition-timing-function: ease;\n\t}\n}\n\n\t/* Pointer */\n\t.awesomplete > ul:before {\n\t\tcontent: "";\n\t\tposition: absolute;\n\t\ttop: -.43em;\n\t\tleft: 1em;\n\t\twidth: 0; height: 0;\n\t\tpadding: .4em;\n\t\tbackground: white;\n\t\tborder: inherit;\n\t\tborder-right: 0;\n\t\tborder-bottom: 0;\n\t\t-webkit-transform: rotate(45deg);\n\t\ttransform: rotate(45deg);\n\t}\n\n\t.awesomplete > ul > li {\n\t\tposition: relative;\n\t\tpadding: .2em .5em;\n\t\tcursor: pointer;\n\t}\n\t\n\t.awesomplete > ul > li:hover {\n\t\tbackground: hsl(200, 40%, 80%);\n\t\tcolor: black;\n\t}\n\t\n\t.awesomplete > ul > li[aria-selected="true"] {\n\t\tbackground: hsl(205, 40%, 40%);\n\t\tcolor: white;\n\t}\n\t\n\t\t.awesomplete mark {\n\t\t\tbackground: hsl(65, 100%, 50%);\n\t\t}\n\t\t\n\t\t.awesomplete li:hover mark {\n\t\t\tbackground: hsl(68, 100%, 41%);\n\t\t}\n\t\t\n\t\t.awesomplete li[aria-selected="true"] mark {\n\t\t\tbackground: hsl(86, 100%, 21%);\n\t\t\tcolor: inherit;\n\t\t}\n',""]);const s=a},9145(t,e,n){"use strict";var i=n(5072),r=n.n(i),o=n(7825),a=n.n(o),s=n(7659),l=n.n(s),u=n(5056),c=n.n(u),h=n(540),p=n.n(h),d=n(1113),f=n.n(d),m=n(1028),v={};v.styleTagTransform=f(),v.setAttributes=c(),v.insert=l().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=p();r()(m.A,v),m.A&&m.A.locals&&m.A.locals}}]);
|
|
1
|
+
/*! For license information please see 542.8bb8a93ba9aa1759d85e.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[542,627],{5219(t){!function(){var e=function(t,n){var i=this;e.count=(e.count||0)+1,this.count=e.count,this.isOpened=!1,this.input=r(t),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-autocomplete","list"),this.input.setAttribute("aria-expanded","false"),this.input.setAttribute("aria-controls","awesomplete_list_"+this.count),this.input.setAttribute("aria-owns","awesomplete_list_"+this.count),this.input.setAttribute("role","combobox"),this.options=n=n||{},function(t,e,n){for(var i in e){var r=e[i],o=t.input.getAttribute("data-"+i.toLowerCase());t[i]="number"==typeof r?parseInt(o):!1===r?null!==o:r instanceof Function?null:o,t[i]||0===t[i]||(t[i]=i in n?n[i]:r)}}(this,{minChars:2,maxItems:10,autoFirst:!1,data:e.DATA,filter:e.FILTER_CONTAINS,sort:!1!==n.sort&&e.SORT_BYLENGTH,container:e.CONTAINER,item:e.ITEM,replace:e.REPLACE,tabSelect:!1,listLabel:"Results List",statusNoResults:"No results found",statusXResults:"{0} results found",statusTypeXChar:"Type {0} or more characters for results"},n),this.index=-1,this.container=this.container(t),this.ul=r.create("ul",{hidden:"hidden",role:"listbox",id:"awesomplete_list_"+this.count,inside:this.container,"aria-label":this.listLabel}),this.status=r.create("span",{className:"visually-hidden",role:"status","aria-live":"assertive","aria-atomic":!0,inside:this.container,textContent:""}),this._events={input:{input:this.evaluate.bind(this),blur:this.close.bind(this,{reason:"blur"}),keydown:function(t){var e=t.keyCode;i.opened&&(13===e&&i.selected||9===e&&i.selected&&i.tabSelect?(t.preventDefault(),i.select(void 0,void 0,t)):27===e?i.close({reason:"esc"}):38!==e&&40!==e||(t.preventDefault(),i[38===e?"previous":"next"]()))}},form:{submit:this.close.bind(this,{reason:"submit"})},ul:{mousedown:function(t){t.preventDefault()},click:function(t){var e=t.target;if(e!==this){for(;e&&!/li/i.test(e.nodeName);)e=e.parentNode;e&&0===t.button&&(t.preventDefault(),i.select(e,t.target,t))}}}},r.bind(this.input,this._events.input),r.bind(this.input.form,this._events.form),r.bind(this.ul,this._events.ul),this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||n.list||[],e.all.push(this)};function n(t){var e=Array.isArray(t)?{label:t[0],value:t[1]}:"object"==typeof t&&"label"in t&&"value"in t?t:{label:t,value:t};this.label=e.label||e.value,this.value=e.value}e.prototype={set list(t){if(Array.isArray(t))this._list=t;else if("string"==typeof t&&t.indexOf(",")>-1)this._list=t.split(/\s*,\s*/);else if((t=r(t))&&t.children){var e=[];i.apply(t.children).forEach(function(t){if(!t.disabled){var n=t.textContent.trim(),i=t.value||n,r=t.label||n;""!==i&&e.push({label:r,value:i})}}),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return this.isOpened},close:function(t){this.opened&&(this.input.setAttribute("aria-expanded","false"),this.ul.setAttribute("hidden",""),this.isOpened=!1,this.index=-1,this.status.setAttribute("hidden",""),this.input.setAttribute("aria-activedescendant",""),r.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.input.setAttribute("aria-expanded","true"),this.ul.removeAttribute("hidden"),this.isOpened=!0,this.status.removeAttribute("hidden"),this.autoFirst&&-1===this.index&&this.goto(0),r.fire(this.input,"awesomplete-open")},destroy:function(){if(r.unbind(this.input,this._events.input),r.unbind(this.input.form,this._events.form),!this.options.container){var t=this.container.parentNode;t.insertBefore(this.input,this.container),t.removeChild(this.container)}this.input.removeAttribute("autocomplete"),this.input.removeAttribute("aria-autocomplete"),this.input.removeAttribute("aria-expanded"),this.input.removeAttribute("aria-controls"),this.input.removeAttribute("aria-owns"),this.input.removeAttribute("role");var n=e.all.indexOf(this);-1!==n&&e.all.splice(n,1)},next:function(){var t=this.ul.children.length;this.goto(this.index<t-1?this.index+1:t?0:-1)},previous:function(){var t=this.ul.children.length,e=this.index-1;this.goto(this.selected&&-1!==e?e:t-1)},goto:function(t){var e=this.ul.children;this.selected&&e[this.index].setAttribute("aria-selected","false"),this.index=t,t>-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.input.setAttribute("aria-activedescendant",this.ul.id+"_item_"+this.index),this.ul.scrollTop=e[t].offsetTop-this.ul.clientHeight+e[t].clientHeight,r.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e,n){if(t?this.index=r.siblingIndex(t):t=this.ul.children[this.index],t){var i=this.suggestions[this.index];r.fire(this.input,"awesomplete-select",{text:i,origin:e||t,originalEvent:n})&&(this.replace(i),this.close({reason:"select"}),r.fire(this.input,"awesomplete-selectcomplete",{text:i,originalEvent:n}))}},evaluate:function(){var t=this,e=this.input.value;e.length>=this.minChars&&this._list&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map(function(i){return new n(t.data(i,e))}).filter(function(n){return t.filter(n,e)}),!1!==this.sort&&(this.suggestions=this.suggestions.sort(this.sort)),this.suggestions=this.suggestions.slice(0,this.maxItems),this.suggestions.forEach(function(n,i){t.ul.appendChild(t.item(n,e,i))}),0===this.ul.children.length?(this.status.textContent=this.statusNoResults,this.close({reason:"nomatches"})):(this.input.setAttribute("aria-activedescendant",""),this.open(),this.status.textContent=this.statusXResults.replaceAll("{0}",this.ul.children.length))):(this.close({reason:"nomatches"}),this.minChar<=1||e.length>=this.minChars?this.status.textContent=this.statusNoResults:this.status.textContent=this.statusTypeXChar.replaceAll("{0}",this.minChars))}},e.all=[],e.FILTER_CONTAINS=function(t,e){return RegExp(r.regExpEscape(e.trim()),"i").test(t)},e.FILTER_STARTSWITH=function(t,e){return RegExp("^"+r.regExpEscape(e.trim()),"i").test(t)},e.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:t<e?-1:1},e.CONTAINER=function(t){return r.create("div",{className:"awesomplete",around:t})},e.ITEM=function(t,e,n){var i=""===e.trim()?t:t.replace(RegExp(r.regExpEscape(e.trim()),"gi"),"<mark>$&</mark>");return r.create("li",{innerHTML:i,role:"option","aria-selected":"false",tabindex:"-1",id:"awesomplete_list_"+this.count+"_item_"+n})},e.REPLACE=function(t){this.input.value=t.value},e.DATA=function(t){return t},Object.defineProperty(n.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),n.prototype.toString=n.prototype.valueOf=function(){return""+this.label};var i=Array.prototype.slice;function r(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function o(t,e){return i.call((e||document).querySelectorAll(t))}function a(){o("input.awesomplete").forEach(function(t){new e(t)})}r.create=function(t,e){var n=document.createElement(t);for(var i in e){var o=e[i];if("inside"===i)r(o).appendChild(n);else if("around"===i){var a=r(o);a.parentNode.insertBefore(n,a),n.appendChild(a),null!=a.getAttribute("autofocus")&&a.focus()}else i in n?n[i]=o:n.setAttribute(i,o)}return n},r.bind=function(t,e){if(t)for(var n in e){var i=e[n];n.split(/\s+/).forEach(function(e){t.addEventListener(e,i)})}},r.unbind=function(t,e){if(t)for(var n in e){var i=e[n];n.split(/\s+/).forEach(function(e){t.removeEventListener(e,i)})}},r.fire=function(t,e,n){var i=document.createEvent("HTMLEvents");for(var r in i.initEvent(e,!0,!0),n)i[r]=n[r];return t.dispatchEvent(i)},r.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},r.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof self&&(self.Awesomplete=e),"undefined"!=typeof Document&&("loading"!==document.readyState?a():document.addEventListener("DOMContentLoaded",a)),e.$=r,e.$$=o,t.exports&&(t.exports=e)}()},3033(t,e,n){"use strict";n.d(e,{$Z:()=>h,GL:()=>b,Sm:()=>d,U6:()=>v,cA:()=>f,l6:()=>m});var i=n(6540),r=n(5219),o=n.n(r);n(9145);function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function s(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=l(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=l(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==l(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}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 u(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){u=!0,r=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return c(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?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 n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function h(t){var e=(0,i.useRef)(null),n=u(i.useState(""),2),r=n[0],o=n[1];return(0,i.useEffect)(function(){var n=t.value;null==n&&(n=""),e.current.value=n,o(t.value||"")},[t.value]),i.createElement("div",{id:"search",className:"",style:{maxWidth:t.max_width,display:t.not_mobile?"block":void 0}},i.createElement("div",{id:"input"},i.createElement("i",{className:"material-icons"},t.icon),i.createElement("input",{type:"text",ref:e,placeholder:r||t.placeholder,onChange:function(e){t.handleInputChange&&t.handleInputChange(e.target.value,e.target),o(e.target.value)},onKeyPress:function(e){"Enter"===e.key&&t.handleEnterPress&&t.handleEnterPress()}})))}function p(t){var e=(0,i.useRef)(null),n=u(i.useState(""),2),r=n[0],a=n[1],s=u(i.useState("input input--block awesomplete"),2),c=s[0],h=s[1];(0,i.useEffect)(function(){a(null==t.value?"":t.value),t.focus&&e.current&&e.current.focus(),t.no_border&&h("input input--block awesomplete input--no_border")},[t.value,t.focus,t.no_border]);var p=(0,i.useRef)(t.handleInputChange);return(0,i.useEffect)(function(){p.current=t.handleInputChange},[t.handleInputChange]),(0,i.useEffect)(function(){if(null!=t.options&&e.current){var n=t.options.map(function(t){return"object"===l(t)&&null!==t?{label:t.label,value:t.value}:String(t)}),i=new(o())(e.current,{list:n,minChars:0,autoFirst:!0}),r=function(){var t;null===(t=e.current)||void 0===t||t.dispatchEvent(new Event("input"))},s=function(t){var n,i,r,o=null!==(n=null!==(i=t.text.label)&&void 0!==i?i:t.text.value)&&void 0!==n?n:t.text,s=null!==(r=t.text.value)&&void 0!==r?r:t.text;a(o),requestAnimationFrame(function(){e.current&&(e.current.value=o)}),p.current&&p.current(s,e.current)};return e.current.addEventListener("focus",r),e.current.addEventListener("awesomplete-selectcomplete",s),function(){e.current&&(e.current.removeEventListener("focus",r),e.current.removeEventListener("awesomplete-selectcomplete",s)),i.destroy()}}},[t.options]),i.createElement(i.Fragment,null,t.placeholderOut&&i.createElement("p",null,t.placeholderOut),i.createElement("div",{style:{display:"flex",alignItems:"center",width:t.width,maxWidth:t.maxWidth}},t.left_placeholder&&i.createElement("div",{style:{flex:"0 0 auto",marginRight:"4px"}},t.left_placeholder),i.createElement("input",{style:{flex:1,minWidth:0},onClick:function(t){return t.stopPropagation()},disabled:!!t.disabled,className:c,type:t.type,placeholder:t.placeholder,onChange:function(e){var n=e.target.value;a(n),t.handleInputChange&&t.handleInputChange(n,e.target)},onKeyPress:function(e){"Enter"===e.key&&t.handlerEnter&&t.handlerEnter(e.currentTarget.value)},value:r,ref:e}),t.right_placeholder&&i.createElement("div",{style:{flex:"0 0 auto",marginLeft:"4px"}},t.right_placeholder)))}function d(t){return p(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach(function(e){s(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t))}function f(t){return p({placeholder:t.placeholder,type:"password",handleInputChange:t.handleInputChange,handlerEnter:t.handleEnterPress,maxWidth:t.maxWidth,width:t.width,value:t.value})}function m(t){return i.createElement("div",{style:{display:"flex"}},t.tip&&i.createElement("p",{className:"input input_left "},t.tip),i.createElement("select",{defaultValue:t.defaultValue,value:t.value,style:{width:t.width},disabled:!!t.disabled,className:"input input--block ".concat(t.no_border?"input--no_border":""),onChange:function(e){return t.onChange(e.target.value)}},t.options.map(function(t,e){return i.createElement("option",{key:e,value:t.value},t.title)})))}function v(t){var e;return i.createElement("div",{className:"input_radio_row"},i.createElement("input",{type:"radio",checked:t.selected,name:null!==(e=t.name)&&void 0!==e?e:"common_name",value:t.value,className:"input_radio",onChange:function(){t.onchange&&t.onchange(t.value)}}),t.context)}function b(t){var e,n=u((0,i.useState)(!1),2),r=n[0],o=n[1];return(0,i.useEffect)(function(){o(!!t.selected)},[t.selected]),i.createElement("div",{className:"input_radio_row"},i.createElement("input",{type:"checkbox",disabled:null!==(e=t.is_disable)&&void 0!==e&&e,checked:r,onChange:function(){t.onchange&&t.onchange()}}),t.context)}},2542(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>w});var i=n(1728),r=n(6540),o=n(7444),a=n(3033),s=n(5997),l=n(7767),u=n(4284),c=n(6417),h=n(5725),p=n(2389),d=n(7523),f=n(2042),m=n(1469);function v(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function o(n,i,r,o){var l=i&&i.prototype instanceof s?i:s,u=Object.create(l.prototype);return b(u,"_invoke",function(n,i,r){var o,s,l,u=0,c=r||[],h=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return o=e,s=0,l=t,p.n=n,a}};function d(n,i){for(s=n,l=i,e=0;!h&&u&&!r&&e<c.length;e++){var r,o=c[e],d=p.p,f=o[2];n>3?(r=f===i)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=d&&((r=n<2&&d<o[1])?(s=0,p.v=i,p.n=o[1]):d<f&&(r=n<3||o[0]>i||i>f)&&(o[4]=n,o[5]=i,p.n=f,s=0))}if(r||n>1)return a;throw h=!0,i}return function(r,c,f){if(u>1)throw TypeError("Generator is already running");for(h&&1===c&&d(c,f),s=c,l=f;(e=s<2?t:l)||!h;){o||(s?s<3?(s>1&&(p.n=-1),d(s,l)):p.n=l:p.v=l);try{if(u=2,o){if(s||(r="next"),e=o[r]){if(!(e=e.call(o,l)))throw TypeError("iterator result is not an object");if(!e.done)return e;l=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+r+"' method"),s=1);o=t}else if((e=(h=p.n<0)?l:n.call(i,p))!==a)break}catch(e){o=t,s=1,l=e}finally{u=1}}return{value:e,done:h}}}(n,r,o),!0),u}var a={};function s(){}function l(){}function u(){}e=Object.getPrototypeOf;var c=[][i]?e(e([][i]())):(b(e={},i,function(){return this}),e),h=u.prototype=s.prototype=Object.create(c);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,b(t,r,"GeneratorFunction")),t.prototype=Object.create(h),t}return l.prototype=u,b(h,"constructor",u),b(u,"constructor",l),l.displayName="GeneratorFunction",b(u,r,"GeneratorFunction"),b(h),b(h,r,"Generator"),b(h,i,function(){return this}),b(h,"toString",function(){return"[object Generator]"}),(v=function(){return{w:o,m:p}})()}function b(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}b=function(t,e,n,i){function o(e,n){b(t,e,function(t){return this._invoke(e,n,t)})}e?r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},b(t,e,n,i)}function g(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}function y(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){u=!0,r=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return E(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?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 n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}m.m.init();const w=function(){var t,e=(0,l.Zp)(),n=y((0,r.useState)(""),2),b=n[0],E=n[1],w=y((0,r.useState)(""),2),x=w[0],A=w[1],_=(0,r.useContext)(d.F).initUserInfo,O=y((0,o.L4)(c.AG.custom_fun_opt),2),C=(O[0],O[1]),S=(0,p.Bd)().t;function k(){return T.apply(this,arguments)}function T(){var t;return t=v().m(function t(){var n,i;return v().w(function(t){for(;;)switch(t.n){case 0:return n={username:b,password:x},t.n=1,u.wm.post("login",n,!1);case 1:0===(i=t.v).code?(localStorage.setItem("token",i.data),_(),C(""),e("/file")):(0,f.zN)(i.message);case 2:return t.a(2)}},t)}),T=function(){var e=this,n=arguments;return new Promise(function(i,r){var o=t.apply(e,n);function a(t){g(o,i,r,a,s,"next",t)}function s(t){g(o,i,r,a,s,"throw",t)}a(void 0)})},T.apply(this,arguments)}return(0,r.useEffect)(function(){localStorage.getItem("token")&&e("/file")},[]),r.createElement(h.Y5,null,r.createElement("h1",null,null!==(t=m.m.web_site_title)&&void 0!==t?t:"FileCat"),r.createElement("div",{className:"self_win_center_content"},r.createElement(a.Sm,{placeholder:S("账号"),handleInputChange:function(t){E(t)}}),r.createElement(a.cA,{placeholder:S("密码"),handleInputChange:function(t){A(t)},handleEnterPress:k}),r.createElement(s.$n,{text:S("登录"),clickFun:k}),i.A.has("tcp_client_num_id")&&r.createElement(s.$n,{text:S("代理退出"),clickFun:function(){i.A.delete("tcp_client_num_id"),window.location.reload()}})))}},1028(t,e,n){"use strict";n.d(e,{A:()=>s});var i=n(1601),r=n.n(i),o=n(6314),a=n.n(o)()(r());a.push([t.id,'.awesomplete [hidden] {\n display: none;\n}\n\n.awesomplete .visually-hidden {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n}\n\n.awesomplete {\n display: inline-block;\n position: relative;\n}\n\n.awesomplete > input {\n display: block;\n}\n\n.awesomplete > ul {\n position: absolute;\n left: 0;\n z-index: 1;\n min-width: 100%;\n box-sizing: border-box;\n list-style: none;\n padding: 0;\n margin: 0;\n background: #fff;\n}\n\n.awesomplete > ul:empty {\n display: none;\n}\n\n.awesomplete > ul {\n\tborder-radius: .3em;\n\tmargin: .2em 0 0;\n\tbackground: hsla(0,0%,100%,.9);\n\tbackground: linear-gradient(to bottom right, white, hsla(0,0%,100%,.8));\n\tborder: 1px solid rgba(0,0,0,.3);\n\tbox-shadow: .05em .2em .6em rgba(0,0,0,.2);\n\ttext-shadow: none;\n}\n\n@supports (transform: scale(0)) {\n\t.awesomplete > ul {\n\t\ttransition: .3s cubic-bezier(.4,.2,.5,1.4);\n\t\ttransform-origin: 1.43em -.43em;\n\t}\n\t\n\t.awesomplete > ul[hidden],\n\t.awesomplete > ul:empty {\n\t\topacity: 0;\n\t\ttransform: scale(0);\n\t\tdisplay: block;\n\t\tvisibility: hidden;\n\t\ttransition-timing-function: ease;\n\t}\n}\n\n\t/* Pointer */\n\t.awesomplete > ul:before {\n\t\tcontent: "";\n\t\tposition: absolute;\n\t\ttop: -.43em;\n\t\tleft: 1em;\n\t\twidth: 0; height: 0;\n\t\tpadding: .4em;\n\t\tbackground: white;\n\t\tborder: inherit;\n\t\tborder-right: 0;\n\t\tborder-bottom: 0;\n\t\t-webkit-transform: rotate(45deg);\n\t\ttransform: rotate(45deg);\n\t}\n\n\t.awesomplete > ul > li {\n\t\tposition: relative;\n\t\tpadding: .2em .5em;\n\t\tcursor: pointer;\n\t}\n\t\n\t.awesomplete > ul > li:hover {\n\t\tbackground: hsl(200, 40%, 80%);\n\t\tcolor: black;\n\t}\n\t\n\t.awesomplete > ul > li[aria-selected="true"] {\n\t\tbackground: hsl(205, 40%, 40%);\n\t\tcolor: white;\n\t}\n\t\n\t\t.awesomplete mark {\n\t\t\tbackground: hsl(65, 100%, 50%);\n\t\t}\n\t\t\n\t\t.awesomplete li:hover mark {\n\t\t\tbackground: hsl(68, 100%, 41%);\n\t\t}\n\t\t\n\t\t.awesomplete li[aria-selected="true"] mark {\n\t\t\tbackground: hsl(86, 100%, 21%);\n\t\t\tcolor: inherit;\n\t\t}\n',""]);const s=a},9145(t,e,n){"use strict";var i=n(5072),r=n.n(i),o=n(7825),a=n.n(o),s=n(7659),l=n.n(s),u=n(5056),c=n.n(u),h=n(540),p=n.n(h),d=n(1113),f=n.n(d),m=n(1028),v={};v.styleTagTransform=f(),v.setAttributes=c(),v.insert=l().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=p();r()(m.A,v),m.A&&m.A.locals&&m.A.locals}}]);
|