window.aps=window.aps||{}; if(aps.cmd){throw new Error("loadAds.js already loaded") }aps.cfg=aps.cfg||{version:"22.7.1",logToConsole:false,allAds:[],is:{},multi:{},multiAds:[]}; aps.cfg.version="22.7.1";(function(){aps.sitesWithoutCallback=["datebook.sfchronicle.com","education.seattlepi.com","healthyeating.sfgate.com","homeguides.sfgate.com","livehealthy.chron.com","preview.houstonchronicle.com","pyme.lavoztx.com","smallbusiness.chron.com","work.chron.com","www.beaumontenterprise.com","www.bigrapidsnews.com","www.chron.com","www.countytimes.com","www.ctinsider.com","www.ctpost.com","www.darientimes.com","www.expressnews.com","www.fairfieldcitizenonline.com","www.greenwichtime.com","www.houstonchronicle.com","www.lakecountystar.com","www.lmtonline.com","www.manisteenews.com","www.michigansthumb.com","www.middletownpress.com","www.milfordmirror.com","www.mrt.com","www.myjournalcourier.com","www.myplainview.com","www.mysanantonio.com","www.ncadvertiser.com","www.newmilfordspectrum.com","www.newstimes.com","www.nhregister.com","www.ourmidland.com","www.recordpatriot.com","www.registercitizen.com","www.seattlepi.com","www.sfchronicle.com","www.sfgate.com","www.sheltonherald.com","www.stamfordadvocate.com","www.theheraldreview.com","www.thehour.com","www.theintelligencer.com","www.theridgefieldpress.com","www.thetelegraph.com","www.timesunion.com","www.trumbulltimes.com","www.westport-news.com","www.yourconroenews.com","www.wiltonbulletin.com"]; window.debugSGA=window.debugSGA||false; window.APSpageUrl=window.APSpageUrl||""; window.devices={DESKTOP:1,MOBILE:2,TABLET:3}; window.prebid_source={CLIENT:1,SERVER:2,SERVER_COMPATIBLE:3}; aps.cmd=[]; aps.juiceLog=[]; aps.events=[]; aps.event={}; aps.app_events={}; aps.logtype={}; aps.implementSRA=true; aps.topWindow=window; aps.topAps=aps.topWindow.aps; aps.o={}; aps.fn=aps.fn||{}; aps.cfg.leafsSites=["education.seattlepi.com","healthyeating.sfgate.com","homeguides.sfgate.com","livehealthy.chron.com","pyme.lavoztx.com","smallbusiness.chron.com","work.chron.com"]; JuicePageUrl=document.location.href.replace("/?","?"); window.googletag=window.googletag||{}; googletag.cmd=googletag.cmd||[]; window.pbjs=window.pbjs||{}; pbjs.que=pbjs.que||[]; pbjs.bidderSettings=pbjs.bidderSettings||{}; window.HDN=window.HDN||{}; HDN.dataLayer=HDN.dataLayer||{}; HDN.dataLayer.ads=HDN.dataLayer.ads||{}; HDN.dataLayer.content=HDN.dataLayer.content||{}; HDN.dataLayer.href=HDN.dataLayer.href||{}; HDN.dataLayer.presentation=HDN.dataLayer.presentation||{}; HDN.dataLayer.sharing=HDN.dataLayer.sharing||{}; HDN.dataLayer.source=HDN.dataLayer.source||{}; HDN.dataLayer.paywall=HDN.dataLayer.paywall||{}; window.loadAd_UrlLocation=window.loadAd_UrlLocation||"https://aps.hearstnp.com/"; window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments) }; ga.l=+new Date; ga("create","UA-1616916-99","auto","pb") })();(function(){aps.o.kvp=function(a){this.key=a; this.value=[] }; aps.o.baseAd=function(a,e,b,d,c){this.code=a; this.width=e; this.height=b; this.sizeMappings=d; this.kvps=c; if(aps.cfg.allAds){aps.cfg.allAds[a]=this }}; aps.o.bid=function(j,a,c,h,b,g){var f={}; var d=["amznbid","amzniid","amznp","amznsz","auctionId","slotID","adserverTargeting","cpm","ttl","originalCpm"]; Object.entries(b).map(function(l){if(d.includes(l[0])){f[l[0]]=l[1] }}); if(!g){g="banner" }var i=b.size; if(i=="1x1"){if(a.stringSizes.includes("300x250")){i="300x250" }else{if(a.stringSizes.includes("728x90")){i="728x90" }else{if(a.stringSizes.includes("320x50")){i="320x50" }}}}this.ad=a.code; this.adId=(j=="a9")?b.amzniid:b.adId; this.bid=(j=="a9")?null:parseFloat(b.cpm).toFixed(2); this.bidder=c; this.mediaType=g; this.position=a.position; this.ref=h; this.size=b.size; this.source=j; this.url=a.getPage().href; this.obj=f; var k=new Date().valueOf(); var e=k-aps.cfg.bid.prefetch.timeoutPadding; if(j=="a9"){e+=10*60*1000 }else{e+=b.ttl*1000 }this.expires=e; this.received=k; this.viewability=false; this.won=false; this.selected=false; this.sent=false; aps.fn.logInfo("*BID* "+aps.fn.fixLen(this.ad,10)+aps.fn.fixLen(this.source+"/"+c,17)+" "+aps.fn.fixLen(b.amznbid||this.ref,10)+aps.fn.fixLen("["+this.mediaType+"]",10)+" id: "+this.adId.slice(-7)) }; aps.o.gamAd=function(a,h,c,g,e){this.code=a; this.width=h; this.height=c; this.sizeMappings=g; this.lowerCode=this.code.toLowerCase(); aps.fn.checkMultiType=function(i){var j=i.code.split("-")[0]; if(!aps.cfg.multiAds[j]){i.multiAd=false; i.multiType=null }else{i.multiAd=true; i.multiType=j }i.MultiCalled=false; aps.cfg.multi.enabled=true }(this); if(!aps.fn.toBeDisplayed(this)){aps.fn.logSkip(this.code,"will not show on this device"); this.exclude=true }if(!aps.fn.shouldPlaceAd(a)){aps.fn.logSkip(this.code,"excluded by query string"); this.exclude=true }if(!aps.fn.filterRevenueProfileAds(this.code)&&!this.multiAd){aps.fn.logSkip(this.code,"not included in revenueProfile"); this.exclude=true }if(!this.exclude){this.a9={}; this.a9.bids=[]; this.pb={}; this.pb.bids=[]; this.gam=null; this.rm=false; this.kvps=e||[]; this.interstitial=(this.code=="GO300"||(aps.cfg.page.device==devices.MOBILE&&this.code=="S300"))?true:false; this.exclude=false; this.state=null; this.video=(this.lowerCode.indexOf("video")>-1)?true:false; this.companion_units=false; this.doNotRefresh=(this.code=="Crown"||this.code.startsWith("SSHOW"))?true:false; this.viewability=-1; this.refreshable=false; this.impressionViewable=false; this.advertiserId=null; this.advertiser=null; this.lineitemId=null; this.creativeId=null; this.isEmpty=null; this.position=null; this.renderedSize=null; this.googleFrame=null; this.isBounceX=false; this.isDynamic=false; this.isLoading=false; this.mediaType="banner"; this.supportsNative=this.code.startsWith("NTV")?true:false; this.renderCount=1; this.sizes=aps.fn.setAdSize(this); this.stringSizes=[]; this.scrollDepth=0; if(aps.cfg.is.leafsSite){var f=this.code.split("-"); this.scrollDepth=(f.length==1)?0:f[1] }this.getPage=function(){return aps.cfg.page.allPages[this.scrollDepth] }; this.getDataLayerInterstitial=function(i){if(!aps.cfg.dfp.dataLayerInterstials){var j=""; try{j=HDN.dataLayer.revenueProfiles.profiles.nonsub.interstitials.value }catch(k){}aps.cfg.dfp.dataLayerInterstials=j.split(",")||[] }if(["BGS_REC_IN","EEinsert"].includes(i.code)||aps.cfg.dfp.dataLayerInterstials.indexOf(i.code)>-1){i.interstitial=true; i.refreshable=true; i.impressionViewable=true }}(this); for(var d=0; d0){f.value=f.value.filter(function(l){return !i.includes(l) }) }else{if(f&&g){f.value=[] }}if(f==undefined){f=new aps.o.kvp(e); this.kvps.push(f) }if(!f.value.includes(j)){if(Array.isArray(j)){j.forEach(function(l){f.value.push(l) }) }else{f.value.push(j) }aps.fn.logInfo("Page KVP: "+e+" = "+f.value) }}; this.page_type2=null; this.setPageType2=function(e){if(aps.cfg.is.faceBookInstantArticle){e.page_type2="instant article" }else{if(aps.cfg.is.leafsSite){if(document.location.pathname=="/"){e.page_type2="channel" }else{e.page_type2="article" }}else{if(window.ess&&window.ess.prop24){e.page_type2=ess.prop24 }else{if(e.datalayer&&e.datalayer.content){if(e.datalayer.content.galleryListType&&e.datalayer.content.galleryListType=="list"){e.page_type2="slideshow list view" }else{e.page_type2=e.datalayer.content.objectType }}else{if(typeof(top.omni_blogname)!="undefined"){e.page_type2=aps.fn.getBlogOmniType() }}}}}aps.fn.logInfo("page_type2: "+e.page_type2); e.addPageKvp("page_type2",e.page_type2) }(this); this.init=function(){aps.fn.setPageTargettedUrl(this,"PageUrl",this.juicePageUrl,["Testpage","Cmpid","Ipid"]); var e=document.referrer.replace(/^(http(?:s)?:\/\/)/,"").split("/")[0]; aps.fn.setPageTargettedUrl(this,"referrer",e,[]); if(this.datalayer.infiniteScrollDepth){this.addPageKvp("ScrollPage",this.datalayer.infiniteScrollDepth); this.scrollDepth=this.datalayer.infiniteScrollDepth }if(aps.key){this.addPageKvp(aps.key,aps.values,true); delete aps.key; delete aps.values }if(!this.datalayer.ads.programmatic){this.addPageKvp("custom","progfalse"); aps.fn.logInfo("*Disabling bidders - dataLayer.ads.programmatic"); aps.cfg.bid.enabled=false; aps.cfg.bid.a9.enabled=false }aps.fireEvent(aps.event.on_new_page,this) }; this.init() }; aps.o.base=function(){this.lastRequestedHref=""; this.current=null; this.next=null; this.allPages=[]; this.urls=[]; this.device=window.current_device; this.checkPage=function(){var a=aps.fn.getFilteredHref(); if(this.next&&this.next.href==a){this.current=this.next; this.currentIndex=this.urls.indexOf(a); this.next=null; aps.logInfo("Changing current URL to "+a) }else{if(!this.current||a!=this.current.href){if(!this.urls.includes(a)){aps.fn.getPageInfo() }this.currentIndex=this.urls.indexOf(a); this.current=this.allPages[this.currentIndex]; aps.logInfo("Changing current URL to "+a) }}}; this.googleUrlFilter=function(b){var a=["username","password","testinggooglefilter","email","client_id","loginID","error","e","parameter","email_id","emailaddress","bc_em","cm_lm"]; Object.entries(b.qs).forEach(function(c){if(!aps.cfg.serveAds){return }if(a.includes(c[0])){aps.fn.logInfo("setting serve ads to false"); aps.cfg.serveAds=false }}); if(aps.cfg.serveAds&&window.location.href.indexOf("#cluid")!==-1){aps.fn.logInfo("setting serve ads to false"); aps.cfg.serveAds=false }}; this.kvps=[]; this.addBaseKvp=function(a,e,d){var c=d||false; var b=this.kvps.filter(function(f){return f.key==a })[0]; if(b&&c){b.value=[] }if(b==undefined){b=new aps.o.kvp(a); this.kvps.push(b) }if(!b.value.includes(e)){b.value.push(e); aps.fn.logInfo("Base KVP: "+a+" = "+b.value) }}; this.qs=[]; this.parseQS=function(a){var c=location.search.slice(1); var b=c.split("&"); b.forEach(function(f){f=f.split("="); var e=f[0]; var g=f[1]; for(var d=2; d-1){return }aps.fn.logInfo("*SKIP "+aps.fn.fixLen(adcode,10)+" "+reason); aps.alreadyLogged.push(adcode+":"+reason) }; aps.fn.domLoaded=function(){aps.fn.setPerformanceMetrics("DomLoaded","DomLoaded"); aps.cfg.domIsLoaded=true; aps.fireEvent(aps.event.on_dom_loaded) }; aps.fn.dumpLogWindow=function(){var logs=aps.juiceLog; var html=""; for(var i=0; i'+time+" : "+logs[i].m+""; html+=msg }var w=window.open("","wnd"); w.document.body.innerHTML=html }; aps.fn.formatDateTime=function(timeStamp){var h=(timeStamp.getHours()<10?"0":"")+timeStamp.getHours(); var m=(timeStamp.getMinutes()<10?"0":"")+timeStamp.getMinutes(); var s=(timeStamp.getSeconds()<10?"0":"")+timeStamp.getSeconds(); var ms=timeStamp.getMilliseconds(); return h+":"+m+":"+s+": "+ms }; aps.fn.getCookie=function(cname){var name=cname+"="; var ca=document.cookie.split(";"); for(var i=0; i-1){aps.fn.logSkip(ad.code,"is in do not serve array"); return sizes }ad.sizeMappings=ad.sizeMappings||[]; for(var j=0; japs.pageWidth){continue }if(widthfound==30000){widthfound=split }if(widthfound==split){var adSize=map[1]+"x"+map[2]; if(availables.indexOf(adSize)>-1){sizes.push([parseInt(map[1]),parseInt(map[2])]) }}}return sizes }; aps.fn.getBlogOmniType=function(){var abOmniPagename; var abOmniChannel; var abOmniHier1; var abOmniServer=document.location.host; var abOmniSSL1; var abOmniSSL2; var abOmniSSL3; var abOmniSSL4; var abOmniBlogType; var abOmniTitle=""; var abOmniID=""; var abOmniContentType="Blogs"; var abOmniAuthor=""; var abOmniQuery=""; var abOmniDomain; var abOmniBlogName=""; var abOmniHeadline=""; var abOmniFullURL=document.URL.toLowerCase(); var abOmniBlobUX=""; var abBlogCat=new Object; abBlogCat.SuperCategory=""; abBlogCat.Category=""; abBlogCat.AuthorType="reader"; abBlogCat.Usage="blog"; abBlogCat.Section=""; abBlogCat.Voice=""; var abStrRelativePath; var abStrPageURL=""; var abStrBlogPath; var abStrPagePath; var abBoolIs404=false; this.toProperCase=function toProperCase(pc){if(pc!="undefined"){if(pc.length>1){return pc.toLowerCase().replace(/^(.)|\s(.)/g,function($1){return $1.toUpperCase() }) }}}; if(typeof(omni_blogID)!="undefined"){abOmniID=omni_blogID }if(typeof(omni_blogauthor)!="undefined"){abOmniAuthor=toProperCase(omni_blogauthor) }if(typeof(omni_blogauthortype)!="undefined"){abBlogCat.AuthorType=omni_blogauthortype }if(typeof(omni_blogposttitle)!="undefined"){abBoolIs404=(omni_blogposttitle.toLowerCase()=="page not found"); abOmniTitle=omni_blogposttitle; if(abOmniTitle.charAt(abOmniTitle.length-1)==" "){abOmniTitle=abOmniTitle.substr(0,abOmniTitle.length-1) }}if(typeof(omni_blogname)!="undefined"){abOmniBlogName=omni_blogname }if(typeof(omni_blogcategory2)!="undefined"){abBlogCat.Category=omni_blogcategory2 }if(abBlogCat.Category.length>0){if(typeof(omni_blogcategory)!="undefined"){abBlogCat.SuperCategory=omni_blogcategory }}else{if(typeof(omni_blogcategory)!="undefined"){abBlogCat.Category=omni_blogcategory }}if(typeof(omni_blogusage)!="undefined"){abBlogCat.Usage=omni_blogusage }if(typeof(omni_section)!="undefined"){abBlogCat.Section=omni_section }if(typeof(omni_voices)!="undefined"){abBlogCat.Voice=omni_voices }this.abParseURL=function(){var strFullURL=abOmniFullURL; if(strFullURL.indexOf("#")>-1){strFullURL=strFullURL.split("#")[0] }var intQStart=strFullURL.indexOf("?")+1; var intRelPathStart=strFullURL.indexOf(".com")+5; abOmniDomain=strFullURL.substr(0,intRelPathStart); if(intQStart>0){abOmniQuery=strFullURL.substring(intQStart); abStrRelativePath=strFullURL.substring(0,intQStart-1) }else{abStrRelativePath=strFullURL }abStrPageURL=abStrRelativePath; abStrRelativePath=abStrRelativePath.substr(intRelPathStart); if(abStrRelativePath.charAt(abStrRelativePath.length-1)=="/"){abStrRelativePath=abStrRelativePath.substr(0,abStrRelativePath.length-1) }var arrayTemp=new Array(); arrayTemp=abStrRelativePath.split("/"); abStrBlogPath=arrayTemp[0]; abStrPagePath=arrayTemp[arrayTemp.length-1]; if(abStrBlogPath==abStrPagePath){abStrPagePath="index" }if(top.document.location.hostname=="insidescoopsf.sfgate.com"){abStrBlogPath="insidescoop" }return abStrBlogPath+":"+abStrPagePath }; this.abAssignSections=function(){if(abBlogCat.SuperCategory.length>0){abOmniChannel=abBlogCat.SuperCategory; abOmniSSL1=abBlogCat.SuperCategory; abOmniSSL2=abOmniSSL1+":"+abBlogCat.Category; abOmniSSL3=abOmniSSL2+":blogs"; abOmniSSL4=abOmniSSL3+":"+abOmniBlogName.toLowerCase() }else{abOmniChannel=abBlogCat.Category; abOmniSSL1=abBlogCat.Category; abOmniSSL2=abOmniSSL1+":blogs"; abOmniSSL3=abOmniSSL2+":"+abOmniBlogName.toLowerCase(); abOmniSSL4=abOmniSSL3; if(abBlogCat.Voice.length>0){abOmniSSL4=abOmniSSL4+":"+abBlogCat.Voice.toLowerCase() }}abOmniHier1=abOmniSSL4.replace(/:/g,",") }; abOmniPagename="Blogs-"+abParseURL(); if(abBlogCat.Category==""){abCategorizeBlog(abStrBlogPath,abBlogCat) }abAssignSections(); if(abOmniTitle==""||abOmniTitle==abOmniBlogName){abOmniTitle="Blog index page" }if(abBlogCat.Section.length>0){abOmniBlogName=abOmniBlogName+":"+abBlogCat.Section }abOmniTitle=abOmniBlogName+":"+abOmniTitle; abOmniID=abOmniBlogName+"--"+abOmniID; abOmniBlogType=abBlogCat.AuthorType; abOmniBlogName=abOmniBlogName+"("+abBlogCat.AuthorType+")"; abOmniTitle=abOmniTitle+"("+abBlogCat.AuthorType+")"; abOmniTitle=abOmniTitle.replace(/'/g,""); abOmniHeadline=abOmniTitle; if(abOmniAuthor){if(abOmniAuthor.indexOf(",")!=-1){abOmniAuthor=abOmniAuthor.substring(0,abOmniAuthor.indexOf(",")) }}if(abBoolIs404){return"undefined" }else{return abOmniContentType }}; aps.fn.getDictionnaryKey=function(dictionnary,value,destination){var BreakException={}; var retValue=destination; try{Object.entries(dictionnary).forEach(function(line){if(line[1].includes(value)){retValue=line[0]; throw BreakException }}) }catch(e){if(e!==BreakException){throw e }}return retValue }; aps.fn.toBeDisplayed=function(ad){var willDisplay=false; var widthfound=30000; for(var j=0; japs.pageWidth){continue }if(widthfound==30000){widthfound=split }if(widthfound==split){if(parseInt(map[1])>0&&parseInt(map[2])>0){willDisplay=true }}}return willDisplay }; aps.fn.getQueryParameterByName=function(key){if(aps.qeueryStringObj==null){aps.qeueryStringObj=aps.fn.queryStringToJSON() }var qobj=aps.qeueryStringObj; var keyToUse=key.replace("[]",""); if(!qobj.hasOwnProperty(keyToUse)){return null }if(key.indexOf("[]")==-1){return qobj[keyToUse] }if(typeof qobj[keyToUse]==="string"){var retval=[]; retval.push(qobj[keyToUse]); return retval }return qobj[keyToUse] }; aps.fn.queryStringToJSON=function(){var str=location.search.slice(1); var pairs=str.split("&"); var result={}; pairs.forEach(function(pair){pair=pair.split("="); var name=pair[0]; var value=pair[1]; if(name.length){if(result[name]!==undefined){if(!result[name].push){result[name]=[result[name]] }result[name].push(value||"") }else{result[name]=value||"" }}}); return(result) }; aps.fn.desktopOrMobile=function(desktopValue,mobileValue){return(aps.cfg.bid.current_device==devices.DESKTOP)?desktopValue:mobileValue }; aps.fn.addPageKvp=function(key,value,overwrite){aps.cfg.page.checkPage(); aps.cfg.page.current.addPageKvp(key,value,overwrite) }; aps.fn.getFilteredHref=function(href){var loc=href||document.location.href; return loc.replace("https://","").replace("http://","").split("#")[0].substring(0,300)||"" }; aps.fn.insertScript=function(url,async,type,id){var a=document.createElement("script"); a.src=url; if(type){a.type=type }if(id){a.id=id }a.async=async; var tgt=document.getElementsByTagName("script")[0]; tgt.parentNode.insertBefore(a,tgt) }; aps.fn.readRevenueProfile=function(){aps.cfg.revenueProfile=[]; try{if(HDN.dataLayer.content.designTemplate.indexOf("dynamic_two_column.tpl")>-1){var revProfile=Object.entries(HDN.dataLayer.revenueProfiles.profiles); for(var rp in revProfile){var subscriptions=revProfile[rp][1]; for(col in subscriptions){if(col.indexOf("column")==0){var ads=Object.entries(subscriptions[col]); for(adtype in ads){aps.cfg.revenueProfile.push(ads[adtype][1].id) }}}}if(aps.cfg.page.current.domain=="timesunion.com"){aps.cfg.revenueProfile.push("LNlogo") }}}catch(e){}}(); aps.fn.filterRevenueProfileAds=function(code){if(aps.cfg.revenueProfile.length>0&&aps.cfg.revenueProfile.indexOf(code)==-1){return false }else{return true }}; aps.fn.isValidBid=function(adDef,bidder,wrapper){aps.cfg.bid.isValid=aps.cfg.bid.isValid||[]; var encode=adDef.code+bidder+wrapper; if(aps.cfg.bid.isValid[encode]!=undefined){return aps.cfg.bid.isValid[encode] }aps.cfg.bid.isValid[encode]=true; aps.cfg.bid.excludedBids.forEach(function(rule){try{if(eval(rule[0])){aps.fn.logSkip(adDef.code,rule[1]); aps.cfg.bid.isValid[encode]=false }}catch(e){ga("pb.send",{nonInteraction:true,hitType:"event",eventCategory:"juice_error_rule",eventAction:document.location.href,eventLabel:rule}); return false }}); return aps.cfg.bid.isValid[encode] }; aps.fn.shouldRunThirdParty=function(modulecode){return true }; aps.fn.stripAndPreserveQueryStringVars=function(qstring,preserveList){if(typeof(qstring)=="undefined"){return"" }var pairs=qstring.split("&"); var result=[]; pairs.forEach(function(pair){pair=pair.split("="); if(preserveList.indexOf(pair[0])!=-1){result.push(pair[0]+"="+pair[1]) }}); if(result.length>0){return"?"+result.join("&") }return"" }; aps.fn.setPageTargettedUrl=function(page,kvpName,fullUrl,preserveQueryParms){var urlPieces=fullUrl.split("?"); var kvpUrl=""; if(preserveQueryParms.length==0){kvpUrl=urlPieces[0] }else{kvpUrl=urlPieces[0]+aps.fn.stripAndPreserveQueryStringVars(urlPieces[1],preserveQueryParms) }page.addPageKvp(kvpName,kvpUrl) }; aps.fn.checkKvps=function(kvps){var ok=true; try{kvps.forEach(function(kvp){if(typeof kvp.key!="string"||typeof kvp.value!="string"){ok=false }}) }catch(ex){ok=false }return ok }; aps.fn.waitForDefinedTags=function(func){if(!aps.cfg.serveAds){return }if(aps.cfg.adDefinitionLoaded){eval(func)() }else{aps.alreadyWaiting=aps.alreadyWaiting||false; aps.waitingForDefinedTags=aps.waitingForDefinedTags||[]; if(aps.waitingForDefinedTags.indexOf(func)>-1){return }aps.waitingForDefinedTags.push(func); if(!aps.cfg.adDefinitionLoaded){aps.registerEvent(aps.event.on_ad_definition_loaded,function(){eval(func)() }); if(!aps.alreadyWaiting){aps.fn.setPerformanceMetrics(null,"waiting for Ad Definition"); aps.alreadyWaiting=true }}}}; aps.fn.setupResponsiveMappings=function(slot,ad){var arSizeMappings=aps.fn.generateSizeMappings(ad); slot.defineSizeMapping(arSizeMappings) }; aps.fn.generateSizeMappings=function(ad){var arSizeMappings=[]; if(ad.sizeMappings!=undefined&&ad.sizeMappings.length>0){if(aps.cfg.is.legacy){aps.sizeMappings=ad.sizeMappings.filter(function(sizemap){return sizemap.split("x")[0]=0; i--){var frame=aps.cfg.dfp.celtra.divs[i]; var pFrame=frame.parentElement; if(frame.style.display==="none"){if(pFrame.children.length>1){pFrame.style.position="relative"; frame.style.position="absolute"; frame.style.width="100%"; frame.style.height="100%"; frame.style.left="0" }frame.style.display="block"; aps.fn.logInfo(pFrame.parentElement.id+": fixing Celtra display"); aps.cfg.dfp.celtra.divs.splice(i,1) }}if(aps.cfg.dfp.celtra.divs.length>0){setTimeout(function(){aps.fn.monitofCeltraIframe(c+1) },1000) }}; aps.fn.tagAd=function(ad){if(!aps.cfg.logToConsole){return }var div=document.getElementById(ad.code+"dbg"); if(!div){div=document.createElement("div"); div.id=ad.code+"dbg"; div.setAttribute("class","tooltip"); div.setAttribute("onmouseover","aps.fn.showAdDetails(this)"); var ori=document.getElementById(ad.code); ori.style.position="relative"; var left=0; if(ori.clientWidth&&ori.clientWidth>aps.pageWidth){left=20 }var style="top:0px;left:"+left+"px;min-height:"+ori.clientHeight+"px;height:100%;text-align:left; inline-block; color: #fff; background:rgba(255,138,69,70%); padding: 1px 4px; border-radius: 3px;position:absolute;font-family:'Source Sans Pro Regular',system-ui;min-width:80px;"; div.style=style; ad.div.appendChild(div) }if(!aps.cfg.infoDiv){var infoDiv=document.createElement("div"); infoDiv.id="infoDiv"; infoDiv.setAttribute("class","tooltipinfo"); infoDiv.style="position:absolute;display:none;width:406px;height:366px;overflow:hide;z-index;3000;background-color:rgba(255,138,69,100%);border-radius: 3px;font-family:'Source Sans Pro Regular';padding:3px 3px 3px 3px"; infoDiv.style.zIndex=3000; document.body.insertBefore(infoDiv,document.body.firstChild); aps.cfg.infoDiv=infoDiv; var infoDivClick=document.createElement("div"); infoDivClick.style="position.absolute;top:0px;float:right;font-size:10pt;color:white"; infoDivClick.innerHTML="Click to close"; infoDiv.appendChild(infoDivClick); var titleDiv=document.createElement("div"); titleDiv.id="infoDivTitle"; titleDiv.title="Click to close"; titleDiv.style="height:40px;width:400px;text-align:left;position:relative"; titleDiv.setAttribute("onclick","aps.fn.hideAdDetails()"); infoDiv.appendChild(titleDiv); var detailsDiv=document.createElement("div"); detailsDiv.id="infoDivDetails"; detailsDiv.style="overflow-y:scroll;width:400px;height:300px;oveflow:scroll;font-size:small;line-height:normal;padding:3px;position:relative;background-color:white;color:black;font-family:'Source Sans Pro Regular'"; infoDiv.appendChild(detailsDiv) }var inner=ad.code+"
SD: "+ad.scrollDepth; if(ad.advertiser){inner+="
"+ad.advertiser }inner+="
"; div.innerHTML=inner; if(aps.cfg.infoDivDisplaying==ad.code){aps.fn.setAdDetails(ad.code) }}; aps.fn.setAdDetails=function(id){if(!aps.cfg.logToConsole){return }var ad=aps.cfg.ads[id]; document.getElementById("infoDivTitle").innerHTML="

"+id+"

"; var inner="Misc
"; inner+="AdUnit: "+ad.getPage().adUnit+"
"; inner+="Advertiser: "+ad.advertiser+"
"; inner+="SizeMappings: "+ad.sizeMappings.join(", ")+"
"; inner+="Sizes: "+ad.stringSizes.join(", ")+"
"; inner+="Page Width: "+aps.pageWidth+"
"; inner+="Current Device: "; switch(current_device){case devices.DESKTOP:inner+="Desktop"; break; case devices.TABLER:inner+="Tablet"; break; case devices.MOBILE:inner+="Mobile"; break }inner+="
"; if(aps.cfg.bid.enabled){inner+="
"; inner+="Bids
"; if(ad.gam.aps&&ad.gam.aps.originalBid){inner+="Original Bid: "+ad.gam.aps.originalBid.ref+"
" }else{inner+="Original Bid: n/a
" }inner+="Optimized Bid: "+ad.gam.currentBid.ref+"
"; inner+="Bid increase: "+parseFloat(ad.gam.aps.increase).toFixed(2)+"
"; inner+="Won: "+ad.gam.currentBid.won+"
" }inner+="
"; if(ad.render){inner+="Response Info
"; var orderId=ad.render.responseInfo.campaignId; var lineItemId=ad.render.responseInfo.lineItemId||ad.render.responseInfo.sourceAgnosticLineItemId; Object.entries(ad.render.responseInfo).forEach(function(item){var link=item[1]; if(item[1]!=null){switch(item[0]){case"creativeId":link=""+item[1]+""; break; case"sourceAgnosticCreativeId":link=""+item[1]+""; break; case"lineItemId":link=""+item[1]+""; break; case"sourceAgnosticLineItemId":link=""+item[1]+""; break; case"campaignId":link=""+item[1]+""; break }}inner+=item[0]+": "+link+"
" }); inner+="
"; inner+="Targeting
"; Object.entries(ad.render.targetingMap).forEach(function(item){var value=Array.isArray(item[1])?item[1].join(", "):item[1].replace(",",", "); inner+=item[0]+": "+value+"
" }); inner+="
"; inner+="Page Targeting
"; Object.entries(ad.render.request.pageTargeting).forEach(function(item){var value=Array.isArray(item[1])?item[1].join(", "):item[1].replace(",",", "); inner+=item[0]+": "+value+"
" }) }document.getElementById("infoDivDetails").innerHTML=inner }; aps.fn.showAdDetails=function(adinfo){var theAd=adinfo.id.replace("dbg",""); if(aps.cfg.infoDivDisplaying==theAd){return }aps.cfg.infoDiv.style.display="block"; aps.cfg.infoDiv.style.top=event.pageY+15+"px"; aps.cfg.infoDiv.style.left=event.pageX+15+"px"; aps.cfg.infoDivDisplaying=theAd; aps.fn.setAdDetails(theAd) }; aps.fn.hideAdDetails=function(ad){aps.cfg.infoDiv.style.display="none"; aps.cfg.infoDivDisplaying="" }; aps.fn.requestAds=function(){if(!aps.cfg.readyToCallGAM){aps.fn.waitToCallGAM(); return }var requests=[]; var req; var missing=[]; aps.cfg.queuedAds=aps.cfg.queuedAds.filter(function(id){return !["Inline","RB"].includes(id) }); var arr=[]; aps.cfg.queuedAds.forEach(function(id){if(!arr.includes(id)){arr.push(id) }}); aps.cfg.queuedAds=arr; aps.cfg.queuedAds.forEach(function(id){var ad=aps.cfg.ads[id]; if(!ad){return }if(!requests[ad.scrollDepth]){req=new aps.o.req(aps.cfg.page.allPages[ad.scrollDepth]); requests[ad.scrollDepth]=req }if(!ad.div){ad.div=document.getElementById(ad.code); if(!ad.div){missing.push(ad.code); aps.cfg.missingDivs.push(ad.code); return }}if(!ad.gam){if(ad.supportsNative){ad.gam=googletag.defineSlot("/"+aps.cfg.networkCode+"/"+ad.getPage().adUnit,["fluid"],ad.code) }else{if(aps.cfg.is.legacy){ad.gam=googletag.defineSlot("/"+aps.cfg.networkCode+"/"+ad.getPage().adUnit,ad.sizes,ad.code) }else{ad.gam=googletag.defineSlot("/"+aps.cfg.networkCode+"/"+ad.getPage().adUnit,[ad.width,ad.height],ad.code) }}ad.kvps.forEach(function(kvp){ad.gam.setTargeting(kvp.key,kvp.value) }) }if(ad.gam){ad.gam.clearTargeting("frsh"); ad.gam.setTargeting("frsh",ad.renderCount); ad.gam.clearTargeting("i"); ad.gam.setTargeting("i",""+aps.cfg.dfp.requests.length); if(["Crown"].includes(ad.code)){ad.gam.setCollapseEmptyDiv(true,true) }aps.fn.setupResponsiveMappings(ad.gam,ad); ad.gam.addService(googletag.pubads()) }if(ad.gam&&ad.div){if(req.ads.lengthMath.abs(ad.div.style.minHeight.replace("px",""))){ad.div.style.minHeight=ad.div.firstChild.clientHeight+"px" }}}}}); if(missing.length>0){aps.logInfo("*GAM* Not requesting "+missing+" div(s) not on the page") }requests.forEach(function(request,index){if(request.ads.length==0&&aps.cfg.dfp.requests.length==0){aps.cfg.waitingForAds=aps.cfg.waitingForAds||new Date().valueOf(); var thisTime=new Date().valueOf(); if(thisTime>aps.cfg.waitingForAds+15000){aps.logInfo("*GAM* Page not ready - no ads to request - enough waiting"); aps.cfg.queuedAds=[] }else{aps.logInfo("*GAM* Page not ready - no ads to request"); setTimeout(aps.fn.requestAds,100) }return }if(aps.cfg.bid.enabled&&((aps.cfg.bid.a9.enabled&&!request.page.a9BidsReceived)||!request.page.pbBidsReceived)){var info=JSON.stringify({version:1.1,pbBids:{enabled:aps.cfg.bid.enabled,received:request.page.pbBidsReceived},a9Bids:{enabled:aps.cfg.bid.a9.enabled,received:request.page.a9BidsReceived},scroll:request.page.scrollDepth,}); aps.logInfo("Bids not received for page "+request.page.scrollDepth); request.gams=[]; request.ads=[] }if(request.gams.length>0){if(request.page.datalayer.content.isSensitive){aps.logInfo("Don't serve ad on "+request.page.href+" - tragedy flag"); return }request.page.addPageKvp("scrollpage",""+request.page.scrollDepth,true); aps.cfg.page.kvps.forEach(function(kvp){googletag.pubads().setTargeting(kvp.key,kvp.value) }); request.page.kvps.forEach(function(kvp){googletag.pubads().setTargeting(kvp.key,kvp.value) }); aps.fireEvent(aps.event.on_before_request_ads,request); request.pageTargeting={}; var pagetm=googletag.pubads().getTargetingKeys(); pagetm.forEach(function(key){request.pageTargeting[key]=googletag.pubads().getTargeting(key) }); request.ads.forEach(function(adId){aps.cfg.ads[adId].state="requested" }); aps.cfg.dfp.requests.push(request); aps.fn.logInfo("*GAM* requesting for page "+index+" : "+request.ads); if(aps.cfg.dfp.batchSRA.enabled||request.page.page_type2=="article"){googletag.pubads().refresh(request.gams,{changeCorrelator:false}) }else{googletag.pubads().refresh(request.gams) }}aps.cfg.queuedAds=aps.cfg.queuedAds.filter(function(id){return !request.ads.includes(id) }); if(aps.cfg.queuedAds.length>0){if(aps.cfg.dfp.requests.length>0&&(HDN.dataLayer.ads.loaded||!aps.cfg.is.wcm)){var divs=[]; for(var i=aps.cfg.queuedAds.length-1; i>=0; i--){if(!aps.cfg.ads[aps.cfg.queuedAds[i]].div){divs.push(aps.cfg.queuedAds[i]); aps.cfg.queuedAds.splice(i,1) }}if(divs.length>0){aps.fn.logInfo("*GAM* "+divs+" removed from queue, still not on page") }}if(aps.cfg.queuedAds.length>0){setTimeout(aps.fn.requestAds,500) }}}); if(aps.cfg.dfp.batchSRA.enabled){aps.cfg.dfp.batchSRA.waitingNext=true; if(aps.cfg.dfp.batchSRA.auto){aps.fn.logInfo("BatchSRA : waiting to next step in "+aps.cfg.dfp.batchSRA.delay+" ms"); setTimeout(aps.fn.displayNextBatch,aps.cfg.dfp.batchSRA.delay) }}}; aps.fn.waitToCallGAM=function(){if(aps.cfg.readyToCallGAM){aps.fn.requestAds() }else{if((aps.cfg.bid.a9.enabled&&!aps.cfg.bid.a9.received)||(aps.cfg.bid.enabled&&!aps.cfg.bid.pb.received)||!aps.cfg.domIsLoaded||!googletag.apiReady||aps.cfg.waitingForRichie||(!aps.cfg.tregReady&&aps.cfg.waitForTreg&&!aps.cfg.is.legacy)){if(aps.cfg.waitingSince){var now=new Date().valueOf(); if(now-aps.cfg.waitingSince>=5000){var info={version:aps.cfg.version,pbBids:{enabled:aps.cfg.bid.enabled,received:aps.cfg.bid.pb.received},a9Bids:{enabled:aps.cfg.bid.a9.enabled,received:aps.cfg.bid.a9.received},domIsLoaded:aps.cfg.domIsLoaded,apiReady:googletag.apiReady,richie:{is:aps.cfg.is.richie,waiting:aps.cfg.waitingForRichie},treg:{waiting:aps.cfg.waitForTreg,ready:aps.cfg.tregReady},legacy:aps.cfg.is.legacy,}; aps.logInfo(["Waiting for 5 seconds.",info]); if(googletag.apiReady){aps.cfg.readyToCallGAM=true; aps.fn.requestAds() }else{setTimeout(aps.fn.waitToCallGAM,100) }}else{aps.logInfo("Not ready to call GAM"); setTimeout(aps.fn.waitToCallGAM,100) }}else{aps.logInfo("Not ready to call GAM"); aps.cfg.waitingSince=aps.cfg.waitingSince||new Date().valueOf(); setTimeout(aps.fn.waitToCallGAM,100) }}else{aps.logInfo("Ready to call GAM"); aps.cfg.readyToCallGAM=true; aps.fn.requestAds() }}} })();(function(){aps.pageWidth=window.screen.width||top.window.innerWidth||window.width||-1; if(navigator.userAgent.indexOf("iPad")>-1){window.current_device=devices.TABLET }else{if(navigator.userAgent.indexOf("iPhone")>-1){window.current_device=devices.MOBILE }else{if(navigator.userAgent.indexOf("Android")>-1){window.current_device=devices.MOBILE }else{if(document.querySelectorAll("meta[name=viewport]").length>0){try{var d; var c=document.querySelectorAll("meta[name=viewport]")[0].content.split(","); for(var b=0; b0; aps.cfg.is.faceBookInstantArticle=(JuicePageUrl.indexOf("juicemode=fbinstant")!==-1); aps.cfg.is.leafsSite=aps.cfg.leafsSites.includes(document.location.hostname); aps.cfg.is.legacy=(document.location.hostname.indexOf("legacy.com")>-1||(top.location!=location&&document.referrer=="https://www.legacy.com/")); aps.cfg.is.premium=(HDN&&HDN.dataLayer&&typeof HDN.dataLayer.paywall!=="undefined"&&typeof HDN.dataLayer.paywall.premiumStatus!=="undefined"&&HDN.dataLayer.paywall.premiumStatus==="isPremium")?true:false; aps.cfg.is.premiumSite=["expressnews.com","houstonchronicle.com","sfchronicle.com"].some(function(a){return document.location.host.endsWith(a) })&&document.location.host.split(".").some(function(a){return["www","cmf"].includes(a) }); aps.cfg.is.qa=(document.location.hostname.startsWith("cmf.")||document.location.hostname.startsWith("preview.cmf")||loadAd_UrlLocation=="https://aps-staging.hearstnp.com/")?true:false; aps.cfg.is.previewHC=document.location.hostname=="preview.houstonchronicle.com"; aps.cfg.is.projectPage=(document.location.pathname.startsWith("/projects")||document.location.hostname.startsWith("projects."))?true:false; aps.cfg.is.richie=APSpageUrl.indexOf("staging.richie")==0||APSpageUrl.indexOf("richie")==0||APSpageUrl.indexOf("papp")==0; aps.cfg.is.wp=typeof(window.wp_content)=="object" })();(function(){aps.registerEvent(aps.event.on_new_page,function(a){a.adUnit=null; a.setAdUnit=function(){var b={adUnit:(aps.page&&aps.page.adUnit)?aps.page.adUnit:"",previousValue:(aps.page&&aps.page.adUnit)?aps.page.adUnit:"",queryStringOverwritten:false,levelOne:{value:"hnp-"+a.domain,forced:false,},levelTwo:{value:"",forced:false,},checkQueryStringValue:function(){var d=aps.fn.getQueryParameterByName("hnpau"); if(!d){return }var c=d.split("/"); if(c[0]&&c[0]!=""){if(c[0].startsWith("hnp-")){this.levelOne.value=c[0]; this.levelOne.forced=true; this.queryStringOverwritten=true }else{aps.fn.logInfo("*WRN* Using hnpau query string param to set runtime adunit needs to have an adunit to start with 'hnp-'. To define second level, add it after /. To only change second level, start at /") }}if(c[1]&&c[1]!=""){this.levelTwo.value=c[1]; this.levelTwo.forced=true; this.queryStringOverwritten=true }},getNewValue:function(){this.checkQueryStringValue(); if(aps.cfg.is.richie){this.levelOne.value="hnp-"+a.domain; this.levelOne.forced=true; this.levelTwo.value="article_rapp"; this.levelTwo.forced=true }if(aps.cfg.is.authorPage||aps.cfg.is.projectPage){this.levelTwo.value="general_wcm"; this.levelTwo.forced=true }if(aps.cfg.is.datebookSF||aps.cfg.is.previewHC){this.levelTwo.value="datebook_wp"; this.levelTwo.forced=true }if(window.juice&&window.juice.definedTags&&window.juice.definedTags.adUnit){var c=juice.definedTags.adUnit.split("/"); this.levelOne.value=c[0]; this.levelOne.forced=true; this.levelTwo.value=c[1]; this.levelTwo.forced=true }if(aps.cfg.is.legacy){if(!this.levelOne.forced){this.levelOne.value="hnp-"+a.domain; this.levelOne.forced=true }if(!this.levelTwo.forced){this.levelTwo.value="Obituaries"; this.levelTwo.forced=true }}if(aps.cfg.is.eedition){if(!this.levelOne.forced){var d=document.location.pathname.split("/")[3]+".com"; switch(document.location.pathname.split("/")[3]){case"albanytimesunion":d="timesunion.com"; break; case"atuspecialsectionfree":d="timesunion.com"; break; case"atuspecialsectionpaid":d="timesunion.com"; break; case"atusubscriberexclusives":d="timesunion.com"; break; case"beaumontlakecaster":d="beaumontenterprise.com"; break; case"beaumontvip":d="beaumontenterprise.com"; break; case"connecticutpost":d="ctpost.com"; break; case"cthousehunter":d="ctpost.com"; break; case"danburynewstimes":d="newstimes.com"; break; case"foothillstrader":d="nhregister.com"; this.levelTwo.value="e-edition"; this.levelTwo.forced=true; break; case"houstonchronicle":d="chron.com"; break; case"hurondailytribune":d="michigansthumb.com"; break; case"hurondailytribunenie":d="michigansthumb.com"; break; case"intelligencer":d="theintelligencer.com"; break; case"laredomorningtimes":d="lmtonline.com"; break; case"lavoz":d="chron.com"; break; case"midlanddailynews":d="ourmidland.com"; break; case"midlanddailynewsnie":d="ourmidland.com"; break; case"midlandreportertelegram":d="mrt.com"; break; case"midlandreportertelegramnie":d="mrt.com"; break; case"saenmilitary":d="mysanantonio.com"; break; case"saencommunities":d="mysanantonio.com"; break; case"saensubscriberexclusives":d="mysanantonio.com"; break; case"saenweeklies":d="mysanantonio.com"; break; case"sanantonioexpressnews":d="mysanantonio.com"; break; case"sanfranciscochronicle":d="sfgate.com"; break; case"sanfranciscochroniclenie":d="sfgate.com"; break }if(d!=""){this.levelOne.value="hnp-"+d; this.levelOne.forced=true }}if(!this.levelTwo.forced){this.levelTwo.value="E-edition"; this.levelTwo.forced=true }}if(aps.cfg.is.qa&&aps.cfg.is.wcm){if(!this.levelOne.forced){this.levelOne.value="hnp-hearstdemosite"; this.levelOne.forced=true }if(!this.levelTwo.forced){this.levelTwo.value="hearstdemozone"; this.levelTwo.forced=true }}if(aps.cfg.is.leafsSite){if(document.location.hostname=="pyme.lavoztx.com"){if(!this.levelOne.forced){this.levelOne.value="hnp-chron.com"; this.levelOne.forced=true }if(!this.levelTwo.forced){this.levelTwo.value="La_Voz"; this.levelTwo.forced=true }}if(!this.levelOne.forced){this.levelOne.value="hnp-"+document.location.host.split(".").slice(-2).join("."); this.levelOne.forced=true }if(!this.levelTwo.forced){this.levelTwo.value=(document.location.pathname=="/")?"channel_leaf":"article_leaf"; this.levelTwo.forced=true }}if(!this.levelTwo.forced&&!a.isSubDomain&&a.path.length==0){this.levelTwo.value="Homepage"; this.levelTwo.forced=true }if(!this.levelTwo.forced){switch(aps.cfg.designTemplate){case"design/article/dynamic_two_column.tpl":this.levelTwo.value="article_dtc"; this.levelTwo.forced=true; break; case"design/article/dynamic_one_column.tpl":this.levelTwo.value="article_doc"; this.levelTwo.forced=true; break; case"design/slideshow/dynamic_two_column.tpl":this.levelTwo.value="article_list"; this.levelTwo.forced=true; break; case"design/channel/dynamic_two_column.tpl":this.levelTwo.value="channel_wcm"; this.levelTwo.forced=true; break; default:if(aps.cfg.designTemplate&&aps.cfg.designTemplate.indexOf("channel")>-1){this.levelTwo.value="channel_old"; this.levelTwo.forced=true }else{this.levelTwo.value="article_old"; this.levelTwo.forced=true }}}this.levelOne.value=this.levelOne.value.replace("hnp-theintelligencer.com","theintelligencer"); var e=this.levelOne.value+"/"+this.levelTwo.value; if(this.queryStringOverwritten||aps.sitesWithoutCallback.includes(a.hostname)){this.adUnit=e; aps.fn.logInfo("*AdUnit: setting adUnit to : "+this.adUnit) }this.newValue=e; return e }}; a.adUnit=b.getNewValue() }() }) })();(function(){aps.registerEvent(aps.event.on_new_page,function(a){a.sectionPath=[]; a.setSectionPath=function(){var d=a.datalayer.content.sectionPath||[]; if(d.length>0&&typeof d[0].title=="string"){var c=[]; Object.entries(d).forEach(function(e){c.push(e[1].title.toLowerCase()) }); d=c }if(aps.cfg.is.datebookSF){a.sectionPath=["entertainment","datebook"] }else{if(aps.cfg.is.previewHC){a.sectionPath=["entertainment","preview"] }else{if(window.juice&&window.juice.definedTags&&window.juice.definedTags.sectionPath){a.sectionPath=juice.definedTags.sectionPath }else{if(aps.cfg.is.authorPage){a.sectionPath=["author",a.path[2]] }else{if(aps.cfg.is.leafsSite){a.sectionPath=[document.location.hostname.split(".")[0]]; a.addPageKvp("category","third_party"); a.addPageKvp("custom","demandmedia") }else{if(d){a.sectionPath=d; for(var b=0; b]/g,""); a.sectionPath[b]=a.sectionPath[b].replace(/\s\+\s|\s\&\s|\+|\&/g,"-and-"); a.sectionPath[b]=a.sectionPath[b].replace(/[\(\)\[\],]/g,"|") }}}}}}}if(a.sectionPath.length>0){aps.fn.logInfo("section Path: "+d); for(var b=0; b= 10',"no bid after 10 impressions of teads"],['bidder=="triplelift" && ["Flex1","B728","TMP300_3"].includes(adDef.code)',"no bid on Flex1, B728 or TMP300_3 for triplelift"],['adDef.code == "A951" && document.location.href.startsWith("https://www.sfgate.com/realestate/")',"no bid on A951 on sfgate realestate"],['bidder == "kargo" && adDef.code == "Flex1"',"no bid on Flex1 for Kargo"],['bidder == "teads" && ["Flex1","MAD","Inline","RB"].includes(adDef.code)',"no bid on Flex1, MAD, Inline or RB for teads"],['adDef.code == "DTBK_AP951"',"no bid on DTBK_AP951, direct sales only."],],}; aps.cfg.vid={mode:"apv",tagUrl:"",enabled:false,}; aps.cfg.gaLog=(Math.floor(Math.random()*100)<=5); aps.cfg.excludeModules=[]; aps.cfg.waitingGoogle=false; aps.cfg.preventCeltraAdsToRefresh=true; aps.cfg.queuedAds=[]; aps.cfg.serveAds=true; aps.cfg.readyToCallGAM=false; aps.cfg.refreshViewableOnly=true; aps.cfg.videoAdTag=null; if(aps.cfg.logToConsole){var b=new Date(); b.setTime(b.getTime()+(1000*24*60*60*1000)); var c="; expires="+b.toGMTString(); document.cookie="console=1"+c+"; path=/" }if(window.location.search.indexOf("console=0")!==-1){var b=new Date(); b.setTime(b.getTime()+(60*1000)); var c="; expires="+b.toGMTString(); document.cookie="console=0"+c+"; path=/"; aps.cfg.logToConsole=false }aps.cfg.source="Prod"; if(window.loadAd_UrlLocation.indexOf("dev.")>-1||aps.cfg.is.qa){aps.cfg.source="QA" }if(aps.cfg.gaLog){ga("pb.send",{nonInteraction:true,hitType:"event",eventCategory:"juice_version",eventAction:aps.cfg.source,eventLabel:aps.cfg.version}) }aps.registerEvent(aps.event.on_new_page,function(d){if(document.location.pathname.indexOf("/sponsored/")!==-1){aps.fn.logInfo("*Disabling bidders - sponsored content"); aps.cfg.bid.enabled=false; aps.cfg.bid.a9.enabled=false }if(aps.cfg.bid.excludedDomains.includes(d.domain)){aps.fn.logInfo("*Disabling bidders - excluded domains"); aps.cfg.bid.enabled=false; aps.cfg.bid.a9.enabled=false }if(document.location.hostname.startsWith("storystudio")){aps.fn.logInfo("storystudio - no ads"); aps.cfg.serveAds=false }if(aps.cfg.is.projectPage){aps.sitesWithoutCallback.push(document.location.hostname) }if(aps.cfg.is.qa&&aps.cfg.is.wcm){aps.sitesWithoutCallback.push(document.location.hostname) }}) })();(function(){aps.cfg.waitingForRichie=aps.cfg.waitingForRichie||false; if(APSpageUrl){if(aps.cfg.is.richie){googletag.cmd.push(function(){try{googletag.pubads().set("page_url",JuicePageUrl); aps.fn.logInfo("Richie app: Setting page_url to "+JuicePageUrl) }catch(b){}}); aps.fn.logInfo("Richie app: disabling modules"); if(document.location.href.indexOf("?appId=")==-1){aps.cfg.bid.enabled=false; aps.cfg.bid.a9.enabled=false }aps.cfg.excludeModules=["nlp","ab_testing","blueconic","PublisherProvidedId","permutive"]; if(typeof mraid=="undefined"){aps.fn.logInfo("mraid not present, not waiting for Richie"); aps.cfg.waitingForRichie=false }else{aps.cfg.waitingForRichie=true; aps.fn.logInfo("Richie app: enabling viewable trigger"); function a(b){if(b){aps.cfg.waitingForRichie=false; aps.fn.logInfo("Richie app: viewable triggered") }}mraid.addEventListener("viewableChange",a) }}}})();(function(){aps.fn.getHDNnlpWithId=function(e,g,d){var f=[]; try{var a=e.datalayer.content["keyNlp"+g]; for(var c=0; c0){b=b.concat("a_"+e) }e=aps.fn.getHDNnlpWithId(d,"ConsumerGood","g"); if(e.length>0){b=b.concat(e) }e=aps.fn.getHDNnlpWithId(d,"Event","e"); if(e.length>0){b=b.concat(e) }e=aps.fn.getHDNnlpWithId(d,"Location","l"); if(e.length>0){b=b.concat(e) }e=aps.fn.getHDNnlpWithId(d,"Organization","o"); if(e.length>0){b=b.concat(e) }e=aps.fn.getHDNnlpWithId(d,"Person","p"); if(e.length>0){b=b.concat(e) }e=aps.fn.getHDNnlpWithId(d,"Unknown","u"); if(e.length>0){b=b.concat(e) }e=aps.fn.getHDNnlpWithId(d,"WorkOfArt","w"); if(e.length>0){b=b.concat(e) }d.addPageKvp("nlp_entities",b) }catch(c){aps.fn.logInfo("nlp_categories: exception") }}) })();(function(){if(aps.cfg.is.eedition){return }if(!aps.fn.shouldRunThirdParty("permutive")){return }aps.cfg.permutive=aps.cfg.permutive||{}; aps.cfg.permutive.excludedFrom=["www.sfgate.com/partner/transparensee","www.mysanantonio.com/partner/transparensee","www.timesunion.com/partner/transparensee","https://realestate.timesunion.com/"]; aps.cfg.permutive.setPermutiveValue=function(page,arrToTest){retValue=null; if(!arrToTest.length){arrToTest=[arrToTest] }for(var i=0; irequest.page.permutive.maxItems){aps.fn.logInfo("Permutive: "+request.page.permutive.ids.length+" audiences found"); if(request.page.domain!="stamfordadvocate.com"){request.page.permutive.ids=request.page.permutive.ids.slice(0,request.page.permutive.maxItems) }}aps.fn.logInfo("Permutive (from local storage)") }else{request.page.permutive.ids=request.page.permutive.ids||[]; if(request.page.permutive.ids.length>request.page.permutive.maxItems){aps.fn.logInfo("Permutive: "+request.page.permutive.ids.length+" audiences found"); if(request.page.domain!="stamfordadvocate.com"){request.page.permutive.ids=request.page.permutive.ids.slice(0,request.page.permutive.maxItems) }}}var permutiveKvp=request.page.kvps.filter(function(kvp){return kvp.key=="permutive" })[0]; if(permutiveKvp){permutiveKvp.value=[] }request.page.addPageKvp("permutive",request.page.permutive.ids,true) }) })();(function(){aps.cfg.multi=aps.cfg.multi||{}; aps.cfg.multi.ads=aps.cfg.multi.ads||[]; aps.cfg.multi.enabled=aps.cfg.multi.enabled||false; aps.cfg.multi.availableTypes={}; if(aps.cfg.is.wcm){aps.cfg.multiAds["Inline"]=aps.cfg.allAds["Inline"]; aps.cfg.multiAds["LIST"]=aps.cfg.allAds["LIST"]; aps.cfg.multiAds["RB"]=aps.cfg.allAds["RB"]; aps.cfg.multiAds["SSHOW"]=aps.cfg.allAds["SSHOW"]; aps.cfg.multiAds["Box"]=aps.cfg.allAds["Box"] }else{if(aps.cfg.is.leafsSite){aps.cfg.multiAds["A728"]=aps.cfg.allAds["A728"]; aps.cfg.multiAds["A300"]=aps.cfg.allAds["A300"]; aps.cfg.multiAds["B300"]=aps.cfg.allAds["B300"]; aps.cfg.multiAds["S300"]=aps.cfg.allAds["S300"]; aps.cfg.multiAds["Leaf1"]=aps.cfg.allAds["Leaf1"]; aps.cfg.multiAds["Leaf2"]=aps.cfg.allAds["Leaf2"]; aps.cfg.multiAds["Leaf3"]=aps.cfg.allAds["Leaf3"]; aps.cfg.multiAds["Leaf4"]=aps.cfg.allAds["Leaf4"]; aps.cfg.multiAds["MAD"]=aps.cfg.allAds["MAD"] }}aps.registerEvent(aps.event.on_ad_definition_loaded,function(){if(!aps.cfg.serveAds){return }aps.cfg.multi.createMultiAds(); Object.entries(aps.cfg.multiAds).forEach(function(d){if((!aps.cfg.juiceDirect&&!aps.cfg.juiceCustom)||aps.cfg.adMap.includes(d[0])){if(aps.cfg.ads[d[0]]){aps.cfg.bid.prefetch.checkMultiAd(aps.cfg.ads[d[0]]) }}}); var b=["Crown","Flex1"]; var c=aps.cfg.adMap.filter(function(d){return !b.includes(d) }); var a=aps.cfg.adMap.filter(function(d){return b.includes(d) }); aps.cfg.adMap=a.concat(c); aps.cfg.adMap.forEach(function(e){var d=aps.cfg.ads[e]; if(!d){aps.logInfo(e+" not found!"); aps.cfg.adMap=aps.cfg.adMap.filter(function(f){return f!=e }); return }d.checkForInclude={addAdSlot:false,stop:false}; aps.fireEvent(aps.event.on_check_include_ad,d); if(!d.checkForInclude.stop){d.checkForInclude.addAdSlot=true }if(d.checkForInclude.addAdSlot){aps.cfg.queuedAds.push(e) }}) }); aps.registerEvent(aps.event.on_render_ad,function(a){if(!aps.cfg.bid.enabled){return }aps.cfg.bid.prefetch.checkMultiAd(a.ad) }); aps.cfg.multi.createMultiAds=function(){Object.entries(aps.cfg.multiAds).forEach(function(b){baseAd=aps.cfg.multiAds[b[0]]; if((!aps.cfg.juiceDirect&&!aps.cfg.JuiceCustom)||aps.cfg.adMap.includes(b[0])){var a=aps.cfg.ads[baseAd.code]||new aps.o.gamAd(baseAd.code,baseAd.width,baseAd.height,baseAd.sizeMappings); aps.cfg.multi.availableTypes[baseAd.code]=a; if(aps.cfg.is.leafsSite){}}}) }; aps.cloneAdMulti=function(c){if(aps.cfg.ads[c]){return }var a=c.split("-")[0]; var b=aps.cfg.ads[a]; if(b.code==undefined){return }var d=new aps.o.gamAd(c,b.width,b.height,b.sizeMappings); d.batchRequest="" }; aps.showLIST=function(b){if((JSON.stringify(b)=="[null]"||JSON.stringify(b)=="[]")&&!aps.cfg.dfp.isWaiting){aps.fn.logInfo("showLIST: Called with empty array"); return }aps.cfg.multi.enabled=true; var a=[]; b.forEach(function(f){var e=""; var g=f.id.split("-"); var d=true; if(g.length==1){aps.fn.logInfo("showLIST: Base ad "+g[0]+" won't be re-created"); d=false }e=g[0]; if(aps.cfg.multi.availableTypes[e]==undefined){aps.fn.logInfo("showLIST: This type of LIST ad is not supported"); d=false }if(d){var c=aps.cfg.ads[f.id]; if(!c){aps.cloneAdMulti(f.id); aps.fireEvent(aps.event.on_define_bid_data,aps.cfg.ads[f.id]); c=aps.cfg.ads[f.id] }if(!c.div){c.div=f; aps.fireEvent(aps.event.on_new_div,f) }a.push(f.id) }}); aps.cfg.lazyLoadingForced=aps.cfg.lazyLoadingForced||false; if(aps.cfg.lazyLoadingForced||(b.length>5&&aps.cfg.queuedAds.length>0)){if(!aps.cfg.lazyLoadingForced){aps.cfg.ivm.options.rootMargin="1000px 0px 200px 0px"; aps.cfg.ivm.options.delayBeforeDelete=3000; aps.cfg.lazyLoadingForced=true; aps.fn.logInfo("showLIST: LazyLoading of ads forced"); aps.fn.logInfo("*IVM* delayBeforeDelete : 3000"); aps.fn.logInfo("*IVM* rootMargin : 400px"); aps.cfg.bid.prefetch.allBidsOnRefresh=false; aps.cfg.bid.prefetch.delay=3000; aps.cfg.bid.excludedBidders=[]; if(aps.cfg.bid.excludedBidders.length>0){aps.cfg.bid.excludedBids.push(["aps.cfg.bid.excludedBidders.includes(bidder)","triplelift excluded, too many ads"]); aps.cfg.bid.pb.bidders=aps.cfg.bid.pb.bidders.filter(function(c){return !aps.cfg.bid.excludedBidders.includes(c) }); aps.cfg.bid.pb.biddersCount=aps.cfg.bid.pb.bidders.length; aps.cfg.bid.excludedBidders.forEach(function(c){aps.cfg.bid.pb.data[c]={extra:aps.cfg.bid.pb.data[c].extra} }); Object.entries(aps.cfg.ads).forEach(function(c){c[1].pb.bids=c[1].pb.bids.filter(function(d){return !aps.cfg.bid.excludedBidders.includes(d.bidder) }) }) }}aps.fn.logInfo("showLIST: Ready MULTI slots: "+a) }else{aps.fn.logInfo("showLIST: Calling MULTI slots: "+a); a.forEach(function(c){aps.cfg.queuedAds.push(c) }) }setTimeout(aps.fn.waitToCallGAM,200) } })();(function(){if(aps.cfg.is.wcm){aps.fn.logInfo("IVM Enabling In-View ad Management"); aps.cfg.ivm={observed:[],observer:null,delayBeforeDelete:5000,options:{root:null,rootMargin:"200px 0px 200px 0px",thresholds:0,},appendToObserver:function(a){if(!a){return }if(!aps.cfg.ivm.observed.includes(a.id)){aps.cfg.ivm.observed.push(a.id); aps.cfg.ivm.observer.observe(a); aps.logInfo("*IVM* observing "+a.id) }},callback:function(a){a.forEach(function(c){var b=aps.cfg.ads[c.target.id]; if(b.div==null){b.div=document.getElementById(b.code) }b.div.dataset.inview=c.isIntersecting; if(b.doNotRefresh){return }if(c.isIntersecting){aps.fn.tagAd(b); aps.fn.logInfo("*IVM* "+b.code+" in view"); if(b.state=="toDelete"){b.state="displayed" }else{if(b.state==null&&aps.cfg.lazyLoadingForced){b.state="firstLoad"; aps.fn.logInfo("*IVM* "+b.code+" loading"); b.impressionViewable=true; hearstRefreshAds([b.code]) }else{if(b.state=="deleted"){b.state="reloading"; aps.fn.logInfo("*IVM* "+b.code+" reloading"); b.impressionViewable=true; hearstRefreshAds([b.code]) }}}}else{if(b.renderCount>1){aps.fn.logInfo("*IVM* "+b.code+" out of view"); b.state="toDelete"; b.ivm=new Date().valueOf() }}}) }}; aps.cfg.ivm.observer=new IntersectionObserver(aps.cfg.ivm.callback,aps.cfg.ivm.options); aps.registerEvent(aps.event.on_before_request_ads,function(a){a.ads.forEach(function(c){var b=document.getElementById(c); aps.cfg.ivm.appendToObserver(b) }) }); aps.registerEvent(aps.event.on_new_div,function(a){aps.cfg.ivm.appendToObserver(a) }); aps.registerEvent(aps.event.on_timer,function(b){var a=new Date().valueOf()-aps.cfg.ivm.delayBeforeDelete; Object.entries(aps.cfg.ads).forEach(function(e){var c=e[1]; if(c.state!="toDelete"){return }if(c.ivm0){var d=[]; for(var c=0; c1&&parseInt(b[2],10)>4){d.push(parseInt(b[1],10)+"x"+parseInt(b[2],10)) }}e="?sz="+d.join("%7C") }else{e="?sz="+encodeURIComponent(a.width+"x"+a.height) }return e }; window.hearstGetVideoAdTag=function(b){if(aps.cfg.videoAdTag==null){aps.cfg.videoAdTag={width:1,height:4,code:"Video_MOS",rm:false,interstitial:false,sizeMappings:["001x400x300","001x640x360","001x640x480","001x001x004"],video:true,companion_units:null,kvps:[],} }var a=aps.cfg.videoAdTag; if(typeof(a)=="undefined"){aps.fn.logInfo("hearstGetVideoAdTag called with non-defined ad slot "+b+" : ignoring "); return null }if(a.video==false){aps.fn.logInfo("hearstGetVideoAdTag called non video defined ad slot "+b); return null }var f=hearstGetVideoAdTagSize(a); var g="https://pubads.g.doubleclick.net/gampad/ads"; g+=f; g+="&iu=/"+encodeURIComponent(aps.cfg.networkCode+"/"+aps.cfg.page.current.adUnit); g+="&url="+encodeURIComponent(top.location.protocol+"//"+JuicePageUrl); g+="&impl=s"; g+="&gdfp_req=1"; g+="&env=vp"; g+="&output=xml_vast3"; g+="&page_type="+aps.cfg.page.current.page_type2; g+="&unviewed_position_start=1"; g+="&description_url="+encodeURIComponent(top.location.protocol+"//"+JuicePageUrl); g+="&vpos=preroll"; g+="&ad_safe=medium"; if(a.companion_units!=null&&a.companion_units!=""){g+="&ciu_szs="+encodeURIComponent(a.companion_units) }else{g+="&ciu_szs=" }var c=""; c+="distributor_domain="; if(aps.cfg.page.current.domain.indexOf("m.")==0){c+=aps.cfg.page.current.domain.substr(2) }else{c+=aps.cfg.page.current.domain }c+="&page_type2="+aps.cfg.page.current.page_type2; c+="&pageurl="+encodeURIComponent(top.location.protocol+"//"+JuicePageUrl); c+="&referrer="+encodeURIComponent(document.referrer); c+="&urlhash="+aps.cfg.juiceMdUrlHash; c+="&pw=__player-width__&ph=__player-height__"; c+=(aps.cfg.vid.tagUrl=="")?"":"&"+aps.cfg.vid.tagUrl; for(var d=0; d-1){aps.fn.logSkip(d.code,"Celtra ad") }else{if(!aps.cfg.is.leafsSite&&d.isLoading==true){aps.fn.logSkip(d.code,"Last request not completed") }else{if(!aps.cfg.is.leafsSite&&!d.refreshable){aps.fn.logSkip(d.code,"Not refreshable") }else{if(!aps.cfg.is.leafsSite&&d.renderCount<=1){aps.fn.logSkip(d.code,"Not rendered") }else{if(!aps.cfg.is.leafsSite&&aps.cfg.refreshViewableOnly&&!d.impressionViewable){aps.fn.logSkip(d.code,"Not viewable") }else{if(d.code=="Crown"){aps.fn.logSkip(d.code,"Not refreshing Crown"); d.exclude=true }else{if(aps.page_type2=="article"&&["www.expressnews.com","www.houstonchronicle.com","www.sfchronicle.com"].includes(document.location.hostname)&&((current_device==devices.MOBILE&&d.code!="MAD")||(!["A300","B300","S300"].includes(d.code)&&!d.code.startsWith("rb")))){aps.fn.logSkip(d.code,"hearstRefreshAds: not refreshing masthead ads on premium site "); d.exclude=true }else{if(aps.cfg.ivm&&d.div.dataset.inview=="false"){aps.fn.logSkip(d.code,"only refreshing in view ads") }else{aps.fn.logInfo("hearstRefreshAds: refreshing "+d.code); c.push(d.code) }}}}}}}}}}}); if(c.length<=0){aps.fn.logInfo("hearstRefreshAds: No ads are in refreshable state - skipping refresh"); return }aps.fn.logInfo("hearstRefreshAds: refreshing ad slots "+c); aps.cfg.queuedAds=aps.cfg.queuedAds.concat(c); aps.fn.requestAds() }; window.hearstRefreshInterstitialAds=function(a){var b=[]; if(!Array.isArray(a)){a=[a] }aps.fn.logInfo("hearstRefreshInterstitialAds called: "+a.join(", ")); a.forEach(function(d){var c=aps.cfg.ads[d]; if(d=="EEinsert"){if(!aps.cfg.ads["EEinsert"]){aps.logInfo("EEinsert not defined") }else{b.push(d) }return }if(!c){aps.fn.logSkip(d+" not defined"); return }if(!c.interstitial){aps.fn.logSkip(c.code+" not an interstitial ad"); return }if(c.isLoading==true&&c.code!="EEinsert"){aps.fn.logInfo("skipping refresh of "+c.code+" . It has not completed last request."); return }if(aps.cfg.refreshViewableOnly&&!c.impressionViewable&&c.code!="EEinsert"){aps.fn.logInfo("skipping refresh of interstitial "+c.code+" . It is not viewable.") }else{aps.fn.logInfo("hearstRefreshAds: refreshing "+c.code); b.push(c.code) }}); if(b.length<=0){aps.fn.logInfo("hearstRefreshAds: No ads are in refreshable state - skipping refresh"); return }aps.fn.logInfo("hearstRefreshAds: refreshing ad slots "+b); aps.cfg.queuedAds=aps.cfg.queuedAds.concat(b); aps.fn.requestAds() }; aps.fn.contentLoaded(window,aps.fn.domLoaded) })();(function(){aps.cfg.page=new aps.o.base(); aps.fn.getPageInfo=function(b,a){var b=b||aps.fn.getFilteredHref(document.location.href); var e=aps.cfg.page; if(!e.urls.includes(b)){var d=new aps.o.page(b,[],a); e.allPages.push(d); e.urls.push(b); if(!e.current){e.current=d; e.currentIndex=0; aps.logInfo("Changing current URL to "+b); aps.cfg.current_domain=e.current.domain }else{e.next=d; if(aps.cfg.is.wcm){if(!e.next.scrollDepth){e.next.scrollDepth=aps.cfg.page.urls.length-1 }}if(aps.cfg.is.leafsSite){e.next.scrollDepth=aps.cfg.page.urls.length-1 }}}else{var c=e.urls.indexOf(b); e.currentIndex=c; e.current=e.allPages[c] }}; aps.fn.getPageInfo(); JuicePageUrl=aps.cfg.page.current.href.replace("/?","?"); if(aps.cfg.page.current.domain=="ctinsider.com"){aps.cfg.page.addBaseKvp("sect","ctinsider") }aps.cfg.abtestvar=window.HDN&&HDN.dataLayer&&HDN.dataLayer.abtest&&HDN.dataLayer.abtest.experimentId||aps.abtest||aps.npabtest||[]; if(aps.cfg.abtestvar.length>0){aps.fn.logInfo("npabtest : "+aps.cfg.abtestvar); aps.cfg.abtestvar.forEach(function(a){aps.cfg.page.addBaseKvp("ab",a) }) }else{aps.fn.logInfo("npabtest not detected.") }aps.cfg.page.addBaseKvp("v",aps.cfg.version) })();(function(){if(!aps.cfg.bid.enabled){return }aps.cfg.bid.prefetch={enabled:true,delay:2000,allBidsOnRefresh:true,que:[],refreshTimeout:2500,timeout:2500,timeoutPadding:10*1000,multiAdsToPrefetch:4,version:1.4,a9:{adUnits:[],enabled:true,},pb:{adUnits:[],bidCount:[],biddersDone:[],calledBidders:[],clientSideBidders:[],enabled:true,},checkMultiAd:function(a){if(!a.multiAd||aps.cfg.infiniteScroll){return }if(aps.cfg.is.wcm){var b=(parseInt(a.code.split("-")[1])+1)||1; var c=b+aps.cfg.bid.prefetch.multiAdsToPrefetch; if(aps.page_type2=="slideshow list view"){c=b+10 }for(var d=b; d1000 }); c.forEach(function(f){var d=aps.cfg.ads[f.code]; var e=document.getElementById(f.code); if(e.firstChild&&e.firstChild.name&&e.firstChild.name.startsWith("google")){e=e.firstChild }var g=e.getClientRects(); if(g.length>0){d.renderedSize=Math.round(g[0].width)+"x"+Math.round(g[0].height); f.renderedSize=d.renderedSize; f.advertiser=d.advertiser; f.sizes=d.stringSizes.join(",") }f.done=true }) }); aps.registerEvent(aps.event.on_new_div,function(b){var a=aps.cfg.ads[b.id]; var c=0; a.div=b; if(aps.cfg.is.wcm){if(b.dataset&&b.dataset.scrolldepth){c=b.dataset.scrolldepth }a.scrollDepth=c }aps.logInfo("*DIV* New div : "+b.id+" scrollDepth: "+c) }) })();(function(){try{var a=document.location.search.indexOf("adtest")+7; if(a==6){return }var c=document.location.search.indexOf(";",a); if(c==-1){c=document.location.search.length-a }aps.cfg.adtestparam=document.location.search.substr(a,c); if(aps.cfg.adtestparam){aps.page_kvps=aps.page_kvps||[]; aps.cfg.adtestparam=decodeURI(aps.cfg.adtestparam).split("|"); for(var g=0; g1){aps.fn.logSkip(f,"ad already displayed - aps.placeAd"); return }c.push(f); aps.cfg.dfp.waiting.push(f); aps.cfg.dfp.isWaiting=true; d=true }); aps.fn.logInfo("aps.placeAd: called with values: "+b.join(",")); if(c.length==0){aps.fn.logInfo("aps.placeAd: No ad to proceed"); return }aps.fn.logInfo("aps.placeAd: processing: "+c.join(",")); aps.waitStartStep("lazyload") }; if(aps.cfg.dfp.lazyload.enabled){aps.fn.logInfo("lazyloading: enabled"); aps.registerEvent(aps.event.on_check_include_ad,function(a){var c=aps.cfg.adMap.filter(function(d){return !aps.cfg.dfp.lazyload.firstLoad.includes(d) }); var b=aps.cfg.dfp.lazyload.firstLoad.filter(function(d){return aps.cfg.adMap.includes(d) }); aps.cfg.adMap=b.concat(c); aps.cfg.queuedAds=aps.cfg.queuedAds.concat(b) }) }})();(function(){aps.cfg.dfp.batchSRA={delay:3000,enabled:(window.location.search.indexOf("batchsra=1")!==-1||document.location.hostname.toLowerCase()=="sfinsider.sfgate.com")?true:false,auto:false,waitingNext:false,hasScrolled:false,userInteractFor:1,atfFirst:true,completed:false,}; if(HDN.dataLayer.ads.adMode=="batch"){aps.cfg.dfp.batchSRA.enabled=true; aps.logInfo("BatchSRA enabled") }if(aps.cfg.dfp.batchSRA.enabled){aps.fn.onScroll=function(){if(!aps.cfg.dfp.batchSRA.waitingNext||aps.cfg.dfp.batchSRA.hasScrolled){return }aps.fn.logInfo("Batch SRA : Scrolled"); aps.cfg.dfp.batchSRA.auto=true; aps.cfg.dfp.batchSRA.hasScrolled=true; aps.cfg.dfp.batchSRA.waitingNext=false; aps.fn.displayNextBatch() }; aps.fn.logInfo("Batch SRA : listening to Scroll event"); if(window.addEventListener){window.addEventListener("scroll",aps.fn.onScroll,false); window.addEventListener("click",aps.fn.onScroll,false) }else{if(window.attachEvent){window.attachEvent("onscroll",aps.fn.onScroll); window.attachEvent("onclick",aps.fn.onScroll) }}aps.registerEvent(aps.event.on_check_include_ad,function(a){a.checkForInclude.stop=true; if(a.position=="atf"||a.position=="mad"){a.checkForInclude.addAdSlot=true }}); aps.fn.displayNextBatch=function(){if(aps.cfg.dfp.batchSRA.completed){return }var a=[]; Object.entries(aps.cfg.ads).map(function(c){a.push(c[0]) }); var b=[]; aps.cfg.dfp.requests.forEach(function(c){b=b.concat(c.ads) }); a=a.filter(function(c){return !b.includes(c) }); if(a.length>0){aps.cfg.queuedAds=aps.cfg.queuedAds.concat(a); aps.fn.requestAds() }aps.cfg.dfp.batchSRA.completed } }})();(function(){if(aps.cfg.is.leafsSite){if(document.cookie.split(";").filter(function(a){return a.indexOf("region=EU")>=0 }).length==1){aps.fn.logInfo("region EU detected, disabling personalized ads"); aps.cfg.disablePersonalisation=true; if(document.location.href.indexOf("gdpr=true")>-1){aps.cfg.bid.enableGDPR=true }}}else{if(document.location.href.indexOf("?is_eu=1")>-1){aps.fn.logInfo("region EU (test) detected, disabling personalized ads"); aps.cfg.disablePersonalisation=true }}})();(function(){if(document.location.hostname.match(/((homeguides|smallbusiness|work|healthyeating|livehealthy)\.(chron|sfgate)\.com)/)){return }var d={"beaumontenterprise.com":"75e9ad4b5f1f1f3de38dea085cc34f079b9d8243999d3b30d70a543f2c3ae813","sfgate.com":"1cbbeea35302b334c17ec7de41048b19077c3452b8825fa3017876cf49d877c2","chron.com":"b8d94fd702b39f91830ea26eb261a1dd7eb3f9d18e86f88c83f7a317f3115379","mysanantonio.com":"3c81fd9605d796d254c7bdc62001ec2c520515c7c306b66b713a4421f7343766","seattlepi.com":"a3e9f57e66bb33f8f8995e6866a7eace83bca9720ee52bb2d8ab18fb8dddae94","sfchronicle.com":"a5e03e178aaf9b41b3fc69428362339bd7ba9a606118acee43f6169a1f7f9847","houstonchronicle.com":"48a6940997d234b7add9af8ed2b41694654edaeb6e7b5827579702d25182700b","expressnews.com":"d65ba7cd6a96847162fb556c3a5dc7b7e66de309481ec4e558b4e9dc40515858","timesunion.com":"f999472effec7a1ef427ab8ed55df47b4d250f60f376ce71f7293b353026f514","ctpost.com":"1118fad26ca4bcdf2a99fdee52724e3c512a258c149cbd8e6c4084c13040e86a","stamfordadvocate.com":"2df4f16391dbd310915a08bd62897dde4902fe30a7c29dcb2b80ba04345df633","nhregister.com":"2370d2dc32ab1b0d0894de8f024e2764a55756c723edb12fa7d7b6b221922fba","newstimes.com":"68fab42777221c69e8d127d9ba7a8b29e0ba95aae66e6166eb070c330ac04c0f","greenwichtime.com":"4a6fb4d137bab5bdc207d09d4b1acfc191dbad1e9e0e3190ca676d3730195d06","thehour.com":"049118934d099a757a2987317f05327a8ccd5a7c1501feaf8e4639fadbdb8936","ctinsider.com":"21b81f81bd7fa576db043ec887848073bbc6eafc46d9f8bec5240163093e2d46","registercitizen.com":"3377ba9d7d5061bf618f4ae6d3900e0067f913f99748fc366b7cb1542e6a96b2","middletownpress.com":"4f1f32e75691195dd027c417eed6c56d8a37e7ed729eb57c8ecd8abf8d5f420b","thetelegraph.com":"bf557221a53f15d39c7bce3aeed56dd6c13e57b3eba48f8e4fd2d54af42f0122","ourmidland.com":"37af6c3aa88542ced759eb5a9c478617d1b50eeae32789a669e3facca42eb56a","myjournalcourier.com":"5497becf77524b62bee5a589030b1e2163d34a60b7d960cdc976afc12b64d623","michigansthumb.com":"601647fe4d84d12a565e709dc7e944d38db91923d65d9bb6865788234f41893d","theintelligencer.com":"aadf36ee0d8d0f2765013057eb1bad1a552f9377dfc4b532d9b698df9a655884","manisteenews.com":"a2031afbd2e08a959fa777db882a99b7cc56d1dbff61d9d2d56c20a89c6d8b7e","bigrapidsnews.com":"7c907dba0dac340d4f0b3879a3d1699f0bf19e2a95b06945aa3b31cfde002c09","recordpatriot.com":"d4c71cee77592309f10e62ab4ce1a4d995719a82a77932eee5fc18a7948e2f41","lakecountystar.com":"2a7c7fb608092db498480edf2068123ffcd679d5ce9e8819760338386e1350e4","theheraldreview.com":"1655d53ab46f5391a09e189a8cf86f8e22098886ea6a2ae727b112087a05cbd0","yourconroenews.com":"aa3912f9cfd7f1fafd025dbd846d2383acce1b3574061b2c9508d43d5cc653da","lmtonline.com":"ffd0921bb88989b2dc6bac92611425966d93e8be7cf154e95fd27ae95db26375","mrt.com":"08621a723e4a1cd4ba4c25f46ce953173b9b3cffad4ec0bfb9b0e5d22bc22bc8","myplainview.com":"b49696bc422c346e4f4282e32cfc324d782f32b9c9d0fec6751d29dc0862bf61","theridgefieldpress.com":"053f373cd281b81bb04913797ec13da4438c7cc4596fc29e382ce5a1a93ce32d","westport-news.com":"55e354cf58c712583585324c15d758cd2b9801c0ce839fb6020d8835a63c0502","ncadvertiser.com":"eaff3ad2730aea1b010a2434dad485aef8e1a473f8977f048e5888c27a0a8b15","fairfieldcitizenonline.com":"ddbcce19fd54ba6f20d8e3bedb35cfea7887e9579c34d38307b3f3fa3f659ab0","wiltonbulletin.com":"7ef8a69225bec566b6a15690bd94081ed7898400ff9a8c68ac05ee924c2c2ce3","darientimes.com":"f0790e5c63dd390570f98d8b20ad18ee2666f8184dc03434de1c60fb823ff71c","trumbulltimes.com":"909616d5d05133cda02800bf40834036448deeea436efebe0d39fcb3f3f4bec8","sheltonherald.com":"2ea54058f6365a6a2bcb4ecda879ff406900d5b274c1e1ed6e2f0e746ad5068f","milfordmirror.com":"0f7190eb184e8a5af5171a9ea07a792b5a193725ebdb8a2c55a30ff187802fef","newmilfordspectrum.com":"34fda7a5dec281cc4ac526c9c1609ee8a6223ae799760c638c3b92d86751b2c5","southeasttexas.com":"1ca0a738d5cf7bb8ce1434d5522573d7f6894098e4706151b2882420b6bb6c62","gametimect.com":"c5a3ed040f3b98d6d9877a09dc7f00f3ba126d6f10836272b84a07be9ced5df7","connecticutmag.com":"6daa3d7e6b8778d504883db9545f72adfc4df9ba624ae5ac79af0dda7e1f98a3","shorelinetimes.com":"91a7025281ac9294e20e8cdd7b9c5d6414f44d887193db48097942a2404a9d1d","countytimes.com":"26a8bb30dec1f24c1e7bd51988a30cdaf1a32c615057fa4a092fedd8d19b6005","westhartfordnews.com":"5de2ce5445b39d5609215833a7fa6410f027135902d458f6751d115c11c33634","dolphin-news.com":"041a5d17decdae44358ae2eca8065b501b5a4936882e2188a3d41470b64eb47d","ctpostchronicle.com":"645700f07ec80b72131b2a6fc97f8f43da5820ce68bd559b0b507dfdf08f9f6a","ctbulletin.com":"26a8bb30dec1f24c1e7bd51988a30cdaf1a32c615057fa4a092fedd8d19b6005","greenstate.com":"412163cc8d602f027626c2ffab24515bd8f6ff426d0d4096330b64d8e7681e03","canyonnews.com":"593c0a648b760954871854fb60be6dfc252fd7387de8bcb568ebf2cd5449f3d8","sellitlaredo.com":"a86e9a199fadcfd738a0fa46b3fa9381cbb92bdc9b7a75b7fa222e143eaac6b9",}; var b=d[aps.cfg.current_domain]||""; if(b!=""){aps.fn.logInfo("The Media Trust: Loading"); var a=document.getElementsByTagName("script")[0]; var c=document.createElement("script"); c.async=1; c.src="https://scripts.webcontentassessor.com/scripts/"+b; a.parentNode.insertBefore(c,a) }})();(function(){aps.fn.onRender=function(d){var i={}; var j=d.slot||null; i.slot=j; i.divid=j.getSlotElementId(); i.ad=aps.cfg.ads[i.divid]; if(i.divid&&i.divid.startsWith("browsi")){return }if(i.ad){i.targetingMap=j.getTargetingMap(); i.responseInfo=j.getResponseInformation(); i.emptyAd=d.isEmpty; i.adsize=d.size||null; i.request=aps.cfg.dfp.requests[i.targetingMap.i]; i.bidInfo=""; j.currentBids=j.currentBids||[]; i.originalBid=(j.currentBids.length>0)?JSON.parse(JSON.stringify(j.currentBids[0])):null; i.winningBid=null; i.lineitemId=d.lineItemId||null; if(i.lineitemId==null&&i.responseInfo){if(i.responseInfo.lineItemId==null&&i.responseInfo.yieldGroupIds!=null){i.lineitemId=i.responseInfo.yieldGroupIds[0] }}i.ad.state=(i.emptyAd)?"empty":"displayed"; i.ad.renderCount++; i.ad.isLoading=false; i.ad.refreshable=true; i.ad.advertiserId=d.advertiserId; i.ad.size=i.adsize; i.ad.lineItemId=d.lineitemId; i.ad.creativeId=d.creativeId; i.ad.isEmpty=i.emptyAd; i.html=""; if(i.ad.creativeId){i.html=j.getHtml() }i.adType="banner"; if(i.targetingMap.hb_format){i.adType=i.targetingMap.hb_format[0] }if(i.adType=="native"&&i.html.indexOf("pbNativeTagData")==-1){i.adType="banner" }var b=i.ad.kvps.filter(function(e){return(e.key=="custom") }); var f=(b.length>0&&b[0].value.includes("blank_refresh"))||false; if(i.emptyAd){if(!["Crown","LNLogo","EEinsert"].includes(i.divid)&&!f){i.ad.addAdKvp("custom","blank_refresh"); aps.cfg.queuedAds.push(i.divid); aps.fn.logInfo("*BLANK* "+i.divid+" - blank ad served. Refreshing"); aps.fn.requestAds() }if(f&&i.divid.dataset&&i.divid.dataset.slug=="Advertisement"){aps.fn.logInfo(i.divid+" - slot empty: hiding div"); i.divid.style.display="none" }}i.advertiser=(i.responseInfo&&i.responseInfo.advertiserId!=null)?"Direct Ad":"No Ad"; if(i.advertiser!="No Ad"){if(aps.cfg.advertisers[i.responseInfo.advertiserId]){i.advertiser=aps.cfg.advertisers[i.responseInfo.advertiserId] }if(d.yieldGroupIds!=null){i.advertiser="exb/"+i.advertiser; try{if(typeof(companyIds[0])!="undefined"){i.advertiser="ExB/"+aps.cfg.advertisers[companyIds[0]] }}catch(c){}}}if(aps.cfg.infoDivDisplaying==i.ad.code){aps.fn.setAdDetails(i.ad.code) }var k=null; var g=i.html.match(/renderAd\(document, \'(.*)\'/g); var a=i.html.match(/renderImp\(document,"(.*)"/g); var h=i.html.match(/CustomEvent\(\'publicgood\'/g); if(g||a||h){k=j.currentBid; k.won=true }else{if(j.currentBid){j.currentBid.sent=false }}if(k){i.bidInfo=" bid: "+k.adId.slice(-7); if(j.aps.optimized){i.bidInfo=i.bidInfo+" [OPT] +"+j.aps.increase; ga("pb.send",{nonInteraction:true,hitType:"event",eventCategory:"juice_optimized_v"+aps.cfg.bid.prefetch.version,eventAction:document.location.hostname,eventLabel:j.aps.increase}) }i.winningBid=JSON.parse(JSON.stringify(k)); aps.cfg.bid.prefetch.que.push(i.divid); i.advertiser=k.source+"/"+k.bidder }i.ad.advertiser=i.advertiser; i.ad.render=i; i.request.renders.push(i); aps.fireEvent(aps.event.on_render_ad,i); aps.fn.tagAd(i.ad); aps.fn.logInfo("*IMP* "+aps.fn.fixLen(i.ad.code,10)+" "+aps.fn.fixLen(i.advertiser,14)+" lineitem: "+aps.fn.fixLen(i.lineitemId,12)+i.bidInfo) }}; aps.registerEvent(aps.event.on_render_ad,function(c){if(c.ad.advertiserId==4594233306){var a=document.getElementById(c.ad.code).firstChild; var b=a.style.cssText||""; b=(b=="")?"flex-grow:1":"flex-grow:1; "+b; a.setAttribute("style",b) }}); aps.registerEvent(aps.event.on_render_ad,function(a){if(a.html.indexOf("HNP-RM-NoRefresh")>-1){aps.fn.logInfo(a.ad.code+": NoRefresh detected"); a.ad.refreshable=false; a.ad.doNotRefresh=true }}); aps.registerEvent(aps.event.on_render_ad,function(c){if(aps.cfg.preventCeltraAdsToRefresh){if(c.html.indexOf("celtra")>-1){var a=c.ad; if(aps.cfg.dfp.celtraAds.indexOf(a.code)==-1){aps.cfg.dfp.celtraAds.push(a.code); aps.fn.logInfo(a.code+": Celtra ad detected") }c.ad.refreshable=false; c.ad.doNotRefresh=true; if(c.ad.code=="Crown"||c.ad.code=="Flex1"){if(aps.fn.getQueryParameterByName("plainceltra")==null){aps.cfg.dfp.celtra.preventMonitorIframe=aps.cfg.dfp.celtra.preventMonitorIframe||false; aps.cfg.dfp.celtra.checkMonitorIframe=aps.cfg.dfp.celtra.checkMonitorIframe||false; if(!aps.cfg.dfp.celtra.checkMonitorIframe){aps.cfg.dfp.celtra.checkMonitorIframe=true; aps.page.kvps.forEach(function(d){if(d.key=="testpage"&&d.value=="NYC_AdTech_CeltraViewTest"){aps.cfg.dfp.celtra.preventMonitorIframe=true }}) }if(aps.cfg.dfp.celtra.preventMonitorIframe){aps.fn.logInfo("Not loading CeltraIframeFix"); return }aps.cfg.dfp.celtra.divs=aps.cfg.dfp.celtra.divs||[]; aps.cfg.dfp.celtra.monitorIframe=aps.cfg.dfp.celtra.monitorIframe||false; var b=document.getElementById("google_ads_iframe_"+event.slot.getSlotId().getId()); aps.cfg.dfp.celtra.divs.push(b); if(!aps.cfg.dfp.celtra.monitorIframe){aps.cfg.dfp.celtra.monitorIframe=true; b.addEventListener("load",function(d){aps.fn.monitofCeltraIframe(0) }) }}if(aps.cfg.dfp.celtraAds.indexOf("Flex1")==-1){aps.cfg.dfp.celtraAds.push("Flex1"); aps.fn.logInfo("Flex1 also disabled (Celtra on Crown)") }if(aps.cfg.dfp.celtraAds.indexOf("Crown")==-1){aps.cfg.dfp.celtraAds.push("Crown"); aps.fn.logInfo("Crown also disabled (Celtra on Flex1)") }}}}}); aps.registerEvent(aps.event.on_render_ad,function(b){if(b.divid=="MAD"){if(event.size&&(event.size[0]!=320||event.size[1]!=50)){aps.fn.logInfo("Fixing: MAD having wrong size: "+event.size); var a=document.getElementById("MAD").firstChild; a.style.width="320px"; a.style.height="50px" }aps.cfg.ads["MAD"].impressionTimer=aps.cfg.ads["MAD"].impressionTimer||null; if(aps.cfg.ads["MAD"].impressionTimer==null){aps.cfg.ads["MAD"].impressionTimer=setTimeout(function(){aps.fn.logInfo("Forcing MAD viewability"); aps.cfg.ads["MAD"].impressionTimer=null; aps.cfg.ads["MAD"].impressionViewable=true },30000) }}}) })();(function(){var a=document.createElement("script"); a.src="https://z.moatads.com/hearstnewsprebidheader515009925453/moatheader.js"; a.setAttribute("id","moat-tag"); document.getElementsByTagName("head")[0].appendChild(a); window.moatYieldReady=function(){aps.cfg.dfp.moatYieldReady=true; window.moatPrebidApi.enableLogging() }; aps.registerEvent(aps.event.on_before_request_ads,function(c){aps.fn.logInfo("setMoatPrebidData"); if(window.moatPrebidApi&&typeof window.moatPrebidApi.enableLogging==="function"){window.moatPrebidApi.enableLogging() }if(window.moatPrebidApi&&typeof window.moatPrebidApi.pageDataAvailable==="function"&&window.moatPrebidApi.pageDataAvailable()){var b=window.moatPrebidApi.getMoatTargetingForPage(); Object.entries(b).forEach(function(d){var f=d[1]; if(aps.cfg.logToConsole){if(d[0]=="m_data"){f="0"; aps.fn.logInfo("Overwrite moat info "+d[0]+"="+f) }else{if(Array.isArray(f)){var e=[]; f.forEach(function(g){e.push(g.replace("unsafe","safe")) }); f=e }else{f=f.replace("unsafe","safe") }aps.fn.logInfo("Overwrite moat info "+d[0]+"="+f) }}c.page.addPageKvp(d[0],f,true) }) }}) })();(function(){})();(function(){aps.hash=aps.hash||{}; aps.codec=aps.codec||{}; aps.bitArray={bitSlice:function(b,d,c){b=aps.bitArray._shiftRight(b.slice(d/32),32-(d&31)).slice(1); return(c===undefined)?b:aps.bitArray.clamp(b,c-d) },extract:function(b,d,c){var f,e=Math.floor((-d-c)&31); if((d+c-1^d)&-32){f=(b[d/32|0]<<(32-e))^(b[d/32+1|0]>>>e) }else{f=b[d/32|0]>>>e }return f&((1<0&&d){b[c-1]=aps.bitArray.partial(d,b[c-1]&2147483648>>(d-1),1) }return b },partial:function(b,c,a){if(b===32){return c }return(a?c|0:c<<(32-b))+b*1099511627776 },getPartial:function(a){return Math.round(a/1099511627776)||32 },equal:function(c,d){if(aps.bitArray.bitLength(c)!==aps.bitArray.bitLength(d)){return false }var f=0,e; for(e=0; e=32; g-=32){f.push(c); c=0 }if(g===0){return f.concat(b) }for(d=0; d>>g); c=b[d]<<(32-g) }e=b.length?b[b.length-1]:0; h=aps.bitArray.getPartial(e); f.push(aps.bitArray.partial(g+h&31,(g+h>32)?c:f.pop(),1)); return f },_xor4:function(a,b){return[a[0]^b[0],a[1]^b[1],a[2]^b[2],a[3]^b[3]] },byteswapM:function(b){var c,e,d=65280; for(c=0; c>>24)|((e>>>8)&d)|((e&d)<<8)|(e<<24) }return b }}; aps.codec.hex={fromBits:function(a){var c="",b; for(b=0; b>>8>>>8>>>8); e<<=8 }return decodeURIComponent(escape(d)) },toBits:function(c){c=unescape(encodeURIComponent(c)); var b=[],a,d=0; for(a=0; a9007199254740991){throw ("Cannot hash more than 2^53 - 1 bits") }if(typeof Uint32Array!=="undefined"){var d=new Uint32Array(a); var g=0; for(f=512+k-((512+k)&511); f<=h; f+=512){this._block(d.subarray(16*g,16*(g+1))); g+=1 }a.splice(0,16*g) }else{for(f=512+k-((512+k)&511); f<=h; f+=512){this._block(a.splice(0,16)) }}return this },finalize:function(){var d,a=this._buffer,c=this._h; a=aps.bitArray.concat(a,[aps.bitArray.partial(1,1)]); for(d=a.length+2; d&15; d++){a.push(0) }a.push(Math.floor(this._length/4294967296)); a.push(this._length|0); while(a.length){this._block(a.splice(0,16)) }this.reset(); return c },_init:[],_key:[],_precompute:function(){var c=0,e=2,a,d; function b(f){return(f-Math.floor(f))*4294967296|0 }for(; c<64; e++){d=true; for(a=2; a*a<=e; a++){if(e%a===0){d=false; break }}if(d){if(c<8){this._init[c]=b(Math.pow(e,1/2)) }this._key[c]=b(Math.pow(e,1/3)); c++ }}},_block:function(t){var q,s,c,d,e=this._h,r=this._key,f=e[0],g=e[1],j=e[2],l=e[3],m=e[4],n=e[5],o=e[6],p=e[7]; for(q=0; q<64; q++){if(q<16){s=t[q] }else{c=t[(q+1)&15]; d=t[(q+14)&15]; s=t[q&15]=((c>>>7^c>>>18^c>>>3^c<<25^c<<14)+(d>>>17^d>>>19^d>>>10^d<<15^d<<13)+t[q&15]+t[(q+9)&15])|0 }s=(s+p+(m>>>6^m>>>11^m>>>25^m<<26^m<<21^m<<7)+(o^m&(n^o))+r[q]); p=o; o=n; n=m; m=l+s|0; l=j; j=g; g=f; f=(s+((g&j)^(l&(g^j)))+(g>>>2^g>>>13^g>>>22^g<<30^g<<19^g<<10))|0 }e[0]=e[0]+f|0; e[1]=e[1]+g|0; e[2]=e[2]+j|0; e[3]=e[3]+l|0; e[4]=e[4]+m|0; e[5]=e[5]+n|0; e[6]=e[6]+o|0; e[7]=e[7]+p|0 }} })();(function(){aps.specifiedAdSlots={}; aps.usingSelectiveAdSlotLoading=false; aps.selectiveAdSlotCookieName="Ju13ceSelectiveAdsList"; aps.fn.shouldPlaceAd=function(c){if(!aps.usingSelectiveAdSlotLoading){return true }return(typeof(aps.specifiedAdSlots[c])!="undefined") }; var b=aps.fn.getQueryParameterByName("sadslot[]"); if(b!=null){aps.usingSelectiveAdSlotLoading=true; for(var a=0; a-1){return false }if(!aps.usingSelective3rdLoading){return true }return(typeof(aps.specified3rdParties[c])!="undefined") }; aps.add3rdToSelectiveLoadingList=function(c){aps.specified3rdParties[c]=true }; var a=aps.fn.getQueryParameterByName("sad3rd[]"); if(a!=null){aps.usingSelective3rdLoading=true; for(var b=0; b-1||aps.cfg.bid.disableMobile)){aps.cfg.bid.a9.enabled=false }if(aps.cfg.disablePersonalisation&&!aps.cfg.bid.enableGDPR){aps.cfg.bid.a9.enabled=false }if(!aps.cfg.bid.enabled||!aps.cfg.bid.a9.enabled){aps.fn.logInfo("A9 disabled"); return }!function(d,b,f,i,j,c,e){if(b[d]){return }function h(a,g){b[d]._Q.push([a,g]) }b[d]={init:function(){h("i",arguments) },fetchBids:function(){h("f",arguments) },setDisplayBids:function(){},_Q:[]}; c=f.createElement(i); c.async=!0; c.src=j; e=f.getElementsByTagName(i)[0]; e.parentNode.insertBefore(c,e) }("apstag",window,document,"script","https://c.amazon-adsystem.com/aax2/apstag.js"); aps.cfg.bid.a9.config.pubID="3070"; aps.cfg.bid.a9.config.adServer="googletag"; aps.cfg.bid.a9.config.bidTimeout=aps.cfg.bid.prefetch.refreshTimeout; aps.cfg.bid.a9.partners={"1y9xr0g":"amobee","1ayvuv4":"appnexus","1ginqio":"conversant","2kotmo":"districtm","j80glc":"dmx","1eaqzgg":"gumgum","yrdq0w":"index","t7ludc":"magnite","1gqg3k":"oath","bgbtvk":"openX","1m2fm68":"pubmatic","kbyu4g":"pulsepoint","1r28b28":"sharethgough","e87rpc":"simpli.fi","16j2cqo":"triplelift","rjoa2o":"undertone","1gqg3k":"verizon mkt","lfx7nx":"verizon","t7ludc":"rubicon","1iqkhkw":"yieldmo",}; aps.cfg.bid.a9.validSections={"":"home page","Homepage":"home page","news":"news","entertainment":"entertainment","sports":"sports","burningman":"burningman","realestate":"real estate","obituaries":"obituaries","bayarea":"local news","seen-events":"seen","neighborhood":"local news","food":"food","lifestyle":"living","life":"living","business":"business","local":"local news","ontheblock":"real estate","politics":"news","homestyle":"real estate","living":"living","california-wildfires":"local news","seen-saratoga":"seen","comics-and-games":"entertainment","technology":"technology","education":"education","seen":"seen","expensive-san-francisco":"local news","2018":"local news","2019":"local news","weather":"local news","national":"news","homes":"real estate","photogallery":"news","style":"living","search":"other","science":"news","houseoftheweek":"real estate","music":"entertainment","sfhistory":"local news","nation":"news","readmore":"other","49ers":"sports","portal":"subsciption","crime":"local news","client":"entertainment","warriors":"sports","chris-mcginnis":"travel","raiders":"sports","chronicle_vault":"entertainment","art":"entertainment","real-estate":"real estate","insidescoop":"food","mommyfiles":"living","seattlenews":"local news","beer":"food","access.aspx?product=newedition&from=http:":"subsciption","travel":"travel","giants":"sports","galleries":"news","home":"real estate","opinion":"local news","jobs":"jobs","houston":"local news","education_clone_6643_20180713151626":"local news","dearabby":"entertainment","beauty":"living","outdoors":"travel","subscribe-new-offers":"subsciption","earthquakes":"local news","cars":"autos","chronicle-history":"local news","capitol":"local news","tablehopping":"food","photos":"news","latestnews":"news","mlb":"sports","horoscope":"entertainment","new-haven":"local news","fiesta":"local news","collegesports":"sports","blogs":"other","preps":"sports","auto":"autos","originalpets":"living","lifestyles":"living","athletics":"sports","weird":"news","wine":"food","games":"entertainment","comics":"entertainment","columns":"local news","getaways":"travel","us":"news","rodeo":"entertainment",}; aps.cfg.bid.a9.getSection=function(a){var b=""; if(aps.cfg.bid.a9.validSections[a.path[0]]==undefined){b="other" }else{b=aps.cfg.bid.a9.validSections[a.path[0]] }switch(a.hostname){case"education.seattlepi.com":b="Education"; break; case"healthyeating.sfgate.com":b="Healthy Eating"; break; case"homeguides.sfgate.com":b="Home Guides"; break; case"livehealthy.chron.com":b="Live Healthy"; break; case"pyme.lavoztx.com":b="Pyme"; break; case"smallbusiness.chron.com":b="Small Business"; break; case"work.chron.com":b="Work"; break }return b }; aps.cfg.bid.a9.configSlot=function(a){var c={sizes:[]}; if(a.exclude){return c }if(!aps.fn.isValidBid(a,"","a9")){return c }a.sizes=a.sizes||[]; if(a.mediaType=="native"){return c }if(a.sizes.length==0){aps.fn.logSkip(a.code,"no size available to bidders (a9)"); return c }if(a.video){return c }var b={}; b.slotID=a.code; b.slotName="/"+aps.cfg.networkCode+"/"+aps.cfg.page.current.adUnit+"/"+b.slotID; b.sizes=a.sizes; if(!aps.cfg.is.qa){b.floor={value:5,currency:"USD"} }return b }; aps.registerEvent(aps.event.on_define_bid_data,function(a){if(a.code=="Crown"){return }var b=aps.cfg.bid.a9.configSlot(a); if(b.sizes.length>0){if(!aps.cfg.bid.prefetch.a9.adUnits.includes(a.code)){aps.cfg.bid.prefetch.a9.adUnits.push(a.code) }a.a9=b }}); aps.registerEvent(aps.event.on_request_bid,function(a){a.pages.forEach(function(d){var c=d.a9.ads; var b=d.a9.adIds; if(!aps.cfg.bid.prefetch.allBidsOnRefresh&&a.slotIds){c=c.filter(function(e){return a.slotIds.includes(e.slotID) }); b=b.filter(function(e){return a.slotIds.includes(e) }) }if(c.length>0){aps.fn.setPerformanceMetrics("A9BidsRequested","calling a9 for page "+d.scrollDepth+" ads: "+b); apstag.init(d.a9.config); apstag.fetchBids({slots:c,timeout:aps.cfg.bid.prefetch.timeout,},function(e){aps.cfg.bid.a9.handleDisplayBids(e,d) }); setTimeout(function(){aps.cfg.bid.a9.received=true; d.a9BidsReceived=true },aps.cfg.bid.prefetch.timeout) }}) }); aps.cfg.bid.a9.handleDisplayBids=function(a,b){a.forEach(function(d){if(d.amznbid=="2"||d.amznbid=="1"){return }var c=aps.cfg.ads[d.slotID]; var e=aps.cfg.bid.a9.partners[d.amznp]||"a9"; var h=d.amznbid; if(d.amznbid_sp){h=d.amznbid_sp }while(h.length<7){h+="0" }var g=aps.fn.getPageBid(c,d); g.a9BidsReceived=true; var f=new aps.o.bid("a9",c,e,h,d); g.bids.push(f) }); aps.cfg.bid.a9.received=true; b.a9BidsReceived=true; aps.fn.logInfo("A9 bids received") }; aps.cfg.bid.a9.buildDisplaySlots=function(d){var c=[]; for(var a=0; a0){googletag.cmd.push(function(){aps.cfg.bid.a9.checkInitCalled(); aps.fn.logInfo("calling A9 video"); apstag.fetchBids({slots:aps.cfg.bid.a9.videoAdUnits,timeout:aps.cfg.bid.a9.config.bidTimeout},function(a){aps.cfg.bid.a9.handleVideoBids(a) }) }) }}; aps.cfg.bid.a9.handleVideoBids=function(a){aps.fn.logInfo("A9 video bid received: "+a.length); if(a.length>0){aps.cfg.vid.tagUrl+=a[0].qsParams; aps.cfg.bid.bids.push({slotid:a[0].slotID,bid:a[0].amznbid,bidder:aps.cfg.bid.a9.partners[a[0].amznp]||"A9"}) }}; aps.registerEvent(aps.event.on_request_new_video_ads,function(){aps.cfg.bid.a9.getVideoBids() }) })();(function(){aps.registerEvent(aps.event.on_before_request_ads,function(c){var a=!1; if(aps.cfg.page.current.domain=="expressnews.com"||aps.cfg.page.current.domain=="houstonchronicle.com"){try{if(GetCookie("hrstctok")!=null){a=1 }}catch(b){}}else{if(aps.cfg.page.current.domain=="sfchronicle.com"){try{if(JSON.parse(sessionStorage.getItem("sync-subscriberPlans-status"))["hasActivePlans"]==true){a=1 }}catch(b){}}}if(a){aps.cfg.page.addBaseKvp("category","premuser") }}) })();(function(){var a=""; switch(aps.cfg.page.current.domain){case"houstonchronicle.com":case"chron.com":a="hou"; break; case"expressnews.com":case"mysanantonio.com.com":a="sa"; break; case"sfchronicle.com":case"sfgate.com":a="sf"; break; case"timesunion.com":a="tu"; break; default:return; break }aps.registerEvent(aps.event.on_before_request_ads,function(h){var d=false; var l=false; var j=[]; try{if(typeof(localStorage)!=undefined){var f=JSON.parse(localStorage.getItem("hnp_subs")); var b=1; var e=null; if(f!=null){for(var g in f){if(f.hasOwnProperty(g)){e=f[g]; if(e.hasOwnProperty("sub_status_"+b)){var i=a; if(e["sub_status_"+b]=="Active"){i=i+"_a_" }else{i=i+"_ex_" }i=i+e["sub_product_"+b]+"_"; i=i+e["sub_product_code_"+b]; j.push(i) }}b++ }}}}catch(c){}var k=a+"_na"; if(j.length>=1){k=j.join(",") }aps.fn.addPageKvp("swgt",k) }) })();!function(){aps.fn.createHash=function(Q,S){function U(c,d){return c<>>32-d }function W(h,i){var j,k,l,m,n; return l=2147483648&h,m=2147483648&i,j=1073741824&h,k=1073741824&i,n=(1073741823&h)+(1073741823&i),j&k?2147483648^n^l^m:j|k?1073741824&n?3221225472^n^l^m:1073741824^n^l^m:n^l^m }function Y(d,e,f){return d&e|~d&f }function aa(d,e,f){return d&f|e&~f }function ac(d,e,f){return d^e^f }function ae(d,e,f){return e^(d|~f) }function ag(c,d,e,k,l,m,n){return c=W(c,W(W(Y(d,e,k),l),n)),W(U(c,m),d) }function ai(c,d,f,k,l,m,n){return c=W(c,W(W(aa(d,f,k),l),n)),W(U(c,m),d) }function ak(c,d,g,k,l,m,n){return c=W(c,W(W(ac(d,g,k),l),n)),W(U(c,m),d) }function am(c,d,h,k,l,m,n){return c=W(c,W(W(ae(d,h,k),l),n)),W(U(c,m),d) }function ao(j){for(var k,l=j.length,m=l+8,n=(m-m%64)/64,o=16*(n+1),p=Array(o-1),q=0,r=0; l>r; ){k=(r-r%4)/4,q=r%4*8,p[k]=p[k]|j.charCodeAt(r)<>>29,p }function aq(f){var g,h,i="",j=""; for(h=0; 3>=h; h++){g=f>>>8*h&255,j="0"+g.toString(16),i+=j.substr(j.length-2,2) }return i }function at(e){e=e.replace(/\r\n/g,"\n"); for(var f="",g=0; gh?f+=String.fromCharCode(h):h>127&&2048>h?(f+=String.fromCharCode(h>>6|192),f+=String.fromCharCode(63&h|128)):(f+=String.fromCharCode(h>>12|224),f+=String.fromCharCode(h>>6&63|128),f+=String.fromCharCode(63&h|128)) }return f }void 0===S&&(S=""),void 0===Q&&(Q=10000000000*Math.random()+"||"+window.location.href+"||"+(new Date).getTime()+"||"+S); var av,ax,ay,az,aA,aB,aC,aD,aE,aF=Array(),aG=7,R=12,T=17,V=22,X=5,Z=9,ab=14,ad=20,af=4,ah=11,aj=16,al=23,an=6,ap=10,ar=15,au=21; for(Q=at(Q),aF=ao(Q),aB=1732584193,aC=4023233417,aD=2562383102,aE=271733878,av=0; av0){aps.cfg.page.addPageKvp("bc_audiences",b[0]["value"]) }else{aps.fn.logInfo("Empty blueconic segment detected") }}catch(c){aps.fn.logInfo("error parsing blueconic data") }}else{aps.fn.logInfo("Blueconic segments not detected") }}) }})();(function(){if(!aps.cfg.bid.enabled){return }aps.pwt={}; aps.pwt.getLocalStorage=function(){var i={}; var j=localStorage.getItem("identityHub"); if(j!=null){i=JSON.parse(j) }var j=localStorage.getItem("identityHub_getUserIds"); if(j!=null){i.getUserIds=function(){return JSON.parse(j) } }return i }; aps.pwt.setLocalStorage=function(){aps.fn.logInfo("loaded PubMatic pwt.js"); localStorage.setItem("identityHub",JSON.stringify(window.PWT)); localStorage.setItem("identityHub_getUserIds",JSON.stringify(window.PWT.getUserIds())) }; window.PWT=aps.pwt.getLocalStorage(); var a="2933"; switch(aps.cfg.current_domain){case"chron.com":a="3346"; break; case"ctpost.com":a="3347"; break; case"expressnews.com":a="3348"; break; case"houstonchronicle.com":a="3349"; break; case"mysanantonio.com":a="3350"; break; case"seattlepi.com":a="3351"; break; case"sfchronicle.com":a="3352"; break; case"sfgate.com":a="3353"; break; case"timesunion.com":a="3354"; break }var e=window.location.href; var g="//ads.pubmatic.com/AdServer/js/pwt/157076/"+a; var d=""; if(e.indexOf("pwtv=")>0){var f=/pwtv=(.*?)(&|$)/g; var b=f.exec(e); if(b.length>=2&&b[1].length>0){d="/"+b[1] }}var h=document.createElement("script"); h.async=true; h.id="identityHub"; h.type="text/javascript"; h.src=g+d+"/pwt.js"; h.onload=aps.pwt.setLocalStorage; var c=document.getElementsByTagName("script")[0]; c.parentNode.insertBefore(h,c); aps.fn.logInfo("loading PubMatic pwt.js") })();(function () { /* prebid.js v7.0.0 Updated: 2022-06-13 Modules: rtdModule, appnexusBidAdapter, concertBidAdapter, consumableBidAdapter, criteoBidAdapter, ixBidAdapter, kargoBidAdapter, openxBidAdapter, prebidServerBidAdapter, pubmaticBidAdapter, pulsepointBidAdapter, rubiconBidAdapter, teadsBidAdapter, tripleliftBidAdapter, yieldmoBidAdapter, consentManagement, consentManagementUsp, googleAnalyticsAdapter, optimeraRtdProvider, permutiveRtdProvider */ if(pbjs&&pbjs.libLoaded)try{pbjs.getConfig("debug")&&console.warn("Attempted to load a copy of Prebid.js that clashes with the existing 'pbjs' instance. Load aborted.")}catch(e){}else (function(){ !function(){var e,n={4877:function(e,n,t){t.d(n,{Pd:function(){return d},Th:function(){return c},_U:function(){return s}});var r=t(6996),i=t(9853),o=t(265),a=t(1879),u="outstream";function c(e){var n=this,t=e.url,o=e.config,a=e.id,c=e.callback,d=e.loaded,s=e.adUnitCode;this.url=t,this.config=o,this.handlers={},this.id=a,this.loaded=d,this.cmd=[],this.push=function(e){"function"==typeof e?n.loaded?e.call():n.cmd.push(e):(0,i.H)("Commands given to Renderer.push must be wrapped in a function")},this.callback=c||function(){n.loaded=!0,n.process()},this.render=function(){var e=this,n=arguments,o=function(){e._render?e._render.apply(e,n):(0,i.yN)("No render function was provided, please use .setRender on the renderer")};f(s)?((0,i.yN)("External Js not loaded by Renderer since renderer url and callback is already defined on adUnit ".concat(s)),o()):(this.cmd.unshift(o),(0,r.B)(t,u,this.callback,this.documentContext))}.bind(this)}function d(e){return!(!e||!e.url)}function s(e,n,t){var r=null;e.config&&e.config.documentResolver&&(r=e.config.documentResolver(n,document,t)),r||(r=document),e.documentContext=r,e.render(n,e.documentContext)}function f(e){var n=pbjs.adUnits,t=(0,a.sE)(n,(function(n){return n.code===e}));if(!t)return!1;var r=(0,o.Z)(t,"renderer"),i=!!(r&&r.url&&r.render),u=(0,o.Z)(t,"mediaTypes.video.renderer"),c=!!(u&&u.url&&u.render);return!!(i&&!0!==r.backupOnly||c&&!0!==u.backupOnly)}c.install=function(e){return new c({url:e.url,config:e.config,id:e.id,callback:e.callback,loaded:e.loaded,adUnitCode:e.adUnitCode})},c.prototype.getConfig=function(){return this.config},c.prototype.setRender=function(e){this._render=e},c.prototype.setEventHandlers=function(e){this.handlers=e},c.prototype.handleVideoEvent=function(e){var n=e.id,t=e.eventName;"function"==typeof this.handlers[t]&&this.handlers[t](),(0,i.ji)("Prebid Renderer event for id ".concat(n," type ").concat(t))},c.prototype.process=function(){for(;this.cmd.length>0;)try{this.cmd.shift().call()}catch(e){(0,i.H)("Error processing Renderer command: ",e)}}},7263:function(e,n,t){t.d(n,{f:function(){return a}});var r=t(265),i={};function o(e,n,t){var r=function(e,n){var t=i[e]=i[e]||{bidders:{}};return n?t.bidders[n]=t.bidders[n]||{}:t}(e,t);return r[n]=(r[n]||0)+1,r[n]}var a={incrementRequestsCounter:function(e){return o(e,"requestsCounter")},incrementBidderRequestsCounter:function(e,n){return o(e,"requestsCounter",n)},incrementBidderWinsCounter:function(e,n){return o(e,"winsCounter",n)},getRequestsCounter:function(e){return(0,r.Z)(i,"".concat(e,".requestsCounter"))||0},getBidderRequestsCounter:function(e,n){return(0,r.Z)(i,"".concat(e,".bidders.").concat(n,".requestsCounter"))||0},getBidderWinsCounter:function(e,n){return(0,r.Z)(i,"".concat(e,".bidders.").concat(n,".winsCounter"))||0}}},2801:function(e,n,t){function r(e){var n=e;return{callBids:function(){},setBidderCode:function(e){n=e},getBidderCode:function(){return n}}}t.d(n,{Z:function(){return r}})},8634:function(e,n,t){t.d(n,{ZP:function(){return ce},rp:function(){return te},uV:function(){return oe},nX:function(){return re}});var r=t(9853),i=t(265),o=t(1269),a=t(9017),u=t(1609),c=t(5755),d=t(8962),s=t(2922),f=t(1879),l=t(7263);function p(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(!e)return e;if(/\w+:\/\//.exec(e))return e;var t=n.location.protocol;try{t=n.top.location.protocol}catch(e){}return/^\/\//.exec(e)?t+e:"".concat(t,"//").concat(e)}function g(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.noLeadingWww,r=void 0!==t&&t,i=n.noPort,o=void 0!==i&&i;try{e=new URL(p(e))}catch(e){return}return e=o?e.hostname:e.host,r&&e.startsWith("www.")&&(e=e.substring(4)),e}var v=function(e){function n(e){try{var n=e.querySelector("link[rel='canonical']");if(null!==n)return n.href}catch(e){}return null}return function(){var t,i,o,a,u=[],c=function(e){try{if(!e.location.ancestorOrigins)return;return e.location.ancestorOrigins}catch(e){}}(e),s=d.vc.getConfig("maxNestedIframes"),f=!1,l=0,v=!1,y=!1,b=!1;do{var h=t,m=y,w=void 0,C=!1,A=null;y=!1,t=t?t.parent:e;try{w=t.location.href||null}catch(e){C=!0}if(C)if(m){var S=h.context;try{i=A=S.sourceUrl,b=!0,v=!0,t===e.top&&(f=!0),S.canonicalUrl&&(o=S.canonicalUrl)}catch(e){}}else{(0,r.yN)("Trying to access cross domain iframe. Continuing without referrer and location");try{var T=h.document.referrer;T&&(A=T,t===e.top&&(f=!0))}catch(e){}!A&&c&&c[l-1]&&(A=c[l-1],t===e.top&&(b=!0)),A&&!v&&(i=A)}else{if(w&&(i=A=w,v=!1,t===e.top)){f=!0;var E=n(t.document);E&&(o=E)}t.context&&t.context.sourceUrl&&(y=!0)}u.push(A),l++}while(t!==e.top&&l1&&void 0!==arguments[1]?arguments[1]:(0,r.AB)();this.generatedTime=n,O(this,P).call(this,e)}},{key:"getConsentData",value:function(){return O(this,B)}}]),e}(),N=function(e){b(t,e);var n=m(t);function t(){return A(this,t),n.apply(this,arguments)}return T(t,[{key:"getConsentMeta",value:function(){var e=this.getConsentData();if(e&&this.generatedTime)return{usp:e,generatedAt:this.generatedTime}}}]),t}(R),x=function(e){b(t,e);var n=m(t);function t(){return A(this,t),n.apply(this,arguments)}return T(t,[{key:"getConsentMeta",value:function(){var e=this.getConsentData();if(e&&e.vendorData&&this.generatedTime)return{gdprApplies:e.gdprApplies,consentStringSize:(0,r.d8)(e.vendorData.tcString)?e.vendorData.tcString.length:0,generatedAt:this.generatedTime,apiVersion:e.apiVersion}}}]),t}(R),D=t(2319),q=t(5644);function H(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function F(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);t2&&void 0!==arguments[2]?arguments[2]:{},r=t.getS2SBidders,i=void 0===r?oe:r;if(null==n)return e;var o=i(n);return e.filter((function(e){return o.has(e.bidder)}))}),"filterBidsForAdUnit");function ee(e,n){var t=(0,r.I8)(e);return t.forEach((function(e){e.bids=$(e.bids,n).map((function(e){return e.bid_id=(0,r._d)(),e}))})),t=t.filter((function(e){return 0!==e.bids.length}))}function ne(e){var n=(0,r.I8)(e);return n.forEach((function(e){e.bids=$(e.bids,null)})),n=n.filter((function(e){return 0!==e.bids.length}))}var te=new x,re=new N,ie=(0,s.z3)("sync",(function(e,n){return(0,o.UB)(e,n)}),"setupAdUnitMediaTypes");function oe(e){(0,r.kJ)(e)||(e=[e]);var n=new Set([null]);return e.filter((function(e){return e&&e.enabled})).flatMap((function(e){return e.bidders})).forEach((function(e){return n.add(e)})),n}var ae=(0,s.z3)("sync",(function(e,n){var t,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.getS2SBidders,a=void 0===o?oe:o,u=a(n);return(0,r.pP)(e).reduce((function(e,n){return e[u.has(n)?L:K].push(n),e}),(W(t={},K,[]),W(t,L,[]),t))}),"partitionBidders");function ue(e,n,t){try{var i=J[e].getSpec();i&&i[n]&&"function"==typeof i[n]&&((0,r.PN)("Invoking ".concat(e,".").concat(n)),d.vc.runWithBidder(e,r.ak.call(i[n],i,t)))}catch(t){(0,r.yN)("Error calling ".concat(n," of ").concat(e))}}G.makeBidRequests=(0,s.z3)("sync",(function(e,n,t,i,o){var u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};D.j8(q.FP.BEFORE_REQUEST_BIDS,e),(0,a.Fb)(e),e=ie(e,o);var c=ae(e,Q),s=c[K],l=c[L];d.vc.getConfig("bidderSequence")===d.FD&&(s=(0,r.TV)(s));var p=v(),g=[],y=u.global||{},b=u.bidder||{};function h(e){var n=Object.freeze((0,r.Ee)({},y,b[e.bidderCode]));return e.ortb2=n,e.bids.forEach((function(e){return e.ortb2=n})),e}Q.forEach((function(i){if(i&&i.enabled){var o=ee(e,i),a=(0,r.DO)();l.forEach((function(e){var u=(0,r._d)(),c=h({bidderCode:e,auctionId:t,bidderRequestId:u,uniquePbsTid:a,bids:X({bidderCode:e,auctionId:t,bidderRequestId:u,adUnits:(0,r.I8)(o),src:q.os.YZ}),auctionStart:n,timeout:i.timeout,src:q.os.YZ,refererInfo:p});0!==c.bids.length&&g.push(c)})),o.forEach((function(e){var n=e.bids.filter((function(e){return(0,f.sE)(g,(function(n){return(0,f.sE)(n.bids,(function(n){return n.bidId===e.bid_id}))}))}));e.bids=n})),g.forEach((function(e){void 0===e.adUnitsS2SCopy&&(e.adUnitsS2SCopy=o.filter((function(e){return e.bids.length>0})))}))}}));var m=ne(e);return s.forEach((function(e){var a=(0,r._d)(),u=h({bidderCode:e,auctionId:t,bidderRequestId:a,bids:X({bidderCode:e,auctionId:t,bidderRequestId:a,adUnits:(0,r.I8)(m),labels:o,src:"client"}),auctionStart:n,timeout:i,refererInfo:p}),c=J[e];c||(0,r.H)("Trying to make a request for bidder that does not exist: ".concat(e)),c&&u.bids&&0!==u.bids.length&&g.push(u)})),te.getConsentData()&&g.forEach((function(e){e.gdprConsent=te.getConsentData()})),re.getConsentData()&&g.forEach((function(e){e.uspConsent=re.getConsentData()})),g}),"makeBidRequests"),G.callBids=function(e,n,t,i,o,a,u){var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{};if(n.length){var f=n.reduce((function(e,n){return e[Number(void 0!==n.src&&n.src===q.os.YZ)].push(n),e}),[[],[]]),l=M(f,2),p=l[0],g=l[1],v=[];g.forEach((function(e){for(var n=-1,t=0;t0?w.join(", "):'No bidder specified, using "ortb2Imp" definition(s) only')),p.forEach((function(e){D.j8(q.FP.BID_REQUESTED,F(F({},e),{},{tid:b}))})),d.callBids(h,g,t,(function(){return m.forEach((function(e){return e()}))}),n)}}else(0,r.H)("missing "+e.adapter);y++}})),p.forEach((function(e){e.start=(0,r.AB)();var n=J[e.bidderCode];d.vc.runWithBidder(e.bidderCode,(function(){(0,r.ji)("CALLING BIDDER"),D.j8(q.FP.BID_REQUESTED,e)}));var s=(0,c.O)(a,o?{request:o.request.bind(null,e.bidderCode),done:o.done}:void 0),f=i.bind(e);try{d.vc.runWithBidder(e.bidderCode,r.ak.call(n.callBids,n,e,t,f,s,u,d.vc.callbackWithBidder(e.bidderCode)))}catch(n){(0,r.H)("".concat(e.bidderCode," Bid Adapter emitted an uncaught error when parsing their bidRequest"),{e:n,bidRequest:e}),f()}}))}else(0,r.yN)("callBids executed with no bidRequests. Were they filtered by labels or sizing?")},G.videoAdapters=[],G.registerBidAdapter=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t.supportedMediaTypes,o=void 0===i?[]:i;e&&n?"function"==typeof e.callBids?(J[n]=e,(0,f.q9)(o,"video")&&G.videoAdapters.push(n),(0,f.q9)(o,"native")&&a.Sg.push(n)):(0,r.H)("Bidder adaptor error for bidder code: "+n+"bidder must implement a callBids() function"):(0,r.H)("bidAdapter or bidderCode not specified")},G.aliasBidAdapter=function(e,n,t){if(void 0===J[n]){var i=J[e];if(void 0===i){var o=[];Q.forEach((function(t){if(t.bidders&&t.bidders.length){var r=t&&t.bidders;t&&(0,f.q9)(r,n)?V[n]=e:o.push(e)}})),o.forEach((function(e){(0,r.H)('bidderCode "'+e+'" is not an existing bidder.',"adapterManager.aliasBidAdapter")}))}else try{var c,d=function(e){var n=[];return(0,f.q9)(G.videoAdapters,e)&&n.push("video"),(0,f.q9)(a.Sg,e)&&n.push("native"),n}(e);if(i.constructor.prototype!=Object.prototype)(c=new i.constructor).setBidderCode(n);else{var s=i.getSpec(),l=t&&t.gvlid,p=t&&t.skipPbsAliasing;c=(0,u.PZ)(Z({},s,{code:n,gvlid:l,skipPbsAliasing:p})),V[n]=e}G.registerBidAdapter(c,n,{supportedMediaTypes:d})}catch(n){(0,r.H)(e+" bidder does not currently support aliasing.","adapterManager.aliasBidAdapter")}}else(0,r.ji)('alias name "'+n+'" has been already specified.')},G.registerAnalyticsAdapter=function(e){var n=e.adapter,t=e.code,i=e.gvlid;n&&t?"function"==typeof n.enableAnalytics?(n.code=t,Y[t]={adapter:n,gvlid:i}):(0,r.H)('Prebid Error: Analytics adaptor error for analytics "'.concat(t,'"\n analytics adapter must implement an enableAnalytics() function')):(0,r.H)("Prebid Error: analyticsAdapter or analyticsCode not specified")},G.enableAnalytics=function(e){(0,r.kJ)(e)||(e=[e]),(0,r.yi)(e,(function(e){var n=Y[e.provider];n&&n.adapter?n.adapter.enableAnalytics(e):(0,r.H)("Prebid Error: no analytics adapter found in registry for '".concat(e.provider,"'."))}))},G.getBidAdapter=function(e){return J[e]},G.getAnalyticsAdapter=function(e){return Y[e]},G.callTimedOutBidders=function(e,n,t){n=n.map((function(n){return n.params=(0,r.S0)(e,n.adUnitCode,n.bidder),n.timeout=t,n})),n=(0,r.vM)(n,"bidder"),Object.keys(n).forEach((function(e){ue(e,"onTimeout",n[e])}))},G.callBidWonBidder=function(e,n,t){n.params=(0,r.S0)(t,n.adUnitCode,n.bidder),l.f.incrementBidderWinsCounter(n.adUnitCode,n.bidder),ue(e,"onBidWon",n)},G.callSetTargetingBidder=function(e,n){ue(e,"onSetTargeting",n)},G.callBidViewableBidder=function(e,n){ue(e,"onBidViewable",n)},G.callBidderError=function(e,n,t){ue(e,"onBidderError",{error:n,bidderRequest:t})};var ce=G},1609:function(e,n,t){t.d(n,{JY:function(){return _},PZ:function(){return j},Q1:function(){return U},dX:function(){return I}});var r=t(2801),i=t(8634),o=t(8962),a=t(1477),u=t(7112),c=t(9017),d=t(1929),s=t(5644),f=t(2319),l=t(1879),p=t(5755),g=t(9853),v=t(265),y=t(8265),b=t(2922),h=t(5849),m=t(4766),w=t(9624);function C(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,i,o=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(o.push(r.value),!n||o.length!==n);a=!0);}catch(e){u=!0,i=e}finally{try{a||null==t.return||t.return()}finally{if(u)throw i}}return o}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return A(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return A(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t2&&void 0!==arguments[2]?arguments[2]:{},r=t.index,i=void 0===r?m.K.index:r;if((n.width||0===parseInt(n.width,10))&&(n.height||0===parseInt(n.height,10)))return n.width=parseInt(n.width,10),n.height=parseInt(n.height,10),!0;var o=i.getBidRequest(n),a=i.getMediaTypes(n),u=o&&o.sizes||a&&a.banner&&a.banner.sizes,c=(0,g.sF)(u);if(1===c.length){var d=c[0].split("x"),s=C(d,2),f=s[0],l=s[1];return n.width=parseInt(f,10),n.height=parseInt(l,10),!0}return!1}function _(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.index,i=void 0===r?m.K.index:r;function o(){var e=Object.keys(n);return O.every((function(t){return(0,l.q9)(e,t)&&!(0,l.q9)([void 0,null],n[t])}))}function a(e){return"Invalid bid from ".concat(n.bidderCode,". Ignoring bid: ").concat(e)}return e?n?o()?"native"!==n.mediaType||(0,c.r4)(n,{index:i})?"video"!==n.mediaType||(0,d.Dn)(n,{index:i})?!("banner"===n.mediaType&&!P(e,n,{index:i}))||((0,g.H)(a("Banner bids require a width and height")),!1):((0,g.H)(a("Video bid does not have required vastUrl or renderer property")),!1):((0,g.H)(a("Native bid missing some required properties.")),!1):((0,g.H)(a("Bidder ".concat(n.bidderCode," is missing required params. Check http://prebid.org/dev-docs/bidder-adapter-1.html for list of params."))),!1):((0,g.yN)("Some adapter tried to add an undefined bid for ".concat(e,".")),!1):((0,g.yN)("No adUnitCode was supplied to addBidResponse."),!1)}(0,b.v5)("checkAdUnitSetup").before((function(e,n){if(!o.vc.getConfig("adpod.brandCategoryExclusion"))return e.call(this,n);n.filter((function(e){return(0,v.Z)(e,"mediaTypes.video.context")===y.Oh})).map((function(e){return e.bids.map((function(e){return e.bidder}))})).reduce(g.xH,[]).filter(g.tT).forEach((function(e){var n=i.ZP.getBidAdapter(e);if(n.getSpec().getMappingFileInfo){var t=n.getSpec().getMappingFileInfo(),r=t.refreshInDays?t.refreshInDays:1,o=t.localStorageKey?t.localStorageKey:n.getSpec().code,a=E.getDataFromLocalStorage(o);try{(!(a=a?JSON.parse(a):void 0)||(0,g.AB)()>a.lastUpdated+24*r*60*60*1e3)&&(0,p.h)(t.url,{success:function(n){try{n=JSON.parse(n);var t={lastUpdated:(0,g.AB)(),mapping:n.mapping};E.setDataInLocalStorage(o,JSON.stringify(t))}catch(n){(0,g.H)("Failed to parse ".concat(e," bidder translation mapping file"))}},error:function(){(0,g.H)("Failed to load ".concat(e," bidder translation file"))}})}catch(n){(0,g.H)("Failed to parse ".concat(e," bidder translation mapping file"))}}})),e.call(this,n)}))},6996:function(e,n,t){t.d(n,{B:function(){return u}});var r=t(1879),i=t(9853),o=new WeakMap,a=["adloox","criteo","outstream","adagio","browsi","brandmetrics","justtag","akamaidap","ftrackId","inskin","hadron","medianet"];function u(e,n,t,u){if(n&&e){if((0,r.q9)(a,n)){u||(u=document);var c=f(u,e);if(c)return t&&"function"==typeof t&&(c.loaded?t():c.callbacks.push(t)),c.tag;var d=o.get(u)||{},s={loaded:!1,tag:null,callbacks:[]};return d[e]=s,o.set(u,d),t&&"function"==typeof t&&s.callbacks.push(t),(0,i.yN)("module ".concat(n," is loading external JavaScript")),function(n,t,r){r||(r=document);var o=r.createElement("script");o.type="text/javascript",o.async=!0;var a=f(r,e);a&&(a.tag=o);o.readyState?o.onreadystatechange=function(){"loaded"!==o.readyState&&"complete"!==o.readyState||(o.onreadystatechange=null,t())}:o.onload=function(){t()};return o.src=n,(0,i.jC)(o,r),o}(e,(function(){s.loaded=!0;try{for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:3e3,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.request,u=n.done;return function(n,c,d){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};try{var f,l=s.method||(d?"POST":"GET"),p=document.createElement("a");p.href=n;var g="object"===a(c)&&null!==c?c:{success:function(){(0,i.ji)("xhr success")},error:function(e){(0,i.H)("xhr error",null,e)}};if("function"==typeof c&&(g.success=c),(f=new window.XMLHttpRequest).onreadystatechange=function(){if(4===f.readyState){"function"==typeof u&&u(p.origin);var e=f.status;e>=200&&e<300||304===e?g.success(f.responseText,f):g.error(f.statusText,f)}},r.vc.getConfig("disableAjaxTimeout")||(f.ontimeout=function(){(0,i.H)(" xhr timeout after ",f.timeout,"ms")}),"GET"===l&&d){var v=(0,i.en)(n,s);o(v.search,d),n=(0,i.Q2)(v)}f.open(l,n,!0),r.vc.getConfig("disableAjaxTimeout")||(f.timeout=e),s.withCredentials&&(f.withCredentials=!0),(0,i.yi)(s.customHeaders,(function(e,n){f.setRequestHeader(n,e)})),s.preflight&&f.setRequestHeader("X-Requested-With","XMLHttpRequest"),f.setRequestHeader("Content-Type",s.contentType||"text/plain"),"function"==typeof t&&t(p.origin),"POST"===l&&d?f.send(d):f.send()}catch(e){(0,i.H)("xhr construction",e),"object"===a(c)&&null!==c&&c.error(e)}}}},9964:function(e,n,t){t.d(n,{mv:function(){return O},Yt:function(){return U},e0:function(){return P},LX:function(){return z},vO:function(){return B}});var r=t(9853),i=t(265),o=t(5553),a=t(9017),u=t(5755),c=t(8962),d=t(4766);function s(e,n){var t=n?""):"";return'\n \n \n prebid.org wrapper\n \n ").concat(t,"\n \n \n \n ")}function f(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.index,r=void 0===t?d.K.index:t,i=e.vastXml?e.vastXml:s(e.vastUrl,e.vastImpUrl),o=r.getAuction(e),a={type:"xml",value:i,ttlseconds:Number(e.ttl)};return c.vc.getConfig("cache.vasttrack")&&(a.bidder=e.bidder,a.bidid=e.requestId,a.aid=e.auctionId),null!=o&&(a.timestamp=o.getAuctionStart()),"string"==typeof e.customCacheKey&&""!==e.customCacheKey&&(a.key=e.customCacheKey),a}function l(e,n){var t={puts:e.map(f)};(0,u.h)(c.vc.getConfig("cache.url"),function(e){return{success:function(n){var t;try{t=JSON.parse(n).responses}catch(n){return void e(n,[])}t?e(null,t):e(new Error("The cache server didn't respond with a responses property."),[])},error:function(n,t){e(new Error("Error storing video ad in the cache: ".concat(n,": ").concat(JSON.stringify(t))),[])}}}(n),JSON.stringify(t),{contentType:"text/plain",withCredentials:!0})}var p=t(4877),g=t(7112),v=t(2922),y=t(1879),b=t(1929),h=t(8265),m=t(9624),w=t(2319),C=t(8634),A=t(5644);function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function T(){return T=Object.assign||function(e){for(var n=1;n=0&&(e.cpm=t)}(e)}));var I={},j={},k=[];function B(e){var n,t,i,o,a=e.adUnits,u=e.adUnitCodes,s=e.callback,f=e.cbTimeout,l=e.labels,p=e.auctionId,g=e.ortb2Fragments,v=a,b=l,h=u,m=[],S=[],T=[],B=p||(0,r.DO)(),R=s,D=f,H=[],F=new Set;function M(){return{auctionId:B,timestamp:n,auctionEnd:t,auctionStatus:i,adUnits:v,adUnitCodes:h,labels:b,bidderRequests:m,noBids:T,bidsReceived:S,winningBids:H,timeout:D}}function z(e,n){if(n&&clearTimeout(o),void 0===t){var u=[];e&&((0,r.ji)("Auction ".concat(B," timedOut")),d=F,(u=m.map((function(e){return(e.bids||[]).filter((function(e){return!d.has(e.bidder)}))})).reduce(r.xH,[])).length&&w.j8(A.FP.BID_TIMEOUT,u)),i=O,t=Date.now(),w.j8(A.FP.AUCTION_END,M()),_(v,(function(){try{if(null!=R){var n=h,t=S.filter(r.ak.call(r.IK,this,n)).reduce(Z,{});R.apply(pbjs,[t,e,B]),R=null}}catch(e){(0,r.H)("Error executing bidsBackHandler",null,e)}finally{u.length&&C.ZP.callTimedOutBidders(a,u,D);var i=c.vc.getConfig("userSync")||{};i.enableOverride||E(i.syncDelay)}}))}var d}function W(){c.vc.resetBidder(),(0,r.PN)("Bids Received for Auction with id: ".concat(B),S),i=O,z(!1,!0)}function K(e){F.add(e)}function L(e){var n=this;e.forEach((function(e){var n;n=e,m=m.concat(n)}));var t={},a={bidRequests:e,run:function(){var a,f;a=z.bind(null,!0),f=setTimeout(a,D),o=f,i="inProgress",w.j8(A.FP.AUCTION_INIT,M());var l=function(e,n){var t=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).index,i=void 0===t?d.K.index:t,o=0,a=!1,u=new Set,s={},f={};function l(e,n){null==f[e]&&(f[e]=Promise.resolve()),f[e]=f[e].then((function(){return Promise.resolve(n).catch((function(){}))}))}function p(e,t){var r=e.timeout;(null==r||r>n.getTimeout())&&(r=n.getTimeout());var i=n.getAuctionStart()+r-Date.now(),o=f[e.bidderRequestId],a=f[""];(null!=o||null!=a)&&i>0?Promise.race([new Promise((function(e){return setTimeout(e,i)})),Promise.resolve(a).then((function(){return o}))]).then(t):t()}function g(){o--,a&&0===o&&e()}function v(e,t){s[t.requestId]=!0,o++;var r=q({adUnitCode:e,bid:t,auctionId:n.getAuctionId()});"video"===r.mediaType?x(n,r,g):(N(n,r),g())}function b(){var t=this,i=n.getBidRequests(),d=c.vc.getConfig("auctionOptions");if(u.add(t),d&&!(0,r.xb)(d)){var f=d.secondaryBidders;f&&!i.every((function(e){return(0,y.q9)(f,e.bidderCode)}))&&(i=i.filter((function(e){return!(0,y.q9)(f,e.bidderCode)})))}a=i.every((function(e){return u.has(e)})),t.bids.forEach((function(e){s[e.bidId]||(n.addNoBid(e),w.j8(A.FP.NO_BID,e))})),a&&0===o&&e()}return{addBidResponse:function(e,n){var t=i.getBidderRequest(n);l(t&&t.bidderRequestId||"",U.call({dispatch:v},e,n))},adapterDone:function(){p(this,b.bind(this))}}}(W,n);C.ZP.callBids(v,e,l.addBidResponse,l.adapterDone,{request:function(e,n){s(I,n),s(t,e),j[e]||(j[e]={SRA:!0,origin:n}),t[e]>1&&(j[e].SRA=!1)},done:function(e){I[e]--,k[0]&&u(k[0])&&k.shift()}},D,K,g)}};function u(e){var n=!0,t=c.vc.getConfig("maxRequestsPerOrigin")||4;return e.bidRequests.some((function(e){var r=1,i=void 0!==e.src&&e.src===A.os.YZ?"s2s":e.bidderCode;return j[i]&&(!1===j[i].SRA&&(r=Math.min(e.bids.length,t)),I[j[i].origin]+r>t&&(n=!1)),!n})),n&&e.run(),n}function s(e,n){void 0===e[n]?e[n]=1:e[n]++}u(a)||((0,r.yN)("queueing auction due to limited endpoint capacity"),k.push(a))}return{addBidReceived:function(e){S=S.concat(e)},addNoBid:function(e){T=T.concat(e)},executeCallback:z,callBids:function(){i="started",n=Date.now();var e=C.ZP.makeBidRequests(v,n,B,D,b,g);(0,r.PN)("Bids Requested for Auction with id: ".concat(B),e),e.length<1?((0,r.yN)("No valid bid requests returned for auction"),W()):P.call({dispatch:L,context:this},e)},addWinningBid:function(e){H=H.concat(e),C.ZP.callBidWonBidder(e.bidder,e,a)},setBidTargeting:function(e){C.ZP.callSetTargetingBidder(e.bidder,e)},getWinningBids:function(){return H},getAuctionStart:function(){return n},getTimeout:function(){return D},getAuctionId:function(){return B},getAuctionStatus:function(){return i},getAdUnits:function(){return v},getAdUnitCodes:function(){return h},getBidRequests:function(){return m},getBidsReceived:function(){return S},getNoBids:function(){return T},getFPD:function(){return g}}}var U=(0,v.z3)("sync",(function(e,n){this.dispatch.call(null,e,n)}),"addBidResponse"),P=(0,v.z3)("sync",(function(e){this.dispatch.call(this.context,e)}),"addBidderRequests"),_=(0,v.z3)("async",(function(e,n){n&&n()}),"bidsBackCallback");function R(e,n){n.timeToRespond>e.getTimeout()+c.vc.getConfig("timeoutBuffer")&&e.executeCallback(!0)}function N(e,n){!function(e){var n,t=!0===m.S.get(e.bidderCode,"allowZeroCpmBids")?e.cpm>=0:e.cpm>0;e.bidderCode&&(t||e.dealId)&&(n=function(e,n){var t=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).index,r=void 0===t?d.K.index:t;if(!n)return{};var i=r.getBidRequest(n),o={},u=z(n.mediaType,e);W(o,u,n,i),e&&m.S.getOwn(e,A.k2.xn)&&(W(o,m.S.ownSettingsFor(e),n,i),n.sendStandardTargeting=m.S.get(e,"sendStandardTargeting"));n.native&&(o=T({},o,(0,a.Ur)(n)));return o}(e.bidderCode,e));e.adserverTargeting=T(e.adserverTargeting||{},n)}(n),w.j8(A.FP.BID_RESPONSE,n),e.addBidReceived(n),R(e,n)}function x(e,n,t){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=o.index,u=void 0===a?d.K.index:a,s=!0,f=(0,i.Z)(u.getMediaTypes({requestId:n.originalRequestId||n.requestId,transactionId:n.transactionId}),"video"),l=f&&(0,i.Z)(f,"context");c.vc.getConfig("cache.url")&&l!==b.gZ&&(!n.videoCacheKey||c.vc.getConfig("cache.ignoreBidderCacheKey")?(s=!1,D(e,n,t,f)):n.vastUrl||((0,r.H)("videoCacheKey specified but not required vastUrl for video bid"),s=!1)),s&&(N(e,n),t())}var D=(0,v.z3)("async",(function(e,n,t,i){l([n],(function(i,o){var a;i?((0,r.yN)("Failed to save to the video cache: ".concat(i,". Video bid must be discarded.")),R(e,n)):""===o[0].uuid?((0,r.yN)("Supplied video cache key was already in use by Prebid Cache; caching attempt was rejected. Video bid must be discarded."),R(e,n)):(n.videoCacheKey=o[0].uuid,n.vastUrl||(n.vastUrl=(a=n.videoCacheKey,"".concat(c.vc.getConfig("cache.url"),"?uuid=").concat(a))),N(e,n),t())}))}),"callPrebidCache");function q(e){var n=e.adUnitCode,t=e.bid,i=e.auctionId,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=a.index,s=void 0===u?d.K.index:u,f=s.getBidderRequest(t),l=f&&f.start||t.requestTimestamp,g=T({},t,{auctionId:i,responseTimestamp:(0,r.AB)(),requestTimestamp:l,cpm:parseFloat(t.cpm)||0,bidder:t.bidderCode,adUnitCode:n});g.timeToRespond=g.responseTimestamp-g.requestTimestamp,w.j8(A.FP.BID_ADJUSTMENT,g);var v=s.getAdUnit(g).renderer,y=g.mediaType,b=s.getMediaTypes(g),h=b&&b[y],m=h&&h.renderer,C=null;m&&m.url&&m.render&&(!0!==m.backupOnly||!t.renderer)?C=m:v&&v.url&&v.render&&(!0!==v.backupOnly||!t.renderer)&&(C=v),C&&(g.renderer=p.Th.install({url:C.url,config:C.options}),g.renderer.setRender(C.render));var E=H(t.mediaType,b,c.vc.getConfig("mediaTypePriceGranularity")),O=(0,o.D)(g.cpm,"object"===S(E)?E:c.vc.getConfig("customPriceBucket"),c.vc.getConfig("currency.granularityMultiplier"));return g.pbLg=O.low,g.pbMg=O.med,g.pbHg=O.high,g.pbAg=O.auto,g.pbDg=O.dense,g.pbCg=O.custom,g}function H(e,n,t){if(e&&t){if(e===h.pX){var r=(0,i.Z)(n,"".concat(h.pX,".context"),"instream");if(t["".concat(h.pX,"-").concat(r)])return t["".concat(h.pX,"-").concat(r)]}return t[e]}}var F=function(e){return function(n){var t=e||function(e){var n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).index,t=void 0===n?d.K.index:n,r=H(e.mediaType,t.getMediaTypes(e),c.vc.getConfig("mediaTypePriceGranularity"));return"string"==typeof e.mediaType&&r?"string"==typeof r?r:"custom":c.vc.getConfig("priceGranularity")}(n);return t===A.Ql.B7?n.pbAg:t===A.Ql.uN?n.pbDg:t===A.Ql.yE?n.pbLg:t===A.Ql.M2?n.pbMg:t===A.Ql.lj?n.pbHg:t===A.Ql.qN?n.pbCg:void 0}};function M(e,n){return{key:e,val:"function"==typeof n?function(e,t){return n(e,t)}:function(e){return(0,r.NA)(e,n)}}}function z(e,n){var t=A.TD,o=T({},m.S.settingsFor(null));if(o[A.k2.xn]||(o[A.k2.xn]=function(){var e=A.TD;return[M(e.BIDDER,"bidderCode"),M(e.AD_ID,"adId"),M(e.PRICE_BUCKET,F()),M(e.SIZE,"size"),M(e.DEAL,"dealId"),M(e.SOURCE,"source"),M(e.FORMAT,"mediaType"),M(e.ADOMAIN,(function(e){return e.meta&&e.meta.advertiserDomains&&e.meta.advertiserDomains.length>0?e.meta.advertiserDomains[0]:""}))]}()),"video"===e){var a=o[A.k2.xn].slice();if(o[A.k2.xn]=a,[t.UUID,t.CACHE_ID].forEach((function(e){void 0===(0,y.sE)(a,(function(n){return n.key===e}))&&a.push(M(e,"videoCacheKey"))})),c.vc.getConfig("cache.url")&&(!n||!1!==m.S.get(n,"sendStandardTargeting"))){var u=(0,r.en)(c.vc.getConfig("cache.url"));void 0===(0,y.sE)(a,(function(e){return e.key===t.CACHE_HOST}))&&a.push(M(t.CACHE_HOST,(function(e){return(0,i.Z)(e,"adserverTargeting.".concat(t.CACHE_HOST))?e.adserverTargeting[t.CACHE_HOST]:u.hostname})))}}return o}function W(e,n,t,i){var o=n[A.k2.xn];return t.size=t.getSize(),(0,r.yi)(o,(function(o){var a=o.key,u=o.val;if(e[a]&&(0,r.yN)("The key: "+a+" is being overwritten"),(0,r.LQ)(u))try{u=u(t,i)}catch(e){(0,r.H)("bidmanager","ERROR",e)}(void 0===n.suppressEmptyKeys||!0!==n.suppressEmptyKeys)&&a!==A.TD.DEAL||!(0,r.jH)(u)&&null!=u?e[a]=u:(0,r.PN)("suppressing empty key '"+a+"' from adserver targeting")})),e}function Z(e,n){return e[n.adUnitCode]||(e[n.adUnitCode]={bids:[]}),e[n.adUnitCode].bids.push(n),e}},4766:function(e,n,t){t.d(n,{K:function(){return d}});var r=t(9853),i=t(9964),o=t(1879);function a(){return a=Object.assign||function(e){for(var n=1;n1&&void 0!==arguments[1]?arguments[1]:{},t=n.src,i=void 0===t?"client":t,o=n.bidder,a=void 0===o?"":o,u=n.bidId,c=n.transactionId,d=n.auctionId,s=i,f=e||0;function l(){switch(f){case 0:return"Pending";case 1:return"Bid available";case 2:return"Bid returned empty or error response";case 3:return"Bid timed out"}}this.bidderCode=a,this.width=0,this.height=0,this.statusMessage=l(),this.adId=(0,r._d)(),this.requestId=u,this.transactionId=c,this.auctionId=d,this.mediaType="banner",this.source=s,this.getStatusCode=function(){return f},this.getSize=function(){return this.width+"x"+this.height},this.getIdentifiers=function(){return{src:this.source,bidder:this.bidderCode,bidId:this.requestId,transactionId:this.transactionId,auctionId:this.auctionId}}}function o(e,n){return new i(e,n)}},8962:function(e,n,t){t.d(n,{FD:function(){return v},vc:function(){return m}});var r=t(5553),i=t(1879),o=t(9853),a=t(265),u=t(5644);function c(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function d(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,i,o=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(o.push(r.value),!n||o.length!==n);a=!0);}catch(e){u=!0,i=e}finally{try{a||null==t.return||t.return()}finally{if(u)throw i}}return o}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return l(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1&&void 0!==arguments[1]&&arguments[1];try{r(e),e.bidders.forEach((function(r){t[r]||(t[r]={}),Object.keys(e.config).forEach((function(i){var a=e.config[i];if((0,o.PO)(a)){var u=n?o.Ee:Object.assign;t[r][i]=u({},t[r][i]||{},a)}else t[r][i]=a}))}))}catch(e){(0,o.H)(e)}function r(e){if(!(0,o.PO)(e))throw"setBidderConfig bidder options must be an object";if(!Array.isArray(e.bidders)||!e.bidders.length)throw"setBidderConfig bidder options must contain a bidders list with at least 1 bidder";if(!(0,o.PO)(e.config))throw"setBidderConfig bidder options must contain a config object"}}function P(e,n){l=e;try{return n()}finally{_()}}function _(){l=null}return v(),{getCurrentBidder:function(){return l},resetBidder:_,getConfig:S,getAnyConfig:A,readConfig:O,readAnyConfig:I,setConfig:j,mergeConfig:function(e){if((0,o.PO)(e)){var n=Object.keys(e).reduce((function(n,t){var r=m(t)[t]||{};return n[t]=(0,o.Ee)(r,e[t]),n}),{});return j(function(e){for(var n=1;n2&&void 0!==arguments[2]?arguments[2]:1,r=parseFloat(e);return isNaN(r)&&(r=""),{low:""===r?"":f(e,o,t),med:""===r?"":f(e,a,t),high:""===r?"":f(e,u,t),auto:""===r?"":f(e,d,t),dense:""===r?"":f(e,c,t),custom:""===r?"":f(e,n,t)}}function f(e,n,t){var i="";if(!l(n))return i;var o=n.buckets.reduce((function(e,n){return e.max>n.max?e:n}),{max:0}),a=0,u=(0,r.sE)(n.buckets,(function(n){if(e>o.max*t){var r=n.precision;void 0===r&&(r=2),i=(n.max*t).toFixed(r)}else{if(e<=n.max*t&&e>=a*t)return n.min=a,n;a=n.max}}));return u&&(i=function(e,n,t){var r=void 0!==n.precision?n.precision:2,i=n.increment*t,o=n.min*t,a=Math.pow(10,r+2),u=(e*a-o*a)/(i*a),c=Math.floor(u)*i+o;return(c=Number(c.toFixed(10))).toFixed(r)}(e,u,t)),i}function l(e){if((0,i.xb)(e)||!e.buckets||!Array.isArray(e.buckets))return!1;var n=!0;return e.buckets.forEach((function(e){e.max&&e.increment||(n=!1)})),n}},2319:function(e,n,t){t.d(n,{S1:function(){return p},j8:function(){return v},on:function(){return l},vw:function(){return g}});var r=t(9853),i=t(5644);function o(){return o=Object.assign||function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&void 0!==arguments[0]?arguments[0]:{},n=e.promiseFactory,t=void 0===n?function(e){return new Promise(e)}:n,r={};function i(e){return function(n){"function"==typeof r[e]?r[e](n):r[e]||(r[e]=!0,r[2]=n)}}return{promise:t((function(e,n){null!=r[0]?e(r[2]):null!=r[1]?n(r[2]):(r[0]=e,r[1]=n)})),resolve:i(0),reject:i(1)}}();u.ready=function(){var e=u.ready;return function(){try{return e.apply(u,arguments)}finally{c.resolve()}}}();c.promise;var d=u.get;var s={};function f(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.postInstallAllowed,i=void 0!==r&&r;u("async",(function(t){t.forEach((function(e){return n.apply(void 0,o(e))})),i&&(s[e]=n)}),e)([])}function l(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{},t=n.index,i=void 0===t?a.K.index:t;if(!(0,r.Z)(e,"native.clickUrl"))return!1;var u=i.getAdUnit(e).nativeParams;if(!u)return!0;var c=Object.keys(u).filter((function(e){return u[e].required})),d=Object.keys(e.native).filter((function(n){return e.native[n]}));return c.every((function(e){return(0,o.q9)(d,e)}))}function h(e,n){var t;return"click"===e.action?t=n.native&&n.native.clickTrackers:(t=n.native&&n.native.impressionTrackers,n.native&&n.native.javascriptTrackers&&(0,i.$8)(n.native.javascriptTrackers)),(t||[]).forEach(i.hq),e.action}function m(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.index,i=void 0===t?a.K.index:t,o={},u=i.getAdUnit(e);(0,r.Z)(u,"nativeParams.rendererUrl")?e.native.rendererUrl=A(u.nativeParams.rendererUrl):(0,r.Z)(u,"nativeParams.adTemplate")&&(e.native.adTemplate=A(u.nativeParams.adTemplate));var c=!1!==(0,r.Z)(u,"nativeParams.sendTargetingKeys"),d=S(u),f=s(s({},e.native),e.native.ext);return delete f.ext,Object.keys(f).forEach((function(n){var t=d[n],i=A(e.native[n])||A((0,r.Z)(e,"native.ext.".concat(n)));if("adTemplate"!==n&&t&&i){var a=(0,r.Z)(u,"nativeParams.".concat(n,".sendId"));if("boolean"!=typeof a&&(a=(0,r.Z)(u,"nativeParams.ext.".concat(n,".sendId"))),a)i="".concat(t,":").concat(e.adId);var s=(0,r.Z)(u,"nativeParams.".concat(n,".sendTargetingKeys"));"boolean"!=typeof s&&(s=(0,r.Z)(u,"nativeParams.ext.".concat(n,".sendTargetingKeys"))),("boolean"==typeof s?s:c)&&(o[t]=i)}})),o}function w(e,n){var t={message:"assetResponse",adId:e.adId,assets:[]};return n.native.hasOwnProperty("adTemplate")&&(t.adTemplate=A(n.native.adTemplate)),n.native.hasOwnProperty("rendererUrl")&&(t.rendererUrl=A(n.native.rendererUrl)),e.assets.forEach((function(e){var r=(0,i.V9)(u.FY,e),o=A(n.native[r]);t.assets.push({key:r,value:o})})),t}function C(e,n){var t={message:"assetResponse",adId:e.adId,assets:[]};return Object.keys(n.native).forEach((function(e,r){if("adTemplate"===e&&n.native[e])t.adTemplate=A(n.native[e]);else if("rendererUrl"===e&&n.native[e])t.rendererUrl=A(n.native[e]);else if("ext"===e)Object.keys(n.native[e]).forEach((function(r){if(n.native[e][r]){var i=A(n.native[e][r]);t.assets.push({key:r,value:i})}}));else if(n.native[e]&&u.FY.hasOwnProperty(e)){var i=A(n.native[e]);t.assets.push({key:e,value:i})}})),t}function A(e){return"object"===c(e)&&e.url?e.url:e}function S(e){var n={};return(0,r.Z)(e,"nativeParams.ext")&&Object.keys(e.nativeParams.ext).forEach((function(e){n[e]="hb_native_".concat(e)})),s(s({},u.FY),n)}},1879:function(e,n,t){function r(e,n,t){return e&&e.includes(n,t)||!1}function i(){return Array.from.apply(Array,arguments)}function o(e,n,t){return e&&e.find(n,t)}t.d(n,{Oc:function(){return i},q9:function(){return r},sE:function(){return o}})},2528:function(e,n,t){function r(){return window.pbjs}t.d(n,{R:function(){return r}}),window.pbjs=window.pbjs||{},window.pbjs.cmd=window.pbjs.cmd||[],window.pbjs.que=window.pbjs.que||[],window._pbjsGlobals=window._pbjsGlobals||[],window._pbjsGlobals.push("pbjs")},1269:function(e,n,t){t.d(n,{UB:function(){return p},lO:function(){return s}});var r=t(8962),i=t(9853),o=t(265),a=t(1879);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}var c=[];function d(e,n){return e.labelAll?{labelAll:!0,labels:e.labelAll,activeLabels:n}:{labelAll:!1,labels:e.labelAny,activeLabels:n}}function s(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c,t=l(n);return!t.shouldFilter||!!t.sizesSupported[e]}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.labels,t=void 0===n?[]:n,r=e.labelAll,u=void 0!==r&&r,d=e.activeLabels,s=void 0===d?[]:d,f=arguments.length>1?arguments[1]:void 0,p=arguments.length>2?arguments[2]:void 0,g=arguments.length>3&&void 0!==arguments[3]?arguments[3]:c,v=l(g);f=(0,i.PO)(f)?(0,i.I8)(f):p?{banner:{sizes:p}}:{};var y=(0,o.Z)(f,"banner.sizes");v.shouldFilter&&y&&(f.banner.sizes=y.filter((function(e){return v.sizesSupported[e]})));var b=Object.keys(f),h={active:b.every((function(e){return"banner"!==e}))||b.some((function(e){return"banner"===e}))&&(0,o.Z)(f,"banner.sizes.length")>0&&(0===t.length||!u&&(t.some((function(e){return v.labels[e]}))||t.some((function(e){return(0,a.q9)(s,e)})))||u&&t.reduce((function(e,n){return e?v.labels[n]||(0,a.q9)(s,n):e}),!0)),mediaTypes:f};return y&&y.length!==f.banner.sizes.length&&(h.filterResults={before:y,after:f.banner.sizes}),h}function l(e){return e.reduce((function(e,n){if("object"===u(n)&&"string"==typeof n.mediaQuery&&n.mediaQuery.length>0){var t=!1;try{t=(0,i.Zy)().matchMedia(n.mediaQuery).matches}catch(e){(0,i.yN)("Unfriendly iFrame blocks sizeConfig from being correctly evaluated"),t=matchMedia(n.mediaQuery).matches}t&&(Array.isArray(n.sizesSupported)&&(e.shouldFilter=!0),["labels","sizesSupported"].forEach((function(t){return(n[t]||[]).forEach((function(n){return e[t][n]=!0}))})))}else(0,i.yN)('sizeConfig rule missing required property "mediaQuery"');return e}),{labels:{},sizesSupported:{},shouldFilter:!1})}function p(e,n){return e.reduce((function(e,t){var r=f(d(t,n),t.mediaTypes,t.sizes),o=r.active,a=r.mediaTypes,u=r.filterResults;return o?(u&&(0,i.PN)('Size mapping filtered adUnit "'.concat(t.code,'" banner sizes from '),u.before,"to ",u.after),t.mediaTypes=a,t.bids=t.bids.reduce((function(e,r){var o=f(d(r,n),t.mediaTypes),a=o.active,u=o.mediaTypes,c=o.filterResults;return a?(c&&((0,i.PN)('Size mapping filtered adUnit "'.concat(t.code,'" bidder "').concat(r.bidder,'" banner sizes from '),c.before,"to ",c.after),r.mediaTypes=u),e.push(r)):(0,i.PN)('Size mapping deactivated adUnit "'.concat(t.code,'" bidder "').concat(r.bidder,'"')),e}),[]),e.push(t)):(0,i.PN)('Size mapping disabled adUnit "'.concat(t.code,'"')),e}),[])}r.vc.getConfig("sizeConfig",(function(e){return function(e){c=e}(e.sizeConfig)}))},5849:function(e,n,t){t.d(n,{Ld:function(){return c},S6:function(){return s},df:function(){return l},eA:function(){return f}});var r=t(2922),i=t(9853),o=t(1879),a=t(9624),u=["core","prebid-module"],c=[];function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.gvlid,t=e.moduleName,r=e.bidderCode,d=e.moduleType,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=f.bidderSettings,p=void 0===l?a.S:l;function g(){if(null==r)return!0;var e=p.get(r,"storageAllowed");return null!=e&&e}function v(e){if((0,o.q9)(u,d)){return e({valid:!0})}if(g()){var a;return s(n,r||t,d,{hasEnforcementHook:!1},(function(n){if(n&&n.hasEnforcementHook)a=e(n);else{var t={hasEnforcementHook:!1,valid:(0,i.wn)()};a=e(t)}})),a}(0,i.PN)("bidderSettings denied access to device storage for bidder '".concat(r,"'"));return e({valid:!1})}var y=function(e,n,t,r,i,o){var a=function(o){if(o&&o.valid){var a=i&&""!==i?" ;domain=".concat(encodeURIComponent(i)):"",u=t&&""!==t?" ;expires=".concat(t):"",c=null!=r&&"none"==r.toLowerCase()?"; Secure":"";document.cookie="".concat(e,"=").concat(encodeURIComponent(n)).concat(u,"; path=/").concat(a).concat(r?"; SameSite=".concat(r):"").concat(c)}};if(!o||"function"!=typeof o)return v(a);c.push((function(){var e=v(a);o(e)}))},b=function(e,n){var t=function(n){if(n&&n.valid){var t=window.document.cookie.match("(^|;)\\s*"+e+"\\s*=\\s*([^;]*)\\s*(;|$)");return t?decodeURIComponent(t[2]):null}return null};if(!n||"function"!=typeof n)return v(t);c.push((function(){var e=v(t);n(e)}))},h=function(e){var n=function(e){if(e&&e.valid)try{return localStorage.setItem("prebid.cookieTest","1"),"1"===localStorage.getItem("prebid.cookieTest")}catch(e){}finally{try{localStorage.removeItem("prebid.cookieTest")}catch(e){}}return!1};if(!e||"function"!=typeof e)return v(n);c.push((function(){var t=v(n);e(t)}))},m=function(e){var n=function(e){return!(!e||!e.valid)&&(!!(0,i.IG)()||(window.document.cookie="prebid.cookieTest",-1!==window.document.cookie.indexOf("prebid.cookieTest")))};if(!e||"function"!=typeof e)return v(n);c.push((function(){var t=v(n);e(t)}))},w=function(e,n,t){var r=function(t){t&&t.valid&&S()&&window.localStorage.setItem(e,n)};if(!t||"function"!=typeof t)return v(r);c.push((function(){var e=v(r);t(e)}))},C=function(e,n){var t=function(n){return n&&n.valid&&S()?window.localStorage.getItem(e):null};if(!n||"function"!=typeof n)return v(t);c.push((function(){var e=v(t);n(e)}))},A=function(e,n){var t=function(n){n&&n.valid&&S()&&window.localStorage.removeItem(e)};if(!n||"function"!=typeof n)return v(t);c.push((function(){var e=v(t);n(e)}))},S=function(e){var n=function(e){if(e&&e.valid)try{return!!window.localStorage}catch(e){(0,i.H)("Local storage api disabled")}return!1};if(!e||"function"!=typeof e)return v(n);c.push((function(){var t=v(n);e(t)}))},T=function(e,n){var t=function(n){if(n&&n.valid){var t=[];if((0,i.wn)())for(var r=document.cookie.split(";");r.length;){var o=r.pop(),a=o.indexOf("=");a=a<0?o.length:a,decodeURIComponent(o.slice(0,a).replace(/^\s+/,"")).indexOf(e)>=0&&t.push(decodeURIComponent(o.slice(a+1)))}return t}};if(!n||"function"!=typeof n)return v(t);c.push((function(){var e=v(t);n(e)}))};return{setCookie:y,getCookie:b,localStorageIsEnabled:h,cookiesAreEnabled:m,setDataInLocalStorage:w,getDataFromLocalStorage:C,removeDataFromLocalStorage:A,hasLocalStorage:S,findSimilarCookies:T}}var s=(0,r.z3)("async",(function(e,n,t,r,i){i(r)}),"validateStorageEnforcement");function f(e){return d({moduleName:e,moduleType:"core"})}function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.gvlid,t=e.moduleName,r=e.bidderCode,o=e.moduleType;if(arguments.length>1||arguments.length>0&&!(0,i.PO)(arguments[0]))throw new Error("Invalid invocation for getStorageManager");return d({gvlid:n,moduleName:t,bidderCode:r,moduleType:o})}},7112:function(e,n,t){t.d(n,{k_:function(){return l}});var r=t(9853),i=t(8962),o=t(1879),a=t(5849);function u(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,i,o=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(o.push(r.value),!n||o.length!==n);a=!0);}catch(e){u=!0,i=e}finally{try{a||null==t.return||t.return()}finally{if(u)throw i}}return o}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return c(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return c(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&a.every((function(e){return(0,r.d8)(e)&&"*"!==e}))))return(0,r.yN)('Detected an invalid setup in userSync "filterSettings.'.concat(i,".bidders\"; use either '*' (to represent all bidders) or an array of bidders.")),!1;return!0}(t,e)){s[e]=!0;var i=t.all?t.all:t[e],a="*"===i.bidders?[n]:i.bidders,u={include:function(e,n){return!(0,o.q9)(e,n)},exclude:function(e,n){return(0,o.q9)(e,n)}};return u[i.filter||"include"](a,n)}return!s[e]}return i.vc.getConfig("userSync",(function(e){if(e.userSync){var n=e.userSync.filterSettings;(0,r.PO)(n)&&(n.image||n.all||(e.userSync.filterSettings.image={bidders:"*",filter:"include"}))}f=d(f,e.userSync)})),n.registerSync=function(e,i,o){return a.has(i)?(0,r.ji)('already fired syncs for "'.concat(i,'", ignoring registerSync call')):f.syncEnabled&&(0,r.kJ)(t[e])?i?0!==f.syncsPerBidder&&Number(c[i])>=f.syncsPerBidder?(0,r.yN)('Number of user syncs exceeded for "'.concat(i,'"')):n.canBidderRegisterSync(e,i)?(t[e].push([i,o]),void(c=function(e,n){return e[n]?e[n]+=1:e[n]=1,e}(c,i))):(0,r.yN)('Bidder "'.concat(i,'" not permitted to register their "').concat(e,'" userSync pixels.')):(0,r.yN)("Bidder is required for registering sync"):(0,r.yN)('User sync type "'.concat(e,'" not supported'))},n.syncUsers=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(e)return setTimeout(l,Number(e));l()},n.triggerUserSyncs=function(){f.enableOverride&&n.syncUsers()},n.canBidderRegisterSync=function(e,n){return!f.filterSettings||!g(e,n)},n}({config:i.vc.getConfig("userSync"),browserSupportsCookies:f})},9853:function(e,n,t){t.d(n,{$8:function(){return ge},$u:function(){return V},AB:function(){return xe},An:function(){return _},Bq:function(){return $e},DO:function(){return P},EE:function(){return O},Ee:function(){return ln},FS:function(){return We},G2:function(){return Qe},H:function(){return K},HA:function(){return ce},HC:function(){return nn},I8:function(){return Ue},IG:function(){return He},IK:function(){return Be},K$:function(){return Ie},LQ:function(){return X},NA:function(){return Ce},Ob:function(){return x},PN:function(){return W},PO:function(){return te},Q2:function(){return sn},R_:function(){return pe},Re:function(){return N},S0:function(){return Ze},SG:function(){return ye},T9:function(){return Te},TV:function(){return ke},U:function(){return Ve},V9:function(){return Ae},Vs:function(){return ve},W$:function(){return pn},X4:function(){return Ee},XV:function(){return on},Yp:function(){return cn},ZH:function(){return Oe},Zy:function(){return F},_d:function(){return U},ak:function(){return k},bd:function(){return De},d5:function(){return an},d8:function(){return $},eB:function(){return J},ei:function(){return Xe},en:function(){return dn},ew:function(){return Re},fr:function(){return _e},fz:function(){return Ye},hj:function(){return ne},hl:function(){return tn},hq:function(){return le},iG:function(){return ze},jC:function(){return se},jH:function(){return oe},ji:function(){return z},jn:function(){return re},kJ:function(){return ee},ky:function(){return Ge},or:function(){return Je},pP:function(){return Se},qp:function(){return L},r3:function(){return ue},rD:function(){return Q},s:function(){return q},sF:function(){return D},t0:function(){return R},tT:function(){return he},u2:function(){return A},uh:function(){return en},vM:function(){return Me},wn:function(){return qe},xH:function(){return me},x_:function(){return Ne},xb:function(){return ie},yL:function(){return Pe},yN:function(){return Z},yi:function(){return ae},yo:function(){return rn},yx:function(){return Fe},zE:function(){return we},zV:function(){return Le}});var r=t(8962),i=t(7079),o=t.n(i),a=t(1879),u=t(5644);function c(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,i,o=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(o.push(r.value),!n||o.length!==n);a=!0);}catch(e){u=!0,i=e}finally{try{a||null==t.return||t.return()}finally{if(u)throw i}}return o}(e,n)||s(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,n){if(e){if("string"==typeof e)return f(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?f(e,n):void 0}}function f(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1&&void 0!==arguments[1])||arguments[1],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!e)return"";n&&(e=encodeURI(e));t&&(t='sandbox="'.concat(t,'"'));return"')},getWindowSelf:function(){return window.self},getWindowTop:F,getWindowLocation:M,insertUserSyncIframe:ve,insertElement:se,isFn:X,triggerPixel:le,logError:K,logWarn:Z,logMessage:z,logInfo:W,parseQS:un,formatQS:cn,deepEqual:fn},E={};function O(){return E}var I,j={},k=function(e,n){return n}.bind(null,1,j)()===j?Function.prototype.bind:function(e){var n=this,t=Array.prototype.slice.call(arguments,1);return function(){return n.apply(e,t.concat(Array.prototype.slice.call(arguments)))}},B=(I=0,function(){return++I});function U(){return B()+Math.random().toString(16).substr(2)}function P(e){return e?(e^(window&&window.crypto&&window.crypto.getRandomValues?crypto.getRandomValues(new Uint8Array(1))[0]%16:16*Math.random())>>e/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,P)}function _(e,n){return n&&n[e]?n[e]:""}function R(e,n,t){return t?e+n+"="+encodeURIComponent(t)+"&":e}function N(e){var n="";for(var t in e)e.hasOwnProperty(t)&&(n+=t+"="+encodeURIComponent(e[t])+"&");return n=n.replace(/&$/,"")}function x(e){return e&&Object.getOwnPropertyNames(e).length>0?(n=e,Object.keys(n)).map((function(n){return"".concat(n,"=").concat(encodeURIComponent(Ce(e,n)))})).join("&"):"";var n}function D(e){var n=[];if("string"==typeof e){var t=e.split(","),r=/^(\d)+x(\d)+$/i;if(t)for(var i in t)de(t,i)&&t[i].match(r)&&n.push(t[i])}else if("object"===g(e)){var o=e.length;if(o>0)if(2===o&&"number"==typeof e[0]&&"number"==typeof e[1])n.push(q(e));else for(var a=0;a0);for(var n in e)if(hasOwnProperty.call(e,n))return!1;return!0}function oe(e){return $(e)&&(!e||0===e.length)}function ae(e,n){if(!ie(e)){if(X(e.forEach))return e.forEach(n,this);var t=0,r=e.length;if(r>0)for(;t'}function be(e,n,t){return null==n?t:$(n)?n:ne(n)?n.toString():void T.logWarn("Unsuported type for param: "+e+" required type: String")}function he(e,n,t){return t.indexOf(e)===n}function me(e,n){return e.concat(n)}function we(e,n){var t;if(e)return n.some((function(n){var r=(0,a.sE)(n.bids,(function(n){return["bidId","adId","bid_id"].some((function(t){return n[t]===e}))}));return r&&(t=r),r})),t}function Ce(e,n){return e[n]}function Ae(e,n){for(var t in e)if(e.hasOwnProperty(t)&&e[t]===n)return t}function Se(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pbjs.adUnits;return e.map((function(e){return e.bids.map((function(e){return e.bidder})).reduce(me,[])})).reduce(me,[]).filter(he)}function Te(){if(window.googletag&&X(window.googletag.pubads)&&X(window.googletag.pubads().getSlots))return!0}function Ee(){if(window.apntag&&X(window.apntag.getTag))return!0}var Oe=je("timeToRespond",(function(e,n){return e>n})),Ie=je("responseTimestamp",(function(e,n){return e>n}));je("responseTimestamp",(function(e,n){return e0;){var t=Math.floor(Math.random()*n),r=e[--n];e[n]=e[t],e[t]=r}return e}function Be(e,n){return(0,a.q9)(e,n&&n.adUnitCode)}function Ue(e){return o()(e)}function Pe(){try{return T.getWindowSelf()!==T.getWindowTop()}catch(e){return!0}}function _e(){return/^((?!chrome|android|crios|fxios).)*safari/i.test(navigator.userAgent)}function Re(e,n){if(e)return e.replace(/\$\{AUCTION_PRICE\}/g,n)}function Ne(e,n){if(e&&n&&"string"==typeof n)return e.replace(/\${CLICKTHROUGH}/g,n)}function xe(){return(new Date).getTime()}function De(){return window.performance&&window.performance.now&&window.performance.now()||0}function qe(){return!1!==r.vc.getConfig("deviceAccess")}function He(){if(window.navigator.cookieEnabled||document.cookie.length)return!0}function Fe(e,n){if(n<1)throw new Error("numRequiredCalls must be a positive number. Got ".concat(n));var t=0;return function(){++t===n&&e.apply(this,arguments)}}function Me(e,n){return e.reduce((function(e,t){return(e[t[n]]=e[t[n]]||[]).push(t),e}),{})}function ze(e,n){return n.filter((function(n){return e[n]})).reduce((function(n,t){return p(n,l({},t,e[t]))}),{})}function We(e){var n=["banner","native","video"];return!!Object.keys(e).every((function(e){return(0,a.q9)(n,e)}))&&(!e.video||!e.video.context||(0,a.q9)(["instream","outstream","adpod"],e.video.context))}function Ze(e,n,t){return e.filter((function(e){return e.code===n})).map((function(e){return e.bids})).reduce(me,[]).filter((function(e){return e.bidder===t})).map((function(e){return e.params||{}}))}var Ke=function(e,n){return e.getAdUnitPath()===n||e.getSlotElementId()===n};function Le(e){return function(n){return Ke(e,n)}}function Ge(e){var n;return Te()&&(n=(0,a.sE)(window.googletag.pubads().getSlots(),function(e){return function(n){return Ke(n,e)}}(e))),n?{gptSlot:n.getAdUnitPath(),divId:n.getSlotElementId()}:{}}function Je(e,n){var t=Object.keys(e.mediaTypes||{banner:"banner"}).join(", ");return"\n ".concat(e.code," is a ").concat(t," ad unit\n containing bidders that don't support ").concat(t,": ").concat(n,".\n This bidder won't fetch demand.\n ")}function Ve(e){return Number.isInteger?Number.isInteger(e):"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function Qe(e){return e.replace(/(?:^|\.?)([A-Z])/g,(function(e,n){return"_"+n.toLowerCase()})).replace(/^_/,"")}function Ye(e){return Object.keys(e).reduce((function(n,t){return void 0!==e[t]&&(n[t]=e[t]),n}),{})}function Xe(e,n){return"object"!==g(e)?{}:n.reduce((function(t,r,i){if("function"==typeof r)return t;var o=r,a=r.match(/^(.+?)\sas\s(.+?)$/i);a&&(r=a[1],o=a[2]);var u=e[r];return"function"==typeof n[i+1]&&(u=n[i+1](u,t)),void 0!==u&&(t[o]=u),t}),{})}function $e(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"keywords",t=[];return ae(e,(function(e,r){if(ee(e)){var i=[];ae(e,(function(e){((e=be(n+"."+r,e))||""===e)&&i.push(e)})),e=i}else{if(!$(e=be(n+"."+r,e)))return;e=[e]}t.push({key:r,value:e})})),t}function en(e,n){return Object.keys(e).forEach((function(t){var r,i;n[t]&&(X(e[t])?n[t]=e[t](n[t]):n[t]=(r=e[t],i=n[t],"string"===r?i&&i.toString():"number"===r?Number(i):i),isNaN(n[t])&&delete n.key)})),n}function nn(e,n){return ee(e)&&(!n||e.length===n)&&e.every((function(e){return Ve(e)}))}function tn(e,n){for(var t=[],r=0;r2&&void 0!==arguments[2]?arguments[2]:{},r=t.checkTypes,i=void 0!==r&&r;if(e===n)return!0;if("object"!==g(e)||null===e||"object"!==g(n)||null===n||i&&e.constructor!==n.constructor)return!1;if(Object.keys(e).length!==Object.keys(n).length)return!1;for(var o in e){if(!n.hasOwnProperty(o))return!1;if(!fn(e[o],n[o],{checkTypes:i}))return!1}return!0}function ln(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{},t=n.index,i=void 0===t?u.K.index:t,o=(0,r.Z)(i.getMediaTypes(e),"video"),a=o&&(0,r.Z)(o,"context"),c=i.getAdUnit(e);return f(e,c,o,a)}var f=(0,a.z3)("sync",(function(e,n,t,r){return t&&r!==c?o.vc.getConfig("cache.url")||!e.vastXml||e.vastUrl?!(!e.vastUrl&&!e.vastXml):((0,i.H)('\n This bid contains only vastXml and will not work when a prebid cache url is not specified.\n Try enabling prebid cache with pbjs.setConfig({ cache: {url: "..."} });\n '),!1):r!==c||!!(e.renderer||n&&n.renderer||t.renderer)}),"checkVideoBidSetup")},265:function(e,n,t){function r(e,n,t,r,i){for(n=n.split?n.split("."):n,r=0;r>>0,o=0;if(n)t=n;else{for(;o=o)&&Object.keys(r.O).every((function(e){return r.O[e](t[c])}))?t.splice(c--,1):(u=!1,o0&&e[s-1][2]>o;s--)e[s]=e[s-1];e[s]=[t,i,o]},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,{a:n}),n},r.d=function(e,n){for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},function(){var e={602:0};r.O.j=function(n){return 0===e[n]};var n=function(n,t){var i,o,a=t[0],u=t[1],c=t[2],d=0;if(a.some((function(n){return 0!==e[n]}))){for(i in u)r.o(u,i)&&(r.m[i]=u[i]);if(c)var s=c(r)}for(n&&n(t);d0?function(n){e.ports[0].postMessage(JSON.stringify(n))}:function(n){e.source.postMessage(JSON.stringify(n),e.origin)}}(e),r,i)}}function w(e){var t=e.adId,r=e.adUnitCode,i=e.width,o=e.height;["div","iframe"].forEach((function(e){var a=function(e){var i=function(e,t){return(0,n.T9)()?function(e){var n=(0,c.sE)(window.googletag.pubads().getSlots(),(function(n){return(0,c.sE)(n.getTargetingKeys(),(function(t){return(0,c.q9)(n.getTargeting(t),e)}))}));return n?n.getSlotElementId():null}(e):(0,n.X4)()?function(e){var n=window.apntag.getTag(e);return n&&n.targetId}(t):t}(t,r),o=document.getElementById(i);return o&&o.querySelector(e)}(e+':not([style*="display: none"])');if(a){var u=a.style;u.width=i+"px",u.height=o+"px"}else(0,n.yN)("Unable to locate matching page element for adUnitCode ".concat(r,". Can't resize it to ad's dimensions. Please review setup."))}))}var C=r(7112),A=r(1269),S=r(8265),T=r(2922),E=r(9624);function O(){return O=Object.assign||function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);t(0,n.AB)()},x=function(e){return e&&(e.status&&!(0,c.q9)([a.UE.fe],e.status)||!e.status)},D=(0,T.z3)("sync",(function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!i){var o=[],a=s.vc.getConfig("sendBidsControl.dealPrioritization"),u=(0,n.vM)(e,"adUnitCode");return Object.keys(u).forEach((function(e){var i=[],c=(0,n.vM)(u[e],"bidderCode");Object.keys(c).forEach((function(e){return i.push(c[e].reduce(t))})),r>0?(i=a?i.sort(q(!0)):i.sort((function(e,n){return n.cpm-e.cpm})),o.push.apply(o,j(i.slice(0,r)))):o.push.apply(o,j(i))})),o}return e}));function q(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return function(n,t){return void 0!==n.adserverTargeting.hb_deal&&void 0===t.adserverTargeting.hb_deal?-1:void 0===n.adserverTargeting.hb_deal&&void 0!==t.adserverTargeting.hb_deal?1:e?t.cpm-n.cpm:t.adserverTargeting.hb_pb-n.adserverTargeting.hb_pb}}var H,F,M=function(e){var r={},i={};function u(e,t){return e.adserverTargeting&&t&&((0,n.kJ)(t)&&(0,c.q9)(t,e.adUnitCode)||"string"==typeof t&&e.adUnitCode===t)}function d(e,t){if(!0===s.vc.getConfig("targetingControls.alwaysIncludeDeals")){var r=R.concat(o.xc);return D(t,n.ZH).map((function(n){if(n.dealId&&u(n,e))return I({},n.adUnitCode,k(n,r.filter((function(e){return void 0!==n.adserverTargeting[e]}))))})).filter((function(e){return e}))}return[]}function f(e,t){var r=O({},a.TD,a.FY),i=Object.keys(r),o={};(0,n.PN)("allowTargetingKeys - allowed keys [ ".concat(t.map((function(e){return r[e]})).join(", ")," ]")),e.map((function(e){var n=Object.keys(e)[0],a=e[n].filter((function(e){var n=Object.keys(e)[0],a=0===i.filter((function(e){return 0===n.indexOf(r[e])})).length||(0,c.sE)(t,(function(e){var t=r[e];return 0===n.indexOf(t)}));return o[n]=!a,a}));e[n]=a}));var u=Object.keys(o).filter((function(e){return o[e]}));return(0,n.PN)("allowTargetingKeys - removed keys [ ".concat(u.join(", ")," ]")),e.filter((function(e){return e[Object.keys(e)[0]].length>0}))}function l(e,t){var r=(0,n.I8)(e);return Object.keys(r).map((function(e){return{adUnitCode:e,adserverTargeting:r[e]}})).sort(q()).reduce((function(e,i,o,a){var u,c=(u=i.adserverTargeting,Object.keys(u).reduce((function(e,n){return e+"".concat(n,"%3d").concat(encodeURIComponent(u[n]),"%26")}),""));o+1===a.length&&(c=c.slice(0,-3));var d=i.adUnitCode,s=c.length;return s<=t?(t-=s,(0,n.PN)("AdUnit '".concat(d,"' auction keys comprised of ").concat(s," characters. Deducted from running threshold; new limit is ").concat(t),r[d]),e[d]=r[d]):(0,n.yN)("The following keys for adUnitCode '".concat(d,"' exceeded the current limit of the 'auctionKeyMaxChars' setting.\nThe key-set size was ").concat(s,", the current allotted amount was ").concat(t,".\n"),r[d]),o+1===a.length&&0===Object.keys(e).length&&(0,n.H)("No auction targeting keys were permitted due to the setting in setConfig(targetingControls.auctionKeyMaxChars). Please review setup and consider adjusting."),e}),{})}function p(e){var n=e.map((function(e){return I({},Object.keys(e)[0],e[Object.keys(e)[0]].map((function(e){return I({},Object.keys(e)[0],e[Object.keys(e)[0]].join(","))})).reduce((function(e,n){return O(n,e)}),{}))})).reduce((function(e,n){var t=Object.keys(n)[0];return e[t]=O({},e[t],n[t]),e}),{});return n}function g(t){return"string"==typeof t?[t]:(0,n.kJ)(t)?t:e.getAdUnitCodes()||[]}function v(){var r=e.getBidsReceived();if(s.vc.getConfig("useBidCache")){var o=s.vc.getConfig("bidCacheFilterFunction");"function"==typeof o&&(r=r.filter((function(e){return i[e.adUnitCode]===e.auctionId||!!o(e)})))}else r=r.filter((function(e){return i[e.adUnitCode]===e.auctionId}));return r=r.filter((function(e){return(0,t.Z)(e,"video.context")!==S.Oh})).filter((function(e){return"banner"!==e.mediaType||(0,A.lO)([e.width,e.height])})).filter(x).filter(N),D(r,n.K$)}function y(e,n){var t=r.getWinningBids(e,n),i=b();return t=t.map((function(e){return I({},e.adUnitCode,Object.keys(e.adserverTargeting).filter((function(n){return void 0===e.sendStandardTargeting||e.sendStandardTargeting||-1===i.indexOf(n)})).reduce((function(n,t){var r=[e.adserverTargeting[t]],i=I({},t.substring(0,20),r);if(t===a.TD.DEAL){var o=I({},"".concat(t,"_").concat(e.bidderCode).substring(0,20),r);return[].concat(j(n),[i,o])}return[].concat(j(n),[i])}),[]))})),t}function b(){return e.getStandardBidderAdServerTargeting().map((function(e){return e.key})).concat(R).filter(n.tT)}function h(e,t,r,i){return Object.keys(t.adserverTargeting).filter(m()).forEach((function(r){e.length&&e.filter(function(e){return function(n){return n.adUnitCode===t.adUnitCode&&n.adserverTargeting[e]}}(r)).forEach(function(e){return function(r){(0,n.kJ)(r.adserverTargeting[e])||(r.adserverTargeting[e]=[r.adserverTargeting[e]]),r.adserverTargeting[e]=r.adserverTargeting[e].concat(t.adserverTargeting[e]).filter(n.tT),delete t.adserverTargeting[e]}}(r))})),e.push(t),e}function m(){var e=b().concat(o.xc);return function(n){return-1===e.indexOf(n)}}function w(e){return I({},e.adUnitCode,Object.keys(e.adserverTargeting).filter(m()).map((function(n){return I({},n.substring(0,20),[e.adserverTargeting[n]])})))}function C(e,n){return n.filter((function(n){return(0,c.q9)(e,n.adUnitCode)})).map((function(e){return O({},e)})).reduce(h,[]).map(w).filter((function(e){return e}))}function T(e,t){var r=R.concat(o.xc),i=s.vc.getConfig("sendBidsControl.bidLimit"),c=D(t,n.ZH,i),d=s.vc.getConfig("targetingControls.allowSendAllBidsTargetingKeys"),f=d?d.map((function(e){return a.TD[e]})):r;return c.map((function(n){if(u(n,e))return I({},n.adUnitCode,k(n,r.filter((function(e){return void 0!==n.adserverTargeting[e]&&-1!==f.indexOf(e)}))))})).filter((function(e){return e}))}function k(e,n){return n.map((function(n){return I({},"".concat(n,"_").concat(e.bidderCode).substring(0,20),[e.adserverTargeting[n]])}))}function H(r){function i(e){return(0,t.Z)(e,a.k2.xn)}return e.getAdUnits().filter((function(e){return(0,c.q9)(r,e.code)&&i(e)})).map((function(e){return I({},e.code,function(e){var t=i(e);return Object.keys(t).map((function(e){return(0,n.d8)(t[e])&&(t[e]=t[e].split(",").map((function(e){return e.trim()}))),(0,n.kJ)(t[e])||(t[e]=[t[e]]),I({},e,t[e])}))}(e))}))}return r.setLatestAuctionForAdUnit=function(e,n){i[e]=n},r.resetPresetTargeting=function(t,r){if((0,n.T9)()){var i=g(t),o=e.getAdUnits().filter((function(e){return(0,c.q9)(i,e.code)})),a=B.reduce((function(e,n){return e[n]=null,e}),{});window.googletag.pubads().getSlots().forEach((function(e){var t=(0,n.LQ)(r)&&r(e);o.forEach((function(r){(r.code===e.getAdUnitPath()||r.code===e.getSlotElementId()||(0,n.LQ)(t)&&t(r.code))&&e.updateTargetingFromMap(a)}))}))}},r.resetPresetTargetingAST=function(e){g(e).forEach((function(e){var n=window.apntag.getTag(e);if(n&&n.keywords){var t=Object.keys(n.keywords),r={};t.forEach((function(e){(0,c.q9)(B,e.toLowerCase())||(r[e]=n.keywords[e])})),window.apntag.modifyTag(e,{keywords:r})}}))},r.getAllTargeting=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v(),r=g(e),i=y(r,t).concat(C(r,t)).concat(s.vc.getConfig("enableSendAllBids")?T(r,t):d(r,t)).concat(H(r));i.map((function(e){Object.keys(e).map((function(n){e[n].map((function(e){-1===B.indexOf(Object.keys(e)[0])&&(B=Object.keys(e).concat(B))}))}))}));var o=Object.keys(O({},a.kF,a.FY)),u=s.vc.getConfig(U),c=s.vc.getConfig(P);if(null!=c&&null!=u)throw new Error(_);u=null!=c?o.concat(c):u||o,Array.isArray(u)&&u.length>0&&(i=f(i,u)),i=p(i);var b=s.vc.getConfig("targetingControls.auctionKeyMaxChars");return b&&((0,n.PN)("Detected 'targetingControls.auctionKeyMaxChars' was active for this auction; set with a limit of ".concat(b," characters. Running checks on auction keys...")),i=l(i,b)),r.forEach((function(e){i[e]||(i[e]={})})),i},s.vc.getConfig("targetingControls",(function(e){null!=(0,t.Z)(e,U)&&null!=(0,t.Z)(e,P)&&(0,n.H)(_)})),r.setTargetingForGPT=function(e,t){window.googletag.pubads().getSlots().forEach((function(r){Object.keys(e).filter(t?t(r):(0,n.zV)(r)).forEach((function(t){Object.keys(e[t]).forEach((function(n){var r=e[t][n];"string"==typeof r&&-1!==r.indexOf(",")&&(r=r.split(",")),e[t][n]=r})),(0,n.ji)("Attempting to set targeting-map for slot: ".concat(r.getSlotElementId()," with targeting-map:"),e[t]),r.updateTargetingFromMap(e[t])}))}))},r.getWinningBids=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v(),r=g(e);return t.filter((function(e){return(0,c.q9)(r,e.adUnitCode)})).filter((function(e){return!0===E.S.get(e.bidderCode,"allowZeroCpmBids")?e.cpm>=0:e.cpm>0})).map((function(e){return e.adUnitCode})).filter(n.tT).map((function(e){return t.filter((function(n){return n.adUnitCode===e?n:null})).reduce(n.ZH)}))},r.setTargetingForAst=function(e){var t=r.getAllTargeting(e);try{r.resetPresetTargetingAST(e)}catch(e){(0,n.H)("unable to reset targeting for AST"+e)}Object.keys(t).forEach((function(e){return Object.keys(t[e]).forEach((function(r){if((0,n.ji)("Attempting to set targeting for targetId: ".concat(e," key: ").concat(r," value: ").concat(t[e][r])),(0,n.d8)(t[e][r])||(0,n.kJ)(t[e][r])){var i={};r.search(/pt[0-9]/)<0?i[r.toUpperCase()]=t[e][r]:i[r]=t[e][r],window.apntag.setKeywords(e,i,{overrideKeyValue:!0})}}))}))},r.isApntagDefined=function(){if(window.apntag&&(0,n.LQ)(window.apntag.setKeywords))return!0},r}(u.K),z=r(9964),W=(0,n.qp)("DEBUG:"),Z=W.logWarn,K=W.logMessage,L="pbjs:debugging",G=[function(e){V(),function(e){H=ne.bind(e),z.Yt.before(H,5),F=te.bind(e),z.e0.before(F,5)}(e)}],J=[V];function V(){z.Yt.getHooks({hook:H}).remove(),z.e0.getHooks({hook:F}).remove()}function Q(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];s.vc.setConfig({debug:!0}),G.forEach((function(n){return n(e)})),K("bidder overrides enabled".concat(n?" from session":""))}function Y(){J.forEach((function(e){return e()})),K("bidder overrides disabled")}function X(e,n,t){return!(!e.bidder||e.bidder===n)||!(!e.adUnitCode||e.adUnitCode===t)}function $(e,n){return Array.isArray(e)&&-1===e.indexOf(n)}function ee(e,n,t){return Object.keys(e).filter((function(e){return-1===["adUnitCode","bidder"].indexOf(e)})).reduce((function(n,r){return K("bidder overrides changed '".concat(n.adUnitCode,"/").concat(n.bidderCode,"' ").concat(t,".").concat(r," from '").concat(n[r],".js' to '").concat(e[r],"'")),n[r]=e[r],n.isDebug=!0,n}),n)}function ne(e,n,t){var r=this;$(r.bidders,t.bidderCode)?Z("bidder '".concat(t.bidderCode,"' excluded from auction by bidder overrides")):(Array.isArray(r.bids)&&r.bids.forEach((function(e){X(e,t.bidderCode,n)||ee(e,t,"bidder")})),e(n,t))}function te(e,n){var t=this,r=n.filter((function(e){return!$(t.bidders,e.bidderCode)||(Z("bidRequest '".concat(e.bidderCode,"' excluded from auction by bidder overrides")),!1)}));Array.isArray(t.bidRequests)&&r.forEach((function(e){t.bidRequests.forEach((function(n){e.bids.forEach((function(t){X(n,e.bidderCode,t.adUnitCode)||ee(n,t,"bidRequest")}))}))})),e(r)}var re=(0,T.z3)("sync",(function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.sessionStorage,r=void 0===t?window.sessionStorage:t;if(e.enabled)try{r.setItem(L,JSON.stringify(e))}catch(e){}else try{r.removeItem(L)}catch(e){}}));s.vc.getConfig("debugging",(function(e){return function(e){var n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).sessionStorage,t=void 0===n?window.sessionStorage:n;re(e,{sessionStorage:t}),e.enabled?Q(e):Y()}(e.debugging)}));var ie=r(7263),oe=r(1477),ae=r(5849),ue=r(8634);function ce(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,i,o=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(o.push(r.value),!n||o.length!==n);a=!0);}catch(e){u=!0,i=e}finally{try{a||null==t.return||t.return()}finally{if(u)throw i}}return o}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return de(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return de(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function de(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t0)&&(e.every((function(e){return(0,n.HC)(e,2)}))?r=e:(0,n.HC)(e,2)&&r.push(e)),r}function je(e){var t=(0,n.I8)(e),r=t.mediaTypes.banner,i=Ie(r.sizes);return i.length>0?(r.sizes=i,t.sizes=i):((0,n.H)("Detected a mediaTypes.banner object without a proper sizes field. Please ensure the sizes are listed like: [[300, 250], ...]. Removing invalid mediaTypes.banner object from request."),delete t.mediaTypes.banner),t}function ke(e){var t=(0,n.I8)(e),r=t.mediaTypes.video;if(r.playerSize){var i="number"==typeof r.playerSize[0]?2:1,o=Ie(r.playerSize,i);o.length>0?(2===i&&(0,n.PN)("Transforming video.playerSize from [640,480] to [[640,480]] so it's in the proper format."),r.playerSize=o,t.sizes=o):((0,n.H)("Detected incorrect configuration of mediaTypes.video.playerSize. Please specify only one set of dimensions in a format like: [[640, 480]]. Removing invalid mediaTypes.video.playerSize property from request."),delete t.mediaTypes.video.playerSize)}return t}function Be(e){var t=(0,n.I8)(e),r=t.mediaTypes.native;return r.image&&r.image.sizes&&!Array.isArray(r.image.sizes)&&((0,n.H)("Please use an array of sizes for native.image.sizes field. Removing invalid mediaTypes.native.image.sizes property from request."),delete t.mediaTypes.native.image.sizes),r.image&&r.image.aspect_ratios&&!Array.isArray(r.image.aspect_ratios)&&((0,n.H)("Please use an array of sizes for native.image.aspect_ratios field. Removing invalid mediaTypes.native.image.aspect_ratios property from request."),delete t.mediaTypes.native.image.aspect_ratios),r.icon&&r.icon.sizes&&!Array.isArray(r.icon.sizes)&&((0,n.H)("Please use an array of sizes for native.icon.sizes field. Removing invalid mediaTypes.native.icon.sizes property from request."),delete t.mediaTypes.native.icon.sizes),t}function Ue(e,r){var o=(0,t.Z)(e,"mediaTypes.".concat(r,".pos"));if(!(0,n.hj)(o)||isNaN(o)||!isFinite(o)){var u="Value of property 'pos' on ad unit ".concat(e.code," should be of type: Number");(0,n.yN)(u),i.j8(a.FP.AUCTION_DEBUG,{type:"WARNING",arguments:u}),delete e.mediaTypes[r].pos}return e}function Pe(e){var t=function(n){return"adUnit.code '".concat(e.code,"' ").concat(n)},r=e.mediaTypes,i=e.bids;return null==i||(0,n.kJ)(i)?null==i&&null==e.ortb2Imp?((0,n.H)(t("has no 'adUnit.bids' and no 'adUnit.ortb2Imp'. Removing adUnit from auction")),null):r&&0!==Object.keys(r).length?(null==e.ortb2Imp||null!=i&&0!==i.length||(e.bids=[{bidder:null}],(0,n.ji)(t("defines 'adUnit.ortb2Imp' with no 'adUnit.bids'; it will be seen only by S2S adapters"))),e):((0,n.H)(t("does not define a 'mediaTypes' object. This is a required field for the auction, so this adUnit has been removed.")),null):((0,n.H)(t("defines 'adUnit.bids' that is not an array. Removing adUnit from auction")),null)}!function(e){var n;try{e=e||window.sessionStorage,n=JSON.parse(e.getItem(L))}catch(e){}n&&Q(n,!0)}(),fe.bidderSettings=fe.bidderSettings||{},fe.libLoaded=!0,fe.version="v7.0.0",(0,n.PN)("Prebid.js v7.0.0 loaded"),fe.installedModules=fe.installedModules||[],fe.adUnits=fe.adUnits||[],fe.triggerUserSyncs=le;var _e=(0,T.z3)("sync",(function(e){var n=[];return e.forEach((function(e){if(null!=(e=Pe(e))){var t,r,i,o=e.mediaTypes;o.banner&&(t=je(e),o.banner.hasOwnProperty("pos")&&(t=Ue(t,"banner"))),o.video&&(r=ke(t||e),o.video.hasOwnProperty("pos")&&(r=Ue(r,"video"))),o.native&&(i=Be(r||(t||e)));var a=se({},t,r,i);n.push(a)}})),n}),"checkAdUnitSetup");function Re(e){var t=u.K[e]().filter(n.ak.call(n.IK,this,u.K.getAdUnitCodes())),r=u.K.getLastAuctionId();return t.map((function(e){return e.adUnitCode})).filter(n.tT).map((function(e){return t.filter((function(n){return n.auctionId===r&&n.adUnitCode===e}))})).filter((function(e){return e&&e[0]&&e[0].adUnitCode})).map((function(e){return n={},t=e[0].adUnitCode,r={bids:e},t in n?Object.defineProperty(n,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[t]=r,n;var n,t,r})).reduce((function(e,n){return se(e,n)}),{})}function Ne(e,t,r){var i=t.querySelector(r);e.parentNode&&e.parentNode===i||(0,n.jC)(e,t,r)}fe.getAdserverTargetingForAdUnitCodeStr=function(e){if((0,n.PN)("Invoking pbjs.getAdserverTargetingForAdUnitCodeStr",arguments),e){var t=fe.getAdserverTargetingForAdUnitCode(e);return(0,n.Ob)(t)}(0,n.ji)("Need to call getAdserverTargetingForAdUnitCodeStr with adunitCode")},fe.getHighestUnusedBidResponseForAdUnitCode=function(e){if(e){var t=u.K.getAllBidsForAdUnitCode(e).filter(x).filter(N);return t.length?t.reduce(n.ZH):{}}(0,n.ji)("Need to call getHighestUnusedBidResponseForAdUnitCode with adunitCode")},fe.getAdserverTargetingForAdUnitCode=function(e){return fe.getAdserverTargeting(e)[e]},fe.getAdserverTargeting=function(e){return(0,n.PN)("Invoking pbjs.getAdserverTargeting",arguments),M.getAllTargeting(e)},fe.getConsentMetadata=function(){return(0,n.PN)("Invoking pbjs.getConsentMetadata"),{gdpr:ue.rp.getConsentMeta(),usp:ue.nX.getConsentMeta(),coppa:!!s.vc.getConfig("coppa")}},fe.getNoBids=function(){return(0,n.PN)("Invoking pbjs.getNoBids",arguments),Re("getNoBids")},fe.getNoBidsForAdUnitCode=function(e){return{bids:u.K.getNoBids().filter((function(n){return n.adUnitCode===e}))}},fe.getBidResponses=function(){return(0,n.PN)("Invoking pbjs.getBidResponses",arguments),Re("getBidsReceived")},fe.getBidResponsesForAdUnitCode=function(e){return{bids:u.K.getBidsReceived().filter((function(n){return n.adUnitCode===e}))}},fe.setTargetingForGPTAsync=function(e,t){if((0,n.PN)("Invoking pbjs.setTargetingForGPTAsync",arguments),(0,n.T9)()){var r=M.getAllTargeting(e);M.resetPresetTargeting(e,t),M.setTargetingForGPT(r,t),Object.keys(r).forEach((function(e){Object.keys(r[e]).forEach((function(n){"hb_adid"===n&&u.K.setStatusForBids(r[e][n],a.UE.CK)}))})),i.j8(be,r)}else(0,n.H)("window.googletag is not defined on the page")},fe.setTargetingForAst=function(e){(0,n.PN)("Invoking pbjs.setTargetingForAn",arguments),M.isApntagDefined()?(M.setTargetingForAst(e),i.j8(be,M.getAllTargeting())):(0,n.H)("window.apntag is not defined on the page")},fe.renderAd=(0,T.z3)("async",(function(e,r,o){if((0,n.PN)("Invoking pbjs.renderAd",arguments),(0,n.ji)("Calling renderAd with adId :"+r),e&&r)try{var c=u.K.findBidByAdId(r);if(c){var f=!0;if(c&&c.status===a.UE.fe&&((0,n.yN)("Ad id ".concat(c.adId," has been rendered before")),i.j8(he,c),(0,t.Z)(s.vc.getConfig("auctionOptions"),"suppressStaleRender")&&(f=!1)),f){if(c.ad=(0,n.ew)(c.ad,c.originalCpm||c.cpm),c.adUrl=(0,n.ew)(c.adUrl,c.originalCpm||c.cpm),o&&o.clickThrough){var l=o.clickThrough;c.ad=(0,n.x_)(c.ad,l),c.adUrl=(0,n.x_)(c.adUrl,l)}u.K.addWinningBid(c),i.j8(ve,c);var p=c.height,y=c.width,b=c.ad,h=c.mediaType,m=c.adUrl,w=c.renderer,C=document.createComment("Creative ".concat(c.creativeId," served by ").concat(c.bidder," Prebid.js Header Bidding"));if((0,n.jC)(C,e,"html"),(0,d.Pd)(w))(0,d._U)(w,c,e),Ne(C,e,"html"),v({doc:e,bid:c,id:r});else if(e===document&&!(0,n.yL)()||"video"===h){var A="Error trying to write ad. Ad render call ad id ".concat(r," was prevented from writing to the main document.");g({reason:we,message:A,bid:c,id:r})}else if(b)e.write(b),e.close(),Oe(e,y,p),Ne(C,e,"html"),(0,n.R_)(c),v({doc:e,bid:c,id:r});else if(m){var S=(0,n.$u)();S.height=p,S.width=y,S.style.display="inline",S.style.overflow="hidden",S.src=m,(0,n.jC)(S,e,"body"),Oe(e,y,p),Ne(C,e,"html"),(0,n.R_)(c),v({doc:e,bid:c,id:r})}else{var T="Error trying to write ad. No ad for bid response id: ".concat(r);g({reason:Ce,message:T,bid:c,id:r})}}}else{var E="Error trying to write ad. Cannot find ad by given id : ".concat(r);g({reason:Se,message:E,id:r})}}catch(e){var O="Error trying to write ad Id :".concat(r," to the page:").concat(e.message);g({reason:Ae,message:O,id:r})}else{var I="Error trying to write ad Id :".concat(r," to the page. Missing document or adId");g({reason:Te,message:I,id:r})}})),fe.removeAdUnit=function(e){((0,n.PN)("Invoking pbjs.removeAdUnit",arguments),e)?((0,n.kJ)(e)?e:[e]).forEach((function(e){for(var n=fe.adUnits.length-1;n>=0;n--)fe.adUnits[n].code===e&&fe.adUnits.splice(n,1)})):fe.adUnits=[]},fe.requestBids=(0,T.z3)("async",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.bidsBackHandler,r=e.timeout,o=e.adUnits,a=e.adUnitCodes,u=e.labels,c=e.auctionId,d=e.ortb2;i.j8(ye);var f=r||s.vc.getConfig("bidderTimeout");o=o||fe.adUnits,o=(0,n.kJ)(o)?o:[o],(0,n.PN)("Invoking pbjs.requestBids",arguments);var l={global:(0,n.Ee)({},s.vc.getAnyConfig("ortb2")||{},d||{}),bidder:Object.fromEntries(Object.entries(s.vc.getBidderConfig()).map((function(e){var n=ce(e,2);return[n[0],n[1].ortb2]})).filter((function(e){var n=ce(e,2);n[0];return null!=n[1]})))};return xe({bidsBackHandler:t,timeout:f,adUnits:o,adUnitCodes:a,labels:u,auctionId:c,ortb2Fragments:l})}));var xe=(0,T.z3)("async",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.bidsBackHandler,r=e.timeout,i=e.adUnits,o=e.adUnitCodes,a=e.labels,d=e.auctionId,f=e.ortb2Fragments,l=(0,ue.uV)(s.vc.getConfig("s2sConfig")||[]);if(i=_e(i),o&&o.length?i=i.filter((function(e){return(0,c.q9)(o,e.code)})):o=i&&i.map((function(e){return e.code})),i.forEach((function(e){var t=Object.keys(e.mediaTypes||{banner:"banner"}),r=e.bids.map((function(e){return e.bidder})),i=ue.ZP.bidderRegistry,o=r.filter((function(e){return!l.has(e)}));e.transactionId=(0,n.DO)(),o.forEach((function(r){var o=i[r],a=o&&o.getSpec&&o.getSpec(),u=a&&a.supportedMediaTypes||["banner"];t.some((function(e){return(0,c.q9)(u,e)}))?ie.f.incrementBidderRequestsCounter(e.code,r):((0,n.yN)((0,n.or)(e,r)),e.bids=e.bids.filter((function(e){return e.bidder!==r})))})),ie.f.incrementRequestsCounter(e.code)})),i&&0!==i.length){var p=u.K.createAuction({adUnits:i,adUnitCodes:o,callback:t,cbTimeout:r,labels:a,auctionId:d,ortb2Fragments:f}),g=i.length;g>15&&(0,n.PN)("Current auction ".concat(p.getAuctionId()," contains ").concat(g," adUnits."),i),o.forEach((function(e){return M.setLatestAuctionForAdUnit(e,p.getAuctionId())})),p.callBids()}else if((0,n.ji)("No adUnits configured. No bids requested."),"function"==typeof t)try{t()}catch(e){(0,n.H)("Error executing bidsBackHandler",null,e)}}),"startAuction");fe.requestBids.before((function(e,n){function t(e){for(var n;n=e.shift();)n()}t(ae.Ld),t(De),e.call(this,n)}),49),fe.addAdUnits=function(e){(0,n.PN)("Invoking pbjs.addAdUnits",arguments),fe.adUnits.push.apply(fe.adUnits,(0,n.kJ)(e)?e:[e]),i.j8(ge)},fe.onEvent=function(e,t,r){(0,n.PN)("Invoking pbjs.onEvent",arguments),(0,n.LQ)(t)?!r||Ee[e].call(null,r)?i.on(e,t,r):(0,n.H)('The id provided is not valid for event "'+e+'" and no handler was set.'):(0,n.H)('The event handler provided is not a function and was not set on event "'+e+'".')},fe.offEvent=function(e,t,r){(0,n.PN)("Invoking pbjs.offEvent",arguments),r&&!Ee[e].call(null,r)||i.S1(e,t,r)},fe.getEvents=function(){return(0,n.PN)("Invoking pbjs.getEvents"),i.vw()},fe.registerBidAdapter=function(e,t){(0,n.PN)("Invoking pbjs.registerBidAdapter",arguments);try{ue.ZP.registerBidAdapter(e(),t)}catch(e){(0,n.H)("Error registering bidder adapter : "+e.message)}},fe.registerAnalyticsAdapter=function(e){(0,n.PN)("Invoking pbjs.registerAnalyticsAdapter",arguments);try{ue.ZP.registerAnalyticsAdapter(e)}catch(e){(0,n.H)("Error registering analytics adapter : "+e.message)}},fe.createBid=function(e){return(0,n.PN)("Invoking pbjs.createBid",arguments),(0,oe.m)(e)};var De=[],qe=(0,T.z3)("async",(function(e){e&&!(0,n.xb)(e)?((0,n.PN)("Invoking pbjs.enableAnalytics for: ",e),ue.ZP.enableAnalytics(e)):(0,n.H)("pbjs.enableAnalytics should be called with option {}")}),"enableAnalyticsCb");function He(e){e.forEach((function(e){if(void 0===e.called)try{e.call(),e.called=!0}catch(e){(0,n.H)("Error processing command :","prebid.js",e)}}))}fe.enableAnalytics=function(e){De.push(qe.bind(this,e))},fe.aliasBidder=function(e,t,r){(0,n.PN)("Invoking pbjs.aliasBidder",arguments),e&&t?ue.ZP.aliasBidAdapter(e,t,r):(0,n.H)("bidderCode and alias must be passed as arguments","pbjs.aliasBidder")},fe.getAllWinningBids=function(){return u.K.getAllWinningBids()},fe.getAllPrebidWinningBids=function(){return u.K.getBidsReceived().filter((function(e){return e.status===a.UE.CK}))},fe.getHighestCpmBids=function(e){return M.getWinningBids(e)},fe.markWinningBidAsUsed=function(e){var t=[];e.adUnitCode&&e.adId?t=u.K.getBidsReceived().filter((function(n){return n.adId===e.adId&&n.adUnitCode===e.adUnitCode})):e.adUnitCode?t=M.getWinningBids(e.adUnitCode):e.adId?t=u.K.getBidsReceived().filter((function(n){return n.adId===e.adId})):(0,n.yN)("Improper use of markWinningBidAsUsed. It needs an adUnitCode or an adId to function."),t.length>0&&(t[0].status=a.UE.fe)},fe.getConfig=s.vc.getAnyConfig,fe.readConfig=s.vc.readAnyConfig,fe.mergeConfig=s.vc.mergeConfig,fe.mergeBidderConfig=s.vc.mergeBidderConfig,fe.setConfig=s.vc.setConfig,fe.setBidderConfig=s.vc.setBidderConfig,fe.que.push((function(){window.addEventListener("message",m,!1)})),fe.cmd.push=function(e){if("function"==typeof e)try{e.call()}catch(e){(0,n.H)("Error processing command :",e.message,e.stack)}else(0,n.H)("Commands written into pbjs.cmd.push must be wrapped in a function")},fe.que.push=fe.cmd.push,fe.processQueue=function(){T.z3.ready(),He(fe.que),He(fe.cmd)}}(),i=r.O(i)}(); /* AppNexus */ (self.pbjsChunk=self.pbjsChunk||[]).push([[864],{3231:function(e,r,a){var t=a(9853),n=a(265),i=a(4877),o=a(8962),s=a(1609),d=a(8265),p=a(4766),u=a(1879),c=a(1929),l=a(5849),m=a(9624),f=a(2455);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function b(){return b=Object.assign||function(e){for(var r=1;re.length)&&(r=e.length);for(var a=0,t=new Array(r);a0&&(T.member_id=I),p&&(T.device=d),l&&(T.app=c);var O=o.vc.getConfig("appnexusAuctionKeywords");if((0,t.PO)(O)){var A=(0,t.Bq)(O);A.length>0&&A.forEach(P),T.keywords=A}if(o.vc.getConfig("adpod.brandCategoryExclusion")&&(T.brand_category_uniqueness=!0),v.enabled&&(T.debug=v,(0,t.PN)("AppNexus Debug Auction Settings:\n\n"+JSON.stringify(v,null,4))),r&&r.gdprConsent&&(T.gdpr_consent={consent_string:r.gdprConsent.consentString,consent_required:r.gdprConsent.gdprApplies},r.gdprConsent.addtlConsent&&-1!==r.gdprConsent.addtlConsent.indexOf("~"))){var q=r.gdprConsent.addtlConsent,R=q.substring(q.indexOf("~")+1);T.gdpr_consent.addtl_consent=R.split(".").map((function(e){return parseInt(e,10)}))}if(r&&r.uspConsent&&(T.us_privacy=r.uspConsent),r&&r.refererInfo){var B={rd_ref:encodeURIComponent(r.refererInfo.topmostLocation),rd_top:r.refererInfo.reachedTop,rd_ifs:r.refererInfo.numIframes,rd_stk:r.refererInfo.stack.map((function(e){return encodeURIComponent(e)})).join(",")},L=r.refererInfo.canonicalUrl;(0,t.d8)(L)&&""!==L&&(B.rd_can=L),T.referrer_detection=B}if((0,u.sE)(e,M)&&e.filter(M).forEach((function(e){var r=function(e,r){var a=r.mediaTypes.video,n=a.durationRangeSec,i=a.requireExactDuration,o=function(e){var r=e.adPodDurationSec,a=e.durationRangeSec,n=e.requireExactDuration,i=(0,t.XV)(a),o=Math.floor(r/i);return n?Math.max(o,a.length):o}(r.mediaTypes.video),s=(0,t.d5)(n),d=e.filter((function(e){return e.uuid===r.bidId})),p=t.hl.apply(void 0,y(d).concat([o]));if(i){var u=Math.ceil(o/n.length),c=(0,t.yo)(p,u);n.forEach((function(e,r){c[r].map((function(r){H(r,"minduration",e),H(r,"maxduration",e)}))}))}else p.map((function(e){return H(e,"maxduration",s)}));return p}(a,e),n=T.tags.filter((function(r){return r.uuid!==e.bidId}));T.tags=[].concat(y(n),y(r))})),e[0].userId){var V=[];W(V,(0,n.Z)(e[0],"userId.criteoId"),"criteo.com",null),W(V,(0,n.Z)(e[0],"userId.netId"),"netid.de",null),W(V,(0,n.Z)(e[0],"userId.idl_env"),"liveramp.com",null),W(V,(0,n.Z)(e[0],"userId.tdid"),"adserver.org","TDID"),W(V,(0,n.Z)(e[0],"userId.uid2.id"),"uidapi.com","UID2"),e[0].userId.pubProvidedId&&e[0].userId.pubProvidedId.forEach((function(e){e.uids.forEach((function(r){V.push({source:e.source,id:r.id})}))})),V.length&&(T.eids=V)}a[0].publisher_id&&(T.publisher_id=a[0].publisher_id);var $=function(e,r){var a=[],n={withCredentials:!0},i=_;(0,f.h)(null==r?void 0:r.gdprConsent)||(i=k);"TRUE"!==(0,t.rD)("apn_test").toUpperCase()&&!0!==o.vc.getConfig("apn_test")||(n.customHeaders={"X-Is-Test":1});if(e.tags.length>15){var s=(0,t.I8)(e);(0,t.yo)(e.tags,15).forEach((function(e){s.tags=e;var t=JSON.stringify(s);a.push({method:"POST",url:i,data:t,bidderRequest:r,options:n})}))}else{var d=JSON.stringify(e);a={method:"POST",url:i,data:d,bidderRequest:r,options:n}}return a}(T,r);return $},interpretResponse:function(e,r){var a=this,o=r.bidderRequest;e=e.body;var p=[];if(!e||e.error){var l="in response for ".concat(o.bidderCode," adapter");return e&&e.error&&(l+=": ".concat(e.error)),(0,t.H)(l),p}if(e.tags&&e.tags.forEach((function(e){var r,l=(r=e)&&r.ads&&r.ads.length&&(0,u.sE)(r.ads,(function(e){return e.rtb}));if(l&&((!0===m.S.get(o.bidderCode,"allowZeroCpmBids")?l.cpm>=0:l.cpm>0)&&(0,u.q9)(a.supportedMediaTypes,l.ad_type))){var f=function(e,r,a){var o=(0,t.zE)(e.uuid,[a]),p={requestId:e.uuid,cpm:r.cpm,creativeId:r.creative_id,dealId:r.deal_id,currency:"USD",netRevenue:!0,ttl:300,adUnitCode:o.adUnitCode,appnexus:{buyerMemberId:r.buyer_member_id,dealPriority:r.deal_priority,dealCode:r.deal_code}};r.adomain&&(p.meta=b({},p.meta,{advertiserDomains:[]}));r.advertiser_id&&(p.meta=b({},p.meta,{advertiserId:r.advertiser_id}));function l(e){return{ver:"1.0",complete:0,nodes:[{bsid:e.buyer_member_id.toString()}]}}r.buyer_member_id&&(p.meta=b({},p.meta,{dchain:l(r)}));r.brand_id&&(p.meta=b({},p.meta,{brandId:r.brand_id}));if(r.rtb.video){switch(b(p,{width:r.rtb.video.player_width,height:r.rtb.video.player_height,vastImpUrl:r.notify_url,ttl:3600}),(0,n.Z)(o,"mediaTypes.video.context")){case d.Oh:var m=(0,s.Q1)(o.bidder,r.brand_category_id);p.meta=b({},p.meta,{primaryCatId:m});var f=r.deal_priority;p.video={context:d.Oh,durationSeconds:Math.floor(r.rtb.video.duration_ms/1e3),dealTier:f},p.vastUrl=r.rtb.video.asset_url;break;case c.gZ:if(p.adResponse=e,p.adResponse.ad=p.adResponse.ads[0],p.adResponse.ad.video=p.adResponse.ad.rtb.video,p.vastXml=r.rtb.video.content,r.renderer_url){var v=(0,u.sE)(a.bids,(function(r){return r.bidId===e.uuid})),y=(0,n.Z)(v,"mediaTypes.video.renderer.options");y||(y=(0,n.Z)(v,"renderer.options")),p.renderer=function(e,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i.Th.install({id:r.renderer_id,url:r.renderer_url,config:a,loaded:!1,adUnitCode:e});try{n.setRender(L)}catch(e){(0,t.yN)("Prebid Error calling setRender on renderer",e)}return n.setEventHandlers({impression:function(){return(0,t.ji)("AppNexus outstream video impression event")},loaded:function(){return(0,t.ji)("AppNexus outstream video loaded event")},ended:function(){(0,t.ji)("AppNexus outstream renderer video event"),document.querySelector("#".concat(e)).style.display="none"}}),n}(p.adUnitCode,r,y)}break;case c.LD:p.vastUrl=r.notify_url+"&redir="+encodeURIComponent(r.rtb.video.asset_url)}}else if(r.rtb[d.B5]){var g=r.rtb[d.B5],h=r.viewability.config.replace("src=","data-src="),_=g.javascript_trackers;null==_?_=h:(0,t.d8)(_)?_=[_,h]:_.push(h),p[d.B5]={title:g.title,body:g.desc,body2:g.desc2,cta:g.ctatext,rating:g.rating,sponsoredBy:g.sponsored,privacyLink:g.privacy_link,address:g.address,downloads:g.downloads,likes:g.likes,phone:g.phone,price:g.price,salePrice:g.saleprice,clickUrl:g.link.url,displayUrl:g.displayurl,clickTrackers:g.link.click_trackers,impressionTrackers:g.impression_trackers,javascriptTrackers:_},g.main_img&&(p.native.image={url:g.main_img.url,height:g.main_img.height,width:g.main_img.width}),g.icon&&(p.native.icon={url:g.icon.url,height:g.icon.height,width:g.icon.width})}else{b(p,{width:r.rtb.banner.width,height:r.rtb.banner.height,ad:r.rtb.banner.content});try{if(r.rtb.trackers)for(var k=0;k|)/gm,"\t").replace(/(<\/td>|<\/th>)/gm,"\n").replace(/^
/gm,"").replace(/(
\n|
)/gm,"\n").replace(/

(.*)<\/h1>/gm,"\n\n===== $1 =====\n\n").replace(/(.*)<\/h[2-6]>/gm,"\n\n*** $1 ***\n\n").replace(/(<([^>]+)>)/gim,""),(0,t.ji)("https://console.appnexus.com/docs/understanding-the-debug-auction"),(0,t.ji)(f)}return p},getMappingFileInfo:function(){return{url:"https://acdn.adnxs-simple.com/prebid/appnexus-mapping/mappings.json",refreshInDays:2}},getUserSyncs:function(e,r,a){if(e.iframeEnabled&&(0,f.h)(a))return[{type:"iframe",url:"https://acdn.adnxs.com/dmp/async_usersync.html"}]},transformBidParams:function(e,r,a,i){var s=t.Bq;if(!0===r){var d=null,p=o.vc.getConfig("s2sConfig");(0,t.PO)(p)?d=(0,n.Z)(p,"endpoint.p1Consent"):(0,t.kJ)(p)&&p.forEach((function(e){(0,u.q9)(e.bidders,a.bids[0].bidder)&&(d=(0,n.Z)(e,"endpoint.p1Consent"))})),d&&d.match("/openrtb2/prebid")&&(s=$)}return e=(0,t.uh)({member:"string",invCode:"string",placementId:"number",keywords:s,publisherId:"number"},e),r&&(e.use_pmt_rule="boolean"==typeof e.usePaymentRule&&e.usePaymentRule,e.usePaymentRule&&delete e.usePaymentRule,q(e.keywords)&&e.keywords.forEach(P),Object.keys(e).forEach((function(r){var a=(0,t.G2)(r);a!==r&&(e[a]=e[r],delete e[r])}))),e},onBidWon:function(e){e.native&&function(e){var r=function(e){var r;if((0,t.d8)(e)&&R(e))r=e;else if((0,t.kJ)(e))for(var a=0;a0)}function P(e){q(e.value)&&""===e.value[0]&&delete e.value}function R(e){var r=e.match(O),a=null!=r&&r.length>=1,t=e.match("trk.js"),n=null!=t&&t.length>=1;return e.startsWith("0&&o.forEach(P),r.keywords=o}var s,c,l=(0,n.Z)(e,"ortb2Imp.ext.data.pbadslot");if(l&&(r.gpid=l),(e.mediaType===d.B5||(0,n.Z)(e,"mediaTypes.".concat(d.B5)))&&(r.ad_types.push(d.B5),0===r.sizes.length&&(r.sizes=B([1,1])),e.nativeParams)){var m=(s=e.nativeParams,c={},Object.keys(s).forEach((function(e){var r=T[e]&&T[e].serverName||T[e]||e,a=T[e]&&T[e].requiredParams;if(c[r]=b({},a,s[e]),(r===T.image.serverName||r===T.icon.serverName)&&c[r].sizes){var n=c[r].sizes;((0,t.HC)(n)||(0,t.kJ)(n)&&n.length>0&&n.every((function(e){return(0,t.HC)(e)})))&&(c[r].sizes=B(c[r].sizes))}r===T.privacyLink&&(c.privacy_supported=!0)})),c);r[d.B5]={layouts:[m]}}var f=(0,n.Z)(e,"mediaTypes.".concat(d.pX)),v=(0,n.Z)(e,"mediaTypes.video.context");r.hb_source=f&&"adpod"===v?7:1,(e.mediaType===d.pX||f)&&r.ad_types.push(d.pX),(e.mediaType===d.pX||f&&"outstream"!==v)&&(r.require_asset_url=!0),e.params.video&&(r.video={},Object.keys(e.params.video).filter((function(e){return(0,u.q9)(I,e)})).forEach((function(a){switch(a){case"context":case"playback_method":var n=e.params.video[a];n=(0,t.kJ)(n)?n[0]:n,r.video[a]=S[a][n];break;case"frameworks":break;default:r.video[a]=e.params.video[a]}})),e.params.video.frameworks&&(0,t.kJ)(e.params.video.frameworks)&&(r.video_frameworks=e.params.video.frameworks)),f&&(r.video=r.video||{},Object.keys(f).filter((function(e){return(0,u.q9)(w,e)})).forEach((function(e){switch(e){case"minduration":case"maxduration":"number"!=typeof r.video[e]&&(r.video[e]=f[e]);break;case"skip":"boolean"!=typeof r.video.skippable&&(r.video.skippable=1===f[e]);break;case"skipafter":"number"!=typeof r.video.skipoffset&&(r.video.skippoffset=f[e]);break;case"playbackmethod":if("number"!=typeof r.video.playback_method){var a=f[e];(a=(0,t.kJ)(a)?a[0]:a)>=1&&a<=4&&(r.video.playback_method=a)}break;case"api":if(!r.video_frameworks&&(0,t.kJ)(f[e])){var n=f[e].map((function(e){var r=4===e?5:5===e?4:e;if(r>=1&&r<=5)return r})).filter((function(e){return e}));r.video_frameworks=n}}}))),e.renderer&&(r.video=b({},r.video,{custom_renderer_present:!0})),e.params.frameworks&&(0,t.kJ)(e.params.frameworks)&&(r.banner_frameworks=e.params.frameworks);var y=(0,u.sE)(p.K.getAdUnits(),(function(r){return e.transactionId===r.transactionId}));return y&&y.mediaTypes&&y.mediaTypes.banner&&r.ad_types.push(d.Mk),0===r.ad_types.length&&delete r.ad_types,r}function B(e){var r=[],a={};if((0,t.kJ)(e)&&2===e.length&&!(0,t.kJ)(e[0]))a.width=parseInt(e[0],10),a.height=parseInt(e[1],10),r.push(a);else if("object"===v(e))for(var n=0;n0?"?".concat(i.join("&")):"")})}return o},onTimeout:function(e){(0,r.ji)("concert bidder timed out"),(0,r.ji)(e)},onBidWon:function(e){(0,r.ji)("concert bidder won bid"),(0,r.ji)(e)}};(0,o.dX)(d);var p=(0,i.df)({bidderCode:a});function c(e){if(u()||!function(e){return!("string"===e.uspConsent&&"1YY"===e.uspConsent.toUpperCase().substring(0,2))}(e))return!1;var t="c_uid",n=p.getDataFromLocalStorage(t);return n||(n=(0,r.DO)(),p.setDataInLocalStorage(t,n)),n}function u(){return"true"===p.getDataFromLocalStorage("c_nap")}window.pbjs.installedModules.push("concertBidAdapter")}},function(e){var t;t=4475,e(e.s=t)}]); /* ConsentManagement */ (self.pbjsChunk=self.pbjsChunk||[]).push([[266],{1654:function(n,e,t){var o=t(9853),a=t(8962),c=t(8634),i=t(1879);function r(n){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},r(n)}var s,u,d,l,p,f=!1,m={iab:function(n){var e=n.onSuccess,t=n.onError;function a(n,a){(0,o.PN)("Received a response from CMP",n),a?!1!==n.gdprApplies&&"tcloaded"!==n.eventStatus&&"useractioncomplete"!==n.eventStatus||v(n,{onSuccess:e,onError:t}):t("CMP unable to register callback function. Please check CMP setup.")}var c={},r=function(){for(var n,e,t=window;;){try{if("function"==typeof t.__tcfapi){e=t.__tcfapi,n=t;break}}catch(n){}try{if(t.frames.__tcfapiLocator){n=t;break}}catch(n){}if(t===window.top)break;t=t.parent}return{cmpFrame:n,cmpFunction:e}}(),s=r.cmpFrame,u=r.cmpFunction;if(!s)return t("CMP not found.");"function"==typeof u?((0,o.PN)("Detected CMP API is directly accessible, calling it now..."),u("addEventListener",2,a)):((0,o.PN)("Detected CMP is outside the current iframe where Prebid.js is located, calling it now..."),function(n,e,t){var o="__tcfapi",a="".concat(o,"Call");function r(n){var e="".concat(o,"Return"),t="string"==typeof n.data&&(0,i.q9)(n.data,e)?JSON.parse(n.data):n.data;if(t[e]&&t[e].callId){var a=t[e];void 0!==c[a.callId]&&c[a.callId](a.returnValue,a.success)}}window[o]=function(n,t,o,i){var r,s,u,d=Math.random()+"",l=(u={command:n,version:t,parameter:i,callId:d},(s=a)in(r={})?Object.defineProperty(r,s,{value:u,enumerable:!0,configurable:!0,writable:!0}):r[s]=u,r);c[d]=o,e.postMessage(l,"*")},window.addEventListener("message",r,!1),window[o](n,2,t)}("addEventListener",s,a))},static:function(n){var e=n.onSuccess,t=n.onError;v(l,{onSuccess:e,onError:t})}};function g(n){var e=!1,t=null;function o(o,a,i){if(null!=t&&clearTimeout(t),e=!0,c.rp.setConsentData(o),"function"==typeof n){for(var r=arguments.length,s=new Array(r>3?r-3:0),u=3;u1?e-1:0),a=1;a2?i-2:0),s=2;s2?i-2:0),r=2;r1?t-1:0),o=1;o1?c-1:0),s=1;s0&&void 0!==arguments[0]&&arguments[0];d||((0,a.PN)("USPAPI consentManagement module has been activated".concat(n?"":" using default values (api: '".concat(p,"', timeout: ").concat(f,"ms)"))),(0,i.R)().requestBids.before(v,50)),d=!0,c.nX.enable(),m()}o.vc.getConfig("consentManagement",(function(n){return function(n){(n=n&&n.usp)&&"object"===s(n)||(0,a.yN)("consentManagement.usp config not defined, using defaults"),n&&(0,a.d8)(n.cmpApi)?p=n.cmpApi:(p=l,(0,a.PN)("consentManagement.usp config did not specify cmpApi. Using system default setting (".concat(l,")."))),n&&(0,a.hj)(n.timeout)?f=n.timeout:(f=50,(0,a.PN)("consentManagement.usp config did not specify timeout. Using system default setting (".concat(50,")."))),"static"===p&&((0,a.PO)(n.consentData)&&(0,a.PO)(n.consentData.getUSPData)?(n.consentData.getUSPData.uspString&&(r={usPrivacy:n.consentData.getUSPData.uspString}),f=0):(0,a.H)("consentManagement config with cmpApi: 'static' did not specify consentData. No consents will be available to adapters.")),P(!0)}(n.consentManagement)})),setTimeout((function(){return!d&&P()})),window.pbjs.installedModules.push("consentManagementUsp")}},function(n){var t;t=1366,n(n.s=t)}]); /* Consumable */ (self.pbjsChunk=self.pbjsChunk||[]).push([[439],{3081:function(e,n,r){var t=r(9853),s=r(1609);function a(){return a=Object.assign||function(e){for(var n=1;n0&&(r.meta.primaryCatId=p.cats[0],p.cats.length>1&&(r.meta.secondaryCatIds=p.cats.slice(1))),p.networkId&&(r.meta.networkId=p.networkId),p.mediaType&&(r.meta.mediaType=p.mediaType),i.push(r))}return i},getUserSyncs:function(e,n){return!e.iframeEnabled||n&&0!==n.length&&n[0].body.bdr&&"cx"===n[0].body.bdr?e.pixelEnabled&&n&&n.length>0?n[0].body.pixels:void(0,t.yN)(d+": Please enable iframe based user syncing."):[{type:"iframe",url:"https://sync.serverbid.com/ss/"+i+".html"}]}},o=[null,"120x90","120x90","468x60","728x90","300x250","160x600","120x600","300x100","180x150","336x280","240x400","234x60","88x31","120x60","120x240","125x125","220x250","250x250","250x90","0x0","200x90","300x50","320x50","320x480","185x185","620x45","300x125","800x250"];function u(e){var n=[];return e.forEach((function(e){var r=o.indexOf(e[0]+"x"+e[1]);r>=0&&n.push(r)})),n}function c(e,n,r){return e.contents&&e.contents[0]&&e.contents[0].body+(0,t.SG)(e.impressionUrl)}o[77]="970x90",o[123]="970x250",o[43]="300x600",o[286]="970x66",o[3230]="970x280",o[429]="486x60",o[374]="700x500",o[934]="300x1050",o[1578]="320x100",o[331]="320x250",o[3301]="320x267",o[2730]="728x250",(0,s.dX)(p),window.pbjs.installedModules.push("consumableBidAdapter")}},function(e){var n;n=3081,e(e.s=n)}]); /* Criteo */ (self.pbjsChunk=self.pbjsChunk||[]).push([[406],{6201:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){var _src_utils_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(9853),_src_utils_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(265),_src_adloader_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(6996),_src_adapters_bidderFactory_js__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(1609),_src_config_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(8962),_src_mediaTypes_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(8265),_src_polyfill_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(1879),criteo_direct_rsa_validate_build_verify_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1582),_src_storageManager_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(5849);function _extends(){return _extends=Object.assign||function(t){for(var e=1;e\nfor (var i = 0; i < 10; ++i) {\n var slots = window.parent.'.concat(i,';\n if(!slots){continue;}\n var responseSlot = slots["').concat(t,'"];\n responseSlot.callback(responseSlot.payload);\n break;\n}\n<\/script>')}function canFastBid(t){return t!==FAST_BID_VERSION_NONE}function getFastBidUrl(t){var e;if(t===FAST_BID_VERSION_LATEST)e="";else if(t){String(t).split(".")[0]<102&&(0,_src_utils_js__WEBPACK_IMPORTED_MODULE_5__.yN)("Specifying a Fastbid version which is not supporting version selection."),e="."+t}else e="."+FAST_BID_VERSION_CURRENT;return PUBLISHER_TAG_URL_TEMPLATE.replace(FAST_BID_VERSION_PLACEHOLDER,e)}function tryGetCriteoFastBid(){try{var fastBidStorageKey="criteo_fast_bid",hashPrefix="// Hash: ",fastBidFromStorage=storage.getDataFromLocalStorage(fastBidStorageKey);if(null!==fastBidFromStorage){var firstLineEndPosition=fastBidFromStorage.indexOf("\n"),firstLine=fastBidFromStorage.substr(0,firstLineEndPosition).trim();if(firstLine.substr(0,hashPrefix.length)!==hashPrefix)(0,_src_utils_js__WEBPACK_IMPORTED_MODULE_5__.yN)("No hash found in FastBid"),storage.removeDataFromLocalStorage(fastBidStorageKey);else{var publisherTagHash=firstLine.substr(hashPrefix.length),publisherTag=fastBidFromStorage.substr(firstLineEndPosition+1);(0,criteo_direct_rsa_validate_build_verify_js__WEBPACK_IMPORTED_MODULE_0__.T)(publisherTag,publisherTagHash,FAST_BID_PUBKEY_N,FAST_BID_PUBKEY_E)?((0,_src_utils_js__WEBPACK_IMPORTED_MODULE_5__.PN)("Using Criteo FastBid"),eval(publisherTag)):((0,_src_utils_js__WEBPACK_IMPORTED_MODULE_5__.yN)("Invalid Criteo FastBid found"),storage.removeDataFromLocalStorage(fastBidStorageKey))}}}catch(t){}}(0,_src_adapters_bidderFactory_js__WEBPACK_IMPORTED_MODULE_8__.dX)(spec),window.pbjs.installedModules.push("criteoBidAdapter")},4611:function(t,e){var r;Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t){null!==t&&this.fromHexString(t)}return t.prototype.toHexString=function(){if(this.s<0)return"-"+this.negate().toHexString();var t,e=!1,r="",i=this.t,s=this.DB-i*this.DB%4;if(i-- >0)for(s>s)>0&&(e=!0,r=d(t));i>=0;)s<4?(t=(this[i]&(1<>(s+=this.DB-4)):(t=this[i]>>(s-=4)&15,s<=0&&(s+=this.DB,--i)),t>0&&(e=!0),e&&(r+=d(t));return e?r:"0"},t.prototype.fromHexString=function(e){if(null!==e){this.t=0,this.s=0;for(var r=e.length,i=!1,s=0;--r>=0;){var a=p(e,r);a<0?"-"==e.charAt(r)&&(i=!0):(i=!1,0==s?this[this.t++]=a:s+4>this.DB?(this[this.t-1]|=(a&(1<>this.DB-s):this[this.t-1]|=a<=this.DB&&(s-=this.DB))}0,this.clamp(),i&&t.ZERO.subTo(this,this)}},t.prototype.negate=function(){var e=s();return t.ZERO.subTo(this,e),e},t.prototype.abs=function(){return this.s<0?this.negate():this},t.prototype.mod=function(e){var r=s();return this.abs().divRemTo(e,null,r),this.s<0&&r.compareTo(t.ZERO)>0&&e.subTo(r,r),r},t.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},t.prototype.lShiftTo=function(t,e){for(var r=t%this.DB,i=this.DB-r,s=(1<=0;--n)e[n+a+1]=this[n]>>i|o,o=(this[n]&s)<=0;--n)e[n]=0;e[a]=o,e.t=this.t+a+1,e.s=this.s,e.clamp()},t.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},t.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s},t.prototype.squareTo=function(t){for(var e=this.abs(),r=t.t=2*e.t;--r>=0;)t[r]=0;for(r=0;r=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()},t.prototype.multiplyTo=function(e,r){var i=this.abs(),s=e.abs(),a=i.t;for(r.t=a+s.t;--a>=0;)r[a]=0;for(a=0;a0?(o.lShiftTo(u,_),n.lShiftTo(u,i)):(o.copyTo(_),n.copyTo(i));var c=_.t,l=_[c-1];if(0!=l){var h=l*(1<1?_[c-2]>>this.F2:0),f=this.FV/h,m=(1<=0&&(i[i.t++]=1,i.subTo(y,i)),t.ONE.dlShiftTo(c,y),y.subTo(_,_);_.t=0;){var D=i[--E]==l?this.DM:Math.floor(i[E]*f+(i[E-1]+v)*m);if((i[E]+=_.am(0,D,i,T,0,c))0&&i.rShiftTo(u,i),p<0&&t.ZERO.subTo(i,i)}}},t.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var i=t%this.DB,s=this.DB-i,a=(1<>i;for(var o=r+1;o>i;i>0&&(e[this.t-r-1]|=(this.s&a)<>=this.DB;if(t.t>=this.DB;i+=this.s}else{for(i+=this.s;r>=this.DB;i-=t.s}e.s=i<0?-1:0,i<-1?e[r++]=this.DV+i:i>0&&(e[r++]=i),e.t=r,e.clamp()},t.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},t.prototype.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new u(e):new c(e),this.exp(t,r)},t.prototype.exp=function(e,r){if(e>4294967295||e<1)return t.ONE;var i=s(),o=s(),n=r.convert(this),_=a(e)-1;for(n.copyTo(i);--_>=0;)if(r.sqrTo(i,o),(e&1<<_)>0)r.mulTo(o,n,i);else{var p=i;i=o,o=p}return r.revert(i)},t.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},t.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0},t.prototype.am1=function(t,e,r,i,s,a){for(;--a>=0;){var o=e*this[t++]+r[i]+s;s=Math.floor(o/67108864),r[i++]=67108863&o}return s},t.prototype.am2=function(t,e,r,i,s,a){for(var o=32767&e,n=e>>15;--a>=0;){var _=32767&this[t],p=this[t++]>>15,d=n*_+p*o;s=((_=o*_+((32767&d)<<15)+r[i]+(1073741823&s))>>>30)+(d>>>15)+n*p+(s>>>30),r[i++]=1073741823&_}return s},t.prototype.am3=function(t,e,r,i,s,a){for(var o=16383&e,n=e>>14;--a>=0;){var _=16383&this[t],p=this[t++]>>14,d=n*_+p*o;s=((_=o*_+((16383&d)<<14)+r[i]+s)>>28)+(d>>14)+n*p,r[i++]=268435455&_}return s},t}();function s(){return new i(null)}function a(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}e.BigInteger=i,e.nbi=s,e.nbits=a;var o,n,_=[];for(o="0".charCodeAt(0),n=0;n<=9;++n)_[o++]=n;for(o="a".charCodeAt(0),n=10;n<36;++n)_[o++]=n;for(o="A".charCodeAt(0),n=10;n<36;++n)_[o++]=n;function p(t,e){var r=_[t.charCodeAt(e)];return null==r?-1:r}e.intAt=p;function d(t){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t)}e.int2char=d;e.b64toHex=function(t){var e,r="",i=0,s=0;for(e=0;e>2),s=3&a,i=1):1==i?(r+=d(s<<2|a>>4),s=15&a,i=2):2==i?(r+=d(s),r+=d(a>>2),s=3&a,i=3):(r+=d(s<<2|a>>4),r+=d(15&a),i=0))}return 1==i&&(r+=d(s<<2)),r},e.removeExtraSymbols=function(t){return t.replace(/^1f+00/,"").replace("3031300d060960864801650304020105000420","")};var u=function(){function t(t){this.m=t}return t.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),c=function(){function t(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(e,e),e},t.prototype.revert=function(t){var e=s();return t.copyTo(e),this.reduce(e),e},t.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(t[r=e+this.m.t]+=this.m.am(0,i,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}();function l(t){var e=s();return e.fromHexString(t.toString()),e}e.nbv=l,i.ZERO=l(0),i.ONE=l(1),"Microsoft Internet Explorer"==navigator.appName?(i.prototype.am=i.prototype.am2,r=30):"Netscape"!=navigator.appName?(i.prototype.am=i.prototype.am1,r=26):(i.prototype.am=i.prototype.am3,r=28),i.prototype.DB=r,i.prototype.DM=(1<>>0;o[a-1][14]=Math.floor(p),o[a-1][15]=d;for(n=0;n>>0;var l=i[0],h=i[1],f=i[2],m=i[3],v=i[4],E=i[5],T=i[6],y=i[7];for(c=0;c<64;c++){var D=y+t.z1(v)+t.Ch(v,E,T)+r[c]+u[c],b=t.z0(l)+t.Maj(l,h,f);y=T,T=E,E=v,v=m+D>>>0,m=f,f=h,h=l,l=D+b>>>0}i[0]=i[0]+l>>>0,i[1]=i[1]+h>>>0,i[2]=i[2]+f>>>0,i[3]=i[3]+m>>>0,i[4]=i[4]+v>>>0,i[5]=i[5]+E>>>0,i[6]=i[6]+T>>>0,i[7]=i[7]+y>>>0}var P=new Array(i.length);for(y=0;y>>t|e<<32-t},t.z0=function(e){return t.ROTR(2,e)^t.ROTR(13,e)^t.ROTR(22,e)},t.z1=function(e){return t.ROTR(6,e)^t.ROTR(11,e)^t.ROTR(25,e)},t.q0=function(e){return t.ROTR(7,e)^t.ROTR(18,e)^e>>>3},t.q1=function(e){return t.ROTR(17,e)^t.ROTR(19,e)^e>>>10},t.Ch=function(t,e,r){return t&e^~t&r},t.Maj=function(t,e,r){return t&e^t&r^e&r},t}();e.Sha256=r},1582:function(t,e,r){var i=r(4611),s=r(4950);e.T=function(t,e,r,a){var o=new i.BigInteger(i.b64toHex(e)),n=new i.BigInteger(i.b64toHex(r)),_=o.modPowInt(a,n);return i.removeExtraSymbols(_.toHexString())===s.Sha256.hash(t)}}},function(t){var e;e=6201,t(t.s=e)}]); /* GA */ (self.pbjsChunk=self.pbjsChunk||[]).push([[690],{6097:function(o,e,n){var i=n(9853),t=n(2319),r=n(5644),s=n(8634);function a(o){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},a(o)}var l=r.FP.BID_REQUESTED,d=r.FP.BID_TIMEOUT,u=r.FP.BID_RESPONSE,f=r.FP.BID_WON,c={nonInteraction:!0},b=[],p=null,v=!0,m="Prebid.js Bids",y=0,w=!1,g=null,D=null,h=!0,F=!1,T={};function j(){if(v&&"function"==typeof window[p]){for(var o=0;o=0&&o<.5?e="$0-0.5":o>=.5&&o<1?e="$0.5-1":o>=1&&o<1.5?e="$1-1.5":o>=1.5&&o<2?e="$1.5-2":o>=2&&o<2.5?e="$2-2.5":o>=2.5&&o<3?e="$2.5-3":o>=3&&o<4?e="$3-4":o>=4&&o<6?e="$4-6":o>=6&&o<8?e="$6-8":o>=8&&(e="$8 above"),e);var e}function S(o){o&&o.bidderCode&&b.push((function(){if(y++,F){var e="No Floor";o.floorData?e=o.floorData.floorValue:o.bids.length&&(e=o.bids[0].getFloor().floor),window[p](D,"event",m,"Requests by Floor="+e,o.bidderCode,1,c)}else window[p](D,"event",m,"Requests",o.bidderCode,1,c)})),j()}function $(o){o&&o.bidderCode&&b.push((function(){var e,n,i=C(o.cpm),t=o.bidderCode;if(void 0!==o.timeToRespond&&w){y++;var r=((e=o.timeToRespond)>=0&&e<200?n="0-200ms":e>=200&&e<300?n="0200-300ms":e>=300&&e<400?n="0300-400ms":e>=400&&e<500?n="0400-500ms":e>=500&&e<600?n="0500-600ms":e>=600&&e<800?n="0600-800ms":e>=800&&e<1e3?n="0800-1000ms":e>=1e3&&e<1200?n="1000-1200ms":e>=1200&&e<1500?n="1200-1500ms":e>=1500&&e<2e3?n="1500-2000ms":e>=2e3&&(n="2000ms above"),n);window[p](D,"event","Prebid.js Load Time Distribution",r,t,1,c)}if(o.cpm>0){y+=2;var s=P(o.cpm);if(w&&(y++,window[p](D,"event","Prebid.js CPM Distribution",s,t,1,c)),F){var a=o.floorData?o.floorData.floorValue:"No Floor";window[p](D,"event",m,"Bids by Floor="+a,"Size="+o.size+","+t,i,c)}else window[p](D,"event",m,"Bids",t,i,c);window[p](D,"event",m,"Bid Load Time",t,o.timeToRespond,c)}})),j()}function A(o){b.push((function(){(0,i.yi)(o,(function(o){y++;var e=o.bidder;window[p](D,"event",m,"Timeouts",e,c)}))})),j()}function B(o){var e=C(o.cpm);b.push((function(){if(y++,F){var n=o.floorData?o.floorData.floorValue:"No Floor";window[p](D,"event",m,"Wins by Floor="+n,"Size="+o.size+","+o.bidderCode,e,c)}else window[p](D,"event",m,"Wins",o.bidderCode,e,c)})),j()}T.enableAnalytics=function(o){var e=o.provider,n=o.options;p=e||"ga",D=n&&n.trackerName?n.trackerName+".send":"send",h=void 0===n||void 0===n.sampling||Math.random()=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,d=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return o=e.done,e},e:function(e){d=!0,a=e},f:function(){try{o||null==t.return||t.return()}finally{if(d)throw a}}}}function I(e,r){if(e){if("string"==typeof e)return O(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?O(e,r):void 0}}function O(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);tr.video.maxduration)return(0,i.H)("IX Bid Adapter: video minduration [".concat(r.video.minduration,"] cannot be greater than video maxduration [").concat(r.video.maxduration,"]"),{bidder:w,code:F}),{};var s=a&&a.context||t&&t.context;if(s&&!r.video.hasOwnProperty("placement")&&(s===l.LD?r.video.placement=1:s===l.gZ?r.video.placement=4:(0,i.yN)("IX Bid Adapter: Video context '".concat(s,"' is not supported"))),!r.video.w||!r.video.h){var c=te((0,n.Z)(r,"video.playerSize"))||te((0,n.Z)(e,"params.size"));if(!c)return(0,i.yN)("IX Bid Adapter: Video size is missing in [mediaTypes.video] missing"),{};r.video.w=c[0],r.video.h=c[1],(0,n.Z)(r,"ext.sid")||(r.ext.sid=(0,i.s)(c))}return Y(e,r,o.pX),r}function Q(e){var r={};return r.id=e.bidId,r.ext={},r.ext.siteID=e.params.siteId.toString(),!e.params.hasOwnProperty("id")||"string"!=typeof e.params.id&&"number"!=typeof e.params.id||(r.ext.sid=String(e.params.id)),r}function Y(e,r,t){var n=null,a=null;if(e.params.bidFloor&&e.params.bidFloorCur&&(n={floor:e.params.bidFloor,currency:e.params.bidFloorCur}),(0,i.LQ)(e.getFloor)){var o="*",d="*";if(t&&(0,i.r3)(P,t)){var s=r[t];o=t,d=[s.w,s.h]}try{a=e.getFloor({mediaType:o,size:d})}catch(e){(0,i.yN)("priceFloors module call getFloor failed, error : ",e)}}a?(r.bidfloor=a.floor,r.bidfloorcur=a.currency,r.ext.fl=z):n&&(r.bidfloor=n.floor,r.bidfloorcur=n.currency,r.ext.fl=A)}function K(e,r,t){var a={},d=!(!(0,n.Z)(e,"exp")||!(0,i.U)(e.exp)),s=(0,n.Z)(e,"dealid")||(0,n.Z)(e,"ext.dealid");return j.hasOwnProperty(r)?a.cpm=e.price/j[r]:a.cpm=e.price/100,a.requestId=e.impid,s&&(a.dealId=s),a.netRevenue=true,a.currency=r,a.creativeId=e.hasOwnProperty("crid")?e.crid:"-",e.mtype==G?a.vastXml=e.adm:e.ext&&e.ext.vasturl&&(a.vastUrl=e.ext.vasturl),e.ext&&e.ext.vasturl||e.mtype==G?(a.width=t.video.w,a.height=t.video.h,a.mediaType=o.pX,a.mediaTypes=t.mediaTypes,a.ttl=d?e.exp:3600):(a.ad=e.adm,a.width=e.w,a.height=e.h,a.mediaType=o.Mk,a.ttl=d?e.exp:300),a.meta={},a.meta.networkId=(0,n.Z)(e,"ext.dspid"),a.meta.brandId=(0,n.Z)(e,"ext.advbrandid"),a.meta.brandName=(0,n.Z)(e,"ext.advbrand"),e.adomain&&e.adomain.length>0&&(a.meta.advertiserDomains=e.adomain),a}function W(e){return Array.isArray(e)&&2===e.length&&(0,i.U)(e[0])&&(0,i.U)(e[1])}function ee(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(W(e))return e[0]===r[0]&&e[1]===r[1];for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:[];return W(e)?e:!!W(e[0])&&e[0]}function ne(e,r,t){if(e)return g(g({},(0,p.sE)(t,(function(r){return r.bidId===e}))),(0,p.sE)(r,(function(r){return r.id===e})))}function ie(e,r,t,s){var c="https://htlb.casalemedia.com/openrtb/pbjs",u=function(e){var r=[],t={};if((0,i.kJ)(e)){var a,o=x(e);try{for(o.s();!(a=o.n()).done;){var d=a.value;q.hasOwnProperty(d.source)&&(0,n.Z)(d,"uids.0")&&(t[d.source]=!0,""!=q[d.source]&&(d.uids[0].ext={rtiPartner:q[d.source]}),delete d.uids[0].atype,r.push(d))}}catch(e){o.e(e)}finally{o.f()}}return{toSend:r,seenSources:t}}((0,n.Z)(e,"0.userIdAsEids")),p=u.toSend,f=(0,n.Z)(r,"refererInfo.page");if(window.headertag&&"function"==typeof window.headertag.getIdentityInfo){var l=window.headertag.getIdentityInfo();if(l&&"object"===v(l))for(var m in l)if(l.hasOwnProperty(m)){var b=l[m];!b.responsePending&&b.data&&"object"===v(b.data)&&Object.keys(b.data).length&&!u.seenSources[b.data.source]&&p.push(b.data)}}if(r&&r.bidderCode===S&&!u.seenSources["liveramp.com"])return[];var h={};h.id=e[0].bidderRequestId.toString(),h.site={},h.ext={},h.ext.source="prebid",h.ext.ixdiag={},h.ext.ixdiag.msd=0,h.ext.ixdiag.msi=0,h.imp=[],h.at=1;var I=function(e){for(var r=e.map((function(e){return e.transactionId})).filter((function(e,r,t){return t.indexOf(e)===r})),t={mfu:0,bu:0,iu:0,nu:0,ou:0,allu:0,ren:!1,version:"7.0.0",userIds:ae(e[0]),url:window.location.href.split("?")[0]},i=function(i){o=e.filter((function(e){return e.transactionId===r[i]}))[0],(0,n.Z)(o,"mediaTypes")&&(Object.keys(o.mediaTypes).length>1&&t.mfu++,(0,n.Z)(o,"mediaTypes.native")&&t.nu++,(0,n.Z)(o,"mediaTypes.banner")&&t.bu++,"outstream"===(0,n.Z)(o,"mediaTypes.video.context")&&(t.ou++,le(o)&&(t.ren=!0)),"instream"===(0,n.Z)(o,"mediaTypes.video.context")&&t.iu++,t.allu++)},a=0;a0&&(h.user={},h.user.eids=p),document.referrer&&""!==document.referrer&&(h.site.ref=document.referrer),r){if(r.gdprConsent){var k=r.gdprConsent;k.hasOwnProperty("gdprApplies")&&(h.regs={ext:{gdpr:k.gdprApplies?1:0}}),k.hasOwnProperty("consentString")&&(h.user=h.user||{},h.user.ext={consent:k.consentString||""},k.hasOwnProperty("addtlConsent")&&k.addtlConsent&&(h.user.ext.consented_providers_settings={consented_providers:k.addtlConsent}))}r.uspConsent&&(0,a.Z)(h,"regs.ext.us_privacy",r.uspConsent),f&&(h.site.page=f)}d.vc.getConfig("coppa")&&(0,a.Z)(h,"regs.coppa",1);var j={};j.s=e[0].params.siteId,j.v=s,j.ac="j",j.sd=1,8.1===s&&(j.nf=1);var z=r&&r.bidderCode||"ix",A=d.vc.getConfig(z),T=[],E=0,C=Object.keys(t),X="".concat(c).concat((0,i.Re)(g(g({},j),{},{r:JSON.stringify(h)}))).length;if(X>Z)return(0,i.H)("IX Bid Adapter: Base request size has exceeded maximum request size.",{bidder:w,code:B}),T;var D=X,F=0,M=!1;if(A){if("object"===v(A.firstPartyData)){var _=A.firstPartyData,H="?";for(var L in _)_.hasOwnProperty(L)&&(H+="".concat(encodeURIComponent(L),"=").concat(encodeURIComponent(_[L]),"&"));H=H.slice(0,-1),(F=encodeURIComponent(H).length)=Z||T.length>=4)return"break";for(var d=t[C[n]],s=d.missingCount,u=void 0===s?0:s,p=d.missingImps,f=void 0===p?[]:p,l=d.ixImps,m=!1,v=Z-D,b={ixImps:void 0===l?[]:l,missingBannerImpressions:f},x=Object.keys(b).map((function(e){return b[e]})).filter((function(e){return Array.isArray(e)})).reduce((function(e,r){return e.concat.apply(e,y(r))}),[]),I=encodeURIComponent(JSON.stringify({impressionObjects:x})).length;x.length&&I>v;)m=!0,x.pop(),I=encodeURIComponent(JSON.stringify({impressionObjects:x})).length;var O=t[C[n]].gpid,S=t[C[n]].dfp_ad_unit_code;if(x.length&&o.Mk in x[0]){var P=x[0],k={id:P.id,banner:{topframe:P.banner.topframe,format:x.map((function(e){var r=e.banner;return{w:r.w,h:r.h,ext:e.ext}}))}};(S||O)&&(k.ext={},k.ext.dfp_ad_unit_code=S,k.ext.gpid=O),"bidfloor"in x[0]&&(k.bidfloor=x[0].bidfloor),"bidfloorcur"in x[0]&&(k.bidfloorcur=x[0].bidfloorcur),h.imp.push(k),h.ext.ixdiag.msd+=u,h.ext.ixdiag.msi+=f.length}else{var z;x.forEach((function(e){return(0,a.Z)(e,"ext.gpid",O)})),(z=h.imp).push.apply(z,y(x))}D+=I;var A=r.ortb2||{};if(!(0,i.xb)(A)&&!M){h.ext.ixdiag.fpd=!0;var R=g({},A.site||A.context);Object.keys(R).forEach((function(e){-1===U.SITE.indexOf(e)&&delete R[e]}));var B=g({},A.user);Object.keys(B).forEach((function(e){-1===U.USER.indexOf(e)&&delete B[e]}));var F=(0,i.I8)(h);if(F.site=(0,i.Ee)({},F.site,R),F.user=(0,i.Ee)({},F.user,B),"".concat(c).concat((0,i.Re)(g(g({},j),{},{r:JSON.stringify(F)}))).length=k[0]&&g[1]>=k[1]))return(0,i.H)("IX Bid Adapter: ".concat(p," is an invalid size for IX outstream renderer")),!1}return!0},buildRequests:function(e,r){var t=[],i={},a={},d={},s={};for(var c in e.forEach((function(e){var r=Object.keys((0,n.Z)(e,"mediaTypes",{}));switch(function(e){return(0,n.Z)(e,"mediaTypes.video")&&$(e).video?o.pX:o.Mk}(e)){case o.Mk:se(e,s,i);break;case o.pX:de(e,a)}(0,p.q9)(r,o.Mk)&&(0,p.q9)(r,o.pX)&&(d[e.transactionId]=e)})),Object.keys(d).forEach((function(e){var r=d[e];i[e]||se(r,s,i),a[e]||de(r,a)})),s)if(s.hasOwnProperty(c)){var u=s[c].missingSizes;i.hasOwnProperty(c)||(i[c]={}),i[c].hasOwnProperty("missingImps")||(i[c].missingImps=[],i[c].missingCount=0);for(var f=s[c].impression,l=0;l0&&t.push.apply(t,y(ie(e,r,i,7.2))),Object.keys(a).length>0&&t.push.apply(t,y(ie(e,r,a,8.1))),t},interpretResponse:function(e,r){var t=[],a=null;if(!e.hasOwnProperty("body")||!e.body.hasOwnProperty("seatbid"))return t;for(var d=e.body,s=d.seatbid,c=0;c-1?[]:{}}t.d(r,{Z:function(){return n}})}},function(e){var r;r=5189,e(e.s=r)}]); /* Kargo */ (self.pbjsChunk=self.pbjsChunk||[]).push([[703],{4156:function(e,t,r){var n=r(9853),a=r(8962),i=r(1609),o=r(5849),c=r(8265);function d(){return d=Object.assign||function(e){for(var t=1;t0&&e[0].userId&&e[0].userId.tdid&&(r=e[0].userId.tdid);var s=d({},{sessionId:f._getSessionId(),requestCount:f._getRequestCount(),timeout:t.timeout,currency:o,cpmGranularity:1,timestamp:(new Date).getTime(),cpmRange:{floor:0,ceil:20},bidIDs:c,bidSizes:u,device:{width:window.screen.width,height:window.screen.height},prebidRawBidRequests:e},f._getAllMetadata(r,t.uspConsent,t.gdprConsent)),l=encodeURIComponent(JSON.stringify(s));return d({},t,{method:"GET",url:"".concat("https://krk.kargo.com","/api/v2/bid"),data:"json=".concat(l),currency:o})},interpretResponse:function(e,t){var r=e.body,n=[];for(var a in r){var i=r[a],o={mediaType:c.Mk};i.metadata&&i.metadata.landingPageDomain&&(o.clickUrl=i.metadata.landingPageDomain[0],o.advertiserDomains=i.metadata.landingPageDomain),i.mediaType&&p.includes(i.mediaType)&&(o.mediaType=i.mediaType);var d={requestId:a,cpm:Number(i.cpm),width:i.width,height:i.height,ttl:300,creativeId:i.id,dealId:i.targetingCustom,netRevenue:!0,currency:i.currency||t.currency,mediaType:o.mediaType,meta:o};o.mediaType==c.pX?d.vastXml=i.adm:d.ad=i.adm,n.push(d)}return n},getUserSyncs:function(e,t,r,n){var a=[],i=f._generateRandomUuid(),o=f._getClientId(),c=r&&r.gdprApplies?1:0,d=r&&r.consentString?r.consentString:"";if("string"==typeof n&&4==n.length&&1==n[0]&&"Y"==n[2])return a;if(e.iframeEnabled&&i&&o)for(var u=0;u<5;u++)a.push({type:"iframe",url:"https://crb.kargo.com/api/v1/initsyncrnd/{UUID}?seed={SEED}&idx={INDEX}&gdpr={GDPR}&gdpr_consent={GDPR_CONSENT}&us_privacy={US_PRIVACY}".replace("{UUID}",o).replace("{SEED}",i).replace("{INDEX}",u).replace("{GDPR}",c).replace("{GDPR_CONSENT}",d).replace("{US_PRIVACY}",n||"")});return a},supportedMediaTypes:p,onTimeout:function(e){var t=this;null!=e&&e.forEach((function(e){t._sendTimeoutData(e.auctionId,e.timeout)}))},_readCookie:function(e){if(!m.cookiesAreEnabled())return null;for(var t="".concat(e,"="),r=document.cookie.split(";"),n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0:!(!e.params.unit||!t)},buildRequests:function(e,t){if(0===e.length)return[];var n=[],a=function(e){return e.reduce((function(e,t){var n;return n=t,(0,r.Z)(n,"mediaTypes.video")&&!(0,r.Z)(n,"mediaTypes.banner")||n.mediaType===s.pX?e[0].push(t):e[1].push(t),e}),[[],[]])}(e),d=p(a,2),c=d[0],m=d[1];return m.length>0&&n.push(function(e,t){var n=[],a=!1,d=y(e,t),u=(0,i.HA)(e,(function(e){return e.params.unit}));d.aus=(0,i.HA)(e,(function(e){return(0,i.sF)(e.mediaTypes.banner.sizes).join(",")})).join("|"),d.divids=(0,i.HA)(e,(function(e){return encodeURIComponent(e.adUnitCode)})).join(","),d.aucs=(0,i.HA)(e,(function(e){var t=(0,r.Z)(e,"ortb2Imp.ext.data.pbadslot");return encodeURIComponent(t||"")})).join(","),u.some((function(e){return e}))&&(d.auid=u.join(","));e.some((function(e){return e.params.doNotTrack}))&&(d.ns=1);(!0===o.vc.getConfig("coppa")||e.some((function(e){return e.params.coppa})))&&(d.tfcd=1);e.forEach((function(e){if(e.params.customParams){var t=(0,i.HA)(Object.keys(e.params.customParams),(function(t){return function(e,t){var n=t[e];(0,i.kJ)(n)&&(n=n.join(","));return(e.toLowerCase()+"="+n.toLowerCase()).replace("+",".").replace("/","_")}(t,e.params.customParams)})),r=window.btoa(t.join("&"));a=!0,n.push(r)}else n.push("")})),a&&(d.tps=n.join(","));return I(d,s.Mk,e),{method:"GET",url:d.ph?"https://u.openx.net/w/1.0/arj":"https://".concat(e[0].params.delDomain,"/w/1.0/arj"),data:d,payload:{bids:e,startTime:new Date}}}(m,t)),c.length>0&&c.forEach((function(e){n.push(function(e,t){var n=function(e,t){var n,a,o=(0,r.Z)(e,"mediaTypes.video"),d=y([e],t),c=(0,r.Z)(e,"params.video")||{},p=(0,r.Z)(e,"mediaTypes.video.context"),m=(0,r.Z)(e,"mediaTypes.video.playerSize");(0,i.kJ)(e.sizes)&&2===e.sizes.length&&!(0,i.kJ)(e.sizes[0])?(n=parseInt(e.sizes[0],10),a=parseInt(e.sizes[1],10)):(0,i.kJ)(e.sizes)&&(0,i.kJ)(e.sizes[0])&&2===e.sizes[0].length?(n=parseInt(e.sizes[0][0],10),a=parseInt(e.sizes[0][1],10)):(0,i.kJ)(m)&&2===m.length&&(n=parseInt(m[0],10),a=parseInt(m[1],10));var l={w:n,h:a},h=e.params.video||e.params.openrtb||{};h.openrtb&&(h=h.openrtb);(0,i.kJ)(h.imp)&&(h=h.imp[0].video);Object.keys(h).filter((function(e){return(0,u.q9)(f,e)})).forEach((function(e){return l[e]=h[e]})),Object.keys(o).filter((function(e){return(0,u.q9)(f,e)})).forEach((function(e){return l[e]=o[e]}));var v={imp:[{video:l}]};d.openrtb=JSON.stringify(v),d.auid=e.params.unit,d.vwd=n||c.vwd,d.vht=a||c.vht,"outstream"===p&&(d.vos="101");c.mimes&&(d.vmimes=c.mimes);e.params.test&&(d.vtest=1);var b=(0,r.Z)(e,"ortb2Imp.ext.data.pbadslot");b&&(d.aucs=encodeURIComponent(b));return I(d,s.pX,[e]),d}(e,t);return{method:"GET",url:n.ph?"https://u.openx.net/v/1.0/avjp":"https://".concat(e.params.delDomain,"/v/1.0/avjp"),data:n,payload:{bid:e,startTime:new Date}}}(e,t))})),n},interpretResponse:function(e,t){var n=e.body,r=function(e){return/avjp$/.test(e.url)?s.pX:s.Mk}(t);return r===s.pX?function(e,t){var n=t.bid,r=(t.startTime,[]);if(void 0!==e&&""!==e.vastUrl&&e.pub_rev>0){var a=(0,i.en)(e.vastUrl).search||{},o={};o.requestId=n.bidId,e.deal_id&&(o.dealId=e.deal_id),o.ttl=300,o.netRevenue=!0,o.currency=e.currency,o.cpm=parseInt(e.pub_rev,10)/1e3,o.width=parseInt(e.width,10),o.height=parseInt(e.height,10),o.creativeId=e.adid,o.vastUrl=e.vastUrl,o.mediaType=s.pX,e.ph=a.ph,e.colo=a.colo,e.ts=a.ts,r.push(o)}return r}(n,t.payload):function(e,t){for(var n=t.bids,r=(t.startTime,e.ads.ad),i=[],a=0;a0?s.meta.advertiserDomains=o.adomain:s.meta.advertiserDomains=[],o.adv_id&&(s.meta.dspid=o.adv_id),i.push(s)}}return i}(n,t.payload)},getUserSyncs:function(e,t,n,i){if(e.iframeEnabled||e.pixelEnabled){var a=e.iframeEnabled?"iframe":"image",o=(0,r.Z)(t,"0.body.ads.pixels")||(0,r.Z)(t,"0.body.pixels")||function(e,t){var n="https://u.openx.net/w/1.0/pd",r=[];e&&(r.push("gdpr="+(e.gdprApplies?1:0)),r.push("gdpr_consent="+encodeURIComponent(e.consentString||"")));t&&r.push("us_privacy="+encodeURIComponent(t));return"".concat(n).concat(r.length>0?"?"+r.join("&"):"")}(n,i);return[{type:a,url:o}]}},transformBidParams:function(e,t){return(0,i.uh)({unit:"string",customFloor:"number"},e)}};function b(e){var t,n,r,i=window,a=document,o=a.documentElement;if(e){try{i=window.top,a=window.top.document}catch(e){return}o=a.documentElement,r=a.body,t=i.innerWidth||o.clientWidth||r.clientWidth,n=i.innerHeight||o.clientHeight||r.clientHeight}else o=a.documentElement,t=i.innerWidth||o.clientWidth,n=i.innerHeight||o.clientHeight;return"".concat(t,"x").concat(n)}function y(e,t){var n,d=(0,i.yL)();n={ju:t.refererInfo.page,ch:document.charSet||document.characterSet,res:"".concat(screen.width,"x").concat(screen.height,"x").concat(screen.colorDepth),ifr:d,tz:(new Date).getTimezoneOffset(),tws:b(d),be:1,bc:e[0].params.bc||"".concat("hb_pb","_").concat("3.0.3"),dddid:(0,i.HA)(e,(function(e){return e.transactionId})).join(","),nocache:(new Date).getTime()};var s=g("user.data",t.ortb2);s.length>0&&(n.sm=s);var u,c,p,m,l,f=g("site.content.data",t.ortb2);if(f.length>0&&(n.scsm=f),e[0].params.platform&&(n.ph=e[0].params.platform),t.gdprConsent){var v=t.gdprConsent;void 0!==v.consentString&&(n.gdpr_consent=v.consentString),void 0!==v.gdprApplies&&(n.gdpr=v.gdprApplies?1:0),"iab"===o.vc.getConfig("consentManagement.cmpApi")&&(n.x_gdpr_f=1)}return t&&t.uspConsent&&(n.us_privacy=t.uspConsent),(0,r.Z)(e[0],"crumbs.pubcid")&&(0,a.Z)(e[0],"userId.pubcid",(0,r.Z)(e[0],"crumbs.pubcid")),u=n,c=e[0].userId,(0,i.yi)(c,(function(e,t){var n=h[t];if(h.hasOwnProperty(t))switch(t){case"merkleId":case"uid2":u[n]=e.id;break;case"lipb":if(u[n]=e.lipbid,Array.isArray(e.segments)&&e.segments.length>0){var r="liveintent:"+e.segments.join("|");u.sm="".concat(u.sm?u.sm+",":"").concat(r)}break;case"parrableId":u[n]=e.eid;break;case"id5id":u[n]=e.uid;break;case"novatiq":u[n]=e.snowflake;break;default:u[n]=e}})),n=u,e[0].schain&&(n.schain=(p=e[0].schain,"".concat(p.ver,",").concat(p.complete,"!").concat((m=p.nodes,l=["asi","sid","hp","rid","name","domain"],m.map((function(e){return l.map((function(t){return e[t]||""})).join(",")})).join("!"))))),n}function g(e,t){var n=(0,r.Z)(t,e);if(!Array.isArray(n)||!n.length)return"";var i=n.filter((function(e){return Array.isArray(e.segment)&&e.segment.length>0&&void 0!==e.name&&e.name.length>0})).reduce((function(e,t){var n="object"===c(t.ext)&&t.ext.segtax?"".concat(t.name,"/").concat(t.ext.segtax):t.name;return e[n]=(e[n]||[]).concat(t.segment.map((function(e){return e.id}))),e}),{});return Object.keys(i).map((function(e,t){return e+":"+i[e].join("|")})).join(",")}function I(e,t,n){var r=[],i=!1;n.forEach((function(e){var n=function(e,t){var n={},r=o.vc.getConfig("currency.adServerCurrency")||"USD";"function"==typeof e.getFloor&&(n=e.getFloor({currency:r,mediaType:t,size:"*"}));var i=n.floor||e.params.customFloor||0;return Math.round(1e3*i)}(e,t);n?(r.push(n),i=!0):r.push(0)})),i&&(e.aumfs=r.join(","))}(0,d.dX)(v),window.pbjs.installedModules.push("openxBidAdapter")},4806:function(e,t,n){function r(e,t,n){t.split&&(t=t.split("."));for(var r,i=0,a=t.length,o=e;i-1?[]:{}}n.d(t,{Z:function(){return r}})}},function(e){var t;t=498,e(e.s=t)}]); /* OptimeraRTDProvider */ (self.pbjsChunk=self.pbjsChunk||[]).push([[112],{3763:function(t,i,e){var n,a,o=e(9853),r=e(2922),c=e(5755),s={},p="hb_deal_optimera",d="default",m={},u=!0;function l(){(0,o.PN)("Fetch Optimera score file."),(0,c.O)()(n,{success:function(t,i){if(200===i.status)try{!function(t){var i={};try{i=JSON.parse(t),"default"!==d&&i.device[d]&&(i=i.device[d]),(0,o.PN)(i),window.optimera=window.optimera||{},window.optimera.data=window.optimera.data||{},window.optimera.insights=window.optimera.insights||{},Object.keys(i).map((function(t){"insights"!==t&&(window.optimera.data[t]=i[t])})),i.insights&&(window.optimera.insights=i.insights)}catch(t){(0,o.H)("Optimera score file could not be parsed.")}m=i}(t)}catch(t){(0,o.H)("Unable to parse Optimera Score File.",t)}else 403===i.status&&(0,o.H)("Unable to fetch the Optimera Score File - 403")},error:function(){(0,o.H)("Unable to fetch the Optimera Score File.")}})}function f(){var t=window.location.host,i=window.location.pathname,e="".concat("https://dyv1bugovvq1g.cloudfront.net/").concat(a,"/").concat(t).concat(i,".js");n!==e?(n=e,u=!0):u=!1}var h={name:"optimeraRTD",onAuctionInitEvent:function(t,i,e){f(),u&&l()},getTargetingData:function(t,i){var e={};try{t.forEach((function(t){m[t]&&(e[t]={},e[t][p]=[m[t]])}))}catch(t){(0,o.H)("error",t)}return(0,o.PN)("Apply Optimera targeting"),e},init:function(t){return(s=t.params)&&s.clientID?(a=s.clientID,s.optimeraKeyName&&(p=s.optimeraKeyName),s.device&&(d=s.device),f(),l(),!0):(s.clientID||(0,o.H)("Optimera clientID is missing in the Optimera RTD configuration."),!1)}};(0,r.Bx)("realTimeData",h),window.pbjs.installedModules.push("optimeraRtdProvider")}},function(t){var i;i=3763,t(t.s=i)}]); /* PermutiveRTDProvider */ (self.pbjsChunk=self.pbjsChunk||[]).push([[365],{7691:function(r,n,t){var e=t(2528),a=t(2922),i=t(5849),o=t(9853),u=t(265),c=t(4806),s=t(1879);function p(r){return function(r){if(Array.isArray(r))return f(r)}(r)||function(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||function(r,n){if(!r)return;if("string"==typeof r)return f(r,n);var t=Object.prototype.toString.call(r).slice(8,-1);"Object"===t&&r.constructor&&(t=r.constructor.name);if("Map"===t||"Set"===t)return Array.from(r);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return f(r,n)}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(r,n){(null==n||n>r.length)&&(n=r.length);for(var t=0,e=new Array(n);t=1e6})).map(String),t=w("_ppam"),e=w("_pcrprs"),a={ac:[].concat(p(e),p(t),p(n)),rubicon:w("_prubicons"),appnexus:w("_papns"),gam:w("_pdfps")};for(var i in a)a[i]=a[i].slice(0,r);return a}function w(r){try{return JSON.parse(m.getDataFromLocalStorage(r)||"[]")}catch(r){return[]}}var x="_unknown_",Z={iab:function(r,n){return{name:r.name,ext:{segtax:n.segtax},segment:(r.segment||[]).map((function(r){return{id:(t=r.id,e=n.iabIds,e[t]||x)};var t,e})).filter((function(r){return r.id!==x}))}}};var S={name:d,getBidRequestData:function(r,n,t){y((function(){l(r,n,t)})),y((function(){var n;g(null===(n=r.ortb2Fragments)||void 0===n?void 0:n.bidder,t)}))},init:function(r,n){return!0}};(0,a.Bx)("realTimeData",S),window.pbjs.installedModules.push("permutiveRtdProvider")},4806:function(r,n,t){function e(r,n,t){n.split&&(n=n.split("."));for(var e,a=0,i=n.length,o=r;a-1?[]:{}}t.d(n,{Z:function(){return e}})}},function(r){var n;n=7691,r(r.s=n)}]); /* PrebidServer */ (self.pbjsChunk=self.pbjsChunk||[]).push([[30],{3146:function(e,t,r){var n=r(2801),i=r(1477),o=r(9853),s=r(265),a=r(4806),d=r(5644),c=r(8634),u=r(8962),p=r(8265),f=r(1609),l=r(2319),b=r(1879),v={appnexus:{adapter:"prebidServer",enabled:!0,endpoint:{p1Consent:"https://prebid.adnxs.com/pbs/v1/openrtb2/auction",noP1Consent:"https://prebid.adnxs-simple.com/pbs/v1/openrtb2/auction"},syncEndpoint:{p1Consent:"https://prebid.adnxs.com/pbs/v1/cookie_sync",noP1Consent:"https://prebid.adnxs-simple.com/pbs/v1/cookie_sync"},timeout:1e3},appnexuspsp:{adapter:"prebidServer",enabled:!0,endpoint:{p1Consent:"https://ib.adnxs.com/openrtb2/prebid",noP1Consent:"https://ib.adnxs-simple.com/openrtb2/prebid"},timeout:1e3},rubicon:{adapter:"prebidServer",enabled:!0,endpoint:{p1Consent:"https://prebid-server.rubiconproject.com/openrtb2/auction",noP1Consent:"https://prebid-server.rubiconproject.com/openrtb2/auction"},syncEndpoint:{p1Consent:"https://prebid-server.rubiconproject.com/cookie_sync",noP1Consent:"https://prebid-server.rubiconproject.com/cookie_sync"},timeout:500},openx:{adapter:"prebidServer",enabled:!0,endpoint:{p1Consent:"https://prebid.openx.net/openrtb2/auction",noP1Consent:"https://prebid.openx.net/openrtb2/auction"},syncEndpoint:{p1Consent:"https://prebid.openx.net/cookie_sync",noP1Consent:"https://prebid.openx.net/cookie_sync"},timeout:1e3}},h=r(5755),m=r(2922),y=r(2528),g=r(2455);function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0)return!1}(t);if(!1!==a)return Array.isArray(t.bidders)&&(i[n].bidders=t.bidders.filter((function(e){return-1===r.indexOf(e)&&(r.push(e),!0)}))),!0}return(0,o.yN)("prebidServer: s2s config is disabled"),!1}))?I=t:void 0}}function R(e,t,r,n){if(I.length!==E){E++;var i={uuid:(0,o.DO)(),bidders:e,account:n.accountId},s=n.userSyncLimit;(0,o.hj)(s)&&s>0&&(i.limit=s),t&&(i.gdpr=t.gdprApplies?1:0,!1!==t.gdprApplies&&(i.gdpr_consent=t.consentString)),r&&(i.us_privacy=r),"boolean"==typeof n.coopSync&&(i.coopSync=n.coopSync);var a=JSON.stringify(i);(0,h.h)(F(n.syncEndpoint,t),(function(e){try{A((e=JSON.parse(e)).bidder_status,n)}catch(e){(0,o.H)(e)}}),a,{contentType:"text/plain",withCredentials:!0})}}function A(e,t){if(0!==e.length){var r=e.shift();r.no_cookie?function(e,t,r,n,i){i.syncUrlModifier&&"function"==typeof i.syncUrlModifier[r]&&(t=i.syncUrlModifier[r](e,t,r));!function(e,t,r,n,i){t?"image"===e||"redirect"===e?((0,o.ji)('Invoking image pixel user sync for bidder: "'.concat(r,'"')),(0,o.hq)(t,n,i)):"iframe"===e?((0,o.ji)('Invoking iframe user sync for bidder: "'.concat(r,'"')),(0,o.Vs)(t,n,i)):((0,o.H)('User sync type "'.concat(e,'" not supported for bidder: "').concat(r,'"')),n()):((0,o.H)('No sync url for bidder "'.concat(r,'": ').concat(t)),n())}(e,t,r,n,i.syncTimeout)}(r.usersync.type,r.usersync.url,r.bidder,o.ak.call(A,null,e,t),t):A(e,t)}}u.vc.setDefaults({s2sConfig:_}),Z("s2sConfig",(function(e){return q(e.s2sConfig)}));var U={sponsoredBy:1,body:2,rating:3,likes:4,downloads:5,price:6,salePrice:7,phone:8,address:9,body2:10,cta:12},T=Object.keys(U),H={icon:1,image:3},N={img:1,js:2};[U,H,{impression:1,"viewable-mrc50":2,"viewable-mrc100":3,"viewable-video50":4},N].forEach((function(e){Object.keys(e).forEach((function(t){e[e[t]]=t}))}));var D={},z={};function M(e,t,r,n){this.s2sBidRequest=e,this.bidderRequests=t,this.adUnits=r,this.s2sConfig=e.s2sConfig,this.requestedBidders=n,this.bidIdMap={},this.adUnitsByImp={},this.impRequested={},this.auctionId=t.map((function(e){return e.auctionId})).reduce((function(e,t){return(null==e||e===t)&&t})),this.requestTimestamp=(0,o.AB)()}function J(e){var t,r,n=function(e,t){if([e,t].every(o.d8))return z["".concat(e).concat(t)]}(e.auctionId,e.adId);(0,o.d8)(n)&&((0,o.ji)('Invoking image pixel for wurl on BID_WIN: "'.concat(n,'"')),(0,o.hq)(n),t=e.auctionId,r=e.adId,[t,r].every(o.d8)&&(z["".concat(t).concat(r)]=void 0))}function F(e,t){return(0,g.h)(t)?e.p1Consent:e.noP1Consent}function X(e){var t,r;return Array.isArray(e)&&e.length>0&&(t=e[0].gdprConsent,r=e[0].uspConsent),{gdprConsent:t,uspConsent:r}}O(M.prototype,{buildRequest:function(){var e,t,r=this,n=this.s2sBidRequest,i=this.bidderRequests,d=this.adUnits,p=this.s2sConfig,f=this.requestedBidders,l=[],v={},h=i[0],m=new Set;if(d.forEach((function(e){e.bids.forEach((function(t){null!=t.mediaTypes&&(0,o.yN)("Prebid Server adapter does not (yet) support bidder-specific mediaTypes for the same adUnit. Size mapping configuration will be ignored for adUnit: ".concat(e.code,", bidder: ").concat(t.bidder))}));for(var t=e.code,n=1;m.has(t);)n++,t="".concat(e.code,"-").concat(n);m.add(t),r.adUnitsByImp[t]=e;var d,f=e.nativeParams;if(f){var b=-1;try{d=D[t]=Object.keys(f).reduce((function(e,t){var r=f[t];function n(e){return b++,O({required:r.required?1:0,id:(0,o.hj)(r.id)?b=r.id:b},e?(0,o.fz)(e):{})}switch(t){case"image":case"icon":var i=H[t],a=(0,o.fz)({type:i,w:(0,s.Z)(r,"sizes.0"),h:(0,s.Z)(r,"sizes.1"),wmin:(0,s.Z)(r,"aspect_ratios.0.min_width"),hmin:(0,s.Z)(r,"aspect_ratios.0.min_height")});if(!(a.w&&a.h||a.hmin&&a.wmin))throw"invalid img sizes (must provide sizes or min_height & min_width if using aspect_ratios)";if(Array.isArray(r.aspect_ratios)){var d=r.aspect_ratios.filter((function(e){return e.ratio_width&&e.ratio_height})).map((function(e){return"".concat(e.ratio_width,":").concat(e.ratio_height)}));d.length>0&&(a.ext={aspectratios:d})}e.push(n({img:a}));break;case"title":if(!r.len)throw"invalid title.len";e.push(n({title:{len:r.len}}));break;default:var c=U[t];c&&e.push(n({data:{type:c,len:r.len}}))}return e}),[])}catch(e){(0,o.H)("error creating native request: "+String(e))}}var h=(0,s.Z)(e,"mediaTypes.video"),g=(0,s.Z)(e,"mediaTypes.banner");e.bids.forEach((function(e){if(r.setBidRequestId(t,e.bidder,e.bid_id),c.ZP.aliasRegistry[e.bidder]){var n=c.ZP.bidderRegistry[e.bidder];n&&!n.getSpec().skipPbsAliasing&&(v[e.bidder]=c.ZP.aliasRegistry[e.bidder])}}));var C={};if(g&&g.sizes){var w=(0,o.sF)(g.sizes).map((function(e){var t=j(e.split("x"),2),r=t[0],n=t[1];return{w:parseInt(r,10),h:parseInt(n,10)}}));C.banner={format:w},g.pos&&(C.banner.pos=g.pos)}if((0,o.xb)(h)||("outstream"!==h.context||h.renderer||e.renderer?("instream"!==h.context||h.hasOwnProperty("placement")||(h.placement=1),C.video=Object.keys(h).filter((function(e){return"context"!==e})).reduce((function(e,t){return"playerSize"===t?(e.w=(0,s.Z)(h,"".concat(t,".0.0")),e.h=(0,s.Z)(h,"".concat(t,".0.1"))):e[t]=h[t],e}),{})):(0,o.H)("Outstream bid without renderer cannot be sent to Prebid Server.")),d)try{C.native={request:JSON.stringify({context:1,plcmttype:1,eventtrackers:[{event:1,methods:[1]}],assets:d}),ver:"1.2"}}catch(e){(0,o.H)("error creating native request: "+String(e))}var P=e.bids.reduce((function(t,r){if(null==r.bidder)return t;var n=c.ZP.bidderRegistry[r.bidder];return n&&n.getSpec().transformBidParams&&(r.params=n.getSpec().transformBidParams(r.params,!0,e,i)),(0,a.Z)(t,"prebid.bidder.".concat(r.bidder),p.adapterOptions&&p.adapterOptions[r.bidder]?O({},r.params,p.adapterOptions[r.bidder]):r.params),t}),x({},(0,s.Z)(e,"ortb2Imp.ext"))),S=x(x({},e.ortb2Imp),{},{id:t,ext:P,secure:p.secure}),I=x({},(0,s.Z)(e,"ortb2Imp.ext.data"));Object.keys(I).forEach((function(e){"pbadslot"===e?"string"==typeof I[e]&&I[e]?(0,a.Z)(S,"ext.data.pbadslot",I[e]):delete S.ext.data.pbadslot:"adserver"===e?["name","adslot"].forEach((function(e){var t=(0,s.Z)(I,"adserver.".concat(e));"string"==typeof t&&t&&(0,a.Z)(S,"ext.data.adserver.".concat(e.toLowerCase()),t)})):(0,a.Z)(S,"ext.data.".concat(e),I[e])})),(0,o.Ee)(S,C);var k,Z,B=(k="function"!=typeof(0,y.R)().convertCurrency?function(e){return e}:function(e,t,r){if(t===r)return e;var n=null;try{n=(0,y.R)().convertCurrency(e,t,r)}catch(e){}return n},Z=u.vc.getConfig("currency.adServerCurrency")||"USD",e.bids.map((function(e){return r.getBidRequest(S.id,e.bidder)})).map((function(e){if(e&&"function"==typeof e.getFloor)try{var t=e.getFloor({currency:Z}),r=t.currency,n=t.floor;return{currency:r,floor:parseFloat(n)}}catch(e){(0,o.H)("PBS: getFloor threw an error: ",e)}})).reduce((function(e,t){if((null==t||null==t.currency||null==t.floor||isNaN(t.floor))&&(e.min=null),null===e.min)return e;if(null==e.ref)e.ref=e.min=t;else{var r=k(t.floor,t.currency,e.ref.currency);null!=r&&r0&&(0,a.Z)(g,"user.ext.eids",P),(0,o.kJ)(k)&&k.length>0&&(f&&(0,o.kJ)(f)&&k.forEach((function(e){e.bidders&&(e.bidders=e.bidders.filter((function(e){return(0,b.q9)(f,e)})))})),(0,a.Z)(g,"ext.prebid.data.eidpermissions",k));var I=u.vc.getConfig("multibid");if(I&&(0,a.Z)(g,"ext.prebid.multibid",I.reduce((function(e,t){var r={};return Object.keys(t).forEach((function(e){r[e.toLowerCase()]=t[e]})),e.push(r),e}),[])),i){var B;if(h.gdprConsent)"boolean"==typeof h.gdprConsent.gdprApplies&&(B=h.gdprConsent.gdprApplies?1:0),(0,a.Z)(g,"regs.ext.gdpr",B),(0,a.Z)(g,"user.ext.consent",h.gdprConsent.consentString),h.gdprConsent.addtlConsent&&"string"==typeof h.gdprConsent.addtlConsent&&(0,a.Z)(g,"user.ext.ConsentedProvidersSettings.consented_providers",h.gdprConsent.addtlConsent);h.uspConsent&&(0,a.Z)(g,"regs.ext.us_privacy",h.uspConsent)}!0===Z("coppa")&&(0,a.Z)(g,"regs.coppa",1);var E=(null===(e=n.ortb2Fragments)||void 0===e?void 0:e.global)||{};return(0,o.Ee)(g,E),function(e,t){var r=Object.entries(t).reduce((function(e,t){var r=j(t,2),n=r[0],i=r[1],s=(0,o.Ee)({},i);return e.push({bidders:[n],config:{ortb2:s}}),e}),[]);r.length&&(0,a.Z)(e,"ext.prebid.bidderconfig",r)}(g,(null===(t=n.ortb2Fragments)||void 0===t?void 0:t.bidder)||{}),g.imp.forEach((function(e){return r.impRequested[e.id]=e})),g}(0,o.H)("Request to Prebid Server rejected due to invalid media type(s) in adUnit.")},interpretResponse:function(e){var t=this,r=this.bidderRequests,n=this.s2sConfig,a=[];return[["errors","serverErrors"],["responsetimemillis","serverResponseTimeMs"]].forEach((function(t){return function(e,t,r,n){var i=(0,s.Z)(t,"ext.".concat(r));i&&Object.keys(i).forEach((function(t){var r=(0,b.sE)(e,(function(e){return e.bidderCode===t}));r&&(r[n]=i[t])}))}(r,e,t[0],t[1])})),e.seatbid&&e.seatbid.forEach((function(r){(r.bid||[]).forEach((function(c){var u=t.getBidRequest(c.impid,r.seat);if(null==u){if(!n.allowUnknownBidderCodes)return void(0,o.yN)("PBS adapter received bid from unknown bidder (".concat(r.seat,"), but 's2sConfig.allowUnknownBidderCodes' is not set. Ignoring bid."));u=t.getBidRequest(c.impid,null)}var f=c.price,l=0!==f?d.Q_.Q:d.Q_.H,b=(0,i.m)(l,{bidder:r.seat,src:B,bidId:u?u.bidId||u.bid_Id:null,transactionId:t.adUnitsByImp[c.impid].transactionId,auctionId:t.auctionId});b.requestTimestamp=t.requestTimestamp,b.cpm=f;var v=(0,s.Z)(e,["ext","responsetimemillis",r.seat].join("."));u&&v&&(u.serverResponseTimeMs=v);var h,m,y,g=(0,s.Z)(c,"ext.prebid.bidid");(0,o.d8)(g)&&(b.pbsBidId=g),(0,o.d8)((0,s.Z)(c,"ext.prebid.events.win"))&&(h=t.auctionId,m=b.adId,y=(0,s.Z)(c,"ext.prebid.events.win"),[h,m].every(o.d8)&&(z["".concat(h).concat(m)]=y));var C=(0,s.Z)(c,"ext.prebid.targeting");if((0,o.PO)(C)&&((0,o.d8)((0,s.Z)(c,"ext.prebid.events.win"))&&(C=(0,o.iG)(C,Object.keys(C).filter((function(e){return-1===e.indexOf("hb_winurl")&&-1===e.indexOf("hb_bidid")})))),b.adserverTargeting=C),b.seatBidId=c.id,(0,s.Z)(c,"ext.prebid.type")===p.pX){b.mediaType=p.pX;var x=t.impRequested[c.impid],O=[x.video.w,x.video.h];b.playerWidth=O[0],b.playerHeight=O[1],c.ext.prebid.cache&&"object"===S(c.ext.prebid.cache.vastXml)&&c.ext.prebid.cache.vastXml.cacheId&&c.ext.prebid.cache.vastXml.url?(b.videoCacheKey=c.ext.prebid.cache.vastXml.cacheId,b.vastUrl=c.ext.prebid.cache.vastXml.url):C&&C.hb_uuid&&C.hb_cache_host&&C.hb_cache_path&&(b.videoCacheKey=C.hb_uuid,b.vastUrl="https://".concat(C.hb_cache_host).concat(C.hb_cache_path,"?uuid=").concat(C.hb_uuid)),c.adm&&(b.vastXml=c.adm),!b.vastUrl&&c.nurl&&(b.vastUrl=c.nurl)}else if((0,s.Z)(c,"ext.prebid.type")===p.B5){var j,P;b.mediaType=p.B5,P="string"==typeof c.adm?b.adm=JSON.parse(c.adm):b.adm=c.adm;var I=(w(j={},N.img,P.imptrackers||[]),w(j,N.js,P.jstracker?[P.jstracker]:[]),j);if(P.eventtrackers&&P.eventtrackers.forEach((function(e){switch(e.method){case N.img:I[N.img].push(e.url);break;case N.js:I[N.js].push(e.url)}})),(0,o.PO)(P)&&Array.isArray(P.assets)){var k=D[c.impid];b.native=(0,o.fz)(P.assets.reduce((function(e,t){var r=k[t.id];return(0,o.PO)(t.img)?e[r.img.type?H[r.img.type]:"image"]=(0,o.ei)(t.img,["url","w as width","h as height"]):(0,o.PO)(t.title)?e.title=t.title.text:(0,o.PO)(t.data)&&T.forEach((function(n){U[n]===r.data.type&&(e[n]=t.data.value)})),e}),(0,o.fz)({clickUrl:P.link,clickTrackers:(0,s.Z)(P,"link.clicktrackers"),impressionTrackers:I[N.img],javascriptTrackers:I[N.js]})))}else(0,o.H)("prebid server native response contained no assets")}else c.adm&&c.nurl?(b.ad=c.adm,b.ad+=(0,o.SG)(decodeURIComponent(c.nurl))):c.adm?b.ad=c.adm:c.nurl&&(b.adUrl=c.nurl);b.width=c.w,b.height=c.h,c.dealid&&(b.dealId=c.dealid),b.creative_id=c.crid,b.creativeId=c.crid,c.burl&&(b.burl=c.burl),b.currency=e.cur?e.cur:"USD",b.meta={};var Z=(0,s.Z)(c,"ext.prebid.meta");Z&&(0,o.PO)(Z)&&(b.meta=(0,o.I8)(Z)),c.adomain&&(b.meta.advertiserDomains=c.adomain);var E=n.defaultTtl||60;b.ttl=c.exp?c.exp:E,b.netRevenue=!c.netRevenue||c.netRevenue,a.push({adUnit:t.adUnitsByImp[c.impid].code,bid:b})}))})),a},setBidRequestId:function(e,t,r){this.bidIdMap[this.impBidderKey(e,t)]=r},getBidRequest:function(e,t){var r=this.impBidderKey(e,t);return this.bidIdMap[r]&&(0,o.zE)(this.bidIdMap[r],this.bidderRequests)},impBidderKey:function(e,t){return"".concat(e).concat(t)}});var K=(0,m.z3)("sync",(function(e,t,r,n){var i=n.onResponse,s=n.onError,a=n.onBid,d=X(t).gdprConsent,c=(0,o.I8)(e.ad_units),u=c.map((function(e){return e.bids.map((function(e){return e.bidder})).filter(o.tT)})).reduce(o.xH,[]).filter(o.tT),p=new M(e,t,c,u),f=p.buildRequest(),l=f&&JSON.stringify(f);(0,o.PN)("BidRequest: "+l);var v=F(e.s2sConfig.endpoint,d);f&&l&&v?r(v,{success:function(e){var t;try{t=JSON.parse(e),p.interpretResponse(t).forEach(a)}catch(e){(0,o.H)(e)}!t||t.status&&(0,b.q9)(t.status,"Error")?((0,o.H)("error parsing response: ",t?t.status:"not valid JSON"),i(!1,u)):i(!0,u)},error:s},l,{contentType:"text/plain",withCredentials:!0}):(0,o.H)("PBS request not made. Check endpoints.")}),"processPBSRequest");(0,o.EE)().setEidPermissions=function(e){k=e},c.ZP.registerBidAdapter(new function(){var e=new n.Z("prebidServer");return e.callBids=function(e,t,r,n,i){var s=X(t),a=s.gdprConsent,p=s.uspConsent;if(Array.isArray(I)){if(e.s2sConfig&&e.s2sConfig.syncEndpoint&&F(e.s2sConfig.syncEndpoint,a))R(e.s2sConfig.bidders.map((function(e){return c.ZP.aliasRegistry[e]||e})).filter((function(e,t,r){return r.indexOf(e)===t})),a,p,e.s2sConfig);K(e,t,i,{onResponse:function(e,r){e&&t.forEach((function(e){return l.j8(d.FP.BIDDER_DONE,e)})),n(),function(e,t,r){e.forEach((function(e){var n=c.ZP.getBidAdapter(e);n&&n.registerSyncs&&u.vc.runWithBidder(e,o.ak.call(n.registerSyncs,n,[],t,r))}))}(r,a,p)},onError:n,onBid:function(e){var t=e.adUnit,n=e.bid;(0,f.JY)(t,n)&&r(t,n)}})}},l.on(d.FP.BID_WON,J),O(this,{callBids:e.callBids,setBidderCode:e.setBidderCode,type:B})},"prebidServer"),window.pbjs.installedModules.push("prebidServerBidAdapter")},2455:function(e,t,r){r.d(t,{h:function(){return i}});var n=r(265);function i(e){return null==e||!e.gdprApplies||!0===(0,n.Z)(e,"vendorData.purpose.consents.1")}},4806:function(e,t,r){function n(e,t,r){t.split&&(t=t.split("."));for(var n,i=0,o=t.length,s=e;i-1?[]:{}}r.d(t,{Z:function(){return n}})}},function(e){var t;t=3146,e(e.s=t)}]); /* Pubmatic */ (self.pbjsChunk=self.pbjsChunk||[]).push([[126],{8139:function(e,r,t){var a=t(9853),i=t(265),n=t(4806),s=t(1609),o=t(8265),d=t(8962),p=t(4877),c=t(9624);function u(){return u=Object.assign||function(e){for(var r=1;r1){if(2!=(i=i[1].split("x")).length)return void(0,a.yN)("PubMatic: AdSlot Error: adSlot not in required format");e.params.width=parseInt(i[0],10),e.params.height=parseInt(i[1],10)}else if(e.hasOwnProperty("mediaTypes")&&e.mediaTypes.hasOwnProperty(o.Mk)&&e.mediaTypes.banner.hasOwnProperty("sizes")){for(var n=0,s=[];n=1&&(e.params.width=e.mediaTypes.banner.sizes[0][0],e.params.height=e.mediaTypes.banner.sizes[0][1],e.mediaTypes.banner.sizes=e.mediaTypes.banner.sizes.splice(1,e.mediaTypes.banner.sizes.length-1))}}function q(e,r,t){var i,n="Ignoring param key: "+e+", expects "+t+", found "+f(r);switch(t){case P:i=a.jn;break;case I:i=a.hj;break;case w:i=a.d8;break;case O:i=a.kJ}return i(r)?r:((0,a.yN)(b+n),y)}function L(e,r){var t=e.KEY;return{id:e.ID,required:r[t].required?1:0,data:{type:e.TYPE,len:r[t].len,ext:r[t].ext}}}function B(e){var r={assets:[]};for(var t in e){if(e.hasOwnProperty(t)){var i={};if(!(r.assets&&r.assets.length>0&&r.assets.hasOwnProperty(t)))switch(t){case D.TITLE.KEY:e[t].len||e[t].length?i={id:D.TITLE.ID,required:e[t].required?1:0,title:{len:e[t].len||e[t].length,ext:e[t].ext}}:(0,a.yN)("PubMatic: Error: Title Length is required for native ad: "+JSON.stringify(e));break;case D.IMAGE.KEY:e[t].sizes&&e[t].sizes.length>0?i={id:D.IMAGE.ID,required:e[t].required?1:0,img:{type:S,w:e[t].w||e[t].width||(e[t].sizes?e[t].sizes[0]:y),h:e[t].h||e[t].height||(e[t].sizes?e[t].sizes[1]:y),wmin:e[t].wmin||e[t].minimumWidth||(e[t].minsizes?e[t].minsizes[0]:y),hmin:e[t].hmin||e[t].minimumHeight||(e[t].minsizes?e[t].minsizes[1]:y),mimes:e[t].mimes,ext:e[t].ext}}:(0,a.yN)("PubMatic: Error: Image sizes is required for native ad: "+JSON.stringify(e));break;case D.ICON.KEY:e[t].sizes&&e[t].sizes.length>0?i={id:D.ICON.ID,required:e[t].required?1:0,img:{type:x,w:e[t].w||e[t].width||(e[t].sizes?e[t].sizes[0]:y),h:e[t].h||e[t].height||(e[t].sizes?e[t].sizes[1]:y)}}:(0,a.yN)("PubMatic: Error: Icon sizes is required for native ad: "+JSON.stringify(e));break;case D.VIDEO.KEY:i={id:D.VIDEO.ID,required:e[t].required?1:0,video:{minduration:e[t].minduration,maxduration:e[t].maxduration,protocols:e[t].protocols,mimes:e[t].mimes,ext:e[t].ext}};break;case D.EXT.KEY:i={id:D.EXT.ID,required:e[t].required?1:0};break;case D.LOGO.KEY:i={id:D.LOGO.ID,required:e[t].required?1:0,img:{type:k,w:e[t].w||e[t].width||(e[t].sizes?e[t].sizes[0]:y),h:e[t].h||e[t].height||(e[t].sizes?e[t].sizes[1]:y)}};break;case D.SPONSOREDBY.KEY:case D.BODY.KEY:case D.RATING.KEY:case D.LIKES.KEY:case D.DOWNLOADS.KEY:case D.PRICE.KEY:case D.SALEPRICE.KEY:case D.PHONE.KEY:case D.ADDRESS.KEY:case D.DESC2.KEY:case D.DISPLAYURL.KEY:case D.CTA.KEY:i=L(A[t],e)}}i&&i.id&&(r.assets[r.assets.length]=i)}var n=N.length,s=0;return N.forEach((function(e){for(var t=r.assets.length,a=0;a0&&(i=[],t.forEach((function(e){e.length>1&&i.push({w:e[0],h:e[1]})})),i.length>0&&(r.format=i)),r.pos=0,r.topframe=(0,a.yL)()?0:1}else(0,a.yN)("PubMatic: Error: mediaTypes.banner.size missing for adunit: "+e.params.adUnit+". Ignoring the banner impression in the adunit."),r=y;return r}function X(e){var r,t=(0,a.Ee)((0,i.Z)(e.mediaTypes,"video"),e.params.video);if(t!==y){for(var n in r={},function(e,r){(0,i.Z)(e,"placement")||(0,a.yN)("Video.Placement param missing for "+r)}(t,e.adUnitCode),T)t.hasOwnProperty(n)&&(r[n]=q(n,t[n],T[n]));(0,a.kJ)(e.mediaTypes.video.playerSize[0])?(r.w=parseInt(e.mediaTypes.video.playerSize[0][0],10),r.h=parseInt(e.mediaTypes.video.playerSize[0][1],10)):(0,a.hj)(e.mediaTypes.video.playerSize[0])&&(r.w=parseInt(e.mediaTypes.video.playerSize[0],10),r.h=parseInt(e.mediaTypes.video.playerSize[1],10))}else r=y,(0,a.yN)("PubMatic: Error: Video config params missing for adunit: "+e.params.adUnit+" with mediaType set as video. Ignoring video impression in the adunit.");return r}function _(e,r,t){var a=r.rtd&&r.rtd.jwplayer&&r.rtd.jwplayer.targeting||void 0,i="";if(void 0!==a&&""!==a&&a.hasOwnProperty("segments")){var n,s=a.segments.length;i+="jw-id="+a.content.id;for(var o=0;o3?(e.pmp||(e.pmp={private_auction:0,deals:[]}),e.pmp.deals.push({id:r})):(0,a.yN)("PubMatic: Error: deal-id present in array bid.params.deals should be a strings with more than 3 charaters length, deal-id ignored: "+r)})):(0,a.yN)("PubMatic: Error: bid.params.deals should be an array of strings."))}(p={id:e.bidId,tagid:e.params.adUnit||void 0,bidfloor:j("kadfloor",e.params.kadfloor),secure:1,ext:{pmZoneId:j("pmzoneid",e.params.pmzoneid)},bidfloorcur:e.params.currency?j("currency",e.params.currency):g},e),function(e,r){var t,i="";if(r.params.dctr)if(i=r.params.dctr,(0,a.d8)(i)&&i.length>0){var n=i.split("|");i="",n.forEach((function(e){i+=e.length>0?e.trim()+"|":""})),t=i.length,"|"===i.substring(t,t-1)&&(i=i.substring(0,t-1)),e.ext.key_val=i.trim()}else(0,a.yN)("PubMatic: Ignoring param : dctr with value : "+i+", expects string-value, found empty or non-string value")}(p,e),_(p,e),e.hasOwnProperty("mediaTypes"))for(h in e.mediaTypes)switch(h){case o.Mk:(t=J(e))!==y&&(p.banner=t);break;case o.B5:c.request=JSON.stringify(B(e.nativeParams)),z?(0,a.yN)("PubMatic: Error: Error in Native adunit "+e.params.adUnit+". Ignoring the adunit. Refer to http://prebid.org/dev-docs/show-native-ads.html for more details."):p.native=c;break;case o.pX:(s=X(e))!==y&&(p.video=s)}else t={pos:0,w:e.params.width,h:e.params.height,topframe:(0,a.yL)()?0:1},(0,a.kJ)(u)&&u.length>1&&((u=u.splice(1,u.length-1)).forEach((function(e){v.push({w:e[0],h:e[1]})})),t.format=v),p.banner=t;return function(e,r){var t=function(e){for(var r=1;r0?t:y,(0,a.PN)(b,"new impObj.bidfloor value:",e.bidfloor)}(p,e),p.hasOwnProperty(o.Mk)||p.hasOwnProperty(o.B5)||p.hasOwnProperty(o.pX)?p:y}function G(e,r){(r=r.filter((function(e){return"string"==typeof e||((0,a.yN)("PubMatic: acat: Each category should be a string, ignoring category: "+e),!1)})).map((function(e){return e.trim()})).filter((function(e,r,t){return t.indexOf(e)===r}))).length>0&&((0,a.yN)("PubMatic: acat: Selected: ",r),e.ext.acat=r)}function F(e){return!0===(0,a.kJ)(e)&&e.length>0}(0,a.yi)(D,(function(e){K[e.ID]=e.KEY})),(0,a.yi)(D,(function(e){A[e.KEY]=e}));var V={code:h,gvlid:76,supportedMediaTypes:[o.Mk,o.pX,o.B5],isBidRequestValid:function(e){if(e&&e.params){if(!(0,a.d8)(e.params.publisherId))return(0,a.yN)("PubMatic: Error: publisherId is mandatory and cannot be numeric (wrap it in quotes in your config). Call to OpenBid will not be sent for ad unit: "+JSON.stringify(e)),!1;if(e.hasOwnProperty("mediaTypes")&&e.mediaTypes.hasOwnProperty(o.pX)){var r=(0,i.Z)(e.mediaTypes,"video.mimes"),t=(0,i.Z)(e,"params.video.mimes");if(!1===F(r)&&!1===F(t))return(0,a.yN)("PubMatic: Error: For video ads, bid.mediaTypes.video.mimes OR bid.params.video.mimes should be present and must be a non-empty array. Call to OpenBid will not be sent for ad unit:"+JSON.stringify(e)),!1;if(!e.mediaTypes[o.pX].hasOwnProperty("context"))return(0,a.H)("".concat(b,": no context specified in bid. Rejecting bid: "),e),!1;if("outstream"===e.mediaTypes[o.pX].context&&!(0,a.d8)(e.params.outstreamAU)&&!e.hasOwnProperty("renderer")&&!e.mediaTypes[o.pX].hasOwnProperty("renderer"))return e.mediaTypes.hasOwnProperty(o.Mk)||e.mediaTypes.hasOwnProperty(o.B5)?(delete e.mediaTypes[o.pX],(0,a.yN)("".concat(b,': for "outstream" bids either outstreamAU parameter must be provided or ad unit supplied renderer is required. Rejecting mediatype Video of bid: '),e),!0):((0,a.H)("".concat(b,': for "outstream" bids either outstreamAU parameter must be provided or ad unit supplied renderer is required. Rejecting bid: '),e),!1)}return!0}return!1},buildRequests:function(e,r){var t,s,p,l,m;r&&r.refererInfo&&(m=r.refererInfo);var h,b=function(e){return{pageURL:(null==e?void 0:e.page)||window.location.href,refURL:(null==e?void 0:e.ref)||window.document.referrer}}(m),v=function(e){return{id:""+(new Date).getTime(),at:1,cur:[g],imp:[],site:{page:e.pageURL,ref:e.refURL,publisher:{}},device:{ua:navigator.userAgent,js:1,dnt:"yes"==navigator.doNotTrack||"1"==navigator.doNotTrack||"1"==navigator.msDoNotTrack?1:0,h:screen.height,w:screen.width,language:navigator.language},user:{},ext:{}}}(b),I="",w=[],P=[],O=[];if(e.forEach((function(e){if((h=(0,a.I8)(e)).params.adSlot=h.params.adSlot||"",U(h),h.mediaTypes&&h.mediaTypes.hasOwnProperty("video")||h.params.hasOwnProperty("video"));else if(!(h.hasOwnProperty("mediaTypes")&&h.mediaTypes.hasOwnProperty(o.B5)||0!==h.params.width||0!==h.params.height))return void(0,a.yN)("PubMatic: Skipping the non-standard adslot: ",h.params.adSlot,JSON.stringify(h));b.pubId=b.pubId||h.params.publisherId,(b=function(e,r){var t,i,n;for(t in r.kadpageurl||(r.kadpageurl=r.pageURL),E)E.hasOwnProperty(t)&&(i=e[t])&&("object"===f(n=E[t])&&(i=n.f(i,r)),(0,a.d8)(i)?r[t]=i:(0,a.yN)("PubMatic: Ignoring param : "+t+" with value : "+E[t]+", expects string-value, found "+f(i)));return r}(h.params,b)).transactionId=h.transactionId,""===I?I=h.params.currency||y:h.params.hasOwnProperty("currency")&&I!==h.params.currency&&(0,a.yN)("PubMatic: Currency specifier ignored. Only one currency permitted."),h.params.currency=I,h.params.hasOwnProperty("dctr")&&(0,a.d8)(h.params.dctr)&&w.push(h.params.dctr),h.params.hasOwnProperty("bcat")&&(0,a.kJ)(h.params.bcat)&&(P=P.concat(h.params.bcat)),h.params.hasOwnProperty("acat")&&(0,a.kJ)(h.params.acat)&&(O=O.concat(h.params.acat));var r=Z(h);r&&v.imp.push(r)})),0!=v.imp.length){var T,D;v.site.publisher.id=b.pubId.trim(),M=b.pubId.trim(),v.ext.wrapper={},v.ext.wrapper.profile=parseInt(b.profId)||y,v.ext.wrapper.version=parseInt(b.verId)||y,v.ext.wrapper.wiid=b.wiid||r.auctionId,v.ext.wrapper.wv="prebid_prebid_7.0.0",v.ext.wrapper.transactionId=b.transactionId,v.ext.wrapper.wp="pbjs",r&&r.bidderCode&&(v.ext.allowAlternateBidderCodes=c.S.get(r.bidderCode,"allowAlternateBidderCodes"),v.ext.allowedAlternateBidderCodes=c.S.get(r.bidderCode,"allowedAlternateBidderCodes")),v.user.gender=b.gender?b.gender.trim():y,v.user.geo={},v.user.geo.lat=j("lat",b.lat),v.user.geo.lon=j("lon",b.lon),v.user.yob=j("yob",b.yob),v.device.geo=v.user.geo,v.site.page=b.kadpageurl.trim()||v.site.page.trim(),v.site.domain=(T=v.site.page,(D=document.createElement("a")).href=T,D.hostname),"object"===f(d.vc.getConfig("content"))&&(v.site.content=d.vc.getConfig("content")),"object"===f(d.vc.getConfig("device"))&&(v.device=u(v.device,d.vc.getConfig("device"))),(0,n.Z)(v,"source.tid",b.transactionId),-1!==window.location.href.indexOf("pubmaticTest=true")&&(v.test=1),e[0].schain&&(0,n.Z)(v,"source.ext.schain",e[0].schain),r&&r.gdprConsent&&((0,n.Z)(v,"user.ext.consent",r.gdprConsent.consentString),(0,n.Z)(v,"regs.ext.gdpr",r.gdprConsent.gdprApplies?1:0)),r&&r.uspConsent&&(0,n.Z)(v,"regs.ext.us_privacy",r.uspConsent),!0===d.vc.getConfig("coppa")&&(0,n.Z)(v,"regs.coppa",1),function(e,r){var t=(0,i.Z)(r,"0.userIdAsEids");(0,a.kJ)(t)&&t.length>0&&(0,n.Z)(e,"user.eids",t)}(v,e);var x=r&&r.ortb2||{};if(x.site&&(0,a.Ee)(v,{site:x.site}),x.user&&(0,a.Ee)(v,{user:x.user}),x.bcat&&(P=P.concat(x.bcat)),null!==(t=x.ext)&&void 0!==t&&null!==(s=t.prebid)&&void 0!==s&&null!==(p=s.bidderparams)&&void 0!==p&&null!==(l=p[r.bidderCode])&&void 0!==l&&l.acat){var k=x.ext.prebid.bidderparams[r.bidderCode].acat;G(v,k)}else O.length&&G(v,O);return function(e,r){(r=r.filter((function(e){return"string"==typeof e||((0,a.yN)("PubMatic: bcat: Each category should be a string, ignoring category: "+e),!1)})).map((function(e){return e.trim()})).filter((function(e,r,t){if(e.length>3)return t.indexOf(e)===r;(0,a.yN)("PubMatic: bcat: Each category should have a value of a length of more than 3 characters, ignoring category: "+e)}))).length>0&&((0,a.yN)("PubMatic: bcat: Selected: ",r),e.bcat=r)}(v,P),"object"===f(d.vc.getConfig("app"))&&(v.app=d.vc.getConfig("app"),v.app.publisher=v.site.publisher,v.app.ext=v.site.ext||y,"object"!==f(v.app.content)&&(v.app.content=v.site.content||y),delete v.site),{method:"POST",url:"https://hbopenbid.pubmatic.com/translator?source=prebid-client",data:JSON.stringify(v),bidderRequest:r}}},interpretResponse:function(e,r){var t=[],i=g,n=JSON.parse(r.data),s=n.site&&n.site.ref?n.site.ref:"";try{e.body&&e.body.seatbid&&(0,a.kJ)(e.body.seatbid)&&(i=e.body.cur||i,e.body.seatbid.forEach((function(e){e.bid&&(0,a.kJ)(e.bid)&&e.bid.forEach((function(d){var p={requestId:d.impid,cpm:(parseFloat(d.price)||0).toFixed(2),width:d.w,height:d.h,creativeId:d.crid||d.id,dealId:d.dealid,currency:i,netRevenue:true,ttl:300,referrer:s,ad:d.adm,pm_seat:e.seat||null,pm_dspid:d.ext&&d.ext.dspid?d.ext.dspid:null,partnerImpId:d.id||""};n.imp&&n.imp.length>0&&n.imp.forEach((function(e){if(d.impid===e.id)switch(function(e,r){if(e.ext&&null!=e.ext.bidtype)r.mediaType=R[e.ext.bidtype];else{(0,a.PN)("PubMatic: bid.ext.bidtype does not exist, checking alternatively for mediaType");var t=e.adm,i="",n=new RegExp(/VAST\s+version/);if(t.indexOf('span class="PubAPIAd"')>=0)r.mediaType=o.Mk;else if(n.test(t))r.mediaType=o.pX;else try{(i=JSON.parse(t.replace(/\\/g,"")))&&i.native&&(r.mediaType=o.B5)}catch(e){(0,a.yN)("PubMatic: Error: Cannot parse native reponse for ad response: "+t)}}}(d,p),p.mediaType){case o.Mk:break;case o.pX:p.width=d.hasOwnProperty("w")?d.w:e.video.w,p.height=d.hasOwnProperty("h")?d.h:e.video.h,p.vastXml=d.adm,function(e,r){var t,a,i;if(r.bidderRequest&&r.bidderRequest.bids){for(var n=0;n0){r.mediaType=o.B5;for(var i=0,n=t.native.assets.length;i0&&(p.meta.advertiserDomains=d.adomain,p.meta.clickUrl=d.adomain[0]),e.ext&&e.ext.buyid&&(p.adserverTargeting={hb_buyid_pubmatic:e.ext.buyid}),d.ext&&d.ext.marketplace&&(p.bidderCode=d.ext.marketplace),t.push(p)}))})))}catch(e){(0,a.H)(e)}return t},getUserSyncs:function(e,r,t,a){var i=""+M;return t&&(i+="&gdpr="+(t.gdprApplies?1:0),i+="&gdpr_consent="+encodeURIComponent(t.consentString||"")),a&&(i+="&us_privacy="+encodeURIComponent(a)),!0===d.vc.getConfig("coppa")&&(i+="&coppa=1"),e.iframeEnabled?[{type:"iframe",url:"https://ads.pubmatic.com/AdServer/js/user_sync.html?kdntuid=1&p="+i}]:[{type:"image",url:"https://image8.pubmatic.com/AdServer/ImgSync?p="+i}]},transformBidParams:function(e,r,t,i){return _(e,t.bids[0],!0),(0,a.uh)({publisherId:"string",adSlot:"string"},e)}};(0,s.dX)(V),window.pbjs.installedModules.push("pubmaticBidAdapter")},4806:function(e,r,t){function a(e,r,t){r.split&&(r=r.split("."));for(var a,i=0,n=r.length,s=e;i-1?[]:{}}t.d(r,{Z:function(){return a}})}},function(e){var r;r=8139,e(e.s=r)}]); /* PulsePoint */ (self.pbjsChunk=self.pbjsChunk||[]).push([[979],{6898:function(e,r,n){var t=n(265),a=n(9853),i=n(1609),o=n(4877);function s(){return s=Object.assign||function(e){for(var r=1;r0)return[r[0].w,r[0].h];return[1,1]}(e,r);return e.mediaTypes&&e.mediaTypes.banner?{w:n[0],h:n[1],battr:e.params.battr,format:r}:null}function g(e){return e.params.video?s({},e.params.video,e.mediaTypes&&e.mediaTypes.video?e.mediaTypes.video:{},{battr:e.params.battr}):null}function h(e){var r={},n={};return m.forEach((function(e){return n[e]=1})),Object.keys(e.params).forEach((function(t){n[t]||(r[t]=e.params[t])})),Object.keys(r).length>0?{prebid:r}:null}function y(e){if(e.nativeParams){var r=[];return w(r,function(e,r,n){if(r)return{id:e,required:r.required?1:0,title:{len:r.len||n}};return null}(r.length+1,e.nativeParams.title,u)),w(r,T(r.length+1,e.nativeParams.body,2,d)),w(r,T(r.length+1,e.nativeParams.sponsoredBy,1,p)),w(r,O(r.length+1,e.nativeParams.icon,1,c,c)),w(r,O(r.length+1,e.nativeParams.image,3,l,l)),{request:JSON.stringify({assets:r}),ver:"1.1",battr:e.params.battr}}return null}function w(e,r){r&&e.push(r)}function O(e,r,n,t,a){return r?{id:e,required:r.required?1:0,img:{type:n,wmin:r.wmin||t,hmin:r.hmin||a}}:null}function T(e,r,n,t){return r?{id:e,required:r.required?1:0,data:{type:n,len:r.len||t}}:null}function q(e,r){var n,t,a=e&&e.length>0?e[0].params.cp:"0";return e[0].params.app?null:{publisher:{id:a.toString()},ref:(null==r||null===(n=r.refererInfo)||void 0===n?void 0:n.ref)||window.document.referrer,page:(null==r||null===(t=r.refererInfo)||void 0===t?void 0:t.page)||""}}function C(e){var r=e&&e.length>0?e[0].params.cp:"0",n=e[0].params.app;return n?{publisher:{id:r.toString()},bundle:n.bundle,storeurl:n.storeUrl,domain:n.domain}:null}function R(e,r){var n={};if(r&&r.gdprConsent&&(n.consent=r.gdprConsent.consentString),e){var t=e.userIdAsEids;t&&(n.eids=t)}return{ext:n}}function I(e){if(e.gdprConsent||e.uspConsent){var r={};return e.gdprConsent&&(r.gdpr=e.gdprConsent.gdprApplies?1:0),e.uspConsent&&(r.us_privacy=e.uspConsent),{ext:r}}return null}function k(e){return e?{ext:{schain:e}}:null}function x(e){var r=e.params.bidfloor;if((0,a.LQ)(e.getFloor)){var n=e.getFloor({mediaType:e.mediaTypes.banner?"banner":e.mediaTypes.video?"video":"Native",size:"*",currency:f});n&&n.floor&&(r=n.floor)}return r}(0,i.dX)(v),window.pbjs.installedModules.push("pulsepointBidAdapter")}},function(e){var r;r=6898,e(e.s=r)}]); /* RtdModule */ (self.pbjsChunk=self.pbjsChunk||[]).push([[184],{7379:function(n,t,r){var e=r(8962),o=r(2922),a=r(9853),i=r(2319),u=r(5644),c=r(8634),f=r(1879);function l(n){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},l(n)}function s(){return s=Object.assign||function(n){for(var t=1;tn.length)&&(t=n.length);for(var r=0,e=new Array(t);r0,i=e.length,u=!1;if(!r.length)return f();function c(){u||(this.config&&this.config.waitForIt&&i--,0===i&&setTimeout(f,0))}function f(){u||(u=!0,clearTimeout(o),n.call(this,t))}o=setTimeout(f,a?v.auctionDelay:0),r.forEach((function(n){n.getBidRequestData(t,c.bind(n),n.config,d)}))}function S(n){var t=m.filter((function(n){return"function"==typeof n.getTargetingData}));if(t.length){var r=n.adUnitCodes;if(r){for(var e=[],o=t.length-1;o>=0;o--){var i=t[o].getTargetingData(r,t[o].config,d,n);i&&"object"===l(i)?e.push(i):(0,a.yN)("invalid getTargetingData response for sub module",t[o].name)}var c=function(n){if(!Array.isArray(n)||!n.length)return{};return n.reduce((function(n,t){for(var r in t)if(t.hasOwnProperty(r))if(n.hasOwnProperty(r)){var e=t[r];for(var o in e)e.hasOwnProperty(o)&&(n[r][o]=e[o])}else n[r]=t[r];return n}),{})}(e);return n.adUnits.forEach((function(n){var t=n.code&&c[n.code];t&&((0,a.PN)("RTD set ad unit targeting of",t,"for",n),n[u.k2.xn]=s(n[u.k2.xn]||{},t))})),n.adUnits}}}(0,o.bA)("realTimeData",(function(n){return h.push(n),function(){var t=h.indexOf(n);t>=0&&(h.splice(t,1),P())}})),E=e.vc,T=E.getConfig("realTimeData",(function(n){var t=n.realTimeData;t.dataProviders?(T(),v=t,b=t.dataProviders,A(),(0,o.v5)("startAuction").before(w,20),P()):(0,a.H)("missing parameters for real time module")})),window.pbjs.installedModules.push("rtdModule")}},function(n){var t;t=7379,n(n.s=t)}]); /* Rubicon */ (self.pbjsChunk=self.pbjsChunk||[]).push([[187],{6476:function(e,t,r){var i=r(9853),n=r(265),o=r(4806),a=r(1609),s=r(8962),c=r(8265),d=r(1879),u=r(4877),p=r(2528);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function f(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,i=new Array(t);r=.01?r.floor:void 0,rp_secure:"1",tk_flint:"".concat(h.int_type||"pbjs_lite","_v7.0.0"),"x_source.tid":e.transactionId,l_pb_bid_id:e.bidId,"x_source.pchain":r.pchain,p_screen_res:[window.screen.width,window.screen.height].join("x"),tk_user_key:r.userId,"p_geo.latitude":isNaN(parseFloat(u))?void 0:parseFloat(u).toFixed(4),"p_geo.longitude":isNaN(parseFloat(p))?void 0:parseFloat(p).toFixed(4),"tg_fl.eid":e.code,rf:k(e,t)};if("function"==typeof e.getFloor&&!h.disableFloors){var f;try{f=e.getFloor({currency:"USD",mediaType:"banner",size:"*"})}catch(e){(0,i.H)("Rubicon: getFloor threw an error: ",e)}l.rp_hard_floor="object"!==g(f)||"USD"!==f.currency||isNaN(parseInt(f.floor))?void 0:f.floor}var m={1:"atf",3:"btf"}[(0,n.Z)(e,"mediaTypes.banner.pos")]||"";l.p_pos="atf"===r.position||"btf"===r.position?r.position:m;var y=s.vc.getConfig("user.id");return y&&(l.ppuid=y),e.userIdAsEids&&e.userIdAsEids.forEach((function(e){try{if("adserver.org"===e.source?(l.tpid_tdid=e.uids[0].id,l["eid_adserver.org"]=e.uids[0].id):"liveintent.com"===e.source?(l["tpid_liveintent.com"]=e.uids[0].id,l["eid_liveintent.com"]=e.uids[0].id,e.ext&&Array.isArray(e.ext.segments)&&e.ext.segments.length&&(l["tg_v.LIseg"]=e.ext.segments.join(","))):"liveramp.com"===e.source?l.x_liverampidl=e.uids[0].id:"id5-sync.com"===e.source?l["eid_id5-sync.com"]="".concat(e.uids[0].id,"^").concat(e.uids[0].atype,"^").concat(e.uids[0].ext&&e.uids[0].ext.linkType||""):l["eid_".concat(e.source)]="".concat(e.uids[0].id,"^").concat(e.uids[0].atype||""),!l.ppuid){var t=(0,d.sE)(e.uids,(function(e){return e.ext&&"ppuid"===e.ext.stype}));t&&t.id&&(l.ppuid=t.id)}}catch(t){(0,i.yN)("Rubicon: error reading eid:",e,t)}})),t.gdprConsent&&("boolean"==typeof t.gdprConsent.gdprApplies&&(l.gdpr=Number(t.gdprConsent.gdprApplies)),l.gdpr_consent=t.gdprConsent.consentString),t.uspConsent&&(l.us_privacy=encodeURIComponent(t.uspConsent)),l.rp_maxbids=t.bidLimit||1,w(e,c.Mk,l),!0===s.vc.getConfig("coppa")&&(l.coppa=1),e.schain&&Z(e.schain)&&(l.rp_schain=j.serializeSupplyChain(e.schain)),l},serializeSupplyChain:function(e){if(!Z(e))return"";var t=e.ver,r=e.complete,i=e.nodes;return"".concat(t,",").concat(r,"!").concat(j.serializeSupplyChainNodes(i))},serializeSupplyChainNodes:function(e){var t=["asi","sid","hp","rid","name","domain"];return e.map((function(e){return t.map((function(t){return encodeURIComponent(e[t]||"")})).join(",")})).join("!")},interpretResponse:function(e,t){var r=t.bidRequest;if(!(e=e.body)||"object"!==g(e))return[];if(e.seatbid){var a=(0,n.Z)(e,"ext.errors.rubicon");Array.isArray(a)&&a.length>0&&(0,i.yN)("Rubicon: Error in video response");var s=[];return e.seatbid.forEach((function(t){(t.bid||[]).forEach((function(a){var d={requestId:r.bidId,currency:e.cur||"USD",creativeId:a.crid,cpm:a.price||0,bidderCode:t.seat,ttl:300,netRevenue:!1!==h.netRevenue,width:a.w||(0,n.Z)(r,"mediaTypes.video.w")||(0,n.Z)(r,"params.video.playerWidth"),height:a.h||(0,n.Z)(r,"mediaTypes.video.h")||(0,n.Z)(r,"params.video.playerHeight")};a.id&&(d.seatBidId=a.id),a.dealid&&(d.dealId=a.dealid),a.adomain&&(0,o.Z)(d,"meta.advertiserDomains",Array.isArray(a.adomain)?a.adomain:[a.adomain]),(0,n.Z)(a,"ext.bidder.rp.advid")&&(0,o.Z)(d,"meta.advertiserId",a.ext.bidder.rp.advid);var p=(0,n.Z)(e,"ext.responsetimemillis.rubicon");if(r&&p&&(r.serverResponseTimeMs=p),(0,n.Z)(a,"ext.prebid.type")===c.pX){d.mediaType=c.pX,(0,o.Z)(d,"meta.mediaType",c.pX);var l=(0,n.Z)(a,"ext.prebid.targeting");l&&"object"===g(l)&&(d.adserverTargeting=l),a.ext.prebid.cache&&"object"===g(a.ext.prebid.cache.vastXml)&&a.ext.prebid.cache.vastXml.cacheId&&a.ext.prebid.cache.vastXml.url?(d.videoCacheKey=a.ext.prebid.cache.vastXml.cacheId,d.vastUrl=a.ext.prebid.cache.vastXml.url):l&&l.hb_uuid&&l.hb_cache_host&&l.hb_cache_path&&(d.videoCacheKey=l.hb_uuid,d.vastUrl="https://".concat(l.hb_cache_host).concat(l.hb_cache_path,"?uuid=").concat(l.hb_uuid)),a.adm&&(d.vastXml=a.adm),a.nurl&&(d.vastUrl=a.nurl),!d.vastUrl&&a.nurl&&(d.vastUrl=a.nurl),"outstream"===(0,n.Z)(r,"mediaTypes.video.context").toLowerCase()&&(d.renderer=function(e){var t=u.Th.install({id:e.adId,url:h.rendererUrl||x,config:h.rendererConfig||{},loaded:!1,adUnitCode:e.adUnitCode});try{t.setRender(I)}catch(e){(0,i.yN)("Prebid Error calling setRender on renderer",e)}return t}(d))}else(0,i.yN)("Rubicon: video response received non-video media type");s.push(d)}))})),s}var d,p=e.ads,l=0;return"object"!==g(r)||Array.isArray(r)||"video"!==S(r)||"object"!==g(p)||(p=p[r.adUnitCode]),!Array.isArray(p)||p.length<1?[]:p.reduce((function(t,n,o){if(n.impression_id&&d===n.impression_id?l++:d=n.impression_id,"ok"!==n.status)return t;var a,s,u=Array.isArray(r)?r[o-l]:r;if(u&&"object"===g(u)){var p={requestId:u.bidId,currency:"USD",creativeId:n.creative_id||"".concat(n.network||"","-").concat(n.advertiser||""),cpm:n.cpm||0,dealId:n.deal,ttl:300,netRevenue:!1!==h.netRevenue,rubicon:{advertiserId:n.advertiser,networkId:n.network},meta:{advertiserId:n.advertiser,networkId:n.network,mediaType:c.Mk}};if(n.creative_type&&(p.mediaType=n.creative_type),n.adomain&&(p.meta.advertiserDomains=Array.isArray(n.adomain)?n.adomain:[n.adomain]),n.creative_type===c.pX)p.width=u.params.video.playerWidth,p.height=u.params.video.playerHeight,p.vastUrl=n.creative_depot_url,p.impression_id=n.impression_id,p.videoCacheKey=n.impression_id;else{p.ad=(a=n.script,s=n.impression_id,"\n