"use strict";(("undefined"!=typeof self?self:global).webpackChunkopen=("undefined"!=typeof self?self:global).webpackChunkopen||[]).push([[923],{18693:(e,t,o)=>{o.d(t,{F:()=>c,m:()=>a});var n=o(67294),s=o(64005),r=o(31604);const c=420;function a({episodeBase62Id:e,getEpisodeSponsors:t,fetchedEpisodeSponsorsData:a=[],version:i}){const[l,u]=(0,n.useState)(a),f=(0,n.useCallback)((async()=>{try{if(!e)throw new Error("episodeBase62Id is required to fetch episode sponsors");const n=null!=t?t:(await Promise.resolve().then(o.bind(o,11401))).getEpisodeSponsors;u(await n(e,{version:i}))}catch(e){u([])}}),[e,t,i]),d=(0,s.y)(f,c);return(0,n.useEffect)((function(){a.length||d()}),[d,a.length]),(0,r.H)(d),{fetchedEpisodeSponsorsData:l}}},39111:(e,t,o)=>{o.r(t),o.d(t,{AllShowSponsors:()=>w,default:()=>b});var n=o(67154),s=o.n(n),r=o(67294),c=o.n(r),a=o(52883),i=o(69518),l=o.n(i),u=o(46886),f=o(28975),d=o(77186),p=o(51976);const h=(0,r.lazy)((()=>Promise.all([o.e(814),o.e(818)]).then(o.bind(o,39818))));function w(e){const{showId:t}=(0,a.UO)(),o=(0,r.useMemo)((()=>l().showURI(t).toURI()),[t]),{location:{state:{showSponsorsData:n}={}}}=(0,d.P)(),{showSponsorsData:i}=(0,p.O)({showId:t,showSponsorsData:n});return null!=i&&i.length?c().createElement(h,s()({uri:o,showId:t,showSponsorsData:i},e)):c().createElement(u.AP,{to:(0,f.mH)(t)})}const b=w},51976:(e,t,o)=>{o.d(t,{O:()=>a});var n=o(67294),s=o(64005),r=o(18693),c=o(31604);function a({showId:e,showSponsorsData:t=[],getShowSponsors:a}){const[i,l]=(0,n.useState)(t),u=(0,n.useCallback)((async()=>{let t=!0;const n=(...e)=>{t&&l(...e)};try{if(!e)throw new Error("showId is required to fetch show sponsors");const t=null!=a?a:(await Promise.resolve().then(o.bind(o,1709))).getShowSponsors;n(await t(e))}catch(e){n([])}return()=>{t=!1}}),[e,a]),f=(0,s.y)(u,r.F);return(0,n.useEffect)((function(){t.length||f()}),[f,t.length]),(0,c.H)(f),{showSponsorsData:i}}},31604:(e,t,o)=>{o.d(t,{H:()=>l});var n=o(67294),s=o(87577),r=o(49207),c=o(40080),a=o(8341),i=o(89952);function l(e){const t=(0,s.W6)(r.oF),o=(0,a.Y)((e=>{var t,o;const n=null!==(t=null==e?void 0:e.item)&&void 0!==t?t:void 0;return(0,i.k6)(n)&&n.isPodcastAd&&null!==(o=n.id)&&void 0!==o?o:void 0})),l=(0,c.D)(o);(0,n.useEffect)((function(){o!==l&&Boolean(o)&&setTimeout(e,t)}),[e,o,l,t])}},77186:(e,t,o)=>{o.d(t,{P:()=>l});var n=o(59713),s=o.n(n),r=o(67294),c=o(52883);function a(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function i(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?a(Object(o),!0).forEach((function(t){s()(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):a(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function l(){const e=(0,c.k6)(),{listen:t,location:o}=e;return(0,r.useEffect)((function(){return t(((e,t)=>{"POP"===t&&(e.state=i(i(i({},void 0),o.state),e.state))}))})),e}}}]);
//# sourceMappingURL=xpui-routes-all-show-sponsors.js.map