1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5211],{9372:function(e,t,a){a.d(t,{Vq:function(){return o}});var r=a(25193),n=a(62310),s=a(63075),l=a(14477),i=a(57478);let o=s.fC;s.xz;let d=s.h_;s.x8;let c=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(s.aV,{ref:t,className:(0,l.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80 duration-300",a),...n})});c.displayName=s.aV.displayName,n.forwardRef((e,t)=>{let{className:a,children:n,hideClose:o,...u}=e;return(0,r.jsxs)(d,{children:[(0,r.jsx)(c,{}),(0,r.jsxs)(s.VY,{ref:t,className:(0,l.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-300 sm:rounded-lg",a),...u,children:[n,!o&&(0,r.jsxs)(s.x8,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",children:[(0,r.jsx)(i.Pxu,{className:"h-4 w-4"}),(0,r.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}).displayName=s.VY.displayName,n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(s.Dx,{ref:t,className:(0,l.cn)("text-lg leading-none font-semibold tracking-tight",a),...n})}).displayName=s.Dx.displayName,n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(s.dk,{ref:t,className:(0,l.cn)("text-muted-foreground text-sm",a),...n})}).displayName=s.dk.displayName},39149:function(e,t,a){a.d(t,{I:function(){return l}});var r=a(25193),n=a(62310),s=a(14477);let l=n.forwardRef((e,t)=>{let{className:a,type:n,...l}=e;return(0,r.jsx)("input",{type:n,className:(0,s.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",a),ref:t,...l})});l.displayName="Input"},55211:function(e,t,a){a.r(t),a.d(t,{AuthFormInner:function(){return _}});var r=a(25193),n=a(84930),s=a(75242),l=a(62310),i=a(9372),o=a(63075),d=a(56272),c=a(5980),u=a(39149),x=a(32907),m=a(86785),f=a(48719),h=a(56230),p=a(1811),g=a(41408),v=a(79037);function j(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4,a=(0,l.useCallback)(()=>Math.max(0,t-(new Date().getTime()-e)),[e,t]),[r,n]=(0,l.useState)(a());return(0,l.useEffect)(()=>{if(e>0){let e=setInterval(()=>{let t=a();t<=0&&clearInterval(e),n(t)},1e3);return()=>clearInterval(e)}},[e,a]),r}var b=a(38367),N=a(68047);let y=()=>(0,r.jsx)("div",{className:"border-gradient gradient-to flex size-14 items-center justify-center rounded-xl bg-gradient-to-b from-[#2e2e2e] to-[#1a1a1a] [--border-gradient-from:var(--color-neutral-500)] [--border-gradient-position:to_bottom_in_oklab] [--border-gradient-to:transparent]",children:(0,r.jsx)(b.default,{src:"/logo.svg",alt:"Sealos Logo",width:32,height:32,className:"size-10"})});function w(){let{formData:e,error:t,isSendingCode:a,turnstileRef:n,setEmail:s,setCaptchaToken:i,clearCaptchaToken:o,sendCode:b,setStep:w,setError:k,additionalParams:z,setOpen:C}=(0,d.Y2)(),[E,M]=(0,l.useState)(!1),R=j(e.startTime),I=(0,l.useMemo)(()=>v.z.string().email().safeParse(e.email).success,[e.email]),T=()=>{M(!1),o()},P=async()=>{if(I){if((0,g.De)({event:"login_start",method:"email",module:"auth",context:"app"}),await b())w("verify-code");else{var e;T(),null===(e=n.current)||void 0===e||e.reset()}}},S=e=>{let t=new URL(e);
1z&&Object.entries(z).forEach(e=>{let[a,r]=e;t.searchParams.append(a,r)});let a=(0,p._)(t.toString());C(!1),window.location.href=a};return(0,r.jsxs)("div",{className:"flex flex-col items-center gap-8",children:[(0,r.jsx)("div",{className:"mt-6 flex items-center justify-center",children:(0,r.jsx)(y,{})}),(0,r.jsx)("div",{className:"flex w-full flex-col items-center gap-4",children:(0,r.jsx)("h2",{className:"text-2xl leading-none font-semibold",children:"Welcome to Sealos"})}),(0,r.jsxs)("div",{className:"flex w-full flex-col gap-6",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsx)(u.I,{type:"email",placeholder:"Work Email",value:e.email,onChange:e=>s(e.target.value),className:"bg-foreground/5 border-border h-10 shadow-none focus-visible:border-blue-400 focus-visible:ring-0"}),t&&(0,r.jsxs)("div",{className:"flex items-center gap-1 text-sm text-red-500",children:[(0,r.jsx)(x.Z,{className:"size-4"}),(0,r.jsx)("span",{children:t})]})]}),h.JA.turnstileEnabled&&(0,r.jsx)("div",{className:"w-full",children:(0,r.jsx)("div",{className:"w-full px-1",children:(0,r.jsx)(f.Nc,{ref:n,siteKey:h.JA.turnstileSitekey,options:{size:"flexible",refreshExpired:"manual",refreshTimeout:"manual"},onSuccess:e=>{M(!0),i(e),k(null)},onExpire:T,onTimeout:T,onError:T})})}),(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsxs)(c.zx,{onClick:P,disabled:!I||h.JA.turnstileEnabled&&!E||R>0||a,variant:"landing-primary",className:"h-10 w-full disabled:cursor-not-allowed",children:[R>0?"Please wait ".concat(Math.floor(R/1e3),"s"):a?"Sending...":"Continue with Email",R<=0&&!a&&(0,r.jsx)(m.Z,{className:"ml-2 size-4"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:"bg-border h-px flex-1"}),(0,r.jsx)("span",{className:"text-muted-foreground text-xs whitespace-nowrap",children:"OR CONTINUE WITH"}),(0,r.jsx)("div",{className:"bg-border h-px flex-1"})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsxs)(c.zx,{variant:"outline",className:"text-foreground bg-foreground
1/5 h-10 w-full rounded-full hover:cursor-pointer",onClick:()=>S(h.JA.oauth2GithubUrl),children:[(0,r.jsx)("div",{children:(0,r.jsx)(N.ET,{})}),(0,r.jsx)("span",{className:"ml-2",children:"Github"})]}),(0,r.jsxs)(c.zx,{variant:"outline",className:"text-foreground bg-foreground/5 h-10 w-full rounded-full hover:cursor-pointer",onClick:()=>S(h.JA.oauth2GoogleUrl),children:[(0,r.jsx)(N._8,{}),(0,r.jsx)("span",{className:"ml-2",children:"Google"})]})]})]}),(0,r.jsx)("div",{children:(0,r.jsxs)("p",{className:"text-muted-foreground cursor-pointer text-center text-xs leading-4",children:["By proceeding you acknowledge that you have read, understood and agree to our"," ",(0,r.jsx)("a",{href:"/docs/msa/terms-of-service",className:"text-white underline",children:"Terms and Conditions"}),","," ",(0,r.jsx)("a",{href:"/docs/msa/privacy-policy",className:"text-white underline",children:"Privacy Policy"}),"."]})})]})]})}var k=a(63938),z=a(14477),C=a(57478);let E=l.forwardRef((e,t)=>{let{className:a,containerClassName:n,...s}=e;return(0,r.jsx)(k.uZ,{ref:t,containerClassName:(0,z.cn)("flex items-center gap-2 has-[:disabled]:opacity-50",n),className:(0,z.cn)("disabled:cursor-not-allowed",a),...s})});E.displayName="InputOTP";let M=l.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,z.cn)("flex items-center",a),...n})});M.displayName="InputOTPGroup";let R=l.forwardRef((e,t)=>{let{index:a,className:n,...s}=e,{char:i,hasFakeCaret:o,isActive:d}=l.useContext(k.VM).slots[a];return(0,r.jsxs)("div",{ref:t,className:(0,z.cn)("relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",n,d&&"z-10 border-blue-400 ring-0"),...s,children:[i,o&&(0,r.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:(0,r.jsx)("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});R.displayName="InputOTPSlot",l.forwardRef((e,t)=>{let{...a}=e;return(0,r.jsx)("div",{ref:t,role:"separator",...a,children:(0,r.jsx)(C.V_R,{})})}).displayName="InputOTPSeparator";var I=a(71089),T=a(31906);function P(){let{formData:e,error:t,isSendingCode:a,turnstileRef:n,setStep:s,setError:i,sendCode:o,clearStartTime:u,onVerifySuccess:m,additionalParams:f}=(0,d.Y2)(),[p,g]=(0,l.useState)(""),[v,b]=(0,l.useState)(!1),N=j(e.startTime),y=async t=>{if(!t||6!==t.length){i("Please enter a 6-digit verification code");return}if(!e.challengeId){i("Verification session expired. Please request a new code.");return}b(!0),i(null);try{let a={code:t,id:e.email,challengeId:e.challengeId},r=await fetch(h.JA.emailVerifyEndpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),n=await r.json();if(200!==n.code){if(409===n.code)throw Error("Invalid verification code, please try again.");throw Error(n.message||"Unknown error")}m&&n.data&&m(n.data,f)}catch(e){console.error("Failed to verify code:",e),i((null==e?void 0:e.message)||"Unknown error"),g("")}finally{b(!1)}};return(0,r.jsxs)("div",{className:"flex flex-col items-center gap-8",children:[(0,r.jsx)("div",{className:"mt-6 flex items-center justify-center",children:(0,r.jsx)("div",{className:"border-gradient flex size-14 items-center justify-center rounded-xl bg-gradient-to-b from-[#2e2e2e] to-[#1a1a1a] [--border-gradient-from:var(--color-neutral-500)] [--border-gradient-position:to_bottom_in_oklab] [--border-gradient-to:transparent]",children:(0,r.jsx)(I.Z,{className:"text-muted-foreground size-8"})})}),(0,r.jsxs)("div",{className:"flex w-full flex-col gap-8",children:[(0,r.jsx)("div",{className:"flex flex-col items-center gap-4",children:(0,r.jsx)("h2",{className:"text-2xl leading-none font-semibold",children:"Check your email"})}),(0,r.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[N>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1 text-sm",children:[(0,r.jsx)("span",{className:"text-muted-foreground font-normal text-nowrap",children:"A"}),(0,r.jsx)("span",{className:"text-muted-foreground font-semibold text-nowrap",children:"verification code"}),(0,r.jsx)("span",{className:"text-muted-foreground font-normal text-nowrap",children:"was sent to"}),(0,r.jsx)("span",{className:"text-foreground font-semibold text-nowrap",children:e.email}),(0,r.jsx)("span",{className:"text-muted-foreground font-normal text-nowrap",children:"."})]}),(0,r.jsx)("p",{className:"text-muted-foreground text-sm text-nowrap",children:"Enter it below to continue."})]}),(0,r.jsx)("div",{className:"flex flex-col items-center gap-2",children:(0,r.jsx)(E,{maxLength:6,value:p,onChange:e=>{g(e),i(null),6===e.length&&y(e)},containerClassName:"justify-center",disabled:v,children:(0,r.jsx)(M,{className:"gap-2",children:Array.from({length:6}).map((e,a)=>
1(0,r.jsx)(R,{index:a,className:(0,z.cn)("bg-foreground/5 aspect-square h-11 w-11 rounded-xl border text-center text-lg font-medium first:rounded-l-xl last:rounded-r-xl",p[a]?"border-foreground":"border-border",t&&"!border-red-500")},a))})})}),t&&(0,r.jsxs)("div",{className:"flex items-center gap-1 text-sm text-red-500",children:[(0,r.jsx)(x.Z,{className:"size-4"}),(0,r.jsx)("span",{children:t})]}),(0,r.jsx)("div",{className:"flex flex-col gap-1",children:v?(0,r.jsx)("p",{className:"text-muted-foreground text-sm",children:"Verifying..."}):(0,r.jsx)("p",{className:"text-sm",children:N>0?(0,r.jsxs)(r.Fragment,{children:["You can try again in"," ",(0,r.jsxs)("span",{className:"font-semibold",children:[Math.floor(N/1e3),"s"]})]}):(0,r.jsx)("button",{onClick:()=>{N>0||(s("select-method"),g(""),i(null),u())},className:"font-semibold text-blue-400 no-underline hover:underline",children:"Resend it"})})})]}),(0,r.jsxs)(c.zx,{variant:"outline",onClick:()=>{s("select-method"),g(""),i(null),u()},disabled:v,className:"text-foreground bg-foreground
1/5 h-10 w-full rounded-full hover:cursor-pointer disabled:opacity-50",children:[(0,r.jsx)(T.Z,{className:"mr-2 size-4"}),"Back"]})]})]})]})}var S=a(23832);function _(){let{step:e,open:t,setOpen:a}=(0,d.Y2)(),c=(0,l.useRef)(null),u=(0,l.useRef)(!0),x=(0,l.useRef)(!1);(0,l.useEffect)(()=>{t?u.current?(c.current=e,u.current=!1,x.current=!0):x.current&&c.current!==e&&(c.current=e):(u.current=!0,c.current=null,x.current=!1)},[t,e]);let m=x.current&&null!==c.current&&c.current!==e;return(0,r.jsx)(i.Vq,{open:t,onOpenChange:a,children:(0,r.jsx)(n.M,{children:t&&(0,r.jsxs)(o.h_,{forceMount:!0,children:[(0,r.jsx)(o.aV,{asChild:!0,children:(0,r.jsx)(s.E.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"fixed inset-0 z-50 bg-black/80"})}),(0,r.jsx)(o.VY,{asChild:!0,children:(0,r.jsxs)(s.E.div,{initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-20,scale:.95},transition:{duration:.3,ease:"easeOut"},className:"bg-background border-border fixed top-[50%] left-[50%] z-50 max-w-md translate-x-[-50%] translate-y-[-50%] overflow-hidden rounded-xl border p-0",children:[(0,r.jsx)("div",{className:"pointer-events-none absolute inset-0 -z-10",children:(0,r.jsx)(S.m,{sources:[{x:.46,y:-.15,angle:80,spread:35,count:2,color:"225, 225, 225"},{x:.5,y:-.15,angle:90,spread:35,count:2,color:"225, 225, 225"},{x:.54,y:-.15,angle:100,spread:35,count:2,color:"225, 225, 225"}],speed:.0018,maxWidth:85,minLength:1e3,maxLength:1800,blur:24})}),(0,r.jsx)("div",{className:"relative z-10 p-10",children:(0,r.jsx)(n.M,{mode:"wait",children:"select-method"===e?(0,r.jsx)(s.E.div,{initial:m?{opacity:0,x:20}:void 0,animate:{opacity:1,x:0},exit:m?{opacity:0,x:-20}:void 0,transition:{duration:.2,ease:"easeInOut"},children:(0,r.jsx)(w,{})},"select-method"):(0,r.jsx)(s.E.div,{initial:m?{opacity:0,x:20}:void 0,animate:{opacity:1,x:0},exit:m?{opacity:0,x:-20}:void 0,transition:{duration:.2,ease:"easeInOut"},children:(0,r.jsx)(P,{})},"verify-code")})})]})})]})})})}},23832:function(e,t,a){a.d(t,{m:function(){return l}});var r=a(25193),n=a(62310),s=a(26595);function l(e){let{sources:t=[{x:1,y:-.75,angle:225,spread:60,count:32,color:"128, 192, 255",minWidth:40,maxWidth:100}],speed:a=.01,maxWidth:l=128,minLength:i=800,maxLength:o=2e3,blur:d=10,capWidth:c=!0}=e,u=(0,n.useRef)(null),x=(0,n.useRef)([]),m=(0,n.useRef)(),f=(0,n.useRef)({width:0,height:0}),h=(0,s.Y)(u,{margin:"0px 0px 0px 0px",amount:0});return(0,n.useEffect)(()=>{let e=u.current;if(!e)return;let r=e.getContext("2d");if(!r)return;let n=(t,a)=>{e.width=t,e.height=a},s=()=>{let e=window.innerWidth,t=window.innerHeight;f.current={width:e,height:t},n(e,t)};s();let l=e=>e*Math.PI/180,d=()=>{var e,a,n,s,d,u,m;let h=t[Math.floor(Math.random()*t.length)],{width:p,height:g}=f.current,v=p>1440?1440:p>1280?1280:p>1024?1024:p>768?768:p>640?640:p,j=c?(p-v)/2+v*h.x:p,b=g*h.y,N=l(h.angle)+(Math.random()-.5)*l(h.spread),y=i+Math.random()*(o-i),w=Math.sin(N);if(w>0){let e=(.8*g-b)/w;e>0&&(y=Math.min(y,e))}let k=j+Math.cos(N)*y,z=b+Math.sin(N)*y,C=r.createLinearGradient(j,b,k,z),E=(null!==(e=h.minWidth)&&void 0!==e?e:0)+Math.random()*((null!==(a=h.maxWidth)&&void 0!==a?a:100)-(null!==(n=h.minWidth)&&void 0!==n?n:0)),M=h.color||"128, 192, 255",R=1*Math.random();x.current.push({sourceX:j,sourceY:b,targetX:k,targetY:z,width:E,fading:!1,opacity:null!==(s=h.opacityMin)&&void 0!==s?s:0,opacityMin:null!==(d=h.opacityMin)&&void 0!==d?d:0,threshold:(null!==(m=h.opacityMax)&&void 0!==m?m:R>(null!==(u=h.opacityMin)&&void 0!==u?u:0))?R:1,color:M,gradient:C})},p=e=>{e.opacity>=e.threshold&&(e.fading=!0),e.opacity<e.opacityMin&&e.fading&&(e.fading=!1),e.fading?e.opacity-=a:e.opacity+=a},g=e=>{r.beginPath(),r.moveTo(e.sourceX,e.sourceY),r.lineTo(e.sourceX,e.sourceY),r.lineTo(e.targetX,e.targetY),r.closePath(),e.gradient=r.createLinearGradient(e.sourceX,e.sourceY,e.targetX,e.targetY),e.gradient.addColorStop(0,"rgba(".concat(e.color,", ").concat(e.opacity,")")),e.gradient.addColorStop(.5,"transparent"),r.lineWidth=e.width,r.strokeStyle=e.gradient,r.stroke()},v=()=>{let e=t.reduce((e,t)=>
1e+t.count,0);x.current.length<=e&&d(),x.current.forEach(e=>{p(e),g(e)})},j=()=>{if(!h){m.current=requestAnimationFrame(j);return}r.clearRect(0,0,e.width,e.height),v(),m.current=requestAnimationFrame(j)};j();let b=()=>{s(),x.current=[]};return window.addEventListener("resize",b),()=>{window.removeEventListener("resize",b),m.current&&cancelAnimationFrame(m.current)}},[t,a,l,i,o,h]),(0,r.jsx)("canvas",{ref:u,className:"pointer-events-none absolute -z-10",style:{mixBlendMode:"lighten",filter:"blur(".concat(d,"px)"),top:"-".concat(d,"px"),left:"-".concat(d,"px"),right:"-".concat(d,"px"),bottom:"-".concat(d,"px"),width:"calc(100% + ".concat(2*d,"px)"),height:"calc(100% + ".concat(2*d,"px)"),clipPath:"inset(".concat(d,"px -100vw -100vh -100vw)")},"aria-hidden":"true"})}}}]);
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.