PageSourceSearch

https://app.raena.ai/_next/static/chunks/0vz_g~z-jz6a..js?dpl=dpl_GKz71tPzS5E8fXqfzxGkv6KkCULU

js raena.ai collected 2026-10-05 12:28:03 UTC 9,164 bytes, 4 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="ebb243f6-57eb-c165-db52-551d6b8bdf02")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,563116,e=>{"use strict";var t=e.i(843476),a=e.i(981036),i=e.i(315165),n=e.i(915730),l=e.i(146310);e.i(175675);var r=e.i(445310),s=e.i(384398),o=e.i(526732),c=e.i(618566),d=e.i(271645),u=e.i(680463),p=e.i(438744);function h(e){return(0,p.GenIcon)({tag:"svg",attr:{version:"1.1",x:"0px",y:"0px",viewBox:"0 0 48 48",enableBackground:"new 0 0 48 48"},child:[{tag:"path",attr:{fill:"#FFC107",d:"M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12\r\n	c0-6.627,5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24\r\n	c0,11.045,8.955,20,20,20c11.045,0,20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z"}},{tag:"path",attr:{fill:"#FF3D00",d:"M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657\r\n	C34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z"}},{tag:"path",attr:{fill:"#4CAF50",d:"M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36\r\n	c-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z"}},{tag:"path",attr:{fill:"#1976D2",d:"M43.611,20.083H42V20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571\r\n	c0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z"}}]})(e)}var g=e.i(681307),f=e.i(676544);function m({email:e,onSubmitCode:a,onResendCode:i,onGoBack:n,isLoading:s}){let{t:o}=(0,l.useTranslation)(),[c,u]=(0,d.useState)(["","","",""]),[p,h]=(0,d.useState)(32),g=(0,d.useRef)([null,null,null,null]);(0,d.useEffect)(()=>{if(p>0){let e=setInterval(()=>{h(e=>e-1)},1e3);return()=>clearInterval(e)}},[p]);let x=e=>{e.preventDefault();let t=e.clipboardData.getData("text").replace(/[^0-9]/g,"");if(t.length>0){let e=t.slice(0,4).split(""),i=[...e,...Array(4-e.length).fill("")];u(i);let n=Math.min(e.length-1,3);setTimeout(()=>g.current[n]?.focus(),0),4===i.join("").length&&setTimeout(()=>a(i.join("")),100)}};return(0,t.jsxs)(f.AuthContent,{state:"verify",title:o("app.auth.verify_heading"),description:(0,t.jsxs)(t.Fragment,{children:[o("app.auth.we_have_sent_code_to")," ",(0,t.jsx)("span",{className:"font-semibold text-[#292330] dark:text-white",children:e})]}),children:[(0,t.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,t.jsx)("div",{className:"flex justify-center gap-3",children:c.map((e,i)=>(0,t.jsx)("input",{ref:e=>{g.current[i]=e},"aria-label":o("app.auth.code_digit",{digit:i+1}),type:"text",inputMode:"numeric",pattern:"[0-9]*",maxLength:4,value:e,onChange:e=>((e,t)=>{if(e.length>1){let t=e.replace(/[^0-9]/g,"").slice(0,4).split(""),i=[...t,...Array(4-t.length).fill("")];u(i);let n=Math.min(i.length-1,3);setTimeout(()=>g.current[n]?.focus(),0),4===i.join("").length&&a(i.join(""));return}let i=[...c];if(i[t]=e,u(i),e&&t<3&&g.current[t+1]?.focus(),e&&3===t){let e=i.join("");4===e.length&&a(e)}})(e.target.value.replace(/[^0-9]/g,""),i),onKeyDown:e=>((e,t)=>{if("Backspace"===e.key&&!c[t]&&t>0){let e=[...c];e[t-1]="",u(e),g.current[t-1]?.focus()}})(e,i),onPaste:x,disabled:s,autoComplete:0===i?"one-time-code":"off",className:"size-16 min-w-0 rounded-2xl border border-[#E6E1EA] bg-white text-center text-2xl font-semibold text-[#292330] outline-none transition-colors focus:border-brand focus:ring-4 focus:ring-brand/10 disabled:opacity-50 dark:border-white/10 dark:bg-white/[0.04] dark:text-white"},i))}),(0,t.jsx)(r.Button,{variant:"primary",size:"default",onClick:()=>a(c.join("")),disabled:s||c.some(e=>!e),isLoading:s,children:o("app.auth.continue")}),(0,t.jsxs)("p",{className:"text-center text-sm leading-6 text-[#817989] dark:text-white/55","aria-live":"polite",children:[o("app.auth.didnt_receive_code")," ",p>0?o("app.auth.resend_in",{seconds:p}):(0,t.jsx)("button",{type:"button",onClick:()=>{i(),h(32)},disabled:s,className:"font-semibold text-brand hover:underline",children:o("app.auth.resend")})]}),(0,t.jsx)(r.Button,{variant:"ghost",size:"default",onClick:n,disabled:s,children:o("app.auth.change_email")})]}),(0,t.jsx)(f.AuthTerms,{})]})}let x=g.z.string().email();e.s(["default",0,function({redirectTo:e,mode:p,initialEmail:g,initialShowVerification:_=!1,initialError:b}){let v=(0,c.useRouter)(),{t:y}=(0,l.useTranslation)(),{appDomain:j}=(0,n.useDomains)(),[w,C]=(0,d.useState)(g??""),[k,N]=(0,d.useState)(b??null),[T,S]=(0,d.useState)(!1),[z,A]=(0,d.useState)(_&&!!g),I=e??j,E=async()=>{S(!0);try{let e=await (0,o.signIn)("google",{redirectTo:I,callbackUrl:`/?loginState=signedIn&redirectTo=${encodeURIComponent(I)}`,redirect:!1});e?.url?window.location.href=e.url:S(!1)}catch{(0,a.default)({title:y("app.auth.failed_to_verify_recaptcha")}),S(!1)}},B=async()=>{S(!0);try{let e=await (0,o.signIn)("apple",{callbackUrl:`/?loginState=signedIn&redirectTo=${encodeURIComponent(I)}`,redirect:!1});e?.url?window.location.href=e.url:S(!1)}catch{(0,a.default)({title:y("app.auth.failed_to_verify_recaptcha")}),S(!1)}},F=async e=>{let t=await fetch("/api/auth/email",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e})}),a=await t.json();if(!a.success)throw Error(a.error||"Failed to send verification email")},R=async()=>
2{if(N(null),!x.safeParse(w).success)return N(y("app.auth.please_enter_a_valid_email_address"));S(!0);try{await F(w),(0,i.default)({title:y("app.auth.code_sent"),description:y("app.auth.please_check_email_for_code")}),A(!0)}catch(e){N(e instanceof Error?e.message:y("app.auth.failed_to_send_verification_email"))}finally{S(!1)}},U=async e=>{S(!0);try{let t=await fetch("/api/auth/email/verify",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:w,code:e})}),i=await t.json();if(!i.success){(0,a.default)({title:y("app.auth.invalid_code"),description:y("app.auth.please_check_code_and_try_again")}),S(!1);return}let n=await (0,o.signIn)("credentials",{token:i.token,redirectTo:I,callbackUrl:`/?loginState=signedIn&redirectTo=${encodeURIComponent(I)}`,redirect:!1});if(n?.error){(0,a.default)({title:y("app.auth.error"),description:y("app.auth.something_went_wrong")}),S(!1);return}n?.url?window.location.href=n.url:S(!1)}catch{(0,a.default)({title:y("app.auth.error"),description:y("app.auth.something_went_wrong")}),S(!1)}},D=async()=>{try{await F(w),(0,i.default)({title:y("app.auth.code_sent"),description:y("app.auth.please_check_email_for_code")})}catch{(0,a.default)({title:y("app.auth.error"),description:y("app.auth.failed_to_resend_code")})}};return z?(0,t.jsx)(m,{email:w,onSubmitCode:U,onResendCode:D,onGoBack:()=>{S(!1),A(!1)},isLoading:T}):(0,t.jsxs)(f.AuthContent,{state:p,title:y("signup"===p?"app.auth.signup_heading":"app.auth.login_heading"),description:y("app.auth.email_code_hint"),children:[(0,t.jsxs)("form",{className:"flex flex-col gap-6",onSubmit:e=>{e.preventDefault(),T||R()},children:[(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)(s.TextField,{containerClassName:"gap-3",className:k?void 0:f.authFieldClassName,"aria-label":y("app.auth.email_address"),label:y("app.auth.email_address"),placeholder:y("app.auth.signup_email_placeholder"),type:"email",autoComplete:"email",name:"email",required:!0,status:k?"error":"normal",helperText:k??void 0,value:w,onChange:e=>{N(null),C(e.target.value)},disabled:T}),(0,t.jsx)(r.Button,{type:"submit",variant:"primary",size:"default",className:"w-full",disabled:T||!w.trim(),isLoading:T,children:y("app.auth.continue")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("div",{className:"h-px flex-1 bg-[#E6E1EA] dark:bg-white/10"}),(0,t.jsx)("span",{className:"text-xs text-[#817989] dark:text-white/50",children:y("app.auth.or_continue_with")}),(0,t.jsx)("div",{className:"h-px flex-1 bg-[#E6E1EA] dark:bg-white/10"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)(r.Button,{type:"button",variant:"outline",size:"default",onClick:E,disabled:T,children:[(0,t.jsx)(h,{className:"size-5"}),y("app.auth.google")]}),(0,t.jsxs)(r.Button,{type:"button",variant:"outline",size:"default",onClick:B,disabled:T,children:[(0,t.jsx)(u.FaApple,{className:"size-5"}),y("app.auth.apple")]})]}),(0,t.jsxs)("p",{className:"text-center text-sm leading-6 text-[#817989] dark:text-white/55",children:[y("signup"===p?"app.auth.already_have_an_account":"app.auth.dont_have_an_account")," ",(0,t.jsx)("button",{type:"button",disabled:T,onClick:()=>{let t="signup"===p?"/login":"/signup";v.push(e?`${t}?redirectTo=${encodeURIComponent(e)}`:t)},className:"rounded font-semibold text-brand hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand",children:y("signup"===p?"app.auth.login":"app.auth.sign_up")})]})]}),(0,t.jsx)(f.AuthTerms,{})]})}],563116)}]);
3
4//# debugId=ebb243f6-57eb-c165-db52-551d6b8bdf02

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.