(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7940],{64090:(e,t,s)=>{"use strict";let r,a;s.d(t,{l$:()=>ee,Ay:()=>et,oR:()=>I});var i,o=s(12115);let l={data:""},n=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,d=/\/\*[^]*?\*\/|  +/g,c=/\n+/g,m=(e,t)=>{let s="",r="",a="";for(let i in e){let o=e[i];"@"==i[0]?"i"==i[1]?s=i+" "+o+";":r+="f"==i[1]?m(o,i):i+"{"+m(o,"k"==i[1]?"":t)+"}":"object"==typeof o?r+=m(o,t?t.replace(/([^,])+/g,e=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):i):null!=o&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=m.p?m.p(i,o):i+":"+o+";")}return s+(t&&a?t+"{"+a+"}":a)+r},u={},p=e=>{if("object"==typeof e){let t="";for(let s in e)t+=s+p(e[s]);return t}return e};function f(e){let t,s,r=this||{},a=e.call?e(r.p):e;return((e,t,s,r,a)=>{var i;let o=p(e),l=u[o]||(u[o]=(e=>{let t=0,s=11;for(;t<e.length;)s=101*s+e.charCodeAt(t++)>>>0;return"go"+s})(o));if(!u[l]){let t=o!==e?e:(e=>{let t,s,r=[{}];for(;t=n.exec(e.replace(d,""));)t[4]?r.shift():t[3]?(s=t[3].replace(c," ").trim(),r.unshift(r[0][s]=r[0][s]||{})):r[0][t[1]]=t[2].replace(c," ").trim();return r[0]})(e);u[l]=m(a?{["@keyframes "+l]:t}:t,s?"":"."+l)}let f=s&&u.g?u.g:null;return s&&(u.g=u[l]),i=u[l],f?t.data=t.data.replace(f,i):-1===t.data.indexOf(i)&&(t.data=r?i+t.data:t.data+i),l})(a.unshift?a.raw?(t=[].slice.call(arguments,1),s=r.p,a.reduce((e,r,a)=>{let i=t[a];if(i&&i.call){let e=i(s),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;i=t?"."+t:e&&"object"==typeof e?e.props?"":m(e,""):!1===e?"":e}return e+r+(null==i?"":i)},"")):a.reduce((e,t)=>Object.assign(e,t&&t.call?t(r.p):t),{}):a,(e=>{if("object"==typeof window){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||l})(r.target),r.g,r.o,r.k)}f.bind({g:1});let g,h,x,b=f.bind({k:1});function y(e,t){let s=this||{};return function(){let r=arguments;function a(i,o){let l=Object.assign({},i),n=l.className||a.className;s.p=Object.assign({theme:h&&h()},l),s.o=/ *go\d+/.test(n),l.className=f.apply(s,r)+(n?" "+n:""),t&&(l.ref=o);let d=e;return e[0]&&(d=l.as||e,delete l.as),x&&d[0]&&x(l),g(d,l)}return t?t(a):a}}var v=(e,t)=>"function"==typeof e?e(t):e,w=(r=0,()=>(++r).toString()),j=()=>{if(void 0===a&&"u">typeof window){let e=matchMedia("(prefers-reduced-motion: reduce)");a=!e||e.matches}return a},N="default",k=(e,t)=>{let{toastLimit:s}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,s)};case 1:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case 2:let{toast:r}=t;return k(e,{type:+!!e.toasts.find(e=>e.id===r.id),toast:r});case 3:let{toastId:a}=t;return{...e,toasts:e.toasts.map(e=>e.id===a||void 0===a?{...e,dismissed:!0,visible:!1}:e)};case 4:return void 0===t.toastId?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(e=>({...e,pauseDuration:e.pauseDuration+i}))}}},E=[],$={toasts:[],pausedAt:void 0,settings:{toastLimit:20}},C={},A=(e,t=N)=>{C[t]=k(C[t]||$,e),E.forEach(([e,s])=>{e===t&&s(C[t])})},O=e=>Object.keys(C).forEach(t=>A(e,t)),D=(e=N)=>t=>{A(t,e)},_={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},P=e=>(t,s)=>{let r,a=((e,t="blank",s)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...s,id:(null==s?void 0:s.id)||w()}))(t,e,s);return D(a.toasterId||(r=a.id,Object.keys(C).find(e=>C[e].toasts.some(e=>e.id===r))))({type:2,toast:a}),a.id},I=(e,t)=>P("blank")(e,t);I.error=P("error"),I.success=P("success"),I.loading=P("loading"),I.custom=P("custom"),I.dismiss=(e,t)=>{let s={type:3,toastId:e};t?D(t)(s):O(s)},I.dismissAll=e=>I.dismiss(void 0,e),I.remove=(e,t)=>{let s={type:4,toastId:e};t?D(t)(s):O(s)},I.removeAll=e=>I.remove(void 0,e),I.promise=(e,t,s)=>{let r=I.loading(t.loading,{...s,...null==s?void 0:s.loading});return"function"==typeof e&&(e=e()),e.then(e=>{let a=t.success?v(t.success,e):void 0;return a?I.success(a,{id:r,...s,...null==s?void 0:s.success}):I.dismiss(r),e}).catch(e=>{let a=t.error?v(t.error,e):void 0;a?I.error(a,{id:r,...s,...null==s?void 0:s.error}):I.dismiss(r)}),e};var L=1e3,S=b`
from {
  transform: scale(0) rotate(45deg);
	opacity: 0;
}
to {
 transform: scale(1) rotate(45deg);
  opacity: 1;
}`,z=b`
from {
  transform: scale(0);
  opacity: 0;
}
to {
  transform: scale(1);
  opacity: 1;
}`,F=b`
from {
  transform: scale(0) rotate(90deg);
	opacity: 0;
}
to {
  transform: scale(1) rotate(90deg);
	opacity: 1;
}`,q=y("div")`
  width: 20px;
  opacity: 0;
  height: 20px;
  border-radius: 10px;
  background: ${e=>e.primary||"#ff4b4b"};
  position: relative;
  transform: rotate(45deg);

  animation: ${S} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
    forwards;
  animation-delay: 100ms;

  &:after,
  &:before {
    content: '';
    animation: ${z} 0.15s ease-out forwards;
    animation-delay: 150ms;
    position: absolute;
    border-radius: 3px;
    opacity: 0;
    background: ${e=>e.secondary||"#fff"};
    bottom: 9px;
    left: 4px;
    height: 2px;
    width: 12px;
  }

  &:before {
    animation: ${F} 0.15s ease-out forwards;
    animation-delay: 180ms;
    transform: rotate(90deg);
  }
`,R=b`
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
`,T=y("div")`
  width: 12px;
  height: 12px;
  box-sizing: border-box;
  border: 2px solid;
  border-radius: 100%;
  border-color: ${e=>e.secondary||"#e0e0e0"};
  border-right-color: ${e=>e.primary||"#616161"};
  animation: ${R} 1s linear infinite;
`,M=b`
from {
  transform: scale(0) rotate(45deg);
	opacity: 0;
}
to {
  transform: scale(1) rotate(45deg);
	opacity: 1;
}`,H=b`
0% {
	height: 0;
	width: 0;
	opacity: 0;
}
40% {
  height: 0;
	width: 6px;
	opacity: 1;
}
100% {
  opacity: 1;
  height: 10px;
}`,Z=y("div")`
  width: 20px;
  opacity: 0;
  height: 20px;
  border-radius: 10px;
  background: ${e=>e.primary||"#61d345"};
  position: relative;
  transform: rotate(45deg);

  animation: ${M} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
    forwards;
  animation-delay: 100ms;
  &:after {
    content: '';
    box-sizing: border-box;
    animation: ${H} 0.2s ease-out forwards;
    opacity: 0;
    animation-delay: 200ms;
    position: absolute;
    border-right: 2px solid;
    border-bottom: 2px solid;
    border-color: ${e=>e.secondary||"#fff"};
    bottom: 6px;
    left: 6px;
    height: 10px;
    width: 6px;
  }
`,U=y("div")`
  position: absolute;
`,B=y("div")`
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 20px;
  min-height: 20px;
`,Y=b`
from {
  transform: scale(0.6);
  opacity: 0.4;
}
to {
  transform: scale(1);
  opacity: 1;
}`,G=y("div")`
  position: relative;
  transform: scale(0.6);
  opacity: 0.4;
  min-width: 20px;
  animation: ${Y} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
    forwards;
`,J=({toast:e})=>{let{icon:t,type:s,iconTheme:r}=e;return void 0!==t?"string"==typeof t?o.createElement(G,null,t):t:"blank"===s?null:o.createElement(B,null,o.createElement(T,{...r}),"loading"!==s&&o.createElement(U,null,"error"===s?o.createElement(q,{...r}):o.createElement(Z,{...r})))},K=y("div")`
  display: flex;
  align-items: center;
  background: #fff;
  color: #363636;
  line-height: 1.3;
  will-change: transform;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
  max-width: 350px;
  pointer-events: auto;
  padding: 8px 10px;
  border-radius: 8px;
`,Q=y("div")`
  display: flex;
  justify-content: center;
  margin: 4px 10px;
  color: inherit;
  flex: 1 1 auto;
  white-space: pre-line;
`,V=o.memo(({toast:e,position:t,style:s,children:r})=>{let a=e.height?((e,t)=>{let s=e.includes("top")?1:-1,[r,a]=j()?["0%{opacity:0;} 100%{opacity:1;}","0%{opacity:1;} 100%{opacity:0;}"]:[`
0% {transform: translate3d(0,${-200*s}%,0) scale(.6); opacity:.5;}
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
`,`
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
100% {transform: translate3d(0,${-150*s}%,-1px) scale(.6); opacity:0;}
`];return{animation:t?`${b(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${b(a)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}})(e.position||t||"top-center",e.visible):{opacity:0},i=o.createElement(J,{toast:e}),l=o.createElement(Q,{...e.ariaProps},v(e.message,e));return o.createElement(K,{className:e.className,style:{...a,...s,...e.style}},"function"==typeof r?r({icon:i,message:l}):o.createElement(o.Fragment,null,i,l))});i=o.createElement,m.p=void 0,g=i,h=void 0,x=void 0;var W=({id:e,className:t,style:s,onHeightUpdate:r,children:a})=>{let i=o.useCallback(t=>{if(t){let s=()=>{r(e,t.getBoundingClientRect().height)};s(),new MutationObserver(s).observe(t,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return o.createElement("div",{ref:i,className:t,style:s},a)},X=f`
  z-index: 9999;
  > * {
    pointer-events: auto;
  }
`,ee=({reverseOrder:e,position:t="top-center",toastOptions:s,gutter:r,children:a,toasterId:i,containerStyle:l,containerClassName:n})=>{let{toasts:d,handlers:c}=((e,t="default")=>{let{toasts:s,pausedAt:r}=((e={},t=N)=>{let[s,r]=(0,o.useState)(C[t]||$),a=(0,o.useRef)(C[t]);(0,o.useEffect)(()=>(a.current!==C[t]&&r(C[t]),E.push([t,r]),()=>{let e=E.findIndex(([e])=>e===t);e>-1&&E.splice(e,1)}),[t]);let i=s.toasts.map(t=>{var s,r,a;return{...e,...e[t.type],...t,removeDelay:t.removeDelay||(null==(s=e[t.type])?void 0:s.removeDelay)||(null==e?void 0:e.removeDelay),duration:t.duration||(null==(r=e[t.type])?void 0:r.duration)||(null==e?void 0:e.duration)||_[t.type],style:{...e.style,...null==(a=e[t.type])?void 0:a.style,...t.style}}});return{...s,toasts:i}})(e,t),a=(0,o.useRef)(new Map).current,i=(0,o.useCallback)((e,t=L)=>{if(a.has(e))return;let s=setTimeout(()=>{a.delete(e),l({type:4,toastId:e})},t);a.set(e,s)},[]);(0,o.useEffect)(()=>{if(r)return;let e=Date.now(),a=s.map(s=>{if(s.duration===1/0)return;let r=(s.duration||0)+s.pauseDuration-(e-s.createdAt);if(r<0){s.visible&&I.dismiss(s.id);return}return setTimeout(()=>I.dismiss(s.id,t),r)});return()=>{a.forEach(e=>e&&clearTimeout(e))}},[s,r,t]);let l=(0,o.useCallback)(D(t),[t]),n=(0,o.useCallback)(()=>{l({type:5,time:Date.now()})},[l]),d=(0,o.useCallback)((e,t)=>{l({type:1,toast:{id:e,height:t}})},[l]),c=(0,o.useCallback)(()=>{r&&l({type:6,time:Date.now()})},[r,l]),m=(0,o.useCallback)((e,t)=>{let{reverseOrder:r=!1,gutter:a=8,defaultPosition:i}=t||{},o=s.filter(t=>(t.position||i)===(e.position||i)&&t.height),l=o.findIndex(t=>t.id===e.id),n=o.filter((e,t)=>t<l&&e.visible).length;return o.filter(e=>e.visible).slice(...r?[n+1]:[0,n]).reduce((e,t)=>e+(t.height||0)+a,0)},[s]);return(0,o.useEffect)(()=>{s.forEach(e=>{if(e.dismissed)i(e.id,e.removeDelay);else{let t=a.get(e.id);t&&(clearTimeout(t),a.delete(e.id))}})},[s,i]),{toasts:s,handlers:{updateHeight:d,startPause:n,endPause:c,calculateOffset:m}}})(s,i);return o.createElement("div",{"data-rht-toaster":i||"",style:{position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none",...l},className:n,onMouseEnter:c.startPause,onMouseLeave:c.endPause},d.map(s=>{let i,l,n=s.position||t,d=c.calculateOffset(s,{reverseOrder:e,gutter:r,defaultPosition:t}),m=(i=n.includes("top"),l=n.includes("center")?{justifyContent:"center"}:n.includes("right")?{justifyContent:"flex-end"}:{},{left:0,right:0,display:"flex",position:"absolute",transition:j()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${d*(i?1:-1)}px)`,...i?{top:0}:{bottom:0},...l});return o.createElement(W,{id:s.id,key:s.id,onHeightUpdate:c.updateHeight,className:s.visible?X:"",style:m},"custom"===s.type?v(s.message,s):a?a(s):o.createElement(V,{toast:s,position:n}))}))},et=I},95619:(e,t,s)=>{Promise.resolve().then(s.bind(s,96917))},96917:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s(95155),a=s(73981),i=s(66926),o=s(64090),l=s(12115),n=s(73549),d=s.n(n);function c(){let[e,t]=(0,l.useState)(!1),{register:s,handleSubmit:n,formState:{errors:c}}=(0,i.mN)(),m=async()=>{try{t(!0),o.oR.success("Login successful!")}catch(e){o.oR.error("Login failed. Please try again.")}finally{t(!1)}};return(0,r.jsxs)("div",{className:"min-h-screen w-full flex flex-col lg:flex-row",children:[(0,r.jsx)("div",{className:"hidden lg:flex lg:w-1/2 relative",children:(0,r.jsx)(a.default,{src:"/images/adminloginimage.png",alt:"Admin Login",fill:!0,className:"object-cover",priority:!0})}),(0,r.jsxs)("div",{className:"flex-1 flex flex-col justify-center px-6 py-12 lg:px-8 bg-background",children:[(0,r.jsxs)("div",{className:"sm:mx-auto sm:w-full sm:max-w-md",children:[(0,r.jsx)("h2",{className:"mt-6 text-center text-3xl font-bold tracking-tight text-foreground",children:"Admin/Teacher Login"}),(0,r.jsx)("p",{className:"mt-2 text-center text-sm text-neutral-600",children:"Sign in to manage exams and students"})]}),(0,r.jsxs)("div",{className:"mt-8 sm:mx-auto sm:w-full sm:max-w-md",children:[(0,r.jsxs)("form",{className:"space-y-6",onSubmit:n(m),children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"email",className:"block text-sm font-medium text-foreground",children:"Email address"}),(0,r.jsxs)("div",{className:"mt-1",children:[(0,r.jsx)("input",{id:"email",type:"email",autoComplete:"email",required:!0,className:"block w-full rounded-md border border-neutral-300 px-3 py-2 shadow-sm    focus:border-primary-500 focus:outline-none focus:ring-1 focus:ring-primary-500   bg-background text-foreground",...s("email",{required:"Email is required",pattern:{value:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,message:"Invalid email address"}})}),c.email&&(0,r.jsx)("p",{className:"mt-1 text-sm text-error-500",children:c.email.message})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"password",className:"block text-sm font-medium text-foreground",children:"Password"}),(0,r.jsxs)("div",{className:"mt-1",children:[(0,r.jsx)("input",{id:"password",type:"password",autoComplete:"current-password",required:!0,className:"block w-full rounded-md border border-neutral-300 px-3 py-2 shadow-sm   focus:border-primary-500 focus:outline-none focus:ring-1 focus:ring-primary-500   bg-background text-foreground",...s("password",{required:"Password is required",minLength:{value:6,message:"Password must be at least 6 characters"}})}),c.password&&(0,r.jsx)("p",{className:"mt-1 text-sm text-error-500",children:c.password.message})]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("input",{id:"remember-me",name:"remember-me",type:"checkbox",className:"h-4 w-4 rounded border-neutral-300 text-primary-600    focus:ring-primary-500"}),(0,r.jsx)("label",{htmlFor:"remember-me",className:"ml-2 block text-sm text-neutral-700",children:"Remember me"})]}),(0,r.jsx)("div",{className:"text-sm",children:(0,r.jsx)("a",{href:"#",className:"font-medium text-primary-600 hover:text-primary-500",children:"Forgot your password?"})})]}),(0,r.jsx)("div",{children:(0,r.jsx)("button",{type:"submit",disabled:e,className:"flex w-full justify-center rounded-md bg-primary-600 px-3 py-2   text-sm font-semibold text-white shadow-sm hover:bg-primary-500   focus-visible:outline-2 focus-visible:outline-offset-2    focus-visible:outline-primary-600 disabled:opacity-50    disabled:cursor-not-allowed",children:e?"Signing in...":"Sign in"})})]}),(0,r.jsxs)("p",{className:"mt-8 text-center text-sm text-neutral-600",children:["Are you a student?"," ",(0,r.jsx)(d(),{href:"/",className:"font-medium text-primary-600 hover:text-primary-500",children:"Login here"})]})]})]})]})}}},e=>{e.O(0,[6926,3549,3981,8441,9826,7358],()=>e(e.s=95619)),_N_E=e.O()}]);