PageSourceSearch

https://powerpicks.ai/_next/static/chunks/app/auth/login/page-5be8ee4d2cf44a1d.js

js powerpicks.ai collected 2026-10-05 13:39:01 UTC 15,367 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6716],{56053:function(e,t,r){Promise.resolve().then(r.bind(r,61202))},49322:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},66337:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},89345:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]])},99376:function(e,t,r){"use strict";var n=r(35475);r.o(n,"useParams")&&r.d(t,{useParams:function(){return n.useParams}}),r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},61202:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return v}});var n=r(57437),s=r(2265),a=r(25922),i=r(27648),l=r(99376),o=r(27526),c=r(49322),d=r(89345),u=r(66337),m=r(12381),f=r(40279),h=r(12820),p=r(79820),x=r(85310);function g(){let e=(0,l.useRouter)(),{data:t,status:r}=(0,o.kP)(),g=(0,l.useSearchParams)(),{theme:v}=(0,a.F)(),b=g.get("callbackUrl")||"/picks",y=g.get("error"),[w,j]=(0,s.useState)(""),[N,k]=(0,s.useState)(""),[C,S]=(0,s.useState)(!1),[P,E]=(0,s.useState)(null);(0,s.useEffect)(()=>{"authenticated"===r&&t&&(window.location.href=b)},[r,t,e,b]);let R=async t=>{t.preventDefault(),S(!0),E(null);try{let t=await (0,o.zB)("credentials",{email:w,password:N,redirect:!1});(null==t?void 0:t.error)||!(null==t?void 0:t.ok)?E("Invalid email or password"):(window.location.href=b,e.refresh())}catch(e){E("An error occurred. Please try again.")}finally{S(!1)}},Z=async()=>{S(!0),await (0,o.zB)("google",{callbackUrl:b})};return(0,n.jsx)("div",{className:"min-h-[calc(100vh-8rem)] flex items-center justify-center px-4 py-12 dark:bg-gray-700",children:(0,n.jsxs)(p.Zb,{className:"w-full max-w-md",children:[(0,n.jsxs)(p.Ol,{className:"text-center",children:[(0,n.jsxs)(i.default,{href:"/",className:"flex items-center justify-center gap-2 mb-4 pl-5",children:[(0,n.jsx)("img",{src:"/pp4.svg",alt:"PowerPicks",className:"h-8 w-8"}),(0,n.jsx)("img",{src:"/pp2.svg",alt:"PowerPicks",className:"h-[29px] -ml-[6px] dark:hidden"}),(0,n.jsx)("img",{src:"/pp2-dark.svg",alt:"PowerPicks",className:"h-[29px] -ml-[6px] hidden dark:block"})]}),(0,n.jsx)(p.ll,{className:"text-2xl",children:"Welcome back"}),(0,n.jsx)(p.SZ,{children:"Sign in to your account to continue"})]}),(0,n.jsxs)(p.aY,{className:"space-y-4",children:[(y||P)&&(0,n.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive bg-destructive/10 p-3 rounded-lg",children:[(0,n.jsx)(c.Z,{className:"h-4 w-4"}),"CredentialsSignin"===y?"Invalid credentials":P||"An error occurred"]}),(0,n.jsxs)("button",{className:"w-full inline-flex items-center justify-center rounded-md border border-input bg-background px-4 py-2 text-sm font-medium ring-offset-background transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 h-10",style:"dark"===v?{backgroundColor:"#e5e7eb",color:"#000000",borderColor:"#e5e7eb"}:{},onClick:Z,disabled:C,children:[(0,n.jsxs)("svg",{className:"mr-2 h-4 w-4",viewBox:"0 0 24 24",children:[(0,n.jsx)("path",{fill:"currentColor",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),(0,n.jsx)("path",{fill:"currentColor",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),(0,n.jsx)("path",{fill:"currentColor",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),(0,n.jsx)("path",{fill:"currentColor",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]}),"Continue with Google"]}),(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("div",{className:"absolute inset-0 flex items-center",children:(0,n.jsx)(x.Z,{className:"w-full"})}),(0,n.jsx)("div",{className:"relative flex justify-center text-xs uppercase",children:(0,n.jsx)("span",{className:"bg-card px-2 text-muted-foreground",children:"Or continue with"})})]}),(0,n.jsxs)("form",{onSubmit:R,className:"space-y-4",children:[(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)(h._,{htmlFor:"email",children:"Email"}),(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)(d.Z,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,n.jsx)(f.I,{id:"email",type:"email",placeholder:"[email protected]",value:w,onChange:e=>j(e.target.value),className:"pl-10 dark:bg-gray-700",required:!0,disabled:C})]})]}),(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)(h._,{htmlFor:"password",children:"Password"}),(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)(u.Z,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,n.jsx)(f.I,{id:"password",type:"password",placeholder:"••••••••",value:N,onChange:e=>k(e.target.value),className:"pl-10 dark:bg-gray-700",required:!0,disabled:C})]})]}),(0,n.jsx)(m.z,{type:"submit",className:"w-full",disabled:C,loading:C,children:"Sign In"})]})]}),(0,n.jsxs)(p.eW,{className:"flex justify-between items-center",children:[(0,n.jsx)(i.default,{href:"/auth/forgot-password",className:"text-xs text-primary hover:underline",children:"Forgot password?"}),(0,n.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Don't have an account?"," ",(0,n.jsx)(i.default,{href:"/auth/signup",className:"text-primary hover:underline",children:"Sign up"})]})]})]})})}function v(){return(0,n.jsx)(s.Suspense,{fallback:(0,n.jsx)("div",{className:"min-h-[calc(100vh-8rem)] flex items-center justify-center",children:(0,n.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}),children:(0,n.jsx)(g,{})})}},12381:function(e,t,r){"use strict";r.d(t,{z:function(){return d}});var n=r(57437),s=r(2265),a=r(37053),i=r(90535),l=r(93448),o=r(51817);let c=(0,i.j)("inline-flex items-center justify-center 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",{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",success:"bg-green-600 text-white hover:bg-green-700"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",xl:"h-12 rounded-md px-10 text-base",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),d=s.forwardRef((e,t)=>
1{let{className:r,variant:s,size:i,asChild:d=!1,loading:u=!1,children:m,disabled:f,...h}=e,p=d?a.g7:"button";return(0,n.jsx)(p,{className:(0,l.cn)(c({variant:s,size:i,className:r})),ref:t,disabled:f||u,...h,children:d?m:(0,n.jsxs)(n.Fragment,{children:[u&&(0,n.jsx)(o.Z,{className:"mr-2 h-4 w-4 animate-spin"}),m]})})});d.displayName="Button"},79820:function(e,t,r){"use strict";r.d(t,{Ol:function(){return l},SZ:function(){return c},Zb:function(){return i},aY:function(){return d},eW:function(){return u},ll:function(){return o}});var n=r(57437),s=r(2265),a=r(93448);let i=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("div",{ref:t,className:(0,a.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",r),...s})});i.displayName="Card";let l=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("div",{ref:t,className:(0,a.cn)("flex flex-col space-y-1.5 p-6",r),...s})});l.displayName="CardHeader";let o=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("h3",{ref:t,className:(0,a.cn)("text-2xl font-semibold leading-none tracking-tight",r),...s})});o.displayName="CardTitle";let c=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("p",{ref:t,className:(0,a.cn)("text-sm text-muted-foreground",r),...s})});c.displayName="CardDescription";let d=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("div",{ref:t,className:(0,a.cn)("p-6 pt-0",r),...s})});d.displayName="CardContent";let u=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("div",{ref:t,className:(0,a.cn)("flex items-center p-6 pt-0",r),...s})});u.displayName="CardFooter"},40279:function(e,t,r){"use strict";r.d(t,{I:function(){return i}});var n=r(57437),s=r(2265),a=r(93448);let i=s.forwardRef((e,t)=>{let{className:r,type:s,error:i,...l}=e;return(0,n.jsx)("input",{type:s,className:(0,a.cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
1ing-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",i&&"border-destructive focus-visible:ring-destructive",r),ref:t,...l})});i.displayName="Input"},12820:function(e,t,r){"use strict";r.d(t,{_:function(){return d}});var n=r(57437),s=r(2265),a=r(66840),i=s.forwardRef((e,t)=>(0,n.jsx)(a.WV.label,{...e,ref:t,onMouseDown:t=>{var r;t.target.closest("button, input, select, textarea")||(null===(r=e.onMouseDown)||void 0===r||r.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));i.displayName="Label";var l=r(90535),o=r(93448);let c=(0,l.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)(i,{ref:t,className:(0,o.cn)(c(),r),...s})});d.displayName=i.displayName},85310:function(e,t,r){"use strict";r.d(t,{Z:function(){return d}});var n=r(57437),s=r(2265),a=r(66840),i="horizontal",l=["horizontal","vertical"],o=s.forwardRef((e,t)=>{let{decorative:r,orientation:s=i,...o}=e,c=l.includes(s)?s:i;return(0,n.jsx)(a.WV.div,{"data-orientation":c,...r?{role:"none"}:{"aria-orientation":"vertical"===c?c:void 0,role:"separator"},...o,ref:t})});o.displayName="Separator";var c=r(93448);let d=s.forwardRef((e,t)=>{let{className:r,orientation:s="horizontal",decorative:a=!0,...i}=e;return(0,n.jsx)(o,{ref:t,decorative:a,orientation:s,className:(0,c.cn)("shrink-0 bg-border","horizontal"===s?"h-[1px] w-full":"h-full w-[1px]",r),...i})});d.displayName=o.displayName},93448:function(e,t,r){"use strict";r.d(t,{cn:function(){return a}});var n=r(61994),s=r(53335);function a(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,s.m6)((0,n.W)(t))}},66840:function(e,t,r){"use strict";r.d(t,{WV:function(){return i}});var n=r(2265);r(54887);var s=r(37053),a=r(57437),i=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=(0,s.Z8)(`Primitive.${t}`),i=n.forwardRef((e,n)=>{let{asChild:s,...i}=e,l=s?r:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,a.jsx)(l,{...i,ref:n})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{})},25922:function(e,t,r){"use strict";r.d(t,{F:function(){return d},f:function(){return u}});var n=r(2265),s=(e,t,r,n,s,a,i,l)=>{let o=document.documentElement,c=["light","dark"];function d(t){(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,n=r&&a?s.map(e=>a[e]||e):s;r?(o.classList.remove(...n),o.classList.add(a&&a[t]?a[t]:t)):o.setAttribute(e,t)}),l&&c.includes(t)&&(o.style.colorScheme=t)}if(n)d(n);else try{let e=localStorage.getItem(t)||r,n=i&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;d(n)}catch(e){}},a=["light","dark"],i="(prefers-color-scheme: dark)",l="undefined"==typeof window,o=n.createContext(void 0),c={setTheme:e=>{},themes:[]},d=()=>{var e;return null!=(e=n.useContext(o))?e:c},u=e=>n.useContext(o)?n.createElement(n.Fragment,null,e.children):n.createElement(f,{...e}),m=["light","dark"],f=e=>{let{forcedTheme:t,disableTransitionOnChange:r=!1,enableSystem:s=!0,enableColorScheme:l=!0,storageKey:c="theme",themes:d=m,defaultTheme:u=s?"system":"light",attribute:f="data-theme",value:v,children:b,nonce:y,scriptProps:w}=e,[j,N]=n.useState(()=>p(c,u)),[k,C]=n.useState(()=>"system"===j?g():j),S=v?Object.values(v):d,P=n.useCallback(e=>{let t=e;if(!t)return;"system"===e&&s&&(t=g());let n=v?v[t]:t,i=r?x(y):null,o=document.documentElement,c=e=>{"class"===e?(o.classList.remove(...S),n&&o.classList.add(n)):e.startsWith("data-")&&(n?o.setAttribute(e,n):o.removeAttribute(e))};if(Array.isArray(f)?f.forEach(c):c(f),l){let e=a.includes(u)?u:null,r=a.includes(t)?t:e;o.style.colorScheme=r}null==i||i()},[y]),E=n.useCallback(e=>{let t="function"==typeof e?e(j):e;N(t);try{localStorage.setItem(c,t)}catch(e){}},[j]),R=n.useCallback(e=>
1{C(g(e)),"system"===j&&s&&!t&&P("system")},[j,t]);n.useEffect(()=>{let e=window.matchMedia(i);return e.addListener(R),R(e),()=>e.removeListener(R)},[R]),n.useEffect(()=>{let e=e=>{e.key===c&&(e.newValue?N(e.newValue):E(u))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[E]),n.useEffect(()=>{P(null!=t?t:j)},[t,j]);let Z=n.useMemo(()=>({theme:j,setTheme:E,forcedTheme:t,resolvedTheme:"system"===j?k:j,themes:s?[...d,"system"]:d,systemTheme:s?k:void 0}),[j,E,t,k,s,d]);return n.createElement(o.Provider,{value:Z},n.createElement(h,{forcedTheme:t,storageKey:c,attribute:f,enableSystem:s,enableColorScheme:l,defaultTheme:u,value:v,themes:d,nonce:y,scriptProps:w}),b)},h=n.memo(e=>{let{forcedTheme:t,storageKey:r,attribute:a,enableSystem:i,enableColorScheme:l,defaultTheme:o,value:c,themes:d,nonce:u,scriptProps:m}=e,f=JSON.stringify([a,r,o,t,d,c,i,l]).slice(1,-1);return n.createElement("script",{...m,suppressHydrationWarning:!0,nonce:"undefined"==typeof window?u:"",dangerouslySetInnerHTML:{__html:"(".concat(s.toString(),")(").concat(f,")")}})}),p=(e,t)=>{let r;if(!l){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t}},x=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},g=e=>(e||(e=window.matchMedia(i)),e.matches?"dark":"light")}},function(e){e.O(0,[3878,7648,7526,2971,2117,1744],function(){return e(e.s=56053)}),_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.