1import{D as E,a as L,M as S,r as U,a0 as D,a3 as b,N as M,a7 as p,a8 as B,b as R,o as u,c as x,J as r,a9 as f,aa as C,ab as _,e as v,u as h,ac as P,d as g,w,L as d,K as V,T as N,g as T,ad as A,a2 as y}from"./SetupSentry-DE6y2Ajh.js";import{F as q}from"./FormButton-CCi9BtWO.js";import{c as F}from"./CommonAccountFunctions-6jCrXEYg.js";import{r as $,a as j}from"./EyeIcon-m1RBer64.js";import"./_commonjsHelpers-DKZAErUA.js";import"./_sentry-release-injection-file-DmW9TZFH.js";import"./preload-helper-nkV39p5t.js";import"./GoogleAnalytics-kF7mJAxL.js";import"./reCAPTCHA-j3a1wd68.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},i=new o.Error().stack;i&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[i]="d172e6a1-f331-44c1-9374-6ecfa3d5520a",o._sentryDebugIdIdentifier="sentry-dbid-d172e6a1-f331-44c1-9374-6ecfa3d5520a")}catch{}})();{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};n._sentryModuleMetadata=n._sentryModuleMetadata||{},n._sentryModuleMetadata[new n.Error().stack]=Object.assign({},n._sentryModuleMetadata[new n.Error().stack],{"_sentryBundlerPluginAppKey:business-draft-crm":!0})}const z={class:"mt-1"},K={class:"relative"},O=["type"],H={class:"flex items-center justify-between"},J={class:"flex items-center"},Y={class:"text-sm"},Q={class:"-mx-4 mt-12 -mb-8 rounded-b-lg bg-slate-50 px-4 py-6 text-sm font-medium text-slate-800 sm:-mx-10 sm:px-6"},W={key:0,class:"text-amber-600 pb-3"},ne={__name:"AuthLogin",props:{loginText:{type:String,default:"Log In"}},setup(o){const i=E(),l=L(!1),c=S(),t=U({email:"",password:"",rememberMe:!1,emailExists:!0,loading:!1}),k=()=>{const a=y("session_uuid",null);a.value=null;const e=y("new-user",null);e.value=null;const m=y("candidate-profile-required",null);m.value=null},I=()=>{if(k(),i.isLoggedIn)return b(c);t.loading||(window.progressBar.start(),t.loading=!0,i.login(t.email,t.password,t.rememberMe,p("setCompanyId")).then(a=>{if((a==null?void 0:a.status)===302)return window.location.href=a.headers.location;A(c,a==null?void 0:a.data)}).catch(async a=>{console.error(a),t.emailExists=await F(t.email)}).finally(()=>{window.progressBar.complete(),t.loading=!1}))};return D(()=>{new URLSearchParams(window.location.search).get("toast")==="verified"&&toast.success("Your email has been verified!"),b(c)}),M(()=>{t.email=p("rememberEmail")||"",t.rememberMe=!!p("rememberEmail");const a=new URLSearchParams(window.location.search).get("email"),e=new URLSearchParams(window.location.search).get("r");e&&B("targetUrl",e),t.email=a?decodeURIComponent(a):t.email}),(a,e)=>{const m=R("RouterLink");return u(),x("div",null,[r("form",{class:"space-y-6",onSubmit:N(I,["prevent"])},[r("div",null,[e[5]||(e[5]=r("label",{for:"email",class:"block text-sm font-medium text-gray-700"}," Email address ",-1)),r("div",z,[f(r("input",{"onUpdate:modelValue":e[0]||(e[0]=s=>t.email=s),id:"email",name:"email",type:"email",autocomplete:"email",required:"",inputmode:"email",class:"block w-full appearance-none rounded-md border border-gray-300 px-3 py-2 shadow-sm placeholder-gray-400 -500 focus:ring-primary-500 focus:border-primary-600 focus:outline-none sm:text-sm"},null,512),[[C,t.email]])])]),r("div",null,[e[6]||(e[6]=r("label",{for:"password",class:"block text-sm font-medium text-gray-700 mb-1"}," Password ",-1)),r("div",K,[f(r("input",{"onUpdate:modelValue":e[1]||(e[1]=s=>t.password=s),id:"password",name:"password",type:l.value?"text":"password",autocomplete:"current-password",required:"",class:"block w-full appearance-none rounded-md border border-gray-300 pl-3 pr-10 py-2 shadow-sm placeholder-gray-400 -500 focus:ring-primary-500 focus:border-primary-600 focus:outline-none sm:text-sm"},null,8,O),[[_,t.password]]),l.value?(u(),v(h($),{key:0,onClick:e[2]||(e[2]=s=>l.value=!1),class:"absolute top-1/2 right-3 transform -translate-y-1/2 h-5 w-5 text-gray-400 cursor-pointer"})):(u(),v(h(j),{key:1,onClick:e[3]||(e[3]=s=>l.value=!0),class:"absolute top-1/2 right-3 transform -translate-y-1/2 h-5 w-5 text-gray-400 cursor-pointer"}))])]),r("div",H,[r("div",J,[f(r("input",{"onUpdate:modelValue":e[4]||(e[4]=s=>t.rememberMe=s),id:"remember-me",name:"remember-me",type:"checkbox",class:"h-4 w-4 roun
1ded border-gray-300 text-primary-600 focus:ring-primary-500"},null,512),[[P,t.rememberMe]]),e[7]||(e[7]=r("label",{for:"remember-me",class:"ml-2 block text-sm text-gray-900"}," Remember me ",-1))]),r("div",Y,[g(m,{to:"/forgot-password",class:"text-sm font-medium text-primary-600 hover:text-primary-700 hover:underline"},{default:w(()=>e[8]||(e[8]=[d(" Forgot your password? ")])),_:1})])]),g(q,{type:"submit",size:"full",color:"gradient",loading:t.loading},{default:w(()=>[d(V(o.loginText),1)]),_:1},8,["loading"])],32),r("div",Q,[t.emailExists?T("",!0):(u(),x("p",W,e[9]||(e[9]=[d("Hmm, we don't recognize that email ð"),r("br",null,null,-1)]))),r("p",null,[e[11]||(e[11]=d(" Don't have an account? ")),g(m,{to:"/create-account",class:"text-primary-600 hover:text-primary-700 hover:underline"},{default:w(()=>e[10]||(e[10]=[d(" Sign Up ")])),_:1})])])])}}};export{ne as default}; 2//# sourceMappingURL=AuthLogin-DTXmNYhP.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.