PageSourceSearch

https://mysendbit.com/assets/Login-B8UuiUq9.js

js mysendbit.com collected 2026-10-02 00:53:15 UTC 8,382 bytes, 1 lines download raw bytes

1import{r as h,h as S,j as e,L as x}from"./vendor-react-Dw7X3JZT.js";import{ac as L,ad as k}from"./vendor-CZR7Gm73.js";import{l as A}from"./auth-BKUOP0E3.js";import{S as C}from"./SideImage--xG-UFQG.js";import{u as f,a as M,l as B,b as E}from"./index-BEZ7mpN6.js";import{L as b,y as F,ai as P,aj as z}from"./vendor-ui-ODtAki8E.js";import"./vendor-framer-motion-CpxrKHsN.js";import"./vendor-utils-WadUx6vN.js";const R=()=>{const[n,y]=h.useState(!1),[c,u]=h.useState(null),d=S(),{login:w,resendOtp:j,isLoading:a,error:m}=f(),{addToast:l}=M(),p=async t=>{u(t);try{const s=E.getSocialRedirectUrl(t,"login");window.location.href=s}catch{u(null),l({title:"Social login unavailable",description:"Configuration error. Please try again later.",variant:"destructive"})}},{register:g,handleSubmit:v,formState:{errors:r,isSubmitting:i}}=L({resolver:k(A),defaultValues:{email:"",password:"",rememberMe:!1}}),N=v(async t=>{try{const s=await w(t.email,t.password);if(s.success){const o=f.getState().successMessage;l({title:"Login successful!",description:o||"Welcome back!",variant:"success"}),d("/dashboard/home")}else if(s.requiresOtpVerification)await j(t.email,"sms").catch(()=>null),l({title:"Verify your account",description:"Your account isn't verified yet. We've sent a new OTP to your phone.",variant:"success"}),d("/auth/verify-account",{state:{email:t.email}});else if(s.requiresVerification)d("/auth/device-verification",{state:{email:t.email}});else{const o=s.errors?.email;l({title:"Login failed",description:(Array.isArray(o)?o.join(" "):o)||s.message||"Invalid credentials.",variant:"destructive"})}}catch(s){l({title:"Login failed",description:m||(s instanceof Error?s.message:"An unexpected error occurred."),variant:"destructive"})}});return e.jsxs("div",{className:"min-h-screen flex bg-white",children:[e.jsxs("div",{className:"flex-1 flex flex-col px-6 py-10 sm:px-10 lg:px-16 lg:shadow-2xl lg:z-10",children:[e.jsx(x,{to:"/",className:"mb-10 inline-block",children:e.jsx("img",{src:B,alt:"SendBit",className:"h-10 w-auto"})}),e.jsxs("div",{className:"flex-1 flex flex-col justify-center max-w-sm w-full mx-auto",children:[e.jsx("div",{className:"w-16 h-16 rounded-2xl bg-purple-50 flex items-center justify-center mb-6",children:e.jsx(b,{className:"w-8 h-8 text-purple-700"})}),e.jsx("h1",{className:"text-3xl font-bold text-gray-900 mb-1",children:"Welcome Back."}),e.jsx("p",{className:"text-gray-500 text-sm mb-8",children:"Sign in to your SendBit account."}),e.jsxs("form",{onSubmit:N,className:"space-y-5",children:[e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 mb-1.5",children:["Email Address ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx(F,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400 pointer-events-none"}),e.jsx("input",{id:"email",type:"email",autoComplete:"email",placeholder:"Enter your email address",className:`w-full pl-10 pr-4 py-3.5 rounded-xl bg-gray-50 border text-sm transition-colors focus:outline-none focus:ring-2 focus:ring-purple-100 ${r.email?"border-red-400 focus:border-red-400":"border-gray-200 focus:border-purple-600"}`,...g("email")})]}),r.email&&e.jsx("p",{className:"mt-1 text-xs text-red-500",children:r.email.message})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-700 mb-1.5",children:["Password ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx(b,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400 pointer-events-none"}),e.jsx("input",{id:"password",type:n?"text":"password",autoComplete:"current-password",placeholder:"Password",className:`w-full pl-10 pr-12 py-3.5 rounded-xl bg-gray-50 border text-sm transition-colors focus:outline-none focus:ring-2 focus:ring-purple-100 ${r.password?"border-red-400 focus:border-red-400":"border-gray-200 focus:border-purple-600"}`,...g("password")}),e.jsx("button",{type:"button",onClick:()=>y(!n),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 transition-colors","aria-label":n?"Hide password":"Show password",children:n?e.jsx(P,{className:"w-5 h-5"}):e.jsx(z,{className:"w-5 h-5"})})]}),r.password&&e.jsx("p",{className:"mt-1 text-xs text-red-500",children:r.password.message})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(x,{to:"/auth/forget-password",className:"text-sm font-medium text-purple-700 hover:text-purple-800 transition-colors",children:"Forgot Password?"})}),m&&e.jsx("p",{className:"text-sm text-red-500 bg-red-50 border border-red-100 rounded-lg px-3 py-2",children:m}),e.jsxs("button",{type:"submit",disabled:i||a,className:"w-full py-4 rounded-full bg-purple-700 hover:bg-purple-800 text-white font-semibold text-sm transition-colors disabled:opacity-60 disabled:cursor-not-allowed flex items-center justify-center gap-2",children:[(i||a)&&e.jsx("span",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),i||a?"Signing in…":"Login"]}),e.jsxs("p",{className:"text-center text-sm text-gray-500",children:["Don't have an account?"," ",e.jsx(x,{to:"/auth/register",className:"font-semibold text-purple-700 hover:text-purple-800 transition-colors",children:"Sign up"})]}),e.jsxs("div",{className:"flex items-center gap-3 my-1",children:[e.jsx("div",{className:"flex-1 h-px bg-gray-200"}),e.jsx("span",{className:"text-xs text-gray-400 whitespace-nowrap",children:"or continue with"}),e.jsx("div",{className:"flex-1 h-px bg-gray-200"})]}),e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs("button",{type:"button",onClick:()=>p("google"),disabled:!!c||i||a,className:"w-full flex items-center justify-center gap-3 py-3 px-4 roun
1ded-xl border border-gray-200 bg-white hover:bg-gray-50 text-sm font-medium text-gray-700 transition-colors disabled:opacity-60 disabled:cursor-not-allowed",children:[c==="google"?e.jsx("span",{className:"w-5 h-5 border-2 border-gray-300 border-t-gray-600 rounded-full animate-spin"}):e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 48 48","aria-hidden":"true",children:[e.jsx("path",{fill:"#4285F4",d:"M46.145 24.504c0-1.637-.148-3.21-.422-4.717H24v8.924h12.421c-.536 2.882-2.157 5.326-4.598 6.966v5.793h7.447c4.355-4.01 6.875-9.918 6.875-16.966z"}),e.jsx("path",{fill:"#34A853",d:"M24 48c6.24 0 11.472-2.07 15.27-5.63l-7.447-5.793c-2.065 1.384-4.707 2.2-7.823 2.2-6.015 0-11.107-4.062-12.928-9.52H3.434v5.984C7.214 42.577 15.013 48 24 48z"}),e.jsx("path",{fill:"#FBBC05",d:"M11.072 29.257A14.98 14.98 0 0 1 10.5 24c0-1.827.313-3.604.572-5.257V12.76H3.434A23.95 23.95 0 0 0 0 24c0 3.868.927 7.527 2.567 10.756l8.505-5.499z"}),e.jsx("path",{fill:"#EA4335",d:"M24 9.48c3.39 0 6.437 1.166 8.83 3.453l6.617-6.617C35.463 2.434 30.24 0 24 0 15.013 0 7.214 5.423 3.434 13.244l8.638 5.499C13.893 13.542 18.985 9.48 24 9.48z"})]}),"Sign in with Google"]}),e.jsxs("button",{type:"button",onClick:()=>p("apple"),disabled:!!c||i||a,className:"w-full flex items-center justify-center gap-3 py-3 px-4 rounded-xl border border-gray-200 bg-white hover:bg-gray-50 text-sm font-medium text-gray-700 transition-colors disabled:opacity-60 disabled:cursor-not-allowed",children:[c==="apple"?e.jsx("span",{className:"w-5 h-5 border-2 border-gray-300 border-t-gray-600 rounded-full animate-spin"}):e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701"})}),"Sign in with Apple"]})]})]})]}),e.jsxs("p",{className:"mt-10 text-xs text-gray-400 text-center lg:text-left",children:["© ",new Date().getFullYear()," SendBit. All rights reserved."]})]}),e.jsx("div",{className:"hidden lg:flex lg:w-[45%] shrink-0",children:e.jsx(C,{})})]})};export{R 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.