1import{j as e}from"./query-CkjDa6TK.js";import{a as L,L as m,u as G,i as q}from"./react-DkkCGPT4.js";import{u as I}from"./forms-xixe_uvK.js";import{t as T}from"./zod-DredRF7j.js";import{l as B,c as W}from"./schemas-CRDiQrcx.js";import{B as O}from"./enums-Bzm1wqjc.js";import{p as i,I as l,q as x,r as D,s as S,t as Y,A as v,o as F,v as _,f as A,w as U,e as V,x as $,y as z,z as J,S as Q,E as K,J as X}from"./index-BYV5a2iT.js";const ee=["One dashboard for members, billing, attendance, classes & PT","WhatsApp renewal reminders & win-backs on autopilot","Razorpay / Stripe / Cashfree payments with GST invoices","Live occupancy with QR, RFID, face & turnstile check-in","A free, editable landing page for every branch","Multi-branch views with role-based access"];function h({title:t,subtitle:a,children:n}){return e.jsxs("div",{className:"grid min-h-screen lg:grid-cols-2 bg-background transition-colors duration-200",children:[e.jsx(Q,{title:t,noIndex:!0}),e.jsxs("div",{className:"relative hidden flex-col justify-between overflow-hidden bg-sidebar p-12 text-sidebar-foreground lg:flex",children:[e.jsx("div",{className:"grid-bg absolute inset-0 opacity-40"}),e.jsxs("div",{className:"relative flex items-center gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-xl bg-white/10 text-white shadow-sm border border-white/15",children:e.jsxs("svg",{viewBox:"0 0 40 38",width:"22",height:"21",fill:"currentColor","aria-hidden":"true",children:[e.jsx("rect",{width:"40",height:"38",rx:"8",fill:"
1currentColor",fillOpacity:"0.12"}),e.jsx("path",{d:"M18 7H22V31H18Z M22 17H26V21H22Z M14 17H18V21H14Z M26 12H30V17H26Z M10 12H14V17H10Z M26 21H30V26H26Z M10 21H14V26H10Z"})]})}),e.jsx("span",{className:"font-display text-2xl font-bold tracking-tight text-white",children:"GymLoop"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"inline-flex rounded-full border border-white/15 bg-white/5 px-3 py-1 font-mono text-[10px] uppercase tracking-wider text-white/90",children:"The all-in-one gym operating system"}),e.jsxs("h1",{className:"mt-5 font-display text-4xl font-extrabold leading-tight tracking-tight text-white",children:["Everything you need to run â and ",e.jsx("span",{className:"font-serif italic font-normal text-[#c3d3ce]",children:"grow"})," â your gym."]}),e.jsx("p",{className:"mt-4 max-w-md text-sidebar-muted text-sm leading-relaxed",children:"Memberships, attendance, payments, classes, trainers and member engagement in one place. Replace the spreadsheets and the five disconnected apps."}),e.jsx("ul",{className:"mt-8 space-y-2.5",children:ee.map(d=>e.jsxs("li",{className:"flex items-center gap-2.5 text-sm text-sidebar-foreground/90",children:[e.jsx(K,{className:"h-4 w-4 shrink-0 text-[#3c8a52]"})," ",d]},d))}),e.jsx("p",{className:"mt-8 border-t border-white/10 pt-5 font-mono text-[11px] text-sidebar-muted",children:"Secure, role-based access for every member of your team."})]}),e.jsxs("p",{className:"relative font-mono text-[11px] text-sidebar-muted",children:["© ",new Date().getFullYear()," GymLoop. All rights reserved."]})]}),e.jsx("div",{className:"flex items-center justify-center p-6 sm:p-12",children:e.jsxs("div",{className:"w-full max-w-md card-surface p-6 sm:p-8 shadow-xs border border-border/80",children:[e.jsxs("div",{className:"mb-6 flex items-center gap-2.5 lg:hidden",children:[e.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-xl bg-foreground text-background shadow-sm",children:e.jsxs("svg",{viewBox:"0 0 40 38",width:"20",height:"19",fill:"currentColor","aria-hidden":"true",children:[e.jsx("rect",{width:"40",height:"38",rx:"8",fill:"
1currentColor",fillOpacity:"0.12"}),e.jsx("path",{d:"M18 7H22V31H18Z M22 17H26V21H22Z M14 17H18V21H14Z M26 12H30V17H26Z M10 12H14V17H10Z M26 21H30V26H26Z M10 21H14V26H10Z"})]})}),e.jsx("span",{className:"font-display text-xl font-bold tracking-tight",children:"GymLoop"})]}),e.jsx("h2",{className:"font-display text-2xl font-bold tracking-tight",children:t}),a&&e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:a}),e.jsx("div",{className:"mt-6",children:n})]})})]})}function oe(){var y,r;const{actions:t}=D(),a=S(),n=G(),d=Y(),{register:u,handleSubmit:g,formState:{errors:b,isSubmitting:f}}=I({resolver:T(B),defaultValues:{email:"",password:""}}),N=({email:w,password:c})=>{d.mutate({email:w,password:c},{onSuccess:o=>{var j;t.setLiveSession(o),a.success("Signed in",`${o.user.name} · ${o.organisation.name}`);const p=o.user.role==="member"?"/portal":o.user.role==="super_admin"?"/admin":((j=o.organisation)==null?void 0:j.onboardingComplete)===!1?"/onboarding":"/app";n(p)},onError:o=>{const p=o;a.error("Login failed",p.status===0?`API unreachable at ${X}`:p.message)}})};return e.jsxs(h,{title:"Welcome back",subtitle:"Sign in to your GymLoop workspace.",children:[e.jsxs("form",{onSubmit:g(N),className:"space-y-4",children:[e.jsx(i,{label:"Email",error:(y=b.email)==null?void 0:y.message,children:e.jsx(l,{type:"email",placeholder:"[email protected]",...u("email")})}),e.jsx(i,{label:"Password",error:(r=b.password)==null?void 0:r.message,children:e.jsx(l,{type:"password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",...u("password")})}),e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsxs("label",{className:"flex items-center gap-2 text-muted-foreground",children:[e.jsx("input",{type:"checkbox",defaultChecked:!0,className:"rounded border-input"})," Remember me"]}),e.jsx(m,{to:"/forgot",className:"text-primary hover:underline",children:"Forgot password?"})]}),e.jsxs(x,{type:"submit",className:"w-full",loading:f||d.isPending,children:["Sign in ",e.jsx(v,{className:"h-4 w-4"})]})]}),e.jsxs("div",{className:"mt-8 border-t border-border pt-6 text-center text-sm text-muted-foreground",children:[e.jsx("p",{children:"Own a fitness center or gym?"}),e.jsxs(m,{to:"/",className:"mt-1.5 inline-flex items-center gap-1.5 font-medium text-primary hover:underline",children:[e.jsx(F,{className:"h-3.5 w-3.5"})," Find & claim your gym in our directory"]})]})]})}function de(){var j,k,C,H,P,E,M;const[t]=q(),a=S(),n=t.get("placeId")||"",d=t.get("claimName")||"",u=t.get("city")||"",g=t.get("address")||"",b=!!(n||d),[f,N]=L.useState(null),y=_(),{register:r,handleSubmit:w,formState:{errors:c,isSubmitting:o}}=I({resolver:T(W),defaultValues:{placeId:n||`custom_${Date.now()}`,gymName:d||"",gymCity:u,gymAddress:g,businessType:"gym",applicantName:"",applicantEmail:"",applicantPhone:"",password:"",confirm:"",proofNotes:""}}),p=s=>{y.mutate({placeId:s.placeId,gymName:s.gymName,gymAddress:s.gymAddress,gymCity:s.gymCity,gymPhone:s.gymPhone,gymWebsite:s.gymWebsite,applicantName:s.applicantName,applicantEmail:s.applicantEmail,applicantPhone:s.applicantPhone,password:s.password,businessType:s.businessType,proofNotes:s.proofNotes},{onSuccess:()=>{N({gymName:s.gymName,email:s.applicantEmail}),a.success("Claim request submitted",`We are reviewing your verification for ${s.gymName}.`)},onError:R=>{const Z=R;a.error("Claim submission failed",Z.message||"Could not submit claim request")}})};return f?e.jsx(h,{title:"Verification Under Review",children:e.jsxs("div",{className:"space-y-6 text-center",children:[e.jsx("div",{className:"mx-auto flex h-16 w-16 items-center justify-center rounded-2xl bg-emerald-500/10 text-emerald-600 dark:bg-emerald-500/20 dark:text-emerald-400",children:e.jsx(A,{className:"h-8 w-8"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-display text-xl font-bold text-foreground",children:"Claim Request Received!"}),e.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:["We have received your verification claim for ",e.jsx("strong",{className:"text-foreground",children:f.gymName}),"."]})]}),e.jsxs("div",{className:"rounded-xl border border-border/80 bg-muted/40 p-4 text-left text-xs text-muted-foreground space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2 font-medium text-foreground",children:[e.jsx(U,{className:"h-4 w-4 text-amber-500"}),e.jsx("span",{children:"What happens next?"})]}),e.jsx("p",{children:"To protect gym owners and brand integrity, our administration team reviews all claim submissions."}),e.jsxs("p",{children:["Once approved, your account will be activated and you can sign in directly with ",e.jsx("strong",{className:"text-foreground",children:f.email}),"."]})]}),e.jsxs("div",{className:"space-y-2.5 pt-2",children:[e.jsx(m,{to:"/login",className:"block w-full",children:e.jsxs(x,{className:"w-full",children:["Go to Sign in ",e.jsx(v,{className:"h-4 w-4"})]})}),e.jsx(m,{to:"/",className:"block w-full",children:e.jsx(x,{variant:"outline",className:"w-full",children:"Back to Gym Directory"})})]})]})}):b?e.jsxs(h,{title:"Claim Your Gym",subtitle:"Verify your ownership details to access this gym workspace.",children:[e.jsxs("form",{onSubmit:w(p
1),className:"space-y-4",children:[e.jsx("div",{className:"rounded-xl border border-border/80 bg-muted/30 p-3.5",children:e.jsxs("div",{className:"flex items-start gap-2.5",children:[e.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary font-bold text-sm",children:e.jsx(V,{className:"h-5 w-5"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{className:"text-xs font-semibold text-primary uppercase tracking-wider",children:"Claiming Facility"})}),e.jsx("h4",{className:"truncate font-semibold text-sm text-foreground",children:d||"Your Fitness Center"}),(g||u)&&e.jsxs("p",{className:"truncate text-xs text-muted-foreground flex items-center gap-1 mt-0.5",children:[e.jsx($,{className:"h-3 w-3 shrink-0"})," ",g||u]})]})]})}),e.jsx("input",{type:"hidden",...r("placeId")}),e.jsx("input",{type:"hidden",...r("gymName")}),e.jsx("input",{type:"hidden",...r("gymCity")}),e.jsx("input",{type:"hidden",...r("gymAddress")}),e.jsx(i,{label:"Your Full Name",required:!0,error:(j=c.applicantName)==null?void 0:j.message,children:e.jsx(l,{...r("applicantName"),placeholder:"e.g. Rahul Sharma"})}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.jsx(i,{label:"Work Email",required:!0,error:(k=c.applicantEmail)==null?void 0:k.message,children:e.jsx(l,{type:"email",...r("applicantEmail"),placeholder:"[email protected]"})}),e.jsx(i,{label:"Phone / WhatsApp",required:!0,error:(C=c.applicantPhone)==null?void 0:C.message,children:e.jsx(l,{type:"tel",...r("applicantPhone"),placeholder:"+91 98765 43210"})})]}),e.jsx(i,{label:"Business Type",error:(H=c.businessType)==null?void 0:H.message,children:e.jsx(z,{...r("businessType"),children:O.map(s=>e.jsx("option",{value:s,children:J(s)},s))})}),e.jsx(i,{label:"Ownership / Verification Notes (Optional)",error:(P=c.proofNotes)==null?void 0:P.message,children:e.jsx(l,{...r("proofNotes"),placeholder:"e.g. Founder & Managing Director"})}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.jsx(i,{label:"Create Password",required:!0,error:(E=c.password)==null?void 0:E.message,children:e.jsx(l,{type:"password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",...r("password")})}),e.jsx(i,{label:"Confirm Password",required:!0,error:(M=c.confirm)==null?void 0:M.message,children:e.jsx(l,{type:"password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",...r("confirm")})})]}),e.jsxs("div",{className:"rounded-lg bg-amber-500/10 border border-amber-500/20 p-2.5 text-xs text-amber-700 dark:text-amber-300 flex items-start gap-2",children:[e.jsx(A,{className:"h-4 w-4 shrink-0 mt-0.5"}),e.jsx("span",{children:"Upon submission, Super Admin will review and approve your gym listing before granting full dashboard access."})]}),e.jsxs(x,{type:"submit",className:"w-full",loading:o||y.isPending,children:["Submit Claim for Approval ",e.jsx(v,{className:"h-4 w-4"})]})]}),e.jsxs("p",{className:"mt-6 text-center text-sm text-muted-foreground",children:["Already have an account? ",e.jsx(m,{to:"/login",className:"font-medium text-primary hover:underline",children:"Sign in"})]})]}):e.jsx(h,{title:"Claim & Verify Your Gym",subtitle:"GymLoop onboards verified gyms and fitness studios.",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"rounded-2xl border border-primary/20 bg-primary/5 p-5 text-center",children:[e.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-primary/10 text-primary mb-3",children:e.jsx(V,{className:"h-6 w-6"})}),e.jsx("h3",{className:"font-display text-lg font-bold text-foreground",children:"Find Your Gym Listing"}),e.jsxs("p",{className:"mt-1.5 text-xs text-muted-foreground",children:["To keep our fitness directory secure, registrations are connected to existing gym listings. Search for your gym in our public directory and click ",e.jsx("strong",{children:"Claim this Gym"})," to request ownership."]}),e.jsx(m,{to:"/",className:"mt-4 inline-block w-full",children:e.jsxs(x,{size:"lg",className:"w-full gap-2 shadow-md",children:[e.jsx(F,{className:"h-4 w-4"})," Find & Claim My Gym"]})})]}),e.jsxs("div",{className:"border-t border-border pt-4 text-center text-sm text-muted-foreground",children:[e.jsx("p",{children:"Already have an approved account?"}),e.jsx(m,{to:"/login",className:"mt-1 font-medium text-primary hover:underline inline-block",children:"Sign in to your workspace"})]})]})})}function ce(){const[t,a]=L.useState(!1);return e.jsx(h,{title:"Reset password",subtitle:"Weâll email you a reset link.",children:t?e.jsxs("div",{className:"rounded-lg border border-success/30 bg-success/10 p-4 text-sm text-success",children:["If an account exists, a reset link is on its way. ",e.jsx(m,{to:"/login",className:"font-medium underline",children:"Back to sign in"})]}):e.jsxs("form",{onSubmit:n=>{n.preventDefault(),a(!0)},className:"space-y-4",children:[e.jsx(i,{label:"Email",children:e.jsx(l,{type:"email",required:!0,placeholder:"[email protected]"})}),e.jsx(x,{type:"submit",className:"w-full",children:"Send reset link"}),e.jsx("p",{className:"text-center text-sm text-muted-foreground",children:e.jsx(m,{to:"/login",className:"text-primary hover:underline",children:"Back to sign in"})})]})})}function me(){const t=G(),a=S();
1return e.jsx(h,{title:"Choose a new password",children:e.jsxs("form",{onSubmit:n=>{n.preventDefault(),a.success("Password updated"),t("/login")},className:"space-y-4",children:[e.jsx(i,{label:"New password",children:e.jsx(l,{type:"password",required:!0})}),e.jsx(i,{label:"Confirm password",children:e.jsx(l,{type:"password",required:!0})}),e.jsx(x,{type:"submit",className:"w-full",children:"Update password"})]})})}export{ce as Forgot,oe as Login,me as ResetPassword,de as Signup};
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.