System.register(["./index.vue_vue_type_script_setup_true_lang-legacy.js?v=1764233927359","./terminal-legacy2.js?v=1764233927359","./page_layout-legacy.js?v=1764233927359","./public-legacy.js?v=1764233927359","./vue-legacy.js?v=1764233927359","./naive-legacy.js?v=1764233927359","./xterm-legacy.js?v=1764233927359","./xterm-addon-canvas-legacy.js?v=1764233927359","./common-legacy.js?v=1764233927359","./__commonjsHelpers__-legacy.js?v=1764233927359"],function(e,a){"use strict";var l,t,r,s,u,o,n,p,d,c,i,y,_,m,v,f,x,k,w,h,g,b,$,T,j;return{setters:[e=>{l=e._},e=>{t=e.f,r=e.h},e=>{s=e.dF,u=e.d},null,e=>{o=e.k,n=e.P,p=e.r,d=e.e,c=e.w,i=e.R,y=e.V,_=e.a2,m=e.an,v=e.W,f=e.U,x=e.a3,k=e.j},e=>{w=e.dk,h=e.da,g=e.dR,b=e.au,$=e.df,T=e.dT,j=e.dY},null,null,null,null],execute:function(){const a={class:"p-20px"},U={key:1};e("default",o({__name:"form",props:{data:{}},setup(e,{expose:o}){const C=s(),{t:P}=n(),R=e,{isEdit:S,row:q,tips:I,localhost:D,onRefresh:E}=R.data,F=p(null),H=d({ip:"",port:22,account:"root",type:1,password:"",key:"",keyPassword:"",remark:""});c(()=>H.ip,e=>{S||(H.remark=e)});const V={ip:{required:!0,message:P("Security.Conf.Index_28"),trigger:["blur","input"]},port:{required:!0,type:"number",message:P("Security.Conf.Index_28"),trigger:["blur","input"]},account:{required:!0,message:P("Security.Conf.Index_28"),trigger:["blur","input"]},password:{required:!0,message:P("Security.Conf.Index_28"),trigger:["blur","input"]},key:{required:!0,message:P("Security.Conf.Index_28"),trigger:["blur","input"]}};return(async()=>{if(D)return H.ip="127.0.0.1",H.port=22,H.account="root",H.type=1,H.password="",H.key="",H.keyPassword="",void(H.remark="127.0.0.1");if(S&&q){const{message:e}=await r({host:q.host});u(e)&&(H.ip=e.host,H.port=e.port,H.account=e.username,H.type=e.password?1:2,H.password=e.password,H.key=e.pkey,H.keyPassword=e.pkey_passwd,H.remark=e.ps)}})(),o({onConfirm:async({hide:e})=>{await(F.value?.validate()),await t({host:H.ip,port:H.port,username:H.account,password:1===H.type?H.password:"",pkey:2===H.type?H.key:"",pkey_passwd:2===H.type?H.keyPassword:"",ps:H.remark}),C.setRefresh(!0),e(),E?.()}}),(e,t)=>{const r=w,s=b,u=g,o=$,n=h,p=j,d=T,c=l;return y(),i("div",a,[f(I)?(y(),_(r,{key:0,class:"mb-16px",type:"warning"},{default:x(()=>t[8]||(t[8]=[k(" Unable to authenticate automatically, please fill in the login information of the local server! ",-1)])),_:1,__:[8]})):m("",!0),v(c,{ref_key:"formRef",ref:F,model:f(H),rules:V},{default:x(()=>[v(n,null,{default:x(()=>[v(u,{label:e.$t("Term.index_8"),path:"ip"},{default:x(()=>[v(s,{class:"w-190px!",value:f(H).ip,"onUpdate:value":t[0]||(t[0]=e=>f(H).ip=e),placeholder:e.$t("Term.index_9")},null,8,["value","placeholder"])]),_:1},8,["label"]),v(u,{path:"port"},{default:x(()=>[v(o,{"show-button":!1,class:"w-80px!",value:f(H).port,"onUpdate:value":t[1]||(t[1]=e=>f(H).port=e),placeholder:e.$t("Docker.Container.create.index_7")},null,8,["value","placeholder"])]),_:1})]),_:1}),v(u,{label:e.$t("Term.index_10"),path:"account"},{default:x(()=>[v(s,{class:"w-280px!",value:f(H).account,"onUpdate:value":t[2]||(t[2]=e=>f(H).account=e),placeholder:e.$t("Term.index_11")},null,8,["value","placeholder"])]),_:1},8,["label"]),v(u,{label:e.$t("Term.index_12")},{default:x(()=>[v(d,{value:f(H).type,"onUpdate:value":t[3]||(t[3]=e=>f(H).type=e)},{default:x(()=>[v(p,{label:e.$t("Database.index_14"),value:1},null,8,["label"]),v(p,{label:e.$t("Term.index_13"),value:2},null,8,["label"])]),_:1},8,["value"])]),_:1},8,["label"]),1===f(H).type?(y(),_(u,{key:0,label:e.$t("Database.index_14"),path:"password"},{default:x(()=>[v(s,{class:"w-280px!",value:f(H).password,"onUpdate:value":t[4]||(t[4]=e=>f(H).password=e),placeholder:e.$t("Term.index_14")},null,8,["value","placeholder"])]),_:1},8,["label"])):(y(),i("div",U,[v(u,{label:e.$t("Term.index_13"),path:"key"},{default:x(()=>[v(s,{class:"w-280px!",type:"textarea",value:f(H).key,"onUpdate:value":t[5]||(t[5]=e=>f(H).key=e),placeholder:e.$t("Term.index_15")},null,8,["value","placeholder"])]),_:1},8,["label"]),v(u,{label:e.$t("Term.index_16")},{default:x(()=>[v(s,{class:"w-280px!",value:f(H).keyPassword,"onUpdate:value":t[6]||(t[6]=e=>f(H).keyPassword=e),placeholder:e.$t("Term.index_17")},null,8,["value","placeholder"])]),_:1},8,["label"])])),v(u,{label:"Remarks"},{default:x(()=>[v(s,{class:"w-280px!",value:f(H).remark,"onUpdate:value":t[7]||(t[7]=e=>f(H).remark=e),placeholder:e.$t("Term.index_18")},null,8,["value","placeholder"])]),_:1})]),_:1},8,["model"])])}}}))}}});
