1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,15288,e=>{"use strict";var t=e.i(43476),a=e.i(75157);e.s(["Card",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card",className:(0,a.cn)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...r})},"CardContent",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,a.cn)("px-6",e),...r})},"CardDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,a.cn)("text-muted-foreground text-sm",e),...r})},"CardHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,a.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...r})},"CardTitle",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,a.cn)("leading-none font-semibold",e),...r})}])},93479,e=>{"use strict";var t=e.i(43476),a=e.i(71645),r=e.i(75157);let s=a.forwardRef(({className:e,type:a,...s},n)=>(0,t.jsx)("input",{type:a,className:(0,r.cn)("flex h-11 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...s}));s.displayName="Input",e.s(["Input",0,s])},10204,e=>{"use strict";var t=e.i(43476),a=e.i(71645);e.i(74080);var r=e.i(91918),s=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,s)=>{let n=(0,r.createSlot)(`Primitive.${s}`),i=a.forwardRef((e,a)=>{let{asChild:r,...i}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(r?n:s,{...i,ref:a})});return i.displayName=`Primitive.${s}`,{...e,[s]:i}},{}),n=a.forwardRef((e,a)=>(0,t.jsx)(s.label,{...e,ref:a,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));n.displayName="Label";var i=e.i(25913),d=e.i(75157);let o=(0,i.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),l=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)(n,{ref:r,className:(0,d.cn)(o(),e),...a}));l.displayName=n.displayName,e.s(["Label",0,l],10204)},40389,e=>{"use strict";var t=e.i(43476),a=e.i(71645),r=e.i(19455),s=e.i(15288),n=e.i(93479),i=e.i(10204),d=e.i(18566),o=e.i(22016);e.s(["LoginForm",0,function(){let[e,l]=(0,a.useState)({username:"",password:""}),[c,u]=(0,a.useState)(!1),[m,f]=(0,a.useState)(""),[p,x]=(0,a.useState)(!1),[h,b]=(0,a.useState)(""),[g,y]=(0,a.useState)(!1),[v,j]=(0,a.useState)(""),w=(0,d.useRouter)(),N=e=>{let{name:t,value:a}=e.target;l(e=>({...e,[t]:a}))},C=async t=>{t.preventDefault(),u(!0),f(""),x(!1),j("");try{let t=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await t.json();t.ok?(w.push("/dashboard"),w.refresh()):a.requiresVerification?(x(!0),b(a.email||e.username),f(a.message||"Confirm your email before signing in.")):f(a.message||"Login failed")}catch{f("An unexpected error occurred")}finally{u(!1)}},S=async()=>{let t=h.includes("@")?h:e.username.includes("@")?e.username:"";if(!t)return void j("Enter your email address above, then try resend.");y(!0),j("");try{let e=await fetch("/api/auth/resend-verification",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:t})}),a=await e.json().catch(()=>({}));j(a.message||"If that email needs confirmation, we sent a new link.")}catch{j("Could not resend right now. Try again shortly.")}finally{y(!1)}};return(0,t.jsx)("div",{className:"flex min-h-screen items-center justify-center bg-gradient-to-br from-slate-50 to-blue-50 p-4",children:(0,t.jsxs)(s.Card,{className:"w-full max-w-md",children:[(0,t.jsxs)(s.CardHeader,{className:"text-center",children:[(0,t.jsx)(s.CardTitle,{className:"text-2xl font-bold",children:"Welcome Back"}),(0,t.jsx)(s.CardDescription,{children:"Sign in to manage consultations and blog posts"})]}),(0,t.jsxs)(s.CardContent,{children:[m&&(0,t.jsx)("div",{className:"mb-4 rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-600",children:m}),(0,t.jsxs)("form",{onSubmit:C,className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(i.Label,{htmlFor:"username",children:"Username or Email"}),(0,t.jsx)(n.Input,{id:"username",name:"username",type:"text",value:e.username,onChange:N,required:!0,placeholder:"Enter your username or email"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(i.Label,{htmlFor:"password",children:"Password"}),(0,t.jsx)(o.default,{href:"/auth/forgot-password",className:"text-sm text-blue-600 hover:underline",children:"Forgot password?"})]}),(0,t.jsx)(n.Input,{id:"password",name:"password",type:"password",value:e.password,onChange:N,required:!0,placeholder:"Enter your password"})]}),(0,t.jsx)(r.Button,{type:"submit",className:"w-full",disabled:c,
1children:c?"Signing in...":"Sign In"})]}),p&&(0,t.jsxs)("div",{className:"mt-4 space-y-2 rounded-md border border-amber-200 bg-amber-50 p-3 text-sm text-amber-900",children:[(0,t.jsx)("p",{children:"Need a new confirmation link?"}),(0,t.jsx)(r.Button,{type:"button",variant:"outline",size:"sm",disabled:g,onClick:()=>void S(),children:g?"Sendingâ¦":"Resend confirmation email"}),v&&(0,t.jsx)("p",{className:"text-amber-800",children:v})]}),(0,t.jsxs)("div",{className:"mt-4 text-center text-sm text-gray-500",children:["Don't have an account?"," ",(0,t.jsx)(o.default,{href:"/auth/register",className:"text-blue-600 hover:underline",children:"Register here"})]})]})]})})}])}]);
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.