System.register(["./index.vue_vue_type_script_setup_true_lang-legacy.js?v=1763625242172","./index-legacy99.js?v=1763625242172","./vue-legacy.js?v=1763625242172","./page_layout-legacy.js?v=1763625242172","./naive-legacy.js?v=1763625242172","./__commonjsHelpers__-legacy.js?v=1763625242172","./common-legacy.js?v=1763625242172","./public-legacy.js?v=1763625242172"],(function(e,a){"use strict";var r,l,t,n,o,d,s,c,u,p,i,v,_,f,x,g,S,m,y,h,b,w,k;return{setters:[e=>{r=e._},e=>{l=e._},e=>{t=e.k,n=e.P,o=e.r,d=e.e,s=e.R,c=e.S,u=e.X,p=e.a3,i=e.j,v=e.a4,_=e.U,f=e.H,x=e.V,g=e.au,S=e.N},e=>{m=e.m,y=e.e2,h=e.p},e=>{b=e.dk,w=e.dP,k=e.d9},null,null,null],execute:function(){var a=document.createElement("style");a.textContent=".n-alert[data-v-a1f4ee4d]{margin-bottom:16px;--n-content-text-color: #20a53a;--n-color: #e9f8ec}.drag-box[data-v-a1f4ee4d]{width:100%;padding:5px;border:2px dashed #ccc;border-radius:6px}.hover[data-v-a1f4ee4d]{border-color:#20a53a}\n",document.head.appendChild(a);const L={class:"p-20px"};e("default",h(t({__name:"index",props:{onRefresh:{}},setup(e,{expose:a}){const{t:t}=n(),h=e,{onRefresh:j}=h,D=o(!1),R=o(!1),$=(e,a)=>{a.preventDefault(),D.value="key"!==e&&D.value,R.value="cert"!==e&&R.value;const r=a.dataTransfer?.files;if(!r||0===r.length)return m.error(t("SSL.index_38"));const l=r[0],n=l.name.split(".").pop()?.toLowerCase();if(![".pem",".crt",".cer",".key",".der",".pfx",".p12",".p7b",".p7c",".csr"].includes(`.${n}`))return m.error(t("SSL.index_38"));if(window.FileReader){const a=new FileReader;a.onload=a=>{a.target?.result&&(U[e]=a.target.result)},a.onerror=()=>{m.error(t("SSL.index_39"))},a.readAsText(l)}else m.error(t("SSL.index_40"))},C=o(null),U=d({key:"",cert:""}),F={key:{required:!0,trigger:"change",message:t("SSL.index_35")},cert:{required:!0,trigger:"change",message:t("SSL.index_37")}};return a({onConfirm:async()=>{await(C.value?.validate()),await y(S(U)),m.success(t("Component.UploadFile.index_9")),j?.()}}),(e,a)=>{const t=b,n=l,o=w,d=k,S=r;return s(),c("div",L,[u(t,{type:"success","show-icon":!1},{default:p((()=>[i(v(e.$t("SSL.index_33"))+" ",1),a[8]||(a[8]=_("div",{class:"pt-5px"},"Supported formats: pem, crt, cer, key, der, pfx, p12, p7b, p7c, csr. ",-1))])),_:1,__:[8]}),u(S,{ref_key:"formRef",ref:C,model:x(U),rules:F,"label-placement":"top"},{default:p((()=>[u(d,{class:"w-full flex-nowrap!"},{default:p((()=>[u(o,{label:e.$t("SSL.index_34"),path:"key",class:"w-full"},{default:p((()=>[_("div",{class:f(["drag-box",{hover:x(D)}]),onDrop:a[1]||(a[1]=e=>$("key",e)),onDragover:a[2]||(a[2]=g((e=>D.value=!0),["prevent"])),onDragleave:a[3]||(a[3]=g((e=>D.value=!1),["prevent"]))},[u(n,{value:x(U).key,"onUpdate:value":a[0]||(a[0]=e=>x(U).key=e),rows:16,placeholder:e.$t("SSL.index_35")},null,8,["value","placeholder"])],34)])),_:1},8,["label"]),u(o,{label:e.$t("SSL.index_36"),path:"cert",class:"w-full"},{default:p((()=>[_("div",{class:f(["drag-box",{hover:x(R)}]),onDrop:a[5]||(a[5]=e=>$("cert",e)),onDragover:a[6]||(a[6]=g((e=>R.value=!0),["prevent"])),onDragleave:a[7]||(a[7]=g((e=>R.value=!1),["prevent"]))},[u(n,{value:x(U).cert,"onUpdate:value":a[4]||(a[4]=e=>x(U).cert=e),rows:16,placeholder:e.$t("SSL.index_37")},null,8,["value","placeholder"])],34)])),_:1},8,["label"])])),_:1})])),_:1},8,["model"])])}}}),[["__scopeId","data-v-a1f4ee4d"]]))}}}));
