System.register(["./page_layout-legacy.js?v=1763625242172","./index-legacy.js?v=1763625242172","./public-legacy.js?v=1763625242172","./vue-legacy.js?v=1763625242172","./naive-legacy.js?v=1763625242172"],(function(s,e){"use strict";var t,a,o,n,i,l,r,c,p,d,u,m,g,_,w,h,f,v,y,x,k,S,b,T,j;return{setters:[s=>{t=s.bf,a=s.a,o=s.c,n=s.m,i=s._,l=s.T,r=s.p},s=>{c=s._},s=>{p=s.e,d=s.y,u=s.z},s=>{m=s.k,g=s.P,_=s.r,w=s.o,h=s.b,f=s.R,v=s.S,y=s.X,x=s.a3,k=s.U,S=s.V,b=s.a4,T=s._},s=>{j=s.bH}],execute:function(){var C=document.createElement("style");C.textContent=".panel-ssl-progress[data-v-82c005c3]{min-width:340px;padding:24px 24px 22px}.panel-ssl-progress .progress-item[data-v-82c005c3]{display:flex;gap:16px;cursor:pointer}.panel-ssl-progress .progress-item+.progress-item[data-v-82c005c3]{margin-top:16px}.panel-ssl-progress .progress-item .progress-label[data-v-82c005c3]{min-width:120px}\n",document.head.appendChild(C),s("g",(()=>t.post("/ssl_domain?action=get_panel_domain"))),s("s",(s=>t.post("/ssl_domain?action=set_panel_domain_ssl",{domain:JSON.stringify(s.domain)},{requestOptions:{loading:"Installing certificate, please wait...",successMessage:!1}})));const J={class:"panel-ssl-progress"},D={class:"progress-label"},F={class:"w-120px"},L=m({__name:"ssl-lets-progress",props:{task_id:{type:Number,default:0},isJump:{type:Boolean,default:!0},onFinish:{type:Function,default:()=>{}}},emits:["close"],setup(s,{emit:r}){const m=T((()=>a((()=>e.import("./ssl-log-legacy.js?v=1763625242172")),void 0))),{t:C}=g(),L=r,z=_({});let E=null;const I=_(!1),N=p(C("SSL.Domain.index_5")),O=async(e=!1)=>{try{e&&(I.value=!0);const{message:i}=await(a={task_id:s.task_id},t.post("/ssl_domain?action=ssl_tasks_status",a));if(o(i)&&(z.value=i,-1===i.task_code)){L("close");const s=i.task_result.match(/Error:\s*(\[[\s\S]+\])$/);if(s&&s[1]){const e=s[1];try{const s=d.parse(e);u(s)}catch{n.error(C("SSL.index_31"))}}else n.error(C("SSL.index_31"));return}100===z.value.task_status?(E&&clearTimeout(E),L("close"),s.onFinish?.(),n.success(C("Config.Safe.Ssl.index_11")),s.isJump&&setTimeout((()=>{window.location.href=window.location.href.split("?")[0]+"?_t="+Date.now()}),1e3)):U()}catch{s.isJump&&setTimeout((()=>{window.location.href=window.location.href.split("?")[0]+"?_t="+Date.now()}),1e3)}finally{e&&(I.value=!1)}var a},U=()=>{E&&clearTimeout(E),E=window.setTimeout((()=>{O()}),3e3)};return w((()=>{O(!0)})),h((()=>{E&&(clearTimeout(E),E=null)})),(s,e)=>{const t=j,a=i,o=l,n=c;return f(),v("div",J,[y(o,{show:S(I)},{default:x((()=>[k("div",{class:"progress-item",onClick:e[0]||(e[0]=s=>{return e=S(z),N.data.path=e.task_log,void(N.show=!0);var e})},[k("span",D,b(S(z).task_name),1),k("div",F,[y(t,{percentage:S(z).task_status,type:"line",status:"success",processing:100!==S(z).task_status,"indicator-placement":"inside"},null,8,["percentage","processing"])]),y(a,{name:"base-left-logs",size:"18"})])])),_:1},8,["show"]),y(n,{show:S(N).show,"onUpdate:show":e[1]||(e[1]=s=>S(N).show=s),title:S(N).title,data:S(N).data,width:700,height:450,footer:!1,component:S(m)},null,8,["show","title","data","component"])])}}});s("a",r(L,[["__scopeId","data-v-82c005c3"]]))}}}));
