[\\s\\S]*?","gi");do t=e,e=e.replace(r,"");while(e!==t);return e.replace(/=1424&&1535>=e||e>=1536&&1791>=e||e>=1792&&1871>=e||e>=1872&&1919>=e||e>=2144&&2159>=e||e>=2208&&2303>=e||e>=64288&&64335>=e||e>=64336&&65023>=e||e>=65136&&65279>=e||8207===e||8235===e||8238===e)?!0:!1}function isLTRChar(e){return e=String(e).charCodeAt(0),e&&(e>=65&&90>=e||e>=97&&122>=e||e>=192&&214>=e||e>=216&&246>=e||e>=248&&696>=e||e>=768&&1424>=e||e>=2048&&8191>=e||e>=11264&&64284>=e||e>=65022&&65135>=e||e>=65277&&65535>=e||8206===e||8234===e||8237===e)?!0:!1}function guessWritingDirection(e){for(var t=25,n=Math.min(t,e.length),r=0;n>r;r++){var o=e.charAt(r);if(isLTRChar(o))return"ltr";if(isRTLChar(o))return"rtl"}return null}function randInt(){return(Math.random()+"").slice(2)}function _isListenerOptionSupported(e){var t=_isListenerOptionSupported.opts;if("undefined"==typeof t[e]){t[e]=!1;try{window.addEventListener("listener-test",null,Object.defineProperty({},e,{get:function(){t[e]=!0}}))}catch(n){}}return t[e]}function _buildNativeListenerOptions(e){if("object"!=typeof e)return!!e;if(!_isListenerOptionSupported("capture"))return!!e.capture;var t={capture:!!e.capture};return _isListenerOptionSupported("passive")&&(t.passive=!!e.passive),t}function _analyzeTouch(e){var t,n=Math.abs(e.firstTouch.x-e.lastTouch.x),r=Math.abs(e.firstTouch.y-e.lastTouch.y);return"y"===e.validAxis?t=r>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&&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;if("http"==!e.slice(0,4))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 c=(creative.runtimeParams.secure?creative.cachedApiUrl:creative.insecureCachedApiUrl)+"shortenedUrls/",u={url:e,fields:"shortUrlKey"},s=btoa(to_utf8(e));s=s.replace(/\//g,"$").replace(/\+/g,"_").replace(/=/g,"");var d={cbName:"shortener_"+s};loadJSONP(c+"?"+buildQuery(u),d,function(t){var n=creative.shareUrl+t.shortUrlKey;a[e]=n,r("success",n)},function(){requestCreateShortenedUrl(e,r)})}}function requestCreateShortenedUrl(e,t){var n=(creative.runtimeParams.secure?creative.apiUrl:creative.insecureApiUrl)+"shortenedUrls/",r=fetchShortenedUrl.cache,o=new XMLHttpRequest;o.open("POST",n),o.setRequestHeader("Content-Type","application/json; charset=utf-8"),o.onreadystatechange=function(){if(4===o.readyState)if(201===o.status){var n=JSON.parse(o.responseText),i=creative.shareUrl+n.shortUrlKey;r[e]=i,t("success",i)}else t("error")},o.send(JSON.stringify({url:e}))}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 getViewportGeometry(e,t){var n=deviceInfo.deviceType.desktop()&&"BackCompat"!=e.document.compatMode,r=deviceInfo.os.ios("9",null),o="win"!==t&&(n||r||"doc"===t),i="win"!==t&&(n||"doc"===t),a=e.document.documentElement||{};return{width:o?a.clientWidth:e.innerWidth,height:i?a.clientHeight:e.innerHeight,left:e.scrollX||a.scrollLeft||0,top:e.scrollY||a.scrollTop||0}}function safeQuerySelector(e,t){try{return e.querySelector(t)}catch(n){return null}}function safeQuerySelectorAll(e,t){try{return e.querySelectorAll(t)}catch(n){return[]}}!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={};;
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)};;
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.lengthn[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("Chrom")&&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 0===this.name.indexOf("Firefox")&&s(this.version,arguments)},r.prototype.edge=function(){return"Edge"===this.name&&s(this.version,arguments)},r.prototype.miui=function(){return"MIUI Browser"===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},r.prototype.facebookApp=function(){var e=this.userAgent;return e.indexOf("FBAN")>-1||e.indexOf("FBAV")>-1},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);;
var Freezer={};Freezer.unfreeze=function(n,e,o){function t(n,e,o,t,a){ActionInvocationSimulator.isDryRun()?ActionInvocationSimulator.needsDryRun(n.internalId)&&(ActionInvocationSimulator.logActionDryRun(n.internalId,n.method,e.localId),e[n.method+"ActionDryRun"]?e[n.method+"ActionDryRun"](o,t,a):a()):e[n.method+"Action"](o,t,a)}function a(n){if(n instanceof Array)return n.map(a);if(n instanceof Object){var o;if("ActionInvocation"===n.clazz){n.internalId=++c;var s=l;o=function(e,a){if(!e)throw"Cannot execute an action without a context.";a||(a=noop);var i=o.isStatic;if("undefined"==typeof i&&(i=!o.instance),o.disabled)return void a();if(i){if(o.instance)throw"ActionInvocation for a static method must not have an instance assigned.";if("function"!=typeof o.actionClazz[o.method+"Action"])throw"Clazz "+o.actionClazz+' does not define the static action "'+o.method+'".';var r=extend({},o.args,{triggerId:s,caller:n});t(o,o.actionClazz,e,r,a)}else if(o.instance){if(!(o.instance instanceof o.actionClazz))throw"Instance "+o.instance+" is not an instance of clazz "+o.actionClazz;if("function"!=typeof o.instance[o.method+"Action"])throw"Instance of clazz "+o.actionClazz+' does not define the instance action "'+o.method+'".';var r=extend({},o.args,{triggerId:s,caller:n});t(o,o.instance,e,r,a)}else ActionInvocationSimulator.isDryRun()?a():defer(a,0,"Freezer.unfreeze defer c")}}else if(n.clazz){var f=e[n.clazz];if(!f)throw new Error("Unsupported clazz: "+n.clazz);o=Object.create(f.prototype)}else o={},n.onFire&&(l=n.type);for(var d in n)n.hasOwnProperty(d)&&"clazz"!==d&&(o[d]=a(n[d]));i.push(o),o.localId&&(r[o.localId]&&console.error("Duplicate localId: "+o.localId),r[o.localId]=o);for(var d in o)if("clazz"===d.slice(-5).toLowerCase()){var z=o[d];if(!z)continue;e[z]?o[d]=e[z]:console.error("Unsupported clazz: "+o.clazz)}return o}return n}var i=[],r={},c=0,l=null,s=a(n);i.forEach(function(n){for(var e in n)if("LocalId"===e.slice(-7)){var o=n[e];if(o instanceof Function)continue;var t;null===o?t=null:(t=r[o],t||console.error("Invalid localId reference: "+o)),n[e.slice(0,-7)]=t,delete n[e]}else if("LocalIds"===e.slice(-8)){for(var a=[],i=0;in-c;if(!o){var i=t._downloadQueue[r];i.requested||(i.requested=!0,e.push(r),i.secure&&(a=!0))}}e.length&&(Logger("batcher").log(e.length+" new batchable URLs requested during last runloop iteration ("+(a?"at least one secure":"none secure")+"):\n - "+e.join("\n - ")),t._loadBatch(a,e,function(e){for(var a in e){var r=e[a];r===!1&&(r=(t._downloadQueue[a].secure?creative.cachedApiUrl:creative.insecureCachedApiUrl)+a),t._cache[a]=r,t._downloadQueue[a].callbacks.forEach(function(e){e(r)}),delete t._downloadQueue[a]}}))},0,"Batcher.getDataUri downloadQueue",useAsap())):defer(function(){a(e)},0,"Batcher.getDataUri url not batchable",useAsap())},Batcher.prototype._generateBatchUrl=function(e,a){var t=(e?creative.cachedApiUrl:creative.insecureCachedApiUrl)+"batch?urls="+a.sort().map(encodeURIComponent).join(",");return t},Batcher.prototype._loadBatch=function(e,a,t){function r(e){var a,t=5381;for(a=0;al+i*l||r>d+c*d)&&(j.addPoint(t,n,a/1e3,u(document.elementFromPoint(t,n))),E=a,M=0)}}function r(e){var t=Date.now();L=S.setTimeout(function(){i(e,t)},200)}function i(e,t){b&&(b=!1,t||(t=Date.now()),j.addPoint(U,P,t/1e3,u(document.elementFromPoint(U,P))),I.track(j),g.sendUserInteractionToPreview&&g.sendUserInteractionToPreview(),T?(m.removeEventListener("touchmove",a,p),m.removeEventListener("touchend",i,p)):(m.removeEventListener("mousemove",a,p),m.removeEventListener("mouseup",i,p)),deviceInfo.deviceType.desktop()&&m.removeEventListener("mouseout",r,p))}function c(e,t){var n=null,o=null,a=null,r=!1;return t instanceof Screen?(n=t,o=null,a=n.parentUnitVariant,r=!0):"undefined"!=typeof ScreenObject&&t instanceof ScreenObject?(n=t.parentScreen,o=t,a=n.parentUnitVariant,r=!0):"undefined"!=typeof CreativeUnitVariant&&t instanceof CreativeUnitVariant&&(n=null,o=null,a=t,r=!0),r?extend({unitName:a?a.parentUnit.name:n.parentUnit.name,unitVariantLocalId:a?a.localId:null,screenLocalId:n?n.localId:null,screenTitle:n?n.title:null,screenIsMaster:n?n.isMasterScreen():null,objectLocalId:o?o.localId:null,objectName:o?o.name:null,objectClazz:o?o.constructor.name:null,initiationTimestamp:new Date/1e3},e):e}function u(e){function t(e){for(var a in e)if(e.hasOwnProperty(a)){if(e[a].name&&e[a].name==o)return e[a];if(e[a].localId&&e[a].localId==n)return e[a];var r;if(e[a].variants?r=t(e[a].variants):e[a].screens?r=t(e[a].screens):e[a].objects?r=t(e[a].objects):e[a].content&&e[a].content.objects?r=t(e[a].content.objects):e[a].component&&(r=e[a].component),r)return r}}if(!e)return null;for(var n,o,a=e;;){if(a.id&&0==a.id.indexOf("celtra-")){o=a.id.replace("celtra-",""),0==a.id.indexOf("celtra-object-")&&(n=a.id.replace("celtra-object-",""));var r=t(w);if(r)return"undefined"!=typeof CreativeUnit&&r instanceof CreativeUnit?r.currentScreen:r}if(!a.parentNode)break;a=a.parentNode}return null}var l=15,d=150,s=1e3,v=15,f=v+5,p={capture:!0,passive:!0},m=e,h=t,g=t.adapter,I=g.trackingCenter,w=t.units,b=!1,L=null,T=!0,j={},M=0,y=null,E=Date.now(),U=0,C=0,P=0,D=0,S=e.ownerDocument.defaultView||e.ownerDocument.parentWindow;attach(m,"touchstart",n,p),attach(m,"mousedown",n,p)};
function Tapper(t,e){function a(t){for(var e=t,a=null;1!=e.nodeType;)e=e.parentNode;for(;e&&1==e.nodeType&&e.tagName;){var n=e.tagName.toLowerCase();if(hasClass(e,"touchable")||"a"===n&&e.href||"button"===n||"img"===n||"input"===n&&e.type&&"button"===e.type.toLowerCase()){a=e;break}e=e.parentNode}return a}function n(t,e){var a=t.ownerDocument.createEvent("MouseEvents");a.initEvent("tap",!0,!0),e.dispatchEvent(a)}var c="undefined"!=typeof creative&&creative.adapter||adapter;e=e||c.useNativeClickForTapDetection,e&&(attach(t,"click",function(e){var c=a(e.target);c&&n(t,c)},!c.nativeClickEmittedOnSwipe),c.useNativeClickForTapDetection)||attach(t,"touchstart",function(o){var r=a(o.target);if(r){var i=!1;if(celtra.iframe()){var u=function(){var t=c.getTopWindow();return[t.scrollX,t.scrollY,t.innerWidth,t.innerHeight]},h=u();i=!0}var s=10,d=o.targetTouches[0].clientX-s,v=o.targetTouches[0].clientX+s,l=o.targetTouches[0].clientY-s,f=o.targetTouches[0].clientY+s;addClass(r,"touched");var p=!1,g=!1,m=!1,T=!1,C=new Date,w=function(t){if(!p&&!g){var e=t.targetTouches[0].clientX,a=t.targetTouches[0].clientY;p=i&&h.toString()!=u().toString(),g=!(e>=d&&v>=e&&a>=l&&f>=a),g||p?removeClass(r,"touched"):addClass(r,"touched")}},k=function(){if(!T&&(T=!0,detach(t,"touchmove",w,!1),detach(t,"touchend",arguments.callee,!1),hasClass(r,"touched"))){var a=200,c=new Date-C>a&&!deviceInfo.deviceType.desktop();if(removeClass(r,"touched"),g||p||m||c)return;e||n(t,r)}},y=function(){detach(t,"touchend",y,!0),nextFrame(function(){m=!0,k()})};attach(t,"touchcancel",function(t){removeClass(r,"touched"),k(t)},!1),attach(t,"touchmove",w,!1),attach(t,"touchend",k,!1),attach(t,"touchend",y,!0)}},!0)};
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 SwipeListener(t){function e(t,e){return Math.abs(t)>Math.abs(e)?t>0?"east":"west":e>0?"south":"north"}function a(){detach(l(),"touchmove",n,!1),detach(l(),"touchend",c,!1)}function n(t){if(t.touches.length>1)a();else{var n=t.changedTouches[0].pageX-o,c=t.changedTouches[0].pageY-i;if(r=Math.max(Math.abs(n),Math.abs(c)),r>Math.min(50,g))if(null===u)u=e(n,c);else{var h=e(n,c);u!=h&&a()}}}function c(){a(),r>=g&&(d(u,r),v.attachClickPreventionHandler())}function h(t){creative.adapter.useNativeClickForTapDetection||t.preventDefault(),1==t.touches.length&&(o=t.changedTouches[0].pageX,i=t.changedTouches[0].pageY,r=0,u=null,attach(l(),"touchmove",n,!1),attach(l(),"touchend",c,!1),v.detachClickPreventionHandler())}var o,i,u,r,s=t.target,l=t.swipeNodeGetter,d=t.swipe,g=t.minLength||50,v=Object.create(ClickPreventer).initClickPrevention(function(){return s});attach(window,"touchstart",noop,!1),attach(s,"touchstart",h,!1)};
var ClickPreventer={initClickPrevention:function(e){return this._getDefaultClickPreventionNode=e||function(){},this._clickPreventionNode=null,this._clickPreventionHandler=this._clickPreventionHandler.bind(this),this},attachClickPreventionHandler:function(e){creative.adapter.nativeClickEmittedOnSwipe&&!this._clickPreventionNode&&(this._clickPreventionNode=e||this._getDefaultClickPreventionNode(),attach(this._clickPreventionNode,"click",this._clickPreventionHandler,!0))},detachClickPreventionHandler:function(){creative.adapter.nativeClickEmittedOnSwipe&&this._clickPreventionNode&&(detach(this._clickPreventionNode,"click",this._clickPreventionHandler,!0),this._clickPreventionNode=null)},_clickPreventionHandler:function(e){e.stopPropagation(),this.detachClickPreventionHandler()}};;
function PlaceboBar(e,t,a,i){var n=!1,r=document.createElement("div");r.className="celtra-placebobar",r.style.cssText="position: absolute; bottom: 60px; left: 0; right: 0; margin: auto; z-index: 20; width: 215px; height: 8px;";var l=document.createElement("img");l.src=creative.resourceUrl+"runner/clazzes/CreativeUnit/loading-back.png",l.style.position="absolute",l.style.width="100%",l.style.height="100%",r.appendChild(l);var o=document.createElement("div");o.style.position="absolute",o.style.top="2px",o.style.bottom="2px",o.style.left="3px",o.style.right="3px",r.appendChild(o);var s=document.createElement("div");return s.style.background="url("+creative.resourceUrl+"runner/clazzes/CreativeUnit/loading-over.png) "+i+" repeat-x",s.style.position="absolute",s.style.width="0",s.style.height="100%",o.appendChild(s),r.start=function(){function i(){if(r.parentNode){var n=Math.min((new Date-l)/e,t);s.style.width=100*n+"%",t>n&&setTimeout(i,2*a*Math.random())}}if(!n){n=!0;var l=new Date;setTimeout(i,0)}},r};
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,"undefined"!=typeof module&&null!==module&&(module.exports=EventEmitter);;
function InViewObject(t,e){this.view=t,this.inViewParent=e,this._init()}extend(InViewObject.prototype,EventEmitter),InViewObject.prototype._init=function(){this.rectInView=CRect.ZERO,this.areaInViewRatio=0,this.active=!1,this._maxPossibleDimensions={width:0,height:0,area:0},this.computeRectInView=this.computeRectInView.bind(this),this.start=this.start.bind(this),this.stop=this.stop.bind(this)},InViewObject.prototype.getNode=function(){return this.view.getNode()},InViewObject.prototype.getParentMaxPossDims=function(){return this.inViewParent?this.inViewParent.getMaxPossibleDimensions():this.adapter.getViewportRect()},InViewObject.prototype.computeRectInView=function(){var t=this.inViewParent.getRectInView(),e=this.getBoundingClientRect(),i=t.intersect(e),n=!1;this.rectInView.equals(i)||(this.rectInView=i,n=!0),this._computeMaxPossibleDimensions(e,this.getParentMaxPossDims());var s=this._maxPossibleDimensions.area>0?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 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 DryRunResultSet(t){this._actions=t}DryRunResultSet.prototype.contains=function(t,n){return this._actions.some(function(e){var o=t==e.method,u=!n||n==e.instance;return o&&u})},DryRunResultSet.prototype.getAll=function(){return this._actions},DryRunResultSet.prototype.concat=function(t){return new DryRunResultSet(this._actions.concat(t.getAll()))};;
var ActionInvocationSimulator={_dryRun:!1,_dryRunActions:[],_dryRunExecutedActionsLocalIds:[],beginDryRun:function(){this._dryRun=!0,this._dryRunActions=[],this._dryRunExecutedActionsLocalIds=[]},endDryRun:function(){var n=this._dryRunActions;return this._dryRun=!1,this._dryRunActions=[],this._dryRunExecutedActionsLocalIds=[],new DryRunResultSet(n)},isDryRun:function(){return this._dryRun},needsDryRun:function(n){return!this._dryRunExecutedActionsLocalIds[n]},logActionDryRun:function(n,t,u){this._dryRunExecutedActionsLocalIds[n]=!0,this._dryRunActions.push({method:t,instance:u})}};;
var TriggerHost={_getTriggers:function(r,i){return i||(i=retTrue),this.triggers.filter(function(t){return t.type==r&&i(t.parameters,t)})},_fireArrayOfTriggers:function(r,i,t){var e=this;i||(i=noop),t||(t=new ActionContext(e)),r.waitForEach(function(r,i){r.onFire?r.onFire(t,i):i()},i)},hasTriggers:function(r,i){return this._getTriggers(r,i).length>0},fireTriggersDryRun:function(r,i,t,e){var n;try{ActionInvocationSimulator.beginDryRun(),this.fireTriggers(r,i,t,e)}finally{n=ActionInvocationSimulator.endDryRun()}return n},fireTriggers:function(r,i,t,e){var n=this._getTriggers(r,i);this._fireArrayOfTriggers(n,t,e)},fireSortedTriggers:function(r,i,t,e,n){var g=this._getTriggers(r,i),n=n||null;this._fireArrayOfTriggers(g.sort(n),t,e)},triggerAction:function(r,i,t){this.fireTriggers(i.eventName,null,t,r)},triggerActionByLocalId:function(r,i,t){var e=this.triggers.filter(function(r){return r.localId===i.localId});e.length>0&&this._fireArrayOfTriggers(e,t,r)},triggerByLocalIdAction:function(r,i,t){var e=i.event?[i.event]:[];this._fireArrayOfTriggers(e,t,r)},triggerByLocalIdActionDryRun:function(r,i,t){this.triggerByLocalIdAction(r,i,t)}};;
var SceneHost={_initImmediatelyPlayedScenes:function(){if(this.immediatelyPlayedScenes){var e=[];if(this instanceof Screen){e=this.immediatelyPlayedScenes.appear.scenes;var i=!this.appearedAtLeastOnce;i&&(e=e.concat(this.immediatelyPlayedScenes.firstAppear.scenes))}else e=this.immediatelyPlayedScenes.conditionMet.scenes;e.forEach(function(e){e.renderFirstFrame()})}}};;
function ActionContext(e,t){if(this._id=randInt(),this.initiator=e,this.initiationTimestamp=new Date/1e3,"object"==typeof t?(this.consideredUserInitiatedByBrowser=!!t.consideredUserInitiatedByBrowser,this.certainlyNotCausedByUserBehavior=!!t.certainlyNotCausedByUserBehavior):(this.consideredUserInitiatedByBrowser=!!t,this.certainlyNotCausedByUserBehavior=!1),this.inUserInitiatedIteration=this.consideredUserInitiatedByBrowser,this.consideredUserInitiatedByBrowser&&this.certainlyNotCausedByUserBehavior)throw new Error("Unable to create an ActionContext where both consideredUserInitiatedByBrowser and certainlyNotCausedByUserBehavior are true!");if(e instanceof Screen)this.screen=e,this.screenObject=null,this.unitVariant=this.screen.parentUnitVariant;else if(e instanceof ScreenObject)this.screen=e.parentScreen,this.screenObject=e,this.unitVariant=this.screen.parentUnitVariant;else{if(!("undefined"!=typeof CreativeUnitVariant&&e instanceof CreativeUnitVariant))throw new Error("Initiator ("+e+") is not a Screen or a ScreenObject. Analytics would be confused.");this.screen=null,this.screenObject=null,this.unitVariant=e}if(this.inUserInitiatedIteration){var i=function(){this.inUserInitiatedIteration=!1}.bind(this);defer(i),nextFrame(i)}if(this.trackUserInteraction=this.trackUserInteraction.bind(this),this._isAttributable=!!this.screen&&this._isScreenReadyForEventAttribution(),this.screen&&!this.screen.parentUnit.name)throw new Error("Parent unit missing name.")}ActionContext.prototype._isScreenReadyForEventAttribution=function(){return this.screen.isMasterScreen()?this.screen.parentContainer.screens.some(function(e){return e.appearedAtLeastOnce&&e.isNormalScreen()}):this.screen.appearedAtLeastOnce},ActionContext.prototype.extendEvent=function(e){return extend({unitName:this.unitVariant?this.unitVariant.parentUnit.name:this.screen.parentUnit.name,unitVariantLocalId:this.unitVariant?this.unitVariant.localId:null,screenLocalId:this.screen?this.screen.localId:null,screenTitle:this.screen?this.screen.title:null,screenIsMaster:this.screen?this.screen.isMasterScreen():null,objectLocalId:this.screenObject?this.screenObject.localId:null,objectName:this.screenObject?this.screenObject.name:null,objectClazz:this.screenObject?this.screenObject.constructor.name:null,initiationTimestamp:this.initiationTimestamp},e)},ActionContext.prototype.initiatedBeforeScreenShown=function(){return this.screen&&!this._isAttributable},ActionContext.prototype.track=function(e,t){this.initiatedBeforeScreenShown()&&console.warn('Event "'+e.name+'" appears to be initiated before a screen was ever shown and will be ignored.'),creative.track(this.extendEvent(e),t)},ActionContext.prototype.trackUserInteraction=function(){if(creative.getUserInteracted())creative.interactionTrackingTimeout||(this.track({name:"interaction"}),creative.interactionTrackingTimeout=setTimeout(function(){creative.interactionTrackingTimeout=null},1e3));else{if(creative.runtimeParams.userInteracted=1,creative.experiments.get("TrackViewableAreaChange")){var e=creative.adapter;e.canMeasureViewportPlacementGeometry&&"function"==typeof e.trackViewableAreaRatio&&e.trackViewableAreaRatio()}this.track({name:"firstInteraction"})}defer(creative.trackingCenter.batchFlush),creative.userInteracted(this)},ActionContext.prototype.trackClickThrough=function(e){e||(e=noop),creative.runtimeParams.clickedThrough?this.track({name:"clickThrough"},e):(creative.runtimeParams.clickedThrough=1,this.track({name:"firstClickThrough"},e)),defer(creative.trackingCenter.batchFlush),creative.clickedThrough(this)};;
function VideoContext(e,t,i){VideoContext.uberConstructor.call(this,e instanceof ActionContext?e.initiator:e,e&&e.userInitiated),this.file=t,this.url=t.getUrl(),this.label=i,this.source=null}inherit(VideoContext,ActionContext),VideoContext._eventNames=["videoDurationUpdate","videoPlayAttempted","videoPresetSelected","videoPlayedSegment","videoStart","videoFirstQuartile","videoMidpoint","videoThirdQuartile","videoComplete"],VideoContext.prototype.registerSource=function(e){if(!e)throw"Not a valid source of video events.";this.source=e,VideoContext._eventNames.forEach(function(e){this.source.on(e,function(t){this.handleEvent(e,t)}.bind(this))}.bind(this))},VideoContext.prototype.handleEvent=function(e,t){this.track(extend(JSON.parse(JSON.stringify(t||{})),{name:e}))},VideoContext.prototype.track=function(e){if("videoPlayAttempted"==e.name){var t=this.file.url?"URL":"File";extend(e,{sourceType:t,source:"URL"==t?this.file.url:this.file.blobHash,label:this.label})}VideoContext.uber.track.call(this,e)};;
function ShakeListener(){this.shakeThreshold=1.5,this.canListen=!0,this.slidingWindow=5,this.signals=[],this.handleMotion=this.handleMotion.bind(this),this.topWindow=creative.adapter.getTopWindow()}extend(ShakeListener.prototype,EventEmitter),ShakeListener.prototype.start=function(){this.canListen=!0;var i=window.DeviceMotionEvent&&window.DeviceMotionEvent.requestPermission;creative.deviceMotionListenerAdded||(creative.deviceMotionListenerAdded=!0,i?window.DeviceMotionEvent.requestPermission().then(function(i){"granted"==i?this.topWindow.addEventListener("devicemotion",this.handleMotion):this.emit("shakeFallback")}.bind(this))["catch"](function(i){console.warn(i.message+". Triggering fallback behaviour"),this.emit("shakeFallback")}.bind(this)):this.topWindow.addEventListener("devicemotion",this.handleMotion))},ShakeListener.prototype.stop=function(){this.canListen=!1,creative.deviceMotionListenerAdded&&(creative.deviceMotionListenerAdded=!1,this.topWindow.removeEventListener("devicemotion",this.handleMotion))},ShakeListener.prototype.handleMotion=function(i){if(this.canListen){this.signals.push(i.accelerationIncludingGravity),this.signals.length>this.slidingWindow&&this.signals.shift();var e=this.signals.reduce(function(i,e){return{x:i.x+e.x,y:i.y+e.y,z:i.z+e.z}}),t={x:e.x/this.signals.length,y:e.y/this.signals.length,z:e.z/this.signals.length};if(this.prevSignal){var n=null,s=Math.abs(t.x-this.prevSignal.x),h=Math.abs(t.y-this.prevSignal.y),o=Math.abs(t.z-this.prevSignal.z);if(90===Math.abs(creative.adapter.orientation)){var a=h;h=s,s=a}s>h&&s>o&&s>this.shakeThreshold?n="x":h>s&&h>o&&h>this.shakeThreshold?n="y":o>s&&o>h&&o>this.shakeThreshold&&(n="z"),(s>this.shakeThreshold||h>this.shakeThreshold||o>this.shakeThreshold)&&this.emit("shake",n)}this.prevSignal=t}};;
!function(){"use strict";function t(t){return"italic"===String(t).toLowerCase()?"italic":""}function e(t){var e=/normal|bold|([1-9])00/i.exec(t);if("undefined"==typeof e)return"";var i=e[0];return"normal"===i?"400":"bold"===i?"700":i}function i(i){var n=i.family.replace(/ /g,"+"),o=t(i.style),s=e(i.weight),r=s+o;return r.length>0?n+":"+r:n}function n(t,e,i){if(l){var n="300px",o=t.style+" "+t.weight+" "+n+' "'+t.getBrowserCompatibleFontFamily()+'"',s=t.hasUnicodeRangeDefined()&&t.hasSubsetStringDefined()?t.getSubsetString():" ";document.fonts.load(o,s).then(function(t){t.length>=1?e():i()},function(){i()})}else{if("undefined"==typeof FontLoader)return void i("Font Loader is not initialized.");FontLoader.watch(t.getBrowserCompatibleFontFamily(),t.style,t.weight,e,i,t.getSubsetString())}}function o(t,e,i){var o="font-style-manager",s=document.getElementById(o);s||(s=document.createElement("style"),s.id=o,document.getElementsByTagName("head")[0].appendChild(s));var r=t.generateFontFace();if(!r)return void i("Unable to define style for font without specifying files, style and weight.");var a=[].slice.apply(s.sheet.cssRules).some(function(e){var i=e.style.getPropertyValue("font-family").replace(/^['"](.+)['"]$/,"$1");return i==t.getBrowserCompatibleFontFamily()&&e.style.getPropertyValue("font-style")==t.style&&e.style.getPropertyValue("font-weight")==t.weight});a||s.sheet.insertRule(r,s.sheet.cssRules.length),n(t,e,i)}function s(t,e,i,o){var s=[].slice.apply(document.getElementsByTagName("link")).filter(function(t){return t.href===e})[0];if(s||(s=document.createElement("link"),s.setAttribute("rel","stylesheet"),s.setAttribute("media","all"),s.setAttribute("href",e)),l){var r=function(){s._finished=!0,n(t,i,o)};s._finished?n(t,i,o):(s.addEventListener("load",r),s.addEventListener("error",r))}else setTimeout(function(){n(t,i,o)},0);s.parentNode||document.getElementsByTagName("head")[0].appendChild(s)}function r(t){for(var e in t)this[e]=t[e]}var a=3,l=function(t,e){var i=!!document.fonts;if(/Apple/.test(e)){var n=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))(?:\.([0-9]+))/.exec(t);return n?i&&parseInt(n[1],10)>603:i}var o=/Gecko.*Firefox\/(\d+)/.exec(t);return o?i&&parseInt(o[1],10)>46:i}(window.navigator.userAgent,window.navigator.vendor),f=["Droid Sans"];r.prototype.getId=function(){return this.typefaceId||this.id},r.prototype.getSubsetString=function(){return this.subset},r.prototype.getTrackingUrl=function(){return this.trackingUrl},r.prototype.getUnicodeRange=function(){return this.unicodes},r.prototype.getBrowserCompatibleFontFamily=function(){if(this.isAdobe()||this.useGoogleFontsAPI()||this.isSystem())return this.family;var t=this.family+(this.stretch?" "+this.stretch:"")+" "+this.provider;if(this.hasSubsetStringDefined()&&!this.hasUnicodeRangeDefined()&&(t+=" "+encodeURIComponent(this.getSubsetString())),t.length>25){for(var e,i=5381,n=0,o=t.length;o>n;n++)e=t.charCodeAt(n),i=(i<<5)+i+e;return i.toString()}return t},r.prototype.setBaseUrl=function(t){this.baseUrl=t},r.prototype.isAdobe=function(){return"adobe"===this.provider},r.prototype.isCustom=function(){return"custom"===this.provider},r.prototype.isGoogle=function(){return"google"===this.provider},r.prototype.isMonotype=function(){return"monotype"===this.provider},r.prototype.isSystem=function(){return"system"===this.provider},r.prototype.hasSubsetStringDefined=function(){var t=this.getSubsetString();return"string"==typeof t&&t.length>0},r.prototype.hasTrackingUrlDefined=function(){var t=this.getTrackingUrl();return"string"==typeof t&&t.length>0},r.prototype.hasUnicodeRangeDefined=function(){var t=this.getUnicodeRange();return"string"==typeof t&&t.length>0},r.prototype.needsLoading=function(){return this.isAdobe()||this.isCustom()||this.isGoogle()||this.isMonotype()},r.prototype.useGoogleFontsAPI=function(){return"google"===this.provider&&-1!==f.indexOf(this.family)},r.prototype.getCssProperties=function(){return{"font-family":this.needsLoading()?'"'+this.getBrowserCompatibleFontFamily()+'", Helvetica, sans-serif':this.getBrowserCompatibleFontFamily(),"font-style":this.style,"font-weight":this.weight}},r.prototype.getFileUrl=function(t){if("string"==typeof this.baseUrl){var e,n=this.hasSubsetStringDefined();if(this.isGoogle()){var o=i(this);e=this.baseUrl+"google/"+o+"/"+a+"_webfont."+t}else if("undefined"!=typeof this.files&&"undefined"!=typeof this.files[t]){var s=this.getId();if("string"!=typeof s)return this.baseUrl+this.files[t]+"."+t;var r,l=this.files[t].blobHash,f=this.files[t].name||"webfont";r=n?a+"_"+l:l,e=this.baseUrl+s+"/"+r+"/"+encodeURIComponent(f)+"."+t}return"string"==typeof e&&n&&(e+="?subset="+encodeURIComponent(this.getSubsetString())),e}},r.prototype.generateFontFace=function(){var t="",e=[],i=this.getFileUrl("woff2");i&&e.push('url("'+i+'") format("woff2")');var n=this.getFileUrl("woff");n&&e.push('url("'+n+'") format("woff")');var o=this.getFileUrl("ttf");return o&&e.push('url("'+o+'") format("truetype")'),this.style&&this.weight&&e.length>0&&(t="@font-face {",t+='font-family: "'+this.getBrowserCompatibleFontFamily()+'";',t+="font-style: "+this.style+";",t+="font-weight: "+this.weight+";",t+="src:"+e.join(",")+";",this.hasUnicodeRangeDefined()&&(t+="unicode-range: "+this.getUnicodeRange()+";"),t+="}"),t},r.prototype.loadStyle=function(t){t=t||function(){};var e=function(e){t(e||"Failed to load font files.")};if(this.isCustom()||this.isGoogle()&&!this.useGoogleFontsAPI()||this.isMonotype())o(this,t,e);else if(this.isAdobe())if("string"==typeof this.projectId){var n="https://use.typekit.net/"+this.projectId+".css";s(this,n,t,e)}else e("Missing Adobe web project id.");else if(this.useGoogleFontsAPI()){var r=i(this),n="https://fonts.googleapis.com/css?family="+r;this.hasSubsetStringDefined()&&(n+="&text="+encodeURIComponent(this.getSubsetString())),s(this,n,t,e)}else this.isSystem()?t():e("Invalid or unsupported provider.")},Object.defineProperty(r,"useCSSFontLoadingAPI",{value:l}),window.FontBase=r}();;
var ScreenNodeTransition={replace:function(t,e,r,s,i,a){r.style.opacity=0,r.style.display="block",s.style.display="block",e.style.display="none",nextFrame(function(){r.style.opacity=1,t.style.opacity=0,nextFrame(function(){t.style.display="none",nextFrame(a||noop)})})},fade:function(t,e,r,s,i,a){function n(){celtra.styler.css(r,"transition",""),celtra.styler.css(t,"transition",""),t.style.display="none",nextFrame(a||noop)}r.style.opacity=0,r.style.display="block",s.style.display="block",e.style.display="none",once(t,"transitionend",n),nextFrame(function(){celtra.styler.css(t,"transition","opacity "+i.duration+"ms ease-out"),celtra.styler.css(r,"transition","opacity "+i.duration+"ms ease-out"),nextFrame(function(){r.style.opacity=1,t.style.opacity=0})})},slide:function(t,e,r,s,i,a){var n={transition:"all "+i.duration+"ms ease-out"};switch(i.direction||"west"){case"north":n.startingFrom="translateY(0)",n.endingFrom="translateY("+-i.unitSize.height+"px)",n.startingTo="translateY("+i.unitSize.height+"px)",n.endingTo="translateY(0)";break;case"south":n.startingFrom="translateY(0)",n.endingFrom="translateY("+i.unitSize.height+"px)",n.startingTo="translateY("+-i.unitSize.height+"px)",n.endingTo="translateY(0)";break;case"east":n.startingFrom="translateX(0)",n.endingFrom="translateX("+i.unitSize.width+"px)",n.startingTo="translateX("+-i.unitSize.width+"px)",n.endingTo="translateX(0)";break;case"west":n.startingFrom="translateX(0)",n.endingFrom="translateX("+-i.unitSize.width+"px)",n.startingTo="translateX("+i.unitSize.width+"px)",n.endingTo="translateX(0)"}n.startingFromOpacity=1,n.startingToOpacity=0,n.endingFromOpacity=0,n.endingToOpacity=1,this._runTransition(t,e,r,s,n,i.duration,a)},flip:function(t,e,r,s,i,a){var n={transition:"all "+i.duration+"ms ease-out"},o="perspective("+2*i.unitSize.width+"px) ";switch(i.direction||"west"){case"north":n.startingFrom=o+"rotateX(0)",n.endingFrom=o+"rotateX(180deg)",n.startingTo=o+"rotateX(-180deg)",n.endingTo=o+"rotateX(0)";break;case"south":n.startingFrom=o+"rotateX(0)",n.endingFrom=o+"rotateX(-180deg)",n.startingTo=o+"rotateX(180deg)",n.endingTo=o+"rotateX(0)";break;case"east":n.startingFrom=o+"rotateY(0)",n.endingFrom=o+"rotateY(180deg)",n.startingTo=o+"rotateY(-180deg)",n.endingTo=o+"rotateY(0)";break;case"west":n.startingFrom=o+"rotateY(0)",n.endingFrom=o+"rotateY(-180deg)",n.startingTo=o+"rotateY(180deg)",n.endingTo=o+"rotateY(0)"}celtra.styler.css(t.parentNode,"transformStyle","preserve-3d"),celtra.styler.css(t,"backfaceVisibility","hidden"),celtra.styler.css(e,"backfaceVisibility","hidden"),celtra.styler.css(r,"backfaceVisibility","hidden"),celtra.styler.css(s,"backfaceVisibility","hidden"),celtra.styler.css(t,"transformOrigin","50% 50% 0"),celtra.styler.css(e,"transformOrigin","50% 50% 0"),celtra.styler.css(r,"transformOrigin","50% 50% 0"),celtra.styler.css(s,"transformOrigin","50% 50% 0"),this._runTransition(t,e,r,s,n,i.duration,function(){celtra.styler.css(t.parentNode,"transformStyle",""),celtra.styler.css(t,"backfaceVisibility",""),celtra.styler.css(e,"backfaceVisibility",""),celtra.styler.css(r,"backfaceVisibility",""),celtra.styler.css(s,"backfaceVisibility",""),celtra.styler.css(t,"transform",""),celtra.styler.css(e,"transform",""),celtra.styler.css(r,"transform",""),celtra.styler.css(s,"transform",""),celtra.styler.css(t,"transformOrigin",""),celtra.styler.css(e,"transformOrigin",""),celtra.styler.css(r,"transformOrigin",""),celtra.styler.css(s,"transformOrigin",""),nextFrame(a||noop)})},cube:function(t,e,r,s,i,a){var n={transition:"all "+i.duration+"ms ease-out"},o="perspective("+2*i.unitSize.width+"px) ";switch(i.direction||"west"){case"north":n.startingFrom=o+"translateZ("+-i.unitSize.height/2+"px) rotateX(0) ",n.endingFrom=o+"translateZ("+-i.unitSize.height/2+"px) rotateX(90deg) ",n.startingTo=o+"translateZ("+-i.unitSize.height/2+"px) rotateX(-90deg)",n.endingTo=o+"translateZ("+-i.unitSize.height/2+"px) rotateX(0) ";break;case"south":n.startingFrom=o+"translateZ("+-i.unitSize.height/2+"px) rotateX(0) ",n.endingFrom=o+"translateZ("+-i.unitSize.height/2+"px) rotateX(-90deg)",n.startingTo=o+"translateZ("+-i.unitSize.height/2+"px) rotateX(90deg) ",n.endingTo=o+"translateZ("+-i.unitSize.height/2+"px) rotateX(0) ";break;case"east":n.startingFrom=o+"translateZ("+-i.unitSize.width/2+"px) rotateY(0) ",n.endingFrom=o+"translateZ("+-i.unitSize.width/2+"px) rotateY(90deg) ",n.startingTo=o+"translateZ("+-i.unitSize.width/2+"px) rotateY(-90deg)",n.endingTo=o+"translateZ("+-i.unitSize.width/2+"px) rotateY(0) ";break;case"west":n.startingFrom=o+"translateZ("+-i.unitSize.width/2+"px) rotateY(0) ",n.endingFrom=o+"translateZ("+-i.unitSize.width/2+"px) rotateY(-90deg)",n.startingTo=o+"translateZ("+-i.unitSize.width/2+"px) rotateY(90deg) ",n.endingTo=o+"translateZ("+-i.unitSize.width/2+"px) rotateY(0) "}var l=t.style.overflow,c=e.style.overflow,y=r.style.overflow,d=s.style.overflow;switch(celtra.styler.css(t.parentNode,"transformStyle","preserve-3d"),t.style.overflow=e.style.overflow="hidden",r.style.overflow=s.style.overflow="hidden",celtra.styler.css(t,"backfaceVisibility","hidden"),celtra.styler.css(e,"backfaceVisibility","hidden"),celtra.styler.css(r,"backfaceVisibility","hidden"),celtra.styler.css(s,"backfaceVisibility","hidden"),i.direction||"west"){case"north":case"south":celtra.styler.css(t,"transformOrigin","50% 50% "+-i.unitSize.height/2+"px"),celtra.styler.css(e,"transformOrigin","50% 50% "+-i.unitSize.height/2+"px"),celtra.styler.css(r,"transformOrigin","50% 50% "+-i.unitSize.height/2+"px"),celtra.styler.css(s,"transformOrigin","50% 50% "+-i.unitSize.height/2+"px");break;case"east":case"west":celtra.styler.css(t,"transformOrigin","50% 50% "+-i.unitSize.width/2+"px"),celtra.styler.css(e,"transformOrigin","50% 50% "+-i.unitSize.width/2+"px"),celtra.styler.css(r,"transformOrigin","50% 50% "+-i.unitSize.width/2+"px"),celtra.styler.css(s,"transformOrigin","50% 50% "+-i.unitSize.width/2+"px")}this._runTransition(t,e,r,s,n,i.duration,function(){celtra.styler.css(t.parentNode,"transformStyle",""),t.style.overflow=l,e.style.overflow=c,r.style.overflow=y,s.style.overflow=d,celtra.styler.css(t,"transformOrigin",""),celtra.styler.css(e,"transformOrigin",""),celtra.styler.css(r,"transformOrigin",""),celtra.styler.css(s,"transformOrigin",""),celtra.styler.css(t,"backfaceVisibility",""),celtra.styler.css(e,"backfaceVisibility",""),celtra.styler.css(r,"backfaceVisibility",""),celtra.styler.css(s,"backfaceVisibility",""),nextFrame(a||noop)})},_runTransition:function(t,e,r,s,i,a,n){function o(){l||(l=!0,celtra.styler.css(r,"transition",""),celtra.styler.css(s,"transition",""),celtra.styler.css(t,"transition",""),celtra.styler.css(e,"transition",""),celtra.styler.css(r,"transform",""),celtra.styler.css(s,"transform",""),celtra.styler.css(t,"transform",""),celtra.styler.css(e,"transform",""),t.style.display=e.style.display="none",t.style.opacity=e.style.opacity=r.style.opacity=s.style.opacity="",nextFrame(n||noop))}celtra.styler.css(t,"transform",i.startingFrom),celtra.styler.css(e,"transform",i.startingFrom),celtra.styler.css(r,"transform",i.startingTo),celtra.styler.css(s,"transform",i.startingTo),t.style.opacity=e.style.opacity="undefined"==typeof i.startingFromOpacity?1:i.startingFromOpacity,r.style.opacity=s.style.opacity="undefined"==typeof i.startingToOpacity?1:i.startingToOpacity,r.style.display=s.style.display="block";var l=!1,c=this._runOnce(o);once(r,"transitionend",c),setTimeout(function(){celtra.styler.css(r,"transition",i.transition),celtra.styler.css(t,"transition",i.transition),celtra.styler.css(s,"transition",i.transition),celtra.styler.css(e,"transition",i.transition),nextFrame(function(){l||(celtra.styler.css(t,"transform",i.endingFrom),celtra.styler.css(e,"transform",i.endingFrom),celtra.styler.css(r,"transform",i.endingTo),celtra.styler.css(s,"transform",i.endingTo),t.style.opacity=e.style.opacity="undefined"==typeof i.endingFromOpacity?1:i.endingFromOpacity,r.style.opacity=s.style.opacity="undefined"==typeof i.endingToOpacity?1:i.endingToOpacity)}),setTimeout(c,a+150)},20)},run:function(t,e,r,s,i){var a=this._getSupportedAnimation(i.animation||"replace");if(!(a in this))throw new Error("The transition function does not exist!");this[a].apply(this,arguments)},_getSupportedAnimation:function(t){return!android("4")||window.navigator.userAgent.match(/Chrome.*(Mobile)? Safari/)||"cube"!==t&&"flip"!==t?t:"fade"},_runOnce:function(t){var e=!1;return function(){return e?void 0:(e=!0,t())}}};;
var ScreenTransitioner={goingToScreen:null,_masterShown:!1,goToScreen:function(e,n,t){var i=Array.prototype.slice.apply(arguments);if(!this.isAppearing)return void this.once("appeared",function(){this.goToScreen.apply(this,i)}.bind(this));var r=function(){this._preloadReachableScreens(),t&&t()}.bind(this);if(!e)return r();if(!e.loaded)return void e.getNode(function(){this.goToScreen.apply(this,i)}.bind(this));var s=this.currentScreen;return n=n||{},this.goingToScreen?r():(this.goingToScreen=e,void e.triggerBeforeAppear(function(){this.initiateScreenTransition(e,n,function(){this.goingToScreen=null,this.currentScreen=e,s&&(s.disappear(),s.exitRenderTree()),this._masterShown||(this._masterShown=!0,this.master.enterRenderTree(),this.master.appear()),this.currentScreen.enterRenderTree(),this.currentScreen.appear(),r()}.bind(this))}.bind(this)))},initiateScreenTransition:function(e,n,t){if(n=n||{},t=t||noop,this.visibleScreen==e)return t();this.visibleScreen=e;var i=e===this.loadingScreen;if(i&&e.loaded)this._screenTransition(e.getNode(),null,n,t);else if(e.loaded&&this.master.loaded)this.loadingScreen&&(this.loadingScreen.getNode().style.display="none"),this._screenTransition(e.getNode(),this.master.getNode(),n,t);else{Logger("unit").warn("Screens should be loaded but were not");var r,s,o,a=function(){r--,r||this._screenTransition(s,o,n,t)};i?(s=this.loadingScreen.getNode(a.bind(this)),o=null,r=1):(s=e.getNode(a.bind(this)),o=this.master.getNode(a.bind(this)),r=2)}},_screenTransition:function(e,n,t,i){function r(){s||(s=!0,i())}if(e.style.display="none",n&&(this._masterClone||this._createMasterClone(),this.screenHolder.appendChild(this._masterClone),n.parentNode||this.screenHolder.appendChild(n),this._masterClone.style.zIndex=n.style.zIndex=-1),e&&!e.parentNode&&this.screenHolder.appendChild(e),n&&(this._masterClone.style.display="block",n.style.display="none"),null!=this.currentScreen)t.unitSize=extend({},this.size),ScreenNodeTransition.run(this.currentScreen.node,this._masterClone,e,n,t,function(){n.style.display="block",this._masterClone.display="none",i()}.bind(this));else{n&&(n.style.display="block",this._masterClone.style.display="none"),e.style.display="block";var s=!1;nextFrame(r),defer(r)}},_preloadReachableScreens:function(){setTimeout(function(){var e=[];Object.keys(this.currentScreen.dynamicReachableScreenConditions).forEach(function(n){var t=n.split("/"),i=creative.experiments.get(t[0],t.slice(1));null!=i&&Object.keys(this.currentScreen.dynamicReachableScreenConditions[n]).forEach(function(t){t!=i.chosenVariant&&(e=e.concat(this.currentScreen.dynamicReachableScreenConditions[n][t]))}.bind(this))}.bind(this)),this.currentScreen.reachableScreens.concat(this.master.reachableScreens).forEach(function(n){var t=-1==e.indexOf(n.localId.toString());t&&n.getNode()}.bind(this))}.bind(this),0)},_createMasterClone:function(){return this._masterClone&&this._masterClone.parentNode&&this._masterClone.parentNode.removeChild(this._masterClone),this._masterClone=this.master.getNode().cloneNode(!0),this._masterClone.style.display="none",this._masterClone.style.zIndex=-1,this._masterClone}};;
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 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 ThresholdObserver(e){this.threshold=e,this._value=null}extend(ThresholdObserver.prototype,EventEmitter),Object.defineProperty(ThresholdObserver.prototype,"value",{get:function(){return this._value},set:function(e){if(null!==this._value&&this._value!==e){var t=this._value-this.threshold,h=e-this.threshold;0>=t*h&&(0>t?this.emit("up"):0>h&&this.emit("down"))}this._value=e}});;
function BaseCreativeUnit(){}inherit(BaseCreativeUnit,View),BaseCreativeUnit.IGNORABLES=["INPUT","SELECT","TEXTAREA","BUTTON"],BaseCreativeUnit.prototype.awake=function(){BaseCreativeUnit.uber.awake.call(this),this._availableSize={width:0,height:0},this._isRendering=!1,this._engagementTracker=null,this._rxState=null,this._rxStateCopies=[]},BaseCreativeUnit.prototype.createNode=function(){return Logger("unit").log("Starting to load "+this),this.on("loaded",creative.adapter.perf.start("CreativeUnit.load").end),creative.experiments.get("TrackingLoadingTimes")&&this.once("_firstScreenLoaded",function(){var e=Date.now()-1e3*creative.runtimeParams.payloadJsClientTimestamp;if(3e4>e){var t={unitName:this.name};creative.aggregatorTracking.trackAggregator("unitLoadTime",e,t),creative.aggregatorTracking.trackAggregator("unitLoadSuccesses",t)}}.bind(this)),creative.adapter.on("mediaStopRequested",function(e){this.emit("mediaStopRequested",e)}.bind(this)),this.unitDiv=BaseCreativeUnit.uber.createNode.call(this),this._engagementTracker=new EngagementTracker(this.unitDiv,creative),Tapper(this.unitDiv,this.useClickForTap),attach(this.unitDiv,"touchstart",this._handleTouchStart.bind(this)),attach(this.unitDiv,"touchmove",this._handleTouchMove.bind(this)),this.unitDiv},BaseCreativeUnit.prototype.setAvailableSize=function(e,t){var r=this._availableSize.width!=e||this._availableSize.height!=t;return this._availableSize.width=e,this._availableSize.height=t,r},BaseCreativeUnit.prototype.getAvailableSize=function(){return{width:this._availableSize.width,height:this._availableSize.height}},BaseCreativeUnit.prototype.enterRenderTree=function(){throw new Error("Not implemented")},BaseCreativeUnit.prototype.exitRenderTree=function(){throw new Error("Not implemented")},BaseCreativeUnit.prototype.finishedLoading=function(){BaseCreativeUnit.uber.finishedLoading.call(this),Logger("unit").log("Finished loading "+this)},BaseCreativeUnit.prototype._handleTouchStart=function(e){if(!this.swipeable&&!creative.adapter.useNativeClickForTapDetection){for(var t=e.target;1!=t.nodeType;)t=t.parentNode;var r=function(){for(;t!==this.unitDiv;){if(t.className&&hasClass(t,"map-container"))return!0;t=t.parentNode}return!1}.bind(this);-1!=BaseCreativeUnit.IGNORABLES.indexOf(t.nodeName)||r()||e.preventDefault()}},BaseCreativeUnit.prototype._handleTouchMove=function(e){this.swipeable||e.preventDefault()},BaseCreativeUnit.prototype.createRxState=function(){this._rxState=this._generateNewRxStateObject()},BaseCreativeUnit.prototype._generateNewRxStateObject=function(){return new StateObject({left:null,top:null,right:null,bottom:null,width:null,height:null,vw:null,vh:null,x:null,y:null,pageYOffset:null})},BaseCreativeUnit.prototype.updateRxState=function(e){if(this._rxState){var t=e.getBoundingClientRect(),r=e.ownerDocument.defaultView;this._rxState.left=~~t.left,this._rxState.top=~~t.top,this._rxState.right=~~t.right,this._rxState.bottom=~~t.bottom,this._rxState.width=~~t.width,this._rxState.height=~~t.height,this._rxState.vw=r.innerWidth,this._rxState.vh=r.innerHeight,this._rxState.pageYOffset=r.pageYOffset,this._rxState.x=~~(t.left+t.width/2-r.innerWidth/2),this._rxState.y=~~(t.top+t.height/2-r.innerHeight/2),this._rxStateCopies.forEach(function(e){e.copyFrom(this._rxState)}.bind(this))}},BaseCreativeUnit.prototype.getRxStateObject=function(){if(this._rxState){var e=this._generateNewRxStateObject();return e.copyFrom(this._rxState),this._rxStateCopies.push(e),e}},BaseCreativeUnit.prototype.goToScreenAction=function(){throw new Error("Not implemented")},BaseCreativeUnit.prototype.alertAction=function(e,t,r){this.alert({message:t.text},r)},BaseCreativeUnit.prototype.checkOrientationAction=function(e,t,r){var a,i=creative.adapter.orientation;0===i||180===i?a=t.onPortrait:(-90==i||90==i)&&(a=t.onLandscape),a?a(e,r):r()},BaseCreativeUnit.prototype.checkOrientationActionDryRun=BaseCreativeUnit.prototype.checkOrientationAction,BaseCreativeUnit.prototype._processURLParams=function(e){return"string"!=typeof e?e:creative.macros(e)},BaseCreativeUnit.prototype._addUrlAppendage=function(e){if(creative.urlOpenedUrlAppendage){var t=this.size.width+"x"+this.size.height,r=function(e){return e.indexOf("?")>=0};return e+(r(e)?"&":"?")+creative.urlOpenedUrlAppendage.replace(new RegExp("{celtraFirstUnitSize}","ig"),t)}return e},BaseCreativeUnit.prototype.openBrowser=function(e,t,r,a){return t?void creative.adapter.trackEventsAndOpenBrowser(this._processURLParams(t),creative.shouldClickThroughToNewWindow(e),r,a):(r||noop)()},BaseCreativeUnit.prototype.openClickThroughDestinationAction=function(e,t,r){var a=creative.clickThroughDestinationUrl,i=creative.shouldClickThroughToNewWindow(e),n=!1,o=2e3,s="clickThroughDestinationOpened",c=function(){n||(n=!0,creative.adapter.openBrowser(this._processURLParams(a),i))}.bind(this);if(a&&-1==["http://","https://"].indexOf(a)){var l=function(e){return e.indexOf("itunes.apple.com/us/app/")>0},d=function(e){return 0===e.indexOf("market://details?id=")};creative.adapter._stopAllMedia(),l(a)||d(a)?(e.track({name:s,appUri:a}),e.trackClickThrough(),creative.adapter.trackingCenter.flush(),creative.adapter.getApp(this._processURLParams(a))):(a=this._addUrlAppendage(a),e.track({name:s,url:a}),e.trackClickThrough(),!creative.adapter.canOpenUrlInSameWindow||i?(creative.adapter.trackingCenter.flush(),c()):(creative.adapter.trackingCenter.flush(c),defer(c,o)))}else e.track({name:"userError",userErrorId:"exitUriIsEmpty"});e.screen&&creative.adapter.sendToEventMonitor(s,t.triggerId,e.screen.name,a||"",null,e.initiatedBeforeScreenShown()),r()},BaseCreativeUnit.prototype.goToURLAction=function(e,t,r){var a=creative.urlOpenedOverrideUrls&&creative.urlOpenedOverrideUrls[t.reportLabel]||t.url,i=creative.shouldClickThroughToNewWindow(e),n=!1,o=2e3,s=function(){n||(n=!0,creative.adapter.openBrowser(this._processURLParams(a),i))}.bind(this),c=(creative.experiments.get("OpenBrowserRefactor")||{}).chosenVariant,l=(creative.experiments.get("WindowOpenWithDelay")||{}).chosenVariant,d=function(e,t,r){c&&creative.aggregatorTracking.trackAggregator("openBrowserRefactor",1,{branch:e,logic:t,environment:r})};if(!a||["http://","https://"].indexOf(a)>-1)return e.track({name:"userError",userErrorId:"exitUriIsEmpty"}),r();a=this._addUrlAppendage(a);var p="urlOpened";if(creative.adapter._stopAllMedia(),e.track({name:p,url:a,label:t.reportLabel}),e.trackClickThrough(),deviceInfo.browser.ie()||deviceInfo.browser.edge())!creative.adapter.canOpenUrlInSameWindow||i?(d("new-window","flush-and-open","desktop-windows"),creative.adapter.trackingCenter.flush(),s()):(d("same-window","flush-then-open","desktop-windows"),creative.adapter.trackingCenter.flush(s),defer(s,o));else if("on"==c)!creative.adapter.canOpenUrlInSameWindow||i?(d("new-window","flush-and-open","all-except-desktop-windows"),creative.adapter.trackingCenter.flush(),s()):(d("same-window","flush-then-open","all-except-desktop-windows"),creative.adapter.trackingCenter.flush(s),defer(s,o));else if(!creative.adapter.canOpenUrlInSameWindow||i){d("new-window","wrap+open","all-except-desktop-windows"),l&&creative.aggregatorTracking.trackAggregator("windowOpenWithDelay",1,{delay:l}),c&&creative.aggregatorTracking.trackAggregator("openBrowserRefactorFlushVsWrap",1,{trackingWith:"wrap"});var u=creative.wrapRedirectPageUrl(this._processURLParams(a));c&&(creative.aggregatorTracking.trackAggregator("openBrowserRefactorFlushVsWrap",1,{trackingWith:"flush"}),creative.adapter.trackingCenter.flush()),"undefined"==typeof l||"control"===l?creative.adapter.openBrowser(u,i):setTimeout(function(){creative.adapter.openBrowser(u,i)},0)}else d("same-window","wrap+open","all-except-desktop-windows"),creative.adapter.openBrowser(creative.wrapRedirectPageUrl(this._processURLParams(a)),i);creative.adapter.sendToEventMonitor(p,t.triggerId,e.screen.name,a,t.reportLabel,e.initiatedBeforeScreenShown()),r()},BaseCreativeUnit.prototype.facebookURLAction=function(e,t,r){if(!t.url)return r();var a="facebookShareAttempt";creative.adapter._stopAllMedia(),e.track({name:a,url:t.url,label:t.reportLabel}),e.trackClickThrough();var i="http://m.facebook.com/sharer.php?u="+encodeURIComponent(t.url);creative.adapter.openBrowser(creative.wrapRedirectPageUrl(i),creative.shouldClickThroughToNewWindow(e)),creative.adapter.sendToEventMonitor(a,t.triggerId,e.screen.name,i,t.reportLabel,e.initiatedBeforeScreenShown()),r()},BaseCreativeUnit.prototype.callURLAction=function(e,t,r){if(!t.url)return r();var a=this._processURLParams(t.url),i=new Image;i.onload=i.onerror=function(){r()},i.src=a},BaseCreativeUnit.prototype.displayImageAction=function(e,t,r){if(!t.file)return r();var a=function(e,a){var i=document.createElement("div");i.className="celtra-display-image-overlay touchable",i.style.backgroundImage='url("'+t.file.getUrl()+'")',this.unitDiv.appendChild(i),(e>this.size.width||a>this.size.height)&&(i.style.backgroundSize="contain"),t.color&&(i.style.backgroundColor=t.color),attach(i,"tap",function(){i.parentNode.removeChild(i),r()},!1);var n=document.createElement("div");n.className="celtra-back-button touchable "+this.alignBackButtonHorizontal,i.appendChild(n)}.bind(this);if(t.file.meta)a(t.file.meta.width,t.file.meta.height);else{var i=new Image;i.onload=function(){a(this.width,this.height)},i.onerror=function(){return console.error("Couldn't display image: "+t.file.getUrl()),r()},i.src=t.file.getUrl()}},BaseCreativeUnit.prototype.saveImageAction=function(e,t,r){function a(a,n){var o=a.getOriginalUrl(),c=a.name,l=a.blobHash;if(i(l),creative.adapter.canSaveImage())creative.adapter.trackingCenter.flush(function(){var a="shared.png";"undefined"!=typeof c?a=c:"string"==typeof n&&n.trim().length>0&&(a=n.trim()+".png"),creative.adapter.saveImage(o,encodeURIComponent(a),r);var i=n||c;creative.adapter.sendToEventMonitor(s,t.triggerId,e.screen.name,i,t.reportLabel,e.initiatedBeforeScreenShown())});else{var d=new SaveImageDialog(creative.adapter,creative.resourceUrl,o);d.show(r)}}function i(r){e.track({name:s,blobHash:r,label:t.reportLabel}),e.trackClickThrough()}function n(){creative.adapter.createPlacements({preloader:{attachment:"body",positioning:"screen",type:"layer"}},function(){var e=creative.adapter.placements.preloader;e.setZIndex("max"),e.setSize("100%","100%"),e.setPosition(0,0);var t=e.createElement("link");t.rel="stylesheet",t.type="text/css",t.href=creative.resourceUrl+"runner/clazzes/PostBlobPreloader.css",e.getContainer().appendChild(t);var r=e.createElement("div");addClass(r,"celtra-preloader-container");var a=e.createElement("div");addClass(a,"celtra-preloader-image"),a.style.backgroundImage="url("+creative.resourceUrl+"runner/clazzes/CreativeUnit/preloader.png)",r.appendChild(a),e.populate(r,function(){e.show()})})}function o(){creative.adapter.destroyPlacement("preloader")}var s="imageSaveAttempted";if(t.imageOrigin=t.imageOrigin?t.imageOrigin:"asset","component"==t.imageOrigin&&t.component)if(t.component.file)a(t.component.file,t.component.name);else{var c=t.component.getField();if(null===c)return void r();if(-1===creative.runtimeParams.enabledServices.indexOf("contentSharing"))return void this.alertAction(e,{text:"This feature is not available in your region"},r);var l=c.url,d=l.split(",")[1];n(),postBlob(d,function(e,i){if(o(),i>=200&&300>i){var n=JSON.parse(e),s=creative.cachedApiUrl+"blobs/"+n.hash+"/shared.png",c=new File(s);a(c,t.component.name)}else r()})}else"asset"==t.imageOrigin&&t.file?a(t.file):r()},BaseCreativeUnit.prototype.playSoundAction=function(e,t,r){if(!t.file)return r();var a=new Audio(t.file.getUrl());attach(a,"ended",function(){r()},!1),a.play()},BaseCreativeUnit.prototype.playVideoInPlayerAction=function(e,t,r){if(!t.file)return r();var a=creative.adapter.useFSVP,i=t.file.url?"URL":"File",n=new VideoContext(e,t.file,t.reportLabel);n.track({engineType:"html5",name:"videoPlayAttempted",trackable:a,filename:t.file.name,userInitiated:e.consideredUserInitiatedByBrowser,startMuted:!1,videoPlayerMode:"fullscreen",sourceType:i,source:"URL"==i?t.file.url:t.file.blobHash,label:t.reportLabel}),n.track({name:"videoPresetSelected",videoPreset:null}),creative.adapter.playVideoInPlayer(n,t,function(a){var i=(a?t.onSuccess:t.onFailure)||nullai;i(e,r)})},BaseCreativeUnit.prototype.playVideoInPlayerActionDryRun=function(e,t,r){return t.file?((t.onSuccess||nullai)(e,noop),(t.onFailure||nullai)(e,noop),void r()):r()},BaseCreativeUnit.prototype.playVideoFromURLAction=function(e,t,r){if(!t.url)return r();var a=t.file=new File(t.url),i=creative.adapter.useFSVP,n=a.url?"URL":"File";creative.adapter._stopAllMedia();var o=new VideoContext(e,a,t.reportLabel);o.track({engineType:"html5",name:"videoPlayAttempted",trackable:i,filename:null,userInitiated:e.consideredUserInitiatedByBrowser,startMuted:!1,videoPlayerMode:"fullscreen",sourceType:n,source:"URL"==n?a.url:a.blobHash,label:t.reportLabel}),o.track({name:"videoPresetSelected",videoPreset:null}),creative.adapter.playVideoInPlayer(o,t,function(a){var i=(a?t.onSuccess:t.onFailure)||nullai;i(e,r)})},BaseCreativeUnit.prototype.playVideoFromURLActionDryRun=function(e,t,r){return t.url?((t.onSuccess||nullai)(e,noop),(t.onFailure||nullai)(e,noop),void r()):r()},BaseCreativeUnit.prototype.vibrateAction=function(e,t,r){r()},BaseCreativeUnit.prototype.getAppAction=function(e,t,r){var a=(creative.runtimeParams.overrides||creative.runtimeParams).deviceInfo,i=function(e){return new RegExp("(^http(s)?://)|(^market://)","i").test(e)},n=function(){return new RegExp("^\\d+$").test(t.appStoreUrl)?"https://itunes.apple.com/app/id"+t.appStoreUrl:(i(t.appStoreUrl)?"":"http://")+t.appStoreUrl},o=function(){return i(t.androidMarketAppId)?t.androidMarketAppId:android()||"Android"===a.osName?"market://details?id="+t.androidMarketAppId:"https://play.google.com/store/apps/details?id="+t.androidMarketAppId};creative.adapter._stopAllMedia();var s;if(creative.storeOpenedOverrideUrls[t.reportLabel]?s=creative.storeOpenedOverrideUrls[t.reportLabel]:t.appStoreUrl&&(ios()||-1!==["OSX","IOS"].indexOf(a.osName))?s=n():t.androidMarketAppId&&(s=o()),s&&-1==["http://","https://"].indexOf(s)){var c=!ios("9",null),l="storeOpened",d=2,p=function(){creative.adapter.getApp(this._processURLParams(s))}.bind(this),u=function(){if(!--d&&c){p();var r={};t.appStoreUrl&&(r.appStoreUrl=n()),t.androidMarketAppId&&(r.androidMarketAppId=o()),creative.adapter.sendToEventMonitor(l,t.triggerId,e.screen.name,r,t.reportLabel,e.initiatedBeforeScreenShown())}}.bind(this);e.track({name:l,appUri:s,label:t.reportLabel},u),e.trackClickThrough(u),c||setTimeout(p,0)}else e.track({name:"userError",userErrorId:"exitUriIsEmpty"});r()},BaseCreativeUnit.prototype.callPhoneAction=function(e,t,r){if(!t.number)return r();creative.adapter._stopAllMedia();var a="phoneCalled",i=deviceInfo.os.ios()&&deviceInfo.browser.safari(),n=function(){creative.adapter.callPhone(t.number),creative.adapter.sendToEventMonitor(a,t.triggerId,e.screen.name,t.number,t.reportLabel,e.initiatedBeforeScreenShown())};e.track({name:a,number:t.number,label:t.reportLabel}),e.trackClickThrough(),i?(creative.adapter.trackingCenter.flush(),defer(n)):creative.adapter.trackingCenter.flush(n),r()},BaseCreativeUnit.prototype.answerSurveyQuestion=function(e,t,r){var a=["answerIds","questionId","surveyId","answers"],i=/[0-9a-f]{8}/;a.forEach(function(e){if("answerIds"===e){if(!(t.answerIds instanceof Array))throw new Error("args.answerIds must be an array");t.answerIds.forEach(function(e){if(!i.test(e))throw new Error("args.answerIds must contain Ids that have hexadecimal formatted string containing 8 characters")})}else if("answers"===e){if(!(t.answers instanceof Array)||t.answers.length!==t.answerIds.length)throw new Error("args."+e+" length should be the same as args.answerIds")}else if(!i.test(t[e]))throw new Error("args."+e+" must be hexadecimal formatted string containing 8 characters")}),e.track({name:"surveyQuestionAnswered",answerIds:t.answerIds,questionId:t.questionId,surveyId:t.surveyId,surveyVersion:t.surveyVersion,answerIdTextMappings:t.answers.map(function(e){return{id:e.id,text:e.text,orderIndex:e.orderIndex}})}),r()},BaseCreativeUnit.prototype.saveTheDateAction=function(e,t,r){function a(e){var r;return t.allDay?(r=new CDate,r.value=e.getFullYear()+"-"+zeroPad(e.getMonth()+1)+"-"+zeroPad(e.getDate())):(e="my"===t.timezone?e.getUTCFullYear()+"-"+zeroPad(e.getUTCMonth()+1)+"-"+zeroPad(e.getUTCDate())+" "+zeroPad(e.getUTCHours())+":"+zeroPad(e.getUTCMinutes())+":"+zeroPad(e.getUTCSeconds()):e.getFullYear()+"-"+zeroPad(e.getMonth()+1)+"-"+zeroPad(e.getDate())+" "+zeroPad(e.getHours())+":"+zeroPad(e.getMinutes())+":"+zeroPad(e.getSeconds()),r=new CDateTime,r.value=e,r.tz=t.timezone),r}return t.eventName&&t.location&&t.start?(t.end=t.end||new Date(t.start.getTime()+36e5),t.timezone=t.timezone||"my",t.end0?t[0]:null};;
!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(e){"use strict";var t={ambience:"Ambience",animatey:"Animatey",abtest:"Best",basket:"Basket",button:"Button",canvas:"Canvas",celebration:"Celebration",checkbox:"CheckBox",feedbasedchoice:"ChoiceFeed",countdown:"Countdown",draggy:"Draggy",dropdown:"Dropdown",dynamiccontent:"DynamicContent",facebookshare:"FacebookShareButton",fallback:"Fallback",frame:"Frame",flippy:"Flippy",group:"Group",gyro:"Gyro",hotspot:"Hotspot",input:"Input",map:"Map",transitions:"Transitions",mastervideo:"MasterVideo",nearby:"Nearby",painty:"Painty",pannable:"Pannable",particles:"Particle",picture:"Picture",puzzle:"Puzzle",shapey:"Shapey",smoke:"Smoke",stack:"Stack",stopwatch:"Stopwatch",locatorclassic:"StoreLocator2",locator:"StoreLocator3",swipeygallery:"Swipey",swipeygroup:"SwipeyGroup",takephoto:"TakePhotoButton",texty:"Texty",twitterfeed:"TwitterFeed",twittershare:"TwitterShareButton",inlinevideo:"Video","360view":"View360","360video":"Video360","360°video":"Video360",weather:"Weather",whatsappshare:"WhatsAppShareButton",wipeable:"Wipeable",youtube:"Youtube",scene:"Scene",brandtracksurvey:"BrandTrackSurvey",brandtrackquestion:"BrandTrackQuestion",customcode:"CustomCode",videoasset:"VideoAsset"},n=function(e){return e=e.toLowerCase().replace(/\W+/g,""),e in t?t[e]:""},o=function(e,t){function n(i){t&&a.length>0||i.forEach(function(t){e(t)&&a.push(t),t.getActiveContainers().forEach(function(e){n(e.objects),o(e.scenes)})})}function o(n){!n||t&&a.length>0||n.forEach(function(t){e(t)&&a.push(t)})}var a=[];return"Screen"==this.constructor.name?(n(this.objects),o(this.scenes)):"function"==typeof this.getActiveContainers&&this.getActiveContainers().forEach(function(e){n(e.objects),o(e.scenes)}),a},a=function(e){var t=o.call(this,e,!0);return t.length>0?t[0]:null},i=function(e){return function(t){return"undefined"==typeof e||t.name==e}},r={findAll:function(e){return o.call(this,i(e))},findByType:function(e){var t=[];return"undefined"==typeof e?t:o.call(this,function(t){return t.constructor.name==n(e)})},findByLocalId:function(e){return a.call(this,function(t){return t.localId==e})},find:function(e){return a.call(this,i(e))}};e.DiscoverableTrait=r}(window);;
!function(e){"use strict";function t(e,t){var i=d[e]||{};return i[t]||[]}function i(e){var t="string"==typeof e?e.split("/"):[];if(!(t.length<2))return t[1]}function r(e){if("undefined"==typeof o[e]&&(o[e]={type:"unknown",rows:[]}),0===e.indexOf("LocationTableImplicitField")&&"unknown"===o[e].type){var t="text";"/website"===e.slice(-8)&&(t="url"),o[e].type=t}return o[e]}function n(){return u?o:(creative.runtimeParams.dynamicContent.forEach(function(e){e.rows.forEach(function(e,t){var i=e.fieldValues;Object.keys(i).forEach(function(e){var n=r(e),d=i[e].metaData,o=i[e].value;n.rows[t]={metadata:"object"==typeof d?JSON.parse(JSON.stringify(d)):null,value:o}})}),e.fields.forEach(function(t){var i="CustomFeedField/"+t.id,n=r(i);n.id=t.id,n.feedId=e.feedId,n.name=t.name,n.type=t.fieldType})}),u=!0,o)}var d={choice:{checkChoiceFeed:["feedFieldKey"],ChoiceFeed:["choiceFeedFieldKey"]},color:{Shapey:["backgroundColorFeedFieldKey"],Texty:["textColorFeedFieldKey"]},font:{Texty:["textFontFeedFieldKey"]},html:{CustomCode:["htmlContentFeedFieldKey"]},image:{Picture:["imageSourceFeedFieldKey"],Swipey:["contentItemsFeedFieldKey"],Video:["posterImageFeedFieldKey"]},text:{Texty:["textContentFeedFieldKey"]},url:{goToFeedURL:["feedFieldKey"]},video:{MasterVideo:["videoSourceFeedFieldKey"],VideoAsset:["videoSourceFeedFieldKey"],Video:["videoSourceFeedFieldKey"]}},o={},u=!1,a={checkAndTrackValue:function(e,t,i,r){e&&(this.isCorrectFieldType(e,i,r)?this.getFieldValueByKey(e,t)||creative.adapter.trackingCenter.track({name:"userError",userErrorId:"feedValueMissing"}):creative.adapter.trackingCenter.track({name:"userError",userErrorId:"feedValueUnlinked"}))},getCustomFields:function(){var e=n();return Object.keys(e).filter(function(e){return 0===e.indexOf("CustomFeedField")}).map(function(t){var i=e[t];return{id:i.id,feedId:i.feedId,name:i.name,type:i.type,values:i.rows.map(function(e){return e.value}).filter(function(e){return null!==e})}})},getCustomFieldByKey:function(e){var t=i(e);if(t)for(var r=this.getCustomFields(),n=0;n1;return r?i:[]},getFieldRowByKey:function(e,t){t="number"==typeof t?t:0;var i=this.getFieldRowsByKey(e);return i[t]},getFieldValueByKey:function(e,t){var i=this.getFieldRowByKey(e,t);return i&&i.value},isCorrectFieldType:function(e,i,r){var n=this.getFieldByKey(e);if(!n)return!1;var d=t(n.type,i);return-1!==d.indexOf(r)}};e.FeedData=a}(window);;
var FeedImageOptimizationTrait={getFeedImageOptimizationSetting:function(t){if(!this.feedImageOptimizationSettings)return null;for(var e=0;es?e/r.width:i/r.height}var u=r.width*r.height*h*h/(e*i);n=u/h}return{variant:t,rank:1e8*n|0}});return n=n.sort(function(t,i){return t.rank===i.rank?t.rank?i.variant.getComputedHeight(e)-t.variant.getComputedHeight(e):t.variant.baseSize.width===i.variant.baseSize.width?t.variant.getComputedHeight(e)-i.variant.getComputedHeight(e):t.variant.baseSize.width-i.variant.baseSize.width:i.rank-t.rank}),n[0].variant},selectWidestThenShortest:function(t,e,i){var a=t.map(function(t){return{variant:t,rank:e347||14>a?r="to top":a>=14&&75>=a?r="to top right":a>75&&105>a?r="to right":a>=105&&167>=a?r="to bottom right":a>167&&194>a?r="to bottom":a>=194&&255>=a?r="to bottom left":a>255&&285>a?r="to left":a>=285&&347>=a&&(r="to left top"),r},e.convertSideCornerToAngle=function(t,e){var a=0;switch(t){case"bottom":case"to top":a=0;break;case"left":case"to right":a=90;break;case"right":case"to left":a=270;break;case"top":case"to bottom":a=180;break;case"to bottom right":case"to right bottom":a=167;break;case"to bottom left":case"to left bottom":a=194;break;case"to top right":case"to right top":a=14;break;case"to top left":case"to left top":a=347;break;case"bottom right":case"right bottom":a=285;break;case"bottom left":case"left bottom":a=75;break;case"top right":case"right top":a=255;break;case"top left":case"left top":a=105}return/\-?(moz|webkit|o|ms)/.test(e)&&(a=90-a),(a+360)%360},e.isHex=function(t){return e.patternHex.test(t)},e.isRgb=function(t){return e.patternRgb.test(t)},e.isRgba=function(t){return e.patternRgba.test(t)},e.isGradient=function(t){return e.patternGradient.test(t)},e.parseColorStopList=function(t){for(var a,r=e.patternGradientStopList.exec(t),n=[];null!==r;)a={color:r[e.matchGradientStopListColor]},r[e.matchGradientStopListPosition]&&(a.position=r[e.matchGradientStopListPosition]),n.push(a),r=e.patternGradientStopList.exec(t);return n},e.parseGradient=function(t){var a=null,r=e.patternGradient.exec(t);if(null!==r){a={original:r[0],oldSyntax:!r[e.matchGradientType],prefix:r[e.matchGradientPrefix],type:r[e.matchGradientType],colorStopList:[]};var n=e.patternGradientSyntax.exec(r[e.matchGradientValues]);null!==n&&(n[e.matchGradientSyntaxLine]&&(a.line=n[e.matchGradientSyntaxLine]),n[e.matchGradientSyntaxAngle]&&(a.angle=n[e.matchGradientSyntaxAngle]),n[e.matchGradientSyntaxSideCorner]&&(a.sideCorner=n[e.matchGradientSyntaxSideCorner]),a.colorStopList=e.parseColorStopList(n[e.matchGradientSyntaxStopList]));var i=e.patternRadialGradientSyntax.exec(r[e.matchGradientValues]);null!==i&&(a.radialGradientEllipse=i[e.matchRadialGradientSyntaxEllipse],i[e.matchRadialGradientSyntaxWidth]&&(a.radialGradientWidth=i[e.matchRadialGradientSyntaxWidth]),i[e.matchRadialGradientSyntaxHeight]&&(a.radialGradientHeight=i[e.matchRadialGradientSyntaxHeight]),i[e.matchRadialGradientSyntaxXPosition]&&(a.radialGradientXPosition=i[e.matchRadialGradientSyntaxXPosition]),i[e.matchRadialGradientSyntaxYPosition]&&(a.radialGradientYPosition=i[e.matchRadialGradientSyntaxYPosition]),a.colorStopList=e.parseColorStopList(i[e.matchRadialGradientSyntaxStopList]))}return a},e.createGradient=function(t){var a={backgroundColor:null,webkitGradient:null,mozLinearGradient:null,msLinearGradient:null,oLinearGradient:null,webkitLinearGradient:null,linearGradient:null,radialGradient:null},r=e.parseGradient(t);if(r.oldSyntax)throw new Error('[Not supported] Can not create gradient from old "webkit-gradient" syntax.');for(var n="",i="",o=r.colorStopList.length,d=0;o>d;d++){var l=r.colorStopList[d];if(l.color){if(0!==d?(n+=", ",i+=", "):a.backgroundColor=l.color,n+=l.color,i+="color-stop(",l.position)n+=" "+l.position,i+=l.position;else{var s=100/(o-1)*d;i+=s+"%"}i+=", "+l.color+")"}}if("linear"===r.type){var g=0;"undefined"!=typeof r.angle?g=parseInt(r.angle,10):"undefined"!=typeof r.sideCorner&&(g=e.convertSideCornerToAngle(r.line,r.prefix));var p=g;/\-?(moz|webkit|o|ms)/.test(r.prefix)?g=90-p:p=90-g;var c=e.convertAngleToSideCorner(g),m=e.gradientOldSideCorner[c];a.webkitGradient="-webkit-gradient(linear, "+m+", "+i+")",a.mozLinearGradient="-moz-linear-gradient("+p+"deg, "+n+")",a.msLinearGradient="-ms-linear-gradient("+p+"deg, "+n+")",a.oLinearGradient="-o-linear-gradient("+p+"deg, "+n+")",a.webkitLinearGradient="-webkit-linear-gradient("+p+"deg, "+n+")",a.linearGradient="linear-gradient("+g+"deg, "+n+")"}else if("radial"===r.type){var h=parseInt(r.radialGradientWidth,10),G=parseInt(r.radialGradientHeight,10),b=parseInt(r.radialGradientXPosition,10),u=parseInt(r.radialGradientYPosition,10),f=h+"% "+G+"%",S=b+"% "+u+"% ",x=f+" at "+S;a.radialGradient="radial-gradient("+x+", "+n+")"}return a},e.createGradientStyle=function(t){var a=e.createGradient(t),r="";for(var n in a){var i=a[n];null!==i&&e.isGradient(i)&&(r+="background-image: "+i+"; ")}return r},e.parseRgb=function(t){var a,r=0,n=0,i=0,o=1;if(e.isRgb(t))a=e.patternRgb.exec(t);else{if(!e.isRgba(t))throw new Error("Color format ["+t+"] is not supported, please provide rgb or rgba color format input.");a=e.patternRgba.exec(t)}return null!==a&&(a[e.matchRgbaRed]&&(r=parseInt(a[e.matchRgbaRed],10)),a[e.matchRgbaGreen]&&(n=parseInt(a[e.matchRgbaGreen],10)),a[e.matchRgbaBlue]&&(i=parseInt(a[e.matchRgbaBlue],10)),a[e.matchRgbaAlpha]&&(o=parseFloat(a[e.matchRgbaAlpha]))),[r,n,i,o]},e.shadeRgb=function(t,e){return this._transformRgb(t,e,0)},e.tintRgb=function(t,e){return this._transformRgb(t,e,255)},e._transformRgb=function(t,a,r){var n=e.parseRgb(t),i=n[0],o=n[1],d=n[2],l=n[3],s=parseInt(i*(1-a)+r*a),g=parseInt(o*(1-a)+r*a),p=parseInt(d*(1-a)+r*a);return"rgba("+s+", "+g+", "+p+", "+l+")"},t.Color=e}(window),"undefined"!=typeof module&&"undefined"!=typeof module.exports&&(module.exports=window.Color);;
var Deferrable={callback:function(e,r){if(e){if("succeeded"===this._deferredStatus)return e.apply(r,this._deferredArgs);this._callbacks||(this._callbacks=[]),this._callbacks.push([e,r])}},errback:function(e,r){if(e){if("failed"===this._deferredStatus)return e.apply(r,this._deferredArgs);this._errbacks||(this._errbacks=[]),this._errbacks.push([e,r])}},setDeferredStatus:function(){var e,r,s=Array.prototype.slice.call(arguments),t=s.shift();if(this._deferredStatus=t,this._deferredArgs=s,"succeeded"===t?e=this._callbacks:"failed"===t&&(e=this._errbacks),e)for(;r=e.shift();)r[0].apply(r[1],this._deferredArgs)}};;
function Paginator(i){if(i=i||{},"object"!=typeof i.container)throw"Paginator is missing container.";if("object"!=typeof i.containerSize)throw"Paginator is missing container size object.";if("string"!=typeof i.position)throw"Paginator is missing position.";if("number"!=typeof i.itemsCount)throw"Paginator is missing itemsCount.";extend(this,i),this._isVisible=this.position&&"hidden"!==this.position,this._hasItems=!!this.itemsCount,this._list=null,this._largePaginationThreshold=350,this._dotSizes={smallSize:9,smallActive:2,largeSize:12,largeActive:4}}Paginator.prototype.buildPagination=function(){if(this._isVisible&&this._hasItems){this._list=document.createElement("ul"),addClass(this._list,"pagination"),addClass(this._list,this.position);for(var i=0;ithis._largePaginationThreshold&&i.height>this._largePaginationThreshold?"large":"small",s=this.itemsCount*this._dotSizes[t+"Size"]+this._dotSizes[t+"Active"];switch(addClass(this._list,t),this.position){default:case"bottom":case"top":this._list.style.left=(i.width-s)/2+"px";break;case"right":case"left":this._list.style.top=(i.height-s)/2+"px"}this._list.style.display="block"}},Paginator.prototype.setActivePaginationItem=function(i){this._isVisible&&this._hasItems&&Array.prototype.slice.call(this._list.getElementsByTagName("li")).forEach(function(t,s){removeClass(t,"active"),s===i&&addClass(t,"active")},this)};;
function Creative(e,t,r,n,i,a,o,s,u,c,d,m,p){if(e instanceof Creative)throw"This JSON has already been unfreezed. We do it inline, to improve performance. Duplicate it yourself before unfreezing, if you need to use it again.";var v=p.start("Creative.new"),f=extend({adapter:a,runtimeParams:t||{},urlOpenedOverrideUrls:s,urlOpenedUrlAppendage:d,clickThroughDestinationUrl:m,storeOpenedOverrideUrls:u,macros:c},o),l=p.start("Creative.unfreeze");return e=Freezer.unfreeze(e,window,f),l.end(),e.instantiation=randInt(),e.batcher=new Batcher({protoLoading:a.protoLoading}),e.trackingCenter=r,e.universalInteractionId="",e.aggregatorTracking=n,e.experiments=i,e.perf=p,e.platformAdvId=t.platformAdvId,e.platformAdvIdTrackingLimited=t.platformAdvIdTrackingLimited,"undefined"!=typeof a&&null!==a&&(a.openBrowserSameWindowInHostileIFrame=function(e){window.top.location.href=e}),v.end(),e}Creative.toString=function(){return"[Clazz Creative]"},Creative.prototype.toString=function(){return"[Creative "+this.name+"]"},window.creative=null,extend(Creative.prototype,EventEmitter),Creative.init=function(e,t,r,n,i,a,o,s,u,c,d,m,p){if(window.creative)throw"creative is a singleton and was already initialized.";Logger.initFromRuntimeParams(t),window.creative=new Creative(e,t,r,n,i,a,o,s,u,c,d,m,p)},Creative.prototype.userInteracted=function(e){this.emit("interaction",e)},Creative.prototype.clickedThrough=function(e){this.emit("clickThrough",e)},Creative.prototype._getRuntimeParamsWithPrefix=function(e){var t={};for(var r in this.runtimeParams)0===r.indexOf(e)&&(t[r.slice(e.length)]=this.runtimeParams[r]);return t},Object.defineProperties(Creative.prototype,{sessionId:{enumerable:!0,get:function(){return this.runtimeParams.sessionId}},placementId:{enumerable:!0,get:function(){return this.runtimeParams.placementId||null}},folderId:{enumerable:!0,get:function(){return this.runtimeParams.folderId}},supplierId:{enumerable:!0,get:function(){return this.runtimeParams.supplierId||null}},secure:{enumerable:!0,get:function(){return 1==this.runtimeParams.secure}},userParams:{enumerable:!0,get:function(){return this._getRuntimeParamsWithPrefix("user.")}},userIdentifiers:{enumerable:!0,get:function(){return this.runtimeParams.userIdentifiers}},authTokenUrlParam:{enumerable:!1,get:function(){return"authBasis="+creative.runtimeParams.authBasis+"&authToken="+creative.runtimeParams.authToken}},customAudiences:{enumerable:!0,get:function(){return function(e){if(!creative.runtimeParams.customAudiences[e])throw new Error('Custom audience "'+e+'" is not used by the creative.');return{userExists:creative.runtimeParams.customAudiences[e].userExists,userData:creative.runtimeParams.customAudiences[e].userData,addUser:function(t){return CustomAudiences.addUser(e,t)},removeUser:function(){return CustomAudiences.removeUser(e)}}}}},acceptLanguage:{enumerable:!0,get:function(){return this.runtimeParams.acceptLanguage}}}),Creative.prototype.awake=function(){function e(r,n,i,a){r.forEach(function(r){r.parentUnit=a,r.parentScreen=i,r.parentContainer=n;var o=r.getNestedContainers();o.forEach(function(n){n.parentUnit=a,n.parentScreen=i,n.parentObject=r,e(n.objects,n,i,a),n.scenes&&t(n.scenes,n,i,a)})})}function t(e,t,r,n){e.forEach(function(e){e.parentUnit=n,e.parentScreen=r,e.parentContainer=t})}var r=this;for(var n in r.units){var i=r.units[n];i.name=n;var a=[];i.variants?i.variants.forEach(function(e){a=a.concat(e.master,e.screens),e.loadingScreen&&(a=[e.loadingScreen].concat(a))}):(a=[i.master].concat(i.screens),i.loadingScreen&&(a=[i.loadingScreen].concat(a))),a.forEach(function(r){r.parentUnit=i,e(r.objects,r,r,i),r.scenes&&t(r.scenes,r,r,i)})}},Creative.prototype.track=function(e,t){["firstInteraction","interaction","endCardInteraction","unitCollapsed","creativeDismissed","clickThroughDestinationOpened","firstClickThrough","itemSwiped"].indexOf(e.name)>=0&&(e=extend(e,{universalInteractionId:this.universalInteractionId})),this.trackingCenter.track(e,t)},Creative.prototype.setUniversalInteractionId=function(e){this.universalInteractionId=e},Creative.prototype.wrapRedirectPageUrl=function(e,t){return this.trackingCenter.wrapRedirectPageUrl(e,t)},Object.defineProperty(Creative.prototype,"sdk",{get:function(){return this.adapter},enumerable:!0}),Creative._throw=function(e){throw e},Creative.prototype.getUserInteracted=function(){return 1==this.runtimeParams.userInteracted},Creative.prototype.trackCreativeRendered=function(){creative.adapter.notifycreativeRendered(),this._getCreativeRendered()||(this.track({name:"creativeRendered"}),this.runtimeParams.creativeRendered=1,defer(this.trackingCenter.batchFlush))},Creative.prototype._getCreativeRendered=function(){return 1===this.runtimeParams.creativeRendered},Creative.prototype.trackCreativeRenderedOnScreenShow=Creative.prototype.trackCreativeRendered,Creative.prototype.trackCreativeRenderedOnVideoStart=noop,Creative.trackCustomEventAction=function(e,t,r){var n="custom";e.track({name:n,label:t.name}),creative.adapter.sendToEventMonitor(n,t.triggerId,e.screen.name,null,t.name,e.initiatedBeforeScreenShown()),r&&r()},Creative.prototype.trackCreativeLoaded=function(e){this.track({name:"creativeLoaded",viewability00Measurable:e.observingViewability("00"),viewability501Measurable:e.observingViewability("501"),viewableTimeMeasurable:e.observingViewableTime(),cdnVariant:this.runtimeParams.variantChoices.CdnTiming||"none"}),defer(this.trackingCenter.batchFlush),this.perf._stopTrackingDefers=!0,this.perf.mark("creativeLoaded")},Creative.prototype.createUserLocation=function(e){return"undefined"!=typeof UserLocation?new UserLocation({lat:this.runtimeParams.gpsLat,lng:this.runtimeParams.gpsLng},e):void 0},Creative.prototype.getPageUrl=function(e){return(this.secure?this.creativeUrl:this.insecureCreativeUrl)+e+"?base64json="+encodeURIComponent(btoa(to_utf8(JSON.stringify(this.runtimeParams))))},Creative.prototype.shouldClickThroughToNewWindow=function(e){var t;t=["same","new"].indexOf(this.runtimeParams.preferredClickThroughWindow)>=0?this.runtimeParams.preferredClickThroughWindow:"new",creative&&creative.adapter.nesting.hostileIframe&&(t="new");var r=e&&e.inUserInitiatedIteration,n=deviceInfo.os.android()&&deviceInfo.browser.facebookApp();return"new"==t&&r&&!n},Creative.prototype.getFeedFields=function(){return FeedData.getCustomFields()},Creative.prototype.getFeedFieldByName=function(e){return FeedData.getCustomFieldByName(e)},Creative.prototype.getAllFeedFieldsByName=function(e){return FeedData.getCustomFields().filter(function(t){return t.name===e})};;
function CrossScreenBanner(){}inherit(CrossScreenBanner,Creative),CrossScreenBanner.toString=function(){return"[Clazz CrossScreenBanner]"},CrossScreenBanner.prototype.toString=function(){return"[CrossScreenBanner "+this.name+"]"},CrossScreenBanner.prototype.awake=function(){CrossScreenBanner.uber.awake.apply(this,arguments),this.adapter.wrapRedirectPageUrl=this.wrapRedirectPageUrl.bind(this),this.units.banner.dismissAction=function(e,n,r){e.track({name:"creativeDismissed"}),creative.adapter.dismiss(r,n)}.bind(this),this.units.banner.trackCreativeDismissed=function(){new ActionContext(this.currentScreen).track({name:"creativeDismissed"})},this.units.banner.userLocation=this.createUserLocation(!1)};;
var Kernel={};Kernel.toString=function(){return"[Clazz Kernel]"},Kernel.runInParallelAction=function(e,n,t){n.actions.waitForEach(function(n,t){n(e,t)},t)},Kernel.runInParallelActionDryRun=Kernel.runInParallelAction,Kernel.runInBackgroundAction=function(e,n,t){n.action&&n.action(e,noop),t()},Kernel.runInSequenceAction=function(e,n,t){for(var r=t,i=n.actions.length-1;i>=0;i--)r=function(n,t){return function(){t(e,n)}}(r,n.actions[i]);r()},Kernel.runInSequenceActionDryRun=Kernel.runInSequenceAction,Kernel.runNTimesAction=function(e,n,t){n.caller.hasOwnProperty("executionsLeft")||(n.caller.executionsLeft=n.repeat),n.caller.executionsLeft>0?(n.caller.executionsLeft--,(n.action||nullai)(e,t)):t&&t()},Kernel.runNTimesActionDryRun=function(e,n,t){(n.action||nullai)(e,t)},Kernel.loopAction=function(e,n,t){function r(){return 0==i?t():(-1!=i&&i--,void(n.action||nullai)(e,"thumb"===creative.runtimeParams.purpose?t:r))}var i=n.repeat;r()},Kernel.loopActionDryRun=function(e,n,t){(n.action||nullai)(e,t)},Kernel.sleepAction=function(e,n,t){setTimeout(t,n.duration)},Kernel.executeJavascriptAction=function(e,n,t){try{var r=e.initiator,i=e.screen.parentUnit,c=e.screen,a=new Function("ctx","c","unit","screen","variant",n.script.code),o=!1,u=i.getVariantForScreen?i.getVariantForScreen(c):void 0;null!==n.script.code.match(/http:/)&&this._track("executeJavascriptAction.code");var l=function(){o?console.warn('Multiple calls made to "c()" from "'+e.initiator.fieldName+'" Execute JS Action'):(t(),o=!0)}.bind(this);a.call(r,e,l,i,c,u)}catch(s){console.error(s.message+"\n"+s.stack)}},Kernel.randomAction=function(e,n,t){var r=0;if(n.outcomes.forEach(function(e){r+=e.weight}),!r)return t();for(var i=Math.random()*r,c=0;ci)return(a.action||nullai)(e,t)}},Kernel.randomActionDryRun=function(e,n,t){n.outcomes.forEach(function(n){(n.action||nullai)(e,noop)}),t()},Kernel.bestAction=function(e,n,t){var r=creative.experiments.get("Best",[creative.id,n.experimentName]);r.trackExposure();var i=n.outcomes.filter(function(e){return e.experimentVariant==r.chosenVariant})[0],c=i?i:n.outcomes[0];(c.action||nullai)(e,t)},Kernel.bestActionDryRun=function(e,n,t){var r=creative.experiments.get("Best",[creative.id,n.experimentName]),i=n.outcomes.filter(function(e){return e.experimentVariant==r.chosenVariant})[0],c=i?i:n.outcomes[0];(c.action||nullai)(e,t)},Kernel.trackBestVariantSuccessAction=function(e,n,t){var r=creative.experiments.get("Best",[creative.id,n.experimentName]);r.trackSuccess(),creative.adapter.sendToEventMonitor("trackBestVariantSuccess",n.triggerId,e.screen.name,r.chosenVariant,"",e.initiatedBeforeScreenShown()),t()},Kernel._track=function(e){this._privateApiTracked=this._privateApiTracked||{},this._privateApiTracked[e]||(this._privateApiTracked[e]=!0,creative.track({name:"retiredFeatureUsed",featureType:"loadingInsecureContent",featureName:e}))};;
;
function Scene(){}Scene.instances=[],Scene.prototype.awake=function(){this._framesPerSecond=this.framesPerSecond&&null!==this.framesPerSecond?this.framesPerSecond:20,this._framesPerPixel=.1,this._durationInFrames=0,this._durationInMilliseconds=0,this._durationInPixels=0,this._isTimeScene="time"===this.type,this._isReactiveScene="reactiveBanner"===this.type,this._lastUpdateObjectsProgress=0,this._objectVisibilityStates=[],this._claimedObjects=[],this._keyframeAnimations=Object.create(null),this._rawInitialValues=[],this._initSceneOnRenderApiCall=!0,this._suspended=!1,this.fallbackFrameShown=!1,this.forceFallbackFrame=!1,this.intersection="undefined"!=typeof this.intersection?this.intersection:50,this.endingMode="string"==typeof this.endingMode?this.endingMode:"lastKeyframe",this.duration="number"==typeof this.duration?this.duration:10,this._appearedBefore=!1,this._isAppearing=!1,this._calculateDurations=this._calculateDurations.bind(this),this._buildKeyframeAnimations=this._buildKeyframeAnimations.bind(this),this._removeAnimatedClass=this._removeAnimatedClass.bind(this),this._renderOnSizeChange=this._renderOnSizeChange.bind(this),this._initPlayer(),this.parentContainer.on("appeared",this._appear.bind(this)),this.parentContainer.on("disappeared",this._dissapear.bind(this)),this.parentContainer.on("resize",this._calculateDurations),this.parentContainer.on("resize",this._buildKeyframeAnimations),this.parentContainer.on("resize",this._renderOnSizeChange),this.parentUnit.on("layoutChanged",this._calculateDurations),this.parentUnit.on("layoutChanged",this._buildKeyframeAnimations),this.parentUnit.on("layoutChanged",this._renderOnSizeChange),Scene.instances.push(this)},Scene._sizeProperties=["width","height"],Scene._positionProperties={horizontal:["left","hcenter","right"],vertical:["top","vcenter","bottom"]},Object.defineProperties(Scene.prototype,{paused:{get:function(){return this._player.paused}},_scenePlayerClazz:{get:function(){return window[this.type.charAt(0).toUpperCase()+this.type.slice(1)+"ScenePlayer"]},configurable:!0}}),Scene.prototype._initPlayer=function(){this._player=new this._scenePlayerClazz(this),this._player.on("stop",this._resetRawInitialValues.bind(this)),this._player.on("end",this._updateRawFinalValuesForAllLayouts.bind(this)),this._player.on("pause",this._removeAnimatedClass),this._player.on("stop",this._removeAnimatedClass)},Scene.prototype._removeAnimatedClass=function(){for(var e in this._claimedObjects)removeClass(this._claimedObjects[e].node,"animated")},Scene.prototype._getMaxFrameNumber=function(){if(this._isTimeScene&&"timelineDuration"===this.endingMode)return this.duration*this._framesPerSecond;var e=0;for(var t in this.objects){var i=this.objects[t],n=this.parentUnit.layoutCurrentIndex;for(var a in i.layoutSpecificValues[n]){var s=i.layoutSpecificValues[n][a];e=Math.max(e,s.frame)}}return e},Scene.prototype._calculateDurations=function(){this._durationInFrames=this._getMaxFrameNumber(),this._durationInMilliseconds=this._durationInFrames/this._framesPerSecond*1e3,this._durationInPixels=this._durationInFrames/this._framesPerPixel},Scene.prototype._captureRawInitialValues=function(e){this._rawInitialValues[e.localId]=[];for(var t=this.parentScreen.parentContainer.layouts.length,i=0;t>i;i++){var n=e.layoutSpecificValues[i];this._rawInitialValues[e.localId][i]=extend({rotation:n.rotation,opacity:n.opacity,hidden:n.hidden},n.position,n.size)}},Scene.prototype._calculateFinalValuesForObject=function(e){var t=[];for(var i in this.objects){var n=this.objects[i];if(n.target.localId==e.localId)for(var a in n.layoutSpecificValues){t[a]=Object.create(null);for(var s in n.layoutSpecificValues[a]){var r=n.layoutSpecificValues[a][s];for(var o in r.properties)null!==r.properties[o].value&&(t[a][o]=r.properties[o].value)}}}return t},Scene.prototype._updateRawFinalValuesForAllLayouts=function(){if("reverse"!==this.onEnd)for(var e in this._claimedObjects)for(var t=this._claimedObjects[e],i=this._calculateFinalValuesForObject(t),n=this.parentScreen.parentContainer.layouts.length,a=0;n>a;a++){var s=t.layoutSpecificValues[a],r=i[a];Scene._updateLayoutWithValues(s,r)}},Scene.prototype._buildKeyframeAnimations=function(){this._keyframeAnimations=Object.create(null);for(var e=this.parentUnit.layoutCurrentIndex,t=0;t0&&this._suspended&&this._isAppearing?this._playSceneOrDisplayFallbackFrame():0!==e||this._player.paused||this._suspendScene()},Scene.prototype._handleContainerViewableChange=function(e){e&&this._suspended&&this._isAppearing?this._playSceneOrDisplayFallbackFrame():e||this._player.paused||this._suspendScene()},Scene.prototype.getDuration=function(){return{frames:this._durationInFrames,pixels:this._durationInPixels,milliseconds:this._durationInMilliseconds}},Scene.prototype._calculateKeyframeStyleAttributes=function(e){var t=this._claimedObjects.indexOf(e);if(-1===t)return{};var i=this._objectVisibilityStates[t],n=e._calculateNewStyleAttributes();return i.isDirty("transition")&&("show"===i.transition?n.display="block":"hide"===i.transition&&(n.display="none")),n},Scene.prototype.updateObjects=function(e){for(var t in this._claimedObjects){var i=this._claimedObjects[t];if(i.node){if(i.isAnimated){var n=this._keyframeAnimations[i.localId],a=e>=n.startKeyframe,s=e<=n.endKeyframe||!n.firstFrameAnimated,r=this._lastUpdateObjectsProgress>n.startKeyframe&&en.endKeyframe,l=this._isReactiveScene&&(r||o),c=a&&s||this.fallbackFrameShown||l;if(c)n.firstFrameAnimated=!0,hasClass(i.node,"animated")||addClass(i.node,"animated");else{if(!hasClass(i.node,"animated"))continue;removeClass(i.node,"animated")}}var h=this._keyframeAnimations[i.localId].animation.getValuesAt(e);Scene._updateLayoutWithValues(i.layoutCurrent,h,this._objectVisibilityStates[t]),i._keyframeStyle=this._calculateKeyframeStyleAttributes(i)}}this._lastUpdateObjectsProgress=e},Scene.prototype.renderObjects=function(){for(var e in this._claimedObjects){var t=this._claimedObjects[e];if(t.node){var i=this._objectVisibilityStates[e];i.isDirty("transition")&&("show"===i.transition?t.showAction(null,{},noop):"hide"===i.transition&&t.hideAction(null,{},noop),i.markClean("transition")),t._applyStyles(t.node,t._keyframeStyle),t.redrawSceneLayout()}}},Scene.prototype.getPlayer=function(){return this._player},Scene.prototype.claimObject=function(e){if(-1===this._claimedObjects.indexOf(e)){for(var t=0;t0&&(this._renderAtProgress(e),this._removeAnimatedClass())},Scene.prototype.renderAtProgress=function(e){this._player.paused&&void 0!==e&&(this._initSceneOnRenderApiCall&&(this._initSceneOnRenderApiCall=!1,this._initAnimations()),this._renderAtProgress(e))},Scene.prototype.playSceneAction=function(e,t,i){var n=-1===["repeat","reverse"].indexOf(this.onEnd),a="repeat"==this.onEnd&&!isNaN(this.onEndRepeatCount)&&this.onEndRepeatCount>0,s="reverse"==this.onEnd&&!isNaN(this.onEndReverseCount)&&this.onEndReverseCount>0,r=this.onEndWaitForCount&&(a||s);n||r?(this._player.once("stop",i),this._playSceneOrDisplayFallbackFrame()):(this._playSceneOrDisplayFallbackFrame(),i())},Scene.prototype.pauseSceneAction=function(e,t,i){"time"===this.type&&(this._pauseScene(),i())},Scene.prototype.stopSceneAction=function(e,t,i){"time"===this.type&&(this._stopScene(),i())},Scene.prototype.resetAction=function(e,t,i){this._player&&(this._stopScene(),this._player.destroy()),this._initPlayer(),this._suspended=!1,this._claimedObjects.forEach(function(e){this.releaseObject(e)},this),i()},Scene._extractPropertyValues=function(e){var t=Object.create(null);for(var i in e){var n=e[i].timingFunction;n&&(n.instance=Scene._getTimingFunctionByName(n.id)),t[i]={value:e[i].value,timingFunction:n}}return t},Scene._keyframeWithUnitsToKeyframePx=function(e,t){for(var i=0;i-1&&(s=s/100*t[n]),e[n].value=s)}}for(var r in Scene._positionProperties)for(var o="horizontal"==r?"width":"height",l=Scene._positionProperties[r],c=0;c-1&&(d=d/100*t[o]),e[h].value=d)}}},Scene._getTimingFunctionByName=function(e){return e?AnimationTimingFunctions[camelize(e)]:null},Scene._fillInInitialAndDynamicKeyframeValues=function(e,t,i){e[0]||(e[0]=Object.create(null));for(var n in t)!e[0][n]&&i.indexOf(n)>-1&&(e[0][n]={value:t[n],timingFunction:{id:"none",instance:Scene._getTimingFunctionByName("none")}});for(var a in e)for(var s in e[a])e[a][s]&&null===e[a][s].value&&(e[a][s].value=t[s])},Scene._ensureSizeOrPositionValueHasUnits=function(e){return e=String(e),e.indexOf("%")>-1||e.indexOf("px")>-1?e:e+"px"},Scene._updateLayoutWithValues=function(e,t,i){var n=extend({},e.position),a=!1;for(var s in Scene._positionProperties)for(var r=Scene._positionProperties[s],o=0;o0}}),View.prototype.createNode=function(){this.on("loaded",creative.perf.start("View.load",{clazz:this.constructor.name,name:this.name}).end);var e=document.createElement("div");"undefined"!=typeof creative&&creative.adapter&&creative.adapter.useNativeClickForTapDetection&&(e.style.touchAction="manipulation"),this.localId&&(e.id="celtra-object-"+this.localId);for(var t=this.constructor;t;t=t.uber?t.uber.constructor:void 0)addClass(e,"celtra"+t.name.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()}));return e},View.prototype.getNode=function(e){return this.loaded?e&&defer(e,0,"View.getNode defer finishedLoadingCallback",useAsap()):(e&&this._waitingForLoadCallbacks.push(e),this.node||(this.incrementLoadingCount(),this.node=this.createNode(),defer(this.decrementLoadingCount,0,"View.getNode defer decrementLoadingCount",useAsap()))),this.node},Object.defineProperty(View.prototype,"isAppearing",{get:function(){return this._isAppearing}}),Object.defineProperty(View.prototype,"hasAppearedAtLeastOnce",{get:function(){return this._hasAppearedAtLeastOnce}}),View.prototype.appear=function(){var e="View APPEAR called on "+this.constructor.name+" "+this.localId+" (name="+this.name+")";this.parentContainer&&(e+=" from "+this.parentContainer.constructor.name+" "+this.parentContainer.localId+" (name="+this.parentContainer.name+")"),Logger("events.appear").log(e),this.hidden?this._shouldAppear=!0:this.isAppearing||(this._appear(),this._isAppearing=!0,this._hasAppearedAtLeastOnce=!0,this.emit("appeared"))},View.prototype.disappear=function(){var e="View DISAPPEAR called on "+this.constructor.name+" "+this.localId+" (name="+this.name+")";this.parentContainer&&(e+=" from "+this.parentContainer.constructor.name+" "+this.parentContainer.localId+" (name="+this.parentContainer.name+")"),Logger("events.appear").log(e),this.isAppearing&&(this._disappear(),this._isAppearing=!1,this._shouldAppear=!1,this.emit("disappeared"))},View.prototype.reset=function(){this.isAppearing&&(this._shouldAppear=this.hidden,this._isAppearing=!this.hidden)},View.prototype._appear=function(){},View.prototype._disappear=function(){},View.prototype.appearNestedObjects=function(){this.objects.forEach(function(e){e.appear()},this)},View.prototype.disappearNestedObjects=function(){this.objects.forEach(function(e){e.disappear()},this)},View.prototype._trackViewShown=function(e){var t={name:"viewShown",viewName:this.name,clazz:this.constructor.name};new ActionContext(this,!1).track(extend(t,e))};;
BaseCreativeUnit.prototype.alert=function(e,t){var a=e.boxWidth||BaseCreativeUnit._defaultModalBoxWidth;e.message=removeHtmlTags(e.message);var i=this._calculateModalDialogActualHeight(e);a<=this.size.width&&i<=this.size.height?this.showModalDialogInPlacement("alert",e,t):(alert(e.message),t())},BaseCreativeUnit.prototype.prompt=function(e,t){var a=e.boxWidth||BaseCreativeUnit._defaultModalBoxWidth,i=this._calculateModalDialogActualHeight(e);if(a<=this.size.width&&i<=this.size.height)this.showModalDialogInPlacement("prompt",e,t);else{var l=prompt(removeHtmlTags(e.message));t(l)}},BaseCreativeUnit.prototype._getUniqueId=function(){var e=new Date,t=e.getTime()+Math.random();return t},BaseCreativeUnit.prototype.showModalDialogInPlacement=function(e,t,a){var i=this._getUniqueId(),l={};l[i]={attachment:"node",parentNode:this.node,positioning:"screen",type:"layer"},creative.adapter.createPlacements(l,function(){function l(e){13==e.keyCode&&(creative.adapter.destroyPlacement(i),o=null,a(C.value))}function r(e){e.preventDefault(),e.stopPropagation()}function n(t){t.preventDefault(),t.stopPropagation(),creative.adapter.destroyPlacement(i),o=null,"prompt"==e?a(C.value):a()}function s(e){e.preventDefault(),e.stopPropagation(),creative.adapter.destroyPlacement(i),o=null,a(null)}if(window){var o=creative.adapter.placements[i];o.setZIndex("max"),o.setSize("100%","100%"),o.setPosition(0,0);var d=o.createElement("link");d.rel="stylesheet",d.type="text/css",d.href=creative.resourceUrl+"runner-min/clazzes/ModalDialogs-Overlay.css",o.getContainer().appendChild(d);var c=o.createElement("div");addClass(c,"celtra-alert"),c.style.display="none";var p=o.createElement("div");addClass(p,"celtra-alert-dark-overlay"),c.appendChild(p),this.preventScroll(c);var h=o.createElement("div");if(addClass(h,"celtra-alert-box"),t.title&&""!=t.title){var u=o.createElement("h1");addClass(u,"celtra-alert-title"),u.innerHTML=t.title,h.appendChild(u)}if(t.title&&""!=t.title&&t.message&&""!=t.message){var v=o.createElement("hr");addClass(v,"celtra-alert-dark-line"),h.appendChild(v);var m=o.createElement("hr");addClass(m,"celtra-alert-light-line"),h.appendChild(m)}if(t.message&&""!=t.message){var g=o.createElement("div");addClass(g,"celtra-alert-message"),g.innerHTML=t.message,g.setAttribute("dir","auto"),"auto"!==g.dir&&(g.dir=guessWritingDirection(t.message)||"ltr"),h.appendChild(g)}if("prompt"==e){var C=o.createElement("input");addClass(C,"celtra-alert-input"),C.value=t.defaultValue||"",h.appendChild(C),attach(C,"keypress",l)}var f=o.createElement("div");if(addClass(f,"celtra-alert-ok"),f.innerHTML="OK",h.appendChild(f),this.preventScroll(h),once(f,"touchend",n,!1),"prompt"==e&&t.showCancel){addClass(f,"with-cancel");var y=o.createElement("div");addClass(y,"celtra-alert-cancel"),y.innerHTML="CANCEL",h.appendChild(y),attach(f,"touchstart",r,!1),once(y,"touchend",s,!1)}c.appendChild(h),o.populate(c,function(){o.show();var e=setInterval(function(){"absolute"===celtra.styler.computedCSS(h,"position")&&(computedBoxHeight=parseInt(celtra.styler.computedCSS(h,"height"),10)+parseInt(celtra.styler.computedCSS(h,"paddingTop"),10)+parseInt(celtra.styler.computedCSS(h,"paddingBottom"),10),h.style.marginTop=-computedBoxHeight/2+"px",h.style.opacity=1,clearInterval(e),e=null)},100)})}}.bind(this))},BaseCreativeUnit.prototype._calculateModalDialogActualHeight=function(e){var t=document.createElement("div");t.style.cssText="visibility:hidden; font-family:Helvetica,Arial,sans-serif; font-size:14px; padding-bottom:10px; text-shadow:0 1px 0 rgba(0,0,0,1); width:220px;",t.innerText=e.message,this.node.appendChild(t);var a=parseInt(window.getComputedStyle(t).getPropertyValue("height"),10),i=a+BaseCreativeUnit._defaultModalBoxHeightWithoutMessage;return this.node.removeChild(t),i},BaseCreativeUnit.prototype.preventScroll=function(e){var t=["mousewheel","touchmove"];t.forEach(function(t){attach(e,t,function(e){e.preventDefault()},!1)})},BaseCreativeUnit._defaultModalBoxWidth=242,BaseCreativeUnit._defaultModalBoxHeightWithoutMessage=75;;
function CreativeUnitWithVariants(){this._uvOverrideSize=null,this.variantSelector=null}inherit(CreativeUnitWithVariants,BaseCreativeUnit),CreativeUnitWithVariants.toString=function(){return"[Clazz CreativeUnitWithVariants]"},CreativeUnitWithVariants.prototype.toString=function(){return"[CreativeUnitWithVariants "+this.name+" ("+this.localId+")]"},CreativeUnitWithVariants.prototype.awake=function(){CreativeUnitWithVariants.uber.awake.call(this),this._currentVariant=null,this._fullScreenVariantLockActive=!1,this.preventUVUpdate=!1,this.variants.forEach(function(t,i){t.originalIndex=i}),this.variants=this.variants.filter(function(t){return"rm"===t.companionType||!t.companionType}),this.variants.sort(function(t,i){function e(t){return t.minSize.width*t.minSize.height}return e(t.layouts[0])-e(i.layouts[0])}).forEach(function(t){t.parentUnit=this,t.on("shareableStateChanged",function(){this.emit("shareableStateChanged")}.bind(this))},this),this.widthBreakpoints=this._extractBreakpoints(),this.hacks.variantSelectionDeferTime=deviceInfo.browser.firefox()?200:0},Object.defineProperties(CreativeUnitWithVariants.prototype,{size:{get:function(){return this.getAvailableSize()},enumerable:!0,configurable:!1},minimumSize:{get:function(){return{width:this.variants[0].layouts[0].minSize.width,height:this.variants[0].layouts[0].minSize.height}},enumerable:!0,configurable:!1},layoutCurrentIndex:{get:function(){return 0},enumerable:!0,configurable:!1},currentScreen:{get:function(){return this.currentVariant?this.currentVariant.currentScreen:null},enumerable:!0,configurable:!1},currentVariant:{set:function(t){this._currentVariant!==t&&(this._currentVariant=t,this.emit("shareableStateChanged"))},get:function(){return this._currentVariant}},usesUpdatedVariantSelection:{get:function(){return this.variants.some(function(t){return t.scaleUnit})},enumerable:!0,configurable:!1}}),CreativeUnitWithVariants.prototype.getLargestComputedHeight=function(t){return this.variants.reduce(function(i,e){return Math.max(e.getComputedHeight(t),i)},0)},CreativeUnitWithVariants.prototype.updateUnitVariantPrevention=function(t){var i=this.preventUVUpdate!==t;this.preventUVUpdate=t,i&&!t&&this._updateVariant()},CreativeUnitWithVariants.prototype.setUVOverrideSize=function(t,i){this._uvOverrideSize||(this._uvOverrideSize={}),t&&(this._uvOverrideSize.width=t),i&&(this._uvOverrideSize.height=i)},CreativeUnitWithVariants.prototype.setUVOverrideWidth=function(t){this.setUVOverrideSize(t)},CreativeUnitWithVariants.prototype.createNode=function(){var t=CreativeUnitWithVariants.uber.createNode.apply(this,arguments);this.currentVariant=this.getVariantForSize(this._availableSize.width,this._availableSize.height),this.currentVariant.parentContainer=this,this.incrementLoadingCount();var i=this.currentVariant.getNode(function(){this.currentVariant.updateSizeAndPosition(),t.appendChild(i),this.decrementLoadingCount(),this.emit("variantChanged")}.bind(this));return t},CreativeUnitWithVariants.prototype.setAvailableSize=function(t,i){var e=CreativeUnitWithVariants.uber.setAvailableSize.call(this,t,i);return e&&this.loaded&&(this._updateGeometry(t,i),defer(function(){this._lockVariantIfNativeFullscreen(),this._updateVariant(),this.emit("resize")}.bind(this),this.hacks.variantSelectionDeferTime)),e},CreativeUnitWithVariants.prototype._updateGeometry=function(t,i){var e=this.getNode();e.style.width=t+"px",e.style.height=i+"px"},CreativeUnitWithVariants.prototype._lockVariantIfNativeFullscreen=function(){var t=creative.adapter&&creative.adapter.inNativeFullscreen();!this.lockedToVariant&&t?(this.lockVariantSelectionToCurrentVariant(),this._fullScreenVariantLockActive=!0):this._fullScreenVariantLockActive&&!t&&(this.unlockVariantSelection(),this._fullScreenVariantLockActive=!1)},CreativeUnitWithVariants.prototype._updateVariant=function(){var t,i=this.node;t=this.currentVariant&&this.preventUVUpdate?this.currentVariant:this.getVariantForSize(this.size.width,this.size.height),t.parentContainer=this;var e=this.currentVariant;if(t===this.currentVariant)return void t.updateSizeAndPosition();this.currentVariant=t;var n=t.getNode(function(){n.parentNode||i.appendChild(n),t===this.currentVariant&&(t.updateSizeAndPosition(),t.node.style.display="block",this._isRendering&&t.enterRenderTree(),this.isAppearing&&t.appear()),this.emit("variantChanged")}.bind(this));e&&t!==e&&(this.isAppearing&&e.disappear(),e.node.style.display="none",e.exitRenderTree())},CreativeUnitWithVariants.prototype.goToVariant=function(t,i){return i=i||noop,"number"!=typeof t||this.currentVariant.localId===t?defer(function(){i(this.currentVariant)}.bind(this)):(this.lockVariantSelectionToLocalId(t),void(this.lockedToVariant?(this.lockedToVariant.once("appeared",function(){i(this.currentVariant),this.lockedToVariant=null}.bind(this)),this._updateVariant()):defer(function(){i(this.currentVariant)}.bind(this))))},CreativeUnitWithVariants.prototype.getMatchingBreakpoint=function(t){for(var i=this.widthBreakpoints[0],e=1;e-1||this.variants[i].master===t)return this.variants[i];return null},CreativeUnitWithVariants.prototype._appear=function(){this.loaded||Creative._throw("Cannot show the unit before it has finished loading."),this.isAppearing&&Creative._throw("The unit is already appearing."),this.node.parentNode||Creative._throw("Creative unit must be added to DOM before show() is called. Animations will start on show()."),Logger("unit").log("Showing "+this),(this.currentVariant.minSize.width>this._availableSize.width||this.currentVariant.minSize.height>this._availableSize.height)&&creative.adapter&&creative.adapter.trackingCenter.track({name:"userError",userErrorId:"unitVariantsDoNotFitPlacement"}),this.currentVariant.isAppearing||this.currentVariant.appear(),this.inView&&(this.inView.start(),this.currentVariant&&this.currentVariant.inView&&this.currentVariant.inView.start())},CreativeUnitWithVariants.prototype._disappear=function(){this.isAppearing||Creative._throw("The unit is not appearing, can not disappear."),Logger("unit").log("Hiding "+this),this.inView&&this.inView.stop()},CreativeUnitWithVariants.prototype.enterRenderTree=function(){this._isRendering||(this._isRendering=!0,this.currentVariant.updateSizeAndPosition(),this.currentVariant.enterRenderTree())},CreativeUnitWithVariants.prototype.exitRenderTree=function(){this._isRendering&&(this._isRendering=!1,this.currentVariant&&this.currentVariant.exitRenderTree())},CreativeUnitWithVariants.prototype.goToScreenAction=function(t,i,e){return i.screen?(extend(i,i.animation),void i.screen.parentContainer.goToScreen(i.screen,i,e)):(console.warn("Go to screen action is called without a destination page!"),e&&e())},CreativeUnitWithVariants.prototype.findAll=function(t){var i=[];return this.currentVariant.findAll(t).forEach(function(t){i.push(t)}),i},CreativeUnitWithVariants.prototype.findByType=function(t){var i=[];return this.currentVariant.findByType(t).forEach(function(t){i.push(t)}),i};;
function CreativeUnitVariant(){}inherit(CreativeUnitVariant,View),extend(CreativeUnitVariant.prototype,TriggerHost),extend(CreativeUnitVariant.prototype,ScreenTransitioner),extend(CreativeUnitVariant.prototype,FeedImageOptimizationTrait),CreativeUnitVariant.toString=function(){return"[Clazz CreativeUnitVariant]"},CreativeUnitVariant.prototype.toString=function(){return"[CreativeUnitVariant "+this.minSize.width+"×"+this.minSize.height+" ("+this.localId+")]"},Object.defineProperty(CreativeUnitVariant.prototype,"isTrackable",{get:function(){return!0}}),CreativeUnitVariant.prototype._getDestinationScreen=function(){var e=this.screens[0];if("modal"==this.parentUnit.name&&"undefined"!=typeof creative.runtimeParams.goToPageAfterExpand){var t=creative.runtimeParams.goToPageAfterExpand;if("string"!=typeof t)throw new TypeError("Only string type is allowed to reference destination screen!");var i=this.screens.filter(function(e){return e.title===t});i.length>0&&(e=i[0])}return e},CreativeUnitVariant.prototype.awake=function(){CreativeUnitVariant.uber.awake.apply(this,arguments),this._isRendering=!1,this._isMasterShown=!1,this._currentScreen=null,this.visibleScreen=null,this.triggers=this.triggers||[],this._preloadReachableScreens=this._preloadReachableScreens.bind(this),this.screens.forEach(function(e){e.objects.forEach(function(e){e.zIndex+=ScreenObject._zIndexOffset})})},CreativeUnitVariant.prototype.createNode=function(){var e=CreativeUnitVariant.uber.createNode.apply(this,arguments);if(this.incrementLoadingCount(),this.parentContainer.inView&&(this.inView=new InViewObject(this,this.parentContainer.inView)),this.screenHolder=document.createElement("div"),this.screenHolder.className="celtra-screen-holder",e.appendChild(this.screenHolder),this.borderColor&&this.borderSize>0){var t=document.createElement("div");t.className="celtra-creative-border",t.style.borderColor=this.borderColor,t.style.borderWidth=this.borderSize+"px",e.appendChild(t)}var i=2,n=function(){--i||this.decrementLoadingCount()}.bind(this);return this.screenHolder.appendChild(this.master.getNode(n)),this.screenHolder.appendChild(this._getDestinationScreen().getNode(n)),e.style.background=this.backgroundColor,this.screens.forEach(function(e){e.on("enteredRenderTree",function(){this.parentContainer.node.style.background=this.currentScreen.showOverflow?this.backgroundColor:""}.bind(this))}.bind(this)),e},Object.defineProperties(CreativeUnitVariant.prototype,{size:{get:function(){if("responsive"==this.sizing){if(this.currentLayout.unitAlignment&&"belowPageHeader"==this.currentLayout.unitAlignment.vertical){var e=creative.adapter.skinGetters&&creative.adapter.skinGetters.getUnscrolledPageHeaderBottomLine()||0;return{width:Math.max(this.parentUnit.size.width,this.minSize.width),height:Math.max(this.parentUnit.size.height,this.minSize.height)-e}}return{width:Math.max(this.parentUnit.size.width,this.minSize.width),height:Math.max(this.parentUnit.size.height,this.minSize.height)}}return{width:this.minSize.width,height:this.minSize.height}},enumerable:!0,configurable:!1},minSize:{get:function(){return{width:this.currentLayout.minSize.width,height:this.currentLayout.minSize.height}},enumerable:!0,configurable:!1},baseSize:{get:function(){return{width:this.minSize.width,height:this.revealCollapsedHeight?this.revealCollapsedHeight:this.minSize.height}},enumerable:!0,configurable:!1},currentLayout:{get:function(){return this.layouts[0]},enumerable:!0,configurable:!1},currentScreen:{set:function(e){this._currentScreen!==e&&(this._currentScreen=e,this.emit("shareableStateChanged"))},get:function(){return this._currentScreen}}}),CreativeUnitVariant.prototype.getComputedHeight=function(e){return this.scaleUnit?Math.max(this.baseSize.height,Math.ceil(e*(this.baseSize.height/this.baseSize.width))):this.baseSize.height},CreativeUnitVariant.prototype.enterRenderTree=function(){this._isRendering||(this._isRendering=!0,this.updateSizeAndPosition(),this.master.enterRenderTree(),this.visibleScreen&&this.visibleScreen.enterRenderTree(),this.emit("enteredRenderTree"))},CreativeUnitVariant.prototype.exitRenderTree=function(){this._isRendering&&(this._isRendering=!1,this.master&&(this.master.loaded?this.master.exitRenderTree():this.master.once("loaded",this.master.exitRenderTree.bind(this.master))),this.visibleScreen&&(this.visibleScreen.loaded?this.visibleScreen.exitRenderTree():this.visibleScreen.once("loaded",this.visibleScreen.exitRenderTree.bind(this.visibleScreen))),this.emit("exitedRenderTree"))},CreativeUnitVariant.prototype._trackViewShown=function(){new ActionContext(this,!1).track({name:"viewShown",viewName:this.currentLayout.designTimeSize.width+" x "+this.currentLayout.designTimeSize.height,clazz:this.constructor.name,designSize:this.currentLayout.designTimeSize,availableSize:this.parentUnit.getAvailableSize()})},CreativeUnitVariant.prototype._appear=function(){var e=this.currentScreen;this.currentScreen||(e=this._getDestinationScreen());var t=function(){this.inView&&(this.inView.start(),e&&e.inView&&e.inView.start())}.bind(this);"LeanLoading"===e.title?creative.adapter.waitForWindowLoad(function(){this.goToScreen(e),t()}.bind(this)):(this.goToScreen(e),t())},CreativeUnitVariant.prototype._disappear=function(){this.master.disappear(),this.currentScreen.disappear(),this.inView&&this.inView.stop()},CreativeUnitVariant.prototype.inViewTriggerSetup=function(){var e=!1;this.triggers.forEach(function(t){("enterView"===t.type||"leaveView"===t.type)&&(e=!0,this.inViewAreaRatio=0)},this),e&&this.inView.on("areaInViewRatioChanged",this.triggerInView.bind(this))},CreativeUnitVariant.prototype.updateSizeAndPosition=function(){var e=this.getNode(),t=creative.adapter.adBehavior.isBackgroundSkin||"pageContentCenter"==this.currentLayout.unitAlignment.horizontal,i=creative.adapter.adBehavior.isBackgroundSkin||"belowPageHeader"==this.currentLayout.unitAlignment.vertical;if(e.style.width=this.size.width+"px",e.style.height=this.size.height+"px","center"==this.currentLayout.unitAlignment.horizontal||t){var n=creative.adapter.skinGetters&&creative.adapter.skinGetters.getPageContentElement();if(e.style.right="auto",t&&n){var r=n.getBoundingClientRect(),a=r.left+r.width/2;e.style.left=a-this.size.width/2+"px"}else e.style.left="50%",e.style.marginLeft=-this.size.width/2+"px"}else e.style.marginLeft=0,"left"==this.currentLayout.unitAlignment.horizontal?(e.style.left=0,e.style.right="auto"):(e.style.right=0,e.style.left="auto");if(i){var s=!creative.adapter.adBehavior.stickToPageHeader&&creative.adapter.skinGetters&&creative.adapter.skinGetters.getUnscrolledPageHeaderBottomLine()||0;e.style.top=s+"px",e.style.bottom="auto"}else"center"==this.currentLayout.unitAlignment.vertical?(e.style.top="50%",e.style.bottom="auto",e.style.marginTop=-this.size.height/2+"px"):(e.style.marginTop=0,"top"==this.currentLayout.unitAlignment.vertical?(e.style.top=0,e.style.bottom="auto"):(e.style.bottom=0,e.style.top="auto"));this.emit("resize")},CreativeUnitVariant.prototype.findAll=function(e){var t=[];return this.screens.forEach(function(i){("undefined"==typeof e||i.title==e)&&t.push(i),i.findAll(e).forEach(function(e){t.push(e)})}),t},CreativeUnitVariant.prototype.find=function(e){var t=this.findAll(e);return t.length>0?t[0]:null},CreativeUnitVariant.prototype.findByType=function(e){var t=[];return"undefined"==typeof e?result:(this.screens.forEach(function(i){i.findByType(e).forEach(function(e){t.push(e)})}),t)};;
function ScreenObjectContainer(){}inherit(ScreenObjectContainer,View),ScreenObjectContainer.toString=function(){return"[Clazz ScreenObjectContainer]"},ScreenObjectContainer.prototype.toString=function(){return"[ScreenObjectContainer "+this.localId+"]"},ScreenObjectContainer.prototype.appear=function(){ScreenObjectContainer.uber.appear.call(this),ScreenObjectContainer.uber.appearNestedObjects.call(this)},ScreenObjectContainer.prototype.disappear=function(){ScreenObjectContainer.uber.disappearNestedObjects.call(this),ScreenObjectContainer.uber.disappear.call(this)};;
function Screen(){}inherit(Screen,ScreenObjectContainer),extend(Screen.prototype,TriggerHost),extend(Screen.prototype,SceneHost),extend(Screen.prototype,DiscoverableTrait),Screen.toString=function(){return"[Clazz Screen]"},Screen.prototype.toString=function(){return"[Screen "+this.localId+" (name="+this.title+")]"},Object.defineProperty(Screen.prototype,"name",{get:function(){return this.title}}),Object.defineProperty(Screen.prototype,"size",{get:function(){return this.parentContainer.size}}),Screen.prototype.awake=function(){ScreenObjectContainer.uber.awake.apply(this,arguments),this._isRendering=!1,this.appearedAtLeastOnce=!1,this._updateSize=this._updateSize.bind(this),this.handleShake=this.handleShake.bind(this),this.handleShakeFallback=this.handleShakeFallback.bind(this)},Screen.prototype.isFirstScreen=function(){return this===this.parentContainer.screens[0]},Screen.prototype.isLoadingScreen=function(){return this===this.parentContainer.loadingScreen},Screen.prototype.isMasterScreen=function(){return this===this.parentContainer.master},Screen.prototype.isNormalScreen=function(){return!this.isMasterScreen()&&!this.isLoadingScreen()},Object.defineProperty(Screen.prototype,"parentUnitVariant",{get:function(){return"CreativeUnitWithVariants"==this.parentUnit.constructor.name?(this._parentContainer||(this._parentContainer=this.parentUnit.getVariantForScreen(this)),this._parentContainer):null}}),Object.defineProperty(Screen.prototype,"parentContainer",{get:function(){return this.parentUnitVariant||this.parentUnit}}),Screen.prototype.createNode=function(){Logger("unit").log("Starting to load "+this),!this.isLoadingScreen()&&creative.experiments.get("TrackingLoadingTimes")&&this.once("loaded",creative.aggregatorTracking.trackAggregatorMagicTriplet("screenLoad",{unitName:this.parentUnit.name,screenRank:this.isFirstScreen()?"First":this.isMasterScreen()?"Master":"Other"},3e4)),this.nestedSceneHosts=[];var e=Screen.uber.createNode.call(this);return e.style.overflow=this.showOverflow?"visible":"hidden",this.objects.forEach(function(t){this.incrementLoadingCount(),e.appendChild(t.getNode(this.decrementLoadingCount))},this),this.parentContainer.on("resize",this._updateSize),e.style.width=e.style.height="100%",this.parentContainer.inView&&(this.inView=new InViewObject(this,this.parentContainer.inView),this.inViewTriggerSetup()),this._updateSize(),e},Screen.prototype.initImmediatelyPlayedScenes=function(){this._initImmediatelyPlayedScenes(),this.nestedSceneHosts.forEach(function(e){e._initImmediatelyPlayedScenes()})},Screen.prototype._appear=function(){var e=!this.appearedAtLeastOnce;this.appearedAtLeastOnce=!0;var t=new ActionContext(this,{certainlyNotCausedByUserBehavior:!!this.parentUnit.firstAppearWithoutUserInteraction&&e&&(this.isFirstScreen()||this.isMasterScreen())});this!==this.parentContainer.loadingScreen&&this!==this.parentContainer.master&&(t.track({name:"screenShown"}),creative.trackCreativeRenderedOnScreenShow()),e?this.fireTriggers("firstAppear",null,function(){defer(function(){this.fireTriggers("appear",null,noop,t)}.bind(this),void 0,void 0,useAsap())}.bind(this),t):this.fireTriggers("appear",null,noop,t),this.inView&&this.inView.start(),this._shakeListenerStart()},Screen.prototype._shakeListenerStart=function(){this.hasTriggers("shake")&&(this.shakeListener||(this.shakeListener=new ShakeListener),this.shakeListener.on("shake",this.handleShake),this.shakeListener.on("shakeFallback",this.handleShakeFallback),this.shakeListener.start())},Screen.prototype._shakeListenerStop=function(){this.shakeListener&&(this.shakeListener.off("shake",this.handleShake),this.shakeListener.off("shakeFallback",this.handleShakeFallback),this.shakeListener.stop())},Screen.prototype._disappear=function(){this.inView&&this.inView.stop(),this._shakeListenerStop()},Screen.prototype.handleShakeFallback=function(){if(this.parentUnit.currentScreen===this){var e=new ActionContext(this,!1);this.fireTriggers("shake",function(t,i){var n=2,r=1e3*("undefined"!=typeof t.fallbackEmitDelay?t.fallbackEmitDelay:n);return"undefined"==typeof t.fallbackCustomActionSet||"event-actions"===t.fallbackCustomActionSet?setTimeout(function(){this.triggerActionByLocalId(e,{localId:i.localId},noop)}.bind(this),r):setTimeout(function(){this.triggerActionByLocalId(e,{localId:t.fallbackCustomActionSet},noop)}.bind(this),r),!1}.bind(this),null,e)}},Screen.prototype.handleShake=function(e){if(this.parentUnit.currentScreen===this){var t=new ActionContext(this,!1);this.fireTriggers("shake",function(t,i){var n=t.direction&&t.direction.indexOf(e)>-1,r=!1,a=!1,s=500;return n?(clearTimeout(i.shakeTimeout),i.shakeStartTime||(i.shakeStartTime=new Date),r=t.duration&&(new Date).getTime()-i.shakeStartTime.getTime()>=t.duration,i.shakeTimeout=setTimeout(function(){delete i.shakeStartTime,i.triggered=!1},s),r&&!i.triggered&&(a=!0,i.triggered=!0),a):!1}.bind(this),null,t)}},Screen.prototype.enterRenderTree=function(){this._isRendering||(this._isRendering=!0,this.emit("enteredRenderTree"))},Screen.prototype.exitRenderTree=function(){this._isRendering&&(this._isRendering=!1,this.emit("exitedRenderTree"))},Screen.prototype._updateSize=function(){this.emit("resize")},Screen.prototype.finishedLoading=function(){Screen.uber.finishedLoading.call(this),Logger("unit").log("Finished loading "+this)},Screen.prototype.triggerBeforeAppear=function(e){var t=new ActionContext(this,{certainlyNotCausedByUserBehavior:!!this.parentUnit.firstAppearWithoutUserInteraction&&!this.appearedAtLeastOnce&&(this.isFirstScreen()||this.isMasterScreen())});this.fireTriggers("beforeAppear",null,e,t)},Screen.prototype.triggerOrientationChange=function(e){this.fireTriggers("orientationChange",null,e)},Screen.prototype.getMaxZIndex=function(){var e=0;return this.objects.forEach(function(t){t.zIndex>e&&(e=t.zIndex)}),e},Screen.prototype.inViewTriggerSetup=function(){var e=!1;this.triggers.forEach(function(t){("enterView"===t.type||"leaveView"===t.type)&&(e=!0,this.inViewAreaRatio=0)},this),e&&this.inView.on("areaInViewRatioChanged",this.triggerInView.bind(this))},Screen.prototype.triggerInView=function(e){var t=new ActionContext(this),i="enterView",n=this.inViewAreaRatio,r=e,a=function(e,t){return e.parameters.area-t.parameters.area};e=n&&r>=t},null,t,a),this._getTriggers(i,function(e){var t=e.area/100;return t>=n&&r>=t}),this.inViewAreaRatio=e},Screen.prototype.getActionsExecutedOnAppear=function(){var e=!this.appearedAtLeastOnce,t=new ActionContext(this,{certainlyNotCausedByUserBehavior:!!this.parentUnit.firstAppearWithoutUserInteraction&&e&&(this.isFirstScreen()||this.isMasterScreen())}),i=this.fireTriggersDryRun("beforeAppear",null,noop,t);return e&&(i=i.concat(this.fireTriggersDryRun("firstAppear",null,noop,t))),i.concat(this.fireTriggersDryRun("appear",null,noop,t))},Screen.prototype.resetAction=function(e,t,i){var n=this.findAll(),r=n.length,a=function(){this._shakeListenerStop(),this._shakeListenerStart(),i()}.bind(this);r?n.forEach(function(i){i.resetAction(e,t,function(){--r||a()})}):a()},Screen.prototype.shuffleAction=function(e,t,i){function n(e){for(var t,i,n=e.length;0!==n;)i=Math.floor(Math.random()*n),n-=1,t=e[n],e[n]=e[i],e[i]=t;return e}var r=n(t.objects.map(function(e){return JSON.parse(JSON.stringify(e.layoutSpecificValues))}));t.objects.forEach(function(e,t){e.layoutSpecificValues.forEach(function(e,i){e.position=r[t][i].position}),e._refreshDisplayState()}),i&&i()},Screen.prototype._trackViewShown=function(){Screen.uber._trackViewShown.call(this,{isMasterScreen:this.isMasterScreen(),isLoadingScreen:this.isLoadingScreen()})};;
function ScreenObject(){}inherit(ScreenObject,View),extend(ScreenObject.prototype,TriggerHost),extend(ScreenObject.prototype,DiscoverableTrait),extend(ScreenObject.prototype,ClickPreventer),ScreenObject.requiresRedrawToTriggerAnimationEvents=android("4.0"),ScreenObject.redrawTriggerInterval=60,ScreenObject.toString=function(){return"[Clazz ScreenObject]"},ScreenObject.prototype.toString=function(){return"[ScreenObject "+this.localId+" (name="+this.name+")]"},ScreenObject.allowPositioningAndSizingUsingTransforms=!android("2.2","2.3")||celtra.iframe(),ScreenObject._zIndexOffset=1e4,ScreenObject._resettableProperties=["position","size","rotation","zIndex","opacity","hidden"],ScreenObject._3dTransformBlacklisted=function(t){return/Silk\/\d|Kindle Fire| KFTT | KFOT | KFJWI | KFJWA |\bGT-P3100\b| HTC[ _]One[ _]S /.test(t)||/\bGT-I9300\b/.test(t)&&android("4.0")}(navigator.userAgent),ScreenObject.supports3d=function(){var t="WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MSCSSMatrix"in window||/Gecko\//.test(navigator.userAgent);return t&&!this._3dTransformBlacklisted}(),ScreenObject.requires3dTranslateForPositioning=/GT-I9500|GT-I9505|SM-N900|GT-P5210|SM-T520/.test(navigator.userAgent),ScreenObject.dummyImageSpacer=windows("10"),ScreenObject._toPositionPx=function(t,e,i){var n,r,o,s,a=i.width,c=i.height,h=e.width,u=e.height;return["left","right","hcenter"].forEach(function(e){e in t&&(n=e)}),["bottom","top","vcenter"].forEach(function(e){e in t&&(r=e)}),o=t[n],s=t[r],o=o.indexOf("%")>-1?a*parseFloat(o)/100:parseFloat(o),"hcenter"===n?o=(a-h)/2+o:"right"===n&&(o=a-(o+h)),s=s.indexOf("%")>-1?c*parseFloat(s)/100:parseFloat(s),"vcenter"===r?s=(c-u)/2+s:"bottom"===r&&(s=c-(s+u)),{x:ScreenObject._roundIfNeeded(o),y:ScreenObject._roundIfNeeded(s)}},ScreenObject._toSizePx=function(t,e){var i=parseFloat(t.width),n=parseFloat(t.height),r=e.width,o=e.height;return t.width.toString().indexOf("%")>-1&&(i=r*i/100),t.height.toString().indexOf("%")>-1&&(n=o*n/100),{width:ScreenObject._roundIfNeeded(i),height:ScreenObject._roundIfNeeded(n)}},ScreenObject._roundIfNeeded=function(t){return Math.round(t)},Object.defineProperty(ScreenObject.prototype,"layoutCurrent",{get:function(){return null==this.layoutCurrentIndex?this.layoutSpecificValues[0]:this.layoutSpecificValues[this.layoutCurrentIndex]},enumerable:!0,configurable:!1}),Object.defineProperty(ScreenObject.prototype,"layoutCurrentIndex",{get:function(){return this.parentUnit.layoutCurrentIndex},enumerable:!0,configurable:!1}),ScreenObject._Position=function(t,e){this._instance=t,this._position=e},Object.defineProperties(ScreenObject._Position.prototype,{x:{get:function(){return this._position.x},set:function(t){delete this._instance.layoutCurrent.right,delete this._instance.layoutCurrent.hcenter,this._instance.layoutCurrent.position.left=t+("number"==typeof t?"px":"")}},y:{get:function(){return this._position.y},set:function(t){delete this._instance.layoutCurrent.bottom,delete this._instance.layoutCurrent.vcenter,this._instance.layoutCurrent.position.top=t+("number"==typeof t?"px":"")}}}),ScreenObject._Size=function(t,e){this._instance=t,this._size=e},Object.defineProperties(ScreenObject._Size.prototype,{width:{get:function(){return this._size.width},set:function(t){this._instance.layoutCurrent.size.width=t+("number"==typeof t?"px":"")}},height:{get:function(){return this._size.height},set:function(t){this._instance.layoutCurrent.size.height=t+("number"==typeof t?"px":"")}}}),Object.defineProperties(ScreenObject.prototype,{position:{get:function(){var t=ScreenObject._toPositionPx(this.layoutCurrent.position,this.size,this.parentContainer.size);return new ScreenObject._Position(this,t)},set:function(t){delete this.layoutCurrent.position.right,delete this.layoutCurrent.position.hcenter,delete this.layoutCurrent.position.bottom,delete this.layoutCurrent.position.vcenter,this.layoutCurrent.position.left=t.left,this.layoutCurrent.position.top=t.top}},originalSize:{get:function(){var t=this.layoutCurrentIndex||0;return ScreenObject._toSizePx(JSON.parse(this.originalLayoutSpecificValues)[t].size,this.parentContainer.size)},set:function(){throw new Error("originalSize is not settable!")}},size:{get:function(){var t=ScreenObject._toSizePx(this.layoutCurrent.size,this.parentContainer.size);return new ScreenObject._Size(this,t)},set:function(t){this.layoutCurrent.size.width=t.width,this.layoutCurrent.size.height=t.height}},opacity:{get:function(){return this.layoutCurrent.opacity},set:function(t){this.layoutCurrent.opacity=t}},rotation:{get:function(){return this.layoutCurrent.rotation},set:function(t){this.layoutCurrent.rotation=t}},hidden:{get:function(){return this.layoutCurrent.hidden},set:function(t){this.layoutSpecificValues.forEach(function(e){e.hidden=t})}}}),ScreenObject.getCSSTranslate=function(t,e){return ScreenObject.requires3dTranslateForPositioning?"translate3d("+t+"px,"+e+"px, 0)":"translate("+t+"px,"+e+"px)"},ScreenObject.prototype.awake=function(){ScreenObject.uber.awake.call(this),this.originalLayoutSpecificValues=JSON.stringify(this.layoutSpecificValues),this.originalZIndex=this.zIndex,this.finishAnimation=this.finishAnimation.bind(this),this._refreshDisplayState=this._refreshDisplayState.bind(this)},ScreenObject.prototype.enterRenderTree=function(){this._isRendering||(this._isRendering=!0,this.emit("enteredRenderTree"))},ScreenObject.prototype.exitRenderTree=function(){this._isRendering&&(this._isRendering=!1,this._isInMouseOver&&trigger(this.node,"mouseout",!1),this.emit("exitedRenderTree"))},ScreenObject.prototype.react=function(t){var e=this.parentUnit.getRxStateObject(),i=function(){this._isRendering&&t.call(this,e)}.bind(this);null!==e&&(this._rxListeners.push(i),Ticker.frame(i,"render"))},ScreenObject.prototype.appearNestedObjects=function(){this.getNestedContainers().forEach(function(t){t.appear(),t.appearNestedObjects(t.objects)},this)},ScreenObject.prototype.disappearNestedObjects=function(){this.getNestedContainers().forEach(function(t){t.disappearNestedObjects(t.objects),t.disappear()},this)},ScreenObject.prototype.getScreenObjectPositionRelativeToScreen=function(){for(var t=this,e={x:this.position.x,y:this.position.y};t.parentContainer!==t.parentScreen&&(t=t.parentContainer&&t.parentContainer.parentObject);)e.x+=t.position.x,e.y+=t.position.y;return e},ScreenObject.prototype.initTemplates=function(){var t=this.templates={},e=this.constructor.templates;if(e){for(var i in e)"string"==typeof e[i]&&(e[i]=tmpl(e[i]));extend(t,e)}},ScreenObject.prototype.tmpl=function(t,e,i){this.templates||this.initTemplates();var n=this.templates[t];return n?n.call(i||this,e):"Missing template: "+t},ScreenObject.prototype.template=function(t,e,i){var n,r=document.createElement("div");r.innerHTML=this.tmpl(t,e);var o=r.firstChild;if(i)for(;n=r.firstChild;)i.appendChild(n);return o},ScreenObject.prototype.ifNotClosing=function(t,e,i){var n=this.fireTriggersDryRun(t,null,noop,e)._actions,r=["dismiss","collapse"],o=!n.some(function(t){return r.indexOf(t.method)>-1});o&&i()},ScreenObject.prototype.createNode=function(){this._isInMouseOver=!1;var t=this,e=ScreenObject.uber.createNode.call(t);if(e.style.position="absolute",this.hasTriggers("tap")&&(addClass(e,"touchable"),attach(e,"tap",function(){var e=new ActionContext(t,!0);t.ifNotClosing("tap",e,e.trackUserInteraction),t.fireTriggers("tap",null,null,e)},!1)),deviceInfo.deviceType.desktop()){var i="mouseOver",n=[];if(this.hasTriggers(i)){var r=this._getTriggers(i,null),o=[],s=noop;r.forEach(function(t){t.parameters&&t.parameters.delay&&o.indexOf(t.parameters.delay)<0&&o.push(t.parameters.delay)}),attach(e,"mouseover",function(){var e=new ActionContext(t,!0),r=function(n){return function(){t.fireTriggers(i,function(t){return t.delay==n},null,e)}};t._isInMouseOver=!0,o.forEach(function(t,e){s=r(t),n[e]=setTimeout(s,t)})},!1)}attach(e,"mouseout",function(){var e=new ActionContext(t,!0);t._isInMouseOver=!1,n.forEach(clearTimeout),n=[],t.hasTriggers("mouseOut")&&t.fireTriggers("mouseOut",null,null,e)},!1)}return attach(e,"touchstart",function(){if(t.hasTriggers("touchstart")){var e=new ActionContext(t,!0);t.ifNotClosing("touchstart",e,e.trackUserInteraction),t.fireTriggers("touchstart",null,null,e)}},!1),attach(e,"touchend",function(){if(t.hasTriggers("touchend")){var e=new ActionContext(t,!0);t.ifNotClosing("touchend",e,e.trackUserInteraction),t.fireTriggers("touchend",null,null,e)}},!1),this.hasTriggers("swipe")&&(attach(e,"touchstart",function(t){t.stopPropagation()}),new SwipeListener({target:e,swipeNodeGetter:function(){return this.parentUnit.node}.bind(this),swipe:function(e,i){var n=new ActionContext(t,!0);t.fireTriggers("swipe",function(r){var o=e==r.direction&&i>=r.length;return o&&t.ifNotClosing("swipe",n,n.trackUserInteraction),o},null,n)}})),attach(e,"transitionend",function(t){t.stopPropagation()},!1),this.parentContainer.on("resize",this._refreshDisplayState),this.parentContainer.on("enteredRenderTree",function(){this.hidden||this.enterRenderTree()}.bind(this)),this.parentContainer.on("exitedRenderTree",function(){this.hidden||this.exitRenderTree()}.bind(this)),this.layoutPrevious=this.layoutCurrent,this.parentUnit.on("layoutChanged",this.handleLayoutChanged.bind(this)),this.initClickPrevention(function(){return this.node}.bind(this)),this._applyStyles(e,this._calculateNewStyleAttributes()),this.positionUsingTransforms()||deviceInfo.browser.safari("9.0.0",null)||(e.style.outline="1px solid transparent"),this._rxListeners=[],e},ScreenObject.prototype.positionUsingTransforms=retFalse,ScreenObject.prototype.sizeUsingTransforms=retFalse,ScreenObject.prototype.isValid=retTrue,ScreenObject.prototype.getNaturalSize=function(){return this.originalSize},ScreenObject.prototype._calculateNewStyleAttributes=function(){var t={transform:"",transformOrigin:"50% 50%"},e=this.getNaturalSize(),i=this.position.x,n=this.position.y;if(this.sizeUsingTransforms()&&(i+=ScreenObject._roundIfNeeded((this.size.width-e.width)/2),n+=ScreenObject._roundIfNeeded((this.size.height-e.height)/2)),this.positionUsingTransforms()?(t.left="0",t.top="0",(i||n)&&(t.transform+=ScreenObject.getCSSTranslate(i,n))):(t.left=i+"px",t.top=n+"px"),(this.isAnimated||0!=this.rotation)&&(t.transform+=" rotate("+this.rotation+"deg) "),this.sizeUsingTransforms()){t.width=e.width+"px",t.height=e.height+"px";var r=this.size.width/e.width,o=this.size.height/e.height;t.transform+=" scale("+r+", "+o+")"}else t.width=this.size.width+"px",t.height=this.size.height+"px";return t.zIndex=this.zIndex,t.opacity=this.opacity,t.display=this.hidden?"none":"block",t},ScreenObject.prototype._applyStyles=function(t,e){e&&Object.keys(e).forEach(function(i){celtra.styler.css(t,i,e[i])})},ScreenObject.prototype._refreshDisplayState=function(){if(this.node){var t=this._calculateNewStyleAttributes(),e=!1;for(var i in t){var n=String(t[i]).replace(/^\s*|\s*$/g,""),r=celtra.styler.css(this.node,i),o=null;celtra.styler.css(this.node,i)!==n&&(o=n,r!=o&&"zIndex"!=i&&"display"!=i&&(e=!0))}return this._applyStyles(this.node,t),this.redrawLayout(),e}},ScreenObject.prototype.finishAnimation=function(){this.node&&void 0!==celtra.styler.css(this.node,"transitionDuration")&&(celtra.styler.css(this.node,"transitionDuration","1ms"),this.node.offsetWidth,celtra.styler.css(this.node,"transitionDuration",""))},ScreenObject.prototype.handleLayoutChanged=function(){var t=function(){this.layoutPrevious.hidden&&!this.layoutCurrent.hidden?this.enterRenderTreeAndAppear(!0):!this.layoutPrevious.hidden&&this.layoutCurrent.hidden&&this.parentContainer._isRendering&&this.exitRenderTree(),this.layoutPrevious=this.layoutCurrent}.bind(this);ios()?defer(t):t(),this.finishAnimation(),this._refreshDisplayState()},ScreenObject.prototype.redrawLayout=function(){},ScreenObject.prototype.redrawSceneLayout=function(){this.redrawLayout()},ScreenObject.prototype._checkAndEnhanceParamsForFileLoading=function(t,e,i){var n=ScreenObject.uber._checkAndEnhanceParamsForFileLoading.call(this,t,e,i);return n.settings.creativeUnitVariantId=this.parentScreen.parentContainer.localId,n},ScreenObject.prototype._preloadImage=function(t,e,i){var n=this._checkAndEnhanceParamsForFileLoading(t,e,i);ScreenObject.uber._preloadImage.call(this,t,n.settings,n.callback)},ScreenObject.prototype._loadImage=function(t,e,i){var n=this._checkAndEnhanceParamsForFileLoading(t,e,i);ScreenObject.uber._loadImage.call(this,t,n.settings,n.callback)},ScreenObject.prototype.setPosition=function(t,e){this.position={left:t+"px",top:e+"px"},this._refreshDisplayState()},ScreenObject.prototype.getPosition=function(){return{x:this.position.x,y:this.position.y}},ScreenObject.prototype.setSize=function(t,e){this.size.width=t,this.size.height=e,this._refreshDisplayState()},ScreenObject.prototype.getSize=function(){return{width:this.size.width,height:this.size.height}},ScreenObject.prototype.setOpacity=function(t){this.opacity=t,this._refreshDisplayState()},ScreenObject.prototype.getOpacity=function(){return this.opacity},ScreenObject.prototype.animateAction=function(t,e,i){function n(t){return!isNaN(parseFloat(t))&&isFinite(t)}function r(t){var e={position:{},size:{width:null,height:null},zIndex:null,opacity:null,rotation:null};return deep(e,t),e}function o(t,e){var i=e.size,n=t.size;null==i.width&&(i.width=n.width),null==i.height&&(i.height=n.height),t.size=i;var r=t.position,o=e.position,s=null,a=null,c=null,h=null;["left","right","hcenter"].forEach(function(t){t in r&&(s=t),t in o&&(c=t)}),["bottom","top","vcenter"].forEach(function(t){t in r&&(a=t),t in o&&(h=t)}),c&&null!==o[c]&&(delete r[s],r[c]=o[c]),h&&null!==o[h]&&(delete r[a],r[h]=o[h]),null!=e.rotation&&(t.rotation=e.rotation),null!=e.opacity&&(t.opacity=e.opacity),null!=e.zIndex&&(t.zIndex=e.zIndex)}i=i||noop,this.isAnimated=!0;var s="undefined"!=typeof e.duration?e.duration:1e3,a=e.timingFunction||"linear";if(e.layoutSpecificValues)e.layoutSpecificValues.forEach(function(t,e){this.layoutSpecificValues[e]&&o(this.layoutSpecificValues[e],r(t))}.bind(this));else{var c=r(e.properties);null!=c.position.x&&(c.position.left=c.position.x+"px"),null!=c.position.y&&(c.position.top=c.position.y+"px"),null!=c.zIndex&&(c.zIndex=c.zIndex+ScreenObject._zIndexOffset,this.zIndex=c.zIndex),null!=c.size.width&&n(c.size.width)&&(c.size.width+="px"),null!=c.size.height&&n(c.size.height)&&(c.size.height+="px"),o(this.layoutCurrent,c)}var h=this.node;celtra.styler.css(h,"transition",""),celtra.styler.css(h,"transitionProperty","all"),celtra.styler.css(h,"transitionDuration",s+"ms"),celtra.styler.css(h,"transitionTimingFunction",a);var u=this._refreshDisplayState();if(s>0&&u){var l=!1,p=function(){l||(l=!0,i())};ScreenObject.requiresRedrawToTriggerAnimationEvents&&!function(){var t=Date.now(),e=t+(Number(s)||0),i=function(){flash(),Date.now()0?s:0;setTimeout(i,d)}},ScreenObject.prototype.enterRenderTreeAndAppear=function(t){t&&this.parentScreen._isRendering&&this.enterRenderTree(),t&&!this.isAppearing&&this._shouldAppear&&this.appear()},ScreenObject.prototype.scaleAction=function(t,e,i){var n=e.useOriginalSize?this.originalSize:this.size,r=e.scale/100,o={width:n.width*r,height:n.height*r},s={x:this.position.x+this.size.width/2-o.width/2,y:this.position.y+this.size.height/2-o.height/2};this.animateAction(t,{properties:{position:s,size:o},duration:e.duration,timingFunction:e.timingFunction},i)},ScreenObject.prototype.showAction=function(t,e,i){var n=this.hidden;this.hidden=!1,this.node.style.display="block",this.enterRenderTreeAndAppear(n),this.node.offsetWidth,nextFrame(i)},ScreenObject.prototype.hideAction=function(t,e,i){var n=this.hidden;this.hidden=!0,this.node.style.display="none",!n&&this.parentScreen._isRendering&&(this.isAppearing&&(this.disappear(),this._shouldAppear=!0),this.exitRenderTree()),setTimeout(i,0)},ScreenObject.prototype.isHidden=function(){return this.hidden},ScreenObject.prototype.resetAction=function(t,e,i){this.layoutSpecificValues=JSON.parse(this.originalLayoutSpecificValues),this.reset(),this.zIndex=this.originalZIndex,this.finishAnimation(),this._refreshDisplayState(),defer(i)},ScreenObject.prototype.addStyle=function(t){var e="#celtra-object-"+this.localId,i=this.node,n=/^:(link|visited|active|hover|focus|first-child|nth-child|nth-last-child|nth-of-type|first-of-type|last-of-type|empty|target|checked|enabled|disabled)/,r=/,\s*/g;this.styleNode||(this.styleNode=document.createElement("style"),i||(i=document.getElementsByTagName("head")[0]),i.appendChild(this.styleNode));var o=[];for(var s in t)o.push({selector:s.split(r).map(function(t){return e+(n.test(t)?"":" ")+t}).join(","),attributes:t[s]});var a=this._styleSheetTemplate({rules:o});this.styleNode.textContent+=a},ScreenObject.prototype._styleSheetTemplate=tmpl("<% for (var i = 0; i < rules.length; i++) { %><%= rules[i].selector %> { <%= rules[i].attributes %> }\n<% } %>"),ScreenObject.prototype.css=function(t,e){"undefined"==typeof e&&(e=t,t=this.getNode()),Object.keys(e).forEach(function(i){celtra.styler.css(t,i,e[i])})},ScreenObject.prototype.getNestedContainers=function(){return[]},ScreenObject.prototype.getActiveContainers=function(){return this.getNestedContainers()};;
function Gallery(){this._lastCtx}inherit(Gallery,ScreenObject),Gallery.toString=function(){return"[Clazz Gallery]"},Gallery.prototype.toString=function(){return"[Gallery "+this.localId+"]"},Gallery.prototype.createNode=function(){var t=Gallery.uber.createNode.call(this);if(this.autoAnimate){var e=function(){this.startAutoAnimate()}.bind(this);this.on("appeared",e),this.on("disappeared",function(){this._stopAutoAnimate()}.bind(this))}return this._items=this.dataSource.getItems(),t},Gallery.prototype._preloadDataSources=function(t,e){if(!t)return void(e&&e());var i=0,o=function(){i++},n=function(){--i||e&&e()};t.forEach(function(t){return t.image?(o(),void this._preloadImage(t.image,function(e,i){t.imageNode=e,t.imageUri=i,n()})):(o(),void defer(n,0))},this)},Gallery.prototype.nextItem=function(t){this.goToItem(this.getFocusedIndex()+1,t)},Gallery.prototype.previousItem=function(t){this.goToItem(this.getFocusedIndex()-1,t)},Gallery.prototype.previousAction=function(t,e,i){this._stopAutoAnimate(),this._lastCtx=t,this.previousItem(i)},Gallery.prototype.nextAction=function(t,e,i){this._stopAutoAnimate(),this._lastCtx=t,this.nextItem(i)},Gallery.prototype.goToItemAction=function(t,e,i){this._stopAutoAnimate(),this._lastCtx=t,this.goToItem(e.item-1,i)},Gallery.prototype.startIndex=0,Gallery.prototype.allowAutoAnimate=retTrue,Gallery.prototype.resetAllowAutoAnimate=noop,Gallery.prototype.getItem=function(t){return this._items[t%this.getItemsLength()]},Gallery.prototype.getItemsLength=function(){return this._items.length},Gallery.prototype.startAutoAnimateAction=function(t,e,i){this.resetAllowAutoAnimate(),this.autoAnimationTimeout||this.startAutoAnimate(),i()},Gallery.prototype._autoAnimateCancelledInTransition=!1,Gallery.prototype.startAutoAnimate=function(){this._autoAnimateCancelledInTransition=!1;var t=this._animateCallback;if(t)return void t();var e,i,o,n=!0,a=this.getItemsLength()-1,s="north"==this.autoAnimateDirection||"west"==this.autoAnimateDirection?"nextItem":"previousItem";t=function(){return this._autoAnimateCancelledInTransition?void(this._autoAnimateCancelledInTransition=!1):void(this.autoAnimationTimeout=setTimeout(o,this.autoAnimatePause))}.bind(this),o=function(){if(this.autoAnimationTimeout=null,!this.allowAutoAnimate())return void(this.autoAnimateUserInteraction?this.disableAutoAnimate():t());var o=this.getFocusedIndex(),r=function(n){o===a&&"nextItem"===s?(this.goToItem(0,t),n&&(i=!1,e=!1)):0===o&&"previousItem"===s&&(this.goToItem(a,t),n&&(i=!1,e=!1))}.bind(this);if(n)"repeat"===this.autoAnimateConclusion&&this.cyclic||r(!0),n=!1;else if(o===a||0===o)switch(this.autoAnimateConclusion){case"stop":if(i)return void this.disableAutoAnimate();break;case"reverse":e&&(s="previousItem"===s?"nextItem":"previousItem");break;case"repeat":this.cyclic||r(!1)}(0!==o&&"previousItem"===s||o!==a&&"nextItem"===s||this.cyclic&&"repeat"===this.autoAnimateConclusion)&&(this._autoAnimateCancelledInTransition=!1,this[s](t),e=!0,i=!0)}.bind(this),this._animateCallback=t,t()},Gallery.prototype._stopAutoAnimate=function(){var t=this.autoAnimationTimeout;t?(clearTimeout(t),delete this.autoAnimationTimeout):this._autoAnimateCancelledInTransition=!0,delete this._animateCallback},Gallery.prototype.stopAutoAnimateAction=function(t,e,i){this._stopAutoAnimate(),i()},Gallery.prototype.disableAutoAnimate=function(){this._stopAutoAnimate()},Gallery.prototype.resetAction=function(t,e,i){Gallery.uber.resetAction.call(this,t,e,function(){this._stopAutoAnimate(),this.autoAnimate&&this.startAutoAnimate(),i()}.bind(this))},Gallery.prototype._triggerOnFocusCalledOnce=!1,Gallery.prototype._triggerOnFocus=function(){var t=this.getFocusedIndex();isNaN(t)||this._lastFocusedIndex===t||(this._items[t].onFocus(new ActionContext(this),!1),this._triggerOnFocusCalledOnce&&this._items[t].onFocus(new ActionContext(this),!0),this._lastFocusedIndex=t),this._triggerOnFocusCalledOnce=!0},Gallery.prototype._triggerOnBlur=function(){var t=this._lastFocusedIndex;"number"!=typeof this._lastFocusedIndex&&(t=this.startIndex),t!=this.getFocusedIndex()&&this._items[t].onBlur(new ActionContext(this))};;
function Swipey(){}inherit(Swipey,Gallery),extend(Swipey.prototype,FeedImageCreator),Swipey.toString=function(){return"[Clazz Swipey]"},Swipey.prototype.toString=function(){return"[Swipey "+this.localId+"]"},Swipey.prototype.awake=function(){Swipey.uber.awake.call(this),this._animationLength=200,this._minimumDistanceForMovedState=5,this._rubberBandQuotient=4,this._snapThreshold=.2,this.startIndex=this.start-1,this._actionContextOfFirstTouchStart=null,this._autoAnimateDisabledByUserTouch=!1,this._autoAnimateHaltedByUserTouch=!1,this._currentTouchIdentifier=null,this._cycleWidth=0,this._firstTouchStart=null,this._allowHorizontalSwipe=!0,this._horizontalSwipeInProgress=!1,this._lastFocusedVirtualIndex=null,this._touchHandlersAttached=!1,this._jumpToItemIndexOnApear=!1,this._init=this._init.bind(this),this._draw=this._draw.bind(this),this._handleTouchStart=this._handleTouchStart.bind(this),this._handleTouchMove=this._handleTouchMove.bind(this),this._handleTouchEnd=this._handleTouchEnd.bind(this),this._handleTouchCancel=this._handleTouchCancel.bind(this),this._addListItem=this._addListItem.bind(this)},Swipey.prototype.createNode=function(){var t=Swipey.uber.createNode.call(this);if("string"==typeof this.contentItemsFeedFieldKey){var i=FeedData.getFieldRowsByKey(this.contentItemsFeedFieldKey),e=i.length>0,s=FeedData.isCorrectFieldType(this.contentItemsFeedFieldKey,this.constructor.name,"contentItemsFeedFieldKey"),n=Math.min(i.length,this.contentItemsFeedMaximumAllowedRows);if(this._items.length=e&&s?n:0,this.startIndex=clamp(0,this._items.length-1,this.startIndex),this._items.length>0){var o=FeedData.getFieldByKey(this.contentItemsFeedFieldKey);this._items.forEach(function(t,i){t.image=this._createFeedImageFile("contentItems",i),t.value=o.name+" - image #"+(i+1)},this)}}return this._state=new StateObject({itemIndex:this.startIndex,moved:!1,position:0,touchPosition:0}),this._animator=new EasingAnimation(this._state,"position",{exp:EasingAnimation.presets[this.autoAnimateEasing]}),this._preloadAssets(this._init),addClass(t,"touchable"),attach(t,"tap",this._handleTap),t},Swipey.prototype._loadImage=function(t,i,e){if("function"==typeof i?(e=i,i={}):"undefined"==typeof i&&(i={}),"string"==typeof this.contentItemsFeedFieldKey&&t.dynamic){var s=e;e=function(i,e){t.meta={height:i.naturalHeight,width:i.naturalWidth},this.redrawLayout(),"function"==typeof s&&s(i,e)}.bind(this)}Swipey.uber._loadImage.call(this,t,i,e)},Swipey.prototype._preloadAssets=function(t){var i=0,e=function(){i++},s=function(){--i||t&&t()},n=[];if(this._items.length<3)n=this._items;else if(0===this.startIndex){if(n=this._items.slice(0,2),this.cyclic){var o=this._items.slice(-1);n.push(o[0])}}else this.startIndex===this._items.length-1?(n=this._items.slice(this.startIndex-1),this.cyclic&&n.push(this._items[0])):n=this._items.slice(this.startIndex-1,this.startIndex+2);e(),this._preloadDataSources(n,s),e(),this._preloadImage(new File("runner/loading.png"),function(t,i){this._loadingImageUri=i,s()}.bind(this)),e(),this._preloadImage(new File("runner/image-placeholder.png"),function(t,i){this._placeholderImageUri=i,s()}.bind(this))},Swipey.prototype._appear=function(){this._triggerOnFocus()},Swipey.prototype._init=function(){var t=document.createElement("div");this.vertical&&addClass(t,"vertical"),this._listNode=document.createElement("ul"),addClass(this._listNode,"list");var i=this._items.length>1,e=this.autoAnimate&&this.autoAnimatePreventUserInteraction;!e&&i&&attach(t,"touchstart",this._handleTouchStart),this._state.on("change:position",function(){creative.adapter.Ticker.frame(this._draw,"next")}.bind(this)),this.pagination&&"hidden"!==this.pagination&&i&&(this._paginator=new Paginator({container:this.node,containerSize:this.size,position:this.pagination,itemsCount:this._items.length}),this._paginator.buildPagination()),this._items.forEach(this._addListItem),t.appendChild(this._listNode),this.node.appendChild(t),this.redrawLayout()},Swipey.prototype._getItemSize=function(t){var i=this.size.width,e=this.size.height,s=this._items[t],n=s.image;if(n){var o,h=n.width,a=n.height;return h>i&&(o=i/h,h=i,a=Math.ceil(a*o)),a>e&&(o=e/a,a=e,h*=o),this.vertical?a:h}return Math.round(.7*(this.vertical?e:i))},Swipey.prototype.redrawSceneLayout=function(){this._handleSizeUpdate(!1)},Swipey.prototype.redrawLayout=function(){this._handleSizeUpdate(!0)},Swipey.prototype._handleSizeUpdate=function(t){var i=this.size.width,e=this.size.height;if(this._items&&this._listNode&&(0!==i||0!==e)){var s,n=0;this._items.forEach(function(t,i){t.imgWidth=this._getItemSize(i),t.fullWidth=t.imgWidth+this.cellspacing,n+=t.fullWidth},this);var o=this.cyclic?Math.ceil((this.vertical?e:i)/n)+1:1,h=n*o;this._cycleWidth=n,this.vertical?this._listNode.style.height=h+"px":this._listNode.style.width=h+"px",this._removeAllListItems();for(var a=0;o>a;a++)this._items.forEach(this._addListItem);if(!this._initCompleted){this._initCompleted=!0;var r;r=this._jumpToItemIndexOnApear?this._jumpToItemIndexOnApear:this.startIndex,h>0&&this._jumpToItem(r)}this._items.forEach(function(t,i){for(var e=0;o>e;e++){var n=this._listNode.childNodes[e*this._items.length+i];"LI"===n.nodeName&&(s=n.firstChild,this._applyImageStyle(s,t),this.vertical?n.style.height=t.imgWidth+"px":n.style.width=t.imgWidth+"px")}}.bind(this)),this._paginator&&this._paginator.redrawPagination(this.size),t&&(this._state.position=this._getPositionForCentered(this._getItemCenter(this._state.itemIndex))),this._draw()}},Swipey.prototype._addListItem=function(t){var i=document.createElement("li"),e=new Image;if(this._applyImageStyle(e,t),this.vertical?(i.style.height=t.image&&t.image.width+"px",i.style.marginTop=this.cellspacing+"px",i.style.marginBottom=this.cellspacing+"px"):(i.style.width=t.image&&t.image.width+"px",i.style.marginLeft=Math.ceil(this.cellspacing/2)+"px",i.style.marginRight=Math.floor(this.cellspacing/2)+"px"),t.image)creative.adapter.useNativeClickForTapDetection?(e=document.createElement("div"),e.style.backgroundPosition="center center",e.style.backgroundSize="contain",e.style.backgroundRepeat="no-repeat",t.imageUri?e.style.backgroundImage='url("'+t.imageUri+'")':(e.style.backgroundImage='url("'+this._loadingImageUri+'")',this._loadImage(t.image,function(i,e){this.style.backgroundImage='url("'+e+'")',t.imageUri=e}.bind(e)))):t.imageUri?e.src=t.imageUri:(e.src=this._loadingImageUri,this._loadImage(t.image,function(i,e){this.src=e,t.imageUri=e}.bind(e))),i.className="touchable",i.appendChild(e);else{var s=document.createElement("div");"string"!=typeof this.contentItemsFeedFieldKey&&(i.className="empty",s.style.backgroundImage='url("'+this._placeholderImageUri+'")'),i.appendChild(s)}attach(i,"tap",function(){t.onSelect(new ActionContext(this,!0))}.bind(this)),this._listNode.appendChild(i)},Swipey.prototype._removeAllListItems=function(){[].slice.apply(this._listNode.childNodes).forEach(function(t){this._listNode.removeChild(t)}.bind(this))},Swipey.prototype._handleFocusAndBlur=function(){this._autoAnimateHaltedByUserTouch||(this._state.position=this._getPositionForCentered(this._getItemCenter(this._state.itemIndex))),this._triggerOnBlur(),this._triggerOnFocus()},Swipey.prototype._applyImageStyle=function(t,i){var e,s=this.size,n=s.width,o=s.height,h=t.width,a=t.height;i.image&&(h=i.image.width,a=i.image.height,creative.adapter.useNativeClickForTapDetection?t.style.width=t.style.height="100%":h>n||a>o?h/a>n/o?(e=n/h,t.style.width=n+"px",t.style.height=a*e+"px"):(e=o/a,t.style.width=h*e+"px",t.style.height=o+"px"):(t.style.width=h+"px",t.style.height=a+"px"))},Swipey.prototype._draw=function(){if(this._initCompleted){var t=this._getListElementOffset(),i=0;this.vertical&&(i=Math.round(t-this.cellspacing/2),t=0),this._listNode.style.left=t+"px",this._listNode.style.top=i+"px"}},Swipey.prototype._snap=function(){var t,i,e,s,n,o,h=function(t){return this._state.itemIndex=this._wrapAround(t,this._items.length),this._getPositionForCentered(this._getItemCenter(t))}.bind(this);i=this._getFocusedVirtualIndex(),this.cyclic?(e=i+1,s=i-1):(i=clamp(0,this._items.length-1,i),e=clamp(0,this._items.length-1,i+1),s=clamp(0,this._items.length-1,i-1)),n=this._getPositionForNext(this._getItemCenter(i),i),o=this._getPositionForPrevious(this._getItemCenter(i),i),t=h(i!==this._lastFocusedVirtualIndex?i:this._state.position>n?e:this._state.positione&&n+this._items[e].fullWidth<=t;)n+=this._items[e].fullWidth,e++;return s+e},Swipey.prototype._mapIndexToPosition=function(t){for(var i=Math.floor(t/this._items.length)*this._items.length,e=Math.floor(t/this._items.length)*this._cycleWidth,s=0;t>i+s;)e+=this._items[s].fullWidth,s++;return e},Swipey.prototype._mapPositionToIndex=function(t){return this._wrapAround(this._mapPositionToVirtualIndex(t),this._items.length)},Swipey.prototype._getLeftStripEdge=function(t){return this.cyclic?Math.floor(t/this._cycleWidth)*this._cycleWidth:0},Swipey.prototype._getViewportCenter=function(){return this._state.position+this.size[this.vertical?"height":"width"]/2},Swipey.prototype._getFocusedVirtualIndex=function(){return this._mapPositionToVirtualIndex(this._getViewportCenter())},Swipey.prototype.getFocusedIndex=function(){return this._state.itemIndex},Swipey.prototype._getIndexOfCenteredItem=function(){return this._wrapAround(this._getFocusedVirtualIndex(),this._items.length)},Swipey.prototype._getItemCenter=function(t){var i=this._items[this._wrapAround(t,this._items.length)];return i&&i.fullWidth?this._mapIndexToPosition(t)+this._items[this._wrapAround(t,this._items.length)].fullWidth/2:0},Swipey.prototype._getNearestIndex=function(t){if(this.cyclic){var i=this._getFocusedVirtualIndex(),e=t-i,s=t-(i+this._items.length);return Math.abs(e)<=Math.abs(s)?this._getFocusedVirtualIndex()+e:this._getFocusedVirtualIndex()+s}return clamp(0,this._items.length-1,t)},Swipey.prototype._getPositionForCentered=function(t){return t-this.size[this.vertical?"height":"width"]/2},Swipey.prototype._getPositionForNext=function(t,i){var e=this._getPositionForCentered(t),s=this._items[this._wrapAround(i,this._items.length)].fullWidth*this._snapThreshold;return e+s},Swipey.prototype._getPositionForPrevious=function(t,i){var e=this._getPositionForCentered(t),s=this._items[this._wrapAround(i,this._items.length)].fullWidth*this._snapThreshold;return e-s},Swipey.prototype._getListElementOffset=function(){var t=this._state.position;return this._getLeftStripEdge(t)-t},Swipey.prototype._wrapAround=function(t,i){return(t%i+i)%i},Swipey.prototype.goToItem=function(t,i){t instanceof ActionContext&&(t=i.item,i=arguments[2]);var e=this._getNearestIndex(t),s=this._getPositionForCentered(this._getItemCenter(e));this._state.itemIndex=this._wrapAround(e,this._items.length),this._animateTo(s,i)},Swipey.prototype.nextItem=function(t){this.goToItem(this._getFocusedVirtualIndex()+1,t)},Swipey.prototype.previousItem=function(t){this.goToItem(this._getFocusedVirtualIndex()-1,t)},Swipey.prototype.jumpToItem=function(t){t instanceof ActionContext&&(t=arguments[1].item),this._stopAutoAnimate(),this._animator.running&&this._animator.pause(),this._jumpToItem(t)},Swipey.prototype._jumpToItem=function(t){this._initCompleted||(this._jumpToItemIndexOnApear=t),this._state.itemIndex=this._wrapAround(this._getNearestIndex(t),this._items.length),this._state.position=this._getPositionForCentered(this._getItemCenter(this._state.itemIndex)),this._handleFocusAndBlur(),this._paginator&&this._paginator.setActivePaginationItem(this._state.itemIndex)},Swipey.prototype._normalizeEvent=function(t){var i=function(t,i){var e,s;for(e=0;ethis._getPositionForCentered(this._getItemCenter(this._items.length-1));i.position+=this.cyclic||!a&&!r?h:h/this._rubberBandQuotient,i.moved=!0,i.touchPosition=o,this.attachClickPreventionHandler()}}},Swipey.prototype._handleTouchEnd=function(t){creative.adapter.useNativeClickForTapDetection||t.preventDefault(),this._allowHorizontalSwipe=!0,this._horizontalSwipeInProgress=!1,this._currentTouchIdentifier==t.changedTouches[0].identifier&&(this._currentTouchIdentifier=t.touches[0]?t.touches[0].identifier:null);{var i=this._state,e=this._normalizeEvent(t),s=this.vertical?e.y:e.x;this.vertical?this._firstTouchStart.y:this._firstTouchStart.x}if(0===t.touches.length){this._autoAnimateHaltedByUserTouch=!1,this._touchHandlersAttached=!1,detach(this.parentUnit.node,"touchmove",this._handleTouchMove),detach(this.parentUnit.node,"touchend",this._handleTouchEnd),detach(this.parentUnit.node,"touchcancel",this._handleTouchCancel),this._animator.running||this._snap();var n=this._items[this._state.itemIndex].fullWidth*this._snapThreshold,o={firstTouch:this._firstTouchStart,lastTouch:e,minDistanceForSwipe:n,validAxis:this.vertical?"y":"x"},h=_analyzeTouch(o);h.isConsideredSwipe&&this._actionContextOfFirstTouchStart.trackUserInteraction(),this._actionContextOfFirstTouchStart=null,this._lastFocusedVirtualIndex=null}else i.touchPosition=s},Swipey.prototype._handleTouchCancel=function(t){this._handleTouchEnd(t)},Swipey.prototype._triggerOnFocus=function(){0!==this._items.length&&Swipey.uber._triggerOnFocus.call(this)},Swipey.prototype._triggerOnBlur=function(){0!==this._items.length&&Swipey.uber._triggerOnBlur.call(this)},Swipey.prototype.resetAction=function(t,i,e){Swipey.uber.resetAction.call(this,t,i,function(){this._jumpToItem(this.startIndex),this._autoAnimateDisabledByUserTouch=!1,e()}.bind(this))},Swipey.prototype.getField=function(){return{type:"string",value:this._items?this._items[this.getFocusedIndex()].value:""}},Swipey.prototype.allowAutoAnimate=function(){return!this._autoAnimateDisabledByUserTouch&&!this._autoAnimateHaltedByUserTouch},Swipey.prototype.resetAllowAutoAnimate=function(){this._autoAnimateDisabledByUserTouch=!1};;
function Hotspot(){}inherit(Hotspot,ScreenObject),Hotspot.toString=function(){return"[Clazz Hotspot]"},Hotspot.prototype.toString=function(){return"[Hotspot "+this.localId+"]"},Hotspot.prototype.createNode=function(){var t=Hotspot.uber.createNode.call(this);return addClass(t,"touchable"),attach(t,"tap",this.handleTap),t},Hotspot.prototype.handleTap=function(t){t.stopPropagation()};;
function Picture(){}inherit(Picture,ScreenObject),extend(Picture.prototype,FeedImageCreator),Picture.toString=function(){return"[Clazz Picture]"},Picture.prototype.toString=function(){return"[Picture "+this.localId+"]"},Picture.prototype.createNode=function(){var e={};"string"==typeof this.imageSourceFeedFieldKey&&(FeedData.checkAndTrackValue(this.imageSourceFeedFieldKey,this.imageSourceFeedRowIndex,this.constructor.name,"imageSourceFeedFieldKey"),this.file=this._createFeedImageFile("imageSource",this.imageSourceFeedRowIndex));var i=Picture.uber.createNode.call(this);return this.file===this.placeholderFile?("string"==typeof this.imageSourceFeedFieldKey||this._newFileWasSet||(addClass(i,"empty"),this._preloadImage(new File("runner/image-placeholder.png"),function(e,t){this._isSettingFileInProgress||(i.style.backgroundImage="url("+t+")")}.bind(this))),i):(this.file&&this._preloadImage(this.file,e,function(e){this._newFileWasSet||this._handlePreloadedImage(i,e)}.bind(this)),i)},Picture.prototype.awake=function(){Picture.uber.awake.call(this),this.placeholderFile=new File("runner/image-placeholder.png"),this.placeholderFile.meta={height:28,width:28},this.file||(this.file=this.placeholderFile),this._originalFile=this.file,this._newFileWasSet=!1},Picture.prototype._handlePreloadedImage=function(e,i){this.file.dynamic&&(this.file.meta={height:i.naturalHeight,width:i.naturalWidth});var t="",r="",a="no-repeat";this.imagePosition&&(t=this.imagePosition.replace("-"," "));var s=this.sizeUsingTransforms()?this.getNaturalSize():this.size,h=this.fittingSize;switch("fitUpToOriginal"===this.fittingSize&&(h=s.widtho&&"fit"==this.fittingSize||o>h&&"fill"==this.fittingSize,i=o>h&&"fit"==this.fittingSize||h>o&&"fill"==this.fittingSize,t=a,r=s,e?r=a/n*l:i&&(t=s/l*n),t>c&&(r*=c/t,t=c),r>c&&(t*=c/r,r=c),{width:t,height:r})},Picture.prototype.getImageUrl=function(){return this.file?this.file.getUrl():void 0};;
function Shapey(){}inherit(Shapey,ScreenObject),Shapey.toString=function(){return"[Clazz Shapey]"},Shapey.prototype.toString=function(){return"[Shapey "+this.localId+"]"},Object.defineProperties(Shapey.prototype,{_borderRoundness:{get:function(){var e=0,t=0,r=0,a=this._defaultValues.roundness;if("number"==typeof this.roundness&&(a=this.roundness),a>0){var o=Math.min(this.getNaturalSize().height,this.getNaturalSize().width),s=o/2,i=Math.max(this.getNaturalSize().height,this.getNaturalSize().width),h=i/2;if(50>a){var d=a/50;e=s*d}else{var n=(a-50)/50,l=(h-s)*n,p=s+l;t=this.getNaturalSize().width==o?s:p,r=this.getNaturalSize().height==o?s:p}}return this.shadow&&ios("8")&&window.devicePixelRatio>=3&&(1>e&&(e=1),1>t&&(t=1),1>r&&(r=1)),50>a?e+"px":t+"px "+r+"px"}}}),Shapey.prototype.awake=function(){Shapey.uber.awake.call(this),this._defaultValues={backgroundColor:"#365c99",borderColor:"#000000",borderWidth:5,roundness:0,shadowAngle:0,shadowBlur:10,shadowColor:"rgba(0,0,0,0.5)",shadowDistance:0}},Shapey.prototype.createNode=function(){var e=Shapey.uber.createNode.call(this);this._privateApiTracked={},addClass(e,"touchable"),this._shapey=document.createElement("div");var t=this._defaultValues.backgroundColor;if("string"==typeof this.backgroundColorFeedFieldKey){FeedData.checkAndTrackValue(this.backgroundColorFeedFieldKey,this.backgroundColorFeedRowIndex,this.constructor.name,"backgroundColorFeedFieldKey");var r=FeedData.getFieldValueByKey(this.backgroundColorFeedFieldKey,this.backgroundColorFeedRowIndex);t="string"==typeof r&&FeedData.isCorrectFieldType(this.backgroundColorFeedFieldKey,this.constructor.name,"backgroundColorFeedFieldKey")?r:"transparent"}else"string"==typeof this.backgroundColor&&(t=this.backgroundColor);if(Color.isGradient(t)){var a=Color.createGradientStyle(t);this.addStyle({".gradient-shapey":a}),addClass(this._shapey,"gradient-shapey")}else this._shapey.style.backgroundColor=t;if(this.border){var o="undefined"!=typeof this.borderColor?this.borderColor:this._defaultValues.borderColor,s="number"==typeof this.borderWidth?this.borderWidth:this._defaultValues.borderWidth;if(this._shapey.style.borderColor=o,this._shapey.style.borderStyle="solid",this._shapey.style.borderWidth=s+"px",deviceInfo.browser.chrome()||deviceInfo.browser.samsung()){var i="1";if(Color.isRgba(o)){var h=Color.patternRgba.exec(o);i=h[Color.matchRgbaAlpha]}"1"===i&&(this._shapey.style.backgroundClip="border-box")}}if(this.shadow){var d=("number"==typeof this.shadowAngle?this.shadowAngle:this._defaultValues.shadowAngle)*(Math.PI/180),n="number"==typeof this.shadowBlur?this.shadowBlur:this._defaultValues.shadowBlur,l="undefined"!=typeof this.shadowColor?this.shadowColor:this._defaultValues.shadowColor,p="number"==typeof this.shadowDistance?this.shadowDistance:this._defaultValues.shadowDistance,u=Math.round(p*Math.cos(d)),y=Math.round(p*Math.sin(d));celtra.styler.css(this._shapey,"boxShadow",u+"px "+y+"px "+n+"px "+l)}return e.appendChild(this._shapey),e},Shapey.prototype.redrawLayout=function(){if(this._shapey){var e=this._borderRoundness;parseInt(e,10)>0&&(this._shapey.style.borderTopLeftRadius=e,this._shapey.style.borderTopRightRadius=e,this._shapey.style.borderBottomLeftRadius=e,this._shapey.style.borderBottomRightRadius=e)}},Shapey.prototype._track=function(e){this._privateApiTracked[e]||(this._privateApiTracked[e]=!0,creative.track({name:"retiredFeatureUsed",featureType:"apifunction",featureName:e}))},Shapey.deprecatedPropertiesArray=["borderRoundness","shapey","defaultValues"],Shapey.deprecatedPropertiesObject={},Shapey.deprecatedPropertiesArray.forEach(function(e){Shapey.deprecatedPropertiesObject[e]={get:function(){return this._track("Shapey."+e+".getter"),this["_"+e]},set:function(t){this._track("Shapey."+e+".setter"),this["_"+e]=t}}}),Object.defineProperties(Shapey.prototype,Shapey.deprecatedPropertiesObject);;
function FixedDataSource(){}extend(FixedDataSource.prototype,Deferrable),extend(FixedDataSource.prototype,TriggerHost),FixedDataSource.toString=function(){return"[Clazz FixedDataSource]"},FixedDataSource.prototype.toString=function(){return"[FixedDataSource "+this.localId+"]"},FixedDataSource.prototype.getItems=function(){var e=[];return this.items.forEach(function(r){extend(r,TriggerHost);var t={image:r.image,imageNode:null,imageUri:null,value:r.value,onSelect:function(e,t){r.hasTriggers("select")&&(e.trackUserInteraction(),r.fireTriggers("select",null,t,e))},onFocus:function(e,t,i){e.screen.appearedAtLeastOnce?t?r.fireTriggers("itemFocusLegacy",null,i,e):r.fireTriggers("itemFocus",null,i,e):e.screen.once("appeared",function(){t?r.fireTriggers("itemFocusLegacy",null,i,e):r.fireTriggers("itemFocus",null,i,e)})},onBlur:function(e,t){r.fireTriggers("itemBlur",null,t,e)}};e.push(t)}),e};;
function File(t){if(t){if("string"==typeof t)return void(this.url=t);if(!t.url)throw"Url parameter must be set.";if(deep(this,t),0===this.url.indexOf(creative.cachedApiUrl)||0===this.url.indexOf(creative.insecureCachedApiUrl)){var i=this.url.split("/");"undefined"==typeof this.name&&(this.name=i[i.length-1]||"unknown"),"undefined"==typeof this.blobHash&&(this.blobHash=i[i.length-2]),"undefined"==typeof this.retinaScaleFactor&&(this.retinaScaleFactor=File.getRetinaScaleFactor(this.name)),"undefined"==typeof this.quality&&(this.quality=File.getDefaultQuality(this.name))}}}File.toString=function(){return"[Clazz File]"},File.prototype.toString=function(){return"[File "+this.localId+"("+this.name+"/"+this.url+")]"},File.prototype.getOriginalUrl=function(){if(this.url){if(-1!==this.url.indexOf("://"))return this.url;if("/"===this.url[0])throw"An absolute path as URL?";return creative.resourceUrl+this.url}if(this.blobHash)return(creative.secure?creative.cachedApiUrl:creative.insecureCachedApiUrl)+"blobs/"+this.blobHash+"/"+encodeURIComponent(this.name);throw"Neither url nor blobHash set?"},File.prototype.getUrl=function(t){var i=this.getOriginalUrl();return this.optimizable&&(i+="?transform=crush",this.quality>-1&&(i+="&quality="+this.quality),t&&this.optimizedWidth(t)>0&&this.optimizedHeight(t)>0&&(i+="&resize="+this.optimizedWidth(t)+"x"+this.optimizedHeight(t)),this.dynamic&&"string"==typeof this.fitting&&this.fitting.length>0&&(i+="&fitting="+this.fitting)),i},File.prototype.getDataUri=function(t,i){t instanceof Function&&(i=t,t={});var e=!this.dynamic&&("undefined"!=typeof this.blobHash||this.url.indexOf("api/animateySprites")>=0),n=creative.adapter.protoLoading.dataURIsSupported,r=creative.adapter.protoLoading.blobURIsSupported,a="treatment"===(creative.experiments.get("UseDataURIsGlobally")||{}).chosenVariant,h=1==creative.runtimeParams.dataURIsEnabled||1==creative.runtimeParams.turnOnBatching,o=(n||r)&&!creative.adapter.autoDecodesURLParams,s=(!!t.preferBatching||a||h)&&o&&e,l=this.getUrl(t.creativeUnitVariantId);"undefined"!=typeof this.dataUri?defer(function(){i(this.dataUri)}.bind(this),0,"File.getDataUri defer callback, has dataUri"):s?creative.batcher.getDataUri(l,i):defer(function(){i(l)},0,"File.getDataUri defer callback, url")},Object.defineProperties(File.prototype,{dynamic:{get:function(){return"undefined"!=typeof this._dynamic&&this._dynamic},set:function(t){this._dynamic=t},enumerable:!0,configurable:!1},optimizable:{get:function(){var t=this.getOriginalUrl(),i=0===t.indexOf(creative.cachedApiUrl)||0===t.indexOf(creative.insecureCachedApiUrl),e=creative.experiments?creative.experiments.get("FeedImageOptimization")||{}:{},n="on"===e.chosenVariant,r=i&&(!this.dynamic||n),a=!!String(this.name).match(/\.(gif|png|jpe?g)$/i);return r&&a},enumerable:!0,configurable:!1},retina:{get:function(){return this.retinaScaleFactor>1},enumerable:!0,configurable:!1},width:{get:function(){return this.retina?Math.round(this.meta.width/this.retinaScaleFactor):this.meta.width},enumerable:!0,configurable:!1},height:{get:function(){return this.retina?Math.round(this.meta.height/this.retinaScaleFactor):this.meta.height},enumerable:!0,configurable:!1},optimizedWidth:{get:function(){return function(t){if("number"!=typeof t||!this.optimizationSettings)return null;for(var i=null,e=0;e1,a=-1;return i?a=r?150:256:n?a=r?75:85:e&&(a=r?65:85),a},File.getRetinaScaleFactor=function(t){t=String(t);var i=new RegExp("^.*(@([2-"+File.MAXIMUM_SUPPORTED_RETINA_SCALE+"]+)x)"),e=t.toLowerCase().match(i);return e&&e[2]?parseInt(e[2],10):1};;
function Font(){}inherit(Font,FontBase),Font.toString=function(){return"[Clazz Font]"},Font.prototype.toString=function(){return"[Font "+this.localId+"]"},Font.prototype.hasFeedFields=function(){return this.feedFields instanceof Array},Font.prototype.getSubsetString=function(){var t=Font.uber.getSubsetString.apply(this);if(!this.hasFeedFields())return t;if("string"==typeof this.extendedSubsetString)return this.extendedSubsetString;var e=t||"";return this.feedFields.forEach(function(t){var n=FeedData.getFieldRowsByKey(t);n.forEach(function(t){"string"==typeof t.value&&(e+=t.value)})}),this.extendedSubsetString=e.replace(/[\r\n\t\f\v]/g,"").split("").filter(function(t,e,n){return n.indexOf(t)===e}).sort().join(""),this.extendedSubsetString},Font.prototype.getUnicodeRange=function(){return this.hasFeedFields()?"":Font.uber.getUnicodeRange.apply(this)};;
!function(){function t(){return this.sizeUsingTransforms()?r:a}function e(t,i){if(t instanceof Object&&t.constructor===Object){var n={};return Object.keys(t).forEach(function(h){n[h]=e(t[h],i)}),n}return"number"==typeof t?t*i:t}function i(t,e,i){return function(){return this.isAnimated&&("string"!=typeof i||this[i])?e.apply(this,arguments):t.apply(this,arguments)}}function n(n,h,s){var a=n[h],r=function(){return e(a.apply(this,arguments),t.call(this))};n[h]=i(a,r,s)}function h(t,e,i){var h="get"+ucfirst(e);n(t,h,i)}function s(){return this.isAnimated}var a=1,r=2;if(ScreenObject.prototype.positionUsingTransforms=s,ScreenObject.prototype.sizeUsingTransforms=s,"undefined"!=typeof Picture){Picture.prototype.positionUsingTransforms=s,Picture.prototype.sizeUsingTransforms=s;var o=Picture.prototype.awake;Picture.prototype.awake=function(){o.apply(this,arguments),this._imageElement=null,this.on("appear",this._drawImage.bind(this))};var l=Picture.prototype.createNode;Picture.prototype.createNode=function(){return this.parentContainer.on("resize",this._drawImage.bind(this)),l.apply(this,arguments)},Picture.prototype._drawImage=function(){if(this._imageElement){if("stretch"==this.fittingSize)return this._imageElement.style.position="absolute",this._imageElement.style.left="0px",this._imageElement.style.top="0px",this._imageElement.style.width="100%",void(this._imageElement.style.height="100%");var t=this.imagePosition?this.imagePosition.split("-"):["left","top"];1===t.length&&(["left","right"].indexOf(t[0])>-1?t.push("center"):t.unshift("center"));var e,i,n=this.file.width/this.file.height,h=this.sizeUsingTransforms()?this.getNaturalSize():this.size,s=h.width/h.height,a=this.fittingSize;"fitUpToOriginal"===this.fittingSize&&(a=h.widths?(e=h.width,i=this.file.height*(h.width/this.file.width)):(e=this.file.width*(h.height/this.file.height),i=h.height):"fill"===a&&(n>s?(e=this.file.width*(h.height/this.file.height),i=h.height):(e=h.width,i=this.file.height*(h.width/this.file.width)));var r,o;if("repeat"===a)r={left:0,center:Math.round((h.width*this._patternPixelRatio-e)/2),right:h.width*this._patternPixelRatio-e},o={top:0,center:Math.round((h.height*this._patternPixelRatio-i)/2),bottom:h.height*this._patternPixelRatio-i},this._imageElementsCtx.canvas.width=h.width*this._patternPixelRatio,this._imageElementsCtx.canvas.height=h.height*this._patternPixelRatio,this._imageElement.style.width=h.width+"px",this._imageElement.style.height=h.height+"px",this._imageElementsCtx.save(),this._imageElementsCtx.fillStyle=this._pattern,this._imageElementsCtx.translate(r[t[0]],o[t[1]]),this._imageElementsCtx.fillRect(-r[t[0]],-o[t[1]],h.width*this._patternPixelRatio,h.height*this._patternPixelRatio),this._imageElementsCtx.restore();else{r={left:"left: 0px;",center:"left: "+Math.round((h.width-e)/2)+"px;",right:"right: 0px;"},o={top:"top: 0px;",center:"top: "+Math.round((h.height-i)/2)+"px;",bottom:"bottom: 0px;"};var l=r[t[0]]+" "+o[t[1]]+" ",p="width: "+e+"px; height: "+i+"px; ",g="";this._imageElement.style.cssText="position: absolute; "+l+p+g}}},Picture.prototype._handlePreloadedImage=function(t,e){(this.file.dynamic||"repeat"===this.fittingSize)&&(this.file.meta={height:e.naturalHeight,width:e.naturalWidth}),"repeat"===this.fittingSize?(this._imageElement=document.createElement("canvas"),this._imageElementsCtx=this._imageElement.getContext("2d"),this._pattern=this._imageElementsCtx.createPattern(e,"repeat"),this._patternPixelRatio=e.naturalWidth/this.file.width):this._imageElement=e,this._drawImage(),t.appendChild(this._imageElement)}}var p=Screen.prototype.resetAction;Screen.prototype.resetAction=function(t){Scene.instances.forEach(function(e){e.parentScreen===this&&e.resetAction(t,{},noop)}.bind(this)),p.apply(this,arguments)},ScreenObject._roundIfNeeded=function(t){return t};var g=["fontSize","lineSpacing","letterSpacing","scaleBaseHeight","scaleBaseWidth","textShadowBlur","textShadowOffset"];if("undefined"!=typeof Texty){n(Texty.prototype,"getNaturalSize");var f=["textPaddingTop","textPaddingRight","textPaddingBottom","textPaddingLeft"];f.forEach(function(t){h(Texty.prototype,t,"useFontScaleFactorForPadding")}),g.forEach(function(t){h(Texty.prototype,t)})}var c=["borderWidth","shadowDistance","shadowBlur"].concat(g);"undefined"!=typeof Button&&(n(Button.prototype,"getNaturalSize"),c.forEach(function(t){h(Button.prototype,t)}))}();;
!function(n){function t(n,t,e){var u=n.filter(function(n){return n.id===t})[0];return u&&u.value?u.value:e}function e(n,t,e,u){var r=.001,i=3*n,a=3*(e-n)-i,o=1-i-a,c=3*t,f=3*(u-t)-c,s=1-c-f,I=function(n){return((o*n+a)*n+i)*n},O=function(n){return((s*n+f)*n+c)*n},h=function(n){return(3*o*n+2*a)*n+i},p=function(n){var t,e,u,i,a,o;for(u=n,o=0;8>o;o++){if(i=I(u)-n,Math.abs(i)u)return t;if(u>e)return e;for(;e>t;){if(i=I(u),Math.abs(i-n)i?t=u:e=u,u=.5*(e-t)+t}return u};return function(n){return O(p(n))}}function u(n){return Math.pow(n,2)}function r(n){return Math.pow(n,3)}function i(n){return Math.pow(n,4)}function a(n){return Math.pow(n,5)}function o(n){return 1-Math.cos(n*Math.PI*.5)}function c(n){return Math.pow(2,10*(n-1))}function f(n){return 1-Math.sqrt(1-n*n)}var s={none:function(){return 0},steps:function(n,e){var u=t(e,"steps",3),r=t(e,"jump-position","end"),i=1/u,a=n*u;return Math["end"===r?"floor":"ceil"](a)*i},linear:function(n){return n},easeIn:e(.42,0,1,1),easeOut:e(0,0,.58,1),easeInOut:e(.42,0,.58,1),easeInQuad:u,easeOutQuad:function(n){return 1-u(1-n)},easeInOutQuad:function(n){return.5>n?.5*u(2*n):1-.5*u(2*(1-n))},easeInCubic:r,easeOutCubic:function(n){return 1-r(1-n)},easeInOutCubic:function(n){return.5>n?.5*r(2*n)/2:1-.5*r(2*(1-n))},easeInQuart:i,easeOutQuart:function(n){return 1-i(1-n)},easeInOutQuart:function(n){return.5>n?.5*i(2*n):1-.5*i(2*(1-n))},easeInQuint:a,easeOutQuint:function(n){return 1-a(1-n)},easeInOutQuint:function(n){return.5>n?.5*a(2*n):1-.5*a(2*(1-n))},easeInSine:o,easeOutSine:function(n){return 1-o(1-n)},easeInOutSine:function(n){return.5*o(2*n)},easeInExpo:c,easeOutExpo:function(n){return 1-c(1-n)},easeInOutExpo:function(n){return.5>n?.5*c(2*n):1-.5*c(2*(1-n))},easeInCirc:f,easeOutCirc:function(n){return 1-f(1-n)},easeInOutCirc:function(n){return.5>n?.5*f(2*n):1-.5*f(2*(1-n))},easeInBack:e(.6,-.28,.735,.045),easeOutBack:e(.175,.885,.32,1.275),easeInOutBack:e(.68,-.55,.265,1.55),cubicBezier:e};"undefined"!=typeof module&&null!==module?Object.keys(s).forEach(function(n){module.exports[n]=s[n]}):n.AnimationTimingFunctions=s}(this);;
!function(n){function i(n,a,o){this._propertyTweens={},o=o||i.getUsedProperties(n);var u=t(n);for(var s in o){var v=o[s],f=r(v,u);this._propertyTweens[v]=new e(f,a)}}function e(n,i){this._keyframes=n,this._defaultTimingFunction=i||AnimationTimingFunctions.linear,this._tweenable=o(this._keyframes),a(this._keyframes)}function t(n){var i=[];for(var e in n){var t=parseFloat(e);i[Math.round(t*u)]=n[e]}return i}function r(n,i){var e,t={};for(var r in i)if(n in i[r]){"undefined"==typeof t[r]&&(t[r]={});var a=i[r][n];a instanceof Object?("undefined"!=typeof a.value&&null!==a.value&&(e=a.value,t[r].value=a.value),a.timingFunction&&(t[r].timingFunction=a.timingFunction)):(e=a,t[r].value=a,i[r].timingFunction&&(t[r].timingFunction=i[r].timingFunction))}return"undefined"==typeof t[v]&&(t[v]={value:e}),t}function a(n){if(!(s in n))throw new Error("Missing initial keyframe!");if(!(v in n))throw new Error("Missing final keyframe!")}function o(n){for(var i in n)return"number"==typeof n[i].value}var u=1e5,s=0*u,v=100*u;i.prototype.getValuesAt=function(n){var i={};for(var e in this._propertyTweens)i[e]=this._propertyTweens[e].getValueAt(n);return i},i.getUsedProperties=function(n){var i={};for(var e in n)for(var t in n[e])"timingFunction"!=t&&(i[t]=!0);return Object.keys(i)},e.prototype.getValueAt=function(n){n=Math.round(n*u);var i,e;for(var t in this._keyframes)t==n?(i={position:t,values:this._keyframes[t]},e={position:t,values:this._keyframes[t]}):n>t?i={position:t,values:this._keyframes[t]}:t>n&&!e&&(e={position:t,values:this._keyframes[t]});if(!this._tweenable)return i.values.value;var r=e.position-i.position,a=n-i.position,o=0==r?0:a/r,s=i.values.timingFunction&&i.values.timingFunction.instance?i.values.timingFunction.instance:this._defaultTimingFunction,v=i.values.timingFunction&&i.values.timingFunction.parameters?i.values.timingFunction.parameters:[];o=s(o,v);var f=e.values.value-i.values.value,l=f*o;return i.values.value+l},n.KeyframeAnimation=i}(this);;
function BaseScenePlayer(e){this._scene=e,this._state=new StateObject({progress:-1}),this._update=this._update.bind(this),this._render=this._render.bind(this),this._end=this._end.bind(this),this.paused=!0,this.ended=!1,this.supportsAutoplay=!1,this.supportsFallback=!0}extend(BaseScenePlayer.prototype,EventEmitter),Object.defineProperty(BaseScenePlayer.prototype,"progress",{get:function(){return-1!==this._state.progress?this._state.progress:this.ended?100:0}}),BaseScenePlayer.prototype._update=function(){this._state.isDirty("progress")&&(this._scene.updateObjects(this._state.progress),this.emit("progress",this._state.progress))},BaseScenePlayer.prototype._render=function(){this._state.isDirty("progress")&&(this._scene.renderObjects(),this.emit("render"),this._state.markClean())},BaseScenePlayer.prototype._cancel=function(){Ticker.removeFrame(this._update,"update"),Ticker.removeFrame(this._render,"render"),Ticker.removeFrame(this._end,"next"),this._state.markClean(),this.paused=!0},BaseScenePlayer.prototype._end=function(){this.stop(),this.emit("end")},BaseScenePlayer.prototype._stop=noop,BaseScenePlayer.prototype._pause=noop,BaseScenePlayer.prototype._play=function(){return!0},BaseScenePlayer.prototype.play=function(){this._cancel(),this._play()&&(this.paused=!1,Ticker.frame(this._update,"update"),Ticker.frame(this._render,"render"),this.emit("play"))},BaseScenePlayer.prototype.displayFallbackFrame=function(e){this._scene.updateObjects(Math.max(0,Math.min(e,100))),this._scene.renderObjects(),this._state.progress=e,this._state.markClean()},BaseScenePlayer.prototype.pause=function(){this.silentPause(),this.emit("pause")},BaseScenePlayer.prototype.silentPause=function(){this.ended=100===this._state.progress,(0===this._state.progress||100===this._state.progress)&&(this._state.progress=-1),this._cancel(),this._pause()},BaseScenePlayer.prototype.stop=function(){this._stop(),this.silentPause(),this.emit("stop")},BaseScenePlayer.prototype.destroy=function(){this._cancel()};;
function TimeScenePlayer(e){TimeScenePlayer.uberConstructor.call(this,e),this._state.registerValue("loopCount",0),this._elapsedTime=null,this._startTime=null,this._lastUpdateTime=null,this.supportsFallback=!1}inherit(TimeScenePlayer,BaseScenePlayer),Object.defineProperty(TimeScenePlayer.prototype,"_loopEnded",{get:function(){return"stop"===this._scene.onEnd&&this._state.progress>=100||"repeat"===this._scene.onEnd&&this._scene.onEndRepeatCount&&this._state.loopCount>=this._scene.onEndRepeatCount||"reverse"===this._scene.onEnd&&this._scene.onEndReverseCount&&this._state.loopCount>=2*this._scene.onEndReverseCount||0===this._scene.getDuration().milliseconds}}),Object.defineProperty(TimeScenePlayer.prototype,"_newLoopStarted",{get:function(){return this._state.isDirty("loopCount")}}),TimeScenePlayer.prototype._update=function(e){var t=this._scene.getDuration().milliseconds;this._startTime=this._startTime||e,this._lastUpdateTime&&(this._startTime-=this._lastUpdateTime,this._lastUpdateTime=null),this._elapsedTime=e-this._startTime,this._state.loopCount=Math.floor(t>0?this._elapsedTime/t:1);var s,i=100*(t>0?this._elapsedTime/t:1),n=i%100;s="repeat"===this._scene.onEnd?this._loopEnded||this._newLoopStarted?100:n:"reverse"===this._scene.onEnd?this._newLoopStarted&&this._state.loopCount%2?100:this._loopEnded?0:this._state.loopCount%2?100-n:n:i,this._state.progress=Math.max(0,Math.min(s,100)),TimeScenePlayer.uber._update.apply(this,arguments),this._loopEnded&&Ticker.frame(this._end,"next")},TimeScenePlayer.prototype._pause=function(){this._lastUpdateTime||(this._lastUpdateTime=this._elapsedTime),this._elapsedTime=null,this._startTime=null},TimeScenePlayer.prototype._stop=function(){this._lastUpdateTime=null,this._elapsedTime=null,this._state.loopCount=0};;
[\\\\s\\\\S]*?\",\"gi\");do t=e,e=e.replace(r,\"\");while(e!==t);return e.replace(/=1424&&1535>=e||e>=1536&&1791>=e||e>=1792&&1871>=e||e>=1872&&1919>=e||e>=2144&&2159>=e||e>=2208&&2303>=e||e>=64288&&64335>=e||e>=64336&&65023>=e||e>=65136&&65279>=e||8207===e||8235===e||8238===e)?!0:!1}function isLTRChar(e){return e=String(e).charCodeAt(0),e&&(e>=65&&90>=e||e>=97&&122>=e||e>=192&&214>=e||e>=216&&246>=e||e>=248&&696>=e||e>=768&&1424>=e||e>=2048&&8191>=e||e>=11264&&64284>=e||e>=65022&&65135>=e||e>=65277&&65535>=e||8206===e||8234===e||8237===e)?!0:!1}function guessWritingDirection(e){for(var t=25,n=Math.min(t,e.length),r=0;n>r;r++){var o=e.charAt(r);if(isLTRChar(o))return\"ltr\";if(isRTLChar(o))return\"rtl\"}return null}function randInt(){return(Math.random()+\"\").slice(2)}function _isListenerOptionSupported(e){var t=_isListenerOptionSupported.opts;if(\"undefined\"==typeof t[e]){t[e]=!1;try{window.addEventListener(\"listener-test\",null,Object.defineProperty({},e,{get:function(){t[e]=!0}}))}catch(n){}}return t[e]}function _buildNativeListenerOptions(e){if(\"object\"!=typeof e)return!!e;if(!_isListenerOptionSupported(\"capture\"))return!!e.capture;var t={capture:!!e.capture};return _isListenerOptionSupported(\"passive\")&&(t.passive=!!e.passive),t}function _analyzeTouch(e){var t,n=Math.abs(e.firstTouch.x-e.lastTouch.x),r=Math.abs(e.firstTouch.y-e.lastTouch.y);return\"y\"===e.validAxis?t=r>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&&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;if(\"http\"==!e.slice(0,4))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 c=(creative.runtimeParams.secure?creative.cachedApiUrl:creative.insecureCachedApiUrl)+\"shortenedUrls/\",u={url:e,fields:\"shortUrlKey\"},s=btoa(to_utf8(e));s=s.replace(/\\//g,\"$\").replace(/\\+/g,\"_\").replace(/=/g,\"\");var d={cbName:\"shortener_\"+s};loadJSONP(c+\"?\"+buildQuery(u),d,function(t){var n=creative.shareUrl+t.shortUrlKey;a[e]=n,r(\"success\",n)},function(){requestCreateShortenedUrl(e,r)})}}function requestCreateShortenedUrl(e,t){var n=(creative.runtimeParams.secure?creative.apiUrl:creative.insecureApiUrl)+\"shortenedUrls/\",r=fetchShortenedUrl.cache,o=new XMLHttpRequest;o.open(\"POST\",n),o.setRequestHeader(\"Content-Type\",\"application/json; charset=utf-8\"),o.onreadystatechange=function(){if(4===o.readyState)if(201===o.status){var n=JSON.parse(o.responseText),i=creative.shareUrl+n.shortUrlKey;r[e]=i,t(\"success\",i)}else t(\"error\")},o.send(JSON.stringify({url:e}))}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 getViewportGeometry(e,t){var n=deviceInfo.deviceType.desktop()&&\"BackCompat\"!=e.document.compatMode,r=deviceInfo.os.ios(\"9\",null),o=\"win\"!==t&&(n||r||\"doc\"===t),i=\"win\"!==t&&(n||\"doc\"===t),a=e.document.documentElement||{};return{width:o?a.clientWidth:e.innerWidth,height:i?a.clientHeight:e.innerHeight,left:e.scrollX||a.scrollLeft||0,top:e.scrollY||a.scrollTop||0}}function safeQuerySelector(e,t){try{return e.querySelector(t)}catch(n){return null}}function safeQuerySelectorAll(e,t){try{return e.querySelectorAll(t)}catch(n){return[]}}!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={};;\nfunction 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)};;\nfunction 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.lengthn[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(\"Chrom\")&&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 0===this.name.indexOf(\"Firefox\")&&s(this.version,arguments)},r.prototype.edge=function(){return\"Edge\"===this.name&&s(this.version,arguments)},r.prototype.miui=function(){return\"MIUI Browser\"===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},r.prototype.facebookApp=function(){var e=this.userAgent;return e.indexOf(\"FBAN\")>-1||e.indexOf(\"FBAV\")>-1},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);;\nwindow.deviceInfo=CeltraDeviceInfo.create(window.navigator.userAgent,window.celtraDeviceInfoRuntimeParams);;\n!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);;\n!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);;\nvar Freezer={};Freezer.unfreeze=function(n,e,o){function t(n,e,o,t,a){ActionInvocationSimulator.isDryRun()?ActionInvocationSimulator.needsDryRun(n.internalId)&&(ActionInvocationSimulator.logActionDryRun(n.internalId,n.method,e.localId),e[n.method+\"ActionDryRun\"]?e[n.method+\"ActionDryRun\"](o,t,a):a()):e[n.method+\"Action\"](o,t,a)}function a(n){if(n instanceof Array)return n.map(a);if(n instanceof Object){var o;if(\"ActionInvocation\"===n.clazz){n.internalId=++c;var s=l;o=function(e,a){if(!e)throw\"Cannot execute an action without a context.\";a||(a=noop);var i=o.isStatic;if(\"undefined\"==typeof i&&(i=!o.instance),o.disabled)return void a();if(i){if(o.instance)throw\"ActionInvocation for a static method must not have an instance assigned.\";if(\"function\"!=typeof o.actionClazz[o.method+\"Action\"])throw\"Clazz \"+o.actionClazz+' does not define the static action \"'+o.method+'\".';var r=extend({},o.args,{triggerId:s,caller:n});t(o,o.actionClazz,e,r,a)}else if(o.instance){if(!(o.instance instanceof o.actionClazz))throw\"Instance \"+o.instance+\" is not an instance of clazz \"+o.actionClazz;if(\"function\"!=typeof o.instance[o.method+\"Action\"])throw\"Instance of clazz \"+o.actionClazz+' does not define the instance action \"'+o.method+'\".';var r=extend({},o.args,{triggerId:s,caller:n});t(o,o.instance,e,r,a)}else ActionInvocationSimulator.isDryRun()?a():defer(a,0,\"Freezer.unfreeze defer c\")}}else if(n.clazz){var f=e[n.clazz];if(!f)throw new Error(\"Unsupported clazz: \"+n.clazz);o=Object.create(f.prototype)}else o={},n.onFire&&(l=n.type);for(var d in n)n.hasOwnProperty(d)&&\"clazz\"!==d&&(o[d]=a(n[d]));i.push(o),o.localId&&(r[o.localId]&&console.error(\"Duplicate localId: \"+o.localId),r[o.localId]=o);for(var d in o)if(\"clazz\"===d.slice(-5).toLowerCase()){var z=o[d];if(!z)continue;e[z]?o[d]=e[z]:console.error(\"Unsupported clazz: \"+o.clazz)}return o}return n}var i=[],r={},c=0,l=null,s=a(n);i.forEach(function(n){for(var e in n)if(\"LocalId\"===e.slice(-7)){var o=n[e];if(o instanceof Function)continue;var t;null===o?t=null:(t=r[o],t||console.error(\"Invalid localId reference: \"+o)),n[e.slice(0,-7)]=t,delete n[e]}else if(\"LocalIds\"===e.slice(-8)){for(var a=[],i=0;in-c;if(!o){var i=t._downloadQueue[r];i.requested||(i.requested=!0,e.push(r),i.secure&&(a=!0))}}e.length&&(Logger(\"batcher\").log(e.length+\" new batchable URLs requested during last runloop iteration (\"+(a?\"at least one secure\":\"none secure\")+\"):\\n - \"+e.join(\"\\n - \")),t._loadBatch(a,e,function(e){for(var a in e){var r=e[a];r===!1&&(r=(t._downloadQueue[a].secure?creative.cachedApiUrl:creative.insecureCachedApiUrl)+a),t._cache[a]=r,t._downloadQueue[a].callbacks.forEach(function(e){e(r)}),delete t._downloadQueue[a]}}))},0,\"Batcher.getDataUri downloadQueue\",useAsap())):defer(function(){a(e)},0,\"Batcher.getDataUri url not batchable\",useAsap())},Batcher.prototype._generateBatchUrl=function(e,a){var t=(e?creative.cachedApiUrl:creative.insecureCachedApiUrl)+\"batch?urls=\"+a.sort().map(encodeURIComponent).join(\",\");return t},Batcher.prototype._loadBatch=function(e,a,t){function r(e){var a,t=5381;for(a=0;al+i*l||r>d+c*d)&&(j.addPoint(t,n,a/1e3,u(document.elementFromPoint(t,n))),E=a,M=0)}}function r(e){var t=Date.now();L=S.setTimeout(function(){i(e,t)},200)}function i(e,t){b&&(b=!1,t||(t=Date.now()),j.addPoint(U,P,t/1e3,u(document.elementFromPoint(U,P))),I.track(j),g.sendUserInteractionToPreview&&g.sendUserInteractionToPreview(),T?(m.removeEventListener(\"touchmove\",a,p),m.removeEventListener(\"touchend\",i,p)):(m.removeEventListener(\"mousemove\",a,p),m.removeEventListener(\"mouseup\",i,p)),deviceInfo.deviceType.desktop()&&m.removeEventListener(\"mouseout\",r,p))}function c(e,t){var n=null,o=null,a=null,r=!1;return t instanceof Screen?(n=t,o=null,a=n.parentUnitVariant,r=!0):\"undefined\"!=typeof ScreenObject&&t instanceof ScreenObject?(n=t.parentScreen,o=t,a=n.parentUnitVariant,r=!0):\"undefined\"!=typeof CreativeUnitVariant&&t instanceof CreativeUnitVariant&&(n=null,o=null,a=t,r=!0),r?extend({unitName:a?a.parentUnit.name:n.parentUnit.name,unitVariantLocalId:a?a.localId:null,screenLocalId:n?n.localId:null,screenTitle:n?n.title:null,screenIsMaster:n?n.isMasterScreen():null,objectLocalId:o?o.localId:null,objectName:o?o.name:null,objectClazz:o?o.constructor.name:null,initiationTimestamp:new Date/1e3},e):e}function u(e){function t(e){for(var a in e)if(e.hasOwnProperty(a)){if(e[a].name&&e[a].name==o)return e[a];if(e[a].localId&&e[a].localId==n)return e[a];var r;if(e[a].variants?r=t(e[a].variants):e[a].screens?r=t(e[a].screens):e[a].objects?r=t(e[a].objects):e[a].content&&e[a].content.objects?r=t(e[a].content.objects):e[a].component&&(r=e[a].component),r)return r}}if(!e)return null;for(var n,o,a=e;;){if(a.id&&0==a.id.indexOf(\"celtra-\")){o=a.id.replace(\"celtra-\",\"\"),0==a.id.indexOf(\"celtra-object-\")&&(n=a.id.replace(\"celtra-object-\",\"\"));var r=t(w);if(r)return\"undefined\"!=typeof CreativeUnit&&r instanceof CreativeUnit?r.currentScreen:r}if(!a.parentNode)break;a=a.parentNode}return null}var l=15,d=150,s=1e3,v=15,f=v+5,p={capture:!0,passive:!0},m=e,h=t,g=t.adapter,I=g.trackingCenter,w=t.units,b=!1,L=null,T=!0,j={},M=0,y=null,E=Date.now(),U=0,C=0,P=0,D=0,S=e.ownerDocument.defaultView||e.ownerDocument.parentWindow;attach(m,\"touchstart\",n,p),attach(m,\"mousedown\",n,p)};\nfunction Tapper(t,e){function a(t){for(var e=t,a=null;1!=e.nodeType;)e=e.parentNode;for(;e&&1==e.nodeType&&e.tagName;){var n=e.tagName.toLowerCase();if(hasClass(e,\"touchable\")||\"a\"===n&&e.href||\"button\"===n||\"img\"===n||\"input\"===n&&e.type&&\"button\"===e.type.toLowerCase()){a=e;break}e=e.parentNode}return a}function n(t,e){var a=t.ownerDocument.createEvent(\"MouseEvents\");a.initEvent(\"tap\",!0,!0),e.dispatchEvent(a)}var c=\"undefined\"!=typeof creative&&creative.adapter||adapter;e=e||c.useNativeClickForTapDetection,e&&(attach(t,\"click\",function(e){var c=a(e.target);c&&n(t,c)},!c.nativeClickEmittedOnSwipe),c.useNativeClickForTapDetection)||attach(t,\"touchstart\",function(o){var r=a(o.target);if(r){var i=!1;if(celtra.iframe()){var u=function(){var t=c.getTopWindow();return[t.scrollX,t.scrollY,t.innerWidth,t.innerHeight]},h=u();i=!0}var s=10,d=o.targetTouches[0].clientX-s,v=o.targetTouches[0].clientX+s,l=o.targetTouches[0].clientY-s,f=o.targetTouches[0].clientY+s;addClass(r,\"touched\");var p=!1,g=!1,m=!1,T=!1,C=new Date,w=function(t){if(!p&&!g){var e=t.targetTouches[0].clientX,a=t.targetTouches[0].clientY;p=i&&h.toString()!=u().toString(),g=!(e>=d&&v>=e&&a>=l&&f>=a),g||p?removeClass(r,\"touched\"):addClass(r,\"touched\")}},k=function(){if(!T&&(T=!0,detach(t,\"touchmove\",w,!1),detach(t,\"touchend\",arguments.callee,!1),hasClass(r,\"touched\"))){var a=200,c=new Date-C>a&&!deviceInfo.deviceType.desktop();if(removeClass(r,\"touched\"),g||p||m||c)return;e||n(t,r)}},y=function(){detach(t,\"touchend\",y,!0),nextFrame(function(){m=!0,k()})};attach(t,\"touchcancel\",function(t){removeClass(r,\"touched\"),k(t)},!1),attach(t,\"touchmove\",w,!1),attach(t,\"touchend\",k,!1),attach(t,\"touchend\",y,!0)}},!0)};\nfunction 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)};;\nfunction SwipeListener(t){function e(t,e){return Math.abs(t)>Math.abs(e)?t>0?\"east\":\"west\":e>0?\"south\":\"north\"}function a(){detach(l(),\"touchmove\",n,!1),detach(l(),\"touchend\",c,!1)}function n(t){if(t.touches.length>1)a();else{var n=t.changedTouches[0].pageX-o,c=t.changedTouches[0].pageY-i;if(r=Math.max(Math.abs(n),Math.abs(c)),r>Math.min(50,g))if(null===u)u=e(n,c);else{var h=e(n,c);u!=h&&a()}}}function c(){a(),r>=g&&(d(u,r),v.attachClickPreventionHandler())}function h(t){creative.adapter.useNativeClickForTapDetection||t.preventDefault(),1==t.touches.length&&(o=t.changedTouches[0].pageX,i=t.changedTouches[0].pageY,r=0,u=null,attach(l(),\"touchmove\",n,!1),attach(l(),\"touchend\",c,!1),v.detachClickPreventionHandler())}var o,i,u,r,s=t.target,l=t.swipeNodeGetter,d=t.swipe,g=t.minLength||50,v=Object.create(ClickPreventer).initClickPrevention(function(){return s});attach(window,\"touchstart\",noop,!1),attach(s,\"touchstart\",h,!1)};\nvar ClickPreventer={initClickPrevention:function(e){return this._getDefaultClickPreventionNode=e||function(){},this._clickPreventionNode=null,this._clickPreventionHandler=this._clickPreventionHandler.bind(this),this},attachClickPreventionHandler:function(e){creative.adapter.nativeClickEmittedOnSwipe&&!this._clickPreventionNode&&(this._clickPreventionNode=e||this._getDefaultClickPreventionNode(),attach(this._clickPreventionNode,\"click\",this._clickPreventionHandler,!0))},detachClickPreventionHandler:function(){creative.adapter.nativeClickEmittedOnSwipe&&this._clickPreventionNode&&(detach(this._clickPreventionNode,\"click\",this._clickPreventionHandler,!0),this._clickPreventionNode=null)},_clickPreventionHandler:function(e){e.stopPropagation(),this.detachClickPreventionHandler()}};;\nfunction PlaceboBar(e,t,a,i){var n=!1,r=document.createElement(\"div\");r.className=\"celtra-placebobar\",r.style.cssText=\"position: absolute; bottom: 60px; left: 0; right: 0; margin: auto; z-index: 20; width: 215px; height: 8px;\";var l=document.createElement(\"img\");l.src=creative.resourceUrl+\"runner/clazzes/CreativeUnit/loading-back.png\",l.style.position=\"absolute\",l.style.width=\"100%\",l.style.height=\"100%\",r.appendChild(l);var o=document.createElement(\"div\");o.style.position=\"absolute\",o.style.top=\"2px\",o.style.bottom=\"2px\",o.style.left=\"3px\",o.style.right=\"3px\",r.appendChild(o);var s=document.createElement(\"div\");return s.style.background=\"url(\"+creative.resourceUrl+\"runner/clazzes/CreativeUnit/loading-over.png) \"+i+\" repeat-x\",s.style.position=\"absolute\",s.style.width=\"0\",s.style.height=\"100%\",o.appendChild(s),r.start=function(){function i(){if(r.parentNode){var n=Math.min((new Date-l)/e,t);s.style.width=100*n+\"%\",t>n&&setTimeout(i,2*a*Math.random())}}if(!n){n=!0;var l=new Date;setTimeout(i,0)}},r};\nvar 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,\"undefined\"!=typeof module&&null!==module&&(module.exports=EventEmitter);;\nfunction InViewObject(t,e){this.view=t,this.inViewParent=e,this._init()}extend(InViewObject.prototype,EventEmitter),InViewObject.prototype._init=function(){this.rectInView=CRect.ZERO,this.areaInViewRatio=0,this.active=!1,this._maxPossibleDimensions={width:0,height:0,area:0},this.computeRectInView=this.computeRectInView.bind(this),this.start=this.start.bind(this),this.stop=this.stop.bind(this)},InViewObject.prototype.getNode=function(){return this.view.getNode()},InViewObject.prototype.getParentMaxPossDims=function(){return this.inViewParent?this.inViewParent.getMaxPossibleDimensions():this.adapter.getViewportRect()},InViewObject.prototype.computeRectInView=function(){var t=this.inViewParent.getRectInView(),e=this.getBoundingClientRect(),i=t.intersect(e),n=!1;this.rectInView.equals(i)||(this.rectInView=i,n=!0),this._computeMaxPossibleDimensions(e,this.getParentMaxPossDims());var s=this._maxPossibleDimensions.area>0?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)};;\nfunction 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};;\nfunction DryRunResultSet(t){this._actions=t}DryRunResultSet.prototype.contains=function(t,n){return this._actions.some(function(e){var o=t==e.method,u=!n||n==e.instance;return o&&u})},DryRunResultSet.prototype.getAll=function(){return this._actions},DryRunResultSet.prototype.concat=function(t){return new DryRunResultSet(this._actions.concat(t.getAll()))};;\nvar ActionInvocationSimulator={_dryRun:!1,_dryRunActions:[],_dryRunExecutedActionsLocalIds:[],beginDryRun:function(){this._dryRun=!0,this._dryRunActions=[],this._dryRunExecutedActionsLocalIds=[]},endDryRun:function(){var n=this._dryRunActions;return this._dryRun=!1,this._dryRunActions=[],this._dryRunExecutedActionsLocalIds=[],new DryRunResultSet(n)},isDryRun:function(){return this._dryRun},needsDryRun:function(n){return!this._dryRunExecutedActionsLocalIds[n]},logActionDryRun:function(n,t,u){this._dryRunExecutedActionsLocalIds[n]=!0,this._dryRunActions.push({method:t,instance:u})}};;\nvar TriggerHost={_getTriggers:function(r,i){return i||(i=retTrue),this.triggers.filter(function(t){return t.type==r&&i(t.parameters,t)})},_fireArrayOfTriggers:function(r,i,t){var e=this;i||(i=noop),t||(t=new ActionContext(e)),r.waitForEach(function(r,i){r.onFire?r.onFire(t,i):i()},i)},hasTriggers:function(r,i){return this._getTriggers(r,i).length>0},fireTriggersDryRun:function(r,i,t,e){var n;try{ActionInvocationSimulator.beginDryRun(),this.fireTriggers(r,i,t,e)}finally{n=ActionInvocationSimulator.endDryRun()}return n},fireTriggers:function(r,i,t,e){var n=this._getTriggers(r,i);this._fireArrayOfTriggers(n,t,e)},fireSortedTriggers:function(r,i,t,e,n){var g=this._getTriggers(r,i),n=n||null;this._fireArrayOfTriggers(g.sort(n),t,e)},triggerAction:function(r,i,t){this.fireTriggers(i.eventName,null,t,r)},triggerActionByLocalId:function(r,i,t){var e=this.triggers.filter(function(r){return r.localId===i.localId});e.length>0&&this._fireArrayOfTriggers(e,t,r)},triggerByLocalIdAction:function(r,i,t){var e=i.event?[i.event]:[];this._fireArrayOfTriggers(e,t,r)},triggerByLocalIdActionDryRun:function(r,i,t){this.triggerByLocalIdAction(r,i,t)}};;\nvar SceneHost={_initImmediatelyPlayedScenes:function(){if(this.immediatelyPlayedScenes){var e=[];if(this instanceof Screen){e=this.immediatelyPlayedScenes.appear.scenes;var i=!this.appearedAtLeastOnce;i&&(e=e.concat(this.immediatelyPlayedScenes.firstAppear.scenes))}else e=this.immediatelyPlayedScenes.conditionMet.scenes;e.forEach(function(e){e.renderFirstFrame()})}}};;\nfunction ActionContext(e,t){if(this._id=randInt(),this.initiator=e,this.initiationTimestamp=new Date/1e3,\"object\"==typeof t?(this.consideredUserInitiatedByBrowser=!!t.consideredUserInitiatedByBrowser,this.certainlyNotCausedByUserBehavior=!!t.certainlyNotCausedByUserBehavior):(this.consideredUserInitiatedByBrowser=!!t,this.certainlyNotCausedByUserBehavior=!1),this.inUserInitiatedIteration=this.consideredUserInitiatedByBrowser,this.consideredUserInitiatedByBrowser&&this.certainlyNotCausedByUserBehavior)throw new Error(\"Unable to create an ActionContext where both consideredUserInitiatedByBrowser and certainlyNotCausedByUserBehavior are true!\");if(e instanceof Screen)this.screen=e,this.screenObject=null,this.unitVariant=this.screen.parentUnitVariant;else if(e instanceof ScreenObject)this.screen=e.parentScreen,this.screenObject=e,this.unitVariant=this.screen.parentUnitVariant;else{if(!(\"undefined\"!=typeof CreativeUnitVariant&&e instanceof CreativeUnitVariant))throw new Error(\"Initiator (\"+e+\") is not a Screen or a ScreenObject. Analytics would be confused.\");this.screen=null,this.screenObject=null,this.unitVariant=e}if(this.inUserInitiatedIteration){var i=function(){this.inUserInitiatedIteration=!1}.bind(this);defer(i),nextFrame(i)}if(this.trackUserInteraction=this.trackUserInteraction.bind(this),this._isAttributable=!!this.screen&&this._isScreenReadyForEventAttribution(),this.screen&&!this.screen.parentUnit.name)throw new Error(\"Parent unit missing name.\")}ActionContext.prototype._isScreenReadyForEventAttribution=function(){return this.screen.isMasterScreen()?this.screen.parentContainer.screens.some(function(e){return e.appearedAtLeastOnce&&e.isNormalScreen()}):this.screen.appearedAtLeastOnce},ActionContext.prototype.extendEvent=function(e){return extend({unitName:this.unitVariant?this.unitVariant.parentUnit.name:this.screen.parentUnit.name,unitVariantLocalId:this.unitVariant?this.unitVariant.localId:null,screenLocalId:this.screen?this.screen.localId:null,screenTitle:this.screen?this.screen.title:null,screenIsMaster:this.screen?this.screen.isMasterScreen():null,objectLocalId:this.screenObject?this.screenObject.localId:null,objectName:this.screenObject?this.screenObject.name:null,objectClazz:this.screenObject?this.screenObject.constructor.name:null,initiationTimestamp:this.initiationTimestamp},e)},ActionContext.prototype.initiatedBeforeScreenShown=function(){return this.screen&&!this._isAttributable},ActionContext.prototype.track=function(e,t){this.initiatedBeforeScreenShown()&&console.warn('Event \"'+e.name+'\" appears to be initiated before a screen was ever shown and will be ignored.'),creative.track(this.extendEvent(e),t)},ActionContext.prototype.trackUserInteraction=function(){if(creative.getUserInteracted())creative.interactionTrackingTimeout||(this.track({name:\"interaction\"}),creative.interactionTrackingTimeout=setTimeout(function(){creative.interactionTrackingTimeout=null},1e3));else{if(creative.runtimeParams.userInteracted=1,creative.experiments.get(\"TrackViewableAreaChange\")){var e=creative.adapter;e.canMeasureViewportPlacementGeometry&&\"function\"==typeof e.trackViewableAreaRatio&&e.trackViewableAreaRatio()}this.track({name:\"firstInteraction\"})}defer(creative.trackingCenter.batchFlush),creative.userInteracted(this)},ActionContext.prototype.trackClickThrough=function(e){e||(e=noop),creative.runtimeParams.clickedThrough?this.track({name:\"clickThrough\"},e):(creative.runtimeParams.clickedThrough=1,this.track({name:\"firstClickThrough\"},e)),defer(creative.trackingCenter.batchFlush),creative.clickedThrough(this)};;\nfunction VideoContext(e,t,i){VideoContext.uberConstructor.call(this,e instanceof ActionContext?e.initiator:e,e&&e.userInitiated),this.file=t,this.url=t.getUrl(),this.label=i,this.source=null}inherit(VideoContext,ActionContext),VideoContext._eventNames=[\"videoDurationUpdate\",\"videoPlayAttempted\",\"videoPresetSelected\",\"videoPlayedSegment\",\"videoStart\",\"videoFirstQuartile\",\"videoMidpoint\",\"videoThirdQuartile\",\"videoComplete\"],VideoContext.prototype.registerSource=function(e){if(!e)throw\"Not a valid source of video events.\";this.source=e,VideoContext._eventNames.forEach(function(e){this.source.on(e,function(t){this.handleEvent(e,t)}.bind(this))}.bind(this))},VideoContext.prototype.handleEvent=function(e,t){this.track(extend(JSON.parse(JSON.stringify(t||{})),{name:e}))},VideoContext.prototype.track=function(e){if(\"videoPlayAttempted\"==e.name){var t=this.file.url?\"URL\":\"File\";extend(e,{sourceType:t,source:\"URL\"==t?this.file.url:this.file.blobHash,label:this.label})}VideoContext.uber.track.call(this,e)};;\nfunction ShakeListener(){this.shakeThreshold=1.5,this.canListen=!0,this.slidingWindow=5,this.signals=[],this.handleMotion=this.handleMotion.bind(this),this.topWindow=creative.adapter.getTopWindow()}extend(ShakeListener.prototype,EventEmitter),ShakeListener.prototype.start=function(){this.canListen=!0;var i=window.DeviceMotionEvent&&window.DeviceMotionEvent.requestPermission;creative.deviceMotionListenerAdded||(creative.deviceMotionListenerAdded=!0,i?window.DeviceMotionEvent.requestPermission().then(function(i){\"granted\"==i?this.topWindow.addEventListener(\"devicemotion\",this.handleMotion):this.emit(\"shakeFallback\")}.bind(this))[\"catch\"](function(i){console.warn(i.message+\". Triggering fallback behaviour\"),this.emit(\"shakeFallback\")}.bind(this)):this.topWindow.addEventListener(\"devicemotion\",this.handleMotion))},ShakeListener.prototype.stop=function(){this.canListen=!1,creative.deviceMotionListenerAdded&&(creative.deviceMotionListenerAdded=!1,this.topWindow.removeEventListener(\"devicemotion\",this.handleMotion))},ShakeListener.prototype.handleMotion=function(i){if(this.canListen){this.signals.push(i.accelerationIncludingGravity),this.signals.length>this.slidingWindow&&this.signals.shift();var e=this.signals.reduce(function(i,e){return{x:i.x+e.x,y:i.y+e.y,z:i.z+e.z}}),t={x:e.x/this.signals.length,y:e.y/this.signals.length,z:e.z/this.signals.length};if(this.prevSignal){var n=null,s=Math.abs(t.x-this.prevSignal.x),h=Math.abs(t.y-this.prevSignal.y),o=Math.abs(t.z-this.prevSignal.z);if(90===Math.abs(creative.adapter.orientation)){var a=h;h=s,s=a}s>h&&s>o&&s>this.shakeThreshold?n=\"x\":h>s&&h>o&&h>this.shakeThreshold?n=\"y\":o>s&&o>h&&o>this.shakeThreshold&&(n=\"z\"),(s>this.shakeThreshold||h>this.shakeThreshold||o>this.shakeThreshold)&&this.emit(\"shake\",n)}this.prevSignal=t}};;\n!function(){\"use strict\";function t(t){return\"italic\"===String(t).toLowerCase()?\"italic\":\"\"}function e(t){var e=/normal|bold|([1-9])00/i.exec(t);if(\"undefined\"==typeof e)return\"\";var i=e[0];return\"normal\"===i?\"400\":\"bold\"===i?\"700\":i}function i(i){var n=i.family.replace(/ /g,\"+\"),o=t(i.style),s=e(i.weight),r=s+o;return r.length>0?n+\":\"+r:n}function n(t,e,i){if(l){var n=\"300px\",o=t.style+\" \"+t.weight+\" \"+n+' \"'+t.getBrowserCompatibleFontFamily()+'\"',s=t.hasUnicodeRangeDefined()&&t.hasSubsetStringDefined()?t.getSubsetString():\" \";document.fonts.load(o,s).then(function(t){t.length>=1?e():i()},function(){i()})}else{if(\"undefined\"==typeof FontLoader)return void i(\"Font Loader is not initialized.\");FontLoader.watch(t.getBrowserCompatibleFontFamily(),t.style,t.weight,e,i,t.getSubsetString())}}function o(t,e,i){var o=\"font-style-manager\",s=document.getElementById(o);s||(s=document.createElement(\"style\"),s.id=o,document.getElementsByTagName(\"head\")[0].appendChild(s));var r=t.generateFontFace();if(!r)return void i(\"Unable to define style for font without specifying files, style and weight.\");var a=[].slice.apply(s.sheet.cssRules).some(function(e){var i=e.style.getPropertyValue(\"font-family\").replace(/^['\"](.+)['\"]$/,\"$1\");return i==t.getBrowserCompatibleFontFamily()&&e.style.getPropertyValue(\"font-style\")==t.style&&e.style.getPropertyValue(\"font-weight\")==t.weight});a||s.sheet.insertRule(r,s.sheet.cssRules.length),n(t,e,i)}function s(t,e,i,o){var s=[].slice.apply(document.getElementsByTagName(\"link\")).filter(function(t){return t.href===e})[0];if(s||(s=document.createElement(\"link\"),s.setAttribute(\"rel\",\"stylesheet\"),s.setAttribute(\"media\",\"all\"),s.setAttribute(\"href\",e)),l){var r=function(){s._finished=!0,n(t,i,o)};s._finished?n(t,i,o):(s.addEventListener(\"load\",r),s.addEventListener(\"error\",r))}else setTimeout(function(){n(t,i,o)},0);s.parentNode||document.getElementsByTagName(\"head\")[0].appendChild(s)}function r(t){for(var e in t)this[e]=t[e]}var a=3,l=function(t,e){var i=!!document.fonts;if(/Apple/.test(e)){var n=/AppleWebKit\\/([0-9]+)(?:\\.([0-9]+))(?:\\.([0-9]+))/.exec(t);return n?i&&parseInt(n[1],10)>603:i}var o=/Gecko.*Firefox\\/(\\d+)/.exec(t);return o?i&&parseInt(o[1],10)>46:i}(window.navigator.userAgent,window.navigator.vendor),f=[\"Droid Sans\"];r.prototype.getId=function(){return this.typefaceId||this.id},r.prototype.getSubsetString=function(){return this.subset},r.prototype.getTrackingUrl=function(){return this.trackingUrl},r.prototype.getUnicodeRange=function(){return this.unicodes},r.prototype.getBrowserCompatibleFontFamily=function(){if(this.isAdobe()||this.useGoogleFontsAPI()||this.isSystem())return this.family;var t=this.family+(this.stretch?\" \"+this.stretch:\"\")+\" \"+this.provider;if(this.hasSubsetStringDefined()&&!this.hasUnicodeRangeDefined()&&(t+=\" \"+encodeURIComponent(this.getSubsetString())),t.length>25){for(var e,i=5381,n=0,o=t.length;o>n;n++)e=t.charCodeAt(n),i=(i<<5)+i+e;return i.toString()}return t},r.prototype.setBaseUrl=function(t){this.baseUrl=t},r.prototype.isAdobe=function(){return\"adobe\"===this.provider},r.prototype.isCustom=function(){return\"custom\"===this.provider},r.prototype.isGoogle=function(){return\"google\"===this.provider},r.prototype.isMonotype=function(){return\"monotype\"===this.provider},r.prototype.isSystem=function(){return\"system\"===this.provider},r.prototype.hasSubsetStringDefined=function(){var t=this.getSubsetString();return\"string\"==typeof t&&t.length>0},r.prototype.hasTrackingUrlDefined=function(){var t=this.getTrackingUrl();return\"string\"==typeof t&&t.length>0},r.prototype.hasUnicodeRangeDefined=function(){var t=this.getUnicodeRange();return\"string\"==typeof t&&t.length>0},r.prototype.needsLoading=function(){return this.isAdobe()||this.isCustom()||this.isGoogle()||this.isMonotype()},r.prototype.useGoogleFontsAPI=function(){return\"google\"===this.provider&&-1!==f.indexOf(this.family)},r.prototype.getCssProperties=function(){return{\"font-family\":this.needsLoading()?'\"'+this.getBrowserCompatibleFontFamily()+'\", Helvetica, sans-serif':this.getBrowserCompatibleFontFamily(),\"font-style\":this.style,\"font-weight\":this.weight}},r.prototype.getFileUrl=function(t){if(\"string\"==typeof this.baseUrl){var e,n=this.hasSubsetStringDefined();if(this.isGoogle()){var o=i(this);e=this.baseUrl+\"google/\"+o+\"/\"+a+\"_webfont.\"+t}else if(\"undefined\"!=typeof this.files&&\"undefined\"!=typeof this.files[t]){var s=this.getId();if(\"string\"!=typeof s)return this.baseUrl+this.files[t]+\".\"+t;var r,l=this.files[t].blobHash,f=this.files[t].name||\"webfont\";r=n?a+\"_\"+l:l,e=this.baseUrl+s+\"/\"+r+\"/\"+encodeURIComponent(f)+\".\"+t}return\"string\"==typeof e&&n&&(e+=\"?subset=\"+encodeURIComponent(this.getSubsetString())),e}},r.prototype.generateFontFace=function(){var t=\"\",e=[],i=this.getFileUrl(\"woff2\");i&&e.push('url(\"'+i+'\") format(\"woff2\")');var n=this.getFileUrl(\"woff\");n&&e.push('url(\"'+n+'\") format(\"woff\")');var o=this.getFileUrl(\"ttf\");return o&&e.push('url(\"'+o+'\") format(\"truetype\")'),this.style&&this.weight&&e.length>0&&(t=\"@font-face {\",t+='font-family: \"'+this.getBrowserCompatibleFontFamily()+'\";',t+=\"font-style: \"+this.style+\";\",t+=\"font-weight: \"+this.weight+\";\",t+=\"src:\"+e.join(\",\")+\";\",this.hasUnicodeRangeDefined()&&(t+=\"unicode-range: \"+this.getUnicodeRange()+\";\"),t+=\"}\"),t},r.prototype.loadStyle=function(t){t=t||function(){};var e=function(e){t(e||\"Failed to load font files.\")};if(this.isCustom()||this.isGoogle()&&!this.useGoogleFontsAPI()||this.isMonotype())o(this,t,e);else if(this.isAdobe())if(\"string\"==typeof this.projectId){var n=\"https://use.typekit.net/\"+this.projectId+\".css\";s(this,n,t,e)}else e(\"Missing Adobe web project id.\");else if(this.useGoogleFontsAPI()){var r=i(this),n=\"https://fonts.googleapis.com/css?family=\"+r;this.hasSubsetStringDefined()&&(n+=\"&text=\"+encodeURIComponent(this.getSubsetString())),s(this,n,t,e)}else this.isSystem()?t():e(\"Invalid or unsupported provider.\")},Object.defineProperty(r,\"useCSSFontLoadingAPI\",{value:l}),window.FontBase=r}();;\nvar ScreenNodeTransition={replace:function(t,e,r,s,i,a){r.style.opacity=0,r.style.display=\"block\",s.style.display=\"block\",e.style.display=\"none\",nextFrame(function(){r.style.opacity=1,t.style.opacity=0,nextFrame(function(){t.style.display=\"none\",nextFrame(a||noop)})})},fade:function(t,e,r,s,i,a){function n(){celtra.styler.css(r,\"transition\",\"\"),celtra.styler.css(t,\"transition\",\"\"),t.style.display=\"none\",nextFrame(a||noop)}r.style.opacity=0,r.style.display=\"block\",s.style.display=\"block\",e.style.display=\"none\",once(t,\"transitionend\",n),nextFrame(function(){celtra.styler.css(t,\"transition\",\"opacity \"+i.duration+\"ms ease-out\"),celtra.styler.css(r,\"transition\",\"opacity \"+i.duration+\"ms ease-out\"),nextFrame(function(){r.style.opacity=1,t.style.opacity=0})})},slide:function(t,e,r,s,i,a){var n={transition:\"all \"+i.duration+\"ms ease-out\"};switch(i.direction||\"west\"){case\"north\":n.startingFrom=\"translateY(0)\",n.endingFrom=\"translateY(\"+-i.unitSize.height+\"px)\",n.startingTo=\"translateY(\"+i.unitSize.height+\"px)\",n.endingTo=\"translateY(0)\";break;case\"south\":n.startingFrom=\"translateY(0)\",n.endingFrom=\"translateY(\"+i.unitSize.height+\"px)\",n.startingTo=\"translateY(\"+-i.unitSize.height+\"px)\",n.endingTo=\"translateY(0)\";break;case\"east\":n.startingFrom=\"translateX(0)\",n.endingFrom=\"translateX(\"+i.unitSize.width+\"px)\",n.startingTo=\"translateX(\"+-i.unitSize.width+\"px)\",n.endingTo=\"translateX(0)\";break;case\"west\":n.startingFrom=\"translateX(0)\",n.endingFrom=\"translateX(\"+-i.unitSize.width+\"px)\",n.startingTo=\"translateX(\"+i.unitSize.width+\"px)\",n.endingTo=\"translateX(0)\"}n.startingFromOpacity=1,n.startingToOpacity=0,n.endingFromOpacity=0,n.endingToOpacity=1,this._runTransition(t,e,r,s,n,i.duration,a)},flip:function(t,e,r,s,i,a){var n={transition:\"all \"+i.duration+\"ms ease-out\"},o=\"perspective(\"+2*i.unitSize.width+\"px) \";switch(i.direction||\"west\"){case\"north\":n.startingFrom=o+\"rotateX(0)\",n.endingFrom=o+\"rotateX(180deg)\",n.startingTo=o+\"rotateX(-180deg)\",n.endingTo=o+\"rotateX(0)\";break;case\"south\":n.startingFrom=o+\"rotateX(0)\",n.endingFrom=o+\"rotateX(-180deg)\",n.startingTo=o+\"rotateX(180deg)\",n.endingTo=o+\"rotateX(0)\";break;case\"east\":n.startingFrom=o+\"rotateY(0)\",n.endingFrom=o+\"rotateY(180deg)\",n.startingTo=o+\"rotateY(-180deg)\",n.endingTo=o+\"rotateY(0)\";break;case\"west\":n.startingFrom=o+\"rotateY(0)\",n.endingFrom=o+\"rotateY(-180deg)\",n.startingTo=o+\"rotateY(180deg)\",n.endingTo=o+\"rotateY(0)\"}celtra.styler.css(t.parentNode,\"transformStyle\",\"preserve-3d\"),celtra.styler.css(t,\"backfaceVisibility\",\"hidden\"),celtra.styler.css(e,\"backfaceVisibility\",\"hidden\"),celtra.styler.css(r,\"backfaceVisibility\",\"hidden\"),celtra.styler.css(s,\"backfaceVisibility\",\"hidden\"),celtra.styler.css(t,\"transformOrigin\",\"50% 50% 0\"),celtra.styler.css(e,\"transformOrigin\",\"50% 50% 0\"),celtra.styler.css(r,\"transformOrigin\",\"50% 50% 0\"),celtra.styler.css(s,\"transformOrigin\",\"50% 50% 0\"),this._runTransition(t,e,r,s,n,i.duration,function(){celtra.styler.css(t.parentNode,\"transformStyle\",\"\"),celtra.styler.css(t,\"backfaceVisibility\",\"\"),celtra.styler.css(e,\"backfaceVisibility\",\"\"),celtra.styler.css(r,\"backfaceVisibility\",\"\"),celtra.styler.css(s,\"backfaceVisibility\",\"\"),celtra.styler.css(t,\"transform\",\"\"),celtra.styler.css(e,\"transform\",\"\"),celtra.styler.css(r,\"transform\",\"\"),celtra.styler.css(s,\"transform\",\"\"),celtra.styler.css(t,\"transformOrigin\",\"\"),celtra.styler.css(e,\"transformOrigin\",\"\"),celtra.styler.css(r,\"transformOrigin\",\"\"),celtra.styler.css(s,\"transformOrigin\",\"\"),nextFrame(a||noop)})},cube:function(t,e,r,s,i,a){var n={transition:\"all \"+i.duration+\"ms ease-out\"},o=\"perspective(\"+2*i.unitSize.width+\"px) \";switch(i.direction||\"west\"){case\"north\":n.startingFrom=o+\"translateZ(\"+-i.unitSize.height/2+\"px) rotateX(0) \",n.endingFrom=o+\"translateZ(\"+-i.unitSize.height/2+\"px) rotateX(90deg) \",n.startingTo=o+\"translateZ(\"+-i.unitSize.height/2+\"px) rotateX(-90deg)\",n.endingTo=o+\"translateZ(\"+-i.unitSize.height/2+\"px) rotateX(0) \";break;case\"south\":n.startingFrom=o+\"translateZ(\"+-i.unitSize.height/2+\"px) rotateX(0) \",n.endingFrom=o+\"translateZ(\"+-i.unitSize.height/2+\"px) rotateX(-90deg)\",n.startingTo=o+\"translateZ(\"+-i.unitSize.height/2+\"px) rotateX(90deg) \",n.endingTo=o+\"translateZ(\"+-i.unitSize.height/2+\"px) rotateX(0) \";break;case\"east\":n.startingFrom=o+\"translateZ(\"+-i.unitSize.width/2+\"px) rotateY(0) \",n.endingFrom=o+\"translateZ(\"+-i.unitSize.width/2+\"px) rotateY(90deg) \",n.startingTo=o+\"translateZ(\"+-i.unitSize.width/2+\"px) rotateY(-90deg)\",n.endingTo=o+\"translateZ(\"+-i.unitSize.width/2+\"px) rotateY(0) \";break;case\"west\":n.startingFrom=o+\"translateZ(\"+-i.unitSize.width/2+\"px) rotateY(0) \",n.endingFrom=o+\"translateZ(\"+-i.unitSize.width/2+\"px) rotateY(-90deg)\",n.startingTo=o+\"translateZ(\"+-i.unitSize.width/2+\"px) rotateY(90deg) \",n.endingTo=o+\"translateZ(\"+-i.unitSize.width/2+\"px) rotateY(0) \"}var l=t.style.overflow,c=e.style.overflow,y=r.style.overflow,d=s.style.overflow;switch(celtra.styler.css(t.parentNode,\"transformStyle\",\"preserve-3d\"),t.style.overflow=e.style.overflow=\"hidden\",r.style.overflow=s.style.overflow=\"hidden\",celtra.styler.css(t,\"backfaceVisibility\",\"hidden\"),celtra.styler.css(e,\"backfaceVisibility\",\"hidden\"),celtra.styler.css(r,\"backfaceVisibility\",\"hidden\"),celtra.styler.css(s,\"backfaceVisibility\",\"hidden\"),i.direction||\"west\"){case\"north\":case\"south\":celtra.styler.css(t,\"transformOrigin\",\"50% 50% \"+-i.unitSize.height/2+\"px\"),celtra.styler.css(e,\"transformOrigin\",\"50% 50% \"+-i.unitSize.height/2+\"px\"),celtra.styler.css(r,\"transformOrigin\",\"50% 50% \"+-i.unitSize.height/2+\"px\"),celtra.styler.css(s,\"transformOrigin\",\"50% 50% \"+-i.unitSize.height/2+\"px\");break;case\"east\":case\"west\":celtra.styler.css(t,\"transformOrigin\",\"50% 50% \"+-i.unitSize.width/2+\"px\"),celtra.styler.css(e,\"transformOrigin\",\"50% 50% \"+-i.unitSize.width/2+\"px\"),celtra.styler.css(r,\"transformOrigin\",\"50% 50% \"+-i.unitSize.width/2+\"px\"),celtra.styler.css(s,\"transformOrigin\",\"50% 50% \"+-i.unitSize.width/2+\"px\")}this._runTransition(t,e,r,s,n,i.duration,function(){celtra.styler.css(t.parentNode,\"transformStyle\",\"\"),t.style.overflow=l,e.style.overflow=c,r.style.overflow=y,s.style.overflow=d,celtra.styler.css(t,\"transformOrigin\",\"\"),celtra.styler.css(e,\"transformOrigin\",\"\"),celtra.styler.css(r,\"transformOrigin\",\"\"),celtra.styler.css(s,\"transformOrigin\",\"\"),celtra.styler.css(t,\"backfaceVisibility\",\"\"),celtra.styler.css(e,\"backfaceVisibility\",\"\"),celtra.styler.css(r,\"backfaceVisibility\",\"\"),celtra.styler.css(s,\"backfaceVisibility\",\"\"),nextFrame(a||noop)})},_runTransition:function(t,e,r,s,i,a,n){function o(){l||(l=!0,celtra.styler.css(r,\"transition\",\"\"),celtra.styler.css(s,\"transition\",\"\"),celtra.styler.css(t,\"transition\",\"\"),celtra.styler.css(e,\"transition\",\"\"),celtra.styler.css(r,\"transform\",\"\"),celtra.styler.css(s,\"transform\",\"\"),celtra.styler.css(t,\"transform\",\"\"),celtra.styler.css(e,\"transform\",\"\"),t.style.display=e.style.display=\"none\",t.style.opacity=e.style.opacity=r.style.opacity=s.style.opacity=\"\",nextFrame(n||noop))}celtra.styler.css(t,\"transform\",i.startingFrom),celtra.styler.css(e,\"transform\",i.startingFrom),celtra.styler.css(r,\"transform\",i.startingTo),celtra.styler.css(s,\"transform\",i.startingTo),t.style.opacity=e.style.opacity=\"undefined\"==typeof i.startingFromOpacity?1:i.startingFromOpacity,r.style.opacity=s.style.opacity=\"undefined\"==typeof i.startingToOpacity?1:i.startingToOpacity,r.style.display=s.style.display=\"block\";var l=!1,c=this._runOnce(o);once(r,\"transitionend\",c),setTimeout(function(){celtra.styler.css(r,\"transition\",i.transition),celtra.styler.css(t,\"transition\",i.transition),celtra.styler.css(s,\"transition\",i.transition),celtra.styler.css(e,\"transition\",i.transition),nextFrame(function(){l||(celtra.styler.css(t,\"transform\",i.endingFrom),celtra.styler.css(e,\"transform\",i.endingFrom),celtra.styler.css(r,\"transform\",i.endingTo),celtra.styler.css(s,\"transform\",i.endingTo),t.style.opacity=e.style.opacity=\"undefined\"==typeof i.endingFromOpacity?1:i.endingFromOpacity,r.style.opacity=s.style.opacity=\"undefined\"==typeof i.endingToOpacity?1:i.endingToOpacity)}),setTimeout(c,a+150)},20)},run:function(t,e,r,s,i){var a=this._getSupportedAnimation(i.animation||\"replace\");if(!(a in this))throw new Error(\"The transition function does not exist!\");this[a].apply(this,arguments)},_getSupportedAnimation:function(t){return!android(\"4\")||window.navigator.userAgent.match(/Chrome.*(Mobile)? Safari/)||\"cube\"!==t&&\"flip\"!==t?t:\"fade\"},_runOnce:function(t){var e=!1;return function(){return e?void 0:(e=!0,t())}}};;\nvar ScreenTransitioner={goingToScreen:null,_masterShown:!1,goToScreen:function(e,n,t){var i=Array.prototype.slice.apply(arguments);if(!this.isAppearing)return void this.once(\"appeared\",function(){this.goToScreen.apply(this,i)}.bind(this));var r=function(){this._preloadReachableScreens(),t&&t()}.bind(this);if(!e)return r();if(!e.loaded)return void e.getNode(function(){this.goToScreen.apply(this,i)}.bind(this));var s=this.currentScreen;return n=n||{},this.goingToScreen?r():(this.goingToScreen=e,void e.triggerBeforeAppear(function(){this.initiateScreenTransition(e,n,function(){this.goingToScreen=null,this.currentScreen=e,s&&(s.disappear(),s.exitRenderTree()),this._masterShown||(this._masterShown=!0,this.master.enterRenderTree(),this.master.appear()),this.currentScreen.enterRenderTree(),this.currentScreen.appear(),r()}.bind(this))}.bind(this)))},initiateScreenTransition:function(e,n,t){if(n=n||{},t=t||noop,this.visibleScreen==e)return t();this.visibleScreen=e;var i=e===this.loadingScreen;if(i&&e.loaded)this._screenTransition(e.getNode(),null,n,t);else if(e.loaded&&this.master.loaded)this.loadingScreen&&(this.loadingScreen.getNode().style.display=\"none\"),this._screenTransition(e.getNode(),this.master.getNode(),n,t);else{Logger(\"unit\").warn(\"Screens should be loaded but were not\");var r,s,o,a=function(){r--,r||this._screenTransition(s,o,n,t)};i?(s=this.loadingScreen.getNode(a.bind(this)),o=null,r=1):(s=e.getNode(a.bind(this)),o=this.master.getNode(a.bind(this)),r=2)}},_screenTransition:function(e,n,t,i){function r(){s||(s=!0,i())}if(e.style.display=\"none\",n&&(this._masterClone||this._createMasterClone(),this.screenHolder.appendChild(this._masterClone),n.parentNode||this.screenHolder.appendChild(n),this._masterClone.style.zIndex=n.style.zIndex=-1),e&&!e.parentNode&&this.screenHolder.appendChild(e),n&&(this._masterClone.style.display=\"block\",n.style.display=\"none\"),null!=this.currentScreen)t.unitSize=extend({},this.size),ScreenNodeTransition.run(this.currentScreen.node,this._masterClone,e,n,t,function(){n.style.display=\"block\",this._masterClone.display=\"none\",i()}.bind(this));else{n&&(n.style.display=\"block\",this._masterClone.style.display=\"none\"),e.style.display=\"block\";var s=!1;nextFrame(r),defer(r)}},_preloadReachableScreens:function(){setTimeout(function(){var e=[];Object.keys(this.currentScreen.dynamicReachableScreenConditions).forEach(function(n){var t=n.split(\"/\"),i=creative.experiments.get(t[0],t.slice(1));null!=i&&Object.keys(this.currentScreen.dynamicReachableScreenConditions[n]).forEach(function(t){t!=i.chosenVariant&&(e=e.concat(this.currentScreen.dynamicReachableScreenConditions[n][t]))}.bind(this))}.bind(this)),this.currentScreen.reachableScreens.concat(this.master.reachableScreens).forEach(function(n){var t=-1==e.indexOf(n.localId.toString());t&&n.getNode()}.bind(this))}.bind(this),0)},_createMasterClone:function(){return this._masterClone&&this._masterClone.parentNode&&this._masterClone.parentNode.removeChild(this._masterClone),this._masterClone=this.master.getNode().cloneNode(!0),this._masterClone.style.display=\"none\",this._masterClone.style.zIndex=-1,this._masterClone}};;\nfunction 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};;\nfunction 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)};;\n!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);;\nfunction 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};;\nfunction ThresholdObserver(e){this.threshold=e,this._value=null}extend(ThresholdObserver.prototype,EventEmitter),Object.defineProperty(ThresholdObserver.prototype,\"value\",{get:function(){return this._value},set:function(e){if(null!==this._value&&this._value!==e){var t=this._value-this.threshold,h=e-this.threshold;0>=t*h&&(0>t?this.emit(\"up\"):0>h&&this.emit(\"down\"))}this._value=e}});;\nfunction BaseCreativeUnit(){}inherit(BaseCreativeUnit,View),BaseCreativeUnit.IGNORABLES=[\"INPUT\",\"SELECT\",\"TEXTAREA\",\"BUTTON\"],BaseCreativeUnit.prototype.awake=function(){BaseCreativeUnit.uber.awake.call(this),this._availableSize={width:0,height:0},this._isRendering=!1,this._engagementTracker=null,this._rxState=null,this._rxStateCopies=[]},BaseCreativeUnit.prototype.createNode=function(){return Logger(\"unit\").log(\"Starting to load \"+this),this.on(\"loaded\",creative.adapter.perf.start(\"CreativeUnit.load\").end),creative.experiments.get(\"TrackingLoadingTimes\")&&this.once(\"_firstScreenLoaded\",function(){var e=Date.now()-1e3*creative.runtimeParams.payloadJsClientTimestamp;if(3e4>e){var t={unitName:this.name};creative.aggregatorTracking.trackAggregator(\"unitLoadTime\",e,t),creative.aggregatorTracking.trackAggregator(\"unitLoadSuccesses\",t)}}.bind(this)),creative.adapter.on(\"mediaStopRequested\",function(e){this.emit(\"mediaStopRequested\",e)}.bind(this)),this.unitDiv=BaseCreativeUnit.uber.createNode.call(this),this._engagementTracker=new EngagementTracker(this.unitDiv,creative),Tapper(this.unitDiv,this.useClickForTap),attach(this.unitDiv,\"touchstart\",this._handleTouchStart.bind(this)),attach(this.unitDiv,\"touchmove\",this._handleTouchMove.bind(this)),this.unitDiv},BaseCreativeUnit.prototype.setAvailableSize=function(e,t){var r=this._availableSize.width!=e||this._availableSize.height!=t;return this._availableSize.width=e,this._availableSize.height=t,r},BaseCreativeUnit.prototype.getAvailableSize=function(){return{width:this._availableSize.width,height:this._availableSize.height}},BaseCreativeUnit.prototype.enterRenderTree=function(){throw new Error(\"Not implemented\")},BaseCreativeUnit.prototype.exitRenderTree=function(){throw new Error(\"Not implemented\")},BaseCreativeUnit.prototype.finishedLoading=function(){BaseCreativeUnit.uber.finishedLoading.call(this),Logger(\"unit\").log(\"Finished loading \"+this)},BaseCreativeUnit.prototype._handleTouchStart=function(e){if(!this.swipeable&&!creative.adapter.useNativeClickForTapDetection){for(var t=e.target;1!=t.nodeType;)t=t.parentNode;var r=function(){for(;t!==this.unitDiv;){if(t.className&&hasClass(t,\"map-container\"))return!0;t=t.parentNode}return!1}.bind(this);-1!=BaseCreativeUnit.IGNORABLES.indexOf(t.nodeName)||r()||e.preventDefault()}},BaseCreativeUnit.prototype._handleTouchMove=function(e){this.swipeable||e.preventDefault()},BaseCreativeUnit.prototype.createRxState=function(){this._rxState=this._generateNewRxStateObject()},BaseCreativeUnit.prototype._generateNewRxStateObject=function(){return new StateObject({left:null,top:null,right:null,bottom:null,width:null,height:null,vw:null,vh:null,x:null,y:null,pageYOffset:null})},BaseCreativeUnit.prototype.updateRxState=function(e){if(this._rxState){var t=e.getBoundingClientRect(),r=e.ownerDocument.defaultView;this._rxState.left=~~t.left,this._rxState.top=~~t.top,this._rxState.right=~~t.right,this._rxState.bottom=~~t.bottom,this._rxState.width=~~t.width,this._rxState.height=~~t.height,this._rxState.vw=r.innerWidth,this._rxState.vh=r.innerHeight,this._rxState.pageYOffset=r.pageYOffset,this._rxState.x=~~(t.left+t.width/2-r.innerWidth/2),this._rxState.y=~~(t.top+t.height/2-r.innerHeight/2),this._rxStateCopies.forEach(function(e){e.copyFrom(this._rxState)}.bind(this))}},BaseCreativeUnit.prototype.getRxStateObject=function(){if(this._rxState){var e=this._generateNewRxStateObject();return e.copyFrom(this._rxState),this._rxStateCopies.push(e),e}},BaseCreativeUnit.prototype.goToScreenAction=function(){throw new Error(\"Not implemented\")},BaseCreativeUnit.prototype.alertAction=function(e,t,r){this.alert({message:t.text},r)},BaseCreativeUnit.prototype.checkOrientationAction=function(e,t,r){var a,i=creative.adapter.orientation;0===i||180===i?a=t.onPortrait:(-90==i||90==i)&&(a=t.onLandscape),a?a(e,r):r()},BaseCreativeUnit.prototype.checkOrientationActionDryRun=BaseCreativeUnit.prototype.checkOrientationAction,BaseCreativeUnit.prototype._processURLParams=function(e){return\"string\"!=typeof e?e:creative.macros(e)},BaseCreativeUnit.prototype._addUrlAppendage=function(e){if(creative.urlOpenedUrlAppendage){var t=this.size.width+\"x\"+this.size.height,r=function(e){return e.indexOf(\"?\")>=0};return e+(r(e)?\"&\":\"?\")+creative.urlOpenedUrlAppendage.replace(new RegExp(\"{celtraFirstUnitSize}\",\"ig\"),t)}return e},BaseCreativeUnit.prototype.openBrowser=function(e,t,r,a){return t?void creative.adapter.trackEventsAndOpenBrowser(this._processURLParams(t),creative.shouldClickThroughToNewWindow(e),r,a):(r||noop)()},BaseCreativeUnit.prototype.openClickThroughDestinationAction=function(e,t,r){var a=creative.clickThroughDestinationUrl,i=creative.shouldClickThroughToNewWindow(e),n=!1,o=2e3,s=\"clickThroughDestinationOpened\",c=function(){n||(n=!0,creative.adapter.openBrowser(this._processURLParams(a),i))}.bind(this);if(a&&-1==[\"http://\",\"https://\"].indexOf(a)){var l=function(e){return e.indexOf(\"itunes.apple.com/us/app/\")>0},d=function(e){return 0===e.indexOf(\"market://details?id=\")};creative.adapter._stopAllMedia(),l(a)||d(a)?(e.track({name:s,appUri:a}),e.trackClickThrough(),creative.adapter.trackingCenter.flush(),creative.adapter.getApp(this._processURLParams(a))):(a=this._addUrlAppendage(a),e.track({name:s,url:a}),e.trackClickThrough(),!creative.adapter.canOpenUrlInSameWindow||i?(creative.adapter.trackingCenter.flush(),c()):(creative.adapter.trackingCenter.flush(c),defer(c,o)))}else e.track({name:\"userError\",userErrorId:\"exitUriIsEmpty\"});e.screen&&creative.adapter.sendToEventMonitor(s,t.triggerId,e.screen.name,a||\"\",null,e.initiatedBeforeScreenShown()),r()},BaseCreativeUnit.prototype.goToURLAction=function(e,t,r){var a=creative.urlOpenedOverrideUrls&&creative.urlOpenedOverrideUrls[t.reportLabel]||t.url,i=creative.shouldClickThroughToNewWindow(e),n=!1,o=2e3,s=function(){n||(n=!0,creative.adapter.openBrowser(this._processURLParams(a),i))}.bind(this),c=(creative.experiments.get(\"OpenBrowserRefactor\")||{}).chosenVariant,l=(creative.experiments.get(\"WindowOpenWithDelay\")||{}).chosenVariant,d=function(e,t,r){c&&creative.aggregatorTracking.trackAggregator(\"openBrowserRefactor\",1,{branch:e,logic:t,environment:r})};if(!a||[\"http://\",\"https://\"].indexOf(a)>-1)return e.track({name:\"userError\",userErrorId:\"exitUriIsEmpty\"}),r();a=this._addUrlAppendage(a);var p=\"urlOpened\";if(creative.adapter._stopAllMedia(),e.track({name:p,url:a,label:t.reportLabel}),e.trackClickThrough(),deviceInfo.browser.ie()||deviceInfo.browser.edge())!creative.adapter.canOpenUrlInSameWindow||i?(d(\"new-window\",\"flush-and-open\",\"desktop-windows\"),creative.adapter.trackingCenter.flush(),s()):(d(\"same-window\",\"flush-then-open\",\"desktop-windows\"),creative.adapter.trackingCenter.flush(s),defer(s,o));else if(\"on\"==c)!creative.adapter.canOpenUrlInSameWindow||i?(d(\"new-window\",\"flush-and-open\",\"all-except-desktop-windows\"),creative.adapter.trackingCenter.flush(),s()):(d(\"same-window\",\"flush-then-open\",\"all-except-desktop-windows\"),creative.adapter.trackingCenter.flush(s),defer(s,o));else if(!creative.adapter.canOpenUrlInSameWindow||i){d(\"new-window\",\"wrap+open\",\"all-except-desktop-windows\"),l&&creative.aggregatorTracking.trackAggregator(\"windowOpenWithDelay\",1,{delay:l}),c&&creative.aggregatorTracking.trackAggregator(\"openBrowserRefactorFlushVsWrap\",1,{trackingWith:\"wrap\"});var u=creative.wrapRedirectPageUrl(this._processURLParams(a));c&&(creative.aggregatorTracking.trackAggregator(\"openBrowserRefactorFlushVsWrap\",1,{trackingWith:\"flush\"}),creative.adapter.trackingCenter.flush()),\"undefined\"==typeof l||\"control\"===l?creative.adapter.openBrowser(u,i):setTimeout(function(){creative.adapter.openBrowser(u,i)},0)}else d(\"same-window\",\"wrap+open\",\"all-except-desktop-windows\"),creative.adapter.openBrowser(creative.wrapRedirectPageUrl(this._processURLParams(a)),i);creative.adapter.sendToEventMonitor(p,t.triggerId,e.screen.name,a,t.reportLabel,e.initiatedBeforeScreenShown()),r()},BaseCreativeUnit.prototype.facebookURLAction=function(e,t,r){if(!t.url)return r();var a=\"facebookShareAttempt\";creative.adapter._stopAllMedia(),e.track({name:a,url:t.url,label:t.reportLabel}),e.trackClickThrough();var i=\"http://m.facebook.com/sharer.php?u=\"+encodeURIComponent(t.url);creative.adapter.openBrowser(creative.wrapRedirectPageUrl(i),creative.shouldClickThroughToNewWindow(e)),creative.adapter.sendToEventMonitor(a,t.triggerId,e.screen.name,i,t.reportLabel,e.initiatedBeforeScreenShown()),r()},BaseCreativeUnit.prototype.callURLAction=function(e,t,r){if(!t.url)return r();var a=this._processURLParams(t.url),i=new Image;i.onload=i.onerror=function(){r()},i.src=a},BaseCreativeUnit.prototype.displayImageAction=function(e,t,r){if(!t.file)return r();var a=function(e,a){var i=document.createElement(\"div\");i.className=\"celtra-display-image-overlay touchable\",i.style.backgroundImage='url(\"'+t.file.getUrl()+'\")',this.unitDiv.appendChild(i),(e>this.size.width||a>this.size.height)&&(i.style.backgroundSize=\"contain\"),t.color&&(i.style.backgroundColor=t.color),attach(i,\"tap\",function(){i.parentNode.removeChild(i),r()},!1);var n=document.createElement(\"div\");n.className=\"celtra-back-button touchable \"+this.alignBackButtonHorizontal,i.appendChild(n)}.bind(this);if(t.file.meta)a(t.file.meta.width,t.file.meta.height);else{var i=new Image;i.onload=function(){a(this.width,this.height)},i.onerror=function(){return console.error(\"Couldn't display image: \"+t.file.getUrl()),r()},i.src=t.file.getUrl()}},BaseCreativeUnit.prototype.saveImageAction=function(e,t,r){function a(a,n){var o=a.getOriginalUrl(),c=a.name,l=a.blobHash;if(i(l),creative.adapter.canSaveImage())creative.adapter.trackingCenter.flush(function(){var a=\"shared.png\";\"undefined\"!=typeof c?a=c:\"string\"==typeof n&&n.trim().length>0&&(a=n.trim()+\".png\"),creative.adapter.saveImage(o,encodeURIComponent(a),r);var i=n||c;creative.adapter.sendToEventMonitor(s,t.triggerId,e.screen.name,i,t.reportLabel,e.initiatedBeforeScreenShown())});else{var d=new SaveImageDialog(creative.adapter,creative.resourceUrl,o);d.show(r)}}function i(r){e.track({name:s,blobHash:r,label:t.reportLabel}),e.trackClickThrough()}function n(){creative.adapter.createPlacements({preloader:{attachment:\"body\",positioning:\"screen\",type:\"layer\"}},function(){var e=creative.adapter.placements.preloader;e.setZIndex(\"max\"),e.setSize(\"100%\",\"100%\"),e.setPosition(0,0);var t=e.createElement(\"link\");t.rel=\"stylesheet\",t.type=\"text/css\",t.href=creative.resourceUrl+\"runner/clazzes/PostBlobPreloader.css\",e.getContainer().appendChild(t);var r=e.createElement(\"div\");addClass(r,\"celtra-preloader-container\");var a=e.createElement(\"div\");addClass(a,\"celtra-preloader-image\"),a.style.backgroundImage=\"url(\"+creative.resourceUrl+\"runner/clazzes/CreativeUnit/preloader.png)\",r.appendChild(a),e.populate(r,function(){e.show()})})}function o(){creative.adapter.destroyPlacement(\"preloader\")}var s=\"imageSaveAttempted\";if(t.imageOrigin=t.imageOrigin?t.imageOrigin:\"asset\",\"component\"==t.imageOrigin&&t.component)if(t.component.file)a(t.component.file,t.component.name);else{var c=t.component.getField();if(null===c)return void r();if(-1===creative.runtimeParams.enabledServices.indexOf(\"contentSharing\"))return void this.alertAction(e,{text:\"This feature is not available in your region\"},r);var l=c.url,d=l.split(\",\")[1];n(),postBlob(d,function(e,i){if(o(),i>=200&&300>i){var n=JSON.parse(e),s=creative.cachedApiUrl+\"blobs/\"+n.hash+\"/shared.png\",c=new File(s);a(c,t.component.name)}else r()})}else\"asset\"==t.imageOrigin&&t.file?a(t.file):r()},BaseCreativeUnit.prototype.playSoundAction=function(e,t,r){if(!t.file)return r();var a=new Audio(t.file.getUrl());attach(a,\"ended\",function(){r()},!1),a.play()},BaseCreativeUnit.prototype.playVideoInPlayerAction=function(e,t,r){if(!t.file)return r();var a=creative.adapter.useFSVP,i=t.file.url?\"URL\":\"File\",n=new VideoContext(e,t.file,t.reportLabel);n.track({engineType:\"html5\",name:\"videoPlayAttempted\",trackable:a,filename:t.file.name,userInitiated:e.consideredUserInitiatedByBrowser,startMuted:!1,videoPlayerMode:\"fullscreen\",sourceType:i,source:\"URL\"==i?t.file.url:t.file.blobHash,label:t.reportLabel}),n.track({name:\"videoPresetSelected\",videoPreset:null}),creative.adapter.playVideoInPlayer(n,t,function(a){var i=(a?t.onSuccess:t.onFailure)||nullai;i(e,r)})},BaseCreativeUnit.prototype.playVideoInPlayerActionDryRun=function(e,t,r){return t.file?((t.onSuccess||nullai)(e,noop),(t.onFailure||nullai)(e,noop),void r()):r()},BaseCreativeUnit.prototype.playVideoFromURLAction=function(e,t,r){if(!t.url)return r();var a=t.file=new File(t.url),i=creative.adapter.useFSVP,n=a.url?\"URL\":\"File\";creative.adapter._stopAllMedia();var o=new VideoContext(e,a,t.reportLabel);o.track({engineType:\"html5\",name:\"videoPlayAttempted\",trackable:i,filename:null,userInitiated:e.consideredUserInitiatedByBrowser,startMuted:!1,videoPlayerMode:\"fullscreen\",sourceType:n,source:\"URL\"==n?a.url:a.blobHash,label:t.reportLabel}),o.track({name:\"videoPresetSelected\",videoPreset:null}),creative.adapter.playVideoInPlayer(o,t,function(a){var i=(a?t.onSuccess:t.onFailure)||nullai;i(e,r)})},BaseCreativeUnit.prototype.playVideoFromURLActionDryRun=function(e,t,r){return t.url?((t.onSuccess||nullai)(e,noop),(t.onFailure||nullai)(e,noop),void r()):r()},BaseCreativeUnit.prototype.vibrateAction=function(e,t,r){r()},BaseCreativeUnit.prototype.getAppAction=function(e,t,r){var a=(creative.runtimeParams.overrides||creative.runtimeParams).deviceInfo,i=function(e){return new RegExp(\"(^http(s)?://)|(^market://)\",\"i\").test(e)},n=function(){return new RegExp(\"^\\\\d+$\").test(t.appStoreUrl)?\"https://itunes.apple.com/app/id\"+t.appStoreUrl:(i(t.appStoreUrl)?\"\":\"http://\")+t.appStoreUrl},o=function(){return i(t.androidMarketAppId)?t.androidMarketAppId:android()||\"Android\"===a.osName?\"market://details?id=\"+t.androidMarketAppId:\"https://play.google.com/store/apps/details?id=\"+t.androidMarketAppId};creative.adapter._stopAllMedia();var s;if(creative.storeOpenedOverrideUrls[t.reportLabel]?s=creative.storeOpenedOverrideUrls[t.reportLabel]:t.appStoreUrl&&(ios()||-1!==[\"OSX\",\"IOS\"].indexOf(a.osName))?s=n():t.androidMarketAppId&&(s=o()),s&&-1==[\"http://\",\"https://\"].indexOf(s)){var c=!ios(\"9\",null),l=\"storeOpened\",d=2,p=function(){creative.adapter.getApp(this._processURLParams(s))}.bind(this),u=function(){if(!--d&&c){p();var r={};t.appStoreUrl&&(r.appStoreUrl=n()),t.androidMarketAppId&&(r.androidMarketAppId=o()),creative.adapter.sendToEventMonitor(l,t.triggerId,e.screen.name,r,t.reportLabel,e.initiatedBeforeScreenShown())}}.bind(this);e.track({name:l,appUri:s,label:t.reportLabel},u),e.trackClickThrough(u),c||setTimeout(p,0)}else e.track({name:\"userError\",userErrorId:\"exitUriIsEmpty\"});r()},BaseCreativeUnit.prototype.callPhoneAction=function(e,t,r){if(!t.number)return r();creative.adapter._stopAllMedia();var a=\"phoneCalled\",i=deviceInfo.os.ios()&&deviceInfo.browser.safari(),n=function(){creative.adapter.callPhone(t.number),creative.adapter.sendToEventMonitor(a,t.triggerId,e.screen.name,t.number,t.reportLabel,e.initiatedBeforeScreenShown())};e.track({name:a,number:t.number,label:t.reportLabel}),e.trackClickThrough(),i?(creative.adapter.trackingCenter.flush(),defer(n)):creative.adapter.trackingCenter.flush(n),r()},BaseCreativeUnit.prototype.answerSurveyQuestion=function(e,t,r){var a=[\"answerIds\",\"questionId\",\"surveyId\",\"answers\"],i=/[0-9a-f]{8}/;a.forEach(function(e){if(\"answerIds\"===e){if(!(t.answerIds instanceof Array))throw new Error(\"args.answerIds must be an array\");t.answerIds.forEach(function(e){if(!i.test(e))throw new Error(\"args.answerIds must contain Ids that have hexadecimal formatted string containing 8 characters\")})}else if(\"answers\"===e){if(!(t.answers instanceof Array)||t.answers.length!==t.answerIds.length)throw new Error(\"args.\"+e+\" length should be the same as args.answerIds\")}else if(!i.test(t[e]))throw new Error(\"args.\"+e+\" must be hexadecimal formatted string containing 8 characters\")}),e.track({name:\"surveyQuestionAnswered\",answerIds:t.answerIds,questionId:t.questionId,surveyId:t.surveyId,surveyVersion:t.surveyVersion,answerIdTextMappings:t.answers.map(function(e){return{id:e.id,text:e.text,orderIndex:e.orderIndex}})}),r()},BaseCreativeUnit.prototype.saveTheDateAction=function(e,t,r){function a(e){var r;return t.allDay?(r=new CDate,r.value=e.getFullYear()+\"-\"+zeroPad(e.getMonth()+1)+\"-\"+zeroPad(e.getDate())):(e=\"my\"===t.timezone?e.getUTCFullYear()+\"-\"+zeroPad(e.getUTCMonth()+1)+\"-\"+zeroPad(e.getUTCDate())+\" \"+zeroPad(e.getUTCHours())+\":\"+zeroPad(e.getUTCMinutes())+\":\"+zeroPad(e.getUTCSeconds()):e.getFullYear()+\"-\"+zeroPad(e.getMonth()+1)+\"-\"+zeroPad(e.getDate())+\" \"+zeroPad(e.getHours())+\":\"+zeroPad(e.getMinutes())+\":\"+zeroPad(e.getSeconds()),r=new CDateTime,r.value=e,r.tz=t.timezone),r}return t.eventName&&t.location&&t.start?(t.end=t.end||new Date(t.start.getTime()+36e5),t.timezone=t.timezone||\"my\",t.end0?t[0]:null};;\n!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);;\n!function(e){\"use strict\";var t={ambience:\"Ambience\",animatey:\"Animatey\",abtest:\"Best\",basket:\"Basket\",button:\"Button\",canvas:\"Canvas\",celebration:\"Celebration\",checkbox:\"CheckBox\",feedbasedchoice:\"ChoiceFeed\",countdown:\"Countdown\",draggy:\"Draggy\",dropdown:\"Dropdown\",dynamiccontent:\"DynamicContent\",facebookshare:\"FacebookShareButton\",fallback:\"Fallback\",frame:\"Frame\",flippy:\"Flippy\",group:\"Group\",gyro:\"Gyro\",hotspot:\"Hotspot\",input:\"Input\",map:\"Map\",transitions:\"Transitions\",mastervideo:\"MasterVideo\",nearby:\"Nearby\",painty:\"Painty\",pannable:\"Pannable\",particles:\"Particle\",picture:\"Picture\",puzzle:\"Puzzle\",shapey:\"Shapey\",smoke:\"Smoke\",stack:\"Stack\",stopwatch:\"Stopwatch\",locatorclassic:\"StoreLocator2\",locator:\"StoreLocator3\",swipeygallery:\"Swipey\",swipeygroup:\"SwipeyGroup\",takephoto:\"TakePhotoButton\",texty:\"Texty\",twitterfeed:\"TwitterFeed\",twittershare:\"TwitterShareButton\",inlinevideo:\"Video\",\"360view\":\"View360\",\"360video\":\"Video360\",\"360\u00b0video\":\"Video360\",weather:\"Weather\",whatsappshare:\"WhatsAppShareButton\",wipeable:\"Wipeable\",youtube:\"Youtube\",scene:\"Scene\",brandtracksurvey:\"BrandTrackSurvey\",brandtrackquestion:\"BrandTrackQuestion\",customcode:\"CustomCode\",videoasset:\"VideoAsset\"},n=function(e){return e=e.toLowerCase().replace(/\\W+/g,\"\"),e in t?t[e]:\"\"},o=function(e,t){function n(i){t&&a.length>0||i.forEach(function(t){e(t)&&a.push(t),t.getActiveContainers().forEach(function(e){n(e.objects),o(e.scenes)})})}function o(n){!n||t&&a.length>0||n.forEach(function(t){e(t)&&a.push(t)})}var a=[];return\"Screen\"==this.constructor.name?(n(this.objects),o(this.scenes)):\"function\"==typeof this.getActiveContainers&&this.getActiveContainers().forEach(function(e){n(e.objects),o(e.scenes)}),a},a=function(e){var t=o.call(this,e,!0);return t.length>0?t[0]:null},i=function(e){return function(t){return\"undefined\"==typeof e||t.name==e}},r={findAll:function(e){return o.call(this,i(e))},findByType:function(e){var t=[];return\"undefined\"==typeof e?t:o.call(this,function(t){return t.constructor.name==n(e)})},findByLocalId:function(e){return a.call(this,function(t){return t.localId==e})},find:function(e){return a.call(this,i(e))}};e.DiscoverableTrait=r}(window);;\n!function(e){\"use strict\";function t(e,t){var i=d[e]||{};return i[t]||[]}function i(e){var t=\"string\"==typeof e?e.split(\"/\"):[];if(!(t.length<2))return t[1]}function r(e){if(\"undefined\"==typeof o[e]&&(o[e]={type:\"unknown\",rows:[]}),0===e.indexOf(\"LocationTableImplicitField\")&&\"unknown\"===o[e].type){var t=\"text\";\"/website\"===e.slice(-8)&&(t=\"url\"),o[e].type=t}return o[e]}function n(){return u?o:(creative.runtimeParams.dynamicContent.forEach(function(e){e.rows.forEach(function(e,t){var i=e.fieldValues;Object.keys(i).forEach(function(e){var n=r(e),d=i[e].metaData,o=i[e].value;n.rows[t]={metadata:\"object\"==typeof d?JSON.parse(JSON.stringify(d)):null,value:o}})}),e.fields.forEach(function(t){var i=\"CustomFeedField/\"+t.id,n=r(i);n.id=t.id,n.feedId=e.feedId,n.name=t.name,n.type=t.fieldType})}),u=!0,o)}var d={choice:{checkChoiceFeed:[\"feedFieldKey\"],ChoiceFeed:[\"choiceFeedFieldKey\"]},color:{Shapey:[\"backgroundColorFeedFieldKey\"],Texty:[\"textColorFeedFieldKey\"]},font:{Texty:[\"textFontFeedFieldKey\"]},html:{CustomCode:[\"htmlContentFeedFieldKey\"]},image:{Picture:[\"imageSourceFeedFieldKey\"],Swipey:[\"contentItemsFeedFieldKey\"],Video:[\"posterImageFeedFieldKey\"]},text:{Texty:[\"textContentFeedFieldKey\"]},url:{goToFeedURL:[\"feedFieldKey\"]},video:{MasterVideo:[\"videoSourceFeedFieldKey\"],VideoAsset:[\"videoSourceFeedFieldKey\"],Video:[\"videoSourceFeedFieldKey\"]}},o={},u=!1,a={checkAndTrackValue:function(e,t,i,r){e&&(this.isCorrectFieldType(e,i,r)?this.getFieldValueByKey(e,t)||creative.adapter.trackingCenter.track({name:\"userError\",userErrorId:\"feedValueMissing\"}):creative.adapter.trackingCenter.track({name:\"userError\",userErrorId:\"feedValueUnlinked\"}))},getCustomFields:function(){var e=n();return Object.keys(e).filter(function(e){return 0===e.indexOf(\"CustomFeedField\")}).map(function(t){var i=e[t];return{id:i.id,feedId:i.feedId,name:i.name,type:i.type,values:i.rows.map(function(e){return e.value}).filter(function(e){return null!==e})}})},getCustomFieldByKey:function(e){var t=i(e);if(t)for(var r=this.getCustomFields(),n=0;n1;return r?i:[]},getFieldRowByKey:function(e,t){t=\"number\"==typeof t?t:0;var i=this.getFieldRowsByKey(e);return i[t]},getFieldValueByKey:function(e,t){var i=this.getFieldRowByKey(e,t);return i&&i.value},isCorrectFieldType:function(e,i,r){var n=this.getFieldByKey(e);if(!n)return!1;var d=t(n.type,i);return-1!==d.indexOf(r)}};e.FeedData=a}(window);;\nvar FeedImageOptimizationTrait={getFeedImageOptimizationSetting:function(t){if(!this.feedImageOptimizationSettings)return null;for(var e=0;es?e/r.width:i/r.height}var u=r.width*r.height*h*h/(e*i);n=u/h}return{variant:t,rank:1e8*n|0}});return n=n.sort(function(t,i){return t.rank===i.rank?t.rank?i.variant.getComputedHeight(e)-t.variant.getComputedHeight(e):t.variant.baseSize.width===i.variant.baseSize.width?t.variant.getComputedHeight(e)-i.variant.getComputedHeight(e):t.variant.baseSize.width-i.variant.baseSize.width:i.rank-t.rank}),n[0].variant},selectWidestThenShortest:function(t,e,i){var a=t.map(function(t){return{variant:t,rank:e347||14>a?r=\"to top\":a>=14&&75>=a?r=\"to top right\":a>75&&105>a?r=\"to right\":a>=105&&167>=a?r=\"to bottom right\":a>167&&194>a?r=\"to bottom\":a>=194&&255>=a?r=\"to bottom left\":a>255&&285>a?r=\"to left\":a>=285&&347>=a&&(r=\"to left top\"),r},e.convertSideCornerToAngle=function(t,e){var a=0;switch(t){case\"bottom\":case\"to top\":a=0;break;case\"left\":case\"to right\":a=90;break;case\"right\":case\"to left\":a=270;break;case\"top\":case\"to bottom\":a=180;break;case\"to bottom right\":case\"to right bottom\":a=167;break;case\"to bottom left\":case\"to left bottom\":a=194;break;case\"to top right\":case\"to right top\":a=14;break;case\"to top left\":case\"to left top\":a=347;break;case\"bottom right\":case\"right bottom\":a=285;break;case\"bottom left\":case\"left bottom\":a=75;break;case\"top right\":case\"right top\":a=255;break;case\"top left\":case\"left top\":a=105}return/\\-?(moz|webkit|o|ms)/.test(e)&&(a=90-a),(a+360)%360},e.isHex=function(t){return e.patternHex.test(t)},e.isRgb=function(t){return e.patternRgb.test(t)},e.isRgba=function(t){return e.patternRgba.test(t)},e.isGradient=function(t){return e.patternGradient.test(t)},e.parseColorStopList=function(t){for(var a,r=e.patternGradientStopList.exec(t),n=[];null!==r;)a={color:r[e.matchGradientStopListColor]},r[e.matchGradientStopListPosition]&&(a.position=r[e.matchGradientStopListPosition]),n.push(a),r=e.patternGradientStopList.exec(t);return n},e.parseGradient=function(t){var a=null,r=e.patternGradient.exec(t);if(null!==r){a={original:r[0],oldSyntax:!r[e.matchGradientType],prefix:r[e.matchGradientPrefix],type:r[e.matchGradientType],colorStopList:[]};var n=e.patternGradientSyntax.exec(r[e.matchGradientValues]);null!==n&&(n[e.matchGradientSyntaxLine]&&(a.line=n[e.matchGradientSyntaxLine]),n[e.matchGradientSyntaxAngle]&&(a.angle=n[e.matchGradientSyntaxAngle]),n[e.matchGradientSyntaxSideCorner]&&(a.sideCorner=n[e.matchGradientSyntaxSideCorner]),a.colorStopList=e.parseColorStopList(n[e.matchGradientSyntaxStopList]));var i=e.patternRadialGradientSyntax.exec(r[e.matchGradientValues]);null!==i&&(a.radialGradientEllipse=i[e.matchRadialGradientSyntaxEllipse],i[e.matchRadialGradientSyntaxWidth]&&(a.radialGradientWidth=i[e.matchRadialGradientSyntaxWidth]),i[e.matchRadialGradientSyntaxHeight]&&(a.radialGradientHeight=i[e.matchRadialGradientSyntaxHeight]),i[e.matchRadialGradientSyntaxXPosition]&&(a.radialGradientXPosition=i[e.matchRadialGradientSyntaxXPosition]),i[e.matchRadialGradientSyntaxYPosition]&&(a.radialGradientYPosition=i[e.matchRadialGradientSyntaxYPosition]),a.colorStopList=e.parseColorStopList(i[e.matchRadialGradientSyntaxStopList]))}return a},e.createGradient=function(t){var a={backgroundColor:null,webkitGradient:null,mozLinearGradient:null,msLinearGradient:null,oLinearGradient:null,webkitLinearGradient:null,linearGradient:null,radialGradient:null},r=e.parseGradient(t);if(r.oldSyntax)throw new Error('[Not supported] Can not create gradient from old \"webkit-gradient\" syntax.');for(var n=\"\",i=\"\",o=r.colorStopList.length,d=0;o>d;d++){var l=r.colorStopList[d];if(l.color){if(0!==d?(n+=\", \",i+=\", \"):a.backgroundColor=l.color,n+=l.color,i+=\"color-stop(\",l.position)n+=\" \"+l.position,i+=l.position;else{var s=100/(o-1)*d;i+=s+\"%\"}i+=\", \"+l.color+\")\"}}if(\"linear\"===r.type){var g=0;\"undefined\"!=typeof r.angle?g=parseInt(r.angle,10):\"undefined\"!=typeof r.sideCorner&&(g=e.convertSideCornerToAngle(r.line,r.prefix));var p=g;/\\-?(moz|webkit|o|ms)/.test(r.prefix)?g=90-p:p=90-g;var c=e.convertAngleToSideCorner(g),m=e.gradientOldSideCorner[c];a.webkitGradient=\"-webkit-gradient(linear, \"+m+\", \"+i+\")\",a.mozLinearGradient=\"-moz-linear-gradient(\"+p+\"deg, \"+n+\")\",a.msLinearGradient=\"-ms-linear-gradient(\"+p+\"deg, \"+n+\")\",a.oLinearGradient=\"-o-linear-gradient(\"+p+\"deg, \"+n+\")\",a.webkitLinearGradient=\"-webkit-linear-gradient(\"+p+\"deg, \"+n+\")\",a.linearGradient=\"linear-gradient(\"+g+\"deg, \"+n+\")\"}else if(\"radial\"===r.type){var h=parseInt(r.radialGradientWidth,10),G=parseInt(r.radialGradientHeight,10),b=parseInt(r.radialGradientXPosition,10),u=parseInt(r.radialGradientYPosition,10),f=h+\"% \"+G+\"%\",S=b+\"% \"+u+\"% \",x=f+\" at \"+S;a.radialGradient=\"radial-gradient(\"+x+\", \"+n+\")\"}return a},e.createGradientStyle=function(t){var a=e.createGradient(t),r=\"\";for(var n in a){var i=a[n];null!==i&&e.isGradient(i)&&(r+=\"background-image: \"+i+\"; \")}return r},e.parseRgb=function(t){var a,r=0,n=0,i=0,o=1;if(e.isRgb(t))a=e.patternRgb.exec(t);else{if(!e.isRgba(t))throw new Error(\"Color format [\"+t+\"] is not supported, please provide rgb or rgba color format input.\");a=e.patternRgba.exec(t)}return null!==a&&(a[e.matchRgbaRed]&&(r=parseInt(a[e.matchRgbaRed],10)),a[e.matchRgbaGreen]&&(n=parseInt(a[e.matchRgbaGreen],10)),a[e.matchRgbaBlue]&&(i=parseInt(a[e.matchRgbaBlue],10)),a[e.matchRgbaAlpha]&&(o=parseFloat(a[e.matchRgbaAlpha]))),[r,n,i,o]},e.shadeRgb=function(t,e){return this._transformRgb(t,e,0)},e.tintRgb=function(t,e){return this._transformRgb(t,e,255)},e._transformRgb=function(t,a,r){var n=e.parseRgb(t),i=n[0],o=n[1],d=n[2],l=n[3],s=parseInt(i*(1-a)+r*a),g=parseInt(o*(1-a)+r*a),p=parseInt(d*(1-a)+r*a);return\"rgba(\"+s+\", \"+g+\", \"+p+\", \"+l+\")\"},t.Color=e}(window),\"undefined\"!=typeof module&&\"undefined\"!=typeof module.exports&&(module.exports=window.Color);;\nvar Deferrable={callback:function(e,r){if(e){if(\"succeeded\"===this._deferredStatus)return e.apply(r,this._deferredArgs);this._callbacks||(this._callbacks=[]),this._callbacks.push([e,r])}},errback:function(e,r){if(e){if(\"failed\"===this._deferredStatus)return e.apply(r,this._deferredArgs);this._errbacks||(this._errbacks=[]),this._errbacks.push([e,r])}},setDeferredStatus:function(){var e,r,s=Array.prototype.slice.call(arguments),t=s.shift();if(this._deferredStatus=t,this._deferredArgs=s,\"succeeded\"===t?e=this._callbacks:\"failed\"===t&&(e=this._errbacks),e)for(;r=e.shift();)r[0].apply(r[1],this._deferredArgs)}};;\nfunction Paginator(i){if(i=i||{},\"object\"!=typeof i.container)throw\"Paginator is missing container.\";if(\"object\"!=typeof i.containerSize)throw\"Paginator is missing container size object.\";if(\"string\"!=typeof i.position)throw\"Paginator is missing position.\";if(\"number\"!=typeof i.itemsCount)throw\"Paginator is missing itemsCount.\";extend(this,i),this._isVisible=this.position&&\"hidden\"!==this.position,this._hasItems=!!this.itemsCount,this._list=null,this._largePaginationThreshold=350,this._dotSizes={smallSize:9,smallActive:2,largeSize:12,largeActive:4}}Paginator.prototype.buildPagination=function(){if(this._isVisible&&this._hasItems){this._list=document.createElement(\"ul\"),addClass(this._list,\"pagination\"),addClass(this._list,this.position);for(var i=0;ithis._largePaginationThreshold&&i.height>this._largePaginationThreshold?\"large\":\"small\",s=this.itemsCount*this._dotSizes[t+\"Size\"]+this._dotSizes[t+\"Active\"];switch(addClass(this._list,t),this.position){default:case\"bottom\":case\"top\":this._list.style.left=(i.width-s)/2+\"px\";break;case\"right\":case\"left\":this._list.style.top=(i.height-s)/2+\"px\"}this._list.style.display=\"block\"}},Paginator.prototype.setActivePaginationItem=function(i){this._isVisible&&this._hasItems&&Array.prototype.slice.call(this._list.getElementsByTagName(\"li\")).forEach(function(t,s){removeClass(t,\"active\"),s===i&&addClass(t,\"active\")},this)};;\nfunction Creative(e,t,r,n,i,a,o,s,u,c,d,m,p){if(e instanceof Creative)throw\"This JSON has already been unfreezed. We do it inline, to improve performance. Duplicate it yourself before unfreezing, if you need to use it again.\";var v=p.start(\"Creative.new\"),f=extend({adapter:a,runtimeParams:t||{},urlOpenedOverrideUrls:s,urlOpenedUrlAppendage:d,clickThroughDestinationUrl:m,storeOpenedOverrideUrls:u,macros:c},o),l=p.start(\"Creative.unfreeze\");return e=Freezer.unfreeze(e,window,f),l.end(),e.instantiation=randInt(),e.batcher=new Batcher({protoLoading:a.protoLoading}),e.trackingCenter=r,e.universalInteractionId=\"\",e.aggregatorTracking=n,e.experiments=i,e.perf=p,e.platformAdvId=t.platformAdvId,e.platformAdvIdTrackingLimited=t.platformAdvIdTrackingLimited,\"undefined\"!=typeof a&&null!==a&&(a.openBrowserSameWindowInHostileIFrame=function(e){window.top.location.href=e}),v.end(),e}Creative.toString=function(){return\"[Clazz Creative]\"},Creative.prototype.toString=function(){return\"[Creative \"+this.name+\"]\"},window.creative=null,extend(Creative.prototype,EventEmitter),Creative.init=function(e,t,r,n,i,a,o,s,u,c,d,m,p){if(window.creative)throw\"creative is a singleton and was already initialized.\";Logger.initFromRuntimeParams(t),window.creative=new Creative(e,t,r,n,i,a,o,s,u,c,d,m,p)},Creative.prototype.userInteracted=function(e){this.emit(\"interaction\",e)},Creative.prototype.clickedThrough=function(e){this.emit(\"clickThrough\",e)},Creative.prototype._getRuntimeParamsWithPrefix=function(e){var t={};for(var r in this.runtimeParams)0===r.indexOf(e)&&(t[r.slice(e.length)]=this.runtimeParams[r]);return t},Object.defineProperties(Creative.prototype,{sessionId:{enumerable:!0,get:function(){return this.runtimeParams.sessionId}},placementId:{enumerable:!0,get:function(){return this.runtimeParams.placementId||null}},folderId:{enumerable:!0,get:function(){return this.runtimeParams.folderId}},supplierId:{enumerable:!0,get:function(){return this.runtimeParams.supplierId||null}},secure:{enumerable:!0,get:function(){return 1==this.runtimeParams.secure}},userParams:{enumerable:!0,get:function(){return this._getRuntimeParamsWithPrefix(\"user.\")}},userIdentifiers:{enumerable:!0,get:function(){return this.runtimeParams.userIdentifiers}},authTokenUrlParam:{enumerable:!1,get:function(){return\"authBasis=\"+creative.runtimeParams.authBasis+\"&authToken=\"+creative.runtimeParams.authToken}},customAudiences:{enumerable:!0,get:function(){return function(e){if(!creative.runtimeParams.customAudiences[e])throw new Error('Custom audience \"'+e+'\" is not used by the creative.');return{userExists:creative.runtimeParams.customAudiences[e].userExists,userData:creative.runtimeParams.customAudiences[e].userData,addUser:function(t){return CustomAudiences.addUser(e,t)},removeUser:function(){return CustomAudiences.removeUser(e)}}}}},acceptLanguage:{enumerable:!0,get:function(){return this.runtimeParams.acceptLanguage}}}),Creative.prototype.awake=function(){function e(r,n,i,a){r.forEach(function(r){r.parentUnit=a,r.parentScreen=i,r.parentContainer=n;var o=r.getNestedContainers();o.forEach(function(n){n.parentUnit=a,n.parentScreen=i,n.parentObject=r,e(n.objects,n,i,a),n.scenes&&t(n.scenes,n,i,a)})})}function t(e,t,r,n){e.forEach(function(e){e.parentUnit=n,e.parentScreen=r,e.parentContainer=t})}var r=this;for(var n in r.units){var i=r.units[n];i.name=n;var a=[];i.variants?i.variants.forEach(function(e){a=a.concat(e.master,e.screens),e.loadingScreen&&(a=[e.loadingScreen].concat(a))}):(a=[i.master].concat(i.screens),i.loadingScreen&&(a=[i.loadingScreen].concat(a))),a.forEach(function(r){r.parentUnit=i,e(r.objects,r,r,i),r.scenes&&t(r.scenes,r,r,i)})}},Creative.prototype.track=function(e,t){[\"firstInteraction\",\"interaction\",\"endCardInteraction\",\"unitCollapsed\",\"creativeDismissed\",\"clickThroughDestinationOpened\",\"firstClickThrough\",\"itemSwiped\"].indexOf(e.name)>=0&&(e=extend(e,{universalInteractionId:this.universalInteractionId})),this.trackingCenter.track(e,t)},Creative.prototype.setUniversalInteractionId=function(e){this.universalInteractionId=e},Creative.prototype.wrapRedirectPageUrl=function(e,t){return this.trackingCenter.wrapRedirectPageUrl(e,t)},Object.defineProperty(Creative.prototype,\"sdk\",{get:function(){return this.adapter},enumerable:!0}),Creative._throw=function(e){throw e},Creative.prototype.getUserInteracted=function(){return 1==this.runtimeParams.userInteracted},Creative.prototype.trackCreativeRendered=function(){creative.adapter.notifycreativeRendered(),this._getCreativeRendered()||(this.track({name:\"creativeRendered\"}),this.runtimeParams.creativeRendered=1,defer(this.trackingCenter.batchFlush))},Creative.prototype._getCreativeRendered=function(){return 1===this.runtimeParams.creativeRendered},Creative.prototype.trackCreativeRenderedOnScreenShow=Creative.prototype.trackCreativeRendered,Creative.prototype.trackCreativeRenderedOnVideoStart=noop,Creative.trackCustomEventAction=function(e,t,r){var n=\"custom\";e.track({name:n,label:t.name}),creative.adapter.sendToEventMonitor(n,t.triggerId,e.screen.name,null,t.name,e.initiatedBeforeScreenShown()),r&&r()},Creative.prototype.trackCreativeLoaded=function(e){this.track({name:\"creativeLoaded\",viewability00Measurable:e.observingViewability(\"00\"),viewability501Measurable:e.observingViewability(\"501\"),viewableTimeMeasurable:e.observingViewableTime(),cdnVariant:this.runtimeParams.variantChoices.CdnTiming||\"none\"}),defer(this.trackingCenter.batchFlush),this.perf._stopTrackingDefers=!0,this.perf.mark(\"creativeLoaded\")},Creative.prototype.createUserLocation=function(e){return\"undefined\"!=typeof UserLocation?new UserLocation({lat:this.runtimeParams.gpsLat,lng:this.runtimeParams.gpsLng},e):void 0},Creative.prototype.getPageUrl=function(e){return(this.secure?this.creativeUrl:this.insecureCreativeUrl)+e+\"?base64json=\"+encodeURIComponent(btoa(to_utf8(JSON.stringify(this.runtimeParams))))},Creative.prototype.shouldClickThroughToNewWindow=function(e){var t;t=[\"same\",\"new\"].indexOf(this.runtimeParams.preferredClickThroughWindow)>=0?this.runtimeParams.preferredClickThroughWindow:\"new\",creative&&creative.adapter.nesting.hostileIframe&&(t=\"new\");var r=e&&e.inUserInitiatedIteration,n=deviceInfo.os.android()&&deviceInfo.browser.facebookApp();return\"new\"==t&&r&&!n},Creative.prototype.getFeedFields=function(){return FeedData.getCustomFields()},Creative.prototype.getFeedFieldByName=function(e){return FeedData.getCustomFieldByName(e)},Creative.prototype.getAllFeedFieldsByName=function(e){return FeedData.getCustomFields().filter(function(t){return t.name===e})};;\nfunction CrossScreenBanner(){}inherit(CrossScreenBanner,Creative),CrossScreenBanner.toString=function(){return\"[Clazz CrossScreenBanner]\"},CrossScreenBanner.prototype.toString=function(){return\"[CrossScreenBanner \"+this.name+\"]\"},CrossScreenBanner.prototype.awake=function(){CrossScreenBanner.uber.awake.apply(this,arguments),this.adapter.wrapRedirectPageUrl=this.wrapRedirectPageUrl.bind(this),this.units.banner.dismissAction=function(e,n,r){e.track({name:\"creativeDismissed\"}),creative.adapter.dismiss(r,n)}.bind(this),this.units.banner.trackCreativeDismissed=function(){new ActionContext(this.currentScreen).track({name:\"creativeDismissed\"})},this.units.banner.userLocation=this.createUserLocation(!1)};;\nvar Kernel={};Kernel.toString=function(){return\"[Clazz Kernel]\"},Kernel.runInParallelAction=function(e,n,t){n.actions.waitForEach(function(n,t){n(e,t)},t)},Kernel.runInParallelActionDryRun=Kernel.runInParallelAction,Kernel.runInBackgroundAction=function(e,n,t){n.action&&n.action(e,noop),t()},Kernel.runInSequenceAction=function(e,n,t){for(var r=t,i=n.actions.length-1;i>=0;i--)r=function(n,t){return function(){t(e,n)}}(r,n.actions[i]);r()},Kernel.runInSequenceActionDryRun=Kernel.runInSequenceAction,Kernel.runNTimesAction=function(e,n,t){n.caller.hasOwnProperty(\"executionsLeft\")||(n.caller.executionsLeft=n.repeat),n.caller.executionsLeft>0?(n.caller.executionsLeft--,(n.action||nullai)(e,t)):t&&t()},Kernel.runNTimesActionDryRun=function(e,n,t){(n.action||nullai)(e,t)},Kernel.loopAction=function(e,n,t){function r(){return 0==i?t():(-1!=i&&i--,void(n.action||nullai)(e,\"thumb\"===creative.runtimeParams.purpose?t:r))}var i=n.repeat;r()},Kernel.loopActionDryRun=function(e,n,t){(n.action||nullai)(e,t)},Kernel.sleepAction=function(e,n,t){setTimeout(t,n.duration)},Kernel.executeJavascriptAction=function(e,n,t){try{var r=e.initiator,i=e.screen.parentUnit,c=e.screen,a=new Function(\"ctx\",\"c\",\"unit\",\"screen\",\"variant\",n.script.code),o=!1,u=i.getVariantForScreen?i.getVariantForScreen(c):void 0;null!==n.script.code.match(/http:/)&&this._track(\"executeJavascriptAction.code\");var l=function(){o?console.warn('Multiple calls made to \"c()\" from \"'+e.initiator.fieldName+'\" Execute JS Action'):(t(),o=!0)}.bind(this);a.call(r,e,l,i,c,u)}catch(s){console.error(s.message+\"\\n\"+s.stack)}},Kernel.randomAction=function(e,n,t){var r=0;if(n.outcomes.forEach(function(e){r+=e.weight}),!r)return t();for(var i=Math.random()*r,c=0;ci)return(a.action||nullai)(e,t)}},Kernel.randomActionDryRun=function(e,n,t){n.outcomes.forEach(function(n){(n.action||nullai)(e,noop)}),t()},Kernel.bestAction=function(e,n,t){var r=creative.experiments.get(\"Best\",[creative.id,n.experimentName]);r.trackExposure();var i=n.outcomes.filter(function(e){return e.experimentVariant==r.chosenVariant})[0],c=i?i:n.outcomes[0];(c.action||nullai)(e,t)},Kernel.bestActionDryRun=function(e,n,t){var r=creative.experiments.get(\"Best\",[creative.id,n.experimentName]),i=n.outcomes.filter(function(e){return e.experimentVariant==r.chosenVariant})[0],c=i?i:n.outcomes[0];(c.action||nullai)(e,t)},Kernel.trackBestVariantSuccessAction=function(e,n,t){var r=creative.experiments.get(\"Best\",[creative.id,n.experimentName]);r.trackSuccess(),creative.adapter.sendToEventMonitor(\"trackBestVariantSuccess\",n.triggerId,e.screen.name,r.chosenVariant,\"\",e.initiatedBeforeScreenShown()),t()},Kernel._track=function(e){this._privateApiTracked=this._privateApiTracked||{},this._privateApiTracked[e]||(this._privateApiTracked[e]=!0,creative.track({name:\"retiredFeatureUsed\",featureType:\"loadingInsecureContent\",featureName:e}))};;\n;\nfunction Scene(){}Scene.instances=[],Scene.prototype.awake=function(){this._framesPerSecond=this.framesPerSecond&&null!==this.framesPerSecond?this.framesPerSecond:20,this._framesPerPixel=.1,this._durationInFrames=0,this._durationInMilliseconds=0,this._durationInPixels=0,this._isTimeScene=\"time\"===this.type,this._isReactiveScene=\"reactiveBanner\"===this.type,this._lastUpdateObjectsProgress=0,this._objectVisibilityStates=[],this._claimedObjects=[],this._keyframeAnimations=Object.create(null),this._rawInitialValues=[],this._initSceneOnRenderApiCall=!0,this._suspended=!1,this.fallbackFrameShown=!1,this.forceFallbackFrame=!1,this.intersection=\"undefined\"!=typeof this.intersection?this.intersection:50,this.endingMode=\"string\"==typeof this.endingMode?this.endingMode:\"lastKeyframe\",this.duration=\"number\"==typeof this.duration?this.duration:10,this._appearedBefore=!1,this._isAppearing=!1,this._calculateDurations=this._calculateDurations.bind(this),this._buildKeyframeAnimations=this._buildKeyframeAnimations.bind(this),this._removeAnimatedClass=this._removeAnimatedClass.bind(this),this._renderOnSizeChange=this._renderOnSizeChange.bind(this),this._initPlayer(),this.parentContainer.on(\"appeared\",this._appear.bind(this)),this.parentContainer.on(\"disappeared\",this._dissapear.bind(this)),this.parentContainer.on(\"resize\",this._calculateDurations),this.parentContainer.on(\"resize\",this._buildKeyframeAnimations),this.parentContainer.on(\"resize\",this._renderOnSizeChange),this.parentUnit.on(\"layoutChanged\",this._calculateDurations),this.parentUnit.on(\"layoutChanged\",this._buildKeyframeAnimations),this.parentUnit.on(\"layoutChanged\",this._renderOnSizeChange),Scene.instances.push(this)},Scene._sizeProperties=[\"width\",\"height\"],Scene._positionProperties={horizontal:[\"left\",\"hcenter\",\"right\"],vertical:[\"top\",\"vcenter\",\"bottom\"]},Object.defineProperties(Scene.prototype,{paused:{get:function(){return this._player.paused}},_scenePlayerClazz:{get:function(){return window[this.type.charAt(0).toUpperCase()+this.type.slice(1)+\"ScenePlayer\"]},configurable:!0}}),Scene.prototype._initPlayer=function(){this._player=new this._scenePlayerClazz(this),this._player.on(\"stop\",this._resetRawInitialValues.bind(this)),this._player.on(\"end\",this._updateRawFinalValuesForAllLayouts.bind(this)),this._player.on(\"pause\",this._removeAnimatedClass),this._player.on(\"stop\",this._removeAnimatedClass)},Scene.prototype._removeAnimatedClass=function(){for(var e in this._claimedObjects)removeClass(this._claimedObjects[e].node,\"animated\")},Scene.prototype._getMaxFrameNumber=function(){if(this._isTimeScene&&\"timelineDuration\"===this.endingMode)return this.duration*this._framesPerSecond;var e=0;for(var t in this.objects){var i=this.objects[t],n=this.parentUnit.layoutCurrentIndex;for(var a in i.layoutSpecificValues[n]){var s=i.layoutSpecificValues[n][a];e=Math.max(e,s.frame)}}return e},Scene.prototype._calculateDurations=function(){this._durationInFrames=this._getMaxFrameNumber(),this._durationInMilliseconds=this._durationInFrames/this._framesPerSecond*1e3,this._durationInPixels=this._durationInFrames/this._framesPerPixel},Scene.prototype._captureRawInitialValues=function(e){this._rawInitialValues[e.localId]=[];for(var t=this.parentScreen.parentContainer.layouts.length,i=0;t>i;i++){var n=e.layoutSpecificValues[i];this._rawInitialValues[e.localId][i]=extend({rotation:n.rotation,opacity:n.opacity,hidden:n.hidden},n.position,n.size)}},Scene.prototype._calculateFinalValuesForObject=function(e){var t=[];for(var i in this.objects){var n=this.objects[i];if(n.target.localId==e.localId)for(var a in n.layoutSpecificValues){t[a]=Object.create(null);for(var s in n.layoutSpecificValues[a]){var r=n.layoutSpecificValues[a][s];for(var o in r.properties)null!==r.properties[o].value&&(t[a][o]=r.properties[o].value)}}}return t},Scene.prototype._updateRawFinalValuesForAllLayouts=function(){if(\"reverse\"!==this.onEnd)for(var e in this._claimedObjects)for(var t=this._claimedObjects[e],i=this._calculateFinalValuesForObject(t),n=this.parentScreen.parentContainer.layouts.length,a=0;n>a;a++){var s=t.layoutSpecificValues[a],r=i[a];Scene._updateLayoutWithValues(s,r)}},Scene.prototype._buildKeyframeAnimations=function(){this._keyframeAnimations=Object.create(null);for(var e=this.parentUnit.layoutCurrentIndex,t=0;t0&&this._suspended&&this._isAppearing?this._playSceneOrDisplayFallbackFrame():0!==e||this._player.paused||this._suspendScene()},Scene.prototype._handleContainerViewableChange=function(e){e&&this._suspended&&this._isAppearing?this._playSceneOrDisplayFallbackFrame():e||this._player.paused||this._suspendScene()},Scene.prototype.getDuration=function(){return{frames:this._durationInFrames,pixels:this._durationInPixels,milliseconds:this._durationInMilliseconds}},Scene.prototype._calculateKeyframeStyleAttributes=function(e){var t=this._claimedObjects.indexOf(e);if(-1===t)return{};var i=this._objectVisibilityStates[t],n=e._calculateNewStyleAttributes();return i.isDirty(\"transition\")&&(\"show\"===i.transition?n.display=\"block\":\"hide\"===i.transition&&(n.display=\"none\")),n},Scene.prototype.updateObjects=function(e){for(var t in this._claimedObjects){var i=this._claimedObjects[t];if(i.node){if(i.isAnimated){var n=this._keyframeAnimations[i.localId],a=e>=n.startKeyframe,s=e<=n.endKeyframe||!n.firstFrameAnimated,r=this._lastUpdateObjectsProgress>n.startKeyframe&&en.endKeyframe,l=this._isReactiveScene&&(r||o),c=a&&s||this.fallbackFrameShown||l;if(c)n.firstFrameAnimated=!0,hasClass(i.node,\"animated\")||addClass(i.node,\"animated\");else{if(!hasClass(i.node,\"animated\"))continue;removeClass(i.node,\"animated\")}}var h=this._keyframeAnimations[i.localId].animation.getValuesAt(e);Scene._updateLayoutWithValues(i.layoutCurrent,h,this._objectVisibilityStates[t]),i._keyframeStyle=this._calculateKeyframeStyleAttributes(i)}}this._lastUpdateObjectsProgress=e},Scene.prototype.renderObjects=function(){for(var e in this._claimedObjects){var t=this._claimedObjects[e];if(t.node){var i=this._objectVisibilityStates[e];i.isDirty(\"transition\")&&(\"show\"===i.transition?t.showAction(null,{},noop):\"hide\"===i.transition&&t.hideAction(null,{},noop),i.markClean(\"transition\")),t._applyStyles(t.node,t._keyframeStyle),t.redrawSceneLayout()}}},Scene.prototype.getPlayer=function(){return this._player},Scene.prototype.claimObject=function(e){if(-1===this._claimedObjects.indexOf(e)){for(var t=0;t0&&(this._renderAtProgress(e),this._removeAnimatedClass())},Scene.prototype.renderAtProgress=function(e){this._player.paused&&void 0!==e&&(this._initSceneOnRenderApiCall&&(this._initSceneOnRenderApiCall=!1,this._initAnimations()),this._renderAtProgress(e))},Scene.prototype.playSceneAction=function(e,t,i){var n=-1===[\"repeat\",\"reverse\"].indexOf(this.onEnd),a=\"repeat\"==this.onEnd&&!isNaN(this.onEndRepeatCount)&&this.onEndRepeatCount>0,s=\"reverse\"==this.onEnd&&!isNaN(this.onEndReverseCount)&&this.onEndReverseCount>0,r=this.onEndWaitForCount&&(a||s);n||r?(this._player.once(\"stop\",i),this._playSceneOrDisplayFallbackFrame()):(this._playSceneOrDisplayFallbackFrame(),i())},Scene.prototype.pauseSceneAction=function(e,t,i){\"time\"===this.type&&(this._pauseScene(),i())},Scene.prototype.stopSceneAction=function(e,t,i){\"time\"===this.type&&(this._stopScene(),i())},Scene.prototype.resetAction=function(e,t,i){this._player&&(this._stopScene(),this._player.destroy()),this._initPlayer(),this._suspended=!1,this._claimedObjects.forEach(function(e){this.releaseObject(e)},this),i()},Scene._extractPropertyValues=function(e){var t=Object.create(null);for(var i in e){var n=e[i].timingFunction;n&&(n.instance=Scene._getTimingFunctionByName(n.id)),t[i]={value:e[i].value,timingFunction:n}}return t},Scene._keyframeWithUnitsToKeyframePx=function(e,t){for(var i=0;i-1&&(s=s/100*t[n]),e[n].value=s)}}for(var r in Scene._positionProperties)for(var o=\"horizontal\"==r?\"width\":\"height\",l=Scene._positionProperties[r],c=0;c-1&&(d=d/100*t[o]),e[h].value=d)}}},Scene._getTimingFunctionByName=function(e){return e?AnimationTimingFunctions[camelize(e)]:null},Scene._fillInInitialAndDynamicKeyframeValues=function(e,t,i){e[0]||(e[0]=Object.create(null));for(var n in t)!e[0][n]&&i.indexOf(n)>-1&&(e[0][n]={value:t[n],timingFunction:{id:\"none\",instance:Scene._getTimingFunctionByName(\"none\")}});for(var a in e)for(var s in e[a])e[a][s]&&null===e[a][s].value&&(e[a][s].value=t[s])},Scene._ensureSizeOrPositionValueHasUnits=function(e){return e=String(e),e.indexOf(\"%\")>-1||e.indexOf(\"px\")>-1?e:e+\"px\"},Scene._updateLayoutWithValues=function(e,t,i){var n=extend({},e.position),a=!1;for(var s in Scene._positionProperties)for(var r=Scene._positionProperties[s],o=0;o0}}),View.prototype.createNode=function(){this.on(\"loaded\",creative.perf.start(\"View.load\",{clazz:this.constructor.name,name:this.name}).end);var e=document.createElement(\"div\");\"undefined\"!=typeof creative&&creative.adapter&&creative.adapter.useNativeClickForTapDetection&&(e.style.touchAction=\"manipulation\"),this.localId&&(e.id=\"celtra-object-\"+this.localId);for(var t=this.constructor;t;t=t.uber?t.uber.constructor:void 0)addClass(e,\"celtra\"+t.name.replace(/[A-Z]/g,function(e){return\"-\"+e.toLowerCase()}));return e},View.prototype.getNode=function(e){return this.loaded?e&&defer(e,0,\"View.getNode defer finishedLoadingCallback\",useAsap()):(e&&this._waitingForLoadCallbacks.push(e),this.node||(this.incrementLoadingCount(),this.node=this.createNode(),defer(this.decrementLoadingCount,0,\"View.getNode defer decrementLoadingCount\",useAsap()))),this.node},Object.defineProperty(View.prototype,\"isAppearing\",{get:function(){return this._isAppearing}}),Object.defineProperty(View.prototype,\"hasAppearedAtLeastOnce\",{get:function(){return this._hasAppearedAtLeastOnce}}),View.prototype.appear=function(){var e=\"View APPEAR called on \"+this.constructor.name+\" \"+this.localId+\" (name=\"+this.name+\")\";this.parentContainer&&(e+=\" from \"+this.parentContainer.constructor.name+\" \"+this.parentContainer.localId+\" (name=\"+this.parentContainer.name+\")\"),Logger(\"events.appear\").log(e),this.hidden?this._shouldAppear=!0:this.isAppearing||(this._appear(),this._isAppearing=!0,this._hasAppearedAtLeastOnce=!0,this.emit(\"appeared\"))},View.prototype.disappear=function(){var e=\"View DISAPPEAR called on \"+this.constructor.name+\" \"+this.localId+\" (name=\"+this.name+\")\";this.parentContainer&&(e+=\" from \"+this.parentContainer.constructor.name+\" \"+this.parentContainer.localId+\" (name=\"+this.parentContainer.name+\")\"),Logger(\"events.appear\").log(e),this.isAppearing&&(this._disappear(),this._isAppearing=!1,this._shouldAppear=!1,this.emit(\"disappeared\"))},View.prototype.reset=function(){this.isAppearing&&(this._shouldAppear=this.hidden,this._isAppearing=!this.hidden)},View.prototype._appear=function(){},View.prototype._disappear=function(){},View.prototype.appearNestedObjects=function(){this.objects.forEach(function(e){e.appear()},this)},View.prototype.disappearNestedObjects=function(){this.objects.forEach(function(e){e.disappear()},this)},View.prototype._trackViewShown=function(e){var t={name:\"viewShown\",viewName:this.name,clazz:this.constructor.name};new ActionContext(this,!1).track(extend(t,e))};;\nBaseCreativeUnit.prototype.alert=function(e,t){var a=e.boxWidth||BaseCreativeUnit._defaultModalBoxWidth;e.message=removeHtmlTags(e.message);var i=this._calculateModalDialogActualHeight(e);a<=this.size.width&&i<=this.size.height?this.showModalDialogInPlacement(\"alert\",e,t):(alert(e.message),t())},BaseCreativeUnit.prototype.prompt=function(e,t){var a=e.boxWidth||BaseCreativeUnit._defaultModalBoxWidth,i=this._calculateModalDialogActualHeight(e);if(a<=this.size.width&&i<=this.size.height)this.showModalDialogInPlacement(\"prompt\",e,t);else{var l=prompt(removeHtmlTags(e.message));t(l)}},BaseCreativeUnit.prototype._getUniqueId=function(){var e=new Date,t=e.getTime()+Math.random();return t},BaseCreativeUnit.prototype.showModalDialogInPlacement=function(e,t,a){var i=this._getUniqueId(),l={};l[i]={attachment:\"node\",parentNode:this.node,positioning:\"screen\",type:\"layer\"},creative.adapter.createPlacements(l,function(){function l(e){13==e.keyCode&&(creative.adapter.destroyPlacement(i),o=null,a(C.value))}function r(e){e.preventDefault(),e.stopPropagation()}function n(t){t.preventDefault(),t.stopPropagation(),creative.adapter.destroyPlacement(i),o=null,\"prompt\"==e?a(C.value):a()}function s(e){e.preventDefault(),e.stopPropagation(),creative.adapter.destroyPlacement(i),o=null,a(null)}if(window){var o=creative.adapter.placements[i];o.setZIndex(\"max\"),o.setSize(\"100%\",\"100%\"),o.setPosition(0,0);var d=o.createElement(\"link\");d.rel=\"stylesheet\",d.type=\"text/css\",d.href=creative.resourceUrl+\"runner-min/clazzes/ModalDialogs-Overlay.css\",o.getContainer().appendChild(d);var c=o.createElement(\"div\");addClass(c,\"celtra-alert\"),c.style.display=\"none\";var p=o.createElement(\"div\");addClass(p,\"celtra-alert-dark-overlay\"),c.appendChild(p),this.preventScroll(c);var h=o.createElement(\"div\");if(addClass(h,\"celtra-alert-box\"),t.title&&\"\"!=t.title){var u=o.createElement(\"h1\");addClass(u,\"celtra-alert-title\"),u.innerHTML=t.title,h.appendChild(u)}if(t.title&&\"\"!=t.title&&t.message&&\"\"!=t.message){var v=o.createElement(\"hr\");addClass(v,\"celtra-alert-dark-line\"),h.appendChild(v);var m=o.createElement(\"hr\");addClass(m,\"celtra-alert-light-line\"),h.appendChild(m)}if(t.message&&\"\"!=t.message){var g=o.createElement(\"div\");addClass(g,\"celtra-alert-message\"),g.innerHTML=t.message,g.setAttribute(\"dir\",\"auto\"),\"auto\"!==g.dir&&(g.dir=guessWritingDirection(t.message)||\"ltr\"),h.appendChild(g)}if(\"prompt\"==e){var C=o.createElement(\"input\");addClass(C,\"celtra-alert-input\"),C.value=t.defaultValue||\"\",h.appendChild(C),attach(C,\"keypress\",l)}var f=o.createElement(\"div\");if(addClass(f,\"celtra-alert-ok\"),f.innerHTML=\"OK\",h.appendChild(f),this.preventScroll(h),once(f,\"touchend\",n,!1),\"prompt\"==e&&t.showCancel){addClass(f,\"with-cancel\");var y=o.createElement(\"div\");addClass(y,\"celtra-alert-cancel\"),y.innerHTML=\"CANCEL\",h.appendChild(y),attach(f,\"touchstart\",r,!1),once(y,\"touchend\",s,!1)}c.appendChild(h),o.populate(c,function(){o.show();var e=setInterval(function(){\"absolute\"===celtra.styler.computedCSS(h,\"position\")&&(computedBoxHeight=parseInt(celtra.styler.computedCSS(h,\"height\"),10)+parseInt(celtra.styler.computedCSS(h,\"paddingTop\"),10)+parseInt(celtra.styler.computedCSS(h,\"paddingBottom\"),10),h.style.marginTop=-computedBoxHeight/2+\"px\",h.style.opacity=1,clearInterval(e),e=null)},100)})}}.bind(this))},BaseCreativeUnit.prototype._calculateModalDialogActualHeight=function(e){var t=document.createElement(\"div\");t.style.cssText=\"visibility:hidden; font-family:Helvetica,Arial,sans-serif; font-size:14px; padding-bottom:10px; text-shadow:0 1px 0 rgba(0,0,0,1); width:220px;\",t.innerText=e.message,this.node.appendChild(t);var a=parseInt(window.getComputedStyle(t).getPropertyValue(\"height\"),10),i=a+BaseCreativeUnit._defaultModalBoxHeightWithoutMessage;return this.node.removeChild(t),i},BaseCreativeUnit.prototype.preventScroll=function(e){var t=[\"mousewheel\",\"touchmove\"];t.forEach(function(t){attach(e,t,function(e){e.preventDefault()},!1)})},BaseCreativeUnit._defaultModalBoxWidth=242,BaseCreativeUnit._defaultModalBoxHeightWithoutMessage=75;;\nfunction CreativeUnitWithVariants(){this._uvOverrideSize=null,this.variantSelector=null}inherit(CreativeUnitWithVariants,BaseCreativeUnit),CreativeUnitWithVariants.toString=function(){return\"[Clazz CreativeUnitWithVariants]\"},CreativeUnitWithVariants.prototype.toString=function(){return\"[CreativeUnitWithVariants \"+this.name+\" (\"+this.localId+\")]\"},CreativeUnitWithVariants.prototype.awake=function(){CreativeUnitWithVariants.uber.awake.call(this),this._currentVariant=null,this._fullScreenVariantLockActive=!1,this.preventUVUpdate=!1,this.variants.forEach(function(t,i){t.originalIndex=i}),this.variants=this.variants.filter(function(t){return\"rm\"===t.companionType||!t.companionType}),this.variants.sort(function(t,i){function e(t){return t.minSize.width*t.minSize.height}return e(t.layouts[0])-e(i.layouts[0])}).forEach(function(t){t.parentUnit=this,t.on(\"shareableStateChanged\",function(){this.emit(\"shareableStateChanged\")}.bind(this))},this),this.widthBreakpoints=this._extractBreakpoints(),this.hacks.variantSelectionDeferTime=deviceInfo.browser.firefox()?200:0},Object.defineProperties(CreativeUnitWithVariants.prototype,{size:{get:function(){return this.getAvailableSize()},enumerable:!0,configurable:!1},minimumSize:{get:function(){return{width:this.variants[0].layouts[0].minSize.width,height:this.variants[0].layouts[0].minSize.height}},enumerable:!0,configurable:!1},layoutCurrentIndex:{get:function(){return 0},enumerable:!0,configurable:!1},currentScreen:{get:function(){return this.currentVariant?this.currentVariant.currentScreen:null},enumerable:!0,configurable:!1},currentVariant:{set:function(t){this._currentVariant!==t&&(this._currentVariant=t,this.emit(\"shareableStateChanged\"))},get:function(){return this._currentVariant}},usesUpdatedVariantSelection:{get:function(){return this.variants.some(function(t){return t.scaleUnit})},enumerable:!0,configurable:!1}}),CreativeUnitWithVariants.prototype.getLargestComputedHeight=function(t){return this.variants.reduce(function(i,e){return Math.max(e.getComputedHeight(t),i)},0)},CreativeUnitWithVariants.prototype.updateUnitVariantPrevention=function(t){var i=this.preventUVUpdate!==t;this.preventUVUpdate=t,i&&!t&&this._updateVariant()},CreativeUnitWithVariants.prototype.setUVOverrideSize=function(t,i){this._uvOverrideSize||(this._uvOverrideSize={}),t&&(this._uvOverrideSize.width=t),i&&(this._uvOverrideSize.height=i)},CreativeUnitWithVariants.prototype.setUVOverrideWidth=function(t){this.setUVOverrideSize(t)},CreativeUnitWithVariants.prototype.createNode=function(){var t=CreativeUnitWithVariants.uber.createNode.apply(this,arguments);this.currentVariant=this.getVariantForSize(this._availableSize.width,this._availableSize.height),this.currentVariant.parentContainer=this,this.incrementLoadingCount();var i=this.currentVariant.getNode(function(){this.currentVariant.updateSizeAndPosition(),t.appendChild(i),this.decrementLoadingCount(),this.emit(\"variantChanged\")}.bind(this));return t},CreativeUnitWithVariants.prototype.setAvailableSize=function(t,i){var e=CreativeUnitWithVariants.uber.setAvailableSize.call(this,t,i);return e&&this.loaded&&(this._updateGeometry(t,i),defer(function(){this._lockVariantIfNativeFullscreen(),this._updateVariant(),this.emit(\"resize\")}.bind(this),this.hacks.variantSelectionDeferTime)),e},CreativeUnitWithVariants.prototype._updateGeometry=function(t,i){var e=this.getNode();e.style.width=t+\"px\",e.style.height=i+\"px\"},CreativeUnitWithVariants.prototype._lockVariantIfNativeFullscreen=function(){var t=creative.adapter&&creative.adapter.inNativeFullscreen();!this.lockedToVariant&&t?(this.lockVariantSelectionToCurrentVariant(),this._fullScreenVariantLockActive=!0):this._fullScreenVariantLockActive&&!t&&(this.unlockVariantSelection(),this._fullScreenVariantLockActive=!1)},CreativeUnitWithVariants.prototype._updateVariant=function(){var t,i=this.node;t=this.currentVariant&&this.preventUVUpdate?this.currentVariant:this.getVariantForSize(this.size.width,this.size.height),t.parentContainer=this;var e=this.currentVariant;if(t===this.currentVariant)return void t.updateSizeAndPosition();this.currentVariant=t;var n=t.getNode(function(){n.parentNode||i.appendChild(n),t===this.currentVariant&&(t.updateSizeAndPosition(),t.node.style.display=\"block\",this._isRendering&&t.enterRenderTree(),this.isAppearing&&t.appear()),this.emit(\"variantChanged\")}.bind(this));e&&t!==e&&(this.isAppearing&&e.disappear(),e.node.style.display=\"none\",e.exitRenderTree())},CreativeUnitWithVariants.prototype.goToVariant=function(t,i){return i=i||noop,\"number\"!=typeof t||this.currentVariant.localId===t?defer(function(){i(this.currentVariant)}.bind(this)):(this.lockVariantSelectionToLocalId(t),void(this.lockedToVariant?(this.lockedToVariant.once(\"appeared\",function(){i(this.currentVariant),this.lockedToVariant=null}.bind(this)),this._updateVariant()):defer(function(){i(this.currentVariant)}.bind(this))))},CreativeUnitWithVariants.prototype.getMatchingBreakpoint=function(t){for(var i=this.widthBreakpoints[0],e=1;e-1||this.variants[i].master===t)return this.variants[i];return null},CreativeUnitWithVariants.prototype._appear=function(){this.loaded||Creative._throw(\"Cannot show the unit before it has finished loading.\"),this.isAppearing&&Creative._throw(\"The unit is already appearing.\"),this.node.parentNode||Creative._throw(\"Creative unit must be added to DOM before show() is called. Animations will start on show().\"),Logger(\"unit\").log(\"Showing \"+this),(this.currentVariant.minSize.width>this._availableSize.width||this.currentVariant.minSize.height>this._availableSize.height)&&creative.adapter&&creative.adapter.trackingCenter.track({name:\"userError\",userErrorId:\"unitVariantsDoNotFitPlacement\"}),this.currentVariant.isAppearing||this.currentVariant.appear(),this.inView&&(this.inView.start(),this.currentVariant&&this.currentVariant.inView&&this.currentVariant.inView.start())},CreativeUnitWithVariants.prototype._disappear=function(){this.isAppearing||Creative._throw(\"The unit is not appearing, can not disappear.\"),Logger(\"unit\").log(\"Hiding \"+this),this.inView&&this.inView.stop()},CreativeUnitWithVariants.prototype.enterRenderTree=function(){this._isRendering||(this._isRendering=!0,this.currentVariant.updateSizeAndPosition(),this.currentVariant.enterRenderTree())},CreativeUnitWithVariants.prototype.exitRenderTree=function(){this._isRendering&&(this._isRendering=!1,this.currentVariant&&this.currentVariant.exitRenderTree())},CreativeUnitWithVariants.prototype.goToScreenAction=function(t,i,e){return i.screen?(extend(i,i.animation),void i.screen.parentContainer.goToScreen(i.screen,i,e)):(console.warn(\"Go to screen action is called without a destination page!\"),e&&e())},CreativeUnitWithVariants.prototype.findAll=function(t){var i=[];return this.currentVariant.findAll(t).forEach(function(t){i.push(t)}),i},CreativeUnitWithVariants.prototype.findByType=function(t){var i=[];return this.currentVariant.findByType(t).forEach(function(t){i.push(t)}),i};;\nfunction CreativeUnitVariant(){}inherit(CreativeUnitVariant,View),extend(CreativeUnitVariant.prototype,TriggerHost),extend(CreativeUnitVariant.prototype,ScreenTransitioner),extend(CreativeUnitVariant.prototype,FeedImageOptimizationTrait),CreativeUnitVariant.toString=function(){return\"[Clazz CreativeUnitVariant]\"},CreativeUnitVariant.prototype.toString=function(){return\"[CreativeUnitVariant \"+this.minSize.width+\"\u00d7\"+this.minSize.height+\" (\"+this.localId+\")]\"},Object.defineProperty(CreativeUnitVariant.prototype,\"isTrackable\",{get:function(){return!0}}),CreativeUnitVariant.prototype._getDestinationScreen=function(){var e=this.screens[0];if(\"modal\"==this.parentUnit.name&&\"undefined\"!=typeof creative.runtimeParams.goToPageAfterExpand){var t=creative.runtimeParams.goToPageAfterExpand;if(\"string\"!=typeof t)throw new TypeError(\"Only string type is allowed to reference destination screen!\");var i=this.screens.filter(function(e){return e.title===t});i.length>0&&(e=i[0])}return e},CreativeUnitVariant.prototype.awake=function(){CreativeUnitVariant.uber.awake.apply(this,arguments),this._isRendering=!1,this._isMasterShown=!1,this._currentScreen=null,this.visibleScreen=null,this.triggers=this.triggers||[],this._preloadReachableScreens=this._preloadReachableScreens.bind(this),this.screens.forEach(function(e){e.objects.forEach(function(e){e.zIndex+=ScreenObject._zIndexOffset})})},CreativeUnitVariant.prototype.createNode=function(){var e=CreativeUnitVariant.uber.createNode.apply(this,arguments);if(this.incrementLoadingCount(),this.parentContainer.inView&&(this.inView=new InViewObject(this,this.parentContainer.inView)),this.screenHolder=document.createElement(\"div\"),this.screenHolder.className=\"celtra-screen-holder\",e.appendChild(this.screenHolder),this.borderColor&&this.borderSize>0){var t=document.createElement(\"div\");t.className=\"celtra-creative-border\",t.style.borderColor=this.borderColor,t.style.borderWidth=this.borderSize+\"px\",e.appendChild(t)}var i=2,n=function(){--i||this.decrementLoadingCount()}.bind(this);return this.screenHolder.appendChild(this.master.getNode(n)),this.screenHolder.appendChild(this._getDestinationScreen().getNode(n)),e.style.background=this.backgroundColor,this.screens.forEach(function(e){e.on(\"enteredRenderTree\",function(){this.parentContainer.node.style.background=this.currentScreen.showOverflow?this.backgroundColor:\"\"}.bind(this))}.bind(this)),e},Object.defineProperties(CreativeUnitVariant.prototype,{size:{get:function(){if(\"responsive\"==this.sizing){if(this.currentLayout.unitAlignment&&\"belowPageHeader\"==this.currentLayout.unitAlignment.vertical){var e=creative.adapter.skinGetters&&creative.adapter.skinGetters.getUnscrolledPageHeaderBottomLine()||0;return{width:Math.max(this.parentUnit.size.width,this.minSize.width),height:Math.max(this.parentUnit.size.height,this.minSize.height)-e}}return{width:Math.max(this.parentUnit.size.width,this.minSize.width),height:Math.max(this.parentUnit.size.height,this.minSize.height)}}return{width:this.minSize.width,height:this.minSize.height}},enumerable:!0,configurable:!1},minSize:{get:function(){return{width:this.currentLayout.minSize.width,height:this.currentLayout.minSize.height}},enumerable:!0,configurable:!1},baseSize:{get:function(){return{width:this.minSize.width,height:this.revealCollapsedHeight?this.revealCollapsedHeight:this.minSize.height}},enumerable:!0,configurable:!1},currentLayout:{get:function(){return this.layouts[0]},enumerable:!0,configurable:!1},currentScreen:{set:function(e){this._currentScreen!==e&&(this._currentScreen=e,this.emit(\"shareableStateChanged\"))},get:function(){return this._currentScreen}}}),CreativeUnitVariant.prototype.getComputedHeight=function(e){return this.scaleUnit?Math.max(this.baseSize.height,Math.ceil(e*(this.baseSize.height/this.baseSize.width))):this.baseSize.height},CreativeUnitVariant.prototype.enterRenderTree=function(){this._isRendering||(this._isRendering=!0,this.updateSizeAndPosition(),this.master.enterRenderTree(),this.visibleScreen&&this.visibleScreen.enterRenderTree(),this.emit(\"enteredRenderTree\"))},CreativeUnitVariant.prototype.exitRenderTree=function(){this._isRendering&&(this._isRendering=!1,this.master&&(this.master.loaded?this.master.exitRenderTree():this.master.once(\"loaded\",this.master.exitRenderTree.bind(this.master))),this.visibleScreen&&(this.visibleScreen.loaded?this.visibleScreen.exitRenderTree():this.visibleScreen.once(\"loaded\",this.visibleScreen.exitRenderTree.bind(this.visibleScreen))),this.emit(\"exitedRenderTree\"))},CreativeUnitVariant.prototype._trackViewShown=function(){new ActionContext(this,!1).track({name:\"viewShown\",viewName:this.currentLayout.designTimeSize.width+\" x \"+this.currentLayout.designTimeSize.height,clazz:this.constructor.name,designSize:this.currentLayout.designTimeSize,availableSize:this.parentUnit.getAvailableSize()})},CreativeUnitVariant.prototype._appear=function(){var e=this.currentScreen;this.currentScreen||(e=this._getDestinationScreen());var t=function(){this.inView&&(this.inView.start(),e&&e.inView&&e.inView.start())}.bind(this);\"LeanLoading\"===e.title?creative.adapter.waitForWindowLoad(function(){this.goToScreen(e),t()}.bind(this)):(this.goToScreen(e),t())},CreativeUnitVariant.prototype._disappear=function(){this.master.disappear(),this.currentScreen.disappear(),this.inView&&this.inView.stop()},CreativeUnitVariant.prototype.inViewTriggerSetup=function(){var e=!1;this.triggers.forEach(function(t){(\"enterView\"===t.type||\"leaveView\"===t.type)&&(e=!0,this.inViewAreaRatio=0)},this),e&&this.inView.on(\"areaInViewRatioChanged\",this.triggerInView.bind(this))},CreativeUnitVariant.prototype.updateSizeAndPosition=function(){var e=this.getNode(),t=creative.adapter.adBehavior.isBackgroundSkin||\"pageContentCenter\"==this.currentLayout.unitAlignment.horizontal,i=creative.adapter.adBehavior.isBackgroundSkin||\"belowPageHeader\"==this.currentLayout.unitAlignment.vertical;if(e.style.width=this.size.width+\"px\",e.style.height=this.size.height+\"px\",\"center\"==this.currentLayout.unitAlignment.horizontal||t){var n=creative.adapter.skinGetters&&creative.adapter.skinGetters.getPageContentElement();if(e.style.right=\"auto\",t&&n){var r=n.getBoundingClientRect(),a=r.left+r.width/2;e.style.left=a-this.size.width/2+\"px\"}else e.style.left=\"50%\",e.style.marginLeft=-this.size.width/2+\"px\"}else e.style.marginLeft=0,\"left\"==this.currentLayout.unitAlignment.horizontal?(e.style.left=0,e.style.right=\"auto\"):(e.style.right=0,e.style.left=\"auto\");if(i){var s=!creative.adapter.adBehavior.stickToPageHeader&&creative.adapter.skinGetters&&creative.adapter.skinGetters.getUnscrolledPageHeaderBottomLine()||0;e.style.top=s+\"px\",e.style.bottom=\"auto\"}else\"center\"==this.currentLayout.unitAlignment.vertical?(e.style.top=\"50%\",e.style.bottom=\"auto\",e.style.marginTop=-this.size.height/2+\"px\"):(e.style.marginTop=0,\"top\"==this.currentLayout.unitAlignment.vertical?(e.style.top=0,e.style.bottom=\"auto\"):(e.style.bottom=0,e.style.top=\"auto\"));this.emit(\"resize\")},CreativeUnitVariant.prototype.findAll=function(e){var t=[];return this.screens.forEach(function(i){(\"undefined\"==typeof e||i.title==e)&&t.push(i),i.findAll(e).forEach(function(e){t.push(e)})}),t},CreativeUnitVariant.prototype.find=function(e){var t=this.findAll(e);return t.length>0?t[0]:null},CreativeUnitVariant.prototype.findByType=function(e){var t=[];return\"undefined\"==typeof e?result:(this.screens.forEach(function(i){i.findByType(e).forEach(function(e){t.push(e)})}),t)};;\nfunction ScreenObjectContainer(){}inherit(ScreenObjectContainer,View),ScreenObjectContainer.toString=function(){return\"[Clazz ScreenObjectContainer]\"},ScreenObjectContainer.prototype.toString=function(){return\"[ScreenObjectContainer \"+this.localId+\"]\"},ScreenObjectContainer.prototype.appear=function(){ScreenObjectContainer.uber.appear.call(this),ScreenObjectContainer.uber.appearNestedObjects.call(this)},ScreenObjectContainer.prototype.disappear=function(){ScreenObjectContainer.uber.disappearNestedObjects.call(this),ScreenObjectContainer.uber.disappear.call(this)};;\nfunction Screen(){}inherit(Screen,ScreenObjectContainer),extend(Screen.prototype,TriggerHost),extend(Screen.prototype,SceneHost),extend(Screen.prototype,DiscoverableTrait),Screen.toString=function(){return\"[Clazz Screen]\"},Screen.prototype.toString=function(){return\"[Screen \"+this.localId+\" (name=\"+this.title+\")]\"},Object.defineProperty(Screen.prototype,\"name\",{get:function(){return this.title}}),Object.defineProperty(Screen.prototype,\"size\",{get:function(){return this.parentContainer.size}}),Screen.prototype.awake=function(){ScreenObjectContainer.uber.awake.apply(this,arguments),this._isRendering=!1,this.appearedAtLeastOnce=!1,this._updateSize=this._updateSize.bind(this),this.handleShake=this.handleShake.bind(this),this.handleShakeFallback=this.handleShakeFallback.bind(this)},Screen.prototype.isFirstScreen=function(){return this===this.parentContainer.screens[0]},Screen.prototype.isLoadingScreen=function(){return this===this.parentContainer.loadingScreen},Screen.prototype.isMasterScreen=function(){return this===this.parentContainer.master},Screen.prototype.isNormalScreen=function(){return!this.isMasterScreen()&&!this.isLoadingScreen()},Object.defineProperty(Screen.prototype,\"parentUnitVariant\",{get:function(){return\"CreativeUnitWithVariants\"==this.parentUnit.constructor.name?(this._parentContainer||(this._parentContainer=this.parentUnit.getVariantForScreen(this)),this._parentContainer):null}}),Object.defineProperty(Screen.prototype,\"parentContainer\",{get:function(){return this.parentUnitVariant||this.parentUnit}}),Screen.prototype.createNode=function(){Logger(\"unit\").log(\"Starting to load \"+this),!this.isLoadingScreen()&&creative.experiments.get(\"TrackingLoadingTimes\")&&this.once(\"loaded\",creative.aggregatorTracking.trackAggregatorMagicTriplet(\"screenLoad\",{unitName:this.parentUnit.name,screenRank:this.isFirstScreen()?\"First\":this.isMasterScreen()?\"Master\":\"Other\"},3e4)),this.nestedSceneHosts=[];var e=Screen.uber.createNode.call(this);return e.style.overflow=this.showOverflow?\"visible\":\"hidden\",this.objects.forEach(function(t){this.incrementLoadingCount(),e.appendChild(t.getNode(this.decrementLoadingCount))},this),this.parentContainer.on(\"resize\",this._updateSize),e.style.width=e.style.height=\"100%\",this.parentContainer.inView&&(this.inView=new InViewObject(this,this.parentContainer.inView),this.inViewTriggerSetup()),this._updateSize(),e},Screen.prototype.initImmediatelyPlayedScenes=function(){this._initImmediatelyPlayedScenes(),this.nestedSceneHosts.forEach(function(e){e._initImmediatelyPlayedScenes()})},Screen.prototype._appear=function(){var e=!this.appearedAtLeastOnce;this.appearedAtLeastOnce=!0;var t=new ActionContext(this,{certainlyNotCausedByUserBehavior:!!this.parentUnit.firstAppearWithoutUserInteraction&&e&&(this.isFirstScreen()||this.isMasterScreen())});this!==this.parentContainer.loadingScreen&&this!==this.parentContainer.master&&(t.track({name:\"screenShown\"}),creative.trackCreativeRenderedOnScreenShow()),e?this.fireTriggers(\"firstAppear\",null,function(){defer(function(){this.fireTriggers(\"appear\",null,noop,t)}.bind(this),void 0,void 0,useAsap())}.bind(this),t):this.fireTriggers(\"appear\",null,noop,t),this.inView&&this.inView.start(),this._shakeListenerStart()},Screen.prototype._shakeListenerStart=function(){this.hasTriggers(\"shake\")&&(this.shakeListener||(this.shakeListener=new ShakeListener),this.shakeListener.on(\"shake\",this.handleShake),this.shakeListener.on(\"shakeFallback\",this.handleShakeFallback),this.shakeListener.start())},Screen.prototype._shakeListenerStop=function(){this.shakeListener&&(this.shakeListener.off(\"shake\",this.handleShake),this.shakeListener.off(\"shakeFallback\",this.handleShakeFallback),this.shakeListener.stop())},Screen.prototype._disappear=function(){this.inView&&this.inView.stop(),this._shakeListenerStop()},Screen.prototype.handleShakeFallback=function(){if(this.parentUnit.currentScreen===this){var e=new ActionContext(this,!1);this.fireTriggers(\"shake\",function(t,i){var n=2,r=1e3*(\"undefined\"!=typeof t.fallbackEmitDelay?t.fallbackEmitDelay:n);return\"undefined\"==typeof t.fallbackCustomActionSet||\"event-actions\"===t.fallbackCustomActionSet?setTimeout(function(){this.triggerActionByLocalId(e,{localId:i.localId},noop)}.bind(this),r):setTimeout(function(){this.triggerActionByLocalId(e,{localId:t.fallbackCustomActionSet},noop)}.bind(this),r),!1}.bind(this),null,e)}},Screen.prototype.handleShake=function(e){if(this.parentUnit.currentScreen===this){var t=new ActionContext(this,!1);this.fireTriggers(\"shake\",function(t,i){var n=t.direction&&t.direction.indexOf(e)>-1,r=!1,a=!1,s=500;return n?(clearTimeout(i.shakeTimeout),i.shakeStartTime||(i.shakeStartTime=new Date),r=t.duration&&(new Date).getTime()-i.shakeStartTime.getTime()>=t.duration,i.shakeTimeout=setTimeout(function(){delete i.shakeStartTime,i.triggered=!1},s),r&&!i.triggered&&(a=!0,i.triggered=!0),a):!1}.bind(this),null,t)}},Screen.prototype.enterRenderTree=function(){this._isRendering||(this._isRendering=!0,this.emit(\"enteredRenderTree\"))},Screen.prototype.exitRenderTree=function(){this._isRendering&&(this._isRendering=!1,this.emit(\"exitedRenderTree\"))},Screen.prototype._updateSize=function(){this.emit(\"resize\")},Screen.prototype.finishedLoading=function(){Screen.uber.finishedLoading.call(this),Logger(\"unit\").log(\"Finished loading \"+this)},Screen.prototype.triggerBeforeAppear=function(e){var t=new ActionContext(this,{certainlyNotCausedByUserBehavior:!!this.parentUnit.firstAppearWithoutUserInteraction&&!this.appearedAtLeastOnce&&(this.isFirstScreen()||this.isMasterScreen())});this.fireTriggers(\"beforeAppear\",null,e,t)},Screen.prototype.triggerOrientationChange=function(e){this.fireTriggers(\"orientationChange\",null,e)},Screen.prototype.getMaxZIndex=function(){var e=0;return this.objects.forEach(function(t){t.zIndex>e&&(e=t.zIndex)}),e},Screen.prototype.inViewTriggerSetup=function(){var e=!1;this.triggers.forEach(function(t){(\"enterView\"===t.type||\"leaveView\"===t.type)&&(e=!0,this.inViewAreaRatio=0)},this),e&&this.inView.on(\"areaInViewRatioChanged\",this.triggerInView.bind(this))},Screen.prototype.triggerInView=function(e){var t=new ActionContext(this),i=\"enterView\",n=this.inViewAreaRatio,r=e,a=function(e,t){return e.parameters.area-t.parameters.area};e=n&&r>=t},null,t,a),this._getTriggers(i,function(e){var t=e.area/100;return t>=n&&r>=t}),this.inViewAreaRatio=e},Screen.prototype.getActionsExecutedOnAppear=function(){var e=!this.appearedAtLeastOnce,t=new ActionContext(this,{certainlyNotCausedByUserBehavior:!!this.parentUnit.firstAppearWithoutUserInteraction&&e&&(this.isFirstScreen()||this.isMasterScreen())}),i=this.fireTriggersDryRun(\"beforeAppear\",null,noop,t);return e&&(i=i.concat(this.fireTriggersDryRun(\"firstAppear\",null,noop,t))),i.concat(this.fireTriggersDryRun(\"appear\",null,noop,t))},Screen.prototype.resetAction=function(e,t,i){var n=this.findAll(),r=n.length,a=function(){this._shakeListenerStop(),this._shakeListenerStart(),i()}.bind(this);r?n.forEach(function(i){i.resetAction(e,t,function(){--r||a()})}):a()},Screen.prototype.shuffleAction=function(e,t,i){function n(e){for(var t,i,n=e.length;0!==n;)i=Math.floor(Math.random()*n),n-=1,t=e[n],e[n]=e[i],e[i]=t;return e}var r=n(t.objects.map(function(e){return JSON.parse(JSON.stringify(e.layoutSpecificValues))}));t.objects.forEach(function(e,t){e.layoutSpecificValues.forEach(function(e,i){e.position=r[t][i].position}),e._refreshDisplayState()}),i&&i()},Screen.prototype._trackViewShown=function(){Screen.uber._trackViewShown.call(this,{isMasterScreen:this.isMasterScreen(),isLoadingScreen:this.isLoadingScreen()})};;\nfunction ScreenObject(){}inherit(ScreenObject,View),extend(ScreenObject.prototype,TriggerHost),extend(ScreenObject.prototype,DiscoverableTrait),extend(ScreenObject.prototype,ClickPreventer),ScreenObject.requiresRedrawToTriggerAnimationEvents=android(\"4.0\"),ScreenObject.redrawTriggerInterval=60,ScreenObject.toString=function(){return\"[Clazz ScreenObject]\"},ScreenObject.prototype.toString=function(){return\"[ScreenObject \"+this.localId+\" (name=\"+this.name+\")]\"},ScreenObject.allowPositioningAndSizingUsingTransforms=!android(\"2.2\",\"2.3\")||celtra.iframe(),ScreenObject._zIndexOffset=1e4,ScreenObject._resettableProperties=[\"position\",\"size\",\"rotation\",\"zIndex\",\"opacity\",\"hidden\"],ScreenObject._3dTransformBlacklisted=function(t){return/Silk\\/\\d|Kindle Fire| KFTT | KFOT | KFJWI | KFJWA |\\bGT-P3100\\b| HTC[ _]One[ _]S /.test(t)||/\\bGT-I9300\\b/.test(t)&&android(\"4.0\")}(navigator.userAgent),ScreenObject.supports3d=function(){var t=\"WebKitCSSMatrix\"in window&&\"m11\"in new WebKitCSSMatrix||\"MSCSSMatrix\"in window||/Gecko\\//.test(navigator.userAgent);return t&&!this._3dTransformBlacklisted}(),ScreenObject.requires3dTranslateForPositioning=/GT-I9500|GT-I9505|SM-N900|GT-P5210|SM-T520/.test(navigator.userAgent),ScreenObject.dummyImageSpacer=windows(\"10\"),ScreenObject._toPositionPx=function(t,e,i){var n,r,o,s,a=i.width,c=i.height,h=e.width,u=e.height;return[\"left\",\"right\",\"hcenter\"].forEach(function(e){e in t&&(n=e)}),[\"bottom\",\"top\",\"vcenter\"].forEach(function(e){e in t&&(r=e)}),o=t[n],s=t[r],o=o.indexOf(\"%\")>-1?a*parseFloat(o)/100:parseFloat(o),\"hcenter\"===n?o=(a-h)/2+o:\"right\"===n&&(o=a-(o+h)),s=s.indexOf(\"%\")>-1?c*parseFloat(s)/100:parseFloat(s),\"vcenter\"===r?s=(c-u)/2+s:\"bottom\"===r&&(s=c-(s+u)),{x:ScreenObject._roundIfNeeded(o),y:ScreenObject._roundIfNeeded(s)}},ScreenObject._toSizePx=function(t,e){var i=parseFloat(t.width),n=parseFloat(t.height),r=e.width,o=e.height;return t.width.toString().indexOf(\"%\")>-1&&(i=r*i/100),t.height.toString().indexOf(\"%\")>-1&&(n=o*n/100),{width:ScreenObject._roundIfNeeded(i),height:ScreenObject._roundIfNeeded(n)}},ScreenObject._roundIfNeeded=function(t){return Math.round(t)},Object.defineProperty(ScreenObject.prototype,\"layoutCurrent\",{get:function(){return null==this.layoutCurrentIndex?this.layoutSpecificValues[0]:this.layoutSpecificValues[this.layoutCurrentIndex]},enumerable:!0,configurable:!1}),Object.defineProperty(ScreenObject.prototype,\"layoutCurrentIndex\",{get:function(){return this.parentUnit.layoutCurrentIndex},enumerable:!0,configurable:!1}),ScreenObject._Position=function(t,e){this._instance=t,this._position=e},Object.defineProperties(ScreenObject._Position.prototype,{x:{get:function(){return this._position.x},set:function(t){delete this._instance.layoutCurrent.right,delete this._instance.layoutCurrent.hcenter,this._instance.layoutCurrent.position.left=t+(\"number\"==typeof t?\"px\":\"\")}},y:{get:function(){return this._position.y},set:function(t){delete this._instance.layoutCurrent.bottom,delete this._instance.layoutCurrent.vcenter,this._instance.layoutCurrent.position.top=t+(\"number\"==typeof t?\"px\":\"\")}}}),ScreenObject._Size=function(t,e){this._instance=t,this._size=e},Object.defineProperties(ScreenObject._Size.prototype,{width:{get:function(){return this._size.width},set:function(t){this._instance.layoutCurrent.size.width=t+(\"number\"==typeof t?\"px\":\"\")}},height:{get:function(){return this._size.height},set:function(t){this._instance.layoutCurrent.size.height=t+(\"number\"==typeof t?\"px\":\"\")}}}),Object.defineProperties(ScreenObject.prototype,{position:{get:function(){var t=ScreenObject._toPositionPx(this.layoutCurrent.position,this.size,this.parentContainer.size);return new ScreenObject._Position(this,t)},set:function(t){delete this.layoutCurrent.position.right,delete this.layoutCurrent.position.hcenter,delete this.layoutCurrent.position.bottom,delete this.layoutCurrent.position.vcenter,this.layoutCurrent.position.left=t.left,this.layoutCurrent.position.top=t.top}},originalSize:{get:function(){var t=this.layoutCurrentIndex||0;return ScreenObject._toSizePx(JSON.parse(this.originalLayoutSpecificValues)[t].size,this.parentContainer.size)},set:function(){throw new Error(\"originalSize is not settable!\")}},size:{get:function(){var t=ScreenObject._toSizePx(this.layoutCurrent.size,this.parentContainer.size);return new ScreenObject._Size(this,t)},set:function(t){this.layoutCurrent.size.width=t.width,this.layoutCurrent.size.height=t.height}},opacity:{get:function(){return this.layoutCurrent.opacity},set:function(t){this.layoutCurrent.opacity=t}},rotation:{get:function(){return this.layoutCurrent.rotation},set:function(t){this.layoutCurrent.rotation=t}},hidden:{get:function(){return this.layoutCurrent.hidden},set:function(t){this.layoutSpecificValues.forEach(function(e){e.hidden=t})}}}),ScreenObject.getCSSTranslate=function(t,e){return ScreenObject.requires3dTranslateForPositioning?\"translate3d(\"+t+\"px,\"+e+\"px, 0)\":\"translate(\"+t+\"px,\"+e+\"px)\"},ScreenObject.prototype.awake=function(){ScreenObject.uber.awake.call(this),this.originalLayoutSpecificValues=JSON.stringify(this.layoutSpecificValues),this.originalZIndex=this.zIndex,this.finishAnimation=this.finishAnimation.bind(this),this._refreshDisplayState=this._refreshDisplayState.bind(this)},ScreenObject.prototype.enterRenderTree=function(){this._isRendering||(this._isRendering=!0,this.emit(\"enteredRenderTree\"))},ScreenObject.prototype.exitRenderTree=function(){this._isRendering&&(this._isRendering=!1,this._isInMouseOver&&trigger(this.node,\"mouseout\",!1),this.emit(\"exitedRenderTree\"))},ScreenObject.prototype.react=function(t){var e=this.parentUnit.getRxStateObject(),i=function(){this._isRendering&&t.call(this,e)}.bind(this);null!==e&&(this._rxListeners.push(i),Ticker.frame(i,\"render\"))},ScreenObject.prototype.appearNestedObjects=function(){this.getNestedContainers().forEach(function(t){t.appear(),t.appearNestedObjects(t.objects)},this)},ScreenObject.prototype.disappearNestedObjects=function(){this.getNestedContainers().forEach(function(t){t.disappearNestedObjects(t.objects),t.disappear()},this)},ScreenObject.prototype.getScreenObjectPositionRelativeToScreen=function(){for(var t=this,e={x:this.position.x,y:this.position.y};t.parentContainer!==t.parentScreen&&(t=t.parentContainer&&t.parentContainer.parentObject);)e.x+=t.position.x,e.y+=t.position.y;return e},ScreenObject.prototype.initTemplates=function(){var t=this.templates={},e=this.constructor.templates;if(e){for(var i in e)\"string\"==typeof e[i]&&(e[i]=tmpl(e[i]));extend(t,e)}},ScreenObject.prototype.tmpl=function(t,e,i){this.templates||this.initTemplates();var n=this.templates[t];return n?n.call(i||this,e):\"Missing template: \"+t},ScreenObject.prototype.template=function(t,e,i){var n,r=document.createElement(\"div\");r.innerHTML=this.tmpl(t,e);var o=r.firstChild;if(i)for(;n=r.firstChild;)i.appendChild(n);return o},ScreenObject.prototype.ifNotClosing=function(t,e,i){var n=this.fireTriggersDryRun(t,null,noop,e)._actions,r=[\"dismiss\",\"collapse\"],o=!n.some(function(t){return r.indexOf(t.method)>-1});o&&i()},ScreenObject.prototype.createNode=function(){this._isInMouseOver=!1;var t=this,e=ScreenObject.uber.createNode.call(t);if(e.style.position=\"absolute\",this.hasTriggers(\"tap\")&&(addClass(e,\"touchable\"),attach(e,\"tap\",function(){var e=new ActionContext(t,!0);t.ifNotClosing(\"tap\",e,e.trackUserInteraction),t.fireTriggers(\"tap\",null,null,e)},!1)),deviceInfo.deviceType.desktop()){var i=\"mouseOver\",n=[];if(this.hasTriggers(i)){var r=this._getTriggers(i,null),o=[],s=noop;r.forEach(function(t){t.parameters&&t.parameters.delay&&o.indexOf(t.parameters.delay)<0&&o.push(t.parameters.delay)}),attach(e,\"mouseover\",function(){var e=new ActionContext(t,!0),r=function(n){return function(){t.fireTriggers(i,function(t){return t.delay==n},null,e)}};t._isInMouseOver=!0,o.forEach(function(t,e){s=r(t),n[e]=setTimeout(s,t)})},!1)}attach(e,\"mouseout\",function(){var e=new ActionContext(t,!0);t._isInMouseOver=!1,n.forEach(clearTimeout),n=[],t.hasTriggers(\"mouseOut\")&&t.fireTriggers(\"mouseOut\",null,null,e)},!1)}return attach(e,\"touchstart\",function(){if(t.hasTriggers(\"touchstart\")){var e=new ActionContext(t,!0);t.ifNotClosing(\"touchstart\",e,e.trackUserInteraction),t.fireTriggers(\"touchstart\",null,null,e)}},!1),attach(e,\"touchend\",function(){if(t.hasTriggers(\"touchend\")){var e=new ActionContext(t,!0);t.ifNotClosing(\"touchend\",e,e.trackUserInteraction),t.fireTriggers(\"touchend\",null,null,e)}},!1),this.hasTriggers(\"swipe\")&&(attach(e,\"touchstart\",function(t){t.stopPropagation()}),new SwipeListener({target:e,swipeNodeGetter:function(){return this.parentUnit.node}.bind(this),swipe:function(e,i){var n=new ActionContext(t,!0);t.fireTriggers(\"swipe\",function(r){var o=e==r.direction&&i>=r.length;return o&&t.ifNotClosing(\"swipe\",n,n.trackUserInteraction),o},null,n)}})),attach(e,\"transitionend\",function(t){t.stopPropagation()},!1),this.parentContainer.on(\"resize\",this._refreshDisplayState),this.parentContainer.on(\"enteredRenderTree\",function(){this.hidden||this.enterRenderTree()}.bind(this)),this.parentContainer.on(\"exitedRenderTree\",function(){this.hidden||this.exitRenderTree()}.bind(this)),this.layoutPrevious=this.layoutCurrent,this.parentUnit.on(\"layoutChanged\",this.handleLayoutChanged.bind(this)),this.initClickPrevention(function(){return this.node}.bind(this)),this._applyStyles(e,this._calculateNewStyleAttributes()),this.positionUsingTransforms()||deviceInfo.browser.safari(\"9.0.0\",null)||(e.style.outline=\"1px solid transparent\"),this._rxListeners=[],e},ScreenObject.prototype.positionUsingTransforms=retFalse,ScreenObject.prototype.sizeUsingTransforms=retFalse,ScreenObject.prototype.isValid=retTrue,ScreenObject.prototype.getNaturalSize=function(){return this.originalSize},ScreenObject.prototype._calculateNewStyleAttributes=function(){var t={transform:\"\",transformOrigin:\"50% 50%\"},e=this.getNaturalSize(),i=this.position.x,n=this.position.y;if(this.sizeUsingTransforms()&&(i+=ScreenObject._roundIfNeeded((this.size.width-e.width)/2),n+=ScreenObject._roundIfNeeded((this.size.height-e.height)/2)),this.positionUsingTransforms()?(t.left=\"0\",t.top=\"0\",(i||n)&&(t.transform+=ScreenObject.getCSSTranslate(i,n))):(t.left=i+\"px\",t.top=n+\"px\"),(this.isAnimated||0!=this.rotation)&&(t.transform+=\" rotate(\"+this.rotation+\"deg) \"),this.sizeUsingTransforms()){t.width=e.width+\"px\",t.height=e.height+\"px\";var r=this.size.width/e.width,o=this.size.height/e.height;t.transform+=\" scale(\"+r+\", \"+o+\")\"}else t.width=this.size.width+\"px\",t.height=this.size.height+\"px\";return t.zIndex=this.zIndex,t.opacity=this.opacity,t.display=this.hidden?\"none\":\"block\",t},ScreenObject.prototype._applyStyles=function(t,e){e&&Object.keys(e).forEach(function(i){celtra.styler.css(t,i,e[i])})},ScreenObject.prototype._refreshDisplayState=function(){if(this.node){var t=this._calculateNewStyleAttributes(),e=!1;for(var i in t){var n=String(t[i]).replace(/^\\s*|\\s*$/g,\"\"),r=celtra.styler.css(this.node,i),o=null;celtra.styler.css(this.node,i)!==n&&(o=n,r!=o&&\"zIndex\"!=i&&\"display\"!=i&&(e=!0))}return this._applyStyles(this.node,t),this.redrawLayout(),e}},ScreenObject.prototype.finishAnimation=function(){this.node&&void 0!==celtra.styler.css(this.node,\"transitionDuration\")&&(celtra.styler.css(this.node,\"transitionDuration\",\"1ms\"),this.node.offsetWidth,celtra.styler.css(this.node,\"transitionDuration\",\"\"))},ScreenObject.prototype.handleLayoutChanged=function(){var t=function(){this.layoutPrevious.hidden&&!this.layoutCurrent.hidden?this.enterRenderTreeAndAppear(!0):!this.layoutPrevious.hidden&&this.layoutCurrent.hidden&&this.parentContainer._isRendering&&this.exitRenderTree(),this.layoutPrevious=this.layoutCurrent}.bind(this);ios()?defer(t):t(),this.finishAnimation(),this._refreshDisplayState()},ScreenObject.prototype.redrawLayout=function(){},ScreenObject.prototype.redrawSceneLayout=function(){this.redrawLayout()},ScreenObject.prototype._checkAndEnhanceParamsForFileLoading=function(t,e,i){var n=ScreenObject.uber._checkAndEnhanceParamsForFileLoading.call(this,t,e,i);return n.settings.creativeUnitVariantId=this.parentScreen.parentContainer.localId,n},ScreenObject.prototype._preloadImage=function(t,e,i){var n=this._checkAndEnhanceParamsForFileLoading(t,e,i);ScreenObject.uber._preloadImage.call(this,t,n.settings,n.callback)},ScreenObject.prototype._loadImage=function(t,e,i){var n=this._checkAndEnhanceParamsForFileLoading(t,e,i);ScreenObject.uber._loadImage.call(this,t,n.settings,n.callback)},ScreenObject.prototype.setPosition=function(t,e){this.position={left:t+\"px\",top:e+\"px\"},this._refreshDisplayState()},ScreenObject.prototype.getPosition=function(){return{x:this.position.x,y:this.position.y}},ScreenObject.prototype.setSize=function(t,e){this.size.width=t,this.size.height=e,this._refreshDisplayState()},ScreenObject.prototype.getSize=function(){return{width:this.size.width,height:this.size.height}},ScreenObject.prototype.setOpacity=function(t){this.opacity=t,this._refreshDisplayState()},ScreenObject.prototype.getOpacity=function(){return this.opacity},ScreenObject.prototype.animateAction=function(t,e,i){function n(t){return!isNaN(parseFloat(t))&&isFinite(t)}function r(t){var e={position:{},size:{width:null,height:null},zIndex:null,opacity:null,rotation:null};return deep(e,t),e}function o(t,e){var i=e.size,n=t.size;null==i.width&&(i.width=n.width),null==i.height&&(i.height=n.height),t.size=i;var r=t.position,o=e.position,s=null,a=null,c=null,h=null;[\"left\",\"right\",\"hcenter\"].forEach(function(t){t in r&&(s=t),t in o&&(c=t)}),[\"bottom\",\"top\",\"vcenter\"].forEach(function(t){t in r&&(a=t),t in o&&(h=t)}),c&&null!==o[c]&&(delete r[s],r[c]=o[c]),h&&null!==o[h]&&(delete r[a],r[h]=o[h]),null!=e.rotation&&(t.rotation=e.rotation),null!=e.opacity&&(t.opacity=e.opacity),null!=e.zIndex&&(t.zIndex=e.zIndex)}i=i||noop,this.isAnimated=!0;var s=\"undefined\"!=typeof e.duration?e.duration:1e3,a=e.timingFunction||\"linear\";if(e.layoutSpecificValues)e.layoutSpecificValues.forEach(function(t,e){this.layoutSpecificValues[e]&&o(this.layoutSpecificValues[e],r(t))}.bind(this));else{var c=r(e.properties);null!=c.position.x&&(c.position.left=c.position.x+\"px\"),null!=c.position.y&&(c.position.top=c.position.y+\"px\"),null!=c.zIndex&&(c.zIndex=c.zIndex+ScreenObject._zIndexOffset,this.zIndex=c.zIndex),null!=c.size.width&&n(c.size.width)&&(c.size.width+=\"px\"),null!=c.size.height&&n(c.size.height)&&(c.size.height+=\"px\"),o(this.layoutCurrent,c)}var h=this.node;celtra.styler.css(h,\"transition\",\"\"),celtra.styler.css(h,\"transitionProperty\",\"all\"),celtra.styler.css(h,\"transitionDuration\",s+\"ms\"),celtra.styler.css(h,\"transitionTimingFunction\",a);var u=this._refreshDisplayState();if(s>0&&u){var l=!1,p=function(){l||(l=!0,i())};ScreenObject.requiresRedrawToTriggerAnimationEvents&&!function(){var t=Date.now(),e=t+(Number(s)||0),i=function(){flash(),Date.now()0?s:0;setTimeout(i,d)}},ScreenObject.prototype.enterRenderTreeAndAppear=function(t){t&&this.parentScreen._isRendering&&this.enterRenderTree(),t&&!this.isAppearing&&this._shouldAppear&&this.appear()},ScreenObject.prototype.scaleAction=function(t,e,i){var n=e.useOriginalSize?this.originalSize:this.size,r=e.scale/100,o={width:n.width*r,height:n.height*r},s={x:this.position.x+this.size.width/2-o.width/2,y:this.position.y+this.size.height/2-o.height/2};this.animateAction(t,{properties:{position:s,size:o},duration:e.duration,timingFunction:e.timingFunction},i)},ScreenObject.prototype.showAction=function(t,e,i){var n=this.hidden;this.hidden=!1,this.node.style.display=\"block\",this.enterRenderTreeAndAppear(n),this.node.offsetWidth,nextFrame(i)},ScreenObject.prototype.hideAction=function(t,e,i){var n=this.hidden;this.hidden=!0,this.node.style.display=\"none\",!n&&this.parentScreen._isRendering&&(this.isAppearing&&(this.disappear(),this._shouldAppear=!0),this.exitRenderTree()),setTimeout(i,0)},ScreenObject.prototype.isHidden=function(){return this.hidden},ScreenObject.prototype.resetAction=function(t,e,i){this.layoutSpecificValues=JSON.parse(this.originalLayoutSpecificValues),this.reset(),this.zIndex=this.originalZIndex,this.finishAnimation(),this._refreshDisplayState(),defer(i)},ScreenObject.prototype.addStyle=function(t){var e=\"#celtra-object-\"+this.localId,i=this.node,n=/^:(link|visited|active|hover|focus|first-child|nth-child|nth-last-child|nth-of-type|first-of-type|last-of-type|empty|target|checked|enabled|disabled)/,r=/,\\s*/g;this.styleNode||(this.styleNode=document.createElement(\"style\"),i||(i=document.getElementsByTagName(\"head\")[0]),i.appendChild(this.styleNode));var o=[];for(var s in t)o.push({selector:s.split(r).map(function(t){return e+(n.test(t)?\"\":\" \")+t}).join(\",\"),attributes:t[s]});var a=this._styleSheetTemplate({rules:o});this.styleNode.textContent+=a},ScreenObject.prototype._styleSheetTemplate=tmpl(\"<% for (var i = 0; i < rules.length; i++) { %><%= rules[i].selector %> { <%= rules[i].attributes %> }\\n<% } %>\"),ScreenObject.prototype.css=function(t,e){\"undefined\"==typeof e&&(e=t,t=this.getNode()),Object.keys(e).forEach(function(i){celtra.styler.css(t,i,e[i])})},ScreenObject.prototype.getNestedContainers=function(){return[]},ScreenObject.prototype.getActiveContainers=function(){return this.getNestedContainers()};;\nfunction Gallery(){this._lastCtx}inherit(Gallery,ScreenObject),Gallery.toString=function(){return\"[Clazz Gallery]\"},Gallery.prototype.toString=function(){return\"[Gallery \"+this.localId+\"]\"},Gallery.prototype.createNode=function(){var t=Gallery.uber.createNode.call(this);if(this.autoAnimate){var e=function(){this.startAutoAnimate()}.bind(this);this.on(\"appeared\",e),this.on(\"disappeared\",function(){this._stopAutoAnimate()}.bind(this))}return this._items=this.dataSource.getItems(),t},Gallery.prototype._preloadDataSources=function(t,e){if(!t)return void(e&&e());var i=0,o=function(){i++},n=function(){--i||e&&e()};t.forEach(function(t){return t.image?(o(),void this._preloadImage(t.image,function(e,i){t.imageNode=e,t.imageUri=i,n()})):(o(),void defer(n,0))},this)},Gallery.prototype.nextItem=function(t){this.goToItem(this.getFocusedIndex()+1,t)},Gallery.prototype.previousItem=function(t){this.goToItem(this.getFocusedIndex()-1,t)},Gallery.prototype.previousAction=function(t,e,i){this._stopAutoAnimate(),this._lastCtx=t,this.previousItem(i)},Gallery.prototype.nextAction=function(t,e,i){this._stopAutoAnimate(),this._lastCtx=t,this.nextItem(i)},Gallery.prototype.goToItemAction=function(t,e,i){this._stopAutoAnimate(),this._lastCtx=t,this.goToItem(e.item-1,i)},Gallery.prototype.startIndex=0,Gallery.prototype.allowAutoAnimate=retTrue,Gallery.prototype.resetAllowAutoAnimate=noop,Gallery.prototype.getItem=function(t){return this._items[t%this.getItemsLength()]},Gallery.prototype.getItemsLength=function(){return this._items.length},Gallery.prototype.startAutoAnimateAction=function(t,e,i){this.resetAllowAutoAnimate(),this.autoAnimationTimeout||this.startAutoAnimate(),i()},Gallery.prototype._autoAnimateCancelledInTransition=!1,Gallery.prototype.startAutoAnimate=function(){this._autoAnimateCancelledInTransition=!1;var t=this._animateCallback;if(t)return void t();var e,i,o,n=!0,a=this.getItemsLength()-1,s=\"north\"==this.autoAnimateDirection||\"west\"==this.autoAnimateDirection?\"nextItem\":\"previousItem\";t=function(){return this._autoAnimateCancelledInTransition?void(this._autoAnimateCancelledInTransition=!1):void(this.autoAnimationTimeout=setTimeout(o,this.autoAnimatePause))}.bind(this),o=function(){if(this.autoAnimationTimeout=null,!this.allowAutoAnimate())return void(this.autoAnimateUserInteraction?this.disableAutoAnimate():t());var o=this.getFocusedIndex(),r=function(n){o===a&&\"nextItem\"===s?(this.goToItem(0,t),n&&(i=!1,e=!1)):0===o&&\"previousItem\"===s&&(this.goToItem(a,t),n&&(i=!1,e=!1))}.bind(this);if(n)\"repeat\"===this.autoAnimateConclusion&&this.cyclic||r(!0),n=!1;else if(o===a||0===o)switch(this.autoAnimateConclusion){case\"stop\":if(i)return void this.disableAutoAnimate();break;case\"reverse\":e&&(s=\"previousItem\"===s?\"nextItem\":\"previousItem\");break;case\"repeat\":this.cyclic||r(!1)}(0!==o&&\"previousItem\"===s||o!==a&&\"nextItem\"===s||this.cyclic&&\"repeat\"===this.autoAnimateConclusion)&&(this._autoAnimateCancelledInTransition=!1,this[s](t),e=!0,i=!0)}.bind(this),this._animateCallback=t,t()},Gallery.prototype._stopAutoAnimate=function(){var t=this.autoAnimationTimeout;t?(clearTimeout(t),delete this.autoAnimationTimeout):this._autoAnimateCancelledInTransition=!0,delete this._animateCallback},Gallery.prototype.stopAutoAnimateAction=function(t,e,i){this._stopAutoAnimate(),i()},Gallery.prototype.disableAutoAnimate=function(){this._stopAutoAnimate()},Gallery.prototype.resetAction=function(t,e,i){Gallery.uber.resetAction.call(this,t,e,function(){this._stopAutoAnimate(),this.autoAnimate&&this.startAutoAnimate(),i()}.bind(this))},Gallery.prototype._triggerOnFocusCalledOnce=!1,Gallery.prototype._triggerOnFocus=function(){var t=this.getFocusedIndex();isNaN(t)||this._lastFocusedIndex===t||(this._items[t].onFocus(new ActionContext(this),!1),this._triggerOnFocusCalledOnce&&this._items[t].onFocus(new ActionContext(this),!0),this._lastFocusedIndex=t),this._triggerOnFocusCalledOnce=!0},Gallery.prototype._triggerOnBlur=function(){var t=this._lastFocusedIndex;\"number\"!=typeof this._lastFocusedIndex&&(t=this.startIndex),t!=this.getFocusedIndex()&&this._items[t].onBlur(new ActionContext(this))};;\nfunction Swipey(){}inherit(Swipey,Gallery),extend(Swipey.prototype,FeedImageCreator),Swipey.toString=function(){return\"[Clazz Swipey]\"},Swipey.prototype.toString=function(){return\"[Swipey \"+this.localId+\"]\"},Swipey.prototype.awake=function(){Swipey.uber.awake.call(this),this._animationLength=200,this._minimumDistanceForMovedState=5,this._rubberBandQuotient=4,this._snapThreshold=.2,this.startIndex=this.start-1,this._actionContextOfFirstTouchStart=null,this._autoAnimateDisabledByUserTouch=!1,this._autoAnimateHaltedByUserTouch=!1,this._currentTouchIdentifier=null,this._cycleWidth=0,this._firstTouchStart=null,this._allowHorizontalSwipe=!0,this._horizontalSwipeInProgress=!1,this._lastFocusedVirtualIndex=null,this._touchHandlersAttached=!1,this._jumpToItemIndexOnApear=!1,this._init=this._init.bind(this),this._draw=this._draw.bind(this),this._handleTouchStart=this._handleTouchStart.bind(this),this._handleTouchMove=this._handleTouchMove.bind(this),this._handleTouchEnd=this._handleTouchEnd.bind(this),this._handleTouchCancel=this._handleTouchCancel.bind(this),this._addListItem=this._addListItem.bind(this)},Swipey.prototype.createNode=function(){var t=Swipey.uber.createNode.call(this);if(\"string\"==typeof this.contentItemsFeedFieldKey){var i=FeedData.getFieldRowsByKey(this.contentItemsFeedFieldKey),e=i.length>0,s=FeedData.isCorrectFieldType(this.contentItemsFeedFieldKey,this.constructor.name,\"contentItemsFeedFieldKey\"),n=Math.min(i.length,this.contentItemsFeedMaximumAllowedRows);if(this._items.length=e&&s?n:0,this.startIndex=clamp(0,this._items.length-1,this.startIndex),this._items.length>0){var o=FeedData.getFieldByKey(this.contentItemsFeedFieldKey);this._items.forEach(function(t,i){t.image=this._createFeedImageFile(\"contentItems\",i),t.value=o.name+\" - image #\"+(i+1)},this)}}return this._state=new StateObject({itemIndex:this.startIndex,moved:!1,position:0,touchPosition:0}),this._animator=new EasingAnimation(this._state,\"position\",{exp:EasingAnimation.presets[this.autoAnimateEasing]}),this._preloadAssets(this._init),addClass(t,\"touchable\"),attach(t,\"tap\",this._handleTap),t},Swipey.prototype._loadImage=function(t,i,e){if(\"function\"==typeof i?(e=i,i={}):\"undefined\"==typeof i&&(i={}),\"string\"==typeof this.contentItemsFeedFieldKey&&t.dynamic){var s=e;e=function(i,e){t.meta={height:i.naturalHeight,width:i.naturalWidth},this.redrawLayout(),\"function\"==typeof s&&s(i,e)}.bind(this)}Swipey.uber._loadImage.call(this,t,i,e)},Swipey.prototype._preloadAssets=function(t){var i=0,e=function(){i++},s=function(){--i||t&&t()},n=[];if(this._items.length<3)n=this._items;else if(0===this.startIndex){if(n=this._items.slice(0,2),this.cyclic){var o=this._items.slice(-1);n.push(o[0])}}else this.startIndex===this._items.length-1?(n=this._items.slice(this.startIndex-1),this.cyclic&&n.push(this._items[0])):n=this._items.slice(this.startIndex-1,this.startIndex+2);e(),this._preloadDataSources(n,s),e(),this._preloadImage(new File(\"runner/loading.png\"),function(t,i){this._loadingImageUri=i,s()}.bind(this)),e(),this._preloadImage(new File(\"runner/image-placeholder.png\"),function(t,i){this._placeholderImageUri=i,s()}.bind(this))},Swipey.prototype._appear=function(){this._triggerOnFocus()},Swipey.prototype._init=function(){var t=document.createElement(\"div\");this.vertical&&addClass(t,\"vertical\"),this._listNode=document.createElement(\"ul\"),addClass(this._listNode,\"list\");var i=this._items.length>1,e=this.autoAnimate&&this.autoAnimatePreventUserInteraction;!e&&i&&attach(t,\"touchstart\",this._handleTouchStart),this._state.on(\"change:position\",function(){creative.adapter.Ticker.frame(this._draw,\"next\")}.bind(this)),this.pagination&&\"hidden\"!==this.pagination&&i&&(this._paginator=new Paginator({container:this.node,containerSize:this.size,position:this.pagination,itemsCount:this._items.length}),this._paginator.buildPagination()),this._items.forEach(this._addListItem),t.appendChild(this._listNode),this.node.appendChild(t),this.redrawLayout()},Swipey.prototype._getItemSize=function(t){var i=this.size.width,e=this.size.height,s=this._items[t],n=s.image;if(n){var o,h=n.width,a=n.height;return h>i&&(o=i/h,h=i,a=Math.ceil(a*o)),a>e&&(o=e/a,a=e,h*=o),this.vertical?a:h}return Math.round(.7*(this.vertical?e:i))},Swipey.prototype.redrawSceneLayout=function(){this._handleSizeUpdate(!1)},Swipey.prototype.redrawLayout=function(){this._handleSizeUpdate(!0)},Swipey.prototype._handleSizeUpdate=function(t){var i=this.size.width,e=this.size.height;if(this._items&&this._listNode&&(0!==i||0!==e)){var s,n=0;this._items.forEach(function(t,i){t.imgWidth=this._getItemSize(i),t.fullWidth=t.imgWidth+this.cellspacing,n+=t.fullWidth},this);var o=this.cyclic?Math.ceil((this.vertical?e:i)/n)+1:1,h=n*o;this._cycleWidth=n,this.vertical?this._listNode.style.height=h+\"px\":this._listNode.style.width=h+\"px\",this._removeAllListItems();for(var a=0;o>a;a++)this._items.forEach(this._addListItem);if(!this._initCompleted){this._initCompleted=!0;var r;r=this._jumpToItemIndexOnApear?this._jumpToItemIndexOnApear:this.startIndex,h>0&&this._jumpToItem(r)}this._items.forEach(function(t,i){for(var e=0;o>e;e++){var n=this._listNode.childNodes[e*this._items.length+i];\"LI\"===n.nodeName&&(s=n.firstChild,this._applyImageStyle(s,t),this.vertical?n.style.height=t.imgWidth+\"px\":n.style.width=t.imgWidth+\"px\")}}.bind(this)),this._paginator&&this._paginator.redrawPagination(this.size),t&&(this._state.position=this._getPositionForCentered(this._getItemCenter(this._state.itemIndex))),this._draw()}},Swipey.prototype._addListItem=function(t){var i=document.createElement(\"li\"),e=new Image;if(this._applyImageStyle(e,t),this.vertical?(i.style.height=t.image&&t.image.width+\"px\",i.style.marginTop=this.cellspacing+\"px\",i.style.marginBottom=this.cellspacing+\"px\"):(i.style.width=t.image&&t.image.width+\"px\",i.style.marginLeft=Math.ceil(this.cellspacing/2)+\"px\",i.style.marginRight=Math.floor(this.cellspacing/2)+\"px\"),t.image)creative.adapter.useNativeClickForTapDetection?(e=document.createElement(\"div\"),e.style.backgroundPosition=\"center center\",e.style.backgroundSize=\"contain\",e.style.backgroundRepeat=\"no-repeat\",t.imageUri?e.style.backgroundImage='url(\"'+t.imageUri+'\")':(e.style.backgroundImage='url(\"'+this._loadingImageUri+'\")',this._loadImage(t.image,function(i,e){this.style.backgroundImage='url(\"'+e+'\")',t.imageUri=e}.bind(e)))):t.imageUri?e.src=t.imageUri:(e.src=this._loadingImageUri,this._loadImage(t.image,function(i,e){this.src=e,t.imageUri=e}.bind(e))),i.className=\"touchable\",i.appendChild(e);else{var s=document.createElement(\"div\");\"string\"!=typeof this.contentItemsFeedFieldKey&&(i.className=\"empty\",s.style.backgroundImage='url(\"'+this._placeholderImageUri+'\")'),i.appendChild(s)}attach(i,\"tap\",function(){t.onSelect(new ActionContext(this,!0))}.bind(this)),this._listNode.appendChild(i)},Swipey.prototype._removeAllListItems=function(){[].slice.apply(this._listNode.childNodes).forEach(function(t){this._listNode.removeChild(t)}.bind(this))},Swipey.prototype._handleFocusAndBlur=function(){this._autoAnimateHaltedByUserTouch||(this._state.position=this._getPositionForCentered(this._getItemCenter(this._state.itemIndex))),this._triggerOnBlur(),this._triggerOnFocus()},Swipey.prototype._applyImageStyle=function(t,i){var e,s=this.size,n=s.width,o=s.height,h=t.width,a=t.height;i.image&&(h=i.image.width,a=i.image.height,creative.adapter.useNativeClickForTapDetection?t.style.width=t.style.height=\"100%\":h>n||a>o?h/a>n/o?(e=n/h,t.style.width=n+\"px\",t.style.height=a*e+\"px\"):(e=o/a,t.style.width=h*e+\"px\",t.style.height=o+\"px\"):(t.style.width=h+\"px\",t.style.height=a+\"px\"))},Swipey.prototype._draw=function(){if(this._initCompleted){var t=this._getListElementOffset(),i=0;this.vertical&&(i=Math.round(t-this.cellspacing/2),t=0),this._listNode.style.left=t+\"px\",this._listNode.style.top=i+\"px\"}},Swipey.prototype._snap=function(){var t,i,e,s,n,o,h=function(t){return this._state.itemIndex=this._wrapAround(t,this._items.length),this._getPositionForCentered(this._getItemCenter(t))}.bind(this);i=this._getFocusedVirtualIndex(),this.cyclic?(e=i+1,s=i-1):(i=clamp(0,this._items.length-1,i),e=clamp(0,this._items.length-1,i+1),s=clamp(0,this._items.length-1,i-1)),n=this._getPositionForNext(this._getItemCenter(i),i),o=this._getPositionForPrevious(this._getItemCenter(i),i),t=h(i!==this._lastFocusedVirtualIndex?i:this._state.position>n?e:this._state.positione&&n+this._items[e].fullWidth<=t;)n+=this._items[e].fullWidth,e++;return s+e},Swipey.prototype._mapIndexToPosition=function(t){for(var i=Math.floor(t/this._items.length)*this._items.length,e=Math.floor(t/this._items.length)*this._cycleWidth,s=0;t>i+s;)e+=this._items[s].fullWidth,s++;return e},Swipey.prototype._mapPositionToIndex=function(t){return this._wrapAround(this._mapPositionToVirtualIndex(t),this._items.length)},Swipey.prototype._getLeftStripEdge=function(t){return this.cyclic?Math.floor(t/this._cycleWidth)*this._cycleWidth:0},Swipey.prototype._getViewportCenter=function(){return this._state.position+this.size[this.vertical?\"height\":\"width\"]/2},Swipey.prototype._getFocusedVirtualIndex=function(){return this._mapPositionToVirtualIndex(this._getViewportCenter())},Swipey.prototype.getFocusedIndex=function(){return this._state.itemIndex},Swipey.prototype._getIndexOfCenteredItem=function(){return this._wrapAround(this._getFocusedVirtualIndex(),this._items.length)},Swipey.prototype._getItemCenter=function(t){var i=this._items[this._wrapAround(t,this._items.length)];return i&&i.fullWidth?this._mapIndexToPosition(t)+this._items[this._wrapAround(t,this._items.length)].fullWidth/2:0},Swipey.prototype._getNearestIndex=function(t){if(this.cyclic){var i=this._getFocusedVirtualIndex(),e=t-i,s=t-(i+this._items.length);return Math.abs(e)<=Math.abs(s)?this._getFocusedVirtualIndex()+e:this._getFocusedVirtualIndex()+s}return clamp(0,this._items.length-1,t)},Swipey.prototype._getPositionForCentered=function(t){return t-this.size[this.vertical?\"height\":\"width\"]/2},Swipey.prototype._getPositionForNext=function(t,i){var e=this._getPositionForCentered(t),s=this._items[this._wrapAround(i,this._items.length)].fullWidth*this._snapThreshold;return e+s},Swipey.prototype._getPositionForPrevious=function(t,i){var e=this._getPositionForCentered(t),s=this._items[this._wrapAround(i,this._items.length)].fullWidth*this._snapThreshold;return e-s},Swipey.prototype._getListElementOffset=function(){var t=this._state.position;return this._getLeftStripEdge(t)-t},Swipey.prototype._wrapAround=function(t,i){return(t%i+i)%i},Swipey.prototype.goToItem=function(t,i){t instanceof ActionContext&&(t=i.item,i=arguments[2]);var e=this._getNearestIndex(t),s=this._getPositionForCentered(this._getItemCenter(e));this._state.itemIndex=this._wrapAround(e,this._items.length),this._animateTo(s,i)},Swipey.prototype.nextItem=function(t){this.goToItem(this._getFocusedVirtualIndex()+1,t)},Swipey.prototype.previousItem=function(t){this.goToItem(this._getFocusedVirtualIndex()-1,t)},Swipey.prototype.jumpToItem=function(t){t instanceof ActionContext&&(t=arguments[1].item),this._stopAutoAnimate(),this._animator.running&&this._animator.pause(),this._jumpToItem(t)},Swipey.prototype._jumpToItem=function(t){this._initCompleted||(this._jumpToItemIndexOnApear=t),this._state.itemIndex=this._wrapAround(this._getNearestIndex(t),this._items.length),this._state.position=this._getPositionForCentered(this._getItemCenter(this._state.itemIndex)),this._handleFocusAndBlur(),this._paginator&&this._paginator.setActivePaginationItem(this._state.itemIndex)},Swipey.prototype._normalizeEvent=function(t){var i=function(t,i){var e,s;for(e=0;ethis._getPositionForCentered(this._getItemCenter(this._items.length-1));i.position+=this.cyclic||!a&&!r?h:h/this._rubberBandQuotient,i.moved=!0,i.touchPosition=o,this.attachClickPreventionHandler()}}},Swipey.prototype._handleTouchEnd=function(t){creative.adapter.useNativeClickForTapDetection||t.preventDefault(),this._allowHorizontalSwipe=!0,this._horizontalSwipeInProgress=!1,this._currentTouchIdentifier==t.changedTouches[0].identifier&&(this._currentTouchIdentifier=t.touches[0]?t.touches[0].identifier:null);{var i=this._state,e=this._normalizeEvent(t),s=this.vertical?e.y:e.x;this.vertical?this._firstTouchStart.y:this._firstTouchStart.x}if(0===t.touches.length){this._autoAnimateHaltedByUserTouch=!1,this._touchHandlersAttached=!1,detach(this.parentUnit.node,\"touchmove\",this._handleTouchMove),detach(this.parentUnit.node,\"touchend\",this._handleTouchEnd),detach(this.parentUnit.node,\"touchcancel\",this._handleTouchCancel),this._animator.running||this._snap();var n=this._items[this._state.itemIndex].fullWidth*this._snapThreshold,o={firstTouch:this._firstTouchStart,lastTouch:e,minDistanceForSwipe:n,validAxis:this.vertical?\"y\":\"x\"},h=_analyzeTouch(o);h.isConsideredSwipe&&this._actionContextOfFirstTouchStart.trackUserInteraction(),this._actionContextOfFirstTouchStart=null,this._lastFocusedVirtualIndex=null}else i.touchPosition=s},Swipey.prototype._handleTouchCancel=function(t){this._handleTouchEnd(t)},Swipey.prototype._triggerOnFocus=function(){0!==this._items.length&&Swipey.uber._triggerOnFocus.call(this)},Swipey.prototype._triggerOnBlur=function(){0!==this._items.length&&Swipey.uber._triggerOnBlur.call(this)},Swipey.prototype.resetAction=function(t,i,e){Swipey.uber.resetAction.call(this,t,i,function(){this._jumpToItem(this.startIndex),this._autoAnimateDisabledByUserTouch=!1,e()}.bind(this))},Swipey.prototype.getField=function(){return{type:\"string\",value:this._items?this._items[this.getFocusedIndex()].value:\"\"}},Swipey.prototype.allowAutoAnimate=function(){return!this._autoAnimateDisabledByUserTouch&&!this._autoAnimateHaltedByUserTouch},Swipey.prototype.resetAllowAutoAnimate=function(){this._autoAnimateDisabledByUserTouch=!1};;\nfunction Hotspot(){}inherit(Hotspot,ScreenObject),Hotspot.toString=function(){return\"[Clazz Hotspot]\"},Hotspot.prototype.toString=function(){return\"[Hotspot \"+this.localId+\"]\"},Hotspot.prototype.createNode=function(){var t=Hotspot.uber.createNode.call(this);return addClass(t,\"touchable\"),attach(t,\"tap\",this.handleTap),t},Hotspot.prototype.handleTap=function(t){t.stopPropagation()};;\nfunction Picture(){}inherit(Picture,ScreenObject),extend(Picture.prototype,FeedImageCreator),Picture.toString=function(){return\"[Clazz Picture]\"},Picture.prototype.toString=function(){return\"[Picture \"+this.localId+\"]\"},Picture.prototype.createNode=function(){var e={};\"string\"==typeof this.imageSourceFeedFieldKey&&(FeedData.checkAndTrackValue(this.imageSourceFeedFieldKey,this.imageSourceFeedRowIndex,this.constructor.name,\"imageSourceFeedFieldKey\"),this.file=this._createFeedImageFile(\"imageSource\",this.imageSourceFeedRowIndex));var i=Picture.uber.createNode.call(this);return this.file===this.placeholderFile?(\"string\"==typeof this.imageSourceFeedFieldKey||this._newFileWasSet||(addClass(i,\"empty\"),this._preloadImage(new File(\"runner/image-placeholder.png\"),function(e,t){this._isSettingFileInProgress||(i.style.backgroundImage=\"url(\"+t+\")\")}.bind(this))),i):(this.file&&this._preloadImage(this.file,e,function(e){this._newFileWasSet||this._handlePreloadedImage(i,e)}.bind(this)),i)},Picture.prototype.awake=function(){Picture.uber.awake.call(this),this.placeholderFile=new File(\"runner/image-placeholder.png\"),this.placeholderFile.meta={height:28,width:28},this.file||(this.file=this.placeholderFile),this._originalFile=this.file,this._newFileWasSet=!1},Picture.prototype._handlePreloadedImage=function(e,i){this.file.dynamic&&(this.file.meta={height:i.naturalHeight,width:i.naturalWidth});var t=\"\",r=\"\",a=\"no-repeat\";this.imagePosition&&(t=this.imagePosition.replace(\"-\",\" \"));var s=this.sizeUsingTransforms()?this.getNaturalSize():this.size,h=this.fittingSize;switch(\"fitUpToOriginal\"===this.fittingSize&&(h=s.widtho&&\"fit\"==this.fittingSize||o>h&&\"fill\"==this.fittingSize,i=o>h&&\"fit\"==this.fittingSize||h>o&&\"fill\"==this.fittingSize,t=a,r=s,e?r=a/n*l:i&&(t=s/l*n),t>c&&(r*=c/t,t=c),r>c&&(t*=c/r,r=c),{width:t,height:r})},Picture.prototype.getImageUrl=function(){return this.file?this.file.getUrl():void 0};;\nfunction Shapey(){}inherit(Shapey,ScreenObject),Shapey.toString=function(){return\"[Clazz Shapey]\"},Shapey.prototype.toString=function(){return\"[Shapey \"+this.localId+\"]\"},Object.defineProperties(Shapey.prototype,{_borderRoundness:{get:function(){var e=0,t=0,r=0,a=this._defaultValues.roundness;if(\"number\"==typeof this.roundness&&(a=this.roundness),a>0){var o=Math.min(this.getNaturalSize().height,this.getNaturalSize().width),s=o/2,i=Math.max(this.getNaturalSize().height,this.getNaturalSize().width),h=i/2;if(50>a){var d=a/50;e=s*d}else{var n=(a-50)/50,l=(h-s)*n,p=s+l;t=this.getNaturalSize().width==o?s:p,r=this.getNaturalSize().height==o?s:p}}return this.shadow&&ios(\"8\")&&window.devicePixelRatio>=3&&(1>e&&(e=1),1>t&&(t=1),1>r&&(r=1)),50>a?e+\"px\":t+\"px \"+r+\"px\"}}}),Shapey.prototype.awake=function(){Shapey.uber.awake.call(this),this._defaultValues={backgroundColor:\"#365c99\",borderColor:\"#000000\",borderWidth:5,roundness:0,shadowAngle:0,shadowBlur:10,shadowColor:\"rgba(0,0,0,0.5)\",shadowDistance:0}},Shapey.prototype.createNode=function(){var e=Shapey.uber.createNode.call(this);this._privateApiTracked={},addClass(e,\"touchable\"),this._shapey=document.createElement(\"div\");var t=this._defaultValues.backgroundColor;if(\"string\"==typeof this.backgroundColorFeedFieldKey){FeedData.checkAndTrackValue(this.backgroundColorFeedFieldKey,this.backgroundColorFeedRowIndex,this.constructor.name,\"backgroundColorFeedFieldKey\");var r=FeedData.getFieldValueByKey(this.backgroundColorFeedFieldKey,this.backgroundColorFeedRowIndex);t=\"string\"==typeof r&&FeedData.isCorrectFieldType(this.backgroundColorFeedFieldKey,this.constructor.name,\"backgroundColorFeedFieldKey\")?r:\"transparent\"}else\"string\"==typeof this.backgroundColor&&(t=this.backgroundColor);if(Color.isGradient(t)){var a=Color.createGradientStyle(t);this.addStyle({\".gradient-shapey\":a}),addClass(this._shapey,\"gradient-shapey\")}else this._shapey.style.backgroundColor=t;if(this.border){var o=\"undefined\"!=typeof this.borderColor?this.borderColor:this._defaultValues.borderColor,s=\"number\"==typeof this.borderWidth?this.borderWidth:this._defaultValues.borderWidth;if(this._shapey.style.borderColor=o,this._shapey.style.borderStyle=\"solid\",this._shapey.style.borderWidth=s+\"px\",deviceInfo.browser.chrome()||deviceInfo.browser.samsung()){var i=\"1\";if(Color.isRgba(o)){var h=Color.patternRgba.exec(o);i=h[Color.matchRgbaAlpha]}\"1\"===i&&(this._shapey.style.backgroundClip=\"border-box\")}}if(this.shadow){var d=(\"number\"==typeof this.shadowAngle?this.shadowAngle:this._defaultValues.shadowAngle)*(Math.PI/180),n=\"number\"==typeof this.shadowBlur?this.shadowBlur:this._defaultValues.shadowBlur,l=\"undefined\"!=typeof this.shadowColor?this.shadowColor:this._defaultValues.shadowColor,p=\"number\"==typeof this.shadowDistance?this.shadowDistance:this._defaultValues.shadowDistance,u=Math.round(p*Math.cos(d)),y=Math.round(p*Math.sin(d));celtra.styler.css(this._shapey,\"boxShadow\",u+\"px \"+y+\"px \"+n+\"px \"+l)}return e.appendChild(this._shapey),e},Shapey.prototype.redrawLayout=function(){if(this._shapey){var e=this._borderRoundness;parseInt(e,10)>0&&(this._shapey.style.borderTopLeftRadius=e,this._shapey.style.borderTopRightRadius=e,this._shapey.style.borderBottomLeftRadius=e,this._shapey.style.borderBottomRightRadius=e)}},Shapey.prototype._track=function(e){this._privateApiTracked[e]||(this._privateApiTracked[e]=!0,creative.track({name:\"retiredFeatureUsed\",featureType:\"apifunction\",featureName:e}))},Shapey.deprecatedPropertiesArray=[\"borderRoundness\",\"shapey\",\"defaultValues\"],Shapey.deprecatedPropertiesObject={},Shapey.deprecatedPropertiesArray.forEach(function(e){Shapey.deprecatedPropertiesObject[e]={get:function(){return this._track(\"Shapey.\"+e+\".getter\"),this[\"_\"+e]},set:function(t){this._track(\"Shapey.\"+e+\".setter\"),this[\"_\"+e]=t}}}),Object.defineProperties(Shapey.prototype,Shapey.deprecatedPropertiesObject);;\nfunction FixedDataSource(){}extend(FixedDataSource.prototype,Deferrable),extend(FixedDataSource.prototype,TriggerHost),FixedDataSource.toString=function(){return\"[Clazz FixedDataSource]\"},FixedDataSource.prototype.toString=function(){return\"[FixedDataSource \"+this.localId+\"]\"},FixedDataSource.prototype.getItems=function(){var e=[];return this.items.forEach(function(r){extend(r,TriggerHost);var t={image:r.image,imageNode:null,imageUri:null,value:r.value,onSelect:function(e,t){r.hasTriggers(\"select\")&&(e.trackUserInteraction(),r.fireTriggers(\"select\",null,t,e))},onFocus:function(e,t,i){e.screen.appearedAtLeastOnce?t?r.fireTriggers(\"itemFocusLegacy\",null,i,e):r.fireTriggers(\"itemFocus\",null,i,e):e.screen.once(\"appeared\",function(){t?r.fireTriggers(\"itemFocusLegacy\",null,i,e):r.fireTriggers(\"itemFocus\",null,i,e)})},onBlur:function(e,t){r.fireTriggers(\"itemBlur\",null,t,e)}};e.push(t)}),e};;\nfunction File(t){if(t){if(\"string\"==typeof t)return void(this.url=t);if(!t.url)throw\"Url parameter must be set.\";if(deep(this,t),0===this.url.indexOf(creative.cachedApiUrl)||0===this.url.indexOf(creative.insecureCachedApiUrl)){var i=this.url.split(\"/\");\"undefined\"==typeof this.name&&(this.name=i[i.length-1]||\"unknown\"),\"undefined\"==typeof this.blobHash&&(this.blobHash=i[i.length-2]),\"undefined\"==typeof this.retinaScaleFactor&&(this.retinaScaleFactor=File.getRetinaScaleFactor(this.name)),\"undefined\"==typeof this.quality&&(this.quality=File.getDefaultQuality(this.name))}}}File.toString=function(){return\"[Clazz File]\"},File.prototype.toString=function(){return\"[File \"+this.localId+\"(\"+this.name+\"/\"+this.url+\")]\"},File.prototype.getOriginalUrl=function(){if(this.url){if(-1!==this.url.indexOf(\"://\"))return this.url;if(\"/\"===this.url[0])throw\"An absolute path as URL?\";return creative.resourceUrl+this.url}if(this.blobHash)return(creative.secure?creative.cachedApiUrl:creative.insecureCachedApiUrl)+\"blobs/\"+this.blobHash+\"/\"+encodeURIComponent(this.name);throw\"Neither url nor blobHash set?\"},File.prototype.getUrl=function(t){var i=this.getOriginalUrl();return this.optimizable&&(i+=\"?transform=crush\",this.quality>-1&&(i+=\"&quality=\"+this.quality),t&&this.optimizedWidth(t)>0&&this.optimizedHeight(t)>0&&(i+=\"&resize=\"+this.optimizedWidth(t)+\"x\"+this.optimizedHeight(t)),this.dynamic&&\"string\"==typeof this.fitting&&this.fitting.length>0&&(i+=\"&fitting=\"+this.fitting)),i},File.prototype.getDataUri=function(t,i){t instanceof Function&&(i=t,t={});var e=!this.dynamic&&(\"undefined\"!=typeof this.blobHash||this.url.indexOf(\"api/animateySprites\")>=0),n=creative.adapter.protoLoading.dataURIsSupported,r=creative.adapter.protoLoading.blobURIsSupported,a=\"treatment\"===(creative.experiments.get(\"UseDataURIsGlobally\")||{}).chosenVariant,h=1==creative.runtimeParams.dataURIsEnabled||1==creative.runtimeParams.turnOnBatching,o=(n||r)&&!creative.adapter.autoDecodesURLParams,s=(!!t.preferBatching||a||h)&&o&&e,l=this.getUrl(t.creativeUnitVariantId);\"undefined\"!=typeof this.dataUri?defer(function(){i(this.dataUri)}.bind(this),0,\"File.getDataUri defer callback, has dataUri\"):s?creative.batcher.getDataUri(l,i):defer(function(){i(l)},0,\"File.getDataUri defer callback, url\")},Object.defineProperties(File.prototype,{dynamic:{get:function(){return\"undefined\"!=typeof this._dynamic&&this._dynamic},set:function(t){this._dynamic=t},enumerable:!0,configurable:!1},optimizable:{get:function(){var t=this.getOriginalUrl(),i=0===t.indexOf(creative.cachedApiUrl)||0===t.indexOf(creative.insecureCachedApiUrl),e=creative.experiments?creative.experiments.get(\"FeedImageOptimization\")||{}:{},n=\"on\"===e.chosenVariant,r=i&&(!this.dynamic||n),a=!!String(this.name).match(/\\.(gif|png|jpe?g)$/i);return r&&a},enumerable:!0,configurable:!1},retina:{get:function(){return this.retinaScaleFactor>1},enumerable:!0,configurable:!1},width:{get:function(){return this.retina?Math.round(this.meta.width/this.retinaScaleFactor):this.meta.width},enumerable:!0,configurable:!1},height:{get:function(){return this.retina?Math.round(this.meta.height/this.retinaScaleFactor):this.meta.height},enumerable:!0,configurable:!1},optimizedWidth:{get:function(){return function(t){if(\"number\"!=typeof t||!this.optimizationSettings)return null;for(var i=null,e=0;e1,a=-1;return i?a=r?150:256:n?a=r?75:85:e&&(a=r?65:85),a},File.getRetinaScaleFactor=function(t){t=String(t);var i=new RegExp(\"^.*(@([2-\"+File.MAXIMUM_SUPPORTED_RETINA_SCALE+\"]+)x)\"),e=t.toLowerCase().match(i);return e&&e[2]?parseInt(e[2],10):1};;\nfunction Font(){}inherit(Font,FontBase),Font.toString=function(){return\"[Clazz Font]\"},Font.prototype.toString=function(){return\"[Font \"+this.localId+\"]\"},Font.prototype.hasFeedFields=function(){return this.feedFields instanceof Array},Font.prototype.getSubsetString=function(){var t=Font.uber.getSubsetString.apply(this);if(!this.hasFeedFields())return t;if(\"string\"==typeof this.extendedSubsetString)return this.extendedSubsetString;var e=t||\"\";return this.feedFields.forEach(function(t){var n=FeedData.getFieldRowsByKey(t);n.forEach(function(t){\"string\"==typeof t.value&&(e+=t.value)})}),this.extendedSubsetString=e.replace(/[\\r\\n\\t\\f\\v]/g,\"\").split(\"\").filter(function(t,e,n){return n.indexOf(t)===e}).sort().join(\"\"),this.extendedSubsetString},Font.prototype.getUnicodeRange=function(){return this.hasFeedFields()?\"\":Font.uber.getUnicodeRange.apply(this)};;\n!function(){function t(){return this.sizeUsingTransforms()?r:a}function e(t,i){if(t instanceof Object&&t.constructor===Object){var n={};return Object.keys(t).forEach(function(h){n[h]=e(t[h],i)}),n}return\"number\"==typeof t?t*i:t}function i(t,e,i){return function(){return this.isAnimated&&(\"string\"!=typeof i||this[i])?e.apply(this,arguments):t.apply(this,arguments)}}function n(n,h,s){var a=n[h],r=function(){return e(a.apply(this,arguments),t.call(this))};n[h]=i(a,r,s)}function h(t,e,i){var h=\"get\"+ucfirst(e);n(t,h,i)}function s(){return this.isAnimated}var a=1,r=2;if(ScreenObject.prototype.positionUsingTransforms=s,ScreenObject.prototype.sizeUsingTransforms=s,\"undefined\"!=typeof Picture){Picture.prototype.positionUsingTransforms=s,Picture.prototype.sizeUsingTransforms=s;var o=Picture.prototype.awake;Picture.prototype.awake=function(){o.apply(this,arguments),this._imageElement=null,this.on(\"appear\",this._drawImage.bind(this))};var l=Picture.prototype.createNode;Picture.prototype.createNode=function(){return this.parentContainer.on(\"resize\",this._drawImage.bind(this)),l.apply(this,arguments)},Picture.prototype._drawImage=function(){if(this._imageElement){if(\"stretch\"==this.fittingSize)return this._imageElement.style.position=\"absolute\",this._imageElement.style.left=\"0px\",this._imageElement.style.top=\"0px\",this._imageElement.style.width=\"100%\",void(this._imageElement.style.height=\"100%\");var t=this.imagePosition?this.imagePosition.split(\"-\"):[\"left\",\"top\"];1===t.length&&([\"left\",\"right\"].indexOf(t[0])>-1?t.push(\"center\"):t.unshift(\"center\"));var e,i,n=this.file.width/this.file.height,h=this.sizeUsingTransforms()?this.getNaturalSize():this.size,s=h.width/h.height,a=this.fittingSize;\"fitUpToOriginal\"===this.fittingSize&&(a=h.widths?(e=h.width,i=this.file.height*(h.width/this.file.width)):(e=this.file.width*(h.height/this.file.height),i=h.height):\"fill\"===a&&(n>s?(e=this.file.width*(h.height/this.file.height),i=h.height):(e=h.width,i=this.file.height*(h.width/this.file.width)));var r,o;if(\"repeat\"===a)r={left:0,center:Math.round((h.width*this._patternPixelRatio-e)/2),right:h.width*this._patternPixelRatio-e},o={top:0,center:Math.round((h.height*this._patternPixelRatio-i)/2),bottom:h.height*this._patternPixelRatio-i},this._imageElementsCtx.canvas.width=h.width*this._patternPixelRatio,this._imageElementsCtx.canvas.height=h.height*this._patternPixelRatio,this._imageElement.style.width=h.width+\"px\",this._imageElement.style.height=h.height+\"px\",this._imageElementsCtx.save(),this._imageElementsCtx.fillStyle=this._pattern,this._imageElementsCtx.translate(r[t[0]],o[t[1]]),this._imageElementsCtx.fillRect(-r[t[0]],-o[t[1]],h.width*this._patternPixelRatio,h.height*this._patternPixelRatio),this._imageElementsCtx.restore();else{r={left:\"left: 0px;\",center:\"left: \"+Math.round((h.width-e)/2)+\"px;\",right:\"right: 0px;\"},o={top:\"top: 0px;\",center:\"top: \"+Math.round((h.height-i)/2)+\"px;\",bottom:\"bottom: 0px;\"};var l=r[t[0]]+\" \"+o[t[1]]+\" \",p=\"width: \"+e+\"px; height: \"+i+\"px; \",g=\"\";this._imageElement.style.cssText=\"position: absolute; \"+l+p+g}}},Picture.prototype._handlePreloadedImage=function(t,e){(this.file.dynamic||\"repeat\"===this.fittingSize)&&(this.file.meta={height:e.naturalHeight,width:e.naturalWidth}),\"repeat\"===this.fittingSize?(this._imageElement=document.createElement(\"canvas\"),this._imageElementsCtx=this._imageElement.getContext(\"2d\"),this._pattern=this._imageElementsCtx.createPattern(e,\"repeat\"),this._patternPixelRatio=e.naturalWidth/this.file.width):this._imageElement=e,this._drawImage(),t.appendChild(this._imageElement)}}var p=Screen.prototype.resetAction;Screen.prototype.resetAction=function(t){Scene.instances.forEach(function(e){e.parentScreen===this&&e.resetAction(t,{},noop)}.bind(this)),p.apply(this,arguments)},ScreenObject._roundIfNeeded=function(t){return t};var g=[\"fontSize\",\"lineSpacing\",\"letterSpacing\",\"scaleBaseHeight\",\"scaleBaseWidth\",\"textShadowBlur\",\"textShadowOffset\"];if(\"undefined\"!=typeof Texty){n(Texty.prototype,\"getNaturalSize\");var f=[\"textPaddingTop\",\"textPaddingRight\",\"textPaddingBottom\",\"textPaddingLeft\"];f.forEach(function(t){h(Texty.prototype,t,\"useFontScaleFactorForPadding\")}),g.forEach(function(t){h(Texty.prototype,t)})}var c=[\"borderWidth\",\"shadowDistance\",\"shadowBlur\"].concat(g);\"undefined\"!=typeof Button&&(n(Button.prototype,\"getNaturalSize\"),c.forEach(function(t){h(Button.prototype,t)}))}();;\n!function(n){function t(n,t,e){var u=n.filter(function(n){return n.id===t})[0];return u&&u.value?u.value:e}function e(n,t,e,u){var r=.001,i=3*n,a=3*(e-n)-i,o=1-i-a,c=3*t,f=3*(u-t)-c,s=1-c-f,I=function(n){return((o*n+a)*n+i)*n},O=function(n){return((s*n+f)*n+c)*n},h=function(n){return(3*o*n+2*a)*n+i},p=function(n){var t,e,u,i,a,o;for(u=n,o=0;8>o;o++){if(i=I(u)-n,Math.abs(i)u)return t;if(u>e)return e;for(;e>t;){if(i=I(u),Math.abs(i-n)i?t=u:e=u,u=.5*(e-t)+t}return u};return function(n){return O(p(n))}}function u(n){return Math.pow(n,2)}function r(n){return Math.pow(n,3)}function i(n){return Math.pow(n,4)}function a(n){return Math.pow(n,5)}function o(n){return 1-Math.cos(n*Math.PI*.5)}function c(n){return Math.pow(2,10*(n-1))}function f(n){return 1-Math.sqrt(1-n*n)}var s={none:function(){return 0},steps:function(n,e){var u=t(e,\"steps\",3),r=t(e,\"jump-position\",\"end\"),i=1/u,a=n*u;return Math[\"end\"===r?\"floor\":\"ceil\"](a)*i},linear:function(n){return n},easeIn:e(.42,0,1,1),easeOut:e(0,0,.58,1),easeInOut:e(.42,0,.58,1),easeInQuad:u,easeOutQuad:function(n){return 1-u(1-n)},easeInOutQuad:function(n){return.5>n?.5*u(2*n):1-.5*u(2*(1-n))},easeInCubic:r,easeOutCubic:function(n){return 1-r(1-n)},easeInOutCubic:function(n){return.5>n?.5*r(2*n)/2:1-.5*r(2*(1-n))},easeInQuart:i,easeOutQuart:function(n){return 1-i(1-n)},easeInOutQuart:function(n){return.5>n?.5*i(2*n):1-.5*i(2*(1-n))},easeInQuint:a,easeOutQuint:function(n){return 1-a(1-n)},easeInOutQuint:function(n){return.5>n?.5*a(2*n):1-.5*a(2*(1-n))},easeInSine:o,easeOutSine:function(n){return 1-o(1-n)},easeInOutSine:function(n){return.5*o(2*n)},easeInExpo:c,easeOutExpo:function(n){return 1-c(1-n)},easeInOutExpo:function(n){return.5>n?.5*c(2*n):1-.5*c(2*(1-n))},easeInCirc:f,easeOutCirc:function(n){return 1-f(1-n)},easeInOutCirc:function(n){return.5>n?.5*f(2*n):1-.5*f(2*(1-n))},easeInBack:e(.6,-.28,.735,.045),easeOutBack:e(.175,.885,.32,1.275),easeInOutBack:e(.68,-.55,.265,1.55),cubicBezier:e};\"undefined\"!=typeof module&&null!==module?Object.keys(s).forEach(function(n){module.exports[n]=s[n]}):n.AnimationTimingFunctions=s}(this);;\n!function(n){function i(n,a,o){this._propertyTweens={},o=o||i.getUsedProperties(n);var u=t(n);for(var s in o){var v=o[s],f=r(v,u);this._propertyTweens[v]=new e(f,a)}}function e(n,i){this._keyframes=n,this._defaultTimingFunction=i||AnimationTimingFunctions.linear,this._tweenable=o(this._keyframes),a(this._keyframes)}function t(n){var i=[];for(var e in n){var t=parseFloat(e);i[Math.round(t*u)]=n[e]}return i}function r(n,i){var e,t={};for(var r in i)if(n in i[r]){\"undefined\"==typeof t[r]&&(t[r]={});var a=i[r][n];a instanceof Object?(\"undefined\"!=typeof a.value&&null!==a.value&&(e=a.value,t[r].value=a.value),a.timingFunction&&(t[r].timingFunction=a.timingFunction)):(e=a,t[r].value=a,i[r].timingFunction&&(t[r].timingFunction=i[r].timingFunction))}return\"undefined\"==typeof t[v]&&(t[v]={value:e}),t}function a(n){if(!(s in n))throw new Error(\"Missing initial keyframe!\");if(!(v in n))throw new Error(\"Missing final keyframe!\")}function o(n){for(var i in n)return\"number\"==typeof n[i].value}var u=1e5,s=0*u,v=100*u;i.prototype.getValuesAt=function(n){var i={};for(var e in this._propertyTweens)i[e]=this._propertyTweens[e].getValueAt(n);return i},i.getUsedProperties=function(n){var i={};for(var e in n)for(var t in n[e])\"timingFunction\"!=t&&(i[t]=!0);return Object.keys(i)},e.prototype.getValueAt=function(n){n=Math.round(n*u);var i,e;for(var t in this._keyframes)t==n?(i={position:t,values:this._keyframes[t]},e={position:t,values:this._keyframes[t]}):n>t?i={position:t,values:this._keyframes[t]}:t>n&&!e&&(e={position:t,values:this._keyframes[t]});if(!this._tweenable)return i.values.value;var r=e.position-i.position,a=n-i.position,o=0==r?0:a/r,s=i.values.timingFunction&&i.values.timingFunction.instance?i.values.timingFunction.instance:this._defaultTimingFunction,v=i.values.timingFunction&&i.values.timingFunction.parameters?i.values.timingFunction.parameters:[];o=s(o,v);var f=e.values.value-i.values.value,l=f*o;return i.values.value+l},n.KeyframeAnimation=i}(this);;\nfunction BaseScenePlayer(e){this._scene=e,this._state=new StateObject({progress:-1}),this._update=this._update.bind(this),this._render=this._render.bind(this),this._end=this._end.bind(this),this.paused=!0,this.ended=!1,this.supportsAutoplay=!1,this.supportsFallback=!0}extend(BaseScenePlayer.prototype,EventEmitter),Object.defineProperty(BaseScenePlayer.prototype,\"progress\",{get:function(){return-1!==this._state.progress?this._state.progress:this.ended?100:0}}),BaseScenePlayer.prototype._update=function(){this._state.isDirty(\"progress\")&&(this._scene.updateObjects(this._state.progress),this.emit(\"progress\",this._state.progress))},BaseScenePlayer.prototype._render=function(){this._state.isDirty(\"progress\")&&(this._scene.renderObjects(),this.emit(\"render\"),this._state.markClean())},BaseScenePlayer.prototype._cancel=function(){Ticker.removeFrame(this._update,\"update\"),Ticker.removeFrame(this._render,\"render\"),Ticker.removeFrame(this._end,\"next\"),this._state.markClean(),this.paused=!0},BaseScenePlayer.prototype._end=function(){this.stop(),this.emit(\"end\")},BaseScenePlayer.prototype._stop=noop,BaseScenePlayer.prototype._pause=noop,BaseScenePlayer.prototype._play=function(){return!0},BaseScenePlayer.prototype.play=function(){this._cancel(),this._play()&&(this.paused=!1,Ticker.frame(this._update,\"update\"),Ticker.frame(this._render,\"render\"),this.emit(\"play\"))},BaseScenePlayer.prototype.displayFallbackFrame=function(e){this._scene.updateObjects(Math.max(0,Math.min(e,100))),this._scene.renderObjects(),this._state.progress=e,this._state.markClean()},BaseScenePlayer.prototype.pause=function(){this.silentPause(),this.emit(\"pause\")},BaseScenePlayer.prototype.silentPause=function(){this.ended=100===this._state.progress,(0===this._state.progress||100===this._state.progress)&&(this._state.progress=-1),this._cancel(),this._pause()},BaseScenePlayer.prototype.stop=function(){this._stop(),this.silentPause(),this.emit(\"stop\")},BaseScenePlayer.prototype.destroy=function(){this._cancel()};;\nfunction TimeScenePlayer(e){TimeScenePlayer.uberConstructor.call(this,e),this._state.registerValue(\"loopCount\",0),this._elapsedTime=null,this._startTime=null,this._lastUpdateTime=null,this.supportsFallback=!1}inherit(TimeScenePlayer,BaseScenePlayer),Object.defineProperty(TimeScenePlayer.prototype,\"_loopEnded\",{get:function(){return\"stop\"===this._scene.onEnd&&this._state.progress>=100||\"repeat\"===this._scene.onEnd&&this._scene.onEndRepeatCount&&this._state.loopCount>=this._scene.onEndRepeatCount||\"reverse\"===this._scene.onEnd&&this._scene.onEndReverseCount&&this._state.loopCount>=2*this._scene.onEndReverseCount||0===this._scene.getDuration().milliseconds}}),Object.defineProperty(TimeScenePlayer.prototype,\"_newLoopStarted\",{get:function(){return this._state.isDirty(\"loopCount\")}}),TimeScenePlayer.prototype._update=function(e){var t=this._scene.getDuration().milliseconds;this._startTime=this._startTime||e,this._lastUpdateTime&&(this._startTime-=this._lastUpdateTime,this._lastUpdateTime=null),this._elapsedTime=e-this._startTime,this._state.loopCount=Math.floor(t>0?this._elapsedTime/t:1);var s,i=100*(t>0?this._elapsedTime/t:1),n=i%100;s=\"repeat\"===this._scene.onEnd?this._loopEnded||this._newLoopStarted?100:n:\"reverse\"===this._scene.onEnd?this._newLoopStarted&&this._state.loopCount%2?100:this._loopEnded?0:this._state.loopCount%2?100-n:n:i,this._state.progress=Math.max(0,Math.min(s,100)),TimeScenePlayer.uber._update.apply(this,arguments),this._loopEnded&&Ticker.frame(this._end,\"next\")},TimeScenePlayer.prototype._pause=function(){this._lastUpdateTime||(this._lastUpdateTime=this._elapsedTime),this._elapsedTime=null,this._startTime=null},TimeScenePlayer.prototype._stop=function(){this._lastUpdateTime=null,this._elapsedTime=null,this._state.loopCount=0};;\n";
head.appendChild(js);
// Run!
// Check for runtimeParams to prevent IE 10 from initializing the creative early when host page is refreshed
if (typeof runtimeParams === 'undefined') return;
Creative.init({"id":"637f7a91","clazz":"CrossScreenBanner","intendedDeviceType":"Any","name":"HOUAE0000039442-001 | BLOO FIN SUSHI & BAR | Flipbook_970X250","units":{"banner":{"clazz":"CreativeUnitWithVariants","localId":1,"variants":[{"localId":2,"clazz":"CreativeUnitVariant","master":{"hiddenInBuilder":false,"lockedInBuilder":false,"triggers":[],"scenes":[],"showOverflow":false,"title":"Master","localId":3,"objects":[],"clazz":"Screen","guidelines":[],"isAnimated":false,"immediatelyPlayedScenes":{"appear":{"scenesLocalIds":[]},"firstAppear":{"scenesLocalIds":[]}},"reachableScreensLocalIds":[],"dynamicReachableScreenConditions":{}},"screens":[{"hiddenInBuilder":false,"lockedInBuilder":false,"triggers":[{"localId":96,"type":"appear","onFire":{"clazz":"ActionInvocation","actionClazz":"Kernel","instanceLocalId":null,"method":"runInSequence","isStatic":true,"args":{"actions":[{"clazz":"ActionInvocation","actionClazz":"Kernel","instanceLocalId":null,"method":"runInParallel","isStatic":true,"args":{"actions":[{"clazz":"ActionInvocation","localId":97,"disabled":false,"actionClazz":"Scene","instanceLocalId":"90","method":"playScene","isStatic":false,"args":{"target":"90"},"isAnimated":false}]}},{"clazz":"ActionInvocation","actionClazz":"Kernel","instanceLocalId":null,"method":"runInParallel","isStatic":true,"args":{"actions":[{"clazz":"ActionInvocation","localId":340,"disabled":false,"actionClazz":"Scene","instanceLocalId":null,"method":"playScene","isStatic":false,"args":{"target":null},"isAnimated":false}]}},{"clazz":"ActionInvocation","actionClazz":"Kernel","instanceLocalId":null,"method":"runInParallel","isStatic":true,"args":{"actions":[{"clazz":"ActionInvocation","localId":346,"disabled":false,"actionClazz":"Scene","instanceLocalId":null,"method":"playScene","isStatic":false,"args":{"target":null},"isAnimated":false}]}},{"clazz":"ActionInvocation","actionClazz":"Kernel","instanceLocalId":null,"method":"runInParallel","isStatic":true,"args":{"actions":[{"clazz":"ActionInvocation","localId":1890,"disabled":false,"actionClazz":"Scene","instanceLocalId":null,"method":"playScene","isStatic":false,"args":{"target":null},"isAnimated":false}]}},{"clazz":"ActionInvocation","actionClazz":"Kernel","instanceLocalId":null,"method":"runInParallel","isStatic":true,"args":{"actions":[{"clazz":"ActionInvocation","localId":1891,"disabled":false,"actionClazz":"Scene","instanceLocalId":"1882","method":"playScene","isStatic":false,"args":{"target":"1882"},"isAnimated":false}]}}]}},"isCustom":false,"isAnimated":false}],"scenes":[{"clazz":"Scene","localId":90,"name":"Scene 1","type":"time","duration":12,"endingMode":"lastKeyframe","onEnd":"stop","onEndRepeatCount":0,"onEndReverseCount":0,"onEndWaitForCount":true,"autoPlay":null,"intersection":null,"fallbackFrame":null,"initialScene":null,"framesPerSecond":20,"objects":[{"targetLocalId":35,"layoutSpecificValues":[[{"frame":230,"properties":{"hidden":{"localId":92,"value":null,"isAnimated":false},"opacity":{"localId":91,"value":0,"isAnimated":false}}},{"frame":240,"properties":{"hidden":{"localId":94,"value":false,"isAnimated":false},"opacity":{"localId":93,"value":0,"isAnimated":false}}}]]}],"isAnimated":false},{"clazz":"Scene","localId":1882,"name":"Scene 5","type":"time","duration":10,"endingMode":"lastKeyframe","onEnd":"stop","onEndRepeatCount":0,"onEndReverseCount":0,"onEndWaitForCount":true,"autoPlay":null,"intersection":null,"fallbackFrame":null,"initialScene":null,"framesPerSecond":20,"objects":[{"targetLocalId":35,"layoutSpecificValues":[[{"frame":190,"properties":{"hidden":{"localId":1884,"value":null,"isAnimated":false},"opacity":{"localId":1883,"value":0,"isAnimated":false}}},{"frame":200,"properties":{"hidden":{"localId":1886,"value":false,"isAnimated":false},"opacity":{"localId":1885,"value":1,"isAnimated":false}}}]]}],"isAnimated":false}],"showOverflow":false,"title":"Start","localId":4,"objects":[{"layoutSpecificValues":[{"position":{"left":"576px","top":"0px"},"size":{"width":"406px","height":"254px"},"rotation":0,"opacity":1,"hidden":false}],"triggers":[{"localId":28,"type":"tap","parameters":{},"onFire":{"clazz":"ActionInvocation","actionClazz":"Kernel","instanceLocalId":null,"method":"runInSequence","isStatic":true,"args":{"actions":[{"clazz":"ActionInvocation","actionClazz":"Kernel","instanceLocalId":null,"method":"runInParallel","isStatic":true,"args":{"actions":[{"clazz":"ActionInvocation","localId":29,"disabled":false,"actionClazz":"CreativeUnitWithVariants","instanceLocalId":1,"method":"goToURL","isStatic":false,"args":{"name":"Open Website 6","url":"http://www.bloofinsushi.com/","reportLabel":"Shop Now"},"isAnimated":false}]}}]}},"isCustom":false,"isAnimated":false}],"name":"Hotspot","aspectRatioLocked":false,"zIndex":4,"hiddenInBuilder":false,"lockedInBuilder":false,"clazz":"Hotspot","localId":30,"fieldName":"Hotspot","isAnimated":false},{"layoutSpecificValues":[{"position":{"left":"239px","top":"92px"},"size":{"width":"62px","height":"65px"},"rotation":0,"opacity":0,"hidden":true}],"triggers":[{"localId":31,"type":"tap","parameters":{},"onFire":{"clazz":"ActionInvocation","actionClazz":"Kernel","instanceLocalId":null,"method":"runInSequence","isStatic":true,"args":{"actions":[{"clazz":"ActionInvocation","actionClazz":"Kernel","instanceLocalId":null,"method":"runInParallel","isStatic":true,"args":{"actions":[{"clazz":"ActionInvocation","localId":32,"disabled":false,"actionClazz":"Screen","instanceLocalId":"4","method":"reset","isStatic":false,"args":{"target":"4","actionClazz":"Screen"},"isAnimated":false},{"clazz":"ActionInvocation","localId":33,"disabled":false,"actionClazz":"Scene","instanceLocalId":"90","method":"playScene","isStatic":false,"args":{"target":"90"},"isAnimated":false},{"clazz":"ActionInvocation","localId":204,"disabled":false,"actionClazz":"Scene","instanceLocalId":null,"method":"playScene","isStatic":false,"args":{"target":null},"isAnimated":false},{"clazz":"ActionInvocation","localId":1887,"disabled":false,"actionClazz":"Scene","instanceLocalId":null,"method":"playScene","isStatic":false,"args":{"target":null},"isAnimated":false},{"clazz":"ActionInvocation","localId":1888,"disabled":false,"actionClazz":"Scene","instanceLocalId":null,"method":"playScene","isStatic":false,"args":{"target":null},"isAnimated":false},{"clazz":"ActionInvocation","localId":1889,"disabled":false,"actionClazz":"Scene","instanceLocalId":"1882","method":"playScene","isStatic":false,"args":{"target":"1882"},"isAnimated":false},{"clazz":"ActionInvocation","localId":34,"disabled":false,"actionClazz":"ScreenObject","instanceLocalId":"35","method":"show","isStatic":false,"args":{"target":"35"},"isAnimated":false}]}}]}},"isCustom":false,"isAnimated":false}],"name":"white-replay-button","aspectRatioLocked":true,"zIndex":5,"hiddenInBuilder":false,"lockedInBuilder":false,"imageSourceFeedFieldKey":null,"fileLocalId":46,"fittingSize":"fit","imagePosition":"center","importedFromLayoutFile":false,"clazz":"Picture","localId":35,"isAnimated":true},{"layoutSpecificValues":[{"position":{"left":"-1px","top":"0px"},"size":{"width":"59.69%","height":"100.00%"},"rotation":0,"opacity":1,"hidden":false}],"triggers":[],"name":"Swipey Gallery 1","aspectRatioLocked":false,"zIndex":2,"hiddenInBuilder":false,"lockedInBuilder":false,"contentItemsFeedFieldKey":null,"contentItemsFeedMaximumAllowedRows":2,"feedReservedLocalIdsTable":{},"cellspacing":0,"start":1,"cyclic":false,"vertical":false,"autoAnimate":true,"autoAnimateEasing":"easeIn","autoAnimatePause":3000,"autoAnimateDirection":"west","autoAnimateConclusion":"stop","autoAnimateUserInteraction":false,"autoAnimatePreventUserInteraction":true,"pagination":"hidden","clazz":"Swipey","localId":317,"fieldName":"Swipey Gallery 1","dataSource":{"clazz":"FixedDataSource","items":[{"imageLocalId":2128,"triggers":[],"value":""},{"imageLocalId":2130,"triggers":[],"value":""},{"imageLocalId":2132,"triggers":[],"value":""},{"imageLocalId":2134,"triggers":[],"value":""},{"imageLocalId":2136,"triggers":[],"value":""},{"imageLocalId":2138,"triggers":[],"value":""},{"imageLocalId":2140,"triggers":[],"value":""}]},"isAnimated":false},{"layoutSpecificValues":[{"position":{"left":"0px","top":"0px"},"size":{"width":"970px","height":"250px"},"rotation":0,"opacity":1,"hidden":false}],"triggers":[],"name":"Shapey 3","aspectRatioLocked":false,"zIndex":3,"hiddenInBuilder":false,"lockedInBuilder":false,"backgroundColorFeedFieldKey":null,"backgroundColor":"rgba(54,92,153,0)","border":true,"borderWidth":1,"borderColor":"#000000","roundness":0,"shadow":false,"shadowDistance":0,"shadowBlur":10,"shadowAngle":0,"shadowColor":"rgba(0,0,0,0.5)","clazz":"Shapey","localId":1973,"fieldName":"Shapey 3","isAnimated":false},{"layoutSpecificValues":[{"position":{"left":"555px","top":"1px"},"size":{"width":"418px","height":"250px"},"rotation":0,"opacity":1,"hidden":false}],"triggers":[],"name":"bg","aspectRatioLocked":false,"zIndex":1,"hiddenInBuilder":false,"lockedInBuilder":false,"imageSourceFeedFieldKey":null,"fileLocalId":2060,"fittingSize":"fit","imagePosition":"center","importedFromLayoutFile":false,"clazz":"Picture","localId":2095,"isAnimated":false}],"clazz":"Screen","guidelines":[],"isAnimated":false,"immediatelyPlayedScenes":{"appear":{"scenesLocalIds":["90"]},"firstAppear":{"scenesLocalIds":[]}},"reachableScreensLocalIds":[],"dynamicReachableScreenConditions":{}}],"backgroundColor":"rgba(255,255,255,1)","borderColor":"#000000","borderSize":0,"scale":1,"sizing":"fixed","defaultUnits":"px","layoutAspectRatiosLocked":{"independent":false},"layoutCustomUnitSizes":{"independent":true},"orientation":"independent","forceResponsivePositioningAndSizing":false,"layouts":[{"orientation":"independent","minSize":{"width":970,"height":250},"unitSize":{"width":970,"height":250},"designTimeSize":{"width":970,"height":250},"unitAlignment":{"horizontal":"center","vertical":"center"}}],"layoutsLocked":{"portrait":true,"landscape":true,"independent":true},"feedImageOptimizationSettings":[],"isAnimated":false}],"isAnimated":false}},"unitSizes":{"banner":{"width":970,"height":250}},"files":[{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":46,"name":"white-replay-button.png","blobHash":"91d7588ee854a8efb4164875442f8bacc57d5d36eaa7e9148fa635b9d1799155","quality":256,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":7023}],"isAsset":true,"meta":{"size":14470,"contentType":"image/png","width":409,"height":425}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1412,"name":"img2.jpg","blobHash":"a569b6a92f34e4f2f412630c27c6939e6028948c6cdce76320efd2f94a779403","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":17629}],"isAsset":true,"meta":{"size":176790,"contentType":"image/png","width":610,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1414,"name":"img1.png","blobHash":"1bba52c964ecaa13379640df12a332344a94709e133bc9f3973f8564ce4169c7","quality":256,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":95076}],"isAsset":true,"meta":{"size":281276,"contentType":"image/png","width":610,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1416,"name":"img3.jpg","blobHash":"466b15cf91ed5381df6e928dc1f9c52a81cc9dd39766b00bc7fe908c3cee3df0","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":49023}],"isAsset":true,"meta":{"size":337672,"contentType":"image/png","width":610,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1418,"name":"img4.jpg","blobHash":"006624518e7e6ebf65ca59629d179bcfe70f231ccbc0f9073b7bd1dba23a48df","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":43171}],"isAsset":true,"meta":{"size":320482,"contentType":"image/png","width":610,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1420,"name":"img5.jpg","blobHash":"e3857023fa610006a4bfcfd3755c1c14ff6dc86c3c4548f057d0c597971f06e8","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":43599}],"isAsset":true,"meta":{"size":320037,"contentType":"image/png","width":610,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1422,"name":"img6.png","blobHash":"033159f1ab476bb8ed39ffdc9176fa3d02470dba736bdd7efe2efda1d8645b48","quality":256,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":55426}],"isAsset":true,"meta":{"size":172214,"contentType":"image/png","width":610,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1424,"name":"img8.jpg","blobHash":"ab571dfd88d126f8a8b634d3516a8c2dbb08ef61feaa98a10058d6e8f2fbd7b2","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":36258}],"isAsset":true,"meta":{"size":289482,"contentType":"image/png","width":610,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1426,"name":"img7.jpg","blobHash":"ab5ba9a34bf9a9788e72912fe1070165b4ff2032245dacef26732358f03f0956","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":37106}],"isAsset":true,"meta":{"size":290180,"contentType":"image/png","width":610,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1428,"name":"img9.jpg","blobHash":"7e61e9069691c4e4071c3cce44a54bb1788e8a013725db020ff8cc6d6457969f","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":25904}],"isAsset":true,"meta":{"size":218604,"contentType":"image/png","width":610,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1480,"name":"img1.png","blobHash":"c6d313f9963336c9538aed1959d114e09a2ee42871c444232516b687db37b782","quality":256,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":97851}],"isAsset":true,"meta":{"size":290031,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1482,"name":"img5.png","blobHash":"679c7043bb79dfcef698e2fdd8c8cd8faf5e839f8a9eb218fdfeb4546fc933e3","quality":256,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":129881}],"isAsset":true,"meta":{"size":369253,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1484,"name":"img2.jpg","blobHash":"1f00d7c2659bfdbfe4da8e84a2b17a7aed198a5a8267924547a489948b5abca9","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":19330}],"isAsset":true,"meta":{"size":186289,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1486,"name":"img3.jpg","blobHash":"2db1f6bed280406632a297fbe87928505754d6c8bcfa6360d33c0af37aac782a","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":54840}],"isAsset":true,"meta":{"size":354363,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1488,"name":"img4.png","blobHash":"0c9c3c086f2c2f358f53eab2bd45092c59813c6bf649e60d55ffb64aa99f21ae","quality":256,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":132418}],"isAsset":true,"meta":{"size":367502,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1490,"name":"img6.jpg","blobHash":"ad9e48009f7db86ee91e968426bfc5d09ca33b8f1fd10a5070790a73a52718fc","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":11536}],"isAsset":true,"meta":{"size":155329,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1492,"name":"img7.jpg","blobHash":"760b4efc4525429c25ff99bad973e9742bd45145ab4045b311403155c275bc0c","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":38572}],"isAsset":true,"meta":{"size":299130,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1494,"name":"img8.jpg","blobHash":"34c5b976142c3a2d888052d63427666dcc141a0e81923415937a92badc400513","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":37032}],"isAsset":true,"meta":{"size":289560,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1496,"name":"img9.png","blobHash":"1138a21a6912cb9ad8ef2c781c9626270f73ed505df1d08bc4aa9dc5015dd9c0","quality":256,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":80041}],"isAsset":true,"meta":{"size":241185,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1536,"name":"img2.jpg","blobHash":"1d43b523219e75d3071a6ede2dd5e70aac0d0b5c30d04a531a55a4bb4d6aa956","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":18898}],"isAsset":true,"meta":{"size":185985,"contentType":"image/png","width":580,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1547,"name":"img5.jpg","blobHash":"07941c51dccd372139b83205811a98ac86b5bea6b946ac52d3463d4d6b1d2461","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":47223}],"isAsset":true,"meta":{"size":333858,"contentType":"image/png","width":580,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1591,"name":"img13.png","blobHash":"8cd65815e8850ae45683839b30e218b2628f323a2da4f38bd866d8ede2bc8798","quality":256,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":99917}],"isAsset":true,"meta":{"size":307785,"contentType":"image/png","width":593,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1593,"name":"img14.png","blobHash":"53386e97c4f478ae2c404f3968d487d1f96113da83d816ede852b15eb6b81c35","quality":256,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":101606}],"isAsset":true,"meta":{"size":330322,"contentType":"image/png","width":599,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1595,"name":"img11.png","blobHash":"a3c05e2b363bae92134289230638218b7ab821b8ce6088def2955befd1b9ef83","quality":256,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":129243}],"isAsset":true,"meta":{"size":351300,"contentType":"image/png","width":592,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1597,"name":"img10.png","blobHash":"0f6e7cc441f65754adfca6d48cfbc8dcdaddba556508b9544e8ac5378d1c9e85","quality":256,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":113220}],"isAsset":true,"meta":{"size":343106,"contentType":"image/png","width":626,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1599,"name":"img12.jpg","blobHash":"171eaff8cb130e8f8b4f6596e30514736b1f64569ac1e6df52f43fa93e635432","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":43673}],"isAsset":true,"meta":{"size":292907,"contentType":"image/png","width":580,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1601,"name":"img15.png","blobHash":"07366ce53c67018f6248e4a1237a4c5258cc328b49b9c744763a2079ddfb2e86","quality":256,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":64611}],"isAsset":true,"meta":{"size":183209,"contentType":"image/png","width":580,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1603,"name":"img16.jpg","blobHash":"46bfe8ad3bc2ea73fc234116dfedbd8faf1e3cbfd324c0a164d4e174112428ef","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":45457}],"isAsset":true,"meta":{"size":297294,"contentType":"image/png","width":580,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1787,"name":"img13.png","blobHash":"e41577640b4e998902860045658edb85cc50e906ed96c52e24b4489f1f6deb7b","quality":256,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":99200}],"isAsset":true,"meta":{"size":306105,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1789,"name":"img12.jpg","blobHash":"77cdce41d1510a1d5429c509e687624ba1a10699f39e7b2855c9a07c0446f1a4","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":44190}],"isAsset":true,"meta":{"size":292386,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1791,"name":"img11.png","blobHash":"9aa8039735d3453e33021cef2b98b077c07054c178d78af30d0d6c51d6c95aa4","quality":256,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":129897}],"isAsset":true,"meta":{"size":348754,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1793,"name":"img10.png","blobHash":"cd2dbac45ed83b34ea56fb79dbb935b6ced600ae92d4538d900a826922215a53","quality":256,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":113148}],"isAsset":true,"meta":{"size":336813,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1795,"name":"img14.png","blobHash":"4aeb86083f7f7ddb6f0e358169b714593e5beefbaaac3289ce0b9488340bb125","quality":256,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":101189}],"isAsset":true,"meta":{"size":326712,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1797,"name":"img15.png","blobHash":"3754e01f5b5db229c28692f8842cac71e4498203a23cc1c55737e0c8fb0c6f25","quality":256,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":65854}],"isAsset":true,"meta":{"size":183761,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1799,"name":"img16.jpg","blobHash":"c0f25851ed99323d7eb856f91eee86bc0570cd116bb040fdf7a3e6df935e797c","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":45274}],"isAsset":true,"meta":{"size":297060,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1824,"name":"bg.png","blobHash":"d47ce9d16e08722e3f208fb34e7f0709e7e360c6b6a39cb249255f2625e89043","quality":256,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":15652}],"isAsset":true,"meta":{"size":31081,"contentType":"image/png","width":392,"height":248}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1913,"name":"bg.jpg","blobHash":"7a8e0ea82751819dd5a48759999dab1625be2dae834452b05677e69cc182383d","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":23248}],"isAsset":true,"meta":{"size":26107,"contentType":"image/jpeg","width":391,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1947,"name":"f10.jpg","blobHash":"583f74c62c60c709580914b29d2ff64b089d083c7b8d6ba9c8dbc77f63e27acc","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":36305}],"isAsset":true,"meta":{"size":37984,"contentType":"image/jpeg","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1951,"name":"f15.jpg","blobHash":"129d7bccdee150e9fd92c986da3d6c28b6c5447d4e82e2fdaae308e2379d7195","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":26964}],"isAsset":true,"meta":{"size":29005,"contentType":"image/jpeg","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":1965,"name":"bg.jpg","blobHash":"d8225f9934cf0d67e08b6fba66aa9a44c66b59cc1edc0f66f93acee49a852b9d","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":23248}],"isAsset":true,"meta":{"size":26107,"contentType":"image/jpeg","width":391,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":2032,"name":"f1.jpg","blobHash":"78dd7b3136010f941d619b7639170526188628bccecd2822cd95c57b075c70eb","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":12563}],"isAsset":true,"meta":{"size":97671,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":2034,"name":"f2.jpg","blobHash":"0cd72e9a1e565712477423f2e6edc7ce198591a44efaf7396603e9a8429e3c38","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":34158}],"isAsset":true,"meta":{"size":283457,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":2036,"name":"f4.jpg","blobHash":"5f47aab198bb1c7c11b68a52f9f1e1ee13cdda4519304b2af07bb6ab1a87e339","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":25550}],"isAsset":true,"meta":{"size":261717,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":2038,"name":"f3.jpg","blobHash":"493ae5096cb337be78da7aa902652de0ee564d14cc19accc5118224f84121975","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":28860}],"isAsset":true,"meta":{"size":259135,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":2040,"name":"f5.jpg","blobHash":"4fbe0dfb75f350e2fe6b00ec9c1011b1711aaef763fadf2e7da1389025b5f609","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":22579}],"isAsset":true,"meta":{"size":226020,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":2042,"name":"f6.jpg","blobHash":"0f18c8541b05e0e0d5fc2f1bde3c3a41f2c6249d82eb9d27bf72ea2bb979b552","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":28212}],"isAsset":true,"meta":{"size":259253,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":2044,"name":"f7.jpg","blobHash":"10b176aefa93956d905bdbdc6a332a672354aaf8ce985e996c73336064419798","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":26595}],"isAsset":true,"meta":{"size":200638,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":2060,"name":"bg.png","blobHash":"5657060b6137cf938137c1a78d715bb6e394f636c93044032f33d9277eaaf985","quality":256,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":18074}],"isAsset":true,"meta":{"size":41388,"contentType":"image/png","width":418,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":2128,"name":"970X250_0006_f1.jpg","blobHash":"6ca3e264936c41b9f8f7aa67ebc8d897f07e1260d6d99cc695bd2c2ea90f4664","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":24605}],"isAsset":true,"meta":{"size":252008,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":2130,"name":"970X250_0005_f2.jpg","blobHash":"1421f4f5e7d91644a8ce5b356bf114bae8826c1e1d8c851a2af48396f3f75344","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":28088}],"isAsset":true,"meta":{"size":272339,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":2132,"name":"970X250_0004_f3.jpg","blobHash":"ab3723a7d77588b9f91774f2bcd20480325408fb52a3d1db8e207b66140cd016","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":21641}],"isAsset":true,"meta":{"size":239258,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":2134,"name":"970X250_0003_f4.jpg","blobHash":"586d2c6c492bf0fc585394ad2884a5637cdf0241889eaac1f43be113fd90c74a","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":33765}],"isAsset":true,"meta":{"size":285486,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":2136,"name":"970X250_0002_f5.jpg","blobHash":"7be317883cbee2c52377a018a17f305d50cfc216f3ae9dcd8d92e642eb555cd4","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":29549}],"isAsset":true,"meta":{"size":262240,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":2138,"name":"970X250_0001_f6.jpg","blobHash":"499204f60e1c1d158dcc991cc6d9fd6ef434c8ff5fe1e12c00022575f1685618","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":21186}],"isAsset":true,"meta":{"size":238989,"contentType":"image/png","width":579,"height":250}},{"clazz":"File","retina":false,"retinaScaleFactor":1,"localId":2140,"name":"970X250_0000_f7.jpg","blobHash":"33694b5a03b3477a9726ea13331dc9aebf75618ef45ca969937f72fbc6551d07","quality":85,"autoResize":false,"optimizationSettings":[{"creativeUnitVariantId":"default","optimizedSize":17099}],"isAsset":true,"meta":{"size":226562,"contentType":"image/png","width":579,"height":250}}],"fonts":[],"scripts":[],"version":7,"hostedFiles":null,"googleMapsJavaScriptVersion":"3.46","shareFacebookAppId":"1764042083689024","videoTranscodingPresets":{"mpeg1LQVideo":{"algoVersion":1,"mediaType":{"mime":"video/avi"}},"mpeg1SHQVideo":{"algoVersion":1,"mediaType":{"mime":"video/avi"}},"mpeg1InstaVideo":{"algoVersion":1,"mediaType":{"mime":"video/avi"}},"aacAudio":{"algoVersion":1,"mediaType":{"mime":"audio/mp4","codecs":{"audio":"mp4a.40"}}},"mpeg4HQ":{"algoVersion":3,"mediaType":{"mime":"video/mp4","codecs":{"video":"avc1","audio":"mp4a.40"}}},"mpeg4HQPlus":{"algoVersion":1,"mediaType":{"mime":"video/mp4","codecs":{"video":"avc1","audio":"mp4a.40"}}},"mpeg4HD":{"algoVersion":1,"mediaType":{"mime":"video/mp4","codecs":{"video":"avc1","audio":"mp4a.40"}}},"webmHQ":{"algoVersion":1,"mediaType":{"mime":"video/webm","codecs":{"video":"vp8","audio":"vorbis"}}},"webmHD":{"algoVersion":1,"mediaType":{"mime":"video/webm","codecs":{"video":"vp8","audio":"vorbis"}}},"mpeg4InstaVideo":{"algoVersion":2,"mediaType":{"mime":"video/mp4","codecs":{"video":"avc1"}}},"vp9_1080p":{"algoVersion":1,"mediaType":null},"x264_1080p":{"algoVersion":1,"mediaType":null},"vp9_720p":{"algoVersion":1,"mediaType":null},"x264_videoAsset":{"algoVersion":1,"mediaType":null},"x264_inline480p":{"algoVersion":1,"mediaType":{"mime":"video/mp4","codecs":{"video":"avc1","audio":"mp4a.40"}}},"x264_inline720p":{"algoVersion":1,"mediaType":{"mime":"video/mp4","codecs":{"video":"avc1","audio":"mp4a.40"}}},"vp9_inline720p":{"algoVersion":1,"mediaType":{"mime":"video/webm","codecs":{"video":"vp9","audio":"vorbis"}}},"x265_served_480p":{"algoVersion":1,"mediaType":{"mime":"video/mp4","codecs":{"video":"hvc1","audio":"mp4a.40"}}},"x265_served_1080p":{"algoVersion":1,"mediaType":{"mime":"video/mp4","codecs":{"video":"hvc1","audio":"mp4a.40"}}},"vp9_served_480p":{"algoVersion":1,"mediaType":{"mime":"video/webm","codecs":{"video":"vp9","audio":"opus"}}},"vp9_served_720p":{"algoVersion":1,"mediaType":{"mime":"video/webm","codecs":{"video":"vp9","audio":"opus"}}},"vp9_served_1080p":{"algoVersion":1,"mediaType":{"mime":"video/webm","codecs":{"video":"vp9","audio":"opus"}}},"custom":{"algoVersion":1,"mediaType":null}},"videoTranscodingGroups":{"insta":["mpeg4InstaVideo","mpeg1SHQVideo","mpeg1InstaVideo"],"inline":["vp9_served_480p","vp9_served_720p","x265_served_480p","x265_served_1080p","webmHQ","mpeg4HQPlus","mpeg1SHQVideo","aacAudio","mpeg4HQ","mpeg1LQVideo"],"builder":["vp9_720p","aacAudio"],"vast":["custom"],"vpaid":["vp9_served_720p","vp9_served_1080p","x265_served_1080p","mpeg4HQPlus","mpeg4HD","webmHQ","webmHD","mpeg1SHQVideo","aacAudio","vp9_served_480p","x265_served_480p","mpeg4HQ"],"snapchat":["mpeg4HQPlus","custom"],"twitter":["mpeg4HQPlus"],"facebook":["mpeg4HQPlus"],"youTube":["mpeg4HQPlus"],"videoAsset":["x264_videoAsset"],"exportableBanner":["x264_inline720p","x264_inline480p","vp9_inline720p"]},"isMoatVideoEnabled":false,"firstAppStoreUrlForInmobi":null}, runtimeParams, trackingCenter, aggregatorTracking, experiments, adapter, urls, urlOpenedOverrideUrls, storeOpenedOverrideUrls, macros, urlOpenedUrlAppendage, clickThroughDestinationUrl, perf);
})();