!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]="b9f90917-9029-4660-906c-84b2e568229d",e._sentryDebugIdIdentifier="sentry-dbid-b9f90917-9029-4660-906c-84b2e568229d")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8052],{76780:function(e,t,n){n.d(t,{E:function(){return b},b:function(){return m},s:function(){return h}});var r=n(95235),i=n(82269),o=n(82731),a=n(13610),s=n(49120),c=n(11954),u=n(52322),d=n(34406);const l=["as","pageProps","i18n","className","children"];function p(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 f(e){for(var t=1;t(0,a.iv)(["appearance:none;background:none;border-radius:0;border:none;color:inherit;cursor:pointer;display:inline-block;font-family:inherit;font-size:100%;font:inherit;line-height:1.15;margin:0;padding:0;"]),l=a.ZP.button.withConfig({componentId:"pmp-module__sc-s2evg1-0"})(["",";font:inherit;"],d()),p=a.ZP.div.withConfig({componentId:"pmp-module__sc-s2evg1-1"})(["border-radius:",";overflow:hidden;text-align:center;width:min(90vw,120vh);"],(e=>{let{theme:t}=e;return t.borderRadius}));var f=e=>{let{assetPath:t,posterPath:n,dialogLabel:a,onClick:d,className:f,children:m,hashId:h,assetEntry:g,lang:v="en"}=e;const{setModalOpen:b}=(0,c.c)(),{0:y,1:_}=(0,r.useState)(!1),x=(0,r.useRef)();if(g){const e=(0,c.r)(g);e||console.log('Asset is undefinded, Please check the "assetEntry"'),t=e}const w=(0,r.useCallback)((()=>{d&&d(),_(!0),b(!0)}),[d,b]);return(0,r.useEffect)((()=>{if(!h)return;const{hash:e}=window.location;e===`#${h}`&&(document.getElementById(h)?.scrollIntoView(),setTimeout((()=>{w()}),100))}),[h,w]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l,{ref:x,onClick:w,className:f,children:m}),!u&&(0,s.jsx)(i.M,{visible:y,lang:v,dialogLabel:a,onClose:()=>{_(!1),b(!1)},containChildren:!1,children:(0,s.jsx)(p,{className:"text-center",children:y&&(0,s.jsx)(o.V,{assetPath:t,posterPath:n,lang:v})})})]})}},53280:function(e,t,n){n.d(t,{W:function(){return f}});var r=n(95235),i=n(82269),o=n(17844),a=n(82731),s=n(52322);const c=["children","className"];function u(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 d(e){for(var t=1;t{let{theme:t}=e;return t.pmp.layout.totalWidth})),p=e=>{let{children:t,className:n}=e,r=(0,i.Z)(e,c);return(0,s.jsx)(l,d(d({className:n},r),{},{children:t}))};p.propTypes=d({},o.e);var f=p},5120:function(e,t,n){function r(){const e=navigator.userAgent;return/Safari/.test(e)&&/AppleWebKit/.test(e)&&!/Chrome/.test(e)}n.d(t,{i:function(){return r}})},59e3:function(e,t,n){n.d(t,{r:function(){return o}});var r=n(11954),i=n(34406);function o(e){let{url:t,isVideo:n,mediaWidth:o}=e;if(!t)return"";const a="https://assets.nintendo.com",s=/\.[0-9a-z]+$/i,c=`${a}/image/upload/`,u=o?`,c_scale,w_${o}`:"",d=`${a}/image/upload/f_auto,q_auto${u}/`,l=`${a}/video/upload/f_auto:video,q_auto${u}/`,p=i.env.NEXT_PUBLIC_CLOUDINARY_ROOT_DIRECTORY||"marketing",f=t.toLowerCase().indexOf(p);if(-1===f)return t;const m=t.slice(f).trim();return"true"===i.env.LOCAL_IMAGES||!0===i.env.LOCAL_IMAGES?`${r.S}/${m}`:n?`${l}${m}`:m.endsWith(".svg")?`${c}${m}`:s.test(m)?`${d}${m.replace(s,"")}`:`${d}${m}`}},19569:function(e,t,n){n.d(t,{w:function(){return r}});var r=".marquee{position:relative;white-space:nowrap}@keyframes scroll{0%{transform:translate(0)}to{transform:translate(calc(var(--marquee-width) * -1px))}}.marquee__slide{display:inline-block;width:max-content}.marquee--ready{animation:scroll var(--duration) linear infinite var(--animation-state, running)}.marquee--reverse{animation-direction:reverse}\n"},30553:function(e,t,n){n.d(t,{R:function(){return a}});var r=n(52322),i=n(2784);function o(e=[]){if(!e||!Array.isArray(e)||!e.length)return;const t=[];return e.forEach((e=>{"string"==typeof e&&t.push(e)})),t.flat().join(" ")}function a({speed:e=50,reducedMotionSpeed:t=20,prefersReducedMotion:n=!1,playing:a=!0,reverse:c,children:u,className:d,...l}){const[p,f]=(0,i.useState)(0),[m,h]=(0,i.useState)(0),[g,v]=(0,i.useState)(1),b=(0,i.useRef)(null),y=(0,i.useRef)(null),_=(0,i.useRef)(),x=(0,i.useCallback)((()=>{var r,i;const o=(null==(r=b.current)?void 0:r.clientWidth)||0,a=(null==(i=y.current)?void 0:i.clientWidth)||0,s=n?t:e;let c=2*Math.ceil(o/a)-1;(c<1||isNaN(c))&&(c=1),v(c),f(a),h(a{x();const e=()=>{_.current&&clearTimeout(_.current),_.current=setTimeout(x,200)};window.addEventListener("resize",e);const t=_.current;return()=>{clearTimeout(t),window.removeEventListener("resize",e)}}),[x]),(0,r.jsxs)("div",{...l,ref:b,className:o(["marquee",p>0&&"marquee--ready",c&&"marquee--reverse",d]),style:{"--marquee-width":p,"--duration":m+"s","--animation-state":a?"running":"paused"},children:[(0,r.jsx)("div",{ref:y,className:"marquee__slide",children:u}),(0,r.jsx)(s,{neededAmount:g,children:u})]})}function s({children:e,neededAmount:t}){return(0,r.jsx)(r.Fragment,{children:Array.from({length:t}).map(((t,n)=>(0,r.jsx)("div",{className:"marquee__slide",children:e},n)))})}}}]); //# sourceMappingURL=8052.5bcaf5f9e796a2f2.js.map