System.register(["./index-legacy105.js?v=1764233927359","./index-legacy99.js?v=1764233927359","./page_layout-legacy.js?v=1764233927359","./vue-legacy.js?v=1764233927359","./naive-legacy.js?v=1764233927359"],function(e,a){"use strict";var l,t,n,i,s,o,r,c,f,u,d,p,v,x,m,g,_,y,w,b,h,C,S,$,k,j,P,U,V,E,K,N;return{setters:[e=>{l=e._,t=e.f,n=e.s},e=>{i=e._},e=>{s=e._,o=e.m,r=e.S,c=e.aW,f=e.bM,u=e.aV,d=e.bC,p=e.bN,v=e.d,x=e.aX,m=e.p},e=>{g=e.k,_=e.P,y=e.r,w=e.a5,b=e.R,h=e.V,C=e.S,S=e.W,$=e.l,k=e.a4,j=e.a3,P=e.ak,U=e.U,V=e.v,E=e.j},e=>{K=e.dV,N=e.au}],execute:function(){var a=document.createElement("style");a.textContent=".form-label[data-v-02bc9a9f]{display:flex;align-items:center;justify-content:flex-end;min-width:100px;height:32px;padding-right:20px;text-align:right}\n/*$vite$:1*/",document.head.appendChild(a);const R={class:"px-40px py-24px"},W={class:"flex-center mb-20px"},z={class:"min-w-32px"},I={class:"ml-4px text-21px"},L={class:"text-error"},M={class:"bt-link",href:"https://www.aapanel.com/forum/d/167-common-problems-after-opening-the-panel-certificate",target:"_blank"},T={class:"flex"},X={class:"form-label"},q={class:"w-280px"},A={class:"flex mt-16px"},B={class:"form-label"},D={class:"w-280px"},F={class:"flex mt-16px"},G={class:"form-label"},H={class:"w-280px"},J={class:"flex mt-16px"},O={class:"form-label"},Q={class:"w-280px"},Y={class:"flex justify-between mt-24px"},Z={class:"bt-link",href:"https://www.aapanel.com/forum/d/167-common-problems-after-opening-the-panel-certificate",target:"_blank"};e("P",m(g({__name:"open",setup(e,{expose:a}){const{t:m}=_(),g=y(),ee=y(1),ae=y(""),le=y(""),te=y(""),ne=[{label:m("Config.Safe.index_30"),value:1},{label:"Let's Encrypt",value:2},{label:m("Config.Safe.index_31"),value:3}],ie=async()=>{const{message:e}=await p();v(e)&&(ee.value=e.cert_type?Number(e.cert_type):1,ae.value=e.email||"")},se=async()=>{const{message:e}=await x();v(e)&&(le.value=e.privateKey||"",te.value=e.certPem||"")};return(async()=>{const e=o.loading(m("Config.Safe.index_32"));try{await Promise.all([ie(),se()])}finally{e.close()}})(),a({onConfirm:async()=>{if(await g.value.validate(),2===ee.value&&""===ae.value.trim())return o.error(m("Config.Safe.index_33")),!1;if(2===ee.value&&!r(ae.value))return o.error(m("Config.Safe.index_34")),!1;if(3===ee.value&&(""===le.value.trim()||""===te.value.trim()))return o.error(m("Config.Safe.index_35")),!1;const e=o.loading(m("Config.Safe.index_36"));try{3===ee.value&&await c({privateKey:le.value,certPem:te.value}),await f((()=>{const e=2===ee.value?{email:ae.value}:{};return{cert_type:ee.value,...e}})(),!1),await u(),setTimeout(()=>{if(d){const e="http:"===location.protocol?"https":"http";window.location.href=`${e}://${window.location.host}${n.value.adminPath}`}},1500)}finally{e.close()}return!1}}),(e,a)=>{const n=s,o=w("i18n-t"),r=l,c=K,f=N,u=i,d=t;return h(),b("div",R,[C("div",W,[C("div",z,[S(n,{name:"scan-success",size:"32"})]),C("span",I,k(e.$t("Config.Safe.index_18")),1)]),S(r,{class:"mb-20px"},{default:j(()=>[C("li",L,k(e.$t("Config.Safe.index_19")),1),C("li",null,k(e.$t("Config.Safe.index_20")),1),S(o,{tag:"li",scope:"global",keypath:"Config.Safe.index_21"},{link_:j(()=>[C("a",M,k(e.$t("Config.Safe.index_22")),1)]),_:1})]),_:1}),C("div",T,[C("span",X,k(e.$t("Config.Safe.index_24")),1),C("div",q,[S(c,{value:U(ee),"onUpdate:value":a[0]||(a[0]=e=>P(ee)?ee.value=e:null),options:ne},null,8,["value"])])]),$(C("div",A,[C("span",B,k(e.$t("Config.Safe.index_25")),1),C("div",D,[S(f,{value:U(ae),"onUpdate:value":a[1]||(a[1]=e=>P(ae)?ae.value=e:null),placeholder:e.$t("Config.Safe.index_26")},null,8,["value","placeholder"])])],512),[[V,2===U(ee)]]),$(C("div",F,[C("span",G,k(e.$t("Config.Safe.index_27")),1),C("div",H,[S(u,{value:U(le),"onUpdate:value":a[2]||(a[2]=e=>P(le)?le.value=e:null),rows:4,placeholder:""},null,8,["value"])])],512),[[V,3===U(ee)]]),$(C("div",J,[C("span",O,k(e.$t("Config.Safe.index_28")),1),C("div",Q,[S(u,{value:U(te),"onUpdate:value":a[3]||(a[3]=e=>P(te)?te.value=e:null),rows:4,placeholder:""},null,8,["value"])])],512),[[V,3===U(ee)]]),C("div",Y,[S(d,{ref_key:"riskRef",ref:g},{default:j(()=>[E(k(e.$t("Config.Safe.index_29")),1)]),_:1},512),C("a",Z,k(e.$t("Config.Safe.index_167")),1)])])}}}),[["__scopeId","data-v-02bc9a9f"]]))}}});
