"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[23230,66884,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(40984),s=r(99891),l=r(46782),d=r(8566),u=r(70267),c=r(5898),m=r(82885);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,m.loadQuerySettings(e,r.query)),r}function h(){return n().query}function y(){return"".concat(t.topParentId,"-seriesgenres")}function p(){return!l.A.desktop}function b(e,n){if(e.isIntersecting){var a=e.target;n.unobserve(a);var s=a.getAttribute("data-id"),l=g.getCurrentViewStyle(),d="Thumb"==l||"ThumbCard"==l?5:9;p()&&(d=10);var u={SortBy:"Random",SortOrder:"Ascending",IncludeItemTypes:"Series",Recursive:!0,Fields:"PrimaryImageAspectRatio,MediaSourceCount",ImageTypeLimit:1,EnableImageTypes:"Thumb"==l||"ThumbCard"==l?"Primary,Backdrop,Thumb":"Primary",Limit:d,GenreIds:s,EnableTotalRecordCount:!1,ParentId:t.topParentId};ApiClient.getItems(ApiClient.getCurrentUserId(),u).then((function(e){"Thumb"==l?i.Ay.buildCards(e.Items,{itemsContainer:a,shape:(0,o.UI)(p()),preferThumb:!0,showTitle:!0,scalable:!0,centerText:!0,overlayMoreButton:!0,allowBottomPadding:!1}):"ThumbCard"==l?i.Ay.buildCards(e.Items,{itemsContainer:a,shape:(0,o.UI)(p()),preferThumb:!0,showTitle:!0,scalable:!0,centerText:!1,cardLayout:!0,showYear:!0}):"PosterCard"==l?i.Ay.buildCards(e.Items,{itemsContainer:a,shape:(0,o.xK)(p()),showTitle:!0,scalable:!0,centerText:!1,cardLayout:!0,showYear:!0}):"Poster"==l&&i.Ay.buildCards(e.Items,{itemsContainer:a,shape:(0,o.xK)(p()),scalable:!0,showTitle:!0,centerText:!0,showYear:!0,overlayMoreButton:!0,allowBottomPadding:!1}),e.Items.length>=u.Limit&&r.querySelector(".btnMoreFromGenre"+s+" .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,m.saveViewSetting(y(),e),g.preRender(),g.renderTab()},g.enableViewSelection=!0,g.preRender=function(){v=function(){d.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,o=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="'+u.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";l.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>"+c.Ay.translate("MessageNothingHere")+"</h1>",h+="<p>"+c.Ay.translate("MessageNoGenresAvailable")+"</p>",h+="</div>"),o.innerHTML=h,s.Ay.lazyChildren(o,b),m.saveQuerySettings(y(),n),d.Ay.hide()}))}(r,v)}}r(10353)}}]);