"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[84055],{84055:function(e,t,r){r.r(t),r.d(t,{default:function(){return h}}),r(29305),r(32733),r(84701),r(69892),r(44962),r(89336),r(78557),r(95021),r(73687),r(83994),r(82367);var n=r(22696),a=r.n(n),i=r(24468),o=r(99891),s=r(46782),l=r(8566),d=r(70267),u=r(5898),c=r(82885),m=r(76942);function f(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 h(e,t,r){function n(){var e=y(),r=I[e];return r||((r=I[e]={query:{SortBy:"SortName",SortOrder:"Ascending",IncludeItemTypes:"Series",Recursive:!0,EnableTotalRecordCount:!1},view:"Poster"}).query.ParentId=t.topParentId,c.loadQuerySettings(e,r.query)),r}function h(){return n().query}function y(){return"".concat(t.topParentId,"-seriesgenres")}function p(){return!s.A.desktop}function b(e,n){if(e.isIntersecting){var a=e.target;n.unobserve(a);var o=a.getAttribute("data-id"),s=g.getCurrentViewStyle(),l="Thumb"==s||"ThumbCard"==s?5:9;p()&&(l=10);var d={SortBy:"Random",SortOrder:"Ascending",IncludeItemTypes:"Series",Recursive:!0,Fields:"PrimaryImageAspectRatio,MediaSourceCount",ImageTypeLimit:1,EnableImageTypes:"Thumb"==s||"ThumbCard"==s?"Primary,Backdrop,Thumb":"Primary",Limit:l,GenreIds:o,EnableTotalRecordCount:!1,ParentId:t.topParentId};ApiClient.getItems(ApiClient.getCurrentUserId(),d).then((function(e){"Thumb"==s?i.default.buildCards(e.Items,{itemsContainer:a,shape:(0,m.UI)(p()),preferThumb:!0,showTitle:!0,scalable:!0,centerText:!0,overlayMoreButton:!0,allowBottomPadding:!1}):"ThumbCard"==s?i.default.buildCards(e.Items,{itemsContainer:a,shape:(0,m.UI)(p()),preferThumb:!0,showTitle:!0,scalable:!0,centerText:!1,cardLayout:!0,showYear:!0}):"PosterCard"==s?i.default.buildCards(e.Items,{itemsContainer:a,shape:(0,m.xK)(p()),showTitle:!0,scalable:!0,centerText:!1,cardLayout:!0,showYear:!0}):"Poster"==s&&i.default.buildCards(e.Items,{itemsContainer:a,shape:(0,m.xK)(p()),scalable:!0,showTitle:!0,centerText:!0,showYear:!0,overlayMoreButton:!0,allowBottomPadding:!1}),e.Items.length>=d.Limit&&r.querySelector(".btnMoreFromGenre"+o+" .material-icons").classList.remove("hide")}))}}var v,g=this,I={};g.getViewStyles=function(){return"Poster,PosterCard,Thumb,ThumbCard".split(",")},g.getCurrentViewStyle=function(){return n().view},g.setCurrentViewStyle=function(e){n().view=e,c.saveViewSetting(y(),e),g.preRender(),g.renderTab()},g.enableViewSelection=!0,g.preRender=function(){v=function(){l.Ay.show();var e=h();return ApiClient.getGenres(ApiClient.getCurrentUserId(),e)}()},g.renderTab=function(){!function(e,r){var n=h();r.then((function(r){var i,m=e.querySelector("#items"),h="",v=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 f(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)?f(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,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}(r.Items);try{for(v.s();!(i=v.n()).done;){var g=i.value;if(h+='<div class="verticalSection">',h+='<div class="sectionTitleContainer sectionTitleContainer-cards padded-left">',h+='<a is="emby-linkbutton" href="'+d.appRouter.getRouteUrl(g,{context:"tvshows",parentId:t.topParentId})+'" class="more button-flat button-flat-mini sectionTitleTextButton btnMoreFromGenre'+g.Id+'">',h+='<h2 class="sectionTitle sectionTitle-cards">',h+=a()(g.Name),h+="</h2>",h+='<span class="material-icons hide chevron_right" aria-hidden="true"></span>',h+="</a>",h+="</div>",p()){var I="scrollX hiddenScrollX";s.A.tv&&(I+="smoothScrollX padded-top-focusscale padded-bottom-focusscale"),h+='<div is="emby-itemscontainer" class="itemsContainer '+I+' lazy padded-left padded-right" data-id="'+g.Id+'">'}else h+='<div is="emby-itemscontainer" class="itemsContainer vertical-wrap lazy padded-left padded-right" data-id="'+g.Id+'">';h+="</div>",h+="</div>"}}catch(e){v.e(e)}finally{v.f()}r.Items.length||(h="",h+='<div class="noItemsMessage centerMessage">',h+="<h1>"+u.Ay.translate("MessageNothingHere")+"</h1>",h+="<p>"+u.Ay.translate("MessageNoGenresAvailable")+"</p>",h+="</div>"),m.innerHTML=h,o.Ay.lazyChildren(m,b),c.saveQuerySettings(y(),n),l.Ay.hide()}))}(r,v)}}r(10353)}}]);