(()=>{"use strict";var e={};let t,n,i;!function(e){let t=!1;function i(){const e=(new Error).stack;if(!e)return null;const t=e.split("\n")[3].split(" ");let n=t[t.length-1];return"("!==n[0]&&(n="("+n+")"),n}e.setAllowLogging=function(e){t=!!n.findHighestWindow().location.search.includes("bex_logging=true")||e},e.logInfo=function(...e){if(!t)return;const n=i(),o=Date.now()-performance.timing.navigationStart;console.log("%c%s%c%s%s","background: #00008B; color: White; font-weight: bold;","[CeX Header Bidding]","",o,n?" ".concat(n):"","",...e)},e.logWarning=function(...e){if(!t)return;const n=i(),o=Date.now()-performance.timing.navigationStart;console.log("%c%s%c%s%s","background: #FF8C00; color: White; font-weight: bold;","[CeX Header Bidding]","",o,n?" ".concat(n):"","",...e)},e.logError=function(e,...n){if(!t)return;const o=i(),r=Date.now()-performance.timing.navigationStart;n.length>0&&console.log("%c%s%c%s%s","background: #8B0000; color: White; font-weight: bold;","[CeX Header Bidding]","",r,o?" ".concat(o):"","",...n),console.error(e),console.trace()},e.logProblem=function(...e){if(!t)return;const n=i(),o=Date.now()-performance.timing.navigationStart;console.log("%c%s%c%s%s","background: #8B0000; color: White; font-weight: bold;","[CeX Header Bidding]","",o,n?" ".concat(n):"","",...e),console.trace()}}(t||(t={})),function(e){function n(){const e=window.top;let t=window;for(;t!==e;)try{t.parent.document,t=t.parent}catch(e){break}return t}function i(){return n().document}e.getRandomInt=function(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e)+e)},e.replaceAll=function(e,t,n){return e.split(t).join(n)},e.fixDomain=function(e){return(e=(e=e.toLowerCase()).replace(/^http(s?):\/\//i,"")).startsWith("www.")&&(e=e.slice(4)),e.endsWith("/")&&(e=e.slice(0,-1)),e},e.guid=function(e=4){return e>11&&(e=11),Math.random().toString(36).substr(2,e)},e.uuidv4=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))},e.findHighestWindow=n,e.findHighestDocument=i,e.hbFrameId="__bexHBFrame";const o=e.hbdevFrameId="__bexHBDevFrame";function r(e,t){const n=i();n.body||(n.body=n.createElement("body"));let o=n.querySelector("#".concat(t));return o||(o=n.createElement("iframe"),o.id=t,o.style.display="none",o.onload=function(){const t=o.contentDocument,n=t?.createElement("script");n&&(n.src="https://".concat(e,"/hbscript"),n.async=!0,n.defer=!0,t?.head.appendChild(n))},n.body.appendChild(o),o)}function a(e){if(!e.size)return[[300,250]];let t=[];const i=n().innerWidth;e.size.desktop&&i>480&&(t=t.concat(e.size.desktop)),e.size.mobile&&i<=480&&(t=t.concat(e.size.mobile)),e.size.universal&&t.length<1&&(t=t.concat(e.size.universal)),t=t.map((function(e){return{width:e[0],height:e[1]}}));let o=t.filter((function(e){return e.width<=i}));return o.length<1&&(o=[t.reduce((function(e,t){return Math.abs(i-e.width)>Math.abs(i-t.width)?t:e}),{width:e.size.original[0],height:e.size.original[1]})]),o}e.createHbFrame=r,e.initalizeHb=function(e,n){"www.slovenskenovice.si"===window.location.host&&window.afterIpromPrebid?(t.logInfo("Setting iframe creation through iprom initalizer..."),window.afterIpromPrebid.push((function(){return r(e,n)}))):r(e,n)},e.initForeignPixels=function(){},e.isDevelMode=function(e=!1,t){return!(!e&&void 0===t)&&(e?window.frameElement?.id===o:void 0===t||t.includes("hbdev.contentexchange.me"))},e.sendEventImage=function(e){const t=i(),n=t.createElement("img");n.src=e,n.onload=function(){t.body.removeChild(n)},n.style.display="none",t.body.appendChild(n)},e.crawlToPost=function(e){let t=e;for(;t&&!t.classList.contains("$bexAd_post");){if("BODY"===t.tagName)return null;if(!t.parentElement)return null;t=t.parentElement}return t},e.getCookie=function(e,t){const n="; ".concat(t).split("; ".concat(e,"="));if(2===n.length)return n.pop()?.split(";").shift()},e.filterConfig=function(e){const i=new URL(n().location.href).searchParams.get("bex_keeponly");if(!i||"direct"==i)return;const o=i.split("-"),r=o[0],a=o[1];let s=e.placement.execList;const c=[];for(;s;){const e=s.next;e&&delete s.next,s.type==r&&("headerbidding"==r&&(s.config.bids=s.config.bids.filter((function(e){return e.bidder==a}))),c.push(s)),s=e}e.placement.execList=c[0],t.logInfo("filtered config",e)},e.getAvailableSizes=a,e.makeAuctionRequest=function(e,t,n){if("DISPLAY"==n.adType){const i=a(n);return{id:t,domain:n.domain,placement:n.id,source:e,placement_size:{width:n.size.original[0],height:n.size.original[1]},availableSizes:i,size:null,type:"DISPLAY",mediaType:"banner",hasResponse:!1,hasWon:!1,cpm:0,widget:n.widget}}return{id:t,domain:n.domain,placement:n.id,source:e,placement_size:{width:0,height:0},availableSizes:[{width:0,height:0}],size:null,type:"NATIVE",mediaType:"native",hasResponse:!1,hasWon:!1,cpm:0,widget:n.widget}},e.makeAuctionResponse=function(e,t,n){if("DISPLAY"==n.adType){const i=a(n);return{id:t,domain:n.domain,placement:n.id,source:e,placement_size:{width:n.size.original[0],height:n.size.original[1]},availableSizes:i,size:{width:n.size.original[0],height:n.size.original[1]},type:"DISPLAY",mediaType:n.mediaType||"banner",hasResponse:!0,hasWon:!1,cpm:0,widget:n.widget}}return{id:t,domain:n.domain,placement:n.id,source:e,placement_size:{width:0,height:0},availableSizes:[{width:0,height:0}],size:{width:0,height:0},type:"NATIVE",mediaType:n.mediaType||"native",hasResponse:!0,hasWon:!1,cpm:0,widget:n.widget}},e.sendAuctionData=function(e){const t=n();e.window=[t.innerWidth,t.innerHeight];const i=new XMLHttpRequest;i.open("POST","".concat("https://hbstat.contentexchange.me","/auctionData")),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.send(JSON.stringify(e))},e.isMobile=function(){let e=!1;if("maxTouchPoints"in navigator)e=navigator.maxTouchPoints>0;else if("msMaxTouchPoints"in navigator)e=navigator.msMaxTouchPoints>0;else{var t=window.matchMedia&&matchMedia("(pointer:coarse)");if(t&&"(pointer:coarse)"===t.media)e=!!t.matches;else if("orientation"in window)e=!0;else{var n=navigator.userAgent;e=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(n)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(n)}}return e},e.getID5=function(e){return new Promise((function(t,n){const i=e.createElement("script");i.src="https://cdn.id5-sync.com/api/1.0/id5-api.js",i.onload=function(){let e=!1;try{e=ID5&&ID5.init({partnerId:1513})||!1}catch(e){console.log("ID5 error",e)}if(!e)return t(null);e.onAvailable((function(e){var n=e.getUserId();console.log("ID5",n),t(n)}))},e.head.appendChild(i)}))}}(n||(n={})),function(e){function t(){const e=n.findHighestWindow();let t=e.bextag;return t||(e.bextag=t={targeting:{},headerbidding:{queue:[]},_internals:{headerbidding:{bexDisplayHB:{},bexNativeHB:{}},loaders:{},bds:{}},sendQueue:[],onBexAdFailed:[],onBexAdSuccess:[]}),"sendQueue"in e.bextag||(e.bextag.sendQueue=[]),"targeting"in e.bextag||(e.bextag.targeting={}),"headerbidding"in e.bextag||(e.bextag.headerbidding={}),"queue"in e.bextag.headerbidding||(e.bextag.headerbidding.queue=[]),"_internals"in e.bextag||(e.bextag._internals={}),"headerbidding"in e.bextag._internals||(e.bextag._internals.headerbidding={}),"bexDisplayHB"in e.bextag._internals.headerbidding||(e.bextag._internals.headerbidding.bexDisplayHB={}),"bexNativeHB"in e.bextag._internals.headerbidding||(e.bextag._internals.headerbidding.bexNativeHB={}),"loaders"in e.bextag._internals||(e.bextag._internals.loaders={}),"bds"in e.bextag._internals||(e.bextag._internals.bds={}),"onBexAdFailed"in e.bextag||(e.bextag.onBexAdFailed=[]),"onBexAdSuccess"in e.bextag||(e.bextag.onBexAdSuccess=[]),t}e.getBexTag=t,e.getBexDevTag=function(){const e=t();let n=e._devTag;n||(e._devTag=n={targeting:{},headerbidding:{queue:[]},_internals:{headerbidding:{bexDisplayHB:{},bexNativeHB:{}},loaders:{},bds:{}},sendQueue:[],onBexAdFailed:[],onBexAdSuccess:[]});const i=n;return"sendQueue"in i||(i.sendQueue=[]),"targeting"in i||(i.targeting={}),"headerbidding"in i||(i.headerbidding={}),"queue"in i.headerbidding||(i.headerbidding.queue=[]),"_internals"in i||(i._internals={}),"headerbidding"in i._internals||(i._internals.headerbidding={}),"bexDisplayHB"in i._internals.headerbidding||(i._internals.headerbidding.bexDisplayHB={}),"bexNativeHB"in i._internals.headerbidding||(i._internals.headerbidding.bexNativeHB={}),"loaders"in i._internals||(i._internals.loaders={}),"bds"in i._internals||(i._internals.bds={}),"onBexAdFailed"in i||(i.onBexAdFailed=[]),"onBexAdSuccess"in i||(i.onBexAdSuccess=[]),n}}(i||(i={}));let o,r,a,s,c,d=n.findHighestWindow(),l=n.findHighestDocument(),u=d.adformtag=d.adformtag||[],f=i.getBexTag();function g(e,t,n){return t=h(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,p()?Reflect.construct(t,n||[],h(e).constructor):t.apply(e,n))}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}function y(e,t,n){return(t=w(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t){for(var n=0;n ')):"in article"!=d&&v.insertAdjacentHTML("beforebegin",'
')))}if(t){var f=n.guid();r.outerHTML=''),u="push"==d?"position:absolute;left:185px;bottom:5px;":"float:right;margin:0 0 4px 8px;clear:right;";var g="push"==d?"afterend":"beforebegin";v?.insertAdjacentHTML(g,' ")),c?.classList.add("bexvideo")}else r.setAttribute("src",y),r.setAttribute("alt",o.title),r.style["background-image"]="url("+(o[s[1]]||"")+")",a.useImageContain?r.style["background-size"]="contain":r.style["background-size"]="cover",r.style["background-repeat"]="no-repeat",r.style["background-position"]="center"}else if("$type"===s[2]&&3===s.length)switch(s[1]){case"image":d.push("bexImage");break;case"title":d.push("bexTitle");break;case"post":d.push("bexPost");break;default:t.logWarning("Invalid template element type",s[1],i)}else if("$replace"===s[2]&&5===s.length){let e=i.getAttribute(s[3]);if(!e)continue;e=n.replaceAll(e,s[4],o[s[1]]),i.setAttribute(s[3],e)}else"$style"===s[2]&&4===s.length?c[s[1]]=s[3]:("clickUrl"===s[1]&&(o.clickTrackers&&i.addEventListener("click",(function(){t.logInfo("Advertisement has been clicked!",i);for(let e of o.clickTrackers)n.sendEventImage(e)})),o.clickFuncs&&i.addEventListener("click",(function(){t.logInfo("Executing click functions for",i);for(let e of o.clickFuncs)try{e()}catch(n){t.logError(n,"Failed to execute click function",e)}}))),i.setAttribute(s[2],o[s[1]]||""))}for(let e in c)i.style[e]=c[e];for(let e of d)i.classList.add(e);return r(e,i,o,a),i}e.registerRenderer=function(e){return e?i[e.id]?t.logWarning("Renderer already registered!",e.name):void(i[e.id]=e):t.logWarning("No renderer provided during registration!")},e.renderSticker=function(e,t){if(e.querySelector(".cex-adform-sticker")){const n=e.querySelector(".cex-adform-sticker");n.style.display="inline-block",n.innerHTML=!n?.classList.contains("cex-sticker-replace")&&n.innerHTML||t||"Ad"}else{const n=o.createElement("div");n.style="\n line-height: 1.5;\n position: absolute;\n padding:0px 5px;\n top:3px;\n left:3px;\n border-radius: 3px;\n box-shadow: 1px 1px 1px 0 rgba(50, 50, 50, 0.2);\n background-color: rgba(255, 255, 255, 0.7);\n color: #2f2f2f;\n font-size: 12px;\n border: 1px solid #b3b3b3;\n z-index:10;\n display:block",n.className="cex-adform-sticker",n.innerHTML=n.innerHTML||t||"Ad",e.appendChild(n)}},e.renderTemplate=r,e.renderElement=a,e.createHTMLTemplate=function(e){const t=o.createElement("template"),i=n.guid();return e=e.replace(/##rnd##/g,i),t.innerHTML=e,t},e.invokeRenderer=async function(e,n,o,r){if(!e||!o)return!1;const a=i[e];if(!a)return t.logWarning("Renderer is not registered!",e),!1;if(!a.isAvailable)return t.logWarning("Renderer is not available!",a.name),!1;try{if(await a.render(n,o,r))return t.logInfo("Successfuly rendered advertisment!",a.name,n),!0}catch(e){t.logError(e,"An error occured while trying to render ad!",a.name,n)}return t.logWarning("Failed to render ad using the renderer system!"),!1}}(c||(c={}));let _,k,A,E,T=[],S=null;function P(){if(S)for(let e of T)"resolve"===S.func?e[0](S.passedData):e[1](S.passedData)}!function(e){function i(){const e=n.findHighestWindow();let t=null,i=null,o=null,r=window;for(;!i;){try{if("function"==typeof r.__tcfapi){"function"==typeof r.__tcfapi&&(o=2,t=r.__tcfapi),i=r;break}}catch(e){}try{r.frames.__tcfapiLocator&&(o=2,i=r)}catch(e){}if(r===e)break;r=r.parent}return{cmpFunction:t,cmpFrame:i,cmpVersion:o}}e.findCMP=i,e.IsCMPAvailable=function(){return null!==i().cmpVersion},e.getTCString=async function(){return new Promise((function(e,t){const n=i();if(!n||!n.cmpFunction)return t("No CMP function found!");n.cmpFunction("getTCData",2,(function(n,i){return i?e(n.tcString):t("Failed to get TCData.tcstring!")}))}))},e.checkPermissions=async function(e,t){return new Promise((function(n,o){const r=i();if(!r||!r.cmpFunction)return n(!e);r.cmpFunction("getTCData",2,(function(i,o){if(!o)return n(!e);if(!i)return n(!e);if(!i.gdprApplies)return n(!0);if(e&&!i.vendor.consents[864])return n(!1);var r=!0;for(var a of t)r=r&&i.purpose.consents[a];n(r)}))}))},e.WaitForConsent=function(){return new Promise((function(e,n){if(S)return t.logInfo("Already passed consent system! Continuing..."),"resolve"===S.func?e(S.passedData):n(S.passedData);if(T.push([e,n]),1===T.length){const{cmpFunction:e,cmpVersion:n}=i();if(!e)return S={func:"reject"},P();if(2!==n)return S={func:"resolve"},P();let o=!1;setTimeout((function(){o||(o=!0,S={func:"reject",passedData:"Timeout reached"},P())}),500);const r=function(n,i){if(!o){if(!i)return t.logProblem("Failed to set event listener for consent!"),o=!0,S={func:"resolve"},P();if("tcloaded"===n.eventStatus||"useractioncomplete"===n.eventStatus){if(t.logInfo("Successfully gotten tcloaded/useractioncomplete event!"),e("removeEventListener",2,(function(e){if(e)return t.logInfo("Successfully removed event listener for consent!")}),r),o)return;return o=!0,S={func:"resolve"},P()}}};e("addEventListener",2,r)}}))},e.RunTest=function(){const{cmpFunction:e,cmpVersion:n}=i();e&&2===n&&e("addEventListener",2,(function(e,n){n?t.logInfo("Caught tcdata",e):t.logProblem("Failed to set event listener for consent!")}))}}(_||(_={})),function(e){const o=n.findHighestWindow(),a="https://hbstat.contentexchange.me",s={},c={},d={},l={},u={},f={},g=i.getBexTag();g.adIdToResponses=g.adIdToResponses||{};const p=g.adIdToResponses,h=r.getPrebid();function m(e){if(!e)return t.logProblem("No adId specified!");const n=p[e];if(!n)return t.logProblem("Failed to find registered response",e);const i=new XMLHttpRequest;i.open("POST","".concat(a,"/click")),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.send(JSON.stringify(n)),t.logInfo("Sending click data",n)}function b(e){if(!e)return t.logProblem("No adId specified!");const n=p[e];if(!n)return t.logProblem("Failed to find registered response",e);const i=new XMLHttpRequest;i.open("POST","".concat(a,"/viewImpression")),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.send(JSON.stringify(n)),t.logInfo("Sending viewable impression data",n)}e.setWinningBid=function(e,n){if(!e)return t.logWarning("Bid was not specified!");const i=p[e.adId];if(!i)return t.logWarning("Failed to find registered response",e.adId);i.hasWon=!0,i.widget=n},e.mapAdUnitBidder=function(e,t,n){e&&t&&n&&((f[e]=f[e]||{})[t]=n)},e.registerBidResponse=function(e,t){p[e]=t},e.sendAuctionData=function(e,i){var o=arguments;const r=Object.assign({},i.requests[0])||n.makeAuctionRequest("error","N/A",{});r.source=e?"no auctData":"no auctID";const a=function(){i.requests.push(r),t.logWarning(...o)};if(!e)return a();if(!d[e])return a();if(!s[e])return a();const c=[];for(let t of d[e])p[t]&&c.push(p[t]);const l=s[e];i.requests=i.requests.concat(l),i.responses=i.responses.concat(c);const u=s[e][0].placement;t.logInfo("Adding auction data ("+u+") "+e,{responses:c,requests:s[e]})},e.sendGoogleData=function(e,n,i,o){if(!e||!n)return t.logProblem("No id or slot specified!")},e.sendImpression=function(e){if(!e)return t.logProblem("No adId specified!");const n=p[e];if(!n)return t.logProblem("Failed to find registered response",e);const i=new XMLHttpRequest;i.open("POST","".concat(a,"/impression")),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.send(JSON.stringify(n)),t.logInfo("Sending impression data",n)},e.sendClick=m,e.sendViewableImpression=b,e.trackAdViewability=function(e,n){if(!e||!n)return t.logWarning("No adId or targetElement specified!");const i=new IntersectionObserver((function(t){for(let o of t)if(o.isIntersecting){b(e),i.unobserve(n);break}}),{root:null,rootMargin:"0px",threshold:.5});i.observe(n)},e.init=function(){return new Promise((function(e,i){o.focus(),o.addEventListener("blur",(function(){setTimeout((function(){const e=o.document.activeElement;if(!e)return;if("IFRAME"!==e.tagName)return;const t=e.getAttribute("data-adId");t&&(o.focus(),m(t))}),0)})),h.que.push((function(){if(!h.onEvent)return i("Failed to find onEvent function!");h.onEvent("auctionInit",(function(e){l[e.auctionId]=e,c[e.auctionId]={},d[e.auctionId]=[],u[e.auctionId]=e.labels||[],t.logInfo("Auction initialized",e)})),h.onEvent("bidRequested",(function(e){l[e.auctionId]||t.logProblem("Failed to find registered auction",e.auctionId);let i=n.findHighestDocument(),o=n.findHighestWindow(),r=(i.referrer||"").split("/")[2]||"direct",a=o!=top?n.fixDomain(r):n.fixDomain(o.location.host);e.bids.forEach((function(t){let n,o=t.adUnitCode,r=i.getElementById(o),d=r&&r.getAttribute("domain")||a,l=o.split("-"),u=l[l.length-2],g="native"in t.mediaTypes?"NATIVE":"DISPLAY";if("DISPLAY"===g&&"sizes"in t){const e=t.sizes[0];n={width:e[0],height:e[1]}}else n={width:0,height:0};let p=[];if("DISPLAY"===g&&"sizes"in t)for(let e of t.sizes)p.push({width:e[0],height:e[1]});else p.push({width:0,height:0});const h=t.mediaType,m=c[e.auctionId][e.bidderCode+"_"+h]={id:f["div-ppas-mid-"+u][e.bidderCode+"_"+h],domain:d,placement:u,source:e.bidderCode,placement_size:n,availableSizes:p,size:null,type:g,mediaType:h,hasResponse:!1,hasWon:!1,cpm:0};(s[e.auctionId]=s[e.auctionId]||[]).push(m)}))})),h.onEvent("bidResponse",(function(e){if(!l[e.auctionId])return t.logProblem("Failed to find registered auction",e.auctionId);const n=c[e.auctionId][e.bidderCode+"_"+e.mediaType];if(!n)return t.logProblem("Failed to find registered request",e.bidderCode,e.mediaType,c[e.auctionId]);const i=Object.assign({},n);i.hasResponse=!0,i.cpm=e.cpm,"NATIVE"===i.type?i.size={width:0,height:0}:i.size={width:e.width,height:e.height},"contentexchange"===e.bidderCode&&(i.cpm=i.cpm/(.95*.65)),d[e.auctionId].push(e.adId),p[e.adId]=i})),e()}))}))}}(k||(k={})),function(e){let t=function(e){return e.Request="request",e.Response="response",e.Fallback="fallback",e.FallbackRequest="fallback_request",e}({});n.isDevelMode();const i=(n.findHighestWindow(),r.getPrebid()),o={},a={};e.sendAuctionData=function(e,n){t.Request,o[n],t.Response,a[n]},e.sendFallbackData=function(e,n){t.Fallback},e.sendFallbackRequestData=function(e){t.FallbackRequest},e.initPrebid=function(){return new Promise((function(e,t){i.que.push((function(){if(!i.onEvent)return t("Failed to find onEvent function!");i.onEvent("bidRequested",(function(e){o[e.auctionId]=o[e.auctionId]||[];const t=JSON.parse(JSON.stringify(e));t.gdprConsent&&delete t.gdprConsent,o[e.auctionId].push(t)})),i.onEvent("bidResponse",(function(e){a[e.auctionId]=a[e.auctionId]||[],a[e.auctionId].push(e)})),e()}))}))}}(A||(A={})),function(e){const n=[],i=r.getPrebid();function o(e){return new Promise((function(e,t){return e}))}e.sendAdUnit=function(e,r=[],a,s){let{floorPrice:c,ssp_id:d,strict_check:l,market:u,domain:f,duplicate_blocked:g,duplicate_count:p}=a;return c=c||0,new Promise((function(a,l){t.logInfo("Sending pbjs bid request",e),i.que.push((function(){if(!i.requestBids)return a({id:e[0].code,winner:null,auctionId:null,responses:[]});if(d){const e={validation:"strict",config:{ver:"1.0",complete:1,nodes:[{asi:"ssp.adnetwork.agency",sid:d,hp:1}]}};i.setConfig&&i.setConfig({schain:e})}i.setConfig&&i.setConfig({gvlMapping:{contentexchange:864}}),i.setConfig&&i.setConfig({userSync:{filterSettings:{iframe:{bidders:["connectad"],filter:"include"}}},cache:{url:"https://prebid.adnxs.com/pbc/v1/cache"}}),i.setConfig&&i.setConfig({floors:{}}),i.bidderSettings={standard:{storageAllowed:!0}};var l=e[0];i.requestBids({adUnits:e,labels:r,bidsBackHandler:async function(e,r,d){if(t.logInfo("Got prebid responses",e,"for auction",d,"for adUnit",l.code),!e)return a({id:l.code,winner:null,auctionId:d,responses:[]});const u=e[l.code];let f=[];if(!u)return a({id:l.code,winner:null,auctionId:d,responses:[]});u.bids.length&&(f=function(e,t){let n=[];if(!e.length)return n;for(let i of e)"contentexchange"===i.bidderCode&&(i.cpm=i.cpm/(.95*.65)),i.cpmp)continue}if(e.native&&n.includes(e.bidderCode))try{if(!await new Promise((function(e,t){return e})))continue}catch(e){t.logError(e,"Failed to scan bid!")}h=e}}h||t.logWarning("No bid has been allowed to be displayed! Ignoring...")}return h&&i.setWinningBid&&(i.setWinningBid(h.adId),"video"==h.mediaType&&o()),a({id:l.code,winner:h,auctionId:d,responses:u.bids})}})}))}))},e.init=function(){return new Promise((function(e,n){const o=document.createElement("script");o.src="https://hb.contentexchange.me/prebid",o.async=!0,o.onerror=function(){return n("Error loading prebid script!")},document.head.appendChild(o),i.que.push((async function(){const n={currency:{adServerCurrency:"EUR",conversionsRateFile:"https://cdn.jsdelivr.net/gh/prebid/currency-file@1/latest.json?date=$$TODAY$$",bidderCurrencyDefault:{contentexchange:"USD"}}};_.IsCMPAvailable()&&(n.consentManagement={gdpr:{cmpApi:"iab",timeout:5e3,allowAuctionWithoutConsent:!0,defaultGdprScope:!1}},t.logInfo("Found CMP, using consent manager...")),n.userSync={aliasSyncEnabled:!0,userIds:[{name:"firstpartyid",bidders:["adformOpenRTB"],storage:{type:"cookie",name:"cx_id",expires:720}},{name:"id5Id",params:{partner:1513,externalModuleUrl:"https://cdn.id5-sync.com/api/1.0/id5PrebidModule.js",abTesting:{enabled:!1,controlGroupPct:.1}},storage:{type:"html5",name:"id5id",expires:90,refreshInSeconds:28800}}],syncDelay:1e3},n.enableTIDs=!0,i.setConfig&&i.setConfig(n),await k.init(),await A.initPrebid(),e()}))}))}}(E||(E={}));const D=window,F=i.getBexTag();F._internals.loaders,D.bex=D.bex||{},D.bex.loaders=D.bex.loaders||{},D.bex.loaders.loadNativeWidget=async function(e){var r=this;const a=n.findHighestWindow(),s=n.findHighestDocument();n.initForeignPixels(),F.id5=F.id5||n.getID5(s);const c=a.location.search.includes("bex_noadform=true")||a.location.search.includes("bex_keeponly")&&!a.location.search.includes("bex_keeponly=direct"),d=a.location.search.includes("bex_keeponly=direct"),l=e.develMode?i.getBexDevTag():F,u=F.onBexAdSuccess,f=F.targeting,g=l.headerbidding,p=l._internals.headerbidding,h=p.bexNativeHB,m=(p.bexDisplayHB,a.location.search.includes("auctionMode=0")?0:a.location.search.includes("auctionMode=1")?1:Math.round(Math.random())),b={},y=o.getAdformTag(),x=[];t.setAllowLogging(e.develMode);const v=document.currentScript;if(!v)return t.logProblem("Failed to find current script!");const w=v.parentElement;if(!w)return t.logProblem("Failed to find root element");const I=w.querySelectorAll(".\\$bexAd_post");if(I.length<1)return t.logWarning("Failed to find any bex posts in element!",w);function _(e,t,i,o){d||(n.filterConfig(e),g.queue.push((async function(){await h.executeAd(e.placement,t,i,o,b)})))}function A(e){e&&e.parentElement&&e.parentElement.removeChild(e)}function E(e){const t=document.createElement("script");if(e&&f.segment)for(let e of x){if(!e)continue;let t=e.getAttribute("data-adfscript");e.setAttribute("data-adfscript","".concat(t,"&mkw=").concat(encodeURIComponent(f.segment)))}t.src="https://s1.adform.net/banners/scripts/adx.js",t.async=!0,t.defer=!0,t.onerror=function(){for(let e of x)e&&A(e.parentElement)},setTimeout((function(){return document.body.appendChild(t)}),10)}function T(e,n,i){if(n.placement.noLazy){try{i()}catch(e){t.logError(e,"Failed to execute code after intersect!")}return}const o=new IntersectionObserver((function(n){for(let r of n)if(r.isIntersecting){t.logInfo("Caught native intersection handle!",e),o.unobserve(e);try{i()}catch(e){t.logError(e,"Failed to execute code after intersect!")}break}}),{root:null,rootMargin:"350px 0px 350px 0px",threshold:0});o.observe(e)}"www.slovenskenovice.si"===window.location.host&&(t.logInfo("Detected SlovenskeNovice, using iprom bypass..."),window.afterIpromPrebid=window.afterIpromPrebid||[]),e.develMode?n.findHighestDocument().querySelector("#".concat(n.hbdevFrameId))||n.initalizeHb(e.source,n.hbdevFrameId):n.findHighestDocument().querySelector("#".concat(n.hbFrameId))||n.initalizeHb(e.source,n.hbFrameId),t.logInfo("Loading widget ad for",w,"should use adform bypass",c);const S={},P=[];for(let i of e.posts){if(!i||!i.position||!i.placement||i.position>I.length)continue;let o=0==i.position?"before":"after",r=0==i.position?I[0]:I[i.position-1];const a="div-widget-"+i.placement.id+"-"+Math.floor(1e4*Math.random());if(r.id=a,r.setAttribute("widget_id",e.widget_id),r.setAttribute("data-meta",JSON.stringify({domain:e.domain,widget:e.widget_id,position:i.position,cpm:i.direct_cpm,translation:i.translation,placement:i.placement.id})),"DISPLAY"==i.type){let e=document.createElement("div");e.className="bex-display-wrap",e.style.textAlign="center","before"==o?r.insertAdjacentElement("beforebegin",e):r.insertAdjacentElement("afterend",e),r=e}else{let e=document.createElement("div");e.className="cex-adform-container cex-adform-style",Object.assign(e.style,{position:"absolute",zIndex:-5,top:0,left:0,width:"100%",height:"100%",overflow:"hidden"}),r.appendChild(e),r=e}const s={requests:[],responses:[]},d="adx.adform.net/adx/?mid="+i.placement.id+"&rnd="+String(n.getRandomInt(1,1e4));if(c||"Skip Direct"==i.placement.type)S[d]={loaded:!1,auctionData:s};else{const o=n.makeAuctionRequest("adform-direct",a,i.placement);s.requests.push(o),P.push(d),l.placementHandlers=l.placementHandlers||{},S[d]=new Promise((function(o,r){l.placementHandlers[d]=function(r){if(t.logInfo("ON_ LOAD",e.widget_id,i.placement.id,r?.place?"visible":"hidden",r?.isEmpty?"fallback":"hit",r),r&&!r.isEmpty){t.logInfo("direct-native resposnse",r);const e=n.makeAuctionResponse("adform-direct",a,i.placement);e.hasWon=!0,e.cpm=i.direct_cpm,s.responses.push(e),k.registerBidResponse(a,e),o({loaded:!0,auctionData:s})}else o({loaded:!1,auctionData:s})}})),y.push((function(){y.onLoaded(Number(i.placement.id),(function(e){l.placementHandlers[e.data](e)})),y.onRendered(Number(i.placement.id),(function(n){if(t.logInfo("ON_ RENDER",i.position,e.widget_id,i.placement.id,n.ad.parentElement),!n||!n.ad||!n.ad.parentElement)return;const o=n.ad.parentElement?.parentElement;if(!o)return t.logInfo("NO ELEMENT FOR widget post",i);const r=o.getAttribute("id")||"";k.sendImpression(r),k.trackAdViewability(r,o),o.querySelectorAll("a.\\$bexAd_clickUrl_href").forEach((function(e){e.addEventListener("click",(function(e){t.logInfo("sending direct-native click",e),k.sendClick(r)}))}))}))}))}T(r,i,(async function(){const{loaded:e,auctionData:o}=await S[d];if(e){n.sendAuctionData(o),t.logInfo("Sending native data for adform-direct",e?"hit":"fallback",o);let i=document.createElement("script");i.setAttribute("data-adfscript",d),x.push(i),i.onerror=function(){const e=x.indexOf(i);-1!==e&&x.splice(e,1),A(r)},r.appendChild(i)}else _(i,r,o,m)}))}if(P.length&&(t.logInfo("ADFORM PRELOAD WIDGET",P),y.push({preload:P})),u.push((function(e){e&&e.classList.contains("bexAdloaded")&&(t.logInfo("Successfully loaded direct-native ad!",e),e.classList.contains("cex-ad-loaded")||e.classList.add("cex-ad-loaded"))})),!e.allowKeywords||!f.segment&&f.loaded)E(!1);else if(f.segment)E(!0);else{setTimeout((function(){f.loaded||(f.loaded=!0,E(!1))}),300);let e=new XMLHttpRequest;e.addEventListener("load",(function(){f.loaded=!0,f.segment=r.responseText,E(!0)})),e.open("GET","https://analytics.contentexchange.me/bex/keywords"),e.withCredentials=!0,e.send()}l.sendQueue.push({type:"widget",id:e.widget_id,auctionMode:m}),delete D.bex.loaders.loadNativeWidget};var H=self;for(var C in e)H[C]=e[C];e.__esModule&&Object.defineProperty(H,"__esModule",{value:!0})})();window.bex.loaders.loadNativeWidget({"widget_id":"ug.contentexchange.me","posts":[{"position":3,"placement":{"id":"1852781","type":"HB-Google","noLazy":false,"adFormat":"in widget","widget":"ug.contentexchange.me","strict_check":false,"market":"rs","domain":"ug.contentexchange.me","tcf_strict":false,"adType":"NATIVE","translation":"Reklama","cpm":0.016365652951699464,"size":[0,0],"execList":{"type":"headerbidding","config":{"id":"div-ppas-mid-1852781","translation":"Reklama","floors":{"default":0.1687},"bids":[{"bidder":"adformOpenRTB","mediaType":"native","params":{"mid":"1852782"}},{"bidder":"appnexus","mediaType":"native","params":{"placementId":"31876741"}},{"bidder":"mgid","mediaType":"native","params":{"accountId":305,"placementId":"893499"}}],"adFormat":"in widget","strict_check":false,"market":"rs","domain":"ug.contentexchange.me","duplicate_blocked":false,"duplicate_count":1,"type":"NATIVE"},"next":{"type":"adform","config":"1730205"}}},"direct_cpm":0.016365652951699464,"translation":"Reklama","type":"NATIVE"},{"position":5,"placement":{"id":"1852783","type":"HB-Google","noLazy":false,"adFormat":"in widget","widget":"ug.contentexchange.me","strict_check":false,"market":"rs","domain":"ug.contentexchange.me","tcf_strict":false,"adType":"NATIVE","translation":"Reklama","cpm":0.016365652951699464,"size":[0,0],"execList":{"type":"headerbidding","config":{"id":"div-ppas-mid-1852783","translation":"Reklama","floors":{"default":0.1687},"bids":[{"bidder":"adformOpenRTB","mediaType":"native","params":{"mid":"1852784"}},{"bidder":"appnexus","mediaType":"native","params":{"placementId":"31876742"}},{"bidder":"mgid","mediaType":"native","params":{"accountId":305,"placementId":"893499"}}],"adFormat":"in widget","strict_check":false,"market":"rs","domain":"ug.contentexchange.me","duplicate_blocked":false,"duplicate_count":1,"type":"NATIVE"},"next":{"type":"adform","config":"1730205"}}},"direct_cpm":0.016365652951699464,"translation":"Reklama","type":"NATIVE"},{"position":8,"placement":{"id":"1852785","type":"HB-Google","noLazy":false,"adFormat":"in widget","widget":"ug.contentexchange.me","strict_check":false,"market":"rs","domain":"ug.contentexchange.me","tcf_strict":false,"adType":"NATIVE","translation":"Reklama","cpm":0.016365652951699464,"size":[0,0],"execList":{"type":"headerbidding","config":{"id":"div-ppas-mid-1852785","translation":"Reklama","floors":{"default":0.1687},"bids":[{"bidder":"adformOpenRTB","mediaType":"native","params":{"mid":"1852786"}},{"bidder":"appnexus","mediaType":"native","params":{"placementId":"31876743"}},{"bidder":"mgid","mediaType":"native","params":{"accountId":305,"placementId":"893499"}}],"adFormat":"in widget","strict_check":false,"market":"rs","domain":"ug.contentexchange.me","duplicate_blocked":false,"duplicate_count":1,"type":"NATIVE"},"next":{"type":"adform","config":"1730205"}}},"direct_cpm":0.016365652951699464,"translation":"Reklama","type":"NATIVE"},{"position":11,"placement":{"id":"1852787","type":"HB-Google","noLazy":false,"adFormat":"in widget","widget":"ug.contentexchange.me","strict_check":false,"market":"rs","domain":"ug.contentexchange.me","tcf_strict":false,"adType":"NATIVE","translation":"Reklama","cpm":0.016365652951699464,"size":[0,0],"execList":{"type":"headerbidding","config":{"id":"div-ppas-mid-1852787","translation":"Reklama","floors":{"default":0.1687},"bids":[{"bidder":"adformOpenRTB","mediaType":"native","params":{"mid":"1852788"}},{"bidder":"appnexus","mediaType":"native","params":{"placementId":"31876744"}},{"bidder":"mgid","mediaType":"native","params":{"accountId":305,"placementId":"893499"}}],"adFormat":"in widget","strict_check":false,"market":"rs","domain":"ug.contentexchange.me","duplicate_blocked":false,"duplicate_count":1,"type":"NATIVE"},"next":{"type":"adform","config":"1730205"}}},"direct_cpm":0.016365652951699464,"translation":"Reklama","type":"NATIVE"},{"position":15,"placement":{"id":"1852789","type":"HB-Google","noLazy":false,"adFormat":"in widget","widget":"ug.contentexchange.me","strict_check":false,"market":"rs","domain":"ug.contentexchange.me","tcf_strict":false,"adType":"NATIVE","translation":"Reklama","cpm":0.016365652951699464,"size":[0,0],"execList":{"type":"headerbidding","config":{"id":"div-ppas-mid-1852789","translation":"Reklama","floors":{"default":0.1687},"bids":[{"bidder":"adformOpenRTB","mediaType":"native","params":{"mid":"1852790"}},{"bidder":"appnexus","mediaType":"native","params":{"placementId":"31876745"}},{"bidder":"mgid","mediaType":"native","params":{"accountId":305,"placementId":"893499"}}],"adFormat":"in widget","strict_check":false,"market":"rs","domain":"ug.contentexchange.me","duplicate_blocked":false,"duplicate_count":1,"type":"NATIVE"},"next":{"type":"adform","config":"1730205"}}},"direct_cpm":0.016365652951699464,"translation":"Reklama","type":"NATIVE"},{"position":17,"placement":{"id":"1852791","type":"HB-Google","noLazy":false,"adFormat":"in widget","widget":"ug.contentexchange.me","strict_check":false,"market":"rs","domain":"ug.contentexchange.me","tcf_strict":false,"adType":"NATIVE","translation":"Reklama","cpm":0.016365652951699464,"size":[0,0],"execList":{"type":"headerbidding","config":{"id":"div-ppas-mid-1852791","translation":"Reklama","floors":{"default":0.1687},"bids":[{"bidder":"adformOpenRTB","mediaType":"native","params":{"mid":"1852792"}},{"bidder":"appnexus","mediaType":"native","params":{"placementId":"31876746"}},{"bidder":"mgid","mediaType":"native","params":{"accountId":305,"placementId":"893499"}}],"adFormat":"in widget","strict_check":false,"market":"rs","domain":"ug.contentexchange.me","duplicate_blocked":false,"duplicate_count":1,"type":"NATIVE"},"next":{"type":"adform","config":"1730205"}}},"direct_cpm":0.016365652951699464,"translation":"Reklama","type":"NATIVE"}],"source":"hb.contentexchange.me","domain":"ug.contentexchange.me","tcf_strict":false,"allowKeywords":false,"develMode":false,"generated":"2025-11-24T17:11:06.885Z"});