2 lines
19 KiB
JavaScript
2 lines
19 KiB
JavaScript
import{C as et,u as tt,a as ot,b as at,r as ce,e as u,o as lt,I as x,Q as ue,v as N,d as _,w as g,j as e,a2 as st,M as nt,g as rt,f as y,h as n,i as c,m as s,p as de,t as f,l as p,k as d,D as $,_ as pe,H as W,F as J,E as X,q as Fe,n as q,y as Ie,G as $e,a3 as Ue,B as Te,$ as it,a1 as ct,O as ut}from"./app-dvJP63FL.js";import{F as fe}from"./Form-ZbAUhXmz.js";import{_ as dt}from"./QrContentDisplay-DiIjf7a_.js";import{i as G,R as pt}from"./iconService-rm6LRV4U.js";import{u as ft}from"./bus-ChE1sp8V.js";import{U as vt}from"./index-BJsmINgd.js";import{c as Oe}from"./createLucideIcon-DsaEAGzP.js";import{Q as mt}from"./qr-code-eSL1bq0j.js";import"./external-link-CqpXNovN.js";const ht=[["path",{d:"M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21",key:"9csbqa"}],["path",{d:"m14 19.5 3-3 3 3",key:"9vmjn0"}],["path",{d:"M17 22v-5.5",key:"1aa6fl"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]],Le=Oe("image-up",ht);const gt=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],_t=Oe("wand-sparkles",gt),yt={key:1,class:"modal modal-otp is-active"},bt={class:"modal-card is-flex-grow-1"},kt={class:"modal-card-body modal-slot py-0 is-align-content-center has-text-centered"},wt={key:1,for:"filUploadIcon",class:"add-icon-button pt-2"},Vt={key:0,role:"alert",class:"m-3"},xt={class:"field is-grouped is-grouped-centered mt-6"},Pt={class:"control"},Ct={key:0,class:"field is-grouped"},Mt={class:"control"},St=["title"],Ft={class:"file-cta"},It={class:"file-label"},$t={key:2,for:"icon-collection",class:"label"},Ut={key:3,class:"field has-addons"},Tt={class:"control"},Lt={class:"select"},Ot=["disabled"],At=["value"],Et={key:0,class:"control"},Dt={class:"select"},Nt=["disabled"],qt=["value"],Gt=["title"],Bt={class:"field is-grouped"},Ht={class:"control"},Qt={class:"icon is-small"},Kt={class:"control is-flex"},Rt={class:"file-cta"},jt={class:"icon"},zt={class:"file-label"},Wt={class:"is-hidden-mobile ml-1"},Jt=["src","alt"],Xt=["aria-label"],Yt={class:"field"},Zt={key:1,id:"lgdTryMyLuck",class:"help"},eo={key:6},to={key:0},oo={class:"title is-4 mt-5 mb-2"},ao={class:"help mb-4"},lo={class:"control"},so={key:0,class:"control"},ho={__name:"CreateUpdate",props:{twofaccountId:[Number,String]},setup(Ae){const B=et(),{t:v}=tt(),H=nt("2fauth"),P=rt(),Ee=st(),r=ot(),U=at(),Y=ft(),m=it(),o=ce(new fe({service:"",account:"",otp_type:"",icon:"",group_id:Be(),secret:"",algorithm:"",digits:null,counter:null,period:null,image:""})),Q=ce(new fe({qrcode:null})),C=ce(new fe({icon:null})),De=[{text:"selfh.st",value:"selfh",hasVariant:!0},{text:"dashboardicons.com",value:"dashboardicons",hasVariant:!0},{text:"2fa.directory",value:"tfa",hasVariant:!1}],K={selfh:[{text:"label.regular",value:"regular"},{text:"label.light",value:"light"},{text:"label.dark",value:"dark"}],dashboardicons:[{text:"label.regular",value:"regular"},{text:"label.light",value:"light"},{text:"label.dark",value:"dark"}],tfa:[{text:"label.regular",value:"regular"}]},T=u({otp_type:"",account:"",service:"",icon:"",secret:"",digits:null,algorithm:"",period:null,counter:null,image:""}),Ne=[{text:"TOTP",value:"totp"},{text:"HOTP",value:"hotp"},{text:"STEAM",value:"steamtotp"}],qe=[{text:"6",value:6},{text:"7",value:7},{text:"8",value:8},{text:"9",value:9},{text:"10",value:10}],Ge=[{text:"sha1",value:"sha1"},{text:"sha256",value:"sha256"},{text:"sha512",value:"sha512"},{text:"md5",value:"md5"}],M=u(),i=u(""),L=u(!1),S=u(!1),O=u(!1),A=u(!1),k=u(!1),F=u(!1),R=u(!1),w=u(r.preferences.iconCollection),E=u(r.preferences.iconVariant),I=u(r.preferences.iconPack??"/"),V=u([{text:"label.no_available_icon_packs",value:"/"}]),Z=u(!1),ee=u(!1),te=u(null),oe=u(null),j=u(null),ae=u(null),ve=u(null),me=u(null),he=u(null),le=Ae,h=Te(()=>le.twofaccountId!=null),ge=Te(()=>ut().items.map(t=>({text:t.id>0?t.name:"- "+v("label.no_group")+" -",value:t.id})));lt(()=>{Ee.name=="editAccount"?(F.value=!0,x.get(le.twofaccountId).then(t=>{o.fill(t.data),o.group_id==null&&(o.group_id=0),o.setOriginal(),i.value=o.icon,A.value=!0}).finally(()=>{F.value=!1})):Y.decodedUri?(M.value=Y.decodedUri,Y.decodedUri=null,F.value=!0,r.preferences.AutoSaveQrcodedAccount?x.storeFromUri(M.value).then(t=>{Ke(t.data)}).catch(t=>{t.response.data.errors.uri&&(S.value=!0,A.value=!0)}).finally(()=>{F.value=!1}):x.preview(M.value).then(t=>{o.fill(t.data),i.value=t.data.icon?t.data.icon:"",L.value=!0,ue().then(()=>{j.value.show()})}).catch(t=>{t.response.data.errors.uri&&(S.value=!0,A.value=!0)}).finally(()=>{F.value=!1})):A.value=!0,Ce()}),N(w,t=>{E.value=Object.prototype.hasOwnProperty.call(K,t)?K[t][0].value:""}),N(i,t=>{L.value&&ue().then(()=>{j.value.icon=t})}),N(k,t=>{t==!1&&(ae.value?.clearOTP(),j.value?.clearOTP())}),N(O,t=>{t==!1&&(oe.value?.clearOTP(),P.push({name:"accounts"}))}),N(()=>o.otp_type,(t,a)=>{t==="steamtotp"?(o.service="Steam",xe()):a==="steamtotp"&&(o.service="",b())});function Be(){return r.preferences.defaultGroup==-1?r.preferences.activeGroup<=0?0:r.preferences.activeGroup:r.preferences.defaultGroup}function _e(){h.value?He():ye()}async function ye(){o.icon=i.value;const{data:t}=await o.post("/api/v1/twofaccounts");o.errors.any()===!1&&(U.items.push(t),U.sortDefault(),m.success({text:v("notification.account_created")}),P.push({name:"accounts"}))}async function He(){if(i.value!==o.icon){let a="";a=o.icon,o.icon=i.value,i.value=a,b()}const{data:t}=await o.put("/api/v1/twofaccounts/"+le.twofaccountId);if(o.errors.any()===!1){const a=U.items.findIndex(D=>D.id===t.id);U.items.splice(a,1,t),U.sortDefault(),m.success({text:v("notification.account_updated")}),P.push({name:"accounts"})}}function Qe(){o.clear(),k.value=!0,ae.value.show()}function Ke(t){T.value.otp_type=t.otp_type,T.value.service=t.service,T.value.account=t.account,T.value.icon=t.icon,ue().then(()=>{O.value=!0,oe.value.show(t.id)})}function be(){o.hasChanged()||i.value!=o.icon?confirm(v("confirmation.cancel_creation"))===!0&&((!h.value||i.value!=o.icon)&&b(),P.push({name:"accounts"})):P.push({name:"accounts"})}function ke(){b(),C.icon=te.value.files[0],C.upload("/api/v1/icons",{returnError:!0}).then(t=>{i.value=t.data.filename,L.value&&(o.icon=i.value)}).catch(t=>{t.response.status!==422&&m.alert({text:t.response.data.message})})}function b(){h.value?i.value&&(i.value!==o.icon&&G.deleteIcon(i.value),i.value=""):i.value&&(G.deleteIcon(i.value),i.value="",L.value&&(o.icon=""))}function we(t){o.counter=t.nextHotpCounter}function Ve(t){o.errors.set(o.extractErrors(t))}function Re(){Q.qrcode=me.value.files[0],Q.upload("/api/v1/qrcode/decode",{returnError:!0}).then(t=>{M.value=t.data.data,x.preview(M.value,{returnError:!0}).then(a=>{o.fill(a.data),o.group_id=0,i.value=a.data.icon?a.data.icon:null}).catch(a=>{a.response.status===422?a.response.data.errors.uri?S.value=!0:m.alert({text:v(a.response.data.message)}):B.show(a)})}).catch(t=>{t.response.status!==422&&m.alert({text:t.response.data.message})})}function xe(){r.preferences.getOfficialIcons&&(R.value=!0,r.preferences.iconSource=="logolib"?G.getLogo(o.service,w.value,E.value,{returnError:!0}).then(t=>{t.status===201?(b(),i.value=t.data.filename):m.warn({text:v("error.no_icon_for_this_variant")})}).catch(()=>{m.warn({text:v("error.no_icon_for_this_variant")})}).finally(()=>{R.value=!1}):G.getLogoFromPack(o.service,I.value,{returnError:!0}).then(t=>{t.status===201?(b(),i.value=t.data.filename):m.warn({text:v("error.no_match_in_the_icon_pack")})}).catch(t=>{t.response.status===422?(o.clear(),o.errors.set(o.extractErrors(t.response))):m.warn({text:v("error.no_match_in_the_icon_pack")})}).finally(()=>{R.value=!1}))}function Pe(t){r.preferences.activeGroup!=t&&(r.preferences.activeGroup=t),r.preferences.rememberActiveGroup&&ct.updatePreference("activeGroup",r.preferences.activeGroup)}function Ce(){ee.value=!0,G.getIconPacks().then(t=>{V.value=[],t.data.forEach(a=>{V.value.push({text:a.name,value:a.name})}),V.value.length==0?(Z.value=!1,I.value="/",V.value.push({text:"label.no_available_icon_packs",value:"/"})):(Z.value=!0,I.value=r.preferences.iconPack==null||!V.value.some(a=>a.value===r.preferences.iconPack)?V.value[0].value:r.preferences.iconPack)}).finally(()=>{ee.value=!1})}return(t,a)=>{const D=y("Modal"),se=y("FormFieldError"),ne=y("VueButton"),Me=y("NavigationButton"),re=y("FormField"),Se=y("FormSelect"),ie=y("FormToggle"),je=y("FormWrapper"),ze=y("VueFooter"),We=y("StackLayout"),Je=y("Spinner");return n(),_(e(vt),null,{default:g(({mode:z})=>[c(We,null,{content:g(()=>[e(r).preferences.AutoSaveQrcodedAccount?(n(),_(D,{key:0,modelValue:e(O),"onUpdate:modelValue":a[3]||(a[3]=l=>$(O)?O.value=l:null)},{default:g(()=>[c(e(pe),{ref_key:"OtpDisplayForAutoSave",ref:oe,accountParams:e(T),preferences:e(r).preferences,twofaccountService:e(x),iconPathPrefix:e(H).config.subdirectory,onPleaseCloseMe:a[0]||(a[0]=l=>e(P).push({name:"accounts"})),onPleaseUpdateActiveGroup:Pe,onOtpCopiedToClipboard:a[1]||(a[1]=l=>e(m).success({text:e(v)("notification.copied_to_clipboard")})),onError:a[2]||(a[2]=l=>e(B).show(l))},null,8,["accountParams","preferences","twofaccountService","iconPathPrefix"])]),_:1},8,["modelValue"])):d("",!0),!e(h)&&e(L)?(n(),p("div",yt,[a[28]||(a[28]=s("div",{class:"modal-background"},null,-1)),s("div",bt,[s("section",kt,[s("form",{onSubmit:W(ye,["prevent"]),onKeydown:a[7]||(a[7]=l=>e(o).onKeydown(l))},[s("div",null,[e(C).errors.hasAny("icon")?(n(),_(se,{key:0,error:e(C).errors.get("icon"),field:"icon",class:"help-for-file"},null,8,["error"])):d("",!0),e(i)?d("",!0):(n(),p("label",wt,[s("input",{id:"filUploadIcon",class:"file-input",type:"file",accept:"image/*",onChange:ke,ref_key:"iconInput",ref:te},null,544),c(e(Le),{class:"icon-size-3"})])),e(i)?(n(),p("button",{key:2,type:"button",class:"delete delete-icon-button is-medium",onClick:W(b,["prevent"])})):d("",!0),c(e(pe),{ref_key:"OtpDisplayForQuickForm",ref:j,accountParams:e(o).data(),preferences:e(r).preferences,twofaccountService:e(x),iconPathPrefix:e(H).config.subdirectory,can_autoCloseTimeout:!1,onIncrementHotp:we,onPleaseCloseMe:a[4]||(a[4]=l=>k.value=!1),onPleaseUpdateActiveGroup:Pe,onOtpCopiedToClipboard:a[5]||(a[5]=l=>e(m).success({text:e(v)("notification.copied_to_clipboard")})),onValidationError:Ve,onError:a[6]||(a[6]=l=>e(B).show(l))},null,8,["accountParams","preferences","twofaccountService","iconPathPrefix"])]),e(o).errors.any()?(n(),p("div",Vt,[(n(!0),p(J,null,X(e(o).errors.errors,(l,Xe)=>(n(),p("ul",{key:Xe,class:"help is-danger"},[(n(!0),p(J,null,X(l,(Ye,Ze)=>(n(),p("li",{key:Ze},f(Ye),1))),128))]))),128))])):d("",!0),s("div",xt,[s("div",Pt,[c(ne,{nativeType:"submit",isLoading:e(o).isBusy},{default:g(()=>[de(f(t.$t("label.save")),1)]),_:1},8,["isLoading"])]),c(Me,{action:"cancel",isText:!0,isRounded:!1,useLinkTag:!1,onCanceled:be})])],32)])])])):d("",!0),e(A)?(n(),_(je,{key:2,title:e(h)?"heading.edit_account":"heading.new_account"},{default:g(()=>[s("form",{onSubmit:W(_e,["prevent"]),onKeydown:a[22]||(a[22]=l=>e(o).onKeydown(l))},[e(h)?d("",!0):(n(),p("div",Ct,[s("div",Mt,[s("div",{role:"button",tabindex:"0",class:q(["file is-small",{"is-black":z=="dark"}]),onKeyup:a[8]||(a[8]=Fe(l=>e(ve).click(),["enter"]))},[s("label",{class:"file-label",title:t.$t("tooltip.use_qrcode"),ref_key:"qrcodeInputLabel",ref:ve},[s("input",{inert:"",tabindex:"-1",class:"file-input",type:"file",accept:"image/*",onChange:Re,ref_key:"qrcodeInput",ref:me},null,544),s("span",Ft,[s("span",It,[c(e(mt),{class:"mr-2"}),de(f(t.$t("label.prefill_using_qrcode")),1)])])],8,St)],34)])])),e(Q).errors.hasAny("qrcode")?(n(),_(se,{key:1,error:e(Q).errors.get("qrcode"),field:"qrcode",class:"help-for-file"},null,8,["error"])):d("",!0),c(re,{modelValue:e(o).service,"onUpdate:modelValue":a[9]||(a[9]=l=>e(o).service=l),fieldName:"service",errorMessage:e(o).errors.get("email"),isDisabled:e(o).otp_type==="steamtotp",label:"field.service",placeholder:t.$t("field.service.placeholder"),autofocus:""},null,8,["modelValue","errorMessage","isDisabled","placeholder"]),c(re,{modelValue:e(o).account,"onUpdate:modelValue":a[10]||(a[10]=l=>e(o).account=l),fieldName:"account",errorMessage:e(o).errors.get("account"),label:"field.account",placeholder:t.$t("field.account.placeholder")},null,8,["modelValue","errorMessage","placeholder"]),e(r).preferences.iconSource=="logolib"?(n(),p("label",$t,f(t.$t("field.icon")),1)):d("",!0),e(r).preferences.iconSource=="logolib"?(n(),p("div",Ut,[s("div",Tt,[s("div",Lt,[Ie(s("select",{disabled:!e(o).service,name:"icon-collection","onUpdate:modelValue":a[11]||(a[11]=l=>$(w)?w.value=l:null)},[(n(),p(J,null,X(De,l=>s("option",{key:l.text,value:l.value},f(l.text),9,At)),64))],8,Ot),[[$e,e(w)]])])]),K[e(w)]?(n(),p("div",Et,[s("div",Dt,[Ie(s("select",{disabled:!e(o).service,name:"icon-collection-variant","onUpdate:modelValue":a[12]||(a[12]=l=>$(E)?E.value=l:null)},[(n(!0),p(J,null,X(K[e(w)],l=>(n(),p("option",{key:l.value,value:l.value},f(t.$t(l.text)),9,qt))),128))],8,Nt),[[$e,e(E)]])])])):d("",!0)])):e(r).preferences.iconSource=="iconpack"?(n(),_(Se,{key:4,modelValue:e(I),"onUpdate:modelValue":a[13]||(a[13]=l=>$(I)?I.value=l:null),options:e(V),fieldName:"iconPack",isDisabled:!e(o).service,label:"field.icon"},{default:g(()=>[s("button",{class:"button is-ghost",onClick:Ce,type:"button",title:t.$t("tooltip.refresh_icon_pack_list")},[c(e(pt),{class:q({spinning:e(ee)})},null,8,["class"])],8,Gt)]),_:1},8,["modelValue","options","isDisabled"])):d("",!0),s("div",Bt,[s("div",Ht,[c(ne,{onClick:xe,color:z=="dark"?"is-dark":"",nativeType:"button","is-loading":e(R),disabled:!e(o).service||e(r).preferences.iconSource=="iconpack"&&!e(Z),"aria-describedby":"lgdTryMyLuck"},{default:g(()=>[s("span",Qt,[c(e(_t))]),s("span",null,f(t.$t("label.i_m_lucky")),1)]),_:1},8,["color","is-loading","disabled"])]),s("div",Kt,[s("div",{role:"button",tabindex:"0",class:q(["file mr-3",z=="dark"?"is-dark":"is-white"]),onKeyup:a[14]||(a[14]=Fe(l=>e(he).click(),["enter"]))},[s("label",{for:"filUploadIcon",class:"file-label",ref_key:"iconInputLabel",ref:he},[s("input",{id:"filUploadIcon",tabindex:"-1",class:"file-input",type:"file",accept:"image/*",onChange:ke,ref_key:"iconInput",ref:te},null,544),s("span",Rt,[s("span",jt,[c(e(Le))]),s("span",zt,[s("span",Wt,f(t.$t("label.choose_image")),1)])])],512)],34),e(i)?(n(),p("span",{key:0,class:q(["tag is-large",z=="dark"?"is-dark":"is-white"])},[s("img",{class:"icon-preview",src:e(H).config.subdirectory+"/storage/icons/"+e(i),alt:t.$t("alttext.icon_to_illustrate_the_account")},null,8,Jt),s("button",{type:"button",class:"clear-selection delete is-small",onClick:W(b,["prevent"]),"aria-label":t.$t("label.remove_icon")},null,8,Xt)],2)):d("",!0)])]),s("div",Yt,[e(C).errors.hasAny("icon")?(n(),_(se,{key:0,error:e(C).errors.get("icon"),field:"icon",class:"help-for-file"},null,8,["error"])):d("",!0),e(r).preferences.getOfficialIcons?(n(),p("p",Zt,f(t.$t("message.i_m_lucky_legend")),1)):d("",!0)]),e(ge).length>0?(n(),_(Se,{key:5,modelValue:e(o).group_id,"onUpdate:modelValue":a[15]||(a[15]=l=>e(o).group_id=l),options:e(ge),fieldName:"group_id",label:"field.group",help:"field.group.help"},null,8,["modelValue","options"])):d("",!0),c(ie,{modelValue:e(o).otp_type,"onUpdate:modelValue":a[16]||(a[16]=l=>e(o).otp_type=l),isDisabled:e(h),choices:Ne,fieldName:"otp_type",errorMessage:e(o).errors.get("otp_type"),label:"field.otp_type",help:"field.otp_type.help",hasOffset:!0},null,8,["modelValue","isDisabled","errorMessage"]),e(o).otp_type!=""?(n(),p("div",eo,[c(e(Ue),{enableProtection:e(h),modelValue:e(o).secret,"onUpdate:modelValue":a[17]||(a[17]=l=>e(o).secret=l),modelModifiers:{trimAll:!0},fieldName:"secret",errorMessage:e(o).errors.get("secret"),label:"field.secret",help:"field.secret.help"},null,8,["enableProtection","modelValue","errorMessage"]),e(o).otp_type!=="steamtotp"?(n(),p("div",to,[s("h2",oo,f(t.$t("heading.options")),1),s("p",ao,f(t.$t("field.options.help")),1),c(ie,{modelValue:e(o).digits,"onUpdate:modelValue":a[18]||(a[18]=l=>e(o).digits=l),choices:qe,fieldName:"digits",errorMessage:e(o).errors.get("digits"),label:"field.digits",help:"field.digits.help"},null,8,["modelValue","errorMessage"]),c(ie,{modelValue:e(o).algorithm,"onUpdate:modelValue":a[19]||(a[19]=l=>e(o).algorithm=l),choices:Ge,fieldName:"algorithm",errorMessage:e(o).errors.get("algorithm"),label:"field.algorithm",help:"field.algorithm.help"},null,8,["modelValue","errorMessage"]),e(o).otp_type==="totp"?(n(),_(re,{key:0,pattern:"[0-9]{1,4}",class:q("is-half-width-field"),modelValue:e(o).period,"onUpdate:modelValue":a[20]||(a[20]=l=>e(o).period=l),fieldName:"period",errorMessage:e(o).errors.get("period"),label:"field.period",help:"field.period.help",placeholder:t.$t("field.period.placeholder")},null,8,["modelValue","errorMessage","placeholder"])):d("",!0),e(o).otp_type==="hotp"?(n(),_(e(Ue),{key:1,pattern:"[0-9]{1,4}",enableProtection:e(h),isExpanded:!1,modelValue:e(o).counter,"onUpdate:modelValue":a[21]||(a[21]=l=>e(o).counter=l),fieldName:"counter",errorMessage:e(o).errors.get("counter"),label:"field.counter",placeholder:t.$t("field.counter.placeholder"),help:e(h)?"field.counter.help_lock":"field.counter.help"},null,8,["enableProtection","modelValue","errorMessage","placeholder","help"])):d("",!0)])):d("",!0)])):d("",!0)],32),c(D,{"is-active":e(k),"onUpdate:isActive":a[26]||(a[26]=l=>$(k)?k.value=l:null)},{default:g(()=>[c(e(pe),{ref_key:"OtpDisplayForAdvancedForm",ref:ae,accountParams:e(o).data(),preferences:e(r).preferences,twofaccountService:e(x),iconPathPrefix:e(H).config.subdirectory,can_autoCloseTimeout:!1,onIncrementHotp:we,onPleaseCloseMe:a[23]||(a[23]=l=>k.value=!1),onOtpCopiedToClipboard:a[24]||(a[24]=l=>e(m).success({text:e(v)("notification.copied_to_clipboard")})),onValidationError:Ve,onError:a[25]||(a[25]=l=>e(B).show(l))},null,8,["accountParams","preferences","twofaccountService","iconPathPrefix"])]),_:1},8,["is-active"])]),_:2},1032,["title"])):d("",!0),c(D,{"is-active":e(S),"onUpdate:isActive":a[27]||(a[27]=l=>$(S)?S.value=l:null)},{default:g(()=>[c(dt,{qrContent:e(M)},null,8,["qrContent"])]),_:1},8,["is-active"])]),footer:g(()=>[c(ze,null,{default:g(()=>[s("p",lo,[c(ne,{nativeType:"submit",onClick:_e,id:e(h)?"btnUpdate":"btnCreate",isLoading:e(o).isBusy,class:"is-rounded"},{default:g(()=>[de(f(e(h)?t.$t("label.save"):t.$t("label.create")),1)]),_:1},8,["id","isLoading"])]),e(o).otp_type&&e(o).secret?(n(),p("p",so,[s("button",{id:"btnPreview",type:"button",class:"button is-success is-rounded has-text-white",onClick:Qe},f(t.$t("label.test")),1)])):d("",!0),c(Me,{action:"cancel",useLinkTag:!1,onCanceled:be})]),_:1})]),_:2},1024),e(F)?(n(),_(Je,{key:0,type:"fullscreen",isVisible:!0,message:"message.parsing_data"})):d("",!0)]),_:1})}}};export{ho as default};
|