<`+'h3 style="margin:0;" class="focusPreviewTitle verticalFieldItem-condensed">
<`+'div class="focusPreviewSecondaryTitle hide verticalFieldItem-condensed">
`;let itemsContainer=elem.querySelector(".itemsContainer");itemsContainer.fetchData=getFocusPreviewImageItems.bind(this),(itemsContainer.parentContainer=itemsContainer).getListOptions=getFocusPreviewImageOptions.bind(this),itemsContainer.waitForCustomElementUpgrade().then(function(){itemsContainer.resume({})})},BaseTab.prototype.autoFocus=function(options){options=Object.assign({skipIfNotEnabled:!0},options);let elem;var view=this.view;return view&&(elem=focusManager.autoFocus(view,options))?elem:(!options.skipIfNotEnabled||focusManager.isAutoFocusEnabled())&&(elem=mainTabsManager.focus())||null},BaseTab.prototype.showFocusPreview=function(item,itemElement){var elem=this.getFocusPreviewElement(item);if(!item||item.IsCategory)fillFocusPreview(this,elem,{}),this.hideFocusPreviewElementUsingDisplay()&&elem.classList.add("hide");else switch(item.Type){case"Channel":case"CollectionFolder":fillWithRandomItem(this,elem,item,itemElement);break;default:fillFocusPreview(this,elem,item,itemElement)}},BaseTab.prototype.hideFocusPreviewElementUsingDisplay=function(){return!0},BaseTab.prototype.refetchItemForFocusPreview=function(){return!1},BaseTab.prototype.getFocusPreviewItem=function(element){return itemShortcuts.getItemFromChildNode(element,!0)},BaseTab.prototype.enableFocusPreviewImage=function(){return"x"===this.scrollDirection()},BaseTab.prototype.onFocusIn=function(elem){this._focusedElement=elem,startSelectedInfoTimer(this)},BaseTab.prototype.onFocusOut=function(){this._focusedElement=null,startSelectedInfoTimer(this)},BaseTab.prototype.fillFocusPreviewIfNeeded=function(){if(this.enableFocusPreview()||this.enableBackdropsOnFocus()){let elem=document.activeElement||document.body;if(this.view.contains(elem)){var itemsContainer=elem.closest(".itemsContainer");if(itemsContainer&&elem.matches(itemsContainer.getItemSelector()))return}if(elem=this.view.querySelector(".card")){let itemsContainer=elem.closest(".itemsContainer");itemsContainer&&fetchAndShowFocusPreview(this,elem)}}},BaseTab.prototype.getRequestedItemFields=function(){let fields=this.requestedItemFields;return this.enableFocusPreview()&&(fields+=",Overview,CommunityRating,CriticRating,OfficialRating,PremiereDate,ProductionYear,Container"),fields},BaseTab.prototype.getRequestedImageTypes=function(){let fields="Primary,Backdrop,Thumb";return this.enableFocusPreview()&&(fields+=",Logo"),fields},BaseTab.prototype.enableBackdropsOnFocus=function(){return!!this.enableFocusPreview()||userSettings.enableBackdrops()},BaseTab.prototype.addFocusBehavior=function(element){this._enableBackdrops=layoutManager.tv&&this.enableBackdropsOnFocus(),(this._enableBackdrops||this.enableFocusPreview())&&(this.boundonItemsContainerFocusIn||(this.boundonItemsContainerFocusIn=onItemsContainerFocusIn.bind(this)),this.boundonItemsContainerFocusOut||(this.boundonItemsContainerFocusOut=onItemsContainerFocusOut.bind(this)),dom.addEventListener(element,"focus",this.boundonItemsContainerFocusIn,{capture:!0,passive:!0}),dom.addEventListener(element,"focusout",this.boundonItemsContainerFocusOut,{passive:!0}))},BaseTab.prototype.hasFocus=function(){var activeElement=document.activeElement,view=this.view;return activeElement&&view&&view.contains(activeElement)},BaseTab.prototype.scrollToBeginning=function(){var scroller=this.scroller;scroller&&scroller.scrollToBeginning()},BaseTab.prototype.loadTemplate=function(){return Promise.resolve()},BaseTab.prototype.onTemplateLoaded=function(){findScroller(this),this.view.classList.add("focuscontainer-x");var focusContainerElem=this.getFocusContainerElement();focusContainerElem&&(focusContainerElem.classList.add("focuscontainer-y","navout-up"),focusContainerElem.getNavOutDestination=getScrollerNavOutDestination)},BaseTab.prototype.getFocusContainerElement=function(){return this.scroller},BaseTab.prototype.getApiClient=function(){var serverId;return this.apiClient||((serverId=this.params.serverId||this.options?.serverId)?connectionManager.getApiClient(serverId):connectionManager.currentApiClient())},BaseTab.prototype.onBeginResume=function(options){this.paused=!1;var scroller=this.scroller;scroller&&scroller.beginResume&&scroller.beginResume(options)},BaseTab.prototype.onResume=function(options){this.paused=!1;var scroller=this.scroller,scroller=(scroller&&scroller.resume&&scroller.resume(options),this.enableFocusPreview());(scroller||this._focusPreviewElement)&&(this.enablePushDownFocusPreview()&&(this.scroller.setHeaderBindingEnabled(!scroller),options=this.scroller.querySelector(".scrollSlider.padded-top-page")||this.scroller.querySelector(".padded-top-page"),scroller?(this.scroller.classList.add("tab-scroller-withfocuspreview"),options&&options.classList.add("tab-scroller-withfocuspreview-padded-top-page"),backgroundContainer.classList.add("backgroundContainer-withfocuspreview"),backdropContainer.classList.add("backdropContainer-withfocuspreview"),"rtl"===document.dir?backdropContainer.classList.add("backdropContainer-withfocuspreview-rtl"):backdropContainer.classList.remove("backdropContainer-withfocuspreview-rtl"),appHeader.classList.add("appHeader-withfocuspreview"),this.scroller.setFocusScroll("center")):(this.scroller.classList.remove("tab-scroller-withfocuspreview"),options&&options.classList.remove("tab-scroller-withfocuspreview-padded-top-page"),backgroundContainer.classList.remove("backgroundContainer-withfocuspreview"),backdropContainer.classList.remove("backdropContainer-withfocuspreview","backdropContainer-withfocuspreview-rtl"),appHeader.classList.remove("appHeader-withfocuspreview"))),!scroller)&&this._focusPreviewElement&&this.showFocusPreview(null)},BaseTab.prototype.onPause=function(){this.paused=!0;var scroller=this.scroller,scroller=(scroller&&scroller.pause&&scroller.pause(),clearSelectedInfoTimer(this),this.enableFocusPreview());(scroller||this._focusPreviewElement)&&(this._focusPreviewElement&&this.showFocusPreview(null),this.enablePushDownFocusPreview())&&(backgroundContainer.classList.remove("backgroundContainer-withfocuspreview"),backdropContainer.classList.remove("backdropContainer-withfocuspreview","backdropContainer-withfocuspreview-rtl"),appHeader.classList.remove("appHeader-withfocuspreview"))},BaseTab.prototype.destroy=function(){this.paused=null,this.scroller=null,this.view=null,this.params=null,this.options=null,this.apiClient=null,this._focusedElement=null,this._enableBackdrops=null,this._focusPreviewElement=null,clearSelectedInfoTimer(this)};export default BaseTab;