"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2910],{22910:function(t,e,n){n.r(e),n(23938),n(52077),n(911),n(32081);var l=n(1892),i=n.n(l),s=n(95760),r=n.n(s),o=n(38311),a=n.n(o),c=n(58192),d=n.n(c),u=n(38060),h=n.n(u),p=n(54865),b=n.n(p),f=n(32277),g={};g.styleTagTransform=b(),g.setAttributes=d(),g.insert=a().bind(null,"head"),g.domAPI=r(),g.insertStyleElement=h(),i()(f.Z,g),f.Z&&f.Z.locals&&f.Z.locals,n(67752),n(21865);var v=n(44614),m=Object.create(HTMLDivElement.prototype);function y(t){var e="",n="left"===t?"chevron_left":"chevron_right",l="left"===t?v.ZP.translate("Previous"):v.ZP.translate("Next");return e+='<button type="button" is="paper-icon-button-light" data-ripple="false" data-direction="'.concat(t,'" title="').concat(l,'" class="emby-scrollbuttons-button">'),(e+='<span class="material-icons '+n+'" aria-hidden="true"></span>')+"</button>"}function S(t){return t.getScrollPosition?t.getScrollPosition():0}function k(){var t,e=this.scroller;!function(t,e,n,l){l<=e+20&&(t.scrollButtonsLeft.classList.add("hide"),t.scrollButtonsRight.classList.add("hide")),t.scrollButtonsLeft.disabled=!(n>0);var i=n+e;t.scrollButtonsRight.disabled=l>0&&i>=l}(this,L(e),S(e),(t=e).getScrollSize?t.getScrollSize():0)}function x(t,e){var n=t.getPropertyValue(e);return n&&(n=n.replace("px",""))?(n=parseInt(n),isNaN(n)?0:n):0}function L(t){var e=t.offsetWidth,n=window.getComputedStyle(t,null),l=x(n,"padding-left");l&&(e-=l);var i=x(n,"padding-right");i&&(e-=i);var s=t.getScrollSlider();return(l=x(n=window.getComputedStyle(s,null),"padding-left"))&&(e-=l),(i=x(n,"padding-right"))&&(e-=i),e}function w(){var t,e=this.parentNode.nextSibling,n=this.getAttribute("data-direction"),l=L(e),i=S(e);t="left"===n?Math.max(0,i-l):i+l,e.scrollToPosition(t,!1)}m.createdCallback=function(){},m.attachedCallback=function(){var t=this.nextSibling;this.scroller=t,this.parentNode.classList.add("emby-scroller-container"),this.innerHTML=y("left")+y("right");var e=this.querySelectorAll(".emby-scrollbuttons-button");e[0].addEventListener("click",w),e[1].addEventListener("click",w),this.scrollButtonsLeft=e[0],this.scrollButtonsRight=e[1];var n=k.bind(this);this.scrollHandler=n,t.addScrollEventListener(n,{capture:!1,passive:!0})},m.detachedCallback=function(){var t=this.scroller;this.scroller=null;var e=this.scrollHandler;t&&e&&t.removeScrollEventListener(e,{capture:!1,passive:!0}),this.scrollHandler=null,this.scrollButtonsLeft=null,this.scrollButtonsRight=null},document.registerElement("emby-scrollbuttons",{prototype:m,extends:"div"})},32277:function(t,e,n){var l=n(54933),i=n.n(l),s=n(93476),r=n.n(s)()(i());r.push([t.id,".emby-scrollbuttons{-webkit-align-items:center;align-items:center;color:#fff;display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;min-height:24px;min-width:104px;padding-top:.85em;position:absolute;right:0;top:0;z-index:1}.emby-scrollbuttons-button>.material-icons{display:block;min-height:24px;min-width:24px}",""]),e.Z=r}}]);