PageSourceSearch

https://offer-run.com/assets/DevAuth-BFI7Ao1w.js

js offer-run.com collected 2026-10-02 01:38:24 UTC 4,496 bytes, 1 lines download raw bytes

1import{d as O,u as U,l as F,m as M,n as $,r as z,o as m,c as w,f as n,w as c,O as L,a as s,t as V,e as i,V as j,p as b,q as h,s as f,v as A,x as Q,y as G,F as E,z as H,i as _,j as r,A as J,B as K,C as R,D as T,_ as W}from"./app-Dl2q-KH9.js";import{D as X,a as Y}from"./devPortal-Cz4J27sW.js";const Z={class:"aq dev-auth-wrap aq-grid-bg"},ee={class:"text-h5 font-weight-bold text-primary mb-1"},ae={class:"text-body-2 text-medium-emphasis mt-6 text-center"},se={class:"da-foot"},te=["href"],oe=O({__name:"DevAuth",setup(le){const D=U(),k=F(),x=M(),S=$(),t=r("login"),v=r(),g=r(""),p=r(""),d=r(""),P=r(""),y=r(!1),u=r(""),q=[a=>!!a||"Email is required",a=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a)||"Enter a valid email address"],B=J(()=>t.value==="register"?[a=>!!a||"Password is required",a=>a.length>=8||"Password must be at least 8 characters"]:[a=>!!a||"Password is required"]),I=[a=>!!a||"Please confirm your password",a=>a===d.value||"Passwords do not match"];async function C(a){var e,l;u.value="",(e=v.value)==null||e.resetValidation(),t.value=a,await K(),(l=v.value)==null||l.resetValidation()}async function N(){u.value="";const{valid:a}=await v.value.validate();if(a){y.value=!0;try{if(t.value==="register"){const l=await R("dev_register");await x.register({name:g.value,email:p.value,password:d.value,recaptcha_token:l})}else{const l=await R("dev_login");await x.login({email:p.value,password:d.value,recaptcha_token:l})}const e=typeof k.query.redirect=="string"?k.query.redirect:null;D.replace(e??{name:"dev-console"})}catch(e){e instanceof T&&(e.status===409||e.status===422)?u.value=e.message:S.add(e instanceof T?e.message:"Something went wrong. Please try again.")}finally{y.value=!1}}}return(a,e)=>{const l=z("router-link");return m(),w("div",Z,[n(l,{to:{name:"dev-console"},class:"da-logo"},{default:c(()=>[n(L,{animated:"",size:38}),e[7]||(e[7]=s("span",{class:"da-tag mono"},"DEV",-1)),e[8]||(e[8]=s("span",{class:"da-beta mono"},"BETA",-1))]),_:1}),n(H,{class:"da-card pa-8",rounded:"lg",elevation:"3"},{default:c(()=>[s("div",ee,V(t.value==="register"?"Create a developer account":"Developer sign in"),1),e[11]||(e[11]=s("div",{class:"text-body-2 text-medium-emphasis mb-6"},[i(" Build with the OfferRun API — CV generation, match scoring, ATS checks and more. The API is in "),s("strong",null,"public beta"),i(". ")],-1)),n(j,{ref_key:"form",ref:v,onSubmit:b(N,["prevent"])},{default:c(()=>[t.value==="register"?(m(),h(f,{key:0,modelValue:g.value,"onUpdate:modelValue":e[0]||(e[0]=o=>g.value=o),label:"Name / company","prepend-inner-icon":"mdi-domain",density:"compact",variant:"outlined",class:"mb-2"},null,8,["modelValue"])):A("",!0),n(f,{modelValue:p.value,"onUpdate:modelValue":[e[1]||(e[1]=o=>p.value=o),e[2]||(e[2]=o=>u.value="")],label:"Email",type:"email","prepend-inner-icon":"mdi-email-outline",density:"compact",variant:"outlined",class:"mb-2",rules:q,"error-messages":u.value,"validate-on":"blur"},null,8,["modelValue","error-messages"]),n(f,{modelValue:d.value,"onUpdate:modelValue":e[3]||(e[3]=o=>d.value=o),label:"Password",type:"password","prepend-inner-icon":"mdi-lock-outline",density:"compact",variant:"outlined",class:"mb-2",rules:B.value,"validate-on":"blur",hint:t.value==="register"?"At least 8 characters":void 0,"persistent-hint":""},null,8,["modelValue","rules","hint"]),t.value==="register"?(m(),h(f,{key:1,modelValue:P.value,"onUpdate:modelValue":e[4]||(e[4]=o=>P.value=o),label:"Confirm password",type:"password","prepend-inner-icon":"mdi-lock-check-outline",density:"compact",variant:"outlined",class:"mb-4",rules:I,"validate-on":"blur"},null,8,["modelValue"])):A("",!0),n(Q,{type:"submit",color:"primary",block:"",loading:y.value,class:G({"mt-2":t.value==="login"})},{default:c(()=>[i(V(t.value==="register"?"Create account":"Sign in"),1)]),_:1},8,["loading","class"])]),_:1},512),s("div",ae,[t.value==="login"?(m(),w(E,{key:0},[e[9]||(e[9]=i(" New here? ",-1)),s("a",{href:"#",onClick:e[5]||(e[5]=b(o=>C("register"),["prevent"]))},"Create a developer account")],64)):(m(),w(E,{key:1},[e[10]||(e[10]=i(" Already have an account? ",-1)),s("a",{href:"#",onClick:e[6]||(e[6]=b(o=>C("login"),["prevent"]))},"Sign in")],64))])]),_:1}),s("div",se,[n(l,{to:{name:"dev-docs"},class:"da-docs"},{default:c(()=>[...e[12]||(e[12]=[i("Read the API docs →",-1)])]),_:1}),e[13]||(e[13]=s("span",{class:"da-sep"},"·",-1)),s("a",{href:_(X),class:"da-docs"},"Questions? "+V(_(Y)),9,te)])])}}}),ie=W(oe,[["__scopeId","data-v-48552ff6"]]);export{ie 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.