define(["exports"],function(_exports){function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function(){return!!t})()}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;var EmbyProgressBar=function(_HTMLDivElement){function EmbyProgressBar(){var t,o,e;babelHelpers.classCallCheck(this,EmbyProgressBar),t=this,o=EmbyProgressBar,o=babelHelpers.getPrototypeOf(o),o=babelHelpers.possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],babelHelpers.getPrototypeOf(t).constructor):o.apply(t,e));return babelHelpers.possibleConstructorReturn(o,o)}return babelHelpers.inherits(EmbyProgressBar,_HTMLDivElement),babelHelpers.createClass(EmbyProgressBar,[{key:"connectedCallback",value:function(){this.timeInterval&&clearInterval(this.timeInterval),"time"===this.getAttribute("data-automode")&&(this.timeInterval=setInterval(function(){var start=parseInt(this.getAttribute("data-starttime")),end=parseInt(this.getAttribute("data-endtime")),end=(Date.now()-start)/(end-start)*100,end=Math.min(100,end);end=Math.max(0,end),this.querySelector(".itemProgressBarForeground").style.width=end+"%"}.bind(this),6e4))}},{key:"disconnectedCallback",value:function(){this.timeInterval&&(clearInterval(this.timeInterval),this.timeInterval=null)}}])}(babelHelpers.wrapNativeSuper(HTMLDivElement));customElements.define("emby-progressbar",EmbyProgressBar,{extends:"div"}),_exports.default=EmbyProgressBar});