1import{f as U,r as g,g as C,H as D,D as V,h as j,c as p,a as t,j as s,A as H,i as h,d as a,t as f,l as L,m as y,v as w,s as v,b as _,w as k,e as W,o as x}from"#entry";import{u as q}from"./CI36eZX6.js";import{u as A}from"./Dy9pVEbO.js";import"./DKLWY9DJ.js";const I={class:"min-h-screen bg-[#f7f3ea] flex flex-col lg:flex-row"},P={class:"relative lg:w-[48%] min-h-[220px] sm:min-h-[280px] lg:min-h-screen overflow-hidden"},R=["src","alt"],B={class:"relative z-10 h-full flex flex-col justify-end lg:justify-center px-6 py-8 sm:px-10 lg:px-12 text-white"},K={key:0,class:"mt-6 text-[11px] text-white/60"},M=["href"],T={class:"flex-1 flex items-center justify-center px-4 py-10 lg:py-16"},E={class:"w-full max-w-md"},z={class:"bg-white rounded-2xl shadow-xl border border-[#e8e0d0] p-8"},Q={key:0,class:"mb-4 p-3 bg-red-50 border border-red-200 rounded-lg text-red-700 text-sm"},Y=["disabled"],G=["disabled"],J=["disabled"],O={class:"mt-6 text-center space-y-3"},X={class:"text-sm text-gray-600"},Z={class:"text-xs text-gray-500"},le=U({__name:"login",setup($){const d=g(""),u=g(""),o=g(!1),r=g(""),F=C(),b=D(),m=V(),{getCuratedImage:S}=q(),i=S("happy golden retriever dog",1200,1600);A({title:"Log in to DogHealthy",description:"Sign in to your DogHealthy account to manage UK dog health records, vaccinations, medications, NFC tags and found-pet alerts.",keywords:"DogHealthy login, dog health app sign in UK",path:"/auth/login",index:!1}),j(()=>{m.query.repaired==="1"&&(r.value="Browser data was cleared. Please log in again.")});const N=async()=>{o.value=!0,r.value="";try{await F.signIn(d.value,u.value);const l=typeof m.query.redirect=="string"?m.query.redirect:"",e=typeof window<"u"&&sessionStorage.getItem("doghealthy_post_login_redirect")||"";typeof window<"u"&&sessionStorage.removeItem("doghealthy_post_login_redirect");const n=(l.startsWith("/")&&!l.startsWith("//")?l:"")||(e.startsWith("/")&&!e.startsWith("//")?e:"");n?await b.push(n):await b.push("/dogs")}catch(l){r.value=l.message||"Failed to login. Please check your credentials."}finally{o.value=!1}};return(l,e)=>{const n=W;return x(),p("div",I,[t("aside",P,[t("img",{src:s(i).url,alt:s(i).description||"Happy dog",class:"absolute inset-0 w-full h-full object-cover"},null,8,R),e[6]||(e[6]=t("div",{class:"absolute inset-0 bg-gradient-to-t from-black/75 via-black/35 to-black/15 lg:bg-gradient-to-r lg:from-black/70 lg:via-black/40 lg:to-black/10"},null,-1)),t("div",B,[e[5]||(e[5]=H('<p class="inline-flex w-fit items-center rounded-full bg-white/15 border border-white/30 px-3 py-1 text-xs font-semibold mb-4"> ð¬ð§ For UK dog owners </p><h2 class="text-3xl sm:text-4xl lg:text-5xl font-extrabold leading-tight max-w-md"> Welcome back.<br>Your pack is waiting. </h2><p class="mt-4 text-sm sm:text-base text-white/90 max-w-md"> Health records, vaccinations, NFC tags and found-pet alerts â all in one place for every dog you look after. </p><ul class="mt-6 hidden sm:grid grid-cols-1 gap-2 text-sm text-white/90 max-w-md"><li class="flex items-center gap-2"><span class="text-[#F9A800]">â</span> Track meds, jabs and vet visits </li><li class="flex items-center gap-2"><span class="text-[#F9A800]">â</span> NFC + QR tags posted to your door </li><li class="flex items-center gap-2"><span class="text-[#F9A800]">â</span> First 3 dogs free </li></ul>',4)),s(i).author?(x(),p("p",K,[e[2]||(e[2]=a(" Photo by ",-1)),t("a",{href:s(i).authorUrl+"?utm_source=doghealthy&utm_medium=referral",target:"_blank",rel:"noopener noreferrer",class:"underline hover:text-white"},f(s(i).author),9,M),e[3]||(e[3]=a(" on ",-1)),e[4]||(e[4]=t("a",{href:"https://unsplash.com?utm_source=doghealthy&utm_medium=referral",target:"_blank",rel:"noopener noreferrer",class:"underline hover:text-white"},"Unsplash",-1))])):h("",!0)])]),t("main",T,[t("div",E,[t("div",z,[e[13]||(e[13]=t("h1",{class:"text-2xl font-bold text-gray-900 mb-1"}," Log in ",-1)),e[14]||(e[14]=t("p",{class:"text-sm text-gray-600 mb-6"}," Sign in to manage your dogsâ health, tags and reminders. ",-1)),s(r)?(x(),p("div",Q,f(s(r)),1)):h("",!0),t("form",{onSubmit:L(N,["prevent"]),class:"space-y-4"},[t("div",null,[e[7]||(e[7]=t("label",{for:"email",class:"block text-sm font-medium text-gray-700 mb-1"}," Email ",-1)),y(t("input",{id:"email","onUpdate:modelValue":e[0]||(e[0]=c=>v(d)?d.value=c:null),type:"email",required:"",disabled:s(o),class:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 disabled:bg-gray-100 disabled:cursor-not-allowed",placeholder:"[email protected]"},null,8,Y),[[w,s(d)]])]),t("div",null,[e[8]||(e[8]=t("label",{for:"password",class:"block text-sm font-medium text-gray-700 mb-1"}," Password ",-1)),y(t("input",{id:"password","onUpdate:modelValue":e[1]||(e[1]=c=>v(u)?u.value=c:null),type:"password",required:"",disabled:s(o),class:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 disabled:bg-gray-100 disabled:cursor-not-allowed",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢"},null,8,G),[[w,s(u)]])]),t("button",{type:"submit",disabled:s(o),class:"w-full bg-blue-600 hover:bg-blue-700 text-white font-semibold py-2.5 px-4 roun
1ded-lg transition-colors disabled:bg-blue-300 disabled:cursor-not-allowed"},f(s(o)?"Logging in...":"Login"),9,J)],32),t("div",O,[t("p",X,[e[10]||(e[10]=a(" Don't have an account? ",-1)),_(n,{to:"/auth/register",class:"text-blue-600 hover:text-blue-700 font-medium"},{default:k(()=>[...e[9]||(e[9]=[a(" Register here ",-1)])]),_:1})]),t("p",Z,[e[12]||(e[12]=a(" Works in Incognito but not here? ",-1)),_(n,{to:"/auth/repair",class:"text-blue-600 hover:underline"},{default:k(()=>[...e[11]||(e[11]=[a(" Fix this browser ",-1)])]),_:1})])])])])])])}}});export{le 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.