1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(null!=n)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:dpg-media-services-csa":!0});var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a6d4ff43-e887-4702-a9b7-97f15e3b4537",e._sentryDebugIdIdentifier="sentry-dbid-a6d4ff43-e887-4702-a9b7-97f15e3b4537")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9309],{1905:(e,t,n)=>{"use strict";n.d(t,{N:()=>i});var r=n(6029);n(55729);var a=n(57490);function i({children:e,className:t,...n}){return(0,r.jsx)("form",{className:(0,a.cx)("flex flex-col space-y-4",t),...n,children:e})}},2869:(e,t,n)=>{"use strict";n.d(t,{r:()=>d});var r=n(6029),a=n(55729),i=n(57490),s=n(89456),o=n(82203),l=n.n(o),c=n(59036);function d({className:e,routes:t}){let n=(0,c.U)(),o=function(e=[]){return(0,a.useMemo)(()=>e.map((e,t,n)=>t===n.length-1?{label:e.label??"-"}:{label:e.label??"-",...e.route?{path:e.route}:{}}),[e])}(t??[]);return!o.length||n.hasWebviewLimitation?null:(0,r.jsx)(s.rX,{className:(0,i.cx)("container mx-auto desktop:pt-6 tablet:pt-4 pt-3 flex items-baseline space-x-[0.25rem]",e),items:o,as:(0,r.jsx)(l(),{href:""})})}},5299:(e,t,n)=>{"use strict";n.d(t,{DT:()=>i,eB:()=>o,uO:()=>s});var r=n(21941),a=n(59496);let i=(0,r.Ik)().shape({country:(0,r.Yj)().required("genericFormMissingInputErrorMessage"),housenumber:(0,r.Yj)().required("genericFormMissingInputErrorMessage"),housenumberAddition:(0,r.Yj)().max(a.Uh)}),s={BE:{street:(0,r.Yj)().required("genericFormMissingInputErrorMessage"),zip:(0,r.Yj)().matches(/^\d{4}$/,"addressFormZipcodeFormatErrorMessage").required("genericFormMissingInputErrorMessage")},NL:{zip:(0,r.Yj)().matches(/^\d{4}[ ]?[a-zA-Z]{2}$/,"addressFormZipcodeFormatErrorMessage").required("genericFormMissingInputErrorMessage"),housenumber:(0,r.Yj)().test("no-whitespaces","whitespaceEnteredFormatErrorMessage",e=>!e||!/\s/.test(e)).test("no-leading-zeros","leadingZerosNotAllowedErrorMessage",e=>!e||!/^0/.test(e)).matches(/^[1-9][0-9]*$/,"onlyNumbersAllowedErrorMessage").required("genericFormMissingInputErrorMessage").max(5,"housenumberTooLongErrorMessage")}},o=(0,r.RZ)(e=>{let t=e.country;return i.shape(s[t]||{})})},6773:(e,t,n)=>{"use strict";function r(e){switch(e){case"MALE":return"MALE";case"FEMALE":return"FEMALE";default:return null}}function a(e){switch(e){case"FEMALE":return"FEMALE";case"MALE":return"MALE";default:return"UNSPECIFIED"}}function i(e,t,n="-"){if(!e||!t||"NONE"===e)return n;let r=t[e];return"string"==typeof r?r:n}n.d(t,{LX:()=>i,RN:()=>r,vc:()=>a})},13860:(e,t,n)=>{"use strict";n.d(t,{l:()=>s});var r=n(6029);n(55729);var a=n(89456),i=n(43343);let s=({loading:e,children:t,...n})=>{let{getTranslation:s}=(0,i.c3)();return(0,r.jsx)(a.$n,{...n,disabled:n.disabled||e,children:e?(0,r.jsx)(a.fV,{"aria-label":s("isLoadingAriaLabel"),className:"brightness-0"}):t})}},17876:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__N_SSP:()=>eq,default:()=>eU});var r=n(6029),a=n(55729),i=n(2869),s=n(55597),o=n(89456),l=n(79737),c=n(15615),d=n(237),u=n(79132),m=n(59036),p=n(47466),h=n(76407),f=n(43343),g=n(90512),b=n(63470),x=n(31576),v=n(45296),_=n(28952),j=n(13860),C=n(62074),y=n(21941),E=n(18654),N=n(51418),w=n(50197),M=n(50092);let I=(0,M.UG)(` 2 mutation SubmitUpdateAddress($input: UmsAddressInput!) { 3 updateAccountProfile(input: { address: $input }) 4 } 5`);var L=n(5299),A=n(57490);let F=(0,y.RZ)(e=>{let t=e.country;return L.DT.shape(L.uO[t]||{})}),R=()=>{let{getDictionaryStringValue:e,getTranslation:t}=(0,f.c3)(),{getErrorTranslation:n}=(0,f.YY)(),i=(0,p.yx)(),{validatedAddress:s,errors:l,handleBlur:c,handleChange:d,handleSubmit:u,isSubmitting:m,setFieldValue:h,touched:g,values:b,submitUpdateAddressError:v,submitUpdateAddressData:y}=function(){let[{error:e,data:t},n]=(0,w.n_)(I),{getDictionaryStringValue:r}
5=(0,f.c3)(),i=(0,o.KN)(),[s,l]=(0,x.F7)(),{pushAnalyticsEvent:c}=(0,E.iK)(),d=s.profile.contact_information.address?.countryCode??"NL",u=(0,C.Wx)({validationSchema:F,initialValues:{country:d,zip:"",housenumber:"",housenumberAddition:"",street:""},validateOnBlur:!0,onSubmit:async e=>{if(!h.foundAddress)return;let t=await n({input:{houseNumber:e.housenumber,houseNumberSuffix:e?.housenumberAddition,zipCode:e.zip,..."BE"===e.country?{countryCode:e.country,streetName:e.street}:{countryCode:e.country,streetName:""}}});!t.error&&t.data?.updateAccountProfile&&(l({...s,profile:{...s.profile,contact_information:{...s.profile.contact_information,address:{...s.profile.contact_information.address,countryCode:"NL"===e.country?"NL":"BE",houseNumberSuffix:h.foundAddress.housenumber_addition,zipCode:h.foundAddress.zip,houseNumber:h.foundAddress.housenumber,city:h.foundAddress.city,street:h.foundAddress.street}}}}),c({event:"change_address"}),i({variant:"success",children:r("accountFormDataSavedAddressMessage")}))}}),{setFieldValue:m}=u;(0,a.useEffect)(()=>{"BE"===u.values.country&&m("street","")},[m,u.values.country]);let p=(0,a.useMemo)(()=>!(0,A.ZF)(u.errors),[u.errors]),h=(0,N.Z)(p?null:u.values);return{...u,errors:u.errors,submitUpdateAddressError:e,submitUpdateAddressData:t,validatedAddress:{loading:h.isValidationLoading,hasError:h.hasValidationError,address:h.foundAddress}}}();return(0,r.jsxs)("form",{className:"flex flex-col space-y-2 mt-4","data-testid":"edit-address-form",onSubmit:u,children:[v&&(0,r.jsx)(o.Eg,{variant:"error",className:"mb-2",children:n("GENERIC-ERROR")}),y?.updateAccountProfile===!1&&(0,r.jsx)(o.Eg,{variant:"error",className:"mb-2",children:n("OPS-001")}),null===s.address&&(0,r.jsx)(o.Eg,{variant:"error",className:"mb-2",children:t("addressFormAddressNotFoundLabel")}),s.hasError&&(0,r.jsx)(o.Eg,{variant:"error",className:"mb-2",children:n("GENERIC-ERROR")}),(0,r.jsx)(o.zB,{name:"country",touched:g.country,error:l.country&&n(l.country),requiredDescription:t("genericFormRequiredDescription"),children:(0,r.jsx)(o.qF,{items:i,keyField:"iso2Code",labelField:"name",placeholder:e("addressFormChooseCountryPlaceholder"),onChange:e=>{h("country",e.iso2Code)},selectedItem:i.find(({iso2Code:e})=>e===b.country),onBlur:c})}),(0,r.jsx)(_.X,{countryCode:b.country,formProps:{touched:g,errors:l,values:b,handleChange:d,handleBlur:c},foundAddress:s.address,infoMessage:e("accountFormNotDeliveryAddressWarning")}),(0,r.jsxs)("div",{className:"flex flex-col gap-2 pt-2",children:[(0,r.jsx)(j.l,{type:"submit",variant:"primary","data-testid":"edit-address-form-submit",loading:s.loading||m,disabled:!["NL","BE"].includes(b.country),children:e("accountFormSaveAddressButtonLabel")}),(0,r.jsx)(o.lG.Close,{asChild:!0,children:(0,r.jsx)(o.$n,{type:"button",variant:"secondary","data-testid":"edit-form-cancel",children:e("accountFormCancelAddressButtonLabel")})})]})]})};function B(){let[e]=(0,x.F7)(),{getDictionaryStringValue:t}=(0,f.c3)(),[n,i]=(0,v.p)({event:"address_modal_shown",modal_content:"address"}),l=e.profile.contact_information.address;return(0,a.useEffect)(()=>{i(!1)},[l,i]),(0,r.jsx)(o.lG.Root,{open:n,onOpenChange:i,trigger:(0,r.jsxs)("button",{className:"mt-1 flex items-center text-anchor hover:text-anchor-dark","data-testid":"edit-address-button",children:[(0,r.jsx)(o.In,{icon:s.zLW,className:"w-4"}),(0,r.jsx)("span",{className:"ml-1 text-sm underline font-semibold",children:t("accountChangeAddressLabel")})]}),title:t("accountChangeAddressLabel"),closeButtonLabel:t("accountFormDialogCloseButtonLabel"),children:(0,r.jsxs)("div",{className:"p-5 space-y-4 tablet:w-screen tablet:max-w-dialog",children:[l?.city&&l?.street&&l?.houseNumber&&l?.zipCode&&(0,r.jsx)(b.M,{title:t("accountFormCurrentAddressTitle"),address:{city:l.city,street:l.street,housenumber:l.houseNumber,housenumber_addition:l.houseNumberSuffix??"",zip:l.zipCode},testId:"current-address"}),(0,r.jsx)(R,{})]})})}n(63651);let T=(0,y.Ik)().shape({first_name:(0,y.Yj)().matches(new RegExp(A.lX),"genericFormMissingOrInvalidInputErrorMessage").matches(new RegExp(/^[^.]*$/),"genericFormMissingOrInvalidInputErrorMessage").required("genericFormMissingInputErrorMessage"),last_name:(0,y.Yj)().matches(new RegExp(A.lX),"genericFormMissingOrInvalidInputErrorMessage").required("genericFormMissingInputErrorMessage"),gender:(0,y.Yj)().required("genericFormMissingInputErrorMessage"),date_of_birth:(0,y.p6)(),phone_number:(0,y.Yj)().isValidPhoneNumber("genericFormInvalidPhoneNumberErrorMessage")});function k({onSubmit:e,initialValues:t,validationSchema:n=T}){let{brandCountry:i}=(0,u.PB)(),{getErrorTranslation:s}=(0,f.YY)(),{translations:l,getTranslation:c}=(0,f.c3)(),d=(0,p.yx)(),m=(0,a.useRef)(["MALE","FEMALE","UNSPECIFIED"].map(e=>({label:l[e],value:e}))),h=(0,a.useMemo)(()=>d.map(e=>({code:e.telephoneCode,name:e.iso2Code,highlighted:"BE"===e.iso2Code||"NL"===e.iso2Code})),[d]),g=(0,C.Wx)({validationSchema:n,initialValues:t,validateOnBlur:!0,onSubmit:e}),b=g.errors,{touched:x,handleBlur:v,handleChange:_,handleSubmit:y,isSubmitting:E,setFieldValue:N,values:w}=g;return(0,r.jsxs)("form",{className:"flex flex-col space-y-2","data-testid":"edit-name-form",onSubmit:y,children:[(0,r.jsx)(o.zB,{name:"gender",touched:x.gender,error:b.gender&&s(b.gender),requiredDescription:c("genericFormRequiredDescription"),children:(0,r.jsx)(o.qF,{items:m.current,initialSelectedItem:m.current.find(e=>e.value===w.gender),onChange:({value:e})=>N("gender",e),onBlur:v,labelField:"label",keyField:"value",placeholder:c("genericFormGenderTitleLabel"),warnIfEmpty:!0})}),(0,r.jsx)(o.zB,{name:"first_name",touched:x.first_name,error:b.first_name&&s(b.first_name),children:(0,r.jsx)(o.pd,{className:"w-full",label:c("personalInfoFormFirstNameLabel"),"data-testid":"edit-input-firstname",value:w.first_name??"",onChange:_,onBlur:v,optionalSuffix:c("genericFormOptionalLabel"),required:(0,A.Sh)(n,"first_name"),validityMessage:c("genericFormMissingOrInvalidInputErrorMessage"),autoComplete:"given-name",warnIfEmpty:!0})}),(0,r.jsx)(o.zB,{name:"last_name",touched:x.last_name,error:b.last_name&&s(b.last_name),children:(0,r.jsx)(o.pd,{className:"w-full",label:c("personalInfoFormLastNameLabel"),"data-testid":"edit-input-last_name",value:w.last_name??"",onChange:_,onBlur:v,optionalSuffix:c("genericFormOptionalLabel"),required:(0,A.Sh)(n,"last_name"),validityMessage:c("genericFormMissingOrInvalidInputErrorMessage"),autoComplete:"family-name",warnIfEmpty:!0})}),(0,r.jsx)(o.zB,{name:"date_of_birth",touched:x.date_of_birth,error:b.date_of_birth&&s(b.date_of_birth),children:(0,r.jsx)(o.pd,{id:"date_of_birth",type:"date",className:"w-full",label:c("personalInfoFormBirthDateLabel"),"data-testid":"edit-input-date_of_birth",value:w.date_of_birth??"",onChange:_,onBlur:v,optionalSuffix:c("genericFormOptionalLabel"),required:(0,A.Sh)(n,"first_name"),validityMessage:b.date_of_birth&&s(b.date_of_birth),autoComplete:"bday"})}),(0,r.jsx)(o.zB,{name:"phone_number",touched:x.phone_number,error:b.phone_number&&s(b.phone_number),children:(0,r.jsx)(o.D9,{countries:h,defaultCountry:"nl"===i?"NL":"BE",label:c("personalInfoFormPhoneNumberLabel"),countryCodeLabel:c("personalInfoFormPhoneNumberCountryCodeLabel"),"data-testid":"edit-input-phone_number",highlightedLabel:c("personalInfoFormPreferredPhoneCountries"),otherLabel:c("personalInfoFormOtherPhoneCountries"),value:w.phone_number||"",onChange:e=>{N("phone_number",e)},onBlur:v,required:!1,optionalSuffix:c("genericFormOptionalLabel"),autoComplete:"tel-national"})}),(0,r.jsx)("div",{className:"grid grid-flow-row gap-2 pt-2",children:(0,r.jsx)(j.l,{type:"submit",variant:"primary","data-testid":"personal-info-form-submit",disabled:E,loading:E,children:c("personalInfoFormSaveButtonLabel")})})]})}var S=n(1699);let D=(0,M.UG)(` 6 mutation UpdateAccountProfile($input: UmsUpdateAccountProfileInput!) { 7 updateAccountProfile(input: $input) 8 } 9`);var O=n(6773);let V=(0,M.UG)(` 10 query GetAccountCompleteness($unique: String!) { 11 getAccountDetails(unique: $unique) { 12 account { 13 accountCompleteness 14 } 15 } 16 } 17`),P=(0,y.Ik)().shape({first_name:(0,y.Yj)().matches(new RegExp(A.lX),"genericFormMissingOrInvalidInputErrorMessage").matches(new RegExp(/^[^.]*$/),"genericFormMissingOrInvalidInputErrorMessage").test("notOneCharacter","genericFormMinimumLengthErrorMessage",e=>e?.length!==1),last_name:(0,y.Yj)().matches(new RegExp(A.lX),"genericFormMissingOrInvalidInputErrorMessage").test("notOneCharacter","genericFormMinimumLengthErrorMessage",e=>e?.length!==1),gender:(0,y.Yj)().required("genericFormMissingInputErrorMessage"),date_of_birth:(0,y.p6)(),phone_number:(0,y.Yj)().isValidPhoneNumber("genericFormInvalidPhoneNumberErrorMessage")});function q(){let{getDictionaryStringValue:e}=(0,f.c3)(),{dialogOpen:t,onSubmit:n,setDialogOpen:i,account:l}=function(){let{getDictionaryStringValue:e,getDictionaryValue:t}=(0,f.c3)(),[n,i]=(0,v.p)({event:"data_modal_shown",modal_content:"data",modal_variant:"account"}
17),[s,l]=(0,x.F7)(),d=(0,o.KN)(),{pushAnalyticsEvent:u}=(0,E.iK)(),[m,p]=(0,w.n_)(D),[{data:h},g]=(0,w.IT)({query:V,variables:{unique:s?.id||""},pause:!0});(0,a.useEffect)(()=>{h&&h.getAccountDetails.account.accountCompleteness!==s.accountCompleteness&&l({...s,accountCompleteness:h.getAccountDetails.account.accountCompleteness})},[h,l,s]);let b=()=>{d({variant:"error",children:e("accountFormDataErrorProfileMessage")})};return{onSubmit:async e=>{try{let n=(0,A.FY)(e.phone_number),a=(0,A.FB)(n.length>=8?e.phone_number:""),o=e.date_of_birth||null,m=e.first_name?.trim(),h=e.last_name?.trim(),f=(0,O.vc)(e.gender),{data:x,error:v}=await p({input:{dateOfBirth:o,firstName:m,gender:f,lastName:h,phoneNumber:a}});if(v)throw Error(`[use-account-personal-info-dialog/updateProfile] Unknown error, status code ${v.response.status}`);x?.updateAccountProfile?(g(),l({...s,profile:{...s.profile,personal_information:{...s.profile.personal_information,first_name:m??null,last_name:h??null,gender:f,date_of_birth:o},contact_information:{...s.profile.contact_information,phone_number:a,phone_verified:!1}}}),u({event:"change_data"}),d({variant:"success",children:(0,r.jsx)(c.A,{message:t("accountFormDataSavedProfileMessage")})}),i(!1)):b()}catch(e){b(),i(!1),(0,S.c_)(e)}},dialogOpen:n,setDialogOpen:i,account:s}}();return(0,r.jsx)("div",{children:(0,r.jsx)(o.lG.Root,{open:t,onOpenChange:i,trigger:(0,r.jsxs)("button",{className:"mt-1 flex items-center text-anchor hover:text-anchor-dark","data-testid":"edit-name-button",children:[(0,r.jsx)(o.In,{icon:s.zLW}),(0,r.jsx)("span",{className:"ml-1 text-sm underline font-semibold",children:e("accountChangeNameLabel")})]}),title:e("accountChangeNameLabel"),closeButtonLabel:e("accountFormDialogCloseButtonLabel"),children:(0,r.jsxs)("div",{className:"p-5 tablet:w-screen tablet:max-w-dialog grid grid-flow-row gap-2",children:[(0,r.jsx)(k,{onSubmit:n,initialValues:{first_name:l.profile.personal_information.first_name||"",last_name:l.profile.personal_information.last_name||"",gender:l.profile.personal_information.gender,date_of_birth:l.profile.personal_information.date_of_birth||"",phone_number:l.profile.contact_information.phone_number},validationSchema:P}),(0,r.jsx)(o.lG.Close,{asChild:!0,children:(0,r.jsx)(o.$n,{type:"button",variant:"secondary","data-testid":"edit-form-cancel",children:e("accountFormCancelProfileButtonLabel")})})]})})})}let U=(0,M.UG)(` 18 mutation DeleteAccountProfileAddress { 19 deleteAccountProfileAddress 20 } 21`);function z(){let{getDictionaryStringValue:e}=(0,f.c3)(),{getErrorTranslation:t}=(0,f.YY)(),{dialogOpen:n,error:i,handleSubmit:l,fetching:c,setDialogOpen:d}=function(){let[e,t]=(0,x.F7)(),[{fetching:n},r]=(0,w.n_)(U),[{data:i},s]=(0,w.IT)({query:V,variables:{unique:e?.id||""},pause:!0});(0,a.useEffect)(()=>{i&&i.getAccountDetails.account.accountCompleteness!==e.accountCompleteness&&t({...e,accountCompleteness:i?.getAccountDetails.account.accountCompleteness,profile:{...e.profile,contact_information:{...e.profile.contact_information,address:{__typename:"UmsAddress",countryCode:null,houseNumber:null,houseNumberSuffix:null,street:null,city:null,zipCode:null}}}})},[i,t,e]);let{getDictionaryStringValue:l}=(0,f.c3)(),c=(0,o.KN)(),[d,u]=(0,v.p)({event:"remove_address_modal_shown",modal_content:"address"}),[m,p]=(0,a.useState)(),{pushAnalyticsEvent:h}=(0,E.iK)(),g=(0,a.useCallback)(async()=>{p(void 0);try{let e=await r({});if(!e.data?.deleteAccountProfileAddress)return void p({code:"GENERIC-ERROR"});s(),h({event:"remove_address"}),c({variant:"success",children:l("accountDataRemovedAddressMessage")}),u(!1)}catch(e){p(e?.violations?.[0]||{code:"GENERIC-ERROR"})}},[e,s]);return(0,a.useEffect)(()=>{d||p(void 0)},[d]),{handleSubmit:g,fetching:n,dialogOpen:d,error:m,setDialogOpen:u}}();return(0,r.jsx)(o.lG.Root,{open:n,onOpenChange:d,trigger:(0,r.jsx)("button",{className:"flex items-center text-gray-dark hover:text-anchor-dark","data-testid":"remove-address-button",children:(0,r.jsx)(o.In,{icon:s.sjs,size:"xl"})}),title:e("accountRemoveAddressTitle"),closeButtonLabel:e("accountFormDialogCloseButtonLabel"),children:(0,r.jsx)("div",{className:"p-5 pt-3 space-y-4 tablet:w-screen tablet:max-w-dialog",children:(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[i&&(0,r.jsx)(o.Eg,{variant:"error",children:t(i.code)}),(0,r.jsx)(j.l,{type:"submit",variant:"primary","data-testid":"remove-address-submit",onClick:l,loading:c,disabled:c,
21children:e("accountRemoveAddressButtonLabel")}),(0,r.jsx)(o.lG.Close,{asChild:!0,children:(0,r.jsx)(o.$n,{type:"button",variant:"secondary","data-testid":"remove-address-cancel",children:e("accountFormCancelAddressButtonLabel")})})]})})})}let $=()=>{let[e]=(0,x.F7)(),t=(0,u.PB)(),{getFeatureFlag:n}=(0,h.h)();return!!(e.profile.contact_information.phone_number&&n(t.id,"isPhoneNumberChallengeEnabled"))};var G=n(8795);let Y=()=>(0,r.jsx)(o.In,{icon:s.JAe,className:"text-warning",size:"2x","data-testid":"exclamation-icon"});function H(){let{getDictionaryStringValue:e,translations:t}=(0,f.c3)(),[n]=(0,x.F7)(),a=(0,u.PB)(),{getFeatureFlag:i}=(0,h.h)(),c=(0,m.U)(),b=(0,p.ez)(n.profile.contact_information.address?.countryCode),v=(0,A.G)(n.profile.personal_information,t),_=!n.profile.personal_information.gender||!n.profile.personal_information.first_name||!n.profile.personal_information.last_name,j=(0,A.pP)(n.profile.contact_information?.address),C=b?.name,y=$()&&!n.profile.contact_information.phone_verified,E=$()&&n.profile.contact_information.phone_verified;return(0,r.jsx)(l.t,{children:(0,r.jsxs)("div",{className:"max-w-lg mx-auto bg-white space-y-4 rounded-sm",children:[(0,r.jsx)(o.D0,{label:e("accountFormEmailLabel"),value:n.profile.contact_information.email,testId:"email",pii:!0,rightIcon:n.profile.contact_information.email?void 0:(0,r.jsx)(Y,{}),children:(0,r.jsx)(d.N,{className:"mt-3 flex items-center text-anchor hover:text-anchor-dark","data-testid":"edit-email-button",href:"/klantenservice/email",children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.In,{icon:s.zLW}),(0,r.jsx)("span",{className:"ml-1 text-sm underline font-semibold",children:e("accountChangeEmailLabel")})]})})}),(0,r.jsx)("hr",{className:"border-gray-medium"}),(0,r.jsx)(o.D0,{label:e("accountFormPasswordLabel"),value:"*****",testId:"password",children:(0,r.jsx)(G.JU,{className:"mt-3 flex items-center text-anchor hover:text-anchor-dark","data-testid":"change-password-link",children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.In,{icon:s.zLW}),(0,r.jsx)("span",{className:"ml-1 text-sm underline font-semibold",children:e("accountChangePasswordTitle")})]})})}),(0,r.jsx)("hr",{className:"border-gray-medium"}),(0,r.jsx)(o.D0,{label:e("accountFormFullNameLabel"),value:v,testId:"fullname",pii:!0,rightIcon:_?(0,r.jsx)(Y,{}):void 0}),(0,r.jsx)(o.D0,{label:e("accountFormBirthDateLabel"),value:(0,g.bU)(n.profile.personal_information.date_of_birth,"d MMMM yyyy"),testId:"birthdate",pii:!0,rightIcon:n.profile.personal_information.date_of_birth?void 0:(0,r.jsx)(Y,{})}),(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)(o.D0,{label:e("accountFormPhoneNumberLabel"),value:n.profile.contact_information.phone_number,testId:"telephone",className:"w-full",pii:!0,rightIcon:n.profile.contact_information.phone_number?void 0:(0,r.jsx)(Y,{})}),y&&(0,r.jsx)(d.N,{href:"/account/verifieer-telefoonnummer",passHref:!0,"data-testid":"verify-phone-number-button",children:(0,r.jsx)(o.$n,{as:"span",variant:"secondary",className:"text-md cursor-pointer",children:e("verifyPhoneNumberButtonLabel")})}),E&&(0,r.jsxs)("span",{"data-testid":"verify-phone-number-verified",className:"flex items-center",children:[(0,r.jsx)(o.In,{icon:s.Zsp,className:"text-success-darker"}),(0,r.jsx)("span",{className:"ml-1 text-sm text-gray-dark",children:e("verifyPhoneNumberVerifiedLabel")})]})]}),(0,r.jsx)(l.t,{children:(0,r.jsx)(q,{})}),(0,r.jsx)("hr",{className:"border-gray-medium"}),(0,r.jsx)(o.D0,{label:e("accountFormCountryLabel"),value:C||"-",testId:"country-name",rightIcon:C?(0,r.jsx)(l.t,{children:(0,r.jsx)(z,{})}):(0,r.jsx)(Y,{})}),(0,r.jsx)(o.D0,{label:e("accountFormAddressLabel"),value:j,testId:"address",pii:!0,rightIcon:j&&"-"!==j?void 0:(0,r.jsx)(Y,{}),children:!c.hasWebviewLimitation&&i(a.id,"isSubscriptionMovingHouseEnabled")?(0,r.jsx)(d.N,{"data-testid":"moving-house-link",href:"/verhuisservice/doorgeven",className:"mt-1 flex items-center text-anchor hover:text-anchor-dark",children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.In,{icon:s.zLW,className:"w-4"}),(0,r.jsx)("span",{className:"ml-1 text-sm underline font-semibold",children:e("accountChangeAddressLabel")})]})}):(0,r.jsx)(l.t,{children:(0,r.jsx)(B,{})})})]})})}function W(){let{getDictionaryValue:e}=(0,f.c3)(),[t]=(0,x.F7)();return(0,r.jsx)(c.A,{"data-dpg-pii":!0,className:"flex justify-center text-center text-xl font-bold w-full mt-6 tablet:mt-0",testId:"greeting-text",message:e("personalGreeting"),values:{user_first_name:t.profile.personal_information.first_name||null}})}var K=n(22507),X=n(95153),Z=n(1905),J=n(61683),Q=n(95810),ee=n(76705),et=n(79478);function en({secondsToExpire:e,sendNewCode:t,attemptCount:n,updating:a,showResendButton:i,showWrongCodeWarning:s,violations:l,challengeId:d,controlCharacter:u,onCh
21ange:m,translations:p}){let{getTranslatedViolation:h}=(0,et.s)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"w-full px-4 text-center mb-5",children:(0,r.jsx)(c.A,{testId:"verify-code-description",className:"w-full text-center text-sm",message:p.description,values:p.descriptionValues})}),!l.length&&(0,r.jsx)(Q.S,{secondsToExpire:e,timerMessage:p.timerMessage}),l.length>0&&(0,r.jsxs)(o.Eg,{variant:"error",className:"mb-4",children:[l.map(e=>{let{code:t}=(0,M.ni)(ee.B,e);return t&&(0,r.jsx)("p",{className:"font-semibold","data-testid":`error-${t}`,children:h(t)},t)}),i&&(0,r.jsx)("button",{"data-testid":"error-button-retry",disabled:a,className:"no-border mt-1 text-sm underline block",onClick:t,type:"button",children:p.sendNewCodeButtonLabel})]}),(0,r.jsxs)("div",{className:"flex flex-col items-center gap-3 mb-5",children:[(0,r.jsx)("p",{children:p.verificationCodeComponentLabel}),(0,r.jsx)(o.Px,{id:"verification_code","data-testid":"verification_code",labelTemplate:p.verificationCodeSRLabel,disabled:e<1||a,invalid:s&&!a,controlCharacter:u,onCh
21ange:m},d),s&&(0,r.jsx)(c.A,{testId:"wrong-verification-code-warning",className:"text-error text-sm text-center",message:p.invalidVerificationCodeMessage,values:{attempts:3-n}})]})]})}function er(){let e,{getDictionaryValue:t}=(0,f.c3)();return window.history.pushState(null,"",window.location.href),e=(0,a.useRef)(window.window.onpopstate),(0,a.useEffect)(()=>(window.window.onpopstate=function(){window.history.go(1)},()=>{window.window.onpopstate=e.current}),[]),(0,r.jsx)(c.A,{testId:"account-remove-redirect-message",message:t("accountRemoveSuccessMessage"),className:"text-center text-sm"})}var ea=n(16328),ei=n(41535),es=n(84426),eo=n(15831),el=n(13833);let ec=(0,ei.SP)(({input:e,sendBack:t})=>{let n=e.secondsToExpire??0,r=setInterval(()=>{--n>0?t({type:"TICK"}):(clearInterval(r),t({type:"EXPIRE"}))},1e3);return()=>clearInterval(r)}),ed={challengeId:null,verificationCode:null,initialSecondsToExpire:null,secondsToExpire:null,startTime:null,attemptCount:0,violations:[],controlCharacter:null},eu=(0,es.mj)({types:{context:{},events:{},output:{},input:{}},actors:{expirationLoop:ec,requestCode:(0,ei.Sx)(async()=>{throw Error("Actor not provided")}),verifyCode:(0,ei.Sx)(async()=>{throw Error("Actor not provided")})},actions:{startMeasure:(0,eo.a)(()=>({startTime:performance.now()})),reset:(0,eo.a)(()=>ed),resetAttempts:(0,eo.a)(()=>({attemptCount:0})),storeTick:(0,eo.a)({secondsToExpire:({context:e})=>{let t=(performance.now()-(e.startTime??0))/1e3;return Math.ceil((e.initialSecondsToExpire??0)-t)}}),incrementAttempts:(0,eo.a)({attemptCount:({context:e})=>e.attemptCount+1}),resetViolations:(0,eo.a)(()=>({violations:[]})),setExpiredViolation:(0,eo.a)(()=>({violations:[(0,M.$O)({__typename:"UmsViolation",code:"MO__CHALLENGE_EXPIRED"},ee.B)]}))}}).createMachine({context:({input:{parentRef:e}})=>({parentRef:e,...ed}),id:"requestVerificationCodeMachine",output:({event:e})=>e.output,initial:"waitForRequest",states:{waitForRequest:{entry:"reset",on:{REQUEST_VERIFICATION_CODE:{target:"#requestVerificationCodeMachine.requestingCode"}}},waitForRequestRetry:{on:{REQUEST_VERIFICATION_CODE:{target:"#requestVerificationCodeMachine.requestingCode"}},exit:["resetViolations"]},requestingCode:{entry:["startMeasure","resetAttempts"],invoke:{src:"requestCode",input:({context:e})=>e,onDone:[{guard:({event:e})=>"UmsChallengeResponse"===e.output.__typename,actions:[(0,eo.a)(({event:{output:e}})=>({challengeId:e.challengeId,controlCharacter:e.controlCharacter,initialSecondsToExpire:e.secondsUntilExpiry,secondsToExpire:e.secondsUntilExpiry})),(0,el.s)(({context:e})=>e.parentRef,{type:"UPDATE",data:{state:"requested"}})],target:"#requestVerificationCodeMachine.requested"},{actions:(0,eo.a)({violations:({event:e})=>"UmsViolations"===e.output.__typename?e.output.violations:[]}),target:"#requestVerificationCodeMachine.waitForRequestRetry"}]}},requested:{invoke:{src:"expirationLoop",input:({context:e})=>({secondsToExpire:e.secondsToExpire})},on:{REQUEST_VERIFICATION_CODE:{actions:"reset",target:"#requestVerificationCodeMachine.requestingCode"},VERIFY_CODE:{target:"#requestVerificationCodeMachine.verifyingCode"},TICK:{actions:["storeTick"]},EXPIRE:{actions:["storeTick","setExpiredViolation"],target:"#requestVerificationCodeMachine.failure"}}},verifyingCode:{entry:["resetViolations","incrementAttempts"],exit:["resetViolations"],invoke:{src:"verifyCode",input:({context:e,event:t})=>((0,es.DT)(t,"VERIFY_CODE"),{challengeId:e.challengeId,verificationCode:t.payload?.verificationCode}),onDone:[{guard:({event:e})=>"UmsSuccess"===e.output.__typename,target:"#requestVerificationCodeMachine.verified"},{guard:({event:e})=>"UmsViolations"===e.output.__typename&&e.output.violations.some(e=>"MO__CHALLENGE_INCORRECT_CODE"===(0,M.ni)(ee.B,e).code),actions:(0,eo.a)({violations:({event:e})=>"UmsViolations"===e.output.__typename?e.output.violations:[]}),target:"#requestVerificationCodeMachine.requested"},{actions:(0,eo.a)({violations:({event:e})=>"UmsViolations"===e.output.__typename?e.output.violations:[]}),target:"#requestVerificationCodeMachine.failure"}]}},failure:{type:"final",output:({context:e})=>({violations:e.violations,result:"failure"})},verified:{type:"final",output:({context:e})=>({...e,result:"verified"})}},on:{RESET:{target:"#requestVerificationCodeMachine.waitForRequest",reenter
21:!0}}}),em=(0,M.UG)(` 22 mutation InitiateDeleteAccount { 23 initiateDeleteAccount { 24 __typename 25 ... on UmsChallengeResponse { 26 challengeId 27 controlCharacter 28 # @TODO replace with expirationDate 29 secondsUntilExpiry 30 } 31 ... on UmsViolations { 32 violations { 33 code 34 ...UmsViolationFields 35 } 36 } 37 } 38 } 39`),ep=(0,M.UG)(` 40 mutation DeleteAccount($input: UmsChallengeSolutionInput!) { 41 deleteAccount(input: $input) { 42 __typename 43 ... on UmsSuccess { 44 ok 45 } 46 ... on UmsViolations { 47 violations { 48 code 49 ...UmsViolationFields 50 } 51 } 52 } 53 } 54`);var eh=n(19605);let ef=eu.provide({actors:{requestCode:(0,ei.Sx)(async()=>{let{data:e,error:t}=await eb();return!t&&e&&("UmsViolations"!==e.initiateDeleteAccount.__typename||e.initiateDeleteAccount.violations[0]?.code)?e.initiateDeleteAccount:{__typename:"UmsViolations",violations:[{__typename:"UmsViolation",code:"MO__UNKNOWN_ERROR"}]}}),verifyCode:(0,ei.Sx)(async({input:e})=>{let{data:t,error:n}=await ex({challengeId:e.challengeId??"",verificationCode:e.verificationCode});return!n&&t&&("UmsViolations"!==t.deleteAccount.__typename||t.deleteAccount.violations[0]?.code)?t.deleteAccount:{__typename:"UmsViolations",violations:[{__typename:"UmsViolation",code:"MO__UNKNOWN_ERROR"}]}})}}),eg=(0,es.mj)({types:{context:{},events:{}},actors:{verificationCodeMachine:ef},actions:{reset:(0,eo.a)(({context:e})=>({...e,formStep:"warning",result:void 0,violations:[]})),resetResult:(0,eo.a)(()=>({result:void 0}))}}).createMachine({context:{formStep:"warning",result:void 0,violations:[],_childTick:0},id:"accountRemoveMachine",initial:"init",states:{init:{entry:"reset",always:[{target:"#accountRemoveMachine.idle"}]},idle:{entry:"resetResult",invoke:{id:"verificationCodeMachine",src:"verificationCodeMachine",input:({self:e})=>({parentRef:e}),onSnapshot:{actions:(0,eo.a)({_childTick:({context:e})=>e._childTick+1})},onDone:[{guard:({event:e})=>e.output?.result==="verified",actions:(0,eo.a)({result:({event:e})=>e.output?.result,violations:[],formStep:"redirectMessage"}),target:"#accountRemoveMachine.completed"},{actions:(0,eo.a)({result:({event:e})=>e.output?.result,violations:({event:e})=>e.output?.violations??[]}),target:"#accountRemoveMachine.completed"}]},on:{REQUEST_VERIFICATION_CODE:{actions:(0,el.s)("verificationCodeMachine",({event:e})=>e)},VERIFY_CODE:{actions:(0,el.s)("verificationCodeMachine",({event:e})=>e)},UPDATE:{actions:(0,eo.a)({formStep:({context:e,event:t})=>"requested"===t.data.state?"verificationCode":e.formStep})},RESET:{actions:[(0,el.s)("verificationCodeMachine",({event:e})=>e),"resetResult"]},INIT:{target:"#accountRemoveMachine.init"}}},completed:{on:{RESET:{target:"#accountRemoveMachine.idle"},INIT:{target:"#accountRemoveMachine.init"}}},failure:{on:{RESET:{target:"#accountRemoveMachine.idle"},INIT:{target:"#accountRemoveMachine.init"}}}}}),eb=()=>eh.z.mutation(em,{}).toPromise(),ex=e=>eh.z.mutation(ep,{input:{challengeId:e.challengeId,challengeCode:e.verificationCode}}).toPromise();var ev=n(58373),e_=n(77843);let ej=(0,y.Ik)({verification_code:(0,y.Yj)().required()}),eC=(0,y.Ik)(),ey=["MO__CHALLENGE_TOO_MANY_ATTEMPTS","MO__CHALLENGE_LIMIT_REACHED","MO__CHALLENGE_EXPIRED"],eE={redirectMessage:"accountRedirectButtonLabel"},eN={warning:"accountRemoveNextButtonLabel",verificationCode:"accountRemoveConfirmButtonLabel"},ew={warning:"accountRemoveTitle",verificationCode:"accountRemoveConfirmTitle",redirectMessage:"accountRemoveFinalizedTitle"};function eM(e){let{violations:t}=e,{getTranslatedViolation:n}=(0,et.s)(),{getDictionaryValue:a}=(0,f.c3)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.A,{testId:"account-removal-warning-message",className:"text-sm",message:a("accountRemoveDescription")}),t.length>0&&(0,r.jsx)(o.Eg,{variant:"error",className:"mb-4",children:t.map(e=>{let{code:t}=(0,M.ni)(ee.B,e);return t&&(0,r.jsx)("p",{className:"font-semibold","data-testid":`error-${t}`,children:n(t)},t)})})]})}function eI(){let e=(0,u.PB)(),{dialogOpen:t,setDialogOpen:n,sendNewCode:i,formStep:s,disableSubmit:l,updating:d,formik:{handleSubmit:m,setFieldValue:p},secondsToExpire:h,attemptCount:g,showWrongCodeWarning:b,violations:_,challengeId:y,controlCharacter:N,showResendButton:w,removeAccountDialogTranslations:I,verificationCodeViewTranslations:L}=function(){let[e]=(0,x.F7)(),[t,n]=(0,v.p)({event:"delete_account_modal_shown",modal_content:"delete_account"}
54),[r,i]=(0,ea.zl)(eg),{pushAnalyticsEvent:s}=(0,E.iK)(),{getDictionaryValue:o,getDictionaryStringValue:l}=(0,f.c3)(),c=r.children.verificationCodeMachine?.getSnapshot(),{formStep:d,violations:u}=r.context,{violations:m=u,attemptCount:p=0,secondsToExpire:h,challengeId:g="",controlCharacter:b=""}=c?.context??{},_=c?.value==="requestingCode"||c?.value==="verifyingCode",j="verificationCode"===d&&m.some(e=>{let{code:t}=(0,M.ni)(ee.B,e);return t&&ey.includes(t)})||"warning"===d&&!!m.length,y=(0,e_.G)(),N=(0,C.Wx)({validationSchema:"verificationCode"===d?ej:eC,initialValues:{verification_code:""},validateOnBlur:!0,async onSubmit(e){switch(d){case"warning":w();break;case"verificationCode":i({type:"VERIFY_CODE",payload:{verificationCode:e.verification_code}});break;case"redirectMessage":var t;s({event:"delete_account"}),(0,ev.O)("account-removed"),t=y,window.location.replace(t)}}});(0,a.useEffect)(()=>{i({type:"INIT"})},[t,i]);let w=(0,a.useCallback)(()=>{i({type:"RESET"}),i({type:"REQUEST_VERIFICATION_CODE"})},[i]),I=m.some(e=>"MO__CHALLENGE_INCORRECT_CODE"===(0,M.ni)(ee.B,e).code)&&p>0,L="verificationCode"===d&&!m.some(e=>"MO__CHALLENGE_LIMIT_REACHED"===(0,M.ni)(ee.B,e).code),A=(0,a.useMemo)(()=>({description:o("accountRemoveConfirmDescription"),descriptionValues:{account_email:e.profile.contact_information.email??""},invalidVerificationCodeMessage:o("accountVerificationCodeInvalidMessage"),sendNewCodeButtonLabel:l("accountVerificationCodeSendNewCodeButtonLabel"),timerMessage:o("accountVerificationCodeInfoNotification"),verificationCodeComponentLabel:l("accountVerificationCodeComponentLabel"),verificationCodeSRLabel:l("accountFormVerificationCodeSRLabel")}),[l,o]),F=(0,a.useMemo)(()=>"redirectMessage"===d?o(eE[d]):l(eN[d]),[d,o,l]),R=(0,a.useMemo)(()=>({submitButtonLabel:F,cancelButtonLabel:l("accountRemoveCancelButtonLabel"),closeButtonLabel:l("accountFormDialogCloseButtonLabel"),dialogTitle:l(ew[d]),sendNewCodeContent:o("accountVerificationCodeNoCodeReceivedMessage"),triggerLabel:l("accountRemoveButtonLabel")}),[F,l,o,d]);return{dialogOpen:t,setDialogOpen:n,formStep:d,sendNewCode:w,formik:N,updating:_,disableSubmit:j,attemptCount:p,secondsToExpire:h,showWrongCodeWarning:I,violations:m,challengeId:g,controlCharacter:b,showResendButton:L,removeAccountDialogTranslations:R,verificationCodeViewTranslations:A}}(),A=(0,a.useCallback)(e=>{p("verification_code",e)},[p]);return(0,r.jsx)(o.lG.Root,{hideCloseButton:"redirectMessage"===s,open:t,onOpenChange:n,closeButtonLabel:I.closeButtonLabel,trigger:(0,r.jsx)("button",{className:"flex flex-col items-center text-sm text-error underline w-full py-5 border-b border-b-gray-medium max-w-lg","data-testid":"remove-account-button",children:I.triggerLabel}),title:I.dialogTitle,children:(0,r.jsx)(J.c,{children:(0,r.jsx)(Z.N,{onSubmit:m,children:(0,r.jsxs)("fieldset",{disabled:d,children:[(0,r.jsxs)(o.BJ.Navigator,{current:s,children:[(0,r.jsx)(o.BJ.Screen,{name:"warning",children:(0,r.jsx)(eM,{violations:_})}),(0,r.jsx)(o.BJ.Screen,{name:"verificationCode",children:(0,r.jsx)(en,{secondsToExpire:h,sendNewCode:i,attemptCount:g,updating:d,showResendButton:w,showWrongCodeWarning:b,violations:_,challengeId:y,controlCharacter:N,onChange:A,translations:L})}),(0,r.jsx)(o.BJ.Screen,{name:"redirectMessage",children:(0,r.jsx)(er,{})})]}),(0,r.jsxs)(X.M,{children:[(0,r.jsx)(j.l,{className:"w-full",type:"submit",variant:"primary","data-testid":"account-removal-form-submit",loading:d,disabled:l,children:"string"==typeof I.submitButtonLabel?I.submitButtonLabel:(0,r.jsx)(c.A,{message:I.submitButtonLabel,values:{brand_name:e.seoTitle}})}),"redirectMessage"!==s&&(0,r.jsx)(o.lG.Close,{asChild:!0,children:(0,r.jsx)(o.$n,{type:"button",variant:"secondary",className:"w-full","data-testid":"account-removal-form-cancel",children:I.cancelButtonLabel})}),w&&(0,r.jsx)("button",{disabled:d,className:"no-border mt-4 w-full text-sm",onClick:i,type:"button",children:(0,r.jsx)(c.A,{message:I.sendNewCodeContent,paragraphElement:"span",paragraphClassName:"block"})}),"warning"===s&&(0,r.jsx)("div",{className:"my-3",children:(0,r.jsx)(K.A,{})})]})]})})})})}var eL=n(69591),eA=n(81278),eF=n(94629),eR=n(28526);function eB(){let{openPrivacyModal:e}=(0,a.useContext)(eF.L_),{translations:t,getDictionaryStringValue:n}=(0,f.c3)(),i=(0,eR.t)();return(0,r.jsxs)("div",{className:"flex flex-col -my-4","data-testid":"privacy-and-terms-links",children:[(t.privacyAndTermsLinks??[]).map(e=>(0,r.jsx)(o.Pr,{href:e[`url_${i}`],target:"_blank",className:"text-anchor hover:text-anchor-dark font-semibold underline",icon:(0,r.jsx)(o.In,{icon:s.Ju_,fixedWidth:!0}),children:e.label},e.label)),(0,r.jsx)(o.Pr,{as:"button","data-testid":"cookie-instellingen",onClick:e,className:"text-anchor hover:text-anchor-dark font-semibold underline",icon:(0,r.jsx)(o.In,{icon:s.BH7,fixedWidth:!0}),children:n("cookieSettingsLabel")}
54,"cookie-settings")]})}function eT(){let{getDictionaryStringValue:e}=(0,f.c3)();return(0,r.jsxs)(o.nD.Item,{value:"privacy-and-conditions","data-testid":"privacy-accordion",children:[(0,r.jsx)(o.nD.Trigger,{children:e("privacyAndTermsAccordionTitle")}),(0,r.jsx)(o.nD.Content,{children:(0,r.jsx)(l.t,{children:(0,r.jsx)(eB,{})})})]})}var ek=n(46887),eS=n(59496);function eD(){let{getDictionaryStringValue:e}=(0,f.c3)(),t=(0,u.PB)(),n=(0,eA.useRouter)(),{userLanguagePreference:i}=(0,m.U)(),s=(0,a.useCallback)(e=>{ek.A.set(eS.C,e,{expires:365}),n.reload()},[]),l=i||t.brandDefaultLanguage,c=t.brandEnabledLanguages||[];return(0,r.jsxs)(o.nD.Item,{value:"language-preferences","data-testid":"language-accordion",children:[(0,r.jsx)(o.nD.Trigger,{children:e("languageAccordionTitle")}),(0,r.jsx)(o.nD.Content,{children:(0,r.jsx)(o.z6,{onValueChange:s,"data-testid":"select-language",items:c.map(t=>({label:(0,r.jsx)("span",{"data-testid":`language-${t}`,children:e(`supportedLanguage_${t}`)}),value:t})),defaultValue:l})})]})}function eO(){let{getDictionaryStringValue:e}=(0,f.c3)(),t=(0,m.U)(),{id:n}=(0,u.PB)(),{getFeatureFlag:a}=(0,h.h)();return t.hasWebviewLimitation||!a(n,"isBrandSubscriptionsEnabled")?null:(0,r.jsx)(d.N,{href:"/abonnementen",passHref:!0,children:(0,r.jsxs)("button",{"data-testid":"subscriptions-button",className:"w-full text-left font-semibold min-h-14 max-w-lg mx-auto bg-white border border-gray-medium p-4 rounded-sm flex flex-row items-center cursor-pointer appearance-none",children:[(0,r.jsx)("span",{children:e("subscriptionsAccordionTitle")}),(0,r.jsx)(o.In,{icon:s.XkK,className:"text-icon ml-auto text-xl"})]})})}function eV(){var e;let t,n=(0,u.PB)(),{getDictionaryStringValue:a,getDictionaryValue:i}=(0,f.c3)(),d=(0,m.U)(),{getFeatureFlag:p}=(0,h.h)(),g=(0,e_.G)(),b=(0,eA.useRouter)(),[v]=(0,x.F7)(),_=p(n.id,"isPrivacyAndTermsEnabled"),j=[{limit:59,label:a("accountCompleteProfileHint")},{limit:99,label:a("accountAlmostThereHint")},{limit:100,label:a("accountProfileCompletedHint")}],C=d.userLanguagePreference||n.brandDefaultLanguage;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"py-5 tablet:py-4 px-3 flex flex-col gap-2 grow","data-testid":"greeting",children:[(0,r.jsx)("h1",{className:"sr-only",children:a("accountPageTitle")}),(0,r.jsx)(W,{}),(0,r.jsxs)("div",{className:"flex flex-col justify-center items-center",children:[(0,r.jsx)(c.A,{className:"text-center w-full",message:i("accountDescription"),values:{number:v?.accountCompleteness}}),(0,r.jsx)(o.m_,{content:(0,r.jsx)("div",{className:"m-2 p-2 font-semibold",children:(e=v?.accountCompleteness,t=j.find(({limit:t})=>e<=t),t?.label||a("accountAlmostThereHint"))}),open:!0,avoidCollisions:!1,children:(0,r.jsx)(o.z2,{className:"w-25 mb-2 mt-16",percentage:v?.accountCompleteness})})]}),(0,r.jsx)("div",{className:"max-w-lg w-full mx-auto",children:(0,r.jsxs)(eL.b,{defaultValue:["account-data"],children:[(0,r.jsxs)(eL.n.Item,{value:"account-data","data-testid":"account-data-accordion",children:[(0,r.jsx)(eL.n.Trigger,{children:(0,r.jsx)("div",{className:"whitespace-nowrap",children:a("accountAccordionTitle")})}),(0,r.jsx)(eL.n.Content,{children:(0,r.jsx)(l.t,{children:(0,r.jsx)(H,{})})})]}),(0,r.jsx)(eO,{}),_&&(0,r.jsx)(eT,{}),n.brandEnabledLanguages.length>1&&(0,r.jsx)(eD,{}),p("general","isSessionOverviewEnabled")&&(0,r.jsxs)(eL.n.Item,{value:"session-overview","data-testid":"session-overview-accordion",children:[(0,r.jsx)(eL.n.Trigger,{children:(0,r.jsxs)("div",{className:"-my-2",children:[(0,r.jsx)("div",{children:a("sessionOverviewAccordionTitle")}),(0,r.jsx)("div",{className:"text-sm font-regular text-gray-dark",children:a("sessionOverviewAccordionSubTitle")})]})}),(0,r.jsx)(eL.n.Content,{children:(0,r.jsx)(l.t,{children:(0,r.jsx)("pip-session-overview",{brand:n.key,language:"fr"===C?"fr":"nl"})})})]})]})}),d.showLogoutButton&&(0,r.jsx)(l.t,{children:(0,r.jsxs)("button",{onClick:()=>{window?.ssoLogout?window.ssoLogout.logout(window.ssoConfig):b.replace(g)},"data-testid":"logout-button",className:"w-full text-left font-semibold min-h-14 max-w-lg mx-auto bg-white border border-gray-medium p-4 rounded-sm flex flex-row items-center cursor-pointer appearance-none",children:[(0,r.jsx)(o.In,{className:"text-gray-dark mr-2 inline-block max-h-[16px]",icon:s.GxD}),(0,r.jsx)("span",{children:a("accountLogoutButtonLabel")}),(0,r.jsx)(o.In,{icon:s.XkK,className:"text-icon ml-auto text-xl"})]})})]}),(0,r.jsx)("div",{className:"px-4 bg-white flex flex-col items-center",children:(0,r.jsx)(l.t,{children:(0,r.jsx)(eI,{})})})]})}var eP=n(35453),eq=!0;function eU({countryInfo:e,errorCodes:t}){(0,eP.e)();let{translations:n}=(0,f.c3)();return(0,r.jsx)(et.p.Provider,{value:t,children:(0,r.jsxs)(p.wF.Provider,{value:e,children:[(0,r.jsx)(i.r,{routes:n.accountpageBreadCrumbs}),(0,r.jsx)(eV,{})]})})}},22507:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(6029);n(55729);var a=n(89456),i=n(79132),s=n(95618);let o=["aut","don","ad","flr","vk","nu","wst","lib","wtt","tr","wbs","qmnl"],l=["vtm","hln","joebe","dm","hu","vtmgo","qmbe","gg"];function c(){let e=(0,i.PB)(),t=(0,i.Ek)(),n="nl"===e.brandCountry?o:l;return(0,r.jsx)(a.ri,{children:n.map(e=>(0,r.jsx)("img",{className:"h-6 mr-3",src:(e=>{if(!t[e])return"";let n=t[e]?.faviconSvg;return(0,s.d)(n)?.height(60).url()||""})(e),alt:t[e]?.seoTitle??"","aria-hidden":"true"},e))})}},28526:(e,t,n)=>{"use strict";n.d(t,{t:()=>a});var r=n(79132);function a(){let e=(0,r.PB)();return e?.brandCountry?e.brandCountry:window.location?.host.split(".").pop()==="be"?"be":"nl"}}
54,28952:(e,t,n)=>{"use strict";n.d(t,{X:()=>u});var r=n(6029);n(55729);var a=n(55597),i=n(89456),s=n(43343),o=n(63470),l=n(59496);function c({errors:e,touched:t,values:n,handleChange:a,handleBlur:o,prefix:d}){let{getErrorTranslation:u}=(0,s.YY)(),{getTranslation:m}=(0,s.c3)();return"BE"!==n.country?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.zB,{name:d?`${d}.zip`:"zip",touched:t.zip,error:e.zip&&u(e.zip),children:(0,r.jsx)(i.pd,{label:m("addressFormZipCodeLabel"),className:"w-full","data-testid":"edit-input-zipcode",value:n.zip,onChange:a,onBlur:o,autoComplete:"postal-code",validityMessage:e.zip&&u(e.zip)})}),(0,r.jsx)(i.zB,{name:d?`${d}.street`:"street",touched:t.street,error:e.street&&u(e.street),children:(0,r.jsx)(i.pd,{label:m("addressFormStreetNameLabel"),className:"w-full","data-testid":"edit-input-streetname",value:n.street??void 0,onChange:a,onBlur:o,validityMessage:e.street&&u(e.street)})}),(0,r.jsxs)("div",{className:"grid grid-cols-5 gap-2 items-end",children:[(0,r.jsx)(i.zB,{name:d?`${d}.housenumber`:"housenumber",touched:t.housenumber,error:e.housenumber&&u(e.housenumber),className:"col-span-2",children:(0,r.jsx)(i.pd,{label:m("addressFormHouseNumberLabel"),"data-testid":"edit-input-house_number",value:n.housenumber,onChange:a,onBlur:o,validityMessage:e.housenumber&&u(e.housenumber)})}),(0,r.jsx)(i.zB,{name:d?`${d}.housenumberAddition`:"housenumberAddition",touched:t.housenumberAddition,error:e.housenumberAddition&&u(e.housenumberAddition),className:"col-span-3",children:(0,r.jsx)(i.pd,{label:m("addressFormBoxNumberLabel"),required:!1,optionalSuffix:m("genericFormOptionalLabel"),"data-testid":"edit-input-house_number_suffix",value:n.housenumberAddition??void 0,onChange:a,onBlur:o,maxLength:l.Uh,validityMessage:e.housenumberAddition&&u(e.housenumberAddition)})})]})]})}function d({errors:e,touched:t,values:n,handleChange:a,handleBlur:o,prefix:c}){let{getErrorTranslation:u}=(0,s.YY)(),{getTranslation:m}=(0,s.c3)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.zB,{name:c?`${c}.zip`:"zip",touched:t.zip,error:e.zip&&u(e.zip),children:(0,r.jsx)(i.pd,{label:m("addressFormZipCodeLabel"),className:"w-full","data-testid":"edit-input-zipcode",value:n.zip,onChange:a,onBlur:o,autoComplete:"postal-code",validityMessage:e.zip&&u(e.zip)})}),(0,r.jsxs)("div",{className:"grid grid-cols-5 gap-2 items-end",children:[(0,r.jsx)(i.zB,{name:c?`${c}.housenumber`:"housenumber",touched:t.housenumber,error:e.housenumber&&u(e.housenumber),className:"col-span-2",children:(0,r.jsx)(i.pd,{label:m("addressFormHouseNumberLabel"),"data-testid":"edit-input-house_number",value:n.housenumber,onChange:a,onBlur:o,validityMessage:e.housenumber&&u(e.housenumber)})}),(0,r.jsx)(i.zB,{name:c?`${c}.housenumberAddition`:"housenumberAddition",touched:t.housenumberAddition,error:e.housenumberAddition&&u(e.housenumberAddition),className:"col-span-3",children:(0,r.jsx)(i.pd,{label:m("addressFormHouseNumberSuffixLabel"),required:!1,optionalSuffix:m("genericFormOptionalLabel"),"data-testid":"edit-input-house_number_suffix",value:n.housenumberAddition??void 0,onChange:a,onBlur:o,maxLength:l.Uh,validityMessage:e.housenumberAddition&&u(e.housenumberAddition)})})]})]})}function u({countryCode:e,formProps:t,foundAddress:n,isLoading:l,infoMessage:m}){let{getTranslation:p}=(0,s.c3)();return(0,r.jsxs)(r.Fragment,{children:["NL"===e&&(0,r.jsx)(d,{...t}),"BE"===e&&(0,r.jsx)(c,{...t}),m&&(0,r.jsxs)("p",{className:"text-xs leading-4 inline-flex items-top",role:"complementary",children:[(0,r.jsx)(i.In,{icon:a.iW_,className:"text-icon mr-1 mt-0.5"}),m]}),n&&(0,r.jsx)(o.M,{title:p("addressFormNewAddressTitle"),address:n,testId:"found-address"}),l&&(0,r.jsx)("div",{className:"flex justify-center py-3",children:(0,r.jsx)(i.fV,{"aria-label":p("isLoadingAriaLabel")})})]})}},35453:(e,t,n)=>{"use strict";n.d(t,{e:()=>v});var r=n(6029),a=n(55729),i=n(89456),s=n(31576),o=n(79132),l=n(76407),c=n(57490);let d=({message:e,url:t,buttonLabel:n,strong:a})=>(0,r.jsxs)("div",{className:"flex flex-wrap gap-x-2 gap-y-0.5 justify-center items-center text-center px-2",children:[(0,r.jsx)("span",{className:(0,
54c.cx)("inline",a?"font-semibold":""),children:e}),(0,r.jsx)(i.$n,{variant:"primary",className:"text-black",as:"a",href:t,size:"small",children:n})]});var u=n(18654),m=n(91018);let p="commercial_banner_closed";var h=n(59036),f=n(7472),g=n(50197);let b=(0,n(50092).UG)(` 55 query CommercialBannerSubscriptions { 56 getLinkedSubscriptions { 57 brand 58 subscriptionId 59 } 60 } 61`);var x=n(81278);let v=()=>{let{query:e}=(0,x.useRouter)(),t=(()=>{let{hasWebviewLimitation:e}=(0,h.U)(),t=(0,o.PB)(),{getFeatureFlag:n}=(0,l.h)(),r=n(t.id,"isShowCommercialBannerEnabled"),a=(0,f.L)(t.id);if(r)return a(e?"mobileapp":"web")})(),{isBannerClosed:n,setBannerClosed:c}=((e=1)=>{let t,{getCookie:n,setCookie:r}=(0,m.A)(),[i,s]=(0,a.useState)(!!((t=n(p))&&"true"===t));return{setBannerClosed:(0,a.useCallback)(()=>{s(!0),r(p,"true",{days:e})},[e,r]),isBannerClosed:i}})(t?.marketingBannerTTLInDays),v=(0,i.KN)(),_=(()=>{let[e]=(0,s.F7)({optional:!0}),[{data:t}]=(0,g.IT)({query:b,pause:!e?.id});return e?.id?t?(t?.getLinkedSubscriptions?.length||0)>0?"has-subscriptions":"no-subscriptions":void 0:"unauthenticated"})(),{pushAnalyticsEvent:j}=(0,u.iK)(),C=(0,a.useCallback)(()=>{j({event:"clicks",click_type:"close_commercial_banner"}),c()},[j,c]);(0,a.useEffect)(()=>{if(t&&!e.hideCommercialBanner)return!_||n?void v():("unauthenticated"===_&&v({showIcon:!1,variant:"info",onClose:C,children:(0,r.jsx)(d,{message:t.unauthenticatedMessage,url:t.unauthenticatedButtonLinkUrl,buttonLabel:t.unauthenticatedButtonLinkText,strong:!0})}),"has-subscriptions"===_&&v({showIcon:!1,variant:"info",onClose:C,children:(0,r.jsx)(d,{message:t.withSubscriptionsMessage,url:t.withSubscriptionsLinkUrl,buttonLabel:t.withSubscriptionsLinkText,strong:!0})}),"no-subscriptions"===_&&v({showIcon:!1,variant:"info",onClose:C,children:(0,r.jsx)(d,{message:t.noSubscriptionsMessage,url:t.noSubscriptionsLinkUrl,buttonLabel:t.noSubscriptionsLinkText,strong:!0})}),()=>v())},[t,v,_,n,C,e])}},45296:(e,t,n)=>{"use strict";n.d(t,{p:()=>i});var r=n(55729),a=n(18654);function i(e){let[t,n]=(0,r.useState)(!1),{pushAnalyticsEvent:i}=(0,a.iK)();return[t,(0,r.useCallback)(t=>(t&&e&&i(e),n(t)),[])]}},47466:(e,t,n)=>{"use strict";n.d(t,{ez:()=>s,wF:()=>a,yx:()=>i});var r=n(55729);let a=(0,r.createContext)([]),i=()=>(0,r.useContext)(a),s=e=>{let t=i();return t?.find(t=>t.iso2Code===e)}},51418:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(55729),a=n(89456),i=n(64952),s=n(50197);let o=(0,n(50092).UG)(`
62 query ValidateAddress($validateAddressInput: ValidateAddressInput!) { 63 validateAddress(validateAddressInput: $validateAddressInput) { 64 address { 65 city 66 country 67 housenumber 68 housenumber_addition 69 street 70 zip 71 } 72 } 73 } 74`),l=e=>!!e&&("BE"===e.country?!!(e.zip&&e.housenumber&&e.street):!!(e.zip&&e.housenumber)),c=e=>{let t=null!==e,n=(e?.housenumber??"").trim(),c=e?.country,d=e?.zip,u=e?.street,m=e?.housenumberAddition,p=(0,r.useMemo)(()=>t&&c&&d?{country:c,street:u,housenumber:n,housenumberAddition:m,zip:d}:null,[t,c,d,n,m,u]),[h,f]=(0,r.useState)(p);(0,a.sv)(()=>{f(p)},500,[p]);let[g]=(0,s.IT)({query:o,variables:{validateAddressInput:h??{country:"NL",zip:"",housenumber:"",street:""}},pause:!l(h)});if(!l(p))return{foundAddress:void 0,hasValidationError:!1,isValidationLoading:!1};let b=(0,i.i)(h)!==(0,i.i)(p),x=g.fetching||b;return{foundAddress:x?void 0:g.data?.validateAddress.address,hasValidationError:!x&&!!g.error,isValidationLoading:x}}},58373:(e,t,n)=>{"use strict";n.d(t,{O:()=>a});let r="mijn-omgeving-action";function a(e){window.postMessage({[r]:e},"*"),"u">typeof MijnOmgevingMessageReceiver&&MijnOmgevingMessageReceiver.postMessage(JSON.stringify({[r]:e})),"webkit"in window&&window.webkit?.messageHandlers?.mijnOmgevingHandler&&window.webkit.messageHandlers.mijnOmgevingHandler.postMessage({[r]:e})}},61683:(e,t,n)=>{"use strict";n.d(t,{c:()=>a});var r=n(6029);function a({children:e}){return(0,r.jsx)("div",{className:"p-5 space-y-4 tablet:w-screen tablet:max-w-dialog",children:e})}n(55729)},63470:(e,t,n)=>{"use strict";n.d(t,{M:()=>a});var r=n(6029);function a({title:e,address:t,testId:n}){let{city:i,zip:s,street:o,housenumber:l,housenumber_addition:c}=t;return(0,r.jsxs)("address",{className:"w-full rounded-sm bg-gray-light p-3 not-italic text-sm","data-testid":n,"data-dpg-pii":!0,children:[(0,r.jsx)("span",{className:"font-semibold pb-1",children:e}),(0,r.jsx)("p",{children:`${o} ${l} ${c||""}`}),(0,r.jsxs)("p",{children:[s," ",i]})]})}n(55729)},63651:(e,t,n)=>{"use strict";var r=n(57490),a=n(21941);let i=/^\(\+([0-9]+)\)\s*$/;(0,a.Zg)(a.Yj,"isValidPhoneNumber",function(e){return this.test("validPhoneNumber","Oops",function(t){let{path:n,createError:a}=this;if(void 0===t||t?.match(i))return!0;let s=(0,r.FY)(t);return!!(s.length>=8&&s.length<=50)||a({path:n,message:e??"Invalid"})})})},69591:(e,t,n)=>{"use strict";n.d(t,{n:()=>i.nD,b:()=>o});var r=n(6029),a=n(55729),i=n(89456),s=n(18654);let o=function({className:e,children:t,...n}){let o=(0,a.useRef)(n.defaultValue||[]),{pushAnalyticsEvent:l}=(0,s.iK)();return(0,r.jsx)(i.nD.Root,{onValueChange:e=>{var t;let n=(t=o.current,t.filter(t=>!e.includes(t)).concat(e.filter(e=>!t.includes(e))));l({event:"clicks",click_type:e.length>o.current.length?"click_unfold":"click_fold",click_element:n.join(", ")}),o.current=e},type:"multiple",...n,children:t})}},71661:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/account",function(){return n(17876)}])},76705:(e,t,n)=>{"use strict";n.d(t,{B:()=>r});let r=(0,n(50092).UG)(` 75 fragment UmsViolationFields on UmsViolation { 76 code 77 } 78`)},77843:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});let r=()=>"/api/logout"},90512:(e,t,n)=>{"use strict";n.d(t,{E0:()=>u,Yq:()=>d,bU:()=>c});var r=n(88274),a=n(73491),i=n(14090),s=n(99405),o=n(46700),l=n(66632);function c(e,t="d MMMM yyyy",n="-",a=n){return(0,o.Wo)(e)||null===e?null!==e&&e.length?d((0,r.H)(e),t):a:n}function d(e,t="d MMMM yyyy"){return(0,a.GP)(e,t,{locale:l.nl})}function u(e,t){return t?(0,i.$)(t)?t:(0,s.qg)(t,"yyyy-MM-dd",new Date):""}},91018:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(55729),a=n(49897);let i=()=>({getCookie:(0,r.useCallback)(e=>{let t=document.cookie.match(RegExp(`(^| )${e}=([^;]+)`));return t?t[2]:void 0},[]),setCookie:(0,r.useCallback)((e,t,n)=>{let r=(0,a.W)(new Date,n).toUTCString();document.cookie=`${e}=${t}; expires=${r}; path=/`},[])})},95153:(e,t,n)=>{"use strict";n.d(t,{M:()=>a});var r=n(6029);function a({children:e}){return(0,r.jsx)("div",{className:"grid grid-flow-row gap-2 mt-3",children:e})}n(55729)},95810:(e,t,n)=>{"use strict";n.d(t,{S:()=>s});var r=n(6029);n(55729);var a=n(89456),i=n(15615);let s=({timerMessage:e,...t})=>(0,r.jsx)(a.zR,{...t,children:t=>(0,r.jsx)(i.A,{testId:"verification-code-timer",className:"tabular-nums",message:e,values:{time_left
78:t}})})}},e=>{e.O(0,[5386,7447,2074,1941,7579,92,6593,636,8792],()=>e(e.s=71661)),_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.