PageSourceSearch

https://alumni.thekalyanischool.com/assets/AdminLoginPage-CLuNmabG.js

js thekalyanischool.com collected 2026-10-07 17:35:47 UTC 24,197 bytes, 20 lines download raw bytes

1import{r as t,j as e,dS as We,R as me,H as $e,aX as ye,a3 as Be,aF as Fe,aG as He,aH as ze,aE as Ge,W as Ke,ay as Ue}from"./react-vendor-DlGrPc5x.js";import{K as ie,u as Ve,f as qe,m as Je,L as pe,B as ee,I as je}from"./index-CvrLp2Ur.js";import"./radix-vendor-BQCqNqg0.js";import"./supabase-vendor-CZcnDBQt.js";import"./export-vendor-_y46A1Fc.js";import"./ui-vendor-B9WCiX-i.js";import"./socket-vendor-Ba-X_5Ya.js";var Xe=Object.defineProperty,Ye=Object.defineProperties,Ze=Object.getOwnPropertyDescriptors,oe=Object.getOwnPropertySymbols,Se=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,Ne=(n,a,r)=>a in n?Xe(n,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[a]=r,Qe=(n,a)=>{for(var r in a||(a={}))Se.call(a,r)&&Ne(n,r,a[r]);if(oe)for(var r of oe(a))Pe.call(a,r)&&Ne(n,r,a[r]);return n},et=(n,a)=>Ye(n,Ze(a)),tt=(n,a)=>{var r={};for(var d in n)Se.call(n,d)&&a.indexOf(d)<0&&(r[d]=n[d]);if(n!=null&&oe)for(var d of oe(n))a.indexOf(d)<0&&Pe.call(n,d)&&(r[d]=n[d]);return r};function at(n){let a=setTimeout(n,0),r=setTimeout(n,10),d=setTimeout(n,50);return[a,r,d]}function nt(n){let a=t.useRef();return t.useEffect(()=>{a.current=n}),a.current}var rt=18,ke=40,st=`${ke}px`,lt=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function it({containerRef:n,inputRef:a,pushPasswordManagerStrategy:r,isFocused:d}){let[P,u]=t.useState(!1),[g,k]=t.useState(!1),[I,H]=t.useState(!1),b=t.useMemo(()=>r==="none"?!1:(r==="increase-width"||r==="experimental-no-flickering")&&P&&g,[P,g,r]),v=t.useCallback(()=>{let x=n.current,E=a.current;if(!x||!E||I||r==="none")return;let y=x,o=y.getBoundingClientRect().left+y.offsetWidth,j=y.getBoundingClientRect().top+y.offsetHeight/2,c=o-rt,L=j;document.querySelectorAll(lt).length===0&&document.elementFromPoint(c,L)===x||(u(!0),H(!0))},[n,a,I,r]);return t.useEffect(()=>{let x=n.current;if(!x||r==="none")return;function E(){let o=window.innerWidth-x.getBoundingClientRect().right;k(o>=ke)}E();let y=setInterval(E,1e3);return()=>{clearInterval(y)}},[n,r]),t.useEffect(()=>{let x=d||document.activeElement===a.current;if(r==="none"||!x)return;let E=setTimeout(v,0),y=setTimeout(v,2e3),o=setTimeout(v,5e3),j=setTimeout(()=>{H(!0)},6e3);return()=>{clearTimeout(E),clearTimeout(y),clearTimeout(o),clearTimeout(j)}},[a,d,r,v]),{hasPWMBadge:P,willPushPWMBadge:b,PWM_BADGE_SPACE_WIDTH:st}}var Ee=t.createContext({}),Ce=t.forwardRef((n,a)=>{var r=n,{value:d,onChange:P,maxLength:u,textAlign:g="left",pattern:k,placeholder:I,inputMode:H="numeric",onComplete:b,pushPasswordManagerStrategy:v="increase-width",pasteTransformer:x,containerClassName:E,noScriptCSSFallback:y=ot,render:o,children:j}=r,c=tt(r,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),L,Y,ae,W,_;let[ne,re]=t.useState(typeof c.defaultValue=="string"?c.defaultValue:""),p=d??ne,M=nt(p),z=t.useCallback(s=>{P?.(s),re(s)},[P]),N=t.useMemo(()=>k?typeof k=="string"?new RegExp(k):k:null,[k]),h=t.useRef(null),i=t.useRef(null),f=t.useRef({value:p,onChange:z,isIOS:typeof window<"u"&&((Y=(L=window?.CSS)==null?void 0:L.supports)==null?void 0:Y.call(L,"-webkit-touch-callout","none"))}),S=t.useRef({prev:[(ae=h.current)==null?void 0:ae.selectionStart,(W=h.current)==null?void 0:W.selectionEnd,(_=h.current)==null?void 0:_.selectionDirection]});t.useImperativeHandle(a,()=>h.current,[]),t.useEffect(()=>{let s=h.current,l=i.current;if(!s||!l)return;f.current.value!==s.value&&f.current.onChange(s.value),S.current.prev=[s.selectionStart,s.selectionEnd,s.selectionDirection];function w(){if(document.activeElement!==s){Z(null),Q(null);return}let m=s.selectionStart,C=s.selectionEnd,le=s.selectionDirection,R=s.maxLength,K=s.value,D=S.current.prev,B=-1,F=-1,U;if(K.length!==0&&m!==null&&C!==null){let Me=m===C,De=m===K.length&&K.length<R;if(Me&&!De){let V=m;if(V===0)B=0,F=1,U="forward";else if(V===R)B=V-1,F=V,U="backward";else if(R>1&&K.length>1){let ue=0;if(D[0]!==null&&D[1]!==null){U=V<D[1]?"backward":"forward";let Le=D[0]===D[1]&&D[0]<R;U==="backward"&&!Le&&(ue=-1)}B=ue+V,F=ue+V+1}}
1B!==-1&&F!==-1&&B!==F&&h.current.setSelectionRange(B,F,U)}let be=B!==-1?B:m,we=F!==-1?F:C,_e=U??le;Z(be),Q(we),S.current.prev=[be,we,_e]}if(document.addEventListener("selectionchange",w,{capture:!0}),w(),document.activeElement===s&&ce(!0),!document.getElementById("input-otp-style")){let m=document.createElement("style");if(m.id="input-otp-style",document.head.appendChild(m),m.sheet){let C="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";te(m.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),te(m.sheet,`[data-input-otp]:autofill { ${C} }`),te(m.sheet,`[data-input-otp]:-webkit-autofill { ${C} }`),te(m.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),te(m.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let O=()=>{l&&l.style.setProperty("--root-height",`${s.clientHeight}px`)};O();let A=new ResizeObserver(O);return A.observe(s),()=>{document.removeEventListener("selectionchange",w,{capture:!0}),A.disconnect()}},[]);let[T,se]=t.useState(!1),[$,ce]=t.useState(!1),[G,Z]=t.useState(null),[J,Q]=t.useState(null);t.useEffect(()=>{at(()=>{var s,l,w,O;(s=h.current)==null||s.dispatchEvent(new Event("input"));let A=(l=h.current)==null?void 0:l.selectionStart,m=(w=h.current)==null?void 0:w.selectionEnd,C=(O=h.current)==null?void 0:O.selectionDirection;A!==null&&m!==null&&(Z(A),Q(m),S.current.prev=[A,m,C])})},[p,$]),t.useEffect(()=>{M!==void 0&&p!==M&&M.length<u&&p.length===u&&b?.(p)},[u,b,M,p]);let X=it({containerRef:i,inputRef:h,pushPasswordManagerStrategy:v,isFocused:$}),fe=t.useCallback(s=>{let l=s.currentTarget.value.slice(0,u);if(l.length>0&&N&&!N.test(l)){s.preventDefault();return}typeof M=="string"&&l.length<M.length&&document.dispatchEvent(new Event("selectionchange")),z(l)},[u,z,M,N]),xe=t.useCallback(()=>{var s;if(h.current){let l=Math.min(h.current.value.length,u-1),w=h.current.value.length;(s=h.current)==null||s.setSelectionRange(l,w),Z(l),Q(w)}ce(!0)},[u]),ge=t.useCallback(s=>{var l,w;let O=h.current;if(!x&&(!f.current.isIOS||!s.clipboardData||!O))return;let A=s.clipboardData.getData("text/plain"),m=x?x(A):A;s.preventDefault();let C=(l=h.current)==null?void 0:l.selectionStart,le=(w=h.current)==null?void 0:w.selectionEnd,R=(C!==le?p.slice(0,C)+m+p.slice(le):p.slice(0,C)+m+p.slice(C)).slice(0,u);if(R.length>0&&N&&!N.test(R))return;O.value=R,z(R);let K=Math.min(R.length,u-1),D=R.length;O.setSelectionRange(K,D),Z(K),Q(D)},[u,z,N,p]),Ae=t.useMemo(()=>({position:"relative",cursor:c.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[c.disabled]),ve=t.useMemo(()=>({position:"absolute",inset:0,width:X.willPushPWMBadge?`calc(100% + ${X.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:X.willPushPWMBadge?`inset(0 ${X.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:g,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[X.PWM_BADGE_SPACE_WIDTH,X.willPushPWMBadge,g]),Re=t.useMemo(()=>t.createElement("input",et(Qe({autoComplete:c.autoComplete||"one-time-code"},c),{"data-input-otp":!0,"data-input-otp-placeholder-shown":p.length===0||void 0,"data-input-otp-mss":G,"data-input-otp-mse":J,inputMode:H,pattern:N?.source,"aria-placeholder":I,style:ve,maxLength:u,value:p,ref:h,onPaste:s=>{var l;ge(s),(l=c.onPaste)==null||l.call(c,s)},onChange:fe,onMouseOver:s=>{var l;se(!0),(l=c.onMouseOver)==null||l.call(c,s)},onMouseLeave:s=>{var l;se(!1),(l=c.onMouseLeave)==null||l.call(c,s)},onFocus:s=>{var l;xe(),(l=c.onFocus)==null||l.call(c,s)},onBlur:s=>{var l;ce(!1),(l=c.onBlur)==null||l.call(c,s)}})),[fe,xe,ge,H,ve,u,J,G,c,N?.source,p]),de=t.useMemo(()=>({slots:Array.from({length:u}).map((s,l)=>{var w;let O=$&&G!==null&&J!==null&&(G===J&&l===G||l>=G&&l<J),A=p[l]!==void 0?p[l]:null,m=p[0]!==void 0?null:(w=I?.[l])!=null?w:null;return{char:A,placeholderChar:m,isActive:O,hasFakeCaret:O&&A===null}}),isFocused:$,isHovering:!c.disabled&&T}),[$,T,u,J,G,c.disabled,p]),Ie=t.useMemo(()=>o?o(de):t.createElement(Ee.Provider,{value:de},j),[j,de,o]);return t.createElement(t.Fragment,null,y!==null&&t.createElement("noscript",null,t.createElement("style",null,y)),t.createElement("div",{ref:i,"data-input-otp-container":!0,style:Ae,className:E},Ie,t.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},Re)))});Ce.displayName="Input";function te(n,a){try{n.insertRule(a)}catch{console.error("input-otp could not insert CSS rule:",a)}}var ot=`
2[data-input-otp] {
3  --nojs-bg: white !important;
4  --nojs-fg: black !important;
5
6  background-color: var(--nojs-bg) !important;
7  color: var(--nojs-fg) !important;
8  caret-color: var(--nojs-fg) !important;
9  letter-spacing: .25em !important;
10  text-align: center !important;
11  border: 1px solid var(--nojs-fg) !important;
12  border-radius: 4px !important;
13  width: 100% !important;
14}
15@media (prefers-color-scheme: dark) {
16  [data-input-otp] {
17    --nojs-bg: black !important;
18    --nojs-fg: white !important;
19  }
20}`;const Te=t.forwardRef(({className:n,containerClassName:a,...r},d)=>e.jsx(Ce,{ref:d,containerClassName:ie("flex items-center gap-2 has-[:disabled]:opacity-50",a),className:ie("disabled:cursor-not-allowed",n),...r}));Te.displayName="InputOTP";const Oe=t.forwardRef(({className:n,...a},r)=>e.jsx("div",{ref:r,className:ie("flex items-center",n),...a}
20));Oe.displayName="InputOTPGroup";const q=t.forwardRef(({index:n,className:a,...r},d)=>{const P=t.useContext(Ee),{char:u,hasFakeCaret:g,isActive:k}=P.slots[n];return e.jsxs("div",{ref:d,className:ie("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",k&&"z-10 ring-2 ring-ring ring-offset-background",a),...r,children:[u,g&&e.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:e.jsx("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});q.displayName="InputOTPSlot";const ct=t.forwardRef(({...n},a)=>e.jsx("div",{ref:a,role:"separator",...n,children:e.jsx(We,{})}));ct.displayName="InputOTPSeparator";function he(n){const[a,r]=n.split("@");return!a||!r?n:a.length<=2?`${a[0]||"*"}*@${r}`:`${a[0]}${"*".repeat(Math.max(a.length-2,1))}${a[a.length-1]}@${r}`}function dt(n){if(!n)return null;const a=new Date(n).getTime()-Date.now();if(a<=0)return"OTP expired";const r=Math.max(1,Math.ceil(a/6e4));return`Expires in about ${r} minute${r===1?"":"s"}`}const vt=()=>{const[n,a]=t.useState(""),[r,d]=t.useState(""),[P,u]=t.useState(""),[g,k]=t.useState(null),[I,H]=t.useState(!1),[b,v]=t.useState(!1),[x,E]=t.useState(0),[y,o]=t.useState(null),[,j]=Ve(),{adminUser:c,user:L,isAdministrator:Y,setAdminSession:ae}=qe(),{toast:W}=Je(),_=!!g;me.useEffect(()=>{document.title="Admin Login - TKS Alumni Portal"},[]),me.useEffect(()=>{c&&Y?j("/admin/dashboard"):L&&j("/feed")},[c,Y,L,j]),me.useEffect(()=>{if(x<=0)return;const i=window.setInterval(()=>{E(f=>f<=1?0:f-1)},1e3);return()=>window.clearInterval(i)},[x]);const ne=i=>{ae(i.user,i.token),W({title:"Admin login successful",description:`Welcome, ${i.user.username}`});const S=new URLSearchParams(window.location.search).get("redirect");S&&(se=>{try{const $=decodeURIComponent(se);return $.startsWith("/")&&!$.startsWith("//")}catch{return!1}})(S)?setTimeout(()=>j(decodeURIComponent(S)),500):setTimeout(()=>j("/admin/dashboard"),500)},re=async()=>{v(!0),o(null);const i=n.trim().toLowerCase();if(!i){o("Admin email is required"),v(!1);return}if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(i)){o("Please enter a valid admin email address"),v(!1);return}if(!r||r.trim()===""){o("Password is required"),v(!1);return}try{const S=await fetch("/api/auth/admin/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:i,password:r})}),T=await S.json();if(S.ok&&T.requiresOtp){u(""),k({challengeId:T.challengeId,email:T.email||i,expiresAt:T.expiresAt}),E(30),W({title:"OTP sent",description:`A verification code was sent to ${he(T.email||i)}`});return}if(S.ok&&T.user){ne(T);return}if(T.isNotAdmin){W({title:"Access Denied",description:"This portal is for administrators only.",variant:"destructive"}),setTimeout(()=>j("/login"),2e3);return}o("Invalid credentials")}catch(S){o(S.message||"An error occurred during login")}finally{v(!1)}},p=async()=>{if(g){if(v(!0),o(null),!/^\d{6}$/.test(P)){o("Please enter the 6-digit OTP"),v(!1);return}try{const i=await fetch("/api/auth/admin/verify-otp",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({challengeId:g.challengeId,otp:P})}),f=await i.json();if(i.ok&&f.user){ne(f);return}if(f.isNotAdmin){W({title:"Access Denied",description:"This portal is for administrators only.",variant:"destructive"}),setTimeout(()=>j("/login"),2e3);return}o(f.error||"Invalid OTP")}catch(i){o(i.message||"An error occurred while verifying OTP")}finally{v(!1)}}},M=()=>{u(""),k(null),E(0),o(null)},z=async()=>{if(!(!g||x>0||b)){v(!0),o(null);try{const i=await fetch("/api/auth/admin/resend-otp",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({challengeId:g.challengeId})}),f=await i.json();if(i.ok&&f.requiresOtp){u(""),k({challengeId:f.challengeId,email:f.email||g.email,expiresAt:f.expiresAt}),E(30),W({title:"OTP resent",description:`A new verification code was sent to ${he(f.email||g.email)}`});return}o(f.error||"Failed to resend OTP")}catch(i){o(i.message||"An error occurred while resending OTP")}finally{v(!1)}}},N=i=>{i.key==="Enter"&&(_?p():re())},h=dt(g?.expiresAt);return e.jsxs("div",{className:"flex h-screen w-full bg-white overflow-hidden",children:[e.jsxs("div",{className:"w-full lg:w-1/2 h-full overflow-y-auto overflow-x-hidden flex flex-col relative z-10 scrollbar-hide",children:[e.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(#e5e7eb_1px,transparent_1px)] [background-size:16px_16px] opacity-20 pointer-events-none"}),e.jsx("div",{className:"flex-1 flex items-center justify-center p-6 sm:p-8 md:p-12 lg:p-12 min-h-min",children:e.jsxs("div",{className:"w-full max-w-[420px] space-y-6 animate-fade-up",children:[e.jsxs("div",{className:"space-y-4 text-center",children:[e.jsxs("div",{className:"flex justify-between items-center mb-4",children:[e.jsx(pe,{href:"/",children:e.jsxs(ee,{variant:"ghost",size:"sm",className:"text-gray-500 hover:text-[#008060] font-bold flex items-center gap-2 group/home",children:[e.jsx($e,{className:"w-4 h-4 group-hover/home:-translate-x-1 transition-transform"}),"Home"]})}),e.jsx("div",{className:"h-px flex-1 bg-gradient-to-r from-transparent via-gray-100 to-transparent mx-4"})]}),e.jsx(pe,{href:"/",className:"inline-block group cursor-pointer",children:e.jsx("div",{className:"relative",children:e.jsx("img",{src:"/tks_logo.png",alt:"TKS Logo",className:"w-24 h-24 sm:w-32 sm:h-32 md:w-40 md:h-40 lg:w-48 lg:h-48 object-contain mx-auto group-hover:scale-105 transition-transform duration-300 drop-shadow-lg"})})}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-center gap-2",children:[e.jsx(ye,{className:"w-6 h-6 text-[#008060]"}),e.jsx("h1",{className:"text-2xl sm:text-3xl xl:text-4xl font-extrabold text-gray-900 tracking-tight text-balance",children:"Admin Portal"})]}),e.jsx("p",{className:"text-gray-500 text-sm sm:text-base xl:text-lg leading-relaxed max-w-sm mx-auto font-medium",children:_?"Enter the verification code sent to your admin email to complete sign-in.":"Secure gateway for administrators to manage the alumni network."})]})]}),e.jsxs("div",{className:"space-y-6",children:[_?e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"rounded-2xl border border-emerald-100 bg-emerald-50/70 p-4",children:[e.jsx("p",{className:"text-sm font-medium text-emerald-900",children:"Verification code sent to"}),e.jsx("p",{className:"mt-1 text-base font-bold text-emerald-950",children:he(g.email)}),h?e.jsx("p",{className:"mt-2 text-xs font-medium text-emerald-700",children:h}):null]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("label",{className:"text-base font-bold text-gray-800 flex items-center gap-2",children:[e.jsx(ye,{className:"w-5 h-5"}),"Enter OTP"]}),e.jsx("div",{className:"flex justify-center py-2",onKeyDown:N,children:e.jsx(Te,{maxLength:6,value:P,onChange:u,disabled:b,containerClassName:"justify-center",children:e.jsxs(Oe,{children:[e.jsx(q,{index:0}),e.jsx(q,{index:1}),e.jsx(q,{index:2}),e.jsx(q,{index:3}),e.jsx(q,{index:4}),e.jsx(q,{index:5})]})})}),e.jsx("p",{className:"text-xs text-gray-500 text-center",children:"Enter the 6-digit code from your email to continue."}),e.jsx("div",{className:"text-center",children:e.jsx(ee,{type:"button",variant:"ghost",className:"text-sm font-semibold text-[#008060] hover:text-[#006b51] hover:bg-green-50",onClick:z,disabled:b||x>0,children:x>0?`Resend OTP in ${x}s`:"Resend OTP"})})]})]}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2 group",children:[e.jsxs("label",{className:"text-base font-bold text-gray-800 flex items-center gap-2 transition-colors group-focus-within:text-[#008060]",children:[e.jsx(Be,{className:"w-5 h-5"}),"Admin Email"]}),e.jsxs("div",{className:"relative",children:[e.jsx(je,{type:"email",placeholder:"[email protected]",value:n,onChange:i=>a(i.target.value),onKeyDown:N,className:"peer w-full pl-4 pr-4 py-6 border-gray-200 rounded-xl focus:ring-4 focus:ring-[#008060]/10 focus:border-[#008060] transition-all bg-white font-medium",disabled:b}),e.jsx("div",{className:"absolute inset-0 rounded-xl border-2 border-transparent peer-focus:border-[#008060]/10 pointer-events-none"})]})]}),e.jsxs("div",{className:"space-y-2 group",children:[e.jsxs("label",{className:"text-base font-bold text-gray-800 flex items-center gap-2 transition-colors group-focus-within:text-[#008060]",children:[e.jsx(Fe,{className:"w-5 h-5"}),"Password"]}),e.jsxs("div",{className:"relative",children:[e.jsx(je,{type:I?"text":"password",placeholder:"Enter admin password",value:r,onChange:i=>d(i.target.value),onKeyDown:N,className:"w-full pl-4 pr-12 py-6 border-gray-200 rounded-xl focus:ring-4 focus:ring-[#008060]/10 focus:border-[#008060] transition-all bg-white font-medium",disabled:b}),e.jsx("button",{type:"button",onClick:()=>H(!I),className:"absolute right-4 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-[#008060] p-1 rounded-md hover:bg-gray-50 transition-colors",disabled:b,children:I?e.jsx(He,{className:"w-5 h-5"}):e.jsx(ze,{className:"w-5 h-5"})})]})]})]}),y&&e.jsxs("div",{className:"p-4 rounded-xl bg-red-50 border border-red-100 flex items-start gap-3 animate-shake",children:[e.jsx("div",{className:"bg-red-100 p-1 rounded-full text-red-600 mt-0.5",children:e.jsx(Ge,{className:"w-3 h-3"})}),e.jsx("p",{className:"text-sm font-medium text-red-600 leading-snug",children:y})]}),e.jsxs("div",{className:"space-y-4 pt-2",children:[e.jsxs(ee,{className:"w-full bg-gradient-to-r from-[#008060] to-[#006b51] hover:from-[#006b51] hover:to-[#005d47] text-white py-6 rounded-xl font-bold text-lg shadow-lg shadow-green-900/10 hover:shadow-xl hover:shadow-green-900/20 active:scale-[0.98] transition-all relative overflow-hidden group",onClick:_?p:re,disabled:b,children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-white/20 to-transparent translate-x-[-200%] group-hover:translate-x-[200%] transition-transform duration-1000"}),b?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ke,{className:"w-5 h-5 animate-spin"}),e.jsx("span",{children:_?"Verifying OTP...":"Checking Credentials..."})]}):e.jsxs("span",{className:"flex items-center gap-2",children:[_?"Verify And Continue":"Send OTP",e.jsx(Ue,{className:"w-5 h-5 group-hover:translate-x-1 transition-transform"})]})]}),_?e.jsx(ee,{variant:"outline",className:"w-full py-4 rounded-xl font-semibold",onClick:M,disabled:b,children:"Back to Credentials"}):null,e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("span",{className:"w-full border-t border-gray-200"})}),e.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:e.jsx("span",{className:"bg-white px-2 text-gray-500 font-medium tracking-wider",children:"User Acce
20ss"})})]}),e.jsx(pe,{href:"/login",children:e.jsx(ee,{variant:"ghost",className:"w-full text-gray-500 hover:text-[#008060] hover:bg-green-50 py-4 rounded-xl font-semibold transition-all",children:"Go to User Login"})})]})]}),e.jsxs("p",{className:"text-center text-xs text-gray-400 mt-8",children:["© ",new Date().getFullYear()," The Kalyani School. All rights reserved."]})]})})]}),e.jsxs("div",{className:"hidden lg:flex lg:w-1/2 h-full relative overflow-hidden bg-[#001a14] flex-col justify-end",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/90 via-black/45 to-black/20 z-10"}),e.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_20%_20%,rgba(16,185,129,0.22),transparent_42%),radial-gradient(circle_at_80%_30%,rgba(166,206,57,0.18),transparent_40%)] z-10"}),e.jsx("div",{className:"absolute inset-0 z-0 animate-ken-burns",children:e.jsx("img",{src:"/auth_hero_students.png",alt:"Alumni Community",className:"w-full h-full object-cover"})}),e.jsx("div",{className:"relative z-20 w-full p-8 xl:p-12 animate-fade-up",children:e.jsxs("div",{className:"relative max-w-md group",children:[e.jsx("div",{className:"absolute -inset-1 bg-gradient-to-r from-[#008060] via-[#a6ce39] to-[#008060] rounded-3xl blur-xl opacity-20 group-hover:opacity-40 transition-all duration-700 animate-gradient-shift"}),e.jsxs("div",{className:"relative p-6 xl:p-8 rounded-3xl bg-black/45 backdrop-blur-xl border border-white/30 overflow-hidden shadow-[0_20px_60px_rgba(0,0,0,0.55)]",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-white/10 via-trans
20parent to-black/20"}),e.jsxs("div",{className:"relative space-y-5",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-0.5 w-6 bg-gradient-to-r from-[#008060] to-[#a6ce39]"}),e.jsx("span",{className:"px-2 py-1 rounded-full bg-black/35 border border-white/20 text-[11px] font-black uppercase tracking-[0.25em] text-emerald-100",children:"Legacy & Tradition"})]}),e.jsx("p",{className:"text-xl xl:text-2xl font-semibold text-white leading-relaxed italic tracking-tight drop-shadow-[0_3px_10px_rgba(0,0,0,0.75)]",children:'"Reconnect with the mentors who guided you, the friends who stood by you, and the school that shaped you."'}),e.jsxs("div",{className:"flex items-center gap-4 pt-5 border-t border-white/20",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute -inset-1 bg-gradient-to-br from-[#008060] to-[#a6ce39] rounded-xl blur-sm opacity-50"}),e.jsx("div",{className:"relative w-10 h-10 bg-gray-900 rounded-xl flex items-center justify-center font-black text-[#a6ce39] text-sm border border-white/10",children:"TKS"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-base font-black tracking-tight text-white drop-shadow-[0_2px_6px_rgba(0,0,0,0.6)]",children:"The Kalyani School"}),e.jsx("p",{className:"text-[11px] font-bold text-emerald-200 uppercase tracking-[0.25em]",children:"Official Alumni Network"})]})]})]})]})]})})]})]})};export{vt as AdminLoginPage};

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.