(()=>{try{function n(){return!!window.apstag&&(window.apstag.init({pubID:c,adServer:"googletag",bidTimeout:1e3}),!0)}function o(a){return new Promise(b=>{h.rp.requestBids({callback:b,gptSlotObjects:[a]})})}async function p(a,b,c){return new Promise(function(d){window.apstag.fetchBids({slots:[{slotID:b,slotName:a,sizes:c.filter(function(a){return"fluid"!=a})}]},function(){return window.apstag.setDisplayBids(),d()})})}function q(a,b,c,d,e){var g,h=new IntersectionObserver((h,i)=>{var j=!1,k=h[0];.5<=k.intersectionRatio?(j=!1,g=setTimeout(()=>{j||Promise.all([o(c.slot),p(d,a.id,e)]).then(()=>{f.forEach(function(a){c.slot.setTargeting(a.key,a.value)}),c.slot.setTargeting("browsiRefresh",!0),googletag.pubads().refresh([c.slot],{changeCorrelator:!1}),i.unobserve(k.target),i.disconnect()})},b)):(j=!0,clearTimeout(g))},{threshold:[.49,.5]});h.observe(a)}var a=window["browsiCallback_"],b="",c="",d="",e="",f="",g="",h=window[""],i=0,j=h.getConfig("realTimeData").dataProviders.find(a=>"browsi"===a.name);if(!j)return void a(!0,"no browsi config on realTimeData");var k=j.params&&j.params.rp&&j.params.rp.browsiDynamicAds;if(!k)return void a(!0,"no browsiDynamicAds found in params.rp");var l=k.adsData.find(a=>a.adUnit===b);if(!l)return void a(!0,"no matched config for "+b);var m=k.refreshRate;(function(){return window.googletag=window.googletag||{},window.googletag.cmd=window.googletag.cmd||[],!!window.apstagLOADED||n()})(),window.googletag.cmd.push(function(){googletag.pubads().disableInitialLoad();var c=googletag.defineSlot(b,g,e).addService(googletag.pubads());window.googletag.enableServices(),window.googletag.pubads().addEventListener("slotRenderEnded",b=>{if(b.slot.getSlotElementId()===e&&0===i&&(a(b.isEmpty),i++),!b.isEmpty&&b.slot.getSlotElementId()===e&&m&&0{f&&f.forEach(function(a){c.setTargeting(a.key,a.value)}),googletag.display(e),window.googletag.pubads().refresh([c])})})}catch(b){a(!0,b.message)}})();