(window.webpackJsonp=window.webpackJsonp||[]).push([["floating-toolbars"],{"0ZwQ":function(t,e,o){"use strict";var i=o("P5fv"),n=o.n(i),r=(o("EsMY"),o("Eyy1")),s=o("9uLv"),a=o("Vdly"),l=o("aIyQ"),d=o.n(l),c=o("hY0g"),p=o.n(c),u=o("A6WY"),h=o("mrSG"),g=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(h.__extends)(e,t),e.prototype._startLoading=function(){return o.e("hammerjs").then(o.bind(null,"be1f")).then((function(t){return t.HammerJS}))},e}(o("cZRT").a),v=o("qFKp"),_=o("VVxS"),f=o("yB98");o("PwLo");o.d(e,"a",(function(){return x}));var y=v.CheckMobile.iOS();function b(){return Object(r.ensureNotNull)(window.containerElement)}function w(){if(!y)return window.innerWidth;var t=b(),e=getComputedStyle(t),o=e.paddingLeft&&parseFloat(e.paddingLeft)||0,i=e.paddingRight&&parseFloat(e.paddingRight)||0;return t.clientWidth-o-i}function m(){if(!y)return window.innerHeight;var t=b(),e=getComputedStyle(t),o=e.paddingTop&&parseFloat(e.paddingTop)||0,i=e.paddingBottom&&parseFloat(e.paddingBottom)||0;return t.clientHeight-o-i}var C='
',x=function(){function t(e){this._widget=document.createElement("div"),this._isVertical=!1,this._hiddingTimeoutId=null,this._visibility=new p.a(!1),this._windowResizeListener=this._onWindowResize.bind(this),this._reorderedDelegate=new d.a,this._responsiveResizeFunction=null,t._toolbars.push(this),this._options=e,this._widget=n()(C).get(0),this._content=this._widget.getElementsByClassName("js-content").item(0),this._setZIndex(t._startZIndex+t._toolbars.length-1),this._options.addClass&&(this._widget.className+=" "+this._options.addClass),this._options.layout&&"auto"!==this._options.layout&&(this._isVertical="vertical"===this._options.layout,this._updateLayoutType(),this._updateAxisOption())}return t.prototype.destroy=function(){this.hide(!0),t._toolbars.splice(t._toolbars.indexOf(this),1),document.body.contains(this._widget)&&document.body.removeChild(this._widget),this._widget.innerHTML="",this._responsiveResizeFunction=null},t.prototype.setResponsiveResizeFunc=function(t){this._responsiveResizeFunction=t},t.prototype.isVisible=function(){return this._visibility.value()},t.prototype.visibility=function(){return this._visibility.readonly()},t.prototype.isVertical=function(){return this._isVertical},t.prototype.show=function(){var t=this;this.isVisible()||(document.body.contains(this._widget)||(this._init(),document.body.appendChild(this._widget)),this._setHiddingTimeout(null),window.addEventListener("resize",this._windowResizeListener),this.raise(),this._visibility.setValue(!0),this._widget.classList.contains("i-hidden")?(this._widget.classList.remove("i-hidden"),setTimeout((function(){t.isVisible()&&t._widget.classList.remove("i-closed") }))):this._widget.classList.remove("i-closed"),this._onWindowResize())},t.prototype.hide=function(t){var e=this;if(void 0===t&&(t=!1),this.isVisible()){var o=this._widget.classList.contains("i-closed");if(this._widget.classList.add("i-closed"),this._visibility.setValue(!1),t||o)this._setHiddingTimeout(null),this._widget.classList.add("i-hidden");else{var i=setTimeout((function(){e._setHiddingTimeout(null),e._widget.classList.add("i-hidden")}),this.hideDuration());this._setHiddingTimeout(i)}window.removeEventListener("resize",this._windowResizeListener)}},t.prototype.raise=function(){t._toolbars.length+t._startZIndex!==this._zIndex()&&(t._toolbars.splice(t._toolbars.indexOf(this),1),t._toolbars.push(this),t._updateAllZIndexes())},t.prototype.hideDuration=function(){return.75*s.dur},t.prototype.addWidget=function(t,e){void 0===e&&(e={});var o=this.widgetsCount();if(void 0===e.index&&(e.index=o),e.index<0||e.index>o)throw new Error("Index must be in [0, "+o+"]");var i=document.createElement("div");i.className="tv-floating-toolbar__widget js-widget",i.appendChild(t);var n=e.index===o?null:this._content.childNodes.item(e.index);this._content.insertBefore(i,n),this._onWindowResize()},t.prototype.removeWidget=function(t){var e=this._findWrapperForWidget(t);e&&(this._content.removeChild(e),this._onWindowResize())},t.prototype.widgetsCount=function(){return this._content.childNodes.length},t.prototype.showWidget=function(t){var e=this._findWrapperForWidget(t);e&&e.classList.remove("i-hidden")},t.prototype.hideWidget=function(t){var e=this._findWrapperForWidget(t);e&&e.classList.add("i-hidden")},t.prototype.removeWidgets=function(){for(;this._content.firstChild;)this._content.removeChild(this._content.firstChild);this._onWindowResize()},t.prototype.onWidgetsReordered=function(){return this._reorderedDelegate},t.prototype.onContextMenu=function(t){var e=this;Modernizr.mobiletouch?(new g).load().then((function(o){var i=new o(e._widget);i.get("press").set({time:500}),i.on("press",(function(o){e._preventWidgetTouchEndEvent(),t(o.srcEvent)}))})):this._widget.addEventListener("contextmenu",t)},t.prototype._determineCurrentLayoutVertical=function(t){var e=this._isVertical?t.height:t.width;return w()