${a.dataDescription}
\n \n \n \n \n `;const c=this.shadowRoot.getElementById(`note-${this.getAttribute("id")}`),l=this.shadowRoot.getElementById(`close-${this.getAttribute("id")}`),u=this.shadowRoot.getElementById(`missclick-${this.getAttribute("id")}`);if(this.hasAttribute("data-imp-link")){let e=this.getAttribute("data-imp-link");window[tt]&&(e+=`&utsid=${window[tt]}`),e+=`&cbpage=${encodeURIComponent(R())}`,e+=`&cbref=${encodeURIComponent(U())}`;const t=document.createElement("img");t.src=e.toString(),t.setAttribute("class","impression"),c.appendChild(t)}I(c,"click",this.click),I(l,"click",this.close),I(u,"click",this.missclick)}}var nt=rt;const it=1e3;var st=class{#t={};#r;#s;#b="";#Ae;#m=!1;#x="49.0";#ke=[];#Se=null;#Te=!0;#Ce;#k=!1;constructor(e){this.#r=new y(`ippg_new_${e.zoneId}`),this.#r.debug("init ippg with config:",e),this.#t=e,this.#s=window[e.adcashGlobalName],this.#Ce=this.#t.refreshRate,customElements.get("in-page-message")||customElements.define("in-page-message",nt),this.#s.getClientHints(!1).then((e=>{this.#b=e,this.#le()}))}#C(){let e=`${window.location.protocol}//${this.#t.adserverDomain}/script/push.php`;if(this.#t.adblockSettings&&this.#s.isAdbMode()){const{adserverDomain:t}=this.#t.adblockSettings,r=`/${te("abcdefgh0123456789")}`;e=`${window.location.protocol}//${t}${r}`}return e+=`?r=${this.#t.zoneId}&ipp=1`,this.#Ae=X?this.#t.renderPosMobile:this.#t.renderPosDesktop,e+=`&mads=${this.#t.maxAds}&position=${this.#Ae}`,this.#t.isAutoTag&&(e+=`&czid=${this.#t.collectiveZoneId}&atag=1`),this.#t.aggressivity&&(e+=`&aggr=${this.#t.aggressivity}`),this.#t.adblockSettings&&(e+="&abtg=1"),this.#m&&(e+="&rbd=1"),this.#t.recordPageView&&(e+="&ppv=1"),this.#t.abTest&&(e+=`&ab_test=${this.#t.abTest}`),this.#t.sub1&&(e+=`&sub1=${encodeURIComponent(this.#t.sub1)}`),this.#t.adblockSettings&&this.#t.adblockSettings.adbVersion&&(e+=`&adbv=${this.#t.adblockSettings.adbVersion}`),e=e+`&srs=${this.#s.getSesionRandomString()}`+`&ufp=${encodeURIComponent(this.#t.uniqueFingerprint)}`+`&cbpage=${encodeURIComponent(R())}`+`&atv=${this.#x}`+`&cbref=${encodeURIComponent(U())}`,this.#b&&(e+=this.#b),this.#Se&&(e+="&ipptr=1"),this.#t.adblockSettings&&this.#s.isAdbMode()?(e+="&sadbl=2",e+="&fmt=ippg",this.#r.debug(`bid url: ${e}`),re(e)):(this.#r.debug(`bid url: ${e}`),e)}async#le(){var e;if(this.#Oe()>=this.#t.maxAds||!this.#Te||document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement)return void(this.#t.refreshRate>0&&(this.#m=!0,f()(v()(e=this.#le).call(e,this),this.#Ce*it)));let t;try{t=await fetch(this.#C())}catch(e){if(this.#r.error(e),this.#t.adblockSettings&&!this.#k)return this.#r.debug("fetch call failed. Switch to adblck domain and path"),this.#k=!0,this.#s.enableAdbMode(),void this.#le()}var r,n;if(204===t.status)return this.#r.debug("unsold invertory!"),void(this.#t.refreshRate>0&&(this.#r.debug(`refresh rate present. try bidding again after ${this.#Ce} sec`),this.#m=!0,f()(v()(r=this.#le).call(r,this),this.#Ce*it),2*this.#Ce<1200&&(this.#Ce*=2)));if(200!==t.status&&202!==t.status||(this.#m=!0,t=await t.json(),this.#r.debug("response:",t)),t.fallback&&t.hp)return void this.#we(t.fallback);if(t.fallback)return void this.#we(t.fallback);if(t.hp,t.capped_ttl)return this.#r.debug(`capped! try bidding again after ${t.capped_ttl} sec`),void f()(v()(n=this.#le).call(n,this),t.capped_ttl*it);this.#b&&(t.impression_url&&(t.impression_url+=this.#b),t.click_url&&(t.click_url+=this.#b));const i={type:t.type||1,script:t.script||"",title:t.title||"",description:t.description||"",icon:t.icon||t.image,link:t.click_url,impressionLink:t.impression_url||null,capped_ttl:k()(t.capped_ttl,10)||0};var s;this.#Ce=this.#t.refreshRate,2!==i.type||this.#Se?(this.#ke.push(i),this.#Te=!1,this.#Ie(),f()((()=>{this.#Te=!0}),this.#Ce*it)):(this.#Se=i,this.#Te=!1,await this.#Ee(),f()((()=>{this.#Te=!0}),this.#Ce*it)),this.#t.refreshRate>0&&(this.#m=!0,f()(v()(s=this.#le).call(s,this),this.#Ce*it))}#Oe(){return this.#Se?this.#ke.length+1:this.#ke.length}#we(e){this.#r.debug("fallback script str decoded:",e);const t=(new DOMParser).parseFromString(e,"text/html").querySelector("script");if(!t)return this.#r.error("invalid fallback script. move on"),null;this.#r.debug("fallback script:",t);const r=document.createElement("script");for(const e of t.attributes)r.setAttribute(e.name,e.value);r.src||(r.textContent=t.textContent),document.body.appendChild(r)}async#Ee(){const e=(new DOMParser).parseFromString(this.#Se.script,"text/html").querySelector("script"),t=document.createElement("script");e.src?t.setAttribute("src",e.src):t.innerText=e.innerText;const r=()=>{var e;this.#r.debug("CT-CLICK"),fetch(this.#Se.link,{mode:"no-cors"}),document.removeEventListener("ct-click",r),f()(v()(e=this.#le).call(e,this),1e3)},n=()=>{this.#r.debug("CT-CLOSE"),document.removeEventListener("ct-click",r),document.removeEventListener("ct-close",n),this.#Se=null,document.body.removeChild(t)};I(document,"ct-click",r),I(document,"ct-close",n);let i=this.#Se.impressionLink;window[tt]&&(i+=`&utsid=${window[tt]}`),i+=`&cbpage=${encodeURIComponent(R())}`,i+=`&cbref=${encodeURIComponent(U())}`,t.onload=async()=>{try{await fetch(i.toString())}catch(e){return this.#r.debug(e),void(this.#t.adblockSettings&&!this.#s.isAdbMode()&&(this.#r.debug("imp failed: try alt domain and path"),this.#s.enableAdbMode()))}document.dispatchEvent(new CustomEvent("impression-event"))},t.onerror=()=>{this.#r.debug("custom html script failed to load"),this.#Se=null},document.body.appendChild(t)}#Ie(){var e;this.#r.debug("drawing..");const t=document.querySelectorAll("in-page-message");if(t.length>0)for(let e=0;e{const r=document.createElement("in-page-message");r.setAttribute("doskip","1"),r.setAttribute("id",t.toString()),r.setAttribute("data-icon",e.icon),r.setAttribute("data-title",e.title),r.setAttribute("data-description",e.description),r.setAttribute("data-offset-top",this.#t.offsetTop),r.setAttribute("data-render-pos-desktop",this.#t.renderPosDesktop),r.setAttribute("data-render-pos-mobile",this.#t.renderPosMobile),e.impressionLink&&(r.setAttribute("data-imp-link",e.impressionLink),e.impressionLink=null,document.dispatchEvent(new CustomEvent("impression-event"))),r.addEventListener("inpageclick",(()=>{var n;if(X||this.#t.adblockSettings&&this.#s.isAdbMode()){const t=document.createElement("a");t.href=e.link,t.rel="noopener, noreferrer",t.target="_blank",t.click()}else try{window.open(e.link,"_blank","noopener,noreferrer")}catch{}r.remove(),h()(n=this.#ke).call(n,t,1),this.#Ie()})),r.addEventListener("inpageclose",(()=>{var e;r.remove(),h()(e=this.#ke).call(e,t,1),this.#Ie()})),document.body.appendChild(r)}))}};const ot="x4G9Tq2Kw6R7v1Dy3P0B5N8Lc9M2zF",at="adblock-settings",ct=(()=>{let e=document.currentScript;return e||(e=document.getElementById("aclib")),e||(e=document.getElementById("adcash-lib")),e})();let lt=null;var ut=class{#Re;#Le={pop:!1,autoTag:!1,inPagePush:!1,interstitial:!1};#Pe;#b;#$e=new(t());#ze=new(t());#r;#Fe=!1;#Ue;#Be={mousedown:[],click:[],touchstart:[]};#je={mousedown:[],scroll:[],click:[],touchstart:[]};#v="youradexchange.com";#o=null;#Ne;#Me;#De=!1;isShowingPop=!1;#T;constructor(){if(lt)return lt;lt=this,this.#r=new y("adcash"),window.addEventListener("mousedown",(e=>{var t;this.#r.debug("win mousedown with capture: in"),i()(t=this.#Be.mousedown).call(t,(t=>{this.#r.debug("win mousedown with capture: calling observer"),t.callback(e)}))}),!0),window.addEventListener("mousedown",(e=>{var t;this.#r.debug("win mousedown: in"),i()(t=this.#je.mousedown).call(t,(t=>{this.#r.debug("win mousedown: calling observer"),t.callback(e)}))}),!1),window.addEventListener("click",(e=>{var t;this.#r.debug("win click with capture: in"),i()(t=this.#Be.click).call(t,(t=>{this.#r.debug("win click with capture: calling observer"),t.callback(e)}))}),!0),window.addEventListener("click",(e=>{var t;this.#r.debug("win click: in"),i()(t=this.#je.click).call(t,(t=>{this.#r.debug("win click: calling observer"),t.callback(e)}))}),!1),document.addEventListener("mousedown",(e=>{var t;this.#r.debug("doc mousedown: in"),i()(t=this.#je.mousedown).call(t,(t=>{this.#r.debug("doc mousedown: calling observer"),t.callback(e)}))})),document.addEventListener("mousedown",(e=>{var t;this.#r.debug("doc mousedown with capture: in"),i()(t=this.#Be.mousedown).call(t,(t=>{this.#r.debug("doc mousedown with capture: calling observer"),t.callback(e)}))}),!0),window.addEventListener("scroll",(e=>{var t;i()(t=this.#je.scroll).call(t,(t=>{t.callback(e)}))})),document.addEventListener("click",(e=>{var t;this.#r.debug("doc click: in"),i()(t=this.#je.click).call(t,(t=>{this.#r.debug("doc click: calling observer"),t.callback(e)}))})),document.addEventListener("click",(e=>{var t;this.#r.debug("doc click with capture: in"),i()(t=this.#Be.click).call(t,(t=>{this.#r.debug("doc click with capture: calling observer"),t.callback(e)}))}),!0),this.getClientHints(),this.#Me=(()=>{if(void 0===window.rgxngibqxq||""===window.rgxngibqxq){let e=[],t="0123456789abcdefghijklmnopqrstuvwxyz";for(let r=0;r<32;r++)e[r]=t.substr(Math.floor(16*Math.random()),1);e[14]="4",e[19]=t.substr(3&e[19]|8,1),window.rgxngibqxq=e.join("")}return window.rgxngibqxq})(),this.#Ne=(()=>{const e=Math.floor(11*Math.random())+5;let t="";for(let r=0;r1&&void 0!==arguments[1]&&arguments[1];return"undefined"!=typeof navigator&&"userAgentData"in navigator?navigator.userAgentData.getHighEntropyValues(["model","platform","platformVersion","uaFullVersion"]).then((e=>{const r={};if(e.hasOwnProperty("brands")&&e.brands.length>0){const t=[];for(let r=0;r(e.error("error getting client hints:",t),""))):t?{}:""}(this.#r,!0);let e="";for(let t in this.#Pe)e+=`&${t}=${this.#Pe[t]}`;this.#b=e}return e?this.#Pe:this.#b}getCdnDomain(){return this.#Re}getSesionRandomString(){return this.#Me}enableAdbMode(){this.#r.debug("enable adb mode"),this.#De=!0}isAdbMode(){return this.#De}#qe(){this.#We();var e=this;const t=this.#Ne;window[t]=e,this.#Ue=u()((()=>{window[t]&&window[t]===e||(window[t]=e)}),500)}#We(){this.#Ue&&(clearInterval(this.#Ue),this.#Ue=null)}subscribe(e,t,r){if(!this.#Be[e]||!this.#je[e])throw new Error(`${e} is not observable!`);r?this.#Be[e].push(t):this.#je[e].push(t)}unsubscribe(e,t,r){if(!this.#Be[e]||!this.#je[e])throw new Error(`${e} is not observable!`);if(r)for(let r=0;r{const t=document.createElement("link");t.rel="dns-prefetch",t.href=`//${e}`,document.head.appendChild(t)}))}f()(v()(e=this.#He).call(e,this),100)}getZoneIds(){return m()(this.#$e)}runPop(e){this.#qe();const{zoneId:t,refreshRate:r,delay:n,targetElementsCssSelector:i,triggerOnTargetElementsClick:s,targetCountries:o,triggerOnTargetCountries:a,sub1:c,sub2:l,publisherUrl:u,storeUrl:d,c1:h,c2:g,c3:f,pubHash:p,pubClickId:v,pubValue:b,fallbackOn:m,isAutoTag:y,collectiveZoneId:w,aggressivity:x,recordPageView:A,linkedZoneId:k,abTest:S,tagVersionSuffix:T}=e;if(!t)throw new Error("mandatory zoneId is not provided!");if(!de(t))throw new Error("zoneId is not a string!");if(void 0!==r&&(!ue(r)||r<0))throw new Error("refreshRate is not an integer or is less than zero");if(void 0!==n&&(!ue(n)||n<0))throw new Error("delay is not an integer or is less than zero");if(void 0!==i){if(!de(i))throw new Error("targetElementsCssSelector is not a string");if(!(e=>{try{document.createDocumentFragment().querySelector(e)}catch{return!1}return!0})(i))throw new Error("targetElementsCssSelector is not a valid css selector");if(!le(s))throw new Error("triggerOnTargetElementsClick is not a boolean")}if(void 0!==o){if(!(e=>{if(!oe()(e))return!1;if(0===e.length)return!1;for(let t=0;t0&&f<10&&(f<5?f*=60:f=30),new st({zoneId:t,refreshRate:f??60,delay:r??0,maxAds:n??1,renderPosDesktop:i??"top",renderPosMobile:s??"top",offsetTop:o??0,sub1:a,isAutoTag:c,collectiveZoneId:l,aggressivity:u,recordPageView:d,abTest:h,tagVersionSuffix:g,adserverDomain:this.#v,adblockSettings:this.#o,adcashGlobalName:this.#Ne,isLoadedAsPartOfLibrary:!0,uniqueFingerprint:this.#T})}runBanner(e){this.#qe();const{zoneId:t,width:r,height:n,renderIn:i,sub1:s}=e;if(!t)throw new Error("mandatory zoneId is not provided!");if(!de(t))throw new Error("zoneId is not a string!");if(void 0!==r&&!ue(r))throw new Error("Banner width is not an integer");if(void 0!==n&&!ue(n))throw new Error("Banner height is not an integer");if(this.#r.debug("loading banner on page",t),!i)var o=document.currentScript.parentElement;const a={adcashGlobalName:this.#Ne,zoneId:t,width:r,height:n,renderIn:i,currentElement:o,sub1:s,uniqueFingerprint:this.#T};if(this.#Le.banner||this.#Fe){if(window.Banner)return this.#$e.add(a.zoneId),void new Banner(a);const e=u()((()=>{window.Banner&&(this.#$e.add(a.zoneId),new Banner(a),clearInterval(e))}),100)}else{this.#Fe=!0;var c=document.createElement("script");c.type="text/javascript",c.src=`${location.protocol}//${this.#Re}/script/banner.js`,c.onload=()=>{this.#Le.banner=!0,this.#Fe=!1,this.#$e.add(a.zoneId),new Banner(a)},c.onerror=()=>{this.#Le.banner=!1,this.#Fe=!1,this.#r.error(`failed loading ${c.src}`)},c.setAttribute("data-adel","ban"),c.setAttribute("a-lib","1"),document.head.appendChild(c)}}runInterstitial(e){if(this.#Le.interstitial)return void this.#r.error("interstitial zone already loaded on page");this.#Le.interstitial=!0,this.#qe();const{zoneId:t,sub1:r,isAutoTag:n,collectiveZoneId:i,aggressivity:s,recordPageView:o,abTest:a,tagVersionSuffix:c}=e;if(!t)throw new Error("mandatory zoneId is not provided!");if(!de(t))throw new Error("zoneId is not a string!");this.#r.debug("loading interstitial on page");const l={zoneId:t,sub1:r,isAutoTag:n,collectiveZoneId:i,aggressivity:s,recordPageView:o,abTest:a,tagVersionSuffix:c,adcashGlobalName:this.#Ne,adserverDomain:this.#v,adblockSettings:this.#o,isLoadedAsPartOfLibrary:!0,uniqueFingerprint:this.#T};this.#$e.add(t),new Xe(l)}async#Ge(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.#r.debug("fetch collective zone config");let r=`${window.location.protocol}//${this.#v}/ad/czcf.php`;if(this.isAdbMode()){const e=`/${te("abcdefgh0123456789")}`;r=`${window.location.protocol}//${this.#o.adserverDomain}${e}`}r+=`?cz=${e}`;const n=await this.getClientHints();let i;n&&(r+=n),this.isAdbMode()&&(r+="&sadbl=2",r+="&fmt=atg",r=re(r)),this.#r.debug("collective zone config url: ",r);try{i=await fetch(r)}catch(r){return this.#r.error(r),this.#o&&t?(this.#r.debug("collective zone config fetch failed: try alt domain and path"),this.enableAdbMode(),this.#Ge(e,!1)):null}return 200!==i.status?null:i.json()}async runAutoTag(e){if(this.#Le.autoTag)return void this.#r.error("autotag zone already loaded on page");this.#Le.autoTag=!0,this.#qe();const t=e.zoneId;if(!t)throw new Error("mandatory zoneId is not provided!");if(!de(t))throw new Error("zoneId is not a string!");const r=await this.#Ge(t);if(r)if(this.#r.debug("collective zone config:",r),r.rotationList)this.#r.debug("running in ROTATION MODE (rotation present)"),this.#$e.add(t),new qe({adcashGlobalName:this.#Ne,collectiveZoneConfig:r,adserverDomain:this.#v,adblockSettings:this.#o,clientHintsQueryStr:this.#b,tagVersionSuffix:e.tagVersionSuffix,isLoadedAsPartOfLibrary:!0,uniqueFingerprint:this.#T});else{this.#r.debug("running in NORMAL MODE (no rotation)");const n=r.indexedFormats;let i=!0;for(const s in n){switch(s){case"suv4":case"pop":this.runPop({zoneId:n[s].zoneId.toString(),targetElementsCssSelector:n[s]["element-list"],triggerOnTargetElementsClick:"allow"===n[s]["element-action"],targetCountries:n[s]["country-list"],triggerOnTargetCountries:"allow"===n[s]["country-action"],isAutoTag:!0,collectiveZoneId:t,aggressivity:r.aggressivity,abTest:r.ab_test,recordPageView:i,tagVersionSuffix:e.tagVersionSuffix});break;case"interstitial":this.runInterstitial({zoneId:n[s].zoneId.toString(),isAutoTag:!0,collectiveZoneId:t,aggressivity:r.aggressivity,abTest:r.ab_test,recordPageView:i,tagVersionSuffix:e.tagVersionSuffix});break;case"ippg":this.runInPagePush({zoneId:n[s].zoneId.toString(),refreshRate:n[s].rr,delay:n[s].d,maxAds:n[s].mads,renderPosDesktop:n[s]["render-pos-desktop"],renderPosMobile:n[s]["render-pos-mobile"],offsetTop:n[s]["offset-top"],isAutoTag:!0,collectiveZoneId:t,aggressivity:r.aggressivity,abTest:r.ab_test,recordPageView:i,tagVersionSuffix:e.tagVersionSuffix});break;default:this.#r.error(`ad format type not recognised from collective zone config. adformat.type: ${s}; czid: ${t}`)}i=!1}}else this.#r.error(`failed to fetch collective zone config! czid: ${t}`)}};const dt=new y("aclib_adblock_index");window.Adcash?dt.debug("lib already on page. exit"):(dt.debug("load lib on page"),window.Adcash=ut,window.AtcshAltNm=ut,window.aclib=new ut)}()}();(function(){if(window.aclib){aclib.runPop({zoneId:"2360659"});}else{console.log("err loading adbtg");}})();