PageSourceSearch

https://availor.ai/_next/static/chunks/app/%5Blocale%5D/login/page…?dpl=dpl_9pK1EkrUJsGkq3daNfS4joeqrdqE

js availor.ai collected 2026-10-05 13:28:55 UTC 5,207 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[67],{1980:function(e,a,t){Promise.resolve().then(t.bind(t,5760))},6463:function(e,a,t){"use strict";var r=t(1169);t.o(r,"permanentRedirect")&&t.d(a,{permanentRedirect:function(){return r.permanentRedirect}}),t.o(r,"redirect")&&t.d(a,{redirect:function(){return r.redirect}}),t.o(r,"usePathname")&&t.d(a,{usePathname:function(){return r.usePathname}}),t.o(r,"useRouter")&&t.d(a,{useRouter:function(){return r.useRouter}}),t.o(r,"useSearchParams")&&t.d(a,{useSearchParams:function(){return r.useSearchParams}})},5760:function(e,a,t){"use strict";t.r(a),t.d(a,{default:function(){return c}});var r=t(7437),s=t(7138),l=t(6648),o=t(2265),n=t(6463);function c(){let e=(0,n.useRouter)(),[a,t]=(0,o.useState)(""),[c,i]=(0,o.useState)(""),[d,u]=(0,o.useState)(!1),[m,h]=(0,o.useState)(""),x=async t=>{t.preventDefault(),u(!0),h("");try{let t=await fetch("".concat("https://ca-availor-dev.bluefield-e6d1e8da.westus2.azurecontainerapps.io","/auth/login"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:a,password:c})}),r=await t.json();if(t.ok)localStorage.setItem("availor_token",r.access_token),e.push("/dashboard/business");else{let e=r.detail;Array.isArray(e)?h(e.map(e=>e.msg||"").join(". ")||"Invalid email or password"):h("string"==typeof e?e:"Invalid email or password")}}catch(e){console.error("Login failed:",e),h("Something went wrong. Please try again.")}finally{u(!1)}};return(0,r.jsxs)("div",{className:"min-h-screen bg-cream flex items-center justify-center relative overflow-hidden",children:[(0,r.jsx)("div",{className:"absolute top-0 right-0 w-[600px] h-[600px] bg-gradient-to-br from-coral/8 to-transparent rounded-full blur-3xl -translate-y-1/2 translate-x-1/3"}),(0,r.jsx)("div",{className:"absolute bottom-0 left-0 w-[500px] h-[500px] bg-gradient-to-tr from-plum/6 to-transparent rounded-full blur-3xl translate-y-1/2 -translate-x-1/3"}),(0,r.jsx)("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[800px] h-[800px] bg-gradient-to-br from-gold/5 to-transparent rounded-full blur-3xl"}),(0,r.jsxs)("div",{className:"relative z-10 w-full max-w-md px-6",children:[(0,r.jsx)("div",{className:"text-center mb-10",children:(0,r.jsx)(s.default,{href:"/",className:"inline-block",children:(0,r.jsx)(l.default,{src:"/logo-color.png",alt:"Availor",width:1020,height:318,className:"mx-auto h-12 w-auto"})})}),(0,r.jsxs)("div",{className:"bg-white/80 backdrop-blur-xl rounded-xl p-8 border border-plum/8 shadow-[0_8px_40px_rgba(56,66,89,0.08)]",children:[(0,r.jsx)("h1",{className:"heading-serif text-3xl text-center text-charcoal mb-2",children:"Welcome back"}),(0,r.jsx)("p",{className:"text-charcoal-light text-center mb-8",children:"Sign in to manage your AI receptionist"}),m&&(0,r.jsx)("div",{className:"mb-6 p-3 rounded-xl bg-red-50 border border-red-200 text-red-600 text-sm text-center",children:m}),(0,r.jsxs)("form",{onSubmit:x,className:"space-y-5",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"email",className:"block text-sm font-medium text-charcoal mb-2",children:"Email address"}),(0,r.jsx)("input",{type:"email",id:"email",value:a,onChange:e=>t(e.target.value),required:!0,className:"w-full px-4 py-3 rounded-xl bg-cream/60 border border-plum/10 text-charcoal placeholder-charcoal-light/50 focus:outline-none focus:ring-2 focus:ring-coral/30 focus:border-coral/40 transition-all",placeholder:"[email protected]"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"password",className:"block text-sm font-medium text-charcoal mb-2",children:"Password"}),(0,r.jsx)("input",{type:"password",id:"password",value:c,onChange:e=>i(e.target.value),required:!0,className:"w-full px-4 py-3 rounded-xl bg-cream/60 border border-plum/10 text-charcoal placeholder-charcoal-light/50 focus:outline-none focus:ring-2 focus:ring-coral/30 focus:border-coral/40 transition-all",placeholder:"Your password"})]}),(0,r.jsx)("button",{type:"submit",disabled:d,className:"w-full btn-primary py-4 rounded-xl disabled:opacity-50 disabled:cursor-not-allowed",children:d?(0,r.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,r.jsxs)("svg",{className:"animate-spin w-5 h-5",fill:"none",viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,r.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Signing in..."]}):"Sign In"})]}),(0,r.jsx)("div",{className:"mt-8 pt-6 border-t border-plum/8 text-center",children:(0,r.jsxs)("p",{className:"text-charcoal-light",children:["Don't have an account?"," ",(0,r.jsx)(s.default,{href:"/signup",className:"text-coral hover:text-coral-dark font-medium transition-colors",children:"Sign up"})]})})]}),(0,r.jsx)("div",{className:"mt-8 text-center",children:(0,r.jsx)(s.default,{href:"/",className:"text-charcoal-light hover:text-charcoal transition-colors text-sm",children:"← Back to home"})})]})]})}}},function(e){e.O(0,[138,648,971,23,744],function(){return e(e.s=1980)}),_N_E=e.O()}]);

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.