ads.sportslocalmedia.com
Open in
urlscan Pro
2606:4700:10::6816:c4e
Public Scan
URL:
https://ads.sportslocalmedia.com/slm.prebid.forumfree.js
Submission: On September 30 via api from IT — Scanned from IT
Submission: On September 30 via api from IT — Scanned from IT
Form analysis
0 forms found in the DOMText Content
!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";var e,t,n,i,r,o,s,a,d,l,c,u,p,m,f,g,h,v,b,y,w,I,T,C,A=Object.defineProperty,E=e=>{throw TypeError(e)},S=(e,t,n)=>((e,t,n)=>t in e?A(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),x=(e,t,n)=>t.has(e)||E("Cannot "+n),k=(e,t,n)=>(x(e,t,"read from private field"),n?n.call(e):t.get(e)),_=(e,t,n)=>t.has(e)?E("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),U=(e,t,n,i)=>(x(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),R=(e,t,n)=>(x(e,t,"access private method"),n);function O(e,t,n,i){if("function"!=typeof n)throw new Error("method for before hook must be a function");return i||(i={}),Array.isArray(t)?t.reverse().reduce(((t,n)=>O.bind(null,e,n,t,i)),n)():Promise.resolve().then((()=>e.registry[t]?e.registry[t].reduce(((e,t)=>t.hook.bind(null,e,i)),n)():n(i)))}function D(e,t,n,i){const r=i;e.registry[n]||(e.registry[n]=[]),"before"===t&&(i=(e,t)=>Promise.resolve().then(r.bind(null,t)).then(e.bind(null,t))),"after"===t&&(i=(e,t)=>{let n;return Promise.resolve().then(e.bind(null,t)).then((e=>(n=e,r(n,t)))).then((()=>n))}),"error"===t&&(i=(e,t)=>Promise.resolve().then(e.bind(null,t)).catch((e=>r(e,t)))),e.registry[n].push({hook:i,orig:r})}function B(e,t,n){if(!e.registry[t])return;const i=e.registry[t].map((e=>e.orig)).indexOf(n);-1!==i&&e.registry[t].splice(i,1)}const P=Function.bind,j=P.bind(P);function N(e,t,n){const i=j(B,null).apply(null,n?[t,n]:[t]);e.api={remove:i},e.remove=i,["before","error","after","wrap"].forEach((i=>{const r=n?[t,i,n]:[t,i];e[i]=e.api[i]=j(D,null).apply(null,r)}))}const q=new{Singular:function(){const e=Symbol("Singular"),t={registry:{}},n=O.bind(null,t,e);return N(n,t,e),n},Collection:function(){const e={registry:{}},t=O.bind(null,e);return N(t,e),t}}.Collection;const $=new class{constructor(e){this.subscribers=[],this.state=e}setState(e){return this.state=Object.assign(Object.assign({},this.state),"function"==typeof e?e(this.state):e),Promise.all(this.subscribers.map((e=>e(this.state))))}getAdUnits(){return Object.values(this.state.adUnits)}subscribe(e){this.subscribers.push(e)}unsubscribe(e){this.subscribers=this.subscribers.filter((t=>t!==e))}getAdUnitsById(e){return e.map((e=>this.state.adUnits[e]))}getAdUnitById(e){return this.state.adUnits[e]}getAdUnitByHtml(e){return this.getAdUnits().find((t=>t.htmlId===e))}}({adUnits:{},metaAdUnits:{}}),F=(e,t,n=[])=>(Object.keys(e).forEach((i=>{if(0===n.length||n.length>0&&-1!==n.indexOf(i)){if("object"==typeof e[i]&&!Array.isArray(e[i])&&void 0!==t[i])return F(e[i],t[i]);t[i]=-1===Object.keys(t).indexOf(i)?e[i]:t[i]}})),t);const M=()=>"true"===(e=>{const t=new RegExp(`[\\?&]${e}=([^&#]*)`).exec(null===window||void 0===window?void 0:window.location.search);return null===t?"":decodeURIComponent(t[1].replace(/\+/g," "))})("slmpbjs_debug"),z=()=>null!==localStorage.getItem("akcelo_demo");const L=()=>{let e=!1;var t;return t=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0),e},V=(e,t=null)=>{const n=[];if("string"==typeof e)return e;if(0===e.length)return"nosize";return Array.isArray(e)&&e.forEach((e=>{n.push(function(e,t){let n=null;return t&&"native"===t?"native":"string"==typeof e?e:(2===e.length&&(n=`${e[0]}x${e[1]}`),n&&t&&"video"===t?"video-".concat(n):n||"unknown")}(e,t))})),n},W=()=>({url:"https://ads.sportslocalmedia.com/akceloOutstream.js",render:e=>{new window.AkceloOutstream(e)}}),G=(e="0",t="0")=>{const n=document.createElement("iframe");return n.width=e,n.height=t,n.style.border="0",n.setAttribute("scrolling","no"),n.setAttribute("marginheight","0"),n.setAttribute("marginwidth","0"),n.setAttribute("topmargin","0"),n.setAttribute("leftmargin","0"),n.setAttribute("allowtransparency","true"),n};class H{constructor(e){this.additionalPrefix=e,this.isDebugOn=M()}getInitialPrefix(){return this.additionalPrefix?`%cAkcelo Ads | ${this.additionalPrefix}`:"%cAkcelo Ads"}getDecoration(e){return`display: inline-block; color: #fff; background: ${e}; padding: 1px 4px; border-radius: 3px;`}debug(...e){this.isDebugOn&&console.debug(`${this.getInitialPrefix()}%cDEBUG`,this.getDecoration("#034154"),this.getDecoration("#C2B2B4"),...e)}info(...e){this.isDebugOn&&console.info(`${this.getInitialPrefix()}%cINFO`,this.getDecoration("#034154"),this.getDecoration("#2176AE"),...e)}warn(...e){this.isDebugOn&&console.warn(`${this.getInitialPrefix()}%cWARNING`,this.getDecoration("#034154"),this.getDecoration("#FFBC0A"),...e)}error(...e){this.isDebugOn&&console.error(`${this.getInitialPrefix()}%cERROR`,this.getDecoration("#034154"),this.getDecoration("#D7263D"),...e)}}const J=["smartadserver"],K=["teads","seedtag","gumgum","sublime","invibes"],X=["skin","its"],Y="akcelo_session_id",Q="akcelo:load",Z="akcelo:gamRequest",ee="akcelo:bidRequest",te={AUCTION_INIT:"auctionInit",AUCTION_END:"auctionEnd",BID_TIMEOUT:"bidTimeout",BID_REQUESTED:"bidRequested",BID_RESPONSE:"bidResponse",BID_WON:"bidWon",NO_BID:"noBid"},ne="bidResponse",ie="bidRejected",re="noBid",oe="running",se="bidTimeout",ae="forbidden",de="4",le="5",ce="6",ue="7",pe=["CH","UZ","EC","AX","GT","PA","ID","CA","SV","HN","VN","PE","US","AE","RO","BE","LU","BD","KM","GR","BR","TH","CR","PH","GE"],me=["KG","HU","KN","NO","NZ","MX","LT","DE","FR","CZ","CO","LI","CL","MY","SK","AR","UA","ES","IE","JP","BL","AT","GB","NL","MD","EE","KR","TR","RS","KZ","ET","LS","GF","PL","PT","IT","UY","IN","MC","GP","ZA","LV","SG","EG","JM","QA","PK","AM","PY","BB","BS","SA","TW","MZ","DO","TZ","BA","AZ","ME","HK","NI","AO","MO","OM","SE","IL","HR"],fe=new H("Config Manager");const ge=new class{constructor(){this.config={adUnits:[],params:{}},this.adUnits=new Map,this.metaAdUnits=new Map,this.defaultSharedParams={},this.defaultSetupParams={gamMode:"allowed",gdprApplies:!0,allowedDomains:[],siteId:0,refresh:{enabled:!1,capping:12,timeout:3e4},userSync:{amxId:!0,id5Id:!0,pairId:!0,criteoId:!0,teadsId:!0,sharedId:!0},contextTargeting:{userVisitDuration:{VERY_LOW:0,LOW:10,MEDIUM:20,HIGH:30,VERY_HIGH:60},pageVisitDuration:{VERY_LOW:0,LOW:10,MEDIUM:20,HIGH:30,VERY_HIGH:60}},loadGoogleExoticSlots:!0},this.defaultAdUnitParams={multipleSpawn:!1,partners:{adExchange:{enabled:!1,allowAtRefresh:!1},openBidding:{enabled:!0}}}}load(e){var t,n,i,r,o;fe.info("Processing config",e),this.config=e;const s=Object.assign(Object.assign({},this.defaultSharedParams),this.defaultSetupParams),a=Object.assign(Object.assign({},this.defaultSharedParams),this.defaultAdUnitParams);return this.config.params=F(s,this.config.params||{}),this.config.adUnits=null===(t=this.config.adUnits)||void 0===t?void 0:t.filter((e=>{var t,n;return e.params=F(a,e.params||{}),e.type&&-1!==X.indexOf(e.type)&&((null===(n=null===(t=e.params)||void 0===t?void 0:t.refresh)||void 0===n?void 0:n.enabled)||(e.params=e.params||{refresh:{}},e.params.refresh=e.params.refresh||{},e.params.refresh.enabled=!1)),e.params=F(this.config.params||{},e.params||{},["gamMode","refresh"]),this.isAdUnitDeviceCompatible(e)})),null===(n=this.config.adUnits)||void 0===n||n.forEach((e=>{z()&&e.bids&&(e.bids=[{bidder:"akcelo-demo",params:{}}]),this.adUnits.set(e.id,e)})),this.config.metaAdUnits=null===(i=this.config.metaAdUnits)||void 0===i?void 0:i.filter((e=>this.isAdUnitDeviceCompatible(e))),null===(r=this.config.metaAdUnits)||void 0===r||r.forEach((e=>{this.metaAdUnits.set(e.id,e)})),null===(o=this.config.params.setupOverrides)||void 0===o||o.forEach((e=>e())),q("loadConfig",(e=>(this.config=e,this.config)),this.config)}getAdUnitConfigByHtmlId(e){var t,n;const i=null!==(n=null===(t=$.state.adUnits[e])||void 0===t?void 0:t.ref)&&void 0!==n?n:e;return this.adUnits.get(i)}getAdUnitsConfigById(e=[]){return e.map((e=>this.adUnits.get(e)))}isAdUnitDeviceCompatible(e){return!e.device||"desktop"===e.device&&!L()||"mobile"===e.device&&L()}};var he=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{d(i.next(e))}catch(t){o(t)}}function a(e){try{d(i.throw(e))}catch(t){o(t)}}function d(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}d((i=i.apply(e,t||[])).next())}))};const ve=new H("Consent Manager");const be=new class{constructor(){this.consentType="notavailable",this.cmpId=0,this.tcfPolicyVersion=0,ve.info("Module initialization")}loadConsent(){return he(this,void 0,void 0,(function*(){var e;if(!1!==(null===(e=ge.config.params)||void 0===e?void 0:e.gdprApplies))try{const e=yield this.getTCData();this.consentType=this.getConsentTypeByTCData(e),this.cmpId=e.cmpId,this.tcfPolicyVersion=e.tcfPolicyVersion}catch(t){ve.error(t),this.consentType="notavailable"}else this.consentType="notrequired"}))}getConsentType(){return this.consentType}getCmpId(){return this.cmpId}getTcfPolicyVersion(){return this.tcfPolicyVersion}getConsentTypeByTCData(e){const t=this.arePersonalizedAdsAllowed(e),n=this.areNonPersonalizedAdsAllowed(e);let i="accepted";return t||(i=n?"limited":"refused"),e.gdprApplies?i:"notrequired"}getTCData(){return new Promise(((e,t)=>{this.onTcfApiLoaded().then((()=>{this.onConsentReady((t=>e(t)))}),(()=>t(new Error("No __tcfapi found on window"))))}))}arePersonalizedAdsAllowed(e){return!e.gdprApplies||e.gdprApplies&&e.purpose.consents&&e.purpose.legitimateInterests&&!0===e.purpose.consents[1]&&!0===e.purpose.consents[3]&&!0===e.purpose.consents[4]&&(!0===e.purpose.consents[2]&&!0===e.purpose.consents[7]&&!0===e.purpose.consents[9]&&!0===e.purpose.consents[10]||e.purpose.legitimateInterests[2]&&e.purpose.legitimateInterests[7]&&e.purpose.legitimateInterests[9]&&e.purpose.legitimateInterests[10])}areNonPersonalizedAdsAllowed(e){return e.gdprApplies&&e.purpose.legitimateInterests&&e.purpose.legitimateInterests[2]&&e.purpose.legitimateInterests[7]&&e.purpose.legitimateInterests[9]&&e.purpose.legitimateInterests[10]}onTcfApiLoaded(e=5e3){return new Promise(((t,n)=>{let i;const r=setTimeout((()=>{clearInterval(i),n()}),e);i=window.setInterval((()=>{void 0!==this.getTcfApi()&&(clearInterval(i),clearTimeout(r),t())}),100)}))}onConsentReady(e){this.getTcfApi()("addEventListener",2,((t,n)=>{!n||(null==t?void 0:t.gdprApplies)&&"useractioncomplete"!==(null==t?void 0:t.eventStatus)&&"tcloaded"!==(null==t?void 0:t.eventStatus)||(this.getTcfApi()("removeEventListener",2,(()=>{}),t.listenerId),e(t))}))}getTcfApi(){if(window.__tcfapi)return window.__tcfapi;const{cmpFrame:e,cmpFunction:t}=this.findCmp();return"function"==typeof t?(ve.info("Detected CMP inside the current iframe"),window.__tcfapi=t,window.__tcfapi):e&&e!==window?(ve.info("Detected CMP not accessible inside the current iframe. Creating a __tcfapi wrapper"),window.__tcfapi=this.createCmpWrapperInIframe(e),window.__tcfapi):void 0}createCmpWrapperInIframe(e){const t={};return window.addEventListener("message",(e=>{const n="string"==typeof e.data?JSON.parse(e.data):e.data;if(n.__tcfapiReturn&&n.__tcfapiReturn.callId){const e=n.__tcfapiReturn;Object.keys(t).includes(e.callId)&&t[e.callId](e.returnValue,e.success)}}),!1),(n,i,r,...o)=>{const s=`${Math.random()}`,a={__tcfapiCall:{command:n,version:i,parameter:o,callId:s}};t[s]=r,e.postMessage(a,"*")}}findCmp(){let e,t,n=window;for(;;){try{if("function"==typeof n.__tcfapi){t=n.__tcfapi,e=n;break}}catch(i){}try{if(n.frames.__tcfapiLocator){e=n;break}}catch(i){}if(n===window.top)break;n=n.parent}return{cmpFrame:e,cmpFunction:t}}},ye=new H("Core");function we(e){return ye.info("RemoveAdUnit",e),q("destroyAdUnit",(e=>{$.setState((t=>{t.adUnits[e.htmlId].isDestroyed=!0}))}),{htmlId:e})}function Ie(e){let t,n;"string"==typeof e?(t=e,n=e):(t=e.id,n=e.code);document.getElementById(t)?function(e,t){var n,i,r;ye.info("AddAdUnit",e,t);let o=!1,s=null===(n=ge.config.adUnits)||void 0===n?void 0:n.find((e=>e.id===t));if(s||(o=!0,s=null===(i=ge.config.metaAdUnits)||void 0===i?void 0:i.find((e=>e.id===t))),!s)return ye.info("Ignoring adUnit, wasn't able to find corresponding configuration",e,t),null;if(window.slmadshb=window.slmadshb||{que:[]},window.slmadshb.displayCalls=window.slmadshb.displayCalls||[],window.slmadshb.displayCalls.includes(e)){if(o||!(null===(r=s.params)||void 0===r?void 0:r.multipleSpawn))return ye.warn(`Display already called for htmlId ${e}, ignoring it.`),null;we(e)}window.slmadshb.displayCalls.push(e),o?q("addMetaAdUnit",(n=>{$.setState((i=>{n.metaAdUnit&&(i.metaAdUnits[e]={htmlId:e,ref:t,slmadsId:n.metaAdUnit.slmadsId,isDestroyed:!1})}))}),{htmlId:e,metaAdUnit:s}):q("addAdUnit",(n=>{$.setState((i=>{var r,o;n.adUnit&&(i.adUnits[e]={htmlId:e,ref:t,slmadsId:n.adUnit.slmadsId,adUnitPath:n.adUnit.adUnitPath||null,isCapped:n.isCapped,isReadyToRequest:!1,isReadyToRender:!(null===(o=null===(r=n.adUnit.params)||void 0===r?void 0:r.lazyLoad)||void 0===o?void 0:o.enabled),isDestroyed:!1})}))}),{htmlId:e,adUnit:s,isCapped:!1})}(t,n):ye.warn("Display ignored, couldn't find the corresponding HTMLElement",t)}performance.mark(Q);const Te=e=>{if(ye.info("Initialization"),window.slmadshb=window.slmadshb||{},window.slmadshb.que=window.slmadshb.que||[],window.slmadshb.events=window.slmadshb.events||[],window.slmadshb.eventsTriggers=window.slmadshb.eventsTriggers||[],window.slmadshb.onEvent=(e,t)=>{window.slmadshb.events.push({name:e,callback:t}),window.slmadshb.eventsTriggers.forEach((n=>{n.name===e&&t(n.param)}))},window.slmadshb.triggerEvent=(e,t)=>{window.slmadshb.eventsTriggers.push({name:e,param:t}),window.slmadshb.events.forEach((n=>{n.name===e&&n.callback(t)}))},window.global=window,!window.slmadshb.loaded)return window.slmadshb.loaded=!0,ge.load(e),window.slmadshb.openAdTool=()=>{document.body&&(document.body.appendChild(document.createElement("div")).id="akcelo-adtool",document.body.appendChild(document.createElement("script")).src="//ads.sportslocalmedia.com/slm.adtool2.app.js")},(localStorage.getItem("akcelo_bookmarklet")||localStorage.getItem("akcelo_publisher_bookmarklet"))&&document.body&&(document.body.appendChild(document.createElement("div")).id="akcelo-adtool",document.body.appendChild(document.createElement("script")).src=localStorage.getItem("akcelo_bookmarklet")?"//ads.sportslocalmedia.com/slm.adtool2.app.js":"//ads.sportslocalmedia.com/slm.adtool.publisher.js"),be.loadConsent().then((()=>q("coreInit",(()=>{function e(e){if(void 0===e.called)try{e.call(),e.called=!0}catch(t){ye.error("Error processing command",t)}}window.slmadshb.processQueue=()=>{window.slmadshb.que.forEach(e)},window.slmadshb.setup=ge.config,window.slmadshb.display=Ie,window.slmadshb.que.push=e,window.slmadshb.processQueue()}))));ye.error("Multiple init detected, make sure to call the script only once")};function Ce(e,t,n){return e&&e.includes(t,n)||!1}function Ae(e,t,n){return e&&e.find(t,n)}function Ee(e,t,n){return e&&e.findIndex(t,n)}const Se=2,xe={buckets:[{max:5,increment:.5}]},ke={buckets:[{max:20,increment:.1}]},_e={buckets:[{max:20,increment:.01}]},Ue={buckets:[{max:3,increment:.01},{max:8,increment:.05},{max:20,increment:.5}]},Re={buckets:[{max:5,increment:.05},{max:10,increment:.1},{max:20,increment:.5}]};function Oe(e,t,n){let i="";if(!De(t))return i;const r=t.buckets.reduce(((e,t)=>e.max>t.max?e:t),{max:0});let o=0,s=Ae(t.buckets,(t=>{if(e>r.max*n){let e=t.precision;void 0===e&&(e=Se),i=(t.max*n).toFixed(e)}else{if(e<=t.max*n&&e>=o*n)return t.min=o,t;o=t.max}}));return s&&(i=function(e,t,n){const i=void 0!==t.precision?t.precision:Se,r=t.increment*n,o=t.min*n;let s=Math.floor,a=lt.getConfig("cpmRoundingFunction");"function"==typeof a&&(s=a);let d,l,c=Math.pow(10,i+2),u=(e*c-o*c)/(r*c);try{d=s(u)*r+o}catch(p){l=!0}(l||"number"!=typeof d)&&(Yt("Invalid rounding function passed in config"),d=Math.floor(u)*r+o);return d=Number(d.toFixed(10)),d.toFixed(i)}(e,s,n)),i}function De(e){if(mn(e)||!e.buckets||!Array.isArray(e.buckets))return!1;let t=!0;return e.buckets.forEach((e=>{e.max&&e.increment||(t=!1)})),t}const Be={PL_CODE:"code",PL_SIZE:"sizes",PL_BIDS:"bids",BD_BIDDER:"bidder",BD_ID:"paramsd",BD_PL_ID:"placementId",ADSERVER_TARGETING:"adserverTargeting",BD_SETTING_STANDARD:"standard"},Pe={GOOD:1},je={AUCTION_INIT:"auctionInit",AUCTION_TIMEOUT:"auctionTimeout",AUCTION_END:"auctionEnd",BID_ADJUSTMENT:"bidAdjustment",BID_TIMEOUT:"bidTimeout",BID_REQUESTED:"bidRequested",BID_RESPONSE:"bidResponse",BID_REJECTED:"bidRejected",NO_BID:"noBid",SEAT_NON_BID:"seatNonBid",BID_WON:"bidWon",BIDDER_DONE:"bidderDone",BIDDER_ERROR:"bidderError",SET_TARGETING:"setTargeting",BEFORE_REQUEST_BIDS:"beforeRequestBids",BEFORE_BIDDER_HTTP:"beforeBidderHttp",REQUEST_BIDS:"requestBids",ADD_AD_UNITS:"addAdUnits",AD_RENDER_FAILED:"adRenderFailed",AD_RENDER_SUCCEEDED:"adRenderSucceeded",TCF2_ENFORCEMENT:"tcf2Enforcement",AUCTION_DEBUG:"auctionDebug",BID_VIEWABLE:"bidViewable",STALE_RENDER:"staleRender",BILLABLE_EVENT:"billableEvent",BID_ACCEPTED:"bidAccepted",RUN_PAAPI_AUCTION:"paapiRunAuction",PAAPI_BID:"paapiBid",PAAPI_NO_BID:"paapiNoBid",PAAPI_ERROR:"paapiError"},Ne={PREVENT_WRITING_ON_MAIN_DOCUMENT:"preventWritingOnMainDocument",NO_AD:"noAd",EXCEPTION:"exception",CANNOT_FIND_AD:"cannotFindAd",MISSING_DOC_OR_ADID:"missingDocOrAdid"},qe="low",$e="medium",Fe="high",Me="auto",ze="dense",Le="custom",Ve={BIDDER:"hb_bidder",AD_ID:"hb_adid",PRICE_BUCKET:"hb_pb",SIZE:"hb_size",DEAL:"hb_deal",SOURCE:"hb_source",FORMAT:"hb_format",UUID:"hb_uuid",CACHE_ID:"hb_cache_id",CACHE_HOST:"hb_cache_host",ADOMAIN:"hb_adomain",ACAT:"hb_acat",CRID:"hb_crid",DSP:"hb_dsp"},We={BIDDER:"hb_bidder",AD_ID:"hb_adid",PRICE_BUCKET:"hb_pb",SIZE:"hb_size",DEAL:"hb_deal",FORMAT:"hb_format",UUID:"hb_uuid",CACHE_HOST:"hb_cache_host"},Ge={title:"hb_native_title",body:"hb_native_body",body2:"hb_native_body2",privacyLink:"hb_native_privacy",privacyIcon:"hb_native_privicon",sponsoredBy:"hb_native_brand",image:"hb_native_image",icon:"hb_native_icon",clickUrl:"hb_native_linkurl",displayUrl:"hb_native_displayurl",cta:"hb_native_cta",rating:"hb_native_rating",address:"hb_native_address",downloads:"hb_native_downloads",likes:"hb_native_likes",phone:"hb_native_phone",price:"hb_native_price",salePrice:"hb_native_saleprice",rendererUrl:"hb_renderer_url",adTemplate:"hb_adTemplate"},He={SRC:"s2s",DEFAULT_ENDPOINT:"https://prebid.adnxs.com/pbs/v1/openrtb2/auction",SYNCED_BIDDERS_KEY:"pbjsSyncs"},Je={BID_TARGETING_SET:"targetingSet",RENDERED:"rendered",BID_REJECTED:"bidRejected"},Ke={INVALID:"Bid has missing or invalid properties",INVALID_REQUEST_ID:"Invalid request ID",BIDDER_DISALLOWED:"Bidder code is not allowed by allowedAlternateBidderCodes / allowUnknownBidderCodes",FLOOR_NOT_MET:"Bid does not meet price floor",CANNOT_CONVERT_CURRENCY:"Unable to convert currency",DSA_REQUIRED:"Bid does not provide required DSA transparency info",DSA_MISMATCH:"Bid indicates inappropriate DSA rendering method",PRICE_TOO_HIGH:"Bid price exceeds maximum value"},Xe={body:"desc",body2:"desc2",sponsoredBy:"sponsored",cta:"ctatext",rating:"rating",address:"address",downloads:"downloads",likes:"likes",phone:"phone",price:"price",salePrice:"saleprice",displayUrl:"displayurl"},Ye={sponsored:1,desc:2,rating:3,likes:4,downloads:5,price:6,saleprice:7,phone:8,address:9,desc2:10,displayurl:11,ctatext:12},Qe={ICON:1,MAIN:3},Ze=["privacyIcon","clickUrl","sendTargetingKeys","adTemplate","rendererUrl","type"],et={REQUEST:"Prebid Request",RESPONSE:"Prebid Response",NATIVE:"Prebid Native",EVENT:"Prebid Event"},tt="__pb_locator__",nt="TRUE"===on("pbjs_debug").toUpperCase(),it={},rt="random",ot={};ot[rt]=!0,ot.fixed=!0;const st=rt,at={LOW:"low",MEDIUM:"medium",HIGH:"high",AUTO:"auto",DENSE:"dense",CUSTOM:"custom"},dt="*";const lt=function(){let e,t,n,i=[],r=null;function o(){function i(e){return o[e].val}function r(e,t){o[e].val=t}e={};const o={publisherDomain:{set(e){null!=e&&Yt("publisherDomain is deprecated and has no effect since v7 - use pageUrl instead"),r("publisherDomain",e)}},priceGranularity:{val:at.MEDIUM,set(e){d(e)&&("string"==typeof e?r("priceGranularity",a(e)?e:at.MEDIUM):un(e)&&(r("customPriceBucket",e),r("priceGranularity",at.CUSTOM),Kt("Using custom price granularity")))}},customPriceBucket:{val:{},set(){}},mediaTypePriceGranularity:{val:{},set(e){null!=e&&r("mediaTypePriceGranularity",Object.keys(e).reduce(((t,n)=>(d(e[n])?"string"==typeof e?t[n]=a(e[n])?e[n]:i("priceGranularity"):un(e)&&(t[n]=e[n],Kt(`Using custom price granularity for ${n}`)):Yt(`Invalid price granularity for media type: ${n}`),t)),{}))}},bidderSequence:{val:st,set(e){ot[e]?r("bidderSequence",e):Yt(`Invalid order: ${e}. Bidder Sequence was not set.`)}},auctionOptions:{val:{},set(e){(function(e){if(!un(e))return Yt("Auction Options must be an object"),!1;for(let t of Object.keys(e)){if("secondaryBidders"!==t&&"suppressStaleRender"!==t)return Yt(`Auction Options given an incorrect param: ${t}`),!1;if("secondaryBidders"===t){if(!ln(e[t]))return Yt(`Auction Options ${t} must be of type Array`),!1;if(!e[t].every(dn))return Yt(`Auction Options ${t} must be only string`),!1}else if("suppressStaleRender"===t&&!pn(e[t]))return Yt(`Auction Options ${t} must be of type boolean`),!1}return!0})(e)&&r("auctionOptions",e)}}};let s={debug:nt,bidderTimeout:3e3,enableSendAllBids:true,useBidCache:false,deviceAccess:true,disableAjaxTimeout:false,maxNestedIframes:10,maxBid:5e3,userSync:{topics:it}};function a(e){return Ae(Object.keys(at),(t=>e===at[t]))}function d(e){if(!e)return Qt("Prebid Error: no value passed to `setPriceGranularity()`"),!1;if("string"==typeof e)a(e)||Yt("Prebid Warning: setPriceGranularity was called with invalid setting, using `medium` as default.");else if(un(e)&&!De(e))return Qt("Invalid custom price value passed to `setPriceGranularity()`"),!1;return!0}Object.defineProperties(s,Object.fromEntries(Object.entries(o).map((([e,t])=>[e,Object.assign({get:i.bind(null,e),set:r.bind(null,e),enumerable:!0},t)])))),t&&p(Object.keys(t).reduce(((e,n)=>(t[n]!==s[n]&&(e[n]=s[n]||{}),e)),{})),t=s,n={}}function s(){if(r&&n&&un(n[r])){let e=n[r];return function(){return Array.from.apply(Array,arguments)}(new Set(Object.keys(t).concat(Object.keys(e)))).reduce(((n,i)=>(void 0===e[i]?n[i]=t[i]:void 0===t[i]?n[i]=e[i]:un(e[i])?n[i]=Yn({},t[i],e[i]):n[i]=e[i],n)),{})}return Object.assign({},t)}const[a,d]=[s,function(){const e=s();return Object.defineProperty(e,"ortb2",{get:function(){throw new Error("invalid access to 'orbt2' config - use request parameters instead")}}),e}].map((e=>function(...t){if(t.length<=1&&"function"!=typeof t[0]){const n=t[0];return n?yt(e(),n):s()}return function(e,t,n={}){let r=t;"string"!=typeof e&&(r=e,e=dt,n=t||{});if("function"!=typeof r)return void Qt("listener must be a function");const o={topic:e,callback:r};i.push(o),n.init&&r(e===dt?d():{[e]:d(e)});return function(){i.splice(i.indexOf(o),1)}}(...t)})),[l,c]=[d,a].map((e=>function(...t){let n=e(...t);return n&&"object"==typeof n&&(n=xn(n)),n}));function u(n){if(!un(n))return void Qt("setConfig options must be an object");let i=Object.keys(n),r={};i.forEach((i=>{let o=n[i];un(e[i])&&un(o)&&(o=Object.assign({},e[i],o));try{r[i]=t[i]=o}catch(s){Yt(`Cannot set config for property ${i} : `,s)}})),p(r)}function p(e){const t=Object.keys(e);i.filter((e=>Ce(t,e.topic))).forEach((t=>{t.callback({[t.topic]:e[t.topic]})})),i.filter((e=>e.topic===dt)).forEach((t=>t.callback(e)))}function m(e,t=!1){try{!function(e){if(!un(e))throw"setBidderConfig bidder options must be an object";if(!Array.isArray(e.bidders)||!e.bidders.length)throw"setBidderConfig bidder options must contain a bidders list with at least 1 bidder";if(!un(e.config))throw"setBidderConfig bidder options must contain a config object"}(e),e.bidders.forEach((i=>{n[i]||(n[i]={}),Object.keys(e.config).forEach((r=>{let o=e.config[r];if(un(o)){const e=t?Yn:Object.assign;n[i][r]=e({},n[i][r]||{},o)}else n[i][r]=o}))}))}catch(i){Qt(i)}}function f(e,t){r=e;try{return t()}finally{g()}}function g(){r=null}return o(),{getCurrentBidder:function(){return r},resetBidder:g,getConfig:d,getAnyConfig:a,readConfig:l,readAnyConfig:c,setConfig:u,mergeConfig:function(e){if(!un(e))return void Qt("mergeConfig input must be an object");const t=Yn(s(),e);return u({...t}),t},setDefaults:function(n){un(e)?(Object.assign(e,n),Object.assign(t,n)):Qt("defaults must be an object")},resetConfig:o,runWithBidder:f,callbackWithBidder:function(e){return function(t){return function(...n){if("function"==typeof t)return f(e,t.bind(this,...n));Yt("config.callbackWithBidder callback is not a function")}}},setBidderConfig:m,getBidderConfig:function(){return n},mergeBidderConfig:function(e){return m(e,!0)}}}();function ct(e){var t,n,i;if(Array.isArray(e)){for(n=Array(t=e.length);t--;)n[t]=(i=e[t])&&"object"==typeof i?ct(i):i;return n}if("[object Object]"===Object.prototype.toString.call(e)){for(t in n={},e)"__proto__"===t?Object.defineProperty(n,t,{value:ct(e[t]),configurable:!0,enumerable:!0,writable:!0}):n[t]=(i=e[t])&&"object"==typeof i?ct(i):i;return n}return e}const ut=0,pt=1,mt=class r{constructor(n){if(_(this,e),_(this,t),"function"!=typeof n)throw new Error("resolver not a function");const i=[],r=[];let[o,s]=[ut,pt].map((e=>function(t){if(e===ut&&"function"==typeof(null==t?void 0:t.then))t.then(o,s);else if(!i.length)for(i.push(e,t);r.length;)r.shift()()}));try{n(o,s)}catch(a){s(a)}U(this,e,i),U(this,t,r)}static timeout(e=0){return new r((t=>{0===e?t():setTimeout(t,e)}))}then(n,i){const r=k(this,e);return new this.constructor(((e,o)=>{const s=()=>{let t=r[1],[s,a]=r[0]===ut?[n,e]:[i,o];if("function"==typeof s){try{t=s(t)}catch(d){return void o(d)}a=e}a(t)};r.length?s():k(this,t).push(s)}))}catch(e){return this.then(null,e)}finally(e){let t;return this.then((n=>(t=n,e())),(n=>(t=this.constructor.reject(n),e()))).then((()=>t))}static race(e){return new this(((t,r)=>{R(this,n,i).call(this,e,((e,n)=>e?t(n):r(n)))}))}static all(e){return new this(((t,r)=>{let o=[];R(this,n,i).call(this,e,((e,t,n)=>e?o[n]=t:r(t)),(()=>t(o)))}))}static allSettled(e){return new this((t=>{let r=[];R(this,n,i).call(this,e,((e,t,n)=>r[n]=e?{status:"fulfilled",value:t}:{status:"rejected",reason:t}),(()=>t(r)))}))}static resolve(e){return new this((t=>t(e)))}static reject(e){return new this(((t,n)=>n(e)))}};e=new WeakMap,t=new WeakMap,n=new WeakSet,i=function(e,t,n){let i=e.length;function r(){t.apply(this,arguments),--i<=0&&n&&n()}0===e.length&&n?n():e.forEach(((e,t)=>this.resolve(e).then((e=>r(!0,e,t)),(e=>r(!1,e,t)))))},_(mt,n);let ft=mt;function gt({promiseFactory:e=e=>new ft(e)}={}){function t(e){return t=>e(t)}let n,i;return{promise:e(((e,t)=>{n=e,i=t})),resolve:t(n),reject:t(i)}}const ht=window,vt=ht.slmpbjs=ht.slmpbjs||{};function bt(){return vt}function yt(e,t,n,i,r){for(t=t.split?t.split("."):t,i=0;i<t.length;i++)e=e?e[t[i]]:r;return e===r?n:e}function wt(e,t,n){t.split&&(t=t.split("."));for(var i,r,o=0,s=t.length,a=e;o<s&&"__proto__"!==(r=t[o++])&&"constructor"!==r&&"prototype"!==r;)a=a[r]=o===s?n:typeof(i=a[r])==typeof t?i:0*t[o]!=0||~(""+t[o]).indexOf(".")?{}:[]}vt.cmd=vt.cmd||[],vt.que=vt.que||[],ht===window&&(ht._pbjsGlobals=ht._pbjsGlobals||[],ht._pbjsGlobals.push("slmpbjs"));var It="String",Tt="Function",Ct="Number",At="Object",Et="Boolean",St=Object.prototype.toString;let xt,kt=Boolean(window.console),_t=Boolean(kt&&window.console.log),Ut=Boolean(kt&&window.console.info),Rt=Boolean(kt&&window.console.warn),Ot=Boolean(kt&&window.console.error);const Dt=bt();function Bt(...e){null!=xt&&xt(...e)}const Pt={checkCookieSupport:Pn,createTrackPixelIframeHtml:function(e,t=!0,n=""){if(!e)return"";t&&(e=encodeURI(e));n&&(n=`sandbox="${n}"`);return`<iframe ${n} id="${qt()}"\n frameborder="0"\n allowtransparency="true"\n marginheight="0" marginwidth="0"\n width="0" hspace="0" vspace="0" height="0"\n style="height:0px;width:0px;display:none;"\n scrolling="no"\n src="${e}">\n </iframe>`},getWindowSelf:Gt,getWindowTop:Wt,canAccessWindowTop:Jt,getWindowLocation:Ht,insertUserSyncIframe:wn,insertElement:vn,isFn:an,triggerPixel:yn,logError:Qt,logWarn:Yt,logMessage:Kt,logInfo:Xt,parseQS:Gn,formatQS:Hn,deepEqual:Xn};let jt={};var Nt=function(){var e=0;return function(){return++e}}();function qt(){return Nt()+Math.random().toString(16).substr(2)}function $t(e){return e?(e^(window&&window.crypto&&window.crypto.getRandomValues?crypto.getRandomValues(new Uint8Array(1))[0]%16:16*Math.random())>>e/4).toString(16):"10000000-1000-4000-8000-100000000000".replace(/[018]/g,$t)}function Ft(e){return"string"==typeof e?e.split(/\s*,\s*/).map((e=>e.match(/^(\d+)x(\d+)$/i))).filter((e=>e)).map((([e,t,n])=>[parseInt(t,10),parseInt(n,10)])):Array.isArray(e)?Vt(e)?[e]:e.filter(Vt):[]}function Mt(e){return Ft(e).map(zt)}function zt(e){return e[0]+"x"+e[1]}function Lt(e){return{w:e[0],h:e[1]}}function Vt(e){return ln(e)&&2===e.length&&!isNaN(e[0])&&!isNaN(e[1])}function Wt(){return window.top}function Gt(){return window.self}function Ht(){return window.location}function Jt(){try{if(Pt.getWindowTop().location.href)return!0}catch(e){return!1}}function Kt(){tn()&&_t&&console.log.apply(console,en(arguments,"MESSAGE:"))}function Xt(){tn()&&Ut&&console.info.apply(console,en(arguments,"INFO:"))}function Yt(){tn()&&Rt&&console.warn.apply(console,en(arguments,"WARNING:")),Bt(je.AUCTION_DEBUG,{type:"WARNING",arguments:arguments})}function Qt(){tn()&&Ot&&console.error.apply(console,en(arguments,"ERROR:")),Bt(je.AUCTION_DEBUG,{type:"ERROR",arguments:arguments})}function Zt(e){function t(t){return function(...n){t(e,...n)}}return{logError:t(Qt),logWarn:t(Yt),logMessage:t(Kt),logInfo:t(Xt)}}function en(e,t){e=[].slice.call(e);let n=lt.getCurrentBidder();return t&&e.unshift(t),n&&e.unshift(i("#aaa")),e.unshift(i("#3b88c3")),e.unshift("%cPrebid"+(n?`%c${n}`:"")),e;function i(e){return`display: inline-block; color: #fff; background: ${e}; padding: 1px 4px; border-radius: 3px;`}}function tn(){return!!lt.getConfig("debug")}const nn=(()=>{const e={border:"0px",hspace:"0",vspace:"0",marginWidth:"0",marginHeight:"0",scrolling:"no",frameBorder:"0",allowtransparency:"true"};return(t,n,i={})=>{const r=t.createElement("iframe");return Object.assign(r,Object.assign({},e,n)),Object.assign(r.style,i),r}})();function rn(){return nn(document,{id:qt(),width:0,height:0,src:"about:blank"},{display:"none",height:"0px",width:"0px",border:"0px"})}function on(e){return Gn(Ht().search)[e]||""}function sn(e,t){return St.call(e)==="[object "+t+"]"}function an(e){return sn(e,Tt)}function dn(e){return sn(e,It)}const ln=Array.isArray.bind(Array);function cn(e){return sn(e,Ct)}function un(e){return sn(e,At)}function pn(e){return sn(e,Et)}function mn(e){return!e||(ln(e)||dn(e)?!(e.length>0):Object.keys(e).length<=0)}function fn(e){return dn(e)&&(!e||0===e.length)}function gn(e,t){if(an(null==e?void 0:e.forEach))return e.forEach(t,this);Object.entries(e||{}).forEach((([e,n])=>t.call(this,n,e)))}function hn(e,t){return an(null==e?void 0:e.map)?e.map(t):Object.entries(e||{}).map((([n,i])=>t(i,n,e)))}function vn(e,t,n,i){let r;t=t||document,r=n?t.getElementsByTagName(n):t.getElementsByTagName("head");try{if(r=r.length?r:t.getElementsByTagName("body"),r.length){r=r[0];let t=i?null:r.firstChild;return r.insertBefore(e,t)}}catch(o){}}function bn(e,t){let n=null;return new ft((i=>{const r=function(){e.removeEventListener("load",r),e.removeEventListener("error",r),null!=n&&window.clearTimeout(n),i()};e.addEventListener("load",r),e.addEventListener("error",r),null!=t&&(n=window.setTimeout(r,t))}))}function yn(e,t,n){const i=new Image;t&&Pt.isFn(t)&&bn(i,n).then(t),i.src=e}function wn(e,t,n){let i=Pt.createTrackPixelIframeHtml(e,!1,"allow-scripts allow-same-origin"),r=document.createElement("div");r.innerHTML=i;let o=r.firstChild;t&&Pt.isFn(t)&&bn(o,n).then(t),Pt.insertElement(o,document,"html",!0)}function In(e){return Array.from(e.matchAll(/\$({[^}]+})/g)).map((e=>e[1])).reduce(((e,t)=>e.replace("$"+encodeURIComponent(t),"$"+t)),encodeURI(e))}function Tn(e,t,n){return n.indexOf(e)===t}function Cn(e,t){return e.concat(t)}function An(e=Dt.adUnits){return e.map((e=>e.bids.map((e=>e.bidder)).reduce(Cn,[]))).reduce(Cn,[]).filter((e=>void 0!==e)).filter(Tn)}function En(){if(window.googletag&&an(window.googletag.pubads)&&an(window.googletag.pubads().getSlots))return!0}function Sn(e){let t=e.length;for(;t>0;){let n=Math.floor(Math.random()*t);t--;let i=e[t];e[t]=e[n],e[n]=i}return e}function xn(e){return ct(e)||{}}function kn(){try{return Pt.getWindowSelf()!==Pt.getWindowTop()}catch(e){return!0}}function _n(){if(!kn())return!1;const e=Pt.getWindowSelf();return!(!e.$sf||!e.$sf.ext)}function Un(){try{const e=Gt();return"function"==typeof e.$sf.ext.geom?e.$sf.ext.geom():void 0}catch(e){return void Qt("Error getting SafeFrame geometry",e)}}function Rn(e,t){if(e)return Object.entries(t).reduce(((e,[t,n])=>e.replace(new RegExp("\\$\\{"+t+"\\}","g"),n||"")),e)}function On(){return(new Date).getTime()}function Dn(e){var t;let n=-1;const i=(e=e||Gt()).performance;if((null==(t=e.performance)?void 0:t.timing)&&e.performance.timing.navigationStart>0){const e=i.timing.domLoading-i.timing.navigationStart;e>0&&(n=e)}return n}function Bn(){return!1!==lt.getConfig("deviceAccess")}function Pn(){if(window.navigator.cookieEnabled||document.cookie.length)return!0}function jn(e,t){if(t<1)throw new Error(`numRequiredCalls must be a positive number. Got ${t}`);let n=0;return function(){n++,n===t&&e.apply(this,arguments)}}function Nn(e,t){return e.reduce((function(e,n){return(e[n[t]]=e[n[t]]||[]).push(n),e}),{})}function qn(e,t){return t.filter((t=>e[t])).reduce(((t,n)=>Object.assign(t,{[n]:e[n]})),{})}function $n(e,t,n){return e.filter((e=>e.code===t)).flatMap((e=>e.bids)).filter((e=>e.bidder===n)).map((e=>e.params||{}))}function Fn(){return"1"===navigator.doNotTrack||"1"===window.doNotTrack||"1"===navigator.msDoNotTrack||"yes"===navigator.doNotTrack}const Mn=(e,t)=>e.getAdUnitPath()===t||e.getSlotElementId()===t;const zn=Number.isInteger.bind(Number);function Ln(e){return Object.fromEntries(Object.entries(e).filter((([e,t])=>void 0!==t)))}function Vn(e,t){return"object"!=typeof e?{}:t.reduce(((n,i,r)=>{if("function"==typeof i)return n;let o=i,s=i.match(/^(.+?)\sas\s(.+?)$/i);s&&(i=s[1],o=s[2]);let a=e[i];return"function"==typeof t[r+1]&&(a=t[r+1](a,n)),void 0!==a&&(n[o]=a),n}),{})}function Wn(e,t){return ln(e)&&(!t||e.length===t)&&e.every((e=>zn(e)))}function Gn(e){return e?e.replace(/^\?/,"").split("&").reduce(((e,t)=>{let[n,i]=t.split("=");return/\[\]$/.test(n)?(n=n.replace("[]",""),e[n]=e[n]||[],e[n].push(i)):e[n]=i||"",e}),{}):{}}function Hn(e){return Object.keys(e).map((t=>Array.isArray(e[t])?e[t].map((e=>`${t}[]=${e}`)).join("&"):`${t}=${e[t]}`)).join("&")}function Jn(e,t){let n=document.createElement("a");t&&"noDecodeWholeURL"in t&&t.noDecodeWholeURL?n.href=e:n.href=decodeURIComponent(e);let i=t&&"decodeSearchAsString"in t&&t.decodeSearchAsString;return{href:n.href,protocol:(n.protocol||"").replace(/:$/,""),hostname:n.hostname,port:+n.port,pathname:n.pathname.replace(/^(?!\/)/,"/"),search:i?n.search:Pt.parseQS(n.search||""),hash:(n.hash||"").replace(/^#/,""),host:n.host||window.location.host}}function Kn(e){return(e.protocol||"http")+"://"+(e.host||e.hostname+(e.port?`:${e.port}`:""))+(e.pathname||"")+(e.search?`?${Pt.formatQS(e.search||"")}`:"")+(e.hash?`#${e.hash}`:"")}function Xn(e,t,{checkTypes:n=!1}={}){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t||n&&e.constructor!==t.constructor)return!1;{const i=Object.keys(e);if(i.length!==Object.keys(t).length)return!1;for(let r of i){if(!t.hasOwnProperty(r))return!1;if(!Xn(e[r],t[r],{checkTypes:n}))return!1}return!0}}function Yn(e,...t){if(!t.length)return e;const n=t.shift();if(un(e)&&un(n))for(const i in n)un(n[i])?(e[i]||Object.assign(e,{[i]:{}}),Yn(e[i],n[i])):ln(n[i])?e[i]?ln(e[i])&&n[i].forEach((t=>{let n=1;for(let r=0;r<e[i].length;r++)if(Xn(e[i][r],t)){n=0;break}n&&e[i].push(t)})):Object.assign(e,{[i]:[...n[i]]}):Object.assign(e,{[i]:n[i]});return Yn(e,...t)}function Qn(e,t=0){let n=function(e,t){if(an(Math.imul))return Math.imul(e,t);var n=(4194303&e)*(t|=0);return 4290772992&e&&(n+=(4290772992&e)*t|0),0|n},i=3735928559^t,r=1103547991^t;for(let o,s=0;s<e.length;s++)o=e.charCodeAt(s),i=n(i^o,2654435761),r=n(r^o,1597334677);return i=n(i^i>>>16,2246822507)^n(r^r>>>13,3266489909),r=n(r^r>>>16,2246822507)^n(i^i>>>13,3266489909),(4294967296*(2097151&r)+(i>>>0)).toString()}function Zn(e){try{return JSON.stringify(e)}catch(t){return""}}function ei(e,t=function(e){return e}){const n=new Map,i=function(){const i=t.apply(this,arguments);return n.has(i)||n.set(i,e.apply(this,arguments)),n.get(i)};return i.clear=n.clear.bind(n),i}function ti(e,t){for(let n,i=0;i<e.length;i++)if(n=yt(e[i],t),n)return n}const ni={fetch:window.fetch.bind(window),makeRequest:(e,t)=>new Request(e,t),timeout(e,t){const n=new AbortController;let i=setTimeout((()=>{n.abort(),Qt(`Request timeout after ${e}ms`,t),i=null}),e);return{signal:n.signal,done(){i&&clearTimeout(i)}}}},ii="GET",ri="POST",oi="Content-Type";function si(e=3e3,{request:t,done:n}={}){let i=(t,n)=>{let i;null==e||null!=(null==n?void 0:n.signal)||lt.getConfig("disableAjaxTimeout")||(i=ni.timeout(e,t),n=Object.assign({signal:i.signal},n));let r=ni.fetch(t,n);return null!=(null==i?void 0:i.done)&&(r=r.finally(i.done)),r};return null==t&&null==n||(i=(e=>function(i,r){const o=new URL(null==(null==i?void 0:i.url)?i:i.url,document.location).origin;let s=e(i,r);return t&&t(o),n&&(s=s.finally((()=>n(o)))),s})(i)),i}function ai({status:e,statusText:t="",headers:n,url:i},r){let o=0;function s(e){var t,i;if(0===o)try{o=(new DOMParser).parseFromString(r,null==(i=null==(t=null==n?void 0:n.get(oi))?void 0:t.split(";"))?void 0:i[0])}catch(s){o=null,e&&e(s)}return o}return{readyState:XMLHttpRequest.DONE,status:e,statusText:t,responseText:r,response:r,responseType:"",responseURL:i,get responseXML(){return s(Qt)},getResponseHeader:e=>(null==n?void 0:n.has(e))?n.get(e):null,toJSON(){return Object.assign({responseXML:s()},this)},timedOut:!1}}function di(e=3e3,{request:t,done:n}={}){const i=si(e,{request:t,done:n});return function(e,t,n,r={}){!function(e,t){const{success:n,error:i}="object"==typeof t&&null!=t?t:{success:"function"==typeof t?t:()=>null,error:(e,t)=>Qt("Network error",e,t)};e.then((e=>e.text().then((t=>[e,t])))).then((([e,t])=>{const r=ai(e,t);e.ok||304===e.status?n(t,r):i(e.statusText,r)}),(e=>i("",Object.assign(ai({status:0},""),{reason:e,timedOut:"AbortError"===(null==e?void 0:e.name)}))))}(i(function(e,t,n={}){const i=n.method||(t?ri:ii);if(i===ii&&t){const i=Jn(e,n);Object.assign(i.search,t),e=Kn(i)}const r=new Headers(n.customHeaders);r.set(oi,n.contentType||"text/plain");const o={method:i,headers:r};return i!==ii&&t&&(o.body=t),n.withCredentials&&(o.credentials="include"),n.browsingTopics&&isSecureContext&&(o.browsingTopics=!0),n.keepalive&&(o.keepalive=!0),ni.makeRequest(e,o)}(e,n,r)),t)}}const li=di(),ci=si(),ui=15;function pi(e,{index:t=Ko.index}={}){const n=e.vastXml?e.vastXml:(i=e.vastUrl,r=e.vastImpUrl,`<VAST version="3.0">\n <Ad>\n <Wrapper>\n <AdSystem>prebid.org wrapper</AdSystem>\n <VASTAdTagURI><![CDATA[${i}]]></VASTAdTagURI>\n ${(r=r&&(Array.isArray(r)?r:[r]))?r.map((e=>`<Impression><![CDATA[${e}]]></Impression>`)).join(""):""}\n <Creatives></Creatives>\n </Wrapper>\n </Ad>\n </VAST>`);var i,r;const o=t.getAuction(e);let s={type:"xml",value:n,ttlseconds:Number(e.ttl)+ui};return lt.getConfig("cache.vasttrack")&&(s.bidder=e.bidder,s.bidid=e.requestId,s.aid=e.auctionId),null!=o&&(s.timestamp=o.getAuctionStart()),"string"==typeof e.customCacheKey&&""!==e.customCacheKey&&(s.key=e.customCacheKey),s}const mi={store:function(e,t,n=di){const i={puts:e.map(pi)};n(lt.getConfig("cache.timeout"))(lt.getConfig("cache.url"),function(e){return{success:function(t){let n;try{n=JSON.parse(t).responses}catch(i){return void e(i,[])}n?e(null,n):e(new Error("The cache server didn't respond with a responses property."),[])},error:function(t,n){e(new Error(`Error storing video ad in the cache: ${t}: ${JSON.stringify(n)}`),[])}}}(t),JSON.stringify(i),{contentType:"text/plain",withCredentials:!0})}};function fi(e){const t=e.map((e=>e.bidResponse));mi.store(t,(function(n,i){n?Qt(`Failed to save to the video cache: ${n}. Video bids will be discarded:`,t):e.length!==i.length?Qt(`expected ${e.length} cache IDs, got ${i.length} instead`):i.forEach(((t,n)=>{const{auctionInstance:i,bidResponse:r,afterBidAdded:o}=e[n];var s;""===t.uuid?Yt("Supplied video cache key was already in use by Prebid Cache; caching attempt was rejected. Video bid must be discarded."):(r.videoCacheKey=t.uuid,r.vastUrl||(r.vastUrl=(s=r.videoCacheKey,`${lt.getConfig("cache.url")}?uuid=${s}`)),Oo(i,r),o())}))}))}let gi,hi;lt.getConfig("cache",(e=>{gi="number"==typeof e.cache.batchSize&&e.cache.batchSize>0?e.cache.batchSize:1,hi="number"==typeof e.cache.batchTimeout&&e.cache.batchTimeout>0?e.cache.batchTimeout:0}));const vi=((e=setTimeout,t=fi)=>{let n=[[]],i=!1;const r=e=>e();return function(o,s,a){const d=hi>0?e:r;n[n.length-1].length>=gi&&n.push([]),n[n.length-1].push({auctionInstance:o,bidResponse:s,afterBidAdded:a}),i||(i=!0,d((()=>{n.forEach(t),n=[[]],i=!1}),hi))}})(),bi=new WeakMap,yi=["debugging","outstream","improvedigital","showheroes-bs","aaxBlockmeter","adagio","adloox","akamaidap","arcspan","airgrid","browsi","brandmetrics","clean.io","confiant","contxtful","hadron","mediafilter","medianet","azerionedge","a1Media","geoedge","qortex","dynamicAdBoost","51Degrees","symitridap","wurfl","justtag","tncId","ftrackId","id5"];function wi(e,t,n,i,r){if(!t||!e)return void Qt("cannot load external script without url and moduleCode");if(!Ce(yi,t))return void Qt(`${t} not whitelisted for loading external JavaScript`);i||(i=document);const o=d(i,e);if(o)return n&&"function"==typeof n&&(o.loaded?n():o.callbacks.push(n)),o.tag;const s=bi.get(i)||{},a={loaded:!1,tag:null,callbacks:[]};return s[e]=a,bi.set(i,s),n&&"function"==typeof n&&a.callbacks.push(n),Yt(`module ${t} is loading external JavaScript`),function(t,n,i,r){i||(i=document);var o=i.createElement("script");o.type="text/javascript",o.async=!0;const s=d(i,e);s&&(s.tag=o);o.readyState?o.onreadystatechange=function(){"loaded"!==o.readyState&&"complete"!==o.readyState||(o.onreadystatechange=null,n())}:o.onload=function(){n()};o.src=t,r&&function(e,t){Object.entries(t).forEach((([t,n])=>e.setAttribute(t,n)))}(o,r);return vn(o,i),o}(e,(function(){a.loaded=!0;try{for(let e=0;e<a.callbacks.length;e++)a.callbacks[e]()}catch(e){Qt("Error executing callback","adloader.js:loadExternalScript",e)}}),i,r);function d(e,t){const n=bi.get(e);return n&&n[t]?n[t]:null}}const Ii=bt(),Ti="outstream";function Ci(e){const{url:t,config:n,id:i,callback:r,loaded:o,adUnitCode:s,renderNow:a}=e;this.url=t,this.config=n,this.handlers={},this.id=i,this.renderNow=a,this.loaded=o,this.cmd=[],this.push=e=>{"function"==typeof e?this.loaded?e.call():this.cmd.push(e):Qt("Commands given to Renderer.push must be wrapped in a function")},this.callback=r||(()=>{this.loaded=!0,this.process()}),this.render=function(){const e=arguments,n=()=>{this._render?this._render.apply(this,e):Yt("No render function was provided, please use .setRender on the renderer")};!function(e){const t=Ae(Ii.adUnits,(t=>t.code===e));if(!t)return!1;const n=yt(t,"renderer"),i=!!(n&&n.url&&n.render),r=yt(t,"mediaTypes.video.renderer"),o=!!(r&&r.url&&r.render);return!!(i&&!0!==n.backupOnly||o&&!0!==r.backupOnly)}(s)?a?n():(this.cmd.unshift(n),wi(t,Ti,this.callback,this.documentContext)):(Yt(`External Js not loaded by Renderer since renderer url and callback is already defined on adUnit ${s}`),n())}.bind(this)}Ci.install=function({url:e,config:t,id:n,callback:i,loaded:r,adUnitCode:o,renderNow:s}){return new Ci({url:e,config:t,id:n,callback:i,loaded:r,adUnitCode:o,renderNow:s})},Ci.prototype.getConfig=function(){return this.config},Ci.prototype.setRender=function(e){this._render=e},Ci.prototype.setEventHandlers=function(e){this.handlers=e},Ci.prototype.handleVideoEvent=function({id:e,eventName:t}){"function"==typeof this.handlers[t]&&this.handlers[t](),Kt(`Prebid Renderer event for id ${e} type ${t}`)},Ci.prototype.process=function(){for(;this.cmd.length>0;)try{this.cmd.shift().call()}catch(e){Qt("Error processing Renderer command: ",e)}};r=new WeakSet,o=function(e){return null==e?this.defaultScope:e};const Ai=new class{constructor(e,t){_(this,r),this.getSettings=e,this.defaultScope=t}get(e,t){let n=this.getOwn(e,t);return void 0===n&&(n=this.getOwn(null,t)),n}getOwn(e,t){return e=R(this,r,o).call(this,e),yt(this.getSettings(),`${e}.${t}`)}getScopes(){return Object.keys(this.getSettings()).filter((e=>e!==this.defaultScope))}settingsFor(e){return Yn({},this.ownSettingsFor(null),this.ownSettingsFor(e))}ownSettingsFor(e){return e=R(this,r,o).call(this,e),this.getSettings()[e]||{}}}((()=>bt().bidderSettings||{}),Be.BD_SETTING_STANDARD),Ei="prebid",Si="bidder",xi="userId",ki="rtd",_i="analytics";function Ui(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ri(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})})),n} /* * @license MIT * Fun Hooks v0.9.10 * (c) @snapwich */qi.SYNC=1,qi.ASYNC=2,qi.QUEUE=4;var Oi="fun-hooks";var Di=Object.freeze({useProxy:!0,ready:0}),Bi=new WeakMap,Pi="2,1,0"===[1].reduce((function(e,t,n){return[e,t,n]}),2).toString()?Array.prototype.reduce:function(e,t){var n,i=Object(this),r=i.length>>>0,o=0;if(t)n=t;else{for(;o<r&&!(o in i);)o++;n=i[o++]}for(;o<r;)o in i&&(n=e(n,i[o],o,i)),o++;return n};function ji(e,t){return Array.prototype.slice.call(e,t)}var Ni=Object.assign||function(e){return Pi.call(ji(arguments,1),(function(e,t){return t&&Object.keys(t).forEach((function(n){e[n]=t[n]})),e}),e)};function qi(e){var t,n={},i=[];function r(e,t){return"function"==typeof e?d.call(null,"sync",e,t):"string"==typeof e&&"function"==typeof t?d.apply(null,arguments):"object"==typeof e?o.apply(null,arguments):void 0}function o(e,t,n){var i=!0;void 0===t&&(t=Object.getOwnPropertyNames(e),i=!1);var r={},o=["constructor"];do{(t=t.filter((function(t){return!("function"!=typeof e[t]||-1!==o.indexOf(t)||t.match(/^_/))}))).forEach((function(t){var i=t.split(":"),o=i[0],s=i[1]||"sync";if(!r[o]){var a=e[o];r[o]=e[o]=d(s,a,n?[n,o]:void 0)}})),e=Object.getPrototypeOf(e)}while(i&&e);return r}function s(e){var r=Array.isArray(e)?e:e.split(".");return Pi.call(r,(function(n,o,s){var d=n[o],l=!1;return d||(s===r.length-1?(t||i.push((function(){l||console.warn(Oi+": referenced '"+e+"' but it was never created")})),n[o]=a((function(e){n[o]=e,l=!0}))):n[o]={})}),n)}function a(e){var t=[],n=[],i=function(){},r={before:function(e,n){return s.call(this,t,"before",e,n)},after:function(e,t){return s.call(this,n,"after",e,t)},getHooks:function(e){var i=t.concat(n);"object"==typeof e&&(i=i.filter((function(t){return Object.keys(e).every((function(n){return t[n]===e[n]}))})));try{Ni(i,{remove:function(){return i.forEach((function(e){e.remove()})),this}})}catch(r){console.error("error adding `remove` to array, did you modify Array.prototype?")}return i},removeAll:function(){return this.getHooks().remove()}},o={install:function(r,o,s){this.type=r,i=s,s(t,n),e&&e(o)}};return Bi.set(r.after,o),r;function s(e,r,o,s){var a={hook:o,type:r,priority:s||10,remove:function(){var r=e.indexOf(a);-1!==r&&(e.splice(r,1),i(t,n))}};return e.push(a),e.sort((function(e,t){return t.priority-e.priority})),i(t,n),this}}function d(n,r,o){var d=r.after&&Bi.get(r.after);if(d){if(d.type!==n)throw Oi+": recreated hookable with different type";return r}var l,c,u=o?s(o):a(),p={get:function(e,t){return u[t]||Reflect.get.apply(Reflect,arguments)}};return t||i.push(m),e.useProxy&&"function"==typeof Proxy&&Proxy.revocable?c=new Proxy(r,p):(c=function(){return p.apply?p.apply(r,this,ji(arguments)):r.apply(this,arguments)},Ni(c,u)),Bi.get(c.after).install(n,c,(function(e,t){var i,r=[];e.length||t.length?(e.forEach(o),i=r.push(void 0)-1,t.forEach(o),l=function(e,t,o){var s,a=0,d="async"===n&&"function"==typeof o[o.length-1]&&o.pop();function l(e){"sync"===n?s=e:d&&d.apply(null,arguments)}function c(e){if(r[a]){var i=ji(arguments);return c.bail=l,i.unshift(c),r[a++].apply(t,i)}"sync"===n?s=e:d&&d.apply(null,arguments)}return r[i]=function(){var i=ji(arguments,1);"async"===n&&d&&(delete c.bail,i.push(c));var r=e.apply(t,i);"sync"===n&&c(r)},c.apply(null,o),s}):l=void 0;function o(e){r.push(e.hook)}m()})),c;function m(){!t&&("sync"!==n||e.ready&qi.SYNC)&&("async"!==n||e.ready&qi.ASYNC)?"sync"!==n&&e.ready&qi.QUEUE?p.apply=function(){var e=arguments;i.push((function(){c.apply(e[1],e[2])}))}:p.apply=function(){throw Oi+": hooked function not ready"}:p.apply=l}}return(e=Ni({},Di,e)).ready?r.ready=function(){t=!0,function(e){for(var t;t=e.shift();)t()}(i)}:t=!0,r.get=s,r}const $i=Ui(qi);let Fi=$i({ready:$i.SYNC|$i.ASYNC|$i.QUEUE});const Mi=gt();Fi.ready=(()=>{const e=Fi.ready;return function(){try{return e.apply(Fi,arguments)}finally{Mi.resolve()}}})();const zi=Mi.promise,Li=Fi.get;const Vi={};function Wi(e,t,{postInstallAllowed:n=!1}={}){Fi("async",(function(i){i.forEach((e=>t(...e))),n&&(Vi[e]=t)}),e)([])}function Gi(e,...t){const n=Vi[e];if(n)return n(...t);Li(e).before(((e,n)=>{n.push(t),e(n)}))}const Hi="component",Ji=Hi+"Type",Ki=Hi+"Name",Xi="adapterCode",Yi="storageType",Qi="configName",Zi="syncType",er="syncUrl",tr="_config";function nr(e){return function(t,n,i){const r={[Ji]:t,[Ki]:n,[Hi]:`${t}.${n}`};return t===Si&&(r[Xi]=e(n)),ir(Object.assign(r,i))}}const ir=Fi("sync",(e=>e));const[rr,or]=function(e=Zt("Activity control:")){const t={};function n(e){return t[e]=t[e]||[]}function i(t,n,i,r){let o;try{o=i(r)}catch(s){e.logError(`Exception in rule ${n} for '${t}'`,s),o={allow:!1,reason:s}}return o&&Object.assign({activity:t,name:n,component:r[Hi]},o)}const r={};function o({activity:t,name:n,allow:i,reason:o,component:s}){const a=`${n} ${i?"allowed":"denied"} '${t}' for '${s}'${o?":":""}`,d=r.hasOwnProperty(a);if(d&&clearTimeout(r[a]),r[a]=setTimeout((()=>delete r[a]),1e3),!d){const t=[a];o&&t.push(o),(i?e.logInfo:e.logWarn).apply(e,t)}}return[function(e,t,i,r=10){const o=n(e),s=o.findIndex((([e])=>r<e)),a=[r,t,i];return o.splice(s<0?o.length:s,0,a),function(){const e=o.indexOf(a);e>=0&&o.splice(e,1)}},function(e,t){let r,s;for(const[a,d,l]of n(e)){if(r!==a&&s)break;r=a;const n=i(e,d,l,t);if(n){if(!n.allow)return o(n),!1;s=n}}return s&&o(s),!0}]}(),sr="accessDevice",ar="syncUser",dr="enrichUfpd",lr="enrichEids",cr="fetchBids",ur="reportAnalytics",pr="transmitEids",mr="transmitUfpd",fr="transmitPreciseGeo",gr="transmitTid",hr=nr((e=>Sa.resolveAlias(e))),vr="html5",br="cookie";let yr=[];function wr({moduleName:e,moduleType:t}={},{isAllowed:n=or}={}){function i(i,r){let o=e;const s=lt.getCurrentBidder();s&&t===Si&&Sa.aliasRegistry[s]===e&&(o=s);return i({valid:n(sr,hr(t,o,{[Yi]:r}))})}function r(e,t,n){if(!n||"function"!=typeof n)return i(e,t);yr.push((function(){let r=i(e,t);n(r)}))}function o(e){const t=e.charAt(0).toUpperCase()+e.substring(1),n=()=>window[e],i=function(t){return r((function(t){if(t&&t.valid)try{return!!n()}catch(i){Qt(`${e} api disabled`)}return!1}),vr,t)};return{[`has${t}`]:i,[`${e}IsEnabled`]:e=>r((function(e){if(e&&e.valid)try{return n().setItem("prebid.cookieTest","1"),"1"===n().getItem("prebid.cookieTest")}catch(t){}finally{try{n().removeItem("prebid.cookieTest")}catch(t){}}return!1}),vr,e),[`setDataIn${t}`]:(e,t,o)=>r((function(r){r&&r.valid&&i()&&n().setItem(e,t)}),vr,o),[`getDataFrom${t}`]:(e,t)=>r((function(t){return t&&t.valid&&i()?n().getItem(e):null}),vr,t),[`removeDataFrom${t}`]:(e,t)=>r((function(t){t&&t.valid&&i()&&n().removeItem(e)}),vr,t)}}return{setCookie:function(e,t,n,i,o,s){return r((function(r){if(r&&r.valid){const r=o&&""!==o?` ;domain=${encodeURIComponent(o)}`:"",s=n&&""!==n?` ;expires=${n}`:"",a=null!=i&&"none"==i.toLowerCase()?"; Secure":"";document.cookie=`${e}=${encodeURIComponent(t)}${s}; path=/${r}${i?`; SameSite=${i}`:""}${a}`}}),br,s)},getCookie:function(e,t){return r((function(t){if(t&&t.valid){let t=window.document.cookie.match("(^|;)\\s*"+e+"\\s*=\\s*([^;]*)\\s*(;|$)");return t?decodeURIComponent(t[2]):null}return null}),br,t)},cookiesAreEnabled:function(e){return r((function(e){return!(!e||!e.valid)&&Pn()}),br,e)},...o("localStorage"),...o("sessionStorage"),findSimilarCookies:function(e,t){return r((function(t){if(t&&t.valid){const t=[];if(Bn()){const n=document.cookie.split(";");for(;n.length;){const i=n.pop();let r=i.indexOf("=");r=r<0?i.length:r;decodeURIComponent(i.slice(0,r).replace(/^\s+/,"")).indexOf(e)>=0&&t.push(decodeURIComponent(i.slice(r+1)))}}return t}}),br,t)}}}function Ir({moduleType:e,moduleName:t,bidderCode:n}={}){function i(){throw new Error("Invalid invocation for getStorageManager: must set either bidderCode, or moduleType + moduleName")}return n?((e&&e!==Si||t)&&i(),e=Si,t=n):t&&e||i(),wr({moduleType:e,moduleName:t})}function Tr(e){return wr({moduleName:e,moduleType:Ei})}rr(sr,"deviceAccess config",(function(){if(!Bn())return{allow:!1}})),rr(sr,"bidderSettings.*.storageAllowed",(function(e,t=Ai){if(e[Ji]!==Si)return;let n=t.get(e[Xi],"storageAllowed");if(n&&!0!==n){const t=e[Yi];n=Array.isArray(n)?n.some((e=>e===t)):n===t}else n=!!n;return n?void 0:{allow:n}}));const Cr={syncEnabled:!0,filterSettings:{image:{bidders:"*",filter:"include"}},syncsPerBidder:5,syncDelay:3e3,auctionDelay:500};lt.setDefaults({userSync:xn(Cr)});const Ar=Tr("usersync");const Er=function(e){let t={},n={image:[],iframe:[]},i=new Set,r={},o={image:!0,iframe:!1},s=e.config;function a(){if(s.syncEnabled&&e.browserSupportsCookies){try{!function(){if(!o.iframe)return;d(n.iframe,(e=>{let[t,i]=e;var r,o;Kt(`Invoking iframe user sync for bidder: ${t}`),wn(i),o=t,(r=n).image=r.image.filter((e=>e[0]!==o))}))}(),function(){if(!o.image)return;d(n.image,(e=>{let[t,n]=e;Kt(`Invoking image pixel user sync for bidder: ${t}`),yn(n)}))}()}catch(t){return Qt("Error firing user syncs",t)}n={image:[],iframe:[]}}}function d(e,t){Sn(e).forEach(t)}function l(e,t){let n=s.filterSettings;if(function(e,t){if(e.all&&e[t])return Yt(`Detected presence of the "filterSettings.all" and "filterSettings.${t}" in userSync config. You cannot mix "all" with "iframe/image" configs; they are mutually exclusive.`),!1;let n=e.all?e.all:e[t],i=e.all?"all":t;if(!n)return!1;let r=n.filter,o=n.bidders;if(r&&"include"!==r&&"exclude"!==r)return Yt(`UserSync "filterSettings.${i}.filter" setting '${r}' is not a valid option; use either 'include' or 'exclude'.`),!1;if("*"!==o&&!(Array.isArray(o)&&o.length>0&&o.every((e=>dn(e)&&"*"!==e))))return Yt(`Detected an invalid setup in userSync "filterSettings.${i}.bidders"; use either '*' (to represent all bidders) or an array of bidders.`),!1;return!0}(n,e)){o[e]=!0;let i=n.all?n.all:n[e],r="*"===i.bidders?[t]:i.bidders;return{include:(e,t)=>!Ce(e,t),exclude:(e,t)=>Ce(e,t)}[i.filter||"include"](r,t)}return!o[e]}return lt.getConfig("userSync",(e=>{if(e.userSync){let t=e.userSync.filterSettings;un(t)&&(t.image||t.all||(e.userSync.filterSettings.image={bidders:"*",filter:"include"}))}s=Object.assign(s,e.userSync)})),e.regRule(ar,"userSync config",(e=>{if(!s.syncEnabled)return{allow:!1,reason:"syncs are disabled"};if(e[Ji]===Si){const n=e[Zi],i=e[Ki];if(!t.canBidderRegisterSync(n,i))return{allow:!1,reason:`${n} syncs are not enabled for ${i}`}}})),t.registerSync=(t,o,a)=>i.has(o)?Kt(`already fired syncs for "${o}", ignoring registerSync call`):s.syncEnabled&&ln(n[t])?o?0!==s.syncsPerBidder&&Number(r[o])>=s.syncsPerBidder?Yt(`Number of user syncs exceeded for "${o}"`):void(e.isAllowed(ar,hr(Si,o,{[Zi]:t,[er]:a}))&&(n[t].push([o,a]),r=function(e,t){return e[t]?e[t]+=1:e[t]=1,e}(r,o))):Yt("Bidder is required for registering sync"):Yt(`User sync type "${t}" not supported`),t.bidderDone=i.add.bind(i),t.syncUsers=(e=0)=>{if(e)return setTimeout(a,Number(e));a()},t.triggerUserSyncs=()=>{s.enableOverride&&t.syncUsers()},t.canBidderRegisterSync=(e,t)=>!s.filterSettings||!l(e,t),t}(Object.defineProperties({config:lt.getConfig("userSync"),isAllowed:or,regRule:rr},{browserSupportsCookies:{get:function(){return!/^((?!chrome|android|crios|fxios).)*safari/i.test(navigator.userAgent)&&Ar.cookiesAreEnabled()}}})),Sr="outstream",xr="instream",kr=new Map([["mimes",e=>Array.isArray(e)&&e.length>0&&e.every((e=>"string"==typeof e))],["minduration",zn],["maxduration",zn],["startdelay",zn],["maxseq",zn],["poddur",zn],["protocols",Wn],["w",zn],["h",zn],["podid",dn],["podseq",zn],["rqddurs",Wn],["placement",zn],["plcmt",zn],["linearity",zn],["skip",e=>[1,0].includes(e)],["skipmin",zn],["skipafter",zn],["sequence",zn],["slotinpod",zn],["mincpmpersec",cn],["battr",Wn],["maxextended",zn],["minbitrate",zn],["maxbitrate",zn],["boxingallowed",zn],["playbackmethod",Wn],["playbackend",zn],["delivery",Wn],["pos",zn],["api",Wn],["companiontype",Wn],["poddedupe",Wn]]);function _r(e,t){var n;const i=null==(n=null==e?void 0:e.mediaTypes)?void 0:n.video;un(i)?null!=i&&Object.entries(i).forEach((([t,n])=>{if(!kr.has(t))return;kr.get(t)(n)||(delete i[t],Yt(`Invalid prop in adUnit "${e.code}": Invalid value for mediaTypes.video.${t} ORTB property. The property has been removed.`))})):Yt("validateOrtbVideoFields: videoParams must be an object.")}const Ur=Fi("sync",(function(e,t,n,i,r){return n&&(r||i!==Sr)?lt.getConfig("cache.url")||!e.vastXml||e.vastUrl?!(!e.vastUrl&&!e.vastXml):(Qt('\n This bid contains only vastXml and will not work when a prebid cache url is not specified.\n Try enabling prebid cache with slmpbjs.setConfig({ cache: {url: "..."} });\n '),!1):!(i===Sr&&!r)||!!(e.renderer||t&&t.renderer||n.renderer)}),"checkVideoBidSetup"),Rr="native",Or="video",Dr="banner",Br="adpod";let Pr=null,jr=0,Nr=[];function qr(e,t){const n=jr;let i=setTimeout((()=>{jr===n&&null==Pr?e():null!=Pr?Nr.push({callback:e,startTime:n,setTimerId(e){i=e}}):i=qr(e,jr-n)()}),t);return()=>i}function $r({startTime:e=On,ttl:t=()=>null,monotonic:n=!1,slack:i=5e3}={}){const r=new Map,o=[],s=[],a=n?e=>s.push(e):e=>s.splice(function(e,t,n=e=>e){let i=0,r=e.length&&e.length-1;const o=n(t);for(;r-i>1;){const t=i+Math.round((r-i)/2);o>n(e[t])?i=t:r=t}for(;e.length>i&&o>n(e[i]);)i++;return i}(s,e,(e=>e.expiry)),0,e);let d,l;function c(){if(l&&clearTimeout(l),s.length>0){const e=On();d=Math.max(e,s[0].expiry+i),l=qr((()=>{const e=On();let t=0;for(const n of s){if(n.expiry>e)break;o.forEach((e=>{try{e(n.item)}catch(t){Qt(t)}})),r.delete(n.item),t++}s.splice(0,t),l=null,c()}),d-e)}else l=null}function u(n){const r={},o=p;let s;const[u,m]=Object.entries({start:e,delta:t}).map((([e,t])=>{let u;return function(){const m=u={};ft.resolve(t(n)).then((t=>{m===u&&(r[e]=t,o===p&&null!=r.start&&null!=r.delta&&(s=r.start+r.delta,a(f),(null==l||d>s+i)&&c()))}))}})),f={item:n,refresh:m,get expiry(){return s}};return u(),m(),f}let p={};return{[Symbol.iterator]:()=>r.keys(),add(e){!r.has(e)&&r.set(e,u(e))},clear(){s.length=0,c(),r.clear(),p={}},toArray:()=>Array.from(r.keys()),refresh(){s.length=0,c();for(const e of r.values())e.refresh()},onExpiry:e=>(o.push(e),()=>{const t=o.indexOf(e);t>=0&&o.splice(t,1)})}}document.addEventListener("visibilitychange",(function(){document.hidden?Pr=Date.now():(jr+=Date.now()-(Pr??0),Pr=null,Nr.forEach((({callback:e,startTime:t,setTimerId:n})=>n(qr(e,jr-t)()))),Nr=[])}));const Fr="eventHistoryTTL";let Mr=null;const zr=$r({monotonic:!0,ttl:()=>Mr});lt.getConfig(Fr,(e=>{const t=Mr;e=null==e?void 0:e[Fr],Mr="number"==typeof e?1e3*e:null,t!==Mr&&zr.refresh()}));let Lr=Array.prototype.slice,Vr=Array.prototype.push,Wr=Object.values(je);const Gr={bidWon:"adUnitCode"},Hr=function(){let e={},t={};function n(e){return Wr.includes(e)}return t.has=n,t.on=function(t,i,r){if(n(t)){let n=e[t]||{que:[]};r?(n[r]=n[r]||{que:[]},n[r].que.push(i)):n.que.push(i),e[t]=n}else Qt("Wrong event name : "+t+" Valid event names :"+Wr)},t.emit=function(t){!function(t,n){Kt("Emitting event for: "+t);let i=n[0]||{},r=i[Gr[t]],o=e[t]||{que:[]};var s=Object.keys(o);let a=[];zr.add({eventType:t,args:i,id:r,elapsedTime:window.performance&&window.performance.now&&window.performance.now()||0}),r&&s.includes(r)&&Vr.apply(a,o[r].que),Vr.apply(a,o.que),(a||[]).forEach((function(e){if(e)try{e.apply(null,n)}catch(i){Qt("Error executing handler:","events.js",i,t)}}))}(t,Lr.call(arguments,1))},t.off=function(t,n,i){let r=e[t];mn(r)||mn(r.que)&&mn(r[i])||i&&(mn(r[i])||mn(r[i].que))||(i?(r[i].que||[]).forEach((function(e){let t=r[i].que;e===n&&t.splice(t.indexOf(e),1)})):(r.que||[]).forEach((function(e){let t=r.que;e===n&&t.splice(t.indexOf(e),1)})),e[t]=r)},t.get=function(){return e},t.addEvents=function(e){Wr=Wr.concat(e)},t.getEvents=function(){return zr.toArray().map((e=>Object.assign({},e)))},t}();var Jr;Jr=Hr.emit.bind(Hr),xt=Jr;const{on:Kr,off:Xr,get:Yr,getEvents:Qr,emit:Zr,addEvents:eo,has:to}=Hr,no="performanceMetrics",io=window.performance&&window.performance.now?()=>window.performance.now():()=>Date.now(),ro=new WeakMap;function oo({now:e=io,mkNode:t=lo,mkTimer:n=ao,mkRenamer:i=e=>e,nodes:r=ro}={}){return function(){return function o(s,a=e=>({forEach(t){t(e)}})){a=i(a);const d=(l="timestamps",function(e){return s.dfWalk({visit(t,n){const i=n[l];if(i.hasOwnProperty(e))return i[e]}})});var l;function c(e,t){const n=a(e);s.dfWalk({follow:(e,t)=>t.propagate&&(!e||!e.stopPropagation),visit(e,i){n.forEach((n=>{null==e?i.metrics[n]=t:(i.groups.hasOwnProperty(n)||(i.groups[n]=[]),i.groups[n].push(t))}))}})}function u(t){return n(e,(e=>c(t,e)))}function p(){let e={};return s.dfWalk({visit(t,n){e=Object.assign({},!t||t.includeGroups?n.groups:null,n.metrics,e)}}),e}const m={startTiming:u,measureTime:function(e,t){return u(e).stopAfter(t)()},measureHookTime:function(e,t,n){const i=u(e);return n(function(e){const t=i.stopBefore(e);return t.bail=e.bail&&i.stopBefore(e.bail),t.stopTiming=i,t.untimed=e,t}(t))},checkpoint:function(t){s.timestamps[t]=e()},timeSince:function(t,n){const i=d(t),r=null!=i?e()-i:null;return null!=n&&c(n,r),r},timeBetween:function(e,t,n){const i=d(e),r=d(t),o=null!=i&&null!=r?r-i:null;return null!=n&&c(n,o),o},setMetric:c,getMetrics:p,fork:function({propagate:e=!0,stopPropagation:n=!1,includeGroups:i=!1}={}){return o(t([[s,{propagate:e,stopPropagation:n,includeGroups:i}]]),a)},join:function(e,{propagate:t=!0,stopPropagation:n=!1,includeGroups:i=!1}={}){const o=r.get(e);null!=o&&o.addParent(s,{propagate:t,stopPropagation:n,includeGroups:i})},newMetrics:function(){return o(s.newSibling(),a)},renameWith:function(e){return o(s,e)},toJSON:()=>p()};return r.set(m,s),m}(t([]))}}function so(e,t,n){return function(){t&&t();try{return e.apply(this,arguments)}finally{n&&n()}}}function ao(e,t){const n=e();let i=!1;function r(){i||(t(e()-n),i=!0)}return r.stopBefore=e=>so(e,r),r.stopAfter=e=>so(e,null,r),r}function lo(e){return{metrics:{},timestamps:{},groups:{},addParent(t,n){e.push([t,n])},newSibling:()=>lo(e.slice()),dfWalk({visit:t,follow:n=()=>!0,visited:i=new Set,inEdge:r}={}){let o;if(!i.has(this)){if(i.add(this),o=t(r,this),null!=o)return o;for(const[s,a]of e)if(n(r,a)&&(o=s.dfWalk({visit:t,follow:n,visited:i,inEdge:a}),null!=o))return o}}}}const co=(()=>{const e=function(){},t=()=>({}),n={forEach:e},i=()=>null;i.stopBefore=e=>e,i.stopAfter=e=>e;const r=Object.defineProperties({dfWalk:e,newSibling:()=>r,addParent:e},Object.fromEntries(["metrics","timestamps","groups"].map((e=>[e,{get:t}]))));return oo({now:()=>0,mkNode:()=>r,mkRenamer:()=>()=>n,mkTimer:()=>i,nodes:{get:e,set:e}})()})();let uo=!0;function po(e){return uo&&e||co}lt.getConfig(no,(e=>{uo=!!e[no]}));const mo=(()=>{const e=oo();return function(){return uo?e():co}})();function fo(e,t){return function(n,i){return function(r,...o){const s=this;return po(t.apply(s,o)).measureHookTime(e+n,r,(function(e){return i.call(s,e,...o)}))}}}const go=fo("requestBids.",(e=>e.metrics)),ho=fo("addBidResponse.",((e,t)=>t.metrics));function vo(e,t,n,{index:i=Ko.index,bs:r=Ai}={}){n=n||i.getBidRequest(t);const o=null==t?void 0:t.adapterCode,s=(null==t?void 0:t.bidderCode)||(null==n?void 0:n.bidder),a=r.get(null==t?void 0:t.adapterCode,"adjustAlternateBids"),d=r.getOwn(s,"bidCpmAdjustment")||r.get(a?o:s,"bidCpmAdjustment");if(d&&"function"==typeof d)try{return d(e,Object.assign({},t),n)}catch(l){Qt("Error during bid adjustment",l)}return e}const{syncUsers:bo}=Er,yo="started",wo="inProgress",Io="completed";Kr(je.BID_ADJUSTMENT,(function(e){!function(e){let t=vo(e.cpm,e);t>=0&&(e.cpm=t)}(e)}));const To=4,Co={},Ao={},Eo=[],So=bt();function xo({adUnits:e,adUnitCodes:t,callback:n,cbTimeout:i,labels:r,auctionId:o,ortb2Fragments:s,metrics:a}){a=po(a);const d=e,l=r,c=t,u=o||$t(),p=i,m=new Set,f=gt();let g,h,v,b,y=[],w=n,I=[],T=[],C=[],A=[],E=[];function S(){return{auctionId:u,timestamp:g,auctionEnd:h,auctionStatus:b,adUnits:d,adUnitCodes:c,labels:l,bidderRequests:I,noBids:C,bidsReceived:T,bidsRejected:y,winningBids:A,timeout:p,metrics:a,seatNonBids:E}}function x(t){if(t?Zr(je.AUCTION_TIMEOUT,S()):clearTimeout(v),void 0===h){let n=[];t&&(Kt(`Auction ${u} timedOut`),n=I.filter((e=>!m.has(e.bidderRequestId))).flatMap((e=>e.bids)),n.length&&Zr(je.BID_TIMEOUT,n)),b=Io,h=Date.now(),a.checkpoint("auctionEnd"),a.timeBetween("requestBids","auctionEnd","requestBids.total"),a.timeBetween("callBids","auctionEnd","requestBids.callBids"),f.resolve(),Zr(je.AUCTION_END,S()),Ro(d,(function(){try{if(null!=w){const e=T.filter((e=>c.includes(e.adUnitCode))).reduce(Lo,{});w.apply(So,[e,t,u]),w=null}}catch(i){Qt("Error executing bidsBackHandler",null,i)}finally{n.length&&Sa.callTimedOutBidders(e,n,p);let t=lt.getConfig("userSync")||{};t.enableOverride||bo(t.syncDelay)}}))}}function k(){lt.resetBidder(),Xt(`Bids Received for Auction with id: ${u}`,T),b=Io,x(!1)}function _(e){m.add(e)}function U(e){e.forEach((e=>{var t;t=e,I=I.concat(t)}));let t={},n={bidRequests:e,run:()=>{v=setTimeout((()=>x(!0)),p),b=wo,Zr(je.AUCTION_INIT,S());let n=function(e,t,{index:n=Ko.index}={}){let i=0,r=!1,o=new Set,s={};function a(){i--,r&&0===i&&e()}function d(e,t,n){return s[t.requestId]=!0,function(e,t,{index:n=Ko.index}={}){const i=n.getBidderRequest(e),r=n.getAdUnit(e),o=i&&i.start||e.requestTimestamp;Object.assign(e,{responseTimestamp:e.responseTimestamp||On(),requestTimestamp:e.requestTimestamp||o,cpm:parseFloat(e.cpm)||0,bidder:e.bidder||e.bidderCode,adUnitCode:t}),null!=(null==r?void 0:r.ttlBuffer)&&(e.ttlBuffer=r.ttlBuffer);e.timeToRespond=e.responseTimestamp-e.requestTimestamp}(t,e),i++,n(a)}function l(e,i){d(e,i,(e=>{let r=function(e,{index:t=Ko.index}={}){var n;Zr(je.BID_ADJUSTMENT,e);const i=(null==(n=t.getBidRequest(e))?void 0:n.renderer)||t.getAdUnit(e).renderer,r=e.mediaType,o=t.getMediaTypes(e),s=o&&o[r];var a=s&&s.renderer,d=null;a&&a.url&&a.render&&(!0!==a.backupOnly||!e.renderer)?d=a:i&&i.url&&i.render&&(!0!==i.backupOnly||!e.renderer)&&(d=i);d&&(e.renderer=Ci.install({url:d.url,config:d.options}),e.renderer.setRender(d.render));const l=Bo(e.mediaType,o,lt.getConfig("mediaTypePriceGranularity")),c=function(e,t,n=1){let i=parseFloat(e);return isNaN(i)&&(i=""),{low:""===i?"":Oe(e,xe,n),med:""===i?"":Oe(e,ke,n),high:""===i?"":Oe(e,_e,n),auto:""===i?"":Oe(e,Re,n),dense:""===i?"":Oe(e,Ue,n),custom:""===i?"":Oe(e,t,n)}}(e.cpm,"object"==typeof l?l:lt.getConfig("customPriceBucket"),lt.getConfig("currency.granularityMultiplier"));return e.pbLg=c.low,e.pbMg=c.med,e.pbHg=c.high,e.pbAg=c.auto,e.pbDg=c.dense,e.pbCg=c.custom,e}(i);Zr(je.BID_ACCEPTED,r),r.mediaType===Or?function(e,t,n,{index:i=Ko.index}={}){let r=!0;const o=yt(i.getMediaTypes({requestId:t.originalRequestId||t.requestId,adUnitId:t.adUnitId}),"video"),s=o&&yt(o,"context"),a=o&&yt(o,"useCacheKey");lt.getConfig("cache.url")&&(a||s!==Sr)&&(!t.videoCacheKey||lt.getConfig("cache.ignoreBidderCacheKey")?(r=!1,Do(e,t,n,o)):t.vastUrl||(Qt("videoCacheKey specified but not required vastUrl for video bid"),r=!1));r&&(Oo(e,t),n())}(t,r,e):(function(e){return e.native&&"object"==typeof e.native}(r)&&function(e,t){var n;const i=null==t?void 0:t.nativeOrtbRequest,r=null==(n=e.native)?void 0:n.ortb;if(i&&r){const t=function(e,t){const n={},i=(null==t?void 0:t.assets)||[];n.clickUrl=e.link.url,n.privacyLink=e.privacy;for(const o of(null==e?void 0:e.assets)||[]){const e=i.find((e=>o.id===e.id));o.title?n.title=o.title.text:o.img?n[e.img.type===Qe.MAIN?"image":"icon"]={url:o.img.url,width:o.img.w,height:o.img.h}:o.data&&(n[bs[ys[e.data.type]]]=o.data.value)}n.impressionTrackers=[];let r=[];e.imptrackers&&n.impressionTrackers.push(...e.imptrackers);for(const o of(null==e?void 0:e.eventtrackers)||[])o.event===Is.impression&&o.method===ws.img&&n.impressionTrackers.push(o.url),o.event===Is.impression&&o.method===ws.js&&r.push(o.url);r=r.map((e=>`<script async src="${e}"><\/script>`)),(null==e?void 0:e.jstracker)&&r.push(e.jstracker);r.length&&(n.javascriptTrackers=r.join("\n"));return n}(r,i);Object.assign(e.native,t)}["rendererUrl","adTemplate"].forEach((n=>{var i;const r=null==(i=null==t?void 0:t.nativeParams)?void 0:i[n];r&&(e.native[n]=Us(r))}))}(r,n.getAdUnit(r)),Oo(t,r),e())}))}function c(e,n,i){return d(e,n,(e=>{n.rejectionReason=i,Yt(`Bid from ${n.bidder||"unknown bidder"} was rejected: ${i}`,n),Zr(je.BID_REJECTED,n),t.addBidRejected(n),e()}))}function u(){let n=this,a=t.getBidRequests();const d=lt.getConfig("auctionOptions");if(o.add(n),d&&!mn(d)){const e=d.secondaryBidders;e&&!a.every((t=>Ce(e,t.bidderCode)))&&(a=a.filter((t=>!Ce(e,t.bidderCode))))}r=a.every((e=>o.has(e))),n.bids.forEach((e=>{s[e.bidId]||(t.addNoBid(e),Zr(je.NO_BID,e))})),r&&0===i&&e()}return{addBidResponse:function(){function e(e,t){ko.call({dispatch:l},e,t,(()=>{let n=!1;return i=>{n||(c(e,t,i),n=!0)}})())}return e.reject=c,e}(),adapterDone:function(){_o(ft.resolve()).finally((()=>u.call(this)))}}}(k,this);Sa.callBids(d,e,n.addBidResponse,n.adapterDone,{request(e,n){r(Co,n),r(t,e),Ao[e]||(Ao[e]={SRA:!0,origin:n}),t[e]>1&&(Ao[e].SRA=!1)},done(e){Co[e]--,Eo[0]&&i(Eo[0])&&Eo.shift()}},p,_,s)}};function i(e){let t=!0,n=lt.getConfig("maxRequestsPerOrigin")||To;return e.bidRequests.some((e=>{let i=1,r=void 0!==e.src&&e.src===He.SRC?"s2s":e.bidderCode;return Ao[r]&&(!1===Ao[r].SRA&&(i=Math.min(e.bids.length,n)),Co[Ao[r].origin]+i>n&&(t=!1)),!t})),t&&e.run(),t}function r(e,t){void 0===e[t]?e[t]=1:e[t]++}i(n)||(Yt("queueing auction due to limited endpoint capacity"),Eo.push(n))}return Kr(je.SEAT_NON_BID,(e=>{var t;e.auctionId===u&&(t=e.seatnonbid,E=E.concat(t))})),{addBidReceived:function(e){T=T.concat(e)},addBidRejected:function(e){y=y.concat(e)},addNoBid:function(e){C=C.concat(e)},callBids:function(){b=yo,g=Date.now();let e=a.measureTime("requestBids.makeRequests",(()=>Sa.makeBidRequests(d,g,u,p,l,s,a)));Xt(`Bids Requested for Auction with id: ${u}`,e),a.checkpoint("callBids"),e.length<1?(Yt("No valid bid requests returned for auction"),k()):Uo.call({dispatch:U,context:this},e)},addWinningBid:function(t){const n=e.find((e=>e.adUnitId===t.adUnitId));A=A.concat(t),function({source:e,burl:t}){e===He.SRC&&t&&Pt.triggerPixel(t)}(t),Sa.callBidWonBidder(t.adapterCode||t.bidder,t,e),n&&!n.deferBilling&&Sa.callBidBillableBidder(t)},setBidTargeting:function(e){Sa.callSetTargetingBidder(e.adapterCode||e.bidder,e)},getWinningBids:()=>A,getAuctionStart:()=>g,getAuctionEnd:()=>h,getTimeout:()=>p,getAuctionId:()=>u,getAuctionStatus:()=>b,getAdUnits:()=>d,getAdUnitCodes:()=>c,getBidRequests:()=>I,getBidsReceived:()=>T,getNoBids:()=>C,getNonBids:()=>E,getFPD:()=>s,getMetrics:()=>a,end:f.promise}}const ko=Fi("sync",(function(e,t,n){!function(e){const t=lt.getConfig("maxBid");return!t||!e.cpm||t>=Number(e.cpm)}(t)?n(Ke.PRICE_TOO_HIGH):this.dispatch.call(null,e,t)}),"addBidResponse"),_o=Fi("sync",(e=>e),"responsesReady"),Uo=Fi("sync",(function(e){this.dispatch.call(this.context,e)}),"addBidderRequests"),Ro=Fi("async",(function(e,t){t&&t()}),"bidsBackCallback");function Oo(e,t){!function(e){let t;const n=!0===Ai.get(e.bidderCode,"allowZeroCpmBids")?e.cpm>=0:e.cpm>0;e.bidderCode&&(n||e.dealId)&&(t=function(e,t,{index:n=Ko.index}={}){if(!t)return{};const i=n.getBidRequest(t);var r={};const o=Mo(t.mediaType,e);zo(r,o,t,i),e&&Ai.getOwn(e,Be.ADSERVER_TARGETING)&&(zo(r,Ai.ownSettingsFor(e),t,i),t.sendStandardTargeting=Ai.get(e,"sendStandardTargeting"));t.native&&(r=Object.assign({},r,function(e,{index:t=Ko.index}={}){let n={};const i=t.getAdUnit(e),r=!1!==yt(i,"nativeParams.sendTargetingKeys"),o=function(e){const t={};yt(e,"nativeParams.ext")&&Object.keys(e.nativeParams.ext).forEach((e=>{t[e]=`hb_native_${e}`}));return{...Ge,...t}}(i),s={...e.native,...e.native.ext};return delete s.ext,Object.keys(s).forEach((t=>{const s=o[t];let a=Us(e.native[t])||Us(yt(e,`native.ext.${t}`));if("adTemplate"===t||!s||!a)return;let d=yt(i,`nativeParams.${t}.sendId`);if("boolean"!=typeof d&&(d=yt(i,`nativeParams.ext.${t}.sendId`)),d){a=`${s}:${e.adId}`}let l=yt(i,`nativeParams.${t}.sendTargetingKeys`);"boolean"!=typeof l&&(l=yt(i,`nativeParams.ext.${t}.sendTargetingKeys`));("boolean"==typeof l?l:r)&&(n[s]=a)})),n}(t)));return r}(e.bidderCode,e));e.adserverTargeting=Object.assign(e.adserverTargeting||{},t)}(t),po(t.metrics).timeSince("addBidResponse","addBidResponse.total"),e.addBidReceived(t),Zr(je.BID_RESPONSE,t)}const Do=Fi("async",(function(e,t,n,i){vi(e,t,n)}),"callPrebidCache");function Bo(e,t,n){if(e&&n){if(e===Or){const e=yt(t,`${Or}.context`,"instream");if(n[`${Or}-${e}`])return n[`${Or}-${e}`]}return n[e]}}const Po=e=>e=>{const t=((e,{index:t=Ko.index}={})=>{const n=Bo(e.mediaType,t.getMediaTypes(e),lt.getConfig("mediaTypePriceGranularity"));return"string"==typeof e.mediaType&&n?"string"==typeof n?n:"custom":lt.getConfig("priceGranularity")})(e);return t===Me?e.pbAg:t===ze?e.pbDg:t===qe?e.pbLg:t===$e?e.pbMg:t===Fe?e.pbHg:t===Le?e.pbCg:void 0},jo=()=>e=>e.creativeId?e.creativeId:"",No=()=>e=>e.meta&&e.meta.advertiserDomains&&e.meta.advertiserDomains.length>0?[e.meta.advertiserDomains].flat()[0]:"",qo=()=>e=>e.meta&&(e.meta.networkId||e.meta.networkName)?yt(e,"meta.networkName")||yt(e,"meta.networkId"):"",$o=()=>e=>e.meta&&e.meta.primaryCatId?e.meta.primaryCatId:"";function Fo(e,t){return{key:e,val:"function"==typeof t?function(e,n){return t(e,n)}:function(e){return function(e,t){return e[t]}(e,t)}}}function Mo(e,t){const n=Object.assign({},Ai.settingsFor(null));if(n[Be.ADSERVER_TARGETING]||(n[Be.ADSERVER_TARGETING]=[Fo(Ve.BIDDER,"bidderCode"),Fo(Ve.AD_ID,"adId"),Fo(Ve.PRICE_BUCKET,Po()),Fo(Ve.SIZE,"size"),Fo(Ve.DEAL,"dealId"),Fo(Ve.SOURCE,"source"),Fo(Ve.FORMAT,"mediaType"),Fo(Ve.ADOMAIN,No()),Fo(Ve.ACAT,$o()),Fo(Ve.DSP,qo()),Fo(Ve.CRID,jo())]),"video"===e){const e=n[Be.ADSERVER_TARGETING].slice();if(n[Be.ADSERVER_TARGETING]=e,[Ve.UUID,Ve.CACHE_ID].forEach((t=>{void 0===Ae(e,(e=>e.key===t))&&e.push(Fo(t,"videoCacheKey"))})),lt.getConfig("cache.url")&&(!t||!1!==Ai.get(t,"sendStandardTargeting"))){const t=Jn(lt.getConfig("cache.url"));void 0===Ae(e,(e=>e.key===Ve.CACHE_HOST))&&e.push(Fo(Ve.CACHE_HOST,(function(e){return yt(e,`adserverTargeting.${Ve.CACHE_HOST}`)?e.adserverTargeting[Ve.CACHE_HOST]:t.hostname})))}}return n}function zo(e,t,n,i){var r=t[Be.ADSERVER_TARGETING];return n.size=n.getSize(),(r||[]).forEach((function(r){var o=r.key,s=r.val;if(e[o]&&Yt("The key: "+o+" is being overwritten"),an(s))try{s=s(n,i)}catch(a){Qt("bidmanager","ERROR",a)}(void 0===t.suppressEmptyKeys||!0!==t.suppressEmptyKeys)&&o!==Ve.DEAL&&o!==Ve.ACAT&&o!==Ve.DSP&&o!==Ve.CRID||!fn(s)&&null!=s?e[o]=s:Xt("suppressing empty key '"+o+"' from adserver targeting")})),e}function Lo(e,t){return e[t.adUnitCode]||(e[t.adUnitCode]={bids:[]}),e[t.adUnitCode].bids.push(t),e}function Vo(e){Object.assign(this,{getAuction({auctionId:t}){if(null!=t)return e().find((e=>e.getAuctionId()===t))},getAdUnit({adUnitId:t}){if(null!=t)return e().flatMap((e=>e.getAdUnits())).find((e=>e.adUnitId===t))},getMediaTypes({adUnitId:e,requestId:t}){if(null!=t){const n=this.getBidRequest({requestId:t});if(null!=n&&(null==e||n.adUnitId===e))return n.mediaTypes}else if(null!=e){const t=this.getAdUnit({adUnitId:e});if(null!=t)return t.mediaTypes}},getBidderRequest({requestId:t,bidderRequestId:n}){if(null!=t||null!=n){let i=e().flatMap((e=>e.getBidRequests()));return null!=n&&(i=i.filter((e=>e.bidderRequestId===n))),null==t?i[0]:i.find((e=>e.bids&&null!=e.bids.find((e=>e.bidId===t))))}},getBidRequest({requestId:t}){if(null!=t)return e().flatMap((e=>e.getBidRequests())).flatMap((e=>e.bids)).find((e=>e&&e.bidId===t))}})}let Wo=1;const Go=[];function Ho(e){return e.ttl-(e.hasOwnProperty("ttlBuffer")?e.ttlBuffer:Wo)}lt.getConfig("ttlBuffer",(e=>{if("number"==typeof e.ttlBuffer){const t=Wo;Wo=e.ttlBuffer,t!==Wo&&Go.forEach((e=>e(Wo)))}else Qt("Invalid value for ttlBuffer",e.ttlBuffer)}));const Jo="minBidCacheTTL";const Ko=function(){let e=null;const t=$r({startTime:e=>e.end.then((()=>e.getAuctionEnd())),ttl:t=>null==e?null:t.end.then((()=>1e3*Math.max(e,...t.getBidsReceived().map(Ho))))});var n;n=()=>{null!=e&&t.refresh()},Go.push(n),lt.getConfig(Jo,(n=>{const i=e;e=null==n?void 0:n[Jo],e="number"==typeof e?e:null,i!==e&&t.refresh()}));const i={onExpiry:t.onExpiry};function r(e){for(const n of t)if(n.getAuctionId()===e)return n}function o(){return t.toArray().flatMap((e=>e.getBidsReceived()))}return i.addWinningBid=function(e){const t=po(e.metrics);t.checkpoint("bidWon"),t.timeBetween("auctionEnd","bidWon","render.pending"),t.timeBetween("requestBids","bidWon","render.e2e");const n=r(e.auctionId);n?(e.status=Je.RENDERED,n.addWinningBid(e)):Yt("Auction not found when adding winning bid")},Object.entries({getAllWinningBids:{name:"getWinningBids"},getBidsRequested:{name:"getBidRequests"},getNoBids:{},getAdUnits:{},getBidsReceived:{pre:e=>e.getAuctionStatus()===Io},getAdUnitCodes:{post:Tn}}).forEach((([e,{name:n=e,pre:r,post:o}])=>{const s=null==r?e=>e[n]():e=>r(e)?e[n]():[],a=null==o?e=>e:e=>e.filter(o);i[e]=()=>a(t.toArray().flatMap(s))})),i.getAllBidsForAdUnitCode=function(e){return o().filter((t=>t&&t.adUnitCode===e))},i.createAuction=function(e){const n=xo(e);return function(e){t.add(e)}(n),n},i.findBidByAdId=function(e){return o().find((t=>t.adId===e))},i.getStandardBidderAdServerTargeting=function(){return Mo()[Be.ADSERVER_TARGETING]},i.setStatusForBids=function(e,t){let n=i.findBidByAdId(e);if(n&&(n.status=t),n&&t===Je.BID_TARGETING_SET){const e=r(n.auctionId);e&&e.setBidTargeting(n)}},i.getLastAuctionId=function(){const e=t.toArray();return e.length&&e[e.length-1].getAuctionId()},i.clearAllAuctions=function(){t.clear()},i.index=new Vo((()=>t.toArray())),i}(),Xo=Fi("sync",(function(e){return'(()=>{"use strict";window.render=function({ad:d,adUrl:e,width:i,height:r},{mkFrame:n},o){if(!d&&!e)throw{reason:"noAd",message:"Missing ad markup or URL"};{const s=o.document,t={width:i,height:r};e&&!d?t.src=e:t.srcdoc=d,s.body.appendChild(n(s,t))}}})();'})),Yo=function(){const e={};return function(t){const n=Xo(t);return e.hasOwnProperty(n)||(e[n]=new ft((e=>{const t=rn();t.srcdoc=`<script>${n}<\/script>`,t.onload=()=>e(t.contentWindow.render),document.body.appendChild(t)}))),e[n]}}(),{AD_RENDER_FAILED:Qo,AD_RENDER_SUCCEEDED:Zo,STALE_RENDER:es,BID_WON:ts}=je,{EXCEPTION:ns}=Ne,is=Fi("sync",(function(e,t=!0,n=ft.resolve()){return n.then((t=>t??Ko.findBidByAdId(e))).catch((()=>{}))})),rs=Fi("sync",(function(e){Zr(ts,e),Ko.addWinningBid(e)}));function os({reason:e,message:t,bid:n,id:i}){const r={reason:e,message:t};n&&(r.bid=n,r.adId=n.adId),i&&(r.adId=i),Qt(`Error rendering ad (id: ${i}): ${t}`),Zr(Qo,r)}function ss({doc:e,bid:t,id:n}){const i={doc:e};t&&(i.bid=t),n&&(i.adId=n),Sa.callAdRenderSucceededBidder(t.adapterCode||t.bidder,t),Zr(Zo,i)}function as(e,t){switch(e.event){case je.AD_RENDER_FAILED:os({bid:t,id:t.adId,reason:e.info.reason,message:e.info.message});break;case je.AD_RENDER_SUCCEEDED:ss({doc:null,bid:t,id:t.adId});break;default:Qt(`Received event request for unsupported event: '${e.event}' (adId: '${t.adId}')`)}}function ds(e,t,{resizeFn:n,fireTrackers:i=Ss}){if("resizeNativeHeight"===e.action)n(e.width,e.height);else i(e,t)}const ls={[et.EVENT]:as};ls[et.NATIVE]=ds;const cs=Fi("sync",(function(e,t){const{ad:n,adUrl:i,cpm:r,originalCpm:o,width:s,height:a}=e,d={AUCTION_PRICE:o||r,CLICKTHROUGH:(null==t?void 0:t.clickUrl)||""};return{ad:Rn(n,d),adUrl:Rn(i,d),width:s,height:a}})),us=Fi("sync",(function({renderFn:e,resizeFn:t,bidResponse:n,options:i}){if(n.mediaType===Or)return void os({reason:Ne.PREVENT_WRITING_ON_MAIN_DOCUMENT,message:"Cannot render video ad",bid:n,id:n.adId});const r=cs(n,i);e(Object.assign({adId:n.adId},r));const{width:o,height:s}=r;null!=(o??s)&&t(o,s)}));function ps({renderFn:e,resizeFn:t,adId:n,options:i,bidResponse:r,doc:o}){if(null!=r){if(r.status!==Je.RENDERED||(Yt(`Ad id ${n} has been rendered before`),Zr(es,r),!yt(lt.getConfig("auctionOptions"),"suppressStaleRender"))){try{us({renderFn:e,resizeFn:t,bidResponse:r,options:i,doc:o})}catch(s){os({reason:Ne.EXCEPTION,message:s.message,id:n,bid:r})}rs(r)}}else os({reason:Ne.CANNOT_FIND_AD,message:`Cannot find ad '${n}'`,id:n})}function ms(e,t,n){let i;function r(e,n){os(Object.assign({id:t,bid:i},{reason:e,message:n}))}function o(t,n){e.defaultView&&e.defaultView.frameElement&&(t&&(e.defaultView.frameElement.width=t),n&&(e.defaultView.frameElement.height=n))}const s=(a={resizeFn:o},function(e,t,n){ls.hasOwnProperty(e)&&ls[e](t,n,a)});var a;function d(t){t.ad?(e.write(t.ad),e.close(),ss({doc:e,bid:i,adId:i.adId})):Yo(i).then((n=>n(t,{sendMessage:(e,t)=>s(e,t,i),mkFrame:nn},e.defaultView))).then((()=>ss({doc:e,bid:i,adId:i.adId})),(e=>{r((null==e?void 0:e.reason)||Ne.EXCEPTION,null==e?void 0:e.message),(null==e?void 0:e.stack)&&Qt(e)}));vn(document.createComment(`Creative ${i.creativeId} served by ${i.bidder} Prebid.js Header Bidding`),e,"html")}try{t&&e?e!==document||kn()?is(t).then((r=>{i=r,ps({renderFn:d,resizeFn:o,adId:t,options:{clickUrl:null==n?void 0:n.clickThrough},bidResponse:r,doc:e})})):r(Ne.PREVENT_WRITING_ON_MAIN_DOCUMENT,"renderAd was prevented from writing to the main document."):r(Ne.MISSING_DOC_OR_ADID,"missing "+(t?"doc":"adId"))}catch(l){r(ns,l.message)}}function fs(){if(!window.frames[tt])if(document.body){const e=rn();e.name=tt,document.body.appendChild(e)}else window.requestAnimationFrame(fs)}us.before((function(e,t){const{bidResponse:n,doc:i}=t;var r;(r=n.renderer)&&(r.url||r.renderNow)?(!function(e,t,n){let i=null;e.config&&e.config.documentResolver&&(i=e.config.documentResolver(t,document,n)),i||(i=document),e.documentContext=i,e.render(t,e.documentContext)}(n.renderer,n,i),ss({doc:i,bid:n,id:n.adId}),e.bail()):e(t)}),100);const gs=[],hs=Object.keys(Ge).map((e=>Ge[e])),vs={image:{ortb:{ver:"1.2",assets:[{required:1,id:1,img:{type:3,wmin:100,hmin:100}},{required:1,id:2,title:{len:140}},{required:1,id:3,data:{type:1}},{required:0,id:4,data:{type:2}},{required:0,id:5,img:{type:1,wmin:20,hmin:20}}]},image:{required:!0},title:{required:!0},sponsoredBy:{required:!0},clickUrl:{required:!0},body:{required:!1},icon:{required:!1}}},bs=js(Xe),ys=js(Ye),ws={img:1,js:2,1:"img",2:"js"},Is={impression:1,"viewable-mrc50":2,"viewable-mrc100":3,"viewable-video50":4};function Ts(e){if(e&&e.type&&function(e){if(!e||!Ce(Object.keys(vs),e))return Qt(`${e} nativeParam is not supported`),!1;return!0}(e.type)&&(e=vs[e.type]),!e||!e.ortb||As(e.ortb))return e}function Cs(e){e.forEach((e=>{const t=e.nativeParams||yt(e,"mediaTypes.native");t&&(e.nativeParams=Ts(t)),e.nativeParams&&(e.nativeOrtbRequest=e.nativeParams.ortb||function(e){if(!e&&!un(e))return void Qt("Native assets object is empty or not an object: ",e);const t={ver:"1.2",assets:[]};for(let n in e){if(Ze.includes(n))continue;if(!Ge.hasOwnProperty(n)){Qt(`Unrecognized native asset code: ${n}. Asset will be ignored.`);continue}if("privacyLink"===n){t.privacy=1;continue}const i=e[n];let r=0;i.required&&pn(i.required)&&(r=Number(i.required));const o={id:t.assets.length,required:r};if(n in Xe)o.data={type:Ye[Xe[n]]},i.len&&(o.data.len=i.len);else if("icon"===n||"image"===n){if(o.img={type:"icon"===n?Qe.ICON:Qe.MAIN},i.aspect_ratios)if(ln(i.aspect_ratios))if(i.aspect_ratios.length){const{min_width:e,min_height:t}=i.aspect_ratios[0];zn(e)&&zn(t)?(o.img.wmin=e,o.img.hmin=t):Qt("image.aspect_ratios min_width or min_height are invalid: ",e,t);const n=i.aspect_ratios.filter((e=>e.ratio_width&&e.ratio_height)).map((e=>`${e.ratio_width}:${e.ratio_height}`));n.length>0&&(o.img.ext={aspectratios:n})}else Qt("image.aspect_ratios was passed, but it's empty:",i.aspect_ratios);else Qt("image.aspect_ratios was passed, but it's not a an array:",i.aspect_ratios);i.sizes&&(2===i.sizes.length&&zn(i.sizes[0])&&zn(i.sizes[1])?(o.img.w=i.sizes[0],o.img.h=i.sizes[1],delete o.img.hmin,delete o.img.wmin):Qt("image.sizes was passed, but its value is not an array of integers:",i.sizes))}else"title"===n?o.title={len:i.len||140}:"ext"===n&&(o.ext=i,delete o.required);t.assets.push(o)}return t}(e.nativeParams))}))}function As(e){const t=e.assets;if(!Array.isArray(t)||0===t.length)return Qt("assets in mediaTypes.native.ortb is not an array, or it's empty. Assets: ",t),!1;const n=t.map((e=>e.id));return t.length!==new Set(n).size||n.some((e=>e!==parseInt(e,10)))?(Qt("each asset object must have 'id' property, it must be unique and it must be an integer"),!1):e.hasOwnProperty("eventtrackers")&&!Array.isArray(e.eventtrackers)?(Qt("ortb.eventtrackers is not an array. Eventtrackers: ",e.eventtrackers),!1):t.every((e=>function(e){if(!un(e))return Qt("asset must be an object. Provided asset: ",e),!1;if(e.img){if(!cn(e.img.w)&&!cn(e.img.wmin))return Qt("for img asset there must be 'w' or 'wmin' property"),!1;if(!cn(e.img.h)&&!cn(e.img.hmin))return Qt("for img asset there must be 'h' or 'hmin' property"),!1}else if(e.title){if(!cn(e.title.len))return Qt("for title asset there must be 'len' property defined"),!1}else if(e.data){if(!cn(e.data.type))return Qt("for data asset 'type' property must be a number"),!1}else if(e.video&&!(Array.isArray(e.video.mimes)&&Array.isArray(e.video.protocols)&&cn(e.video.minduration)&&cn(e.video.maxduration)))return Qt("video asset is not properly configured"),!1;return!0}(e)))}function Es(e,{index:t=Ko.index}={}){var n;const i=t.getAdUnit(e);if(!i)return!1;let r=i.nativeOrtbRequest;return function(e,t){if(!yt(e,"link.url"))return Qt("native response doesn't have 'link' property. Ortb response: ",e),!1;let n=t.assets.filter((e=>1===e.required)).map((e=>e.id)),i=e.assets.map((e=>e.id));const r=n.every((e=>Ce(i,e)));r||Qt(`didn't receive a bid with all required assets. Required ids: ${n}, but received ids in response: ${i}`);return r}((null==(n=e.native)?void 0:n.ortb)||Ps(e.native,r),r)}function Ss(e,t){const n=t.native.ortb||Bs(t.native);return"click"===e.action?function(e,t=null,{fetchURL:n=yn}={}){var i,r;if(t){const i=(e.assets||[]).filter((e=>e.link)).reduce(((e,t)=>(e[t.id]=t.link,e)),{}),o=(null==(r=e.link)?void 0:r.clicktrackers)||[];let s=i[t],a=o;s&&(a=s.clicktrackers||[]),a.forEach((e=>n(e)))}else((null==(i=e.link)?void 0:i.clicktrackers)||[]).forEach((e=>n(e)))}(n,null==e?void 0:e.assetId):function(e,{runMarkup:t=e=>function(e){if(!e)return;const t=rn();var n;Pt.insertElement(t,document,"body"),(n=t.contentWindow.document).open(),n.write(e),n.close()}(e),fetchURL:n=yn}={}){const i=(e.eventtrackers||[]).filter((e=>e.event===Is.impression));let{img:r,js:o}=i.reduce(((e,t)=>(ws.hasOwnProperty(t.method)&&e[ws[t.method]].push(t.url),e)),{img:[],js:[]});e.imptrackers&&(r=r.concat(e.imptrackers));r.forEach((e=>n(e))),o=o.map((e=>`<script async src="${e}"><\/script>`)),e.jstracker&&(o=o.concat([e.jstracker]));o.length&&t(o.join("\n"))}(n),e.action}function xs(e,t,n=!1){let i=[];return Object.entries(e).filter((([e,i])=>i&&(!1===n&&"ext"===e||null==t||t.includes(e)))).forEach((([e,r])=>{!1===n&&"ext"===e?i.push(...xs(r,t,!0)):(n||Ge.hasOwnProperty(e))&&i.push({key:e,value:Us(r)})})),i}function ks(e,t,n,{index:i=Ko.index}={}){const r={message:"assetResponse",adId:e.adId};let o=cs(t).native;return o?(r.native=Object.assign({},o),r.renderer=Xo(t),null!=n&&(o.assets=o.assets.filter((({key:e})=>n.includes(e))))):o=function(e,t,n){var i,r;const o={...qn(e.native,["rendererUrl","adTemplate"]),assets:xs(e.native,n),nativeKeys:Ge};return e.native.ortb?o.ortb=e.native.ortb:(null==(r=null==(i=t.mediaTypes)?void 0:i.native)?void 0:r.ortb)&&(o.ortb=Ps(e.native,t.nativeOrtbRequest)),o}(t,i.getAdUnit(t),n),Object.assign(r,o)}const _s=Object.fromEntries(Object.entries(Ge).map((([e,t])=>[t,e])));function Us(e){return(null==e?void 0:e.url)||e}function Rs(e,t){for(;e&&t&&e!==t;)e>t?e-=t:t-=e;return e||t}function Os(e){if(!As(e))return;const t={};for(const n of e.assets){if(n.title){const e={required:!!n.required&&Boolean(n.required),len:n.title.len};t.title=e}else if(n.img){const e={required:!!n.required&&Boolean(n.required)};if(n.img.w&&n.img.h)e.sizes=[n.img.w,n.img.h];else if(n.img.wmin&&n.img.hmin){const t=Rs(n.img.wmin,n.img.hmin);e.aspect_ratios=[{min_width:n.img.wmin,min_height:n.img.hmin,ratio_width:n.img.wmin/t,ratio_height:n.img.hmin/t}]}n.img.type===Qe.MAIN?t.image=e:t.icon=e}else if(n.data){let e=Object.keys(Ye).find((e=>Ye[e]===n.data.type)),i=Object.keys(Xe).find((t=>Xe[t]===e));t[i]={required:!!n.required&&Boolean(n.required)},n.data.len&&(t[i].len=n.data.len)}e.privacy&&(t.privacyLink={required:!1})}return t}function Ds(e){{if(!e||!ln(e))return e;if(!e.some((e=>{var t;return null==(t=((null==e?void 0:e.mediaTypes)||{})[Rr])?void 0:t.ortb})))return e;let t=xn(e);for(const e of t)e.mediaTypes&&e.mediaTypes[Rr]&&e.mediaTypes[Rr].ortb&&(e.mediaTypes[Rr]=Object.assign(Vn(e.mediaTypes[Rr],Ze),Os(e.mediaTypes[Rr].ortb)),e.nativeParams=Ts(e.mediaTypes[Rr]));return t}}function Bs(e){const t={link:{},eventtrackers:[]};return Object.entries(e).forEach((([e,n])=>{switch(e){case"clickUrl":t.link.url=n;break;case"clickTrackers":t.link.clicktrackers=Array.isArray(n)?n:[n];break;case"impressionTrackers":(Array.isArray(n)?n:[n]).forEach((e=>{t.eventtrackers.push({event:Is.impression,method:ws.img,url:e})}));break;case"javascriptTrackers":t.jstracker=Array.isArray(n)?n.join(""):n;break;case"privacyLink":t.privacy=n}})),t}function Ps(e,t){const n={...Bs(e),assets:[]};function i(e,i){let r=t.assets.find(e);null!=r&&(r=xn(r),i(r),n.assets.push(r))}return Object.keys(e).filter((t=>!!e[t])).forEach((t=>{const n=Us(e[t]);switch(t){case"title":i((e=>null!=e.title),(e=>{e.title={text:n}}));break;case"image":case"icon":const e="image"===t?Qe.MAIN:Qe.ICON;i((t=>null!=t.img&&t.img.type===e),(e=>{e.img={url:n}}));break;default:t in Xe&&i((e=>null!=e.data&&e.data.type===Ye[Xe[t]]),(e=>{e.data={value:n}}))}})),n}function js(e){var t={};for(var n in e)t[e[n]]=n;return t}function Ns(e){var t=e;return{callBids:function(){},setBidderCode:function(e){t=e},getBidderCode:function(){return t}}}function qs(e,{src:t="client",bidder:n="",bidId:i,transactionId:r,adUnitId:o,auctionId:s}={}){var a=t,d=e||0;Object.assign(this,{bidderCode:n,width:0,height:0,statusMessage:function(){switch(d){case 0:return"Pending";case 1:return"Bid available";case 2:return"Bid returned empty or error response";case 3:return"Bid timed out"}}(),adId:qt(),requestId:i,transactionId:r,adUnitId:o,auctionId:s,mediaType:"banner",source:a}),this.getStatusCode=function(){return d},this.getSize=function(){return this.width+"x"+this.height},this.getIdentifiers=function(){return{src:this.source,bidder:this.bidderCode,bidId:this.requestId,transactionId:this.transactionId,adUnitId:this.adUnitId,auctionId:this.auctionId}}}function $s(e,t){return new qs(e,t)}const Fs=["cpm","ttl","creativeId","netRevenue","currency"],Ms=["auctionId","transactionId"];function zs(e){const t=Array.isArray(e.supportedMediaTypes)?{supportedMediaTypes:e.supportedMediaTypes}:void 0;function n(e){const n=Ls(e);Sa.registerBidAdapter(n,e.code,t)}n(e),Array.isArray(e.aliases)&&e.aliases.forEach((t=>{let i,r,o=t;un(t)&&(o=t.code,i=t.gvlid,r=t.skipPbsAliasing),Sa.aliasRegistry[o]=e.code,n(Object.assign({},e,{code:o,gvlid:i,skipPbsAliasing:r}))}))}function Ls(e){return Object.assign(new Ns(e.code),{getSpec:function(){return Object.freeze(Object.assign({},e))},registerSyncs:t,callBids:function(n,i,r,o,s,a){if(!Array.isArray(n.bids))return;const d=function(e){if(or(gr,hr(Si,e)))return{bidRequest:e=>e,bidderRequest:e=>e};function t(e,t,n){return Ms.includes(t)?null:Reflect.get(e,t,n)}function n(e,t){const n=new Proxy(e,t);return Object.entries(e).filter((([e,t])=>"function"==typeof t)).forEach((([t,i])=>n[t]=i.bind(e))),n}const i=ei((e=>n(e,{get:t})),(e=>e.bidId));return{bidRequest:i,bidderRequest:e=>n(e,{get:(n,r,o)=>"bids"===r?e.bids.map(i):t(n,r,o)})}}(n.bidderCode);function l(e,t){const n=po(t.metrics);n.checkpoint("addBidResponse"),n.measureTime("addBidResponse.validate",(()=>function(e,t,{index:n=Ko.index}={}){function i(){let e=Object.keys(t);return Fs.every((n=>Ce(e,n)&&!Ce([void 0,null],t[n])))}function r(e){return`Invalid bid from ${t.bidderCode}. Ignoring bid: ${e}`}if(!e)return Yt("No adUnitCode was supplied to addBidResponse."),!1;if(!t)return Yt(`Some adapter tried to add an undefined bid for ${e}.`),!1;if(!i())return Qt(r(`Bidder ${t.bidderCode} is missing required params. Check http://prebid.org/dev-docs/bidder-adapter-1.html for list of params.`)),!1;if("native"===t.mediaType&&!Es(t,{index:n}))return Qt(r("Native bid missing some required properties.")),!1;if("video"===t.mediaType&&!function(e,{index:t=Ko.index}={}){const n=yt(t.getMediaTypes(e),"video"),i=n&&yt(n,"context"),r=n&&yt(n,"useCacheKey"),o=t.getAdUnit(e);return Ur(e,o,n,i,r)}(t,{index:n}))return Qt(r("Video bid does not have required vastUrl or renderer property")),!1;if("banner"===t.mediaType&&!function(e,t,{index:n=Ko.index}={}){if((t.width||0===parseInt(t.width,10))&&(t.height||0===parseInt(t.height,10)))return t.width=parseInt(t.width,10),t.height=parseInt(t.height,10),!0;const i=n.getBidRequest(t),r=n.getMediaTypes(t),o=Mt(i&&i.sizes||r&&r.banner&&r.banner.sizes);if(1===o.length){const[e,n]=o[0].split("x");return t.width=parseInt(e,10),t.height=parseInt(n,10),!0}return!1}(0,t,{index:n}))return Qt(r("Banner bids require a width and height")),!1;return!0}(e,t)))?i(e,t):i.reject(e,t,Ke.INVALID)}const c=[];function u(){r(),lt.runWithBidder(e.code,(()=>{Zr(je.BIDDER_DONE,n),t(c,n.gdprConsent,n.uspConsent,n.gppConsent)}))}const p=Js(n).measureTime("validate",(()=>n.bids.filter((t=>function(t){if(!e.isBidRequestValid(t))return Yt(`Invalid bid sent to bidder ${e.code}: ${JSON.stringify(t)}`),!1;return!0}(d.bidRequest(t))))));if(0===p.length)return void u();const m={};p.forEach((e=>{m[e.bidId]=e,e.adUnitCode||(e.adUnitCode=e.placementCode)})),Ws(e,p.map(d.bidRequest),d.bidderRequest(n),o,a,{onRequest:e=>Zr(je.BEFORE_BIDDER_HTTP,n,e),onResponse:t=>{s(e.code),c.push(t)},onPaapi:e=>{const t=m[e.bidId];t?Hs(t,e):Yt("Received fledge auction configuration for an unknown bidId",e)},onError:(t,i)=>{i.timedOut||s(e.code),Sa.callBidderError(e.code,i,n),Zr(je.BIDDER_ERROR,{error:i,bidderRequest:n}),Qt(`Server call for ${e.code} failed: ${t} ${i.status}. Continuing without bids.`)},onBid:t=>{const n=m[t.requestId];if(n){if(t.adapterCode=n.bidder,function(e,t){let n=Ai.get(t,"allowAlternateBidderCodes")||!1,i=Ai.get(t,"allowedAlternateBidderCodes");if(e&&t&&t!==e&&(i=ln(i)?i.map((e=>e.trim().toLowerCase())).filter((e=>!!e)).filter(Tn):i,!n||ln(i)&&"*"!==i[0]&&!i.includes(e)))return!0;return!1}(t.bidderCode,n.bidder))return Yt(`${t.bidderCode} is not a registered partner or known bidder of ${n.bidder}, hence continuing without bid. If you wish to support this bidder, please mark allowAlternateBidderCodes as true in bidderSettings.`),void i.reject(n.adUnitCode,t,Ke.BIDDER_DISALLOWED);t.originalCpm=t.cpm,t.originalCurrency=t.currency,t.meta=t.meta||Object.assign({},t[n.bidder]);const e=Object.assign($s(Pe.GOOD,n),t,Vn(n,Ms));l(n.adUnitCode,e)}else Yt(`Bidder ${e.code} made bid for unknown request ID: ${t.requestId}. Ignoring.`),i.reject(null,t,Ke.INVALID_REQUEST_ID)},onCompletion:u})}});function t(t,n,i,r){Gs(e,t,n,i,r)}}const Vs=["bids","paapi"],Ws=Fi("sync",(function(e,t,n,i,r,{onRequest:o,onResponse:s,onPaapi:a,onError:d,onBid:l,onCompletion:c}){const u=Js(n);c=u.startTiming("total").stopBefore(c);let p=u.measureTime("buildRequests",(()=>e.buildRequests(t,n)));if(!p||0===p.length)return void c();Array.isArray(p)||(p=[p]);const m=jn(c,p.length);p.forEach((t=>{const n=u.fork();function c(e){null!=e&&(e.metrics=n.fork().renameWith()),l(e)}const p=r((function(i,r){g();try{i=JSON.parse(i)}catch(l){}i={body:i,headers:{get:r.getResponseHeader.bind(r)}},s(i);try{i=n.measureTime("interpretResponse",(()=>e.interpretResponse(i,t)))}catch(u){return Qt(`Bidder ${e.code} failed to interpret the server's response. Continuing without bids`,null,u),void m()}let o,d;i&&!Object.keys(i).some((e=>!Vs.includes(e)))?(o=i.bids,d=i.paapi):o=i,ln(d)&&d.forEach(a),o&&(ln(o)?o.forEach(c):c(o)),m()})),f=r((function(e,t){g(),d(e,t),m()}));o(t);const g=n.startTiming("net");function h(n){const i=t.options;return Object.assign(n,i,{browsingTopics:!((null==i?void 0:i.hasOwnProperty("browsingTopics"))&&!i.browsingTopics)&&((Ai.get(e.code,"topicsHeader")??!0)&&or(mr,hr(Si,e.code)))})}switch(t.method){case"GET":i(`${t.url}${function(e){if(e)return`?${"object"==typeof e?function(e){let t="";for(var n in e)e.hasOwnProperty(n)&&(t+=n+"="+encodeURIComponent(e[n])+"&");return t=t.replace(/&$/,""),t}(e):e}`;return""}(t.data)}`,{success:p,error:f},void 0,h({method:"GET",withCredentials:!0}));break;case"POST":i(t.url,{success:p,error:f},"string"==typeof t.data?t.data:JSON.stringify(t.data),h({method:"POST",contentType:"text/plain",withCredentials:!0}));break;default:Yt(`Skipping invalid request from ${e.code}. Request type ${t.type} must be GET or POST`),m()}}))}),"processBidderRequests"),Gs=Fi("async",(function(e,t,n,i,r){const o=lt.getConfig("userSync.aliasSyncEnabled");if(e.getUserSyncs&&(o||!Sa.aliasRegistry[e.code])){let o=lt.getConfig("userSync.filterSettings"),s=e.getUserSyncs({iframeEnabled:!(!o||!o.iframe&&!o.all),pixelEnabled:!(!o||!o.image&&!o.all)},t,n,i,r);s&&(Array.isArray(s)||(s=[s]),s.forEach((t=>{Er.registerSync(t.type,e.code,t.url)})),Er.bidderDone(e.code))}}),"registerSyncs"),Hs=Fi("sync",((e,t)=>{}),"addPaapiConfig");function Js(e){return po(e.metrics).renameWith((t=>[`adapter.client.${t}`,`adapters.client.${e.bidderCode}.${t}`]))}let Ks={};function Xs(e,t,n){let i=function(e,t){let n=Ks[e]=Ks[e]||{bidders:{}};return t?n.bidders[t]=n.bidders[t]||{}:n}(e,n);return i[t]=(i[t]||0)+1,i[t]}function Ys(e,t){return yt(Ks,`${e}.bidders.${t}.requestsCounter`)||0}function Qs(e,t){return yt(Ks,`${e}.bidders.${t}.winsCounter`)||0}function Zs(e,t=window){if(!e)return e;if(/\w+:\/\//.exec(e))return e;let n=t.location.protocol;try{n=t.top.location.protocol}catch(i){}return/^\/\//.exec(e)?n+e:`${n}//${e}`}function ea(e,{noLeadingWww:t=!1,noPort:n=!1}={}){try{e=new URL(Zs(e))}catch(i){return}return e=n?e.hostname:e.host,t&&e.startsWith("www.")&&(e=e.substring(4)),e}function ta(e){try{const t=e.querySelector("link[rel='canonical']");if(null!==t)return t.href}catch(t){}return null}const na=function(e,t=window){if(t.top!==t)return e;let n,i,r;return function(){const o=ta(t.document),s=t.location.href;return n===o&&s===i||(n=o,i=s,r=e()),r}}((ia=window,function(){const e=[],t=function(e){try{if(!e.location.ancestorOrigins)return;return e.location.ancestorOrigins}catch(t){}}(ia),n=lt.getConfig("maxNestedIframes");let i,r,o,s,a=!1,d=0,l=!1,c=!1,u=!1;do{const n=i,s=c;let p,m=!1,f=null;c=!1,i=i?i.parent:ia;try{p=i.location.href||null}catch(g){m=!0}if(m)if(s){const e=n.context;try{f=e.sourceUrl,r=f,u=!0,l=!0,i===ia.top&&(a=!0),e.canonicalUrl&&(o=e.canonicalUrl)}catch(g){}}else{Yt("Trying to access cross domain iframe. Continuing without referrer and location");try{const e=n.document.referrer;e&&(f=e,i===ia.top&&(a=!0))}catch(g){}!f&&t&&t[d-1]&&(f=t[d-1],i===ia.top&&(u=!0)),f&&!l&&(r=f)}else{if(p&&(f=p,r=f,l=!1,i===ia.top)){a=!0;const e=ta(i.document);e&&(o=e)}i.context&&i.context.sourceUrl&&(c=!0)}e.push(f),d++}while(i!==ia.top&&d<n);e.reverse();try{s=ia.top.document.referrer}catch(g){}const p=a||u?r:null,m=lt.getConfig("pageUrl")||o||null;let f=lt.getConfig("pageUrl")||p||Zs(m,ia);return p&&p.indexOf("?")>-1&&-1===f.indexOf("?")&&(f=`${f}${p.substring(p.indexOf("?"))}`),{reachedTop:a,isAmp:l,numIframes:d-1,stack:e,topmostLocation:r||null,location:p,canonicalUrl:m,page:f,domain:ea(f)||null,ref:s||null,legacy:{reachedTop:a,isAmp:l,numIframes:d-1,stack:e,referer:r||null,canonicalUrl:m}}}));var ia;const ra=Object.freeze({});class oa{constructor(){_(this,p),_(this,s),_(this,a),_(this,d),_(this,l),_(this,c,!0),_(this,u),S(this,"generatedTime"),S(this,"hashFields"),this.reset()}reset(){U(this,d,gt()),U(this,s,!1),U(this,a,null),U(this,l,!1),this.generatedTime=null}enable(){U(this,s,!0)}get enabled(){return k(this,s)}get ready(){return k(this,l)}get promise(){return k(this,l)?ft.resolve(k(this,a)):(k(this,s)||R(this,p,m).call(this,null),k(this,d).promise)}setConsentData(e,t=On()){this.generatedTime=t,U(this,c,!0),R(this,p,m).call(this,e)}getConsentData(){return k(this,a)}get hash(){return k(this,c)&&(U(this,u,Qn(JSON.stringify(k(this,a)&&this.hashFields?this.hashFields.map((e=>k(this,a)[e])):k(this,a)))),U(this,c,!1)),k(this,u)}}s=new WeakMap,a=new WeakMap,d=new WeakMap,l=new WeakMap,c=new WeakMap,u=new WeakMap,p=new WeakSet,m=function(e){U(this,l,!0),U(this,a,e),k(this,d).resolve(e)};const sa=new class extends oa{constructor(){super(...arguments),S(this,"hashFields",["gdprApplies","consentString"])}getConsentMeta(){const e=this.getConsentData();if(e&&e.vendorData&&this.generatedTime)return{gdprApplies:e.gdprApplies,consentStringSize:dn(e.vendorData.tcString)?e.vendorData.tcString.length:0,generatedAt:this.generatedTime,apiVersion:e.apiVersion}}},aa=new class extends oa{getConsentMeta(){if(this.getConsentData()&&this.generatedTime)return{generatedAt:this.generatedTime}}},da=new class extends oa{constructor(){super(...arguments),S(this,"hashFields",["applicableSections","gppString"])}getConsentMeta(){if(this.getConsentData()&&this.generatedTime)return{generatedAt:this.generatedTime}}},la=(()=>{function e(){return!!lt.getConfig("coppa")}return{getCoppa:e,getConsentData:e,getConsentMeta:e,reset(){},get promise(){return ft.resolve(e())},get hash(){return e()?"1":"0"}}})(),ca=function(){const e={},t={},n={};return{register(i,r,o){o&&((e[r]=e[r]||{})[i]=o,t.hasOwnProperty(r)?t[r]!==o&&(t[r]=n):t[r]=o)},get(i){const r={modules:e[i]||{}};return t.hasOwnProperty(i)&&t[i]!==n&&(r.gvlid=t[i]),r}}}(),ua={gdpr:sa,usp:aa,gpp:da,coppa:la};const pa=function(e=ua){return e=Object.entries(e),Object.assign({get promise(){return ft.all(e.map((([e,t])=>t.promise.then((t=>[e,t]))))).then((e=>Object.fromEntries(e)))},get hash(){return Qn(e.map((([e,t])=>t.hash)).join(":"))}},Object.fromEntries(["getConsentData","getConsentMeta","reset"].map((t=>{return[t,(n=t,function(){return Object.fromEntries(e.map((([e,t])=>[e,t[n]()])))})];var n}))))}(),ma=["data","ext.data","yob","gender","keywords","kwarray","id","buyeruid","customdata"].map((e=>`user.${e}`)).concat("device.ext.cdep"),fa=["user.eids","user.ext.eids"],ga=["user.geo.lat","user.geo.lon","device.geo.lat","device.geo.lon"];function ha(e){return Object.assign({get(){},run(e,t,n,i,r){const o=n&&n[i];if(ya(o)&&r()){const e=this.get(o);void 0===e?delete n[i]:n[i]=e}}},e)}function va(e){return e.forEach((e=>{e.paths=e.paths.map((e=>{const t=e.split("."),n=t.pop();return[t.length>0?t.join("."):null,n]}))})),function(t,n,...i){const r=[],o=ba(t,...i);return e.forEach((e=>{if(!1!==t[e.name])for(const[i,s]of e.paths){const a=null==i?n:yt(n,i);if(r.push(e.run(n,i,a,s,o.bind(null,e))),!1===t[e.name])return}})),r.filter((e=>null!=e))}}function ba(e,...t){return function(n){return e.hasOwnProperty(n.name)||(e[n.name]=!!n.applies(...t)),e[n.name]}}function ya(e){return null!=e&&("object"!=typeof e||Object.keys(e).length>0)}function wa(e,t=or){return function(n){return!t(e,n)}}function Ia(e=or){return[{name:mr,paths:ma,applies:wa(mr,e)},{name:pr,paths:fa,applies:wa(pr,e)},{name:fr,paths:ga,applies:wa(fr,e),get:e=>Math.round(100*(e+Number.EPSILON))/100},{name:gr,paths:["source.tid"],applies:wa(gr,e)}].map(ha)}const Ta=function(e=or){const t=va(Ia(e)),n=va(function(e=or){return[{name:pr,paths:["userId","userIdAsEids"],applies:wa(pr,e)},{name:gr,paths:["ortb2Imp.ext.tid"],applies:wa(gr,e)}].map(ha)}(e));return function(e){const i={};return{ortb2:n=>(t(i,n,e),n),bidRequest:t=>(n(i,t,e),t)}}}();rr(gr,"enableTIDs config",(()=>{if(!lt.getConfig("enableTIDs"))return{allow:!1,reason:"TIDs are disabled"}}));const Ca="pbsBidAdapter",Aa={CLIENT:"client",SERVER:"server"},Ea={isAllowed:or,redact:Ta};let Sa={},xa=Sa.bidderRegistry={},ka=Sa.aliasRegistry={},_a=[];lt.getConfig("s2sConfig",(e=>{e&&e.s2sConfig&&(_a=ln(e.s2sConfig)?e.s2sConfig:[e.s2sConfig])}));var Ua={};const Ra=nr((e=>Sa.resolveAlias(e)));const Oa=Fi("sync",(function({bidderCode:e,auctionId:t,bidderRequestId:n,adUnits:i,src:r,metrics:o}){return i.reduce(((i,s)=>{const a=s.bids.filter((t=>t.bidder===e));return null==e&&0===a.length&&null!=s.s2sBid&&a.push({bidder:null}),i.push(a.reduce(((i,a)=>{const d=null==(a=Object.assign({},a,{ortb2Imp:Yn({},s.ortb2Imp,a.ortb2Imp)},qn(s,["nativeParams","nativeOrtbRequest","mediaType","renderer"]))).mediaTypes?s.mediaTypes:a.mediaTypes;var l;return!function(e){const t=["banner","native","video"],n=["instream","outstream","adpod"];return!!Object.keys(e).every((e=>Ce(t,e)))&&(!e.video||!e.video.context||Ce(n,e.video.context))}(d)?Qt(`mediaTypes is not correctly configured for adunit ${s.code}`):a=Object.assign({},a,{mediaTypes:d}),"client"===r&&function(e,t){Xs(e,"requestsCounter",t)}(s.code,e),i.push(Object.assign({},a,{adUnitCode:s.code,transactionId:s.transactionId,adUnitId:s.adUnitId,sizes:yt(d,"banner.sizes")||yt(d,"video.playerSize")||[],bidId:a.bid_id||qt(),bidderRequestId:n,auctionId:t,src:r,metrics:o,bidRequestsCount:(l=s.code,yt(Ks,`${l}.requestsCounter`)||0),bidderRequestsCount:Ys(s.code,a.bidder),bidderWinsCount:Qs(s.code,a.bidder)})),i}),[])),i}),[]).reduce(Cn,[]).filter((e=>""!==e))}),"getBids");const Da=Fi("sync",(function(e,t,{getS2SBidders:n=Pa}={}){if(null==t)return e;{const i=n(t);return e.filter((e=>i.has(e.bidder)))}}),"filterBidsForAdUnit");const Ba=Fi("sync",((e,t)=>e),"setupAdUnitMediaTypes");function Pa(e){ln(e)||(e=[e]);const t=new Set([null]);return e.filter((e=>e&&e.enabled)).flatMap((e=>e.bidders)).forEach((e=>t.add(e))),t}const ja=Fi("sync",(function(e,t,{getS2SBidders:n=Pa}={}){const i=n(t);return An(e).reduce(((e,t)=>(e[i.has(t)?Aa.SERVER:Aa.CLIENT].push(t),e)),{[Aa.CLIENT]:[],[Aa.SERVER]:[]})}),"partitionBidders");function Na(e,t){const n=xa[e],i=(null==n?void 0:n.getSpec)&&n.getSpec();if(i&&i[t]&&"function"==typeof i[t])return[i,i[t]]}function qa(e,t,n,i,...r){try{Xt(`Invoking ${e}.${t}`),lt.runWithBidder(e,i.bind(n,...r))}catch(o){Yt(`Error calling ${t} of ${e}`)}}function $a(e,t,n){if((null==n?void 0:n.src)!==He.SRC){const i=Na(e,t);null!=i&&qa(e,t,...i,n)}}Sa.makeBidRequests=Fi("sync",(function(e,t,n,i,r,o={},s){s=po(s),Zr(je.BEFORE_REQUEST_BIDS,e),Cs(e),e.forEach((e=>{un(e.mediaTypes)||(e.mediaTypes={}),e.bids=e.bids.filter((e=>!e.bidder||Ea.isAllowed(cr,Ra(Si,e.bidder)))),Xs(e.code,"requestsCounter")})),e=Ba(e,r);let{[Aa.CLIENT]:a,[Aa.SERVER]:d}=ja(e,_a);lt.getConfig("bidderSequence")===rt&&(a=Sn(a));const l=na();let c=[];const u=o.global||{},p=o.bidder||{};function m(e,t){const i=Ea.redact(null!=t?t:Ra(Si,e.bidderCode)),r=Object.freeze(i.ortb2(Yn({source:{tid:n}},u,p[e.bidderCode])));return e.ortb2=r,e.bids=e.bids.map((e=>(e.ortb2=r,i.bidRequest(e)))),e}_a.forEach((i=>{const r=function(e){return Ra(Ei,Ca,{[Qi]:e.configName})}(i);if(i&&i.enabled&&Ea.isAllowed(cr,r)){let{adUnits:o,hasModuleBids:a}=function(e,t){let n=xn(e),i=!1;return n.forEach((e=>{const n=e.bids.filter((e=>{var n;return e.module===Ca&&(null==(n=e.params)?void 0:n.configName)===t.configName}));1===n.length?(e.s2sBid=n[0],i=!0,e.ortb2Imp=Yn({},e.s2sBid.ortb2Imp,e.ortb2Imp)):n.length>1&&Yt('Multiple "module" bids for the same s2s configuration; all will be ignored',n),e.bids=Da(e.bids,t).map((e=>(e.bid_id=qt(),e)))})),n=n.filter((e=>0!==e.bids.length||null!=e.s2sBid)),{adUnits:n,hasModuleBids:i}}(e,i),u=$t();(0===d.length&&a?[null]:d).forEach((e=>{const a=qt(),d=s.fork(),p=m({bidderCode:e,auctionId:n,bidderRequestId:a,uniquePbsTid:u,bids:Oa({bidderCode:e,auctionId:n,bidderRequestId:a,adUnits:xn(o),src:He.SRC,metrics:d}),auctionStart:t,timeout:i.timeout,src:He.SRC,refererInfo:l,metrics:d},r);0!==p.bids.length&&c.push(p)})),o.forEach((e=>{let t=e.bids.filter((e=>Ae(c,(t=>Ae(t.bids,(t=>t.bidId===e.bid_id))))));e.bids=t})),c.forEach((e=>{void 0===e.adUnitsS2SCopy&&(e.adUnitsS2SCopy=o.filter((e=>e.bids.length>0||null!=e.s2sBid)))}))}}));let f=function(e){let t=xn(e);return t.forEach((e=>{e.bids=Da(e.bids,null)})),t=t.filter((e=>0!==e.bids.length)),t}(e);return a.forEach((e=>{const o=qt(),a=s.fork(),d=m({bidderCode:e,auctionId:n,bidderRequestId:o,bids:Oa({bidderCode:e,auctionId:n,bidderRequestId:o,adUnits:xn(f),labels:r,src:"client",metrics:a}),auctionStart:t,timeout:i,refererInfo:l,metrics:a}),u=xa[e];u||Qt(`Trying to make a request for bidder that does not exist: ${e}`),u&&d.bids&&0!==d.bids.length&&c.push(d)})),c.forEach((e=>{sa.getConsentData()&&(e.gdprConsent=sa.getConsentData()),aa.getConsentData()&&(e.uspConsent=aa.getConsentData()),da.getConsentData()&&(e.gppConsent=da.getConsentData())})),c}),"makeBidRequests"),Sa.callBids=(e,t,n,i,r,o,s,a={})=>{if(!t.length)return void Yt("callBids executed with no bidRequests. Were they filtered by labels or sizing?");let[d,l]=t.reduce(((e,t)=>(e[Number(void 0!==t.src&&t.src===He.SRC)].push(t),e)),[[],[]]);var c=[];l.forEach((e=>{for(var t=-1,n=0;n<c.length;++n)if(e.uniquePbsTid===c[n].uniquePbsTid){t=n;break}t<=-1&&c.push(e)}));let u=0;_a.forEach((e=>{if(e&&c[u]&&Pa(e).has(c[u].bidderCode)){const t=di(o,r?{request:r.request.bind(null,"s2s"),done:r.done}:void 0);let d=e.bidders;const p=xa[e.adapter];let m=c[u].uniquePbsTid,f=c[u].adUnitsS2SCopy,g=l.filter((e=>e.uniquePbsTid===m));if(p){let r={ad_units:f,s2sConfig:e,ortb2Fragments:a,requestBidsTimeout:o};if(r.ad_units.length){let e=g.map((e=>(e.start=On(),function(t){t||s(e.bidderRequestId),i.apply(e,arguments)})));const o=An(r.ad_units).filter((e=>d.includes(e)));Kt(`CALLING S2S HEADER BIDDERS ==== ${o.length>0?o.join(", "):'No bidder specified, using "ortb2Imp" definition(s) only'}`),g.forEach((e=>{Zr(je.BID_REQUESTED,{...e,tid:e.auctionId})})),p.callBids(r,l,n,(t=>e.forEach((e=>e(t)))),t)}}else Qt("missing "+e.adapter);u++}})),d.forEach((e=>{e.start=On();const t=xa[e.bidderCode];lt.runWithBidder(e.bidderCode,(()=>{Kt("CALLING BIDDER"),Zr(je.BID_REQUESTED,e)}));let a=di(o,r?{request:r.request.bind(null,e.bidderCode),done:r.done}:void 0);const d=i.bind(e);try{lt.runWithBidder(e.bidderCode,t.callBids.bind(t,e,n,d,a,(()=>s(e.bidderRequestId)),lt.callbackWithBidder(e.bidderCode)))}catch(l){Qt(`${e.bidderCode} Bid Adapter emitted an uncaught error when parsing their bidRequest`,{e:l,bidRequest:e}),d()}}))},Sa.videoAdapters=[],Sa.registerBidAdapter=function(e,t,{supportedMediaTypes:n=[]}={}){var i;e&&t?"function"==typeof e.callBids?(xa[t]=e,ca.register(Si,t,null==(i=e.getSpec)?void 0:i.call(e).gvlid),Ce(n,"video")&&Sa.videoAdapters.push(t),Ce(n,"native")&&gs.push(t)):Qt("Bidder adaptor error for bidder code: "+t+"bidder must implement a callBids() function"):Qt("bidAdapter or bidderCode not specified")},Sa.aliasBidAdapter=function(e,t,n){if(void 0===xa[t]){let r=xa[e];if(void 0===r){const n=[];_a.forEach((i=>{if(i.bidders&&i.bidders.length){const r=i&&i.bidders;i&&Ce(r,t)?ka[t]=e:n.push(e)}})),n.forEach((e=>{Qt('bidderCode "'+e+'" is not an existing bidder.',"adapterManager.aliasBidAdapter")}))}else try{let i,o=function(e){let t=[];return Ce(Sa.videoAdapters,e)&&t.push("video"),Ce(gs,e)&&t.push("native"),t}(e);if(r.constructor.prototype!=Object.prototype)i=new r.constructor,i.setBidderCode(t);else{let o=r.getSpec(),s=n&&n.gvlid;null!=o.gvlid&&null==s&&Yt(`Alias '${t}' will NOT re-use the GVL ID of the original adapter ('${o.code}', gvlid: ${o.gvlid}). Functionality that requires TCF consent may not work as expected.`);let a=n&&n.skipPbsAliasing;i=Ls(Object.assign({},o,{code:t,gvlid:s,skipPbsAliasing:a})),ka[t]=e}Sa.registerBidAdapter(i,t,{supportedMediaTypes:o})}catch(i){Qt(e+" bidder does not currently support aliasing.","adapterManager.aliasBidAdapter")}}else Kt('alias name "'+t+'" has been already specified.')},Sa.resolveAlias=function(e){let t,n=e;for(;ka[n]&&(!t||!t.has(n));)n=ka[n],(t=t||new Set).add(n);return n},Sa.registerAnalyticsAdapter=function({adapter:e,code:t,gvlid:n}){e&&t?"function"==typeof e.enableAnalytics?(e.code=t,Ua[t]={adapter:e,gvlid:n},ca.register(_i,t,n)):Qt(`Prebid Error: Analytics adaptor error for analytics "${t}"\n analytics adapter must implement an enableAnalytics() function`):Qt("Prebid Error: analyticsAdapter or analyticsCode not specified")},Sa.enableAnalytics=function(e){ln(e)||(e=[e]),e.forEach((e=>{const t=Ua[e.provider];t&&t.adapter?Ea.isAllowed(ur,Ra(_i,e.provider,{[tr]:e}))&&t.adapter.enableAnalytics(e):Qt(`Prebid Error: no analytics adapter found in registry for '${e.provider}'.`)}))},Sa.getBidAdapter=function(e){return xa[e]},Sa.getAnalyticsAdapter=function(e){return Ua[e]},Sa.callTimedOutBidders=function(e,t,n){t=Nn(t=t.map((t=>(t.params=$n(e,t.adUnitCode,t.bidder),t.timeout=n,t))),"bidder"),Object.keys(t).forEach((e=>{$a(e,"onTimeout",t[e])}))},Sa.callBidWonBidder=function(e,t,n){var i,r;t.params=$n(n,t.adUnitCode,t.bidder),i=t.adUnitCode,r=t.bidder,Xs(i,"winsCounter",r),$a(e,"onBidWon",t)},Sa.callBidBillableBidder=function(e){$a(e.bidder,"onBidBillable",e)},Sa.callSetTargetingBidder=function(e,t){$a(e,"onSetTargeting",t)},Sa.callBidViewableBidder=function(e,t){$a(e,"onBidViewable",t)},Sa.callBidderError=function(e,t,n){$a(e,"onBidderError",{error:t,bidderRequest:n})},Sa.callAdRenderSucceededBidder=function(e,t){$a(e,"onAdRenderSucceeded",t)},Sa.callDataDeletionRequest=Fi("sync",(function(...e){const t="onDataDeletionRequest";Object.keys(xa).filter((e=>!ka.hasOwnProperty(e))).forEach((n=>{const i=Na(n,t);if(null!=i){const r=Ko.getBidsRequested().filter((e=>function(e){const t=new Set;for(;ka.hasOwnProperty(e)&&!t.has(e);)t.add(e),e=ka[e];return e}(e.bidderCode)===n));qa(n,t,...i,r,...e)}})),Object.entries(Ua).forEach((([n,i])=>{var r;const o=null==(r=null==i?void 0:i.adapter)?void 0:r[t];if("function"==typeof o)try{o.apply(i.adapter,e)}catch(s){Qt(`error calling ${t} of ${n}`,s)}}))}));const Fa=["request","imp","bidResponse","response"],[Ma,za,La,Va]=Fa,[Wa,Ga]=["default","pbs"],Ha=new Set(Fa);const{registerOrtbProcessor:Ja,getProcessors:Ka}=function(){const e={};return{registerOrtbProcessor({type:t,name:n,fn:i,priority:r=0,dialects:o=[Wa]}){if(!Ha.has(t))throw new Error(`ORTB processor type must be one of: ${Fa.join(", ")}`);o.forEach((o=>{e.hasOwnProperty(o)||(e[o]={}),e[o].hasOwnProperty(t)||(e[o][t]={}),e[o][t][n]={priority:r,fn:i}}))},getProcessors:t=>e[t]||{}}}(),Xa=Tr("fpdEnrichment"),Ya=ei((function(e=window.location.host){if(!Xa.cookiesAreEnabled())return e;const t=e.split(".");if(2===t.length)return e;let n,i,r=-2;const o=`_rdc${Date.now()}`,s="writeable";do{n=t.slice(r).join(".");let e=new Date(On()+1e4).toUTCString();Xa.setCookie(o,s,e,"Lax",n,void 0);Xa.getCookie(o,void 0)===s?(i=!1,Xa.setCookie(o,"","Thu, 01 Jan 1970 00:00:01 GMT",void 0,n,void 0)):(r+=-1,i=Math.abs(r)<=t.length)}while(i);return n})),Qa=["architecture","bitness","model","platformVersion","fullVersionList"],Za=["brands","mobile","platform"],ed=function(e=(e=>null==(e=window.navigator)?void 0:e.userAgentData)()){const t=e&&Za.some((t=>void 0!==e[t]))?Object.freeze(nd(1,e)):null;return function(){return t}}(),td=function(e=(e=>null==(e=window.navigator)?void 0:e.userAgentData)()){const t={},n=new WeakMap;return function(i=Qa){if(!n.has(i)){const e=Array.from(i);e.sort(),n.set(i,e.join("|"))}const r=n.get(i);if(!t.hasOwnProperty(r))try{t[r]=e.getHighEntropyValues(i).then((e=>mn(e)?null:Object.freeze(nd(2,e)))).catch((()=>null))}catch(o){t[r]=ft.resolve(null)}return t[r]}}();function nd(e,t){function n(e,t){const n={brand:e};return dn(t)&&!fn(t)&&(n.version=t.split(".")),n}const i={source:e};return t.platform&&(i.platform=n(t.platform,t.platformVersion)),(t.fullVersionList||t.brands)&&(i.browsers=(t.fullVersionList||t.brands).map((({brand:e,version:t})=>n(e,t)))),void 0!==t.mobile&&(i.mobile=t.mobile?1:0),["model","bitness","architecture"].forEach((e=>{const n=t[e];dn(n)&&(i[e]=n)})),i}const id=["dooh","app","site"];function rd(e){return function(t){return id.reduce(((n,i)=>(od(t,i)&&(null!=n?(Yt(`${e} specifies both '${n}' and '${i}'; dropping the latter.`),delete t[i]):n=i),n)),null),t}}function od(e,t){return null!=e[t]&&Object.keys(e[t]).length>0}const sd={getRefererInfo:na,findRootDomain:Ya,getWindowTop:Wt,getWindowSelf:Gt,getHighEntropySUA:td,getLowEntropySUA:ed},ad=rd("FPD"),dd=Fi("sync",(e=>{const t=[e,cd().catch((()=>null)),ft.resolve("cookieDeprecationLabel"in navigator&&or(sr,hr(Ei,"cdep"))&&navigator.cookieDeprecationLabel.getValue()).catch((()=>null))];return ft.all(t).then((([e,t,n])=>{const i=sd.getRefererInfo();if(Object.entries(pd).forEach((([t,n])=>{const r=n(e,i);r&&Object.keys(r).length>0&&(e[t]=Yn({},r,e[t]))})),t&&wt(e,"device.sua",Object.assign({},t,e.device.sua)),n){const t={cdep:n};wt(e,"device.ext",Object.assign({},t,e.device.ext))}e=ad(e);for(let r of id)if(od(e,r)){e[r]=Yn({},md(e,i),e[r]);break}return e}))}));function ld(e){try{return e(sd.getWindowTop())}catch(t){return e(sd.getWindowSelf())}}function cd(){const e=lt.getConfig("firstPartyData.uaHints");return Array.isArray(e)&&0!==e.length?sd.getHighEntropySUA(e):ft.resolve(sd.getLowEntropySUA())}function ud(e){return qn(e,Object.keys(e))}const pd={site(e,t){if(!id.filter((e=>"site"!==e)).some(od.bind(null,e)))return ud({page:t.page,ref:t.ref})},device:()=>ld((e=>{var t;const n=e.screen.width,i=e.screen.height,r=e.innerWidth||e.document.documentElement.clientWidth||e.document.body.clientWidth,o=e.innerHeight||e.document.documentElement.clientHeight||e.document.body.clientHeight,s={w:n,h:i,dnt:Fn()?1:0,ua:e.navigator.userAgent,language:e.navigator.language.split("-").shift(),ext:{vpw:r,vph:o}};return(null==(t=e.navigator)?void 0:t.webdriver)&&wt(s,"ext.webdriver",!0),s})),regs(){const e={};ld((e=>e.navigator.globalPrivacyControl))&&wt(e,"ext.gpc",1);const t=lt.getConfig("coppa");return"boolean"==typeof t&&(e.coppa=t?1:0),e}};function md(e,t){var n,i,r;const o=ea(t.page,{noLeadingWww:!0}),s=null==(r=null==(i=null==(n=ld((e=>e.document.querySelector("meta[name='keywords']"))))?void 0:n.content)?void 0:i.replace)?void 0:r.call(i,/\s/g,"");return ud({domain:o,keywords:s,publisher:ud({domain:sd.findRootDomain(o)})})}const fd=0,gd=1,hd=2;const vd=2;let bd,yd,wd,Id,Td,Cd,Ad=!1,Ed=!1;const Sd={iab:function({onSuccess:e,onError:t,onEvent:n}){const i=function({apiName:e,apiVersion:t,apiArgs:n=["command","callback","parameter","version"],callbackArgs:i=["returnValue","success"],mode:r=fd},o=window){const s={},a=`${e}Call`,d=`${e}Return`;function l(e){var t;const n="string"==typeof e.data&&e.data.includes(d)?JSON.parse(e.data):e.data;if(null==(t=null==n?void 0:n[d])?void 0:t.callId){const e=n[d];s.hasOwnProperty(e.callId)&&s[e.callId](...i.map((t=>e[t])))}}const[c,u]=function(){let t,n=o,i=!1;for(;null!=n;){try{if("function"==typeof n[e]){t=n,i=!0;break}}catch(r){}try{if(n.frames[`${e}Locator`]){t=n;break}}catch(r){}if(n===o.top)break;n=n.parent}return[t,i]}();if(!c)return;function p(e){return e=Object.assign({version:t},e),n.map((t=>[t,e[t]]))}function m(e,t,n,i){const o="function"==typeof e;return function(s,a){i&&i(),r!==gd&&(null==a||a?t:n)(o?void 0:s),o&&e.apply(this,arguments)}}let f;return u?f=function(t={}){return new ft(((n,i)=>{const o=c[e](...p({...t,callback:t.callback||r===hd?m(t.callback,n,i):void 0}).map((([e,t])=>t)));(r===gd||null==t.callback&&r===fd)&&n(o)}))}:(o.addEventListener("message",l,!1),f=function(e,t=!1){return new ft(((n,i)=>{const o=Math.random().toString(),d={[a]:{...Object.fromEntries(p(e).filter((([e])=>"callback"!==e))),callId:o}};s[o]=m(null==e?void 0:e.callback,n,i,(t||null==(null==e?void 0:e.callback))&&(()=>{delete s[o]})),c.postMessage(d,"*"),r===gd&&n()}))}),Object.assign(f,{isDirect:u,close(){!u&&o.removeEventListener("message",l)}})}({apiName:"__tcfapi",apiVersion:vd,apiArgs:["command","version","callback","parameter"]});if(!i)return t("TCF2 CMP not found.");i.isDirect?Xt("Detected CMP API is directly accessible, calling it now..."):Xt("Detected CMP is outside the current iframe where Prebid.js is located, calling it now...");i({command:"addEventListener",callback:function(i,r){Xt("Received a response from CMP",i),r?(n(i),!1!==i.gdprApplies&&"tcloaded"!==i.eventStatus&&"useractioncomplete"!==i.eventStatus||Rd(i,{onSuccess:e,onError:t})):t("CMP unable to register callback function. Please check CMP setup.")}})},static:function({onSuccess:e,onError:t}){Rd(Id,{onSuccess:e,onError:t})}};function xd(e){let t,n,i=!1,r=null,o=!1;function s(e){null!=r&&clearTimeout(r),i||null==e||(0===e?t():r=setTimeout(t,e))}function a(t,n,r,...o){s(null),i=!0,sa.setConsentData(t),"function"==typeof e&&e(n,r,...o)}if(!Ce(Object.keys(Sd),bd))return void a(null,!1,`CMP framework (${bd}) is not a supported framework. Aborting consentManagement module and resuming auction.`);const d={onSuccess:e=>a(e,!1),onError:function(e,...t){a(null,!0,e,...t)},onEvent:function(e){n=e,o||(o=!0,null!=Td&&s(Td))}};t=()=>{const e=e=>{a(e,!1,(o?"Timeout waiting for user action on CMP":"CMP did not load")+", continuing auction...")};Rd(n,{onSuccess:e,onError:()=>e(Od(void 0))})},Sd[bd](d),null!=Td&&o||s(yd)}const kd=(_d=()=>Cd,Ud=xd,go("gdpr",(function(e,t){var n;n=function(n,i,...r){if(i){let e=Yt;n&&(e=Qt,i=`${i} Canceling auction as per consentManagement config.`),e(i,...r)}n?(e.stopTiming(),"function"==typeof t.bidsBackHandler?t.bidsBackHandler():Qt("Error executing bidsBackHandler")):e.call(this,t)},_d()?(Xt("User consent information already known. Pulling internally stored information..."),n(!1)):Ud(n)})));var _d,Ud;function Rd(e,{onSuccess:t,onError:n}){!function(){const t=e&&"boolean"==typeof e.gdprApplies?e.gdprApplies:wd,n=e&&e.tcString;return!("boolean"==typeof t&&(!0!==t||n&&dn(n)))}()?t(Od(e)):n("CMP returned unexpected value during lookup process.",e)}function Od(e){return Cd={consentString:e?e.tcString:void 0,vendorData:e||void 0,gdprApplies:e&&"boolean"==typeof e.gdprApplies?e.gdprApplies:wd},e&&e.addtlConsent&&dn(e.addtlConsent)&&(Cd.addtlConsent=e.addtlConsent),Cd.apiVersion=vd,Cd}lt.getConfig("consentManagement",(e=>function(e){(e=e&&(e.gdpr||e.usp||e.gpp?e.gdpr:e))&&"object"==typeof e?(dn(e.cmpApi)?bd=e.cmpApi:(bd="iab",Xt("consentManagement config did not specify cmp. Using system default setting (iab).")),cn(e.timeout)?yd=e.timeout:(yd=1e4,Xt("consentManagement config did not specify timeout. Using system default setting (10000).")),Td=cn(e.actionTimeout)?e.actionTimeout:null,wd=!0===e.defaultGdprScope,Ad=!!e.dsaPlatform,Xt("consentManagement module has been activated..."),"static"===bd&&(un(e.consentData)?(Id=e.consentData,null!=(null==Id?void 0:Id.getTCData)&&(Id=Id.getTCData),yd=0):Qt("consentManagement config with cmpApi: 'static' did not specify consentData. No consents will be available to adapters.")),Ed||bt().requestBids.before(kd,50),Ed=!0,sa.enable(),xd()):Yt("consentManagement (gdpr) config not defined, exiting consent manager")}(e.consentManagement))),dd.before((function(e,t){return e(t.then((e=>{const t=sa.getConsentData();return t&&("boolean"==typeof t.gdprApplies&&wt(e,"regs.ext.gdpr",t.gdprApplies?1:0),wt(e,"user.ext.consent",t.consentString)),Ad&&wt(e,"regs.ext.dsa.dsarequired",3),e})))})),Ja({type:Ma,name:"gdprAddtlConsent",fn:function(e,t){var n;const i=null==(n=t.gdprConsent)?void 0:n.addtlConsent;i&&"string"==typeof i&&wt(e,"user.ext.ConsentedProvidersSettings.consented_providers",i)}});const Dd={purpose:{},feature:{}},Bd={purpose:!1,feature:"specialFeatureOptins"},Pd={storage:{type:"purpose",default:{purpose:"storage",enforcePurpose:!0,enforceVendor:!0,vendorExceptions:[]},id:1},basicAds:{type:"purpose",id:2,default:{purpose:"basicAds",enforcePurpose:!0,enforceVendor:!0,vendorExceptions:[]}},personalizedAds:{type:"purpose",id:4},measurement:{type:"purpose",id:7},transmitPreciseGeo:{type:"feature",id:1}},jd=new Set,Nd=new Set,qd=new Set,$d=new Set,Fd=new Set,Md=new Set;let zd=!1,Ld=!1;const Vd=[Si,xi,_i,ki],Wd="TCF2",Gd=[],Hd=[2],Jd=[2,7,9,10];function Kd(e,t,n,i){var r,o;const s=yt(e,`vendorData.${t}`);return!!(null==(r=null==s?void 0:s.consents)?void 0:r[n])||i&&!!(null==(o=null==s?void 0:s.legitimateInterests)?void 0:o[n])}function Xd(e,t,n,i){let r;if(!1!==Bd[t])r=!!yt(e,`vendorData.${Bd[t]}.${n}`);else{const[t,o]=i===ra?["publisher",Jd]:["purpose",Hd];r=Kd(e,t,n,o.includes(n))}return{purpose:r,vendor:Kd(e,"vendor",i,Hd.includes(n))}}function Yd(e,t,n,i){const r=Pd[e.purpose];if((e.vendorExceptions||[]).includes(n))return!0;const o=e.enforceVendor&&!(i===ra||(e.softVendorExceptions||[]).includes(n)),{purpose:s,vendor:a}=Xd(t,r.type,r.id,i);return(!e.enforcePurpose||s)&&(!o||a)}function Qd(e,t,n=null,i=()=>null){return function(r){const o=sa.getConsentData(),s=r[Ki];if(function(e,t,n){return null==e&&sa.enabled?(Yt(`Attempting operation that requires purpose ${t} consent while consent data is not available${n?` (module: ${n})`:""}. Assuming no consent was given.`),!0):e&&e.gdprApplies}(o,e,s)){const e=function(e,t,n){if(t){const i=lt.getConfig("gvlMapping");if(i&&i[t])return i[t];if(e===Ei)return ra;{let{gvlid:i,modules:r}=ca.get(t);if(null==i&&Object.keys(r).length>0)for(const n of Vd)if(r.hasOwnProperty(n)){i=r[n],n!==e&&Yt(`Multiple GVL IDs found for module '${t}'; using the ${n} module's ID (${i}) instead of the ${e}'s ID (${r[e]})`);break}return null==i&&n&&(i=n()),i||null}}return null}(r[Ji],s,i(r));let a=!!t(o,s,e);if(!a)return n&&n.add(s),{allow:a}}}}function Zd(e,t=null,n=()=>null){return Qd(e,((t,n,i)=>!!Yd(Dd.purpose[e],t,n,i)),t,n)}function el(e){return function(t){if(t[Ji]!==Ei)return e(t)}}const tl=(e=>function(t){if(t[Ji]!==Ei||Ld)return e(t)})(Zd(1,jd)),nl=Zd(1,jd),il=Zd(1,jd),rl=el(Zd(2,Nd)),ol=Zd(7,qd,(e=>function(e,t){var n;const i=Sa.getAnalyticsAdapter(e);return(n=>{if("function"!=typeof n)return n;try{return n.call(i.adapter,t)}catch(r){Qt(`Error invoking ${e} adapter.gvlid()`,r)}})(null==(n=null==i?void 0:i.adapter)?void 0:n.gvlid)}(e[Ki],e[tr]))),sl=Zd(4,$d),al=el((()=>{const e=Qd("2-10",(function(e,t,n){var i,r,o,s;for(let a=2;a<=10;a++){if(null==(r=null==(i=Dd.purpose[a])?void 0:i.vendorExceptions)?void 0:r.includes(t))return!0;const{purpose:d,vendor:l}=Xd(e,"purpose",a,n);if(d&&(l||(null==(s=null==(o=Dd.purpose[a])?void 0:o.softVendorExceptions)?void 0:s.includes(t))))return!0}return!1}),Fd),t=Zd(4,Fd);return function(){var n;return((null==(n=Dd.purpose[4])?void 0:n.eidsRequireP4Consent)?t:e).apply(this,arguments)}})()),dl=Qd("Special Feature 1",((e,t,n)=>Yd(Dd.feature[1],e,t,n)),Md);function ll(e){let t;return En()&&(t=Ae(window.googletag.pubads().getSlots(),function(e){return t=>Mn(t,e)}(e))),t}function cl(e){const t=ll(e);return t?{gptSlot:t.getAdUnitPath(),divId:t.getSlotElementId()}:{}}Kr(je.AUCTION_END,(function(){const e=function(e){return Array.from(e.keys()).filter((e=>null!=e))},t={storageBlocked:e(jd),biddersBlocked:e(Nd),analyticsBlocked:e(qd),ufpdBlocked:e($d),eidsBlocked:e(Fd),geoBlocked:e(Md)};Zr(je.TCF2_ENFORCEMENT,t),[jd,Nd,qd,$d,Fd,Md].forEach((e=>e.clear()))})),lt.getConfig("consentManagement",(e=>function(e){let t=yt(e,"gdpr.rules");t||Yt("TCF2: enforcing P1 and P2 by default"),t=Object.fromEntries((t||[]).map((e=>[e.purpose,e]))),Ld=!!yt(e,"strictStorageEnforcement"),Object.entries(Pd).forEach((([e,n])=>{Dd[n.type][n.id]=t[e]??n.default})),zd||(null!=Dd.purpose[1]&&(zd=!0,Gd.push(rr(sr,Wd,tl)),Gd.push(rr(ar,Wd,nl)),Gd.push(rr(lr,Wd,il))),null!=Dd.purpose[2]&&Gd.push(rr(cr,Wd,rl)),null!=Dd.purpose[4]&&Gd.push(rr(mr,Wd,sl),rr(dr,Wd,sl)),null!=Dd.purpose[7]&&Gd.push(rr(ur,Wd,ol)),null!=Dd.feature[1]&&Gd.push(rr(fr,Wd,dl)),Gd.push(rr(pr,Wd,al)))}(e.consentManagement)));const ul=["IAB_AUDIENCE_1_1","IAB_CONTENT_2_2"];function pl(e,t,n){return t.flatMap((t=>yt(e,t)||[])).filter((e=>{var t;return(null==(t=e.ext)?void 0:t.segtax)===n})).flatMap((e=>{var t;return null==(t=e.segment)?void 0:t.map((e=>e.id))})).filter((e=>e)).filter(Tn)}function ml(e,t){return e===t?0:e<t?-1:1}function fl(e=e=>e){return(t,n)=>ml(e(t),e(n))}function gl(e=ml){return(t,n)=>-e(t,n)||0}function hl(...e){return function(t,n){for(const i of e){const e=i(t,n);if(0!==e)return e}return 0}}function vl(e=ml){return function(e=ml){return(t,n)=>e(n,t)<0?n:t}(gl(e))}const bl=fl((e=>e.cpm)),yl=fl((e=>e.responseTimestamp)),wl=vl(hl(bl,gl(fl((e=>e.timeToRespond))))),Il=vl(hl(bl,gl(yl)));function Tl(e,t,n,i=!0){if(t===n)return e;let r=e;try{r=bt().convertCurrency(e,t,n)}catch(o){if(!i)throw o}return r}const Cl={NOT_FOUND:"not_found",RANDOM:"random"},Al="Price Floors",El=di(1e4),Sl=Symbol();let xl=[Sl,"gptSlot","adUnitCode","size","domain","mediaType"],kl=!1,_l=!1,Ul={},Rl=[],Ol={};const Dl=(()=>{let e;return function(){return null==e&&(e=Jn(na().topmostLocation,{noDecodeWholeURL:!0}).hostname),e}})();function Bl(e,t,{index:n=Ko.index}={}){return(null==e?void 0:e.adUnitCode)||n.getAdUnit(t).code}let Pl={[Sl]:()=>"*",size:(e,t)=>function(e){if(Vt(e))return zt(e)}(t.size)||"*",mediaType:(e,t)=>t.mediaType||"banner",gptSlot:(e,t)=>function(e,{index:t=Ko.index}={}){const n=t.getAdUnit({adUnitId:e});return"gam"===yt(n,"ortb2Imp.ext.data.adserver.name")&&n.ortb2Imp.ext.data.adserver.adslot}((e||t).adUnitId)||cl(Bl(e,t)).gptSlot,domain:Dl,adUnitCode:(e,t)=>Bl(e,t)};function jl(e,t,n={}){var i;let r=function(e,t,n){return e.length?e.reduce(((e,i)=>{let r=Pl[i](t,n)||"*";return e.push("*"===r?["*"]:[r.toLowerCase(),"*"]),e}),[]):[]}(yt(e,"schema.fields")||[],t,n);if(!r.length)return{matchingFloor:void 0};let o=r.map((e=>e[0])).join("-"),s=yt(e,`matchingInputs.${o}`);if(s)return{...s};let a=(d=r,l=yt(e,"schema.delimiter")||"|",d.reduce(((e,t)=>{let n=[];return e.map((e=>{t.map((t=>{n.push(e+l+t)}))})),n})).sort(((e,t)=>e.split("*").length-t.split("*").length)));var d,l;let c=Ae(a,(t=>e.values.hasOwnProperty(t))),u={floorMin:e.floorMin||0,floorRuleValue:e.values[c],matchingData:a[0],matchingRule:c===(null==(i=e.meta)?void 0:i.defaultRule)?void 0:c};const p=yt(t,"ortb2Imp.ext.prebid.floors.floorMin");return"number"==typeof p&&(u.floorMin=p),u.matchingFloor=Math.max(u.floorMin,u.floorRuleValue),wt(e,`matchingInputs.${o}`,{...u}),u}function Nl(e,t,n){return parseFloat(vo(e,{...t,cpm:e},n))}const ql={banner:e=>yt(e,"mediaTypes.banner.sizes")||[],video:e=>yt(e,"mediaTypes.video.playerSize")||[],native:e=>yt(e,"mediaTypes.native.image.sizes")?[yt(e,"mediaTypes.native.image.sizes")]:[]};function $l(e={currency:"USD",mediaType:"*",size:"*"}){let t=this,n=Ol[t.auctionId];if(!n||n.skipped)return{};e=function(e,t){let n=Object.keys(e.mediaTypes||{});return"*"===t.mediaType&&1===n.length&&(t.mediaType=n[0]),"*"===t.size&&-1!==n.indexOf(t.mediaType)&&ql[t.mediaType]&&1===ql[t.mediaType](e).length&&(t.size=ql[t.mediaType](e)[0]),t}(t,e);let i=jl(n.data,{...t},{mediaType:e.mediaType,size:e.size}),r=e.currency||n.data.currency;if(i.matchingFloor&&r!==n.data.currency)try{i.matchingFloor=bt().convertCurrency(i.matchingFloor,n.data.currency,r)}catch(a){Yt(`${Al}: Unable to get currency conversion for getFloor for bidder ${t.bidder}. You must have currency module enabled with defaultRates in your currency config`),r=n.data.currency}if(n.enforcement.bidAdjustment&&i.matchingFloor){const e=Ai.get(t.bidder,"inverseBidAdjustment");if(e)i.matchingFloor=e(i.matchingFloor,t);else{let e=Nl(i.matchingFloor,null,t);i.matchingFloor=e?function(e,t){const n=Math.pow(10,10);return e*n/(t*n)*(e*n)/n}(i.matchingFloor,e):i.matchingFloor}}return i.matchingFloor?{floor:(o=i.matchingFloor,s=4,Math.ceil((parseFloat(o)*Math.pow(10,s)).toFixed(1))/Math.pow(10,s)),currency:r}:{};var o,s}function Fl(e,t){let n=xn(e);return n.schema.delimiter=e.schema.delimiter||"|",n.values=function(e,t){let n=e.schema.fields,i=e.schema.delimiter,r=t&&-1===n.indexOf("adUnitCode")&&n.unshift("adUnitCode");return Object.keys(e.values).reduce(((n,o)=>(n[(r?`${t}${i}${o}`:o).toLowerCase()]=e.values[o],n)),{})}(n,t),n.currency=n.currency||"USD",n}function Ml(e,t){let n=xn(Ul);if(2===yt(n,"data.floorsSchemaVersion")){let{modelGroups:e,...t}=n.data;n.data=Object.assign(t,function(e,t){let n=Math.floor(Math.random()*t+1);for(let i=0;i<e.length;i++)if(n-=e[i].modelWeight,n<=0)return e[i]}(e,t.modelWeightSum))}let i=0===Object.keys(yt(n,"data.values")||{}).length;if(n.data=i?function(e){const t=e.find((e=>{var t;return null!=(null==(t=e.floors)?void 0:t.schema)}));return e.reduce(((e,n)=>{var i,r;if(null!=(null==(i=n.floors)?void 0:i.schema)&&!Xn(n.floors.schema,null==(r=null==t?void 0:t.floors)?void 0:r.schema))return Qt(`${Al}: adUnit '${n.code}' declares a different schema from one previously declared by adUnit '${t.code}'. Floor config for '${n.code}' will be ignored.`),e;const o=Object.assign({},null==t?void 0:t.floors,{values:void 0},n.floors);if(Wl(o))if(e.values){let t=Fl(o,n.code).values;Object.assign(e.values,t)}else(e=Fl(o,n.code)).location="adUnit";else null!=n.floors&&Yt(`adUnit '${n.code}' provides an invalid \`floor\` definition, it will be ignored for floor calculations`,n);return e}),{})}(e):Fl(n.data),0===Object.keys(yt(n,"data.values")||{}).length)n.skipped=!0,n.skippedReason=Cl.NOT_FOUND;else{const e=on("pbjs_skipRate")||(yt(n,"data.skipRate")??n.skipRate),t=100*Math.random()<parseFloat(e);n.skipped=t,t&&(n.skippedReason=Cl.RANDOM)}return n.hasOwnProperty("floorMin")&&(n.data.floorMin=n.floorMin),function(e,t,n){const i=function(e){var t,n;const{data:i,enforcement:r}=e;return(null==(t=null==i?void 0:i.noFloorSignalBidders)?void 0:t.length)>0?i.noFloorSignalBidders:(null==(n=null==r?void 0:r.noFloorSignalBidders)?void 0:n.length)>0?r.noFloorSignalBidders:[]}(t);e.forEach((e=>{e.bids.forEach((e=>{const r=i.some((t=>t===e.bidder));t.skipped||r?(r&&Xt(`noFloorSignal to ${e.bidder}`),delete e.getFloor):e.getFloor=$l,e.auctionId=n,e.floorData={noFloorSignaled:r,skipped:t.skipped,skipRate:yt(t,"data.skipRate")??t.skipRate,skippedReason:t.skippedReason,floorMin:t.floorMin,modelVersion:yt(t,"data.modelVersion"),modelWeight:yt(t,"data.modelWeight"),modelTimestamp:yt(t,"data.modelTimestamp"),location:yt(t,"data.location","noData"),floorProvider:t.floorProvider,fetchStatus:Ul.fetchStatus}}))}))}(e,n,t),n}function zl(e){e.hasExited||(Rl=Rl.filter((t=>t.timer!==e.timer)),e.reqBidsConfigObj.auctionId=e.reqBidsConfigObj.auctionId||$t(),Ol[e.reqBidsConfigObj.auctionId]=Ml(e.reqBidsConfigObj.adUnits||bt().adUnits,e.reqBidsConfigObj.auctionId),e.nextFn.apply(e.context,[e.reqBidsConfigObj]),e.hasExited=!0)}function Ll(e){return e=function(e){var t,n;if(cn(e.default)){let i="*";const r=((null==(t=e.schema)?void 0:t.fields)||[]).length;r?i=Array(r).fill("*").join((null==(n=e.schema)?void 0:n.delimiter)||"|"):wt(e,"schema.fields",[Sl]),e.values=e.values||{},null==e.values[i]&&(e.values[i]=e.default,e.meta={defaultRule:i})}return e}(e),!!function(e){if(Array.isArray(e)&&e.length>0){if(e.every((e=>xl.includes(e))))return!0;Qt(`${Al}: Fields received do not match allowed fields`)}return!1}(yt(e,"schema.fields"))&&(t=e,n=e.schema.fields.length,i=e.schema.delimiter||"|","object"==typeof t.values&&(t.values=Object.keys(t.values).reduce(((e,r)=>(function(e,t,n,i){return"string"==typeof e&&e.split(i).length===n&&"number"==typeof t}(r,t.values[r],n,i)&&(e[r]=t.values[r]),e)),{}),Object.keys(t.values).length>0));var t,n,i}const Vl={1:e=>Ll(e),2:e=>!(!Array.isArray(e.modelGroups)||0===e.modelGroups.length)&&(e.modelWeightSum=0,e.modelGroups.every((t=>!("number"!=typeof t.modelWeight||!Ll(t))&&(e.modelWeightSum+=t.modelWeight,!0))))};function Wl(e){return"object"==typeof e&&(e.floorsSchemaVersion=e.floorsSchemaVersion||1,"function"!=typeof Vl[e.floorsSchemaVersion]?(Qt(`${Al}: Unknown floorsSchemaVersion: `,e.floorsSchemaVersion),!1):Vl[e.floorsSchemaVersion](e))}function Gl(e,t){if(e&&"object"==typeof e&&Wl(e))return Xt(`${Al}: A ${t} set the auction floor data set to `,e),{...e,location:t};Qt(`${Al}: The floors data did not contain correct values`,e)}const Hl=go("priceFloors",(function(e,t){const n={reqBidsConfigObj:t,context:this,nextFn:e,haveExited:!1,timer:null};Ul.auctionDelay>0&&kl?(n.timer=setTimeout((()=>{Yt(`${Al}: Fetch attempt did not return in time for auction`),Ul.fetchStatus="timeout",zl(n)}),Ul.auctionDelay),Rl.push(n)):zl(n)}));function Jl(){Rl.forEach((e=>{clearTimeout(e.timer),zl(e)})),Rl=[]}function Kl(e){let t;kl=!1,Ul.fetchStatus="success";try{t=JSON.parse(e)}catch(i){t=e}const n=Gl(t,"fetch");n&&(Ul.data=n,Ul.skipRate=cn(n.skipRate)?n.skipRate:Ul.skipRate,Ul.floorProvider=n.floorProvider||Ul.floorProvider),Jl()}function Xl(e){kl=!1,Ul.fetchStatus="error",Qt(`${Al}: Fetch errored with: `,e),Jl()}function Yl(e){var t;Ul=Vn(e,["floorMin","enabled",e=>!1!==e,"auctionDelay",e=>e||0,"floorProvider",t=>yt(e,"data.floorProvider",t),"endpoint",e=>e||{},"skipRate",()=>isNaN(yt(e,"data.skipRate"))?e.skipRate||0:e.data.skipRate,"enforcement",e=>Vn(e||{},["enforceJS",e=>!1!==e,"enforcePBS",e=>!0===e,"floorDeals",e=>!0===e,"bidAdjustment",e=>!1!==e,"noFloorSignalBidders",e=>e||[]]),"additionalSchemaFields",e=>{return"object"==typeof e&&Object.keys(e).length>0?(t=e,void Object.keys(t).forEach((e=>{-1===xl.indexOf(e)&&"function"==typeof t[e]&&(xl.push(e),Pl[e]=t[e])}))):void 0;var t},"data",e=>e&&Gl(e,"setConfig")||void 0]),Ul.enabled?((t=Ul.endpoint).url&&!kl?"GET"!==(t.method||"GET")?Qt(`${Al}: 'GET' is the only request method supported at this time!`):(El(t.url,{success:Kl,error:Xl},null,{method:"GET"}),kl=!0):kl&&Yt(`${Al}: A fetch is already occuring. Skipping.`),_l||(Kr(je.AUCTION_END,(e=>{setTimeout((()=>delete Ol[e.auctionId]),3e3)})),bt().requestBids.before(Hl,50),Li("addBidResponse").before(Ql,tn()?4:50),_l=!0)):(Xt(`${Al}: Turning off module`),Ul={},Ol={},Li("addBidResponse").getHooks({hook:Ql}).remove(),bt().requestBids.getHooks({hook:Hl}).remove(),_l=!1)}const Ql=ho("priceFloors",(function(e,t,n,i){var r;let o=Ol[n.auctionId];if(!o||!n||o.skipped)return e.call(this,t,n,i);const s=Ko.index.getBidRequest(n);let a,d=jl(o.data,s,{...n,size:[n.width,n.height]});if(!d.matchingFloor)return 0!==d.matchingFloor&&Yt(`${Al}: unable to determine a matching price floor for bidResponse`,n),e.call(this,t,n,i);let l=o.data.currency.toUpperCase(),c=n.currency||"USD";if(l===c.toUpperCase())a=n.cpm;else if(n.originalCurrency&&l===n.originalCurrency.toUpperCase())a=n.originalCpm;else try{a=bt().convertCurrency(n.cpm,c.toUpperCase(),l)}catch(u){return Qt(`${Al}: Unable do get currency conversion for bidResponse to Floor Currency. Do you have Currency module enabled? ${n}`),e.call(this,t,n,i)}return a=Nl(a,n,s),function(e,t,n,i){n.floorData={floorValue:t.matchingFloor,floorRule:t.matchingRule,floorRuleValue:t.floorRuleValue,floorCurrency:e.data.currency,cpmAfterAdjustments:i,enforcements:{...e.enforcement},matchedFields:{}},e.data.schema.fields.forEach(((i,r)=>{let o=t.matchingData.split(e.data.schema.delimiter)[r];n.floorData.matchedFields[i]=o}))}(o,d,n,a),function(e,t,n){let i=!1!==yt(e,"enforcement.enforceJS"),r=!0===yt(e,"enforcement.floorDeals")||!n.dealId,o=n.floorData.cpmAfterAdjustments<t.matchingFloor;return i&&o&&r}(o,d,n)?(i(Ke.FLOOR_NOT_MET),void Yt(`${Al}: ${n.bidderCode}'s Bid Response for ${t} was rejected due to floor not met (adjusted cpm: ${null==(r=null==n?void 0:n.floorData)?void 0:r.cpmAfterAdjustments}, floor: ${null==d?void 0:d.matchingFloor})`,n)):e.call(this,t,n,i)}));lt.getConfig("floors",(e=>Yl(e.floors))),Ja({type:za,name:"bidfloor",fn:function(e,t,n){if("function"==typeof t.getFloor){let r,o;try{({currency:r,floor:o}=t.getFloor({currency:n.currency||lt.getConfig("currency.adServerCurrency")||"USD",mediaType:n.mediaType||"*",size:"*"}))}catch(i){return void Yt("Cannot compute floor for bid",t)}o=parseFloat(o),null==r||null==o||isNaN(o)||Object.assign(e,{bidfloor:o,bidfloorcur:r})}}}),Ja({type:za,name:"extPrebidFloors",fn:function(e,t,n){var i,r,o,s,a,d,l,c,u,p;if(null!=e.bidfloor){let{floorMinCur:t,floorMin:m}=n.reqContext.floorMin||{};null==t&&(t=e.bidfloorcur);const f=(null==(o=null==(r=null==(i=e.ext)?void 0:i.prebid)?void 0:r.floors)?void 0:o.floorMinCur)||(null==(a=null==(s=e.ext)?void 0:s.prebid)?void 0:a.floorMinCur)||t,g=(null==(c=null==(l=null==(d=e.ext)?void 0:d.prebid)?void 0:l.floors)?void 0:c.floorMin)||(null==(p=null==(u=e.ext)?void 0:u.prebid)?void 0:p.floorMin),h=Tl(e.bidfloor,e.bidfloorcur,t),v=!(!g||!f)&&Tl(g,f,t),b=v&&v<h?v:h;wt(e,"ext.prebid.floors.floorMin",b),(null==m||m>b)&&(m=b),n.reqContext.floorMin={floorMin:m,floorMinCur:t}}},dialects:[Ga],priority:-1}),Ja({type:Ma,name:"extPrebidFloors",fn:function(e,t,n){var i,r,o;_l&&wt(e,"ext.prebid.floors.enabled",(null==(o=null==(r=null==(i=e.ext)?void 0:i.prebid)?void 0:r.floors)?void 0:o.enabled)||!1),(null==n?void 0:n.floorMin)&&Yn(e,{ext:{prebid:{floors:n.floorMin}}})},dialects:[Ga]});const Zl={env:"vp",gdfp_req:1,output:"vast",unviewed_position_start:1},ec={protocol:"https",host:"securepubads.g.doubleclick.net",pathname:"/gampad/ads"},tc=bt();const nc=Fi("sync",(()=>{}));var ic=[];const rc=20,oc="targetingControls.allowTargetingKeys",sc="targetingControls.addTargetingKeys",ac=`Only one of "${oc}" or "${sc}" can be set`,dc=Object.keys(Ve).map((e=>Ve[e]));let lc={isActualBid:e=>e.getStatusCode()===Pe.GOOD,isBidNotExpired:e=>e.responseTimestamp+1e3*Ho(e)>On(),isUnusedBid:e=>e&&(e.status&&!Ce([Je.RENDERED],e.status)||!e.status)};function cc(e){return!Object.values(lc).some((t=>!t(e)))}const uc=Fi("sync",(function(e,t,n=0,i=!1){if(!i){const i=[],r=lt.getConfig("sendBidsControl.dealPrioritization");let o=Nn(e,"adUnitCode");return Object.keys(o).forEach((e=>{let s=[],a=Nn(o[e],"bidderCode");Object.keys(a).forEach((e=>s.push(a[e].reduce(t)))),n>0?(s=r?s.sort(pc(!0)):s.sort(((e,t)=>t.cpm-e.cpm)),i.push(...s.slice(0,n))):i.push(...s)})),i}return e}));function pc(e=!1){return function(t,n){return void 0!==t.adserverTargeting.hb_deal&&void 0===n.adserverTargeting.hb_deal?-1:void 0===t.adserverTargeting.hb_deal&&void 0!==n.adserverTargeting.hb_deal?1:e?n.cpm-t.cpm:n.adserverTargeting.hb_pb-t.adserverTargeting.hb_pb}}function mc(e,t,n=()=>window.googletag.pubads().getSlots()){return n().reduce(((e,n)=>{const i=an(t)&&t(n);return Object.keys(e).filter(an(i)?i:function(e){return t=>Mn(e,t)}(n)).forEach((t=>e[t].push(n))),e}),Object.fromEntries(e.map((e=>[e,[]]))))}const fc=function(e){let t={},n={};function i(e,t){return e.adserverTargeting&&t&&(ln(t)&&Ce(t,e.adUnitCode)||"string"==typeof t&&e.adUnitCode===t)}function r(t){return"string"==typeof t?[t]:ln(t)?t:e.getAdUnitCodes()||[]}function o(){let t=e.getBidsReceived();if(lt.getConfig("useBidCache")){const e=lt.getConfig("bidCacheFilterFunction");"function"==typeof e&&(t=t.filter((t=>n[t.adUnitCode]===t.auctionId||!!e(t))))}else t=t.filter((e=>n[e.adUnitCode]===e.auctionId));return t=t.filter((e=>yt(e,"video.context")!==Br)).filter(cc),t.forEach((e=>(e.latestTargetedAuctionId=n[e.adUnitCode],e))),uc(t,Il)}function s(){return e.getStandardBidderAdServerTargeting().map((e=>e.key)).concat(dc).filter(Tn)}function a(e,t,n,i){return Object.keys(t.adserverTargeting).filter(d()).forEach((n=>{e.length&&e.filter(function(e){return function(n){return n.adUnitCode===t.adUnitCode&&n.adserverTargeting[e]}}(n)).forEach(function(e){return function(n){ln(n.adserverTargeting[e])||(n.adserverTargeting[e]=[n.adserverTargeting[e]]),n.adserverTargeting[e]=n.adserverTargeting[e].concat(t.adserverTargeting[e]).filter(Tn),delete t.adserverTargeting[e]}}(n))})),e.push(t),e}function d(){let e=s();return e=e.concat(hs),function(t){return-1===e.indexOf(t)}}function l(e){return{[e.adUnitCode]:Object.keys(e.adserverTargeting).filter(d()).map((t=>({[t.substring(0,rc)]:[e.adserverTargeting[t]]})))}}function c(e,t){return t.map((t=>({[`${t}_${e.bidderCode}`.substring(0,rc)]:[e.adserverTargeting[t]]})))}return t.setLatestAuctionForAdUnit=function(e,t){n[e]=t},t.resetPresetTargeting=function(e,t){if(En()){const n=r(e);let i=ic.reduce(((e,t)=>(e[t]=null,e)),{});Object.values(mc(n,t)).forEach((e=>{e.forEach((e=>e.updateTargetingFromMap(i)))}))}},t.resetPresetTargetingAST=function(e){r(e).forEach((function(e){const t=window.apntag.getTag(e);if(t&&t.keywords){const n=Object.keys(t.keywords),i={};n.forEach((e=>{Ce(ic,e.toLowerCase())||(i[e]=t.keywords[e])})),window.apntag.modifyTag(e,{keywords:i})}}))},t.getAllTargeting=function(n,d=o()){const u=r(n);var p=function(e,n){let i=t.getWinningBids(e,n),r=s();return i=i.map((e=>({[e.adUnitCode]:Object.keys(e.adserverTargeting).filter((t=>void 0===e.sendStandardTargeting||e.sendStandardTargeting||-1===r.indexOf(t))).reduce(((t,n)=>{const i=[e.adserverTargeting[n]],r={[n.substring(0,rc)]:i};if(n===Ve.DEAL){const o=`${n}_${e.bidderCode}`.substring(0,rc),s={[o]:i};return[...t,r,s]}return[...t,r]}),[])}))),i}(u,d).concat(function(e,t){return t.filter((t=>Ce(e,t.adUnitCode))).map((e=>Object.assign({},e))).reduce(a,[]).map(l).filter((e=>e))}(u,d)).concat(lt.getConfig("enableSendAllBids")?function(e,t){const n=dc.concat(hs),r=lt.getConfig("sendBidsControl.bidLimit"),o=uc(t,wl,r),s=lt.getConfig("targetingControls.allowSendAllBidsTargetingKeys"),a=s?s.map((e=>Ve[e])):n;return o.map((t=>{if(i(t,e))return{[t.adUnitCode]:c(t,n.filter((e=>void 0!==t.adserverTargeting[e]&&-1!==a.indexOf(e))))}})).filter((e=>e))}(u,d):function(e,t){if(!0===lt.getConfig("targetingControls.alwaysIncludeDeals")){const n=dc.concat(hs);return uc(t,wl).map((t=>{if(t.dealId&&i(t,e))return{[t.adUnitCode]:c(t,n.filter((e=>void 0!==t.adserverTargeting[e])))}})).filter((e=>e))}return[]}(u,d)).concat(function(t){function n(e){return yt(e,Be.ADSERVER_TARGETING)}function i(e){const t=n(e);return Object.keys(t).map((function(e){return dn(t[e])&&(t[e]=t[e].split(",").map((e=>e.trim()))),ln(t[e])||(t[e]=[t[e]]),{[e]:t[e]}}))}return e.getAdUnits().filter((e=>Ce(t,e.code)&&n(e))).map((e=>({[e.code]:i(e)})))}(u));p.map((e=>{Object.keys(e).map((t=>{e[t].map((e=>{-1===ic.indexOf(Object.keys(e)[0])&&(ic=Object.keys(e).concat(ic))}))}))}));const m=Object.keys(Object.assign({},We,Ge));let f=lt.getConfig(oc);const g=lt.getConfig(sc);if(null!=g&&null!=f)throw new Error(ac);f=null!=g?m.concat(g):f||m,Array.isArray(f)&&f.length>0&&(p=function(e,t){const n=Object.assign({},Ve,Ge),i=Object.keys(n),r={};return Xt(`allowTargetingKeys - allowed keys [ ${t.map((e=>n[e])).join(", ")} ]`),e.map((e=>{const o=Object.keys(e)[0],s=e[o].filter((e=>{const o=Object.keys(e)[0],s=0===i.filter((e=>0===o.indexOf(n[e]))).length||Ae(t,(e=>{const t=n[e];return 0===o.indexOf(t)}));return r[o]=!s,s}));e[o]=s})),Xt(`allowTargetingKeys - removed keys [ ${Object.keys(r).filter((e=>r[e])).join(", ")} ]`),e.filter((e=>e[Object.keys(e)[0]].length>0))}(p,f)),p=function(e){let t=e.map((e=>({[Object.keys(e)[0]]:e[Object.keys(e)[0]].map((e=>({[Object.keys(e)[0]]:e[Object.keys(e)[0]].join(",")}))).reduce(((e,t)=>Object.assign(t,e)),{})}))).reduce((function(e,t){var n=Object.keys(t)[0];return e[n]=Object.assign({},e[n],t[n]),e}),{});return t}(p);const h=lt.getConfig("targetingControls.auctionKeyMaxChars");return h&&(Xt(`Detected 'targetingControls.auctionKeyMaxChars' was active for this auction; set with a limit of ${h} characters. Running checks on auction keys...`),p=function(e,t){let n=xn(e),i=Object.keys(n).map((e=>({adUnitCode:e,adserverTargeting:n[e]}))).sort(pc());return i.reduce((function(e,i,r,o){let s=(a=i.adserverTargeting,Object.keys(a).reduce((function(e,t){return e+`${t}%3d${encodeURIComponent(a[t])}%26`}),""));var a;r+1===o.length&&(s=s.slice(0,-3));let d=i.adUnitCode,l=s.length;return l<=t?(Xt(`AdUnit '${d}' auction keys comprised of ${l} characters. Deducted from running threshold; new limit is ${t-=l}`,n[d]),e[d]=n[d]):Yt(`The following keys for adUnitCode '${d}' exceeded the current limit of the 'auctionKeyMaxChars' setting.\nThe key-set size was ${l}, the current allotted amount was ${t}.\n`,n[d]),r+1===o.length&&0===Object.keys(e).length&&Qt("No auction targeting keys were permitted due to the setting in setConfig(targetingControls.auctionKeyMaxChars). Please review setup and consider adjusting."),e}),{})}(p,h)),u.forEach((e=>{p[e]||(p[e]={})})),p},lt.getConfig("targetingControls",(function(e){null!=yt(e,oc)&&null!=yt(e,sc)&&Qt(ac)})),t.setTargetingForGPT=Fi("sync",(function(n,i){let r=t.getAllTargeting(n),o=Object.fromEntries(ic.map((e=>[e,null])));Object.entries(mc(Object.keys(r),i)).forEach((([e,t])=>{t.forEach((t=>{Object.keys(r[e]).forEach((t=>{let n=r[e][t];"string"==typeof n&&-1!==n.indexOf(",")&&(n=n.split(",")),r[e][t]=n})),Kt(`Attempting to set targeting-map for slot: ${t.getSlotElementId()} with targeting-map:`,r[e]),t.updateTargetingFromMap(Object.assign({},o,r[e]))}))})),Object.keys(r).forEach((t=>{Object.keys(r[t]).forEach((n=>{"hb_adid"===n&&e.setStatusForBids(r[t][n],Je.BID_TARGETING_SET)}))})),t.targetingDone(r),Zr(je.SET_TARGETING,r)}),"setTargetingForGPT"),t.targetingDone=Fi("sync",(function(e){return e}),"targetingDone"),t.getWinningBids=function(e,t=o()){const n=r(e);return t.filter((e=>Ce(n,e.adUnitCode))).filter((e=>!0===Ai.get(e.bidderCode,"allowZeroCpmBids")?e.cpm>=0:e.cpm>0)).map((e=>e.adUnitCode)).filter(Tn).map((e=>t.filter((t=>t.adUnitCode===e?t:null)).reduce(wl)))},t.setTargetingForAst=function(e){let n=t.getAllTargeting(e);try{t.resetPresetTargetingAST(e)}catch(i){Qt("unable to reset targeting for AST"+i)}Object.keys(n).forEach((e=>Object.keys(n[e]).forEach((t=>{if(Kt(`Attempting to set targeting for targetId: ${e} key: ${t} value: ${n[e][t]}`),dn(n[e][t])||ln(n[e][t])){let i={},r=/pt[0-9]/;t.search(r)<0?i[t.toUpperCase()]=n[e][t]:i[t]=n[e][t],window.apntag.setKeywords(e,i,{overrideKeyValue:!0})}}))))},t.isApntagDefined=function(){if(window.apntag&&an(window.apntag.setKeywords))return!0},t}(Ko),gc={ri:na};function hc(e,t,n){return yt(t,`${n}.description_url`)||encodeURIComponent(gc.ri().page)}function vc(e,t,n){const i=e&&e.adserverTargeting||{};let r={};const o=t&&t.adUnit;if(o){let e=fc.getAllTargeting(o.code);r=e?e[o.code]:{}}const s=Object.assign({},{hb_uuid:e&&e.videoCacheKey},{hb_cache_id:e&&e.videoCacheKey},r,i);Zr(je.SET_TARGETING,{[o.code]:s});const a=yt(t,"params.cust_params"),d=Object.assign({},s,a);let l=encodeURIComponent(Hn(d));return n&&(l=n+"%26"+l),l}lt.getConfig("brandCategoryTranslation.translationFile")&&Li("registerAdserver").before((function(e){e.call(this,"dfp")})),function(e,t){tc.adServers=tc.adServers||{},tc.adServers[e]=tc.adServers[e]||{},Object.keys(t).forEach((n=>{tc.adServers[e][n]?Yt(`Attempting to add an already registered function property ${n} for AdServer ${e}.`):tc.adServers[e][n]=t[n]}))}("dfp",{buildVideoUrl:function(e){var t,n,i,r,o;if(!e.params&&!e.url)return void Qt("A params object or a url is required to use slmpbjs.adServers.dfp.buildVideoUrl");const s=e.adUnit,a=e.bid||fc.getWinningBids(s.code)[0];let d={};if(e.url&&(d=Jn(e.url,{noDecodeWholeURL:!0}),mn(e.params)))return function(e,t,n){const i=hc(t,e,"search");i&&(e.search.description_url=i);return e.search.cust_params=vc(t,n,e.search.cust_params),Kn(e)}(d,a,e);const l={correlator:Date.now(),sz:Mt(yt(s,"mediaTypes.video.playerSize")).join("|"),url:encodeURIComponent(location.href)},c=d.search,u=c&&c.sz;u&&(l.sz=u+"|"+l.sz);let p=vc(a,e,c&&c.cust_params);const m=Object.assign({},Zl,d.search,l,e.params,{cust_params:p}),f=hc(a,e,"params");if(f&&(m.description_url=f),((e,t)=>{e&&("boolean"==typeof e.gdprApplies&&(t.gdpr=Number(e.gdprApplies)),e.consentString&&(t.gdpr_consent=e.consentString),e.addtlConsent&&(t.addtl_consent=e.addtlConsent))})(sa.getConsentData(),m),!m.ppid){const e=nc();null!=e&&(m.ppid=e)}const g=null==(n=null==(t=e.adUnit)?void 0:t.mediaTypes)?void 0:n.video;Object.entries({plcmt:()=>null==g?void 0:g.plcmt,min_ad_duration:()=>cn(null==g?void 0:g.minduration)?1e3*g.minduration:null,max_ad_duration:()=>cn(null==g?void 0:g.maxduration)?1e3*g.maxduration:null,vpos(){const e=null==g?void 0:g.startdelay;if(cn(e))return-2===e?"postroll":-1===e||e>0?"midroll":"preroll"},vconp:()=>Array.isArray(null==g?void 0:g.playbackmethod)&&g.playbackmethod.every((e=>7===e))?"2":void 0,vpa(){if(Array.isArray(null==g?void 0:g.playbackmethod)){const e=g.playbackmethod.some((e=>3===e)),t=g.playbackmethod.some((e=>[1,2,4,5,6].includes(e)));if(e&&!t)return"click";if(t&&!e)return"auto"}},vpmute(){if(Array.isArray(null==g?void 0:g.playbackmethod)){const e=g.playbackmethod.some((e=>[2,6].includes(e))),t=g.playbackmethod.some((e=>[1,3,4,5].includes(e)));if(e&&!t)return"1";if(t&&!e)return"0"}}}).forEach((([e,t])=>{if(!m.hasOwnProperty(e)){const n=t();null!=n&&(m[e]=n)}}));const h=function(e){return Object.entries({[ul[0]]:pl(e,["user.data"],4),[ul[1]]:pl(e,id.map((e=>`${e}.content.data`)),6)}).map((([e,t])=>t.length?{taxonomy:e,values:t}:null)).filter((e=>e))}((null==(i=Ko.index.getBidRequest(e.bid||{}))?void 0:i.ortb2)??(null==(o=null==(r=Ko.index.getAuction(e.bid||{}))?void 0:r.getFPD())?void 0:o.global));return h.length&&(m.ppsj=btoa(JSON.stringify({PublisherProvidedTaxonomySignals:h}))),Kn(Object.assign({},ec,d,{search:m}))}});const bc=Tr("categoryTranslation"),yc="iabToFwMappingkey",wc="iabToFwMappingkeyPub",Ic=1,Tc=Fi("async",(function(e){let t;"freewheel"===e&&(t="https://cdn.jsdelivr.net/gh/prebid/category-mapping-file@1/freewheel-mapping.json",Ac("https://cdn.jsdelivr.net/gh/prebid/category-mapping-file@1/freewheel-mapping.json",yc))}),"registerAdserver");zi.then((()=>Tc()));const Cc=ho("categoryTranslation",(function(e,t,n,i){if(!n)return e.call(this,t,n,i);if(!lt.getConfig("adpod.brandCategoryExclusion"))return e.call(this,t,n,i);let r=lt.getConfig("brandCategoryTranslation.translationFile")?wc:yc;if(n.meta&&!n.meta.adServerCatId){let e=bc.getDataFromLocalStorage(r);if(e){try{e=JSON.parse(e)}catch(o){Qt("Failed to parse translation mapping file")}n.meta.primaryCatId&&e.mapping&&e.mapping[n.meta.primaryCatId]?n.meta.adServerCatId=e.mapping[n.meta.primaryCatId].id:n.meta.adServerCatId=void 0}else Qt("Translation mapping data not found in local storage")}e.call(this,t,n,i)}));function Ac(e,t){!function(e,t,n=15){0===e.getHooks({hook:t}).length&&e.before(t,n)}(ko,Cc,50);let n=bc.getDataFromLocalStorage(t);try{n=n?JSON.parse(n):void 0,(!n||On()>n.lastUpdated+24*Ic*60*60*1e3)&&li(e,{success:e=>{try{(e=JSON.parse(e)).lastUpdated=On(),bc.setDataInLocalStorage(t,JSON.stringify(e))}catch(n){Qt("Failed to parse translation mapping file")}},error:()=>{Qt("Failed to load brand category translation file.")}})}catch(i){Qt("Failed to parse translation mapping file")}}lt.getConfig("brandCategoryTranslation",(e=>function(e){e.translationFile&&Ac(e.translationFile,wc)}(e.brandCategoryTranslation)));const Ec="Invalid schain object found: ",Sc=" should be a string",xc=" should be an Integer",kc=" should be an object",_c=" should be an Array",Uc={STRICT:"strict",RELAXED:"relaxed",OFF:"off"},Rc=[];function Oc(e,t){let n=Uc.STRICT;if(function(e){return!(void 0===e||!un(e)&&(Qt(Ec+"the following schain config will not be used as schain is not an object.",e),1))}(e)){if(dn(e.validation)&&-1!=Rc.indexOf(e.validation)&&(n=e.validation),n===Uc.OFF)return e.config;if(function(e,t){let n="Detected something wrong within an schain config:",i="";function r(e){i+="\n"+e}function o(){!0===t?Qt(n,e,i):Yt(n,e,i)}if(!un(e)&&(r("schain.config"+kc),o(),t))return!1;if(cn(e.complete)&&zn(e.complete)||r("schain.config.complete"+xc),dn(e.ver)||r("schain.config.ver"+Sc),e.hasOwnProperty("ext")&&(un(e.ext)||r("schain.config.ext"+kc)),ln(e.nodes))e.nodes.forEach(((e,t)=>{dn(e.asi)||r(`schain.config.nodes[${t}].asi`+Sc),dn(e.sid)||r(`schain.config.nodes[${t}].sid`+Sc),cn(e.hp)&&zn(e.hp)||r(`schain.config.nodes[${t}].hp`+xc),e.hasOwnProperty("rid")&&(dn(e.rid)||r(`schain.config.nodes[${t}].rid`+Sc)),e.hasOwnProperty("name")&&(dn(e.name)||r(`schain.config.nodes[${t}].name`+Sc)),e.hasOwnProperty("domain")&&(dn(e.domain)||r(`schain.config.nodes[${t}].domain`+Sc)),e.hasOwnProperty("ext")&&(un(e.ext)||r(`schain.config.nodes[${t}].ext`+kc))}));else if(r("schain.config.nodes"+_c),o(),t)return!1;return!(i.length>0&&(o(),t))}(e.config,!(n!==Uc.STRICT)))return e.config;Qt(Ec+`due to the 'strict' validation setting, this schain config will not be passed to bidder '${t}'. See above error for details.`)}return null}function Dc(e,t){const n=lt.getConfig("schain"),i=lt.getBidderConfig();t.forEach((e=>{let t=e.bidderCode,r=function(e){return i[e]&&i[e].schain||n}(t);e.bids.forEach((e=>{let n=Oc(r,t);n&&(e.schain=xn(n))}))})),e(t)}gn(Uc,(e=>Rc.push(e))),Sa.makeBidRequests.after(Dc),Ja({type:Ma,name:"sourceExtSchain",fn:function(e,t,n){if(!yt(e,"source.ext.schain")){const t=yt(n,"bidRequests.0.schain");t&&wt(e,"source.ext.schain",t)}}});const Bc="teadsId",Pc="_tfpvi",jc={GDPR_DOESNT_APPLY:0,CMP_NOT_FOUND_OR_ERROR:22,GDPR_APPLIES_PUBLISHER:12},Nc={GDPR_DOESNT_APPLY:0,CMP_NOT_FOUND:220,GDPR_APPLIES_PUBLISHER_CLASSIC:120},qc=Ir({moduleType:xi,moduleName:Bc});Gi("userId",{name:Bc,gvlid:132,decode:e=>({teadsId:e}),getId:(e,t)=>({callback:function(n){const i=function(e,t){const n=function(e){var t;const n=null==(t=null==e?void 0:e.params)?void 0:t.pubId,i="PUB_";if(cn(n))return i+n.toString();if(dn(n)&&parseInt(n))return i+n;return""}(e),i=function(){const e=qc.cookiesAreEnabled(null)?qc.getCookie(Pc,null):null;return dn(e)?e:""}(),r=function(e){const t=null==e?void 0:e.gdprApplies;return!0===t?jc.GDPR_APPLIES_PUBLISHER:!1===t?jc.GDPR_DOESNT_APPLY:jc.CMP_NOT_FOUND_OR_ERROR}(t),o=function(e){const t=null==e?void 0:e.consentString;return dn(t)?t:""}(t),s=function(e){return dn(e)?e:""}(null==aa?void 0:aa.getConsentData()),a=function(e){switch(e){case jc.GDPR_DOESNT_APPLY:return Nc.GDPR_DOESNT_APPLY;case jc.CMP_NOT_FOUND_OR_ERROR:return Nc.CMP_NOT_FOUND;case jc.GDPR_APPLIES_PUBLISHER:return Nc.GDPR_APPLIES_PUBLISHER_CLASSIC;default:return-1}}(r),d={analytics_tag_id:n,tfpvi:i,gdpr_consent:o,gdpr_status:r,gdpr_reason:a,ccpa_consent:s,sv:"prebid-v1"},l="https://at.teads.tv/fpc",c=new URLSearchParams;for(const u in d)c.append(u,d[u]);return l+"?"+c.toString()}(e,t);li(i,{success:(e,t)=>{if(t&&200===t.status)if(dn(e)&&!mn(e)){const t=24*365*60*60*1e3,r=(i=t,new Date(On()+i).toUTCString());qc.setCookie(Pc,e,r),n(e)}else qc.setCookie(Pc,"","Thu, 01 Jan 1970 00:00:01 GMT"),n();else Xt(`${Bc}: Server error while fetching ID`),n();var i},error:e=>{Qt(`${Bc}: ID fetch encountered an error`,e),n()}},void 0,{method:"GET"})}})});const $c=new Map;function Fc(e){const t={};function n(e){var n;const i=JSON.stringify([null==(n=e.source)?void 0:n.toLowerCase(),e.ext]);t.hasOwnProperty(i)?t[i].uids.push(...e.uids):t[i]=e}return Object.entries(e).forEach((([e,t])=>{t=Array.isArray(t)?t:[t];("pubProvidedId"===e?xn(t):t.map((t=>function(e,t){const n=$c.get(t);if(n&&e){let t={};t.source=an(n.getSource)?n.getSource(e):n.source;const i=an(n.getValue)?n.getValue(e):e;if(dn(i)){const r={id:i,atype:n.atype};if(an(n.getUidExt)){const t=n.getUidExt(e);t&&(r.ext=t)}if(t.uids=[r],an(n.getEidExt)){const i=n.getEidExt(e);i&&(t.ext=i)}return t}}return null}(t,e)))).filter((e=>null!=e)).forEach(n)})),Object.values(t)}const Mc="User ID",zc=br,Lc=vr,Vc="_pbjs_id_optout",Wc=Tr("userId"),Gc={isAllowed:or};let Hc,Jc,Kc,Xc,Yc,Qc,Zc=!1,eu=[],tu=[],nu={},iu=[];const ru=(()=>{let e;return()=>(null==e&&(e=mo()),e)})();function ou(e){return ru().fork().renameWith((t=>[`userId.mod.${t}`,`userId.mods.${e}.${t}`]))}function su(e,t){t=t||e.storageMgr;const n="function"==typeof e.submodule.domainOverride?e.submodule.domainOverride():null,i=e.config.storage.name;return function(e,r,o){t.setCookie(i+(e||""),r,o,"Lax",n)}}function au(e,t){const n=e.config.storage;try{const i=new Date(Date.now()+864e5*n.expires).toUTCString(),r=un(t)?JSON.stringify(t):t;e.enabledStorageTypes.forEach((t=>{switch(t){case zc:!function(e,t,n){const i=e.config.storage,r=su(e);r(null,t,n),r("_cst",ku(),n),"number"==typeof i.refreshInSeconds&&r("_last",(new Date).toUTCString(),n)}(e,r,i);break;case Lc:!function(e,t,n){const i=e.config.storage,r=e.storageMgr;r.setDataInLocalStorage(`${i.name}_exp`,n),r.setDataInLocalStorage(`${i.name}_cst`,ku()),r.setDataInLocalStorage(i.name,encodeURIComponent(t)),"number"==typeof i.refreshInSeconds&&r.setDataInLocalStorage(`${i.name}_last`,(new Date).toUTCString())}(e,r,i)}}))}catch(i){Qt(i)}}function du(e){ju(e),e.enabledStorageTypes.forEach((t=>{switch(t){case zc:!function(e){const t=su(e,Wc),n=new Date(Date.now()-864e5).toUTCString();["","_last","_cst"].forEach((e=>{try{t(e,"",n)}catch(i){Qt(i)}}))}(e);break;case Lc:!function(e){["","_last","_exp","_cst"].forEach((t=>{try{Wc.removeDataFromLocalStorage(e.config.storage.name+t)}catch(n){Qt(n)}}))}(e)}}))}function lu(e){let t=jt.setEidPermissions;"function"==typeof t&&ln(e)&&t(function(e){let t=[];return e.filter((e=>un(e.idObj)&&Object.keys(e.idObj).length)).forEach((e=>{Object.keys(e.idObj).forEach((n=>{const i=$c.get(n)||{};yt(e,"config.bidders")&&Array.isArray(e.config.bidders)&&i.source&&t.push({source:i.source,bidders:e.config.bidders})}))})),t}(e))}function cu(e,t=void 0){const n=e.config.storage,i=t?`${n.name}_${t}`:n.name;let r;try{e.enabledStorageTypes.find((t=>{switch(t){case zc:r=function(e,t){return e.storageMgr.getCookie(t)}(e,i);break;case Lc:r=function(e,t){const n=e.storageMgr,i=e.config.storage,r=n.getDataFromLocalStorage(`${i.name}_exp`);return""===r?n.getDataFromLocalStorage(t):r&&new Date(r).getTime()-Date.now()>0?decodeURIComponent(n.getDataFromLocalStorage(t)):void 0}(e,i)}return!!r})),"string"==typeof r&&"{"===r.trim().charAt(0)&&(r=JSON.parse(r))}catch(o){Qt(o)}return r}function uu(e,t,n){t=ru().fork().startTiming("userId.callbacks.total").stopBefore(t);const i=jn((()=>{clearTimeout(Jc),t()}),e.length);e.forEach((function(e){const t=ou(e.submodule.name).startTiming("callback").stopBefore(i);try{e.callback((function(i){i?(e.config.storage&&au(e,i),e.idObj=e.submodule.decode(i,e.config),Uu(pu(n))):Xt(`${Mc}: ${e.submodule.name} - request id responded with an empty value`),t()}),cu.bind(null,e))}catch(r){Qt(`Error in userID module '${e.submodule.name}':`,r),t()}e.callback=void 0}))}function pu(e){return Array.isArray(e)&&e.length?fu(e):{}}function mu(e,t,n){return Object.fromEntries(Object.entries(e.reduce(((e,i)=>{const r=t(i);return r&&Object.keys(r).forEach((t=>{var o;const s=null==(o=nu[t])?void 0:o.indexOf(n(i)),a={priority:cn(s)?s:-1,value:r[t]};if(e[t]){const n=a.priority>e[t].priority?a:e[t];e[t]=n}else e[t]=a})),e}),{})).map((([e,t])=>[e,t.value])))}function fu(e){return mu(e.filter((e=>un(e.idObj)&&Object.keys(e.idObj).length)),(e=>e.idObj),(e=>e.submodule.name))}function gu(e,t){[e].some((e=>!Array.isArray(e)||!e.length))||e.forEach((e=>{e.bids&&ln(e.bids)&&e.bids.forEach((e=>{const n=function(e,t){return Array.isArray(e)&&e.length&&t?fu(e.filter((e=>!e.config.bidders||!ln(e.config.bidders)||Ce(e.config.bidders,t)))):{}}(t,e.bidder);Object.keys(n).length&&(e.userId=n,e.userIdAsEids=Fc(n))}))}))}const hu={};let vu;function bu(e=Iu()||[]){const t=Yc&&e.find((e=>e.source===Yc));if(t&&"string"==typeof yt(t,"uids.0.id")){const e=t.uids[0].id.replace(/[\W_]/g,"");if(e.length>=32&&e.length<=150)return e;Yt(`User ID - Googletag Publisher Provided ID for ${Yc} is not between 32 and 150 characters - ${e}`)}}const yu=go("userId",(function(e,t,{delay:n=ft.timeout,getIds:i=xu}={}){ft.race([i().catch((()=>null)),n(Xc)]).then((()=>{gu(t.adUnits||bt().adUnits,Hc),ru().join(po(t.metrics),{propagate:!1,includeGroups:!0}),e.call(this,t)}))}));function wu(){return pu(Hc)}function Iu(){return Fc(wu())}function Tu(e){return Fc(function(e,t){if(!Array.isArray(e)||!e.length)return{};const n=fu(e),i=Object.keys(n).find((e=>{const n=$c.get(e);return(null==n?void 0:n.source)===t||an(null==n?void 0:n.getSource)&&n.getSource()===t}));return i?{[i]:n[i]}:[]}(Hc,e))[0]}function Cu(e,t,n){return vu().then((()=>{let i={};if(an(n)){Xt(`${Mc} - Getting encrypted signal from custom function : ${n.name} & source : ${e} `);const t=n(e);i[e]=t?Au(t):null}else{const n=Tu(e);Xt(`${Mc} - Getting encrypted signal for eids :${JSON.stringify(n)}`),mn(n)||(i[n.source]=!0===t?Au(n):n.uids[0].id)}return Xt(`${Mc} - Fetching encrypted eids: ${i[e]}`),i[e]}))}function Au(e,t=1){let n="";if(1===t)n="object"==typeof e?window.btoa(JSON.stringify(e)):window.btoa(e);return`${t}||${n}`}function Eu(){if(!En())return;window.googletag.secureSignalProviders=window.googletag.secureSignalProviders||[];const e=lt.getConfig("userSync.encryptedSignalSources");if(e){const t=e.registerDelay||0;setTimeout((()=>{e.sources&&e.sources.forEach((({source:e,encrypt:t,customFunc:n})=>{e.forEach((e=>{window.googletag.secureSignalProviders.push({id:e,collectorFunction:()=>Cu(e,t,n)})}))}))}),t)}else Yt(`${Mc} - ESP : encryptedSignalSources config not defined under userSync Object`)}function Su({submoduleNames:e}={},t){return vu({refresh:!0,submoduleNames:e}).then((()=>(t&&an(t)&&t(),wu())))}function xu(){return vu().then((()=>wu()),(e=>e===hu?Promise.resolve().then(xu):(Qt("Error initializing userId",e),ft.reject(e))))}function ku(){let e=Number(pa.hash);const t=[];for(;e>0;)t.push(String.fromCharCode(255&e)),e>>>=8;return btoa(t.join())}function _u(e,t,n){const i=sa.getConsentData();if(e.config.storage){let n,r=cu(e),o=!1;if("number"==typeof e.config.storage.refreshInSeconds){const t=new Date(cu(e,"last"));o=t&&Date.now()-t.getTime()>1e3*e.config.storage.refreshInSeconds}if(!r||o||t||function(e){const t=cu(e,"cst");return!t||t!==ku()}(e)){const t=Object.assign({enabledStorageTypes:e.enabledStorageTypes},e.config);n=e.submodule.getId(t,i,r)}else"function"==typeof e.submodule.extendId&&(n=e.submodule.extendId(e.config,i,r));un(n)&&(n.id&&(au(e,n.id),r=n.id),"function"==typeof n.callback&&(e.callback=n.callback)),r&&(e.idObj=e.submodule.decode(r,e.config))}else if(e.config.value)e.idObj=e.config.value;else{const t=e.submodule.getId(e.config,i,void 0);un(t)&&("function"==typeof t.callback&&(e.callback=t.callback),t.id&&(e.idObj=e.submodule.decode(t.id,e.config)))}Uu(pu(n))}function Uu(e=wu()){if(e&&Yc){const t=bu(Fc(e));t&&(En()?window.googletag.pubads().setPublisherProvidedId(t):(window.googletag=window.googletag||{},window.googletag.cmd=window.googletag.cmd||[],window.googletag.cmd.push((function(){window.googletag.pubads().setPublisherProvidedId(t)}))))}}function Ru(e,t,n=!1){return ru().fork().measureTime("userId.init.modules",(function(){if(!t.length)return[];if(t.forEach((e=>ju(e))),!(t=t.filter((e=>(!e.config.storage||!!e.enabledStorageTypes.length)&&Gc.isAllowed(lr,hr(xi,e.config.name))))).length)return Yt(`${Mc} - no ID module configured`),[];const i=t.reduce(((e,i)=>ou(i.submodule.name).measureTime("init",(()=>{try{_u(i,n,t),e.push(i)}catch(r){Qt(`Error in userID module '${i.submodule.name}':`,r)}return e}))),[]);return i.length&&lu(i),i.forEach(Ou.bind(null,e)),i}))}function Ou(e,t){let n=!1;for(let i=0;i<e.length;i++)if(t.config.name.toLowerCase()===e[i].config.name.toLowerCase()){n=!0,e[i]=t;break}n||e.push(t)}function Du(e){var t,n;return(null==(n=null==(t=null==e?void 0:e.storage)?void 0:t.type)?void 0:n.trim().split(/\s*&\s*/))||[]}function Bu(e){function t(e,...t){Yt(`Invalid userSync.userId config: ${e}`,...t)}return Array.isArray(e)?e.filter((e=>{if(!(null==e?void 0:e.name))return t('must specify "name"',e);if(e.storage){if(!e.storage.name||!e.storage.type)return t('must specify "storage.name" and "storage.type"',e);if(!function(e){return Du(e).every((e=>Pu.has(e)))}(e))return t('invalid "storage.type"',e);["expires","refreshInSeconds"].forEach((n=>{let i=e.storage[n];null!=i&&"number"!=typeof i&&(i=Number(i),isNaN(i)?(t(`storage.${n} must be a number and will be ignored`,e),delete e.storage[n]):e.storage[n]=i)}))}return!0})):(null!=e&&t("must be an array",e),[])}const Pu=new Set([Lc,zc]);function ju(e){if(e.enabledStorageTypes)return;const t=Du(e.config);e.enabledStorageTypes=t.filter((t=>{switch(t){case Lc:return function(e){return!(!e.storageMgr.localStorageIsEnabled()||Wc.getDataFromLocalStorage(Vc)&&(Xt(`${Mc} - opt-out localStorage found, storage disabled`),1))}(e);case zc:return function(e){return!(!e.storageMgr.cookiesAreEnabled()||Wc.getCookie(Vc)&&(Xt(`${Mc} - opt-out cookie found, storage disabled`),1))}(e)}return!1}))}function Nu(){var e;e=iu,$c.clear(),Object.entries(mu(e,(e=>e.eids),(e=>e.name))).forEach((([e,t])=>$c.set(e,t)));const t=Bu(tu);if(!t.length)return;const n=iu.filter((e=>!Ae(eu,(t=>t.name===e.name))));eu.splice(0,eu.length),n.map((e=>{const n=Ae(t,(t=>t.name&&(t.name.toLowerCase()===e.name.toLowerCase()||e.aliasName&&t.name.toLowerCase()===e.aliasName.toLowerCase())));return n&&e.name!==n.name&&(n.name=e.name),n?{submodule:e,config:n,callback:void 0,idObj:void 0,storageMgr:Ir({moduleType:xi,moduleName:n.name})}:null})).filter((e=>null!==e)).forEach((e=>eu.push(e))),!Zc&&eu.length&&(bt().requestBids.before(yu,40),Sa.callDataDeletionRequest.before(qu),nc.after((e=>e(bu()))),Xt(`${Mc} - usersync config updated for ${eu.length} submodules: `,eu.map((e=>e.submodule.name))),Zc=!0)}function qu(e,...t){Xt("UserID: received data deletion request; deleting all stored IDs..."),eu.forEach((e=>{if("function"==typeof e.submodule.onDataDeletionRequest)try{e.submodule.onDataDeletionRequest(e.config,e.idObj,...t)}catch(n){Qt(`Error calling onDataDeletionRequest for ID submodule ${e.submodule.name}`,n)}du(e)})),e.apply(this,t)}function $u(e){return function(){return Promise.resolve(e.apply(this,arguments))}}!function(e,{delay:t=ft.timeout}={}){Yc=void 0,eu=[],tu=[],Zc=!1,Hc=[],vu=function({delay:e=ft.timeout}={}){const t=gt(),n=gt();let i,r,o=!1;function s(e){return r=ru().fork(),null!=i&&i.reject(hu),i=gt(),ft.race([e,i.promise]).finally(r.startTiming("userId.total"))}let a=Hc,d=eu;function l(e){return function(...t){if(a===Hc&&d===eu)return e(...t)}}function c(){return pa.promise.finally(r.startTiming("userId.init.consent"))}let u=s(ft.all([zi,t.promise]).then(c).then(l((()=>{Ru(a,d)}))).then((()=>n.promise.finally(r.startTiming("userId.callbacks.pending")))).then(l((()=>{const e=a.filter((e=>an(e.callback)));if(e.length)return new ft((t=>uu(e,t,a)))}))));return function({refresh:i=!1,submoduleNames:r=null,ready:p=!1}={}){return p&&!o&&(o=!0,t.resolve(),Xc>0?n.resolve():Kr(je.AUCTION_END,(function t(){Xr(je.AUCTION_END,t),e(Kc).then(n.resolve)}))),i&&o&&(u=s(u.catch((()=>null)).then(c).then(l((()=>{const e=Ru(a,d.filter((e=>null==r||r.includes(e.submodule.name))),!0).filter((e=>null!=e.callback));if(e.length)return new ft((t=>uu(e,t,a)))}))))),u}}({delay:t}),null!=Qc&&Qc(),iu=[],Qc=e.getConfig("userSync",(e=>{const t=e.userSync;t&&(Yc=t.ppid,t.userIds&&(tu=t.userIds,Kc=cn(t.syncDelay)?t.syncDelay:Cr.syncDelay,Xc=cn(t.auctionDelay)?t.auctionDelay:Cr.auctionDelay,Nu(),function(e,t){if(e){const n={},i=new Map(t.map((e=>e.submodule.aliasName?[e.submodule.aliasName,e.submodule.name]:[])));Object.keys(e).forEach((t=>{const r=ln(e[t])?[...e[t]].reverse():[];n[t]=r.map((e=>i.has(e)?i.get(e):e))})),nu=n}else nu={}}(t.idPriority,eu),vu({ready:!0})))})),bt().getUserIds=wu,bt().getUserIdsAsEids=Iu,bt().getEncryptedEidsForSource=$u(Cu),bt().registerSignalSources=Eu,bt().refreshUserIds=$u(Su),bt().getUserIdsAsync=$u(xu),bt().getUserIdsAsEidBySource=Tu}(lt),Wi("userId",(function(e){e.findRootDomain=Ya,Ae(iu,(t=>t.name===e.name))||(iu.push(e),ca.register(xi,e.name,e.gvlid),Nu(),vu({refresh:!0,submoduleNames:[e.name]}))}),{postInstallAllowed:!0}),Ja({type:Ma,name:"userExtEids",fn:function(e,t,n){var i,r;const o=yt(n,"bidRequests.0.userIdAsEids");o&&Object.keys(o).length>0&&wt(e,"user.ext.eids",o.concat((null==(r=null==(i=e.user)?void 0:i.ext)?void 0:r.eids)||[]))}});const Fu="id5id",Mu="User ID - ID5 submodule: ",zu="id5-sync.com",Lu=Ir({moduleType:xi,moduleName:"id5Id"}),Vu={name:"id5Id",gvlid:131,decode(e,t){let n,i,r={};if(!e||"string"!=typeof e.universal_uid)return;n=e.universal_uid,r=e.ext||r,i=e.publisherTrueLinkId;let o={id5id:{uid:n,ext:r}};un(r.euid)&&(o.euid={uid:r.euid.uids[0].id,source:r.euid.source,ext:{provider:zu}}),i&&(o.trueLinkId={uid:i});switch(yt(e,"ab_testing.result")){case"control":Xt(Mu+"A/B Testing - user is in the Control Group: ID5 ID is NOT exposed"),wt(o,"id5id.ext.abTestingControlGroup",!0);break;case"error":Qt(Mu+"A/B Testing ERROR! controlGroupPct must be a number >= 0 and <= 1");break;case"normal":Xt(Mu+"A/B Testing - user is NOT in the Control Group"),wt(o,"id5id.ext.abTestingControlGroup",!1)}return Xt(Mu+"Decoded ID",o),o},getId(e,t,n){if(!function(e){if(!e||!e.params||!e.params.partner)return Qt(Mu+"partner required to be defined"),!1;const t=e.params.partner;if("string"==typeof t||t instanceof String){let n=parseInt(t);if(isNaN(n)||n<0)return Qt(Mu+"partner required to be a number or a String parsable to a positive integer"),!1;e.params.partner=n}else if("number"!=typeof t)return Qt(Mu+"partner required to be a number or a String parsable to a positive integer"),!1;if(!e.storage||!e.storage.type||!e.storage.name)return Qt(Mu+"storage required to be set"),!1;e.storage.name!==Fu&&Yt(Mu+`storage name recommended to be '${Fu}'.`);return!0}(e))return;if(!Hu(t))return void Xt(Mu+"Skipping ID5 local storage write because no consent given.");return{callback:function(i){new Wu(e,t,n,aa.getConsentData(),da.getConsentData()).execute().then((e=>{i(e)})).catch((e=>{Qt(Mu+"getId fetch encountered an error",e),i()}))}}},extendId:(e,t,n)=>Hu(t)?(Xt(Mu+"using cached ID",n),n&&(n.nbPage=Gu(n)),n):(Xt(Mu+"No consent given for ID5 local storage writing, skipping nb increment."),n),eids:{id5id:{getValue:function(e){return e.uid},source:zu,atype:1,getUidExt:function(e){if(e.ext)return e.ext}},euid:{getValue:function(e){return e.uid},getSource:function(e){return e.source},atype:3,getUidExt:function(e){if(e.ext)return e.ext}},trueLinkId:{getValue:function(e){return e.uid},getSource:function(e){return"true-link-id5-sync.com"},atype:1,getUidExt:function(e){if(e.ext)return e.ext}}}};class Wu{constructor(e,t,n,i,r){_(this,f),this.submoduleConfig=e,this.gdprConsentData=t,this.cacheIdObj=n,this.usPrivacyData=i,this.gppData=r}async execute(){const e=R(this,f,y).call(this);if(!R(this,f,g).call(this))return R(this,f,b).call(this,e);try{return await R(this,f,h).call(this,e)}catch(t){return Qt(Mu+"Error while performing ID5 external module flow. Continuing with regular flow.",t),R(this,f,b).call(this,e)}}}function Gu(e){return e&&void 0!==e.nbPage?e.nbPage+1:1}function Hu(e){const t=e&&"boolean"==typeof e.gdprApplies&&e.gdprApplies,n=yt(e,"vendorData.purpose.consents.1"),i=yt(e,`vendorData.vendor.consents.${131..toString()}`);return!!(!t||n&&i)}f=new WeakSet,g=function(){return"string"==typeof this.submoduleConfig.params.externalModuleUrl},h=async function(e){await async function(e){return new ft(((t,n)=>{if(window.id5Prebid)t();else try{wi(e,"id5",t)}catch(i){n(i)}}))}(this.submoduleConfig.params.externalModuleUrl);const t=await e;return R(this,f,v).call(this).fetchId5Id(t,this.submoduleConfig.params,na(),this.gdprConsentData,this.usPrivacyData,this.gppData)},v=function(){return window.id5Prebid&&window.id5Prebid.integration},b=async function(e){const t=await e,n=await R(this,f,w).call(this,t.extensionsCall),i=await R(this,f,I).call(this,t.fetchCall,n);return R(this,f,C).call(this,i)},y=async function(){let e=this.submoduleConfig.params.configUrl||"https://id5-sync.com/api/config/prebid";const t=await ci(e,{method:"POST",body:JSON.stringify({...this.submoduleConfig,bounce:!0}),credentials:"include"});if(!t.ok)throw new Error("Error while calling config endpoint: ",t);const n=await t.json();return Xt(Mu+"config response received from the server",n),n},w=async function(e){if(void 0===e)return;const t=e.url,n=e.method||"GET",i="GET"===n?void 0:JSON.stringify(e.body||{}),r=await ci(t,{method:n,body:i});if(!r.ok)throw new Error("Error while calling extensions endpoint: ",r);const o=await r.json();return Xt(Mu+"extensions response received from the server",o),o},I=async function(e,t){const n=e.url,i=e.overrides||{},r=JSON.stringify({...R(this,f,T).call(this),...i,extensions:t}),o=await ci(n,{method:"POST",body:r,credentials:"include"});if(!o.ok)throw new Error("Error while calling fetch endpoint: ",o);const s=await o.json();return Xt(Mu+"fetch response received from the server",s),s},T=function(){const e=this.submoduleConfig.params,t=this.gdprConsentData&&"boolean"==typeof this.gdprConsentData.gdprApplies&&this.gdprConsentData.gdprApplies?1:0,n=na(),i=this.cacheIdObj?this.cacheIdObj.signature:void 0,r=Gu(this.cacheIdObj),o=window.id5Bootstrap?window.id5Bootstrap.getTrueLinkInfo():{booted:!1},s={partner:e.partner,gdpr:t,nbPage:r,o:"pbjs",tml:n.topmostLocation,ref:n.ref,cu:n.canonicalUrl,top:n.reachedTop?1:0,u:n.stack[0]||window.location.href,v:"9.10.0",storage:this.submoduleConfig.storage,localStorage:Lu.localStorageIsEnabled()?1:0,true_link:o};!t||void 0===this.gdprConsentData.consentString||mn(this.gdprConsentData.consentString)||fn(this.gdprConsentData.consentString)||(s.gdpr_consent=this.gdprConsentData.consentString),void 0===this.usPrivacyData||mn(this.usPrivacyData)||fn(this.usPrivacyData)||(s.us_privacy=this.usPrivacyData),this.gppData&&(s.gpp_string=this.gppData.gppString,s.gpp_sid=this.gppData.applicableSections),void 0===i||fn(i)||(s.s=i),void 0===e.pd||fn(e.pd)||(s.pd=e.pd),void 0===e.provider||fn(e.provider)||(s.provider=e.provider);const a=e.abTesting||{enabled:!1};return a.enabled&&(s.ab_testing={enabled:!0,control_group_pct:a.controlGroupPct}),s},C=function(e){try{e.privacy&&window.id5Bootstrap&&window.id5Bootstrap.setPrivacy&&window.id5Bootstrap.setPrivacy(e.privacy)}catch(t){Qt(Mu+"Error while writing privacy info into local storage.",t)}return e},Gi("userId",Vu);const Ju=Ir({moduleType:xi,moduleName:"sharedId"}),Ku="cookie",Xu="html5",Yu="_pubcid_optout",Qu="PublisherCommonId";function Zu(e,t){if(t===Ku)return Ju.getCookie(e);if(t===Xu&&Ju.hasLocalStorage()){const t=Ju.getDataFromLocalStorage(`${e}_exp`);if(!t)return Ju.getDataFromLocalStorage(e);if(new Date(t).getTime()-Date.now()>0)return Ju.getDataFromLocalStorage(e)}}function ep(e,t){return function(n,i){t?tp(t,e,(()=>{n(i()||e)}))():n(e)}}function tp(e,t="",n){if(!e)return;const i=Jn(e);i.search.id=encodeURIComponent("pubcid:"+t);const r=Kn(i);return function(){yn(r,n)}}function np(){return!!(Ju.cookiesAreEnabled()&&Zu(Yu,Ku)||Ju.hasLocalStorage()&&Zu(Yu,Xu))}var ip,rp;Gi("userId",{name:"sharedId",aliasName:"pubCommonId",gvlid:ra,decode(e,t){if(np())return void Xt("PubCommonId decode: Has opted-out");Xt(" Decoded value PubCommonId "+e);return{pubcid:e}},getId:function(e={},t,n){if(np())return void Xt("PubCommonId: Has opted-out");if(la.getCoppa())return void Xt("PubCommonId: IDs not provided for coppa requests, exiting PubCommonId");const{params:{create:i=!0,pixelUrl:r}={}}=e;let o=n;if(!o){try{"object"==typeof window[Qu]&&(o=window[Qu].getId())}catch(s){}o||(o=i&&Bn()?$t():void 0)}return{id:o,callback:ep(o,r)}},extendId:function(e={},t,n){if(np())return Xt("PubCommonId: Has opted-out"),{id:void 0};if(la.getCoppa())return void Xt("PubCommonId: IDs not provided for coppa requests, exiting PubCommonId");const{params:{extend:i=!1,pixelUrl:r}={}}=e;if(i){if(r){return{callback:tp(r,n)}}return{id:n}}},domainOverride:(ip=Ju,rp="sharedId",function(){const e=document.domain.split("."),t=`_gd${Date.now()}_${rp}`;for(let n,i,r=0;r<e.length;r++){const o=e.slice(r).join(".");if(ip.setCookie(t,"1",void 0,void 0,o),i=ip.getCookie(t),ip.setCookie(t,"","Thu, 01 Jan 1970 00:00:01 GMT",void 0,o),"1"!==i)return n;n=o}}),eids:{pubcid:{source:"pubcid.org",atype:1}}});const op="criteo",sp=Ir({moduleType:xi,moduleName:op}),ap="cto_bidid",dp="cto_bundle",lp="html5",cp="cookie",up=new Date(0).toString(),pp=new Date(On()+33696e6).toString();function mp(e,t=!1){const n=Jn(e,{noDecodeWholeURL:!0});return t?`${n.hostname}`:`${n.protocol}://${n.hostname}${n.port?":"+n.port:""}/`}function fp(e,t){var n,i;return(null==(n=null==e?void 0:e.storage)?void 0:n.type)===lp?sp.getDataFromLocalStorage(t):(null==(i=null==e?void 0:e.storage)?void 0:i.type)===cp?sp.getCookie(t):sp.getCookie(t)||sp.getDataFromLocalStorage(t)}function gp(e,t,n,i){var r,o;t&&n&&((null==(r=null==e?void 0:e.storage)?void 0:r.type)===lp?sp.setDataInLocalStorage(t,n):((null==(o=null==e?void 0:e.storage)?void 0:o.type)===cp||sp.setDataInLocalStorage(t,n),hp(t,n,pp,i,!0)))}function hp(e,t,n,i,r){const o=i.split(".");for(let a=0;a<o.length;++a){const i=o.slice(o.length-a-1,o.length).join(".");try{if(sp.setCookie(e,t,n,null,"."+i),r){const n=sp.getCookie(e);if(n&&n===t)break}}catch(s){}}}function vp(e,t,n){var i,r,o,s;const a=(void 0===(null==(i=null==e?void 0:e.storage)?void 0:i.type)||(null==(r=null==e?void 0:e.storage)?void 0:r.type)===cp)&&sp.cookiesAreEnabled(),d=(void 0===(null==(o=null==e?void 0:e.storage)?void 0:o.type)||(null==(s=null==e?void 0:e.storage)?void 0:s.type)===lp)&&sp.localStorageIsEnabled(),l=mp(na().page),c=mp(document.location.href,!0),u="undefined"!=typeof criteo_pubtag,p=function(e,t,n,i,r,o,s){let a=`https://gum.criteo.com/sid/json?origin=prebid${e?"&topUrl="+encodeURIComponent(e):""}${t?"&domain="+encodeURIComponent(t):""}${n?"&bundle="+encodeURIComponent(n):""}${i?"&info="+encodeURIComponent(i):""}${r?"&cw=1":""}${s?"&pbt=1":""}${o?"&lsw=1":""}`;const d=aa.getConsentData();d&&(a+=`&us_privacy=${encodeURIComponent(d)}`);const l=sa.getConsentData();l&&(a=a+""+(l.consentString?"&gdprString="+encodeURIComponent(l.consentString):""),a=a+"&gdpr="+(!0===l.gdprApplies?1:0));const c=da.getConsentData();return c&&(a=a+""+(c.gppString?"&gpp="+encodeURIComponent(c.gppString):""),a=a+""+(c.applicableSections?"&gpp_sid="+encodeURIComponent(c.applicableSections):"")),a}(l,c,t.bundle,t.dnaBundle,a,d,u),m={success:t=>{const i=JSON.parse(t);if(i.pixels&&i.pixels.forEach((t=>function(e,t,n){n.writeBundleInStorage&&n.bundlePropertyName&&n.storageKeyName?li(n.pixelUrl,{success:i=>{if(i){const r=JSON.parse(i);r&&r[n.bundlePropertyName]&&gp(e,n.storageKeyName,r[n.bundlePropertyName],t)}},error:e=>{Qt("criteoIdSystem: unable to sync user id",e)}},void 0,{method:"GET",withCredentials:!0}):yn(n.pixelUrl)}(e,c,t))),i.acwsUrl){("string"==typeof i.acwsUrl?[i.acwsUrl]:i.acwsUrl).forEach((e=>yn(e)))}else i.bundle&&gp(e,dp,i.bundle,c);if(i.bidId){gp(e,ap,i.bidId,c);const t={criteoId:i.bidId};n(t)}else hp(r=ap,"",up,c,!0),sp.removeDataFromLocalStorage(r),n();var r},error:e=>{Qt("criteoIdSystem: unable to sync user id",e),n()}};li(p,m,void 0,{method:"GET",contentType:"application/json",withCredentials:!0})}Gi("userId",{name:op,gvlid:91,decode:e=>e,getId(e){let t=function(e){return{bundle:fp(e,dp),dnaBundle:fp(e,"cto_dna_bundle"),bidId:fp(e,ap)}}(e);return{id:t.bidId?{criteoId:t.bidId}:void 0,callback:n=>vp(e,t,n)}},eids:{criteoId:{source:"criteo.com",atype:1}}});const bp="identityLink",yp=Ir({moduleType:xi,moduleName:bp}),wp="_lr_env";function Ip(e,t,n){const i={success:e=>{let n;if(e)try{n=JSON.parse(e)}catch(i){Xt(i)}t(n&&n.envelope?n.envelope:"")},error:e=>{Xt("identityLink: identityLink: ID fetch encountered an error",e),t()}};n.notUse3P||yp.getCookie("_lr_retry_request")||(!function(){let e=new Date;e.setTime(e.getTime()+36e5),yp.setCookie("_lr_retry_request","true",e.toUTCString())}(),Xt("identityLink: A 3P retrieval is attempted!"),Tp(!1),li(e,i,void 0,{method:"GET",withCredentials:!0}))}function Tp(e){let t=new Date;t.setTime(t.getTime()+2592e6),yp.setCookie("_lr_env_src_ats",e,t.toUTCString())}Gi("userId",{name:bp,gvlid:97,decode:e=>({idl_env:e}),getId(e,t){const n=e&&e.params||{};if(!n||"string"!=typeof n.pid)return void Qt("identityLink: requires partner id to be defined");const i=t&&"boolean"==typeof t.gdprApplies&&t.gdprApplies?1:0,r=i?t.consentString:"";if(i&&(!r||""===r))return void Xt("identityLink: Consent string is required to call envelope API.");const o=da.getConsentData(),s=!(!o||!o.gppString)&&o.gppString,a=!!(o&&o.gppString&&o.applicableSections.length>0&&-1!==o.applicableSections[0])&&o.applicableSections[0],d=s&&a,l=`https://api.rlcdn.com/api/identity/envelope?pid=${n.pid}${i?"&ct=4&cv="+r:""}${d?"&gpp="+s+"&gpp_sid="+a:""}`;let c;return c=function(e){if(window.ats&&window.ats.retrieveEnvelope)Xt("identityLink: ATS exists!"),window.ats.retrieveEnvelope((function(t){t?(Xt("identityLink: An envelope can be retrieved from ATS!"),Tp(!0),e(JSON.parse(t).envelope)):Ip(l,e,n)}));else{let t=function(){let e=yp.getCookie(wp)||yp.getDataFromLocalStorage(wp);return e?window.atob(e):void 0}();t?(Xt("identityLink: LiveRamp envelope successfully retrieved from storage!"),e(JSON.parse(t).envelope)):Ip(l,e,n)}},{callback:c}},eids:{idl_env:{source:"liveramp.com",atype:3}}});const Cp="pairId",Ap="pairId",Ep=Ir({moduleType:xi,moduleName:Cp});function Sp(e){return Ep.localStorageIsEnabled()?Ep.getDataFromLocalStorage(e):null}function xp(e){return Ep.cookiesAreEnabled()?Ep.getCookie(e):null}Gi("userId",{name:Cp,gvlid:755,decode:e=>e&&Array.isArray(e)?{pairId:e}:void 0,getId(e){const t=Sp(Ap)||xp(Ap);let n=[];if(t&&"string"==typeof t)try{n=n.concat(JSON.parse(atob(t)))}catch(r){Xt(r)}const i=e&&e.params||{};if(i&&i.liveramp){let e=i.liveramp.storageKey||"_lr_pairId";const t=Sp(e)||xp(e);if(t)try{const e=atob(t);if(e){const t=JSON.parse(e);t&&"object"==typeof t&&t.envelope?n=n.concat(t.envelope):Xt("Pairid: Parsed object is not valid or does not contain envelope")}else Xt("Pairid: Decoded value is empty")}catch(r){Xt("Pairid: Error parsing JSON: ",r)}else Xt("Pairid: liverampValue for pairId from storage is empty or null")}if(0!=n.length)return{id:n};Xt("PairId not found.")},eids:{pairId:{source:"google.com",atype:571187}}});const kp=Ir({bidderCode:"amx"}),_p=/\.com?\.\w{2,4}$/,Up=/^\s*<\??(?:vast|xml)/i,Rp="https://1x1.a-mo.net/",Op=Rp+"hbx/",Dp=Rp+"e",Bp="__amuidpb";const Pp=(e,t)=>e.concat(yt(t,`${Dr}.sizes`,[])||[]).concat(yt(t,`${Or}.sizes`,[])||[]).sort(((e,t)=>t[0]*t[1]-e[0]*e[1]))[0];function jp(e,t){return null==e?[]:e.map(t).reduce(((e,t)=>null!=t&&e.concat(t)),[])}function Np(e){return null!=(t=e.adm)&&Up.test(t)?Or:Dr;var t}const qp=(e,t)=>null==e||typeof e===t;function $p(e){const t=e.hostname.split("."),n=t.slice(t.length-(_p.test(e.hostname)?3:2)).join(".");return btoa(n).replace(/=+$/,"")}const Fp=encodeURIComponent;function Mp(){try{return kp.getDataFromLocalStorage(Bp)}catch(e){return null}}function zp(e){const t=[];return Object.keys(e||{}).forEach((n=>{t.push(Fp(n)+"="+Fp(String(e[n])))})),Fp(t.join("&"))}function Lp(e){const t={};return gn(e,(e=>{t[e.bidId]=function(e){const t=Pp(e.sizes,e.mediaTypes)||[0,0],n=e.mediaType===Or||Or in e.mediaTypes,i=n||t[1]>100,r=yt(e,"params.tagId"),o=null!=e.params&&"string"==typeof e.params.adUnitId&&""!==e.params.adUnitId?e.params.adUnitId:e.adUnitCode,s=[e.sizes,yt(e,`mediaTypes.${Dr}.sizes`,[])||[],yt(e,`mediaTypes.${Or}.sizes`,[])||[]],a=yt(e,`mediaTypes.${Or}`,{})||{},d={au:o,av:i,vd:a,vr:n,ms:s,aw:t[0],ah:t[1],tf:0,sc:e.schain||{},f:Gp(Hp(e)),rtb:e.ortb2Imp};"string"==typeof r&&r.length>0&&(d.i=r);return d}(e)})),t}const Vp=(e,t)=>yn(`${Op}g_${e}?${Hn({...t,ts:Date.now(),eid:qt()})}`),Wp=0;function Gp(e){return"number"==typeof e&&isFinite(e)&&e>0?e:Wp}function Hp(e){if(!an(e.getFloor))return yt(e,"params.floor",Wp);try{return e.getFloor({currency:"USD",mediaType:"*",size:"*",bidRequest:e}).floor}catch(t){return Qt("call to getFloor failed: ",t),Wp}}function Jp(e,t,n){return yt(e,"refererInfo."+t,n)}function Kp(e,t){if(null==e)return!1;const n=e[t];return null!=n&&(!!("*"===n.bidders||ln(n.bidders)&&-1!==n.bidders.indexOf("amx"))&&(null==n.filter||"include"===n.filter))}function Xp(){const e=lt.getConfig("userSync");if(null==e)return{d:0,l:0,t:0,e:!0};const t={d:e.syncDelay,l:e.syncsPerBidder,t:0,e:e.syncEnabled};return Kp(e.filterSettings,"all")?(t.t=0,t):(Kp(e.filterSettings,"iframe")&&(t.t|=2),Kp(e.filterSettings,"image")&&(t.t|=1),t)}function Yp(e){var t,n;return null!=(null==e?void 0:e.gppConsent)?e.gppConsent:(null==(n=null==(t=null==e?void 0:e.ortb2)?void 0:t.regs)?void 0:n.gpp)??{gppString:"",applicableSections:""}}function Qp(e){if(null==e.refererInfo)return{r:"",t:!1,c:"",l:0,s:[]};const t=e.refererInfo;return{r:t.topmostLocation,t:t.reachedTop,l:t.numIframes,s:t.stack,c:t.canonicalUrl}}function Zp(e){return!(null==e?void 0:e.gdprApplies)||!0===yt(e,"vendorData.purpose.consents.1")}zs({code:"amx",gvlid:737,supportedMediaTypes:[Dr,Or],isBidRequestValid:e=>qp(yt(e,"params.endpoint",null),"string")&&qp(yt(e,"params.tagId",null),"string"),buildRequests(e,t){const n=Jn((null==(i=t.refererInfo)?void 0:i.topmostLocation)||window.location.href);var i;const r=yt(e[0],"params.tagId",null),o=yt(e[0],"params.testMode",0),s=null!=e[0]?e[0]:{bidderRequestsCount:0,bidderWinsCount:0,bidRequestsCount:0};var a,d;return{data:{a:$t(),B:0,b:n.host,brc:s.bidderRequestsCount||0,bwc:s.bidderWinsCount||0,trc:s.bidRequestsCount||0,tm:(d=o,!0===d||1===d||"true"===d),V:"9.10.0",vg:"slmpbjs",i:o&&null!=r?r:$p(n),l:{},f:.01,cv:"pba1.3.4",st:"prebid",h:screen.height,w:screen.width,gs:yt(t,"gdprConsent.gdprApplies",""),gc:yt(t,"gdprConsent.consentString",""),gpp:Yp(t),u:Jp(t,"page",n.href),do:Jp(t,"site",n.hostname),re:Jp(t,"ref"),am:Mp(),usp:t.uspConsent||"1---",smt:1,d:"",m:Lp(e),cpp:lt.getConfig("coppa")?1:0,fpd2:t.ortb2,tmax:t.timeout,amp:Jp(t,"isAmp",null),ri:Qp(t),sync:Xp(),eids:(a=e.reduce(((e,t)=>(null==t||null==t.userIdAsEids||gn(t.userIdAsEids,(t=>{null!=t&&(e[t.source]=t)})),e)),{}),null!=Object.values?Object.values(a):Object.keys(a).map((e=>a[e])))},method:"POST",browsingTopics:!0,url:yt(e[0],"params.endpoint","https://prebid.a-mo.net/a/c"),withCredentials:!0}},getUserSyncs(e,t,n,i,r){const o={url:`https://prebid.a-mo.net/isyn?${Hn({gdpr_consent:Fp((null==n?void 0:n.consentString)||""),gdpr:Fp((null==n?void 0:n.gdprApplies)?1:0),us_privacy:Fp(i||""),gpp:Fp((null==r?void 0:r.gppString)||""),gpp_sid:Fp((null==r?void 0:r.applicableSections)||"")})}`,type:"iframe"};if(null==t||0===t.length)return e.iframeEnabled?[o]:[];const s=[];let a=!1;return gn(t,(function({body:t}){null!=t&&null!=t.p&&t.p.hreq&&gn(t.p.hreq,(function(t){const n=-1!==t.indexOf("__st=iframe")?"iframe":"image";(e.iframeEnabled||"image"===n)&&(a=a||"iframe"===n||-1!==t.indexOf("cchain"),s.push({url:t,type:n}))}))})),!a&&s.length<2&&s.push(o),s},interpretResponse(e,t){const n=e.body;if(null==n||"string"==typeof n)return[];n.am&&"string"==typeof n.am&&function(e){try{kp.setDataInLocalStorage(Bp,e)}catch(t){}}(n.am);const i=lt.getConfig("bidderSettings"),r=!!((null==i?void 0:i.amx)??(null==i?void 0:i.standard)??{}).allowAlternateBidderCodes;return jp(Object.keys(n.r),(e=>jp(n.r[e],(n=>n.b.map((n=>{const i=Np(n),o=n.adm;if(null==o)return null;const s=function(e,t,n){if(null!=e.w&&e.w>1&&null!=e.h&&e.h>1)return[e.w,e.h];const i=t.m[n];return null==i?[0,0]:[i.aw,i.ah]}(n,t.data,e),a=i===Dr?240:300,{bc:d,ds:l}=n.ext??{};return{...null!=d&&r?{bidderCode:d}:{},requestId:e,cpm:n.price,width:s[0],height:s[1],creativeId:n.crid,currency:"USD",netRevenue:!0,[i===Or?"vastXml":"ad"]:o,meta:{advertiserDomains:n.adomain,mediaType:i,...null!=l?{demandSource:l}:{}},mediaType:i,ttl:"number"==typeof n.exp?n.exp:a}})))).filter((e=>null!=e))))},onSetTargeting(e){null!=e&&Vp("pbst",{A:e.bidder,w:e.width,h:e.height,bid:e.adId,c1:e.mediaType,np:e.cpm,aud:e.requestId,a:e.adUnitCode,c2:zp(e.adserverTargeting),cn3:e.timeToRespond})},onTimeout(e){if(null==e||!e.length)return;let t=null;const n=e.map((e=>{const n=e.params||{},i=function(e){return null==e.sizes||0===e.sizes.length?[0,0]:e.sizes[0]}(e),{domain:r,page:o,ref:s}=null!=e.ortb2&&null!=e.ortb2.site?e.ortb2.site:{};return null==t&&(t={do:r,u:o,U:Mp(),re:s,V:"9.10.0",vg:"slmpbjs"}),{A:e.bidder,mid:n.tagId,a:n.adunitId||e.adUnitCode,bid:e.bidId,n:"g_pbto",aud:e.transactionId,w:i[0],h:i[1],cn:e.timeout,cn2:e.bidderRequestsCount,cn3:e.bidderWinsCount}})),i=JSON.stringify({c:t,e:n});ci(Dp,{body:i,keepalive:!0,withCredentials:!0,method:"POST"}).catch((e=>{}))},onBidWon(e){null!=e&&Vp("pbwin",{A:e.bidder,w:e.width,h:e.height,bid:e.adId,C:e.mediaType===Dr?0:1,np:e.cpm,a:e.adUnitCode})}});const em=new WeakMap;const tm={1:Dr,2:Or,4:Rr};const nm={[Ma]:{fpd:{priority:99,fn(e,t){Yn(e,t.ortb2)}},onlyOneClient:{priority:-99,fn:rd("ORTB request")},props:{fn(e,t){Object.assign(e,{id:e.id||$t(),test:e.test||0});const n=parseInt(t.timeout,10);isNaN(n)||(e.tmax=n)}}},[za]:{fpd:{priority:99,fn(e,t){Yn(e,t.ortb2Imp)}},id:{fn(e,t){e.id=t.bidId}},banner:{fn:function(e,t,n){if(n.mediaType&&n.mediaType!==Dr)return;const i=yt(t,"mediaTypes.banner");if(i){const t={topframe:!0===kn()?0:1};i.sizes&&(t.format=Ft(i.sizes).map(Lt)),i.hasOwnProperty("pos")&&(t.pos=i.pos),e.banner=Yn(t,e.banner)}}},pbadslot:{fn(e){var t,n,i,r;const o=null==(n=null==(t=e.ext)?void 0:t.data)?void 0:n.pbadslot;o&&"string"==typeof o||null==(r=null==(i=e.ext)?void 0:i.data)||delete r.pbadslot}}},[La]:{mediaType:{priority:99,fn:function(e,t,n){if(e.mediaType)return;const i=n.mediaType;if(!i&&!tm.hasOwnProperty(t.mtype))throw new Error("Cannot determine mediaType for response");e.mediaType=i||tm[t.mtype]}},banner:{fn:function({createPixel:e=e=>function(e,t=encodeURI){if(!e)return"";let n='<div style="position:absolute;left:0px;top:0px;visibility:hidden;">';return n+='<img src="'+t(e)+'"></div>',n}(decodeURIComponent(e),In)}={}){return function(t,n){t.mediaType===Dr&&(n.adm&&n.nurl?(t.ad=n.adm,t.ad+=e(n.nurl)):n.adm?t.ad=n.adm:n.nurl&&(t.adUrl=n.nurl))}}()},props:{fn(e,t,n){var i,r;Object.entries({requestId:null==(i=n.bidRequest)?void 0:i.bidId,seatBidId:t.id,cpm:t.price,currency:n.ortbResponse.cur||n.currency,width:t.w,height:t.h,dealId:t.dealid,creative_id:t.crid,creativeId:t.crid,burl:t.burl,ttl:t.exp||n.ttl,netRevenue:n.netRevenue}).filter((([e,t])=>void 0!==t)).forEach((([t,n])=>e[t]=n)),e.meta||(e.meta={}),t.adomain&&(e.meta.advertiserDomains=t.adomain),(null==(r=t.ext)?void 0:r.dsa)&&(e.meta.dsa=t.ext.dsa)}}}};function im(...e){const t=e.shift(),n=e.length>1?im(...e):e[0];return Object.fromEntries(Fa.map((e=>[e,Object.assign({},t[e],n[e])])))}function rm({context:e={},processors:t=om,overrides:n={},imp:i,request:r,bidResponse:o,response:s}={}){const a=new WeakMap;function d(e,i,r,o){let s;return function(){return null==s&&(s=function(){let s=r.bind(this,function(e,t={}){if(!em.has(e)){const t=Object.entries(e);t.sort(((e,t)=>(e=e[1].priority||0)===(t=t[1].priority||0)?0:e>t?-1:1)),em.set(e,t.map((([e,t])=>[e,t.fn])))}const n=em.get(e).filter((([e])=>!t.hasOwnProperty(e)||t[e])).map((function([e,n]){return t.hasOwnProperty(e)?t[e].bind(this,n):n}));return function(){const e=Array.from(arguments);n.forEach((t=>{t.apply(this,e)}))}}(t()[e]||{},n[e]||{}));return i&&(s=i.bind(this,s)),function(){try{return s.apply(this,arguments)}catch(e){o.call(this,e,...arguments)}}}()),s.apply(this,arguments)}}const l=d(za,i,(function(e,t,n){const i={};return e(i,t,n),i}),(function(e,t,n){Qt("Error while converting bidRequest to ORTB imp; request skipped.",{error:e,bidRequest:t,context:n})})),c=d(Ma,r,(function(e,t,n,i){const r={imp:t};return e(r,n,i),r}),(function(e,t,n,i){throw Qt("Error while converting to ORTB request",{error:e,imps:t,bidderRequest:n,context:i}),e})),u=d(La,o,(function(e,t,n){const i={};return e(i,t,n),i}),(function(e,t,n){Qt("Error while converting ORTB seatbid.bid to bidResponse; bid skipped.",{error:e,bid:t,context:n})})),p=d(Va,s,(function(e,t,n,i){const r={bids:t};return e(r,n,i),r}),(function(e,t,n,i){throw Qt("Error while converting from ORTB response",{error:e,bidResponses:t,ortbResponse:n,context:i}),e}));return{toORTB({bidderRequest:t,bidRequests:n,context:i={}}){n=n||t.bids;const r={req:Object.assign({bidRequests:n},e,i),imp:{}};r.req.impContext=r.imp;const o=n.map((n=>{const o=Object.assign({bidderRequest:t,reqContext:r.req},e,i),s=l(n,o);if(null!=s){if(s.hasOwnProperty("id"))return Object.assign(o,{bidRequest:n,imp:s}),r.imp[s.id]=o,s;Qt("Converted ORTB imp does not specify an id, ignoring bid request",n,s)}})).filter(Boolean),s=c(o,t,r.req);return r.req.bidderRequest=t,null!=s&&a.set(s,r),s},fromORTB({request:e,response:t}){const n=a.get(e);if(null==n)throw new Error("ortbRequest passed to `fromORTB` must be the same object returned by `toORTB`");function i(t,n={}){return Object.assign(t,{ortbRequest:e},n)}const r=Object.fromEntries((e.imp||[]).map((e=>[e.id,e]))),o=(t.seatbid||[]).flatMap((e=>(e.bid||[]).map((o=>{if(r.hasOwnProperty(o.impid)&&n.imp.hasOwnProperty(o.impid))return u(o,i(n.imp[o.impid],{imp:r[o.impid],seatbid:e,ortbResponse:t}));Qt("ORTB response seatbid[].bid[].impid does not match any imp in request; ignoring bid",o)})))).filter(Boolean);return p(o,t,i(n.req))}}}nm[za].native={fn:function(e,t,n){var i;if(n.mediaType&&n.mediaType!==Rr)return;let r=t.nativeOrtbRequest;r&&(r=Object.assign({},n.nativeRequest,r),(null==(i=r.assets)?void 0:i.length)?e.native=Yn({},{request:JSON.stringify(r),ver:r.ver},e.native):Yt("mediaTypes.native is set, but no assets were specified. Native request skipped.",t))}},nm[La].native={fn:function(e,t){if(e.mediaType===Rr){let n;if(n="string"==typeof t.adm?JSON.parse(t.adm):t.adm,!un(n)||!Array.isArray(n.assets))throw new Error("ORTB native response contained no assets");e.native={ortb:n}}}},nm[za].video={fn:function(e,t,n){if(n.mediaType&&n.mediaType!==Or)return;const i=yt(t,"mediaTypes.video");if(!mn(i)){const t=Object.fromEntries(Object.entries(i).filter((([e])=>kr.has(e))));if(i.playerSize){const e=Ft(i.playerSize).map(Lt);e.length>1&&Yt("video request specifies more than one playerSize; all but the first will be ignored"),Object.assign(t,e[0])}e.video=Yn(t,e.video)}}},nm[La].video={fn:function(e,t,n){e.mediaType===Or&&(yt(n.imp,"video.w")&&yt(n.imp,"video.h")&&([e.playerWidth,e.playerHeight]=[n.imp.video.w,n.imp.video.h]),t.adm&&(e.vastXml=t.adm),t.nurl&&(e.vastUrl=t.nurl))}};const om=ei((()=>im(nm,Ka(Wa))));const sm=Object.freeze([...["device.sua","source.schain","regs.gdpr","regs.us_privacy","regs.gpp","regs.gpp_sid","user.consent","user.eids"].map((e=>function(e,t=(e,t)=>`${e}.ext.${t}`){const[n,i]=function(e){const t=e.split(".");return[t.slice(0,t.length-1).join("."),t[t.length-1]]}(e);return t=t(n,i),e=>{const r=yt(e,n);if(null!=(null==r?void 0:r[i]))return wt(e,t,r[i]),()=>delete r[i]}}(e))),...["app","content","site","user"].map((function(e){return t=>{var n;const i=null==(n=t[e])?void 0:n.kwarray;if(null!=i){let n=(t[e].keywords||"").split(",");return Array.isArray(i)&&n.push(...i),t[e].keywords=n.join(","),()=>delete t[e].kwarray}}}))]);const am="criteo",dm="https://grid-bidder.criteo.com/openrtb_2_5/pbjs/auction/request",lm=Ir({bidderCode:am}),cm="Criteo: ",um=function(e=!0,t=sm){return function(n){return t.forEach((t=>{try{const i=t(n);"function"==typeof i&&e&&i()}catch(i){Qt("Error translating request to ORTB 2.5",i)}})),n}}(),pm="https://static.criteo.net/js/ld/publishertag.renderer.js",mm="cto_optout",fm="cto_bundle",gm=rm({context:{netRevenue:!0,ttl:60},imp:function(e,t,n){var i;let r=e(t,n);const o=t.params;r.tagid=t.adUnitCode,wt(r,"ext",{...t.params.ext,...r.ext,rwdd:r.rwdd,floors:Tm(t),bidder:{publishersubid:null==o?void 0:o.publisherSubId,zoneid:null==o?void 0:o.zoneId,uid:null==o?void 0:o.uid}}),delete r.rwdd,!n.fledgeEnabled&&(null==(i=r.ext.igs)?void 0:i.ae)&&delete r.ext.igs.ae;if(Im(t)){const e=t.params.video;void 0!==e&&wt(r,"video",{...r.video,skip:r.video.skip||e.skip||0,placement:r.video.placement||e.placement,minduration:r.video.minduration||e.minduration,playbackmethod:r.video.playbackmethod||e.playbackmethod,startdelay:r.video.startdelay||e.startdelay||0}),wt(r,"video.ext",{context:t.mediaTypes.video.context,playersizes:ym(yt(t,"mediaTypes.video.playerSize"),wm),plcmt:t.mediaTypes.video.plcmt,poddur:t.mediaTypes.video.adPodDurationSec,rqddurs:t.mediaTypes.video.durationRangeSec})}if(r.native&&void 0!==r.native.request){let e=JSON.parse(r.native.request);e.assets&&(1!==e.assets.length||Object.keys(e.assets[0]).length)||delete e.assets,wt(r,"native.request_native",e),delete r.native.request}return r},request:function(e,t,n,i){let r=e(t,n,i);void 0!==i.publisherId&&(void 0!==r.app?wt(r,"app.publisher.id",i.publisherId):wt(r,"site.publisher.id",i.publisherId));n&&n.gdprConsent&&wt(r,"regs.ext.gdprversion",n.gdprConsent.apiVersion);return r=um(r),r},bidResponse:function(e,t,n){var i;n.mediaType=yt(t,"ext.mediatype"),n.mediaType===Rr&&void 0!==t.adm_native&&(t.adm=t.adm_native,delete t.adm_native);let r=e(t,n);const{bidRequest:o}=n;r.currency=yt(t,"ext.cur"),void 0!==yt(t,"ext.meta")&&wt(r,"meta",{...r.meta,...t.ext.meta});void 0!==yt(t,"ext.paf.content_id")&&wt(r,"meta.paf.content_id",t.ext.paf.content_id);r.mediaType===Or&&(r.vastUrl=null==(i=t.ext)?void 0:i.displayurl,yt(o,"mediaTypes.video.context")===Sr&&(r.renderer=function(e){var t,n;if(void 0===(null==(t=e.ext)?void 0:t.videoPlayerConfig)||void 0===(null==(n=e.ext)?void 0:n.videoPlayerType))return;const i={documentResolver:(e,t,n)=>n??t},r=(t,n)=>{var i;let r={slotid:e.id,vastUrl:null==(i=e.ext)?void 0:i.displayurl,vastXml:e.adm,documentContext:n},o=e.ext.videoPlayerConfig;window.CriteoOutStream[e.ext.videoPlayerType].play(r,o)},o=Ci.install({url:pm,config:i});return o.setRender(r),o}(t)));return r},response:function(e,t,n,i){let r=e(t,n,i);const o=yt(n,"ext.paf.transmission");return r.bids.forEach((e=>{void 0!==o&&void 0!==yt(e,"meta.paf.content_id")?wt(e,"meta.paf.transmission",o):delete e.meta.paf})),r}});function hm(e){const t=lm.getCookie(e),n=lm.getDataFromLocalStorage(e);return t||n||void 0}function vm(e,t,n){const i=new Date;i.setTime(i.getTime()+60*n*60*1e3);const r=`expires=${i.toUTCString()}`;lm.setCookie(e,t,r),lm.setDataInLocalStorage(e,t)}function bm(e){lm.setCookie(e,"",0),lm.removeDataFromLocalStorage(e)}function ym(e,t=e=>e){return null==e?[]:Array.isArray(e[0])?e.map((e=>t(e))):[t(e)]}function wm(e){return e[0]+"x"+e[1]}function Im(e){return void 0!==yt(e,"mediaTypes.video")}function Tm(e){var t,n,i;try{const r={},o=function(e){if(e.getFloor)return e.getFloor;if(e.params.bidFloor&&e.params.bidFloorCur)try{const t=parseFloat(e.params.bidFloor);return()=>({currency:e.params.bidFloorCur,floor:t})}catch{}}(e);if(o){if(null==(t=e.mediaTypes)?void 0:t.banner){r.banner={};ym(yt(e,"mediaTypes.banner.sizes")).forEach((t=>r.banner[wm(t).toString()]=o.call(e,{size:t,mediaType:Dr})))}if(null==(n=e.mediaTypes)?void 0:n.video){r.video={};ym(yt(e,"mediaTypes.video.playerSize")).forEach((t=>r.video[wm(t).toString()]=o.call(e,{size:t,mediaType:Or})))}return(null==(i=e.mediaTypes)?void 0:i.native)&&(r.native={},r.native["*"]=o.call(e,{size:"*",mediaType:Rr})),r}}catch(r){Qt("Could not parse floors from Prebid: "+r)}}zs({code:am,gvlid:91,supportedMediaTypes:[Dr,Or,Rr],getUserSyncs:function(e,t,n,i,r={}){let{gppString:o="",applicableSections:s=[]}=r;const a=na(),d="criteoPrebidAdapter";if(e.iframeEnabled&&Zp(n)){const e=[];if(e.push(`origin=${d}`),e.push(`topUrl=${a.domain}`),n&&(n.gdprApplies&&e.push("gdpr="+(1==n.gdprApplies?1:0)),n.consentString&&e.push(`gdpr_consent=${n.consentString}`)),i&&e.push(`us_privacy=${i}`),e.push(`gpp=${o}`),Array.isArray(s))for(const n of s)e.push(`gpp_sid=${n}`);const t=Math.random().toString(),r={bundle:hm(fm),cw:lm.cookiesAreEnabled(),lsw:lm.localStorageIsEnabled(),optoutCookie:hm(mm),origin:d,requestId:t,tld:a.domain,topUrl:a.domain,version:"9.10.0".replace(/\./g,"_")};window.addEventListener("message",(function e(n){if(!n.data||"https://gum.criteo.com"!=n.origin)return;if(n.data.requestId!==t)return;this.removeEventListener("message",e),n.stopImmediatePropagation();const i=n.data;i.optout?(bm(fm),vm(mm,!0,43200)):i.bundle&&vm(fm,i.bundle,9360)}),!0);const l=JSON.stringify(r).replace(/"/g,"%22");return[{type:"iframe",url:`https://gum.criteo.com/syncframe?${e.join("&")}#${l}`}]}if(e.pixelEnabled&&Zp(n)){const e=[];if(e.push("profile=207"),n&&(!0===n.gdprApplies&&e.push("gdprapplies=true"),n.consentString&&e.push(`gdpr=${n.consentString}`)),i&&e.push(`ccpa=${i}`),e.push(`gpp=${o}`),Array.isArray(s))for(const t of s)e.push(`gpp_sid=${t}`);return[{type:"image",url:`https://ssp-sync.criteo.com/user-sync/redirect?${e.join("&")}`}]}return[]},isBidRequestValid:e=>!(!e||!e.params||!e.params.zoneId&&!e.params.networkId)&&!(Im(e)&&!function(e){let t=!0;return["mimes","playerSize","maxduration","protocols","api","skip","placement","playbackmethod"].forEach((function(n){"placement"===n?void 0===yt(e,"mediaTypes.video."+n)&&void 0===yt(e,"params.video."+n)&&void 0===yt(e,"mediaTypes.video.plcmt")&&void 0===yt(e,"params.video.plcmt")&&(t=!1,Qt("Criteo Bid Adapter: mediaTypes.video."+n+" or mediaTypes.video.plcmt is required")):void 0===yt(e,"mediaTypes.video."+n)&&void 0===yt(e,"params.video."+n)&&(t=!1,Qt("Criteo Bid Adapter: mediaTypes.video."+n+" is required"))})),t}(e)),buildRequests:(e,t)=>{e.forEach((e=>{(function(e){return void 0!==yt(e,"mediaTypes.native")})(e)&&(function(e){return!(e.nativeParams&&(e.nativeParams.image&&(!0!==e.nativeParams.image.sendId||!0===e.nativeParams.image.sendTargetingKeys)||e.nativeParams.icon&&(!0!==e.nativeParams.icon.sendId||!0===e.nativeParams.icon.sendTargetingKeys)||e.nativeParams.clickUrl&&(!0!==e.nativeParams.clickUrl.sendId||!0===e.nativeParams.clickUrl.sendTargetingKeys)||e.nativeParams.displayUrl&&(!0!==e.nativeParams.displayUrl.sendId||!0===e.nativeParams.displayUrl.sendTargetingKeys)||e.nativeParams.privacyLink&&(!0!==e.nativeParams.privacyLink.sendId||!0===e.nativeParams.privacyLink.sendTargetingKeys)||e.nativeParams.privacyIcon&&(!0!==e.nativeParams.privacyIcon.sendId||!0===e.nativeParams.privacyIcon.sendTargetingKeys)))}(e)||Yt(cm+"all native assets containing URL should be sent as placeholders with sendId(icon, image, clickUrl, displayUrl, privacyLink, privacyIcon)"),null==yt(e,"nativeOrtbRequest.assets")&&(Yt(cm+"native asset requirements are missing"),wt(e,"nativeOrtbRequest.assets",[{}])))}));const n=function(e,t){var n,i,r,o,s;const a=Jn(null==(n=null==t?void 0:t.refererInfo)?void 0:n.topmostLocation).search;return{url:(null==(i=null==t?void 0:t.refererInfo)?void 0:i.page)||"",debug:"1"===a.pbt_debug,noLog:"1"===a.pbt_nolog,fledgeEnabled:null==(r=t.paapi)?void 0:r.enabled,amp:e.some((e=>"amp"===e.params.integrationMode)),networkId:null==(o=e.find((e=>{var t;return null==(t=e.params)?void 0:t.networkId})))?void 0:o.params.networkId,publisherId:null==(s=e.find((e=>{var t;return null==(t=e.params)?void 0:t.pubid})))?void 0:s.params.pubid}}(e,t),i=function(e){let t=dm;t+="?profileId=207",t+="&av="+String(37),t+="&wv="+encodeURIComponent("9.10.0"),t+="&cb="+String(Math.floor(99999999999*Math.random())),lm.localStorageIsEnabled()?t+="&lsavail=1":t+="&lsavail=0";e.amp&&(t+="&im=1");e.debug&&(t+="&debug=1");e.noLog&&(t+="&nolog=1");const n=hm(fm);n&&(t+=`&bundle=${n}`);hm(mm)&&(t+="&optout=1");e.networkId&&(t+="&networkId="+e.networkId);return t}(n),r=gm.toORTB({bidderRequest:t,bidRequests:e,context:n});if(r)return{method:"POST",url:i,data:r,bidRequests:e}},interpretResponse:(e,t)=>{var n;if(void 0===(null==e?void 0:e.body))return[];const i=gm.fromORTB({response:e.body,request:t.data}).bids||[],r=null==(n=yt(e.body,"ext.igi"))?void 0:n.filter((e=>ln(null==e?void 0:e.igs))).flatMap((e=>e.igs));return(null==r?void 0:r.length)?{bids:i,paapi:r}:i},onDataDeletionRequest:e=>{const t=hm(fm);t&&(bm(fm),li("https://privacy.criteo.com/api/privacy/datadeletionrequest",null,JSON.stringify({publisherUserId:t}),{contentType:"application/json",method:"POST"}))}});const Cm="medianet",Am="trustedstack",Em="https://prebid.media.net/video/bundle.js",Sm={NOT_DETERMINED:0,ABOVE_THE_FOLD:1,BELOW_THE_FOLD:2},xm="client_timeout",km="client_bid_won",_m="client_set_targeting",Um="client_bidder_error";let Rm;window.mnet=window.mnet||{},window.mnet.queue=window.mnet.queue||[];const Om=[{code:Am,gvlid:1288}];function Dm(){try{return window.top.document.referrer}catch(e){return document.referrer}}function Bm(e,t){const n=t.refererInfo;let i={domain:(e=e||{}).domain||n.domain,page:e.page||n.page,ref:e.ref||Dm(),topMostLocation:n.topmostLocation,isTop:e.isTop||n.reachedTop};return Object.assign(i,function(){if(Rm)return Rm;let e=Pm('link[rel="canonical"]',"href"),t=Pm('meta[property="og:url"]',"content"),n=Pm('meta[name="twitter:url"]',"content");return Rm=Object.assign({},e&&{canonical_url:e},t&&{og_url:t},n&&{twitter_url:n}),Rm}())}function Pm(e,t){let n=function(e,t){try{let n=Wt().document.querySelector(e);if(null!==n&&n[t])return n[t]}catch(n){}}(e,t);return n&&function(e){let t=Wt().document.createElement("a");return t.href=e,t.href}(n)}function jm(e,t){return e.filter((e=>e.type===t))}function Nm(e){return{w:parseInt(e[0],10),h:parseInt(e[1],10)}}function qm(e,t){const n=yt(e,"params"),i=yt(t,"gdprConsent"),r=yt(t,"uspConsent"),o=yt(e,"userId"),s=yt(e,"schain")||{},a=Hm.getWindowSize(),d=!(!i||!i.gdprApplies),l=!!r,c=!!lt.getConfig("coppa");return Object.assign({},{customer_id:n.cid},{prebid_version:"v9.10.0"},{gdpr_applies:d},d&&{gdpr_consent_string:i.consentString||""},{usp_applies:l},l&&{usp_consent_string:r||""},{coppa_applies:c},-1!==a.w&&-1!==a.h&&{screen:a},o&&{user_id:o},bt().medianetGlobals.analyticsEnabled&&{analytics:!0},!mn(s)&&{schain:s})}function $m(e,t){var n,i,r,o,s;let a={id:e.bidId,transactionId:null==(i=null==(n=e.ortb2Imp)?void 0:n.ext)?void 0:i.tid,ext:{dfp_id:e.adUnitCode,display_count:e.bidRequestsCount},all:e.params};e.ortb2Imp&&(a.ortb2Imp=e.ortb2Imp);let d=yt(e,"mediaTypes.banner.sizes")||[];const l=yt(e,"mediaTypes.video")||{},c=yt(e,"params.video")||{},u=Object.assign({},c,l);var p;if(mn(u)||(a.video=u),d.length>0&&(a.banner=ln(p=d)&&2===p.length&&!ln(p[0])?[Nm(p)]:p.map((e=>Nm(e)))),e.nativeParams)try{a.native=JSON.stringify(e.nativeParams)}catch(h){Qt(`${Cm} : Incorrect JSON : bidRequest.nativeParams`)}e.params.crid&&(a.tagid=e.params.crid.toString());let m=parseFloat(e.params.bidfloor||e.params.bidFloor);m&&(a.bidfloor=m);const f=function(e){let t=document.getElementById(e);if(!t&&-1!==e.indexOf("/")){const{divId:n}=cl(e);dn(n)&&(t=document.getElementById(n))}if(t&&t.getBoundingClientRect){const e=t.getBoundingClientRect();let n={};return n.top_left={y:e.top,x:e.left},n.bottom_right={y:e.bottom,x:e.right},n}return null}(e.adUnitCode);if(f&&a.banner&&0!==a.banner.length){let e=function(e){return{top_left:{x:e.top_left.x+window.pageXOffset,y:e.top_left.y+window.pageYOffset},bottom_right:{x:e.bottom_right.x+window.pageXOffset,y:e.bottom_right.y+window.pageYOffset}}}(f);a.ext.coordinates=e,a.ext.viewability=zm(f.top_left,Mm(a.banner)),zm(e.top_left,Mm(a.banner))>.5?a.ext.visibility=Sm.ABOVE_THE_FOLD:a.ext.visibility=Sm.BELOW_THE_FOLD}else a.ext.visibility=Sm.NOT_DETERMINED;const g=function(e){let t=[];"function"==typeof e.getFloor&&[Dr,Or,Rr].forEach((n=>{e.mediaTypes.hasOwnProperty(n)&&(n==Dr?e.mediaTypes.banner.sizes.forEach((i=>{Fm(e,n,i,t)})):Fm(e,n,"*",t))}));return t}(e);return g&&g.length>0&&(a.bidfloors=g),(null==(r=t.paapi)?void 0:r.enabled)&&(a.ext.ae=null==(s=null==(o=null==e?void 0:e.ortb2Imp)?void 0:o.ext)?void 0:s.ae),a}function Fm(e,t,n,i){let r=e.getFloor({currency:"USD",mediaType:t,size:n});n.length>1&&(r.size=n),r.mediaType=t,i.push(r)}function Mm(e){return e.reduce(((e,t)=>t.h*t.w<e.h*e.w?t:e))}function zm(e,t){let n=t.w*t.h,i=Hm.getWindowSize(),r={x:e.x+t.w,y:e.y+t.h};return 0===n||-1===i.w||-1===i.h?0:function(e,t,n,i){if(e.x>i.x||t.x<n.x||e.y>i.y||t.y<n.y)return 0;return(Math.min(t.x,i.x)-Math.max(e.x,n.x))*(Math.min(t.y,i.y)-Math.max(e.y,n.y))}(e,r,{x:0,y:0},{x:i.w,y:i.h})/n}function Lm(e,t){const n=xn(e),i=yt(t,"0.userIdAsEids");return i&&wt(n,"user.ext.eids",i),n}function Vm(e,t){const n={};return ln(t)||(t=[]),t.forEach((e=>{let t=function(e){const t={};t.acid=e.auctionId||"",t.crid=yt(e,"params.crid")||yt(e,"params.0.crid")||e.adUnitCode||"",t.ext=Zn(e.ext)||"";const n=xn(e);return delete n.ad,delete n.vastXml,t.rawobj=Zn(n),t}(e);Object.keys(t).forEach((e=>{n[e]=n[e]||[],n[e].push(encodeURIComponent(t[e]))}))})),Object.assign({},function(e){const t={},n=na();return t.logid="kfk",t.evtid="projectevents",t.project="prebid",t.pbver="9.10.0",t.cid=bt().medianetGlobals.cid||"",t.dn=encodeURIComponent(n.domain||""),t.requrl=encodeURIComponent(n.page||""),t.event=e.name||"",t.value=e.value||"",t.rd=e.related_data||"",t}(e),n)}function Wm(e,t){const n=Vm(e,t);var i,r;i="https://navvy.media.net/log",r=Hn(n),li(i,{success:()=>{},error:()=>{}},r,{method:"POST",keepalive:!0})}function Gm(e){const t=yt(e,"context")||"",n=yt(e,"vto");"outstream"==t&&n&&(e.renderer=function(){const e=Ci.install({url:Em});return e.setRender((function(e){window.mnet.queue.push((function(){const t={width:e.width,height:e.height,vastTimeout:e.vto,maxAllowedVastTagRedirects:e.mavtr,allowVpaid:e.avp,autoPlay:e.ap,preload:e.pl,mute:e.mt},n=e.dfp_id,i=cl(n).divId||n;window.mnet.mediaNetoutstreamPlayer(e,i,t)}))})),e}())}bt().medianetGlobals=bt().medianetGlobals||{};const Hm={code:Cm,gvlid:142,aliases:Om,supportedMediaTypes:[Dr,Rr,Or],isBidRequestValid:function(e){return e.params?e.params.cid&&dn(e.params.cid)&&!fn(e.params.cid)?(Object.assign(bt().medianetGlobals,!bt().medianetGlobals.cid&&{cid:e.params.cid}),!0):(Qt(`${Cm} : cid should be a string`),!1):(Qt(`${Cm} : Missing bid parameters`),!1)},buildRequests:function(e,t){let n=function(e,t){return{site:Bm(e[0].params.site,t),ext:qm(e[0],t),id:e[0].auctionId,imp:e.map((e=>$m(e,t))),ortb2:Lm(t.ortb2,e),tmax:t.timeout}}(e=Ds(e),t);return{method:"POST",url:(i=t.bidderCode,r=n.ext.customer_id,(i===Am?"https://prebid.trustedstack.com/rtb/trustedstack":"https://prebid.media.net/rtb/prebid")+"?cid="+encodeURIComponent(r)),data:JSON.stringify(n)};var i,r},interpretResponse:function(e,t){let n=[];if(!e||!e.body)return Xt(`${Cm} : response is empty`),n;let i=e.body.bidList;ln(i)&&0!==i.length?(n=i.filter((e=>function(e){return!1===e.no_bid&&parseFloat(e.cpm)>0}(e))),n.forEach(Gm)):Xt(`${Cm} : no bids`);const r=yt(e,"body.ext.paApiAuctionConfigs")||[],o=yt(e,"body.ext.igi")||[];return 0===r.length&&0===o.length?n:(o.length>0&&r.push(...o.map((({igs:e})=>e||[])).flat()),{bids:n,paapi:r})},getUserSyncs:function(e,t){let n=!mn(i=t)&&i[0].body&&i[0].body.ext&&ln(i[0].body.ext.csUrl)?i[0].body.ext.csUrl:[];var i;return e.iframeEnabled?jm(n,"iframe"):e.pixelEnabled?jm(n,"image"):void 0},onTimeout:e=>{try{Wm({name:xm,value:e.length,related_data:e[0].timeout||lt.getConfig("bidderTimeout")},e)}catch(t){}},onBidWon:e=>{try{Wm({name:km,value:e.cpm},[e])}catch(t){}},onSetTargeting:e=>{try{let t={name:_m,value:e.cpm};lt.getConfig("enableSendAllBids")||Wm(t,[e])}catch(t){}},onBidderError:({error:e,bidderRequest:t})=>{try{Wm({name:Um,related_data:`timedOut:${e.timedOut}|status:${e.status}|message:${e.reason.message}`},t.bids)}catch(n){}},clearPageMeta:function(){Rm=void 0},getWindowSize:function(){return{w:window.screen.width||-1,h:window.screen.height||-1}}};zs(Hm);const Jm="https://onetag-sys.com/usync/",Km="onetag",Xm=Ir({bidderCode:Km});function Ym(e){return void 0!==e.mediaTypes&&void 0!==e.mediaTypes.video}function Qm(e,t){if(e===Dr)return sf(t).length>0;if(e===Or&&Ym(t)){const e=t.mediaTypes.video.context;if("outstream"===e||"instream"===e)return of(t).length>0}return!1}function Zm(e){try{return void 0!==e.document.hidden?e.document.hidden:void 0!==e.document.msHidden?e.document.msHidden:void 0!==e.document.webkitHidden?e.document.webkitHidden:null}catch(t){return null}}function ef(e){const t=function(){let e=window,t=window.parent;try{for(;e!==e.parent;)t=e.parent,t.location.href,e=e.parent}catch(n){}return e}();return{location:yt(e,"refererInfo.page",null),referrer:yt(e,"refererInfo.ref",null),stack:yt(e,"refererInfo.stack",[]),numIframes:yt(e,"refererInfo.numIframes",0),wWidth:t.innerWidth,wHeight:t.innerHeight,oWidth:t.outerWidth,oHeight:t.outerHeight,sWidth:t.screen.width,sHeight:t.screen.height,aWidth:t.screen.availWidth,aHeight:t.screen.availHeight,sLeft:"screenLeft"in t?t.screenLeft:t.screenX,sTop:"screenTop"in t?t.screenTop:t.screenY,xOffset:t.pageXOffset,yOffset:t.pageYOffset,docHidden:Zm(t),docHeight:t.document.body?t.document.body.scrollHeight:null,hLength:history.length,timing:rf(),version:{prebid:"9.10.0",adapter:"1.1.1"}}}function tf(e){const t=e.filter((e=>Ym(e))).map((e=>{const t={};return nf.call(t,e),t.context=e.mediaTypes.video.context,t.playerSize=of(e),t.mediaTypeInfo=xn(e.mediaTypes.video),t.type=Or,t.priceFloors=df(e,Or,t.playerSize),t})),n=e.filter((e=>Qm(Dr,e))).map((e=>{const t={};return nf.call(t,e),t.sizes=sf(e),t.type=Dr,t.mediaTypeInfo=xn(e.mediaTypes.banner),t.priceFloors=df(e,Dr,t.sizes),t}));return t.concat(n)}function nf(e){const t=e.params;this.adUnitCode=e.adUnitCode,this.bidId=e.bidId,this.bidderRequestId=e.bidderRequestId,this.auctionId=yt(e,"ortb2.source.tid"),this.transactionId=yt(e,"ortb2Imp.ext.tid"),this.gpid=yt(e,"ortb2Imp.ext.gpid")||yt(e,"ortb2Imp.ext.data.pbadslot"),this.pubId=t.pubId,this.ext=t.ext,this.ortb2Imp=yt(e,"ortb2Imp"),t.pubClick&&(this.click=t.pubClick),t.dealId&&(this.dealId=t.dealId);const n=function(e){const t=document.getElementById(e);try{const{top:e,left:n,width:i,height:r}=t.getBoundingClientRect();let o=t.ownerDocument.defaultView;const s={top:e+o.pageYOffset,left:n+o.pageXOffset,width:i,height:r};let a=o.frameElement;for(;null!=a;){const{top:e,left:t}=a.getBoundingClientRect();s.top+=e+o.pageYOffset,s.left+=t+o.pageXOffset,o=o.parent,a=o.frameElement}return s}catch(n){return null}}(e.adUnitCode);n&&(this.coords=n)}function rf(){try{if(null!=window.performance&&null!=window.performance.timing){const e={},t=window.performance.timing;return e.pageLoadTime=t.loadEventEnd-t.navigationStart,e.connectTime=t.responseEnd-t.requestStart,e.renderTime=t.domComplete-t.domLoading,e}}catch(e){return null}return null}function of(e){const t=e.mediaTypes.video.playerSize;return void 0!==t&&Array.isArray(t)&&t.length>0?af(t):[]}function sf(e){if(void 0!==e.mediaTypes&&void 0!==e.mediaTypes.banner&&void 0!==e.mediaTypes.banner.sizes&&Array.isArray(e.mediaTypes.banner.sizes)&&e.mediaTypes.banner.sizes.length>0)return af(e.mediaTypes.banner.sizes);return!Ym(e)&&e.sizes&&Array.isArray(e.sizes)?af(e.sizes):[]}function af(e){const t=[];for(let n=0;n<e.length;n++){const i=e[n];t.push({width:i[0],height:i[1]})}return t}function df(e,t,n){const i=[];return"function"==typeof e.getFloor&&n.forEach((n=>{const r=e.getFloor({currency:"EUR",mediaType:t||"*",size:[n.width,n.height]});r.size=xn(n),r.floor||(r.floor=null),i.push(r)})),i}zs({code:Km,gvlid:241,supportedMediaTypes:[Dr,Or],isBidRequestValid:function(e){return void 0!==e&&void 0!==e.params&&"string"==typeof e.params.pubId&&(Qm(Dr,e)||Qm(Or,e))},buildRequests:function(e,t){var n;const i={bids:tf(e),...ef(t)};t&&t.gdprConsent&&(i.gdprConsent={consentString:t.gdprConsent.consentString,consentRequired:t.gdprConsent.gdprApplies,addtlConsent:t.gdprConsent.addtlConsent}),t&&t.gppConsent&&(i.gppConsent={consentString:t.gppConsent.gppString,applicableSections:t.gppConsent.applicableSections}),t&&t.uspConsent&&(i.usPrivacy=t.uspConsent),t&&t.ortb2&&(i.ortb2=t.ortb2),e&&0!==e.length&&e[0].userIdAsEids&&(i.userId=e[0].userIdAsEids),e&&0!==e.length&&e[0].schain&&function(e){let t=!1;const n=["asi","sid","hp"];if(!e||!e.nodes)return t;t=e.nodes.reduce(((e,t)=>e?n.every((e=>t.hasOwnProperty(e))):e),!0),t||Qt("OneTag: required schain params missing");return t}(e[0].schain)&&(i.schain=e[0].schain);try{Xm.hasLocalStorage()&&(i.onetagSid=Xm.getDataFromLocalStorage("onetag_sid"))}catch(o){}const r=navigator.connection||navigator.webkitConnection;return i.networkConnectionType=r&&r.type?r.type:null,i.networkEffectiveConnectionType=r&&r.effectiveType?r.effectiveType:null,i.fledgeEnabled=Boolean(null==(n=null==t?void 0:t.paapi)?void 0:n.enabled),{method:"POST",url:"https://onetag-sys.com/prebid-request",data:JSON.stringify(i)}},interpretResponse:function(e,t){const n=e.body,i=[],r=JSON.parse(t.data);if(!n||n.nobid&&!0===n.nobid)return i;if(!(n.fledgeAuctionConfigs||n.bids&&Array.isArray(n.bids)&&0!==n.bids.length))return i;if(Array.isArray(n.bids)&&n.bids.forEach((e=>{const t={requestId:e.requestId,cpm:e.cpm,width:e.width,height:e.height,creativeId:e.creativeId,dealId:null==e.dealId?e.dealId:"",currency:e.currency,netRevenue:e.netRevenue||!1,mediaType:e.mediaType,meta:{mediaType:e.mediaType,advertiserDomains:e.adomain},ttl:e.ttl||300};if(e.dsa&&(t.meta.dsa=e.dsa),e.mediaType===Dr)t.ad=e.ad;else if(e.mediaType===Or){const{context:n,adUnitCode:i}=Ae(r.bids,(t=>t.bidId===e.requestId&&t.type===Or));n===xr?(t.vastUrl=e.vastUrl,t.videoCacheKey=e.videoCacheKey):n===Sr&&(t.vastXml=e.ad,t.vastUrl=e.vastUrl,e.rendererUrl&&(t.renderer=function(e,t={}){const n=Ci.install({id:e.requestId,url:e.rendererUrl,config:t,adUnitCode:e.adUnitCode,loaded:!1});try{n.setRender((({renderer:t,width:n,height:i,vastXml:r,adUnitCode:o})=>{t.push((()=>{window.onetag.Player.init({...e,width:n,height:i,vastXml:r,nodeId:o,config:t.getConfig()})}))}))}catch(i){}return n}({...e,adUnitCode:i})))}i.push(t)})),n.fledgeAuctionConfigs&&Array.isArray(n.fledgeAuctionConfigs)){const e=n.fledgeAuctionConfigs;return{bids:i,paapi:e}}return i},getUserSyncs:function(e,t,n,i,r){let o=[],s="";return n&&("boolean"==typeof n.gdprApplies&&(s+="&gdpr="+(n.gdprApplies?1:0)),"string"==typeof n.consentString&&(s+="&gdpr_consent="+n.consentString)),r&&"string"==typeof r.gppString&&(s+="&gpp_consent="+r.gppString),i&&"string"==typeof i&&(s+="&us_privacy="+i),e.iframeEnabled&&o.push({type:"iframe",url:Jm+"?cb="+(new Date).getTime()+s}),e.pixelEnabled&&o.push({type:"image",url:Jm+"?tag=img"+s}),o}});const lf="outbrain",cf="USD",uf={0:"title",2:"icon",3:"image",5:"sponsoredBy",4:"body",1:"cta"},pf={title:{id:0,name:"title"},icon:{id:2,type:1,name:"img"},image:{id:3,type:3,name:"img"},sponsoredBy:{id:5,name:"data",type:1},body:{id:4,name:"data",type:2},cta:{id:1,type:12,name:"data"}},mf="https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js",ff=Ir({bidderCode:lf});function gf(e){return hn(e.nativeParams,((e,t)=>{const n=pf[t],i={required:1&e.required};if(n){let t,r,o,s;i.id=n.id;let a=e.aspect_ratios;if(a&&a[0]&&(a=a[0],t=a.min_width||0,r=a.ratio_height*t/a.ratio_width|0),e.sizes){const t=e.sizes.flat();o=parseInt(t[0],10),s=parseInt(t[1],10)}return i[n.name]={len:e.len,type:n.type,wmin:t,hmin:r,w:o,h:s},i}})).filter(Boolean)}function hf(e){return"video"===e.mediaType||!!yt(e,"mediaTypes.video")}zs({code:lf,gvlid:164,supportedMediaTypes:[Rr,Dr,Or],isBidRequestValid:e=>"object"==typeof e.params&&("string"==typeof yt(e,"params.publisher.id")&&((!e.params.tagid||"string"==typeof e.params.tagid)&&(!(e.params.bcat&&("object"!=typeof e.params.bcat||!e.params.bcat.every((e=>"string"==typeof e))))&&(!(e.params.badv&&("object"!=typeof e.params.badv||!e.params.badv.every((e=>"string"==typeof e))))&&(!!lt.getConfig("outbrain.bidderUrl")&&(!(!e.nativeParams&&!e.sizes)||function(e){const t=yt(e,"mediaTypes.video");if(!t)return!1;if(!Array.isArray(t.playerSize))return!1;if(""==t.context)return!1;return!0}(e))))))),buildRequests:(e,t)=>{e=Ds(e);const n=t.ortb2||{},i=t.refererInfo.page,r=navigator.userAgent,o=ti(e,"params.test"),s=ti(e,"params.publisher"),a=n.bcat||ti(e,"params.bcat"),d=n.badv||ti(e,"params.badv"),l=ti(e,"userIdAsEids"),c=n.wlang,u=cf,p=lt.getConfig("outbrain.bidderUrl"),m=t.timeout,f=e.map(((e,t)=>{var n;e.netRevenue="net";const i={id:t+1+""};if(e.params.tagid&&(i.tagid=e.params.tagid),e.nativeParams?i.native={request:JSON.stringify({assets:gf(e)})}:hf(e)?i.video=function(e){const t=e.mediaTypes.video.playerSize.flat();return{w:parseInt(t[0],10),h:parseInt(t[1],10),protocols:e.mediaTypes.video.protocols,playbackmethod:e.mediaTypes.video.playbackmethod,mimes:e.mediaTypes.video.mimes,skip:e.mediaTypes.video.skip,delivery:e.mediaTypes.video.delivery,api:e.mediaTypes.video.api,minbitrate:e.mediaTypes.video.minbitrate,maxbitrate:e.mediaTypes.video.maxbitrate,minduration:e.mediaTypes.video.minduration,maxduration:e.mediaTypes.video.maxduration,startdelay:e.mediaTypes.video.startdelay,placement:e.mediaTypes.video.placement,plcmt:e.mediaTypes.video.plcmt,linearity:e.mediaTypes.video.linearity}}(e):i.banner={format:null==(n=e.sizes)?void 0:n.map((e=>function(e){if(Vt(e))return Lt(e)}(e)))},"function"==typeof e.getFloor){const t=function(e,t){const n=e.getFloor({currency:cf,mediaType:t,size:"*"});if("object"==typeof n&&n.currency===cf&&!isNaN(parseFloat(n.floor)))return parseFloat(n.floor);return null}(e,e.nativeParams?Rr:Dr);t&&(i.bidfloor=t)}return i})),g={id:t.bidderRequestId,site:{page:i,publisher:s},device:(null==n?void 0:n.device)||{ua:r},source:{fd:1},cur:[u],tmax:m,imp:f,bcat:a,badv:d,wlang:c,ext:{prebid:{channel:{name:"pbjs",version:"9.10.0"}}}};o&&(g.is_debug=!!o,g.test=1);const h=ff.getDataFromLocalStorage("OB-USER-TOKEN");return h&&wt(g,"user.ext.obusertoken",h),yt(t,"gdprConsent.gdprApplies")&&(wt(g,"user.ext.consent",t.gdprConsent.consentString),wt(g,"regs.ext.gdpr",1&t.gdprConsent.gdprApplies)),t.uspConsent&&wt(g,"regs.ext.us_privacy",t.uspConsent),!0===lt.getConfig("coppa")&&wt(g,"regs.coppa",1<.getConfig("coppa")),t.gppConsent?(wt(g,"regs.ext.gpp",t.gppConsent.gppString),wt(g,"regs.ext.gpp_sid",t.gppConsent.applicableSections)):yt(t,"ortb2.regs.gpp")&&(wt(g,"regs.ext.gpp",t.ortb2.regs.gpp),wt(g,"regs.ext.gpp_sid",t.ortb2.regs.gpp_sid)),l&&wt(g,"user.ext.eids",l),{method:"POST",url:p,data:JSON.stringify(g),bids:e}},interpretResponse:(e,{bids:t})=>{if(!e.body)return[];const{seatbid:n,cur:i}=e.body,r=n.map((e=>e.bid)).flat().reduce(((e,t)=>(e[t.impid-1]=t,e)),[]);return t.map(((e,t)=>{const n=r[t];if(n){let t=Dr;e.nativeParams?t=Rr:hf(e)&&(t=Or);const r={requestId:e.bidId,cpm:n.price,creativeId:n.crid,ttl:360,netRevenue:"net"===e.netRevenue,currency:i,mediaType:t,nurl:n.nurl};if(t===Rr)r.native=function(e){const{assets:t,link:n,privacy:i,eventtrackers:r}=JSON.parse(e.adm),o={clickUrl:n.url,clickTrackers:n.clicktrackers||void 0};t.forEach((e=>{const t=uf[e.id],n=t&&e[pf[t].name];n&&(o[t]=n.text||n.value||{url:n.url,width:n.w,height:n.h})})),i&&(o.privacyLink=i);r&&(o.impressionTrackers=[],r.forEach((e=>{if(1===e.event)switch(e.method){case 1:o.impressionTrackers.push(e.url);break;case 2:o.javascriptTrackers=`<script src="${e.url}"><\/script>`}})));return o}(n);else if(t===Dr)r.ad=n.adm,r.width=n.w,r.height=n.h;else if(t===Or){r.vastXml=n.adm;yt(e,"mediaTypes.video.context")===Sr&&(r.renderer=function(e){let t={},n=mf,i=function(e){e.renderer.push((()=>{window.ANOutstreamVideo.renderAd({sizes:e.sizes,targetId:e.adUnitCode,adResponse:{content:e.vastXml}})}))},r=yt(e,"mediaTypes.video.renderer");r||(r=yt(e,"renderer"));r&&(t=r.options,n=r.url,i=r.render);const o=Ci.install({id:e.adUnitCode,url:n,config:t,adUnitCode:e.adUnitCode,loaded:!1});try{o.setRender(i)}catch(s){Yt("Prebid Error calling setRender on renderer",s)}return o}(e))}return r.meta={},n.adomain&&n.adomain.length>0&&(r.meta.advertiserDomains=n.adomain),r}})).filter(Boolean)},getUserSyncs:(e,t,n,i,r)=>{const o=[];let s=lt.getConfig("outbrain.usersyncUrl"),a=[];return e.pixelEnabled&&s&&(n&&(a.push("gdpr="+(1&n.gdprApplies)),a.push("gdpr_consent="+encodeURIComponent(n.consentString||""))),i&&a.push("us_privacy="+encodeURIComponent(i)),r&&(a.push("gpp="+encodeURIComponent(r.gppString)),a.push("gpp_sid="+encodeURIComponent(r.applicableSections.join(",")))),o.push({type:"image",url:s+(a.length?"?"+a.join("&"):"")})),o},onBidWon:e=>{var t,n;e.nurl&&li((t=e.nurl,n=e.originalCpm,Rn(t,{AUCTION_PRICE:n})))}});var vf=!0;const bf="pubmatic",yf="PubMatic: ",wf="USD",If=void 0,Tf="https://pubmatic.bbvms.com/r/".concat("$RENDERER",".js"),Cf="Video.plcmt param missing",Af={kadpageurl:"",gender:"",yob:"",lat:"",lon:"",wiid:"",profId:"",verId:""},Ef={NUMBER:"number",STRING:"string",BOOLEAN:"boolean",ARRAY:"array",OBJECT:"object"},Sf={mimes:Ef.ARRAY,minduration:Ef.NUMBER,maxduration:Ef.NUMBER,startdelay:Ef.NUMBER,playbackmethod:Ef.ARRAY,api:Ef.ARRAY,protocols:Ef.ARRAY,w:Ef.NUMBER,h:Ef.NUMBER,battr:Ef.ARRAY,linearity:Ef.NUMBER,placement:Ef.NUMBER,plcmt:Ef.NUMBER,minbitrate:Ef.NUMBER,maxbitrate:Ef.NUMBER,skip:Ef.NUMBER},xf={ICON:1,IMAGE:3},kf={battr:Ef.ARRAY},_f={1:"PMP",5:"PREF",6:"PMPG"},Uf={bootstrapPlayer:function(e){const t={code:e.adUnitCode};if(e.vastXml?t.vastXml=e.vastXml:e.vastUrl&&(t.vastUrl=e.vastUrl),!e.vastXml&&!e.vastUrl)return void Yt(`${yf}: No vastXml or vastUrl on bid, bailing...`);const n=Uf.getRendererId("pubmatic",e.rendererCode),i=document.getElementById(e.adUnitCode);let r;for(let o=0;o<window.bluebillywig.renderers.length;o++)if(window.bluebillywig.renderers[o]._id===n){r=window.bluebillywig.renderers[o];break}r?r.bootstrap(t,i):Yt(`${yf}: Couldn't find a renderer with ${n}`)},newRenderer:function(e,t){var n=Tf.replace("$RENDERER",e);const i=Ci.install({url:n,loaded:!1,adUnitCode:t});try{i.setRender(Uf.outstreamRender)}catch(r){Yt(`${yf}: Error tying to setRender on renderer`,r)}return i},outstreamRender:function(e){e.renderer.push((function(){Uf.bootstrapPlayer(e)}))},getRendererId:function(e,t){return`${e}-${t}`}},Rf=[Dr,Or,Rr];let Of=0,Df=!1,Bf=["pubmatic"];const Pf=["all"];function jf(e,t){if(!dn(t))return t&&Yt(yf+"Ignoring param key: "+e+", expects string-value, found "+typeof t),If;switch(e){case"pmzoneid":return t.split(",").slice(0,50).map((e=>e.trim())).join();case"kadfloor":case"lat":case"lon":return parseFloat(t)||If;case"yob":return parseInt(t)||If;default:return t}}function Nf(e){var t;e.params.adUnit="",e.params.adUnitIndex="0",e.params.width=0,e.params.height=0,e.params.adSlot=dn(t=e.params.adSlot)?t.replace(/^\s+/g,"").replace(/\s+$/g,""):(t&&Yt(bf+": adSlot must be a string. Ignoring adSlot"),"");var n=e.params.adSlot,i=n.split(":");if(n=i[0],2==i.length&&(e.params.adUnitIndex=i[1]),i=n.split("@"),e.params.adUnit=i[0],i.length>1){if(2!=(i=i[1].split("x")).length)return void Yt(yf+"AdSlot Error: adSlot not in required format");e.params.width=parseInt(i[0],10),e.params.height=parseInt(i[1],10)}else if(e.hasOwnProperty("mediaTypes")&&e.mediaTypes.hasOwnProperty(Dr)&&e.mediaTypes.banner.hasOwnProperty("sizes")){for(var r=0,o=[];r<e.mediaTypes.banner.sizes.length;r++)2===e.mediaTypes.banner.sizes[r].length&&o.push(e.mediaTypes.banner.sizes[r]);e.mediaTypes.banner.sizes=o,e.mediaTypes.banner.sizes.length>=1&&(e.params.width=e.mediaTypes.banner.sizes[0][0],e.params.height=e.mediaTypes.banner.sizes[0][1],e.mediaTypes.banner.sizes=e.mediaTypes.banner.sizes.splice(1,e.mediaTypes.banner.sizes.length-1))}}function qf(){let e=window.navigator&&(window.navigator.connection||window.navigator.mozConnection||window.navigator.webkitConnection);switch(null==e?void 0:e.effectiveType){case"ethernet":return 1;case"wifi":return 2;case"slow-2g":case"2g":return 4;case"3g":return 5;case"4g":return 6;default:return 0}}function $f(e,t,n){var i,r="Ignoring param key: "+e+", expects "+n+", found "+typeof t;switch(n){case Ef.BOOLEAN:i=pn;break;case Ef.NUMBER:i=cn;break;case Ef.STRING:i=dn;break;case Ef.ARRAY:i=ln}return i(t)?t:(Yt(yf+r),If)}const Ff={desc:"desc",desc2:"desc2",body:"desc",body2:"desc2",sponsoredBy:"sponsored",cta:"ctatext",rating:"rating",address:"address",downloads:"downloads",likes:"likes",phone:"phone",price:"price",salePrice:"saleprice",displayUrl:"displayurl",saleprice:"saleprice",displayurl:"displayurl"},Mf=Object.values(Ff);function zf(e){var t;if(e.ortb){e=e.ortb,t={ver:"1.2",...e,assets:[]};const{assets:n}=e,i=e=>e.title||e.img||e.data||e.video;if(n.length<1||!n.some((e=>i(e))))return Yt(`${yf}: Native assets object is empty or contains some invalid object`),Df=!0,t;n.forEach((e=>{var n=e;n.img&&(n.img.type==xf.IMAGE?(n.w=n.w||n.width||(n.sizes?n.sizes[0]:If),n.h=n.h||n.height||(n.sizes?n.sizes[1]:If),n.wmin=n.wmin||n.minimumWidth||(n.minsizes?n.minsizes[0]:If),n.hmin=n.hmin||n.minimumHeight||(n.minsizes?n.minsizes[1]:If)):n.img.type==xf.ICON&&(n.w=n.w||n.width||(n.sizes?n.sizes[0]:If),n.h=n.h||n.height||(n.sizes?n.sizes[1]:If))),n&&void 0!==n.id&&i(n)&&t.assets.push(n)}))}else t=function(e){if(!e&&!un(e))return Yt(`${yf}: Native assets object is empty or not an object: ${e}`),void(Df=!0);const t={ver:"1.2",assets:[]};for(let n in e){if(Ze.includes(n))continue;if(!Ge.hasOwnProperty(n)&&!Mf.includes(n)){Yt(`${yf}: Unrecognized native asset code: ${n}. Asset will be ignored.`);continue}const i=e[n];let r=0;i.required&&pn(i.required)&&(r=Number(i.required));const o={id:t.assets.length,required:r};if(n in Ff)o.data={type:Ye[Ff[n]]},(i.len||i.length)&&(o.data.len=i.len||i.length),i.ext&&(o.data.ext=i.ext);else if("icon"===n||"image"===n){if(o.img={type:"icon"===n?Qe.ICON:Qe.MAIN},i.aspect_ratios)if(ln(i.aspect_ratios))if(i.aspect_ratios.length){const{min_width:e,min_height:t}=i.aspect_ratios[0];zn(e)&&zn(t)?(o.img.wmin=e,o.img.hmin=t):Yt(`${yf}: image.aspect_ratios min_width or min_height are invalid: ${e}, ${t}`);const n=i.aspect_ratios.filter((e=>e.ratio_width&&e.ratio_height)).map((e=>`${e.ratio_width}:${e.ratio_height}`));n.length>0&&(o.img.ext={aspectratios:n})}else Yt(`${yf}: image.aspect_ratios was passed, but it's empty: ${i.aspect_ratios}`);else Yt(`${yf}: image.aspect_ratios was passed, but it's not a an array: ${i.aspect_ratios}`);o.img.w=i.w||i.width,o.img.h=i.h||i.height,o.img.wmin=i.wmin||i.minimumWidth||(i.minsizes?i.minsizes[0]:If),o.img.hmin=i.hmin||i.minimumHeight||(i.minsizes?i.minsizes[1]:If),i.sizes&&(2===i.sizes.length&&zn(i.sizes[0])&&zn(i.sizes[1])?(Xt(`${yf}: if asset.sizes exist, by OpenRTB spec we should remove wmin and hmin`),o.img.w=i.sizes[0],o.img.h=i.sizes[1],delete o.img.hmin,delete o.img.wmin):Yt(`${yf}: image.sizes was passed, but its value is not an array of integers: ${i.sizes}`)),i.ext&&(o.img.ext=i.ext),i.mimes&&(o.img.mimes=i.mimes)}else"title"===n?(o.title={len:i.len||i.length||140},i.ext&&(o.title.ext=i.ext)):"ext"===n&&(o.ext=i,delete o.required);t.assets.push(o)}return t.assets.length<1?(Yt(`${yf}: Could not find any valid asset`),void(Df=!0)):t}(e);return t}function Lf(e){var t,n=e.mediaTypes.banner.sizes,i=[];if(n!==If&&ln(n)){if(t={},e.params.width||e.params.height)t.w=e.params.width,t.h=e.params.height;else{if(0===n.length)return t=If,Yt(yf+"Error: mediaTypes.banner.size missing for adunit: "+e.params.adUnit+". Ignoring the banner impression in the adunit."),t;t.w=parseInt(n[0][0],10),t.h=parseInt(n[0][1],10),n=n.splice(1,n.length-1)}n.length>0&&(i=[],n.forEach((function(e){e.length>1&&i.push({w:e[0],h:e[1]})})),i.length>0&&(t.format=i)),t.pos=0,t.topframe=kn()?0:1;const r={...yt(e,"ortb2Imp.banner")};for(let e in kf)r.hasOwnProperty(e)&&(t[e]=$f(e,r[e],kf[e]))}else Yt(yf+"Error: mediaTypes.banner.size missing for adunit: "+e.params.adUnit+". Ignoring the banner impression in the adunit."),t=If;return t}function Vf(e){var t,n=Yn(yt(e.mediaTypes,"video"),e.params.video);if(n!==If){for(var i in t={},function(e,t){yt(e,"plcmt")||Yt(Cf+" for "+t)}(n,e.adUnitCode),Sf)n.hasOwnProperty(i)&&(t[i]=$f(i,n[i],Sf[i]));ln(e.mediaTypes.video.playerSize[0])?(t.w=parseInt(e.mediaTypes.video.playerSize[0][0],10),t.h=parseInt(e.mediaTypes.video.playerSize[0][1],10)):cn(e.mediaTypes.video.playerSize[0])&&(t.w=parseInt(e.mediaTypes.video.playerSize[0],10),t.h=parseInt(e.mediaTypes.video.playerSize[1],10))}else t=If,Yt(yf+"Error: Video config params missing for adunit: "+e.params.adUnit+" with mediaType set as video. Ignoring video impression in the adunit.");return t}function Wf(e,t){var n,i,r,o,s={},a={},d=e.hasOwnProperty("sizes")?e.sizes:[],l="",c=[],u=null==(n=null==t?void 0:t.paapi)?void 0:n.enabled;if(function(e,t){t.params.deals&&(ln(t.params.deals)?t.params.deals.forEach((function(t){dn(t)&&t.length>3?(e.pmp||(e.pmp={private_auction:0,deals:[]}),e.pmp.deals.push({id:t})):Yt(yf+"Error: deal-id present in array bid.params.deals should be a strings with more than 3 charaters length, deal-id ignored: "+t)})):Yt(yf+"Error: bid.params.deals should be an array of strings."))}(s={id:e.bidId,tagid:e.params.adUnit||void 0,bidfloor:jf("kadfloor",e.params.kadfloor),secure:1,ext:{pmZoneId:jf("pmzoneid",e.params.pmzoneid)},bidfloorcur:e.params.currency?jf("currency",e.params.currency):wf,displaymanager:"Prebid.js",displaymanagerver:"9.10.0",pmp:(null==(i=e.ortb2Imp)?void 0:i.pmp)||void 0},e),function(e,t){var n,i="";if(t.params.dctr)if(dn(i=t.params.dctr)&&i.length>0){var r=i.split("|");i="",r.forEach((e=>{i+=e.length>0?e.trim()+"|":""})),n=i.length,"|"===i.substring(n,n-1)&&(i=i.substring(0,n-1)),e.ext.key_val=i.trim()}else Yt(yf+"Ignoring param : dctr with value : "+i+", expects string-value, found empty or non-string value")}(s,e),function(e,t){var n=t.rtd&&t.rtd.jwplayer&&t.rtd.jwplayer.targeting||void 0,i="";if(void 0!==n&&""!==n&&n.hasOwnProperty("segments")){var r,o=n.segments.length;i+="jw-id="+n.content.id;for(var s=0;s<o;s++)i+="|jw-"+n.segments[s]+"=1";(r=e.ext)&&void 0===r.key_val?r.key_val=i:r.key_val+="|"+i}}(s,e),e.hasOwnProperty("mediaTypes"))for(l in e.mediaTypes)switch(l){case Dr:(r=Lf(e))!==If&&(s.banner=r);break;case Rr:a.request=JSON.stringify(zf(e.nativeParams)),Df?(Yt(yf+"Error: Error in Native adunit "+e.params.adUnit+". Ignoring the adunit. Refer to http://prebid.org/dev-docs/show-native-ads.html for more details."),Df=!1):s.native=a;break;case Or:(o=Vf(e))!==If&&(s.video=o)}else r={pos:0,w:e.params.width,h:e.params.height,topframe:kn()?0:1},ln(d)&&d.length>1&&((d=d.splice(1,d.length-1)).forEach((e=>{c.push({w:e[0],h:e[1]})})),r.format=c),s.banner=r;return function(e,t){const n={...yt(t,"ortb2Imp.ext.data")};Object.keys(n).forEach((t=>{"pbadslot"===t?"string"==typeof n[t]&&n[t]&&wt(e,"ext.data.pbadslot",n[t]):"adserver"===t?["name","adslot"].forEach((t=>{const i=yt(n,`adserver.${t}`);"string"==typeof i&&i&&(wt(e,`ext.data.adserver.${t.toLowerCase()}`,i),"adslot"===t&&wt(e,"ext.dfp_ad_unit_code",i))})):wt(e,`ext.data.${t}`,n[t])}));const i=yt(t,"ortb2Imp.ext.gpid");i&&wt(e,"ext.gpid",i)}(s,e),function(e,t){let n=-1;"function"!=typeof t.getFloor||lt.getConfig("pubmatic.disableFloors")||[Dr,Or,Rr].forEach((i=>{if(e.hasOwnProperty(i)){let r=[];"banner"===i&&(e[i].w&&e[i].h&&r.push([e[i].w,e[i].h]),ln(e[i].format)&&e[i].format.forEach((e=>r.push([e.w,e.h])))),0===r.length&&r.push("*"),r.forEach((r=>{let o=t.getFloor({currency:e.bidfloorcur,mediaType:i,size:r});if(Xt(yf,"floor from floor module returned for mediatype:",i," and size:",r," is: currency",o.currency,"floor",o.floor),"object"==typeof o&&o.currency===e.bidfloorcur&&!isNaN(parseInt(o.floor))){let e=parseFloat(o.floor);Xt(yf,"floor from floor module:",e,"previous floor value",n,"Min:",Math.min(e,n)),n=-1===n?e:Math.min(e,n),Xt(yf,"new floor value:",n)}}))}}));e.bidfloor&&(Xt(yf,"floor from floor module:",n,"impObj.bidfloor",e.bidfloor,"Max:",Math.max(n,e.bidfloor)),n=Math.max(n,e.bidfloor));e.bidfloor=!isNaN(n)&&n>0?n:If,Xt(yf,"new impObj.bidfloor value:",e.bidfloor)}(s,e),function(e,t,n){var i,r,o;n?(e.ext=e.ext||{},void 0!==(null==(r=null==(i=null==t?void 0:t.ortb2Imp)?void 0:i.ext)?void 0:r.ae)&&(e.ext.ae=t.ortb2Imp.ext.ae)):(null==(o=e.ext)?void 0:o.ae)&&delete e.ext.ae}(s,e,u),s.hasOwnProperty(Dr)||s.hasOwnProperty(Rr)||s.hasOwnProperty(Or)?s:If}function Gf(e,t){(t=t.filter((function(e){return"string"==typeof e||(Yt(yf+"acat: Each category should be a string, ignoring category: "+e),!1)})).map((e=>e.trim())).filter(((e,t,n)=>n.indexOf(e)===t))).length>0&&(Yt(yf+"acat: Selected: ",t),e.ext.acat=t)}function Hf(e){return!0===ln(e)&&e.length>0}zs({code:bf,gvlid:76,supportedMediaTypes:[Dr,Or,Rr],isBidRequestValid:e=>{if(e&&e.params){if(!dn(e.params.publisherId))return Yt(yf+"Error: publisherId is mandatory and cannot be numeric (wrap it in quotes in your config). Call to OpenBid will not be sent for ad unit: "+JSON.stringify(e)),!1;if(e.hasOwnProperty("mediaTypes")&&e.mediaTypes.hasOwnProperty(Or)){let t=yt(e.mediaTypes,"video.mimes"),n=yt(e,"params.video.mimes");if(!1===Hf(t)&&!1===Hf(n))return Yt(yf+"Error: For video ads, bid.mediaTypes.video.mimes OR bid.params.video.mimes should be present and must be a non-empty array. Call to OpenBid will not be sent for ad unit:"+JSON.stringify(e)),!1;if(!e.mediaTypes[Or].hasOwnProperty("context"))return Qt(`${yf}: no context specified in bid. Rejecting bid: `,e),!1;if("outstream"===e.mediaTypes[Or].context&&!dn(e.params.outstreamAU)&&!e.hasOwnProperty("renderer")&&!e.mediaTypes[Or].hasOwnProperty("renderer"))return e.mediaTypes.hasOwnProperty(Dr)||e.mediaTypes.hasOwnProperty(Rr)?(delete e.mediaTypes[Or],Yt(`${yf}: for "outstream" bids either outstreamAU parameter must be provided or ad unit supplied renderer is required. Rejecting mediatype Video of bid: `,e),!0):(Qt(`${yf}: for "outstream" bids either outstreamAU parameter must be provided or ad unit supplied renderer is required. Rejecting bid: `,e),!1)}return!0}return!1},buildRequests:(e,t)=>{var n,i,r,o,s,a,d,l,c,u,p,m,f,g,h,v;t&&t.refererInfo&&(v=t.refererInfo);var b,y=function(e){return{pageURL:(null==e?void 0:e.page)||window.location.href,refURL:(null==e?void 0:e.ref)||window.document.referrer}}(v),w=function(e){return{id:""+(new Date).getTime(),at:1,cur:[wf],imp:[],site:{page:e.pageURL,ref:e.refURL,publisher:{}},device:{ua:navigator.userAgent,js:1,dnt:"yes"==navigator.doNotTrack||"1"==navigator.doNotTrack||"1"==navigator.msDoNotTrack?1:0,h:screen.height,w:screen.width,language:navigator.language,connectiontype:qf()},user:{},ext:{}}}(y),I="",T=[],C=[],A=[],E=$t();if(e.forEach((e=>{var n,i;if(e.params.wiid=e.params.wiid||t.auctionId||E,(b=xn(e)).params.adSlot=b.params.adSlot||"",Nf(b),b.mediaTypes&&b.mediaTypes.hasOwnProperty("video")||b.params.hasOwnProperty("video"));else if(!(b.hasOwnProperty("mediaTypes")&&b.mediaTypes.hasOwnProperty(Rr)||0!==b.params.width||0!==b.params.height))return void Yt(yf+"Skipping the non-standard adslot: ",b.params.adSlot,JSON.stringify(b));y.pubId=y.pubId||b.params.publisherId,(y=function(e,t){var n,i,r;for(n in t.kadpageurl||(t.kadpageurl=t.pageURL),Af)Af.hasOwnProperty(n)&&(i=e[n])&&("object"==typeof(r=Af[n])&&(i=r.f(i,t)),dn(i)?t[n]=i:Yt(yf+"Ignoring param : "+n+" with value : "+Af[n]+", expects string-value, found "+typeof i));return t}(b.params,y)).transactionId=null==(i=null==(n=b.ortb2Imp)?void 0:n.ext)?void 0:i.tid,""===I?I=b.params.currency||If:b.params.hasOwnProperty("currency")&&I!==b.params.currency&&Yt(yf+"Currency specifier ignored. Only one currency permitted."),b.params.currency=I,b.params.hasOwnProperty("dctr")&&dn(b.params.dctr)&&T.push(b.params.dctr),b.params.hasOwnProperty("bcat")&&ln(b.params.bcat)&&(C=C.concat(b.params.bcat)),b.params.hasOwnProperty("acat")&&ln(b.params.acat)&&(A=A.concat(b.params.acat));var r=Wf(b,t);r&&w.imp.push(r)})),0==w.imp.length)return;w.site.publisher.id=y.pubId.trim(),Of=y.pubId.trim(),w.ext.wrapper={},w.ext.wrapper.profile=parseInt(y.profId)||If,w.ext.wrapper.version=parseInt(y.verId)||If,w.ext.wrapper.wiid=y.wiid||t.auctionId,w.ext.wrapper.wv="prebid_prebid_9.10.0",w.ext.wrapper.transactionId=y.transactionId,w.ext.wrapper.wp="pbjs";const S=t?Ai.get(t.bidderCode,"allowAlternateBidderCodes"):void 0;if(void 0!==S){if(w.ext.marketplace={},t&&1==S){let e=Ai.get(t.bidderCode,"allowedAlternateBidderCodes");ln(e)?(e=e.map((e=>e.trim().toLowerCase())).filter((e=>!!e)).filter(Tn),Bf=e.includes("*")?Pf:[...Bf,...e]):Bf=Pf}w.ext.marketplace.allowedbidders=Bf.filter(Tn)}w.user.gender=y.gender?y.gender.trim():If,w.user.geo={},w.user.yob=jf("yob",y.yob),w.site.page=y.kadpageurl.trim()||w.site.page.trim(),w.site.domain=function(e){let t=document.createElement("a");return t.href=e,t.hostname}(w.site.page),"object"==typeof lt.getConfig("content")&&(w.site.content=lt.getConfig("content")),"object"==typeof lt.getConfig("device")&&(w.device=Object.assign(w.device,lt.getConfig("device"))),w.device.language=w.device.language&&w.device.language.split("-")[0],wt(w,"source.tid",null==(i=null==(n=null==t?void 0:t.ortb2)?void 0:n.source)?void 0:i.tid),-1!==window.location.href.indexOf("pubmaticTest=true")&&(w.test=1),e[0].schain&&wt(w,"source.ext.schain",e[0].schain),t&&t.gdprConsent&&(wt(w,"user.ext.consent",t.gdprConsent.consentString),wt(w,"regs.ext.gdpr",t.gdprConsent.gdprApplies?1:0)),t&&t.uspConsent&&wt(w,"regs.ext.us_privacy",t.uspConsent),(null==(r=null==t?void 0:t.gppConsent)?void 0:r.gppString)?(wt(w,"regs.gpp",t.gppConsent.gppString),wt(w,"regs.gpp_sid",t.gppConsent.applicableSections)):(null==(s=null==(o=null==t?void 0:t.ortb2)?void 0:o.regs)?void 0:s.gpp)&&(wt(w,"regs.gpp",t.ortb2.regs.gpp),wt(w,"regs.gpp_sid",t.ortb2.regs.gpp_sid)),!0===lt.getConfig("coppa")&&wt(w,"regs.coppa",1),(null==(l=null==(d=null==(a=null==t?void 0:t.ortb2)?void 0:a.regs)?void 0:d.ext)?void 0:l.dsa)&&wt(w,"regs.ext.dsa",t.ortb2.regs.ext.dsa),function(e,t){let n=yt(t,"0.userIdAsEids");ln(n)&&n.length>0&&wt(e,"user.eids",n)}(w,e);const x=t&&t.ortb2||{},{user:k,device:_,site:U,bcat:R,badv:O}=x;if(U){const{page:e,domain:t,ref:n}=w.site;Yn(w,{site:U}),w.site.page=e,w.site.domain=t,w.site.ref=n}if(k&&Yn(w,{user:k}),O&&Yn(w,{badv:O}),R&&(C=C.concat(R)),(null==_?void 0:_.sua)&&(w.device.sua=null==_?void 0:_.sua),(null==(c=null==_?void 0:_.ext)?void 0:c.cdep)&&wt(w,"device.ext.cdep",_.ext.cdep),(null==k?void 0:k.geo)&&(null==_?void 0:_.geo)?(w.device.geo={...w.device.geo,..._.geo},w.user.geo={...w.user.geo,...k.geo}):((null==k?void 0:k.geo)||(null==_?void 0:_.geo))&&(w.user.geo=w.device.geo=(null==k?void 0:k.geo)?{...w.user.geo,...k.geo}:{...w.user.geo,..._.geo}),null==(f=null==(m=null==(p=null==(u=x.ext)?void 0:u.prebid)?void 0:p.bidderparams)?void 0:m[t.bidderCode])?void 0:f.acat){const e=x.ext.prebid.bidderparams[t.bidderCode].acat;Gf(w,e)}else A.length&&Gf(w,A);return function(e,t){(t=t.filter((function(e){return"string"==typeof e||(Yt(yf+"bcat: Each category should be a string, ignoring category: "+e),!1)})).map((e=>e.trim())).filter((function(e,t,n){if(e.length>3)return n.indexOf(e)===t;Yt(yf+"bcat: Each category should have a value of a length of more than 3 characters, ignoring category: "+e)}))).length>0&&(Yt(yf+"bcat: Selected: ",t),e.bcat=t)}(w,C),(null==t?void 0:t.timeout)?w.tmax=t.timeout:w.tmax=null==(h=null==(g=null==window?void 0:window.PWT)?void 0:g.versionDetails)?void 0:h.timeout,w.ext.epoch=(new Date).getTime(),"object"==typeof lt.getConfig("app")&&(w.app=lt.getConfig("app"),w.app.publisher=w.site.publisher,w.app.ext=w.site.ext||If,"object"!=typeof w.app.content&&(w.app.content=w.site.content||If),delete w.site),{method:"POST",url:"https://hbopenbid.pubmatic.com/translator?source=prebid-client",data:JSON.stringify(w),bidderRequest:t}},interpretResponse:(e,t)=>{const n=[];var i=wf;let r=JSON.parse(t.data),o=r.site&&r.site.ref?r.site.ref:"";try{e.body&&e.body.seatbid&&ln(e.body.seatbid)&&(i=e.body.cur||i,e.body.seatbid.forEach((e=>{e.bid&&ln(e.bid)&&e.bid.forEach((s=>{let a={requestId:s.impid,cpm:parseFloat((s.price||0).toFixed(2)),width:s.w,height:s.h,creativeId:s.crid||s.id,dealId:s.dealid,currency:i,netRevenue:true,ttl:300,referrer:o,ad:s.adm,pm_seat:e.seat||null,pm_dspid:s.ext&&s.ext.dspid?s.ext.dspid:null,partnerImpId:s.id||""};r.imp&&r.imp.length>0&&r.imp.forEach((e=>{if(s.impid===e.id)switch(function(e,t){if(e.ext&&null!=e.ext.bidtype)t.mediaType=Rf[e.ext.bidtype];else{Xt(yf+"bid.ext.bidtype does not exist, checking alternatively for mediaType");var n=e.adm,i="",r=new RegExp(/VAST\s+version/);if(n.indexOf('span class="PubAPIAd"')>=0)t.mediaType=Dr;else if(r.test(n))t.mediaType=Or;else try{(i=JSON.parse(n.replace(/\\/g,"")))&&i.native&&(t.mediaType=Rr)}catch(o){Yt(yf+"Error: Cannot parse native reponse for ad response: "+n)}}}(s,a),a.mediaType){case Dr:break;case vf&&Or:a.width=s.hasOwnProperty("w")?s.w:e.video.w,a.height=s.hasOwnProperty("h")?s.h:e.video.h,a.vastXml=s.adm,function(e,t){let n,i,r;if(t.bidderRequest&&t.bidderRequest.bids){for(let o=0;o<t.bidderRequest.bids.length;o++)t.bidderRequest.bids[o].bidId===e.requestId&&(n=t.bidderRequest.bids[o].params,i=t.bidderRequest.bids[o].mediaTypes[Or].context,r=t.bidderRequest.bids[o].adUnitCode);i&&"outstream"===i&&n&&n.outstreamAU&&r&&(e.rendererCode=n.outstreamAU,e.renderer=Uf.newRenderer(e.rendererCode,r))}}(a,t),function(e,t,n){var i,r,o;if(!(null==(i=null==t?void 0:t.ext)?void 0:i.prebiddealpriority)||!vf)return;const s=function(e,t){if(e)return t.flatMap((e=>e.bids)).find((t=>["bidId","adId","bid_id"].some((n=>t[n]===e))))}(e.requestId,[n.bidderRequest]),a=yt(s,"mediaTypes.video");if((null==a?void 0:a.context)!=Br)return;const d=(null==(o=null==(r=null==t?void 0:t.ext)?void 0:r.video)?void 0:o.duration)||(null==a?void 0:a.maxduration);e.video={context:Br,durationSeconds:d,dealTier:t.ext.prebiddealpriority}}(a,s,t);break;case Rr:!function(e,t){if(e.hasOwnProperty("adm")){var n="";try{n=JSON.parse(e.adm.replace(/\\/g,""))}catch(i){return void Yt(yf+"Error: Cannot parse native reponse for ad response: "+t.adm)}t.native={ortb:{...n.native}},t.mediaType=Rr,t.width||(t.width=0),t.height||(t.height=0)}}(s,a)}})),s.ext&&s.ext.deal_channel&&(a.dealChannel=_f[s.ext.deal_channel]||null),function(e,t,n){e.meta={},t.ext&&t.ext.dspid&&(e.meta.networkId=t.ext.dspid,e.meta.demandSource=t.ext.dspid),t.ext&&t.ext.dchain&&(e.meta.dchain=t.ext.dchain);const i=n||t.ext&&t.ext.advid;i&&(e.meta.advertiserId=i,e.meta.agencyId=i,e.meta.buyerId=i),t.adomain&&Hf(t.adomain)&&(e.meta.advertiserDomains=t.adomain,e.meta.clickUrl=t.adomain[0],e.meta.brandId=t.adomain[0]),t.cat&&Hf(t.cat)&&(e.meta.secondaryCatIds=t.cat,e.meta.primaryCatId=t.cat[0]),t.ext&&t.ext.dsa&&Object.keys(t.ext.dsa).length&&(e.meta.dsa=t.ext.dsa)}(a,s,e.seat),e.ext&&e.ext.buyid&&(a.adserverTargeting={hb_buyid_pubmatic:e.ext.buyid}),s.ext&&s.ext.marketplace&&(a.bidderCode=s.ext.marketplace),n.push(a)}))})));let s=yt(e.body,"ext.fledge_auction_configs");if(s)return s=Object.entries(s).map((([e,t])=>({bidId:e,config:Object.assign({auctionSignals:{}},t)}))),{bids:n,paapi:s}}catch(s){Qt(s)}return n},getUserSyncs:(e,t,n,i,r)=>{var o,s;let a=""+Of;return n&&(a+="&gdpr="+(n.gdprApplies?1:0),a+="&gdpr_consent="+encodeURIComponent(n.consentString||"")),i&&(a+="&us_privacy="+encodeURIComponent(i)),(null==r?void 0:r.gppString)&&(null==(o=null==r?void 0:r.applicableSections)?void 0:o.length)&&(a+="&gpp="+encodeURIComponent(r.gppString),a+="&gpp_sid="+encodeURIComponent(null==(s=null==r?void 0:r.applicableSections)?void 0:s.join(","))),!0===lt.getConfig("coppa")&&(a+="&coppa=1"),e.iframeEnabled?[{type:"iframe",url:"https://ads.pubmatic.com/AdServer/js/user_sync.html?kdntuid=1&p="+a}]:[{type:"image",url:"https://image8.pubmatic.com/AdServer/ImgSync?p="+a}]}});const Jf={[Dr]:"banner",[Rr]:"native",[Or]:"video"};const Kf={[Ma]:{extPrebid:{fn:function(e,t){var n;wt(e,"ext.prebid",Yn({auctiontimestamp:t.auctionStart,targeting:{includewinners:!0,includebidderkeys:!1}},null==(n=e.ext)?void 0:n.prebid)),lt.getConfig("debug")&&(e.ext.prebid.debug=!0)}},extPrebidChannel:{fn:function(e){var t,n;wt(e,"ext.prebid.channel",Object.assign({name:"pbjs",version:bt().version},null==(n=null==(t=e.ext)?void 0:t.prebid)?void 0:n.channel))}},extPrebidAliases:{fn:function(e,t,n,{am:i=Sa}={}){var r;if(i.aliasRegistry[t.bidderCode]){const n=i.bidderRegistry[t.bidderCode];if(!n||!n.getSpec().skipPbsAliasing){wt(e,`ext.prebid.aliases.${t.bidderCode}`,i.aliasRegistry[t.bidderCode]);const o=lt.getConfig(`gvlMapping.${t.bidderCode}`)||(null==(r=null==n?void 0:n.getSpec)?void 0:r.call(n).gvlid);o&&wt(e,`ext.prebid.aliasgvlids.${t.bidderCode}`,o)}}}}},[za]:{params:{fn:function(e,t){let n=t.params;n&&wt(e,`ext.prebid.bidder.${t.bidder}`,n)}},adUnitCode:{fn:function(e,t){const n=t.adUnitCode;n&&wt(e,"ext.prebid.adunitcode",n)}}},[La]:{mediaType:{fn:function(e,t,n){var i,r;let o=n.mediaType;o||(o=tm.hasOwnProperty(t.mtype)?tm[t.mtype]:null==(r=null==(i=t.ext)?void 0:i.prebid)?void 0:r.type,Jf.hasOwnProperty(o)||(o=Dr)),e.mediaType=o},priority:99},videoCache:{fn:function(e,t){if(e.mediaType===Or){let{cacheId:n,url:i}=yt(t,"ext.prebid.cache.vastXml")||{};if(!n||!i){const{hb_uuid:e,hb_cache_host:r,hb_cache_path:o}=yt(t,"ext.prebid.targeting")||{};e&&r&&o&&(n=e,i=`https://${r}${o}?uuid=${e}`)}n&&i&&Object.assign(e,{videoCacheKey:n,vastUrl:i})}},priority:-10},bidderCode:{fn(e,t,n){var i;e.bidderCode=n.seatbid.seat,e.adapterCode=yt(t,"ext.prebid.meta.adaptercode")||(null==(i=n.bidRequest)?void 0:i.bidder)||e.bidderCode}},pbsBidId:{fn(e,t){const n=yt(t,"ext.prebid.bidid");dn(n)&&(e.pbsBidId=n)}},adserverTargeting:{fn(e,t){const n=yt(t,"ext.prebid.targeting");un(n)&&(e.adserverTargeting=n)}},extPrebidMeta:{fn(e,t){e.meta=Yn({},yt(t,"ext.prebid.meta"),e.meta)}},pbsWurl:{fn(e,t){const n=yt(t,"ext.prebid.events.win");dn(n)&&(e.pbsWurl=n)}}},[Va]:{serverSideStats:{fn(e,t,n){Object.entries({errors:"serverErrors",responsetimemillis:"serverResponseTimeMs"}).forEach((([e,i])=>{const r=yt(t,`ext.${e}.${n.bidderRequest.bidderCode}`);r&&(n.bidderRequest[i]=r,n.bidRequests.forEach((e=>e[i]=r)))}))}}}},Xf=ei((()=>im(om(),Kf,Ka(Ga)))),Yf=["user.keywords"].concat(id.flatMap((e=>["keywords","content.keywords"].map((t=>`${e}.${t}`)))));function Qf(e,...t){return function(...e){const t=new Set;return e.filter((e=>e)).flatMap((e=>Array.isArray(e)?e:e.split(","))).map((e=>e.replace(/^\s*/,"").replace(/\s*$/,""))).filter((e=>e)).forEach((e=>t.add(e))),Array.from(t.keys())}(...Yf.map((t=>yt(e,t))),...t)}const Zf="https://video-outstream.rubiconproject.com/apex-2.2.1.js";let eg=lt.getConfig("rubicon")||{};lt.getConfig("rubicon",(e=>{Yn(eg,e.rubicon)}));var tg={1:"468x60",2:"728x90",5:"120x90",7:"125x125",8:"120x600",9:"160x600",10:"300x600",13:"200x200",14:"250x250",15:"300x250",16:"336x280",17:"240x400",19:"300x100",31:"980x120",32:"250x360",33:"180x500",35:"980x150",37:"468x400",38:"930x180",39:"750x100",40:"750x200",41:"750x300",42:"2x4",43:"320x50",44:"300x50",48:"300x300",53:"1024x768",54:"300x1050",55:"970x90",57:"970x250",58:"1000x90",59:"320x80",60:"320x150",61:"1000x1000",64:"580x500",65:"640x480",66:"930x600",67:"320x480",68:"1800x1000",72:"320x320",73:"320x160",78:"980x240",79:"980x300",80:"980x400",83:"480x300",85:"300x120",90:"548x150",94:"970x310",95:"970x100",96:"970x210",101:"480x320",102:"768x1024",103:"480x280",105:"250x800",108:"320x240",113:"1000x300",117:"320x100",125:"800x250",126:"200x600",144:"980x600",145:"980x150",152:"1000x250",156:"640x320",159:"320x250",179:"250x600",195:"600x300",198:"640x360",199:"640x200",213:"1030x590",214:"980x360",221:"1x1",229:"320x180",230:"2000x1400",232:"580x400",234:"6x6",251:"2x2",256:"480x820",257:"400x600",258:"500x200",259:"998x200",261:"480x480",264:"970x1000",265:"1920x1080",274:"1800x200",278:"320x500",282:"320x400",288:"640x380",484:"720x1280",524:"1x2",548:"500x1000",550:"980x480",552:"300x200",558:"640x640",562:"300x431",564:"320x431",566:"320x300",568:"300x150",570:"300x125",572:"250x350",574:"620x891",576:"610x877",578:"980x552",580:"505x656",622:"192x160",632:"1200x450",634:"340x450"};gn(tg,((e,t)=>tg[e]=t));const ng=rm({request(e,t,n,i){var r,o;const{bidRequests:s}=i,a=e(t,n,i);var d;a.cur=["USD"],a.test=lt.getConfig("debug")?1:0,wt(a,"ext.prebid.cache",{vastxml:{returnCreative:!0===eg.returnVast}}),wt(a,"ext.prebid.bidders",{rubicon:{integration:eg.int_type||"pbjs"}}),wt(a,"ext.prebid.targeting.pricegranularity",{ranges:{low:[{max:5,increment:.5}],medium:[{max:20,increment:.1}],high:[{max:20,increment:.01}],auto:[{max:5,increment:.05},{min:5,max:10,increment:.1},{min:10,max:20,increment:.5}],dense:[{max:3,increment:.01},{min:3,max:8,increment:.05},{min:8,max:20,increment:.5}],custom:(d=lt).getConfig("customPriceBucket")&&d.getConfig("customPriceBucket").buckets}[d.getConfig("priceGranularity")]});let l=bt().installedModules;!l||l.length&&-1===l.indexOf("rubiconAnalyticsAdapter")||wt(a,"ext.prebid.analytics",{rubicon:{"client-analytics":!0}}),function(e,t,n){var i,r;let o={};const s=Qf(n,...t.map((e=>e.params.keywords)));t.forEach((t=>{var n,i,r,s,a;const d={user:{ext:{data:{...t.params.visitor}}},site:{ext:{data:{...t.params.inventory}}}},l=e.imp.find((e=>{var t,n,i,r,o;return null==(o=null==(r=null==(i=null==(n=null==(t=e.ext)?void 0:t.prebid)?void 0:n.bidder)?void 0:i.rubicon)?void 0:r.video)?void 0:o.language}));l&&(d.site.content={language:null==(a=null==(s=null==(r=null==(i=null==(n=l.ext)?void 0:n.prebid)?void 0:i.bidder)?void 0:r.rubicon)?void 0:s.video)?void 0:a.language}),o=Yn(o,t.ortb2||{},d);const c=lt.getConfig("user.id");o.user.id=o.user.id||c})),Yn(e,o),s&&s.length&&wt(e,"site.keywords",s.join(","));null==(r=null==(i=null==e?void 0:e.ext)?void 0:i.prebid)||delete r.storedrequest}(a,s,n.ortb2),null==(o=null==(r=null==a?void 0:a.ext)?void 0:r.prebid)||delete o.storedrequest,!0===eg.disableFloors&&delete a.ext.prebid.floors;return s.filter((e=>"object"==typeof e.floorData)).length>0&&(a.ext.prebid.floors={enabled:!1}),a},imp(e,t,n){var i,r;const o=lg(t);if(o.includes(Dr)&&1==o.length)return;const s=e(t,n);return s.id=t.adUnitCode,delete s.banner,"atf"===t.params.position&&s.video&&(s.video.pos=1),"btf"===t.params.position&&s.video&&(s.video.pos=3),null==(r=null==(i=s.ext)?void 0:i.prebid)||delete r.storedrequest,!0===t.params.bidonmultiformat&&o.length>1&&wt(s,"ext.prebid.bidder.rubicon.formats",o),function(e,t){"USD"!=t.bidfloorcur&&(delete t.bidfloor,delete t.bidfloorcur);if(!t.bidfloor){let n=parseFloat(yt(e,"params.floor"));isNaN(n)||(t.bidfloor=n,t.bidfloorcur="USD")}}(t,s),s},bidResponse(e,t,n){var i;const r=e(t,n);r.meta.mediaType=yt(t,"ext.prebid.type");const{bidRequest:o}=n;let[s,a]="outstream"===(null==(i=o.mediaTypes.video)?void 0:i.context)?sg(o,Or):[void 0,void 0];return r.width=t.w||s||r.playerWidth||0,r.height=t.h||a||r.playerHeight||0,r.mediaType===Or&&"outstream"===o.mediaTypes.video.context&&(r.renderer=function(e){const t=Ci.install({id:e.adId,url:eg.rendererUrl||Zf,config:eg.rendererConfig||{},loaded:!1,adUnitCode:e.adUnitCode});try{t.setRender(og)}catch(n){Yt("Prebid Error calling setRender on renderer",n)}return t}(r)),yt(t,"ext.bidder.rp.advid")&&wt(r,"meta.advertiserId",t.ext.bidder.rp.advid),r},context:{netRevenue:!1!==eg.netRevenue,ttl:360},processors:Xf}),ig={code:"rubicon",gvlid:52,supportedMediaTypes:[Dr,Or,Rr],isBidRequestValid:function(e){let t=!0;if("object"!=typeof e.params)return!1;for(let r=0,o=["accountId","siteId","zoneId"];r<o.length;r++)if(e.params[o[r]]=parseInt(e.params[o[r]]),isNaN(e.params[o[r]]))return Qt("Rubicon: wrong format of accountId or siteId or zoneId."),!1;let n=lg(e,!0);if(!n.length)return!1;n.includes(Or)&&(t=function(e){let t=!0,n=Object.prototype.toString.call([]),i=Object.prototype.toString.call(0);var r={mimes:n,protocols:n,linearity:i};return Object.keys(r).forEach((function(n){Object.prototype.toString.call(yt(e,"mediaTypes.video."+n))!==r[n]&&(t=!1,Qt("Rubicon: mediaTypes.video."+n+" is required and must be of type: "+r[n]))})),t}(e));const i=[Dr,Rr].filter((e=>n.includes(e))).length>0;return i?t&&i:t},buildRequests:function(e,t){let n,i=[],r=[];if(n=e.filter((e=>{const t=lg(e)||[],{length:n}=t,{bidonmultiformat:i,video:r}=e.params||{};return 1===n&&(t.includes(Or)||t.includes(Rr))||2===n&&!t.includes(Dr)||r&&t.includes(Or)||i&&(t.includes(Or)||t.includes(Rr))})),n&&n.length){const e=ng.toORTB({bidRequests:n,bidderRequest:t});r.push({method:"POST",url:`https://${eg.videoHost||"prebid-server"}.rubiconproject.com/openrtb2/auction`,data:e,bidRequest:n})}const o=e.filter((e=>{const t=lg(e)||[],{bidonmultiformat:n,video:i}=e.params||{};return t.includes(Dr)&&(1===t.length||n||!n&&!i||!n&&i&&!t.includes(Or))}));if(!0!==eg.singleRequest)i=r.concat(o.map((e=>{const n=ig.createSlotParams(e,t);return{method:"GET",url:`https://${eg.bannerHost||"fastlane"}.rubiconproject.com/a/api/fastlane.json`,data:ig.getOrderedParams(n).reduce(((e,t)=>{const i=n[t];return dn(i)&&""!==i||cn(i)?`${e}${ug(t,i)}&`:e}),"")+`slots=1&rand=${Math.random()}`,bidRequest:e}})));else{const e=o.reduce(((e,t)=>((e[t.params.siteId]=e[t.params.siteId]||[]).push(t),e)),{}),n=10;i=r.concat(Object.keys(e).reduce(((i,r)=>{var o,s;return(o=e[r],s=n,o.map(((e,t)=>t%s==0?o.slice(t,t+s):null)).filter((e=>e))).forEach((e=>{const n=ig.combineSlotUrlParams(e.map((e=>ig.createSlotParams(e,t))));i.push({method:"GET",url:`https://${eg.bannerHost||"fastlane"}.rubiconproject.com/a/api/fastlane.json`,data:ig.getOrderedParams(n).reduce(((e,t)=>{const i=n[t];return dn(i)&&""!==i||cn(i)?`${e}${ug(t,i)}&`:e}),"")+`slots=${e.length}&rand=${Math.random()}`,bidRequest:e})})),i}),[]))}return i},getOrderedParams:function(e){const t=/^tg_v/,n=/^tg_i/,i=/^eid_|^tpid_/,r=["account_id","site_id","zone_id","size_id","alt_size_ids","p_pos","gdpr","gdpr_consent","us_privacy","gpp","gpp_sid","rp_schain"].concat(Object.keys(e).filter((e=>i.test(e)))).concat(["x_liverampidl","ppuid","rf","p_geo.latitude","p_geo.longitude","kw"]).concat(Object.keys(e).filter((e=>t.test(e)))).concat(Object.keys(e).filter((e=>n.test(e)))).concat(["tk_flint","x_source.tid","l_pb_bid_id","p_screen_res","o_ae","o_cdep","rp_floor","rp_secure","tk_user_key"]);return r.concat(Object.keys(e).filter((e=>-1===r.indexOf(e))))},combineSlotUrlParams:function(e){if(1===e.length)return e[0];const t=e.reduce((function(t,n,i){return Object.keys(n).forEach((function(r){t.hasOwnProperty(r)||(t[r]=new Array(e.length)),t[r].splice(i,1,n[r])})),t}),{}),n=new RegExp("^([^;]*)(;\\1)+$");return Object.keys(t).forEach((function(e){const i=t[e].join(";"),r=i.match(n);t[e]=r?r[1]:i})),t},createSlotParams:function(e,t){var n,i,r,o,s,a,d,l,c,u,p,m;e.startTime=(new Date).getTime();const f=e.params,g=sg(e,"banner"),[h,v]=f.latLong||[],b={account_id:f.accountId,site_id:f.siteId,zone_id:f.zoneId,size_id:g[0],alt_size_ids:g.slice(1).join(",")||void 0,rp_floor:(f.floor=parseFloat(f.floor))>=.01?f.floor:void 0,rp_secure:"1",tk_flint:`${eg.int_type||"pbjs_lite"}_v9.10.0`,"x_source.tid":null==(i=null==(n=t.ortb2)?void 0:n.source)?void 0:i.tid,"x_imp.ext.tid":null==(o=null==(r=e.ortb2Imp)?void 0:r.ext)?void 0:o.tid,l_pb_bid_id:e.bidId,o_cdep:null==(d=null==(a=null==(s=e.ortb2)?void 0:s.device)?void 0:a.ext)?void 0:d.cdep,p_screen_res:[window.screen.width,window.screen.height].join("x"),tk_user_key:f.userId,"p_geo.latitude":isNaN(parseFloat(h))?void 0:parseFloat(h).toFixed(4),"p_geo.longitude":isNaN(parseFloat(v))?void 0:parseFloat(v).toFixed(4),"tg_fl.eid":e.code,rf:rg(e,t)};if("function"==typeof e.getFloor&&!eg.disableFloors){let t;try{t=e.getFloor({currency:"USD",mediaType:"banner",size:"*"})}catch(I){Qt("Rubicon: getFloor threw an error: ",I)}b.rp_hard_floor="object"!=typeof t||"USD"!==t.currency||isNaN(parseInt(t.floor))?void 0:t.floor}!0===f.bidonmultiformat&&yt(e,"mediaTypes")&&Object.keys(e.mediaTypes).length>1&&(b.p_formats=Object.keys(e.mediaTypes).join(","));let y={1:"atf",3:"btf"}[yt(e,"mediaTypes.banner.pos")]||"";b.p_pos="atf"===f.position||"btf"===f.position?f.position:y;const w=lt.getConfig("user.id");return w&&(b.ppuid=w),(null==(c=null==(l=null==e?void 0:e.ortb2Imp)?void 0:l.ext)?void 0:c.ae)&&(b.o_ae=1),function(e,t){var n,i,r,o,s,a,d;if(!1===eg.readTopics)return;let l=[1,2,5,6,7,507].concat((null==(n=eg.sendSiteSegtax)?void 0:n.map((e=>Number(e))))||[]),c=[4,508].concat((null==(i=eg.sendUserSegtax)?void 0:i.map((e=>Number(e))))||[]),u=(null==(o=null==(r=e.ortb2)?void 0:r.user)?void 0:o.data)||[],p=(null==(d=null==(a=null==(s=e.ortb2)?void 0:s.site)?void 0:a.content)?void 0:d.data)||[];u.forEach(ag(t,"v",c)),p.forEach(ag(t,"i",l))}(t,b),e.userIdAsEids&&e.userIdAsEids.forEach((e=>{try{if("adserver.org"===e.source)b.tpid_tdid=e.uids[0].id,b["eid_adserver.org"]=e.uids[0].id;else if("liveintent.com"===e.source)b["tpid_liveintent.com"]=e.uids[0].id,b["eid_liveintent.com"]=e.uids[0].id,e.ext&&Array.isArray(e.ext.segments)&&e.ext.segments.length&&(b["tg_v.LIseg"]=e.ext.segments.join(","));else if("liveramp.com"===e.source)b.x_liverampidl=e.uids[0].id;else if("id5-sync.com"===e.source)b["eid_id5-sync.com"]=`${e.uids[0].id}^${e.uids[0].atype}^${e.uids[0].ext&&e.uids[0].ext.linkType||""}`;else{const t="rubiconproject.com"===e.source?e.uids[0].id:`${e.uids[0].id}^${e.uids[0].atype||""}`;b[`eid_${e.source}`]=t}if(!b.ppuid){const t=Ae(e.uids,(e=>e.ext&&"ppuid"===e.ext.stype));t&&t.id&&(b.ppuid=t.id)}}catch(I){Yt("Rubicon: error reading eid:",e,I)}})),t.gdprConsent&&("boolean"==typeof t.gdprConsent.gdprApplies&&(b.gdpr=Number(t.gdprConsent.gdprApplies)),b.gdpr_consent=t.gdprConsent.consentString),t.uspConsent&&(b.us_privacy=encodeURIComponent(t.uspConsent)),(null==(u=t.gppConsent)?void 0:u.gppString)&&(b.gpp=t.gppConsent.gppString,b.gpp_sid=null==(m=null==(p=t.gppConsent)?void 0:p.applicableSections)?void 0:m.toString()),b.rp_maxbids=t.bidLimit||1,function(e,t,n){const i={user:{ext:{data:{...e.params.visitor}}},site:{ext:{data:{...e.params.inventory}}}};e.params.keywords&&(i.site.keywords=ln(e.params.keywords)?e.params.keywords.join(","):e.params.keywords);let r=Yn({},e.ortb2||{},i);yt(e.ortb2Imp,"ext");let o=yt(e.ortb2Imp,"ext.data")||{};const s=yt(e,"ortb2Imp.ext.gpid"),a=yt(r,"regs.ext.dsa"),d={user:[4],site:[1,2,5,6]},l={user:"tg_v.",site:"tg_i.",adserver:"tg_i.dfp_ad_unit_code",pbadslot:"tg_i.pbadslot",keywords:"kw"},c=function(e,t,n){return"data"===t&&Array.isArray(e)?e.filter((e=>e.segment&&yt(e,"ext.segtax")&&d[n]&&-1!==d[n].indexOf(yt(e,"ext.segtax")))).map((e=>{let t=e.segment.filter((e=>e.id)).reduce(((e,t)=>(e.push(t.id),e)),[]);if(t.length>0)return t.toString()})).toString():("object"!=typeof e||Array.isArray(e))&&void 0!==e?Array.isArray(e)?e.filter((e=>{if("object"!=typeof e&&void 0!==e)return e.toString();Yt("Rubicon: Filtered value: ",e,"for key",t,": Expected value to be string, integer, or an array of strings/ints")})).toString():e.toString():void 0},u=function(e,t,i,r=!0){let o=c(e,i,t),s=l[i]&&r?`${l[i]}`:"data"===i?`${l[t]}iab`:`${l[t]}${i}`;n[s]=n[s]?n[s].concat(",",o):o};{["site","user"].forEach((e=>{Object.keys(r[e]).forEach((t=>{"site"===e&&"content"===t&&r[e][t].data?u(r[e][t].data,e,"data"):"ext"!==t?u(r[e][t],e,t):r[e][t].data&&Object.keys(r[e].ext.data).forEach((t=>{u(r[e].ext.data[t],e,t,!1)}))}))})),Object.keys(o).forEach((e=>{"adserver"!==e?u(o[e],"site",e):"gam"===o[e].name&&u(o[e].adslot,name,e)})),s&&(n.p_gpid=s),a&&Object.keys(a).length&&Vn(a,["dsainfo",e=>n.dsainfo=e,"dsarequired",e=>n.dsarequired=e,"pubrender",e=>n.dsapubrender=e,"datatopub",e=>n.dsadatatopubs=e,"transparency",e=>{Array.isArray(e)&&e.length&&(n.dsatransparency=e.reduce(((e,t)=>{const n=t.domain||"";if(!n)return e;const i=t.dsaparams||t.params;return Array.isArray(i)&&0!==i.length?(e&&(e+="~~"),e+`${n}~${i.join("_")}`):e}),""))}]),n["tg_i.pbadslot"]&&delete n["tg_i.dfp_ad_unit_code"];const e=yt(r,"device.sua");e&&!1!==eg.chEnabled&&Vn(e,["architecture",e=>n.m_ch_arch=e,"bitness",e=>n.m_ch_bitness=e,"browsers",e=>{var t,i;if(!Array.isArray(e))return;const[r,o]=e.reduce(((e,t)=>{var n,i,r;return e[0].push(`"${null==t?void 0:t.brand}"|v="${null==(n=null==t?void 0:t.version)?void 0:n[0]}"`),e[1].push(`"${null==t?void 0:t.brand}"|v="${null==(r=null==(i=null==t?void 0:t.version)?void 0:i.join)?void 0:r.call(i,".")}"`),e}),[[],[]]);n.m_ch_ua=null==(t=null==r?void 0:r.join)?void 0:t.call(r,","),n.m_ch_full_ver=null==(i=null==o?void 0:o.join)?void 0:i.call(o,",")},"mobile",e=>n.m_ch_mobile=`?${e}`,"model",e=>n.m_ch_model=e,"platform",e=>{var t,i;n.m_ch_platform=null==e?void 0:e.brand,n.m_ch_platform_ver=null==(i=null==(t=null==e?void 0:e.version)?void 0:t.join)?void 0:i.call(t,".")}])}}(e,0,b),!0===lt.getConfig("coppa")&&(b.coppa=1),e.schain&&cg(e.schain)&&(b.rp_schain=ig.serializeSupplyChain(e.schain)),b},serializeSupplyChain:function(e){if(!cg(e))return"";const{ver:t,complete:n,nodes:i}=e;return`${t},${n}!${ig.serializeSupplyChainNodes(i)}`},serializeSupplyChainNodes:function(e){const t=["asi","sid","hp","rid","name","domain"];return e.map((e=>t.map((t=>encodeURIComponent(e[t]||""))).join(","))).join("!")},interpretResponse:function(e,t){var n;e=e.body;const{data:i}=t;if(!e||"object"!=typeof e)return[];if(e.seatbid){const t=yt(e,"ext.errors.rubicon");Array.isArray(t)&&t.length>0&&Yt("Rubicon: Error in video response");return ng.fromORTB({request:i,response:e}).bids}let r,o=e.ads,s=0;const{bidRequest:a}=t;if("object"==typeof a&&!Array.isArray(a)&&lg(a).includes(Or)&&"object"==typeof o&&(o=o[a.adUnitCode]),!Array.isArray(o)||o.length<1)return[];let d=o.reduce(((t,n,i)=>{if(n.impression_id&&r===n.impression_id?s++:r=n.impression_id,"ok"!==n.status)return t;const o=Array.isArray(a)?a[i-s]:a;if(o&&"object"==typeof o){let e={requestId:o.bidId,currency:"USD",creativeId:n.creative_id||`${n.network||""}-${n.advertiser||""}`,cpm:n.cpm||0,dealId:n.deal,ttl:360,netRevenue:!1!==eg.netRevenue,rubicon:{advertiserId:n.advertiser,networkId:n.network},meta:{advertiserId:n.advertiser,networkId:n.network,mediaType:Dr}};n.creative_type&&(e.mediaType=n.creative_type),n.dsa&&Object.keys(n.dsa).length&&(e.meta.dsa=n.dsa),n.adomain&&(e.meta.advertiserDomains=Array.isArray(n.adomain)?n.adomain:[n.adomain]),n.creative_type===Or?(e.width=o.params.video.playerWidth,e.height=o.params.video.playerHeight,e.vastUrl=n.creative_depot_url,e.impression_id=n.impression_id,e.videoCacheKey=n.impression_id):(e.ad=(d=n.script,`<html>\n<head><script type='text/javascript'>inDapIF=true;<\/script></head>\n<body style='margin : 0; padding: 0;'>\n\x3c!-- Rubicon Project Ad Tag --\x3e\n<div data-rp-impression-id='${n.impression_id}'>\n<script type='text/javascript'>${d}<\/script>\n</div>\n</body>\n</html>`),[e.width,e.height]=tg[n.size_id].split("x").map((e=>Number(e)))),e.rubiconTargeting=(Array.isArray(n.targeting)?n.targeting:[]).reduce(((e,t)=>(e[t.key]=t.values[0],e)),{rpfl_elemid:o.adUnitCode}),t.push(e)}else Qt(`Rubicon: bidRequest undefined at index position:${i}`,a,e);var d;return t}),[]).sort(((e,t)=>(t.cpm||0)-(e.cpm||0))),l=null==(n=e.component_auction_config)?void 0:n.map((e=>({config:e,bidId:e.bidId})));return l?{bids:d,paapi:l}:d},getUserSyncs:function(e,t,n,i,r){var o;if(!pg&&e.iframeEnabled){let e={};return n&&("boolean"==typeof n.gdprApplies&&(e.gdpr=Number(n.gdprApplies)),"string"==typeof n.consentString&&(e.gdpr_consent=n.consentString)),i&&(e.us_privacy=encodeURIComponent(i)),(null==r?void 0:r.gppString)&&(e.gpp=r.gppString,e.gpp_sid=null==(o=r.applicableSections)?void 0:o.toString()),e=Object.keys(e).length?`?${Hn(e)}`:"",pg=!0,{type:"iframe",url:`https://${eg.syncHost||"eus"}.rubiconproject.com/usync.html`+e}}}};function rg(e,t){let n;return n=e.params.referrer?e.params.referrer:t.refererInfo.page,e.params.secure?n.replace(/^http:/i,"https:"):n}function og(e){const t=document.getElementById(e.adUnitCode);!function(e){const t=e.querySelector("div[id^='google_ads']");t&&t.style.setProperty("display","none")}(t),function(e){const t=e.querySelector("script[id^='sas_script']"),n=t&&t.nextSibling;n&&"iframe"===n.localName&&n.style.setProperty("display","none")}(t);const n={align:"center",position:"append",closeButton:!1,label:void 0,collapse:!0,...e.renderer.getConfig()};e.renderer.push((()=>{window.MagniteApex.renderAd({width:e.width,height:e.height,vastUrl:e.vastUrl,placement:{attachTo:t,align:n.align,position:n.position},closeButton:n.closeButton,label:n.label,collapse:n.collapse})}))}function sg(e,t){let n=e.params;if(t===Or){let t=[];return n.video&&n.video.playerWidth&&n.video.playerHeight?t=[n.video.playerWidth,n.video.playerHeight]:Array.isArray(yt(e,"mediaTypes.video.playerSize"))&&1===e.mediaTypes.video.playerSize.length?t=e.mediaTypes.video.playerSize[0]:Array.isArray(e.sizes)&&e.sizes.length>0&&Array.isArray(e.sizes[0])&&e.sizes[0].length>1&&(t=e.sizes[0]),t}let i=[];return Array.isArray(n.sizes)?i=n.sizes:void 0!==yt(e,"mediaTypes.banner.sizes")?i=dg(e.mediaTypes.banner.sizes):Array.isArray(e.sizes)&&e.sizes.length>0?i=dg(e.sizes):Yt("Rubicon: no sizes are setup or found"),function(e){const t=[15,2,9];return e.sort(((e,n)=>{const i=t.indexOf(e),r=t.indexOf(n);return i>-1||r>-1?-1===i?1:-1===r?-1:i-r:e-n}))}(i)}function ag(e,t,n){return i=>{var r,o;const s=Number(null==(r=i.ext)?void 0:r.segtax);n.includes(s)&&(e[`tg_${t}.tax${s}`]=null==(o=i.segment)?void 0:o.map((e=>e.id)).join(","))}}function dg(e){return Mt(e).reduce(((e,t)=>{let n=parseInt(tg[t],10);return n&&e.push(n),e}),[])}function lg(e,t=!1){let n=[];if(function(e){let t=void 0!==yt(e,`mediaTypes.${Or}`),n=void 0!==yt(e,`mediaTypes.${Dr}`),i=void 0!==yt(e,"params.bidonmultiformat"),r="object"!=typeof yt(e,"params.video");return!(!t||!i)||(n&&r&&(t=!1),t&&r&&wt(e,"params.video",{}),t)}(e)){if(-1===["outstream","instream"].indexOf(yt(e,`mediaTypes.${Or}.context`)))return t&&Qt("Rubicon: mediaTypes.video.context must be outstream or instream"),n;if(sg(e,Or).length<2)return t&&Qt("Rubicon: could not determine the playerSize of the video"),n;t&&Kt("Rubicon: making video request for adUnit",e.adUnitCode),n.push(Or)}if(void 0!==yt(e,`mediaTypes.${Rr}`)&&n.push(Rr),void 0!==yt(e,`mediaTypes.${Dr}`)){if(0===sg(e,Dr).length)return t&&Qt("Rubicon: could not determine the sizes for banner request"),n;t&&Kt("Rubicon: making banner request for adUnit",e.adUnitCode),n.push(Dr)}return n}function cg(e){let t=!1;const n=["asi","sid","hp"];return e.nodes?(t=e.nodes.reduce(((e,t)=>e?n.every((e=>t.hasOwnProperty(e))):e),!0),t||Qt("Rubicon: required schain params missing"),t):t}function ug(e,t){return"rp_schain"===e?`rp_schain=${t}`:`${e}=${encodeURIComponent(t)}`}var pg=!1;zs(ig);const mg=["inScreen","inImage","inArticle","inBanner"],fg={[Dr]:"display",[Or]:"video"},gg="fixed",hg="mobile",vg="unknown",bg=()=>{const e=navigator.connection||navigator.mozConnection||navigator.webkitConnection||{};switch(e.type||e.effectiveType){case"wifi":case"ethernet":return gg;case"cellular":case"wimax":return hg;default:return/iPad|iPhone|iPod/.test(navigator.userAgent)||/android/i.test(navigator.userAgent)?vg:gg}};function yg(e){return!!e.mediaTypes&&!!e.mediaTypes.video}function wg(e){const t=e.params;return!!t.publisherId&&!!t.adUnitId&&mg.indexOf(t.placement)>-1}function Ig(e){var t,n,i,r;const o=e.params,s=hn(Object.keys(e.mediaTypes),(function(e){return fg[e]})),a={id:e.bidId,transactionId:null==(n=null==(t=e.ortb2Imp)?void 0:t.ext)?void 0:n.tid,gpid:null==(r=null==(i=e.ortb2Imp)?void 0:i.ext)?void 0:r.gpid,sizes:e.sizes,supplyTypes:s,adUnitId:o.adUnitId,adUnitCode:e.adUnitCode,geom:Eg(e.adUnitCode),placement:o.placement,requestCount:e.bidderRequestsCount||1};return yg(e)&&(a.videoParams=Tg(e)),a}function Tg(e){const t=e.mediaTypes.video||{};return t.playerSize&&(t.w=t.playerSize[0][0],t.h=t.playerSize[0][1]),t}function Cg(e){const t="display"===(n=e.mediaType)?Dr:"video"===n?Or:n;var n;const i={requestId:e.bidId,cpm:e.price,width:e.width,height:e.height,creativeId:e.creativeId,currency:e.currency,netRevenue:!0,mediaType:t,ttl:e.ttl,nurl:e.nurl,meta:{advertiserDomains:e&&e.adomain&&e.adomain.length>0?e.adomain:[]}};return t===Or?i.vastXml=e.content:i.ad=e.content,i}function Ag(){const e=(()=>{try{const e=performance.getEntriesByType("navigation")[0];return Math.round(e.responseStart-e.startTime)}catch(e){try{const e=performance.timing;return Math.round(e.responseStart-e.fetchStart)}catch(t){return 0}}})();return e>=0&&e<=performance.now()?e:0}function Eg(e){const t=document.getElementById(e);if(t){const e=window.scrollY,{top:n,left:i,width:r,height:o}=t.getBoundingClientRect();return{scrollY:e,top:n,left:i,width:r,height:o,viewport:{width:window.innerWidth,height:window.innerHeight}}}}zs({code:"seedtag",gvlid:157,aliases:["st"],supportedMediaTypes:[Dr,Or],isBidRequestValid:e=>yg(e)?function(e){const t=Tg(e);let n=!!e.params.publisherId&&!!e.params.adUnitId&&yg(e)&&!!t.playerSize&&ln(t.playerSize)&&t.playerSize.length>0;return"inStream"===e.params.placement?n&&"instream"===t.context:n&&"outstream"===t.context&&function(e){return!!e.mediaTypes&&!!e.mediaTypes.banner}(e)&&wg(e)}(e):wg(e),buildRequests(e,t){var n,i,r,o,s,a,d,l,c,u;const p={url:t.refererInfo.page,publisherToken:e[0].params.publisherId,cmp:!!t.gdprConsent,timeout:t.timeout,version:"9.10.0",connectionType:bg(),auctionStart:t.auctionStart||Date.now(),ttfb:Ag(),bidRequests:hn(e,Ig),user:{topics:[],eids:[]}};if(p.cmp){const e=t.gdprConsent.gdprApplies;void 0!==e&&(p.ga=e),p.cd=t.gdprConsent.consentString}t.uspConsent&&(p.uspConsent=t.uspConsent),e[0].schain&&(p.schain=e[0].schain);let m=lt.getConfig("coppa");m&&(p.coppa=m),t.gppConsent?p.gppConsent={gppString:t.gppConsent.gppString,applicableSections:t.gppConsent.applicableSections}:(null==(i=null==(n=t.ortb2)?void 0:n.regs)?void 0:i.gpp)&&(p.gppConsent={gppString:t.ortb2.regs.gpp,applicableSections:t.ortb2.regs.gpp_sid}),(null==(o=null==(r=t.ortb2)?void 0:r.user)?void 0:o.data)&&(p.user.topics=t.ortb2.user.data),e[0]&&e[0].userIdAsEids&&(p.user.eids=e[0].userIdAsEids),(null==(s=t.ortb2)?void 0:s.bcat)&&(p.bcat=null==(a=t.ortb2)?void 0:a.bcat),(null==(d=t.ortb2)?void 0:d.badv)&&(p.badv=null==(l=t.ortb2)?void 0:l.badv),(null==(u=null==(c=t.ortb2)?void 0:c.device)?void 0:u.sua)&&(p.sua=t.ortb2.device.sua);return{method:"POST",url:"https://s.seedtag.com/c/hb/bid",data:JSON.stringify(p)}},interpretResponse:function(e){const t=e.body;return t&&t.bids&&ln(t.bids)?hn(t.bids,(function(e){return Cg(e)})):[]},getUserSyncs(e,t){const n=t[0];if(e.iframeEnabled&&n){const e=n.body.cookieSync;return e?[{type:"iframe",url:e}]:[]}return[]},onTimeout(e){const t=function(e){let t="";if(ln(e)&&e[0]&&ln(e[0].params)&&e[0].params[0]){const n=e[0].params[0],i=e[0].timeout;t="?publisherToken="+n.publisherId+"&adUnitId="+n.adUnitId+"&timeout="+i}return"https://s.seedtag.com/se/hb/timeout"+t}(e);yn(t)},onBidWon:function(e){e&&e.nurl&&yn(e.nurl)}});const Sg={code:"smartadserver",gvlid:45,aliases:["smart"],supportedMediaTypes:[Dr,Or],isBidRequestValid:function(e){return!!(e.params&&e.params.siteId&&e.params.pageId&&e.params.formatId)},serializeSupplyChain:function(e){if(!e||!e.nodes)return null;const t=["asi","sid","hp","rid","name","domain"];return`${e.ver},${e.complete}!`+e.nodes.map((e=>t.map((t=>e[t]?encodeURIComponent(e[t]):"")).join(","))).join("!")},adaptBannerSizes:function(e){return e.map((e=>({w:e[0],h:e[1]})))},fillPayloadForVideoBidRequest:function(e,t,n){const i=t.playerSize[0],r={maxbitrate:"vbrmax",maxduration:"vdmax",minbitrate:"vbrmin",minduration:"vdmin",placement:"vpt",plcmt:"vplcmt",skip:"skip"};e.mediaType=Or,e.isVideo="instream"===t.context,e.videoData={};for(const[o,s]of Object.entries(r))e.videoData={...e.videoData,...this.getValuableProperty(s,t[o])};e.videoData={...e.videoData,...this.getValuableProperty("playerWidth",i[0]),...this.getValuableProperty("playerHeight",i[1]),...this.getValuableProperty("adBreak",this.getStartDelayForVideoBidRequest(t,n)),...this.getValuableProperty("videoProtocol",this.getProtocolForVideoBidRequest(t,n)),...Wn(t.api)&&t.api.length?{iabframeworks:t.api.toString()}:{},...Wn(t.playbackmethod)&&t.playbackmethod.length?{vpmt:t.playbackmethod}:{}}},getValuableProperty:function(e,t){return"string"==typeof e&&zn(t)&&t?{[e]:t}:{}},getProtocolForVideoBidRequest:function(e,t){return void 0!==t&&t.protocol?t.protocol:void 0!==e&&Array.isArray(e.protocols)?Math.max.apply(Math,e.protocols):null},getStartDelayForVideoBidRequest:function(e,t){if(null==t?void 0:t.startDelay)return t.startDelay;if(null==e?void 0:e.startdelay){if(e.startdelay>0||-1==e.startdelay)return 2;if(-2==e.startdelay)return 3}return 1},createServerRequest:function(e,t){return{method:"POST",url:(void 0!==t?t:"https://prg.smartadserver.com")+"/prebid/v1",data:JSON.stringify(e),options:{browsingTopics:!1}}},buildRequests:function(e,t){const n=lt.getConfig("currency.adServerCurrency"),i=yt(t,"ortb2.user.data",lt.getAnyConfig("ortb2.user.data")),r=yt(t,"ortb2.site.content.data",lt.getAnyConfig("ortb2.site.content.data"));return e.reduce(((e,o)=>{var s,a;let d={siteid:o.params.siteId,pageid:o.params.pageId,formatid:o.params.formatId,currencyCode:n,targeting:o.params.target&&""!==o.params.target?o.params.target:void 0,buid:o.params.buId&&""!==o.params.buId?o.params.buId:void 0,appname:o.params.appName&&""!==o.params.appName?o.params.appName:void 0,ckid:o.params.ckId||0,tagId:o.adUnitCode,pageDomain:t&&t.refererInfo&&t.refererInfo.page?t.refererInfo.page:void 0,transactionId:null==(a=null==(s=o.ortb2Imp)?void 0:s.ext)?void 0:a.tid,timeout:lt.getConfig("bidderTimeout"),bidId:o.bidId,prebidVersion:"9.10.0",schain:Sg.serializeSupplyChain(o.schain),sda:i,sdc:r};const l=yt(o,"ortb2Imp.ext.gpid")||yt(o,"ortb2Imp.ext.data.pbadslot");l&&(d.gpid=l),t&&(t.gdprConsent&&(d.addtl_consent=t.gdprConsent.addtlConsent,d.gdpr_consent=t.gdprConsent.consentString,d.gdpr=t.gdprConsent.gdprApplies),t.gppConsent&&(d.gpp=t.gppConsent.gppString,d.gpp_sid=t.gppConsent.applicableSections),t.uspConsent&&(d.us_privacy=t.uspConsent)),o&&o.userIdAsEids&&(d.eids=o.userIdAsEids),t&&t.uspConsent&&(d.us_privacy=t.uspConsent);const c=yt(o,"mediaTypes.banner"),u=yt(o,"mediaTypes.video"),p=u&&("instream"===u.context||"outstream"===u.context);if(c||p){let t;if(c){if(t=Dr,d.sizes=Sg.adaptBannerSizes(c.sizes),p){let t=xn(d);Sg.fillPayloadForVideoBidRequest(t,u,o.params.video),t.bidfloor=o.params.bidfloor||Sg.getBidFloor(o,n,Or),e.push(Sg.createServerRequest(t,o.params.domain))}}else t=Or,Sg.fillPayloadForVideoBidRequest(d,u,o.params.video);d.bidfloor=o.params.bidfloor||Sg.getBidFloor(o,n,t),e.push(Sg.createServerRequest(d,o.params.domain))}else e.push({});return e}),[])},interpretResponse:function(e,t){const n=[];let i=e.body;try{if(i&&!i.isNoAd&&(i.ad||i.adUrl)){const e=JSON.parse(t.data);let r={requestId:e.bidId,cpm:i.cpm,width:i.width,height:i.height,creativeId:i.creativeId,dealId:i.dealId,currency:i.currency,netRevenue:i.isNetCpm,ttl:i.ttl,dspPixels:i.dspPixels,meta:{advertiserDomains:i.adomain?i.adomain:[]}};e.mediaType===Or?(r.mediaType=Or,r.vastUrl=i.adUrl,r.vastXml=i.ad,r.content=i.ad):(r.adUrl=i.adUrl,r.ad=i.ad),n.push(r)}}catch(r){Qt("Error while parsing smart server response",r)}return n},getBidFloor:function(e,t,n){if(!an(e.getFloor))return 0;const i=e.getFloor({currency:t||"USD",mediaType:n,size:"*"});return un(i)&&!isNaN(i.floor)?i.floor:0},getUserSyncs:function(e,t){const n=[];return e.iframeEnabled&&t.length>0&&null!=t[0].body.cSyncUrl?n.push({type:"iframe",url:t[0].body.cSyncUrl}):e.pixelEnabled&&t.length>0&&void 0!==t[0].body.dspPixels&&t[0].body.dspPixels.forEach((function(e){n.push({type:"image",url:e})})),n}};function xg(e){return Object.assign({wp:!0,run(e,t,n,i,r){const o=n&&n.hasOwnProperty(i),s=o?n[i]:void 0,a=o&&null!=s&&"object"==typeof s?xn(s):s;return function(){const n=null==t?e:yt(e,t),d=n&&ya(n[i]),l=d?n[i]:void 0;!o&&d&&r()?delete n[i]:o===d&&l===s&&Xn(l,a)||!r()||wt(e,(null==t?[]:[t]).concat(i).join("."),a)}}},e)}zs(Sg);const kg=function(e=or){return function(e){const t={},n=[];e.forEach((e=>{e.wp&&n.push(e),e.get&&e.paths.forEach((n=>{let i=t;n.split(".").forEach((e=>{i.children=i.children||{},i.children[e]=i.children[e]||{},i=i.children[e]})),i.rule=e}))}));const i=va(n);function r(e,t,n){return new Proxy(e,{get(e,i,o){const s=Reflect.get(e,i,o);if(t.hasOwnProperty(i)){const{children:e,rule:o}=t[i];if(e&&null!=s&&"object"==typeof s)return r(s,e,n);if(o&&ya(s)&&n(o))return o.get(s)}return s}})}return function(e,...n){const o={};return{obj:r(e,t.children||{},ba(o,...n)),verify:(s=i(o,e,...n),function(){s.forEach((e=>e()))})};var s}}(Ia(e).concat(function(e=or){return[{name:lr,paths:fa,applies:wa(lr,e)},{name:dr,paths:ma,applies:wa(dr,e)}].map(xg)}(e)))}();const _g=function(e=kg){return function(t,n){t.global=t.global||{},t.bidder=t.bidder||{};const i=new Set(Object.keys(t.bidder)),r=[];function o(t){const i=e(t,n);return r.push(i.verify),i.obj}const s={global:o(t.global),bidder:Object.fromEntries(Object.entries(t.bidder).map((([e,t])=>[e,o(t)])))};return{obj:s,verify(){Object.entries(s.bidder).filter((([e])=>!i.has(e))).forEach((([i,r])=>{const o={},s=e(o,n);Yn(s.obj,r),s.verify(),t.bidder[i]=o})),r.forEach((e=>e()))}}}}(),Ug=nr((e=>Sa.resolveAlias(e)));let Rg,Og,Dg=[],Bg=[],Pg=[];const jg=function(){let e=!1;return function(){e||(Object.entries({[je.AUCTION_INIT]:["onAuctionInitEvent"],[je.AUCTION_END]:["onAuctionEndEvent",Fg],[je.BID_RESPONSE]:["onBidResponseEvent"],[je.BID_REQUESTED]:["onBidRequestEvent"],[je.BID_ACCEPTED]:["onBidAcceptedEvent"]}).forEach((([e,[t,n]])=>{Kr(e,(e=>{n&&n(e),Bg.forEach((n=>{try{n[t]&&n[t](e,n.config,Og)}catch(i){Qt(`RTD provider '${n.name}': error in '${t}':`,i)}}))}))})),e=!0)}}();function Ng(){return{gdpr:sa.getConsentData(),usp:aa.getConsentData(),gpp:da.getConsentData(),coppa:!!lt.getConfig("coppa")}}function qg(){Og=Ng();let e=[];Pg.forEach((t=>{const n=Ae(Dg,(e=>e.name===t.name));n&&n.init&&n.init(t,Og)&&e.push(Object.assign(n,{config:t}))})),Bg=e,Xt(`Real time data module enabled, using submodules: ${Bg.map((e=>e.name)).join(", ")}`)}const $g=go("rtd",(function(e,t){Og=Ng();const n=[],i=[];Bg.forEach((e=>{if("function"!=typeof e.getBidRequestData)return;n.push(e);const t=e.config;t&&t.waitForIt&&i.push(e)}));const r=i.length&&Rg.auctionDelay&&Rg.auctionDelay>0;let o,s=i.length,a=!1;const d=[];if(!n.length)return c();function l(){a||(this.config&&this.config.waitForIt&&s--,0===s&&setTimeout(c,0))}function c(){a||(a=!0,clearTimeout(o),d.forEach((e=>e())),e.call(this,t))}o=setTimeout(c,r?Rg.auctionDelay:0),n.forEach((e=>{const n=_g(t.ortb2Fragments||{},Ug(ki,e.name));d.push(n.verify),e.getBidRequestData({...t,ortb2Fragments:n.obj},l.bind(e),e.config,Og)}))}));function Fg(e){const t=Bg.filter((e=>"function"==typeof e.getTargetingData));if(!t.length)return;const n=e.adUnitCodes;if(!n)return;let i=[];for(let o=t.length-1;o>=0;o--){const r=t[o].getTargetingData(n,t[o].config,Og,e);r&&"object"==typeof r?i.push(r):Yt("invalid getTargetingData response for sub module",t[o].name)}const r=function(e){if(!Array.isArray(e)||!e.length)return{};return e.reduce(((e,t)=>{for(let n in t)if(t.hasOwnProperty(n))if(e.hasOwnProperty(n)){const i=t[n];for(let t in i)i.hasOwnProperty(t)&&(e[n][t]=i[t])}else e[n]=t[n];return e}),{})}(i);return e.adUnits.forEach((e=>{const t=e.code&&r[e.code];t&&(Xt("RTD set ad unit targeting of",t,"for",e),e[Be.ADSERVER_TARGETING]=Object.assign(e[Be.ADSERVER_TARGETING]||{},t))})),e.adUnits}function Mg(e,...t){Bg.forEach((e=>{if("function"==typeof e.onDataDeletionRequest)try{e.onDataDeletionRequest(e.config)}catch(t){Qt(`Error executing ${e.name}.onDataDeletionRequest`,t)}})),e.apply(this,t)}Wi("realTimeData",(function(e){return Dg.push(e),ca.register(ki,e.name,e.gvlid),function(){const t=Dg.indexOf(e);t>=0&&(Dg.splice(t,1),qg())}})),function(e){const t=e.getConfig("realTimeData",(({realTimeData:e})=>{e.dataProviders?(t(),Rg=e,Pg=e.dataProviders,jg(),Li("startAuction").before($g,20),Sa.callDataDeletionRequest.before(Mg),qg()):Qt("missing parameters for real time module")}))}(lt);const zg="SirdataRTDModule",Lg="sirdata.com",Vg="Sirdata RTD: ",Wg="SDDAN",Gg=na().domain||window.location.hostname,Hg=Ir({moduleType:ki,moduleName:zg}),Jg=Sa.aliasRegistry||{},Kg={criteo:27443,openx:30342,pubmatic:30345,smaato:27520,triplelift:27518,yahoossp:30339,rubicon:27452,appnexus:27446,gourmetads:33394,mediasquare:27878,smartadserver:27440,proxistore:27484,ix:27248,sdRtdForGpt:27449,smilewanted:28690,taboola:33379,ttd:33382,zeta_global:33385,teads:33388,conversant:33391,improvedigital:33397,invibes:33400,sublime:33403,rtbhouse:33406,zeta_global_ssp:33385},Xg={id5:"id5-sync.com",id5id:"id5-sync.com",id5_id:"id5-sync.com",pubprovided_id:"pubProvidedId",ppid:"pubProvidedId","first-id.fr":"pubProvidedId",sharedid:"pubcid.org",publishercommonid:"pubcid.org","pubcid.org":"pubcid.org"};let Yg={partnerId:1,key:1,actualUrl:na().stack.pop()||na().page,cookieAccessGranted:!1,setGptKeyValues:!0,contextualMinRelevancyScore:30,preprod:!1,authorizedEids:["pubProvidedId","id5-sync.com","pubcid.org"],avoidPostContent:!1,sirdataDomain:"cookieless-data.com",bidders:[]};function Qg(e,t,n,i){const r=n.split(".");let o=new Date;o.setTime(o.getTime()+31536e6);for(let a=0;a<r.length;++a){const n=r.slice(r.length-a-1).join(".");try{if(Hg.setCookie(e,t,o.toUTCString(),"Lax","."+n),Hg.getCookie(e,null)===t)return!0}catch(s){Qt(Vg,s)}}return!1}function Zg(e,t){if(mn(e))return t;if(mn(t))return e;const n=[],i=e=>{e.forEach((e=>{if(e.uids){const t=Ee(n,(function(t){return t.source===e.source}));-1!==t?e.uids.forEach((e=>{n[t].uids.some((t=>t.id===e.id))||n[t].uids.push(e)})):n.push({...e,uids:[...e.uids]})}}))};return i(e),i(t),n}function eh(e,t){if(!e||!t)return!1;try{let n=document.implementation.createHTMLDocument("");n.documentElement.innerHTML=document.documentElement.innerHTML,n=function(e){if(e&&e.documentElement.textContent&&e.documentElement.textContent.length>500){const t=["div","span","a","article","section","p","h1","h2","body","b","u","i","big","mark","ol","small","strong","blockquote","nav","menu","li","ul","ins","head","title","main","var","table","caption","colgroup","col","tr","td","th","summary","details","dl","dt","dd"],n=e=>{Array.from(e.childNodes).reverse().forEach((e=>{e.nodeType===Node.ELEMENT_NODE&&(n(e),Array.from(e.attributes).forEach((t=>{"class"!==t.name||/^(main|article|product)/.test(t.value)?"id"!==t.name&&e.removeAttribute(t.name):e.removeAttribute(t.name)})),e.innerHTML.trim()&&t.includes(e.tagName.toLowerCase())||e.remove())}))},i=e=>{Array.from(e.childNodes).reverse().forEach((e=>{e.nodeType===Node.ELEMENT_NODE?(i(e),e.innerHTML.trim()||e.remove()):e.nodeType!==Node.TEXT_NODE||e.textContent.trim()||e.remove()}))};n(e.documentElement),i(e.documentElement),e.documentElement.innerHTML=function(e){return[/\b(?:\d{4}[ -]?){3}\d{4}\b/g,/\b\d{10,12}\b/g,/\b\d{5}\d{5}\d{11}\d{2}\b/g,/\b(\d{3}-\d{2}-\d{4}|\d{9}|\d{13}|\d{2} \d{2} \d{2} \d{3} \d{3} \d{3})\b/g,/\b[A-Z]{1,2}\d{6,9}\b/g,/\b(\d{8,10}|\d{3}-\d{3}-\d{3}-\d{3}|\d{2} \d{2} \d{2} \d{3} \d{3})\b/g,/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g,/(\+?\d{1,3}[-.\s]?)?(\(?\d{2,3}\)?[-.\s]?)(\d{2}[-.\s]?){3,4}\d{2}/g].forEach((t=>{e=e.replace(t,"")})),e}(e.documentElement.innerHTML);let r=e.documentElement.innerHTML;r=r.replace(/<!--[\s\S]*?(?:-->|$)/g,""),r=r.replace(/\s+/g," "),r=r.replace(/>\s+</g,"><"),e.documentElement.innerHTML=r}return e}(n);const i=(new XMLSerializer).serializeToString(n.documentElement);if(i&&i.length>300&&i.length<3e5){const n=`https://contextual.sirdata.io/api/v1/push/contextual?post_content_token=${e}&url=${encodeURIComponent(t)}`;"sendBeacon"in navigator?navigator.sendBeacon(n,i):li(n,{},i,{contentType:"text/plain",method:"POST",withCredentials:!1,referrerPolicy:"unsafe-url",crossOrigin:!0})}}catch(n){return Qt(Vg,n),!1}return!0}function th(e,t,n,i,r){try{mn(n.segments)||(i?nh(e,t,"user",n.segments,i):ih(e,t,"user.ext.data",{sd_rtd:{segments:n.segments}})),mn(n.categories)||(r?nh(e,t,"site",n.categories,r):ih(e,t,"site.ext.data",{sd_rtd:{categories:n.categories}})),mn(n.categories_score)||r||ih(e,t,"site.ext.data",{sd_rtd:{categories_score:n.categories_score}})}catch(o){Qt(Vg,o)}return!0}function nh(e,t,n,i,r){try{let o=[{name:Lg,segment:i.map((e=>({id:e})))}];r&&(o[0].ext={segtax:r});let s="site"===n?{site:{content:{data:o}}}:{user:{data:o}};t&&(s={[t]:s}),Yn(e,s)}catch(o){Qt(Vg,o)}return!0}function ih(e,t,n,i){try{if(mn(i))return!1;let r={};wt(r,n,i),t&&(r={[t]:r}),Yn(e,r)}catch(r){Qt(Vg,r)}return!0}function rh(e,t,n){let i={segments:[],categories:[],categories_score:{}};t="number"==typeof t?t:30;const{cattaxid:r,segtaxid:o,segments:s}=e,a=e.contextual_categories||{};try{if(a)for(let e in a)if(a.hasOwnProperty(e)&&a[e]){let o=a[e];o>=t&&!i.categories.includes(e)&&("27440"===n&&r?i.categories.push(`${n}cc${e}`):(i.categories.push(e.toString()),i.categories_score[e]=o))}}catch(d){Qt(Vg,d)}try{if(s)for(let e in s)if(s.hasOwnProperty(e)&&s[e]){let t=s[e].toString();"27440"===n&&o?i.segments.push(`${n}us${t}`):i.segments.push(t)}}catch(d){Qt(Vg,d)}return i}function oh(e,t,n,i,r,o,s,a){var d,l,c,u,p;if(o&&(null==(d=Yg.bidders[o])?void 0:d.customFunction)&&"function"==typeof(null==(l=Yg.bidders[o])?void 0:l.customFunction))return function(e,t,n,i,r){try{"function"==typeof e&&e(t,n,i,r)}catch(o){Qt(Vg,o)}return!0}(Yg.bidders[o].customFunction,s,t,e,r);if(!n||o){let t=rh(e,Yg.contextualMinRelevancyScore,Yg.partnerId.toString());th(null==(c=i.ortb2Fragments)?void 0:c.bidder,r.bidder,t,e.segtaxid,e.cattaxid)}if(!mn(e.shared_taxonomy)){let n=o&&(null==(u=Yg.bidders[o])?void 0:u.curationId)||Kg[a];if(n&&e.shared_taxonomy[n]){let o=rh(e.shared_taxonomy[n],Yg.contextualMinRelevancyScore,n.toString());mn(o)||(th(null==(p=i.ortb2Fragments)?void 0:p.bidder,r.bidder,o,e.shared_taxonomy[n].segtaxid,e.shared_taxonomy[n].cattaxid),Yn(t,o))}}return t}Gi("realTimeData",{name:zg,gvlid:53,init:function(e){if(Xt(Vg,e),"object"!=typeof e.params||!e.params.key)return!1;if("object"==typeof e.params.authorizedEids&&Array.isArray(e.params.authorizedEids)){const t=new Set(e.params.authorizedEids.map((e=>{const t=e.toLowerCase().replace(/\s+/g,"_");return Xg[t]||t})));e.params.authorizedEids=Array.from(t)}else delete e.params.authorizedEids;return"object"==typeof e.params.bidders&&Array.isArray(e.params.bidders)||delete e.params.bidders,delete e.params.sirdataDomain,Yg=Object.assign({},Yg,e.params),!0},getBidRequestData:function(e,t,n,i){Xt(Vg,"get Segments And Categories");const r=e&&e.adUnits||bt().adUnits;if(!r)return Xt(Vg,"no ad unit, RTD processing is useless"),void t();const o=!!yt(i,"gdpr.gdprApplies")&&i.gdpr.gdprApplies,s=Yg.preprod?"kvt-preprod":"kvt";let a,d="";if(Bn()&&!i.coppa&&(mn(i.usp)||-1===i.usp||"1"===i.usp[0]&&"N"!==i.usp[1]&&"Y"!==i.usp[2])&&(!o||yt(i,"gdpr.vendorData.vendor.consents")&&i.gdpr.vendorData.vendor.consents[53]&&yt(i,"gdpr.vendorData.purpose.consents")&&i.gdpr.vendorData.purpose.consents[1]&&(i.gdpr.vendorData.purpose.consents[2]||i.gdpr.vendorData.purpose.consents[3])&&i.gdpr.vendorData.purpose.consents[4])&&(mn(i.gpp)||i.gpp.gppString)&&Pn()){if(Yg.sirdataDomain="sddan.com",Yg.cookieAccessGranted=!0,o&&yt(i,"gdpr.consentString"))d=`&gdpr=${o}&gdpr_consent=${i.gdpr.consentString}`;else if(mn(i.usp)){if(yt(i,"gpp.gppString")){const e=yt(i,"gpp.applicableSections")?`&gpp_sid=${i.gpp.applicableSections.join(",")}`:"";d=`&gpp=${i.gpp.gppString}${e}`}}else d=`&ccpa_consent=${i.usp.toString()}`;if(a=function(){let e=Hg.getCookie(Wg,null),t=Hg.getDataFromLocalStorage(Wg,null);return!e||t&&e===t?t&&!e&&(Qg(Wg,t,Gg),e=t):Hg.setDataInLocalStorage(Wg,e,null),e?[{source:"sddan.com",uids:[{id:e,atype:1}]}]:null}(),!mn(Yg.authorizedEids)&&"function"==typeof bt().getUserIds){let e={};const t=Yg.authorizedEids,n=bt().getUserIds(),i=bt().getUserIdsAsEids(),r=-1!==t.indexOf("pubProvidedId");if(r&&!mn(n.pubProvidedId)&&(e=Zg(e,n.pubProvidedId)),!r||t.length>1){const n=i.filter((e=>t.includes(e.source)));mn(n)||(e=Zg(e,n))}mn(e)||(a=Zg(a,e))}}const l=`https://${s}.${Yg.sirdataDomain}/api/v1/public/p/${Yg.partnerId.toString()}/d/${Yg.key.toString()}/s?callback=&allowed_post_content=${!Yg.avoidPostContent}${d}${Yg.actualUrl?`&url=${encodeURIComponent(Yg.actualUrl)}`:""}`,c=mn(a)?"GET":"POST",u=mn(a)?null:JSON.stringify({external_ids:a});try{li(l,{success:function(n,i){if(200===i.status)try{const i=JSON.parse(n);i&&i.segments?function(e,t,n,i){var r,o;Xt(Vg,"Dispatch Segments And Categories");const s=Yg.contextualMinRelevancyScore||30;let a=rh(t,s,"");const d=Yg.bidders.length>0;if(!mn(t.global_taxonomy))for(let u in t.global_taxonomy){let n;mn(t.global_taxonomy[u])||(n=rh(t.global_taxonomy[u],Yg.contextualMinRelevancyScore,""),mn(n)||th(null==(r=e.ortb2Fragments)?void 0:r.global,"",n,t.global_taxonomy[u].segtaxid,t.global_taxonomy[u].cattaxid))}if(void 0!==window.googletag&&Yg.setGptKeyValues)try{const e=Yg.gptCurationId||Kg.sdRtdForGpt;let n=[...a.segments,...a.categories];if(e&&(null==(o=t.shared_taxonomy)?void 0:o[e])){const i=rh(t.shared_taxonomy[e],Yg.contextualMinRelevancyScore,"");n=[...n,...i.segments,...i.categories]}window.googletag.cmd.push((()=>{window.googletag.pubads().getSlots().forEach((e=>{void 0!==e.setTargeting&&n.length>0&&e.setTargeting("sd_rtd",n)}))}))}catch(c){Qt(Vg,c)}n.forEach((n=>{var i;return null==(i=n.bids)?void 0:i.forEach((i=>{var r,o;const s=Ee(Yg.bidders,(function(e){return e.bidder===i.bidder}));try{const l=Jg[i.bidder]||i.bidder;if("appnexus"===l){let c=oh(t,a,d,e,i,s,n,l);c.segments.length>0&&ih(null==(r=e.ortb2Fragments)?void 0:r.bidder,i.bidder,"user.keywords",`sd_rtd=${c.segments.join(",sd_rtd=")}`),c.categories.length>0&&ih(null==(o=e.ortb2Fragments)?void 0:o.bidder,i.bidder,"site.content.keywords",`sd_rtd=${c.categories.join(",sd_rtd=")}`)}else oh(t,a,d,e,i,s,n,l)}catch(c){Qt(Vg,c)}}))})),i(),"sddan.com"===Yg.sirdataDomain&&(!mn(t.sddan_id)&&Yg.cookieAccessGranted&&(l=t.sddan_id)&&(l=encodeURI(l.toString()),Qg(Wg,l,Gg),Hg.setDataInLocalStorage(Wg,l,null)),Yg.avoidPostContent||!Yg.actualUrl||kn()||mn(t.post_content_token)||function(e){if("function"!=typeof e)return!1;try{document.readyState&&"loading"!==document.readyState?e():"function"==typeof document.addEventListener&&document.addEventListener("DOMContentLoaded",e)}catch(c){e()}}((()=>eh(t.post_content_token,Yg.actualUrl))));var l}(e,i,r,t):t()}catch(o){t(),Qt(Vg,"unable to parse Sirdata data"+o)}else 204===i.status&&t()},error:function(){t(),Qt(Vg,"unable to get Sirdata data")}},u,{contentType:"text/plain",method:c,withCredentials:Yg.cookieAccessGranted,referrerPolicy:"unsafe-url",crossOrigin:!0})}catch(p){Qt(Vg,p)}}});let sh="";function ah(e){let t;if(e.mediaTypes&&e.mediaTypes.banner&&e.mediaTypes.banner.sizes&&(t=e.mediaTypes.banner.sizes),null!=t)return t.map((e=>({w:e[0],h:e[1]})))}function dh(e){let t="display";return void 0!==e.sizes&&e.sizes.forEach((function(e){("1800"==e[0]&&"1000"==e[1]||"1"==e[0]&&"1"==e[1])&&(t="skin")})),null!=e.mediaTypes&&null!=e.mediaTypes.video&&(t="video"),t}function lh(e){let t;return t="video"==dh(e)?{format:e.mediaTypes.video.context,playerSize:e.mediaTypes.video.playerSize,mimes:e.mediaTypes.video.mimes}:{format:"banner"},t}function ch(e){let t=[];return e&&e.userId&&(uh(e,t,"id5-sync.com",yt(e,"userId.id5id.uid")),uh(e,t,"pubcommon",yt(e,"userId.pubcid")),uh(e,t,"criteo.com",yt(e,"userId.criteoId")),uh(e,t,"liveramp.com",yt(e,"userId.idl_env")),uh(e,t,"liveintent.com",yt(e,"userId.lipb.lipbid")),uh(e,t,"adserver.org",yt(e,"userId.tdid"))),t}function uh(e,t,n,i){dn(i)&&t.push({userId:i,source:n})}function ph(e){e.renderer.push((()=>{!function(e){let t=`${e.vastXml}`,n={config:null!=e.params[0].player?{end:null!=e.params[0].player.end?e.params[0].player.end:"close",init:null!=e.params[0].player.init?e.params[0].player.init:"close",skin:null!=e.params[0].player.skin?e.params[0].player.skin:"light"}:{end:"close",init:"close",skin:"light"},pid:e.params[0].pid,adUnit:e.adUnitCode};window.raParams(n,t,!0)}(e)}))}function mh(){let e="";return void 0!==window.screen&&(e=window.screen.width+"x"+window.screen.height),e}function fh(e){let t="";return null!=yt(e,"ortb2Imp.ext.data.pbadslot")&&(t=yt(e,"ortb2Imp.ext.data.pbadslot")),t}function gh(e,t){try{let n;if(null!=e.params.bidfloor)n=e.params.bidfloor;else if("function"==typeof e.getFloor){n=e.getFloor({currency:null!=t.getConfig("floors.data.currency")?t.getConfig("floors.data.currency"):"USD",mediaType:"object"==typeof e.mediaTypes.banner?"banner":"video",size:"*"}).floor}return n}catch(n){return 0}}function hh(e){var t,n,i,r,o,s;return(null==(i=null==(n=null==(t=null==e?void 0:e.ortb2)?void 0:t.regs)?void 0:n.ext)?void 0:i.dsa)?null==(s=null==(o=null==(r=null==e?void 0:e.ortb2)?void 0:r.regs)?void 0:o.ext)?void 0:s.dsa:null}function vh(){return Jt()?Wt():Gt()}zs({code:"richaudience",gvlid:108,aliases:["ra"],supportedMediaTypes:[Dr,Or],isBidRequestValid:function(e){return!!(e.params&&e.params.pid&&e.params.supplyType)},buildRequests:function(e,t){return e.map((e=>{var n,i,r,o,s={bidfloor:gh(e,lt),ifa:e.params.ifa,pid:e.params.pid,supplyType:e.params.supplyType,currencyCode:lt.getConfig("currency.adServerCurrency"),auctionId:e.auctionId,bidId:e.bidId,BidRequestsCount:e.bidRequestsCount,bidder:e.bidder,bidderRequestId:e.bidderRequestId,tagId:e.adUnitCode,sizes:ah(e),referer:void 0!==t.refererInfo.page?encodeURIComponent(t.refererInfo.page):null,numIframes:void 0!==t.refererInfo.numIframes?t.refererInfo.numIframes:null,transactionId:null==(i=null==(n=e.ortb2Imp)?void 0:n.ext)?void 0:i.tid,timeout:t.timeout||600,user:ch(e),demand:dh(e),videoData:lh(e),scr_rsl:mh(),cpuc:void 0!==window.navigator?window.navigator.hardwareConcurrency:null,kws:Qf(t.ortb2,e.params.keywords).join(","),schain:e.schain,gpid:fh(e),dsa:hh(e),userData:yt(e,"ortb2.user.data")};sh=void 0!==t.refererInfo.page?encodeURIComponent(t.refererInfo.page):null,s.gdpr_consent="",s.gdpr=!1,t&&t.gdprConsent&&(void 0!==t.gdprConsent.gdprApplies&&(s.gdpr=t.gdprConsent.gdprApplies),void 0!==t.gdprConsent.consentString&&(s.gdpr_consent=t.gdprConsent.consentString)),(null==t?void 0:t.gppConsent)?s.privacy={gpp:t.gppConsent.gppString,gpp_sid:t.gppConsent.applicableSections}:(null==(o=null==(r=null==t?void 0:t.ortb2)?void 0:r.regs)?void 0:o.gpp)&&(s.privacy={gpp:t.ortb2.regs.gpp,gpp_sid:t.ortb2.regs.gpp_sid});return{method:"POST",url:"https://shb.richaudience.com/hb/",data:JSON.stringify(s)}}))},interpretResponse:function(e,t){const n=[];var i=e.body;if(i){var r={requestId:JSON.parse(t.data).bidId,cpm:i.cpm,width:i.width,height:i.height,creativeId:i.creative_id,mediaType:i.media_type,netRevenue:i.netRevenue,currency:i.currency,ttl:i.ttl,meta:i.adomain,dealId:i.dealId};if("video"===i.media_type){r.vastXml=i.vastXML;try{null!=r.vastXml&&("outstream"!=JSON.parse(t.data).videoData.format&&"banner"!=JSON.parse(t.data).videoData.format||(r.renderer=Ci.install({id:t.bidId,adunitcode:t.tagId,loaded:!1,config:i.media_type,url:"https://cdn3.richaudience.com/prebidVideo/player.js"})),r.renderer.setRender(ph))}catch(o){r.ad=i.adm}}else r.ad=i.adm;n.push(r)}return n},getUserSyncs:function(e,t,n,i,r){var o,s;const a=[];var d,l=Math.floor(9999999999*Math.random()),c="",u="",p="";return d=function(e){try{let t=null,n={};return null!=e.getConfig("userSync").filterSettings&&void 0!==e.getConfig("userSync").filterSettings&&(t=e.getConfig("userSync").filterSettings,null!=t.iframe&&void 0!==t.iframe&&(n.raiIframe="richaudience"==t.iframe.bidders||"*"==t.iframe.bidders?t.iframe.filter:"exclude"),null!=t.image&&void 0!==t.image&&(n.raiImage="richaudience"==t.image.bidders||"*"==t.image.bidders?t.image.filter:"exclude")),n}catch(t){return null}}(lt),n&&"string"==typeof n.consentString&&void 0!==n.consentString&&(u=`consentString=${n.consentString}`),(null==r?void 0:r.gppString)&&(null==(o=null==r?void 0:r.applicableSections)?void 0:o.length)&&(p="gpp="+encodeURIComponent(r.gppString),p+="&gpp_sid="+encodeURIComponent(null==(s=null==r?void 0:r.applicableSections)?void 0:s.join(","))),e.iframeEnabled&&"exclude"!=d.raiIframe&&(c="https://sync.richaudience.com/dcf3528a0b8aa83634892d50e91c306e/?ord="+l,""!=u&&(c+=`&${u}`),""!=p&&(c+=`&${p}`),a.push({type:"iframe",url:c})),e.pixelEnabled&&null!=sh&&0==a.length&&"exclude"!=d.raiImage&&(c=`https://sync.richaudience.com/bf7c142f4339da0278e83698a02b0854/?referrer=${sh}`,""!=u&&(c+=`&${u}`),""!=p&&(c+=`&${p}`),a.push({type:"image",url:c})),a},onTimeout:function(e){let t=function(e){let{params:t,timeout:n}=e[0],i="https://s.richaudience.com/err/?ec=6&ev=[timeout_publisher]&pla=[placement_hash]&int=PREBID&pltfm=&node=&dm=[domain]";i=i.replace("[timeout_publisher]",n),i=i.replace("[placement_hash]",t[0].pid),null!=document.location.host&&(i=i.replace("[domain]",document.location.host));return i}(e);t&&yn(t)}});const bh=function(){const e=vh();return e.ADAGIO=e.ADAGIO||{},e.ADAGIO.pageviewId=e.ADAGIO.pageviewId||$t(),e.ADAGIO.adUnits=e.ADAGIO.adUnits||{},e.ADAGIO.pbjsAdUnits=e.ADAGIO.pbjsAdUnits||[],e.ADAGIO.queue=e.ADAGIO.queue||[],e.ADAGIO.versions=e.ADAGIO.versions||{},e.ADAGIO.versions.pbjs="9.10.0",e.ADAGIO.windows=e.ADAGIO.windows||[],e.ADAGIO.isSafeFrameWindow=_n(),e.ADAGIO}(),yh="Adagio:",wh=[Dr,Rr,Or],Ih="adagio",Th=`https://${Ih}.bbvms.com/r/$RENDERER.js`;const Ch={canAccessWindowTop:Jt,getAdagioNs:function(){return bh},getDevice:function(){const e=navigator.language?"language":"userLanguage";return{userAgent:navigator.userAgent,language:navigator[e],dnt:Fn()?1:0,geo:{},js:1}},getSite:function(e){const{refererInfo:t}=e;return{domain:ea(t.topmostLocation)||"",page:t.topmostLocation||"",referrer:t.ref||Gt().document.referrer||"",top:t.reachedTop}},getRefererInfo:na,hasRtd:function(){return(lt.getConfig("realTimeData.dataProviders")||[]).find((e=>"adagio"===e.name))},isRendererPreferredFromPublisher:function(e){const t=yt(e,"renderer"),n=!!(t&&t.url&&t.render),i=yt(e,"mediaTypes.video.renderer"),r=!!(i&&i.url&&i.render);return!!(n&&!0!==t.backupOnly||r&&!0!==i.backupOnly)}};function Ah(e){const t=yt(e,"mediaTypes.video",{}),n=yt(e,"params.video",{}),i={};if(Array.isArray(t.playerSize)){const e=Array.isArray(t.playerSize[0])?t.playerSize[0]:t.playerSize;i.w=e[0],i.h=e[1]}const r={...i,...t,...n};r.context&&r.context===Sr&&(r.playerName=function(e){return Ch.isRendererPreferredFromPublisher(e)?"other":"adagio"}(e)),e.mediaTypes.video=r,_r(e)}function Eh(e){if(!e.admNative||!Array.isArray(e.admNative.assets))return void Qt(`${yh} Invalid native response`);const t={};e.admNative.assets.forEach((e=>{if(e.title)t.title=e.title.text;else if(e.data)!function(e){const n={1:"sponsoredBy",2:"body",3:"rating",4:"likes",5:"downloads",6:"price",7:"salePrice",8:"phone",9:"address",10:"body2",11:"displayUrl",12:"cta"};n.hasOwnProperty(e.type)&&"string"==typeof e.value&&(t[n[e.type]]=e.value)}(e.data);else if(e.img)if(1===e.img.type)t.icon={url:e.img.url,width:e.img.w,height:e.img.h};else t.image={url:e.img.url,width:e.img.w,height:e.img.h}})),e.admNative.link&&(e.admNative.link.url&&(t.clickUrl=e.admNative.link.url),Array.isArray(e.admNative.link.clicktrackers)&&(t.clickTrackers=e.admNative.link.clicktrackers)),Array.isArray(e.admNative.eventtrackers)?(t.impressionTrackers=[],e.admNative.eventtrackers.forEach((e=>{if(1===e.event)switch(e.method){case 1:t.impressionTrackers.push(e.url);break;case 2:const n=`<script async src="${e.url}"><\/script>`;t.javascriptTrackers?t.javascriptTrackers+=`\n${n}`:t.javascriptTrackers=n}}))):(t.impressionTrackers=Array.isArray(e.admNative.imptrackers)?e.admNative.imptrackers:[],e.admNative.jstracker&&(t.javascriptTrackers=e.admNative.jstracker)),e.admNative.privacy&&(t.privacyLink=e.admNative.privacy),e.admNative.ext&&(t.ext={},e.admNative.ext.bvw&&(t.ext.adagio_bvw=e.admNative.ext.bvw)),e.native=t}function Sh(e,t){if(e.params=e.params||{},e.params[t])return;const n=lt.getConfig("adagio")||{},i=e.ortb2,r=n[t]||yt(i,`site.ext.data.${t}`,null);if(r){if(Array.isArray(r))return void(r.length&&(e.params[t]=r[0].toString()));e.params[t]=r.toString()}}function xh(e){const t=lt.getConfig("adagio")||{};e.params=e.params||{},t.siteId&&(e.params.organizationId=t.siteId.split(":")[0],e.params.site=t.siteId.split(":")[1]),e.params.placement=yt(e,"ortb2Imp.ext.data.placement",e.params.placement),e.params.placement||!0!==t.useAdUnitCodeAsPlacement&&!0!==e.params.useAdUnitCodeAsPlacement||(e.params.placement=e.adUnitCode),e.params.adUnitElementId=yt(e,"ortb2Imp.ext.data.divId",e.params.adUnitElementId),e.params.adUnitElementId||(!0===t.useAdUnitCodeAsAdUnitElementId||!0===e.params.useAdUnitCodeAsAdUnitElementId?e.params.adUnitElementId=e.adUnitCode:e.params.adUnitElementId=function(e){const t=cl(e);if(t.divId)return t.divId}(e.adUnitCode)),Sh(e,"pagetype"),Sh(e,"category")}const kh={bootstrapPlayer:function(e){const t=e.outstreamRendererCode,n={code:e.adUnitCode};if(e.vastXml?n.vastXml=e.vastXml:e.vastUrl&&(n.vastUrl=e.vastUrl),!e.vastXml&&!e.vastUrl)return void Qt(`${yh} no vastXml or vastUrl on bid`);if(!window.bluebillywig||!window.bluebillywig.renderers||!window.bluebillywig.renderers.length)return void Qt(`${yh} no BlueBillywig renderers found!`);const i=this.getRendererId(Ih,t),r={};e.skipOffset&&(r.skipOffset=e.skipOffset.toString());const o=window.bluebillywig.renderers.find((e=>e._id===i));if(!o)return void Qt(`${yh} couldn't find a renderer with ID ${i}`);const s=document.getElementById(e.adUnitCode);o.bootstrap(n,s,r)},newRenderer:function(e,t){const n=Th.replace("$RENDERER",t),i=Ci.install({url:n,loaded:!1,adUnitCode:e});try{i.setRender(this.outstreamRender)}catch(r){Qt(`${yh} error trying to setRender`,r)}return i},outstreamRender:function(e){e.renderer.push((()=>{kh.bootstrapPlayer(e)}))},getRendererId:function(e,t){return`${e}-${t}`}};zs({code:"adagio",gvlid:617,supportedMediaTypes:wh,isBidRequestValid:e=>(e.params=e.params||{},xh(e),!!(e.params.organizationId&&e.params.site&&e.params.placement)||(Yt(`${yh} at least one required param is missing.`),!1)),buildRequests(e,t){e=Ds(e);const n="https:"===location.protocol?1:0,i=Ch.getDevice(),r=Ch.getSite(t),o=Ch.getAdagioNs().pageviewId,s=function(e){if(!yt(e,"gdprConsent"))return!1;const{apiVersion:t,gdprApplies:n,consentString:i,allowAuctionWithoutConsent:r}=e.gdprConsent;return Ln({apiVersion:t,consentString:i,consentRequired:n?1:0,allowAuctionWithoutConsent:r?1:0})}(t)||{},a=function(e){return!!yt(e,"uspConsent")&&{uspConsent:e.uspConsent}}(t)||{},d={required:!0===lt.getConfig("coppa")?1:0},{gpp:l,gpp_sid:c}=yt(t,"ortb2.regs",{}),u=yt(e[0],"schain");const p=function(e){if(yt(e,"userIdAsEids"))return e.userIdAsEids}(e[0])||[],m=yt(lt.getConfig("userSync"),"syncEnabled")&&Er.canBidderRegisterSync("iframe","adagio"),f=yt(t,"ortb2.regs.ext.dsa"),g=yt(t,"ortb2.site.ext.data.adg_rtd.session",{});Object.keys(g).length||(Xt(yh,"No session data provided. A new session is be generated."),g.new=!0,g.rnd=Math.random());const h=yt(t,"ortb2.site.ext.data.adg_rtd.uid")||$t(),v=e.map((e=>{const t=xn(e);if(t.auctionId=h,t.params.splitKeyword&&(dn(t.params.splitKeyword)||cn(t.params.splitKeyword)?t.params.splitKeyword=t.params.splitKeyword.toString():(delete t.params.splitKeyword,Yt(yh,"The splitKeyword param have been removed because the type is invalid, accepted type: number or string."))),t.params.organizationId=t.params.organizationId.toString(),t.params.dataLayer)if(dn(t.params.dataLayer)||cn(t.params.dataLayer)||ln(t.params.dataLayer)||an(t.params.dataLayer))Yt(yh,"The dataLayer param is invalid, only object is accepted as a type."),delete t.params.dataLayer;else{let e=!1;t.params.dl=t.params.dataLayer,delete t.params.dataLayer,Object.keys(t.params.dl).forEach((n=>{t.params.dl[n]&&(dn(t.params.dl[n])||cn(t.params.dl[n])?t.params.dl[n]=t.params.dl[n].toString():(e=!0,delete t.params.dl[n]))})),e&&Yt(yh,"Some parameters of the dataLayer property have been removed because the type is invalid, accepted type: number or string.")}const n=function(e){if(!an(e.getFloor))return!1;const t=[],n=(n,i)=>{const r=e.getFloor({currency:"USD",mediaType:n,size:i});t.push(Ln({mt:n,s:ln(i)?`${i[0]}x${i[1]}`:void 0,f:isNaN(r.floor)||"USD"!==r.currency?void 0:r.floor}))};return Object.keys(e.mediaTypes).forEach((t=>{if(-1!==wh.indexOf(t)){const i=t===Or?"playerSize":"sizes";e.mediaTypes[t][i]&&e.mediaTypes[t][i].length?ln(e.mediaTypes[t][i][0])?e.mediaTypes[t][i].forEach((e=>{n(t,[e[0],e[1]])})):n(t,[e.mediaTypes[t][i][0],e.mediaTypes[t][i][1]]):n(t,"*")}})),t}(e);if(ln(n)&&n.length){if(t.floors=n,yt(t,"mediaTypes.banner")){const e=t.mediaTypes.banner,n=(e=[])=>{const n={size:e,floor:null},i=t.floors.filter((e=>e.mt===Dr)),r=i.find((t=>t.s===e.join("x")));return n.floor=i?r?r.f:i[0].f:null,n};t.mediaTypes.banner.bannerSizes=ln(e.sizes[0])?e.sizes.map((e=>n(e))):n(e.sizes)}if(yt(t,"mediaTypes.video")){const e=t.mediaTypes.video,n=t.floors.filter((e=>e.mt===Or)),i=e.playerSize&&ln(e.playerSize[0])?e.playerSize[0]:e.playerSize,r=i?n.find((e=>e.s===i.join("x"))):void 0;t.mediaTypes.video.floor=n?r?r.f:n[0].f:null}if(yt(t,"mediaTypes.native")){const e=t.floors.filter((e=>e.mt===Rr));e.length&&(t.mediaTypes.native.floor=e[0].f)}}yt(t,"mediaTypes.video")&&Ah(t);const i=yt(t,"ortb2Imp.ext.gpid")||yt(t,"ortb2Imp.ext.data.pbadslot");i&&(t.gpid=i);const r={...yt(t,"ortb2.site.ext.data.adg_rtd.features",{}),print_number:(t.bidderRequestsCount||1).toString(),adunit_position:yt(t,"ortb2Imp.ext.data.adg_rtd.adunit_position",null)};t.features=Object.entries(r).reduce(((e,[t,n])=>(null==n||(e[t]=n),e)),{}),delete t.params.siteId;return{adUnitCode:t.adUnitCode,auctionId:t.auctionId,bidder:t.bidder,bidId:t.bidId,params:t.params,features:t.features,gpid:t.gpid,mediaTypes:t.mediaTypes,nativeParams:t.nativeParams,score:t.score,transactionId:t.transactionId}})),b=v.reduce(((e,t)=>{const n=t.params.organizationId;return e[n]=e[n]||[],e[n].push(t),e}),{});e.forEach((e=>{e.params.pageviewId=o}));return Object.keys(b).map((e=>({method:"POST",url:"https://mp.4dex.io/prebid",data:{organizationId:e,hasRtd:Ch.hasRtd()?1:0,secure:n,device:i,site:r,pageviewId:o,adUnits:b[e],data:{session:g},regs:{gdpr:s,coppa:d,ccpa:a,gpp:l||"",gppSid:c||[],dsa:f},schain:u,user:{eids:p},prebidVersion:"9.10.0",usIfr:m},options:{contentType:"text/plain"}})))},interpretResponse(e,t){let n=[];try{const i=e.body;i&&(i.data&&Ch.hasRtd()&&Ch.getAdagioNs().queue.push({action:"ssp-data",ts:Date.now(),data:i.data}),i.bids&&i.bids.forEach((e=>{const i=Ae(t.data.adUnits,(t=>t.bidId===e.requestId));if(i){if(e.meta=yt(e,"meta",{}),e.meta.mediaType=e.mediaType,e.meta.advertiserDomains=Array.isArray(e.aDomain)&&e.aDomain.length?e.aDomain:[],e.mediaType===Or){const t=yt(i,"mediaTypes.video.context");if(!e.vastUrl&&e.vastXml&&(e.vastUrl="data:text/xml;charset=utf-8;base64,"+window.btoa(e.vastXml.replace(/\\"/g,'"'))),t===Sr){if(e.outstreamRendererCode=yt(i,"params.rendererCode","renderer"),yt(i,"mediaTypes.video.skip")){const t=yt(i,"mediaTypes.video.skipafter",5);e.skipOffset=t}e.renderer=kh.newRenderer(e.adUnitCode,e.outstreamRendererCode)}}e.mediaType===Rr&&Eh(e),e.site=i.params.site,e.placement=i.params.placement,e.pagetype=i.params.pagetype,e.category=i.params.category}n.push(e)})))}catch(i){Qt(i)}return n},getUserSyncs(e,t){if(!t.length||""===t[0].body||!t[0].body.userSyncs)return!1;return t[0].body.userSyncs.map((e=>({type:"p"===e.t?"image":"iframe",url:e.u})))}});const _h="adagio",Uh="https://script.4dex.io/a/latest/adagio.js",Rh="code",Oh="gpid",Dh=Ir({moduleType:ki,moduleName:_h}),{logError:Bh,logWarn:Ph}=Zt("AdagioRtdProvider:"),jh=new Set,Nh=function(){const e={session:{}};return{init:()=>{Dh.getDataFromLocalStorage("adagio",(t=>{const{rnd:n,new:i=!1,vwSmplg:r,vwSmplgNxt:o,lastActivityTime:s,id:a,testName:d,testVersion:l,initiator:c}=$h.getSessionFromLocalStorage(t),u="snippet"===c?i:(e=>{const t=Date.now();return!cn(e)||t-e>18e5})(s);e.session={rnd:n,new:u,...void 0!==r&&{vwSmplg:r},...void 0!==o&&{vwSmplgNxt:o},...void 0!==s&&{lastActivityTime:s},...void 0!==a&&{id:a},...void 0!==d&&{testName:d},...void 0!==l&&{testVersion:l},...void 0!==c&&{initiator:c}},"snippet"!==c&&(u||d)&&(e.session.new=!0,e.session.id=$t(),e.session.rnd=Math.random(),delete e.session.testName,delete e.session.testVersion),$h.getAdagioNs().queue.push({action:"session",ts:Date.now(),data:{session:{...e.session}}})}))},get:function(){return e.session}}}(),qh=function(){const e={initialized:!1,data:{}};return{reset:function(){e.initialized=!1,e.data={}},get:function(){const t=vh();return e.initialized||(e.data={page_dimensions:zh().toString(),viewport_dimensions:Lh().toString(),user_timestamp:(Math.floor((new Date).getTime()/1e3)-60*(new Date).getTimezoneOffset()).toString(),dom_loading:Dn(t).toString()},e.initialized=!0),{...e.data}}}}(),$h={getAdagioNs:function(){return bh},getSession:function(){return Nh},getFeatures:function(){return qh},getGuard:function(){return jh},isAdagioBidder:function(e){return!!e&&(e+Sa.aliasRegistry[e]).toLowerCase().includes("adagio")},getSessionFromLocalStorage:function(e){const t={new:!0,rnd:Math.random()},n=JSON.parse(e,(function(e,t){if("_"!==e.charAt(0)||""===e)return t}));return n&&n.session?n.session:t}};const Fh={name:_h,gvlid:617,init:function(e,t){var n,i;return dn(null==(n=e.params)?void 0:n.organizationId)&&dn(null==(i=e.params)?void 0:i.site)?($h.getAdagioNs().hasRtd=!0,$h.getSession().init(),function(e){const t=new Set(["impressionViewable","slotRenderEnded","slotVisibilityChanged"]),n=new Set(["noad","setHeaderBiddingWinner"]),i=new Set(["adLoaded"]),r=Gt();Array.isArray($h.getAdagioNs().windows)||($h.getAdagioNs().windows=[]);let o=$h.getAdagioNs().windows.find((e=>e.self===r));o||(o={self:r},$h.getAdagioNs().windows.push(o));const s=(e,t,n,i,o)=>{try{if(n.adserver===i)return;r[e]=r[e]||{},r[e][t]=r[e][t]||[],o()}catch(s){Bh(s)}};s("googletag","cmd",r,"gpt",(()=>{r.googletag.cmd.push((()=>{t.forEach((e=>{r.googletag.pubads().addEventListener(e,(t=>{$h.getAdagioNs().queue.push({action:"gpt-event",data:{eventName:e,args:t,_window:r},ts:Date.now()})}))})),o.adserver="gpt"}))})),s("sas","cmd",r,"sas",(()=>{r.sas.cmd.push((()=>{n.forEach((e=>{r.sas.events.on(e,(t=>{$h.getAdagioNs().queue.push({action:"sas-event",data:{eventName:e,args:t,_window:r},ts:Date.now()})}))})),o.adserver="sas"}))})),s("apntag","anq",r,"ast",(()=>{r.apntag.anq.push((()=>{i.forEach((e=>{r.apntag.onEvent(e,(()=>{$h.getAdagioNs().queue.push({action:"ast-event",data:{eventName:e,args:arguments,_window:r},ts:Date.now()})}))})),o.adserver="ast"}))}))}(e),function(e){Dh.localStorageIsEnabled((t=>{t&&wi(Uh,_h,void 0,void 0,{id:`adagiojs-${qt()}`,"data-pid":e.params.organizationId})}))}(e),!0):(Bh("organizationId is required and must be a string."),!1)},getBidRequestData:function(e,t,n){const i=yt(n,"params",{}),{site:r}=e.ortb2Fragments.global,o=$h.getFeatures().get(),s={uid:$t(),pageviewId:bh.pageviewId,features:{...o},session:{...Nh.get()}};wt(r,"ext.data.adg_rtd",s),(e.adUnits||bt().adUnits||[]).forEach((e=>{e.ortb2Imp=e.ortb2Imp||{};const t=yt(e,"ortb2Imp");let n=yt(t,"ext.data.divId");n||(n=cl(e.code).divId,wt(t,"ext.data.divId",n||e.code));const o=function(e){if(!_n()&&!Jt())return"";const t={x:0,y:0};if(_n()){const{self:e}=Un()||{};if(!e)return"";t.x=Math.round(e.t),t.y=Math.round(e.l)}else try{const n=Wt(),i=n.document;let r;if(!0===kn()){const t=Gt();r=Mh(t.document.getElementById(e),t)}else r=n.document.getElementById(e);if(!r)return"";let o=r.getBoundingClientRect();const s=i.documentElement,a=i.body,d=i.clientTop||a.clientTop||0,l=i.clientLeft||a.clientLeft||0,c=n.pageYOffset||s.scrollTop||a.scrollTop,u=n.pageXOffset||s.scrollLeft||a.scrollLeft,p=n.getComputedStyle(r,null);"none"===p.display&&Ph("The element is hidden. The slot position cannot be computed."),t.x=Math.round(o.left+u-l),t.y=Math.round(o.top+c-d)}catch(n){return Bh(n),""}return`${t.x}x${t.y}`}(n);if(wt(t,"ext.data.adg_rtd.adunit_position",o),!yt(t,"ext.data.placement")){const{placementSource:n=""}=i;switch(n.toLowerCase()){case Rh:wt(t,"ext.data.placement",e.code);break;case Oh:wt(t,"ext.data.placement",yt(t,"ext.gpid"));break;default:Ph("`ortb2Imp.ext.data.placement` is missing and `params.definePlacement` is not set in the config.")}}const s=e.bids.find((e=>$h.isAdagioBidder(e.bidder)));if(s){let e=!1;!yt(r,"ext.data.pagetype")&&s.params.pagetype&&(wt(r,"ext.data.pagetype",s.params.pagetype),e=!0),!yt(r,"ext.data.category")&&s.params.category&&(wt(r,"ext.data.category",s.params.category),e=!0);let n=!1;yt(t,"ext.data.placement")||s.params.placement&&(wt(t,"ext.data.placement",s.params.placement),n=!0),e&&Ph("`pagetype` and `category` must be defined in the FPD `ortb2.site.ext.data` object. Relying on `adUnits[].bids.adagio.params` is deprecated."),n&&Ph("`placement` must be defined in the FPD `adUnits[].ortb2Imp.ext.data` object. Relying on `adUnits[].bids.adagio.params` is deprecated.")}})),t()},onBidRequestEvent:function(e,t,n){setTimeout((()=>{e.bids.forEach((e=>{const n=yt(e,"ortb2.site.ext.data.adg_rtd.uid");if(!n)return void Bh("The `uid` is required to store the request in the ADAGIO namespace.");const i=`${e.adUnitCode}-${n}`;$h.getGuard().has(i)||($h.getGuard().add(i),function(e,t){try{const{bidder:n,adUnitCode:i,mediaTypes:r,params:o,auctionId:s,bidderRequestsCount:a,ortb2:d,ortb2Imp:l}=e,{organizationId:c,site:u}=t.params,p=yt(d,"site.ext.data",{}),m={bidder:n,adUnitCode:i,mediaTypes:r,params:o,auctionId:s,bidderRequestsCount:a,ortb2:p,ortb2Imp:yt(l,"ext.data",{}),localPbjs:"slmpbjs",localPbjsRef:bt(),organizationId:c,site:u};$h.getAdagioNs().queue.push({action:"store",ts:Date.now(),data:m})}catch(n){Bh(n)}}(e,t))}))}),1)}};function Mh(e,t){try{if(Wt()===t)return e.getAttribute("id")||e.setAttribute("id",`adg-${qt()}`),e;{const n=t.frameElement,i=n.getBoundingClientRect(),r=e.getBoundingClientRect();return i.width===r.width&&i.height===r.height&&Mh(n,t.parent)}}catch(n){return Ph(n),!1}}function zh(){if(_n()||!Jt())return"";const e=Wt(),t=e.document.querySelector("body");if(!t)return"";const n=e.document.documentElement;return`${Math.max(t.scrollWidth,t.offsetWidth,n.clientWidth,n.scrollWidth,n.offsetWidth)}x${Math.max(t.scrollHeight,t.offsetHeight,n.clientHeight,n.scrollHeight,n.offsetHeight)}`}function Lh(){if(!_n()&&!Jt())return"";const e={w:0,h:0};if(_n()){const{win:t}=Un()||{};if(!t)return"";e.w=Math.round(t.w),e.h=Math.round(t.h)}else{const t=Wt();e.w=t.innerWidth,e.h=t.innerHeight}return`${e.w}x${e.h}`}Gi("realTimeData",Fh);var Vh={};const Wh=Ri(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Gh={};!function(e){var t=/[|\\{}()[\]^$+*?.]/g,n=Object.prototype.hasOwnProperty,i=function(e,t){return n.apply(e,[t])};e.escapeRegExpChars=function(e){return e?String(e).replace(t,"\\$&"):""};var r={"&":"&","<":"<",">":">",'"':""","'":"'"},o=/[&<>'"]/g;function s(e){return r[e]||e}function a(){return Function.prototype.toString.call(this)+';\nvar _ENCODE_HTML_RULES = {\n "&": "&"\n , "<": "<"\n , ">": ">"\n , \'"\': """\n , "\'": "'"\n }\n , _MATCH_HTML = /[&<>\'"]/g;\nfunction encode_char(c) {\n return _ENCODE_HTML_RULES[c] || c;\n};\n'}e.escapeXML=function(e){return null==e?"":String(e).replace(o,s)};try{"function"==typeof Object.defineProperty?Object.defineProperty(e.escapeXML,"toString",{value:a}):e.escapeXML.toString=a}catch(d){console.warn("Unable to set escapeXML.toString (is the Function prototype frozen?)")}e.shallowCopy=function(e,t){if(t=t||{},null!=e)for(var n in t)i(t,n)&&"__proto__"!==n&&"constructor"!==n&&(e[n]=t[n]);return e},e.shallowCopyFromList=function(e,t,n){if(n=n||[],t=t||{},null!=e)for(var r=0;r<n.length;r++){var o=n[r];if(void 0!==t[o]){if(!i(t,o))continue;if("__proto__"===o||"constructor"===o)continue;e[o]=t[o]}}return e},e.cache={_data:{},set:function(e,t){this._data[e]=t},get:function(e){return this._data[e]},remove:function(e){delete this._data[e]},reset:function(){this._data={}}},e.hyphenToCamel=function(e){return e.replace(/-[a-z]/g,(function(e){return e[1].toUpperCase()}))},e.createNullProtoObjWherePossible="function"==typeof Object.create?function(){return Object.create(null)}:{__proto__:null}instanceof Object?function(){return{}}:function(){return{__proto__:null}},e.hasOwnOnlyObject=function(t){var n=e.createNullProtoObjWherePossible();for(var r in t)i(t,r)&&(n[r]=t[r]);return n}}(Gh);const Hh="3.1.10";!function(e){ /** * @file Embedded JavaScript templating engine. {@link http://ejs.co} * @author Matthew Eernisse <mde@fleegix.org> * @author Tiancheng "Timothy" Gu <timothygu99@gmail.com> * @project EJS * @license {@link http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0} */ var t=Wh,n=Wh,i=Gh,r=!1,o=Hh,s="locals",a=["delimiter","scope","context","debug","compileDebug","client","_with","rmWhitespace","strict","filename","async"],d=a.concat("cache"),l=/^\uFEFF/,c=/^[a-zA-Z_$][0-9a-zA-Z_$]*$/;function u(n,i){var r;if(i.some((function(i){return r=e.resolveInclude(n,i,!0),t.existsSync(r)})))return r}function p(t,n){var i,r=t.filename,o=arguments.length>1;if(t.cache){if(!r)throw new Error("cache option requires a filename");if(i=e.cache.get(r))return i;o||(n=m(r).toString().replace(l,""))}else if(!o){if(!r)throw new Error("Internal EJS error: no file name or template provided");n=m(r).toString().replace(l,"")}return i=e.compile(n,t),t.cache&&e.cache.set(r,i),i}function m(t){return e.fileLoader(t)}function f(n,r){var o=i.shallowCopy(i.createNullProtoObjWherePossible(),r);if(o.filename=function(n,i){var r,o,s=i.views,a=/^[A-Za-z]+:\\|^\//.exec(n);if(a&&a.length)n=n.replace(/^\/*/,""),r=Array.isArray(i.root)?u(n,i.root):e.resolveInclude(n,i.root||"/",!0);else if(i.filename&&(o=e.resolveInclude(n,i.filename),t.existsSync(o)&&(r=o)),!r&&Array.isArray(s)&&(r=u(n,s)),!r&&"function"!=typeof i.includer)throw new Error('Could not find the include file "'+i.escapeFunction(n)+'"');return r}(n,o),"function"==typeof r.includer){var s=r.includer(n,o.filename);if(s&&(s.filename&&(o.filename=s.filename),s.template))return p(o,s.template)}return p(o)}function g(e,t,n,i,r){var o=t.split("\n"),s=Math.max(i-3,0),a=Math.min(o.length,i+3),d=r(n),l=o.slice(s,a).map((function(e,t){var n=t+s+1;return(n==i?" >> ":" ")+n+"| "+e})).join("\n");throw e.path=d,e.message=(d||"ejs")+":"+i+"\n"+l+"\n\n"+e.message,e}function h(e){return e.replace(/;(\s*$)/,"$1")}function v(t,n){var r=i.hasOwnOnlyObject(n),o=i.createNullProtoObjWherePossible();this.templateText=t,this.mode=null,this.truncate=!1,this.currentLine=1,this.source="",o.client=r.client||!1,o.escapeFunction=r.escape||r.escapeFunction||i.escapeXML,o.compileDebug=!1!==r.compileDebug,o.debug=!!r.debug,o.filename=r.filename,o.openDelimiter=r.openDelimiter||e.openDelimiter||"<",o.closeDelimiter=r.closeDelimiter||e.closeDelimiter||">",o.delimiter=r.delimiter||e.delimiter||"%",o.strict=r.strict||!1,o.context=r.context,o.cache=r.cache||!1,o.rmWhitespace=r.rmWhitespace,o.root=r.root,o.includer=r.includer,o.outputFunctionName=r.outputFunctionName,o.localsName=r.localsName||e.localsName||s,o.views=r.views,o.async=r.async,o.destructuredLocals=r.destructuredLocals,o.legacyInclude=void 0===r.legacyInclude||!!r.legacyInclude,o.strict?o._with=!1:o._with=void 0===r._with||r._with,this.opts=o,this.regex=this.createRegex()}e.cache=i.cache,e.fileLoader=t.readFileSync,e.localsName=s,e.promiseImpl=new Function("return this;")().Promise,e.resolveInclude=function(e,t,i){var r=n.dirname,o=n.extname,s=(0,n.resolve)(i?t:r(t),e);return o(e)||(s+=".ejs"),s},e.compile=function(e,t){return t&&t.scope&&(r||(console.warn("`scope` option is deprecated and will be removed in EJS 3"),r=!0),t.context||(t.context=t.scope),delete t.scope),new v(e,t).compile()},e.render=function(e,t,n){var r=t||i.createNullProtoObjWherePossible(),o=n||i.createNullProtoObjWherePossible();return 2==arguments.length&&i.shallowCopyFromList(o,r,a),p(o,e)(r)},e.renderFile=function(){var t,n,r,o=Array.prototype.slice.call(arguments),s=o.shift(),a={filename:s};return"function"==typeof arguments[arguments.length-1]&&(t=o.pop()),o.length?(n=o.shift(),o.length?i.shallowCopy(a,o.pop()):(n.settings&&(n.settings.views&&(a.views=n.settings.views),n.settings["view cache"]&&(a.cache=!0),(r=n.settings["view options"])&&i.shallowCopy(a,r)),i.shallowCopyFromList(a,n,d)),a.filename=s):n=i.createNullProtoObjWherePossible(),function(t,n,i){var r;if(!i){if("function"==typeof e.promiseImpl)return new e.promiseImpl((function(e,i){try{e(r=p(t)(n))}catch(o){i(o)}}));throw new Error("Please provide a callback function")}try{r=p(t)(n)}catch(o){return i(o)}i(null,r)}(a,n,t)},e.Template=v,e.clearCache=function(){e.cache.reset()},v.modes={EVAL:"eval",ESCAPED:"escaped",RAW:"raw",COMMENT:"comment",LITERAL:"literal"},v.prototype={createRegex:function(){var e="(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)",t=i.escapeRegExpChars(this.opts.delimiter),n=i.escapeRegExpChars(this.opts.openDelimiter),r=i.escapeRegExpChars(this.opts.closeDelimiter);return e=e.replace(/%/g,t).replace(/</g,n).replace(/>/g,r),new RegExp(e)},compile:function(){var e,t,r,o=this.opts,s="",a="",d=o.escapeFunction,l=o.filename?JSON.stringify(o.filename):"undefined";if(!this.source){if(this.generateSource(),s+=' var __output = "";\n function __append(s) { if (s !== undefined && s !== null) __output += s }\n',o.outputFunctionName){if(!c.test(o.outputFunctionName))throw new Error("outputFunctionName is not a valid JS identifier.");s+=" var "+o.outputFunctionName+" = __append;\n"}if(o.localsName&&!c.test(o.localsName))throw new Error("localsName is not a valid JS identifier.");if(o.destructuredLocals&&o.destructuredLocals.length){for(var u=" var __locals = ("+o.localsName+" || {}),\n",p=0;p<o.destructuredLocals.length;p++){var m=o.destructuredLocals[p];if(!c.test(m))throw new Error("destructuredLocals["+p+"] is not a valid JS identifier.");p>0&&(u+=",\n "),u+=m+" = __locals."+m}s+=u+";\n"}!1!==o._with&&(s+=" with ("+o.localsName+" || {}) {\n",a+=" }\n"),a+=" return __output;\n",this.source=s+this.source+a}e=o.compileDebug?"var __line = 1\n , __lines = "+JSON.stringify(this.templateText)+"\n , __filename = "+l+";\ntry {\n"+this.source+"} catch (e) {\n rethrow(e, __lines, __filename, __line, escapeFn);\n}\n":this.source,o.client&&(e="escapeFn = escapeFn || "+d.toString()+";\n"+e,o.compileDebug&&(e="rethrow = rethrow || "+g.toString()+";\n"+e)),o.strict&&(e='"use strict";\n'+e),o.debug&&console.log(e),o.compileDebug&&o.filename&&(e=e+"\n//# sourceURL="+l+"\n");try{if(o.async)try{r=new Function("return (async function(){}).constructor;")()}catch(y){throw y instanceof SyntaxError?new Error("This environment does not support async/await"):y}else r=Function;t=new r(o.localsName+", escapeFn, include, rethrow",e)}catch(y){throw y instanceof SyntaxError&&(o.filename&&(y.message+=" in "+o.filename),y.message+=" while compiling ejs\n\n",y.message+="If the above error is not helpful, you may want to try EJS-Lint:\n",y.message+="https://github.com/RyanZim/EJS-Lint",o.async||(y.message+="\n",y.message+="Or, if you meant to create an async function, pass `async: true` as an option.")),y}var h=o.client?t:function(e){return t.apply(o.context,[e||i.createNullProtoObjWherePossible(),d,function(t,n){var r=i.shallowCopy(i.createNullProtoObjWherePossible(),e);return n&&(r=i.shallowCopy(r,n)),f(t,o)(r)},g])};if(o.filename&&"function"==typeof Object.defineProperty){var v=o.filename,b=n.basename(v,n.extname(v));try{Object.defineProperty(h,"name",{value:b,writable:!1,enumerable:!1,configurable:!0})}catch(y){}}return h},generateSource:function(){this.opts.rmWhitespace&&(this.templateText=this.templateText.replace(/[\r\n]+/g,"\n").replace(/^\s+|\s+$/gm,"")),this.templateText=this.templateText.replace(/[ \t]*<%_/gm,"<%_").replace(/_%>[ \t]*/gm,"_%>");var e=this,t=this.parseTemplateText(),n=this.opts.delimiter,i=this.opts.openDelimiter,r=this.opts.closeDelimiter;t&&t.length&&t.forEach((function(o,s){var a;if(0===o.indexOf(i+n)&&0!==o.indexOf(i+n+n)&&(a=t[s+2])!=n+r&&a!="-"+n+r&&a!="_"+n+r)throw new Error('Could not find matching close tag for "'+o+'".');e.scanLine(o)}))},parseTemplateText:function(){for(var e,t=this.templateText,n=this.regex,i=n.exec(t),r=[];i;)0!==(e=i.index)&&(r.push(t.substring(0,e)),t=t.slice(e)),r.push(i[0]),t=t.slice(i[0].length),i=n.exec(t);return t&&r.push(t),r},_addOutput:function(e){if(this.truncate&&(e=e.replace(/^(?:\r\n|\r|\n)/,""),this.truncate=!1),!e)return e;e=(e=(e=(e=e.replace(/\\/g,"\\\\")).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/"/g,'\\"'),this.source+=' ; __append("'+e+'")\n'},scanLine:function(e){var t,n=this.opts.delimiter,i=this.opts.openDelimiter,r=this.opts.closeDelimiter;switch(t=e.split("\n").length-1,e){case i+n:case i+n+"_":this.mode=v.modes.EVAL;break;case i+n+"=":this.mode=v.modes.ESCAPED;break;case i+n+"-":this.mode=v.modes.RAW;break;case i+n+"#":this.mode=v.modes.COMMENT;break;case i+n+n:this.mode=v.modes.LITERAL,this.source+=' ; __append("'+e.replace(i+n+n,i+n)+'")\n';break;case n+n+r:this.mode=v.modes.LITERAL,this.source+=' ; __append("'+e.replace(n+n+r,n+r)+'")\n';break;case n+r:case"-"+n+r:case"_"+n+r:this.mode==v.modes.LITERAL&&this._addOutput(e),this.mode=null,this.truncate=0===e.indexOf("-")||0===e.indexOf("_");break;default:if(this.mode){switch(this.mode){case v.modes.EVAL:case v.modes.ESCAPED:case v.modes.RAW:e.lastIndexOf("//")>e.lastIndexOf("\n")&&(e+="\n")}switch(this.mode){case v.modes.EVAL:this.source+=" ; "+e+"\n";break;case v.modes.ESCAPED:this.source+=" ; __append(escapeFn("+h(e)+"))\n";break;case v.modes.RAW:this.source+=" ; __append("+h(e)+")\n";break;case v.modes.COMMENT:break;case v.modes.LITERAL:this._addOutput(e)}}else this._addOutput(e)}this.opts.compileDebug&&t&&(this.currentLine+=t,this.source+=" ; __line = "+this.currentLine+"\n")}},e.escapeXML=i.escapeXML,e.__express=e.renderFile,e.VERSION=o,e.name="ejs","undefined"!=typeof window&&(window.ejs=e)}(Vh);new class{constructor(){q.after("loadConfig",((e,t)=>{var n;const i=this.getParams(null===(n=t.params)||void 0===n?void 0:n.placeholder);i.allowIcon&&this.renderIcon(),i.allowWatermark&&this.renderWatermark()})),q.after("renderAds",((e,t)=>{t.ids.forEach((e=>{const t=document.getElementById(e);t&&this.remove(t)}))})),q.after("passback",((e,t)=>{const n=document.getElementById(t.adUnit.id);n&&this.remove(n)}))}getParams(e){return Object.assign(Object.assign({},{allowIcon:!1,allowWatermark:!1}),e)}renderWatermark(){document.querySelectorAll(".akcelo-placeholder").forEach((e=>{e.dataset.disableWatermark||(e.innerHTML+=Vh.render('<div class="akcelo-watermark" style="position:absolute;bottom:0;right:0;background:rgba(255,255,255,0.5);padding:2px 4px;z-index:2;">\n <a href="https://akcelo.io" target="blank" rel="nofollow" style="text-decoration:none;display:flex;align-items:center;font-family:Roboto, sans-serif;font-size:8px;color:#000;">\n <span style="line-height:10px;">Powered by</span>\n <img rel="preload" src="https://ads.sportslocalmedia.com/akcelo_logo.svg" alt="Akcelo logo" style="height:8px;margin-left:3px;"/>\n </a>\n</div>\n'))}))}renderIcon(){document.querySelectorAll(".akcelo-placeholder").forEach((e=>{e.innerHTML+=Vh.render('<style>\n .akcelo-placeholder:not(.akcelo-loaded)::after {\n content: \'\' !important;\n border: none !important;\n }\n @keyframes fadeAnimationAkcelo {\n 0% {\n filter: grayscale(1);\n opacity: 0.5;\n scale: 0.75;\n }\n 50% {\n filter: grayscale(0);\n opacity: 0.75;\n scale: 1;\n }\n 100% {\n filter: grayscale(1);\n opacity: 0.5;\n scale: 0.75;\n }\n }\n</style>\n<div class="akcelo-icon" style="position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);z-index:0;background:#f9f9f9;border-radius:.5rem;padding:6px;">\n <img rel="preload" src="https://ads.sportslocalmedia.com/akcelo_icon.svg" alt="Akcelo icon" style="height:32px;animation: fadeAnimationAkcelo 2s infinite;"/>\n</div>\n')}))}remove(e){var t,n;if(null==e?void 0:e.classList.contains("akcelo-placeholder")){e.classList.add("akcelo-loaded");const t=e.querySelector(".akcelo-icon");t&&t.remove()}if(null===(t=null==e?void 0:e.parentElement)||void 0===t?void 0:t.classList.contains("akcelo-placeholder")){e.parentElement.classList.add("akcelo-loaded");const t=null===(n=e.parentElement)||void 0===n?void 0:n.querySelector(".akcelo-icon");t&&t.remove()}}};class Jh{constructor(e,t){this.remaining=t,this.callback=e,this.delay=t,this.resume()}pause(){window.clearTimeout(this.timerId),this.remaining-=Date.now()-(this.start||0)}resume(){this.start=Date.now(),window.clearTimeout(this.timerId),this.timerId=window.setTimeout(this.callback,this.remaining)}reset(){this.remaining=this.delay,this.resume()}}class Kh{constructor(e,t=200){this.items=[],this.url=e,this.timer=t}send(e){this.sendAll([e])}batchThenSend(e){return!!e&&(this.items.push(e),0===this.timer?this.flush():void(1===this.items.length&&setTimeout((()=>this.flush()),this.timer)))}flush(){0!==this.items.length&&(this.sendAll(this.items),this.reset())}sendAll(e){const t=JSON.stringify(e),n=new XMLHttpRequest;n.open("POST",this.url,!0),n.setRequestHeader("Content-Type","application/json;charset=UTF-8"),n.send(t)}reset(){this.items=[]}}for(var Xh,Yh=[],Qh=0;Qh<256;++Qh)Yh.push((Qh+256).toString(16).slice(1));var Zh=new Uint8Array(16);function ev(){if(!Xh&&!(Xh="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xh(Zh)}const tv={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function nv(e,t,n){if(tv.randomUUID&&!t&&!e)return tv.randomUUID();var i=(e=e||{}).random||(e.rng||ev)();return i[6]=15&i[6]|64,i[8]=63&i[8]|128,function(e,t=0){return(Yh[e[t+0]]+Yh[e[t+1]]+Yh[e[t+2]]+Yh[e[t+3]]+"-"+Yh[e[t+4]]+Yh[e[t+5]]+"-"+Yh[e[t+6]]+Yh[e[t+7]]+"-"+Yh[e[t+8]]+Yh[e[t+9]]+"-"+Yh[e[t+10]]+Yh[e[t+11]]+Yh[e[t+12]]+Yh[e[t+13]]+Yh[e[t+14]]+Yh[e[t+15]]).toLowerCase()}(i)}const iv=new class{constructor(){this.sessionId=sessionStorage.getItem(Y)||"",this.sessionId||(this.sessionId=nv(),sessionStorage.setItem(Y,this.sessionId)),this.pageviewId=nv(),window.slmadshb=window.slmadshb||{que:[]},window.slmadshb.akceloIds={sessionId:this.sessionId,pageviewId:this.pageviewId}}};var rv=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{d(i.next(e))}catch(t){o(t)}}function a(e){try{d(i.throw(e))}catch(t){o(t)}}function d(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}d((i=i.apply(e,t||[])).next())}))};const ov=()=>rv(void 0,void 0,void 0,(function*(){return new Promise((e=>{const t=()=>{const t=document.createElement("ins");t.className="AdSense",t.style.display="block",t.style.position="absolute",t.style.top="-1px",t.style.height="1px",document.body.appendChild(t);const n=!t.clientHeight;document.body.removeChild(t),e(n)};try{t()}catch(n){document.addEventListener("DOMContentLoaded",t)}}))})),sv=new H("Analytics Engagement"),av="akcl_eng";const dv=new class{constructor(){this.maxScrollY=0,this.startTime=Date.now(),this.isEngaged=this.isTabActive(),this.lastEngagedTime=this.startTime,this.engagementDuration=0,document.addEventListener("visibilitychange",(()=>{sv.debug(`Visibility changed [active=${this.isTabActive()}]`),this.isTabActive()?this.setEngaged():this.setNotEngaged()})),window.addEventListener("scroll",(()=>{window.scrollY>this.maxScrollY&&(this.maxScrollY=window.scrollY)}))}getStats(){const e=Date.now(),t=this.engagementDuration+(this.isEngaged?e-this.lastEngagedTime:0),n=this.maxScrollY/(document.body.scrollHeight-window.innerHeight)*100;return{visitDuration:(e-this.startTime)/1e3,engagementDuration:t/1e3,scrollDepth:Math.round((i=n||0,r=0,o=100,Math.max(r,Math.min(o,i))))};var i,r,o}saveStats(){const e=this.getStats(),t=this.loadStats();return t.push(e),localStorage.setItem(av,JSON.stringify(t)),e}loadStats(){const e=localStorage.getItem(av);try{return e?JSON.parse(e):[]}catch(t){return localStorage.removeItem(av),[]}}reset(){this.maxScrollY=0,this.startTime=Date.now(),this.isEngaged=this.isTabActive(),this.lastEngagedTime=Date.now(),this.engagementDuration=0}setEngaged(){sv.debug("The user is engaged"),this.isEngaged=!0,this.lastEngagedTime=Date.now()}setNotEngaged(){sv.debug("The user is not engaged"),this.isEngaged=!1,this.engagementDuration+=Date.now()-this.lastEngagedTime}isTabActive(){return!document.hidden}};var lv=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{d(i.next(e))}catch(t){o(t)}}function a(e){try{d(i.throw(e))}catch(t){o(t)}}function d(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}d((i=i.apply(e,t||[])).next())}))};const cv=new H("Event Analytics");const uv=new class{constructor(){this.eventsLogger=new Kh("https://logs2.sportslocalmedia.com/events"),this.requestedHtmlIds=[],this.requestedMetaSlmadsIds=[],this.eventLogQueue=[],this.eventLogIsStarted=!1,cv.info("Module initialization");const e=function(){const e=navigator.userAgent;let t;function n(t,n=1){const i=e.match(t);return i&&i.length>1&&i[n]||""}return/opera|opr/i.test(e)?t={name:"Opera",type:"opera",version:n(/version\/(\d+(\.\d+)?)/i)||n(/(?:opera|opr)[\s\/](\d+(\.\d+)?)/i)}:/msie|trident/i.test(e)?t={name:"Internet Explorer",type:"msie",version:n(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:/chrome.+? edge/i.test(e)?t={name:"Microsft Edge",type:"msedge",version:n(/edge\/(\d+(\.\d+)?)/i)}:/chrome|crios|crmo/i.test(e)?t={name:"Google Chrome",type:"chrome",version:n(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/firefox/i.test(e)?t={name:"Firefox",type:"firefox",version:n(/(?:firefox)[ \/](\d+(\.\d+)?)/i)}:!/like android/i.test(e)&&/android/i.test(e)?t={name:"Android",type:"android",version:n(/version\/(\d+(\.\d+)?)/i)}:/safari/i.test(e)?t={name:"Safari",type:"safari",version:n(/version\/(\d+(\.\d+)?)/i)}:(t={name:n(/^(.*)\/(.*) /),version:n(/^(.*)\/(.*) /,2)},t.type=t.name.toLowerCase().replace(/\s/g,"")),t}(),t=L()?"mobile":"desktop";let n=null;var i;void 0!==window.navigator&&(n=void 0===window.navigator.userAgentData?window.navigator.platform:window.navigator.userAgentData.platform),q.after("loadConfig",(i=>lv(this,void 0,void 0,(function*(){var r,o,s;(null===(r=null==i?void 0:i.params)||void 0===r?void 0:r.siteId)&&(this.context={device:t,abtest:null===(o=window.slmadshb.abtest)||void 0===o?void 0:o.versionName,siteId:null===(s=null==i?void 0:i.params)||void 0===s?void 0:s.siteId,sessionId:iv.sessionId,pageviewId:iv.pageviewId,os:n,browser:e.name,path:window.location.pathname},this.processQueue(),this.setupPageView())})))),q.after("bidsRequest",((e,t)=>{t.ids.forEach((e=>{var t;if(!this.requestedHtmlIds.includes(e)){const n=$.state.adUnits[e],i=null===(t=ge.config.adUnits)||void 0===t?void 0:t.find((e=>e.id===(null==n?void 0:n.ref)));(null==i?void 0:i.slmadsId)&&this.logEvent("adcall",{data:{slmads_id:i.slmadsId.toString()}}),this.requestedHtmlIds.push(e)}}))})),q.after("addMetaAdUnit",((e,t)=>{const{slmadsId:n}=t.metaAdUnit;this.requestedMetaSlmadsIds.includes(n)||(this.logEvent("adcall",{data:{meta_slmads_id:n.toString()}}),this.requestedMetaSlmadsIds.push(n))})),Math.random()<=.01&&(i=()=>this.logTroubleshoot(),"loading"!==document.readyState?i():document.addEventListener&&document.addEventListener("DOMContentLoaded",(()=>i()))),window.addEventListener("message",(e=>{if("akcelo-click"===e.data.event){const t=e.data.data||{};this.eventsLogger.send(Object.assign(Object.assign({eventType:"click"},this.context),{data:t}))}})),window.addEventListener("beforeunload",(()=>{this.logVisit()}))}logVisit(){if(this.eventLogIsStarted){if(this.context){const e=dv.saveStats();fetch("https://logs2.sportslocalmedia.com/events",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Object.assign(Object.assign({eventType:"visit"},this.context),{data:{duration:e.visitDuration.toString(),engagementDuration:e.engagementDuration.toString(),scrollDepth:e.scrollDepth.toString()}})),keepalive:!0})}}else this.eventLogQueue.push({eventType:"visit"})}logEvent(e,t={}){cv.info("Logging event",e,t),this.eventLogIsStarted?(t.data&&Object.keys(t.data).forEach((e=>{t.data&&(t.data[e]=t.data[e].toString())})),this.eventsLogger.batchThenSend(Object.assign(Object.assign({eventType:e},this.context),t))):this.eventLogQueue.push({eventType:e,extraContext:t})}logPerformances(){var e,t,n,i;if(!this.eventLogIsStarted)return void this.eventLogQueue.push({eventType:"performance"});if(Math.random()>.04)return;let r,o;window.navigator.connection&&(r=null===(t=null===(e=window.navigator)||void 0===e?void 0:e.connection)||void 0===t?void 0:t.effectiveType,o=null===(i=null===(n=window.navigator)||void 0===n?void 0:n.connection)||void 0===i?void 0:i.downlink);try{const e=performance.measure("akcelo:fromStartToLoad",void 0,Q),t=performance.measure("akcelo:fromLoadToFirstBid",Q,ee),n=performance.measure("akcelo:fromLoadToAdManagerRequest",Q,Z);void 0!==e&&(this.logEvent("performance",{data:{connection_type:r||"",connection_downlink:(null==o?void 0:o.toString())||"",from_start_to_load:Math.ceil(e.duration).toString(),from_load_to_first_bid:(Math.ceil(null==t?void 0:t.duration)||0).toString(),from_load_to_ad_manager_request:(Math.ceil(null==n?void 0:n.duration)||0).toString()}}),performance.clearMarks(Q),performance.clearMarks(Z),performance.clearMarks(ee),performance.clearMeasures("akcelo:fromStartToLoad"),performance.clearMeasures("akcelo:fromLoadToFirstBid"),performance.clearMeasures("akcelo:fromLoadToAdManagerRequest"))}catch(s){cv.error("Error during performance measure",s)}}logTroubleshoot(){if(!this.eventLogIsStarted)return void this.eventLogQueue.push({eventType:"troubleshoot"});const e=document.createElement("script");e.src="https://ads.sportslocalmedia.com/slm.adtool.troubleshoot.js",e.onload=()=>lv(this,void 0,void 0,(function*(){var e,t;if(!(null===(t=null===(e=window.slmadshb)||void 0===e?void 0:e.checkService)||void 0===t?void 0:t.check))return;const n=yield window.slmadshb.checkService.check();if(n){n.filter((e=>"PASSED"!==e.status)).forEach((e=>{var t,n,i,r,o;const s={data:{slmads_id:null!==(i=null===(n=null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.slmadsId)||void 0===n?void 0:n.toString())&&void 0!==i?i:"",severity:(null===(r=e.severity)||void 0===r?void 0:r.toLowerCase())||"",status:(null===(o=e.status)||void 0===o?void 0:o.toLowerCase())||"",code:e.code}};(null==e?void 0:e.data)&&(s.data.extra=JSON.stringify(e.data)),this.logEvent("troubleshoot",s)}))}})),document.head.appendChild(e)}setupPageView(){return lv(this,void 0,void 0,(function*(){return be.loadConsent().then((()=>lv(this,void 0,void 0,(function*(){if(!(yield ov())){const e=be.getConsentType(),t=be.getCmpId(),n=be.getTcfPolicyVersion();this.logEvent("pageview",{data:{consent:e,cmp_id:t.toString(),tcf_policy_version:n.toString()}});let i=window.location.hostname+window.location.pathname;new MutationObserver((()=>{const n=window.location.hostname+window.location.pathname;n!==i&&(i=n,this.logVisit(),dv.reset(),this.context&&(this.context.path=window.location.pathname),this.logEvent("pageview",{data:{consent:e,cmp_id:t.toString()}}))})).observe(document,{subtree:!0,childList:!0})}}))))}))}processQueue(){this.eventLogIsStarted||(this.eventLogIsStarted=!0,this.eventLogQueue.forEach((e=>{switch(e.eventType){case"visit":this.logVisit();break;case"performance":this.logPerformances();break;case"troubleshoot":this.logTroubleshoot();break;default:this.logEvent(e.eventType,e.extraContext)}})),this.eventLogQueue=[])}},pv=new H("Auction Manager");const mv=new class{constructor(){this.bidderModules=[],this.renderModules=[],this.readyToRequestAdUnits=[],this.requestAdUnitsDelay=100,this.requestAdUnitsTimer=null,this.isFirstAdRender=!0,pv.info("Module initialization")}registerBidderModule(e){this.bidderModules.push(e),this.sortByPriority(this.bidderModules)}registerRenderModule(e){this.renderModules.push(e),this.sortByPriority(this.renderModules)}addAdUnitReadyToRequest(e){var t,n,i,r,o,s;const a=$.state.adUnits[e];a.isReadyToRequest=!0;const d=null!==(t=null==a?void 0:a.ref)&&void 0!==t?t:e;if(!(null===(r=null===(i=null===(n=ge.adUnits.get(d))||void 0===n?void 0:n.params)||void 0===i?void 0:i.lazyLoad)||void 0===r?void 0:r.enabled)||a.isReadyToRender)return this.readyToRequestAdUnits.push(e),(null===(o=window.slmadshb)||void 0===o?void 0:o.enableSlotsBulk)?this.requestAdUnitsTimer?this.requestAdUnitsTimer.reset():this.requestAdUnitsTimer=new Jh((()=>{this.requestBids(this.readyToRequestAdUnits),this.requestAdUnitsTimer=null}),(null===(s=window.slmadshb)||void 0===s?void 0:s.requestAdUnitsDelay)||this.requestAdUnitsDelay):this.requestBids([e]),q("adUnitReady",(()=>{}),{htmlId:e})}isAdUnitRenderCompatible(e){var t,n,i;const r=null!==(n=null===(t=$.state.adUnits[e])||void 0===t?void 0:t.ref)&&void 0!==n?n:e;return"video"!==(null===(i=ge.adUnits.get(r))||void 0===i?void 0:i.type)}requestBids(e){return q("bidsRequest",(t=>{pv.info("Requesting bids",t.ids);const n=[];this.readyToRequestAdUnits=[],this.bidderModules.forEach((i=>{"prebid"===i.name?t.ids.forEach((e=>{n.push(i.requestBids([e]))})):n.push(i.requestBids(e))})),Promise.all(n).then((()=>{this.renderAds(t.ids)}))}),{ids:e})}renderAds(e){return pv.info("Rendering ads",e),q("adRequest",(e=>{let t=[...e.ids.filter((e=>this.isAdUnitRenderCompatible(e)))];this.renderModules.forEach((e=>{const n=t.filter((t=>e.canRender(t)));n.length>0&&(e.prepareRenderAds(n),q("renderAds",(()=>{e.renderAds(n),n.forEach((e=>{$.state.adUnits[e].isReadyToRequest=!1})),this.isFirstAdRender&&(uv.logPerformances(),this.isFirstAdRender=!1)}),{ids:n})),t=t.filter((e=>!n.includes(e)))}));const n=[];t.forEach((e=>{var t,i;n.push(null!==(i=null===(t=$.state.adUnits[e])||void 0===t?void 0:t.ref)&&void 0!==i?i:e)}));ge.getAdUnitsConfigById(n).forEach((e=>{var t,n,i;if(e.params&&("function"==typeof(null===(t=e.params)||void 0===t?void 0:t.passbackCallback)||(null===(i=null===(n=e.params.partners)||void 0===n?void 0:n.sublime)||void 0===i?void 0:i.enabled)))return q("passback",(e=>{pv.info("Passback ad unit",e.adUnit)}),{adUnit:e})}))}),{ids:e,options:{}})}sortByPriority(e){e.sort(((e,t)=>t.priority-e.priority))}},{REQUEST:fv,RESPONSE:gv,NATIVE:hv,EVENT:vv}=et,bv={[fv]:function(e,t,n){ps({renderFn(t){e(Object.assign({message:gv,renderer:Xo(n)},t))},resizeFn:wv(t.adId,n),options:t.options,adId:t.adId,bidResponse:n})},[vv]:function(e,t,n){if(null==n)return void Qt(`Cannot find ad '${t.adId}' for x-origin event request`);if(n.status!==Je.RENDERED)return void Yt(`Received x-origin event request without corresponding render request for ad '${n.adId}'`);return as(t,n)}};function yv(){window.addEventListener("message",(function(e){!function(e){var t=e.message?"message":"data",n={};try{n=JSON.parse(e[t])}catch(i){return}if(n&&n.adId&&n.message&&bv.hasOwnProperty(n.message))is(n.adId,n.message===et.REQUEST).then((t=>{var i,r;bv[n.message]((i=n.adId,r=function(e){return null==e.origin&&0===e.ports.length?function(){const e="Cannot post message to a frame with null origin. Please update creatives to use MessageChannel, see https://github.com/prebid/Prebid.js/issues/7870";throw Qt(e),new Error(e)}:e.ports.length>0?function(t){e.ports[0].postMessage(JSON.stringify(t))}:function(t){e.source.postMessage(JSON.stringify(t),e.origin)}}(e),function(e,...t){return r(Object.assign({},e,{adId:i}),...t)}),n,t)}))}(e)}),!1)}function wv(e,t){return function(n,i){!function({adId:e,adUnitCode:t,width:n,height:i}){function r(e){return e?e+"px":"100%"}function o(n){let i=s(e,t),r=document.getElementById(i);return r&&r.querySelector(n)}function s(e,t){return En()?a(e):function(){if(window.apntag&&an(window.apntag.getTag))return!0}()?d(t):t}function a(e){const t=Ae(window.googletag.pubads().getSlots(),(t=>Ae(t.getTargetingKeys(),(n=>Ce(t.getTargeting(n),e)))));return t?t.getSlotElementId():null}function d(e){let t=window.apntag.getTag(e);return t&&t.targetId}["div","iframe"].forEach((e=>{let s=o(e+':not([style*="display: none"])');if(s){let e=s.style;e.width=r(n),e.height=r(i)}else Qt(`Unable to locate matching page element for adUnitCode ${t}. Can't resize it to ad's dimensions. Please review setup.`)}))}({...t,width:n,height:i,adId:e})}}Object.assign(bv,{[hv]:function(e,t,n){if(null==n)return void Qt(`Cannot find ad for x-origin event request: '${t.adId}'`);n.status!==Je.RENDERED&&rs(n);switch(t.action){case"assetRequest":e(function(e,t){const n=e.assets.map((e=>_s[e]));return ks(e,t,n)}(t,n));break;case"allAssetRequest":e(function(e,t){return ks(e,t,null)}(t,n));break;default:ds(t,n,{resizeFn:wv(t.adId,n)})}}});const Iv="__slmpbjs_debugging__";function Tv(){return bt().installedModules.includes("debugging")}function Cv(e){return new ft((t=>{wi(e,"debugging",t)}))}function Av({alreadyInstalled:e=Tv,script:t=Cv}={}){let n=null;return function(){return null==n&&(n=new ft(((n,i)=>{setTimeout((()=>{if(e())n();else{const e="https://cdn.jsdelivr.net/npm/prebid.js@9.10.0/dist/debugging-standalone.js";Kt(`Debugging module not installed, loading it from "${e}"...`),bt()._installDebugging=!0,t(e).then((()=>{bt()._installDebugging({DEBUG_KEY:Iv,hook:Fi,config:lt,createBid:$s,logger:Zt("DEBUG:")})})).then(n,i)}}))}))),n}}const Ev=function({load:e=Av(),hook:t=Li("requestBids")}={}){let n=null,i=!1;function r(e,...t){return(n||ft.resolve()).then((()=>e.apply(this,t)))}function o(){t.getHooks({hook:r}).remove(),i=!1}return{enable:function(){i||(n=e(),t.before(r,99),i=!0)},disable:o,reset:function(){n=null,o()}}}();lt.getConfig("debugging",(function({debugging:e}){(null==e?void 0:e.enabled)?Ev.enable():Ev.disable()}));const Sv=bt(),{triggerUserSyncs:xv}=Er,{ADD_AD_UNITS:kv,REQUEST_BIDS:_v,SET_TARGETING:Uv}=je,Rv={bidWon:function(e){if(!Ko.getBidsRequested().map((e=>e.bids.map((e=>e.adUnitCode)))).reduce(Cn).filter(Tn).includes(e))return void Qt('The "'+e+'" placement is not defined.');return!0}};function Ov(e,t){let n=[];return ln(e)&&(t?e.length===t:e.length>0)&&(e.every((e=>Wn(e,2)))?n=e:Wn(e,2)&&n.push(e)),n}function Dv(e){const t=xn(e),n=t.mediaTypes.banner,i=Ov(n.sizes);return i.length>0?(n.sizes=i,t.sizes=i):(Qt("Detected a mediaTypes.banner object without a proper sizes field. Please ensure the sizes are listed like: [[300, 250], ...]. Removing invalid mediaTypes.banner object from request."),delete t.mediaTypes.banner),t}function Bv(e){const t=xn(e),n=t.mediaTypes.video;if(n.playerSize){let e="number"==typeof n.playerSize[0]?2:1;const i=Ov(n.playerSize,e);i.length>0?(2===e&&Xt("Transforming video.playerSize from [640,480] to [[640,480]] so it's in the proper format."),n.playerSize=i,t.sizes=i):(Qt("Detected incorrect configuration of mediaTypes.video.playerSize. Please specify only one set of dimensions in a format like: [[640, 480]]. Removing invalid mediaTypes.video.playerSize property from request."),delete t.mediaTypes.video.playerSize)}return _r(t),t}function Pv(e){var t;function n(t){return Qt(`Error in adUnit "${e.code}": ${t}. Removing native request from ad unit`,e),delete r.mediaTypes.native,r}function i(e){for(const t of["sendTargetingKeys","types"])if(o.hasOwnProperty(t)){const n=e(t);if(n)return n}}const r=xn(e),o=r.mediaTypes.native;if(o.ortb){if(null==(t=o.ortb.assets)?void 0:t.some((e=>!cn(e.id)||e.id<0||e.id%1!=0)))return n("native asset ID must be a nonnegative integer");if(i((e=>n(`ORTB native requests cannot specify "${e}"`))))return r;const e=Object.keys(Ge).filter((e=>Ge[e].includes("hb_native_"))),s=Object.keys(o).filter((t=>e.includes(t)));s.length>0&&(Qt(`when using native OpenRTB format, you cannot use legacy native properties. Deleting ${s} keys from request.`),s.forEach((e=>delete r.mediaTypes.native[e])))}else i((e=>`mediaTypes.native.${e} is deprecated, consider using native ORTB instead`));return o.image&&o.image.sizes&&!Array.isArray(o.image.sizes)&&(Qt("Please use an array of sizes for native.image.sizes field. Removing invalid mediaTypes.native.image.sizes property from request."),delete r.mediaTypes.native.image.sizes),o.image&&o.image.aspect_ratios&&!Array.isArray(o.image.aspect_ratios)&&(Qt("Please use an array of sizes for native.image.aspect_ratios field. Removing invalid mediaTypes.native.image.aspect_ratios property from request."),delete r.mediaTypes.native.image.aspect_ratios),o.icon&&o.icon.sizes&&!Array.isArray(o.icon.sizes)&&(Qt("Please use an array of sizes for native.icon.sizes field. Removing invalid mediaTypes.native.icon.sizes property from request."),delete r.mediaTypes.native.icon.sizes),r}function jv(e,t){let n=yt(e,`mediaTypes.${t}.pos`);if(!cn(n)||isNaN(n)||!isFinite(n)){let n=`Value of property 'pos' on ad unit ${e.code} should be of type: Number`;Yt(n),Zr(je.AUCTION_DEBUG,{type:"WARNING",arguments:n}),delete e.mediaTypes[t].pos}return e}function Nv(e){const t=t=>`adUnit.code '${e.code}' ${t}`,n=e.mediaTypes,i=e.bids;return null==i||ln(i)?null==i&&null==e.ortb2Imp?(Qt(t("has no 'adUnit.bids' and no 'adUnit.ortb2Imp'. Removing adUnit from auction")),null):n&&0!==Object.keys(n).length?(null==e.ortb2Imp||null!=i&&0!==i.length||(e.bids=[{bidder:null}],Kt(t("defines 'adUnit.ortb2Imp' with no 'adUnit.bids'; it will be seen only by S2S adapters"))),e):(Qt(t("does not define a 'mediaTypes' object. This is a required field for the auction, so this adUnit has been removed.")),null):(Qt(t("defines 'adUnit.bids' that is not an array. Removing adUnit from auction")),null)}!function(){let e=null;try{e=window.sessionStorage}catch(t){}if(null!==e){let n=Ev,i=null;try{i=e.getItem(Iv)}catch(t){}null!==i&&n.enable()}}(),Sv.bidderSettings=Sv.bidderSettings||{},Sv.libLoaded=!0,Sv.version="v9.10.0",Xt("Prebid.js v9.10.0 loaded"),Sv.installedModules=Sv.installedModules||[],Sv.adUnits=Sv.adUnits||[],Sv.triggerUserSyncs=xv;const qv={validateAdUnit:Nv,validateBannerMediaType:Dv,validateSizes:Ov};Object.assign(qv,{validateNativeMediaType:Pv}),Object.assign(qv,{validateVideoMediaType:Bv});const $v=Fi("sync",(function(e){const t=[];return e.forEach((e=>{if(null==(e=Nv(e)))return;const n=e.mediaTypes;let i,r,o;n.banner&&(i=Dv(e),n.banner.hasOwnProperty("pos")&&(i=jv(i,"banner"))),n.video&&(r=Bv(i||e),n.video.hasOwnProperty("pos")&&(r=jv(r,"video"))),n.native&&(o=Pv(r||(i||e)));const s=Object.assign({},i,r,o);t.push(s)})),t}),"checkAdUnitSetup");function Fv(e){e.forEach((e=>function(e){var t;const n=null==(t=null==e?void 0:e.mediaTypes)?void 0:t.video;null!=n&&null==n.plcmt&&(n.context===Sr||[2,3,4].includes(n.placement)?n.plcmt=4:n.context!==Sr&&[2,6].includes(n.playbackmethod)&&(n.plcmt=2))}(e)))}function Mv(e){const t=Ko[e]().filter((e=>Ko.getAdUnitCodes().includes(e.adUnitCode))),n=Ko.getLastAuctionId();return t.map((e=>e.adUnitCode)).filter(Tn).map((e=>t.filter((t=>t.auctionId===n&&t.adUnitCode===e)))).filter((e=>e&&e[0]&&e[0].adUnitCode)).map((e=>({[e[0].adUnitCode]:{bids:e}}))).reduce(((e,t)=>Object.assign(e,t)),{})}Sv.getAdserverTargetingForAdUnitCodeStr=function(e){if(Xt("Invoking slmpbjs.getAdserverTargetingForAdUnitCodeStr",arguments),e){var t=Sv.getAdserverTargetingForAdUnitCode(e);return(n=t)&&Object.getOwnPropertyNames(n).length>0?Object.keys(n).map((e=>`${e}=${encodeURIComponent(n[e])}`)).join("&"):""}var n;Kt("Need to call getAdserverTargetingForAdUnitCodeStr with adunitCode")},Sv.getHighestUnusedBidResponseForAdUnitCode=function(e){if(e){const t=Ko.getAllBidsForAdUnitCode(e).filter(cc);return t.length?t.reduce(wl):{}}Kt("Need to call getHighestUnusedBidResponseForAdUnitCode with adunitCode")},Sv.getAdserverTargetingForAdUnitCode=function(e){return Sv.getAdserverTargeting(e)[e]},Sv.getAdserverTargeting=function(e){return Xt("Invoking slmpbjs.getAdserverTargeting",arguments),fc.getAllTargeting(e)},Sv.getConsentMetadata=function(){return Xt("Invoking slmpbjs.getConsentMetadata"),pa.getConsentMeta()},Sv.getNoBids=function(){return Xt("Invoking slmpbjs.getNoBids",arguments),Mv("getNoBids")},Sv.getNoBidsForAdUnitCode=function(e){return{bids:Ko.getNoBids().filter((t=>t.adUnitCode===e))}},Sv.getBidResponses=function(){return Xt("Invoking slmpbjs.getBidResponses",arguments),Mv("getBidsReceived")},Sv.getBidResponsesForAdUnitCode=function(e){return{bids:Ko.getBidsReceived().filter((t=>t.adUnitCode===e))}},Sv.setTargetingForGPTAsync=function(e,t){Xt("Invoking slmpbjs.setTargetingForGPTAsync",arguments),En()?fc.setTargetingForGPT(e,t):Qt("window.googletag is not defined on the page")},Sv.setTargetingForAst=function(e){Xt("Invoking slmpbjs.setTargetingForAn",arguments),fc.isApntagDefined()?(fc.setTargetingForAst(e),Zr(Uv,fc.getAllTargeting())):Qt("window.apntag is not defined on the page")},Sv.renderAd=Fi("async",(function(e,t,n){Xt("Invoking slmpbjs.renderAd",arguments),Kt("Calling renderAd with adId :"+t),ms(e,t,n)})),Sv.removeAdUnit=function(e){if(Xt("Invoking slmpbjs.removeAdUnit",arguments),!e)return void(Sv.adUnits=[]);let t;t=ln(e)?e:[e],t.forEach((e=>{for(let t=Sv.adUnits.length-1;t>=0;t--)Sv.adUnits[t].code===e&&Sv.adUnits.splice(t,1)}))},Sv.requestBids=function(){const e=Fi("async",(function({bidsBackHandler:e,timeout:t,adUnits:n,adUnitCodes:i,labels:r,auctionId:o,ttlBuffer:s,ortb2:a,metrics:d,defer:l}={}){Zr(_v);const c=t||lt.getConfig("bidderTimeout");Xt("Invoking slmpbjs.requestBids",arguments),i&&i.length?n=n.filter((e=>Ce(i,e.code))):i=n&&n.map((e=>e.code));const u={global:Yn({},lt.getAnyConfig("ortb2")||{},a||{}),bidder:Object.fromEntries(Object.entries(lt.getBidderConfig()).map((([e,t])=>[e,t.ortb2])).filter((([e,t])=>null!=t)))};return dd(ft.resolve(u.global)).then((t=>(u.global=t,zv({bidsBackHandler:e,timeout:c,adUnits:n,adUnitCodes:i,labels:r,auctionId:o,ttlBuffer:s,ortb2Fragments:u,metrics:d,defer:l}))))}),"requestBids");return t=e,n=function(t={}){let n=t.adUnits||Sv.adUnits;return t.adUnits=ln(n)?n.slice():[n],t.metrics=mo(),t.metrics.checkpoint("requestBids"),t.defer=gt({promiseFactory:e=>new Promise(e)}),e.call(this,t),t.defer.promise},Object.defineProperties(n,Object.fromEntries(["before","after","getHooks","removeAll"].map((e=>[e,{get:()=>t[e]}])))),n;var t,n}();const zv=Fi("async",(function({bidsBackHandler:e,timeout:t,adUnits:n,ttlBuffer:i,adUnitCodes:r,labels:o,auctionId:s,ortb2Fragments:a,metrics:d,defer:l}={}){const c=Pa(lt.getConfig("s2sConfig")||[]);function u(t,n,i){if("function"==typeof e)try{e(t,n,i)}catch(r){Qt("Error executing bidsBackHandler",null,r)}l.resolve({bids:t,timedOut:n,auctionId:i})}Fv(n),n=po(d).measureTime("requestBids.validate",(()=>$v(n)));const p={};if(n.forEach((e=>{var t,n;const r=Object.keys(e.mediaTypes||{banner:"banner"}),o=e.bids.map((e=>e.bidder)),s=Sa.bidderRegistry,a=o.filter((e=>!c.has(e)));e.adUnitId=$t();const d=null==(n=null==(t=e.ortb2Imp)?void 0:t.ext)?void 0:n.tid;d&&(p.hasOwnProperty(e.code)?Yt(`Multiple distinct ortb2Imp.ext.tid were provided for twin ad units '${e.code}'`):p[e.code]=d),null==i||e.hasOwnProperty("ttlBuffer")||(e.ttlBuffer=i),a.forEach((t=>{const n=s[t],i=n&&n.getSpec&&n.getSpec(),o=i&&i.supportedMediaTypes||["banner"];r.some((e=>Ce(o,e)))||(Yt(function(e,t){const n=Object.keys(e.mediaTypes||{banner:"banner"}).join(", ");return`\n ${e.code} is a ${n} ad unit\n containing bidders that don't support ${n}: ${t}.\n This bidder won't fetch demand.\n `}(e,t)),e.bids=e.bids.filter((e=>e.bidder!==t)))}))})),n&&0!==n.length){n.forEach((e=>{var t,n;const i=(null==(n=null==(t=e.ortb2Imp)?void 0:t.ext)?void 0:n.tid)||p[e.code]||$t();p.hasOwnProperty(e.code)||(p[e.code]=i),e.transactionId=i,wt(e,"ortb2Imp.ext.tid",i)}));const e=Ko.createAuction({adUnits:n,adUnitCodes:r,callback:u,cbTimeout:t,labels:o,auctionId:s,ortb2Fragments:a,metrics:d});let i=n.length;i>15&&Xt(`Current auction ${e.getAuctionId()} contains ${i} adUnits.`,n),r.forEach((t=>fc.setLatestAuctionForAdUnit(t,e.getAuctionId()))),e.callBids()}else Kt("No adUnits configured. No bids requested."),u()}),"startAuction");Sv.requestBids.before((function(e,t){function n(e){for(var t;t=e.shift();)t()}n(yr),n(Lv),e.call(this,t)}),49),Sv.addAdUnits=function(e){Xt("Invoking slmpbjs.addAdUnits",arguments),Sv.adUnits.push.apply(Sv.adUnits,ln(e)?e:[e]),Zr(kv)},Sv.onEvent=function(e,t,n){Xt("Invoking slmpbjs.onEvent",arguments),an(t)?!n||Rv[e].call(null,n)?Kr(e,t,n):Qt('The id provided is not valid for event "'+e+'" and no handler was set.'):Qt('The event handler provided is not a function and was not set on event "'+e+'".')},Sv.offEvent=function(e,t,n){Xt("Invoking slmpbjs.offEvent",arguments),n&&!Rv[e].call(null,n)||Xr(e,t,n)},Sv.getEvents=function(){return Xt("Invoking slmpbjs.getEvents"),Qr()},Sv.registerBidAdapter=function(e,t){Xt("Invoking slmpbjs.registerBidAdapter",arguments);try{Sa.registerBidAdapter(e(),t)}catch(n){Qt("Error registering bidder adapter : "+n.message)}},Sv.registerAnalyticsAdapter=function(e){Xt("Invoking slmpbjs.registerAnalyticsAdapter",arguments);try{Sa.registerAnalyticsAdapter(e)}catch(t){Qt("Error registering analytics adapter : "+t.message)}},Sv.createBid=function(e){return Xt("Invoking slmpbjs.createBid",arguments),$s(e)};const Lv=[],Vv=Fi("async",(function(e){e&&!mn(e)?(Xt("Invoking slmpbjs.enableAnalytics for: ",e),Sa.enableAnalytics(e)):Qt("slmpbjs.enableAnalytics should be called with option {}")}),"enableAnalyticsCb");Sv.enableAnalytics=function(e){Lv.push(Vv.bind(this,e))},Sv.aliasBidder=function(e,t,n){Xt("Invoking slmpbjs.aliasBidder",arguments),e&&t?Sa.aliasBidAdapter(e,t,n):Qt("bidderCode and alias must be passed as arguments","slmpbjs.aliasBidder")},Sv.aliasRegistry=Sa.aliasRegistry,lt.getConfig("aliasRegistry",(e=>{"private"===e.aliasRegistry&&delete Sv.aliasRegistry})),Sv.getAllWinningBids=function(){return Ko.getAllWinningBids()},Sv.getAllPrebidWinningBids=function(){return Ko.getBidsReceived().filter((e=>e.status===Je.BID_TARGETING_SET))},Sv.getHighestCpmBids=function(e){return fc.getWinningBids(e)},Sv.clearAllAuctions=function(){Ko.clearAllAuctions()},Sv.markWinningBidAsUsed=function(e){const t=Wv(e,"Improper use of markWinningBidAsUsed. It needs an adUnitCode or an adId to function.");t.length>0&&Ko.addWinningBid(t[0])};const Wv=(e,t)=>{let n=[];return e.adUnitCode&&e.adId?n=Ko.getBidsReceived().filter((t=>t.adId===e.adId&&t.adUnitCode===e.adUnitCode)):e.adUnitCode?n=fc.getWinningBids(e.adUnitCode):e.adId?n=Ko.getBidsReceived().filter((t=>t.adId===e.adId)):Yt(t),n};function Gv(e){e.forEach((function(e){if(void 0===e.called)try{e.call(),e.called=!0}catch(t){Qt("Error processing command :","prebid.js",t)}}))}Sv.getConfig=lt.getAnyConfig,Sv.readConfig=lt.readAnyConfig,Sv.mergeConfig=lt.mergeConfig,Sv.mergeBidderConfig=lt.mergeBidderConfig,Sv.setConfig=lt.setConfig,Sv.setBidderConfig=lt.setBidderConfig,Sv.que.push((()=>yv())),Sv.cmd.push=function(e){if("function"==typeof e)try{e.call()}catch(t){Qt("Error processing command :",t.message,t.stack)}else Qt("Commands written into slmpbjs.cmd.push must be wrapped in a function")},Sv.que.push=Sv.cmd.push,Sv.processQueue=function(){fs(),Fi.ready(),Gv(Sv.que),Gv(Sv.cmd)},Sv.triggerBilling=e=>{const t=Wv(e,"Improper use of triggerBilling. It requires a bid with at least an adUnitCode or an adId to function."),n=t.find((t=>t.requestId===e.requestId))||t[0];if(t.length>0&&n)try{Sa.callBidBillableBidder(n)}catch(i){Qt("Error when triggering billing :",i)}else Yt("The bid provided to triggerBilling did not match any bids received.")};const Hv=4;let Jv,Kv=[],Xv={},Yv=!1,Qv=!0,Zv="USD";var eb=!1,tb={};let nb,ib={},rb=gt();function ob(e){if(Jv="https://cdn.jsdelivr.net/gh/prebid/currency-file@1/latest.json?date=$$TODAY$$","object"==typeof e.rates&&(tb.conversions=e.rates,Yv=!0,Qv=!1),"object"==typeof e.defaultRates&&(nb=e.defaultRates,tb.conversions=nb,Yv=!0),"string"==typeof e.adServerCurrency){Xt("enabling currency support",arguments),Zv=e.adServerCurrency,e.conversionRateFile&&(Xt("currency using override conversionRateFile:",e.conversionRateFile),Jv=e.conversionRateFile);const t=Jv.indexOf("$$TODAY$$");if(-1!==t){const e=new Date;let n=`${e.getMonth()+1}`,i=`${e.getDate()}`;n.length<2&&(n=`0${n}`),i.length<2&&(i=`0${i}`);const r=`${e.getFullYear()}${n}${i}`;Jv=`${Jv.substring(0,t)}${r}${Jv.substring(t+9,Jv.length)}`}Xv={},eb||(eb=!0,bt().convertCurrency=(e,t,n)=>parseFloat(e)*pb(t,n),Li("addBidResponse").before(lb,100),Li("responsesReady").before(db),Kr(je.AUCTION_TIMEOUT,cb),Kr(je.AUCTION_INIT,ab),ab())}else Xt("disabling currency support"),eb&&(Li("addBidResponse").getHooks({hook:lb}).remove(),Li("responsesReady").getHooks({hook:db}).remove(),Xr(je.AUCTION_TIMEOUT,cb),Xr(je.AUCTION_INIT,ab),delete bt().convertCurrency,Zv="USD",Xv={},eb=!1,Yv=!1,Qv=!0,tb={},ib={},rb=gt());"object"==typeof e.bidderCurrencyDefault&&(ib=e.bidderCurrencyDefault)}function sb(e){nb?(Yt(e),Yt("Currency failed loading rates, falling back to currency.defaultRates")):Qt(e)}function ab(){Qv?(Qv=!1,Yv=!1,li(Jv,{success:function(e){try{tb=JSON.parse(e),Xt("currencyRates set to "+JSON.stringify(tb)),Xv={},Yv=!0,ub()}catch(t){sb("Failed to parse currencyRates response: "+e)}},error:function(...e){sb(...e),Yv=!0,ub(),Qv=!0}})):ub()}function db(e,t){e(t.then((()=>rb.promise)))}lt.getConfig("currency",(e=>ob(e.currency)));const lb=ho("currency",(function(e,t,n,i){if(!n)return e.call(this,t,n,i);let r=n.bidderCode||n.bidder;if(ib[r]){let e=ib[r];n.currency&&e!==n.currency?Yt(`Currency default '${r}: ${e}' ignored. adapter specified '${n.currency}'`):n.currency=e}if(n.currency||(Yt('Currency not specified on bid. Defaulted to "USD"'),n.currency="USD"),n.getCpmInNewCurrency=function(e){return(parseFloat(this.cpm)*pb(this.currency,e)).toFixed(3)},n.currency===Zv)return e.call(this,t,n,i);Kv.push([e,this,t,n,i]),eb&&!Yv||ub()}));function cb({auctionId:e}){Kv=Kv.filter((([t,n,i,r,o])=>{if(r.auctionId!==e)return!0;o(Ke.CANNOT_CONVERT_CURRENCY)}))}function ub(){for(;Kv.length>0;){const[t,n,i,r,o]=Kv.shift();if(void 0!==r&&"currency"in r&&"cpm"in r){let t=r.currency;try{let e=pb(t);1!==e&&(r.cpm=(parseFloat(r.cpm)*e).toFixed(4),r.currency=Zv)}catch(e){Yt("getCurrencyConversion threw error: ",e),o(Ke.CANNOT_CONVERT_CURRENCY);continue}}t.call(n,i,r,o)}rb.resolve()}function pb(e,t=Zv){var n,i=null;let r=`${e}->${t}`;if(r in Xv)Kt("Using conversionCache value "+(i=Xv[r])+" for "+r);else if(!1===eb){if("USD"!==e)throw new Error("Prebid currency support has not been enabled and fromCurrency is not USD");i=1}else if(e===t)i=1;else if(e in tb.conversions){if(!(t in(n=tb.conversions[e])))throw new Error("Specified adServerCurrency in config '"+t+"' not found in the currency rates file");Xt("getCurrencyConversion using direct "+e+" to "+t+" conversionRate "+(i=n[t]))}else if(t in tb.conversions){if(!(e in(n=tb.conversions[t])))throw new Error("Specified fromCurrency '"+e+"' not found in the currency rates file");Xt("getCurrencyConversion using reciprocal "+e+" to "+t+" conversionRate "+(i=mb(1/n[e],Hv)))}else{var o=Object.keys(tb.conversions)[0];if(!(e in tb.conversions[o]))throw new Error("Specified fromCurrency '"+e+"' not found in the currency rates file");var s=1/tb.conversions[o][e];if(!(t in tb.conversions[o]))throw new Error("Specified adServerCurrency in config '"+t+"' not found in the currency rates file");Xt("getCurrencyConversion using intermediate "+e+" thru "+o+" to "+t+" conversionRate "+(i=mb(s*tb.conversions[o][t],Hv)))}return r in Xv||(Kt("Adding conversionCache value "+i+" for "+r),Xv[r]=i),i}function mb(e,t){var n=1;for(let i=0;i<t;i++)n+="0";return Math.round(e*n)/n}Ja({type:Ma,name:"currency",fn:function(e,t,n){eb&&(e.cur=e.cur||[n.currency||Zv])}});class fb{constructor(){this.priority=1,this.name="base_module"}}class gb extends fb{constructor(e){super(),this.name=e,mv.registerBidderModule(this)}}const hb='<!doctype html>\n<html>\n<head>\n <script src="https://cdn.jsdelivr.net/npm/prebid-universal-creative@1.15.0/dist/<%= hb_format %>.js"><\/script>\n</head>\n<body leftMargin="0" topMargin="0" marginwidth="0" marginheight="0">\n<script>\n var ucTagData = {};\n ucTagData.adServerDomain = "";\n ucTagData.pubUrl = "<%= pubUrl %>";\n ucTagData.hbPb = "<%= hb_pb %>";\n ucTagData.hbFormat = "<%= hb_format %>";\n ucTagData.adId = "<%= hb_adid %>";\n ucTagData.requestAllAssets = true;\n\n try {\n ucTag.renderAd(document, ucTagData);\n } catch (e) {\n console.log(e);\n }\n<\/script>\n</body>\n</html>\n';class vb extends fb{constructor(){super(),window.slmadshb=window.slmadshb||{},window.slmadshb.que=window.slmadshb.que||[],window.slmadshb.que.push((()=>{mv.registerRenderModule(this)}))}renderAds(e){}prepareRenderAds(e){}canRender(e){}}const bb=new H("Prebid Renderer");new class extends vb{constructor(){super(...arguments),this.priority=1}renderAds(e){bb.info("Render Ads",e),e.forEach((e=>{var t,n;const i=null!==(n=null===(t=$.state.adUnits[e])||void 0===t?void 0:t.ref)&&void 0!==n?n:e,r=window.slmpbjs.getAdserverTargetingForAdUnitCode(e);if(null==r?void 0:r.hb_adid){const t=ge.adUnits.get(i);if(!t)return void bb.error(`Failed to find ad unit ${e} (ref: ${i})`);bb.debug("Rendering Prebid ad",t,r);const[n,o]=this.getBidSize(t,r),s=this.shouldUseSafeFrame(r);return this.renderAd(e,r,n,o,s),q("adUnitRendered",(e=>{bb.info("Ad unit rendered",e)}),{id:e})}}))}canRender(e){const t=window.slmpbjs.getAdserverTargetingForAdUnitCode(e);return!!(null==t?void 0:t.hb_adid)}renderAd(e,t,n,i,r){var o,s;const a=G(n.toString(),i.toString());if(r&&(null===(o=window.top)||void 0===o?void 0:o.location.href)){let e=`//ads.sportslocalmedia.com/sf.html?pubUrl=${encodeURIComponent(window.top.location.href)}`;t&&Object.keys(t).length>0&&(e+="&",e+=Object.keys(t).map((e=>`${e}=${t[e]}`)).join("&")),a.src=e}"video"===t.hb_format&&(a.style.height="0"),a.id=t.hb_adid||"",a.setAttribute("sandbox","allow-forms allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation");const d=document.getElementById(e);if(d){1!==i?d.style.height=`${i}px`:d.style.removeProperty("height");if(d.getElementsByTagName("div")[0]){const t=document.createElement("div");t.id=`${e}-iframe-container`,t.style.margin="auto",d.innerHTML="",d.appendChild(t),t.appendChild(a)}else d.innerHTML="",d.appendChild(a);if(t.pubUrl=window.location.href,null===(s=a.contentWindow)||void 0===s?void 0:s.document)if("banner"===t.hb_format&&t.hb_adid)window.slmpbjs.renderAd(a.contentWindow.document,t.hb_adid);else{const e=Vh.render(hb,t);a.contentWindow.document.write(e),a.contentWindow.document.close()}}}getBidSize(e,t){var n;let i,r;if(t.hb_format&&"video"===t.hb_format)e.type&&"bannervideo"!==e.type&&"carousel"!==e.type||!(null===(n=e.mediaTypes.video)||void 0===n?void 0:n.playerSize)?(i=0,r=0):(i=e.mediaTypes.video.playerSize[0][0],r=e.mediaTypes.video.playerSize[0][1]);else if(t.hb_format&&"native"===t.hb_format){let t=0,n=0,o=0;"object"==typeof e.sizes&&e.sizes.forEach((e=>{"fluid"!==e&&e[0]*e[1]>o&&(o=e[0]*e[1],[t,n]=e)})),i=t,r=n}else{const e=t.hb_size.split("x");i=Number(e[0]),r=Number(e[1])}return[i,r]}shouldUseSafeFrame(e){return"native"!==e.hb_format&&J.includes((null==e?void 0:e.hb_bidder)||"")}};const yb={renderNow:!0,render:e=>{var t;const{height:n,width:i,ad:r,adUrl:o,adUnitCode:s}=e;if(!n||!i)return;const a=document.getElementById(s);if(a&&(r||o)){const e=G(n.toString(),i.toString());e.style.overflow="hidden",e.src="about:blank",a.innerHTML="",a.appendChild(e);const s=null===(t=null==e?void 0:e.contentWindow)||void 0===t?void 0:t.document;if(void 0===s)return;if(r)s.write(r),s.close();else if(o){const e=G(n.toString(),i.toString());e.style.overflow="hidden",e.src=o,s.body.append(e)}!function(e,t,n){if(e.defaultView&&e.defaultView.frameElement){const i=e.defaultView.frameElement;i.width=t,i.height=n}}(s,i.toString(),n.toString())}}},wb=new H("Prebid"),Ib={smartadserver:[Dr,Or],rubicon:[Dr,Or,Rr],ix:[Dr,Or,Rr],pubmatic:[Dr,Or,Rr],adyoulike:[Dr,Or,Rr],criteo:[Dr,Or,Rr],richaudience:[Dr,Or]};new class extends gb{constructor(){super("prebid"),this.cachedFloorModel=new Map,this.cachedFloor=new Map,wb.info("Module initialization"),z()&&Promise.resolve().then((()=>Xy)),window.slmpbjs=window.slmpbjs||{que:[]},window.slmpbjs.que.push((()=>{window.slmpbjs.onEvent("bidRequested",(e=>{e.bids.forEach(this.getFloorDataFromBid.bind(this))})),window.slmpbjs.onEvent("bidWon",(e=>{var t,n,i,r,o;let s,a=!1;"video"===e.mediaType&&(a=!0,s=3e4);const d={teads:L()?6e4:5e4,seedtag:32e3,optidigital:3e4,richaudience:3e4,invibes:3e4};-1!==Object.keys(d).indexOf(e.bidder)&&(a=!0,s=d[e.bidder]);const{config:l}=ge;let c;const u=ge.getAdUnitsConfigById([e.adUnitCode]);u.length>0&&(c=u[0]),a&&s&&(null===(t=l.params)||void 0===t?void 0:t.refresh)&&l.params.refresh.enabled&&l.params.refresh.visibleTimeout&&l.params.refresh.timeout&&window.slmadshb.refresh.alterRefreshTimeoutTemporarily(e.adUnitCode,s,(null===(i=null===(n=null==c?void 0:c.params)||void 0===n?void 0:n.refresh)||void 0===i?void 0:i.visibleTimeout)?c.params.refresh.visibleTimeout:l.params.refresh.visibleTimeout,(null===(o=null===(r=null==c?void 0:c.params)||void 0===r?void 0:r.refresh)||void 0===o?void 0:o.timeout)?c.params.refresh.timeout:l.params.refresh.timeout)}));const e=()=>{performance.mark(ee),window.slmpbjs.offEvent("bidRequested",e)};window.slmpbjs.onEvent("bidRequested",e)})),q.after("loadConfig",(()=>{var e,t,n,i,r,o,s,a,d,l,c,u,p,m,f,g,h,v,b,y,w,I;const T={enableSendAllBids:!1,targetingControls:{allowTargetingKeys:["BIDDER","AD_ID","PRICE_BUCKET","SIZE","DEAL","FORMAT"]},useBidCache:!0,bidderTimeout:null!==(i=null===(n=L()?null===(e=ge.config.params)||void 0===e?void 0:e.mobileParams:null===(t=ge.config.params)||void 0===t?void 0:t.desktopParams)||void 0===n?void 0:n.prebidTimeout)&&void 0!==i?i:1e3,priceGranularity:{buckets:[{precision:2,min:0,max:30,increment:.01}]},currency:{adServerCurrency:null!==(o=null===(r=ge.config.params)||void 0===r?void 0:r.currency)&&void 0!==o?o:"EUR",defaultRates:{USD:{EUR:.91}}},outbrain:{bidderUrl:"https://b1h-euc1.zemanta.com/api/bidder/prebid/bid/",usersyncUrl:"https://b1h-euc1.zemanta.com/usersync/prebid/"},cache:{url:"https://prebid-cache.sportslocalmedia.com/cache",ignoreBidderCacheKey:!0},maxRequestsPerOrigin:10,minBidCacheTTL:null===(s=ge.config.params)||void 0===s?void 0:s.minBidCacheTTL,eventHistoryTTL:null===(a=ge.config.params)||void 0===a?void 0:a.eventHistoryTTL,userSync:{userIds:this.getUserIdsConfig(),auctionDelay:50,syncDelay:3e3,syncsPerBidder:5,aliasSyncEnabled:!0,filterSettings:{iframe:{bidders:"*",filter:"include"}},topics:{maxTopicCaller:0,bidders:[{bidder:"pubmatic",iframeURL:"https://ads.pubmatic.com/AdServer/js/topics/topics_frame.html"},{bidder:"improvedigital",iframeURL:"https://hb.360yield.com/privacy-sandbox/topics.html"},{bidder:"onetag",iframeURL:"https://onetag-sys.com/static/topicsapi.html"},{bidder:"openx",iframeURL:"https://pa.openx.net/topics_frame.html"}]}},paapi:{enabled:!!ge.config.params.enablePaapi,defaultForSlots:1,gpt:{autoconfig:!0}},enableTIDs:!0};if((null===(d=ge.config.params)||void 0===d?void 0:d.gvlMapping)&&(T.gvlMapping=ge.config.params.gvlMapping),(null===(l=ge.config.params)||void 0===l?void 0:l.gdprApplies)&&(T.consentManagement=this.getConsentManagementConfig()),(null===(c=ge.config.params)||void 0===c?void 0:c.identityLinkPID)&&T.userSync.userIds.push({name:"identityLink",params:{pid:ge.config.params.identityLinkPID,notUse3P:!1},storage:{type:"cookie",name:"idl_env",expires:15,refreshInSeconds:1800}}),(null===(u=ge.config.params)||void 0===u?void 0:u.schain)&&(T.schain={validation:"strict",config:null===(p=ge.config.params)||void 0===p?void 0:p.schain}),T.realTimeData=(null===(m=ge.config.params)||void 0===m?void 0:m.realTimeData)||{auctionDelay:1e3},!1!==window.slmadshb.enableSirdata&&(T.realTimeData.dataProviders=T.realTimeData.dataProviders||[],T.realTimeData.dataProviders.push({name:"SirdataRTDModule",waitForIt:!0,params:{partnerId:38419,key:85}})),ge.config.adUnits.some((e=>{var t;return null===(t=e.bids)||void 0===t?void 0:t.some((e=>"adagio"===e.bidder))}))){T.realTimeData.dataProviders=T.realTimeData.dataProviders||[];const e=ge.config.adUnits.map((e=>{var t,n;return null===(n=null===(t=e.bids)||void 0===t?void 0:t.find((e=>{var t,n;return"adagio"===e.bidder&&(null===(t=e.params)||void 0===t?void 0:t.organizationId)&&(null===(n=e.params)||void 0===n?void 0:n.site)})))||void 0===n?void 0:n.params})).find((e=>!!e)),t=null==e?void 0:e.organizationId,n=null==e?void 0:e.site;t&&n&&T.realTimeData.dataProviders.push({name:"adagio",params:{organizationId:t,site:n}})}const C=L()?null===(g=null===(f=ge.config.params)||void 0===f?void 0:f.mobileParams)||void 0===g?void 0:g.floors:null===(v=null===(h=ge.config.params)||void 0===h?void 0:h.desktopParams)||void 0===v?void 0:v.floors;C&&(T.floors=Object.assign(Object.assign({},C),{additionalSchemaFields:{id:e=>{var t;return null===(t=$.getAdUnitsById([e.adUnitCode])[0])||void 0===t?void 0:t.ref},bidder:e=>e.bidder,countryGroup:()=>{var e;return(null===(e=window.slmadshb.context)||void 0===e?void 0:e.countryCode)?pe.includes(window.slmadshb.context.countryCode)?"HIGH":me.includes(window.slmadshb.context.countryCode)?"AVERAGE":"LOW":"AVERAGE"}}}));const A=L()?null===(y=null===(b=ge.config.params)||void 0===b?void 0:b.mobileParams)||void 0===y?void 0:y.sizeConfig:null===(I=null===(w=ge.config.params)||void 0===w?void 0:w.desktopParams)||void 0===I?void 0:I.sizeConfig;A&&(T.sizeConfig=A),window.slmpbjs.que.push((()=>{window.slmpbjs.setConfig(T),window.slmpbjs.bidderSettings=Object.assign({standard:{storageAllowed:!0}},(e=>{const t={};return e&&e.prebidBidAdjustments&&e.prebidBidAdjustments.forEach((e=>{e.bidder&&"function"==typeof e.adjustment&&(t[e.bidder]={bidCpmAdjustment:e.adjustment})})),t})(ge.config.params))}))})),q.after("addAdUnit",((e,t)=>{t.isCapped||(window.slmpbjs.que.push((()=>{const{adUnit:e}=t;if(e.bids){const n=ct(e);n.code=t.htmlId;const i=this.getSplittedAdUnits(n);i.length>0?window.slmpbjs.addAdUnits(i):window.slmpbjs.addAdUnits([n])}})),t.adUnit.adUnitPath||mv.addAdUnitReadyToRequest(t.htmlId))})),q.after("coreInit",(()=>{window.slmadshb.getAdUnitFloor=e=>{var t;return(null===(t=this.cachedFloor.get(e))||void 0===t?void 0:t.toFixed(2))||null},window.slmadshb.getAdUnitFloorModel=e=>this.cachedFloorModel.get(e)||null})),q.before("renderAds",(({ids:e})=>this.beforeRenderAds(e))),window.slmpbjs.processQueue()}getConsentManagementConfig(){return{gdpr:{cmpApi:"iab",timeout:3e4,defaultGdprScope:!0,rules:[{purpose:"storage",enforcePurpose:!1,enforceVendor:!1},{purpose:"basicAds",enforcePurpose:!1,enforceVendor:!1}]}}}getUserIdsConfig(){var e;const t=[];return(null===(e=ge.config.params)||void 0===e?void 0:e.userSync)&&(ge.config.params.userSync.sharedId&&t.push({name:"sharedId",storage:{name:"sharedid",type:"html5",expires:365}}),ge.config.params.userSync.teadsId&&t.push({name:"teadsId",params:{pubId:17023}}),ge.config.params.userSync.pairId&&t.push({name:"pairId",params:{liveramp:{}},storage:{name:"pairId",type:"cookie",expires:15,refreshInSeconds:1800}}),ge.config.params.userSync.criteoId&&t.push({name:"criteo"}),ge.config.params.userSync.id5Id&&t.push({name:"id5Id",params:{partner:1},storage:{name:"id5id",type:"html5",expires:365,refreshInSeconds:14400}})),t}getFloorDataFromBid(e){if("object"==typeof e.floorData&&this.cachedFloorModel.set(e.adUnitCode,e.floorData.modelVersion),e.getFloor){const t=e.getFloor({currency:"EUR"});"number"==typeof t.floor&&this.cachedFloor.set(e.adUnitCode,(e=>{let t=0;if(e<.1)t=.01;else if(e<.5)t=.02;else if(e<4)t=.05;else{if(!(e<6))return 6;t=.5}const n=1/t;return e<Math.round(e*n)/n?Math.round((e-t)*n)/n:Math.round(e*n)/n})(t.floor))}}requestBids(e){return new Promise((t=>{window.slmpbjs.que.push((()=>{window.slmpbjs.requestBids({adUnitCodes:e,bidsBackHandler:(e,n,i)=>{wb.info("BidsBackHandler",e,n,i),void 0!==e?(Object.values(e).forEach((e=>{e.bids.forEach((e=>{(K.includes(e.bidderCode)||"richaudience"===e.bidderCode&&"video"!==e.mediaType)&&(e.renderer=yb)}))})),t()):t()}})}))}))}getBids(e){const t=[];return e.forEach((e=>{var n,i,r;if($.getAdUnitsById([e])[0]){const o=window.slmpbjs.getHighestUnusedBidResponseForAdUnitCode(e);0!==Object.keys(o).length&&t.push({provider:"prebid",cpm:null!==(n=o.cpm)&&void 0!==n?n:0,width:null!==(i=o.width)&&void 0!==i?i:1,height:null!==(r=o.height)&&void 0!==r?r:1,prebidTargeting:o.adserverTargeting})}})),t}getSplittedAdUnits(e){var t;const n=[];if(!e.bids)return[];function i(e,t){let n=[];if(!Object.keys(e.mediaTypes).includes(t)||!e.bids)return[];const i=Object.keys(Ib).filter((e=>-1!==Ib[e].indexOf(t)));return n=e.bids.filter((e=>{var n,r,o;const s=-1!==i.indexOf(e.bidder),a=void 0!==(null===(n=null==e?void 0:e.params)||void 0===n?void 0:n.mediaType)?t.toUpperCase()===(null===(o=null===(r=null==e?void 0:e.params)||void 0===r?void 0:r.mediaType)||void 0===o?void 0:o.toUpperCase()):"BANNER"===t.toUpperCase();return s&&a})),n}const r=typeof e.bids.find((e=>void 0!==Ib[e.bidder])),o=(null===(t=Object.keys(e.mediaTypes))||void 0===t?void 0:t.length)>1;if(r&&o){const t=i(e,Dr),r=i(e,Rr),o=i(e,Or),s=ct(e);if(e.bids=e.bids.filter((e=>-1===Object.keys(Ib).indexOf(e.bidder))),n.push(e),t.length>0){const e=ct(s);delete e.mediaTypes.video,delete e.mediaTypes.native,e.bids=t,n.push(e)}if(r.length>0){const e=ct(s);delete e.mediaTypes.video,delete e.mediaTypes.banner,e.bids=r,n.push(e)}if(o.length>0){const e=ct(s);delete e.mediaTypes.banner,delete e.mediaTypes.native,e.bids=o,n.push(e)}}return n}beforeRenderAds(e){return new Promise((t=>{window.slmpbjs.que.push((()=>{window.slmpbjs.setTargetingForGPTAsync(e),t()}))}))}};var Tb=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{d(i.next(e))}catch(t){o(t)}}function a(e){try{d(i.throw(e))}catch(t){o(t)}}function d(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}d((i=i.apply(e,t||[])).next())}))};const Cb=new H("Google Tag");window.googletag=window.googletag||{cmd:[]},window.googletag.cmd=window.googletag.cmd||[];const Ab=new Map;new class extends vb{constructor(){super(),this.priority=10,this.adUnitSlots={},this.adRequests={},this.isFirstGamRequest=!0,this.slotHasA9Bids=e=>{const t=e.getTargeting("amznbid")||[];return t.length>0&&!["1","2","3","50jqbk"].includes(t[0])},this.monkeyPatchGPTDisplay=()=>{var e;if(!(null===(e=ge.config.params)||void 0===e?void 0:e.loadGoogleExoticSlots))return void Cb.info("loadGoogleExoticSlots option is disabled");const t=[];ge.adUnits.forEach((e=>{void 0!==e.adUnitPath&&t.push(e.adUnitPath)})),window.googletag.cmd.push((()=>{const e=window.googletag,n=e.display;e.display=function(...i){n.apply(e,i);(()=>{const e=window.googletag.pubads().getSlots().filter((e=>-1===t.indexOf(e.getAdUnitPath())&&(!Ab.has(e.getSlotElementId())||!1===Ab.get(e.getSlotElementId()))));e.length>0&&(e.forEach((e=>{Ab.set(e.getSlotElementId(),!0)})),googletag.pubads().refresh(e))})()}}))},Cb.info("Module initialization"),window.googletag.apiReady||function(){var e;const t=document.createElement("script");t.async=!0,t.type="text/javascript",t.src="https://securepubads.g.doubleclick.net/tag/js/gpt.js";const n=document.getElementsByTagName("script")[0];null===(e=null==n?void 0:n.parentNode)||void 0===e||e.insertBefore(t,n)}(),q.after("loadConfig",(()=>Tb(this,void 0,void 0,(function*(){window.googletag.pubadsReady||window.googletag.cmd.push((()=>{var e;window.googletag.pubads().disableInitialLoad(),(null===(e=ge.config.params)||void 0===e?void 0:e.enableSingleRequest)&&window.googletag.pubads().enableSingleRequest(),window.googletag.enableServices()})),this.loadExoticSlots(),this.monkeyPatchGPTDisplay()})))),q.after("addAdUnit",((e,t)=>{var n;t.adUnit.adUnitPath&&t.htmlId&&t.adUnit.sizes&&!t.isCapped&&(t.adUnit.type&&-1!==["video","incontentvideo"].indexOf(t.adUnit.type)?mv.addAdUnitReadyToRequest(t.htmlId):"outofpage"===t.adUnit.sizes?this.createOutOfPageSlot(t.adUnit.adUnitPath,t.htmlId):this.createSlot(t.adUnit.adUnitPath,t.htmlId,t.adUnit.sizes,null===(n=t.adUnit.params)||void 0===n?void 0:n.sizeMapping))})),q.before("coreInit",(()=>{var e;"limited"===be.consentType&&(null===(e=ge.config.params)||void 0===e?void 0:e.limitedConsentGamProtection)&&ge.adUnits.forEach((e=>{var t;e.type&&["cornervideo","instream-video","avp","standalone-video","akcelo-video"].includes(e.type)||"allowed"!==(null===(t=e.params)||void 0===t?void 0:t.gamMode)||(e.params.gamMode="a9only",Cb.debug(`Setting ad unit ${e.id} to a9only mode`))}))})),this.setupEvents()}loadExoticSlots(){var e;if(!(null===(e=ge.config.params)||void 0===e?void 0:e.loadGoogleExoticSlots))return void Cb.info("LoadExoticSlots call skipped (loadGoogleExoticSlots option is disabled)");const t=[];ge.adUnits.forEach((e=>{void 0!==e.adUnitPath&&t.push(e.adUnitPath)})),window.googletag.cmd.push((()=>{const e=googletag.pubads().getSlots().filter((e=>-1===t.indexOf(e.getAdUnitPath())&&(!Ab.has(e.getSlotElementId())||!1===Ab.get(e.getSlotElementId()))));e.length>0&&(e.forEach((e=>{Ab.set(e.getSlotElementId(),!0)})),googletag.pubads().refresh(e))}))}renderAds(e){Cb.info("Render ads",e),this.isFirstGamRequest&&(performance.mark(Z),this.isFirstGamRequest=!1);const t=e.filter((e=>this.adUnitSlots[e])).map((e=>this.adUnitSlots[e]));t.length>0&&window.googletag.cmd.push((()=>{try{this.getExtraTargeting().forEach(((e,t)=>{window.googletag.pubads().setTargeting(t,e)})),window.googletag.pubads().refresh(t)}catch(e){Cb.error("Failed to set extra targeting",e),window.googletag.pubads().refresh(t)}}))}prepareRenderAds(e){e.forEach((e=>{var t,n,i,r,o,s,a,d,l,c,u,p,m,f;((null===(t=ge.config.params)||void 0===t?void 0:t.gamDelayAddService)||"outofpage"===(null===(n=ge.adUnits.get(e))||void 0===n?void 0:n.sizes))&&window.googletag.cmd.push((()=>{var t;null===(t=this.adUnitSlots[e])||void 0===t||t.addService(window.googletag.pubads())}));const g=null!==(r=null===(i=$.state.adUnits[e])||void 0===i?void 0:i.ref)&&void 0!==r?r:e,h=document.getElementById(e);if(h&&h.style.removeProperty("height"),Object.keys(this.adRequests).includes(e)&&(this.adRequests[e]+=1),this.adUnitSlots[e])if(window.slmadshb.getAdUnitFloor&&window.slmadshb.getAdUnitFloor(e)&&this.adUnitSlots[e].setTargeting("slm_floor",window.slmadshb.getAdUnitFloor(e)||"0.00"),this.adUnitSlots[e].setTargeting("slmadshb_r",this.adRequests[e]>1?"true":"false"),(null===(s=null===(o=ge.config.params)||void 0===o?void 0:o.refresh)||void 0===s?void 0:s.targeting)&&this.adUnitSlots[e].setTargeting("slmadshb_r_custom",this.adRequests[e]>1?ge.config.params.refresh.targeting.true:ge.config.params.refresh.targeting.false),this.adUnitSlots[e].setTargeting("slmadshb_ob",(null===(c=null===(l=null===(d=null===(a=ge.adUnits.get(g))||void 0===a?void 0:a.params)||void 0===d?void 0:d.partners)||void 0===l?void 0:l.openBidding)||void 0===c?void 0:c.enabled)?"true":"false"),null===(f=null===(m=null===(p=null===(u=ge.adUnits.get(g))||void 0===u?void 0:u.params)||void 0===p?void 0:p.partners)||void 0===m?void 0:m.adExchange)||void 0===f?void 0:f.enabled){const t=1===this.adRequests[e]||this.isAllowedAtRefresh(e)?"true":"false";this.adUnitSlots[e].setTargeting("slmadshb_adx",t)}else this.adUnitSlots[e].setTargeting("slmadshb_adx","false")}))}canRender(e){var t,n,i;const r=null!==(n=null===(t=$.state.adUnits[e])||void 0===t?void 0:t.ref)&&void 0!==n?n:e,o=ge.adUnits.get(r),s=!!this.adUnitSlots[e]&&this.slotHasA9Bids(this.adUnitSlots[e]),a=0===this.adRequests[e]||this.isAllowedAtRefresh(e);return(null===(i=null==o?void 0:o.params)||void 0===i?void 0:i.gamMode)!==ae&&(s||a)}isAllowedAtRefresh(e){var t,n,i,r,o,s,a,d,l;const c=null!==(n=null===(t=$.state.adUnits[e])||void 0===t?void 0:t.ref)&&void 0!==n?n:e,u=ge.adUnits.get(c);return!0===(null===(o=null===(r=null===(i=null==u?void 0:u.params)||void 0===i?void 0:i.partners)||void 0===r?void 0:r.adExchange)||void 0===o?void 0:o.allowAtRefresh)||void 0!==u&&!0===(null===(d=null===(a=null===(s=null==u?void 0:u.params)||void 0===s?void 0:s.partners)||void 0===a?void 0:a.adExchange)||void 0===d?void 0:d.allowAtPassback)&&window.slmpbjs&&!(null===(l=window.slmpbjs.getAdserverTargetingForAdUnitCode(e))||void 0===l?void 0:l.hb_adid)}createSlot(e,t,n,i){Cb.info("CreateSlot",e,t,n),window.googletag.cmd.push((()=>{var r,o,s,a,d,l,c;const u=googletag.pubads().getSlots().filter((n=>n.getAdUnitPath()===e&&n.getSlotElementId()===t)),[p]=u,m=null!=p?p:window.googletag.defineSlot(e,n,t);if(m){if(i){const e=window.googletag.sizeMapping();i.forEach((t=>{Array.isArray(t.vs)&&Array.isArray(t.ss)&&e.addSize(t.vs,t.ss)})),m.defineSizeMapping(e.build())}(null===(r=ge.config.params)||void 0===r?void 0:r.gamDelayAddService)||m.addService(window.googletag.pubads()),window.googletag.display(t),this.adUnitSlots[t]=m,this.adRequests[t]=0;const e=null!==(s=null===(o=$.state.adUnits[t])||void 0===o?void 0:o.ref)&&void 0!==s?s:t;m.setTargeting("slmadshb_ob",(null===(c=null===(l=null===(d=null===(a=ge.adUnits.get(e))||void 0===a?void 0:a.params)||void 0===d?void 0:d.partners)||void 0===l?void 0:l.openBidding)||void 0===c?void 0:c.enabled)?"true":"false")}mv.addAdUnitReadyToRequest(t)}))}createOutOfPageSlot(e,t){Cb.info("Create OutOfPage Slot",e,t);const n=ge.adUnits.get(t);window.googletag.cmd.push((()=>{var i,r,o,s,a,d;let l;if("sticky"===(null==n?void 0:n.type)?l=window.googletag.defineOutOfPageSlot(e,googletag.enums.OutOfPageFormat.BOTTOM_ANCHOR):"rewarded"===(null==n?void 0:n.type)?(l=window.googletag.defineOutOfPageSlot(e,googletag.enums.OutOfPageFormat.REWARDED),googletag.pubads().addEventListener("rewardedSlotReady",(e=>{e.makeRewardedVisible(),q("adUnitRendered",(e=>{Cb.info("Ad unit rendered",e)}),{id:n.id})}))):l=window.googletag.defineOutOfPageSlot(e,googletag.enums.OutOfPageFormat.INTERSTITIAL),l){this.adUnitSlots[t]=l,this.adRequests[t]=0;const e=null!==(r=null===(i=$.state.adUnits[t])||void 0===i?void 0:i.ref)&&void 0!==r?r:t;l.setTargeting("slmadshb_ob",(null===(d=null===(a=null===(s=null===(o=ge.adUnits.get(e))||void 0===o?void 0:o.params)||void 0===s?void 0:s.partners)||void 0===a?void 0:a.openBidding)||void 0===d?void 0:d.enabled)?"true":"false")}mv.addAdUnitReadyToRequest(t)}))}setupEvents(){window.googletag.cmd.push((()=>{window.googletag.pubads().addEventListener("slotRenderEnded",(e=>{var t,n;const i=e.slot.getTargeting("amzniid");i.length>0&&-1!==e.slot.getHtml().indexOf(i[0])&&window.slmadshb.triggerEvent("apsRenderImp",i[0]);const r=e.slot.getSlotElementId();Cb.info("event.slot.getSlotElementId()",e.slot.getSlotElementId());const o=null!==(n=null===(t=$.state.adUnits[r])||void 0===t?void 0:t.ref)&&void 0!==n?n:r,s=ge.adUnits.get(o);if(s)return e.isEmpty?q("passback",(e=>(Cb.info("Passback ad unit",e.adUnit),s.id)),{adUnit:s}):q("adUnitRendered",(e=>{Cb.info("Ad unit rendered",e)}),{id:s.id})}))}))}getExtraTargeting(){var e,t,n,i,r,o;const s=new Map,a=be.getConsentType();s.set("slmadshb_consent",a);const d=dv.loadStats();if(d.length>=3){const a=null===(t=null===(e=ge.config.params)||void 0===e?void 0:e.contextTargeting)||void 0===t?void 0:t.userVisitDuration;if(a){const e=d.map((e=>e.visitDuration)).reduce(((e,t)=>e+t),0)/d.length,t=this.findDurationTargeting(a,e);t&&(s.set("user_duration",t),Cb.info(`Set user duration targeting [${t}]`))}const l=null===(i=null===(n=ge.config.params)||void 0===n?void 0:n.contextTargeting)||void 0===i?void 0:i.pageVisitDuration,c=null===(o=null===(r=window.slmadshb.setup.params)||void 0===r?void 0:r.contextTargeting)||void 0===o?void 0:o.pagesInfos;if(l&&c){const e=Object.keys(c).find((e=>new RegExp(`^${e}$`).test(window.location.pathname)));if(e){const t=this.findDurationTargeting(l,c[e]);t&&(s.set("page_duration",t),Cb.info(`Set page duration targeting [${t}]`))}}}return s}findDurationTargeting(e,t){const n=Object.keys(e).filter((n=>t>e[n])).sort(((t,n)=>e[n]-e[t]));return n.length>0?n[0]:null}};var Eb=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{d(i.next(e))}catch(t){o(t)}}function a(e){try{d(i.throw(e))}catch(t){o(t)}}function d(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}d((i=i.apply(e,t||[])).next())}))};const Sb=new H("Amazon");let xb;new class extends gb{constructor(){super("amazon"),this.DEFAULT_PUB_ID="8a83e099-851b-4737-9ca3-c7092ea4fc9f",this.DEFAULT_AD_SERVER="googletag",this.DEFAULT_TIMEOUT=2e3,this.MAPPING={},this.a9Bids=new Map,Sb.info("Module initialization"),q.after("loadConfig",(e=>{var t,n,i,r,o,s;const a=(null===(n=null===(t=e.params)||void 0===t?void 0:t.amazon)||void 0===n?void 0:n.pubID)||this.DEFAULT_PUB_ID,d=(null===(r=null===(i=e.params)||void 0===i?void 0:i.amazon)||void 0===r?void 0:r.adServer)||this.DEFAULT_AD_SERVER;return this.MAPPING=this.readConfig(null===(o=e.params.amazon)||void 0===o?void 0:o.config),this.load(a,d,null===(s=e.params)||void 0===s?void 0:s.schain),e})),window.slmadshb=window.slmadshb||[],window.slmadshb.getA9VideoBid=e=>{var t,n,i,r,o,s;let a;const d=null!==(n=null===(t=$.state.adUnits[e])||void 0===t?void 0:t.ref)&&void 0!==n?n:e,l=null===(s=null===(o=null===(r=null===(i=ge.adUnits.get(d))||void 0===i?void 0:i.params)||void 0===r?void 0:r.partners)||void 0===o?void 0:o.amazon)||void 0===s?void 0:s.videoSlot;if(l){const e=Array.from(this.a9Bids.values()).filter((e=>e.slotID===l&&!1===e.used));e.length>0&&(a=e[0])}else Sb.error("Unable to find video slotId for adUnit",e);return a},window.slmadshb.markA9VideoBidAsUsed=e=>{const t=this.a9Bids.get(e);t&&(t.used=!0)},q.before("renderAds",(()=>{window.apstag.setDisplayBids()}))}requestBids(e){return Eb(this,void 0,void 0,(function*(){Sb.info(`Request bids ${e}`);const t=be.getConsentType();if(0===e.length||"accepted"!==t)return Promise.resolve();const n=$.getAdUnitsById(e),i=this.getDisplayRequest(n),r=this.fetchBids(i),o=this.getVideoRequest(n),s=this.fetchBids(o);yield Promise.all([r,s])}))}getBids(e){Sb.info("getBids",e);const t=[];return e.forEach((e=>{this.a9Bids.forEach((n=>{var i;if(n&&n.slotID===e&&!1===n.used){const[e,r]=n.amznsz.split("x");t.push({cpm:null!==(i=this.MAPPING[n.amznbid])&&void 0!==i?i:0,provider:"amazon",width:Number(e),height:Number(r),a9Targeting:n})}}))})),t}getDisplayRequest(e){const t=[];return e.forEach((e=>{var n,i,r,o;const s=ge.adUnits.get(e.ref);if(void 0!==s){const a=null===(i=null===(n=s.params)||void 0===n?void 0:n.partners)||void 0===i?void 0:i.amazon;(null==a?void 0:a.enabled)&&s.adUnitPath&&s.mediaTypes&&(null===(r=s.mediaTypes.banner)||void 0===r?void 0:r.sizes)&&s.mediaTypes.banner.sizes.length>0&&(void 0!==a.videoSlot&&!0===a.outstream||t.push({slotID:e.htmlId,sizes:null===(o=s.mediaTypes.banner)||void 0===o?void 0:o.sizes,slotName:s.adUnitPath}))}})),{slots:t,mediaType:"banner"}}getVideoRequest(e){const t=[];return e.forEach((e=>{var n,i,r;const o=ge.adUnits.get(e.ref);if(void 0!==o){const e=null===(i=null===(n=o.params)||void 0===n?void 0:n.partners)||void 0===i?void 0:i.amazon;if((null==e?void 0:e.enabled)&&o.mediaTypes.video&&e.videoSlot){const{videoSlot:n}=e;if(!0===e.outstream){const e=(null===(r=o.mediaTypes.banner)||void 0===r?void 0:r.sizes)||o.mediaTypes.video.sizes;t.push({slotID:n,mediaType:"multi-format",multiFormatProperties:{display:{sizes:e},video:{sizes:o.mediaTypes.video.sizes}}})}else t.push({slotID:n,mediaType:"video"})}}})),{slots:t,mediaType:"video"}}fetchBids(e){return new Promise((t=>{var n,i,r;if(e.slots.length>0){const o={slots:e.slots,timeout:(null===(i=null===(n=window.slmpbjs)||void 0===n?void 0:n.getConfig())||void 0===i?void 0:i._bidderTimeout)||this.DEFAULT_TIMEOUT},s=n=>{var i;null===(i=window.apstag)||void 0===i||i.setDisplayBids(),n.forEach((e=>{e.used=!1,""!==e.amzniid&&this.a9Bids.set(e.amzniid,e)})),Sb.info(`Bids fetched for ${e.mediaType}`),t()};null===(r=window.apstag)||void 0===r||r.fetchBids(o,s)}else Sb.debug(`No slots available for ${e.mediaType}`),t()}))}load(e,t,n){var i,r;this.setUpApsTag();const o={pubID:e,adServer:t,isSelfServePub:!0,videoAdServer:"DFP"};void 0!==n&&(o.schain=n),null===(i=window.apstag)||void 0===i||i.init(o),null===(r=window.slmadshb)||void 0===r||r.onEvent("apsRenderImp",(e=>{const t=this.a9Bids.get(e);t&&(window.slmadshb.triggerEvent("apsBidWon",t),this.a9Bids.delete(e))}))}readConfig(e){if(!e)return{};const t="abcdefghijklmnopqrstuvwxyzabcdefghijklmABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLM",n=e.replace(/[a-zA-Z]/gi,(e=>t[t.indexOf(e)+13]));return JSON.parse(atob(n))}setUpApsTag(){!function(e,t,n,i,r,o,s){function a(n,i){t[e]._Q.push([n,i])}t[e]||(t[e]={init(){a("i",arguments)},fetchBids(){a("f",arguments)},setDisplayBids(){},targetingKeys:()=>[],_Q:[]},(o=n.createElement(i)).async=!0,o.src="//c.amazon-adsystem.com/aax2/apstag.js",(s=n.getElementsByTagName(i)[0]).parentNode.insertBefore(o,s))}("apstag",window,document,"script")}};class kb{constructor(e){this.adUnits=new Map,xb=e,xb.info("Module initialization"),window.slmadshb=window.slmadshb||{},window.slmadshb.refresh=this}init(e){this.initListeners(e),this.startRefresh()}initListeners(e){(null==e?void 0:e.onlyWhenTabIsActive)&&document.addEventListener("visibilitychange",(()=>{"visible"===document.visibilityState?this.startRefresh():this.stopRefresh()})),window.addEventListener("message",(t=>{const n=(n,i)=>{var r;"boolean"==typeof(null===(r=null==i?void 0:i.refresh)||void 0===r?void 0:r.enabled)&&(i.refresh.enabled?this.enableAdUnitRefresh(n,performance.now()):this.disableAdUnitRefresh(n)),i.refresh.timeout&&this.updateAdUnitTimeout(n,t.data.slmadshb.refresh.timeout),i.refresh.delay&&(this.updateAdUnitTimeout(n,t.data.slmadshb.refresh.delay),setTimeout((()=>{"number"==typeof e.timeout&&this.updateAdUnitTimeout(n,e.timeout)}),i.refresh.delay))};t.data&&t.data.slmadshb&&(t.data.slmadshb.adUnitPath?$.getAdUnits().forEach((e=>{e.adUnitPath===t.data.slmadshb.adUnitPath&&n(e.htmlId,t.data.slmadshb)})):t.data.slmadshb.adUnitId&&n(t.data.slmadshb.adUnitId,t.data.slmadshb))}),!1)}getAdUnitCapping(e){var t,n,i,r;return"video"===(null==e?void 0:e.type)?(null===(n=null===(t=e.params)||void 0===t?void 0:t.refresh)||void 0===n?void 0:n.capping)||256:(null===(r=null===(i=null==e?void 0:e.params)||void 0===i?void 0:i.refresh)||void 0===r?void 0:r.capping)||10}addAdUnitToState(e,t){this.adUnits.has(e)?xb.warn("addAdUnitToState",`adUnit with this htmlId already exists (${e})`):this.adUnits.set(e,t)}removeAdUnitFromState(e){this.adUnits.has(e)?this.adUnits.delete(e):xb.warn("removeAdUnitFromState",`adUnit does not exists (${e})`)}enableAdUnitRefresh(e,t){if(xb.info("AutoRefresh enabled",e),this.adUnits.has(e)){const n=this.adUnits.get(e);n&&!n.enabled&&n.refreshCount<=n.capping&&(n.enabled=!0,n.lastRefreshedAt=t)}}disableAdUnitRefresh(e){if(xb.info("AutoRefresh disabled",e),this.adUnits.has(e)){const t=this.adUnits.get(e);t&&(t.enabled=!1)}}updateAdUnitTimeout(e,t){if(xb.info("AdUnit timeout updated",{id:e,timeout:t}),this.adUnits.has(e)){const n=this.adUnits.get(e);n&&(n.timeout=t)}}refreshAdUnit(e,t){t||(t=performance.now());const n=this.adUnits.get(e);n?(xb.info(`Refreshing adUnit ${e} after ${Math.floor(t-n.lastRefreshedAt)}ms`),n.lastRefreshedAt=t,n.refreshCount+=1):xb.info(`Refreshing adUnit ${e}`),mv.addAdUnitReadyToRequest(e)}startRefresh(){xb.info("Refresh started"),this.intervalId||(this.intervalId=window.setInterval((()=>{const e=performance.now(),t=this.getAdUnitIdsToRefresh(e);t.length>0&&t.forEach((t=>{this.refreshAdUnit(t,e)}))}),1e3))}stopRefresh(){xb.info("Refresh stopped"),clearInterval(this.intervalId),this.intervalId=void 0}alterRefreshTimeoutTemporarily(e,t,n,i){if(this.adUnits.has(e)){const r=this.adUnits.get(e);r&&(r.timeout=t,r.visibleTimeout=t,setTimeout((()=>{r.timeout=null!=i?i:n,r.visibleTimeout=n}),t),xb.info(`Altering refresh temporarily on ${e}`,t,n,i))}}}const _b=e=>{var t;if(e){if(e.yieldGroupIds)return"ebda";const n=null===(t=ge.config.params)||void 0===t?void 0:t.advertisersMapping;if(n){if(n.Amazon===e.advertiserId)return"a9";if(n.Prebid===e.advertiserId)return"prebid";if(n.Google&&n.Google!==e.advertiserId&&!e.isBackfill)return"direct"}if(!e.lineItemId)return"adx"}return"unknown"},Ub=new H("Viewability"),Rb=window.IntersectionObserver&&window.IntersectionObserverEntry&&window.IntersectionObserverEntry.prototype&&"intersectionRatio"in window.IntersectionObserverEntry.prototype;new class{constructor(){this.displayDuration=1e3,this.displayThreshold=.5,this.bids=new Map,this.matchedBids=[],Rb?(Ub.info("Module initialization"),q.after("loadConfig",((e,t)=>{t.params.viewability&&(t.params.viewability.duration&&(this.displayDuration=t.params.viewability.duration),t.params.viewability.threshold&&(this.displayThreshold=t.params.viewability.threshold)),this.init()}))):Ub.info("Module initialization skipped (IntersectionObserverAPI not available)")}init(){this.observer=new IntersectionObserver(this.observerCallback.bind(this),{threshold:this.displayThreshold}),window.slmpbjs=window.slmpbjs||{que:[]},window.slmpbjs.que.push((()=>{window.slmpbjs.onEvent("adRenderSucceeded",(({bid:e})=>{var t;this.bids.set(e.adUnitCode,e);const n=document.getElementById(e.adUnitCode);n&&(null===(t=this.observer)||void 0===t||t.observe(n))}))})),window.googletag=window.googletag||{},window.googletag.cmd=window.googletag.cmd||[],window.googletag.cmd.push((()=>{window.googletag.pubads().addEventListener("impressionViewable",(e=>{var t;if(e.slot.getOutOfPage())return void Ub.info(`Skipping viewable event for outofpage ${e.slot.getAdUnitPath()}`);const n=_b(e.slot.getResponseInformation());let i=null;const r=e.slot.getTargeting("slm_floor");r.length>0&&(i=parseFloat(r[0]));const o=document.getElementById(e.slot.getSlotElementId());o&&(null===(t=this.observer)||void 0===t||t.unobserve(o)),this.markImpressionAsViewed(e.slot.getSlotElementId(),!0,{google:{adUnitPath:e.slot.getAdUnitPath(),bidderCode:n,floor:i}})}))}))}observerCallback(e){e.forEach((e=>{e.isIntersecting?e.target.tracker||(e.target.tracker=setTimeout((()=>{var t;this.markImpressionAsViewed(e.target.id),null===(t=this.observer)||void 0===t||t.unobserve(e.target),e.target.tracker=null}),this.displayDuration)):e.target.tracker&&clearTimeout(e.target.tracker)}))}markImpressionAsViewed(e,t=!1,n={}){let i=null;if(this.bids.has(e)&&(i=this.bids.get(e),i)){if(-1!==this.matchedBids.indexOf(i.requestId))return;this.matchedBids.push(i.requestId)}document.dispatchEvent(new CustomEvent("impressionViewable",{detail:Object.assign({adUnitCode:e,isGoogle:t,bid:i},n)}))}};const Ob=new H("SmartRefresh");new class extends kb{constructor(){super(Ob),q.after("adUnitReady",((e,t)=>{var n,i,r,o,s,a;if(this.adUnits.has(t.htmlId))return;const d=$.state.adUnits[t.htmlId],l=ge.adUnits.get(d.ref);if(t.htmlId&&!d.isCapped){const e={enabled:(null===(i=null===(n=null==l?void 0:l.params)||void 0===n?void 0:n.refresh)||void 0===i?void 0:i.enabled)||!1,timeout:(null===(o=null===(r=null==l?void 0:l.params)||void 0===r?void 0:r.refresh)||void 0===o?void 0:o.timeout)||3e4,visibleTimeout:(null===(a=null===(s=null==l?void 0:l.params)||void 0===s?void 0:s.refresh)||void 0===a?void 0:a.visibleTimeout)||12e3,capping:this.getAdUnitCapping(l),refreshCount:0,isVisible:!1,lastRefreshedAt:performance.now()};this.addAdUnitToState(t.htmlId,e)}})),q.before("destroyAdUnit",(e=>{e.htmlId&&this.removeAdUnitFromState(e.htmlId)})),q.after("loadConfig",((e,t)=>{var n;this.init((null===(n=null==t?void 0:t.params)||void 0===n?void 0:n.refresh)||{})}))}initListeners(e){super.initListeners(e),document.addEventListener("impressionViewable",(e=>{try{this.onViewableImpression(e)}catch(t){Ob.error(t)}}))}onViewableImpression(e){if(e.detail&&this.adUnits.has(e.detail.adUnitCode)){const t=this.adUnits.get(e.detail.adUnitCode);t&&(t.isVisible=!0)}}getAdUnitIdsToRefresh(e){return Array.from(this.adUnits.keys()).filter((t=>{const n=this.adUnits.get(t);if(n&&n.enabled&&n.lastRefreshedAt&&n.refreshCount<n.capping){const t=e-n.lastRefreshedAt;if(n.isVisible){const e=t>n.visibleTimeout;return e&&(n.isVisible=!1),e}return t>n.timeout}return!1}))}};const Db=new H("Sticky Renderer");class Bb{constructor(e,t){this.uniqId=Math.random().toString(36).substring(2,16),this.adUnitId=e,this.params=t,this.getElements(),this.stickyFrame||(this.stickyFrame=document.createElement("DIV"),this.stickyFrame.id=`slm_sticky_${this.uniqId}`,this.stickyFrame.classList.add("slm_sticky"),this.stickyFrame.style.position=this.params.target?"absolute":"fixed",this.stickyFrame.style.display="none");let n=document.body;if(this.params.target){const e=document.querySelector(this.params.target);e?n=e:Db.warn("Missing target",this.params.target)}if(n.insertBefore(this.stickyFrame,n.firstChild),this.stickyInnerFrame||(this.stickyInnerFrame=document.createElement("DIV"),this.stickyInnerFrame.id=`slm_sticky_container_${this.uniqId}`,this.stickyInnerFrame.classList.add("slm_sticky_container")),this.stickyFrame.appendChild(this.stickyInnerFrame),this.stickyParallaxFrame=document.createElement("DIV"),this.stickyParallaxFrame.id=`slm_sticky_parallax_${this.uniqId}`,this.stickyParallaxFrame.classList.add("slm_sticky_parallax"),this.stickyInnerFrame.appendChild(this.stickyParallaxFrame),this.adUnitId){const e=document.getElementById(this.adUnitId);e?this.adFrame=e:(this.adFrame=document.createElement("DIV"),this.adFrame.setAttribute("id",this.adUnitId),this.adFrame.dataset.akceloLoaded="1"),this.stickyParallaxFrame.appendChild(this.adFrame)}!1!==this.params.closeButton&&(this.closeButton=this.createCloseButton(),this.stickyInnerFrame.appendChild(this.closeButton))}getElements(){var e,t;this.stickyFrame=null!==(e=document.getElementById(this.params.useUniqId?`slm_sticky_${this.uniqId}`:"slm_sticky"))&&void 0!==e?e:void 0,this.stickyInnerFrame=null!==(t=document.getElementById(this.params.useUniqId?`slm_sticky_container_${this.uniqId}`:"slm_sticky_container"))&&void 0!==t?t:void 0}renderElements(e){var t,n,i,r,o;if(this.adFrame&&e)if(e[0]<=1&&e[1]<=1)this.adFrame.style.width="auto",this.adFrame.style.height="auto";else if(this.params.autoScale&&e[1]>this.params.autoScale.maxHeight){const t=window.innerWidth/e[0],n=this.params.autoScale.maxHeight/e[1],i=Math.min(t,n);this.adFrame.style.width=e[0]*i+"px",this.adFrame.style.height=e[1]*i+"px",this.adFrame.style.maxHeight=`${this.params.autoScale.maxHeight}px`;const r=this.adFrame.querySelector("iframe:first-of-type");r&&(r.style.scale=i.toString(),r.style.transformOrigin=i>1?"top":"top left")}else this.adFrame.style.width=`${e[0]}px`,this.adFrame.style.height=`${e[1]}px`;if(this.stickyFrame&&(this.stickyFrame.style.display="block",this.stickyFrame.style.padding="0",this.stickyFrame.style.margin="0 auto",this.stickyFrame.style.overflow="visible",this.stickyFrame.style.textAlign="center",this.stickyFrame.style.whiteSpace="nowrap",this.stickyFrame.style.zIndex=`${this.params.zIndex||1e4}`,this.params.fullWidth&&(this.stickyFrame.style.width="100%"),this.params.mainBackground&&(this.stickyFrame.style.backgroundColor=this.params.mainBackground)),(null===(t=this.params.parallax)||void 0===t?void 0:t.enabled)&&this.adFrame){const{maxHeight:e}=this.params.parallax;this.stickyFrame&&(this.stickyFrame.style.maxHeight=`${e}px`),this.stickyParallaxFrame.style.overflow="hidden";let t=0,n=window.scrollY;const i=90-this.stickyParallaxFrame.clientHeight,r=(t,n)=>{this.adFrame&&(this.adFrame.clientHeight<=e?this.adFrame.style.transform="translate(0px, 0px)":this.adFrame.style.transform=`translate(${t}px, ${n}px)`)},o=()=>{t=Math.max(i,(window.scrollY-n)/window.innerHeight*i),t>0&&(t=0,n=window.scrollY),r(0,t)};this.adFrame.clientHeight>e?(window.addEventListener("scroll",o),r(0,t)):window.removeEventListener("scroll",o)}this.stickyInnerFrame&&(this.stickyInnerFrame.style.display="inline-block",this.stickyInnerFrame.style.verticalAlign="top",this.stickyInnerFrame.style.marginLeft="0px",this.stickyInnerFrame.style.position="relative",this.stickyInnerFrame.style.maxWidth="100%",this.params.adBackground&&(this.stickyInnerFrame.style.backgroundColor=this.params.adBackground)),this.adFrame&&(this.adFrame.style.margin="0 auto",this.adFrame.style.textAlign="center",this.adFrame.style.maxWidth="100%",this.adFrame.style.overflow="hidden",this.adFrame.style.lineHeight="0"),this.closeButton&&(this.closeButton.style.display="inline-block");const s=[];return this.stickyFrame&&((null===(n=this.params.position)||void 0===n?void 0:n.includes("top"))?this.stickyFrame.style.top=`${this.params.yOffset}px`:(null===(i=this.params.position)||void 0===i?void 0:i.includes("bottom"))?this.stickyFrame.style.bottom=`${this.params.yOffset}px`:(this.stickyFrame.style.top="50%",s.push("translateY(-50%)")),(null===(r=this.params.position)||void 0===r?void 0:r.includes("left"))?this.stickyFrame.style.left="0":(null===(o=this.params.position)||void 0===o?void 0:o.includes("right"))?this.stickyFrame.style.right="0":(this.stickyFrame.style.left="50%",s.push("translateX(-50%)")),this.stickyFrame.style.margin=`${this.params.margin}px`,this.params.scale&&(this.params.scale=Math.min(Math.max(.5,this.params.scale),1.5),s.push(`scale(${this.params.scale})`),this.closeButton&&(this.closeButton.style.transform=`scale(${1/this.params.scale})`),this.params.position&&(this.stickyFrame.style.transformOrigin=`${this.params.position.replace("-"," ")}`)),s.length>0&&(this.stickyFrame.style.transform=s.join(" "))),!0}createCloseButton(){var e,t;const n=((e=80,t=!1,n=1)=>{const i=`slm-close-${Math.random().toString(36).substring(2,15)}`,r=document.createElement("div");r.setAttribute("id",i),r.classList.add("slm-close"),r.setAttribute("title","Close");const o=(e-20)/2*n,s=(e-40)/2*n;return r.innerHTML=`\n <style>\n #${i}::before {position:absolute;content:"";top:-${o}px;right:-${s}px;width:${e}px;height:${e}px;border-radius:50%;pointer-events:all;}\n </style>\n <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve"\n width="20" height="20" viewBox="0 0 20 20" style="cursor:pointer;position:relative;display:inline;width:20px;margin-bottom:0;">\n <g transform="matrix(0.0569703,0,0,0.0569703,-4.6066465,-4.6398328)">\n <circle style="fill:#373737;fill-opacity:1;stroke-width:18.90076828" cx="258.31042" cy="257.79587" r="161.54251" />\n <path style="fill:#fffffd;fill-opacity:1;stroke-width:0.6150254" d="m 169.41211,156.49219 c -10.496,0.0497 -17.51765,14.20672 -9.88477,22.04101\n 7.85367,8.42001 16.59855,15.99758 24.44716,24.46542 18.54871,18.54359 37.07296,37.11162 55.62902,55.64786 -27.35069,28.13628 -56.58081,54.64717\n -82.52735,84.03321 -4.80727,10.6808 9.79299,23.17713 19.35156,15.85937 11.18603,-9.25489 20.38437,-20.64133 31.12591,-30.40129 16.93264,-16.93265\n 33.86528,-33.86529 50.79792,-50.79793 28.1346,27.34154 54.64725,56.59829 84.05469,82.53907 10.67333,4.77287 23.14434,-9.80942 15.8418,-19.35547\n -9.25182,-11.19086 -20.6499,-20.38132 -30.40521,-31.12982 -16.93264,-16.93264 -33.86528,-33.86528 -50.79792,-50.79792 27.30512,-27.92294\n 56.11138,-54.51613 82.27539,-83.52148 5.21946,-10.52229 -8.42434,-23.47032 -18.50586,-16.69531 -7.93114,4.84596 -12.68507,13.31658 -19.97314,18.98074\n -20.84814,20.84691 -41.69629,41.69383 -62.54443,62.54074 -28.17478,-27.33485 -54.61388,-56.67303 -84.11719,-82.51562 -1.50233,-0.63096\n -3.13851,-0.93953 -4.76758,-0.89258 z" />\n </g>\n </svg>\n `,t&&(r.style.display="none"),r})();switch(n.style.position="absolute",this.params.closeButtonPosition){case"top-left":(null===(e=this.params.position)||void 0===e?void 0:e.includes("top"))?(n.style.top="0",n.style.left="-25px"):(n.style.top="-25px",n.style.left="0");break;case"top-right":(null===(t=this.params.position)||void 0===t?void 0:t.includes("top"))?(n.style.top="0",n.style.right="-25px"):(n.style.top="-25px",n.style.right="0");break;case"bottom-left":n.style.bottom="-25px",n.style.left="0";break;case"bottom-right":n.style.bottom="-25px",n.style.right="0";break;case"left":n.style.top="0",n.style.left="-25px";break;default:n.style.top="0",n.style.right="-25px"}return n.onclick=()=>{this.stickyFrame&&(this.stickyFrame.style.display="none",this.stickyFrame.remove()),this.params.onClose&&this.params.onClose(this.adUnitId)},n}}function Pb(e,t){window.slmpbjs=window.slmpbjs||{},window.slmpbjs.que=window.slmpbjs.que||[],window.slmpbjs.que.push((()=>{window.slmpbjs.onEvent("bidWon",(n=>{n.adUnitCode===e&&t([n.width,n.height],null,n.bidderCode)}))})),window.googletag=window.googletag||{cmd:[]},window.googletag.cmd.push((()=>{window.googletag.pubads().addEventListener("slotRenderEnded",(n=>n.slot.getSlotElementId()===e&&!n.isEmpty&&("string"!=typeof n.size&&t(n.size,n.creativeId))))}))}const jb=new H("Sticky");new class{constructor(){this.renderers=new Map,jb.info("Module initialization"),q.before("addAdUnit",(e=>{"sticky"===e.adUnit.type&&(jb.debug("Creating sticky renderer",e.htmlId),this.renderers.set(e.htmlId,new Bb(e.htmlId,this.getStickyParams(e.adUnit.params))),Pb(e.htmlId,(t=>{var n;jb.debug("Rendering sticky",e.htmlId),null===(n=this.renderers.get(e.htmlId))||void 0===n||n.renderElements(t)})))}))}getStickyParams(e){const t={fullWidth:!1,mainBackground:L()?"#FFFFFF":"transparent",adBackground:L()?"transparent":"rgba(0, 0, 0, 0.7)",position:"bottom",closeButtonPosition:"top-right",yOffset:0,margin:0,scale:1,useUniqId:!0,onClose:e=>{jb.info("Sticky has been closed",e)}};return(null==e?void 0:e.sticky)?Object.assign(Object.assign({},t),e.sticky):t}};const Nb=new H("Passback");const qb=new class{constructor(){this.adUnitIds=new Set,Nb.info("Module initialization"),q.before("passback",(e=>this.passbackProcess(e.adUnit)))}passbackProcess(e){e&&this.callPassback(e)}callPassback(e){var t,n,i,r,o;if(this.adUnitIds.has(e.id))Nb.error("Passback already called for this adUnit, skipping",e.id);else{if((null===(i=null===(n=null===(t=e.params)||void 0===t?void 0:t.partners)||void 0===n?void 0:n.sublime)||void 0===i?void 0:i.enabled)&&(null===(r=e.params)||void 0===r?void 0:r.partners.sublime.zoneId)){Nb.info("Sublime passback",e.params.partners.sublime.zoneId);const t=document.createElement("script");t.setAttribute("id","sublime"),t.setAttribute("type","text/javascript"),t.setAttribute("src",`https://sac.ayads.co/sublime/${e.params.partners.sublime.zoneId}`),window.top&&(window.top.document.body.appendChild(t),"function"==typeof window.top.slmadsSkinUninstall&&window.top.slmadsSkinUninstall()),this.adUnitIds.add(e.id)}void 0!==(null===(o=e.params)||void 0===o?void 0:o.passbackCallback)&&(Nb.info("Call passbackCallback",e),e.params.passbackCallback(),this.adUnitIds.add(e.id))}}};class $b{constructor(e){this.adUnitId=e}onBidsRequested(){}callPassback(){const e=ge.getAdUnitsConfigById([this.adUnitId]);e.length>0&&qb.callPassback(e[0])}destroy(e=!1){}}const Fb=new H("Akcelo Video");class Mb extends $b{constructor(e,t=!1){var n,i,r,o,s,a,d;if(super(e),this.lineItemMapping={},this.bids=[],this.currentBid=null,this.isLoaded=!1,this.isReadyToRender=!1,this.isFirstBidsRequested=!1,this.isWaiting=!1,this.isPaused=!1,this.isDestroyed=!1,this.isAdPlaying=!1,this.hasWaitingBids=!1,this.videoCount=0,this.isFirstVideoContentAdRequest=!0,this.isFraudDetected=!1,this.refreshInterval=null,this.totalImpressionCallCount=0,this.totalImpressionCount=0,this.videoImpressionCount=0,Fb.info("Module initialization"),window.slmpbjs=window.slmpbjs||{adUnits:[]},this.adUnitConfig=window.slmpbjs.adUnits.find((e=>e.id===this.adUnitId)),this.config=this.getConfig(null===(i=null===(n=this.adUnitConfig)||void 0===n?void 0:n.params)||void 0===i?void 0:i.video),this.config.provider="DAILYMOTION",this.analyticsContext={slmads_id:(null!==(o=null===(r=this.adUnitConfig)||void 0===r?void 0:r.slmadsId)&&void 0!==o?o:0).toString(),format:null!==(a=null===(s=this.config.mode)||void 0===s?void 0:s.toLowerCase())&&void 0!==a?a:"corner",player:"AKCELO"},this.config.skipVideoForPassback)return Fb.info("Skipping video for Passback"),void this.destroy(!0);t&&this.onBidsRequested(),uv.logEvent("video_init",{data:this.analyticsContext}),null===(d=window.slmadshb.refresh)||void 0===d||d.disableAdUnitRefresh(this.adUnitId),this.loadPlayer((()=>{Fb.info("Player loaded"),this.loadLineItemsMapping();const e=setInterval((()=>{void 0!==window.AkceloPlayer&&(clearInterval(e),this.isLoaded=!0,this.isReadyToRender||this.onReadyToRender())}),100)}))}getConfig(e){const t={debug:M(),autoplay:!0,mode:"CORNER",position:"BOTTOM_RIGHT",allowNoAd:!1,disablePassbackOnClose:!1,skipVideoForPassback:!1,closeButtonMode:"AFTER_DELAY",closeButtonPosition:"TOP_RIGHT",closeButtonPositionMode:"OUTSIDE",closeButtonDelay:30,visibilityProtectionEnabled:!1,fullscreen:!0,allowAdsWhilePlayingContent:!0,disabledGoogleTagKeys:[],dailymotion:{allowBids:!0,allowBidsAtFirstcall:!0,allowControlsDuringAd:!0,allowMultipleVideos:!0,playerId:"PIP"===(null==e?void 0:e.mode)?"xfiuc":"xdfdz",syndicationKey:"123503",refresh:{enabled:!0,capping:5}}};let n=t;return e&&(n=F(t,e)),n}getBids(){const e=[],t=window.slmpbjs.getBidResponsesForAdUnitCode(this.adUnitId);return t.bids&&t.bids.forEach((t=>{t.cpm&&t.adId&&t.cpm>0&&"renderer"!==t.status&&e.push(t)})),[...new Set([...this.bids,...e.sort(((e,t)=>t.cpm-e.cpm))])]}loadPlayer(e){if(void 0!==window.AkceloPlayer||window.AkceloPlayerLoading)e();else{const t=document.createElement("script");t.src="//ads.slmads.com/akcelo-player.js",t.onload=e,document.head.appendChild(t),window.AkceloPlayerLoading=!0}}loadLineItemsMapping(){var e,t;fetch(`//ads.sportslocalmedia.com/mapping/${(null!==(t=null===(e=this.adUnitConfig)||void 0===e?void 0:e.adUnitPath)&&void 0!==t?t:"/4490027/Akcelo_Video").split("/")[1].split(",")[0]}.json`).then((e=>{e.text().then((e=>{this.lineItemMapping=JSON.parse(e)}))})).catch((e=>{Fb.error("Failed to fetch line items mapping",e)}))}onReadyToRender(){var e,t,n,i,r,o,s,a;if(!this.isLoaded||!this.isFirstBidsRequested)return;if(this.isReadyToRender=!0,Fb.info("Rendering player"),!this.config.allowNoAd){const n=document.createElement("style");n.innerText=".v-vlite{opacity: 0;}.v-vlite.visible{opacity: 1;}",null===(t=null===(e=document.getElementById(this.adUnitId))||void 0===e?void 0:e.parentElement)||void 0===t||t.appendChild(n)}this.bids=this.getBids(),this.hasWaitingBids=this.bids.filter((e=>!e.rendered&&!e.used)).length>0;const d=null===(n=document.getElementById(this.adUnitId))||void 0===n?void 0:n.getAttribute("video-id");d&&(this.config.dailymotion.videoId=d);const l=null===(i=document.getElementById(this.adUnitId))||void 0===i?void 0:i.getAttribute("subtitles");if(l&&(this.config.dailymotion.subtitlesLang=l),-1!==[88,103,111,180,594].indexOf(window.slmadshb.setup.params.siteId)&&this.config.dailymotion.playlistId){const e={x7dwbi:{A:"x7tp4z",B:"x7tp53"},x7dprf:{A:"x80r6q",B:"x80r6s"}},t=window.slmadshb.getAdUnitFloorModel(this.adUnitId);if(t){const n="video_cpm_divided_2"===t?"B":"A";this.config.dailymotion.playlistId=e[this.config.dailymotion.playlistId][n]}}if(this.config.dailymotion.customParams=this.getDailymotionCustomParams(this.config.dailymotion.allowBids),(null===(r=this.config.dailymotion.refresh)||void 0===r?void 0:r.adjustBasedOnEngagement)&&window.googletag&&window.googletag.pubads){const e=window.googletag.pubads().getTargeting("page_duration")[0]||null,t=window.googletag.pubads().getTargeting("user_duration")[0]||null,n=e?null===(o=window.slmadshb.setup.params.contextTargeting)||void 0===o?void 0:o.pageVisitDuration[e]:null,i=t?null===(s=window.slmadshb.setup.params.contextTargeting)||void 0===s?void 0:s.userVisitDuration[t]:null;let r=15;n&&i?r=(n+i)/2:n?r=n:i&&(r=i);const d=15,l=Math.min(Math.floor(r/d),null!==(a=this.config.dailymotion.refresh.capping)&&void 0!==a?a:5);if(this.config.dailymotion.refresh.capping=l,Fb.info("Updated capping based on engagement to",l),0===l)return Fb.info("Capping set to 0, skipping to passback, if available"),void this.destroy(!0)}this.player=new window.AkceloPlayer(`#${this.adUnitId}`,this.config,this.onPlayerReady.bind(this))}onPlayerReady(){var e,t,n,i,r,o,s,a,d,l,c,u;uv.logEvent("video_ready",{data:this.analyticsContext}),uv.logEvent("video_imp_req",{data:Object.assign(Object.assign({},this.analyticsContext),{refresh:this.totalImpressionCallCount.toString()})}),this.totalImpressionCallCount+=1,null===(e=this.player)||void 0===e||e.on("PlayerStart",(()=>{var e;this.config.allowNoAd&&(document.dispatchEvent(new Event("AkceloVideoVisible")),null===(e=this.player)||void 0===e||e.playerInstance.elements.outerContainer.classList.add("visible"))})),null===(t=this.player)||void 0===t||t.on("AdImpression",this.onAdImpression.bind(this)),null===(n=this.player)||void 0===n||n.on("AdStart",(e=>{var t,n;this.isAdPlaying=!0,null===(t=window.slmadshb.refresh)||void 0===t||t.enableAdUnitRefresh(this.adUnitId,performance.now()),this.config.allowNoAd||(document.dispatchEvent(new Event("AkceloVideoVisible")),null===(n=this.player)||void 0===n||n.playerInstance.elements.outerContainer.classList.add("visible")),!e.detail.isDM&&this.refreshInterval&&clearInterval(this.refreshInterval)})),null===(i=this.player)||void 0===i||i.on("AdEnd",(()=>{var e;this.isAdPlaying=!1,null===(e=this.player)||void 0===e||e.requestAd(this.getDailymotionCustomParams(this.config.dailymotion.allowBids),!0)})),null===(r=this.player)||void 0===r||r.on("AdError",(e=>{var t;this.isAdPlaying=!1,null===(t=window.slmadshb.refresh)||void 0===t||t.enableAdUnitRefresh(this.adUnitId,performance.now()),e.detail.errorCode&&uv.logEvent("video_error",{data:Object.assign(Object.assign({},this.analyticsContext),{error_code:e.detail.errorCode.toString()})}),!e.detail.isDM&&this.isFraudDetected?this.destroy(!0):e.detail.errorType&&e.detail.errorMessage&&"NO_ADS"===e.detail.errorType&&-1!==e.detail.errorMessage.indexOf("viewing context")&&(uv.logEvent("video_error",{data:Object.assign(Object.assign({},this.analyticsContext),{error_code:ue})}),this.isFraudDetected=!0)})),null===(o=this.player)||void 0===o||o.on("VideoStart",(e=>{var t,n,i,r,o,s,a;this.videoCount=null!==(n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.videoIndex)&&void 0!==n?n:0;const d=null!==(r=null===(i=this.config.dailymotion.refresh)||void 0===i?void 0:i.capping)&&void 0!==r?r:5;0!==this.totalImpressionCount||this.config.allowNoAd||(null===(o=this.config.dailymotion.refresh)||void 0===o?void 0:o.enabled)&&!(this.videoCount>=d)||1===(null===(s=null==e?void 0:e.detail)||void 0===s?void 0:s.videoIndex)&&this.isFraudDetected?(null===(a=this.config.dailymotion.refresh)||void 0===a?void 0:a.stopOnNoBid)&&0===this.totalImpressionCount&&(Fb.info("Stopping video because of noBid"),this.destroy(!0)):this.destroy(!0)})),null===(s=this.player)||void 0===s||s.on("VideoEnd",(()=>{var e,t;this.isWaiting=!0,this.isFirstVideoContentAdRequest=!0,null===(e=window.slmadshb.refresh)||void 0===e||e.disableAdUnitRefresh(this.adUnitId),this.config.dailymotion.allowMultipleVideos&&(0!==this.videoImpressionCount||this.config.allowNoAd&&"CORNER"!==this.config.mode)?null===(t=this.player)||void 0===t||t.requestAd(this.getDailymotionCustomParams(this.config.dailymotion.allowBids),!0):this.destroy(!0),this.videoImpressionCount=0})),null===(a=this.player)||void 0===a||a.on("VideoPlay",(e=>{var t,n,i,r,o,s,a,d,l,c;this.isWaiting=!1,this.isPaused=!1;const u=null!==(n=null===(t=this.config.dailymotion.refresh)||void 0===t?void 0:t.capping)&&void 0!==n?n:5;!this.config.allowAdsWhilePlayingContent||(null===(i=this.config.dailymotion.refresh)||void 0===i?void 0:i.enabled)&&!((null===(r=null==e?void 0:e.detail)||void 0===r?void 0:r.videoIndex)>=u-1)||1===(null===(o=null==e?void 0:e.detail)||void 0===o?void 0:o.videoIndex)&&this.isFraudDetected||(null===(s=window.slmadshb.refresh)||void 0===s||s.enableAdUnitRefresh(this.adUnitId,performance.now()),this.isFirstVideoContentAdRequest&&(this.requestAd(),this.isFirstVideoContentAdRequest=!1),this.refreshInterval=window.setInterval((()=>{this.requestAd()}),null!==(c=null===(l=null===(d=null===(a=this.adUnitConfig)||void 0===a?void 0:a.params)||void 0===d?void 0:d.refresh)||void 0===l?void 0:l.timeout)&&void 0!==c?c:5e3))})),null===(d=this.player)||void 0===d||d.on("VideoPause",(()=>{var e;this.isPaused=!0,null===(e=window.slmadshb.refresh)||void 0===e||e.enableAdUnitRefresh(this.adUnitId,performance.now())})),null===(l=this.player)||void 0===l||l.on("VideoDestroy",(()=>{this.destroy(!0)})),null===(c=this.player)||void 0===c||c.on("HeavyAdIntervention",(()=>{Fb.warn("Heavy Ad Intervention occurred, destroying player"),uv.logEvent("video_error",{data:Object.assign(Object.assign({},this.analyticsContext),{error_code:ce})}),this.destroy(!0)})),null===(u=this.player)||void 0===u||u.on("close",(()=>{this.destroy(!this.config.disablePassbackOnClose)})),document.addEventListener("AkceloVideoVisible",(()=>{if(!this.config.visibilityProtectionEnabled)return;const e=document.getElementById(this.adUnitId);if(!e)return;const t=e.closest(".v-vlite .v-container");if(!t)return;let n=!0;setInterval((()=>{const e=t.getBoundingClientRect(),i=[[e.left+10,e.top+10],[e.left+10,(e.top+e.bottom)/2],[e.left+10,e.bottom-10],[(e.left+e.right)/2,e.top+10],[(e.left+e.right)/2,(e.top+e.bottom)/2],[(e.left+e.right)/2,e.bottom-10],[e.right-10,e.top+10],[e.right-10,(e.top+e.bottom)/2],[e.right-10,e.bottom-10]],r=[];i.forEach((e=>{r.push(t.contains(document.elementFromPoint(e[0],e[1])))})),r.filter(Boolean).length<r.length/2?(n&&this.onPlayerVisibilityChange(!1),n=!1):(n||this.onPlayerVisibilityChange(!0),n=!0)}),500)}))}onPlayerVisibilityChange(e){var t,n;this.isDestroyed||(e?null===(t=this.player)||void 0===t||t.playerInstance.play():null===(n=this.player)||void 0===n||n.playerInstance.pause(),uv.logEvent("alert",{data:{type:"hidden_video",player:"akcelo",visible:e?"true":"false"}}))}onAdImpression(e){var t,n,i,r;const o={adUnit:this.adUnitId,slmadsId:null!==(n=null===(t=this.adUnitConfig)||void 0===t?void 0:t.slmadsId)&&void 0!==n?n:0,refresh:this.totalImpressionCount>0,mediaType:"video",bidderCode:"unknown",cpm:null,floor:0,size:""};if(e)if(e.detail.isDM)if(this.lineItemMapping)if(null!==e.detail.adData.adAdvertiserName||null!==e.detail.adData.adCompanion)o.bidderCode="dm";else if(null!==e.detail.adData.adCreativeAdId&&(Number.isNaN(parseInt(e.detail.adData.adCreativeId||"",10))||e.detail.adData.adCreativeAdId.length>16))o.bidderCode="adx";else if(null!==e.detail.adData.adCreativeAdId&&null!==e.detail.adData.adCreativeId)if(-1!==Object.keys(this.lineItemMapping).indexOf(e.detail.adData.adCreativeAdId)){const t=this.lineItemMapping[e.detail.adData.adCreativeAdId].toFixed(2),n=null!==(i=this.bids.filter((e=>e.adserverTargeting.hb_pb.toString()===t.toString()))[0])&&void 0!==i?i:null;n?(o.bidderCode=n.bidderCode,o.cpm=parseFloat(n.cpm.toString()),o.size=`video-${n.size}`,n.used=!0,this.hasWaitingBids=this.bids.filter((e=>!e.rendered&&!e.used)).length>0):(o.bidderCode="a9",o.cpm=parseFloat(t))}else o.bidderCode="direct";else uv.logEvent("video_error",{data:Object.assign(Object.assign({},this.analyticsContext),{error_code:de})});else uv.logEvent("video_error",{data:Object.assign(Object.assign({},this.analyticsContext),{error_code:le})});else if(null!==e.detail.adData){const t=e.detail.adData.getAdSystem().toLowerCase(),n=e.detail.adData.getWrapperAdSystems();"amazon"===t?o.bidderCode="a9":-1!==n.indexOf("AdSense/AdX")?o.bidderCode="adx":-1!==n.indexOf("prebid.org wrapper")?null!==this.currentBid&&(o.bidderCode=null===(r=this.currentBid)||void 0===r?void 0:r.bidderCode,o.cpm=parseFloat(this.currentBid.cpm.toString()),o.size=`video-${this.currentBid.size}`,this.currentBid.used=!0,this.currentBid=null,this.hasWaitingBids=this.bids.filter((e=>!e.rendered&&!e.used)).length>0):o.bidderCode="direct"}""!==o.bidderCode&&document.dispatchEvent(new CustomEvent("videoImpression",{detail:o})),uv.logEvent("video_imp",{data:Object.assign(Object.assign({},this.analyticsContext),{refresh:this.totalImpressionCallCount.toString(),previous_imps:this.totalImpressionCount.toString()})}),this.totalImpressionCount+=1,this.videoImpressionCount+=1}onBidsRequested(){this.isFirstBidsRequested=!0,this.isReadyToRender?(this.bids=this.getBids(),this.hasWaitingBids=this.bids.filter((e=>!e.rendered&&!e.used)).length>0):this.onReadyToRender()}getVastUrl(e=!0){var t,n,i,r,o,s,a,d,l,c,u,p,m,f;this.bids.length>0&&(this.currentBid=null!==(t=this.bids.filter((e=>!e.rendered&&!e.used))[0])&&void 0!==t?t:null);const g={adUnit:this.adUnitConfig,params:{iu:null!==(i=null===(n=this.adUnitConfig)||void 0===n?void 0:n.adUnitPath)&&void 0!==i?i:"/4490027/Akcelo_Video",cust_params:{player:"AKCELO",slmadsId:null===(r=this.adUnitConfig)||void 0===r?void 0:r.slmadsId,slmadshb_adx:(null!==(l=null===(d=null===(a=null===(s=null===(o=this.adUnitConfig)||void 0===o?void 0:o.params)||void 0===s?void 0:s.partners)||void 0===a?void 0:a.adExchange)||void 0===d?void 0:d.enabled)&&void 0!==l&&l).toString(),slmadshb_ob:(null!==(f=null===(m=null===(p=null===(u=null===(c=this.adUnitConfig)||void 0===c?void 0:c.params)||void 0===u?void 0:u.partners)||void 0===p?void 0:p.openBidding)||void 0===m?void 0:m.enabled)&&void 0!==f&&f).toString(),refresh_idx:this.totalImpressionCount},ltd:0,output:"vast",vpa:"auto",vpmute:1,plcmt:2,tfcd:0}};if(e&&(this.currentBid&&(window.slmpbjs.markWinningBidAsUsed({adId:this.currentBid.adId}),g.bid=this.currentBid),window.slmadshb.getA9VideoBid)){const e=window.slmadshb.getA9VideoBid(this.adUnitId);e&&e.amzniid&&window.slmadshb.markA9VideoBidAsUsed(e.amzniid),e&&e.amzniid&&e.amznp&&e.amznbid&&(g.params.cust_params.amzniid=e.amzniid,g.params.cust_params.amznp=e.amznp,g.params.cust_params.amznbid=e.amznbid)}if(window.slmadshb.getAdUnitFloor&&null!==window.slmadshb.getAdUnitFloor(this.adUnitId)&&(g.params.cust_params.slm_floor=window.slmadshb.getAdUnitFloor(this.adUnitId)),window.googletag&&window.googletag.pubads&&window.googletag.pubads().getTargetingKeys){const e=window.googletag.pubads().getTargetingKeys();e&&e.length>0&&e.forEach((e=>{const t=window.googletag.pubads().getTargeting(e);!t||1!==t.length||void 0!==g.params.cust_params[e]||this.config.disabledGoogleTagKeys&&-1!==this.config.disabledGoogleTagKeys.indexOf(e)||(g.params.cust_params[e]=t[0])}))}return window.slmpbjs.adServers.dfp.buildVideoUrl(g)}getDailymotionCustomParams(e=!0){const t=this.getVastUrl(e),n=new URLSearchParams(t.split("?")[1]),i=n.get("cust_params"),r=function(e){const t={},n=("?"===e[0]?e.substring(1):e).split("&");for(let i=0;i<n.length;i+=1){const e=n[i].split("=");t[decodeURIComponent(e[0])]=decodeURIComponent(e[1]||"")}return t}(null!=i?i:"");e||Object.keys(r).forEach((e=>{e.startsWith("hb_")&&delete r[e]}));const o=new URLSearchParams(r).toString();return n.set("cust_params",o),n.delete("plcmt"),n.delete("vpmute"),n.delete("vpa"),n.toString()}requestAd(){var e;this.isDestroyed||this.isPaused||this.isWaiting||(Fb.info("Requesting Ad"),null===(e=this.player)||void 0===e||e.requestAd(this.getVastUrl()),uv.logEvent("video_imp_req",{data:Object.assign(Object.assign({},this.analyticsContext),{refresh:this.totalImpressionCallCount.toString()})}),this.totalImpressionCallCount+=1)}destroy(e=!1){var t,n;Fb.info("Destroying player"),this.refreshInterval&&(clearInterval(this.refreshInterval),this.refreshInterval=null),this.isDestroyed=!0,null===(t=window.slmadshb.refresh)||void 0===t||t.disableAdUnitRefresh(this.adUnitId),we(this.adUnitId),null===(n=this.player)||void 0===n||n.destroy(),e&&this.callPassback()}}const zb=new H("Standalone Video");class Lb extends $b{constructor(e){super(e),zb.info("Module initialization")}onBidsRequested(){zb.info("Bids requested",this.adUnitId);const e=ge.getAdUnitsConfigById([this.adUnitId]);if(0===e.length)return;const t=e[0];let n;const i=window.slmpbjs.getHighestCpmBids(this.adUnitId);i[0]&&i[0].adId&&"video"===i[0].mediaType&&(n=i[0]);const r=window.slmadshb.getA9VideoBid(t.id);r&&r.amzniid&&window.slmadshb.markA9VideoBidAsUsed(r.amzniid),t.params&&t.params.video&&t.params.video.renderer&&(t.params.video.renderer(this.adUnitId,n,r),zb.info("Calling video renderer",this.adUnitId,n,r))}}var Vb=function(e,t){return(Vb=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function Wb(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{d(i.next(e))}catch(t){o(t)}}function a(e){try{d(i.throw(e))}catch(t){o(t)}}function d(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}d((i=i.apply(e,t||[])).next())}))}function Gb(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(d){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,i=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){s.label=a[1];break}if(6===a[0]&&s.label<r[1]){s.label=r[1],r=a;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(a);break}r[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(d){a=[6,d],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,d])}}}function Hb(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var Jb="1.9.1",Kb="awesomium",Xb="cef",Yb="cefsharp",Qb="coachjs",Zb="electron",ey="fminer",ty="geb",ny="nightmarejs",iy="phantomas",ry="phantomjs",oy="rhino",sy="selenium",ay="sequentum",dy="slimerjs",ly="webdriverio",cy="webdriver",uy="headless_chrome",py="unknown",my=function(e){function t(n,i){var r=e.call(this,i)||this;return r.state=n,r.name="BotdError",Object.setPrototypeOf(r,t.prototype),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Vb(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(Error);function fy(e){return Wb(this,void 0,void 0,(function(){var t,n,i=this;return Gb(this,(function(r){switch(r.label){case 0:return t={},n=Object.keys(e),[4,Promise.all(n.map((function(n){return Wb(i,void 0,void 0,(function(){var i,r,o,s,a;return Gb(this,(function(d){switch(d.label){case 0:i=e[n],d.label=1;case 1:return d.trys.push([1,3,,4]),r=t,o=n,a={},[4,i()];case 2:return r[o]=(a.value=d.sent(),a.state=0,a),[3,4];case 3:return s=d.sent(),t[n]=s instanceof my?{state:s.state,error:"".concat(s.name,": ").concat(s.message)}:{state:-3,error:s instanceof Error?"".concat(s.name,": ").concat(s.message):String(s)},[3,4];case 4:return[2]}}))}))})))];case 1:return r.sent(),[2,t]}}))}))}function gy(e,t){return-1!==e.indexOf(t)}function hy(e,t){return-1!==e.indexOf(t)}function vy(e){return Object.getOwnPropertyNames(e)}function by(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i=function(t){if("string"==typeof t){if(gy(e,t))return{value:!0}}else if(null!=function(e,t){if("find"in e)return e.find(t);for(var n=0;n<e.length;n++)if(t(e[n],n,e))return e[n]}(e,(function(e){return t.test(e)})))return{value:!0}},r=0,o=t;r<o.length;r++){var s=i(o[r]);if("object"==typeof s)return s.value}return!1}function yy(e){return e.reduce((function(e,t){return e+(t?1:0)}),0)}var wy={detectAppVersion:function(e){var t=e.appVersion;return 0===t.state&&(/headless/i.test(t.value)?uy:/electron/i.test(t.value)?Zb:/slimerjs/i.test(t.value)?dy:void 0)},detectDocumentAttributes:function(e){var t=e.documentElementKeys;return 0===t.state&&(by(t.value,"selenium","webdriver","driver")?sy:void 0)},detectErrorTrace:function(e){var t=e.errorTrace;return 0===t.state&&(/PhantomJS/i.test(t.value)?ry:void 0)},detectEvalLengthInconsistency:function(e){var t=e.evalLength,n=e.browserKind,i=e.browserEngineKind;if(0===t.state&&0===n.state&&0===i.state){var r=t.value;return"unknown"!==i.value&&(37===r&&!gy(["webkit","gecko"],i.value)||39===r&&!gy(["internet_explorer"],n.value)||33===r&&!gy(["chromium"],i.value))}},detectFunctionBind:function(e){if(-2===e.functionBind.state)return ry},detectLanguagesLengthInconsistency:function(e){var t=e.languages;if(0===t.state&&0===t.value.length)return uy},detectNotificationPermissions:function(e){var t=e.notificationPermissions,n=e.browserKind;return 0===n.state&&"chrome"===n.value&&(0===t.state&&t.value?uy:void 0)},detectPluginsArray:function(e){var t=e.pluginsArray;if(0===t.state&&!t.value)return uy},detectPluginsLengthInconsistency:function(e){var t=e.pluginsLength,n=e.android,i=e.browserKind,r=e.browserEngineKind;if(0===t.state&&0===n.state&&0===i.state&&0===r.state&&"chrome"===i.value&&!n.value&&"chromium"===r.value)return 0===t.value?uy:void 0},detectProcess:function(e){var t,n=e.process;return 0===n.state&&("renderer"===n.value.type||null!=(null===(t=n.value.versions)||void 0===t?void 0:t.electron)?Zb:void 0)},detectUserAgent:function(e){var t=e.userAgent;return 0===t.state&&(/PhantomJS/i.test(t.value)?ry:/Headless/i.test(t.value)?uy:/Electron/i.test(t.value)?Zb:/slimerjs/i.test(t.value)?dy:void 0)},detectWebDriver:function(e){var t=e.webDriver;if(0===t.state&&t.value)return uy},detectWebGL:function(e){var t=e.webGL;if(0===t.state){var n=t.value,i=n.vendor,r=n.renderer;if("Brian Paul"==i&&"Mesa OffScreen"==r)return uy}},detectWindowExternal:function(e){var t=e.windowExternal;return 0===t.state&&(/Sequentum/i.test(t.value)?ay:void 0)},detectWindowSize:function(e){var t=e.windowSize,n=e.documentFocus;if(0!==t.state||0!==n.state)return!1;var i=t.value,r=i.outerWidth,o=i.outerHeight;return n.value&&0===r&&0===o?uy:void 0},detectMimeTypesConsistent:function(e){var t=e.mimeTypesConsistent;if(0===t.state&&!t.value)return py},detectProductSub:function(e){var t=e.productSub,n=e.browserKind;return 0===t.state&&0===n.state&&("chrome"!==n.value&&"safari"!==n.value&&"opera"!==n.value&&"wechat"!==n.value||"20030107"===t.value?void 0:py)},detectDistinctiveProperties:function(e){var t=e.distinctiveProps;if(0!==t.state)return!1;var n,i=t.value;for(n in i)if(i[n])return n}};function Iy(){var e,t,n=window,i=navigator;return yy(["webkitPersistentStorage"in i,"webkitTemporaryStorage"in i,0===i.vendor.indexOf("Google"),"webkitResolveLocalFileSystemURL"in n,"BatteryManager"in n,"webkitMediaStream"in n,"webkitSpeechGrammar"in n])>=5?"chromium":yy(["ApplePayError"in n,"CSSPrimitiveValue"in n,"Counter"in n,0===i.vendor.indexOf("Apple"),"getStorageUpdates"in i,"WebKitMediaKeys"in n])>=4?"webkit":yy(["buildID"in navigator,"MozAppearance"in(null!==(t=null===(e=document.documentElement)||void 0===e?void 0:e.style)&&void 0!==t?t:{}),"onmozfullscreenchange"in n,"mozInnerScreenX"in n,"CSSMozDocumentRule"in n,"CanvasCaptureMediaStream"in n])>=4?"gecko":"unknown"}var Ty={android:function(){var e=Iy(),t="chromium"===e,n="gecko"===e;if(!t&&!n)return!1;var i=window;return yy(["onorientationchange"in i,"orientation"in i,t&&!("SharedWorker"in i),n&&/android/i.test(navigator.appVersion)])>=2},browserKind:function(){var e,t=null===(e=navigator.userAgent)||void 0===e?void 0:e.toLowerCase();return hy(t,"edg/")?"edge":hy(t,"trident")||hy(t,"msie")?"internet_explorer":hy(t,"wechat")?"wechat":hy(t,"firefox")?"firefox":hy(t,"opera")||hy(t,"opr")?"opera":hy(t,"chrome")?"chrome":hy(t,"safari")?"safari":"unknown"},browserEngineKind:Iy,documentFocus:function(){return void 0!==document.hasFocus&&document.hasFocus()},userAgent:function(){return navigator.userAgent},appVersion:function(){var e=navigator.appVersion;if(null==e)throw new my(-1,"navigator.appVersion is undefined");return e},rtt:function(){if(void 0===navigator.connection)throw new my(-1,"navigator.connection is undefined");if(void 0===navigator.connection.rtt)throw new my(-1,"navigator.connection.rtt is undefined");return navigator.connection.rtt},windowSize:function(){return{outerWidth:window.outerWidth,outerHeight:window.outerHeight,innerWidth:window.innerWidth,innerHeight:window.innerHeight}},pluginsLength:function(){if(void 0===navigator.plugins)throw new my(-1,"navigator.plugins is undefined");if(void 0===navigator.plugins.length)throw new my(-3,"navigator.plugins.length is undefined");return navigator.plugins.length},pluginsArray:function(){if(void 0===navigator.plugins)throw new my(-1,"navigator.plugins is undefined");if(void 0===window.PluginArray)throw new my(-1,"window.PluginArray is undefined");return navigator.plugins instanceof PluginArray},errorTrace:function(){try{null[0]()}catch(e){if(e instanceof Error&&null!=e.stack)return e.stack.toString()}throw new my(-3,"errorTrace signal unexpected behaviour")},productSub:function(){var e=navigator.productSub;if(void 0===e)throw new my(-1,"navigator.productSub is undefined");return e},windowExternal:function(){if(void 0===window.external)throw new my(-1,"window.external is undefined");var e=window.external;if("function"!=typeof e.toString)throw new my(-2,"window.external.toString is not a function");return e.toString()},mimeTypesConsistent:function(){if(void 0===navigator.mimeTypes)throw new my(-1,"navigator.mimeTypes is undefined");for(var e=navigator.mimeTypes,t=Object.getPrototypeOf(e)===MimeTypeArray.prototype,n=0;n<e.length;n++)t&&(t=Object.getPrototypeOf(e[n])===MimeType.prototype);return t},evalLength:function(){return eval.toString().length},webGL:function(){var e=document.createElement("canvas");if("function"!=typeof e.getContext)throw new my(-2,"HTMLCanvasElement.getContext is not a function");var t=e.getContext("webgl");if(null===t)throw new my(-4,"WebGLRenderingContext is null");if("function"!=typeof t.getParameter)throw new my(-2,"WebGLRenderingContext.getParameter is not a function");return{vendor:t.getParameter(t.VENDOR),renderer:t.getParameter(t.RENDERER)}},webDriver:function(){if(null==navigator.webdriver)throw new my(-1,"navigator.webdriver is undefined");return navigator.webdriver},languages:function(){var e,t=navigator,n=[],i=t.language||t.userLanguage||t.browserLanguage||t.systemLanguage;if(void 0!==i&&n.push([i]),Array.isArray(t.languages))"chromium"===Iy()&&yy([!("MediaSettingsRange"in(e=window)),"RTCEncodedAudioFrame"in e,""+e.Intl=="[object Intl]",""+e.Reflect=="[object Reflect]"])>=3||n.push(t.languages);else if("string"==typeof t.languages){var r=t.languages;r&&n.push(r.split(","))}return n},notificationPermissions:function(){return Wb(this,void 0,void 0,(function(){var e,t;return Gb(this,(function(n){switch(n.label){case 0:if(void 0===window.Notification)throw new my(-1,"window.Notification is undefined");if(void 0===navigator.permissions)throw new my(-1,"navigator.permissions is undefined");if("function"!=typeof(e=navigator.permissions).query)throw new my(-2,"navigator.permissions.query is not a function");n.label=1;case 1:return n.trys.push([1,3,,4]),[4,e.query({name:"notifications"})];case 2:return t=n.sent(),[2,"denied"===window.Notification.permission&&"prompt"===t.state];case 3:throw n.sent(),new my(-3,"notificationPermissions signal unexpected behaviour");case 4:return[2]}}))}))},documentElementKeys:function(){if(void 0===document.documentElement)throw new my(-1,"document.documentElement is undefined");var e=document.documentElement;if("function"!=typeof e.getAttributeNames)throw new my(-2,"document.documentElement.getAttributeNames is not a function");return e.getAttributeNames()},functionBind:function(){if(void 0===Function.prototype.bind)throw new my(-2,"Function.prototype.bind is undefined");return Function.prototype.bind.toString()},process:function(){var e=window.process,t="window.process is";if(void 0===e)throw new my(-1,"".concat(t," undefined"));if(e&&"object"!=typeof e)throw new my(-3,"".concat(t," not an object"));return e},distinctiveProps:function(){var e,t,n=((e={})[Kb]={window:["awesomium"]},e[Xb]={window:["RunPerfTest"]},e[Yb]={window:["CefSharp"]},e[Qb]={window:["emit"]},e[ey]={window:["fmget_targets"]},e[ty]={window:["geb"]},e[ny]={window:["__nightmare","nightmare"]},e[iy]={window:["__phantomas"]},e[ry]={window:["callPhantom","_phantom"]},e[oy]={window:["spawn"]},e[sy]={window:["_Selenium_IDE_Recorder","_selenium","calledSelenium",/^([a-z]){3}_.*_(Array|Promise|Symbol)$/],document:["__selenium_evaluate","selenium-evaluate","__selenium_unwrapped"]},e[ly]={window:["wdioElectron"]},e[cy]={window:["webdriver","__webdriverFunc","__lastWatirAlert","__lastWatirConfirm","__lastWatirPrompt","_WEBDRIVER_ELEM_CACHE","ChromeDriverw"],document:["__webdriver_script_fn","__driver_evaluate","__webdriver_evaluate","__fxdriver_evaluate","__driver_unwrapped","__webdriver_unwrapped","__fxdriver_unwrapped","__webdriver_script_fn","__webdriver_script_func","__webdriver_script_function","$cdc_asdjflasutopfhvcZLmcf","$cdc_asdjflasutopfhvcZLmcfl_","$chrome_asyncScriptInfo","__$webdriverAsyncExecutor"]},e[uy]={window:["domAutomation","domAutomationController"]},e),i={},r=vy(window),o=[];for(t in void 0!==window.document&&(o=vy(window.document)),n){var s=n[t];if(void 0!==s){var a=void 0!==s.window&&by.apply(void 0,Hb([r],s.window,!1)),d=!(void 0===s.document||!o.length)&&by.apply(void 0,Hb([o],s.document,!1));i[t]=a||d}}return i}},Cy=function(){function e(){this.components=void 0,this.detections=void 0}return e.prototype.getComponents=function(){return this.components},e.prototype.getDetections=function(){return this.detections},e.prototype.detect=function(){if(void 0===this.components)throw new Error("BotDetector.detect can't be called before BotDetector.collect");var e=function(e,t){var n={},i={bot:!1};for(var r in t){var o=(0,t[r])(e),s={bot:!1};"string"==typeof o?s={bot:!0,botKind:o}:o&&(s={bot:!0,botKind:py}),n[r]=s,s.bot&&(i=s)}return[n,i]}(this.components,wy),t=e[0],n=e[1];return this.detections=t,n},e.prototype.collect=function(){return Wb(this,void 0,void 0,(function(){var e;return Gb(this,(function(t){switch(t.label){case 0:return e=this,[4,fy(Ty)];case 1:return e.components=t.sent(),[2,this.components]}}))}))},e}();function Ay(e){var t=(void 0===e?{}:e).monitoring,n=void 0===t||t;return Wb(this,void 0,void 0,(function(){var e;return Gb(this,(function(t){switch(t.label){case 0:return n&&function(){if(!(window.__fpjs_d_m||Math.random()>=.001))try{var e=new XMLHttpRequest;e.open("get","https://m1.openfpcdn.io/botd/v".concat(Jb,"/npm-monitoring"),!0),e.send()}catch(t){console.error(t)}}(),[4,(e=new Cy).collect()];case 1:return t.sent(),[2,e]}}))}))}var Ey=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{d(i.next(e))}catch(t){o(t)}}function a(e){try{d(i.throw(e))}catch(t){o(t)}}function d(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}d((i=i.apply(e,t||[])).next())}))};const Sy=new H("Bot Detector");const xy=new class{constructor(){this.isBot=null,Sy.info("Module initialization")}getIsBot(){return Ey(this,void 0,void 0,(function*(){if(null!==this.isBot)return this.isBot;return Ay({monitoring:!1}).then((e=>e.detect())).then((e=>{this.isBot=e.bot,e.bot&&"coachjs"===e.botKind&&(this.isBot=!1,Sy.info("Detection returned bot but kind is 'coachjs', letting it pass")),Sy.info("Detection completed",e),uv.logEvent("alert",{data:{type:"bot_detection",isBot:this.isBot.toString()}})})).catch((e=>{Sy.info("Failed to detect bot status",e),this.isBot=!1,uv.logEvent("alert",{data:{type:"bot_detection",isBot:"unknown",error:e}})})),this.isBot}))}},ky=new H("Akcelo Light Video");class _y extends $b{constructor(e){var t,n,i;super(e),this.isLoaded=!1,this.isReadyToRender=!1,this.isFirstBidsRequested=!1,this.hasWaitingBids=!1,this.bids=[],this.currentBid=null,this.totalImpressionCallCount=0,this.totalImpressionCount=0,ky.info("Module initialization"),window.slmpbjs=window.slmpbjs||{adUnits:[]},this.adUnitConfig=window.slmpbjs.adUnits.find((e=>e.id===this.adUnitId)),this.config=this.getConfig(null===(n=null===(t=this.adUnitConfig)||void 0===t?void 0:t.params)||void 0===n?void 0:n.video),this.config.provider="HTML",null===(i=window.slmadshb.refresh)||void 0===i||i.disableAdUnitRefresh(this.adUnitId),this.loadPlayer((()=>{ky.info("Player loaded");const e=setInterval((()=>{void 0!==window.AkceloPlayer&&(clearInterval(e),this.isLoaded=!0,this.isReadyToRender||this.onReadyToRender())}),100)}))}getConfig(e){const t={debug:M(),mode:"CORNER",position:"BOTTOM_RIGHT",closeButtonMode:"ONLY_CONTENT",closeButtonPosition:"TOP_RIGHT",closeButtonPositionMode:"OUTSIDE",closeButtonDelay:30,fullscreen:!0,dailymotion:{},lightParams:{allowBids:!0,fallbackToDM:!0,refresh:{enabled:!0,capping:3,skipOnEmpty:!0}}};let n=t;return e&&(n=F(t,e)),n}getBids(){const e=[],t=window.slmpbjs.getBidResponsesForAdUnitCode(this.adUnitId);return t.bids&&t.bids.forEach((t=>{t.cpm&&t.adId&&t.cpm>0&&"renderer"!==t.status&&e.push(t)})),[...new Set([...this.bids,...e.sort(((e,t)=>t.cpm-e.cpm))])]}getVastUrl(e=!0){var t,n,i,r,o,s,a,d,l,c,u,p,m,f;this.bids.length>0&&(this.currentBid=null!==(t=this.bids.filter((e=>!e.rendered&&!e.used))[0])&&void 0!==t?t:null);const g={adUnit:this.adUnitConfig,params:{iu:null!==(i=null===(n=this.adUnitConfig)||void 0===n?void 0:n.adUnitPath)&&void 0!==i?i:"/4490027/Akcelo_Video",cust_params:{player:"AKCELO LIGHT",slmadsId:null===(r=this.adUnitConfig)||void 0===r?void 0:r.slmadsId,slmadshb_adx:(null!==(l=null===(d=null===(a=null===(s=null===(o=this.adUnitConfig)||void 0===o?void 0:o.params)||void 0===s?void 0:s.partners)||void 0===a?void 0:a.adExchange)||void 0===d?void 0:d.enabled)&&void 0!==l&&l).toString(),slmadshb_ob:(null!==(f=null===(m=null===(p=null===(u=null===(c=this.adUnitConfig)||void 0===c?void 0:c.params)||void 0===u?void 0:u.partners)||void 0===p?void 0:p.openBidding)||void 0===m?void 0:m.enabled)&&void 0!==f&&f).toString()},ltd:0,output:"vast",vpa:"auto",vpmute:1,plcmt:2,tfcd:0}};if(e&&(this.currentBid&&(window.slmpbjs.markWinningBidAsUsed({adId:this.currentBid.adId}),g.bid=this.currentBid),window.slmadshb.getA9VideoBid)){const e=window.slmadshb.getA9VideoBid(this.adUnitId);e&&e.amzniid&&window.slmadshb.markA9VideoBidAsUsed(e.amzniid),e&&e.amzniid&&e.amznp&&e.amznbid&&(g.params.cust_params.amzniid=e.amzniid,g.params.cust_params.amznp=e.amznp,g.params.cust_params.amznbid=e.amznbid)}if(window.slmadshb.getAdUnitFloor&&null!==window.slmadshb.getAdUnitFloor(this.adUnitId)&&(g.params.cust_params.slm_floor=window.slmadshb.getAdUnitFloor(this.adUnitId)),window.googletag&&window.googletag.pubads&&window.googletag.pubads().getTargetingKeys){const e=window.googletag.pubads().getTargetingKeys();e&&e.length>0&&e.forEach((e=>{const t=window.googletag.pubads().getTargeting(e);t&&1===t.length&&void 0===g.params.cust_params[e]&&(g.params.cust_params[e]=t[0])}))}return window.slmpbjs.adServers.dfp.buildVideoUrl(g)}loadPlayer(e){if(void 0!==window.AkceloPlayer||window.AkceloPlayerLoading)e();else{const t=document.createElement("script");t.src="//ads.slmads.com/akcelo-player.js",t.onload=e,document.head.appendChild(t),window.AkceloPlayerLoading=!0}}onBidsRequested(){var e;this.isFirstBidsRequested=!0,this.isReadyToRender?(this.bids=this.getBids(),this.hasWaitingBids=this.bids.filter((e=>!e.rendered&&!e.used)).length>0,null===(e=window.slmadshb.refresh)||void 0===e||e.disableAdUnitRefresh(this.adUnitId)):this.onReadyToRender()}onReadyToRender(){var e,t,n;if(!this.isLoaded||!this.isFirstBidsRequested)return;this.isReadyToRender=!0,ky.info("Rendering player");const i=document.createElement("style");i.innerText=".v-vlite{opacity: 0;}.v-vlite.visible{opacity: 1;}",null===(t=null===(e=document.getElementById(this.adUnitId))||void 0===e?void 0:e.parentElement)||void 0===t||t.appendChild(i);const r=document.createElement("video");r.classList.add("akcelo-media"),r.muted=!0,null===(n=document.getElementById(this.adUnitId))||void 0===n||n.appendChild(r),this.bids=this.getBids(),this.hasWaitingBids=this.bids.filter((e=>!e.rendered&&!e.used)).length>0,new window.AkceloPlayer(`#${this.adUnitId} video.akcelo-media`,this.config,this.onPlayerReady.bind(this))}onPlayerReady(e){var t,n,i,r;this.player=e,null===(t=this.player)||void 0===t||t.on("AdSdkReady",(()=>{this.requestAd()})),null===(n=this.player)||void 0===n||n.on("AdStart",(()=>{var e,t;this.totalImpressionCount+=1,null===(e=this.player)||void 0===e||e.playerInstance.elements.outerContainer.classList.add("visible"),null===(t=window.slmadshb.refresh)||void 0===t||t.enableAdUnitRefresh(this.adUnitId,performance.now())})),null===(i=this.player)||void 0===i||i.on("AdEnd",(()=>{var e,t,n;null===(e=window.slmadshb.refresh)||void 0===e||e.disableAdUnitRefresh(this.adUnitId),(null===(n=null===(t=this.config.lightParams)||void 0===t?void 0:t.refresh)||void 0===n?void 0:n.enabled)&&this.config.lightParams.refresh.capping&&this.config.lightParams.refresh.capping>this.totalImpressionCallCount&&(!this.config.lightParams.refresh.skipOnEmpty||this.totalImpressionCallCount===this.totalImpressionCount)?this.requestAd():this.destroy(!0)})),null===(r=this.player)||void 0===r||r.on("AdError",(()=>{var e,t,n;null===(e=window.slmadshb.refresh)||void 0===e||e.disableAdUnitRefresh(this.adUnitId),(null===(n=null===(t=this.config.lightParams)||void 0===t?void 0:t.refresh)||void 0===n?void 0:n.enabled)&&this.config.lightParams.refresh.capping&&this.config.lightParams.refresh.capping>this.totalImpressionCallCount&&(!this.config.lightParams.refresh.skipOnEmpty||this.totalImpressionCallCount===this.totalImpressionCount)?this.requestAd():this.destroy(!0)}))}requestAd(){var e;ky.info("Requesting Ad"),this.totalImpressionCallCount+=1,null===(e=this.player)||void 0===e||e.requestAd(this.getVastUrl())}destroy(e=!1){var t,n,i;ky.info("Destroying player"),document.dispatchEvent(new Event("AkceloLightVideoDestroy")),null===(t=window.slmadshb.refresh)||void 0===t||t.disableAdUnitRefresh(this.adUnitId),null===(n=this.player)||void 0===n||n.destroy(),(null===(i=this.config.lightParams)||void 0===i?void 0:i.fallbackToDM)&&this.adUnitConfig?q("videoFallback",(()=>{}),{htmlId:this.adUnitId,adUnit:this.adUnitConfig}):(we(this.adUnitId),e&&this.callPassback())}}var Uy=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{d(i.next(e))}catch(t){o(t)}}function a(e){try{d(i.throw(e))}catch(t){o(t)}}function d(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}d((i=i.apply(e,t||[])).next())}))};const Ry=new H("Video");new class{constructor(){this.players=new Map,Ry.info("Module initialization"),window.slmadshb.videoInstances=this.players,q.after("addAdUnit",((e,t)=>Uy(this,void 0,void 0,(function*(){var e,n,i,r,o,s;if("video"===t.adUnit.type)if("STANDALONE"===(null===(n=null===(e=t.adUnit.params)||void 0===e?void 0:e.video)||void 0===n?void 0:n.type))this.players.set(t.htmlId,new Lb(t.htmlId));else if("AKCELO_LIGHT"===(null===(r=null===(i=t.adUnit.params)||void 0===i?void 0:i.video)||void 0===r?void 0:r.type))this.players.set(t.htmlId,new _y(t.htmlId));else{const e=be.getConsentType();let n="accepted"===e||"notrequired"===e;n&&(null===(s=null===(o=t.adUnit.params)||void 0===o?void 0:o.video)||void 0===s?void 0:s.botProtectionEnabled)&&(n=!(yield xy.getIsBot())),n?this.players.set(t.htmlId,new Mb(t.htmlId)):(Ry.info("Skipping video call because of consent or bot, calling passback if it's available"),qb.callPassback(t.adUnit))}})))),q.after("adRequest",((e,t)=>{t.ids.forEach((e=>{var t;return null===(t=this.players.get(e))||void 0===t?void 0:t.onBidsRequested()}))})),q.after("videoFallback",((e,t)=>{var n,i,r;Ry.info("Video Fallback"),this.players.delete(t.htmlId),"AKCELO_LIGHT"===(null===(i=null===(n=t.adUnit.params)||void 0===n?void 0:n.video)||void 0===i?void 0:i.type)&&(null===(r=t.adUnit.params.video.lightParams)||void 0===r?void 0:r.fallbackToDM)&&this.players.set(t.htmlId,new Mb(t.htmlId,!0))}))}};class Oy{constructor(e=[]){this.storeAuctions=new Map,this.storeAuctionsDone=new Set,this.storeBids=new Map,this.mappingAdUnitIdAuctionIds=new Map,this.mappingAuctionIdBids=new Map,this.mappingSlmadsIdByAdUnitCode=new Map,e.forEach((e=>{void 0!==e.slmadsId&&void 0!==e.id&&this.mappingSlmadsIdByAdUnitCode.set(e.id,e.slmadsId)}))}setAuction(e){var t,n;this.storeAuctions.set(e.auctionId,e);let i=this.mappingAdUnitIdAuctionIds.get(null===(t=e.adUnit)||void 0===t?void 0:t.id);void 0===i&&(i=[]);void 0===i.find((t=>t===e.auctionId))&&(i.push(e.auctionId),this.mappingAdUnitIdAuctionIds.set(null===(n=e.adUnit)||void 0===n?void 0:n.id,i))}setBid(e){this.storeBids.set(e.bidId,e);const t=this.storeAuctions.get(e.auctionId);if(!t)throw new Error(`auction not found : auctionId=${e.auctionId}`);let n=this.mappingAuctionIdBids.get(t.auctionId);void 0===n&&(n=[]);void 0===n.find((t=>t===e.bidId))&&n.push(e.bidId),this.mappingAuctionIdBids.set(t.auctionId,n)}getAuction(e){const t=this.storeAuctions.get(e);if(void 0===t)throw new Error(`auction not found : auctionId=${e}`);return t}getBid(e){const t=this.storeBids.get(e);if(!t)throw new Error(`bid not found : bidId=${e}`);return t}updateStatusAuctionDone(e){const t=this.getAuction(e);this.storeAuctionsDone.add(t.auctionId)}findAuctionsByAdUnitId(e){const t=[];if(this.mappingAdUnitIdAuctionIds.has(e)){const n=this.mappingAdUnitIdAuctionIds.get(e);null==n||n.forEach((e=>{const n=this.getAuction(e);t.push(n)}))}return t}findBidsByAuctionId(e){return this.mappingAuctionIdBids.has(e)?this.mappingAuctionIdBids.get(e).map((e=>this.getBid(e))):[]}isAuctionNew(e){return!this.storeAuctions.has(e)}isAuctionDone(e){return this.storeAuctions.has(e)&&this.storeAuctionsDone.has(e)}isAuctionRunning(e){return this.storeAuctions.has(e)&&!this.storeAuctionsDone.has(e)}}var Dy=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{d(i.next(e))}catch(t){o(t)}}function a(e){try{d(i.throw(e))}catch(t){o(t)}}function d(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}d((i=i.apply(e,t||[])).next())}))};const By=new H("AdsLog Analytics"),Py="akcelo";new class{constructor(){this.siteId=0,this.consentType="unknown",this.bidIdByAdUnitId=new Map,this.adUnitIdByAdUnitPath=new Map,this.auctionsLogger=new Kh("https://logs2.sportslocalmedia.com/auctions"),this.impressionsLogger=new Kh("https://logs2.sportslocalmedia.com/impressions"),this.bidderCpmAdjustment=((e={customAdjustments:[]})=>{const t={};return e.customAdjustments&&e.customAdjustments.length>0&&e.customAdjustments.forEach((e=>{e.bidder&&"function"==typeof e.adjustment&&(t[e.bidder]={bidCpmAdjustment:e.adjustment})})),t})();Math.random()<.5?By.info("Module initialization skipped (Sampling)"):q.after("coreInit",(()=>Dy(this,void 0,void 0,(function*(){var e;void 0!==(null===(e=ge.config.params)||void 0===e?void 0:e.siteId)&&(this.siteId=ge.config.params.siteId);(yield ov())?By.info("Module initialization skipped (AdBlock detected)"):(By.info("Module initialization"),this.consentType=be.getConsentType(),window.slmadshb.que.push((()=>{this.state=new Oy(Array.from(ge.adUnits.values())),this.initEventListeners()})))}))))}formatAuction(e){var t,n,i;const r=null===(t=this.state)||void 0===t?void 0:t.findBidsByAuctionId(e);if(0===r.length)return!1;const o=null===(n=this.state)||void 0===n?void 0:n.getAuction(e);if(!o)return!1;const s={abtest:(null===(i=window.slmadshb.abtest)||void 0===i?void 0:i.versionName)||void 0,device:L()?"mobile":"desktop",slmadsId:o.adUnit.slmadsId,bidRequests:[],consent:this.consentType,siteId:this.siteId,sizes:o.sizes,refresh:o.refresh,refreshCount:o.refreshCount,floor:o.floor,floorVersion:o.floorVersion,path:window.location.pathname};return r.forEach((e=>{var t;null===(t=s.bidRequests)||void 0===t||t.push({bidderCode:e.bidderCode,state:e.state,cpm:e.state===ne||ie?e.cpm:void 0,size:e.size,floor:e.floor,floorVersion:e.floorVersion})})),s}formatImpression(e,t,n,i,r){var o,s,a,d;let l;(null===(o=window.slmadshb.abtest)||void 0===o?void 0:o.versionName)&&(l=window.slmadshb.abtest.versionName);const c=null===(s=this.state)||void 0===s?void 0:s.findAuctionsByAdUnitId((null===(a=e.adUnit)||void 0===a?void 0:a.id)||"");if(void 0===c||0===c.length)return By.warn(`auctions not found, adUnitId=${null===(d=e.adUnit)||void 0===d?void 0:d.id}`),!1;let u=0;return t.cpm&&(u=parseFloat(t.cpm.toString())),{abtest:l,bidderCode:t.bidderCode,consent:i,cpm:u,device:L()?"mobile":"desktop",eventType:r||"impression",floor:e.floor,floorVersion:e.floorVersion,mediaType:t.mediaType,refresh:c.length>1,refreshCount:Math.max(0,c.length-1),siteId:n,size:t.size,slmadsId:c[0].adUnit.slmadsId,path:window.location.pathname}}bidTimeout(e){var t,n;const i=null===(t=this.state)||void 0===t?void 0:t.getBid(e);i&&(null===(n=this.state)||void 0===n?void 0:n.isAuctionRunning(i.auctionId))&&(i.state=se,this.state.setBid(i))}auctionTimeout(e){var t;if(null===(t=this.state)||void 0===t?void 0:t.isAuctionRunning(e)){const t=this.state.findBidsByAuctionId(e);t.length>0&&t.forEach((e=>{e.state===oe&&this.bidTimeout(e.bidId||"")})),this.state.updateStatusAuctionDone(e)}else By.error("Cannot set auction as timeout because the auction is not running")}auctionDone(e,t=null){var n;if(By.info("auctionDone",e),null===(n=this.state)||void 0===n?void 0:n.isAuctionRunning(e)){const n=()=>{var t,n,i;const r=null===(t=this.state)||void 0===t?void 0:t.getAuction(e);r&&!(null===(n=this.state)||void 0===n?void 0:n.isAuctionDone(r.auctionId))?(this.auctionTimeout(e),null===(i=this.state)||void 0===i||i.updateStatusAuctionDone(e),this.auctionsLogger.batchThenSend(this.formatAuction(e)),By.info("Logging auction",e)):By.warn("Auction already done",e)};"number"==typeof t?setTimeout(n,t):n()}else By.warn("Auction is not running")}impression(e,t,n){var i,r;const o=null===(i=this.state)||void 0===i?void 0:i.getBid(e);if(o){this.auctionDone(o.auctionId),o.size=t,o.mediaType=n;const e=null===(r=this.state)||void 0===r?void 0:r.getAuction(o.auctionId);if(e){const t=this.formatImpression(e,o,this.siteId,this.consentType);t&&t.bidderCode!==Py&&(this.impressionsLogger.batchThenSend(t),By.info("Logging impression",o))}}else By.warn("Impression was not logged",o)}getFloorFromAuction(e){var t,n,i,r;let o;By.debug(`Finding floor version for auction [adunit=${e.adUnitCodes}, auction=${e}]`);for(const s of e.bidderRequests)for(const a of s.bids)if(a.getFloor){const s=Ol[e.auctionId];if((null===(t=null==s?void 0:s.data)||void 0===t?void 0:t.floorProvider)&&(null===(n=null==s?void 0:s.data)||void 0===n?void 0:n.modelVersion)&&(o=`${s.data.floorProvider}_${s.data.modelVersion}`),o)return{floor:null!==(r=null===(i=a.getFloor({currency:"EUR"}))||void 0===i?void 0:i.floor)&&void 0!==r?r:0,version:o}}return{floor:void 0,version:void 0}}onAuctionInit(e){var t;if(!(null===(t=this.state)||void 0===t?void 0:t.isAuctionNew(e.auctionId)))return void By.error(`Auction already running ${e.auctionId}`);if(0===e.adUnits.length)return void By.error("Auction without adunit");const n=this.getFloorFromAuction(e);e.adUnitCodes.forEach((t=>{e.adUnits.forEach((i=>{var r,o;if(i.code===t){const s=null===(r=this.state)||void 0===r?void 0:r.findAuctionsByAdUnitId(t).filter((t=>t.prebidAuctionId!==e.auctionId));null===(o=this.state)||void 0===o||o.setAuction({auctionId:e.auctionId+t,prebidAuctionId:e.auctionId,adUnit:{code:i.id,id:i.code,slmadsId:i.slmadsId},sizes:[...V(i.sizes)],refresh:void 0!==s&&s.length>0,refreshCount:void 0!==s?s.length:0,floor:n.floor,floorVersion:n.version})}}))}))}onBidRequest(e){e.bids.forEach((t=>{var n,i;const r=new Set;let o;Object.keys(t.mediaTypes).forEach((e=>{const n=t.mediaTypes[e].sizes;n&&[...V(n,e)].forEach(r.add,r)})),"function"==typeof t.getFloor&&(o=(null===(n=t.getFloor({currency:"EUR"}))||void 0===n?void 0:n.floor)||void 0,o&&-1!==Object.keys(this.bidderCpmAdjustment).indexOf(t.bidder)&&(o=Math.round(this.bidderCpmAdjustment[t.bidder].bidCpmAdjustment(o))));const s={auctionId:e.auctionId+t.adUnitCode,bidId:t.bidId,bidderCode:t.bidder,size:[...r],floor:o,floorVersion:t.floorData&&t.floorData.floorProvider&&t.floorData.modelVersion?`${t.floorData.floorProvider}_${t.floorData.modelVersion}`:void 0};(null===(i=this.state)||void 0===i?void 0:i.isAuctionRunning(s.auctionId||""))&&(s.state=oe,this.state.setBid(s))}))}onBidResponse(e){var t,n,i,r,o,s;this.bidIdByAdUnitId.set(e.adId,e.requestId);const a=null===(t=this.state)||void 0===t?void 0:t.getBid(e.requestId);a&&(null===(n=this.state)||void 0===n?void 0:n.isAuctionRunning(a.auctionId))&&(a.state=e.status===ie?ie:ne,a.cpm=e.status===ie&&(null===(i=e.floorData)||void 0===i?void 0:i.cpmAfterAdjustments)||e.cpm,a.size=V(e.size,e.mediaType),a.floor=(null===(r=e.floorData)||void 0===r?void 0:r.floorRuleValue)||void 0,this.state.setBid(a)),a&&(null===(o=this.state)||void 0===o?void 0:o.isAuctionDone(e.auctionId))&&(a.state===se?(a.cpm=e.cpm,a.size=V(e.size,e.mediaType),a.floor=(null===(s=e.floorData)||void 0===s?void 0:s.floorRuleValue)||void 0,this.state.setBid(a)):(By.warn(`Expected bid state to be equal to ${se}`,e),By.error("Cannot store bid response because the bid was not considered timeout")))}onBidTimeout(e){e.length>0&&e.forEach((e=>{this.bidTimeout(e.bidId)}))}onNoBid(e){var t,n,i;const r=null===(t=this.state)||void 0===t?void 0:t.getBid(e.bidId);if(!r)return;const o=null===(n=this.state)||void 0===n?void 0:n.getAuction(r.auctionId);if(o&&(null===(i=this.state)||void 0===i?void 0:i.isAuctionRunning(o.auctionId))){if(r.state===ne)return void By.warn("Cannot store no bid because bid is already bid response");r.state===oe&&(r.state=re,this.state.setBid(r))}}onAuctionEnd(e){e.adUnitCodes.forEach((t=>{this.auctionDone(e.auctionId+t,400)}))}onBidWon(e){if(this.bidIdByAdUnitId.has(e.adId)){const t=this.bidIdByAdUnitId.get(e.adId),n=V(e.size,e.mediaType);this.impression(t||"",n,e.mediaType)}}onImpressionViewable(e){var t,n;const i=null===(t=this.state)||void 0===t?void 0:t.findAuctionsByAdUnitId(e.adUnitCode);if(void 0===i||0===i.length)return;const r=i[i.length-1],o={auctionId:"",bidId:"",size:"",bidderCode:""};e.bid?(o.bidderCode=null!==(n=e.bid.bidder)&&void 0!==n?n:e.bid.bidderCode,o.cpm=parseFloat((e.bid.cpm||0).toString()),o.size=Array.isArray(e.bid.size)?e.bid.size[0]:e.bid.size,o.floor=e.bid.floor,o.floorVersion=e.bid.floorVersion,o.mediaType=e.bid.mediaType):e.isGoogle&&(o.bidderCode=e.google.bidderCode,o.floor=e.google.floor);const s=this.formatImpression(r,o,this.siteId,this.consentType,"viewable_impression");s&&s.bidderCode&&s.bidderCode!==Py?this.impressionsLogger.batchThenSend(s):By.error("Can't send viewable impression event, couldn't find a matching bidderCode")}onVideoImpression(e){var t,n;const i=null===(t=this.state)||void 0===t?void 0:t.findAuctionsByAdUnitId(null!==(n=e.adUnit)&&void 0!==n?n:"");if(i&&i.length>0){const t=i[i.length-1],n=this.formatImpression(t,e,this.siteId,this.consentType);n&&n.bidderCode!==Py&&this.impressionsLogger.batchThenSend(n)}}onEvent(e,t){switch(e){case te.AUCTION_INIT:this.onAuctionInit(t);break;case te.BID_REQUESTED:this.onBidRequest(t);break;case te.BID_RESPONSE:this.onBidResponse(t);break;case te.BID_TIMEOUT:this.onBidTimeout(t);break;case te.NO_BID:this.onNoBid(t);break;case te.AUCTION_END:this.onAuctionEnd(t);break;case te.BID_WON:this.onBidWon(t);break;case"impressionViewable":this.onImpressionViewable(t);break;case"videoImpression":this.onVideoImpression(t)}}initEventListeners(){document.addEventListener("impressionViewable",(e=>{try{this.onEvent("impressionViewable",e.detail)}catch(t){By.error(t)}})),document.addEventListener("videoImpression",(e=>{try{this.onEvent("videoImpression",e.detail)}catch(t){By.error(t)}})),window.slmpbjs=window.slmpbjs||{},window.slmpbjs.que=window.slmpbjs.que||[],window.slmpbjs.que.push((()=>{window.slmpbjs.getEvents().forEach((e=>{try{this.onEvent(e.eventType,e.args)}catch(t){By.error(t)}})),Object.values(te).forEach((e=>{window.slmpbjs.onEvent(e,(t=>{try{this.onEvent(e,t)}catch(n){By.error(n)}}))}))})),window.googletag=window.googletag||{cmd:[]},window.googletag.cmd.push((()=>{window.googletag.pubads().addEventListener("slotRenderEnded",(e=>{var t;let n,i;const r=e.slot.getTargeting("slm_floor");if(r.length>0&&(i=parseFloat(r[0])),!e.isEmpty){const r=_b(e.slot.getResponseInformation()),o=e.slot.getSlotElementId(),s=null===(t=this.state)||void 0===t?void 0:t.findAuctionsByAdUnitId(o);if(r&&s&&s.length>0&&(n={bidderCode:r,adUnit:e.slot.getAdUnitPath(),size:"",floor:i,auctionId:"",bidId:""},n.bidderCode&&-1===["prebid","unknown"].indexOf(n.bidderCode)&&s&&s.length>0)){const e=s[s.length-1],t=this.formatImpression(e,n,this.siteId,this.consentType);t&&t.bidderCode&&t.bidderCode!==Py&&(By.info("Logging impression",n),this.impressionsLogger.batchThenSend(t))}}}))}))}};const jy=new H("Mosaik");new class{constructor(){this.rendered=!1,this.container=null,this.containerId=null,q.before("addAdUnit",(e=>{var t,n,i,r;if("mosaik"===e.adUnit.type){e.adUnit.bids=null===(t=e.adUnit.bids)||void 0===t?void 0:t.filter((e=>"missena"!==e.bidder&&"teads"!==e.bidder)),wt(e.adUnit,"params.partners.adExchange.enabled",!1),wt(e.adUnit,"params.gamMode","forbidden");for(let t=1;t<=4;t+=1){const o=ct(e.adUnit);o.id=`${e.adUnit.id}_${t}`,o.type="bannervideo",null===(r=null===(i=null===(n=window.slmadshb)||void 0===n?void 0:n.setup)||void 0===i?void 0:i.adUnits)||void 0===r||r.push(o),ge.adUnits.set(o.id,o)}e.adUnit.bids=void 0,this.render(e.adUnit)}}))}render(e){var t,n,i,r,o,s,a,d,l,c;if(this.containerId=e.id,this.container=document.getElementById(e.id),!this.container)throw new Error("Mosaik container not found");const u={adUnitId:this.containerId,position:null!==(i=null===(n=null===(t=e.params)||void 0===t?void 0:t.sticky)||void 0===n?void 0:n.position)&&void 0!==i?i:"bottom-right",yOffset:null!==(s=null===(o=null===(r=e.params)||void 0===r?void 0:r.sticky)||void 0===o?void 0:o.yOffset)&&void 0!==s?s:"0",scaleStyle:""};let p;(null===(d=null===(a=null==e?void 0:e.params)||void 0===a?void 0:a.sticky)||void 0===d?void 0:d.scale)&&(p=Math.min(Math.max(.5,e.params.sticky.scale),1.5)),1!==p&&(u.scaleStyle=`\n transform: scale(${p});\n webkitTransform: ${p};\n MozTransform: ${p};\n `,u.position.indexOf("-")?u.scaleStyle+=` transform-origin: ${u.position.replace("-"," ")};`:u.scaleStyle+=` transform-origin: ${u.position};`),this.container.innerHTML=Vh.render('<style>\n .akcelo-mosaik {\n position: fixed;\n <% if (position?.includes("left")) {%> left: 0;\n <% } else {%>\n right: 0;\n <% } %><% if (position?.includes("top")) {%> top: <%= yOffset %>px;\n <% } else {%> bottom: <%= yOffset %>px;\n <% } %>\n width: 300px;\n height: 250px;\n display: flex;\n flex-direction: column;\n margin-right: 10px;\n margin-bottom: 10px;\n z-index: 10000;\n <% if (typeof scaleStyle !== \'undefined\') {%>\n <%= scaleStyle %>\n <% } %>\n }\n\n .akcelo-mosaik-row {\n display: flex;\n position: relative;\n flex-direction: row;\n width: 100%;\n height: 50%;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n }\n\n .akcelo-mosaik-cell {\n display: flex;\n position: absolute !important;\n top: 0;\n transform: scale(0.5);\n transform-origin: top left;\n width: 300px;\n max-width: 300px !important;\n height: 250px !important;\n max-height: 250px !important;\n /*\n background: url(\'https://ads.sportslocalmedia.com/akcelo_icon.svg\') no-repeat center;\n background-size: cover;\n */\n background: rgba(0, 0, 0, 0.7);\n }\n\n .akcelo-mosaik-cell:nth-child(1) {\n left: 0;\n }\n\n .akcelo-mosaik-cell:nth-child(2) {\n left: 50%;\n }\n\n .akcelo-mosaik-close {\n position: absolute;\n width: 70px;\n height: 70px;\n display: flex;\n align-items: start;\n justify-content: end;\n cursor: pointer;\n\n top: -25px;\n right: 0;\n left: auto;\n bottom: auto;\n }\n\n .akcelo-mosaik-close.top-right {\n top: -25px;\n right: 0;\n left: auto;\n bottom: auto;\n }\n\n .akcelo-mosaik-close.top-left {\n top: -25px;\n left: -50px;\n right: auto;\n bottom: auto;\n }\n\n .akcelo-mosaik-close.bottom-right {\n bottom: -75px;\n right: 0;\n left: auto;\n top: auto;\n }\n\n .akcelo-mosaik-close.bottom-left {\n bottom: -75px;\n left: -50px;\n right: auto;\n top: auto;\n }\n</style>\n<div class="akcelo-mosaik">\n <div class="akcelo-mosaik-row">\n <div class="akcelo-mosaik-cell" id="<%= adUnitId %>_1"></div>\n <div class="akcelo-mosaik-cell" id="<%= adUnitId %>_2"></div>\n </div>\n <div class="akcelo-mosaik-row">\n <div class="akcelo-mosaik-cell" id="<%= adUnitId %>_3"></div>\n <div class="akcelo-mosaik-cell" id="<%= adUnitId %>_4"></div>\n </div>\n <div class="akcelo-mosaik-close">\n <svg xmlns="http://www.w3.org/2000/svg"\n xml:space="preserve" width="20" height="20" version="1.1"\n viewBox="0 0 20 20"\n style="cursor:pointer;position:relative;display:inline;width:20px;margin-bottom:0;">\n <g transform="matrix(0.0569703,0,0,0.0569703,-4.6066465,-4.6398328)">\n <circle style="fill:#373737;fill-opacity:1;stroke-width:18.90076828"\n cx="258.31042" cy="257.79587" r="161.54251"/>\n <path style="fill:#fffffd;fill-opacity:1;stroke-width:0.6150254"\n d="m 169.41211,156.49219 c -10.496,0.0497 -17.51765,14.20672 -9.88477,22.04101 7.85367,8.42001 16.59855,15.99758 24.44716,24.46542 18.54871,18.54359 37.07296,37.11162 55.62902,55.64786 -27.35069,28.13628 -56.58081,54.64717 -82.52735,84.03321 -4.80727,10.6808 9.79299,23.17713 19.35156,15.85937 11.18603,-9.25489 20.38437,-20.64133 31.12591,-30.40129 16.93264,-16.93265 33.86528,-33.86529 50.79792,-50.79793 28.1346,27.34154 54.64725,56.59829 84.05469,82.53907 10.67333,4.77287 23.14434,-9.80942 15.8418,-19.35547 -9.25182,-11.19086 -20.6499,-20.38132 -30.40521,-31.12982 -16.93264,-16.93264 -33.86528,-33.86528 -50.79792,-50.79792 27.30512,-27.92294 56.11138,-54.51613 82.27539,-83.52148 5.21946,-10.52229 -8.42434,-23.47032 -18.50586,-16.69531 -7.93114,4.84596 -12.68507,13.31658 -19.97314,18.98074 -20.84814,20.84691 -41.69629,41.69383 -62.54443,62.54074 -28.17478,-27.33485 -54.61388,-56.67303 -84.11719,-82.51562 -1.50233,-0.63096 -3.13851,-0.93953 -4.76758,-0.89258 z"/>\n </g>\n </svg>\n </div>\n</div>\n',u),this.container.style.display="none";const m=this.container.querySelector(".akcelo-mosaik-close");if(m){(null===(c=null===(l=e.params)||void 0===l?void 0:l.sticky)||void 0===c?void 0:c.closeButtonPosition)&&m.classList.add(e.params.sticky.closeButtonPosition),m.onclick=()=>{this.destroy()};for(let e=1;e<=4;e+=1)window.slmadshb.que.push((()=>{window.slmadshb.display(`${this.containerId}_${e}`)})),Pb(`${this.containerId}_${e}`,(e=>{this.rendered||(jy.info("Showing Mosaïk ad"),this.container.style.display="block",this.rendered=!0)}))}else this.destroy()}destroy(){if(jy.info("Destroying Mosaik container"),this.container){const e=this.container.parentElement;(null==e?void 0:e.classList.contains("akcelo-wrapper"))?e.remove():this.container.remove()}for(let e=1;e<=4;e+=1)we(`${this.containerId}_${e}`).then((()=>{jy.debug(`Removed Mosaik cell ${this.containerId}_${e}`)}))}};class Ny{shouldBreak(e,t){var n,i,r;const o=null===(r=null===(i=null===(n=t.params)||void 0===n?void 0:n.partners)||void 0===i?void 0:i.adExchange)||void 0===r?void 0:r.circuitBreakers;return!!(o&&Object.keys(o).includes(this.getName())&&o[this.getName()])&&this._shouldBreak(e,t)}}class qy extends Ny{getName(){return"cpm"}_shouldBreak(e,t){const n=window.slmpbjs.getHighestCpmBids(e);return!!(n&&n.length>0&&n[0].cpm)&&n[0].cpm>this.getCPA(t.slmadsId)}getCPA(e){var t,n,i;return null!==(i=null===(n=null===(t=ge.config.params.google)||void 0===t?void 0:t.cpas)||void 0===n?void 0:n[e])&&void 0!==i?i:5}}class $y extends Ny{constructor(){super(),this.adUnitsHasUnfilledImpressions=new Map,window.googletag=window.googletag||{},window.googletag.cmd=window.googletag.cmd||[],window.googletag.cmd.push((()=>{window.googletag.pubads().addEventListener("slotRenderEnded",(e=>{var t;const n=null===(t=e.slot)||void 0===t?void 0:t.getSlotElementId();n&&e.isEmpty&&this.adUnitsHasUnfilledImpressions.set(n,!0)}))}))}getName(){return"noBid"}_shouldBreak(e,t){return!!this.adUnitsHasUnfilledImpressions.get(e)}}class Fy extends Ny{getName(){return"visible"}_shouldBreak(e,t){const n=document.getElementById(e);return!!n&&!((e,t=0)=>{const n=e.getBoundingClientRect();return n.top+t>=0&&n.left+t>=0&&n.bottom-t<=(window.innerHeight||document.documentElement.clientHeight)&&n.right-t<=(window.innerWidth||document.documentElement.clientWidth)})(n,0)}}class My extends Ny{constructor(){super(...arguments),this.BLACKLISTED_COUNTRIES=["AD","AL","AM","AZ","BA","BD","BF","BG","BI","BJ","BL","BO","BW","BY","CD","CF","CG","CI","CL","CM","CN","CO","CR","CV","CY","DJ","DO","DZ","EC","EG","EH","ET","GA","GF","GH","GM","GP","GQ","GR","GT","GW","HN","HT","ID","IL","IQ","IS","JM","JO","KE","KG","KH","KM","KZ","LA","LB","LK","LS","LY","MA","MD","MF","MG","MK","ML","MM","MQ","MR","MT","MU","MW","NA","NC","NE","NG","NI","NP","OM","PA","PF","PK","PM","PS","PY","RE","RU","RW","SC","SN","SO","SR","SV","TD","TG","TN","TT","TZ","UG","UY","VE","VN","XK","YE","YT"]}getName(){return"blacklistedCountry"}_shouldBreak(e,t){var n,i;return!(!(null===(n=window.slmadshb.context)||void 0===n?void 0:n.countryCode)||!(null===(i=this.BLACKLISTED_COUNTRIES)||void 0===i?void 0:i.includes(window.slmadshb.context.countryCode)))}}class zy extends Ny{getName(){return"blacklistedAdUnit"}_shouldBreak(e,t){var n,i;const r=null===(i=null===(n=ge.config.params.google)||void 0===n?void 0:n.cpas)||void 0===i?void 0:i[t.slmadsId];return void 0!==r&&r<=0}}var Ly=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{d(i.next(e))}catch(t){o(t)}}function a(e){try{d(i.throw(e))}catch(t){o(t)}}function d(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}d((i=i.apply(e,t||[])).next())}))};const Vy=new H("Google Circuit Breaker");new class{constructor(){this.circuitBreakers=[new $y,new zy,new My,new Fy,new qy],this.originalGamModes=new Map,Vy.info("Module initialization"),q.before("adRequest",(e=>Ly(this,void 0,void 0,(function*(){e.ids.forEach((e=>{var t,n;const i=$.state.adUnits[e],r=null===(t=ge.config.adUnits)||void 0===t?void 0:t.find((e=>e.id===(null==i?void 0:i.ref)));if(!r)return;if(this.originalGamModes.has(r.slmadsId)||this.originalGamModes.set(r.slmadsId,null===(n=r.params)||void 0===n?void 0:n.gamMode),r.params=r.params||{},"forbidden"===this.originalGamModes.get(r.slmadsId))return r.params.gamMode="forbidden",void Vy.info(`Google disabled on ${e} [reason=forbidden]`);const o=this.circuitBreakers.find((t=>t.shouldBreak(e,r)));o?(r.params.gamMode="forbidden",Vy.info(`Google disabled on ${e} [reason=${o.getName()}]`)):(r.params.gamMode="allowed",Vy.info(`Google enabled on ${e}`))}))}))))}};const Wy=new H("Carousel Prebid Renderer");new class extends vb{constructor(){super(...arguments),this.priority=9,this.limit=3,this.refreshDuration=6,this.slideIntervals=new Map}canRender(e){var t;const n=ge.getAdUnitConfigByHtmlId(e);if("carousel"!==(null==n?void 0:n.type)&&"sticky"!==(null==n?void 0:n.type))return!1;if(n.id.includes("Missena"))return!1;const i=this.getBids(e);if(i.length>=2){if(this.isCarouselApplicable(i[0])&&this.getCarouselBids(i).length>=2)return!0;if(!this.isCarouselApplicable(i[0])){return this.getCarouselBids(i).reduce(((e,t)=>{var n;return e+(null!==(n=t.cpm)&&void 0!==n?n:0)}),0)>(null!==(t=i[0].cpm)&&void 0!==t?t:0)}}return!1}renderAds(e){Wy.info("Render Ads",e),e.forEach((e=>{this.renderAd(e)}))}renderAd(e){var t,n,i,r,o,s,a;const d=this.getCarouselBids(this.getBids(e));Wy.info("Rendering Carousel ad",e,d);const l=document.getElementById(e);if(!l)return;const c=ge.getAdUnitConfigByHtmlId(e);if(!c)return;window.clearInterval(this.slideIntervals.get(e)),l.innerHTML=Vh.render('<style>\n .akcelo-carousel {\n position: relative;\n width: 100%;\n display: flex;\n align-items: center;\n overflow: hidden;\n }\n\n .akcelo-carousel > .akcelo-carousel-progress {\n position: absolute;\n top: 0;\n left: 50%;\n transform: translateX(-50%);\n width: 100%;\n max-width: 300px;\n height: 4px !important;\n\n padding-left: 1px;\n padding-right: 2px;\n\n display: flex;\n gap: 2px;\n z-index: 1;\n }\n\n .akcelo-carousel > .akcelo-carousel-progress > .akcelo-carousel-progress-cell {\n position: relative;\n border-radius: 3px;\n flex: 1;\n background: #A5A5A5;\n }\n\n .akcelo-carousel > .akcelo-carousel-progress > .akcelo-carousel-progress-cell.active::before {\n content: "";\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n background-color: white;\n animation: progress <%= refreshDuration %>s linear forwards;\n }\n\n .akcelo-carousel > .akcelo-carousel-slides {\n position: relative;\n width: 100%;\n height: 100%;\n }\n\n .akcelo-carousel .akcelo-carousel-slide {\n width: 100%;\n height: 100%;\n transform: translateX(100%);\n position: absolute;\n top: 0;\n left: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n .akcelo-carousel .akcelo-carousel-slide.active {\n transform: translateX(0%);\n }\n\n @keyframes progress {\n from {\n width: 0;\n }\n to {\n width: 100%;\n }\n }\n</style>\n<div class="akcelo-carousel">\n <div class="akcelo-carousel-progress">\n <% for (let i = 0; i < bidsLength; i++) { %>\n <div class="akcelo-carousel-progress-cell"></div>\n <% } %>\n </div>\n <div class="akcelo-carousel-slides">\n <% for (let i = 0; i < bidsLength; i++) { %>\n <div class="akcelo-carousel-slide"></div>\n <% } %>\n </div>\n</div>',{bidsLength:d.length,refreshDuration:this.refreshDuration}),l.style.height="";const u=l.querySelector(".akcelo-carousel");if(!u)return;null===(t=window.slmadshb.refresh)||void 0===t||t.disableAdUnitRefresh(e),setTimeout((()=>{var t;null===(t=window.slmadshb.refresh)||void 0===t||t.enableAdUnitRefresh(e,performance.now())}),d.length*this.refreshDuration*1e3);const p=null!==(r=null!==(n=this.getMaxWidth(c))&&void 0!==n?n:null===(i=l.parentElement)||void 0===i?void 0:i.offsetWidth)&&void 0!==r?r:300,m=null!==(a=null!==(o=this.getMaxHeight(c))&&void 0!==o?o:null===(s=l.parentElement)||void 0===s?void 0:s.clientHeight)&&void 0!==a?a:270;u.style.minWidth=`${p}px`,u.style.height=`${m}px`;let f=0;this.slideTo(u,f,d,p,m),this.slideIntervals.set(e,window.setInterval((()=>{!1!==window.continueInterval&&(f=(f+1)%d.length,this.slideTo(u,f,d,p,m))}),1e3*this.refreshDuration))}slideTo(e,t,n,i,r){var o;const s=n.length>t?n[t]:null;if(!s)return;const a=e.querySelectorAll(".akcelo-carousel-slide");if(a.length>t&&!a[t].querySelector("iframe")){const e=a[t];e.style.minWidth=`${i}px`;const n={hb_adid:s.adId,pubUrl:window.location.href,hb_pb:s.cpm,hb_format:s.mediaType},[d,l]=this.getBidSize(s,i,r),c=G(d.toString(),l.toString());if(c.id=s.adId||"",c.style.setProperty("width",`${d}px`,"important"),c.style.setProperty("maxWidth",`${i}px`,"important"),c.setAttribute("sandbox","allow-forms allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation"),e.appendChild(c),null===(o=c.contentWindow)||void 0===o?void 0:o.document)if("banner"===s.mediaType&&n.hb_adid)window.slmpbjs.renderAd(c.contentWindow.document,n.hb_adid);else{const e=Vh.render(hb,n);c.contentWindow.document.write(e),c.contentWindow.document.close()}}setTimeout((()=>{a.forEach(((e,n)=>{n===t?e.classList.add("active"):e.classList.remove("active")}));e.querySelectorAll(".akcelo-carousel-progress-cell").forEach(((e,n)=>{n===t?e.classList.add("active"):e.classList.remove("active")}))}),0===t?1:500)}getCarouselBids(e){return e.filter((e=>this.isCarouselApplicable(e))).slice(0,this.limit)}getBids(e){return Ko.getAllBidsForAdUnitCode(e).filter(cc).sort(((e,t)=>{var n,i;return(null!==(n=t.cpm)&&void 0!==n?n:0)-(null!==(i=e.cpm)&&void 0!==i?i:0)}))}isCarouselApplicable(e){var t;return(null!==(t=e.cpm)&&void 0!==t?t:0)>0&&("banner"===e.mediaType||"native"===e.mediaType)&&!K.includes(e.bidderCode)&&"richaudience"!==e.bidderCode}getBidSize(e,t,n){var i,r;return"banner"===e.mediaType?[null!==(i=e.width)&&void 0!==i?i:0,null!==(r=e.height)&&void 0!==r?r:0]:[t,n]}getMaxWidth(e){return e.mediaTypes.banner?Math.max(...e.mediaTypes.banner.sizes.map((e=>e[0]))):null}getMaxHeight(e){return e.mediaTypes.banner?Math.max(...e.mediaTypes.banner.sizes.map((e=>e[1]))):null}};const Gy=document.createElement("script");Gy.type="text/javascript",Gy.src="https://btloader.com/tag?o=5094764668518400&upapi=true",document.head.appendChild(Gy);const Hy={adUnits:[{bids:[{bidder:"rubicon",params:{accountId:"9528",mediaType:"BANNER",position:"atf",siteId:389968,sizes:[2],zoneId:2176496}},{bidder:"criteo",params:{mediaType:"BANNER",networkId:"6917",publisherSubId:"5839"}},{bidder:"smartadserver",params:{domain:"https://www3.smartadserver.com",formatId:37584,mediaType:"BANNER",pageId:1473712,siteId:466230,target:"slmadsId=4052"}},{bidder:"pubmatic",params:{adSlot:"4067949",mediaType:"BANNER",publisherId:"159275"}},{bidder:"adagio",params:{adUnitElementId:"Forumfree_ATF_728x90",organizationId:"1075",placement:"4052",site:"Forumfree"}},{bidder:"onetag",params:{ext:{placement_name:"4052"},pubId:"64b1d8aba9df31e"}},{bidder:"outbrain",params:{publisher:{id:"00e00c9618dc0513ce33e78182853bfd54"},tagid:"ATF-3/Forumfree_ATF_728x90"}},{bidder:"medianet",params:{cid:"8CUSSC604",crid:216215486}}],device:"desktop",id:"Forumfree_ATF_728x90",mediaTypes:{banner:{sizes:[[728,90]]}},ortb2Imp:{ext:{data:{divId:"Forumfree_ATF_728x90",placement:"4052"}}},params:{},sizes:[[728,90]],slmadsId:4052,type:"carousel"},{bids:[{bidder:"rubicon",params:{accountId:"9528",mediaType:"BANNER",position:"atf",siteId:389968,sizes:[15],zoneId:2176498}},{bidder:"criteo",params:{mediaType:"BANNER",networkId:"6917",publisherSubId:"5840"}},{bidder:"smartadserver",params:{domain:"https://www3.smartadserver.com",formatId:37238,mediaType:"BANNER",pageId:1473713,siteId:466230,target:"slmadsId=4053"}},{bidder:"pubmatic",params:{adSlot:"4067950",mediaType:"BANNER",publisherId:"159275"}},{bidder:"adagio",params:{adUnitElementId:"Forumfreemobile_ATF_300x250",organizationId:"1075",placement:"4053",site:"Forumfree"}},{bidder:"amx",params:{adUnitId:"4053",tagId:"YWtjZWxvLXJvbi5pbw"}},{bidder:"onetag",params:{ext:{placement_name:"4053"},pubId:"64b1d8aba9df31e"}},{bidder:"outbrain",params:{publisher:{id:"00e00c9618dc0513ce33e78182853bfd54"},tagid:"ATF-2/Forumfreemobile_ATF_300x250"}},{bidder:"medianet",params:{cid:"8CUSSC604",crid:432392059}}],device:"mobile",id:"Forumfreemobile_ATF_300x250",mediaTypes:{banner:{sizes:[[300,250]]}},ortb2Imp:{ext:{data:{divId:"Forumfreemobile_ATF_300x250",placement:"4053"}}},params:{},sizes:[[300,250]],slmadsId:4053,type:"carousel"},{adUnitPath:"/4490027/Forumfree_CornerVideo",bids:[{bidder:"rubicon",params:{accountId:"9528",mediaType:"VIDEO",siteId:389968,video:{context:"instream",playerSize:[[640,480]]},zoneId:2231848}},{bidder:"criteo",params:{mediaType:"VIDEO",networkId:"6917",publisherSubId:"7898"}},{bidder:"smartadserver",params:{domain:"https://prg.smartadserver.com",formatId:42329,mediaType:"VIDEO",pageId:1473712,siteId:466230,target:"slmadsId=4058",video:{protocol:8,startDelay:1}}},{bidder:"pubmatic",params:{adSlot:"4069229",mediaType:"VIDEO",publisherId:"159275",video:{api:[1,2,3,5],linearity:1,maxduration:90,mimes:["video/mp4","video/wmv","video/H264","video/webm","application/javascript","video/ogg","video/3gpp","video/quicktime","video/mpeg","application/x-mpegurl"],minduration:1,placement:1,playbackmethod:[2],protocols:[2,3,5,6,7,8]}}},{bidder:"adagio",params:{adUnitElementId:"Forumfree_CornerVideo",organizationId:"1075",placement:"4058",site:"Forumfree"}},{bidder:"amx",params:{adUnitId:"4058",tagId:"YWtjZWxvLXJvbi5pbw"}},{bidder:"seedtag",params:{adUnitId:"30496141",placement:"inStream",publisherId:"1801-7675-01"}},{bidder:"onetag",params:{ext:{placement_name:"4058"},pubId:"64b1d8aba9df31e"}},{bidder:"medianet",params:{cid:"8CUSSC604",crid:878440487}},{bidder:"richaudience",params:{mediaType:"VIDEO",pid:"wjMXoEc75l",supplyType:"site"}}],device:"desktop",id:"Forumfree_CornerVideo",mediaTypes:{video:{api:[2],context:"instream",h:480,linearity:1,maxbitrate:5e3,maxduration:60,mimes:["video/mp4","video/x-ms-wmv","application/javascript"],minbitrate:200,placement:1,playbackmethod:[2],playerSize:[[640,480]],plcmt:1,pos:1,protocols:[2,3,5,6],sizes:[[640,480]],skip:0,w:640}},ortb2Imp:{ext:{data:{divId:"Forumfree_CornerVideo",placement:"4058"},gpid:"/4490027/Forumfree_CornerVideo#Forumfree_CornerVideo"}},params:{partners:{amazon:{enabled:!0,videoSlot:"videoSlot1"},openBidding:{enabled:!1}},passbackCallback:()=>{const e=document.createElement("div");e.id="Forumfree_Sticky_Passback_Video",e.style.maxHeight="250px",document.body.appendChild(e),window.slmadshb.display(e.id)},refresh:{enabled:!0,timeout:1e3},video:{allowNoAd:!1,closeButtonMode:"ONLY_CONTENT",closeButtonPosition:"TOP_RIGHT",dailymotion:{playlistId:"x7dprd",refresh:{capping:5,enabled:!0},smartAutoplay:!0},mode:"CORNER",position:"BOTTOM_RIGHT"}},sizes:[[640,480]],slmadsId:4058,type:"video"},{adUnitPath:"/4490027/Forumfreemobile_CornerVideo",bids:[{bidder:"rubicon",params:{accountId:"9528",mediaType:"VIDEO",siteId:389968,video:{context:"instream",playerSize:[[640,480]]},zoneId:2231850}},{bidder:"criteo",params:{mediaType:"VIDEO",networkId:"6917",publisherSubId:"7897"}},{bidder:"smartadserver",params:{domain:"https://prg.smartadserver.com",formatId:42329,mediaType:"VIDEO",pageId:1473713,siteId:466230,target:"slmadsId=4059",video:{protocol:8,startDelay:1}}},{bidder:"pubmatic",params:{adSlot:"4069230",mediaType:"VIDEO",publisherId:"159275",video:{api:[1,2,3,5],linearity:1,maxduration:90,mimes:["video/mp4","video/wmv","video/H264","video/webm","application/javascript","video/ogg","video/3gpp","video/quicktime","video/mpeg","application/x-mpegurl"],minduration:1,placement:1,playbackmethod:[2],protocols:[2,3,5,6,7,8]}}},{bidder:"adagio",params:{adUnitElementId:"Forumfree_CornerVideo",organizationId:"1075",placement:"4059",site:"Forumfree"}},{bidder:"amx",params:{adUnitId:"4059",tagId:"YWtjZWxvLXJvbi5pbw"}},{bidder:"seedtag",params:{adUnitId:"30496143",placement:"inStream",publisherId:"1801-7675-01"}},{bidder:"onetag",params:{ext:{placement_name:"4059"},pubId:"64b1d8aba9df31e"}},{bidder:"medianet",params:{cid:"8CUSSC604",crid:714861400}},{bidder:"richaudience",params:{mediaType:"VIDEO",pid:"VyKJcvIajE",supplyType:"site"}}],device:"mobile",id:"Forumfree_CornerVideo",mediaTypes:{video:{api:[2],context:"instream",h:480,linearity:1,maxbitrate:5e3,maxduration:60,mimes:["video/mp4","video/x-ms-wmv","application/javascript"],minbitrate:200,placement:1,playbackmethod:[2],playerSize:[[640,480]],plcmt:1,pos:1,protocols:[2,3,5,6],sizes:[[640,480]],skip:0,w:640}},ortb2Imp:{ext:{data:{divId:"Forumfree_CornerVideo",placement:"4059"},gpid:"/4490027/Forumfreemobile_CornerVideo#Forumfree_CornerVideo"}},params:{partners:{amazon:{enabled:!0,videoSlot:"videoSlot2"},openBidding:{enabled:!1}},passbackCallback:()=>{const e=document.createElement("div");e.id="Forumfreemobile_Sticky",document.body.appendChild(e),window.slmadshb.display(e.id)},refresh:{enabled:!0,timeout:1e3},video:{allowNoAd:!1,closeButtonMode:"ONLY_CONTENT",closeButtonPosition:"TOP_RIGHT",dailymotion:{playlistId:"x7dprd",refresh:{capping:5,enabled:!0},smartAutoplay:!0},mode:"CORNER",position:"BOTTOM_RIGHT"}},sizes:[[640,480]],slmadsId:4059,type:"video"},{adUnitPath:"/4490027/Forumfree_Sticky_Passback_Video",bids:[{bidder:"rubicon",params:{accountId:"9528",mediaType:"BANNER",position:"atf",siteId:389968,sizes:[15],zoneId:2825918}},{bidder:"rubicon",params:{accountId:"9528",mediaType:"VIDEO",siteId:389968,video:{context:"outstream",playerSize:[[300,250]]},zoneId:2825918}},{bidder:"criteo",params:{mediaType:"BANNER",networkId:"6917",publisherSubId:"11660"}},{bidder:"criteo",params:{mediaType:"NATIVE",networkId:"6917",publisherSubId:"11661"}},{bidder:"criteo",params:{mediaType:"VIDEO",networkId:"6917",publisherSubId:"11662"}},{bidder:"smartadserver",params:{domain:"https://www3.smartadserver.com",formatId:37582,mediaType:"BANNER",pageId:1473712,siteId:466230,target:"slmadsId=7032"}},{bidder:"smartadserver",params:{domain:"https://prg.smartadserver.com",formatId:42330,mediaType:"VIDEO",pageId:1473712,siteId:466230,target:"slmadsId=7032",video:{protocol:8,startDelay:1}}},{bidder:"pubmatic",params:{adSlot:"5039724",mediaType:"BANNER",publisherId:"159275"}},{bidder:"pubmatic",params:{adSlot:"6230031",mediaType:"NATIVE",publisherId:"159275"}},{bidder:"pubmatic",params:{adSlot:"6230032",mediaType:"VIDEO",publisherId:"159275",video:{api:[1,2,3,5],linearity:1,maxduration:90,mimes:["video/mp4","video/wmv","video/H264","video/webm","application/javascript","video/ogg","video/3gpp","video/quicktime","video/mpeg","application/x-mpegurl"],minduration:1,placement:1,playbackmethod:[2],protocols:[2,3,5,6,7,8]}}},{bidder:"adagio",params:{adUnitElementId:"Forumfree_Sticky_Passback_Video",organizationId:"1075",placement:"7032",site:"Forumfree"}},{bidder:"amx",params:{adUnitId:"7032",tagId:"YWtjZWxvLXJvbi5pbw"}},{bidder:"seedtag",params:{adUnitId:"30496119",placement:"inScreen",publisherId:"1801-7675-01"}},{bidder:"onetag",params:{ext:{placement_name:"7032"},pubId:"64b1d8aba9df31e"}},{bidder:"onetag",params:{ext:{placement_name:"7032"},pubId:"64b1d8aba9df31e"}},{bidder:"onetag",params:{ext:{placement_name:"7032"},pubId:"64b1d8aba9df31e"}},{bidder:"outbrain",params:{publisher:{id:"00e00c9618dc0513ce33e78182853bfd54"},tagid:"BTF-3/Forumfree_Sticky_Passback_Video"}},{bidder:"medianet",params:{cid:"8CUSSC604",crid:432392059}},{bidder:"medianet",params:{cid:"8CUSSC604",crid:632515377}},{bidder:"richaudience",params:{mediaType:"BANNER",pid:"ecej78Llth",supplyType:"site"}},{bidder:"richaudience",params:{mediaType:"VIDEO",pid:"FyOJxWnhmW",supplyType:"site"}}],device:"desktop",id:"Forumfree_Sticky_Passback_Video",mediaTypes:{banner:{sizes:[[300,250]]},native:{ortb:{assets:[{id:0,img:{hmin:0,type:3,wmin:0},required:1},{id:1,required:1,title:{len:80}},{data:{type:1},id:2,required:0},{data:{type:2},id:3,required:0},{data:{type:11},id:4,required:0},{data:{type:12},id:5,required:0}],context:1,eventtrackers:[{event:1,methods:[1,2]}],plcmttype:2,ver:"1.2"},rendererUrl:"https://ads.sportslocalmedia.com/slm.native.render.300x250.js"},video:{api:[1,2],context:"outstream",h:250,linearity:2,maxbitrate:5e3,maxduration:60,mimes:["video/mp4","video/webm","video/ogg","application/javascript"],minbitrate:200,minduration:1,placement:5,playbackmethod:[2],playerSize:[[300,250]],plcmt:4,pos:1,protocols:[1,2,3,4,5,6,7,8],renderer:W(),sizes:[[300,250]],skip:0,w:300}},ortb2Imp:{ext:{data:{divId:"Forumfree_Sticky_Passback_Video",placement:"7032"},gpid:"/4490027/Forumfree_Sticky_Passback_Video#Forumfree_Sticky_Passback_Video"}},params:{gamMode:"a9only",partners:{amazon:{enabled:!0},openBidding:{enabled:!1}},refresh:{enabled:!0,timeout:6e3},sticky:{closeButtonPosition:"top-right",margin:20,position:"bottom-right",yOffset:0}},sizes:[[1,1],[300,250]],slmadsId:7032,type:"mosaik"},{adUnitPath:"/4490027/Forumfreemobile_Sticky",bids:[{bidder:"rubicon",params:{accountId:"9528",mediaType:"BANNER",position:"atf",siteId:389968,sizes:[43,117],zoneId:2836388}},{bidder:"rubicon",params:{accountId:"9528",mediaType:"NATIVE",position:"atf",siteId:389968,zoneId:2836388}},{bidder:"criteo",params:{mediaType:"BANNER",networkId:"6917",publisherSubId:"11908"}},{bidder:"criteo",params:{mediaType:"NATIVE",networkId:"6917",publisherSubId:"15738"}},{bidder:"criteo",params:{mediaType:"VIDEO",networkId:"6917",publisherSubId:"21966"}},{bidder:"smartadserver",params:{domain:"https://www3.smartadserver.com",formatId:37601,mediaType:"BANNER",pageId:1473713,siteId:466230,target:"slmadsId=7366"}},{bidder:"smartadserver",params:{domain:"https://www3.smartadserver.com",formatId:43100,mediaType:"BANNER",pageId:1473713,siteId:466230,target:"slmadsId=7366"}},{bidder:"pubmatic",params:{adSlot:"5539495",mediaType:"BANNER",publisherId:"159275"}},{bidder:"pubmatic",params:{adSlot:"5539496",mediaType:"NATIVE",publisherId:"159275"}},{bidder:"pubmatic",params:{adSlot:"6231470",mediaType:"VIDEO",publisherId:"159275",video:{api:[1,2,3,5],linearity:1,maxduration:90,mimes:["video/mp4","video/wmv","video/H264","video/webm","application/javascript","video/ogg","video/3gpp","video/quicktime","video/mpeg","application/x-mpegurl"],minduration:1,placement:1,playbackmethod:[2],protocols:[2,3,5,6,7,8]}}},{bidder:"adagio",params:{adUnitElementId:"Forumfreemobile_Sticky",organizationId:"1075",placement:"7366",site:"Forumfree"}},{bidder:"amx",params:{adUnitId:"7366",tagId:"YWtjZWxvLXJvbi5pbw"}},{bidder:"seedtag",params:{adUnitId:"30496121",placement:"inScreen",publisherId:"1801-7675-01"}},{bidder:"onetag",params:{ext:{placement_name:"7366"},pubId:"64b1d8aba9df31e"}},{bidder:"onetag",params:{ext:{placement_name:"7366"},pubId:"64b1d8aba9df31e"}},{bidder:"onetag",params:{ext:{placement_name:"7366"},pubId:"64b1d8aba9df31e"}},{bidder:"outbrain",params:{publisher:{id:"00e00c9618dc0513ce33e78182853bfd54"},tagid:"BTF-2/Forumfreemobile_Sticky"}},{bidder:"medianet",params:{cid:"8CUSSC604",crid:804524803}},{bidder:"medianet",params:{cid:"8CUSSC604",crid:410840444}},{bidder:"medianet",params:{cid:"8CUSSC604",crid:650322472}}],device:"mobile",id:"Forumfreemobile_Sticky",mediaTypes:{banner:{sizes:[[320,50],[320,100]]},native:{ortb:{assets:[{id:0,img:{hmin:0,type:3,wmin:0},required:1},{id:1,required:1,title:{len:80}},{data:{type:1},id:2,required:0},{data:{type:2},id:3,required:0},{data:{type:11},id:4,required:0},{data:{type:12},id:5,required:0}],context:1,eventtrackers:[{event:1,methods:[1,2]}],plcmttype:2,ver:"1.2"},rendererUrl:"https://ads.sportslocalmedia.com/slm.native.render.320x100.js"},video:{api:[1,2],context:"outstream",h:100,linearity:2,maxbitrate:5e3,maxduration:60,mimes:["video/mp4","video/webm","video/ogg","application/javascript"],minbitrate:200,minduration:1,placement:2,playbackmethod:[2],playerSize:[[177,100]],plcmt:4,pos:1,protocols:[1,2,3,4,5,6,7,8],renderer:W(),sizes:[[177,100]],skip:0,w:177}},ortb2Imp:{ext:{data:{divId:"Forumfreemobile_Sticky",placement:"7366"},gpid:"/4490027/Forumfreemobile_Sticky#Forumfreemobile_Sticky"}},params:{partners:{adExchange:{allowAtRefresh:!0,circuitBreakers:{blacklistedAdUnit:!0,blacklistedCountry:!0,cpm:!0,noBid:!0},enabled:!1},amazon:{enabled:!0},openBidding:{enabled:!1}},refresh:{enabled:!0,timeout:6e3},sticky:{autoScale:{maxHeight:100},fullWidth:!0}},sizes:[[320,50],[320,100]],slmadsId:7366,type:"sticky"}],params:{allowedDomains:["forumfree.it"],desktopParams:{floors:{auctionDelay:300,endpoint:{url:"https://floor.sportslocalmedia.com/forumfree-desktop.json"}},prebidTimeout:1500},gamMode:"a9only",mobileParams:{floors:{auctionDelay:300,endpoint:{url:"https://floor.sportslocalmedia.com/forumfree-mobile.json"}},prebidTimeout:1500},placeholder:{allowIcon:!0,allowWatermark:!0},refresh:{capping:12,enabled:!0,timeout:3e4,visibleTimeout:12e3},schain:{complete:1,nodes:[{asi:"spacefoot.com",hp:1,sid:"b58a1dd1-66e5-43dc-ac2d-57d8dcace5a3"}],ver:"1.0"},siteId:559}};window.slmadshb=window.slmadshb||{},window.slmadshb.que=window.slmadshb.que||[],window.slmadshb.setup=window.slmadshb.setup||Hy,window.slmadshb.onload=()=>Te(Hy);const Jy=new Map([["1800x1000","https://ads.sportslocalmedia.com/demo/1800x1000.jpg"],["970x250","https://ads.sportslocalmedia.com/demo/970x250.jpg"],["970x90","https://ads.sportslocalmedia.com/demo/970x90.jpg"],["728x90","https://ads.sportslocalmedia.com/demo/728x90.jpg"],["300x250","https://ads.sportslocalmedia.com/demo/300x250.jpg"],["300x600","https://ads.sportslocalmedia.com/demo/300x600.jpg"],["160x600","https://ads.sportslocalmedia.com/demo/300x600.jpg"],["320x100","https://ads.sportslocalmedia.com/demo/320x100.jpg"],["320x50","https://ads.sportslocalmedia.com/demo/320x50.jpg"],["320x480","https://ads.sportslocalmedia.com/demo/320x480.jpg"]]),Ky={code:"akcelo-demo",supportedMediaTypes:[Dr,Rr,Or],isBidRequestValid:()=>!0,buildRequests(e){const t={bids:[]};return e.forEach((e=>{const n=Object.keys(e.mediaTypes),i=n[Math.floor(Math.random()*n.length)],r={requestId:e.bidderRequestId,bidId:e.bidId,cpm:Math.random()+5,creativeId:Math.random().toString(36).substr(2,5),currency:"EUR",netRevenue:!0,ttl:300,adUnitCode:e.adUnitCode};if(i===Dr&&e.mediaTypes&&e.mediaTypes.banner){const{sizes:t}=e.mediaTypes.banner,n=t.sort(((e,t)=>t[0]*t[1]-e[0]*e[1]));for(let e=0;e<n.length;e++)if(Jy.has(`${n[e][0]}x${n[e][1]}`)){r.mediaType=Dr,r.width=n[e][0],r.height=n[e][1],r.player_height=n[e][0],r.player_width=n[e][1],1800===r.width&&1e3===r.height?r.ad='<a href="https://akcelo.io" target="_blank"><img style="filter: hue-rotate(140deg)" src="https://ads.sportslocalmedia.com/demo/1800x1000.jpg" width="1800" height="1000" /></a>':r.ad=Vh.render('<style>\n .demo-ad{\n height: <%=height%>px;\n width: <%=width%>px;\n background: linear-gradient(<%=hueRotate%>deg, #034154, #16b49b);\n color: white;\n font-weight: bold ;\n font-family: \'Arial\',serif;\n }\n .vertical-line{\n height: <%= height%>px;\n border-left: solid white 3px;\n margin-left: 15% ;\n position: absolute;\n }\n .horizontal-line{\n width: <%=width%>px;\n border-top: solid white 3px;\n bottom: 15% ;\n position: absolute;\n }\n .vertical-line::before, .vertical-line::after,\n .horizontal-line::before, .horizontal-line::after {\n content: "";\n display: block;\n position: absolute;\n background-color: white;\n border-radius: 50%;\n width: 15px;\n height: 15px;\n }\n .vertical-line::after, .vertical-line::before {\n left: -9px;\n }\n .vertical-line::after{\n bottom: 0;\n }\n .vertical-line::before {\n top: 0;\n }\n .horizontal-line::before, .horizontal-line::after {\n bottom: -6px;\n }\n .horizontal-line::before{\n left: 0;\n }\n .horizontal-line::after {\n bottom: -6px;\n right: 0;\n }\n .size-height {\n transform: rotate(-90deg);\n position: absolute;\n bottom: 30%;\n left: 13%;\n transform-origin: bottom left;\n }\n\n .size-width {\n position: absolute;\n bottom: 16%;\n left: 50%;\n transform: translateX(-50%);\n overflow: hidden;\n text-overflow: ellipsis;\n width: 100px;\n }\n .akcelo-logo{\n height: 40%;\n width: 40%;\n left: 50%;\n transform: translateX(-50%);\n top: 6%;\n position: absolute;\n filter: brightness(0) invert(1);\n }\n</style>\n<a href="https://akcelo.io" target="_blank">\n <div class="demo-ad">\n <img class="akcelo-logo" src="https://ads.sportslocalmedia.com/akcelo_logo.svg" alt="Logo Akcelo">\n <div class="vertical-line"></div>\n <div class="size-height"><%= height%> px</div>\n <div class="horizontal-line"></div>\n <div class="size-width"><%=width%> px</div>\n </div>\n</a>\n',{height:r.height,width:r.width,hueRotate:360*Math.random()});break}}else if(i===Rr&&e.mediaTypes&&e.mediaTypes.native)r.mediaType=Rr,r.width=1,r.height=1,r[Rr]={title:"Akcelo Prebid Native Creative",body:"This is a Prebid Native Creative. There are many like it, but this one is mine.",body2:void 0,cta:void 0,sponsoredBy:"Akcelo.io",privacyLink:void 0,address:void 0,clickUrl:"https://akcelo.io/fr/",displayUrl:void 0,clickTrackers:"https://akcelo.io/fr/",impressionTrackers:["data:,akcelo_fake_impression"],javascriptTrackers:void 0,image:{url:"https://ads.sportslocalmedia.com/demo/native-bg.jpg",height:900,width:1600}};else if(i===Or&&e.mediaTypes&&e.mediaTypes.video)switch(r.mediaType=Or,r.width=e.mediaTypes.video.playerSize[0][0],r.height=e.mediaTypes.video.playerSize[0][1],e.mediaTypes.video.context){case xr:r.vastUrl="https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dlinear&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=";break;case Sr:r.vastXml='<?xml version="1.0" encoding="UTF-8" ?>\n<VAST version="2.0">\n <Ad id="akcelo_video_demo">\n <InLine>\n <AdSystem version="1.0">Akcelo Video</AdSystem>\n <AdTitle><![CDATA[Demo Akcelo Video]]></AdTitle>\n <Creatives>\n <Creative sequence="1">\n <Linear>\n <Duration>00:00:24</Duration>\n <VideoClicks>\n <ClickThrough><![CDATA[https://akcelo.io]]></ClickThrough>\n </VideoClicks>\n <MediaFiles>\n <MediaFile delivery="progressive" width="640" height="480" type="video/mp4" scalable="true" maintainAspectRatio="false">\n <![CDATA[//ads.sportslocalmedia.com/demo/akcelo-video-demo.mp4]]>\n </MediaFile>\n </MediaFiles>\n </Linear>\n </Creative>\n </Creatives>\n </InLine>\n </Ad>\n</VAST>'}t.bids.push(r)})),{method:"GET",url:`data:text/plain;base64,${window.btoa(JSON.stringify(t))}`}},interpretResponse(e){const t=[];return e.body.bids.forEach((e=>{e.requestId=e.bidId,t.push(e)})),t},getUserSyncs:(e,t,n,i)=>[],onTimeout(e){},onBidWon(e){},onSetTargeting(e){},onBidderError({error:e,bidderRequest:t}){}};zs(Ky);const Xy=Object.freeze(Object.defineProperty({__proto__:null,spec:Ky},Symbol.toStringTag,{value:"Module"}))})); if ( window.slmadshb && window.slmadshb.setup && window.slmadshb.setup.desktop && window.slmadshb.setup.desktop.params ) { window.slmadshb.setup.desktop.params.floors = { data: {"floorProvider": "sam", "floorsSchemaVersion": 2, "currency": "EUR", "modelGroups": [{"modelWeight": 100, "modelVersion": "simple", "schema": {"fields": ["id"]}, "values": {"Forumfree_CornerVideo": 0.26, "Forumfree_Sticky_Passback_Video": 0.01}}]} }; } else if ( window.slmadshb && window.slmadshb.setup && window.slmadshb.setup.params && window.slmadshb.setup.params.desktopParams && window.slmadshb.setup.params.desktopParams.floors ) { window.slmadshb.setup.params.desktopParams.floors = { data: {"floorProvider": "sam", "floorsSchemaVersion": 2, "currency": "EUR", "modelGroups": [{"modelWeight": 100, "modelVersion": "simple", "schema": {"fields": ["id"]}, "values": {"Forumfree_CornerVideo": 0.26, "Forumfree_Sticky_Passback_Video": 0.01}}]} }; } if ( window.slmadshb && window.slmadshb.setup && window.slmadshb.setup.params ) { window.slmadshb.setup.params.contextTargeting = window.slmadshb.setup.params.contextTargeting || {}; window.slmadshb.setup.params.contextTargeting.pagesInfos = {"/": 12.0}; } if (window.slmadshb) { window.slmadshb.context = window.slmadshb.context || {}; window.slmadshb.context.countryCode = 'IT'; window.slmadshb.context.continentCode = 'EU'; window.slmadshb.context.regionCode = '25'; } if (window.slmadshb && window.slmadshb.setup && window.slmadshb.setup.params) { const adUnits = window.slmadshb.setup.desktop?.adUnits ?? window.slmadshb.setup.adUnits ?? []; window.slmadshb.setup.params.setupOverrides = window.slmadshb.setup.params.setupOverrides || []; const countriesToExclude = {"smartadserver":["MA","SN","CI","DZ","IN","TN","GA","MQ","RS","GP","TR","GR","PL","EG","IE","ID","AE","CG","BF","IL","UA","CO","PK","AL","TG","SA","ML","VN","DK","TH","JP","NZ","CZ","MK","MU","MG","BJ","HU","PH","BG","MC","IQ","HR","LB","KR","AO","DO","AD","MY","RU","SG","HK","SK","SI","HT","UY","CN","GF","TW","RW","KE","NG","BY","GT","LT","GH","QA","CR","CY","MZ","CF","JO","PF","VE","PA","TD","NE","EE","KW","HN","NC","ET","MT","LV","BA","LY","ME","LK","AZ","MR","MD","KH","UG","TZ","UZ","KZ","PY","MF","PR","BI","DJ","TT"]}; Object.keys(countriesToExclude).forEach((bidderName) => { if (countriesToExclude[bidderName].includes("IT")) { window.slmadshb.setup.params.setupOverrides.push(() => { adUnits.forEach((adUnit) => { if (adUnit.bids) { adUnit.bids = adUnit.bids.filter(bid => bid.bidder !== bidderName); } }); }); } }); } if (window.slmadshb && window.slmadshb.setup && window.slmadshb.setup.params) { window.slmadshb.setup.params.gdprApplies = true; } if (window.slmadshb && window.slmadshb.onload) { window.slmadshb.onload(); }