(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3459],{42070:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/login",function(){return r(10867)}])},30907:function(e,n,r){"use strict";var t=r(97175),i=r(15311);n.Z=(0,t.Z)((0,i.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility")},66258:function(e,n,r){"use strict";var t=r(97175),i=r(15311);n.Z=(0,t.Z)((0,i.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff")},76604:function(e,n,r){"use strict";r.d(n,{L:function(){return p}});var t=r(15311),i=r(80377),s=r.n(i),o=r(33255),d=r(6634),a=r(64817),l=r(34095),c=r(71383);function x(){let e=(0,o.Z)(),n=(0,d.Z)(e.breakpoints.down("md"));return(0,t.jsx)(c.rj,{spacing:n?0:3,children:(0,t.jsx)(c.rj.Item,{xs:12,children:(0,t.jsx)(c.n1,{children:h.map(e=>(0,t.jsxs)(c.n1.Slide,{children:[(0,t.jsx)(c.Ee,{src:"/images/uptionHand.png",height:n?158:308,width:n?200:392}),(0,t.jsx)(c.ZT,{bold:!0,fontSize:n?"26px":"36px",marginBottom:1,children:e.label}),(0,t.jsx)(c.ZT,{fontSize:n?"16px":"20px",children:e.description}),(0,t.jsx)(c.ZT,{fontSize:n?"16px":"20px",children:e.description1})]},e.label))})})})}let h=[{label:"Hesabından Sınırları Kaldır!",description:"UPT’de Kurumsal M\xfcşteri hesabını a\xe7!",description1:"İster yurt i\xe7ine ister y\xfczlerce \xfclkeye, \xfcstelik istediğin para birimi ile, 7/24 para g\xf6nder."}];function p(e){let{children:n}=e,r=(0,o.Z)(),{t:i}=(0,a.Z)("login"),s=r.breakpoints.down("md"),h=(0,d.Z)(s),p=(0,t.jsx)(c.rj.Item,{xs:12,sx:{mx:1,maxHeight:"70px"},children:(0,t.jsxs)(c.rj,{justifyContent:h?"space-between":"flex-end",children:[(0,t.jsx)(c.rj.Item,{children:(0,t.jsx)(l.jy,{sx:{color:"inherit"}})}),(0,t.jsx)(c.rj.Item,{children:(0,t.jsx)(l.Ss,{})})]})});return(0,t.jsxs)(c.rj,{sx:{minHeight:"100vh"},alignItems:"stretch",children:[(0,t.jsx)(c.rj.Item,{xs:12,md:5,children:(0,t.jsxs)(c.rj,{alignItems:"flex-start",sx:{height:"85%",[s]:{height:"auto"}},children:[h&&p,(0,t.jsx)(c.rj.Item,{children:(0,t.jsxs)(c.rj,{sx:{padding:"50px",[s]:{padding:"0px 15px"}},children:[(0,t.jsx)(c.rj.Item,{children:(0,t.jsx)(c.rU,{href:"/login",children:(0,t.jsx)(c.Ee,{src:"/svg/uption-logo.svg",alt:"uption-logo",width:150,height:31})})}),(0,t.jsx)(c.rj.Item,{children:(0,t.jsx)(c.ZT,{bold:!0,color:r.palette.text.light,sx:{fontSize:"20px",[s]:{fontSize:"17px"}},children:i("corporate").toUpperCase()})}),(0,t.jsx)(c.rj,{sx:{justifyContent:"center"},children:(0,t.jsx)(c.rj.Item,{sx:{mb:2},children:n})})]})})]})}),(0,t.jsx)(c.rj.Item,{xs:12,md:7,children:(0,t.jsx)(c.Zb,{sx:{height:"100%",background:r.palette.background.gradient,borderRadius:"20px 0px 0px 20px",padding:8,color:r.palette.text.contrast,[s]:{borderRadius:"20px 20px 0px 0px",paddingY:0}},children:(0,t.jsxs)(c.rj,{children:[!h&&p,(0,t.jsx)(c.rj.Item,{xs:12,children:(0,t.jsx)(x,{})})]})})})]})}p.propTypes={children:s().node}},10867:function(e,n,r){"use strict";r.r(n),r.d(n,{__N_SSG:function(){return z},default:function(){return k}});var t=r(15311),i=r(71383),s=r(4445),o=r(20132),d=r(64817),a=r(33255),l=r(6634),c=r(74526),x=r(58314),h=r(98051),p=r(81013),j=r(37420),u=r(62476);let m=(0,x.Ue)((0,h.n)(e=>({data:{},error:null,userInfo:async(n,r)=>{e({data:{},error:null});let t=await (0,u.xG)("login");try{var i;let{data:s}=await j.j.userInfo(n);(null==s?void 0:null===(i=s.header)||void 0===i?void 0:i.isSuccess)?(r.moveNext(),e({data:{...n,...s.body}}),await j.j.sendOtp({phoneNumber:s.body.phoneNumber,systemUserId:s.body.systemUserId,otpType:1,otpChannel:1})):(e({error:s.body}),p.Am.error(t("loginError")))}catch(n){e({error:n.data.body}),p.Am.error("Giriş yapılırken hata alındı.L\xfctfen daha sonra tekrar deneyiniz.")}}})));var f=r(31503);let g=(0,x.Ue)((0,h.n)(e=>({data:{},error:null,checkOtp:async n=>{e({data:{},error:null});try{let{data:r}=await j.j.checkOtp({otpCode:n.phoneConfirm,phoneNumber:n.phoneNumber});if(200===r.body.httpStatusCode){let r=await j.j.login({userName:n.userName,password:n.password});f.Z.set("phone-number",n.phoneNumber,{secure:!0,sameSite:"strict"}),await fetch("/api/login",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({TokenExpireInSeconds:r.data.body.TokenExpireInSeconds})}),r.data.header.isSuccess?(e({data:r.data.body}),(0,u.uX)({target:"/"})):e({error:r.data})}else p.Am.error(r.body.description),e({error:r.body})}catch(n){e({error:!0})}}}))),b=(0,x.Ue)((0,h.n)(e=>({data:{},error:null,sendOtp:async n=>{try{let r=await (0,u.xG)("login"),t=await j.j.sendOtp({phoneNumber:n.phoneNumber,systemUserId:n.systemUserId,otpType:1,otpChannel:1});p.Am.success(r("againSentCode")),e({data:t.body})}catch(n){e({error:!0})}}})));var y=r(34095);function S(){let e=(0,a.Z)(),{t:n}=(0,d.Z)("login"),r=e.breakpoints.down("md"),x=(0,l.Z)(r),[h,p]=(0,o.useState)(!1),[j,u]=(0,o.useState)(null),[f,S]=(0,o.useState)(!1),[w,I]=(0,o.useState)(!1),T=m(e=>e.data),{checkOtp:Z,error:C}=g(e=>e),{sendOtp:v}=b(e=>e),{timeLeft:{minutes:z,seconds:k},isCountdownOver:N,resetCountdown:_}=(0,c.MY)({countdownSeconds:90}),E={initialValues:{phoneConfirm:""},validationSchema:s.Ry().shape({phoneConfirm:s.Z_().length(6,n("confirmCodeError")).required(n("confirmCodeError"))}),onSubmit:async e=>{I(!0),await Z({...e,...T}),null!==C&&"NexusBusinessExceptionDetail"===C.body.type&&(u(C.body.message),S(!0)),I(!1)}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.l0,{...E,children:(0,t.jsxs)(i.rj,{sx:{width:"320px",mx:"auto",my:"auto","& .MuiGrid-item":{paddingX:0}},spacing:3,direction:"column",children:[!x&&(0,t.jsx)(i.rj.Item,{children:(0,t.jsx)(i.ZT,{fontSize:26,textAlign:"center",bold:!0,children:n("signIn")})}),(0,t.jsxs)(i.rj.Item,{children:[(0,t.jsx)(i.ZT,{fontSize:20,textAlign:"center",bold:!0,children:n("confirm")}),(0,t.jsx)(i.ZT,{textAlign:"center",marginTop:"0.8rem",children:n("sentConfirmCode")})]}),(0,t.jsx)(i.rj.Item,{children:(0,t.jsxs)(i.ZT,{fontSize:18,textAlign:"center",bold:!0,children:["+",T.phoneNumber]})}),(0,t.jsx)(i.rj.Item,{children:(0,t.jsx)(i.l0.CodeVerification,{variant:"filled",length:6,name:"phoneConfirm",onComplete:()=>p(!0),helperText:{fontSize:e.codeVerification.helperText.fontSize,color:e.codeVerification.helperText.color,textAlign:"center"}})}),(0,t.jsxs)(i.rj.Item,{children:[N&&(0,t.jsx)(i.ZT,{marginBottom:"0.5rem",color:"red",children:n("countdownOver")}),(0,t.jsx)(i.zx,{onClick:async()=>{await v(T),_()},disabled:!N,color:"inherit",sx:{fontSize:16,fontWeight:"bold",width:"100%"},children:n("sendAgain")}),(0,t.jsx)(i.ZT,{textAlign:"center",marginTop:"0.5rem",children:"".concat(z,":").concat(k," ").concat(n("minutes"))})]}),(0,t.jsx)(i.rj.Item,{sx:{width:"100%"},children:(0,t.jsx)(i.zx,{sx:{fontSize:18,padding:2,borderRadius:2,width:"100%"},variant:"contained",type:"submit",disabled:!h||w,children:n("common:nextButton")})})]})}),j&&(0,t.jsx)(y.nA,{message:j,open:f,onClose:()=>{S(!1)}})]})}var w=r(66258),I=r(30907),T=r(25244),Z=r(93264);function C(){let e=(0,T.s)(),n=(0,a.Z)(),{t:r}=(0,d.Z)("login"),c=n.breakpoints.down("md"),x=(0,l.Z)(c),h=f.Z.get("phone-number"),p=m(e=>e.userInfo),j=(0,Z.OE)(e=>e.logout),[u,g]=(0,o.useState)(!1),[b,y]=(0,o.useState)(!1),[S,C]=(0,o.useState)(!1),[v,z]=(0,o.useState)(!1),k=()=>{caches.keys().then(e=>{e.forEach(e=>{caches.delete(e)})})};(0,o.useEffect)(()=>{k()},[]),(0,o.useEffect)(()=>{let e=async()=>{await fetch("/api/logout",{method:"POST",headers:{"Content-Type":"application/json"}}),j()};h&&e()},[]);let N={initialValues:{userName:"",password:""},validationSchema:s.Ry().shape({userName:s.Z_().required(),password:s.Z_().length(6).required()}),onSubmit:async n=>{z(!0),await p(n,e),z(!1)}};return(0,t.jsx)(i.l0,{...N,children:(0,t.jsxs)(i.rj,{sx:{width:"320px",m:"auto","& .MuiGrid-item":{paddingX:0}},spacing:x?1:2,children:[(0,t.jsx)(i.rj.Item,{xs:12,children:(0,t.jsx)(i.ZT,{bold:!0,sx:{pb:"30px",textAlign:"center",fontSize:26,[c]:{fontSize:22,pb:0}},children:r("signIn")})}),(0,t.jsxs)(i.rj.Item,{xs:12,children:[(0,t.jsxs)(i.ZT,{children:[" ",r("userCode")]}),(0,t.jsx)(i.l0.TextField,{variant:"filled",name:"userName",sx:{borderRadius:"6px",marginTop:"4px"}})]}),(0,t.jsx)(i.rj.Item,{xs:12,children:(0,t.jsxs)(i.rj,{children:[(0,t.jsxs)(i.rj.Item,{display:"flex",xs:12,children:[(0,t.jsxs)(i.ZT,{children:[" ",r("password")]}),(0,t.jsx)(i.zx,{sx:{color:"gray"},onClick:()=>g(e=>!e),children:u?(0,t.jsx)(w.Z,{}):(0,t.jsx)(I.Z,{})})]}),(0,t.jsx)(i.rj.Item,{children:(0,t.jsx)(i.l0.CodeVerification,{name:"password",length:6,visible:u,variant:"filled",helperText:{color:n.codeVerification.helperText.color},onComplete:()=>y(!0)})})]})}),(0,t.jsxs)(i.rj.Item,{xs:"auto",display:"flex",justifyContent:"center",children:[(0,t.jsx)(i.zx,{sx:{color:n.palette.secondary.main,fontWeight:"600"},onClick:()=>C(!0),children:r("forgotUserPassword")}),(0,t.jsx)(i.Vq,{defaultTitle:!0,onClose:()=>C(!1),open:S,title:r("forgotUserPassword"),children:(0,t.jsxs)(i.rj,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50px"},children:[(0,t.jsx)(i.rj.Item,{children:(0,t.jsx)(i.ZT,{sx:{textAlign:"center",pb:3,m:"auto"},children:r("forgotUserPasswordMessage")})}),(0,t.jsx)(i.rj.Item,{children:(0,t.jsx)(i.zx,{variant:"contained",sx:{fontSize:18,padding:1,width:"20vw",mb:3},onClick:()=>C(!1),children:r("close")})})]})})]}),(0,t.jsx)(i.rj.Item,{xs:12,children:(0,t.jsx)(i.zx,{sx:{fontSize:18,paddingY:"10px",borderRadius:"8px",width:"100%"},variant:"contained",type:"submit",disabled:!b||v,children:v?"Giriş yapılıyor...":r("signIn")})}),(0,t.jsx)(i.rj.Item,{xs:12,children:(0,t.jsx)(i.rU,{href:"/register",sx:{width:"100%"},children:(0,t.jsx)(i.zx,{sx:{fontSize:18,paddingY:"10px",marginTop:"4px",borderRadius:"8px",width:"100%"},variant:"outlined",color:"inherit",type:"submit",children:r("signUp")})})})]})})}var v=r(76604),z=!0;function k(){return(0,t.jsxs)(v.L,{children:[(0,t.jsx)(i.h_,{title:"UPTION T\xfczel Web Şube - Login"}),(0,t.jsxs)(i.vF,{hideStepLabels:!0,children:[(0,t.jsx)(i.vF.Step,{children:(0,t.jsx)(C,{})},"log-in-entrance"),(0,t.jsx)(i.vF.Step,{children:(0,t.jsx)(S,{})},"confirm")]})]})}}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=42070)}),_N_E=e.O()}]);