(self.webpackChunk=self.webpackChunk||[]).push([[8541],{61479:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return c}});var a=r(78695),i=r(6594),n=r(28469),o=r(61097),s=r(17146),l=r(53754);function d(){return!a.Z.desktop}function c(e,t,r){var c;this.preRender=function(){c=function(e,t){i.ZP.show();var r={Limit:48,Fields:"AirTime",UserId:ApiClient.getCurrentUserId(),ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Banner,Thumb",EnableTotalRecordCount:!1};return r.ParentId=t.topParentId,ApiClient.getJSON(ApiClient.getUrl("Shows/Upcoming",r))}(0,t)},this.renderTab=function(){var e;e=r,c.then((function(t){var r=t.Items;r.length?e.querySelector(".noItemsMessage").style.display="none":e.querySelector(".noItemsMessage").style.display="block",function(e,t){for(var r=[],i="",c=[],m=0,u=t.length;m<u;m++){var h=t[m],p="";if(h.PremiereDate)try{var v=n.ZP.parseISO8601Date(h.PremiereDate,!0);p=n.ZP.isRelativeDay(v,-1)?l.ZP.translate("Yesterday"):n.ZP.toLocaleDateString(v,{weekday:"long",month:"short",day:"numeric"})}catch(e){console.error("error parsing timestamp for upcoming tv shows")}p!=i?(c.length&&r.push({name:i,items:c}),i=p,c=[h]):c.push(h)}for(var f="",y=0,g=r.length;y<g;y++){var T=r[y];f+='<div class="verticalSection">',f+='<h2 class="sectionTitle sectionTitle-cards padded-left">'+T.name+"</h2>";var w=!0;if(d()){w=!1;var I="scrollX hiddenScrollX";a.Z.tv&&(I+=" smoothScrollX"),f+='<div is="emby-itemscontainer" class="itemsContainer '+I+' padded-left padded-right">'}else f+='<div is="emby-itemscontainer" class="itemsContainer vertical-wrap padded-left padded-right">';f+=o.default.getCardsHtml({items:T.items,showLocationTypeIndicator:!1,shape:d()?"overflowBackdrop":"backdrop",showTitle:!0,preferThumb:!0,lazy:!0,showDetailsMenu:!0,centerText:!0,showParentTitle:!0,overlayText:!1,allowBottomPadding:w,cardLayout:!1,overlayMoreButton:!0,missingIndicator:!1}),f+="</div>",f+="</div>"}e.innerHTML=f,s.default.lazyChildren(e)}(e.querySelector("#upcomingItems"),r),i.ZP.hide()}))}}r(2553),r(51547)}}]);