[\\s\\S]*?","gi");do t=e,e=e.replace(r,"");while(e!==t);return e.replace(/e.minDistanceForSwipe?!0:!1:"x"===e.validAxis&&(t=o>e.minDistanceForSwipe?!0:!1),n=r>i&&r>o?!0:!1,{isHorizontal:o>i?!0:!1,isConsideredSwipe:t,isConsideredTap:n}}function attach(e,t,n,r){var o=getEventNames()[t.toLowerCase()]||t;e.addEventListener(o,n,_buildNativeListenerOptions(r))}function detach(e,t,n,r){var o=getEventNames()[t.toLowerCase()]||t;e.removeEventListener(o,n,_buildNativeListenerOptions(r))}function once(e,t,n,r){attach(e,t,function o(){detach(e,t,o,r),n.apply(this,arguments)},r)}function trigger(e,t,n,r){var o=document.createEvent("HTMLEvents");o.initEvent(t,n,r);var i="on"+ucfirst(t);return"function"==typeof e[i]&&e[i](),e.dispatchEvent(o)}function fakeclick(e,t){t=t||window;var n=t.document.createElement("a");n.cssText="visibility: hidden",n.addEventListener("click",function(t){e(),t.preventDefault(),t.stopPropagation(),n.parentNode.removeChild(n)},!0),t.document.body.appendChild(n);var r=document.createEvent("MouseEvents");r.initEvent("click",!0,!0),n.dispatchEvent(r)}function fakeClickAhrefBlank(e,t,n){t=t||noop,n=n||window;var r=n.document.createElement("a");r.style.cssText="visibility: hidden",r.setAttribute("href",e),r.setAttribute("target","_blank"),r.addEventListener("click",function(e){e.stopPropagation(),t(),r.parentNode.removeChild(r)},!0),n.document.body.appendChild(r);var o=n.document.createEvent("MouseEvents");o.initEvent("click",!0,!0),r.dispatchEvent(o)}function noop(){}function nullai(e,t){t()}function retTrue(){return!0}function retFalse(){return!1}function offset(e){var t=e.getBoundingClientRect(),n=e.ownerDocument,r=n.documentElement,o=n.defaultView;return{top:t.top+(o.pageYOffset||r.scrollTop)-(r.clientTop||0),left:t.left+(o.pageXOffset||r.scrollLeft)-(r.clientLeft||0)}}function addCssRule(e,t,n){var r=document.createElement("style");r.textContent=e+" {"+t+"}",n?n.document.getElementsByTagName("head")[0].appendChild(r):document.getElementsByTagName("head")[0].appendChild(r)}function redrawAndroidIframe(){var e=document.createElement("style");document.body.appendChild(e),document.body.removeChild(e)}function parseQuery(e){var t={};return e=e.replace(/\&$/,"").replace(/\+/g,"%20"),e.split("&").forEach(function(e){var n=e.split("=").map(decodeURIComponent);t[n[0]]=n[1]}),t}function buildQuery(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}function postBlob(e,t){var n=new XMLHttpRequest;n.open("POST",creative.apiUrl+"blobs?base64=1"),n.setRequestHeader("Content-Type","application/octet-stream"),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText,n.status)},n.send(e)}function tmpl(e,t){function n(e){return" p.push('"+e.replace(/'/g,"\\'").split(/\r?\n/g).join("\\n');\n p.push('")+"');\n"}if(!e)return"";var r;if(-1==e.indexOf("<%"))r=function(){return e};else{var o=e.split(/<%\s*|\s*%>/g),i="var p = []; with(o) {\n",a=!1;o.forEach(function(e){a?i+="="==e[0]?" p.push("+e.replace(/^=\s*|\s*$/g,"")+");\n":" "+e+"\n":e&&(i+=n(e)),a=!a}),i+='} return p.join("");';try{r=new Function("o",i)}catch(c){var u=new Error("Cannot parse template! (see `template` property)");throw u.template=i,u}}return t?r(t):r}function flash(){var e=document.createElement("div");e.style.background="white",e.style.opacity=.005,e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.width="100%",e.style.height="100%",e.style.zIndex=2147483647,document.body.appendChild(e),setTimeout(function(){e.parentNode.removeChild(e)},0)}function crc32(e){"use strict";var t=-1,n=0,r=[0,-227835133,-516198153,324072436,-946170081,904991772,648144872,-724933397,-1965467441,2024987596,1809983544,-1719030981,1296289744,-1087877933,-1401372889,1578318884,274646895,-499825556,-244992104,51262619,-675000208,632279923,922689671,-996891772,-1702387808,1760304291,2075979607,-1982370732,1562183871,-1351185476,-1138329528,1313733451,549293790,-757723683,-1048117719,871202090,-416867903,357341890,102525238,-193467851,-1436232175,1477399826,1264559846,-1187764763,1845379342,-1617575411,-1933233671,2125378298,820201905,-1031222606,-774358714,598981189,-143008082,85089709,373468761,-467063462,-1170599554,1213305469,1526817161,-1452612982,2107672161,-1882520222,-1667500394,1861252501,1098587580,-1290756417,-1606390453,1378610760,-2032039261,1955203488,1742404180,-1783531177,-878557837,969524848,714683780,-655182201,205050476,-28094097,-318528869,526918040,1361435347,-1555146288,-1340167644,1114974503,-1765847604,1691668175,2005155131,-2047885768,-604208612,697762079,986182379,-928222744,476452099,-301099520,-44210700,255256311,1640403810,-1817374623,-2130844779,1922457750,-1503918979,1412925310,1197962378,-1257441399,-350237779,427051182,170179418,-129025959,746937522,-554770511,-843174843,1070968646,1905808397,-2081171698,-1868356358,1657317369,-1241332974,1147748369,1463399397,-1521340186,-79622974,153784257,444234805,-401473738,1021025245,-827320098,-572462294,797665321,-2097792136,1889384571,1674398607,-1851340660,1164749927,-1224265884,-1537745776,1446797203,137323447,-96149324,-384560320,461344835,-810158936,1037989803,781091935,-588970148,-1834419177,1623424788,1939049696,-2114449437,1429367560,-1487280117,-1274471425,1180866812,410100952,-367384613,-112536529,186734380,-538233913,763408580,1053836080,-860110797,-1572096602,1344288421,1131464017,-1323612590,1708204729,-1749376582,-2065018290,1988219213,680717673,-621187478,-911630946,1002577565,-284657034,493091189,238226049,-61306494,-1307217207,1082061258,1395524158,-1589280451,1972364758,-2015074603,-1800104671,1725896226,952904198,-894981883,-638100751,731699698,-11092711,222117402,510512622,-335130899,-1014159676,837199303,582374963,-790768336,68661723,-159632680,-450051796,390545967,1230274059,-1153434360,-1469116676,1510247935,-1899042540,2091215383,1878366691,-1650582816,-741088853,565732008,854102364,-1065151905,340358836,-433916489,-177076669,119113024,1493875044,-1419691417,-1204696685,1247431312,-1634718085,1828433272,2141937292,-1916740209,-483350502,291187481,34330861,-262120466,615137029,-691946490,-980332558,939183345,1776939221,-1685949482,-1999470558,2058945313,-1368168502,1545135305,1330124605,-1121741762,-210866315,17165430,307568514,-532767615,888469610,-962626711,-707819363,665062302,2042050490,-1948470087,-1735637171,1793573966,-1104306011,1279665062,1595330642,-1384295599];for(n=0;n>>8^r[255&(t^e.charCodeAt(n))];return(-1^t)>>>0}function isArray(e){return"[object Array]"===Object.prototype.toString.call(e)}function isDefAndNotNull(e){return null!=e}function updateQueryStringParameter(e,t,n){t=encodeURIComponent(t),n=encodeURIComponent(n);var r=new RegExp("([?|&])"+t+"=.*?(&|$)","i");return separator=-1!==e.indexOf("?")?"&":"?",e.match(r)?e.replace(r,"$1"+t+"="+n+"$2"):e+separator+t+"="+n}function fetchShortenedUrl(e,t,n){function r(t,n){i[e].forEach(function(e){e[t](n)}),delete i[e]}n=n||noop;var o=!1,i=fetchShortenedUrl.inProgress,a=fetchShortenedUrl.cache,c="http"==e.slice(0,4),u=new RegExp("^(https?://)?(www.)?("+fetchShortenedUrl.invalidDomains.map(function(e){return e.replace(/[^a-zA-Z]/g,"\\$&")}).join("|")+")(/|\\?)").test(e);if(!c||u)return void n();if(a[e])return void defer(function(){t(a[e])},0,"fetchShortenedUrl defer success callback");if(i[e]||(i[e]=[],o=!0),i[e].push({success:t,error:n}),o){var s=creative.runtimeParams.secure?creative.cachedApiUrl:creative.insecureCachedApiUrl,d=s+"/services/shortener",f={longUrl:e},p=btoa(to_utf8(e));p=p.replace(/\//g,"$").replace(/\+/g,"_").replace(/=/g,"");var l={cbName:"shortener_"+p};loadJSONP(d+"?"+buildQuery(f),l,function(t){a[e]=t.id,r("success",t.id)},function(){r("error")})}}function isMediaPlaying(e){try{return e.currentTime>0&&!e.paused&&!e.ended}catch(t){return!1}}function merge(){var e,t,n={};for(t=0;tt?0:1}function pulse(e,t,n){return step(e,n)-step(t,n)}function smoothstep(e,t,n){var r=clamp(0,1,(n-e)/(t-e));return r*r*r*((6*r-15)*r+10)}function bump(e,t,n){var r=clamp(0,1,(n-e)/(t-e));return(Math.cos(Math.PI*r)+1)/2}function getWindowNesting(e){var t={iframe:e!==e.top,friendlyIframe:!1,iabFriendlyIframe:!1,hostileIframe:!1,iframeDepth:0};if(t.iframe){var n=e;try{for(t.friendlyIframe=!!e.top.location.href,t.iabFriendlyIframe=t.friendlyIframe&&"undefined"!=typeof e.inDapIF&&e.inDapIF;"undefined"!=typeof n.parent.location.href&&n.parent.document!==n.document;)n=n.parent,t.iframeDepth++;"undefined"==typeof e.top.document&&(t.hostileIframe=!0)}catch(r){t.hostileIframe=!0}}return t}function isFetchSupported(){return!!(window.fetch&&window.URL&&URL.createObjectURL)}function isBeaconSupported(){return!(!window.navigator||!window.navigator.sendBeacon)}function isNativeImplementation(e){return"function"==typeof e&&e.toString().indexOf("[native code]")>-1}!function(e){if(!this.defer){try{for(;"undefined"!=typeof e.parent.location.href&&e.parent.document!==e.document;)e=e.parent}catch(t){}var n=function(){function t(){return 9007199254740991===s?0:++s}var n,r,o,i,a=e,c="function"==typeof a.setImmediate;if(a.MutationObserver)return function(e){n=document.createElement("div"),new MutationObserver(function(){e(),n=null}).observe(n,{attributes:!0}),n.setAttribute("i","1")};if(!c&&a.postMessage&&!a.importScripts&&a.addEventListener){var u="com.setImmediate"+Math.random(),s=0;i={};var d=function(e){if(e.source===a&&0===e.data.indexOf(u)){var t=e.data.split(":")[1];i[t](),delete i[t]}};return a.addEventListener("message",d,!1),function(e){var n=t();i[n]=e,a.postMessage(u+":"+n,"*")}}return!c&&a.document&&"onreadystatechange"in document.createElement("script")?function(e){r=document.createElement("script"),r.onreadystatechange=function(){r.onreadystatechange=null,r.parentNode.removeChild(r),r=null,e()},document.body.appendChild(r)}:(o=c&&setImmediate||setTimeout,function(e){o(e)})}();this.defer=function(t,r,o,i){var a,c=0|r;if(o){var u;"undefined"!=typeof defer.perf?u=defer.perf:"undefined"!=typeof creative?u=creative.perf:"undefined"!=typeof perf&&(u=perf),u&&(u._stopTrackingDefers||(a=u.start("defer",{deferId:o,delay:c})))}if(t){var s=function(){a&&a.end(),t()};i?n(s):e.setTimeout(s,c)}}}}(window),Function.prototype.bind||Object.defineProperty(Function.prototype,"bind",{value:function(e){var t=this;return function(){return t.apply(e,arguments)}}}),function(e){e.getEventNames=function(){var t={};return"WebKitAnimationEvent"in e&&(t.animationstart="webkitAnimationStart",t.animationiteration="webkitAnimationIteration",t.animationend="webkitAnimationEnd"),"WebKitTransitionEvent"in e&&(t.transitionend="webkitTransitionEnd"),t}}(window),_isListenerOptionSupported.opts={};var getTimestamp=function(){return void 0===window.performance||void 0===window.performance.now?Date.now:window.performance.now.bind(window.performance)}();Date.now||(Date.now=function(){return+new Date}),Array.prototype.waitForEach||Object.defineProperty(Array.prototype,"waitForEach",{value:function(e,t,n){var r=this.length;r?this.forEach(function(o,i,a){var c=!1;e.call(n,o,function(){if(c)throw"Called `done` multiple times for element "+i;c=!0,--r||t()},i,a)},n):t()}}),function(e){e.loadJS=function(t,n,r,o){var i=e.loadJS.externals,a={success:n||noop,error:r||noop};if(!/^[A-Za-z0-9]*:\/\/|^\/\//.test(t)){var c=creative.hostedFiles.filter(function(e){return e.filepath===t})[0];if("undefined"==typeof c)return console.warn('Hosted file "'+t+'" was not found.'),void a.error();if(c.loaded!==!1)return console.warn('Hosted file "'+t+'" is already loaded.'),void setTimeout(a.success,0);c.loaded=!0,t=creative.cachedApiUrl+"hostedFiles/"+creative.id+"/"+creative.version+"/"+t}if(t in i&&!o)i[t].loaded?setTimeout(a.success,0):i[t].cbs.push(a);else{i[t]={cbs:[a]};var u=document.createElement("script");u.type="text/javascript",u.onload=function(){i[t].loaded=!0,i[t].cbs.forEach(function(e){e.success()}),i[t].cbs=[]},u.onerror=function(){i[t].cbs.forEach(function(e){e.error()}),i[t].cbs=[],delete i[t]},u.src=t,e.loadJS.appendToRoot(u)}},e.loadJS.externals={},e.loadJS.appendToRoot=function(e){return document.querySelector("head").appendChild(e)},e.loadJSONP=function(t,n,r,o){"function"==typeof n&&(o=r,r=n,n={});var i=n.cbName||"__jsonp"+randInt();t+=(-1==t.indexOf("?")?"?":"&")+(n.paramName||"jsonp")+"="+i,e[i]=function(t){r(t),delete e[i]},loadJS(t,noop,o,!0)}}(window),"undefined"==typeof Function.prototype.name&&!function(){var e=/^function\s+(\w+?)\s*?\(/;Object.defineProperty(Function.prototype,"name",{get:function(){var t=this.constructor.prototype.toString.call(this);return e.test(t)?t.match(e)[1]:""}})}(),fetchShortenedUrl.cache={},fetchShortenedUrl.inProgress={},fetchShortenedUrl.invalidDomains=["db.tt","lnkd.in","t.co","youtu.be","goo.gl","adf.ly","bit.do","bit.ly","fur.ly","ht.ly","is.gd","ow.ly","tr.im","tiny.cc","tinyurl.com"];;
function 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("Chrome")&&s(this.version,arguments)},r.prototype.ie=function(){return 0===this.name.indexOf("Internet Explorer")&&s(this.version,arguments)},r.prototype.android=function(){return"Android Browser"===this.name&&s(this.version,arguments)},r.prototype.samsung=function(){return"Samsung Browser"===this.name&&s(this.version,arguments)},r.prototype.opera=function(){return 0===this.name.indexOf("Opera")&&s(this.version,arguments)},r.prototype.silk=function(){return"Amazon Silk"===this.name&&s(this.version,arguments)},r.prototype.firefox=function(){return"Firefox"===this.name&&s(this.version,arguments)},r.prototype.edge=function(){return"Edge"===this.name&&s(this.version,arguments)},r.prototype.webView=function(){var n=null,t="iP"===(e.navigator.platform||"").substr(0,2);if(t){var r=this.userAgent,i=-1!==r.indexOf("Safari")&&-1!==r.indexOf("Version"),o=!/constructor/i.test(e.HTMLElement);i&&!e.navigator.standalone?n="iOS Safari or Safari Controller":(o||e.indexedDB)&&e.statusbar.visible?(e.webkit&&e.webkit.messageHandlers||o||e.indexedDB)&&(n="WKWebView"):n="UIWebView"}return n},i.prototype.webkit=function(){return"WebKit"===this.name&&s(this.version,arguments)},i.prototype.gecko=function(){return"Gecko"===this.name&&s(this.version,arguments)},i.prototype.trident=function(){return"Trident"===this.name&&s(this.version,arguments)},i.prototype.presto=function(){return"Presto"===this.name&&s(this.version,arguments)},i.prototype.blink=function(){return"Blink"===this.name&&s(this.version,arguments)},o.prototype.phone=function(){return"Phone"===this.hardwareType},o.prototype.tablet=function(){return"Tablet"===this.hardwareType},o.prototype.desktop=function(){return"Desktop"===this.hardwareType},o.prototype.mobileDevice=function(){return this.mobile===!0},e.CeltraDeviceInfo.create=function(t,r){return t=t||e.navigator.userAgent||"",r=r||{},a(t,r),new n(r,t)}}(window);;
window.deviceInfo=CeltraDeviceInfo.create(window.navigator.userAgent,window.celtraDeviceInfoRuntimeParams);;
!function(e){function n(){var e=p().match(/iP(ad|hone|od).*OS ([0-9_]+)/);return!!e&&s(e[2].replace(/_/g,"."),arguments)}function t(){var e=p().match(/Android ([0-9.]+)/),n=p().match(/Windows Phone/);return!n&&!!e&&s(e[1],arguments)}function r(){var e=p().match(/Windows Phone ([0-9.]+)/);return!!e&&s(e[1],arguments)}function i(){var e=p().match(/AppleWebKit\/*([0-9.]+)/i);return!!e&&s(e[1],arguments)}function a(){var e=p().match(/Gecko\/*([0-9.]+)/i);return!!e&&s(e[1],arguments)}function o(){var e=p().match(/MSIE ([0-9]{1,}[.0-9]{0,})|Trident.* rv:([0-9]{1,}[.0-9]{0,})/i);return!!e&&s(e[1]||e[2],arguments)}function u(){var e=p().match(/Silk\/([0-9.]+)/);return!!e&&s(e[1],arguments)}function f(){var e=p().toLowerCase();return/kftt|kfot|kfjwi|kfjwa|kfso|kfth|kfapwi|kfthwi|kfsowi|kfthwa|kfapwa|kfap|sd4930ur/.test(e)?s("2",arguments):!1}function d(){return"undefined"!=typeof offsetWidthOverride?offsetWidthOverride:(document.body.offsetWidth,Math.min(innerWidth,innerHeight))}function c(){return/iPad/.test(p())||d()>550}function m(){return!(t()||n()||r())}function s(e,n){function t(e){return parseInt(e.replace(/\D/g,""),10)}function r(e,n){for(var t=0;tn[t])return 1}return 0}var i,a,o;if(!e)return!0;if(0===n.length)a=null,o=null;else if(1===n.length)a=n[0],o=n[0];else{if(2!==n.length)throw"Invalid number of arguments";a=n[0],o=n[1]}e=e.split(".").map(t),a=a?a.split(".").map(t):[],o=o?o.split(".").map(t):[];for(var i=v.max(a.length,o.length)-e.length;i>=0;i--)e.push(0);return!(-1===r(e,a)||1===r(e,o))}function h(){return v.top!==e}function l(){if(!(n()||window.chrome&&"Google Inc."===window.navigator.vendor))return!1;var e;return e=p().match(n()?/CriOS\/([0-9]+.)/:/Chrome\/([0-9]+.)/),!!e&&s(e[1],arguments)}function g(){var e="(-webkit-min-device-pixel-ratio: 1.5),(min--moz-device-pixel-ratio: 1.5),(-o-min-device-pixel-ratio: 3/2),(min-resolution: 1.5dppx)";return window.devicePixelRatio>1||window.matchMedia&&window.matchMedia(e).matches}e.celtra=e.celtra||{};var w={};w.ios=n,w.android=t,w.webkit=i,w.windowsPhone=r,w.gecko=a,w.windows=o,w.kindleSilk=u,w.kindle=f,w.iframe=h,w.desktop=m,w.tablet=c,w.chromeBased=l,w.isHighDensityDisplay=g,extend(e.celtra,w),delete w.webkit,extend(e,w);var v={max:e.Math.max,min:e.Math.min,userAgent:e.navigator.userAgent,top:e.top},p=function(){return"undefined"!=typeof e.userAgentOverride?e.userAgentOverride:v.userAgent}}(window);;
!function(e){function t(){var t=e;try{for(;"undefined"!=typeof t.parent.location.href&&t.parent.document!==t.document;)t=t.parent}catch(n){}return t}function n(){return s.getComputedStyle(s.document.body,null)}function i(e,t,n){if(!e)throw new Error("No element specified!");if(a(t)){if(!(t in e.style)&&i.BREAK_ON_ERROR)throw new Error("Invalid CSS attribute "+t);if("undefined"==typeof n)return e.style[t];e.style[t]=n}else{if(-1==w.indexOf(t)&&o(t),"undefined"==typeof n)return e.style[y[t]];e.style[y[t]]=n}}function r(e,t){if(!e)throw new Error("No element specified!");var n=e.ownerDocument.defaultView.getComputedStyle(e,null);if(R&&v.indexOf(t)>-1&&(t="webkit"+u(t)),!n||"none"==n.display||!f())return null;if(!(t in n)&&i.BREAK_ON_ERROR)throw new Error("Invalid CSS attribute "+t);return a(t)?n[t]:(-1==w.indexOf(t)&&o(t),n[y[t]])}function o(e){S=S||n();var t=E+u(e);if(R&&v.indexOf(e)>-1)y[e]=t;else if(S&&e in S)y[e]=e;else if(S&&t in S)y[e]=t;else if(!S&&deviceInfo.browser.firefox)y[e]=e;else if(i.BREAK_ON_ERROR)throw new Error("Invalid CSS attribute "+e+' or iframe still display "none" in FF');w.push(e)}function a(e){return p.test(e)}function f(){if(e===s)return!0;var t=e.frameElement.ownerDocument.defaultView.getComputedStyle(e.frameElement,null);return t&&"none"!=t.display}function u(e){return e+="",e?e[0].toUpperCase()+e.slice(1):""}var l=e.navigator.userAgent,s=t(),c=/rv:.*Gecko\//.test(l),d=/MSIE|Trident\//.test(l),m=/WebKit/.test(l),p=/^-?([mM]oz|[wW]eb[kK]it|[mM]s)-?/,y={},w=[],E=function(){return m?"webkit":d?"ms":c?"Moz":""}(),R=function(){var e=l.match(/AppleWebKit\/(\d+)/);return e&&~~e[1]<540}(),v=["transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","backface-visibility","perspective","perspective-origin"],S=n();i.BREAK_ON_ERROR=!1,e.celtra=e.celtra||{},e.celtra.styler={css:i,computedCSS:r,isWebkit:m,isGecko:c,isIE:d},e.css=i,e.computedCSS=r}(window);;
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=a._downloadQueue[r];i.requested||(i.requested=!0,e.push(r),i.secure&&(t=!0))}}e.length&&(Logger("batcher").log(e.length+" new batchable URLs requested during last runloop iteration ("+(t?"at least one secure":"none secure")+"):\n - "+e.join("\n - ")),a._loadBatch(t,e,function(e){for(var t in e)a._cache[t]=e[t],a._downloadQueue[t].callbacks.forEach(function(a){a(e[t])}),delete a._downloadQueue[t]}))},0,"Batcher.getDataUri downloadQueue",useAsap())):defer(function(){t(e)},0,"Batcher.getDataUri url not batchable",useAsap())},Batcher.prototype._generateBatchUrl=function(e,t){var a=(e?creative.cachedApiUrl:creative.insecureCachedApiUrl)+"batch?urls="+t.sort().map(encodeURIComponent).join(",");return a},Batcher.prototype._loadBatch=function(e,t,a){function r(e){var t,a=5381;for(t=0;tl+i*l||r>d+c*d)&&(L.addPoint(t,n,o/1e3,u(document.elementFromPoint(t,n))),E=o,j=0)}}function r(e){var t=Date.now();I=D.setTimeout(function(){i(e,t)},200)}function i(e,t){w&&(w=!1,t||(t=Date.now()),L.addPoint(T,C,t/1e3,u(document.elementFromPoint(T,C))),h.track(L),b?(p.removeEventListener("touchmove",o,f),p.removeEventListener("touchend",i,f)):(p.removeEventListener("mousemove",o,f),p.removeEventListener("mouseup",i,f)),p.removeEventListener("mouseout",r,f))}function c(e,t){var n=null,a=null,o=null,r=!1;return t instanceof Screen?(n=t,a=null,o=n.parentUnitVariant,r=!0):"undefined"!=typeof ScreenObject&&t instanceof ScreenObject?(n=t.parentScreen,a=t,o=n.parentUnitVariant,r=!0):"undefined"!=typeof CreativeUnitVariant&&t instanceof CreativeUnitVariant&&(n=null,a=null,o=t,r=!0),r?extend({unitName:o?o.parentUnit.name:n.parentUnit.name,unitVariantLocalId:o?o.localId:null,screenLocalId:n?n.localId:null,screenTitle:n?n.title:null,screenIsMaster:n?n.isMasterScreen():null,objectLocalId:a?a.localId:null,objectName:a?a.name:null,objectClazz:a?a.constructor.name:null,initiationTimestamp:new Date/1e3},e):e}function u(e){function t(e){for(var o in e)if(e.hasOwnProperty(o)){if(e[o].name&&e[o].name==a)return e[o];if(e[o].localId&&e[o].localId==n)return e[o];var r;if(e[o].variants?r=t(e[o].variants):e[o].screens?r=t(e[o].screens):e[o].objects?r=t(e[o].objects):e[o].content&&e[o].content.objects?r=t(e[o].content.objects):e[o].component&&(r=e[o].component),r)return r}}if(!e)return null;for(var n,a,o=e;;){if(o.id&&0==o.id.indexOf("celtra-")){a=o.id.replace("celtra-",""),0==o.id.indexOf("celtra-object-")&&(n=o.id.replace("celtra-object-",""));var r=t(g);if(r)return"undefined"!=typeof CreativeUnit&&r instanceof CreativeUnit?r.currentScreen:r}if(!o.parentNode)break;o=o.parentNode}return null}var l=15,d=100,s=3e3,m=40,f={capture:!0,passive:!0},p=e,v=t,h=t.adapter.trackingCenter,g=t.units,w=!1,I=null,b=!0,L={},j=0,M=null,E=Date.now(),T=0,y=0,C=0,U=0,D=e.ownerDocument.defaultView||e.ownerDocument.parentWindow;attach(p,"touchstart",n,f),attach(p,"mousedown",n,f)};
function Tapper(e,t){function a(e){for(var t=e,a=null;1!=t.nodeType;)t=t.parentNode;for(;t&&1==t.nodeType&&t.tagName;){var n=t.tagName.toLowerCase();if(hasClass(t,"touchable")||"a"===n&&t.href||"button"===n||"img"===n||"input"===n&&t.type&&"button"===t.type.toLowerCase()){a=t;break}t=t.parentNode}return a}function n(e,t){var a=e.ownerDocument.createEvent("MouseEvents");a.initEvent("tap",!0,!0),t.dispatchEvent(a)}var o="undefined"!=typeof creative&&creative.adapter||adapter,c=o.useImprovedTapDetection?10:20,r=o.useImprovedTapDetection?200:400;t=t||o.useNativeClickForTapDetection,t&&(attach(e,"click",function(t){var o=a(t.target);o&&n(e,o)},!0),o.useNativeClickForTapDetection)||attach(e,"touchstart",function(i){var u=a(i.target);if(u){var h=!1;if(celtra.iframe()){var s=function(){var e=o.getTopWindow();return[e.scrollX,e.scrollY,e.innerWidth,e.innerHeight]},d=s();h=!0}var v=i.targetTouches[0].clientX-c,l=i.targetTouches[0].clientX+c,f=i.targetTouches[0].clientY-c,p=i.targetTouches[0].clientY+c;addClass(u,"touched");var g=!1,T=!1,m=!1,C=!1,D=new Date,w=function(e){if(!g&&!T){var t=e.targetTouches[0].clientX,a=e.targetTouches[0].clientY;g=h&&d.toString()!=s().toString(),T=!(t>=v&&l>=t&&a>=f&&p>=a),T||g?removeClass(u,"touched"):addClass(u,"touched")}},y=function(){if(!C&&(C=!0,detach(e,"touchmove",w,!1),detach(e,"touchend",arguments.callee,!1),hasClass(u,"touched"))){var a=new Date-D>r&&!deviceInfo.deviceType.desktop();if(removeClass(u,"touched"),T||g||m||a)return;t||n(e,u)}},N=function(){detach(e,"touchend",N,!0),nextFrame(function(){m=!0,y()})};attach(e,"touchcancel",function(e){removeClass(u,"touched"),y(e)},!1),attach(e,"touchmove",w,!1),attach(e,"touchend",y,!1),attach(e,"touchend",N,!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(e){function t(e,t){return Math.abs(e)>Math.abs(t)?e>0?"east":"west":t>0?"south":"north"}function n(){r.removeEventListener("touchmove",a),r.removeEventListener("touchend",h)}function a(e){if(e.touches.length>1)n();else{var a=e.changedTouches[0].pageX-s,h=e.changedTouches[0].pageY-u;if(i=Math.max(Math.abs(a),Math.abs(h)),i>Math.min(50,v))if(null===c)c=t(a,h);else{var o=t(a,h);c!=o&&n()}}}function h(){n(),i>=v&&d(c,i)}function o(e){e.preventDefault(),1==e.touches.length&&(s=e.changedTouches[0].pageX,u=e.changedTouches[0].pageY,c=null,r.addEventListener("touchmove",a,!1),r.addEventListener("touchend",h,!1))}var s,u,c,i,r=e.target,d=e.swipe,v=e.minLength||50;window.addEventListener("touchstart",noop,!1),r.addEventListener("touchstart",o,!1)};
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;;
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)},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.track=function(e,t){this.screen&&!this._isAttributable&&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?setTimeout(e,0):(creative.runtimeParams.clickedThrough=1,this.track({name:"firstClickThrough"},e)),defer(creative.trackingCenter.batchFlush),creative.clickedThrough(this)};;
function VideoContext(t,e,i){VideoContext.uberConstructor.call(this,t instanceof ActionContext?t.initiator:t,t&&t.userInitiated),this.file=e,this.url=e.getUrl(),this.label=i,this.source=null}inherit(VideoContext,ActionContext),VideoContext._eventNames=["videoDurationUpdate","videoPlayAttempted","videoPlayedSegment","videoStart","videoFirstQuartile","videoMidpoint","videoThirdQuartile","videoComplete"],VideoContext.prototype.registerSource=function(t){if(!t)throw"Not a valid source of video events.";this.source=t,VideoContext._eventNames.forEach(function(t){this.source.on(t,function(e){this.handleEvent(t,e)}.bind(this))}.bind(this))},VideoContext.prototype.handleEvent=function(t,e){this.track(extend(JSON.parse(JSON.stringify(e||{})),{name:t}))},VideoContext.prototype.track=function(t){if("videoPlayAttempted"==t.name){var e=this.file.url?"URL":"File";extend(t,{sourceType:e,source:"URL"==e?this.file.url:this.file.blobHash,label:this.label})}VideoContext.uber.track.call(this,t)};;
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,creative.deviceMotionListenerAdded||(creative.deviceMotionListenerAdded=!0,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 s=null,n=Math.abs(t.x-this.prevSignal.x),h=Math.abs(t.y-this.prevSignal.y),a=Math.abs(t.z-this.prevSignal.z);if(90===Math.abs(creative.adapter.orientation)){var o=h;h=n,n=o}n>h&&n>a&&n>this.shakeThreshold?s="x":h>n&&h>a&&h>this.shakeThreshold?s="y":a>n&&a>h&&a>this.shakeThreshold&&(s="z"),(n>this.shakeThreshold||h>this.shakeThreshold||a>this.shakeThreshold)&&this.emit("shake",s)}this.prevSignal=t}};;
!function(){"use strict";function t(t){for(var e in t)this[e]=t[e]}var e=function(t){var e="undefined"!=typeof FontFace,i=/iP(?:ad|hone|od).*OS ([0-9_]+)/.exec(t),o=!!i&&parseInt(i[1],10)>=10,n=/^(?!.*(?:Android|Chrome)).*Version\/(\d+(?:\.\d+)*).*?Safari/.exec(t);if(n||o)return!1;var s=/Gecko.*Firefox\/(\d+)/.exec(t);return s?e&&parseInt(s[1],10)>46:e}(window.navigator.userAgent);t.prototype.getId=function(){return this.typefaceId||this.id},t.prototype.getBrowserCompatibleFontFamily=function(){var t=this.supportsStretch()&&this.stretch?this.family+" "+this.stretch:this.family;if(t.length>25){for(var e,i=5381,o=0,n=t.length;n>o;o++)e=t.charCodeAt(o),i=(i<<5)+i+e;return i.toString()}return t},t.prototype.setBaseUrl=function(t){this.baseUrl=t},t.prototype.isCustom=function(){return"custom"===this.provider},t.prototype.isGoogle=function(){return"google"===this.provider},t.prototype.isMonotype=function(){return"monotype"===this.provider},t.prototype.isSystem=function(){return"system"===this.provider},t.prototype.hasSubsetStringDefined=function(){return"string"==typeof this.subset&&this.subset.length>0},t.prototype.needsLoading=function(){return this.isMonotype()||this.isGoogle()||this.isCustom()},t.prototype.supportsStretch=function(){return this.isMonotype()||this.isCustom()},t.prototype.getCssProperties=function(){return{"font-family":this.needsLoading()?'"'+this.getBrowserCompatibleFontFamily()+'", Helvetica, sans-serif':this.getBrowserCompatibleFontFamily(),"font-style":this.style,"font-weight":this.weight}},t.prototype.getFileUrl=function(t){if("undefined"!=typeof this.files&&"undefined"!=typeof this.files[t]){var e=this.getId();if("string"!=typeof e)return this.baseUrl+this.files[t]+"."+t;var i=this.files[t]&&this.files[t].name||"webfont",o=this.baseUrl+e+"/"+i+"."+t;return this.hasSubsetStringDefined()&&(o+="?subset="+encodeURIComponent(this.subset)),o}},t.prototype.getStyleForVariation=function(){var t=/normal|italic|oblique/i.exec(this.style);return"undefined"!=typeof t?t[0]:void 0},t.prototype.getWeightForVariation=function(){var t=/normal|bold|([1-9])00/i.exec(this.weight);return"undefined"!=typeof t?t[0]:void 0},t.prototype.generateFontFace=function(){var t="",e=this.getFileUrl("ttf"),i=this.getFileUrl("woff");return this.style&&this.weight&&(e||i)&&(t="@font-face {",t+='font-family: "'+this.getBrowserCompatibleFontFamily()+'";',t+="font-style: "+this.style+";",t+="font-weight: "+this.weight+";",t+="src:",i&&(t+='url("'+i+'") format("woff")'),e&&i&&(t+=","),e&&(t+='url("'+e+'") format("truetype")'),t+=";}"),t},t.prototype.loadStyle=function(t){t=t||function(){};var i=this.getBrowserCompatibleFontFamily(),o=function(e){t(e||"Failed to load font files.")},n=function(){if(e){var n="300px",s=this.style+" "+this.weight+" "+n+' "'+i+'"';document.fonts.load(s).then(function(e){1===e.length?t():o()},function(){o()})}else{if("undefined"==typeof FontLoader)return void o("Font Loader is not initialized.");FontLoader.watch(i,this.style,this.weight,t,o)}}.bind(this);if(this.isCustom()||this.isMonotype()){var s="font-style-manager",r=document.getElementById(s);r||(r=document.createElement("style"),r.id=s,document.getElementsByTagName("head")[0].appendChild(r));var a=this.generateFontFace();if(!a)return void o("Unable to define style for font without specifying files, style and weight.");var l=[].slice.apply(r.sheet.cssRules).some(function(t){var e=t.style.getPropertyValue("font-family").replace(/^['"](.+)['"]$/,"$1");return e==this.getBrowserCompatibleFontFamily()&&t.style.getPropertyValue("font-style")==this.style&&t.style.getPropertyValue("font-weight")==this.weight}.bind(this));l||r.sheet.insertRule(a,r.sheet.cssRules.length),n()}else if(this.isGoogle()){var f=("https:"===document.location.protocol?"https":"http")+"://fonts.googleapis.com/css",h=i.replace(/ /g,"+"),u=this.variation;if(!u){var d="",p="",y=this.getWeightForVariation();if("undefined"!=typeof y){p=y,"normal"==p?p=400:"bold"==p&&(p=700);var c=this.getStyleForVariation();"undefined"!=typeof c&&"italic"==c&&(d=c)}u=p+d}u&&(h+=":"+u);var g=f+"?family="+h;this.hasSubsetStringDefined()&&(g+="&text="+encodeURIComponent(this.subset));var m=[].slice.apply(document.getElementsByTagName("link")).filter(function(t){return t.href===g})[0];if(m||(m=document.createElement("link"),m.setAttribute("rel","stylesheet"),m.setAttribute("media","all"),m.setAttribute("href",g)),e){var v=function(){m._finished=!0,n()};m._finished?n():(m.addEventListener("load",v),m.addEventListener("error",v))}else"undefined"!=typeof defer?defer(n,0,"FontBase.loadStyle defer watchFont"):setTimeout(n,0);m.parentNode||document.getElementsByTagName("head")[0].appendChild(m)}else this.isSystem()?t():o("Invalid or unsupported provider.")},Object.defineProperty(t,"useCSSFontLoadingAPI",{value:e}),window.FontBase=t}();;
var ScreenTransition={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",t.style.backfaceVisibility=e.style.backfaceVisibility="hidden",r.style.backfaceVisibility=s.style.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(){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=this._runOnce(o);once(r,"transitionend",l),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(){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(l,a+50)},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())}}};;
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"],BaseCreativeUnit.prototype.awake=function(){BaseCreativeUnit.uber.awake.call(this),this._availableSize={width:0,height:0},this._isRendering=!1,this._engagementTracker=null},BaseCreativeUnit.prototype.createNode=function(){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);var e="only"==(creative.experiments.get("ExtendedEngagement")||{}).chosenVariant;return e&&(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.getRxStateObject=function(){return creative.adapter.getRxStateObject(this.name)},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.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.openPotentialUniversalOrAppLink(this._processURLParams(a),i))}.bind(this);if(a){var p=function(e){return e.indexOf("itunes.apple.com/us/app/")>0},l=function(e){return 0===e.indexOf("market://details?id=")};creative.adapter._stopAllMedia(),p(a)||l(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)))}e.screen&&creative.adapter.sendToEventMonitor(s,t.triggerId,e.screen.name,a||""),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,p=function(t,r,a,i){if(c){var n={name:"_openBrowserRefactor",experiment:c,branch:t,logic:r,environment:a};i&&(n.redirect=i),e.track(n)}},l=function(e){if(c){var t=creative.adapter.trackingCenter,r=t._createTrackingEvent({name:"redirectTrackingExperiment"});r.redirect=e,t._pendingPixels.push(t._getTrackerUrl(r))}},d=function(e,t){return Math.floor(Math.random()*(t-e+1))+e};if(!a)return r();a=this._addUrlAppendage(a);var u="urlOpened",v={delay:[0,100,500][d(0,2)],step:d(1,3),randId:randInt()};if(creative.adapter._stopAllMedia(),e.track({name:u,url:a,label:t.reportLabel}),e.trackClickThrough(),desktop()&&windows())!creative.adapter.canOpenUrlInSameWindow||i?(p("new-window","flush-and-open","desktop-windows",v),l(v),creative.adapter.trackingCenter.flush(),s()):(p("same-window","flush-then-open","desktop-windows",v),l(v),creative.adapter.trackingCenter.flush(s),defer(s,o));else if("on"==c)!creative.adapter.canOpenUrlInSameWindow||i?(p("new-window","flush-and-open","all-except-desktop-windows",v),l(v),creative.adapter.trackingCenter.flush(),s()):(p("same-window","flush-then-open","all-except-desktop-windows",v),l(v),creative.adapter.trackingCenter.flush(s),defer(s,o));else if(!creative.adapter.canOpenUrlInSameWindow||i){p("new-window","wrap+open","all-except-desktop-windows"),c&&e.track({name:"_openBrowserRefactorFlushVsWrap",trackingWith:"wrap"});var h=creative.wrapRedirectPageUrl(this._processURLParams(a));c&&(e.track({name:"_openBrowserRefactorFlushVsWrap",trackingWith:"flush"}),creative.adapter.trackingCenter.flush()),creative.adapter.openBrowser(h,i)}else p("same-window","wrap+open","all-except-desktop-windows"),creative.adapter.openBrowser(creative.wrapRedirectPageUrl(this._processURLParams(a)),i);creative.adapter.sendToEventMonitor(u,t.triggerId,e.screen.name,a,t.reportLabel),r()},BaseCreativeUnit.prototype.facebookURLAction=function(e,t,r){if(!t.url)return r();creative.adapter._stopAllMedia(),e.track({name:"facebookShareAttempt",url:t.url,label:t.reportLabel}),e.trackClickThrough();var a="http://m.facebook.com/sharer.php?u="+encodeURIComponent(t.url);creative.adapter.openBrowser(creative.wrapRedirectPageUrl(a),creative.shouldClickThroughToNewWindow(e)),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=document.createElement("div");a.className="celtra-display-image-overlay touchable",a.style.backgroundImage="url("+t.file.getUrl()+")",this.unitDiv.appendChild(a),(t.file.meta.width>this.size.width||t.file.meta.height>this.size.height)&&(a.style.backgroundSize="contain"),t.color&&(a.style.backgroundColor=t.color),attach(a,"tap",function(){a.parentNode.removeChild(a),r()},!1);var i=document.createElement("div");i.className="celtra-back-button touchable "+this.alignBackButtonHorizontal,a.appendChild(i)},BaseCreativeUnit.prototype.saveImageAction=function(e,t,r){function a(a,n){var o=a.getOriginalUrl(),c=a.name,p=a.blobHash;if(i(p),creative.adapter.canSaveImage())creative.adapter.trackingCenter.flush(function(){creative.adapter.saveImage(o,c,r);var a=n||c;creative.adapter.sendToEventMonitor(s,t.triggerId,e.screen.name,a,t.reportLabel)});else{var l=new SaveImageDialog(creative.adapter,creative.resourceUrl,o);l.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 p=c.url,l=p.split(",")[1];n(),postBlob(l,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=new VideoContext(e,t.file,t.reportLabel);i.track({engineType:"html5",name:"videoPlayAttempted",trackable:a,filename:t.file.name,userInitiated:e.consideredUserInitiatedByBrowser,startMuted:!1,videoPlayerMode:"fullscreen",videoPreset:null}),creative.adapter.playVideoInPlayer(i,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=creative.adapter.useFSVP;creative.adapter._stopAllMedia(),videoContext=new VideoContext(e,new File(t.url),t.reportLabel),videoContext.track({engineType:"html5",name:"videoPlayAttempted",trackable:a,filename:null,userInitiated:e.consideredUserInitiatedByBrowser,startMuted:!1,videoPlayerMode:"fullscreen",videoPreset:null}),creative.adapter.playVideoInPlayer(videoContext,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=function(e){return new RegExp("(^http(s)?://)|(^market://)","i").test(e)},i=function(){return new RegExp("^\\d+$").test(t.appStoreUrl)?"http://itunes.apple.com/us/app/keynote/id"+t.appStoreUrl:(a(t.appStoreUrl)?"":"http://")+t.appStoreUrl},n=function(){return a(t.androidMarketAppId)?t.androidMarketAppId:"market://details?id="+t.androidMarketAppId};creative.adapter._stopAllMedia();var o;if(creative.storeOpenedOverrideUrls[t.reportLabel]?o=creative.storeOpenedOverrideUrls[t.reportLabel]:ios()&&t.appStoreUrl?o=i():android()&&t.androidMarketAppId?o=n():desktop()&&(t.appStoreUrl||t.androidMarketAppId)&&(o="app://"+encodeURIComponent(t.reportLabel)),o){var s=!ios("9",null),c="storeOpened",p=2,l=function(){creative.adapter.getApp(this._processURLParams(o))}.bind(this),d=function(){if(!--p&&s){l();var r={};t.appStoreUrl&&(r.appStoreUrl=i()),t.androidMarketAppId&&(r.androidMarketAppId=n()),creative.adapter.sendToEventMonitor(c,t.triggerId,e.screen.name,r,t.reportLabel)}}.bind(this);e.track({name:c,appUri:o,label:t.reportLabel},d),e.trackClickThrough(d),s||setTimeout(l,0)}r()},BaseCreativeUnit.prototype.callPhoneAction=function(e,t,r){function a(){--i||(creative.adapter.callPhone(t.number),creative.adapter.sendToEventMonitor(n,t.triggerId,e.screen.name,t.number,t.reportLabel))}if(!t.number)return r();creative.adapter._stopAllMedia();var i=2,n="phoneCalled";e.track({name:n,number:t.number,label:t.reportLabel},a),e.trackClickThrough(a),r()},BaseCreativeUnit.prototype.answerSurveyQuestion=function(e,t,r){var a=["answerIds","questionId","surveyId"],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(!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}),r()},BaseCreativeUnit.prototype.expandAction=function(){throw new Error("Expand action is not available for this ad format or creative unit")},BaseCreativeUnit.prototype._assertAppearBeforeExpand=function(){this.hasAppearedAtLeastOnce||creative.adapter.trackingCenter.track({name:"userError",userErrorId:"expandBeforeAppear"})},BaseCreativeUnit.prototype.collapseAction=function(){throw new Error("Collapse action is not available for this ad format or creative unit")},BaseCreativeUnit.prototype.dismissAction=function(){throw new Error("Dismiss action is not available for this ad format or creative unit")},BaseCreativeUnit.prototype.findAll=function(){throw new Error("Not implemented!")},BaseCreativeUnit.prototype.findByType=function(){throw new Error("Not implemented!")},BaseCreativeUnit.prototype.find=function(e){var t=this.findAll(e);return t.length>0?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",grid:"Grid",group:"Group",gyro:"Gyro",hotspot:"Hotspot",input:"Input",lighttable:"LightTable",map:"Map",transitions:"Transitions",mastervideo:"MasterVideo",nearby:"Nearby",painty:"Painty",pannable:"Pannable",particles:"Particle",picture:"Picture",puzzle:"Puzzle",quiz:"Quiz",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"},n=function(e){return e=e.toLowerCase().replace(/\W+/g,""),e in t?t[e]:""},o={findAll:function(e){function t(a){a.forEach(function(a){("undefined"==typeof e||a.name==e)&&o.push(a),a.getNestedContainers().forEach(function(e){t(e.objects),n(e.scenes)})})}function n(t){t&&t.forEach(function(t){("undefined"==typeof e||t.name==e)&&o.push(t)})}var o=[];return"Screen"==this.constructor.name?(t(this.objects),n(this.scenes)):"function"==typeof this.getNestedContainers&&this.getNestedContainers().forEach(function(e){t(e.objects),n(e.scenes)}),o},findByType:function(e){function t(i){i.forEach(function(i){i.constructor.name==n(e)&&a.push(i),i.getNestedContainers().forEach(function(e){t(e.objects),o(e.scenes)})})}function o(t){t&&t.forEach(function(t){t.constructor.name==n(e)&&a.push(t)})}var a=[];return"undefined"==typeof e?a:("Screen"==this.constructor.name?(t(this.objects),o(this.scenes)):"function"==typeof this.getNestedContainers&&this.getNestedContainers().forEach(function(e){t(e.objects),o(e.scenes)}),a)},find:function(e){var t=this.findAll(e);return t.length>0?t[0]:null}};e.DiscoverableTrait=o}(window);;
var SaveImageDialog=function(t,i,e){this.adapter=t,this.resourceUrl=i,this.imageUrl=e,this.containerMinMargin=5,this.containerMinWidth=190,this.imageContainerTotalHMargin=40,this.imageContainerTotalVMargin=140,this.instructionOneLineWidth=250,this.instructionTwoLinesWidth=145,this._handleImageLoaded=this._handleImageLoaded.bind(this),this._resize=this._resize.bind(this)};SaveImageDialog.prototype.show=function(t){this.adapter.createPlacements({saveImageAction:{attachment:"body",positioning:"screen",type:"layer"}},function(){this.placement=this.adapter.placements.saveImageAction,this.placement.setZIndex("max"),this.placement.setSize("100%","100%"),this.placement.setPosition(0,0),this.saveImageActionStyle=this.placement.createElement("link"),this.saveImageActionStyle.rel="stylesheet",this.saveImageActionStyle.type="text/css",this.saveImageActionStyle.href=this.resourceUrl+"runner/SaveImageDialog.css",this.placement.getContainer().appendChild(this.saveImageActionStyle),this.overlay=this.placement.createElement("div"),this.overlay.style.display="none",this.overlay.className="celtra-save-image-action-overlay",this.preloaderImage=this.placement.createElement("div"),this.preloaderImage.className="celtra-save-image-action-preloader-image",this.preloaderImage.style.backgroundImage="url("+this.resourceUrl+"runner/clazzes/CreativeUnit/preloader.png)",this.container=this.placement.createElement("div"),this.container.className="celtra-save-image-action-container",this.backButton=this.placement.createElement("div"),this.backButton.style.backgroundImage="url("+this.resourceUrl+"runner/clazzes/CreativeUnit/save-image-close-button.png)",this.backButton.className="celtra-save-image-action-back-button",this.title=this.placement.createElement("div"),this.title.innerHTML="Save Image",this.title.className="celtra-save-image-action-title",this.titleLine1=this.placement.createElement("div"),this.titleLine1.className="celtra-save-image-action-title-line-1",this.titleLine2=this.placement.createElement("div"),this.titleLine2.className="celtra-save-image-action-title-line-2",this.imageContainer=this.placement.createElement("div"),this.imageContainer.className="celtra-save-image-action-image-container",this.image=this.placement.createElement("img"),this.instruction=this.placement.createElement("div"),this.instruction.style.backgroundImage="url("+this.resourceUrl+"runner/clazzes/CreativeUnit/hold-to-save-icon.png)",this.instruction.style.backgroundSize="21px 40px",this.instruction.innerHTML="Tap & hold to save the image to your device.",this.instruction.className="celtra-save-image-action-instruction",this.image.onload=this._handleImageLoaded,this.image.src=this.imageUrl,this.container.appendChild(this.title),this.container.appendChild(this.titleLine1),this.container.appendChild(this.titleLine2),this.imageContainer.appendChild(this.image),this.container.appendChild(this.imageContainer),this.container.appendChild(this.instruction),this.container.appendChild(this.backButton),this.overlay.appendChild(this.preloaderImage),attach(this.backButton,"touchend",function(){this.adapter.destroyPlacement("saveImageAction"),t()}.bind(this)),this.placement.populate(this.overlay,function(){this.placement.show()}.bind(this))}.bind(this))},SaveImageDialog.prototype._handleImageLoaded=function(){this._resize(),this.overlay.removeChild(this.preloaderImage),this.overlay.appendChild(this.container),this.placement.on("resized",this._resize)},SaveImageDialog.prototype._resize=function(){var t,i,e=this.placement.getViewportGeometry(),a=e.width-2*this.containerMinMargin,n=e.height-2*this.containerMinMargin,s=a-this.imageContainerTotalHMargin,h=n-this.imageContainerTotalVMargin,r=s/h,l=this.image.naturalWidth/this.image.naturalHeight,o=this.image.naturalWidth>s,c=this.image.naturalHeight>h,g=this.containerMinMargin,m=this.containerMinMargin,d=0,p=0;if(o&&c){var u;t=s,i=h,l>r?(u=l/r*100,this.image.style.width=u+"%",this.image.style.height="100%",d=-(u-100)/2):(u=r/l*100,this.image.style.width="100%",this.image.style.height=u+"%",p=-((u-100)/2)*(i/t))}else if(o){var y=this.image.naturalWidth/s*100;d=-(y-100)/2,t=s,i=this.image.naturalHeight,this.image.style.width=y+"%",this.image.style.height="100%",m=(e.height-i-this.imageContainerTotalVMargin)/2}else if(c){var v=this.image.naturalHeight/h*100,C=-(v-100)/2;t=this.image.naturalWidth,i=h,p=C*(i/t),this.image.style.width="100%",this.image.style.height=v+"%",g=(e.width-t-this.imageContainerTotalHMargin)/2}else t=this.image.naturalWidth,i=this.image.naturalHeight,this.image.style.width="100%",this.image.style.height="100%",g=(e.width-t-this.imageContainerTotalHMargin)/2,m=(e.height-i-this.imageContainerTotalVMargin)/2;var I=t+this.imageContainerTotalHMargin,M=t+this.imageContainerTotalHMargin-this.containerMinWidth;if(0>M){var T=M/2;g+=T,this.imageContainer.style.left=19-T+"px",this.imageContainer.style.right=19-T+"px",I-=M}this.container.style.left=g+"px",this.container.style.right=g+"px",this.container.style.top=m+"px",this.container.style.bottom=m+"px",this.image.style.marginLeft=d+"%",this.image.style.marginTop=p+"%",I347||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 c=g;/\-?(moz|webkit|o|ms)/.test(r.prefix)?g=90-c:c=90-g;var p=e.convertAngleToSideCorner(g),G=e.gradientOldSideCorner[p];a.webkitGradient="-webkit-gradient(linear, "+G+", "+i+")",a.mozLinearGradient="-moz-linear-gradient("+c+"deg, "+n+")",a.msLinearGradient="-ms-linear-gradient("+c+"deg, "+n+")",a.oLinearGradient="-o-linear-gradient("+c+"deg, "+n+")",a.webkitLinearGradient="-webkit-linear-gradient("+c+"deg, "+n+")",a.linearGradient="linear-gradient("+g+"deg, "+n+")"}else if("radial"===r.type){var h=parseInt(r.radialGradientWidth,10),m=parseInt(r.radialGradientHeight,10),S=parseInt(r.radialGradientXPosition,10),u=parseInt(r.radialGradientYPosition,10),b=h+"% "+m+"%",f=S+"% "+u+"% ",x=b+" at "+f;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},t.Color=e}(window);;
!function(){"use strict";var t={updateTextStyle:function(){},initializeFont:function(){this.font.setBaseUrl((creative.secure?creative.cachedApiUrl:creative.insecureCachedApiUrl)+"fonts/"),this.incrementLoadingCount(),this.loadFont(deferred(this.decrementLoadingCount.bind(this),0,"TextStyleIntegrator.initializeFont deferred loadFont callback")),this.updateTextStyle()},getFontSize:function(){return this.fontSize},getLineSpacing:function(){return this.lineSpacing},getLetterSpacing:function(){return this.letterSpacing},getTextShadowOffset:function(){var t={x:0,y:0};if("undefined"!=typeof this.textShadow&&this.textShadow){var e=this.textShadowAngle*(Math.PI/180);t.x=Math.round(this.textShadowDistance*Math.cos(e)),t.y=Math.round(this.textShadowDistance*Math.sin(e))}return t},getTextShadowBlur:function(){return android("2")&&this.textShadowBlur<1?1:this.textShadowBlur},applyTextStyle:function(t){var e=this.font.getCssProperties(),i={fontFamily:e["font-family"],fontStyle:e["font-style"],fontWeight:e["font-weight"],color:this.textColor,direction:"",letterSpacing:"",textAlign:"",textDecoration:"",textShadow:""};if("undefined"!=typeof this.textDirection&&(i.direction=this.textDirection),"undefined"!=typeof this.textAlign&&(i.textAlign=this.textAlign),"undefined"!=typeof this.textDecoration&&(i.textDecoration=this.textDecoration),"undefined"!=typeof this.letterSpacing&&(i.letterSpacing=this.getLetterSpacing()+"px"),"undefined"!=typeof this.textShadow&&this.textShadow){var n=this.getTextShadowOffset();i.textShadow=n.x+"px "+n.y+"px "+this.getTextShadowBlur()+"px "+this.textShadowColor}extend(t,i)},applyTextSize:function(t){var e=this.getFontSize();this.scaleFont&&this.scaleBaseWidth>0&&"undefined"!=typeof this.scaleBaseHeight&&this.scaleBaseHeight>0?e=Math.min(e/(this.scaleBaseWidth/this.size.width),e/(this.scaleBaseHeight/this.size.height)):this.scaleFont&&this.scaleBaseWidth>0&&(e/=this.scaleBaseWidth/this.size.width);var i={fontSize:e+"px",lineHeight:"",paddingLeft:"",paddingRight:""};if("undefined"!=typeof this.lineSpacing&&(i.lineHeight=Math.max(1,this.getLineSpacing()+e)+"px"),"undefined"!=typeof this.scaleFont&&this.scaleFont){var n=this.getNaturalSize(),o=this.scaleBaseWidth/this.scaleBaseHeight,a=o*n.height,r=n.width-a;if(r>0)switch(this.textAlign){case"center":i.paddingRight=Math.round(r/2)+"px",i.paddingLeft=Math.round(r/2)+"px";break;case"right":i.paddingLeft=Math.round(r)+"px";break;default:i.paddingRight=Math.round(r)+"px"}}extend(t,i)},getFontLoader:function(t){t=t||noop,!this.font.needsLoading()||FontBase.useCSSFontLoadingAPI||"undefined"!=typeof FontLoader?t():loadJS(creative.resourceUrl+"runner-min/FontLoader.js",t)},loadFont:function(t){t=t||noop;var e={fontFamily:this.font.family,fontProvider:this.font.provider,fontStretch:this.font.stretch||"",fontStyle:this.font.style,fontWeight:this.font.weight,fontTtfUrl:this.font.getFileUrl("ttf")||"",fontWoffUrl:this.font.getFileUrl("woff")||""},i=creative.perf.start("TextStyleIntegrator.loadFont",e);this.getFontLoader(function(){var n=creative.perf.start("TextStyleIntegrator.loadStyle",e);this.font.loadStyle(function(o){e.errorMessage=o||"",n.end(),i.end(),!o&&this.font.isMonotype()&&this.trackMonotypeUsage(),t(o)}.bind(this))}.bind(this))},setFont:function(t){var e=["provider","family","style","weight","stretch","variation","files","baseUrl"],i={};e.forEach(function(e){this.font.localId&&(i[e]="files"===e?{}:this.font[e]),"undefined"!=typeof t[e]&&(i[e]=t[e])}.bind(this)),-1===["custom","google","web"].indexOf(i.provider)&&(i.provider="custom"),this.font.localId?("custom"===i.provider&&i.family===this.font.family&&(i.family=this.font.family+" (custom)"),this.font=new FontBase(i)):extend(this.font,i),creative.track({name:"retiredFeatureUsed",featureType:"apifunction",featureName:"TextStyleIntegrator.setFont"})},trackMonotypeUsage:function(){if(creative.runtimeParams.monotypeProjectId&&!creative.runtimeParams.monotypeUsageReported){creative.runtimeParams.monotypeUsageReported=1;var t=document.createElement("img");t.src=(creative.runtimeParams.secure?"https":"http")+"://fast.fonts.net/t/1.png?apiType=css&projectid="+creative.runtimeParams.monotypeProjectId,creative.aggregatorTracking.trackAggregator("monotypeUsageReported",{monotypeProjectId:creative.runtimeParams.monotypeProjectId,creativeId:creative.id})}}};window.TextStyleIntegrator=t}();;
!function(e){var o=Date.now||function(){return+new Date},t=60,_=1e3,i={},l=1;e.core?core.effect||(core.effect={}):e.core={effect:{}},core.effect.Animate={requestAnimationFrame:function(){var o=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame,t=!!o;if(o&&!/requestAnimationFrame\(\)\s*\{\s*\[native code\]\s*\}/i.test(o.toString())&&(t=!1),t)return function(e,t){o(e,t)};var _=60,i={},l=0,n=1,r=null,a=+new Date;return function(e){var o=n++;return i[o]=e,l++,null===r&&(r=setInterval(function(){var e=+new Date,o=i;i={},l=0;for(var t in o)o.hasOwnProperty(t)&&(o[t](e),a=e);e-a>2500&&(clearInterval(r),r=null)},1e3/_)),o}}(),stop:function(e){var o=null!=i[e];return o&&(i[e]=null),o},isRunning:function(e){return null!=i[e]},start:function(e,n,r,a,c,s){var p=o(),h=p,f=0,m=0,u=l++;if(s||(s=document.body),u%20===0){var g={};for(var v in i)g[v]=!0;i=g}var d=function(l){var g=l!==!0,v=o();if(!i[u]||n&&!n(u))return i[u]=null,void(r&&r(t-m/((v-p)/_),u,!1));if(g)for(var T=Math.round((v-h)/(_/t))-1,S=0;S1&&(f=1));var L=c?c(f):f;e(L,v,g)!==!1&&1!==f||!g?g&&(h=v,core.effect.Animate.requestAnimationFrame(d,s)):(i[u]=null,r&&r(t-m/((v-p)/_),u,1===f||null==a))};return i[u]=!0,core.effect.Animate.requestAnimationFrame(d,s),u}}}(window);var ZyngaScroller;!function(){var e=function(){};ZyngaScroller=function(o,t){this.__callback=o,this.options={scrollingX:!0,scrollingY:!0,animating:!0,animationDuration:250,bouncing:!0,locking:!0,paging:!1,snapping:!1,zooming:!1,minZoom:.5,maxZoom:3,speedMultiplier:1,scrollingComplete:e,penetrationDeceleration:.03,penetrationAcceleration:.08};for(var _ in t)this.options[_]=t[_]};var o=function(e){return Math.pow(e-1,3)+1},t=function(e){return(e/=.5)<1?.5*Math.pow(e,3):.5*(Math.pow(e-2,3)+2)},_={__isSingleTouch:!1,__isTracking:!1,__didDecelerationComplete:!1,__isGesturing:!1,__isDragging:!1,__isDecelerating:!1,__isAnimating:!1,__clientLeft:0,__clientTop:0,__clientWidth:0,__clientHeight:0,__contentWidth:0,__contentHeight:0,__snapWidth:100,__snapHeight:100,__refreshHeight:null,__refreshActive:!1,__refreshActivate:null,__refreshDeactivate:null,__refreshStart:null,__zoomLevel:1,__scrollLeft:0,__scrollTop:0,__maxScrollLeft:0,__maxScrollTop:0,__scheduledLeft:0,__scheduledTop:0,__scheduledZoom:0,__lastTouchLeft:null,__lastTouchTop:null,__lastTouchMove:null,__positions:null,__minDecelerationScrollLeft:null,__minDecelerationScrollTop:null,__maxDecelerationScrollLeft:null,__maxDecelerationScrollTop:null,__decelerationVelocityX:null,__decelerationVelocityY:null,setDimensions:function(e,o,t,_){var i=this;e===+e&&(i.__clientWidth=e),o===+o&&(i.__clientHeight=o),t===+t&&(i.__contentWidth=t),_===+_&&(i.__contentHeight=_),i.__computeScrollMax(),i.scrollTo(i.__scrollLeft,i.__scrollTop,!0)},setPosition:function(e,o){var t=this;t.__clientLeft=e||0,t.__clientTop=o||0},setSnapSize:function(e,o){var t=this;t.__snapWidth=e,t.__snapHeight=o},activatePullToRefresh:function(e,o,t,_){var i=this;i.__refreshHeight=e,i.__refreshActivate=o,i.__refreshDeactivate=t,i.__refreshStart=_},triggerPullToRefresh:function(){this.__publish(this.__scrollLeft,-this.__refreshHeight,this.__zoomLevel,!0),this.__refreshStart&&this.__refreshStart()},finishPullToRefresh:function(){var e=this;e.__refreshActive=!1,e.__refreshDeactivate&&e.__refreshDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)},getValues:function(){var e=this;return{left:e.__scrollLeft,top:e.__scrollTop,zoom:e.__zoomLevel}},getScrollMax:function(){var e=this;return{left:e.__maxScrollLeft,top:e.__maxScrollTop}},zoomTo:function(e,o,t,_,i){var l=this;if(!l.options.zooming)throw new Error("Zooming is not enabled!");i&&(l.__zoomComplete=i),l.__isDecelerating&&(core.effect.Animate.stop(l.__isDecelerating),l.__isDecelerating=!1);var n=l.__zoomLevel;null==t&&(t=l.__clientWidth/2),null==_&&(_=l.__clientHeight/2),e=Math.max(Math.min(e,l.options.maxZoom),l.options.minZoom),l.__computeScrollMax(e);var r=(t+l.__scrollLeft)*e/n-t,a=(_+l.__scrollTop)*e/n-_;r>l.__maxScrollLeft?r=l.__maxScrollLeft:0>r&&(r=0),a>l.__maxScrollTop?a=l.__maxScrollTop:0>a&&(a=0),l.__publish(r,a,e,o)},zoomBy:function(e,o,t,_,i){var l=this;l.zoomTo(l.__zoomLevel*e,o,t,_,i)},scrollTo:function(e,o,t,_){var i=this;if(i.__isDecelerating&&(core.effect.Animate.stop(i.__isDecelerating),i.__isDecelerating=!1),null!=_&&_!==i.__zoomLevel){if(!i.options.zooming)throw new Error("Zooming is not enabled!");e*=_,o*=_,i.__computeScrollMax(_)}else _=i.__zoomLevel;i.options.scrollingX?i.options.paging?e=Math.round(e/i.__clientWidth)*i.__clientWidth:i.options.snapping&&(e=Math.round(e/i.__snapWidth)*i.__snapWidth):e=i.__scrollLeft,i.options.scrollingY?i.options.paging?o=Math.round(o/i.__clientHeight)*i.__clientHeight:i.options.snapping&&(o=Math.round(o/i.__snapHeight)*i.__snapHeight):o=i.__scrollTop,e=Math.max(Math.min(i.__maxScrollLeft,e),0),o=Math.max(Math.min(i.__maxScrollTop,o),0),e===i.__scrollLeft&&o===i.__scrollTop&&(t=!1),i.__publish(e,o,_,t)},scrollBy:function(e,o,t){var _=this,i=_.__isAnimating?_.__scheduledLeft:_.__scrollLeft,l=_.__isAnimating?_.__scheduledTop:_.__scrollTop;_.scrollTo(i+(e||0),l+(o||0),t)},doMouseZoom:function(e,o,t,_){var i=this,l=e>0?.97:1.03;return i.zoomTo(i.__zoomLevel*l,!1,t-i.__clientLeft,_-i.__clientTop)},doTouchStart:function(e,o){if(null==e.length)throw new Error("Invalid touch list: "+e);if(o instanceof Date&&(o=o.valueOf()),"number"!=typeof o)throw new Error("Invalid timestamp value: "+o);var t=this;t.__interruptedAnimation=!0,t.__isDecelerating&&(core.effect.Animate.stop(t.__isDecelerating),t.__isDecelerating=!1,t.__interruptedAnimation=!0),t.__isAnimating&&(core.effect.Animate.stop(t.__isAnimating),t.__isAnimating=!1,t.__interruptedAnimation=!0);var _,i,l=1===e.length;l?(_=e[0].pageX,i=e[0].pageY):(_=Math.abs(e[0].pageX+e[1].pageX)/2,i=Math.abs(e[0].pageY+e[1].pageY)/2),t.__initialTouchLeft=_,t.__initialTouchTop=i,t.__zoomLevelStart=t.__zoomLevel,t.__lastTouchLeft=_,t.__lastTouchTop=i,t.__lastTouchMove=o,t.__lastScale=1,t.__enableScrollX=!l&&t.options.scrollingX,t.__enableScrollY=!l&&t.options.scrollingY,t.__isTracking=!0,t.__didDecelerationComplete=!1,t.__isDragging=!l,t.__isSingleTouch=l,t.__positions=[]},doTouchMove:function(e,o,t){if(null==e.length)throw new Error("Invalid touch list: "+e);if(o instanceof Date&&(o=o.valueOf()),"number"!=typeof o)throw new Error("Invalid timestamp value: "+o);var _=this;if(_.__isTracking){var i,l;2===e.length?(i=Math.abs(e[0].pageX+e[1].pageX)/2,l=Math.abs(e[0].pageY+e[1].pageY)/2):(i=e[0].pageX,l=e[0].pageY);var n=_.__positions;if(_.__isDragging){var r=i-_.__lastTouchLeft,a=l-_.__lastTouchTop,c=_.__scrollLeft,s=_.__scrollTop,p=_.__zoomLevel;if(null!=t&&_.options.zooming){var h=p;if(p=p/_.__lastScale*t,p=Math.max(Math.min(p,_.options.maxZoom),_.options.minZoom),h!==p){var f=i-_.__clientLeft,m=l-_.__clientTop;c=(f+c)*p/h-f,s=(m+s)*p/h-m,_.__computeScrollMax(p)}}if(_.__enableScrollX){c-=r*this.options.speedMultiplier;var u=_.__maxScrollLeft;(c>u||0>c)&&(_.options.bouncing?c+=r/2*this.options.speedMultiplier:c=c>u?u:0)}if(_.__enableScrollY){s-=a*this.options.speedMultiplier;var g=_.__maxScrollTop;(s>g||0>s)&&(_.options.bouncing?(s+=a/2*this.options.speedMultiplier,_.__enableScrollX||null==_.__refreshHeight||(!_.__refreshActive&&s<=-_.__refreshHeight?(_.__refreshActive=!0,_.__refreshActivate&&_.__refreshActivate()):_.__refreshActive&&s>-_.__refreshHeight&&(_.__refreshActive=!1,_.__refreshDeactivate&&_.__refreshDeactivate()))):s=s>g?g:0)}n.length>60&&n.splice(0,30),n.push(c,s,o),_.__publish(c,s,p)}else{var v=_.options.locking?3:0,d=5,T=Math.abs(i-_.__initialTouchLeft),S=Math.abs(l-_.__initialTouchTop);_.__enableScrollX=_.options.scrollingX&&T>=v,_.__enableScrollY=_.options.scrollingY&&S>=v,n.push(_.__scrollLeft,_.__scrollTop,o),_.__isDragging=(_.__enableScrollX||_.__enableScrollY)&&(T>=d||S>=d),_.__isDragging&&(_.__interruptedAnimation=!1)}_.__lastTouchLeft=i,_.__lastTouchTop=l,_.__lastTouchMove=o,_.__lastScale=t}},doTouchEnd:function(e){if(e instanceof Date&&(e=e.valueOf()),"number"!=typeof e)throw new Error("Invalid timestamp value: "+e);var o=this;if(o.__isTracking){if(o.__isTracking=!1,o.__isDragging)if(o.__isDragging=!1,o.__isSingleTouch&&o.options.animating&&e-o.__lastTouchMove<=100){for(var t=o.__positions,_=t.length-1,i=_,l=_;l>0&&t[l]>o.__lastTouchMove-100;l-=3)i=l;if(i!==_){var n=t[_]-t[i],r=o.__scrollLeft-t[i-2],a=o.__scrollTop-t[i-1];o.__decelerationVelocityX=r/n*(1e3/60),o.__decelerationVelocityY=a/n*(1e3/60);var c=o.options.paging||o.options.snapping?4:1;(Math.abs(o.__decelerationVelocityX)>c||Math.abs(o.__decelerationVelocityY)>c)&&(o.__refreshActive||o.__startDeceleration(e))}else o.options.scrollingComplete()}else e-o.__lastTouchMove>100&&o.options.scrollingComplete();o.__isDecelerating||(o.__refreshActive&&o.__refreshStart?(o.__publish(o.__scrollLeft,-o.__refreshHeight,o.__zoomLevel,!0),o.__refreshStart&&o.__refreshStart()):((o.__interruptedAnimation||o.__isDragging)&&o.options.scrollingComplete(),o.scrollTo(o.__scrollLeft,o.__scrollTop,!0,o.__zoomLevel),o.__refreshActive&&(o.__refreshActive=!1,o.__refreshDeactivate&&o.__refreshDeactivate()))),o.__positions.length=0}},__publish:function(e,_,i,l){var n=this,r=n.__isAnimating;if(r&&(core.effect.Animate.stop(r),n.__isAnimating=!1),l&&n.options.animating){n.__scheduledLeft=e,n.__scheduledTop=_,n.__scheduledZoom=i;var a=n.__scrollLeft,c=n.__scrollTop,s=n.__zoomLevel,p=e-a,h=_-c,f=i-s,m=function(e,o,t){t&&(n.__scrollLeft=a+p*e,n.__scrollTop=c+h*e,n.__zoomLevel=s+f*e,n.__callback&&n.__callback(n.__scrollLeft,n.__scrollTop,n.__zoomLevel))},u=function(e){return n.__isAnimating===e},g=function(e,o,t){o===n.__isAnimating&&(n.__isAnimating=!1),(n.__didDecelerationComplete||t)&&n.options.scrollingComplete(),n.options.zooming&&(n.__computeScrollMax(),n.__zoomComplete&&(n.__zoomComplete(),n.__zoomComplete=null))};n.__isAnimating=core.effect.Animate.start(m,u,g,n.options.animationDuration,r?o:t)}else n.__scheduledLeft=n.__scrollLeft=e,n.__scheduledTop=n.__scrollTop=_,n.__scheduledZoom=n.__zoomLevel=i,n.__callback&&n.__callback(e,_,i),n.options.zooming&&(n.__computeScrollMax(),n.__zoomComplete&&(n.__zoomComplete(),n.__zoomComplete=null))},__computeScrollMax:function(e){var o=this;null==e&&(e=o.__zoomLevel),o.__maxScrollLeft=Math.max(o.__contentWidth*e-o.__clientWidth,0),o.__maxScrollTop=Math.max(o.__contentHeight*e-o.__clientHeight,0)},__startDeceleration:function(){var e=this;if(e.options.paging){var o=Math.max(Math.min(e.__scrollLeft,e.__maxScrollLeft),0),t=Math.max(Math.min(e.__scrollTop,e.__maxScrollTop),0),_=e.__clientWidth,i=e.__clientHeight;e.__minDecelerationScrollLeft=Math.floor(o/_)*_,e.__minDecelerationScrollTop=Math.floor(t/i)*i,e.__maxDecelerationScrollLeft=Math.ceil(o/_)*_,e.__maxDecelerationScrollTop=Math.ceil(t/i)*i}else e.__minDecelerationScrollLeft=0,e.__minDecelerationScrollTop=0,e.__maxDecelerationScrollLeft=e.__maxScrollLeft,e.__maxDecelerationScrollTop=e.__maxScrollTop;var l=function(o,t,_){e.__stepThroughDeceleration(_)},n=e.options.snapping?4:.1,r=function(){var o=Math.abs(e.__decelerationVelocityX)>=n||Math.abs(e.__decelerationVelocityY)>=n;return o||(e.__didDecelerationComplete=!0),o},a=function(){e.__isDecelerating=!1,e.__didDecelerationComplete&&e.options.scrollingComplete(),e.scrollTo(e.__scrollLeft,e.__scrollTop,e.options.snapping)};e.__isDecelerating=core.effect.Animate.start(l,r,a)},__stepThroughDeceleration:function(e){var o=this,t=o.__scrollLeft+o.__decelerationVelocityX,_=o.__scrollTop+o.__decelerationVelocityY;if(!o.options.bouncing){var i=Math.max(Math.min(o.__maxDecelerationScrollLeft,t),o.__minDecelerationScrollLeft);i!==t&&(t=i,o.__decelerationVelocityX=0);var l=Math.max(Math.min(o.__maxDecelerationScrollTop,_),o.__minDecelerationScrollTop);l!==_&&(_=l,o.__decelerationVelocityY=0)}if(e?o.__publish(t,_,o.__zoomLevel):(o.__scrollLeft=t,o.__scrollTop=_),!o.options.paging){var n=.95;o.__decelerationVelocityX*=n,o.__decelerationVelocityY*=n}if(o.options.bouncing){var r=0,a=0,c=o.options.penetrationDeceleration,s=o.options.penetrationAcceleration;to.__maxDecelerationScrollLeft&&(r=o.__maxDecelerationScrollLeft-t),_o.__maxDecelerationScrollTop&&(a=o.__maxDecelerationScrollTop-_),0!==r&&(r*o.__decelerationVelocityX<=0?o.__decelerationVelocityX+=r*c:o.__decelerationVelocityX=r*s),0!==a&&(a*o.__decelerationVelocityY<=0?o.__decelerationVelocityY+=a*c:o.__decelerationVelocityY=a*s)}}};for(var i in _)ZyngaScroller.prototype[i]=_[i]}();;
function Scroller(t,i,o){this.container=t,this.list=i,this.options=o||{},this._handleTouchStart=this._handleTouchStart.bind(this),this._handleTouchMove=this._handleTouchMove.bind(this),this._handleTouchEnd=this._handleTouchEnd.bind(this),this._handleScroll=this._handleScroll.bind(this),this.silentScrolling=!1,this.zyngaScroller=new ZyngaScroller(this._handleScroll,{scrollingX:"vertical"===this.options.direction?!1:!0,scrollingY:"horizontal"===this.options.direction?!1:!0,bouncing:!!this.options.bouncing,animating:!!this.options.animating,locking:!!this.options.locking,snapping:!!this.options.snapping,animationDuration:"undefined"!=typeof this.options.animationDuration?this.options.animationDuration:250,scrollingComplete:deferred(this.emits("scrollingEnd"))}),this.setEasing("undefined"==typeof this.options.easing?!0:this.options.easing),this.redraw()}extend(Scroller.prototype,EventEmitter),Scroller._owner="celtra",Scroller.prototype._handleScroll=function(t,i){t=isNaN(t)?0:t,i=isNaN(i)?0:i;var o=this.getMaxScroll();this.currentPosition={left:t,top:i,leftPercent:o.left?t/o.left:0,topPercent:o.top?i/o.top:0},celtra.styler.css(this.list,"transform",ScreenObject.supports3d?"translate3d("+-t+"px, "+-i+"px, 0)":"translate("+-t+"px, "+-i+"px)"),this.scrollbars&&(this.currentPosition.sbTop=this.currentPosition.top/(this.list.size.height-this.container.size.height)*(this.container.size.height-parseInt(this.scrollbars.verticalStyle.height,10)),this.currentPosition.sbLeft=this.currentPosition.left/(this.list.size.width-this.container.size.width)*(this.container.size.width-parseInt(this.scrollbars.horizontalStyle.width,10)),this.currentPosition.sbTopPercent=this.currentPosition.sbTop/(this.container.size.height-parseInt(this.scrollbars.verticalStyle.height,10)),this.currentPosition.sbLeftPercent=this.currentPosition.sbLeft/(this.container.size.width-parseInt(this.scrollbars.horizontalStyle.width,10)),this._renderScrollbars(this.currentPosition.sbLeft,this.currentPosition.sbTop)),this.silentScrolling||this.emit("scrolling",this.currentPosition)},Scroller.prototype._handleTouchStart=function(t){this.zyngaScroller.doTouchStart(t.touches,t.timeStamp),this.emit("scrollingStart")},Scroller.prototype._handleTouchMove=function(t){this.zyngaScroller.doTouchMove(t.touches,t.timeStamp)},Scroller.prototype._handleTouchEnd=function(t){this.zyngaScroller.doTouchEnd(t.timeStamp)},Scroller.prototype._createScrollbars=function(){var t=document.createElement("div");addClass(t,"celtra-vertical-scrollbar "+this.options.scrollbarPosition||"none"),this.container.appendChild(t);var i=document.createElement("div");t.appendChild(i),t.style.height=Math.round(this.container.size.height/this.list.size.height*this.container.size.height)+"px",t.style.backgroundColor=this.options.scrollbarColor,t.style.display=this.list.size.height<=this.container.size.height?"none":"block";var o=document.createElement("div");addClass(o,"celtra-horizontal-scrollbar "+this.options.scrollbarPosition||"none"),this.container.appendChild(o);var e=document.createElement("div");o.appendChild(e),o.style.width=Math.round(this.container.size.width/this.list.size.width*this.container.size.width)+"px",o.style.backgroundColor=this.options.scrollbarColor,o.style.display=this.list.size.width<=this.container.size.width?"none":"block",this.scrollbars={vertical:t,horizontal:o,verticalStyle:t.style,horizontalStyle:o.style}},Scroller.prototype.scrollTo=function(t,i,o,e,s,n){this._scroll("scrollTo",{left:t,top:i,animate:o,duration:e,easing:s,callback:n})},Scroller.prototype.scrollBy=function(t,i,o,e,s,n){this._scroll("scrollBy",{left:t,top:i,animate:o,duration:e,easing:s,callback:n})},Scroller.prototype._scroll=function(t,i){i.animate&&("number"==typeof i.duration?this._setAnimationDuration(i.duration):"boolean"==typeof i.duration&&(i.easing=i.duration),"boolean"==typeof i.easing&&this.setEasing(i.easing)),this.once("scrollingEnd",function(){"function"==typeof i.callback&&i.callback()}),this.zyngaScroller[t](i.left,i.top,i.animate),this.emit("scrollingStart")},Scroller.prototype.getMaxScroll=function(){return{left:this.zyngaScroller.__maxScrollLeft,top:this.zyngaScroller.__maxScrollTop}},Scroller.prototype.getCurrentScroll=function(){return this.currentPosition},Scroller.prototype._setAnimationDuration=function(t){this.zyngaScroller.options.animationDuration=t},Scroller.prototype.setEasing=function(t){this.options.easing=t,this.zyngaScroller.__publish=function(i,o,e,s){var n=this,r=function(t){return Math.pow(t-1,3)+1},l=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},a=n.__isAnimating;if(a&&(core.effect.Animate.stop(a),n.__isAnimating=!1),s&&n.options.animating){n.__scheduledLeft=i,n.__scheduledTop=o,n.__scheduledZoom=e;var h=n.__scrollLeft,c=n.__scrollTop,p=n.__zoomLevel,d=i-h,u=o-c,_=e-p,g=function(t,i,o){o&&(n.__scrollLeft=h+d*t,n.__scrollTop=c+u*t,n.__zoomLevel=p+_*t,n.__callback&&n.__callback(n.__scrollLeft,n.__scrollTop,n.__zoomLevel))},S=function(t){return n.__isAnimating===t},z=function(t,i,o){i===n.__isAnimating&&(n.__isAnimating=!1),(n.__didDecelerationComplete||o)&&n.options.scrollingComplete(),n.options.zooming&&(n.__computeScrollMax(),n.__zoomComplete&&(n.__zoomComplete(),n.__zoomComplete=null))};n.__isAnimating=t?core.effect.Animate.start(g,S,z,n.options.animationDuration,a?r:l):core.effect.Animate.start(g,S,z,n.options.animationDuration)}else n.__scheduledLeft=n.__scrollLeft=i,n.__scheduledTop=n.__scrollTop=o,n.__scheduledZoom=n.__zoomLevel=e,n.__callback&&n.__callback(i,o,e),n.options.zooming&&(n.__computeScrollMax(),n.__zoomComplete&&(n.__zoomComplete(),n.__zoomComplete=null))}},Scroller.prototype.redraw=function(){this.container.size={width:this.container.offsetWidth,height:this.container.offsetHeight},this.list.size={width:this.list.offsetWidth,height:this.list.offsetHeight},this.zyngaScroller.setDimensions(this.container.size.width,this.container.size.height,this.list.size.width,this.list.size.height),this.options.snapping&&this._setSnapSize(this.container.size.width,this.container.size.height);var t=this.getMaxScroll();this.zyngaScroller.scrollTo(t.left*this.currentPosition.leftPercent,t.top*this.currentPosition.topPercent,!1),this.scrollbars?(this.scrollbars.verticalStyle.height=Math.round(this.container.size.height/this.list.size.height*this.container.size.height)+"px",this.scrollbars.horizontalStyle.width=Math.round(this.container.size.width/this.list.size.width*this.container.size.width)+"px",this.currentPosition.sbTop=(this.container.size.height-parseInt(this.scrollbars.verticalStyle.height,10))*this.currentPosition.sbTopPercent,this.currentPosition.sbLeft=(this.container.size.width-parseInt(this.scrollbars.horizontalStyle.width,10))*this.currentPosition.sbLeftPercent,this._renderScrollbars(this.currentPosition.sbLeft,this.currentPosition.sbTop)):("outer"===this.options.scrollbarPosition||"inner"===this.options.scrollbarPosition)&&this._createScrollbars()},Scroller.prototype._renderScrollbars=function(t,i){ScreenObject.allowPositioningAndSizingUsingTransforms?(celtra.styler.css(this.scrollbars.vertical,"transform",ScreenObject.supports3d?"translate3d(0, "+i+"px, 0)":"translate(0, "+i+"px)"),celtra.styler.css(this.scrollbars.horizontal,"transform",ScreenObject.supports3d?"translate3d("+t+"px, 0, 0)":"translate("+t+"px, 0)")):(this.scrollbars.verticalStyle.top=i+"px",this.scrollbars.horizontalStyle.left=t+"px"),this.container.size.height>=this.list.size.height?(this.scrollbars.verticalStyle.display="none",removeClass(this.container,"vertical-scrollbar")):(this.scrollbars.verticalStyle.display="block",addClass(this.container,"vertical-scrollbar")),this.container.size.width>=this.list.size.width?(this.scrollbars.horizontalStyle.display="none",removeClass(this.container,"horizontal-scrollbar")):(this.scrollbars.horizontalStyle.display="block",addClass(this.container,"horizontal-scrollbar"))},Scroller.prototype._setSnapSize=function(t,i){this.zyngaScroller.setSnapSize(t,i)};;
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 "+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 l=p.start("Creative.new"),v=extend({adapter:a,runtimeParams:t||{},urlOpenedOverrideUrls:s,urlOpenedUrlAppendage:d,clickThroughDestinationUrl:m,storeOpenedOverrideUrls:u,macros:c},o);if("InstaAdHtml"!==e.clazz){var f=p.start("Creative.unfreeze");e=Freezer.unfreeze(e,window,v),f.end()}return e.instantiation=randInt(),e.batcher=new Batcher,e.trackingCenter=r,e.universalInteractionId="",e.aggregatorTracking=n,e.experiments=i,e.perf=p,e.platformAdvId=t.platformAdvId,e.platformAdvIdTrackingLimited=t.platformAdvIdTrackingLimited,"InstaAdHtml"===e.clazz&&(e.adapter=a,e.runtimeParams=t||{},e.urlOpenedOverrideUrls=s,e.urlOpenedUrlAppendage=d,e.clickThroughDestinationUrl=m,e.storeOpenedOverrideUrls=u,e.macros=c,extend(this,e),e=this),"undefined"!=typeof a&&null!==a&&(a.openBrowserSameWindowInHostileIFrame=function(e){window.top.location.href=e}),l.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}},dataURIsEnabled:{enumerable:!1,get:function(){return 1==this.runtimeParams.dataURIsEnabled||"treatment"===(this.experiments.get("UseDataURIsGlobally")||{}).chosenVariant}},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)}):(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){var r="only"==(creative.experiments.get("ExtendedEngagement")||{}).chosenVariant;r&&["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(){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},r),creative.adapter.sendToEventMonitor(n,t.triggerId,e.screen.name,null,t.name)},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,r="Desktop"==creative.intendedDeviceType;t=["same","new"].indexOf(this.runtimeParams.preferredClickThroughWindow)>=0?this.runtimeParams.preferredClickThroughWindow:r?"new":"same";var n=e&&e.inUserInitiatedIteration;return"new"==t&&(n||r)};;
function ExpandableBanner(){}inherit(ExpandableBanner,Creative),ExpandableBanner.toString=function(){return"[Clazz ExpandableBanner]"},ExpandableBanner.prototype.toString=function(){return"[ExpandableBanner "+this.name+"]"},ExpandableBanner.prototype.awake=function(){ExpandableBanner.uber.awake.call(this),this.adapter.wrapRedirectPageUrl=this.wrapRedirectPageUrl.bind(this),this.adapter.getModalUrl=function(e){return creative.getPageUrl(e?e:"modal.html")}.bind(this),this.units.banner.expandAction=function(e,a,n){this._assertAppearBeforeExpand(),"undefined"!=typeof a.destinationPage&&null!==a.destinationPage&&(creative.runtimeParams.goToPageAfterExpand=a.destinationPage),e.track({name:"expandRequested"}),e.trackClickThrough(),creative.adapter.expand(n,a)},this.units.banner.dismissAction=function(e,a,n){e.track({name:"creativeDismissed"}),creative.adapter.dismiss(n,a)},this.units.modal.collapseAction=function(e,a,n){e.track({name:"unitCollapsed"}),creative.adapter.collapse(n,a)},this.units.modal.dismissAction=function(e,a,n){e.track({name:"creativeDismissed"}),creative.adapter.dismiss(n,a)},this.units.banner.trackCreativeDismissed=function(){new ActionContext(this.visibleScreen).track({name:"creativeDismissed"})},this.units.banner.userLocation=this.createUserLocation(!1),this.units.modal.userLocation=this.createUserLocation(!0)};;
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.onceAction=function(e,n){n.caller.wasExecutedOnce||(n.caller.wasExecutedOnce=!0,(n.action||nullai)(e))},Kernel.onceActionDryRun=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.code),o=!1,u=i.getVariantForScreen?i.getVariantForScreen(c):void 0,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)}),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,""),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 View(){}extend(View.prototype,EventEmitter),View.prototype.awake=function(){this.node=null,this._loadingCount=null,this._waitingForLoadCallbacks=[],this._isAppearing=!1,this._hasAppearedAtLeastOnce=!1,this._shouldAppear=!1,this._trackViewShown=this._trackViewShown.bind(this);var e=this;this.incrementLoadingCount=function(){if(e.loaded)throw"Starting loads after the view has already finished loading?";e._loadingCount++},this.decrementLoadingCount=function(){if(!e.loading)throw"decrementLoadingCount called while not loading!";if(e._loadingCount--,0===e._loadingCount){e.finishedLoading();for(var t=e._waitingForLoadCallbacks,i=0;i0}}),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)e.className+=" 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=this.size.width,r=this.size.height,l=e.boxWidth||320,n=e.boxHeight||160;e.message=removeHtmlTags(e.message),a>=l&&r>=n?this.showModalDialogInPlacement("alert",e,t):(alert(e.message),t())},BaseCreativeUnit.prototype.prompt=function(e,t){var a=this.size.width,r=this.size.height,l=e.boxWidth||320,n=e.boxHeight||190;if(a>=l&&r>=n)this.showModalDialogInPlacement("prompt",e,t);else{var i=prompt(removeHtmlTags(e.message));t(i)}},BaseCreativeUnit.prototype._getUniqueId=function(){var e=new Date,t=e.getTime()+Math.random();return t},BaseCreativeUnit.prototype.showModalDialogInPlacement=function(e,t,a){var r=this._getUniqueId(),l={};l[r]={attachment:"body",positioning:"screen",type:"layer"},creative.adapter.createPlacements(l,function(){function l(e){13==e.keyCode&&(creative.adapter.destroyPlacement(r),o=null,a(C.value))}function n(e){e.preventDefault(),e.stopPropagation()}function i(t){t.preventDefault(),t.stopPropagation(),creative.adapter.destroyPlacement(r),o=null,"prompt"==e?a(C.value):a()}function s(e){e.preventDefault(),e.stopPropagation(),creative.adapter.destroyPlacement(r),o=null,a(null)}if(window){var o=creative.adapter.placements[r];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 m=o.createElement("h1");addClass(m,"celtra-alert-title"),m.innerHTML=t.title,h.appendChild(m)}if(t.title&&""!=t.title&&t.message&&""!=t.message){var v=o.createElement("hr");addClass(v,"celtra-alert-dark-line"),h.appendChild(v);var u=o.createElement("hr");addClass(u,"celtra-alert-light-line"),h.appendChild(u)}if(t.message&&""!=t.message){var g=o.createElement("div");addClass(g,"celtra-alert-message"),g.innerHTML=t.message,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",i,!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",n,!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.preventScroll=function(e){var t=["mousewheel","touchmove"];t.forEach(function(t){attach(e,t,function(e){e.preventDefault()},!1)})};;
function CreativeUnit(){}inherit(CreativeUnit,BaseCreativeUnit),CreativeUnit.IGNORABLES=BaseCreativeUnit.IGNORABLES,CreativeUnit.DEBUG_EXTRA_PHASE_DELAY=0,CreativeUnit.toString=function(){return"[Clazz CreativeUnit]"},CreativeUnit.prototype.toString=function(){return"[CreativeUnit "+this.name+" ("+this.localId+")]"},Object.defineProperty(CreativeUnit.prototype,"size",{get:function(){var t=this.getAvailableSize();return this.layoutCurrent||this._updateActiveLayout(this._getOrientation(),t.width,t.height),"responsive"===this.sizing?{width:t.width,height:t.height}:{width:this.layoutCurrent.unitSize.width,height:this.layoutCurrent.unitSize.height}},set:function(){}}),Object.defineProperty(CreativeUnit.prototype,"unitAlignment",{get:function(){return"undefined"==typeof this.layoutCurrent.unitAlignment?{}:this.layoutCurrent.unitAlignment}}),Object.defineProperty(CreativeUnit.prototype,"layoutCurrent",{get:function(){return this.layouts[this.layoutCurrentIndex]}}),Object.defineProperty(CreativeUnit.prototype,"hasOverflow",{get:function(){return this.screens.concat([this.master]).filter(function(t){return t.showOverflow}).length>0}}),Object.defineProperty(CreativeUnit.prototype,"hasScreens",{get:function(){return this.screens.length>0}}),CreativeUnit.prototype._getDestinationScreen=function(){var t=this.hasScreens?this.screens[0]:this.master;if("modal"==this.name&&"undefined"!=typeof creative.runtimeParams.goToPageAfterExpand){var e=creative.runtimeParams.goToPageAfterExpand;if("string"!=typeof e)throw new TypeError("Only string type is allowed to reference destination screen!");var i=this.screens.filter(function(t){return t.title===e});i.length>0&&(t=i[0])}return t},CreativeUnit.prototype.awake=function(){var t=this;CreativeUnit.uber.awake.call(this),this.currentScreen=null,this.visibleScreen=null,this._masterShown=!1,this.overflowsY=!1,this.layoutCurrentIndex=null,this.screens.forEach(function(t){t.objects.forEach(function(t){t.zIndex+=ScreenObject._zIndexOffset})}),"undefined"==typeof this.backgroundColor&&(this.backgroundColor="#000000"),"undefined"==typeof this.usePlaceboBar&&(this.usePlaceboBar=!1),"undefined"==typeof this.showCloseButton&&(this.showCloseButton=!1),"undefined"==typeof this.alignBackButtonHorizontal&&(this.alignBackButtonHorizontal="left"),this.on("_firstScreenLoaded",function(){t.placeboBar&&(t.placeboBar.parentNode.removeChild(t.placeboBar),t.placeboBar=null),this._setVisibleScreen(this._getDestinationScreen())}.bind(this)),this.onAll("_firstScreenLoaded _unitFirstShown",function(){this.goToScreen(this._getDestinationScreen())}.bind(this)),this.triggerOrientationChange=this.triggerOrientationChange.bind(this),this.updateWindowMetrics=this.updateWindowMetrics.bind(this),this.hacks.triggerBlurWhenTappingOutsideOfInputs=ios()},CreativeUnit.prototype.setAvailableSize=function(t,e){var i=CreativeUnit.uber.setAvailableSize.apply(this,arguments),n=this._getOrientation(),o=this.layouts[this.layoutCurrentIndex];this._updateActiveLayout(n,t,e),this.updateWindowMetrics(n,t,e);var r=this._previousOrientation&&n!=this._previousOrientation,s=o&&o.orientation!=this.layoutCurrent.orientation;(r||s)&&this.triggerOrientationChange(),this._previousOrientation=n,(i||s)&&this.emit("resize")},CreativeUnit.prototype._getOrientation=function(){return creative.adapter.orientation%180===0?"portrait":"landscape"},CreativeUnit.prototype._updateActiveLayout=function(t,e,i){{var n=this.layouts.slice(),o=this.layoutCurrentIndex;this.layouts[o]||null}n.forEach(function(n){n.sortIndex=0,"independent"==n.orientation?n.sortIndex+=1:n.orientation!=t&&(n.sortIndex+=4e3),n.minSize.width>e&&(n.sortIndex+=2e3),n.minSize.height>i&&(n.sortIndex+=2e3),n.sortIndex+=Math.abs(n.minSize.width-e)+Math.abs(n.minSize.height-i)}),n.sort(function(t,e){return t.sortIndex-e.sortIndex}),this.layoutCurrentIndex=this.layouts.indexOf(n[0]),o!=this.layoutCurrentIndex&&this.emit("layoutChanged")},CreativeUnit.prototype.enterRenderTree=function(){if(!this._isRendering){this._isRendering=!0;var t=this.getAvailableSize();this.updateWindowMetrics(this._getOrientation(),t.width,t.height),this.master&&(this.master.loaded?defer(this.master.enterRenderTree.bind(this.master),void 0,void 0,useAsap()):this.once("_firstScreenLoaded",this.master.enterRenderTree.bind(this.master))),this.visibleScreen&&defer(this.visibleScreen.enterRenderTree.bind(this.visibleScreen),void 0,void 0,useAsap()),this.hacks.triggerBlurWhenTappingOutsideOfInputs&&(attach(this.node,"touchstart",function(t){-1==["INPUT","TEXTAREA","SELECT"].indexOf(t.target.nodeName)&&null!=this.lastInputElementFocused&&this.lastInputElementFocused.blur()}.bind(this),!0),attach(this.node,"focus",function(t){["INPUT","TEXTAREA","SELECT"].indexOf(t.target.nodeName)>-1&&(this.lastInputElementFocused=t.target)}.bind(this),!0),attach(this.node,"blur",function(t){["INPUT","TEXTAREA","SELECT"].indexOf(t.target.nodeName)>-1&&(this.lastInputElementFocused=null)}.bind(this),!0))}},CreativeUnit.prototype.exitRenderTree=function(){this._isRendering&&(this._isRendering=!1,this.master&&this.master.exitRenderTree(),this.visibleScreen&&this.visibleScreen.exitRenderTree())},CreativeUnit.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.inView&&(this.inView.start(),this.currentScreen&&this.currentScreen.inView&&this.currentScreen.inView.start()),this.hasAppearedAtLeastOnce||(this.placeboBar&&this.placeboBar.start(),this._orientationLockIsOn?this._emitUnitFirstShownAfterOrientationPrompt=!0:this.emit("_unitFirstShown"))},CreativeUnit.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()},CreativeUnit.prototype.createNode=function(){var t=this.unitDiv=CreativeUnit.uber.createNode.call(this);if(t.id="celtra-"+this.name.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()}),Color.isGradient(this.backgroundColor)?addCssRule("#"+t.id,Color.createGradientStyle(this.backgroundColor)):t.style.backgroundColor=this.backgroundColor,t.style.overflow=this.master.showOverflow?"visible":"hidden",this.screenContainer=document.createElement("div"),this.screenContainer.className="celtra-screen-container",this.screenContainer.style.position="absolute",t.appendChild(this.screenContainer),this.screenHolder=document.createElement("div"),this.screenHolder.className="celtra-screen-holder",this.screenHolder.style.width="100%",this.screenHolder.style.height="100%",this.screenContainer.appendChild(this.screenHolder),t.style.position="absolute",this.usePlaceboBar){var e=this.loadingScreen&&this.loadingScreen.loaderColor||"white";this.placeboBar=new PlaceboBar(5e3,.9,200,e),this.screenContainer.appendChild(this.placeboBar)}if(this.showCloseButton){if(this.closeAction||Creative._throw("Close button requested, but no close action defined?"),this.closeButtonType&&"text"===this.closeButtonType){var i=document.createElement("div");i.className="celtra-close-button touchable celtra-close-button-text",i.textContent=this.closeButtonText,i.style.color=this.closeButtonTextColor,this.unitDiv.appendChild(i)}else{var i=document.createElement("img"),n=document.createElement("img");this.closeButtonUp?(this.closeButtonDown||(this.closeButtonDown=this.closeButtonUp),this.closeButtonWidth&&this.closeButtonHeight&&(i.style.width=n.style.width=this.closeButtonWidth+"px",i.style.height=n.style.height=this.closeButtonHeight+"px")):(this.closeButtonUp=new File("runner/clazzes/CreativeUnit/close-up.svg"),this.closeButtonDown=new File("runner/clazzes/CreativeUnit/close-down.svg")),i.className="celtra-close-button touchable celtra-close-button-up",this.preloadImage(this.closeButtonUp,function(t){i.src=t.src}),n.className="celtra-close-button celtra-close-button-down",this.preloadImage(this.closeButtonDown,function(t){n.src=t.src}),this.closeButtonImage=i,this.closeButtonImagePressed=n,this.unitDiv.appendChild(this.closeButtonImage),this.unitDiv.appendChild(this.closeButtonImagePressed)}attach(i,"tap",function(){var t=this.currentScreen||this.visibleScreen;this.closeAction(t?new ActionContext(t,!0):null,{},noop)}.bind(this),!1)}var o=[];o.push({name:"loading",fun:function(t){if(this.loadingScreen){var e=creative.perf.start("CreativeUnit.loadingScreen");this.loadingScreen.getNode(function(){defer(function(){e.end(),this._setVisibleScreen(this.loadingScreen),t(!0)}.bind(this),CreativeUnit.DEBUG_EXTRA_PHASE_DELAY,"CreativeUnit.createNode defer loading phase completion",useAsap())}.bind(this))}else t(!1)}.bind(this)}),o.push({name:"interactive",fun:function(t){var e=creative.perf.start("CreativeUnit.firstScreenLoaded"),i=this.hasScreens?2:1,n=function(){--i||defer(function(){e.end(),defer(this.emits("_firstScreenLoaded"),0,"CreativeUnit.createNode emit _firstScreenLoaded",useAsap()),t(!0)}.bind(this),CreativeUnit.DEBUG_EXTRA_PHASE_DELAY,"CreativeUnit.createNode defer onScreenLoaded",useAsap())}.bind(this);this.hasScreens&&this._getDestinationScreen().getNode(n),this.master.getNode(n)}.bind(this)}),this.incrementLoadingCount();var r=!1,s=function(){r||Creative._throw("Unit still not ready to show after last phase?!")};return o.reverse().forEach(function(t){var e=s;s=function(){Logger("unit").log("Phase '"+t.name+"' started."),t.fun(function(i){Logger("unit").log("Phase '"+t.name+"' finished, "+(i?"DID":"DID NOT")+" draw something."),i&&(r||(r=!0,this.decrementLoadingCount())),e()}.bind(this))}.bind(this)}.bind(this)),s(),t},CreativeUnit.prototype._repositionCloseButton=function(t){function e(t,e,i){function n(t){return{left:t.offsetLeft,top:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}}var o=n(i),r=n(e),s=n(t);s.left=r.left+r.width-s.width,s.top=r.top;var a=o.left<=s.left&&s.left+s.width-1-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},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;r?n.forEach(function(n){n.resetAction(e,t,function(){--r||i()})}):i()},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 NestedContainer(){}inherit(NestedContainer,ScreenObjectContainer),extend(NestedContainer.prototype,TriggerHost),NestedContainer.toString=function(){return"[Clazz NestedContainer]"},NestedContainer.prototype.toString=function(){return"[NestedContainer "+this.localId+"]"},NestedContainer.prototype.createNode=function(){var e=NestedContainer.uber.createNode.call(this);return this.node=e,this._updateSize=this._updateSize.bind(this),this.enterRenderTree=this.enterRenderTree.bind(this),this.exitRenderTree=this.exitRenderTree.bind(this),this.parentObject.on("enteredRenderTree",this.enterRenderTree),this.parentObject.on("exitedRenderTree",this.exitRenderTree),this.objects.forEach(function(t){this.incrementLoadingCount(),e.appendChild(t.getNode(this.decrementLoadingCount))}.bind(this)),0===this.objects.length&&(e.className+=" empty"),this.parentObject.parentContainer.on("resize",this._updateSize),e},NestedContainer.prototype.redrawLayout=function(){this.node.style.width=this.layoutCurrent.size.width,this.node.style.height=this.layoutCurrent.size.height,this.node.style.position="relative",this.node.style.overflow="hidden"},NestedContainer.prototype._updateSize=function(){this.redrawLayout(),this.emit("resize")},NestedContainer.prototype.enterRenderTree=function(){this.emit("enteredRenderTree"),this._updateSize()},NestedContainer.prototype.exitRenderTree=function(){this.emit("exitedRenderTree")},NestedContainer.prototype.onFocus=function(e){this.hasTriggers("itemFocus")&&this.fireTriggers("itemFocus",null,e,new ActionContext(this.parentObject))},NestedContainer.prototype.onBlur=function(e){this.hasTriggers("itemBlur")&&this.fireTriggers("itemBlur",null,e,new ActionContext(this.parentObject))},Object.defineProperty(NestedContainer.prototype,"layoutCurrent",{get:function(){return this.layoutSpecificValues[this.parentUnit.layoutCurrentIndex]}}),Object.defineProperties(NestedContainer.prototype,{size:{get:function(){var e,t=this.layoutCurrent.size,i=parseFloat(t.width),n=parseFloat(t.height);return t.width.toString().indexOf("%")>-1&&(e=this.parentObject.getNaturalSize(),i=e.width*i/100),t.height.toString().indexOf("%")>-1&&(e||(e=this.parentObject.getNaturalSize()),n=e.height*n/100),{width:Math.round(i),height:Math.round(n)}}}});;
function ScreenObject(){}inherit(ScreenObject,View),extend(ScreenObject.prototype,TriggerHost),extend(ScreenObject.prototype,DiscoverableTrait),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,s,o,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)}),s=t[n],o=t[r],s=s.indexOf("%")>-1?a*parseFloat(s)/100:parseFloat(s),"hcenter"===n?s=(a-h)/2+s:"right"===n&&(s=a-(s+h)),o=o.indexOf("%")>-1?c*parseFloat(o)/100:parseFloat(o),"vcenter"===r?o=(c-u)/2+o:"bottom"===r&&(o=c-(o+u)),{x:ScreenObject._roundIfNeeded(s),y:ScreenObject._roundIfNeeded(o)}},ScreenObject._toSizePx=function(t,e){var i=parseFloat(t.width),n=parseFloat(t.height),r=e.width,s=e.height;return t.width.toString().indexOf("%")>-1&&(i=r*i/100),t.height.toString().indexOf("%")>-1&&(n=s*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._copyChosenExperimentProperties=function(t){var e,i,n=this.experimentSpecificValues[t];this.creativeOptimizationEnabled&&(i=creative.experiments.get(t,[creative.id,this.localId]),e=n.filter(function(t){return String(t.id)===i.chosenVariant}.bind(this))[0]),e||(e=n[0]);var r={};return deep(r,e),delete r.id,delete r.label,deep(this,r),i},ScreenObject.prototype._applyExperiments=function(){throw new Error("_applyExperiments not implemented")},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.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 s=r.firstChild;if(i)for(;n=r.firstChild;)i.appendChild(n);return s},ScreenObject.prototype.ifNotClosing=function(t,e,i){var n=this.fireTriggersDryRun(t,null,noop,e)._actions,r=["dismiss","collapse"],s=!n.some(function(t){return r.indexOf(t.method)>-1});s&&i()},ScreenObject.prototype.createNode=function(){this.experimentSpecificValues&&this._applyExperiments(),this._isInMouseOver=!1;var t=this,e=ScreenObject.uber.createNode.call(t);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));var i="mouseOver",n=[];if(this.hasTriggers(i)){var r=this._getTriggers(i,null),s=[],o=noop;r.forEach(function(t){t.parameters&&t.parameters.delay&&s.indexOf(t.parameters.delay)<0&&s.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,s.forEach(function(t,e){o=r(t),n[e]=setTimeout(o,t)})},!1)}return 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),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,swipe:function(e,i){var n=new ActionContext(t,!0);t.fireTriggers("swipe",function(r){var s=e==r.direction&&i>=r.length;return s&&t.ifNotClosing("swipe",n,n.trackUserInteraction),s},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._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,s=this.size.height/e.height;t.transform+=" scale("+r+", "+s+")"}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),s=null;celtra.styler.css(this.node,i)!==n&&(s=n,r!=s&&"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.setPosition=function(t,e){this.position={left:t+"px",top:e+"px"},this._refreshDisplayState()},ScreenObject.prototype.setSize=function(t,e){this.size.width=t,this.size.height=e,this._refreshDisplayState()},ScreenObject.prototype.setOpacity=function(t){this.opacity=t,this._refreshDisplayState()},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 s(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,s=e.position,o=null,a=null,c=null,h=null;["left","right","hcenter"].forEach(function(t){t in r&&(o=t),t in s&&(c=t)}),["bottom","top","vcenter"].forEach(function(t){t in r&&(a=t),t in s&&(h=t)}),c&&null!==s[c]&&(delete r[o],r[c]=s[c]),h&&null!==s[h]&&(delete r[a],r[h]=s[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 o="undefined"!=typeof e.duration?e.duration:1e3,a=e.timingFunction||"linear";if(e.layoutSpecificValues)e.layoutSpecificValues.forEach(function(t,e){this.layoutSpecificValues[e]&&s(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"),s(this.layoutCurrent,c)}var h=this.node;celtra.styler.css(h,"transition",""),celtra.styler.css(h,"transitionProperty","all"),celtra.styler.css(h,"transitionDuration",o+"ms"),celtra.styler.css(h,"transitionTimingFunction",a);var u=this._refreshDisplayState();if(o>0&&u){var l=!1,p=function(){l||(l=!0,i())};ScreenObject.requiresRedrawToTriggerAnimationEvents&&!function(){var t=Date.now(),e=t+(Number(o)||0),i=function(){flash(),Date.now()0?o: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,s={width:n.width*r,height:n.height*r},o={x:this.position.x+this.size.width/2-s.width/2,y:this.position.y+this.size.height/2-s.height/2};this.animateAction(t,{properties:{position:o,size:s},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.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 s=[];for(var o in t)s.push({selector:o.split(r).map(function(t){return e+(n.test(t)?"":" ")+t}).join(","),attributes:t[o]});var a=this._styleSheetTemplate({rules:s});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[]};;
function GalleryGroup(){}inherit(GalleryGroup,ScreenObject),GalleryGroup.toString=function(){return"[Clazz GalleryGroup]"},GalleryGroup.prototype.toString=function(){return"[GalleryGroup "+this.localId+"]"},GalleryGroup.prototype.createNode=function(){var t=GalleryGroup.uber.createNode.call(this);return this.defaultImage||(this.defaultImage=new File("runner/loading.png"),this.defaultImage.meta={width:1280,height:1280}),this._loadedResources={},t},GalleryGroup.prototype._appear=function(){this.autoAnimate&&!this.autoAnimationTimeout&&this.startAutoAnimate()},GalleryGroup.prototype._disappear=function(){this._stopAutoAnimate(),this.disappearNestedObjects()},GalleryGroup.prototype.nextItem=function(t){this.goToItem(this.getFocusedIndex()+1,t)},GalleryGroup.prototype.previousItem=function(t){this.goToItem(this.getFocusedIndex()-1,t)},GalleryGroup.prototype.previousAction=function(t,e,o){this.previousItem(o)},GalleryGroup.prototype.nextAction=function(t,e,o){this.nextItem(o)},GalleryGroup.prototype.goToItemAction=function(t,e,o){this.goToItem(e.item-1,o)},GalleryGroup.prototype.startIndex=0,GalleryGroup.prototype.allowAutoAnimate=retTrue,GalleryGroup.prototype.resetAllowAutoAnimate=noop,GalleryGroup.prototype.getItem=function(t){return this.content[t%this.getItemsLength()]},GalleryGroup.prototype.getItemsLength=function(){return this.content.length},GalleryGroup.prototype.startAutoAnimateAction=function(t,e,o){this.resetAllowAutoAnimate(),this.autoAnimationTimeout||this.startAutoAnimate(),o()},GalleryGroup.prototype._autoAnimateCancelledInTransition=!1,GalleryGroup.prototype.startAutoAnimate=function(){this._autoAnimateCancelledInTransition=!1;var t=this._animateCallback;if(!t){var e,o,n=this,i=!0,a=n.getItemsLength()-1,r="north"==n.autoAnimateDirection||"west"==n.autoAnimateDirection?"nextItem":"previousItem";t=function(){return n._autoAnimateCancelledInTransition?void(n._autoAnimateCancelledInTransition=!1):void(n.autoAnimationTimeout=setTimeout(u,n.autoAnimatePause))};var u=function(){function u(i){l!==a||"west"!=n.autoAnimateDirection&&"north"!=n.autoAnimateDirection?0!==l||"east"!=n.autoAnimateDirection&&"south"!=n.autoAnimateDirection||(n.goToItem(a,t),i&&(o=!1,e=!1)):(n.goToItem(0,t),i&&(o=!1,e=!1))}if(n.autoAnimationTimeout=null,!n.allowAutoAnimate())return void(n.autoAnimateUserInteraction?n.disableAutoAnimate():t());var l=n.getFocusedIndex();if(i)"repeat"===n.autoAnimateConclusion&&n.cyclic||u(!0),i=!1;else if(l===a||0===l)switch(n.autoAnimateConclusion){case"stop":if(o)return void n.disableAutoAnimate();break;case"reverse":e&&(r="previousItem"==r?"nextItem":"previousItem");break;case"repeat":n.cyclic||u(!1)}(0!==l&&"previousItem"===r||l!==a&&"nextItem"===r||n.cyclic&&"repeat"===n.autoAnimateConclusion)&&(n[r](t),e=!0,o=!0)};n._animateCallback=t}t()},GalleryGroup.prototype._stopAutoAnimate=function(){var t=this.autoAnimationTimeout;t?(clearTimeout(t),delete this.autoAnimationTimeout):this._autoAnimateCancelledInTransition=!0,delete this._animateCallback},GalleryGroup.prototype.stopAutoAnimateAction=function(t,e,o){this._stopAutoAnimate(),o()},GalleryGroup.prototype.disableAutoAnimate=function(){this._stopAutoAnimate()},GalleryGroup.prototype.resetAction=function(t,e,o){GalleryGroup.uber.resetAction.call(this,t,e,function(){this._stopAutoAnimate(),this.autoAnimate&&this.startAutoAnimate(),o()}.bind(this))},GalleryGroup.prototype._handleAllowTouches=function(t){for(var e=0;et||t>=this.getItemsLength()))return 0;var o=t-this.getFocusedIndex(),n=this.getItemsLength();return e&&Math.abs(o)>=n/2&&(o+=0>o?n:-n),o},GalleryGroup.prototype._preloadContainers=function(t,e){var o=t.length;t.forEach(function(t){t.getNode(function(){--o||e()})})},GalleryGroup.prototype.getDefaultImageSrc=function(){return this.defaultImageNode.src};;
function SwipeyGroup(){}inherit(SwipeyGroup,GalleryGroup),SwipeyGroup.toString=function(){return"[Clazz SwipeyGroup]"},SwipeyGroup.prototype.toString=function(){return"[SwipeyGroup "+this.localId+"]"},SwipeyGroup.prototype.awake=function(){SwipeyGroup.uber.awake.call(this),this._animationLength=200,this._minimumDistanceForMovedState=5,this._rubberBandQuotient=4,this._swipeThreshold=.2,this.startIndex=this.startIndex-1,this._state=new StateObject({itemIndex:this.startIndex,moved:!1,position:0,touchPosition:0}),this._animator=new EasingAnimation(this._state,"position",{exp:EasingAnimation.presets.easeIn}),this._actionContextOfFirstTouchStart=null,this._autoAnimateDisabledByUserTouch=!1,this._autoAnimateHaltedByUserTouch=!1,this._contentListItems=[],this._currentTouchIdentifier=null,this._cycleSize=0,this._drawOffset=0,this._firstTouchStart=null,this._allowHorizontalSwipe=!0,this._horizontalSwipeInProgress=!1,this._itemSize=0,this._lastFocusedVirtualIndex=null,this._initialJumpToItemFinished=!1,this._touchHandlersAttached=!1,this._cyclic=this.cyclic&&this.content.length>2,this._draw=this._draw.bind(this),this._handleStateIndexChange=this._handleStateIndexChange.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.on("appeared",function(){new ActionContext(this).track({name:"itemFocused",item:this._state.itemIndex+1}),this._triggerOnFocus()}.bind(this))},SwipeyGroup.prototype.createNode=function(){var t=SwipeyGroup.uber.createNode.call(this);return this._privateApiTracked={},this._preloadInitialContainers(),this._init(t),t},SwipeyGroup.prototype._preloadInitialContainers=function(){var t,e,i=[];this._cyclic?(e=this._wrapAround(this.startIndex-1,this.content.length),t=this._wrapAround(this.startIndex+1,this.content.length)):(this.startIndex0&&(e=this.startIndex-1));var n=function(t){var e=this.content[t];e&&i.push(e)}.bind(this);n(e),n(this.startIndex),n(t),this.incrementLoadingCount(),this._preloadContainers(i,this.decrementLoadingCount.bind(this))},SwipeyGroup.prototype._init=function(t){this._ul=document.createElement("ul"),addClass(this._ul,"swipey"),this._ul.style.display="none",this.content.forEach(function(t,e){var i=document.createElement("li");if(i.appendChild(t.getNode()),this._cyclic){var n=this._wrapAround(e-this.startIndex+1,this.content.length);this._contentListItems[n]=i}else this._contentListItems.push(i);addClass(i,"touchable"),this._ul.appendChild(i)}.bind(this)),this._drawOffset=this._cyclic?this.startIndex-1:0;var e=this.autoAnimate&&this.autoAnimatePreventUserInteraction;e||attach(this._ul,"touchstart",this._handleTouchStart),this._state.on("change:itemIndex",function(t){Ticker.frame(this._draw,"next"),this._handleStateIndexChange(t)}.bind(this)),t.appendChild(this._ul),this._state.on("change:position",function(){this._initialJumpToItemFinished&&Ticker.frame(this._draw,"next")}.bind(this)),this.pagination&&"hidden"!==this.pagination&&(this._paginator=new Paginator({container:t,containerSize:this.size,position:this.pagination,itemsCount:this.content.length}),this._paginator.buildPagination())},SwipeyGroup.prototype._appear=function(){SwipeyGroup.uber._appear.call(this),this._ul.style.display="block",this._checkInitialJump(),this.content.forEach(function(t){t.emit("resize")})},SwipeyGroup.prototype._checkInitialJump=function(){this._initialJumpToItemFinished||isNaN(this._getFocusedVirtualIndex())||(this._lastFocusedVirtualIndex=this._getFocusedVirtualIndex(),this._cyclic||this.jumpToItem(this.startIndex),this._initialJumpToItemFinished=!0)},SwipeyGroup.prototype.redrawLayout=function(){this._ul.style.display=this.hidden?"none":"block",this._checkInitialJump(),this.vertical=this.layoutSpecificValues[this.parentUnit.layoutCurrentIndex].vertical,this._itemSize=(this.vertical?this.size.height:this.size.width)+this.cellspacing,this._cycleSize=this._itemSize*this.content.length,this._state.position=this._getPositionForCentered(this._getItemCenter(this._state.itemIndex)),this.vertical?addClass(this._ul,"vertical"):removeClass(this._ul,"vertical"),this._paginator&&this._paginator.redrawPagination(this.size),this._draw()},SwipeyGroup.prototype._handleStateIndexChange=function(){var t=this.getFocusedIndex();this._lastFocusedIndex!=t&&new ActionContext(this).track({name:"itemFocused",item:this._state.itemIndex+1}),this._triggerOnBlur(),this._triggerOnFocus()},SwipeyGroup.prototype._draw=function(){function t(t,e,i){var n=ScreenObject.supports3d?"translate3d("+e+"px, "+i+"px, 0)":"translate("+e+"px, "+i+"px)";celtra.styler.css(t,"transform",n)}this._calculateCyclicDrawOffset(),this._contentListItems.forEach(function(e,i){var n={x:0,y:0},o=-this._state.position+(i+this._drawOffset)*this._itemSize;n[this.vertical?"y":"x"]=o,t(e,Math.round(n.x),Math.round(n.y))}.bind(this)),this._paginator&&this._paginator.setActivePaginationItem(this.getFocusedIndex())},SwipeyGroup.prototype._calculateCyclicDrawOffset=function(){if(this._cyclic&&null!=this._lastFocusedVirtualIndex&&this._lastFocusedVirtualIndex!==this._getFocusedVirtualIndex()){var t=this._getFocusedVirtualIndex()-this._lastFocusedVirtualIndex;this._drawOffset+=t,this._lastFocusedVirtualIndex=this._getFocusedVirtualIndex();for(var e=0;e0?this._contentListItems.push(this._contentListItems.shift()):0>t&&this._contentListItems.unshift(this._contentListItems.pop())}},SwipeyGroup.prototype._snap=function(){var t=this._getFocusedVirtualIndex();this._cyclic||(t=clamp(0,this.content.length-1,t));var e=this._cyclic?t+this.startIndex:t;e%=this.content.length,0>e&&(e+=this.content.length);var i=this._getPositionForCentered(this._getItemCenter(t));this._animateTo(i)},SwipeyGroup.prototype._animateTo=function(t,e){this._animator.animateTo(t,this._animationLength,function(){this._state.itemIndex=this._getIndexOfCenteredItem(),this._handleAllowTouches(this.content),"function"==typeof e&&e()}.bind(this))},SwipeyGroup.prototype._mapPositionToVirtualIndex=function(t){for(var e=this.content.length,i=0,n=Math.floor(t/this._cycleSize)*e,o=Math.floor(t/this._cycleSize)*this._cycleSize;o+this._itemSize<=t;)o+=this._itemSize,i++;return n+i},SwipeyGroup.prototype._mapIndexToPosition=function(t){for(var e=Math.floor(t/this.content.length)*this.content.length,i=Math.floor(t/this.content.length)*this._cycleSize,n=0;t>e+n;)i+=this._itemSize,n++;return i},SwipeyGroup.prototype._getViewportTreshold=function(){return this._state.position+this._itemSize*("back"===this._swipeDirection?this._swipeThreshold:1-this._swipeThreshold)},SwipeyGroup.prototype._getFocusedVirtualIndex=function(){return this._mapPositionToVirtualIndex(this._getViewportTreshold())},SwipeyGroup.prototype.getFocusedIndex=function(){return this._state.itemIndex},SwipeyGroup.prototype._getIndexOfCenteredItem=function(){return this._wrapAround(this._getFocusedVirtualIndex(),this.content.length)},SwipeyGroup.prototype._getItemCenter=function(t){return this._mapIndexToPosition(t)+this._itemSize/2},SwipeyGroup.prototype._getNearestIndex=function(t){if(this._cyclic){var e=this._wrapAround(this._state.itemIndex,this.content.length),i=t-e,n=t-(e+this.content.length);return Math.abs(i)<=Math.abs(n)?this._getFocusedVirtualIndex()+i:this._getFocusedVirtualIndex()+n}return clamp(0,this.content.length-1,t)},SwipeyGroup.prototype._getPositionForCentered=function(t){return t-this._itemSize/2},SwipeyGroup.prototype._wrapAround=function(t,e){return(t%e+e)%e},SwipeyGroup.prototype.goToItem=function(t,e){var i=this._getNearestIndex(t),n=this._getPositionForCentered(this._getItemCenter(i));this._animateTo(n,e)},SwipeyGroup.prototype.jumpToItem=function(t){this._state.itemIndex=this._wrapAround(t,this.content.length),this._state.position=this._getPositionForCentered(this._getItemCenter(this._state.itemIndex)),this._handleAllowTouches(this.content)},SwipeyGroup.prototype._normalizeEvent=function(t){var e=function(t,e){var i,n;for(i=0;ithis._getPositionForCentered(this._getItemCenter(this.content.length-1));e.position+=this._cyclic||!a&&!c?h:h/this._rubberBandQuotient,e.moved=!0,e.touchPosition=s}var u=r-s;this._swipeDirection=u>0?"forth":"back",this._calculateCyclicDrawOffset()}},SwipeyGroup.prototype._handleTouchEnd=function(t){t.stopPropagation(),this._allowHorizontalSwipe=!0,this._horizontalSwipeInProgress=!1,this._currentTouchIdentifier==t.changedTouches[0].identifier&&(this._currentTouchIdentifier=t.touches[0]?t.touches[0].identifier:null);var e=this._state,i=this._normalizeEvent(t),n=this.vertical?i.y:i.x;if(0===t.touches.length){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 o={firstTouch:this._firstTouchStart,lastTouch:i,minDistanceForSwipe:this._swipeThreshold*this._itemSize,validAxis:this.vertical?"y":"x"},s=_analyzeTouch(o);(s.isConsideredSwipe||s.isConsideredTap)&&this._actionContextOfFirstTouchStart.trackUserInteraction(),this._actionContextOfFirstTouchStart=null,this._autoAnimateHaltedByUserTouch=!1}else e.touchPosition=n},SwipeyGroup.prototype._handleTouchCancel=function(t){this._handleTouchEnd(t)},SwipeyGroup.prototype.resetAction=function(t,e,i){SwipeyGroup.uber.resetAction.call(this,t,e,function(){this.jumpToItem(this.startIndex),this._autoAnimateDisabledByUserTouch=!1,i()}.bind(this))},SwipeyGroup.prototype.getField=function(){return{type:"string",value:this.content?this.content[this.getFocusedIndex()].name:""}},SwipeyGroup.prototype.allowAutoAnimate=function(){return!this._autoAnimateDisabledByUserTouch&&!this._autoAnimateHaltedByUserTouch},SwipeyGroup.prototype.resetAllowAutoAnimate=function(){this._autoAnimateDisabledByUserTouch=!1},SwipeyGroup.prototype.getNestedContainers=function(){return this.content},SwipeyGroup.prototype.positionUsingTransforms=retTrue,SwipeyGroup.prototype.sizeUsingTransforms=retTrue,SwipeyGroup.prototype.getNaturalSize=function(){return{width:this.originalSize.width,height:this.originalSize.height}},SwipeyGroup.prototype._track=function(t){this._privateApiTracked[t]||(this._privateApiTracked[t]=!0,creative.track({name:"retiredFeatureUsed",featureType:"apifunction",featureName:t}))},SwipeyGroup.prototype.getFocusedVirtualIndex=function(){this._track("SwipeyGroup.getFocusedVirtualIndex"),this._getFocusedVirtualIndex()},SwipeyGroup.prototype.getPositionForCentered=function(t){this._track("SwipeyGroup.getPositionForCentered"),this._getPositionForCentered(t)},SwipeyGroup.prototype.getItemCenter=function(t){this._track("SwipeyGroup.getItemCenter"),this._getItemCenter(t)},SwipeyGroup.prototype.getIndexOfCenteredItem=function(){this._track("SwipeyGroup.getIndexOfCenteredItem"),this._getIndexOfCenteredItem()},SwipeyGroup.prototype.getViewportTreshold=function(){this._track("SwipeyGroup.getViewportTreshold"),this._getViewportTreshold()},SwipeyGroup.prototype.getNearestIndex=function(t){this._track("SwipeyGroup.getNearestIndex"),this._getNearestIndex(t)};;
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),Picture.toString=function(){return"[Clazz Picture]"},Picture.prototype.toString=function(){return"[Picture "+this.localId+"]"},Picture.prototype.createNode=function(){var i=new File("runner/image-placeholder.png");i.meta={height:28,width:28},this.file||(this.file=i),this._useDynamicImage="feed"===this.assetSource&&null!=this.feedFieldKey&&"string"==typeof creative.runtimeParams.dynamicContent[this.feedFieldKey],this._useDynamicImage&&(this.file=new File,this.file.url=creative.runtimeParams.dynamicContent[this.feedFieldKey],this.file.meta=ScreenObject._toSizePx(this.layoutCurrent.size,this.parentContainer.size));var t=Picture.uber.createNode.call(this);return this.file===i?(("feed"!=this.assetSource||"feed"===this.assetSource&&null===this.feedFieldKey)&&addClass(t,"empty"),t):(this.preloadImage(this.file,this._handlePreloadedImage.bind(this,t)),t)},Picture.prototype._handlePreloadedImage=function(i,t){this._useDynamicImage&&(this.file.meta={height:t.naturalHeight,width:t.naturalWidth});var e="",r="",s="no-repeat";this.imagePosition&&(e=this.imagePosition.replace("-"," "));var a=this.sizeUsingTransforms()?this.getNaturalSize():this.size,h=this.fittingSize;switch("fitUpToOriginal"===this.fittingSize&&(h=a.widthl&&"fit"==this.fittingSize||l>h&&"fill"==this.fittingSize,t=l>h&&"fit"==this.fittingSize||h>l&&"fill"==this.fittingSize,e=s,r=a,i?r=s/n*o:t&&(e=a/o*n),e>c&&(r*=c/e,e=c),r>c&&(e*=c/r,r=c),{width:e,height:r})},Picture.prototype.getImageUrl=function(){return this.file?this.file.getUrl():void 0};;
function Button(){}inherit(Button,ScreenObject),extend(Button.prototype,TextStyleIntegrator),Button.toString=function(){return"[Clazz Button]"},Button.prototype.toString=function(){return"[Button "+this.localId+"]"},Object.defineProperties(Button.prototype,{_borderRoundness:{get:function(){var t=0,e=0,o=0,r=0;if(this.border&&"number"==typeof this.borderRadius)t=this.borderRadius;else if(this.border!==!1||this.roundness){if("number"==typeof this.roundness&&(r=this.roundness),r>0){var n=Math.min(this.getNaturalSize().height,this.getNaturalSize().width),s=n/2,i=Math.max(this.getNaturalSize().height,this.getNaturalSize().width),a=i/2;if(50>r){var d=r/50;t=s*d}else{var h=(r-50)/50,u=(a-s)*h,l=s+u;e=this.getNaturalSize().width==n?s:l,o=this.getNaturalSize().height==n?s:l}}}else r=0;return this.shadow&&ios("8")&&window.devicePixelRatio>=3&&(1>t&&(t=1),1>e&&(e=1),1>o&&(o=1)),50>r?t+"px":e+"px "+o+"px"}}}),Button.prototype.getBorderWidth=function(){return this.borderWidth},Button.prototype.getShadowDistance=function(){return this.shadowDistance},Button.prototype.getShadowBlur=function(){return this.shadowBlur},Button.prototype.awake=function(){Button.uber.awake.call(this),this._defaultValues={backgroundUpImage:"runner/clazzes/Button/button.png",backgroundDownImage:"runner/clazzes/Button/button-down.png"},this._handleTap=this._handleTap.bind(this),this._handleTouchStart=this._handleTouchStart.bind(this),this._handleTouchEnd=this._handleTouchEnd.bind(this)},Button.prototype.createNode=function(){var t=Button.uber.createNode.call(this);return this._privateApiTracked={},this._hoverEnabled=desktop(),this._backgroundElement=null,this._foregroundElement=null,this._textBorder=0,this._cssRules={},this._useBackgroundImage="image"===this.background,this._useForegroundImage="image"===(this._useBackgroundImage?this.foregroundForImage:this.foregroundForCss),addClass(t,"touchable"),this._createBackground(t),this._createForeground(t),this.addStyle(this._cssRules),attach(t,"tap",this._handleTap),attach(t,"touchstart",this._handleTouchStart),t},Button.prototype._appear=function(){this._experimentButtonStyle&&this._experimentButtonStyle.trackExposure()},Button.prototype._createBackground=function(t){if(this._backgroundElement=document.createElement("div"),addClass(this._backgroundElement,"background"),this._useBackgroundImage){var e=!1,o="normal",r="focus",n="pressed",s=function(t,e){addClass(e,t),this._backgroundElement.appendChild(e)}.bind(this);this.backgroundUpImage?this.preloadImage(this.backgroundUpImage,function(t){s(o,t)}):(e=!0,this.preloadImage(new File(this._defaultValues.backgroundUpImage),function(t){s(o,t)})),this._hoverEnabled&&this.backgroundHoverImage&&this.preloadImage(this.backgroundHoverImage,function(t){s(r,t)}),this.backgroundDownImage?this.preloadImage(this.backgroundDownImage,function(t){s(n,t)}):e&&this.preloadImage(new File(this._defaultValues.backgroundDownImage),function(t){s(n,t)}),this._cssRules[".background ."+o]="display: block;",this._cssRules[".background ."+r]="display: none;",this._cssRules[".background ."+n]="display: none;",this._hoverEnabled&&this.backgroundHoverImage&&(this._cssRules[":hover .background ."+o]="display: none;",this._cssRules[":hover .background ."+r]="display: block;",this._cssRules[":hover .background ."+n]="display: none;"),(this.backgroundDownImage||e)&&(this._cssRules[".background.down ."+o]="display: none;",this._cssRules[".background.down ."+r]="display: none;",this._cssRules[".background.down ."+n]="display: block;")}else{if(this.backgroundColor){var i="";if(Color.isGradient(this.backgroundColorUp)?(i+=Color.createGradientStyle(this.backgroundColorUp),i+="background-color: transparent;"):(i+="background-image: none; ",i+="background-color: "+this.backgroundColorUp+";"),this._cssRules[".background"]=i,this._hoverEnabled&&this.backgroundColorHover){var a="";Color.isGradient(this.backgroundColorHover)?(a+=Color.createGradientStyle(this.backgroundColorHover),a+="background-color: transparent;"):(a+="background-image: none; ",a+="background-color: "+this.backgroundColorHover+";"),this._cssRules[":hover .background"]=a}var d="";Color.isGradient(this.backgroundColorDown)?(d+=Color.createGradientStyle(this.backgroundColorDown),d+="background-color: transparent;"):(d+="background-image: none; ",d+="background-color: "+this.backgroundColorDown+";"),this._cssRules[".background.down"]=d}if(this.border&&(this._backgroundElement.style.borderColor=this.borderColor,this._backgroundElement.style.borderWidth=this.getBorderWidth()+"px"),this.shadow){var h=this.shadowAngle*(Math.PI/180),u=Math.round(this.getShadowDistance()*Math.cos(h)),l=Math.round(this.getShadowDistance()*Math.sin(h));celtra.styler.css(this._backgroundElement,"boxShadow",u+"px "+l+"px "+this.getShadowBlur()+"px "+this.shadowColor)}}t.appendChild(this._backgroundElement)},Button.prototype._createForeground=function(t){var e=this.callToActionText.trim().length>0;if(this._foregroundElement=document.createElement("div"),addClass(this._foregroundElement,"foreground"),!this._useBackgroundImage&&this.border?(this._foregroundElement.style.borderWidth=this.getBorderWidth()+"px",this._textBorder=this.getBorderWidth()):this._textBorder=0,this._useForegroundImage){this._foregroundElement.className+=this.foregroundStretchImage?" image-stretch":" image-fit";var o="normal",r="focus",n="pressed",s=function(t,e){var o=document.createElement("div");addClass(o,t),o.style.backgroundImage="url("+e.src+")",this._foregroundElement.appendChild(o)}.bind(this);this.foregroundUpImage&&this.preloadImage(this.foregroundUpImage,function(t){s(o,t)}),this._hoverEnabled&&this.foregroundHoverImage&&this.preloadImage(this.foregroundHoverImage,function(t){s(r,t)}),this.foregroundDownImage&&this.preloadImage(this.foregroundDownImage,function(t){s(n,t)}),this._cssRules[".foreground ."+o]="display: block;",this._cssRules[".foreground ."+r]="display: none;",this._cssRules[".foreground ."+n]="display: none;",this._hoverEnabled&&this.foregroundHoverImage&&(this._cssRules[":hover .foreground ."+o]="display: none;",this._cssRules[":hover .foreground ."+r]="display: block;",this._cssRules[":hover .foreground ."+n]="display: none;"),this.foregroundDownImage&&(this._cssRules[".foreground.down ."+o]="display: none;",this._cssRules[".foreground.down ."+r]="display: none;",this._cssRules[".foreground.down ."+n]="display: block;")}else e&&(this._foregroundElement.className+=" call-to-action",this._foregroundElement.textContent=this.callToActionText,this.initializeFont(),this._cssRules[".foreground"]="color: "+this.textColor+";",this._hoverEnabled&&this.textColorHover&&(this._cssRules[":hover .foreground"]="color: "+this.textColorHover+";"),this._cssRules[".foreground.down"]="color: "+this.textColorDown+";");t.appendChild(this._foregroundElement)},Button.prototype.redrawLayout=function(){if(!this._useBackgroundImage){var t=this._borderRoundness;parseInt(t,10)>0&&(this._backgroundElement&&(this._backgroundElement.style.borderTopLeftRadius=t,this._backgroundElement.style.borderTopRightRadius=t,this._backgroundElement.style.borderBottomLeftRadius=t,this._backgroundElement.style.borderBottomRightRadius=t),this._foregroundElement&&(this._foregroundElement.style.borderTopLeftRadius=t,this._foregroundElement.style.borderTopRightRadius=t,this._foregroundElement.style.borderBottomLeftRadius=t,this._foregroundElement.style.borderBottomRightRadius=t))}var e=this.callToActionText.trim().length>0;if(!this._useForegroundImage&&e){this.applyTextSize(this._foregroundElement.style);var o;if("undefined"!=typeof this.lineSpacing){o=parseInt(this._foregroundElement.style.lineHeight,10);var r=this.callToActionText.split(/\n/).length,n=o*r,s=this.sizeUsingTransforms()?this.getNaturalSize():this.size,i=(s.height-n)/2,a=i-this._textBorder;this._foregroundElement.style.paddingTop=a+"px"}else o=this.size.height-2*this._textBorder,this._foregroundElement.style.lineHeight=o+"px"}},Button.prototype.updateTextStyle=function(){var t=this.callToActionText.trim().length>0;!this._useForegroundImage&&t&&(this.applyTextStyle(this._foregroundElement.style),this._foregroundElement.style.color="")},Button.prototype._handleTap=function(t){t.stopPropagation()},Button.prototype._handleTouchStart=function(){addClass(this._backgroundElement,"down"),addClass(this._foregroundElement,"down"),attach(this.parentUnit.node,"touchend",this._handleTouchEnd),this._experimentButtonStyle&&this._experimentButtonStyle.trackSuccess()},Button.prototype._handleTouchEnd=function(){removeClass(this._backgroundElement,"down"),removeClass(this._foregroundElement,"down"),detach(this.parentUnit.node,"touchend",this._handleTouchEnd)},Button.prototype._applyExperiments=function(){this._experimentButtonStyle=this._copyChosenExperimentProperties("ButtonStyle")};;
function Texty(){}inherit(Texty,ScreenObject),extend(Texty.prototype,TextStyleIntegrator),Texty.toString=function(){return"[Clazz Texty]"},Texty.prototype.toString=function(){return"[Texty "+this.localId+"]"},Texty.prototype.awake=function(){Texty.uber.awake.call(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)},Texty.prototype.createNode=function(){var t=Texty.uber.createNode.call(this),e=this.getLetterSpacing;if(this.getLetterSpacing=function(){return this.responsiveFont?this._adjustedFontSize*this._fontSizeFactor/this._characterSpacingFactor:e.call(this)},this.scroller=null,this._privateApiTracked={},this._autoscrollTimeouts=[],this._autoscrolling=null,this._listeningForTouches=null,this._scrollContainer=null,this._textContainer=null,this._textToSet=null,this._sanitizeText=!0,this._adjustedFontSize=this.getNaturalFontSize(),this._lineHeightFactor=1,this._characterSpacingFactor=1,this._fontSizeFactor=1,this.dynamicContentEnabled){var i="";null!=this.feedFieldKey&&"string"==typeof creative.runtimeParams.dynamicContent[this.feedFieldKey]&&(i=creative.runtimeParams.dynamicContent[this.feedFieldKey]),this.text=i}this._initialText=this.text,this._initialScaleFont=this.scaleFont,this._scrollContainer=document.createElement("div"),this._scrollContainer.className="scroll-container",this._textContainer=document.createElement("div"),this._textContainerClone=document.createElement("div"),this._textContainerClone.style.display="none",this._textContainerResponsive=document.createElement("div"),this._textContainerResponsive.style.visibility="hidden";var n=/^((?!.*chrome).)*safari/i.test(navigator.userAgent);return desktop()&&(deviceInfo.browser.safari()||n)&&(this._textContainer.style.webkitFontSmoothing=celtra.isHighDensityDisplay()?"subpixel-antialiased":"antialiased",this._textContainerClone.style.webkitFontSmoothing=celtra.isHighDensityDisplay()?"subpixel-antialiased":"antialiased",this._textContainerResponsive.style.webkitFontSmoothing=celtra.isHighDensityDisplay()?"subpixel-antialiased":"antialiased"),(deviceInfo.browser.chrome(null,"48")||"Samsung Browser"===deviceInfo.browser.name)&&(this._textContainer.style.textRendering="geometricPrecision",this._textContainerClone.style.textRendering="geometricPrecision",this._textContainerResponsive.style.textRendering="geometricPrecision"),this.scrollable&&(this.scroller=new Scroller(t,this._textContainer,{direction:"vertical",animating:!0,easing:!0,locking:!1,scrollbarPosition:this.scrollbarPosition,scrollbarColor:this.scrollbarColor})),this.initializeFont(),this._scrollContainer.appendChild(this._textContainer),this._scrollContainer.appendChild(this._textContainerClone),this._scrollContainer.appendChild(this._textContainerResponsive),t.appendChild(this._scrollContainer),this._startListeningForTouches(),t},Texty.prototype._appear=function(){this._handleSizeUpdate()},Texty.prototype.redrawLayout=function(){this._handleSizeUpdate()},Texty.prototype._handleSizeUpdate=function(){this._applyTextSize(),this._updateText()},Texty.prototype._applyTextSize=function(){this.responsiveFont||(this.applyTextSize(this._textContainer.style),this.applyTextSize(this._textContainerClone.style)),this._alignText()},Texty.prototype._alignText=function(){var t=this.usePadding?2:0,e=t,i=t,n=parseInt(this._textContainer.style.paddingLeft,10),o=parseInt(this._textContainer.style.paddingRight,10);if("undefined"!=typeof this.scaleFont&&this.scaleFont&&("right"!=this.textAlign||isNaN(n)?"left"!=this.textAlign||isNaN(o)||(i=o-t):e=n-t),[this._textContainer,this._textContainerClone].forEach(function(n){n.style.paddingBottom=t+"px",n.style.paddingLeft=Math.max(e,t)+"px",n.style.paddingRight=Math.max(i,t)+"px"}),this.scrollable||this._scrollContainer.offsetHeight<=this._textContainer.offsetHeight||"undefined"==typeof this.textAlignVertical)return void(this._textContainer.style.paddingTop=t+"px");this._textContainerClone.style.display="inline",this._textContainerClone.style.paddingTop=0,this._textContainerClone.style.height=0;var s=this.scrollable?0:Number(this.textAlignVertical),a=this.getNaturalSize().height,h=0===s?0:this._textContainerClone.scrollHeight,r=Math.max(0,(a-h)*s/100),l=0;r=isNaN(r)?0:r,l=s>50&&a>h?-t:50==s&&a>h?t/2:t,this._textContainer.style.marginTop=r+l+"px",this._textContainer.style.paddingTop="0px",this._textContainerClone.style.display="none"},Texty.prototype._getResponsiveScrollHeight=function(){var t=this._textContainerResponsive.getBoundingClientRect();return this._textContainerResponsive.scrollHeight+(parseInt(t.height,10)-t.height)*this._fontSizeFactor},Texty.prototype._applyAdjustedFontSizeStyle=function(t){t.style.fontSize=this._adjustedFontSize*this._fontSizeFactor+"px",t.style.lineHeight=this._adjustedFontSize*this._fontSizeFactor/this._lineHeightFactor+"px",t.style.letterSpacing=this._adjustedFontSize*this._fontSizeFactor/this._characterSpacingFactor+"px"},Texty.prototype._adjustFontSize=function(){if(this.responsiveFont&&!hasClass(this.node,"animated")){var t=this.usePadding?2:0,e=.5,i=this.getNaturalSize(),n=this.getFontSize(),o=this.getNaturalFontSize(),s=Math.max(Math.round(o*e),1);this._fontSizeFactor=n/o;var a=i.width-2*t*this._fontSizeFactor,h=i.height-2*t*this._fontSizeFactor;for(this._adjustedFontSize=o,this._lineHeightFactor=n/Math.max(1,this.getLineSpacing()+n),this._characterSpacingFactor=n/this.getNaturalLetterSpacing(),this._textContainerResponsive.style.width=a+"px",this._textContainerResponsive.style.height=h+"px",this._applyAdjustedFontSizeStyle(this._textContainerResponsive),this.applyTextStyle(this._textContainerResponsive.style),this._textContainerResponsive.innerText=this.text;this._getResponsiveScrollHeight.call(this)<=h&&this._adjustedFontSizeh&&this._adjustedFontSize>s;)this._adjustedFontSize--,this._applyAdjustedFontSizeStyle(this._textContainerResponsive);this._applyAdjustedFontSizeStyle(this._textContainer),this._applyAdjustedFontSizeStyle(this._textContainerClone)}},Texty.prototype.updateTextStyle=function(){this.applyTextStyle(this._textContainer.style),this.applyTextStyle(this._textContainerClone.style),this._textContainer.style.whiteSpace="pre-wrap",this._textContainerClone.style.whiteSpace="pre-wrap",this._textContainerResponsive.style.whiteSpace="pre-wrap"},Texty.prototype._updateText=function(){var t=this._sanitizeText?htmlentitize(this.text.toString()):this.text;this._textContainer.innerHTML=t,this._textContainerClone.innerHTML=t,this._adjustFontSize(),this._alignText(),this.scrollable&&(this.scroller.redraw(),this.scroller.scrollTo(0,0,!1),this.autoscrollEnabled&&(this._resetAutoScroll(),this._createAutoScroll()))},Texty.prototype._createAutoScroll=function(){var t=this.scroller.getMaxScroll();defer(function(){this.scroller.scrollTo(t.left,t.top,!0,this.autoscrollDuration,!0,function(){"return"===this.autoscrollConclusion?this.scroller.scrollTo(0,0,!0,this.autoscrollDuration,!0):"loop"===this.autoscrollConclusion&&(this._autoscrolling=!0,e())}.bind(this))}.bind(this),this.autoscrollDelay);var e=function(){this._autoscrolling&&this.scroller.scrollTo(0,0,!0,this.autoscrollDuration,!0,function(){this.scroller.scrollTo(t.left,t.top,!0,this.autoscrollDuration,!0,e)}.bind(this))}.bind(this)},Texty.prototype._resetAutoScroll=function(){this._autoscrolling=!1},Texty.prototype._handleTouchStart=function(t){t.preventDefault(),new ActionContext(this,!0).trackUserInteraction(),this.scrollable&&(this._resetAutoScroll(),t.stopPropagation(),this.scroller._handleTouchStart(t),attach(this.parentUnit.node,"touchmove",this._handleTouchMove),attach(this.parentUnit.node,"touchend",this._handleTouchEnd),attach(this.parentUnit.node,"touchcancel",this._handleTouchCancel))},Texty.prototype._handleTouchMove=function(t){t.preventDefault(),this.scroller._handleTouchMove(t)},Texty.prototype._handleTouchEnd=function(t){t.preventDefault(),this.scroller._handleTouchEnd(t),detach(this.parentUnit.node,"touchmove",this._handleTouchMove),detach(this.parentUnit.node,"touchend",this._handleTouchEnd),detach(this.parentUnit.node,"touchcancel",this._handleTouchCancel)},Texty.prototype._handleTouchCancel=function(t){this._handleTouchEnd(t)},Texty.prototype.positionUsingTransforms=retTrue,Texty.prototype.sizeUsingTransforms=retTrue,Texty.prototype.getNaturalSize=function(){return this.originalSize},Texty.prototype.getNaturalFontSize=function(){return this.fontSize},Texty.prototype.getNaturalLetterSpacing=function(){return this.letterSpacing},Texty.prototype._startListeningForTouches=function(){this.scrollable&&!this._listeningForTouches&&(attach(this._textContainer,"touchstart",this._handleTouchStart),this._listeningForTouches=!0)},Texty.prototype._stopListeningForTouches=function(){this._listeningForTouches&&(detach(this._textContainer,"touchstart",this._handleTouchStart),this._listeningForTouches=!1)},Texty.prototype._setText=function(t){this._sanitizeText=!1,this.text=t,this.scaleFont&&(this.scaleFont=!1),this.hidden?this._textToSet=!0:(this._updateText(),this._applyTextSize())},Texty.prototype.showAction=function(t,e,i){Texty.uber.showAction.call(this,t,e,function(){this._startListeningForTouches(),this._textToSet&&(this._textToSet=!1,this._updateText()),i()}.bind(this))},Texty.prototype.hideAction=function(t,e,i){Texty.uber.hideAction.call(this,t,e,function(){this._stopListeningForTouches(),i()}.bind(this))},Texty.prototype.resetAction=function(t,e,i){this._sanitizeText=!0,Texty.uber.resetAction.call(this,t,e,function(){this.hidden||this._startListeningForTouches(),this.text=this._initialText,this.scaleFont=this._initialScaleFont,this._handleSizeUpdate(),i()}.bind(this))},Texty.prototype.setTextAction=function(t,e,i){this._setText(e.text),i()};;
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,a=0,r=this._defaultValues.roundness;if("number"==typeof this.roundness&&(r=this.roundness),r>0){var s=Math.min(this.getNaturalSize().height,this.getNaturalSize().width),o=s/2,i=Math.max(this.getNaturalSize().height,this.getNaturalSize().width),h=i/2;if(50>r){var d=r/50;e=o*d}else{var p=(r-50)/50,n=(h-o)*p,u=o+n;t=this.getNaturalSize().width==s?o:u,a=this.getNaturalSize().height==s?o:u}}return this.shadow&&ios("8")&&window.devicePixelRatio>=3&&(1>e&&(e=1),1>t&&(t=1),1>a&&(a=1)),50>r?e+"px":t+"px "+a+"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);if(this._privateApiTracked={},e.className+=" touchable",this._shapey=document.createElement("div"),this.backgroundColor)if(Color.isGradient(this.backgroundColor)){var t=Color.createGradientStyle(this.backgroundColor);this.addStyle({".gradient-shapey":t}),addClass(this._shapey,"gradient-shapey")}else this._shapey.style.backgroundColor=this.backgroundColor;if(this.border){var a="undefined"!=typeof this.borderColor?this.borderColor:this._defaultValues.borderColor,r="number"==typeof this.borderWidth?this.borderWidth:this._defaultValues.borderWidth;this._shapey.style.borderColor=a,this._shapey.style.borderStyle="solid",this._shapey.style.borderWidth=r+"px"}if(this.shadow){var s=("number"==typeof this.shadowAngle?this.shadowAngle:this._defaultValues.shadowAngle)*(Math.PI/180),o="number"==typeof this.shadowBlur?this.shadowBlur:this._defaultValues.shadowBlur,i="undefined"!=typeof this.shadowColor?this.shadowColor:this._defaultValues.shadowColor,h="number"==typeof this.shadowDistance?this.shadowDistance:this._defaultValues.shadowDistance,d=Math.round(h*Math.cos(s)),p=Math.round(h*Math.sin(s));celtra.styler.css(this._shapey,"boxShadow",d+"px "+p+"px "+o+"px "+i)}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 File(t){this.url=t}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(){var t=this.getOriginalUrl(),i=/\.png$/i.test(String(this.name)),e=/\.jpe?g$/i.test(String(this.name));return this.blobHash&&(i||e)&&(t+="?transform=crush",this.quality>-1&&(t+="&quality="+this.quality),this.optimizedWidth>0&&this.optimizedHeight>0&&(t+="&resize="+this.optimizedWidth+"x"+this.optimizedHeight)),t},File.prototype.getDataUri=function(t,i){t instanceof Function&&(i=t,t={});var e=this,r=this.getUrl();"undefined"!=typeof this.dataUri?defer(function(){i(e.dataUri)},0,"File.getDataUri defer callback, has dataUri"):creative.dataURIsEnabled||t.force?creative.batcher.getDataUri(r,i):defer(function(){i(r)},0,"File.getDataUri defer callback, url")},Object.defineProperty(File.prototype,"width",{get:function(){return this.retina?Math.round(this.meta.width/2):this.meta.width}}),Object.defineProperty(File.prototype,"height",{get:function(){return this.retina?Math.round(this.meta.height/2):this.meta.height}});;
function Font(){}inherit(Font,FontBase),Font.toString=function(){return"[Clazz Font]"},Font.prototype.toString=function(){return"[Font "+this.localId+"]"};;
function Group(){}inherit(Group,ScreenObject),Group.toString=function(){return"[Clazz Group]"},Group.prototype.toString=function(){return"[Group "+this.localId+"]"},Group.prototype.createNode=function(){var t=Group.uber.createNode.call(this);return this.incrementLoadingCount(),t.appendChild(this.content.getNode(this.decrementLoadingCount)),t},Group.prototype.getNestedContainers=function(){return[this.content]},Group.prototype.positionUsingTransforms=ios("8")?retFalse:retTrue,Group.prototype.sizeUsingTransforms=retTrue,Group.prototype.getNaturalSize=function(){return this.originalSize},Group.prototype._appear=function(){this.appearNestedObjects()},Group.prototype._disappear=function(){this.disappearNestedObjects()};var ObjectGroup=Group;;
var Form={};Form.toString=function(){return"[Clazz Form]"},Form.submitAction=function(e,i,t){this.submitInProgress||(this.submitInProgress=!0,this.hasFailureCallback=i.onFailure?!1:!0,e.track({name:"formSubmissionAttempted",label:i.reportLabel}),Form.validateAction(e,{formElements:i.formElements,onSuccess:function(e,t){var r;if("table"==i.submitTarget&&i.tableId)r=creative.apiUrl+"formTables/"+i.tableId+"/rows";else{if("url"!=i.submitTarget||!i.url)return(i.onFailure||nullai)(e,t);r=i.url}var a={fields:{}};i.formElements.forEach(function(e){a.fields[e.fieldName]=e.getField()});var n=new XMLHttpRequest;n.open("POST",r),n.setRequestHeader("Content-Type","application/json; charset=utf-8"),n.onreadystatechange=function(){if(4===n.readyState){var r=200<=n.status&&n.status<300;r&&e.track({name:"formSubmissionSucceeded",label:i.reportLabel});var a=r?i.onSuccess:i.onFailure;(a||nullai)(e,t),this.submitInProgress=!1}}.bind(this),n.send(JSON.stringify(a))}.bind(this),onFailure:function(e,t){(i.onFailure||nullai)(e,t),this.submitInProgress=!1}.bind(this)},t))},Form.validateAction=function(e,i,t){function r(){u=[];for(var e in creative.units){var i=creative.units[e];if(i.isAppearing){var t=i.currentScreen,r=t.node.querySelectorAll("input, textarea");if(r)for(var a=0;a[\\\\s\\\\S]*?\",\"gi\");do t=e,e=e.replace(r,\"\");while(e!==t);return e.replace(/e.minDistanceForSwipe?!0:!1:\"x\"===e.validAxis&&(t=o>e.minDistanceForSwipe?!0:!1),n=r>i&&r>o?!0:!1,{isHorizontal:o>i?!0:!1,isConsideredSwipe:t,isConsideredTap:n}}function attach(e,t,n,r){var o=getEventNames()[t.toLowerCase()]||t;e.addEventListener(o,n,_buildNativeListenerOptions(r))}function detach(e,t,n,r){var o=getEventNames()[t.toLowerCase()]||t;e.removeEventListener(o,n,_buildNativeListenerOptions(r))}function once(e,t,n,r){attach(e,t,function o(){detach(e,t,o,r),n.apply(this,arguments)},r)}function trigger(e,t,n,r){var o=document.createEvent(\"HTMLEvents\");o.initEvent(t,n,r);var i=\"on\"+ucfirst(t);return\"function\"==typeof e[i]&&e[i](),e.dispatchEvent(o)}function fakeclick(e,t){t=t||window;var n=t.document.createElement(\"a\");n.cssText=\"visibility: hidden\",n.addEventListener(\"click\",function(t){e(),t.preventDefault(),t.stopPropagation(),n.parentNode.removeChild(n)},!0),t.document.body.appendChild(n);var r=document.createEvent(\"MouseEvents\");r.initEvent(\"click\",!0,!0),n.dispatchEvent(r)}function fakeClickAhrefBlank(e,t,n){t=t||noop,n=n||window;var r=n.document.createElement(\"a\");r.style.cssText=\"visibility: hidden\",r.setAttribute(\"href\",e),r.setAttribute(\"target\",\"_blank\"),r.addEventListener(\"click\",function(e){e.stopPropagation(),t(),r.parentNode.removeChild(r)},!0),n.document.body.appendChild(r);var o=n.document.createEvent(\"MouseEvents\");o.initEvent(\"click\",!0,!0),r.dispatchEvent(o)}function noop(){}function nullai(e,t){t()}function retTrue(){return!0}function retFalse(){return!1}function offset(e){var t=e.getBoundingClientRect(),n=e.ownerDocument,r=n.documentElement,o=n.defaultView;return{top:t.top+(o.pageYOffset||r.scrollTop)-(r.clientTop||0),left:t.left+(o.pageXOffset||r.scrollLeft)-(r.clientLeft||0)}}function addCssRule(e,t,n){var r=document.createElement(\"style\");r.textContent=e+\" {\"+t+\"}\",n?n.document.getElementsByTagName(\"head\")[0].appendChild(r):document.getElementsByTagName(\"head\")[0].appendChild(r)}function redrawAndroidIframe(){var e=document.createElement(\"style\");document.body.appendChild(e),document.body.removeChild(e)}function parseQuery(e){var t={};return e=e.replace(/\\&$/,\"\").replace(/\\+/g,\"%20\"),e.split(\"&\").forEach(function(e){var n=e.split(\"=\").map(decodeURIComponent);t[n[0]]=n[1]}),t}function buildQuery(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+\"=\"+encodeURIComponent(e[n]));return t.join(\"&\")}function postBlob(e,t){var n=new XMLHttpRequest;n.open(\"POST\",creative.apiUrl+\"blobs?base64=1\"),n.setRequestHeader(\"Content-Type\",\"application/octet-stream\"),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText,n.status)},n.send(e)}function tmpl(e,t){function n(e){return\" p.push('\"+e.replace(/'/g,\"\\\\'\").split(/\\r?\\n/g).join(\"\\\\n');\\n p.push('\")+\"');\\n\"}if(!e)return\"\";var r;if(-1==e.indexOf(\"<%\"))r=function(){return e};else{var o=e.split(/<%\\s*|\\s*%>/g),i=\"var p = []; with(o) {\\n\",a=!1;o.forEach(function(e){a?i+=\"=\"==e[0]?\" p.push(\"+e.replace(/^=\\s*|\\s*$/g,\"\")+\");\\n\":\" \"+e+\"\\n\":e&&(i+=n(e)),a=!a}),i+='} return p.join(\"\");';try{r=new Function(\"o\",i)}catch(c){var u=new Error(\"Cannot parse template! (see `template` property)\");throw u.template=i,u}}return t?r(t):r}function flash(){var e=document.createElement(\"div\");e.style.background=\"white\",e.style.opacity=.005,e.style.position=\"absolute\",e.style.top=0,e.style.left=0,e.style.width=\"100%\",e.style.height=\"100%\",e.style.zIndex=2147483647,document.body.appendChild(e),setTimeout(function(){e.parentNode.removeChild(e)},0)}function crc32(e){\"use strict\";var t=-1,n=0,r=[0,-227835133,-516198153,324072436,-946170081,904991772,648144872,-724933397,-1965467441,2024987596,1809983544,-1719030981,1296289744,-1087877933,-1401372889,1578318884,274646895,-499825556,-244992104,51262619,-675000208,632279923,922689671,-996891772,-1702387808,1760304291,2075979607,-1982370732,1562183871,-1351185476,-1138329528,1313733451,549293790,-757723683,-1048117719,871202090,-416867903,357341890,102525238,-193467851,-1436232175,1477399826,1264559846,-1187764763,1845379342,-1617575411,-1933233671,2125378298,820201905,-1031222606,-774358714,598981189,-143008082,85089709,373468761,-467063462,-1170599554,1213305469,1526817161,-1452612982,2107672161,-1882520222,-1667500394,1861252501,1098587580,-1290756417,-1606390453,1378610760,-2032039261,1955203488,1742404180,-1783531177,-878557837,969524848,714683780,-655182201,205050476,-28094097,-318528869,526918040,1361435347,-1555146288,-1340167644,1114974503,-1765847604,1691668175,2005155131,-2047885768,-604208612,697762079,986182379,-928222744,476452099,-301099520,-44210700,255256311,1640403810,-1817374623,-2130844779,1922457750,-1503918979,1412925310,1197962378,-1257441399,-350237779,427051182,170179418,-129025959,746937522,-554770511,-843174843,1070968646,1905808397,-2081171698,-1868356358,1657317369,-1241332974,1147748369,1463399397,-1521340186,-79622974,153784257,444234805,-401473738,1021025245,-827320098,-572462294,797665321,-2097792136,1889384571,1674398607,-1851340660,1164749927,-1224265884,-1537745776,1446797203,137323447,-96149324,-384560320,461344835,-810158936,1037989803,781091935,-588970148,-1834419177,1623424788,1939049696,-2114449437,1429367560,-1487280117,-1274471425,1180866812,410100952,-367384613,-112536529,186734380,-538233913,763408580,1053836080,-860110797,-1572096602,1344288421,1131464017,-1323612590,1708204729,-1749376582,-2065018290,1988219213,680717673,-621187478,-911630946,1002577565,-284657034,493091189,238226049,-61306494,-1307217207,1082061258,1395524158,-1589280451,1972364758,-2015074603,-1800104671,1725896226,952904198,-894981883,-638100751,731699698,-11092711,222117402,510512622,-335130899,-1014159676,837199303,582374963,-790768336,68661723,-159632680,-450051796,390545967,1230274059,-1153434360,-1469116676,1510247935,-1899042540,2091215383,1878366691,-1650582816,-741088853,565732008,854102364,-1065151905,340358836,-433916489,-177076669,119113024,1493875044,-1419691417,-1204696685,1247431312,-1634718085,1828433272,2141937292,-1916740209,-483350502,291187481,34330861,-262120466,615137029,-691946490,-980332558,939183345,1776939221,-1685949482,-1999470558,2058945313,-1368168502,1545135305,1330124605,-1121741762,-210866315,17165430,307568514,-532767615,888469610,-962626711,-707819363,665062302,2042050490,-1948470087,-1735637171,1793573966,-1104306011,1279665062,1595330642,-1384295599];for(n=0;n>>8^r[255&(t^e.charCodeAt(n))];return(-1^t)>>>0}function isArray(e){return\"[object Array]\"===Object.prototype.toString.call(e)}function isDefAndNotNull(e){return null!=e}function updateQueryStringParameter(e,t,n){t=encodeURIComponent(t),n=encodeURIComponent(n);var r=new RegExp(\"([?|&])\"+t+\"=.*?(&|$)\",\"i\");return separator=-1!==e.indexOf(\"?\")?\"&\":\"?\",e.match(r)?e.replace(r,\"$1\"+t+\"=\"+n+\"$2\"):e+separator+t+\"=\"+n}function fetchShortenedUrl(e,t,n){function r(t,n){i[e].forEach(function(e){e[t](n)}),delete i[e]}n=n||noop;var o=!1,i=fetchShortenedUrl.inProgress,a=fetchShortenedUrl.cache,c=\"http\"==e.slice(0,4),u=new RegExp(\"^(https?://)?(www.)?(\"+fetchShortenedUrl.invalidDomains.map(function(e){return e.replace(/[^a-zA-Z]/g,\"\\\\$&\")}).join(\"|\")+\")(/|\\\\?)\").test(e);if(!c||u)return void n();if(a[e])return void defer(function(){t(a[e])},0,\"fetchShortenedUrl defer success callback\");if(i[e]||(i[e]=[],o=!0),i[e].push({success:t,error:n}),o){var s=creative.runtimeParams.secure?creative.cachedApiUrl:creative.insecureCachedApiUrl,d=s+\"/services/shortener\",f={longUrl:e},p=btoa(to_utf8(e));p=p.replace(/\\//g,\"$\").replace(/\\+/g,\"_\").replace(/=/g,\"\");var l={cbName:\"shortener_\"+p};loadJSONP(d+\"?\"+buildQuery(f),l,function(t){a[e]=t.id,r(\"success\",t.id)},function(){r(\"error\")})}}function isMediaPlaying(e){try{return e.currentTime>0&&!e.paused&&!e.ended}catch(t){return!1}}function merge(){var e,t,n={};for(t=0;tt?0:1}function pulse(e,t,n){return step(e,n)-step(t,n)}function smoothstep(e,t,n){var r=clamp(0,1,(n-e)/(t-e));return r*r*r*((6*r-15)*r+10)}function bump(e,t,n){var r=clamp(0,1,(n-e)/(t-e));return(Math.cos(Math.PI*r)+1)/2}function getWindowNesting(e){var t={iframe:e!==e.top,friendlyIframe:!1,iabFriendlyIframe:!1,hostileIframe:!1,iframeDepth:0};if(t.iframe){var n=e;try{for(t.friendlyIframe=!!e.top.location.href,t.iabFriendlyIframe=t.friendlyIframe&&\"undefined\"!=typeof e.inDapIF&&e.inDapIF;\"undefined\"!=typeof n.parent.location.href&&n.parent.document!==n.document;)n=n.parent,t.iframeDepth++;\"undefined\"==typeof e.top.document&&(t.hostileIframe=!0)}catch(r){t.hostileIframe=!0}}return t}function isFetchSupported(){return!!(window.fetch&&window.URL&&URL.createObjectURL)}function isBeaconSupported(){return!(!window.navigator||!window.navigator.sendBeacon)}function isNativeImplementation(e){return\"function\"==typeof e&&e.toString().indexOf(\"[native code]\")>-1}!function(e){if(!this.defer){try{for(;\"undefined\"!=typeof e.parent.location.href&&e.parent.document!==e.document;)e=e.parent}catch(t){}var n=function(){function t(){return 9007199254740991===s?0:++s}var n,r,o,i,a=e,c=\"function\"==typeof a.setImmediate;if(a.MutationObserver)return function(e){n=document.createElement(\"div\"),new MutationObserver(function(){e(),n=null}).observe(n,{attributes:!0}),n.setAttribute(\"i\",\"1\")};if(!c&&a.postMessage&&!a.importScripts&&a.addEventListener){var u=\"com.setImmediate\"+Math.random(),s=0;i={};var d=function(e){if(e.source===a&&0===e.data.indexOf(u)){var t=e.data.split(\":\")[1];i[t](),delete i[t]}};return a.addEventListener(\"message\",d,!1),function(e){var n=t();i[n]=e,a.postMessage(u+\":\"+n,\"*\")}}return!c&&a.document&&\"onreadystatechange\"in document.createElement(\"script\")?function(e){r=document.createElement(\"script\"),r.onreadystatechange=function(){r.onreadystatechange=null,r.parentNode.removeChild(r),r=null,e()},document.body.appendChild(r)}:(o=c&&setImmediate||setTimeout,function(e){o(e)})}();this.defer=function(t,r,o,i){var a,c=0|r;if(o){var u;\"undefined\"!=typeof defer.perf?u=defer.perf:\"undefined\"!=typeof creative?u=creative.perf:\"undefined\"!=typeof perf&&(u=perf),u&&(u._stopTrackingDefers||(a=u.start(\"defer\",{deferId:o,delay:c})))}if(t){var s=function(){a&&a.end(),t()};i?n(s):e.setTimeout(s,c)}}}}(window),Function.prototype.bind||Object.defineProperty(Function.prototype,\"bind\",{value:function(e){var t=this;return function(){return t.apply(e,arguments)}}}),function(e){e.getEventNames=function(){var t={};return\"WebKitAnimationEvent\"in e&&(t.animationstart=\"webkitAnimationStart\",t.animationiteration=\"webkitAnimationIteration\",t.animationend=\"webkitAnimationEnd\"),\"WebKitTransitionEvent\"in e&&(t.transitionend=\"webkitTransitionEnd\"),t}}(window),_isListenerOptionSupported.opts={};var getTimestamp=function(){return void 0===window.performance||void 0===window.performance.now?Date.now:window.performance.now.bind(window.performance)}();Date.now||(Date.now=function(){return+new Date}),Array.prototype.waitForEach||Object.defineProperty(Array.prototype,\"waitForEach\",{value:function(e,t,n){var r=this.length;r?this.forEach(function(o,i,a){var c=!1;e.call(n,o,function(){if(c)throw\"Called `done` multiple times for element \"+i;c=!0,--r||t()},i,a)},n):t()}}),function(e){e.loadJS=function(t,n,r,o){var i=e.loadJS.externals,a={success:n||noop,error:r||noop};if(!/^[A-Za-z0-9]*:\\/\\/|^\\/\\//.test(t)){var c=creative.hostedFiles.filter(function(e){return e.filepath===t})[0];if(\"undefined\"==typeof c)return console.warn('Hosted file \"'+t+'\" was not found.'),void a.error();if(c.loaded!==!1)return console.warn('Hosted file \"'+t+'\" is already loaded.'),void setTimeout(a.success,0);c.loaded=!0,t=creative.cachedApiUrl+\"hostedFiles/\"+creative.id+\"/\"+creative.version+\"/\"+t}if(t in i&&!o)i[t].loaded?setTimeout(a.success,0):i[t].cbs.push(a);else{i[t]={cbs:[a]};var u=document.createElement(\"script\");u.type=\"text/javascript\",u.onload=function(){i[t].loaded=!0,i[t].cbs.forEach(function(e){e.success()}),i[t].cbs=[]},u.onerror=function(){i[t].cbs.forEach(function(e){e.error()}),i[t].cbs=[],delete i[t]},u.src=t,e.loadJS.appendToRoot(u)}},e.loadJS.externals={},e.loadJS.appendToRoot=function(e){return document.querySelector(\"head\").appendChild(e)},e.loadJSONP=function(t,n,r,o){\"function\"==typeof n&&(o=r,r=n,n={});var i=n.cbName||\"__jsonp\"+randInt();t+=(-1==t.indexOf(\"?\")?\"?\":\"&\")+(n.paramName||\"jsonp\")+\"=\"+i,e[i]=function(t){r(t),delete e[i]},loadJS(t,noop,o,!0)}}(window),\"undefined\"==typeof Function.prototype.name&&!function(){var e=/^function\\s+(\\w+?)\\s*?\\(/;Object.defineProperty(Function.prototype,\"name\",{get:function(){var t=this.constructor.prototype.toString.call(this);return e.test(t)?t.match(e)[1]:\"\"}})}(),fetchShortenedUrl.cache={},fetchShortenedUrl.inProgress={},fetchShortenedUrl.invalidDomains=[\"db.tt\",\"lnkd.in\",\"t.co\",\"youtu.be\",\"goo.gl\",\"adf.ly\",\"bit.do\",\"bit.ly\",\"fur.ly\",\"ht.ly\",\"is.gd\",\"ow.ly\",\"tr.im\",\"tiny.cc\",\"tinyurl.com\"];;\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(\"Chrome\")&&s(this.version,arguments)},r.prototype.ie=function(){return 0===this.name.indexOf(\"Internet Explorer\")&&s(this.version,arguments)},r.prototype.android=function(){return\"Android Browser\"===this.name&&s(this.version,arguments)},r.prototype.samsung=function(){return\"Samsung Browser\"===this.name&&s(this.version,arguments)},r.prototype.opera=function(){return 0===this.name.indexOf(\"Opera\")&&s(this.version,arguments)},r.prototype.silk=function(){return\"Amazon Silk\"===this.name&&s(this.version,arguments)},r.prototype.firefox=function(){return\"Firefox\"===this.name&&s(this.version,arguments)},r.prototype.edge=function(){return\"Edge\"===this.name&&s(this.version,arguments)},r.prototype.webView=function(){var n=null,t=\"iP\"===(e.navigator.platform||\"\").substr(0,2);if(t){var r=this.userAgent,i=-1!==r.indexOf(\"Safari\")&&-1!==r.indexOf(\"Version\"),o=!/constructor/i.test(e.HTMLElement);i&&!e.navigator.standalone?n=\"iOS Safari or Safari Controller\":(o||e.indexedDB)&&e.statusbar.visible?(e.webkit&&e.webkit.messageHandlers||o||e.indexedDB)&&(n=\"WKWebView\"):n=\"UIWebView\"}return n},i.prototype.webkit=function(){return\"WebKit\"===this.name&&s(this.version,arguments)},i.prototype.gecko=function(){return\"Gecko\"===this.name&&s(this.version,arguments)},i.prototype.trident=function(){return\"Trident\"===this.name&&s(this.version,arguments)},i.prototype.presto=function(){return\"Presto\"===this.name&&s(this.version,arguments)},i.prototype.blink=function(){return\"Blink\"===this.name&&s(this.version,arguments)},o.prototype.phone=function(){return\"Phone\"===this.hardwareType},o.prototype.tablet=function(){return\"Tablet\"===this.hardwareType},o.prototype.desktop=function(){return\"Desktop\"===this.hardwareType},o.prototype.mobileDevice=function(){return this.mobile===!0},e.CeltraDeviceInfo.create=function(t,r){return t=t||e.navigator.userAgent||\"\",r=r||{},a(t,r),new n(r,t)}}(window);;\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=a._downloadQueue[r];i.requested||(i.requested=!0,e.push(r),i.secure&&(t=!0))}}e.length&&(Logger(\"batcher\").log(e.length+\" new batchable URLs requested during last runloop iteration (\"+(t?\"at least one secure\":\"none secure\")+\"):\\n - \"+e.join(\"\\n - \")),a._loadBatch(t,e,function(e){for(var t in e)a._cache[t]=e[t],a._downloadQueue[t].callbacks.forEach(function(a){a(e[t])}),delete a._downloadQueue[t]}))},0,\"Batcher.getDataUri downloadQueue\",useAsap())):defer(function(){t(e)},0,\"Batcher.getDataUri url not batchable\",useAsap())},Batcher.prototype._generateBatchUrl=function(e,t){var a=(e?creative.cachedApiUrl:creative.insecureCachedApiUrl)+\"batch?urls=\"+t.sort().map(encodeURIComponent).join(\",\");return a},Batcher.prototype._loadBatch=function(e,t,a){function r(e){var t,a=5381;for(t=0;tl+i*l||r>d+c*d)&&(L.addPoint(t,n,o/1e3,u(document.elementFromPoint(t,n))),E=o,j=0)}}function r(e){var t=Date.now();I=D.setTimeout(function(){i(e,t)},200)}function i(e,t){w&&(w=!1,t||(t=Date.now()),L.addPoint(T,C,t/1e3,u(document.elementFromPoint(T,C))),h.track(L),b?(p.removeEventListener(\"touchmove\",o,f),p.removeEventListener(\"touchend\",i,f)):(p.removeEventListener(\"mousemove\",o,f),p.removeEventListener(\"mouseup\",i,f)),p.removeEventListener(\"mouseout\",r,f))}function c(e,t){var n=null,a=null,o=null,r=!1;return t instanceof Screen?(n=t,a=null,o=n.parentUnitVariant,r=!0):\"undefined\"!=typeof ScreenObject&&t instanceof ScreenObject?(n=t.parentScreen,a=t,o=n.parentUnitVariant,r=!0):\"undefined\"!=typeof CreativeUnitVariant&&t instanceof CreativeUnitVariant&&(n=null,a=null,o=t,r=!0),r?extend({unitName:o?o.parentUnit.name:n.parentUnit.name,unitVariantLocalId:o?o.localId:null,screenLocalId:n?n.localId:null,screenTitle:n?n.title:null,screenIsMaster:n?n.isMasterScreen():null,objectLocalId:a?a.localId:null,objectName:a?a.name:null,objectClazz:a?a.constructor.name:null,initiationTimestamp:new Date/1e3},e):e}function u(e){function t(e){for(var o in e)if(e.hasOwnProperty(o)){if(e[o].name&&e[o].name==a)return e[o];if(e[o].localId&&e[o].localId==n)return e[o];var r;if(e[o].variants?r=t(e[o].variants):e[o].screens?r=t(e[o].screens):e[o].objects?r=t(e[o].objects):e[o].content&&e[o].content.objects?r=t(e[o].content.objects):e[o].component&&(r=e[o].component),r)return r}}if(!e)return null;for(var n,a,o=e;;){if(o.id&&0==o.id.indexOf(\"celtra-\")){a=o.id.replace(\"celtra-\",\"\"),0==o.id.indexOf(\"celtra-object-\")&&(n=o.id.replace(\"celtra-object-\",\"\"));var r=t(g);if(r)return\"undefined\"!=typeof CreativeUnit&&r instanceof CreativeUnit?r.currentScreen:r}if(!o.parentNode)break;o=o.parentNode}return null}var l=15,d=100,s=3e3,m=40,f={capture:!0,passive:!0},p=e,v=t,h=t.adapter.trackingCenter,g=t.units,w=!1,I=null,b=!0,L={},j=0,M=null,E=Date.now(),T=0,y=0,C=0,U=0,D=e.ownerDocument.defaultView||e.ownerDocument.parentWindow;attach(p,\"touchstart\",n,f),attach(p,\"mousedown\",n,f)};\nfunction Tapper(e,t){function a(e){for(var t=e,a=null;1!=t.nodeType;)t=t.parentNode;for(;t&&1==t.nodeType&&t.tagName;){var n=t.tagName.toLowerCase();if(hasClass(t,\"touchable\")||\"a\"===n&&t.href||\"button\"===n||\"img\"===n||\"input\"===n&&t.type&&\"button\"===t.type.toLowerCase()){a=t;break}t=t.parentNode}return a}function n(e,t){var a=e.ownerDocument.createEvent(\"MouseEvents\");a.initEvent(\"tap\",!0,!0),t.dispatchEvent(a)}var o=\"undefined\"!=typeof creative&&creative.adapter||adapter,c=o.useImprovedTapDetection?10:20,r=o.useImprovedTapDetection?200:400;t=t||o.useNativeClickForTapDetection,t&&(attach(e,\"click\",function(t){var o=a(t.target);o&&n(e,o)},!0),o.useNativeClickForTapDetection)||attach(e,\"touchstart\",function(i){var u=a(i.target);if(u){var h=!1;if(celtra.iframe()){var s=function(){var e=o.getTopWindow();return[e.scrollX,e.scrollY,e.innerWidth,e.innerHeight]},d=s();h=!0}var v=i.targetTouches[0].clientX-c,l=i.targetTouches[0].clientX+c,f=i.targetTouches[0].clientY-c,p=i.targetTouches[0].clientY+c;addClass(u,\"touched\");var g=!1,T=!1,m=!1,C=!1,D=new Date,w=function(e){if(!g&&!T){var t=e.targetTouches[0].clientX,a=e.targetTouches[0].clientY;g=h&&d.toString()!=s().toString(),T=!(t>=v&&l>=t&&a>=f&&p>=a),T||g?removeClass(u,\"touched\"):addClass(u,\"touched\")}},y=function(){if(!C&&(C=!0,detach(e,\"touchmove\",w,!1),detach(e,\"touchend\",arguments.callee,!1),hasClass(u,\"touched\"))){var a=new Date-D>r&&!deviceInfo.deviceType.desktop();if(removeClass(u,\"touched\"),T||g||m||a)return;t||n(e,u)}},N=function(){detach(e,\"touchend\",N,!0),nextFrame(function(){m=!0,y()})};attach(e,\"touchcancel\",function(e){removeClass(u,\"touched\"),y(e)},!1),attach(e,\"touchmove\",w,!1),attach(e,\"touchend\",y,!1),attach(e,\"touchend\",N,!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(e){function t(e,t){return Math.abs(e)>Math.abs(t)?e>0?\"east\":\"west\":t>0?\"south\":\"north\"}function n(){r.removeEventListener(\"touchmove\",a),r.removeEventListener(\"touchend\",h)}function a(e){if(e.touches.length>1)n();else{var a=e.changedTouches[0].pageX-s,h=e.changedTouches[0].pageY-u;if(i=Math.max(Math.abs(a),Math.abs(h)),i>Math.min(50,v))if(null===c)c=t(a,h);else{var o=t(a,h);c!=o&&n()}}}function h(){n(),i>=v&&d(c,i)}function o(e){e.preventDefault(),1==e.touches.length&&(s=e.changedTouches[0].pageX,u=e.changedTouches[0].pageY,c=null,r.addEventListener(\"touchmove\",a,!1),r.addEventListener(\"touchend\",h,!1))}var s,u,c,i,r=e.target,d=e.swipe,v=e.minLength||50;window.addEventListener(\"touchstart\",noop,!1),r.addEventListener(\"touchstart\",o,!1)};\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;;\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)},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.track=function(e,t){this.screen&&!this._isAttributable&&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?setTimeout(e,0):(creative.runtimeParams.clickedThrough=1,this.track({name:\"firstClickThrough\"},e)),defer(creative.trackingCenter.batchFlush),creative.clickedThrough(this)};;\nfunction VideoContext(t,e,i){VideoContext.uberConstructor.call(this,t instanceof ActionContext?t.initiator:t,t&&t.userInitiated),this.file=e,this.url=e.getUrl(),this.label=i,this.source=null}inherit(VideoContext,ActionContext),VideoContext._eventNames=[\"videoDurationUpdate\",\"videoPlayAttempted\",\"videoPlayedSegment\",\"videoStart\",\"videoFirstQuartile\",\"videoMidpoint\",\"videoThirdQuartile\",\"videoComplete\"],VideoContext.prototype.registerSource=function(t){if(!t)throw\"Not a valid source of video events.\";this.source=t,VideoContext._eventNames.forEach(function(t){this.source.on(t,function(e){this.handleEvent(t,e)}.bind(this))}.bind(this))},VideoContext.prototype.handleEvent=function(t,e){this.track(extend(JSON.parse(JSON.stringify(e||{})),{name:t}))},VideoContext.prototype.track=function(t){if(\"videoPlayAttempted\"==t.name){var e=this.file.url?\"URL\":\"File\";extend(t,{sourceType:e,source:\"URL\"==e?this.file.url:this.file.blobHash,label:this.label})}VideoContext.uber.track.call(this,t)};;\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,creative.deviceMotionListenerAdded||(creative.deviceMotionListenerAdded=!0,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 s=null,n=Math.abs(t.x-this.prevSignal.x),h=Math.abs(t.y-this.prevSignal.y),a=Math.abs(t.z-this.prevSignal.z);if(90===Math.abs(creative.adapter.orientation)){var o=h;h=n,n=o}n>h&&n>a&&n>this.shakeThreshold?s=\"x\":h>n&&h>a&&h>this.shakeThreshold?s=\"y\":a>n&&a>h&&a>this.shakeThreshold&&(s=\"z\"),(n>this.shakeThreshold||h>this.shakeThreshold||a>this.shakeThreshold)&&this.emit(\"shake\",s)}this.prevSignal=t}};;\n!function(){\"use strict\";function t(t){for(var e in t)this[e]=t[e]}var e=function(t){var e=\"undefined\"!=typeof FontFace,i=/iP(?:ad|hone|od).*OS ([0-9_]+)/.exec(t),o=!!i&&parseInt(i[1],10)>=10,n=/^(?!.*(?:Android|Chrome)).*Version\\/(\\d+(?:\\.\\d+)*).*?Safari/.exec(t);if(n||o)return!1;var s=/Gecko.*Firefox\\/(\\d+)/.exec(t);return s?e&&parseInt(s[1],10)>46:e}(window.navigator.userAgent);t.prototype.getId=function(){return this.typefaceId||this.id},t.prototype.getBrowserCompatibleFontFamily=function(){var t=this.supportsStretch()&&this.stretch?this.family+\" \"+this.stretch:this.family;if(t.length>25){for(var e,i=5381,o=0,n=t.length;n>o;o++)e=t.charCodeAt(o),i=(i<<5)+i+e;return i.toString()}return t},t.prototype.setBaseUrl=function(t){this.baseUrl=t},t.prototype.isCustom=function(){return\"custom\"===this.provider},t.prototype.isGoogle=function(){return\"google\"===this.provider},t.prototype.isMonotype=function(){return\"monotype\"===this.provider},t.prototype.isSystem=function(){return\"system\"===this.provider},t.prototype.hasSubsetStringDefined=function(){return\"string\"==typeof this.subset&&this.subset.length>0},t.prototype.needsLoading=function(){return this.isMonotype()||this.isGoogle()||this.isCustom()},t.prototype.supportsStretch=function(){return this.isMonotype()||this.isCustom()},t.prototype.getCssProperties=function(){return{\"font-family\":this.needsLoading()?'\"'+this.getBrowserCompatibleFontFamily()+'\", Helvetica, sans-serif':this.getBrowserCompatibleFontFamily(),\"font-style\":this.style,\"font-weight\":this.weight}},t.prototype.getFileUrl=function(t){if(\"undefined\"!=typeof this.files&&\"undefined\"!=typeof this.files[t]){var e=this.getId();if(\"string\"!=typeof e)return this.baseUrl+this.files[t]+\".\"+t;var i=this.files[t]&&this.files[t].name||\"webfont\",o=this.baseUrl+e+\"/\"+i+\".\"+t;return this.hasSubsetStringDefined()&&(o+=\"?subset=\"+encodeURIComponent(this.subset)),o}},t.prototype.getStyleForVariation=function(){var t=/normal|italic|oblique/i.exec(this.style);return\"undefined\"!=typeof t?t[0]:void 0},t.prototype.getWeightForVariation=function(){var t=/normal|bold|([1-9])00/i.exec(this.weight);return\"undefined\"!=typeof t?t[0]:void 0},t.prototype.generateFontFace=function(){var t=\"\",e=this.getFileUrl(\"ttf\"),i=this.getFileUrl(\"woff\");return this.style&&this.weight&&(e||i)&&(t=\"@font-face {\",t+='font-family: \"'+this.getBrowserCompatibleFontFamily()+'\";',t+=\"font-style: \"+this.style+\";\",t+=\"font-weight: \"+this.weight+\";\",t+=\"src:\",i&&(t+='url(\"'+i+'\") format(\"woff\")'),e&&i&&(t+=\",\"),e&&(t+='url(\"'+e+'\") format(\"truetype\")'),t+=\";}\"),t},t.prototype.loadStyle=function(t){t=t||function(){};var i=this.getBrowserCompatibleFontFamily(),o=function(e){t(e||\"Failed to load font files.\")},n=function(){if(e){var n=\"300px\",s=this.style+\" \"+this.weight+\" \"+n+' \"'+i+'\"';document.fonts.load(s).then(function(e){1===e.length?t():o()},function(){o()})}else{if(\"undefined\"==typeof FontLoader)return void o(\"Font Loader is not initialized.\");FontLoader.watch(i,this.style,this.weight,t,o)}}.bind(this);if(this.isCustom()||this.isMonotype()){var s=\"font-style-manager\",r=document.getElementById(s);r||(r=document.createElement(\"style\"),r.id=s,document.getElementsByTagName(\"head\")[0].appendChild(r));var a=this.generateFontFace();if(!a)return void o(\"Unable to define style for font without specifying files, style and weight.\");var l=[].slice.apply(r.sheet.cssRules).some(function(t){var e=t.style.getPropertyValue(\"font-family\").replace(/^['\"](.+)['\"]$/,\"$1\");return e==this.getBrowserCompatibleFontFamily()&&t.style.getPropertyValue(\"font-style\")==this.style&&t.style.getPropertyValue(\"font-weight\")==this.weight}.bind(this));l||r.sheet.insertRule(a,r.sheet.cssRules.length),n()}else if(this.isGoogle()){var f=(\"https:\"===document.location.protocol?\"https\":\"http\")+\"://fonts.googleapis.com/css\",h=i.replace(/ /g,\"+\"),u=this.variation;if(!u){var d=\"\",p=\"\",y=this.getWeightForVariation();if(\"undefined\"!=typeof y){p=y,\"normal\"==p?p=400:\"bold\"==p&&(p=700);var c=this.getStyleForVariation();\"undefined\"!=typeof c&&\"italic\"==c&&(d=c)}u=p+d}u&&(h+=\":\"+u);var g=f+\"?family=\"+h;this.hasSubsetStringDefined()&&(g+=\"&text=\"+encodeURIComponent(this.subset));var m=[].slice.apply(document.getElementsByTagName(\"link\")).filter(function(t){return t.href===g})[0];if(m||(m=document.createElement(\"link\"),m.setAttribute(\"rel\",\"stylesheet\"),m.setAttribute(\"media\",\"all\"),m.setAttribute(\"href\",g)),e){var v=function(){m._finished=!0,n()};m._finished?n():(m.addEventListener(\"load\",v),m.addEventListener(\"error\",v))}else\"undefined\"!=typeof defer?defer(n,0,\"FontBase.loadStyle defer watchFont\"):setTimeout(n,0);m.parentNode||document.getElementsByTagName(\"head\")[0].appendChild(m)}else this.isSystem()?t():o(\"Invalid or unsupported provider.\")},Object.defineProperty(t,\"useCSSFontLoadingAPI\",{value:e}),window.FontBase=t}();;\nvar ScreenTransition={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\",t.style.backfaceVisibility=e.style.backfaceVisibility=\"hidden\",r.style.backfaceVisibility=s.style.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(){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=this._runOnce(o);once(r,\"transitionend\",l),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(){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(l,a+50)},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())}}};;\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\"],BaseCreativeUnit.prototype.awake=function(){BaseCreativeUnit.uber.awake.call(this),this._availableSize={width:0,height:0},this._isRendering=!1,this._engagementTracker=null},BaseCreativeUnit.prototype.createNode=function(){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);var e=\"only\"==(creative.experiments.get(\"ExtendedEngagement\")||{}).chosenVariant;return e&&(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.getRxStateObject=function(){return creative.adapter.getRxStateObject(this.name)},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.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.openPotentialUniversalOrAppLink(this._processURLParams(a),i))}.bind(this);if(a){var p=function(e){return e.indexOf(\"itunes.apple.com/us/app/\")>0},l=function(e){return 0===e.indexOf(\"market://details?id=\")};creative.adapter._stopAllMedia(),p(a)||l(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)))}e.screen&&creative.adapter.sendToEventMonitor(s,t.triggerId,e.screen.name,a||\"\"),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,p=function(t,r,a,i){if(c){var n={name:\"_openBrowserRefactor\",experiment:c,branch:t,logic:r,environment:a};i&&(n.redirect=i),e.track(n)}},l=function(e){if(c){var t=creative.adapter.trackingCenter,r=t._createTrackingEvent({name:\"redirectTrackingExperiment\"});r.redirect=e,t._pendingPixels.push(t._getTrackerUrl(r))}},d=function(e,t){return Math.floor(Math.random()*(t-e+1))+e};if(!a)return r();a=this._addUrlAppendage(a);var u=\"urlOpened\",v={delay:[0,100,500][d(0,2)],step:d(1,3),randId:randInt()};if(creative.adapter._stopAllMedia(),e.track({name:u,url:a,label:t.reportLabel}),e.trackClickThrough(),desktop()&&windows())!creative.adapter.canOpenUrlInSameWindow||i?(p(\"new-window\",\"flush-and-open\",\"desktop-windows\",v),l(v),creative.adapter.trackingCenter.flush(),s()):(p(\"same-window\",\"flush-then-open\",\"desktop-windows\",v),l(v),creative.adapter.trackingCenter.flush(s),defer(s,o));else if(\"on\"==c)!creative.adapter.canOpenUrlInSameWindow||i?(p(\"new-window\",\"flush-and-open\",\"all-except-desktop-windows\",v),l(v),creative.adapter.trackingCenter.flush(),s()):(p(\"same-window\",\"flush-then-open\",\"all-except-desktop-windows\",v),l(v),creative.adapter.trackingCenter.flush(s),defer(s,o));else if(!creative.adapter.canOpenUrlInSameWindow||i){p(\"new-window\",\"wrap+open\",\"all-except-desktop-windows\"),c&&e.track({name:\"_openBrowserRefactorFlushVsWrap\",trackingWith:\"wrap\"});var h=creative.wrapRedirectPageUrl(this._processURLParams(a));c&&(e.track({name:\"_openBrowserRefactorFlushVsWrap\",trackingWith:\"flush\"}),creative.adapter.trackingCenter.flush()),creative.adapter.openBrowser(h,i)}else p(\"same-window\",\"wrap+open\",\"all-except-desktop-windows\"),creative.adapter.openBrowser(creative.wrapRedirectPageUrl(this._processURLParams(a)),i);creative.adapter.sendToEventMonitor(u,t.triggerId,e.screen.name,a,t.reportLabel),r()},BaseCreativeUnit.prototype.facebookURLAction=function(e,t,r){if(!t.url)return r();creative.adapter._stopAllMedia(),e.track({name:\"facebookShareAttempt\",url:t.url,label:t.reportLabel}),e.trackClickThrough();var a=\"http://m.facebook.com/sharer.php?u=\"+encodeURIComponent(t.url);creative.adapter.openBrowser(creative.wrapRedirectPageUrl(a),creative.shouldClickThroughToNewWindow(e)),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=document.createElement(\"div\");a.className=\"celtra-display-image-overlay touchable\",a.style.backgroundImage=\"url(\"+t.file.getUrl()+\")\",this.unitDiv.appendChild(a),(t.file.meta.width>this.size.width||t.file.meta.height>this.size.height)&&(a.style.backgroundSize=\"contain\"),t.color&&(a.style.backgroundColor=t.color),attach(a,\"tap\",function(){a.parentNode.removeChild(a),r()},!1);var i=document.createElement(\"div\");i.className=\"celtra-back-button touchable \"+this.alignBackButtonHorizontal,a.appendChild(i)},BaseCreativeUnit.prototype.saveImageAction=function(e,t,r){function a(a,n){var o=a.getOriginalUrl(),c=a.name,p=a.blobHash;if(i(p),creative.adapter.canSaveImage())creative.adapter.trackingCenter.flush(function(){creative.adapter.saveImage(o,c,r);var a=n||c;creative.adapter.sendToEventMonitor(s,t.triggerId,e.screen.name,a,t.reportLabel)});else{var l=new SaveImageDialog(creative.adapter,creative.resourceUrl,o);l.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 p=c.url,l=p.split(\",\")[1];n(),postBlob(l,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=new VideoContext(e,t.file,t.reportLabel);i.track({engineType:\"html5\",name:\"videoPlayAttempted\",trackable:a,filename:t.file.name,userInitiated:e.consideredUserInitiatedByBrowser,startMuted:!1,videoPlayerMode:\"fullscreen\",videoPreset:null}),creative.adapter.playVideoInPlayer(i,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=creative.adapter.useFSVP;creative.adapter._stopAllMedia(),videoContext=new VideoContext(e,new File(t.url),t.reportLabel),videoContext.track({engineType:\"html5\",name:\"videoPlayAttempted\",trackable:a,filename:null,userInitiated:e.consideredUserInitiatedByBrowser,startMuted:!1,videoPlayerMode:\"fullscreen\",videoPreset:null}),creative.adapter.playVideoInPlayer(videoContext,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=function(e){return new RegExp(\"(^http(s)?://)|(^market://)\",\"i\").test(e)},i=function(){return new RegExp(\"^\\\\d+$\").test(t.appStoreUrl)?\"http://itunes.apple.com/us/app/keynote/id\"+t.appStoreUrl:(a(t.appStoreUrl)?\"\":\"http://\")+t.appStoreUrl},n=function(){return a(t.androidMarketAppId)?t.androidMarketAppId:\"market://details?id=\"+t.androidMarketAppId};creative.adapter._stopAllMedia();var o;if(creative.storeOpenedOverrideUrls[t.reportLabel]?o=creative.storeOpenedOverrideUrls[t.reportLabel]:ios()&&t.appStoreUrl?o=i():android()&&t.androidMarketAppId?o=n():desktop()&&(t.appStoreUrl||t.androidMarketAppId)&&(o=\"app://\"+encodeURIComponent(t.reportLabel)),o){var s=!ios(\"9\",null),c=\"storeOpened\",p=2,l=function(){creative.adapter.getApp(this._processURLParams(o))}.bind(this),d=function(){if(!--p&&s){l();var r={};t.appStoreUrl&&(r.appStoreUrl=i()),t.androidMarketAppId&&(r.androidMarketAppId=n()),creative.adapter.sendToEventMonitor(c,t.triggerId,e.screen.name,r,t.reportLabel)}}.bind(this);e.track({name:c,appUri:o,label:t.reportLabel},d),e.trackClickThrough(d),s||setTimeout(l,0)}r()},BaseCreativeUnit.prototype.callPhoneAction=function(e,t,r){function a(){--i||(creative.adapter.callPhone(t.number),creative.adapter.sendToEventMonitor(n,t.triggerId,e.screen.name,t.number,t.reportLabel))}if(!t.number)return r();creative.adapter._stopAllMedia();var i=2,n=\"phoneCalled\";e.track({name:n,number:t.number,label:t.reportLabel},a),e.trackClickThrough(a),r()},BaseCreativeUnit.prototype.answerSurveyQuestion=function(e,t,r){var a=[\"answerIds\",\"questionId\",\"surveyId\"],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(!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}),r()},BaseCreativeUnit.prototype.expandAction=function(){throw new Error(\"Expand action is not available for this ad format or creative unit\")},BaseCreativeUnit.prototype._assertAppearBeforeExpand=function(){this.hasAppearedAtLeastOnce||creative.adapter.trackingCenter.track({name:\"userError\",userErrorId:\"expandBeforeAppear\"})},BaseCreativeUnit.prototype.collapseAction=function(){throw new Error(\"Collapse action is not available for this ad format or creative unit\")},BaseCreativeUnit.prototype.dismissAction=function(){throw new Error(\"Dismiss action is not available for this ad format or creative unit\")},BaseCreativeUnit.prototype.findAll=function(){throw new Error(\"Not implemented!\")},BaseCreativeUnit.prototype.findByType=function(){throw new Error(\"Not implemented!\")},BaseCreativeUnit.prototype.find=function(e){var t=this.findAll(e);return t.length>0?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\",grid:\"Grid\",group:\"Group\",gyro:\"Gyro\",hotspot:\"Hotspot\",input:\"Input\",lighttable:\"LightTable\",map:\"Map\",transitions:\"Transitions\",mastervideo:\"MasterVideo\",nearby:\"Nearby\",painty:\"Painty\",pannable:\"Pannable\",particles:\"Particle\",picture:\"Picture\",puzzle:\"Puzzle\",quiz:\"Quiz\",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\"},n=function(e){return e=e.toLowerCase().replace(/\\W+/g,\"\"),e in t?t[e]:\"\"},o={findAll:function(e){function t(a){a.forEach(function(a){(\"undefined\"==typeof e||a.name==e)&&o.push(a),a.getNestedContainers().forEach(function(e){t(e.objects),n(e.scenes)})})}function n(t){t&&t.forEach(function(t){(\"undefined\"==typeof e||t.name==e)&&o.push(t)})}var o=[];return\"Screen\"==this.constructor.name?(t(this.objects),n(this.scenes)):\"function\"==typeof this.getNestedContainers&&this.getNestedContainers().forEach(function(e){t(e.objects),n(e.scenes)}),o},findByType:function(e){function t(i){i.forEach(function(i){i.constructor.name==n(e)&&a.push(i),i.getNestedContainers().forEach(function(e){t(e.objects),o(e.scenes)})})}function o(t){t&&t.forEach(function(t){t.constructor.name==n(e)&&a.push(t)})}var a=[];return\"undefined\"==typeof e?a:(\"Screen\"==this.constructor.name?(t(this.objects),o(this.scenes)):\"function\"==typeof this.getNestedContainers&&this.getNestedContainers().forEach(function(e){t(e.objects),o(e.scenes)}),a)},find:function(e){var t=this.findAll(e);return t.length>0?t[0]:null}};e.DiscoverableTrait=o}(window);;\nvar SaveImageDialog=function(t,i,e){this.adapter=t,this.resourceUrl=i,this.imageUrl=e,this.containerMinMargin=5,this.containerMinWidth=190,this.imageContainerTotalHMargin=40,this.imageContainerTotalVMargin=140,this.instructionOneLineWidth=250,this.instructionTwoLinesWidth=145,this._handleImageLoaded=this._handleImageLoaded.bind(this),this._resize=this._resize.bind(this)};SaveImageDialog.prototype.show=function(t){this.adapter.createPlacements({saveImageAction:{attachment:\"body\",positioning:\"screen\",type:\"layer\"}},function(){this.placement=this.adapter.placements.saveImageAction,this.placement.setZIndex(\"max\"),this.placement.setSize(\"100%\",\"100%\"),this.placement.setPosition(0,0),this.saveImageActionStyle=this.placement.createElement(\"link\"),this.saveImageActionStyle.rel=\"stylesheet\",this.saveImageActionStyle.type=\"text/css\",this.saveImageActionStyle.href=this.resourceUrl+\"runner/SaveImageDialog.css\",this.placement.getContainer().appendChild(this.saveImageActionStyle),this.overlay=this.placement.createElement(\"div\"),this.overlay.style.display=\"none\",this.overlay.className=\"celtra-save-image-action-overlay\",this.preloaderImage=this.placement.createElement(\"div\"),this.preloaderImage.className=\"celtra-save-image-action-preloader-image\",this.preloaderImage.style.backgroundImage=\"url(\"+this.resourceUrl+\"runner/clazzes/CreativeUnit/preloader.png)\",this.container=this.placement.createElement(\"div\"),this.container.className=\"celtra-save-image-action-container\",this.backButton=this.placement.createElement(\"div\"),this.backButton.style.backgroundImage=\"url(\"+this.resourceUrl+\"runner/clazzes/CreativeUnit/save-image-close-button.png)\",this.backButton.className=\"celtra-save-image-action-back-button\",this.title=this.placement.createElement(\"div\"),this.title.innerHTML=\"Save Image\",this.title.className=\"celtra-save-image-action-title\",this.titleLine1=this.placement.createElement(\"div\"),this.titleLine1.className=\"celtra-save-image-action-title-line-1\",this.titleLine2=this.placement.createElement(\"div\"),this.titleLine2.className=\"celtra-save-image-action-title-line-2\",this.imageContainer=this.placement.createElement(\"div\"),this.imageContainer.className=\"celtra-save-image-action-image-container\",this.image=this.placement.createElement(\"img\"),this.instruction=this.placement.createElement(\"div\"),this.instruction.style.backgroundImage=\"url(\"+this.resourceUrl+\"runner/clazzes/CreativeUnit/hold-to-save-icon.png)\",this.instruction.style.backgroundSize=\"21px 40px\",this.instruction.innerHTML=\"Tap & hold to save the image to your device.\",this.instruction.className=\"celtra-save-image-action-instruction\",this.image.onload=this._handleImageLoaded,this.image.src=this.imageUrl,this.container.appendChild(this.title),this.container.appendChild(this.titleLine1),this.container.appendChild(this.titleLine2),this.imageContainer.appendChild(this.image),this.container.appendChild(this.imageContainer),this.container.appendChild(this.instruction),this.container.appendChild(this.backButton),this.overlay.appendChild(this.preloaderImage),attach(this.backButton,\"touchend\",function(){this.adapter.destroyPlacement(\"saveImageAction\"),t()}.bind(this)),this.placement.populate(this.overlay,function(){this.placement.show()}.bind(this))}.bind(this))},SaveImageDialog.prototype._handleImageLoaded=function(){this._resize(),this.overlay.removeChild(this.preloaderImage),this.overlay.appendChild(this.container),this.placement.on(\"resized\",this._resize)},SaveImageDialog.prototype._resize=function(){var t,i,e=this.placement.getViewportGeometry(),a=e.width-2*this.containerMinMargin,n=e.height-2*this.containerMinMargin,s=a-this.imageContainerTotalHMargin,h=n-this.imageContainerTotalVMargin,r=s/h,l=this.image.naturalWidth/this.image.naturalHeight,o=this.image.naturalWidth>s,c=this.image.naturalHeight>h,g=this.containerMinMargin,m=this.containerMinMargin,d=0,p=0;if(o&&c){var u;t=s,i=h,l>r?(u=l/r*100,this.image.style.width=u+\"%\",this.image.style.height=\"100%\",d=-(u-100)/2):(u=r/l*100,this.image.style.width=\"100%\",this.image.style.height=u+\"%\",p=-((u-100)/2)*(i/t))}else if(o){var y=this.image.naturalWidth/s*100;d=-(y-100)/2,t=s,i=this.image.naturalHeight,this.image.style.width=y+\"%\",this.image.style.height=\"100%\",m=(e.height-i-this.imageContainerTotalVMargin)/2}else if(c){var v=this.image.naturalHeight/h*100,C=-(v-100)/2;t=this.image.naturalWidth,i=h,p=C*(i/t),this.image.style.width=\"100%\",this.image.style.height=v+\"%\",g=(e.width-t-this.imageContainerTotalHMargin)/2}else t=this.image.naturalWidth,i=this.image.naturalHeight,this.image.style.width=\"100%\",this.image.style.height=\"100%\",g=(e.width-t-this.imageContainerTotalHMargin)/2,m=(e.height-i-this.imageContainerTotalVMargin)/2;var I=t+this.imageContainerTotalHMargin,M=t+this.imageContainerTotalHMargin-this.containerMinWidth;if(0>M){var T=M/2;g+=T,this.imageContainer.style.left=19-T+\"px\",this.imageContainer.style.right=19-T+\"px\",I-=M}this.container.style.left=g+\"px\",this.container.style.right=g+\"px\",this.container.style.top=m+\"px\",this.container.style.bottom=m+\"px\",this.image.style.marginLeft=d+\"%\",this.image.style.marginTop=p+\"%\",I347||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 c=g;/\\-?(moz|webkit|o|ms)/.test(r.prefix)?g=90-c:c=90-g;var p=e.convertAngleToSideCorner(g),G=e.gradientOldSideCorner[p];a.webkitGradient=\"-webkit-gradient(linear, \"+G+\", \"+i+\")\",a.mozLinearGradient=\"-moz-linear-gradient(\"+c+\"deg, \"+n+\")\",a.msLinearGradient=\"-ms-linear-gradient(\"+c+\"deg, \"+n+\")\",a.oLinearGradient=\"-o-linear-gradient(\"+c+\"deg, \"+n+\")\",a.webkitLinearGradient=\"-webkit-linear-gradient(\"+c+\"deg, \"+n+\")\",a.linearGradient=\"linear-gradient(\"+g+\"deg, \"+n+\")\"}else if(\"radial\"===r.type){var h=parseInt(r.radialGradientWidth,10),m=parseInt(r.radialGradientHeight,10),S=parseInt(r.radialGradientXPosition,10),u=parseInt(r.radialGradientYPosition,10),b=h+\"% \"+m+\"%\",f=S+\"% \"+u+\"% \",x=b+\" at \"+f;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},t.Color=e}(window);;\n!function(){\"use strict\";var t={updateTextStyle:function(){},initializeFont:function(){this.font.setBaseUrl((creative.secure?creative.cachedApiUrl:creative.insecureCachedApiUrl)+\"fonts/\"),this.incrementLoadingCount(),this.loadFont(deferred(this.decrementLoadingCount.bind(this),0,\"TextStyleIntegrator.initializeFont deferred loadFont callback\")),this.updateTextStyle()},getFontSize:function(){return this.fontSize},getLineSpacing:function(){return this.lineSpacing},getLetterSpacing:function(){return this.letterSpacing},getTextShadowOffset:function(){var t={x:0,y:0};if(\"undefined\"!=typeof this.textShadow&&this.textShadow){var e=this.textShadowAngle*(Math.PI/180);t.x=Math.round(this.textShadowDistance*Math.cos(e)),t.y=Math.round(this.textShadowDistance*Math.sin(e))}return t},getTextShadowBlur:function(){return android(\"2\")&&this.textShadowBlur<1?1:this.textShadowBlur},applyTextStyle:function(t){var e=this.font.getCssProperties(),i={fontFamily:e[\"font-family\"],fontStyle:e[\"font-style\"],fontWeight:e[\"font-weight\"],color:this.textColor,direction:\"\",letterSpacing:\"\",textAlign:\"\",textDecoration:\"\",textShadow:\"\"};if(\"undefined\"!=typeof this.textDirection&&(i.direction=this.textDirection),\"undefined\"!=typeof this.textAlign&&(i.textAlign=this.textAlign),\"undefined\"!=typeof this.textDecoration&&(i.textDecoration=this.textDecoration),\"undefined\"!=typeof this.letterSpacing&&(i.letterSpacing=this.getLetterSpacing()+\"px\"),\"undefined\"!=typeof this.textShadow&&this.textShadow){var n=this.getTextShadowOffset();i.textShadow=n.x+\"px \"+n.y+\"px \"+this.getTextShadowBlur()+\"px \"+this.textShadowColor}extend(t,i)},applyTextSize:function(t){var e=this.getFontSize();this.scaleFont&&this.scaleBaseWidth>0&&\"undefined\"!=typeof this.scaleBaseHeight&&this.scaleBaseHeight>0?e=Math.min(e/(this.scaleBaseWidth/this.size.width),e/(this.scaleBaseHeight/this.size.height)):this.scaleFont&&this.scaleBaseWidth>0&&(e/=this.scaleBaseWidth/this.size.width);var i={fontSize:e+\"px\",lineHeight:\"\",paddingLeft:\"\",paddingRight:\"\"};if(\"undefined\"!=typeof this.lineSpacing&&(i.lineHeight=Math.max(1,this.getLineSpacing()+e)+\"px\"),\"undefined\"!=typeof this.scaleFont&&this.scaleFont){var n=this.getNaturalSize(),o=this.scaleBaseWidth/this.scaleBaseHeight,a=o*n.height,r=n.width-a;if(r>0)switch(this.textAlign){case\"center\":i.paddingRight=Math.round(r/2)+\"px\",i.paddingLeft=Math.round(r/2)+\"px\";break;case\"right\":i.paddingLeft=Math.round(r)+\"px\";break;default:i.paddingRight=Math.round(r)+\"px\"}}extend(t,i)},getFontLoader:function(t){t=t||noop,!this.font.needsLoading()||FontBase.useCSSFontLoadingAPI||\"undefined\"!=typeof FontLoader?t():loadJS(creative.resourceUrl+\"runner-min/FontLoader.js\",t)},loadFont:function(t){t=t||noop;var e={fontFamily:this.font.family,fontProvider:this.font.provider,fontStretch:this.font.stretch||\"\",fontStyle:this.font.style,fontWeight:this.font.weight,fontTtfUrl:this.font.getFileUrl(\"ttf\")||\"\",fontWoffUrl:this.font.getFileUrl(\"woff\")||\"\"},i=creative.perf.start(\"TextStyleIntegrator.loadFont\",e);this.getFontLoader(function(){var n=creative.perf.start(\"TextStyleIntegrator.loadStyle\",e);this.font.loadStyle(function(o){e.errorMessage=o||\"\",n.end(),i.end(),!o&&this.font.isMonotype()&&this.trackMonotypeUsage(),t(o)}.bind(this))}.bind(this))},setFont:function(t){var e=[\"provider\",\"family\",\"style\",\"weight\",\"stretch\",\"variation\",\"files\",\"baseUrl\"],i={};e.forEach(function(e){this.font.localId&&(i[e]=\"files\"===e?{}:this.font[e]),\"undefined\"!=typeof t[e]&&(i[e]=t[e])}.bind(this)),-1===[\"custom\",\"google\",\"web\"].indexOf(i.provider)&&(i.provider=\"custom\"),this.font.localId?(\"custom\"===i.provider&&i.family===this.font.family&&(i.family=this.font.family+\" (custom)\"),this.font=new FontBase(i)):extend(this.font,i),creative.track({name:\"retiredFeatureUsed\",featureType:\"apifunction\",featureName:\"TextStyleIntegrator.setFont\"})},trackMonotypeUsage:function(){if(creative.runtimeParams.monotypeProjectId&&!creative.runtimeParams.monotypeUsageReported){creative.runtimeParams.monotypeUsageReported=1;var t=document.createElement(\"img\");t.src=(creative.runtimeParams.secure?\"https\":\"http\")+\"://fast.fonts.net/t/1.png?apiType=css&projectid=\"+creative.runtimeParams.monotypeProjectId,creative.aggregatorTracking.trackAggregator(\"monotypeUsageReported\",{monotypeProjectId:creative.runtimeParams.monotypeProjectId,creativeId:creative.id})}}};window.TextStyleIntegrator=t}();;\n!function(e){var o=Date.now||function(){return+new Date},t=60,_=1e3,i={},l=1;e.core?core.effect||(core.effect={}):e.core={effect:{}},core.effect.Animate={requestAnimationFrame:function(){var o=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame,t=!!o;if(o&&!/requestAnimationFrame\\(\\)\\s*\\{\\s*\\[native code\\]\\s*\\}/i.test(o.toString())&&(t=!1),t)return function(e,t){o(e,t)};var _=60,i={},l=0,n=1,r=null,a=+new Date;return function(e){var o=n++;return i[o]=e,l++,null===r&&(r=setInterval(function(){var e=+new Date,o=i;i={},l=0;for(var t in o)o.hasOwnProperty(t)&&(o[t](e),a=e);e-a>2500&&(clearInterval(r),r=null)},1e3/_)),o}}(),stop:function(e){var o=null!=i[e];return o&&(i[e]=null),o},isRunning:function(e){return null!=i[e]},start:function(e,n,r,a,c,s){var p=o(),h=p,f=0,m=0,u=l++;if(s||(s=document.body),u%20===0){var g={};for(var v in i)g[v]=!0;i=g}var d=function(l){var g=l!==!0,v=o();if(!i[u]||n&&!n(u))return i[u]=null,void(r&&r(t-m/((v-p)/_),u,!1));if(g)for(var T=Math.round((v-h)/(_/t))-1,S=0;S1&&(f=1));var L=c?c(f):f;e(L,v,g)!==!1&&1!==f||!g?g&&(h=v,core.effect.Animate.requestAnimationFrame(d,s)):(i[u]=null,r&&r(t-m/((v-p)/_),u,1===f||null==a))};return i[u]=!0,core.effect.Animate.requestAnimationFrame(d,s),u}}}(window);var ZyngaScroller;!function(){var e=function(){};ZyngaScroller=function(o,t){this.__callback=o,this.options={scrollingX:!0,scrollingY:!0,animating:!0,animationDuration:250,bouncing:!0,locking:!0,paging:!1,snapping:!1,zooming:!1,minZoom:.5,maxZoom:3,speedMultiplier:1,scrollingComplete:e,penetrationDeceleration:.03,penetrationAcceleration:.08};for(var _ in t)this.options[_]=t[_]};var o=function(e){return Math.pow(e-1,3)+1},t=function(e){return(e/=.5)<1?.5*Math.pow(e,3):.5*(Math.pow(e-2,3)+2)},_={__isSingleTouch:!1,__isTracking:!1,__didDecelerationComplete:!1,__isGesturing:!1,__isDragging:!1,__isDecelerating:!1,__isAnimating:!1,__clientLeft:0,__clientTop:0,__clientWidth:0,__clientHeight:0,__contentWidth:0,__contentHeight:0,__snapWidth:100,__snapHeight:100,__refreshHeight:null,__refreshActive:!1,__refreshActivate:null,__refreshDeactivate:null,__refreshStart:null,__zoomLevel:1,__scrollLeft:0,__scrollTop:0,__maxScrollLeft:0,__maxScrollTop:0,__scheduledLeft:0,__scheduledTop:0,__scheduledZoom:0,__lastTouchLeft:null,__lastTouchTop:null,__lastTouchMove:null,__positions:null,__minDecelerationScrollLeft:null,__minDecelerationScrollTop:null,__maxDecelerationScrollLeft:null,__maxDecelerationScrollTop:null,__decelerationVelocityX:null,__decelerationVelocityY:null,setDimensions:function(e,o,t,_){var i=this;e===+e&&(i.__clientWidth=e),o===+o&&(i.__clientHeight=o),t===+t&&(i.__contentWidth=t),_===+_&&(i.__contentHeight=_),i.__computeScrollMax(),i.scrollTo(i.__scrollLeft,i.__scrollTop,!0)},setPosition:function(e,o){var t=this;t.__clientLeft=e||0,t.__clientTop=o||0},setSnapSize:function(e,o){var t=this;t.__snapWidth=e,t.__snapHeight=o},activatePullToRefresh:function(e,o,t,_){var i=this;i.__refreshHeight=e,i.__refreshActivate=o,i.__refreshDeactivate=t,i.__refreshStart=_},triggerPullToRefresh:function(){this.__publish(this.__scrollLeft,-this.__refreshHeight,this.__zoomLevel,!0),this.__refreshStart&&this.__refreshStart()},finishPullToRefresh:function(){var e=this;e.__refreshActive=!1,e.__refreshDeactivate&&e.__refreshDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)},getValues:function(){var e=this;return{left:e.__scrollLeft,top:e.__scrollTop,zoom:e.__zoomLevel}},getScrollMax:function(){var e=this;return{left:e.__maxScrollLeft,top:e.__maxScrollTop}},zoomTo:function(e,o,t,_,i){var l=this;if(!l.options.zooming)throw new Error(\"Zooming is not enabled!\");i&&(l.__zoomComplete=i),l.__isDecelerating&&(core.effect.Animate.stop(l.__isDecelerating),l.__isDecelerating=!1);var n=l.__zoomLevel;null==t&&(t=l.__clientWidth/2),null==_&&(_=l.__clientHeight/2),e=Math.max(Math.min(e,l.options.maxZoom),l.options.minZoom),l.__computeScrollMax(e);var r=(t+l.__scrollLeft)*e/n-t,a=(_+l.__scrollTop)*e/n-_;r>l.__maxScrollLeft?r=l.__maxScrollLeft:0>r&&(r=0),a>l.__maxScrollTop?a=l.__maxScrollTop:0>a&&(a=0),l.__publish(r,a,e,o)},zoomBy:function(e,o,t,_,i){var l=this;l.zoomTo(l.__zoomLevel*e,o,t,_,i)},scrollTo:function(e,o,t,_){var i=this;if(i.__isDecelerating&&(core.effect.Animate.stop(i.__isDecelerating),i.__isDecelerating=!1),null!=_&&_!==i.__zoomLevel){if(!i.options.zooming)throw new Error(\"Zooming is not enabled!\");e*=_,o*=_,i.__computeScrollMax(_)}else _=i.__zoomLevel;i.options.scrollingX?i.options.paging?e=Math.round(e/i.__clientWidth)*i.__clientWidth:i.options.snapping&&(e=Math.round(e/i.__snapWidth)*i.__snapWidth):e=i.__scrollLeft,i.options.scrollingY?i.options.paging?o=Math.round(o/i.__clientHeight)*i.__clientHeight:i.options.snapping&&(o=Math.round(o/i.__snapHeight)*i.__snapHeight):o=i.__scrollTop,e=Math.max(Math.min(i.__maxScrollLeft,e),0),o=Math.max(Math.min(i.__maxScrollTop,o),0),e===i.__scrollLeft&&o===i.__scrollTop&&(t=!1),i.__publish(e,o,_,t)},scrollBy:function(e,o,t){var _=this,i=_.__isAnimating?_.__scheduledLeft:_.__scrollLeft,l=_.__isAnimating?_.__scheduledTop:_.__scrollTop;_.scrollTo(i+(e||0),l+(o||0),t)},doMouseZoom:function(e,o,t,_){var i=this,l=e>0?.97:1.03;return i.zoomTo(i.__zoomLevel*l,!1,t-i.__clientLeft,_-i.__clientTop)},doTouchStart:function(e,o){if(null==e.length)throw new Error(\"Invalid touch list: \"+e);if(o instanceof Date&&(o=o.valueOf()),\"number\"!=typeof o)throw new Error(\"Invalid timestamp value: \"+o);var t=this;t.__interruptedAnimation=!0,t.__isDecelerating&&(core.effect.Animate.stop(t.__isDecelerating),t.__isDecelerating=!1,t.__interruptedAnimation=!0),t.__isAnimating&&(core.effect.Animate.stop(t.__isAnimating),t.__isAnimating=!1,t.__interruptedAnimation=!0);var _,i,l=1===e.length;l?(_=e[0].pageX,i=e[0].pageY):(_=Math.abs(e[0].pageX+e[1].pageX)/2,i=Math.abs(e[0].pageY+e[1].pageY)/2),t.__initialTouchLeft=_,t.__initialTouchTop=i,t.__zoomLevelStart=t.__zoomLevel,t.__lastTouchLeft=_,t.__lastTouchTop=i,t.__lastTouchMove=o,t.__lastScale=1,t.__enableScrollX=!l&&t.options.scrollingX,t.__enableScrollY=!l&&t.options.scrollingY,t.__isTracking=!0,t.__didDecelerationComplete=!1,t.__isDragging=!l,t.__isSingleTouch=l,t.__positions=[]},doTouchMove:function(e,o,t){if(null==e.length)throw new Error(\"Invalid touch list: \"+e);if(o instanceof Date&&(o=o.valueOf()),\"number\"!=typeof o)throw new Error(\"Invalid timestamp value: \"+o);var _=this;if(_.__isTracking){var i,l;2===e.length?(i=Math.abs(e[0].pageX+e[1].pageX)/2,l=Math.abs(e[0].pageY+e[1].pageY)/2):(i=e[0].pageX,l=e[0].pageY);var n=_.__positions;if(_.__isDragging){var r=i-_.__lastTouchLeft,a=l-_.__lastTouchTop,c=_.__scrollLeft,s=_.__scrollTop,p=_.__zoomLevel;if(null!=t&&_.options.zooming){var h=p;if(p=p/_.__lastScale*t,p=Math.max(Math.min(p,_.options.maxZoom),_.options.minZoom),h!==p){var f=i-_.__clientLeft,m=l-_.__clientTop;c=(f+c)*p/h-f,s=(m+s)*p/h-m,_.__computeScrollMax(p)}}if(_.__enableScrollX){c-=r*this.options.speedMultiplier;var u=_.__maxScrollLeft;(c>u||0>c)&&(_.options.bouncing?c+=r/2*this.options.speedMultiplier:c=c>u?u:0)}if(_.__enableScrollY){s-=a*this.options.speedMultiplier;var g=_.__maxScrollTop;(s>g||0>s)&&(_.options.bouncing?(s+=a/2*this.options.speedMultiplier,_.__enableScrollX||null==_.__refreshHeight||(!_.__refreshActive&&s<=-_.__refreshHeight?(_.__refreshActive=!0,_.__refreshActivate&&_.__refreshActivate()):_.__refreshActive&&s>-_.__refreshHeight&&(_.__refreshActive=!1,_.__refreshDeactivate&&_.__refreshDeactivate()))):s=s>g?g:0)}n.length>60&&n.splice(0,30),n.push(c,s,o),_.__publish(c,s,p)}else{var v=_.options.locking?3:0,d=5,T=Math.abs(i-_.__initialTouchLeft),S=Math.abs(l-_.__initialTouchTop);_.__enableScrollX=_.options.scrollingX&&T>=v,_.__enableScrollY=_.options.scrollingY&&S>=v,n.push(_.__scrollLeft,_.__scrollTop,o),_.__isDragging=(_.__enableScrollX||_.__enableScrollY)&&(T>=d||S>=d),_.__isDragging&&(_.__interruptedAnimation=!1)}_.__lastTouchLeft=i,_.__lastTouchTop=l,_.__lastTouchMove=o,_.__lastScale=t}},doTouchEnd:function(e){if(e instanceof Date&&(e=e.valueOf()),\"number\"!=typeof e)throw new Error(\"Invalid timestamp value: \"+e);var o=this;if(o.__isTracking){if(o.__isTracking=!1,o.__isDragging)if(o.__isDragging=!1,o.__isSingleTouch&&o.options.animating&&e-o.__lastTouchMove<=100){for(var t=o.__positions,_=t.length-1,i=_,l=_;l>0&&t[l]>o.__lastTouchMove-100;l-=3)i=l;if(i!==_){var n=t[_]-t[i],r=o.__scrollLeft-t[i-2],a=o.__scrollTop-t[i-1];o.__decelerationVelocityX=r/n*(1e3/60),o.__decelerationVelocityY=a/n*(1e3/60);var c=o.options.paging||o.options.snapping?4:1;(Math.abs(o.__decelerationVelocityX)>c||Math.abs(o.__decelerationVelocityY)>c)&&(o.__refreshActive||o.__startDeceleration(e))}else o.options.scrollingComplete()}else e-o.__lastTouchMove>100&&o.options.scrollingComplete();o.__isDecelerating||(o.__refreshActive&&o.__refreshStart?(o.__publish(o.__scrollLeft,-o.__refreshHeight,o.__zoomLevel,!0),o.__refreshStart&&o.__refreshStart()):((o.__interruptedAnimation||o.__isDragging)&&o.options.scrollingComplete(),o.scrollTo(o.__scrollLeft,o.__scrollTop,!0,o.__zoomLevel),o.__refreshActive&&(o.__refreshActive=!1,o.__refreshDeactivate&&o.__refreshDeactivate()))),o.__positions.length=0}},__publish:function(e,_,i,l){var n=this,r=n.__isAnimating;if(r&&(core.effect.Animate.stop(r),n.__isAnimating=!1),l&&n.options.animating){n.__scheduledLeft=e,n.__scheduledTop=_,n.__scheduledZoom=i;var a=n.__scrollLeft,c=n.__scrollTop,s=n.__zoomLevel,p=e-a,h=_-c,f=i-s,m=function(e,o,t){t&&(n.__scrollLeft=a+p*e,n.__scrollTop=c+h*e,n.__zoomLevel=s+f*e,n.__callback&&n.__callback(n.__scrollLeft,n.__scrollTop,n.__zoomLevel))},u=function(e){return n.__isAnimating===e},g=function(e,o,t){o===n.__isAnimating&&(n.__isAnimating=!1),(n.__didDecelerationComplete||t)&&n.options.scrollingComplete(),n.options.zooming&&(n.__computeScrollMax(),n.__zoomComplete&&(n.__zoomComplete(),n.__zoomComplete=null))};n.__isAnimating=core.effect.Animate.start(m,u,g,n.options.animationDuration,r?o:t)}else n.__scheduledLeft=n.__scrollLeft=e,n.__scheduledTop=n.__scrollTop=_,n.__scheduledZoom=n.__zoomLevel=i,n.__callback&&n.__callback(e,_,i),n.options.zooming&&(n.__computeScrollMax(),n.__zoomComplete&&(n.__zoomComplete(),n.__zoomComplete=null))},__computeScrollMax:function(e){var o=this;null==e&&(e=o.__zoomLevel),o.__maxScrollLeft=Math.max(o.__contentWidth*e-o.__clientWidth,0),o.__maxScrollTop=Math.max(o.__contentHeight*e-o.__clientHeight,0)},__startDeceleration:function(){var e=this;if(e.options.paging){var o=Math.max(Math.min(e.__scrollLeft,e.__maxScrollLeft),0),t=Math.max(Math.min(e.__scrollTop,e.__maxScrollTop),0),_=e.__clientWidth,i=e.__clientHeight;e.__minDecelerationScrollLeft=Math.floor(o/_)*_,e.__minDecelerationScrollTop=Math.floor(t/i)*i,e.__maxDecelerationScrollLeft=Math.ceil(o/_)*_,e.__maxDecelerationScrollTop=Math.ceil(t/i)*i}else e.__minDecelerationScrollLeft=0,e.__minDecelerationScrollTop=0,e.__maxDecelerationScrollLeft=e.__maxScrollLeft,e.__maxDecelerationScrollTop=e.__maxScrollTop;var l=function(o,t,_){e.__stepThroughDeceleration(_)},n=e.options.snapping?4:.1,r=function(){var o=Math.abs(e.__decelerationVelocityX)>=n||Math.abs(e.__decelerationVelocityY)>=n;return o||(e.__didDecelerationComplete=!0),o},a=function(){e.__isDecelerating=!1,e.__didDecelerationComplete&&e.options.scrollingComplete(),e.scrollTo(e.__scrollLeft,e.__scrollTop,e.options.snapping)};e.__isDecelerating=core.effect.Animate.start(l,r,a)},__stepThroughDeceleration:function(e){var o=this,t=o.__scrollLeft+o.__decelerationVelocityX,_=o.__scrollTop+o.__decelerationVelocityY;if(!o.options.bouncing){var i=Math.max(Math.min(o.__maxDecelerationScrollLeft,t),o.__minDecelerationScrollLeft);i!==t&&(t=i,o.__decelerationVelocityX=0);var l=Math.max(Math.min(o.__maxDecelerationScrollTop,_),o.__minDecelerationScrollTop);l!==_&&(_=l,o.__decelerationVelocityY=0)}if(e?o.__publish(t,_,o.__zoomLevel):(o.__scrollLeft=t,o.__scrollTop=_),!o.options.paging){var n=.95;o.__decelerationVelocityX*=n,o.__decelerationVelocityY*=n}if(o.options.bouncing){var r=0,a=0,c=o.options.penetrationDeceleration,s=o.options.penetrationAcceleration;to.__maxDecelerationScrollLeft&&(r=o.__maxDecelerationScrollLeft-t),_o.__maxDecelerationScrollTop&&(a=o.__maxDecelerationScrollTop-_),0!==r&&(r*o.__decelerationVelocityX<=0?o.__decelerationVelocityX+=r*c:o.__decelerationVelocityX=r*s),0!==a&&(a*o.__decelerationVelocityY<=0?o.__decelerationVelocityY+=a*c:o.__decelerationVelocityY=a*s)}}};for(var i in _)ZyngaScroller.prototype[i]=_[i]}();;\nfunction Scroller(t,i,o){this.container=t,this.list=i,this.options=o||{},this._handleTouchStart=this._handleTouchStart.bind(this),this._handleTouchMove=this._handleTouchMove.bind(this),this._handleTouchEnd=this._handleTouchEnd.bind(this),this._handleScroll=this._handleScroll.bind(this),this.silentScrolling=!1,this.zyngaScroller=new ZyngaScroller(this._handleScroll,{scrollingX:\"vertical\"===this.options.direction?!1:!0,scrollingY:\"horizontal\"===this.options.direction?!1:!0,bouncing:!!this.options.bouncing,animating:!!this.options.animating,locking:!!this.options.locking,snapping:!!this.options.snapping,animationDuration:\"undefined\"!=typeof this.options.animationDuration?this.options.animationDuration:250,scrollingComplete:deferred(this.emits(\"scrollingEnd\"))}),this.setEasing(\"undefined\"==typeof this.options.easing?!0:this.options.easing),this.redraw()}extend(Scroller.prototype,EventEmitter),Scroller._owner=\"celtra\",Scroller.prototype._handleScroll=function(t,i){t=isNaN(t)?0:t,i=isNaN(i)?0:i;var o=this.getMaxScroll();this.currentPosition={left:t,top:i,leftPercent:o.left?t/o.left:0,topPercent:o.top?i/o.top:0},celtra.styler.css(this.list,\"transform\",ScreenObject.supports3d?\"translate3d(\"+-t+\"px, \"+-i+\"px, 0)\":\"translate(\"+-t+\"px, \"+-i+\"px)\"),this.scrollbars&&(this.currentPosition.sbTop=this.currentPosition.top/(this.list.size.height-this.container.size.height)*(this.container.size.height-parseInt(this.scrollbars.verticalStyle.height,10)),this.currentPosition.sbLeft=this.currentPosition.left/(this.list.size.width-this.container.size.width)*(this.container.size.width-parseInt(this.scrollbars.horizontalStyle.width,10)),this.currentPosition.sbTopPercent=this.currentPosition.sbTop/(this.container.size.height-parseInt(this.scrollbars.verticalStyle.height,10)),this.currentPosition.sbLeftPercent=this.currentPosition.sbLeft/(this.container.size.width-parseInt(this.scrollbars.horizontalStyle.width,10)),this._renderScrollbars(this.currentPosition.sbLeft,this.currentPosition.sbTop)),this.silentScrolling||this.emit(\"scrolling\",this.currentPosition)},Scroller.prototype._handleTouchStart=function(t){this.zyngaScroller.doTouchStart(t.touches,t.timeStamp),this.emit(\"scrollingStart\")},Scroller.prototype._handleTouchMove=function(t){this.zyngaScroller.doTouchMove(t.touches,t.timeStamp)},Scroller.prototype._handleTouchEnd=function(t){this.zyngaScroller.doTouchEnd(t.timeStamp)},Scroller.prototype._createScrollbars=function(){var t=document.createElement(\"div\");addClass(t,\"celtra-vertical-scrollbar \"+this.options.scrollbarPosition||\"none\"),this.container.appendChild(t);var i=document.createElement(\"div\");t.appendChild(i),t.style.height=Math.round(this.container.size.height/this.list.size.height*this.container.size.height)+\"px\",t.style.backgroundColor=this.options.scrollbarColor,t.style.display=this.list.size.height<=this.container.size.height?\"none\":\"block\";var o=document.createElement(\"div\");addClass(o,\"celtra-horizontal-scrollbar \"+this.options.scrollbarPosition||\"none\"),this.container.appendChild(o);var e=document.createElement(\"div\");o.appendChild(e),o.style.width=Math.round(this.container.size.width/this.list.size.width*this.container.size.width)+\"px\",o.style.backgroundColor=this.options.scrollbarColor,o.style.display=this.list.size.width<=this.container.size.width?\"none\":\"block\",this.scrollbars={vertical:t,horizontal:o,verticalStyle:t.style,horizontalStyle:o.style}},Scroller.prototype.scrollTo=function(t,i,o,e,s,n){this._scroll(\"scrollTo\",{left:t,top:i,animate:o,duration:e,easing:s,callback:n})},Scroller.prototype.scrollBy=function(t,i,o,e,s,n){this._scroll(\"scrollBy\",{left:t,top:i,animate:o,duration:e,easing:s,callback:n})},Scroller.prototype._scroll=function(t,i){i.animate&&(\"number\"==typeof i.duration?this._setAnimationDuration(i.duration):\"boolean\"==typeof i.duration&&(i.easing=i.duration),\"boolean\"==typeof i.easing&&this.setEasing(i.easing)),this.once(\"scrollingEnd\",function(){\"function\"==typeof i.callback&&i.callback()}),this.zyngaScroller[t](i.left,i.top,i.animate),this.emit(\"scrollingStart\")},Scroller.prototype.getMaxScroll=function(){return{left:this.zyngaScroller.__maxScrollLeft,top:this.zyngaScroller.__maxScrollTop}},Scroller.prototype.getCurrentScroll=function(){return this.currentPosition},Scroller.prototype._setAnimationDuration=function(t){this.zyngaScroller.options.animationDuration=t},Scroller.prototype.setEasing=function(t){this.options.easing=t,this.zyngaScroller.__publish=function(i,o,e,s){var n=this,r=function(t){return Math.pow(t-1,3)+1},l=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},a=n.__isAnimating;if(a&&(core.effect.Animate.stop(a),n.__isAnimating=!1),s&&n.options.animating){n.__scheduledLeft=i,n.__scheduledTop=o,n.__scheduledZoom=e;var h=n.__scrollLeft,c=n.__scrollTop,p=n.__zoomLevel,d=i-h,u=o-c,_=e-p,g=function(t,i,o){o&&(n.__scrollLeft=h+d*t,n.__scrollTop=c+u*t,n.__zoomLevel=p+_*t,n.__callback&&n.__callback(n.__scrollLeft,n.__scrollTop,n.__zoomLevel))},S=function(t){return n.__isAnimating===t},z=function(t,i,o){i===n.__isAnimating&&(n.__isAnimating=!1),(n.__didDecelerationComplete||o)&&n.options.scrollingComplete(),n.options.zooming&&(n.__computeScrollMax(),n.__zoomComplete&&(n.__zoomComplete(),n.__zoomComplete=null))};n.__isAnimating=t?core.effect.Animate.start(g,S,z,n.options.animationDuration,a?r:l):core.effect.Animate.start(g,S,z,n.options.animationDuration)}else n.__scheduledLeft=n.__scrollLeft=i,n.__scheduledTop=n.__scrollTop=o,n.__scheduledZoom=n.__zoomLevel=e,n.__callback&&n.__callback(i,o,e),n.options.zooming&&(n.__computeScrollMax(),n.__zoomComplete&&(n.__zoomComplete(),n.__zoomComplete=null))}},Scroller.prototype.redraw=function(){this.container.size={width:this.container.offsetWidth,height:this.container.offsetHeight},this.list.size={width:this.list.offsetWidth,height:this.list.offsetHeight},this.zyngaScroller.setDimensions(this.container.size.width,this.container.size.height,this.list.size.width,this.list.size.height),this.options.snapping&&this._setSnapSize(this.container.size.width,this.container.size.height);var t=this.getMaxScroll();this.zyngaScroller.scrollTo(t.left*this.currentPosition.leftPercent,t.top*this.currentPosition.topPercent,!1),this.scrollbars?(this.scrollbars.verticalStyle.height=Math.round(this.container.size.height/this.list.size.height*this.container.size.height)+\"px\",this.scrollbars.horizontalStyle.width=Math.round(this.container.size.width/this.list.size.width*this.container.size.width)+\"px\",this.currentPosition.sbTop=(this.container.size.height-parseInt(this.scrollbars.verticalStyle.height,10))*this.currentPosition.sbTopPercent,this.currentPosition.sbLeft=(this.container.size.width-parseInt(this.scrollbars.horizontalStyle.width,10))*this.currentPosition.sbLeftPercent,this._renderScrollbars(this.currentPosition.sbLeft,this.currentPosition.sbTop)):(\"outer\"===this.options.scrollbarPosition||\"inner\"===this.options.scrollbarPosition)&&this._createScrollbars()},Scroller.prototype._renderScrollbars=function(t,i){ScreenObject.allowPositioningAndSizingUsingTransforms?(celtra.styler.css(this.scrollbars.vertical,\"transform\",ScreenObject.supports3d?\"translate3d(0, \"+i+\"px, 0)\":\"translate(0, \"+i+\"px)\"),celtra.styler.css(this.scrollbars.horizontal,\"transform\",ScreenObject.supports3d?\"translate3d(\"+t+\"px, 0, 0)\":\"translate(\"+t+\"px, 0)\")):(this.scrollbars.verticalStyle.top=i+\"px\",this.scrollbars.horizontalStyle.left=t+\"px\"),this.container.size.height>=this.list.size.height?(this.scrollbars.verticalStyle.display=\"none\",removeClass(this.container,\"vertical-scrollbar\")):(this.scrollbars.verticalStyle.display=\"block\",addClass(this.container,\"vertical-scrollbar\")),this.container.size.width>=this.list.size.width?(this.scrollbars.horizontalStyle.display=\"none\",removeClass(this.container,\"horizontal-scrollbar\")):(this.scrollbars.horizontalStyle.display=\"block\",addClass(this.container,\"horizontal-scrollbar\"))},Scroller.prototype._setSnapSize=function(t,i){this.zyngaScroller.setSnapSize(t,i)};;\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 \"+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 l=p.start(\"Creative.new\"),v=extend({adapter:a,runtimeParams:t||{},urlOpenedOverrideUrls:s,urlOpenedUrlAppendage:d,clickThroughDestinationUrl:m,storeOpenedOverrideUrls:u,macros:c},o);if(\"InstaAdHtml\"!==e.clazz){var f=p.start(\"Creative.unfreeze\");e=Freezer.unfreeze(e,window,v),f.end()}return e.instantiation=randInt(),e.batcher=new Batcher,e.trackingCenter=r,e.universalInteractionId=\"\",e.aggregatorTracking=n,e.experiments=i,e.perf=p,e.platformAdvId=t.platformAdvId,e.platformAdvIdTrackingLimited=t.platformAdvIdTrackingLimited,\"InstaAdHtml\"===e.clazz&&(e.adapter=a,e.runtimeParams=t||{},e.urlOpenedOverrideUrls=s,e.urlOpenedUrlAppendage=d,e.clickThroughDestinationUrl=m,e.storeOpenedOverrideUrls=u,e.macros=c,extend(this,e),e=this),\"undefined\"!=typeof a&&null!==a&&(a.openBrowserSameWindowInHostileIFrame=function(e){window.top.location.href=e}),l.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}},dataURIsEnabled:{enumerable:!1,get:function(){return 1==this.runtimeParams.dataURIsEnabled||\"treatment\"===(this.experiments.get(\"UseDataURIsGlobally\")||{}).chosenVariant}},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)}):(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){var r=\"only\"==(creative.experiments.get(\"ExtendedEngagement\")||{}).chosenVariant;r&&[\"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(){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},r),creative.adapter.sendToEventMonitor(n,t.triggerId,e.screen.name,null,t.name)},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,r=\"Desktop\"==creative.intendedDeviceType;t=[\"same\",\"new\"].indexOf(this.runtimeParams.preferredClickThroughWindow)>=0?this.runtimeParams.preferredClickThroughWindow:r?\"new\":\"same\";var n=e&&e.inUserInitiatedIteration;return\"new\"==t&&(n||r)};;\nfunction ExpandableBanner(){}inherit(ExpandableBanner,Creative),ExpandableBanner.toString=function(){return\"[Clazz ExpandableBanner]\"},ExpandableBanner.prototype.toString=function(){return\"[ExpandableBanner \"+this.name+\"]\"},ExpandableBanner.prototype.awake=function(){ExpandableBanner.uber.awake.call(this),this.adapter.wrapRedirectPageUrl=this.wrapRedirectPageUrl.bind(this),this.adapter.getModalUrl=function(e){return creative.getPageUrl(e?e:\"modal.html\")}.bind(this),this.units.banner.expandAction=function(e,a,n){this._assertAppearBeforeExpand(),\"undefined\"!=typeof a.destinationPage&&null!==a.destinationPage&&(creative.runtimeParams.goToPageAfterExpand=a.destinationPage),e.track({name:\"expandRequested\"}),e.trackClickThrough(),creative.adapter.expand(n,a)},this.units.banner.dismissAction=function(e,a,n){e.track({name:\"creativeDismissed\"}),creative.adapter.dismiss(n,a)},this.units.modal.collapseAction=function(e,a,n){e.track({name:\"unitCollapsed\"}),creative.adapter.collapse(n,a)},this.units.modal.dismissAction=function(e,a,n){e.track({name:\"creativeDismissed\"}),creative.adapter.dismiss(n,a)},this.units.banner.trackCreativeDismissed=function(){new ActionContext(this.visibleScreen).track({name:\"creativeDismissed\"})},this.units.banner.userLocation=this.createUserLocation(!1),this.units.modal.userLocation=this.createUserLocation(!0)};;\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.onceAction=function(e,n){n.caller.wasExecutedOnce||(n.caller.wasExecutedOnce=!0,(n.action||nullai)(e))},Kernel.onceActionDryRun=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.code),o=!1,u=i.getVariantForScreen?i.getVariantForScreen(c):void 0,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)}),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,\"\"),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 View(){}extend(View.prototype,EventEmitter),View.prototype.awake=function(){this.node=null,this._loadingCount=null,this._waitingForLoadCallbacks=[],this._isAppearing=!1,this._hasAppearedAtLeastOnce=!1,this._shouldAppear=!1,this._trackViewShown=this._trackViewShown.bind(this);var e=this;this.incrementLoadingCount=function(){if(e.loaded)throw\"Starting loads after the view has already finished loading?\";e._loadingCount++},this.decrementLoadingCount=function(){if(!e.loading)throw\"decrementLoadingCount called while not loading!\";if(e._loadingCount--,0===e._loadingCount){e.finishedLoading();for(var t=e._waitingForLoadCallbacks,i=0;i0}}),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)e.className+=\" 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=this.size.width,r=this.size.height,l=e.boxWidth||320,n=e.boxHeight||160;e.message=removeHtmlTags(e.message),a>=l&&r>=n?this.showModalDialogInPlacement(\"alert\",e,t):(alert(e.message),t())},BaseCreativeUnit.prototype.prompt=function(e,t){var a=this.size.width,r=this.size.height,l=e.boxWidth||320,n=e.boxHeight||190;if(a>=l&&r>=n)this.showModalDialogInPlacement(\"prompt\",e,t);else{var i=prompt(removeHtmlTags(e.message));t(i)}},BaseCreativeUnit.prototype._getUniqueId=function(){var e=new Date,t=e.getTime()+Math.random();return t},BaseCreativeUnit.prototype.showModalDialogInPlacement=function(e,t,a){var r=this._getUniqueId(),l={};l[r]={attachment:\"body\",positioning:\"screen\",type:\"layer\"},creative.adapter.createPlacements(l,function(){function l(e){13==e.keyCode&&(creative.adapter.destroyPlacement(r),o=null,a(C.value))}function n(e){e.preventDefault(),e.stopPropagation()}function i(t){t.preventDefault(),t.stopPropagation(),creative.adapter.destroyPlacement(r),o=null,\"prompt\"==e?a(C.value):a()}function s(e){e.preventDefault(),e.stopPropagation(),creative.adapter.destroyPlacement(r),o=null,a(null)}if(window){var o=creative.adapter.placements[r];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 m=o.createElement(\"h1\");addClass(m,\"celtra-alert-title\"),m.innerHTML=t.title,h.appendChild(m)}if(t.title&&\"\"!=t.title&&t.message&&\"\"!=t.message){var v=o.createElement(\"hr\");addClass(v,\"celtra-alert-dark-line\"),h.appendChild(v);var u=o.createElement(\"hr\");addClass(u,\"celtra-alert-light-line\"),h.appendChild(u)}if(t.message&&\"\"!=t.message){var g=o.createElement(\"div\");addClass(g,\"celtra-alert-message\"),g.innerHTML=t.message,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\",i,!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\",n,!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.preventScroll=function(e){var t=[\"mousewheel\",\"touchmove\"];t.forEach(function(t){attach(e,t,function(e){e.preventDefault()},!1)})};;\nfunction CreativeUnit(){}inherit(CreativeUnit,BaseCreativeUnit),CreativeUnit.IGNORABLES=BaseCreativeUnit.IGNORABLES,CreativeUnit.DEBUG_EXTRA_PHASE_DELAY=0,CreativeUnit.toString=function(){return\"[Clazz CreativeUnit]\"},CreativeUnit.prototype.toString=function(){return\"[CreativeUnit \"+this.name+\" (\"+this.localId+\")]\"},Object.defineProperty(CreativeUnit.prototype,\"size\",{get:function(){var t=this.getAvailableSize();return this.layoutCurrent||this._updateActiveLayout(this._getOrientation(),t.width,t.height),\"responsive\"===this.sizing?{width:t.width,height:t.height}:{width:this.layoutCurrent.unitSize.width,height:this.layoutCurrent.unitSize.height}},set:function(){}}),Object.defineProperty(CreativeUnit.prototype,\"unitAlignment\",{get:function(){return\"undefined\"==typeof this.layoutCurrent.unitAlignment?{}:this.layoutCurrent.unitAlignment}}),Object.defineProperty(CreativeUnit.prototype,\"layoutCurrent\",{get:function(){return this.layouts[this.layoutCurrentIndex]}}),Object.defineProperty(CreativeUnit.prototype,\"hasOverflow\",{get:function(){return this.screens.concat([this.master]).filter(function(t){return t.showOverflow}).length>0}}),Object.defineProperty(CreativeUnit.prototype,\"hasScreens\",{get:function(){return this.screens.length>0}}),CreativeUnit.prototype._getDestinationScreen=function(){var t=this.hasScreens?this.screens[0]:this.master;if(\"modal\"==this.name&&\"undefined\"!=typeof creative.runtimeParams.goToPageAfterExpand){var e=creative.runtimeParams.goToPageAfterExpand;if(\"string\"!=typeof e)throw new TypeError(\"Only string type is allowed to reference destination screen!\");var i=this.screens.filter(function(t){return t.title===e});i.length>0&&(t=i[0])}return t},CreativeUnit.prototype.awake=function(){var t=this;CreativeUnit.uber.awake.call(this),this.currentScreen=null,this.visibleScreen=null,this._masterShown=!1,this.overflowsY=!1,this.layoutCurrentIndex=null,this.screens.forEach(function(t){t.objects.forEach(function(t){t.zIndex+=ScreenObject._zIndexOffset})}),\"undefined\"==typeof this.backgroundColor&&(this.backgroundColor=\"#000000\"),\"undefined\"==typeof this.usePlaceboBar&&(this.usePlaceboBar=!1),\"undefined\"==typeof this.showCloseButton&&(this.showCloseButton=!1),\"undefined\"==typeof this.alignBackButtonHorizontal&&(this.alignBackButtonHorizontal=\"left\"),this.on(\"_firstScreenLoaded\",function(){t.placeboBar&&(t.placeboBar.parentNode.removeChild(t.placeboBar),t.placeboBar=null),this._setVisibleScreen(this._getDestinationScreen())}.bind(this)),this.onAll(\"_firstScreenLoaded _unitFirstShown\",function(){this.goToScreen(this._getDestinationScreen())}.bind(this)),this.triggerOrientationChange=this.triggerOrientationChange.bind(this),this.updateWindowMetrics=this.updateWindowMetrics.bind(this),this.hacks.triggerBlurWhenTappingOutsideOfInputs=ios()},CreativeUnit.prototype.setAvailableSize=function(t,e){var i=CreativeUnit.uber.setAvailableSize.apply(this,arguments),n=this._getOrientation(),o=this.layouts[this.layoutCurrentIndex];this._updateActiveLayout(n,t,e),this.updateWindowMetrics(n,t,e);var r=this._previousOrientation&&n!=this._previousOrientation,s=o&&o.orientation!=this.layoutCurrent.orientation;(r||s)&&this.triggerOrientationChange(),this._previousOrientation=n,(i||s)&&this.emit(\"resize\")},CreativeUnit.prototype._getOrientation=function(){return creative.adapter.orientation%180===0?\"portrait\":\"landscape\"},CreativeUnit.prototype._updateActiveLayout=function(t,e,i){{var n=this.layouts.slice(),o=this.layoutCurrentIndex;this.layouts[o]||null}n.forEach(function(n){n.sortIndex=0,\"independent\"==n.orientation?n.sortIndex+=1:n.orientation!=t&&(n.sortIndex+=4e3),n.minSize.width>e&&(n.sortIndex+=2e3),n.minSize.height>i&&(n.sortIndex+=2e3),n.sortIndex+=Math.abs(n.minSize.width-e)+Math.abs(n.minSize.height-i)}),n.sort(function(t,e){return t.sortIndex-e.sortIndex}),this.layoutCurrentIndex=this.layouts.indexOf(n[0]),o!=this.layoutCurrentIndex&&this.emit(\"layoutChanged\")},CreativeUnit.prototype.enterRenderTree=function(){if(!this._isRendering){this._isRendering=!0;var t=this.getAvailableSize();this.updateWindowMetrics(this._getOrientation(),t.width,t.height),this.master&&(this.master.loaded?defer(this.master.enterRenderTree.bind(this.master),void 0,void 0,useAsap()):this.once(\"_firstScreenLoaded\",this.master.enterRenderTree.bind(this.master))),this.visibleScreen&&defer(this.visibleScreen.enterRenderTree.bind(this.visibleScreen),void 0,void 0,useAsap()),this.hacks.triggerBlurWhenTappingOutsideOfInputs&&(attach(this.node,\"touchstart\",function(t){-1==[\"INPUT\",\"TEXTAREA\",\"SELECT\"].indexOf(t.target.nodeName)&&null!=this.lastInputElementFocused&&this.lastInputElementFocused.blur()}.bind(this),!0),attach(this.node,\"focus\",function(t){[\"INPUT\",\"TEXTAREA\",\"SELECT\"].indexOf(t.target.nodeName)>-1&&(this.lastInputElementFocused=t.target)}.bind(this),!0),attach(this.node,\"blur\",function(t){[\"INPUT\",\"TEXTAREA\",\"SELECT\"].indexOf(t.target.nodeName)>-1&&(this.lastInputElementFocused=null)}.bind(this),!0))}},CreativeUnit.prototype.exitRenderTree=function(){this._isRendering&&(this._isRendering=!1,this.master&&this.master.exitRenderTree(),this.visibleScreen&&this.visibleScreen.exitRenderTree())},CreativeUnit.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.inView&&(this.inView.start(),this.currentScreen&&this.currentScreen.inView&&this.currentScreen.inView.start()),this.hasAppearedAtLeastOnce||(this.placeboBar&&this.placeboBar.start(),this._orientationLockIsOn?this._emitUnitFirstShownAfterOrientationPrompt=!0:this.emit(\"_unitFirstShown\"))},CreativeUnit.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()},CreativeUnit.prototype.createNode=function(){var t=this.unitDiv=CreativeUnit.uber.createNode.call(this);if(t.id=\"celtra-\"+this.name.replace(/[A-Z]/g,function(t){return\"-\"+t.toLowerCase()}),Color.isGradient(this.backgroundColor)?addCssRule(\"#\"+t.id,Color.createGradientStyle(this.backgroundColor)):t.style.backgroundColor=this.backgroundColor,t.style.overflow=this.master.showOverflow?\"visible\":\"hidden\",this.screenContainer=document.createElement(\"div\"),this.screenContainer.className=\"celtra-screen-container\",this.screenContainer.style.position=\"absolute\",t.appendChild(this.screenContainer),this.screenHolder=document.createElement(\"div\"),this.screenHolder.className=\"celtra-screen-holder\",this.screenHolder.style.width=\"100%\",this.screenHolder.style.height=\"100%\",this.screenContainer.appendChild(this.screenHolder),t.style.position=\"absolute\",this.usePlaceboBar){var e=this.loadingScreen&&this.loadingScreen.loaderColor||\"white\";this.placeboBar=new PlaceboBar(5e3,.9,200,e),this.screenContainer.appendChild(this.placeboBar)}if(this.showCloseButton){if(this.closeAction||Creative._throw(\"Close button requested, but no close action defined?\"),this.closeButtonType&&\"text\"===this.closeButtonType){var i=document.createElement(\"div\");i.className=\"celtra-close-button touchable celtra-close-button-text\",i.textContent=this.closeButtonText,i.style.color=this.closeButtonTextColor,this.unitDiv.appendChild(i)}else{var i=document.createElement(\"img\"),n=document.createElement(\"img\");this.closeButtonUp?(this.closeButtonDown||(this.closeButtonDown=this.closeButtonUp),this.closeButtonWidth&&this.closeButtonHeight&&(i.style.width=n.style.width=this.closeButtonWidth+\"px\",i.style.height=n.style.height=this.closeButtonHeight+\"px\")):(this.closeButtonUp=new File(\"runner/clazzes/CreativeUnit/close-up.svg\"),this.closeButtonDown=new File(\"runner/clazzes/CreativeUnit/close-down.svg\")),i.className=\"celtra-close-button touchable celtra-close-button-up\",this.preloadImage(this.closeButtonUp,function(t){i.src=t.src}),n.className=\"celtra-close-button celtra-close-button-down\",this.preloadImage(this.closeButtonDown,function(t){n.src=t.src}),this.closeButtonImage=i,this.closeButtonImagePressed=n,this.unitDiv.appendChild(this.closeButtonImage),this.unitDiv.appendChild(this.closeButtonImagePressed)}attach(i,\"tap\",function(){var t=this.currentScreen||this.visibleScreen;this.closeAction(t?new ActionContext(t,!0):null,{},noop)}.bind(this),!1)}var o=[];o.push({name:\"loading\",fun:function(t){if(this.loadingScreen){var e=creative.perf.start(\"CreativeUnit.loadingScreen\");this.loadingScreen.getNode(function(){defer(function(){e.end(),this._setVisibleScreen(this.loadingScreen),t(!0)}.bind(this),CreativeUnit.DEBUG_EXTRA_PHASE_DELAY,\"CreativeUnit.createNode defer loading phase completion\",useAsap())}.bind(this))}else t(!1)}.bind(this)}),o.push({name:\"interactive\",fun:function(t){var e=creative.perf.start(\"CreativeUnit.firstScreenLoaded\"),i=this.hasScreens?2:1,n=function(){--i||defer(function(){e.end(),defer(this.emits(\"_firstScreenLoaded\"),0,\"CreativeUnit.createNode emit _firstScreenLoaded\",useAsap()),t(!0)}.bind(this),CreativeUnit.DEBUG_EXTRA_PHASE_DELAY,\"CreativeUnit.createNode defer onScreenLoaded\",useAsap())}.bind(this);this.hasScreens&&this._getDestinationScreen().getNode(n),this.master.getNode(n)}.bind(this)}),this.incrementLoadingCount();var r=!1,s=function(){r||Creative._throw(\"Unit still not ready to show after last phase?!\")};return o.reverse().forEach(function(t){var e=s;s=function(){Logger(\"unit\").log(\"Phase '\"+t.name+\"' started.\"),t.fun(function(i){Logger(\"unit\").log(\"Phase '\"+t.name+\"' finished, \"+(i?\"DID\":\"DID NOT\")+\" draw something.\"),i&&(r||(r=!0,this.decrementLoadingCount())),e()}.bind(this))}.bind(this)}.bind(this)),s(),t},CreativeUnit.prototype._repositionCloseButton=function(t){function e(t,e,i){function n(t){return{left:t.offsetLeft,top:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}}var o=n(i),r=n(e),s=n(t);s.left=r.left+r.width-s.width,s.top=r.top;var a=o.left<=s.left&&s.left+s.width-1-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},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;r?n.forEach(function(n){n.resetAction(e,t,function(){--r||i()})}):i()},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 NestedContainer(){}inherit(NestedContainer,ScreenObjectContainer),extend(NestedContainer.prototype,TriggerHost),NestedContainer.toString=function(){return\"[Clazz NestedContainer]\"},NestedContainer.prototype.toString=function(){return\"[NestedContainer \"+this.localId+\"]\"},NestedContainer.prototype.createNode=function(){var e=NestedContainer.uber.createNode.call(this);return this.node=e,this._updateSize=this._updateSize.bind(this),this.enterRenderTree=this.enterRenderTree.bind(this),this.exitRenderTree=this.exitRenderTree.bind(this),this.parentObject.on(\"enteredRenderTree\",this.enterRenderTree),this.parentObject.on(\"exitedRenderTree\",this.exitRenderTree),this.objects.forEach(function(t){this.incrementLoadingCount(),e.appendChild(t.getNode(this.decrementLoadingCount))}.bind(this)),0===this.objects.length&&(e.className+=\" empty\"),this.parentObject.parentContainer.on(\"resize\",this._updateSize),e},NestedContainer.prototype.redrawLayout=function(){this.node.style.width=this.layoutCurrent.size.width,this.node.style.height=this.layoutCurrent.size.height,this.node.style.position=\"relative\",this.node.style.overflow=\"hidden\"},NestedContainer.prototype._updateSize=function(){this.redrawLayout(),this.emit(\"resize\")},NestedContainer.prototype.enterRenderTree=function(){this.emit(\"enteredRenderTree\"),this._updateSize()},NestedContainer.prototype.exitRenderTree=function(){this.emit(\"exitedRenderTree\")},NestedContainer.prototype.onFocus=function(e){this.hasTriggers(\"itemFocus\")&&this.fireTriggers(\"itemFocus\",null,e,new ActionContext(this.parentObject))},NestedContainer.prototype.onBlur=function(e){this.hasTriggers(\"itemBlur\")&&this.fireTriggers(\"itemBlur\",null,e,new ActionContext(this.parentObject))},Object.defineProperty(NestedContainer.prototype,\"layoutCurrent\",{get:function(){return this.layoutSpecificValues[this.parentUnit.layoutCurrentIndex]}}),Object.defineProperties(NestedContainer.prototype,{size:{get:function(){var e,t=this.layoutCurrent.size,i=parseFloat(t.width),n=parseFloat(t.height);return t.width.toString().indexOf(\"%\")>-1&&(e=this.parentObject.getNaturalSize(),i=e.width*i/100),t.height.toString().indexOf(\"%\")>-1&&(e||(e=this.parentObject.getNaturalSize()),n=e.height*n/100),{width:Math.round(i),height:Math.round(n)}}}});;\nfunction ScreenObject(){}inherit(ScreenObject,View),extend(ScreenObject.prototype,TriggerHost),extend(ScreenObject.prototype,DiscoverableTrait),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,s,o,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)}),s=t[n],o=t[r],s=s.indexOf(\"%\")>-1?a*parseFloat(s)/100:parseFloat(s),\"hcenter\"===n?s=(a-h)/2+s:\"right\"===n&&(s=a-(s+h)),o=o.indexOf(\"%\")>-1?c*parseFloat(o)/100:parseFloat(o),\"vcenter\"===r?o=(c-u)/2+o:\"bottom\"===r&&(o=c-(o+u)),{x:ScreenObject._roundIfNeeded(s),y:ScreenObject._roundIfNeeded(o)}},ScreenObject._toSizePx=function(t,e){var i=parseFloat(t.width),n=parseFloat(t.height),r=e.width,s=e.height;return t.width.toString().indexOf(\"%\")>-1&&(i=r*i/100),t.height.toString().indexOf(\"%\")>-1&&(n=s*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._copyChosenExperimentProperties=function(t){var e,i,n=this.experimentSpecificValues[t];this.creativeOptimizationEnabled&&(i=creative.experiments.get(t,[creative.id,this.localId]),e=n.filter(function(t){return String(t.id)===i.chosenVariant}.bind(this))[0]),e||(e=n[0]);var r={};return deep(r,e),delete r.id,delete r.label,deep(this,r),i},ScreenObject.prototype._applyExperiments=function(){throw new Error(\"_applyExperiments not implemented\")},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.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 s=r.firstChild;if(i)for(;n=r.firstChild;)i.appendChild(n);return s},ScreenObject.prototype.ifNotClosing=function(t,e,i){var n=this.fireTriggersDryRun(t,null,noop,e)._actions,r=[\"dismiss\",\"collapse\"],s=!n.some(function(t){return r.indexOf(t.method)>-1});s&&i()},ScreenObject.prototype.createNode=function(){this.experimentSpecificValues&&this._applyExperiments(),this._isInMouseOver=!1;var t=this,e=ScreenObject.uber.createNode.call(t);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));var i=\"mouseOver\",n=[];if(this.hasTriggers(i)){var r=this._getTriggers(i,null),s=[],o=noop;r.forEach(function(t){t.parameters&&t.parameters.delay&&s.indexOf(t.parameters.delay)<0&&s.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,s.forEach(function(t,e){o=r(t),n[e]=setTimeout(o,t)})},!1)}return 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),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,swipe:function(e,i){var n=new ActionContext(t,!0);t.fireTriggers(\"swipe\",function(r){var s=e==r.direction&&i>=r.length;return s&&t.ifNotClosing(\"swipe\",n,n.trackUserInteraction),s},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._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,s=this.size.height/e.height;t.transform+=\" scale(\"+r+\", \"+s+\")\"}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),s=null;celtra.styler.css(this.node,i)!==n&&(s=n,r!=s&&\"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.setPosition=function(t,e){this.position={left:t+\"px\",top:e+\"px\"},this._refreshDisplayState()},ScreenObject.prototype.setSize=function(t,e){this.size.width=t,this.size.height=e,this._refreshDisplayState()},ScreenObject.prototype.setOpacity=function(t){this.opacity=t,this._refreshDisplayState()},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 s(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,s=e.position,o=null,a=null,c=null,h=null;[\"left\",\"right\",\"hcenter\"].forEach(function(t){t in r&&(o=t),t in s&&(c=t)}),[\"bottom\",\"top\",\"vcenter\"].forEach(function(t){t in r&&(a=t),t in s&&(h=t)}),c&&null!==s[c]&&(delete r[o],r[c]=s[c]),h&&null!==s[h]&&(delete r[a],r[h]=s[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 o=\"undefined\"!=typeof e.duration?e.duration:1e3,a=e.timingFunction||\"linear\";if(e.layoutSpecificValues)e.layoutSpecificValues.forEach(function(t,e){this.layoutSpecificValues[e]&&s(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\"),s(this.layoutCurrent,c)}var h=this.node;celtra.styler.css(h,\"transition\",\"\"),celtra.styler.css(h,\"transitionProperty\",\"all\"),celtra.styler.css(h,\"transitionDuration\",o+\"ms\"),celtra.styler.css(h,\"transitionTimingFunction\",a);var u=this._refreshDisplayState();if(o>0&&u){var l=!1,p=function(){l||(l=!0,i())};ScreenObject.requiresRedrawToTriggerAnimationEvents&&!function(){var t=Date.now(),e=t+(Number(o)||0),i=function(){flash(),Date.now()0?o: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,s={width:n.width*r,height:n.height*r},o={x:this.position.x+this.size.width/2-s.width/2,y:this.position.y+this.size.height/2-s.height/2};this.animateAction(t,{properties:{position:o,size:s},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.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 s=[];for(var o in t)s.push({selector:o.split(r).map(function(t){return e+(n.test(t)?\"\":\" \")+t}).join(\",\"),attributes:t[o]});var a=this._styleSheetTemplate({rules:s});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[]};;\nfunction GalleryGroup(){}inherit(GalleryGroup,ScreenObject),GalleryGroup.toString=function(){return\"[Clazz GalleryGroup]\"},GalleryGroup.prototype.toString=function(){return\"[GalleryGroup \"+this.localId+\"]\"},GalleryGroup.prototype.createNode=function(){var t=GalleryGroup.uber.createNode.call(this);return this.defaultImage||(this.defaultImage=new File(\"runner/loading.png\"),this.defaultImage.meta={width:1280,height:1280}),this._loadedResources={},t},GalleryGroup.prototype._appear=function(){this.autoAnimate&&!this.autoAnimationTimeout&&this.startAutoAnimate()},GalleryGroup.prototype._disappear=function(){this._stopAutoAnimate(),this.disappearNestedObjects()},GalleryGroup.prototype.nextItem=function(t){this.goToItem(this.getFocusedIndex()+1,t)},GalleryGroup.prototype.previousItem=function(t){this.goToItem(this.getFocusedIndex()-1,t)},GalleryGroup.prototype.previousAction=function(t,e,o){this.previousItem(o)},GalleryGroup.prototype.nextAction=function(t,e,o){this.nextItem(o)},GalleryGroup.prototype.goToItemAction=function(t,e,o){this.goToItem(e.item-1,o)},GalleryGroup.prototype.startIndex=0,GalleryGroup.prototype.allowAutoAnimate=retTrue,GalleryGroup.prototype.resetAllowAutoAnimate=noop,GalleryGroup.prototype.getItem=function(t){return this.content[t%this.getItemsLength()]},GalleryGroup.prototype.getItemsLength=function(){return this.content.length},GalleryGroup.prototype.startAutoAnimateAction=function(t,e,o){this.resetAllowAutoAnimate(),this.autoAnimationTimeout||this.startAutoAnimate(),o()},GalleryGroup.prototype._autoAnimateCancelledInTransition=!1,GalleryGroup.prototype.startAutoAnimate=function(){this._autoAnimateCancelledInTransition=!1;var t=this._animateCallback;if(!t){var e,o,n=this,i=!0,a=n.getItemsLength()-1,r=\"north\"==n.autoAnimateDirection||\"west\"==n.autoAnimateDirection?\"nextItem\":\"previousItem\";t=function(){return n._autoAnimateCancelledInTransition?void(n._autoAnimateCancelledInTransition=!1):void(n.autoAnimationTimeout=setTimeout(u,n.autoAnimatePause))};var u=function(){function u(i){l!==a||\"west\"!=n.autoAnimateDirection&&\"north\"!=n.autoAnimateDirection?0!==l||\"east\"!=n.autoAnimateDirection&&\"south\"!=n.autoAnimateDirection||(n.goToItem(a,t),i&&(o=!1,e=!1)):(n.goToItem(0,t),i&&(o=!1,e=!1))}if(n.autoAnimationTimeout=null,!n.allowAutoAnimate())return void(n.autoAnimateUserInteraction?n.disableAutoAnimate():t());var l=n.getFocusedIndex();if(i)\"repeat\"===n.autoAnimateConclusion&&n.cyclic||u(!0),i=!1;else if(l===a||0===l)switch(n.autoAnimateConclusion){case\"stop\":if(o)return void n.disableAutoAnimate();break;case\"reverse\":e&&(r=\"previousItem\"==r?\"nextItem\":\"previousItem\");break;case\"repeat\":n.cyclic||u(!1)}(0!==l&&\"previousItem\"===r||l!==a&&\"nextItem\"===r||n.cyclic&&\"repeat\"===n.autoAnimateConclusion)&&(n[r](t),e=!0,o=!0)};n._animateCallback=t}t()},GalleryGroup.prototype._stopAutoAnimate=function(){var t=this.autoAnimationTimeout;t?(clearTimeout(t),delete this.autoAnimationTimeout):this._autoAnimateCancelledInTransition=!0,delete this._animateCallback},GalleryGroup.prototype.stopAutoAnimateAction=function(t,e,o){this._stopAutoAnimate(),o()},GalleryGroup.prototype.disableAutoAnimate=function(){this._stopAutoAnimate()},GalleryGroup.prototype.resetAction=function(t,e,o){GalleryGroup.uber.resetAction.call(this,t,e,function(){this._stopAutoAnimate(),this.autoAnimate&&this.startAutoAnimate(),o()}.bind(this))},GalleryGroup.prototype._handleAllowTouches=function(t){for(var e=0;et||t>=this.getItemsLength()))return 0;var o=t-this.getFocusedIndex(),n=this.getItemsLength();return e&&Math.abs(o)>=n/2&&(o+=0>o?n:-n),o},GalleryGroup.prototype._preloadContainers=function(t,e){var o=t.length;t.forEach(function(t){t.getNode(function(){--o||e()})})},GalleryGroup.prototype.getDefaultImageSrc=function(){return this.defaultImageNode.src};;\nfunction SwipeyGroup(){}inherit(SwipeyGroup,GalleryGroup),SwipeyGroup.toString=function(){return\"[Clazz SwipeyGroup]\"},SwipeyGroup.prototype.toString=function(){return\"[SwipeyGroup \"+this.localId+\"]\"},SwipeyGroup.prototype.awake=function(){SwipeyGroup.uber.awake.call(this),this._animationLength=200,this._minimumDistanceForMovedState=5,this._rubberBandQuotient=4,this._swipeThreshold=.2,this.startIndex=this.startIndex-1,this._state=new StateObject({itemIndex:this.startIndex,moved:!1,position:0,touchPosition:0}),this._animator=new EasingAnimation(this._state,\"position\",{exp:EasingAnimation.presets.easeIn}),this._actionContextOfFirstTouchStart=null,this._autoAnimateDisabledByUserTouch=!1,this._autoAnimateHaltedByUserTouch=!1,this._contentListItems=[],this._currentTouchIdentifier=null,this._cycleSize=0,this._drawOffset=0,this._firstTouchStart=null,this._allowHorizontalSwipe=!0,this._horizontalSwipeInProgress=!1,this._itemSize=0,this._lastFocusedVirtualIndex=null,this._initialJumpToItemFinished=!1,this._touchHandlersAttached=!1,this._cyclic=this.cyclic&&this.content.length>2,this._draw=this._draw.bind(this),this._handleStateIndexChange=this._handleStateIndexChange.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.on(\"appeared\",function(){new ActionContext(this).track({name:\"itemFocused\",item:this._state.itemIndex+1}),this._triggerOnFocus()}.bind(this))},SwipeyGroup.prototype.createNode=function(){var t=SwipeyGroup.uber.createNode.call(this);return this._privateApiTracked={},this._preloadInitialContainers(),this._init(t),t},SwipeyGroup.prototype._preloadInitialContainers=function(){var t,e,i=[];this._cyclic?(e=this._wrapAround(this.startIndex-1,this.content.length),t=this._wrapAround(this.startIndex+1,this.content.length)):(this.startIndex0&&(e=this.startIndex-1));var n=function(t){var e=this.content[t];e&&i.push(e)}.bind(this);n(e),n(this.startIndex),n(t),this.incrementLoadingCount(),this._preloadContainers(i,this.decrementLoadingCount.bind(this))},SwipeyGroup.prototype._init=function(t){this._ul=document.createElement(\"ul\"),addClass(this._ul,\"swipey\"),this._ul.style.display=\"none\",this.content.forEach(function(t,e){var i=document.createElement(\"li\");if(i.appendChild(t.getNode()),this._cyclic){var n=this._wrapAround(e-this.startIndex+1,this.content.length);this._contentListItems[n]=i}else this._contentListItems.push(i);addClass(i,\"touchable\"),this._ul.appendChild(i)}.bind(this)),this._drawOffset=this._cyclic?this.startIndex-1:0;var e=this.autoAnimate&&this.autoAnimatePreventUserInteraction;e||attach(this._ul,\"touchstart\",this._handleTouchStart),this._state.on(\"change:itemIndex\",function(t){Ticker.frame(this._draw,\"next\"),this._handleStateIndexChange(t)}.bind(this)),t.appendChild(this._ul),this._state.on(\"change:position\",function(){this._initialJumpToItemFinished&&Ticker.frame(this._draw,\"next\")}.bind(this)),this.pagination&&\"hidden\"!==this.pagination&&(this._paginator=new Paginator({container:t,containerSize:this.size,position:this.pagination,itemsCount:this.content.length}),this._paginator.buildPagination())},SwipeyGroup.prototype._appear=function(){SwipeyGroup.uber._appear.call(this),this._ul.style.display=\"block\",this._checkInitialJump(),this.content.forEach(function(t){t.emit(\"resize\")})},SwipeyGroup.prototype._checkInitialJump=function(){this._initialJumpToItemFinished||isNaN(this._getFocusedVirtualIndex())||(this._lastFocusedVirtualIndex=this._getFocusedVirtualIndex(),this._cyclic||this.jumpToItem(this.startIndex),this._initialJumpToItemFinished=!0)},SwipeyGroup.prototype.redrawLayout=function(){this._ul.style.display=this.hidden?\"none\":\"block\",this._checkInitialJump(),this.vertical=this.layoutSpecificValues[this.parentUnit.layoutCurrentIndex].vertical,this._itemSize=(this.vertical?this.size.height:this.size.width)+this.cellspacing,this._cycleSize=this._itemSize*this.content.length,this._state.position=this._getPositionForCentered(this._getItemCenter(this._state.itemIndex)),this.vertical?addClass(this._ul,\"vertical\"):removeClass(this._ul,\"vertical\"),this._paginator&&this._paginator.redrawPagination(this.size),this._draw()},SwipeyGroup.prototype._handleStateIndexChange=function(){var t=this.getFocusedIndex();this._lastFocusedIndex!=t&&new ActionContext(this).track({name:\"itemFocused\",item:this._state.itemIndex+1}),this._triggerOnBlur(),this._triggerOnFocus()},SwipeyGroup.prototype._draw=function(){function t(t,e,i){var n=ScreenObject.supports3d?\"translate3d(\"+e+\"px, \"+i+\"px, 0)\":\"translate(\"+e+\"px, \"+i+\"px)\";celtra.styler.css(t,\"transform\",n)}this._calculateCyclicDrawOffset(),this._contentListItems.forEach(function(e,i){var n={x:0,y:0},o=-this._state.position+(i+this._drawOffset)*this._itemSize;n[this.vertical?\"y\":\"x\"]=o,t(e,Math.round(n.x),Math.round(n.y))}.bind(this)),this._paginator&&this._paginator.setActivePaginationItem(this.getFocusedIndex())},SwipeyGroup.prototype._calculateCyclicDrawOffset=function(){if(this._cyclic&&null!=this._lastFocusedVirtualIndex&&this._lastFocusedVirtualIndex!==this._getFocusedVirtualIndex()){var t=this._getFocusedVirtualIndex()-this._lastFocusedVirtualIndex;this._drawOffset+=t,this._lastFocusedVirtualIndex=this._getFocusedVirtualIndex();for(var e=0;e0?this._contentListItems.push(this._contentListItems.shift()):0>t&&this._contentListItems.unshift(this._contentListItems.pop())}},SwipeyGroup.prototype._snap=function(){var t=this._getFocusedVirtualIndex();this._cyclic||(t=clamp(0,this.content.length-1,t));var e=this._cyclic?t+this.startIndex:t;e%=this.content.length,0>e&&(e+=this.content.length);var i=this._getPositionForCentered(this._getItemCenter(t));this._animateTo(i)},SwipeyGroup.prototype._animateTo=function(t,e){this._animator.animateTo(t,this._animationLength,function(){this._state.itemIndex=this._getIndexOfCenteredItem(),this._handleAllowTouches(this.content),\"function\"==typeof e&&e()}.bind(this))},SwipeyGroup.prototype._mapPositionToVirtualIndex=function(t){for(var e=this.content.length,i=0,n=Math.floor(t/this._cycleSize)*e,o=Math.floor(t/this._cycleSize)*this._cycleSize;o+this._itemSize<=t;)o+=this._itemSize,i++;return n+i},SwipeyGroup.prototype._mapIndexToPosition=function(t){for(var e=Math.floor(t/this.content.length)*this.content.length,i=Math.floor(t/this.content.length)*this._cycleSize,n=0;t>e+n;)i+=this._itemSize,n++;return i},SwipeyGroup.prototype._getViewportTreshold=function(){return this._state.position+this._itemSize*(\"back\"===this._swipeDirection?this._swipeThreshold:1-this._swipeThreshold)},SwipeyGroup.prototype._getFocusedVirtualIndex=function(){return this._mapPositionToVirtualIndex(this._getViewportTreshold())},SwipeyGroup.prototype.getFocusedIndex=function(){return this._state.itemIndex},SwipeyGroup.prototype._getIndexOfCenteredItem=function(){return this._wrapAround(this._getFocusedVirtualIndex(),this.content.length)},SwipeyGroup.prototype._getItemCenter=function(t){return this._mapIndexToPosition(t)+this._itemSize/2},SwipeyGroup.prototype._getNearestIndex=function(t){if(this._cyclic){var e=this._wrapAround(this._state.itemIndex,this.content.length),i=t-e,n=t-(e+this.content.length);return Math.abs(i)<=Math.abs(n)?this._getFocusedVirtualIndex()+i:this._getFocusedVirtualIndex()+n}return clamp(0,this.content.length-1,t)},SwipeyGroup.prototype._getPositionForCentered=function(t){return t-this._itemSize/2},SwipeyGroup.prototype._wrapAround=function(t,e){return(t%e+e)%e},SwipeyGroup.prototype.goToItem=function(t,e){var i=this._getNearestIndex(t),n=this._getPositionForCentered(this._getItemCenter(i));this._animateTo(n,e)},SwipeyGroup.prototype.jumpToItem=function(t){this._state.itemIndex=this._wrapAround(t,this.content.length),this._state.position=this._getPositionForCentered(this._getItemCenter(this._state.itemIndex)),this._handleAllowTouches(this.content)},SwipeyGroup.prototype._normalizeEvent=function(t){var e=function(t,e){var i,n;for(i=0;ithis._getPositionForCentered(this._getItemCenter(this.content.length-1));e.position+=this._cyclic||!a&&!c?h:h/this._rubberBandQuotient,e.moved=!0,e.touchPosition=s}var u=r-s;this._swipeDirection=u>0?\"forth\":\"back\",this._calculateCyclicDrawOffset()}},SwipeyGroup.prototype._handleTouchEnd=function(t){t.stopPropagation(),this._allowHorizontalSwipe=!0,this._horizontalSwipeInProgress=!1,this._currentTouchIdentifier==t.changedTouches[0].identifier&&(this._currentTouchIdentifier=t.touches[0]?t.touches[0].identifier:null);var e=this._state,i=this._normalizeEvent(t),n=this.vertical?i.y:i.x;if(0===t.touches.length){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 o={firstTouch:this._firstTouchStart,lastTouch:i,minDistanceForSwipe:this._swipeThreshold*this._itemSize,validAxis:this.vertical?\"y\":\"x\"},s=_analyzeTouch(o);(s.isConsideredSwipe||s.isConsideredTap)&&this._actionContextOfFirstTouchStart.trackUserInteraction(),this._actionContextOfFirstTouchStart=null,this._autoAnimateHaltedByUserTouch=!1}else e.touchPosition=n},SwipeyGroup.prototype._handleTouchCancel=function(t){this._handleTouchEnd(t)},SwipeyGroup.prototype.resetAction=function(t,e,i){SwipeyGroup.uber.resetAction.call(this,t,e,function(){this.jumpToItem(this.startIndex),this._autoAnimateDisabledByUserTouch=!1,i()}.bind(this))},SwipeyGroup.prototype.getField=function(){return{type:\"string\",value:this.content?this.content[this.getFocusedIndex()].name:\"\"}},SwipeyGroup.prototype.allowAutoAnimate=function(){return!this._autoAnimateDisabledByUserTouch&&!this._autoAnimateHaltedByUserTouch},SwipeyGroup.prototype.resetAllowAutoAnimate=function(){this._autoAnimateDisabledByUserTouch=!1},SwipeyGroup.prototype.getNestedContainers=function(){return this.content},SwipeyGroup.prototype.positionUsingTransforms=retTrue,SwipeyGroup.prototype.sizeUsingTransforms=retTrue,SwipeyGroup.prototype.getNaturalSize=function(){return{width:this.originalSize.width,height:this.originalSize.height}},SwipeyGroup.prototype._track=function(t){this._privateApiTracked[t]||(this._privateApiTracked[t]=!0,creative.track({name:\"retiredFeatureUsed\",featureType:\"apifunction\",featureName:t}))},SwipeyGroup.prototype.getFocusedVirtualIndex=function(){this._track(\"SwipeyGroup.getFocusedVirtualIndex\"),this._getFocusedVirtualIndex()},SwipeyGroup.prototype.getPositionForCentered=function(t){this._track(\"SwipeyGroup.getPositionForCentered\"),this._getPositionForCentered(t)},SwipeyGroup.prototype.getItemCenter=function(t){this._track(\"SwipeyGroup.getItemCenter\"),this._getItemCenter(t)},SwipeyGroup.prototype.getIndexOfCenteredItem=function(){this._track(\"SwipeyGroup.getIndexOfCenteredItem\"),this._getIndexOfCenteredItem()},SwipeyGroup.prototype.getViewportTreshold=function(){this._track(\"SwipeyGroup.getViewportTreshold\"),this._getViewportTreshold()},SwipeyGroup.prototype.getNearestIndex=function(t){this._track(\"SwipeyGroup.getNearestIndex\"),this._getNearestIndex(t)};;\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),Picture.toString=function(){return\"[Clazz Picture]\"},Picture.prototype.toString=function(){return\"[Picture \"+this.localId+\"]\"},Picture.prototype.createNode=function(){var i=new File(\"runner/image-placeholder.png\");i.meta={height:28,width:28},this.file||(this.file=i),this._useDynamicImage=\"feed\"===this.assetSource&&null!=this.feedFieldKey&&\"string\"==typeof creative.runtimeParams.dynamicContent[this.feedFieldKey],this._useDynamicImage&&(this.file=new File,this.file.url=creative.runtimeParams.dynamicContent[this.feedFieldKey],this.file.meta=ScreenObject._toSizePx(this.layoutCurrent.size,this.parentContainer.size));var t=Picture.uber.createNode.call(this);return this.file===i?((\"feed\"!=this.assetSource||\"feed\"===this.assetSource&&null===this.feedFieldKey)&&addClass(t,\"empty\"),t):(this.preloadImage(this.file,this._handlePreloadedImage.bind(this,t)),t)},Picture.prototype._handlePreloadedImage=function(i,t){this._useDynamicImage&&(this.file.meta={height:t.naturalHeight,width:t.naturalWidth});var e=\"\",r=\"\",s=\"no-repeat\";this.imagePosition&&(e=this.imagePosition.replace(\"-\",\" \"));var a=this.sizeUsingTransforms()?this.getNaturalSize():this.size,h=this.fittingSize;switch(\"fitUpToOriginal\"===this.fittingSize&&(h=a.widthl&&\"fit\"==this.fittingSize||l>h&&\"fill\"==this.fittingSize,t=l>h&&\"fit\"==this.fittingSize||h>l&&\"fill\"==this.fittingSize,e=s,r=a,i?r=s/n*o:t&&(e=a/o*n),e>c&&(r*=c/e,e=c),r>c&&(e*=c/r,r=c),{width:e,height:r})},Picture.prototype.getImageUrl=function(){return this.file?this.file.getUrl():void 0};;\nfunction Button(){}inherit(Button,ScreenObject),extend(Button.prototype,TextStyleIntegrator),Button.toString=function(){return\"[Clazz Button]\"},Button.prototype.toString=function(){return\"[Button \"+this.localId+\"]\"},Object.defineProperties(Button.prototype,{_borderRoundness:{get:function(){var t=0,e=0,o=0,r=0;if(this.border&&\"number\"==typeof this.borderRadius)t=this.borderRadius;else if(this.border!==!1||this.roundness){if(\"number\"==typeof this.roundness&&(r=this.roundness),r>0){var n=Math.min(this.getNaturalSize().height,this.getNaturalSize().width),s=n/2,i=Math.max(this.getNaturalSize().height,this.getNaturalSize().width),a=i/2;if(50>r){var d=r/50;t=s*d}else{var h=(r-50)/50,u=(a-s)*h,l=s+u;e=this.getNaturalSize().width==n?s:l,o=this.getNaturalSize().height==n?s:l}}}else r=0;return this.shadow&&ios(\"8\")&&window.devicePixelRatio>=3&&(1>t&&(t=1),1>e&&(e=1),1>o&&(o=1)),50>r?t+\"px\":e+\"px \"+o+\"px\"}}}),Button.prototype.getBorderWidth=function(){return this.borderWidth},Button.prototype.getShadowDistance=function(){return this.shadowDistance},Button.prototype.getShadowBlur=function(){return this.shadowBlur},Button.prototype.awake=function(){Button.uber.awake.call(this),this._defaultValues={backgroundUpImage:\"runner/clazzes/Button/button.png\",backgroundDownImage:\"runner/clazzes/Button/button-down.png\"},this._handleTap=this._handleTap.bind(this),this._handleTouchStart=this._handleTouchStart.bind(this),this._handleTouchEnd=this._handleTouchEnd.bind(this)},Button.prototype.createNode=function(){var t=Button.uber.createNode.call(this);return this._privateApiTracked={},this._hoverEnabled=desktop(),this._backgroundElement=null,this._foregroundElement=null,this._textBorder=0,this._cssRules={},this._useBackgroundImage=\"image\"===this.background,this._useForegroundImage=\"image\"===(this._useBackgroundImage?this.foregroundForImage:this.foregroundForCss),addClass(t,\"touchable\"),this._createBackground(t),this._createForeground(t),this.addStyle(this._cssRules),attach(t,\"tap\",this._handleTap),attach(t,\"touchstart\",this._handleTouchStart),t},Button.prototype._appear=function(){this._experimentButtonStyle&&this._experimentButtonStyle.trackExposure()},Button.prototype._createBackground=function(t){if(this._backgroundElement=document.createElement(\"div\"),addClass(this._backgroundElement,\"background\"),this._useBackgroundImage){var e=!1,o=\"normal\",r=\"focus\",n=\"pressed\",s=function(t,e){addClass(e,t),this._backgroundElement.appendChild(e)}.bind(this);this.backgroundUpImage?this.preloadImage(this.backgroundUpImage,function(t){s(o,t)}):(e=!0,this.preloadImage(new File(this._defaultValues.backgroundUpImage),function(t){s(o,t)})),this._hoverEnabled&&this.backgroundHoverImage&&this.preloadImage(this.backgroundHoverImage,function(t){s(r,t)}),this.backgroundDownImage?this.preloadImage(this.backgroundDownImage,function(t){s(n,t)}):e&&this.preloadImage(new File(this._defaultValues.backgroundDownImage),function(t){s(n,t)}),this._cssRules[\".background .\"+o]=\"display: block;\",this._cssRules[\".background .\"+r]=\"display: none;\",this._cssRules[\".background .\"+n]=\"display: none;\",this._hoverEnabled&&this.backgroundHoverImage&&(this._cssRules[\":hover .background .\"+o]=\"display: none;\",this._cssRules[\":hover .background .\"+r]=\"display: block;\",this._cssRules[\":hover .background .\"+n]=\"display: none;\"),(this.backgroundDownImage||e)&&(this._cssRules[\".background.down .\"+o]=\"display: none;\",this._cssRules[\".background.down .\"+r]=\"display: none;\",this._cssRules[\".background.down .\"+n]=\"display: block;\")}else{if(this.backgroundColor){var i=\"\";if(Color.isGradient(this.backgroundColorUp)?(i+=Color.createGradientStyle(this.backgroundColorUp),i+=\"background-color: transparent;\"):(i+=\"background-image: none; \",i+=\"background-color: \"+this.backgroundColorUp+\";\"),this._cssRules[\".background\"]=i,this._hoverEnabled&&this.backgroundColorHover){var a=\"\";Color.isGradient(this.backgroundColorHover)?(a+=Color.createGradientStyle(this.backgroundColorHover),a+=\"background-color: transparent;\"):(a+=\"background-image: none; \",a+=\"background-color: \"+this.backgroundColorHover+\";\"),this._cssRules[\":hover .background\"]=a}var d=\"\";Color.isGradient(this.backgroundColorDown)?(d+=Color.createGradientStyle(this.backgroundColorDown),d+=\"background-color: transparent;\"):(d+=\"background-image: none; \",d+=\"background-color: \"+this.backgroundColorDown+\";\"),this._cssRules[\".background.down\"]=d}if(this.border&&(this._backgroundElement.style.borderColor=this.borderColor,this._backgroundElement.style.borderWidth=this.getBorderWidth()+\"px\"),this.shadow){var h=this.shadowAngle*(Math.PI/180),u=Math.round(this.getShadowDistance()*Math.cos(h)),l=Math.round(this.getShadowDistance()*Math.sin(h));celtra.styler.css(this._backgroundElement,\"boxShadow\",u+\"px \"+l+\"px \"+this.getShadowBlur()+\"px \"+this.shadowColor)}}t.appendChild(this._backgroundElement)},Button.prototype._createForeground=function(t){var e=this.callToActionText.trim().length>0;if(this._foregroundElement=document.createElement(\"div\"),addClass(this._foregroundElement,\"foreground\"),!this._useBackgroundImage&&this.border?(this._foregroundElement.style.borderWidth=this.getBorderWidth()+\"px\",this._textBorder=this.getBorderWidth()):this._textBorder=0,this._useForegroundImage){this._foregroundElement.className+=this.foregroundStretchImage?\" image-stretch\":\" image-fit\";var o=\"normal\",r=\"focus\",n=\"pressed\",s=function(t,e){var o=document.createElement(\"div\");addClass(o,t),o.style.backgroundImage=\"url(\"+e.src+\")\",this._foregroundElement.appendChild(o)}.bind(this);this.foregroundUpImage&&this.preloadImage(this.foregroundUpImage,function(t){s(o,t)}),this._hoverEnabled&&this.foregroundHoverImage&&this.preloadImage(this.foregroundHoverImage,function(t){s(r,t)}),this.foregroundDownImage&&this.preloadImage(this.foregroundDownImage,function(t){s(n,t)}),this._cssRules[\".foreground .\"+o]=\"display: block;\",this._cssRules[\".foreground .\"+r]=\"display: none;\",this._cssRules[\".foreground .\"+n]=\"display: none;\",this._hoverEnabled&&this.foregroundHoverImage&&(this._cssRules[\":hover .foreground .\"+o]=\"display: none;\",this._cssRules[\":hover .foreground .\"+r]=\"display: block;\",this._cssRules[\":hover .foreground .\"+n]=\"display: none;\"),this.foregroundDownImage&&(this._cssRules[\".foreground.down .\"+o]=\"display: none;\",this._cssRules[\".foreground.down .\"+r]=\"display: none;\",this._cssRules[\".foreground.down .\"+n]=\"display: block;\")}else e&&(this._foregroundElement.className+=\" call-to-action\",this._foregroundElement.textContent=this.callToActionText,this.initializeFont(),this._cssRules[\".foreground\"]=\"color: \"+this.textColor+\";\",this._hoverEnabled&&this.textColorHover&&(this._cssRules[\":hover .foreground\"]=\"color: \"+this.textColorHover+\";\"),this._cssRules[\".foreground.down\"]=\"color: \"+this.textColorDown+\";\");t.appendChild(this._foregroundElement)},Button.prototype.redrawLayout=function(){if(!this._useBackgroundImage){var t=this._borderRoundness;parseInt(t,10)>0&&(this._backgroundElement&&(this._backgroundElement.style.borderTopLeftRadius=t,this._backgroundElement.style.borderTopRightRadius=t,this._backgroundElement.style.borderBottomLeftRadius=t,this._backgroundElement.style.borderBottomRightRadius=t),this._foregroundElement&&(this._foregroundElement.style.borderTopLeftRadius=t,this._foregroundElement.style.borderTopRightRadius=t,this._foregroundElement.style.borderBottomLeftRadius=t,this._foregroundElement.style.borderBottomRightRadius=t))}var e=this.callToActionText.trim().length>0;if(!this._useForegroundImage&&e){this.applyTextSize(this._foregroundElement.style);var o;if(\"undefined\"!=typeof this.lineSpacing){o=parseInt(this._foregroundElement.style.lineHeight,10);var r=this.callToActionText.split(/\\n/).length,n=o*r,s=this.sizeUsingTransforms()?this.getNaturalSize():this.size,i=(s.height-n)/2,a=i-this._textBorder;this._foregroundElement.style.paddingTop=a+\"px\"}else o=this.size.height-2*this._textBorder,this._foregroundElement.style.lineHeight=o+\"px\"}},Button.prototype.updateTextStyle=function(){var t=this.callToActionText.trim().length>0;!this._useForegroundImage&&t&&(this.applyTextStyle(this._foregroundElement.style),this._foregroundElement.style.color=\"\")},Button.prototype._handleTap=function(t){t.stopPropagation()},Button.prototype._handleTouchStart=function(){addClass(this._backgroundElement,\"down\"),addClass(this._foregroundElement,\"down\"),attach(this.parentUnit.node,\"touchend\",this._handleTouchEnd),this._experimentButtonStyle&&this._experimentButtonStyle.trackSuccess()},Button.prototype._handleTouchEnd=function(){removeClass(this._backgroundElement,\"down\"),removeClass(this._foregroundElement,\"down\"),detach(this.parentUnit.node,\"touchend\",this._handleTouchEnd)},Button.prototype._applyExperiments=function(){this._experimentButtonStyle=this._copyChosenExperimentProperties(\"ButtonStyle\")};;\nfunction Texty(){}inherit(Texty,ScreenObject),extend(Texty.prototype,TextStyleIntegrator),Texty.toString=function(){return\"[Clazz Texty]\"},Texty.prototype.toString=function(){return\"[Texty \"+this.localId+\"]\"},Texty.prototype.awake=function(){Texty.uber.awake.call(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)},Texty.prototype.createNode=function(){var t=Texty.uber.createNode.call(this),e=this.getLetterSpacing;if(this.getLetterSpacing=function(){return this.responsiveFont?this._adjustedFontSize*this._fontSizeFactor/this._characterSpacingFactor:e.call(this)},this.scroller=null,this._privateApiTracked={},this._autoscrollTimeouts=[],this._autoscrolling=null,this._listeningForTouches=null,this._scrollContainer=null,this._textContainer=null,this._textToSet=null,this._sanitizeText=!0,this._adjustedFontSize=this.getNaturalFontSize(),this._lineHeightFactor=1,this._characterSpacingFactor=1,this._fontSizeFactor=1,this.dynamicContentEnabled){var i=\"\";null!=this.feedFieldKey&&\"string\"==typeof creative.runtimeParams.dynamicContent[this.feedFieldKey]&&(i=creative.runtimeParams.dynamicContent[this.feedFieldKey]),this.text=i}this._initialText=this.text,this._initialScaleFont=this.scaleFont,this._scrollContainer=document.createElement(\"div\"),this._scrollContainer.className=\"scroll-container\",this._textContainer=document.createElement(\"div\"),this._textContainerClone=document.createElement(\"div\"),this._textContainerClone.style.display=\"none\",this._textContainerResponsive=document.createElement(\"div\"),this._textContainerResponsive.style.visibility=\"hidden\";var n=/^((?!.*chrome).)*safari/i.test(navigator.userAgent);return desktop()&&(deviceInfo.browser.safari()||n)&&(this._textContainer.style.webkitFontSmoothing=celtra.isHighDensityDisplay()?\"subpixel-antialiased\":\"antialiased\",this._textContainerClone.style.webkitFontSmoothing=celtra.isHighDensityDisplay()?\"subpixel-antialiased\":\"antialiased\",this._textContainerResponsive.style.webkitFontSmoothing=celtra.isHighDensityDisplay()?\"subpixel-antialiased\":\"antialiased\"),(deviceInfo.browser.chrome(null,\"48\")||\"Samsung Browser\"===deviceInfo.browser.name)&&(this._textContainer.style.textRendering=\"geometricPrecision\",this._textContainerClone.style.textRendering=\"geometricPrecision\",this._textContainerResponsive.style.textRendering=\"geometricPrecision\"),this.scrollable&&(this.scroller=new Scroller(t,this._textContainer,{direction:\"vertical\",animating:!0,easing:!0,locking:!1,scrollbarPosition:this.scrollbarPosition,scrollbarColor:this.scrollbarColor})),this.initializeFont(),this._scrollContainer.appendChild(this._textContainer),this._scrollContainer.appendChild(this._textContainerClone),this._scrollContainer.appendChild(this._textContainerResponsive),t.appendChild(this._scrollContainer),this._startListeningForTouches(),t},Texty.prototype._appear=function(){this._handleSizeUpdate()},Texty.prototype.redrawLayout=function(){this._handleSizeUpdate()},Texty.prototype._handleSizeUpdate=function(){this._applyTextSize(),this._updateText()},Texty.prototype._applyTextSize=function(){this.responsiveFont||(this.applyTextSize(this._textContainer.style),this.applyTextSize(this._textContainerClone.style)),this._alignText()},Texty.prototype._alignText=function(){var t=this.usePadding?2:0,e=t,i=t,n=parseInt(this._textContainer.style.paddingLeft,10),o=parseInt(this._textContainer.style.paddingRight,10);if(\"undefined\"!=typeof this.scaleFont&&this.scaleFont&&(\"right\"!=this.textAlign||isNaN(n)?\"left\"!=this.textAlign||isNaN(o)||(i=o-t):e=n-t),[this._textContainer,this._textContainerClone].forEach(function(n){n.style.paddingBottom=t+\"px\",n.style.paddingLeft=Math.max(e,t)+\"px\",n.style.paddingRight=Math.max(i,t)+\"px\"}),this.scrollable||this._scrollContainer.offsetHeight<=this._textContainer.offsetHeight||\"undefined\"==typeof this.textAlignVertical)return void(this._textContainer.style.paddingTop=t+\"px\");this._textContainerClone.style.display=\"inline\",this._textContainerClone.style.paddingTop=0,this._textContainerClone.style.height=0;var s=this.scrollable?0:Number(this.textAlignVertical),a=this.getNaturalSize().height,h=0===s?0:this._textContainerClone.scrollHeight,r=Math.max(0,(a-h)*s/100),l=0;r=isNaN(r)?0:r,l=s>50&&a>h?-t:50==s&&a>h?t/2:t,this._textContainer.style.marginTop=r+l+\"px\",this._textContainer.style.paddingTop=\"0px\",this._textContainerClone.style.display=\"none\"},Texty.prototype._getResponsiveScrollHeight=function(){var t=this._textContainerResponsive.getBoundingClientRect();return this._textContainerResponsive.scrollHeight+(parseInt(t.height,10)-t.height)*this._fontSizeFactor},Texty.prototype._applyAdjustedFontSizeStyle=function(t){t.style.fontSize=this._adjustedFontSize*this._fontSizeFactor+\"px\",t.style.lineHeight=this._adjustedFontSize*this._fontSizeFactor/this._lineHeightFactor+\"px\",t.style.letterSpacing=this._adjustedFontSize*this._fontSizeFactor/this._characterSpacingFactor+\"px\"},Texty.prototype._adjustFontSize=function(){if(this.responsiveFont&&!hasClass(this.node,\"animated\")){var t=this.usePadding?2:0,e=.5,i=this.getNaturalSize(),n=this.getFontSize(),o=this.getNaturalFontSize(),s=Math.max(Math.round(o*e),1);this._fontSizeFactor=n/o;var a=i.width-2*t*this._fontSizeFactor,h=i.height-2*t*this._fontSizeFactor;for(this._adjustedFontSize=o,this._lineHeightFactor=n/Math.max(1,this.getLineSpacing()+n),this._characterSpacingFactor=n/this.getNaturalLetterSpacing(),this._textContainerResponsive.style.width=a+\"px\",this._textContainerResponsive.style.height=h+\"px\",this._applyAdjustedFontSizeStyle(this._textContainerResponsive),this.applyTextStyle(this._textContainerResponsive.style),this._textContainerResponsive.innerText=this.text;this._getResponsiveScrollHeight.call(this)<=h&&this._adjustedFontSizeh&&this._adjustedFontSize>s;)this._adjustedFontSize--,this._applyAdjustedFontSizeStyle(this._textContainerResponsive);this._applyAdjustedFontSizeStyle(this._textContainer),this._applyAdjustedFontSizeStyle(this._textContainerClone)}},Texty.prototype.updateTextStyle=function(){this.applyTextStyle(this._textContainer.style),this.applyTextStyle(this._textContainerClone.style),this._textContainer.style.whiteSpace=\"pre-wrap\",this._textContainerClone.style.whiteSpace=\"pre-wrap\",this._textContainerResponsive.style.whiteSpace=\"pre-wrap\"},Texty.prototype._updateText=function(){var t=this._sanitizeText?htmlentitize(this.text.toString()):this.text;this._textContainer.innerHTML=t,this._textContainerClone.innerHTML=t,this._adjustFontSize(),this._alignText(),this.scrollable&&(this.scroller.redraw(),this.scroller.scrollTo(0,0,!1),this.autoscrollEnabled&&(this._resetAutoScroll(),this._createAutoScroll()))},Texty.prototype._createAutoScroll=function(){var t=this.scroller.getMaxScroll();defer(function(){this.scroller.scrollTo(t.left,t.top,!0,this.autoscrollDuration,!0,function(){\"return\"===this.autoscrollConclusion?this.scroller.scrollTo(0,0,!0,this.autoscrollDuration,!0):\"loop\"===this.autoscrollConclusion&&(this._autoscrolling=!0,e())}.bind(this))}.bind(this),this.autoscrollDelay);var e=function(){this._autoscrolling&&this.scroller.scrollTo(0,0,!0,this.autoscrollDuration,!0,function(){this.scroller.scrollTo(t.left,t.top,!0,this.autoscrollDuration,!0,e)}.bind(this))}.bind(this)},Texty.prototype._resetAutoScroll=function(){this._autoscrolling=!1},Texty.prototype._handleTouchStart=function(t){t.preventDefault(),new ActionContext(this,!0).trackUserInteraction(),this.scrollable&&(this._resetAutoScroll(),t.stopPropagation(),this.scroller._handleTouchStart(t),attach(this.parentUnit.node,\"touchmove\",this._handleTouchMove),attach(this.parentUnit.node,\"touchend\",this._handleTouchEnd),attach(this.parentUnit.node,\"touchcancel\",this._handleTouchCancel))},Texty.prototype._handleTouchMove=function(t){t.preventDefault(),this.scroller._handleTouchMove(t)},Texty.prototype._handleTouchEnd=function(t){t.preventDefault(),this.scroller._handleTouchEnd(t),detach(this.parentUnit.node,\"touchmove\",this._handleTouchMove),detach(this.parentUnit.node,\"touchend\",this._handleTouchEnd),detach(this.parentUnit.node,\"touchcancel\",this._handleTouchCancel)},Texty.prototype._handleTouchCancel=function(t){this._handleTouchEnd(t)},Texty.prototype.positionUsingTransforms=retTrue,Texty.prototype.sizeUsingTransforms=retTrue,Texty.prototype.getNaturalSize=function(){return this.originalSize},Texty.prototype.getNaturalFontSize=function(){return this.fontSize},Texty.prototype.getNaturalLetterSpacing=function(){return this.letterSpacing},Texty.prototype._startListeningForTouches=function(){this.scrollable&&!this._listeningForTouches&&(attach(this._textContainer,\"touchstart\",this._handleTouchStart),this._listeningForTouches=!0)},Texty.prototype._stopListeningForTouches=function(){this._listeningForTouches&&(detach(this._textContainer,\"touchstart\",this._handleTouchStart),this._listeningForTouches=!1)},Texty.prototype._setText=function(t){this._sanitizeText=!1,this.text=t,this.scaleFont&&(this.scaleFont=!1),this.hidden?this._textToSet=!0:(this._updateText(),this._applyTextSize())},Texty.prototype.showAction=function(t,e,i){Texty.uber.showAction.call(this,t,e,function(){this._startListeningForTouches(),this._textToSet&&(this._textToSet=!1,this._updateText()),i()}.bind(this))},Texty.prototype.hideAction=function(t,e,i){Texty.uber.hideAction.call(this,t,e,function(){this._stopListeningForTouches(),i()}.bind(this))},Texty.prototype.resetAction=function(t,e,i){this._sanitizeText=!0,Texty.uber.resetAction.call(this,t,e,function(){this.hidden||this._startListeningForTouches(),this.text=this._initialText,this.scaleFont=this._initialScaleFont,this._handleSizeUpdate(),i()}.bind(this))},Texty.prototype.setTextAction=function(t,e,i){this._setText(e.text),i()};;\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,a=0,r=this._defaultValues.roundness;if(\"number\"==typeof this.roundness&&(r=this.roundness),r>0){var s=Math.min(this.getNaturalSize().height,this.getNaturalSize().width),o=s/2,i=Math.max(this.getNaturalSize().height,this.getNaturalSize().width),h=i/2;if(50>r){var d=r/50;e=o*d}else{var p=(r-50)/50,n=(h-o)*p,u=o+n;t=this.getNaturalSize().width==s?o:u,a=this.getNaturalSize().height==s?o:u}}return this.shadow&&ios(\"8\")&&window.devicePixelRatio>=3&&(1>e&&(e=1),1>t&&(t=1),1>a&&(a=1)),50>r?e+\"px\":t+\"px \"+a+\"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);if(this._privateApiTracked={},e.className+=\" touchable\",this._shapey=document.createElement(\"div\"),this.backgroundColor)if(Color.isGradient(this.backgroundColor)){var t=Color.createGradientStyle(this.backgroundColor);this.addStyle({\".gradient-shapey\":t}),addClass(this._shapey,\"gradient-shapey\")}else this._shapey.style.backgroundColor=this.backgroundColor;if(this.border){var a=\"undefined\"!=typeof this.borderColor?this.borderColor:this._defaultValues.borderColor,r=\"number\"==typeof this.borderWidth?this.borderWidth:this._defaultValues.borderWidth;this._shapey.style.borderColor=a,this._shapey.style.borderStyle=\"solid\",this._shapey.style.borderWidth=r+\"px\"}if(this.shadow){var s=(\"number\"==typeof this.shadowAngle?this.shadowAngle:this._defaultValues.shadowAngle)*(Math.PI/180),o=\"number\"==typeof this.shadowBlur?this.shadowBlur:this._defaultValues.shadowBlur,i=\"undefined\"!=typeof this.shadowColor?this.shadowColor:this._defaultValues.shadowColor,h=\"number\"==typeof this.shadowDistance?this.shadowDistance:this._defaultValues.shadowDistance,d=Math.round(h*Math.cos(s)),p=Math.round(h*Math.sin(s));celtra.styler.css(this._shapey,\"boxShadow\",d+\"px \"+p+\"px \"+o+\"px \"+i)}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 File(t){this.url=t}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(){var t=this.getOriginalUrl(),i=/\\.png$/i.test(String(this.name)),e=/\\.jpe?g$/i.test(String(this.name));return this.blobHash&&(i||e)&&(t+=\"?transform=crush\",this.quality>-1&&(t+=\"&quality=\"+this.quality),this.optimizedWidth>0&&this.optimizedHeight>0&&(t+=\"&resize=\"+this.optimizedWidth+\"x\"+this.optimizedHeight)),t},File.prototype.getDataUri=function(t,i){t instanceof Function&&(i=t,t={});var e=this,r=this.getUrl();\"undefined\"!=typeof this.dataUri?defer(function(){i(e.dataUri)},0,\"File.getDataUri defer callback, has dataUri\"):creative.dataURIsEnabled||t.force?creative.batcher.getDataUri(r,i):defer(function(){i(r)},0,\"File.getDataUri defer callback, url\")},Object.defineProperty(File.prototype,\"width\",{get:function(){return this.retina?Math.round(this.meta.width/2):this.meta.width}}),Object.defineProperty(File.prototype,\"height\",{get:function(){return this.retina?Math.round(this.meta.height/2):this.meta.height}});;\nfunction Font(){}inherit(Font,FontBase),Font.toString=function(){return\"[Clazz Font]\"},Font.prototype.toString=function(){return\"[Font \"+this.localId+\"]\"};;\nfunction Group(){}inherit(Group,ScreenObject),Group.toString=function(){return\"[Clazz Group]\"},Group.prototype.toString=function(){return\"[Group \"+this.localId+\"]\"},Group.prototype.createNode=function(){var t=Group.uber.createNode.call(this);return this.incrementLoadingCount(),t.appendChild(this.content.getNode(this.decrementLoadingCount)),t},Group.prototype.getNestedContainers=function(){return[this.content]},Group.prototype.positionUsingTransforms=ios(\"8\")?retFalse:retTrue,Group.prototype.sizeUsingTransforms=retTrue,Group.prototype.getNaturalSize=function(){return this.originalSize},Group.prototype._appear=function(){this.appearNestedObjects()},Group.prototype._disappear=function(){this.disappearNestedObjects()};var ObjectGroup=Group;;\nvar Form={};Form.toString=function(){return\"[Clazz Form]\"},Form.submitAction=function(e,i,t){this.submitInProgress||(this.submitInProgress=!0,this.hasFailureCallback=i.onFailure?!1:!0,e.track({name:\"formSubmissionAttempted\",label:i.reportLabel}),Form.validateAction(e,{formElements:i.formElements,onSuccess:function(e,t){var r;if(\"table\"==i.submitTarget&&i.tableId)r=creative.apiUrl+\"formTables/\"+i.tableId+\"/rows\";else{if(\"url\"!=i.submitTarget||!i.url)return(i.onFailure||nullai)(e,t);r=i.url}var a={fields:{}};i.formElements.forEach(function(e){a.fields[e.fieldName]=e.getField()});var n=new XMLHttpRequest;n.open(\"POST\",r),n.setRequestHeader(\"Content-Type\",\"application/json; charset=utf-8\"),n.onreadystatechange=function(){if(4===n.readyState){var r=200<=n.status&&n.status<300;r&&e.track({name:\"formSubmissionSucceeded\",label:i.reportLabel});var a=r?i.onSuccess:i.onFailure;(a||nullai)(e,t),this.submitInProgress=!1}}.bind(this),n.send(JSON.stringify(a))}.bind(this),onFailure:function(e,t){(i.onFailure||nullai)(e,t),this.submitInProgress=!1}.bind(this)},t))},Form.validateAction=function(e,i,t){function r(){u=[];for(var e in creative.units){var i=creative.units[e];if(i.isAppearing){var t=i.currentScreen,r=t.node.querySelectorAll(\"input, textarea\");if(r)for(var a=0;a