PageSourceSearch

https://www.handelskammer.dk/build/assets/login-two-factor-Cot16lgc.js

js handelskammer.dk collected 2026-10-02 11:06:14 UTC 2,419 bytes, 1 lines download raw bytes

1import{d as y,ap as m,o as V,c as f,e as c,s as o,h as i,f as C,i as v,x as p,aq as N,r as w,j as g,n as P}from"./app-BQ-43nIL.js";import{_ as M}from"./digits-input.vue_vue_type_script_setup_true_lang-0rVRCf8T.js";import{_ as b}from"./dihk-button.vue_vue_type_script_setup_true_lang-CMVXMAoq.js";const k={class:"b-login-two-factor"},x={key:0,class:"p-error-title"},B={class:"action-buttons"},q=["id","name","value"],T=["id","name"],R=y({__name:"login-two-factor",props:N({authCodeParameterName:{},trustedParameterName:{},logoutPath:{},errorState:{type:Boolean}},{modelValue:{},modelModifiers:{},"error-state-model":{type:Boolean},"error-state-modelModifiers":{}}),emits:["update:modelValue","update:error-state-model"],setup(t){const n=t,a=m(t,"modelValue"),r=m(t,"error-state-model"),s=w(null),S=g(()=>n.errorState&&sessionStorage.getItem("previousSetDigits")||""),u=g(()=>a.value?.length===6&&!r.value);function h(){sessionStorage.setItem("previousSetDigits",a.value||"")}async function d(){if(u.value){if(h(),await P(),typeof s.value?.requestSubmit=="function"){s.value.requestSubmit();return}s.value?.submit()}}return V(()=>{n.errorState&&(r.value=n.errorState)}),(D,e)=>(f(),c("div",k,[e[4]||(e[4]=o("h3",{class:"title-heading"},"Two-Factor Authentication",-1)),e[5]||(e[5]=o("p",{class:"p-description"}," Enter 6-digit code from your two factor authenticator app ",-1)),i(M,{modelValue:a.value,"onUpdate:modelValue":e[0]||(e[0]=l=>a.value=l),"error-state-model":r.value,"onUpdate:errorStateModel":e[1]||(e[1]=l=>r.value=l),"error-state-value":S.value,onSubmit:d},null,8,["modelValue","error-state-model","error-state-value"]),r.value?(f(),c("p",x," Verification code is not correct. Please try again. ")):C("",!0),o("div",B,[i(b,{class:"login-button",disabled:!u.value,type:"button",form:"twofa-login-form",onClick:d},{default:v(()=>[...e[2]||(e[2]=[p("Login",-1)])]),_:1},8,["disabled"]),i(b,{class:"cancel-button",brand:"tertiary",element:"a",href:t.logoutPath},{default:v(()=>[...e[3]||(e[3]=[p("Cancel",-1)])]),_:1},8,["href"])]),o("form",{id:"twofa-login-form",ref_key:"formRef",ref:s,class:"two-fa-login-form",action:"/admin/2fa_check",method:"post"},[o("input",{id:t.authCodeParameterName,type:"hidden",name:t.authCodeParameterName,required:"",value:a.value},null,8,q),o("input",{id:t.trustedParameterName,type:"hidden",name:t.trustedParameterName,value:"true"},null,8,T)],512)]))}});export{R as default};

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.