!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(()=>(()=>{var e={30:(e,t,n)=>{var r=9007199254740991,i="[object Arguments]",o="[object Function]",a="[object GeneratorFunction]",s="[object Symbol]",c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,l=c||u||Function("return this")();function d(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function h(e,t){for(var n=-1,r=t.length,i=e.length;++n0&&n(s)?t>1?w(s,t-1,n,r,i):h(i,s):r||(i[i.length]=s)}return i}function I(e){return T(e)||function(e){return function(e){return A(e)&&function(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?g.call(e):"";return t==o||t==a}(e)}(e)}(e)&&p.call(e,"callee")&&(!m.call(e,"callee")||g.call(e)==i)}(e)||!!(y&&e&&e[y])}function E(e){if("string"==typeof e||function(e){return"symbol"==typeof e||A(e)&&g.call(e)==s}(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}var T=Array.isArray;function A(e){return!!e&&"object"==typeof e}var S,D,P=(S=function(e,t){return null==e?{}:function(e,t){return function(e,t,n){for(var r=-1,i=t.length,o={};++r{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";var e,t,i;n.r(r),function(e){e.HORIZONTAL="HORIZONTAL",e.RECTANGLE="RECTANGLE",e.VERTICAL="VERTICAL",e.MOBILE="MOBILE",e.MOBILE_BIG="MOBILE_BIG",e.MOBILE_HORIZONTAL="MOBILE_HORIZONTAL",e.PORTRAIT="PORTRAIT",e.BILLBOARD="BILLBOARD"}(e||(e={})),function(e){e[e.Unknown=0]="Unknown",e[e.Ethernet=1]="Ethernet",e[e.WIFI=2]="WIFI",e[e.CellularNetworkUnknownGeneration=3]="CellularNetworkUnknownGeneration",e[e.CellularNetwork2G=4]="CellularNetwork2G",e[e.CellularNetwork3G=5]="CellularNetwork3G",e[e.CellularNetwork4G=6]="CellularNetwork4G",e[e.CellularNetwork5G=7]="CellularNetwork5G"}(t||(t={}));var o,a=((i={})[e.HORIZONTAL]=[[970,90],[728,90],[468,60],[234,60]],i[e.RECTANGLE]=[[336,280],[300,250],[250,250],[200,200],[180,150],[125,125]],i[e.VERTICAL]=[[300,600],[160,600],[120,600],[120,240]],i[e.MOBILE]=[[320,50]],i[e.MOBILE_BIG]=[[320,100],[320,50]],i[e.MOBILE_HORIZONTAL]=[[970,90],[728,90],[468,60],[320,100],[320,50],[234,60]],i[e.PORTRAIT]=[[300,1050]],i[e.BILLBOARD]=[[970,250]],i["300x600"]=[[300,600],[160,600]],i["336x280"]=[[336,280],[300,250]],i["728x90"]=[[728,90],[468,60]],i["970x90"]=[[970,90],[728,90],[468,60]],i),s="https://ads.assemblyexchange.com",c="web_".concat("5.24.0"),u="ana_client_uid",l="ana_client_session_id",d="ana_vast",h="ana_staging",f="https://xeno.media-lab.ai/events",p="https://securepubads.g.doubleclick.net/tag/js/gpt.js",g="https://js.assemblyexchange.com/iiquniversalid.6.111.js",v="ana-iiq-script",m="//c.amazon-adsystem.com/aax2/apstag.js",y=[new RegExp("^https://js\\.media-lab\\.ai$"),new RegExp("^https://ads\\.assemblyexchange\\.com$"),new RegExp("^https://staging\\.ads\\.assemblyexchange\\.com$"),new RegExp("^https://tpc\\.googlesyndication\\.com$"),new RegExp("^https?://ana-sdk-creative\\.s3-website-us-west-2\\.amazonaws\\.com$"),new RegExp("^https://\\w+\\.safeframe\\.googlesyndication\\.com$"),new RegExp("^https?://localhost:9000$"),new RegExp("^https?://127\\.0\\.0\\.1:9000$")],b=[new RegExp("^https://js\\.media-lab\\.ai$"),new RegExp("^https://ads\\.assemblyexchange\\.com$"),new RegExp("^https://staging\\.ads\\.assemblyexchange\\.com$"),new RegExp("^https?://localhost:2279$"),new RegExp("^https?://127\\.0\\.0\\.1:2279$")],w=417,I="frequency_cap",E="cs_",T="AssemblyBidderSyncState",A=2500,S="banner",D=4,P={0:"unknown",1:"ext",2:"network",3:"none"},_="unified_id",k="_lr_env",R="rtisCalled",O="ANAWeb-",C="ANA_PREMIUM_USER",x=["direct_backfill","direct_pricepriority","direct_sponsorship"],L=function(){return L=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0,r=t.options.dimensions.filter((function(e){return 300===e[0]&&(300===e[1]||250===e[1])})).length>0;if(n&&r){var i=document.getElementById(t.elementID);if(!t.isSemiStickyUnit||300!==e.Width||300!==e.Height&&250!==e.Height)t.isSemiStickyUnit&&e.Height>300&&"assembly-semi-sticky-container"===i.parentElement.getAttribute("class")&&(i.style.position="relative",i.style.marginTop="0px");else{var o=null;"assembly-semi-sticky-container"!==i.parentElement.getAttribute("class")&&((o=document.createElement("div")).setAttribute("class","assembly-semi-sticky-container"),o.style.display="block",o.style.width="300px",o.style.height="600px",o.style.marginLeft="auto",o.style.marginRight="auto",o.style.borderTop="1px solid transparent",o.style.borderBottom="1px solid transparent",i.parentNode.insertBefore(o,i),o.appendChild(i))}}}else Y("slot is not defined")},ae=function(e,t){return e()?Promise.resolve():new Promise((function(n){var r=setInterval((function(){e()&&(Y("Document in focus"),n(),clearInterval(r))}),t)}))},se=function(e){return document.getElementById(e)?Promise.resolve():new Promise((function(t){var n=setInterval((function(){document.getElementById(e)&&(Y("Element ".concat(e," was added to the DOM")),t(),clearInterval(n))}),500)}))},ce=function(e){var t=document.getElementById(e),n=!1;return t?n=!t.checkVisibility||t.checkVisibility():n},ue=function(e){var t=document.getElementById(e);if(!t||!IntersectionObserver)return Promise.resolve();return new Promise((function(n){var r=new IntersectionObserver((function(t,r){!function(t,n,r){t.forEach((function(t){t.intersectionRatio>0&&(Y("".concat(e," in viewport!")),r())}))}(t,0,n)}),{root:null,rootMargin:"0px",threshold:0});r.observe(t)}))},le=function(e){return e.premiumUser?new Promise((function(t){var n=setInterval((function(){e.premiumUser||(Y("Premium user status dropped"),t(),clearInterval(n))}),1e3)})):Promise.resolve()},de=function(e){if(!e)return!1;return/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)},he=0,fe=ne("aversion");if(fe){var pe="use_local_bundle"===fe?"http://localhost:9000/wana.js":"https://js.media-lab.ai/wana."+fe+".js";if(!re(pe))throw function e(t){if(!document.body)return console.error("ana-web is triying to load another version before there is a body to append to. Retry [".concat(fe,"][").concat(he,"]")),(he+=1)<10?void setTimeout((function(){e(t)}),50):void console.error("Ana Web exhausted retries while waiting for document.body . Retry [".concat(fe,"][").concat(he,"]"));re(t)||function(e,t){if(!re(e)){var n=document.createElement("script");n.async=t,n.src=e,document.body.appendChild(n)}}(t,!0)}(pe),Error("Ana Version parameter found, stoping current script to load requested version [".concat(fe,"]"))}var ge,ve,me=function(){function e(){}return e.prototype.setItem=function(e,t){this[e]=t},e.prototype.getItem=function(e){var t=this[e];return t||(t=null),t},e.prototype.removeItem=function(e){delete this[e]},e.prototype.clear=function(){var e=this;Object.keys(this).forEach((function(t){delete e[t]}))},e.prototype.key=function(e){throw Error("not implemented (index = ".concat(e))},e.prototype.getAllKeys=function(){return Object.keys(this)},Object.defineProperty(e.prototype,"length",{get:function(){return Object.keys(this).length},enumerable:!1,configurable:!0}),e}(),ye=function(){function e(){}return e.prototype.setItem=function(e,t){try{var n=JSON.stringify(t);localStorage.setItem(O+e,n)}catch(e){Y("Error saving to localStorage",e)}},e.prototype.getItem=function(e){try{var t=localStorage.getItem(O+e);return null===t?null:JSON.parse(t)}catch(e){return Y("Error retrieving from localStorage",e),null}},e.prototype.removeItem=function(e){try{localStorage.removeItem(O+e)}catch(e){Y("Error removing from localStorage",e)}},e.prototype.clear=function(){try{localStorage.clear()}catch(e){Y("Error clearing localStorage",e)}},e.prototype.getAllKeys=function(){return Object.keys(localStorage).filter((function(e){return e.startsWith(O)})).map((function(e){return e.replace(O,"")}))},e}();window.anaStorage=J((function(){return window.localStorage}))?new ye:new me,window.anaSessionStorage=J((function(){return window.sessionStorage}))?window.sessionStorage:new me,function(e){e[e.GOOGLE=0]="GOOGLE",e[e.ANA=1]="ANA"}(ge||(ge={})),function(e){e[e.VIDEO_JS=0]="VIDEO_JS",e[e.HTML5=1]="HTML5"}(ve||(ve={}));var be,we,Ie=n(30),Ee=n.n(Ie),Te=null,Ae=function(e){var t,n=document.activeElement;if(n&&"IFRAME"===n.tagName&&Te!==n&&(Te=n,document.activeElement.parentNode&&"DIV"===document.activeElement.parentNode.nodeName)){var r=document.activeElement.parentNode,i="";r.parentNode&&"DIV"===r.parentNode.nodeName&&r.parentNode.getAttribute("id")?i=r.parentNode.getAttribute("id"):(r,i=r.getAttribute("id")),Y("ANA Ad Click detected on adUnit",i);var o=null===(t=e.getBannerSlot(i))||void 0===t?void 0:t.currentBid;o?(Y("Rendering ClickPixels for adUnit",i),o.renderClickPixels()):Y("Failed Rendering ClickPixels for adUnit",i,"because bid is missing")}};!function(e){e.RENDER="render",e.DO_NOTHING="doNothing",e.ADSERVER="adserver"}(we||(we={}));var Se,De=function(){function e(e){var t=this;Object.keys(e).forEach((function(n){var r=function(e,t){void 0===t&&(t=!1);var n=e.replace(/([-_]id$)|([-_][a-z])/gi,(function(e){return e.toUpperCase().replace("-","").replace("_","")}));return"id"===n&&(n="ID"),n&&t&&(n=n[0].toUpperCase()+n.slice(1)),n}(n,!0);t[r]=e[n]})),this.LastNomination=0}return e.prototype.toCustomJSON=function(){var e=this,t={};return Object.keys(this).forEach((function(n){var r=n.replace(/\.?([A-Z]+)/g,(function(e,t){return"_"+t.toLowerCase()})).replace(/^_/,"");t[r]=e[n]})),t},e.prototype.renderPixels=function(e){var t=this.BidID;e.forEach((function(e){var n=document.createElement("img");n.setAttribute("data-bid-id",t),n.setAttribute("src",e),n.setAttribute("width","1"),n.setAttribute("height","1"),document.body.appendChild(n)}))},e.prototype.renderImpressionPixels=function(){this.ImpressionPixels&&this.renderPixels(this.ImpressionPixels)},e.prototype.renderViewPixels=function(){this.ViewPixels&&this.renderPixels(this.ViewPixels)},e.prototype.renderClickPixels=function(){this.ClickPixels&&this.renderPixels(this.ClickPixels)},e.prototype.removeImpressionPixels=function(){for(var e=[],t=document.getElementsByTagName("img"),n=0;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]o-1&&(t.group=0));var a=6*t.group,s=a+6;s>i&&(s=i);var c=Object.keys(e).slice(a,s);c.forEach((function(e){void 0!==t.bidders[e]&&(t.bidders[e].sync_counter++,t.bidders[e].sync_counter>3&&(t.bidders[e].sync_counter=3))})),c=c.filter((function(e){return void 0!==t.bidders[e]&&t.bidders[e].sync_counter<3}));var u={};return c.forEach((function(t){u[t]=e[t]})),[u,t]},Ne=function(e){var t=e.propertyId,n=e.uid;return xe(void 0,void 0,void 0,(function(){var e,r,i,o,a,s,c,u;return Le(this,(function(l){switch(l.label){case 0:if(!t)throw Error("propertyId is required");if(h=Me(null),0!==Object.keys(h.bidders).length&&0===Object.keys(h.bidders).filter((function(e){return h.bidders[e].sync_counter<3})).length)return Y("Already all synced, no need to resync cookies across bidders"),[2];if(Y("Not all bidders synced, continuing"),void 0===window.syncRequestLastTime&&(window.syncRequestLastTime={}),void 0===window.syncRequestLastTime[window.location.href]&&(window.syncRequestLastTime[window.location.href]=0),(new Date).getTime()-window.syncRequestLastTime[window.location.href]<2500)return Y("We have already called resync before 2.5 seconds, rejecting the call until later"),[2];window.syncRequestLastTime[window.location.href]=(new Date).getTime(),Y("Updating last resync timer"),d=t,window.ANAWebPropertyId=d,Re(n),Y("sending a syncing cookie request to doh"),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,yt.UserSync.sync({syncedBidderIds:[]})];case 2:return e=l.sent(),r=e.syncUrls,i=e.cookieIds,o=Me(r),a=Ue(r,o),s=a[0],function(e){try{anaStorage.setItem(T,JSON.stringify(e))}catch(e){}}(a[1]),c=i?Object.keys(i):null,Y("got response from /doh/sync:",s,i),Object.keys(s).forEach((function(e){c&&-1!==c.indexOf(e)||Qe(e,s[e])})),i&&Object.keys(i).forEach((function(e){var t=i[e];t&&Be(e,t)})),[2];case 3:return u=l.sent(),console.error("Something went wrong during user sync:",u),[3,4];case 4:return[2]}var d,h}))}))};function Ve(e){this.callCounter++,document.body?document.body.appendChild(e):this.callCounter<200&&setTimeout(Ve.bind(this,e),50)}var je,Fe,Ge,qe,We,He,Je,ze,Ke,Qe=function(e,t){var n=H(),r=document.createElement("iframe");r.setAttribute("src",t),r.setAttribute("frameborder","0"),r.setAttribute("scrolling","no"),r.setAttribute("marginheight","0"),r.setAttribute("marginwidth","0"),r.setAttribute("TOPMARGIN","0"),r.setAttribute("LEFTMARGIN","0"),r.setAttribute("allowtransparency","true"),r.setAttribute("width","0"),r.setAttribute("height","0"),r.setAttribute("data-property-id",n),Y("creating cookie syncing iframe for "+e,t),setTimeout(Ve.bind({callCounter:0},r),0)};!function(e){e[e.PageLoadSoundOn=1]="PageLoadSoundOn",e[e.PageLoadSoundOff=2]="PageLoadSoundOff",e[e.ClickSoundOn=3]="ClickSoundOn",e[e.MouseOverSoundOn=4]="MouseOverSoundOn",e[e.EnterViewpointSoundOn=5]="EnterViewpointSoundOn",e[e.EnterViewpointSoundOff=6]="EnterViewpointSoundOff"}(je||(je={})),function(e){e[e.GenericPostRoll=-2]="GenericPostRoll",e[e.GenericMidRoll=-1]="GenericMidRoll",e[e.PreRoll=0]="PreRoll",e[e.MidRoll3Sec=3]="MidRoll3Sec",e[e.MidRoll5Sec=5]="MidRoll5Sec",e[e.MidRoll10Sec=10]="MidRoll10Sec",e[e.MidRoll15Sec=15]="MidRoll15Sec",e[e.MidRoll30Sec=30]="MidRoll30Sec",e[e.MidRoll60Sec=60]="MidRoll60Sec"}(Fe||(Fe={})),function(e){e[e.InStream=1]="InStream",e[e.InBanner=2]="InBanner",e[e.InArticle=3]="InArticle",e[e.InFeed=4]="InFeed",e[e.Interstitial=5]="Interstitial"}(Ge||(Ge={})),function(e){e[e.InStream=1]="InStream",e[e.Overlay=2]="Overlay"}(qe||(qe={})),function(e){e[e.OnVideoCompletion=1]="OnVideoCompletion",e[e.OnLeavingViewport=2]="OnLeavingViewport",e[e.OnLeavingViewportContinues=3]="OnLeavingViewportContinues"}(We||(We={})),function(e){e[e.Unknown=0]="Unknown",e[e.AboveTheFold=1]="AboveTheFold",e[e.Deprecated=2]="Deprecated",e[e.BelowTheFold=3]="BelowTheFold",e[e.Header=4]="Header",e[e.Footer=5]="Footer",e[e.Sidebar=6]="Sidebar",e[e.FullScreen=7]="FullScreen"}(He||(He={})),function(e){e[e.Vast10=1]="Vast10",e[e.Vast20=2]="Vast20",e[e.Vast30=3]="Vast30",e[e.Vast10Wrapper=4]="Vast10Wrapper",e[e.Vast20Wrapper=5]="Vast20Wrapper",e[e.Vast30Wrapper=6]="Vast30Wrapper",e[e.Vast40=7]="Vast40",e[e.Vast40Wrapper=8]="Vast40Wrapper",e[e.Daast10=9]="Daast10",e[e.Daast10Wrapper=10]="Daast10Wrapper"}(Je||(Je={})),function(e){e[e.Vpaid10=1]="Vpaid10",e[e.Vpaid20=2]="Vpaid20",e[e.Mraid1=3]="Mraid1",e[e.Ormma=4]="Ormma",e[e.Mraid2=5]="Mraid2",e[e.Mraid3=6]="Mraid3"}(ze||(ze={})),function(e){e[e.Streaming=1]="Streaming",e[e.Progressive=2]="Progressive",e[e.Download=3]="Download"}(Ke||(Ke={}));var $e,Ye=function(){var e=X(l);return e||(e=Pe()),Ze(e),_e()?"tr"+e:e},Ze=function(e){Z(l,e,30)},Xe=function(){return Xe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=3?[2]:(i=W().gdprManager.gdprApplies,o=W().gdprManager.tcString,i&&!o?[2]:(a={uid:e,identifier:t,identifier_type:"4",consent:o,requirement_set:i?"1":"0",app_id:H()},[4,j({url:"".concat(It(),"/web/liveramp"),params:a})]));case 1:return 404!==(s=u.sent()).status&&500!==s.status?[3,4]:[4,new Promise((function(e){return setTimeout(e,3e3*r)}))];case 2:return u.sent(),[4,n(r+1)];case 3:return u.sent(),[3,6];case 4:return s.ok?[4,s.json()]:[3,6];case 5:c=u.sent(),function(e,t){var n=t.refresh_ttl/6e4;Z("".concat(_,"_").concat(ee(e)),t.ttd_uid,n)}(t,c),u.label=6;case 6:return[2]}}))}))},[4,n(0)];case 1:return r.sent(),[2]}}))}))},Tt=function(e){var t=e.getBoundingClientRect(),n=t.width*t.height,r=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight;return At(t,r,i)/n>=.5},At=function(e,t,n){return(Math.min(t,e.right)-Math.max(0,e.left))*(Math.min(n,e.bottom)-Math.max(0,e.top))},St="request_counter_total",Dt="request_counter",Pt=function(e){var t="".concat(Dt,"_").concat(e);return parseInt(anaSessionStorage.getItem(t),10)||0},_t=function(){return _t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=5e3&&(this.skipViewValidation=!0,this.previousRefreshTime=e,this.stopRefreshCycle(),this.refresh()),this.listenForURLChanges(),[2]}var n}))}))},this.waitForRemoval=function(){return kt(n,void 0,void 0,(function(){return Rt(this,(function(e){switch(e.label){case 0:return[4,(t=this.elementID,document.getElementById(t)?new Promise((function(e){var n=setInterval((function(){document.getElementById(t)||(Y("Element ".concat(t," was removed from the DOM")),e(),clearInterval(n))}),500)})):Promise.resolve())];case 1:return e.sent(),this.slotRemoved=!0,this.anaWeb.eventsTracker.adSlotRemoved(this.adUnitID,this.elementID),this.skipRefreshOnRecreation||this.stopRefreshCycle(),this.waitForAddition(),[2]}var t}))}))},this.waitForAddition=function(){return kt(n,void 0,void 0,(function(){return Rt(this,(function(e){switch(e.label){case 0:return[4,se(this.elementID)];case 1:return e.sent(),this.anaWeb.eventsTracker.adSlotRecreated(this.adUnitID,this.elementID),this.skipViewValidation=!0,this.slotRemoved=!1,this.previousRefreshTime=Date.now(),this.skipRefreshOnRecreation||this.refresh(),this.waitForRemoval(),[2]}}))}))},this.waitForInvisible=function(){return kt(n,void 0,void 0,(function(){return Rt(this,(function(e){switch(e.label){case 0:return[4,(t=this.elementID,ce(t)?new Promise((function(e){var n=setInterval((function(){ce(t)||(Y("Element ".concat(t," is invisible")),e(),clearInterval(n))}),500)})):Promise.resolve())];case 1:return e.sent(),this.isVisible=!1,this.waitForVisible(),[2]}var t}))}))},this.waitForInViewport=function(){return kt(n,void 0,void 0,(function(){return Rt(this,(function(e){switch(e.label){case 0:return[4,ue(this.elementID)];case 1:return e.sent(),this.hasBeenInViewPort=!0,[2]}}))}))},this.waitForPremiumUser=function(){return kt(n,void 0,void 0,(function(){return Rt(this,(function(e){switch(e.label){case 0:return[4,le(this.anaWeb)];case 1:return e.sent(),[2]}}))}))},this.onAdView=function(e){n.hasBeenViewed=!0,e&&e()},this.options=_t(_t({},Ot),t),this.anaWeb=e,this.adUnitID=this.options.adUnitID,this.elementID=this.options.elementID,this.dimensions=this.options.dimensions,this.baseTargeting=_t({},this.options.baseTargeting),this.apsTargeting=[],this.additionalTargeting={},this.passThroughANA=this.options.passThroughANA,this.apsEnabled=(null==e?void 0:e.apsEnabled)&&this.options.apsEnabled,this.mapAPSTargeting=!!(null==e?void 0:e.mapAPSTargeting),this.adServerRender=this.options.adServerRender,this.isSemiStickyUnit=!!this.options.isSemiStickyUnit,this.adLoadCallback=this.options.onAdLoad,this.draEnabled=this.options.draEnabled,this.refreshCount=0,this.currentBid=null,this.hasBeenViewed=!1,this.impCount=0,this.focusPromise=null,this.isVisible=ce(this.elementID),this.ANALazyLoad=!!this.options.ANALazyLoad,this.hasBeenInViewPort=!1,this.excludeANA=this.options.excludeANA,this.skipFocusValidation=this.options.skipFocusValidation,this.skipRefreshOnRecreation=this.options.skipRefreshOnRecreation,this.skipViewValidation=!1,this.refreshTimeoutId=null,this.slotRemoved=!1,this.waitForRemoval(),this.previousRefreshTime=Date.now(),this.options.refreshOnURLChange&&this.listenForURLChanges()}return e.prototype.updateBaseTargeting=function(e){this.baseTargeting=_t(_t({},this.baseTargeting),e)},e.prototype.waitForVisible=function(){return kt(this,void 0,void 0,(function(){return Rt(this,(function(e){switch(e.label){case 0:return[4,(t=this.elementID,ce(t)?Promise.resolve():new Promise((function(e){var n=setInterval((function(){ce(t)&&(Y("Element ".concat(t," is visible")),e(),clearInterval(n))}),500)})))];case 1:return e.sent(),this.isVisible=!0,this.waitForInvisible(),[2]}var t}))}))},e.prototype.removeSlot=function(){var e=document.getElementById(this.elementID);e&&(e.innerHTML=null),this.stopRefreshCycle()},e.prototype.checkForFocus=function(){return kt(this,void 0,void 0,(function(){var e=this;return Rt(this,(function(t){return this.focusPromise||(this.focusPromise=ae(this.anaWeb.hasFocus.bind(this.anaWeb),300).then((function(){e.focusPromise=null}))),[2,this.focusPromise]}))}))},e.prototype.fetchANABids=function(){var e,t;return kt(this,void 0,void 0,(function(){var n,r,i,o,a,s,c,u,l,d,h,f,p,g,v;return Rt(this,(function(m){switch(m.label){case 0:return this.refreshCount++,this.anaWeb.refreshCount++,function(e){var t=parseInt(anaSessionStorage.getItem(St),10)||0;anaSessionStorage.setItem(St,(t+1).toString());var n="".concat(Dt,"_").concat(e),r=parseInt(anaSessionStorage.getItem(n),10)||0;anaSessionStorage.setItem(n,(r+1).toString())}(this.adUnitID),this.passThroughANA||this.excludeANA?(n=void 0,(r=this.anaWeb.iiqInstance)&&(n=null===(t=null===(e=r.intentIqConfig)||void 0===e?void 0:e.abTesting)||void 0===t?void 0:t.currentTestGroup),this.anaWeb.eventsTracker.adAttemptMade(this.adUnitID,{iiqCohort:n}),[2]):(this.adAttemptStartTime=Date.now(),i=_t(_t({},this.anaWeb.globalTargeting),this.baseTargeting),a=(o=this).anaWeb,s=o.adUnitID,c=o.elementID,u=o.adAttemptStartTime,l=o.dimensions,d=o.refreshCount,h=this.adAttemptID||Pe(),f=this.getTopBid(!1),p={totalSession:Pt("total"),adUnitSession:Pt(s),totalPageview:a.refreshCount,adUnitPageview:d},[4,yt.BannerBids.fetch({adAttemptId:h,adAttemptStartTime:u,adUnitID:s,auctionTimeout:a.auctionTimeout,elementID:c,targeting:i,dimensions:l,topBid:f,requestCounters:p})]);case 1:return(g=m.sent())?(this.action=g.action,this.refreshRate=g.refreshRate,this.additionalTargeting=g.targeting,(v=g.bids).length>0&&a.bidManager.addBids(v,s),[2,g]):[2,{}]}}))}))},e.prototype.fetchAPSBids=function(e){var t=this;return void 0===e&&(e=this.elementID),!this.anaWeb.apsEnabled||this.passThroughANA?Promise.resolve():new Promise((function(n){window.apstag.fetchBids({slots:[{slotID:e,slotName:t.adUnitID,sizes:t.dimensions}]},(function(e){Y("APS responded with bids for ".concat(t),e),t.mapAPSTargeting&&(t.apsTargeting=e.map((function(e){var t=window.apstag.targetingKeys(e.mediaType||"display");return Ee()(e,t)}))),n(e)}))}))},e.prototype.updateTargeting=function(){},e.prototype.refresh=function(){throw new Error("Method not implemented by child class.")},e.prototype.isViewNotRequired=function(){return this.skipViewValidation||this.slotRemoved||0===this.impCount||0===this.refreshCount},e.prototype.waitForViewAndFocus=function(){return kt(this,void 0,void 0,(function(){var e,t;return Rt(this,(function(n){switch(n.label){case 0:return[4,se(this.elementID)];case 1:return n.sent(),e=this.isViewNotRequired()?Promise.resolve():this.waitingForView(),t=this.skipFocusValidation?Promise.resolve():this.checkForFocus(),[2,Promise.all([t,e])]}}))}))},e.prototype.getTopBid=function(e){void 0===e&&(e=!0);var t=this.anaWeb,n=this.adUnitID;return t.bidManager.getBid(n,e)},e.prototype.getBidCount=function(){var e=this.anaWeb,t=this.adUnitID;return e.bidManager.getBidCount(t)},e.prototype.renderInElement=function(e,t,n){var r=this;if(document.getElementById(e)){var i=this.adUnitID,o=this.anaWeb;!function(e,t,n){var r=document.getElementById(e);if(!r)throw Error("tried to render ad on missing element "+e);for(be||(be=setInterval((function(){return Ae(n)}),25));r.firstChild;)r.removeChild(r.firstChild);if(x.includes(t.BidderName))r.innerHTML=t.Creative;else{"none"===r.style.display&&(r.style.display="inline-block",r.style.lineHeight="0px");var i=document.createElement("iframe");i.setAttribute("srcdoc",t.Creative),i.setAttribute("frameborder","0"),i.setAttribute("scrolling","no"),i.setAttribute("marginheight","0"),i.setAttribute("marginwidth","0"),i.setAttribute("TOPMARGIN","0"),i.setAttribute("LEFTMARGIN","0"),i.setAttribute("allowtransparency","true");var o=t.Width,a=t.Height;i.setAttribute("width","".concat(o)),i.setAttribute("height","".concat(a)),r.append(i)}}(e,t,o),wt({adUnitID:i,bid:t}),o.eventsTracker.slotRendered(this.adUnitID,t),o.bidManager.useBid(i,t.BidID),this.onAdLoad(t),this.currentViewMonitorStop=function(e){var t=e.elementID,n=e.bid,r=e.progress,i=e.slotAction,o=e.onView,a=!1,s=r||0,c=function(){return a||(clearInterval(u),a=!0),s},u=setInterval((function(){var e=document.getElementById(t);if(!e)return Y("viewability monitor: missing element ".concat(t,". stopping monitor")),void c();Tt(e)?s++:s=0,s>=20&&(Y("viewability monitor: viewed ".concat(t,". stopping monitor")),n&&i===we.RENDER&&n.renderViewPixels(),o&&o(),c())}),50);return c}({elementID:e,bid:t,progress:0,slotAction:this.action,onView:function(){return r.onAdView(n)}})}else console.error("missing element for direct render")},e.prototype.alreadyRendered=function(){throw Error("unimplemented method: alreadyRendered")},e.prototype.isWaitingForView=function(){return this.impCount>0&&!this.hasBeenViewed},e.prototype.waitingForView=function(){var e=this,t=function(){return e.impCount>0&&e.hasBeenViewed};return t()?Promise.resolve():new Promise((function(e){var n=setInterval((function(){t()&&setTimeout((function(){e(),clearInterval(n)}),2e3)}),300)}))},e.prototype.onAdLoad=function(e){this.impCount+=1,this.hasBeenViewed=!1,this.skipViewValidation=!1,this.currentBid=e,this.adLoadCallback&&this.adLoadCallback()},e.prototype.getRefreshRate=function(){var e=this.refreshRate;return this.currentBid&&this.currentBid.HasWon&&e0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]100||!i.test(r))throw Error("Invalid AdunitID format, ".concat(o));if(!function(e){if(!Array.isArray(e)||0===e.length)return!1;if(2!==e.length||Array.isArray(e[0])||Array.isArray(e[1])){for(var t=!0,n=0,r=e;n0){var i=document.getElementById(t.elementID),a=null==i?void 0:i.querySelector("iframe");if(a){var s=t.getRefreshRate();a.dataset.geniusAnaRefreshRateOverride="".concat(s/1e3)}}var c=q(t.bidRequestBody);if(e.isEmpty||!1===e.slotContentChanged){t.anaWeb.eventsTracker.adAttemptFailed(o,Lt({slot:o,reason:"nofill",duration:n,gamEvent:e,adAttemptID:t.adAttemptID,targeting:r},c||{}))}else t.anaWeb.eventsTracker.adAttemptSucceeded(t.adUnitID,Lt({slot:t.adUnitID,totalBids:t.getBidCount(),duration:n,gamEvent:e,adAttemptID:t.adAttemptID,targeting:r},c)),t.bidRequestBody=null,t.onAdLoad(t.currentBid)})),c.setCollapseEmptyDiv(r,i);var u=Lt(Lt({},s),e);u&&Object.keys(u).length&&Object.keys(u).forEach((function(e){Y("registerSlot - set targeting ".concat(e,", ").concat(u[e]," for ").concat(t)),c.setTargeting(e,u[e])})),c.addService(googletag.pubads()),googletag.display(a)},t.prototype.updateRefreshCountTargeting=function(){this.slot.getTargetingKeys&&void 0===this.slot.getTargetingKeys().find((function(e){return"mlrf"===e}))&&(this.attemptCount++,this.slot.setTargeting("mlrf",this.attemptCount.toString()))},t.prototype.updateAdditionalTargeting=function(){var e=this;this.additionalTargeting&&Object.keys(this.additionalTargeting).length&&Object.keys(this.additionalTargeting).forEach((function(t){e.slot.setTargeting(t,e.additionalTargeting[t])}))},t.prototype.onViewHandler=function(e){this.currentBid&&this.currentBid.HasWon&&!this.hasBeenViewed?(Y("Rendering ViewPixels for ".concat(this.adUnitID),e),this.currentBid.renderViewPixels()):Y("Ignoring ViewPixels on AdUnit since it has already been viewed, or assembly did not win on ",this.adUnitID),this.onAdView()},t.prototype.prepareDimensions=function(e,t){return e&&e.length?e:a[t]||[]},t.prototype.fetchBids=function(){var e=this,t=this.fetchANABids().then((function(t){t&&(Y("ANA responded for ".concat(e)),e.bidRequestBody=t.bidRequestBody,!e.adServerRender||e.action===we.RENDER||e.anaWeb.forceDirectRender)?e.directRender():st((function(){e.updateAnaTargeting()}))})),n=Promise.resolve();return this.apsEnabled&&(n=this.fetchAPSBids().then((function(){st((function(){e.mapAPSTargeting?e.apsTargeting.forEach((function(t){Object.keys(t).forEach((function(n){e.slot.setTargeting(n,t[n])}))})):e.updateApsTargeting()}))}))),[t,n]},t}(Ct);Nt.prototype.toString=function(){return"BannerSlot('".concat(this.adUnitID,"', '").concat(this.elementID,"')")};var Vt=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},jt=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]7)throw Error("adPosition must be valid not Unknown");if(!r.playbackMethod||r.playbackMethod<1||r.playbackMethod>6)throw Error("playbackMethod must be specified for video ad slots");if(o.audioPosterURL=r.audioPosterURL,o.videoDurationSeconds=r.videoDurationSeconds,o.startDelay=r.startDelay,o.adPlacement=r.adPlacement,o.adPosition=r.adPosition,o.playbackMethod=r.playbackMethod,o.wrapperDiv=document.getElementById(o.elementID),o.dimensions&&0===o.dimensions.length)throw new Error("".concat(o.elementID," dimensions must be either omitted or have at least one element in the array"));switch(o.playerType){case ve.VIDEO_JS:i=Ht;break;case ve.HTML5:i=qt;break;default:throw Error("unsupported video player type: ".concat(n))}return o.videoManager=new i(r.adsManagerLoadedCbk,o.elementID,o.adUnitID,o.baseTargeting,o.audioPosterURL),o.refresh(),o}return Jt(t,e),t.prototype.refresh=function(){var e;return Kt(this,void 0,void 0,(function(){return Qt(this,(function(t){switch(t.label){case 0:return null===(e=this.videoManager.adsManager)||void 0===e||e.destroy(),[4,this.videoManager.anaBidRequest(this.fetchANAVMAP)];case 1:return t.sent(),[2]}}))}))},t.prototype.currentDimensions=function(){var e;if(this.dimensions)e=this.dimensions;else{var t=this.playerDimensions();e=[[t.w,t.h]]}if(0===e.length||2!==e[0].length)throw new Error("".concat(this.elementID," final dimensions are not valid: ").concat(e));return e},t.prototype.playerDimensions=function(){var e=this.wrapperDiv.getBoundingClientRect(),t=Math.floor(e.width),n=Math.floor(e.height);if(0===t||0===n)throw Error("".concat(this.elementID," wrong video ad slot dimensions: ").concat(t,"x").concat(n));return{w:t,h:n}},t}(Ct);$t.prototype.toString=function(){return"VideoSlot('".concat(this.adUnitID,"', ").concat(this.playerType,", '").concat(this.elementID,"')")};var Yt=function(){function e(e){if(this.anaWeb=e,window.addEventListener)window.addEventListener("message",this.handleMessage.bind(this),!1),window.addEventListener("unload",(function(){e&&e.eventsTracker&&e.eventsTracker.pageviewExit()}));else{if(!window.attachEvent)throw Error("No event listener found!");window.attachEvent("onmessage",this.handleMessage.bind(this))}}return e.prototype.handleMessage=function(e){if(e&&(a=e.origin,y.some((function(e){return e.test(a)})))&&e.data&&e.data.bidID){var t=e.data,n=t.adUnitID,r=t.bidID,i=this.anaWeb.bidManager.getBidToRender(n,r);if(i){i.HasWon=!0;var o=this.anaWeb.createdSlots.find((function(e){return e.adUnitID===n}));oe(i,o),e.source?e.source.postMessage(JSON.stringify(i),e.origin):console.error("e.source is not available in this context"),wt({adUnitID:n,bid:i}),this.anaWeb.eventsTracker.slotRendered(n,i)}}var a;e&&function(e){return b.some((function(t){return t.test(e)}))}(e.origin)&&e.data&&e.data.msgType&&"cookieSyncingSuccess"===e.data.msgType&&(Y("synced cookie message event for ".concat(e.data.bidderId,", id=").concat(e.data.partnerUid)),Be(e.data.bidderId,e.data.partnerUid))},e}(),Zt=function(){return Zt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;a--){var s;if((s=i[a]).LastNomination0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]2097152&&this.sendCachedEvents()}catch(e){var a=r.pop();console.error("Cant add event: ".concat(a.event," to cache, max quota exceeded"))}},e.prototype.anaLoaded=function(e){this.trackEvent("ana_loaded",{extra:e})},e.prototype.gptAdded=function(){this.trackEvent("gpt_added")},e.prototype.gptLoaded=function(){this.trackEvent("gpt_loaded")},e.prototype.gptNoCMP=function(){this.trackEvent("gpt_no_cmp")},e.prototype.iiqAdded=function(){this.trackEvent("iiq_added")},e.prototype.iiqIdsReceived=function(e){var t=e.idsCount,n=e.iiqCohort;this.trackEvent("iiq_ids_received",{counter:t,iiqCohort:n})},e.prototype.cmpPromptDisplayed=function(e){this.trackEvent("cmp_prompt_displayed",{duration:e})},e.prototype.slotCreated=function(e,t){this.trackEvent("slot_created",{slot:e,impressionType:t})},e.prototype.slotCreationFailed=function(e,t,n){this.trackEvent("slot_creation_failed",{slot:e,impressionType:t,reason:n})},e.prototype.refreshStarted=function(e){this.trackEvent("refresh_started",{slot:e})},e.prototype.adAttemptMade=function(e,t){this.trackEvent("ad_attempt_made",rn({slot:e},t))},e.prototype.adAttemptAborted=function(e,t){this.trackEvent("ad_attempt_aborted",{slot:e,reason:t})},e.prototype.adAttemptFailed=function(e,t){this.trackEvent("ad_attempt_failed",rn({slot:e},t))},e.prototype.refreshFailed=function(e,t){this.trackEvent("refresh_failed",{slot:e,reason:t})},e.prototype.adAttemptSucceeded=function(e,t){this.trackEvent("ad_attempt_succeeded",rn({slot:e},t))},e.prototype.slotRendered=function(e,t){this.trackEvent("ana_bid_render",{slot:e,bid:t})},e.prototype.pageviewExit=function(){this.sendBeaconEvent("pageview_text")},e.prototype.heartbeat=function(e,t){this.trackEvent("heartbeat",{targeting:e,counter:t})},e.prototype.adSlotRemoved=function(e,t){this.trackEvent("ad_slot_removed",{slot:e,elementID:t})},e.prototype.adSlotRecreated=function(e,t){this.trackEvent("ad_slot_recreated",{slot:e,elementID:t})},e.prototype.pingTest=function(e){this.trackEvent("ping_test",e)},e.prototype.googlePingTest=function(e){this.trackEvent("google_ping_test",{extra:e})},e.prototype.premiumUser=function(e,t){this.trackEvent("premium_user",{extra:e,extra_2:t})},e}(),dn=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},hn=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]2e4&&(anaStorage.setItem("heartbeat_ts",Date.now().toString()),r++,e.heartbeat(t(),r)),setTimeout(i,2e3),[2]}}))}))},setTimeout(i,2e3),[2]}}))}))};var pn=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},gn=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&(r=parseInt(ne("auctionTimeout"))),w&&this.enableWunderkind(w),this.bidManager=new nn,this.slotEventsHandlers=o,this.syncCookies=u,this.resyncCookiesAfterTimeout=l,this.propertyId=d,this.apsEnabled=!!s,this.mapAPSTargeting=!!(null==s?void 0:s.mapAPSTargeting),this.globalTargeting=(null==a?void 0:a.globalTargeting)||{},this.setPPID=a&&!!a.setPPID,this.lazyLoad=a&&a.enableLazyLoad,this.lightMode=!!h,this.auctionTimeout=r||f,this.eventsTracker=new ln(this.propertyId,c),this.msgHandler=new Yt(this),this.userEmail=p,this.forceDirectRender=!1,this.iiqInstance=null,this.geolocation=null,this.loggedInStatus=T,this.unifiedIdEnabled=S,this.persistPremiumUser=i.persistPremiumUser,this.refreshCount=0;var D=document.querySelector("script[anaUID]"),_=D&&D.getAttribute("anaUID")||"",k=m||_;k?this.setANAUID(k):this.uid=ke();var R,O=this.persistPremiumUser&&(R=this.uid,JSON.parse(anaStorage.getItem(C)||"{}")[R]);(y||O)&&this.setPremiumUser(b||O),this.verifier=new In,this.geolocation=new Sn(this.premiumUser,this.verifier,this.loggedInStatus),this.eventsTracker.anaLoaded("start"),window.ANAWebSDKInstance=this,this.setFocusListeners(),t.auctionTimeout||r?(t.auctionTimeout||r)&&Y("Setting auctionTimeout to ".concat(this.auctionTimeout)):Y("auctionTimeout wasn't provided, using default value: ".concat(A)),(this.auctionTimeout<500||this.auctionTimeout>4e3)&&(this.auctionTimeout=A,console.error("auctionTimeout is out of range (".concat(500," - ").concat(4e3,"), using default value: ").concat(A))),void 0===this.globalTargeting.SDK&&e.version&&(this.globalTargeting.SDK=e.version),void 0===this.globalTargeting.domain&&"localhost"!==window.location.hostname&&(this.globalTargeting.domain=window.location.hostname),void 0===this.globalTargeting.auctionTimeout&&this.auctionTimeout&&(this.globalTargeting.auctionTimeout=this.auctionTimeout.toString()),this.sessionId=Ye(),this.lightMode||(s&&(s.bidTimeout=this.auctionTimeout,en(s)),rt(a,this)),this.getIIQInstance=function(e){return e&&e(null),Promise.resolve(null)},!E&&this.verifier.verifyFeature("iiq",(function(e){if(!e)return n.iiqInstance=null,void(n.getIIQInstance=function(e){return e&&e(null),Promise.resolve(null)});var t=ft({partnerId:1366563817,partnerClientId:n.uid,eventsTracker:n.eventsTracker,shouldSetPPID:!n.setPPID}).then((function(e){return n.iiqInstance=e,e}));n.getIIQInstance=function(e){return t.then((function(t){return e&&e(t),t}))}}));var x,L,B=!this.lightMode&&v;this.gdprManager=new tn({shouldExpectGoogleCMP:B,shouldExpectExternalCMP:g,eventsTracker:this.eventsTracker}),this.syncCookies&&!this.premiumUser&&this.syncUserCookies(),window.addEventListener&&window.addEventListener("scroll",this.onScroll.bind(this)),fn(this.eventsTracker,(function(){return n.globalTargeting}),(function(){return n.hasFocus()})),Promise.all([mn(this.eventsTracker),(L=this.eventsTracker,new Promise((function(e){var t=window.googlefc;null==t||t.callbackQueue.push({AD_BLOCK_DATA_READY:function(){var n=t.getAdBlockerStatus(),r=P[n];if(L.googlePingTest(r),r===P[1]||r===P[2])throw new Error("Ad blocker detected");e()}})}))),(x=I,new Promise((function(e,t){var n,r=window.googletag,i=!1,o=setTimeout((function(){i||t(new Error("Google cmd not found"))}),x);null===(n=null==r?void 0:r.cmd)||void 0===n||n.push((function(){i=!0,clearTimeout(o),e()}))})))]).catch((function(){n.forceDirectRender=!0,n.createdGoogleSlots.forEach((function(e){e.directRender()}))}));var M=navigator.cookieDeprecationLabel;M&&M.getValue().then((function(e){var t;Y("chrome cookieDeprecationLabel",e),e.length&&n.updateGlobalTargeting(((t={}).chrome_label=e,t))})),this.eventsTracker.anaLoaded("finish")}return e.prototype.setFocusListeners=function(){var e=this;this.internalHasFocus=document.hasFocus(),ie("focus",window,(function(){e.internalHasFocus=!0})),ie("blur",window,(function(){e.internalHasFocus=!1})),ie("scroll",window,(function(){e.internalHasFocus=!0})),ie("visibilitychange",window,(function(){e.internalHasFocus="visible"===document.visibilityState})),ie("touchstart",window,(function(){e.internalHasFocus=!0}))},e.prototype.setANAUID=function(e){var t;if(!de(e))return Y("Ignoring provided UID: ".concat(e," because it is not a valid UUIDv4")),void(this.uid=ke());this.uid=e,null===(t=this.verifier)||void 0===t||t.refreshFeatures(),Re(this.uid)},e.prototype.enableWunderkind=function(e){!function(e){var t=e.src,n=e.id,r=document.createElement("script");r.src=t,r.async=!0,n&&r.setAttribute("id",n),document.getElementsByTagName("head")[0].appendChild(r)}({src:"".concat(document.location.protocol,"//tag.wknd.ai/").concat(e,"/i.js"),id:"wunderkind-script"})},e.prototype.setLoggedInStatus=function(e){var t,n;this.loggedInStatus=e?Dn.LOGGED_IN:Dn.LOGGED_OUT,null===(t=this.verifier)||void 0===t||t.refreshFeatures(),null===(n=this.geolocation)||void 0===n||n.setLocation(this.premiumUser,this.verifier,this.loggedInStatus)},e.prototype.setPremiumUser=function(e){var t,n,r,i;void 0===e&&(e="premium"),this.premiumUser=!0,this.premiumUserTag=e,this.eventsTracker.premiumUser("set",e),this.persistPremiumUser&&(n=this.uid,r=e,(i=JSON.parse(anaStorage.getItem(C)||"{}"))[n]=r,anaStorage.setItem(C,JSON.stringify(i))),null===(t=this.geolocation)||void 0===t||t.setLocation(this.premiumUser,this.verifier,this.loggedInStatus),this.createdSlots.forEach((function(e){e.removeSlot()}))},e.prototype.removePremiumUser=function(){var e,t,n;this.premiumUser=!1,this.eventsTracker.premiumUser("remove",this.premiumUserTag),this.premiumUserTag=null,this.persistPremiumUser&&(t=this.uid,delete(n=JSON.parse(anaStorage.getItem(C)||"{}"))[t],anaStorage.setItem(C,JSON.stringify(n))),null===(e=this.geolocation)||void 0===e||e.setLocation(this.premiumUser,this.verifier,this.loggedInStatus),this.createdSlots.forEach((function(e){e.refresh()}))},e.prototype.createSlot=function(e,t){return _n(this,void 0,void 0,(function(){var n,r,i,o=this;return kn(this,(function(a){switch(a.label){case 0:return[4,se(t.elementID)];case 1:a.sent(),setTimeout((function(){"done"!==n&&(n||(n="timeout"),o.eventsTracker.slotCreationFailed(t.adUnitID,S,n))}),5e3),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.gdprManager.tcResolver];case 3:return a.sent(),r=this.createInternalSlot(e,t),n="done",[2,r];case 4:return i=a.sent(),n=i,[3,5];case 5:return[2]}}))}))},e.prototype.showConsentPrompt=function(){var e=window.googlefc;null==e||e.callbackQueue.push(e.showRevocationMessage)},e.prototype.createInternalSlot=function(e,t){var n=null;switch(e){case ge.GOOGLE:this.lightMode&&Y("making google banner slots in light mode seems sketchy"),n=new Nt(this,t),this.createdGoogleSlots.push(n);break;case ge.ANA:this.lightMode||Y("making a lightmode slot without the SDK in lightmode seems sketchy"),n=new Ct(this,t);break;default:throw Error("Specified slot type is not supported: ".concat(e))}return this.eventsTracker.slotCreated(t.adUnitID,S),this.createdSlots.push(n),n},e.prototype.createVideoSlot=function(e,t){return _n(this,void 0,void 0,(function(){var n;return kn(this,(function(r){switch(r.label){case 0:return[4,se(t.elementID)];case 1:return r.sent(),[4,this.gdprManager.tcResolver];case 2:return r.sent(),n=new $t(this,e,t),this.eventsTracker.slotCreated(t.adUnitID,"video"),this.createdVideoContainers.push(n),[2,n]}}))}))},e.prototype.hasFocus=function(){return document.hasFocus()||this.internalHasFocus},Object.defineProperty(e,"version",{get:function(){return"5.24.0"},enumerable:!1,configurable:!0}),e.prototype.updateGlobalTargeting=function(e){var t;(this.globalTargeting=Pn(Pn({},this.globalTargeting),e),this.lightMode)||(t=this.globalTargeting)&&Object.keys(t).length&&st((function(){Object.keys(t).forEach((function(e){googletag.pubads().setTargeting(e,t[e])}))}))},e.prototype.clearGlobalTargeting=function(e){if(void 0===e&&(e=[]),e.length)for(var t in this.globalTargeting)e.includes(t)&&delete this.globalTargeting[t];else this.globalTargeting={};this.lightMode||function(e){void 0===e&&(e=[]),e.length?st((function(){e.forEach((function(e){googletag.pubads().clearTargeting(e)}))})):st((function(){googletag.pubads().clearTargeting()}))}(e)},e.prototype.syncUserCookies=function(){var e=this;if(this.syncCookies&&!this.premiumUser){if(!this.propertyId)throw Error("propertyId is needed to initialize SDK");var t=H();return this.gdprManager.tcResolver.then((function(){Ne({propertyId:t,uid:e.uid})}))}},e.prototype.getBannerSlot=function(e){var t=null;return this.createdSlots.forEach((function(n){n.elementID!==e&&0!==e.indexOf(n.elementID)||(t=n)})),t},e.prototype.onScroll=function(){Rn([],document.querySelectorAll("div.assembly-semi-sticky-container"),!0).forEach((function(e){try{var t=e.children[0],n=e.getBoundingClientRect(),r=t.getBoundingClientRect().height;if(r>304)return t.style.position="relative",void(t.style.marginTop="0px");n.top<=0&&n.top>r-n.height?(t.style.position="fixed",t.style.top=0,t.style.bottom="auto",t.style.marginTop="0px"):n.top<0&&n.top