!function(teads){try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b=function(){function a(){}return a.find=function(a,b,c){if(null==a)throw new TypeError("array is null or undefined");if("function"!=typeof b)throw new TypeError("predicate must be a function");for(var d,e=Object(a),f=e.length>>>0,g=0;f>g;g++)if(d=e[g],b.call(c,d,g,e))return d},a.forEach=function(a,b,c){if(null==a)throw new TypeError("array is null or undefined");if("function"!=typeof b)throw new TypeError("callback must be a function");for(var d,e=Object(a),f=e.length>>>0,g=0;f>g;)g in e&&(d=e[g],b.call(c,d,g,e)),g++},a.filter=function(a,b,c){if(null==a)throw new TypeError("array is null or undefined");if("function"!=typeof b)throw new TypeError("callback must be a function");var d=Object(a),e=d.length>>>0;if(e>d.length)throw new TypeError("negative length");for(var f=[],g=0;e>g;g++)if(g in d){var h=d[g];b.call(c,h,g,d)&&f.push(h)}return f},a.some=function(a,b,c){if(null==a)throw new TypeError("array is null or undefined");if("function"!=typeof b)throw new TypeError("callback must be a function");var d=Object(a),e=d.length>>>0;if(e>d.length)throw new TypeError("negative length");for(var f=0;e>f;f++)if(f in d&&b.call(c,d[f],f,d))return!0;return!1},a.indexOf=function(a,b,c){if(null==a)throw new TypeError("array is null or undefined");var d=Object(a),e=d.length>>>0;if(0===e)return-1;var f=+c||0;if(Math.abs(f)===1/0&&(f=0),f>=e)return-1;for(var g=Math.max(f>=0?f:e-Math.abs(f),0);e>g;){if(g in d&&d[g]===b)return g;g++}return-1},a.map=function(a,b,c){if(null==a)throw new TypeError("array is null or undefined");if("function"!=typeof b)throw new TypeError("callback must be a function");for(var d,e,f=Object(a),g=f.length>>>0,h=new Array(g),i=0;g>i;)i in f&&(d=f[i],e=b.call(c,d,i,f),h[i]=e),i++;return h},a.unique=function(a){if(null==a)throw new TypeError("array is null or undefined");var b={};return this.filter(a,function(a){return!(b[a]=++b[a]||0)})},a.reduce=function(a,b,c){if(null==a)throw new TypeError("array is null or undefined");if("function"!=typeof b)throw new TypeError("callback must be a function");var d=a.length>>>0;if(0===d&&void 0===c)throw new TypeError("reduce of empty array with no initial value");var e,f=0;if(void 0!==c)e=c;else for(;;){if(f in a){e=a[f++];break}if(++f>=d)throw new TypeError("reduce of empty array with no initial value")}for(;d>f;f++)f in a&&(e=b(e,a[f],f,a));return e},a}();a.ArrayHelper=b}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b=function(){function a(){}return a.isURL=function(a){var b=/^\(?((?:(http|https|ftp):\/\/)|\/\/)?(?:((?:[^\W\s]|\.|-|[:]{1})+)@{1})?((?:www.)?(?:[^\W\s]|\.|-)+[\.][^\W\s]{2,4}|localhost|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(?::(\d*))?([\/]?[^\s\?]*[\/]{1})*(?:\/?([^\s\n\?\[\]\{\}\#]*(?:(?=\.)){1}|[^\s\n\?\[\]\{\}\.\#]*)?([\.]{1}[^\s\?\#]*)?)?(?:\?{1}([^\s\n\#]*))?([\#][^\s\n]*)?\)?$/i;return"string"==typeof a&&b.test(a)},a.pad=function(a,b){void 0===b&&(b="00");var c=String(a);return b.substring(0,b.length-c.length)+c},a.ucfirst=function(a){return a.charAt(0).toUpperCase()+a.substr(1)},a.rand=function(a,b){void 0===b&&(b=!0);for(var c=b?"0123456789":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",d="",e=0;a>e;e++)d+=c.charAt(Math.floor(Math.random()*c.length));return d},a.trim=function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},a.separate=function(a){void 0===a&&(a="|");for(var b=[],c=1;c0?2==f.length?"function"==typeof f[1]?b[f[0]]=f[1].call(this,h):b[f[0]]=f[1]:3==f.length?"function"!=typeof f[1]||f[1].exec&&f[1].test?b[f[0]]=h?h.replace(f[1],f[2]):void 0:b[f[0]]=h?f[1].call(this,h,f[2]):void 0:4==f.length&&(b[f[0]]=h?f[3].call(this,h.replace(f[1],f[2])):void 0):b[f]=h?h:void 0;i+=2}return b},str:function(a,c){for(var d in c)if("object"==typeof c[d]&&c[d].length>0){for(var e=0;e=0&&(d=["debug","info","warn","error"]));var f=a.Cookie.get("teadsDebugNamespace");f&&(e=f.split(",")),d.length&&!a.Logger&&(a.Context.isIE()?(c.log("Teads Media Framework > Debug mode"),c.log("Package: teads-player v0.8.25")):(c.log("%cTeads Media Framework %c> Debug mode","color:#7ebde5;font-family:Helvetica,sans-serif;font-size:2em;","color:#aaa;font-family:Helvetica,sans-serif;font-size:2em;"),c.log("%cPackage: teads-player v0.8.25","color:#7ebde5;font-style:italic;")))}a.START_TIME=a.START_TIME||Date.now(),a.FULL_LOGS=a.FULL_LOGS||[];var c,d=[],e=[],f=function(){function a(){}return a.prototype.log=function(){},a}();c=window.console&&console.log?window.console:new f,b();var g=function(){function f(a){this.namespace=a,this.console=c}return f.prototype._log=function(g,h){var i=this;if(b(),h.length){for(var j=Date.now()-a.START_TIME,k=(j/1e3).toFixed(3)+"s",l="",m=0;m0&&(l+=" + "),"object"==typeof h[m])try{l+=a.JSON.stringify(h[m])}catch(n){l+=h[m]}else l+=h[m];if(a.FULL_LOGS.push({level:g,message:k+" ["+this.namespace+"] "+l}),!(a.ArrayHelper.indexOf(d,g)<0)){if(e.length){var o=a.ArrayHelper.some(e,function(a){return 0===i.namespace.indexOf(a)});if(!o)return}f.logs.push({level:g,message:k+" ["+this.namespace+"] "+h.join(" ")}),a.Context.isIE()?h=[k+" ["+this.namespace+"] "+h.join(" ")]:h.unshift("%c"+k+" "+this.namespace,"color:#7ebde5;");var p=c[g]||c.log;try{p.apply(c,h)}catch(q){Function.prototype.apply.apply(p,[c,h])}}}},f.prototype.debug=function(){for(var a=[],b=0;b-1&&!d&&!e;if((!d||f)&&c.getBoundingClientRect){var g=b.getBoundingClientRect(c);return{width:g.right-g.left,height:g.bottom-g.top}}return{width:d,height:e}},b.getTextContent=function(c,d){if(a.ArrayHelper.indexOf(b.TAGS_TO_IGNORE,c.nodeName)>=0);else if(c.nodeType===b.NODE_TYPES.TEXT)d.push(c.nodeValue);else if(c.nodeName in b.PREDEFINED_TAG_VALUES)d.push(b.PREDEFINED_TAG_VALUES[c.nodeName]);else for(var e=c.firstChild;e;)b.getTextContent(e,d),e=e.nextSibling},b.querySelectorAll=function(b,c){if(a.Context.isOldIE(8)){var d,e,f,g,h=b.split(","),i=function(a,b){var d,e,f,g,h,i,j,k,l,m,n,o,p,q=b.split(/[ >]+/),r=b.match(/[ >]+/g)||[],s=[a];for(r.unshift(" ");d=q.shift();)for(e=r.shift(),e&&(e=e.replace(/^ +| +$/g,"")),f=s.slice(0),s=[],g=f.length,i=d.match(/[#.[]?[a-z_-]+(?:='[^']+'|="[^"]+")?]?/gi),j=i.length,h=0;g>h;h++)if("#"===i[0].charAt(0))s=[c.document.getElementById(i[0].substr(1))];else{if(l=">"===e?f[h].children:f[h].getElementsByTagName?f[h].getElementsByTagName("*"):f[h].document.getElementsByTagName("*"),!l)continue;for(n=l.length,m=0;n>m;m++){for(o=!0,k=0;j>k;k++){switch(i[k].charAt(0)){case".":l[m].className.match(new RegExp("\\b"+i[k].substr(1)+"\\b"))||(o=!1);break;case"[":p=i[k].substr(1,i[k].length-2).split("="),l[m].getAttribute(p[0])?p[1]&&(p[1]=p[1].replace(/^['"]|['"]$/g,""),l[m].getAttribute(p[0])!==p[1]&&(o=!1)):o=!1;break;default:l[m].tagName.toLowerCase()!==i[k].toLowerCase()&&(o=!1)}if(!o)break}o&&s.push(l[m])}}return s},j=h.length,k=[];for(d=0;j>d;d++)for(e=i(c,h[d].replace(/^\s*([\S\s]*?)\s*$/,"$1")),f=e.length,g=0;f>g;g++)k.push(e[g]);return k}return c.document.querySelectorAll(b)},b.isInternalLink=function(a,b){return"A"===a.tagName&&a.href?b.document.location.host!==a.host?!1:a.target&&!/^_(self|top)$/i.test(a.target)?!1:b.document.location.href.split("#")[0]!==a.href.split("#")[0]:!1},b.getWindowSize=function(a){return void 0===a&&(a=window),"number"==typeof a.innerWidth?{width:a.innerWidth,height:a.innerHeight}:a.document.documentElement&&(a.document.documentElement.clientWidth||a.document.documentElement.clientHeight)?{width:a.document.documentElement.clientWidth,height:a.document.documentElement.clientHeight}:a.document.body&&(a.document.body.clientWidth||a.document.body.clientHeight)?{width:a.document.body.clientWidth,height:a.document.body.clientHeight}:{width:1e3,height:600}},b.inject=function(a,b){void 0===b&&(b=window);var c=b.document.getElementsByTagName("head")[0]||b.document.body;c.appendChild(a)},b.addEventListener=function(a,b,c){b.addEventListener?b.addEventListener(a,c,!0):b.attachEvent("on"+a,c)},b.removeEventListener=function(a,b,c){b.removeEventListener?b.removeEventListener(a,c,!0):b.detachEvent("on"+a,c)},b.onDomReady=function(a,c){void 0===c&&(c=window),!c.document||"complete"!==c.document.readyState&&"loaded"!==c.document.readyState&&"interactive"!==c.document.readyState?c.addEventListener?c.addEventListener("DOMContentLoaded",a,!1):c.attachEvent&&c===c.top?1===b.readyQueue.push(a)&&b.readyIEtop(c):c.attachEvent&&c.attachEvent("onload",a):"interactive"===c.document.readyState&&c.document.attachEvent?c.document.attachEvent("onreadystatechange",function(){"complete"!==c.document.readyState&&"loaded"!==c.document.readyState||a()}):a()},b.onDomComplete=function(a,c,d){void 0===c&&(c=window),void 0===d&&(d=this),"complete"===c.document.readyState?a.call(d):b.addEventListener("load",c,function(){a.call(d)})},b.getScrollLeft=function(a){return a.pageXOffset?a.pageXOffset:"CSS1Compat"===(a.document.compatMode||"")?a.document.documentElement.scrollLeft:a.document.body.scrollLeft},b.getScrollTop=function(a){return a.pageYOffset?a.pageYOffset:"CSS1Compat"===(a.document.compatMode||"")?a.document.documentElement.scrollTop:a.document.body.scrollTop},b.getElementsByClassName=function(a,b,c){if(void 0===c&&(c=window),b=b||c.document,b.getElementsByClassName)return b.getElementsByClassName(a);for(var d=a.split(" "),e="",f=0,g=d.length;g>f;f++)e+="."+d[f];return b.querySelectorAll(e)},b.isHTMLElement=function(c,d){return!c||"object"!=typeof c||b.isNodeList(c)?!1:(d||(d=a.HTMLHelper.getWindow(c)||window),"object"==typeof d.HTMLElement?c instanceof d.HTMLElement:c&&"object"==typeof c&&1===c.nodeType&&"string"==typeof c.nodeName)},b.isNodeList=function(a){return a&&"object"==typeof a?"[object NodeList]"===String(a)||"[object StaticNodeList]"===String(a):!1},b.isSelfClosingTag=function(a){return this.isHTMLElement(a)?/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i.test(a.nodeName):void 0},b.readyIEtop=function(a){try{var c=a.document.documentElement;c.doScroll("left");for(var d;d=b.readyQueue.shift();)d()}catch(e){setTimeout(b.readyIEtop,50,a)}},b.readyQueue=[],b.PREDEFINED_TAG_VALUES={IMG:" ",BR:"\n"},b.TAGS_TO_IGNORE=["SCRIPT","STYLE","HEAD","IFRAME","OBJECT"],b.NODE_TYPES={ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12},b}();a.Dom=b}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b=function(){function b(){}return b.createIframe=function(){var a=document.createElement("iframe");return a.style.margin="0px",a.style.padding="0px",a.style.width="0",a.style.height="0",a.style.border="0px",a.style.overflow="hidden",a.setAttribute("scrolling","no"),a.frameBorder="0",a},b.isFullscreen=function(a){return a||(a=document),!!(a.fullscreenElement||a.mozFullScreenElement||a.webkitFullscreenElement||a.msFullscreenElement)},b.getWindow=function(c){if(!c||a.Dom.isNodeList(c))return null;var d=b.getDocument(c);return d.defaultView||d.parentWindow},b.getDocument=function(b){return!b||a.Dom.isNodeList(b)?null:b.ownerDocument},b.toggleFullscreen=function(a){b.isFullscreen()?this.closeFullscreen(a):this.openFullscreen(a)},b.openFullscreen=function(a){a.requestFullscreen?a.requestFullscreen():a.msRequestFullscreen?a.msRequestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullscreen&&a.webkitRequestFullscreen()},b.closeFullscreen=function(a){var c=b.getDocument(a);c.exitFullscreen?c.exitFullscreen():c.msExitFullscreen?c.msExitFullscreen():c.mozCancelFullScreen?c.mozCancelFullScreen():c.webkitExitFullscreen&&c.webkitExitFullscreen()},b.addClass=function(c,d){b.hasClass(c,d)||(c.className+=" "+d,c.className=a.StringHelper.trim(c.className))},b.removeClass=function(c,d){if(b.hasClass(c,d)){var e=c.className.split(" ");e.splice(a.ArrayHelper.indexOf(e,d),1),c.className=a.StringHelper.trim(e.join(" "))}},b.hasClass=function(b,c){return-1!==a.ArrayHelper.indexOf(b.className.split(" "),c)},b.toggleClass=function(a,c){b.hasClass(a,c)?b.removeClass(a,c):b.addClass(a,c)},b.replaceClass=function(a,c,d){!b.hasClass(a,c)&&b.hasClass(a,d)&&(b.removeClass(a,d),b.addClass(a,c))},b.findParentWindows=function(c){var d=[];if(a.Dom.isHTMLElement(c)){var e;e=function(b){b.parent!==b&&"undefined"!=typeof Window&&b.parent instanceof Window?(d.push(b.parent),e(b.parent)):!a.Context.isAmp()&&b.parent!==b&&b.parent.document&&b.parent.location&&b.parent.window&&(d.push(b.parent),e(b.parent))};var f=b.getWindow(c);d.push(f),e(f)}return d},b.forceRepaint=function(a){var b=a.style.lineHeight;a.style.lineHeight="15px",setTimeout(function(){a.style.lineHeight=b},150)},b.findChildWindows=function(b){var c=[];if(a.Dom.isHTMLElement(b))for(var d=b.getElementsByTagName("iframe"),e=0;e=0&&i=0&&jd?k||l:k&&l},b}();a.HTMLHelper=b}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b=function(){function a(){}return a.createXmlHttpRequest=function(){var a=null;if(window.XMLHttpRequest&&(a=new XMLHttpRequest),!a||"withCredentials"in a||(a=window.XDomainRequest?new window.XDomainRequest:null),!a){try{a=new ActiveXObject("MSXML2.XMLHTTP.6.0")}catch(b){try{a=new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(b){throw new Error("could not create XMLHttpRequest nor ActiveXObject")}}a.responseType="msxml-document"}return a},a}();a.Request=b}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){ var b=function(){function b(){}return b.seconds=function(a){if(!a)return NaN;var b=a.split("."),c=b[0].split(":"),d=3600*Number(c[0])+60*Number(c[1])+Number(c[2]);return 2===b.length&&(d=Number(d+"."+b[1])),d},b.offset=function(b){void 0===b&&(b=0);var c=b?Math.floor(b/3600):0;b-=3600*c;var d=b?Math.floor(b/60):0;b-=60*d;var e=(b%1).toFixed(3).substr(1);return b=Math.floor(b),a.StringHelper.pad(c)+":"+a.StringHelper.pad(d)+":"+a.StringHelper.pad(b)+e},b.hasFlash=function(){var a="Shockwave",b="Flash";try{a=new ActiveXObject(a+b+"."+a+b)}catch(c){a=navigator.plugins[a+" "+b]}return!!a},b.hasFlashVersion=function(a){return Number(this.getFlashVersion()[0])>=a},b.getFlashVersion=function(){try{try{var a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");try{a.AllowScriptAccess="always"}catch(b){return["6","0","0"]}}catch(c){}return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1].split(",")}catch(d){try{if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)return(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1].split(",")}catch(e){}}return["0","0","0"]},b.getAudioContext=function(){return window.AudioContext||window.webkitAudioContext},b.extend=function(){for(var a=[],c=0;c1&&(b.debugKey=c[1],b.createDebugButton(b.color),b.recordUserActions())},this.elapsedTime=0,this.logfile={date:(new Date).toString(),device:a.Context.getDevice().toString().replace(/\|/g," "),os:a.Context.getOS().toString().replace(/\|/g," "),browser:a.Context.getBrowser().toString().replace(/\|/g," "),url:location.href,steps:[],logs:[],timeline:[]}}return b.prototype.recordUserActions=function(){var b=this;this.elapsedTime<3e5&&setTimeout(function(){var c,d=b.topWindow.document.getElementsByClassName("teads-player")[0];c=d?{time:b.elapsedTime,scrollX:a.Dom.getScrollLeft(b.topWindow),scrollY:a.Dom.getScrollTop(b.topWindow),screenWidth:a.Dom.getWindowSize(b.topWindow).width,screenHeight:a.Dom.getWindowSize(b.topWindow).height,player:{top:a.Dom.getBoundingClientRect(d).top,height:a.Dom.getBoundingClientRect(d).height,left:a.Dom.getBoundingClientRect(d).left,width:a.Dom.getBoundingClientRect(d).width}}:{time:b.elapsedTime,scrollX:a.Dom.getScrollLeft(b.topWindow),scrollY:a.Dom.getScrollTop(b.topWindow),screenWidth:a.Dom.getWindowSize(b.topWindow).width,screenHeight:a.Dom.getWindowSize(b.topWindow).height,player:{top:0,height:0,left:0,width:0}};var e=b.logfile.timeline[b.logfile.timeline.length-1];e?b.compareTimeEvents(c,e)||b.logfile.timeline.push(c):b.logfile.timeline.push(c),b.elapsedTime+=100,b.recordUserActions()},100)},b.prototype.valid=function(a,c,d,e){this.addValidEvent(a,c,{store:d,type:e}),e==b.infoType.ERROR?this.setStatus(!1,d):3==a&&2==c&&this.setStatus(!0,"ready")},b.prototype.videoEvent=function(a,b,c,d){this.addValidEvent(0,0,{store:{name:a,time:b,percent:c,pixels:d},type:"videoEvent"})},b.prototype.addValidEvent=function(a,b,c){var d={step:a,substep:b,info:c};this.logfile.steps.push(d)},b.prototype.createDebugButton=function(b){var c=this;if(this.debugKey){var d=this.topWindow.document.createElement("div");d.innerHTML='
\n
\n',this.button=d.firstChild,this.button.onclick=function(a){c.saveFile(),a.stopPropagation()},this.topWindow.document.body.appendChild(this.button),this.status=this.button.firstChild,this.status.style.backgroundColor=b,this.status.innerHTML=this.statusDetails,this.loader=this.status.nextSibling,"blue"!=this.color?(this.status.style.display="block",this.loader.style.display="none"):(this.status.style.display="none",this.loader.style.display="block"),a.Context.isAmp()&&teads.helper.AmpResize&&("red"===b&&(teads.helper.AmpResize.ratio=4),setTimeout(function(){return c.forceAmpOpen()},1e3))}},b.prototype.setStatus=function(a,b){void 0===b&&(b="");var c=a?"green":"red";b=b.length>8?b.substr(0,8)+"..":b,this.button?(this.status.style.backgroundColor=c,this.status.style.display="block",this.loader.style.display="none",this.status.innerHTML=b):(this.color=c,this.statusDetails=b)},b.prototype.forceAmpOpen=function(){var a=this;if(!teads.helper.AmpResize.isVisible()){var b=setTimeout(function(){return a.forceAmpOpen()},1e3);teads.helper.AmpResize.open(function(){a.button.style.display="none",setTimeout(function(){return a.button.style.display="block"},100),clearTimeout(b)})}},b.prototype.saveFile=function(){var b=this;if(this.debugKey){this.button.onclick=function(a){a.stopPropagation()},this.logfile.logs=a.Logger.getFullLogs();var c=this.debugKey+"_"+Date.now()+".json",d=function(){setTimeout(function(){b.button.onclick=function(a){b.saveFile(),a.stopPropagation()}},500)},e=a.Request.createXmlHttpRequest();e.open("PUT",this.serviceUrl+"/livedebug/upload/"+c,!0),e.setRequestHeader("Content-Type","application/json; charset=utf-8"),e.onload=function(){d()},e.send(a.JSON.stringify(this.logfile)),e.onerror=function(){d()},window.open(this.serviceUrl+"/livedebug?file="+c)}},b.prototype.compareTimeEvents=function(a,b){return a.scrollX==b.scrollX&&a.scrollY==b.scrollY&&a.screenWidth==b.screenWidth&&a.screenHeight==b.screenHeight&&a.player.top==b.player.top&&a.player.height==b.player.height&&a.player.left==b.player.left&&a.player.width==b.player.width},b.prototype.getDebugKey=function(){return this.debugKey},b.infoType={TAG:"tag",MODAL:"modal",STRING:"string",VIDEO_EVENT:"videoEvent",ERROR:"error"},b}();a.Wigo=b,a.WIGOI=a.WIGOI||new b}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b=function(){function b(){}return b.track=function(a,b,c){void 0===c&&(c="");try{var d=b+(b.indexOf("?")<0?"?":"&")+encodeURIComponent(c)+encodeURIComponent(this.stringifyData(a)),e=new Image;e.src=d}catch(f){}},b.stringifyData=function(b){var c=function(b){var c;try{c=a.JSON.stringify(b)}catch(d){b.toString&&(c=b.toString())}return c};if(b.length)for(var d in b)"function"==typeof b[d]?b[d]=b[d].toString():"object"==typeof b[d]&&(b[d]=c(b[d]));else b=c(b);return b.toString?b.toString():b},b}();a.LogSender=b}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b=function(){function b(){this.logger=new a.Logger("Sumologic"),this.prefixPattern="[timestamp][sessionId][type] ",this.isEnabled=!1,this.logStorage=[],this.initTime=(new Date).getTime()}return b.prototype.init=function(b,c){var d=this;void 0===c&&(c=!1),this.collectorUrl=b,this.sessionId=a.StringHelper.rand(10,!1),this.canSend=c||Math.random()<=.1,this.logger.debug("Sumologic init with sessionId="+this.sessionId),this.isEnabled=!!b,this.isEnabled||this.logger.warn("Missing collector URL. Maybe you forgot to use Sumologic.init(collectorUrl)?"),this.canSend&&this.isEnabled&&this.logStorage.length&&a.ArrayHelper.forEach(this.logStorage,function(a){return d[a[0]].apply(d,a[1])})},b.prototype.getCollectorUrl=function(){return this.collectorUrl},b.prototype.getSessionId=function(){return this.sessionId},b.prototype.sendMetadata=function(a,b){void 0===b&&(b=!1),this.send("metadata",a,b)},b.prototype.sendError=function(a,b){void 0===b&&(b=!1),this.send("error",a,b)},b.prototype.sendWarning=function(a,b){void 0===b&&(b=!1),this.send("warning",a,b)},b.prototype.sendInfo=function(a,b){void 0===b&&(b=!1),this.send("info",a,b)},b.prototype.send=function(b,c,d){if(void 0===d&&(d=!1),this.isEnabled){if(!d&&!this.canSend)return void this.logger.warn("Logs were not sent (sampling)");var e=this.prefixPattern.replace("timestamp",String((new Date).getTime()-this.initTime)).replace("sessionId",this.sessionId).replace("type",b);this.logger.debug("Send log to collector",e,c),a.LogSender.track(c,this.collectorUrl,e)}else this.logger.warn("Could not send logs, Sumologic service disaled"),this.logStorage.push(["send",arguments])},b.prototype.sendRaw=function(b,c){if(void 0===c&&(c=!1),this.isEnabled){if(!c&&!this.canSend)return this.logger.warn("Logs were not sent (sampling)"),void this.logStorage.push(["sendRaw",arguments]);a.LogSender.track(b,this.collectorUrl),this.logger.debug("Send raw log to collector",b)}},b.collectors={format:"https://endpoint2.collection.sumologic.com/receiver/v1/http/ZaVnC4dhaV3tMuL-jxvu514sKTR1JLPJH0zZLzvxn3qMwWPdO_mBRbSGTyZgi2P4CqAJ4tfCX6IriPgecDkMFRxDm1GAGUben7xo9S92iY-h9z-o4eCwqg==",player:"https://endpoint2.collection.sumologic.com/receiver/v1/http/ZaVnC4dhaV2OstA92K8Xbj_kskBs5tjvp3fnz5Kd87xTE6v-AevmCgsG9SX_kqjlNgr2zKEpTQZWkuy61qzMee2njNfpDU2z7EIYjtXb-wRLLbHhGRVIOg==",router:"https://endpoint2.collection.sumologic.com/receiver/v1/http/ZaVnC4dhaV0yoMPXbPr1DHlBdbxeDuo3K5k3sGyLYmTOy4VGTwjLazFajGH6fqEKM4WlaPVtnZSCp4oebZS2mDiHAfUyzLxdRx_1JbayoNzbvQ26FTVmqQ=="},b}();a.Sumologic=b}(teads||(teads={}));var __extends=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)};try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b=function(){function a(a,b){this.code=a,this.error=b}return a.prototype.getMessage=function(){return"Error #"+this.code.id+": "+this.code.message},a.prototype.getId=function(){return this.code.id},a.prototype.getStackTrace=function(){return this.error&&this.error.stack?this.error.stack:""},a.prototype.toString=function(){return this.getMessage()},a}();a.Exception=b;var c=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b.XML_PARSE={id:100,message:"XML parsing error"},b.XML_INVALID_SCHEMA={id:101,message:'VAST schema validation error: expected "%s" but found "%s"'},b.UNSUPPORTED_VERSION={id:102,message:"VAST version of response not supported. Expected VAST2 or VAST3 but VAST1 found"},b.TRAFFICKING={id:200,message:"Trafficking error. Video player received an Ad type that it was not expecting and/or cannot display"},b.LINEARITY={id:201,message:"Video player expecting different linearity"},b.DURATION={id:202,message:"Video player expecting different duration"},b.SIZE={id:203,message:"Video player expecting different size"},b.WRAPPER={id:300,message:"General Wrapper error"},b.WRAPPER_TIMEOUT={id:301,message:"Timeout of VAST URI provided in Wrapper element, or of VAST URI provided in a subsequent Wrapper element (URI was either unavailable or reached a timeout as defined by the video player)"},b.WRAPPER_LIMIT={id:302,message:"Wrapper limit reached, as defined by the video player. Too many Wrapper responses have been received with no InLine response"},b.NO_ADS={id:303,message:"No Ads VAST response after one or more Wrappers"},b.NO_MEDIAFILE={id:304,message:"No Mediafile found in VAST file"},b.GENERAL_LINEAR={id:400,message:"General Linear error. Video player is unable to display the Linear Ad."},b.FILE_NOT_FOUND={id:401,message:"File not found. Unable to find Linear/MediaFile from URI."},b.MEDIAFILE_TIMEOUT={id:402,message:"Timeout of MediaFile URI."},b.UNSUPPORTED_MEDIAFILE={id:403,message:"Could not find MediaFile that is supported by this video player, based on the attributes of the MediaFile element."},b.MEDIAFILE_DISPLAY={id:405,message:"Problem displaying MediaFile. Video player found a MediaFile with supported type but could not display it. MediaFile may include: unsupported codecs, different MIME type than MediaFile@type, unsupported delivery method, etc."},b.GENERAL_NONLINEAR={id:500,message:"General NonLinearAds error."},b.CREATIVE_DIMENSIONS={id:501,message:"Unable to display NonLinear Ad because creative dimensions do not align with creative display area (i.e. creative dimension too large)."},b.NONLINEAR_FETCH={id:502,message:"Unable to fetch NonLinearAds/NonLinear resource."},b.SUPPORTED_NONLINEAR_NOT_FOUND={id:503,message:"Could not find NonLinear resource with supported type."},b.GENERAL_COMPANION={id:600,message:"General CompanionAds error."},b.COMPANION_DIMENSIONS={id:601,message:"Unable to display Companion because creative dimensions do not fit within Companion display area (i.e., no available space)."},b.COMPANION_DISPLAY={id:602,message:"Unable to display Required Companion."},b.COMPANION_FETCH={id:603,message:"Unable to fetch CompanionAds/Companion resource."},b.SUPPORTED_COMPANION_NOT_FOUND={id:604,message:"Could not find Companion resource with supported type."},b.UNDEFINED={id:900,message:"Undefined Error"},b.GENERAL={id:901,message:"General VPAID error"},b}(b);a.VastException=c}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b=function(){function a(){}return a.isBase64=function(a){var b=new RegExp("^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"),c=b.exec(a);return!!(c&&c.length>0)},a.encode=function(a){return window.btoa?btoa(a):a},a.decode=function(a){return window.atob?atob(a):a},a}();a.Base64=b}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b=function(){function b(){}return b.decode=function(b){if("object"==typeof b&&b.AdParameters&&"string"==typeof b.AdParameters&&(b=b.AdParameters),b&&"string"==typeof b){a.Base64.isBase64(b)?b=a.Base64.decode(b):0===b.indexOf("%7B")&&(b=decodeURIComponent(b));try{b=a.JSON.parse(b)}catch(c){throw"Unable to JSON.parse adParameter string: "+b}}if(!b||"object"!=typeof b)throw"adParameter is not an object: "+b;return b},b}();a.AdParameterHelper=b}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(a){var b=function(){function a(){this.error=[],this.click=[],this.pause=[],this.resume=[],this.skip=[],this.creativeView=[],this.start=[],this.firstQuartile=[],this.midpoint=[],this.thirdQuartile=[],this.complete=[],this.impression=[],this.close=[],this.progress=[],this.mute=[],this.unmute=[],this.rewind=[],this.fullscreen=[],this.exitFullscreen=[],this.expand=[],this.collapse=[],this.acceptInvitationLinear=[],this.acceptInvitation=[],this.closeLinear=[],this.noAd=[],this.noLinearAd=[],this.customClicks=[]}return a}();a.TrackingDefinition=b;var c=function(){function a(){}return a.error="error",a.click="click",a.pause="pause",a.resume="resume",a.skip="skip",a.creativeView="creativeView",a.start="start",a.firstQuartile="firstQuartile",a.midpoint="midpoint",a.thirdQuartile="thirdQuartile",a.complete="complete",a.impression="impression",a.close="close",a.progress="progress",a.mute="mute",a.unmute="unmute",a.rewind="rewind",a.fullscreen="fullscreen",a.exitFullscreen="exitFullscreen",a.expand="expand",a.collapse="collapse",a.acceptInvitationLinear="acceptInvitationLinear",a.acceptInvitation="acceptInvitation",a.closeLinear="closeLinear",a.noAd="noAd",a.noLinearAd="noLinearAd",a.customClicks="customClicks",a}();a.TrackingEvent=c}(b=a.vast||(a.vast={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(a){var b=function(){function a(){}return a.getXMLDoc=function(a){var b;if(window.DOMParser){var c=new DOMParser;b=c.parseFromString(a,"text/xml")}else b=new ActiveXObject("Msxml2.DOMDocument.3.0"),b.async=!1,b.loadXML(a);return b},a.getNodeContent=function(b){if(b)try{var c=a.getFirstChild(b);return c?a.getNodeTextContent(c):""}catch(d){}},a.getAttributeValue=function(a,b){try{if(a.attributes[b])return String(a.attributes[b].value);for(var c=0;cb;b++)this.tracking[d].push(a.tracking[d][b]);for(b=0,c=a.mediaFiles.length;c>b;b++)this.mediaFiles.push(a.mediaFiles[b]);for(b=0,c=a.clickThrough.length;c>b;b++)this.clickThrough.push(a.clickThrough[b]);for(b=0,c=a.extensions.length;c>b;b++)this.extensions.push(a.extensions[b]);!this.skippable&&a.skippable&&(this.skippable=!0,this.skipDelay=a.skipDelay)},b}();a.LinearAd=b}(b=a.vast||(a.vast={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){var c=function(){function b(){}return b.execCallback=function(c,d,e){try{c.apply(c,d)}catch(f){var g=new a.Logger("Callback"),h="user callback threw an exception: "+f; if(g.error(h,f,c,d),e){var i=a.VastException.UNDEFINED;i.message=h,b.execCallback(e,[new a.VastException(i,f)])}}},b}();b.CallbackHelper=c}(b=a.vast||(a.vast={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){var c=function(){function c(){}return c.parse=function(c,d,e){try{var f=b.XMLHelper.getXMLDoc(c),g=f.documentElement;if(!g)return b.CallbackHelper.execCallback(e,[new a.VastException(a.VastException.NO_ADS)]);var h=g.getElementsByTagName("Ad")[0];if(!h)return b.CallbackHelper.execCallback(e,[new a.VastException(a.VastException.NO_ADS)]);var i=new b.LinearAd;if(i.version=Number(b.XMLHelper.getAttributeValue(g,"version")),i.version<2)return b.CallbackHelper.execCallback(e,[new a.VastException(a.VastException.UNSUPPORTED_VERSION)]);var j=!!h.getElementsByTagName("Wrapper").length,k=h.getElementsByTagName("Linear")[0];if(!j&&!k)return b.CallbackHelper.execCallback(e,[new a.VastException(a.VastException.LINEARITY)]);i.id=b.XMLHelper.getAttributeValue(h,"id"),i.adTagUri=b.XMLHelper.getNodeContent(h.getElementsByTagName("VASTAdTagURI")[0]),i.title=b.XMLHelper.getNodeContent(h.getElementsByTagName("AdTitle")[0]),i.adSystem=b.XMLHelper.getNodeContent(h.getElementsByTagName("AdSystem")[0]);for(var l=h.getElementsByTagName("ClickThrough"),m=0,n=l.length;n>m;m++)i.clickThrough.push(b.XMLHelper.getNodeContent(l[m]));for(var o=h.getElementsByTagName("Impression"),m=0,n=o.length;n>m;m++)i.tracking.impression.push({url:b.XMLHelper.getNodeContent(o[m]),data:null});var p=h.getElementsByTagName("ClickTracking");for(m=0,n=p.length;n>m;m++)i.tracking.click.push({url:b.XMLHelper.getNodeContent(p[m]),data:null});var q=h.getElementsByTagName("Error");for(m=0,n=q.length;n>m;m++)i.tracking.error.push({url:b.XMLHelper.getNodeContent(q[m]),data:null});if(k){var r=a.Utils.seconds(b.XMLHelper.getAttributeValue(k,"skipoffset"));i.skippable=!isNaN(r),i.skipDelay=r||0,i.duration=a.Utils.seconds(b.XMLHelper.getNodeContent(k.getElementsByTagName("Duration")[0])),i.adParameters=b.XMLHelper.getNodeContent(k.getElementsByTagName("AdParameters")[0]);var s=k.getElementsByTagName("Tracking");for(m=0,n=s.length;n>m;m++){var t=b.XMLHelper.getAttributeValue(s[m],"event");if(i.tracking.hasOwnProperty(t)){var u=null;if("progress"===t)if(u=b.XMLHelper.getAttributeValue(s[m],"offset"),u.indexOf(":")>0)u=a.Utils.seconds(u);else{var v=a.StringHelper.trim(u).match(/^([0-9\.]+)%$/);if(!v){this.logger.error("Wrong offset for progress tracking: "+u);continue}u=i.duration*Number(v[1])/100}i.tracking[t].push({url:b.XMLHelper.getNodeContent(s[m]),data:u})}}var w=k.getElementsByTagName("MediaFile");for(m=0,n=w.length;n>m;m++){var x=w[m];i.mediaFiles.push({type:b.XMLHelper.getAttributeValue(x,"type"),url:b.XMLHelper.getNodeContent(x),width:Number(b.XMLHelper.getAttributeValue(x,"width")),height:Number(b.XMLHelper.getAttributeValue(x,"height")),delivery:b.XMLHelper.getAttributeValue(x,"delivery"),bitrate:Number(b.XMLHelper.getAttributeValue(x,"bitrate")),api:b.XMLHelper.getAttributeValue(x,"apiFramework"),scalable:!!b.XMLHelper.getAttributeValue(x,"scalable"),id:b.XMLHelper.getAttributeValue(x,"id"),minBitrate:Number(b.XMLHelper.getAttributeValue(x,"minBitrate")),maxBitrate:Number(b.XMLHelper.getAttributeValue(x,"maxBitrate")),maintainAspectRatio:!!b.XMLHelper.getAttributeValue(x,"maintainAspectRatio"),codec:b.XMLHelper.getAttributeValue(x,"codec")})}}var y=h.getElementsByTagName("Extension");for(m=0,n=y.length;n>m;m++)i.extensions.push({type:b.XMLHelper.getAttributeValue(y[m],"type"),content:b.XMLHelper.getNodeContent(y[m]),xml:y[m]});b.CallbackHelper.execCallback(d,[i],e)}catch(z){b.CallbackHelper.execCallback(e,[new a.VastException(a.VastException.XML_PARSE,z)])}},c.logger=new a.Logger("vast.VASTParser"),c}();b.VASTParser=c}(b=a.vast||(a.vast={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(a){a.asset={corsswf:"cors.swf"}}(b=a.vast||(a.vast={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){var c=function(){function c(){}return c.load=function(d,e,f,g,h){var i=this;void 0===h&&(h=!0),d=c.updateUrlPlaceholder(d);var j=d.match(/\/\/.*/);d=j?a.Utils.getProtocol()+j[0]:d,this.logger.info("Loading VAST file URL:",d," - credentials:",h);var k=function(){if(h)return i.logger.warn("load file with credentials failed, try without credentials before flash proxy"),void c.load(d,e,f,g,!1);if(i.logger.warn("load file with javascript failed"),a.Utils.hasFlash())c.loadWithFlash(d,e,f,g);else{var j=a.VastException.UNDEFINED;j.message="Could not load with SWF proxy, no flash plugin installed",i.logger.warn(j.message,d),b.CallbackHelper.execCallback(g,[new a.VastException(j)])}};try{var l=a.Request.createXmlHttpRequest();l.open("GET",d,!0),l.withCredentials=h;var m=function(){m=function(){};var b;if("string"==typeof l.responseXML)b=l.responseXML;else if("string"==typeof l.responseText)b=l.responseText;else{if("string"!=typeof l.response)return void k();b=l.response}f(a.StringHelper.trim(b))};l instanceof XMLHttpRequest?l.onreadystatechange=function(){if(4===l.readyState){if(l.status<200||l.status>=400)return i.logger.warn("server return an invalid status code "+l.status),k();m()}}:(l.onerror=k,l.ontimeout=k,l.onprogress=function(){},l.timeout=5e3,l.onload=m),l.send()}catch(n){this.logger.warn("Could not load XML file directly",n),this.logger.info("Retrying with a SWF helper in case there are just CORS headers missing"),k()}},c.loadWithFlash=function(c,d,e,f){var g=this,h="vastloader_"+Date.now()+"_"+Math.round(1e3*Math.random());this.logger.info("try loading file with flash cors proxy",h),window[h]=function(d,i){d?(g.logger.info("Flash CORS proxy successfully load VAST file",c),b.CallbackHelper.execCallback(e,[a.StringHelper.trim(decodeURIComponent(i))],f)):(g.logger.error("Unable to load VAST file with flash CORS proxy"),b.CallbackHelper.execCallback(f,[new a.VastException(a.VastException.WRAPPER_TIMEOUT)])),window[h]=void 0};var i=d.assetsUrl+"/"+b.asset.corsswf,j=document.createElement("div");j.innerHTML='',document.body.appendChild(j)},c.updateUrlPlaceholder=function(b){try{return b.replace(/\[timestamp\]/gi,String(Date.now())).replace(/\[(random|cachebusting|random_number)\]/gi,a.StringHelper.rand(8))}catch(c){this.logger.warn("updateUrlPlaceholder threw an exception: "+c)}return b},c.logger=new a.Logger("vast.VASTLoader"),c}();b.VASTLoader=c}(b=a.vast||(a.vast={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){var c=function(){function c(c){this.config=c,this.logger=new a.Logger("vast.VASTLib"),this.definition=new b.LinearAd,this.logger.info("new",this)}return c.prototype.load=function(a,c,d){var e=this;this.definition.url||(this.definition.url=a),b.VASTLoader.load(a,this.config,function(a){e.parse(a,c,d)},function(c){e.logger.error("Could not load XML file",a,e.definition.url,c),b.CallbackHelper.execCallback(d,[c])})},c.prototype.parse=function(c,d,e){var f=this;b.VASTParser.parse(c,function(g){try{f.definition.merge(g),g.adTagUri?f.load(g.adTagUri,d,e):0===g.mediaFiles.length?(f.logger.error("No media files found"),b.CallbackHelper.execCallback(e,[new a.VastException(a.VastException.NO_MEDIAFILE)])):b.CallbackHelper.execCallback(d,[f.definition],e)}catch(h){f.logger.error("Could not parse XML string",c,h),b.CallbackHelper.execCallback(e,[new a.VastException(a.VastException.UNDEFINED,h)])}},e)},c.prototype.parseJSON=function(a,b,c){this.logger.error("JSON parser is not implemented yet")},c}();b.VASTLib=c}(b=a.vast||(a.vast={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(a){var b=function(){function a(a,b){void 0===b&&(b=null),this.type=a,this.data=b}return a.AdLoaded="AdLoaded",a.AdStarted="AdStarted",a.AdStopped="AdStopped",a.AdSkipped="AdSkipped",a.AdLinearChange="AdLinearChange",a.AdSizeChange="AdSizeChange",a.AdExpandedChange="AdExpandedChange",a.AdSkippableStateChange="AdSkippableStateChange",a.AdRemainingTimeChange="AdRemainingTimeChange",a.AdDurationChange="AdDurationChange",a.AdVolumeChange="AdVolumeChange",a.AdImpression="AdImpression",a.AdVideoStart="AdVideoStart",a.AdVideoFirstQuartile="AdVideoFirstQuartile",a.AdVideoMidpoint="AdVideoMidpoint",a.AdVideoThirdQuartile="AdVideoThirdQuartile",a.AdVideoComplete="AdVideoComplete",a.AdClickThru="AdClickThru",a.AdInteraction="AdInteraction",a.AdUserAcceptInvitation="AdUserAcceptInvitation",a.AdUserMinimize="AdUserMinimize",a.AdUserClose="AdUserClose",a.AdPaused="AdPaused",a.AdPlaying="AdPlaying",a.AdLog="AdLog",a.AdError="AdError",a}();a.VPAIDEvent=b}(b=a.vpaid||(a.vpaid={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(a){!function(a){a[a.UNLOADED=-1]="UNLOADED",a[a.READY=0]="READY",a[a.LOADING=1]="LOADING",a[a.LOADED=2]="LOADED"}(a.LoaderStatus||(a.LoaderStatus={}));a.LoaderStatus}(b=a.vpaid||(a.vpaid={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){var c=function(){function b(b,c){this.container=b,this.config=c,this.loadTimeout=8e3,this.logger=new a.Logger("vpaid.BaseVPAIDContainer"),this.id=c.id||a.StringHelper.rand(20,!1)}return b.prototype.destroy=function(){try{!this.isDetroyed&&this.creativeContainer?(this.isDetroyed=!0,this.creativeContainer.parentNode.removeChild(this.creativeContainer),this.creativeContainer=null,this.vpaid=null):this.isDetroyed&&this.logger.error("Cannot call destroy twice !")}catch(a){this.logger.error("unable to remove VPAID creative container: "+a)}},b.prototype.getVPAID=function(){return this.vpaid},b}();b.BaseVPAIDContainer=c}(b=a.vpaid||(a.vpaid={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){var c=function(c){function d(){c.apply(this,arguments)}return __extends(d,c),d.prototype.loadVpaid=function(b,c,d){var e=this;this.mainContainer=document.createElement("div"),this.mainContainer.style.position="relative",this.container.appendChild(this.mainContainer),this.creativeContainer=a.HTMLHelper.createIframe(),this.creativeContainer.id="vpaid-"+this.id,this.mainContainer.appendChild(this.creativeContainer);var f=!0,g=function(a){f&&(f=!1,d(a))},h=a.HTMLHelper.getWindow(this.mainContainer);this.callbackName="vpaidjsload_"+this.id,h[this.callbackName]=function(a){if(h[e.callbackName]=function(){},a)try{return e.creativeContainer=h.document.getElementById("vpaid-"+e.id),e.vpaid=e.creativeContainer.contentWindow.getVPAIDAd(),f=!1,void c(e.vpaid)}catch(d){g("VPAIDJS getVPAIDAd throw an exception "+d)}else g("Unable to load VPAID "+b);e.destroy()};var i='
';this.creativeContainer.contentWindow.document.write(i),this.creativeContainer.contentWindow.document.close(),this.vpaidContainer=this.creativeContainer.contentWindow.document.getElementById("vpaid-container"),this.videoContainer=this.creativeContainer.contentWindow.document.getElementById("video-container"),setTimeout(function(){g("Timeout error, creative takes too much time to load")},this.loadTimeout)},d.prototype.getEnvironmentVars=function(a){if(!this.environmentVars){var b=this.vpaidContainer,c={slot:b,videoSlot:this.videoContainer.getElementsByTagName("video")[0],videoSlotCanAutoPlay:!0};a||(a=c);for(var d in c)a[d]||(a[d]=c[d]);this.environmentVars=a,this.environmentVars.slot!==b&&(this.mainContainer.style.display="none")}return this.environmentVars},d.prototype.destroy=function(){c.prototype.destroy.call(this),this.mainContainer&&this.mainContainer.parentNode&&(this.mainContainer.parentNode.removeChild(this.mainContainer),this.mainContainer=null,this.videoContainer=null)},d.prototype.resize=function(a,b){if(this.currentWidth=a,this.currentHeight=b,this.mainContainer&&(this.mainContainer.style.width=a+"px",this.mainContainer.style.height=b+"px"),this.creativeContainer&&(this.creativeContainer.style.width=a+"px",this.creativeContainer.style.height=b+"px"),this.videoContainer){this.videoContainer.style.width=a+"px",this.videoContainer.style.height=b+"px";var c=this.videoContainer.getElementsByTagName("video")[0];c&&(c.videoWidth=a,c.videoHeight=b,c.width=a,c.height=b,c.style.width=a+"px",c.style.height=b+"px")}},d.prototype.getType=function(){return b.CreativeType.JS},d.prototype.registerVPAIDEventHandler=function(a){for(var c in b.VPAIDEvent)this.vpaid.subscribe(b.VPAIDHelper.createVPAIDEventCallback(a,c),c,this)},d}(b.BaseVPAIDContainer);b.VPAIDJSContainer=c}(b=a.vpaid||(a.vpaid={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(a){a.asset={vpaidswfwrapper:"vpaidwrapper.swf",sandbox:"vpaid-sandbox.html"}}(b=a.vpaid||(a.vpaid={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){var c=function(c){function d(){c.apply(this,arguments)}return __extends(d,c),d.prototype.loadVpaid=function(c,d,e){var f=this;if(!a.Utils.hasFlash())return e("Flash plugin is not installed !");var g=!0,h=function(a){g&&(g=!1,f.destroy(),e(a))};this.callbackName="handleVPAIDEvent"+this.id,this.window=a.HTMLHelper.getWindow(this.container),this.window[this.callbackName]=function(a){return f.window[f.callbackName]=function(){},"ready"===a.type?(f.vpaid=f.creativeContainer,g=!1,void d(f.vpaid)):void(a.type===b.VPAIDEvent.AdError&&h(a.data))};var i="vpaid-"+this.id,j=this.config.path+"/"+b.asset.vpaidswfwrapper;this.container.innerHTML='',this.creativeContainer=this.window.document.getElementById(i),setTimeout(function(){h("Timeout error, creative takes too much time to load")},this.loadTimeout)},d.prototype.destroy=function(){c.prototype.destroy.call(this),this.window[this.callbackName]=function(){}},d.prototype.registerVPAIDEventHandler=function(a){this.window[this.callbackName]=a},d.prototype.resize=function(){},d.prototype.getEnvironmentVars=function(a){return{slot:this.creativeContainer,videoSlot:null,videoSlotCanAutoPlay:!0}},d.prototype.getType=function(){return b.CreativeType.SWF},d}(b.BaseVPAIDContainer);b.VPAIDSWFContainer=c}(b=a.vpaid||(a.vpaid={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(a){var b=function(){function a(){}return a.prototype.getVPAID=function(){return this},a.prototype.initAd=function(a,b,c,d,e,f){this.vpaidguard("initAd",[a,b,c,d,e,f])},a.prototype.skipAd=function(){this.vpaidguard("skipAd")},a.prototype.resizeAd=function(a,b,c){void 0===c&&(c="normal"),this.vpaidguard("resizeAd",[a,b,c])},a.prototype.handshakeVersion=function(a){return this.vpaidguard("handshakeVersion",[a])},a.prototype.startAd=function(){this.vpaidguard("startAd",[])},a.prototype.stopAd=function(){this.vpaidguard("stopAd",[])},a.prototype.pauseAd=function(){this.vpaidguard("pauseAd",[])},a.prototype.resumeAd=function(){this.vpaidguard("resumeAd",[])},a.prototype.expandAd=function(){this.vpaidguard("expandAd",[])},a.prototype.collapseAd=function(){this.vpaidguard("collapseAd",[])},a.prototype.getAdLinear=function(){return this.vpaidguard("getAdLinear",[])},a.prototype.getAdWidth=function(){return this.vpaidguard("getAdWidth",[])},a.prototype.getAdHeight=function(){return this.vpaidguard("getAdHeight",[])},a.prototype.getAdExpanded=function(){return this.vpaidguard("getAdExpanded",[])},a.prototype.getAdSkippableState=function(){return this.vpaidguard("getAdSkippableState",[])},a.prototype.getAdRemainingTime=function(){return this.vpaidguard("getAdRemainingTime",[])},a.prototype.getAdDuration=function(){return this.vpaidguard("getAdDuration",[])},a.prototype.getAdVolume=function(){return this.vpaidguard("getAdVolume",[])},a.prototype.getAdCompanions=function(){return this.vpaidguard("getAdCompanions",[])},a.prototype.getAdIcons=function(){return this.vpaidguard("getAdIcons",[])},a.prototype.setAdVolume=function(a){return this.vpaidguard("setAdVolume",[a])},a.prototype.subscribe=function(a,b,c){this.vpaidguard("subscribe",[a,b,c])},a.prototype.unsubscribe=function(a,b){this.vpaidguard("unsubscribe",[a,b])},a.prototype.setVPAID=function(a){this.vpaid=a},a.prototype.vpaidguard=function(a,b){void 0===b&&(b=[]);try{return this.callVPAIDMethod(a,b)}catch(c){}},a.prototype.callVPAIDMethod=function(a,b){return void 0===b&&(b=[]),this.vpaid[a].apply(this.vpaid,b)},a}();a.VPAIDJSGuard=b}(b=a.vpaid||(a.vpaid={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){var c=function(){function c(a,b,c){void 0===c&&(c="*"),this.currentWindow=a,this.targetWindow=b,this.domain=c}return c.prototype.setClientCallback=function(a){var b=this;this.setCallback(function(c){var d=b.parseEvent(c);a(d)})},c.prototype.setServerCallback=function(a){var b=this;this.setCallback(function(c){a(b.parse(c))})},c.prototype.removeCallback=function(){this.currentWindow.removeEventListener("message",this.callback,!1)},c.prototype.dispatchEvent=function(a,b){this.post(this.targetWindow,this.stringify(a,b))},c.prototype.callMethod=function(a,b){this.post(this.targetWindow,this.stringify(a,b))},c.prototype.parseEvent=function(a){var c=this.parse(a);return new b.VPAIDEvent(c.name,c.data)},c.prototype.post=function(a,b){a.postMessage(b,this.domain)},c.prototype.stringify=function(b,d){var e=b+c.splitChar+(void 0!==d?a.Base64.encode(a.JSON.stringify(d)):"");return e},c.prototype.parse=function(b){var d,e=b.data.split(c.splitChar),f=e[0];return e[1]&&(d=a.JSON.parse(a.Base64.decode(e[1]))),{name:f,data:d}},c.prototype.setCallback=function(a){var b=this;this.callback=function(c){c.source===b.targetWindow&&"string"==typeof c.data&&a(c)},this.currentWindow.addEventListener("message",this.callback,!1)},c.splitChar="_",c}();b.PostMessage=c}(b=a.vpaid||(a.vpaid={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){var c=function(){function c(d,e){var f=this;this.container=d,this.assetPath=e,this.logger=new a.Logger("vpaid.PostMessageServer"),this.timerDelay=250,this.logger.info("Init postMessageAPI",d),this.window=window,this.postMessage=new b.PostMessage(window,window.parent),this.postMessage.setServerCallback(function(a){f.callMethod(a.name,a.data)}),this.postMessage.dispatchEvent(c.READY_EVENT),this.logger.info("End Init postMessageAPI",d,window,window.parent)}return c.prototype.callMethod=function(a,d){switch(this.logger.info("call method "+a,d),a){case b.PostMessageClient.LOADVPAID_METHOD:return this.loadVpaid(d[0]);case b.PostMessageClient.SETCONFIG_METHOD:this.config=d[0],this.logger.info("Received configuration Object",this.config),this.config.sandbox=!1,this.config.path=this.assetPath,this.postMessage.dispatchEvent(c.CONFIGREADY_EVENT);break;default:this.callVPAIDMethod(a,d)}},c.prototype.callVPAIDMethod=function(a,c){try{return this.vpaid[a].apply(this.vpaid,c)}catch(d){var e="Error calling methog "+a+"("+c+")";this.postMessage.dispatchEvent(b.VPAIDEvent.AdLog,e),this.logger.error(e)}},c.prototype.loadVpaid=function(a){var d=this,e=new b.VPAIDLoader(this.container,this.config);e.load(a,function(a){d.logger.info("VPAID Loaded !",a),d.vpaid=a;var e=function(a){return function(){for(var c=[],e=0;e=0&&(d[e]=function(){})},c.prototype.clearListeners=function(){this.listeners={},this.listenersScope={}},c.prototype.handleEvent=function(a,c){for(var d=this.listeners[a.type]||[],e=0,f=d.length;f>e;e++)try{var g=[];if(a.data)switch(a.type){case b.VPAIDEvent.AdClickThru:g=[a.data.url,a.data.id,a.data.playerHandles];break;case b.VPAIDEvent.AdLog:case b.VPAIDEvent.AdError:g=[a.data];break;case b.VPAIDEvent.AdInteraction:g=[a.data.id]}d[e].apply(this.listenersScope[a.type][e],g)}catch(h){if(c)throw"failed to log error on callback: "+a.data;this.handleEvent({type:b.VPAIDEvent.AdLog,data:"Callback #"+e+" on event "+a.type+" throws an exception: "+h},!0)}},c}();b.EventHandler=c}(b=a.vpaid||(a.vpaid={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){var c=function(){function c(c,d){this.container=c,this.config=d,this.timeout=5e3,this.vpaidAttribute={},this.logger=new a.Logger("vpaid.PostMessageClient"),this.eventHandler=new b.EventHandler,this.mainContainer=document.createElement("div"),this.mainContainer.style.position="relative",c.appendChild(this.mainContainer),this.iframeContainer=a.HTMLHelper.createIframe(),this.mainContainer.appendChild(this.iframeContainer),this.postMessage=new b.PostMessage(window,this.iframeContainer.contentWindow)}return c.prototype.initAPI=function(a,d,e){var f=this;this.logger.info("init iframe API on url "+a);var g,h=function(a){a.type===b.PostMessageServer.READY_EVENT?(f.logger.info("Got ready event from server !"),f.postMessage.callMethod(c.SETCONFIG_METHOD,[f.config])):a.type===b.PostMessageServer.CONFIGREADY_EVENT&&(f.logger.info("Received configuration ready form server"),f.postMessage.removeCallback(),f.apiReady=!0,clearTimeout(g),d())};this.postMessage.setClientCallback(h),this.iframeContainer.src=a,g=setTimeout(function(){if(!f.apiReady){f.postMessage.removeCallback();var b="server "+a+" didn't reply after "+f.timeout+"ms";e(b),f.logger.error(b)}},this.timeout)},c.prototype.loadVpaid=function(a,d,e){var f=this;this.logger.info("Request load VPAID "+a);var g;if(!this.apiReady){var h="API is not ready, before use loadVpaid, you must init the API with the method initAPI";return this.logger.error(h),e(h)}var i=function(a){return a.type===b.PostMessageServer.VPAIDLOADED_EVENT?(f.logger.info("received VPAID loaded from server!"),f.postMessage.removeCallback(),clearTimeout(g),f.onVpaidLoaded(d)):a.type===b.PostMessageServer.VPAIDLOADEDERROR_EVENT?(clearTimeout(g),e(a.data)):void 0};this.postMessage.setClientCallback(i),g=setTimeout(function(){f.postMessage.removeCallback();var b="Timeout Error : Unable to load vpaid "+a+", server did not reply after "+f.timeout+"ms";e(b),f.logger.error(b)},this.timeout),this.postMessage.callMethod(c.LOADVPAID_METHOD,[a])},c.prototype.getVPAID=function(){return this.vpaid},c.prototype.callVPAIDMethod=function(a,b){return void 0===b&&(b=[]),c.getters.indexOf(a)>=0?this.vpaidAttribute[a]:this.postMessage.callMethod(a,b)},c.prototype.getIframeContainer=function(){return this.iframeContainer},c.prototype.subscribe=function(a,b,c){this.eventHandler.subscribe(a,b,c)},c.prototype.unsubscribe=function(a,b){this.eventHandler.unsubscribe(a,b)},c.prototype.onVpaidLoaded=function(a){var c=this;this.vpaid=new b.PostMessageVPAID(this),this.postMessage.setClientCallback(function(a){return a.type===b.PostMessageServer.ATTRIBUTE_EVENT?void(c.vpaidAttribute=a.data):void c.eventHandler.handleEvent(a)}),a(this.vpaid)},c.GETATTRIBUTESVALUES_METHOD="getAttributesValues",c.LOADVPAID_METHOD="loadVpaid",c.SETCONFIG_METHOD="setConfig",c.getters=["getAdWidth","getAdHeight","getAdDuration","getAdRemainingTime","getAdSkippableState","getAdLinear","getAdExpanded","getAdVolume"],c}();b.PostMessageClient=c}(b=a.vpaid||(a.vpaid={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(a){var b=function(b){function c(){b.apply(this,arguments)}return __extends(c,b),c.prototype.loadVpaid=function(b,c,d){var e=this,f=new a.PostMessageClient(this.container,this.config);this.creativeContainer=f.getIframeContainer();var g=this.config.sandboxUrl||this.config.path+"/"+a.asset.sandbox;f.initAPI(g,function(){f.loadVpaid(b,function(a){e.vpaid=a,c(a)},d)},d)},c.prototype.getType=function(){return a.CreativeType.POSTMESSAGE},c}(a.VPAIDJSContainer);a.PostMessageContainer=b}(b=a.vpaid||(a.vpaid={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(a){var b=function(){function b(){}return b.isVPAID2=function(a){return Number(a.handshakeVersion("2.0"))>=2},b.createVPAIDEventCallback=function(b,c){return function(){for(var d=[],e=0;e=b.VpaidStatus.LOADING)return void this.dispatchEvent(a.vpaid.VPAIDEvent.AdLog,"Cannot call initAd() twice, VPAID already initalized");this.status=b.VpaidStatus.LOADING;var k=8e3;setTimeout(function(){j.status=b.VpaidStatus.STARTING)return void this.dispatchEvent(a.vpaid.VPAIDEvent.AdLog,"cannot call startAd() twice, already started");this.status=b.VpaidStatus.STARTING;var e=8e3;setTimeout(function(){d.statusb.VpaidStatus.STOPPING&&(this.status=b.VpaidStatus.STOPPING,setTimeout(function(){a.status>b.VpaidStatus.STOPPED&&(a.dispatchEvent(b.VPAIDEvent.AdLog,"Creative did not stop after 1s, force stop !"),a.dispatchEvent(b.VPAIDEvent.AdStopped))},1e3),c.prototype.stopAd.call(this))},d.prototype.skipAd=function(){var a=this;this.getAdSkippableState()&&this.status>b.VpaidStatus.SKIPPING&&(this.status=b.VpaidStatus.SKIPPING,setTimeout(function(){a.status>=b.VpaidStatus.SKIPPING&&(a.dispatchEvent(b.VPAIDEvent.AdLog,"Creative did not skip after 1s, force skip !"),a.dispatchEvent(b.VPAIDEvent.AdSkipped),a.stopAd())},1e3),c.prototype.skipAd.call(this))},d.prototype.subscribe=function(a,b,c){this.eventHandler.subscribe(a,b,c)},d.prototype.unsubscribe=function(a,b){this.eventHandler.unsubscribe(a,b)},d.prototype.vpaidguard=function(a,c){void 0===c&&(c=[]);try{if(this.status!==b.VpaidStatus.REMOVED)return this.callVPAIDMethod(a,c)}catch(d){switch(a){case"initAd":case"startAd":case"resizeAd":this.dispatchEvent(b.VPAIDEvent.AdError,"error call "+a+": "+d);break;default:this.dispatchEvent(b.VPAIDEvent.AdLog,"error call "+a+": "+d)}}},d.prototype.dispatchEvent=function(a,c){return this.handleVpaidEvent(new b.VPAIDEvent(a,c))},d.prototype.handleVpaidEvent=function(a){if(this.status!==b.VpaidStatus.REMOVED){if(this.status>b.VpaidStatus.STOPPED)switch(a.type){case b.VPAIDEvent.AdLoaded:this.status=b.VpaidStatus.LOADED;break;case b.VPAIDEvent.AdStarted:this.status=b.VpaidStatus.STARTED;break;case b.VPAIDEvent.AdVideoStart:case b.VPAIDEvent.AdPlaying:this.status=b.VpaidStatus.PLAYING;break;case b.VPAIDEvent.AdPaused: this.status=b.VpaidStatus.PAUSED;break;case b.VPAIDEvent.AdVideoComplete:this.status=b.VpaidStatus.COMPLETE;break;case b.VPAIDEvent.AdSkipped:this.status=b.VpaidStatus.SKIPPED;break;case b.VPAIDEvent.AdStopped:this.status=b.VpaidStatus.STOPPED}this.eventHandler.handleEvent(a),a.type===b.VPAIDEvent.AdError&&this.stopAd()}},d}(b.VPAIDJSGuard);b.BaseVPAIDJSWrapper=c}(b=a.vpaid||(a.vpaid={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(a){var b=function(b){function c(c){var d=this;b.call(this),this.lastAdRemainingTime=-1,this.setVPAID(c.getVPAID()),this.type=c.getType(),this.container=c,this.container.registerVPAIDEventHandler(function(b){switch(b.type){case a.VPAIDEvent.AdRemainingTimeChange:case a.VPAIDEvent.AdDurationChange:return}d.handleVpaidEvent(b)})}return __extends(c,b),c.prototype.initAd=function(c,d,e,f,g,h){this.container.resize(c,d),this.type===a.CreativeType.JS&&"string"==typeof g&&(g={AdParameters:g}),b.prototype.initAd.call(this,c,d,e,f,g,this.type===a.CreativeType.JS?this.getEnvironmentVars(h):null)},c.prototype.setAdVolume=function(a){return b.prototype.setAdVolume.call(this,a),this.environmentVars&&this.environmentVars.videoSlot&&(this.environmentVars.videoSlot.volume=a),a},c.prototype.resizeAd=function(a,c,d){this.isResizing=!0,this.container.resize(a,c),b.prototype.resizeAd.call(this,a,c,d)},c.prototype.getEnvironmentVars=function(a){return this.container.getEnvironmentVars(a)},c.prototype.handleVpaidEvent=function(c){var d=this;switch(c.type){case a.VPAIDEvent.AdSizeChange:this.isResizing||this.container.resize(this.getAdWidth(),this.getAdHeight()),this.isResizing=!1;break;case a.VPAIDEvent.AdStarted:this.startTimer();break;case a.VPAIDEvent.AdStopped:this.stopTimer()}b.prototype.handleVpaidEvent.call(this,c),c.type===a.VPAIDEvent.AdSkipped&&this.stopAd(),this.status===a.VpaidStatus.STOPPED&&(this.status=a.VpaidStatus.REMOVING,setTimeout(function(){d.status=a.VpaidStatus.REMOVED,d.container.destroy()},250))},c.prototype.startTimer=function(){var b=this;this.timerId||(this.timerId=setInterval(function(){b.getAdRemainingTime()>=0&&b.lastAdRemainingTime!==b.getAdRemainingTime()&&(b.lastAdRemainingTime=b.getAdRemainingTime(),b.dispatchEvent(a.VPAIDEvent.AdRemainingTimeChange),b.dispatchEvent(a.VPAIDEvent.AdDurationChange))},250))},c.prototype.stopTimer=function(){this.timerId&&clearInterval(this.timerId)},c}(a.BaseVPAIDJSWrapper);a.VPAIDWrapper=b}(b=a.vpaid||(a.vpaid={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(a){var b=function(b){function c(c){b.call(this,c),this.adDuration=-2,this.isVpaid2=a.VPAIDHelper.isVPAID2(this.vpaid)}return __extends(c,b),c.prototype.handshakeVersion=function(a){return"2.0"},c.prototype.initAd=function(a,c,d,e,f,g){this.adWidth=a,this.adHeight=c,b.prototype.initAd.call(this,a,c,d,e,f,g)},c.prototype.resizeAd=function(c,d,e){return this.isVpaid2?b.prototype.resizeAd.call(this,c,d,e):(this.adWidth=c,this.adHeight=d,b.prototype.resizeAd.call(this,c,d),void this.dispatchEvent(a.VPAIDEvent.AdSizeChange))},c.prototype.getAdWidth=function(){return this.adWidth},c.prototype.getAdHeight=function(){return this.adHeight},c.prototype.skipAd=function(){this.isVpaid2&&b.prototype.skipAd.call(this)},c.prototype.getAdSkippableState=function(){return this.isVpaid2?b.prototype.getAdSkippableState.call(this):!1},c.prototype.getAdIcons=function(){return this.isVpaid2?b.prototype.getAdIcons.call(this):!1},c.prototype.getAdCompanions=function(){return this.isVpaid2?b.prototype.getAdCompanions.call(this):""},c.prototype.getAdDuration=function(){return this.isVpaid2?b.prototype.getAdDuration.call(this):this.adDuration},c.prototype.handleVpaidEvent=function(c){if(!this.isVpaid2)switch(c.type){case a.VPAIDEvent.AdRemainingTimeChange:this.getAdRemainingTime()>0&&(this.adDuration<=0||this.getAdRemainingTime()>this.adDuration)&&(this.adDuration=this.getAdRemainingTime())}b.prototype.handleVpaidEvent.call(this,c)},c}(a.VPAIDWrapper);a.VPAID2Over1=b}(b=a.vpaid||(a.vpaid={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(a){var b=function(b){function c(){b.apply(this,arguments)}return __extends(c,b),c.prototype.startAd=function(){this.vpaid.resumeAd()},c.prototype.handleVpaidEvent=function(c,d){if(!this.adStarted&&!d)switch(c.type){case a.VPAIDEvent.AdLoaded:return void this.vpaid.startAd();case a.VPAIDEvent.AdStarted:return this.vpaid.pauseAd(),void this.handleVpaidEvent(new a.VPAIDEvent(a.VPAIDEvent.AdLoaded),!0);case a.VPAIDEvent.AdPlaying:case a.VPAIDEvent.AdVideoStart:this.adStarted=!0,this.dispatchEvent(a.VPAIDEvent.AdStarted);break;default:return}b.prototype.handleVpaidEvent.call(this,c)},c}(a.VPAID2Over1);a.AdManagerWrapper=b}(b=a.vpaid||(a.vpaid={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){var c=function(){function b(){this.status=a.vpaid.VpaidStatus.READY,this.eventHandler=new a.vpaid.EventHandler,this.trackingRaised={firstQuartile:!1,midpoint:!1,thirdQuartile:!1},this.parameters={},this.skippable=!1}return b.prototype.getVPAID=function(){return this},b.prototype.handshakeVersion=function(a){return"2.0"},b.prototype.subscribe=function(a,b,c){this.eventHandler.subscribe(a,b,c)},b.prototype.unsubscribe=function(a,b){this.eventHandler.unsubscribe(a,b)},b.prototype.initAd=function(b,c,d,e,f,g){this.status=a.vpaid.VpaidStatus.LOADING,this.width=b,this.height=c,this.viewMode=d,f=a.AdParameterHelper.decode(f);for(var h in f)this.parameters[h]=f[h];return this.environmentVars=g,this.environmentVars.videoSlot||(this.environmentVars.videoSlot=document.createElement("video")),this.environmentVars.slot?(this.video=this.environmentVars.videoSlot,void(this.container=this.environmentVars.slot)):void this.dispatchVpaidEvent(a.vpaid.VPAIDEvent.AdError,"no slot provided in environmentVars")},b.prototype.startAd=function(){this.status=a.vpaid.VpaidStatus.STARTING},b.prototype.skipAd=function(){this.status=a.vpaid.VpaidStatus.SKIPPING},b.prototype.stopAd=function(){this.status=a.vpaid.VpaidStatus.STOPPING},b.prototype.expandAd=function(){return!1},b.prototype.collapseAd=function(){return!1},b.prototype.getAdLinear=function(){return!0},b.prototype.getAdWidth=function(){return this.width},b.prototype.getAdHeight=function(){return this.height},b.prototype.getAdExpanded=function(){return a.HTMLHelper.isFullscreen()},b.prototype.getAdSkippableState=function(){return this.skippable},b.prototype.getAdCompanions=function(){return""},b.prototype.getAdIcons=function(){return!1},b.prototype.onAdVideoCompleteDispatched=function(){this.stopAd()},b.prototype.dispatchVpaidEvent=function(b,c){this.handleVPAIDEvent(new a.vpaid.VPAIDEvent(b,c))},b.prototype.handleVPAIDEvent=function(b){if(!(this.status===a.vpaid.VpaidStatus.SKIPPING&&b.type!==a.vpaid.VPAIDEvent.AdSkipped||this.status===a.vpaid.VpaidStatus.STOPPING&&b.type!==a.vpaid.VPAIDEvent.AdStopped||this.status<=a.vpaid.VpaidStatus.STOPPED||this.status===a.vpaid.VpaidStatus.STOPPING&&b.type!==a.vpaid.VPAIDEvent.AdStopped)){switch(b.type){case a.vpaid.VPAIDEvent.AdLoaded:this.status=a.vpaid.VpaidStatus.LOADED;break;case a.vpaid.VPAIDEvent.AdStarted:this.status=a.vpaid.VpaidStatus.STARTED;break;case a.vpaid.VPAIDEvent.AdVideoStart:case a.vpaid.VPAIDEvent.AdPlaying:this.status=a.vpaid.VpaidStatus.PLAYING;break;case a.vpaid.VPAIDEvent.AdPaused:this.status=a.vpaid.VpaidStatus.PAUSED;break;case a.vpaid.VPAIDEvent.AdVideoComplete:this.status=a.vpaid.VpaidStatus.COMPLETE;break;case a.vpaid.VPAIDEvent.AdSkipped:this.status=a.vpaid.VpaidStatus.SKIPPED;break;case a.vpaid.VPAIDEvent.AdStopped:this.status=a.vpaid.VpaidStatus.STOPPED}this.eventHandler.handleEvent(b),this.status===a.vpaid.VpaidStatus.SKIPPED&&this.stopAd(),b.type===a.vpaid.VPAIDEvent.AdVideoComplete&&this.onAdVideoCompleteDispatched()}},b.prototype.handleException=function(b,c){var d='method "'+c+'" threw an exception: '+b.toString();this.dispatchVpaidEvent(a.vpaid.VPAIDEvent.AdLog,d),this.dispatchVpaidEvent(a.vpaid.VPAIDEvent.AdError,d)},b}();b.BaseVPAIDCreative=c}(b=a.video||(a.video={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(a){var b;!function(a){var b=function(){function a(a,b,c){this.id=c,this.layer=document.createElement("div"),this.layer.className+="vpaid-clickthrough",this.layer.style.cursor="pointer",this.layer.style.opacity="0",this.layer.style.backgroundColor="#FFFFFF",this.layer.style.position="absolute",this.layer.style.zIndex="65000",this.layer.addEventListener("click",function(d){a(b,c,!0)},!1)}return a.prototype.resize=function(a,b){this.layer.style.width=a+"px",this.layer.style.height=b+"px"},a.prototype.remove=function(){this.layer.parentNode&&this.layer.parentNode.removeChild(this.layer)},a.prototype.append=function(a){a.firstChild?a.insertBefore(this.layer,a.firstChild):a.appendChild(this.layer)},a}();a.ClickThrough=b}(b=a.component||(a.component={}))}(b=a.video||(a.video={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){var c=function(c){function d(){c.apply(this,arguments),this.config={url:"",debug:!0,skippable:!1,skipoffset:0},this.eventMap={durationchange:"AdDurationChange",resize:"AdSizeChange",volumechange:"AdVolumeChange",ended:"AdVideoComplete",play:"AdPlaying",playing:"AdPlaying",pause:"AdPaused",timeupdate:"AdRemainingTimeChange",error:"AdError"}}return __extends(d,c),d.prototype.initAd=function(b,d,e,f,g,h){if(this.status!==a.vpaid.VpaidStatus.READY)return void this.dispatchVpaidEvent(a.vpaid.VPAIDEvent.AdLog,"creative is not in ready state, cannot call initAd");try{c.prototype.initAd.call(this,b,d,e,f,g,h),this.video.src=this.parameters.url,this.dispatchVpaidEvent(a.vpaid.VPAIDEvent.AdLoaded)}catch(i){this.handleException(i,"initAd")}},d.prototype.startAd=function(){var d=this;if(this.status>a.vpaid.VpaidStatus.LOADED)return void this.dispatchVpaidEvent(a.vpaid.VPAIDEvent.AdLog,"try to call startAd but ad is starting or is already started");if(this.status0&&this.video.currentTime>=.25*this.video.duration&&!this.trackingRaised.firstQuartile?(this.trackingRaised.firstQuartile=!0,this.dispatchVpaidEvent(a.vpaid.VPAIDEvent.AdVideoFirstQuartile)):this.video.duration>0&&this.video.currentTime>=.5*this.video.duration&&!this.trackingRaised.midpoint?(this.trackingRaised.midpoint=!0,this.dispatchVpaidEvent(a.vpaid.VPAIDEvent.AdVideoMidpoint)):this.video.duration>0&&this.video.currentTime>=.75*this.video.duration&&!this.trackingRaised.thirdQuartile&&(this.trackingRaised.thirdQuartile=!0,this.dispatchVpaidEvent(a.vpaid.VPAIDEvent.AdVideoThirdQuartile)),this.parameters.skippable&&!this.skippable&&this.video.currentTime>=Number(this.parameters.skipoffset)&&(this.skippable=!0,this.dispatchVpaidEvent(a.vpaid.VPAIDEvent.AdSkippableStateChange))}this.dispatchVpaidEvent(c)}catch(d){var e='Creative threw an exception when handling "'+b.type+'" HTML5 video event: '+d.toString();this.dispatchVpaidEvent(a.vpaid.VPAIDEvent.AdLog,e),this.dispatchVpaidEvent(a.vpaid.VPAIDEvent.AdError,e)}},d}(b.BaseVPAIDCreative);b.VPAIDVideo=c}(b=a.video||(a.video={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(a){var b;!function(a){var b;!function(a){var b=function(){function a(){}return a.applyVendorProperties=function(b,c,d){b.style[c]=d,c=a.capitalize(c),b.style["Moz"+c]=d,b.style["webkit"+c]=d,b.style["O"+c]=d,b.style["ms"+c]=d},a.capitalize=function(a){return a.charAt(0).toUpperCase()+a.slice(1)},a.now=function(){return window.performance?window.performance.now():Date.now()},a.fillArray=function(a,b){for(var c=0,d=a.length;d>c;c++)a[c]=b},a.formatBenchTime=function(a){return 1>a?parseFloat(a.toString().substr(0,4)):Math.round(a)},a.blob=function(a,b){void 0===b&&(b="application/javascript");var c;if(window.Blob)c=new Blob([a],{type:b});else{window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder;var d=new window.BlobBuilder;d.append(a),c=d.getBlob()}return c},a.url=function(){return window.URL||window.webkitURL},a}();a.Utils=b}(b=a.helper||(a.helper={}))}(b=a.player||(a.player={}))}(b=a.canvas||(a.canvas={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(a){var b;!function(a){var b;!function(a){var b=function(){function a(){}return a.SHADER_FRAGMENT_YCBCRTORGBA=["precision mediump float;","uniform sampler2D YTexture;","uniform sampler2D CBTexture;","uniform sampler2D CRTexture;","varying vec2 texCoord;","void main() {","float y = texture2D(YTexture, texCoord).r;","float cr = texture2D(CBTexture, texCoord).r - 0.5;","float cb = texture2D(CRTexture, texCoord).r - 0.5;","gl_FragColor = vec4(","y + 1.4 * cr,","y + -0.343 * cb - 0.711 * cr,","y + 1.765 * cb,","1.0",");","}"].join("\n"),a.SHADER_FRAGMENT_LOADING=["precision mediump float;","uniform float loaded;","varying vec2 texCoord;","void main() {","float c = ceil(loaded-(1.0-texCoord.y));","gl_FragColor = vec4(c,c,c,1);","}"].join("\n"),a.SHADER_VERTEX_IDENTITY=["attribute vec2 vertex;","varying vec2 texCoord;","void main() {","texCoord = vertex;","gl_Position = vec4((vertex * 2.0 - 1.0) * vec2(1, -1), 0.0, 1.0);","}"].join("\n"),a}();a.Shader=b}(b=a.model||(a.model={}))}(b=a.player||(a.player={}))}(b=a.canvas||(a.canvas={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(a){var b;!function(a){var b;!function(a){a.mediaEvents={ABORT:"abort",CAN_PLAY:"canplay",DURATION_CHANGE:"durationchange",ENDED:"ended",ERROR:"error",LOADED_DATA:"loadeddata",LOADED_METADATA:"loadedmetadata",LOAD_START:"loadstart",LOADED:"loaded",PAUSE:"pause",PLAY:"play",PROGRESS:"progress",SEEKED:"seeked",SEEKING:"seeking",STALLED:"stalled",RESUME_AFTER_STALLED:"resumeafterstalled",TIME_UPDATE:"timeupdate",VOLUME_CHANGE:"volumechange",AUDIO_SYNC:"audiosync",BENCH_FPS:"benchFps",RESIZE:"resize"}}(b=a.model||(a.model={}))}(b=a.player||(a.player={}))}(b=a.canvas||(a.canvas={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){var c;!function(b){var c;!function(b){var c=function(){function b(){this.loggerED=new a.Logger("canvas.player.components.EventDispatcher"),this.cb={},this.addEventListener=this.listen,this.removeEventListener=this.muteEvent}return b.prototype.listen=function(a,b,c){void 0===c&&(c=!1),this.cb[a]||(this.cb[a]=new Array),this.cb[a].push(b)},b.prototype.muteEvent=function(a,b){this.cb[a]?b&&-1!==this.cb[a].indexOf(b)?this.cb[a].splice(this.cb[a].indexOf(b),1):b?this.loggerED.error("call muteEvent for",a,"but handler ",b," does not exist for this event"):this.cb[a]=new Array:this.loggerED.error("call muteEvent for",a,"but handlers for this event are empty")},b.prototype.dispatch=function(a,b){this.cb[a]&&(b?b.type=a:b={type:a},this.cb[a].forEach(function(a,c){a(b)}))},b}();b.EventDispatcher=c}(c=b.components||(b.components={}))}(c=b.player||(b.player={}))}(b=a.canvas||(a.canvas={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(a){var b;!function(a){var b;!function(b){var c=function(b){function c(a,c,d){b.call(this),this.container=a,this.cWidth=c,this.cHeight=d,this.totalPrintingTime=0,this.totalPrintedFrame=0,this.canvas=document.createElement("canvas"),this.canvas.width=c,this.canvas.height=d,this.canvas.style.background="#000",this.canvasContext=this.canvas.getContext("2d"),a.appendChild(this.canvas),this.initWebGL()}return __extends(c,b),Object.defineProperty(c.prototype,"width",{get:function(){return this.cWidth},set:function(a){this.cWidth=a,this.resizeFromDecoder()},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"height",{get:function(){return this.cHeight},set:function(a){this.cHeight=a,this.resizeFromDecoder()},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"parentNode",{get:function(){return this.canvas.parentNode},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"style",{get:function(){return this.canvas.style},enumerable:!0,configurable:!0}),c.prototype.resizeFromDecoder=function(b,c){b&&(this.canvas.width=this.decoderWidth=b),c&&(this.canvas.height=this.decoderHeight=c);var d=this.cWidth/this.canvas.width;a.helper.Utils.applyVendorProperties(this.canvas,"transformOrigin","0 0"),a.helper.Utils.applyVendorProperties(this.canvas,"transform","scale("+d+")"),b&&c&&(this.gl?(this.gl.useProgram(this.program),this.gl.viewport(0,0,b,c)):(this.currentRGBA=this.canvasContext.getImageData(0,0,b,c),a.helper.Utils.fillArray(this.currentRGBA.data,255))),this.dispatch(a.model.mediaEvents.RESIZE,{width:this.width,height:this.height})},c.prototype.renderFrame=function(b){var c=a.helper.Utils.now();this.gl?this.renderFrameGL(b):this.renderFrame2D(b),this.totalPrintingTime+=a.helper.Utils.now()-c,this.totalPrintedFrame++},c.prototype.renderHtmlImageElement=function(b){var c=a.helper.Utils.now();this.canvasContext.drawImage(b,0,0),this.totalPrintingTime+=a.helper.Utils.now()-c,this.totalPrintedFrame++},c.prototype.averagePrintingTime=function(){return this.totalPrintingTime/this.totalPrintedFrame},c.prototype.initWebGL=function(){try{this.gl=this.canvas.getContext("webgl")||this.canvas.getContext("experimental-webgl")}catch(b){return!1}if(!this.gl)return!1;var c=this.gl.createBuffer();if(this.gl.bindBuffer(this.gl.ARRAY_BUFFER,c),this.gl.bufferData(this.gl.ARRAY_BUFFER,new Float32Array([0,0,0,1,1,0,1,1]),this.gl.STATIC_DRAW),this.program=this.gl.createProgram(),this.gl.attachShader(this.program,this.compileShader(this.gl.VERTEX_SHADER,a.model.Shader.SHADER_VERTEX_IDENTITY)),this.gl.attachShader(this.program,this.compileShader(this.gl.FRAGMENT_SHADER,a.model.Shader.SHADER_FRAGMENT_YCBCRTORGBA)),this.gl.linkProgram(this.program),!this.gl.getProgramParameter(this.program,this.gl.LINK_STATUS))throw new Error(this.gl.getProgramInfoLog(this.program));this.gl.useProgram(this.program),this.YTexture=this.createTexture(0,"YTexture"),this.CBTexture=this.createTexture(1,"CBTexture"),this.CRTexture=this.createTexture(2,"CRTexture");var d=this.gl.getAttribLocation(this.program,"vertex");return this.gl.enableVertexAttribArray(d),this.gl.vertexAttribPointer(d,2,this.gl.FLOAT,!1,0,0),this.loadingProgram=this.gl.createProgram(),this.gl.attachShader(this.loadingProgram,this.compileShader(this.gl.VERTEX_SHADER,a.model.Shader.SHADER_VERTEX_IDENTITY)),this.gl.attachShader(this.loadingProgram,this.compileShader(this.gl.FRAGMENT_SHADER,a.model.Shader.SHADER_FRAGMENT_LOADING)),this.gl.linkProgram(this.loadingProgram),this.gl.useProgram(this.loadingProgram),d=this.gl.getAttribLocation(this.loadingProgram,"vertex"),this.gl.enableVertexAttribArray(d),this.gl.vertexAttribPointer(d,2,this.gl.FLOAT,!1,0,0),!0},c.prototype.renderFrameGL=function(a){this.gl.activeTexture(this.gl.TEXTURE0),this.gl.bindTexture(this.gl.TEXTURE_2D,this.YTexture),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.LUMINANCE,a.codedWidth,this.canvas.height,0,this.gl.LUMINANCE,this.gl.UNSIGNED_BYTE,a.currentY),this.gl.activeTexture(this.gl.TEXTURE1),this.gl.bindTexture(this.gl.TEXTURE_2D,this.CBTexture),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.LUMINANCE,a.halfWidth,this.canvas.height/2,0,this.gl.LUMINANCE,this.gl.UNSIGNED_BYTE,a.currentCr),this.gl.activeTexture(this.gl.TEXTURE2),this.gl.bindTexture(this.gl.TEXTURE_2D,this.CRTexture),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.LUMINANCE,a.halfWidth,this.canvas.height/2,0,this.gl.LUMINANCE,this.gl.UNSIGNED_BYTE,a.currentCb),this.gl.drawArrays(this.gl.TRIANGLE_STRIP,0,4)},c.prototype.compileShader=function(a,b){var c=this.gl.createShader(a);if(this.gl.shaderSource(c,b),this.gl.compileShader(c),!this.gl.getShaderParameter(c,this.gl.COMPILE_STATUS))throw new Error(this.gl.getShaderInfoLog(c));return c},c.prototype.createTexture=function(a,b){var c=this.gl.createTexture();return this.gl.bindTexture(this.gl.TEXTURE_2D,c),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),this.gl.uniform1i(this.gl.getUniformLocation(this.program,b),a),c},c.prototype.YCbCrToRGBA=function(a){for(var b,c,d,e,f,g=a.currentY,h=a.currentCb,i=a.currentCr,j=this.currentRGBA.data,k=0,l=a.codedWidth,m=a.codedWidth+(a.codedWidth-this.decoderWidth),n=0,o=a.halfWidth-(this.decoderWidth>>1),p=0,q=4*this.decoderWidth,r=4*this.decoderWidth,s=this.decoderWidth>>1,t=this.decoderHeight>>1,u=0;t>u;u++){for(var v=0;s>v;v++){b=h[n],c=i[n],n++,d=c+(103*c>>8)-179,e=(88*b>>8)-44+(183*c>>8)-91,f=b+(198*b>>8)-227;var w=g[k++],x=g[k++];j[p]=w+d,j[p+1]=w-e,j[p+2]=w+f,j[p+4]=x+d,j[p+5]=x-e,j[p+6]=x+f,p+=8;var y=g[l++],z=g[l++];j[q]=y+d,j[q+1]=y-e,j[q+2]=y+f,j[q+4]=z+d,j[q+5]=z-e,j[q+6]=z+f,q+=8}k+=m,l+=m,p+=r,q+=r,n+=o}},c.prototype.renderFrame2D=function(a){this.YCbCrToRGBA(a),this.canvasContext.putImageData(this.currentRGBA,0,0)},c}(b.EventDispatcher);b.Canvas=c}(b=a.components||(a.components={}))}(b=a.player||(a.player={}))}(b=a.canvas||(a.canvas={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(a){var b;!function(a){var b;!function(a){!function(a){a[a.FULL=0]="FULL",a[a.SMART=1]="SMART",a[a.NO_STREAM=2]="NO_STREAM"}(a.StreamType||(a.StreamType={}));a.StreamType}(b=a.model||(a.model={}))}(b=a.player||(a.player={}))}(b=a.canvas||(a.canvas={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(a){var b;!function(a){var b;!function(a){!function(a){a[a.INIT=0]="INIT",a[a.INIT_VIDEO=1]="INIT_VIDEO",a[a.INIT_AUDIO=2]="INIT_AUDIO",a[a.CAN_PLAY=3]="CAN_PLAY",a[a.PLAYING=4]="PLAYING",a[a.PAUSED=5]="PAUSED",a[a.LOADED=6]="LOADED",a[a.STALLED=7]="STALLED",a[a.ENDED=8]="ENDED"}(a.MediaState||(a.MediaState={}));a.MediaState}(b=a.model||(a.model={}))}(b=a.player||(a.player={}))}(b=a.canvas||(a.canvas={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){var c;!function(b){var c;!function(c){var d=function(c){function d(d,e,f,g){c.call(this),this.meta=e,this.player=g,this.logger=new a.Logger("canvas.player.components.Video"),this.head=0,this.targetTime=0,this.decodeFinish=!1,this.benchFps=0,this.benchFpsRetained=0,this.benchFpsCount=0,this.fpsLimit=0,this.frameRate=24,this.frameStart=1,this.frameCachedLimit=24,this.videoFrames=[],this.frameWait=Math.floor(1e3/this.frameRate);var h=b.helper.Utils.blob('importScripts("'+this.player.assetsPath+'/teads-mpeg-decoder.min.js")');this.worker=new Worker(b.helper.Utils.url().createObjectURL(h)),this.worker.onmessage=this.onmessage.bind(this),this.worker.postMessage(["init",d,e]),this.state=b.model.MediaState.INIT}return __extends(d,c),d.prototype.canplay=function(){return this.state===b.model.MediaState.CAN_PLAY||this.state===b.model.MediaState.PLAYING||this.state===b.model.MediaState.PAUSED||this.state===b.model.MediaState.LOADED||this.state===b.model.MediaState.ENDED},d.prototype.play=function(){this.state!==b.model.MediaState.PLAYING&&(this.state=b.model.MediaState.PLAYING,this.loopPlay())},d.prototype.pause=function(){this.state!==b.model.MediaState.STALLED&&(this.state=b.model.MediaState.PAUSED)},d.prototype.getCurrentTime=function(){return this.state===b.model.MediaState.INIT?0:this.head/this.frameRate},d.prototype.setCurrentTime=function(a){var b=Math.ceil(a*this.frameRate);return this.videoFrames[b]?(this.cleanFrame(this.head,b),this.head=b,!0):!1},Object.defineProperty(d.prototype,"duration",{get:function(){return this.decodeFinish?this.videoFrames.length/this.frameRate:parseFloat(this.meta.infos.duration)},enumerable:!0,configurable:!0}),d.prototype.cleanStallTimeout=function(){clearTimeout(this.timeoutStalled),this.timeoutStalled=null,this.state=b.model.MediaState.PAUSED},d.prototype.onload=function(){this.dispatch(b.model.mediaEvents.LOADED),this.decodeFinish=!0},d.prototype.oninit=function(){this.benchFps=b.helper.Utils.now(),this.state=b.model.MediaState.INIT_VIDEO,this.renderFrame()},d.prototype.oncanplay=function(){this.state=b.model.MediaState.CAN_PLAY,this.dispatch(b.model.mediaEvents.CAN_PLAY)},d.prototype.onstalled=function(){var a=this;this.state=b.model.MediaState.STALLED,this.dispatch(b.model.mediaEvents.STALLED),this.listen(b.model.mediaEvents.LOADED,function(){return a.onresumestalled()})},d.prototype.onresumestalled=function(){this.state===b.model.MediaState.STALLED&&(this.cleanStallTimeout(),this.dispatch(b.model.mediaEvents.RESUME_AFTER_STALLED))},d.prototype.ondecodeframe=function(){this.state!==b.model.MediaState.ENDED&&this.dispatch(b.model.mediaEvents.TIME_UPDATE)},d.prototype.onfinish=function(){this.state=b.model.MediaState.ENDED,this.dispatch(b.model.mediaEvents.ENDED)},d.prototype.onmessage=function(a){var b=a.data[0];switch(b){case"frame":this.appendFrames(a.data),this.videoFrames.length===this.frameStart?this.oninit():this.videoFrames.length===this.frameCachedLimit&&this.oncanplay();break;case"initCanvas":this.player.resizeFromDecoder(a.data[1],a.data[2]);break;case"finish":this.averageDecodingTime=a.data[1],this.onload();break;default:this.logger.info(a.data)}},d.prototype.appendFrames=function(a){var c=this;if(this.videoFrames.push({codedWidth:a[1],halfWidth:a[2],currentY:new Uint8Array(a[3]),currentCr:new Uint8Array(a[4]),currentCb:new Uint8Array(a[5])}),this.averageDecodingTime=a[6],this.benchFpsCount++,this.benchFpsCount===this.frameCachedLimit){this.benchFpsRetained=b.helper.Utils.now()-this.benchFps;var d=Math.ceil(this.frameRate*this.benchFpsRetained/1e3);this.fpsLimit=Math.max(3,Math.min(this.frameCachedLimit,d+1))}this.state===b.model.MediaState.STALLED&&this.head+this.frameCachedLimit<=this.videoFrames.length&&(this.averageDecodingTime<=1e3/this.frameRate?this.timeoutStalled||(this.logger.warn("We are stalled and have",this.frameCachedLimit,"in memory, but stalled for download, so wait",2*this.benchFpsRetained,"ms"),this.timeoutStalled=setTimeout(function(){return c.onresumestalled()},2*this.benchFpsRetained),this.dispatch(b.model.mediaEvents.BENCH_FPS,2*this.benchFpsRetained)):this.onresumestalled())},d.prototype.loopPlay=function(){var a=this;this.head++;var c=this.targetTime?Math.max(-(this.frameWait/2),Math.min(0,this.targetTime-b.helper.Utils.now())):0,d=this.head>=this.videoFrames.length-1;d?(this.decodeFinish?this.onfinish():this.onstalled(),this.targetTime=0):this.state===b.model.MediaState.PLAYING&&(this.targetTime=b.helper.Utils.now()+this.frameWait,window.setTimeout(function(){return a.loopPlay()},this.frameWait+c)),this.renderFrame(),this.head%this.frameRate===0&&this.ondecodeframe()},d.prototype.renderFrame=function(){this.videoFrames[this.head]&&(this.player.renderFrame(this.videoFrames[this.head]),this.videoFrames[this.head]=null,this.videoFrames.lengthc;c++)this.videoFrames[c]=null},d}(c.EventDispatcher);c.MpegVideo=d}(c=b.components||(b.components={}))}(c=b.player||(b.player={}))}(b=a.canvas||(a.canvas={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){var c;!function(b){var c;!function(c){var d=function(c){function d(a,b,d,e){c.call(this),this.meta=b,this.player=e,this.videoFrames=[],this.headBuffer=0,this.head=0,this.benchFps=0,this.frameWait=1e3/24,this.frameRate=24,this.frameCachedLimit=24,this.reading=!1,this.decodingTime=0,this.extractTime=0,this.extractCount=0,this.load(a+"/"+b.tv)}return __extends(d,c),d.prototype.canplay=function(){return this.head+this.frameCachedLimit<=this.videoFrames.length},d.prototype.play=function(){this.state!==b.model.MediaState.PLAYING&&(this.state=b.model.MediaState.PLAYING,this.loopPlay())},d.prototype.pause=function(){this.state!==b.model.MediaState.STALLED&&(this.state=b.model.MediaState.PAUSED)},d.prototype.getCurrentTime=function(){ return this.state===b.model.MediaState.INIT?0:this.head/this.frameRate},d.prototype.setCurrentTime=function(a){var b=Math.ceil(a*this.frameRate);return this.videoFrames[b]?(this.head=b,!0):!1},Object.defineProperty(d.prototype,"duration",{get:function(){return parseFloat(this.meta.infos.duration)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"averageDecodingTime",{get:function(){return this.decodingTime/this.videoFrames.length},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"averageExtractTime",{get:function(){return this.extractTime/this.extractCount},enumerable:!0,configurable:!0}),d.prototype.cleanStallTimeout=function(){},d.prototype.load=function(b){this.xhr=a.Request.createXmlHttpRequest(),this.xhr.open("GET",b,!0),this.xhr.responseType="text",this.xhr.onreadystatechange=this.onStateChange.bind(this),this.xhr.onload=this.onload.bind(this),this.xhr.send()},d.prototype.onStateChange=function(){this.xhr.responseText&&this.xhr.readyState>=3&&!this.reading&&(this.reading=!0,this.readResponseRecursive())},d.prototype.readResponseRecursive=function(){var a=this;if(this.reading){var c=b.helper.Utils.now(),d=this.xhr.responseText.substr(this.headBuffer,4*this.meta.infos.averageFrameSize),e=new RegExp("frame\\[("+this.videoFrames.length+")\\](.*)frame\\["+(this.videoFrames.length+1)+"\\]"),f=e.exec(d);if(this.extractTime+=b.helper.Utils.now()-c,this.extractCount++,f)this.headBuffer+=7+this.videoFrames.length.toString().length+f[2].length,this.extractFrame(f);else if(this.loaded){var g=new RegExp("frame\\[("+this.videoFrames.length+")\\](.*)"),h=g.exec(d);h&&(this.headBuffer+=7+this.videoFrames.length.toString().length+h[2].length,this.extractFrame(h))}this.headBuffer=this.frameCachedLimit&&this.oncanplay(),this.head+this.frameCachedLimit<=this.videoFrames.length&&this.onresumestalled()},d.prototype.loopPlay=function(){var a=this;this.head++;var c=this.targetTime?Math.max(-(this.frameWait/2),this.targetTime-b.helper.Utils.now()):0,d=this.head>=this.videoFrames.length-1;d?(this.loaded&&!this.reading?this.onfinish():this.onstalled(),this.targetTime=0):this.state===b.model.MediaState.PLAYING&&(this.targetTime=b.helper.Utils.now()+this.frameWait+c,window.setTimeout(function(){return a.loopPlay()},this.frameWait+c)),this.player.renderHtmlImageElement(this.videoFrames[this.head]),this.head%this.frameRate===0&&this.ondecodeframe()},d}(c.EventDispatcher);c.JpegVideo=d}(c=b.components||(b.components={}))}(c=b.player||(b.player={}))}(b=a.canvas||(a.canvas={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(a){var b;!function(a){var b;!function(b){var c=function(c){function d(d,e,f,g){var h=this;c.call(this),this.meta=e,this.player=g,this.meta.tv?this.api=new b.JpegVideo(d,e,f,g):this.api=new b.MpegVideo(d,e,f,g),this.api.listen(a.model.mediaEvents.CAN_PLAY,function(){return h.dispatch(a.model.mediaEvents.CAN_PLAY)}),this.api.listen(a.model.mediaEvents.LOADED,function(){return h.dispatch(a.model.mediaEvents.LOADED)}),this.api.listen(a.model.mediaEvents.STALLED,function(){return h.dispatch(a.model.mediaEvents.STALLED)}),this.api.listen(a.model.mediaEvents.RESUME_AFTER_STALLED,function(){return h.dispatch(a.model.mediaEvents.RESUME_AFTER_STALLED)}),this.api.listen(a.model.mediaEvents.TIME_UPDATE,function(){return h.dispatch(a.model.mediaEvents.TIME_UPDATE)}),this.api.listen(a.model.mediaEvents.ENDED,function(){return h.dispatch(a.model.mediaEvents.ENDED)}),this.api.listen(a.model.mediaEvents.BENCH_FPS,function(b){return h.dispatch(a.model.mediaEvents.BENCH_FPS,b)})}return __extends(d,c),d.prototype.canplay=function(){return this.api.canplay()},d.prototype.play=function(){this.api.play()},d.prototype.pause=function(){this.api.pause()},d.prototype.getCurrentTime=function(){return this.api.getCurrentTime()},d.prototype.setCurrentTime=function(a){return this.api.setCurrentTime(a)},Object.defineProperty(d.prototype,"duration",{get:function(){return this.api.duration},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"state",{get:function(){return this.api.state},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"videoFrames",{get:function(){return this.api.videoFrames},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"averageDecodingTime",{get:function(){return this.api.averageDecodingTime},enumerable:!0,configurable:!0}),d.prototype.cleanStallTimeout=function(){this.api.cleanStallTimeout()},d}(b.EventDispatcher);b.Video=c}(b=a.components||(a.components={}))}(b=a.player||(a.player={}))}(b=a.canvas||(a.canvas={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(a){var b;!function(a){var b;!function(a){}(b=a.model||(a.model={}))}(b=a.player||(a.player={}))}(b=a.canvas||(a.canvas={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){var c;!function(b){var c;!function(c){var d=function(c){function d(b,d,e){c.call(this),this.baseUrl=b,this.chunkUrls=d,this.streamType=e,this.chunkLoaded=0,this.chunkLength=0,this.loggerF=new a.Logger("canvas.player.components.File"),this.chunkNumStart=1,this.chunkNumCanPlay=3,this.chunkLength=this.chunkUrls.length,this.streamLoad()}return __extends(d,c),d.prototype.canplay=function(){return this.state===b.model.MediaState.CAN_PLAY||this.state===b.model.MediaState.PLAYING||this.state===b.model.MediaState.PAUSED||this.state===b.model.MediaState.LOADED||this.state===b.model.MediaState.ENDED},d.prototype.streamLoad=function(){var c=this,d=window.location.protocol.match(/http|https/gi)?"":"http:",e=d+this.baseUrl+"/"+this.chunkUrls.shift(),f=a.Request.createXmlHttpRequest();f.open("GET",e,!0),f.responseType="arraybuffer",f.addEventListener("load",function(a){c.chunkLoaded++,c.chunkLoaded===c.chunkNumStart?c.dispatch(b.model.mediaEvents.LOADED_DATA,f.response):c.dispatch(b.model.mediaEvents.PROGRESS,f.response),(c.chunkLoaded===c.chunkNumCanPlay||c.chunkLength=3},enumerable:!0,configurable:!0}),c.prototype.canplay=function(){return this.node.readyState>=1},c.prototype.playing=function(){return this.state===a.model.MediaState.PLAYING},c}(b.EventDispatcher);b.HtmlAudioElement=c}(b=a.components||(a.components={}))}(b=a.player||(a.player={}))}(b=a.canvas||(a.canvas={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){var c;!function(b){var c;!function(c){var d=function(d){function e(a,b,c){d.call(this),this.baseUrl=a,this.meta=b,this.stream=c,b.audio.length&&this.init()}return __extends(e,d),e.prototype.authorizeAudio=function(a){this.api?this.api.authorizeAudio(a):a()},e.prototype.play=function(a){void 0===a&&(a=0),this.api&&this.api.play(a)},e.prototype.pause=function(){this.api&&this.api.pause()},Object.defineProperty(e.prototype,"duration",{get:function(){return this.api?this.api.duration:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentTime",{get:function(){return this.api?this.api.currentTime:0},set:function(a){this.api&&(this.api.currentTime=a)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"volume",{get:function(){return this.api?this.api.volume:0},set:function(a){this.api&&(this.api.volume=a)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"authorized",{get:function(){return this.api?this.api.authorized:!0},enumerable:!0,configurable:!0}),e.prototype.canplay=function(){return this.api?this.api.canplay():!0},e.prototype.playing=function(){return this.api?this.api.playing():!1},e.prototype.init=function(){var d=this;this.meta.infos.audio_size<4e5&&a.Utils.getAudioContext()?this.api=new c.WebAudioApi(this.baseUrl,this.meta,this.stream):this.api=new c.HtmlAudioElement(this.baseUrl,this.meta),this.api.listen(b.model.mediaEvents.CAN_PLAY,function(){return d.dispatch(b.model.mediaEvents.CAN_PLAY)})},e}(c.EventDispatcher);c.Audio=d}(c=b.components||(b.components={}))}(c=b.player||(b.player={}))}(b=a.canvas||(a.canvas={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){var c;!function(b){var c;!function(c){var d=function(){function c(b){this.player=b,this.audiosync=[],this.stalledCount=0,this.sended=!1,this.canvasSumologic=new a.Sumologic,this.metadataSent=!1,this.logger=new a.Logger("canvas.player.components.Bench"),this.bindEvent(),this.canvasSumologic.init(a.Sumologic.collectors.player,!0)}return c.prototype.bindEvent=function(){var a=this;this.player.listen(b.model.mediaEvents.PLAY,function(){return a.benchPlay()}),this.player.listen(b.model.mediaEvents.STALLED,function(){return a.benchStalled()}),this.player.listen(b.model.mediaEvents.RESUME_AFTER_STALLED,function(){return a.benchStalled()}),this.player.listen(b.model.mediaEvents.PAUSE,function(){return a.benchPause()}),this.player.listen(b.model.mediaEvents.AUDIO_SYNC,function(b){return a.audiosync.push(b.value)}),this.player.listen(b.model.mediaEvents.TIME_UPDATE,function(){return a.benchEnd()})},c.prototype.benchPlay=function(){this.pausedAt?(this.logger.info("total pause",Date.now()-this.pausedAt),this.startTime+=Date.now()-this.pausedAt,this.pausedAt=null):this.startTime=Date.now()},c.prototype.benchPause=function(){this.pausedAt=Date.now()},c.prototype.benchEnd=function(){var a=this.player.duration-this.player.currentTime;if(!this.sended&&a&&1.2>=a){this.sended=!0;var c,d,e,f,g;try{c=(Date.now()-this.startTime)/1e3+a}catch(h){}try{d=parseFloat((this.player.video.api.videoFrames.length/c).toFixed(1))}catch(h){}try{e=b.helper.Utils.formatBenchTime(this.player.video.api.averageDecodingTime)}catch(h){}try{f=b.helper.Utils.formatBenchTime(this.player.video.api.averageExtractTime)}catch(h){}try{g=b.helper.Utils.formatBenchTime(this.player.averagePrintingTime())}catch(h){}this.canvasSumologic.sendInfo("canvas "+[d,e,f,g,this.stalledCount,this.audiosync.length].join(";")),this.logger.info("canvas "+[d,e,f,g,this.stalledCount,this.audiosync.length].join(";"))}},c.prototype.benchStalled=function(){var a=this.pausedAt?"end":"start",b=this.pausedAt?(Date.now()-this.pausedAt)/1e3:this.player.currentTime,c=this.player.currentTime>=1?"progress":"init";this.pausedAt||this.stalledCount++,this.sendBuffering(c,a,b.toFixed(2)),this.sendMetadata()},c.prototype.sendMetadata=function(){if(!this.metadataSent){this.metadataSent=!0;var b=a.Context.isMobile()?"mob":a.Context.isTablet()?"tab":"desk",c=a.Context.isAndroid()?"android":a.Context.isIos()?"ios":"other";this.canvasSumologic.sendMetadata(["canvas",b,c,a.Context.getIosVersion()||a.Context.getAndroidVersion()||a.Context.getUA(),this.player.video?this.player.video.meta.infos.video_bitrate:"null",this.player.video?this.player.video.meta.infos.video_size:"null",this.player.video?this.player.video.meta.infos.duration:"null"].join("|"))}},c.prototype.sendBuffering=function(a,b,c){var d="canvas buffering";this.canvasSumologic.sendInfo([d,a,b,c].join("|"))},c}();c.Bench=d}(c=b.components||(b.components={}))}(c=b.player||(b.player={}))}(b=a.canvas||(a.canvas={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(a){var b;!function(a){var b;!function(b){var c=function(){function b(b){var c=this;this.player=b,this.initBufferDiv(),this.player.video.listen(a.model.mediaEvents.STALLED,function(){return c.show()}),this.player.video.listen(a.model.mediaEvents.RESUME_AFTER_STALLED,function(){return c.hide()}),this.player.video.listen(a.model.mediaEvents.TIME_UPDATE,function(){return c.hide()}),this.player.listen(a.model.mediaEvents.RESIZE,function(a){return c.resize(a)})}return b.prototype.show=function(){this.player.container.insertBefore(this.container,this.player.canvas||null)},b.prototype.hide=function(){this.container.parentNode&&this.player.container.removeChild(this.container)},b.prototype.resize=function(a){this.container.style.top=a.height/2-this.container.offsetHeight+"px",this.container.style.left=a.width/2-this.container.offsetWidth/2+"px"},b.prototype.initBufferDiv=function(){var a=document.createElement("div");this.template="
\n\nloading...
\n",a.innerHTML=this.template,this.container=a.firstChild},b}();b.Buffering=c}(b=a.components||(a.components={}))}(b=a.player||(a.player={}))}(b=a.canvas||(a.canvas={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){var c;!function(b){var c=function(c){function d(d,e,f,g,h){void 0===h&&(h=!0),c.call(this,d,e,f),this.assetsPath=g,this.logger=new a.Logger("canvas.player.CanvasPlayer"),this.audioSyncDiff=.5,this.waitForPlay=!1,this.logger.info("constructor()",d,e,f,g),this.assetsPath&&this.assetsPath.match(/http:|https:/)||(this.logger.warn("assetsPath replace with default (relative path not allow)"),this.assetsPath=window.location.protocol+"//cdn.teads.tv/media/player"),h&&(this.bench=new b.components.Bench(this))}return __extends(d,c),d.prototype.load=function(a,c,d){var e=this;void 0===c&&(c=!1),void 0===d&&(d=b.model.StreamType.NO_STREAM),this.logger.info("load()",a,c,d),this.url=a.replace(/http:|https:/,""),this.getMeta(this.url,function(a){var f=e.url.split("/");f.pop(),e.video=new b.components.Video(f.join("/"),a,d,e),e.audio=new b.components.Audio(f.join("/"),a,d),e.buffer=new b.components.Buffering(e),c&&e.listen(b.model.mediaEvents.CAN_PLAY,function(){return e.play()}),e.buffer.show(),e.listen(b.model.mediaEvents.CAN_PLAY,function(){return e.buffer.hide()}),e.video.listen(b.model.mediaEvents.STALLED,function(){return e.dispatch(b.model.mediaEvents.STALLED)}),e.video.listen(b.model.mediaEvents.STALLED,function(){return e.pause(!0)}),e.video.listen(b.model.mediaEvents.RESUME_AFTER_STALLED,function(){return e.dispatch(b.model.mediaEvents.RESUME_AFTER_STALLED)}),e.video.listen(b.model.mediaEvents.RESUME_AFTER_STALLED,function(){return e.play()}),e.video.listen(b.model.mediaEvents.TIME_UPDATE,function(){return e.onVideoProgress()}),e.video.listen(b.model.mediaEvents.CAN_PLAY,function(){return e.canPlayAll()}),e.audio.listen(b.model.mediaEvents.CAN_PLAY,function(){return e.canPlayAll()}),e.video.listen(b.model.mediaEvents.ENDED,function(){return e.dispatch(b.model.mediaEvents.ENDED)}),e.video.listen(b.model.mediaEvents.LOADED,function(){return e.dispatch(b.model.mediaEvents.LOADED)}),e.video.listen(b.model.mediaEvents.ERROR,function(){return e.dispatch(b.model.mediaEvents.ERROR)}),e.dispatch(b.model.mediaEvents.DURATION_CHANGE)})},d.prototype.play=function(){var a=this;this.logger.info("play()"),this.canplay()?(this.waitForPlay=!1,this.video.play(),this.audio.play(),this.dispatch(b.model.mediaEvents.PLAY)):this.waitForPlay||(this.waitForPlay=!0,this.dispatch(b.model.mediaEvents.STALLED),this.dispatch(b.model.mediaEvents.PAUSE),this.listen(b.model.mediaEvents.CAN_PLAY,function(){a.dispatch(b.model.mediaEvents.RESUME_AFTER_STALLED),a.play()}))},d.prototype.pause=function(a){void 0===a&&(a=!1),this.video&&this.audio?(this.video.pause(),this.audio.pause(),this.dispatch(b.model.mediaEvents.PAUSE),this.logger.info("pause()"),a||this.video.state!==b.model.MediaState.STALLED||(this.video.cleanStallTimeout(),this.buffer.hide())):this.muteEvent(b.model.mediaEvents.CAN_PLAY)},d.prototype.canplay=function(){return this.video&&this.audio?this.video.canplay()&&this.audio.canplay():!1},Object.defineProperty(d.prototype,"src",{get:function(){return this.url},set:function(a){this.load(a,!1,b.model.StreamType.FULL)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"currentTime",{get:function(){return this.video?this.video.getCurrentTime():0},set:function(a){this.video&&(this.logger.info("set currentTime",a),this.dispatch(b.model.mediaEvents.SEEKING),this.video.setCurrentTime(a)&&(this.audio.currentTime=a),this.dispatch(b.model.mediaEvents.SEEKED))},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"duration",{get:function(){return this.video&&this.audio?this.video.duration||this.audio.duration:0},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"volume",{get:function(){return this.audio?this.audio.volume:0},set:function(a){var c=this;if(this.logger.info("set volume",a),this.audio){this.audio.volume=a;var d=function(){return c.audio.play(c.currentTime)};this.canplay()&&this.video.state===b.model.MediaState.PLAYING&&d(),this.dispatch(b.model.mediaEvents.VOLUME_CHANGE,{value:a})}},enumerable:!0,configurable:!0}),d.prototype.onVideoProgress=function(){if(this.audio.api&&this.audio.playing()){var a=this.audio.currentTime-this.currentTime,c=Math.abs(a);c>=this.audioSyncDiff&&(a>0||this.video.meta.tv?this.video.setCurrentTime(this.audio.currentTime)||this.video.setCurrentTime(this.currentTime+this.audioSyncDiff):this.audio.currentTime=this.currentTime,this.logger.info("sync audio (diff/audioTime)",c,this.audio.currentTime),this.dispatch(b.model.mediaEvents.AUDIO_SYNC,{value:c}))}this.dispatch(b.model.mediaEvents.TIME_UPDATE)},d.prototype.canPlayAll=function(){this.canplay()&&this.dispatch(b.model.mediaEvents.CAN_PLAY)},d.prototype.getMeta=function(c,d){var e=this,f=a.Request.createXmlHttpRequest();f.open("GET",c.replace(/(\.mpg|\.mpeg|\.tv)(?!\/)/gi,".meta?v2"),!0),f.responseType="json",f.addEventListener("load",function(c){if(f.response){var g="string"==typeof f.response?a.JSON.parse(f.response):f.response;!g.tv&&(a.Context.isChromeIos()||a.Context.isUIWebview()||a.Context.isFacebookWebview()||a.Context.isIpad())?e.dispatch(b.model.mediaEvents.ERROR):d(g)}else e.dispatch(b.model.mediaEvents.ERROR)}),f.addEventListener("error",function(a){e.dispatch(b.model.mediaEvents.ERROR),e.logger.error.bind(e.logger)}),f.send()},d}(b.components.Canvas);b.CanvasPlayer=c}(c=b.player||(b.player={}))}(b=a.canvas||(a.canvas={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){var c=function(b){function c(){b.apply(this,arguments)}return __extends(c,b),c.prototype.initAd=function(c,d,e,f,g,h){var i=this;try{h.videoSlot&&h.videoSlot.parentNode&&h.videoSlot.parentNode.removeChild(h.videoSlot);var j=a.AdParameterHelper.decode(g);h.videoSlot=new a.canvas.player.CanvasPlayer(h.slot,c,d,g.assetsPath),h.videoSlot.addEventListener(a.canvas.player.model.mediaEvents.ERROR,function(a){return i.dispatchVpaidEvent(i.eventMap[a.type])}),b.prototype.initAd.call(this,c,d,e,f,j,h)}catch(k){this.handleException(k,"initAd")}},c.prototype.startAd=function(){var c=this;try{this.video.addEventListener(a.canvas.player.model.mediaEvents.PLAY,function(){c.status===a.vpaid.VpaidStatus.STARTING&&(c.status=a.vpaid.VpaidStatus.STARTED)}),b.prototype.startAd.call(this),this.dispatchVpaidEvent(a.vpaid.VPAIDEvent.AdDurationChange)}catch(d){this.handleException(d,"startAd")}},c.prototype.appendVideo=function(){},c.prototype.removeVideo=function(){this.video.pause(),this.container.removeChild(this.video.canvas)},c}(b.VPAIDVideo);b.VPAIDCanvas=c}(b=a.video||(a.video={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){var c=function(b){function c(){b.apply(this,arguments)}return __extends(c,b),c.prototype.loadVpaid=function(a,d,e){a===c.CANVAS?this.loadBundled(c.CANVAS,d,e):a===c.VIDEO?this.loadBundled(c.VIDEO,d,e):b.prototype.loadVpaid.call(this,a,d,e)},c.prototype.loadBundled=function(b,d,e){this.mainContainer=document.createElement("div"),this.mainContainer.style.position="relative",this.container.appendChild(this.mainContainer),this.creativeContainer=a.HTMLHelper.createIframe(),this.creativeContainer.id="vpaid-"+this.id,this.mainContainer.appendChild(this.creativeContainer);var f='
';switch(this.creativeContainer.contentWindow.document.write(f),this.creativeContainer.contentWindow.document.close(),this.vpaidContainer=this.creativeContainer.contentWindow.document.getElementById("vpaid-container"),this.videoContainer=this.creativeContainer.contentWindow.document.getElementById("video-container"),this.creativeContainer.contentWindow.teads=a,b){case c.VIDEO:this.vpaid=new this.creativeContainer.contentWindow.teads.video.VPAIDVideo;break;case c.CANVAS:this.vpaid=new this.creativeContainer.contentWindow.teads.video.VPAIDCanvas;break;default:return e("You must specify the vpaidjs with teads.vpaid.BundledContainer.(CANVAS|VIDEO)")}d(this.vpaid)},c.CANVAS="canvas",c.VIDEO="video",c}(b.VPAIDJSContainer);b.BundledContainer=c}(b=a.vpaid||(a.vpaid={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(a){var b=function(){function b(b,c){this.container=b,this.config=c,this.status=a.LoaderStatus.READY}return b.prototype.load=function(b,c,d){var e=this;if(!(this.status>a.LoaderStatus.READY)){var f,g;this.config.sandbox?(this.creativeType=a.CreativeType.POSTMESSAGE,g=a.PostMessageContainer):b.indexOf(".swf")>0?(this.creativeType=a.CreativeType.SWF,g=a.VPAIDSWFContainer):(this.creativeType=a.CreativeType.JS,g=a.VPAIDJSContainer),b!==a.BundledContainer.VIDEO&&b!==a.BundledContainer.CANVAS||(g=a.BundledContainer),this.container.innerHTML="",this.status=a.LoaderStatus.LOADING;var h=function(b){try{e.status=a.VpaidStatus.LOADED,e.wrapper||(e.wrapper=e.creativeType!==a.CreativeType.SWF||a.VPAIDHelper.isVPAID2(b)?a.VPAIDWrapper:a.VPAID2Over1);var g=new e.wrapper(f);try{c(g)}catch(h){d("callback success function throw an exception "+h)}}catch(h){d("Loader.load throw an exception "+h)}};f=new g(this.container,this.config),f.loadVpaid(b,h,d)}},b}();a.VPAIDLoader=b}(b=a.vpaid||(a.vpaid={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(a){a.ASSETS={vpaidvideojs:"teads-vpaid-video.min.js",vpaidcanvas:"teads-vpaid-canvas.min.js",vpaidvideoswf:"teads-vpaid-video.swf",vastcorsloader:"cors.swf",vpaidswfwrapper:"vpaidwrapper.swf"}}(b=a.player||(a.player={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(a){var b=function(){function a(){}return a.canPlayType=function(a){try{return!!document.createElement("video").canPlayType(a).replace(/^no/,"")}catch(b){return!1}},a}();a.VideoHelper=b}(b=a.player||(a.player={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads; }!function(a){var b;!function(a){!function(a){a[a.UNSUPPORTED=0]="UNSUPPORTED",a[a.FLASH=1]="FLASH",a[a.JS=2]="JS",a[a.VPAID=3]="VPAID",a[a.CANVAS=4]="CANVAS"}(a.MediaProvider||(a.MediaProvider={}));a.MediaProvider}(b=a.player||(a.player={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){b.trackingMapping={click:a.vpaid.VPAIDEvent.AdClickThru,pause:a.vpaid.VPAIDEvent.AdPaused,resume:a.vpaid.VPAIDEvent.AdPlaying,skip:a.vpaid.VPAIDEvent.AdSkipped,creativeView:a.vpaid.VPAIDEvent.AdStarted,start:a.vpaid.VPAIDEvent.AdVideoStart,firstQuartile:a.vpaid.VPAIDEvent.AdVideoFirstQuartile,midpoint:a.vpaid.VPAIDEvent.AdVideoMidpoint,thirdQuartile:a.vpaid.VPAIDEvent.AdVideoThirdQuartile,complete:a.vpaid.VPAIDEvent.AdVideoComplete,impression:a.vpaid.VPAIDEvent.AdImpression,close:a.vpaid.VPAIDEvent.AdUserClose,closeLinear:a.vpaid.VPAIDEvent.AdUserClose,progress:a.vpaid.VPAIDEvent.AdRemainingTimeChange}}(b=a.player||(a.player={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){var c=function(){function c(){}return c.weightMediaFiles=function(b){return b.weight=0,b.api&&b.api.toLowerCase&&(b.api=b.api.toLowerCase()),b.type&&b.type.toLowerCase&&(b.type=b.type.toLowerCase()),b.delivery&&b.delivery.toLowerCase&&(b.delivery=b.delivery.toLowerCase()),"vpaid"===b.api&&(b.weight+=b.type.indexOf("javascript")>=0?2e3:a.Context.isMobile()||a.Context.isIpad()?0:10),"video/mp4"===b.type?b.weight+=100:"video/x-flv"!==b.type||a.Context.isMobile()||a.Context.isIpad()||(b.weight+=50),(a.Context.isIphone()||a.Context.isIpad())&&(b.weight=0),"video/mpg"!==b.type&&"video/mpeg"!==b.type||(a.Context.isMobile()||a.Context.isIpad()?a.Context.isIphone()&&a.Context.getIosVersion()>=8?b.weight+=2e3:a.Context.isAndroid()?a.Context.isAndroidMobile()&&a.Context.getAndroidVersion()>=442?b.weight+=75:b.weight+=50:a.Context.isIpad()&&(b.weight+=50):a.Context.isIE()||(b.weight+=75)),0===b.url.indexOf("rtmp://")&&(b.weight=0),b},c.extractMediaFilesByBitrate=function(b,c){var d;return a.ArrayHelper.forEach(b,function(a,b){var e=Math.abs(a.bitrate-c);(!d||e=g?a.weight:g,!!a.weight}),d=a.ArrayHelper.filter(d,function(a){return a.weight===g}),d.length&&b.playerSumologic.sendInfo("media "+d[0].type),d.length>1&&d[1].type===d[0].type?c.sortByPing(d,f):d.length>=1?f(d,null):(a.Context.isMobile()||a.Context.isTablet())&&h&&a.Context.getIosVersion()>=8?c.ping(h.url,function(a,d){c.waitForProxy(h.url,d,function(c){h.url=c,h.type="video/tv",f(c?[h]:[],a),b.playerSumologic.sendInfo("media video/tv")})}):f(d,null)},c.sortByPing=function(a,b){c.ping(a[0].url,function(d,e){a=c.extractMediaFilesByBitrate(a,e),b(a,d)})},c.ping=function(c,d){var e,f,g,h=a.Request.createXmlHttpRequest(),i=Date.now(),j=function(a){e||(clearTimeout(g),e=Date.now()-i,f=100>=e?1e3:200>e?700:400>e?500:300,d(e,f),b.playerSumologic.sendInfo("ping "+[e,a].join(";")))};g=setTimeout(function(){return j("timeout")},500),h.open("HEAD",c+(c.indexOf("?")>-1?"&":"?")+i,!0),h.addEventListener("load",function(){return j("load")}),h.addEventListener("error",function(){return j("error")}),h.send()},c.waitForProxy=function(d,e,f){var g,h=this,i=location.hostname.match(/.+\.sandbox\.teads\.net|localdocker/),j=a.Utils.getProtocol()+"//[HOST]/transcode?url=[URL]&bitrate=[BITRATE]".replace(/\[HOST\]/,i?i[0]+":18088":"mp.teads.tv").replace(/\[URL\]/,encodeURIComponent(d)).replace(/\[BITRATE\]/,e.toString()),k=a.Request.createXmlHttpRequest(),l=!1;k.open("GET",j,!0),k.onreadystatechange=function(){if(4===k.readyState&&!l){switch(k.status){case 200:f(k.responseText),l=!0;break;case 202:var a=parseInt(k.getResponseHeader("ETA"),10);g=a?1e3*a:1e4,setTimeout(function(){return c.waitForProxy(d,e,f)},g);break;case 416:c.waitForProxy(d,e,f);break;default:f(null),l=!0}h.logger.info("proxy resp",k.status,g||k.responseText),b.playerSumologic.sendInfo(["proxy","resp",k.status,g||k.responseText].join(" "),!0)}},k.send(),this.logger.info("proxy",j),b.playerSumologic.sendInfo(["proxy",d,j].join(" "),!0)},c.getOptimalMediaFile=function(a,b,d){c.getOptimalMediaFiles(a,b,function(a,b){d(a.length?a[0]:null)})},c.getOptimalHeight=function(a,b){return b?!a.height||!a.width||a.api&&"vpaid"===a.api.toLowerCase()?Math.ceil(b/16*9):Math.ceil(a.height*(b/a.width)):0},c.getAssetFromMediaProvider=function(a){var c;switch(a){case b.MediaProvider.JS:c=b.ASSETS.vpaidvideojs;break;case b.MediaProvider.FLASH:c=b.ASSETS.vpaidvideoswf;break;case b.MediaProvider.CANVAS:c=b.ASSETS.vpaidcanvas;break;default:c=""}return c},c.getEncodingCandidate=function(a){var b;return a.forEach(function(a){var c=a.type||"";switch(a.weight=0,c.split("/").pop()){case"mov":a.weight=150;break;case"mp4":a.weight=100;break;case"flv":case"x-flv":a.weight=75;break;case"webm":case"ogg":case"ogv":a.weight=50}(!b||b.weight<=a.weight)&&(b=b||a,(b.weight0)||b>=0&&a.offset>=0&&b>=a.offset&&!a.fired})},b.prototype.getAllResources=function(){return this.resources},b.prototype.removeResources=function(){this.resources=[]},b.prototype.hasResources=function(){return this.resources.length>0},b.prototype.addResource=function(a,b){this.resources.push({url:a,offset:b})},b.prototype.setTracked=function(){this.eventIsTracked=!0},b.prototype.isTracked=function(){return this.eventIsTracked},b.prototype.addTracked=function(a,b){this.tracked.push({time:b,url:a})},b.prototype.getTracked=function(){return this.tracked},b.prototype.isTrackable=function(){return!this.eventIsTracked||this.isMultiple()},b}();b.Tracking=c}(b=a.tracker||(a.tracker={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){var c=function(){function b(b,c,d){if(void 0===d&&(d=!0),this.key=b,this.value=c,this.multiple=d,this.logger=new a.Logger("tracker.Metadata"),!b)throw new Error("Metadata key is mandatory")}return b.prototype.isMultiple=function(){return this.multiple},b.prototype.getKey=function(){return this.key},b.prototype.getValue=function(){var a=this.value;if("function"==typeof a)try{return String(a()||"")}catch(b){return this.logger.warn("getValue: error while trying to execute value function:",b),""}return String(a||"")},b.prototype.getUrlPiece=function(){return encodeURIComponent(this.getKey())+"="+encodeURIComponent(this.getValue())},b}();b.Metadata=c}(b=a.tracker||(a.tracker={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(a){var b=function(){function a(){}return a.format=[{name:"callJS"},{name:"adTimeout"},{name:"adCall"},{name:"adStartJS"},{name:"vpaidError"},{name:"vastError"},{name:"ad"},{name:"noAd"},{name:"passback"},{name:"click-replay",multiple:!0},{name:"click-call-button",multiple:!0}],a.vast=[{name:"error"},{name:"fullscreen",multiple:!0},{name:"exitFullscreen",multiple:!0},{name:"click",multiple:!0},{name:"creativeView"},{name:"impression"},{name:"start"},{name:"firstQuartile"},{name:"midpoint"},{name:"thirdQuartile"},{name:"complete"},{name:"pause",before:["start"],multiple:!0},{name:"resume",before:["pause"],multiple:!0},{name:"mute",multiple:!0},{name:"unmute",multiple:!0},{name:"expand",multiple:!0},{name:"collapse",multiple:!0},{name:"rewind",multiple:!0},{name:"skip"},{name:"close"},{name:"progress",multiple:!0},{name:"acceptInvitationLinear"},{name:"acceptInvitation"},{name:"closeLinear"},{name:"noAd"},{name:"noLinearAd"},{name:"customClicks"}],a}();a.Config=b}(b=a.tracker||(a.tracker={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){var c=function(){function c(c){this.logger=new a.Logger("tracker.Tracker"),this.trackings={},this.metadatas=[],this.errors=[],this.errorUrls=[],this.sumoTracker=new a.Sumologic,this.trackedEvents={},this.sumoTracker.init(a.Sumologic.collectors.player),c instanceof Array?this.setTrackings(c):this.setTrackings(b.Config.vast),this.logger.info("new",this)}return c.prototype.setTrackings=function(b){return b instanceof Array?void a.ArrayHelper.forEach(b,function(a){this.setTracking(a)},this):void this.logger.error("setTrackings param error, expected array.",b)},c.prototype.setTracking=function(a){return a.name?void(this.trackings[a.name]=new b.Tracking(a.name,a.before,a.after,a.multiple,a.metadata,a.resources)):void this.logger.error("Name of tracking is needed",a)},c.prototype.getTracking=function(a){return this.trackings[a]},c.prototype.getTrackedEvents=function(){var a,b=[];for(var c in this.trackings)this.trackings.hasOwnProperty(c)&&(a=this.trackings[c],a.isTracked()&&b.push(a));return b},c.prototype.addResource=function(b,c,d){if(a.StringHelper.isURL(c)||this.sumoTracker.sendError(["invalid-url",c].join(";"),!0),"progress"===b&&!d)return this.logger.error('Adding a "progress" tracking requires an associated offset',c),!1;if(!c||c.trim&&!c.trim())return this.logger.error("Adding a tracking requires an url not empty",c),!1;var e=this.getTracking(b);if(e){var f=e.getAllResources();if(f.length){var g=!1;if(a.ArrayHelper.forEach(f,function(a){g||(g=c===a.url)}),g)return this.logger.warn("URL already exists"),!1}return e.addResource(c,d),!0}return this.logger.error("This event ("+b+") does not exist in config"),!1},c.prototype.addResources=function(b){return b instanceof Array?(a.ArrayHelper.forEach(b,function(b){a.ArrayHelper.forEach(b.resources,function(a){this.addResource(b.event,a.url,a.offset)},this)},this),!0):!1},c.prototype.isTrackable=function(b){var c=this.getTracking(b);if(!c)return this.trackError(b,"This event ("+b+") does not exist in config"),!1;if(!c.isTrackable())return!1;if(!c.hasResources())return!0;if(c){var d=!0,e=!0,f=c.getBefore(),g=c.getAfter();return f.length&&(d=a.ArrayHelper.some(f,function(a){var b=this.getTracking(a),c=b&&!b.isTrackable(),d=b&&b.isTracked();return d||c||!b},this),d||this.trackError(b,"Previous event ["+c.getBefore().join(",")+"] was not tracked")),g.length&&(e=a.ArrayHelper.some(g,function(a){var b=this.getTracking(a),c=b&&b.isTrackable(),d=b&&!b.isTracked();return d||c||!b},this),e||this.trackError(b,"Next event ["+c.getAfter().join(",")+"] are already tracked")),d&&e}},c.prototype.track=function(b,c,d,e){void 0===c&&(c={});var f=this.getTracking(b);if(!this.isTrackable(b))return this.logger.warn("This event ("+b+") is not trackable"),!1;if("progress"===b&&(null===d||isNaN(d)))return this.trackError(b,"This event ("+b+") needs the current progress time (in seconds)"),!1;var g=f.getResources(d);return a.ArrayHelper.forEach(g,function(a){var e=a.url;f&&f.isMetadata()&&(e=this.processMetadata(e));for(var g in c)c.hasOwnProperty(g)&&(e=e.replace(g,c[g]));var h=new Image;h.src=e,a.fired=!0,this.logger.debug("track ["+b+(d?"@"+d.toFixed(2)+"s":"")+"]: ",e),f.addTracked(e,d),this.callback(b,!0)},this),f.setTracked(),this.trackedEvents[b]=this.trackedEvents[b]||0,this.trackedEvents[b]++,a.WIGOI&&a.WIGOI.videoEvent&&a.WIGOI.videoEvent(b,d?d.toFixed(2)||d.toString():"undefined",e?100*d/e:0,g),!0},c.prototype.getTrackedCount=function(a){return this.trackedEvents[a]||0},c.prototype.setMetadata=function(a,c,d){if(void 0===d&&(d=!0),"string"!=typeof a||!a)return this.logger.warn("setMetadata: key is mandatory (string).",a),!1;if("string"!=typeof c&&"function"!=typeof c)return this.logger.warn("setMetadata: value: String or Function expected.",c),!1;if("boolean"!=typeof d)return this.logger.warn("setMetadata: multiple: Boolean expected.",d),!1;var e=new b.Metadata(a,c,d);return e?(this.metadatas.push(e),!0):!1},c.prototype.processMetadata=function(a){for(var b,c,d=this.metadatas.length-1;d>=0;d--)b=this.metadatas[d],c=b.getKey(),0===c.indexOf("[")?a=a.replace(c,b.getValue()):a+=(a.indexOf("?")>=0?"&":"?")+b.getUrlPiece(),b.isMultiple()||this.metadatas.splice(d,1);return a},c.prototype.getTrackingsInfo=function(){var b,c={};for(var d in this.trackings)if(this.trackings.hasOwnProperty(d)){b=this.trackings[d];var e=b.getTracked();a.ArrayHelper.forEach(e,function(a,d){var e=new Date(a.time);c[b.getName()+"-"+d]={event:b.getName(),url:a.url,time:e.toTimeString().substr(0,8)+"."+e.getMilliseconds()}})}this.logger.table(c),this.logger.table(this.errors)},c.prototype.setTrackingError=function(b){return a.StringHelper.isURL(b)?void this.errorUrls.push(b):(this.logger.error("setTrackingError: wrong URL format",b),!1)},c.prototype.trackError=function(b,c){this.logger.warn("Track errors:",b,c),this.callback(b,"false");var d=new Date;this.errors.push({event:b,message:c,time:d.getHours()+":"+d.getMinutes()+":"+d.getSeconds()+"."+d.getMilliseconds()}),a.ArrayHelper.forEach(this.errorUrls,function(a){a+="&event="+encodeURIComponent(b),a+="&message="+encodeURIComponent(c);var d=new Image;d.src=a})},c.prototype.callback=function(a,b){if("function"==typeof this.handler)try{this.handler(a,b)}catch(c){this.logger.error("Callback error ("+a+"):",c)}},c.prototype.setCallback=function(a){"function"==typeof a&&(this.handler=a)},c}();b.Tracker=c}(b=a.tracker||(a.tracker={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){var c;!function(c){var d=function(){function c(b,c,d,e,f){this.vpaidAd=d,this.mediaFile=e,this.linearAd=f,this.logger=new a.Logger("player.plugin.Tracker")}return c.prototype.init=function(){var c=this;this.logger.debug("init");try{this.tracker=new a.tracker.Tracker;var d={},e=[a.vast.TrackingEvent.skip,a.vast.TrackingEvent.creativeView,a.vast.TrackingEvent.start,a.vast.TrackingEvent.impression,a.vast.TrackingEvent.firstQuartile,a.vast.TrackingEvent.midpoint,a.vast.TrackingEvent.thirdQuartile,a.vast.TrackingEvent.complete],f=function(b,g,h){void 0===g&&(g=null),h=h||c.vpaidAd.getAdDuration()-c.vpaidAd.getAdRemainingTime()||0;var i={"[CONTENTPLAYHEAD]":a.Utils.offset(h),"[CACHEBUSTING]":a.StringHelper.rand(8),"[ERRORCODE]":"","[ASSETURI]":String(c.mediaFile.url)};switch(g){case a.vpaid.VPAIDEvent.AdError:i["[ERRORCODE]"]="901"}switch(b){case a.vast.TrackingEvent.start:d[a.vast.TrackingEvent.impression]||f(a.vast.TrackingEvent.impression);break;case a.vast.TrackingEvent.complete:for(var j=Math.floor(h)-1,k=j+3;k>j;j++)f(a.vast.TrackingEvent.progress,a.vpaid.VPAIDEvent.AdRemainingTimeChange,j);case a.vast.TrackingEvent.firstQuartile:case a.vast.TrackingEvent.midpoint:case a.vast.TrackingEvent.thirdQuartile:d[a.vast.TrackingEvent.start]||f(a.vast.TrackingEvent.start)}a.ArrayHelper.indexOf(e,b)>-1&&d[b]||(c.tracker.track(b,i,h,c.vpaidAd.getAdDuration()),d[b]=!0)},g=function(a){c.vpaidAd.subscribe(function(){f(a,b.trackingMapping[a])},b.trackingMapping[a])};for(var h in this.linearAd.tracking){var i=this.linearAd.tracking[h];i&&(a.ArrayHelper.forEach(i,function(a,b,d){c.tracker.addResource(h,a.url,a.data)},this),g(h))}var j=!1,k=function(){j&&c.vpaidAd.getAdVolume()>0?f(a.vast.TrackingEvent.unmute,a.vpaid.VPAIDEvent.AdVolumeChange):j||0!==c.vpaidAd.getAdVolume()||f(a.vast.TrackingEvent.mute,a.vpaid.VPAIDEvent.AdVolumeChange),j=!c.vpaidAd.getAdVolume()},l=function(){j=!c.vpaidAd.getAdVolume()};this.vpaidAd.subscribe(l,a.vpaid.VPAIDEvent.AdStarted),this.vpaidAd.subscribe(k,a.vpaid.VPAIDEvent.AdVolumeChange);var m;this.vpaidAd.subscribe(function(){var b=a.HTMLHelper.isFullscreen()||c.vpaidAd.getAdExpanded();!m&&b?(f(a.vast.TrackingEvent.fullscreen),f(a.vast.TrackingEvent.expand)):m&&!b&&(f(a.vast.TrackingEvent.exitFullscreen),f(a.vast.TrackingEvent.collapse)),m=b},a.vpaid.VPAIDEvent.AdExpandedChange)}catch(n){this.logger.error("exception caught:",n)}},c.prototype.deinit=function(){this.logger.debug("deinit")},c.prototype.getTracker=function(){return this.tracker},c.prototype.removeResources=function(a){try{this.tracker.getTracking(a).removeResources()}catch(b){this.logger.error("Remove tracking resources for event "+a+" throw an exception",b)}},c}();c.Tracker=d}(c=b.plugin||(b.plugin={}))}(b=a.player||(a.player={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){var c;!function(c){var d=function(){function c(a,c,d,e,f){this.container=a,this.config=c,this.vpaidAd=d,this.mediaFile=e,this.enable=b.playerSumologic.canSend}return c.getContext=function(){var b=a.Context.isMobile()&&!a.Context.isTablet()?"mob":a.Context.isTablet()?"tab":"desk",c=a.Context.isAndroid()?"android":a.Context.getIosVersion()?"ios":a.Context.isIE()?"ie":a.Context.isChrome()?"ch":a.Context.isFirefox()?"ff":"ot";return[b,c].join(" ")},c.prototype.init=function(){this.enable&&this.bindEvent(this.vpaidAd.subscribe.bind(this.vpaidAd))},c.prototype.deinit=function(){this.enable&&this.bindEvent(this.vpaidAd.unsubscribe.bind(this.vpaidAd))},c.prototype.bindEvent=function(c){for(var d in a.vpaid.VPAIDEvent)/^Ad(?:Loaded|Video|Click)/.test(d)?c(function(a,c){b.playerSumologic.sendInfo(a)}.bind(this,d),d):"AdError"===d&&c(function(a){return b.playerSumologic.sendError(a)},d)},c}();c.Bench=d}(c=b.plugin||(b.plugin={}))}(b=a.player||(a.player={}))}(teads||(teads={}));try{var teads=teads||window.top.teads}catch(e){var teads=teads||window.teads}!function(a){var b;!function(b){b.playerSumologic=new a.Sumologic;var c=function(){function c(c,d){this.container=c,this.config=d,this.logger=new a.Logger("player.VASTPlayer"),this.plugins=[],this.logger.info("new",this),this.vastLib=new a.vast.VASTLib({assetsUrl:this.config.path}),b.playerSumologic.init(a.Sumologic.collectors.player),b.playerSumologic.sendMetadata("0.8.25;"+b.plugin.Bench.getContext())}return c.prototype.loadVast=function(a,b,c){var d=this,e=function(a){d.linearAd=a,b(d.linearAd)};this.vastLib.load(a,e,c)},c.prototype.parseVast=function(a,b,c){var d=this,e=function(a){d.linearAd=a,b(d.linearAd)};this.vastLib.parse(a,e,c)},c.prototype.playOptimalMediaFile=function(a,c,d){var e=this;b.MediaFileHelper.getOptimalMediaFile(this.linearAd.mediaFiles,a,function(a){return e.playMediaFile(a,c,d)})},c.prototype.loadOptimalMediaFile=function(a,c){var d=this;b.MediaFileHelper.getOptimalMediaFile(this.linearAd.mediaFiles,this.linearAd.adParameters,function(b){return d.loadMediaFile(b,a,c)})},c.prototype.playMediaFile=function(b,c,d){if(!b){var e="no valid media file found in VAST file for this context";return d(e),void this.logger.error({msg:e,ua:navigator.userAgent,mediafiles:this.linearAd.mediaFiles})}var f=function(b,d){c(b,d),b.subscribe(function(){b.startAd()},a.vpaid.VPAIDEvent.AdLoaded),b.initAd(d.width,d.height,d.mode,d.bitrate,d.parameters)};this.loadMediaFile(b,f,d)},c.prototype.loadMediaFile=function(c,d,e){var f=this;if(!c){var g="no valid media file found in VAST file for this context";return e(g),void this.logger.error({msg:g,ua:navigator.userAgent,mediafiles:this.linearAd.mediaFiles})}var h=b.MediaFileHelper.getMediaProvider(c),i=c.url,j=this.config.width?this.config.width:this.container.offsetWidth,k={width:j,height:this.config.height?this.config.height:b.MediaFileHelper.getOptimalHeight(c,j),mode:"normal",bitrate:c.bitrate||512,parameters:this.linearAd.adParameters};switch(h){case b.MediaProvider.VPAID:break;case b.MediaProvider.FLASH:case b.MediaProvider.JS:case b.MediaProvider.CANVAS:i=this.config.path+"/"+b.MediaFileHelper.getAssetFromMediaProvider(h),h===b.MediaProvider.JS?i=a.vpaid.BundledContainer.VIDEO:h===b.MediaProvider.CANVAS&&(i=a.vpaid.BundledContainer.CANVAS);var l=this.config.path.match("/dist")||0===this.config.path.indexOf("http")?this.config.path.match("/dist")?window.location.protocol+window.location.host+this.config.path:this.config.path:window.location.protocol+this.config.path,m=this.linearAd.clickThrough.length?this.linearAd.clickThrough[0]:null;k.parameters={url:c.url,debug:this.config.debug,clickThrough:m,skippable:this.linearAd.skippable,skipoffset:this.linearAd.skipDelay,assetsPath:l},h===b.MediaProvider.FLASH?k.parameters=a.JSON.stringify(k.parameters):k.parameters={AdParameters:a.JSON.stringify(k.parameters)};break;case b.MediaProvider.UNSUPPORTED:default:return void e("unsupported media file "+c.url)}this.container.innerHTML="";var n={path:this.config.path,debug:this.config.debug},o=new a.vpaid.VPAIDLoader(this.container,n),p=function(a){try{f.vpaidAd=a,f.mediafile=c;for(var g in b.plugin)try{var h=b.plugin[g];f.plugins[g]&&f.plugins[g].deinit(),f.plugins[g]=new h(f.container,f.config,a,c,f.linearAd),f.plugins[g].init()}catch(i){f.logger.error("Could not initialize plugin "+g,i)}d(a,k)}catch(i){e(i)}};o.load(i,p,e)},c.prototype.getPlugin=function(a){return this.plugins[a]},c}();b.VASTPlayer=c}(b=a.player||(a.player={}))}(teads||(teads={})),__extends(window.teads,teads)}(window.teads=window.teads||{}); /* Copyright Teads Technology - http://teads.tv */(function(){'use strict';var g,l=this;function aa(a){return void 0!==a}function ba(a){a=a.split(".");for(var b=l,c;c=a.shift();)if(null!=b[c])b=b[c];else return null;return b} function ca(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null"; else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function m(a){return"array"==ca(a)}function da(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length}function n(a){return"string"==typeof a}function ea(a){return"boolean"==typeof a}function p(a){return"number"==typeof a}function r(a){return"function"==ca(a)}function s(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function fa(a,b,c){return a.call.apply(a.bind,arguments)} function ga(a,b,c){if(!a)throw Error();if(2")&&(a=a.replace(qa,">"));-1!=a.indexOf('"')&&(a=a.replace(ra,"""));-1!=a.indexOf("'")&&(a=a.replace(sa,"'"));-1!=a.indexOf("\x00")&&(a=a.replace(ta,"�"));return a}var oa=/&/g,pa=//g,ra=/"/g,sa=/'/g,ta=/\x00/g,na=/[\x00&<>"']/;function ua(a,b){return ab?1:0} function va(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})}function wa(a){var b=n(void 0)?"undefined".replace(/([-()\[\]{}+?*.$\^|,:#c?Math.max(0,a.length+c):c;if(n(a))return n(b)&&1==b.length?a.indexOf(b,c):-1;for(;cc?null:n(a)?a.charAt(c):a[c]}function Ya(a,b){var c=A(a,b),d;(d=0<=c)&&z.splice.call(a,c,1);return d}function Za(a){return z.concat.apply(z,arguments)}function $a(a){var b=a.length;if(0=arguments.length?z.slice.call(a,b):z.slice.call(a,b,c)};var bb=v("Opera")||v("OPR"),C=v("Trident")||v("MSIE"),cb=v("Gecko")&&-1==xa.toLowerCase().indexOf("webkit")&&!(v("Trident")||v("MSIE")),db=-1!=xa.toLowerCase().indexOf("webkit"),eb=db&&v("Mobile");v("Macintosh");v("Windows");v("Linux");var fb=l.navigator||null;fb&&(fb.appVersion||"").indexOf("X11");v("Android");!v("iPhone")||v("iPod")||v("iPad");v("iPad");function gb(){var a=l.document;return a?a.documentMode:void 0} var hb=function(){var a="",b;if(bb&&l.opera)return a=l.opera.version,r(a)?a():a;cb?b=/rv\:([^\);]+)(\)|;)/:C?b=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:db&&(b=/WebKit\/(\S+)/);b&&(a=(a=b.exec(xa))?a[1]:"");return C&&(b=gb(),b>parseFloat(a))?String(b):a}(),ib={}; function jb(a){var b;if(!(b=ib[a])){b=0;for(var c=la(String(hb)).split("."),d=la(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&fc?"":0==c?";expires="+(new Date(1970,1,1)).toUTCString():";expires="+(new Date(ia()+1E3*c)).toUTCString();this.Ba.cookie=a+"="+b+e+d+c+f}; g.get=function(a,b){for(var c=a+"=",d=(this.Ba.cookie||"").split(nb),e=0,f;f=d[e];e++){if(0==f.lastIndexOf(c,0))return f.substr(c.length);if(f==a)return""}return b};g.remove=function(a,b,c){var d=this.Aa(a);this.set(a,"",0,b,c);return d};g.Ia=function(){return ob(this).keys};g.oa=function(){return ob(this).th};g.Aa=function(a){return aa(this.get(a))};g.clear=function(){for(var a=ob(this).keys,b=a.length-1;0<=b;b--)this.remove(a[b])}; function ob(a){a=(a.Ba.cookie||"").split(nb);for(var b=[],c=[],d,e,f=0;e=a[f];f++)d=e.indexOf("="),-1==d?(b.push(""),c.push(e)):(b.push(e.substring(0,d)),c.push(e.substring(d+1)));return{keys:b,th:c}}var pb=new mb(document);pb.ji=3950;function qb(){return!rb()&&(v("iPod")||v("iPhone")||v("Android")||v("IEMobile"))}function rb(){return v("iPad")||v("Android")&&!v("Mobile")||v("Silk")};function sb(a,b){this.document=a||document;this.window=b||window;this.bc=null;this.kd=["","webkit","ms","moz"];this.wc=["VisibilityState","visibilitychange","Hidden"];this.Oa={};this.Ja={};this.ue()}function tb(a){var b=ub;b.Oa.format||(b.Oa.format=[]);b.Oa.format.push(a)}function vb(a){var b=ub;b.Ja.format||(b.Ja.format=[]);return b.Ja.format.push(a)}sb.prototype.isSupported=function(){return qb()||rb()?wb(this,0)||wb(this,1)||wb(this,2)||wb(this,3):!1}; function wb(a,b){return a.kd[b]+xb(a.kd[b],a.wc[2])in a.document}function yb(a,b){return w(b,function(){return function(a){return B(a,function(a){return a()})}}(a))}sb.prototype.ng=function(){return!0===this.document[this.bc+xb(this.bc,this.wc[2])]?yb(this,this.Ja):yb(this,this.Oa)};function xb(a,b){return""===a?b.toLowerCase():b} sb.prototype.ue=function(){try{if(this.isSupported())return B(this.kd,function(a){return function(c){if(null!=a.document[c+xb(c,a.wc[2])])return a.bc=c}}(this)),this.document.addEventListener(this.bc+this.wc[1],function(a){return function(){return a.ng.apply(a,arguments)}}(this));if(this.document.hasOwnProperty("onfocusin")&&C&&8<=parseInt(hb,10)&&8<=D)return this.document.onfocusin=function(a){return function(){return yb(a,a.Oa)}}(this),this.document.onfocusout=function(a){return function(){return yb(a, a.Ja)}}(this);0<=A(this.window,"onpageshow")&&(this.window.onpageshow=function(a){return function(){return yb(a,a.Oa)}}(this),this.window.onpagehide=function(a){return function(){return yb(a,a.Ja)}}(this));this.window.onfocus=function(a){return function(){return yb(a,a.Oa)}}(this);return this.window.onblur=function(a){return function(){return yb(a,a.Ja)}}(this)}catch(a){return console.log(a)}};function F(a,b){this.x=aa(a)?a:0;this.y=aa(b)?b:0}g=F.prototype;g.clone=function(){return new F(this.x,this.y)};g.toString=function(){return"("+this.x+", "+this.y+")"};g.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};g.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};g.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this}; g.translate=function(a,b){a instanceof F?(this.x+=a.x,this.y+=a.y):(this.x+=a,p(b)&&(this.y+=b));return this};g.scale=function(a,b){var c=p(b)?b:a;this.x*=a;this.y*=c;return this};function zb(a,b){this.width=a;this.height=b}g=zb.prototype;g.clone=function(){return new zb(this.width,this.height)};g.toString=function(){return"("+this.width+" x "+this.height+")"};g.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};g.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};g.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this}; g.scale=function(a,b){var c=p(b)?b:a;this.width*=a;this.height*=c;return this};function Ab(){return db?"Webkit":cb?"Moz":C?"ms":bb?"O":null};var Bb=!C||C&&9<=D,Cb=!cb&&!C||C&&C&&9<=D||cb&&jb("1.9.1");C&&jb("9");var Db=C||bb||db;function Eb(a){return a?new Fb(Gb(a)):Oa||(Oa=new Fb)}function Hb(a){return n(a)?document.getElementById(a):a}function Ib(a,b){w(b,function(b,d){"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:d in Jb?a.setAttribute(Jb[d],b):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,b):a[d]=b})} var Jb={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};function Kb(){var a=(G||window).document,a="CSS1Compat"==a.compatMode?a.documentElement:a.body;return new zb(a.clientWidth,a.clientHeight)} function Lb(a,b,c){var d=arguments,e=document,f=d[0],h=d[1];if(!Bb&&h&&(h.name||h.type)){f=["<",f];h.name&&f.push(' name="',ma(h.name),'"');if(h.type){f.push(' type="',ma(h.type),'"');var k={};La(k,h);delete k.type;h=k}f.push(">");f=f.join("")}f=e.createElement(f);h&&(n(h)?f.className=h:m(h)?f.className=h.join(" "):Ib(f,h));2"+a,c.removeChild(c.firstChild)):c.innerHTML=a;if(1==c.childNodes.length)return c.removeChild(c.firstChild);for(a=b.createDocumentFragment();c.firstChild;)a.appendChild(c.firstChild);return a}function Qb(a,b){Mb(Gb(a),a,arguments,1)} function Rb(a){return a&&a.parentNode?a.parentNode.removeChild(a):null}function Sb(a){if(!a)return null;if(a.firstChild)return a.firstChild;for(;a&&!a.nextSibling;)a=a.parentNode;return a?a.nextSibling:null}function Tb(a){if(!a)return null;if(!a.previousSibling)return a.parentNode;for(a=a.previousSibling;a&&a.lastChild;)a=a.lastChild;return a}function Nb(a){return s(a)&&0a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return null} function jc(a){var b,c=Gb(a),d=gc(a,"position"),e=cb&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),f=new F(0,0),h;b=c?Gb(c):document;(h=!C||C&&9<=D)||(h="CSS1Compat"==Eb(b).Ba.compatMode);h=h?b.documentElement:b.body;if(a==h)return f;if(a.getBoundingClientRect)b=hc(a),a=bc(Eb(c)),f.x=b.left+a.x,f.y=b.top+a.y;else if(c.getBoxObjectFor&&!e)b=c.getBoxObjectFor(a),a=c.getBoxObjectFor(h),f.x=b.screenX-a.screenX,f.y=b.screenY-a.screenY; else{b=a;do{f.x+=b.offsetLeft;f.y+=b.offsetTop;b!=a&&(f.x+=b.clientLeft||0,f.y+=b.clientTop||0);if(db&&"fixed"==gc(b,"position")){f.x+=c.body.scrollLeft;f.y+=c.body.scrollTop;break}b=b.offsetParent}while(b&&b!=a);if(bb||db&&"absolute"==d)f.y-=c.body.offsetTop;for(b=a;(b=ic(b))&&b!=c.body&&b!=h;)f.x-=b.scrollLeft,bb&&"TR"==b.tagName||(f.y-=b.scrollTop)}return f} function kc(a){if(1==a.nodeType){var b;if(a.getBoundingClientRect)b=hc(a),b=new F(b.left,b.top);else{b=bc(Eb(a));var c=jc(a);b=new F(c.x-b.x,c.y-b.y)}if(cb&&!jb(12)){b:{c=va("transform");if(void 0===a.style[c]&&(c=Ab()+wa(c),void 0!==a.style[c])){c=(db?"-webkit":cb?"-moz":C?"-ms":bb?"-o":null)+"-transform";break b}c="transform"}a=(a=gc(a,c)||gc(a,"transform"))?(a=a.match(lc))?new F(parseFloat(a[1]),parseFloat(a[2])):new F(0,0):new F(0,0);a=new F(b.x+a.x,b.y+a.y)}else a=b;return a}b=r(a.Dg);c=a;a.targetTouches&& a.targetTouches.length?c=a.targetTouches[0]:b&&a.Ca.targetTouches&&a.Ca.targetTouches.length&&(c=a.Ca.targetTouches[0]);return new F(c.clientX,c.clientY)}function mc(a){return nc(a)}function nc(a){var b=oc;if("none"!=gc(a,"display"))return b(a);var c=a.style,d=c.display,e=c.visibility,f=c.position;c.visibility="hidden";c.position="absolute";c.display="inline";a=b(a);c.display=d;c.position=f;c.visibility=e;return a} function oc(a){var b=a.offsetWidth,c=a.offsetHeight,d=db&&!b&&!c;return aa(b)&&!d||!a.getBoundingClientRect?new zb(b,c):(a=hc(a),new zb(a.right-a.left,a.bottom-a.top))}var lc=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function H(a,b){return new pc(a,b)} function qc(a,b){return J.querySelectorAll?b.querySelectorAll(a):function(a){a=a.split(",");var d=a.length,e,f=[],h,k,q;for(e=0;e]+/);k=k.match(/[ >]+/g)||[];var t=void 0;q=void 0;var y=[this],x=void 0,P=void 0,Q=t=void 0,L=void 0,N=void 0,I=void 0,Ka=void 0,mf=void 0,Qa=void 0,Ra=void 0;for(k.unshift(" ");t=h.shift();)for((q=k.shift())&&(q=q.replace(/^ +| +$/g,"")),x=y.slice(0),y=[],P=x.length,Q=t.match(/[#.[]?[a-z_-]+(?:='[^']+'|="[^"]+")?]?/gi),L= Q.length,t=0;tt,x=G.setInterval(function(){k++;var d=h+t*k;if(y&&dc)d=c;a.e(b,d+(q?"px":""));if(d==c||isNaN(d))G.clearInterval(x),r(e)&&e.call(a,!1)},1/.09);return a}function tc(a,b){sc(a,"opacity",0,uc,b)}function vc(a,b){isNaN(parseInt(a.e("height"),10))&&a.e("height",nc(a[0]).height+"px");return sc(a,"height",0,400,b)} function wc(a,b){a[0].style.height=a[0].offsetHeight+10+"px";G.setTimeout(function(){rc(a,0,b)},100)}function xc(a,b,c){a.e("height","0px");return sc(a,"height",b,400,c)}function yc(a,b){for(var c=0,d=a.length;c=a.keyCode)a.keyCode=-1}catch(b){}};Lc.prototype.Dg=function(){return this.Ca};var Mc="closure_lm_"+(1E6*Math.random()|0),Nc={},Oc=0;function K(a,b,c,d,e){if(m(b)){for(var f=0;fc.keyCode||void 0!=c.returnValue)){a:{var f=!1;if(0==c.keyCode)try{c.keyCode=-1;break a}catch(h){f=!0}if(f||void 0==c.returnValue)c.returnValue=!0}c=[];for(f=d.currentTarget;f;f=f.parentNode)c.push(f);for(var f=a.type,k=c.length-1;!d.md&&0<=k;k--)d.currentTarget=c[k],e&=Wc(c[k],f,!0,d);for(k=0;!d.md&&k>>0);function Pc(a){if(r(a))return a;a[Yc]||(a[Yc]=function(b){return a.handleEvent(b)});return a[Yc]};function Zc(){this.jd=!1}var M=new Zc;function $c(a,b,c){function d(){return a.apply(this,b)}d.prototype=a.prototype;c&&s(c)&&w(c,function(a,b){d.prototype[b]=a});return new d}Zc.prototype.ed=function(a,b){var c=Array.prototype.slice.call(arguments,2),d={},e=null;a&&a[ad]&&a[ad]&&(e=a[ad]);null!=e&&(d[ad]=e,d.trace=function(){e.log.apply(e,arguments)});return $c(b,c,d)}; function bd(){try{try{var a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");try{a.AllowScriptAccess="always"}catch(b){return["6","0","0"]}}catch(c){}return(new ActiveXObject("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1].split(",")}catch(d){try{if(cd.mimeTypes["application/x-shockwave-flash"].enabledPlugin)return(cd.plugins["Shockwave Flash 2.0"]||cd.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1].split(",")}catch(e){}}return["0", "0","0"]}Zc.prototype.W=function(){return(268435456*Math.random()|0).toString(16)};function dd(a){var b=J.createElement("script"),c=J.getElementsByTagName("script")[0];b.type="text/javascript";b.async=!0;b.src=a;c.parentNode.insertBefore(b,c)} function ed(a){var b=J.createElement("iframe"),c=J.body.appendChild(b);c.style.width="10px";c.style.height="10px";c.style.position="absolute";c.style.left="-999em";c.style.top="0";b=b.contentWindow?b.contentWindow:b.contentDocument&&b.contentDocument.document?b.contentDocument.document:b.contentDocument;b.document.open();b.document.write(a);b.document.close()}function fd(a){var b=new Image(1,1);b.onload=function(){};b.src=a} Zc.prototype.ge=function(){function a(){J.addEventListener?J.removeEventListener("DOMContentLoaded",a,!1):J.detachEvent("onreadystatechange",a);b()}function b(){d=!0;for(var a;a=c.shift();)a()}var c=[],d=!1;return function(e){if(/^[ci]/.test(J.readyState))e();else if(J.addEventListener)c.push(e),J.addEventListener("DOMContentLoaded",a,!1);else{c.push(e);J.attachEvent("onreadystatechange",a);var f=!1;try{f=null==G.frameElement&&J.documentElement}catch(h){}f&&f.doScroll&&function q(){if(!d){try{f.doScroll("left")}catch(a){return setTimeout(q, 50)}b()}}()}}}();function gd(a,b){var c=null;return function(){var d=b||this,e=arguments;clearTimeout(c);c=setTimeout(function(){a.apply(d,e)},1500)}}Zc.prototype.JSON=new function(){};function hd(){}hd.prototype.te=function(a){return!H("style#tt-"+a).length};function id(a,b,c){null==c&&(c=M.W());return a.te(c)?'":null}function O(a,b,c){return s(c)?"."+b+" {"+(jd(a,c)||"")+"}":!1} function jd(a,b){var c;if(!s(b))return!1;c=[];w(b,function(){return function(a,b){m(a)?B(a,function(a){c.push(b+":"+a)}):c.push(b+":"+a)}}(a));return c.join(";")}Zc.prototype.n=new hd;"function"!=typeof Object.create&&(Object.create=function(){function a(){}return function(b){if(1f.status||400<=f.status)return d();e(a)}}:(f.onerror=d,f.ontimeout=d,f.onprogress=function(){},f.timeout=5E3,f.onload=e);try{f.send()}catch(k){throw new lb.d.Of(k);}}Zc.prototype.indexOf=function(a,b,c){if(null==a)throw new TypeError("array is null or undefined");a=Object(a);var d=a.length>>>0;if(0===d)return-1;c=+c||0;Infinity===Math.abs(c)&&(c=0);if(c>=d)return-1;for(c=Math.max(0<=c?c:d-Math.abs(c),0);c"},Ve:{code:2004,message:"adChoice parameter must be a boolean or an object"},Ze:{code:2005,message:"callbacks parameter must be an object"},$e:{code:2006,message:"capping parameter must be an object{time_interval,frequency)"}, af:{code:2007,message:"components parameter must be an object"},Vb:{code:2008,message:"__name__ parameter must be a string (CSS Selector) or a DOM Element"},zf:{code:2009,message:"mention parameter must be 'none' or a boolean or an object"},li:{code:2010,message:"mention syntax is wrong [__list__]"},Lf:{code:2011,message:"pid parameter must be a numberlike"},Qf:{code:2012,message:"size parameter must be an object"},Pd:{code:2013,message:"size syntax is wrong [__list__]"},$f:{code:2014,message:"TrackingEvents parameter must be an array>"}, eg:{code:2015,message:"__name__ parameter must be a valid URL"},kg:{code:2016,message:"volume parameter must be a number >= 0 and <= 100"},Xf:{code:2017,message:"__name__ parameter must be a string (CSS Selector) or an Object"},If:{code:2018,message:"overlay parameter must be an object"}},nb:{Ed:{code:2100,message:"Config must be a JSON object"},Gf:{code:2101,message:"Config option __name__ doesn't exists"},Cf:{code:2102,message:"Config option __name__ is not compatible with __format__ format"},Ff:{code:2103, message:"Config require __name__ with __format__ format"},bf:{code:2104,message:'Config must have at least a "format" option'}},Qa:{hf:{code:2200,message:"Callback error __name__"},ag:{code:2201,message:"Tracking __name__: __url__"},bg:{code:2202,message:"Error on transaction value: __message__"},vf:{code:2203,message:"Player timeout after __second__ second(s)"},kf:{code:2204,message:"[Base] Finish (__status__, __errorCode__)"},jf:{code:2205,message:"[Base] Error when retrieve extensions"},tf:{code:2206, message:"isVPAID Status: __status__"}},ob:{Id:{code:2300,message:"HTML5 and Flash aren't available on this device"},Wb:{code:2301,message:"HTML5 and Flash aren't available on this browser"},yh:{code:2302,message:"AdBlock detected!"}},lf:{Jf:{code:2400,message:"Base initData method MUST BE override by format classes"}},va:{Fi:{code:2500,message:'Inread require a valid slot "__slot__"'},Sf:{code:2501,message:"Inread slot wasn't found"},Ei:{code:2502,message:'[KO] Inread slot due to avoidSlot "__message__"'}, Gi:{code:2503,message:"[inread.slot]: Given slot is not an element"},Hi:{code:2505,message:"[inread.slot]: Given format instance isn't valid"},Tf:{code:2506,message:"[inread.slot]: @wrapInread isn't valid and inread cannot start"},We:{code:2507,message:"AvoidSlot __message__"},ff:{code:2510,message:"Inread #__UUID__"},cf:{code:2511,message:"__length__ slots available"},df:{code:2512,message:"[KO __cur__/__num__] Invalid slot: __message__"},gf:{code:2513,message:"[OK] Valid slot"},ef:{code:2514,message:"[KO] No slot found __message__"}, Vf:{code:2515,message:"SmartSlots found"},Li:{code:2516,message:"SmartSlot is ON"}},ui:{Xh:{code:2600,message:"Player interface require a valid DOMElement"},Vh:{code:2601,message:"Player HTML5: __message__"},Kh:{code:2602,message:"Player interface: __method__"},vi:{code:2603,message:"Player __mode__ initialized"},ai:{code:2604,message:"Player error"}},ii:{qi:{code:2700,message:"Request language __lang__ doesn't exists"}},Md:{mf:{code:2800,message:"Format are temporarly disabled"},Qi:{code:2801,message:'An unknow error occured: "__message__"'}, Uf:{code:2881,message:"No slot found. Please contact Teads support to get a customized script!"},Ji:{code:2882,message:"Elected slots"},Ii:{code:2883,message:"Best slot"},Ki:{code:2884,message:"__message__"}}};sd={"-2":"skip","-1":"complete",50:"capping reached",51:"timeout",52:"inread slot error",60:"noSlot-DOM",99:"unknow error"};S={xa:"maxbrand",S:"inflow",Jd:"inflow-metropolis",Yb:"inflow",k:"inread",wa:"inboard",zb:"inpicture",xh:"inpicture",Ph:"footer"}; T=function(a){var b,c;if(od){if(G.console&&G.console.debug)return G.console.debug("[tt]",arguments);b=C&&7>=parseInt(hb,10)&&(!D||7>=D);if(!b&&G.console&&G.console.log)return G.console.log(arguments[0]);if(b=J.getElementById("myconsole"))return c=document.createElement("div"),c.innerText=arguments[0],b.appendChild(c)}};yd=function(a){T.apply(this,arguments)};Ad=function(a){if(a)return a.Qc?a.Qc:a.message?a.message:a};function Ed(){this.Cb=[]}function Fd(a){B(a.Cb,function(){return function(a){if(Ub(a))return Rb(a)}}(a));a.Cb=[];return!0};function Gd(){return!1}Zc.prototype.track=function(a,b,c,d){var e,f,h,k;null==d&&(d=null);try{if(!b.value)return!1;h=new Image;k="//t.teads.tv/track";k+="?pid="+b.value;k+="&action="+a;(f=Hd(c))&&(k+=f);e=[];d&&s(d)&&(w(d,function(a,b){return e.push(encodeURIComponent(b)+"="+encodeURIComponent(a))}),k+="&"+e.join("&"));k+="&"+(new Date).getTime();c instanceof Id&&c.value&&c.G&&(f=Hd(c))&&(k+=f);return h.src=k}catch(q){return T('Error on track "'+a+'" : '+q)}}; Zc.prototype.cc=function(a){return a.rg&&a.ij&&pb.Aa(a.ug)?!1:!0};function Jd(a){var b;b=""+(parseInt(a.top,10)>parseInt(a.bottom,10)?"top:"+parseInt(a.top,10):"bottom:"+parseInt(a.bottom,10));b=b+"px;"+(parseInt(a.left,10)>parseInt(a.right,10)?"left:"+parseInt(a.left,10):"right:"+parseInt(a.right,10));return b+="px;"}function Kd(a){(new Image).src=a};function Ld(a,b){this.format=a;this.a=b;this.W=M.W();this.ra="teads_"+this.W;this.Fc=U(this,Md);this.dg=U(this,Nd);U(this,Od);U(this,Pd);this.Ab=U(this,Qd);this.Zb=U(this,Rd);U(this,Sd);this.ya=U(this,Td);this.la=U(this,Ud);this.cg=U(this,Vd);this.qb=U(this,Wd);this.Sd=U(this,Xd);this.Rd=U(this,Yd);U(this,Zd);this.rg=0;this.ug="tt_"+$d(b).value;this.td="start";this.Fb=!0;this.vd=!1;switch(this.format){case S.zb:case "advideum-inpicture":this.Ga=!1;this.vd=!0;break;case S.S:case S.Yb:case S.xa:this.Ga= !1,this.vd=!0}}var Ud="tt-wrapper",Rd="tt-container",Od="tt-mention",Td="tt-player",Pd="tt-whatthis",Wd="tt-adchoice",Md="tt-close",Nd="tt-text",Qd="tt-mute",Sd="tt-preloader",Vd="tt-overlay",Xd="tt-viewport-top",Yd="tt-viewport-bottom",Zd="tt-controls",ae={Ui:Ud,Dh:Rd,ki:Od,Nf:Td,Ti:Pd,zh:Wd,Dd:Md,Ni:Nd,ni:Qd,wi:Sd,ri:Vd,si:"overlayClick",Si:Xd,Ri:Yd,Wi:"tt-wrapper-position",Vi:"tt-wrapper-image",Eh:Zd};function be(a){return Fa(ae,function(b){return b===a})} Ld.prototype.te=function(a){return!H("style#tt-"+a+this.W).length};Ld.prototype.Y=function(a){be(a)&&H(U(this,a));return null};function U(a,b){return be(b)?b+a.W:null}Ld.prototype.T=function(a,b){return be(a)?' id="'+U(this,a)+'" class="'+a+" "+this.format+" "+(b||"")+'" ':null};function ce(a,b){this.format=a;this.ph=b;var c;!Hb("#tt-"+this.ph)&&this.Rc&&(c=this.Rc())&&Qb(J.body,Pb(c));var d;c=V(this.format.a,"style");d="custom-"+this.format.data.W;c=id(M.n,de(c,{"(#[^ ]+)":"$1"+this.format.data.W}),d);(d=Hb("#tt-"+d))&&Na.remove(d);""!==c&&Qb(J.body,Pb(c))}function ee(a,b){var c;return(c=V(a.format.a,"style"))?fe(c,b)+";":""}function ge(a){return a&&""!==a?' style="'+a+'"':""};function he(a){this.format=a;he.c.constructor.call(this,this.format,S.S)}u(he,ce); he.prototype.Rc=function(){var a,b,c;a=Vd;b=a+"."+S.S+" ";c=""+O(M.n,b,{width:"100%",height:"100%",top:"0",left:"-999em",overflow:"hidden",position:"fixed","z-index":"9999999999999999!important",zoom:"1",transition:"opacity "+uc+"ms",background:["url("+ie+")","-webkit-radial-gradient(center,ellipse cover,rgba(127,127,127,0.5) 35%,rgba(0,0,0,0.7) 100%)","-moz-radial-gradient(center,ellipse cover,rgba(127,127,127,0.5) 35%,rgba(0,0,0,0.7) 100%)","-ms-radial-gradient(center,ellipse cover,rgba(127,127,127,0.5) 35%,rgba(0,0,0,0.7) 100%)", "-o-radial-gradient(center,ellipse cover,rgba(127,127,127,0.5) 35%,rgba(0,0,0,0.7) 100%)","radial-gradient(ellipse at center,rgba(127,127,127,0.5) 35%,rgba(0,0,0,0.7) 100%)"],"-webkit-transform":"scale(1)"});c+=O(M.n,b+".overlayClick",{display:"block",width:"100%",height:"100%",top:0,left:0,position:"fixed",cursor:"pointer"});c+=O(M.n,b+".tt-wrapper-position",{position:"absolute",width:"840px","margin-left":"-420px",transition:"width .5s",left:"50%",top:"50%"});c=c+"@media screen and (max-width: 840px) {"+ O(M.n,b+".tt-wrapper-position",{width:"95%","margin-left":"2%",left:"0"});c+="}";c+=O(M.n,a+"."+S.xa+" .tt-wrapper-position",{width:"80%","margin-left":"10%",left:"0"});c+=O(M.n,b+".tt-wrapper-image",{"min-width":"100%",height:"auto",position:"relative","margin-top":"-4px"});c+=O(M.n,b+"."+Ud,{"background-color":"#FFF","box-shadow":"0 5px 80px #505050",height:"100%",width:"100%",position:"absolute","z-index":"9999999999999999",top:"-50%",left:0});c+=O(M.n,Td,{width:"100%",height:"100%",opacity:1, overflow:"hidden",position:"absolute",top:0,left:0,right:0,bottom:0,background:"black"});return id(M.n,c,S.S)}; he.prototype.Uc=function(a,b){var c;null==b&&(b=!1);c=b?";display:none":"";return"
 
"+a+"
"};var uc=500;var je=0,ke=0,le=0;function me(){if(je&&ke&&le)return!1};function ne(a){this.language=a;oe(this.language)||(this.language=pe);this.gj=qe(this.language)||qe("en")} var pe="en",re={Ah:"ar",Ch:"cn",Fh:"cz",Gh:"de",Ih:"dk",Jh:pe,Lh:"es",Qh:"fr",Oh:"fi",Uh:"hr",Wh:"hu",Cc:"in",bi:"it",ci:"jp",di:"jpmobile",ei:"jpmobilePR",gi:"ko",hi:"\uad11\uace0",mi:"mo",oi:"nl",pi:"no",ti:"pl",xi:"pt",yi:"ro",zi:"ru",Ai:"sb",Bi:"se",Ci:"sk",Di:"sl",Mi:"su",Pi:"tr"},se={ar:{mention:"\u0625\u0639\u0644\u0627\u0646"},cn:{mention:"\u5e7f\u544a"},cz:{mention:"REKLAMA"},de:{mention:"WERBUNG"},dk:{mention:"ANNONCE"},en:{mention:"ADVERTISING"},es:{mention:"PUBLICIDAD"},fr:{mention:"PUBLICIT\u00c9"}, fi:{mention:"MAINONTA"},hr:{mention:"OGLA\u0160AVANJE"},hu:{mention:"HIRDET\u00c9S"},"in":{mention:"ADVERTISING"},it:{mention:"PUBBLICIT\u00c0"},jp:{mention:"\u5e83\u544a"},jpmobile:{mention:"\u30bf\u30c3\u30d7\u3057\u3066\u97f3\u58f0\u304c\u6d41\u308c\u307e\u3059"},jpmobilePR:{mention:"[PR]\u30bf\u30c3\u30d7\u3057\u3066\u97f3\u304c\u6d41\u308c\u307e\u3059"},ko:{mention:"\uad11\uace0"},kr:{mention:"\uad11\uace0"},mo:{mention:"ADVERTISING"},nl:{mention:"ADVERTENTIE"},no:{mention:"ANNONSERING"},pl:{mention:"REKLAMA"}, pt:{mention:"PUBLICIDADE"},ro:{mention:"PUBLICITATE"},ru:{mention:"\u0420\u0415\u041a\u041b\u0410\u041c\u0410"},sb:{mention:"\u041e\u0413\u041b\u0410\u0428\u0410\u0412\u0410\u040a\u0415"},se:{mention:"REKLAM"},sk:{mention:"REKLAMA"},sl:{mention:"OGLA\u0160AVANJE"},su:{mention:"REKLAM"},tr:{mention:"ILAN"}};function oe(a){return Fa(re,function(){return function(b){return b===a}}(this))}function qe(a){return se[a]&&se[a].mention};function te(a,b,c){this.Nc=b;this.ec=this.Fd+(a||(new Date).getTime());if(null!=c){a=c.frequency||this.kc;c=(0===c.time_interval?0:c.time_interval)||this.hb;if(p(c))this.hb=parseInt(c,10);else switch(c){case "month":this.hb=this.Yf;break;case "week":this.hb=this.Zf;break;default:this.hb=this.Qd}p(a)&&(this.kc=parseInt(a,10));ea(!0)&&(this.status=!0)}else ea(!1)&&(this.status=!1)}g=te.prototype;g.Fd="tt_capping_";g.Qd=86400;g.Zf=604800;g.Yf=2592E3;g.status=!1;g.ec=te.Fd;g.hb=te.Qd;g.kc=1;g.Nc="nothing"; g.Jb=function(){var a,b,c;c={value:0,time:this.hb};this.status&&pb.Aa(this.ec)&&(a=pb.get(this.ec,0).split("|"),a[0]&&(b=parseInt(a[0],10),p(b)&&!isNaN(b)&&(c.value=b)),a[1]&&(a=parseInt(a[1],10),p(a)&&!isNaN(a)&&(c.time=a-Math.ceil((new Date).getTime()/1E3))));return c};g.cc=function(){return this.status&&this.Jb().value>=this.kc?!1:!0};function ue(a,b){var c,d;a.status&&a.Nc===b&&(c=a.Jb(),d=c.value+1+"|"+(Math.ceil((new Date).getTime()/1E3)+c.time),pb.set(a.ec,d,c.time))};function W(a,b,c,d,e){this.name=a;null==c&&(c=null);this.type=null!=d?d:null;this["default"]=null!=e?e:null;if(!n(this.name))throw new E(R.p.Ef);this.a=!1;a=function(a){var b;n(a)&&(a=[a]);m(a)||(a=null);if(m(a)&&(b=[],B(a,function(a){if(!Fa(S,function(b){return a===b}))return b.push(a)}),b.length))throw new E(R.p.Df);return a};this.pd=a(c);this.format=a(b);this.hd=null;this.value=this.V(this["default"],this.format);this.G=!1} function ve(a,b){return!m(a.format)||0!==a.format.length&&-1===A(a.format,b)?!1:!0} W.prototype.P=function(a,b){var c;this.hd=a;if(r(this.type)){if(!this.type.call(this,a,b))throw new E(R.p.Xb);}else if(s(this.type)){a:{c=this.type;for(var d in c)if(c[d]==a){c=!0;break a}c=!1}if(!c)throw new E(R.p.Xb);}else if(m(this.type)){if(A(this.type,-1===a))throw new E(R.p.Xb);}else if(n(this.type)){switch(this.type){case "number_positive":c=p(a)&&0<=a;break;case "number_strict_positive":c=p(a)&&02*this.D&&Re(this),!0):!1};function Re(a){if(a.D!=a.N.length){for(var b=0,c=0;bb)throw Error("Bad port number "+b);a.wb=b}else a.wb=null} function Ze(a,b,c){Xe(a);b instanceof af?(a.Ea=b,a.Ea.ud(a.ea)):(c||(b=bf(b,gf)),a.Ea=new af(b,0,a.ea))}function Xe(a){if(a.Ng)throw Error("Tried to modify a read-only Uri");}g.ud=function(a){this.ea=a;this.Ea&&this.Ea.ud(a);return this};function $e(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function bf(a,b,c){return n(a)?(a=encodeURI(a).replace(b,hf),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null} function hf(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var cf=/[#\/\?@]/g,ef=/[\#\?:]/g,df=/[\#\?]/g,gf=/[\#\?@]/g,ff=/#/g;function af(a,b,c){this.$=a||null;this.ea=!!c}function jf(a){if(!a.A&&(a.A=new Qe,a.D=0,a.$))for(var b=a.$.split("&"),c=0;c=768 && [WIDTH]<992",desktop:"[WIDTH]>=992 && [WIDTH]<1200",large:"[WIDTH]>=1200"};Df.prototype.l=function(a){if(!(null===a||n(a)||Ub(a)||m(a)&&Wa(a,function(a){return Ub(a)})||s(a)))throw new E(R.p.Vb);return!0}; Df.prototype.V=function(a){var b,c;!s(a)||r(a)||Ob(a)||Nb(a)||(c=a,b=null,w(a,function(c){return function(d,h){if(b)return!1;if(b=Ff(c,h))return a=d}}(this)),b?yd("Slot "+b+' selected: "'+a+'"'):(yd("Slots by device not found",c),a=""),c=null);if(r(a))try{a=a(),T("Slot: ",a)}catch(d){T("Slot: function error")}return Df.c.V.call(this,a)}; function Ff(a,b){var c,d,e;d=!1;e=null;c=Math.max(J.documentElement.clientWidth,G.innerWidth||0);B(b.split("+"),function(){return function(a){var b;if(d)return!1;try{if(b=(Ef[a]||a).replace(/\[WIDTH\]/g,c),d=d||eval(b))return e=a}catch(k){}}}(a));return d?a.He=e:!1}Df.prototype.Y=function(){return this.value?H(this.value):!1};Df.prototype.M=function(){return"mobile"===this.He};function Gf(){Gf.c.constructor.call(this,"slot",[S.zb,S.k,S.wa,S.S,S.xa,S.Yb],[S.zb])}u(Gf,Df);Gf.prototype.cd=function(){return s(this.Ac)||m(this.Ac)||r(this.Ac)};Gf.prototype.Ha=function(){return this.Ac};function Hf(a,b,c,d){null==d&&(d=null);Hf.c.constructor.call(this,a,b,c,this.l,d)}u(Hf,W);var If=/^\(?((?:(http|https|ftp):\/\/)|\/\/)?(?:((?:[^\W\s]|\.|-|[:]{1})+)@{1})?((?:www.)?(?:[^\W\s]|\.|-)+[\.][^\W\s]{2,4}|localhost(?=\/)|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(?::(\d*))?([\/]?[^\s\?]*[\/]{1})*(?:\/?([^\s\n\?\[\]\{\}\#]*(?:(?=\.)){1}|[^\s\n\?\[\]\{\}\.\#]*)?([\.]{1}[^\s\?\#]*)?)?(?:\?{1}([^\s\n\#]*))?([\#][^\s\n]*)?\)?$/i;Hf.prototype.l=function(a){if(!n(a)||!If.test(a))throw new E(R.p.eg);return!0};function Jf(){Jf.c.constructor.call(this,"ClickThrough",[])}u(Jf,Hf);function Kf(){Kf.c.constructor.call(this,"startMode",[S.k],null,this.l,Lf)}u(Kf,W);var Lf="v2p";Kf.prototype.l=function(a){return-1<=A(Kf,a)};function Mf(a){return"c2p"===a.value};function Nf(){Nf.c.constructor.call(this,"Impression",[])}u(Nf,Hf);function Of(){Of.c.constructor.call(this,"mobile",[S.k,S.wa],null,"boolean",!0)}u(Of,W);Of.prototype.M=function(){return this.value};function Pf(a,b,c,d,e,f){this.src=null!=a?a:null;this.height=null!=b?b:null;this.La=null!=c?c:null;this.e=null!=d?d:null;this.jb=null!=e?e:null;this.Da=null!=f?f:null;s(a)&&(a=Ia(a),this.src=this.height=this.La=this.e=this.jb=this.Da=null,w(a,function(a){return function(b,c){switch(c){case "src":return a.src=b;case "height":case "h":return a.height=b;case "pos":return a.La=b;case "css":return a.e=b;case "txt":return a.jb=b;case "html":return a.Da=b}}}(this)));a=[];null!=this.src&&!n(this.src)&&a.push("src:string('x%')"); null==this.height||n(this.height)||p(this.height)||a.push("h:string('x%') or number(in pixel)");null!=this.La&&this.La!==Qf&&this.La!==Rf&&this.La!==Sf&&a.push("pos:string(top or bottom)");null!=this.e&&!n(this.e)&&a.push("css:string");null!=this.jb&&!n(this.jb)&&a.push("txt:string");null!=this.Da&&!n(this.Da)&&a.push("html:string");if(a.length)throw new E(R.p.Pd);}var Rf="bottom",Sf="bot",Qf="top";Pf.prototype.qc=function(a,b){null==b&&(b=!1);return b?a+"px":a}; Pf.prototype.ke=function(a){null==a&&(a=!1);return this.qc(this.height,a)};Pf.prototype.Kb=function(){return this.src};Pf.prototype.Tc=function(){return this.e};function Tf(){Tf.c.constructor.call(this,"mention",[S.k,S.wa],null,this.l,Uf)}u(Tf,W);var Uf={src:"",height:15,pos:"top",css:"",txt:"",html:""};Tf.prototype.l=function(a){if(!ea(a)&&(!s(a)||m(a)||r(a)))throw new E(R.p.zf);return!0}; Tf.prototype.V=function(a){var b,c;c=Ia(Uf);if(a)"none"!==a&&s(a)||(c=Ia(Uf));else return!1;""!==a.txt&&a&&a.txt||(b=this.a&&V(this.a,"lang")&&V(this.a,"lang").value||"fr",a.txt=qe(b)||qe("en"));w(Uf,function(){return function(b,e){if(null!=(a[e]&&""!==a[e]))return c[e]=a[e]}}(this));return new Pf(c)};function Vf(){Vf.c.constructor.call(this,"BTF",[S.k],null,"boolean",!0)}u(Vf,W);function Wf(){Wf.c.constructor.call(this,"AdBreaks",[S.zb],[S.zb],this.l,["%3"])}u(Wf,W);var Xf=/^start|end|%[0-9]*|(:?[0-9]{2}){3}|#[0-9]*$/i;function Yf(a){return n(a)&&Xf.test(a)}Wf.prototype.l=function(a){if(!m(a)||!Wa(a,Yf))throw new E(R.p.Ue);return!0};function Zf(){Zf.c.constructor.call(this,"adChoice",[S.k,S.wa],null,this.l,!1)}u(Zf,W);var $f={url:"http://www.youronlinechoices.eu/",img:"//cdn.teads.tv/img/ad_choice.png",txt:"Ad choice"};Zf.prototype.l=function(a){if(!(ea(a)||s(a)&&!m(a)))throw new E(R.p.Ve);return!0};Zf.prototype.V=function(a){var b;b={};if(a)s(a)||(a={});else return!1;La(b,$f,a);B(Ea(b),function(a){if(null==$f[a])return Ha(b,a)});return b};function ag(){ag.c.constructor.call(this,"ClickTracking",[])}u(ag,Hf);function bg(){bg.c.constructor.call(this,"whatThis",[S.k],null,"boolean",!1)}u(bg,W);function cg(){cg.c.constructor.call(this,"bSlot",[S.k])}u(cg,Df);function dg(){dg.c.constructor.call(this,"mutable",[S.k],null,"boolean",!0)}u(dg,W);dg.prototype.P=function(a){dg.c.P.call(this,a);if(this.G&&!this.value&&this.a)return $(this.a).P("click")};function eg(){eg.c.constructor.call(this,"TrackingEvents",[],null,this.l,null)}u(eg,W);eg.prototype.l=function(a){if(!m(a)||!Wa(a,function(a){return s(a)&&Ca(a,function(a){return n(a)&&If.test(a)})}))throw new E(R.p.$f);return!0};function fg(){fg.c.constructor.call(this,"skippable",[],null,"boolean",!1)}u(fg,W);function gg(){gg.c.constructor.call(this,"avoidSlot",[S.k,S.xa,S.S],null,this.l)}u(gg,W);gg.prototype.l=function(a,b){if(b===S.k){if(null!==a&&!s(a))throw new E(R.p.Vb);}else if(!(b!==S.xa&&b!==S.S||null===a||n(a)||Ub(a)||m(a)&&Wa(a,function(a){return Ub(a)})))throw new E(R.p.Vb);return!0};gg.prototype.V=function(a,b){var c,d,e;if(b!==S.k)return a;c={};La(c,a);d=c.slot;e=new Df("slot",[],null);e.P(d,b);c.slot=e;return c}; gg.prototype.Ha=function(){return this.format!==S.k&&this.value?H(this.value):[]};gg.prototype.cd=function(){return this.Ha()&&this.Ha().length};function hg(){hg.c.constructor.call(this,"scrollPause",[S.k],null,"boolean",!0)}u(hg,W);function ig(){ig.c.constructor.call(this,"volume",[],null,this.l,60)}u(ig,W);ig.prototype.l=function(a){if(!(p(a)&&0<=a&&100>=a))throw new E(R.p.kg);return!0};function jg(){jg.c.constructor.call(this,"focusPlay",[S.k],null,"boolean",!1)}u(jg,W);/* MIT license @link http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136 @returns {String} */ var kg=null;function lg(){if(!kg){var a,b,c,d,e;e=[];for(a=b=0;16>b;a=++b)e[a]="0"+a.toString(16);for(a=b=16;256>b;a=++b)e[a]=a.toString(16);a=4294967295*Math.random()|0;b=4294967295*Math.random()|0;c=4294967295*Math.random()|0;d=4294967295*Math.random()|0;kg=e[a&255]+e[a>>8&255]+e[a>>16&255]+e[a>>24&255]+"-"+e[b&255]+e[b>>8&255]+"-"+e[b>>16&15|64]+e[b>>24&255]+"-"+e[c&63|128]+e[c>>8&255]+"-"+e[c>>16&255]+e[c>>24&255]+e[d&255]+e[d>>8&255]+e[d>>16&255]+e[d>>24&255]}return kg};function mg(){mg.c.constructor.call(this,"desktop",[S.k,S.wa],null,"boolean",!0)}u(mg,W);function ng(){ng.c.constructor.call(this,"lang",[],null,"string","fr")}u(ng,W);ng.prototype.P=function(a){ng.c.P.apply(this,arguments);this.a&&this.a.rb()&&(this.a.rb().value.jb=qe(a)||qe("en"))};function og(){og.c.constructor.call(this,"pid",[],[],this.l,null)}u(og,W);og.prototype.l=function(a){n(a)&&(a=parseInt(a,10));if(!(p(a)&&!isNaN(a)&&0parseInt(hb,10))throw this.format.track("compatibility"),new E(R.ob.Wb);}else if(C&&(8>parseInt(hb,10)||8>D))throw this.format.track("compatibility"), new E(R.ob.Wb);}function Xg(){return Z.Rb("touchstart")};function Yg(a){var b;b||(b=Zg(a||arguments.callee.caller,[]));return b} function Zg(a,b){var c=[];if(0<=A(b,a))c.push("[...circular reference...]");else if(a&&50>b.length){c.push($g(a)+"(");for(var d=a.arguments,e=0;d&&e=kh(this).value)for(r(b)&&(b=b()),a=this.Gg(a,b,c,dh.prototype.log),b="log:"+a.xe,l.console&&(l.console.timeStamp?l.console.timeStamp(b):l.console.markTimeline&&l.console.markTimeline(b)),l.msWriteProfilerMark&&l.msWriteProfilerMark(b),b=this;b;){c=b;var d=a;if(c.tb)for(var e=0,f=void 0;f=c.tb[e];e++)f(d);b=b.getParent()}}; g.Gg=function(a,b,c,d){var e=new bh(a,String(b),this.ye);if(c){var f;f=d||arguments.callee.caller;e.Pc=c;var h;try{var k;var q=ba("window.location.href");if(n(c))k={message:c,name:"Unknown error",lineNumber:"Not available",fileName:q,stack:"Not available"};else{var t,y,x=!1;try{t=c.lineNumber||c.fj||"Not available"}catch(P){t="Not available",x=!0}try{y=c.fileName||c.filename||c.sourceURL||l.$googDebugFname||q}catch(Q){y="Not available",x=!0}k=!x&&c.lineNumber&&c.fileName&&c.stack&&c.message&&c.name? c:{message:c.message||"Not available",name:c.name||"UnknownError",lineNumber:t,fileName:y,stack:c.stack||"Not available"}}h="Message: "+ma(k.message)+'\nUrl: '+k.fileName+"\nLine: "+k.lineNumber+"\n\nBrowser stack:\n"+ma(k.stack+"-> ")+"[end]\n\nJS stack traversal:\n"+ma(Yg(f)+"-> ")}catch(L){h="Exception trying to expose exception! You win, we lose. "+L}e.Oc=h}return e};g.info=function(a,b){this.log(ih,a,b)};g.a=function(a,b){this.log(jh,a,b)}; var lh={},mh=null;function nh(){mh||(mh=new dh(""),lh[""]=mh,mh.Ke(jh))}function oh(a){nh();var b;if(!(b=lh[a])){b=new dh(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=oh(a.substr(0,c));c.u()[d]=b;b.uc=c;lh[a]=b}return b};function ph(a){this.W=M.W();this.Rg=oh(this.W+"_"+a)}function qh(a,b,c){var d;d=b.message;b.code&&(d="["+b.code+"] "+d);c&&s(c)&&w(c,function(){return function(a,b){var c;c="__"+b+"__";if(-1!==d.indexOf(c))return d=d.replace(c,a)}}(a));return d}function rh(a,b,c,d){var e;n(b)&&(b={code:null,message:b});if(s(b)){if(e=C&&9>=parseInt(hb,10)&&(!D||9>=D))return T(b);try{var f=a.Rg,h=qh(a,b,c);f&&f.log(d,h,void 0)}catch(k){return T(qh(a,b,c))}}} ph.prototype.info=function(a,b){null==b&&(b=null);return rh(this,a,b,ih)};ph.prototype.error=function(a,b){null==b&&(b=null);return rh(this,a,b,gh)};function sh(a){this.ka=null;this.children={};this.name=a;null!=this.ca||T("Property structure is required");null!=this.a||T("Property config is required");null!=this.video||T("Property video is required");return this.fa()}g=sh.prototype;g.fa=function(){return this.fc(this.ca,this.ka)};function th(a,b){b&&a.g().appendChild(b.g());return a}g.u=function(a){return a&&n(a)?null!=this.children[a]?this.children[a]:!1:this.children}; g.fc=function(a,b){var c,d;d=Lb(a.element,a.attributes);d.innerHTML=null!=a.content?a.content:"";b?(c=null!=a.id?a.id:Object.keys(this.children).length,this.children[c]=d,b.appendChild(d),b=d):this.ka=b=d;if(null!=a.children)return B(a.children,function(a){return this.fc(a,b)},this)};g.g=function(){return this.ka};g.og=function(a,b){return 3===arguments.length?K(arguments[2],a,b):K(this.g(),a,b)};g.enabled=function(){this.a.enabled=!0;return this};g.disabled=function(){this.a.enabled=!1;return this}; g.isEnabled=function(){return this.a.enabled};g.e={};function uh(a,b,c){this.ka=null;this.ca={element:b,attributes:c};this.video=a;this.a={};return uh.c.constructor.call(this,"wrapper")}u(uh,sh);function vh(a){this.ca={element:"div",attributes:{"class":"tt-timing"}};this.a={enabled:!0,ba:!1};this.video=a;vh.c.constructor.call(this,"time");return this.h()}u(vh,sh);g=vh.prototype;g.h=function(){}; g.da=function(){var a;if(0this.video.aa()){this.show();a=(Math.round(100*wh(this.video))/100).toFixed(2);var b=1E3*a,c,d;c=parseInt(b%1E3);d=parseInt(b/1E3%60);a=parseInt(b/6E4%60);b=parseInt(b/36E5%24);c=10>c?"0"+c:c;a={hours:10>b?"0"+b:b,minutes:10>a?"0"+a:a,seconds:10>d?"0"+d:d,ms:100>c?"0"+c:c};return this.g().textContent="-"+a.minutes+":"+a.seconds}if(this.video.ja)return this.a.ba?this.show():this.o()}; g.show=function(){if(this.isEnabled())return this.g().style.display="inline-block"};g.o=function(){if(this.isEnabled())return this.g().style.display="none"};g.e={"tt-timing:hover":{color:"#eee"},"tt-timing":{display:"inline-block",font:"12px helvetica-light",color:"#f6f6f6",margin:"0 5px"}};function xh(a){this.ca={element:"div",attributes:{"class":"tt-progress"},children:[{id:"progressHolder",element:"div",attributes:{"class":"progress-holder"}},{id:"progressBar",element:"div",attributes:{"class":"progress-bar"}},{id:"progressReplay",element:"div",attributes:{"class":"progress-replay"}}]};this.a={enabled:!0,ba:!1,jh:!0};this.video=a;xh.c.constructor.call(this,"progressbar");return this.h()}u(xh,sh);g=xh.prototype; g.h=function(){this.u("progressReplay").innerText="REPLAY";return K(this.u("progressReplay"),"click",function(a){return function(){return a.video.Fe()}}(this))};g.da=function(){var a;this.video.U()&&(a=this.video.aa(),this.u("progressBar").style.width=a+"%",this.show());this.video.mc()===this.video.Ya()&&(this.u("progressBar").style.width=0,this.o());if(this.video.ja)return this.a.ba?this.show():this.o()}; g.show=function(){if(this.isEnabled())return this.u("progressBar").style.display="block",this.u("progressHolder").style.display="block",this.u("progressReplay").style.display="none"};g.o=function(){if(this.isEnabled()&&(this.u("progressHolder").style.display="none",this.u("progressBar").style.display="none",this.a.jh))return this.u("progressReplay").style.display="inline"}; g.e={"tt-progress":{width:"100%",position:"relative",display:"table-cell","white-space":"nowrap"},"tt-progress a":{"text-decoration":"none",color:"#666"},"progress-bar":{"background-color":"#86C3F7",position:"absolute",height:"2px",top:"19px",transition:"all .4s linear"},"progress-holder":{height:"2px","background-color":"#666",position:"absolute",width:"100%",top:"19px"},"progress-replay":{cursor:"pointer",color:"#666",display:"none"},"progress-replay:hover":{color:"white !important"}};function yh(a){this.ca={element:"div",attributes:{"class":"tt-count-down"}};this.a={enabled:!0,ba:!1};this.video=a;yh.c.constructor.call(this,"countdown");this.vh=this.video.q();this.h()}u(yh,sh);g=yh.prototype;g.h=function(){Y(this.video.format.a).G&&(this.a.enabled=!1,this.o());return K(J.getElementById(this.video.Hb),"mouseover",function(a){return function(){a.g().innerText="";return a.disabled()}}(this))}; g.da=function(){var a;a=Math.round($(this.video.format.a).Gb-this.video.Ya());this.g().innerText=1<=a&&this.isEnabled()?a:"";(0===this.video.q()||this.video.v())&&100!==this.video.aa()&&this.video.U()?this.show():this.o()};g.show=function(){this.isEnabled()&&yc(H(this.g()),"tt-sound-wrapper-active")};g.o=function(){this.isEnabled()&&zc(H(this.g()),"tt-sound-wrapper-active")};g.B=function(){zh(Sb(this.g()),"tt-off")};g.R=function(){Ah(Sb(this.g()),"tt-off")}; g.e={"tt-count-down":{position:"absolute",top:"-37px",right:"45px",height:"17px",padding:"0px","line-height":"normal !important",color:"white"}};function Bh(a,b){var c,d;null==b&&(b=3);d=0;this.ca={element:"div",attributes:{"class":"tt-sound-notifier-container"},children:[]};this.a={enabled:!1};for(c=0;cthis.video.aa()&&0this.video.Ya()&&this.video.Ya();this.show();if(100===this.video.ja)return this.a.ba?this.show():this.o()};g.e={"tt-expandCtrl":{cursor:"pointer"},"tt-expandCtrl .tt-expand":{width:"13px","background-position":"-150px 0"},"tt-expandCtrl:hover .tt-expand":{"background-position":"-163px 0"},"tt-expandCtrl.tt-expand-active .tt-expand":{width:"13px","background-position":"-175px 0"},"tt-expandCtrl.tt-expand-active:hover .tt-expand":{"background-position":"-188px 0"}};function Gh(a){this.ca={element:"div",attributes:{"class":"tt-volume-wrapper"},children:[{id:"volumeHolder",element:"div",attributes:{"class":"tt-volume-holder"}},{id:"volumeBar",element:"div",attributes:{"class":"tt-volume-bar"},children:[{id:"volumeHandle",element:"div",attributes:{"class":"tt-volume-handle"}}]}]};this.a={};this.fb=!1;this.video=a.video;this.tg=a;Gh.c.constructor.call(this,"volume");return this.h()}u(Gh,sh); function Hh(a,b){var c,d,e;c=a.u("volumeHolder");d=a.u("volumeBar");e=c.getBoundingClientRect();c=Math.ceil(5*Math.round(b-e.top))/5;c=5*Math.round(c/5);c>e.height&&(c=e.height);0>c&&(c=0);d.style.height=e.height-c+"px";d=Math.round(100*(e.height-c)/e.height);if(p(d))try{return a.video.kj(d)}catch(f){}}g=Gh.prototype; g.h=function(){var a,b,c;c=this.u("volumeHandle");this.u("volumeBar");this.u("volumeHolder");b=this;a=!1;K(this.g(),"mousemove",function(b){return function(){b.show();return a=!0}}(this));K(this.g(),"mouseout",function(b){return function(){b.o();return a=!1}}(this));K(this.g(),"click",function(a){return function(){return Hh(a,zd.clientY)}}(this));K(c,"mousedown",function(){return function(){b.fb=!0;K(J,"mousemove",function(a){b.fb&&Hh(b,a.clientY);return!1});K(J,"mouseup",function(){b.fb=!1;if(!a)return b.o()}); return!1}}(this));K(this.u("volumeHandle"),"mouseup",function(a){return function(){return a.fb=!1}}(this));K(this.g(),"mouseleave",function(){return function(){return a=!1}}(this));if(null==this.tg.za.play)return this.e["tt-volume-wrapper"].left="15px"};g.show=function(){if(!this.fb)return this.g().style.display="block"};g.o=function(){if(!this.fb)return this.g().style.display="none"};g.da=function(){var a,b;b=this.u("volumeBar");this.u("volumeHolder");a=55*this.video.q();b.style.height=a+"px";if(this.video.ja)return this.o()}; g.e={"tt-volume-wrapper":{display:"none",position:"absolute","z-index":"3",bottom:"40px",left:"45px",color:"#FFF","background-color":"#333",padding:"10px 10px 0 10px",font:"10px helvetica",height:"70px","box-sizing":"border-box",width:"22px",overflow:"hidden",cursor:"pointer"},"tt-volume-holder":{height:"100%","background-color":"#666",width:"2px",position:"absolute","max-height":"55px"},"tt-volume-bar":{height:"50%","background-color":"#86C3F7",width:"2px",bottom:"5px",position:"absolute","max-height":"55px", cursor:"pointer"},"tt-volume-handle":{height:"8px",width:"8px","background-color":"white","border-radius":"5px",position:"absolute",left:"-3px",top:"-6px",cursor:"pointer"}};function Ih(a,b,c){this.format=c;this.video=a;this.Re=b;this.rh=1500;this.Gc=this.Pg=!1;this.ka=null;this.M=Z.Rb("touchstart");this.ne=this.format.a.Sc()&&this.format.a.Sc().value;this.Db={volume:Gh,mute:Eh,countDown:yh,progress:xh,time:vh,fullscreen:Fh,equalizer:Bh,wrapper:uh};this.za={};this.fc();return this.Zc()}g=Ih.prototype; g.fa=function(){var a,b,c;a=Array.prototype.shift.apply(arguments);if(null==this.Db[a])return!1;b=this.Db[a];c=Object.create(b.prototype);b.apply(c,arguments);this.za[a]=c;La(this.e,c.e);return c};g.g=function(){return this.Sb.g()}; g.fc=function(){this.Sb=this.fa("wrapper",this.video,"div",{"class":"tt-controls",id:U(this.format.data,Zd)});this.ne&&(this.Se=this.fa("wrapper",this.video,"div",{"class":"tt-left"}),this.volume=this.fa("volume",this),this.B=this.fa("mute",this.video,this.volume),th(th(this.Se,this.B),this.volume),this.bh=this.fa("progress",this.video),this.Te=this.fa("wrapper",this.video,"div",{"class":"tt-right"}),this.time=this.fa("time",this.video),this.je=this.fa("fullscreen",this.video),th(th(this.Te,this.time), this.je),th(th(th(this.Sb,this.Se),this.bh),this.Te));this.yg=this.fa("equalizer",this.video);$(this.video.format.a).value===X.Ra&&(this.Gb=this.fa("countDown",this.video),th(this.Sb,this.Gb));return th(this.Sb,this.yg)};g.da=function(){w(this.za,function(a){try{if(null!=a.da)return a.da()}catch(b){}});if(this.video.ja||100>this.video.aa()&&0=hb?{"tt-loader-active":{display:"block !important"},"tt-loader":{display:"none","z-index":"999",position:"absolute",left:"50%","margin-left":"-15px","margin-top":"-15px",top:"50%",width:"31px",height:"31px",background:"no-repeat black url('data:image/gif;base64,R0lGODlhHwAfAPUAAAAAAIbD9wsQFRchKiIyQCo9TTBGWREaISQ1RDRMYQ0TGRQdJCxAUTFIWyk7SxomMAQGBy1CUxYgKAwSF2mZwnGl0luFqR4sOEptijhSaViAowIDA09zkWGNsh0qNgMEBWCLsGucxgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH+GkNyZWF0ZWQgd2l0aCBhamF4bG9hZC5pbmZvACH5BAAKAAAAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAAHwAfAAAG/0CAcEgUDAgFA4BiwSQexKh0eEAkrldAZbvlOD5TqYKALWu5XIwnPFwwymY0GsRgAxrwuJwbCi8aAHlYZ3sVdwtRCm8JgVgODwoQAAIXGRpojQwKRGSDCRESYRsGHYZlBFR5AJt2a3kHQlZlERN2QxMRcAiTeaG2QxJ5RnAOv1EOcEdwUMZDD3BIcKzNq3BJcJLUABBwStrNBtjf3GUGBdLfCtadWMzUz6cDxN/IZQMCvdTBcAIAsli0jOHSJeSAqmlhNr0awo7RJ19TJORqdAXVEEVZyjyKtE3Bg3oZE2iK8oeiKkFZGiCaggelSTiA2LhxiZLBSjZjBL2siNBOFQ84LxHA+mYEiRJzBO7ZCQIAIfkEAAoAAQAsAAAAAB8AHwAABv9AgHBIFAwIBQPAUCAMBMSodHhAJK5XAPaKOEynCsIWqx0nCIrvcMEwZ90JxkINaMATZXfju9jf82YAIQxRCm14Ww4PChAAEAoPDlsAFRUgHkRiZAkREmoSEXiVlRgfQgeBaXRpo6MOQlZbERN0Qx4drRUcAAJmnrVDBrkVDwNjr8BDGxq5Z2MPyUQZuRgFY6rRABe5FgZjjdm8uRTh2d5b4NkQY0zX5QpjTc/lD2NOx+WSW0++2RJmUGJhmZVsQqgtCE6lqpXGjBchmt50+hQKEAEiht5gUcTIESR9GhlgE9IH0BiTkxrMmWIHDkose9SwcQlHDsOIk9ygiVbl5JgMLuV4HUmypMkTOkEAACH5BAAKAAIALAAAAAAfAB8AAAb/QIBwSBQMCAUDwFAgDATEqHR4QCSuVwD2ijhMpwrCFqsdJwiK73DBMGfdCcZCDWjAE2V347vY3/NmdXNECm14Ww4PChAAEAoPDltlDGlDYmQJERJqEhGHWARUgZVqaWZeAFZbERN0QxOeWwgAAmabrkMSZkZjDrhRkVtHYw+/RA9jSGOkxgpjSWOMxkIQY0rT0wbR2LQV3t4UBcvcF9/eFpdYxdgZ5hUYA73YGxruCbVjt78G7hXFqlhY/fLQwR0HIQdGuUrTz5eQdIc0cfIEwByGD0MKvcGSaFGjR8GyeAPhIUofQGNQSgrB4IsdOCqx7FHDBiYcOQshYjKDxliVDpRjunCjdSTJkiZP6AQBACH5BAAKAAMALAAAAAAfAB8AAAb/QIBwSBQMCAUDwFAgDATEqHR4QCSuVwD2ijhMpwrCFqsdJwiK73DBMGfdCcZCDWjAE2V347vY3/NmdXNECm14Ww4PChAAEAoPDltlDGlDYmQJERJqEhGHWARUgZVqaWZeAFZbERN0QxOeWwgAAmabrkMSZkZjDrhRkVtHYw+/RA9jSGOkxgpjSWOMxkIQY0rT0wbR2I3WBcvczltNxNzIW0693MFYT7bTumNQqlisv7BjswAHo64egFdQAbj0RtOXDQY6VAAUakihN1gSLaJ1IYOGChgXXqEUpQ9ASRlDYhT0xQ4cACJDhqDD5mRKjCAYuArjBmVKDP9+VRljMyMHDwcfuBlBooSCBQwJiqkJAgAh+QQACgAEACwAAAAAHwAfAAAG/0CAcEgUDAgFA8BQIAwExKh0eEAkrlcA9oo4TKcKwharHScIiu9wwTBn3QnGQg1owBNld+O72N/zZnVzRApteFsODwoQABAKDw5bZQxpQ2JkCRESahIRh1gEVIGVamlmXgBWWxETdEMTnlsIAAJmm65DEmZGYw64UZFbR2MPv0QPY0hjpMYKY0ljjMZCEGNK09MG0diN1gXL3M5bTcTcyFtOvdzBWE+207pjUKpYrL+wY7MAB4EerqZjUAG4lKVCBwMbvnT6dCXUkEIFK0jUkOECFEeQJF2hFKUPAIkgQwIaI+hLiJAoR27Zo4YBCJQgVW4cpMYDBpgVZKL59cEBhw+U+QROQ4bBAoUlTZ7QCQIAIfkEAAoABQAsAAAAAB8AHwAABv9AgHBIFAwIBQPAUCAMBMSodHhAJK5XAPaKOEynCsIWqx0nCIrvcMEwZ90JxkINaMATZXfju9jf82Z1c0QKbXhbDg8KEAAQCg8OW2UMaUNiZAkREmoSEYdYBFSBlWppZl4AVlsRE3RDE55bCAACZpuuQxJmRmMOuFGRW0djD79ED2NIY6TGCmNJY4zGQhBjStPTFBXb21DY1VsGFtzbF9gAzlsFGOQVGefIW2LtGhvYwVgDD+0V17+6Y6BwaNfBwy9YY2YBcMAPnStTY1B9YMdNiyZOngCFGuIBxDZAiRY1eoTvE6UoDEIAGrNSUoNBUuzAaYlljxo2M+HIeXiJpRsRNMaq+JSFCpsRJEqYOPH2JQgAIfkEAAoABgAsAAAAAB8AHwAABv9AgHBIFAwIBQPAUCAMBMSodHhAJK5XAPaKOEynCsIWqx0nCIrvcMEwZ90JxkINaMATZXfjywjlzX9jdXNEHiAVFX8ODwoQABAKDw5bZQxpQh8YiIhaERJqEhF4WwRDDpubAJdqaWZeAByoFR0edEMTolsIAA+yFUq2QxJmAgmyGhvBRJNbA5qoGcpED2MEFrIX0kMKYwUUslDaj2PA4soGY47iEOQFY6vS3FtNYw/m1KQDYw7mzFhPZj5JGzYGipUtESYowzVmF4ADgOCBCZTgFQAxZBJ4AiXqT6ltbUZhWdToUSR/Ii1FWbDnDkUyDQhJsQPn5ZU9atjUhCPHVhgTNy/RSKsiqKFFbUaQKGHiJNyXIAAh+QQACgAHACwAAAAAHwAfAAAG/0CAcEh8JDAWCsBQIAwExKhU+HFwKlgsIMHlIg7TqQeTLW+7XYIiPGSAymY0mrFgA0LwuLzbCC/6eVlnewkADXVECgxcAGUaGRdQEAoPDmhnDGtDBJcVHQYbYRIRhWgEQwd7AB52AGt7YAAIchETrUITpGgIAAJ7ErdDEnsCA3IOwUSWaAOcaA/JQ0amBXKa0QpyBQZyENFCEHIG39HcaN7f4WhM1uTZaE1y0N/TacZoyN/LXU+/0cNyoMxCUytYLjm8AKSS46rVKzmxADhjlCACMFGkBiU4NUQRxS4OHijwNqnSJS6ZovzRyJAQo0NhGrgs5bIPmwWLCLHsQsfhxBWTe9QkOzCwC8sv5Ho127akyRM7QQAAOwAAAAAAAAAAAA==')"}}: {"tt-loader-active":{display:'block !important; } .tt-loader{position:absolute;top:50%;left:50%;margin-top: -30px !important;margin-left: -60px !important;display:block;height:60px;width:60px;display:none}.tt-loader .tt-loader-text{display:block;padding-top:97px;font-family:Lato,Arial,sans-serif;font-size:16px;font-weight:300;font-style:italic;text-align:center;color:#FFF}.tt-loader .tt-loader-spinner,.tt-loader .tt-loader-spinner:after{position:absolute;border-radius:50%;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-animation:spinner-animate 1s linear infinite;animation:spinner-animate 1s linear infinite}.tt-loader .tt-loader-spinner:after{top:0;left:0;content:"";-webkit-animation:spinner-animate-alt 1s ease-in-out infinite;animation:spinner-animate-alt 1s ease-in-out infinite}.tt-loader .tt-loader-spinner,.tt-loader .tt-loader-spinner:after{clip:rect(0,62px,62px,31px);width:62px;height:62px}.tt-loader .tt-loader-spinner:after{box-shadow:inset #70b1ce 0 0 0 2px}@-webkit-keyframes spinner-animate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(220deg);transform:rotate(220deg)}}@-webkit-keyframes spinner-animate-alt{0%{-webkit-transform:rotate(-140deg);transform:rotate(-140deg)}100%{-webkit-transform:rotate(140deg);transform:rotate(140deg)}'}};function Mh(a){this.ca={element:"a",attributes:{href:"#","class":"ic tt-bigplay"}};this.a={enabled:!1,ba:!0,gh:!1};this.video=a;this.qd();Mh.c.constructor.call(this,"bigplay");this.h()}u(Mh,sh);g=Mh.prototype;g.qd=function(){if("replay"===Lg(this.video.format.a).value||Mf(Mg(this.video.format.a)))return this.a.enabled=!0};g.h=function(){var a;a=!0;return this.og("click",function(b){b.preventDefault();if(this.video.ja&&!a)return this.video.Fe();this.video.play();return a=!1}.bind(this))}; g.da=function(){return Mf(Mg(this.video.format.a))&&!this.video.U()&&100===this.video.aa()?this.show():!this.video.U()&&this.isEnabled()&&100>this.video.aa()&&this.a.gh?this.show():this.video.ja&&this.a.ba?this.show():this.o()};g.show=function(){if(this.isEnabled())return yc(H(this.g()),"tt-bigplay-active")};g.o=function(){if(this.isEnabled())return zc(H(this.g()),"tt-bigplay-active")}; g.e={"tt-bigplay":{"background-position":"0 -26px",position:"absolute",width:"125px",height:"125px",top:"50%","z-index":"2",left:"50%","margin-top":"-62px","margin-left":"-62px",display:"none !important"},"tt-bigplay-active":{display:"block !important"},"tt-bigplay:hover":{"background-position":"125px -26px"}};function Nh(a){var b,c;this.format=a;c=this.format.d;a=J.getElementById(c.Hb);this.video=c;this.$i={};this.Db={controlBar:Ih,progress2:Kh,bigPlay:Mh,loader:Lh};this.za={};this.M=Z.Rb("touchstart");this.vg=".tt-player ";Oh(this,this.e);this.Re=a;b=this;this.qh=G.setInterval(function(){Ph(b)},350)}Nh.prototype.X=function(){T("ComponentsManager Destroy");G.clearInterval(this.qh);return this.za={}};function Ph(a){w(a.za,function(a){a.da()})} Nh.prototype.h=function(a,b){var c;c={};null!=b&&(c=b);if(null!=this.Db[a])return this.za[a]=new this.Db[a](this.video,this.Re,c),Oh(this,this.za[a].e),this.za[a]};function Oh(a,b){var c,d,e;c="";null!=b&&s(b)&&(w(b,function(a,b){c+=this.vg+O(M.n,b,a)+" "},a),(d=id(M.n,c,"player"))?Qb(J.body,Pb(d)):(d=J.getElementById("tt-player"),d.styleSheet?d.styleSheet.cssText+=c:(e=J.createTextNode(c),d.appendChild(e))))}Nh.prototype.Zc=function(){return this.h("controlBar",this.format)}; Nh.prototype.e={ic:{background:"url(//cdn.teads.tv/media/format/v2/ui.png)","background-size":"250px 151px",display:"inline-block",width:"14px",height:"12px"}};function Qh(a,b,c,d,e){this.Zg=a;this.duration=b;this.Xc=c;this.Sg=d;this.ha=e;Rh();this.Xc.platform=(this.Xc.platform||"Teads")+"-v2"} function Rh(){G.initMoatTracking||(G.initMoatTracking=function(a,b,c,d,e,f){var h,k,q,t,y,x;t=G.location.protocol;x="https:"===t?"z":"js";y=J.createElement("script");h=[];k="_moatApi"+Math.floor(1E8*Math.random());q={adData:{ids:b,duration:c,url:e},dispatchEvent:function(a){if(a||a.type)return T("Dispatch Event MOATJS: "+a.type,a,b),this.sendEvent?(h&&(h.push(a),a=h,h=!1),this.sendEvent(a)):h.push(a)}};T("Set MOATJS global API",q,a,b,c,d,e,f);a=a.ownerDocument;(a.defaultView||a.parentWindow)[k]=f[k]= q;y.type="text/javascript";"OBJECT"===f.nodeName?f.parentElement.insertBefore(y,f):f.contentDocument.body.appendChild(y);y.src=t+"//"+x+".moatads.com/"+d+"/moatvideo.js#"+k;return q})};function Sh(){}g=Sh.prototype;g.L={Kf:"pauseAd",Mf:"startAd",Wf:"stopAd",Pf:"resumeAd",Zh:"isPlaying",Oi:"toggleMute",Rh:"getClickThrough",Sh:"getCurrentTime",jg:"setAdVolume",Gd:"getAdDuration",Hd:"getAdRemainingTime",of:"getAdSkippableState",Bh:"callTracking",Th:"getExtensions",$h:"isVPAID",Yh:"isMuted",Rf:"skipAd",Dd:"close",nf:"fullscreen",Mh:"exitFullscreen",Od:"setAdVolume",pf:"getAdVolume"};g.Lb=!1;g.ja=!0;g.Ua=!1;g.lc=!1;g.Eb=!1;g.then=function(a){this.Zi=a}; g.play=function(){if(this.Ua)this.Ge();else return this.f[this.L.Mf]()};g.pause=function(){return this.f[this.L.Kf]()};g.Ge=function(){this.f[this.L.Pf]()};g.stop=function(){G.console.error("stopad is deprecated");return this.f[this.L.Wf]()};g.U=function(){return this.Lb};function Th(){}g.v=function(){return 0===this.q()};g.B=function(){this.Eb=!1;return this.f[this.L.Od](0)};g.R=function(a){null==a&&(a=.35);if(0b||0>c)b=0;a=0===b?0:100*a/b;return isNaN(a)?0:a};g.q=function(){return this.f[this.L.pf]()}; g.volume=function(a){null==a&&(a=null);if(null!==a)return 0=Math.round($(a.format.a).Gb-a.Ya()))return a.format.R(Je($(a.format.a))),c(),a.f.unsubscribe(b,"AdRemainingTimeChange")}}(a),a.f.subscribe(b,"AdRemainingTimeChange")} function Zh(a){var b;a.he||(a.he=!0,ai(a),b=["Script","Visibility","Iframe","Alenty","Html"],B(b,function(a){return function(b){var e;if(e=$h(a,b))switch(b){case "Visibility":case "Html":case "Iframe":return T("Inject iframe with extension '"+b+"'"),ed(e.replace(/^$/,""));case "Alenty":case "Script":return T("Inject JS Script with extension '"+b+"'"),dd(e.replace(/^$/,""))}}}(a)))} function ai(a){var b,c,d,e,f;T("MOAT PROCESSING");if(c=$h(a,"MoatJs"))try{f=a.Bc||a.C,d=new Qh(f,a.mc(),c,a.bb.url,a.ha),e=G.initMoatTracking(d.Zg,d.Xc,d.duration,"teads245638586802",d.Sg,d.ha),b="AdVideoFirstQuartile AdVideoStart AdVideoStopped AdVideoMidpoint AdVideoThirdQuartile AdVideoComplete AdPaused AdPlaying".split(" "),B(b,function(a){return function(b){return a.f.subscribe(function(){var c;c={type:b,adVolume:a.q()};return e.dispatchEvent(c)},b)}}(a)),a.f.subscribe(function(a){return function(){var b; b=a.q();return e.dispatchEvent({type:"AdVolumeChanged",adVolume:b})}}(a),"AdVolumeChange")}catch(h){T("MOAT CATCH",h.message)}} function Wh(a){var b,c;c=a.d.getPlugin("Tracker");(b=V(a.format.a,"ClickTracking").value)&&c.tracker.addResource("click",b,null);(b=V(a.format.a,"Impression").value)&&c.tracker.addResource("impression",b,null);a.Mb&&(c.removeResources("creativeView"),c.removeResources("impression"));(a=V(a.format.a,"TrackingEvents").value)&&B(a,function(a){return w(a,function(a,b){return c.tracker.addResource(b,a,null)})})};function bi(a,b,c){this.type=a;this.Jc=ha(this.Jc,this);je=(new Date).getTime();ci(b).onload=function(){return function(){ke=(new Date).getTime();return me()}}(this);this.Yc(b,function(a){return function(){a.language=new ne(V(a.a,"lang").value);a.O=new ph(a.type);a.track("callJS");"RICHADSERVER"===Hg(a.a).source&&(a.track("adRequest"),a.F("adRequest"));try{return a.na=new Wg(a),a.sc(),a.$c(),a.Nb=!1,a.d=null,a.Fa={},a.me=[],a.hc=[],a.Wa={},a.dc={},a.I={B:{},yc:{}},a.sg=[],a.oe=!0,a.Bb=null,a.na.bd|| a.na.ub||a.J.push(K(J,"click",a.Jc,!0,a)),a.od(),a.nd(),a.Va=new te($d(a.a).value,a.data.td,a.a.Jb().value||null),c(!0)}catch(b){switch(b.code){case R.ob.Id.code:a.track("compatibility");break;case R.ob.Wb.code:a.track("compatibility")}return T(b.message)}}}(this))}g=bi.prototype;g.J=[];g.Kc=!1;g.Pb={};g.pe=!1;g.fd=0;g.ze=0;g.ia=!1;g.Lg=!1;g.Ka=!1;g.Wc=!1;g.le=!1;g.v=!1;g.Ie=!1;g.ab=null;g.$c=function(){return!this instanceof bi?this.O.info(R.lf.Jf):this.data=new Ld(this.type,this.a)}; g.toString=function(){return"["+this.type+"#"+this.data.W+":"+this.data.ra+"]"};g.sc=function(){return this.transaction=new Og(this)}; g.X=function(a){var b,c,d,e;T("teads.format.base.destroy");this.ab&&this.ab.X();ub.Oa.format=[];ub.Ja.format=[];e=this.J;c=0;for(d=e.length;c=parseInt(hb,10)&&(!D||9>=D)||this.Je();return!0}; g.Je=function(){T("setFocusOnDocument");tb(function(a){return function(){a.play();return!1}}(this));return vb(function(a){return function(){a.pause();return!1}}(this))};g.collapse=function(){throw"Collapse method need implementation in format";};g.yc=function(){return this.collapse()}; g.Oe=function(a,b){var c;if(this.data.vd){c=Math.round(a-b);c=" seconde"+(1quelques instants';if(c=H("#"+this.data.la+" .tt-time-text").get())c.get().innerHTML=d;md&&this.ej("metaData")}; g.U=function(){return this.d.U()};g.play=function(){if(this.ia&&!this.d.U())try{this.d.Ua?this.d.Ge():this.d.play()}catch(a){throw a;}else this.Wc=!0};g.pause=function(){if(this.d.U())try{return this.d.pause()}catch(a){}};g.B=function(){gi(this,!0);return hi(this)};g.R=function(){gi(this,!1);return hi(this)};function gi(a,b){T("setMuted!",b);try{a.d.ib(b,Ie($(a.a),a))}catch(c){a.le=b}return a.v=b} g.ib=function(){var a;if((a=H("#"+this.data.la+" .tt-controls .tt-button"))&&1===a.length){var b=a=a.get(),c=Ch(b);0<=A(c,"tt-unmute")?Ah(b,"tt-unmute"):zh(b,"tt-unmute");if(void 0!=a.firstElementChild)a=a.firstElementChild;else for(a=a.firstChild;a&&1!=a.nodeType;)a=a.nextSibling;a.title=this.v?Bd.B:Bd.R}return gi(this,!this.v)}; function ii(a){var b,c,d,e,f;c="";d=void 0;b=Ke(a.a);(e=b.value&&b.value.text||!1)&&e.length&&B(e,function(a){return function(b,e){d=Jd(b);return c+='
'+b.txt+"
"}}(a));if(e=zg(b))d=Jd(e),f='";b=Pb(b);V(a.format.a,"slotMode").value===Cf.Cc&&((c=a.j.parentNode)?Qb(c,b):b=null);try{Qb(a.j,b)}catch(h){try{(c=a.j.parentNode)?Qb(c, b):b=null}catch(k){}}b&&Ub(b)&&a.Cb.push(b);return b}wi.prototype.Ug=function(){switch(this.j.nodeName){case "P":case "BR":return!0}return!1};wi.prototype.X=function(){return Fd(this)};function Bi(a,b){Bi.c.constructor.call(this,a,b);this.Mg=!1;this.mh=[];this.wd=[];this.yb=this.xb=null;this.Ga=this.Fb=!1;this.td="complete"}u(Bi,Ld);function Ci(a){this.format=a;this.Ld=100;this.Kd=30;Ig(this.format.a).M()||Z.M()?this.Dc=100:this.Dc=400;this.xf=this.wf=2E3;this.yf=18E3;this.Af=100;this.lg=1;this.sf=4;this.rf=this.format.a.nc().value||2;this.Bf="h1 h2 h3 h4 h5 figure".split(" ");this.uf=150;this.mg=40;this.Wd=this.Td=this.Yd=this.qf=20;this.Vd=500;this.gg=-50;this.Xd=50;this.ig=20;this.hg=10;this.ac=1;this.Ud=50;this.$d=-5;this.ae=500;this.Zd=1E3};function Di(a,b,c,d){this.format=a;this.gb=[];this.H={minWidth:0,C:b.value,Xe:c.value,ee:d.value,qa:this.format.a.nc().value};this.a=new Ci(this.format);this.Ye=Kb().height}Di.Hg=function(a){var b,c;b="";c=fc(a,"padding");a=fc(a,"margin");0"),Hi(a,H("p",J)),T("Checkslots
"), Hi(a,H("div",J)),T("Checkslots "),Hi(a,H("td",J));Ii(a);Fi(a)}if(!a.gb.length)return T(R.Md.Uf),!1;a=a.gb;f=[];c=[];B(a,function(a){var b;b={Na:a.Na,fullPath:a.fullPath,dd:a.dd,qa:a.qa,ga:a.ga,element:a.element};c.push(a.element);return f.push(b)});return f} function Hi(a,b){var c,d,e,f,h,k,q,t,y,x,P,Q,L,N;T("CheckSlots",b);if(b.length)for(h=0,N=[];ha.Ye);y=!0;null!==a.H.C&&(y=t.y>=a.a.Af&&t.y<=a.a.yf);q=Q;k=parseInt(hb,10);if(!C)q=Q.trim();else if(9<=k||9<=D)q=Q.trim(); if((d=q.length>=a.a.Ld&&f>=a.a.Kd&&L>=a.a.Dc&&f<=a.a.wf&&L<=a.a.xf&&y&&!d&&!e&&L>a.H.minWidth&&c)||null!==a.H.C){d=new ui;try{P=Ji(a,x,a.a.lg)}catch(I){T("CATCH getParentsToElementPath");h++;continue}d.rd={};d.Na=P[0];d.fullPath=P[1];d.ga+=P[2];d.rc=P[3];d.dd=P[4];d.width=L;d.height=f;d.e=Di.Hg(x);d.xd=q.length;d.vc=t.y;d.ga+=Ki(a,d);d.element=x;d.rd.bj=P[2];a.gb.push(d)}N.push(h++)}} function Ji(a,b,c){var d,e,f,h,k,q,t,y,x,P,Q,L,N,I;q=h=N="";L=Vb(b);k=Vb(L);Q=H('[itemprop="articleBody"]',J);f="";for(x=I=0;x "),N='[itemprop="'+P+'"] '+e+b.tagName.toLowerCase()+t,h='[itemprop="'+P+'"] '+e+b.tagName.toLowerCase()+t,I+=a.a.Vd+a.a.Xd):"articleBody"===P&&(y&&(t=" br",I+=a.a.ac),N='[itemprop="'+P+'"]'+t,h='[itemprop="'+ P+'"]'+t,I+=a.a.Vd),x++;if(""===N){if(!Li(b)||!Li(L)||!Li(k))for(d=k;null!==d&&!Li(d)&&5>c;)d=Vb(d),c++;for(x=c;-1<=x;){t=k=c=e="";y=0=x)&&(-1===x&&(f="> "),N+=f+k,t=f+k,-1!==A(a.a.Bf,k)&&(I+=a.a.gg),"p"===k||"article"===k)&&(I+=a.a.Xd):(N+=c,t=c,I+=a.a.hg):(N+=e,t=e,I+=a.a.ig);""!==t&&-1!==x&&(N+=" ");x--}}a=N;return[N+q,h,I,"br"===q,a]}Di.prototype.nc=function(a){var b;b=0;0a.a.Dc+a.a.mg&&(c.width=a.a.Yd,d+=a.a.Yd);b.height>a.a.Kd+a.a.qf&&(c.height=a.a.Td,d+=a.a.Td);b.xd>a.a.Ld+a.a.uf&&(d+=a.a.Wd,c.xd=a.a.Wd);b.qa===a.a.rf?(d+=a.Zd,c.qa=a.Zd):0<=b.qa&&b.qaa.a.sf&&(f[d].ga+=a.a.Ud,f[d].rd.lj=a.a.Ud),d++;a.gb=f}function Li(a){return null!==a.getAttribute("class")&&""!==a.getAttribute("class")||null!==a.getAttribute("id")&&null!==a.getAttribute("id")||null!==a.getAttribute("itemprop")&&null!==a.getAttribute("itemprop")};function Mi(a){this.a=a;this.lh=M.ed(this,Di,this,Ig(this.a),V(this.a,"BTF"),V(this.a,"before"))};function Ni(a,b){Ni.c.constructor.call(this,S.k,a,function(a){return function(d){if(!d)return!1;b(a);a.ka=new vi(a);a.Cb=[];return M.ge(function(){var b,d;b=M.ed(a,Mi,a.a);try{d=Gi(b.lh)}catch(h){return a.finish(!1,60),!1}a.O.info(R.va.Vf,{slots:d});Ig(a.a).Ac=d;if(Ig(a.a).cd())return T("StartInreadProcess"),a.O.info(R.va.ff,{UUID:a.data.W,config:a.a}),a.h();a.O.info(R.va.Sf,{slot:Ig(a.a).value});a.finish(!1,60);return!1})}}(this))}u(Ni,bi);g=Ni.prototype; g.$c=function(){return this.data=new Bi(this.type,this.a)};g.od=function(){Ni.c.od.apply(this,arguments);return La(G[this.data.ra].media,{oh:function(a){return function(b){return a.oh(b)}}(this)})};g.Yc=function(a,b){return Ni.c.Yc.call(this,a,b,this.Jg)}; g.Jg=function(){this.Ga=this.v=!0;Y(this.a).G&&!xg(Ke(this.a))&&yg(Ke(this.a));!Y(this.a).G&&xg(Ke(this.a))&&$(this.a).value===X.ALWAYS&&(this.Ga=!1);if(!Y(this.a).G&&!wg(Ke(this.a)))switch($(this.a).value===X.ALWAYS&&(this.Ga=!1),$(this.a).value){case X.ALWAYS:case X.Ra:yg(Ke(this.a));break;case X.Ub:yg(Ke(this.a));Y(this.a).P(!1);break;case X.Sa:yg(Ke(this.a))}return!0}; g.ld=function(){var a;a=Ni.c.ld.apply(this,arguments);if(n(a)&&encodeURIComponent(a)!==Hg(this.a).value)try{return Hg(this.a).P(encodeURIComponent(a)),!0}catch(b){}return!1};g.X=function(a){var b;T("teads.format.inread.destroy");this.xb&&this.xb.X;ti(this);b=Ni.c.X.call(this);(H(this.data.la).get()&&!aa(a)||!0===a)&&Rb(H(this.data.la).get());Ga(this);return b}; g.h=function(){var a,b,c,d,e,f,h,k,q,t;T("teads.format.inread.init");k=this;this.$b=null;this.be=this.tc=!1;this.data.mh=[];w(Ig(this.a).Ha(),function(a){return function(b){return a.data.wd.push(b.element)}}(this));f=h=!1;d=c=0;t=H(Ig(this.a).value);b=[];a=[];q=Ig(this.a).Ha().length;this.O.info(R.va.cf,{length:q,slots:Va(Ig(this.a).Ha(),function(){return function(a){return a.j}}(this))});e={};B(Ig(this.a).Ha(),function(y){return function(x,P){var Q,L;if(!h&&(L=new wi(x.element,y,x.dd),null!==L.ta&& null!=L.j&&(e={message:"",slot:L.j,cur:P+1,num:q},b=0=c.wh)return a.push(b)});return A(a,L.Pa[0])+1}(),!0===Q?y.a.nc().value<=d?V(y.a,"bSlot").Y().length&&V(y.a,"bMinSlot").value>=c?e.message="bMinSlot":(y.O.info(R.va.gf,{slot:L.j}),y.xb=L, k.Z()?h=!0:f=!0):e.message="minSlot":e.message=Q),!h)))return y.O.info(R.va.df,e),L.X()}}(this),this);if(!h&&!f)return this.track("noSlot-"+e.message),this.O.info(R.va.ef,e),this.finish(!1),!1;if(!f)return this.track("slot_available"),gd(k.K,k)(),ei(this,"position:absolute;top:0;left:0;right:0;bottom:0;"+(this.na.ub?"width:558px;height:318px;":""),function(a){return function(){C&&(k=a,G.setTimeout(function(){var a;k.Ka&&k.ia||(a=di(k),a.length&&a.e("display","none").e("display","block"))},500))}}(this))}; g.Tb=function(){var a;if(!Ni.c.Tb.call(this))return!1;a=yi(this.xb);var b=this.ka.Uc(ii(this),ii(this));this.yb=Pb(b);a.appendChild(this.yb);try{var c=this.xb,d,e,f,h,k;if(!c.ua)throw new E(R.va.Tf);Rb(c.ua);if("TR"===c.j.nodeName){e=parseInt(c.j.children.length||1,10);f=J.createElement("TR");d=J.createElement("TD");d.colSpan=e+1E3;k=J.createTextNode("");d.appendChild(k);f.appendChild(d);if(V(c.format.a,"before").value){var q=c.j;q.parentNode&&q.parentNode.insertBefore(f,q)}else{var t=c.j;t.parentNode&& t.parentNode.insertBefore(f,t.nextSibling)}c.j=k}h=c.j;"BR"===c.Pa[0].nodeName&&(h=c.Pa[0]);V(c.format.a,"slotMode").value===Cf.Cc?V(c.format.a,"before").value?(h.appendChild(c.ua),h.firstChild&&h.insertBefore(c.ua,h.firstChild)):h.appendChild(c.ua):V(c.format.a,"before").value?h.parentNode&&h.parentNode.insertBefore(c.ua,h):h.parentNode&&h.parentNode.insertBefore(c.ua,h.nextSibling)}catch(y){return!1}this.hc.push(H("#"+this.data.Zb).get());return!0}; function Oi(a){var b,c,d,e;c=H(a.data.Sd);b=H(a.data.Rd);d=H(a.data.ya);c.length&&b.length&&d.length&&(e=nc(d[0]),d=Jg(a.a).value.pc()/100*e.height,a=xf(Jg(a.a).value)/100*e.height,a=e.height-(d+a),0=parseInt(hb, 10)&&(!D||9>=D))return d(),xc(h,c,f);d();return rc(h,c,void 0)}if(b)return d(),h.e("transition","none"),h.e("height",c+"px")}function Xh(a){var b;try{return b=mc(H(a.data.ya,J).get()),a.d.f.resizeAd(b.width,b.height)}catch(c){}}g.nd=function(){this.Fa.pause=function(){};return this.Fa.move=function(){}}; function Vi(a,b){var c,d,e;return null!=b&&Ub(b)?(Ng(a.a).value?(c=Ng(a.a).value,c=[Math.max(c.scrollWidth,c.offsetWidth,c.clientWidth),Math.max(c.scrollHeight,c.offsetHeight,c.clientHeight)]):c=[Math.max(J.body.scrollWidth,J.documentElement.scrollWidth,J.body.offsetWidth,J.documentElement.offsetWidth,J.documentElement.clientWidth),Math.max(J.body.scrollHeight,J.documentElement.scrollHeight,J.body.offsetHeight,J.documentElement.offsetHeight,J.documentElement.clientHeight)],c[1]c-d.y||c-d.y>e.height+c)):!1}function Si(a){var b;b=a.na.ub||a.na.bd;b=Ng(a.a).value?Ng(a.a).value:b?G:J;Xg()&&(a.Wa.touch=[K(b,"touchmove",a.K,!1,a),K(b,"touchstart",a.K,!1,a),K(b,"touchend",a.K,!1,a)]);a.Wa.scroll=K(b,"scroll",a.K,!1,a)} function ti(a){var b;a.na&&(b=a.na.ub||a.na.bd,b=Ng(a.a).value?Ng(a.a).value:b?G:J,Xg()&&(Uc(b,"touchmove",a.K),Uc(b,"touchstart",a.K),Uc(b,"touchend",a.K)),Uc(b,"scroll",a.K))} function Ui(a){var b;b=H(a.data.ya).get();if(!Ub(b))return T("No "+a.data.ya+" found"),!1;if(null!=Y(a.a).value&&!1===Y(a.a).value)return a.v=!0;if(!Y(a.a).G||Y(a.a).G&&Y(a.a).value)a.Wa.mouseover=K(b,"mouseenter",function(b){this.tc=!0;li(a,b)&&mi(a,b)&&this.d.U()&&(this.be=!0,a.R($(this.a).Ib/100))},!1,a),a.Wa.mouseout=K(b,"mouseleave",function(b){this.tc=!1;li(a,b)&&mi(a,b)&&this.d.U()&&a.B()},!1,a);return!0} function Qi(a){var b,c,d,e;if(!a.data)return!1;c=H(a.data.Sd).get();b=H(a.data.Rd).get();return Ub(c)&&Ub(b)?(Oi(a),e=Jg(a.a).value.pc(),d=xf(Jg(a.a).value),c=Vi(a,c),a=Vi(a,b),100this.d.aa()&&(b||(c?(d&&(b=(d=this.d.f&&this.d.f.vpaid&&this.d.f.vpaid.video&&this.d.f.vpaid.video.audio)?this.d.f.vpaid.video.audio:null,$(this.a).value===X.ALWAYS&&Y(this.a).value&&d&&b.authorizeAudio&&!b.authorized&&a?this.d.f.vpaid.video.audio.authorizeAudio(function(a){return function(){return a.play()}}(this)): this.d.Bc&&!d&&this.d.Bc.play()),a&&this.play()):V(this.a,"scrollPause").value&&this.pause()),$(this.a).value!==X.Ra||$(this.a).value===X.Ra&&this.d.Ya()>=$(this.a).Gb))if(c){if($(this.a).value!==X.Ub||$(this.a).value===X.Sa&&this.d.Eb)$(this.a).value===X.pb&&this.tc?this.R($(this.a).Ib/100):this.R(Je($(this.a)))}else this.B()}else this.data.Wc=!0;if(a)return Ti(this)};g.Je=function(){tb(function(a){return function(){return a.K()}}(this));if("v2s"!==Mg(this.a).value)return vb(function(a){return function(){return a.pause()}}(this))}; g.collapse=function(a){var b,c,d;c=function(b){return function(){a();return b.Qe(b.Wa)}}(this);d=H(this.data.la,J);return d.get()?(b=C&&9>=parseInt(hb,10)&&(!D||9>=D))?vc(d,function(){return function(){return c()}}(this)):wc(d,function(){return function(){return c()}}(this)):T("No TTWrapper found")};g.Qe=function(a){return w(a,function(b,c){return a[c]instanceof Array?B(a[c],function(a){return Vc(a)}):Vc(b)})}; function Wi(a,b,c){var d,e,f,h,k,q,t;null==b&&(b=null);null==c&&(c=null);null==d&&(d=null);d=He($(a.a),Jg(a.a).value.pc());q=$(a.a).Bg;if(!1===typeof b)T("targetVolume is not set");else if(1 1");else if(b!==a.d.q()){if(b>a.d.q())t=b/(d/q),k=function(a){return function(){return a.d.q()b}}(a),!t)return;G.clearTimeout(a.$b);c&&c();e=a.d.q();h=function(a){return function(){var c,d;a.d.volume(b);hi(a); d=a.Y(a.data.Ab,!0);if(Nb(d))return $(a.a).value===X.Ra||$(a.a).value===X.ALWAYS||$(a.a).value===X.Sa||(Z.M()&&Y(a.a).value?gi(a,!1):gi(a,a.d.v())),c=xg(Ke(a.a)),c=c["image_"+(a.d.v()?"off":"on")+"_out"],cc(d,"backgroundImage","url("+c+")")}}(a);c=function(a){return function(){G.clearTimeout(a.$b);return h()}}(a);G.setTimeout(c,d);f=function(a){return function(){var c;if(a.d)return c=e,e=c=b>c?Math.min(b,c+t):Math.max(0,c-t),a.d.volume(c),k()?a.$b=G.setTimeout(f,q):h()}}(a);return f()}} g.B=function(){var a;if(!this.Nb||!this.d.v())if($(this.a).value!==X.Sa||this.d.Eb){a=Je($(this.a));if(Y(this.a).G||wg(Ke(this.a)))a=0;"v2s"===Mg(this.a).value&&!Qi(this)&&(a=0);return Wi(this,a,function(a){return function(){if(a.d.v())return a.v=!0}}(this))}};g.R=function(a){if(a&&!this.Nb&&($(this.a).value!==X.Sa||this.be))return Wi(this,a,function(a){return function(){a.v=!1;return hi(a)}}(this))};g.ib=function(){G.clearTimeout(this.$b);return Ni.c.ib.call(this)};function Xi(){this.Ee=ia()}var Yi=new Xi;Xi.prototype.set=function(a){this.Ee=a};Xi.prototype.reset=function(){this.set(ia())};Xi.prototype.get=function(){return this.Ee};Ma("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));Ma("action","cite","data","formaction","href","manifest","poster","src");Ma("embed","iframe","link","script","style","template");function Zi(a){this.$g=a||"";this.nh=Yi}g=Zi.prototype;g.ce=!0;g.Le=!0;g.ih=!0;g.hh=!0;g.Me=!1;g.kh=!1;function $i(a){return 10>a?"0"+a:String(a)}function aj(a,b){var c=(a.Pe-b)/1E3,d=c.toFixed(3),e=0;if(1>c)e=2;else for(;100>c;)e++,c*=10;for(;0