PageSourceSearch

https://trueresume.ai/_next/static/chunks/pages/reset-password-88da7547292ca419.js

js trueresume.ai collected 2026-10-02 01:13:41 UTC 10,238 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8006],{21173:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/reset-password",function(){return s(45750)}])},42949:function(e,t,s){"use strict";s.d(t,{q:function(){return n}});var a=s(85893);s(67294);var r=s(54271);function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:26;return(0,a.jsx)(r.ZP,{variant:e,size:t,density:"full",animated:!0})}},26709:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});var a=s(85893);s(67294);var r=s(92761),n=s(79298),i=s(11163),o=s(67694);function l(e){let{title:t,subtitle:s,onPrimary:l,primaryLabel:c,showBack:d=!0}=e,u=(0,i.useRouter)(),{theme:x}=(0,o.F)();return(0,a.jsx)("div",{className:"md:hidden sticky top-12 z-40 px-3 py-2.5  transition-colors ".concat("dark"===x?"bg-[#1A1A1B] border-b border-[#343536]":"bg-white border-b border-[#EDEFF1]"),children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[d?(0,a.jsx)(n.hU,{onClick:()=>u.back(),icon:r.Z,"aria-label":"Back",variant:"ghost",size:"sm"}):(0,a.jsx)("div",{className:"w-9 h-9","aria-hidden":!0}),(0,a.jsxs)("div",{className:"flex-1 text-center min-w-0",children:[t&&(0,a.jsx)("div",{className:"font-semibold text-sm truncate ".concat("dark"===x?"text-white":"text-gray-900"),children:t}),s&&(0,a.jsx)("div",{className:"text-xs truncate ".concat("dark"===x?"text-[#818384]":"text-gray-500"),children:s})]}),(0,a.jsx)("div",{className:"flex-shrink-0 flex items-center justify-end",children:l?(0,a.jsx)(n.zx,{onClick:l,size:"sm",variant:"primary",className:"text-xs px-2.5 py-1.5 whitespace-nowrap",children:c||"Done"}):(0,a.jsx)("div",{className:"w-9 h-9","aria-hidden":!0})})]})})}},43765:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(63759).Z)("AlertCircle",[["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"}]])},60493:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(63759).Z)("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},43832:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(63759).Z)("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]])},15928:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(63759).Z)("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},82126:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(63759).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"}]])},45750:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return k}});var a=s(85893),r=s(67294),n=s(9008),i=s.n(n),o=s(87542),l=s(11163),c=s(85412),d=s(26709),u=s(67694),x=s(86501),m=s(42949),h=s(73416),f=s(82126),w=s(43832),p=s(15928),y=s(60493),g=s(43765),b=s(60641),j=s(79298);function k(){let e=(0,l.useRouter)(),{theme:t}=(0,u.F)(),{token:s}=e.query,[n,k]=(0,r.useState)(""),[v,N]=(0,r.useState)(""),[Z,C]=(0,r.useState)(""),[F,E]=(0,r.useState)(""),[R,D]=(0,r.useState)(!1),[S,P]=(0,r.useState)(!1),[A,_]=(0,r.useState)(!1),[z,T]=(0,r.useState)(!1);(0,r.useEffect)(()=>{e.isReady&&!s&&(x.default.error("Invalid reset link",{duration:4e3,style:{maxWidth:"400px"}}),e.push("/forgot-password"))},[e.isReady,s,e]);let q=[{label:"At least 8 characters",met:n.length>=8},{label:"Passwords match",met:n&&n===v}],I=async t=>{if(t.preventDefault(),C(""),E(""),!n.trim()){C("Enter a new password");return}if(n.length<8){C("Password must be at least 8 characters");return}if(!v.trim()){E("Confirm your new password");return}if(n!==v){E("Passwords do not match");return}D(!0);try{let t=await fetch("/api/auth/reset-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:s,newPassword:n})}),i=await t.json();if(t.ok)P(!0),x.default.success("Password reset successfully!",{duration:3e3,icon:(0,m.q)("check"),style:{maxWidth:"400px"}}),setTimeout(()=>{e.push("/login")},3e3);else{var a,r;x.default.error(i.error||"Failed to reset password",{duration:4e3,style:{maxWidth:"400px"}}),((null===(a=i.error)||void 0===a?void 0:a.includes("expired"))||(null===(r=i.error)||void 0===r?void 0:r.includes("Invalid")))&&setTimeout(()=>{e.push("/forgot-password")},2e3)}}catch(e){console.error("Reset password error:",e),x.default.error("Something went wrong. Please try again.",{duration:4e3,style:{maxWidth:"400px"}})}finally{D(!1)}};return!s&&e.isReady?null:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i(),{children:[(0,a.jsx)("title",{children:"Reset Password - TrueResume"}),(0,a.jsx)("meta",{name:"description",content:"Create a new password for your TrueResume account"}),(0,a.jsx)("meta",{name:"robots",content:"noindex, nofollow"})]}),(0,a.jsxs)("div",{className:"min-h-screen pt-12 sm:pt-16 transition-all duration-300 ".concat("dark"===t?"bg-[#030303]":"bg-transparent"),children:[(0,a.jsx)(c.Z,{}),(0,a.jsx)(d.Z,{title:"Reset password",subtitle:"Create a new password"}),(0,a.jsx)("div",{className:"flex items-center justify-center min-h-[calc(100vh-4rem)] px-4 sm:px-6 py-12",children:(0,a.jsx)(o.E.div,{initial:{opacity:0,y:30}
1,animate:{opacity:1,y:0},transition:{duration:.6},className:"w-full max-w-md",children:(0,a.jsx)("div",{className:"card-mobile shadow-2xl border  ".concat("dark"===t?"bg-[#272729] border-[#343536]":"bg-white border-[#EDEFF1]"),children:S?(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-14 h-14 sm:w-16 sm:h-16 rounded-full mb-6 ".concat("dark"===t?"bg-green-500/20":"bg-green-50"),children:(0,a.jsx)(y.Z,{className:"w-10 h-10 ".concat("dark"===t?"text-green-400":"text-green-600")})}),(0,a.jsx)("h1",{className:"text-2xl sm:text-3xl font-bold mb-4 ".concat("dark"===t?"text-white":"text-gray-900"),style:{fontFamily:"Rajdhani, sans-serif"},children:"Password Reset Complete!"}),(0,a.jsx)("p",{className:"mb-6 text-sm sm:text-base ".concat("dark"===t?"text-gray-400":"text-gray-600"),children:"Your password has been successfully reset. Redirecting to login..."}),(0,a.jsx)("div",{className:"w-full bg-gray-200 dark:bg-[#343536] rounded-full h-2 mb-4",children:(0,a.jsx)(o.E.div,{className:"bg-[#FF4500] h-2 rounded-full",initial:{width:"0%"},animate:{width:"100%"},transition:{duration:3}})}),(0,a.jsx)(j.zx,{onClick:()=>e.push("/login"),variant:"outline",className:"w-full",children:"Go to Login Now"})]})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"text-center mb-8",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-14 h-14 sm:w-16 sm:h-16 rounded-2xl mb-6 ".concat("dark"===t?"bg-gradient-to-br from-blue-600 to-[#E03D00]":"bg-gradient-to-br from-blue-500 to-[#FF4500]"),children:(0,a.jsx)(h.Z,{className:"w-8 h-8 text-white"})}),(0,a.jsx)("h1",{className:"text-2xl sm:text-3xl font-bold mb-2 ".concat("dark"===t?"text-white":"text-gray-900"),style:{fontFamily:"Rajdhani, sans-serif"},children:"Reset Your Password"}),(0,a.jsx)("p",{className:"text-sm sm:text-base ".concat("dark"===t?"text-gray-400":"text-gray-600"),children:"Choose a strong password for your account"})]}),(0,a.jsxs)("form",{onSubmit:I,className:"space-y-6",noValidate:!0,children:[(0,a.jsx)(j.II,{label:"New password",icon:f.Z,type:A?"text":"password",value:n,autoComplete:"new-password",onChange:e=>{k(e.target.value),Z&&C("")},placeholder:"Enter new password",disabled:R,error:Z,endAdornment:(0,a.jsx)("button",{type:"button",onClick:()=>
1_(!A),className:"touch-target inline-flex rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-[#0079D3]/40 ".concat("dark"===t?"text-[#818384] hover:text-[#D7DADC]":"text-gray-500 hover:text-gray-700"),"aria-label":A?"Hide password":"Show password",children:A?(0,a.jsx)(w.Z,{className:"w-4 h-4"}):(0,a.jsx)(p.Z,{className:"w-4 h-4"})})}),(0,a.jsx)(j.II,{label:"Confirm password",icon:f.Z,type:z?"text":"password",value:v,autoComplete:"new-password",onChange:e=>{N(e.target.value),F&&E("")},placeholder:"Confirm new password",disabled:R,error:F,endAdornment:(0,a.jsx)("button",{type:"button",onClick:()=>T(!z),className:"touch-target inline-flex rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-[#0079D3]/40 ".concat("dark"===t?"text-[#818384] hover:text-[#D7DADC]":"text-gray-500 hover:text-gray-700"),"aria-label":z?"Hide password confirmation":"Show password confirmation",children:z?(0,a.jsx)(w.Z,{className:"w-4 h-4"}):(0,a.jsx)(p.Z,{className:"w-4 h-4"})})}),n&&(0,a.jsx)("div",{className:"p-4 rounded-xl text-sm space-y-2 ".concat("dark"===t?"bg-[#1A1A1B] border border-[#343536]":"bg-gray-50 border border-gray-200"),children:q.map((e,s)=>(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[e.met?(0,a.jsx)(y.Z,{className:"w-4 h-4 text-green-500 flex-shrink-0"}):(0,a.jsx)(g.Z,{className:"w-4 h-4 flex-shrink-0 ".concat("dark"===t?"text-[#818384]":"text-gray-400")}),(0,a.jsx)("span",{className:e.met?"dark"===t?"text-green-400":"text-green-600":"dark"===t?"text-[#818384]":"text-gray-600",children:e.label})]},s))}),(0,a.jsx)(j.zx,{type:"submit",disabled:R,className:"w-full bg-[#FF4500] hover:bg-[#E03D00] text-white font-semibold py-4 rounded-xl transition-all duration-300 shadow-lg hover:shadow-xl flex items-center justify-center space-x-3 disabled:opacity-50 disabled:cursor-not-allowed",children:R?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.Z,{className:"w-5 h-5 animate-spin"}),(0,a.jsx)("span",{children:"Resetting..."})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.Z,{className:"w-5 h-5"}),(0,a.jsx)("span",{children:"Reset Password"})]})})]})]})})})})]})]})}}},function(e){e.O(0,[4968,1296,5412,2888,9774,179],function(){return e(e.s=21173)}),_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.