PageSourceSearch

https://tracktrip.app/assets/request-password-reset-BuhAyp8z.js

js tracktrip.app collected 2026-10-02 01:15:30 UTC 2,313 bytes, 1 lines download raw bytes

1import{d as x,r as l,z as n,j as e,B as f,L as p,a as h}from"./index-BhunPy9K.js";import{u as j,a as g}from"./zod-D4Rm9sI3.js";import{F as w,a as b,b as y,c as N,d as v,e as S}from"./form-BOif5l8z.js";import{I as F}from"./input-CdOpmqsG.js";import{A as E}from"./index-DdrlFAox.js";import{m}from"./proxy-DwUizOUz.js";import{L}from"./loader-circle-Ceoeg3oU.js";import"./index-Dn5mlcTf.js";const R=n.object({email:n.string("Email is required.").min(1,"Email is required.")});function D(){const{redirect:c}=x.useSearch(),[a,d]=l.useState(!1),s=j({resolver:g(R),defaultValues:{}}),[r,o]=l.useState(!1),u=async({email:t})=>{o(!0);const{error:i}=await h.requestPasswordReset({email:t,redirectTo:window.location.origin+"/reset-password"});i?s.setError("email",{message:i.message}):d(!0),o(!1)};return e.jsx("div",{className:"bg-background dark h-full w-full flex items-center justify-center",children:e.jsxs("div",{className:"p-6 flex flex-col justify-center gap-6 h-full max-w-lg w-full",children:[e.jsxs("div",{children:[e.jsx("div",{className:"size-6 rounded-full bg-white mb-2"}),e.jsx("h1",{className:"text-lg font-semibold mt-3 text-foreground",children:"Reset your password"}),e.jsx("div",{className:"text-sm text-muted-foreground mt-1",children:"Please enter your email address to request a password reset."})]}),e.jsxs(E,{mode:"wait",children:[!a&&e.jsx(m.div,{exit:{opacity:0},children:e.jsx(w,{...s,children:e.jsxs("form",{onSubmit:s.handleSubmit(u),className:"space-y-5",children:[e.jsx(b,{control:s.control,name:"email",render:({field:t})=>e.jsxs(y,{className:"flex-1",children:[e.jsx(N,{children:"Email"}),e.jsx(v,{children:e.jsx(F,{...t,autoComplete:"email"})}),e.jsx(S,{})]})}),e.jsx(f,{type:"submit",className:"w-full",disabled:r,children:r?e.jsx(L,{className:"ml-2 h-4 w-4 animate-spin"}):"Request password reset"}),e.jsxs("div",{className:"text-center text-sm text-muted-foreground",children:["Don't have an account?"," ",e.jsx(p,{to:"/signup",className:"underline underline-offset-4",search:{redirect:c},children:"Sign up"})]})]})})},"form"),a&&e.jsx(m.div,{initial:{opacity:0}
1,animate:{opacity:1},className:"space-y-4 border-t pt-4",children:e.jsx("div",{className:"text-foreground",children:"We sent you an email with a link to reset your password."})},"email-sent")]})]})})}export{D as component};

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.