"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6157],{6157:function(e,t,r){r.r(t),r.d(t,{default:function(){return d}}),r(77575);var n=r(24468),a=r(40984),i=r(76542),o=r(8566),s=r(89100);function l(e,t,r,o){if(e){t.length?e.classList.remove("hide"):e.classList.add("hide");var s=e.querySelector(".recordingItems");o?(s.classList.add("scrollX"),s.classList.add("hiddenScrollX"),s.classList.remove("vertical-wrap")):(s.classList.remove("scrollX"),s.classList.remove("hiddenScrollX"),s.classList.add("vertical-wrap")),s.innerHTML=n.Ay.getCardsHtml(Object.assign({items:t,shape:o?"autooverflow":"auto",defaultShape:(0,a.UI)(o),showTitle:!0,showParentTitle:!0,coverImage:!0,cardLayout:!1,centerText:!0,allowBottomPadding:!o,preferThumb:"auto",overlayText:!1},r||{})),i.Ay.lazyChildren(s)}}function c(){"latest"===this.getAttribute("data-type")&&s.default.navigate("list?type=Recordings&serverId="+ApiClient.serverId())}function d(e,t,r){function n(){return(new Date).getTime()-d>3e5}for(var a,i,d=0,u=r.querySelectorAll(".more"),f=0,h=u.length;f<h;f++)u[f].addEventListener("click",c);this.preRender=function(){n()&&(i=ApiClient.getLiveTvRecordings({UserId:s.default.getCurrentUserId(),Limit:12,Fields:"CanDelete,PrimaryImageAspectRatio",EnableTotalRecordCount:!1,EnableImageTypes:"Primary,Thumb,Backdrop"}),a=ApiClient.getRecordingFolders(s.default.getCurrentUserId()))},this.renderTab=function(){var e;n()&&(o.Ay.show(),e=r,i.then((function(t){l(e.querySelector("#latestRecordings"),t.Items,{showYear:!0,lines:2},!1),o.Ay.hide()})),function(e,t){t.then((function(t){l(e.querySelector("#recordingFolders"),t.Items,{showYear:!1,showParentTitle:!1},!1)}))}(r,a),d=(new Date).getTime())}}r(22777),r(1177)},22777:function(e,t,r){r.d(t,{i:function(){return c}}),r(29305),r(32733),r(84701),r(69892),r(44962),r(86584),r(89336),r(78557),r(90076),r(95021),r(73687),r(83994),r(82367);var n=r(24468),a=r(40984),i=r(46782),o=r(98320);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function l(){return!i.A.desktop}function c(e,t){t=t||{};var r,c=[],d="",u=[],f=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return s(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){l=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw i}}}}(e.map((function(e){return e.Type="Timer",e})));try{for(f.s();!(r=f.n()).done;){var h=r.value,m="";if(!1!==t.indexByDate&&h.StartDate)try{var v=o.Ay.parseISO8601Date(h.StartDate,!0);m=o.Ay.toLocaleDateString(v,{weekday:"long",month:"short",day:"numeric"})}catch(e){console.error("error parsing premiereDate:"+h.StartDate+"; error: "+e)}m!=d?(u.length&&c.push({name:d,items:u}),d=m,u=[h]):u.push(h)}}catch(e){f.e(e)}finally{f.f()}u.length&&c.push({name:d,items:u});for(var y="",p=0,g=c;p<g.length;p++){var w=g[p];if(w.name&&(y+='<div class="verticalSection">',y+='<h2 class="sectionTitle sectionTitle-cards padded-left">'+w.name+"</h2>"),l()){var T="scrollX hiddenScrollX";i.A.tv&&(T+=" smoothScrollX"),y+='<div is="emby-itemscontainer" class="itemsContainer '+T+' padded-left padded-right">'}else y+='<div is="emby-itemscontainer" class="itemsContainer vertical-wrap padded-left padded-right">';y+=n.Ay.getCardsHtml({items:w.items,shape:(0,a.UI)(l()),showTitle:!0,showParentTitleOrTitle:!0,showAirTime:!0,showAirEndTime:!0,showChannelName:!1,cardLayout:!0,centerText:!1,action:"edit",cardFooterAside:"none",preferThumb:!0,defaultShape:null,coverImage:!0,allowBottomPadding:!1,overlayText:!1,showChannelLogo:!0}),y+="</div>",w.name&&(y+="</div>")}return Promise.resolve(y)}}}]);