PageSourceSearch

https://portal.wibernet.co.za/dist/dist-portal-login/TwoFactor.DTMea1RF.js

js wibernet.co.za collected 2026-10-09 22:42:41 UTC 4,791 bytes, 3 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["index.CmYDeezW.js","app.6-zBPm55.js","vendor.kmuNf4Gr.js","css/styles.BuZ8GZAp.css","input-mixin.BU399U4z.js"])))=>i.map(i=>d[i]);
2import{_ as w,a as T,e as d,r as c,L as m}from"./app.6-zBPm55.js";import{r as C,d as h,y as u,u as o,D as F,x as i,h as p,f as g,C as f,H as v,w as y,E as R,G as b,I as E,z as S}from"./vendor.kmuNf4Gr.js";/* empty css               */const A={name:"TwoFactor",emits:["success","submit","error"],props:{dataForTwoFactor:Object,permissionResendCode:Boolean,errorMessage:String},data(){return{loading:!1,processingTwoFactor:!1,processing:!1,code:"",recipient:{},twoFactorAuthType:"",interval:!1,secondsLeft:0,timeoutForResetCode:0}},methods:{onTwoFactorGenerate(...e){return c("TwoFactor.onTwoFactorGenerate",async(t,l=!1)=>{const r=await m.getTwoFactorInfo(t);r.result==="error"?this.$emit("error",r):(this.processingTwoFactor=!0,this.$emit("success",r),this.twoFactorAuthType=r.two_factor_auth_type,this.recipient=r.recipient,this.timeoutForResetCode=r.timeout_for_reset_code,l&&this.$showSuccess(this.$t("portal","Successfully sent"),4),this.initTimer()),this.loading=!1},this,e)},initTimer(...e){return c("TwoFactor.initTimer",()=>{this.secondsLeft=this.timeoutForResetCode;const t=setInterval(()=>{if(this.showResendCodeTimer){this.secondsLeft-=1;return}clearTimeout(t),this.updatePermissionResendCodeState()},1e3)},this,e)},updatePermissionResendCodeState(...e){return c("TwoFactor.updatePermissionResendCodeState",async()=>{const t=await m.availabilityToResendCode();this.$emit("success",t)},this,e)},resendCode(...e){return c("TwoFactor.resendCode",()=>{if(!this.permissionResendCode)return!1;this.loading=!0,this.onTwoFactorGenerate({login:this.dataForTwoFactor.login,security_code_1:this.dataForTwoFactor.security_code_1,security_code_2:this.dataForTwoFactor.security_code_2,resend_code:!0},!0)},this,e)},setEnteredCode(...e){return c("TwoFactor.setEnteredCode",()=>{this.$emit("submit",this.code)},this,e)}},computed:{codePlaceholder(){switch(this.twoFactorAuthType){case"mail_sms":return this.$t("portal","Enter confirmation code");case"sms":return this.$t("portal","Enter code from SMS");case"mail":return this.$t("portal","Enter code from email address");default:return""}},twoFactorInfo(){let e="";if(!this.processingTwoFactor)return e;if(d(this.recipient))return this.$t("portal","Enter the 2-factor verification code");let t=this.twoFactorAuthType;return t==="mail_sms"&&!d(this.recipient.email)&&!d(this.recipient.phone)?this.$t("portal","A confirmation code was sent to your phone number {phone} and email address {email}",{phone:this.recipient.phone,email:this.recipient.email}):(t==="sms"||t==="mail_sms")&&!d(this.recipient.phone)?this.$t("portal","A confirmation code was sent to your phone number ending in {phone}",{phone:this.recipient.phone}):(t==="mail"||t==="mail_sms")&&!d(this.recipient.email)?this.$t("portal","A confirmation code was sent to your email address {email}",{email:this.recipient.email}):e},showResendCodeTimer(){return this.secondsLeft>0},resendCodeClasses(){return{disabled:this.showResendCodeTimer}}},components:{XTextField:S(()=>T(()=>import("./index.CmYDeezW.js"),__vite__mapDeps([0,1,2,3,4])))}},L={class:"login-portal-info"},I={class:"color-danger"},k={class:"form-input-group"},P={class:"col-form-label"},$={key:0,id:"error"},x={id:"static",class:"login-error"},V={class:"login-footer"},D=["value"],M={id:"seconds-left",class:"form-input-group"},B={class:"resend-message"};function G(e,t,l,r,n,s){const _=C("x-text-field");return h(),u("div",null,[o("div",L,[F(i(s.twoFactorInfo)+" ",1),o("div",I,i(e.$t("portal","It may take up to two minutes to arrive.")),1)]),o("div",k,[o("label",P,i(e.$t("portal","Code")),1),p(_,{ref:"codeInput","model-value":n.code,options:{id:"code-input",autocomplete:"code",name:"LoginForm[code]",placeholder:s.codePlaceholder,disabled:n.loading,required:n.processingTwoFactor},"onUpdate:modelValue":t[0]||(t[0]=a=>n.code=a)},null,8,["model-value","options"])]),l.errorMessage?(h(),u("div",$,[o("div",x,i(l.errorMessage),1)])):g("",!0),o("div",V,[o("input",{id:"submit-code",type:"submit",class:"btn btn-primary",value:e.$t("portal","Sign in"),onClick:t[1]||(t[1]=f((...a)=>s.setEnteredCode&&s.setEnteredCode(...a),["prevent"]))},null,8,D),o("a",{id:"resend-code",class:v(["link",s.resendCodeClasses]),href:"javascript:void(0)",onClick:t[2]||(t[2]=f((...a)=>s.resendCode&&s.resendCode(...a),["prevent"]))},i(e.$t("portal","Resend code")),3)]),p(E,{name:"slide"},{default:y(()=>[R(o("div",M,[o("span",B,i(e.$t("portal","{seconds} seconds to resend again",{seconds:n.secondsLeft})),1)],512),[[b,s.showResendCodeTimer]])]),_:1})])}const O=w(A,[["render",G]]);export{O as default};
3//# sourceMappingURL=TwoFactor.DTMea1RF.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.