1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[59484],{20137:(e,r,t)=>{"use strict";t.d(r,{A:()=>s});let s=(0,t(47032).A)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},24266:(e,r,t)=>{"use strict";t.d(r,{A:()=>s});let s=(0,t(47032).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},35157:(e,r,t)=>{"use strict";t.d(r,{A:()=>s});let s=(0,t(47032).A)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},39323:(e,r,t)=>{"use strict";t.d(r,{c:()=>l});var s=t(86697);function a(e,r){return(...e)=>{try{return r(...e)}catch{throw Error(void 0)}}}let l=a(0,s.c3);a(0,s.kc)},47032:(e,r,t)=>{"use strict";t.d(r,{A:()=>n});var s=t(92824);let a=e=>{let r=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,t)=>t?t.toUpperCase():r.toLowerCase());return r.charAt(0).toUpperCase()+r.slice(1)},l=function(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return r.filter((e,r,t)=>!!e&&""!==e.trim()&&t.indexOf(e)===r).join(" ").trim()};var o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,s.forwardRef)((e,r)=>{let{color:t="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:n,className:c="",children:d,iconNode:u,...h}=e;return(0,s.createElement)("svg",{ref:r,...o,width:a,height:a,stroke:t,strokeWidth:n?24*Number(i)/Number(a):i,className:l("lucide",c),...!d&&!(e=>{for(let r in e)if(r.startsWith("aria-")||"role"===r||"title"===r)return!0})(h)&&{"aria-hidden":"true"},...h},[...u.map(e=>{let[r,t]=e;return(0,s.createElement)(r,t)}),...Array.isArray(d)?d:[d]])}),n=(e,r)=>{let t=(0,s.forwardRef)((t,o)=>{let{className:n,...c}=t;return(0,s.createElement)(i,{ref:o,iconNode:r,className:l("lucide-".concat(a(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-".concat(e),n),...c})});return t.displayName=a(e),t}},73968:(e,r,t)=>{Promise.resolve().then(t.bind(t,82896))},82896:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>m});var s=t(23732),a=t(92824),l=t(90072),o=t(36690),i=t.n(o),n=t(35157),c=t(20137),d=t(24266),u=t(39323),h=t(99307);function m(e){let r=(0,a.use)(e.searchParams),t=r.redirect||"/account",o=r.ref,m=(0,u.c)("auth.login");(0,a.useEffect)(()=>{o&&(document.cookie="fk_ref=".concat(encodeURIComponent(o),";path=/;max-age=").concat(604800,";SameSite=Lax"))},[o]);let[x,p]=(0,a.useState)(""),[g,f]=(0,a.useState)(""),[b,w]=(0,a.useState)(!1),[y,v]=(0,a.useState)(()=>"ACCOUNT_PENDING_DELETION"===r.error?m("error_account_pending_deleti
1on"):"AccessDenied"===r.error?m("error_generic"):r.error||""),[N,_]=(0,a.useState)(!1),[j,k]=(0,a.useState)(!1),[C,E]=(0,a.useState)(!1),[A,I]=(0,a.useState)(!1),O=async e=>{e.preventDefault(),v(""),_(!0);try{let e=r.error,o=await (0,l.Jv)("credentials",{email:x,password:g,redirect:!1});if(null==o?void 0:o.error){var s,a;"EMAIL_NOT_VERIFIED"===o.code||(null==(s=o.error)?void 0:s.includes("EMAIL_NOT_VERIFIED"))?(v(m("error_email_not_verified")),k(!0)):("ACCOUNT_PENDING_DELETION"===o.code||(null==(a=o.error)?void 0:a.includes("ACCOUNT_PENDING_DELETION"))||"ACCOUNT_PENDING_DELETION"===e?v(m("error_account_pending_deletion")):"AccessDenied"===e?v(m("error_generic")):v(m("error_invalid_credentials")),k(!1)),I(!1),_(!1)}else if(null==o?void 0:o.ok){if((0,h.Q)(),window.opener){window.opener.postMessage({type:"login-success"},window.location.origin),window.close();return}window.location.href=t}}catch(e){v(m("error_generic")),_(!1)}};return(0,s.jsxs)("div",{className:"w-full max-w-[420px]",children:[(0,s.jsx)("div",{className:"text-center mb-8",children:(0,s.jsx)(i(),{href:"/",children:(0,s.jsx)("h1",{className:"text-3xl font-light tracking-[0.3em] text-white/90 hover:text-white transition-colors cursor-pointer",style:{fontFamily:"'Inter', sans-serif"},children:"FIKTU"})})}),(0,s.jsxs)("div",{className:"bg-white rounded-2xl shadow-2xl overflow-hidden",children:[(0,s.jsxs)("div",{className:"p-8 pb-6",children:[(0,s.jsx)("h2",{className:"text-2xl font-bold text-gray-900 mb-6",children:m("title")}),y&&(0,s.jsxs)("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-lg text-sm",children:[(0,s.jsx)("p",{className:"text-red-700",children:y}),j&&(0,s.jsx)("button",{type:"button",onClick:async()=>{E(!0),I(!1);try{await fetch("/api/auth/resend-verification",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:x})}),I(!0)}catch(e){}finally{E(!1)}},disabled:C||A,className:"mt-2 text-blue-600 hover:text-blue-700 hover:underline font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:C?"...":A?m("resend_success"):m("resend_verification")})]}),(0,s.jsxs)("form",{onSubmit:O,className:"space-y-5",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"login-email",className:"block text-sm font-medium text-gray-700 mb-1.5",children:m("email")}),(0,s.jsx)("input",{id:"login-email",type:"email",value:x,onChange:e=>p(e.target.value),required:!0,autoComplete:"email",className:"w-full px-4 py-2.5 border border-gray-300 rounded-lg text-gray-900 placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500/40 focus:border-blue-500 transition-all duration-200",placeholder:m("email_placeholder")})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"login-password",className:"block text-sm font-medium text-gray-700 mb-1.5",children:m("password")}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("input",{id:"login-password",type:b?"text":"password",value:g,onChange:e=>f(e.target.value),required:!0,autoComplete:"current-password",className:"w-full px-4 py-2.5 border border-gray-300 rounded-lg text-gray-900 placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500/40 focus:border-blue-500 transition-all duration-200 pr-12"}),(0,s.jsx)("button",{type:"button",onClick:()=>w(!b),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 transition-colors",title:b?m("hide_password"):m("show_password"),children:b?(0,s.jsx)(n.A,{size:20}):(0,s.jsx)(c.A,{size:20})})]}),(0,s.jsx)("div",{className:"mt-1.5 text-right",children:(0,s.jsx)(i(),{href:"/forgot-password",className:"text-sm text-blue-600 hover:text-blue-700 hover:underline transition-colors",children:m("forgot_password")})})]}),(0,s.jsx)("button",{id:"login-submit-btn",type:"submit",disabled:N,className:"w-full py-2.5 px-4 bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-lg transition-all duration-200 flex items-center justify-center gap-2 disabled:opacity-60 disabled:cursor-not-allowed shadow-lg shadow-blue-600/25 hover:shadow-blue-600/40",children:N?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.A,{size:18,className:"animate-spin"}),m("loading")]}):m("submit")})]}),(0,s.jsxs)("div",{className:"mt-5 text-center text-sm text-gray-600",children:[m("new_user"),(0,s.jsx)(i(),{href:"/register".concat((()=>{let e=new URLSearchParams;"/account"!==t&&e.set("redirect",t),o&&e.set("ref",o);let r=e.toString();return r?"?".concat(r):""})()),className:"text-blue-600 hover:text-blue-700 hover:underline font-medium ml-1 transition-colors",children:m("register_link")})]})]}),(0,s.jsxs)("div",{className:"border-t border-gray-200 px-8 py-5",children:[(0,s.jsx)("p",{className:"text-center text-sm text-gray-500 mb-4",children:m("social_divider")}),(0,s.jsx)("div",{className:"flex justify-center gap-4",children:(0,s.jsx)("button",{id:"google-login-btn",onClick:()=>{(0,l.Jv)("keycloak",{callbackUrl:t},{kc_idp_hint:"google",prompt:"select_account"})},className:"flex items-center justify-center w-12 h-12 rounded-full border border-gray-300 hover:border-gray-400 hover:bg-gray-50 transition-all duration-200 hover:shadow-md",title:m("google_login"),children:(0,s.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",children:[(0,s.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"}),(0,s.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"}),(0,s.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"}),(0,s.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"})]})})})]})]})]})}},99307:(e,r,t)=>{"use strict";function s(){window.postMessage({type:"FATKUN_WEB_LOGIN_SYNC"},"*")}t.d(r,{Q:()=>s})}},e=>{e.O(0,[86697,36690,90072,56246,70396,77358],()=>e(e.s=73968)),_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.