PageSourceSearch

https://www.xplorence.com/assets/Reset-BGPiVcHL.js

js xplorence.com collected 2026-09-24 14:57:49 UTC 4,557 bytes, 1 lines download raw bytes

1import{u as k,t as S,i as C,a as E,r as a,j as e,N as D,m as L,l as g,L as A,C as F,q as T,F as _}from"./index-Cr1q2B_P.js";import{r as X,X as R}from"./xn-CtFGW3l3.js";import{L as w}from"./loader-circle-CuNRwkpC.js";import{E as M}from"./eye-off-DhPQlxh6.js";import{E as $}from"./eye-BNxw6vkP.js";function B(){const{t}=k(),{token:d}=S(),v=C();E({title:"Reset password | Xplorence",description:"Set a new password for the Xplorence Expert Network portal.",noindex:!0});const[o,x]=a.useState(d?"form":"invalid"),[i,j]=a.useState(""),[m,N]=a.useState(""),[c,y]=a.useState(!1),[p,r]=a.useState(""),[l,u]=a.useState(!1),P=async s=>{if(s.preventDefault(),r(""),i.length<6){r(t("activate.errShort"));return}if(i!==m){r(t("activate.errMismatch"));return}u(!0);try{await X(d,i),x("done"),setTimeout(()=>v("/network"),1600)}catch(f){const n=f instanceof R?f.code:"";n==="password_short"?r(t("activate.errShort")):n==="not_found"||n==="used"||n==="expired"?x("invalid"):r(t("activate.errGeneric"))}finally{u(!1)}},b="text-xs font-semibold tracking-wide text-[#8E9399] uppercase block mb-1.5",h="w-full bg-white border border-gray-200 rounded-xl px-4 py-3 text-[#0A1128] text-sm focus:outline-none focus:border-[#0084D4] focus:ring-1 focus:ring-[#0084D4]";return e.jsxs("div",{className:"min-h-screen bg-[#F8FAFC] text-black font-sans",children:[e.jsx(D,{}),e.jsxs("main",{className:"pt-32 pb-24 relative overflow-hidden min-h-[70vh] flex items-center",children:[e.jsx("div",{className:"absolute top-0 left-0 w-[700px] h-[700px] bg-brand-primary/5 rounded-full blur-[120px] -translate-x-1/2 -translate-y-1/2 pointer-events-none"}),e.jsx("div",{className:"max-w-md w-full mx-auto px-6 relative z-10",children:e.jsxs(L.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.5},className:"bg-white/60 backdrop-blur-2xl rounded-[2rem] p-8 md:p-10 shadow-[0_8px_32px_rgba(0,0,0,0.05)] border border-white/60",children:[o==="invalid"&&e.jsxs("div",{className:"flex flex-col items-center text-center py-6",children:[e.jsx(g,{className:"w-14 h-14 text-amber-500 mb-5"}),e.jsx("h1",{className:"text-2xl font-bold mb-2 text-[#0A1128]",children:t("resetPage.invalidTitle")}),e.jsx("p",{className:"text-[#505759] mb-6",children:t("resetPage.invalidDesc")}),e.jsx(A,{to:"/network",className:"text-sm font-semibold text-[#0084D4] hover:underline",children:t("resetPage.backToLogin")})]}),o==="done"&&e.jsxs("div",{className:"flex flex-col items-center text-center py-8",children:[e.jsx(F,{className:"w-16 h-16 text-emerald-600 mb-5"}),e.jsx("h1",{className:"text-2xl font-bold mb-2 text-[#0A1128]",children:t("resetPage.doneTitle")}),e.jsxs("p",{className:"text-[#505759] flex items-center gap-2",children:[e.jsx(w,{className:"w-4 h-4 animate-spin"})," ",t("activate.doneDesc")]})]}),o==="form"&&e.jsxs("form",{onSubmit:P,children:[e.jsxs("div",{className:"flex flex-col items-center text-center mb-7",children:[e.jsx("div",{className:"w-12 h-12 rounded-2xl bg-[#0084D4]/10 flex items-center justify-center mb-4",children:e.jsx(T,{className:"w-6 h-6 text-[#0084D4]"})}),e.jsx("h1",{className:"text-2xl font-bold mb-1 text-[#0A1128]",children:t("resetPage.title")}),e.jsx("p",{className:"text-sm text-[#505759]",children:t("resetPage.subtitle")})]}),p&&e.jsxs("div",{className:"p-3 mb-5 bg-red-500/10 border border-red-500/20 rounded-xl flex items-center gap-2 text-red-600 text-sm",children:[e.jsx(g,{className:"w-4 h-4 shrink-0"})," ",p]}),e.jsx("label",{className:b,children:t("resetPage.passwordLabel")}),e.jsxs("div",{className:"relative mb-4",children:[e.jsx("input",{type:c?"text":"password",value:i,onChange:s=>j(s.target.value),placeholder:t("activate.passwordPlaceholder"),disabled:l,autoFocus:!0,className:`${h} pr-11`}),e.jsx("button",{type:"button",onClick:()=>y(s=>!s),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",tabIndex:-1,children:c?e.jsx(M,{className:"w-4 h-4"}):e.jsx($,{className:"w-4 h-4"})})]}),e.jsx("label",{className:b,children:t("activate.confirmLabel")}),e.jsx("input",{type:c?"text":"password",value:m,onChange:s=>N(s.target.value),placeholder:t("activate.passwordPlaceholder"),disabled:l,className:`${h} mb-6`}),e.jsxs("button",{type:"submit",disabled:l,className:"w-full bg-[#0084D4] text-white font-semibold py-3.5 rounded-xl hover:bg-[#006bb0] transition-colors disabled:opacity-60 flex items-center justify-center gap-2",children:[l&&e.jsx(w,{className:"w-4 h-4 animate-spin"}),t(l?"resetPage.submitting":"resetPage.submit")]})]})]})})]}),e.jsx(_,{})]})}
1export{B as Reset,B 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.