!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8d173e6d-c863-429c-9370-a718427f4872",e._sentryDebugIdIdentifier="sentry-dbid-8d173e6d-c863-429c-9370-a718427f4872")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8213],{98182:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return ue},default:function(){return he}});var r=n(2784),i=n(82091),s=n(16519),a=n(97224),o=n(18459),l=n(76360),c=n(82731);const d=c.default.div.withConfig({componentId:"sc-jehdzo-0"})(["align-items:center;display:grid;grid-template-columns:120px auto;grid-template-rows:1fr auto auto;row-gap:",";column-gap:",";padding-top:",";padding-bottom:",";border-bottom:1px solid ",";","{grid-template-columns:140px 6fr 1fr 2fr auto;grid-template-rows:auto;}"],(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.color.lightGray3}),(e=>{let{theme:t}=e;return t.mediaQuery.tablet})),u=(0,c.default)(l.S).withConfig({componentId:"sc-jehdzo-1"})(["border-radius:var(--border-radius);overflow:hidden;&,& > div{width:120px;height:120px;}","{&,& > div{width:140px;height:140px;}}"],(e=>{let{theme:t}=e;return t.mediaQuery.tablet})),h=(0,c.default)(l.S).attrs({type:"icon"}).withConfig({componentId:"sc-jehdzo-2"})(["grid-column:2 / 3;justify-self:flex-end;width:auto;","{grid-column:auto;order:3;}"],(e=>{let{theme:t}=e;return t.mediaQuery.tablet})),p=(0,c.default)(l.S).attrs({size:"h3"}).withConfig({componentId:"sc-jehdzo-3"})(["grid-column:1 / 3;","{grid-column:auto;order:2;}"],(e=>{let{theme:t}=e;return t.mediaQuery.tablet})),m=c.default.div.withConfig({componentId:"sc-jehdzo-4"})(["height:",";","{height:0;}"],(e=>{let{theme:t}=e;return t.spacing[64]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktopLarge}));var g=n(52322);const f=()=>(0,g.jsxs)(d,{children:[(0,g.jsx)(u,{type:"image"}),(0,g.jsx)(l.S,{size:"caption",width:"75%"}),(0,g.jsx)(l.S,{size:"caption"}),(0,g.jsx)(h,{}),(0,g.jsx)(p,{})]});var y=()=>{const e=new Array(3).fill(null);return(0,g.jsxs)(o.He,{small:!0,children:[(0,g.jsx)(m,{}),e.map(((e,t)=>(0,g.jsx)(f,{},`loading-wishlist-items-${t}`)))]})},b=n(82974),x=n(29011);const j=c.default.div.withConfig({componentId:"sc-1wlgwfm-0"})(["width:100%;height:50vh;display:flex;align-items:center;justify-content:center;"]);c.default.div.withConfig({componentId:"sc-1wlgwfm-1"})(["height:",";","{height:0;}"],(e=>{let{theme:t}=e;return t.spacing[64]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktopLarge}));var w=n(19803);var v=()=>(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(w.Z,{}),(0,g.jsxs)(o.He,{children:[(0,g.jsx)(j,{children:(0,g.jsx)(b.L,{color:x.d.color.primary})}),(0,g.jsx)(G,{})]})]}),k=n(4592),P=n(1505),O=n(25681),S=n(4431),C=n(47367),L=n(96026);const I=c.default.div.withConfig({componentId:"sc-ayuuc7-0"})(["align-items:center;display:flex;flex-direction:row;gap:",";"],(e=>e.theme.spacing[16])),M=c.default.ul.withConfig({componentId:"sc-ayuuc7-1"})(["list-style:none;margin:0;padding:0;"]),E=c.default.div.withConfig({componentId:"sc-ayuuc7-2"})(["display:flex;justify-content:center;margin:"," 0;"],(e=>{let{theme:t}=e;return t.spacing[32]})),z=c.default.div.withConfig({componentId:"sc-ayuuc7-3"})(["display:flex;justify-content:center;margin-top:0;margin-bottom:1rem;button{width:100%;}","{button{width:auto;}justify-content:flex-end;}","{margin-top:-4rem;}"],(e=>{let{theme:t}=e;return t.mediaQuery.tablet}),(e=>{let{theme:t}=e;return t.mediaQuery.desktopLarge}));var D=e=>{let{loading:t,loadMore:n,hasMore:s,removeEntry:a,entries:l}=e;const{text:c}=(0,i.useLocalizer)(),d=(0,i.useMaintenance)(),u=t||s,h=(0,r.useMemo)((()=>l.map((e=>(0,g.jsx)(o._j,{removeEntry:a,entry:e,buttonDisabled:d?.eshop?.active,showWishlistHeart:!0,showCap:(0,L.BZ)(e.product)},`${e.category}:${e.id}`)))),[l,a,d?.eshop?.active]);return l.length>0?(0,g.jsxs)(o.He,{small:!0,children:[(0,g.jsx)(z,{children:(0,g.jsx)(re,{entries:l})}),(0,g.jsx)(M,{children:h}),u&&(0,g.jsx)(E,{children:(0,g.jsx)(k.B,{icon:P.Z,isLoading:t,disabled:t,variant:"tertiary",onClick:n,children:c("Load more")})}),(0,g.jsx)(O.S,{size:80})]}):t?(0,g.jsx)(y,{}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(o.$0,{as:"div",background:e=>e.theme.color.lightGray3,constrained:!0,children:(0,g.jsxs)(I,{children:[(0,g.jsx)(S.Z,{size:64}),(0,g.jsx)(C.H,{variant:"h1",as:"h2",children:c("Nothing's been added to your Wish List yet.")})]})}),(0,g.jsx)(o.$0,{as:"div",constrained:!0,children:(0,g.jsx)(G,{})})]})},F=n(95235);const T=c.default.div.withConfig({componentId:"sc-1l2kiqm-0"})(["align-items:center;display:flex;flex-direction:row;gap:",";"],(e=>e.theme.spacing[16]));var Z=n(84553),$=n(36734);function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function N(e){for(var t=1;t{let{entries:t,removeEntry:n}=e;const{text:s}=(0,i.useLocalizer)(),a=(0,r.useMemo)((()=>(t||[]).map((e=>N(N({},(0,L.uF)(e.product)),{},{wishlistRemove:n})))),[t,n]);return t.length>0?(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(Z.Z,{breadcrumbLinks:[{href:"/",title:"Home"},{href:"/wish-list/",title:"Wish List"}],page:{marketingPage:{templateName:"wishlist",entries:t},merchandisedGrid:[a]},filterSections:$.ys,sortByOptions:$.K,analytics:{pageName:"Wishlist"},cmsProductPageSize:20})}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(w.Z,{}),(0,g.jsx)(o.$0,{as:"div",background:e=>e.theme.color.lightGray3,constrained:!0,children:(0,g.jsxs)(T,{children:[(0,g.jsx)(S.Z,{size:64}),(0,g.jsx)(C.H,{variant:"h1",as:"h2",children:s("Nothing's been added to your Wish List yet.")})]})}),(0,g.jsx)(o.$0,{as:"div",constrained:!0,children:(0,g.jsx)(G,{})})]})},H=n(10254),B=n(75555);const R=c.default.div.withConfig({componentId:"sc-s394gk-0"})(["display:flex;flex-direction:column;padding:",";border:1px solid ",";border-radius:",";","{align-items:center;flex-direction:row;}"],(e=>e.theme.spacing[32]),(e=>e.theme.color.primary),(e=>e.theme.spacing[8]),(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),A=c.default.div.withConfig({componentId:"sc-s394gk-1"})(["justify-content:center;display:flex;flex-direction:row;gap:",";flex:0 0 auto;margin-top:",";padding:"," 0 0;border-top:1px solid ",";","{align-items:center;margin-top:0;margin-left:",";padding-right:0;padding-bottom:",";padding-left:",";border-top:0;border-left:1px solid ",";}"],(e=>e.theme.spacing[16]),(e=>e.theme.spacing[16]),(e=>e.theme.spacing[16]),(e=>e.theme.color.lightGray2),(e=>{let{theme:t}=e;return t.mediaQuery.desktop}),(e=>e.theme.spacing[16]),(e=>e.theme.spacing[16]),(e=>e.theme.spacing[16]),(e=>e.theme.color.lightGray2)),q=(0,c.default)(B.W).withConfig({componentId:"sc-s394gk-2"})(["display:inline-block;",";"],(e=>e.small&&(0,c.css)(["font-size:0.6em;"])));var G=()=>{const{0:e,1:t}=(0,r.useState)(!1),{text:n}=(0,i.useLocalizer)(),s=()=>t(!e);return(0,g.jsxs)(R,{children:[(0,g.jsxs)(H.T,{variant:"body",children:[n("You can save games and other products you like by clicking the")," ",(0,g.jsx)(q,{small:!0,iconOnly:!0,isAdded:e,lang:"en",onClick:s}),"."," ",n("It\u2019s a handy way to keep track of items you\u2019re interested in. We\u2019ll even let you know when one of your Wish List items goes on sale.")]}),(0,g.jsxs)(A,{children:[(0,g.jsx)(H.T,{variant:"title",children:n("Give it a try:")}),(0,g.jsx)(q,{iconOnly:!0,isAdded:e,lang:"en",onClick:s})]})]})},Q=n(64897),V=n(30464),U=n(1077),Y=n(99140),K=n(83533),X=n(48112);const J=c.default.h3.withConfig({componentId:"sc-14hwjov-0"})(["background:",";color:",";padding:",";text-align:center;width:100%;margin:0;"],(e=>{let{theme:t}=e;return t.color.primary}),(e=>{let{theme:t}=e;return t.color.white}),(e=>{let{theme:t}=e;return t.spacing[16]})),ee=c.default.div.withConfig({componentId:"sc-14hwjov-1"})(["display:grid;justify-content:center;justify-items:center;align-items:center;grid-gap:1rem;padding:1rem;grid-template-columns:1fr;max-width:500px;p{margin:0;}"]),te=c.default.p.withConfig({componentId:"sc-14hwjov-2"})(["text-align:center;"]),ne=(0,c.default)(X.I).withConfig({componentId:"sc-14hwjov-3"})(["input,label{font-weight:300;}"]);var re=e=>{let{entries:t}=e;const n=(0,K.Z)(K.o.TABLET),{text:s}=(0,i.useLocalizer)(),{locale:a}=(0,Q.Z)(),o=t?.slice(0,100).map((e=>e.product?.sku||e.id)).join(","),l=new Date,{0:c,1:d}=(0,r.useState)(!1),{0:u,1:h}=(0,r.useState)(!1),{0:p,1:m}=(0,r.useState)("Copy link"),f=(0,L.mt)(a),y=`${`${Y.$e.replace(/\/$/,"")}/${f}`}/wish-list/share/#skus=${o}&date=${Date.parse(l)}`,b=()=>{h(!1),d((e=>!e))};return(0,r.useEffect)((()=>{navigator.share&&!n?m(s("Share")):m(s(u?"Copied!":"Copy"))}),[u,s,n]),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(k.B,{icon:V.Z,onClick:b,variant:"tertiary",children:s("Share Wish List")}),(0,g.jsxs)(U.M,{dialogLabel:s("Share Wish List"),visible:c,onClose:b,children:[(0,g.jsx)(J,{children:s("Share Wish List")}),(0,g.jsxs)(ee,{children:[(0,g.jsx)(V.Z,{size:48}),(0,g.jsx)(te,{children:s("Share a snapshot of your current Wish List with friends and family!")}),(0,g.jsx)(ne,{buttonText:p,label:s("Share link"),placeholder:"https://nintendo.com/wish-list/[id's]",value:y,onClick:()=>{navigator.share&&!n?navigator.share({title:s("Check out a snapshot of my Wish List at the My Nintendo Store!"),text:s("Check out a snapshot of my Wish List at the My Nintendo Store!"),url:y}).catch((e=>{console.error("Unable to share",e)})):(h(!0),navigator.clipboard.writeText(y))},disabled:u,readOnly:!0})]})]})]})};n(48739);function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function se(e){for(var t=1;t{let{type:n,payload:r}=t;if(n===ae){if(e.isLoadingMore||e.isRemovingItem){const t=new Set(e.entries.map((e=>{let{category:t,id:n}=e;return`${t}:${n}`}))),n=r.filter((e=>{let{category:n,id:r,product:i}=e;return!t.has(`${n}:${r}`)&&i}));return se(se({},e),{},{entries:[...e.entries,...n],isLoadingMore:!1,isRemovingItem:!1})}return se(se({},e),{},{entries:[...r]})}return n===oe?se(se({},e),{},{isLoadingMore:!0}):n===le?se(se({},e),{},{isRemovingItem:!0}):void 0};var ue=!0;function he(){const{text:e}=(0,i.useLocalizer)(),t=(0,i.useFeature)("w-5718"),n=(0,i.useWishlist)({type:i.WishlistType.PAGED_LIST,includeProductInfo:!0,fields:'\nageGate\navailability\ncategories {\n id\n name\n}\ncolor {\n id\n label\n code\n}\ncontentDescriptors {\n id\n locale\n label\n type\n}\ncontentRating {\n id\n locale\n code\n label\n requiresAgeGate\n system\n order\n highestRating {\n id\n code\n locale\n }\n}\ndemoNsuid\ndlcType {\n id\n code\n label\n}\neshopDetails(personalized: $personalized) {\n isPurchased\n isPurchasable\n isPreordered\n isPreorderable\n purchaseUrl\n discountPriceEnd\n goldPoints\n baseGoldPoints\n goldPointOfferValue\n goldPointOfferType\n}\nexclusive\nisSalableQty\nlocale\nmanufacturer\nname\nnsuid\nplatform {\n id\n code\n label\n}\nfacets {\n accessory\n apparel\n baseColors\n collectible\n collectionPriceRange: priceRange(type: ALL)\n controller\n corePlatforms\n currentSystems\n editions\n franchises\n hardwareType\n homeOffice\n plush\n priceRange\n replacementPart\n topLevelFilters\n toy\n}\nplatinumPoints\nprices(personalized: $personalized) {\n minimum {\n amountOff\n currency\n discounted\n finalPrice\n percentOff\n regularPrice\n }\n}\nproductImage {\n publicId\n resourceType\n type\n}\nproductImageSquare: productImage(shape: "square") {\n url\n}\nreleaseDate\nreleaseDateDisplay\nsize {\n id\n label\n}\nsku\nsoftwarePublisher\ntopLevelCategory {\n id\n code\n label\n}\nurlKey\n'}),{0:l,1:c}=(0,r.useReducer)(de,ce),d=(0,r.useMemo)((()=>(n.entries||[]).filter((e=>{let{product:t}=e;return t}))),[n.entries]),u=l.entries?.length>0?l.entries:d,h=(0,r.useCallback)((e=>{c({type:le}),n.removeEntry(e)}),[n]),p=(0,r.useCallback)((()=>{c({type:oe}),n.loadMoreEntries()}),[n]);(0,r.useEffect)((()=>{c({type:ae,payload:d})}),[d]);const m=u.length>0,f=(0,g.jsx)(o.h5,{title:e("Wish List"),description:e("Explore, purchase, or remove items from your Wish List here. You can also share your current list with friends and family."),small:!0,shortDesc:!0,children:(0,g.jsxs)(s.B,{currentPage:"/address-book/",children:[(0,g.jsx)(a.Z,{href:"/",children:(0,g.jsx)("a",{children:e("Home")})}),(0,g.jsx)(a.Z,{href:"/wish-list/",children:(0,g.jsx)("a",{children:e("Wish List")})})]})});return t.loading?null:n.loading&&!m?(0,g.jsxs)(g.Fragment,{children:[!t.enabled&&f,t.enabled?(0,g.jsx)(v,{}):(0,g.jsx)(y,{})]}):(0,g.jsx)(o.Td,{errorMessage:e("Please log in to your Nintendo Account to view your Wish List."),header:t.enabled?null:f,children:t.enabled?(0,g.jsx)(_,{loading:n.loading,entries:u,removeEntry:h}):(0,g.jsx)(D,{loading:n.loading,loadMore:p,hasMore:n.hasMoreEntries,entries:u,removeEntry:h})})}},84553:function(e,t,n){"use strict";var r=n(82269),i=n(95235),s=n(2784),a=n(5632),o=n.n(a),l=n(82091),c=n(97224),d=n(84443),u=n(46420),h=n(51505),p=n(82732),m=n(47367),g=n(4592),f=n(1505),y=n(16519),b=n(83809),x=n(25681),j=n(9873),w=n(28456),v=n(96026),k=n(41723),P=n(83533),O=n(62156),S=n(18459),C=(n(64629),n(36734)),L=n(99140),I=n(23089),M=n(67243),E=n(402),z=n(49481),D=n(73353),F=n(33831),T=n(52322);const Z=["title","attribute"];function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W(e){for(var t=1;t{let{breadcrumbLinks:t,filterSections:n,lightScrim:i,page:C,pageIcon:$,sortByOptions:_,showRating:H,analytics:B,enableStickyCollectionNav:R,fullBleedHero:A,cmsProductPageSize:q,hiddenFilters:G,scrollToProductsRef:Q,disableDefaultMarketingPageHeading:V}=e;const{pageHeader:U,ctaCollection:Y,merchandisedGrid:K,legalText:X,marketingPage:J}=C||{},ee=J?z[J?.templateName??"plmpStandard"]:null,te=V?s.Fragment:m.H.NewLevel,ne=(0,k.O_)(),{text:re}=(0,l.useLocalizer)(),{trackLoadMoreProducts:ie}=(0,d.u)(),se=(0,a.useRouter)(),{asPath:ae,pathname:oe,query:le}=se,ce=(0,k.D9)(le?.slug),de=(0,l.useFeature)("wdev-1631-horizontal-tiles"),ue=de?.variant?.payload?.value,he=(0,P.Z)(P.o.TABLET_SMALL),pe="horizontal"===ue&&!he,me=(0,l.deserializeHash)(ae),ge=(0,s.useRef)(),{0:fe,1:ye}=(0,s.useState)((()=>_.find((e=>{let{param:t}=e;return t===me.sort}))?.value||_[0].value)),{0:be,1:xe}=(0,s.useState)((()=>parseInt(me.p)||0)),{isFilterModalOpen:je,selectedSortByOption:we,toggleModalFiltersMenu:ve,handleSortByChange:ke}=(0,u.sI)({sortBy:fe,sortByOptions:_,analytics:B,applySortBy:e=>{ye((()=>e))}}),Pe=(0,s.useMemo)((()=>_.map((e=>{let{value:t,label:n}=e;return{value:t,label:re(n)}}))),[_,re]),Oe=(0,s.useMemo)((()=>({value:we.value,label:re(we.label)})),[we,re]),Se=(0,s.useMemo)((()=>n.map((e=>{let{attribute:t}=e;return t}))),[n]),Ce=(K||[]).flat(),Le=(K||[]).flat().filter((e=>{let{sku:t}=e;return Boolean(t)})),{appliedFilters:Ie,appliedFiltersQuery:Me,filteredProducts:Ee,filteredState:ze,refine:De,refineByQuery:Fe,clearFilters:Te}=(0,k.x3)(Le,Se,{operator:k.fP.AND,queryToInitializeFilters:me,hidden:G}),Ze=0===Ie?.length&&we.value===_[0].value,$e=(0,P.Z)(P.o.DESKTOP),We=(0,s.useRef)();We.current=$e;const Ne=Ze?Ce:Ee,_e=(0,s.useMemo)((()=>Ne.slice(0,(q||Ne.length)*(be+1))),[be,Ne,q]),He=_e.lengthfe?[..._e].sort(fe):_e),[_e,fe]),Re=(0,s.useCallback)((()=>{const e=(0,l.deserializeHash)(ae),t=_.find((t=>{let{param:n}=t;return n===e.sort}))?.value||_[0].value;Fe(e),ye((()=>t)),xe(parseInt(e.p)||0)}),[_,ae,Fe]),Ae=(0,s.useCallback)((e=>{const t=_.find((e=>{let{value:t}=e;return t===fe}))?.param||_[0].value;return`#${new URLSearchParams(W(W({},e),{},{sort:t,p:be})).toString()}`}),[_,fe,be]),qe=(0,s.useCallback)((e=>(xe((()=>0)),e)),[]),Ge=(0,s.useCallback)((function(){qe(De)(...arguments)}),[De,qe]),Qe=(0,s.useCallback)((function(){qe(Te)(...arguments)}),[Te,qe]),Ve=(0,s.useCallback)((function(){qe(ke)(...arguments)}),[ke,qe]),Ue=(0,s.useCallback)((()=>{const{pageName:e}=B;ie(e);const t=(0,l.deserializeHash)(),n=be+1;t.p=n,xe((()=>n))}),[be,B,ie]),Ye=(0,s.useMemo)((()=>Ae(Me)),[Me,Ae]),Ke=(0,s.useMemo)((()=>Ie.map((e=>({attribute:e.split(k.HA)[0],label:e.split(k.HA)[1],value:e})))),[Ie]),Xe=(0,s.useMemo)((()=>B?.featureFlag?{featureFlag:B.featureFlag}:{featureFlag:de?.id,featureFlagVariant:ue}),[B,de,ue]),Je=(0,s.useMemo)((()=>n.filter((e=>{let{attribute:t}=e;return ze[t]?.items?.length>0})).map(((e,t)=>{let{title:n,attribute:i}=e,s=(0,r.Z)(e,Z);return(0,T.jsx)(S.vT,W({attribute:i,title:n&&re(n),startCollapsed:0!==t,refine:Ge,items:ze[i]?.items||[],showMoreLabel:re("Show more"),showLessLabel:re("Show less"),collapsible:!0,showMore:!0,analytics:{pageName:B?.pageName}},s),i)}))),[n,ze,Ge,re,B]),et=(0,s.useMemo)((()=>(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(S.en,{$singleColumnMobile:pe,children:Be.map(((e,t)=>e.sku?(0,s.createElement)(w.I8,W(W(W({},Xe),{},{key:e.sku+t},e),{},{constrain:!1,showRating:H||Boolean(se.query[L.Tx.UTM_CODE])||!1,mobileHorizontal:pe,analytics:{listDetails:{id:`clp-${(0,v.GL)(B.pageName)}`,name:B.pageName}}})):(0,T.jsx)(M.Z,{asset:e.asset.primary.assetPath,cta:e.cta,heading:e.heading},e.heading+t)))}),He&&(0,T.jsx)(F.VR,{children:(0,T.jsx)(g.B,{variant:"tertiary",icon:f.Z,onClick:Ue,children:re("Load more")})})]})),[se.query,B,Xe,H,He,Be,pe,Ue,re]);(0,O.Z)({isDesktop:$e,scrollToRef:ge,scrollToElementID:N,enableStickyCollectionNav:R,pillFarm:Y?.list||[]}),(0,s.useEffect)((()=>{o().push({pathname:o().pathname,query:o().query,hash:Ye},null,{shallow:!0}).catch((e=>{if(!e.cancelled)throw e}))}),[Ye]),(0,v.nw)((()=>{Re()})),(0,s.useEffect)((()=>{!0===We.current&&ge.current&&(0,v.n5)(ge.current,{offsetY:R&&D.d})}),[Ie.length,R]),(0,s.useEffect)((()=>{R&&ge.current&&le?.slug!==ce&&(0,v.n5)(ge.current,{offsetY:D.d,behavior:"smooth",onlyScrollIfAbove:!0})}),[R,le?.slug,ce]),(0,s.useEffect)((()=>{const e=le?.slug;Boolean(ce)&&Boolean(e)&&e!==ce&&Re()}),[Re,ce,le?.slug]);const tt=(0,s.useMemo)((()=>t?(0,T.jsx)(y.B,{currentPage:oe,children:t.map(((e,t)=>(0,T.jsx)(c.Z,{href:e.href,children:(0,T.jsx)("a",{children:re(e.title)})},e.title+t)))}):null),[t,re,oe]),nt=(0,s.useMemo)((()=>U?.asset?.primary?.assetPath?A?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(b.F,{heading:U.heading,subtitle:U.description,image:{desktop:{assetPath:U.asset?.primary?.assetPath},mobile:{assetPath:U.asset?.secondary?.assetPath}},pillFarm:Y.list,icon:$}),(0,T.jsx)(S.Hr,{})]}):(0,T.jsx)(S.tm,{iconName:$,content:{assetPath:U.asset?.primary?.assetPath,assetPathAlt:U.asset?.alt,background:U.background,cta:U.cta,description:U.description,heading:U.heading,modifiers:U.modifiers},lightScrim:i}):null),[U,A,$,i,Y]),rt=(0,s.useMemo)((()=>J&&(0,T.jsx)(te,{children:(0,T.jsx)(ee,{marketingPage:J})})),[J,te,ee]);return(0,T.jsxs)(E.Kq,{children:[rt,t&&(0,T.jsx)(S.JL,{children:tt}),nt,(0,T.jsxs)(m.H.NewLevel,{children:[!A&&Y?.list.length>0&&(0,T.jsx)(S.$0,{constrained:!0,small:!0,divider:["bottom"],children:(0,T.jsx)(S.l6,{center:!0,items:Y.list})}),(0,T.jsx)("span",{ref:ge,id:"products","data-drawer-id":N}),(0,T.jsx)("span",{ref:Q}),(0,T.jsx)(x.S,{size:36,axis:"vertical"}),(0,T.jsxs)(S.He,{children:[(0,T.jsxs)(F.zB,{$breadcrumbs:!!t,children:[(0,T.jsx)(h.D,{children:tt}),(0,T.jsx)(p.S,{label:re("Sort by"),onSelect:Ve,options:Pe,dropdownValue:ne?Oe:null}),(0,T.jsx)(h.M,{children:(0,T.jsx)(S.Lb,{icon:j.Z,variant:"tertiary",onClick:ve,children:re("Filter")})})]}),(0,T.jsx)(x.S,{size:32,axis:"vertical"}),(0,T.jsx)(S.dA,{enableStickyFilterPanel:!0,isFilterModalOpen:je,toggleModalFiltersMenu:ve,attributeFilterSets:Je,isDesktop:$e,stickyOffset:R&&parseInt(I.TH)+16,customizeFilters:{clearFilters:Qe,removeFilter:Ge,activeFilters:Ke,totalHits:Ee.length},children:et}),X&&(0,T.jsx)(F.VH,{children:(0,T.jsx)(S.Ho,{data:X,textVariant:"legal"})})]}),(0,T.jsx)(S.y4,{})]})]})};_.defaultProps={sortByOptions:C.Op},t.Z=_},48739:function(e,t,n){"use strict";n.d(t,{Z:function(){return b}});var r=n(2784),i=n(64897),s=n(1077),a=n(30464),o=n(96026),l=n(99140),c=n(83533),d=n(82091),u=n(82731),h=n(48112);const p=u.default.h3.withConfig({componentId:"sc-1x40oq9-0"})(["background:",";color:",";padding:",";text-align:center;width:100%;margin:0;"],(e=>{let{theme:t}=e;return t.color.primary}),(e=>{let{theme:t}=e;return t.color.white}),(e=>{let{theme:t}=e;return t.spacing[16]})),m=u.default.div.withConfig({componentId:"sc-1x40oq9-1"})(["display:grid;justify-content:center;justify-items:center;align-items:center;grid-gap:1rem;padding:1rem;grid-template-columns:1fr;max-width:500px;p{margin:0;}"]),g=u.default.p.withConfig({componentId:"sc-1x40oq9-2"})(["text-align:center;"]),f=(0,u.default)(h.I).withConfig({componentId:"sc-1x40oq9-3"})(["input,label{font-weight:300;}"]);var y=n(52322);var b=e=>{let{entries:t,transitionProp:n,handleTransition:u,copied:h,setCopied:b}=e;const x=(0,c.Z)(c.o.TABLET),{text:j}=(0,d.useLocalizer)(),{locale:w}=(0,i.Z)(),v=t?.slice(0,100).map((e=>e.product?.sku||e.id)).join(","),k=new Date,{0:P,1:O}=(0,r.useState)("Copy link"),S=(0,o.mt)(w),C=`${`${l.$e.replace(/\/$/,"")}/${S}`}/wish-list/share/#skus=${v}&date=${Date.parse(k)}`;return(0,r.useEffect)((()=>{navigator.share&&!x?O(j("Share")):O(j(h?"Copied!":"Copy"))}),[h,j,x]),(0,y.jsxs)(s.M,{dialogLabel:j("Share Wish List"),visible:n,onClose:u,children:[(0,y.jsx)(p,{children:j("Share Wish List")}),(0,y.jsxs)(m,{children:[(0,y.jsx)(a.Z,{size:48}),(0,y.jsx)(g,{children:j("Share a snapshot of your current Wish List with friends and family!")}),(0,y.jsx)(f,{buttonText:P,label:j("Share link"),placeholder:"https://nintendo.com/wish-list/[id's]",value:C,onClick:()=>{navigator.share&&!x?navigator.share({title:j("Check out a snapshot of my Wish List at the My Nintendo Store!"),text:j("Check out a snapshot of my Wish List at the My Nintendo Store!"),url:C}).catch((e=>{console.error("Unable to share",e)})):(b(!0),navigator.clipboard.writeText(C))},disabled:h,readOnly:!0})]})]})}},19803:function(e,t,n){"use strict";var r=n(82091),i=n(83809),s=n(30464),a=n(48739),o=n(2784),l=n(52322);t.Z=e=>{let{entries:t=[]}=e;const{text:n}=(0,r.useLocalizer)(),{0:c,1:d}=(0,o.useState)(!1),{0:u,1:h}=(0,o.useState)(!1),p=()=>{h(!1),d((e=>!e))};return(0,l.jsx)(i.F,{heading:n("Wish List"),subtitle:n("Explore, purchase, or remove items from your Wish List here. You can also share your current list with friends and family."),image:{desktop:{assetPath:"/Marketing/fullbleed-heros/fullbleed-wishlist-desktop"},mobile:{assetPath:"/Marketing/fullbleed-heros/fullbleed-wishlist-tablet"}},edge:"straight",icon:"heart",pillFarm:t.length>0?[{label:"Share Wish List"}]:[],pillProps:{icon:s.Z},onPillClick:p,children:t.length>0&&(0,l.jsx)(a.Z,{entries:t,transitionProp:c,handleTransition:p,copied:u,setCopied:h})})}},88103:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/wish-list",function(){return n(98182)}])}},function(e){e.O(0,[8286,4511,402,5999,9774,2888,179],(function(){return t=88103,e(e.s=t);var t}));var t=e.O();_N_E=t}]); //# sourceMappingURL=wish-list-9c13a3690d8c94b1.js.map