1import{b2 as N,bl as T,bm as j,b8 as x,bn as k,aW as u,a_ as e,aY as _,a$ as i,aZ as l,b7 as $,b0 as y,b1 as z,aX as m,b3 as F,bc as g,bd as E,b4 as P,bj as V}from"./d3zMeIAg.js";import{_ as q}from"./BAkhYSgA.js";import{_ as G}from"./BIs7UPNR.js";import{_ as L}from"./6hXHsB6-.js";import{G as M,v as W}from"./C9ZHrJNp.js";import{u as X}from"./Cmgxib3O.js";import{u as Y}from"./BUYPaucD.js";import"./BQJsVLCR.js";import"./BzZVineA.js";import"./Bn1MmbeL.js";try{let a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new a.Error().stack;d&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[d]="c6d8a20a-773c-406a-8315-905cf5a2680f",a._sentryDebugIdIdentifier="sentry-dbid-c6d8a20a-773c-406a-8315-905cf5a2680f")}catch{}const Z={class:"relative flex-1 flex flex-col items-center justify-center sm:pr-10"},A={class:"text-3xl text-right"},H={key:0,class:"w-full text-red-500 text-sm"},J={key:0,class:"mt-1 text-red-500 text-sm"},K={class:"relative w-full"},O={key:0,class:"mt-1 text-red-500 text-sm"},Q={class:"mt-1 text-right"},R={class:"text-sm text-gray-950 dark:text-gray-50"},ee={name:"SignupPage"},ue=N({...ee,setup(a){const d=T(),{showError:I}=Y(),{t:h}=j(),{signinSchema:S}=X(),v=x(),o=k({email:"",password:""}),t=k({email:"",password:"",general:""}),f=x(!1);function U(){f.value=!f.value}async function B(s){var r;try{await d.signIn(s.data.email,s.data.password),d.mfaEnabled?V("/user/verify-mfa"):V("/user/setup-mfa")}catch(c){const n=[];if(c instanceof Error)if(c.status===401){const p=h("error.api.401.invalid-credentials");n.push({id:"password",name:"password",message:p})}else I(h("error.api.default.description"),h("error.api.default.title"));n.length>0&&((r=v.value)==null||r.setErrors(n))}}return(s,r)=>{const c=F,n=z,b=q,p=G,C=P,D=L;return m(),u("div",Z,[e(n,{to:"/",class:"absolute top-4 right-4"},{default:i(()=>[e(c,{icon:"i-heroicons-x-mark-20-solid",color:"neutral",variant:"ghost"})]),_:1}),_("h1",A,l(s.$t("auth.welcome-back")),1),e(D,{ref_key:"form",ref:v,schema:$(S),state:o,class:"flex flex-col items-center justify-center space-y-6 w-[300px] my-4",onSubmit:B},{default:i(()=>[t.general?(m(),u("div",H,l(t.general),1)):g("",!0),e(p,{label:s.$t("auth.email"),name:"email",class:"w-full"},{default:i(()=>[e(b,{modelValue:o.email,"onUpdate:modelValue":r[0]||(r[0]=w=>o.email=w),type:"email",size:"lg",icon:"i-heroicons-envelope",class:E(["w-full",{"border-red-500":t.email}])},null,8,["modelValue","class"]),t.email?(m(),u("div",J,l(t.email),1)):g("",!0)]),_:1},8,["label"]),e(p,{label:s.$t("auth.password"),name:"password",class:"w-full"},{default:i(()=>[_("div",K,[e(b,{modelValue:o.password,"onUpdate:modelValue":r[1]||(r[1]=w=>o.password=w),name:"password",autocomplete:"off",size:"lg",type:f.value?"text":"password",icon:"i-heroicons-lock-closed",class:E(["w-full",{"border-red-500":t.password}])},null,8,["modelValue","type","class"]),o.password!==""?(m(),u("div",{key:0,class:"absolute right-3 top-1/2 transform -translate-y-1/2 cursor-pointer",onClick:U},[e(C,{name:f.value?"i-heroicons-eye-slash-20-solid":"i-heroicons-eye-20-solid",class:"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200"},null,8,["name"])])):g("",!0)]),t.password?(m(),u("div",O,l(t.password),1)):g("",!0),_("div",Q,[e(n,{to:"/user/forgot-password",class:"text-xs underline hover:no-underline"},{default:i(()=>[y(l(s.$t("auth.forgot-password-question")),1)]),_:1})])]),_:1},8,["label"]),e(M,{"button-text":s.$t("auth.sign-in"),validate:$(W),state:o,class:"w-full"},null,8,["button-text","validate","state"])]),_:1},8,["schema","state"]),_("span",R,[y(l(s.$t("auth.no-account-question"))+" ",1),e(n,{to:"/user/signup",class:"font-semibold underline hover:no-underline"},{default:i(()=>[y(l(s.$t("auth.sign-up")),1)]),_:1})])])}}});export{ue 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.