PageSourceSearch

https://lamson.edu/assets/LoginPage-u8OXdEo5.js

js lamson.edu collected 2026-09-25 07:07:18 UTC 3,171 bytes, 1 lines download raw bytes

1import{r as h,j as e,o as g,h as n}from"./index-BinSfoJg.js";import{u as f,t as j}from"./zod-BrxazjNt.js";import{aD as w,l as N,h as b,k as v,L as y}from"./programViewCoordinator-CKg7JmY4.js";import{I as l}from"./input-DaU7_KQK.js";import{L as c}from"./label-BwGi8lLD.js";import{u as L,j as r}from"./App-Dx9WvKkn.js";import{S}from"./SEOHead-BjpWutrU.js";import{L as I}from"./lock-DsZz10u-.js";import"./advertisingWithdrawal-F3XtIN-t.js";import"./crypto-CfNV062i.js";import"./analyticsWithdrawal-CTKNH4XT.js";import"./index-DqqwdXwG.js";import"./toaster-CpdaKNwr.js";import"./dialog-D0KpCY4S.js";import"./MarketingTrackers-D2fmrlXk.js";const k=N.url,A=g({email:n().email("Please enter a valid email"),password:n().min(6,"Password must be at least 6 characters")});function M(){const[t,i]=h.useState(!1),{signIn:d}=L(),x=w(),{register:o,handleSubmit:p,formState:{errors:s}}=f({resolver:j(A)}),u=async m=>{i(!0);try{const{error:a}=await d(m.email,m.password);if(a){a.message.includes("Invalid login")?r.error("Invalid email or password"):r.error(a.message);return}r.success("Logged in successfully"),x("/admin")}catch{r.error("An unexpected error occurred")}finally{i(!1)}};return e.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-muted p-4",children:[e.jsx(S,{title:"Admin Login | Lamson",description:"Lamson Institute admin sign-in.",noIndex:!0}),e.jsx("div",{className:"w-full max-w-md",children:e.jsxs("div",{className:"bg-background rounded-2xl shadow-brand-xl p-8",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("img",{src:k,alt:"Lamson",className:"h-16 mx-auto mb-6"}),e.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-4",children:e.jsx(I,{className:"w-6 h-6 text-primary"})}),e.jsx("h1",{className:"text-2xl font-heading font-bold text-foreground",children:"Admin Login"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"Sign in to access the admin dashboard"})]}),e.jsxs("form",{onSubmit:p(u),className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"email",children:"Email"}),e.jsx(l,{...o("email"),type:"email",placeholder:"[email protected]",autoComplete:"email"}),s.email&&e.jsx("p",{className:"text-sm text-destructive",children:s.email.message})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"password",children:"Password"}),e.jsx(l,{...o("password"),type:"password",placeholder:"••••••••",autoComplete:"current-password"}),s.password&&e.jsx("p",{className:"text-sm text-destructive",children:s.password.message})]}),e.jsx(b,{type:"submit",className:"w-full",disabled:t,children:t?e.jsxs(e.Fragment,{children:[e.jsx(v,{className:"w-4 h-4 animate-spin mr-2"}),"Signing in..."]}):"Sign In"}),e.jsx("div",{className:"text-center",children:e.jsx(y,{to:"/admin/forgot-password",className:"text-sm text-primary hover:underline",children:"Forgot password?"})})]}),e.jsx("div",{className:"mt-6 text-center",children:e.jsx("a",{href:"/",className:"text-sm text-muted-foreground hover:text-primary transition-colors",children:"← Back to website"})})]})})]})}export{M 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.