PageSourceSearch

https://sportnation.nz/_next/static/chunks/app/(pages)/listen/page-4ea9a827f4825bf5.js

js sportnation.nz collected 2026-09-24 19:46:35 UTC 10,191 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3872],{291:(e,t,a)=>{"use strict";a.d(t,{default:()=>h});var s=a(95155),r=a(12115),i=a(15239),n=a(10936),l=a(2821);let d=e=>{let{tags:t,activeTag:a,onTagButtonClick:r}=e;return(0,s.jsxs)("div",{className:"pb-6 px-6",children:[(0,s.jsx)("h2",{className:"mb-8 typo-heading_mb text-sheet-list-item_text-default",children:"Filter by"}),(0,s.jsx)("div",{className:"rounded-xl overflow-hidden",children:t.map((e,t)=>{let i=e===a;return(0,s.jsx)("div",{className:"border-b",children:(0,s.jsx)("button",{type:"button",className:(0,l.A)("w-full p-6 appearance-none typo-label_ls text-left",{"bg-sheet-list-item_bg-active text-sheet-list-item_text-active":i,"bg-sheet-list-item_bg-default text-sheet-list-item_text-default":!i}),onClick:()=>r(e),children:e})},t)})})]})},o=e=>{let{tags:t,activeTag:a,onTagFilter:l}=e,[o,c]=(0,r.useState)(!1);return(0,s.jsxs)("div",{children:[(0,s.jsxs)("button",{type:"button",className:"typo-label_ms text-text-white gap-x-2 flex items-center",onClick:()=>c(!o),"aria-expanded":o,children:[(0,s.jsx)("span",{children:a}),(0,s.jsx)(i.default,{src:"/arrow-down-white.svg",alt:"arrow icon",width:16,height:16})]}),(0,s.jsx)(n.A,{showBottomSheet:o,setShowBottomSheet:c,onClose:()=>{c(!1)},children:(0,s.jsx)(d,{tags:t,activeTag:a,onTagButtonClick:e=>{l(e),c(!1)}})})]})};var c=a(32837);let u=e=>{let{categories:t,tags:a,activeCategory:r,onCategoryFilter:i,activeTag:n,onTagFilter:l}=e;return(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[t.length>0&&(0,s.jsx)("div",{className:"flex gap-4",children:t.map((e,t)=>(0,s.jsx)(c.$7,{label:e,isActive:r===e,onButtonClick:()=>i(e)},t))}),a.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"hidden md:flex items-center gap-4",children:a.map((e,t)=>(0,s.jsx)(c.$7,{label:e,isActive:n===e,onButtonClick:()=>l(e)},t))}),(0,s.jsx)("div",{className:"md:hidden",children:(0,s.jsx)(o,{tags:a,activeTag:n,onTagFilter:l})})]})]})};var p=a(97881);let g=["Streams","Podcasts"],f=["Featured","Sport Nation","Partners"],h=()=>{let{activeTag:e,setActiveTag:t,listenCategory:a,setListenCategory:i}=(0,p.b)();return(0,r.useEffect)(()=>{i(g[0]),t(f[0])},[]),(0,s.jsx)(u,{activeCategory:a,categories:g,tags:f,activeTag:e,onCategoryFilter:e=>i(e),onTagFilter:e=>t(e)})}},47722:(e,t,a)=>{"use strict";a.d(t,{default:()=>b});var s=a(95155),r=a(12115),i=a(46512),n=a(32837),l=a(51338),d=a(30183),o=a(63897),c=a(97881),u=a(20063),p=a(2821);let g=e=>{let{className:t}=e;return(0,s.jsx)("div",{className:(0,p.A)("animate-backgroundSlide bg-gradient-to-r from-[rgba(219,219,219,0)] from-0% via-[rgba(219,219,219,0.25)] via-50% to-system_bg-tertiary [background-size:_200%_100%] rounded-xl",t)})},f=()=>(0,s.jsx)(g,{className:"w-full h-full"}),h=()=>(0,s.jsx)(g,{className:"w-full h-7 mb-4"}),m=()=>(0,s.jsx)(g,{className:"w-[77px] h-[14px]"}),x=()=>(0,s.jsx)("div",{className:"w-full grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-6 lg:gap-x-8 lg:gap-y-[60px]",children:Array.from({length:12}).map((e,t)=>(0,s.jsxs)("div",{className:"flex md:flex-col gap-6 items-start md:justify-center",children:[(0,s.jsx)("div",{className:"aspect-square shrink-0 grow-0 md:grow w-[104px] md:w-full",children:(0,s.jsx)(f,{})}),(0,s.jsxs)("div",{className:"grow xs:mt-6 md:px-5 md:w-full",children:[(0,s.jsx)(h,{}),(0,s.jsx)(m,{})]})]},t))}),v=e=>{let{featuredPodcasts:t,featuredStreams:a}=e,[p,g]=(0,r.useState)(""),[f,h]=(0,r.useState)(a),[m,v]=(0,r.useState)(!1),{streamState:b,handleClickStream:j,setStreamState:w,listenCategory:S,activeTag:N}=(0,c.b)(),y=S.toLowerCase(),_="podcasts"===y?"podcast":"stream",z=N.toLowerCase(),P="featured"===z,{data:k,isLoading:E}=(0,i.Ay)(p,n.GO),C=(0,r.useRef)(""),M=(0,r.useRef)(""),F=(0,r.useRef)(0),T=(0,r.useRef)(!1),[A,O]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(k&&k.data){var e,t,a;O(!1),T.current=!0;let s="podcast"===_?null==k||null==(e=k.data)?void 0:e.podcasts:null==k||null==(t=k.data)?void 0:t.streams,r=C.current!==_||M.current!==z;h(e=>r?s:[...e,...s]),v(null==(a=k.data.pagination)?void 0:a.hasNext),M.current=z,C.current=_}},[k]);let I=()=>{let e="";
1"sport nation"===z?e="/api/get-sportnation-".concat(y,"?page=").concat(F.current):"partners"===z&&(e="/api/get-partner-".concat(y,"?page=").concat(F.current)),g(e)};(0,r.useEffect)(()=>{if(z){if(F.current=0,T.current=!1,v(!1),"featured"===z){h("podcast"===_?t:a),M.current=z,C.current=_;return}O(!0),I()}},[_,z]),(0,r.useEffect)(()=>{w({...b,wasLoadMoreClicked:!1})},[]);let L=async()=>{F.current++,I(),w({...b,wasLoadMoreClicked:!0})},R=(0,u.usePathname)(),U=(e,t)=>{if((0,o.Sz)(f)){let a=(0,o._g)(f);j(a[e],a,"sport nation"===z?"sn":"partners"===z?"partner":"featured",R,e,void 0,t)}};return A?(0,s.jsx)(x,{}):(0,s.jsx)(s.Fragment,{children:f&&f.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"block md:hidden w-full",children:(0,s.jsx)(l.A,{data:f,type:_,onClick:U,isFlagEnabled:!0})}),(0,s.jsx)("div",{className:"hidden md:block w-full",children:(0,s.jsx)(d.A,{data:f,type:_,onClick:U,isLightText:!0,isFlagEnabled:!0})}),!P&&T.current&&(0,s.jsx)(n.u8,{fetchMore:L,hasNext:m,isLoading:E,color:"green"})]})})};function b(e){let{featuredPodcasts:t,featuredStreams:a}=e;return(0,s.jsx)(v,{featuredPodcasts:t,featuredStreams:a})}},52820:(e,t,a)=>{"use strict";a.d(t,{default:()=>l});var s=a(95155),r=a(12115),i=a(20063),n=a(68321);let l=e=>{let{children:t,pageTargeting:a={}}=e,l=(0,i.usePathname)(),[d,o]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let e=setInterval(()=>{window.googletag&&(clearInterval(e),o(!0))},100);return()=>clearInterval(e)},[]),(0,r.useEffect)(()=>{if(d){let e=window.googletag||{cmd:[]};e.cmd.push(()=>{var t;let s=(null==l||null==(t=l.split("/").pop())?void 0:t.slice(0,39))||"";e.pubads().setTargeting("title",s),Object.entries(a).forEach(t=>{let[a,s]=t;e.pubads().setTargeting(a,s)});let r=e.defineOutOfPageSlot("/23212581813/SportNation/interstitial",e.enums.OutOfPageFormat.INTERSTITIAL);r&&(r.setTargeting("pos","0").setTargeting("format","interstitial").addService(e.pubads()),e.display(r)),e.pubads().setCentering(!0),e.pubads().collapseEmptyDivs(),e.pubads().set("page_url","sportnation.nz"),e.enableServices()})}},[l,a,d]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.default,{strategy:"afterInteractive",src:"https://securepubads.g.doubleclick.net/tag/js/gpt.js"}),t]})}},56538:(e,t,a)=>{Promise.resolve().then(a.bind(a,52820)),Promise.resolve().then(a.bind(a,47722)),Promise.resolve().then(a.bind(a,94207)),Promise.resolve().then(a.bind(a,291))},94207:(e,t,a)=>{"use strict";a.d(t,{default:()=>c});var s=a(95155),r=a(2821),i=a(12115);let n=e=>{let{page:t,isClient:a,adUnitPath:r,sizes:n,sizeMapping:l,targeting:d}=e,o=(0,i.useRef)(null),[c,u]=(0,i.useState)(""),[p,g]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{u("div-gpt-ad-".concat(Math.random().toString(36).substr(2,9)))},[t]),(0,i.useEffect)(()=>{if(a){let e=setInterval(()=>{window.googletag?(clearInterval(e),g(!0)):g(!1)},100);return()=>clearInterval(e)}},[a]),(0,i.useEffect)(()=>{if(""!==c&&window.googletag&&p){let e=window.googletag||{cmd:[]};return e.cmd.push(()=>{var t,a;let s=e.defineSlot(r,n,null==o||null==(t=o.current)?void 0:t.id).addService(e.pubads());if(l){let t=e.sizeMapping();l.forEach(e=>{let[a,s]=e;t.addSize(a,s)}),s.defineSizeMapping(t.build())}Object.entries(d).forEach(e=>{let[t,a]=e;s.setTargeting(t,a)}),e.pubads().enableLazyLoad({fetchMarginPercent:500,renderMarginPercent:25,mobileScaling:2}),e.enableServices(),e.display(null==o||null==(a=o.current)?void 0:a.id)}),()=>{e.cmd.push(()=>{e.destroySlots()})}}},[r,n,l,d,c,p]),(0,s.jsx)("div",{ref:o,id:c,className:"[&>div]:!block [&>div]:!m-auto [&>div>iframe]:!m-auto"})},l={header_pos1:{adUnitPath:"",sizes:[[728,90]],sizeMapping:[[[1188,0],[[970,250],[728,90],[970,90]]],[[768,0],[728,90]],[[0,0],[[320,50],[320,100]]]],targeting:{pos:"1"}},midpage_pos2:{adUnitPath:"",sizes:[[728,90]],sizeMapping:[[[1188,0],[[728,90],[970,90]]],[[768,0],[728,90]],[[0,0],[300,250]]],targeting:{pos:"2"}},footer_posF:{adUnitPath:"",sizes:[[728,90]],sizeMapping:[[[1188,0],[[728,90],[970,90]]],[[768,0],[728,90]],[[0,0],[300,250]]],targeting:{pos:"F"}}},d={header_pos1:{adUnitPath:"/23212581813/SportNation/news",sizes:[[728,90]],sizeMapping:[[[1188,0],[[970,250],[728,90],[970,90]]],[[768,0],[728,90]],[[0,0],[[320,50],[320,100]]]],targeting:{pos:"1"}}
1,sidebar_posR1:{adUnitPath:"/23212581813/SportNation/news",sizes:[[300,600],[300,250]],sizeMapping:[[[1188,0],[[300,600],[300,250]]],[[0,0],[]]],targeting:{pos:"R1"}},midcontent_pos2:{adUnitPath:"/23212581813/SportNation/news",sizes:[[300,250]],sizeMapping:[[[768,0],[[300,250],[640,360],"fluid"]],[[0,0],[[300,250],[320,180],"fluid"]]],targeting:{pos:"2",native:"article"}},footer_posF:{adUnitPath:"/23212581813/SportNation/news",sizes:[[728,90]],sizeMapping:[[[1188,0],[[728,90],[970,90]]],[[768,0],[728,90]],[[0,0],[300,250]]],targeting:{pos:"F"}}},o={listenplayer_pos1:{adUnitPath:"/23212581813/SportNation/listen-player",sizes:[[300,250]],sizeMapping:[],targeting:{pos:"1"}}},c=e=>{let{size:t,page:a,hasNoTopSpacing:c=!1,hasNoBottomSpacing:u=!1,isDark:p=!1}=e,[g,f]=(0,i.useState)(!1),[h,m]=(0,i.useState)(!1),x=(0,i.useRef)(null),v=Object.keys(l).reduce((e,t)=>(e[t]={...l[t],adUnitPath:(()=>{switch(a){case"home":default:return"/23212581813/SportNation/home";case"news":case"newsCategory":case"article":return"/23212581813/SportNation/news";case"listen":return"/23212581813/SportNation/listen";case"watch":return"/23212581813/SportNation/watch";case"listen-player":return"/23212581813/SportNation/listen-player"}})()},e),{}),b={..."article"===a?d:v,...o};return(0,i.useEffect)(()=>{f(!0);let e=new MutationObserver(()=>{var e;m(!!(null==x||null==(e=x.current)?void 0:e.querySelector('iframe[id*="google_ads_iframe"]')))});return x.current&&e.observe(x.current,{subtree:!0,childList:!0}),()=>e.disconnect()},[]),(0,s.jsx)("div",{ref:x,className:(0,r.A)({"pt-10 xs:pt-8":!c&&h,"pb-10 xs:pb-8":!u&&h,"pt-0 pb-8":!h,"bg-system_bg-tertiary":p}),children:(0,s.jsx)(n,{...b[t],page:a,isClient:g})})}}},e=>{e.O(0,[4807,266,6280,953,1356,2619,2211,5144,6512,2837,7881,5772,8441,1255,7358],()=>e(e.s=56538)),_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.