← Back
Editing: index-legacy91.js
!function(){function t(e){return t="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},t(e)}function e(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return n};var r,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(r){s=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var o=e&&e.prototype instanceof x?e:x,i=Object.create(o.prototype),c=new N(n||[]);return a(i,"_invoke",{value:j(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}n.wrap=p;var v="suspendedStart",y="suspendedYield",d="executing",m="completed",g={};function x(){}function w(){}function b(){}var _={};s(_,u,(function(){return this}));var k=Object.getPrototypeOf,L=k&&k(k(V([])));L&&L!==o&&i.call(L,u)&&(_=L);var E=b.prototype=x.prototype=Object.create(_);function P(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function S(e,r){function n(o,a,c,u){var l=h(e[o],e,a);if("throw"!==l.type){var f=l.arg,s=f.value;return s&&"object"==t(s)&&i.call(s,"__await")?r.resolve(s.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):r.resolve(s).then((function(t){f.value=t,c(f)}),(function(t){return n("throw",t,c,u)}))}u(l.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new r((function(r,o){n(t,e,r,o)}))}return o=o?o.then(i,i):i()}})}function j(t,e,n){var o=v;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:r,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=C(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=h(t,e,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,e){var n=e.method,o=t.iterator[n];if(o===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=r,C(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=h(o,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,g;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,g):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function V(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function t(){for(;++o<e.length;)if(i.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=r,t.done=!0,t};return a.next=a}}throw new TypeError(t(e)+" is not iterable")}return w.prototype=b,a(E,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=s(b,f,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,f,"GeneratorFunction")),t.prototype=Object.create(E),t},n.awrap=function(t){return{__await:t}},P(S.prototype),s(S.prototype,l,(function(){return this})),n.AsyncIterator=S,n.async=function(t,e,r,o,i){void 0===i&&(i=Promise);var a=new S(p(t,e,r,o),i);return n.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},P(E),s(E,f,"Generator"),s(E,u,(function(){return this})),s(E,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=V,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(I),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,o){return c.type="throw",c.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:V(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),g}},n}function r(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function c(t){r(a,o,i,c,u,"next",t)}function u(t){r(a,o,i,c,u,"throw",t)}c(void 0)}))}}System.register(["./utils-lib-legacy.js?v=VERSION_NUMBER","./version-compare.vue_vue_type_script_setup_true_lang-legacy.js?v=VERSION_NUMBER","./base-lib-legacy.js?v=VERSION_NUMBER","./__commonjsHelpers__-legacy.js?v=VERSION_NUMBER"],(function(t,r){"use strict";var o,i,a,c,u,l,f,s,p,h,v,y,d,m,g,x,w,b,_,k,L,E,P,S,j,C;return{setters:[function(t){o=t.fo,i=t.k,a=t.p,c=t.n,u=t.fM,l=t.fN,f=t.b,s=t.fO,p=t._,h=t.H,v=t.bg,y=t.c,d=t.bq},function(t){m=t._},function(t){g=t.c,x=t.q,w=t.v,b=t.y,_=t.e,k=t.x,L=t.p,E=t.A,P=t.B,S=t.z,j=t.J,C=t.P},null],execute:function(){var r={class:"p-[20px] flex"},O={class:"flex-1 flex flex-col mr-[15px]"},I={class:"flex-1 flex flex-col"},N=g({__name:"index",setup:function(t){var e=o().certInfo;return function(t,n){var o=i;return x(),w("div",r,[b("div",O,[n[2]||(n[2]=b("span",{class:"mb-[5px]"},"密钥 (KEY)",-1)),_(o,{type:"textarea",rows:16,modelValue:k(e).private_key,"onUpdate:modelValue":n[0]||(n[0]=function(t){return k(e).private_key=t}),class:"w-full"},null,8,["modelValue"])]),b("div",I,[n[3]||(n[3]=b("span",{class:"mb-[5px]"},"证书 (CRT/PEM)",-1)),_(o,{type:"textarea",rows:16,modelValue:k(e).certificate,"onUpdate:modelValue":n[1]||(n[1]=function(t){return k(e).certificate=t}),class:"w-full"},null,8,["modelValue"])])])}}}),V=f(),G=V.request,T=V.error,F=o(),q=F.getInfo,A=F.hasCert,M=F.serverIP,U=F.serverProtocol,Y=F.serverPort,H=F.certInfo,R=F.getCertInfo,z=new Map([["start","启动"],["stop","停止"],["reload","重载"],["restart","重启"]]),B=function(t){var r,o=z.get(t)||"";a({title:"".concat(o,"服务"),content:"是否".concat(o,"虚拟主机服务,是否继续?"),onConfirm:(r=n(e().mark((function r(){var n;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s(t);case 2:return n=e.sent,e.next=6,G(n);case 6:q();case 7:case"end":return e.stop()}}),r)}))),function(){return r.apply(this,arguments)})})},J=function(){var t=n(e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A.value){t.next=3;break}return T("请先上传证书"),t.abrupt("return");case 3:c({title:"设置SSL证书",area:70,component:N,showFooter:!0,onOpen:function(){R()},onConfirm:function(){var t=n(e().mark((function t(){var r,n,o,i;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=H.value,n=r.certificate,o=r.private_key,t.next=3,u(n,o);case 3:return i=t.sent,t.next=6,G(i);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()});case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),K=function(){var t=n(e().mark((function t(){var r;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(""!==M.value){t.next=3;break}return T("Please enter the server IP"),t.abrupt("return");case 3:return t.next=5,l(M.value);case 5:return r=t.sent,t.next=8,G(r);case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),D=function(){window.open("".concat(U.value,"://").concat(M.value).concat(Y.value,"/account/login"),"_blank","noopener,noreferrer")},Q={class:""},W={class:"ml-[100px] mt-[2px]"};t("default",g({__name:"index",setup:function(t){var e=o(),r=e.isServerRunning,n=e.serverIP,a=e.serverProtocol,c=e.serverPort,u=e.resetServerEvent,l=e.getServerIP,f=e.getCertInfo;return L((function(){f(),l()})),function(t,e){var o=p,l=h,f=v,s=i,g=y,L=d;return x(),w("div",Q,[_(m),_(L,{class:"my-[16px]"},{default:E((function(){return[_(f,{label:"服务状态"},{default:E((function(){return[b("div",{class:j(["mr-[8px] text-[#666] flex items-center",k(r).color])},[P(S(k(r).tips),1),_(o,{icon:"icon-".concat(k(r).icon),class:j(["mr-[4px]",k(r).color])},null,8,["icon","class"])],2),_(l,{onClick:e[0]||(e[0]=function(t){return k(B)(k(r).type)})},{default:E((function(){return[P(S(k(r).text),1)]})),_:1}),_(l,{onClick:e[1]||(e[1]=function(t){return k(B)("restart")})},{default:E((function(){return e[4]||(e[4]=[P("重启")])})),_:1}),_(l,{onClick:e[2]||(e[2]=function(t){return k(B)("reload")})},{default:E((function(){return e[5]||(e[5]=[P("重载")])})),_:1})]})),_:1}),_(f,{label:"证书SSL"},{default:E((function(){return[_(l,{type:"primary",onClick:k(J)},{default:E((function(){return e[6]||(e[6]=[P("修改")])})),_:1},8,["onClick"])]})),_:1}),_(f,{label:"IP地址"},{default:E((function(){return[_(s,{modelValue:k(n),"onUpdate:modelValue":e[3]||(e[3]=function(t){return C(n)?n.value=t:null}),class:"mr-[10px] w-[250px]"},null,8,["modelValue"]),_(l,{onClick:k(K),type:"primary"},{default:E((function(){return e[7]||(e[7]=[P("修改")])})),_:1},8,["onClick"]),_(l,{onClick:k(u)},{default:E((function(){return e[8]||(e[8]=[P("重置")])})),_:1},8,["onClick"])]})),_:1}),b("p",W,[e[9]||(e[9]=b("span",{class:"mr-[4px]"},"访问地址:",-1)),_(g,{onClick:k(D)},{default:E((function(){return[P(S("".concat(k(a),"://").concat(k(n)).concat(k(c),"/account/login")),1)]})),_:1},8,["onClick"])])]})),_:1})])}}}))}}}))}();
Save File
Cancel