1import{r as o,j as e,ak as Ue,am as Be,an as Ve,ao as We,a1 as he,ba as ze,I as m,B as h,s as u,k as a,n as $e,a9 as Me,c as qe,bb as Ge,bc as He,L as M,bd as Je,i as Ye,b5 as Ze,M as ie,aR as Ke}from"./index.template-WRiM0WWj.js";import{S as Qe}from"./SEOHead-CU9zrxlU.js";import{L as g}from"./label-DRjDOlEW.js";import{C as oe,b as ne,a as le}from"./card-Che3WjG-.js";import{T as Xe,a as es,b as de,c as ce}from"./tabs-zSSDspNi.js";import{S as ss}from"./separator-BUFQIxnN.js";import{L as rs}from"./loader-circle-Phc8gglX.js";import{g as ue}from"./deviceId-BHFWBBAO.js";import{L as ts}from"./log-in-Bi70eSho.js";import{L as me}from"./lock-DXkUIqsD.js";const as=c=>{let r=0;return c.length>=8&&r++,c.length>=12&&r++,/[A-Z]/.test(c)&&r++,/[a-z]/.test(c)&&r++,/[0-9]/.test(c)&&r++,/[^A-Za-z0-9]/.test(c)&&r++,r},is=["","Very Weak","Weak","Fair","Good","Strong","Very Strong"],os=["","bg-destructive","bg-destructive/70","bg-[hsl(var(--warning))]","bg-[hsl(var(--warning))]/80","bg-[hsl(var(--success))]","bg-[hsl(var(--success))]"],ns=["","text-destructive","text-destructive","text-[hsl(var(--warning))]","text-[hsl(var(--warning))]","text-[hsl(var(--success))]","text-[hsl(var(--success))]"],ge=({password:c})=>{const r=o.useMemo(()=>as(c),[c]);if(!c)return null;const k=r/6*100;return e.jsxs("div",{className:"space-y-1.5 mt-1.5",children:[e.jsx("div",{className:"h-1.5 w-full rounded-full bg-muted overflow-hidden",children:e.jsx("div",{className:`h-full rounded-full transition-all duration-300 ${os[r]||"bg-destructive"}`,style:{width:`${k}%`}})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:`text-xs font-medium ${ns[r]}`,children:is[r]}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:[r<3&&"Add uppercase, numbers or symbols",r===3&&"Try a longer password",r>=4&&"Looking good!"]})]})]})},xe="/assets/air-logo-emblem-B9WS_fpY.webp",ls=({open:c,deviceId:r,sentTo:k,onVerified:y,onCancel:p})=>{const[j,x]=o.useState(""),[l,v]=o.useState(!1),[P,I]=o.useState(!1),D=async b=>{if(b.preventDefault(),j.length<6)return;v(!0);const{data:w,error:N}=await u.functions.invoke("device-verification",{body:{action:"verify",device_id:r,code:j}});if(v(!1),N||!w?.verified){a.error(w?.error||N?.message||"Verification failed");return}a.success("Device verified"),y()},T=async()=>{I(!0),await u.functions.invoke("device-verification",{body:{action:"check",device_id:r}}),I(!1),a.success("New code sent")};return e.jsx(Ue,{open:c,onOpenChange:b=>{b||p()},children:e.jsxs(Be,{className:"sm:max-w-md",children:[e.jsxs(Ve,{children:[e.jsxs(We,{className:"flex items-center gap-2",children:[e.jsx(he,{className:"h-5 w-5 text-primary"})," Verify this device"]}),e.jsxs(ze,{children:["For your security, this device needs to be approved. We sent a 6-digit code to ",k||"your email","."]})]}),e.jsxs("form",{onSubmit:D,className:"space-y-4",children:[e.jsx(m,{value:j,onChange:b=>x(b.target.value.replace(/\D/g,"").slice(0,6)),placeholder:"123456",inputMode:"numeric",autoFocus:!0,className:"text-center text-2xl tracking-[0.5em] font-mono"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(h,{type:"submit",disabled:l||j.length!==6,className:"flex-1",children:[l&&e.jsx(rs,{className:"h-4 w-4 animate-spin mr-2"}),"Verify & continue"]}),e.jsx(h,{type:"button",variant:"outline",onClick:T,disabled:P,children:"Resend"})]}),e.jsx(h,{type:"button",variant:"ghost",size:"sm",className:"w-full",onClick:p,children:"Cancel and sign out"})]})]})})},ds=()=>e.jsxs("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none",children:[e.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 01-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z",fill:"#4285F4"}),e.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),e.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),e.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]}),fe=()=>e.jsxs("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none",children:[e.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"#A6CE39"}),e.jsx("path",{d:"M8.5 7.5a1 1 0 100-2 1 1 0 000 2zM7.8 9h1.4v8H7.8V9zm4.2 0h3.8c3 0 4.2 2.2 4.2 4s-1.2 4-4.2 4H12V9zm1.4 1.2v5.6h2.4c2 0 2.8-1.4 2.8-2.8s-.8-2.8-2.8-2.8h-2.4z",fill:"white"})]}),ws=()=>{const c=$e(),[r]=Me(),k=qe(),y=r.get("redirect")||k.state?.from||"/dashboard",{branding:p}=Ge(),j=He(p.logo_url||null),[x,l]=o.useState(!1),[v,P]=o.useState(null),[I,D]=o.use
1State(""),[T,b]=o.useState(""),[w,N]=o.useState({open:!1,redirectTo:"/dashboard"});o.useEffect(()=>{const s=async(t,i)=>{try{const n=await fetch(`/functions/v1/oauth-url?provider=${t}`);if(!n.ok)return;const d=await n.json();d.url&&i(d.url)}catch(n){console.debug(`OAuth URL fetch failed for ${t}`,n)}};s("google",D),s("orcid",b)},[]);const[f,pe]=o.useState(""),[R,ve]=o.useState(""),[S,A]=o.useState(""),[F,be]=o.useState(""),[O,U]=o.useState(""),[B,V]=o.useState(""),[q,we]=o.useState(""),[ye,W]=o.useState(!1);o.useEffect(()=>{const s=r.get("google_auto"),t=r.get("orcid_auto"),i=r.get("user_email"),n=r.get("user_given")||"",d=r.get("user_family")||"",E=r.get("user_id")||"",Te=r.get("token")||"",K=r.get("google_id"),Ae=r.get("google_new"),Q=r.get("google_given"),X=r.get("google_family"),ee=r.get("google_email"),z=r.get("orcid_id"),Fe=r.get("orcid_new"),se=r.get("orcid_given"),re=r.get("orcid_family"),te=r.get("orcid_email"),$=r.get("error");if($){a.error(decodeURIComponent($));return}if(s||t){if(!i)return;localStorage.setItem("supabase.auth.token",JSON.stringify({user:{id:E,email:i,app_metadata:{},user_metadata:{first_name:n,last_name:d}},access_token:Te,expires_at:Date.now()+864e5})),window.location.href="/dashboard";return}if(Ae&&K?((Q||X)&&(U(Q||""),V(X||"")),ee&&A(ee),a.info("Google verified. Complete registration below."),W(!0)):Fe&&z&&((se||re)&&(U(se||""),V(re||"")),te&&A(te),a.info(`ORCID verified: ${z}. Complete registration below.`),W(!0)),s||t||K||z||$){const ae=new URL(window.location.href);["google_auto","orcid_auto","user_email","user_given","user_family","google_id","google_new","google_given","google_family","google_email","orcid_id","orcid_new","orcid_given","orcid_family","orcid_email","error","code","state"].forEach(Oe=>ae.searchParams.delete(Oe)),window.history.replaceState({},"",ae.toString())}},[r]);const[G,H]=o.useState(!1),je=async()=>{if(!f){a.error("Enter your email address first");return}H(!0);const{error:s}=await u.auth.resend({type:"signup",email:f});H(!1),s?a.error(s.message):a.success("Verification email resent! Please check your inbox and spam folder.")},Ne=async s=>{s.preventDefault(),l(!0);let{error:t}=await u.auth.signInWithPassword({email:f,password:R});if(t)if(t.message?.toLowerCase().includes("invalid credentials")||t.message?.toLowerCase().includes("user already registered")===!1){const{error:n}=await u.auth.signUp({email:f,password:R});if(n){l(!1),a.error(n.message);return}const d=await u.auth.signInWithPassword({email:f,password:R});if(d.error){l(!1),a.error(d.error.message);return}t=null}else{l(!1),t.message?.toLowerCase().includes("email not confirmed")?a.error("Please verify your email first. Check your inbox or click 'Resend verification email' below."):a.error(t.message);return}const i=y;try{const n=ue(),{data:d}=await u.functions.invoke("device-verification",{body:{action:"check",device_id:n}});if(l(!1),d?.requires_verification){N({open:!0,sentTo:d.sent_to,redirectTo:i});return}}catch{l(!1)}a.success("Welcome "+(t===null?"back":"")+"!"),window.location.href=i},_e=async s=>{s.preventDefault(),l(!0);const t=r.get("google_new"),{data:i,error:n}=await u.auth.signUp({email:S,password:F,options:{emailRedirectTo:window.location.origin}});if(n){a.error(n.message),l(!1);return}if(i.user){const d=r.get("orcid_id"),{error:E}=await u.from("profiles").update({first_name:O,last_name:B,affiliation:q,...d?{orcid:d}:{}}).eq("id",i.user.id);if(E&&console.error("Profile update failed:",E.message),t||d){i.session&&localStorage.setItem("supabase.auth.token",JSON.stringify({user:i.user,access_token:i.session.access_token,expires_at:(i.session.expires_at||0)*1e3})),l(!1),a.success("Registration successful!"),window.location.href=y;return}}l(!1),t?(a.success("Registration successful!"),window.location.href=y):a.success("Registration successful! Please check your email to verify your account."),u.functions.invoke("send-email",{body:{action:"send-email",template_key:"welcome_confirmation",to:S,variables:{author_name:[O,B].filter(Boolean).join(" ")||S.split("@")[0],author_email:S,signin_url:`${window.location.origin}/signin`}}}).catch(d=>{console.debug("Welcome email send failed:",d)})},ke=async()=>
1{if(!f){a.error("Please enter your email address first");return}l(!0);const{error:s}=await u.auth.resetPasswordForEmail(f,{redirectTo:`${window.location.origin}/signin?reset=true`});l(!1),s?a.error(s.message):a.success("Password reset email sent! Check your inbox.")},[Se,_]=o.useState(!1),[C,Ce]=o.useState(""),[J,Pe]=o.useState("");o.useEffect(()=>{const s=r.get("token"),t=r.get("reset")==="true"||r.get("type")==="recovery";s&&t?(async()=>{try{const i=await fetch("/api/rpc/verify_password_reset_token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({p_token:s})});if(!i.ok){_(!0);return}const n=await i.json();n&&n.length>0&&n[0].valid?_(!0):a.error("Reset link has expired or is invalid. Please request a new one.")}catch{_(!0)}})():t&&_(!0)},[r]);const Ie=async s=>{if(s.preventDefault(),C.length<6){a.error("Password must be at least 6 characters");return}if(C!==J){a.error("Passwords do not match");return}l(!0);const{error:t}=await u.auth.updateUser({password:C});if(l(!1),t){a.error(t.message);return}a.success("Password updated successfully!"),_(!1),window.location.href=y},Y=async(s,t)=>{if(t){window.location.href=t;return}P(s);try{const i=await fetch(`/functions/v1/oauth-url?provider=${s}`);if(i.ok){const n=await i.json();if(n.url){window.location.href=n.url;return}}a.error("Unable to connect. Please try again.")}catch{a.error("Unable to connect. Please try again.")}P(null)},Re=()=>Y("google",I),Le=()=>Y("orcid",T),Ee=j||p.logo_url||xe,L=p.brand_name||"AIR Journal",De=p.tagline||"Academic Ink Review â Author & Editorial Portal",Z=({size:s="md",onDark:t=!1})=>{const i=s==="xl"?"h-20 w-20":s==="lg"?"h-16 w-16":s==="sm"?"h-9 w-9":"h-12 w-12";return e.jsx("div",{className:`${i} rounded-2xl ${t?"bg-primary-foreground":"bg-white"} ring-1 ring-black/5 shadow-lg shadow-primary/10 flex items-center justify-center overflow-hidden`,children:e.jsx("img",{src:Ee,alt:`${L} logo`,className:"h-[78%] w-[78%] object-contain",onError:n=>{n.currentTarget.src=xe}})})};return e.jsxs(e.Fragment,{children:[e.jsx(Qe,{title:"Sign In â AIR JOURNAL",noindex:!0}),e.jsxs("div",{className:"min-h-screen relative overflow-hidden bg-[hsl(var(--background))]",children:[e.jsx(ls,{open:w.open,deviceId:ue(),sentTo:w.sentTo,onVerified:()=>{N({open:!1,redirectTo:w.redirectTo}),c(w.redirectTo)},onCancel:async()=>{await u.auth.signOut(),N({open:!1,redirectTo:"/dashboard"}),a.message("Signed out")}}),e.jsxs("div",{"aria-hidden":!0,className:"absolute inset-0 pointer-events-none",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-[hsl(var(--background))] via-[hsl(var(--background))] to-primary/[0.04]"}),e.jsx("div",{className:"absolute -top-40 right-0 h-[36rem] w-[36rem] rounded-full bg-primary/[0.07] blur-[140px]"}),e.jsx("div",{className:"absolute -bottom-40 left-0 h-[30rem] w-[30rem] rounded-full bg-accent/[0.06] blur-[140px]"})]}),e.jsxs("div",{className:"relative z-10 grid min-h-screen lg:grid-cols-[1.05fr_1fr] xl:grid-cols-[1.15fr_1fr]",children:[e.jsxs("aside",{className:"hidden lg:flex flex-col justify-between p-12 xl:p-16 bg-primary text-primary-foreground relative overflow-hidden",children:[e.jsx("div",{"aria-hidden":!0,className:"absolute inset-0 bg-gradient-to-br from-primary via-primary to-primary/85"}),e.jsx("div",{"aria-hidden":!0,className:"absolute inset-0 bg-[radial-gradient(circle_at_25%_15%,hsl(var(--primary-foreground)/0.18),transparent_55%)]"}),e.jsx("div",{"aria-hidden":!0,className:"absolute inset-0 bg-[radial-gradient(circle_at_85%_85%,hsl(var(--primary-foreground)/0.10),transparent_50%)]"}),e.jsx("div",{"aria-hidden":!0,className:"absolute inset-0 opacity-[0.06] [background-image:radial-gradient(circle_at_1px_1px,white_1px,transparent_0)] [background-size:28px_28px]"}),e.jsx("div",{"aria-hidden":!0,className:"absolute -top-32 -right-32 h-[36rem] w-[36rem] rounded-full border border-primary-foreground/10"}),e.jsx("div",{"aria-hidden":!0,className:"absolute -top-20 -right-20 h-[28rem] w-[28rem] rounded-full border border-primary-foreground/5"}),e.jsxs("div",{className:"relative flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 shadow-[0_0_12px_hsl(142_71%_45%/0.8)]"}),e.jsx("span",{className:"text-[13px] font-semibold tracking-[0.18em] uppercase text-primary-foreground
1/90",children:L})]}),e.jsx(M,{to:"/",className:"text-[11px] uppercase tracking-[0.18em] text-primary-foreground/60 hover:text-primary-foreground transition-colors",children:"â Back to site"})]}),e.jsxs("div",{className:"relative space-y-10 max-w-xl",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full bg-primary-foreground/[0.08] backdrop-blur-md px-3.5 py-1.5 text-[11px] font-medium ring-1 ring-primary-foreground/15",children:[e.jsx("span",{className:"h-1 w-1 rounded-full bg-emerald-400"}),"Open access · Peer-reviewed · DOI-indexed"]}),e.jsxs("h2",{className:"font-bold leading-[0.98] tracking-[-0.03em] text-primary-foreground",style:{fontSize:"clamp(2.5rem, 4.2vw, 4rem)"},children:["Where rigorous",e.jsx("br",{}),"research finds",e.jsx("br",{}),e.jsx("span",{className:"italic font-serif font-normal text-primary-foreground/85",children:"its readers."})]}),e.jsx("p",{className:"text-primary-foreground/75 text-[15px] leading-relaxed max-w-md",children:"Submit, peer-review, and publish your scholarly work in one transparent editorial workspace trusted by authors worldwide."})]}),e.jsx("ul",{className:"space-y-3",children:[{Icon:he,title:"Rigorous double-blind review",desc:"Transparent decisions, DOI-backed records."},{Icon:Je,title:"Global open-access reach",desc:"Indexed in Crossref, DOAJ, and Google Scholar."},{Icon:Ye,title:"AI-assisted editorial tools",desc:"Smarter submissions, faster turnaround."}].map(({Icon:s,title:t,desc:i})=>e.jsxs("li",{className:"flex items-start gap-3.5 group",children:[e.jsx("div",{className:"h-9 w-9 rounded-xl bg-primary-foreground/[0.08] backdrop-blur-sm flex items-center justify-center shrink-0 ring-1 ring-primary-foreground/10 group-hover:bg-primary-foreground/15 group-hover:ring-primary-foreground/25 transition-all duration-300",children:e.jsx(s,{className:"h-[17px] w-[17px]",strokeWidth:1.75})}),e.jsxs("div",{className:"pt-1",children:[e.jsx("div",{className:"font-semibold text-[13.5px] text-primary-foreground",children:t}),e.jsx("div",{className:"text-[12px] text-primary-foreground/65 mt-0.5 leading-snug",children:i})]})]},t))}),e.jsxs("figure",{className:"relative rounded-2xl bg-gradient-to-br from-primary-foreground/[0.08] to-primary-foreground/[0.03] border border-primary-foreground/10 p-5 backdrop-blur-md",children:[e.jsx("div",{className:"absolute -top-3 left-5 text-5xl leading-none font-serif text-primary-foreground/30 select-none",children:'"'}),e.jsx("blockquote",{className:"text-[13.5px] leading-relaxed text-primary-foreground/95 italic font-serif",children:"A modern editorial experience that respects authors' time and elevates scholarly quality at every step."}),e.jsxs("figcaption",{className:"mt-4 flex items-center gap-3",children:[e.jsx("div",{className:"h-8 w-8 rounded-full bg-gradient-to-br from-primary-foreground/30 to-primary-foreground/10 ring-1 ring-primary-foreground/20 flex items-center justify-center text-[10px] font-bold tracking-wider",children:"EB"}),e.jsxs("div",{className:"text-[11px] leading-tight",children:[e.jsx("div",{className:"font-semibold text-primary-foreground/95",children:"Editorial Board"}),e.jsx("div",{className:"text-primary-foreground/60",children:"Academic Ink Review"})]})]})]})]}),e.jsxs("div",{className:"relative flex items-end justify-between gap-6",children:[e.jsxs("div",{className:"text-[11px] text-primary-foreground/50",children:["© ",new Date().getFullYear()," ",L]}),e.jsxs("div",{className:"flex items-center gap-4 text-[10px] uppercase tracking-[0.16em] text-primary-foreground/55 font-medium",children:[e.jsx("span",{children:"Crossref"}),e.jsx("span",{className:"h-0.5 w-0.5 rounded-full bg-primary-foreground/30"}),e.jsx("span",{children:"DOAJ"}),e.jsx("span",{className:"h-0.5 w-0.5 rounded-full bg-primary-foreground/30"}),e.jsx("span",{children:"ORCID"}),e.jsx("span",{className:"h-0.5 w-0.5 rounded-full bg-primary-foreground/30"}),e.jsx("span",{children:"Scholar"})]})]})]}),e.jsx("main",{className:"flex items-center justify-center px-4 py-10 sm:px-8 lg:px-10 xl:px-14 relative",children:e.jsxs("div",{className:"w-full max-w-[440px] animate-fade-in",children:[e.jsxs("div",{className:"text-center mb-6 lg:hidden",children:[e.jsx("div",{className:"flex justify-center mb-3",children:e.jsx(Z,{size:"xl"})}),e.jsx("h1",{className:"text-2xl font-bold text-foreground tracking-tight",children:L}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:De})]}),Se?e.jsxs(oe,{className:"border-border/50 shadow-2xl shadow-primary/[0.06] bg-card rounded-2xl",children:[e.jsxs(ne,{children:[e.jsx("h2",{className:"text-lg font-bold text-foreground text-center",children:"Set new password"}),e.jsx("p",{className:"text-sm text-muted-foreground text-center",children:"Enter your new password below."})]}),e.jsx(le,{children:e.jsxs("form",{onSubmit:Ie,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(g,{htmlFor:"new-password",children:"New Password"}),e.jsx(m,{id:"new-password",type:"password",value:C,onChange:s=>Ce(s.target.value),required:!0,minLength:6,className:"mt-1"}),e.jsx(ge,{password:C})]}),e.jsxs("div",{children:[e.jsx(g,{htmlFor:"confirm-password",children:"Confirm Password"}),e.jsx(m,{id:"confirm-password",type:"password",value:J,onChange:s=>Pe(s.target.value),required:!0,className:"mt-1"})]}),e.jsx(h,{type:"submit",className:"w-full",disabled:x,children:x?"Updating...":"Update Password"}),e.jsx("button",{type:"button",onClick:()=>_(!1),className:"w-full text-xs text-muted-foreground hover:text-primary text-center",children:"Back to Sign In"})]})})]}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"hidden lg:flex flex-col items-center text-center",children:[e.jsx(Z,{size:"lg"}),e.jsx("h2",{className:"mt-5 text-[28px] font-bold text-foreground tracking-[-0.02em] leading-tight",children:"Welcome back"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"Sign in or create your editorial account"})]}
1),e.jsx(oe,{className:"border-border/40 shadow-[0_20px_60px_-20px_hsl(var(--primary)/0.18)] bg-card rounded-2xl overflow-hidden",children:e.jsxs(Xe,{value:ye?"register":"login",onValueChange:s=>W(s==="register"),children:[e.jsx(ne,{className:"pb-3 pt-6 px-6",children:e.jsxs(es,{className:"grid w-full grid-cols-2 h-11 p-1 bg-muted/70 rounded-xl",children:[e.jsxs(de,{value:"login",className:"gap-1.5 rounded-lg data-[state=active]:bg-card data-[state=active]:shadow-sm font-medium text-[13px]",children:[e.jsx(ts,{className:"h-3.5 w-3.5"})," Sign In"]}),e.jsxs(de,{value:"register",className:"gap-1.5 rounded-lg data-[state=active]:bg-card data-[state=active]:shadow-sm font-medium text-[13px]",children:[e.jsx(Ze,{className:"h-3.5 w-3.5"})," Register"]})]})}),e.jsxs(le,{className:"pb-6 px-6",children:[e.jsxs("div",{className:"space-y-2.5 mb-5",children:[e.jsxs(h,{variant:"outline",className:"w-full gap-2.5 h-11 rounded-xl border-border hover:bg-accent/40 hover:border-primary/30 transition-all font-medium text-[13.5px] shadow-sm",onClick:Re,disabled:!!v,children:[e.jsx(ds,{}),v==="google"?"Connecting...":"Continue with Google"]}),e.jsxs(h,{variant:"outline",className:"w-full gap-2.5 h-11 rounded-xl border-border hover:bg-accent/40 hover:border-primary/30 transition-all font-medium text-[13.5px] shadow-sm",onClick:Le,disabled:!!v,children:[e.jsx(fe,{}),v==="orcid"?"Connecting...":"Continue with ORCID"]})]}),e.jsxs("div",{className:"relative my-5",children:[e.jsx(ss,{}),e.jsx("span",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 bg-card px-3 text-[10px] text-muted-foreground uppercase tracking-[0.2em] font-semibold",children:"or with email"})]}),e.jsx(ce,{value:"login",className:"mt-0 space-y-4",children:e.jsxs("form",{onSubmit:Ne,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(g,{htmlFor:"login-email",className:"text-[12px] font-semibold text-foreground/80",children:"Email address"}),e.jsxs("div",{className:"relative mt-1.5",children:[e.jsx(ie,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground/70",strokeWidth:1.75}),e.jsx(m,{id:"login-email",type:"email",placeholder:"[email protected]",value:f,onChange:s=>pe(s.target.value),required:!0,className:"h-11 pl-10 rounded-xl border-border focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:border-primary transition-all"})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[e.jsx(g,{htmlFor:"login-password",className:"text-[12px] font-semibold text-foreground/80",children:"Password"}),e.jsx("button",{type:"button",onClick:ke,className:"text-[11px] text-primary hover:underline font-semibold",children:"Forgot?"})]}),e.jsxs("div",{className:"relative",children:[e.jsx(me,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground/70",strokeWidth:1.75}),e.jsx(m,{id:"login-password",type:"password",placeholder:"Enter your password",value:R,onChange:s=>ve(s.target.value),required:!0,className:"h-11 pl-10 rounded-xl border-border focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:border-primary transition-all"})]})]}),e.jsx(h,{type:"submit",className:"w-full h-11 font-semibold rounded-xl shadow-md shadow-primary/25 hover:shadow-lg hover:shadow-primary/35 hover:-translate-y-px transition-all text-[14px]",disabled:x,children:x?"Signing in...":"Sign in"}),e.jsx("button",{type:"button",onClick:je,disabled:G,className:"block w-full text-center text-[11px] text-muted-foreground hover:text-primary hover:underline pt-1",children:G?"Sending...":"Didn't get a verification email? Resend"})]})}),e.jsx(ce,{value:"register",className:"mt-0",children:e.jsxs("form",{onSubmit:_e,className:"space-y-3.5",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx(g,{htmlFor:"reg-first",className:"text-[12px] font-semibold text-foreground/80",children:"First name"}),e.jsx(m,{id:"reg-first",placeholder:"Jane",value:O,onChange:s=>U(s.target.value),className:"mt-1.5 h-11 rounded-xl border-border focus-visible:ring-2 focus-visible:ring-primary/30"})]}),e.jsxs("div",{children:[e.jsx(g,{htmlFor:"reg-last",className:"text-[12px] font-semibold text-foreground
1/80",children:"Last name"}),e.jsx(m,{id:"reg-last",placeholder:"Doe",value:B,onChange:s=>V(s.target.value),className:"mt-1.5 h-11 rounded-xl border-border focus-visible:ring-2 focus-visible:ring-primary/30"})]})]}),e.jsxs("div",{children:[e.jsx(g,{htmlFor:"reg-email",className:"text-[12px] font-semibold text-foreground/80",children:"Email *"}),e.jsxs("div",{className:"relative mt-1.5",children:[e.jsx(ie,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground/70",strokeWidth:1.75}),e.jsx(m,{id:"reg-email",type:"email",placeholder:"[email protected]",value:S,onChange:s=>A(s.target.value),required:!0,className:"h-11 pl-10 rounded-xl border-border focus-visible:ring-2 focus-visible:ring-primary/30"})]})]}),e.jsxs("div",{children:[e.jsx(g,{htmlFor:"reg-password",className:"text-[12px] font-semibold text-foreground/80",children:"Password *"}),e.jsxs("div",{className:"relative mt-1.5",children:[e.jsx(me,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground/70",strokeWidth:1.75}),e.jsx(m,{id:"reg-password",type:"password",placeholder:"At least 6 characters",value:F,onChange:s=>be(s.target.value),required:!0,minLength:6,className:"h-11 pl-10 rounded-xl border-border focus-visible:ring-2 focus-visible:ring-primary/30"})]}),e.jsx(ge,{password:F})]}),e.jsxs("div",{children:[e.jsx(g,{htmlFor:"reg-affiliation",className:"text-[12px] font-semibold text-foreground/80",children:"Affiliation"}),e.jsxs("div",{className:"relative mt-1.5",children:[e.jsx(Ke,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground/70",strokeWidth:1.75}),e.jsx(m,{id:"reg-affiliation",placeholder:"University / Institution",value:q,onChange:s=>we(s.target.value),className:"h-11 pl-10 rounded-xl border-border focus-visible:ring-2 focus-visible:ring-primary/30"})]})]}),r.get("orcid_id")&&e.jsx("div",{className:"p-3 bg-[hsl(var(--success))]/10 border border-[hsl(var(--success))]/20 rounded-xl",children:e.jsxs("p",{className:"text-xs text-[hsl(var(--success))] font-medium flex items-center gap-1.5",children:[e.jsx(fe,{})," ORCID ",r.get("orcid_id")," will be linked"]})}),e.jsx(h,{type:"submit",className:"w-full h-11 font-semibold rounded-xl shadow-md shadow-primary/25 hover:shadow-lg hover:shadow-primary/35 hover:-translate-y-px transition-all text-[14px]",disabled:x,children:x?"Creating account...":"Create your account"}),e.jsx("p",{className:"text-[11px] text-muted-foreground text-center",children:"A verification email will be sent after registration."})]})})]})]})}),e.jsxs("p",{className:"text-center text-[11px] text-muted-foreground",children:["By continuing, you agree to our"," ",e.jsx(M,{to:"/terms",className:"text-foreground/80 hover:text-primary underline-offset-4 hover:underline font-medium",children:"Terms"})," ","&"," ",e.jsx(M,{to:"/privacy",className:"text-foreground/80 hover:text-primary underline-offset-4 hover:underline font-medium",children:"Privacy Policy"}),"."]})]})]})})]})]})]})};export{ws 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.