1import{j as e,r as a,S}from"./main-aA_EcOIv.js";import{a as n,P as B,S as F,L as W}from"./ProfessionalAffirmation-BO417ari-chunk.js";import{g as k}from"./GetSplashData-DBIjPFcb-chunk.js";import{A as T}from"./AudienceSortModal-DzLwUVVm-chunk.js";import{C as U,a as _,P as R}from"./CountrySelectorMobile-DG2j5vXX-chunk.js";import{A as X,a as z}from"./AudienceSelectorMobile-DmeIKuTC-chunk.js";import{A as G}from"./AudienceSelectorList-CiNZ6w5n-chunk.js";import{e as O,a as q,f as $,c as J}from"./audienceSortApiHandlers-D-Twcx0n-chunk.js";import{s as P}from"./sanitizeHtml-B5Pv7teQ-chunk.js";import{u as K,g as I}from"./usePrepNotifications-B2rrmbq--chunk.js";import"./pdfmake-BRJ3kdkn-chunk.js";import"./ButtonAction-_-WZ22id-chunk.js";import"./DotLoader-C4UGrJ9L-chunk.js";import"./Checkbox-CKaWupMF-chunk.js";import"./ImageArrowLeft-BcwSnCFc-chunk.js";import"./ImageX-mmFSw32D-chunk.js";import"./index-Z84vgtwv-chunk.js";import"./ImageLogo-CeiWrZBx-chunk.js";import"./DDXModal-hUh5Cwhd-chunk.js";import"./index-BmF2VOmK-chunk.js";import"./getDecodedHtml-wzi1zZCi-chunk.js";import"./ImageCTAMeatball-CzKclmuF-chunk.js";import"./purify.es-BElT3piG-chunk.js";import"./useSanitizeHtml.DzRNx-FL-Dhxm2s7n-chunk.js";const Q=({initialData:o,introduction:i,setStep:g,setIsModalOpen:l,setCameFromInitialStep:b,audienceTypesData:x,setAudienceSelectionData:j,currentPage:t})=>{const y=async(m,p)=>{await q(m,p,"redirect",x,j,t)&&p.audienceTypeId===$&&(g(n.financialProfessionalAffirmation),l(!0),b(!0))},c=async(m,p)=>{O(m)||y(m,p)};if(o)return e.jsx(e.Fragment,{children:e.jsxs("div",{className:"audience-selector-global-splash-container",children:[i&&e.jsx("span",{className:"audience-selector-global-splash-intro text-body-sm",dangerouslySetInnerHTML:{__html:P(i)}}),e.jsx(G,{currentPage:t,audienceTypes:o.sectionAudienceType,eventHandler:c})]})})},ye=()=>{const o="light-theme-teal",i="global-splash",g=a.useRef(null),[l,b]=a.useState(window.innerWidth<=S.SM),[x,j]=a.useState(window.innerWidth<=S.XS),[t,y]=a.useState(null),[c,m]=a.useState(null),[p,h]=a.useState(null),[M,A]=a.useState(null),[s,r]=a.useState(n.initialStep),[N,C]=a.useState(!1),[f,d]=a.useState(!1),D=a.useMemo(()=>t?`url("${l?t.smallBackgroundImageUrl:t.largeBackgroundImageUrl}")`:void 0,[t,l]);a.useEffect(()=>{const u=()=>{b(window.innerWidth<=S.SM),j(window.innerWidth<=S.XS)};return window.addEventListener("resize",u),()=>{window.removeEventListener("resize",u)}},[]),a.useEffect(()=>{k("splashPageModal").then(u=>{u.status==="success"&&(y(u.data),h(u.data))})},[]),a.useEffect(()=>{s===n.initialStep&&d(!1),s===n.initialStep||s===n.countrySelection?C(!0):s!==n.financialProfessionalAffirmation&&C(!1)},[s,f]);const E=e.jsxs(e.Fragment,{children:[c?.regions&&s===n.countrySelection&&e.jsx(U,{currentPage:i,setStep:r,hasCloseButton:!0,isMobile:l,countryListData:c,setAudienceTypesData:h,cameFromInitialStep:N,setIsModalOpen:d,audienceSortTheme:o}),p&&s===n.audienceTypeSelection&&e.jsx(X,{currentPage:i,audienceSortTheme:o,isMobile:l,audienceTypesData:p,countryListData:c,setStep:r,setAudienceSelectionData:A}),s===n.financialProfessionalAffirmation&&e.jsx(B,{hasCloseButton:!0,audienceSortTheme:o,audienceSelectionData:M,setStep:r,cameFromInitialStep:N,currentPage:i,setIsModalOpen:d})]}),H=e.jsxs(e.Fragment,{children:[s===n.audienceTypeSelection&&e.jsx(z,{currentPage:i,audienceSortTheme:o,isMobile:l,audienceTypesData:p,countryListData:c,setStep:r,setAudienceSelectionData:A,hasCloseButton:!0}),s===n.countrySelection&&e.jsx(_,{currentPage:i,countryListData:c,hasCloseButton:!0,setStep:r,setAudienceTypesData:h,audienceSortTheme:o}),s===n.financialProfessionalAffirmation&&e.jsx(R,{audienceSelectionData:M,currentPage:i,hasHeader:!0,hasCloseButton:!0,setStep:r,cameFromInitialStep:N,audienceSortTheme:o})]}),L=async u=>{c||await J(u,t,m),r("display-country-selection"),d(!0)},{preppedNavNotifications:w,preppedBodyNotifications:v}=K();return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"public-global-splash light-theme","data-qa":"public-global-splash",children:[w?e.jsx(I,{skipSorting:!0,bannersData:w}):null,e.jsx(F,{globalSplashProps:{initialData:t,setCountryListData:m,setStep:r,navbarRef:g,setIsModalOpen:d,countryListData:c}}),v?e.jsx(I,{skipSorting:!0,bannersData:v}):null,e.jsx("div",{className:"public-global-splash-content",style:{backgroundImage:D},children:t&&e.jsxs("div",{className:"public-global-splash-content-wrapper",children:[x&&e.jsx(W,{countryName:t.countryName,locationChangeText:t.locationChangeText,eventHandler:L}),e.jsxs("div",{className:"public-global-splash-left",children:[e.jsx("div",{className:"accent-bar"}),e.jsx("div",{className:"public-global-splash-welcome",children:e.jsx("span",{className:"public-global-splash-greeting text-title-sm-regional",dangerouslySetInnerHTML:{__html:P(t.greeting)}})})]}),e.jsx("div",{className:"public-global-splash-right",children:e.jsx(Q,{initialData:t,introduction:t.introduction,setStep:r,setIsModalOpen:d,setCameFromInitialStep:C,audienceTypesData:t,setAudienceSelectionData:A,currentPage:i,step:s})})]})})]}),!l&&f&&e.jsx(T,{theme:o,currentPage:i,currentStep:s,setStep:r,isModalOpen:f,setIsModalOpen:d,isMobile:l,className:"audience-sort-modal",children:E}),l&&f&&s!==n.initialStep&&e.jsx(T,{theme:o,currentPage:i,currentStep:s,setStep:r,isModalOpen:f,setIsModalOpen:d,isMobile:l,isWide:!1,className:"public-global-splash-mobile-modal",children:H})]})};export{ye as default}; 2//# sourceMappingURL=GlobalSplash-CiksicRW-chunk.js.map
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.