File: /www/server/panel/BTPanel/static/js/index-legacy298.js
!function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(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 n(e){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?t(Object(a),!0).forEach(function(t){r(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):t(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}function r(t,n,r){return(n=function(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var a=r.call(t,n||"default");if("object"!=e(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:n+""}(n))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}function a(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e)||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 o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function l(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function o(n,r,a,o){var l=r&&r.prototype instanceof c?r:c,s=Object.create(l.prototype);return u(s,"_invoke",function(n,r,a){var o,l,u,c=0,s=a||[],p=!1,f={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return o=t,l=0,u=e,f.n=n,i}};function d(n,r){for(l=n,u=r,t=0;!p&&c&&!a&&t<s.length;t++){var a,o=s[t],d=f.p,m=o[2];n>3?(a=m===r)&&(u=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=e):o[0]<=d&&((a=n<2&&d<o[1])?(l=0,f.v=r,f.n=o[1]):d<m&&(a=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,l=0))}if(a||n>1)return i;throw p=!0,r}return function(a,s,m){if(c>1)throw TypeError("Generator is already running");for(p&&1===s&&d(s,m),l=s,u=m;(t=l<2?e:u)||!p;){o||(l?l<3?(l>1&&(f.n=-1),d(l,u)):f.n=u:f.v=u);try{if(c=2,o){if(l||(a="next"),t=o[a]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,l<2&&(l=0)}else 1===l&&(t=o.return)&&t.call(o),l<2&&(u=TypeError("The iterator does not provide a '"+a+"' method"),l=1);o=e}else if((t=(p=f.n<0)?u:n.call(r,f))!==i)break}catch(t){o=e,l=1,u=t}finally{c=1}}return{value:t,done:p}}}(n,a,o),!0),s}var i={};function c(){}function s(){}function p(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(u(t={},r,function(){return this}),t),d=p.prototype=c.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,u(e,a,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=p,u(d,"constructor",p),u(p,"constructor",s),s.displayName="GeneratorFunction",u(p,a,"GeneratorFunction"),u(d),u(d,a,"Generator"),u(d,r,function(){return this}),u(d,"toString",function(){return"[object Generator]"}),(l=function(){return{w:o,m:m}})()}function u(e,t,n,r){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}u=function(e,t,n,r){function o(t,n){u(e,t,function(e){return this._invoke(t,n,e)})}t?a?a(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},u(e,t,n,r)}function i(e,t,n,r,a,o,l){try{var u=e[o](l),i=u.value}catch(e){return void n(e)}u.done?t(i):Promise.resolve(i).then(r,a)}function c(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function l(e){i(o,r,a,l,u,"next",e)}function u(e){i(o,r,a,l,u,"throw",e)}l(void 0)})}}System.register(["./utils-lib-legacy.js?v=1777008528","./base-lib-legacy.js?v=1777008528","./useStore-legacy2.js?v=1777008528","./index-legacy206.js?v=1777008528","./index-legacy116.js?v=1777008528","./index-legacy175.js?v=1777008528","./index-legacy3.js?v=1777008528","./site-legacy.js?v=1777008528","./index.vue_vue_type_script_setup_true_lang-legacy8.js?v=1777008528","./form-item-legacy.js?v=1777008528","./index.vue_vue_type_script_setup_true_lang-legacy18.js?v=1777008528","./index-legacy118.js?v=1777008528","./index-legacy302.js?v=1777008528"],function(e,t){"use strict";var r,o,u,i,s,p,f,d,m,v,h,_,y,g,b,w,x,k,V,j,C,O,P,S,T,q,z,N,U,A,H,I,E,G,D,R,F,B,M,L,J,W,K,$,Q,X,Z,Y,ee,te,ne,re,ae,oe,le,ue,ie,ce,se,pe,fe,de,me,ve,he,_e,ye,ge,be,we,xe,ke,Ve,je,Ce,Oe,Pe,Se,Te,qe,ze,Ne,Ue,Ae,He,Ie,Ee,Ge,De,Re,Fe,Be,Me,Le;return{setters:[function(e){r=e.k,o=e.w,u=e.cO,i=e.c7,s=e.K,p=e.f,f=e.cP,d=e.X,m=e.dc,v=e.e,h=e._,_=e.d3,y=e.d4,g=e.cZ,b=e.da,w=e.cT,x=e.c,k=e.dp},function(e){V=e.c,j=e.r,C=e.H,O=e.w,P=e.o,S=e.aH,T=e.j,q=e.k,z=e.p,N=e.C,U=e.v,A=e.x,H=e.y,I=e.q,E=e.e,G=e.F,D=e.B,R=e.s,F=e.Q,B=e.am,M=e.an,L=e.z,J=e.ad,W=e.G,K=e.ab,$=e.I,Q=e.J,X=e.U,Z=e.a8,Y=e.K,ee=e.ap,te=e.aJ,ne=e.aI,re=e.g,ae=e.aB,oe=e.T,le=e.b7,ue=e.V},function(e){ie=e.u},function(e){ce=e._},function(e){se=e._},function(e){pe=e._},function(e){fe=e.w,de=e.p,me=e.e,ve=e.y,he=e.g,_e=e.b},function(e){ye=e.getComposerVersion,ge=e.updateComposer,be=e.deleteComposerFile,we=e.execComposer,xe=e.getComposerLine,ke=e.setTomcatSettings,Ve=e.getSitePhpVersion,je=e.setPhpSiteGzip,Ce=e.removePhpSiteGzip,Oe=e.getPhpSiteGzip,Pe=e.setSecurityHeaders,Se=e.getSecurityHeaders,Te=e.getCrossOriginAccess,qe=e.setCrossOriginAccess,ze=e.deleteCrossOriginAccess,Ne=e.modifyCrontabStatus,Ue=e.startTaskCrontab,Ae=e.removeCrontab,He=e.getCrontabList,Ie=e.getFreeTotalStatus,Ee=e.setFreeTotalStatus,Ge=e.getPhpSiteCache,De=e.deletePhpSiteCache},function(e){Re=e._},function(e){Fe=e.g},function(e){Be=e._},function(e){Me=e._},function(e){Le=e.default}],execute:function(){var Je={class:"p-1rem"},We={class:"flex items-center"},Ke={key:0,class:"text-danger"},$e={key:1,class:"text-danger text-small"},Qe={class:"mt-[8px] leading-8 text-small list-disc ml-[20px]"},Xe={key:0},Ze={class:"p-2rem h-50rem flex flex-col"},Ye={class:"mb-1rem"},et={class:"flex-1 overflow-auto"},tt=V({__name:"index",setup:function(e,t){var n,f=t.expose,d=ie().siteInfo,m=null===(n=d.value)||void 0===n?void 0:n.project_type,v=p(),h=j(!1),_=j(!1),y=C({path:d.value.path,user:"phpasync"!==m?"www":"root",php:["静态","其它"].includes(d.value.php_version)?"auto":"PHP-"+d.value.php_version.replace(".",""),otherCommand:"",mirror:"https://mirrors.aliyun.com/composer/",command:"install",composerVersion:"install",version:"2.7.3",help_tips:"",comp_json:"",comp_lock:"",phpVersion:[],commandOptions:[{label:"install",value:"install"},{label:"update",value:"update"},{label:"require",value:"require"},{label:"create-project",value:"create-project"},{label:"自定义",value:""}]}),g=j("正在执行..."),b=j(!1),w=j(),x=j(!1);O(function(){return d.value},function(e){y.php=["静态","其它"].includes(e.php_version)?"auto":"PHP-"+e.php_version.replace(".","")},{immediate:!0});var k=function(){var e=c(l().m(function e(t){var n;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:return h.value=!0,e.p=1,e.n=2,ye({path:t||d.value.path});case 2:(n=e.v).data.status?(_.value=!1,y.phpVersion=n.data.php_versions.filter(function(e){return"00"!==e.version}),y.phpVersion.unshift({name:"自动选择",version:"auto"}),y.comp_json=!1,y.comp_lock=!1,"string"==typeof n.data.comp_json&&(y.comp_json=n.data.comp_json),"string"==typeof n.data.comp_lock&&(y.comp_lock=n.data.comp_lock)):(_.value=!0,v.request(n)),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.p=4,h.value=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}));return function(t){return e.apply(this,arguments)}}(),V=function(){fe({type:"dir",path:y.path,change:function(e){y.path=e,k(y.path)}})},$=function(){r({loading:"正在更新,请稍后...",request:ge(),message:!0,success:function(e){e.status&&k(y.path)}})},Q=function(){var e=c(l().m(function e(){return l().w(function(e){for(;;)switch(e.n){case 0:r({loading:"正在删除,请稍后...",request:be({path:y.path+"/composer.lock"}),message:!0,success:function(e){e.status&&k(y.path)}});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),X=function(){var e=c(l().m(function e(){return l().w(function(e){for(;;)switch(e.n){case 0:w.value=setInterval(c(l().m(function e(){return l().w(function(e){for(;;)switch(e.n){case 0:try{Y()}catch(t){clearInterval(w.value)}case 1:return e.a(2)}},e)})),2e3);case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),Z=function(){var e=c(l().m(function e(){var t,n;return l().w(function(e){for(;;)switch(e.n){case 0:return n={php_version:null===(t=y.php)||void 0===t?void 0:t.replace("PHP-",""),composer_args:y.command,composer_cmd:y.otherCommand,repo:y.mirror,path:y.path,user:y.user,composer_version:y.version,siteName:d.value.name},e.n=1,o({title:"执行composer命令",content:"即将执行设定的composer命令,继续吗?",icon:"warning-filled"});case 1:r({loading:"正在执行,请稍后...",request:we(n),message:!0,success:function(e){e.status&&(b.value=!0,X())}});case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),Y=function(){var e=c(l().m(function e(){var t,n,r=arguments;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:return t=r.length>0&&void 0!==r[0]&&r[0],e.p=1,e.n=2,xe({filename:"/tmp/composer_".concat(d.value.name,".log"),num:100});case 2:n=e.v,g.value=n.data.msg,t&&v.success("刷新成功"),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[1,3]])}));return function(){return e.apply(this,arguments)}}(),ee=function(){x.value=!0,Y()},te=function(){clearInterval(w.value),b.value=!1,x.value=!1,g.value=""};return P(k),f({init:k}),S(function(){clearInterval(w.value)}),function(e,t){var n=pe,r=B,o=M,l=L,c=J,p=u,f=se,d=i,v=W,h=K,w=ce,k=s;return T(),q("div",null,[z(_)?(T(),N(n,{key:0,width:"28rem",options:{name:"composer",title:"composer"}},{default:U(function(){return a(t[11]||(t[11]=[A(" 没有找到可用的composer版本 ",-1)]))}),_:1})):H("",!0),I("div",Je,[E(h,{model:z(y)},{default:U(function(){return[E(c,{label:"Composer版本"},{default:U(function(){return[I("div",We,[E(o,{modelValue:z(y).version,"onUpdate:modelValue":t[0]||(t[0]=function(e){return z(y).version=e}),class:"!w-[28rem]"},{default:U(function(){return[E(r,{label:"2.7.3",value:"2.7.3"}),E(r,{label:"1.10.27",value:"1.10.27"})]}),_:1},8,["modelValue"]),E(l,{type:"default",class:"!ml-1rem",onClick:$},{default:U(function(){return a(t[12]||(t[12]=[A(" 升级Composer ",-1)]))}),_:1})])]}),_:1}),E(c,{label:"PHP版本"},{default:U(function(){return["phpasync"!==z(m)?(T(),N(o,{key:0,class:"!w-[28rem]",modelValue:z(y).php,"onUpdate:modelValue":t[1]||(t[1]=function(e){return z(y).php=e})},{default:U(function(){return[(T(!0),q(G,null,D(z(y).phpVersion,function(e,t){return T(),N(r,{key:t,label:e.name,value:e.version},null,8,["label","value"])}),128))]}),_:1},8,["modelValue"])):(T(),N(p,{key:1,modelValue:z(y).php,"onUpdate:modelValue":t[2]||(t[2]=function(e){return z(y).php=e}),disabled:""},null,8,["modelValue"]))]}),_:1}),E(c,{label:"执行参数"},{default:U(function(){return[E(o,{class:"!w-[28rem]","empty-values":[null,void 0],modelValue:z(y).command,"onUpdate:modelValue":t[3]||(t[3]=function(e){return z(y).command=e})},{default:U(function(){return[(T(!0),q(G,null,D(z(y).commandOptions,function(e,t){return T(),N(r,{key:t,label:e.label,value:e.value},null,8,["label","value"])}),128))]}),_:1},8,["modelValue"])]}),_:1}),E(c,{label:"补充命令"},{default:U(function(){return[E(p,{modelValue:z(y).otherCommand,"onUpdate:modelValue":t[4]||(t[4]=function(e){return z(y).otherCommand=e}),placeholder:"请输入补充命令",width:"28rem"},null,8,["modelValue"])]}),_:1}),E(c,{label:"镜像源"},{default:U(function(){return[E(o,{modelValue:z(y).mirror,"onUpdate:modelValue":t[5]||(t[5]=function(e){return z(y).mirror=e}),filterable:"","allow-create":"","default-first-option":"",class:"!w-[28rem]"},{default:U(function(){return[E(r,{label:"阿里云(mirrors.aliyun.com)",value:"https://mirrors.aliyun.com/composer/"}),E(r,{label:"官方源(packagist.org)",value:"repos.packagist"}),E(r,{label:"中国全量镜像(packagist.phpcomposer.com)",value:"https://packagist.phpcomposer.com"}),E(r,{label:"Packagist Mirror(packagist.mirrors.sjtug.sjtu.edu.cn)",value:"https://packagist.mirrors.sjtug.sjtu.edu.cn"}),E(r,{label:"腾讯源(mirrors.tencent.com)",value:"https://mirrors.tencent.com/composer/"}),E(r,{label:"华为云(mirrors.huaweicloud.com)",value:"https://mirrors.huaweicloud.com/repository/php/"})]}),_:1},8,["modelValue"])]}),_:1}),"phpasync"!==z(m)?(T(),N(c,{key:0,label:"执行用户",prop:"command"},{default:U(function(){return[E(o,{modelValue:z(y).user,"onUpdate:modelValue":t[6]||(t[6]=function(e){return z(y).user=e}),class:"!w-28rem"},{default:U(function(){return[E(r,{label:"www(推荐)",value:"www"}),E(r,{label:"root(不推荐)",value:"root"})]}),_:1},8,["modelValue"])]}),_:1})):H("",!0),E(c,{label:"执行目录",prop:"composerVersion"},{default:U(function(){return[E(f,{modelValue:z(y).path,"onUpdate:modelValue":t[7]||(t[7]=function(e){return z(y).path=e}),icon:"el-folder-opened",onIconClick:V,width:"28rem"},null,8,["modelValue"])]}),_:1}),E(c,{label:" ",prop:"composerVersion"},{default:U(function(){return[I("div",null,[z(y).comp_lock?(T(),q("span",Ke,[A(R(z(y).comp_lock)+" ",1),E(d,{onClick:Q},{default:U(function(){return a(t[13]||(t[13]=[A("[点击删除]",-1)]))}),_:1})])):H("",!0),z(y).comp_json?(T(),q("span",$e,R(z(y).comp_json),1)):H("",!0)])]}),_:1}),E(c,{label:" "},{default:U(function(){return[E(l,{type:"primary",disabled:!!("boolean"!=typeof z(y).comp_json&&z(y).comp_json||"boolean"!=typeof z(y).comp_lock&&z(y).comp_lock),onClick:Z},{default:U(function(){return a(t[14]||(t[14]=[A(" 执行 ",-1)]))}),_:1},8,["disabled"]),E(v,{direction:"vertical",class:"!h-1rem !mx-2rem"}),E(l,{onClick:ee},{default:U(function(){return a(t[15]||(t[15]=[A("查看日志",-1)]))}),_:1})]}),_:1})]}),_:1},8,["model"]),I("ul",Qe,[t[16]||(t[16]=I("li",null,"Composer是PHP主流依赖包管理器,若您的项目使用Composer管理依赖包,可在此处对依赖进行升级或安装",-1)),t[17]||(t[17]=I("li",null,"Composer版本:当前安装的Composer版本,可点击右侧的【升级Composer】将Composer升级到最新稳定版",-1)),t[18]||(t[18]=I("li",null,"PHP版本:用于执行composer的PHP版本,无特殊要求,默认即可,如安装出错,可尝试选择其它PHP版本",-1)),t[19]||(t[19]=I("li",null,"执行参数:按需选择执行参数,可配合补充命令使用",-1)),t[20]||(t[20]=I("li",null,"补充命令:若此处为空,则按composer.json中的配置执行,此处支持填写完整composer命令",-1)),t[21]||(t[21]=I("li",null,"镜像源:提供【阿里源】和【官方源】,建议国内服务器使用【阿里源】,海外服务器使用【官方源】",-1)),"phpasync"!==z(m)?(T(),q("li",Xe,"执行用户:默认为www用户,除非您的网站以root权限运行,否则不建议使用root用户执行composer")):H("",!0),t[22]||(t[22]=I("li",null,"执行目录:默认为当前网站根目录",-1))])]),E(k,{title:"请执行完毕确认结果无误后关闭此窗口",onCancel:te,modelValue:z(b),"onUpdate:modelValue":t[8]||(t[8]=function(e){return F(b)?b.value=e:null}),area:[50,42]},{default:U(function(){return[E(w,{class:"h-full",title:"全屏查看composer执行日志",content:z(g),isHtml:!0,isRefreshBtn:!1,isAuto:!0},null,8,["content"])]}),_:1},8,["modelValue"]),E(k,{title:"composer执行日志",onCancel:te,modelValue:z(x),"onUpdate:modelValue":t[10]||(t[10]=function(e){return F(x)?x.value=e:null}),area:60},{default:U(function(){return[I("div",Ze,[I("div",Ye,[E(l,{type:"primary",onClick:t[9]||(t[9]=function(e){return Y(!0)})},{default:U(function(){return a(t[23]||(t[23]=[A(" 刷新日志 ",-1)]))}),_:1})]),I("div",et,[E(w,{class:"h-full",title:"全屏查看composer执行日志",content:z(g),isHtml:!0,isRefreshBtn:!1},null,8,["content"])])])]}),_:1},8,["modelValue"])])}}}),nt={class:"p-1rem relative"},rt={class:"mt-[8px] leading-8 text-small list-disc ml-[20px]"},at={key:0},ot=V({__name:"index",setup:function(e,t){var n=t.expose,o=ie().siteInfo,u=j(!1),s=j(!1),p=C({tomcat:!1}),f=j(""),d=function(){r({loading:"正在设置,请稍后...",request:ke({siteName:o.value.name}),message:!0,success:function(e){e.status&&m()}})},m=function(){var e=c(l().m(function e(){return l().w(function(e){for(;;)switch(e.n){case 0:r({loading:u,request:Ve({siteName:o.value.name}),success:function(e){p.tomcat=e.data.tomcat>0,s.value=!e.data.tomcatversion,f.value=e.data.tomcatversion}});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),v=function(){de({name:"tomcat",type:"i"})};return P(m),n({init:m}),function(e,t){var n=i,r=pe,o=X,l=$("bt-loading");return Q((T(),q("div",null,[z(s)?(T(),N(r,{key:0,width:"28rem"},{content:U(function(){return[t[2]||(t[2]=A(" 请先安装tomcat, ",-1)),E(n,{onClick:v,class:"!text-small"},{default:U(function(){return a(t[1]||(t[1]=[A(" 立即安装 ",-1)]))}),_:1})]}),_:1})):H("",!0),I("div",nt,[E(o,{modelValue:z(p).tomcat,"onUpdate:modelValue":t[0]||(t[0]=function(e){return z(p).tomcat=e}),onChange:d},{default:U(function(){return a(t[3]||(t[3]=[A(" 启用Tomcat ",-1)]))}),_:1},8,["modelValue"]),I("ul",rt,[z(f)?(T(),q("li",at,"当前版本为Tomcat"+R(z(f))+" ,若您需要其它版本,请到软件商店- 所有软件 中切换;",1)):H("",!0),t[4]||(t[4]=I("li",null,"部署顺序: 安装Tomcat >> 创建站点 >> 上传并配置项目 >> 启用Tomcat",-1)),t[5]||(t[5]=I("li",null,"若您的tomcat应用中有php脚本,访问时请添加.php扩展名",-1)),t[6]||(t[6]=I("li",null,"开启成功后,大概需要1-5分钟时间生效!",-1))])])])),[[l,z(u)]])}}}),lt=ie().siteInfo,ut=j(),it=j(!1),ct=j(!1),st=j(!0),pt=C({status:!1,gzip_types:"",comp_level:1,min_length:1,unit:"k"}),ft=[{label:"k",value:"k"},{label:"m",value:"m"}],dt=[{content:"用于对 HTTP 响应的内容进行压缩,以减少数据传输量,提高网站性能和加载速度"},{content:"压缩级别1-9,越高压缩率越高,但也更消耗CPU"},{content:"如果开启gzip后影响网站正常访问,请关闭此功能 和请求参数组成"}],mt={gzip_types:[{required:!0,message:"请输入压缩类型",trigger:["blur","change"]}],min_length:[{required:!0,message:"请输入正确的压缩最小长度",trigger:"blur",validator:function(e,t,n){t?isNaN(Number(t))?n(new Error("请输入数字")):Number(t)<1?n(new Error("请输入正确数字")):n():n(new Error("压缩最小长度不能为空"))}},{}]},vt=function(){var e=c(l().m(function e(){var t,n,a,o,u;return l().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,ut.value.validate();case 1:return t=pt.gzip_types,n=pt.comp_level,a=pt.min_length,o=pt.unit,u={site_name:lt.value.name,gzip_types:t,comp_level:n,min_length:"".concat(a).concat(o)},e.n=2,r({loading:ct,request:je(u),message:!0});case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),ht=function(){var e=c(l().m(function e(){return l().w(function(e){for(;;)switch(e.n){case 0:if(console.log("compressData",pt.status),pt.status){e.n=2;break}return e.n=1,r({loading:ct,request:Ce({site_name:lt.value.name})});case 1:return e.a(2,e.v);case 2:_t();case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),_t=function(){var e=c(l().m(function e(){return l().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,r({loading:ct,request:Oe({site_name:lt.value.name}),success:function(e){var t=e.data,n=t.gzip_types,r=t.comp_level,a=t.min_length;Object.assign(pt,{gzip_types:n,comp_level:r,min_length:a.slice(0,-1),unit:a.slice(-1)}),st.value&&(console.log("res.data.status",e.data.status),pt.status=e.data.status,st.value=!1),console.log("compressData55555",pt)}});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),yt={class:"p-[20px]"},gt={class:"mt-[1.6rem]"},bt={class:"flex items-center"},wt={class:"ml-[20px]"},xt=V({__name:"index",setup:function(e){return P(function(){_t()}),Z(function(){st.value=!0}),function(e,t){var n=ee,r=J,o=u,l=B,i=M,c=L,s=K,p=f,d=$("bt-loading");return T(),q("div",yt,[Q((T(),N(s,{ref_key:"compressFormRef",ref:ut,class:"h-[38rem]",model:z(pt),rules:z(mt),"label-width":"100px",disabled:z(ct)},{default:U(function(){return[E(r,{label:"内容压缩",prop:"status"},{default:U(function(){return[E(n,{modelValue:z(pt).status,"onUpdate:modelValue":t[0]||(t[0]=function(e){return z(pt).status=e}),onChange:z(ht)},null,8,["modelValue","onChange"])]}),_:1}),Q(I("div",gt,[E(r,{label:"压缩类型",prop:"gzip_types"},{default:U(function(){return[E(o,{modelValue:z(pt).gzip_types,"onUpdate:modelValue":t[1]||(t[1]=function(e){return z(pt).gzip_types=e}),type:"textarea",width:"42rem",rows:6,resize:"none"},null,8,["modelValue"])]}),_:1}),E(r,{label:"压缩级别",prop:"comp_level"},{default:U(function(){return[E(i,{class:"!w-[42rem]",modelValue:z(pt).comp_level,"onUpdate:modelValue":t[2]||(t[2]=function(e){return z(pt).comp_level=e})},{default:U(function(){return[(T(),q(G,null,D(9,function(e){return E(l,{key:e,label:e,value:String(e)},null,8,["label","value"])}),64))]}),_:1},8,["modelValue"])]}),_:1}),E(r,{label:"压缩最小长度",prop:"min_length"},{default:U(function(){return[I("div",bt,[E(o,{modelValue:z(pt).min_length,"onUpdate:modelValue":t[3]||(t[3]=function(e){return z(pt).min_length=e})},null,8,["modelValue"]),E(r,{prop:"unit"},{default:U(function(){return[E(i,{class:"ml-[1rem] !w-[8rem]",modelValue:z(pt).unit,"onUpdate:modelValue":t[4]||(t[4]=function(e){return z(pt).unit=e}),placeholder:"请选择"},{default:U(function(){return[(T(!0),q(G,null,D(z(ft),function(e){return T(),N(l,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])}),128))]}),_:1},8,["modelValue"])]}),_:1})])]}),_:1})],512),[[Y,z(pt).status]]),Q(E(r,{label:" ",class:"mt-[1.6rem]"},{default:U(function(){return[E(c,{type:"primary",onClick:z(vt)},{default:U(function(){return a(t[5]||(t[5]=[A("保存",-1)]))}),_:1},8,["onClick"])]}),_:1},512),[[Y,z(pt).status]])]}),_:1},8,["model","rules","disabled"])),[[d,z(it)]]),I("div",wt,[E(p,{options:z(dt)},null,8,["options"])])])}}}),kt={class:"px-2rem"},Vt={class:"ml-[8px]"},jt=V({__name:"index",setup:function(e,t){var n=t.expose,a=ie().siteInfo,o=j(!1),l=j([{help:"阻止浏览器上下文中执行恶意JavaScript代码",value:!1,field:"x_xss_protection"},{help:"阻止浏览器的内容嗅探",value:!1,field:"x_content_type_options"},{help:"让浏览器跳转时不携带referrer",value:!1,field:"referrer_policy"},{help:"让浏览器加载内容时只加载自己网站的内容",value:!1,field:"content_security_policy"},{help:"防止浏览器进行用户行为跟踪",value:!1,field:"permissions_policy"}]),u=function(){var e={};l.value.forEach(function(t){e[t.field]=t.value});var t={site_name:a.value.name,security_info:JSON.stringify(e)};r({loading:"正在设置,请稍后...",request:Pe(t),message:!0,success:function(e){e.status&&i()}})},i=function(){r({loading:o,request:Se({site_name:a.value.name}),success:function(e){l.value.forEach(function(t){e.data[t.field]&&(t.value=e.data[t.field])})}})};return P(i),n({init:i}),function(e,t){var n=ee,r=$("bt-loading");return Q((T(),q("div",kt,[(T(!0),q(G,null,D(z(l),function(e,t){return T(),q("div",{key:t,class:"flex items-center mb-[12px]"},[E(n,{modelValue:e.value,"onUpdate:modelValue":function(t){return e.value=t},onChange:u},null,8,["modelValue","onUpdate:modelValue"]),I("span",Vt,R(e.help),1)])}),128))])),[[r,z(o)]])}}}),Ct=te("CROSS-ORIGIN-ACCESS-STORE",function(){var e=j({status:!1,siteName:null,project_type:null,allowed_origin:null,allowed_methods:null,allowed_headers:null,exposed_headers:null,allow_credentials:!1});return{formData:e,reset:function(){e.value.status=!1,e.value.siteName=null,e.value.project_type=null,e.value.allowed_origin=null,e.value.allowed_methods=null,e.value.allowed_headers=null,e.value.exposed_headers=null,e.value.allow_credentials=!1}}}),Ot=function(){return ne(Ct())},Pt=Ot().formData,St=function(){var e=c(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:r({request:Te({siteName:t.siteName,project_type:t.project_type}),loading:"正在获取跨域访问配置...",success:function(e){var n=e.data;Pt.value.siteName=t.siteName,Pt.value.project_type=t.project_type,Pt.value.status=n.status,Pt.value.allowed_origin=n.allowed_origins,Pt.value.allowed_methods=n.allow_methods,Pt.value.allowed_headers=n.allow_headers,Pt.value.exposed_headers=n.expose_headers,Pt.value.allow_credentials=n.allow_credentials}});case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),Tt=function(){var e=c(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:r({request:qe(t),loading:"正在设置跨域访问配置...",message:!0,success:function(e){e.status&&St({siteName:t.siteName,project_type:t.project_type})}});case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),qt=function(){var e=c(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:r({request:ze({siteName:t.siteName,project_type:t.project_type}),loading:"正在删除跨域访问配置...",message:!0,success:function(e){e.status&&St({siteName:t.siteName,project_type:t.project_type})}});case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),zt=function(){var e=c(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:Pt.value.status?Tt(t):qt(t);case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),Nt={class:"w-full"},Ut=V({__name:"index",setup:function(e){var t,n=ie().siteInfo,r=Ot().formData,o=j(!1),u=Ct().reset,i=d({data:function(){return r.value},options:function(e){return re(function(){return[Fe("状态",function(){return E("div",{class:"flex items-center"},[E(ee,{modelValue:e.value.status,"onUpdate:modelValue":function(t){return e.value.status=t},onChange:function(e){var t;e||(null===(t=m.value)||void 0===t||t.clearValidate(["allowed_origin"]))}},null),null!=e&&e.value.status?E("span",{class:"ml-[2rem] text-small text-[#606266]"},[A("当允许行跨域访问")]):null])},"status",{labelWidth:"140px"})].concat(a(null!=e&&e.value.status?[Fe("允许访问的域名",function(){return E("div",{class:"flex items-center w-full"},[E("div",null,[E(ae,{placement:"top-start",width:"auto",trigger:"click","popper-class":"green-tips-popover !p-0 !border-none"},{default:function(){return E("div",{class:"!p-[12px] bg-primary text-white leading-[2.4rem]"},[A("使用*代表所有域名都可以跨域访问"),E("br",null,null),A("多个域名用 , 分隔")])},reference:function(){return E(oe,{type:"textarea",rows:4,class:"!w-[32rem]",placeholder:"使用*代表所有域名都可以跨域访问,多个域名用,分隔",modelValue:e.value.allowed_origin,"onUpdate:modelValue":function(t){return e.value.allowed_origin=t}},null)}})])])},"allowed_origin",{rules:[{required:!0,message:"请输入允许访问的域名",trigger:"blur",validator:function(t,n,r){var a;null!=e&&null!==(a=e.value)&&void 0!==a&&a.status?n?r():r(new Error("请输入允许访问的域名")):r()}}],labelWidth:"140px"}),{type:"slots",key:"custom"}]:[]),[Fe(" ",function(){return E("div",{class:"flex items-center w-full ml-[6rem]"},[E(L,{type:"primary",onClick:function(){return p()}},{default:function(){return[A("保存")]}})])})])})},submit:(t=c(l().m(function e(t,n){return l().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,n();case 1:return zt(t.value),e.a(2,!0);case 2:return e.p=2,e.v,e.a(2,!1)}},e,null,[[0,2]])})),function(e,n){return t.apply(this,arguments)})}),s=i.BtForm,p=i.submit,f=i.param,m=i.ref;return P(c(l().m(function e(){return l().w(function(e){for(;;)switch(e.n){case 0:return u(),o.value=!0,e.n=1,St({siteName:n.value.name,project_type:n.value.project_type});case 1:o.value=!1;case 2:return e.a(2)}},e)}))),function(e,t){var n=ee,r=ae,l=J,u=oe,i=Re,c=le;return Q((T(),q("div",Nt,[E(z(s),null,{custom:U(function(){return[E(i,null,{config:U(function(){return[E(l,{"label-width":"140px",label:"允许跨域携带cookie",prop:"allow_credentials"},{default:U(function(){return[E(n,{modelValue:z(f).allow_credentials,"onUpdate:modelValue":t[0]||(t[0]=function(e){return z(f).allow_credentials=e})},null,8,["modelValue"]),E(r,{placement:"top-start",width:"auto",trigger:"hover","popper-class":"green-tips-popover !p-0 !border-none"},{reference:U(function(){return a(t[4]||(t[4]=[I("span",{class:"ml-[8px] bt-ico-ask"},"?",-1)]))}),default:U(function(){return[t[5]||(t[5]=I("div",{class:"!p-[12px] bg-primary text-white leading-[2.4rem]"},[A(" Access-Control-Allow-Credentials 允许/拒绝浏览器发送凭据(如Cookie)。 "),I("br"),A(" 设为 true 时,请求携带的凭据将被服务器接受,但需同时指定具体源(不能使用 *)。 ")],-1))]}),_:1})]}),_:1}),E(l,{"label-width":"140px",label:"允许跨域的请求方法",prop:"allowed_methods"},{default:U(function(){return[E(r,{placement:"top-start",width:"auto",trigger:"click","popper-class":"green-tips-popover !p-0 !border-none"},{reference:U(function(){return[E(u,{type:"textarea",rows:4,class:"!w-[32rem]",modelValue:z(f).allowed_methods,"onUpdate:modelValue":t[1]||(t[1]=function(e){return z(f).allowed_methods=e}),placeholder:"允许跨域的请求方法,例如: GET, POST"},null,8,["modelValue"])]}),default:U(function(){return[t[6]||(t[6]=I("div",{class:"!p-[12px] bg-primary text-white leading-[2.4rem]"},[A(" Access-Control-Allow-Methods 指定允许的HTTP方法(如 GET, POST, OPTIONS), "),I("br"),A(" 用于预检请求(OPTIONS)时告知客户端可支持的方法列表。 ")],-1))]}),_:1})]}),_:1}),E(l,{"label-width":"140px",label:"允许跨域携带的请求头",prop:"allowed_headers"},{default:U(function(){return[E(r,{placement:"top-start",width:"auto",trigger:"click","popper-class":"green-tips-popover !p-0 !border-none"},{reference:U(function(){return[E(u,{type:"textarea",rows:4,class:"!w-[32rem]",modelValue:z(f).allowed_headers,"onUpdate:modelValue":t[2]||(t[2]=function(e){return z(f).allowed_headers=e}),placeholder:"允许跨域携带的请求头"},null,8,["modelValue"])]}),default:U(function(){return[t[7]||(t[7]=I("div",{class:"!p-[12px] bg-primary text-white leading-[2.4rem]"},[A(" Access-Control-Allow-Headers 在预检请求中定义允许携带的自定义请求头(如 Content-Type), "),I("br"),A(" 告知客户端哪些头可安全用于实际请求。 ")],-1))]}),_:1})]}),_:1}),E(l,{"label-width":"140px",label:"允许浏览器访问的响应头",prop:"exposed_headers"},{default:U(function(){return[E(r,{placement:"top-start",width:"auto",trigger:"click","popper-class":"green-tips-popover !p-0 !border-none"},{reference:U(function(){return[E(u,{type:"textarea",rows:4,class:"!w-[32rem]",modelValue:z(f).exposed_headers,"onUpdate:modelValue":t[3]||(t[3]=function(e){return z(f).exposed_headers=e}),placeholder:"允许跨域浏览器访问的响应头"},null,8,["modelValue"])]}),default:U(function(){return[t[8]||(t[8]=I("div",{class:"!p-[12px] bg-primary text-white leading-[2.4rem]"},[A(" Access-Control-Expose-Headers 暴露给浏览器脚本的响应头列表, "),I("br"),A(" 客户端只能访问在此列表中声明的头(如 Content-Range)。 ")],-1))]}),_:1})]}),_:1})]}),_:1})]}),_:1})])),[[c,z(o)]])}}}),At=V({__name:"index",setup:function(e,n){var u=n.expose,i=ie().siteInfo,s=j(),p=j([]),f=j(!1),d=m({options:[{label:"添加计划任务",type:"button",active:!0,onClick:function(){return w()}}]}).BtOperation,g=function(){var e=c(l().m(function e(t,n,r,a){var o,u,i,s;return l().w(function(e){for(;;)switch(e.n){case 0:return o=a.label,u=a.value,i=new Map([["stark","即将批量执行选中的计划任务"],["start","即将批量开启选中任务"],["stop","即将批量停止选中任务"],["delete","即将批量删除选中任务"]]),s=function(){var e=c(l().m(function e(t,n){var r,a,o,i;return l().w(function(e){for(;;)switch(e.n){case 0:r=new Map([["stark",Ue],["start",Ne],["stop",Ne],["delete",Ae]]),a=t.id,o=r.get(u),i=u,e.n="stark"===i?1:"start"===i||"stop"===i?3:"delete"===i?5:7;break;case 1:if(!o){e.n=2;break}return e.a(2,o({id:a}));case 2:case 4:case 6:return e.a(3,7);case 3:if(!o){e.n=4;break}return e.a(2,o({id:a,status:"start"===u?1:0}));case 5:if(!o){e.n=6;break}return e.a(2,o({id:a}));case 7:return e.a(2)}},e)}));return function(t,n){return e.apply(this,arguments)}}(),e.n=1,t({title:"批量".concat(o),content:"".concat(i.get(u),",是否继续操作?"),column:[{label:"项目名称",prop:"name"},_e()],onConfirm:function(){var e=c(l().m(function e(){return l().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,n(s);case 1:return C(),e.a(2,!1)}},e)}));return function(){return e.apply(this,arguments)}}()});case 1:return e.a(2)}},e)}));return function(t,n,r,a){return e.apply(this,arguments)}}(),b=function(){var e=c(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,o({title:t.status?"停用计划任务":"启用计划任务",content:t.status?"计划任务暂停后将无法继续运行,您真的要停用这个计划任务吗?":"该计划任务已停用,是否要启用这个计划任务?",icon:"question-filled"});case 1:return e.n=2,r({loading:"正在设置计划任务状态,请稍候...",request:Ne({id:t.id}),message:!0,success:C});case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),w=function(e){v({isAsync:!0,title:"".concat(e?"编辑":"添加","计划任务").concat(e?"【"+e.name+"】":""),area:74,component:function(){return h(function(){return t.import("./add-crontab-legacy.js?v=1777008528")},void 0,t.meta.url)},compData:{row:e||!1,sitename:i.value.name,refreshEvent:C},showFooter:!0})},x=function(e){v({isAsync:!0,title:"查看【"+(e.rname||e.name)+"】日志",area:80,compData:{id:e.id},component:function(){return h(function(){return t.import("./log-detail-legacy3.js?v=1777008528")},void 0,t.meta.url)}})},k=function(){var e=c(l().m(function e(t){return l().w(function(e){for(;;)switch(e.n){case 0:r({loading:"正在执行计划任务,请稍后...",request:Ue({id:t.id}),message:!0,success:function(){x(t)}});case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),V=function(){var e=c(l().m(function e(t){var n,a;return l().w(function(e){for(;;)switch(e.n){case 0:return n=t.id,a=t.name,e.n=1,o({title:"删除计划任务",content:"您确定要删除计划任务【".concat(a,"】,是否继续?"),icon:"warning-filled"});case 1:r({loading:"正在删除计划任务,请稍后...",request:Ae({id:n}),message:!0,success:C});case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),C=function(){var e=c(l().m(function e(){return l().w(function(e){for(;;)switch(e.n){case 0:r({loading:f,request:He({sitename:i.value.name}),data:{data:[Array,p]}});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),O=ue([me(),{label:"计划任务",prop:"rname",render:function(e){return e.rname||e.name}},ve({event:function(e){b(e)},data:["停用","正常"]}),{label:"执行周期",prop:"cycle"},{label:"上次执行时间",prop:"addtime"},he([{onClick:k,title:"执行"},{onClick:function(e){w(e)},title:"编辑"},{onClick:function(e){x(e)},title:"日志"},{onClick:V,title:"删除"}])]),S=[{label:"执行任务",value:"stark",event:g},{label:"启动任务",value:"start",event:g},{label:"停止任务",value:"stop",event:g},{label:"删除任务",value:"delete",event:g}];return P(C),u({init:C}),function(e,t){var n=_,r=y,o=Me,l=$("bt-loading");return T(),N(o,null,{"header-left":U(function(){return[E(z(d))]}),"header-right":U(function(){return a(t[0]||(t[0]=[]))}),content:U(function(){return[Q(E(n,{ref_key:"cronTableRef",ref:s,"max-height":560,column:z(O),data:z(p)},null,8,["column","data"]),[[l,"正在加载计划任务列表,请稍后...","title"],[l,z(f)]])]}),"footer-left":U(function(){return[E(r,{"table-ref":z(s),options:z(S)},null,8,["table-ref","options"])]}),_:1})}}}),Ht={class:"flex flex-col site-globa-setting-module"},It={class:"flex items-center"},Et=V({__name:"index",setup:function(e){var t=ie().siteInfo,n=j(!1),a=C({total_flow:!1}),o=function(){var e=c(l().m(function e(){var r,o;return l().w(function(e){for(;;)switch(e.p=e.n){case 0:return n.value=!0,e.p=1,e.n=2,Ie({site_id:t.value.id});case 2:r=e.v,o=r.data,a.total_flow=o.data.status,e.n=4;break;case 3:e.p=3,e.v;case 4:return e.p=4,n.value=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}));return function(){return e.apply(this,arguments)}}(),u=function(){var e=c(l().m(function e(){return l().w(function(e){for(;;)switch(e.n){case 0:r({loading:"正在设置,请稍后...",message:!0,request:Ee({site_id:t.value.id,status:a.total_flow?1:0}),success:function(e){e.status||(a.total_flow=!a.total_flow)}});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return P(function(){o()}),function(e,t){var r=ee,o=J,l=K,i=f,c=$("bt-loading");return Q((T(),q("div",Ht,[E(l,{model:z(a)},{default:U(function(){return[E(o,{label:"日流量统计"},{default:U(function(){return[I("div",It,[E(r,{onChange:u,modelValue:z(a).total_flow,"onUpdate:modelValue":t[0]||(t[0]=function(e){return z(a).total_flow=e})},null,8,["modelValue"]),t[1]||(t[1]=I("span",{class:"text-tertiary ml-[4px]"},"*提示:开启会适量占用服务器内存。",-1))])]}),_:1})]}),_:1},8,["model"]),E(i,{options:[{content:"不影响监控报表插件的配置。"}],class:"ml-[20px] mt-[20px]"})])),[[c,z(n)]])}}}),Gt=g(Et,[["__scopeId","data-v-34d0cc8a"]]),Dt=e("u",te("cache",function(){return{isRefreshCacheList:j(!1)}})),Rt=ie(),Ft=Dt(),Bt=function(){var e=c(l().m(function e(t){var n,r,a;return l().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Ge({site_name:Rt.siteInfo.value.name});case 1:return r=e.v,a=(null==r||null===(n=r.data)||void 0===n?void 0:n.data)||[],e.a(2,{data:a,total:a.length})}},e)}));return function(t){return e.apply(this,arguments)}}(),Mt=function(e){var r=e?n(n({},e),{},{_original:{suffix:e.suffix}}):void 0;v({title:e?"编辑缓存规则":"添加缓存规则",area:50,component:function(){return h(function(){return t.import("./cache-dialog-legacy.js?v=1777008528")},void 0,t.meta.url)},compData:r,btn:["保存","取消"]})},Lt=function(){var e=c(l().m(function e(t){var n;return l().w(function(e){for(;;)switch(e.n){case 0:n=Array.isArray(t.suffix)?t.suffix.map(function(e){return".".concat(e)}).join(", "):t.suffix,o({title:"删除缓存规则",content:"确定要删除缓存后缀【".concat(n,"】的规则吗?"),onConfirm:function(){var e=c(l().m(function e(){return l().w(function(e){for(;;)switch(e.n){case 0:r({loading:"删除中...",message:!0,request:De({site_name:Rt.siteInfo.value.name,suffix:t.suffix}),success:function(){Ft.isRefreshCacheList=!0}});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}()});case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),Jt=V({__name:"index",setup:function(e){var t=ne(Dt()).isRefreshCacheList,n=b({request:function(e){return Bt()},columns:[{label:"缓存后缀",minWidth:200,render:function(e){return Array.isArray(e.suffix)?e.suffix.map(function(e){return"".concat(e)}).join(", "):e.suffix||"--"}},{label:"缓存时间",minWidth:150,render:function(e){var t=e.time_out||"",n=t.match(/^(\d+)([dhms])$/);if(n){var r=n[1],a=n[2];return"".concat(r," ").concat({d:"天",h:"小时",m:"分钟",s:"秒"}[a]||a)}return t||"--"}},he([{onClick:function(e){return Mt(e)},title:"编辑"},{onClick:function(e){return Lt(e)},title:"删除"}])],extension:[w(t)]}),r=n.BtTable,o=n.BtRefresh;return function(e,t){var n=L,l=Me;return T(),q("div",null,[E(l,null,{"header-left":U(function(){return[E(n,{type:"primary",onClick:z(Mt)},{default:U(function(){return a(t[0]||(t[0]=[A("添加",-1)]))}),_:1},8,["onClick"])]}),"header-right":U(function(){return[E(z(o))]}),content:U(function(){return[E(z(r),{"max-height":530})]}),_:1})])}}}),Wt=V({__name:"index",setup:function(e,t){var n,r,a,o=t.expose,l=ie().siteInfo,u=x().plugin,i=null===(n=l.value)||void 0===n?void 0:n.project_type,c=j(null!==(r=l.value)&&void 0!==r&&r.otherName?null===(a=l.value)||void 0===a?void 0:a.otherName:"phpasync"!==i?"composer":"nginx"),s="phpasync"===i,p=j([{label:"Composer",name:"composer",lazy:!0,isHide:s,render:tt},{label:"Tomcat",name:"tomcat",lazy:!0,isHide:s,render:ot},{label:"Gzip压缩",name:"gzip",lazy:!0,isHide:s,render:xt},{label:"缓存",name:"cache",lazy:!0,isHide:"nginx"!==u.value.webserver,render:Jt},{label:"请求头配置",name:"nginx",lazy:!0,render:jt},{label:"跨域配置",name:"cors",isHide:s,lazy:!0,render:Ut},{label:"默认文档",name:"defalut",isHide:!s,lazy:!0,render:Be},{label:"计划任务",name:"crontab",isHide:!s,lazy:!0,render:At},{label:"网站告警",name:"siteAlarm",isHide:!s,lazy:!0,render:Le},{label:"日流量统计",name:"totalFlow",lazy:!0,render:Gt}]),f=k({type:"card",value:c,options:p}).BtTabs,d=function(){p.value=p.value.filter(function(e){return!0!==e.isHide})};return P(d),o({init:d}),function(e,t){return T(),N(z(f))}}}),Kt=g(Wt,[["__scopeId","data-v-df52a1a3"]]),$t=Object.freeze(Object.defineProperty({__proto__:null,default:Kt},Symbol.toStringTag,{value:"Module"}));e("i",$t)}}})}();