PageSourceSearch

https://fixdirectly.com/static/js/663.c046629e.chunk.js

js fixdirectly.com collected 2026-10-04 03:14:28 UTC 6,093 bytes, 3 lines download raw bytes

1/*! For license information please see 663.c046629e.chunk.js.LICENSE.txt */
2"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[663],{663:(e,t,a)=>{a.r(t),a.d(t,{OtpVerificationPage:()=>u});var s=a(5043),r=a(9981),n=a(285),l=a(3390),i=a(1140),d=a(2024),c=a(5327),o=a(4805),m=a(8384),x=a(579);const u=()=>{var e,t;const a=(0,r.Zp)(),u=(0,r.zy)(),h=(null===(e=u.state)||void 0===e?void 0:e.email)||"",f=(null===(t=u.state)||void 0===t?void 0:t.redirect)||null,[b]=(0,s.useState)(h),[p,g]=(0,s.useState)(["","","","","",""]),[v,y]=(0,s.useState)(""),[j,w]=(0,s.useState)(!1),[N,k]=(0,s.useState)(!1),[A,S]=(0,s.useState)(0),[D,C]=(0,s.useState)(!1),M=(0,s.useRef)([]);(0,s.useEffect)(()=>{b||a("/signup",{replace:!0})},[b,a]),(0,s.useEffect)(()=>{if(A<=0)return;const e=setTimeout(()=>S(e=>e-1),1e3);return()=>clearTimeout(e)},[A]);const V=async e=>{if(j)return;w(!0),y("");const t=await n.y.verifyOtp(b,e);var s,r;t.success?a(f||(e=>{switch(null===e||void 0===e?void 0:e.toLowerCase()){case"provider":return"/provider-dashboard";case"admin":return"/admin";default:return"/customer-dashboard"}})(null===(s=t.user)||void 0===s?void 0:s.role),{replace:!0}):(y(t.message||"Invalid code. Please try again."),g(["","","","","",""]),null===(r=M.current[0])||void 0===r||r.focus(),w(!1))},P=b?b.replace(/^(.{2})(.*)(@.*)$/,(e,t,a,s)=>t+"*".repeat(Math.max(a.length,3))+s):"";return(0,x.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-emerald-50 via-white to-teal-50 flex items-center justify-center px-4 py-12",children:(0,x.jsxs)("div",{className:"w-full max-w-md",children:[(0,x.jsxs)("div",{className:"text-center mb-8",children:[(0,x.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-emerald-600 mb-4 shadow-lg",children:(0,x.jsx)(m.A,{className:"w-8 h-8 text-white"})}),(0,x.jsxs)("h1",{className:"text-3xl font-bold text-gray-900",children:["Fix",(0,x.jsx)("span",{className:"text-emerald-600",children:"Directly"})]})]}),(0,x.jsx)(i.Zp,{className:"bg-white rounded-2xl shadow-xl border-0 overflow-hidden",children:(0,x.jsxs)(i.Wu,{className:"p-8",children:[(0,x.jsxs)("div",{className:"text-center mb-8",children:[(0,x.jsx)("div",{className:"inline-flex items-center justify-center w-12 h-12 rounded-full bg-emerald-100 mb-4",children:(0,x.jsx)(c.A,{className:"w-6 h-6 text-emerald-600"})}),(0,x.jsx)("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Verify your email"}),(0,x.jsxs)("p",{className:"text-gray-500 text-sm leading-relaxed",children:["We sent a 6-digit code to",(0,x.jsx)("br",{}),(0,x.jsx)("span",{className:"font-medium text-gray-700",children:P})]})]}),(0,x.jsxs)("form",{onSubmit:e=>{e.preventDefault();const t=p.join("");6===t.length?V(t):y("Please enter all 6 digits.")},noValidate:!0,children:[(0,x.jsx)("div",{className:"flex justify-center gap-3 mb-6",onPaste:e=>{var t;e.preventDefault();const a=e.clipboardData.getData("text").replace(/\D/g,"").slice(0,6);if(!a)return;const s=Array.from({length:6},(e,t)=>a[t]||"");g(s),y(""),null===(t=M.current[Math.min(a.length,5)])||void 0===t||t.focus(),6===a.length&&V(a)},children:p.map((e,t)=>(0,x.jsx)("input",{ref:e=>M.current[t]=e,type:"text",inputMode:"numeric",pattern:"\\d*",maxLength:1,value:e,onChange:e=>((e,t)=>{if(!/^\d*$/.test(t))return;const a=[...p];var s;a[e]=t.slice(-1),g(a),y(""),t&&e<5&&(null===(s=M.current[e+1])||void 0===s||s.focus()),a.every(e=>""!==e)&&6===a.join("").length&&V(a.join(""))})(t,e.target.value),onKeyDown:e=>((e,t)=>{var a;"Backspace"===t.key&&!p[e]&&e>0&&(null===(a=M.current[e-1])||void 0===a||a.focus())})(t,e),disabled:j,autoFocus:0===t,className:"w-12 h-14 sm:w-14 sm:h-16 text-center text-2xl font-bold rounded-xl border-2 outline-none transition-all\n                      ".concat(v?"border-red-400 bg-red-50 text-red-700":e?"border-emerald-500 bg-emerald-50 text-emerald-700":"border-gray-200 bg-gray-50 text-gray-900 focus:border-emerald-500 focus:bg-white","\n                      disabled:opacity-50 disabled:cursor-not-allowed")},t))}),v&&(0,x.jsx)("p",{className:"text-center text-sm text-red-600 mb-4",children:v}),D&&!v&&(0,x.jsx)("p",{className:"text-center text-sm text-emerald-600 mb-4",children:"A new code has been sent to your email."}),(0,x.jsx)(l.$,{type:"submit",disabled:j||6!==p.join("").length,className:"w-full h-12 bg-emerald-600 hover:bg-emerald-700 text-white font-semibold rounded-xl text-base transition-colors mb-4",children:j?(0,x.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,x.jsx)(d.A,{className:"w-4 h-4 animate-spin"}),"Verifying\u2026"]}):"Verify Email"}),(0,x.jsxs)("div",{className:"text-center",children:[(0,x.jsx)("p",{className:"text-sm text-gray-500 mb-2",children:"Didn't receive the code?"}),(0,x.jsxs)("button",{type:"button",onClick:async()=>{var e;A>0||N||(k(!0),C(!1),await n.y.resendOtp(b),k(!1),C(!0),S(60),g(["","","","","",""]),y(""),null===(e=M.current[0])||void 0===e||e.focus())},disabled:A>0||N,className:"inline-flex items-center gap-1.5 text-sm font-medium text-emerald-600 hover:text-emerald-700 disabled:text-gray-400 disabled:cursor-not-allowed transition-colors",children:[N?(0,x.jsx)(d.A,{className:"w-3.5 h-3.5 animate-spin"}):(0,x.jsx)(o.A,{className:"w-3.5 h-3.5"}),A>0?"Resend in ".concat(A,"s"):"Resend code"]})]})]})]})}),(0,x.jsxs)("p",{className:"text-center text-sm text-gray-500 mt-6",children:["Wrong email?"," ",(0,x.jsx)("a",{href:"/signup",className:"text-emerald-600 hover:text-emerald-700 font-medium",children:"Sign up again"})]})]})})}},4805:(e,t,a)=>{a.d(t,{A:()=>s});const s=(0,a(7784).A)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])},8384:(e,t,a)=>{a.d(t,{A:()=>s});const s=(0,a(7784).A)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
2y:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])}}]);
3//# sourceMappingURL=663.c046629e.chunk.js.map

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.