PageSourceSearch

https://asset.idefix.com/_next/static/chunks/4110-c3cc4c9083b9fda9.js

js idefix.com collected 2026-09-24 17:10:48 UTC 30,171 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4110],{24110:function(e,l,a){a.d(l,{Z:function(){return ej}});var t,i,n=a(67294),r=a(11163),s=a(45220),o=a.n(s),d=a(52353),c=a.n(d),m=a(84238),u=a.n(m),x=a(19609),f=a(85714),p=a(64495),h=a(86098),g=a(59499),v=a(87536),j=a(25617),y=a(47533),b=a(41609),N=a.n(b),w=a(37225),k=a(26452),O=a(5789),C=a(76621),z=a(31460),S=a(60428),D=a(85570),E=a(67052),P=a(41042),Z=a(86396),F=a(97258),I=a(85893);function R(e,l){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);l&&(t=t.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),a.push.apply(a,t)}return a}function T(e){for(var l=1;l<arguments.length;l++){var a=null!=arguments[l]?arguments[l]:{};l%2?R(Object(a),!0).forEach(function(l){(0,g.Z)(e,l,a[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):R(Object(a)).forEach(function(l){Object.defineProperty(e,l,Object.getOwnPropertyDescriptor(a,l))})}return e}let K=e=>{var l,a;let{isOpen:t,setOpen:i,setComponent:r}=e,{isDeviceMobile:s}=(0,O.dD)(),{register:o,watch:d,setValue:m,setError:x,reset:f,formState:{errors:p}}=(0,v.cI)({mode:"onChange",resolver:(0,y.X)(F.B)}),{0:h,1:g}=(0,n.useState)(180),{0:b,1:N}=(0,n.useState)(h),{mailResquest:C,approveMail:R,mailResend:K}=(0,P.aC)(),{0:B,1:$}=(0,n.useState)(0),{0:M,1:_}=(0,n.useState)(),{0:V,1:G}=(0,n.useState)(!1),H=(0,j.I0)(),{toastSuccess:A}=(0,O.pm)(),W=async()=>{let e={token:M.token,code:d("verificationCode")};try{await R(e),r("mail_success"),i(!1),$(0),m("verificationCode","");let l={email:d("newEmail")};H(z.tK.actions.updateEmail(l)),m("newEmail","")}catch(s){var a,t;let n=null==s?void 0:null===(a=s.response)||void 0===a?void 0:null===(t=a.data)||void 0===t?void 0:t.message;x("verificationCode",{type:"verificationCode",message:n})}},q=async()=>{try{G(!0);let e={mail:d("newEmail")},{data:l}=await C(e);A(Z.Jy9),_(l),g(l.remainingSecond),$(1)}catch(n){var a,t;let i=null==n?void 0:null===(a=n.response)||void 0===a?void 0:null===(t=a.data)||void 0===t?void 0:t.message;x("newEmail",{type:"newEmail",message:i})}},L=async()=>{try{let e=await K(null==M?void 0:M.token),{data:l}=e,{remainingSecond:a}=l;A(Z.kTC),g(a),N(a)}catch(r){var t,i;let n=null==r?void 0:null===(t=r.response)||void 0===t?void 0:null===(i=t.data)||void 0===i?void 0:i.message;x("verificationCode",{type:"verificationCode",message:n})}},U=()=>{i(!1),$(0),m("newEmail",""),f()};return(0,I.jsx)(E.Modal,{onClose:U,closeIcon:!0,open:t,title:c()(B)||0===B?"E-posta Değiştir":"E-posta Doğrulama",titleAlign:"left",isMobileFull:!!s(),children:(0,I.jsxs)("div",{className:"lg:px-5 grid grid-cols-1 w-full",children:[(0,I.jsx)("div",{className:"lg:w-[24rem] lg:text-left px-3 w-full",children:c()(B)||0===B?(0,I.jsx)("span",{className:"leading-[1.181rem]",children:"Gireceğiniz yeni E-posta adresinize doğrulama kodu g\xf6nderilecektir."}):(0,I.jsxs)("span",{className:"leading-[1.181rem]",children:["Hesabınızın g\xfcvenliğini sağlamaya yardımcı olmak i\xe7in l\xfctfen e-posta adresinizi doğrulayın. ",(0,I.jsx)("strong",{children:d("newEmail")})," adresinize g\xf6nderilen doğrulama kodu ile e-posta adresinizi doğrulayın."]})}),(0,I.jsx)(I.Fragment,{children:c()(B)||0===B?(0,I.jsxs)("div",{className:"w-full mt-20",children:[(0,I.jsx)(k.Z,{isIcon:!1,isBorder:!1,label:"E-posta",type:"email",value:d("newEmail"),register:T({},o("newEmail"))}),p.newEmail&&(0,I.jsx)(D.Z,{error:null===(l=p.newEmail.message)||void 0===l?void 0:l.toString()})]}):(0,I.jsxs)("div",{className:"flex flex-col items-center gap-[2.5rem] mt-[2.5rem]",children:[(0,I.jsx)(S.$,{isPlaying:!0,duration:h,colors:["#55BD4F","#FB2929","#FB2929"],colorsTime:[20,19,0],size:80,strokeWidth:5,trailStrokeWidth:5,strokeLinecap:"butt",onComplete(){G(!1)},onUpdate(e){N(e),0===e&&g(0)},children(e){let{remainingTime:l}=e,a=10>Math.floor(l%3600/60)?`0${Math.floor(l%3600/60)}`:Math.floor(l%3600/60),t=l%60<10?`0${l%60}`:l%60;return`${a}:${t}`}}),(0,I.jsxs)("div",{className:"w-full",children:[(0,I.jsx)(k.Z,{isIcon:!1,isBorder:!1,label:"Doğrulama Kodu",type:"text",value:d("verificationCode"),error:p.verificationCode,register:T({},o("verificationCode"))}),p.verificationCode&&(0,I.jsx)(D.Z,{error:null===(a=p.verificationCode.message)||void 0===a?void 0:a.toString()})]})]})}),(0,I.jsx)("div",{className:"flex flex-col w-full gap-[2rem] mt-[2rem]",children:c()(B)||0===B?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(w.Z,{variant:"primary",className:"w-full",disabled:!!(p.newEmail||2>u()(d("newEmail"))),onClick:q,children:"G\xfcncelle"}),(0,I.jsx)(w.Z,{variant:"transparent",className:" underline",onClick:U,children:"Vazge\xe7"})]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(w.Z,{variant:"none",className:"underline font-medium disabled:opacity-60",onClick:L,disabled:V,children:"Kodu Tekrar G\xf6nder"}),(0,I.jsx)(w.Z,{variant:"primary",className:"w-full",disabled:!!(p.verificationCode||4>u()(d("verificationCode")))||0===b,onClick:W,children:"Doğrula"})]})})]})})};var B=n.memo(K),$=a(18547),M=a(37534),_=a(60768),V=a(75672),G=a(90262),H=a(73943),A=a(16701),W=a(16310);let q=W.Ry({verificationCode:W.Z_().default(""),customerDeleteReason:W.Ry({id:W.Rx().required(),name:W.Z_().required()})});function L(e,l){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);l&&(t=t.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),a.push.apply(a,t)}return a}let U="Girdiğiniz kod hatalı.",X=e=>{var l,a;return(null==e?void 0:null===(l=e.response)||void 0===l?void 0:null===(a=l.data)||void 0===a?void 0:a.errorCode)==="MAIL_TOKEN_NOT_FOUND"},Y=function(e,l){var a,t,i;let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(X(e))return null;let r=null==e?void 0:null===(a=e.response)||void 0===a?void 0:null===(t=a.data)||void 0===t?void 0:t.message;return"string"==typeof r&&r.length>0?r.includes("No route found")?l:"Girdiğiniz doğrulama kodu eksik veya hatalı. Kontrol edip tekrar deneyiniz."===r?U:r:n||(null==e?void 0:null===(i=e.response)||void 0===i?void 0:i.status)===422?U:l},J=e=>`${String(Math.floor(e/60)).padStart(2,"0")}
1:${String(e%60).padStart(2,"0")}`;(t=i||(i={}))[t.Reason=0]="Reason",t[t.Otp=1]="Otp",t[t.Success=2]="Success";let Q=e=>{if(!e||!e.includes("@"))return e;let[l,a]=e.split("@"),t=`${l.charAt(0)}*`;return`${t}@${a}`},ee="w-full border border-neutral-500 !bg-white text-neutral-500 no-underline hover:!bg-neutral-50 active:!bg-neutral-100 [&_*]:!text-neutral-500 [&_*]:no-underline",el=["first","second","third","fourth","fifth","sixth"],ea=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"gap-3";return(0,I.jsxs)("div",{className:(0,A.cn)("mt-4 flex flex-col",e),role:"status","aria-label":"Y\xfckleniyor",children:[el.slice(0,6).map((e,l)=>(0,I.jsxs)("div",{className:"flex items-start gap-3",children:[(0,I.jsx)("div",{className:"mt-0.5 size-5 shrink-0 animate-pulse rounded-full bg-neutral-200"}),(0,I.jsx)("div",{className:"h-4 animate-pulse rounded bg-neutral-200",style:{width:`${55+l%3*15}%`}})]},e)),(0,I.jsx)("span",{className:"sr-only",children:"Y\xfckleniyor..."})]})},et=e=>{let{isOpen:l,setOpen:a,setComponent:t,email:s=""}=e,o=(0,r.useRouter)(),d=(0,j.I0)(),m=(0,O.Mq)(),{requestAccountDelete:u,confirmAccountDelete:x,deleteAccountReasonsList:p}=(0,P.aC)(),{toastError:h,toastSuccess:b}=(0,O.pm)(),{0:N,1:w}=(0,n.useState)(i.Reason),{0:k,1:S}=(0,n.useState)(!1),{0:D,1:E}=(0,n.useState)(180),{0:F,1:R}=(0,n.useState)(""),{0:T,1:K}=(0,n.useState)(""),{0:B,1:$}=(0,n.useState)([]),{0:W,1:X}=(0,n.useState)(!1),el=(0,n.useRef)(!1),{register:et,watch:ei,reset:en,setValue:er,clearErrors:es}=(0,v.cI)({mode:"onChange",resolver:(0,y.X)(q),defaultValues:{verificationCode:""}}),eo=ei("customerDeleteReason"),ed=ei("verificationCode"),ec=Q(s);(0,n.useEffect)(()=>{l||(en(),w(i.Reason),E(180),R(""),K(""),$([]))},[l,en]),(0,n.useEffect)(()=>{if(!l)return;let e=!1,a=async()=>{X(!0);try{let l=await p();if(e)return;let a=null==l?void 0:l.data;Array.isArray(a)&&$(a.map(e=>({id:e.id??e.customerDeleteReasonId??0,name:e.name??e.reasonText??""})))}catch(n){if(!e){var t,i;h((null==n?void 0:null===(t=n.response)||void 0===t?void 0:null===(i=t.data)||void 0===i?void 0:i.message)??"Silme nedenleri y\xfcklenemedi."),$([])}}finally{e||X(!1)}};return a(),()=>{e=!0}},[l]),(0,n.useEffect)(()=>{if(N!==i.Otp||D<=0)return;let e=setTimeout(()=>E(e=>e-1),1e3);return()=>clearTimeout(e)},[N,D]),(0,n.useEffect)(()=>{N===i.Otp&&0===D&&(R(""),es("verificationCode"))},[N,D,es]),(0,n.useEffect)(()=>{if(ed){let e=ed.replace(/[^0-9]/g,"").slice(0,4);if(e!==ed){er("verificationCode",e);return}}R("")},[ed,er]);let em=async()=>{if(!c()(eo)){S(!0),R("");try{let e=await u(),{token:l,remainingSecond:a}=e.data;K(l),E(a??180),er("verificationCode",""),w(i.Otp)}catch(t){h(Y(t,"Doğrulama kodu g\xf6nderilemedi.")??"Doğrulama kodu g\xf6nderilemedi.")}finally{S(!1)}}},eu=async()=>{S(!0),R(""),er("verificationCode","");try{let e=await u(),{token:l,remainingSecond:a}=e.data;K(l),E(a??180),b(Z.DDe)}catch(t){h(Y(t,"Doğrulama kodu tekrar g\xf6nderilemedi.")??"Doğrulama kodu tekrar g\xf6nderilemedi.")}finally{S(!1)}},ex=async()=>{if(4!==ed.length){R("4 haneli kod giriniz.");return}if(!(0===D||!T||c()(eo))){S(!0),R("");try{let e=await x(T,ed,{reasonText:eo.name,customerDeleteReasonId:eo.id});(204===e.status||200===e.status)&&w(i.Success)}catch(a){let l=Y(a,U,!0);if(!l){R("");return}R(l)}finally{S(!1)}}},ef=()=>{d(z.tK.actions.removeCurrentUser("delete_account")),d(z.tK.actions.removeExternalInfo()),localStorage.clear()},ep=()=>{el.current||(el.current=!0,o.push("/").finally(()=>{ef(),a(!1),el.current=!1}))},eh=()=>{if(N===i.Success){ep();return}a(!1)},eg=N===i.Success,ev=N===i.Reason?"Hesabımı Sil":N===i.Otp?"Doğrulama Kodu G\xf6nderildi":"Hesabınız Silindi",ej=()=>(0,I.jsxs)("div",{className:"flex flex-col",children:[(0,I.jsx)("p",{className:(0,A.cn)(m?"text-label-sm text-neutral-600":"text-label-md text-neutral-600"),children:"Hesabınızı neden silmek istiyorsunuz?"}),(0,I.jsx)("div",{className:(0,A.cn)("mt-4 flex flex-col",m?"gap-4":"gap-3"),children:W?ea(m?"gap-4":"gap-3"):B.map(e=>(0,I.jsxs)("label",{className:"flex items-start gap-3 cursor-pointer",children:[(0,I.jsx)(_.Z,{displayType:"dot",type:"radio",name:"deleteReason",checked:(null==eo?void 0:eo.id
1)===e.id,onChange:()=>er("customerDeleteReason",e,{shouldValidate:!0}),className:"before:border-neutral-300 shrink-0 mt-0.5"}),(0,I.jsx)("span",{className:(0,A.cn)(m?"text-label-xs text-neutral-600":"text-body-sm text-neutral-900"),children:e.name})]},e.id))}),(0,I.jsxs)("div",{className:(0,A.cn)("mt-4 flex flex-col",m?"gap-2":"gap-3"),children:[(0,I.jsx)(f.z,{size:m?"medium":"large",className:(0,A.cn)("w-full",m&&"!h-10"),disabled:c()(eo)||k||W||0===B.length,isLoading:k,onClick:em,children:"Devam Et"}),(0,I.jsx)(f.z,{size:m?"medium":"large",variant:"tertiary",className:(0,A.cn)(ee,m&&"!h-10"),onClick:eh,children:"Vazge\xe7"})]})]}),ey=()=>(0,I.jsxs)("div",{className:"flex flex-col",children:[(0,I.jsxs)("p",{className:(0,A.cn)("w-full text-left",m?"text-label-sm text-neutral-600":"text-label-md text-neutral-600"),children:["Hesabınızı silmek i\xe7in ",(0,I.jsx)("span",{className:(0,A.cn)(m?"text-label-sm text-neutral-900":"text-label-md text-neutral-900"),children:ec})," adresine g\xf6nderilen 4 haneli doğrulama kodunu girin."]}),(0,I.jsxs)("div",{className:"mt-4 flex flex-col",children:[(0,I.jsx)("div",{className:"flex justify-end",children:(0,I.jsxs)("div",{className:(0,A.cn)("flex items-center gap-1.5",D<=0?"text-error-500":"text-secondary-500"),children:[(0,I.jsx)(C.Kpq,{className:(0,A.cn)("shrink-0",m?"size-3":"size-4")}),(0,I.jsx)("span",{className:(0,A.cn)(m?"text-label-xs":"text-label-sm"),children:J(D)})]})}),(0,I.jsxs)("div",{className:"mt-2",children:[(0,I.jsx)(G.ZP,{heightSize:"sm",placeholder:"Doğrulama Kodu",type:"text",inputMode:"numeric",pattern:"[0-9]*",maxLength:4,flexibleWidth:!0,value:ed,register:function(e){for(var l=1;l<arguments.length;l++){var a=null!=arguments[l]?arguments[l]:{};l%2?L(Object(a),!0).forEach(function(l){(0,g.Z)(e,l,a[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):L(Object(a)).forEach(function(l){Object.defineProperty(e,l,Object.getOwnPropertyDescriptor(a,l))})}return e}({},et("verificationCode")),hasError:!!F,inputClassName:(0,A.cn)("text-start placeholder:text-body-sm placeholder:font-normal placeholder:text-neutral-500",F&&"!text-error-600")}),F&&(0,I.jsx)("p",{className:"mt-1.5 text-caption text-error-600",children:F})]}),0===D&&(0,I.jsx)("div",{className:"mt-2 flex justify-end",children:(0,I.jsx)(f.z,{variant:"tertiary",disabled:k,className:"h-auto w-fit border-none !bg-transparent px-0 text-neutral-600 underline underline-offset-2 disabled:opacity-50 [&_*]:!text-label-xs [&_*]:!font-medium",onClick:eu,children:"Kodu Tekrar G\xf6nder"})})]}),(0,I.jsxs)("div",{className:(0,A.cn)("mt-4 flex flex-col",m?"gap-2":"gap-3"),children:[(0,I.jsx)(f.z,{size:m?"medium":"large",className:(0,A.cn)("w-full",m&&"!h-10"),disabled:(null==ed?void 0:ed.length)!==4||0===D||k,isLoading:k,onClick:ex,children:"Hesabımı Sil"}),(0,I.jsx)(f.z,{size:m?"medium":"large",variant:"tertiary",className:(0,A.cn)(ee,m&&"!h-10"),onClick:eh,children:"Vazge\xe7"})]})]}),eb=()=>(0,I.jsxs)("div",{className:"flex flex-col",children:[(0,I.jsx)("p",{className:(0,A.cn)(m?"text-label-sm text-neutral-600":"text-title-md text-neutral-600"),children:"Hesabınız başarıyla silinmiştir. G\xfcvenliğiniz i\xe7in oturumunuz kapatılmıştır."}),(0,I.jsx)("div",{className:"mt-4",children:(0,I.jsx)(f.z,{size:m?"medium":"large",variant:"primary",className:(0,A.cn)("w-full",m&&"!h-10"),type:"button",onClick:ep,children:"Anasayfaya D\xf6n"})})]}),eN=()=>(0,I.jsxs)(I.Fragment,{children:[N===i.Reason&&ej(),N===i.Otp&&ey(),N===i.Success&&eb()]}),ew=(0,A.cn)("text-title-lg text-neutral-900 text-left"),ek=e=>{e||eh()},eO=(e,l)=>N===i.Success?(0,I.jsxs)("button",{type:"button",className:e,onClick:ep,children:[(0,I.jsx)(M.W,{className:l}),(0,I.jsx)("span",{className:"sr-only",children:"Kapat"})]}):(0,I.jsx)(I.Fragment,{children:m?(0,I.jsx)(H.dC,{asChild:!0,children:(0,I.jsxs)("button",{type:"button",className:e,children:[(0,I.jsx)(M.W,{className:l}),(0,I.jsx)("span",{className:"sr-only",children:"Kapat"})]})}):(0,I.jsxs)(V.GG,{className:e,children:[(0,I.jsx)(M.W,{className:l}),(0,I.jsx)("span",{className:"sr-only",children:"Kapat"})]})});return m?(0,I.jsx)(H.Kx,{open:l,onOpenChange:ek,children:(0,I.jsxs)(H.bJ,{withOverlay:!0,className:(0,A.cn)("px-4 pt-4 pb-6 !min-h-0",N===i.Success?"h-fit max-h-none overflow-hidden after:hidden":"max-h-[70svh] overflow-y-auto"),children:[(0,I.jsxs)("div",{className:"flex items-center justify-between gap-4 border-b border-neutral-100 pb-2",children:[(0,I.jsx)(H.HP,{className:"text-title-md text-neutral-900 text-left",children:ev}),eO("flex shrink-0 items-center justify-center","size-2 fill-neutral-900")]}),(0,I.jsx)("div",{className:"pt-4",children:eN()})]})},N===i.Success?"delete-success":"delete-flow"):(0,I.jsx)(V.Vq,{open:l,onOpenChange:ek,children:(0,I.jsxs)(V.cZ,{showCloseIcon:!1,className:"w-[23.375rem] max-w-[23.375rem] rounded-[0.25rem] px-[28px] py-6",children:[(0,I.jsxs)(V.fK,{className:"flex items-center justify-between gap-4 border-b-[1px] border-neutral-100 pb-2",children:[(0,I.jsx)(V.$N,{className:ew,children:ev}),eO("shrink-0 rounded-sm opacity-100 transition-opacity hover:opacity-70 focus:outline-none","size-3 fill-black")]}),(0,I.jsx)("div",{className:(0,A.cn)(eg?"pt-4":"pt-[10px]"),children:eN()})]})})};var ei=n.memo(et);function en(e,l){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);l&&(t=t.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),a.push.apply(a,t)}return a}function er(e){for(var l=1;l<arguments.length;l++){var a=null!=arguments[l]?arguments[l]:{};
1l%2?en(Object(a),!0).forEach(function(l){(0,g.Z)(e,l,a[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):en(Object(a)).forEach(function(l){Object.defineProperty(e,l,Object.getOwnPropertyDescriptor(a,l))})}return e}let es=e=>{let{data:l,setComponent:a}=e,{register:t,handleSubmit:i,watch:r,setValue:s,formState:{errors:d}}=(0,v.cI)({mode:"onChange",resolver:(0,y.X)(F.k)}),c=(0,j.I0)(),{0:m,1:u}=(0,n.useState)(!1),{updateInformation:x}=(0,p.$)(),{0:f,1:h}=(0,n.useState)(!1),{currentUser:g}=(0,j.v9)(z.Ci),{toastSuccess:b,toastError:S}=(0,O.pm)(),{0:D,1:E}=(0,n.useState)(!1),{0:P,1:Z}=(0,n.useState)(!1);(0,n.useEffect)(()=>{s("firstname",null==g?void 0:g.firstName),s("lastname",null==g?void 0:g.lastName),!o()(null==l?void 0:l.phone)&&(null==l?void 0:l.phone)&&s("phoneNumber",null==l?void 0:l.phone),!o()(null==l?void 0:l.email)&&(null==l?void 0:l.email)&&s("email",null==l?void 0:l.email)},[l]);let R=async()=>{h(!0);let e={firstName:r("firstname"),lastName:r("lastname")},l=await x(e),{data:a}=l;200===l.status?(b("Bilgileriniz g\xfcncellendi"),c(z.tK.actions.updateCurrentUser(a)),h(!1)):(S("Bilgileriniz g\xfcncellenmedi"),h(!1))},T=(e,l)=>{let a=e.target.value.replace(/[^a-zA-ZığüşöçĞÜŞİÖÇ ]/g,"");s(l,a,{shouldValidate:!0})};return(0,I.jsxs)("div",{className:"lg:mb-0 mb-[3.6563rem]",children:[(0,I.jsxs)("form",{onSubmit:i(R),children:[(0,I.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-x-6 gap-y-5",children:[(0,I.jsx)(k.Z,{isIcon:!1,isBorder:!1,label:"Ad",type:"text",value:r("firstname"),error:d.firstname,register:er(er({},t("firstname")),{},{onChange:e=>T(e,"firstname")})}),(0,I.jsx)(k.Z,{isIcon:!1,isBorder:!1,label:"Soyad",type:"text",value:r("lastname"),error:d.lastname,register:er(er({},t("lastname")),{},{onChange:e=>T(e,"lastname")})}),(0,I.jsx)(k.Z,{disabled:!0,isIcon:!1,isBorder:!1,label:"Cep Telefon",type:"number",value:r("phoneNumber"),error:d.phoneNumber,register:er({},t("phoneNumber"))}),(0,I.jsx)("div",{className:"flex lg:hidden ",children:(0,I.jsxs)("span",{className:"text-body-sm",children:["Cep telefonunuzu g\xfcncellemek i\xe7in onay kodu s\xfcreci başlatılacaktır. G\xfcncelleme i\xe7in",(0,I.jsx)("strong",{onClick:()=>Z(!0),className:"underline ml-1",children:"tıklayınız"}),"."]})}),(0,I.jsx)(k.Z,{disabled:!0,isIcon:!1,isBorder:!1,label:"E-posta",type:"email",value:r("email"),error:d.email,register:er({},t("email"))}),(0,I.jsx)("div",{className:"lg:flex hidden ",children:(0,I.jsxs)("span",{className:"text-body-sm",children:["Cep telefonunuzu g\xfcncellemek i\xe7in onay kodu s\xfcreci başlatılacaktır. G\xfcncelleme i\xe7in",(0,I.jsx)("strong",{onClick:()=>Z(!0),className:" underline ml-1 cursor-pointer",children:"tıklayınız"}),"."]})})]}),(0,I.jsx)("div",{className:"mt-5",children:(0,I.jsx)(w.Z,{loading:f,type:"submit",variant:"secondary",disabled:!N()(d),className:"lg:w-[16.25rem] w-full lg:!min-h-[2.75rem] py-0 h-[2.875rem] rounded font-medium",children:(0,I.jsx)("span",{className:"text-white text-md",children:"Kaydet"})})}),(0,I.jsx)("div",{className:"mt-7 flex lg:justify-start justify-center items-center",children:(0,I.jsxs)(w.Z,{className:"gap-2 underline font-medium !text-md",onClick:()=>u(!0),children:["Hesabımı Sil",(0,I.jsx)(C.pJl,{})]})})]}),(0,I.jsx)($.Z,{isOpen:P,setOpen:Z,setComponent:a,data:l}),(0,I.jsx)(B,{isOpen:D,setOpen:E,setComponent:a,data:l}),(0,I.jsx)(ei,{isOpen:m,setOpen:u,setComponent:a,email:(null==l?void 0:l.email)??(null==g?void 0:g.email)})]})};var eo=n.memo(es);let ed=e=>{let{data:l,setComponent:a}=e;return(0,I.jsx)("div",{className:"bg-white py-4",children:(0,I.jsx)(eo,{data:l,setComponent:a})})};var ec=n.memo(ed),em=a(46471),eu=a(98336);function ex(e,l){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);l&&(t=t.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),a.push.apply(a,t)}return a}let ef=e=>{let{isOpen:l,setOpen:a,setComponent:t,data:i,isMail:r}=e,{isDeviceMobile:s}=(0,O.dD)(),{register:d,watch:c,reset:m,setValue:x,formState:{errors:f}}=(0,v.cI)({mode:"onChange",resolver:(0,y.X)(F.B)}),{0:p,1:h}
1=(0,n.useState)(180),{0:j,1:b}=(0,n.useState)(p),{0:N,1:C}=(0,n.useState)(""),{sendSmsRequest:z,mailResquest:D,changePhone:Z,approveMail:R,mailResend:T,phoneSmsResend:K}=(0,P.aC)(),B=async()=>{let e={smsCode:c("verificationCode"),token:N};if(r){let l={code:c("verificationCode"),token:N};try{let i=await R(l);a(!1),(200===i.status||204===i.status)&&t("mail_success")}catch(n){return n}}else try{let s=await Z(e);a(!1),(200===s.status||204===s.status)&&t("phone_success")}catch(o){return o}};(0,n.useEffect)(()=>{if(l){if(r){let e=async()=>{try{let e=await D({mail:String(null==i?void 0:i.email)}),l=e.data,{token:a,remainingSecond:t}=l;h(t),C(a)}catch(n){return n}};e().catch(e=>e)}else{let a=async()=>{try{if(null!=i&&i.phone){let e=await z((null==i?void 0:i.phone)+""),l=e.data,{token:a,remainingSecond:t}=l;h(t),C(a)}}catch(n){return n}};a().catch(e=>e)}}},[l]);let $=async()=>{if(N)try{await K(N)}catch(e){return e}},M=async()=>{if(N)try{await T(N)}catch(e){return e}},_=()=>{a(!1),x("verificationCode",""),m()};return(0,I.jsx)(E.Modal,{onClose:_,closeIcon:!0,open:l,title:r?"E-posta Doğrulama":"Cep Telefonu Doğrulama",titleAlign:"left",isMobileFull:!!s(),children:(0,I.jsxs)("div",{className:"lg:px-5 grid grid-cols-1 w-full",children:[(0,I.jsx)("div",{className:"lg:w-[24rem] lg:text-left px-3 w-[20.938rem]",children:r?(0,I.jsxs)("span",{className:"leading-[1.181rem]",children:["Hesabınızın g\xfcvenliğini sağlamaya yardımcı olmak i\xe7in l\xfctfen e-posta adresinizi doğrulayın. ",(0,I.jsx)("b",{children:null==i?void 0:i.email})," adresinize g\xf6nderilen doğrulama kodu ile e-posta adresinizi doğrulayın."]}):(0,I.jsxs)("span",{className:"leading-[1.181rem]",children:[(0,I.jsx)("b",{children:u()(null==i?void 0:i.phone)>=10&&!o()(null==i?void 0:i.phone)?(0,eu.C9)(null==i?void 0:i.phone):"+90 "+(null==i?void 0:i.phone)})," numaralı cep telefonuna SMS ile g\xf6nderdiğimiz doğrulama kodunu giriniz. ",(0,I.jsx)("br",{})," Ref: ",(0,I.jsx)("b",{children:"B273"})]})}),(0,I.jsx)("div",{className:"mt-10 mb-10 flex justify-center items-center",children:(0,I.jsx)(S.$,{isPlaying:!0,duration:p,colors:["#55BD4F","#FB2929","#FB2929"],colorsTime:[20,19,0],size:80,strokeWidth:5,trailStrokeWidth:5,strokeLinecap:"butt",onUpdate(e){b(e),0===e&&h(0)},children(e){let{remainingTime:l}=e,a=10>Math.floor(l%3600/60)?`0${Math.floor(l%3600/60)}`:Math.floor(l%3600/60),t=l%60<10?`0${l%60}`:l%60;return`${a}:${t}`}})}),(0,I.jsxs)("div",{className:"grid grid-cols-1 gap-y-5 text-center",children:[(0,I.jsx)(k.Z,{isIcon:!1,isBorder:!1,label:"Doğrulama Kodu",type:"text",value:c("verificationCode"),error:f.verificationCode,register:function(e){for(var l=1;l<arguments.length;l++){var a=null!=arguments[l]?arguments[l]:{};l%2?ex(Object(a),!0).forEach(function(l){(0,g.Z)(e,l,a[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):ex(Object(a)).forEach(function(l){Object.defineProperty(e,l,Object.getOwnPropertyDescriptor(a,l))})}return e}({},d("verificationCode"))}),(0,I.jsx)("div",{className:"flex justify-center",children:(0,I.jsx)(w.Z,{variant:"none",className:"underline font-medium mt-3",onClick:r?M:$,children:"Kodu Tekrar G\xf6nder"})}),(0,I.jsx)(w.Z,{variant:"primary",className:"w-full",disabled:!!(f.verificationCode||4>u()(c("verificationCode")))||0===j,onClick:B,children:"Doğrula"})]})]})})};var ep=n.memo(ef);let eh=e=>{let{setComponent:l,data:a}=e,{ExclamationMarkIcon2:t}=(0,em.Z)(),{0:i,1:r}
1=(0,n.useState)(!1),{toast:s,toastSuccess:o}=(0,O.pm)(),{currentUser:d}=(0,j.v9)(z.Ci),{0:c,1:m}=(0,n.useState)({}),u=async()=>{o("E-postanıza kod g\xf6nderildi.",s.POSITION.TOP_RIGHT),r(!0)},x=async()=>{r(!0)};return(0,n.useEffect)(()=>{m({phoneNumber:null==d?void 0:d.phone,email:null==d?void 0:d.email})},[a]),(0,I.jsxs)(I.Fragment,{children:[null!=a&&a.isPhoneValidated?(0,I.jsx)(I.Fragment,{}):(0,I.jsxs)("div",{className:"w-full p-4",children:[(0,I.jsxs)("div",{className:"flex justify-start gap-3 lg:border-none border-dashed border-[1px] border-[#5F5353] rounded lg:bg-white bg-[#F5F5F5] p-6",children:[(0,I.jsx)("div",{className:"lg:flex hidden",children:(0,I.jsx)(t,{width:24,height:24})}),(0,I.jsxs)("div",{className:" flex lg:flex-raw flex-col gap-2",children:[(0,I.jsxs)("div",{className:"flex lg:hidden gap-2",children:[(0,I.jsx)(t,{width:24,height:24}),(0,I.jsx)("span",{className:"font-medium text-[1rem] leading-[1.375rem]",children:"Telefon Numaranızı Doğrulayın"})]}),(0,I.jsxs)("div",{className:"lg:flex items-center justify-between lg:gap-20",children:[(0,I.jsxs)("div",{className:"lg:mb-0 mb-3",children:[(0,I.jsx)("span",{className:"font-medium text-[1rem] leading-[1.375rem]  lg:flex hidden",children:"Telefon Numaranızı Doğrulayın"}),(0,I.jsxs)("span",{className:" lg:w-[30.375rem] w-[18.938rem] font-normal text-[0.875rem] leading-[1.181rem] ",children:["Hesabınızın g\xfcvenliğini sağlamaya yardımcı olmak i\xe7in l\xfctfen telefon numaranızı doğrulayın.",(0,I.jsx)("strong",{className:" underline cursor-pointer ",children:"+90 "+(null==c?void 0:c.phoneNumber)})," nolu numaraya bir doğrulama kodu g\xf6nderin veya telefon numaranızı g\xfcncelleyin."]})]}),(0,I.jsx)(w.Z,{className:"min-w-[12.5rem] !min-h-[2.75rem] py-0  w-full lg:w-auto",variant:"outline-dark",onClick:x,children:"Cep Telefonunu Doğrula"})]})]})]}),(0,I.jsx)(ep,{info:"",isOpen:i,setOpen:r,setComponent:l,data:a,isMail:!1})]}),null!=a&&a.isMailValidated?(0,I.jsx)(I.Fragment,{}):(0,I.jsxs)("div",{className:"w-full p-4",children:[(0,I.jsxs)("div",{className:"flex justify-start gap-3 lg:border-none border-dashed border-[1px] border-[#5F5353] rounded lg:bg-white bg-[#F5F5F5] p-6",children:[(0,I.jsx)("div",{className:"lg:flex hidden",children:(0,I.jsx)(t,{width:24,height:24})}),(0,I.jsxs)("div",{className:" flex lg:flex-raw flex-col gap-2",children:[(0,I.jsxs)("div",{className:"flex lg:hidden gap-2",children:[(0,I.jsx)(t,{width:24,height:24}),(0,I.jsx)("span",{className:"font-medium text-[1rem] leading-[1.375rem]",children:"E-posta Adresinizi Doğrulayın"})]}),(0,I.jsxs)("div",{className:"lg:flex items-center justify-between lg:gap-20",children:[(0,I.jsxs)("div",{className:"lg:mb-0 mb-3",children:[(0,I.jsx)("span",{className:"font-medium text-[1rem] leading-[1.375rem]  lg:flex hidden",children:"E-posta Adresinizi Doğrulayın"}),(0,I.jsxs)("span",{className:" lg:w-[30.375rem] w-[18.938rem] font-normal text-[0.875rem] leading-[1.181rem] ",children:["Hesabınızın g\xfcvenliğini sağlamaya yardımcı olmak i\xe7in l\xfctfen e-posta adresinizi doğrulayın.",(0,I.jsx)("strong",{className:" underline cursor-pointer ",children:null==c?void 0:c.email})," adresine doğrulama kodu i\xe7eren bir e-posta g\xf6nderin veya e-posta adresinizi g\xfcncelleyin."]})]}),(0,I.jsx)(w.Z,{className:"min-w-[12.5rem] w-full lg:w-auto !min-h-[2.75rem] py-0 ",variant:"outline-dark",onClick:u,children:"E-Posta Doğrulama"})]})]})]}),(0,I.jsx)(ep,{info:"",isOpen:i,setOpen:r,setComponent:l,data:a,isMail:!0})]})]})};var eg=n.memo(eh);let ev=e=>{let{setComponent:l,isPhoneValidated:a,setIsPhoneValidated:t,setHasReadersClubSegment:i}=e,s=(0,r.useRouter)(),{getMyMembershipInformation:d}=(0,p.$)(),{0:m,1:g}=(0,n.useState)(void 0);return(0,n.useEffect)(()=>{let e=async()=>{let e=await d();g(e),c()(null==e?void 0:e.isPhoneValidated)||t(null==e?void 0:e.isPhoneValidated),i&&i(null==e?void 0:e.hasReadersClubSegment)};e().catch(e=>e)},[a]),u()(m)>0?(0,I.jsxs)("div",{className:" w-full h-full",children:[a?null:(0,I.jsx)("div",{className:"pt-[1.188rem] lg:pt-0",children:(0,I.jsx)(h.Z,{buttonText:"\xdcyelik Bilgilerime D\xf6n",setIsPhoneValidated:t,preflightSmsRequest:!0})}
1),!(!c()(null==m?void 0:m.phone)&&!o()(null==m?void 0:m.phone)||c()(null==m?void 0:m.email)&&o()(null==m?void 0:m.email))||null!=m&&m.isEmailValidated||null!=m&&m.isPhoneValidated?(0,I.jsx)(I.Fragment,{}):(0,I.jsx)(eg,{setComponent:l,data:m}),(0,I.jsx)("div",{className:"mt-6 bg-secondary-50 p-2 rounded flex flex-col lg:flex-row lg:items-center lg:justify-between border-[0.5px] border-secondary-100",children:(null==m?void 0:m.studentVerificationState)==="verified"?(0,I.jsxs)(x.Z,{href:"/idefix-ogrenci",className:"flex flex-col",children:[(0,I.jsx)("p",{className:"text-title-sm text-secondary-500 lg:text-title-md",children:"Eğitim Durumunuzu Doğruladınız"}),(0,I.jsxs)("p",{className:"mt-1 text-neutral-600 text-caption lg:text-body-sm",children:["idefix ayrıcalıklarından ",(0,I.jsx)("span",{className:"underline",children:"faydalanabilirsiniz."})]})]}):(null==m?void 0:m.studentVerificationState)==="expired"?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)("div",{children:[(0,I.jsx)("p",{className:"text-title-sm text-secondary-500 lg:text-title-md",children:"Eğitim Durumu Doğrulamanız Sona Ermiştir"}),(0,I.jsxs)("p",{className:"mt-1 text-neutral-600 text-caption lg:text-body-sm",children:["Eğitim durumu doğrulamanız sona ermiştir. Yeniden doğrulama yaparak idefix ayrıcalıklarından"," ",(0,I.jsx)(x.Z,{href:"/idefix-ogrenci",className:"underline",children:"faydalanabilirsiniz."})]})]}),(0,I.jsx)(f.z,{variant:"primary",className:"mt-3 lg:mt-0 w-full lg:w-auto text-title-md px-4 rounded lg:shrink-0 !h-12",onClick(){s.push("/idefix-ogrenci")},children:"Yeniden Doğrula"})]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)("div",{children:[(0,I.jsx)("p",{className:"text-title-sm text-secondary-500 lg:text-title-md",children:"Eğitim Durumunu Doğrula"}),(0,I.jsxs)("p",{className:"mt-1 text-neutral-600 text-caption lg:text-body-sm",children:["\xd6ğrenciliğinizi doğrulayarak idefix ayrıcalıklarından"," ",(0,I.jsx)(x.Z,{href:"/idefix-ogrenci",className:"underline",children:"faydalanabilirsiniz."})]})]}),(0,I.jsx)(f.z,{variant:"primary",className:"mt-3 lg:mt-0 w-full lg:w-auto text-title-md px-4 rounded lg:shrink-0 !h-12",onClick(){s.push("/idefix-ogrenci")},children:"Hemen Doğrula"})]})}),(0,I.jsx)(ec,{data:m,setComponent:l})]}):(0,I.jsx)(I.Fragment,{})};var ej=n.memo(ev)}}]);

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.