(self.webpackChunk=self.webpackChunk||[]).push([[7425],{29366:function(e,t,s){"use strict";s(32081),s(67752);var i=s(83094),a=s(13800),n=s(47518),r=s(27515),l=s(1892),o=s.n(l),c=s(90685),d=(o()(c.Z,{insert:"head",singleton:!1}),c.Z.locals,s(2553),Object.create(HTMLDivElement.prototype)),u="emby-tab-button",h=u+"-active";function b(e){e.classList.add(h)}function v(e,t,s){var i;e.dispatchEvent(new CustomEvent("beforetabchange",{detail:{selectedTabIndex:t,previousIndex:s}})),null!=s&&s!==t&&(i=null)&&i.classList.remove("is-active")}function f(e){var t=this,s=t.querySelector("."+h),a=i.ZP.parentWithClass(e.target,u);if(a&&a!==s){s&&s.classList.remove(h);var n=s?parseInt(s.getAttribute("data-index")):null;b(a);var r=parseInt(a.getAttribute("data-index"));v(t,r,n),setTimeout((function(){t.selectedTabIndex=r,t.dispatchEvent(new CustomEvent("tabchange",{detail:{selectedTabIndex:r,previousIndex:n}}))}),120),t.scroller&&t.scroller.toCenter(a,!1)}}function m(e){var t=e.target.parentNode.querySelector(".lastFocused");t&&t.classList.remove("lastFocused"),e.target.classList.add("lastFocused")}function g(e){return e.querySelector("."+h)}function p(e,t){for(var s=e[t];s;){if(s.classList.contains(u)&&!s.classList.contains("hide"))return s;s=s[t]}return null}d.createdCallback=function(){this.classList.contains("emby-tabs")||(this.classList.add("emby-tabs"),this.classList.add("focusable"),i.ZP.addEventListener(this,"click",f,{passive:!0}),i.ZP.addEventListener(this,"focusout",m))},d.focus=function(){var e=this.querySelector("."+h),t=this.querySelector(".lastFocused");t?r.Z.focus(t):e?r.Z.focus(e):r.Z.autoFocus(this)},d.refresh=function(){this.scroller&&this.scroller.reload()},d.attachedCallback=function(){!function(e){if(!e.scroller){var t=e.querySelector(".emby-tabs-slider");t?(e.scroller=new a.Z(e,{horizontal:1,itemNav:0,mouseDragging:1,touchDragging:1,slidee:t,smart:!0,releaseSwing:!0,scrollBy:200,speed:120,elasticBounds:1,dragHandle:1,dynamicHandle:1,clickBar:1,hiddenScroll:!0,requireAnimation:!n.Z.safari,allowNativeSmoothScroll:!0}),e.scroller.init()):(e.classList.add("scrollX"),e.classList.add("hiddenScrollX"),e.classList.add("smoothScrollX"))}}(this);var e=this.querySelector("."+h),t=e?parseInt(e.getAttribute("data-index")):parseInt(this.getAttribute("data-index")||"0");if(-1!==t){this.selectedTabIndex=t;var s=this.querySelectorAll("."+u)[t];s&&b(s)}this.readyFired||(this.readyFired=!0,this.dispatchEvent(new CustomEvent("ready",{})))},d.detachedCallback=function(){this.scroller&&(this.scroller.destroy(),this.scroller=null),i.ZP.removeEventListener(this,"click",f,{passive:!0})},d.selectedIndex=function(e,t){var s=this;if(null==e)return s.selectedTabIndex||0;var i=s.selectedIndex();s.selectedTabIndex=e;var a=s.querySelectorAll("."+u);if(i===e||!1===t){v(s,e,i),s.dispatchEvent(new CustomEvent("tabchange",{detail:{selectedTabIndex:e}}));var n=a[i];b(a[e]),i!==e&&n&&n.classList.remove(h)}else f.call(s,{target:a[e]})},d.selectNext=function(){var e=p(g(this),"nextSibling");e&&f.call(this,{target:e})},d.selectPrevious=function(){var e=p(g(this),"previousSibling");e&&f.call(this,{target:e})},d.triggerBeforeTabChange=function(e){v(this,this.selectedIndex())},d.triggerTabChange=function(e){this.dispatchEvent(new CustomEvent("tabchange",{detail:{selectedTabIndex:this.selectedIndex()}}))},d.setTabEnabled=function(e,t){var s=this.querySelector('.emby-tab-button[data-index="'+e+'"]');t?s.classList.remove("hide"):s.classList.remove("add")},document.registerElement("emby-tabs",{prototype:d,extends:"div"})},90685:function(e,t,s){"use strict";var i=s(93476),a=s.n(i)()((function(e){return e[1]}));a.push([e.id,".emby-tab-button{box-sizing:border-box;background:transparent;box-shadow:none;cursor:pointer;outline:none;width:auto;font-family:inherit;font-size:inherit;display:inline-block;vertical-align:middle;-webkit-flex-shrink:0;flex-shrink:0;margin:0;padding:1.5em;position:relative;height:auto;min-width:0;line-height:1.25;border-radius:0;overflow:hidden;font-weight:600}.emby-tab-button.show-focus:focus{-webkit-transform:scale(1.3)!important;transform:scale(1.3)!important;background:0!important}.emby-tabs-slider{position:relative}.tabContent:not(.is-active){display:none}",""]),t.Z=a}}]);