PageSourceSearch

https://k9prohub-5u7ruody.manus.space/assets/Login-BhoZ3NJl.js

js k9prohub-5u7ruody.manus.space collected 2026-10-03 05:02:48 UTC 10,283 bytes, 1 lines download raw bytes

1import{r as o,j as e}from"./vendor-ui-CHrmpeEa.js";import{u as P,a as I,b as A,t as E,L as l,c as y,B as x}from"./index-DDXAxf3_.js";import{I as h}from"./input-DMKGRMx7.js";import{L as u}from"./label-CUoU16xo.js";import{C as S,a as H,b as k,c as M,d as B,e as z}from"./card-ZrSkWK4s.js";import{C as F}from"./circle-alert-nbqoFt1B.js";import{E as G}from"./eye-off-BhMktA9U.js";import{E as V}from"./eye-Cbhak6qQ.js";import{L as U}from"./log-in-Dp6AbVkA.js";import"./vendor-react-COd4auuD.js";import"./vendor-trpc-BBLHDmMG.js";import"./vendor-charts-DLOf8RNh.js";import"./useComposition-C645H9Z4.js";const f=()=>{const t=sessionStorage.getItem("bhave_return_path");return t&&sessionStorage.removeItem("bhave_return_path"),t},w={en:{title:"Sign In",subtitle:"Use your email and password to access",email:"Email",emailPlaceholder:"[email protected]",password:"Password",signingIn:"Signing in...",signIn:"Sign In",or:"or",googleSignIn:"Sign in with Google",forgotPassword:"Forgot my password",noAccount:"Don't have an account?",createAccount:"Create your account",backHome:"← Back to main page",fillAll:"Please fill in all fields.",wrongCredentials:"Incorrect email or password.",tagline:"Professional Canine Platform"},pt:{title:"Entrar",subtitle:"Use seu email e senha para acessar",email:"Email",emailPlaceholder:"[email protected]",password:"Senha",signingIn:"Entrando...",signIn:"Entrar",or:"ou",googleSignIn:"Entrar com Google",forgotPassword:"Esqueci minha senha",noAccount:"Não tem conta?",createAccount:"Crie seu cadastro",backHome:"← Voltar para a página principal",fillAll:"Preencha todos os campos.",wrongCredentials:"Email ou senha incorretos.",tagline:"Plataforma Canina Profissional"},fr:{title:"Se connecter",subtitle:"Utilisez votre email et mot de passe pour accéder",email:"Email",emailPlaceholder:"[email protected]",password:"Mot de passe",signingIn:"Connexion...",signIn:"Se connecter",or:"ou",googleSignIn:"Se connecter avec Google",forgotPassword:"Mot de passe oublié",noAccount:"Pas de compte ?",createAccount:"Créer votre compte",backHome:"← Retour à la page principale",fillAll:"Veuillez remplir tous les champs.",wrongCredentials:"Email ou mot de passe incorrect.",tagline:"Plateforme Canine Professionnelle"},de:{title:"Anmelden",subtitle:"Verwenden Sie Ihre E-Mail und Ihr Passwort",email:"E-Mail",emailPlaceholder:"[email protected]",password:"Passwort",signingIn:"Anmeldung...",signIn:"Anmelden",or:"oder",googleSignIn:"Mit Google anmelden",forgotPassword:"Passwort vergessen",noAccount:"Kein Konto?",createAccount:"Konto erstellen",backHome:"← Zurück zur Hauptseite",fillAll:"Bitte füllen Sie alle Felder aus.",wrongCredentials:"E-Mail oder Passwort falsch.",tagline:"Professionelle Hundeplattform"},es:{title:"Iniciar sesión",subtitle:"Usa tu email y contraseña para acceder",email:"Email",emailPlaceholder:"[email protected]",password:"Contraseña",signingIn:"Ingresando...",signIn:"Iniciar sesión",or:"o",googleSignIn:"Iniciar sesión con Google",forgotPassword:"Olvidé mi contraseña",noAccount:"¿No tienes cuenta?",createAccount:"Crea tu cuenta",backHome:"← Volver a la página principal",fillAll:"Por favor, completa todos los campos.",wrongCredentials:"Email o contraseña incorrectos.",tagline:"Plataforma Canina Profesional"}};function Y(){const[,t]=P(),{user:d,loading:m}=I(),{currentLanguage:b}=A(),s=w[b]||w.en,[n,L]=o.useState(""),[i,v]=o.useState(""),[r,j]=o.useState(!1),[p,c]=o.useState(""),g=E.auth.login.useMutation({onSuccess:()=>{const a=f();t(a||"/bhave")},onError:a=>{c(a.message||s.wrongCredentials)}});o.useEffect(()=>{if(m||!d)return;const a=f();t(a||"/bhave")},[m,d,t]);const N=a=>{if(a.preventDefault(),c(""),!n||!i){c(s.fillAll);return}g.mutate({email:n,password:i})},C=()=>{const a=window.location.origin;window.location.href=`${a}/api/auth/google?origin=${encodeURIComponent(a)}`};return e.jsx("div",{"data-loc":"client/src/pages/Login.tsx:151",className:"min-h-screen flex items-center justify-center bg-[#f8fafc] px-4",children:e.jsxs("div",{"data-loc":"client/src/pages/Login.tsx:152",className:"w-full max-w-md",children:[e.jsxs(l,{"data-loc":"client/src/pages/Login.tsx:153",href:"/bhave",className:"flex flex-col items-center mb-8 hover:opacity-90 transition-opacity",children:[e.jsx("img",{"data-loc":"client/src/pages/Login.tsx:154",src:y.normal,alt:"B-HAVE",className:"h-20 w-auto mb-2"}),e.jsx("p",{"data-loc":"client/src/pages/Login.tsx:159",className:"text-[#003b60]/60 text-sm font-light",children:s.tagline})]}),e.jsxs(S,{"data-loc":"client/src/pages/Login.tsx:162",className:"border-slate-200/60 bg-white shadow-sm",children:[e.jsxs(H,{"data-loc":"client/src/pages/Login.tsx:163",className:"space-y-1 pb-4",children:[e.jsx(k,{"data-loc":"client/src/pages/Login.tsx:164",className:"text-xl font-medium text-[#003b60]",children:s.title}),e.jsx(M,{"data-loc":"client/src/pages/Login.tsx:165",className:"text-slate-500 font-light text-sm",children:s.subtitle})]}),e.jsxs("form",{"data-loc":"client/src/pages/Login.tsx:168",onSubmit:N,children:[e.jsxs(B,{"data-loc":"client/src/pages/Login.tsx:169",className:"space-y-5",children:[p&&e.jsxs("div",{"data-loc":"client/src/pages/Login.tsx:171",className:"flex items-center gap-2 text-red-600 bg-red-50 border border-red-200 rounded-lg p-3 text-sm",children:[e.jsx(F,{"data-loc":"client/src/pages/Login.tsx:172",className:"h-4 w-4 shrink-0"}),e.jsx("span",{"data-loc":"client/src/pages/Login.tsx:173",children:p})]}),e.jsxs("div",{"data-loc":"client/src/pages/Login.tsx:177",className:"space-y-2.5",children:[e.jsx(u,{"data-loc":"client/src/pages/Login.tsx:178",htmlFor:"email",className:"text-slate-600 text-sm font-light",children:s.email}),e.jsx(h,{"data-loc":"client/src/pages/Login.tsx:179",id:"email",type:"email",placeholder:s.emailPlaceholder,value:n,onChange:a=>L(a.target.value),className:"bg-white border-slate-200 text-slate-800 placeholder:text-slate-400 focus:border-[#003b60] h-10",autoComplete:"email"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Login.tsx:190",className:"space-y-2.5",children:[e.jsx(u,{"data-loc":"client/src/pages/Login.tsx:191",htmlFor:"password",className:"text-slate-600 text-sm font-light",children:s.password}),e.jsxs("div",{"data-loc":"client/src/pages/Login.tsx:192",className:"relative",children:[e.jsx(h,{"data-loc":"client/src/pages/Login.tsx:193",id:"password",type:r?"text":"password",placeholder:"••••••••",value:i,onChange:a=>v(a.target.value),className:"bg-white border-slate-200 text-slate-800 placeholder:text-slate-400 focus:border-[#003b60] h-10 pr-10",autoComplete:"current-password"}),e.jsx("button",{"data-loc":"client/src/pages/Login.tsx:202",type:"button",onClick:()=>j(!r),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",tabIndex:-1,
1children:r?e.jsx(G,{"data-loc":"client/src/pages/Login.tsx:208",className:"h-4 w-4"}):e.jsx(V,{"data-loc":"client/src/pages/Login.tsx:208",className:"h-4 w-4"})})]})]})]}),e.jsxs(z,{"data-loc":"client/src/pages/Login.tsx:214",className:"flex flex-col gap-4 pt-2",children:[e.jsx(x,{"data-loc":"client/src/pages/Login.tsx:215",type:"submit",className:"w-full h-10 bg-[#003b60] hover:bg-[#004d7a] text-white font-light",disabled:g.isPending,children:g.isPending?e.jsxs("div",{"data-loc":"client/src/pages/Login.tsx:221",className:"flex items-center gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/Login.tsx:222",className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}),s.signingIn]}):e.jsxs("div",{"data-loc":"client/src/pages/Login.tsx:226",className:"flex items-center gap-2",children:[e.jsx(U,{"data-loc":"client/src/pages/Login.tsx:227",className:"h-4 w-4"}),s.signIn]})}),e.jsxs("div",{"data-loc":"client/src/pages/Login.tsx:233",className:"relative w-full",children:[e.jsx("div",{"data-loc":"client/src/pages/Login.tsx:234",className:"absolute inset-0 flex items-center",children:e.jsx("span",{"data-loc":"client/src/pages/Login.tsx:235",className:"w-full border-t border-gray-300"})}),e.jsx("div",{"data-loc":"client/src/pages/Login.tsx:237",className:"relative flex justify-center text-xs uppercase",children:e.jsx("span",{"data-loc":"client/src/pages/Login.tsx:238",className:"bg-white px-2 text-gray-500",children:s.or})})]}),e.jsxs(x,{"data-loc":"client/src/pages/Login.tsx:242",type:"button",variant:"outline",className:"w-full h-10 bg-white border-slate-200 text-slate-700 hover:bg-slate-50 font-light",onClick:C,children:[e.jsxs("svg",{"data-loc":"client/src/pages/Login.tsx:248",className:"h-5 w-5 mr-2",viewBox:"0 0 24 24",children:[e.jsx("path",{"data-loc":"client/src/pages/Login.tsx:249",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z",fill:"#4285F4"}),e.jsx("path",{"data-loc":"client/src/pages/Login.tsx:250",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),e.jsx("path",{"data-loc":"client/src/pages/Login.tsx:251",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),e.jsx("path",{"data-loc":"client/src/pages/Login.tsx:252",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]}),s.googleSignIn]}),e.jsx("div",{"data-loc":"client/src/pages/Login.tsx:257",className:"text-center",children:e.jsx(l,{"data-loc":"client/src/pages/Login.tsx:258",href:"/forgot-password",className:"text-sm text-slate-400 hover:text-slate-600 underline underline-offset-2 font-light",children:s.forgotPassword})}),e.jsxs("div",{"data-loc":"client/src/pages/Login.tsx:263",className:"text-center text-sm text-gray-500",children:[s.noAccount," ",e.jsx(l,{"data-loc":"client/src/pages/Login.tsx:265",href:"/signup",className:"text-[#003b60] hover:text-[#004d7a] font-medium underline underline-offset-2",children:s.createAccount})]}),e.jsx("div",{"data-loc":"client/src/pages/Login.tsx:270",className:"text-center",children:e.jsx(l,{"data-loc":"client/src/pages/Login.tsx:271",href:"/bhave",className:"text-xs text-slate-400 hover:text-slate-600 font-light",children:s.backHome})})]})]})]})]})})}export{Y 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.