function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var o=0;o<e.length;o++){var r=e[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,_toPropertyKey(r.key),r)}}function _createClass(t,e,o){return e&&_defineProperties(t.prototype,e),o&&_defineProperties(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function _toPropertyKey(t){t=_toPrimitive(t,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(t,e){if("object"!=_typeof(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0===o)return("string"===e?String:Number)(t);o=o.call(t,e||"default");if("object"!=_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}var WidgetTexteDefilant=(()=>_createClass(function t(e,o,r){_classCallCheck(this,t),this.text=e,this.backgroundColor=o,this.textColor=r},[{key:"buildTemplate",value:function(){var t=$("#widgetTemplate").clone(),e=$("<div>"),o="widgetTextDefilant"+Math.floor(1e6*Math.random());return e.attr("id",o).css("text-align","center"),0<this.backgroundColor.length&&t.attr("style","background-color:".concat(this.backgroundColor)),$("<div>").css({"font-size":"10vw",color:this.textColor,"background-color":this.backgroundColor,border:"none",width:"90vw","white-space":"nowrap",overflow:"hidden","text-overflow":"clip"}).text(this.text).appendTo(e),e.appendTo(t),this.makeTextScrollHorizontally(o),t}},{key:"makeTextScrollHorizontally",value:function(l){this.waitForElement(l).then(function(){var t,e,o,r,n,i=document.getElementById(l).querySelector("div");i.scrollWidth>i.clientWidth&&(i.scrollInterval&&clearInterval(i.scrollInterval),t=i.textContent,i.textContent=t+"   "+t,e=0,o=t.length*(i.scrollWidth/i.textContent.length),n=!(r=!20),i.scrollInterval=setInterval(function(){o<=e?(n=!1,r||(r=!0,setTimeout(function(){i.scrollLeft=0,e=0,setTimeout(function(){n=!(r=!1)},50)},1250))):n&&(e+=20,i.scrollLeft=e)},50))})}},{key:"waitForElement",value:function(o){return new Promise(function(t){var e=setInterval(function(){document.getElementById(o)&&(clearInterval(e),t())},100)})}}]))();