1import{d as b,z as S,p as c,A as F,u as q,r as B,o as s,c as o,k as x,e as l,h as f,t as y,b as v,B as M,_ as Z}from"./CmQ1EJKF.js";import{u as A}from"./sz1KK2pV.js";import{u as D}from"./BzlgVQNF.js";import"./CmInYDSg.js";import"./C1wqazOG.js";const P={class:"authenticate-page page"},N={key:0,class:"message"},V={key:2,class:"error"},G=b({__name:"authenticate",setup(R){const m=S();m.setCurrentPage({collection:"system",title:"Authenticate",slug:"authenticate"}),D(m.getCurrentPage);const n=c(),d=c(),h=c(),g=F(),p=q(),L=A(),t=B({error:void 0}),E=()=>{t.error=void 0},k=async i=>{var e,a,r,_;if(i.preventDefault(),i.stopPropagation(),t.error=void 0,n.value&&d.value){const C={email:((e=n.value)==null?void 0:e.value)||"",password:((a=d.value)==null?void 0:a.value)||""};g.getGlobal.use_otp&&(C.otp=(r=h.value)==null?void 0:r.value);try{await L.login(C);const u=((_=p.query)==null?void 0:_.redirect)||"/";M(u,{replace:!0,external:!0})}catch(u){const w=u;t.error=w.message}}};return(i,e)=>{var a,r;return s(),o("div",P,[e[1]||(e[1]=x('<svg data-v-7ed90f8f="" viewBox="0 0 1152 1152" preserveAspectRatio="none" fill="none" class="background" data-v-28d425f1><rect data-v-7ed90f8f="" width="1152" height="1152" fill="#6644FF" data-v-28d425f1></rect><path data-v-7ed90f8f="" d="M1152 409.138C1148.61 406.92 1146.7 405.765 1146.7 405.765L6.87761e-07 958.424L-7.3277e-07 1152L506.681 1152C558.985 1126.93 614.88 1101.25 672.113 1074.95C839.401 998.085 1018.12 915.967 1152 828.591L1152 409.138Z" fill="#754DFC" data-v-28d425f1></path><path data-v-7ed90f8f="" d="M1152 159.866C1130.19 146.319 1114.45 138.98 1114.45 138.98L-6.09246e-07 759.421L-3.66364e-07 1152L88.7501 1152C131.867 1108.8 194.289 1054.33 281.936 993.927C371.847 931.97 507.23 864.306 651.138 792.382C828.097 703.939 1017.95 609.052 1152 510.407L1152 159.866Z" fill="#8555F8" data-v-28d425f1></path><path data-v-7ed90f8f="" d="M772.894 -0.000472457L-4.49523e-07 457.782L-5.22658e-07 953.071C22.142 919.082 94.6279 821.1 262.854 696.786C351.427 631.334 485.624 558.338 628.272 480.744C816.642 378.28 1019.75 267.8 1152 156.087L1152 -0.000477328L772.894 -0.000472457Z" fill="#945EF5" data-v-28d425f1></path><path data-v-7ed90f8f="" d="M286.365 -0.000483108L-1.73191e-07 176.373L2.43255e-06 662.21C33.488 615.87 106.028 529.959 243.326 424.909C331.205 357.671 464.771 281.956 606.749 201.473C720.914 136.756 840.519 68.9554 946.182 -0.000479285L286.365 -0.000483108Z" fill="#A366F1" data-v-28d425f1></path><path data-v-7ed90f8f="" d="M0.00195277 363.139C37.1564 313.499 107.096 233.66 228.181 137.623C281.94 94.9838 353.09 48.7594 432.872 9.43526e-06L0.00195595 0L0.00195277 363.139Z" fill="#B36FEE" data-v-28d425f1></path></svg>',1)),l("form",{class:"authenticate-page__form",onSubmit:k,onKeyup:E},[(a=f(p).query)!=null&&a.error?(s(),o("p",N,y((r=f(p).query)==null?void 0:r.error),1)):v("",!0),l("input",{ref_key:"emailEl",ref:n,class:"input",name:"email",type:"email",required:"",placeholder:"Email"},null,512),l("input",{ref_key:"passwordEl",ref:d,class:"input",name:"password",type:"password",required:"",placeholder:"password"},null,512),f(g).getGlobal.use_otp?(s(),o("input",{key:1,ref_key:"otpEl",ref:h,class:"input",name:"otp",type:"password",required:"",placeholder:"otp"},null,512)):v("",!0),t.error?(s(),o("p",V,y(t.error),1)):v("",!0),e[0]||(e[0]=l("button",{type:"submit",class:"button"}," Login ",-1))],32)])}}}),U=Z(G,[["__scopeId","data-v-28d425f1"]]);export{U 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.