[\\s\\S]*?","gi");do t=e,e=e.replace(r,"");while(e!==t);return e.replace(/e.minDistanceForSwipe:"x"===e.validAxis&&(t=n>e.minDistanceForSwipe),{isHorizontal:n>r,isConsideredSwipe:t}}function attach(e,t,n,r){var o=getEventNames()[t.toLowerCase()]||t;e.addEventListener(o,n,_buildNativeListenerOptions(r))}function detach(e,t,n,r){var o=getEventNames()[t.toLowerCase()]||t;e.removeEventListener(o,n,_buildNativeListenerOptions(r))}function once(e,t,n,r){attach(e,t,function o(){detach(e,t,o,r),n.apply(this,arguments)},r)}function trigger(e,t,n,r){var o=document.createEvent("HTMLEvents");o.initEvent(t,n,r);var i="on"+ucfirst(t);return"function"==typeof e[i]&&e[i](),e.dispatchEvent(o)}function fakeclick(e,t){t=t||window;var n=t.document.createElement("a");n.cssText="visibility: hidden",n.addEventListener("click",function(t){e(),t.preventDefault(),t.stopPropagation(),n.parentNode.removeChild(n)},!0),t.document.body.appendChild(n);var r=document.createEvent("MouseEvents");r.initEvent("click",!0,!0),n.dispatchEvent(r)}function fakeClickAhrefBlank(e,t,n){t=t||noop,n=n||window;var r=n.document.createElement("a");r.style.cssText="visibility: hidden",r.setAttribute("href",e),r.setAttribute("target","_blank"),r.addEventListener("click",function(e){e.stopPropagation(),t(),r.parentNode.removeChild(r)},!0),n.document.body.appendChild(r);var o=n.document.createEvent("MouseEvents");o.initEvent("click",!0,!0),r.dispatchEvent(o)}function noop(){}function nullai(e,t){t()}function retTrue(){return!0}function retFalse(){return!1}function offset(e){var t=e.getBoundingClientRect(),n=e.ownerDocument,r=n.documentElement,o=n.defaultView;return{top:t.top+(o.pageYOffset||r.scrollTop)-(r.clientTop||0),left:t.left+(o.pageXOffset||r.scrollLeft)-(r.clientLeft||0)}}function addCssRule(e,t,n){var r=document.createElement("style");r.textContent=e+" {"+t+"}",n?n.document.getElementsByTagName("head")[0].appendChild(r):document.getElementsByTagName("head")[0].appendChild(r)}function redrawAndroidIframe(){var e=document.createElement("style");document.body.appendChild(e),document.body.removeChild(e)}function parseQuery(e){var t={};return e=e.replace(/\&$/,"").replace(/\+/g,"%20"),e.split("&").forEach(function(e){var n=e.split("=").map(decodeURIComponent);t[n[0]]=n[1]}),t}function buildQuery(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}function postBlob(e,t){var n=new XMLHttpRequest;n.open("POST",creative.apiUrl+"blobs?base64=1"),n.setRequestHeader("Content-Type","application/octet-stream"),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText,n.status)},n.send(e)}function tmpl(e,t){function n(e){return" p.push('"+e.replace(/'/g,"\\'").split(/\r?\n/g).join("\\n');\n p.push('")+"');\n"}if(!e)return"";var r;if(-1==e.indexOf("<%"))r=function(){return e};else{var o=e.split(/<%\s*|\s*%>/g),i="var p = []; with(o) {\n",a=!1;o.forEach(function(e){a?i+="="==e[0]?" p.push("+e.replace(/^=\s*|\s*$/g,"")+");\n":" "+e+"\n":e&&(i+=n(e)),a=!a}),i+='} return p.join("");';try{r=new Function("o",i)}catch(c){var u=new Error("Cannot parse template! (see `template` property)");throw u.template=i,u}}return t?r(t):r}function flash(){var e=document.createElement("div");e.style.background="white",e.style.opacity=.005,e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.width="100%",e.style.height="100%",e.style.zIndex=2147483647,document.body.appendChild(e),setTimeout(function(){e.parentNode.removeChild(e)},0)}function crc32(e){"use strict";var t=-1,n=0,r=[0,-227835133,-516198153,324072436,-946170081,904991772,648144872,-724933397,-1965467441,2024987596,1809983544,-1719030981,1296289744,-1087877933,-1401372889,1578318884,274646895,-499825556,-244992104,51262619,-675000208,632279923,922689671,-996891772,-1702387808,1760304291,2075979607,-1982370732,1562183871,-1351185476,-1138329528,1313733451,549293790,-757723683,-1048117719,871202090,-416867903,357341890,102525238,-193467851,-1436232175,1477399826,1264559846,-1187764763,1845379342,-1617575411,-1933233671,2125378298,820201905,-1031222606,-774358714,598981189,-143008082,85089709,373468761,-467063462,-1170599554,1213305469,1526817161,-1452612982,2107672161,-1882520222,-1667500394,1861252501,1098587580,-1290756417,-1606390453,1378610760,-2032039261,1955203488,1742404180,-1783531177,-878557837,969524848,714683780,-655182201,205050476,-28094097,-318528869,526918040,1361435347,-1555146288,-1340167644,1114974503,-1765847604,1691668175,2005155131,-2047885768,-604208612,697762079,986182379,-928222744,476452099,-301099520,-44210700,255256311,1640403810,-1817374623,-2130844779,1922457750,-1503918979,1412925310,1197962378,-1257441399,-350237779,427051182,170179418,-129025959,746937522,-554770511,-843174843,1070968646,1905808397,-2081171698,-1868356358,1657317369,-1241332974,1147748369,1463399397,-1521340186,-79622974,153784257,444234805,-401473738,1021025245,-827320098,-572462294,797665321,-2097792136,1889384571,1674398607,-1851340660,1164749927,-1224265884,-1537745776,1446797203,137323447,-96149324,-384560320,461344835,-810158936,1037989803,781091935,-588970148,-1834419177,1623424788,1939049696,-2114449437,1429367560,-1487280117,-1274471425,1180866812,410100952,-367384613,-112536529,186734380,-538233913,763408580,1053836080,-860110797,-1572096602,1344288421,1131464017,-1323612590,1708204729,-1749376582,-2065018290,1988219213,680717673,-621187478,-911630946,1002577565,-284657034,493091189,238226049,-61306494,-1307217207,1082061258,1395524158,-1589280451,1972364758,-2015074603,-1800104671,1725896226,952904198,-894981883,-638100751,731699698,-11092711,222117402,510512622,-335130899,-1014159676,837199303,582374963,-790768336,68661723,-159632680,-450051796,390545967,1230274059,-1153434360,-1469116676,1510247935,-1899042540,2091215383,1878366691,-1650582816,-741088853,565732008,854102364,-1065151905,340358836,-433916489,-177076669,119113024,1493875044,-1419691417,-1204696685,1247431312,-1634718085,1828433272,2141937292,-1916740209,-483350502,291187481,34330861,-262120466,615137029,-691946490,-980332558,939183345,1776939221,-1685949482,-1999470558,2058945313,-1368168502,1545135305,1330124605,-1121741762,-210866315,17165430,307568514,-532767615,888469610,-962626711,-707819363,665062302,2042050490,-1948470087,-1735637171,1793573966,-1104306011,1279665062,1595330642,-1384295599];for(n=0;n>>8^r[255&(t^e.charCodeAt(n))];return(-1^t)>>>0}function isArray(e){return"[object Array]"===Object.prototype.toString.call(e)}function isDefAndNotNull(e){return null!=e}function updateQueryStringParameter(e,t,n){t=encodeURIComponent(t),n=encodeURIComponent(n);var r=new RegExp("([?|&])"+t+"=.*?(&|$)","i");return separator=-1!==e.indexOf("?")?"&":"?",e.match(r)?e.replace(r,"$1"+t+"="+n+"$2"):e+separator+t+"="+n}function fetchShortenedUrl(e,t,n){function r(t,n){i[e].forEach(function(e){e[t](n)}),delete i[e]}n=n||noop;var o=!1,i=fetchShortenedUrl.inProgress,a=fetchShortenedUrl.cache,c="http"==e.slice(0,4),u=new RegExp("^(https?://)?(www.)?("+fetchShortenedUrl.invalidDomains.map(function(e){return e.replace(/[^a-zA-Z]/g,"\\$&")}).join("|")+")(/|\\?)").test(e);if(!c||u)return void n();if(a[e])return void defer(function(){t(a[e])},0,"fetchShortenedUrl defer success callback");if(i[e]||(i[e]=[],o=!0),i[e].push({success:t,error:n}),o){var s=creative.runtimeParams.secure?creative.cachedApiUrl:creative.insecureCachedApiUrl,d=s+"/services/shortener",f={longUrl:e},p=btoa(to_utf8(e));p=p.replace(/\//g,"$").replace(/\+/g,"_").replace(/=/g,"");var l={cbName:"shortener_"+p};loadJSONP(d+"?"+buildQuery(f),l,function(t){a[e]=t.id,r("success",t.id)},function(){r("error")})}}function isMediaPlaying(e){try{return e.currentTime>0&&!e.paused&&!e.ended}catch(t){return!1}}function merge(){var e,t,n={};for(t=0;tt?0:1}function pulse(e,t,n){return step(e,n)-step(t,n)}function smoothstep(e,t,n){var r=clamp(0,1,(n-e)/(t-e));return r*r*r*((6*r-15)*r+10)}function bump(e,t,n){var r=clamp(0,1,(n-e)/(t-e));return(Math.cos(Math.PI*r)+1)/2}function getWindowNesting(e){var t={iframe:e!==e.top,friendlyIframe:!1,iabFriendlyIframe:!1,hostileIframe:!1,iframeDepth:0};if(t.iframe){var n=e;try{for(t.friendlyIframe=!!e.top.location.href,t.iabFriendlyIframe=t.friendlyIframe&&"undefined"!=typeof e.inDapIF&&e.inDapIF;"undefined"!=typeof n.parent.location.href&&n.parent.document!==n.document;)n=n.parent,t.iframeDepth++;"undefined"==typeof e.top.document&&(t.hostileIframe=!0)}catch(r){t.hostileIframe=!0}}return t}function isFetchSupported(){return!!(window.fetch&&window.URL&&URL.createObjectURL)}function isBeaconSupported(){return!(!window.navigator||!window.navigator.sendBeacon)}function isNativeImplementation(e){return"function"==typeof e&&e.toString().indexOf("[native code]")>-1}!function(e){if(!this.defer){try{for(;"undefined"!=typeof e.parent.location.href&&e.parent.document!==e.document;)e=e.parent}catch(t){}var n=function(){function t(){return 9007199254740991===s?0:++s}var n,r,o,i,a=e,c="function"==typeof a.setImmediate;if(a.MutationObserver)return function(e){n=document.createElement("div"),new MutationObserver(function(){e(),n=null}).observe(n,{attributes:!0}),n.setAttribute("i","1")};if(!c&&a.postMessage&&!a.importScripts&&a.addEventListener){var u="com.setImmediate"+Math.random(),s=0;i={};var d=function(e){if(e.source===a&&0===e.data.indexOf(u)){var t=e.data.split(":")[1];i[t](),delete i[t]}};return a.addEventListener("message",d,!1),function(e){var n=t();i[n]=e,a.postMessage(u+":"+n,"*")}}return!c&&a.document&&"onreadystatechange"in document.createElement("script")?function(e){r=document.createElement("script"),r.onreadystatechange=function(){r.onreadystatechange=null,r.parentNode.removeChild(r),r=null,e()},document.body.appendChild(r)}:(o=c&&setImmediate||setTimeout,function(e){o(e)})}();this.defer=function(t,r,o,i){var a,c=0|r;if(o){var u;"undefined"!=typeof defer.perf?u=defer.perf:"undefined"!=typeof creative?u=creative.perf:"undefined"!=typeof perf&&(u=perf),u&&(u._stopTrackingDefers||(a=u.start("defer",{deferId:o,delay:c})))}if(t){var s=function(){a&&a.end(),t()};i?n(s):e.setTimeout(s,c)}}}}(window),Function.prototype.bind||Object.defineProperty(Function.prototype,"bind",{value:function(e){var t=this;return function(){return t.apply(e,arguments)}}}),function(e){e.getEventNames=function(){var t={};return"WebKitAnimationEvent"in e&&(t.animationstart="webkitAnimationStart",t.animationiteration="webkitAnimationIteration",t.animationend="webkitAnimationEnd"),"WebKitTransitionEvent"in e&&(t.transitionend="webkitTransitionEnd"),t}}(window),_isListenerOptionSupported.opts={};var getTimestamp=function(){return void 0===window.performance||void 0===window.performance.now?Date.now:window.performance.now.bind(window.performance)}();Date.now||(Date.now=function(){return+new Date}),Array.prototype.waitForEach||Object.defineProperty(Array.prototype,"waitForEach",{value:function(e,t,n){var r=this.length;r?this.forEach(function(o,i,a){var c=!1;e.call(n,o,function(){if(c)throw"Called `done` multiple times for element "+i;c=!0,--r||t()},i,a)},n):t()}}),function(e){e.loadJS=function(t,n,r,o){var i=e.loadJS.externals,a={success:n||noop,error:r||noop};if(!/^[A-Za-z0-9]*:\/\/|^\/\//.test(t)){var c=creative.hostedFiles.filter(function(e){return e.filepath===t})[0];if("undefined"==typeof c)return console.warn('Hosted file "'+t+'" was not found.'),void a.error();if(c.loaded!==!1)return console.warn('Hosted file "'+t+'" is already loaded.'),void setTimeout(a.success,0);c.loaded=!0,t=creative.cachedApiUrl+"hostedFiles/"+creative.id+"/"+creative.version+"/"+t}if(t in i&&!o)i[t].loaded?setTimeout(a.success,0):i[t].cbs.push(a);else{i[t]={cbs:[a]};var u=document.createElement("script");u.type="text/javascript",u.onload=function(){i[t].loaded=!0,i[t].cbs.forEach(function(e){e.success()}),i[t].cbs=[]},u.onerror=function(){i[t].cbs.forEach(function(e){e.error()}),i[t].cbs=[],delete i[t]},u.src=t,e.loadJS.appendToRoot(u)}},e.loadJS.externals={},e.loadJS.appendToRoot=function(e){return document.querySelector("head").appendChild(e)},e.loadJSONP=function(t,n,r,o){"function"==typeof n&&(o=r,r=n,n={});var i=n.cbName||"__jsonp"+randInt();t+=(-1==t.indexOf("?")?"?":"&")+(n.paramName||"jsonp")+"="+i,e[i]=function(t){r(t),delete e[i]},loadJS(t,noop,o,!0)}}(window),"undefined"==typeof Function.prototype.name&&!function(){var e=/^function\s+(\w+?)\s*?\(/;Object.defineProperty(Function.prototype,"name",{get:function(){var t=this.constructor.prototype.toString.call(this);return e.test(t)?t.match(e)[1]:""}})}(),fetchShortenedUrl.cache={},fetchShortenedUrl.inProgress={},fetchShortenedUrl.invalidDomains=["db.tt","lnkd.in","t.co","youtu.be","goo.gl","adf.ly","bit.do","bit.ly","fur.ly","ht.ly","is.gd","ow.ly","tr.im","tiny.cc","tinyurl.com"];;
function CTickerQueue(){this._queue=[],this._i=this.length}Object.defineProperty(CTickerQueue.prototype,"length",{get:function(){return this._queue.length}}),CTickerQueue.filterNulls=function(e){return null!==e},CTickerQueue.prototype._removeNulls=function(){this._queue=this._queue.filter(CTickerQueue.filterNulls)},CTickerQueue.prototype.process=function(e){if(this.length){for(this._i=0;this._i-1})}}),CTicker.prototype.stop=function(){try{this._queues.update.empty(),this._queues.render.empty()}finally{this.raf.cancelFrame(this._tick)}},CTicker.prototype._tick=function(e){try{this._queues.update.process(e),this._queues.nextUpdate.process(e),this._queues.render.process(e),this._queues.nextRender.process(e),this._queues.next.process(e),this._queues.next.empty(),this._queues.nextRender.empty(),this._queues.nextUpdate.empty()}finally{this.raf.nextFrame(this._tick)}},CTicker.prototype.frame=function(e,t){t=t||"render",this._queues[t].add(e)},CTicker.prototype.removeFrame=function(e,t){t=t||"render",this._queues[t].remove(e)};;
function RequestAnimationFrameWrapper(e){this._lastTime=0,this._win=e,this._createRAFWrapper=this._createRAFWrapper.bind(this),this._createCAFWrapper=this._createCAFWrapper.bind(this);var t=this._extractFromWindow(this._win),r=this._createPolyfill();this.environment=this._wrapRafAndCaf(t),this.polyfill=this._wrapRafAndCaf(r),this.isNative=!!t&&this._isNative(t.nextFrame)}Object.defineProperty(RequestAnimationFrameWrapper.prototype,"isRequestAnimationFrameBroken",{get:function(){var e=getWindowNesting(this._win);return deviceInfo.browser.firefox()&&e.hostileIframe?!0:!1}}),RequestAnimationFrameWrapper.prototype._extractFromWindow=function(e){var t=e.requestAnimationFrame||null,r=e.cancelAnimationFrame||null;return["ms","moz","webkit","o"].forEach(function(n){t=t||e[n+"RequestAnimationFrame"]||null,r=r||e[n+"CancelAnimationFrame"]||e[n+"CancelRequestAnimationFrame"]||null}),{nextFrame:t,cancelFrame:r}},RequestAnimationFrameWrapper.prototype._createPolyfill=function(){var e=this,t=function(t){var r=getTimestamp(),n=Math.max(0,16-(r-e._lastTime)),i=e._win.setTimeout(function(){t(r+n)},n);return e._lastTime=r+n,i},r=function(t){e._win.clearTimeout(t)};return{nextFrame:t,cancelFrame:r}},RequestAnimationFrameWrapper.prototype._isNative=function(e){return!!(e&&Function.prototype.toString.call(e).indexOf("[native code]")>-1)},RequestAnimationFrameWrapper.prototype._wrapRafAndCaf=function(e){return e&&e.nextFrame&&e.cancelFrame?{nextFrame:this._createRAFWrapper(e.nextFrame),cancelFrame:this._createCAFWrapper(e.cancelFrame)}:null},RequestAnimationFrameWrapper.prototype._createRAFWrapper=function(e){return function(t){return e.call(this._win,t)}.bind(this)},RequestAnimationFrameWrapper.prototype._createCAFWrapper=function(e){return function(t){e.call(this._win,t)}.bind(this)};;
function CPoint(t,i){this.x=1*t||0,this.y=1*i||0}function CRect(t,i,e,o){this.left=1*t||0,this.top=1*i||0,this.width=1*e||0,this.height=1*o||0}CPoint.offset=function(t){var i=offset(t);return new CPoint(i.left,i.top)},CPoint.convertPointFromNodeToPage=function(t,i){if(!t||"undefined"!=typeof t.x)return null;var e=CPoint.offset(t);return new CPoint((i?i.x:0)+(e?e.x:0),(i?i.y:0)+(e?e.y:0))},CPoint.convertPointFromPageToNode=function(t,i){if(!t||"undefined"!=typeof t.x)return null;var e=CPoint.offset(t);return new CPoint((i?i.x:0)-(e?e.x:0),(i?i.y:0)-(e?e.y:0))},CPoint.sample=function(t,i,e){for(var o=Math.floor(Math.sqrt(t.width*i/t.height)),n=Math.floor(Math.sqrt(t.height*i/t.width)),h=t.width/o,r=t.height/n,s=0;n>s;s++)for(var f=0;o>f;f++)e((f+.5)*h+t.left,(s+.5)*r+t.top)},CPoint.epsilon=function(t,i,e){return Math.abs(t-i)h||0>r?CRect.ZERO:new CRect(i,e,h,r)},CRect.prototype.copyFrom=function(t){this.left=t.left,this.top=t.top,this.width=t.width,this.height=t.height},CRect.prototype.relativeTo=function(t){return new CRect(this.left-t.left,this.top-t.top,this.width,this.height)},CRect.prototype.contains=function(t){return t instanceof CPoint?t.x>=this.left&&t.x<=this.right&&t.y>=this.top&&t.y<=this.bottom:t instanceof CRect?t.left>=this.left&&t.right<=this.right&&t.top>=this.top&&t.bottom<=this.bottom:void 0},CRect.prototype.map=function(t,i){var e=i.width/t.width,o=i.height/t.height;return new CRect((this.left-t.left)*e+i.left,(this.top-t.top)*o+i.top,this.width*e,this.height*o)},CRect.prototype.equals=function(t){return t&&this.left==t.left&&this.top==t.top&&this.right==t.right&&this.bottom==t.bottom},CRect.prototype.toString=function(){return"CRect: "+JSON.stringify(this)};;
window.CeltraDeviceInfo={},function(e){function n(e,n){this.os=new t(e.osName,e.osVersion),this.browser=new r(e.browserName,e.browserVersion,n),this.engine=new i(e.browserRenderingEngine,e.browserRenderingEngineVersion),this.deviceType=new o(e.deviceType,e.mobileDevice),this.vendor=e.vendor||"",this.model=e.model||"",this.userAgent=n}function t(e,n){this.name=e||"",this.version=n||"0"}function r(e,n,t){this.name=e||"",this.version=n||"0",this.userAgent=t}function i(e,n){this.name=e||"",this.version=n||"0"}function o(e,n){this.hardwareType=e||"",this.mobile=n||""}function s(e,n){function t(e){return parseInt(e.replace(/\D/g,""),10)}function r(e,n){var t;for(t=0;tn[t])return 1}return 0}var i,o,s;if(!e)return!0;if(0===n.length)o=null,s=null;else if(1===n.length)o=n[0],s=n[0];else{if(2!==n.length)throw"Invalid number of arguments";o=n[0],s=n[1]}for(e=e.split(".").map(t),o=o?o.split(".").map(t):[],s=s?s.split(".").map(t):[],i=Math.max(o.length,s.length)-e.length;i>=0;i--)e.push(0);return!(-1===r(e,o)||1===r(e,s))}function a(e,n){if(-1===e.indexOf("Playstation")){var t=e.match(/\bSilk\/([0-9._-]+)\b/);t&&(n.browserName="Amazon Silk",n.browserVersion=t[1])}n.browserName&&n.browserVersion&&(0===n.browserName.indexOf("Chrome")&&s(n.browserVersion,["28",null])||0===n.browserName.indexOf("Opera")&&s(n.browserVersion,["15",null]))&&(n.browserRenderingEngine="Blink"),n.browserRenderingEngineVersion||(n.browserRenderingEngineVersion=function(){var n;return(n=e.match(/Trident\/([0-9.]+)/))?n[1]:(n=e.match(/Presto\/([0-9.]+)/))?n[1]:(n=e.match(/AppleWebKit\/*([0-9.]+)/i))?n[1]:(n=e.match(/Gecko\/*([0-9.]+)/),n?n[1]:"")}())}t.prototype.android=function(){return"Android"===this.name&&s(this.version,arguments)},t.prototype.osx=function(){return"OSX"===this.name&&s(this.version,arguments)},t.prototype.ios=function(){return"IOS"===this.name&&s(this.version,arguments)},t.prototype.windows=function(){return"Windows"===this.name&&s(this.version,arguments)},t.prototype.windowsPhone=function(){return"WindowsPhone"===this.name&&s(this.version,arguments)},t.prototype.linux=function(){return"Linux"===this.name},r.prototype.safari=function(){return"Safari"===this.name&&s(this.version,arguments)},r.prototype.chrome=function(){return 0===this.name.indexOf("Chrome")&&s(this.version,arguments)},r.prototype.ie=function(){return 0===this.name.indexOf("Internet Explorer")&&s(this.version,arguments)},r.prototype.android=function(){return"Android Browser"===this.name&&s(this.version,arguments)},r.prototype.samsung=function(){return"Samsung Browser"===this.name&&s(this.version,arguments)},r.prototype.opera=function(){return 0===this.name.indexOf("Opera")&&s(this.version,arguments)},r.prototype.silk=function(){return"Amazon Silk"===this.name&&s(this.version,arguments)},r.prototype.firefox=function(){return"Firefox"===this.name&&s(this.version,arguments)},r.prototype.edge=function(){return"Edge"===this.name&&s(this.version,arguments)},r.prototype.webView=function(){var n=null,t="iP"===(e.navigator.platform||"").substr(0,2);if(t){var r=this.userAgent,i=-1!==r.indexOf("Safari")&&-1!==r.indexOf("Version"),o=!/constructor/i.test(e.HTMLElement);i&&!e.navigator.standalone?n="iOS Safari or Safari Controller":(o||e.indexedDB)&&e.statusbar.visible?(e.webkit&&e.webkit.messageHandlers||o||e.indexedDB)&&(n="WKWebView"):n="UIWebView"}else/^.*\/\d\.\d \(.*wv\).*/.test(this.userAgent)&&(n="AndroidWebView");return n},i.prototype.webkit=function(){return"WebKit"===this.name&&s(this.version,arguments)},i.prototype.gecko=function(){return"Gecko"===this.name&&s(this.version,arguments)},i.prototype.trident=function(){return"Trident"===this.name&&s(this.version,arguments)},i.prototype.presto=function(){return"Presto"===this.name&&s(this.version,arguments)},i.prototype.blink=function(){return"Blink"===this.name&&s(this.version,arguments)},o.prototype.phone=function(){return"Phone"===this.hardwareType},o.prototype.tablet=function(){return"Tablet"===this.hardwareType},o.prototype.desktop=function(){return"Desktop"===this.hardwareType},o.prototype.mobileDevice=function(){return this.mobile===!0},e.CeltraDeviceInfo.create=function(t,r){return t=t||e.navigator.userAgent||"",r=r||{},a(t,r),new n(r,t)}}(window);;
window.deviceInfo=CeltraDeviceInfo.create(window.navigator.userAgent,window.celtraDeviceInfoRuntimeParams);;
!function(e){function n(){var e=p().match(/iP(ad|hone|od).*OS ([0-9_]+)/);return!!e&&s(e[2].replace(/_/g,"."),arguments)}function t(){var e=p().match(/Android ([0-9.]+)/),n=p().match(/Windows Phone/);return!n&&!!e&&s(e[1],arguments)}function r(){var e=p().match(/Windows Phone ([0-9.]+)/);return!!e&&s(e[1],arguments)}function i(){var e=p().match(/AppleWebKit\/*([0-9.]+)/i);return!!e&&s(e[1],arguments)}function a(){var e=p().match(/Gecko\/*([0-9.]+)/i);return!!e&&s(e[1],arguments)}function o(){var e=p().match(/MSIE ([0-9]{1,}[.0-9]{0,})|Trident.* rv:([0-9]{1,}[.0-9]{0,})/i);return!!e&&s(e[1]||e[2],arguments)}function u(){var e=p().match(/Silk\/([0-9.]+)/);return!!e&&s(e[1],arguments)}function f(){var e=p().toLowerCase();return/kftt|kfot|kfjwi|kfjwa|kfso|kfth|kfapwi|kfthwi|kfsowi|kfthwa|kfapwa|kfap|sd4930ur/.test(e)?s("2",arguments):!1}function d(){return"undefined"!=typeof offsetWidthOverride?offsetWidthOverride:(document.body.offsetWidth,Math.min(innerWidth,innerHeight))}function c(){return/iPad/.test(p())||d()>550}function m(){return!(t()||n()||r())}function s(e,n){function t(e){return parseInt(e.replace(/\D/g,""),10)}function r(e,n){for(var t=0;tn[t])return 1}return 0}var i,a,o;if(!e)return!0;if(0===n.length)a=null,o=null;else if(1===n.length)a=n[0],o=n[0];else{if(2!==n.length)throw"Invalid number of arguments";a=n[0],o=n[1]}e=e.split(".").map(t),a=a?a.split(".").map(t):[],o=o?o.split(".").map(t):[];for(var i=v.max(a.length,o.length)-e.length;i>=0;i--)e.push(0);return!(-1===r(e,a)||1===r(e,o))}function h(){return v.top!==e}function l(){if(!(n()||window.chrome&&"Google Inc."===window.navigator.vendor))return!1;var e;return e=p().match(n()?/CriOS\/([0-9]+.)/:/Chrome\/([0-9]+.)/),!!e&&s(e[1],arguments)}function g(){var e="(-webkit-min-device-pixel-ratio: 1.5),(min--moz-device-pixel-ratio: 1.5),(-o-min-device-pixel-ratio: 3/2),(min-resolution: 1.5dppx)";return window.devicePixelRatio>1||window.matchMedia&&window.matchMedia(e).matches}e.celtra=e.celtra||{};var w={};w.ios=n,w.android=t,w.webkit=i,w.windowsPhone=r,w.gecko=a,w.windows=o,w.kindleSilk=u,w.kindle=f,w.iframe=h,w.desktop=m,w.tablet=c,w.chromeBased=l,w.isHighDensityDisplay=g,extend(e.celtra,w),delete w.webkit,extend(e,w);var v={max:e.Math.max,min:e.Math.min,userAgent:e.navigator.userAgent,top:e.top},p=function(){return"undefined"!=typeof e.userAgentOverride?e.userAgentOverride:v.userAgent}}(window);;
!function(e){function t(){var t=e;try{for(;"undefined"!=typeof t.parent.location.href&&t.parent.document!==t.document;)t=t.parent}catch(n){}return t}function n(){return s.getComputedStyle(s.document.body,null)}function i(e,t,n){if(!e)throw new Error("No element specified!");if(a(t)){if(!(t in e.style)&&i.BREAK_ON_ERROR)throw new Error("Invalid CSS attribute "+t);if("undefined"==typeof n)return e.style[t];e.style[t]=n}else{if(-1==w.indexOf(t)&&o(t),"undefined"==typeof n)return e.style[y[t]];e.style[y[t]]=n}}function r(e,t){if(!e)throw new Error("No element specified!");var n=e.ownerDocument.defaultView.getComputedStyle(e,null);if(R&&v.indexOf(t)>-1&&(t="webkit"+u(t)),!n||"none"==n.display||!f())return null;if(!(t in n)&&i.BREAK_ON_ERROR)throw new Error("Invalid CSS attribute "+t);return a(t)?n[t]:(-1==w.indexOf(t)&&o(t),n[y[t]])}function o(e){S=S||n();var t=E+u(e);if(R&&v.indexOf(e)>-1)y[e]=t;else if(S&&e in S)y[e]=e;else if(S&&t in S)y[e]=t;else if(!S&&deviceInfo.browser.firefox)y[e]=e;else if(i.BREAK_ON_ERROR)throw new Error("Invalid CSS attribute "+e+' or iframe still display "none" in FF');w.push(e)}function a(e){return p.test(e)}function f(){if(e===s)return!0;var t=e.frameElement.ownerDocument.defaultView.getComputedStyle(e.frameElement,null);return t&&"none"!=t.display}function u(e){return e+="",e?e[0].toUpperCase()+e.slice(1):""}var l=e.navigator.userAgent,s=t(),c=/rv:.*Gecko\//.test(l),d=/MSIE|Trident\//.test(l),m=/WebKit/.test(l),p=/^-?([mM]oz|[wW]eb[kK]it|[mM]s)-?/,y={},w=[],E=function(){return m?"webkit":d?"ms":c?"Moz":""}(),R=function(){var e=l.match(/AppleWebKit\/(\d+)/);return e&&~~e[1]<540}(),v=["transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","backface-visibility","perspective","perspective-origin"],S=n();i.BREAK_ON_ERROR=!1,e.celtra=e.celtra||{},e.celtra.styler={css:i,computedCSS:r,isWebkit:m,isGecko:c,isIE:d},e.css=i,e.computedCSS=r}(window);;
function PerformanceTracker(t,e){this.trackingCenter=t,this.trackingEnabled=e.get("PerformanceTiming")||e.get("MonotypeOffloadFonts"),this._id=0}PerformanceTracker.prototype.start=function(t,e){var r=this,i={name:t,type:"interval",id:this._id++,startTime:Date.now(),args:e||[]};return i.end=function(){this.endTime=Date.now();var t=this.endTime-this.startTime;Logger("perf").log(this.name+"(#"+this.id+") "+t),r.collect(this)}.bind(i),i},PerformanceTracker.prototype.collect=function(t){if(this.trackingEnabled){var e={name:"perfTiming",section:t.name,type:t.type,perfId:t.id,startTime:t.startTime,endTime:t.endTime,args:t.args};this.trackingCenter.trackNoLaterThan(e,1e3)}},PerformanceTracker.prototype.mark=function(t){var e=this.start(t);e.type="mark",e.endTime=e.startTime,this.collect(e)},PerformanceTracker.prototype.marks=function(t){return function(){this.mark(t)}.bind(this)};;
var EventEmitter={emit:function(t){var e=this._listeners;if(e&&e[t]){var n=[].slice.call(arguments,1);e[t].forEach(function(t){t.apply(window,n)})}},emits:function(){var t=arguments;return function(){this.emit.apply(this,t)}.bind(this)},addListener:function(t,e){var n=this._listeners;n||(n=this._listeners={}),n[t]||(n[t]=[]),n[t].push(e)},removeListener:function(t,e){var n=this._listeners;n&&n[t]&&(n[t]=n[t].filter(function(t){return t!==e}))},once:function(t,e){var n=this;n.on(t,function i(){n.off(t,i),e.apply(this,arguments)})},onAll:function(t,e){t.split(" ").waitForEach(function(t,e){this.once(t,e)},e,this)}};EventEmitter.on=EventEmitter.addListener,EventEmitter.off=EventEmitter.removeListener,EventEmitter.addEventListener=EventEmitter.addListener,EventEmitter.removeEventListener=EventEmitter.removeListener;;
function TaskScheduler(){this.hub=extend({},EventEmitter)}TaskScheduler.prototype.when=function(){var t,e=this;return t=Array.isArray(arguments[0])?arguments[0]:Array.prototype.slice.call(arguments),{run:function(n){t.waitForEach(function(t,n){e.hub.once(t,n)},n)}}},TaskScheduler.prototype.notify=function(t){this.paused||this.hub.emit(t)},TaskScheduler.prototype.notifies=function(t){return function(){this.notify(t)}.bind(this)},TaskScheduler.prototype.pause=function(){this._paused=!0};;
function TrackingCenter(e,t,n,i,s,r){this._sessionId=e,this._accountId=t,this._trackingUrl=i,this._trackers=s,this._purpose=n,this._flushCycle=null,this._flushCycleLength=1e4,this._useBatching=r,this._usePixel=!0,this.windowForPixels=window,this._instantiation=randInt(),this._eventIndex=0,this._pendingEvents=[],this._eventsInProgress=[],this._pendingPixels=[],this._waitingTrackingRequests=0,this._decrementWaiting=this._decrementWaiting.bind(this),this.flush=this.flush.bind(this),this.batchFlush=this.batchFlush.bind(this),this._flushPixels=this._flushPixels.bind(this)}extend(TrackingCenter.prototype,EventEmitter),TrackingCenter.eventCountLimit=1e3,TrackingCenter.prototype.setExperimentStatus=function(e){if(e&&e.get){var t=e.get("BatchTrackingRequests");this._useBatching=t?"control"!==t.chosenVariant.slice(0,7):this._useBatching;var n=t&&"Beacon"===t.chosenVariant.slice(-6),i=e.get("TrackWithBeaconAPI")||n;this._useBeacon=i&&this.windowForPixels.navigator&&this.windowForPixels.navigator.sendBeacon,this._usePixel=!(n&&this._useBeacon)}},TrackingCenter.prototype.batchFlush=function(){this._useBatching?this.flush():noop()},TrackingCenter.prototype.startBatchFlushCycle=function(e){this._useBatching&&(this.windowForPixels.setTimeout(this.flush,e),this._flushCycle=this.windowForPixels.setTimeout(this.flush,this._flushCycleLength))},TrackingCenter.prototype.isTrackingLimitReached=function(){return this._eventIndex>=TrackingCenter.eventCountLimit},TrackingCenter.prototype._createTrackingEvent=function(e){return e=JSON.parse(JSON.stringify(e)),extend({sessionId:this._sessionId,accountId:this._accountId,stream:"adEvents",instantiation:this._instantiation,index:this._eventIndex++,clientTimestamp:new Date/1e3},e)},TrackingCenter.prototype._addEventPendingToQueues=function(e){var t=this._resolvePixelsAndEventsForQueue([e]);this.isTrackingLimitReached()&&t.events.push(this._createTrackingEvent({name:"eventLimitReached"})),t.events.forEach(function(e){Logger("tracking").log("Queuing event "+JSON.stringify(e))}),t.pixels.forEach(function(e){Logger("tracking").log("Queuing pixel "+JSON.stringify(e))}),this._pendingEvents=this._pendingEvents.concat(t.events),this._pendingPixels=this._pendingPixels.concat(t.pixels)},TrackingCenter.prototype.track=function(e,t){this.trackNoLaterThan(e,0,t)},TrackingCenter.prototype.trackNoLaterThan=function(e,t,n){function i(e){return parseInt(e,10)===e}if(this.isTrackingLimitReached())return void console.warn("Tracking limit reached: "+TrackingCenter.eventCountLimit+" events.");if(i(t)?0>t&&(t=0):t=1500,n=n||noop,"live"!==this._purpose){var s=this._createTrackingEvent(e);return Logger("tracking").log("Ignoring non-live event "+JSON.stringify(s)),void defer(n)}var r=null;this._addEventPendingToQueues(e);var o=this.windowForPixels;this.once("trackingQueueEmptied",function(){r&&(o.clearTimeout(r),r=null),n()}.bind(this)),r=this._useBatching?o.setTimeout(this._flushPixels,t):o.setTimeout(this.flush,t)},TrackingCenter.prototype._resolvePixelsAndEventsForQueue=function(e){function t(e,i,s){if(0==e.length)return{events:i,pixels:s};var r=e[0],o=n._createTrackingEvent(r),c=n._trackers.urlsAndEventsFor(o);return t(e.slice(1).concat(c.events||[]),i.concat(o),s.concat(c.urls||[]))}var n=this;return t(e,[],[])},TrackingCenter.prototype._fireBeacon=function(e,t){this.windowForPixels.navigator.sendBeacon(e),t()},TrackingCenter.prototype._firePixel=function(e,t){function n(){i.onload=i.onerror=null,t()}var i=this.windowForPixels.document.createElement("img");i.onload=i.onerror=n;try{i.src=e}catch(s){n()}},TrackingCenter.prototype._decrementWaiting=function(){this._waitingTrackingRequests>0&&(--this._waitingTrackingRequests||this.emit("trackingQueueEmptied"))},TrackingCenter.prototype.flush=function(e,t){var n=this,i=e||noop;t="undefined"==typeof t?this._usePixel:t;var s=n._pendingEvents;if(n._pendingEvents=[],n._eventsInProgress=n._eventsInProgress.concat(s),s.length){n._waitingTrackingRequests++,this._useBatching&&(this.windowForPixels.clearTimeout(this._flushCycle),i=function(){n._flushCycle=n.windowForPixels.setTimeout(n.flush,n._flushCycleLength),(e||noop)()});var r=function(){n._eventsInProgress=n._eventsInProgress.filter(function(e){return-1===s.indexOf(e)}),n._decrementWaiting()};this._useBeacon&&n._fireBeacon(n._getTrackerBeaconUrl(s),r),t&&n._firePixel(n._getTrackerPixelUrl(s),r)}n._flushPixels(),0===n._waitingTrackingRequests?this.windowForPixels.setTimeout(i,0):this.once("trackingQueueEmptied",i)},TrackingCenter.prototype._flushPixels=function(){var e=this;e._pendingPixels.forEach(function(t){e._waitingTrackingRequests++,e._firePixel(t,e._decrementWaiting)}),e._pendingPixels=[]},TrackingCenter.prototype._getTrackerUrl=function(e){return base64json=this.windowForPixels.btoa(to_utf8(JSON.stringify(e))),this._trackingUrl+"json/"+base64json+"?crc32c="+crc32(base64json)},TrackingCenter.prototype._getTrackerPixelUrl=function(e){return this._getTrackerUrl({events:e})},TrackingCenter.prototype._getTrackerBeaconUrl=function(e){return this._getTrackerUrl({events:e.map(function(e){var t=JSON.parse(JSON.stringify(e));return t.beacon=!0,t})})},TrackingCenter.prototype._getTrackerRedirectUrl=function(e,t,n,i){i=i||{};var s={events:e,pixels:t,dest:n};return i.jsRedirectFunc&&(s.redirectFunc=i.jsRedirectFunc),this._getTrackerUrl(s)},TrackingCenter.prototype.wrapRedirectPageUrl=function(e,t){var n=this._getTrackerRedirectUrl(this._pendingEvents.concat(this._eventsInProgress),this._pendingPixels,e,t);return this._useBeacon?this.flush(void 0,!1):(this._pendingEvents=[],this._pendingPixels=[]),n};;
function Experiments(t,e){this._instances={};for(var n in t)this._instances[n]=new Experiment(n,t[n],e);e.setExperimentStatus(this)}function Experiment(t,e,n){this.key=t,this.chosenVariant=e,this._trackingCenter=n,this._variantExposedTracked=!1,this._variantSucceededTracked=!1,this.trackExposure=function(){this._track("variantExposed")}.bind(this),this.trackSuccess=function(){this._track("variantSucceeded")}.bind(this)}Experiments.prototype.get=function(t,e){var n=[t].concat(e||[]).map(encodeURIComponent).join("/");return this._instances[n]||null},Experiment.prototype._track=function(t){this["_"+t+"Tracked"]||(this["_"+t+"Tracked"]=!0,this._trackingCenter.track({name:t,experimentKey:this.key,variant:this.chosenVariant}))};;
function TouchEventSimulator(t){this.el=t,this.doc=t.ownerDocument?t.ownerDocument:t,this.win=this.doc.defaultView,this.touch=null,this._initialised=!1,this._firstEventFired=!1,this.handleFirstEvent=this.handleFirstEvent.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),this.handlePointerDown=this.handlePointerDown.bind(this),this.handlePointerMove=this.handlePointerMove.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handlePointerCancel=this.handlePointerCancel.bind(this),this.captureBubbleEvents=this.captureBubbleEvents.bind(this)}TouchEventSimulator.mode=null,TouchEventSimulator.prototype.start=function(){return this._initialised?void("function"==typeof Logger&&Logger("TouchEventSimulator").warn("Touch event simulator already initialised!")):("function"==typeof Logger&&Logger("TouchEventSimulator").log("Enabling touch event simulation"),this.doc.defaultView.msPointerEnabled?this.startPointers():this.startMouse(),this.el.addEventListener("touchstart",this.captureBubbleEvents,!1),this.el.addEventListener("touchmove",this.captureBubbleEvents,!1),this.el.addEventListener("touchend",this.captureBubbleEvents,!1),this.el.addEventListener("touchcancel",this.captureBubbleEvents,!1),void this.el.addEventListener("tap",this.captureBubbleEvents,!1))},TouchEventSimulator.prototype.stop=function(){return this._initialised?("function"==typeof Logger&&Logger("TouchEventSimulator").log("Disabling touch event simulation"),this.win&&this.win.msPointerEnabled?this.stopPointers():this.stopMouse(),this.el.removeEventListener("touchstart",this.captureBubbleEvents,!1),this.el.removeEventListener("touchmove",this.captureBubbleEvents,!1),this.el.removeEventListener("touchend",this.captureBubbleEvents,!1),this.el.removeEventListener("touchcancel",this.captureBubbleEvents,!1),void this.el.removeEventListener("tap",this.captureBubbleEvents,!1)):void("function"==typeof Logger&&Logger("TouchEventSimulator").warn("Touch event simulator not running!"))},TouchEventSimulator.prototype.captureBubbleEvents=function(t){t.stopPropagation(),t.preventDefault()},TouchEventSimulator.prototype.startMouse=function(){this.el.addEventListener("mousedown",this.handleMouseDown,!0),this.el.addEventListener("mousemove",this.handleMouseMove,!0),this.el.addEventListener("mouseup",this.handleMouseUp,!0),this.el.addEventListener("mouseout",this.handleMouseOut,!0),this.el.addEventListener("dragstart",this.handleDragStart,!0),this._initialised=!0},TouchEventSimulator.prototype.stopMouse=function(){this.el.removeEventListener("mousedown",this.handleMouseDown,!0),this.el.removeEventListener("mousemove",this.handleMouseMove,!0),this.el.removeEventListener("mouseup",this.handleMouseUp,!0),this.el.removeEventListener("mouseout",this.handleMouseOut,!0),this.el.removeEventListener("dragstart",this.handleDragStart,!0),this._initialised=!1},TouchEventSimulator.prototype.startPointers=function(){this.el.addEventListener("MSPointerDown",this.handlePointerDown,!0),this.el.addEventListener("MSPointerMove",this.handlePointerMove,!0),this.el.addEventListener("MSPointerUp",this.handlePointerUp,!0),this.el.addEventListener("MSPointerCancel",this.handlePointerCancel,!0),this._initialised=!0},TouchEventSimulator.prototype.stopPointers=function(){this.el.removeEventListener("MSPointerDown",this.handlePointerDown,!0),this.el.removeEventListener("MSPointerMove",this.handlePointerMove,!0),this.el.removeEventListener("MSPointerUp",this.handlePointerUp,!0),this.el.removeEventListener("MSPointerCancel",this.handlePointerCancel,!0),this._initialised=!1},TouchEventSimulator.prototype.init=function(){this.doc.defaultView.navigator.msPointerEnabled?this.start():(this.el.addEventListener("touchstart",this.handleFirstEvent,!0),this.el.addEventListener("mousedown",this.handleFirstEvent,!0))},TouchEventSimulator.prototype.updateTouchCoordinates=function(t){this.touch.screenX=t.screenX,this.touch.screenY=t.screenY,this.touch.pageX=t.pageX,this.touch.pageY=t.pageY,this.touch.clientX=t.clientX,this.touch.clientY=t.clientY},TouchEventSimulator.prototype.ignorables=["select","input","textarea"],TouchEventSimulator.prototype.isFormElement=function(t){return this.ignorables.indexOf(t.nodeName.toLowerCase())>-1},TouchEventSimulator.prototype.isIgnorable=function(t){for(var e=t;e&&e instanceof HTMLElement;e=e.parentNode)if(hasClass(e,"ignore-toucheventsimulator"))return!0;return!1},TouchEventSimulator.prototype.handleFirstEvent=function(t){this._firstEventFired||(this._firstEventFired=!0,this.el.removeEventListener("touchstart",this.handleFirstEvent,!0),this.el.removeEventListener("mousedown",this.handleFirstEvent,!0),"touch"!=TouchEventSimulator.mode&&"mousedown"==t.type?(TouchEventSimulator.mode="mouse",this.start(),this.handleMouseDown(t)):TouchEventSimulator.mode="touch")},TouchEventSimulator.prototype.handleMouseDown=function(t){0!=t.button||this.isIgnorable(t.target)||(this.touch={identifier:0,target:t.target},this.updateTouchCoordinates(t),t.stopPropagation(),this.isFormElement(t.target)||t.preventDefault(),this.fireTouchEvent("touchstart",t))},TouchEventSimulator.prototype.handleMouseMove=function(t){this.touch&&0==t.button&&(this.updateTouchCoordinates(t),t.stopPropagation(),t.preventDefault(),this.fireTouchEvent("touchmove",t))},TouchEventSimulator.prototype.handleMouseUp=function(t){this.touch&&0==t.button&&(this.updateTouchCoordinates(t),t.stopPropagation(),t.preventDefault(),this.fireTouchEvent("touchend",t),this.touch=null)},TouchEventSimulator.prototype.handleMouseOut=function(t){this.touch&&0==t.button&&(t.clientX<0||t.clientX>this.win.innerWidth||t.clientY<0||t.clientY>this.win.innerHeight)&&this.cancelInteraction()},TouchEventSimulator.prototype.handleDragStart=function(t){return t.preventDefault(),!1},TouchEventSimulator.prototype.handlePointerDown=function(t){0==t.button&&(this.touch={identifier:0,target:t.target},this.updateTouchCoordinates(t),this.fireTouchEvent("touchstart",t))},TouchEventSimulator.prototype.handlePointerMove=function(t){this.touch&&0==t.button&&(this.updateTouchCoordinates(t),this.fireTouchEvent("touchmove",t))},TouchEventSimulator.prototype.handlePointerUp=function(t){this.touch&&0==t.button&&(this.updateTouchCoordinates(t),this.fireTouchEvent("touchend",t))},TouchEventSimulator.prototype.handlePointerCancel=function(t){this.touch&&0==t.button&&(this.updateTouchCoordinates(t),this.fireTouchEvent("touchcancel",t),this.touch=null)},TouchEventSimulator.prototype.fireTouchEvent=function(t,e){var n=this.doc.createEvent("HTMLEvents");n.initEvent(t,!0,!0),"touchend"==t||"touchcancel"==t?(n.touches=n.targetTouches=[],n.changedTouches=[this.touch]):n.touches=n.targetTouches=n.changedTouches=[this.touch],e.target.dispatchEvent(n)},TouchEventSimulator.prototype.cancelInteraction=function(){this.touch&&(this.fireTouchEvent("touchcancel",this.touch),this.touch=null)};;
function AggregatorTracking(t){this._trackingCenter=t}AggregatorTracking.prototype.trackAggregator=function(t,r,g){"object"==typeof r&&(g=r,r=void 0),g=g||{},r=void 0!==r?r:1,this._trackingCenter.track({name:"aggregator",metric:t,value:r,customDimensions:g})},AggregatorTracking.prototype.trackAggregatorTime=function(t,r,g){this.trackAggregator(t,Math.round(r),g)},AggregatorTracking.prototype.trackAggregatorUsingTimer=function(t,r){var g=new Date;return function(){this.trackAggregatorTime(t,new Date-g,r)}.bind(this)},AggregatorTracking.prototype.trackAggregatorMagicTriplet=function(t,r,g){this.trackAggregator(t+"Attempts",r);var e=new Date;return function(){var a=new Date-e;(!g||g>a)&&(this.trackAggregator(t+"Successes",r),this.trackAggregatorTime(t+"Time",a,r))}.bind(this)};;
function Logger(e){if(!(this instanceof Logger))return new Logger(e);e=e||"";var n=noop;(Logger.enabledNames.indexOf(e)>=0||Logger.enabledNames.indexOf("all")>=0)&&(n=function(){var e=[].slice.apply(arguments);e.unshift(Logger._ts()+" ["+Logger.sessionId+(this.name?" "+this.name:"")+"]"),console.log.apply(console,e)}),this.name=e,this.log=n,this.warn=n,this.debug=n,this.error=n}Logger._ts=function(){function e(e,n){for(e+="";e.length0?i.area/this._maxPossibleDimensions.area:0,o=!1;s!==this.areaInViewRatio&&(this.areaInViewRatio=s,o=!0),n&&(this.emit("rectInViewChanged",i),Logger("InViewObject").debug(this.view.toString()+", rectInViewChanged: "+this.rectInView.toString())),o&&(this.emit("areaInViewRatioChanged",s),Logger("InViewObject").debug(this.view.toString()+", areaInViewRatioChanged: "+s))},InViewObject.prototype.getBoundingClientRect=function(){var t=this.getNode();return t?CRect.adopt(t.getBoundingClientRect()):CRect.ZERO},InViewObject.prototype.getMaxPossibleDimensions=function(){return this._maxPossibleDimensions},InViewObject.prototype._computeMaxPossibleDimensions=function(t,e){this._maxPossibleDimensions.width=Math.min(e.width,t.width),this._maxPossibleDimensions.height=Math.min(e.height,t.height),this._maxPossibleDimensions.area=this._maxPossibleDimensions.width*this._maxPossibleDimensions.height},InViewObject.prototype.getRectInView=function(){return this.rectInView},InViewObject.prototype.getAreaInViewRatio=function(){return this.areaInViewRatio},InViewObject.prototype.start=function(){this.active||(this._start(),this.active=!0,this.computeRectInView())},InViewObject.prototype._start=function(){this.inViewParent.on("rectInViewChanged",this.computeRectInView),this.inViewParent.on("areaInViewRatioChanged",this.computeRectInView)},InViewObject.prototype.stop=function(){this.active&&(this.computeRectInView(),this._stop(),this.active=!1)},InViewObject.prototype._stop=function(){this.inViewParent.off("rectInViewChanged",this.computeRectInView),this.inViewParent.off("areaInViewRatioChanged",this.computeRectInView)};;
function AdViewableTimeObserver(e){this._tracker=e,this._readyToShow=!1,this._adapter}function AdViewableInViewObjectObserver(){AdViewableInViewObjectObserver.uberConstructor.apply(this,arguments),this._inViewObjects=[],this._viewableInViewObjects=[]}function AdViewableUnitObserver(){AdViewableUnitObserver.uberConstructor.apply(this,arguments),this._units=[],this._viewableUnits=[],this._containerIsViewable=!1}AdViewableTimeObserver.prototype.readyToShow=function(){throw new Error("AdViewableInViewObjectObserver.readyToShow not implemented!")},AdViewableTimeObserver.prototype.registerUnit=function(){throw new Error("AdViewableInViewObjectObserver.registerUnit not implemented!")},AdViewableTimeObserver.prototype.registerAdapter=function(){throw new Error("AdViewableTimeObserver.registerAdapter not implemented!")},AdViewableTimeObserver.prototype.stop=function(){this._tracker.stop()},inherit(AdViewableInViewObjectObserver,AdViewableTimeObserver),AdViewableInViewObjectObserver.prototype.registerAdapter=function(e){this._adapter=e;var t=this._tracker;e.mediaState.on("videoStarted",function(){this._tryStartTracker()}.bind(this)),e.mediaState.on("videoStopped",function(){0===this._viewableInViewObjects.length&&t.stop()}.bind(this))},AdViewableInViewObjectObserver.prototype.readyToShow=function(){this._readyToShow=!0,this._tryStartTracker()},AdViewableInViewObjectObserver.prototype.registerUnit=function(e){var t=e.inView,i=this._inViewObjects,r=this._viewableInViewObjects,a=this._tracker;if(-1===i.indexOf(t)){i.push(t);var n=-1!==r.indexOf(t);!n&&t.getAreaInViewRatio()>0&&r.push(t),this._tryStartTracker(),t.on("areaInViewRatioChanged",function(e){var i=r.indexOf(t),n=-1!==i;!n&&e>0?(r.push(t),this._tryStartTracker()):0===e&&n&&(r.splice(i,1),0===r.length&&a.stop())}.bind(this))}},AdViewableInViewObjectObserver.prototype._tryStartTracker=function(){var e=this._adapter,t=e&&e.mediaState.playingVideo;return this._readyToShow&&(this._viewableInViewObjects.length>0||t)?(this._tracker.start(),!0):!1},inherit(AdViewableUnitObserver,AdViewableTimeObserver),AdViewableUnitObserver.prototype.registerAdapter=function(e){this._adapter=e,this._containerIsViewable=e.containerIsViewable;var t=this._tracker;e.on("containerViewableChange",function(e){this._containerIsViewable=e,e?this._tryStartTracker():t.stop()}.bind(this)),e.mediaState.on("videoStarted",function(){this._tryStartTracker()}.bind(this)),e.mediaState.on("videoStopped",function(){this._adapter.containerIsViewable&&0!==this._viewableUnits.length||t.stop()}.bind(this))},AdViewableUnitObserver.prototype.readyToShow=function(){this._readyToShow=!0,this._tryStartTracker()},AdViewableUnitObserver.prototype.registerUnit=function(e){if(!this._adapter)throw new Error("adapter was not registered yet!");var t=this._units,i=this._viewableUnits,r=this._tracker;-1===t.indexOf(e)&&(t.push(e),-1===i.indexOf(e)&&e._visible&&(i.push(e),this._tryStartTracker()),e.on("appeared",function(){-1===i.indexOf(e)&&(i.push(e),this._tryStartTracker())}.bind(this)),e.on("disappeared",function(){var t=i.indexOf(e);-1!==t&&(i.splice(t,1),0===i.length&&r.stop())}.bind(this)))},AdViewableUnitObserver.prototype._tryStartTracker=function(){var e=this._adapter;return e&&(e.containerIsViewable||e.mediaState.playingVideo)&&this._readyToShow&&this._viewableUnits.length>0?(this._tracker.start(),!0):!1};;
function AdViewableTimeTracker(i,e,t,n){this._trackingCenter=i,this._raf=e,this._win=t,this._intervals=n||{3e3:1e3,1e4:2e3,63e3:3e3},this._isRunning=!1,this._viewableMilliseconds=0,this._fromTime=0,this._pendingPingTimeoutId,this._pendingPingRafId,this._maxRafLatency=500}AdViewableTimeTracker.eventName="viewableTime",AdViewableTimeTracker.TrackingData=function(i,e){return i>e&&(e=i),{name:AdViewableTimeTracker.eventName,from:i/1e3,to:e/1e3}},AdViewableTimeTracker.prototype.start=function(){this._isRunning||(this._isRunning=!0,this._fromTime=Date.now(),0===this._viewableMilliseconds?this._initPing():this._setNextPing())},AdViewableTimeTracker.prototype.stop=function(){if(this._clearPendingPing(),this._isRunning&&-1!==this._getPingInterval()){var i=Date.now(),e=i-this._fromTime;this._viewableMilliseconds+=e;var t=new AdViewableTimeTracker.TrackingData(this._fromTime,i);this._track(t)}this._isRunning=!1},AdViewableTimeTracker.prototype._initPing=function(){var i=this._fromTime,e=this._getPingInterval(),t=new AdViewableTimeTracker.TrackingData(this._fromTime,i);this._pendingPingRafId=this._raf.nextFrame(function(){this._track(t),this._setFromTimeForNextPing(i,e),this._setNextPing()}.bind(this))},AdViewableTimeTracker.prototype._setNextPing=function(){function i(){if(this._isRunning){var i=Date.now();this._viewableMilliseconds+=e,this._normalizeFromTime(i,e),this._pendingPingRafId=this._raf.nextFrame(function(){var t=new AdViewableTimeTracker.TrackingData(this._fromTime,i);this._track(t),this._setFromTimeForNextPing(i,e),this._setNextPing()}.bind(this))}}this._clearPendingPing();var e=this._getPingInterval();this._isRunning&&-1!==e&&(this._pendingPingTimeoutId=this._win.setTimeout(i.bind(this),e))},AdViewableTimeTracker.prototype._normalizeFromTime=function(i,e){var t=i-this._fromTime,n=e+this._maxRafLatency;t>n&&(this._fromTime=i)},AdViewableTimeTracker.prototype._setFromTimeForNextPing=function(i,e){var t=Date.now(),n=t-i,r=n>e;this._fromTime=r?t:i},AdViewableTimeTracker.prototype._getPingInterval=function(){var i=this._viewableMilliseconds,e=this._intervals,t=Object.keys(this._intervals),n=1*t[t.length-1],r=-1;return t.some(function(t){return 1*t>i?(r=e[t],i+r>n&&(r=-1),!0):!1}),r},AdViewableTimeTracker.prototype._clearPendingPing=function(){this._raf.cancelFrame(this._pendingPingRafId),this._win.clearTimeout(this._pendingPingTimeoutId)},AdViewableTimeTracker.prototype._track=function(i){this._trackingCenter.track(i)};;
!function(t){function i(){this.playingVideo=!1}var e=i.prototype;extend(e,EventEmitter),e.stopVideo=function(){this.playingVideo=!1,this.emit("videoStopped")},e.startVideo=function(){this.playingVideo=!0,this.emit("videoStarted")},t.MediaState=i}(window);;
!function(e){"use strict";var r={};r.toString=function(){return"[Clazz CustomAudiences]"};var t=function(e,r,t,n){function i(r,t){var i=new XMLHttpRequest;i.open(e,u+s+"/"+encodeURIComponent(r)+"/"+encodeURIComponent(t)+"?"+creative.authTokenUrlParam),i.send(n)}if(-1===["PUT","DELETE"].indexOf(e))throw new Error("Unsupported request method: "+e);if("undefined"==typeof creative.runtimeParams.customAudiences[r])throw new Error('Custom audience "'+r+'" is not used by the creative.');creative.runtimeParams.customAudiences[r]={userExists:t,userData:n};var u=creative.secure?creative.customAudiencesUrl:creative.insecureCustomAudiencesUrl,s="/audiences/"+r,o=creative.userIdentifiers;for(var a in o)for(var c in o[a])i(a,o[a][c])};r.addUser=function(e,r){creative.runtimeParams.userOptOut||t("PUT",e,!0,r)},r.removeUser=function(e){creative.runtimeParams.userOptOut||t("DELETE",e,!1)},e.CustomAudiences=r}(window);;
!function(){var A=[".video-player-wrapper {"," position: absolute;"," width: 100%;"," height: 100%;"," background: #000;"," top: 0;"," left: 0;"," overflow: hidden;","}",".video-player-engine {"," position: absolute;"," width: 100%;"," height: 100%;"," min-height: 100%;"," top: 0;"," left: 0;"," margin: 0;"," padding: 0;"," overflow: hidden;","}",".video-player-engine video,",".video-player-engine .canvasContainer","{"," position: relative;"," width: 100%;"," height: 100%;"," min-height: 100%;"," background: #000;"," top: 0;"," left: 0;","}",".video-player-poster {"," position: absolute;"," background-size: contain;"," background-repeat: no-repeat no-repeat;"," background-position: center center;","}",".video-player-fitting-crop .video-player-poster {"," background-size: cover;","}",".video-player-engine canvas {"," position: relative;"," width: 100%;"," background: #000;"," top: 0;"," left: 0;","}",".video-player-engine canvas {"," image-rendering: optimizeSpeed;"," image-rendering: -moz-crisp-edges;"," -ms-interpolation-mode: nearest-neighbor;"," image-rendering: optimize-contrast;"," image-rendering: -webkit-pixelated;"," image-rendering: crisp-edges;"," image-rendering: -webkit-optimize-speed;"," image-rendering: -webkit-optimize-contrast;","}",".video-controls-container {"," position: absolute;"," width: 100%;"," height: 100%;"," top: 0;"," left: 0;"," font-size: 14px;","}",".video-basic-controls-wrapper {"," position: absolute;"," width: 100%;"," height: 100%;","}",".video-controls-slider-container {"," position: absolute;"," width: 100%;"," height: 8px;"," bottom: -1px;"," left:0;"," background: #111;","}",".video-controls-progress-bar {"," opacity: 0.3;","}",".video-controls-progress-bar,",".video-controls-time-bar {"," position: absolute;"," width: 0;"," top: 0;"," left: 0;"," height: 100%;","}","@-webkit-keyframes video-player-spin{"," 0% { -webkit-transform: rotate(0deg); }"," 100% { -webkit-transform: rotate(359deg); }","}","@-moz-keyframes video-player-spin{"," 0% { -moz-transform: rotate(0deg); }"," 100% { -moz-transform: rotate(359deg); }","}","@keyframes video-player-spin{"," 0% { transform: rotate(0deg); }"," 100% { transform: rotate(359deg); }","}",".video-player-spinner-big,",".video-player-spinner-small {"," display: block;"," position: absolute;"," top: 50%;"," left: 50%;"," -webkit-animation: video-player-spin 1.5s infinite linear;"," animation: video-player-spin 1.5s infinite linear;","}",".video-player-spinner-big {"," width: 35px;"," height: 35px;"," margin-top: -17px;"," margin-left: -17px;",' background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjCAQAAAC00HvSAAADTklEQVR4AZWVTWgcZRyHn/c/7zubbDbJJsTEioiIH7EGq6EIRqwWqbRClXrx4E0QxYt3b4qK9qgoePDmwRYVS6xFW7Ueeqj0kqIVQYwljTVt0o/dZD9n3r/zshGSGpOd54GZ0+9h/qcxbMh03PfK4LPl8cFy0SJsialxIyfHRz+6Y6pkDR0xXWQ8azlaGvt0fF9sMsiTsazh2933fzEyKICu2+bKfP/izg96IlDA6JXmhdPVY81T6Xk2wAuCz1zFTNOh+PKD71sRMIZqY3aa59iERYtktvDrMm735LGCNQaE38/O7WGRzRBCJljrhCyB0l2HXKSgxpw7zt4xNmcBZNUSlU4XGPl4aEhRVc595fd6tvKm8LAEY4qrR0V3T87YyGDMn2d4mC6ZL9JDmEm6gBcYPhiJqlJdnt8/T7dSQ0JEhQEQ4m2Ph4jq3GdDi0N0Lw21arHSL0jP84WCZlQqV1+6Sh5ZRoix9PiiLe1TBbj0w4gnJ4v1qBeQqN8W79HQYeU78tPAIqBFWxwNFbR1mvy0iMEY+qyNvRK4SH68cQAGiaz64MTCBHndkRhngr3SbnYyM6Mz5NYah81EWnXN8D66OSKvxBrjMpH6X+ozNd4Rk1dKxgW1KbVfskpGYapAXqNRXGakdal/o1kHX95VJq/RbcYFWZLGkVY1fE+hvPT6Enmc2y5lnIk0TS8LraXjeM0ceqY6UKVrrbsvRHD+gvViqbyTtvDex4PD7w3Tre4xUzYOhyS/JUiCP3/pkPd49eVH2m+36cbqLrcdR2Rs8qutWcRiqbxRm9c0HDZywLxp2MrGE/FDxoo1VivJTEKCmSYQPXDrJ+LIQppeO3n9NZb5P+LC0+5eEm2Tar12mCvr/lPxU9veNRIy6luXK0f4kA1I9hR2Sp9PSLJIo/4lsxAwR/kX++TYWyZWT6qZrb9rp9pnkj/8dSqUon5zi73TTUhJs4QGV+qfh8h/MmAmRg7GYyGiXpPMlLbP3rS1Y6oJLU3Upxebh1lYs/yataQ9pVcH9hsJqdVMmHYS7ZAm0Ubjx9YJEtZgprmRaKz3hb5HpTeESHyIZYFOIq00f2qe4BqBTTMdrJuKJ+3t0bAUsH7FV5KFZLb9c3oWzwb8AzjvQbz9lli3AAAAAElFTkSuQmCC");',"}",".video-player-spinner-small {"," width: 18px;"," height: 18px;"," margin-top: -9px;"," margin-left: -9px;",' background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAQAAAD8x0bcAAABeElEQVR4AXXSv2sTYRjA8e89997lcuR60eJQUdpFQQoqdHRWhAoddPBPcHRwE8TZxcXJf0BEsIjuQUQQtZMOpREM9RKL1RrqJbkf771nEGnKJf1+hmd5eKaHSe/vtzf30k63Q9X/8XZte6f8V/QrokopILq9/CB0+nnUip/l7zioUJgxrBbu6rnnodvp9G6wwaG04AEJRvAWHjXcr+3tC3pDcxhmzGcOpH7rxOm9uHfN3repIkMkwJPguljfXwVbAdOaBm3V7VD8pVE2fDpkNhJcQqXqOi+2OKrxJRxVFkXB0Ql1tKS/QZaE2fAkQGS4KbZ3xWM2+xRzpDJYz5Pw6mBxwLQ/vlq2XLMj6ZP9T7VjzYfGN1Qo97IslD9NV8j6d0e7wUrzsSwKExyv3XTOl1n2AWO1AHdt/p4Kkm/xy/xN2cMwb591Lkqj+JGs0wbrNQCy0rjjnQHdN7EZkYOJs8/ZC7pwsASgVp1L6qRVK9NiV3/RHyc/8RftSMiO8WZLaAAAAABJRU5ErkJggg==");',"}",".video-controls-hiddable,",".video-controls-unhiddable {"," width: 100%;"," height: 100%;","}",".video-basic-controls-wrapper .center-button {"," position: absolute;"," width: 4em;"," height: 4em;"," border-top-left-radius: 2em;"," border-top-right-radius: 2em;"," border-bottom-left-radius: 2em;"," border-bottom-right-radius: 2em;"," background: #111;"," margin: auto;"," top: 0;"," left: 0;"," bottom: 0;"," right: 0;"," text-align: center;"," cursor: pointer;"," opacity: 0.8;"," z-index: 1;","}",".center-button div {"," position: relative;"," width: 100%;"," color: white;"," font-size: 2em;"," top: 0.5em;","}",".center-button .celtra-icon-play { left: 0.1em;}",".center-button .celtra-icon-replay { top: 0.62em; left:0.05em}",".video-basic-controls-wrapper .custom-button {"," position: absolute;"," height: 100%;"," width: 100%;"," top: 0;"," left: 0;"," cursor: pointer;"," opacity: 0.8;","}",".custom-button img {"," margin: auto;"," position: absolute;"," top: 0;"," right: 0;"," bottom: 0;"," left: 0;","}",".video-controls-button {"," position: absolute;"," cursor: pointer;"," font-size: 1.5em;"," color: white;"," width: 2.5em;"," height: 2.5em;","}",".video-controls-desktop .video-controls-button div {"," margin-top: -0.5em;","}",".ie-click-event {"," background-color: rgba(255,255,255,0);","}",".video-controls-button-shadow {"," text-shadow: 1px 1px 3px #000;","}",".video-controls-button-top-right {"," right: 0;"," top: 0;","}",".video-controls-desktop .video-controls-button-top-right {"," margin-right: 0.5em;"," margin-top: 0.5em;"," width: 1.5em;"," height: 1.5em;","}",".video-controls-button-bottom-right {"," right: 0;"," bottom: 0;","}",".video-controls-desktop .video-controls-button-bottom-right {"," margin-right: 0.5em;"," margin-bottom: 0.75em;"," width: 1.5em;"," height: 1.5em;","}",".video-controls-button div {"," position: absolute;"," height: 50%;"," width: 100%;"," left: 0;"," text-align: center;"," top: 50%;"," margin-top: -0.75em;"," vertical-align: middle;","}",".video-controls-button .celtra-icon-close {"," font-size: 0.7em;"," left: 0.07412em;","}",".video-controls-button .celtra-icon-enter-full-screen,",".video-controls-button .celtra-icon-exit-full-screen {"," left: 0.09em;","}",".video-controls-pending {"," animation: video-controls-pending 1s infinite linear;","}","@-webkit-keyframes video-controls-pending {"," 0% { opacity: 1 }"," 50% { opacity: 0 }"," 100% { opacity: 1 }","}","@keyframes video-controls-pending {"," 0% { opacity: 1 }"," 50% { opacity: 0 }"," 100% { opacity: 1 }","}","@font-face {",' font-family: "celtraicons";',' src:url("data:application/font-woff;base64,d09GRk9UVE8AAAqEAAoAAAAACjwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABDRkYgAAAA9AAABq8AAAavkHaHf09TLzIAAAekAAAAYAAAAGAIIvzDY21hcAAACAQAAABMAAAATBpVzGRnYXNwAAAIUAAAAAgAAAAIAAAAEGhlYWQAAAhYAAAANgAAADb/fCRYaGhlYQAACJAAAAAkAAAAJAPjAfJobXR4AAAItAAAAEgAAABIHLIB9G1heHAAAAj8AAAABgAAAAYAElAAbmFtZQAACQQAAAFdAAABXWEQuipwb3N0AAAKZAAAACAAAAAgAAMAAAEABAQAAQEBDGNlbHRyYWljb25zAAECAAEAOvgcAvgbA/gYBB4KABlT/4uLHgoAGVP/i4sMB4pq+JX4dAUdAAAA0A8dAAAA1REdAAAACR0AAAamEgATAQEMFxkbHiMoLTI3PEFGS1BVWl9kY2VsdHJhaWNvbnNjZWx0cmFpY29uc3UwdTF1MjB1RTYwMHVFNjAxdUU2MDJ1RTYwM3VFNjA0dUU2MDV1RTYwNnVFNjA3dUU2MDh1RTYwOXVFNjBBdUU2MEJ1RTYwQ3VFNjBEAAACAYkAEAASAgABAAQABwAKAA0ASwCpAPUCGAJDAs0DBQPvA/sEHgRFBG0E2wWp/JQO/JQO/JQO+5QOi/dUFYs/rUbAXAi1uwVjrnK/i8SL9eHh9YvAi7t2rmgIQ0P3VIuL91RAQAVduUuoRIv7IYv7B/sHi/shCA6L9+kVi/tP9wiK9yD7G4v4Yvsg+x4F93qoFWRkBaZ0nGqLZYtlempwdAiyZAWvrKK6i8CLwHS6Z6wI19cVZWUFuWCoTotIi0huTl1gCLFlBcO/rtaL3YvdaNVTwAgOPPdt+HQVRYtNamNXCF65i/se9x6LUcQFqra8p8SL54vWQIsuiy9AQC+LPItJwXnVCFmLBZ0m5D71i/cLi+3ti/cLi/cMKez7C4sIDvhf95UVg4uDh4WFhYWHg4uDi4KPg5GFkYWTiJOLlIuTjpGRkZGOk4uUi5OIk4WRhZGDj4KLCEveFfutiwWIi4iJiImIiIqIi4gIi/thBYuIjIiOiI6JjomOiwj3rYsFj4uOjY2Njo6MjouOCIv3YQWLjoqOiI6JjYiNh4sI++c+FYeLiYmLhwiLSwWLho2Jj4uQi42Ni5AIi8sFi4+JjYaLCIX3BxX4LYsFmYuXhpWBloGQf4t9CIv7YQWLfYZ/gIGBgX+GfYsI/C2LBX2Lf5CBlYGVhpeLmQiL92EFi5mQl5WVlZWXkJmLCPcO+zsVi3OVdZx8CJmaBX6Wg5yLnYutp6esi5yLm4SWgAh0dMiLi8hzcwV9mnaUdItei2dmi14IDvgl9/EVd5/7EfsR+xH3EXd39xH7EfsR+xGfd/cR9xH3EfsRn5/7EfcRBQ74lfgVFXiCd4Z1iKGYnKCTo3Z/dYJzh3ifb5hti1GLXFyLUYuDjIKMhDSPPrVXy4J7hXmLeAiLZp5rp3h6jHuQfZKLi4uLi4qLWK9hu4GCiYKJgYuEi4WMhIyZYbJtuYpnb116WosIg4uCjIOMum3CecaL91aL9Pc1i/cfi4+LkIuPoJqdnZmhCA73t2sVi/ef0IuV2zyLi74Fi6KRm62LCLWLi9MFhIxyjW2LTothZotGCItQRouLO9CLi/uf3osFDveznxWLlIiShJGFkoSOgouCi4OIhYSFhYiEi4KLgo6EkYSRhZOIlIuUi5KOkZGSko6Si5QI3ssVi/etBYuPio6IjYmOiIyHiwj7YYsFiIuIioiIiYmKiIuHCIv7rQWLh4yIjYmOiI6KjosI92GLBY+LjoyNjo6NjI6Ljwg+9+cVi4+JjYeLCEuLBYaLiYmLh4uHjYiQiwjLiwWPi42Oi48I9weRFYv8LQWLfYZ/gYGBgX+GfYsI+2GLBX2Lf5CBlYGVhpeLmQiL+C0Fi5mQl5WVlpWWkJmLCPdhiwWZi5eGlYGVgZB/i30IDtlqFYv4lfgI+5EFDqL4dBX3R4uL/JX7R4uL+JUF97aLFfdHi4v8lftHi4v4lQUO5/fAFVpZ91mMivdXW1s53SgpBfeY+04VjPtXvLzdOe3uOd27uwUO90v4HhW8u/tWi4v7Vbu63Drt7QX3Z/vHFYr3VVtaOt0pKdw6XFsFDvhSyhWotJy+i8KL1WzOWLoIaWkFtWSlVYtOi2F/ZXZrCGiuBZeikqWLp4u6drZrqQhoaAWjdppti2mLfYd9hn8IO9mL90kyMfsg9yFvb/h4/HmoqEjOBfw494QVi/s984r3E/sOi/ca+zL3MgUO+I/QFYuLi4uLiwj7L/cv9y/3LwWLi4uLi4uNjYyNjI2NkYqRhpAIQtQFhpCFjIWJiYqJiomJi4uLi4uLCPsv+y/7L/cvBYuLi4uLi4mNiYyJjIWNhYqGhghCQgWGhoqFjYWMiYyJjYmLi4uLi4sI9y/7L/sv+y8Fi4uLi4uLiYmKiYqJiYWMhZCGCNRCBZCGkYqRjY2MjYyNjYuLi4uLiwj3L/cv9y/7LwWLi4uLi4uNiY2KjYqRiZGMkJAI1NQFkJCMkYmRio2KjYmNCA74lBT4lBWLDAoAAAMCAAGQAAUAAAFMAWYAAABHAUwBZgAAAPUAGQCEAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA5g0B4P/g/+AB4AAgAAAAAQAAAAAAAAAAAAAAIAAAAAAAAgAAAAMAAAAUAAMAAQAAABQABAA4AAAACgAIAAIAAgABACDmDf/9//8AAAAAACDmAP/9//8AAf/jGgQAAwABAAAAAAAAAAAAAAABAAH//wAPAAEAAAABAAAXLCAzXw889QALAgAAAAAAzy5xzgAAAADPLnHO////3wIBAeAAAAAIAAIAAAAAAAAAAQAAAeD/4AAAAgD/////AgEAAQAAAAAAAAAAAAAAAAAAABIAAAAAAAAAAAAAAAABAAAAAgAAAAIAAAABsQAAAgD//wIAAG8CAAAAAgAAiwIAAGUCAABOAgAAFwIAAAoCAAAmAgAAAAIAAAEAAFAAABIAAAAAAA4ArgABAAAAAAABABYAAAABAAAAAAACAA4AYwABAAAAAAADABYALAABAAAAAAAEABYAcQABAAAAAAAFABYAFgABAAAAAAAGAAsAQgABAAAAAAAKACgAhwADAAEECQABABYAAAADAAEECQACAA4AYwADAAEECQADABYALAADAAEECQAEABYAcQADAAEECQAFABYAFgADAAEECQAGABYATQADAAEECQAKACgAhwBjAGUAbAB0AHIAYQBpAGMAbwBuAHMAVgBlAHIAcwBpAG8AbgAgADEALgAwAGMAZQBsAHQAcgBhAGkAYwBvAG4Ac2NlbHRyYWljb25zAGMAZQBsAHQAcgBhAGkAYwBvAG4AcwBSAGUAZwB1AGwAYQByAGMAZQBsAHQAcgBhAGkAYwBvAG4AcwBHAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4AAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="),',' url("data:font/truetype;base64,AAEAAAALAIAAAwAwT1MvMggi/MMAAAC8AAAAYGNtYXAaVcxkAAABHAAAAExnYXNwAAAAEAAAAWgAAAAIZ2x5ZtKQLWwAAAFwAAAJfGhlYWT/fCRYAAAK7AAAADZoaGVhA+MB8gAACyQAAAAkaG10eByyAfQAAAtIAAAASGxvY2EUzhFSAAALkAAAACZtYXhwABgAwAAAC7gAAAAgbmFtZWEQuioAAAvYAAABXXBvc3QAAwAAAAANOAAAACAAAwIAAZAABQAAAUwBZgAAAEcBTAFmAAAA9QAZAIQAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADmDQHg/+D/4AHgACAAAAABAAAAAAAAAAAAAAAgAAAAAAACAAAAAwAAABQAAwABAAAAFAAEADgAAAAKAAgAAgACAAEAIOYN//3//wAAAAAAIOYA//3//wAB/+MaBAADAAEAAAAAAAAAAAAAAAEAAf//AA8AAQAAAAAAAAAAAAIAADc5AQAAAAABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAACAAHAACMAADcUHgIXNy4DNTQ+AjMyHgIXBzM1By4DIyIOAhUADBcgFCoPGBEJHjRGKBQmIh8NSMBLESkuMhs1XUYowB02MSoSMA0gJSgWKEY0HggOFQ1IwEsRHBQKKEZdNQADAAAAEgIBAeAABQAcADMAABMVHwERBzcHHgMVFA4CBxc+AzU0LgInNwceAxUUDgIHFz4DNTQuAicAdIyM5icKEQsGBgsRCicNFhAICBAWDUwmERwTCwsTHBEmFSEYDQ0YIRUBVbsBhwHOih0nCBUYGw4OGxgVCCcNHSIlFBQlIh0NTCYQJyswGRkwKycQJhQvNTofHzo1LxQAAAABAAAALgGyAeAALQAAEyIOAgcnFTMnPgMzMh4CFRQOAiMiLgInIx4DMzI+AjU0LgIj2RoxLCYPLYo6DB0jKBUiPS4aGi49Ih41Kx4HMgcmOUcoLU86IyM6Ty0B4AwWHxQuijkQGhMKGy09IyI9LhoTIi8cJkEvHCM6Ty0tTzsiAAX//wBHAf8BegAoAFUAbACZAL0AAAEiDgIHDgMVFB4CFx4DMzI+Ajc+AzU0LgInLgMjJyEiDgIHDgMdARQeAhceAzMhMj4CNT4CND0BPAEuASc0LgIjBSIOAh0BFB4CMzI+Aj0BNC4CIychMh4CFx4DHQEUDgIHDgMjISIuAicuAz0BND4CNz4DMxcUHgIXNy4DNTQ+AjMyHgIXBzM1By4DIyIOAhUBywMGBgUCAgQCAgICBAICBQYGAwQGBgUCAgQCAQECBAICBQYGBED+5wEDAgIBAQEBAQEBAQEBAgIDAQEZAgICAwECAQECAQMCAgL+rQEDAQEBAQMBAgICAQECAgIGAZkGCQkJAwQGBAICBAYEAwkJCQb+ZwUKCQgEBAUEAgIEBQQECAkKBXoDCAoGDgUIBQMKEBcMBwwLCgQXPRgFDQ8QCREdFwwBAQICAwMCBQYGAwQGBgUCAgQCAQECBAICBQYGBAMGBgUCAwMCAlMBAQEBAQICAwHNAQMCAgEBAQEBAQEBAQECAgMBzQEDAgIBAQEBAU0BAQMBQAICAgEBAgICQAEDAQFzAgQFBAQICQoFzQUKCQgEBAUEAgIEBQQECAkKBc0FCgkIBAQFBAKnCREQDgUPBAsLDQcNFhEKAwUGBBc9GAYJBgMNFh4RAAAAAQBvAE8BkQFxAAsAAAEnBycHFwcXNxc3JwGRFH19FH19FH19FH0BXRR9fRR9fRR9fRR9AAEAAAARAgEBsgBpAAABDgMjPgM3DgMjLgMHJg4CFRwBHgEVLgMnDgMVFB4CFwYuAic0FDQUNRQeAhciBiIGJwYmBiYHHgM3DgMHJgYmBiceAxc+AzUwPAI1PgM3AgEHDw8QCAgPCwoDCBAREQkHEhMWCxYmHRABASA+NzATBAUEAgcMEgoGDQwLBQwXHxIDBwcHBAIFBQUDBRQZHxIOHiEjEwMGBwYDESYpKxZJb0wnCA4NDAYBgQMGAwQEDQ4SCAMJBgYGDgcGAQESGycVBAUHBQQCEB4mGQcMDg0IDRoWFAYBAwMFAgEBAQIBFCEdEQUCAgEBAgECAQ8bEg0BCxANBQEBAQIBAg0QDQYBATZXaTYFAgQBBwsPDgkAAQCL/+ABdQHgABwAAAURMzcjNTQ+AjsBNSIuAiMiDgIdASMVMxEzASNFCk8DCQ8NKgMLERQLFyYbD0VFUyABC1AzCQ4LBUgBAQEOGycaO1D+9QAABABl/+EBmAHgACgAVQBsAJkAACU0LgInLgMjIg4CBw4DFRQeAhceAzMyPgI3PgM1NxE0LgInLgIiKwEqAQ4BBw4CFBURHAEeARceAjI7AToBPgE3PgM1AzQuAisBIg4CFRQeAjsBMj4CNTcRFA4CBw4DKwEiLgInLgM1ETQ+Ajc+AzsBMh4CFx4DFQEfAQMDAwIFBgYDBAYFBgICBAIBAQIEAgIGBQYEAwYGBQIDAwMBUwEBAQEBAgIDAc0BAgMCAQEBAQEBAQECAwIBzQEDAgIBAQEBAU0BAQMBQAICAgEBAgICQAEDAQFzAgMGBAQICQoFzQUKCQgEAwYEAgIEBgMECAkKBc0FCgkIBAQGAwIUAwYGBQIDAwMBAQMDAwIFBgYDAwcFBQMCBAIBAQIEAgMFBQcDQAEZAgICAgEBAgEBAgEBAgICAv7nAQMCAgEBAgEBAgEBAgIDAQFTAQMBAQEBAwECAgIBAQICAgb+ZwUKCQgEBAYDAgIDBgQECAkKBQGZBQoJCAQEBgQBAQQGBAQICQoFAAAAAQBO/98BwgHgAAIAABcRBU4BdCECAf0AAgAX/98B7AHgAAQACQAAEzMTIxMhMwMjAxeyAbQBASG0AbIBAeD9/wIB/f8CAQAAAgAK/+AB9AHgAAYADQAAEwczJwcnBwUXNxc3JzdcMcUBMFJjAQQBMVJiUjABLDHEMVNjucQyU2RRMQAAAgAmAAUB3AG6AAYADQAAEzcHFTcXNxMnBycHFwe3McIwUWLTATBRYlEvAYoxAcAuUGH+zsAwUWFSLwAAAgAA/98CAQHgADMAOQAAJT4DNTQuAicHHgMVFA4CByc+AzU0LgInBx4DFRQOAgcnNQcnBwE3JyUVHwE1JwG+CxEMBgsVHxMiDxoRCgUIDAgjBAcFAwcOFAwjCQ4LBQEDAwJQWYwcAeQdQ/5caH+ePxAiJiYWGzUvLBAhECEoKxcPHxsbCyIKERQTDBAjHhsLIgkSFxcNBQsJCgRNtluOHf4cHETvqAJ5hZ8AAAEAAf/hAf8B3wCEAAAlOAMxJzc4AzE+AzU2NC4BLwEuAiIHIg4CBzgDMQcnOAMxLgMjJiIOAQ8BDgIUFxQeAhc4AzEXBzgDMQ4DFQYUHgEfAR4CMjcyPgI3OAMxNxc4AzEeAzMWMj4BPwE+AjQnNC4CJwH7m5sBAQEBAQECAkkCBAQFAgEBAgEBm5sBAQIBAQIFBAQCSQICAQEBAQEBm5sBAQEBAQECAkkCBAQFAgEBAgEBm5sBAQIBAQIFBAQCSQICAQEBAQEBRZubAQECAQECBQQEAkkCAgEBAQEBAZubAQEBAQEBAgJJAgQEBQIBAQIBAZubAQECAQECBQQEAkkCAgEBAQEBAZubAQEBAQEBAgJJAgQEBQIBAQIBAQAAAAEAAAABAAAoDgB8Xw889QALAgAAAAAAzy5xzgAAAADPLnHO////3wIBAeAAAAAIAAIAAAAAAAAAAQAAAeD/4AAAAgD/////AgEAAQAAAAAAAAAAAAAAAAAAABIAAAAAAAAAAAAAAAABAAAAAgAAAAIAAAABsQAAAgD//wIAAG8CAAAAAgAAiwIAAGUCAABOAgAAFwIAAAoCAAAmAgAAAAIAAAEAAAAAAAoAFAAeAFIAoADgAdoB9AKCAqwDeAOEA5wDugPYBC4EvgAAAAEAAAASAL4ABQAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAOAK4AAQAAAAAAAQAWAAAAAQAAAAAAAgAOAGMAAQAAAAAAAwAWACwAAQAAAAAABAAWAHEAAQAAAAAABQAWABYAAQAAAAAABgALAEIAAQAAAAAACgAoAIcAAwABBAkAAQAWAAAAAwABBAkAAgAOAGMAAwABBAkAAwAWACwAAwABBAkABAAWAHEAAwABBAkABQAWABYAAwABBAkABgAWAE0AAwABBAkACgAoAIcAYwBlAGwAdAByAGEAaQBjAG8AbgBzAFYAZQByAHMAaQBvAG4AIAAxAC4AMABjAGUAbAB0AHIAYQBpAGMAbwBuAHNjZWx0cmFpY29ucwBjAGUAbAB0AHIAYQBpAGMAbwBuAHMAUgBlAGcAdQBsAGEAcgBjAGUAbAB0AHIAYQBpAGMAbwBuAHMARwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=");'," font-weight: normal;"," font-style: normal;","}",'[class^="celtra-icon-"], [class*=" celtra-icon-"] {',' font-family: "celtraicons";'," speak: none;"," font-style: normal;"," font-weight: normal;"," font-variant: normal;"," text-transform: none;"," line-height: 1;"," -webkit-font-smoothing: antialiased;"," -moz-osx-font-smoothing: grayscale;","}",'.celtra-icon-redo:before { content: "\\e600"; }','.celtra-icon-close:before { content: "\\e60d"; }','.celtra-icon-go-landscape:before { content: "\\e603"; }','.celtra-icon-twitter:before { content: "\\e605"; }','.celtra-icon-facebook:before { content: "\\e606"; }','.celtra-icon-phone:before { content: "\\e607"; }','.celtra-icon-play:before { content: "\\e608"; }','.celtra-icon-pause:before { content: "\\e609"; }','.celtra-icon-exit-full-screen:before { content: "\\e60a"; }','.celtra-icon-enter-full-screen:before { content: "\\e60b"; }','.celtra-icon-unmute:before { content: "\\e60c"; }','.celtra-icon-mute:before { content: "\\e601"; }','.celtra-icon-replay:before { content: "\\e602"; }','.celtra-icon-close2:before { content: "\\e604"; }',".spinner .center-button {"," display: none;","}",".web-audio .celtra-icon-mute, .web-audio .celtra-icon-unmute { color: red; }",""].join("\n");this.VideoPlayerCss=A}();;
!function(){{var t={};new Image}t.ZINDEX_MAX=2147483647,t.LANDSCAPE=1,t.PORTRAIT=2,t.ENDED=0,t.PLAYING=1,t.PAUSED=2,t.BUFFERING=3,t.VIDEO_CUED=5,t.UNSTARTED=6,t.SEEKING=7,t.STATE={0:"ENDED",1:"PLAYING",2:"PAUSED",3:"BUFFERING",5:"VIDEO_CUED",6:"UNSTARTED",7:"SEEKING"},t.TRUTHY_REGEX=/^(yes|true|1)$/i,t.isTruthy=function(e){return t.TRUTHY_REGEX.test(e)},t.isTouchDevice=!!("ontouchstart"in window),t.validFor=function(t,e,n){var r=Date.now()+e;return function(){Date.now()<=r&&t.apply(n||null,arguments)}},t.exists=function(t,e){return-1!==t.indexOf(e)},t.lastCall=0,t.deduplicate=function(e,n,r){return function(){Date.now()-t.lastCall>n&&(e.apply(r,arguments),t.lastCall=Date.now())}},t.isFunction=function(t){return"function"==typeof t},t.constantly=function(t){return function(){return t}},t.hash=function(){for(var t=Array.prototype.slice.apply(arguments),e=0,n=0;nn&&(n="0"+n),10>r&&(r="0"+r),n+":"+r},t.fitComponent=function(t,e,n,r,i){var o,a,l,s,c=1-n/r*(e/t)>0,u=!!i;return(u?!c:c)?(o=n,a=Math.ceil(e*(n/t)),l=0,s=r-a):(a=r,o=Math.ceil(t*(r/e)),l=n-o,s=0),{width:Math.ceil(o),height:Math.ceil(a),marginHorizontal:l>>1,marginVertical:s>>1}},t.removeUnits=function(t){return parseInt(t.replace(/[a-z]+/,""))},t.capitaliseFirstLetter=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},t.createHandlerName=function(e,n){return n=n||"on",n+t.capitaliseFirstLetter(e)},t.forEach=function(t,e,n){for(var r in t)e.call(n,t[r],r,t)},t.changeStyle=function(t,e,n){for(var r,i=0;i0&&"/"==o[o.length-1];var a=0===i?o.replace(/\/$/,""):o.replace(/^\//,"").replace(/\/$/,"");a&&e.push(a)}return e.join("/")+(r?"/":"")+(n?"?"+n:"")},t.xBindFactory=function(t){return function(e){var n=e.getAttribute("x-bind");n&&(t[n]=e,e.removeAttribute("x-bind"))}},t.createDom=function(t,e,n,r){function i(t){for(var e=t.children||[],n=0;ni;i++){var o=e.charCodeAt(i);r[i]=o}return r.buffer}}(),function(){this.StatefulEventEmitter={changeState:function(t){var e=this._state;this._state!=t&&(this._state=t,this.emit("statechange",t,e))},getState:function(){return this._state},isState:function(){var t=Array.prototype.slice.apply(arguments);return-1!==t.indexOf(this._state)}},extend(this.StatefulEventEmitter,EventEmitter)}(),function(){function t(t,o,a){this.intervalId=null,this.containerEl=null,this.externalResize=noop,this.lastWidth=0,this.lastHeight=0,this.lastScrollX=0,this.lastScrollY=0,this.doc=t.ownerDocument,this.win="defaultView"in this.doc?this.doc.defaultView:this.doc.parentWindow,this.initialHostOffset={left:this.win.pageXOffset||document.documentElement.scrollLeft,top:this.win.pageYOffset||document.documentElement.scrollTop},this.containerEl=t;var l=this.containerEl.style;l.position=a?"fixed":"absolute",l.zIndex=CeltraPlayerUtils.ZINDEX_MAX-1,l.width="100%",l.height="100%",l.left="0px",l.top="0px",o||(l.background="#000"),this.containerEl.addEventListener("touchmove",r),this.containerEl.addEventListener("touchstart",r),this.win.document.body.appendChild(this.containerEl),this.resize=n.bind(this),this.tick=e.bind(this),this.intervalId=setInterval(this.tick,i),new Tapper(t)}function e(){window===("undefined"==typeof adapter?creative.adapter:adapter).getTopWindow()&&(this.containerEl.style.width="100%",this.containerEl.style.height="100%");var t=Math.max(this.win.document.documentElement.clientWidth,this.win.innerWidth||0),e=Math.max(this.win.document.documentElement.clientHeight,this.win.innerHeight||0);(this.lastWidth!==t||this.lastHeight!==e||ios("7")&&o)&&(this.lastWidth=t,this.lastHeight=e,defer(this.resize))}function n(){var t=this.containerEl.style;t.width=this.lastWidth+"px",t.height=this.lastHeight+"px",t.zIndex=CeltraPlayerUtils.ZINDEX_MAX,this.emit("resize",{width:this.lastWidth,height:this.lastHeight,scrollX:this.lastScrollX,scrollY:this.lastScrollY})}function r(t){var e=void 0!=typeof adapter?adapter:creative.adapter;"touchstart"==t.type&&e.useNativeClickForTapDetection||t.preventDefault(),t.stopPropagation()}var i=60,o=-1!==navigator.userAgent.indexOf("Safari")&&-1===navigator.userAgent.indexOf("CriOS");extend(t.prototype,EventEmitter),t.prototype.getElement=function(){return this.containerEl},t.prototype.destroy=function(){this.containerEl&&(this.containerEl.removeEventListener("touchmove",r),this.containerEl.removeEventListener("touchstart",r),clearInterval(this.intervalId),this.containerEl.innerHTML="")},window.FullScreenHandler=t}();;
!function(){var e={startMuted:!1,preload:!1,from:null,to:null,blobHash:null,hasAudio:!0,customUrlParameters:{},forceMPEG4Video:!1,forceMPEG1Video:!1},r=CeltraPlayerUtils.composeUrl,i=CeltraPlayerUtils.filterObject,o=CeltraPlayerUtils.getUrl;VideoEngineProvider={};var n=function(){return deviceInfo.deviceType.desktop()||deviceInfo.os.ios("10",null)&&!deviceInfo.browser.chrome(null,"64")||deviceInfo.os.android()&&deviceInfo.browser.chrome("53",null)&&!deviceInfo.browser.samsung()||deviceInfo.os.android()&&deviceInfo.browser.samsung("6.4",null)},t=function(r,i){var o=merge(e,i);"1"==o.campaignExplorer&&(o.startMuted=!0);var n=d(r,o),t={inUserInitiatedThread:r,startMuted:o.startMuted};return"jsVideo"==n?merge(s(o),t):merge(a(o,r),t)},d=function(e,r){return r.forceMPEG4Video?"html5":r.forceMPEG1Video?"jsVideo":n()||e?"html5":"jsVideo"},s=function(e){var r="mpeg1SHQVideo",i="mpeg1";return{clazz:"JsVideoEngine",preset:r,engineType:i,file:"video.avi",doAVSync:e.hasAudio&&!e.isTeaser,isTeaser:e.isTeaser,preload:e.preload,options:{}}},a=function(e,r){var i=e.isMasterVideo,o=deviceInfo.deviceType.desktop()&&deviceInfo.browser.firefox()&&!e.isSnapchatFormat,n=o?{prefix:"webm",extension:"webm"}:{prefix:"mpeg4",extension:"mp4"},t="HQ";i?t=deviceInfo.deviceType.desktop()&&!e.capStreamAtHQPlus?"HD":deviceInfo.browser.firefox()?"HQ":"HQPlus":e.isSnapchatFormat?t="HQPlus":!deviceInfo.deviceType.desktop()&&!e.isVideo360||e.isTeaser||(t=deviceInfo.browser.firefox()?"HQ":"HQPlus");var d=n.prefix+t,s=!deviceInfo.deviceType.desktop()&&e.isVideo360&&r&&!e.startMuted,a=deviceInfo.os.ios(null,"10")&&e.isVideo360;return{clazz:a?"CrossOriginHtml5VideoEngine":"Html5VideoEngine",preset:d,engineType:"html5",file:"video."+n.extension,doAVSync:s,isTeaser:e.isTeaser,preload:e.preload,crossOrigin:!0,options:{}}},c=function(e,i){var n=e.doAVSync||e.isTeaser,t=f(e.preset,n,i);return r(o("cachedApi"),"videoStream",i.blobHash,e.preset,e.file,t)};AudioEngineProvider={};var u=function(e){if(!e.doAVSync)return null;var r=p()?"WebAudioEngine":"Html5AudioEngine";return{clazz:r,preload:e.preload}},l=function(e){var i={preset:"aacAudio",file:"audio.m4v"};return r(o("cachedApi"),"videoStream",e.blobHash,i.preset,i.file,e?v(i.preset,e):{})},f=function(e,r,o){return i(merge({from:o.from,to:o.to,muted:r?"1":null,transform:"VideoStream",celtraCacheBust:m(e)},o.customUrlParameters))},v=function(e,r){return i(merge({from:r.from,to:r.to,transfom:"VideoStream",celtraCacheBust:m(e)},r.customUrlParameters))},p=function(){return"undefined"!=typeof AudioContext||"undefined"!=typeof webkitAudioContext},m=function(e){if("undefined"!=typeof creative){var r=creative.videoStreamAlgoVersions[e];return creative.version+(r?"-"+r:"")}return null};VideoEngineProvider.createVideoEngineSpec=t,VideoEngineProvider.createVideoUrl=c,window.VideoEngineProvider=VideoEngineProvider,AudioEngineProvider.createAudioEngineSpec=u,AudioEngineProvider.createAudioUrl=l,window.AudioEngineProvider=AudioEngineProvider}();;
!function(){function e(){videoEventsAdapter=null,s=null,n=null,d=!1,o=null}function t(){videoEventsAdapter&&(videoEventsAdapter.destroy(),videoEventsAdapter=null),s&&(s.destroy(),o.destroy(),e())}var n,o,r,i={fsvp:{attachment:"body",positioning:"screen",type:"layer"}},a=function(){},l={},s=null,d=!1,c=null;a.init=function(t){e(),l=merge({hideControls:!1,controlsHidden:!1,baseUrl:urls.staticUrl+"runner/FullscreenVideoPlayer/",muteUnmuteEnabled:!((ios("9")||ios("8"))&&tablet())},t||{}),adapter.createPlacements(i,function(){c=adapter.placements.fsvp})},a.play=function(e,r){adapter._stopAllMedia("toPlayVideo"),t();var i=function(){return{clazz:"Html5VideoEngine",engineType:"html5",videoUrl:e.url,doAVSync:!1,options:{}}};d=!1,o=new FullScreenHandler(c.getContainer(),!1,android("4","5")&&!l.forceAbsolutePositioning),n=r;try{var u=parseFloat(e.file.meta.duration)}catch(f){var u=null}e.file.meta&&(l.muteUnmuteEnabled=l.muteUnmuteEnabled&&e.file.meta.hasAudio);var p=function(e){return new BasicVideoControls(e)},m={autoplay:!1,baseUrl:l.baseUrl,closeFSOnEnd:!0,fullscreenMode:"permanent",autohideTime:3,duration:u};e.file.meta&&(m.videoWidth=e.file.meta.width,m.videoHeight=e.file.meta.height),s=new VideoPlayer(o.getElement(),i,function(e,t){var n=new BasicVideoControlsController(e,p,extend(l,t));return n.on("playButtonPressed",function(){s.play()}.bind(this)),n},function(){return!0},m);var v=s.createSpecs(!0,!1);s.initialize(v),a.attachListeners(r),videoEventsAdapter=new VideoEventsAdapter(s),e.registerSource(videoEventsAdapter),s.on("userInteraction",function(){e.trackUserInteraction()}),c.setPosition(0,0),c.show(),s.play(),s.redraw()},a.attachListeners=function(e){r=CeltraPlayerUtils.idempotented(function(){e(d)}),s.on("timeupdate",a.onTimeUpdate),s.on("close",a.close),s.on("ended",a.close),s.on("error",a.close),s.on("exitfullscreen",a.close),adapter.once("dismissed",a.close),adapter.once("collapsed",a.close),adapter.on("orientationchange",a.refresh),adapter.on("resize",a.refresh),adapter.once("mediaStopRequested",a.close)},a.removeListeners=function(){s.off("timeupdate",a.onTimeUpdate),s.off("close",a.close),s.off("ended",a.close),s.off("error",a.close),s.off("exitfullscreen",a.close),adapter.off("dismissed",a.close),adapter.off("collapsed",a.close),adapter.off("orientationchange",a.refresh),adapter.off("resize",a.refresh),adapter.off("mediaStopRequested",a.close)},a.onTimeUpdate=function(){s.currentTime>.5&&(d=!0)},a.refresh=function(){s.redraw()},a.close=function(){null!==s&&(c.hide(),a.removeListeners(),s.pause(),s.hide(),r(),defer(t,"undefined"!=typeof ADMARVEL?1e3:100))},window.FullscreenVideoPlayer=a}();;
!function(){function e(e,t,n){e.setAttribute("x-celtra-media",""),n.playsInline&&(e.setAttribute("webkit-playsinline",""),e.setAttribute("playsinline",""),n.startMuted&&(e.muted=!0)),n.crossOrigin&&(e.crossOrigin="anonymous"),e.src=t,e.preload=n.preload?"auto":"none"}var t=function(t,n){var r={playsInline:!1,maxTimeupdatesPerSecond:15},i=merge({},r,n.options);i.startMuted=!!n.startMuted,i.crossOrigin=!!n.crossOrigin;var u=!1,o=i.videoElement,a=!!o,d=a?o:document.createElement("video");e(d,t,i);var s={};extend(s,EventEmitter),s.startMuted=i.startMuted;for(var c=function(e){s.emit(e.type,e)}.bind(this),m=["loadedmetadata","durationchange","progress","canplay","play","playing","pause","ended","buffering","endbuffering","muted","unmuted","seeking","seeked","exitfullscreen","webkitendfullscreen","error","canunmute","custominfo","playersourceloading"],l=m.length-1;l>=0;l--)d.addEventListener(m[l],c);var f=d.volume,g=function(){f!==d.volume&&(f=d.volume,s.emit("volumechange",f))},p=0,v=0,y=function(){var e=s.currentTime,t=v%Math.round(60/i.maxTimeupdatesPerSecond)===0;t&&s.isPlaying&e!==p&&(p=e,s.emit("timeupdate",e)),v++};Ticker.frame(g),Ticker.frame(y),d.addEventListener("playing",function k(){u=!0,d.muted=s.startMuted,d.removeEventListener("playing",k)},!1),Object.defineProperties(s,{currentTime:{get:function(){return this.getCurrentTime()},set:function(e){this.setCurrentTime(e)}},reportsSeeking:{get:function(){return!!d.reportsSeeking}},buffered:{get:function(){return d.buffered}},duration:{get:function(){return d.duration}},muted:{get:function(){return d.muted},set:function(e){d.muted=e}},isPlaying:{get:function(){return!(!(this.getCurrentTime()>0)||d.paused||d.ended)}},paused:{get:function(){return d.paused}}}),a||(d.videoWidth=i.videoWidth,d.videoHeight=i.videoHeight),s.continuePlaying=function(){d.play()}.bind(this),s.render=function(){!a&&android("4.0","4.2")&&(d.style.height="auto",d.style.minHeight="auto");try{d.load()}catch(e){}return d};var h=d.play?d.play.bind(d):noop,b=d.pause?d.pause.bind(d):noop,E=!0,T=function(){var e=h();void 0!==e&&e["catch"](function(e){s.emit("autoplayrejected"),("NotAllowedError"===e.name||"AbortError"===e.name)&&(Logger("Html5VideoEngine").error("Video Engine - ",e),s.startMuted=!0,d.muted=!0,s.emit("forcemuted"),E&&(E=!1,T()))})};return s.mute=function(){u?d.muted=!0:s.startMuted=!0},s.unMute=function(){u?d.muted=!1:s.startMuted=!1},s.setCurrentTime=function(e){s.isReady()&&(d.currentTime=e)},s.getCurrentTime=function(){return s.isReady()&&d.currentTime>0?d.currentTime:0},s.isReady=function(){return d&&0!==d.readyState},s.play=function(){celtra.webkit("534.30")||celtra.webkit("537.36")||fakeclick(function(){T()}.bind(this)),defer(function(){T()}.bind(this)),CeltraPlayerUtils.isNode(d)&&d.addEventListener("progress",d.continuePlaying)},s.pause=function(){CeltraPlayerUtils.isNode(d)&&d.removeEventListener("progress",d.continuePlaying,{},{}),b()},s.destroy=function(){b();for(var e=m.length-1;e>=0;e--)d.removeEventListener(m[e],c);a||CeltraPlayerUtils.removeElements(d),Ticker.removeFrame(g),Ticker.removeFrame(y)},s};this.Html5VideoEngine=t}();;
!function(e){function t(e,t,s){return Object.create(i).init(e,t,!!s)}var i=Object.create(EventEmitter),s=window.AudioContext||window.webkitAudioContext,o=null,n=!1,u=!1;extend(i,{init:function(e,t,i){return this._sourceNode=null,this._buffer=null,this._bufferSilence=null,this._encodedBuffer=null,this._emitTimeUpdateInterval=null,this._sourceUrl=e,this._paused=!0,this._pausedAt=0,this._timeDiff=0,this._loadStatus="unstarted",this.loop=!!i,t&&this.load(),this},load:function(){if("unstarted"===this._loadStatus){this._loadStatus="pending";var e=new XMLHttpRequest;e.open("GET",this._sourceUrl,!0),e.responseType="arraybuffer",e.onload=function(){this._encodedBuffer=e.response,o&&this._decodeAudioData()}.bind(this),e.send()}},unlock:function(){n||(this._iosHack(),this._createAudioContext(),this._createNodeAndPlayFrom(this._bufferSilence,0,this.loop))},playAudio:function(e){this._iosHack(),this._createAudioContext(),this.load();var e=null==e?this._pausedAt:e;this.pause(),this._timeDiff=o.currentTime-e,this._paused=!this._buffer,this._createNodeAndPlayFrom(this._buffer||this._bufferSilence,e,this.loop),this._emitTimeUpdate(),n||setTimeout(function(){if(this._sourceNode){var e=this._sourceNode.playbackState===this._sourceNode.PLAYING_STATE,t=this._sourceNode.playbackState===this._sourceNode.FINISHED_STATE,i=e||t;n=n||!!this._buffer&&i}}.bind(this),0)},pause:function(){clearInterval(this._emitTimeUpdateInterval),this._pausedAt=this.currentTime,this._paused=!0,this._clearSourceNode()},destroy:function(){this.pause(),"function"==typeof o.close&&o.close(),this._sourceNode=null,this._buffer=null,this._bufferSilence=null,this._encodedBuffer=null},_iosHack:function(){ios()&&!u&&(this._createAudioContext(),this._createNodeAndPlayFrom(this._bufferSilence,0,this.loop),"function"==typeof o.close&&(o.close(),o=null),this._createAudioContext(),u=!0)},_createAudioContext:function(){o||(o=new s,this._bufferSilence=o.createBuffer(1,1,o.sampleRate),this._encodedBuffer&&!this._buffer&&this._decodeAudioData())},_createNodeAndPlayFrom:function(e,t,i){this._clearSourceNode(),this._sourceNode=o.createBufferSource(),this._sourceNode.connect(o.destination),this._sourceNode.buffer=e,this._sourceNode.loop=i,"function"==typeof this._sourceNode.noteGrainOn?this._sourceNode.noteGrainOn(0,t,e.duration-t):"function"==typeof this._sourceNode.start?this._sourceNode.start(0,t):this._sourceNode.noteOn(0,t)},_clearSourceNode:function(){if(this._sourceNode){try{"function"==typeof this._sourceNode.stop?this._sourceNode.stop(0):this._sourceNode.noteOff(0)}catch(e){}this._sourceNode.disconnect(),this._sourceNode=null}},_emitTimeUpdate:function(){this.paused||this._buffer&&this.currentTime>=this._buffer.duration?clearInterval(this._emitTimeUpdateInterval):this._emitTimeUpdateInterval=setInterval(this.emit.bind(this,"timeupdate"),250)},_decodeAudioData:function(){o.decodeAudioData(this._encodedBuffer,function(e){this._buffer=e,this._loadStatus="loaded",this.emit("canplay"),this.emit("canplaythrough")}.bind(this))}}),Object.defineProperties(i,{paused:{get:function(){return this._paused}},ended:{get:function(){return!1}},ready:{get:function(){return"loaded"===this._loadStatus}},playedBefore:{get:function(){return n}},currentTime:{get:function(){return this._paused?this._pausedAt:o.currentTime-this._timeDiff},set:function(e){this._pausedAt=e,"loaded"!==this._loadStatus||this._paused||(this.pause(),this.playAudio(e))}}}),e.WebAudioEngine=t}(this);;
!function(){var e=.3,n=function(n,t){if("undefined"==typeof Audio)return null;var r=new Audio;r.isUnlocked=!1,t?(r.preload="auto",r.src=n,r.start=noop):(r.preload="none",r.start=function(){r.src=n,r.start=noop}),r.ready=!1;var o=function(){r.ready=!0},i=function(){r.buffered/r.duration>e&&o()};return r.addEventListener("canplay",o),r.addEventListener("canplaythrough",o),r.addEventListener("progress",i),r.unlock=noop,r.on=r.addEventListener,r.off=r.removeEventListener,r.playedBefore=!1,r.unlock=function(){this.isUnlocked||this.playedBefore||(fakeclick(function(){celtra.webkit("537.36")&&r.play(),r.pause()}),this.isUnlocked=!0)},r.playFrom=function(e){r.start(),r.ready&&(fakeclick(function(){r.play()}),void 0!==e&&(r.currentTime=e,r.playedBefore=!0))},r.destroy=function(){this.pause(),this.src=null,r.removeEventListener("progress",i),r.removeEventListener("canplay",o),r.removeEventListener("canplaythrough",o)},r.setAttribute("x-celtra-media",""),r};this.Html5AudioEngine=n}();;
!function(){var i=120,t=.6,e=1,s=3e3,o=2,d={init:function(i,t,e){this.onPause=this.onPause.bind(this),this.onEnded=this.onEnded.bind(this),this.onPlay=this.onPlay.bind(this),this.onReplayed=this.onReplayed.bind(this),this.onMuted=this.onMuted.bind(this),this.onUnMuted=this.onUnMuted.bind(this),this.onTimeUpdate=this.onTimeUpdate.bind(this),this.onFirstPlay=this.onFirstPlay.bind(this),this.destroy=this.destroy.bind(this),this.video=i,this.audio=t,this.muted=e,this._lastSyncTime=0,this.video.once("destroy",this.destroy),this.video.once("userplayed",this.onFirstPlay),this.video.on("muted",this.onMuted),this.video.on("unmuted",this.onUnMuted),this.video.on("replayed",this.onReplayed)},attach:function(){this.video.on("pause",this.onPause),this.video.on("ended",this.onEnded),this.video.on("userpaused",this.onPause),this.video.on("seeking",this.onPause),this.video.on("play",this.onPlay),this.video.on("playing",this.onPlay),this.video.on("seeked",this.onPlay),this.video.on("timeupdate",this.onTimeUpdate)},destroy:function(){this.audio.pause(),this.video.off("userplayed",this.onFirstPlayed),this.video.off("userpaused",this.onPause),this.video.off("pause",this.onPause),this.video.off("seeking",this.onPause),this.video.off("ended",this.onEnded),this.video.off("play",this.onPlay),this.video.off("playing",this.onPlay),this.video.off("seeked",this.onPlay),this.video.off("muted",this.onMuted),this.video.off("unmuted",this.onUnMuted),this.video.off("timeupdate",this.onTimeUpdate),this.video.off("replayed",this.onReplayed)},onFirstPlay:function(){if(this.video.off("userplayed",this.onFirstPlay),this.audio.start(),this.muted||this.audio.ready)fakeclick(function(){this.audio.load()}.bind(this)),this.attach();else{var t=!1,e=!1,s=celtra.webkit("534.30"),o=function(){var d=isMediaPlaying(this.video),n=isMediaPlaying(this.audio);if(n&&d||n&&e||d&&t||t&&e||this.audio.ready){this.attach(),this.video.silentPlay();try{this.video.currentTime=this.audio.currentTime}catch(h){}}else d&&!n&&(this.video.silentPause(),e=!0),!n||d||s||(this.audio.pause(),t=!0),defer(o.bind(this),i)}.bind(this);s?this.audio.playFrom():fakeclick(function(){this.audio.load()}.bind(this)),defer(o,500)}},onPause:function(){this.audio.pause()},onEnded:function(){this.audio.pause(),this.audio.ready&&(this.audio.currentTime=0)},onPlay:function(){this.muted||this.audio.playFrom()},onReplayed:function(){this.muted||(this.audio.playFrom(0),this._lastSyncTime=Date.now())},onMuted:function(){this.muted=!0,this.audio.pause()},onUnMuted:function(){this.muted=!1,isMediaPlaying(this.video)&&this.audio.ready?this.audio.playFrom(this.video.currentTime):this.audio.unlock()},onTimeUpdate:function(){var i=isMediaPlaying(this.audio);if(!(!i&&this.audio.playedBefore||this.muted)){if(this.audio.paused&&!this.muted&&!this.video.paused)return void this.audio.playFrom(this.video.currentTime);var d=this.video.currentTime-this.audio.currentTime,n=Math.abs(d);if(!(t>n||this.video.currentTimed&&o>n)try{this.video.currentTime=this.audio.currentTime}catch(h){}else try{this.audio.currentTime=this.video.currentTime+t/2}catch(h){}}}};this.AVSyncAudio=d}();;
!function(){var i=.6,t=1,e=3e3,s=2,o={init:function(i,t,e){this.onPause=this.onPause.bind(this),this.onEnded=this.onEnded.bind(this),this.onMuted=this.onMuted.bind(this),this.onUnMuted=this.onUnMuted.bind(this),this.onTimeUpdate=this.onTimeUpdate.bind(this),this.onFirstPlay=this.onFirstPlay.bind(this),this.destroy=this.destroy.bind(this),this.video=i,this.audio=t,this.muted=e,this._lastSyncTime=0,i.once("destroy",this.destroy),i.once("userplayed",this.onFirstPlay),this.video.on("muted",this.onMuted),this.video.on("unmuted",this.onUnMuted)},attach:function(){this.video.on("pause",this.onPause),this.video.on("ended",this.onEnded),this.video.on("userpaused",this.onPause),this.video.on("seeking",this.onPause),this.video.on("timeupdate",this.onTimeUpdate)},destroy:function(){this.audio.pause(),this.video.off("userplayed",this.onFirstPlayed),this.video.off("pause",this.onPause),this.video.off("userpaused",this.onPause),this.video.off("seeking",this.onPause),this.video.off("ended",this.onEnded),this.video.off("muted",this.onMuted),this.video.off("unmuted",this.onUnMuted),this.video.off("timeupdate",this.onTimeUpdate)},onFirstPlay:function(){this.video.off("userplayed",this.onFirstPlay);var i=!0,t=this.video,e=celtra.webkit("534.30"),s=function(){i&&!e&&t.silentPause()};this.muted||this.audio.ready?(this.audio.load(),this.attach()):(this.video.once("canplay",s),this.video.once("playing",s),this.video.once("timeupdate",s),this.audio.once("canplaythrough",function(){i=!1,this.video.off("canplay",s),this.video.off("playing",s),this.video.off("timeupdate",s),isMediaPlaying(this.video)||this.video.silentPlay(),!isMediaPlaying(this.audio)&&android()&&this.audio.playAudio(),this.attach()}.bind(this)),this.audio.load())},onPause:function(){this.audio.pause()},onEnded:function(){this.audio.pause(),this.audio.currentTime=0},onMuted:function(){this.muted=!0,this.audio.pause()},onUnMuted:function(){this.muted=!1,isMediaPlaying(this.video)?this.audio.playAudio(this.video.currentTime):this.audio.unlock()},onTimeUpdate:function(){if(!this.muted){if(this.audio.paused&&!this.video.paused)return void this.audio.playAudio(this.video.currentTime);var o=this.video.currentTime-this.audio.currentTime,d=Math.abs(o);if(!(i>d||this.video.currentTimeo&&s>d)try{this.video.currentTime=this.audio.currentTime}catch(n){}else try{this.audio.currentTime=this.video.currentTime}catch(n){}}}};this.AVSyncWebAudio=o}();;
!function(){var e=function(i,t,s){this._videoPlayer=i,this._opts=merge({},e.DEFAULTS,s),this.isVisible=!1,this._controlsInitiallyDisabled=!1,this._isFirstPlay=!0,this._playAfterSeeking=!1,this._isMuted=!1,this._spinnerShown=!0,this._cursorHidden=!1,CeltraPlayerUtils.attachHandlers(this,this._videoPlayer,e.PLAYER_EVENTS,!0),this._changeVisibility=this._changeVisibility.bind(this),this.handleUserInteraction=this.handleUserInteraction.bind(this),this._videoControls=t(this.handleUserInteraction)};extend(e.prototype,EventEmitter),e.DEFAULTS={autohideTime:0,progressbar:!0,progressbarColour:"#4589ce",startInFullScreen:!1,controlsHidden:!1,fullscreenMode:"both",minLengthToSeek:30,muteUnmuteEnabled:!0},e.PLAYER_EVENTS={durationchange:"onVPDurationChange",muted:"onVPMuted",unmuted:"onVPUnmuted",progress:"onVPProgress",play:"onVPPlay",playing:"onVPPlaying",pause:"onVPPause",autoplayrejected:"onVPAutoplayRejected",forcemuted:"onVPForceMuted",ended:"onVPEnded",buffering:"onVPBuffering",timeupdate:"onVPTimeupdate",seekto:"onVPSeekto",enterfullscreen:"onVPEnterFullscreen",exitfullscreen:"onVPExitFullscreen",orientationchange:"onVPOrientationChange",canunmute:"onVPCanUnmute",playersourceloading:"onVPPlayerSourceLoading"},extend(e.prototype,{render:function(e){var i=this._videoControls.render(e,this._opts);return this.init(),i},init:function(){this._changeVisibilityTimed(!1),this._opts.progressbar||this._videoControls.hide("sliderContainer"),"permanent"===this._opts.fullscreenMode?(this._videoControls.hide("enterFullScreen","exitFullScreen"),this._videoControls.show("close")):this._videoPlayer.isDesktop===!0&&this._videoPlayer.dtCanFullscreen===!1?this._videoControls.hide("close","enterFullScreen","exitFullScreen"):(this._videoControls.hide("close","exitFullScreen"),this._videoControls.show("enterFullScreen")),"disabled"===this._opts.fullscreenMode&&this._videoControls.hide("enterFullScreen","exitFullScreen","close"),this._opts.debug?this._videoControls.show("monitor"):this._videoControls.hide("monitor"),this._opts.muteUnmuteEnabled?(this._videoControls.hide("mute"),this._videoControls.hide("unMute")):this._videoControls.disableMuteUnmuteControls(),this._videoControls.hide("pause","replay","play"),this._opts.isAutoplay||this._videoControls.show("play"),this._spinnerHide(),this._videoPlayer.isDesktop&&this._videoControls.setDTMouseMoveHandler(this._videoPlayer.getWrapperElement())},adjustSizes:function(e){80>e?this._videoControls.addClass("spinner","video-player-spinner-small"):this._videoControls.addClass("spinner","video-player-spinner-big")},reset:function(){this._controlsInitiallyDisabled=!1,this._videoControls.hide("pause","replay"),this._videoControls.show("play"),this._spinnerHide(),defer(function(){this._videoControls.hide("duringPlaySet")}.bind(this),500)},destroy:function(){this._videoControls.destroy()},handleUserInteraction:function(e,i){switch(e){case"vidWrapper":this._changeVisibilityTimed(!0),this._makeControlsDisapear();break;case"wrapper":if(this._videoPlayer._spinnerShown)return void this._changeVisibilityTimed(!0);!this.isVisible||this._videoPlayer.ended||this._spinnerShown||i?this._changeVisibilityTimed(!0):this._videoPlayer.paused?(this._videoPlayer.play(),this.emit("userInteraction",{isUserEngaged:!0})):(this._videoPlayer.pause(),this.emit("userInteraction")),this._makeControlsDisapear();break;case"mute":this._videoPlayer.mute(),this._videoControls.pendingStateOn("mute"),this._makeControlsDisapear(),this.emit("userInteraction");break;case"unMute":this._videoPlayer.unMute(),this._videoControls.pendingStateOn("unMute"),this._makeControlsDisapear(),this.emit("userInteraction",{isUserEngaged:!0});break;case"enterFullScreen":this._videoPlayer.enterFullScreen(),this._makeControlsDisapear(),this.emit("userInteraction",{isUserEngaged:!0});break;case"exitFullScreen":this._videoPlayer.exitFullScreen(),this._makeControlsDisapear(),this.emit("userInteraction");break;case"pause":if(this._controlsInitiallyDisabled)return;this._videoPlayer.pause(),this.emit("userInteraction");break;case"play":if(this._controlsInitiallyDisabled)return;this.emit("userInteraction",{isUserEngaged:!0}),this.emit("playButtonPressed");break;case"replay":this._changeVisibilityTimed(!1),this._videoPlayer.replay(),this.emit("userInteraction",{isUserEngaged:!0});break;case"close":this._videoPlayer.close(),this.emit("userInteraction")}},onVPPlayerSourceLoading:function(){this._spinnerShow()},onVPCanUnmute:function(){},onVPMuted:function(){this._isMuted=!0,this._videoControls.hide("mute"),this._videoControls.show("unMute"),this._videoControls.pendingStateOff("unMute"),this._videoControls.pendingStateOff("mute")},onVPUnmuted:function(){this._isMuted=!1,this._videoControls.hide("unMute"),this._videoControls.show("mute"),this._videoControls.pendingStateOff("unMute"),this._videoControls.pendingStateOff("mute")},onVPPlay:function(){this._videoControls.hideAndShowWrapper(),this._isFirstPlay&&(this._isFirstPlay=!1,this._controlsInitiallyDisabled=!0,this._spinnerShow()),this._changeVisibility(!0),this._videoControls.hide("play")},onVPPlaying:function(){var e=this._opts.autohideTime;this._videoControls.hide("play","pause","replay"),e&&this._changeVisibilityTimed(!1,1e3*e)},onVPPause:function(){this._changeVisibilityTimed(!0),this._spinnerShown||this._videoControls.show("play")},onVPAutoplayRejected:function(){this.reset()},onVPForceMuted:function(){this.onVPMuted()},onVPBuffering:function(){this._spinnerShow(),this._videoControls.hide("play")},onVPEnded:function(){this._changeVisibilityTimed(!1),this._videoControls.hide("play","pause"),this._opts.pauseOnEnd||this._videoControls.show("replay")},onVPProgress:function(e){this._progressRatio=e,this._videoControls.setProgressBarWidth(e)},onVPTimeupdate:function(e){var i=this._videoPlayer.duration,t=i&&e/i||0;this._videoControls.setTimeBarWidth(t),this._controlsInitiallyDisabled&&(this._controlsInitiallyDisabled=!1),this._videoPlayer.paused||(this._videoControls.hide("play"),this._videoControls.hide("pause"),this._videoControls.hide("replay")),this._spinnerHide()},onVPEnterFullscreen:function(){this._videoControls.hideAndShowWrapper(),this._videoControls.hide("enterFullScreen"),this._videoControls.show("exitFullScreen"),this._makeControlsDisapear()},onVPOrientationChange:function(){this._opts.fullscreenLandscapeButtonsHack&&this._videoControls.orientationChange(function(e){this._elements.close.style.bottom=this._elements.exitFullScreen.style.bottom=this._elements.mute.style.bottom=this._elements.unMute.style.bottom=e===CeltraPlayerUtils.LANDSCAPE&&this._videoPlayer.isFullScreen?"26px":""})},onVPExitFullscreen:function(){this._videoControls.hideAndShowWrapper(),this._videoControls.hide("exitFullScreen"),this._videoControls.show("enterFullScreen"),this._makeControlsDisapear()},onVPSeekto:function(e){this._videoControls.setTimeBarWidth(e)},_changeVisibility:function(e){return this._opts.controlsHidden?(this.isVisible=!0,void this._videoControls.hide("duringPlaySet")):void(e?(this._videoControls.show("duringPlaySet"),this._videoPlayer.isDesktop&&this._cursorHidden&&(this._videoControls.showCursor(this._videoPlayer.getWrapperElement()),this._cursorHidden=!1),this.isVisible=!0):(this._videoControls.hide("duringPlaySet"),this._videoPlayer.isDesktop&&this._videoPlayer.isFullScreen&&(this._videoControls.hideCursor(this._videoPlayer.getWrapperElement()),this._cursorHidden=!0),this.isVisible=!1,this._videoPlayer.isDesktop&&(this._videoControls.hasMouseMoved=!0)))},_changeVisibilityTimed:function(e,i){clearTimeout(this._changeVisibilityTimeout),i?this._changeVisibilityTimeout=setTimeout(this._changeVisibility.bind(this,e),i):this._changeVisibility(e)},_makeControlsDisapear:function(){var e=this._opts.autohideTime;e&&this._changeVisibilityTimed(!1,1e3*e)},_spinnerHide:function(){this._spinnerShown&&(this._spinnerShown=!1,this._videoControls.hide("spinner"))},_spinnerShow:function(){!this._spinnerShown&&this._opts.canShowSpinner&&(this._spinnerShown=!0,defer(function(){this._spinnerShown&&(this._videoControls.hide("play"),this._videoControls.show("spinner"))}.bind(this),300))}}),this.BasicVideoControlsController=e}();;
!function(){var t="50px",e=function(t){this._container=null,this._userInteractionHandler=t,this.onTapHandler=CeltraPlayerUtils.deduplicate(this.onTapHandler,400,this),this.hasMouseMoved=!1};extend(e.prototype,EventEmitter),e.TEMPLATE=['','
','
','
','
','
','
','
","
",'
","
"],extend(e.prototype,{render:function(i,n){var o=n.isMasterVideo?[]:["play","replay"];if(!this._container){var a={};CeltraPlayerUtils.createDom(i,e.TEMPLATE,{desktop:windows("10")?"video-controls-desktop ie-click-event":desktop()?"video-controls-desktop":""},this._getWrapper(a)),this._container=a.wrapper,n.isMasterVideo&&this.hide("outOfPlaySet"),this._container.querySelector("[data-bind=progressBar]").style.backgroundColor=n.progressbarColour,this._container.querySelector("[data-bind=timeBar]").style.backgroundColor=n.progressbarColour;var r="undefined"!=typeof creative?creative:window.creative;if(r){var s="MRAIDAdapter"===r.adapter.constructor.name;"crop"===n.fitting&&s&&(this._container.querySelector("[data-bind=exitFullScreen]").style.top=t)}o.forEach(function(t){if(n[t]){var e=n[t],i=this._getElements(t)[0];removeClass(i,"center-button"),addClass(i,"custom-button"),i.innerHTML=''}}.bind(this)),this._container.addEventListener("tap",this.onTapHandler)}return this._container},show:function(){CeltraPlayerUtils.show.apply(null,this._getElements.apply(this,arguments))},hide:function(){CeltraPlayerUtils.hide.apply(null,this._getElements.apply(this,arguments))},showCursor:function(t){CeltraPlayerUtils.showCursor([t])},hideCursor:function(t){CeltraPlayerUtils.hideCursor([t])},setProgressBarWidth:function(t){t=Math.min(t,1),this._container&&this._container.querySelector("[data-bind=progressBar]")&&(this._container.querySelector("[data-bind=progressBar]").style.width=100*t+"%")},setTimeBarWidth:function(t){t=Math.min(t,1),this._container&&this._container.querySelector("[data-bind=timeBar]")&&(this._container.querySelector("[data-bind=timeBar]").style.width=100*t+"%")},hideAndShowWrapper:function(){this.hide("wrapper"),defer(function(){this.show("wrapper")}.bind(this))},disableMuteUnmuteControls:function(){this._getElements("mute")[0].innerHTML="",this._getElements("unMute")[0].innerHTML=""},pendingStateOn:function(t){addClass(this._getElements(t)[0],"video-controls-pending")},pendingStateOff:function(t){this._container&&removeClass(this._getElements(t)[0],"video-controls-pending")},addClass:function(t,e){var i=this._getElements(t)[0];i&&addClass(i,e)},removeClass:function(t,e){var i=this._getElements(t)[0];i&&removeClass(i,e)},orientationChange:function(t){t()},onTapHandler:function(t){t.stopPropagation();var e=t.target.getAttribute("data-bind");e&&this._userInteractionHandler(e)},setDTMouseMoveHandler:function(t){t.addEventListener("mousemove",function(e){e.stopPropagation();var i=e.target,n=i!==t?i.getAttribute("data-bind"):"vidWrapper";this.hasMouseMoved?this.hasMouseMoved=!1:("wrapper"===n||"vidWrapper"===n)&&this._userInteractionHandler(n,!0)}.bind(this))},_getWrapper:function(t){return function(e){var i=e.getAttribute("data-bind");i&&(t[i]=e)}},_getElements:function(){if(this._container){for(var t=[],e=null,i=0;i',' ',' ',' ',""],t.prototype._init=function(){if(CeltraPlayerUtils.createDom(this._doc,t.DOM,this._opts,CeltraPlayerUtils.xBindFactory(this)),CeltraPlayerUtils.insertStyleTag("celtra-video-player-style",VideoPlayerCss,this._doc),this._controlsController&&(this._controlsEl=this._controlsController.render(this._doc),this._controlsWrapperEl.appendChild(this._controlsEl)),this._containerEl.appendChild(this._wrapperEl),this._posterShow(),this._controlsController&&this._controlsController.adjustSizes(this._containerEl.clientHeight),this._opts.preload){var e=this.createSpecs(!1,this._opts.startMuted);this.initialize(e)}this.dtCanFullscreen=this.isDesktop&&this._toggleDesktopFSStateHandlers("add")},t.prototype.setDimensions=function(e,t){this.width=e,this.height=t,this.redraw(),this.emit("rendered")},t.prototype.getVideoElement=function(){return this._videoEngine},t.prototype.getControlsElement=function(){return this._controlsEl},t.prototype.getWrapperElement=function(){return this._wrapperEl},t.prototype._posterHide=function(){this._posterShown&&(this._posterShown=!1,this._posterEl.style.display="none")},t.prototype._posterShow=function(){this._posterShown||(this._posterShown=!0,this._posterEl.style.display="")},extend(t.prototype,{onLoadedMetaData:function(){this.redraw(),this.emit("canunmute")},onCanPlay:function(){this.emit("canplay")},onDurationChange:function(){this.emit("durationchange")},onBuffering:function(){this.changeState(CeltraPlayerUtils.BUFFERING),this.emit("buffering")},onEndBuffering:function(){this.emit("endbuffering")},onPlayerSourceLoading:function(e){(this._opts.autoplay||e)&&this.emit("playersourceloading")},onMuted:function(){this._muted=!0,this.emit("muted")},onUnMuted:function(){this._muted=!1,this.emit("unmuted")},onVolumeChange:function(e){this._muted=0==e,this.emit(this._muted?"muted":"unmuted"),this.emit("volumechange",e)},onProgress:function(){this.buffered="object"==typeof this._videoEngine.buffered&&this._videoEngine.buffered.length>0?this._videoEngine.buffered.end(0):this._videoEngine.buffered,this.emit("progress",this.buffered/(this.duration||1))},onTimeUpdate:function(){!this._playingEmitted&&this._timeUpdateCounter>2&&this.buffered>0&&(this._playingEmitted=!0,this.onEndBuffering(),this.changeState(CeltraPlayerUtils.PLAYING),this.emit("playing")),this._timeUpdateCounter+=1;var e=Date.now();this._timeUpdateCounter>3&&e-this._lastTimeUpdateEmitted>70&&(this._lastTimeUpdateEmitted=e,this._posterHide(),this._firstRenderEmitted||(this.emit("firstRender"),this._firstRenderEmitted=!0),this.emit("timeupdate",this._videoEngine.getCurrentTime()))},onTimeUpdateRepeat:function(e){this._opts.playTo&&e>=this._opts.playTo&&(this._hasToBeRepeated()?this._doRepeat():(this.pause(),this._doEnd()))},onPlay:function(){this.emit("play")},onPlaying:function(){this.emit("playing"),this.changeState(CeltraPlayerUtils.PLAYING),this.playSucceeded=!0,this.redraw()},onPause:function(){this.changeState(CeltraPlayerUtils.PAUSED),this.emit("pause")},onAutoplayRejected:function(){this.emit("autoplayrejected")},onForceMuted:function(){this.emit("forcemuted")},onExitFullScreen:function(){this.exitFullScreen()},onEnded:function(){this._playingEmitted=!1,this._hasToBeRepeated()?this._doRepeat():this._doEnd()},getContainerDimensions:function(){if(this.isFullScreen){var e=this.dtCanFullscreen?this._wrapperEl:this._wrapperEl.parentNode;return{width:e.clientWidth,height:e.clientHeight}}return{width:this.width,height:this.height}},redraw:function(){var e="fit"!==this._opts.fitting,t=this._aspectRatio,i=this.getContainerDimensions(),n=CeltraPlayerUtils.fitComponent(100*t,100,i.width,i.height,e);switch(this.anchoringPoint){case"top":n.marginVertical=0;break;case"bottom":n.marginVertical=Math.ceil(i.height-n.height)}var s=function(e){e.width=n.width+"px",e.height=n.height+"px",e.minHeight=n.height+"px",e.left=n.marginHorizontal+"px",e.top=n.marginVertical+"px"},o=function(e){e.width=i.width+"px",e.height=i.height+"px",e.minHeight=i.height+"px",e.left=0,e.top=0};e?(s(this._engineContainerEl.style),s(this._posterEl.style),o(this._controlsWrapperEl.style)):(s(this._engineContainerEl.style),s(this._posterEl.style),s(this._controlsWrapperEl.style))},onSeeking:function(){this.emit("seeking")},onSeeked:function(){if(this._seeked){switch(this._seeked=!1,this._stateBeforeSeek){case CeltraPlayerUtils.PLAYING:this.play();break;case CeltraPlayerUtils.PAUSED:this.silentPause()}this._stateBeforeSeek=void 0}this.emit("seeked")},onError:function(){this.emit("error")},onCanUnMute:function(){this.emit("canunmute")},onCustomInfo:function(e){this.emit("custominfo",e)}}),extend(t.prototype,{getState:function(){return this._state},mute:function(){this._videoEngine&&"function"==typeof this._videoEngine.mute&&this._videoEngine.mute(),this.onMuted()},unMute:function(){this._videoEngine&&"function"==typeof this._videoEngine.unMute&&this._videoEngine.unMute(),this.onUnMuted()},silentPlay:function(){this._videoEngine.play()},createSpecs:function(e,t){var i=this._videoEngineSpecProvider(e,t);i=merge(i,{options:this._opts});var n=AudioEngineProvider.createAudioEngineSpec(i),s=i.videoUrl?i.videoUrl:VideoEngineProvider.createVideoUrl(i,this._opts.videoStream),o=n?AudioEngineProvider.createAudioUrl(this._opts.videoStream):null;return{videoEngineSpec:i,videoUrl:s,audioEngineSpec:n,audioUrl:o}},initialize:function(e){this._createEngines(e),CeltraPlayerUtils.isNode(this._engineEl)&&!this._engineEl.parentNode&&this._engineContainerEl.appendChild(this._engineEl),e.videoEngineSpec.options.videoElement&&(this._wrapperEl.style.background="transparent"),CeltraPlayerUtils.attachHandlers(this,this._videoEngine,n),void 0!==e.videoEngineSpec.startMuted&&(e.videoEngineSpec.startMuted?this.mute():this.unMute()),this._initialized=!0},play:function(e){return null==this._videoEngine?void Logger("VideoPlayer").log("Video not initialized!"):(this.isState(CeltraPlayerUtils.UNSTARTED,CeltraPlayerUtils.ENDED)&&this.changeState(CeltraPlayerUtils.BUFFERING),this._firstPlay&&!e&&this.unMute(),this._firstPlay=!1,this._videoEngine.play(),void this.emit("userplayed"))},_createEngines:function(e){if(null===this._videoEngine){if(this._engineType=e.videoEngineSpec.engineType,this._videoPreset=e.videoEngineSpec.preset,"JsVideoEngine"==e.videoEngineSpec.clazz?this._videoEngine=new JsVideoEngine(e.videoUrl,this._engineType,e.videoEngineSpec):"Html5VideoEngine"==e.videoEngineSpec.clazz&&(this._videoEngine=Html5VideoEngine(e.videoUrl,e.videoEngineSpec)),null!==e.audioEngineSpec){var t=null,i=null;"WebAudioEngine"==e.audioEngineSpec.clazz?(t=WebAudioEngine(e.audioUrl,e.audioEngineSpec.preload),i=Object.create(AVSyncWebAudio).init(this,t,e.videoEngineSpec.startMuted)):"Html5AudioEngine"==e.audioEngineSpec.clazz&&(t=Html5AudioEngine(e.audioUrl,e.audioEngineSpec.preload),i=Object.create(AVSyncAudio).init(this,t,e.videoEngineSpec.startMuted))}this._engineEl=this._videoEngine.render(this._doc,{playsInline:this.playsInline()})}},silentPause:function(){this._videoEngine.pause()},pause:function(){this._videoEngine&&this._videoEngine.pause(),this.emit("userpaused"),this._playingEmitted=!1},close:function(){this.playsInline()?this.exitFullScreen():this.emit("close")},replay:function(){this.emit("replayed"),this.setCurrentTime(0),this._playingEmitted=!1,this.play()},reset:function(){this._videoEngine.pause(),this._videoEngine.reset(),this._posterShow(),this._controlsController&&this._controlsController.reset(),this._timeUpdateCounter=0,this._playingEmitted=!1},enterFullScreen:function(){if(this._videoEngine){if(this._containerElzIndex=this._containerEl.style.zIndex,this.dtCanFullscreen){var e=this._wrapperEl,t=(e.requestFullscreen||e.webkitRequestFullscreen||e.mozRequestFullScreen||e.msRequestFullscreen).bind(e);t()}else{this.isFullScreen=!0;var i=this._wrapperEl;for(!this.isState(CeltraPlayerUtils.PAUSED);i&&!i.getAttribute("class").includes("celtra-base-creative-unit");)i=i.parentNode;i.insertBefore(this._wrapperEl,i.firstChild),this._wrapperEl.style.zIndex=CeltraPlayerUtils.ZINDEX_MAX,this.redraw(),this.silentPauseActive=!0,defer(function(){this.silentPauseActive=!1}.bind(this),500),this._initialized&&this._videoEngine.pause()}this._initialized&&this._videoEngine.play(),this.emit("enterfullscreen")}},exitFullScreen:function(){if(this.dtCanFullscreen){var e=document,t=(e.exitFullscreen||e.webkitExitFullscreen||e.mozCancelFullScreen||e.msExitFullscreen).bind(e);t()}else{this.isFullScreen=!1;{!this.isState(CeltraPlayerUtils.PAUSED,CeltraPlayerUtils.ENDED)}this._wrapperEl.style.zIndex="",this._containerEl.style.zIndex=this._containerElzIndex,this._containerEl.appendChild(this._wrapperEl),this.silentPauseActive=!0,defer(function(){this.silentPauseActive=!1}.bind(this),500),this.once("pause",CeltraPlayerUtils.validFor(function(){this.play(),this._muted||defer(this.unMute.bind(this),100)}.bind(this),500))}this.redraw(),this.emit("exitfullscreen")},hide:function(){this._wrapperEl&&(this._wrapperEl.style.display="none")},show:function(){this._wrapperEl&&(this._wrapperEl.style.display="")},destroy:function(){this._videoEngine&&(this._videoEngine.pause(),this._videoEngine.destroy(),this._controlsController&&this._controlsController.destroy());var e=function(){CeltraPlayerUtils&&this._wrapperEl&&CeltraPlayerUtils.removeElements(this._wrapperEl),this._toggleDesktopFSStateHandlers("remove"),this._wrapperEl=null}.bind(this);"undefined"!=typeof TouchEventSimulator?defer(e,100):e(),this.emit("destroy")},getDuration:function(){return this.duration},getCurrentTime:function(){return this._videoEngine?this._videoEngine.getCurrentTime():null},setCurrentTime:function(e){this._videoEngine&&this._videoEngine.setCurrentTime(e)},seekTo:function(e){this.emit("seekto",e),this._seeked||(this._stateBeforeSeek=this.getState(),this.getState()===CeltraPlayerUtils.PLAYING&&this.pause()),this._seeked=!0,this._videoEngine.seekToRatio(e)}}),t.prototype._hasToBeRepeated=function(){return this._repeatedthis._lastPlayingPosition&&(this._lastPlayingPosition=t);var i=this._lastPlayingPosition-this._startPlayingPosition,n=i>=this.maxPlayingSegmentLength;n&&this.flush()},i.prototype.flush=function(i){if(null!=this._startPlayingPosition){var n=this._startPlayingPosition,s=this._lastPlayingPosition;(i||s-n>t)&&s>n&&(this.callback({from:n,to:s}),this._startPlayingPosition=this._lastPlayingPosition)}},i.prototype.reset=function(){this._startPlayingPosition=null,this._lastPlayingPosition=null},window.PlayedSegmentComputationUnit=i}();;
!function(){function n(n){if(n.serverReportedDuration)return n.serverReportedDuration;var r=-1!==t.indexOf(n.duration);return r?null:n.duration}var t=[void 0,null,0,1],r={videoStart:function(n,t,r){return t>Math.min(1,.25*r)},videoFirstQuartile:function(n,t,r){var e=.25*r;return e>n&&t>=e},videoMidpoint:function(n,t,r){var e=.5*r;return e>n&&t>=e},videoThirdQuartile:function(n,t,r){var e=.75*r;return e>n&&t>=e},videoComplete:function(n,t,r){return t>Math.max(.75*r,r-2)}};window.QuartileEventsEmitter=function(t){t.QUARTILE_EVENTS=r;var e={};Object.keys(r).forEach(function(n){e[n]=r[n]});var i=null,u=function(){var t;t=null===i?this.currentTime:null!==i&&this.currentTime>i?this.currentTime:i;var r=n(this);if(null!==r&&null!==i&&t&&1>t-i){i>0&&1>i&&(i=0);for(var u in e)e[u](i,t,r)&&(this.emit(u,{name:u,label:this.componentName}),delete e[u])}i=t}.bind(t);return t.on("timeupdate",u),t.on("destroy",function(){t.off("timeupdate",u)}),t}}();;
!function(){var t=1,e=4,i=[void 0,null,0,1],s=[100,300,6e3],n=function(e){this._video=e,this._lastObservedDuration=null,this._lastObservedPosition=null,this._intervalId=null,this._firstSegmentEmitted=!1,this._running=!1,this._currentTime=0,this._playedSegmentsCount=0,this.stop=this.stop.bind(this),this.stopAndReset=this.stopAndReset.bind(this),this.start=this.start.bind(this),this.tick=this.tick.bind(this),this.flush=this.flush.bind(this),this.reemitQuartileEvent=function(t){this.emit(t.name,t),this._playedSegmentComputationUnit.flush()}.bind(this),this.trackDurationChange=this.trackDurationChange.bind(this),this.stitchAndTrackVideoPlayedSegment=this.stitchAndTrackVideoPlayedSegment.bind(this),this._viewDirectionsObserver="function"==typeof ViewDirectionsObserver&&this._video instanceof VideoPlayer360?new ViewDirectionsObserver(e,this.getCurrentTime.bind(this)):null,this._playedSegmentComputationUnit=new PlayedSegmentComputationUnit(t,this.stitchAndTrackVideoPlayedSegment),this._lastVideoPlayedSegment={from:0,to:0},this._serverReportedDuration=e.serverReportedDuration,e.serverReportedDuration?(defer(function(){this.emit("videoDurationUpdate",{duration:e.serverReportedDuration})}.bind(this)),this.checkDuration=!1):(this.checkDuration=!0,e.on("durationchange",this.trackDurationChange)),e.on("pause",this.stop),e.on("timeupdate",this.start),e.on("ended",this.stopAndReset),e.on("repeat",this.stopAndReset),e.on("playing",this.start),e.on("seeked",this.start),r().on("mediaStopRequested",this.stop),e.on("muted",this.flush),e.on("unmuted",this.flush),e.on("enterfullscreen",this.flush),e.on("exitfullscreen",this.flush);for(var i in e.QUARTILE_EVENTS)e.on(i,this.reemitQuartileEvent)};extend(n.prototype,EventEmitter);var r=function(){return"undefined"!=typeof creative?creative.adapter:adapter};n.prototype.stitchAndTrackVideoPlayedSegment=function(t){var e={from:this._lastVideoPlayedSegment.to,to:t.to};this.trackVideoPlayedSegment(e)},n.prototype.trackVideoPlayedSegment=function(t){if(this._lastVideoPlayedSegment=t,!(this._serverReportedDuration&&t.from>=this._serverReportedDuration)){var e=!this._serverReportedDuration||t.tothis._currentTime&&(this._currentTime=this._video.currentTime),this._currentTime},n.prototype.start=function(){this._running||(this._running=!0,this._viewDirectionsObserver&&this._viewDirectionsObserver.start(),r().mediaState.startVideo(),this._firstSegmentEmitted||(this._currentTime=this.getCurrentTime()+.01,this.trackVideoPlayedSegment({from:0,to:this.getCurrentTime()}),this._firstSegmentEmitted=!0),this._playedSegmentComputationUnit.init(this.getCurrentTime()),clearInterval(this._intervalId),this._intervalId=setInterval(this.tick,1e3/e))},n.prototype.stopAndReset=function(){this.stop(!0),this._playedSegmentComputationUnit&&(this._playedSegmentComputationUnit.reset(),this._currentTime=0,this._firstSegmentEmitted=!1,this._viewDirectionsObserver&&this._viewDirectionsObserver.reset())},n.prototype.flush=function(){this._playedSegmentComputationUnit&&this._playedSegmentComputationUnit.flush()},n.prototype.stop=function(t){(this._running||t)&&(this._running&&(r().mediaState.stopVideo(),this._running=!1,clearInterval(this._intervalId)),this._viewDirectionsObserver&&this._viewDirectionsObserver.stop(),this._playedSegmentComputationUnit.addEvent(this.getCurrentTime()),this._playedSegmentComputationUnit.flush(t))},n.prototype.trackDurationChange=function(){if(this.checkDuration){var t=this._video.duration,e=-1!==i.indexOf(t),n=-1!==s.indexOf(t),r=t!==this._lastObservedDuration;e||n||!r||(this._serverReportedDuration=t,this.emit("videoDurationUpdate",{duration:t}),this._lastObservedDuration=t)}},n.prototype.tick=function(){this.trackDurationChange();var t=this.getCurrentTime(),e=Date.now()-(this._lastTickTime||Date.now());t==this._lastObservedPosition&&e>1e3&&this.stop(),this._playedSegmentComputationUnit.addEvent(t),this._lastObservedPosition=t,this._lastTickTime=Date.now()},n.prototype.destroy=function(){var t=this._video;this.stop(),t.off("pause",this.stop),t.off("ended",this.stopAndReset),t.off("playing",this.start),t.off("timeupdate",this.start),t.off("durationchange",this.tick),t.off("muted",this.flush),t.off("unmuted",this.flush),t.off("enterfullscreen",this.flush),t.off("exitfullscreen",this.flush),t.off("durationchange",this.trackDurationChange);for(var e in t.QUARTILE_EVENTS)t.off(e,this.reemitQuartileEvent);r().off("mediaStopRequested",this.stop),this._playedSegmentComputationUnit.flush()},this.VideoEventsAdapter=n}();;
var CCalendar={saveTheDateAction:function(e,t,a){creative.adapter._stopAllMedia(),creative.adapter.saveCalendarEvent(t,a);var n={start:t.start.value,end:t.end.value};t.eventName&&(n.eventName=t.eventName),t.location&&(n.location=t.location),t.reminder&&(n.reminder=t.reminder),t.notes&&(n.notes=t.notes),creative.adapter.sendToEventMonitor("dateSaved",t.triggerId,e.screen.name,n,null),e.track({name:"dateSaved",label:t.reportLabel})},getEventICSUrl:function(e){var t={format:"ics"},a=["eventName","location","start","end","timezone","reminder","notes"];if(a.forEach(function(a){if(a in e){var n=e[a];"object"==typeof n&&n.hasOwnProperty("value")&&(n=n.value),"string"==typeof n&&n.length&&(t[a]=n)}}),t.start&&"eventName"in t){if(t.end&&10===t.end.length){var n=new Date(Date.parse(t.end)+864e5);t.end=n.getFullYear()+"-"+("0"+(n.getMonth()+1)).slice(-2)+"-"+("0"+n.getDate()).slice(-2)}return"webcal:"+urls.insecureCachedApiUrl.replace(/^http:\/\//,"")+"calendar?"+buildQuery(t)}return null},getEventGoogleCalendarUrl:function(e){function t(e,t){var n=function(e,t){var n=e[t].value.replace(" ","T");return e.allDay&&(n=n.substr(0,10)+"T"+("start"===t?"00:00:00":"23:59:59"),e.timezone="user"),new Date(n+("user"===e.timezone?a(n):"+00:00"))}(e,t);return n.toISOString().replace(/[-:]|(?:\.[0-9]*)/g,"")}function a(e){var t=new Date(e).getTimezoneOffset(),a=Math.abs(t),r=Math.floor(a/60);return(t>0?"-":"+")+n(r)+":"+n(a-60*r)}function n(e){return("0"+e).slice(-2)}var r="https://calendar.google.com/calendar/"+(desktop()?"render?":"gp#~calendar:view=e&")+"action=TEMPLATE",o={dates:t(e,"start")+"/"+t(e,"end"),location:e.location,text:e.eventName,details:e.notes};return r+"&"+buildQuery(o)},toString:function(){return"[Clazz CCalendar]"}};;
function StateObject(t){Object.defineProperties(this,{values:{enumerable:!1,configurable:!1,writable:!0,value:{}},_isDirty:{enumerable:!1,configurable:!1,writable:!0,value:!1}}),Object.keys(t).forEach(function(e){this.registerValue(e,t[e])},this)}extend(StateObject.prototype,EventEmitter),StateObject.prototype.registerValue=function(t,e){this.values[t]={dirty:!1,value:e},Object.defineProperty(this,t,{get:function(){return this.values[t].value},set:function(e){var i=this.values[t],r=i.value;e!=r&&(i.dirty=!0,i.value=e,this._isDirty=!0,this.emit("change:"+t,e,r))},enumerable:!0})},StateObject.prototype.markClean=function(t){var e=!1;Object.keys(this.values).forEach(function(i){t&&i!==t||(this[i].dirty=!1),e=e||this[i].dirty},this.values),this._isDirty=e},StateObject.prototype.getDirtyValues=function(){for(var t={},e=Object.keys(this.values),i=0;i1&&(t=Array.prototype.slice.apply(arguments));for(var e=0;e=this._targetTime?(this.pause(),this.value=this._targetValue,defer(this._callback||noop),this._startValue=null,this._startTime=null,this._targetValue=null,this._targetTime=null,this._callback=null):this.value=Math.pow(t/this._targetTime,this.options.exp)*i+this._startValue};;
function ViewportManager(t){this.container=t.container,this.width=this.originalWidth=t.width||0,this.height=this.originalHeight=t.height||0,this.iframe=this.container.ownerDocument.defaultView.frameElement,this.init()}extend(ViewportManager.prototype,EventEmitter),ViewportManager.prototype.init=function(){this.container.style.overflow="hidden",this.container.style.position="absolute",this.container.style.left=this.container.style.top=0,this.iframe.style.display="block",this.update()},ViewportManager.prototype.update=function(){this.container.style.width=this.width+"px",this.container.style.height=this.height+"px",this.iframe.style.width=this.width+"px",this.iframe.style.height=this.height+"px",this.iframe.width=this.width,this.iframe.height=this.height},ViewportManager.prototype.setSize=function(t,i){this.width=t,this.height=i,this.update()};;
function Placement(t){this.root=null,this.width={value:100,unit:"%"},this.height={value:100,unit:"%"},this.left={value:0,unit:"px"},this.top={value:0,unit:"px"},this._positioning=t||"container",this.origin={horizontal:"left",vertical:"top"},this._usesFixedPositioning=!1,this._minWidth={value:0,unit:"px"},this._minHeight={value:0,unit:"px"},this.touchEventSimulator=null,this.overflow=!1,this._visible=!1,this.isSticky=!1,this.bypassSizing=!1,this.bypassPositioning=!1}extend(Placement.prototype,EventEmitter),Placement.ZINDEX_MAX=2147483647,Placement.prototype.getRootWindow=function(){return this.root.ownerDocument.defaultView},Placement.prototype.attachTo=function(){throw new Error("Placement.attachTo not implemented")},Placement.prototype.getContainer=function(){throw new Error("Placement.getContainer not implemented")},Placement.prototype.getContentWindow=function(){return this.getContainer().ownerDocument.defaultView},Object.defineProperty(Placement.prototype,"creative",{get:function(){return this.getContainer().ownerDocument.defaultView.creative}}),Object.defineProperty(Placement.prototype,"positioning",{get:function(){return this._positioning},set:function(t){this._positioning=t,this.update()}}),Object.defineProperty(Placement.prototype,"visible",{get:function(){return this._visible}}),Object.defineProperty(Placement.prototype,"_canUseFixedPositioning",{get:function(){return this.usesFixedPositioning&&this.supportsFixedPositioning},enumerable:!1}),Placement.prototype.setMinimumSize=function(t,e){var i=this._parseLength(t),o=this._parseLength(e);this._minWidth.value=i.value,this._minWidth.unit=i.unit,this._minHeight.value=o.value,this._minHeight.unit=o.unit,this._visible&&this.update()},Placement.prototype.setSize=function(t,e,i){var o,s,n=this._parseLength(t),r=this._parseLength(e),h=this.getViewportGeometry(),l=extend({},this._minWidth),a=extend({},this._minHeight);i||(this.width={value:n.value,unit:n.unit},this.height={value:r.value,unit:r.unit}),this._visible&&("screen"==this.positioning?(o=h.width,s=h.height):"page"==this.positioning?(o=this.root.ownerDocument.documentElement.offsetWidth,s=this.root.ownerDocument.documentElement.offsetHeight):(o=this.root.parentNode.offsetWidth,s=this.root.parentNode.offsetHeight),"%"==n.unit&&(n.value=Math.round(n.value*o/100),n.unit="px"),"%"==r.unit&&(r.value=Math.round(r.value*s/100),r.unit="px"),"%"==l.unit&&(l.value=Math.round(l.value*o/100),l.unit="px"),"%"==a.unit&&(a.value=Math.round(a.value*s/100),a.unit="px"),this.bypassSizing||(this.root.style.width=Math.max(n.value,l.value)+n.unit,this.root.style.height=Math.max(r.value,a.value)+r.unit),this.emit("resized"))},Placement.prototype.getBaseOffset=function(){var t=this.root.ownerDocument.createElement("div"),e=this.root.parentNode;t.style.left=0,t.style.top=0,t.style.position="absolute",t.style.setProperty("display","block","important"),e.appendChild(t);var i=offset(t);return e.removeChild(t),i},Placement.prototype.applyCustomPubClasses=function(){var t=this._getPubClasses();this._usePubClasses=t.length>0,this._usePubClasses&&(this._disableSelfStyling(),this.addClasses.apply(this,t.concat(["celtra-placement"])))},Placement.prototype.usePubClasses=function(){return this._usePubClasses},Placement.prototype._disableSelfStyling=function(){this.bypassPositioning=!("StickyPlacement"===this.constructor.name||this.isSticky),this.bypassSizing=!0,this._clearCSS(),this.bypassPositioning&&(this.root.style.position="relative")},Placement.prototype._getPubClasses=function(){var t=this.creative&&this.creative.customAttributes,e=[];return t&&t.hasOwnProperty("cssCustomClass")&&"string"==typeof t.cssCustomClass&&(e=t.cssCustomClass.split(",")),e},Placement.prototype._clearCSS=function(){this.root.style=""},Placement.prototype.addClasses=function(t){t=Array.prototype.slice.apply(arguments).filter(function(t){return!!t}),t.forEach(function(t){try{this.root.classList.add(t)}catch(e){console.warn('Class "'+t+'" not added: '+e.message)}}.bind(this))},Placement.prototype.setPosition=function(t,e,i,o){var s=this._parseLength(t),n=this._parseLength(e),r=this.getViewportGeometry(),h=this.getBaseOffset();if(i||(this.left.value=s.value,this.left.unit=s.unit,this.top.value=n.value,this.top.unit=n.unit),this._visible&&!this.bypassPositioning){switch(this.positioning){case"screen":if(this._canUseFixedPositioning)this.root.style.position="fixed","left"==this.origin.horizontal?(this.root.style.left=s.value+s.unit,this.root.style.right="auto",this.root.style.marginLeft=""):"center"==this.origin.horizontal?(this.root.style.left=s.value+s.unit,this.root.style.right="auto",this.root.style.marginLeft=o?"":(r.width-this.root.offsetWidth)/2+"px"):(this.root.style.right=s.value+s.unit,this.root.style.left="auto",this.root.style.marginLeft=""),"top"==this.origin.vertical?(this.root.style.top=n.value+n.unit,this.root.style.bottom="auto",this.root.style.marginTop=""):"center"==this.origin.vertical?(this.root.style.top=n.value+n.unit,this.root.style.bottom="auto",this.root.style.marginTop=(r.height-this.root.offsetHeight)/2+"px"):(this.root.style.bottom=n.value+n.unit,this.root.style.top="auto",this.root.style.marginTop="");else{var l="",a="";if("%"==s.unit&&(s.value*=r.width/100,s.unit="px"),"%"==n.unit&&(n.value*=r.height/100,n.unit="px"),"left"==this.origin.horizontal)s.value+=r.left;else if("center"==this.origin.horizontal)s.value+=r.left,l=(r.width-this.root.offsetWidth)/2+"px";else{var u="%"==this.width.unit?this.width.value/100*r.width:this.width.value;s.value=r.left+r.width-u-s.value}if("top"==this.origin.vertical)n.value+=r.top;else if("center"==this.origin.vertical)n.value+=r.top,a=(r.height-this.root.offsetHeight)/2+"px";else{var p="%"==this.height.unit?this.height.value/100*r.height:this.height.value;n.value=r.top+r.height-p-n.value}this.root.style.position="absolute",this.root.style.left=s.value-h.left+"px",this.root.style.top=n.value-h.top+"px",this.root.style.marginLeft=l,this.root.style.marginTop=a,this.root.style.right=this.root.style.bottom="auto"}break;case"container":this.root.style.position="absolute","left"==this.origin.horizontal?(this.root.style.left=s.value+s.unit,this.root.style.right="auto",this.root.style.marginLeft=""):"center"==this.origin.horizontal?(this.root.style.left=s.value+s.unit,this.root.style.right="auto",this.root.style.marginLeft="px"==this.height.unit?-Math.round(this.width.value/2)+"px":-(this.root.offsetWidth/2)+"px"):(this.root.style.left="auto",this.root.style.right=s.value+s.unit,this.root.style.marginLeft=""),"top"==this.origin.vertical?(this.root.style.top=n.value+n.unit,this.root.style.bottom="auto",this.root.style.marginTop=""):"center"==this.origin.vertical?(this.root.style.top=n.value+n.unit,this.root.style.bottom="auto",this.root.style.marginTop="px"==this.height.unit?-Math.round(this.height.value/2)+"px":-(this.root.offsetHeight/2)+"px"):(this.root.style.top="auto",this.root.style.bottom=n.value+n.unit,this.root.style.marginTop="");break;case"page":var c={width:this.root.ownerDocument.documentElement.clientWidth,height:this.root.ownerDocument.documentElement.clientHeight};"%"==s.unit&&(s.value=Math.round(s.value*c.width/100),s.unit="px"),"%"==n.unit&&(n.value=Math.round(n.value*c.height/100),n.unit="px"),this.root.style.position="absolute","left"==this.origin.horizontal?(this.root.style.left=s.value-h.left+"px",this.root.style.top=n.value-h.top+"px"):"center"==this.origin.horizontal?(this.root.style.left=(c.width-this.root.offsetWidth)/2-h.left+s.value+"px",this.root.style.top=(c.height-this.root.offsetHeight)/2-h.top+n.value+"px"):(this.root.style.left=c.width-this.root.offsetWidth-h.left-s.value+"px",this.root.style.top=c.height-this.root.offsetHeight-h.top-n.value+"px"),this.root.style.right=this.root.style.bottom="auto";break;case"static":this.root.style.position="static",this.root.style.left=this.root.style.top=0,this.root.style.right=this.root.style.bottom="auto",this.root.style.marginLeft=this.root.style.marginTop=""}this.emit("repositioned")}},Placement.prototype.update=function(t){this.setSize(this.width.value+this.width.unit,this.height.value+this.height.unit,!0),this.setPosition(this.left.value+this.left.unit,this.top.value+this.top.unit,!0),defer(t||noop,void 0,void 0,useAsap())},Placement.prototype.supportsFixedPositioning=!0,Object.defineProperty(Placement.prototype,"usesFixedPositioning",{get:function(){return this._usesFixedPositioning},set:function(t){this._usesFixedPositioning=!!t,this.update()},enumerable:!0}),Placement.prototype.hacks={useAlternativeWindowDimensions:"BackCompat"==document.compatMode?!1:desktop(),useSplitScreenWindowDimensions:ios("9",null)},Placement.prototype.hide=function(){this.root.style.display="none",this._visible=!1,this.emit("hidden")},Placement.prototype.show=function(){this.root.style.display="block",this._visible=!0,this.update(),this.emit("shown")},Placement.prototype.destroy=function(){this.emit("destroyed"),this.root&&this.root.parentNode&&this.root.parentNode.removeChild(this.root),this.root=null},Placement.prototype.setZIndex=function(t){0>t&&(t=Placement.ZINDEX_MAX+t),"max"==t&&(t=Placement.ZINDEX_MAX),this.root.style.zIndex=t},Placement.prototype.createElement=function(){throw new Error("Not implemented")},Placement.prototype.querySelector=function(){throw new Error("Not implemented")},Placement.prototype.getViewportGeometry=function(){var t=this.getRootWindow(),e=t.document.documentElement;return{width:this.hacks.useAlternativeWindowDimensions||this.hacks.useSplitScreenWindowDimensions?e.clientWidth:t.innerWidth,height:this.hacks.useAlternativeWindowDimensions?e.clientHeight:t.innerHeight,left:t.scrollX||e&&e.scrollLeft||0,top:t.scrollY||e&&e.scrollTop||0}},Placement.prototype.getPlacementGeometry=function(){if("screen"==this.positioning&&this._canUseFixedPositioning)return{width:this.root.offsetWidth,height:this.root.offsetHeight,left:this.root.offsetLeft,top:this.root.offsetTop};var t=offset(this.root),e=this.getViewportGeometry();return{width:this.root.offsetWidth,height:this.root.offsetHeight,left:t.left-e.left,top:t.top-e.top}},Placement.prototype.getGlobalGeometry=function(t){for(var e=this.getRootWindow(),i=this.root.getBoundingClientRect(),o=CRect.adopt(i);e!==t&&e!==e.parent;)i=CRect.adopt(e.frameElement.getBoundingClientRect()),o.left+=i.left,o.top+=i.top,o=o.intersect(i),e=e.parent;return o},Placement.prototype._parseLength=function(t){if(!isNaN(t))return{value:t,unit:"px"};var e=t.match(/^(-?[\d.]+)(px|%)$/);if(!e)throw new Error('Cannot parse length "'+t+'"');return{value:parseFloat(e[1],10),unit:e[2]}},Placement.prototype.getUnitGeometry=function(t){var e=this.getPlacementGeometry(),i={left:e.left,top:e.top,width:t.size.width,height:t.size.height},o=t.horizontalPosition||"center",s=t.verticalPosition||"center";return"center"==o?i.left+=(e.width-t.size.width)/2:"right"==o&&(i.left+=e.width-t.size.width),"center"==s?i.top+=(e.height-t.size.height)/2:"bottom"==s&&(i.top+=e.height-t.size.height),i.left=Math.round(i.left),i.top=Math.round(i.top),i},Placement.prototype.getRelativeUnitGeometry=function(t){var e=offset(t.node);return e.width=t.node.offsetWidth,e.height=t.node.offsetHeight,e},Placement.prototype.populate=function(t,e){this.getContainer().appendChild(t),this.emit("populated"),e&&defer(e,void 0,void 0,useAsap())},Placement.prototype._getViewportElement=function(){throw new Error("Not implemented")},Placement.prototype.setBackground=function(t){null==t&&(t="none"),this.root.style.background=t},Placement.prototype.setOverflow=function(){var t=function(t){t.preventDefault()};return function(e){var i=this._getViewportElement();e?(i.style.overflowY="auto",ios()&&(i.style.webkitOverflowScrolling="touch",detach(i,"touchmove",t,!1))):(i.style.overflowY="hidden",ios()&&(i.style.webkitOverflowScrolling="auto",attach(i,"touchmove",t,!1)))}}(),Placement.prototype._flash=function(){var t=this.getContainer().ownerDocument,e=this.createElement("div");e.style.cssText="position:absolute;top:0;left:0;width:100%;height:100%;opacity:0.01;background:black;",t.body.appendChild(e),defer(function(){e.parentNode.removeChild(e)})};;
function IframePlacement(t,e,n,r){Placement.apply(this,arguments),this.frame=null,this.vm=null,this.unitScript=e,this.windowVarsByRef=n,this.windowVarsByCopy=r,this._syncInterval=null,this._syncIframeSize=this._syncIframeSize.bind(this)}inherit(IframePlacement,Placement),IframePlacement.create=function(t,e,n,r){var i=new IframePlacement(e,"",n,r);return i.root=t.parentNode,i.root.style.display="none",i.startSyncingIframeSize(),i.frame=t,i.setupFrame(),i},IframePlacement.baseHTML='',IframePlacement.prototype.setSize=function(){IframePlacement.uber.setSize.apply(this,arguments),this._syncIframeSize()},IframePlacement.prototype.show=function(){IframePlacement.uber.show.apply(this,arguments),this._syncIframeSize()},IframePlacement.prototype._syncIframeSize=function(){this._visible&&this.vm&&(this.root.offsetWidth!=this.vm.width||this.root.offsetHeight!=this.vm.height)&&this.vm.setSize(0|this.root.offsetWidth,0|this.root.offsetHeight)},IframePlacement.prototype.startSyncingIframeSize=function(){this._syncInterval=this._setInterval(this._syncIframeSize,100)},IframePlacement.prototype.stopSyncingIframeSize=function(){this._syncInterval&&this._clearInterval(this._syncInterval),this._syncInterval=null},IframePlacement.prototype.getContainer=function(){if(!this.root)throw new Error("Root node not attached to document yet!");return this.querySelector("#viewport")},IframePlacement.prototype._setInterval=function(t,e){return this.windowVarsByRef.adapter.getTopWindow().setInterval(t,e)},IframePlacement.prototype._clearInterval=function(t,e){return this.windowVarsByRef.adapter.getTopWindow().clearInterval(t,e)},IframePlacement.prototype.attachTo=function(t,e){this.root=t.ownerDocument.createElement("div"),this.root.style.overflow="hidden",this.hide(),t.appendChild(this.root),this.startSyncingIframeSize(),this.frame=t.ownerDocument.createElement("iframe"),this.frame.style.border="0px",this.frame.setAttribute("frameborder","0"),this.frame.setAttribute("scrolling","no"),this.frame.setAttribute("allowFullScreen",""),this.root.appendChild(this.frame),defer(function(){if(!this.frame.contentWindow)throw new Error("Can't access contentWindow of an iframe, skip placement initialization.");this.frame.contentDocument.open();for(var t in this.windowVarsByRef)this.frame.contentWindow[t]=this.windowVarsByRef[t];var n="";for(var t in this.windowVarsByCopy)n+="window."+t+" = "+JSON.stringify(this.windowVarsByCopy[t])+";\n";this.frame.contentDocument.write(IframePlacement.baseHTML);var r=this.frame.contentDocument.createElement("script");r.textContent=n+";\n"+this.unitScript,this.frame.contentDocument.body.appendChild(r),attach(this.frame,"load",function(){this.setupFrame(),e&&defer(e,void 0,void 0,useAsap())}.bind(this)),this.frame.contentDocument.close()}.bind(this),void 0,void 0,useAsap())},IframePlacement.prototype.destroy=function(){this.stopSyncingIframeSize(),IframePlacement.uber.destroy.apply(this,arguments)},IframePlacement.prototype.createElement=function(t){return this.frame.contentDocument.createElement(t)},IframePlacement.prototype.querySelector=function(t){return this.frame.contentDocument?this.frame.contentDocument.querySelector(t):null},IframePlacement.prototype.querySelectorAll=function(t){return this.frame.contentDocument?this.frame.contentDocument.querySelectorAll(t):[]},IframePlacement.prototype._getViewportElement=function(){return this.querySelector("#viewport")},IframePlacement.prototype.setupFrame=function(){var t=this.frame.contentDocument.createElement("script");t.textContent="window.touchEventSimulator = new TouchEventSimulator(document);window.touchEventSimulator.init();function __parseJSON(s){return JSON.parse(s);}",this.frame.contentDocument.querySelector("head").appendChild(t),this.touchEventSimulator=this.frame.contentWindow.touchEventSimulator,this.vm=new ViewportManager({container:this._getViewportElement()})};;
function DivPlacement(){Placement.apply(this,arguments)}inherit(DivPlacement,Placement),DivPlacement.prototype.attachTo=function(t,e){this.root=t.ownerDocument.createElement("div"),this.root.style.overflow="hidden",this.hide(),t.appendChild(this.root),this.touchEventSimulator=new TouchEventSimulator(this.root),this.touchEventSimulator.init(),e&&defer(e,0,"DivPlacement.attachTo defer callback",useAsap())},DivPlacement.prototype.destroy=function(){DivPlacement.uber.destroy.apply(this,arguments),this.touchEventSimulator.stop(),this.touchEventSimulator=null},DivPlacement.prototype.getContainer=function(){return this.root},DivPlacement.prototype.createElement=function(t){return this.root.ownerDocument.createElement(t)},DivPlacement.prototype.querySelector=function(t){return this.root.querySelector(t)},DivPlacement.prototype.querySelectorAll=function(t){return this.root.querySelectorAll(t)},DivPlacement.prototype._getViewportElement=function(){return this.root};;
function StickyPlacement(t,i,e,s,o){IframePlacement.apply(this,arguments),this.stickyOptions=o,this._handleDismissTouchEnd=this._handleDismissTouchEnd.bind(this),this.origin.horizontal="center",this.origin.vertical=this.stickyOptions.stickiness,this.usesFixedPositioning=!0,this._originalDocumentPadding=null}inherit(StickyPlacement,IframePlacement),StickyPlacement.create=function(t,i,e,s,o){var n=new StickyPlacement(i,"",e,s,o);return n.root=t.parentNode,n.root.style.display="none",n.startSyncingIframeSize(),n.frame=t,n.setupFrame(),n},StickyPlacement.prototype.setPosition=StickyPlacement.prototype.setZIndex=noop,StickyPlacement.prototype.show=function(){IframePlacement.prototype.show.apply(this,arguments),IframePlacement.prototype.setZIndex.call(this,-20),this.enableDocumentPadding(),this.update()},StickyPlacement.prototype.hide=function(){IframePlacement.prototype.hide.apply(this,arguments),this.disableDocumentPadding()},StickyPlacement.prototype.populate=function(){this.stickyOptions.showDismissButton&&this.once("populated",this.createDismissButton.bind(this)),IframePlacement.prototype.populate.apply(this,arguments)},StickyPlacement.prototype.update=function(t,i){this.root&&this.root.parentNode&&(IframePlacement.prototype.setSize.call(this,this.width.value+this.width.unit,this.height.value+this.height.unit,!0),IframePlacement.prototype.setPosition.call(this,0,0,!0,i),defer(t))},StickyPlacement.prototype.createDismissButton=function(){this.getViewportGeometry();with(this.root.style.overflow="visible",this._dismissButton=this.root.ownerDocument.createElement("img"),this._dismissButton.src=this.stickyOptions.baseUrl+"runner/clazzes/CreativeUnit/close-up.svg",this._dismissButton.style)switch(position="absolute",left="auto",right="6px",width="32px",height="32px",zIndex=10,this.stickyOptions.stickiness){case"top":top="auto",bottom="-16px";break;case"bottom":top="-16px",bottom="auto"}deviceInfo.deviceType.mobileDevice()?attach(this._dismissButton,"touchend",this._handleDismissTouchEnd,!1):attach(this._dismissButton,"click",this._handleDismissTouchEnd,!1),this.root.appendChild(this._dismissButton)},StickyPlacement.prototype._handleDismissTouchEnd=function(t){t.preventDefault(),t.stopPropagation(),this.disableDocumentPadding(),(this.stickyOptions.dismissCallback||noop)()},StickyPlacement.prototype.enableDocumentPadding=function(){var t=this.getRootWindow(),i=t.document.documentElement;this._originalDocumentPadding||(this._originalDocumentPadding=t.getComputedStyle(i)["padding-"+this.stickyOptions.stickiness]),i.style["padding-"+this.stickyOptions.stickiness]=this.root.offsetHeight+"px"},StickyPlacement.prototype.disableDocumentPadding=function(){var t=this.getRootWindow(),i=t.document.documentElement;i.style["padding-"+this.stickyOptions.stickiness]=this._originalDocumentPadding,this._originalDocumentPadding=null},StickyPlacement.prototype.hideStickyCloseButton=function(){this._dismissButton.style.display="none"},StickyPlacement.prototype.showStickyCloseButton=function(){this._dismissButton.style.display="block"};;
function Format(e,t){this.adapter=e,this.state=null,this.units=t,this.observesViewability=!0,this.observingViewability=function(e){return this.observesViewability&&this.adapter.viewabilityMeasurable["viewable"+e]}.bind(this),this._observesViewableTime=!1,this.observingViewableTime=this.observingViewableTime.bind(this),this.observationAbilities={observingViewability:this.observingViewability,observingViewableTime:this.observingViewableTime},this._allowNonNativeRAFForViewableTime="1"==this.adapter.runtimeParams._allowNonNativeRAFForViewableTime,this.adapter.nesting&&this.adapter.nesting.hostileIframe&&this.needsAccessToHostPage()&&trackingCenter.track({name:"userError",userErrorId:"nonFriendlyIFrame"})}extend(Format.prototype,EventEmitter),Object.defineProperty(Format.prototype,"placements",{get:function(){return this.adapter.placements},enumerable:!0}),Format.prototype.observingViewableTime=function(){var e=this.adapter;return this._observesViewableTime&&!!this.observingViewability("00")&&e.raf.environment&&(e.raf.isNative||this._allowNonNativeRAFForViewableTime)&&(e.supportsContainerViewability||e.canMeasureViewportPlacementGeometry)},Format.prototype.transitionTo=function(){throw new Error("transitionTo not implemented")},Format.prototype.destroy=function(){for(var e in this.placements)this.adapter.destroyPlacement(e),delete this.placements[e];this.adapter._stopObservingEnvironment(),this.adViewableTimeObserver&&this.adViewableTimeObserver.stop()},Format.prototype.hacks={},Format.prototype._attachInViewToOrderedPlacements=function(e,t,i){var r=i?i:t;e._outerPlacement=r,this.adapter.canMeasureViewportPlacementGeometry&&(r.inView||(r.inView=new PlacementInView(this.adapter,r)),i&&!t.inView&&(t.inView=new PlacementInView(this.adapter,t,i.inView)),e.inView||(e.inView=new InViewObject(e,t.inView)))},Format.prototype.connectPlacementEventsToUnitBehavior=function(e,t){this.adapter.on("orientationchange",function(){e.update(noop,this.adapter.adBehavior.crossScreenSticky)}.bind(this)),e.on("resized",function(){if(e._visible){var i=e.getPlacementGeometry();i.width<2&&i.height<2||t.setAvailableSize(i.width,i.height)}}),e.on("shown",function(){var i=e.getPlacementGeometry();t.setAvailableSize(i.width,i.height),t.enterRenderTree()}),e.on("hidden",function(){t.exitRenderTree()})},Format.prototype._getBackwardCompatibleOrientation=function(e){function t(){var t=e.size;return t.widtht.height?"landscape":"noOrientation"}var i=void 0;return i=this.adapter.runtimeParams.lockOrientation||this.adapter.autoLock()?this.adapter.determineLockOrientation():"prompt"===e.wrongOrientationHandling&&e?t():"noOrientation"},Format.prototype._trackViewportPlacementGeometry=function(e){function t(e){var t=e.document.documentElement;return{width:e.innerWidth,height:e.innerHeight,left:e.scrollX||t&&t.scrollLeft||0,top:e.scrollY||t&&t.scrollTop||0}}var i=this.adapter.getTopWindow(),r=e.getGlobalGeometry(i),n=t(i),a=CRect.adopt(r);a.left+=n.left,a.top+=n.top;var o={name:"viewportPlacementGeometry",pageDimensions:this.adapter.getPageDimensions(),viewportPositionRect:n,firstPlacementPositionRect:a};this.adapter.trackingCenter.trackNoLaterThan(o)},Format.prototype.setupViewableTimeObserver=function(){if(this._observesViewableTime="0"!==this.adapter.runtimeParams._trackViewableTime,this.observingViewableTime()){var e=this.adapter,t=new AdViewableTimeTracker(e.trackingCenter,e.raf.environment,e.getTopWindow());this.adViewableTimeObserver=e.canMeasureViewportPlacementGeometry?new AdViewableInViewObjectObserver(t):new AdViewableUnitObserver(t),this.adViewableTimeObserver.registerAdapter(e)}},Format.IGNORABLES=["INPUT","TEXTAREA","SELECT"],Format.isElementIgnorable=function(e){return Format.IGNORABLES.indexOf(e.tagName)>-1},Format.prototype.needsAccessToHostPage=function(){return!1};;
function UnitViewabilityObserver(e,t,i,r){this.adapter=e,this.win=e.getTopWindow(),this.placement=t,this.element=i,this._listeners=[],this._active=!1,this._currentViewability=null,this._inTimer={},this._ratio=0,this._samplingRect=new CRect,this._lastSamplingTimestamp=0,this._minSamplingTimeDelta=200,this._calc=this._calc.bind(this),this._useIntersectionObserver=!!r,this._asyncComputed={ratio:0,boundingClientRect:{bottom:0,height:0,left:0,right:0,top:0,width:0}}}UnitViewabilityObserver.samplingCount=100,UnitViewabilityObserver.minimumOpacity=.95,UnitViewabilityObserver.prototype._getUnitVisibleGeometry=function(){return this._useIntersectionObserver?this._getIntersectionObserverGeometry():this._getOldObserverGeometry()},UnitViewabilityObserver.prototype._getOldObserverGeometry=function(){var e=this.adapter.getPlacementRect(this.placement),t=this.adapter.getViewportRect(),i=CRect.adopt(this.placement.getContainer().getBoundingClientRect()),r=CRect.adopt(this.element.getBoundingClientRect()),n=r.intersect(i),s=r.map(i,e),a=n?n.map(i,e).intersect(t):null;return{globalUnitRect:s,intersect:a,ratio:a&&s.area>0?a.area/s.area:0}},UnitViewabilityObserver.prototype._getIntersectionObserverGeometry=function(){var e=0;if(this._asyncComputed.ratio>0)var t=this.adapter.getPlacementRect(this.placement),i=CRect.adopt(this.placement.getContainer().getBoundingClientRect()),r=this._asyncComputed.rect,n=new CRect(r.x,r.y,r.width,r.height),e=n.map(i,t);return{globalUnitRect:this._asyncComputed.boundingClientRect,intersect:e,ratio:this._asyncComputed.ratio}},UnitViewabilityObserver.prototype._handleIntersect=function(e){e.forEach(function(e){this._asyncComputed={ratio:e.intersectionRatio,rect:e.intersectionRect,boundingClientRect:e.boundingClientRect}}.bind(this))},UnitViewabilityObserver.prototype._intersectionObserverSetUp=function(){function e(e){for(var t=[],i=0;e>=i;i++){var r=i/e;t.push(r)}return t}var t=this.element,i=50,r={threshold:e(i)};this._useIntersectionObserver=new IntersectionObserver(this._handleIntersect.bind(this),r),this._useIntersectionObserver.observe(t)},UnitViewabilityObserver.prototype.computeUnitInteractableRatio=function(){if(!this.element.parentNode||!this.placement.root.parentNode)return 0;if(!this.adapter.containerIsViewable||!this.element.ownerDocument.defaultView)return 0;var e=this._getUnitVisibleGeometry(),t=(e.intersect,e.ratio);return this._ratio=t,this._ratio},UnitViewabilityObserver.prototype.addListener=function(e){this._listeners.push(e),this._start()},UnitViewabilityObserver.prototype.removeListener=function(e){this._listeners=this._listeners.filter(function(t){return t!==e}),0===this._listeners.length&&this.stop()},UnitViewabilityObserver.prototype._calc=function(e){if(this._active){var t=this._getUnitVisibleGeometry().globalUnitRect;this._currentViewability=this.computeUnitInteractableRatio(e),this._listeners.forEach(function(e){this._currentViewability!==e.previousViewability&&(e.previousViewability=this._currentViewability,e(this._currentViewability,t))},this)}},UnitViewabilityObserver.prototype._start=function(){this._active||(this._active=!0,this._useIntersectionObserver&&this._intersectionObserverSetUp(),this.adapter.on("containerViewableChange",this._calc),Ticker.frame(this._calc,"update"))},UnitViewabilityObserver.prototype.stop=function(){if(this._active){this._active=!1,this.adapter.off("containerViewableChange",this._calc),Ticker.removeFrame(this._calc,"update");for(var e in this._inTimer)this.win.clearTimeout(this._inTimer[e]);this._inTimer={},this._useIntersectionObserver&&this._useIntersectionObserver.unobserve(this.element)}},UnitViewabilityObserver.prototype.waitForViewable=function(e,t){var i=function(r,n){var s=UnitViewabilityObserver.selectCriterion(e,n),a=0==s.ratio?r>0:r>=s.ratio;if(a){var o=function(){this.removeListener(i),t(s)}.bind(this);"Core"==e?o():this._inTimer[e]||(this._inTimer[e]=this.win.setTimeout(o,s.time))}else this._inTimer[e]&&(this.win.clearTimeout(this._inTimer[e]),this._inTimer[e]=null)}.bind(this);return this.addListener(i),i},UnitViewabilityObserver.prototype.waitForViewableCore=function(e){return this.waitForViewable("Core",e)},UnitViewabilityObserver.prototype.waitForViewableIAB=function(e){return this.waitForViewable("IAB",e)},UnitViewabilityObserver.prototype.waitForVideoViewableIAB=function(e){return this.waitForViewable("IABvideo",e)},UnitViewabilityObserver.prototype.waitForVideoViewableFB=function(e){return this.waitForViewable("FBvideo",e)},UnitViewabilityObserver.LARGE_AD_PIXEL_COUNT=242500,UnitViewabilityObserver.selectCriterion=function(e,t){switch(e){case"IAB":var i=t&&t.width*t.height>UnitViewabilityObserver.LARGE_AD_PIXEL_COUNT;return i?this.criteria.IABlargeAd:this.criteria.IABsmallAd;case"Core":case"IABvideo":case"FBvideo":return this.criteria[e];default:throw new Error("Unknown viewability criterion.")}},UnitViewabilityObserver.criteria={Core:{name:"Core",ratio:0,time:0},IABsmallAd:{name:"50/1",ratio:.5,time:1e3},IABlargeAd:{name:"30/1",ratio:.3,time:1e3},IABvideo:{name:"50/2",ratio:.5,time:2e3},FBvideo:{name:"50/3",ratio:.5,time:3e3}};;
function PlacementInView(t,e,i){this._init(),this.adapter=t,this.placement=e,this.node=e.getContainer(),this.inViewParent=i,this.outerRectInView=CRect.ZERO,this._lastScrollTime=0,this._isTouchDown=!1,this._autoSwitchObserverRunningState=this._autoSwitchObserverRunningState.bind(this),this.destroy=this.destroy.bind(this),this._onScroll=this._onScroll.bind(this),this._onTouchStart=this._onTouchStart.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this.hacks={wrongBoundingRectWhileScrolling:deviceInfo.os.ios()&&this.placement.isSticky},this.inViewParent||(this._tick=this._tick.bind(this),this._timestepInterval=200,this._lastRunTime=0,this.adapter.on("containerViewableChange",this._autoSwitchObserverRunningState)),e.on("destroyed",this.destroy),this._autoSwitchObserverRunningState(),e.on("shown",this._autoSwitchObserverRunningState),e.on("hidden",this._autoSwitchObserverRunningState),this.hacks.wrongBoundingRectWhileScrolling&&(this.adapter.getTopWindow().addEventListener("scroll",this._onScroll,!0),this.adapter.getTopWindow().addEventListener("touchstart",this._onTouchStart,!0),this.adapter.getTopWindow().addEventListener("touchend",this._onTouchEnd,!0))}inherit(PlacementInView,InViewObject),PlacementInView.prototype._onScroll=function(){this._lastScrollTime=Date.now()},PlacementInView.prototype._onTouchStart=function(){this._isTouchDown=!0},PlacementInView.prototype._onTouchEnd=function(){this._isTouchDown=!1},PlacementInView.prototype._autoSwitchObserverRunningState=function(){var t=this.placement.visible&&this.adapter.containerIsViewable;t&&!this.active?this.start():!t&&this.active&&(this.stop(),this.rectInView=CRect.ZERO,this.outerRectInView=CRect.ZERO,this.areaInView=0,this.emit("rectInViewChanged",this.rectInView),this.emit("outerRectInViewChanged",this.outerRectInView),Logger("InViewObject").debug(this.placement.constructor.name+", rectInViewChanged: "+this.rectInView.toString()),this.emit("areaInViewRatioChanged",this.areaInView),Logger("InViewObject").debug(this.placement.constructor.name+", areaInViewRatioChanged: "+this.areaInView))},PlacementInView.prototype.getNode=function(){return this.placement.getContainer()},PlacementInView.prototype.getOuterRectInView=function(){return this.outerRectInView},PlacementInView.prototype.getParentRect=function(){return this.inViewParent?this.inViewParent.getOuterRectInView():this.adapter.getViewportRect()},PlacementInView.prototype.computeRectInView=function(){if(!this.hacks.wrongBoundingRectWhileScrolling||!(Date.now()-this._lastScrollTime<100||this._isTouchDown)){var t=this.getNode(),e=this.adapter.getPlacementRect(this.placement),i=t?CRect.adopt(t.getBoundingClientRect()):CRect.ZERO,n=this.getParentRect(),o=this.adapter.getPlacementRect(this.placement),s=o.intersect(n),h=s.zero()?CRect.ZERO:s.map(e,i);this._computeMaxPossibleDimensions(o,this.getParentMaxPossDims()),this.rectInView.equals(h)||(this.rectInView=h,this.emit("rectInViewChanged",h),Logger("InViewObject").debug(this.placement.constructor.name+", rectInViewChanged: "+this.rectInView.toString())),this.outerRectInView.equals(s)||(this.outerRectInView=s,this.emit("outerRectInViewChanged",s),Logger("InViewObject").debug(this.placement.constructor.name+", placementRectInViewChanged: "+this.outerRectInView.toString()))}},PlacementInView.prototype.destroy=function(){this.hacks.wrongBoundingRectWhileScrolling&&(this.adapter.getTopWindow().removeEventListener("scroll",this._onScroll,!0),this.adapter.getTopWindow().removeEventListener("touchstart",this._onTouchStart,!0),this.adapter.getTopWindow().removeEventListener("touchend",this._onTouchEnd,!0)),this.stop(),this.adapter.off("containerViewableChange",this._autoSwitchObserverRunningState)},PlacementInView.prototype._start=function(){this.inViewParent?this.inViewParent.on("outerRectInViewChanged",this.computeRectInView):this.adapter.Ticker.frame(this._tick,"update")},PlacementInView.prototype._stop=function(){this.inViewParent?this.inViewParent.off("outerRectInViewChanged",this.computeRectInView):this.adapter.Ticker.removeFrame(this._tick,"update")},PlacementInView.prototype._tick=function(){var t=Date.now();t-this._lastRunTime>this._timestepInterval&&(this.computeRectInView(),this._lastRunTime=t)};;
function Tapper(e,t){function a(e){for(var t=e,a=null;1!=t.nodeType;)t=t.parentNode;for(;t&&1==t.nodeType&&t.tagName;){var n=t.tagName.toLowerCase();if(hasClass(t,"touchable")||"a"===n&&t.href||"button"===n||"img"===n||"input"===n&&t.type&&"button"===t.type.toLowerCase()){a=t;break}t=t.parentNode}return a}function n(e,t){var a=e.ownerDocument.createEvent("MouseEvents");a.initEvent("tap",!0,!0),t.dispatchEvent(a)}var c="undefined"!=typeof creative&&creative.adapter||adapter,o=c.useImprovedTapDetection?10:20,r=c.useImprovedTapDetection?200:400;t=t||c.useNativeClickForTapDetection,t&&(attach(e,"click",function(t){var c=a(t.target);c&&n(e,c)},!c.nativeClickEmittedOnSwipe),c.useNativeClickForTapDetection)||attach(e,"touchstart",function(i){var u=a(i.target);if(u){var h=!1;if(celtra.iframe()){var s=function(){var e=c.getTopWindow();return[e.scrollX,e.scrollY,e.innerWidth,e.innerHeight]},d=s();h=!0}var v=i.targetTouches[0].clientX-o,l=i.targetTouches[0].clientX+o,f=i.targetTouches[0].clientY-o,p=i.targetTouches[0].clientY+o;addClass(u,"touched");var g=!1,m=!1,T=!1,C=!1,w=new Date,D=function(e){if(!g&&!m){var t=e.targetTouches[0].clientX,a=e.targetTouches[0].clientY;g=h&&d.toString()!=s().toString(),m=!(t>=v&&l>=t&&a>=f&&p>=a),m||g?removeClass(u,"touched"):addClass(u,"touched")}},k=function(){if(!C&&(C=!0,detach(e,"touchmove",D,!1),detach(e,"touchend",arguments.callee,!1),hasClass(u,"touched"))){var a=new Date-w>r&&!deviceInfo.deviceType.desktop();if(removeClass(u,"touched"),m||g||T||a)return;t||n(e,u)}},y=function(){detach(e,"touchend",y,!0),nextFrame(function(){T=!0,k()})};attach(e,"touchcancel",function(e){removeClass(u,"touched"),k(e)},!1),attach(e,"touchmove",D,!1),attach(e,"touchend",k,!1),attach(e,"touchend",y,!0)}},!0)};
function ExpandableBannerFormat(t,e){Format.apply(this,arguments),this._expansionAlignment=this.adapter.runtimeParams.expandDirection?this.getExpansionAlignment(this.adapter.runtimeParams.expandDirection):null,this._useInPlaceExpand="SafeFrameAdapter"!=this.adapter.constructor.name&&null!==this._expansionAlignment,this._modalAttachment="inline"===this.adapter.runtimeParams._modalAttachment?"inline":"body",this._modalPositioning="screen",this._useInPlaceExpand&&(this._modalPositioning="inline"===this._modalAttachment?"container":"page"),this._modalPlacementReq={attachment:this._modalAttachment,positioning:this._modalPositioning,type:"unit"},t.adBehavior.interstitial=!1,t.adBehavior.expandable=!0,t.adBehavior.expanded=!e.banner,t.restoreScrollOnCollapse=!this._useInPlaceExpand,this._tick=this._tick.bind(this),this.setup()}inherit(ExpandableBannerFormat,Format),ExpandableBannerFormat.prototype.setup=function(){this.setupViewableTimeObserver();var t=this.adapter.adBehavior.expanded,e=new TaskScheduler;e.when("ready").run(function(){var i={banner:{attachment:"inline",positioning:"static",type:"unit"}};t&&(i.modal=this._modalPlacementReq),this.adapter.createPlacements(i,function(){if(t){var i=this.placements.modal;this.populateModal(i,function(){this.adViewableTimeObserver&&this.adViewableTimeObserver.registerUnit(i.creative.units.modal),e.notify("unitPopulated")}.bind(this))}else{var a=this.placements.banner;this.populateBanner(a,function(){this.adViewableTimeObserver&&this.adViewableTimeObserver.registerUnit(a.creative.units.banner),e.notify("unitPopulated"),a.creative.trackCreativeLoaded(this.observationAbilities),this.adapter.triggerLoadedEvent(this.units.banner.node)}.bind(this))}}.bind(this))}.bind(this)),e.when("unitPopulated").run(function(){var i=t?this.placements.modal:this.placements.banner,a=t?i.creative.units.modal:i.creative.units.banner;if(this.adapter.setMinimumSize(a.size.width,a.size.height),i.show(),this.adapter.Ticker.frame(this._tick,"update"),!this.adapter.isRxAvailable||t&&!this._useInPlaceExpand||a.updateRxState(i.root),this.adapter.canMeasureViewportPlacementGeometryRelativeToPage&&this._trackViewportPlacementGeometry(i),i===this.placements.banner){var n=!1;this.adapter.viewabilityMeasurable.viewable00?(n="1"==this.adapter.runtimeParams.immediateAppear,this.adapter.waitForViewableCore(i,a.node,function(t){i.creative.track({name:"viewable00",criterion:t}),this.adViewableTimeObserver&&(this.adViewableTimeObserver.readyToShow(),this.adapter.runtimeParams.continueMeasuringViewableTimeWhenExpanded=1),n||e.notify("placementViewable")}.bind(this)),n&&defer(e.notifies("placementViewable"),void 0,void 0,this.adapter.useAsap)):defer(e.notifies("placementViewable")),this.adapter.viewabilityMeasurable.viewable501&&this.adapter.waitForViewableIAB(i,a.node,function(t){i.creative.track({name:"viewable501",criterion:t})})}else adapter.runtimeParams.continueMeasuringViewableTimeWhenExpanded&&this.adViewableTimeObserver&&this.adViewableTimeObserver.readyToShow(),defer(e.notifies("placementViewable"))}.bind(this)),e.when("placementViewable").run(function(){this.emit("firstPlacementViewable");var i=t?"modal":"banner";this.units[i]=this.placements[i].creative.units[i],e.pause(),this.adapter.on("stateChange",function(t){this.transitionTo(t)}.bind(this)),this.transitionTo(t?"expanded":"default")}.bind(this)),this.adapter.on("ready",e.notifies("ready")),this.adapter.hook("beforeExpand",function(t){this.adapter.createPlacements({modal:this._modalPlacementReq},function(){var e=this.placements.modal.creative.units.modal,i=e.orientation;if("both"!==i&&("portrait"===i||"landscape"===i?this.adapter.setOrientationLock(i):e.wrongOrientationHandling&&(i=this._getBackwardCompatibleOrientation(e),this.adapter.setOrientationLock(i)||"noOrientation"===i||e.setCorrectOrientation(i))),this.animateExpansion=this.adapter.animateExpansion&&!android("2"),!this.animateExpansion&&!this.adapter.multiDocumentExpand){this._beforeExpandModalGeometry=this._getModalPlacementGeometry();var a=this.placements.banner;a.hide(),this.adapter.listenForExpandErrors(function(){a.show()})}t()}.bind(this))}.bind(this)),this.adapter.hook("beforeCollapse",function(t){this.placements.modal.hide(),t()}.bind(this))},ExpandableBannerFormat.prototype.populateBanner=function(t,e){var i=this.units.banner=t.creative.units.banner,a="top"==this.adapter.runtimeParams.sticky||"bottom"==this.adapter.runtimeParams.sticky;i.swipeable=!0,i.firstAppearWithoutUserInteraction=!0,this.adapter.isRxAvailable&&i.createRxState(),a&&(t.isSticky=!0),this._attachInViewToOrderedPlacements(i,t),this.connectPlacementEventsToUnitBehavior(t,i);var n=i.getNode(function(){t.setMinimumSize(i.size.width,i.size.height),t.populate(n,e),a?t.setSize(i.size.width,i.size.height):t.setSize("100%","100%"),t.setPosition(0,0)}.bind(this))},ExpandableBannerFormat.prototype.populateModal=function(t,e){var i=this.units.modal=t.creative.units.modal;i.swipeable=!1,i.showCloseButton=!this.adapter.providesCloseButton,i.fillsContainer=!0,i.usePlaceboBar=i.loadingScreen&&"undefined"!=typeof i.loadingScreen.loaderVisible?i.loadingScreen.loaderVisible:!0,i.closeAction=i.collapseAction,i.parentPlacement=this.placements.modal,t.root.classList.add("celtra-expanded-ad"),this.adapter.isRxAvailable&&this._useInPlaceExpand&&i.createRxState(),this._attachInViewToOrderedPlacements(i,t),this.connectPlacementEventsToUnitBehavior(t,i);var a=i.getNode(function(){t.usesFixedPositioning=deviceInfo.deviceType.desktop()&&!this._useInPlaceExpand,t.populate(a,e),t.setZIndex(-4),t.setSize("100%","100%"),t.setPosition(0,0),t.setBackground(t.creative.units.modal.backgroundColor)}.bind(this)),n=i.orientation;"both"!==n&&(this.adapter.setOrientationLock(n)||"portrait"!==n&&"landscape"!==n?i.wrongOrientationHandling&&(n=this._getBackwardCompatibleOrientation(i),this.adapter.setOrientationLock(n)||"noOrientation"===n||(i.enableWrongOrientationPrompt(),i.setCorrectOrientation(n))):i.enableWrongOrientationPrompt())},ExpandableBannerFormat.prototype.populateGraphics=function(t,e){this.expansionDiv=t.createElement("div"),this.expansionDiv.style.cssText="position:absolute;left:0;top:0",t.root.style.overflow="visible",t.populate(this.expansionDiv,e)},ExpandableBannerFormat.prototype.transitionTo=function(t,e,i){if(e||(e={}),null==this.state&&"default"==t)defer(function(){this.units.banner.appear(),i&&defer(i)}.bind(this),void 0,void 0,this.adapter.useAsap);else if("default"==this.state&&"expanded"==t){var a={};this.animateExpansion&&(a.graphics={attachment:this._modalAttachment,positioning:this._modalPositioning,type:"layer"}),this.adapter.createPlacements(a,function(){var t=new TaskScheduler,e=["modalPopulated"];this.animateExpansion&&(e=e.concat("graphicsPopulated","expansionAnimationEnded"),t.when("graphicsPopulated").run(function(){this.placements.graphics.show(),this.startExpansionAnimation(t.notifies("expansionAnimationEnded"))}.bind(this))),t.when("start").run(function(){var e=this.placements.modal;this.populateModal(e,function(){this.adViewableTimeObserver&&this.adViewableTimeObserver.registerUnit(e.creative.units.modal),t.notify("modalPopulated")}.bind(this)),this.animateExpansion&&this.populateGraphics(this.placements.graphics,t.notifies("graphicsPopulated"))}.bind(this)),t.when(e).run(function(){var t=this.placements.banner,e=this.placements.modal,a=t.creative.units.banner,n=e.creative.units.modal;if(a.disappear(),!this.animateExpansion){if(this._useInPlaceExpand){var s=this._beforeExpandModalGeometry||this._getModalPlacementGeometry();e.setSize(n.size.width,n.size.height),e.setPosition(s.left,s.top)}e.show()}defer(function(){n.appear(),this.adapter.startObscuringContent(),null!=n.currentScreen&&n.currentScreen.findAll().forEach(function(t){"[Clazz Video]"==t.constructor.toString()&&t._videoElement&&(t.handleNodeRemoved(),t.handleNodeInserted())}),i&&defer(i)}.bind(this))}.bind(this)),t.notify("start")}.bind(this))}else if("default"!=this.state&&"expanded"!=this.state||"dismissed"!=t)if("expanded"==this.state&&"default"==t)this.adapter.stopObscuringContent(),this.placements.modal.hide(),this.units.modal.disappear(),this.animateExpansion||this.adapter.multiDocumentExpand||this.placements.banner.show(),this.units.banner.appear(),i&&defer(i);else if(null==this.state&&"expanded"==t)this.adapter.startObscuringContent(),defer(function(){this.units.modal.appear(),i&&defer(i)}.bind(this));else{if(null!=this.state||"dismissed"!=t)throw new Error("Invalid state transition request! ("+this.state+" => "+t+")");this.destroy()}else this.adapter.stopObscuringContent(),this.destroy(),i&&defer(i);this.state=t},ExpandableBannerFormat.prototype._isValidExpandDirection=function(t){return/^(auto|(left|right|up|down)(,(left|right|up|down))?)$/g.test(t)},ExpandableBannerFormat.prototype.getExpansionAlignment=function(t){if(!this._isValidExpandDirection(t))return null;if("auto"===t)return{horizontal:"auto",vertical:"auto"};for(var e={horizontal:"center",vertical:"center"},i=t.split(","),a=0;apx, <%= ty %>px) scale3d(<%= sx %>, <%= sy %>, 1)":"translate(<%= tx %>px, <%= ty %>px) scale(<%= sx %>, <%= sy %>)"),this.expansionDiv.style.position="absolute",this.expansionDiv.style.left=0,this.expansionDiv.style.top=0,this.expansionDiv.style.width=o.width+"px",this.expansionDiv.style.height=o.height+"px",this.expansionDiv.style.background=this.units.modal.backgroundColor,this.expansionDiv.style.opacity=.01,this.expansionDiv.style.transition="none",celtra.styler.css(this.expansionDiv,"transition","none"),celtra.styler.css(this.expansionDiv,"transformOrigin","0 0"),celtra.styler.css(this.expansionDiv,"transform",n({sx:1,sy:1,tx:a,ty:i})),this.placements.graphics.setSize("100%","100%"),this.placements.graphics.setPosition(0,0),this.placements.graphics.setZIndex(-3),this.placements.graphics.show();var l=new TaskScheduler;l.when("startExpandAnimation").run(function(){celtra.styler.css(this.expansionDiv,"transition","all 0.5s ease-out"),this.expansionDiv.style.opacity=1,once(this.expansionDiv,"transitionend",l.notifies("fadeInCompleted"))}.bind(this)),l.when("fadeInCompleted").run(function(){celtra.styler.css(this.expansionDiv,"transform",n({sx:r.width/o.width,sy:r.height/o.height,tx:r.left,ty:r.top})),once(this.expansionDiv,"transitionend",l.notifies("stretched"))}.bind(this)),l.when("stretched").run(function(){celtra.styler.css(this.expansionDiv,"transition","none"),defer(function(){l.notify("modalReadyToShow")}.bind(this))}.bind(this)),l.when("modalReadyToShow").run(function(){var e=this.placements.modal;this._useInPlaceExpand?(e.setSize(this.units.modal.size.width,this.units.modal.size.height),e.setPosition(r.left,r.top)):(e.setSize("100%","100%"),e.setPosition(0,0)),e.show(),this.adapter.destroyPlacement("graphics"),t&&t()}.bind(this)),defer(l.notifies("startExpandAnimation"))},ExpandableBannerFormat.prototype.destroy=function(){this.adapter.Ticker.removeFrame(this._tick,"update"),ExpandableBannerFormat.uber.destroy.apply(this)},ExpandableBannerFormat.prototype._tick=function(){return this.placements.banner.root.ownerDocument.defaultView?(this.units.banner&&this.placements.banner._visible&&this.units.banner.updateRxState(this.placements.banner.root),void(this.units.modal&&this.placements.modal&&this.placements.modal._visible&&this._useInPlaceExpand&&this.units.modal.updateRxState(this.placements.modal.root))):void this.destroy()};;
function SDKAdapter(e,t,i,n,r,o,a,s,d,p){function h(e){return this.experiments&&this.experiments.get&&this.experiments.get(e)}function c(e,t){return"1"===t||e&&"treatment"===e.chosenVariant&&"0"!==t}this.runtimeParams=e,this.trackingCenter=t,this.aggregatorTracking=i,this.experiments=n,this.useAsap=c(h("DeferWithAsap"),e._useAsap),this._renderBeforeDomReady=c(h("RenderBeforeDomReady"),e._renderImmediately),this.macros=a,this.perf=p,defer.perf=p,this.ampDetected=!1,this.ampNestingLevel="",this.safeFrameDetected=!1,this.scriptElement=script,this.domApi=this.scriptElement.parentNode.celtra={loaded:!1,viewabilityObservee:null},this.adapterWindow=window,this.tagWindow=this.scriptElement.ownerDocument.defaultView,this.nesting=getWindowNesting(this.tagWindow),this.tagElement=this.scriptElement.parentNode,this.hostElement=this.tagElement,this.storeOpenedOverrideUrls=o,this.urlOpenedOverrideUrls=r,this.urlOpenedUrlAppendage=s,this.clickThroughDestinationUrl=d;var l=(this.experiments.get("TapDetection")||{}).chosenVariant;if(l?(this.useNativeClickForTapDetection="nativeClick"==l,this.useImprovedTapDetection="improvedTapper"==l):(this.useNativeClickForTapDetection=!0,this.useImprovedTapDetection=!1),this.nativeClickEmittedOnSwipe=deviceInfo.deviceType.desktop(),this.providesCloseButton=!1,this.enableCustomStateTransitions=!1,this.adBehavior={interstitial:!1,expandable:!1,expanded:!1,sticky:!1,crossScreenSticky:!1,attachInlinePlacementToViewport:!1,scrollable:!1},this.isRxAvailable=!1,this.viewabilityMeasurable={viewable00:!1,viewable501:!1},this.canMeasureViewportPlacementGeometry=!1,this.canMeasureViewportPlacementGeometryRelativeToPage=!1,this.canMeasureContainerAreaInViewRatio=!1,this.supportsContainerViewability=!1,this.supportsContainerInitialViewability=!1,this.useFSVP=!0,"undefined"!=typeof this.runtimeParams.topLayerZIndex){var u=parseInt(this.runtimeParams.topLayerZIndex,10);!isNaN(u)&&u>20&&(Placement.ZINDEX_MAX=Math.min(Placement.ZINDEX_MAX,u))}this.hacks={useResizeOnScroll:ios("9")},this._hooks={},this.placements={},this._handleResize=this._handleResize.bind(this),this._handleOrientationChange=this._handleOrientationChange.bind(this),this._handleViewportChange=this._handleViewportChange.bind(this),this._handleDetachedFromDocument=this._handleDetachedFromDocument.bind(this),this._updatePlacements=this._updatePlacements.bind(this),this.listenForExpandErrors=this.listenForExpandErrors.bind(this),this._keyboardShown=!1,this._initialInnerDims=null,this._onKeyboardShown=this._onKeyboardShown.bind(this),this._onKeyboardHidden=this._onKeyboardHidden.bind(this),this._resizeTimer=null,this._listening=!1,this._touchEventSimulator=null,this.hostContainerSize={width:"100%",height:"100%"},this.mediaState=new MediaState,this.nativeRAFIsSupported=["r","webkitR","mozR","msR"].some(function(e){return e+"equestAnimationFrame"in window}),this.visibilityApiIsSupported=["webkit","moz","ms",""].some(function(e){return(e?e+"Hidden":"hidden")in window.document});var m=function(e){e&&(this.trackingCenter.track({name:"containerBecameViewable"}),this.off("containerViewableChange",m))}.bind(this);defer(function(){var e=this.perf.start("Adapter.startObservingEnvironment");this._startObservingEnvironment(),e.end(),this.supportsContainerInitialViewability&&(this.containerIsViewable?this.trackingCenter.track({name:"containerBecameViewable"}):this.on("containerViewableChange",m))}.bind(this),0,"SDKAdapter defer _startObservingEnvironment",this.useAsap),this.on("containerViewableChange",this.trackingCenter.batchFlush),this.getTopWindow().document.addEventListener("unload",this.trackingCenter.batchFlush),this.getTopWindow().document.addEventListener("beforeunload",this.trackingCenter.batchFlush),this.getTopWindow().document.addEventListener("pagehide",this.trackingCenter.batchFlush),this.trackingCenter.startBatchFlushCycle(1e3),this.on("resize",this._updatePlacements),this._displayed=!1,this.on("displayed",function(){this._displayed=!0}.bind(this)),this.sdkReady=!1,this.canOpenUrlInSameWindow=!1,this._initRequestAnimationFrame(),this.once("domReady",this.perf.marks("Adapter.domReady")),this.once("documentReady",this.perf.marks("Adapter.documentReady")),this.once("sdkReady",this.perf.marks("Adapter.sdkReady")),this.once("ready",this.perf.marks("Adapter.ready")),defer(function(){var e=this.perf.start("Adapter.initSdk");this._initSdk(deferred(function(){e.end(),this.sdkReady=!0,this.emit("sdkReady")}.bind(this),0,"SDKAdapter defer sdkReady",this.useAsap))}.bind(this),0,"SDKAdapter defer _initSdk",this.useAsap),this.on("documentReady",function(){android("4.0")&&this.getTopWindow().setInterval(function(){for(var e in this.placements)this.placements[e]._flash()}.bind(this),250),this.runtimeParams._mraidCheck&&defer(function(){this.collectAndTrackData(function(e){var t={isMraid:"undefined"!=typeof this.tagWindow.mraid};e(t)}.bind(this),"mraidCheckEnvironmentInfo")}.bind(this),1e3)}.bind(this)),this.useFixedPositioningForInterstitial=!1}extend(SDKAdapter.prototype,EventEmitter),Object.defineProperty(SDKAdapter.prototype,"__CELTRA",{get:function(){return this.getTopWindow().__CELTRA||(this.getTopWindow().__CELTRA={formats:[]}),this.getTopWindow().__CELTRA},enumerable:!0}),Object.defineProperty(SDKAdapter.prototype,"assumeScrollSupported",{get:function(){return!1}}),SDKAdapter.prototype._initRequestAnimationFrame=function(){var e=this.getTopWindow();this.raf=new RequestAnimationFrameWrapper(e),this.Ticker=new CTicker(this.raf,e),this.nextFrame=this.Ticker.raf.nextFrame,this.cancelFrame=this.Ticker.raf.cancelFrame,window.nextFrame=this.Ticker.raf.nextFrame,window.cancelFrame=this.Ticker.raf.cancelFrame,window.Ticker=this.Ticker},SDKAdapter.prototype._startObservingEnvironment=function(){function e(e){return"$sf"in e&&e.$sf.ext}function t(e){return e.context&&"undefined"!=typeof e.context.pageViewId}if(!this._listening){try{for(var i=this.tagWindow,n=0;i;){if(t(i)){this.ampDetected=!0,this.ampNestingLevel=n;break}if(e(i)){this.safeFrameDetected=!0;break}if(i==i.parent)break;i=i.parent,n++}}catch(r){}this.resizeListener=this._createViewportListener(),this.resizeListener.start(this._handleResize,this._handleViewportChange);var o=this._createOrientationObserver(function(e){this.orientationObserver=e,this.orientationObserver.start(),Object.defineProperty(this,"orientation",{get:function(){return this.orientationObserver.getOrientation()}.bind(this),configurable:!0})}.bind(this));if(o&&(this.orientationObserver=o,this.orientationObserver.start(),Object.defineProperty(this,"orientation",{get:function(){return this.orientationObserver.getOrientation()}.bind(this),configurable:!0})),this.containerViewabilityObserver=this._createContainerViewabilityObserver(),this.containerViewabilityObserver.start(),Object.defineProperty(this,"containerIsViewable",{get:function(){return this.containerViewabilityObserver.isViewable}.bind(this),configurable:!0}),this.documentAttachmentObserver=this._createDocumentAttachmentObserver(),this.documentAttachmentObserver.start(this._handleDetachedFromDocument),this.on("domReady",function(){this._initDocument(deferred(this.emits("documentReady"),0,"SDKAdapter._startObservingEnvironment deferred documentReady",this.useAsap))}.bind(this)),this.once("sdkReady",function(){this.collectAndTrackData(function(e){var t=this.tagElement.parentNode,i={width:this.getTopWindow().innerWidth,height:this.getTopWindow().innerHeight},n={width:this.tagWindow.innerWidth,height:this.tagWindow.innerHeight},r={scope:"global",userAgent:this.getTopWindow().navigator.userAgent,orientation:this.orientation,topmostReachableWindow:i,hostWindow:n,nesting:this.nesting,pageVisibilityApi:this.visibilityApiIsSupported,requestAnimationFrame:this.nativeRAFIsSupported,topWindowNativeRAFSupported:this.raf.isNative,allowNonNativeRAFForViewableTimeUsed:"1"==runtimeParams._allowNonNativeRAFForViewableTime,clientTimeZoneOffsetInMinutes:(new Date).getTimezoneOffset(),supportsContainerViewability:this.supportsContainerViewability,supportsContainerInitialViewability:this.supportsContainerInitialViewability,tagParentWidth:t?t.clientWidth:"",tagParentHeight:t?t.clientHeight:"",ampDetected:this.ampDetected,ampNestingLevel:this.ampNestingLevel,safeFrameDetected:this.safeFrameDetected,fetchSupported:isFetchSupported(),asapEnabled:this.useAsap,nativePromisesSupported:isNativeImplementation(window.Promise),beaconSupported:isBeaconSupported(),IntersectionObserverSupported:"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype,isMutationObserverSupported:isNativeImplementation(window.MutationObserver),webView:deviceInfo.browser.webView()};if(runtimeParams.universalTagSignals&&(r.universalTagSignals=runtimeParams.universalTagSignals),runtimeParams.protoLoading&&(r.protoLoading=runtimeParams.protoLoading),(!this.nesting.iframe||this.nesting.friendlyIframe)&&(r.topWindowLocation=this.getTopWindow().location.href,"undefined"!=typeof r.topWindowLocation)){r.topWindowLocationLength=r.topWindowLocation.length;var o=200;r.topWindowLocationLength>o&&(r.topWindowLocation=r.topWindowLocation.slice(0,o)+"...")}e(r)}.bind(this),"environmentInfo")}.bind(this)),this._renderBeforeDomReady)this.emit("domReady");else{var a=!1;this._waitForDomReady(function(){a||(this.emit("domReady"),a=!0)}.bind(this))}this._listening=!0}},SDKAdapter.prototype._initSdk=function(e){e()},SDKAdapter.prototype._initDocument=function(e){e()},SDKAdapter.prototype._onKeyboardShown=function(){this._keyboardShown=!0},SDKAdapter.prototype._onKeyboardHidden=function(){this._keyboardShown=!1,defer(this._updatePlacements)},SDKAdapter.prototype._createViewportListener=function(){var e=this,t={_resizeCallback:null,_viewportChangeCallback:null,start:function(t,i){var n=e.getTopWindow();this._resizeCallback=t,this._viewportChangeCallback=i,n.addEventListener("resize",this._resizeHandler,!1),n.addEventListener("scroll",this._scrollHandler,!1),ios()&&(n.addEventListener("focus",this._focusHandler,!0),n.addEventListener("blur",this._blurHandler,!0))},stop:function(){var t=e.getTopWindow();t.removeEventListener("resize",this._resizeHandler,!1),t.removeEventListener("scroll",this._scrollHandler,!1),ios()&&(t.removeEventListener("focus",this._focusHandler,!0),t.removeEventListener("blur",this._blurHandler,!0))}};return t._resizeHandler=function(){e.hacks.useResizeOnScroll&&(t.numTimesScrollTriggeredAfterResize=0),"undefined"!=typeof window?(this._resizeCallback(),this._viewportChangeCallback()):e.dismiss()}.bind(t),t._scrollHandler=function(){"undefined"!=typeof window?(e.hacks.useResizeOnScroll&&void 0!==t.numTimesScrollTriggeredAfterResize&&(t.numTimesScrollTriggeredAfterResize++,t.numTimesScrollTriggeredAfterResize<=2&&this._resizeCallback()),this._viewportChangeCallback()):e.dismiss()}.bind(t),t._focusHandler=function(t){["INPUT","TEXTAREA"].indexOf(t.target.nodeName)>-1&&(e._keyboardShown=!0)},t._blurHandler=function(){e._keyboardShown=!1;var i=ios("9",null)?100:0;defer(function(){e._keyboardShown||(t._resizeCallback(),t._viewportChangeCallback())},i)},t},SDKAdapter.prototype._createOrientationObserver=function(){var e=this,t=this.getTopWindow(),i={_orientationChangeEventQueued:!1,start:function(){t.addEventListener("orientationchange",this._handler,!1)},stop:function(){t.removeEventListener("orientationchange",this._handler,!1)},getOrientation:function(){return e._normalizeOrientation(t.orientation)||0},_handler:function(){"undefined"!=typeof window?(e.emit("_rawOrientationChange"),i._orientationChangeEventQueued=!0,e.once("resize",i._trigger),setTimeout(i._trigger,1e3)):e.dismiss()},_trigger:function(){i._orientationChangeEventQueued&&(i._orientationChangeEventQueued=!1,defer(e.emits("orientationchange")))}};return i},SDKAdapter.prototype._createContainerViewabilityObserver=function(){var e=this;return{isViewable:!1,start:function(){defer(function(){this.isViewable=!0,e.emit("containerViewableChange",this.isViewable)}.bind(this),void 0,void 0,this.useAsap)},stop:function(){}}},SDKAdapter.prototype.triggerLoadedEvent=function(e){this.domApi.loaded=!0,this.domApi.viewabilityObservee=e,this._dispatchCeltraLoadedEvent(this.tagElement)},SDKAdapter.prototype.triggerClosedEvent=function(){this._dispatchCeltraClosedEvent(this.tagElement)},SDKAdapter.prototype._dispatchCeltraLoadedEvent=function(e){var t=e.ownerDocument.createEvent("HTMLEvents");t.initEvent("celtraLoaded",!0,!1),e.dispatchEvent(t)},SDKAdapter.prototype._dispatchCeltraClosedEvent=function(e){var t=e.ownerDocument.createEvent("HTMLEvents");t.initEvent("celtraClosed",!0,!1),e.dispatchEvent(t)},SDKAdapter.prototype.waitForDisplayed=function(e){return this._displayed?defer(e):void this.once("displayed",e)},SDKAdapter.prototype.waitForContainerViewable=function(e){if(this.containerIsViewable)return defer(e,void 0,void 0,this.useAsap);var t=function(i){i&&(this.off(t),defer(e,void 0,void 0,this.useAsap))}.bind(this);this.on("containerViewableChange",t)},SDKAdapter.prototype._createDocumentAttachmentObserver=function(){var e=this,t=e.tagElement,i=e.getTopWindow(),n=new i.Function("f","return function() { f(); };"),r={_detachmentHandler:null,_interval:60,_timer:null,start:function(t){this._detachmentHandler=t,this._timer=i.setTimeout(this.wrappedTimerTick,this._interval),e.Ticker.frame(this.rafTick,"update")},stop:function(){i.clearTimeout(this._timer),this._timer=null,e.Ticker.removeFrame(this.rafTick,"update")},timerTick:function(){this.isDetached()?this._detachmentHandler():this._timer=i.setTimeout(this.wrappedTimerTick,this._interval)},rafTick:function(){this.isDetached()&&this._detachmentHandler()},isDetached:function(){if(t.parentNode&&t.ownerDocument.defaultView&&window&&window.document){for(var e=t;(e=e.parentNode)&&e&&e!==e.ownerDocument.documentElement;);return e?!1:(this._timer=null,!0)}return!0}};return r.timerTick=r.timerTick.bind(r),r.rafTick=r.rafTick.bind(r),r.wrappedTimerTick=n(r.timerTick),r},SDKAdapter.prototype._normalizeOrientation=function(e){var t=this.getTopWindow().navigator.userAgent,i=["Nexus 10","GT-N8","SM-P60","GT-P5","SCH-19","GT-P7","SM-T9","SM-T8"];return i.some(function(e){return-1!=t.indexOf(e)})&&(e+=90,270==e&&(e=-90)),e},SDKAdapter.prototype._waitForDomReady=function(e){var t=this.getTopWindow().document;"interactive"===t.readyState||"loaded"===t.readyState||"complete"===t.readyState?defer(e,0,"SDKAdapter._waitForDomReady defer cb",this.useAsap):t.addEventListener("DOMContentLoaded",e,!1)},SDKAdapter.prototype.waitForWindowLoad=function(e){var t=this.getTopWindow(),i=30,n=!1,r=function(){n||(n=!0,e())};"complete"===t.document.readyState?defer(e,0,"SDKAdapter.waitForWindowLoad readyState === complete cb",this.useAsap):(t.setTimeout(r,1e3*i),t.addEventListener("load",r,!1))},SDKAdapter.prototype._stopObservingEnvironment=function(){this._listening&&(this.resizeListener.stop(this._handleResize),this.orientationObserver.stop(),this.documentAttachmentObserver.stop(),this._listening=!1)},SDKAdapter.prototype.setMinimumSize=function(){},SDKAdapter.prototype._handleResize=function(){var e=!1;this.emit("beforeResize",function(t){e=t}),e?defer(function(){this.emit("resize")}.bind(this),700):this.emit("resize")},SDKAdapter.prototype._handleViewportChange=function(){this.emit("viewportChange")},SDKAdapter.prototype._handleOrientationChange=function(e){this.emit("orientationchange",e)},SDKAdapter.prototype._handleDetachedFromDocument=function(){this.dismiss()},SDKAdapter.prototype._updatePlacements=function(e){function t(){--i||(e&&e(),defer(n.emits("placementsUpdated"),void 0,void 0,this.useAsap))}if(e=e||noop,this._keyboardShown)return e();var i=0,n=this;for(var r in this.placements)i++,"undefined"!=typeof window&&this.placements[r].update(t,this.adBehavior.crossScreenSticky)},SDKAdapter.prototype._stopAllMedia=function(e){this._stopMediaTagsInPlacements(),this.emit("mediaStopRequested",e)},SDKAdapter.prototype._stopMediaTagsInPlacements=function(){for(var e in this.placements)for(var t=this.placements[e].querySelectorAll("audio,video"),i=0;it.height?"landscape":e():e()},SDKAdapter.prototype.collectAndTrackData=function(e,t){function i(){try{e(function(e){e.name=t,this.trackingCenter.trackNoLaterThan(e,n)}.bind(this))}catch(i){this.trackingCenter.trackNoLaterThan({name:t,error:i.message+"\n"+i.stack},n)}}if("function"!=typeof e)throw new Error("The dataCollector param was not a function.");if("undefined"==typeof t)throw new Error("The eventName param was not defined.");var n=1e3;defer(i.bind(this),void 0,void 0,this.useAsap)},SDKAdapter.prototype._createViewportElement=function(){var e=document.createElement("div");return e.id="viewport",e.style.cssText="position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible;",this.tagWindow.document.body.appendChild(e),e},SDKAdapter.prototype._getViewportElement=function(){return this.viewport},SDKAdapter.prototype.listenForExpandErrors=function(){},SDKAdapter.prototype.enableScroll=function(){},SDKAdapter.prototype.disableScroll=function(){};;
function BrowserAdapter(){BrowserAdapter.uberConstructor.apply(this,arguments),this.isSingleOccupant=!1,this.hasDeadZones=ios("7"),this.isRxAvailable=!0,this.canOpenUrlInSameWindow=!0,this.on("ready",function(){this._setupMouseLeaveObserver(),defer(this.emits("displayed"),void 0,"BrowserAdapter emits displayed on ready",this.useAsap)}.bind(this))}inherit(BrowserAdapter,SDKAdapter),Object.defineProperty(BrowserAdapter.prototype,"assumeScrollSupported",{get:function(){var e=this.getTopWindow().document.body.scrollHeight>this.getTopWindow().innerHeight;return e&&!this.nesting.hostileIframe}}),BrowserAdapter.prototype._setupMouseLeaveObserver=function(){var e=this.getTopWindow();"ontouchstart"in e||navigator.msMaxTouchPoints||attach(e.document,"mouseout",function(t){t=t?t:e.event;var i=e.document.documentElement,n=Math.max(i.clientWidth,e.innerWidth||0),r=Math.max(i.clientHeight,e.innerHeight||0),o=t.clientX||t.pageX,s=t.clientY||t.pageY,a=1>o,p=o>n-1,d=1>s,l=s>r-1;t.toElement&&"HTML"!==t.toElement.tagName||!(a||p||d||l)||Object.keys(this.placements).forEach(function(e){this.placements[e].touchEventSimulator&&this.placements[e].touchEventSimulator.cancelInteraction()},this)}.bind(this),!1)},BrowserAdapter.prototype._enableClickShield=function(){function e(e){e.preventDefault(),e.stopPropagation(),i()}function t(){a&&(new Date-d>n?i():o.requestAnimationFrame(t))}function i(){a&&a.parentNode&&(a.removeEventListener("click",e,!0),a.parentNode.removeChild(a),a=null)}var n=500,r=Math.round(1e4*Math.random()),o=this.getTopWindow(),s=o.document,a=(o.document.documentElement,s.createElement("div")),p=s.createElement("script"),d=new Date;a.id="celtra-click-shield-"+r,a.style.position="absolute",a.style.left=a.style.top=0,a.style.width="100%",a.style.height="100%",a.style.background="none",a.style.zIndex=Placement.ZINDEX_MAX,a.style.webkitTapHighlightColor="rgba(0,0,0,0)",a.addEventListener("click",e,!0),s.body.appendChild(a),p.type="text/javascript";var l="window.setTimeout(function() { var shield = document.getElementById('"+a.id+"'); if (shield) { shield.parentNode.removeChild(shield); }}, "+n+");";try{p.appendChild(s.createTextNode(l))}catch(c){p.text=l}a.appendChild(p),o.requestAnimationFrame(t),defer(i,n)},BrowserAdapter.prototype._createContainerViewabilityObserver=function(){var e=this,t=this.getTopWindow().document,i={isSupported:!1,propertyName:"",eventName:"",isVisible:function(){return this.isSupported?!t[this.propertyName]:!0},init:function(){["webkit","moz","ms",""].forEach(function(e){var i=e?e+"Hidden":"hidden";i in t&&(this.isSupported=!0,this.propertyName=i,this.eventName=e+"visibilitychange")},this)}};i.init();var n=this.useAsap,r={isViewable:!1,start:function(){i.isVisible()&&defer(o,void 0,"BrowserAdapter observer start",n),i.isSupported&&t.addEventListener(i.eventName,o)},stop:function(){i.isSupported&&t.removeEventListener(i.eventName,o)}},o=function(){var t=this.isViewable;this.isViewable=i.isVisible(),t!=this.isViewable&&e.emit("containerViewableChange",this.isViewable)}.bind(r);return r},BrowserAdapter.prototype._downsizePlacements=function(){for(var e in this.placements)"screen"!==this.placements[e].positioning||this.placements[e].preventDownsizeHack||this.placements[e].setSize(1,1,!0)},BrowserAdapter.prototype._getUnitViewabilityObserver=function(e,t){var i=-1!==["newGeometryWithSampling","newGeometryWithoutSampling"].indexOf(this.experiments.get("UseNewUnitViewabilityLogic")&&this.experiments.get("UseNewUnitViewabilityLogic").chosenVariant),n="IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype,r=i&&n;return this._unitViewabilityObserver||(this._unitViewabilityObserver=new UnitViewabilityObserver(this,e,t,r)),this._unitViewabilityObserver},BrowserAdapter.prototype.waitForViewableCore=function(e,t,i){return this._getUnitViewabilityObserver(e,t).waitForViewableCore(i)},BrowserAdapter.prototype.waitForViewableIAB=function(e,t,i){return this._getUnitViewabilityObserver(e,t).waitForViewableIAB(i)},BrowserAdapter.prototype.removeViewabilityListener=function(e,t,i){this._getUnitViewabilityObserver(e,t).removeListener(i)},BrowserAdapter.prototype._disableScrollHandler=function(e){-1==["INPUT","TEXTAREA","SELECT"].indexOf(e.target.tagName)&&e.preventDefault()};;
function MobileWebAdapter(e,t,i){if(MobileWebAdapter.uberConstructor.apply(this,arguments),this.isInlineWebPlacement=!(this.isSingleOccupant||this.nesting.hostileIframe||this.nesting.friendlyIframe&&!this.nesting.iabFriendlyIframe),this.muteSoundIfVideoStartedOnTouchStartEvent=android(),this.unitScript=unitScript,this.requiredDeviceType=requiredDeviceType,this.trackingCenter=t,this.aggregatorTracking=i,this.__CELTRA.stickyPresent&&this.runtimeParams.sticky)return t.track({name:"userError",userErrorId:"multipleStickyAds"}),defer(this.dismiss.bind(this));if(this.runtimeParams.sticky&&(this.__CELTRA.stickyPresent=!0),this.hacks.needsConstantFlashing=kindleSilk("1")||/\bHTC.One.S\b/.test(navigator.userAgent),this.hacks.requiresHidingInputsAndLinks=android()&&(/HTC/g.test(navigator.userAgent)||"hiding"==this.runtimeParams.focusableHighlightFix),this.hacks.fixFocusablesHighlighting=android("4.0"),this.hacks.requiresWrappingPlacementWithComments=windows("10"),this.providesCloseButton=!1,this.enableCustomStateTransitions=!(/Windowshop/.test(navigator.userAgent)&&kindle()),(!this.nesting.iframe||this.nesting.iabFriendlyIframe)&&(this.viewabilityMeasurable={viewable00:!0,viewable501:this.visibilityApiIsSupported},this.canMeasureViewportPlacementGeometry=!0,this.supportsContainerViewability=!0,this.supportsContainerInitialViewability=!0),this.nesting.iframe&&!this.nesting.iabFriendlyIframe||this.runtimeParams.sticky||(this.canMeasureViewportPlacementGeometryRelativeToPage=!0),this.nesting.iabFriendlyIframe){var n=this.tagWindow;try{for(;n!==n.parent&&getWindowNesting(n.parent).iabFriendlyIframe;)n=n.parent}catch(s){}this._iabWin=n,this.win=this._iabWin.parent,this.hostElement=this.win.document.createElement("div"),this.hostElement.className="celtra-ad-host",this.readIABIFrameHeight=function(){function e(e){return"%"===e.slice(-1)?"%":"px"}var t=this.tagWindow.frameElement,i=t.style.height||t.getAttribute("height")||"0",n=parseInt(i,10),s=e(i);return{value:n,unit:s,toString:function(){return n+s}}},this._iabWin.frameElement.parentNode.insertBefore(this.hostElement,this._iabWin.frameElement.nextSibling)}else this.win=this.tagWindow;this.hacks.requiresWrappingPlacementWithComments&&(this.hostElement.parentNode.insertBefore(this.win.document.createComment("ie10hack"),this.hostElement),this.hostElement.parentNode.insertBefore(this.win.document.createComment("ie10hack"),this.hostElement.nextSibling)),this._parentPageHighlightStyle=null,this._downsizePlacements=this._downsizePlacements.bind(this),this._updatePlacements=this._updatePlacements.bind(this),this._topListenerAttached=!1,this._hasBeenViewable=!1,this.useFSVP=!(this.nesting.hostileIframe&&!deviceInfo.os.ios()&&!this.adBehavior.interstitial),this.restoreScrollOnCollapse=!deviceInfo.deviceType.desktop(),this.hostElement.activeAdapter||(this.hostElement.activeAdapter=this,this.on("documentReady",function(){this.hacks.needsConstantFlashing&&this.getTopWindow().setInterval(function(){for(var e in this.placements)this.placements[e]._flash()}.bind(this),200),this.adBehavior.adWillHideIframe||this.hideIABFriendlyIframe(),this.useFSVP&&"undefined"!=typeof FullscreenVideoPlayer&&FullscreenVideoPlayer.init({baseUrl:(this.runtimeParams.secure?urls.staticUrl:urls.insecureStaticUrl)+"runner/FullscreenVideoPlayer/"}),this.emit("ready")}.bind(this)),this.trackViewableAreaRatio=this.trackViewableAreaRatio.bind(this),this._viewableAreaRatio=0,this.useFixedPositioningForInterstitial=!0)}inherit(MobileWebAdapter,BrowserAdapter),MobileWebAdapter.prototype.hideIABFriendlyIframe=function(){this.adBehavior.interstitial||this.nesting.iabFriendlyIframe&&(this._iabWin.frameElement.style.display="none")},MobileWebAdapter.prototype.setMinimumSize=function(e,t){this.hostElement.style.minWidth=e+"px",this.runtimeParams.sticky||(this.hostElement.style.minHeight=t+"px")},MobileWebAdapter.prototype._createViewportListener=function(){var e;return android()||kindleSilk()?(e=new ViewportObserver(this.getTopWindow()),e.on("keyboardShown",this._onKeyboardShown),e.on("keyboardHidden",this._onKeyboardHidden),this.on("_rawOrientationChange",this._downsizePlacements)):(e=MobileWebAdapter.uber._createViewportListener.apply(this),ios("8",null)&&(e._resizeHandler=deferred(e._resizeHandler),e._scrollHandler=deferred(e._scrollHandler))),e},MobileWebAdapter.prototype.createPlacement=function(e,t){function i(){defer(function(){t&&t(r)},void 0,void 0,h)}var n={trackingCenter:this.trackingCenter,aggregatorTracking:this.aggregatorTracking,experiments:this.experiments,adapter:this,console:console,runtimeParams:this.runtimeParams,celtraDeviceInfoRuntimeParams:this.runtimeParams.deviceInfo,nextFrame:this.nextFrame,cancelFrame:this.cancelFrame,Ticker:this.Ticker,macros:this.macros,perf:this.perf},s={urls:urls,urlOpenedOverrideUrls:this.urlOpenedOverrideUrls,storeOpenedOverrideUrls:this.storeOpenedOverrideUrls,urlOpenedUrlAppendage:this.urlOpenedUrlAppendage,clickThroughDestinationUrl:this.clickThroughDestinationUrl},r=null;switch(this._initialInnerDims={height:adapter.getTopWindow().innerHeight,width:adapter.getTopWindow().innerWidth},e.type){case"unit":if(["top","bottom"].indexOf(runtimeParams.sticky)>-1&&"static"==e.positioning){e.positioning="screen",e.attachment="body";var a={stickiness:runtimeParams.sticky,showDismissButton:"1"==runtimeParams.showDismissButton||"1"==runtimeParams.showStickyCloseButton,baseUrl:runtimeParams.secure?urls.staticUrl:urls.insecureStaticUrl,dismissCallback:function(){this.placements.banner.creative.units.banner.trackCreativeDismissed(),this.dismiss()}.bind(this)};r=new StickyPlacement(e.positioning,this.unitScript,n,s,a)}else r=new IframePlacement(e.positioning,this.unitScript,n,s);break;case"layer":r=new DivPlacement(e.positioning);break;default:throw new Error("I can't do that, Dave.")}if(!r.root||!r.root.parentNode){var o;"node"==e.attachment?o=e.parentNode:"placement"==e.attachment?o=e.placement.root:"inline"==e.attachment?this.isInlineWebPlacement||!this.adBehavior.attachInlinePlacementToViewport?o=this.hostElement:(this.viewport||(this.viewport=this._createViewportElement()),o=this.viewport):o=this.adBehavior.interstitial&&this.nesting.friendlyIframe&&!this.nesting.iabFriendlyIframe&&"1"==this.runtimeParams._nobust?this.tagWindow.document.body:this.getTopWindow().document.body,r.attachTo(o,i)}(ios()||kindleSilk())&&r.once("populated",function(){(r instanceof IframePlacement||!(r instanceof IframePlacement)&&!this._topListenerAttached)&&(r.getContainer().ownerDocument.addEventListener("focus",this._onKeyboardShown,!0),r.getContainer().ownerDocument.addEventListener("blur",this._onKeyboardHidden,!0),this._topListenerAttached=!0)}.bind(this));var h=this.useAsap},MobileWebAdapter.prototype.getTopWindow=function(){return this.nesting.hostileIframe?this.tagWindow:SDKAdapter.prototype.getTopWindow.apply(this)},MobileWebAdapter.prototype.expand=function(e,t){return this.nesting.hostileIframe?(this.openBrowserSameWindowInHostileIFrame(this.placements.banner.creative.wrapRedirectPageUrl(this.getModalUrl())),void(e&&e())):(this.animateExpansion=""!=t.animation&&this.enableCustomStateTransitions,this._stopAllMedia(),this._preExpandScroll={x:this.win.scrollX,y:this.win.scrollY},void this.waitForHook("beforeExpand",function(){this._enableClickShield(),defer(function(){this.emit("stateChange","expanded")}.bind(this)),e&&e()}.bind(this)))},MobileWebAdapter.prototype.collapse=function(e){this._stopAllMedia(),this.waitForHook("beforeCollapse",function(){this.restoreScrollOnCollapse&&this._preExpandScroll&&this.win.scrollTo(this._preExpandScroll.x,this._preExpandScroll.y),this._enableClickShield(),defer(function(){this.emit("stateChange","default")}.bind(this)),e&&e()}.bind(this))},MobileWebAdapter.prototype.dismiss=function(e,t){this._stopAllMedia();var i={};t&&Object.keys(t).forEach(function(e){i[e]=t[e]}),this.waitForHook("beforeDismiss",function(){this.Ticker.stop(),this._stopObservingEnvironment(),this.emit("stateChange","dismissed"),this.trackingCenter.flush(),this.hostElement&&this.hostElement.parentNode&&(this._enableClickShield(),this.hostElement.parentNode.removeChild(this.hostElement)),this.__CELTRA.stickyPresent&&(this.runtimeParams.sticky||this.adBehavior.sticky)&&(this.__CELTRA.stickyPresent=!1),(e||noop)()}.bind(this),i)},MobileWebAdapter.prototype.resize=function(e,t){var i={};t&&Object.keys(t).forEach(function(e){i[e]=t[e]}),this._enableClickShield(),this.waitForHook("beforeResize",e,i)},MobileWebAdapter.prototype.playVideoInPlayer=function(e,t){this.useFSVP?FullscreenVideoPlayer.play(e,t):(this.openBrowserSameWindowInHostileIFrame(e.url),t(!0))},MobileWebAdapter.prototype.callPhone=function(e){if(/Chrome/.test(navigator.userAgent)||ios("9",null)){var t=document.createElement("a");t.href="tel:"+encodeURIComponent(e),t.addEventListener("click",function(){t.parentNode.removeChild(t)}),this.getTopWindow().document.body.appendChild(t),t.click()}else MobileWebAdapter.uber.callPhone.apply(this,arguments)},MobileWebAdapter.prototype._openInSameWindow=function(e){this.nesting.hostileIframe?this.openBrowserSameWindowInHostileIFrame(e):this.getTopWindow().location.href=e},MobileWebAdapter.prototype.getApp=function(e){this.openBrowser(e)},MobileWebAdapter.prototype.canSaveImage=function(){return desktop()||android()?!0:!1},MobileWebAdapter.prototype.saveImage=function(e,t,i){this.openBrowser(e+"?transform=download&name="+t),i()},MobileWebAdapter.prototype.startObscuringContent=function(){this.hacks.fixFocusablesHighlighting&&(this._parentPageHighlightStyle&&this.stopObscuringContent(),this._parentPageHighlightStyle=this.getTopWindow().document.createElement("style"),this._parentPageHighlightStyle.textContent="a, input, textarea, select { -webkit-tap-highlight-color: rgba(255, 0, 0, 0) !important; }input, textarea, select { visibility: hidden !important; }",this.getTopWindow().document.querySelector("head").appendChild(this._parentPageHighlightStyle))},MobileWebAdapter.prototype.stopObscuringContent=function(){this.hacks.fixFocusablesHighlighting&&(this._parentPageHighlightStyle&&this._parentPageHighlightStyle.parentNode&&this._parentPageHighlightStyle.parentNode.removeChild(this._parentPageHighlightStyle),this._parentPageHighlightStyle=null)},MobileWebAdapter.prototype._stopObservingEnvironment=function(){this._unitViewabilityObserver&&this._unitViewabilityObserver.stop(),MobileWebAdapter.uber._stopObservingEnvironment.apply(this,arguments)},MobileWebAdapter.prototype.waitForViewableIAB=function(e,t,i){this._getUnitViewabilityObserver(e,t).waitForViewableIAB(i),this.experiments.get("TrackViewableAreaChange")&&this._setupViewableAreaChangeObserver()},MobileWebAdapter.prototype.trackViewableAreaRatio=function(){var e={name:"viewableAreaRatio",ratio:this._viewableAreaRatio};this.trackingCenter.track(e)},MobileWebAdapter.prototype._setupViewableAreaChangeObserver=function(){var e=!1,t=this.getTopWindow(),i=!0,n=0,s=0,r=1e3,a=0,o=30,h=function(){s=n;var e={name:"largestViewableAreaRatio",ratio:n};this.trackingCenter.track(e)}.bind(this),l=function(l){this._viewableAreaRatio=l,l>n&&(n=l),i?(i=!1,this.trackViewableAreaRatio(),h()):!e&&o>a&&(e=!0,a++,t.setTimeout(function(){e=!1,n>s&&h(),this.trackViewableAreaRatio()}.bind(this),r))}.bind(this);this._unitViewabilityObserver.addListener(l)},MobileWebAdapter.prototype._removeDisableScrollEventListeners=function(e){if(e){if(this.useNativeClickForTapDetection)var t=["touchmove","wheel"];else var t=["touchstart","touchmove","touchend","wheel"];for(var i=0;i=this.heightCutoff)),this._keyboardShown}.bind(this);null!==i.width||e()?i.width==t.width&&(i.height-this.heightCutoff>t.height?(this.keyboardShown=!0,this.emit("keyboardShown")):(this.keyboardShown=!1,this.emit("keyboardHidden")),this._resizeCallback(),this._viewportUpdateCallback(),this.updateDimensions()):(this._resizeCallback(),this._viewportUpdateCallback())},ViewportObserver.prototype.updateDimensions=function(){var t=this.dimensions[this.orientation],i=this.getViewportGeometry();t.left=i.left,t.top=i.top,t.width=null===t.width?i.width:t.width,t.height=Math.max(i.height,t.height)},ViewportObserver.prototype.getViewportGeometry=function(){var t=this.win.document.documentElement;return{width:this.win.innerWidth,height:this.win.innerHeight,left:this.win.scrollX||t&&t.scrollLeft||0,top:this.win.scrollY||t&&t.scrollTop||0}};;
Logger.initFromRuntimeParams(runtimeParams);
var urls = {"creativeUrl":"https://ads.celtra.com/compiled/eb35677a/","apiUrl":"https://hub.celtra.com/api/","cachedApiUrl":"https://cache-ssl.celtra.com/api/","staticUrl":"https://cache-ssl.celtra.com/api/static/v67565bff82/","insecureCreativeUrl":"http://ads.celtra.com/compiled/eb35677a/","insecureApiUrl":"http://hub.celtra.com/api/","insecureCachedApiUrl":"http://cache.celtra.com/api/","insecureStaticUrl":"http://cache.celtra.com/api/static/v67565bff82/","trackingUrl":"https://track.celtra.com/","insecureTrackingUrl":"http://track.celtra.com/","geoUrl":"https://geo.celtra.com/","insecureGeoUrl":"http://geo.celtra.com/","customAudiencesUrl":"https://audiences.celtra.com","insecureCustomAudiencesUrl":"http://audiences.celtra.com"};
urls.resourceUrl = runtimeParams.secure ? urls.staticUrl : urls.insecureStaticUrl;
var shouldBatchTrackers = !!'';
var trackingCenter = new TrackingCenter(
runtimeParams.sessionId,
runtimeParams.accountId,
runtimeParams.purpose,
runtimeParams.secure ? urls.trackingUrl : urls.insecureTrackingUrl,
trackers,
runtimeParams._batchTrackers === '1' || shouldBatchTrackers
);
if (runtimeParams.fallbackSdkUsed === '1') {
trackingCenter.track({
name : 'fallbackSdkUsed',
sdk : 'MobileWeb'
});
}
var aggregatorTracking = new AggregatorTracking(trackingCenter);
var experiments = new Experiments(runtimeParams.variantChoices, trackingCenter);
var trackingLoadingTimesExperiment = experiments.get('TrackingLoadingTimes');
var perf = new PerformanceTracker(trackingCenter, experiments);
if (runtimeParams.clientTimestamp) {
// Do it manually instead of using var p = perf.start() + p.end() pattern because we want to log
// times from before PerformanceTracker is available
perf.collect({
name: 'redirectDownload',
type: 'interval',
id: null,
startTime: parseFloat(runtimeParams.clientTimestamp) * 1000,
endTime: runtimeParams.redirectJsClientTimestamp * 1000,
args: []
});
}
perf.collect({
name: 'payloadDownload',
type: 'interval',
id: null,
startTime: runtimeParams.redirectJsClientTimestamp * 1000,
endTime: runtimeParams.payloadJsClientTimestamp * 1000,
args: []
});
var unitName = 'banner';
var requiredDeviceType = 'Desktop';
perf.collect({
name: 'payLoadDownloadedToAdapter.new',
type: 'interval',
id: null,
startTime: runtimeParams.payloadJsClientTimestamp * 1000,
endTime: Date.now(),
args: []
});
var perfAdapterNew = perf.start('Adapter.new');
var adapter = new MobileWebAdapter(runtimeParams, trackingCenter, aggregatorTracking, experiments, urlOpenedOverrideUrls, storeOpenedOverrideUrls, macros, urlOpenedUrlAppendage, clickThroughDestinationUrl, perf);
perfAdapterNew.end();
trackingCenter.windowForPixels = adapter.getTopWindow();
var perfFormatNew = perf.start('Format.new');
var format = new ExpandableBannerFormat(adapter, {"banner":{"size":null,"layouts":[{"orientation":"independent","minSize":{"width":0,"height":0},"unitSize":{"width":970,"height":55},"designTimeSize":{"width":970,"height":55},"unitAlignment":{"horizontal":"center","vertical":"center"}}]},"modal":{"size":null,"layouts":[{"orientation":"independent","minSize":{"width":0,"height":0},"unitSize":{"width":970,"height":250},"designTimeSize":{"width":970,"height":250},"unitAlignment":{"horizontal":"center","vertical":"center"}}]}});
perfFormatNew.end();