1import{_ as N}from"./nuxt-link.928736e8.js";import{_ as I}from"./Field.7322a01b.js";import{_ as F}from"./Group.5bea8d12.js";import{_ as P}from"./Error.f57eebfb.js";import{d as E}from"./entry.7d939621.js";import{a as o,h as L,q as h,x as M,y as t,E as n,I as v,X as T,u as e,O as V,H as B,A as U,V as j,R as A,U as R}from"./swiper-vue.1b2a8b42.js";import{u as $}from"./cookie.c2dfd3c6.js";import{u as q}from"./useAccounts.cb6f3929.js";import{_ as D}from"./editorial-image.b61b89b6.js";import{_ as G}from"./axios.93df6217.js";import{_ as H}from"./_plugin-vue_export-helper.c27b6911.js";/* empty css */const g=p=>(A("data-v-fe68236b"),p=p(),R(),p),O={class:"flex flex-col md:flex-row pt-12 md:pt-16 pb-16 md:pb-0 items-center"},W=g(()=>t("div",{class:"w-full md:w-1/2 img-container mb-8 md:mb-0"},[t("figure",{class:"w-full h-full"},[t("img",{class:"w-full h-full object-cover",src:D})])],-1)),X={class:"w-full md:w-1/2 px-4 md:px-8 lg:px-32"},z={class:"flex items-end justify-between w-full mb-8"},J=g(()=>t("h1",{class:"text-heading"},"Sign Up",-1)),K=g(()=>t("span",{class:"block text-body-small -mt-1",textContent:"Password must be at least 8 characters"},null,-1)),Q=["disabled","textContent"],Y={__name:"register",setup(p){const f=$(G),b=E(),u=o(""),c=o(""),m=o(""),l=o(""),i=o(""),s=o(""),d=o(!1),{customerSignUp:x}=q(),w=L(()=>!u.value.length||!c.value.length||!m.value.length||!l.value.length||!i.value.length),y=async()=>{try{if(!u.value.length||!c.value.length||!m.value.length||!l.value.length||!i.value.length)return s.value="Fields Missing.";if(l.value.length<8)return s.value="Password Too Short. Must be a minimum of 8 characters.";if(l.value!==i.value)return s.value="Passwords do not match.";d.value=!0;const r=await x(u.value,c.value,m.value,l.value);r.msg!=="Success"?s.value=r.msg:(f.value=r.accessToken,b.push("/customers/account")),d.value=!1}catch(r){console.log(r),d.value=!1,s.value="Whoops something went wrong on our end. Please refresh the page and try again."}};return(r,Z)=>{const C=N,_=I,k=F,S=P;return h(),M("div",O,[W,t("div",X,[t("div",z,[J,n(C,{class:"pb-1 border-b border-solid border-client-black",to:"/customers/login"},{default:v(()=>[j("Log In")]),_:1})]),t("form",{onSubmit:T(y,["prevent"]),class:"flex flex-col gap-y-4"},[n(k,null,{default:v(()=>[n(_,{type:"text",label:"First Name",value:e(u),handleChange:a=>u.value=a.target.value},null,8,["value","handleChange"]),n(_,{type:"text",label:"Last Name",value:e(c),handleChange:a=>c.value=a.target.value},null,8,["value","handleChange"])]),_:1}),n(_,{type:"email",label:"Email",value:e(m),handleChange:a=>m.value=a.target.value},null,8,["value","handleChange"]),n(_,{type:"password",label:"Password",value:e(l),handleChange:a=>l.value=a.target.value},null,8,["value","handleChange"]),K,n(_,{type:"password",label:"Confirm Password",value:e(i),handleChange:a=>i.value=a.target.value},null,8,["value","handleChange"]),t("button",{disabled:e(w)||e(d),type:"submit",class:"mt-4 btn btn-fill-dark",textContent:V(e(d)?"Loading...":"Log In")},null,8,Q)],32),e(s).length?(h(),B(S,{key:0,msg:e(s),clearMessage:()=>s.value=""},null,8,["msg","clearMessage"])):U("",!0)])])}}},de=H(Y,[["__scopeId","data-v-fe68236b"]]);export{de 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.