!function n(t,e,r){function o(u,f){if(!e[u]){if(!t[u]){var c="function"==typeof require&&require;if(!f&&c)return c(u,!0);if(i)return i(u,!0);var s=new Error("Cannot find module '"+u+"'");throw s.code="MODULE_NOT_FOUND",s}var l=e[u]={exports:{}};t[u][0].call(l.exports,function(n){var e=t[u][1][n];return o(e?e:n)},l,l.exports,n,t,e,r)}return e[u].exports}for(var i="function"==typeof require&&require,u=0;ul){for(var t=0,e=f.length-s;e>t;t++)f[t]=f[t+s];f.length-=s,s=0}}f.length=0,s=0,c=!1}function o(n){var t=1,e=new a(n),r=document.createTextNode("");return e.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}function i(n){return function(){function t(){clearTimeout(e),clearInterval(r),n()}var e=setTimeout(t,0),r=setInterval(t,50)}}t.exports=e;var u,f=[],c=!1,s=0,l=1024,a=n.MutationObserver||n.WebKitMutationObserver;u="function"==typeof a?o(r):i(r),e.requestFlush=u,e.makeRequestCallFromTimer=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],5:[function(n,t,e){"function"!=typeof Promise.prototype.done&&(Promise.prototype.done=function(n,t){var e=arguments.length?this.then.apply(this,arguments):this;e.then(null,function(n){setTimeout(function(){throw n},0)})})},{}],6:[function(n,t,e){n("asap");"undefined"==typeof Promise&&(Promise=n("./lib/core.js"),n("./lib/es6-extensions.js")),n("./polyfill-done.js")},{"./lib/core.js":1,"./lib/es6-extensions.js":2,"./polyfill-done.js":5,asap:3}]},{},[6]); function AutoPlayerDetect(a,b,c,d,e){this.ADTYPE={WRAPPER:"Wrapper",INLINE:"InLine",INVALID:"InValid"},this.playerId="",this.adtag="",this.wrapperElement={},this.inlineElement={},this.domainPath=a,this.speedKbps=0,this.speedBps=0,this.isSecure=b,this.PLAYERTYPE={FLASH:"flash",HTML5:"html5"},this.xmlDataMap=new DataMap,this.filteredMediaSources=[],this.isXMLTag=!1,this.debugMode=c,this.errorURLTemplates=[],this.onAdErrorCallback=d,this.onErrorCallback=e,this.adId=[],this.sources=[],this.extParams=[],this.currentPlayerType="",this.responseTime=new Date,this.customTrackers=new Object,this.milestones=[],this.customScripts={},this.customTrackers={},this.imaCustomTracker=[],this.chaseWrapper=!0,this.hbrespXML="",this.adVerificationUrls={},this.creativePropertiesObj={_once:!1},this.recordedTime={startTime:null,responseTime:null}}function nullOrUndefined(a){return void 0===a||null==a}function ParallelProcessor(a,b,c,d,e,f,g,h,i,j,k,l,m){this.orderedVasts=[],this.waitForAdMaxMs=c.waitForAdMaxMs,this.selectionDelayMs=c.selectionDelayMs;var n=a.parentId;Object();this.dataModel=b,this.config=a,this.impressionOccured=!1,this.stopReceived=!1,this.startAdReceived=!1,this.currentIndex=0,this.activePlayerId=l,this.registerCallback=d,this.allFailedCallback=e,this.getApiMemory=f,this.hidePlayer=g,this.readyCallback=h,this.videoExtensions={},this.adReadyCallback=i,this.hasMoreAdsCallback=m,this.setSelectedPlayerType=k,this.waitForLimoStatMS=5e3,this.selectionTimerFired=!1,this.startDemandPartnerTimer=!1,this.loadPlayer=j;for(var o=0;o=11,f=b.os?b.os.split(" "):[0],g=f[f.length-1],h=g>=a;return!d||e&&h}}function ZOVVAsset(a,b){var c,d,e=13,f=Math.sqrt(2),g=0,h=1,i=2,j=3,k=4,l=5,m=6,n=7,o=8,p=9,q=10,r=11,s=12,t=13,u=500,v=a,w=0,x=$zovvObj.DEBUG?20:1,y=b.geometryViewabilityCalculator,z=function(){return null},A=function(){return null},B=new OVVBeaconSupportCheck;this.checkViewability=function(){var a=new OVVCheck;if(a.id=v,a.inIframe=$zovvObj.IN_IFRAME,a.geometrySupported=$zovvObj.geometrySupported,a.focus=R(),!d)return a.error="Player not found!",a;if(!0===C(a,d)){if(!$zovvObj.DEBUG)return a;a.cssViewabilityState=OVVCheck.UNVIEWABLE}if(!0===D(a,d)){if(!$zovvObj.DEBUG)return a;a.domViewabilityState=OVVCheck.UNVIEWABLE}if(!B.supportsBeacons()&&!1===a.geometrySupported&&(a.viewabilityState=OVVCheck.UNMEASURABLE,!$zovvObj.DEBUG))return a;if(a.geometrySupported){if(a.technique=OVVCheck.GEOMETRY,F(a,d),a.viewabilityState=a.percentViewable>=50&&a.focus?OVVCheck.VIEWABLE:OVVCheck.UNVIEWABLE,!$zovvObj.DEBUG)return a;a.geometryViewabilityState=a.viewabilityState}var b=L(0),c=O(0);if(b&&b.isViewable&&c){var e=K(c)&&b.isViewable();a.beaconsSupported=!e,a.beaconsSupported=!1}else a.beaconsSupported=!1;if(H())if(a.beaconsSupported){a.technique=OVVCheck.BEACON;var f=G(a);null===f?(a.viewabilityState=OVVCheck.UNMEASURABLE,$zovvObj.DEBUG&&(a.beaconViewabilityState=OVVCheck.UNMEASURABLE)):(a.viewabilityState=f?OVVCheck.VIEWABLE:OVVCheck.UNVIEWABLE,$zovvObj.DEBUG&&(a.beaconViewabilityState=f?OVVCheck.VIEWABLE:OVVCheck.UNVIEWABLE))}else a.viewabilityState=OVVCheck.UNMEASURABLE;else a.technique=OVVCheck.BEACON,a.viewabilityState=OVVCheck.NOT_READY;if($zovvObj.DEBUG)if(a.technique="",null===a.geometryViewabilityState&&null===a.beaconViewabilityState)a.viewabilityState=OVVCheck.UNMEASURABLE;else{var g=a.beaconViewabilityState===OVVCheck.VIEWABLE,h=a.cssViewabilityState===OVVCheck.VIEWABLE,i=a.domViewabilityState===OVVCheck.VIEWABLE,j=a.geometryViewabilityState===OVVCheck.VIEWABLE;a.viewabilityState=h||i||g||j?OVVCheck.VIEWABLE:OVVCheck.UNVIEWABLE}return a},this.beaconStarted=function(b){$zovvObj.DEBUG&&L(b).debug&&L(b).debug(),0!==b&&(w++,H()&&d["onJsReady"+a]())},this.dispose=function(){for(var a=1;a<=e;a++){var b=O(a);b&&(delete w[a],b.parentElement.removeChild(b))}clearInterval(window.$zovvObj.positionInterval),window.$zovvObj.removeAsset(this)},this.getId=function(){return v},this.getPlayer=function(){return d};var C=function(a,b){var c=window.getComputedStyle(b,null),d=c.getPropertyValue("visibility"),e=c.getPropertyValue("display");return("hidden"==d||"none"==e)&&(a.technique=OVVCheck.CSS_INVISIBILITY,a.viewabilityState=OVVCheck.UNVIEWABLE,!0)},D=function(a,b){var c=b.getBoundingClientRect(),d=12,e=c.left+d,f=c.right-d,g=c.top+d,h=c.bottom-d,i=Math.floor(c.left+c.width/2),j=Math.floor(c.top+c.height/2),k=[{x:e,y:g},{x:i,y:g},{x:f,y:g},{x:e,y:j},{x:i,y:j},{x:f,y:j},{x:e,y:h},{x:i,y:h},{x:f,y:h}];for(var l in k)if(k[l]&&k[l].x>=0&&k[l].y>=0&&(elem=document.elementFromPoint(k[l].x,k[l].y),null!=elem&&elem!=b&&!b.contains(elem)&&(overlappingArea=E(c,elem.getBoundingClientRect()),overlappingArea>0&&(a.percentObscured=100*E(c,elem.getBoundingClientRect()),a.percentObscured>50))))return a.percentViewable=100-a.percentObscured,a.technique=OVVCheck.DOM_OBSCURING,a.viewabilityState=OVVCheck.UNVIEWABLE,!0;return!1},E=function(a,b){var c=a.width*a.height;return Math.max(0,Math.min(a.right,b.right)-Math.max(a.left,b.left))*Math.max(0,Math.min(a.bottom,b.bottom)-Math.max(a.top,b.top))/c},F=function(a,b){a.percentObscured=a.percentObscured||0;var c=y.getViewabilityState(b,window);return c.error||(a.clientWidth=c.clientWidth,a.clientHeight=c.clientHeight,a.percentViewable=c.percentViewable-a.percentObscured,a.objTop=c.objTop,a.objBottom=c.objBottom,a.objLeft=c.objLeft,a.objRight=c.objRight),c},G=function(a){if(!H())return null;var b=0,c=0,f=0,g=0;a.beacons=new Array(e);var u=d.getClientRects?d.getClientRects()[0]:{top:-1,bottom:-1,left:-1,right:-1};a.objTop=u.top,a.objBottom=u.bottom,a.objLeft=u.left,a.objRight=u.right;for(var v=0;v<=e;v++)if(0!==v){var w=L(v),x=O(v),y=w.isViewable(),z=K(x);if(a.beacons[v]=y&&z,y)switch(b++,v){case i:case j:case k:case l:c++;break;case m:case n:case o:case p:f++;break;case q:case r:case s:case t:g++}}if(b===e)return!0;var A=a.beacons;return!1===A[h]?(g>=3||f>=3||c>=3)&&null:!0===A[h]&&(!0===A[i]&&!0===A[j]||!0===A[i]&&!0===A[k]||!0===A[j]&&!0===A[l]||!0===A[k]&&!0===A[l])||(!0===A[h]&&4==f||(!A[i]||!A[l]||A[m]&&A[q]&&A[h]&&A[t]&&A[p]?!(!A[k]||!A[j]||A[o]&&A[s]&&A[h]&&A[r]&&A[n])&&null:null))},H=function(){return!!d&&w===e},I=function(a){if(""!==(a=BEACON_SWF_URL)&&"BEACON_SWF_URL"!==a){for(var b=0;b<=e;b++){var c=document.createElement("DIV");c.id="OVVBeaconContainer_"+b+"_"+v,c.style.position="absolute",c.style.zIndex=$zovvObj.DEBUG?99999:-99999;var d='\x3c!--[if !IE]>--\x3e\x3c!--';c.innerHTML=d,document.body.insertBefore(c,document.body.firstChild)}J.bind(this)(),this.positionInterval=setInterval(J.bind(this),u)}},J=function(){if(H()){var a=d.getClientRects()[0];if(!c||!a||c.left!==a.left||c.right!==a.right||c.top!==a.top||c.bottom!==a.bottom){c=a;for(var b=a.right-a.left,u=a.bottom-a.top,v=b/(1+f),w=u/(1+f),y=b/f,z=u/f,A=0;A<=e;A++){var B=a.left+document.body.scrollLeft,C=a.top+document.body.scrollTop;switch(A){case g:B=-1e5,C=-1e5;break;case h:B+=(b-x)/2,C+=(u-x)/2;break;case i:break;case j:B+=b-x;break;case k:C+=u-x;break;case l:B+=b-x,C+=u-x;break;case m:B+=(b-y)/2,C+=(u-z)/2;break;case n:B+=(b-y)/2+y,C+=(u-z)/2;break;case o:B+=(b-y)/2,C+=(u-z)/2+z;break;case p:B+=(b-y)/2+y,C+=(u-z)/2+z;break;case q:B+=(b-v)/2,C+=(u-w)/2;break;case r:B+=(b-v)/2+v,C+=(u-w)/2;break;case s:B+=(b-v)/2,C+=(u-w)/2+w;break;case t:B+=(b-v)/2+v,C+=(u-w)/2+w}A>=m&&(B-=x/2,C-=x/2);var D=O(A);D.style.left=B+"px",D.style.top=C+"px"}}}},K=function(a){if(!a)return!1;var b=Math.max(document.body.clientWidth,window.innerWidth),c=Math.max(document.body.clientHeight,window.innerHeight),d=a.getClientRects()[0];return d.top0&&d.left0},L=function(a){return z(a)}.memoize(),M=function(a){return document.getElementById("OVVBeacon_"+a+"_"+v)},N=function(a){var b=document.getElementById("OVVFrame_"+v+"_"+a),c=null;return b&&(c=b.contentWindow),c},O=function(a){return A(a)}.memoize(),P=function(a){return document.getElementById("OVVBeaconContainer_"+a+"_"+v)},Q=function(a){return document.getElementById("OVVFrame_"+v+"_"+a)},R=function(){return("undefined"===document.hidden||!0!==document.hidden)&&(!!$zovvObj.IN_XD_IFRAME||(!window.top.document.hasFocus||window.top.document.hasFocus()))};d=function(){for(var b=document.getElementsByTagName("embed"),c=0;cj.height&&(k.height-=k.bottom-j.height),k.top<0&&(k.height+=k.top),k.left<0&&(k.width+=k.left),k.right>j.width&&(k.width-=k.right-j.width),f=Math.floor(k.width*k.height*100/i)}return{clientWidth:j.width,clientHeight:j.height,objTop:h.top,objBottom:h.bottom,objLeft:h.left,objRight:h.right,percentViewable:f}};var a=function(){for(var a=b(window),c=a.area,d=window;d!=window.top;)d=d.parent,viewPortSize=b(d),viewPortSize.area0&&(b.width=a.document.body.clientWidth),!isNaN(a.document.body.clientHeight)&&a.document.body.clientHeight>0&&(b.height=a.document.body.clientHeight),a.document.documentElement&&a.document.documentElement.clientWidth&&!isNaN(a.document.documentElement.clientWidth)&&(b.width=a.document.documentElement.clientWidth),a.document.documentElement&&a.document.documentElement.clientHeight&&!isNaN(a.document.documentElement.clientHeight)&&(b.height=a.document.documentElement.clientHeight),a.innerWidth&&!isNaN(a.innerWidth)&&(b.width=Math.min(b.width,a.innerWidth)),a.innerHeight&&!isNaN(a.innerHeight)&&(b.height=Math.min(b.height,a.innerHeight)),b.area=b.height*b.width,b},c=function(a,b){var e=b,f=b.parent,g={width:0,height:0,left:0,right:0,top:0,bottom:0};if(a){var h=d(a,b);if(h.width=h.right-h.left,h.height=h.bottom-h.top,g=h,e!=f){var i=c(e.frameElement,f);i.bottom0){var f=this.makeMediaFileFormat(a.sources);d=this.detectMediaFiles(f,this.getBandWidth(),this.isSecure),c.checkPlayerCanPlay(d,e.bind(this))}else this.onErrorCallbackHandler(ZAUTOPLAYERERROR.CONFIGURATION.ERRORCODE,ZAUTOPLAYERERROR.CONFIGURATION.ERRORMSG);else this.processAdTags(this.adtag,e.bind(this))},processAdTags:function(a,b){var c=this,d=function(a,e,f,g){if(null==a&&null!=e){g||c.xmlDataMap.putXML(f,e);var h=zUtils.parseXMLFromString(e);if(0==h.errorCode){var i=c.validateResponse(h.xmldoc);if(zUtils.log("log","autoPlayerDetect::successCallback::adType = "+i,c.debugMode),i==c.ADTYPE.WRAPPER){var j=c.getWrapperURL(c.wrapperElement);c.hbEnable?(c.hbEnable=!1,d(null,c.hbrespXML,j,!1)):c.processAdTags(j,b)}else if(i==c.ADTYPE.INLINE){var k=c.getMediaFiles(c.inlineElement);if(nullOrUndefined(k)||k.length<1)c.onErrorCallbackHandler(ZAUTOPLAYERERROR.EMPTYORINVALIDVAST.ERRORCODE,ZAUTOPLAYERERROR.EMPTYORINVALIDVAST.ERRORMSG);else{var l=c.getBandWidth(),m=c.detectMediaFiles(k,l,c.isSecure);c.checkPlayerCanPlay(m,b)}}else c.onErrorCallbackHandler(ZAUTOPLAYERERROR.EMPTYORINVALIDVAST.ERRORCODE,ZAUTOPLAYERERROR.EMPTYORINVALIDVAST.ERRORMSG)}else c.onErrorCallbackHandler(ZAUTOPLAYERERROR.EMPTYORINVALIDVAST.ERRORCODE,ZAUTOPLAYERERROR.EMPTYORINVALIDVAST.ERRORMSG)}else c.onErrorCallbackHandler(ZAUTOPLAYERERROR.EMPTYORINVALIDVAST.ERRORCODE,ZAUTOPLAYERERROR.EMPTYORINVALIDVAST.ERRORMSG)};nullOrUndefined(a)||""==a?this.onErrorCallbackHandler(ZAUTOPLAYERERROR.CONFIGURATION.ERRORCODE,ZAUTOPLAYERERROR.CONFIGURATION.ERRORMSG):(this.isXMLTag=!1,-1!=a.indexOf("0){for(var k=0,b=j.length;k0&&(f=this.parseNodeText(c[0]),this.extParams[zUtils.extensionParams[l]]="undefined"!==f?f:"");g=this.childsByName(j[k],"CustomTracking"),this.imaCustomTracker=this.getIMACustomTrackers(this.imaCustomTracker,g),e=this.childsByName(j[k],"ZCustomScripts"),this.customScripts=this.getCustomScript(this.customScripts,e),h=this.childsByName(j[k],"Milestones"),this.milestones=this.getMileStones(this.milestones,h),i=this.childsByName(j[k],"CreativeProperties"),void 0!==i&&i.length>0&&!this.creativePropertiesObj._once&&(this.creativePropertiesObj=this.getCreativeProp(i)),nullOrUndefined(this.creativePropertiesObj)?this.creativePropertiesObj={_once:!0}:this.creativePropertiesObj._once=!0,d=this.childsByName(j[k],"ZCustomTrackingEvents"),this.customTrackers=this.getCustomTrackers(this.customTrackers,d)}zUtils.log("log","autoPlayerDetect:: customTrackers ",this.debugMode),zUtils.log("log",this.customTrackers,this.debugMode)}},getAdVerificationElement:function(a){zUtils.log("log","autoPlayerDetect::getAdVerificationElement ",this.debugMode);var b,c=a.childNodes;if(void 0!==a.childNodes&&c.length>0){for(var d=0,e=c.length;d0)for(var d=0,e=c.length;d0)for(var d=0,e=c.length;d0)for(var f=0,g=ref1.length;f0)for(var c=0,d=b.length;c0)for(var f=0,g=e.length;f0){var m={};c=b.childNodes;for(var e=0;e0)for(var f=0,g=e.length;fb.bitrate});for(var q=0;q=0&&("maybe"===d||"probably"===d),u=o.indexOf(s)>=0;if((t||u)&&a[q].deliveryType!==MediaDeliveryType.STREAMING){if(c&&!l(m,h))continue;e.push(a[q]),(0==b||b>a[q].bitrate)&&f.push(a[q]),i=!0}}if(!i)for(var q=0;q=0){if(c&&!l(m,h))continue;e.push(a[q]),(0==b||b>a[q].bitrate)&&f.push(a[q]),j=!0}}f.length>0&&(e=f,e.sort(function(a,b){return a.bitrate "+c,b.config.debugMode),b.dataModel.putPlayer(c,{},!1,!1,!1,!1,!1,"",!1,-1);var e=function(a,c,d,e){b.dataModel.setPlayerObj(a,c),b.dataModel.setParsedEventsTrackerObj(a,e),b.attachCallbacks(c)};b.createPlayers(d,c,e)}},createPlayers:function(a,b,c){var d=this,e=new Object,f=a;if(f.type.toLowerCase()===zUtils.PLAYERTYPE.FLASH){var g=[],h={};h=new EventSeqLogger(f.id,f.debugPlayerLogMode,f.basePlayerStartTime);var i=new ZZMilestones([]);try{new MacroProcessor(f.id,h,i,f.debugRandomiationObj.debugPlayerLogMode,f.debugRandomiationObj.isRandomization,f.debugSamplingPercentage,f.clientIP)}catch(a){zUtils.log("warn"," ParallelProcessor:: Failed in creating MacroProcessor Object ",f.debugMode),zUtils.log("error",a,f.debugMode)}f.debugPlayerLogMode=!1;var j={};d.loadPlayer(f.type.toLowerCase(),f,g,h,function(a){c(f.id,a,e,g)},j)}else{if(f.type.toLowerCase()!==zUtils.PLAYERTYPE.HTML5&&f.type.toLowerCase()!==zUtils.PLAYERTYPE.AUTO)throw"invalid player type";var k=function(a,b,c,e){zUtils.log("log","ParallelProcessor::onAdErrorCallback",d.config.debugMode),zUtils.log("log","playerId = "+e+" adtag "+b,d.config.debugMode),zUtils.log("bizlogic",e+" AdError ",d.config.debugMode),d.onAdErrorHandler(e)},l=function(a,b){zUtils.log("log","ParallelProcessor::onErrorCallback",d.config.debugMode)},m=function(a,b,g,h){f.xmlDataMap=e.xmlDataMap.getXMlObj(),f.filteredMediaSources=e.filteredMediaSources,f.bandwidthSpeedKbps=e.getBandWidth(),d.loadPlayer(a,f,b,g,function(a){c(f.id,a,e,b)},h)};e=new AutoPlayerDetect(f.domainPath,f.isSecure,f.debugMode,k,l),e.getPlayerType(f,m)}},createPlayerConfig:function(a,b){var c=this.config,d=new Object;return d.type=a.type,d.id=b,d.width=a.width,d.height=a.height,d.pClient="vast",d.sources=[],d.playAdOnReady=!1,d.viewability=a.viewability,d.preLoadMedia=a.preLoadMedia,d.landingPageOnClick=a.landingPageOnClick,d.landingPageOnEsc=a.landingPageOnEsc,d.landingPageOnExit=a.landingPageOnExit,d.onclickFullscreen=a.onclickFullscreen,d.hideControls=a.hideControls,d.domainPath=c.domainPath,d.debugMode=a.debugMode,d.muteOnLoad=a.muteOnLoad,d.basePlayerStartTime=c.basePlayerStartTime,d.debugPlayerLogMode=c.debugPlayerLogMode,d.playerVer=c.playerVer,d.bandwidthSpeedKbps=c.bandwidthSpeedKbps,d.demandPartnerTimeout=c.parallel.demandPartnerTimeout,d.debugSamplingPercentage=c.debugSamplingPercentage,d.debugRandomiationObj=c.debugRandomiationObj,d.clientIP=c.clientIP,d},hasMoreAds:function(){for(var a=0,b=[],c=this.dataModel.getPlayerList(),d=0;d0&&b.hasMoreAdsCallback(d.length)}catch(a){zUtils.log("error"," adObj is undefined for adReadyCallback ",this.config.debugMode)}}},setStartAdReceived:function(){this.startAdReceived=!0,this.startNextPlayer()},setSelectionTimeout:function(){this.selectionTimerFired=!0,zUtils.log("log"," setSelectionTimeout occured ",this.config.debugMode)},disposeAllPlayers:function(){for(var a=this.dataModel.getPlayerList(),b=0;b=this.DEFAULT_ALLOWED_LOGEVT_LIMIT&&(a=a.splice(0,this.DEFAULT_ALLOWED_LOGEVT_LIMIT)),this.enableLogger?JSON.stringify(a):[]};var ZDefferedPromise=function(){function a(){var a=this;this.promise=new Promise(function(b,c){a.res=b,a.rej=c})}return a.prototype.getPromise=function(){return this.promise},a.prototype.resolve=function(a){this.res(a)},a.prototype.reject=function(a){this.rej(a)},a}(),zUtils=function(){};zUtils.log=function(a,b,c){if(c)switch(a.toLowerCase()){case"warn":console.warn(b);break;case"info":console.info(b);break;case"error":console.error(b);break;case"trace":console.trace(b);break;case"bizlogic":void 0!==console.bizlogic&&console.bizlogic(b);break;default:console.log(b)}},zUtils.createChildDiv=function(a,b){var c=document.createElement("div");c.style.visibility="visible",c.style.position="fixed",c.style.left="-99999px",c.style.top="-99999px";var d=document.createElement("div");d.id=b,c.appendChild(d),document.getElementById(a).appendChild(c)},zUtils.showChildDiv=function(a){var b=document.getElementById(a).parentNode;b.style.visibility="visible",b.style.position="",b.style.left="",b.style.top=""},zUtils.hideChildDiv=function(a){try{var b=document.getElementById(a).parentNode;b&&(b.style.visibility="hidden",b.style.position="fixed",b.style.left="-99999px",b.style.top="-99999px")}catch(a){}},zUtils.removePlayer=function(a){var b=document.getElementById(a);nullOrUndefined(b)||(b.parentNode.style.visibility="hidden",b.parentNode.style.display="none",b.parentNode.removeChild(b))},zUtils.clone=function(a){if(null==a||"object"!=typeof a)return a;var b=a.constructor();for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b},zUtils.PLAYERTYPE={FLASH:"flash",HTML5:"html5",AUTO:"auto"},zUtils.trackURLs=function(a){var b,c,d,e,f=[];for(b=0,c=a.length;b0?parseInt(a.substring(b+5,a.indexOf(".",b)))<10:navigator.userAgent.toString().toLowerCase().indexOf("trident/6")>-1},zUtils.isIE=function(){var a=navigator.userAgent.toLowerCase();return-1!=a.indexOf("msie")&&parseInt(a.split("msie")[1])},zUtils.isMsEdge=function(){return-1!=navigator.userAgent.indexOf("Edge")},zUtils.isFlashEnabled=function(){var a=!1;try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash")&&(a=!0)}catch(b){navigator.mimeTypes&&void 0!==navigator.mimeTypes["application/x-shockwave-flash"]&&navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(a=!0)}return a},zUtils.checkHtmlSupport=function(){return!!{video:!!document.createElement("video").play}.video},zUtils.checkiOSDevice=function(){return navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/iPad/i)},zUtils.extensionParams={VIDEO_DESCRIPTION:"VIDEO_DESCRIPTION",VIDEO_TITLE:"VIDEO_TITLE"},zUtils.VIEWABLE_EVENTS={IMPRESSION:"VIMPR",FIRSTQUARTILE:"V1STQUART",MIDPOINT:"VMIDPOINT",THIRDQUARTILE:"V3RDQUART"},zUtils.getCurrentTime=function(){return(new Date).getTime()},zUtils.addDays=function(a,b){return new Date(a.getTime()+24*b*60*60*1e3)},zUtils.createFriendlyiFrame=function(a,b,c){try{var d=document.getElementById(c),e=document.createElement("iframe");e.id="iframe_"+a,e.src="about:blank",e.setAttribute("allowfullscreen",!0),e.setAttribute("seamless",!0),e.setAttribute("frameborder",0),e.setAttribute("scrolling","no"),e.width="0px",e.height="0px",e.style.display="none",d.appendChild(e);var f=""+b+"",g=e.contentDocument||e.contentWindow.document;g.open("text/html","replace"),g.write(f),g.close()}catch(a){zUtils.log("warn",a,!0)}},zUtils.createNonFriendlyiframe=function(a,b){var c=document.createElement("iframe");return c.id="iframe_"+a,c.src=b,c.setAttribute("allowfullscreen",!0),c.setAttribute("seamless",!0),c.setAttribute("frameborder",0),c.setAttribute("scrolling","no"),c.width="0px",c.height="0px",c.style.display="none",c},zUtils.getRandMization=function(a,b,c){return Math.random()a&&!firstQFlag&&(firstQFlag=!0)},onAdTimeHandler:function(a,b,c,d,e,f,g,h){if(!this.isAdImpressionCalled)return this.stopCountingOthrEvnt=!0,!1;if(g<=1&&h<=1)return this.stopCountingOthrEvnt=!0,!1;this.vStartTime||(this.vStartTime=a);var i={firstQuartile:Math.round(25*b)/100,midpoint:Math.round(50*b)/100,thirdQuartile:Math.round(75*b)/100},j=0,k=0,l={};try{l=this.getViewability()}catch(a){f("warn"," Viewability::onAdTimeHandler Error::"+a)}this.isFullScreen&&(f("log","Viewability::isFullScreen"+this.isFullScreen+" percentage override to 100 and setfocus true "),l.percentViewable=100,l.focus=!0),f("log","Viewability::getViewability :: percentViewable "+l.percentViewable+" :: focus "+l.focus),l.percentViewablethis.UNVIEWABLESEC&&this.startTime&&(d&&(document.getElementById("viewability").style.color="#FF0000",document.getElementById("viewability").innerHTML="unviewable"),f("info"," Viewability --------------\x3e stopCountingOthrEvnt <----------------- "),this.stopCountingOthrEvnt=!0,this.iFlag&&(f("info"," Viewability --------------\x3e stopCheckingViewablity <----------------- "),this.stopCheckingViewablity=!0)),k=a-this.vStartTime,f("log"," sTime "+this.vStartTime+" position ==> "+a+" diffViewableImpr => "+k+" ===> "+this.iFlag),k>this.VIEWABLESEC&&!this.iFlag?(f("log","Viewability:: Tracked viewableImpression "+a),this.iFlag=!0,Viewability.appendLog("Viewable Impression",d),e(VIEWABLE_EVENTS.IMPRESSION)):k>this.VIEWABLESEC&&(this.vStartTime=a),null!=document.getElementById("percentViewable")&&d&&(document.getElementById("percentViewable").innerHTML=l.percentViewable),null!=document.getElementById("viewability")&&d&&(document.getElementById("viewability").innerHTML=l.viewabilityState),"vpaid"==c||""==c||this.stopCountingOthrEvnt||(i.firstQuartileVIEWABILITY INFO';b+='
ViewabilityViewable
',b+='
Viewable %100%
';var c=document.createElement("div");c.innerHTML=b,document.body.appendChild(c)},500)},Viewability.appendLog=function(a,b){if(b){var c=document.createElement("div");c.setAttribute("class","prop-row"),c.innerHTML=""+a+"",document.getElementById("viewability-content").appendChild(c)}},Viewability.loadCSS=function(a){var b='#viewability-main-container{position:fixed;display:block;width:292px;height:auto;top:5px;right:5px;border:1px solid #AAA;padding:5px;box-shadow: 0px 0px 8px #888888;background-color: white;font-family: "Roboto", sans-serif;font-size: 15px;}';b+="#viewability-main-container #viewability-wrapper{width:100%;height:auto;border: 1px solid #E8E8E8;}#viewability-wrapper #viewability-header{height:16px;background-color:#32aed7;padding:10px;}",b+="#viewability-header #viewability-logo{position: relative;top: -5px;}#viewability-header .viewability-title{color:#fff;text-transform:uppercase;float:right;font-size:14px;vertical-align:middle;}",b+="#viewability-content .prop-row{margin-left:5px;margin-right:5px;padding: 7px 5px;border-bottom:1px solid #E8E8E8;line-height:24px;}",b+="#viewability-content .prop-row:last-child{border-bottom: none;}.prop-row .prop-value{float:right;}",b+='.prop-value .tick{background: url("'+a+'HTML/app/assets/images/tick.png") no-repeat;width: 24px;height: 24px;display: inline-block;}',head=document.head||document.getElementsByTagName("head")[0],style=document.createElement("style"),style.type="text/css",style.styleSheet?style.styleSheet.cssText=b:style.appendChild(document.createTextNode(b)),head.appendChild(style)},void 0!==zzVideoPlayer&&void 0!==window.zzVideoPlayer);else{var zzVideoPlayer=function(a,b,c){function d(a){console&&console.log&&console.log(a)}function e(a){return void 0===a||null==a}this.id=a,this.parentDiv=document.getElementById(a),this.iframeElement=document.createElement("iframe"),this.companionDiv=document.createElement("div"),this.fullscreen=null,this.volume=1,this.currentWidth=0,this.currentHeight=0,this.isMuted=!1,this.controlsEnabled=!1,this.duration=0,this.currentPosition=0,this.config=b,this.isMobileDevice=!1,this.isiOSDevice=!1,this.isWindowsDevice=!1,this.onReadyCalled=!1,this.domainPath=b.domainPath+"HTML/app/",this.clickThrough=null,this.ipadDivStyle={},this.commanExtObj=c,this.config&&c&&c.CreativeProperties&&(this.config.creativeProps=c.CreativeProperties),zzVideoPlayer.PlayerStates={PLAYING:"PLAYING",PAUSED:"PAUSED",BUFFERING:"BUFFERING",STOP:"IDLE"},this.currentState=zzVideoPlayer.PlayerStates.STOP,this.onReady=function(){this.onReadyCalled=!0},this.onError=function(){},this.onPlay=function(){},this.onPause=function(){},this.onBuffer=function(){},this.onComplete=function(){},this.onVolume=function(){},this.onFullscreen=function(a){},this.onResize=function(){},this.onAdInteraction=function(){},this.onMuteChange=function(){},this.onAdReady=function(a){},this.onAdComplete=function(){},this.onAdStopped=function(){},this.onAdUserClose=function(){},this.onStartAd=function(){},this.onAdCompanions=function(){},this.onNonLinearAd=function(){},this.onBeforePlay=function(){},this.onAdImpression=function(){},this.onAdClick=function(){},this.onAdSkipped=function(){},this.onAdTime=function(){},this.onBeforeComplete=function(){},this.onAdError=function(){},this.onSeek=function(){},this.onAdStarted=function(){},this.onTime=function(){},this.onClick=function(){},this.onInitialized=function(){},this.onAdVideoFirstQuartile=function(){},this.onAdVideoMidpoint=function(){},this.onAdVideoThirdQuartile=function(){},this.onErrorTracked=function(a){},this.errorCallbackList=[],this.registerErrorCallback=function(a){},this.impressionCallbackList=[],this.getCreativeProperties=function(){if(this.commanExtObj.CreativeProperties)return this.commanExtObj.CreativeProperties},this.getCustomScripts=function(){if(this.commanExtObj.customScripts)return this.commanExtObj.customScripts},this.getAdVerificationElements=function(){if(this.commanExtObj.adVerificationUrls)return this.commanExtObj.adVerificationUrls},this.getVideoExtensionObj=function(){if(this.commanExtObj.videoExtensionObj)return this.commanExtObj.videoExtensionObj},this.registerImprCallback=function(a){},this.setConfig=function(a){try{e(this.iframeElement.contentWindow)||this.iframeElement.contentWindow.setConfig(a)}catch(a){console.error("videoplayer:: error calling setConfig ",a)}},this.isFullScreen=function(){try{if(!e(this.iframeElement.contentWindow))return this.fullscreen}catch(a){console.error("videoplayer:: error calling isFullScreen ",a)}},this.playPause=function(){try{e(this.iframeElement.contentWindow)||this.iframeElement.contentWindow.playPause()}catch(a){console.error("videoplayer:: error calling playPause",a)}},this.getVolume=function(){try{if(!e(this.iframeElement.contentWindow))return this.volume=100*this.iframeElement.contentWindow.getVolume(),this.volume}catch(a){console.error("videoplayer:: error calling getVolume",a)}},this.hideDefaultControls=function(){try{e(this.iframeElement.contentWindow)||this.iframeElement.contentWindow.hideDefaultControls(!0)}catch(a){console.error("videoplayer:: error calling hideDefaultControls ",a)}},this.showDefaultControls=function(){try{e(this.iframeElement.contentWindow)||this.iframeElement.contentWindow.hideDefaultControls(!1)}catch(a){console.error("videoplayer:: error calling showDefaultControls ",a)}},this.setVolume=function(a){try{e(this.iframeElement.contentWindow)||this.iframeElement.contentWindow.setVolume(a)}catch(a){console.error("videoplayer:: error calling setVolume ",a)}},this.mute=function(a){try{e(this.iframeElement.contentWindow)||this.iframeElement.contentWindow.setMuted(a)}catch(a){console.error("videoplayer:: error calling setmute ",a)}},this.isMute=function(){try{if(!e(this.iframeElement.contentWindow))return this.iframeElement.contentWindow.isMuted()}catch(a){console.error("videoplayer:: error calling isMuted ",a)}},this.play=function(a){try{e(this.iframeElement.contentWindow)||this.iframeElement.contentWindow.playEvent(a)}catch(a){console.error("videoplayer:: error calling play ",a)}},this.pause=function(){try{e(this.iframeElement.contentWindow)||this.iframeElement.contentWindow.pause()}catch(a){console.error("videoplayer:: error calling pause ",a)}},this.stop=function(){try{e(this.iframeElement.contentWindow)||this.iframeElement.contentWindow.stop()}catch(a){console.error("videoplayer:: error calling stop ",a)}},this.seek=function(a){try{e(this.iframeElement.contentWindow)||this.iframeElement.contentWindow.seek(a)}catch(a){console.error("videoplayer:: error calling seek ",a)}},this.getControlsState=function(){try{if(!e(this.iframeElement.contentWindow))return this.iframeElement.contentWindow.areControlsEnabled()}catch(a){console.error("videoplayer:: error calling getControlsState ",a)}},this.getControlsEnabled=function(){try{if(!e(this.iframeElement.contentWindow))return this.iframeElement.contentWindow.areControlsEnabled()}catch(a){console.error("videoplayer:: error calling getControlsEnabled ",a)}},this.resize=function(a,b){try{var c=a,d=b,f=this.formatToNumber(b,this.parentDiv.style.height),g=this.formatToNumber(a,this.parentDiv.style.width);this.parentDiv.style.width=g,this.parentDiv.style.height=f,e(this.iframeElement.contentWindow)||this.iframeElement.contentWindow.resize(c,d)}catch(a){console.error("videoplayer:: error calling resize ",a)}},this.addButton=function(a,b,c,d,f,g,h,i,j){try{if(!e(this.iframeElement.contentWindow)){var k={};k.id=d,k.controlposition=f,k.width=i,k.height=j,k.toppadding=h,k.leftpadding=g,k.image=a,k.classname=b,k.functionname="callback_"+d,k.controlHandler=c,this.iframeElement.contentWindow.addButton(k)}}catch(a){console.error("videoplayer:: error calling addButton ",a)}},this.addTextButton=function(a,b,c,d,f,g,h,i,j){try{if(!e(this.iframeElement.contentWindow)){var k={};k.id=d,k.controlposition=f,k.width=i,k.height=j,k.toppadding=h,k.leftpadding=g,k.template=a,k.classname=b,k.functionname="callback_"+d,k.controlHandler=c,this.iframeElement.contentWindow.addButton(k)}}catch(a){console.error("videoplayer:: error calling addButton ",a)}},this.getControlsState=function(){try{if(!e(this.iframeElement.contentWindow))return this.iframeElement.contentWindow.areControlsEnabled()}catch(a){console.error("videoplayer:: error calling getControlsState ",a)}},this.hideButton=function(a){try{e(this.iframeElement.contentWindow)||this.iframeElement.contentWindow.hideButton(a)}catch(a){console.error("videoplayer:: error calling hideButton ",a)}},this.showButton=function(a){try{e(this.iframeElement.contentWindow)||this.iframeElement.contentWindow.showButton(a)}catch(a){console.error("videoplayer:: error calling showButton ",a)}},this.deleteButton=function(a){try{e(this.iframeElement.contentWindow)||this.iframeElement.contentWindow.deleteButton(a)}catch(a){console.error("videoplayer:: error calling deleteButton ",a)}},this.playAd=function(a){try{var b=!1;-1!=a.indexOf("=window.pageYOffset&&a.left>=window.pageXOffset&&a.top+a.height<=window.pageYOffset+window.innerHeight&&a.left+a.width<=window.pageXOffset+window.innerWidth},this.isPartialyViewable=function(){var a=this.getViewSize();return a.topwindow.pageYOffset&&a.left+a.width>window.pageXOffset},this.getViewSize=function(){var a={},b=this.iframeElement;for(a.top=b.offsetTop,a.left=b.offsetLeft,a.width=b.offsetWidth,a.height=b.offsetHeight;b.offsetParent;)b=b.offsetParent,a.top+=b.offsetTop,a.left+=b.offsetLeft;return a},this.isiOSFirefox=function(){return navigator.userAgent.toString().toLowerCase().indexOf("fxios")>-1},this.isIphoneDevice=function(){var a,b,c,d=navigator.userAgent;return d.match(/iPhone/i)||d.match(/iPad/i)?(b="iOS",a=d.indexOf("OS ")):d.match(/Android/i)?(b="Android",a=d.indexOf("Android ")):b="unknown",c="iOS"===b&&a>-1?d.substr(a+3,3).replace("_","."):"Android"===b&&a>-1?d.substr(a+8,3):"unknown","iOS"===b&&c>=8},this.getIframeContent=function(){var c="";this.isIphoneDevice()&&(c='