PageSourceSearch

https://www.fintavapay.com/assets/VerifyPin-bb2889c9.js

js fintavapay.com collected 2026-09-24 14:44:04 UTC 2,677 bytes, 1 lines download raw bytes

1import{c as O,ai as b,r as a,j as e,L as y,R as m,K as p,X as D,B as L,an as C,cL as k,ap as f}from"./index-eb9fe256.js";import{P as M}from"./react-pin-field.esm-d277dcee.js";import{A as T}from"./AuthCard-a14d815c.js";/* empty css              */import"./brand-logo-e0ebdc78.js";const B="admin_forgot_password_email",F=30,U=()=>{const g=O(),h=b(),[_,r]=a.useState(!1),[N,o]=a.useState(!1),[x,n]=a.useState([]),[S,c]=a.useState(!1),[P,l]=a.useState("PIN verified"),[j,R]=a.useState(!1),[i,u]=a.useState(0),d=a.useRef({pin:""});a.useEffect(()=>{if(i<=0)return;const t=window.setInterval(()=>{u(s=>s-1)},1e3);return()=>window.clearInterval(t)},[i]);const E=t=>{const s=t.replace(/\D/g,"").slice(0,6);d.current.pin=s,R(s.length===6)},I=t=>()=>{n(s=>s.filter((V,A)=>A!==t))},v=async()=>{const t=C(B);if(!t){n(["Start the forgot password flow again to resend your PIN."]);return}if(!navigator.onLine){n(["No internet connection."]);return}o(!0),n([]);const s=await h(k.endpoints.forgotPassword.initiate(t));if(!s){n(["Unexpected error"]),o(!1);return}if(Object.hasOwn(s,"error")){f(s,n),o(!1);return}l("A new PIN has been sent."),c(!0),u(F),o(!1)},w=async()=>{if(!navigator.onLine){n(["No internet connection."]);return}if(d.current.pin.length!==6){n(["Enter the 6-digit PIN."]);return}r(!0),n([]);const t={data:!0};if(!t){n(["Unexpected error"]),r(!1);return}if(Object.hasOwn(t,"error")){f(t,n),r(!1);return}l("PIN verified"),c(!0),setTimeout(()=>{g(`${m.ADMIN_RESET_PASSWORD.replace(":token",d.current.pin)}`),r(!1)},800)};return e.jsxs(T,{title:"Verify pin",subtitle:"Enter the PIN to continue resetting your password.",footer:e.jsxs(e.Fragment,{children:["Remember it?"," ",e.jsx(y,{className:"admin-auth-card__link",to:m.ADMIN_LOGIN,children:"Back to login"})]}),children:[x.map((t,s)=>e.jsx(p,{text:t,type:"danger",dismiss:I(s)},D())),S&&e.jsx(p,{text:P,type:"success",dismiss:()=>c(!1)}),e.jsx("section",{className:"admin-login__form",children:e.jsxs("div",{className:"admin-login__input",children:[e.jsx("div",{className:"admin-login__label",children:"PIN"}),e.jsx("div",{className:"admin-login__pin-field",children:e.jsx(M,{length:6,type:"text",inputMode:"numeric",pattern:"[0-9]*",autoComplete:"one-time-code",validate:"0123456789",onChange:E,className:"admin-login__pin-input"})})]})}),e.jsx("div",{className:"admin-login__resend",children:e.jsx("button",{type:"button",className:"admin-login__resend-button",onClick:v,disabled:N||i>0,children:i>0?`Resend PIN in ${i}s`:"Resend PIN"})}),e.jsx(L,{className:"admin-auth-card__button",disabled:!j,loading:_,onClick:w,children:e.jsx("span",{children:"Proceed to reset password"})})]})},X=()=>e.jsx(U,{});export{X 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.