PageSourceSearch

https://sharvarok.com/_next/static/chunks/app/%5Blocale%5D/(auth)/login/page-de844813f30d7040.js

js sharvarok.com collected 2026-10-02 00:56:47 UTC 12,858 bytes, 1 lines download raw bytes

1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},i=(new e.Error).stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="1e3d84d0-1585-45aa-955c-5bf91be00353",e._sentryDebugIdIdentifier="sentry-dbid-1e3d84d0-1585-45aa-955c-5bf91be00353")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[132],{95826:function(e,i,s){Promise.resolve().then(s.bind(s,97552))},27648:function(e,i,s){"use strict";s.r(i),s.d(i,{default:function(){return t.a}});var a=s(72972),t=s.n(a),n={};for(var r in a)"default"!==r&&(n[r]=(function(e){return a[e]}).bind(0,r));s.d(i,n)},1747:function(e,i,s){"use strict";s.d(i,{Z:function(){return l}});var a=s(57437),t=s(27648),n=s(99376),r=s(42586);function l(){let e=(0,r.useTranslations)("LoginPage"),i=(0,r.useLocale)(),s=(0,n.usePathname)(),l=s.includes("/login"),o=s.includes("/register");return(0,a.jsx)("div",{className:"text-center mb-4",children:(0,a.jsxs)("div",{className:"d-flex justify-content-center",children:[(0,a.jsx)(t.default,{href:"/".concat(i,"/login"),className:"btn btn-sm ".concat(l?"btn-primary":"btn-outline-primary"),children:e("signin")||"Sign In"}),(0,a.jsx)(t.default,{href:"/".concat(i,"/register"),className:"btn btn-sm ".concat(o?"btn-primary":"btn-outline-primary"),children:e("signup")||"Sign Up"})]})})}},97552:function(e,i,s){"use strict";s.d(i,{default:function(){return f}});var a=s(57437),t=s(2265),n=s(80605),r=s(99376),l=s(42586),o=s(77625),c=s(30787);function d(e){let i,s,{callbackUrl:t}=e,r=(0,l.useLocale)(),d=t?t.startsWith("/".concat(r))?t:t.startsWith("/")?"/".concat(r).concat(t):t:"/".concat(r),m=e=>{(0,c.Tt)(r),(0,n.signIn)(e,{callbackUrl:d})},u=["messenger","facebook","instagram"].indexOf((i={messenger:/\bFB[\w_]+\/(Messenger|MESSENGER)/,facebook:/\bFB[\w_]+\//,twitter:/\bTwitter/i,line:/\bLine\//i,wechat:/\bMicroMessenger\//i,puffin:/\bPuffin/i,miui:/\bMiuiBrowser\//i,instagram:/\bInstagram/i,chrome:/\bCrMo\b|CriOS|Android.*Chrome\/[.0-9]* (Mobile)?/,safari:/Version.*Mobile.*Safari|Safari.*Mobile|MobileSafari/,ie:/IEMobile|MSIEMobile/,firefox:/fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile|FxiOS/},s=e=>e.test(o.getUA),Object.keys(i).find(e=>s(i[e]))||"other"))>-1;return(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)("div",{className:"col-12 col-lg-3",children:(0,a.jsxs)("button",{role:"button",className:"btn btn-sm w-100 bg-googleplay transition-hover-top mt-1 text-white",disabled:u,onClick:()=>m("google"),children:[(0,a.jsx)("svg",{width:"14px",height:"14px",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",className:"bi bi-google me-2",viewBox:"0 0 16 16",children:(0,a.jsx)("path",{d:"M15.545 6.558a9.42 9.42 0 0 1 .139 1.626c0 2.434-.87 4.492-2.384 5.885h.002C11.978 15.292 10.158 16 8 16A8 8 0 1 1 8 0a7.689 7.689 0 0 1 5.352 2.082l-2.284 2.284A4.347 4.347 0 0 0 8 3.166c-2.087 0-3.86 1.408-4.492 3.304a4.792 4.792 0 0 0 0 3.063h.003c.635 1.893 2.405 3.301 4.492 3.301 1.078 0 2.004-.276 2.722-.764h-.003a3.702 3.702 0 0 0 1.599-2.431H8v-3.08h7.545z"})}),(0,a.jsx)("span",{children:"Google"})]})}),(0,a.jsx)("div",{className:"col-12 col-lg-3 mt-2 mt-lg-0",children:(0,a.jsxs)("button",{role:"button",className:"btn btn-sm w-100 btn-dark transition-hover-top mt-1 text-white",onClick:()=>m("apple"),children:[(0,a.jsx)("svg",{width:"14px",height:"14px",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",className:"bi bi-apple me-2",viewBox:"0 0 16 16",children:(0,a.jsx)("path",{d:"M11.182.008C11.148-.03 9.923.023 8.857 1.18c-1.066 1.156-.902 2.482-.878 2.516.024.034 1.52.087 2.475-1.258.955-1.345.762-2.391.728-2.43Zm3.314 11.733c-.048-.096-2.325-1.234-2.113-3.422.212-2.189 1.675-2.789 1.698-2.854.023-.065-.597-.79-1.254-1.157a3.692 3.692 0 0 0-1.563-.434c-.108-.003-.483-.095-1.254.116-.508.139-1.653.589-1.968.607-.316.018-1.256-.522-2.267-.665-.647-.125-1.333.131-1.824.328-.49.196-1.422.754-2.074 2.237-.652 1.482-.311 3.83-.067 4.56.244.729.625 1.924 1.273 2.796.576.984 1.34 1.667 1.659 1.899.319.232 1.219.386 1.843.067.502-.308 1.408-.485 1.766-.472.357.013 1.061.154 1.782.539.571.197 1.111.115 1.652-.105.541-.221 1.324-1.059 2.238-2.758.347-.79.505-1.217.473-1.282Z"})}),(0,a.jsx)("span",{children:"Apple"})]})}),(0,a.jsx)("div",{className:"col-12 col-lg-3 mt-2 mt-lg-0",children:(0,a.jsxs)("button",{role:"button",className:"btn btn-sm w-100 btn-facebook transition-hover-top mt-1",onClick:()=>m("facebook"),children:[(0,a.jsx)("i",{className:"fi fi-social-facebook"}),(0,a.jsx)("span",{children:"Facebook"})]})}),(0,a.jsx)("div",{className:"col-12 col-lg-3 mt-2 mt-lg-0",children:(0,a.jsxs)("button",{role:"button",className:"btn btn-sm w-100 btn-primary transition-hover-top mt-1",onClick:()=>
1m("discord"),children:[(0,a.jsx)("svg",{width:"14px",height:"14px",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",className:"bi bi-discord me-2",viewBox:"0 0 16 16",children:(0,a.jsx)("path",{d:"M13.545 2.907a13.227 13.227 0 0 0-3.257-1.011.05.05 0 0 0-.052.025c-.141.25-.297.577-.406.833a12.19 12.19 0 0 0-3.658 0 8.258 8.258 0 0 0-.412-.833.051.051 0 0 0-.052-.025c-1.125.194-2.22.534-3.257 1.011a.041.041 0 0 0-.021.018C.356 6.024-.213 9.047.066 12.032c.001.014.01.028.021.037a13.276 13.276 0 0 0 3.995 2.02.05.05 0 0 0 .056-.019c.308-.42.582-.863.818-1.329a.05.05 0 0 0-.01-.059.051.051 0 0 0-.018-.011 8.875 8.875 0 0 1-1.248-.595.05.05 0 0 1-.02-.066.051.051 0 0 1 .015-.019c.084-.063.168-.129.248-.195a.05.05 0 0 1 .051-.007c2.619 1.196 5.454 1.196 8.041 0a.052.052 0 0 1 .053.007c.08.066.164.132.248.195a.051.051 0 0 1-.004.085 8.254 8.254 0 0 1-1.249.594.05.05 0 0 0-.03.03.052.052 0 0 0 .003.041c.24.465.515.909.817 1.329a.05.05 0 0 0 .056.019 13.235 13.235 0 0 0 4.001-2.02.049.049 0 0 0 .021-.037c.334-3.451-.559-6.449-2.366-9.106a.034.034 0 0 0-.02-.019Zm-8.198 7.307c-.789 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.45.73 1.438 1.613 0 .888-.637 1.612-1.438 1.612Zm5.316 0c-.788 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.451.73 1.438 1.613 0 .888-.631 1.612-1.438 1.612Z"})}),(0,a.jsx)("span",{children:"Discord"})]})})]})}var m=s(1747),u=s(27648);function h(e){let{callbackUrl:i}=e,s=(0,l.useTranslations)("LoginPage"),r=(0,l.useLocale)(),[o,c]=(0,t.useState)({email:"",password:""}),[d,m]=(0,t.useState)(!1),[h,f]=(0,t.useState)(""),[b,p]=(0,t.useState)(""),[x,g]=(0,t.useState)({}),[w,j]=(0,t.useState)(!1),[v,N]=(0,t.useState)(!1),y=e=>"CredentialsSignin"===e?s("errors.invalid_credentials"):"EmailNotVerified"===e?s("errors.email_not_verified"):s("errors.login_failed"),_=e=>/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e),k=()=>o.email.trim()?_(o.email)?!!o.password||(f(s("errors.password_required")),!1):(f(s("errors.email_invalid")),!1):(f(s("errors.email_required")),!1),S=async e=>{if(e.preventDefault(),m(!0),f(""),j(!0),!k()){m(!1);return}try{let e=await fetch("/api/auth/check-email-verification",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:o.email.toLowerCase().trim()})});if(e.ok){let i=await e.json();if(!i.exists){f(s("errors.invalid_credentials")),m(!1);return}if(!i.hasPassword){f(s("errors.social_account_only")||"This account uses social login. Please use your social account to sign in."),m(!1);return}if(!i.emailVerified){p("EmailNotVerified"),f(s("errors.email_not_verified")),m(!1);return}}let a=await (0,n.signIn)("credentials",{email:o.email.toLowerCase().trim(),password:o.password,redirect:!1});if(null==a?void 0:a.error){p(a.error);let e=y(a.error);f(e)}else(null==a?void 0:a.ok)&&(window.location.href=i||"/".concat(r))}catch(e){f(s("errors.network_error"))}finally{m(!1)}},C=e=>{let{name:i,value:s}=e.target;c({...o,[i]:s}),h&&(f(""),p(""))},M=e=>{g({...x,[e]:!0})},z=(e,i)=>(x[e]||w)&&!i;return(0,a.jsxs)("form",{onSubmit:S,children:[(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsxs)("label",{htmlFor:"email",className:"form-label",children:[s("email")||"Email"," *"]}),(0,a.jsx)("input",{type:"email",className:"form-control ".concat(z("email",_(o.email))?"is-invalid":""),id:"email",name:"email",value:o.email,onChange:C,onBlur:()=>M("email"),required:!0,placeholder:s("email_placeholder")||"Enter your email"}),z("email",_(o.email))&&(0,a.jsx)("div",{className:"invalid-feedback",children:s("errors.email_invalid")})]}),(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsxs)("label",{htmlFor:"password",className:"form-label",children:[s("password")||"Password"," *"]}),(0,a.jsxs)("div",{className:"position-relative",children:[(0,a.jsx)("input",{type:v?"text":"password",className:"form-control pe-5",id:"password",name:"password",value:o.password,onChange:C,required:!0,minLength:6,placeholder:s("password_placeholder")||"Enter your password"}),(0,a.jsx)("button",{type:"button",className:"btn btn-link position-absolute end-0 top-50 translate-middle-y me-3 p-0 border-0 bg-transparent text-muted",onClick:()=>N(!v),style:{zIndex:5},children:v?(0,a.jsxs)("svg",{width:"20",height:"20",fill:"currentColor",viewBox:"0 0 16 16",children:[(0,a.jsx)("path",{d:"m10.79 12.912-1.614-1.615a3.5 3.5 0 0 1-4.474-4.474l-2.06-2.06C.938 6.278 0 8 0 8s3 5.5 8 5.5a7.029 7.029 0 0 0 2.79-.588zM5.21 3.088A7.028 7.028 0 0 1 8 2.5c5 0 8 5.5 8 5.5s-.939 1.721-2.641 3.238l-2.062-2.062a3.5 3.5 0 0 0-4.474-4.474L5.21 3.089z"}),(0,a.jsx)("path",{d:"M5.525 7.646a2.5 2.5 0 0 0 2.829 2.829l-2.83-2.829zm4.95.708-2.829-2.83a2.5 2.5 0 0 1 2.829 2.829zm3.171 6-12-12 .708-.708 12 12-.708.708z"})]}):(0,a.jsxs)("svg",{width:"20",height:"20",fill:"currentColor",viewBox:"0 0 16 16",children:[(0,a.jsx)("path",{d:"M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"}),(0,a.jsx)("path",{d:"M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"})]})})]})]}),h&&(0,a.jsxs)("div",{className:"alert alert-danger",role:"alert",children:[h,"EmailNotVerified"===b&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsx)(u.default,{href:"/".concat(r,"/resend-verification"),className:"alert-link",children:s("resend_verification")||"Resend verification email"})]})]}),(0,a.jsx)("button",{type:"submit",className:"btn btn-primary w-100",disabled:d,children:d?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"spinner-border spinner-border-sm me-2",role:"status","aria-hidden":"true"}),s("signing_in")||"Signing in..."]}):s("signin")||"Sign In"}),(0,a.jsx)("div",{className:"text-center mt-3",children:(0,a.jsx)(u.default,{href:"/".concat(r,"/forgot-password"),className:"text-decoration-none",children:s("forgot_password")||"Forgot Password?"})})]})}function f(){let e=(0,l.useTranslations)("LoginPage"),i=(0,l.useLocale)(),{data:s,status:o}
1=(0,n.useSession)(),c=(0,r.useRouter)(),u=(0,r.useSearchParams)().get("callbackUrl")||"/".concat(i);return((0,t.useEffect)(()=>{(null==s?void 0:s.user)&&c.push(u)},[null==s?void 0:s.user,u,c]),null==s?void 0:s.user)?null:(0,a.jsx)("div",{className:"section pt-5 pb-4",children:(0,a.jsx)("div",{className:"container",children:(0,a.jsxs)("div",{className:"col-12 col-sm-10 col-md-8 col-xl-8 order-1 order-xl-2 mx-auto mb-5",children:[(0,a.jsx)("div",{className:"accordion mb-4",id:"accordionAccount",children:(0,a.jsxs)("div",{className:"text-center mb-5",children:[(0,a.jsx)("h1",{className:"display-6 fw-bold",children:e("welcome")}),(0,a.jsx)("p",{className:"lead m-0",children:e("signin_description")})]})}),(0,a.jsxs)("div",{className:"px-4 px-md-5 pb-4 pb-md-5 pt-4 pt-md-5 bg-white card rounded-xl",children:[(0,a.jsx)(m.Z,{}),(0,a.jsx)(h,{callbackUrl:u}),(0,a.jsx)("div",{className:"row mt-4",children:(0,a.jsxs)("div",{className:"col-12",children:[(0,a.jsx)("hr",{className:"my-4"}),(0,a.jsx)("div",{className:"text-center mb-3",children:(0,a.jsx)("span",{className:"text-muted",children:e("or_continue_with_social")||"Or continue with social"})}),(0,a.jsx)(d,{callbackUrl:u})]})})]})]})})})}},30787:function(e,i,s){"use strict";s.d(i,{A7:function(){return r},Hs:function(){return n},Tt:function(){return t}});let a="oauth-locale";function t(e){"undefined"!=typeof document&&(document.cookie="".concat(a,"=").concat(e,"; max-age=").concat(600,"; path=/; SameSite=Lax"))}function n(){if("undefined"!=typeof document)for(let e of document.cookie.split(";")){let[i,s]=e.trim().split("=");if(i===a)return s}return null}function r(){"undefined"!=typeof document&&(document.cookie="".concat(a,"=; max-age=0; path=/"))}}},function(e){e.O(0,[2972,2586,605,7625,2971,2318,1744],function(){return e(e.s=95826)}),_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.