filecat 6.7.8 → 6.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/build/dist/{1962.7d96b9a4f6e754b59988.js → 1962.b4a08debb34d1a840aaf.js} +2 -2
  2. package/build/dist/2502.192a426e2e244b430f09.js +2 -0
  3. package/build/dist/27.de4dc0ae94f30cf51809.js +2 -0
  4. package/build/dist/{2851.c6de31a301ab5a7069b3.js → 2851.f71dcc00200781834a71.js} +2 -2
  5. package/build/dist/2859.b88c9b76c79cf21a2f33.js +2 -0
  6. package/build/dist/{2859.27047860648162180514.js.LICENSE.txt → 2859.b88c9b76c79cf21a2f33.js.LICENSE.txt} +1 -1
  7. package/build/dist/4273.1fae62a68bc0efc4b277.js +2 -0
  8. package/build/dist/4377.faf28ee3d7e8df3329b0.js +2 -0
  9. package/build/dist/4488.0286e323a8d8d0b8b309.js +2 -0
  10. package/build/dist/{4943.6aa5b68ddea23ef1b085.js → 4943.7b32371e357a92c445a7.js} +2 -2
  11. package/build/dist/5937.aee2e9a59c2bd225ffa1.js +2 -0
  12. package/build/dist/6247.43d441a43d72c3d47e7a.js +2 -0
  13. package/build/dist/654.cd0fcc3cc803a01a8b4d.js +1 -0
  14. package/build/dist/7690.67d847e6334eb943855d.js +2 -0
  15. package/build/dist/9704.6a9c86824be21b5c272c.js +2 -0
  16. package/build/dist/dark.css +2 -2
  17. package/build/dist/google-dark.css +1 -1
  18. package/build/dist/google.css +1 -1
  19. package/build/dist/index.html +1 -1
  20. package/build/dist/main.5ac2b29e31280a21668e.js +2 -0
  21. package/build/main.js +1 -1
  22. package/build/plugin/core.type.d.ts +6 -11
  23. package/package.json +2 -1
  24. package/shell/build.js +11 -2
  25. package/build/dist/2502.c7ff4efe287affeaebf2.js +0 -2
  26. package/build/dist/27.2b59200aa78f261574a7.js +0 -2
  27. package/build/dist/2859.27047860648162180514.js +0 -2
  28. package/build/dist/4273.bdeeb513174c433c27c6.js +0 -2
  29. package/build/dist/4377.b10c26ad4b93b538dc36.js +0 -2
  30. package/build/dist/4488.e65516e2d00d6477a1be.js +0 -2
  31. package/build/dist/5937.4edccfc675775283525a.js +0 -2
  32. package/build/dist/6247.8381e099693850a703a3.js +0 -2
  33. package/build/dist/654.d1d409e5d29f59920071.js +0 -1
  34. package/build/dist/7690.034f3f1df71868c822c1.js +0 -2
  35. package/build/dist/9704.690a6bd511a3b5af6735.js +0 -2
  36. package/build/dist/main.f936fd69c16ac13c8504.js +0 -2
  37. /package/build/dist/{1962.7d96b9a4f6e754b59988.js.LICENSE.txt → 1962.b4a08debb34d1a840aaf.js.LICENSE.txt} +0 -0
  38. /package/build/dist/{2502.c7ff4efe287affeaebf2.js.LICENSE.txt → 2502.192a426e2e244b430f09.js.LICENSE.txt} +0 -0
  39. /package/build/dist/{27.2b59200aa78f261574a7.js.LICENSE.txt → 27.de4dc0ae94f30cf51809.js.LICENSE.txt} +0 -0
  40. /package/build/dist/{2851.c6de31a301ab5a7069b3.js.LICENSE.txt → 2851.f71dcc00200781834a71.js.LICENSE.txt} +0 -0
  41. /package/build/dist/{4273.bdeeb513174c433c27c6.js.LICENSE.txt → 4273.1fae62a68bc0efc4b277.js.LICENSE.txt} +0 -0
  42. /package/build/dist/{4377.b10c26ad4b93b538dc36.js.LICENSE.txt → 4377.faf28ee3d7e8df3329b0.js.LICENSE.txt} +0 -0
  43. /package/build/dist/{4488.e65516e2d00d6477a1be.js.LICENSE.txt → 4488.0286e323a8d8d0b8b309.js.LICENSE.txt} +0 -0
  44. /package/build/dist/{4943.6aa5b68ddea23ef1b085.js.LICENSE.txt → 4943.7b32371e357a92c445a7.js.LICENSE.txt} +0 -0
  45. /package/build/dist/{5937.4edccfc675775283525a.js.LICENSE.txt → 5937.aee2e9a59c2bd225ffa1.js.LICENSE.txt} +0 -0
  46. /package/build/dist/{6247.8381e099693850a703a3.js.LICENSE.txt → 6247.43d441a43d72c3d47e7a.js.LICENSE.txt} +0 -0
  47. /package/build/dist/{7690.034f3f1df71868c822c1.js.LICENSE.txt → 7690.67d847e6334eb943855d.js.LICENSE.txt} +0 -0
  48. /package/build/dist/{9704.690a6bd511a3b5af6735.js.LICENSE.txt → 9704.6a9c86824be21b5c272c.js.LICENSE.txt} +0 -0
  49. /package/build/dist/{main.f936fd69c16ac13c8504.js.LICENSE.txt → main.5ac2b29e31280a21668e.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
- /*! For license information please see 1962.7d96b9a4f6e754b59988.js.LICENSE.txt */
2
- (self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[1962,4627],{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)}()},2674(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>M});var r=n(6540),i=n(6417),o=n(7444),a=n(5997),s=n(7952),l=n(7022),u=n(4251);function c(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return f(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],f=!1,h={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return o=e,s=0,l=t,h.n=n,a}};function p(n,r){for(s=n,l=r,e=0;!f&&u&&!i&&e<c.length;e++){var i,o=c[e],p=h.p,d=o[2];n>3?(i=d===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,h.v=r,h.n=o[1]):p<d&&(i=n<3||o[0]>r||r>d)&&(o[4]=n,o[5]=r,h.n=d,s=0))}if(i||n>1)return a;throw f=!0,r}return function(i,c,d){if(u>1)throw TypeError("Generator is already running");for(f&&1===c&&p(c,d),s=c,l=d;(e=s<2?t:l)||!f;){o||(s?s<3?(s>1&&(h.n=-1),p(s,l)):h.n=l:h.v=l);try{if(u=2,o){if(s||(i="next"),e=o[i]){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 '"+i+"' method"),s=1);o=t}else if((e=(f=h.n<0)?l:n.call(r,h))!==a)break}catch(e){o=t,s=1,l=e}finally{u=1}}return{value:e,done:f}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(f(e={},r,function(){return this}),e),p=u.prototype=s.prototype=Object.create(h);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,f(t,i,"GeneratorFunction")),t.prototype=Object.create(p),t}return l.prototype=u,f(p,"constructor",u),f(u,"constructor",l),l.displayName="GeneratorFunction",f(u,i,"GeneratorFunction"),f(p),f(p,i,"Generator"),f(p,r,function(){return this}),f(p,"toString",function(){return"[object Generator]"}),(c=function(){return{w:o,m:d}})()}function f(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}f=function(t,e,n,r){function o(e,n){f(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))},f(t,e,n,r)}function h(t,e,n,r,i,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(r,i)}function p(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){h(o,r,i,a,s,"next",t)}function s(t){h(o,r,i,a,s,"throw",t)}a(void 0)})}}function d(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,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=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){u=!0,i=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return m(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)?m(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 m(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 v(t){var e=d((0,r.useState)(!1),2),n=e[0],i=e[1],o=d((0,r.useState)([]),2),s=o[0],f=o[1],h=function(t){f(t)},m=function(){var e=p(c().m(function e(){return c().w(function(e){for(;;)switch(e.n){case 0:if("folder"!==t.type){e.n=2;break}if(n||!t.click||s){e.n=1;break}return e.n=1,t.click(t,h,t.pre_path);case 1:i(!n),e.n=3;break;case 2:if(!t.click){e.n=3;break}return e.n=3,t.click(t,h,t.pre_path);case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),y=function(){var e=p(c().m(function e(){var n,r=arguments;return c().w(function(e){for(;;)switch(e.n){case 0:if(n=r.length>0&&void 0!==r[0]&&r[0],"folder"!==t.type||n){e.n=2;break}return e.n=1,t.click(t,h,t.pre_path);case 1:e.n=3;break;case 2:t.fatherNowToggleExpansion&&t.fatherNowToggleExpansion();case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return(0,r.useEffect)(function(){f(t.children)},[t.children]),r.createElement("div",{className:"studio-item"},r.createElement("div",{onClick:m,onContextMenu:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),t.handleContextMenu&&t.handleContextMenu(e,t.name,t.pre_path,t.type===l.Iw.folder,y)},className:"studio-item-title"},r.createElement("i",{className:"material-icons studio-item-title-tag","data-icon":n?"arrow_drop_down":"arrow_right"},"file"==t.type?"":n?"arrow_drop_down":"arrow_right"),r.createElement("span",{className:"file-icons"},r.createElement("span",{"data-type":(0,u.uL)(t.name),"data-dir":"folder"===t.type,"aria-label":t.name},r.createElement(a.In,{icon:"",aria_label:t.name}))),r.createElement("span",{className:"studio-item-name"},t.name)),n&&s&&r.createElement("div",{style:{marginLeft:20}},s.map(function(e,n){return r.createElement(r.Fragment,{key:n},r.createElement(v,{type:e.type,size:e.size,click:t.click,name:e.name,key:n,children:e.children,pre_path:"".concat(t.pre_path).concat(e.name).concat(e.type===l.Iw.folder?"/":""),handleContextMenu:t.handleContextMenu,fatherNowToggleExpansion:y}))})))}function y(t){return r.createElement("div",null,t.list.map(function(e,n){return r.createElement(v,{pre_path:"".concat(t.pre_path).concat(e.name).concat(e.type===l.Iw.folder?"/":""),key:n,name:e.name,type:e.type,handleContextMenu:t.handleContextMenu,fatherNowToggleExpansion:t.fatherNowToggleExpansion,children:e.children,click:t.click,size:e.size})}))}var b=n(4284),g=n(4289),w=n(3459),E=n(8247),x=n(2543),A=n.n(x),_=n(7690),k=n(2389),S=n(8815),C=n(7767);function T(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return O(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],f=!1,h={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return o=e,s=0,l=t,h.n=n,a}};function p(n,r){for(s=n,l=r,e=0;!f&&u&&!i&&e<c.length;e++){var i,o=c[e],p=h.p,d=o[2];n>3?(i=d===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,h.v=r,h.n=o[1]):p<d&&(i=n<3||o[0]>r||r>d)&&(o[4]=n,o[5]=r,h.n=d,s=0))}if(i||n>1)return a;throw f=!0,r}return function(i,c,d){if(u>1)throw TypeError("Generator is already running");for(f&&1===c&&p(c,d),s=c,l=d;(e=s<2?t:l)||!f;){o||(s?s<3?(s>1&&(h.n=-1),p(s,l)):h.n=l:h.v=l);try{if(u=2,o){if(s||(i="next"),e=o[i]){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 '"+i+"' method"),s=1);o=t}else if((e=(f=h.n<0)?l:n.call(r,h))!==a)break}catch(e){o=t,s=1,l=e}finally{u=1}}return{value:e,done:f}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(O(e={},r,function(){return this}),e),f=u.prototype=s.prototype=Object.create(c);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,O(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return l.prototype=u,O(f,"constructor",u),O(u,"constructor",l),l.displayName="GeneratorFunction",O(u,i,"GeneratorFunction"),O(f),O(f,i,"Generator"),O(f,r,function(){return this}),O(f,"toString",function(){return"[object Generator]"}),(T=function(){return{w:o,m:h}})()}function O(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}O=function(t,e,n,r){function o(e,n){O(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))},O(t,e,n,r)}function N(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=L(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,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function I(t,e,n,r,i,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(r,i)}function j(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){I(o,r,i,a,s,"next",t)}function s(t){I(o,r,i,a,s,"throw",t)}a(void 0)})}}function P(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,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=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){u=!0,i=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(t,e)||L(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 L(t,e){if(t){if("string"==typeof t)return R(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)?R(t,e):void 0}}function R(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 G=r.lazy(function(){return Promise.all([n.e(8301),n.e(4091)]).then(n.bind(n,4091))});function M(t){var e=P((0,r.useState)([]),2),n=e[0],c=e[1],f=P((0,r.useState)(""),2),h=f[0],p=f[1],d=P((0,r.useState)(""),2),m=(d[0],d[1]),v=P((0,r.useState)(!1),2),x=(v[0],v[1],P((0,r.useState)({path:"",name:""}),2)),O=x[0],I=x[1],L=P((0,r.useState)(""),2),R=L[0],M=L[1],F=P((0,o.L4)(i.AG.confirm),2),D=(F[0],F[1]),z=P((0,r.useState)(!1),2),$=z[0],H=z[1],B=P((0,o.L4)(i.AG.fileShellShow),2),U=B[0],X=B[1],K=P((0,o.L4)(i.AG.file_shell_hidden),2),Y=K[0],W=K[1],q=(0,r.useRef)(null),Z=(0,r.useRef)(null),J=P((0,r.useState)(!1),2),Q=J[0],V=J[1],tt=P((0,r.useState)(16),2),et=tt[0],nt=tt[1],rt=P((0,o.L4)(i.AG.showPrompt),2),it=(rt[0],rt[1]),ot=(0,k.Bd)().t,at=(0,C.Zp)(),st=(0,C.zy)().pathname.split("/").filter(Boolean).pop();st=decodeURIComponent(st);var lt=function(){var t=j(T().m(function t(){var e,n,r,i,o,a,s;return T().w(function(t){for(;;)switch(t.n){case 0:return e=(0,g.GG)("file",st),p(e),t.n=1,b.$M.post("studio/get/item",{path:e});case 1:if((n=t.v).code===w.m.Success){r=[],i=[],o=N(n.data.list);try{for(o.s();!(a=o.n()).done;)"folder"===(s=a.value).type?r.push(s):"file"===s.type&&i.push(s)}catch(t){o.e(t)}finally{o.f()}c([].concat(r,i))}case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();(0,r.useEffect)(function(){m(""),I({}),H(!1),lt()},[]);var ut=function(){var t=j(T().m(function t(e,n){var r;return T().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,b.$M.get("".concat(encodeURIComponent(n)));case 1:r=t.v,m(r.data),E.xK.set_value_temp(r.data),I({path:n,name:e}),M(n);case 2:return t.a(2)}},t)}));return function(e,n){return t.apply(this,arguments)}}(),ct=function(t,e){t.size>S.o5?D({open:!0,handle:function(){ut(t.name,e),D({open:!1,handle:null}),H(!1)},title:"超过20MB了还要打开吗?"}):ut(t.name,e)},ft=function(){var t=j(T().m(function t(e,n,r){var i,o,a,s,l,u;return T().w(function(t){for(;;)switch(t.n){case 0:if("folder"!==e.type){t.n=2;break}return t.n=1,b.$M.post("studio/get/item",{path:"".concat(r)});case 1:if((i=t.v).code===w.m.Success){o=[],a=[],s=N(i.data.list);try{for(s.s();!(l=s.n()).done;)"folder"===(u=l.value).type?o.push(u):"file"===u.type&&a.push(u)}catch(t){s.e(t)}finally{s.f()}n([].concat(o,a))}t.n=4;break;case 2:if(!$){t.n=3;break}return D({open:!0,handle:function(){D({open:!1,handle:null}),H(!1),ct(e,r)},title:"确定不保存就切换吗?"}),t.a(2);case 3:ct(e,r);case 4:return t.a(2)}},t)}));return function(e,n,r){return t.apply(this,arguments)}}();function ht(){return pt.apply(this,arguments)}function pt(){return(pt=j(T().m(function t(){var e;return T().w(function(t){for(;;)switch(t.n){case 0:if($){t.n=1;break}return t.a(2);case 1:return e={context:E.xK.get_editor_value()},t.n=2,b.$M.post("save/".concat(encodeURIComponent(R)),e);case 2:0===t.v.code&&H(!1);case 3:return t.a(2)}},t)}))).apply(this,arguments)}var dt=function(t){t.ctrlKey&&"s"===t.key&&(t.preventDefault(),$&&ht())};(0,r.useEffect)(function(){return document.addEventListener("keydown",dt),function(){document.removeEventListener("keydown",dt)}},[$]);var mt=(0,r.useCallback)(A().throttle(function(t){var e=parseFloat(getComputedStyle(Z.current).fontSize),n=window.innerWidth/e-4,r=t.clientX/e,i=2.25+q.current.offsetWidth/e;r<=n&&r>=i&&nt(parseFloat(r.toFixed(2)))},32),[]),vt=function(){V(!1),Z.current.removeEventListener("pointermove",mt)},yt=[{r:ot("创建文件"),v:"创建文件"},{r:ot("创建目录"),v:"创建目录"},{r:ot("重命名"),v:"重命名"},{r:ot("删除"),v:"删除"}],bt=[{r:ot("重命名"),v:"重命名"},{r:ot("删除"),v:"删除"}],gt=function(t,e,n,r,i){t.preventDefault();var o=new u.ik;o.path=n,o.filename=e,o.x=t.clientX,o.y=t.clientY,o.items=r?yt:bt,i===lt&&(o.items=o.items.slice(0,2)),o.type=r?l.Iw.studio_folder:l.Iw.studio_file;var a=function(t){i(t)};o.textClick=function(t){switch(t){case"创建文件":it({show:!0,type:_.PromptEnum.FileNew,overlay:!0,data:{dir:n,call:a}});break;case"创建目录":it({show:!0,type:_.PromptEnum.DirNew,overlay:!0,data:{dir:n,call:a}});break;case"删除":if($&&(O.path===n||O.path.includes(n))){it({show:!0,type:_.PromptEnum.FilesDelete,overlay:!0,data:{path:n,call:function(){a(r),H(!1),I({}),m(""),E.xK.set_value_temp("")},filename:e}});break}it({show:!0,type:_.PromptEnum.FilesDelete,overlay:!0,data:{path:n,filename:e,call:r?function(){a(!0)}:a}});break;case"重命名":it({show:!0,type:_.PromptEnum.FileRename,overlay:!0,data:{path:n,dir:(0,g.Yp)(n),call:function(){a(!0)},filename:e}})}},it({show:!0,type:_.PromptEnum.FileMenu,overlay:!1,data:o})};return r.createElement("div",{className:"studio"},r.createElement(s.A,{ignore_tags:!0,left_children:[r.createElement(a.rA,{key:1,title:"取消",icon:"close",onClick:function(){X({show:!1,path:""}),W(void 0),at(-1)}}),r.createElement("title",{key:2},O.name)]},(0,u.zr)(O.name)&&r.createElement(a.rA,{title:"格式化",icon:"data_object",onClick:function(){var t;null===(t=E.xK.get_editor())||void 0===t||t.formatCode()}}),r.createElement(a.rA,{icon:"terminal",title:"shell",onClick:function(){void 0===Y?U.show?X({show:!1,path:""}):(X({show:!0,path:(0,g.GG)("file",st)}),W(!1)):W(!Y)}}),$&&r.createElement(a.rA,{title:"保存",icon:"save",onClick:ht})),r.createElement("div",{className:"studio-body",ref:Z},r.createElement("div",{className:"studio-nav",style:{width:"".concat(et-1,"em")},onContextMenu:function(t){gt(t,O.name,(0,g.GG)("file",st),!0,lt)}},r.createElement(y,{pre_path:h,list:n,click:ft,handleContextMenu:gt,fatherNowToggleExpansion:lt})),r.createElement("div",{className:"studio__divider",ref:q,onPointerDown:function(){V(!0),Z.current.addEventListener("pointermove",mt)},onPointerUp:vt}),Q&&r.createElement("div",{className:"shell__overlay",onPointerUp:vt}),r.createElement("div",{className:"studio-editor",key:O.path},O.name&&r.createElement(G,{name:O.name,on_change:function(){$||H(!0)}}))))}},1028(t,e,n){"use strict";n.d(e,{A:()=>s});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 s=a},9145(t,e,n){"use strict";var r=n(5072),i=n.n(r),o=n(7825),a=n.n(o),s=n(7659),l=n.n(s),u=n(5056),c=n.n(u),f=n(540),h=n.n(f),p=n(1113),d=n.n(p),m=n(1028),v={};v.styleTagTransform=d(),v.setAttributes=c(),v.insert=l().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 1962.b4a08debb34d1a840aaf.js.LICENSE.txt */
2
+ (self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[1962,4627],{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)}()},2674(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>G});var r=n(6540),i=n(6417),o=n(7444),a=n(5997),s=n(7952),l=n(7022),u=n(4251);function c(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return f(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],f=!1,h={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return o=e,s=0,l=t,h.n=n,a}};function p(n,r){for(s=n,l=r,e=0;!f&&u&&!i&&e<c.length;e++){var i,o=c[e],p=h.p,d=o[2];n>3?(i=d===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,h.v=r,h.n=o[1]):p<d&&(i=n<3||o[0]>r||r>d)&&(o[4]=n,o[5]=r,h.n=d,s=0))}if(i||n>1)return a;throw f=!0,r}return function(i,c,d){if(u>1)throw TypeError("Generator is already running");for(f&&1===c&&p(c,d),s=c,l=d;(e=s<2?t:l)||!f;){o||(s?s<3?(s>1&&(h.n=-1),p(s,l)):h.n=l:h.v=l);try{if(u=2,o){if(s||(i="next"),e=o[i]){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 '"+i+"' method"),s=1);o=t}else if((e=(f=h.n<0)?l:n.call(r,h))!==a)break}catch(e){o=t,s=1,l=e}finally{u=1}}return{value:e,done:f}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(f(e={},r,function(){return this}),e),p=u.prototype=s.prototype=Object.create(h);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,f(t,i,"GeneratorFunction")),t.prototype=Object.create(p),t}return l.prototype=u,f(p,"constructor",u),f(u,"constructor",l),l.displayName="GeneratorFunction",f(u,i,"GeneratorFunction"),f(p),f(p,i,"Generator"),f(p,r,function(){return this}),f(p,"toString",function(){return"[object Generator]"}),(c=function(){return{w:o,m:d}})()}function f(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}f=function(t,e,n,r){function o(e,n){f(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))},f(t,e,n,r)}function h(t,e,n,r,i,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(r,i)}function p(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){h(o,r,i,a,s,"next",t)}function s(t){h(o,r,i,a,s,"throw",t)}a(void 0)})}}function d(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,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=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){u=!0,i=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return m(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)?m(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 m(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 v(t){var e=d((0,r.useState)(!1),2),n=e[0],i=e[1],o=d((0,r.useState)([]),2),s=o[0],f=o[1],h=function(t){f(t)},m=function(){var e=p(c().m(function e(){return c().w(function(e){for(;;)switch(e.n){case 0:if("folder"!==t.type){e.n=2;break}if(n||!t.click||s){e.n=1;break}return e.n=1,t.click(t,h,t.pre_path);case 1:i(!n),e.n=3;break;case 2:if(!t.click){e.n=3;break}return e.n=3,t.click(t,h,t.pre_path);case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),y=function(){var e=p(c().m(function e(){var n,r=arguments;return c().w(function(e){for(;;)switch(e.n){case 0:if(n=r.length>0&&void 0!==r[0]&&r[0],"folder"!==t.type||n){e.n=2;break}return e.n=1,t.click(t,h,t.pre_path);case 1:e.n=3;break;case 2:t.fatherNowToggleExpansion&&t.fatherNowToggleExpansion();case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return(0,r.useEffect)(function(){f(t.children)},[t.children]),r.createElement("div",{className:"studio-item"},r.createElement("div",{onClick:m,onContextMenu:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),t.handleContextMenu&&t.handleContextMenu(e,t.name,t.pre_path,t.type===l.Iw.folder,y)},className:"studio-item-title"},r.createElement("i",{className:"material-icons studio-item-title-tag","data-icon":n?"arrow_drop_down":"arrow_right"},"file"==t.type?"":n?"arrow_drop_down":"arrow_right"),r.createElement("span",{className:"file-icons"},r.createElement("span",{"data-type":(0,u.uL)(t.name),"data-dir":"folder"===t.type,"aria-label":t.name},r.createElement(a.In,{icon:"",aria_label:t.name}))),r.createElement("span",{className:"studio-item-name"},t.name)),n&&s&&r.createElement("div",{style:{marginLeft:20}},s.map(function(e,n){return r.createElement(r.Fragment,{key:n},r.createElement(v,{type:e.type,size:e.size,click:t.click,name:e.name,key:n,children:e.children,pre_path:"".concat(t.pre_path).concat(e.name).concat(e.type===l.Iw.folder?"/":""),handleContextMenu:t.handleContextMenu,fatherNowToggleExpansion:y}))})))}function y(t){return r.createElement("div",null,t.list.map(function(e,n){return r.createElement(v,{pre_path:"".concat(t.pre_path).concat(e.name).concat(e.type===l.Iw.folder?"/":""),key:n,name:e.name,type:e.type,handleContextMenu:t.handleContextMenu,fatherNowToggleExpansion:t.fatherNowToggleExpansion,children:e.children,click:t.click,size:e.size})}))}var b=n(4284),g=n(4289),w=n(3459),E=n(8247),x=n(2543),A=n(7690),_=n(2389),k=n(8815),S=n(7767);function C(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,u=Object.create(l.prototype);return T(u,"_invoke",function(n,r,i){var o,s,l,u=0,c=i||[],f=!1,h={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return o=e,s=0,l=t,h.n=n,a}};function p(n,r){for(s=n,l=r,e=0;!f&&u&&!i&&e<c.length;e++){var i,o=c[e],p=h.p,d=o[2];n>3?(i=d===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,h.v=r,h.n=o[1]):p<d&&(i=n<3||o[0]>r||r>d)&&(o[4]=n,o[5]=r,h.n=d,s=0))}if(i||n>1)return a;throw f=!0,r}return function(i,c,d){if(u>1)throw TypeError("Generator is already running");for(f&&1===c&&p(c,d),s=c,l=d;(e=s<2?t:l)||!f;){o||(s?s<3?(s>1&&(h.n=-1),p(s,l)):h.n=l:h.v=l);try{if(u=2,o){if(s||(i="next"),e=o[i]){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 '"+i+"' method"),s=1);o=t}else if((e=(f=h.n<0)?l:n.call(r,h))!==a)break}catch(e){o=t,s=1,l=e}finally{u=1}}return{value:e,done:f}}}(n,i,o),!0),u}var a={};function s(){}function l(){}function u(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(T(e={},r,function(){return this}),e),f=u.prototype=s.prototype=Object.create(c);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,T(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return l.prototype=u,T(f,"constructor",u),T(u,"constructor",l),l.displayName="GeneratorFunction",T(u,i,"GeneratorFunction"),T(f),T(f,i,"Generator"),T(f,r,function(){return this}),T(f,"toString",function(){return"[object Generator]"}),(C=function(){return{w:o,m:h}})()}function T(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}T=function(t,e,n,r){function o(e,n){T(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))},T(t,e,n,r)}function O(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=P(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,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function N(t,e,n,r,i,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(r,i)}function I(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){N(o,r,i,a,s,"next",t)}function s(t){N(o,r,i,a,s,"throw",t)}a(void 0)})}}function j(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,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=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){u=!0,i=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(t,e)||P(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(t,e){if(t){if("string"==typeof t)return L(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)?L(t,e):void 0}}function L(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 R=r.lazy(function(){return Promise.all([n.e(8301),n.e(4091)]).then(n.bind(n,4091))});function G(t){var e=j((0,r.useState)([]),2),n=e[0],c=e[1],f=j((0,r.useState)(""),2),h=f[0],p=f[1],d=j((0,r.useState)(""),2),m=(d[0],d[1]),v=j((0,r.useState)(!1),2),T=(v[0],v[1],j((0,r.useState)({path:"",name:""}),2)),N=T[0],P=T[1],L=j((0,r.useState)(""),2),G=L[0],M=L[1],F=j((0,o.L4)(i.AG.confirm),2),D=(F[0],F[1]),z=j((0,r.useState)(!1),2),$=z[0],H=z[1],B=j((0,o.L4)(i.AG.fileShellShow),2),U=B[0],X=B[1],K=j((0,o.L4)(i.AG.file_shell_hidden),2),Y=K[0],W=K[1],q=(0,r.useRef)(null),Z=(0,r.useRef)(null),J=j((0,r.useState)(!1),2),Q=J[0],V=J[1],tt=j((0,r.useState)(16),2),et=tt[0],nt=tt[1],rt=j((0,o.L4)(i.AG.showPrompt),2),it=(rt[0],rt[1]),ot=(0,_.Bd)().t,at=(0,S.Zp)(),st=(0,S.zy)().pathname.split("/").filter(Boolean).pop();st=decodeURIComponent(st);var lt=function(){var t=I(C().m(function t(){var e,n,r,i,o,a,s;return C().w(function(t){for(;;)switch(t.n){case 0:return e=(0,g.GG)("file",st),p(e),t.n=1,b.$M.post("studio/get/item",{path:e});case 1:if((n=t.v).code===w.m.Success){r=[],i=[],o=O(n.data.list);try{for(o.s();!(a=o.n()).done;)"folder"===(s=a.value).type?r.push(s):"file"===s.type&&i.push(s)}catch(t){o.e(t)}finally{o.f()}c([].concat(r,i))}case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();(0,r.useEffect)(function(){m(""),P({}),H(!1),lt()},[]);var ut=function(){var t=I(C().m(function t(e,n){var r;return C().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,b.$M.get("".concat(encodeURIComponent(n)));case 1:r=t.v,m(r.data),E.xK.set_value_temp(r.data),P({path:n,name:e}),M(n);case 2:return t.a(2)}},t)}));return function(e,n){return t.apply(this,arguments)}}(),ct=function(t,e){t.size>k.o5?D({open:!0,handle:function(){ut(t.name,e),D({open:!1,handle:null}),H(!1)},title:"超过20MB了还要打开吗?"}):ut(t.name,e)},ft=function(){var t=I(C().m(function t(e,n,r){var i,o,a,s,l,u;return C().w(function(t){for(;;)switch(t.n){case 0:if("folder"!==e.type){t.n=2;break}return t.n=1,b.$M.post("studio/get/item",{path:"".concat(r)});case 1:if((i=t.v).code===w.m.Success){o=[],a=[],s=O(i.data.list);try{for(s.s();!(l=s.n()).done;)"folder"===(u=l.value).type?o.push(u):"file"===u.type&&a.push(u)}catch(t){s.e(t)}finally{s.f()}n([].concat(o,a))}t.n=4;break;case 2:if(!$){t.n=3;break}return D({open:!0,handle:function(){D({open:!1,handle:null}),H(!1),ct(e,r)},title:"确定不保存就切换吗?"}),t.a(2);case 3:ct(e,r);case 4:return t.a(2)}},t)}));return function(e,n,r){return t.apply(this,arguments)}}();function ht(){return pt.apply(this,arguments)}function pt(){return(pt=I(C().m(function t(){var e;return C().w(function(t){for(;;)switch(t.n){case 0:if($){t.n=1;break}return t.a(2);case 1:return e={context:E.xK.get_editor_value()},t.n=2,b.$M.post("save/".concat(encodeURIComponent(G)),e);case 2:0===t.v.code&&H(!1);case 3:return t.a(2)}},t)}))).apply(this,arguments)}var dt=function(t){t.ctrlKey&&"s"===t.key&&(t.preventDefault(),$&&ht())};(0,r.useEffect)(function(){return document.addEventListener("keydown",dt),function(){document.removeEventListener("keydown",dt)}},[$]);var mt=(0,r.useCallback)(x.throttle(function(t){var e=parseFloat(getComputedStyle(Z.current).fontSize),n=window.innerWidth/e-4,r=t.clientX/e,i=2.25+q.current.offsetWidth/e;r<=n&&r>=i&&nt(parseFloat(r.toFixed(2)))},32),[]),vt=function(){V(!1),Z.current.removeEventListener("pointermove",mt)},yt=[{r:ot("创建文件"),v:"创建文件"},{r:ot("创建目录"),v:"创建目录"},{r:ot("重命名"),v:"重命名"},{r:ot("删除"),v:"删除"}],bt=[{r:ot("重命名"),v:"重命名"},{r:ot("删除"),v:"删除"}],gt=function(t,e,n,r,i){t.preventDefault();var o=new u.ik;o.path=n,o.filename=e,o.x=t.clientX,o.y=t.clientY,o.items=r?yt:bt,i===lt&&(o.items=o.items.slice(0,2)),o.type=r?l.Iw.studio_folder:l.Iw.studio_file;var a=function(t){i(t)};o.textClick=function(t){switch(t){case"创建文件":it({show:!0,type:A.PromptEnum.FileNew,overlay:!0,data:{dir:n,call:a}});break;case"创建目录":it({show:!0,type:A.PromptEnum.DirNew,overlay:!0,data:{dir:n,call:a}});break;case"删除":if($&&(N.path===n||N.path.includes(n))){it({show:!0,type:A.PromptEnum.FilesDelete,overlay:!0,data:{path:n,call:function(){a(r),H(!1),P({}),m(""),E.xK.set_value_temp("")},filename:e}});break}it({show:!0,type:A.PromptEnum.FilesDelete,overlay:!0,data:{path:n,filename:e,call:r?function(){a(!0)}:a}});break;case"重命名":it({show:!0,type:A.PromptEnum.FileRename,overlay:!0,data:{path:n,dir:(0,g.Yp)(n),call:function(){a(!0)},filename:e}})}},it({show:!0,type:A.PromptEnum.FileMenu,overlay:!1,data:o})};return r.createElement("div",{className:"studio"},r.createElement(s.A,{ignore_tags:!0,left_children:[r.createElement(a.rA,{key:1,title:"取消",icon:"close",onClick:function(){X({show:!1,path:""}),W(void 0),at(-1)}}),r.createElement("title",{key:2},N.name)]},(0,u.zr)(N.name)&&r.createElement(a.rA,{title:"格式化",icon:"data_object",onClick:function(){var t;null===(t=E.xK.get_editor())||void 0===t||t.formatCode()}}),r.createElement(a.rA,{icon:"terminal",title:"shell",onClick:function(){void 0===Y?U.show?X({show:!1,path:""}):(X({show:!0,path:(0,g.GG)("file",st)}),W(!1)):W(!Y)}}),$&&r.createElement(a.rA,{title:"保存",icon:"save",onClick:ht})),r.createElement("div",{className:"studio-body",ref:Z},r.createElement("div",{className:"studio-nav",style:{width:"".concat(et-1,"em")},onContextMenu:function(t){gt(t,N.name,(0,g.GG)("file",st),!0,lt)}},r.createElement(y,{pre_path:h,list:n,click:ft,handleContextMenu:gt,fatherNowToggleExpansion:lt})),r.createElement("div",{className:"studio__divider",ref:q,onPointerDown:function(){V(!0),Z.current.addEventListener("pointermove",mt)},onPointerUp:vt}),Q&&r.createElement("div",{className:"shell__overlay",onPointerUp:vt}),r.createElement("div",{className:"studio-editor",key:N.path},N.name&&r.createElement(R,{name:N.name,on_change:function(){$||H(!0)}}))))}},1028(t,e,n){"use strict";n.d(e,{A:()=>s});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 s=a},9145(t,e,n){"use strict";var r=n(5072),i=n.n(r),o=n(7825),a=n.n(o),s=n(7659),l=n.n(s),u=n(5056),c=n.n(u),f=n(540),h=n.n(f),p=n(1113),d=n.n(p),m=n(1028),v={};v.styleTagTransform=d(),v.setAttributes=c(),v.insert=l().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=h();i()(m.A,v),m.A&&m.A.locals&&m.A.locals}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 2502.192a426e2e244b430f09.js.LICENSE.txt */
2
+ (self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[2502,4627],{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 d(){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 h(){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 g(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:()=>h,I:()=>g,IO:()=>d,Lr:()=>v,P1:()=>f,a7:()=>u,di:()=>m,jH:()=>l,kW:()=>c})},447(t,e,n){"use strict";n.d(e,{WA:()=>d,ZI:()=>h,Zp:()=>c,fq:()=>m,gz:()=>p,uF:()=>u,xP:()=>f});var r=n(6540),i=n(505);function o(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 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}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var l=function(t){return t[t.common=0]="common",t[t.full=1]="full",t}(l||{});function s(t,e){var n=e===l.common?"card-content":e===l.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 c(t){return s(t,l.common)}function u(t){return s(t,l.full)}function f(t){var e,n,o,a=(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:a,onClick:function(){var e,n;(0,i.lW)(null!==(e=null!==(n=t.tip_context)&&void 0!==n?n:t.context)&&void 0!==e?e:t.children),new Noty({type:"info",text:"复制完成",timeout:1e3,layout:"bottomLeft"}).show()}},null!==(n=null!==(o=t.tip_context)&&void 0!==o?o:t.context)&&void 0!==n?n:t.children))}function d(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 h(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 p(t){return r.createElement("div",{className:"progress-card"},r.createElement("div",{className:"progress-per"},r.createElement("div",{style:{width:"".concat(t.progress,"%")}})))}var m=function(t){var e=o((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 a={width:"10px",height:"10px",borderRadius:"50%",backgroundColor:n,display:"inline-block"};return r.createElement("div",{style:a})}},3033(t,e,n){"use strict";n.d(e,{$Z:()=>h,GL:()=>y,Sm:()=>m,U6:()=>b,cA:()=>v,l6:()=>g});var r=n(6540),i=n(5219),o=n.n(i),a=(n(9145),n(961)),l=n(5997);function s(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 c(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=u(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==u(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t){return u="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},u(t)}function f(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 d(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)?d(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function h(t){var e=(0,r.useRef)(null),n=f(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(l.In,{icon:t.icon}),r.createElement("input",{type:t.type,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){"Process"===e.key||e.nativeEvent.isComposing||"Enter"===e.key&&t.handleEnterPress&&t.handleEnterPress()}})))}function p(t){var e=(0,r.useRef)(null),n=f(r.useState(""),2),i=n[0],a=n[1],l=f(r.useState("input input--block awesomplete"),2),s=l[0],c=l[1];(0,r.useEffect)(function(){a(null==t.value?"":t.value),t.focus&&e.current&&e.current.focus(),t.no_border&&c("input input--block awesomplete input--no_border")},[t.value,t.focus,t.no_border]);var d=(0,r.useRef)(t.handleInputChange);return(0,r.useEffect)(function(){d.current=t.handleInputChange},[t.handleInputChange]),(0,r.useEffect)(function(){if(null!=t.options&&e.current&&Array.isArray(t.options)){var n=t.options.map(function(t){return"object"===u(t)&&null!==t?{label:t.label,value:t.value}:String(t)}),r=new(o())(e.current,{list:n,minChars:0,autoFirst:!0,filter:function(t,e){return""===e.trim()||o().FILTER_CONTAINS(t,e)},sort:function(t,n){var r;return""===(null===(r=e.current)||void 0===r?void 0:r.value.trim())?0:t.label<n.label?-1:1}}),i=function(){r.evaluate()},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)}),d.current&&d.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:s,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){"Process"===e.key||e.nativeEvent.isComposing||"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 m(t){return p(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach(function(e){c(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t))}function v(t){return p({placeholder:t.placeholder,type:"password",handleInputChange:t.handleInputChange,handlerEnter:t.handleEnterPress,maxWidth:t.maxWidth,width:t.width,value:t.value})}function g(t){var e,n,i,o=f((0,r.useState)(!1),2),l=o[0],s=o[1],c=f((0,r.useState)({}),2),u=c[0],d=c[1],h=(0,r.useRef)(null),p=(0,r.useRef)(null),m=t.options.find(function(e){var n;return e.value===(null!==(n=t.value)&&void 0!==n?n:t.defaultValue)});(0,r.useEffect)(function(){var t=function(t){h.current&&!h.current.contains(t.target)&&p.current&&!p.current.contains(t.target)&&s(!1)};return document.addEventListener("mousedown",t),function(){return document.removeEventListener("mousedown",t)}},[]),(0,r.useEffect)(function(){if(l&&h.current&&p.current){var t,e=h.current.getBoundingClientRect(),n=p.current.offsetHeight,r=window.innerHeight-e.bottom,i=e.top;t=r<n&&i>n?e.top-n-4:e.bottom+4,d({position:"fixed",top:t,left:e.left,width:e.width,zIndex:9999})}},[l]);return r.createElement("div",{className:"select_wrapper",style:{width:t.width||"100%"}},t.tip&&r.createElement("p",{className:"input input_left"},t.tip),r.createElement("div",{className:"select_container"},r.createElement("div",{ref:h,className:["input input--block",t.no_border?"input--no_border":"","select_trigger",t.disabled?"select_trigger--disabled":""].join(" "),onClick:function(){t.disabled||s(!l)}},r.createElement("span",{className:"select_trigger__label",style:{color:(null==m?void 0:m.color)||"inherit"}},null!==(e=null!==(n=null!==(i=null==m?void 0:m.title)&&void 0!==i?i:null==m?void 0:m.label)&&void 0!==n?n:null==m?void 0:m.value)&&void 0!==e?e:""),r.createElement("i",{className:["material-icons","select_trigger__icon",l?"select_trigger__icon--open":""].join(" ")},"expand_more")),l&&(0,a.createPortal)(r.createElement("div",{ref:p,className:"select_dropdown",style:u},t.options.map(function(e,n){var i,o,a;return r.createElement("div",{key:n,className:["select_option",e.value===(null!==(i=t.value)&&void 0!==i?i:t.defaultValue)?"select_option--selected":""].join(" "),style:{color:e.color},onClick:function(){t.onChange(e.value),s(!1)}},null!==(o=null!==(a=e.title)&&void 0!==a?a:e.label)&&void 0!==o?o:e.value)})),document.body)))}function b(t){var e,n;return r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"radio",checked:null!==(e=t.selected)&&void 0!==e&&e,name:null!==(n=t.name)&&void 0!==n?n:"common_name",value:t.value,className:"input_radio",onChange:function(){t.onchange&&t.onchange(t.value)}}),t.context)}function y(t){return r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"checkbox",disabled:!!t.is_disable,checked:!!t.selected,onChange:function(){t.onchange&&t.onchange()}}),t.context&&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),d=n(2042),h=n(3033),p=n(2389),m=n(4694),v=n(447);function g(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 b(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 _(c,"_invoke",function(n,r,i){var o,l,s,c=0,u=i||[],f=!1,d={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,s=t,d.n=n,a}};function h(n,r){for(l=n,s=r,e=0;!f&&c&&!i&&e<u.length;e++){var i,o=u[e],h=d.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]<=h&&((i=n<2&&h<o[1])?(l=0,d.v=r,d.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,d.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&&h(u,p),l=u,s=p;(e=l<2?t:s)||!f;){o||(l?l<3?(l>1&&(d.n=-1),h(l,s)):d.n=s:d.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=d.n<0)?s:n.call(r,d))!==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]())):(_(e={},r,function(){return this}),e),f=c.prototype=l.prototype=Object.create(u);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,_(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=c,_(f,"constructor",c),_(c,"constructor",s),s.displayName="GeneratorFunction",_(c,i,"GeneratorFunction"),_(f),_(f,i,"Generator"),_(f,r,function(){return this}),_(f,"toString",function(){return"[object Generator]"}),(y=function(){return{w:o,m:d}})()}function _(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}_=function(t,e,n,r){function o(e,n){_(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))},_(t,e,n,r)}function x(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){x(o,r,i,a,l,"next",t)}function l(t){x(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 C,S=300,N=!1,I=0,O=!0,T=[],j=-1,L=[];function P(t){var e=E((0,a.L4)(l.AG.log_viewer),2),n=e[0],_=e[1],x=(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?(x.current.insertBefore(o,i),T.unshift(o)):(x.current.appendChild(o),T.push(o)),o},tt=function(t){var e=(0,m.I)(T,function(e){return e===t});e&&x.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?x.current.firstChild:o);if(T.length>S)for(var l=T.length-1;l>=S;)tt(T[T.length-1]),l--}else{for(var s=0;s<i.length;s++)Q(i[s],e[s],n[s]);if(T.length>S)for(var c=T.length-S;c>0;)tt(T[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 C.encoding=n.encoding,C.context="",t.n=1,o.ws.sendData(i.HK.log_viewer,C);case 1:if(e=t.v){if(r=e.context,C=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>"));C.find_back_enter_index=!1,et(r.context_list,r.context_position_list,r.context_start_position_list,C.back),C.context_list.length>0&&(C.back&&T.length>0?(C.context_list.length>T.length?P(Math.floor(100*parseInt(T[C.context_list.length-T.length].getAttribute("position"))/C.max_size)):P(Math.floor(100*parseInt(T[T.length-C.context_list.length].getAttribute("position"))/C.max_size)),O=!1):P(Math.floor(100*(null!==(s=C.context_position_list[C.context_position_list.length-1])&&void 0!==s?s:0)/C.max_size)))}case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),rt=function(t){N||(N=!0,P(100),o.ws.addMsg(i.HK.log_viewer_watch,function(t){var e=t.context;e&&(C=e,et(e.context_list,e.context_position_list,e.context_start_position_list,!1),x.current.scrollTop=x.current.scrollHeight)}),C.context="",C.context_list=[],C.context_position_list=[],C.context_start_position_list=[],C.position=t,o.ws.sendData(i.HK.log_viewer_watch,C),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=x.current)){t.n=7;break}if(!N){t.n=1;break}return I=e.scrollTop,t.a(2);case 1:if(!(I<e.scrollTop&&T.length>0&&e.scrollTop+e.clientHeight+500>=e.scrollHeight)){t.n=4;break}if(!((n=parseInt(T[T.length-1].getAttribute("position")))>=C.max_size)){t.n=2;break}return rt(n),t.a(2);case 2:return C.line=20,C.context="",C.context_list=[],C.context_position_list=[],C.context_start_position_list=[],C.back=!1,C.position=n,t.n=3,nt();case 3:t.n=6;break;case 4:if(!(I>e.scrollTop&&T.length>0&&e.scrollTop-300<=0)){t.n=6;break}if(!((r=parseInt(T[0].getAttribute("start_position")))<=0)){t.n=5;break}return O||(O=!0,(0,d.N9)("到达顶部")),I=e.scrollTop,t.a(2);case 5:return C.line=10,C.context="",C.context_list=[],C.context_position_list=[],C.context_start_position_list=[],C.back=!0,C.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)}}(),x.current.addEventListener("scroll",e),r=function(t){var e=x.current;if(e){t.preventDefault();t.deltaY>0?e.scrollTop+=20:e.scrollTop-=20}},x.current.addEventListener("wheel",r,{passive:!1}),z(!1),q(0),Z(0),W(""),N=!1,V(0),I=0,L=[],j=-1,T=[],(C=new u.d2).line=S,C.path="".concat((0,f.GG)("file",(0,f.vX)())).concat(n.fileName),C.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,d.zN)(t.message)}}),o.ws.addMsg(i.HK.search_file_index,function(t){try{var e;(e=L).push.apply(e,b(t.context)),V(t.context.length)}catch(t){(0,d.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:x.current&&x.current.remove(),T=[];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(C.line=S,C.context="",C.context_list=[],C.context_position_list=[],C.context_start_position_list=[],e=0,t.p=1,!((e=parseInt(H))>100||e<0)){t.n=2;break}throw(0,d.zN)("范围在0-100"),"超过最大范围";case 2:n=g(T);try{for(n.s();!(r=n.n()).done;)i=r.value,x.current.removeChild(i)}catch(t){n.e(t)}finally{n.f()}T=[],t.n=4;break;case 3:return t.p=3,o=t.v,(0,d.N9)(o),t.a(2);case 4:return C.back=e>=100,C.position=Math.floor(C.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(!N){t.n=1;break}return t.a(2);case 1:C.line=S,C.context="",C.context_list=[],C.context_position_list=[],C.context_start_position_list=[],e=g(T);try{for(e.s();!(n=e.n()).done;)r=n.value,x.current.removeChild(r)}catch(t){e.e(t)}finally{e.f()}return T=[],C.back=!0,C.position=C.max_size,t.n=2,nt();case 2:x.current.scrollTop=x.current.scrollHeight,rt(C.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=[],C.query_text=G,C.encoding=n.encoding,o.ws.sendData(i.HK.search_file,C);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:C.line=S,C.context="",C.context_list=[],C.context_position_list=[],C.context_start_position_list=[],e=g(T);try{for(e.s();!(n=e.n()).done;)r=n.value,x.current.removeChild(r)}catch(t){e.e(t)}finally{e.f()}return T=[],i=j+1>=L.length?0:j+1,Z(i+1),j=i,C.find_back_enter_index=!0,C.back=!1,C.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:C.line=S,C.context="",C.context_list=[],C.context_position_list=[],C.context_start_position_list=[],e=g(T);try{for(e.s();!(n=e.n()).done;)r=n.value,x.current.removeChild(r)}catch(t){e.e(t)}finally{e.f()}return T=[],i=j-1<0?L.length-1:j-1,Z(i+1),j=i,C.back=!1,C.find_back_enter_index=!0,C.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(){_({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(h.$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(){N&&(N=!1,z(!1),o.ws.sendData(i.HK.log_viewer_watch_cancel,C))}})),r.createElement("span",null,"当前加载进度",k),r.createElement(h.$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:x,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),d=n.n(f),h=n(1113),p=n.n(h),m=n(1028),v={};v.styleTagTransform=p(),v.setAttributes=u(),v.insert=s().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=d();i()(m.A,v),m.A&&m.A.locals&&m.A.locals}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 27.de4dc0ae94f30cf51809.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[27],{447(e,t,n){n.d(t,{WA:()=>f,ZI:()=>m,Zp:()=>u,fq:()=>p,gz:()=>v,uF:()=>s,xP:()=>d});var r=n(6540),o=n(505);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,l,a,i=[],c=!0,u=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=l.call(n)).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)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}var i=function(e){return e[e.common=0]="common",e[e.full=1]="full",e}(i||{});function c(e,t){var n=t===i.common?"card-content":t===i.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 u(e){return c(e,i.common)}function s(e){return c(e,i.full)}function d(e){var t,n,l,a=(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:a,onClick:function(){var t,n;(0,o.lW)(null!==(t=null!==(n=e.tip_context)&&void 0!==n?n:e.context)&&void 0!==t?t:e.children),new Noty({type:"info",text:"复制完成",timeout:1e3,layout:"bottomLeft"}).show()}},null!==(n=null!==(l=e.tip_context)&&void 0!==l?l:e.context)&&void 0!==n?n:e.children))}function f(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 m(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 v(e){return r.createElement("div",{className:"progress-card"},r.createElement("div",{className:"progress-per"},r.createElement("div",{style:{width:"".concat(e.progress,"%")}})))}var p=function(e){var t=l((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 a={width:"10px",height:"10px",borderRadius:"50%",backgroundColor:n,display:"inline-block"};return r.createElement("div",{style:a})}},3033(e,t,n){n.d(t,{$Z:()=>m,GL:()=>g,Sm:()=>p,U6:()=>b,cA:()=>h,l6:()=>y});var r=n(6540),o=n(5219),l=n.n(o),a=(n(9145),n(961)),i=n(5997);function c(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 u(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 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 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,i=[],c=!0,u=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=l.call(n)).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return f(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)?f(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function m(e){var t=(0,r.useRef)(null),n=d(r.useState(""),2),o=n[0],l=n[1];return(0,r.useEffect)(function(){var n=e.value;null==n&&(n=""),t.current.value=n,l(e.value||"")},[e.value]),r.createElement("div",{id:"search",className:"",style:{maxWidth:e.max_width,display:e.not_mobile?"block":void 0}},r.createElement("div",{id:"input"},r.createElement(i.In,{icon:e.icon}),r.createElement("input",{type:e.type,ref:t,placeholder:o||e.placeholder,onChange:function(t){e.handleInputChange&&e.handleInputChange(t.target.value,t.target),l(t.target.value)},onKeyPress:function(t){"Process"===t.key||t.nativeEvent.isComposing||"Enter"===t.key&&e.handleEnterPress&&e.handleEnterPress()}})))}function v(e){var t=(0,r.useRef)(null),n=d(r.useState(""),2),o=n[0],a=n[1],i=d(r.useState("input input--block awesomplete"),2),c=i[0],u=i[1];(0,r.useEffect)(function(){a(null==e.value?"":e.value),e.focus&&t.current&&t.current.focus(),e.no_border&&u("input input--block awesomplete input--no_border")},[e.value,e.focus,e.no_border]);var f=(0,r.useRef)(e.handleInputChange);return(0,r.useEffect)(function(){f.current=e.handleInputChange},[e.handleInputChange]),(0,r.useEffect)(function(){if(null!=e.options&&t.current&&Array.isArray(e.options)){var n=e.options.map(function(e){return"object"===s(e)&&null!==e?{label:e.label,value:e.value}:String(e)}),r=new(l())(t.current,{list:n,minChars:0,autoFirst:!0,filter:function(e,t){return""===t.trim()||l().FILTER_CONTAINS(e,t)},sort:function(e,n){var r;return""===(null===(r=t.current)||void 0===r?void 0:r.value.trim())?0:e.label<n.label?-1:1}}),o=function(){r.evaluate()},i=function(e){var n,r,o,l=null!==(n=null!==(r=e.text.label)&&void 0!==r?r:e.text.value)&&void 0!==n?n:e.text,i=null!==(o=e.text.value)&&void 0!==o?o:e.text;a(l),requestAnimationFrame(function(){t.current&&(t.current.value=l)}),f.current&&f.current(i,t.current)};return t.current.addEventListener("focus",o),t.current.addEventListener("awesomplete-selectcomplete",i),function(){t.current&&(t.current.removeEventListener("focus",o),t.current.removeEventListener("awesomplete-selectcomplete",i)),r.destroy()}}},[e.options]),r.createElement(r.Fragment,null,e.placeholderOut&&r.createElement("p",null,e.placeholderOut),r.createElement("div",{style:{display:"flex",alignItems:"center",width:e.width,maxWidth:e.maxWidth}},e.left_placeholder&&r.createElement("div",{style:{flex:"0 0 auto",marginRight:"4px"}},e.left_placeholder),r.createElement("input",{style:{flex:1,minWidth:0},onClick:function(e){return e.stopPropagation()},disabled:!!e.disabled,className:c,type:e.type,placeholder:e.placeholder,onChange:function(t){var n=t.target.value;a(n),e.handleInputChange&&e.handleInputChange(n,t.target)},onKeyPress:function(t){"Process"===t.key||t.nativeEvent.isComposing||"Enter"===t.key&&e.handlerEnter&&e.handlerEnter(t.currentTarget.value)},value:o,ref:t}),e.right_placeholder&&r.createElement("div",{style:{flex:"0 0 auto",marginLeft:"4px"}},e.right_placeholder)))}function p(e){return v(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e))}function h(e){return v({placeholder:e.placeholder,type:"password",handleInputChange:e.handleInputChange,handlerEnter:e.handleEnterPress,maxWidth:e.maxWidth,width:e.width,value:e.value})}function y(e){var t,n,o,l=d((0,r.useState)(!1),2),i=l[0],c=l[1],u=d((0,r.useState)({}),2),s=u[0],f=u[1],m=(0,r.useRef)(null),v=(0,r.useRef)(null),p=e.options.find(function(t){var n;return t.value===(null!==(n=e.value)&&void 0!==n?n:e.defaultValue)});(0,r.useEffect)(function(){var e=function(e){m.current&&!m.current.contains(e.target)&&v.current&&!v.current.contains(e.target)&&c(!1)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}},[]),(0,r.useEffect)(function(){if(i&&m.current&&v.current){var e,t=m.current.getBoundingClientRect(),n=v.current.offsetHeight,r=window.innerHeight-t.bottom,o=t.top;e=r<n&&o>n?t.top-n-4:t.bottom+4,f({position:"fixed",top:e,left:t.left,width:t.width,zIndex:9999})}},[i]);return r.createElement("div",{className:"select_wrapper",style:{width:e.width||"100%"}},e.tip&&r.createElement("p",{className:"input input_left"},e.tip),r.createElement("div",{className:"select_container"},r.createElement("div",{ref:m,className:["input input--block",e.no_border?"input--no_border":"","select_trigger",e.disabled?"select_trigger--disabled":""].join(" "),onClick:function(){e.disabled||c(!i)}},r.createElement("span",{className:"select_trigger__label",style:{color:(null==p?void 0:p.color)||"inherit"}},null!==(t=null!==(n=null!==(o=null==p?void 0:p.title)&&void 0!==o?o:null==p?void 0:p.label)&&void 0!==n?n:null==p?void 0:p.value)&&void 0!==t?t:""),r.createElement("i",{className:["material-icons","select_trigger__icon",i?"select_trigger__icon--open":""].join(" ")},"expand_more")),i&&(0,a.createPortal)(r.createElement("div",{ref:v,className:"select_dropdown",style:s},e.options.map(function(t,n){var o,l,a;return r.createElement("div",{key:n,className:["select_option",t.value===(null!==(o=e.value)&&void 0!==o?o:e.defaultValue)?"select_option--selected":""].join(" "),style:{color:t.color},onClick:function(){e.onChange(t.value),c(!1)}},null!==(l=null!==(a=t.title)&&void 0!==a?a:t.label)&&void 0!==l?l:t.value)})),document.body)))}function b(e){var t,n;return r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"radio",checked:null!==(t=e.selected)&&void 0!==t&&t,name:null!==(n=e.name)&&void 0!==n?n:"common_name",value:e.value,className:"input_radio",onChange:function(){e.onchange&&e.onchange(e.value)}}),e.context)}function g(e){return r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"checkbox",disabled:!!e.is_disable,checked:!!e.selected,onChange:function(){e.onchange&&e.onchange()}}),e.context&&e.context)}},2721(e,t,n){n.d(t,{O:()=>p,z:()=>v});var r=n(2389),o=n(7444),l=n(6417),a=n(6540),i=n(5997);function c(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function l(n,r,o,l){var c=r&&r.prototype instanceof i?r:i,s=Object.create(c.prototype);return u(s,"_invoke",function(n,r,o){var l,i,c,u=0,s=o||[],d=!1,f={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,n){return l=t,i=0,c=e,f.n=n,a}};function m(n,r){for(i=n,c=r,t=0;!d&&u&&!o&&t<s.length;t++){var o,l=s[t],m=f.p,v=l[2];n>3?(o=v===r)&&(c=l[(i=l[4])?5:(i=3,3)],l[4]=l[5]=e):l[0]<=m&&((o=n<2&&m<l[1])?(i=0,f.v=r,f.n=l[1]):m<v&&(o=n<3||l[0]>r||r>v)&&(l[4]=n,l[5]=r,f.n=v,i=0))}if(o||n>1)return a;throw d=!0,r}return function(o,s,v){if(u>1)throw TypeError("Generator is already running");for(d&&1===s&&m(s,v),i=s,c=v;(t=i<2?e:c)||!d;){l||(i?i<3?(i>1&&(f.n=-1),m(i,c)):f.n=c:f.v=c);try{if(u=2,l){if(i||(o="next"),t=l[o]){if(!(t=t.call(l,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,i<2&&(i=0)}else 1===i&&(t=l.return)&&t.call(l),i<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),i=1);l=e}else if((t=(d=f.n<0)?c:n.call(r,f))!==a)break}catch(t){l=e,i=1,c=t}finally{u=1}}return{value:t,done:d}}}(n,o,l),!0),s}var a={};function i(){}function s(){}function d(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(u(t={},r,function(){return this}),t),m=d.prototype=i.prototype=Object.create(f);function v(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,u(e,o,"GeneratorFunction")),e.prototype=Object.create(m),e}return s.prototype=d,u(m,"constructor",d),u(d,"constructor",s),s.displayName="GeneratorFunction",u(d,o,"GeneratorFunction"),u(m),u(m,o,"Generator"),u(m,r,function(){return this}),u(m,"toString",function(){return"[object Generator]"}),(c=function(){return{w:l,m:v}})()}function u(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}u=function(e,t,n,r){function l(t,n){u(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))},u(e,t,n,r)}function s(e,t,n,r,o,l,a){try{var i=e[l](a),c=i.value}catch(e){return void n(e)}i.done?t(c):Promise.resolve(c).then(r,o)}function d(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var l=e.apply(t,n);function a(e){s(l,r,o,a,i,"next",e)}function i(e){s(l,r,o,a,i,"throw",e)}a(void 0)})}}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,l,a,i=[],c=!0,u=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=l.call(n)).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function v(){var e,t=(0,r.Bd)().t,n=f((0,o.L4)(l.AG.prompt_card),2),i=n[0],c=n[1];return a.createElement("div",{className:"card floating"},a.createElement("div",{className:"card-title"},a.createElement("h2",null,null!==(e=i.title)&&void 0!==e?e:t("验证执行"))),a.createElement("div",{className:"card-content"},i.context_div),a.createElement("div",{className:"card-action"},i.cancel&&a.createElement("button",{className:"button button--flat button--grey",onClick:function(){i.cancel&&i.cancel(),c({open:!1})}},"cancel"),i.confirm&&a.createElement("button",{className:"button button--flat",onClick:i.confirm},"confirm")))}function p(e){var t,n,o,l,u,s,m=(0,r.Bd)().t,v=null!==(t=null===(n=e.pages)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.id)&&void 0!==t?t:"",p=f((0,a.useState)(null!==(o=e.initialPageId)&&void 0!==o?o:v),2),h=p[0],y=p[1];(0,a.useEffect)(function(){var t;y(null!==(t=e.initialPageId)&&void 0!==t?t:v)},[e.initialPageId,v,null===(l=e.pages)||void 0===l?void 0:l.length]);var b=(0,a.useMemo)(function(){var t,n,r;return null!==(t=null===(n=e.pages)||void 0===n?void 0:n.find(function(e){return e.id===h}))&&void 0!==t?t:null===(r=e.pages)||void 0===r?void 0:r[0]},[e.pages,h]);return a.createElement("div",{className:"prompt-switch-page"},a.createElement("div",{className:"prompt-switch-page__header"},a.createElement("div",null,a.createElement("div",{className:"prompt-switch-page__title"},null!==(u=e.title)&&void 0!==u?u:m("信息")),e.subtitle&&a.createElement("div",{className:"prompt-switch-page__meta"},e.subtitle)),a.createElement("div",{className:"prompt-switch-page__actions"},e.onRefresh&&a.createElement(i.rA,{icon:"refresh",title:m("刷新"),onClick:d(c().m(function t(){var n;return c().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,null===(n=e.onRefresh)||void 0===n?void 0:n.call(e);case 1:return t.a(2)}},t)}))}),e.onClose&&a.createElement(i.rA,{icon:"close",title:m("关闭"),onClick:e.onClose}))),a.createElement("div",{className:"prompt-switch-page__body"},a.createElement("div",{className:"prompt-switch-page__nav"},null!==(s=e.pages)&&void 0!==s&&s.length?e.pages.map(function(e){return a.createElement("button",{key:e.id,className:"button button--flat button--grey prompt-switch-page__nav-item".concat((null==b?void 0:b.id)===e.id?" is-active":""),onClick:function(){return y(e.id)}},a.createElement("div",{className:"prompt-switch-page__nav-item-title"},e.title),e.subtitle&&a.createElement("div",{className:"prompt-switch-page__nav-item-subtitle"},e.subtitle))}):a.createElement("div",{className:"prompt-switch-page__empty"},m("暂无数据"))),a.createElement("div",{className:"prompt-switch-page__content"},b?e.renderPage(b):a.createElement("div",{className:"prompt-switch-page__empty"},m("暂无数据")))))}}}]);
@@ -1,2 +1,2 @@
1
- /*! For license information please see 2851.c6de31a301ab5a7069b3.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[2851],{8694(e,t,n){function r(e){return r="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},r(e)}function o(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r)}}function c(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{$K:()=>s,RB:()=>m,l5:()=>d,qB:()=>l,vo:()=>p,vr:()=>y});var l=c(function e(){u(this,e)}),f=function(e){return e[e.tcp=0]="tcp",e[e.udp=1]="udp",e}({}),s=c(function e(){u(this,e),o(this,"open",!1),o(this,"key",""),o(this,"async_ips",[])}),p=c(function e(){u(this,e),o(this,"open",!1),o(this,"key",""),o(this,"model",f.udp)}),m=function(e){return e[e.row=1]="row",e[e.json=2]="json",e[e.form=3]="form",e}({}),y=c(function e(){u(this,e)}),d=c(function e(){u(this,e)})},2851(e,t,n){n.r(t),n.d(t,{default:()=>_e});var r=n(6540),o=n(5725),a=n(4284),c=n(2042),i=n(3459),u=n(447),l=n(3033),f=n(5997),s=n(7481),p=n(8694),m=n(4944),y=n(4188),d=n(2389),v=n(7952);function h(e){return h="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},h(e)}function b(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 g(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==h(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e){return function(e){if(Array.isArray(e))return k(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||x(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 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 S(l,"_invoke",function(n,r,o){var a,i,u,l=0,f=o||[],s=!1,p={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,n){return a=t,i=0,u=e,p.n=n,c}};function m(n,r){for(i=n,u=r,t=0;!s&&l&&!o&&t<f.length;t++){var o,a=f[t],m=p.p,y=a[2];n>3?(o=y===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=m&&((o=n<2&&m<a[1])?(i=0,p.v=r,p.n=a[1]):m<y&&(o=n<3||a[0]>r||r>y)&&(a[4]=n,a[5]=r,p.n=y,i=0))}if(o||n>1)return c;throw s=!0,r}return function(o,f,y){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&m(f,y),i=f,u=y;(t=i<2?e:u)||!s;){a||(i?i<3?(i>1&&(p.n=-1),m(i,u)):p.n=u:p.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=p.n<0)?u:n.call(r,p))!==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]())):(S(t={},r,function(){return this}),t),s=l.prototype=i.prototype=Object.create(f);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,S(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return u.prototype=l,S(s,"constructor",l),S(l,"constructor",u),u.displayName="GeneratorFunction",S(l,o,"GeneratorFunction"),S(s),S(s,o,"Generator"),S(s,r,function(){return this}),S(s,"toString",function(){return"[object Generator]"}),(E=function(){return{w:a,m:p}})()}function S(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}S=function(e,t,n,r){function a(t,n){S(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},S(e,t,n,r)}function O(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 j(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function c(e){O(a,r,o,c,i,"next",e)}function i(e){O(a,r,o,c,i,"throw",e)}c(void 0)})}}function _(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)||x(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 x(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}function I(e){var t=(0,d.Bd)().t,n=_((0,r.useState)(void 0),2),h=n[0],S=n[1],O=_((0,r.useState)(!1),2),k=O[0],I=O[1],P=_((0,r.useState)(""),2),A=P[0],C=P[1],T=_((0,r.useState)([t("".concat(t("名称"))),t("".concat(t("虚拟"),"ip")),"".concat(t("物理"),"信息"),t("在线状态"),t("选择")]),2),G=T[0],F=(T[1],_((0,r.useState)([]),2)),U=F[0],L=F[1],H=_((0,r.useState)({}),2),N=H[0],W=H[1],B=_((0,r.useState)(!1),2),D=B[0],Z=B[1],K=function(e){var n,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=x(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}}}}(e);try{for(o.s();!(n=o.n()).done;){var a=n.value,c=a[a.length-1];a[a.length-1]=r.createElement(r.Fragment,null,r.createElement(u.fq,{ok:c}),t(c?"在线":"离线")),a[0]=r.createElement(u.xP,{context:a[0],tip_context:a[0]}),a[2]=r.createElement(u.xP,{context:a[2],tip_context:a[2]})}}catch(e){o.e(e)}finally{o.f()}};(0,r.useEffect)(function(){var e=function(){var e=j(E().m(function e(){var t;return E().w(function(e){for(;;)switch(e.n){case 0:return t=new y.hf(y.HK.vir_net_serverIno_get),m.ws.addMsg(y.HK.vir_net_serverIno_get,function(e){K(e.context),L(e.context)}),e.n=1,m.ws.send(t);case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();e();var t=function(){var e=j(E().m(function e(){var t,n;return E().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,a._U.get("vir/server/get");case 1:if((t=e.v).code===i.m.Success){e.n=2;break}return e.a(2);case 2:n=t.data,S(n.port),C(n.key),I(n.open);case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return t(),function(){}},[]);var M=function(){var e=j(E().m(function e(){var t;return E().w(function(e){for(;;)switch(e.n){case 0:return(t=new p.$K).open=k,t.key=A,D&&(t.async_ips=Object.keys(N)),h&&(t.port=parseInt(h)),e.n=1,a._U.post("vir/server/save",t);case 1:if(e.v.code===i.m.Success){e.n=2;break}return(0,c.zN)("网络错误"),e.a(2);case 2:(0,c.LW)("保存成功"),Z(!1);case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),V=function(){var e=j(E().m(function e(){return E().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,a._U.post("vir/server/delete/client",{ips:Object.keys(N)});case 1:W({});case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(v.A,null,!!Object.keys(N).length&&N[0],!!Object.keys(N).length&&r.createElement(f.rA,{icon:"delete",title:"删除",onClick:V})),r.createElement(o.fI,null,r.createElement(o.VP,null,r.createElement(u.Zp,{title:"",rightBottomCom:r.createElement(f.C3,{text:t("保存"),clickFun:M})},r.createElement(l.Sm,{placeholder:"port",value:h,handleInputChange:function(e){S(e)}}),r.createElement(l.Sm,{type:"password",placeholder:"key ",value:A,handleInputChange:function(e){C(e)}}),r.createElement("form",null,t("状态"),":",r.createElement(s.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:t("开启"),selected:k,onchange:function(){I(!k)}}),r.createElement(l.U6,{value:1,context:t("关闭"),selected:!k,onchange:function(){I(!k)}})]})),!!Object.keys(N).length&&r.createElement(l.GL,{context:t("同步信息给选中服务器"),selected:D,onchange:function(){Z(!D)}})),r.createElement(u.Zp,{title:""},r.createElement(s.X,{headers:G,rows:U.map(function(e){return[].concat(w(e),[r.createElement(l.GL,{context:t(""),selected:N[e[1]],onchange:function(){var t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},N);t[e[1]]?delete t[e[1]]:t[e[1]]=e,W(t)}})])}),width:"10rem"})))))}function P(){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 A(l,"_invoke",function(n,r,o){var a,i,u,l=0,f=o||[],s=!1,p={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,n){return a=t,i=0,u=e,p.n=n,c}};function m(n,r){for(i=n,u=r,t=0;!s&&l&&!o&&t<f.length;t++){var o,a=f[t],m=p.p,y=a[2];n>3?(o=y===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=m&&((o=n<2&&m<a[1])?(i=0,p.v=r,p.n=a[1]):m<y&&(o=n<3||a[0]>r||r>y)&&(a[4]=n,a[5]=r,p.n=y,i=0))}if(o||n>1)return c;throw s=!0,r}return function(o,f,y){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&m(f,y),i=f,u=y;(t=i<2?e:u)||!s;){a||(i?i<3?(i>1&&(p.n=-1),m(i,u)):p.n=u:p.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=p.n<0)?u:n.call(r,p))!==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]())):(A(t={},r,function(){return this}),t),s=l.prototype=i.prototype=Object.create(f);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,A(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return u.prototype=l,A(s,"constructor",l),A(l,"constructor",u),u.displayName="GeneratorFunction",A(l,o,"GeneratorFunction"),A(s),A(s,o,"Generator"),A(s,r,function(){return this}),A(s,"toString",function(){return"[object Generator]"}),(P=function(){return{w:a,m:p}})()}function A(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}A=function(e,t,n,r){function a(t,n){A(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))},A(e,t,n,r)}function C(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 T(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function c(e){C(a,r,o,c,i,"next",e)}function i(e){C(a,r,o,c,i,"throw",e)}c(void 0)})}}function G(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 F(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)?F(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function U(e){var t=(0,d.Bd)().t,n=G((0,r.useState)(""),2),v=n[0],h=n[1],b=G((0,r.useState)(void 0),2),g=b[0],w=b[1],E=G((0,r.useState)(""),2),S=E[0],O=E[1],j=G((0,r.useState)(""),2),_=j[0],x=j[1],k=G((0,r.useState)(void 0),2),I=k[0],A=k[1],C=G((0,r.useState)(!1),2),F=C[0],U=C[1],L=G((0,r.useState)(""),2),H=L[0],N=L[1],W=G((0,r.useState)(!1),2),B=W[0],D=W[1];(0,r.useEffect)(function(){var e=function(){var e=T(P().m(function e(){var t,n,r,o,c;return P().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,a._U.get("vir/client/get");case 1:if((t=e.v).code===i.m.Success){e.n=2;break}return e.a(2);case 2:if(n=t.data,A(n.serverPort),O(n.serverIp),h(n.ip),w(n.mask),N(n.key),U(n.open),x(n.client_name),!n.open){e.n=4;break}return r=new y.hf(y.HK.vir_net_client_get),e.n=3,m.ws.send(r);case 3:o=e.v,c=o.context.state,D(c),m.ws.addMsg(y.HK.vir_net_client_get,function(e){D(e.context.state)});case 4:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();e()},[]);var Z=function(){var e=T(P().m(function e(){var t;return P().w(function(e){for(;;)switch(e.n){case 0:return(t=new p.vo).ip=v,t.mask=parseInt(g),t.key=H,t.serverIp=S,t.serverPort=parseInt(I),t.open=F,t.client_name=_,e.n=1,a._U.post("vir/client/save",t);case 1:if(e.v.code===i.m.Success){e.n=2;break}return(0,c.zN)("网络错误"),e.a(2);case 2:(0,c.LW)("保存成功");case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(o.fI,null,r.createElement(o.VP,null,r.createElement(u.Zp,{title:"",rightBottomCom:r.createElement(f.C3,{text:t("保存"),clickFun:Z}),titleCom:r.createElement("div",null,t("连接状态"),r.createElement(u.fq,{ok:B}))},r.createElement(l.Sm,{placeholder:"ip ",value:v,handleInputChange:function(e){h(e)}}),r.createElement(l.Sm,{placeholder:"mask",value:g,handleInputChange:function(e){w(e)}}),r.createElement(l.Sm,{placeholder:"".concat(t("服务器")," ip"),value:S,handleInputChange:function(e){O(e)}}),r.createElement(l.Sm,{placeholder:"".concat(t("服务器")," part"),value:I,handleInputChange:function(e){A(e)}}),r.createElement(l.Sm,{placeholder:"名称 ",value:_,handleInputChange:function(e){x(e)}}),r.createElement(l.Sm,{type:"password",placeholder:"key ",value:H,handleInputChange:function(e){N(e)}}),r.createElement("form",null,t("状态"),r.createElement(s.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:t("开启"),selected:F,onchange:function(){U(!F)}}),r.createElement(l.U6,{value:1,context:t("关闭"),selected:!F,onchange:function(){U(!F)}})]}))),r.createElement(u.Zp,{title:""},r.createElement("div",null,"ip: 虚拟ip, “10.0.0.0 - 10.255.255.255”和“172.16.0.0 - 172.31.255.255”和“192.168.0.0 - 192.168.255.255”这三个网段属于内网ip"),r.createElement("div",null,"mask: 一些常见的子网掩码网段/8:255.0.0.0;/16:255.255.0.0 ;/24:255.255.255.0"),r.createElement("div",null,"key:用于验证身份信息并加密的和服务器设置的一样")))))}var L=n(7444),H=n(6417),N=n(3430),W=n(8247),B=n(1499),D=n(4659);function Z(e){return Z="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},Z(e)}function K(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){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?K(Object(n),!0).forEach(function(t){V(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function V(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Z(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Z(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Z(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z(e){return function(e){if(Array.isArray(e))return Y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Q(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 X(){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,p={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,n){return a=t,i=0,u=e,p.n=n,c}};function m(n,r){for(i=n,u=r,t=0;!s&&l&&!o&&t<f.length;t++){var o,a=f[t],m=p.p,y=a[2];n>3?(o=y===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=m&&((o=n<2&&m<a[1])?(i=0,p.v=r,p.n=a[1]):m<y&&(o=n<3||a[0]>r||r>y)&&(a[4]=n,a[5]=r,p.n=y,i=0))}if(o||n>1)return c;throw s=!0,r}return function(o,f,y){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&m(f,y),i=f,u=y;(t=i<2?e:u)||!s;){a||(i?i<3?(i>1&&(p.n=-1),m(i,u)):p.n=u:p.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=p.n<0)?u:n.call(r,p))!==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 p(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]"}),(X=function(){return{w:a,m:p}})()}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 q(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){q(a,r,o,c,i,"next",e)}function i(e){q(a,r,o,c,i,"throw",e)}c(void 0)})}}function J(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,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)||Q(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 Q(e,t){if(e){if("string"==typeof e)return Y(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)?Y(e,t):void 0}}function Y(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 ee(e){var t=(0,d.Bd)().t,n=J((0,r.useState)(""),2),m=n[0],y=n[1],v=J((0,r.useState)(""),2),h=v[0],b=v[1],g=J((0,r.useState)(""),2),w=g[0],E=g[1],S=J((0,r.useState)(!1),2),O=S[0],j=S[1],_=J((0,r.useState)(!1),2),x=_[0],k=_[1],I=J((0,r.useState)({port:0,open:!1,list:[]}),2),P=I[0],A=I[1],C=J((0,L.L4)(H.AG.editorSetting),2),T=(C[0],C[1]),G=J((0,L.L4)(H.AG.user_base_info),2),F=G[0],U=(G[1],[t("端口"),t("目标地址"),t("目标端口"),t("开启"),t("备注"),t("删除")]),Z=J((0,r.useState)([]),2),K=Z[0],V=Z[1],$=[t("port"),t("ip"),t("type"),t("开启")],q=J((0,r.useState)([]),2),Q=q[0],Y=q[1],ee=[t("编辑"),t("开启"),t("备注"),t("删除")],te=(0,D.K)(),ne=function(){var e=R(X().m(function e(){var t,n;return X().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,a._U.post("http/proxy/get/win");case 1:(t=e.v).code===i.m.Success&&(n=t.data,y(n.ip),b(n.port),j(n.enabled),E(n.bypass),k(n.useForLocal));case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),re=function(){var e=R(X().m(function e(){var t,n,r,o,c,u;return X().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,a._U.post("http/proxy/get/mac");case 1:if((t=e.v).code===i.m.Success){e.n=2;break}return e.a(2);case 2:for(n=[],r=[],o=0,c=t.data;o<c.length;o++)"Wi-Fi"===(u=c[o]).name?n.push(u):r.push(u);Y([].concat(n,r));case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),oe=function(){var e=R(X().m(function e(){var t,n,r,o,c,u;return X().w(function(e){for(;;)switch(e.n){case 0:return t=[a._U.post("vir/client/tcp_proxy/get"),a._U.post("http/proxy/server/get")],F.sys===N.XM.mac?n=re():F.sys===N.XM.win&&(n=ne()),n&&t.push(n),e.n=1,Promise.all(t);case 1:r=e.v,o=J(r,2),c=o[0],u=o[1],c.code===i.m.Success&&V(c.data),u.code===i.m.Success&&A(u.data);case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();(0,r.useEffect)(function(){oe()},[]);var ae=function(){var e=R(X().m(function e(){var t;return X().w(function(e){for(;;)switch(e.n){case 0:return(t=new p.l5).port=parseInt(h),t.enabled=O,t.useForLocal=x,t.ip=m,t.bypass=w,e.n=1,a._U.post("http/proxy/set/win",t);case 1:e.v.code===i.m.Success&&(oe(),(0,c.LW)("保存成功"));case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),ce=function(){var e=R(X().m(function e(t){var n;return X().w(function(e){for(;;)switch(e.n){case 0:return n=Q[t],e.n=1,a._U.post("http/proxy/set/mac",[n]);case 1:e.v.code===i.m.Success&&(oe(),(0,c.LW)("保存成功"));case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),ie=function(){var e=R(X().m(function e(){var t,n;return X().w(function(e){for(;;)switch(e.n){case 0:for(t=[],n=0;n<K.length;n++)K[n].index=n,t.push(K[n]);return e.n=1,a._U.post("vir/client/tcp_proxy/save",t);case 1:e.v.code===i.m.Success&&((0,c.LW)("保存成功"),oe());case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),ue=function(){var e=R(X().m(function e(){return X().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,a._U.post("http/proxy/server/save",P);case 1:e.v.code===i.m.Success&&(oe(),(0,c.LW)("保存成功"));case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),le=function(){var e=R(X().m(function e(t){var n;return X().w(function(e){for(;;)switch(e.n){case 0:if(P.list[t].random_key){e.n=1;break}return P.list[t].random_key=(0,B.hU)(),A(M({},P)),e.n=1,ue();case 1:return e.n=2,a._U.post("http/proxy/server/code/get",{key:P.list[t].random_key});case 2:n=e.v,T({model:"ace/mode/javascript",open:!0,fileName:"",can_format:!0,save:function(){var e=R(X().m(function e(n){return X().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,a._U.post("http/proxy/server/code/save",{context:n,key:P.list[t].random_key});case 1:0===e.v.code&&(W.xK.set_value_temp(""),T({open:!1,model:"",fileName:"",save:null}));case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()}),W.xK.set_value_temp(n.data);case 3:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(o.fI,null,F.sys===N.XM.win&&r.createElement(o.VP,null,r.createElement(u.Zp,{title:"Http Proxy",rightBottomCom:r.createElement(f.C3,{text:t("保存"),clickFun:ae})},r.createElement(l.Sm,{placeholder:"ip (default localhost) ",value:m,handleInputChange:function(e){y(e)}}),r.createElement(l.Sm,{placeholder:"port ",value:h,handleInputChange:function(e){b(e)}}),r.createElement(l.Sm,{placeholder:t("忽略ip"),value:w,handleInputChange:function(e){E(e)}}),r.createElement("form",null,t("请勿将代理服务器用于本地(Intranet)地址"),r.createElement(s.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:t("开启"),selected:x,onchange:function(){k(!x)}}),r.createElement(l.U6,{value:1,context:t("关闭"),selected:!x,onchange:function(){k(!x)}})]})),r.createElement("form",null,t("状态"),r.createElement(s.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:t("开启"),selected:O,onchange:function(){j(!O)}}),r.createElement(l.U6,{value:1,context:t("关闭"),selected:!O,onchange:function(){j(!O)}})]})))),F.sys===N.XM.mac&&r.createElement(o.VP,null,Q.map(function(e,n){return r.createElement(u.uF,{key:n,self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,e.name)," "),titleCom:r.createElement("div",null,r.createElement(f.rA,{icon:"save",title:t("保存"),onClick:function(){ce(n)}}))},r.createElement(s.X,{headers:$,rows:e.proxies.map(function(e,t){var o=[r.createElement(l.Sm,{value:e.port,handleInputChange:function(t){e.port=parseInt(t)},no_border:!0}),r.createElement(l.Sm,{value:e.ip,handleInputChange:function(t){e.ip=t},no_border:!0}),r.createElement("div",null,1===e.type?"http":"https"),r.createElement(l.l6,{value:e.enabled,onChange:function(e){!function(e,t,n){var r=z(Q);r[e].proxies[t].enabled=n,Y(r)}(n,t,e)},options:te,no_border:!0})];return o}),width:"10rem"}),"ignore ips",r.createElement(l.Sm,{value:e.bypass,handleInputChange:function(e){Q[n].bypass=e},no_border:!0}))})),r.createElement(o.VP,null,r.createElement(u.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,t("Tcp Proxy"))," "),titleCom:r.createElement("div",null,r.createElement(f.rA,{icon:"add",title:t("添加"),onClick:function(){V([].concat(z(K),[{note:"",open:!1,port:0,target_port:0,target_ip:""}]))}}),r.createElement(f.rA,{icon:"save",title:t("保存"),onClick:ie}))},r.createElement(s.X,{headers:U,rows:K.map(function(e,n){var o=[r.createElement(l.Sm,{value:e.port,handleInputChange:function(t){e.port=parseInt(t)},no_border:!0}),r.createElement(l.Sm,{value:e.target_ip,handleInputChange:function(t){e.target_ip=t},no_border:!0}),r.createElement(l.Sm,{value:e.target_port,handleInputChange:function(t){e.target_port=parseInt(t)},no_border:!0}),r.createElement(l.l6,{value:e.open,onChange:function(e){K[n].open=e,V(z(K))},options:te,no_border:!0}),r.createElement(l.Sm,{value:e.note,handleInputChange:function(t){e.note=t},no_border:!0}),r.createElement("div",null,r.createElement(f.rA,{icon:"delete",title:t("删除"),onClick:function(){return function(e){K.splice(e,1),V(z(K))}(n)}}))];return o}),width:"10rem"})),r.createElement(u.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,t("Http Proxy Server"))," "),titleCom:r.createElement("div",null,r.createElement(f.rA,{icon:"add",title:t("添加"),onClick:function(){P.list.push({note:"",open:!1}),A(M({},P))}}),r.createElement(f.rA,{icon:"save",title:t("保存"),onClick:ue}))},r.createElement(s.X,{headers:ee,rows:P.list.map(function(e,n){return[r.createElement("div",null,r.createElement(f.rA,{icon:"edit",title:t("编辑"),onClick:function(){le(n)}})),r.createElement(l.l6,{value:e.open,onChange:function(e){P.list[n].open=e,A(M({},P))},options:te,no_border:!0}),r.createElement(l.Sm,{value:e.note,handleInputChange:function(t){e.note=t},no_border:!0}),r.createElement("div",null,r.createElement(f.rA,{icon:"delete",title:t("删除"),onClick:function(){P.list.splice(n,1),A(M({},P))}}))]}),width:"10rem"}),r.createElement("form",null,t("状态"),r.createElement(s.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:t("开启"),selected:P.open,onchange:function(){A(M(M({},P),{},{open:!P.open}))}}),r.createElement(l.U6,{value:1,context:t("关闭"),selected:!P.open,onchange:function(){A(M(M({},P),{},{open:!P.open}))}})]})),"port",r.createElement(l.Sm,{value:P.port,handleInputChange:function(e){P.port=e?parseInt(e):"",A(M({},P))},no_border:!0})))))}var te=n(2726),ne=n(3413),re=n.n(ne),oe=n(7690);function ae(e){return function(e){if(Array.isArray(e))return me(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||pe(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 ce(){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 ie(l,"_invoke",function(n,r,o){var a,i,u,l=0,f=o||[],s=!1,p={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,n){return a=t,i=0,u=e,p.n=n,c}};function m(n,r){for(i=n,u=r,t=0;!s&&l&&!o&&t<f.length;t++){var o,a=f[t],m=p.p,y=a[2];n>3?(o=y===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=m&&((o=n<2&&m<a[1])?(i=0,p.v=r,p.n=a[1]):m<y&&(o=n<3||a[0]>r||r>y)&&(a[4]=n,a[5]=r,p.n=y,i=0))}if(o||n>1)return c;throw s=!0,r}return function(o,f,y){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&m(f,y),i=f,u=y;(t=i<2?e:u)||!s;){a||(i?i<3?(i>1&&(p.n=-1),m(i,u)):p.n=u:p.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=p.n<0)?u:n.call(r,p))!==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]())):(ie(t={},r,function(){return this}),t),s=l.prototype=i.prototype=Object.create(f);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,ie(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return u.prototype=l,ie(s,"constructor",l),ie(l,"constructor",u),u.displayName="GeneratorFunction",ie(l,o,"GeneratorFunction"),ie(s),ie(s,o,"Generator"),ie(s,r,function(){return this}),ie(s,"toString",function(){return"[object Generator]"}),(ce=function(){return{w:a,m:p}})()}function ie(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}ie=function(e,t,n,r){function a(t,n){ie(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))},ie(e,t,n,r)}function ue(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=pe(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 le(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 fe(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function c(e){le(a,r,o,c,i,"next",e)}function i(e){le(a,r,o,c,i,"throw",e)}c(void 0)})}}function se(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)||pe(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 pe(e,t){if(e){if("string"==typeof e)return me(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)?me(e,t):void 0}}function me(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 ye(e){var t=(0,d.Bd)().t,n=se((0,r.useState)([]),2),p=n[0],m=n[1],y=se((0,r.useState)([]),2),h=y[0],b=y[1],g=se((0,r.useState)(""),2),w=g[0],E=g[1],S=se((0,r.useState)(""),2),O=S[0],j=S[1],_=se((0,r.useState)(!1),2),x=_[0],k=_[1],I=se((0,L.L4)(H.AG.showPrompt),2),P=(I[0],I[1]),A=se((0,L.L4)(H.AG.confirm),2),C=(A[0],A[1]);(0,r.useEffect)(function(){fe(ce().m(function e(){var t,n,r,o,c,u,l;return ce().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,a.ez.get("ips/dnspod");case 1:if((t=e.v).code===i.m.Success){e.n=2;break}return e.a(2);case 2:n=t.data,r=[],o=[],c=ue(n.ips);try{for(c.s();!(u=c.n()).done;)(l=u.value).isIPv4?r.push(l):o.push(l)}catch(e){c.e(e)}finally{c.f()}m(r),b(o),n.account&&(E(n.account.id),j(n.account.token)),k(n.isOpen);case 3:return e.a(2)}},e)}))()},[]);var T=function(){var e=fe(ce().m(function e(){var t,n,r,o,c,u;return ce().w(function(e){for(;;)switch(e.n){case 0:if(!x||w&&O){e.n=1;break}return new(re())({type:"error",text:"id和token都不能为空",timeout:1e3,layout:"bottomLeft"}).show(),e.a(2);case 1:for(t=new te.yL,n=[],r=0,o=[].concat(ae(p),ae(h));r<o.length;r++)(c=o[r]).ddnsHost&&n.push(c);return t.ips=n,t.account={id:w,token:O},t.isOpen=x,t.ddnsType=te.E2.dnspod,e.n=2,a.ez.post("save",t);case 2:(u=e.v).code===i.m.DdnsAuthFail?new(re())({type:"error",text:u.data,timeout:1e3,layout:"bottomLeft"}).show():new(re())({type:"success",text:u.data,timeout:1e3,layout:"bottomLeft"}).show();case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),G=function(){var e=fe(ce().m(function e(n){return ce().w(function(e){for(;;)switch(e.n){case 0:C({open:!0,handle:function(){var e=fe(ce().m(function e(){return ce().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,a.ez.post("http/del",n);case 1:0===e.v.code&&(0,c.LW)("删除成功,稍后请刷新"),C({open:!1,handle:null});case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),title:t("确定删除吗")});case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(v.A,null,r.createElement(f.rA,{icon:"add",title:t("添加http获取ip"),onClick:function(){P({show:!0,type:oe.PromptEnum.DdnsAddHttp,overlay:!0,data:{}})}})),r.createElement(o.fI,null,r.createElement(o.VP,null,r.createElement(u.Zp,{title:"ipv4"},p.length>0&&p.map(function(e,n){return r.createElement("div",{key:n},"".concat(e.ifaceOrWww,"(").concat(e.ip,")"),r.createElement(l.Sm,{right_placeholder:r.createElement("div",null,e.source_type===te.tC.http_get&&r.createElement(f.rA,{icon:"delete",title:t("删除"),onClick:function(){G(e)}})),placeholder:"a.abc.com b.abc.com ...",value:e.ddnsHost,handleInputChange:function(t){e.ddnsHost=t}}))})),r.createElement(u.Zp,{title:"ipv6"},h.length>0&&h.map(function(e,n){return r.createElement("div",{key:n},"".concat(e.ifaceOrWww,"(").concat(e.ip,")"),r.createElement(l.Sm,{right_placeholder:r.createElement("div",null,e.source_type===te.tC.http_get&&r.createElement(f.rA,{icon:"delete",title:t("删除"),onClick:function(){G(e)}})),placeholder:"a.abc.com b.abc.com ...",value:e.ddnsHost,handleInputChange:function(t){e.ddnsHost=t}}))}))),r.createElement(o.VP,null,r.createElement(u.Zp,{title:t("账号设置"),rightBottomCom:r.createElement(f.C3,{text:t("保存"),clickFun:T})},r.createElement(l.Sm,{placeholder:"ID",value:w,handleInputChange:function(e){E(e)}}),r.createElement(l.cA,{placeholder:"TOKEN",value:O,handleInputChange:function(e){j(e)}}),r.createElement(s.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:t("开启"),selected:x,onchange:function(){k(!x)}}),r.createElement(l.U6,{value:1,context:t("关闭"),selected:!x,onchange:function(){k(!x)}})]})),r.createElement(u.Zp,{title:t("说明")},"域名如果不存在会自动创建,空子域名是@,ip6和ipv4可以互相切换。"))))}function de(e){return function(e){if(Array.isArray(e))return Oe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Se(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 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 he(l,"_invoke",function(n,r,o){var a,i,u,l=0,f=o||[],s=!1,p={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,n){return a=t,i=0,u=e,p.n=n,c}};function m(n,r){for(i=n,u=r,t=0;!s&&l&&!o&&t<f.length;t++){var o,a=f[t],m=p.p,y=a[2];n>3?(o=y===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=m&&((o=n<2&&m<a[1])?(i=0,p.v=r,p.n=a[1]):m<y&&(o=n<3||a[0]>r||r>y)&&(a[4]=n,a[5]=r,p.n=y,i=0))}if(o||n>1)return c;throw s=!0,r}return function(o,f,y){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&m(f,y),i=f,u=y;(t=i<2?e:u)||!s;){a||(i?i<3?(i>1&&(p.n=-1),m(i,u)):p.n=u:p.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=p.n<0)?u:n.call(r,p))!==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]())):(he(t={},r,function(){return this}),t),s=l.prototype=i.prototype=Object.create(f);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,he(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return u.prototype=l,he(s,"constructor",l),he(l,"constructor",u),u.displayName="GeneratorFunction",he(l,o,"GeneratorFunction"),he(s),he(s,o,"Generator"),he(s,r,function(){return this}),he(s,"toString",function(){return"[object Generator]"}),(ve=function(){return{w:a,m:p}})()}function he(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}he=function(e,t,n,r){function a(t,n){he(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))},he(e,t,n,r)}function be(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Se(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 we(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 Ee(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)||Se(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 Se(e,t){if(e){if("string"==typeof e)return Oe(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)?Oe(e,t):void 0}}function Oe(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 je(e){var t=(0,d.Bd)().t,n=Ee((0,r.useState)([]),2),p=n[0],m=n[1],y=Ee((0,r.useState)([]),2),h=y[0],b=y[1],g=Ee((0,r.useState)(""),2),w=g[0],E=g[1],S=Ee((0,r.useState)(""),2),O=S[0],j=S[1],_=Ee((0,r.useState)(!1),2),x=_[0],k=_[1],I=Ee((0,L.L4)(H.AG.showPrompt),2),P=(I[0],I[1]),A=Ee((0,L.L4)(H.AG.confirm),2),C=(A[0],A[1]);(0,r.useEffect)(function(){we(ve().m(function e(){var t,n,r,o,c,u,l;return ve().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,a.ez.get("ips/tx");case 1:if((t=e.v).code===i.m.Success){e.n=2;break}return e.a(2);case 2:n=t.data,r=[],o=[],c=be(n.ips);try{for(c.s();!(u=c.n()).done;)(l=u.value).isIPv4?r.push(l):o.push(l)}catch(e){c.e(e)}finally{c.f()}m(r),b(o),n.account&&(E(n.account.secretid),j(n.account.secretkey)),k(n.isOpen);case 3:return e.a(2)}},e)}))()},[]);var T=function(){var e=we(ve().m(function e(){var t,n,r,o,c,u;return ve().w(function(e){for(;;)switch(e.n){case 0:if(!x||w&&O){e.n=1;break}return new(re())({type:"error",text:"SecretId和SecretKey都不能为空",timeout:1e3,layout:"bottomLeft"}).show(),e.a(2);case 1:for(t=new te.yL,n=[],r=0,o=[].concat(de(p),de(h));r<o.length;r++)(c=o[r]).ddnsHost&&n.push(c);return t.ips=n,t.account={secretid:w,secretkey:O},t.isOpen=x,t.ddnsType=te.E2.tengxun,e.n=2,a.ez.post("save",t);case 2:(u=e.v).code===i.m.DdnsAuthFail?new(re())({type:"error",text:u.data,timeout:1e3,layout:"bottomLeft"}).show():new(re())({type:"success",text:u.data,timeout:1e3,layout:"bottomLeft"}).show();case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),G=function(){var e=we(ve().m(function e(n){return ve().w(function(e){for(;;)switch(e.n){case 0:C({open:!0,handle:function(){var e=we(ve().m(function e(){return ve().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,a.ez.post("http/del",n);case 1:0===e.v.code&&(0,c.LW)("删除成功,稍后请刷新"),C({open:!1,handle:null});case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),title:t("确定删除吗")});case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(v.A,null,r.createElement(f.rA,{icon:"add",title:t("添加http获取ip"),onClick:function(){P({show:!0,type:oe.PromptEnum.DdnsAddHttp,overlay:!0,data:{}})}})),r.createElement(o.fI,null,r.createElement(o.VP,null,r.createElement(u.Zp,{title:"ipv4"},p.length>0&&p.map(function(e,n){return r.createElement("div",{key:n},"".concat(e.ifaceOrWww,"(").concat(e.ip,")"),r.createElement(l.Sm,{right_placeholder:r.createElement("div",null,e.source_type===te.tC.http_get&&r.createElement(f.rA,{icon:"delete",title:t("删除"),onClick:function(){G(e)}})),placeholder:"a.abc.com b.abc.com ...",value:e.ddnsHost,handleInputChange:function(t){e.ddnsHost=t}}))})),r.createElement(u.Zp,{title:"ipv6"},h.length>0&&h.map(function(e,n){return r.createElement("div",{key:n},"".concat(e.ifaceOrWww,"(").concat(e.ip,")"),r.createElement(l.Sm,{right_placeholder:r.createElement("div",null,e.source_type===te.tC.http_get&&r.createElement(f.rA,{icon:"delete",title:t("删除"),onClick:function(){G(e)}})),placeholder:"a.abc.com b.abc.com ...",value:e.ddnsHost,handleInputChange:function(t){e.ddnsHost=t}}))}))),r.createElement(o.VP,null,r.createElement(u.Zp,{title:t("账号设置"),rightBottomCom:r.createElement(f.C3,{text:t("保存"),clickFun:T})},r.createElement(l.Sm,{placeholder:"SecretId",value:w,handleInputChange:function(e){E(e)}}),r.createElement(l.cA,{placeholder:"SecretKey",value:O,handleInputChange:function(e){j(e)}}),r.createElement(s.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:t("开启"),selected:x,onchange:function(){k(!x)}}),r.createElement(l.U6,{value:1,context:t("关闭"),selected:!x,onchange:function(){k(!x)}})]})),r.createElement(u.Zp,{title:t("说明")},"域名如果不存在会自动创建,空子域名是@,ip6和ipv4可以互相切换。"))))}function _e(){var e=(0,d.Bd)().t,t=(0,W.MH)().check_user_auth,n=[];return t(N.oV.vir_net)&&n.push.apply(n,[{index:1,name:e("系统")+e("代理"),rto:"proxy_sys/",component:r.createElement(ee,null)},{index:2,name:"Tun proxy "+e("客户端"),rto:"client/",component:r.createElement(U,null)},{index:3,name:"Tun proxy "+e("服务端"),rto:"server/",component:r.createElement(I,null)}]),t(N.oV.ddns)&&n.push.apply(n,[{index:4,name:"ddns-dnspod(".concat(e("腾讯"),")"),rto:"dnspod/",component:r.createElement(ye,null)},{index:5,name:"ddns-".concat(e("腾讯")).concat(e("云")),rto:"tengxun/",component:r.createElement(je,null)}]),r.createElement(o.W1,{optionList:n})}}}]);
1
+ /*! For license information please see 2851.f71dcc00200781834a71.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[2851],{8694(e,t,n){function r(e){return r="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},r(e)}function o(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r)}}function c(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{$K:()=>s,RB:()=>m,l5:()=>d,qB:()=>l,vo:()=>p,vr:()=>y});var l=c(function e(){u(this,e)}),f=function(e){return e[e.tcp=0]="tcp",e[e.udp=1]="udp",e}({}),s=c(function e(){u(this,e),o(this,"open",!1),o(this,"key",""),o(this,"async_ips",[])}),p=c(function e(){u(this,e),o(this,"open",!1),o(this,"key",""),o(this,"model",f.udp)}),m=function(e){return e[e.row=1]="row",e[e.json=2]="json",e[e.form=3]="form",e}({}),y=c(function e(){u(this,e)}),d=c(function e(){u(this,e)})},2851(e,t,n){n.r(t),n.d(t,{default:()=>Oe});var r=n(6540),o=n(5725),a=n(4284),c=n(2042),i=n(3459),u=n(447),l=n(3033),f=n(5997),s=n(7481),p=n(8694),m=n(4944),y=n(4188),d=n(2389),v=n(7952);function h(e){return h="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},h(e)}function b(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 g(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==h(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e){return function(e){if(Array.isArray(e))return k(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||x(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 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 S(l,"_invoke",function(n,r,o){var a,i,u,l=0,f=o||[],s=!1,p={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,n){return a=t,i=0,u=e,p.n=n,c}};function m(n,r){for(i=n,u=r,t=0;!s&&l&&!o&&t<f.length;t++){var o,a=f[t],m=p.p,y=a[2];n>3?(o=y===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=m&&((o=n<2&&m<a[1])?(i=0,p.v=r,p.n=a[1]):m<y&&(o=n<3||a[0]>r||r>y)&&(a[4]=n,a[5]=r,p.n=y,i=0))}if(o||n>1)return c;throw s=!0,r}return function(o,f,y){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&m(f,y),i=f,u=y;(t=i<2?e:u)||!s;){a||(i?i<3?(i>1&&(p.n=-1),m(i,u)):p.n=u:p.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=p.n<0)?u:n.call(r,p))!==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]())):(S(t={},r,function(){return this}),t),s=l.prototype=i.prototype=Object.create(f);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,S(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return u.prototype=l,S(s,"constructor",l),S(l,"constructor",u),u.displayName="GeneratorFunction",S(l,o,"GeneratorFunction"),S(s),S(s,o,"Generator"),S(s,r,function(){return this}),S(s,"toString",function(){return"[object Generator]"}),(E=function(){return{w:a,m:p}})()}function S(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}S=function(e,t,n,r){function a(t,n){S(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},S(e,t,n,r)}function O(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 j(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function c(e){O(a,r,o,c,i,"next",e)}function i(e){O(a,r,o,c,i,"throw",e)}c(void 0)})}}function _(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)||x(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 x(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}function I(e){var t=(0,d.Bd)().t,n=_((0,r.useState)(void 0),2),h=n[0],S=n[1],O=_((0,r.useState)(!1),2),k=O[0],I=O[1],P=_((0,r.useState)(""),2),A=P[0],C=P[1],T=_((0,r.useState)([t("".concat(t("名称"))),t("".concat(t("虚拟"),"ip")),"".concat(t("物理"),"信息"),t("在线状态"),t("选择")]),2),G=T[0],F=(T[1],_((0,r.useState)([]),2)),U=F[0],L=F[1],N=_((0,r.useState)({}),2),H=N[0],W=N[1],B=_((0,r.useState)(!1),2),D=B[0],Z=B[1],K=function(e){var n,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=x(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}}}}(e);try{for(o.s();!(n=o.n()).done;){var a=n.value,c=a[a.length-1];a[a.length-1]=r.createElement(r.Fragment,null,r.createElement(u.fq,{ok:c}),t(c?"在线":"离线")),a[0]=r.createElement(u.xP,{context:a[0],tip_context:a[0]}),a[2]=r.createElement(u.xP,{context:a[2],tip_context:a[2]})}}catch(e){o.e(e)}finally{o.f()}};(0,r.useEffect)(function(){var e=function(){var e=j(E().m(function e(){var t;return E().w(function(e){for(;;)switch(e.n){case 0:return t=new y.hf(y.HK.vir_net_serverIno_get),m.ws.addMsg(y.HK.vir_net_serverIno_get,function(e){K(e.context),L(e.context)}),e.n=1,m.ws.send(t);case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();e();var t=function(){var e=j(E().m(function e(){var t,n;return E().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,a._U.get("vir/server/get");case 1:if((t=e.v).code===i.m.Success){e.n=2;break}return e.a(2);case 2:n=t.data,S(n.port),C(n.key),I(n.open);case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return t(),function(){}},[]);var M=function(){var e=j(E().m(function e(){var t;return E().w(function(e){for(;;)switch(e.n){case 0:return(t=new p.$K).open=k,t.key=A,D&&(t.async_ips=Object.keys(H)),h&&(t.port=parseInt(h)),e.n=1,a._U.post("vir/server/save",t);case 1:if(e.v.code===i.m.Success){e.n=2;break}return(0,c.zN)("网络错误"),e.a(2);case 2:(0,c.LW)("保存成功"),Z(!1);case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),V=function(){var e=j(E().m(function e(){return E().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,a._U.post("vir/server/delete/client",{ips:Object.keys(H)});case 1:W({});case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(v.A,null,!!Object.keys(H).length&&H[0],!!Object.keys(H).length&&r.createElement(f.rA,{icon:"delete",title:"删除",onClick:V})),r.createElement(o.fI,null,r.createElement(o.VP,null,r.createElement(u.Zp,{title:"",rightBottomCom:r.createElement(f.C3,{text:t("保存"),clickFun:M})},r.createElement(l.Sm,{placeholder:"port",value:h,handleInputChange:function(e){S(e)}}),r.createElement(l.Sm,{type:"password",placeholder:"key ",value:A,handleInputChange:function(e){C(e)}}),r.createElement("form",null,t("状态"),":",r.createElement(s.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:t("开启"),selected:k,onchange:function(){I(!k)}}),r.createElement(l.U6,{value:1,context:t("关闭"),selected:!k,onchange:function(){I(!k)}})]})),!!Object.keys(H).length&&r.createElement(l.GL,{context:t("同步信息给选中服务器"),selected:D,onchange:function(){Z(!D)}})),r.createElement(u.Zp,{title:""},r.createElement(s.X,{headers:G,rows:U.map(function(e){return[].concat(w(e),[r.createElement(l.GL,{context:t(""),selected:H[e[1]],onchange:function(){var t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},H);t[e[1]]?delete t[e[1]]:t[e[1]]=e,W(t)}})])}),width:"10rem"})))))}function P(){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 A(l,"_invoke",function(n,r,o){var a,i,u,l=0,f=o||[],s=!1,p={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,n){return a=t,i=0,u=e,p.n=n,c}};function m(n,r){for(i=n,u=r,t=0;!s&&l&&!o&&t<f.length;t++){var o,a=f[t],m=p.p,y=a[2];n>3?(o=y===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=m&&((o=n<2&&m<a[1])?(i=0,p.v=r,p.n=a[1]):m<y&&(o=n<3||a[0]>r||r>y)&&(a[4]=n,a[5]=r,p.n=y,i=0))}if(o||n>1)return c;throw s=!0,r}return function(o,f,y){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&m(f,y),i=f,u=y;(t=i<2?e:u)||!s;){a||(i?i<3?(i>1&&(p.n=-1),m(i,u)):p.n=u:p.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=p.n<0)?u:n.call(r,p))!==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]())):(A(t={},r,function(){return this}),t),s=l.prototype=i.prototype=Object.create(f);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,A(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return u.prototype=l,A(s,"constructor",l),A(l,"constructor",u),u.displayName="GeneratorFunction",A(l,o,"GeneratorFunction"),A(s),A(s,o,"Generator"),A(s,r,function(){return this}),A(s,"toString",function(){return"[object Generator]"}),(P=function(){return{w:a,m:p}})()}function A(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}A=function(e,t,n,r){function a(t,n){A(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))},A(e,t,n,r)}function C(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 T(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function c(e){C(a,r,o,c,i,"next",e)}function i(e){C(a,r,o,c,i,"throw",e)}c(void 0)})}}function G(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 F(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)?F(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function U(e){var t=(0,d.Bd)().t,n=G((0,r.useState)(""),2),v=n[0],h=n[1],b=G((0,r.useState)(void 0),2),g=b[0],w=b[1],E=G((0,r.useState)(""),2),S=E[0],O=E[1],j=G((0,r.useState)(""),2),_=j[0],x=j[1],k=G((0,r.useState)(void 0),2),I=k[0],A=k[1],C=G((0,r.useState)(!1),2),F=C[0],U=C[1],L=G((0,r.useState)(""),2),N=L[0],H=L[1],W=G((0,r.useState)(!1),2),B=W[0],D=W[1];(0,r.useEffect)(function(){var e=function(){var e=T(P().m(function e(){var t,n,r,o,c;return P().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,a._U.get("vir/client/get");case 1:if((t=e.v).code===i.m.Success){e.n=2;break}return e.a(2);case 2:if(n=t.data,A(n.serverPort),O(n.serverIp),h(n.ip),w(n.mask),H(n.key),U(n.open),x(n.client_name),!n.open){e.n=4;break}return r=new y.hf(y.HK.vir_net_client_get),e.n=3,m.ws.send(r);case 3:o=e.v,c=o.context.state,D(c),m.ws.addMsg(y.HK.vir_net_client_get,function(e){D(e.context.state)});case 4:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();e()},[]);var Z=function(){var e=T(P().m(function e(){var t;return P().w(function(e){for(;;)switch(e.n){case 0:return(t=new p.vo).ip=v,t.mask=parseInt(g),t.key=N,t.serverIp=S,t.serverPort=parseInt(I),t.open=F,t.client_name=_,e.n=1,a._U.post("vir/client/save",t);case 1:if(e.v.code===i.m.Success){e.n=2;break}return(0,c.zN)("网络错误"),e.a(2);case 2:(0,c.LW)("保存成功");case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(o.fI,null,r.createElement(o.VP,null,r.createElement(u.Zp,{title:"",rightBottomCom:r.createElement(f.C3,{text:t("保存"),clickFun:Z}),titleCom:r.createElement("div",null,t("连接状态"),r.createElement(u.fq,{ok:B}))},r.createElement(l.Sm,{placeholder:"ip ",value:v,handleInputChange:function(e){h(e)}}),r.createElement(l.Sm,{placeholder:"mask",value:g,handleInputChange:function(e){w(e)}}),r.createElement(l.Sm,{placeholder:"".concat(t("服务器")," ip"),value:S,handleInputChange:function(e){O(e)}}),r.createElement(l.Sm,{placeholder:"".concat(t("服务器")," part"),value:I,handleInputChange:function(e){A(e)}}),r.createElement(l.Sm,{placeholder:"名称 ",value:_,handleInputChange:function(e){x(e)}}),r.createElement(l.Sm,{type:"password",placeholder:"key ",value:N,handleInputChange:function(e){H(e)}}),r.createElement("form",null,t("状态"),r.createElement(s.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:t("开启"),selected:F,onchange:function(){U(!F)}}),r.createElement(l.U6,{value:1,context:t("关闭"),selected:!F,onchange:function(){U(!F)}})]}))),r.createElement(u.Zp,{title:""},r.createElement("div",null,"ip: 虚拟ip, “10.0.0.0 - 10.255.255.255”和“172.16.0.0 - 172.31.255.255”和“192.168.0.0 - 192.168.255.255”这三个网段属于内网ip"),r.createElement("div",null,"mask: 一些常见的子网掩码网段/8:255.0.0.0;/16:255.255.0.0 ;/24:255.255.255.0"),r.createElement("div",null,"key:用于验证身份信息并加密的和服务器设置的一样")))))}var L=n(7444),N=n(6417),H=n(3430),W=n(8247),B=n(1499),D=n(4659);function Z(e){return Z="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},Z(e)}function K(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){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?K(Object(n),!0).forEach(function(t){V(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function V(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Z(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Z(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Z(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z(e){return function(e){if(Array.isArray(e))return Y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Q(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 X(){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,p={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,n){return a=t,i=0,u=e,p.n=n,c}};function m(n,r){for(i=n,u=r,t=0;!s&&l&&!o&&t<f.length;t++){var o,a=f[t],m=p.p,y=a[2];n>3?(o=y===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=m&&((o=n<2&&m<a[1])?(i=0,p.v=r,p.n=a[1]):m<y&&(o=n<3||a[0]>r||r>y)&&(a[4]=n,a[5]=r,p.n=y,i=0))}if(o||n>1)return c;throw s=!0,r}return function(o,f,y){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&m(f,y),i=f,u=y;(t=i<2?e:u)||!s;){a||(i?i<3?(i>1&&(p.n=-1),m(i,u)):p.n=u:p.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=p.n<0)?u:n.call(r,p))!==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 p(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]"}),(X=function(){return{w:a,m:p}})()}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 q(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){q(a,r,o,c,i,"next",e)}function i(e){q(a,r,o,c,i,"throw",e)}c(void 0)})}}function J(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,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)||Q(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 Q(e,t){if(e){if("string"==typeof e)return Y(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)?Y(e,t):void 0}}function Y(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 ee(e){var t=(0,d.Bd)().t,n=J((0,r.useState)(""),2),m=n[0],y=n[1],v=J((0,r.useState)(""),2),h=v[0],b=v[1],g=J((0,r.useState)(""),2),w=g[0],E=g[1],S=J((0,r.useState)(!1),2),O=S[0],j=S[1],_=J((0,r.useState)(!1),2),x=_[0],k=_[1],I=J((0,r.useState)({port:0,open:!1,list:[]}),2),P=I[0],A=I[1],C=J((0,L.L4)(N.AG.editorSetting),2),T=(C[0],C[1]),G=J((0,L.L4)(N.AG.user_base_info),2),F=G[0],U=(G[1],[t("端口"),t("目标地址"),t("目标端口"),t("开启"),t("备注"),t("删除")]),Z=J((0,r.useState)([]),2),K=Z[0],V=Z[1],$=[t("port"),t("ip"),t("type"),t("开启")],q=J((0,r.useState)([]),2),Q=q[0],Y=q[1],ee=[t("编辑"),t("开启"),t("备注"),t("删除")],te=(0,D.K)(),ne=function(){var e=R(X().m(function e(){var t,n;return X().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,a._U.post("http/proxy/get/win");case 1:(t=e.v).code===i.m.Success&&(n=t.data,y(n.ip),b(n.port),j(n.enabled),E(n.bypass),k(n.useForLocal));case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),re=function(){var e=R(X().m(function e(){var t,n,r,o,c,u;return X().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,a._U.post("http/proxy/get/mac");case 1:if((t=e.v).code===i.m.Success){e.n=2;break}return e.a(2);case 2:for(n=[],r=[],o=0,c=t.data;o<c.length;o++)"Wi-Fi"===(u=c[o]).name?n.push(u):r.push(u);Y([].concat(n,r));case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),oe=function(){var e=R(X().m(function e(){var t,n,r,o,c,u;return X().w(function(e){for(;;)switch(e.n){case 0:return t=[a._U.post("vir/client/tcp_proxy/get"),a._U.post("http/proxy/server/get")],F.sys===H.XM.mac?n=re():F.sys===H.XM.win&&(n=ne()),n&&t.push(n),e.n=1,Promise.all(t);case 1:r=e.v,o=J(r,2),c=o[0],u=o[1],c.code===i.m.Success&&V(c.data),u.code===i.m.Success&&A(u.data);case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();(0,r.useEffect)(function(){oe()},[]);var ae=function(){var e=R(X().m(function e(){var t;return X().w(function(e){for(;;)switch(e.n){case 0:return(t=new p.l5).port=parseInt(h),t.enabled=O,t.useForLocal=x,t.ip=m,t.bypass=w,e.n=1,a._U.post("http/proxy/set/win",t);case 1:e.v.code===i.m.Success&&(oe(),(0,c.LW)("保存成功"));case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),ce=function(){var e=R(X().m(function e(t){var n;return X().w(function(e){for(;;)switch(e.n){case 0:return n=Q[t],e.n=1,a._U.post("http/proxy/set/mac",[n]);case 1:e.v.code===i.m.Success&&(oe(),(0,c.LW)("保存成功"));case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),ie=function(){var e=R(X().m(function e(){var t,n;return X().w(function(e){for(;;)switch(e.n){case 0:for(t=[],n=0;n<K.length;n++)K[n].index=n,t.push(K[n]);return e.n=1,a._U.post("vir/client/tcp_proxy/save",t);case 1:e.v.code===i.m.Success&&((0,c.LW)("保存成功"),oe());case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),ue=function(){var e=R(X().m(function e(){return X().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,a._U.post("http/proxy/server/save",P);case 1:e.v.code===i.m.Success&&(oe(),(0,c.LW)("保存成功"));case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),le=function(){var e=R(X().m(function e(t){var n;return X().w(function(e){for(;;)switch(e.n){case 0:if(P.list[t].random_key){e.n=1;break}return P.list[t].random_key=(0,B.hU)(),A(M({},P)),e.n=1,ue();case 1:return e.n=2,a._U.post("http/proxy/server/code/get",{key:P.list[t].random_key});case 2:n=e.v,T({model:"ace/mode/javascript",open:!0,fileName:"",can_format:!0,save:function(){var e=R(X().m(function e(n){return X().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,a._U.post("http/proxy/server/code/save",{context:n,key:P.list[t].random_key});case 1:0===e.v.code&&(W.xK.set_value_temp(""),T({open:!1,model:"",fileName:"",save:null}));case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()}),W.xK.set_value_temp(n.data);case 3:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(o.fI,null,F.sys===H.XM.win&&r.createElement(o.VP,null,r.createElement(u.Zp,{title:"Http Proxy",rightBottomCom:r.createElement(f.C3,{text:t("保存"),clickFun:ae})},r.createElement(l.Sm,{placeholder:"ip (default localhost) ",value:m,handleInputChange:function(e){y(e)}}),r.createElement(l.Sm,{placeholder:"port ",value:h,handleInputChange:function(e){b(e)}}),r.createElement(l.Sm,{placeholder:t("忽略ip"),value:w,handleInputChange:function(e){E(e)}}),r.createElement("form",null,t("请勿将代理服务器用于本地(Intranet)地址"),r.createElement(s.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:t("开启"),selected:x,onchange:function(){k(!x)}}),r.createElement(l.U6,{value:1,context:t("关闭"),selected:!x,onchange:function(){k(!x)}})]})),r.createElement("form",null,t("状态"),r.createElement(s.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:t("开启"),selected:O,onchange:function(){j(!O)}}),r.createElement(l.U6,{value:1,context:t("关闭"),selected:!O,onchange:function(){j(!O)}})]})))),F.sys===H.XM.mac&&r.createElement(o.VP,null,Q.map(function(e,n){return r.createElement(u.uF,{key:n,self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,e.name)," "),titleCom:r.createElement("div",null,r.createElement(f.rA,{icon:"save",title:t("保存"),onClick:function(){ce(n)}}))},r.createElement(s.X,{headers:$,rows:e.proxies.map(function(e,t){var o=[r.createElement(l.Sm,{value:e.port,handleInputChange:function(t){e.port=parseInt(t)},no_border:!0}),r.createElement(l.Sm,{value:e.ip,handleInputChange:function(t){e.ip=t},no_border:!0}),r.createElement("div",null,1===e.type?"http":"https"),r.createElement(l.l6,{value:e.enabled,onChange:function(e){!function(e,t,n){var r=z(Q);r[e].proxies[t].enabled=n,Y(r)}(n,t,e)},options:te,no_border:!0})];return o}),width:"10rem"}),"ignore ips",r.createElement(l.Sm,{value:e.bypass,handleInputChange:function(e){Q[n].bypass=e},no_border:!0}))})),r.createElement(o.VP,null,r.createElement(u.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,t("Tcp Proxy"))," "),titleCom:r.createElement("div",null,r.createElement(f.rA,{icon:"add",title:t("添加"),onClick:function(){V([].concat(z(K),[{note:"",open:!1,port:0,target_port:0,target_ip:""}]))}}),r.createElement(f.rA,{icon:"save",title:t("保存"),onClick:ie}))},r.createElement(s.X,{headers:U,rows:K.map(function(e,n){var o=[r.createElement(l.Sm,{value:e.port,handleInputChange:function(t){e.port=parseInt(t)},no_border:!0}),r.createElement(l.Sm,{value:e.target_ip,handleInputChange:function(t){e.target_ip=t},no_border:!0}),r.createElement(l.Sm,{value:e.target_port,handleInputChange:function(t){e.target_port=parseInt(t)},no_border:!0}),r.createElement(l.l6,{value:e.open,onChange:function(e){K[n].open=e,V(z(K))},options:te,no_border:!0}),r.createElement(l.Sm,{value:e.note,handleInputChange:function(t){e.note=t},no_border:!0}),r.createElement("div",null,r.createElement(f.rA,{icon:"delete",title:t("删除"),onClick:function(){return function(e){K.splice(e,1),V(z(K))}(n)}}))];return o}),width:"10rem"})),r.createElement(u.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,t("Http Proxy Server"))," "),titleCom:r.createElement("div",null,r.createElement(f.rA,{icon:"add",title:t("添加"),onClick:function(){P.list.push({note:"",open:!1}),A(M({},P))}}),r.createElement(f.rA,{icon:"save",title:t("保存"),onClick:ue}))},r.createElement(s.X,{headers:ee,rows:P.list.map(function(e,n){return[r.createElement("div",null,r.createElement(f.rA,{icon:"edit",title:t("编辑"),onClick:function(){le(n)}})),r.createElement(l.l6,{value:e.open,onChange:function(e){P.list[n].open=e,A(M({},P))},options:te,no_border:!0}),r.createElement(l.Sm,{value:e.note,handleInputChange:function(t){e.note=t},no_border:!0}),r.createElement("div",null,r.createElement(f.rA,{icon:"delete",title:t("删除"),onClick:function(){P.list.splice(n,1),A(M({},P))}}))]}),width:"10rem"}),r.createElement("form",null,t("状态"),r.createElement(s.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:t("开启"),selected:P.open,onchange:function(){A(M(M({},P),{},{open:!P.open}))}}),r.createElement(l.U6,{value:1,context:t("关闭"),selected:!P.open,onchange:function(){A(M(M({},P),{},{open:!P.open}))}})]})),"port",r.createElement(l.Sm,{value:P.port,handleInputChange:function(e){P.port=e?parseInt(e):"",A(M({},P))},no_border:!0})))))}var te=n(2726),ne=n(7690);function re(e){return function(e){if(Array.isArray(e))return se(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||fe(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 oe(){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 ae(l,"_invoke",function(n,r,o){var a,i,u,l=0,f=o||[],s=!1,p={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,n){return a=t,i=0,u=e,p.n=n,c}};function m(n,r){for(i=n,u=r,t=0;!s&&l&&!o&&t<f.length;t++){var o,a=f[t],m=p.p,y=a[2];n>3?(o=y===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=m&&((o=n<2&&m<a[1])?(i=0,p.v=r,p.n=a[1]):m<y&&(o=n<3||a[0]>r||r>y)&&(a[4]=n,a[5]=r,p.n=y,i=0))}if(o||n>1)return c;throw s=!0,r}return function(o,f,y){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&m(f,y),i=f,u=y;(t=i<2?e:u)||!s;){a||(i?i<3?(i>1&&(p.n=-1),m(i,u)):p.n=u:p.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=p.n<0)?u:n.call(r,p))!==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]())):(ae(t={},r,function(){return this}),t),s=l.prototype=i.prototype=Object.create(f);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,ae(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return u.prototype=l,ae(s,"constructor",l),ae(l,"constructor",u),u.displayName="GeneratorFunction",ae(l,o,"GeneratorFunction"),ae(s),ae(s,o,"Generator"),ae(s,r,function(){return this}),ae(s,"toString",function(){return"[object Generator]"}),(oe=function(){return{w:a,m:p}})()}function ae(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}ae=function(e,t,n,r){function a(t,n){ae(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))},ae(e,t,n,r)}function ce(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=fe(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 ie(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 ue(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function c(e){ie(a,r,o,c,i,"next",e)}function i(e){ie(a,r,o,c,i,"throw",e)}c(void 0)})}}function le(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)||fe(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 fe(e,t){if(e){if("string"==typeof e)return se(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)?se(e,t):void 0}}function se(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 pe(e){var t=(0,d.Bd)().t,n=le((0,r.useState)([]),2),p=n[0],m=n[1],y=le((0,r.useState)([]),2),h=y[0],b=y[1],g=le((0,r.useState)(""),2),w=g[0],E=g[1],S=le((0,r.useState)(""),2),O=S[0],j=S[1],_=le((0,r.useState)(!1),2),x=_[0],k=_[1],I=le((0,L.L4)(N.AG.showPrompt),2),P=(I[0],I[1]),A=le((0,L.L4)(N.AG.confirm),2),C=(A[0],A[1]);(0,r.useEffect)(function(){ue(oe().m(function e(){var t,n,r,o,c,u,l;return oe().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,a.ez.get("ips/dnspod");case 1:if((t=e.v).code===i.m.Success){e.n=2;break}return e.a(2);case 2:n=t.data,r=[],o=[],c=ce(n.ips);try{for(c.s();!(u=c.n()).done;)(l=u.value).isIPv4?r.push(l):o.push(l)}catch(e){c.e(e)}finally{c.f()}m(r),b(o),n.account&&(E(n.account.id),j(n.account.token)),k(n.isOpen);case 3:return e.a(2)}},e)}))()},[]);var T=function(){var e=ue(oe().m(function e(){var t,n,r,o,c,u;return oe().w(function(e){for(;;)switch(e.n){case 0:if(!x||w&&O){e.n=1;break}return new Noty({type:"error",text:"id和token都不能为空",timeout:1e3,layout:"bottomLeft"}).show(),e.a(2);case 1:for(t=new te.yL,n=[],r=0,o=[].concat(re(p),re(h));r<o.length;r++)(c=o[r]).ddnsHost&&n.push(c);return t.ips=n,t.account={id:w,token:O},t.isOpen=x,t.ddnsType=te.E2.dnspod,e.n=2,a.ez.post("save",t);case 2:(u=e.v).code===i.m.DdnsAuthFail?new Noty({type:"error",text:u.data,timeout:1e3,layout:"bottomLeft"}).show():new Noty({type:"success",text:u.data,timeout:1e3,layout:"bottomLeft"}).show();case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),G=function(){var e=ue(oe().m(function e(n){return oe().w(function(e){for(;;)switch(e.n){case 0:C({open:!0,handle:function(){var e=ue(oe().m(function e(){return oe().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,a.ez.post("http/del",n);case 1:0===e.v.code&&(0,c.LW)("删除成功,稍后请刷新"),C({open:!1,handle:null});case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),title:t("确定删除吗")});case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(v.A,null,r.createElement(f.rA,{icon:"add",title:t("添加http获取ip"),onClick:function(){P({show:!0,type:ne.PromptEnum.DdnsAddHttp,overlay:!0,data:{}})}})),r.createElement(o.fI,null,r.createElement(o.VP,null,r.createElement(u.Zp,{title:"ipv4"},p.length>0&&p.map(function(e,n){return r.createElement("div",{key:n},"".concat(e.ifaceOrWww,"(").concat(e.ip,")"),r.createElement(l.Sm,{right_placeholder:r.createElement("div",null,e.source_type===te.tC.http_get&&r.createElement(f.rA,{icon:"delete",title:t("删除"),onClick:function(){G(e)}})),placeholder:"a.abc.com b.abc.com ...",value:e.ddnsHost,handleInputChange:function(t){e.ddnsHost=t}}))})),r.createElement(u.Zp,{title:"ipv6"},h.length>0&&h.map(function(e,n){return r.createElement("div",{key:n},"".concat(e.ifaceOrWww,"(").concat(e.ip,")"),r.createElement(l.Sm,{right_placeholder:r.createElement("div",null,e.source_type===te.tC.http_get&&r.createElement(f.rA,{icon:"delete",title:t("删除"),onClick:function(){G(e)}})),placeholder:"a.abc.com b.abc.com ...",value:e.ddnsHost,handleInputChange:function(t){e.ddnsHost=t}}))}))),r.createElement(o.VP,null,r.createElement(u.Zp,{title:t("账号设置"),rightBottomCom:r.createElement(f.C3,{text:t("保存"),clickFun:T})},r.createElement(l.Sm,{placeholder:"ID",value:w,handleInputChange:function(e){E(e)}}),r.createElement(l.cA,{placeholder:"TOKEN",value:O,handleInputChange:function(e){j(e)}}),r.createElement(s.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:t("开启"),selected:x,onchange:function(){k(!x)}}),r.createElement(l.U6,{value:1,context:t("关闭"),selected:!x,onchange:function(){k(!x)}})]})),r.createElement(u.Zp,{title:t("说明")},"域名如果不存在会自动创建,空子域名是@,ip6和ipv4可以互相切换。"))))}function me(e){return function(e){if(Array.isArray(e))return Ee(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||we(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 ye(){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 de(l,"_invoke",function(n,r,o){var a,i,u,l=0,f=o||[],s=!1,p={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,n){return a=t,i=0,u=e,p.n=n,c}};function m(n,r){for(i=n,u=r,t=0;!s&&l&&!o&&t<f.length;t++){var o,a=f[t],m=p.p,y=a[2];n>3?(o=y===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=m&&((o=n<2&&m<a[1])?(i=0,p.v=r,p.n=a[1]):m<y&&(o=n<3||a[0]>r||r>y)&&(a[4]=n,a[5]=r,p.n=y,i=0))}if(o||n>1)return c;throw s=!0,r}return function(o,f,y){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&m(f,y),i=f,u=y;(t=i<2?e:u)||!s;){a||(i?i<3?(i>1&&(p.n=-1),m(i,u)):p.n=u:p.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=p.n<0)?u:n.call(r,p))!==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]())):(de(t={},r,function(){return this}),t),s=l.prototype=i.prototype=Object.create(f);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,de(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return u.prototype=l,de(s,"constructor",l),de(l,"constructor",u),u.displayName="GeneratorFunction",de(l,o,"GeneratorFunction"),de(s),de(s,o,"Generator"),de(s,r,function(){return this}),de(s,"toString",function(){return"[object Generator]"}),(ye=function(){return{w:a,m:p}})()}function de(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}de=function(e,t,n,r){function a(t,n){de(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))},de(e,t,n,r)}function ve(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=we(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 he(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){he(a,r,o,c,i,"next",e)}function i(e){he(a,r,o,c,i,"throw",e)}c(void 0)})}}function ge(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)||we(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 we(e,t){if(e){if("string"==typeof e)return Ee(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)?Ee(e,t):void 0}}function Ee(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 Se(e){var t=(0,d.Bd)().t,n=ge((0,r.useState)([]),2),p=n[0],m=n[1],y=ge((0,r.useState)([]),2),h=y[0],b=y[1],g=ge((0,r.useState)(""),2),w=g[0],E=g[1],S=ge((0,r.useState)(""),2),O=S[0],j=S[1],_=ge((0,r.useState)(!1),2),x=_[0],k=_[1],I=ge((0,L.L4)(N.AG.showPrompt),2),P=(I[0],I[1]),A=ge((0,L.L4)(N.AG.confirm),2),C=(A[0],A[1]);(0,r.useEffect)(function(){be(ye().m(function e(){var t,n,r,o,c,u,l;return ye().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,a.ez.get("ips/tx");case 1:if((t=e.v).code===i.m.Success){e.n=2;break}return e.a(2);case 2:n=t.data,r=[],o=[],c=ve(n.ips);try{for(c.s();!(u=c.n()).done;)(l=u.value).isIPv4?r.push(l):o.push(l)}catch(e){c.e(e)}finally{c.f()}m(r),b(o),n.account&&(E(n.account.secretid),j(n.account.secretkey)),k(n.isOpen);case 3:return e.a(2)}},e)}))()},[]);var T=function(){var e=be(ye().m(function e(){var t,n,r,o,c,u;return ye().w(function(e){for(;;)switch(e.n){case 0:if(!x||w&&O){e.n=1;break}return new Noty({type:"error",text:"SecretId和SecretKey都不能为空",timeout:1e3,layout:"bottomLeft"}).show(),e.a(2);case 1:for(t=new te.yL,n=[],r=0,o=[].concat(me(p),me(h));r<o.length;r++)(c=o[r]).ddnsHost&&n.push(c);return t.ips=n,t.account={secretid:w,secretkey:O},t.isOpen=x,t.ddnsType=te.E2.tengxun,e.n=2,a.ez.post("save",t);case 2:(u=e.v).code===i.m.DdnsAuthFail?new Noty({type:"error",text:u.data,timeout:1e3,layout:"bottomLeft"}).show():new Noty({type:"success",text:u.data,timeout:1e3,layout:"bottomLeft"}).show();case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),G=function(){var e=be(ye().m(function e(n){return ye().w(function(e){for(;;)switch(e.n){case 0:C({open:!0,handle:function(){var e=be(ye().m(function e(){return ye().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,a.ez.post("http/del",n);case 1:0===e.v.code&&(0,c.LW)("删除成功,稍后请刷新"),C({open:!1,handle:null});case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),title:t("确定删除吗")});case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(v.A,null,r.createElement(f.rA,{icon:"add",title:t("添加http获取ip"),onClick:function(){P({show:!0,type:ne.PromptEnum.DdnsAddHttp,overlay:!0,data:{}})}})),r.createElement(o.fI,null,r.createElement(o.VP,null,r.createElement(u.Zp,{title:"ipv4"},p.length>0&&p.map(function(e,n){return r.createElement("div",{key:n},"".concat(e.ifaceOrWww,"(").concat(e.ip,")"),r.createElement(l.Sm,{right_placeholder:r.createElement("div",null,e.source_type===te.tC.http_get&&r.createElement(f.rA,{icon:"delete",title:t("删除"),onClick:function(){G(e)}})),placeholder:"a.abc.com b.abc.com ...",value:e.ddnsHost,handleInputChange:function(t){e.ddnsHost=t}}))})),r.createElement(u.Zp,{title:"ipv6"},h.length>0&&h.map(function(e,n){return r.createElement("div",{key:n},"".concat(e.ifaceOrWww,"(").concat(e.ip,")"),r.createElement(l.Sm,{right_placeholder:r.createElement("div",null,e.source_type===te.tC.http_get&&r.createElement(f.rA,{icon:"delete",title:t("删除"),onClick:function(){G(e)}})),placeholder:"a.abc.com b.abc.com ...",value:e.ddnsHost,handleInputChange:function(t){e.ddnsHost=t}}))}))),r.createElement(o.VP,null,r.createElement(u.Zp,{title:t("账号设置"),rightBottomCom:r.createElement(f.C3,{text:t("保存"),clickFun:T})},r.createElement(l.Sm,{placeholder:"SecretId",value:w,handleInputChange:function(e){E(e)}}),r.createElement(l.cA,{placeholder:"SecretKey",value:O,handleInputChange:function(e){j(e)}}),r.createElement(s.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:t("开启"),selected:x,onchange:function(){k(!x)}}),r.createElement(l.U6,{value:1,context:t("关闭"),selected:!x,onchange:function(){k(!x)}})]})),r.createElement(u.Zp,{title:t("说明")},"域名如果不存在会自动创建,空子域名是@,ip6和ipv4可以互相切换。"))))}function Oe(){var e=(0,d.Bd)().t,t=(0,W.MH)().check_user_auth,n=[];return t(H.oV.vir_net)&&n.push.apply(n,[{index:1,name:e("系统")+e("代理"),rto:"proxy_sys/",component:r.createElement(ee,null)},{index:2,name:"Tun proxy "+e("客户端"),rto:"client/",component:r.createElement(U,null)},{index:3,name:"Tun proxy "+e("服务端"),rto:"server/",component:r.createElement(I,null)}]),t(H.oV.ddns)&&n.push.apply(n,[{index:4,name:"ddns-dnspod(".concat(e("腾讯"),")"),rto:"dnspod/",component:r.createElement(pe,null)},{index:5,name:"ddns-".concat(e("腾讯")).concat(e("云")),rto:"tengxun/",component:r.createElement(Se,null)}]),r.createElement(o.W1,{optionList:n})}}}]);