2024-11-17 23:37:23 +01:00
|
|
|
import{Z as Ne,r as d,l as h,m as a,d as u,e as s,f as e,n as $,V as G,h as b,k as y,C as O,j as r,U as R,i as c,F as ce,u as qe,b as De,a as Pe,c as se,x as Ve,o as He,J as T,P as ne,s as Q,D as ae,E as Ee,_ as Ke,t as k,g as $e,w as Fe,L as Qe,p as Ge,T as Re,H as M}from"./app-D4Udf6Mm.js";import{F as re}from"./Form-BGrUTood.js";import{_ as ie}from"./OtpDisplay-D2QMFFL_.js";import{_ as je}from"./QrContentDisplay-C6rCu47Q.js";import{u as ze}from"./bus-RVphoWuw.js";import"./Spinner-DHClvaFf.js";/*! 2FAuth version 5.4.1 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const We=["for","innerHTML"],Je=["disabled","id","type","value","placeholder","maxlength"],Ze={key:0,class:"control"},Xe=["title"],Ye={class:"icon"},eo={key:1,class:"control"},oo=["title"],to={class:"icon has-text-danger"},lo=["innerHTML"],Ie=Object.assign({inheritAttrs:!1},{__name:"FormLockField",props:{modelValue:String,modelModifiers:{default:()=>({})},isEditMode:{type:Boolean,default:!1},label:{type:String,default:""},fieldName:{type:String,default:"",required:!0},fieldError:[String],inputType:{type:String,default:"text"},placeholder:{type:String,default:""},help:{type:String,default:""},hasOffset:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!0},maxLength:{type:Number,default:null}},emits:["input:modelValue"],setup(p,{emit:j}){const g=p,{inputId:q}=Ne(g.inputType,g.fieldName),m=d(g.isDisabled||g.isEditMode),F=d(!1),x=d(0),w=j;function o(f){let v=f.target.value;g.modelModifiers.trimAll&&(v=v.replace(/\s+/g,"")),w("update:modelValue",v)}function S(f){let v=f.target.value;F.value=v.includes(" "),w("update:modelValue",v)}function E(f){F.value=f.target.value.includes(" "),x.value+=1}return(f,v)=>{const D=h("FontAwesomeIcon"),P=h("FieldError");return a(),u(ce,null,[s("label",{for:e(q),class:"label",innerHTML:f.$t(p.label)},null,8,We),s("div",{class:$(["field has-addons mb-0",{"pt-3":p.hasOffset}])},[s("div",{class:$(["control",{"is-expanded":p.isExpanded}])},[(a(),u("input",G({key:e(x),disabled:e(m),id:e(q),type:p.inputType,class:"input",value:p.modelValue,placeholder:p.placeholder},f.$attrs,{onInput:S,onChange:o,onBlur:E,maxlength:p.maxLength}),null,16,Je))],2),p.isEditMode?(a(),b(e(R),{key:0},{default:y(({mode:V})=>[e(m)?(a(),u("div",Ze,[s("button",{type:"button",class:$(["button field-lock",{"is-dark":V=="dark"}]),onClick:v[0]||(v[0]=O(i=>m.value=!1,["stop"])),title:f.$t("twofaccounts.forms.unlock.title")},[s("span",Ye,[r(D,{icon:["fas","lock"]})])],10,Xe)])):(a(),u("div",eo,[s("button",{type:"button",class:$(["button field-unlock",{"is-dark":V=="dark"}]),onClick:v[1]||(v[1]=O(i=>m.value=!0,["stop"])),title:f.$t("twofaccounts.forms.lock.title")},[s("span",to,[r(D,{icon:["fas","lock-open"]})])],10,oo)]))]),_:1})):c("",!0)],2),e(F)?(a(),b(P,{key:0,error:f.$t("twofaccounts.forms.spaces_are_ignored"),field:"spaces",alertType:"is-warning"},null,8,["error"])):c("",!0),p.fieldError!=null?(a(),b(P,{key:1,error:p.fieldError,field:p.fieldName},null,8,["error","field"])):c("",!0),p.help?(a(),u("p",{key:2,class:"help",innerHTML:f.$t(p.help)},null,8,lo)):c("",!0)],64)}}}),so={class:"container preview has-text-centered"},no={class:"columns is-mobile"},ao={class:"column"},ro={key:1,class:"add-icon-button"},io={class:"columns is-mobile",role:"alert"},co={key:0,class:"column"},uo={class:"columns is-mobile"},fo={class:"column quickform-footer"},po={class:"field is-grouped is-grouped-centered"},mo={class:"control"},vo={key:0,class:"field is-grouped"},ho={class:"control"},go=["title"],_o={class:"file-cta"},yo={class:"file-icon"},wo={class:"file-label"},bo={class:"label"},ko={class:"field is-grouped"},Vo={key:0,class:"control"},Eo={class:"icon is-small"},$o={class:"control is-flex"},Fo={class:"file-cta"},Io={class:"file-icon"},Co={class:"file-label"},To=["src","alt"],Mo=["aria-label"],xo={class:"field"},So=["innerHTML"],Lo={key:3},Ao={key:0},Oo={class:"title is-4 mt-5 mb-2"},Uo={class:"help mb-4"},Bo={class:"control"},No={key:0,class:"control"},Go={__name:"CreateUpdate",props:{twofaccountId:[Number,String]},setup
|