1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2814],{72814:function(e,o,t){"use strict";t.r(o),t.d(o,{default:function(){return P}});var r=t(85893),s=t(67294),a=t(64666),i=t(50594),n=t(93208),l=t(47874),c=t(9241),d=t(11163),_=t(16732),p=t(84781),u=t(69968),f=t(1558),m=t(3899),v=t(22955),h=t(41664),w=t.n(h),g=t(35119),x=t(87536),y=t(41594),b=t.n(y);function P(e){var o,t,h,y,P,S,C;let{popupData:j}=e,N=(0,d.useRouter)(),[T,k]=(0,s.useState)({password:!1}),[A,F]=(0,s.useState)(""),R=(0,f.rV)("isUtuser"),{mutate:V,data:Z}=(0,c.Z)(),{mutate:E,data:L,isLoading:M}=(0,u.Z)(),{state:{SystemConfig:D,localLang:I},dispatch:q}=(0,_.oR)(),{register:G,handleSubmit:H,clearErrors:Q,formState:{errors:U},trigger:W,getValues:B}=(0,x.cI)({mode:"onChange",shouldFocusError:!1}),J=e=>{e.preventDefault(),j.closeTarget()};(0,s.useEffect)(()=>{if(Z){if(Z.data.status){var e;q({type:_.Nw.qY,payload:Z.data.response}),"pin"==j.subtype?N.push("/profiles/profile-lock/".concat(j.userProfile.profileId)):"DeleteAccount"==j.subtype?Y():(null==j?void 0:j.isParentalControl)?N.push("/profiles/parental-controls"):N.push("/profiles/view-restrictions/".concat(null===(e=j.userProfile)||void 0===e?void 0:e.profileId))}else F(Z.data.error.message),K()}},[Z]),(0,s.useEffect)(()=>{var e,o,t,r,s;(null==L?void 0:null===(e=L.data)||void 0===e?void 0:e.status)===!0?R?window.open("".concat(D.configs.siteURL,"delete-account"),"_self"):(q({type:_.Nw.o4,payload:{message:null==L?void 0:null===(t=L.data)||void 0===t?void 0:null===(o=t.response)||void 0===o?void 0:o.message}}),setTimeout(()=>{window.open(D.configs.siteURL,"_self")},2e3)):F(null==L?void 0:null===(s=L.data)||void 0===s?void 0:null===(r=s.error)||void 0===r?void 0:r.message)},[L]);let K=()=>{let e=setTimeout(()=>{F(""),clearTimeout(e)},5e3)},Y=()=>{let e={password:B("password")};E({url:"".concat("https://api-apac.revlet.net","/service/api/auth/delete/account"),apiData:e})};M&&m.Z;let z={pin:{heading:v.dP[I].Profile_Lock,message:"".concat(v.dP[I].Enter_your_account_password_to_edit_profile_lock," ").concat(null===(o=j.userProfile)||void 0===o?void 0:o.name,"âs ").concat(v.dP[I].Profile)},view:{heading:v.dP[I].Viewing_Restrictions,message:"".concat(v.dP[I].Enter_your_password_to_edit_profile_Maturity_Rating_and_Title_Restrictions_for," ").concat(null===(t=j.userProfile)||void 0===t?void 0:t.name,"âs ").concat(v.dP[I].Profile)},DeleteAccount:{heading:v.dP[I].Delete_Account,message:"".concat(null===(h=j.userProfile)||void 0===h?void 0:h.name," ").concat(v.dP[I].Enter_your_password_to_delete_your_Account)}},{heading:O,message:X}=z[j.subtype]||{};return(0,r.jsx)(a.Z,{open:!!j.isActive&&j.isActive,children:(0,r.jsx)("div",{className:b().sharecontent_modal,children:(0,r.jsx)("div",{className:b().main_modal,children:(0,r.jsx)("div",{className:b().modal_wrapper,children:(0,r.jsxs)("div",{className:b().modal_content,children:[(0,r.jsx)(i.Z,{className:"".concat(b().cross_icon),onClick:J}),(0,r.jsxs)("div",{className:"".concat(b().modal_content_inner),children:[(0,r.jsx)("div",{className:"".concat(b().profile_img),children:(0,r.jsx)("img",{src:(null===(y=j.userProfile)||void 0===y?void 0:y.imageUrl)?(0,n.ZY)(null===(P=j.userProfile)||void 0===P?void 0:P.imageUrl):"https://d2ivesio5kogrp.cloudfront.net/static/watcho/images/profile-pic1.svg",onError:e=>{let{currentTarget:o}=e;o.onerror=null,o.src="https://d2ivesio5kogrp.cloudfront.net/static/watcho/images/profile-pic1.svg"},alt:null===(S=j.userProfile)||void 0===S?void 0:S.name})}),O&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h5",{className:"".concat(b().otp_Txt," ").concat(b().View_Txt),children:O}),(0,r.jsx)("p",{className:"".concat(b().otp_subTxt," ").concat(b().View_subTxt),children:X})]}),j.hasSetPassword?(0,r.jsxs)("form",{className:b().otp_block,onSubmit:H(e=>{let o={context:"userprofiles",password:e.password};V({url:"".concat("https://api-apac.revlet.net","/service/api/auth/user/authentication"),apiData:o})}),children:[(0,r.jsx)(g.Z,{name:"password",label:v.dP[I].Password,register:G,errors:U,trigger:W,clearErrors:Q,validateFunction:e=>{let o=(0,p.ph)(e,l.e.authMinLength,l.e.authMaxLength,I);return o.valid||o.error},toggleVisibility:e=>{k(o=>({...o,[e]:!o[e]}))},visibility:T.password}),(0,r.jsx)("span",{className:"".concat(b().otp_sent),children:A}),(0,r.jsxs)("div",{className:b().footer_actions,children:[(0,r.jsx)("button",{type:"button",onClick:J,children:v.dP[I].Cancel}),(0,r.jsx)("button",{type:"submit",className:"primary",children:v.dP[I].Continue})]})]}):(0,r.jsxs)("p",{className:"".concat(b().otp_subTxt," ").concat(b().View_subTxt," ").concat(b().createPass),children:[null===(C=v.dP[I])||void 0===C?void 0:C.Please_Create_Your_Passoword,(0,r.jsxs)(w(),{className:"primary",href:"/set-password",prefetch:!1,children:[" ",v.cw[I].Create," "]})]})]})]})})})})})}},35119:function(e,o,t){"use strict";var r=t(85893),s=t(98271),a=t(84781),i=t(47874),n=t(41664),l=t.n(n),c=t(97953),d=t.n(c),_=t(22955),p=t(16732);o.Z=e=>{let{name:o,label:t,visibility:n,toggleVisibility:c,register:u,errors:f,trigger:m,clearErrors:v,validateFunction:h=()=>{},displayForgotPassword:w,forgotPasswordText:g,...x}=e,{state:{localLang:y}}=(0,p.oR)();return(0,r.jsxs)("div",{className:" ".concat(d().textField," "),children:[(0,r.jsx)(s.Z,{fullWidth:!0,margin:"normal",name:o,label:t,type:n?"text":"password",sx:a.HC,autoComplete:"off",inputProps:{maxLength:i.e.authMaxLength},...u(o,{required:!!x.isMandatory&&"".concat(t.replace(/\*/g,"")," Required"),validate:e=>""==e&&void 0!=x.isMandatory&&!x.isMandatory||h(e)}),onBlur:()=>m(o),onFocus:()=>v(o),onKeyDown:e=>{32===e.keyCode&&e.preventDefault()}}),(0,r.jsx)("span",{className:" ".concat(d().show),onClick:()=>c(o),children:n?"".concat(_.dP[y].Hide):"".concat(_.dP[y].Show)}),(0,r.jsxs)("div",{className:d().errorAndForgotContainer,children:[(0,r.jsx)("div",{className:" ".concat(d().val
1id_error," "),children:f[o]&&f[o].message}),w&&(0,r.jsx)("div",{className:" ".concat(d().forgetpassword),children:(0,r.jsx)(l(),{href:"forgot-password",prefetch:!1,children:g})})]})]})}},9241:function(e,o,t){"use strict";t.d(o,{Z:function(){return a}});var r=t(88767),s=t(57686);function a(){return(0,r.useMutation)(e=>{let{url:o,apiData:t}=e;return(0,s.RV)(o,t)})}},41594:function(e){e.exports={primaryColor:"#e11c1b",whiteColor:"#fff",bodyColor:"#141414",sharecontent_modal:"profile-password-popup_sharecontent_modal__A5Fif",cross_icon:"profile-password-popup_cross_icon__R0x_Q",main_modal:"profile-password-popup_main_modal__G_8J_",modal_wrapper:"profile-password-popup_modal_wrapper__J_7VI",modal_content:"profile-password-popup_modal_content__AFqtt",modal_content_inner:"profile-password-popup_modal_content_inner__zQAtl",profile_img:"profile-password-popup_profile_img__cll6v",otp_Txt:"profile-password-popup_otp_Txt__UP0nL",View_Txt:"profile-password-popup_View_Txt__Hnyuw",otp_subTxt:"profile-password-popup_otp_subTxt__HQ_TP",View_subTxt:"profile-password-popup_View_subTxt__0ewBv",createPass:"profile-password-popup_createPass__dqrCi",show:"profile-password-popup_show__8A2Gy",footer_actions:"profile-password-popup_footer_actions__ksOSQ",otp_sent:"profile-password-popup_otp_sent__Wr9oT"}},97953:function(e){e.exports={primaryColor:"#e11c1b",whiteColor:"#fff",bodyColor:"#141414",textField:"formStyles_textField___Toyy",datePicker:"formStyles_datePicker__ESonp",inline:"formStyles_inline__7kQhe",mobileNumber:"formStyles_mobileNumber__tg_vc",has_country_code:"formStyles_has_country_code__Sn0FC",valid_error:"formStyles_valid_error__SIS0R",show:"formStyles_show__fMH7C",genderCont:"formStyles_genderCont__qWda7",genderLabel:"formStyles_genderLabel__1RB8n",loopGender:"formStyles_loopGender__nvZKQ",genderradio:"formStyles_genderradio__lZ8fK",whitebtn:"formStyles_whitebtn__1WIGV",indicator:"formStyles_indicator__viHk_",primary:"formStyles_primary__arpxg",dotbutton:"formStyles_dotbutton__I2yp8",label_text:"formStyles_label_text__DvJdg",errorAndForgotContainer:"formStyles_errorAndForgotContainer__GkSal",forgetpassword:"formStyles_forgetpassword__ZMar8"}}}]);
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.