(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1513],{23875:(e,s,a)=>{"use strict";a.d(s,{Bs:()=>l,DT:()=>t,Oj:()=>r});let l=e=>{let s=!1,a=!!parseInt(e);return""!==e&&(a&&""!==e?s=!!(8===e.length&&/^\d+\.?\d*$/.test(e)):""!==e&&(s=!!e.toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)),s)},r=e=>/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*])(?=.*[a-zA-Z]).{8,}$/g.test(e),t=e=>e.match(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)},47434:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>h});var l=a(37876),r=a(14232),t=a(3945),n=a(89099),i=a(31777),o=a(99186),d=a(23875),u=a(1785),c=a(48230),g=a.n(c);let h=()=>{let{user:e}=(0,i.d4)(e=>e.auth),s=(0,i.wA)();(0,n.useRouter)();let[a,c]=(0,r.useState)({username:"",password:""}),[h,p]=(0,r.useState)(2),[w,m]=(0,r.useState)(!1),[v,x]=(0,r.useState)(""),f=async e=>{let s=e.target.value;c({...a,username:s}),await j(null==s?void 0:s.trim())},j=(0,r.useCallback)(async e=>{var a;if(!e.length)return p(2);if(!(0,d.Bs)(e))return p(0);m(!0);let l=await s((0,o.Lx)({username:e}));m(!1),p(null==l||null==(a=l.payload)?void 0:a.success)},[p,s]),y=async e=>{e.preventDefault(),await (0,u.R_)(s((0,o.Lx)({username:a.username,password:a.password})),"logging in...","Logged in")};return(0,l.jsx)("div",{className:"login-wrapper sidespace",children:(0,l.jsxs)("div",{className:"login-outer",children:[(0,l.jsxs)("div",{className:"login-inner",children:[(0,l.jsx)("div",{className:"login-logo",children:(0,l.jsx)("img",{src:"/images/new-theme/lokmanya-new-png-logo.webp",height:"100",width:"100px"})}),(0,l.jsxs)("form",{className:"input-fields",onSubmit:y,children:[(0,l.jsx)(t.FO,{id:"email",type:"text",label:"Login via Email Id",value:a.username,onChange:e=>f(e),valid:h,loading:w,placeholder:"Type your email..",required:!0}),1===h&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.FO,{type:"password",id:"password",label:"Login Password",value:a.password,onChange:e=>{let s=e.target.value;c({...a,password:s})},error:v,onFocus:()=>x(null),icon:!1,isPass:!0,placeholder:"Type your password",required:!0}),(0,l.jsx)(t.jn,{type:"submit",children:"Sign in"})]})]}),(0,l.jsx)("div",{className:"forget-pass",children:(0,l.jsx)(g(),{href:"/forgot",children:"Forgot Password"})})]}),(0,l.jsx)("div",{className:"copyright",children:(0,l.jsxs)("span",{children:["\xa9 ",new Date().getFullYear()," Lokmanya Hospital. All Right Reserved. Powered by ",(0,l.jsx)("a",{href:"https://www.hatsoffdigital.com/",target:"blank",children:" Hats-Off"})]})})]})})}},65450:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/login/Login",function(){return a(47434)}])}},e=>{var s=s=>e(e.s=s);e.O(0,[636,6593,8792],()=>s(65450)),_N_E=e.O()}]);
//# sourceMappingURL=Login-49295b52fac9e959.js.map