!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i=(new e.Error).stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="7cdd7843-cd71-4743-8e8f-645cb2623dff",e._sentryDebugIdIdentifier="sentry-dbid-7cdd7843-cd71-4743-8e8f-645cb2623dff")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6463],{66818:function(e,i,n){"use strict";n.r(i),n.d(i,{__N_SSP:function(){return V},default:function(){return Y}});var t=n(49120),o=n(77780),a=n(77879),s=n(57055),r=n(12968),d=n(38949),l=n(82731),c=n(27851),m=n(75803),h=n(29278),g=n(51312),u=n(17550),p=n(76116);const f=l.ZP.div.withConfig({componentId:"sc-wiivdj-0"})(["&:nth-child(even){background-color:var(--theme-color-lightGray4);}&:nth-child(odd){background-color:var(--theme-color-white);}"]),b=(0,l.ZP)(g.Z).withConfig({componentId:"sc-wiivdj-1"})(["transform:translateY(50%);"]),x=(0,l.ZP)(c.H).withConfig({componentId:"sc-wiivdj-2"})(["margin-top:var(--theme-spacing-16);margin-bottom:var(--theme-spacing-16);","{margin-top:var(--theme-spacing-24);margin-bottom:var(--theme-spacing-24);margin-left:var(--theme-spacing-16);}"],(e=>{let{theme:i}=e;return i.mediaQuery.tablet})),w=(0,l.ZP)(u.Z).withConfig({componentId:"sc-wiivdj-3"})(["img{border-radius:var(--border-radius);}"]),v=l.ZP.div.withConfig({componentId:"sc-wiivdj-4"})(["width:100%;"]),j=l.ZP.div.withConfig({componentId:"sc-wiivdj-5"})(["border:1px solid var(--theme-colors-ui-line);border-radius:var(--border-radius);padding:var(--theme-spacing-40);display:flex;flex-direction:column;gap:var(--theme-spacing-20);align-items:center;margin-top:var(--theme-spacing-16);margin-bottom:var(--theme-spacing-16);background-color:var(--theme-color-white);position:relative;&::after{content:'';display:block;position:absolute;top:0;left:0;width:100%;height:100%;box-shadow:0 4px 18px 0 rgba(0,0,0,0.2);border-radius:var(--border-radius);opacity:0;transition:opacity 0.3s ease-in-out;pointer-events:none;}&:hover{&::after{opacity:1;}}","{gap:var(--theme-spacing-40);flex-direction:row;justify-content:center;}"],(e=>{let{theme:i}=e;return i.mediaQuery.tablet})),y=(0,l.ZP)(m.I).withConfig({componentId:"sc-wiivdj-6"})(["min-width:80px;width:80px;height:80px;"]),k=l.ZP.div.withConfig({componentId:"sc-wiivdj-7"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;","{text-align:left;}"],(e=>{let{theme:i}=e;return i.mediaQuery.tablet})),I=(0,l.ZP)(c.H).withConfig({componentId:"sc-wiivdj-8"})(["width:100%;"]),P=l.ZP.div.withConfig({componentId:"sc-wiivdj-9"})(["display:flex;flex-direction:column;box-shadow:0 4px 16px 0 rgba(0,0,0,0.1);border-radius:var(--border-radius);padding:var(--theme-spacing-32);position:relative;&::after{content:'';display:block;position:absolute;top:0;left:0;width:100%;height:100%;box-shadow:0 6px 20px 0 rgba(0,0,0,0.3);border-radius:var(--border-radius);opacity:0;transition:opacity 0.3s ease-in-out;pointer-events:none;}&:hover{&::after{opacity:1;}}"]),C=(0,l.ZP)(c.H).withConfig({componentId:"sc-wiivdj-10"})(["display:none;","{display:block;margin-bottom:var(--theme-spacing-32);order:0;}"],(e=>{let{theme:i}=e;return i.mediaQuery.tablet})),Z=(0,l.ZP)(C).withConfig({componentId:"sc-wiivdj-11"})(["display:block;margin-bottom:var(--theme-spacing-16);margin-top:var(--theme-spacing-16);","{display:none;}"],(e=>{let{theme:i}=e;return i.mediaQuery.tablet})),_=l.ZP.div.withConfig({componentId:"sc-wiivdj-12"})(["display:flex;flex-direction:column;","{flex-direction:row;gap:var(--theme-spacing-20);}"],(e=>{let{theme:i}=e;return i.mediaQuery.tablet})),T=(0,l.ZP)(m.I).withConfig({componentId:"sc-wiivdj-13"})(["order:0;width:100%;border-radius:var(--border-radius);overflow:hidden;","{order:1;width:58%;min-width:58%;}"],(e=>{let{theme:i}=e;return i.mediaQuery.tablet})),L=l.ZP.div.withConfig({componentId:"sc-wiivdj-14"})(["order:2;","{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;}"],(e=>{let{theme:i}=e;return i.mediaQuery.tablet})),S=l.ZP.div.withConfig({componentId:"sc-wiivdj-15"})(["width:100%;margin-top:",";"],(e=>{let{theme:i}=e;return i.spacing[24]})),E=(0,l.ZP)(p.Z).withConfig({componentId:"sc-wiivdj-16"})(["a{color:var(--theme-color-white);span{border-bottom-color:var(--theme-color-white);}}"]),N=(0,l.ZP)(u.Z).withConfig({componentId:"sc-wiivdj-17"})(["> div{max-width:93rem;}p:not(:has(a)){min-height:0;margin:0;}"]),$=(0,l.ZP)(p.Z).withConfig({componentId:"sc-wiivdj-18"})(["line-height:1.35;font-size:var(--theme-font-size-h1LMobile);","{font-size:var(--theme-font-size-h1LDesktop);}"],(e=>{let{theme:i}=e;return i.mediaQuery.tabletSmall})),H=(0,l.ZP)(h.B).withConfig({componentId:"sc-wiivdj-19"})(["min-width:340px;"]),M=(0,l.ZP)(h.B).withConfig({componentId:"sc-wiivdj-20"})(["min-width:300px;"]),O=(0,l.ZP)(r.N).withConfig({componentId:"sc-wiivdj-21"})(["",""],(e=>{let{$isSuccess:i}=e;return i&&"background-color: #F0FBEA;"}));var D=n(13610),Q=n(2784),F=n(79149),B=n(98087),z=n(76454),A=n(83533),q=n(53023),W=n(52322);const X="8181c210f019c1b0",G="6ba340fa83027279",K=e=>{let{module:i,ctaOnClickHandler:n=(()=>{}),linkTarget:t="_blank",ctaTarget:o="_blank"}=e;return(0,W.jsxs)("div",{children:[(0,W.jsx)(x,{variant:"h2",children:i?.heading}),(0,W.jsx)(w,{content:{assetPath:i.asset.primary.assetPath,description:i.body,cta:{url:i.cta.url,label:i.cta.label},assetPathAlt:i?.asset?.alt},reverseContent:!0,noScrim:!0,ctaOnClickHandler:n,linkTarget:t,ctaTarget:o})]})};var V=!0,Y=function(e){let{page:i}=e;const{modules:n}=i.content,{trackCtaClick:l}=(0,D.useAnalytics)(),c=(0,D.useAccounts)(),{data:m,loading:h}=(0,D.useCustomer)(),g=(0,A.Z)(A.o.DESKTOP),{0:u,1:p}=(0,Q.useState)(null),{0:x,1:w}=(0,Q.useState)(null),V=(0,Q.useMemo)((()=>({goldSuccess:{type:"success",message:n[6]?.richText},platinumSuccess:{type:"success",message:n[7]?.richText},unqualified:{type:"error",message:n[8]?.richText},promotionEnded:{type:"warning",message:n[12]?.richText}})),[n]),Y=(0,Q.useMemo)((()=>m?(0,F.xs)(m?.birthday,13):null),[m]),J=(0,Q.useMemo)((()=>!1===(0,F.A0)(m)),[m]),{data:R,loading:U}=(0,B.aM)(z.o$.rs,{missionId:X},{authenticated:!0,errorPolicy:"all",skip:!c?.isLoggedIn}),[ee,ie]=(0,B.Db)(z.P$.CQ,{missionId:X},{authenticated:!0,errorPolicy:"all"});(0,Q.useEffect)((()=>{n?.[11]?.hide?p(V.promotionEnded):c?.isLoggedIn&&"COMPLETED"===R?.customer?.account?.missionStatus?.state&&p(V.goldSuccess)}),[R,V,n,c]);const{data:ne,loading:te}=(0,B.aM)(z.o$.rs,{missionId:G},{authenticated:!0,errorPolicy:"all",skip:!c?.isLoggedIn}),[oe,ae]=(0,B.Db)(z.P$.CQ,{missionId:G},{authenticated:!0,errorPolicy:"all"});(0,Q.useEffect)((()=>{c?.isLoggedIn&&"COMPLETED"===ne?.customer?.account?.missionStatus?.state&&w(V.platinumSuccess)}),[ne,V,n,c]),(0,Q.useEffect)((()=>{J&&(p(V.unqualified),w(V.unqualified)),Y&&p(V.unqualified)}),[Y,V,J,p,w]);const se=(0,Q.useCallback)((()=>{c?.isLoggedIn?(l("family-membership-platinum-points-cta","family membership promotion page"),oe()):(l("family-membership-platinum-points-cta-login","family membership promotion page"),c?.promptLogin())}),[c,oe,l]),re=(0,Q.useCallback)((()=>{c?.isLoggedIn?(l("family-membership-gold-points-cta","family membership promotion page"),ee()):(l("family-membership-gold-points-cta-login","family membership promotion page"),c?.promptLogin())}),[c,ee,l]),de=(0,Q.useCallback)((()=>{l("family-membership-multiplayer-games-sale-cta","family membership promotion page")}),[l]);(0,Q.useEffect)((()=>(ie?.loading||!ie?.called||p(ie?.error?{type:"error",message:ie?.error?.message}:V.goldSuccess),()=>{})),[ie?.error,ie?.called,ie?.loading,V]),(0,Q.useEffect)((()=>(ae?.loading||!ae?.called||w(ae?.error?{type:"error",message:ae?.error?.message}:V.platinumSuccess),()=>{})),[ae?.error,ae?.called,ae?.loading,V]);const le=(0,Q.useMemo)((()=>(0,W.jsxs)(W.Fragment,{children:[!u&&(0,W.jsx)(M,{onClick:re,isLoading:m?.loading||h||ie?.loading||c?.isLoggedIn&&U,children:c?.isLoggedIn?n[0]?.modules[0]?.cta?.label:n[0]?.modules[1]?.label}),u&&(0,W.jsx)(O,{$isSuccess:"success"===u?.type,type:u?.type,children:(0,W.jsx)(d.Ho,{linkTarget:"_blank",data:u?.message})})]})),[n,ie,u,m,h,c?.isLoggedIn,U,re]);return(0,W.jsx)(W.Fragment,{children:(0,W.jsxs)(q.Z,{hideLowerNav:!0,children:[(0,W.jsx)(d.$0,{background:t.d.color.primary,children:(0,W.jsxs)(N,{variant:"light",small:!0,asset:n[10]?.modules[0]?.asset,gap:g?"3rem":null,alignImageMobile:"bottom",contentWrapperPadding:"1rem",children:[(0,W.jsx)($,{linkTarget:"_blank",data:n[10]?.modules[1]?.richText}),(0,W.jsx)(E,{linkTarget:"_blank",data:n[10]?.modules[0]?.body})]})}),!n[0]?.hide&&(0,W.jsx)(d.$0,{constrained:!0,constrainedMaxWidth:"93rem",children:(0,W.jsxs)(P,{children:[(0,W.jsx)(C,{variant:"h2",children:n[0]?.modules[0]?.heading}),(0,W.jsxs)(_,{children:[(0,W.jsx)(T,{assetPath:n[0]?.modules[0]?.asset.primary.assetPath,alt:""}),(0,W.jsxs)(L,{children:[(0,W.jsx)(Z,{variant:"h2",children:n[0]?.modules[0]?.heading}),(0,W.jsx)(d.Ho,{linkTarget:"_blank",data:n[0]?.modules[0]?.body}),le]})]})]})}),!n[1]?.hide&&(0,W.jsxs)(f,{children:[(0,W.jsx)(d.$0,{constrained:!0,children:(0,W.jsx)(K,{module:n[1]?.modules[0],linkTarget:"_blank"})}),(0,W.jsx)(b,{showFancyBorder:!1,icon:o.Z})]}),!n[2]?.hide&&(0,W.jsxs)(f,{children:[(0,W.jsx)(d.$0,{constrained:!0,children:(0,W.jsx)(K,{module:n[2]?.modules[0],ctaOnClickHandler:de,linkTarget:"_blank"})}),(0,W.jsx)(b,{showFancyBorder:!1,icon:a.Z})]}),!n[3]?.hide&&(0,W.jsxs)(f,{children:[(0,W.jsx)(d.$0,{constrained:!0,children:(0,W.jsx)(K,{module:n[3]?.modules[0],linkTarget:"_blank",ctaTarget:"_blank"})}),(0,W.jsx)(b,{showFancyBorder:!1,icon:s.Z})]}),!n[4]?.hide&&(0,W.jsxs)(f,{children:[(0,W.jsx)(d.$0,{constrained:!0,children:(0,W.jsx)(K,{module:n[4]?.modules[0],linkTarget:"_blank"})}),(0,W.jsx)(b,{showFancyBorder:!1,icon:s.Z})]}),!n[5]?.hide&&(0,W.jsx)(f,{children:(0,W.jsxs)(d.$0,{constrained:!0,children:[(0,W.jsxs)(v,{children:[(0,W.jsxs)(j,{children:[(0,W.jsx)(y,{assetPath:n[5]?.modules[0]?.asset.primary.assetPath,alt:""}),(0,W.jsxs)(k,{children:[(0,W.jsx)(I,{variant:"h2",children:n[5]?.modules[0]?.heading}),(0,W.jsx)(d.Ho,{linkTarget:"_blank",data:n[5]?.modules[0]?.body})]}),!x&&(0,W.jsx)(H,{isLoading:m?.loading||h||ae?.loading||c?.isLoggedIn&&te,onClick:se,children:c?.isLoggedIn?n[5]?.modules[0]?.cta?.label:n[5]?.modules[1]?.label})]}),x&&(0,W.jsx)(r.N,{type:x?.type,children:(0,W.jsx)(d.Ho,{linkTarget:"_blank",data:x?.message})})]}),(0,W.jsx)(S,{id:"family-membership-legal-disclaimer",children:(0,W.jsx)(d.Ho,{linkTarget:"_blank",data:n[9]?.richText,textVariant:"legal"})})]})})]})})}},53023:function(e,i,n){"use strict";n(2784);var t=n(16250),o=n(27851),a=n(13610),s=n(38949),r=n(83290),d=n(52322);i.Z=e=>{let{children:i,legalFooterData:n,heading:l,hideLowerNav:c=!1}=e;const{text:m}=(0,a.useLocalizer)(),h=[{title:m("Overview"),url:"/switch/online",icon:(0,d.jsx)(t.Z,{size:16})},{title:m("Nintendo Switch Online"),url:"/online/nintendo-switch-online"},{title:m("Nintendo Switch Online + Expansion Pack"),url:"/online/nintendo-switch-online/expansion-pack"},{title:m("Special Offers"),url:"/online/nintendo-switch-online/special-offers"},{title:m("Nintendo Classics"),url:"/online/nintendo-switch-online/classic-games"},{title:m("Nintendo Music"),url:"/online/nintendo-switch-online/nintendo-music"}];return(0,d.jsxs)(d.Fragment,{children:[l&&(0,d.jsx)(r.S,{as:"h1",children:l}),(0,d.jsx)(s.ES,{navItems:h}),l?(0,d.jsx)(o.H.NewLevel,{children:i}):i,!c&&(0,d.jsx)(s.ES,{navItems:h}),n&&(0,d.jsx)(s.$0,{small:!0,constrained:!0,children:(0,d.jsx)(s.Ho,{data:n})})]})}},95732:function(e,i,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/online/nintendo-switch-online/family-membership",function(){return n(66818)}])}},function(e){e.O(0,[9774,2888,179],(function(){return i=95732,e(e.s=i);var i}));var i=e.O();_N_E=i}]); //# sourceMappingURL=family-membership-99c80c4988391012.js.map