PageSourceSearch

https://reactui-templates.vercel.app/_next/static/chunks/app/(auth)/login/page-52d355f6b8a05807.js

js reactui-templates.vercel.app collected 2026-10-03 07:36:09 UTC 10,244 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4665],{60990:function(e,s,t){Promise.resolve().then(t.bind(t,49072))},43029:function(e,s,t){"use strict";t.d(s,{Z:function(){return u}});var n=t(44951),r=t(71174),i=t(25529),a=t(84325),l=t(74765),o=t(1181),d=t(56601),c=t(63858);function u(e){let{register:s,errors:t,label:u,type:m="text",name:x,toolTipText:f,icon:g,placeholder:h,forgotPasswordLink:p}=e,[v,b]=(0,i.useState)(m);return(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex space-x-2 items-center",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,n.jsx)("label",{htmlFor:"password",className:"block text-sm font-medium leading-6 text-gray-900",children:u}),p&&(0,n.jsx)("div",{className:"text-sm",children:(0,n.jsx)(c.default,{href:p,className:"font-medium text-indigo-600 hover:text-indigo-500",children:"Forgot password?"})})]}),f&&(0,n.jsx)(a.pn,{children:(0,n.jsxs)(a.u,{children:[(0,n.jsx)(a.aJ,{asChild:!0,children:(0,n.jsx)("button",{children:(0,n.jsx)(l.Z,{className:"w-4 h-4 text-slate-500"})})}),(0,n.jsx)(a._v,{children:(0,n.jsx)("p",{children:f})})]})})]}),(0,n.jsxs)("div",{className:"mt-2",children:[(0,n.jsxs)("div",{className:"relative rounded-md ",children:[g&&(0,n.jsx)("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",children:(0,n.jsx)(g,{className:"text-slate-300 w-4 h-4"})}),(0,n.jsx)("input",{id:x,type:v,...s(x,{required:!0,minLength:{value:8,message:"Password must be at least 8 characters"},pattern:{value:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])/,message:"Password must contain at least one uppercase letter, one lowercase letter, one number, and one special character"}}),className:(0,r.cn)("block w-full rounded-md border-0 py-2 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6 text-sm",t[x]&&"focus:ring-red-500 pl-8"||g&&"pl-8"),placeholder:h||u}),(0,n.jsx)("button",{type:"button",onClick:()=>b(e=>"password"===e?"text":"password"),className:"bg-white py-2 px-3 rounded-tr-md rounded-br-md absolute inset-y-0 right-1 my-[2px] flex items-center",children:"password"===v?(0,n.jsx)(o.Z,{className:"w-4 h-4 text-slate-600"}):(0,n.jsx)(d.Z,{className:"w-4 h-4 text-slate-600"})})]}),t[x]&&(0,n.jsx)("span",{className:"text-xs text-red-600",children:t[x].message})]})]})}},8709:function(e,s,t){"use strict";t.d(s,{Z:function(){return l}});var n=t(44951),r=t(71174),i=t(49907),a=t(23536);function l(e){let{title:s,loadingTitle:t="Saving Please wait...",loading:l,className:o,loaderIcon:d=i.Z,buttonIcon:c=a.Z,showIcon:u=!0}=e;return(0,n.jsx)(n.Fragment,{children:l?(0,n.jsxs)("button",{type:"button",disabled:!0,className:(0,r.cn)("items-center flex justify-center rounded-md bg-indigo-600/55 px-3 py-2 text-sm font-semibold leading-6 text-white shadow-sm  focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 cursor-not-allowed",o),children:[(0,n.jsx)(d,{className:"w-4 h-4 animate-spin mr-2"}),t]}):(0,n.jsxs)("button",{type:"submit",className:(0,r.cn)("flex items-center justify-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold leading-6 text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",o),children:[u&&(0,n.jsx)(c,{className:"w-4 h-4 mr-2"}),s]})})}t(25529)},84611:function(e,s,t){"use strict";t.d(s,{Z:function(){return l}});var n=t(44951),r=t(71174);t(25529);var i=t(84325),a=t(74765);function l(e){let{register:s,errors:t,label:l,type:o="text",name:d,toolTipText:c,unit:u,icon:m,placeholder:x}=e;return(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex space-x-2 items-center",children:[(0,n.jsx)("label",{htmlFor:d,className:"block text-sm font-medium leading-6 text-gray-900",children:l}),c&&(0,n.jsx)(i.pn,{children:(0,n.jsxs)(i.u,{children:[(0,n.jsx)(i.aJ,{asChild:!0,children:(0,n.jsx)("button",{children:(0,n.jsx)(a.Z,{className:"w-4 h-4 text-slate-500"})})}),(0,n.jsx)(i._v,{children:(0,n.jsx)("p",{children:c})})]})})]}),(0,n.jsxs)("div",{className:"mt-2",children:[(0,n.jsxs)("div",{className:"relative rounded-md ",children:[m&&(0,n.jsx)("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",children:(0,n.jsx)(m,{className:"text-slate-300 w-4 h-4"})}),(0,n.jsx)("input",{id:d,type:o,...s("".concat(d),{required:!0}),className:(0,r.cn)("block w-full rounded-md border-0 py-2 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6 text-sm",t["".concat(d)]&&"focus:ring-red-500 pl-8"||m&&"pl-8"),placeholder:x||l}),u&&(0,n.jsx)("p",{className:"bg-white py-2 px-3 rounded-tr-md rounded-br-md absolute inset-y-0 right-1 my-[2px] flex items-center",children:u})]}),t["".concat(d)]&&(0,n.jsxs)("span",{className:"text-xs text-red-600",children:[l," is required"]})]})]})}},49072:function(e,s,t){"use strict";t.d(s,{default:function(){return v}});var n=t(44951),r=t(82081),i=t(42372),a=t(70945),l=t(25529),o=t(63858),d=t(99851),c=t(49140),u=t(65694),m=t(33004),x=t(79479),f=t(63507),g=t(84611),h=t(43029),p=t(8709);function v(){let[e,s]=(0,l.useState)(!1),{handleSubmit:t,register:v,formState:{errors:b},reset:j}=(0,d.cI)(),w=(0,u.useSearchParams)().get("returnUrl")||"/dashboard",[N,y]=(0,l.useState)(""),k=(0,u.useRouter)();async function Z(e){try{s(!0),y(""),console.log("Attempting to sign in with credentials:",e);let t=await (0,m.signIn)("credentials",{...e,redirect:!1});console.log("SignIn response:",t),(null==t?void 0:t.error)?(s(!1),c.ZP.error("Sign-in error: Check your credentials"),y("Wrong Credentials, Check again")):(j(),s(!1),c.ZP.success("Login Successful"),y(""),k.push(w))}catch(e){s(!1),console.error("Network Error:",e)}}return(0,n.jsxs)("div",{className:"w-full py-5 lg:px-8 px-6 ",children:[(0,n.jsx)("div",{className:"",children:(0,n.jsxs)("div",{className:"py-4 text-gray-900",children:[(0,n.jsx)("h2",{className:"text-xl lg:text-2xl font-bold leading-9 tracking-tight  ",children:"Login in to your account"}),(0,n.jsx)("p",{className:"text-xs",children:"Welcome Back, fill in details to login"})]})}),(0,n.jsxs)("div",{className:"",children:[(0,n.jsxs)("form",{className:"space-y-3",onSubmit:t(Z),children:[(0,n.jsx)(g.Z,{register:v,errors:b,label:"Email Address",name:"email",icon:r.Z,placeholder:"email"}),(0,n.jsx)(h.Z,{register:v,errors:b,label:"Password",name:"password",icon:i.Z,placeholder:"password",forgotPasswordLink:"/forgot-password"}),N&&(0,n.jsx)("p",{className:"text-red-500 text-xs",children:N}),(0,n.jsx)("div",{children:(0,n.jsx)(p.Z,{title:"Sign In",loadingTitle:"Loading Please wait..",loading:e,className:"w-full",loaderIcon:a.Z,showIcon:!1})})]}),(0,n.jsxs)("div",{className:"flex items-center py-4 justify-center space-x-1 text-slate-900",children:[(0,n.jsx)("div",{className:"h-[1px] w-full bg-slate-200"}),(0,n.jsx)("div",{className:"uppercase",children:"Or"}),(0,n.jsx)("div",{className:"h-[1px] w-full bg-slate-200"})]}),(0,n.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[(0,n.jsxs)(x.z,{onClick:()=>(0,m.signIn)("google"),variant:"outline",className:"w-full",children:[(0,n.jsx)(f.ldW,{className:"mr-2 w-6 h-6 text-red-500"}),"Login with Google"]}),(0,n.jsxs)(x.z,{onClick:()=>(0,m.signIn)("github"),variant:"outline",className:"w-full",children:[(0,n.jsx)(f.hJX,{className:"mr-2 w-6 h-6 text-slate-900 dark:text-white"}),"Login with Github"]})]}),(0,n.jsxs)("p",{className:"mt-6 text-center text-sm text-gray-500",children:["Not a Registered ?"," ",(0,n.jsx)(o.default,{href:"/register",className:"font-semibold leading-6 text-indigo-600 hover:text-indigo-500",children:"Create Account"})]})]})]})}},79479:function(e,s,t){"use strict";t.d(s,{d:function(){return o},z:function(){return d}});var n=t(44951),r=t(25529),i=t(4155),a=t(60142),l=t(71174);let o=(0,a.j)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),d=r.forwardRef((e,s)=>{let{className:t,variant:r,size:a,asChild:d=!1,...c}=e,u=d?i.g7:"button";return(0,n.jsx)(u,{className:(0,l.cn)(o({variant:r,size:a,className:t})),ref:s,...c})});d.displayName="Button"},84325:function(e,s,t){"use strict";t.d(s,{_v:function(){return c},aJ:function(){return d},pn:function(){return l},u:function(){return o}});var n=t(44951),r=t(25529),i=t(14841),a=t(71174);let l=i.zt,o=i.fC,d=i.xz,c=r.forwardRef((e,s)=>{let{className:t,sideOffset:r=4,...l}=e;return(0,n.jsx)(i.VY,{ref:s,sideOffset:r,className:(0,a.cn)("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
1de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...l})});c.displayName=i.VY.displayName},71174:function(e,s,t){"use strict";t.d(s,{cn:function(){return i}});var n=t(47244),r=t(54794);function i(){for(var e=arguments.length,s=Array(e),t=0;t<e;t++)s[t]=arguments[t];return(0,r.m6)((0,n.W)(s))}}},function(e){e.O(0,[8014,3313,7322,5502,9814,4841,9140,2544,497,6068,9541,1744],function(){return e(e.s=60990)}),_N_E=e.O()}]);

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.