PageSourceSearch

https://muscatwhereto.com/assets/ResetPasswordVendor-DSTrIBxv.js

js muscatwhereto.com collected 2026-09-25 03:31:46 UTC 3,812 bytes, 1 lines download raw bytes

1import{j as s}from"./framer-DUyP8Svs.js";import{O as p,a8 as x,N as w,I as h,B as b,z as a,ac as C}from"./index-tzro_5vl.js";import{b as S,e as E,a as o}from"./react-BUPFSq0h.js";import{A,a as I,c as R}from"./constants-PpBv9nKM.js";import{E as f}from"./eye-ClT7UjoT.js";import{E as g}from"./eye-off-dkVOBv29.js";import"./dnd-CHbJIMpc.js";import"./arrow-left-BPENlDO4.js";import"./createLucideIcon-DEatH7sS.js";const _=()=>{const n=S(),{token:m}=E(),[r,N]=o.useState(""),[i,j]=o.useState(""),[l,v]=o.useState(!1),[d,y]=o.useState(!1),[t,u]=o.useState(!1);async function P(e){if(e.preventDefault(),!r||!i)return a.error("Please fill in both password fields.");if(r!==i)return a.error("Password and confirm password should be the same.");if(!m)return a.error("Invalid reset link.");try{u(!0);const c={token:m,password:r},{data:k}=await C(c);k.success===!0&&(a.success("Password updated. You can now login with your new password."),n("/vendor/login"))}catch(c){a.error(c.response?.data?.data||"Unable to reset password.")}finally{u(!1)}}return s.jsx(A,{backgroundImage:R,backgroundPosition:"center",overlayClassName:"bg-gradient-to-br from-neutral/88 via-neutral/72 to-neutral/42",onBack:()=>n(-1),logoSrc:"/images/logo/logo-main.webp",logoAlt:"Where To",tagline:I,children:s.jsxs("div",{className:"bg-base-100 flex flex-col gap-8 rounded-[2rem] px-6 pt-12 pb-8 sm:px-10",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("h1",{className:"font-outfit text-4xl font-bold tracking-tight sm:text-5xl",children:"Reset password"}),s.jsx("p",{className:"text-base-content-subtle mt-2 text-sm font-medium tracking-wide",children:"Enter your new password to secure your vendor account"})]}),s.jsxs("form",{onSubmit:P,className:"space-y-6",children:[s.jsxs(p,{children:[s.jsx(x,{className:"text-base-content-subtle mb-1.5 text-xs font-semibold tracking-widest uppercase",children:"New Password"}),s.jsxs("div",{className:"relative",children:[s.jsx(w,{id:"password",name:"password",type:l?"text":"password",size:"lg",className:"auth-input pr-12",placeholder:"••••••••",value:r,onChange:e=>N(e.target.value),isDisabled:t,autoComplete:"new-password"}),s.jsx("div",{className:"absolute inset-y-0 right-2 flex items-center",children:s.jsx(h,{type:"button","aria-label":l?"Hide password":"Show password",icon:l?s.jsx(f,{className:"h-4 w-4"}):s.jsx(g,{className:"h-4 w-4"}),onClick:()=>v(e=>!e),disabled:t,className:"text-base-content/45 hover:bg-base-100 hover:text-base-content h-10 w-10 rounded-full"})})]})]}),s.jsxs(p,{children:[s.jsx(x,{className:"text-base-content-subtle mb-1.5 text-xs font-semibold tracking-widest uppercase",children:"Confirm Password"}),s.jsxs("div",{className:"relative",children:[s.jsx(w,{id:"confirm-password",name:"confirm-password",type:d?"text":"password",size:"lg",className:"auth-input pr-12",placeholder:"••••••••",value:i,onChange:e=>j(e.target.value),isDisabled:t,autoComplete:"new-password"}),s.jsx("div",{className:"absolute inset-y-0 right-2 flex items-center",children:s.jsx(h,{type:"button","aria-label":d?"Hide password":"Show password",icon:d?s.jsx(f,{className:"h-4 w-4"}):s.jsx(g,{className:"h-4 w-4"}),onClick:()=>y(e=>!e),disabled:t,className:"text-base-content/45 hover:bg-base-100 hover:text-base-content h-10 w-10 rounded-full"})})]})]}),s.jsx(b,{type:"submit",colorScheme:"primary",modifier:"block",size:"lg",isLoading:t,loadingText:"Resetting...",children:"Reset Password"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-base-content/55 text-xs font-semibold tracking-[0.22em] uppercase",children:"Remembered your password?"}),s.jsx(b,{variant:"ghost",className:"text-accent mt-2 h-auto min-h-0 py-0 text-sm font-semibold",onClick:()=>n(-1),children:"Back to login"})]})]})})};export{_ as default};

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.