import{k as e,ac as a,r as s,an as t,U as u,V as n,Q as o,a2 as i,q as l,W as c,a3 as p,X as r,I as d,F as m}from"./vue.js?v=1753954525509";import{ab as v,e as _,ah as b,c as f,bs as h,w as k,bt as w,bu as y,bv as g}from"./page_layout.js?v=1753954525509";import{_ as x,c3 as I}from"./naive.js?v=1753954525509";const S=e({__name:"index",props:{checked:{type:[String,Number,Boolean]},checkedModifiers:{}},emits:["update:checked"],setup(e,{expose:_}){const b=a(e,"checked"),f=v(),h=s(0),k=s(0),w=s(!1),y=s(),g=()=>{const e=y.value.$el.getClientRects(),{x:a,y:s}=e[0];h.value=a-5,k.value=s-3,w.value=!0,S()},S=t((()=>{w.value=!1}),2500);return _({validate:()=>new Promise(((e,a)=>{b.value?e(!0):(g(),a(!1))})),showTips:g}),(e,a)=>{const s=x,t=I;return u(),n(m,null,[o(s,{ref_key:"checkboxRef",ref:y,checked:b.value,"onUpdate:checked":a[0]||(a[0]=e=>b.value=e)},{default:i((()=>[l(e.$slots,"default")])),_:3},8,["checked"]),o(t,{show:r(w),x:r(h),y:r(k),trigger:"manual",placement:"top-start",style:d({backgroundColor:r(f).errorColor,color:"#fff"}),"arrow-style":{backgroundColor:r(f).errorColor}},{default:i((()=>[c("span",null,p(e.$t("Config.Safe.index_169")),1)])),_:1},8,["show","x","y","style","arrow-style"])],64)}}}),C={class:"confirm-tips"};const D=_({},[["render",function(e,a){return u(),n("ul",C,[l(e.$slots,"default",{},void 0,!0)])}],["__scopeId","data-v-afc54be1"]]),L=s({listenIpv6:!1,offlineMode:!1,debugMode:!1,apiInterface:!1,cdn_status:!1,lang:null,langList:[],webname:"",session_timeout:"",session_timeout_source:0,sites_path:"",backup_path:"",serverIp:"",systemDate:"",username:"",account:"",backup_info:{auto_backup:0,backup_number:0,total_size:0}}),M=s({panelSSL:!1,basicAuth:!1,dynamicPwd:!1,pwdComplexity:!1,domain:"",limitIp:"",port:"7800",adminPath:"/",statusCode:404,pwdSetDay:0,pwdExpireDay:0,pwdExpireTime:0,uaAstrict:!1}),P=s([]);async function A(){const{message:e}=await b();f(e)&&(function(e){L.value.listenIpv6="checked"===e.ipv6,L.value.offlineMode="checked"===e.is_local,L.value.debugMode="checked"===e.debug,L.value.apiInterface="checked"===e.api,L.value.lang=e.language,L.value.cdn_status=e.cdn_status,L.value.langList=e.language_list.map((e=>({label:e.title,value:e.name}))),L.value.webname=e.webname||"",L.value.session_timeout=e.session_timeout||"",L.value.session_timeout_source=e.session_timeout_source||86400,L.value.sites_path=e.sites_path||"",L.value.backup_path=e.backup_path||"",L.value.systemDate=e.systemdate||"",L.value.username=e.username||"";const{panel:a,user_info:s}=e;f(a)&&(L.value.serverIp=a.address||"",L.value.backup_info=a.backup_info);f(s)&&(L.value.account=s.data.username)}(e),function(e){var a;const{panel:s,SSL:t}=e;M.value.panelSSL=t||location.protocol.indexOf("https:")>-1,M.value.basicAuth=(null==(a=e.basic_auth)?void 0:a.open)||!1,M.value.statusCode=e.status_code||404,f(s)&&(M.value.domain=s.domain||"",M.value.limitIp=s.limitip||"",M.value.port=s.listen_port||"7800",M.value.adminPath=s.admin_path||"/")}(e))}async function E(){const{message:e}=await h();P.value=k(e)?e:[]}async function T(){const{message:e}=await w();f(e)&&(M.value.dynamicPwd=e.result)}async function $(){const{message:e}=await y();f(e)&&(M.value.pwdSetDay=e.expire,M.value.pwdExpireDay=e.expire_day,M.value.pwdExpireTime=e.expire_time,M.value.pwdComplexity=e.password_safe)}async function j(){const{message:e}=await g();f(e)&&(M.value.uaAstrict="0"!==e.status)}function z(){return{webname:L.value.webname||"",session_timeout:L.value.session_timeout_source||86400,domain:M.value.domain,limitip:M.value.limitIp,sites_path:L.value.sites_path,backup_path:L.value.backup_path,address:L.value.serverIp,systemdate:L.value.systemDate,port:M.value.port,backup_number:L.value.backup_info.backup_number,auto_backup:L.value.backup_info.auto_backup}}function R(){L.value={listenIpv6:!1,offlineMode:!1,debugMode:!1,apiInterface:!1,cdn_status:!1,lang:null,langList:[],webname:"",session_timeout:"",session_timeout_source:0,sites_path:"",backup_path:"",serverIp:"",systemDate:"",username:"",account:"",backup_info:{auto_backup:0,backup_number:0,total_size:0}},M.value={panelSSL:!1,basicAuth:!1,dynamicPwd:!1,pwdComplexity:!1,domain:"",limitIp:"",port:"7800",adminPath:"/",statusCode:404,pwdSetDay:0,pwdExpireDay:0,pwdExpireTime:0,uaAstrict:!1},P.value=[]}function U(){L.value=null,M.value=null,P.value=[]}export{D as _,E as a,T as b,$ as c,j as d,U as e,S as f,A as g,z as h,R as i,P as m,L as p,M as s};
