var e={46:(e,t,i)=>{function o(){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)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|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|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}function n(){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)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|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|xda|xiino|android|ipad|playbook|silk/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}function d(){return(new Date).getTime()-window.odTagStartTime.getTime()}function s(e,t){window.odT?.debug&&(console.log(window.odT.logPrefix+e+" (time:"+d()+"ms)","background: #286090;border-radius:5px;color:#79ba23;font-weight:700;padding:2px 5px;","color: #79ba23"),void 0!==t&&console.log(t)),window.odBackfill?.debug&&(console.log(`%cBACKFILL_SA:%c ${e} (time:`+d()+"ms)","background: #286090;border-radius:5px;color:#79ba23;font-weight:700;padding:2px 5px;","color:#1E90FF"),void 0!==t&&console.log(t))}function a(e,t){window.odT.debugAnalytics&&(console.log(window.odT.analyticsLogPrefix+e+" (time:"+d()+"ms)","background: #79ba23;border-radius:5px;color:#286090;font-weight:700;padding:2px 5px;","color: #286090"),void 0!==t&&console.log(t))}function r(e,t){Math.imul||(Math.imul=function(e,t){var i=65535&e,o=65535&t;return i*o+((e>>>16&65535)*o+i*(t>>>16&65535)<<16>>>0)|0});var i,o=3735928559^t,n=1103547991^t;for(i=0;i<e.length;i++){var d=e.charCodeAt(i);o=Math.imul(o^d,2654435761),n=Math.imul(n^d,1597334677)}return o=Math.imul(o^o>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),4294967296*(2097151&(n=Math.imul(n^n>>>16,2246822507)^Math.imul(o^o>>>13,3266489909)))+(o>>>0)}function l(){let e=function(e){return e.test(window.navigator.userAgent)};switch(!0){case e(/edg/i):return"Edge";case e(/trident/i):return"Internet Explorer";case e(/firefox|fxios/i):return"Firefox";case e(/opr\//i):return"Opera";case e(/ucbrowser/i):return"UC Browser";case e(/samsungbrowser/i):return"Samsung Browser";case e(/chrome|chromium|crios/i):return"Chrome";case e(/^((?!chrome|chromium|crios|android).)*safari/i):return"Safari";default:return"Other"}}function c(){let e=window.navigator.platform,t=window.navigator.userAgent,i=null;return i=-1!==["Macintosh","MacIntel","MacPPC","Mac68K"].indexOf(e)?"Mac OS":-1!==["iPhone","iPad","iPod"].indexOf(e)?"iOS":/Android/.test(t)?"Android":-1!==["Win32","Win64","Windows","WinCE"].indexOf(e)?"Windows":!i&&/Linux/.test(e)?"Linux":"Other",i}function u(e){return e?(e^(window&&window.crypto&&window.crypto.getRandomValues?crypto.getRandomValues(new Uint8Array(1))[0]%16:16*Math.random())>>e/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,u)}function p(e,t){for(const i in e)if(e.hasOwnProperty(i)&&e[i].name&&e[i].name.startsWith(t))return e[i].name;return!1}function w(e,t){Object.keys(t).forEach((i=>{e.setAttribute(i,t[i])}))}function g(e,t,i="…"){if(e.length<=t)return e;const o=new Intl.Segmenter(void 0,{granularity:"grapheme"}).segment(e)[Symbol.iterator]();let n=0;for(let d=0;d<=t-i.length;d++){const t=o.next();if(t.done)return e;n=t.value.index}for(let t=0;t<i.length;t++)if(o.next().done)return e;return e.slice(0,n)+i}function f(e,t){return toString.call(e)==="[object "+t+"]"}function h(e){return f(e,"Object")}function m(e){return f(e,"Function")}function y(e){return f(e,"String")}function T(e){return f(e,"Boolean")}function b(e){return f(e,"Number")}i.r(t),i.d(t,{ajax:()=>A,analyticsLog:()=>a,buildAdUnitPath:()=>D,checkSafeFrameDelivery:()=>I,createGptPfUnitConfig:()=>E,cyrb53:()=>r,deepEqual:()=>k,detectBrowser:()=>l,detectOS:()=>c,emitEvent:()=>L,generateUuid:()=>u,getCookie:()=>M,getElapsedTime:()=>d,getPbjs:()=>x,hasNameInObject:()=>p,isA:()=>f,isArray:()=>S,isBoolean:()=>T,isClientMobile:()=>o,isClientMobileOrTablet:()=>n,isEmpty:()=>v,isFn:()=>m,isNumber:()=>b,isPlainObject:()=>h,isStr:()=>y,isValidHttpUrl:()=>C,log:()=>s,mergeDeep:()=>_,setAttributes:()=>w,setCookie:()=>O,truncate:()=>g,uniqueArray:()=>P});const S=Array.isArray.bind(Array);function v(e){return!e||(S(e)||y(e)?!(e.length>0):Object.keys(e).length<=0)}function C(e){let t;try{t=new URL(e)}catch(e){return!1}return"http:"===t.protocol||"https:"===t.protocol}function A(e,t,i,o){throw new Error("Function not implemented.")}function I(e,t){let i=!1;return Array.isArray(window?.odT?.setup?.prebidSafeframe?.bidders)&&window?.odT?.setup?.biddersSetup?.triplelift&&window.odT.setup.prebidSafeframe.bidders.push("triplelift"),window.odT.setup.hasOwnProperty("prebidSafeframe")&&-1!=window.odT.setup.prebidSafeframe.bidders.indexOf(t.hb_bidder)&&"1800x1000"!=t.hb_size&&(i=!0,"smart"!=t.hb_bidder||-1==e.indexOf("Content_")||"300x600"!=t.hb_size&&"320x480"!=t.hb_size||(i=!1),(t.hasOwnProperty("hb_deal_appnexus")||t.hasOwnProperty("hb_deal_xandr"))&&(i=!1)),i}function k(e,t){if(e===t)return!0;if(h(e)&&h(t)){const i=Object.keys(e),o=Object.keys(t);return i.length===o.length&&i.every((i=>k(e[i],t[i])))}return!(!Array.isArray(e)||!Array.isArray(t))&&(e.length===t.length&&e.every(((e,i)=>k(e,t[i]))))}function P(e){const t=[];for(const i of e)t.some((e=>k(e,i)))||t.push(i);return t}function _(e,...t){if(!t.length)return e;const i=t.shift();if(h(e)&&h(i))for(const t in i)h(i[t])?(e[t]||(e[t]={}),_(e[t],i[t])):Array.isArray(i[t])?(Array.isArray(e[t])||(e[t]=[]),e[t]=P([...e[t],...i[t]])):e[t]=i[t];return _(e,...t)}function x(){return window.odBackfill?.backfill?.hasOwnProperty("pbjs")?window.odBackfill.backfill.pbjs:void 0!==window.odBackfill?.pbjs?window.odBackfill.pbjs:window._pbjsGlobals?window._pbjsGlobals&&1===window._pbjsGlobals.length?(window.odBackfill.pbjs=window[_pbjsGlobals[0]],window[_pbjsGlobals[0]]):void 0:(window.odBackfill?.debug&&console.warn("%cBACKFILL_SA:%c prebid.js isn't loaded yet, assume it will be pbjs","background: #286090;border-radius:5px;color:#79ba23;font-weight:700;padding:2px 5px;","color:#1E90FF"),window.pbjs=window.pbjs||{},window.pbjs.que=window.pbjs.que||[],window.odBackfill.pbjs=window.pbjs,window.odBackfill.pbjs)}function E(e){let t={adUnitPath:D(e.getAdUnitPath()),customDimensions:{}};return window.odBackfill?.backfill?.hasOwnProperty("gptCustomDimensionKey")&&Object.keys(window.odBackfill.backfill.gptCustomDimensionKey).length>0&&Object.entries(window.odBackfill.backfill.gptCustomDimensionKey).forEach((([i,o],n)=>{t.customDimensions[i]=e.getTargeting(o)[0]})),t.interstitial=!1,e?.getOutOfPage()&&(t.interstitial=!0),t}function D(e){if("string"!=typeof e)return e;let t=e;return t.startsWith("/")||(t="/"+t),t=t.replace(/,([^/]*\/)/,"/"),t}function L(e,t={}){window.dispatchEvent(new CustomEvent(e,{detail:t}))}function O(e,t,i,o){let n=new Date;n.setTime(n.getTime()+1e3*i);let d="expires="+n.toUTCString();document.cookie=o?e+"="+t+";"+d+";domain="+o+";path=/;sameSite=Lax":e+"="+t+";"+d+";path=/"}function M(e){let t=e+"=",i=document.cookie.split(";");for(let e=0;e<i.length;e++){let o=i[e];for(;" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""}},764:(e,t,i)=>{i.r(t),i.d(t,{EmbeddedSafeFrame:()=>s,default:()=>a});var o=i(46),n=function(e,t,i,o){return new(i||(i=Promise))((function(n,d){function s(e){try{r(o.next(e))}catch(e){d(e)}}function a(e){try{r(o.throw(e))}catch(e){d(e)}}function r(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}r((o=o.apply(e,t||[])).next())}))};class s{constructor(){this.SAFEFRAME_LIBRARY_CONTENT=()=>{
/*! safeframe-wrapper v1.0.0 - 2025-10-07 */
window.safeFrameInit={config:[],setConfig:function(e){this.config=[...e]},init:function(){var e=!1;-1!=window.location.search.indexOf("optidigital_debug=true")&&(e=!0),this.config.length&&this.config.map((t=>{if(o=document.getElementById(t.id))if(t.hideElSiblings)for(var i of o.children)i.style.height="1px",i.style.visibility="hidden";else o.innerHTML="";else(o=document.createElement("div")).setAttribute("id",t.id),document.body.appendChild(o);var o=t.id+"-content",n=((o=(!document.getElementById(o)&&((n=document.createElement("div")).setAttribute("id",o),o=document.getElementById(t.id))&&o.appendChild(n),document.createElement("script"))).setAttribute("type","text/x-safeframe"),o.classList.add("sf_data"),o.setAttribute("id","sf_tag_"+t.id),t.renderHtml.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$/g,"\\$").replace(/"/g,'\\"').replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t"));n="{id: 'ad-"+t.id+"', html: `"+n+"`, conf: {'size': '"+t.size+"', dest: '"+t.id+"-content'}, meta: {id: '"+t.id+"', size: '"+t.size+"', debug: '"+e+"'}}";o.textContent=n,document.body.appendChild(o)})),this.baseSafeFrame(),this.hostSafeFrame(),this.renderTemplate()},renderTemplate:function(){this.config.length&&this.config.forEach((e=>{new $sf.host.Config({renderFile:e.renderFile})}))},baseSafeFrame:function(){if(window.$sf)try{e.ver="1-1-1",e.specVersion="1.1"}catch(e){}else var e={ver:"1-1-1",specVersion:"1.1"};var t,i,o,n,d,s,a,r=window,l="object",c="function",u="string",p="number",w="replace",g="length",f="document",h=r&&r.Number,m=r&&r.Math,y=r&&r[f],T=r&&r.navigator,b=T&&T.userAgent||"",S="toLowerCase",v="getAttribute",C="setAttribute",A="removeAttribute",I="getElementsByTagName",k=r&&r.String,P=(e=k.fromCharCode(92))+e,_=k.fromCharCode(34),x=e+_,E=(e=k.fromCharCode(43),"scr"+_+e+_+"ipt"),D="about:blank",L="nodeType",O="iframe",M="CollectGarbage",z="",$=B,R=!0,B=!1,F=null,N={preventDefault:0,stopImmediatePropagation:0,stopPropagation:0,preventBubble:0},U=h&&h.MAX_VALUE,j=-1*U,V=(r&&r.escape,r&&r.unescape,!(!window.ActiveXObject&&"ActiveXObject"in window)&&r&&"ActiveXObject"in r),q=0,G=B,H=0,W=F,K=0,Y=F,J=0,X=0,Z=0,Q={},ee="",te="",ie=F,oe=F;function ne(e){var t=typeof e;return t==u?e:t!=p||e?t==l&&e&&e.join?e.join(""):!1===e?"false":!0===e?"true":e?k(e):"":"0"}function de(e){try{e=e&&typeof e==c&&e.toString()&&new e.constructor?e:F}catch(t){e=F}return!!e}function se(e,t,i,o,n){var d,s,a;if(t&&e)for(s in t)a=typeof(d=t[s]),i&&!t.hasOwnProperty(s)||n&&s in e||o&&a==c||(a==l&&(d=d&&(d.slice?se([],d):se({},d))),e[s]=d);return e}function ae(){return(new Date).getTime()}function re(){return m.round(100*m.random())}function le(e){return(e=ne(e))&&e[w](/^\s\s*/,"")[w](/\s\s*$/,"")}function ce(e,t,i,o){var n,d,s=i&&typeof i==l?i:r,a=0,c=F;if(e)if(e=ne(e),t=t&&typeof t==l?t:F,e.indexOf("."))for(n=e.split(".");d=n[a++];)d=le(d),c=a==n[g]?s[d]&&t?s[d]=se(s[d],t,B,F,o):o&&d in s?s[d]:s[d]=s[d]||t||{}:o&&d in s?s[d]:s[d]=s[d]||{},s=s[d];else c=s[e]&&t?s[e]=se(s[e],t,B,F,o):s[e]=s[e]||t||{};return c}function ue(){return P}function pe(){return x}function we(){return"\\r"}function ge(){return"\\n"}function fe(e,t,i){return ne(["<",t,E,i,">"])}function he(e){return escape(e)}function me(e){return unescape(e)}function ye(e,t,i){return i?e.lastIndexOf(t):e.indexOf(t)}function Te(e,t,i,o,n){var d,s,a,r,c,u,p,w,f,h,m,y,T=this,b=B;if(!(T instanceof Te))return new Te(e,t,i,o,n);if(!arguments[g])return T;if(e&&typeof e==l)return se(new Te("",t,i,o,n),e);if(e=ne(e),t=ne(t)||"&",i=ne(i)||"=",!e)return T;for(f=(c=(e=(e="?"!=t&&"?"!=i&&"?"==e.charAt(0)?e.substring(1):e).charAt(0)==t?e.substring(1):e).split(t))[g],d=0;f--;)if(s=c[d++],b=w=B,s){if(2<(m=(u=s.split(i))[g])){if(p=me(u[0]),u.shift(),n)if(h=ye(e,a=p+i),r=e.substring(h+(m=a[g])),y=(a=t+t)[g],-1!=(a=ye(r,a))){for(r in h=new Te(r=e.substr(h+m,a+y),t,i,o,n),r="",m=0,h)m++;0<m&&(d+=m-1),s=h}else s=me(u.join(i));else s=me(u.join(i));b=R}else 2==m&&(p=me(u[0]),s=me(u[1]),b=R);b&&(o&&p in T||(T[p]=s,w=R),n)&&w&&p&&s&&typeof s!=l&&(0<=ye(s,t)||0<=ye(s,i))&&(T[p]=new Te(s,t,i,o,n))}}function be(e){var t=0;return parseFloat(e.replace(/\./g,(function(){return 1==t++?"":"."})))}function Se(e,t,i){return e=e&&e.match(t),i==F?e:e&&e[i]||F}function ve(e,t){return e.test(t)}function Ce(e){var i,o={},n=new Date;if(!e&&oe)return oe;o.ie=o.opera=o.gecko=o.webkit=o.safari=o.chrome=o.air=o.ipod=o.ipad=o.iphone=o.android=o.webos=o.silk=o.nodejs=o.phantomjs=0,o.mobile=o.ios=o.os=F,o.accel=!1,o.caja=T&&T.cajaVersion,o.cks=B,(e=e||b||"")&&(ve(/windows|win32/i,e)?o.os="windows":ve(/macintosh|mac_powerpc/i,e)?o.os="macintosh":ve(/android/i,e)?o.os="android":ve(/symbos/i,e)?o.os="symbos":ve(/linux/i,e)?o.os="linux":ve(/rhino/i,e)&&(o.os="rhino"),ve(/KHTML/,e)&&(o.webkit=1),ve(/IEMobile|XBLWP7/,e)&&(o.mobile="windows"),ve(/Fennec/,e)&&(o.mobile="gecko"),(i=Se(e,/AppleWebKit\/([^\s]*)/,1))&&(o.webkit=be(i),o.safari=o.webkit,ve(/PhantomJS/,e)&&(i=Se(e,/PhantomJS\/([^\s]*)/,1))&&(o.phantomjs=be(i)),ve(/ Mobile\//,e)||ve(/iPad|iPod|iPhone/,e)?(o.mobile="Apple",i=(i=Se(e,/OS ([^\s]*)/,1))&&be(i.replace("_",".")),o.ios=i,(i=Se(e,/iPad|iPod|iPhone/,o.ipad=o.ipod=o.iphone=0))&&(o[i[S]()]=o.ios)):((i=Se(e,/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/,0))&&(o.mobile=i),ve(/webOS/,e)&&(o.mobile="WebOS",i=Se(e,/webOS\/([^\s]*);/,1))&&(o.webos=be(i)),ve(/ Android/,e)&&(o.mobile="Android",i=Se(e,/Android ([^\s]*);/,1))&&(o.android=be(i)),ve(/Silk/,e)&&((i=Se(e,/Silk\/([^\s]*)\)/,1))&&(o.silk=be(i)),o.android||(o.android=2.34,o.os="Android"),ve(/Accelerated=true/,e))&&(o.accel=!0)),(i=e.match(/(Chrome|CrMo)\/([^\s]*)/))&&i[1]&&i[2]?(o.chrome=be(i[2]),o.safari=0,"CrMo"===i[1]&&(o.mobile="chrome")):(i=Se(e,/AdobeAIR\/([^\s]*)/))&&(o.air=i[0])),o.webkit||((i=Se(e,/Opera[\s\/]([^\s]*)/,1))?(o.opera=be(i),(i=Se(e,/Opera Mini[^;]*/,0))&&(o.mobile=i)):(i=Se(e,/MSIE\s([^;]*)/,1))?o.ie=be(i):(i=(i=Se(e,/Gecko\/([^\s]*)/))&&Se(e,/rv:([^\s\)]*)/,o.gecko=1))&&(o.gecko=be(i))));try{n.setTime(n.getTime()+1e3),y.cookie=t(["sf_ck_tst=test; expires=",n.toGMTString(),"; path=/"]),-1!=y.cookie.indexOf("sf_ck_tst")&&(o.cks=R)}catch(e){o.cks=B}try{typeof process==l&&process.versions&&process.versions.node&&(o.os=process.platform,o.nodejs=numberify(process.versions.node))}catch(e){o.nodejs=0}return o}function Ae(){X&&(clearTimeout(X),X=0)}function Ie(e){Ue(r,"load",Ie),Ue(r,"DOMContentLoaded",Ie),W=R}function ke(){var e,t,i,o;if(Ae(),300<=J&&(Y=F,W=R),W===F){try{i=(t=(e=y&&y.body)&&Me("*",e))&&t[g],o=e&&e.lastChild}catch(e){K=0,Y=F}K&&i==K&&o==Y?(Y=F,W=R):(K=i,Y=o,J+=1,X=setTimeout(ke,50))}else Y=F}function Pe(e){var t=$e(e,"id"),i=t&&Q[t];i&&(Ue(e,"load",i),Q[t]=F,delete Q[t])}function _e(e){return e&&typeof e==u&&Le(e)||e}function xe(e,t,i,o){try{ie=ie||n.msghost}catch(e){ie=F}if(r==top)return e&&ie&&ie[e]&&ie[e](t,i,o)}function Ee(e){var t=F;try{e&&(t=9==e[L]?e:e[f]||e.ownerDocument||F)}catch(e){t=F}return t}function De(e){var t,i=F;try{e&&(i=(i=e.parentWindow||e.defaultView||F)||(t=Ee(e))&&(t.parentWindow||t.defaultView)||F)}catch(e){i=F}return i}function Le(e){var t;return(t=1<(t=arguments)[g]?Ee(t[1]):y)&&t.getElementById(e)||F}function Oe(e){return e&&1==e[L]&&e.tagName[S]()||""}function Me(e,t){var i=[];try{i=t&&t[I]?t[I](e)||i:y[I](e)||i}catch(e){i=[]}return i}function ze(e){return e&&(e.parentNode||e.parentElement)}function $e(e,i,o){try{2<arguments[g]?o===F?G?e[A](i,0):e[A](i):(o=t(o),"class"==i[S]()?e.className=o:G?e[C](i,o,0):e[C](i,o)):o=t(G?e[v](i,0):e[v](i))}catch(e){o=""}return o}function Re(e,i){var o;try{o=e.style,1<arguments[g]?o.cssText=t(i):i=o.cssText}catch(e){i=""}return i}function Be(e,t){return(1<arguments[g]&&Ee(t)||y).createElement(e)}function Fe(e,t){var i=B;try{e&&(i=e.appendChild(t))}catch(e){i=B}return i}function Ne(e,t,i){try{$?e[z]("on"+t,i):e[z](t,i,B)}catch(e){}}function Ue(e,t,i){try{$?e.detachEvent("on"+t,i):e.removeEventListener(t,i,B)}catch(e){}}function je(){var e;return Ae(),W?(Y=F,R):((e=y.readyState)&&(Y=F,W="loaded"==e||"complete"==e||"interactive"==e?R:B),Y=F,J=K=0,ke(),!!W)}function Ve(e){var t=F;try{t=(e=e||r.event)?e[ee]||e[te]:F}catch(e){t=F}return t}function qe(e,t,i,o,n){return Ge(e,t,i,o,n)}function Ge(e,o,n,d,s,a){var r,l,c,u,p,w=["<",O," "];if(a)u=e;else{if(Oe(e=_e(e))!=O)return F;u=e.cloneNode(B)}for(l in"src"in(o=o||{})?$e(u,"src",F):o.src=$e(e,"src")||D,"name"in o?$e(u,"name",F):o.name=$e(e,"name"),o.src||(o.src=D),r=s&&xe("prep",o),a||($e(u,"width",F),$e(u,"height",F)),n&&((c=Re(u))&&";"!=c.charAt(c[g]-1)&&(c+=";"),Re(u,[c,t(n)])),Fe(c=Be("div"),u),a=c.innerHTML.replace(/<iframe(.*?)>(.*?)<\/iframe>/gim,"$1"),w.push('name="',o.name,'" ',a,"></",O,">"),delete o.name,c.innerHTML=t(w),p=c.firstChild,o)$e(p,l,o[l]);return $e(p,"id")||($e(p,"id","sf_"+O+"_"+Z),Z++),$e(p,"FRAMEBORDER","no"),$e(p,"SCROLLING","no"),$e(p,"ALLOWTRANSPARENCY",R),$e(p,"HIDEFOCUS",R),$e(p,"TABINDEX",-1),$e(p,"MARGINWIDTH",0),$e(p,"MARGINHEIGHT",0),((e,t)=>{var o,n;i(t)&&(o=function(i){var d=Ve(i);if(Pe(d),d&&t)try{t.call(d,i)}catch(e){}e=t=o=n=F},n=$e(e,"id"),Pe(e),n&&(Q[n]=o),Ne(e,"load",o)),o=F})(p,d),r&&xe("attach",p,r,s),s=u=d=e=c=null,p}function He(e,t,i,o){return Ge(Be(O),e,t,i,o,R)}(e=Te.prototype).toString=e.valueOf=function e(t,i,o,n){var d,s,a,r=[];for(d in t=t||"&",i=i||"=",this)s=typeof(a=this[d]),a&&s==c||(a&&s==l&&(a=a.tagName||a.nodeType?"#node":e.apply(a,[t,i,o,n])),o&&(d=he(d)),n||(a=he(a)),r.push(d,i,a,t));return r[g]&&(r[r[g]-1]=""),ne(r)},o=ce("$sf.lib.lang",{ParamHash:Te,cstr:ne,cnum:function(e,t,i,o){if(typeof e!=p)try{e=e?parseFloat(e):h.NaN}catch(t){e=h.NaN}return o==F&&(o=U),i==F&&(i=j),(isNaN(e)||e<i||o<e)&&t!=F?t:e},cbool:function(e){return e&&"0"!=e&&"false"!=e&&"no"!=e&&"undefined"!=e&&"null"!=e?R:B},noop:function(){},trim:le,callable:de,guid:function(e){return ne([e||"","_",ae(),"_",re(),"_",q++])},mix:se,time:ae,rand:re,def:ce,ns:function(e,t){var i,o,n=/\[(('|")?)((\s|.)*?)(('|")?)\]/gm,d=/\./gm,s=0,a=R,l=t=t||r;if(e)if(e=ne(e))if(i=(e=le(e)).match(/(\[(.{1,})\])|(\.\w+)/gm))for(t=e[w](/(\[.*)|(\..*)/g,""),i.unshift(t);o=i[s++];){if(!l[o=o[w](n,"$3")[w](d,"")]){a=B;break}l=l[o]}else l=l[o=e];else a=B;else a=B;return a&&l||B},jssafe_html:function(e){return(e=ne(e))&&(e=(e=(e=(e=(e=(e=(e=e.replace(/(<noscript[^>]*>)(\s*?|.*?)(<\/noscript>)/gim,"")).replace(/\\/g,ue)).replace(/\"/g,pe)).replace(/\n/g,ge)).replace(/\r/g,we)).replace(/<(\/)*script([^>]*)>/gi,fe)).replace(/\t/gi," "),e=ne([_,e,_]),e=_+e+_),e},isArray:function(e){return null!=e&&"string"!=typeof e&&null!=e[g]&&e.constructor==Array}}),ce("$sf.env",{isIE:V}),t=ne,i=de,(oe=Ce()).parse=Ce,o.def("$sf.env.ua",oe,F,R),V?(ee="srcElement",te="target",$e(s=Be(O),"SCROLLING","no"),G="no"!=$e(s,"SCROLLING"),d=M in r?function(){H&&clearTimeout(H),H=setTimeout((function(){try{r[M]()}catch(e){}}),3e3)}:_lang.noop):(ee="target",te="currentTarget"),r.addEventListener&&!V?z="addEventListener":V&&($=R,z="attachEvent"),s=F;try{s=y.createEvent("UIEvent")}catch(e){s=F}if(!s)try{s=y.createEvent("UIEvents")}catch(e){s=F}if(s)for(a in N)s[a]&&(N[a]=1);s=F,Ne(r,"load",Ie),Ne(r,"DOMContentLoaded",Ie),n=o.def("$sf.lib.dom",{doc:Ee,view:De,elt:Le,tagName:Oe,tags:Me,par:ze,make:Be,css:Re,attr:$e,gc:d,append:Fe,purge:function(e){var t,i=B,o=Oe(e)==O;o&&(xe("detach",e),Pe(e),V||$e(e,"src",D));try{(t=ze(e))&&(t.removeChild(e),i=R,V)&&o&&d()}catch(e){}return e=t=F,i},attach:Ne,detach:Ue,ready:je,wait:function e(t){if(je())try{o.callable(t)&&t()}catch(e){}else setTimeout((function(){e(t),t=F}),51)},evtCncl:function(e){var t="";if(e=e||r.event){try{e.returnValue=B}catch(e){}try{e.cancelBubble=R}catch(e){}try{e.stopped=R}catch(e){}for(t in N)if(N[t])try{e[t]()}catch(e){}}return B},evtTgt:Ve},F,R),o.def("$sf.lib.dom.iframes",{make:He,clone:qe,replace:function(e,i,o,n,d){var s,a,r,l,c=(r=Oe(c=(a=(e=e||{}).id)&&_e(a)))?c:F;(r=r==O?c:F)?(xe("detach",r),Pe(r),l=ze(r),$e(s=qe(r,e,i,n,d),"onload",F),$e(s,"onreadystatechange",F)):(!(l=o&&Oe(o=_e(o))?o:l)&&c&&(l=ze(c)),s=He(e,i=t(i)||Re(c)||"",n,d));try{l?r?l.replaceChild(s,r):c?l.replaceChild(s,c):Fe(l,s):Fe(y.body,s)}catch(e){}return s=e=l=n=F,Le(a)},view:function(e){var t,i,o,n,d,s,a=0;try{if(!(t=e.contentWindow||F))for(n=(i=(o=Ee(e))&&De(o))&&i.frames||[];d=n[a++];){try{s=d.frameElement}catch(e){s=F}if(s&&s==e){t=d;break}}}catch(e){t=F}return t}},F,R),o.def("$sf.lib.logger",{log:function(e){r.console&&console.log&&console.log(e)},error:function(e){r.console&&console.error?console.error(e):r.console&&console.log&&console.log(e)}},F,R),o.def("$sf.info",{errs:[],list:[]},F,R),k.prototype.trim||(k.prototype.trim=o.trim)},hostSafeFrame:function(){function e(i){var o,n,d,s,a,r=this;if(!arguments.length)return qt?lt({},qt):H;if(!(r instanceof e))return new e(i);if(!i)return qt=H;if(a=!!qt,r.auto="auto"in i?it(i.auto):W,r.cdn=nt(i.cdn),r.debug=it(i.debug),r.root=nt(i.root),r.renderFile=nt(i.renderFile),r.msgFile=nt(i.msgFile),r.to=ot(i.to,Y),r.ver=nt(i.ver)||Ye,r.onBeforePosMsg=dt(i.onBeforePosMsg)?i.onBeforePosMsg:at,r.onPosMsg=dt(i.onPosMsg)?i.onPosMsg:at,r.onStartPosRender=dt(i.onStartPosRender)?i.onStartPosRender:at,r.onEndPosRender=dt(i.onEndPosRender)?i.onEndPosRender:at,r.onFailure=dt(i.onFailure)?i.onFailure3:at,n=i.positions,r.positions=o={},n)for(d in n)(s=n[d])&&typeof s==pe&&(o[d||s.id||rt(J)]=new t(s));qt=r,a=!!(a&&r.auto&&Qe&&Qe.ns("$sf.host.boot"));try{a&&Ke.host.boot()}catch(e){}return lt({},qt)}function t(i,o,n){var d,s,a=this,r=i&&typeof i||"";return a instanceof t?(r==pe?(a.id=nt(i.id),a.dest=nt(i.dest||o),a.bg=nt(i.bg)||"transparent",a.tgt=nt(i.tgt)||"_top",a.css=nt(i.css),a.w=ot(i.w,0),a.h=ot(i.h,0),a.z=ot(i.z,0),a.supports=lt({},i.supports||oe,W,W,W),a.w&&a.h?a.size=a.w+"x"+a.h:(d=nt(i.size))?(s=d.split(/x/gi),a.w=ot(s[0],0),a.h=ot(s[1],0),a.size=d):a.size=""):"string"==r?(a.id=nt(i),a.dest=nt(i.dest)):(a.dest="",a.bg="transparent",a.tgt="_top",a.css="",a.w=0,a.h=0,a.size="",a.z=0,a.supports={}),a.id=a.id||rt(J),!qt&&n&&e(n),qt&&(qt.positions[a.id]=a),lt({},a)):new t(i,o,n)}function i(e,t,o){var d,a;if(!(this instanceof i))return new i(key,o,pos);d={sf_ver:nt(Ke.ver),flash_ver:n(),ck_on:s()?"1":"0"},a={},e&&typeof e==pe&&(d=lt(d,e)),t&&typeof t==we&&o&&typeof o==pe&&(a[t]=o),this.toString=function(){var e=new vt;return e.shared=d,e.non_shared=a,e.toString()},this.value=function(e,t){var i="";return e&&typeof e==we?"shared"==(t=t&&typeof t==we?t:"shared")?d[e]||"":e in a&&a[prop_key]||"":i}}function o(e,t){var i,o;try{(Ze=Ze||Ke&&Ke.lib)&&Ze.logger&&G==top?t?(Ze.logger.error(e),Ke.info.errs.push(e)):Ze.logger.log(e):(i=d.getElementsByTagName("head")[0],(o=d.createElement("script")).type="text/plain",o.text="\x3c!-- SafeFrame "+(t?"error":"log")+": "+(e||"unknown")+" --\x3e",i.appendChild(i,o))}catch(e){}}function n(){if(Vt===H||null==Vt)if(navigator.plugins&&0<navigator.plugins.length){var e=navigator.mimeTypes;e&&e[We]&&e[We].enabledPlugin&&e[We].enabledPlugin.description&&((e=e[We].enabledPlugin).version?Vt=e.version:e.description&&(Vt=e.description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1]))}else if(Ke.env.isIE)for(var t,i,o=0;o<Gt.length;o++)try{i=(t=new ActiveXObject(Gt[o]).GetVariable("$version")).indexOf(" "),Vt=(-1<i?t.substr(i+1):t).replace(/,/gi,".");break}catch(e){Vt=0;continue}else Vt=0;return Vt}function s(){var e=!!navigator.cookieEnabled;return void 0!==navigator.cookieEnabled||e||(document.cookie="testcookie",e=-1!=document.cookie.indexOf("testcookie"),navigator&&(navigator.cookieEnabled=e)),e}function a(e){var t=(e=e&&wt(e)||Ct)[Oe],i=e[Me];return t&&!_t&&"CSS1Compat"!=t?e.body:i}function r(e){var t=H;try{e&&(t=9==u(e)?e:e[ze]||e.ownerDocument||H)}catch(e){t=H}return t}function l(e){return e&&(e[Ne]||e.parentElement)}function c(e){return 1===u(e)}function u(e){return ot(e&&e.nodeType,-1)}function p(e){return 1===u(e)&&e.tagName.toLowerCase()||""}function w(e){return((e=nt(e))&&-1==e.search(/\D+/g)||e&&-1!=e.search(/px/gi))&&W}function g(e,t,i){var o=0,n=0;return(i=i||T(e))&&(o=st.borderTopWidth,n=st.borderLeftWidth,o=w(o)?ot(o,0):0,n=w(n)?ot(n,0):0,Pt)&&/^t(?:able|d|h|r|head|foot)$/i.test(gt(e))&&(o=n=0),(t=t||{t:0,l:0}).t+=o,t.l+=n,t}function f(e){var t={x:0,y:0,w:0,h:0},i={scrollLeft:0,scrollTop:0,scrollWidth:0,scrollHeight:0},o=0,n=0,d=(e=wt(e)||Ct)[Me]||i;i=e.body||i;return(e=e.defaultView)&&(o=ot(e.pageXOffset,0),n=ot(e.pageYOffset,0)),t.x=Tt(d.scrollLeft,i.scrollLeft,o),t.y=Tt(d.scrollTop,i.scrollTop,n),t.w=Tt(d.scrollWidth,i.scrollWidth,0),t.h=Tt(d.scrollHeight,i.scrollHeight,0),t}function h(e){var t,i,n,d,s,l,u,w,h,m,y,b,S={t:0,l:0,r:0,b:0,w:0,h:0,z:0},v="getBoundingClientRect",C=0,A=0,I=(k=r(e)||G[ze])[Oe],k=k.documentMode||0;if(c(e))try{if(w=T(e),d=a(e),s=f(e),S.l=e[Pe]||0,S.t=e[ke]||0,u=H,n=Pt||519<kt,(l=e)!==d&&e[v])At&&(!k||0<k&&k<8||"BackCompat"===I)&&(m=d.clientLeft,y=d.clientTop),b=e[v](),S.t=b.top,S.l=b.left,(m||y)&&(S.l-=m,S.t-=y),(s.y||s.x)&&(!Xe.ios||4.2<=Xe.ios)&&(S.l+=s.x,S.t+=s.y);else{for(;(l=l[Ie])&&c(l)&&u!==l;)m=l[Pe],y=l[ke],S.t+=y,S.l+=m,n&&(S=g(l,S)),u=l;if("fixed"!=w.position)for(l=e,u=H;(l=l[Ne])&&c(l)&&u!==l&&l!=d;)t=l[Ce],i=l[Ae],Pt&&"visible"!=(h=T(l))[je]&&(S=g(l,S,h)),(t||i)&&(S.l-=i,S.t-=t),u=l;S.l+=s.x,S.t+=s.y}C=e==d?(A=e[De],e[Ee]):(A=e[xe],e[_e]),S.b=S.t+A,S.r=S.l+C,S.w=Tt(C,0),S.h=Tt(A,0),S.z=w.zIndex}catch(t){t&&t[qe]||(t={message:"null exception"}),o("sf Exception in rect calculation tag - "+p(e)+" : "+t[qe],W),S={t:0,l:0,r:0,b:0,w:0,h:0,z:0}}return S}function m(e){var t=0,i=0;return(e=a(e))&&(t=e.scrollWidth||0,i=e.scrollHeight||0),{t:0,l:0,b:i,r:t,w:t,h:i}}function y(e,t){var i=K,o=e&&e[$e]||-1,n=t&&t[$e]||-1;if(1==o&&-1!=n)if(e[Re])if(_t||1==n)i=e[Re](t);else for(;t;){if(e===t){i=W;break}if((t=t.parentNode)==Ct[Me])break}else e[Be]&&(i=e===t||!!(16&e[Be](t)));return i}function T(e,t){var i="",o="getComputedStyle";if(arguments[fe]&&t)if(It)try{i=e.currentStyle[t]}catch(e){i=""}else try{i=ft(e)[o](e,H)[t]}catch(e){i=""}else if(It)try{i=e.currentStyle}catch(e){i=H}else try{i=ft(e)[o](e,H)}catch(e){i=H}return i}function b(e,t,i){var o,n,d,s,l,c,u,p,w,g,m,T,b,S,v,C=h(e),A=r(e),I=a(A),k=C.t,P=C.l,_=ee,x=[],E=0;if(t=ot(t,x.on=0,0),i=ot(i,0,0),k&&!C.h&&i&&(C.h=i,C.b=k+i),P&&!C.w&&t&&(C.w=t,elrect.r=P+t),o=C.w,n=C.h,l=d=St(o/_),c=s=St(n/_),!(o<=1||n<=1||d<1||s<1)&&(v=(i=f()).y,S=i.x,T=P+o,b=k+n,A)&&I&&A[Fe]){for(;l<o;){for(c=s;c<n;)p=k+c,(u=P+l)<=T&&p<=b&&x.push({x:u,y:p,on:0}),c+=s;l+=d}for(;w=x[E++];)u=Tt(w.x-S,0),u=bt(u,w.x),p=Tt(w.y-v,0),p=bt(p,w.y),0==u?(w.on="!x-offscreen",x.on++):0==p?(w.on="!y-offscreen",x.on++):(m=A[Fe](u,p))&&m!==I&&m!==e&&!y(m,e)&&((g=pt(m,"id"))||(g=rt("geom_inter"),pt(m,"id",g)),w.on=g,x.on++)}return x}function S(e,t,i,o){return jt=jt||et.msghost_fb,e&&jt&&jt[e]&&jt[e](t,i,o)}function v(e){var t=e&&e.data,i=e&&e.source,o=(o=(n=(t=t&&-1!=JSON.stringify(t).indexOf(He)&&vt(t))&&t.id)&&ct(n))&&ht(o),n=n&&Lt[n],d=t&&t[He],s=n&&n[He],a=(n=n&&n._xmsgcb,K);if(s&&d&&d==s&&i&&o&&o==i)try{a=n(t.msg)}catch(e){a=K}return a&&et.evtCncl(e),a}function C(e,t){var i,o,n,d=e&&Lt[e],s=K;if(d)if((i=vt()).msg=t,i.guid=d.guid,$t){n=ct(e),o=ht(n);try{o[Ge](nt(i),d.srcHost||"*"),s=W}catch(e){s=K}}else s=S("send",e,t);else s=S("send",e,t);return i=o=n=H,s}function A(e){var t,i,o=[],n=arguments,d=n[fe],s=0,a=K;if(qt&&(t=qt[e])){for(;d--;)(i=n[s++])!=e&&o.push(i);try{a=t.apply(H,o)}catch(e){a=K}}return a}function I(){Ft&&(clearTimeout(Ft),Ft=0)}function k(){Nt&&(clearTimeout(Nt),Nt=0)}function P(e){k(),Nt=setTimeout((function(){(e=>{var t,i,o,n;for(t in Dt)(o=(i=Dt[t])&&i.dest)&&ct(o)&&i&&(o=vt(),n=vt(),o.pos=t,o.cmd=n.cmd=le,o.value=e,A(ie,t,le,e),F(i,o));k()})(e)}),2)}function _(e){I(),Ft=e?setTimeout(D,Z):setTimeout(E,Z)}function x(e){var t,i,o,n;for(t in Dt)e&&t in zt||(n=(n=(i=Dt[t])&&i.dest)&&ct(n))&&i&&(n=j(t,n,W),(o=vt()).pos=t,o.cmd=re,o.geom=mt(n),A(ie,t,re,n),F(i,o));I()}function E(){x()}function D(){x(W)}function L(e){P(W)}function O(e){P(G[ze].hasFocus())}function M(e){_(1)}function z(e){_()}function $(e){var t,i;I();try{for(t in et.detach(G,be,M),et.detach(G,"resize",z),et.detach(G,"unload",$),et.detach(G,"focus",L),et.detach(G,"blur",O),zt)(i=zt[t])&&(i.tID&&clearTimeout(i.tID),et.detach(zt[t],be,i[Le]),i[Le]=i.node=H),zt[t]=H,delete zt[t];Bt=K}catch(e){}}function R(e){var t,i=K,o=vt(e,H,H,W,W);if(o&&o.pos&&(t=Dt[o.pos]))switch(o.cmd){case"exp-push":V(o,W),i=W;break;case"exp-ovr":V(o),i=W;break;case"collapse":(e=>{var t,i=e&&e.pos,o=i&&Dt[i],n=o&&o.conf,d=n&&n.dest,s=d&&ct(d),a=s&&ct(X+"-"+i),r=s&&s[ge],l=a&&a[ge];i&&o&&s&&a&&o.expanded&&((t=zt[i])&&t.tID&&clearTimeout(t.tID),I(),A(te,i,de,0,0)||(r.left=r.top="0px",l[he]=r[he]=n.w+ye,l[me]=r[me]=n.h+ye,r.zIndex=o.dx=o.dy=0,U(d),A(ie,i,de,0,0),e.cmd="collapse",e.geom=mt(j(i,s,W)),F(o,e),s=r=a=l=o=e=H))})(o),i=W;break;case ae:(e=>{var t=e&&e.pos,i=t&&Dt[t],o=i&&i.conf,n=(o=(o=o&&o.dest)&&ct(o))&&ct(X+"-"+t);o&&o[ge],n&&n[ge],A(ie,e.pos,ce,e.msg),e.cmd="msg",e.geom=mt(j(t,o,W)),F(i,e)})(o),i=W;break;case se:(e=>{var t=e&&e.pos,i=t&&Dt[t],o=(i=(i=(i=i&&i.conf)&&i.dest)&&ct(i))&&ct(X+"-"+t);i&&i[ge],o&&o[ge],Ke&&Ke.info&&Ke.info.errs&&Ke.info.errs.push(e),A(ie,t,se,e)})(o),i=W;break;case re:Ke.lib.logger.log("Geom update complete: "+o.pos),i=W;break;case"read-cookie":i=t.conf&&t.conf.supports&&t.conf.supports[o.cmd]&&"0"!=t.conf.supports[o.cmd]?((e=>{var t,i=e&&e.pos,o=i&&Dt[i],n=o&&o.conf,d=(d=n&&n.dest)&&ct(d),s="read-cookie";n.supports&&n.supports[s]&&"0"!=n.supports[s]&&i&&o&&d&&(n=e.cookie)&&(t=(()=>{var e,t,i,o={};for(t=(e=document.cookie.split("; ")).length-1;0<=t;t--)o[(i=e[t].split("="))[0]]=i[1];return o})(),A(ie,s,i,0,0),e.cmd=s,e.geom=mt(j(i,d,W)),e.value=t[n],F(o,e),d=o=e=H)})(o),W):K;break;case"write-cookie":i=t.conf&&t.conf.supports&&t.conf.supports[o.cmd]&&"0"!=t.conf.supports[o.cmd]?((e=>{var t,i,o=e&&e.pos,n=o&&Dt[o],d=n&&n.conf,s=(s=d&&d.dest)&&ct(s),a="write-cookie";d.supports&&d.supports[a]&&"0"!=d.supports[a]&&o&&n&&s&&(d=e.cookie)&&(t=escape(e.value),(i=new Date).setDate(i.getDate()+1),i=t+"; expires="+i.toUTCString(),document.cookie=d+"="+i,A(ie,a,o,0,0),e.cmd=a,e.geom=mt(j(o,s,W)),e.info=t,e.value="",F(n,e),s=n=e=H)})(o),W):K}return i}function B(){var e,t=W;for(e in Ot){t=K;break}return t}function F(e,t){Ut="sending-msg-down-"+t.cmd,setTimeout((function(){var i=e&&e.dest;i&&t&&C(i,t.toString()),Ut="",t=e=H}),Q)}function N(){var e=this,t=pt(e,"_pos_id");Ot[t]&&(clearTimeout(Ot[t]),delete Ot[t],Mt[t]=t,pt(e,"_pos_id",H),pt(e,"name",H),e[ge].visibility="inherit",e[ge].display="block",A("onEndPosRender",t)),B()||(Ut="")}function U(e,t,i,o,n){var d,s;At&&(d=ct(e),s=ct(e="shm_"+e),t?s?s[ge].visibility="visible":(s=tt.clone(d,{id:e,src:"",name:e},[he,":",i,ye,";",me,":",o,ye,";z-index:",n-1,";filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0)"]),et.append(ut(d),s)):!t&&s&&(s[ge].visibility="hidden"))}function j(e,t,i){var n,d,s,a,r=vt(),l={};try{et.bounds(t,l,W),i||l.isRoot||!l.canScroll||((s=l.expRect).xs||s.ys)&&(n=zt[e],d=l.refNode,n&&n.node!=d&&(n.tID&&clearTimeout(n.tID),et.detach(void 0,be,n[Le]),n.node=n[Le]=H,zt[e]=H,delete zt[e]),zt[e]||((n={}).node=d,n[Le]=function(t){(e=>{var t=zt[e];t&&(t.tID&&(clearTimeout(t.tID),delete t.tID),t.tID=setTimeout((function(){var i,o,n=Dt[e];(o=(o=n&&n.dest)&&ct(o))&&n&&(o=j(e,o,W),(i=vt()).pos=e,i.cmd=re,i.geom=mt(o),A(ie,e,re,o),F(n,i)),delete t.tID}),Z))})(e)},zt[e]=n,et.attach(d,be,n[Le])))}catch(e){r=H,o("Exception in build_geom: "+(e&&e[qe]||"NULL"),W)}try{r&&(r.win=vt(et.winRect()),r.par=vt(l.clipRect),s=vt(l.expRect),(a=vt(l.rect)).iv=s.iv,a.xiv=s.xiv,a.yiv=s.yiv,delete s.iv,delete s.xiv,delete s.yiv,r.exp=s,r.self=a)}catch(e){r=H,o("build_geom info error: "+(e&&e[qe]||"NULL"),W)}return r}function V(e,t){var i,o,n,d,s,a,r,l,c,u,p,w,g,f,h=K,m=K,y=e&&e.pos;y&&(a=(i=Dt[y])&&i.conf,i)&&a&&(u=i.dest,o=ct(u),d=ct(X+"-"+y),o)&&d&&(n=o[ge],d=d[ge],n)&&((f=zt[y])&&f.tID&&clearTimeout(f.tID),I(),f=e.exp_obj,s=a.w,a=a.h,f?(p=ot(f.t,0,0),w=ot(f.l,0,0),g=ot(f.r,0,0),f=ot(f.b,0,0),g=ot(s+w+g,0,0),c=ot(a+p+f,0,0),p?(l=-1*p,m=W):l=0,w?(r=-1*w,h=W):r=0):(g=(h=(r=i.dx=ot(e.dx))<0)?s+-1*r:s+r,c=(m=(l=i.dy=ot(e.dy))<0)?a+-1*l:a+l),g<=s&&c<=a||A(te,y,ne,r,l)||(n[he]=g+ye,n[me]=c+ye,h&&(n.left=r+ye),m&&(n.top=l+ye),f=ot(i.z,0),n.zIndex=f=f||ue,U(u,W,g,c,f-1),t?(d[he]=g+ye,d[me]=c+ye):(d[he]=s+ye,d[me]=a+ye),i.expanded=W,e.dx=r,e.dy=l,e.w=g,e.h=c,e.cmd="expand",e.geom=mt(j(y,o,W)),A(ie,y,ne,r,l),F(i,e)))}function q(){var e,t,i,o,n,d,s,a=0,r=W,l=arguments;if(!l[fe]||"*"==l[a])for(e in l=[],Dt)l.push(e);for(;e=l[a++];)if(t=Dt[e]){e in Ot&&(clearTimeout(Ot[e]),delete Ot[e]),e in Mt&&delete Mt[e],n=(i=(t=t.dest)&&ct(t))&&ut(i),-1!=et.attr(n,"id").indexOf(X)&&(n=ut(o=n)),et.purge(i),o&&et.purge(o);for(s=$sf.info.list.length-1;0<=s;s--)if((d=$sf.info.list[s])&&d.id===e){$sf.info.list.splice(s,1);break}Dt[e]=H,delete Dt[e],i=et.make("div"),et.attr(i,"id",t),et.append(n,i)}for(e in e="",Dt){r=K;break}r&&(Ut="",$())}var G,H,W,K,Y,J,X,Z,Q,ee,te,ie,oe,ne,de,se,ae,re,le,ce,ue,pe,we,ge,fe,he,me,ye,Te,be,Se,ve,Ce,Ae,Ie,ke,Pe,_e,xe,Ee,De,Le,Oe,Me,ze,$e,Re,Be,Fe,Ne,Ue,je,Ve,qe,Ge,He,We,Ke,Ye,Je,Xe,Ze,Qe,et,tt,it,ot,nt,dt,at,rt,lt,ct,ut,pt,wt,gt,ft,ht,mt,yt,Tt,bt,St,vt,Ct,At,It,kt,Pt,_t,xt,Et,Dt,Lt,Ot,Mt,zt,$t,Rt,Bt,Ft,Nt,Ut,jt,Vt,qt,Gt;G=window,K=!(W=!(H=null)),Y=6e4,J="od",X="od-sf",Z=750,ee=10,te="onBeforePosMsg",ie="onPosMsg",oe={"exp-ovr":Q=1,"exp-push":0,bg:0,pin:0,"read-cookie":0,"write-cookie":0},ne="exp-ovr",de="collapse",se="error",re="geom-update",le="focus-change",ce=ae="msg",ue=3e3,pe="object",we="string",ge="style",fe="length",he="width",me="height",ye="PX",Te="clip",Se=(be="scroll")+"Width",ve=be+"Height",Ce=be+"Top",Ae=be+"Left",Ie="offsetParent",ke="offsetTop",Pe="offsetLeft",_e="offsetWidth",xe="offsetHeight",Ee="clientWidth",De="clientHeight",Le="onscroll",Oe="compatMode",Me="documentElement",ze="document",$e="nodeType",Re="contains",Be="compareDocumentPosition",Fe="elementFromPoint",Ne="parentNode",Ue="auto",je="overflow",Ve="toFixed",qe="message",Ge="postMessage",He="guid",We="application/x-shockwave-flash",Ke=G&&G.$sf,Ye=Ke&&Ke.ver,Je=Ke&&Ke.env,Xe=Je&&Je.ua,Ze=Ke&&Ke.lib,Qe=Ze&&Ze.lang,et=Ze&&Ze.dom,tt=et&&et.iframes,it=Qe&&Qe.cbool,ot=Qe&&Qe.cnum,nt=Qe&&Qe.cstr,dt=Qe&&Qe.callable,at=Qe&&Qe.noop,rt=Qe&&Qe[He],lt=Qe&&Qe.mix,ct=et&&et.elt,ut=et&&et.par,et&&et.tags,pt=et&&et.attr,wt=et&&et.doc,gt=et&&et.tagName,ft=et&&et.view,ht=tt&&tt.view,et&&et.purge,et&&et.ready,mt=G&&G.escape,yt=G&&G.Math,Tt=yt&&yt.max,bt=yt&&yt.min,St=yt&&yt.round,vt=Qe&&Qe.ParamHash,Ct=G&&G[ze],At=Je&&Je.isIE,It=Xe&&Xe.ie||0,kt=Xe&&Xe.webkit||0,Pt=Xe&&Xe.gecko||0,_t=Xe&&Xe.opera||0,xt=G&&G.location,Et=xt&&(xt.protocol+"//"+(xt.host||xt.hostname)||""),Dt={},Lt={},Ot={},Mt={},zt={},Bt=Rt=$t=K,Nt=Ft=0,qt=Vt=jt=Ut=H,Gt=[(yt="ShockwaveFlash.ShockwaveFlash")+".11",yt+".8",yt+".7",yt+".6",yt],Qe&&G==top&&(Qe.def("dom",{rect:h,currentStyle:T,contains:y,docRect:m,winRect:function(e){var t=(d=e&&ft(e)||G).innerHeight||0,i=d.innerWidth||0,o=d.screenY||d.screenTop||0,n=t+o,d=d.screenX||d.screenLeft||0,s=i+d;e=a(e);return t||i||!e||(t=e.clientHeight||0,s=d+(i=e.clientWidth||0),n=o+t),{t:o,l:d,b:n,r:s,w:i,h:t}},bounds:function(e,t,i,o,n){var d,s,r,c,u,g,y,S,v,C,A,I,k,P,_,x,E,D,L,O,M,z,$,R,B,F,N,U,j,V,q,Y=e&&l(e),J=a(e),X=h(e),Z=h(J),Q=f(J),ee=m(e),te={t:0,l:0,r:0,b:0,xs:0,ys:0,xiv:0,yiv:0,iv:0,w:0,h:0},ie=[],oe={left:H,right:H,top:H,bottom:H};if(t=t&&"object"==typeof t?t:{},o=ot(o,0,0),n=ot(n,0,0),!X.h&&n&&(X.h=n,X.b=X.t+n),!X.w&&o&&(X.w=o,X.r=X.l+o),Y)for(s=Z.t,r=Z.l,c=Z.r,u=Z.b;(M=T(Y))&&("block"!=M.display&&"absolute"!=M.position&&"none"==M.float&&"none"==M.clear||(d=Y==J,S=(V=h(Y)).t,v=V.l,C=V.r,A=V.b,D=M[je+"X"],L=M[je+"Y"],O=M[je],M=d?[-1,-1,-1,-1]:(e=>{var t,i,o,n,d=[-1,-1,-1,-1],s=[Te+"Top",Te+"Right",Te+"Bottom",Te+"Left"],a=0;if(e)if(It)for(;i=s[a];)w(t=e[i])&&0<=(t=ot(t,-1))&&(d[a]=t),a++;else if((t=e[Te])&&-1!=t.search(/\d+/g))for(n=(d=(d=(t=t.replace(/\w+\(([^\)]*?)\)/g,"$1")).split(" "))[fe]<=1?d.split(","):d)[fe],a=0;n--;)w(o=d[a])?d[a]=ot(o,-1):d[a]=-1,a++;return d})(M),q=K,_=d?(I=Q.w,Q.h):(I=Y[Se],Y[ve]),k=Y[_e],x=Y[xe],P=Y[Ee],E=Y[De],!y&&P<k&&(y=k-P),!g&&E<x&&(g=x-E),d?(P<I&&(r<(v=0)&&(r=v),(C=(G.innerWidth||k)+Q.x)<c)&&(c=C),E<_&&(s<(S=0)&&(s=S),(A=(G.innerHeight||x)+Q.y)<u)&&(u=A)):(y&&C-v==k&&(C-=y),g&&A-S==x&&(A-=g),("hidden"==D||D==be||D==Ue||"hidden"==O||O==be||O==Ue)&&(r<v&&(r=v,oe.left=Y),C<c&&(c=C,oe.right=Y),D==be||O==be||(D==Ue||O==Ue)&&P<I)&&(ie.push(Y),q=W),0<M[3]&&r<(R=v+M[3])&&(r=R,oe.left=Y),0<M[1]&&(B=C+M[1])<c&&(c=B,oe.right=Y),"hidden"!=L&&L!=be&&L!=Ue&&"hidden"!=O&&O!=be&&O!=Ue||(s<S&&(s=S,oe.top=Y),A<u&&(u=A,oe.bottom=Y),q)||(L==be||O==be||(L==Ue||O==Ue)&&E<_)&&(ie.push(Y),q=W),0<M[0]&&s<(z=S+M[0])&&(s=z,oe.top=Y),0<M[2]&&($=V.t+M[2])<u&&(u=$,oe.bottom=Y))),Y!=J)&&(Y=l(Y))&&p(Y););return v=X.l,C=X.r,S=X.t,A=X.b,N=C-v,R=Z.l,B=Z.r,z=Z.t,$=Z.b,F=(U=A-S)<(F=(F=bt(A,$)-Tt(S,z))<0?0:F)?U:F,j=N<(j=(j=bt(C,B)-Tt(v,R))<0?0:j)?N:j,te.t=!(z<S)||$<=S?0:Tt(S-z,0),te.b=!(A<$)||A<=z?0:Tt($-A,0),te.l=!(R<v)||B<=v||$<=S||A<=z?0:Tt(v-R,0),te.r=!(C<B)||C<=R||$<=S?0:Tt(B-C,0),te.w=Tt(te.r-te.l,0),te.h=Tt(te.b-te.t,0),te.xiv=0<N?ot((j/N)[Ve](2)):0,te.yiv=0<U?ot((F/U)[Ve](2)):0,te.iv=0<N||0<U?ot((j*F/(N*U))[Ve](2)):0,te.civ=0,i&&.49<te.iv&&(F=(j=b(e,o,n))[fe],N=ot(j.on,0))&&(U=1-ot((N/F)[Ve](2),0),te.civ=te.iv=U),t.rect=X,t.clipRect=Z,t.docRect=ee,ie[fe]?(t.isRoot=K,t.canScroll=W,te.xs=!!g,te.ys=!!y):(t.isRoot=W,te.xs=!!(ee.w>Z.w&&g),te.ys=!!(ee.h>Z.h&&y),t.canScroll=ee.w>Z.w||ee.h>Z.h),t.scrollNodes=ie,t.clipNodes=oe,t.expRect=te},overlaps:b},Ze,W),Qe&&(Qe.def("msghost",{prep:function(e){var t,i,o,n=H,d=(-1<(d=(o=-1<(d=xt.href.indexOf("#"))?xt.href.substr(0,d):xt.href).indexOf("?"))&&(o=o.substr(0,d)),escape(o));return e&&(o=e.name,o=vt(o),i=0!=(i=(t=nt(e.src))&&t.substring(0,t.indexOf("/",9))).search(/http/gi)?"":i,(n=vt(o)).id=e.id||"iframe_"+rt(),n.src=t,n.srcHost=i,n[He]=n[He]||rt(),n.host=Et,n.loc=d,n.proxyID="",$t?(n.html5=1,n.proxyPath=""):(o=S("prep",n))&&(n=o),e.name=n),n},attach:function(e,t,i){var o;"iframe"==gt(e)&&(o=pt(e,"id"))&&t&&t instanceof vt&&o==t.id&&($t?((Lt[o]=t)._xmsgcb=i,Rt||(et.attach(G,qe,v),Rt=W)):S("attach",e,t,i))},detach:function(e){var t=pt(e,"id"),i=t&&Lt[t],o=W;if(i){for(t in i&&(i._xmsgcb=Lt[t]=H,i=H,delete Lt[t]),t="",Lt)if((i=Lt[t])&&i[He]){o=K;break}o&&$t&&Rt&&(Rt=K,et.detach(G,qe,v))}else S("detach",e)},usingHTML5:function(){return $t},send:C},et,W),rt(),Et=0==Et.indexOf("file")?"file":Et,(Je="on"+qe)in G?$t=W:(et.attach(G,qe,yt=function(){}),"function"==typeof G[Je]?($t=W,et.detach(G,qe,yt)):$t=K)),Qe.def("$sf.host",{Config:e,PosConfig:t,PosMeta:i,Position:function e(d,a,r,l){var c,u,p=this,w=d&&typeof d;return p instanceof e?null==qt?o("Publisher Config not initialized - abort",W):(w==pe?lt(p,d):c=p.id=nt(d)||rt(J),a?(p.html=a,p.src=""):p.src?p.html=((w=p.src)&&(-1<(w=-1<w.indexOf("${sf_ver}")?w.replace(/\${sf_ver}/gi,$sf.ver):w).indexOf("${ck_on}")&&(u=s()?"1":"0",w=w.replace(/\${ck_on}/gi,u)),-1<w.indexOf("${flash_ver}"))&&(u=n(),w=w.replace(/\${flash_ver}/gi,u)),nt(["<scr","ipt type='text/javascript', src='",w,"'></scr","ipt>"])):(p.html=p.html||"",p.src=""),p.html||(p.html=""),null==r||r instanceof i||(r=new i(r)),p.meta=r||p.meta||new i,p.conf=l||p.conf||{},void(c&&(qt&&qt.positions[c]?p.conf=qt.positions[c]:l&&(l.id=c,p.conf=new t(l))))):new e(d,a,r,l)},nuke:q,get:function(e){return(e=Dt[e])?lt({},e):null},render:function e(){var t,i,o,n,d,s,a,r,l,c,u,p,w,g=0,f=arguments;if(!qt)return K;if(!et.ready())return et.wait((function(){e.apply(H,f),f=H})),H;for(f[0]instanceof Array&&1==f[fe]&&(f=f[0]);t=f[g++];)if((o=(i=t.id)?qt.positions[i]:H)&&(n=(r=o.dest)&&ct(r))){if(c=o.w,u=o.h,!c){try{c=n.offsetWidth}catch(e){c=0}c&&(o.w=c)}if(!u){try{u=n.offsetHeight}catch(e){u=0}u&&(o.h=u)}c&&u&&(a=new vt,d=ct(l=X+"-"+i),s=ut(n),d&&s==d&&(s=ut(d)),U(r),(p=Ot[i])&&clearTimeout(p),Mt[i]&&delete Mt[i],Ot[i]=setTimeout((function(){(e=>{var t=e&&Ot[e];t&&(clearTimeout(t),q(e),A(ie,"render-timeout",e)),B()||(Ut="")})(i)}),qt.to),Ut="rendering",A("onStartPosRender",i,o,t),p=["margin:auto;z-index:0;",he,":",c,ye,";",me,":",u,ye,";","visibility:inherit;"],d?((w=d[ge]).width=c+ye,w.height=u+ye,(w=n&&n[ge]).width=c+ye,w.height=u+ye):((d=et.make("div")).id=l,d.className="iab_sf",c=n.cloneNode(K),et.css(c,p),d.appendChild(c),et.css(d,p),s.replaceChild(d,n),n=ct(r)),a.id=i,a.dest=r,a.conf=vt(o),a.meta=t.meta.toString(),a.html=mt(t.html),a.geom=mt(j(i,n)),a.src=qt.renderFile,a.has_focus=Qe.cstr(document.hasFocus()),p[13]="top:0px;left:0px;visibility:hidden;display:none;max-width:none;max-height:none;",Bt||(et.attach(G,be,M),et.attach(G,"resize",z),et.attach(G,"unload",$),et.attach(G,"focus",L),et.attach(G,"blur",O),Bt=W),tt.replace({id:r,name:a,src:qt.renderFile,_pos_id:i},p,d,N,R),Dt[i]=a,delete(w=$sf.lib.lang.mix({},a,!1,!0)).geom,delete w.has_focus,$sf.info.list.push(w))}},status:function(){return Ut}},H,W)),(e=>{var t=!1,i=!0,o=null,n=e&&e.document,d=e&&e.$sf,s=d&&d.lib,a=s&&s.lang,r=s&&s.dom,l=a&&a.cstr,c=a&&a.guid,u=r&&r.elt,p=r&&r.par,w=r&&r.tags,g=r&&r.attr,f=r&&r.purge,h=r&&r.ready,m={},y=0,T=t,b=t;function S(t,i){var o,a;try{(s=s||d&&d.lib)&&s.logger&&e==top?i?(s.logger.error(t),d.info.errs.push(t)):s.logger.log(t):(o=n.getElementsByTagName("head")[0],(a=n.createElement("script")).type="text/plain",a.text="\x3c!-- SafeFrame "+(i?"error":"log")+": "+(t||"unknown")+" --\x3e",o.appendChild(o,a))}catch(e){}}function v(){var e,t;if(r)for(e in m)(t=u(e))&&(f(t),delete m[e])}function C(){var f,y,C,A,I,k,P,_,x,E,D,L,O,M,z,$=w&&w("script")||[],R=[],B=0,F=t,N=d&&d.host,U=N&&N.conf;if(!d||!a||!r)return S("SafeFrame base library not found",i),F;if(s=s||d&&d.lib,b&&T)return S("Automatic boot already invoked"),F;if(e==top){try{M=N.Config()}catch(e){M=o}if(U&&!M)try{M=N.Config(U)}catch(e){M=o}if(!M)return S("No configuration found",i),F}for(;f=$[B++];)if(("sf_data"==f.className||"text/x-safeframe"==g(f,"type"))&&(T=i,(k=g(f,"id"))||(k=c("sf_data_element"),g(f,"id",k)),!m[k])){C=f.text||f.innerHTML||f.innerText;try{C=a.trim(C),C=(C=new Function("return "+C))()}catch(e){C=o,S("Error parsing tag configuration "+(e&&e.message||""),i);continue}if(C&&C.id&&(C.html||C.src))if(e!=top)z=C.html||(z=C.src,l(["<scr","ipt type='text/javascript', src='",z,"'></scr","ipt>"])),h()?S("cannot write html content into already loaded document"):n.write(z);else if(y=p(f))if((I=M&&M.positions[C.id])||((I=C.conf).id=C.id,I=I&&new N.PosConfig(I)),I){if(I.dest||(I=new N.PosConfig(I,c("sf_position"))),C.meta){for(O in O="",E={},P=C.meta)x=typeof(_=P[O]),!D&&"object"==x&&_&&(D=_,L=O),"object"!=x&&"function"!=x&&(E[O]=_);P=new N.PosMeta(E,L||"",L&&D?D:o)}if(A=new N.Position(C,o,P,I),m[k]=k,!u(I.dest))if(h()){k=r.make("div"),g(k,"id",I.dest);try{y.insertBefore(k,f)}catch(e){S("failed auto-adding destination element "+e.message,i);continue}}else n.write("<div id='",I.dest,"'></div>");R.push(A)}else S("no position conf found pre-defined or inline for position "+C.id,i);else S("can't find parent element for script tag",i);else S("no content or id property found in the inline position object",i)}if(R.length)try{N.render(R)}catch(e){S("failed during rendering "+e.message,i)}else S("No new positions to boot");r.wait(v)}setTimeout((function n(){var s,a,l,c,u,p=i;if(!T)if(a=d&&d.host,e==top){a&&!a.boot&&(a.boot=C);try{s=a&&a.Config()}catch(e){s=o}if(!s)try{s=a&&a.conf}catch(e){s=o}s&&("auto"in s&&s.auto===t&&(p=t),!a.render||!a.Config)&&(l=s.hostFile)?(c=w("head")[0],(u=r.make("script")).id="sf_host_lib",u.type="text/javascript",u.className="sf_lib",u.src=l,e.ActiveXObject?u.onreadystatechange=function(){var e=u.readyState;"loaded"!=e&&"complete"!=e||(b=t,p&&C(),u.onreadystatechange=o,u=c=a=s=o)}:u.onload=function(){b=t,p&&C(),u.onload=o,u=c=a=s=o},b=i,c.appendChild(u)):p&&(s?(b=i,C(),b=t):y++<=100&&setTimeout(n,50))}else C()}),50)})(window)}}},this._isLoaded=!1,this.isLoading=!1,this.loadPromise=null,this.callbacks=[],this.safeFrameInstance=null,this.log=o.log}executeLibraryContent(){return n(this,void 0,void 0,(function*(){try{if(this.SAFEFRAME_LIBRARY_CONTENT(),window.safeFrameInit)return this.safeFrameInstance=window.safeFrameInit,this._isLoaded=!0,this.log("SafeFrame library loaded from embedded content"),this.safeFrameInstance;throw new Error("SafeFrame library content executed but safeFrameInit not found")}catch(e){throw this.log("Error executing SafeFrame library content",e),e}}))}load(){return n(this,void 0,void 0,(function*(){if(this._isLoaded&&this.safeFrameInstance)return this.safeFrameInstance;if(this.isLoading&&this.loadPromise)return this.loadPromise;this.isLoading=!0;try{this.loadPromise=this.executeLibraryContent();const e=yield this.loadPromise;return this.isLoading=!1,this.callbacks.forEach((t=>{try{t(e)}catch(e){this.log("Error in SafeFrame callback",e)}})),this.callbacks=[],e}catch(e){throw this.isLoading=!1,this.loadPromise=null,e}}))}init(e){return n(this,void 0,void 0,(function*(){if(e)for(const t of e)t.id&&this.log("SafeFrame ID found in configuration",t.id);const t=yield this.load();return e&&t.setConfig(e),t.init(),t}))}isLoaded(){return this._isLoaded&&!!this.safeFrameInstance}getInstance(){return this.safeFrameInstance}onLoad(e){this._isLoaded&&this.safeFrameInstance?e(this.safeFrameInstance):this.callbacks.push(e)}reset(){this._isLoaded=!1,this.isLoading=!1,this.loadPromise=null,this.callbacks=[],this.safeFrameInstance=null;const e=window;e.safeFrameInit&&delete e.safeFrameInit,window&&window.safeFrameInit&&delete window.safeFrameInit}}const a=s},862:(e,t,i)=>{i.d(t,{K:()=>s}),e=i.hmd(e);const o={};var n,d;function s(e){return o.TCStringParse(e)}n=o,d=function(){function e(e){return parseInt(e,2)||0}var t=function(t){return 100*e(t)},i=function(t){for(var i="A".charCodeAt(),o=t.match(/.{6}/g)||[],n="",d=0,s=o.length;d<s;d+=1){var a=e(o[d])+i;n+=String.fromCharCode(a)}return n},o=function(e){return Boolean(Number(e))},n=function(e){for(var t=e.split(""),i={},n=0,d=t.length;n<d;n+=1)i[n+1]=o(t[n]);return i},d=function(e){for(var t=e.split(""),i={},n=0,d=Math.min(11,t.length);n<d;n+=1)i[n+1]=o(t[n]);return i},s=function(e){for(var t=e.split(""),i={},n=0,d=Math.min(1,t.length);n<d;n+=1)i[n+1]=o(t[n]);return i};return function(a){function r(e,t,i,d){function s(){if(d.pubRestrictionEntry&&d.rangeEntry)for(var t in d.rangeEntry)Object.prototype.hasOwnProperty.call(d.rangeEntry,t)&&(d.pubRestrictionEntry[t]=(d.pubRestrictionEntry[t]||[]).concat(d.rangeEntry[t]));d.numPubRestrictions&&(--d.numPubRestrictions,e.push({key:"purposeId",size:6},{key:"restrictionType",size:2},{key:"numEntries",size:12}))}function a(){d.numEntries?(--d.numEntries,e.push({key:"isRange",size:1,decoder:o},{key:"startVendorId",size:16})):s()}function r(){return!d.purposeId||[{purpose:d.purposeId,isAllowed:0!==d.restrictionType,isConsentRequired:1===d.restrictionType,isLegitimateInterestRequired:2===d.restrictionType}]}if("isRangeEncoding"===t.key)e.push(i?{key:"numEntries",size:12}:{key:"bitField",size:d.maxVendorId,decoder:n});else if("numEntries"===t.key)d.rangeEntry={},a();else if("isRange"===t.key)i&&e.push({key:"endVendorId",size:16});else if("startVendorId"===t.key)d.isRange||(d.rangeEntry[i]=r(),a());else if("endVendorId"===t.key){for(var l=d.startVendorId;l<=d.endVendorId;l+=1)d.rangeEntry[l]=r();a()}else"numCustomPurposes"===t.key?e.push({key:"customPurposeConsents",size:d.numCustomPurposes,decoder:n},{key:"customPurposeLegitimateInterests",size:d.numCustomPurposes,decoder:n}):"numPubRestrictions"===t.key&&(d.pubRestrictionEntry={},s())}function l(e){return e.pubRestrictionEntry||e.rangeEntry||e.bitField||e}function c(t,i){var o=i.slice(p,p+t.size);return p+=t.size,(t.decoder||e)(o)}function u(e,t){for(var i={},o=0;o<e.queue.length;o+=1){var n=e.queue[o],d=function(e,t){if(!e.queue)return c(e,t);for(var i={},o=0;o<e.queue.length;o+=1){var n=e.queue[o],d=c(n,t);n.key&&(i[n.key]=d),r(e.queue,n,d,i)}return l(i)}(n,t);n.key&&(i[n.key]=d),r(e.queue,n,d,i)}return l(i)}var p=0;return function(){for(var n=function(t){if("string"!=typeof t)throw new Error("Invalid transparency and consent string specified");for(var i=t.split("."),o=[],n=0,d=i.length;n<d;n+=1)o.push(function(e){for(var t="",i=0,o=e.length;i<o;i+=1){var n=e.charCodeAt(i).toString(2);t+="00000000".slice(0,8-n.length)+n}return t}(function(e){if("function"==typeof atob){var t=e.replace(/_/g,"/").replace(/-/g,"+");try{return atob(t)}catch(e){throw new Error("Unable to decode transparency and consent string")}}if("function"==typeof Buffer)return Buffer.from(e,"base64").toString("binary");throw new Error("Unable to detect base64 decoder")}(i[n])));var s=e(o[0].slice(0,6));if(2!==s)throw new Error("Unsupported transparency and consent string version "+s);return o}(a),r=function(n){for(var a=[{key:"purposeConsents",size:24,decoder:d},{key:"purposeLegitimateInterests",size:24,decoder:d}],r=[{key:"maxVendorId",size:16},{key:"isRangeEncoding",size:1,decoder:o}],l=[{key:"version",size:6},{key:"created",size:36,decoder:t},{key:"lastUpdated",size:36,decoder:t},{key:"cmpId",size:12},{key:"cmpVersion",size:12},{key:"consentScreen",size:6},{key:"consentLanguage",size:12,decoder:i},{key:"vendorListVersion",size:12},{key:"policyVersion",size:6},{key:"isServiceSpecified",size:1,decoder:o},{key:"useNonStandardStacks",size:1,decoder:o},{key:"specialFeatureOptins",size:12,decoder:s}].concat(a).concat({key:"purposeOneTreatment",size:1,decoder:o},{key:"publisherCountryCode",size:12,decoder:i},{key:"vendorConsents",queue:[{key:"maxVendorId",size:16},{key:"isRangeEncoding",size:1,decoder:o}]},{key:"vendorLegitimateInterests",queue:r},{key:"publisherRestrictions",queue:[{key:"numPubRestrictions",size:12}]}),c=[{size:3}],u=[].concat(c).concat(r),p=[].concat(c).concat(r),w=[].concat(c).concat(a).concat({key:"numCustomPurposes",size:6}),g=[{key:"core",queue:l}],f=1;f<n.length;f+=1){var h=e(n[f].slice(0,3));1===h?g.push({key:"disclosedVendors",queue:u}):2===h?g.push({key:"allowedVendors",queue:p}):3===h&&g.push({key:"publisherTC",queue:w})}return g}(n),l={},c=0;c<r.length;c+=1){var w=r[c],g=u(w,n[c]);w.key&&(l[w.key]=g),p=0}l.publisherTC=l.publisherTC||{},l.publisherTC.purposeConsents=l.publisherTC.purposeConsents||{},l.publisherTC.purposeLegitimateInterests=l.publisherTC.purposeLegitimateInterests||{};for(var f=1;f<=11;f+=1)f in l.publisherTC.purposeConsents||(l.publisherTC.purposeConsents[f]=!1),f in l.publisherTC.purposeLegitimateInterests||(l.publisherTC.purposeLegitimateInterests[f]=!1);return l}()}},"function"==typeof define&&i.amdO?define([],d):e.exports?e.exports=d():n.TCStringParse=d()}},t={};function i(o){var n=t[o];if(void 0!==n)return n.exports;var d=t[o]={id:o,loaded:!1,exports:{}};return e[o](d,d.exports,i),d.loaded=!0,d.exports}i.amdO={},i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};i.d(o,{A:()=>y});class n{constructor(e,t,i){this.screen=e,this.setup=t,this.divIdPrefix=i}addInterstitial(e){var t,i,o,n;if((null===(t=this.setup.adSlotsConfig)||void 0===t?void 0:t.hasOwnProperty(`disable${this.screen}Interstitial`))&&this.setup.adSlotsConfig[`disable${this.screen}Interstitial`])return;const d=(null===(i=this.setup.adSlotsConfig)||void 0===i?void 0:i[`nameInterstitial${this.screen}`])||`${this.screen}_Interstitial`,{cdValue:s,adUnitPathSuffix:a,customKeyValues:r}=(null===(n=null===(o=this.setup.adSlotsConfig)||void 0===o?void 0:o.adSlotsDefinitions)||void 0===n?void 0:n.find((e=>e.name===d)))||{};e[d]=Object.assign(Object.assign(Object.assign({name:d,adUnit:d,divId:`${this.divIdPrefix}${d}`,loadType:this.getLoadType(),lazyLoadPx:900,dfpSizes:[[320,480],[336,280],[300,250],[250,250]]},s&&{cdValue:s}),a&&{customAdUnitCode:a}),r&&{customKeyValues:r})}isInterstitialSlot(e){return e.toLowerCase().includes("interstitial")}getLoadType(){return 6}}class s{constructor(e,t,i){this.screen=e,this.setup=t,this.divIdPrefix=i}addSideRails(e){var t,i,o,n,d;((null===(i=null===(t=this.setup.adSlotsConfig)||void 0===t?void 0:t.sideRailsConfig)||void 0===i?void 0:i.enableLeft)||(null===(n=null===(o=this.setup.adSlotsConfig)||void 0===o?void 0:o.sideRailsConfig)||void 0===n?void 0:n.enableRight))&&document.documentElement.clientWidth>=1200&&document.documentElement.clientHeight>=650&&Object.keys((null===(d=this.setup.adSlotsConfig)||void 0===d?void 0:d.sideRailsConfig)||{}).forEach((t=>{var i,o,n,d,s,a;if(null===(o=null===(i=this.setup.adSlotsConfig)||void 0===i?void 0:i.sideRailsConfig)||void 0===o?void 0:o[t]){const i="enableLeft"===t?"Left":"Right",o=(null===(d=null===(n=this.setup.adSlotsConfig)||void 0===n?void 0:n.sideRailsConfig)||void 0===d?void 0:d[`nameSiderail${i}`])||`SideRail_${i}`,{cdValue:r,adUnitPathSuffix:l,refreshDelay:c,customKeyValues:u}=(null===(a=null===(s=this.setup.adSlotsConfig)||void 0===s?void 0:s.adSlotsDefinitions)||void 0===a?void 0:a.find((e=>e.name===o)))||{};e[o]=Object.assign(Object.assign(Object.assign(Object.assign({name:o,adUnit:o,divId:`${this.divIdPrefix}${o}`,loadType:this.getLoadType(),lazyLoadPx:900,dfpSizes:[]},r&&{cdValue:r}),l&&{customAdUnitCode:l}),c&&{refreshDelay:c}),u&&{customKeyValues:u})}}))}isSideRailSlot(e){return e.toLowerCase().includes("siderail")}getLoadType(){return 7}}class a{constructor(e,t,i,o,n,d,s){this.screen=e,this.setup=t,this.divIdPrefix=i,this.rewardedAdCookie=o,this.rewardedAdFrequency=n,this.rewardedAdFrequencyImps=d,this.rewardedAdFrequencyInterval=s}addRewardedAds(e){var t,i,o,n,d,s;if(!(null===(t=this.setup.adSlotsConfig)||void 0===t?void 0:t.rewardedAdConfiguration)||!this.checkRewardedAdFrequency()||(null===(i=this.setup.adSlotsConfig)||void 0===i?void 0:i.hasOwnProperty(`disable${this.screen}RewardedAd`))&&this.setup.adSlotsConfig[`disable${this.screen}RewardedAd`])return;const a=(null===(n=null===(o=this.setup.adSlotsConfig)||void 0===o?void 0:o.rewardedAdConfiguration)||void 0===n?void 0:n[`nameRewardedAd${this.screen}`])||`${this.screen}_RewardedAd`,{cdValue:r,adUnitPathSuffix:l,customKeyValues:c}=(null===(s=null===(d=this.setup.adSlotsConfig)||void 0===d?void 0:d.adSlotsDefinitions)||void 0===s?void 0:s.find((e=>e.name===a)))||{};e[a]=Object.assign(Object.assign(Object.assign({name:a,adUnit:a,divId:`${this.divIdPrefix}${a}`,loadType:this.getLoadType(),lazyLoadPx:900,dfpSizes:[[320,480],[336,280],[300,250],[250,250]]},r&&{cdValue:r}),l&&{customAdUnitCode:l}),c&&{customKeyValues:c})}isRewardedAdSlot(e){return e.toLowerCase().includes("rewardedad")}getLoadType(){return 8}checkRewardedAdFrequency(){if(this.rewardedAdFrequency){const e=this.getCookie(this.rewardedAdCookie);if(void 0!==e&&e>=this.rewardedAdFrequencyImps)return!1}return!0}getCookie(e){var t;const i=`; ${document.cookie}`.split(`; ${e}=`);if(2===i.length){const e=null===(t=i.pop())||void 0===t?void 0:t.split(";").shift();return e?parseInt(e,10):0}return 0}}class r{constructor(e,t,i){this.stickyAdDivIds={},this.stickyAdModes={},this.stickyAdStatuses={},this.stickyAdTopTriggers={},this.stickyAdAutoHidePxValues={},this.screen=e,this.setup=t,this.divIdPrefix=i}getStickyAdConfigurations(){var e;const t=this.setup,i=this.screen,o=`${i}_Sticky_`,n=(null===(e=null==t?void 0:t.adSlotsConfig)||void 0===e?void 0:e.stickyAdConfiguration)||(null==t?void 0:t.stickyAdConfiguration);if(!n)return[];if("object"==typeof n){const e=Object.keys(n),t=e.some((e=>e.includes(o))),d=e.some((e=>e.includes("_Sticky_")));if(t){const e=[];for(const[t,o]of Object.entries(n))t.includes(i)&&e.push({slotName:t,config:o});return e}if(d)return[];const s=this.getStickyAdName(n);return s?[{slotName:s,config:n}]:[]}return[]}getStickyAdConfigurationBySlotName(e,t){var i,o,n;const d=`name${this.screen}`;if(t&&t.length>0){const i=t.find((({slotName:t,config:i})=>t===e||i&&i[d]===e));if(i)return i.config}const s=null===(o=null===(i=this.setup)||void 0===i?void 0:i.adSlotsConfig)||void 0===o?void 0:o.stickyAdConfiguration;if(s&&"object"==typeof s&&!Array.isArray(s)){if(!Object.keys(s).some((e=>e.includes(`${this.screen}_Sticky_`))))return s;{const t=s,i=Object.values(t).find((t=>t&&"object"==typeof t&&t[d]===e));if(i)return i;if(t[e])return t[e]}}const a=null===(n=this.setup)||void 0===n?void 0:n.stickyAdConfiguration;return a||null}createStickyAd(e,t){var i,o,n;if(!e||"string"!=typeof e)return void(t.log&&t.log("createStickyAd NOSTICKY because adSlotName is invalid"));const{initConfigAdUnit:d,log:s,getCookie:a,stickyFrequency:r,stickyFrequencyImps:l,stickyCookie:c,firstLoadAdSlots:u=[],setAttributes:p,stickyAutoCloseScroll:w,refreshAdSlots:g,onLegacyStateUpdate:f,adLayoutEnabled:h}=t,m=this.screen,y=this.setup,T=this.getStickyAdConfigurations();let b=this.getStickyAdConfigurationBySlotName(e,T);const S=/[^a-zA-Z0-9]/g,v=(null===(i=null==y?void 0:y.adSlotsConfig)||void 0===i?void 0:i.stickyAdConfiguration)||(null==y?void 0:y.stickyAdConfiguration);if(!b)return;const C=(null==b?void 0:b.frequency)||r,A=(null==b?void 0:b.frequencyImps)||l;if(C&&a&&c){const e=a(c);if(void 0!==e&&e&&parseInt(e)>=(A||0))return}const I=`disable${m}`,k=`adUnitsExcluded${m}`,P=(null==b?void 0:b.hasOwnProperty(I))&&b[I],_=(null==b?void 0:b.adUnitsExcluded)&&Array.isArray(b.adUnitsExcluded)&&b.adUnitsExcluded.includes(d),x=null==b?void 0:b[k],E=x&&Array.isArray(x)&&x.includes(d),D=null==y?void 0:y.adSlotsConfig,L=null===(o=null==D?void 0:D.adSlotsDefinitions)||void 0===o?void 0:o.some((t=>t.name===e&&0===t.status));if(P||_||E||L)return;let O=this.getStickyAdModeFromConfig(b,e);"top"===O&&(this.setStickyAdTopTrigger(e,0),this.setStickyAdAutoHidePx(e,0));const M=`stickyAdTopTrigger${m}`,z=`stickyAdAutoHidePx${m}`,$=(null==b?void 0:b.hasOwnProperty(M))?b[M]:(null==v?void 0:v.hasOwnProperty(M))?v[M]:void 0,R=(null==b?void 0:b.hasOwnProperty(z))?b[z]:(null==v?void 0:v.hasOwnProperty(z))?v[z]:void 0;null!=$?this.setStickyAdTopTrigger(e,$):this.setStickyAdTopTrigger(e,this.getStickyAdTopTrigger(e)||0),null!=R?this.setStickyAdAutoHidePx(e,R):this.setStickyAdAutoHidePx(e,0);const B=`${this.divIdPrefix}${e}`,F=0===Object.keys(this.stickyAdDivIds).length;this.setStickyAdMode(e,O),this.setStickyAdDivId(e,B),this.setStickyAdStatus(e,"off");const N=this.getStickyAdTopTrigger(e),U=this.getStickyAdAutoHidePx(e);f&&F&&f({stickyAdDivId:B,stickyAdMode:O,stickyAdStatus:"off",stickyAdTopTrigger:N,stickyAdAutoHidePx:U}),s&&s("createStickyAd MODE:"+O+" with ADSLOT: "+e);const j=(null==b?void 0:b.zIndex)||"10";let V=(null==b?void 0:b.adCloseTop)||"-24";"top"===O&&"-24"===V&&(V="-23");let q=document.createElement("style");const G=null==b?void 0:b[`stickyAdMode${m}X`],H="none"===G?"none":"left"===G?"left":"inner-left"===G?"inner-left":"right",W=null==b?void 0:b.backgroundColor,K=!W||!(W.includes("rgba")&&parseFloat(W.split(",")[3])<1),Y=this.isVerticalStickyAdSlot(e);let J,X,Z,Q,ee,te,ie,oe,ne;if(Y)J="top",X="20",Z="left"===H||"inner-left"===H?"left":"right",Q="8",ee="border: 1px solid #999;",te="50%",ie="",oe="48",ne="48";else{if(J="inner-left"===H||"bottom"===O?"top":"bottom",X="inner-left"===H?"3":"-24",Z="left"===H||"inner-left"===H?"left":"right",Q="inner-left"===H?"3":"0",oe="24",ne="24",ee="border: none;",K)if("inner-left"===H)ee="border: 1px solid #999;";else if("bottom"===O){ee=`border-${"left"===H?"right":"left"}: 1px solid #999; border-top: 1px solid #999; border-${"left"===H?"left":"right"}: none; border-bottom: none;`}else ee="border: none;";if(te="0px 0 0 12px","inner-left"===H?te="50%":"top"===O?te="left"===H?"0 0 12px 0":"0px 0 0 12px":"bottom"===O&&(te="left"===H?"0 12px 0 0":"12px 0 0 0"),ie="",K&&"inner-left"!==H){ie=`box-shadow: 0 ${"bottom"===O?"-1px":"1px"} 1px 0 rgba(0, 0, 0, 0.2);`}}const de=W||"#fff",se=Y||!K?"":"border-top: 1px solid #999; box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2);",ae=e.replace(S,"_"),re=`opd_adsticky_${ae}`,le=`opd_adsticky-scroll_${ae}`,ce=`opd_adsticky-close_${ae}`,ue=`opd_adclosebox_${ae}`,pe=`opd_adclose_${ae}`,we=this.getStickyAdContainerId(e);let ge="";if(Y){ge=`\n        .${re} {\n          display: none;\n          position: fixed;\n          ${"left"===O?"left: 0;":"right: 0;"}\n          top: ${(null==b?void 0:b.topValue)||"50%"};\n          transform: translateY(-50%) scale(${(null==b?void 0:b.verticalScale)||"0.4"});\n          transform-origin: ${O} center;\n          width: 300px;\n          height: auto;\n          padding: 0;\n          text-align: center;\n          background-color: ${de};\n          z-index: ${j};\n        }\n        .${re} .optidigital-wrapper-div {\n          width: 300px !important;\n          min-width: 300px !important;\n          max-width: 300px !important;\n          margin: 0 !important;\n          padding: 0 !important;\n        }\n      `}else ge=`\n        .${re} {\n          display: none;\n          position: fixed;\n          margin-bottom: 0;\n          ${O}: 0;\n          left: 0;\n          width: 100%;\n          height: auto;\n          padding: 5px 0 4px;\n          text-align: center;\n          background-color: ${de};\n          ${se}\n        }\n      `;q.innerHTML=`\n      ${ge}\n      .${le}:not(.${ce}) {\n        display: block;\n      }\n      /* Hide sticky ad when close class is present - works for both base and scroll states */\n      .${re}.${ce},\n      .${le}.${ce},\n      [id="${we}"].${ce} {\n        display: none !important;\n        visibility: hidden !important;\n        opacity: 0 !important;\n      }\n      .${ue} {\n        appearance: none;\n        cursor: pointer;\n        position: absolute;\n        pointer-events: auto;\n        z-index: ${parseInt(j)+1};\n        ${"none"===H?"display: none;":""}\n        ${J}: ${X}px !important;\n        ${Z}: ${Q}px !important;\n        width: ${oe}px;\n        height: ${ne}px;\n        padding: 0px 0 0 0px;\n        background-color: ${de};\n        ${ee}\n        border-radius: ${te};\n        font-size: 1.4em;\n        color: #444;\n        ${ie}\n      }\n      .${pe} {\n        position: absolute;\n        left: ${Y?"6":"left"===H||"inner-left"===H?"2":"4"}px;\n        top: ${Y?"6":"inner-left"===H?"3":"4"}px;\n        width: ${Y?"32px":"16px"};\n        height: ${Y?"32px":"16px"};\n        opacity: 1;\n        text-align: center;\n        pointer-events: none;\n      }\n      .${pe}:before,\n      .${pe}:after {\n        position: absolute;\n        content: ' ';\n        height: ${Y?"32px":"16px"};\n        width: 2px;\n        background-color: #333;\n      }\n      .${pe}:before {\n        transform: rotate(45deg);\n      }\n      .${pe}:after {\n        transform: rotate(-45deg);\n      }\n    `;const fe=document.body;if(fe)fe.appendChild(q);else{const e=setInterval((()=>{document.body&&(document.body.appendChild(q),clearInterval(e))}),50)}let he=document.createElement("div");const me=`z-index:${j};`;p?p(he,{id:we,class:`opd_adsticky ${re}`,style:me}):(he.id=we,he.className=`opd_adsticky ${re}`,he.setAttribute("style",me));let ye=document.createElement("span");ye.setAttribute("class",`opd_adclose ${pe}`);let Te=document.createElement("button");Te.type="button";const be=Y?"":`${"bottom"===O?"top":"bottom"}:${"inner-left"===H?"3":V}px!important;`;p?p(Te,{class:`opd_adclosebox ${ue}`,style:be}):(Te.className=`opd_adclosebox ${ue}`,be&&Te.setAttribute("style",be));const Se=this,ve=function(t){t.preventDefault(),t.stopPropagation();try{const t=document.getElementById(we);if(t&&(t.classList.add("opd_adsticky-close",ce),Se.setStickyAdStatus(e,"closed"),f)){const e=window.odT;if(e&&e.stickyAdDivId===B){f({stickyAdStatus:"closed"});const e=document.getElementById("opd_bottomstickyad");e&&e.classList.add("opd_adsticky-close")}}}catch(e){}return!1};Te.addEventListener("click",ve,!1),Te.addEventListener("mousedown",ve,!1),Te.addEventListener("touchstart",ve,!1);let Ce=document.createElement("div");p?p(Ce,{id:B,class:e,style:"display: none;"}):(Ce.id=B,Ce.className=e,Ce.setAttribute("style","display: none;")),h||Ce.classList.add("optidigital-ad-center"),Te.appendChild(ye),"bottom"==O?(he.appendChild(Te),he.appendChild(Ce)):(he.appendChild(Ce),he.appendChild(Te)),0==N&&(this.setStickyAdStatus(e,"init"),u.push(e),f&&f({stickyAdStatus:"init"}));const Ae=(null==b?void 0:b.stickyTarget)||"body",Ie=document.querySelector(Ae);if(Ie)Ie.appendChild(he);else if(fe)fe.appendChild(he);else{const e=setInterval((()=>{const t=document.querySelector(Ae);t?(clearInterval(e),t.appendChild(he)):document.body&&(clearInterval(e),document.body.appendChild(he))}),50)}if(!(null===(n=window.odT)||void 0===n?void 0:n._stickyScrollListenerAdded)){window.odT=window.odT||{},window.odT._stickyScrollListenerAdded=!0;let e=!1;const t=document.body,i=document.documentElement,o=e=>{let t=he.getAttribute("style")||"";t.includes("display:")?t=t.replace("block"===e?"display: none;":"display: block;","block"===e?"display: block;":"display: none;"):t+="block"===e?"display: block;":"display: none;",p?p(he,{id:we,style:t}):(he.id=we,he.setAttribute("style",t))};document.addEventListener("scroll",(()=>{e||(e=!0,requestAnimationFrame((()=>{var n;const d=t.scrollTop||i.scrollTop,s=null===(n=window.odT)||void 0===n?void 0:n.stickyAdapter;if(!s)return void(e=!1);s.getAllStickyAdSlotNames().forEach((e=>{const t=s.getStickyAdTopTrigger(e)||0,i=s.getStickyAdMode(e),n=s.getStickyAdStatus(e);if(d>t&&("off"===n||"hidden"===n))if("hidden"===n)s.setStickyAdStatus(e,"rendered"),o("block");else{s.setStickyAdStatus(e,"init");const t=window.odT;(null==t?void 0:t.userAction)&&!t.userAction.length&&t.userAction.push("triggerSticky"),g&&g(e)}d<t&&"rendered"===n&&(s.setStickyAdStatus(e,"hidden"),o("none"));const a=s.getStickyAdAutoHidePx(e)||0;if("top"===i&&"rendered"===n&&a>0){const t=s.getStickyAdContainerId(e),i=document.getElementById(t);if(i){const t=`opd_adsticky-close opd_adsticky-close_${e.replace(S,"_")}`;d>a?i.classList.remove(t):w&&i.classList.add(t)}}})),e=!1})))}),{passive:!0})}}getStickyAdName(e,t){var i;const o=this.screen,n=this.setup,d=`name${o}`,s=`mode${o}`;if(null==e?void 0:e[d])return e[d];if(t)return t;const a=e||(null===(i=null==n?void 0:n.adSlotsConfig)||void 0===i?void 0:i.stickyAdConfiguration)||(null==n?void 0:n.stickyAdConfiguration);if(!a||"object"!=typeof a||Array.isArray(a))return;const r=a;if(r[d])return r[d];const l=Object.keys(r);if(l.some((e=>e.includes("_Sticky_")))&&!l.some((e=>e.includes(`${o}_Sticky_`))))return;const c={"sticky-top":"top","sticky-left":"left","sticky-right":"right"};let u="bottom";if(r.hasOwnProperty(s)){u=c[r[s]]||"bottom"}if(u){return{left:`${o}_Sticky_Left`,right:`${o}_Sticky_Right`,top:`${o}_Sticky_Top`,bottom:`${o}_Sticky_Bottom`}[u]}}getStickyAdContainerId(e){return e.toLowerCase().includes("bottom")?"opd_bottomstickyad":`opd_sticky_${e.replace(/[^a-zA-Z0-9]/g,"_")}`}getStickyAdModeFromConfig(e,t){if(t){const e=t.toLowerCase().split("_").pop();if(e&&["top","bottom","left","right"].includes(e))return e}if(e.hasOwnProperty(`mode${this.screen}`)){const t=e[`mode${this.screen}`];if("sticky-top"==t)return"top";if("sticky-left"==t)return"left";if("sticky-right"==t)return"right"}return"bottom"}isVerticalStickyAdSlot(e){const t=this.getStickyAdConfigurations();for(const{slotName:i,config:o}of t)if(i.toLowerCase()===e.toLowerCase()||(null==o?void 0:o[`name${this.screen}`])===e){const e=i.toLowerCase();return e.includes("sticky")&&(e.includes("left")||e.includes("right"))}const i=e.toLowerCase();return i.includes("sticky")&&(i.includes("left")||i.includes("right"))}isStickyAdSlot(e){return!!this.getStickyAdConfigurations().find((({slotName:t,config:i})=>t.toLowerCase()===e.toLowerCase()||(null==i?void 0:i[`name${this.screen}`])===e))}isVerticalStickySlot(e){if(!this.isStickyAdSlot(e))return!1;return!!this.getStickyAdMode(e)&&this.isVerticalStickyAdSlot(e)}getLoadType(){return 5}getVerticalSizes(){return[["fluid"],[300,600],[300,350],[300,250],[336,280],[160,600],[120,600],[250,250],[200,200]]}getHorizontalSizes(){return"Mobile"===this.screen?[[320,50],[320,80],[320,100],[300,100],[300,50]]:[[1e3,90],[970,90],[728,90]]}filterVerticalSizes(e){return e.filter((e=>{if(!Array.isArray(e))return!1;if(1===e.length&&"fluid"===e[0])return!0;if(2!==e.length)return!1;const t=e[0],i=e[1];return"number"==typeof t&&"number"==typeof i&&i>t}))}getStickyAdDivId(e){return this.stickyAdDivIds[e]}getStickyAdMode(e){return this.stickyAdModes[e]}getStickyAdStatus(e){return this.stickyAdStatuses[e]}getStickyAdTopTrigger(e){return this.stickyAdTopTriggers[e]}getStickyAdAutoHidePx(e){return this.stickyAdAutoHidePxValues[e]}getAllStickyAdSlotNames(){return Object.keys(this.stickyAdDivIds)}getStickyAdSlotNameFromDivId(e){for(const[t,i]of Object.entries(this.stickyAdDivIds))if(i===e)return t;return null}shouldRefreshStickyAd(e,t){if(!e)return!1;const i=this.getStickyAdContainerId(e),o=document.getElementById(i),n=`opd_adsticky-scroll_${e}`,d=`opd_adsticky-close_${e}`,s=t||!o||!o.classList.contains(n),a=!o||!o.classList.contains(d);return s&&a}setStickyAdDivId(e,t){this.stickyAdDivIds[e]=t}setStickyAdMode(e,t){this.stickyAdModes[e]=t}setStickyAdStatus(e,t){this.stickyAdStatuses[e]=t}setStickyAdTopTrigger(e,t){this.stickyAdTopTriggers[e]=t}setStickyAdAutoHidePx(e,t){this.stickyAdAutoHidePxValues[e]=t}setStickyAdState(e,t){this.setStickyAdDivId(e,t.divId),this.setStickyAdMode(e,t.mode),this.setStickyAdStatus(e,t.status),this.setStickyAdTopTrigger(e,t.topTrigger),this.setStickyAdAutoHidePx(e,t.autoHidePx)}addStickyAdSlots(e,t){var i;const o=this.screen,n=this.divIdPrefix,d=this.setup,s=`${o}_Sticky_`,a=`stickyAdTopTrigger${o}`,r=`stickyAdAutoHidePx${o}`,l=null===(i=null==d?void 0:d.adSlotsConfig)||void 0===i?void 0:i.adSlotsDefinitions,c=this.getStickyAdConfigurations().filter((({slotName:e})=>e.startsWith(s)));0!==c.length&&c.forEach((({slotName:i,config:d})=>{const s=i,c=`${n}${s}`;if(!document.getElementById(c))return;const u=null==l?void 0:l.find((e=>e.name===s)),{cdValue:p,adUnitPathSuffix:w,customKeyValues:g,outOfPage:f,adTemplate:h}=u||{},m=this.getStickyAdModeFromConfig(d),y=d[a]||0,T=d[r]||100;e[s]=Object.assign(Object.assign(Object.assign(Object.assign({name:s,adUnit:s,divId:c,loadType:this.getLoadType(),lazyLoadPx:0,lazyLoadPxWithCore:900,dfpSizes:[],adTemplate:h||`${o}sticky`},p&&{cdValue:p}),w&&{customAdUnitCode:w}),g&&{customKeyValues:g}),f&&{outOfPage:f});const b={divId:c,mode:m,status:"off",topTrigger:y,autoHidePx:T};this.setStickyAdState(s,b),t.setStickyAdState(s,b)}))}getStickyNames(){var e,t,i;const o=this.getStickyAdConfigurations();if(o.length>0)return o.map((({slotName:e,config:t})=>this.getStickyAdName(t,e)||e)).filter((e=>e));{const o=(null===(t=null===(e=window.odT.setup)||void 0===e?void 0:e.adSlotsConfig)||void 0===t?void 0:t.stickyAdConfiguration)||(null===(i=window.odT.setup)||void 0===i?void 0:i.stickyAdConfiguration),n=(null==o?void 0:o[`name${this.screen}`])||this.getStickyAdName(o)||null;return n?[n]:[]}}}class l{constructor(e,t,i,o,d,l,c){this.interstitialAdapter=new n(e,t,i),this.sideRailsAdapter=new s(e,t,i),this.rewardedAdsAdapter=new a(e,t,i,o,d,l,c),this.stickyAdapter=new r(e,t,i)}addSpecialAdSlots(e,t){this.interstitialAdapter.addInterstitial(e),this.sideRailsAdapter.addSideRails(e),this.rewardedAdsAdapter.addRewardedAds(e),t&&this.stickyAdapter.addStickyAdSlots(e,t)}isSpecialAdSlot(e){return this.interstitialAdapter.isInterstitialSlot(e)||this.sideRailsAdapter.isSideRailSlot(e)||this.rewardedAdsAdapter.isRewardedAdSlot(e)}isSpecialAdLoadType(e){return e===this.interstitialAdapter.getLoadType()||e===this.sideRailsAdapter.getLoadType()||e===this.rewardedAdsAdapter.getLoadType()||e===this.stickyAdapter.getLoadType()}getStickyAdapter(){return this.stickyAdapter}}var c=function(e,t,i,o){return new(i||(i=Promise))((function(n,d){function s(e){try{r(o.next(e))}catch(e){d(e)}}function a(e){try{r(o.throw(e))}catch(e){d(e)}}function r(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}r((o=o.apply(e,t||[])).next())}))};class u{constructor(e){var t,i,o,n,d,s,a,r,l,c,u;if(this.baseAutoInsertion={parentDiv:".od-ai-wrapper",divIdPrefix:"optidigital-adslot-",interval:300,previousType:"p",positionFirst:1,dontBreakWithPreviousType:["ul","ol"],keepTheDistancePx:100,keepDistanceFromTheBottom:100,intervalIncrement:300,recurrenceLevel:2,insertAdslotBeforeTarget:!1,insertAdslotIntoTarget:!1,debug:!1},this.autoInsertionDesktop=Object.assign(Object.assign({},this.baseAutoInsertion),{adSlots:this.generateAdSlots("Content_AI_",6)}),this.autoInsertionMobile=Object.assign(Object.assign({},this.baseAutoInsertion),{adSlots:this.generateAdSlots("Mobile_AI_",6)}),this.runImmediately=!0,this.scrollHandler=()=>{var e,t,i,o;((null===(i=null===(t=null===(e=window.odT.setup)||void 0===e?void 0:e.adSlotsConfig)||void 0===t?void 0:t.aiContent)||void 0===i?void 0:i[`enable${window.odT.screen}`])||(null===(o=window.odT)||void 0===o?void 0:o.forceAiContent))&&this.addAiArticle()},this.optidigitaltagsinserter=e,this.articleContentAdded=!1,this.articleHtmlFromApi={},this.articleContentAdded||!this.optidigitaltagsinserter||!(null===(o=null===(i=null===(t=window.odT.setup)||void 0===t?void 0:t.adSlotsConfig)||void 0===i?void 0:i.aiContent)||void 0===o?void 0:o[`enable${window.odT.screen}`])&&!(null===(n=window.odT)||void 0===n?void 0:n.forceAiContent))return;window.odT.analytics.setContentMetrics(!0);const p=null===(s=null===(d=window.odT.setup)||void 0===d?void 0:d.adSlotsConfig)||void 0===s?void 0:s.rewardedAdConfiguration,w=(null==p?void 0:p.articleContentSelector)||"article",g=document.querySelector(w);(null===(r=null===(a=window.odT.setup)||void 0===a?void 0:a.adSlotsConfig)||void 0===r?void 0:r.rewardedAdConfiguration)&&(null===(u=null===(c=null===(l=window.odT.setup)||void 0===l?void 0:l.adSlotsConfig)||void 0===c?void 0:c.rewardedAdConfiguration)||void 0===u?void 0:u.enableForArticles)&&window.odT.adAdaptersFactory.rewardedAdsAdapter.checkRewardedAdFrequency()&&g||(this.runImmediately=!1),this.runImmediately?this.scrollHandler():window.addEventListener("scroll",this.scrollHandler,{passive:!0})}generateAdSlots(e,t){return Array.from({length:t},((t,i)=>`${e}${i+1}`))}addAiArticle(){var e,t,i,o,n;window.odT.log("AI-Based Content: Trying to add AI article content"),window.removeEventListener("scroll",this.scrollHandler),this.articleContentAdded=!0;const d=(null===(i=null===(t=null===(e=window.odT.setup)||void 0===e?void 0:e.adSlotsConfig)||void 0===t?void 0:t.aiContent)||void 0===i?void 0:i.articleSelector)||(null===(n=null===(o=window.odT)||void 0===o?void 0:o.analytics)||void 0===n?void 0:n.articleSelector);window.odT.log(`AI-Based Content: Article container selector: ${d}`);document.querySelector(d)?this.checkAvailability().then((e=>{var t,i,o,n,s,a,r,l,c;if(e&&Object.keys(e).length>0||window.odT.forceAiContent){this.articleHtmlFromApi=e;const u=(null==e?void 0:e.title)||(null===(o=null===(i=null===(t=window.odT.setup)||void 0===t?void 0:t.adSlotsConfig)||void 0===i?void 0:i.aiContent)||void 0===o?void 0:o.articleTitle)||"",p=(null==e?void 0:e.subtitle)||(null===(a=null===(s=null===(n=window.odT.setup)||void 0===n?void 0:n.adSlotsConfig)||void 0===s?void 0:s.aiContent)||void 0===a?void 0:a.articleHeader)||"AI-assisted contextual content, generated to enrich your reading.",w=(null==e?void 0:e.content)||(window.odT.forceAiContent?"<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent pulvinar sapien nibh. Sed metus metus, gravida nec ultricies eget, venenatis ut nisl. Maecenas varius, sem ut dignissim hendrerit, sapien erat consectetur nisi, quis blandit sem libero quis tortor. Curabitur rhoncus viverra bibendum.</p><p>Nunc aliquet at magna et luctus. Ut suscipit elementum eleifend. Integer vehicula purus et enim sodales, vitae malesuada neque sagittis. Aliquam tempus, purus eget posuere mattis, quam justo consequat nibh, volutpat ultricies nunc libero non orci. Aenean tincidunt porttitor ultrices. Donec ullamcorper eu libero eget finibus.</p><p>In id enim id sem venenatis dictum non nec dolor. Donec tincidunt feugiat leo, eget volutpat lectus tincidunt at. Ut sodales ante quis est euismod, sed sollicitudin metus fermentum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris malesuada tincidunt convallis. Pellentesque vel velit a ante cursus sollicitudin at sit amet purus. Ut in dolor blandit, venenatis sapien nec, porta nunc.</p><p>Etiam sit amet mauris a neque feugiat fringilla nec sed ligula. Sed pulvinar dui nec lectus venenatis egestas. In orci quam, consequat quis leo eget, ultricies convallis arcu. Nulla accumsan lobortis lorem, a placerat risus porta et. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras sed eros diam. Etiam accumsan neque turpis. Mauris congue vulputate purus, et tempus nunc cursus non. Quisque tempor ex sem.</p><p>Phasellus finibus, magna at tincidunt feugiat, erat risus luctus purus, nec facilisis lectus augue non est. Integer sit amet tortor nec sapien tincidunt malesuada. Vivamus vel odio ut erat luctus posuere.</p><p>Sed at mauris vel lorem tincidunt ultrices. Fusce sit amet turpis vitae nulla pharetra luctus. Donec ut lorem nec justo viverra gravida sit amet sed erat.</p>":""),g=(null==e?void 0:e.icon)||(null===(c=null===(l=null===(r=window.odT.setup)||void 0===r?void 0:r.adSlotsConfig)||void 0===l?void 0:l.aiContent)||void 0===c?void 0:c.articleIcon)||"",f=`\n            <div class="od-ai-header">\n            ${g?`<div class="od-ai-icon">${g}</div>`:""}\n            <div class="od-ai-titles">\n            ${u?`<h3 class="od-ai-title">${u}</h3>`:""}\n            ${p?`<p class="od-ai-subtitle">${p}</p>`:""}\n            </div>\n            </div>\n            ${w}\n          `||"";this.appendMatchingParagraph(d,f);const h=this.getAutoInsertionConfig();h?this.optidigitaltagsinserter.insertInRead(h):window.odT.log("AI-Based Content: No auto-insertion config available.")}})).catch((e=>{})):window.odT.log(`AI-Based Content: Container not found: ${d}`)}getAutoInsertionConfig(){var e,t,i;const o=`autoInsertion${window.odT.screen}`,n="Desktop"===window.odT.screen?this.autoInsertionDesktop:this.autoInsertionMobile,d=null===(i=null===(t=null===(e=window.odT.setup)||void 0===e?void 0:e.adSlotsConfig)||void 0===t?void 0:t.aiContent)||void 0===i?void 0:i[o];return d?Object.assign(Object.assign({},n),d):n}checkAvailability(){return c(this,void 0,void 0,(function*(){var e,t,i;let o="https://scripts.opti-digital.com/content/";const n=window.location.hostname,d=window.location.pathname,s=null===(i=null===(t=null===(e=window.odT.setup)||void 0===e?void 0:e.info)||void 0===t?void 0:t.publisherId)||void 0===i?void 0:i.toString(),a=`${s}${n}${d}`;o=`${o}${yield this.sha256(a)}.json?domain=${n}&pubid=${s}`;try{const e=yield fetch(o,{method:"GET"});if(!e.ok)return{};const t=yield e.json();return(null==t?void 0:t.enrichment)||{}}catch(e){return{}}}))}sha256(e){return c(this,void 0,void 0,(function*(){const t=(new TextEncoder).encode(e),i=yield crypto.subtle.digest("SHA-256",t),o=new Uint8Array(i);let n="";for(let e=0;e<o.length;e++){n+=o[e].toString(16).padStart(2,"0")}return n}))}appendMatchingParagraph(e,t,i){var o,n,d,s,a,r,l;const c=document.querySelector(e);if(!c)return void window.odT.log(`AI-Based Content: Container not found: ${e}`);let u=document.createElement("style");let p=`\n      .od-ai-wrapper { min-height: ${"Desktop"===window.odT.screen?"700px":"800px"}; ${"Desktop"===window.odT.screen?"background-color: rgb(255 255 255 / 0.1); box-shadow: inset 0 0 0 rgb(255 255 255 / 0.18), inset 0 0 0 rgb(0 0 0 / 0.18), 0 4px 12px rgb(0 0 0 / 0.28); border-radius: 8px; padding: 10px;":""};}\n      .od-ai-wrapper .od-ai-title { font-size: 1.1em !important; font-weight: bold !important; margin: 0 !important; padding: 0 !important; }\n      .od-ai-wrapper .od-ai-subtitle { font-style: italic; font-size: 0.85em; margin: 0; padding: 0; }\n      .od-ai-wrapper > h2 { margin: 30px 0 10px 0 !important; padding: 0; font-weight: bold; font-size: 1em; }\n      .od-ai-wrapper > p { margin-top: 10px !important; font-weight: normal !important; }\n      .od-ai-wrapper > h3 { margin: 30px 0 10px 0 !important; padding: 0; font-weight: bold; font-size: 1em; }\n      .od-ai-wrapper > h3 + p, .od-ai-wrapper > h2 + p { margin-top: 0 !important; }\n      .od-ai-header { display: flex; ${"Desktop"===window.odT.screen?"align-items: center; gap: 15px":"align-items: flex-start; gap: 5px; flex-direction: column"}; margin: 15px 0 0 0;}\n      .od-ai-icon { line-height: 1; }\n      .od-ai-icon svg { height: 45px; width: 45px; }\n      .od-ai-footer { display: flex; gap: 8px; align-items: center; margin: 20px 0 0 0; justify-content: space-between; padding: 0; }\n      .od-ai-vote { display: flex; gap: 8px; } \n      .od-ai-vote button { background: transparent; border: 1px solid rgba(0,0,0,0.15); border-radius: 6px; padding: 6px; cursor: pointer; line-height: 0; min-width: 30px; }\n      .od-ai-vote button:hover { background: rgba(0,0,0,0.05); }\n      .od-ai-vote svg { width: 16px; height: 16px; fill: currentColor; }\n      .od-ai-vote .od-voted { opacity: 0.6; pointer-events: none; }\n      .od-ai-footer-text { font-size: ${"Desktop"===window.odT.screen?"14px":"11px"} !important; font-style: italic; margin: 0 !important; padding: 0 !important; line-height: 1.2 !important; }\n    `;u.appendChild(document.createTextNode(p)),document.getElementsByTagName("head")[0].appendChild(u);const w=this.getMostCommonParagraphWrapper(c),g=(null===(d=null===(n=null===(o=window.odT)||void 0===o?void 0:o.setup)||void 0===n?void 0:n.adSlotsConfig)||void 0===d?void 0:d.aiContent)||{},f="function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,h=(void 0===g.typingEffect||!0===g.typingEffect||(null===(s=window.odT)||void 0===s?void 0:s.forceAiContent))&&!f&&!this.runImmediately;if(w){const{wrapper:e,originalP:o}=w,n=this.getPathIndices(e,o);let d=e.cloneNode(!0);const s=this.isolatePathInClone(d,n);if(s){const e=document.createElement("div");e.classList.add("od-ai-wrapper"),s===d?d=e:s.replaceWith(e),this.stripIdsRecursively(d);const o=c.children,n=null===(l=null===(r=null===(a=window.odT.setup)||void 0===a?void 0:a.adSlotsConfig)||void 0===r?void 0:r.aiContent)||void 0===l?void 0:l.insertBeforeLast;if(n&&"number"==typeof n&&o.length-n>0){const e=o[o.length-n];c.insertBefore(d,e)}else c.appendChild(d);return void(h?this.startTypewriterWhenInView(e,t,(()=>{this.appendVoteControls(e),window.odT.log("AI-Based Content: AI content appended with nested structure."),i&&i()})):(e.innerHTML=t,this.appendVoteControls(e),window.odT.log("AI-Based Content: AI content appended"),i&&i()))}}const m=document.createElement("div");m.classList.add("od-ai-wrapper"),c.appendChild(m),h?this.startTypewriterWhenInView(m,t,(()=>{this.appendVoteControls(m),window.odT.log("AI-Based Content: AI content using fallback structure."),i&&i()})):(m.innerHTML=t,this.appendVoteControls(m),window.odT.log("AI-Based Content: AI content appended immediately"),i&&i())}getPathIndices(e,t){const i=[];let o=t;for(;o&&o!==e;){const e=o.parentElement;if(!e)break;const t=Array.from(e.children).indexOf(o);if(-1===t)break;i.unshift(t),o=e}return i}isolatePathInClone(e,t){let i=e;for(const e of t){const t=Array.from(i.children);if(!t[e])return null;const o=t[e];for(const e of t)e!==o&&i.removeChild(e);i=o}return i}getMostCommonParagraphWrapper(e){const t=Array.from(e.querySelectorAll("p")).filter((t=>this.isEligibleParagraph(t,e)));if(0===t.length)return null;const i=new Map;for(const o of t){const t=this.topLevelWrapperOf(o,e);if(!t)continue;const n=this.structureSignature(t,o),d=i.get(n);d?d.count+=1:i.set(n,{count:1,sampleWrapper:t,sampleP:o})}let o=null;for(const e of i.values())(!o||e.count>o.count)&&(o=e);return o?{wrapper:o.sampleWrapper,originalP:o.sampleP}:null}isEligibleParagraph(e,t){if(!t.contains(e))return!1;if((e.textContent||"").trim().length<40)return!1;const i=new Set(["ASIDE","NAV","FOOTER","HEADER","FIGURE","FIGCAPTION","PRE","CODE","LI","UL","OL","TABLE","THEAD","TBODY","TH","TD","BLOCKQUOTE"]);let o=e;for(;o&&o!==t;){if(i.has(o.tagName))return!1;o=o.parentElement}if(null===e.offsetParent)return!1;const n=window.getComputedStyle(e);if("none"===n.display||"hidden"===n.visibility)return!1;return 0!==e.getClientRects().length}topLevelWrapperOf(e,t){let i=e;for(;i&&i.parentElement&&i.parentElement!==t;)i=i.parentElement;return i&&i.parentElement===t?i:null}structureSignature(e,t){const i=Array.from(e.classList).sort().join(".");return`${`${e.tagName.toLowerCase()}.${i}`}|depth:${this.depthBetween(t,e)}|children:${e.children?e.children.length:0}`}depthBetween(e,t){let i=0,o=e;for(;o&&o!==t;)o=o.parentElement,i+=1;return i}stripIdsRecursively(e){e.hasAttribute&&e.hasAttribute("id")&&e.removeAttribute("id");const t=e.children||[];for(let e=0;e<t.length;e++){const i=t[e];this.stripIdsRecursively(i)}}startTypewriterWhenInView(e,t,i){try{const o=this.setupTypewriter(e,t);if(!o)return void(i&&i());const{tasks:n,speedMs:d,chunkSize:s}=o;if(!n||0===n.length)return void(i&&i());if("function"==typeof window.IntersectionObserver){new IntersectionObserver(((e,t)=>{for(const o of e)if(o.isIntersecting){t.disconnect(),this.runTyping(n,d,s).then((()=>{i&&i()}));break}}),{threshold:.1}).observe(e)}else this.runTyping(n,d,s).then((()=>{i&&i()}))}catch(o){e.innerHTML=t,i&&i()}}setupTypewriter(e,t){var i,o,n,d,s;const a=(null===(n=null===(o=null===(i=window.odT)||void 0===i?void 0:i.setup)||void 0===o?void 0:o.adSlotsConfig)||void 0===n?void 0:n.aiContent)||{},r=a.typewriter||{},l="function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,c=(void 0===a.typingEffect||!0===a.typingEffect||(null===(d=window.odT)||void 0===d?void 0:d.forceAiContent))&&!l&&!this.runImmediately,u=Number(r.speedMs)>0?Number(r.speedMs):15,p=Math.max(1,Number(r.chunkSize)||1),w=Math.max(0,Number(null!==(s=r.immediateParagraphs)&&void 0!==s?s:2));if(!c)return e.innerHTML=t,null;const g=document.createElement("template");g.innerHTML=t;const f=[],h=new Set;try{const e=Array.from(g.content.querySelectorAll("p")),t=Array.from(g.content.childNodes).filter((e=>e.nodeType===Node.ELEMENT_NODE))[1];!t||"H2"!==t.tagName&&"H3"!==t.tagName||h.add(t);const i=g.content.querySelector(".od-ai-header h3");i&&h.add(i);for(let t=0;t<Math.min(w,e.length);t++)h.add(e[t])}catch(e){}const m=e=>{for(const t of h)if(t.contains(e))return!0;return!1},y=(e,t,i)=>{if(e.nodeType===Node.TEXT_NODE){const o=e.textContent||"";if(t)return document.createTextNode(o);{const e=document.createTextNode("");return f.push({node:e,text:o,written:0,paragraph:i}),e}}if(e.nodeType===Node.ELEMENT_NODE){const o=e.cloneNode(!1),n=Array.from(e.childNodes);for(const e of n){const n=t||m(e),d=i||("P"===o.tagName?o:null),s=y(e,n,d);o.appendChild(s)}return o}return document.createDocumentFragment()},T=document.createDocumentFragment();return Array.from(g.content.childNodes).forEach((e=>{T.appendChild(y(e,m(e),null))})),e.innerHTML="",e.appendChild(T),{tasks:f,speedMs:u,chunkSize:p}}runTyping(e,t,i){var o,n,d;const s=null===(o=this.getAutoInsertionConfig)||void 0===o?void 0:o.call(this),a=Number(null!==(n=null==s?void 0:s.interval)&&void 0!==n?n:0),r=Number(null!==(d=null==s?void 0:s.intervalIncrement)&&void 0!==d?d:0),l=new Map,c=new Set;for(const t of e)t.paragraph&&l.set(t.paragraph,(l.get(t.paragraph)||0)+1);const u=l.size;let p=0,w=0,g=0,f=Math.max(0,a);const h=e=>{if(c.size>=u)return;const t=this.measureElementHeight(e);if(g+=t,g>=f){const t=document.createElement("div"),i=Array.isArray(null==s?void 0:s.adSlots)?s.adSlots:null;let o;if(i&&w+1<i.length)o=i[w+1];else{o=`${"Desktop"===window.odT.screen?"Content_":"Mobile_"}AI_${w+2}`}t.className=o,t.style.display="none",e.insertAdjacentElement("afterend",t),w++,g=0,f=Math.max(0,a+w*r)}};return new Promise((o=>{const n=()=>{const d=e[p];if(!d)return void o();const s=Math.min(d.text.length,d.written+i);if(d.node.textContent=d.text.slice(0,s),d.written=s,d.written===d.text.length){if(d.paragraph){const e=(l.get(d.paragraph)||0)-1;l.set(d.paragraph,e),0!==e||c.has(d.paragraph)||(c.add(d.paragraph),h(d.paragraph))}p++}(null==d?void 0:d.paragraph)?setTimeout(n,t):n()};n()}))}appendVoteControls(e){var t,i,o,n,d,s;try{if(!(e&&e instanceof HTMLElement))return;if(e.querySelector(".od-ai-footer"))return;const a=document.createElement("div");a.className="od-ai-footer";const r=document.createElement("div");r.className="od-ai-vote";const l=document.createElement("button");l.type="button",l.title="Helpful",l.setAttribute("aria-label","Vote helpful"),l.innerHTML='<svg fill="#000000" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="M466.27 286.69C475.04 271.84 480 256 480 236.85c0-44.015-37.218-85.58-85.82-85.58H357.7c4.92-12.81 8.85-28.13 8.85-46.54C366.55 31.936 328.86 0 271.28 0c-61.607 0-58.093 94.933-71.76 108.6-22.747 22.747-49.615 66.447-68.76 83.4H32c-17.673 0-32 14.327-32 32v240c0 17.673 14.327 32 32 32h64c14.893 0 27.408-10.174 30.978-23.95 44.509 1.001 75.06 39.94 177.802 39.94 7.22 0 15.22.01 22.22.01 77.117 0 111.986-39.423 112.94-95.33 13.319-18.425 20.299-43.122 17.34-66.99 9.854-18.452 13.664-40.343 8.99-62.99zm-61.75 53.83c12.56 21.13 1.26 49.41-13.94 57.57 7.7 48.78-17.608 65.9-53.12 65.9h-37.82c-71.639 0-118.029-37.82-171.64-37.82V240h10.92c28.36 0 67.98-70.89 94.54-97.46 28.36-28.36 18.91-75.63 37.82-94.54 47.27 0 47.27 32.98 47.27 56.73 0 39.17-28.36 56.72-28.36 94.54h103.99c21.11 0 37.73 18.91 37.82 37.82.09 18.9-12.82 37.81-22.27 37.81 13.489 14.555 16.371 45.236-5.21 65.62zM88 432c0 13.255-10.745 24-24 24s-24-10.745-24-24 10.745-24 24-24 24 10.745 24 24z"/></svg>';const u=document.createElement("button");u.type="button",u.title="Not helpful",u.setAttribute("aria-label","Vote not helpful"),u.innerHTML='<svg fill="#000000" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="M466.27 225.31c4.674-22.647.864-44.538-8.99-62.99 2.958-23.868-4.021-48.565-17.34-66.99C438.986 39.423 404.117 0 327 0c-7 0-15 .01-22.22.01C201.195.01 168.997 40 128 40h-10.845c-5.64-4.975-13.042-8-21.155-8H32C14.327 32 0 46.327 0 64v240c0 17.673 14.327 32 32 32h64c11.842 0 22.175-6.438 27.708-16h7.052c19.146 16.953 46.013 60.653 68.76 83.4 13.667 13.667 10.153 108.6 71.76 108.6 57.58 0 95.27-31.936 95.27-104.73 0-18.41-3.93-33.73-8.85-46.54h36.48c48.602 0 85.82-41.565 85.82-85.58 0-19.15-4.96-34.99-13.73-49.84zM64 296c-13.255 0-24-10.745-24-24s10.745-24 24-24 24 10.745 24 24-10.745 24-24 24zm330.18 16.73H290.19c0 37.82 28.36 55.37 28.36 94.54 0 23.75 0 56.73-47.27 56.73-18.91-18.91-9.46-66.18-37.82-94.54C206.9 342.89 167.28 272 138.92 272H128V85.83c53.611 0 100.001-37.82 171.64-37.82h37.82c35.512 0 60.82 17.12 53.12 65.9 15.2 8.16 26.5 36.44 13.94 57.57 21.581 20.384 18.699 51.065 5.21 65.62 9.45 0 22.36 18.91 22.27 37.81-.09 18.91-16.71 37.82-37.82 37.82z"/></svg>';const p=()=>{l.classList.add("od-voted"),u.classList.add("od-voted")};l.addEventListener("click",(()=>c(this,void 0,void 0,(function*(){p(),yield this.sendVote("up")})))),u.addEventListener("click",(()=>c(this,void 0,void 0,(function*(){p(),yield this.sendVote("down")}))));const w=document.createElement("p");w.className="od-ai-footer-text",w.textContent=(null===(i=null===(t=this.articleHtmlFromApi)||void 0===t?void 0:t.footer)||void 0===i?void 0:i.toString())||(null===(s=null===(d=null===(n=null===(o=window.odT)||void 0===o?void 0:o.setup)||void 0===n?void 0:n.adSlotsConfig)||void 0===d?void 0:d.aiContent)||void 0===s?void 0:s.articleFooter)||"This content was generated using AI and reviewed according to publisher guidelines.",r.appendChild(l),r.appendChild(u),a.appendChild(r),a.appendChild(w),e.appendChild(a)}catch(e){}}sendVote(e){return c(this,void 0,void 0,(function*(){var t,i;try{null===(i=null===(t=window.odT)||void 0===t?void 0:t.log)||void 0===i||i.call(t,`AI-Based Content: Vote (${e}) skipped, no endpoint.`)}catch(e){}}))}measureElementHeight(e){var t;try{if(!e)return 0;const i=null===(t=e.getBoundingClientRect)||void 0===t?void 0:t.call(e);let o=i?i.height:0;return(!o||o<1)&&(o=e.offsetHeight||0),Math.max(0,Math.round(o))}catch(e){return 0}}}class p{constructor(e,t){this.POTENTIAL_BIDDERS=[],this.APPROVED_BIDDERS=[],this.ENDPOINT="https://pbs.optidigital.com/cookie_sync",this.PURPOSE_FOR_COOKIE_DROPPING=1,this.OPTIDIGITAL_ID=915,this.biddersCount=0,this.biddersDone=0,this.MAX_SYNC_COUNT=0,this.vendorsList=[{id:32,name:"appnexus"},{id:76,name:"pubmatic"},{id:52,name:"rubicon"},{id:45,name:"smartadserver"},{id:28,name:"triplelift"},{id:241,name:"onetag"},{id:91,name:"criteo"},{id:259,name:"adyoulike"},{id:61,name:"gumgum"},{id:1043,name:"rise"},{id:164,name:"outbrain"},{id:10,name:"ix"},{id:253,name:"improvedigital"},{id:687,name:"missena"},{id:658,name:"bliink"},{id:628,name:"tappx"},{id:31,name:"ogury"},{id:36,name:"unruly"},{id:58,name:"33across"},{id:21,name:"thetradedesk"},{id:333,name:"inmobi"},{id:1028,name:"sparteo"},{id:639,name:"smilewanted"},{id:972,name:"kargo"},{id:69,name:"openx"}],this.getStringifiedData=()=>{var e,t;const i={bidders:this.APPROVED_BIDDERS};return this.MAX_SYNC_COUNT&&(i.limit=this.MAX_SYNC_COUNT),window.optidigitalToolboxGdpr&&(i.gdpr=1),(null===(t=null===(e=window.odT)||void 0===e?void 0:e.consentV2TCData)||void 0===t?void 0:t.tcString)&&(i.gdpr_consent=window.odT.consentV2TCData.tcString),JSON.stringify(i)},this.ajax=(e,t,i,o={})=>{try{window.odT.log("Cookie sync request"),window.postMessage({preSync:{status:"loaded"}},"*");const n=3e3;let d;const s=o.method||(i?"POST":"GET");let a="object"==typeof t?t:{success:t,error:function(e){}};d=new window.XMLHttpRequest,d.onreadystatechange=function(){if(4===d.readyState){const e=d.status;e>=200&&e<300||304===e?(window.odT.log("Cookie sync response success"),a.success(d.responseText,d)):a.error(d.statusText,d)}},d.open(s,e),d.timeout=n,o.withCredentials&&(d.withCredentials=!0),o.preflight&&d.setRequestHeader("X-Requested-With","XMLHttpRequest"),d.setRequestHeader("Content-Type",o.contentType||"text/plain"),"POST"===s&&i?d.send(i):d.send()}catch(e){}},this.isValidUrl=e=>new RegExp(/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i).test(e),this.insertElement=(e,t,i)=>{let o;t=t||document,o=i?t.getElementsByTagName(i):t.getElementsByTagName("head");try{let i=o.length?o[0]:t.getElementsByTagName("body")[0];i&&i.insertBefore(e,i.firstChild)}catch(e){}},this.getEmptyIframe=(e,t)=>{let i=document.createElement("iframe");return i.setAttribute("frameborder","0"),i.setAttribute("scrolling","no"),i.setAttribute("marginheight","0"),i.setAttribute("marginwidth","0"),i.setAttribute("TOPMARGIN","0"),i.setAttribute("LEFTMARGIN","0"),i.setAttribute("allowtransparency","true"),i.setAttribute("width",String(t)),i.setAttribute("height",String(e)),i.style.setProperty("height","0","important"),i.style.setProperty("width","0","important"),i.style.setProperty("border","0","important"),i.style.setProperty("display","block","important"),i},this.triggerDone=()=>{this.biddersDone++,this.biddersDone===this.biddersCount&&(window.odT.cookieSyncReady=!0,window.odT.log("Cookie sync complete"),window.postMessage({preSync:{status:"complete"}},"*"))},this.triggerPixel=(e,t)=>{const i=new Image;i.addEventListener("load",t),i.addEventListener("error",t),i.src=e},this.triggerIframeLoad=(e,t,i)=>{if(!e)return;let o=this.getEmptyIframe(0,0);o.id=`sync_${t}_${Date.now()}`,o.src=e,o.onload=i,this.insertElement(o,document,"html")},this.doBidderSync=(e,t,i,o)=>{t&&this.isValidUrl(t)?"image"===e||"redirect"===e?this.triggerPixel(t,o):"iframe"===e?this.triggerIframeLoad(t,i,o):o():o()},this.doAllSyncs=e=>{0!==e.length?(this.biddersCount=e.length,e.forEach((e=>{e.no_cookie&&this.doBidderSync(e.usersync.type,e.usersync.url,e.bidder,this.triggerDone)}))):window.odT.cookieSyncReady=!0},this.process=e=>{const t=JSON.parse(e);"ok"!==t.status&&"no_cookie"!==t.status||t.bidder_status&&this.doAllSyncs(t.bidder_status)},this.run=()=>{var e,t,i,o;if(window.optidigitalToolboxGdpr){if((null===(o=null===(i=null===(t=null===(e=window.odT)||void 0===e?void 0:e.consentV2TCData)||void 0===t?void 0:t.purpose)||void 0===i?void 0:i.consents)||void 0===o?void 0:o[this.PURPOSE_FOR_COOKIE_DROPPING])&&window.odT.checkVendor(this.OPTIDIGITAL_ID)&&"Safari"!==window.odT.checkBrowser&&this.POTENTIAL_BIDDERS){const e=new Map(this.vendorsList.map((e=>[e.name,e])));this.POTENTIAL_BIDDERS.forEach((t=>{const i=e.get(t);i&&window.odT.checkVendor(i.id)&&!this.APPROVED_BIDDERS.includes(t)&&this.APPROVED_BIDDERS.push(t)})),this.APPROVED_BIDDERS.length&&this.ajax(this.ENDPOINT,this.process,this.getStringifiedData(),{withCredentials:!0})}}else"Safari"!==window.odT.checkBrowser&&this.POTENTIAL_BIDDERS&&(this.APPROVED_BIDDERS.push(...this.POTENTIAL_BIDDERS),this.ajax(this.ENDPOINT,this.process,this.getStringifiedData(),{withCredentials:!0}))},e&&(this.POTENTIAL_BIDDERS=this.sanitizeBidders(e)||[]),t&&(this.MAX_SYNC_COUNT=t),this.run()}sanitizeBidders(e){if(e){const t=e.split(",").filter((function(e){return!!e}));if(t.length>0)return t}}}var w=i(46);class g{constructor(e,t){var i;this.liveAnalyticsSampling=25,this.liveAnalyticsRand=0,this.isFirstAd=!0,this.articleSelector=null,this.log=w.log,this.analyticsLog=w.analyticsLog,this.log("Init Analytics Module"),this.setLiveAnalyticsSampling(e,t),this.setLiveAnalyticsRand(),this.isAdDensityEnabled=null===(i=e.enableAdDensity)||void 0===i||i,this.contentSelectors=e.contentSelectors||g.DEFAULT_CONTENT_SELECTORS,this.wordsHTMLTag=g.DEFAULT_WORDS_HTML_TAG,this.excludeTags=g.DEFAULT_EXCLUDE_TAGS,this.excludePatterns=e.excludePatterns||g.DEFAULT_EXCLUDE_PATTERNS,this.excludeLengthPatterns=g.DEFAULT_EXCLUDE_LENGTH_PATTERNS,this.minWords=g.MIN_WORDS,this.minSurface=g.MIN_SURFACE,this.minRatioWords=g.MIN_RATIO_WORDS,this.childRatio=g.CHILD_RATIO}findMainContent(){try{const e=document.querySelectorAll("article, section, div, main");let t=null,i=0;const o=document.body.innerText.trim().split(/\s+/).length;return e.forEach((e=>{let n=1;const d=this.countWords(e),s=this.getElSurface(e);if(s<this.minSurface)return;if(d<this.minWords)return;if(d/o<this.minRatioWords)return;this.containsExcludedTag(e)&&(n=1e4,this.analyticsLog("[findMainContent] Element ratio modified due to excluded tag",e)),this.containsExcludedElement(e)&&(n=1e5,this.analyticsLog("[findMainContent] Element ratio modified due to excluded pattern",e));let a=this.getScore(d,s);this.analyticsLog(`[findMainContent] MainContent candidate: tag=${e.tagName}, wordCount=${d}, surface=${s}, score=${a}`,e);let r=!1;e.querySelectorAll("article, section, div, main").forEach((t=>{if(t!==e&&this.countWords(t)>this.minWords&&this.getElSurface(t)>this.minSurface){const e=this.getScore(this.countWords(t),this.getElSurface(t));e/a>this.childRatio&&(this.analyticsLog(`[findMainContent] Child score (${e}) and element score (${a}) have a ratio (${e/a}) higher than allowed ratio (${this.childRatio})`,t),r=!0)}})),r?this.analyticsLog(`[findMainContent] Skipped because a child dominates: ${e.tagName}`):(a/=n,this.analyticsLog(`[findMainContent] MainContent candidate after updated score : tag=${e.tagName}, coefExclude=${n}, score=${a}`,e),a>i&&(i=a,t=e))})),t?(window.odT.debugAnalytics&&(this.analyticsLog("[findMainContent] Best Element IS",t),t.style.border="3px solid red"),this.checkIfHiddenArticle(t)?(this.analyticsLog("[findMainContent] Best element has a computed height and hidden overflow"),null):t):null}catch(e){return this.analyticsLog(`[findMainContent] Error in findMainContent: ${e}`),null}}getElSurface(e){const t=e.getBoundingClientRect();return t.width*t.height}getScore(e,t){return e/Math.log(t)}containsExcludedElement(e){const t=e=>{const t=e.className+" "+e.id;return this.excludePatterns.some((e=>e.test(t)))};if(t(e))return!0;let i=e.parentElement;for(;i;){if(t(i))return!0;i=i.parentElement}const o=e.querySelectorAll("*");for(const e of o)if(t(e))return!0;return!1}containsExcludedTag(e){let t=e.parentElement;for(;t;){if(this.excludeTags.includes(t.tagName.toLowerCase()))return!0;t=t.parentElement}return e.querySelectorAll(this.excludeTags.join(",")).length>0}checkIfHiddenArticle(e){const t=window.getComputedStyle(e,null),i=""!=e.style.height,o="hidden"===t.overflow;return i&&o}setLiveAnalyticsSampling(e,t){var i;this.liveAnalyticsSampling=t?100:null!==(i=null==e?void 0:e.liveAnalyticsSampling)&&void 0!==i?i:25}setLiveAnalyticsRand(){this.liveAnalyticsRand||(this.liveAnalyticsRand=Math.floor(100*Math.random()))}isSamplingCase(){return Boolean(this.liveAnalyticsSampling&&this.liveAnalyticsRand<this.liveAnalyticsSampling)}sendAnalyticsRequest(e,t="https://analytics.optidigital.com/adrequest",i=!1){const o=JSON.stringify(e);i?navigator.sendBeacon(t,o):fetch(t,{method:"POST",body:o})}countWords(e){let t=e.innerHTML.replace(/<script[^>]*>[\s\S]*?<\/script>/gi," ").replace(/<style[^>]*>[\s\S]*?<\/style>/gi," ").replace(/<a[^>]*>[\s\S]*?<\/a>/gi," ");t=t.replace(/<div[^>]*style="display: none;"[^>]*>[\s\S]*?<\/div>/gi," ");let i=t.replace(/<[^>]*>/g," ").replace(/[.,;:!?()]/g," ").replace(/\s+/g," ").trim().split(" ").filter((e=>e.length>0)).length;return i||0}calculateAdDensity(e,t){if(0===e||0===t||!1===this.isAdDensityEnabled)return 0;return Math.min(1,Math.round(e/t*100)/100)}getPageHeight(){const{body:e,documentElement:t}=document;return Math.max(e.scrollHeight,e.offsetHeight,t.clientHeight,t.scrollHeight,t.offsetHeight)}countWordsInElements(e){return Array.from(e).reduce(((e,t)=>e+this.countWords(t)),0)}createPerformanceObserver(e,t){PerformanceObserver.supportedEntryTypes.includes(e)&&new PerformanceObserver(((i,o)=>{for(const n of i.getEntriesByType(e))t(n,o)})).observe({type:e,buffered:!0})}logPerformanceMetric(e,t){this.analyticsLog(`${e} captured: ${t||0}`)}registerPerformanceObserver(){if(window.odT.enablePerformances&&this.isSamplingCase()&&"Chrome"===window.odT.checkBrowser)try{this.createPerformanceObserver("paint",this.handlePaintEntry.bind(this)),this.createPerformanceObserver("largest-contentful-paint",this.handleLCPEntry.bind(this)),this.createPerformanceObserver("longtask",this.handleLongTaskEntry.bind(this)),this.createPerformanceObserver("event",this.handleEventEntry.bind(this)),this.createPerformanceObserver("layout-shift",this.handleCLSEntry.bind(this)),this.createPerformanceObserver("first-input",this.handleFIDEntry.bind(this)),this.createPerformanceObserver("navigation",this.handleNavigationEntry.bind(this))}catch(e){}}handlePaintEntry(e,t){"first-contentful-paint"===e.name&&(window.odT.performances.fcp=Math.round(e.startTime),this.logPerformanceMetric("FCP",window.odT.performances.fcp),t.disconnect())}handleLCPEntry(e){window.odT.userPerformances.lcp=Math.round(e.startTime),this.logPerformanceMetric("LCP",window.odT.userPerformances.lcp)}handleCLSEntry(e){!e.hadRecentInput&&e.value&&e.value>0&&(window.odT.userPerformances.cls||(window.odT.userPerformances.cls=0),window.odT.userPerformances.cls+=Math.round(1e3*e.value)/1e3,this.logPerformanceMetric("CLS",window.odT.userPerformances.cls))}handleFIDEntry(e,t){e.processingStart&&e.processingStart>e.startTime&&(window.odT.userPerformances.fid=Math.round(e.processingStart-e.startTime),this.logPerformanceMetric("FID",window.odT.userPerformances.fid),t.disconnect())}handleNavigationEntry(e,t){e.responseStart&&(window.odT.performances.ttfb=Math.round(e.responseStart),this.logPerformanceMetric("TTFB",window.odT.performances.ttfb),t.disconnect())}handleLongTaskEntry(e,t){if(e.duration>=50){const i=Math.round(e.duration-50);window.odT.performances.tbt+=i,this.logPerformanceMetric("TBT",i),t.disconnect()}}handleEventEntry(e,t){if(window.odT.inpEventCount>=50)return this.isSamplingCase()&&"Chrome"===window.odT.checkBrowser&&!window.odT.userPerformanceSent&&window.odT.pageViewEvent({isUserPerformanceCall:!0,userAction:"ko"!==window.odT.consentType&&window.odT.consentCMPUIShown}),void t.disconnect();window.odT.userPerformances.inp||(window.odT.userPerformances.inp=0),e.duration>window.odT.userPerformances.inp&&(window.odT.userPerformances.inp=Math.round(e.duration),this.logPerformanceMetric("INP",window.odT.userPerformances.inp)),window.odT.inpEventCount++}getElementsInContext(e,t="*"){const i=[],o=t=>{for(const n of Array.from(t))n instanceof HTMLElement&&(e&&!(null==n?void 0:n.matches(e))||i.push(n),n.shadowRoot&&o(Array.from(n.shadowRoot.querySelectorAll("*"))))};return o(Array.from(document.querySelectorAll(t))),i}isAdDiv(e){return"true"===e.getAttribute("data-optidigital-slot")}collectDivElements(e="*"){return this.getElementsInContext("div",e)}extractContentMetrics(e){try{if("string"==typeof e)return this.getContentMetricsFromMainContent(e);if(e instanceof HTMLElement){const t=[e];let i=!1;const o=Array.from(e.querySelectorAll("div")).filter((e=>{try{const t=e.getBoundingClientRect();return this.isAdDiv(e)&&t.width*t.height>1}catch(e){return this.analyticsLog(`[extractContentMetrics] Error in getBoundingClientRect for ad div: ${e}`),!1}}));let n=0,d=0;try{n=t.reduce(((e,t)=>e+t.querySelectorAll("p").length),0),n-=o.reduce(((e,t)=>e+t.querySelectorAll("p").length),0),d=t.reduce(((e,t)=>e+this.countWordsInElements(t.querySelectorAll(this.wordsHTMLTag.toString()))),0),d-=o.reduce(((e,t)=>e+this.countWordsInElements(t.querySelectorAll(this.wordsHTMLTag.toString()))),0)}catch(e){this.analyticsLog(`[extractContentMetrics] Error in paragraph/word counting: ${e}`)}if(t.forEach((e=>{e.style.height&&(i=!0)})),i)return{heights:null,paragraphs:n,words:d};let s=0,a=0;try{let i,n;s=o.reduce(((e,t)=>{try{return e+t.getBoundingClientRect().height}catch(t){return this.analyticsLog(`[extractContentMetrics] Error in getBoundingClientRect for ad div: ${t}`),e}}),0),a=t.reduce(((e,t)=>{try{const i=t.getBoundingClientRect();return e+(t instanceof HTMLElement?i.height:0)}catch(t){return this.analyticsLog(`[extractContentMetrics] Error in getBoundingClientRect for main content: ${t}`),e}}),0);let d=!1;for(const t of e.children)n=(t.className?t.className.toString():"")+" "+(t.id?t.id.toString():""),d=this.excludeLengthPatterns.some((e=>e.test(n))),d&&(i=t.getBoundingClientRect(),a-=i.height)}catch(e){this.analyticsLog(`[extractContentMetrics] Error in height calculation: ${e}`)}return{heights:{adsDivLength:s,contentLength:a},paragraphs:n,words:d}}return this.analyticsLog("[extractContentMetrics] Invalid context in extractContentMetrics"),{heights:null,paragraphs:0,words:0}}catch(e){return this.analyticsLog(`[extractContentMetrics] Error in extractContentMetrics: ${e}`),{heights:null,paragraphs:0,words:0}}}getContentMetricsFromMainContent(e){const t=this.getElementsInContext(e);let i=!1;if(!t.length)return{heights:null,paragraphs:0,words:0};const o=this.collectDivElements(`${e} div`).filter((e=>{const t=e.getBoundingClientRect();return this.isAdDiv(e)&&t.width*t.height>1}));let n=t.reduce(((e,t)=>e+t.querySelectorAll("p").length),0);n-=o.reduce(((e,t)=>e+t.querySelectorAll("p").length),0);let d=t.reduce(((e,t)=>e+this.countWordsInElements(t.querySelectorAll(this.wordsHTMLTag.toString()))),0);if(d-=o.reduce(((e,t)=>e+this.countWordsInElements(t.querySelectorAll(this.wordsHTMLTag.toString()))),0),t.forEach((e=>{e.style.height&&(i=!0)})),i)return{heights:null,paragraphs:n,words:d};return{heights:{adsDivLength:o.reduce(((e,t)=>e+t.getBoundingClientRect().height),0),contentLength:t.reduce(((e,t)=>{const i=t.getBoundingClientRect();return e+(t instanceof HTMLElement?i.height:0)}),0)},paragraphs:n,words:d}}setContentMetrics(e=!1){try{if(!this.isAdDensityEnabled&&!e)return window.odT.performances.height=null,window.odT.performances.paragraphs=null,window.odT.performances.words=null,window.odT.performances.adDensity=null,void this.log("Ad Density disabled");if(this.contentSelectors.length>0)for(const e of this.contentSelectors){const{heights:t,paragraphs:i,words:o}=this.extractContentMetrics(e);if(t)return window.odT.performances.height=Math.floor(t.contentLength),window.odT.performances.paragraphs=Math.floor(i),window.odT.performances.words=Math.floor(o),window.odT.performances.adDensity=this.calculateAdDensity(t.adsDivLength,t.contentLength),this.log(`Ad Density computed from selector ${e}`,window.odT.performances.adDensity),this.articleSelector=e,void this.analyticsLog("[setContentMetrics] Ad Density details",{heights:t,adDensity:window.odT.performances.adDensity})}else{let e=null;try{e=this.findMainContent()}catch(e){this.analyticsLog(`[setContentMetrics] Error in [findMainContent]: ${e}`)}if(e){const{heights:t,paragraphs:i,words:o}=this.extractContentMetrics(e);if(t)return window.odT.performances.height=Math.floor(t.contentLength),window.odT.performances.paragraphs=Math.floor(i),window.odT.performances.words=Math.floor(o),window.odT.performances.adDensity=this.calculateAdDensity(t.adsDivLength,t.contentLength),this.articleSelector=this.getElementSelector(e),this.log("Ad Density computed from automatic detection",window.odT.performances.adDensity),void this.analyticsLog("[setContentMetrics] Ad Density details",{heights:t,adDensity:window.odT.performances.adDensity})}}this.log("No ad density computed"),window.odT.performances.height=null,window.odT.performances.paragraphs=null,window.odT.performances.words=null,window.odT.performances.adDensity=null}catch(e){this.analyticsLog(`[setContentMetrics] Error: ${e}`),window.odT.performances.height=null,window.odT.performances.paragraphs=null,window.odT.performances.words=null,window.odT.performances.adDensity=null}}getElementSelector(e){try{const t=e,i=e=>{try{if("undefined"!=typeof CSS&&"function"==typeof CSS.escape)return CSS.escape(e)}catch(e){}return e.replace(/([\0-\x1F\x7F!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")};if(t.id&&t.id.trim().length>0){return`#${i(t.id.trim())}`}if(t.classList&&t.classList.length>0){const e=Array.from(t.classList).filter(Boolean).map((e=>i(e))).join(".");if(e)return`.${e}`}return t.tagName?t.tagName.toLowerCase():"*"}catch(e){return""}}isFirstAdRendered(e){const t=window.odT.performances.adFirstRenderTime||0;return this.isFirstAd&&(0==t||e<t)}handleFirstAdPerformanceTracking(e=""){const t=Math.round(performance.now());window.odT.enablePerformances&&"Chrome"===window.odT.checkBrowser&&this.isSamplingCase()&&this.isFirstAdRendered(t)&&(this.isFirstAd=!1,window.odT.performances.adFirstRenderTime=t,window.odT.log(`First Ad Render Ended ${e}. Total render time: ${t} (ms)`),window.odT.performances.scriptLoadingTime=window.launcherLoadTime,this.setContentMetrics(),window.odT.log("Sending analytics for performances",window.odT.performances),"ko"!==window.odT.consentType&&window.odT.consentCMPUIShown?window.odT.pageViewEvent({isPerformanceCall:!0,userAction:!0}):window.odT.pageViewEvent({isPerformanceCall:!0}))}}g.DEFAULT_CONTENT_SELECTORS=[],g.DEFAULT_WORDS_HTML_TAG=["h1","h2","h3","p"],g.DEFAULT_EXCLUDE_TAGS=["header","footer"],g.DEFAULT_EXCLUDE_PATTERNS=[/taboola/i,/smartbox/i,/ob-smartfeed-wrapp/i,/feed/i,/comment/i],g.DEFAULT_EXCLUDE_LENGTH_PATTERNS=[/taboola/i,/smartbox/i,/ob-smartfeed-wrapp/i,/feed/i,/comment/i],g.MIN_WORDS=100,g.MIN_SURFACE=5e4,g.MIN_RATIO_WORDS=.1,g.CHILD_RATIO=.667;const f=g;const h=class{constructor(e){if(this.setup={},this.prebidAdUnits=[],this.adslotResults=new Map,this.videoInstreamStatus="init",this.videoGAMCorrelator=0,this.videoInstreamDMEncoding=1,this.videoInstreamPageTargeting="",this.videoInstreamLazyLoad=!0,this.startExecuted=!1,this.videoInstreamHBTimeout=3e3,this.videoInstreamTimeout=4e3,this.videoInstreamPrebidReady=!1,this.videoInstreamAmazonReady=!1,this.currentVideoAdSlotConfig=null,this.prebidParams=[],this.amazonParams=[],this.prebidVideoAdunits=[],this.waitingForConsent=!1,this.consentCallbackRegistered=!1,0!==Object.keys(e).length){if(window.odT.log("InStream Module - Initializing"),this.setup=e,this.videoInstreamDMEncoding=e.dmEncoding||1,this.startExecuted=e.startExecuted||!1,window.odT.initConfig.pageTargeting&&"object"==typeof window.odT.initConfig.pageTargeting){this.videoInstreamPageTargeting="";const e=Object.keys(window.odT.initConfig.pageTargeting);for(const t of e)if("string"==typeof t){let e=window.odT.initConfig.pageTargeting[t];"number"==typeof e&&(e=e.toString()),this.videoInstreamPageTargeting+="&"+t+"="+e}}this.init()}else window.odT.log("InStream Module - Error: OptiDigitalInstreamV1 setup is empty")}init(){window.odT.log("InStream Module - Initialized"),window.odT.optidigitalInstream=this}setStartExecuted(e){this.startExecuted=e}getVideoInstreamAds(e,t,i){var o;this.setStartExecuted(!0);const n=null===(o=this.setup.videoAdSlotConfigurations)||void 0===o?void 0:o.map((t=>Object.assign(Object.assign({},t),{videoAdslots:t.videoAdslots.filter((t=>e.includes(t.adslot)))}))).filter((e=>e.videoAdslots.length>0));if(n&&0!==n.length){if(this.currentVideoAdSlotConfig=n,this.videoInstreamCallback=t,i&&(this.videoInstreamTimeout=i),this.videoInstreamStatus="auction",this.videoInstreamPrebidReady=!1,this.videoInstreamAmazonReady=!1,this.videoInstreamLazyLoad=!1,this.setup.lazyload){const e=document.querySelector(this.setup.lazyload.divSelector);if(null!=e){const t=e.getBoundingClientRect();t.top>=0&&t.top-window.innerHeight<=this.setup.lazyload.lazyLoadPx||t.top<0&&Math.abs(t.top)<=this.setup.lazyload.lazyLoadPx?this.videoInstreamLazyLoad=!1:(this.videoInstreamLazyLoad=!0,this.monitorVideoLazyLoadPlayer(this.setup.lazyload.divSelector,this.setup.lazyload.lazyLoadPx))}}this.videoInstreamLazyLoad||(this.startExecuted?this.checkConsentAndFetchVIADS():(this.videoInstreamPrebidReady=!0,this.videoInstreamAmazonReady=!0,this.videoBiddersBack()))}else window.odT.log(`InStream Module - Error: Div configuration not found for adslots: ${e}`,this.setup.videoAdSlotConfigurations)}monitorVideoLazyLoadPlayer(e,t){this.videoInstreamLazyIntervalID=setInterval((()=>{if(this.videoInstreamLazyLoad){const i=document.querySelector(e);if(null!=i){const e=i.getBoundingClientRect();(e.top>=0&&e.top-window.innerHeight<=t||e.top<0&&Math.abs(e.top)<=t)&&(clearInterval(this.videoInstreamLazyIntervalID),this.videoInstreamLazyLoad=!1,window.odT.log("InStream Module - Load Video Lazy Load player configuration"),this.startExecuted?this.checkConsentAndFetchVIADS():(this.videoInstreamPrebidReady=!0,this.videoInstreamAmazonReady=!0,this.videoBiddersBack()))}}}),500)}checkConsentAndFetchVIADS(){if(window.odT.consentStatusNoGAM&&-1!==window.odT.consentStatusNoGAM.indexOf(window.odT.consentStatus)){if(window.odT.log("InStream Module - CMP consent rejected, aborting video ad fetch"),this.videoInstreamStatus="aborted",this.videoInstreamCallback)try{this.videoInstreamCallback([])}catch(e){window.odT.log("InStream Module - Error: Video instream callback (consent rejected):",e)}}else!0===window.odT.CMPready&&window.odT.consentStatusNoGAM&&-1===window.odT.consentStatusNoGAM.indexOf(window.odT.consentStatus)?this.fetchVIADS():this.waitingForConsent||(this.waitingForConsent=!0,window.odT.log("InStream Module - Waiting for CMP consent decision"),this.registerConsentCallback())}registerConsentCallback(){if(this.consentCallbackRegistered)return;this.consentCallbackRegistered=!0,window.odT.eventCallback||(window.odT.eventCallback=[]);const e=(t,i)=>{if("CONSENT_READY"===t){if(this.waitingForConsent=!1,window.odT.consentStatusNoGAM&&-1!==window.odT.consentStatusNoGAM.indexOf(window.odT.consentStatus)){window.odT.log("InStream Module - CMP consent rejected, aborting video ad fetch"),this.videoInstreamStatus="aborted";const t=window.odT.eventCallback.indexOf(e);if(t>-1&&window.odT.eventCallback.splice(t,1),this.consentCallbackRegistered=!1,this.videoInstreamCallback)try{this.videoInstreamCallback([])}catch(e){window.odT.log("InStream Module - Error: Video instream callback (consent rejected):",e)}return}if(!0===window.odT.CMPready&&window.odT.consentStatusNoGAM&&-1===window.odT.consentStatusNoGAM.indexOf(window.odT.consentStatus)){window.odT.log("InStream Module - CMP consent OK, proceeding with video ad fetch");const t=window.odT.eventCallback.indexOf(e);t>-1&&window.odT.eventCallback.splice(t,1),this.consentCallbackRegistered=!1,this.fetchVIADS()}}};window.odT.eventCallback.push(e),!0===window.odT.CMPready&&window.odT.consentStatusNoGAM&&-1===window.odT.consentStatusNoGAM.indexOf(window.odT.consentStatus)&&setTimeout((()=>{e("CONSENT_READY",{status:window.odT.consentStatus})}),0)}fetchVIADS(){this.fetchPrebidVideoBids(),this.setup.biddersSetup&&this.setup.biddersSetup.amazon?this.fetchAPSVideoBids():this.videoInstreamAmazonReady=!0,setTimeout((()=>{try{this.callVideoInstreamCallback()}catch(e){window.odT.log("InStream Module - Error: Video instream callback:",e)}}),this.videoInstreamTimeout)}fetchPrebidVideoBids(){if(!this.currentVideoAdSlotConfig)return;const e=[];for(const t of this.currentVideoAdSlotConfig)t.videoAdslots.forEach((t=>{const i=this.findConfigForAdslot(t.adslot);if(!i)return;const o=`${i.adslot}`;if(e.push(o),-1===this.prebidAdUnits.indexOf(o)){const e=this.getPrebidVideoAdunit(o,i.videoAdunitConfig);e&&(this.prebidVideoAdunits.push(e),this.prebidAdUnits.push(o))}})),e.length>0?window.odpbjs.que.push((()=>{var t;window.odT.log("InStream Module - Prebid bids request"),window.odT.oyStatus&&(null===(t=window.optiyield)||void 0===t||t.cmd.push((()=>{var e;const t=null===(e=window.optiyield)||void 0===e?void 0:e.setPrebidFloors(window.odT.instreamModule.prebidVideoAdunits,window.odT.setP);(null==t?void 0:t.length)>0&&(window.odT.instreamModule.prebidVideoAdunits=t)}))),window.odT.log("InStream Module - Prebid bids addAdUnits",window.odT.instreamModule.prebidVideoAdunits),window.odpbjs.addAdUnits(window.odT.instreamModule.prebidVideoAdunits),window.odT.log("InStream Module - Prebid bids requestBids"),window.odpbjs.setConfig({mediaTypePriceGranularity:{video:{buckets:[{precision:2,min:0,max:.1,increment:.01},{precision:2,min:.1,max:10,increment:.05},{precision:2,min:10,max:50,increment:.25}]}}}),window.odpbjs.requestBids({timeout:window.odT.instreamModule.videoInstreamTimeout,adUnitCodes:e,bidsBackHandler:e=>{let t=window.odpbjs.getBidResponses();window.odT.log("InStream Module - "+(t&&"object"==typeof t&&Object.keys(t).length>0?"Prebid bids received":"No prebid bids received"),t);let i=window.odpbjs.getAdserverTargeting();window.odT.instreamModule.processPrebidBids(i),window.odT.instreamModule.videoInstreamPrebidReady=!0,window.odT.instreamModule.videoBiddersBack()}})})):this.videoInstreamPrebidReady=!0}processPrebidBids(e){if(!this.currentVideoAdSlotConfig)return this.videoInstreamPrebidReady=!0,void this.videoBiddersBack();for(const t of this.currentVideoAdSlotConfig)t.videoAdslots.forEach((t=>{const i=this.findConfigForAdslot(t.adslot);if(!i)return;const o=`${i.adslot}`,n=`optidigital-adslot-${i.adslot}`;if(e.hasOwnProperty(o)&&e[o].hasOwnProperty("hb_bidder")&&e[o].hasOwnProperty("hb_uuid")&&e[o].hasOwnProperty("hb_pb")&&e[o].hasOwnProperty("hb_size")&&e[o].hasOwnProperty("hb_format")){let t="&hb_bidder="+e[o].hb_bidder;t+="&hb_uuid="+e[o].hb_uuid,t+="&hb_pb="+e[o].hb_pb,t+="&hb_size="+e[o].hb_size,t+="&hb_format="+e[o].hb_format;const i=this.adslotResults.get(n)||{[o]:{vastURL:"",customParams:""}};this.prebidParams[o]=t,this.adslotResults.set(n,i)}}))}fetchAPSVideoBids(){var e;if(window.odT.log("InStream Module - Fetch Amazon"),!window.odT.enableAmazonAPS||!this.currentVideoAdSlotConfig)return this.videoInstreamAmazonReady=!0,void this.videoBiddersBack();let t=[];for(const i of this.currentVideoAdSlotConfig)i.videoAdslots.forEach((e=>{var i,o,n;const d=this.findConfigForAdslot(e.adslot);if(!d)return;const s=`${d.adslot}`;if(null===(n=null===(o=null===(i=this.setup.biddersSetup)||void 0===i?void 0:i.amazon)||void 0===o?void 0:o.adSlots)||void 0===n?void 0:n.hasOwnProperty(s)){const e={slotID:this.setup.biddersSetup.amazon.adSlots[s].slotId,mediaType:"video",sizes:this.setup.biddersSetup.amazon.adSlots[s].sizes,optiYield:{adUnitPath:window.odT.initConfig.adUnit,cd:{cd1:s}}};t.push(e)}})),t.length>0?(window.odT.oyStatus&&(null===(e=window.optiyield)||void 0===e||e.cmd.push((()=>{var e;try{t=null===(e=window.optiyield)||void 0===e?void 0:e.setAmazonFloors(t,window.odT.setA)}catch(e){window.odT.log("InStream Module - Error: setAmazonFloors:",e)}}))),window.apstag.fetchBids({slots:t,timeout:this.videoInstreamTimeout},(e=>{window.odT.log("InStream Module - "+(e&&e.length>0?"Amazon VIDEO bids received":"No amazon VIDEO bids received"),e),this.processAmazonBids(e),this.videoInstreamAmazonReady=!0,this.videoBiddersBack()}))):(this.videoInstreamAmazonReady=!0,this.videoBiddersBack())}processAmazonBids(e){if(!this.currentVideoAdSlotConfig)return this.videoInstreamAmazonReady=!0,void this.videoBiddersBack();if(e.length>0)for(const t of this.currentVideoAdSlotConfig)t.videoAdslots.forEach((t=>{const i=this.findConfigForAdslot(t.adslot);if(!i)return;const o=`${i.adslot}`,n=`optidigital-adslot-${i.adslot}`,d=e.find((e=>{var t,i,n,d;return e.slotID===(null===(d=null===(n=null===(i=null===(t=this.setup.biddersSetup)||void 0===t?void 0:t.amazon)||void 0===i?void 0:i.adSlots)||void 0===n?void 0:n[o])||void 0===d?void 0:d.slotId)}));if(d){const e=this.adslotResults.get(n)||{[o]:{vastURL:"",customParams:""}};this.amazonParams[o]=d.encodedQsParams,this.adslotResults.set(n,e)}}))}getPrebidVideoAdunit(e,t){const i=[];if(this.setup.biddersSetup&&Object.keys(this.setup.biddersSetup).forEach((t=>{var o;if("amazon"===t)return;const n=this.setup.biddersSetup[t];if(null===(o=null==n?void 0:n.adSlots)||void 0===o?void 0:o.hasOwnProperty(e)){const o={bidder:t,params:n.adSlots[e]};i.push(o)}})),i.length>0){let o={};if(window.odT.initConfig&&window.odT.initConfig.adUnit&&window.odT.enableGpid){const t=`${window.odT.initConfig.adUnit}/${e}`;o={ext:{data:{pbadslot:t},gpid:t}}}return{code:e,mediaTypes:{video:t},bids:i,optiYield:{adUnitPath:`${window.odT.initConfig.adUnit}`,cd:{cd1:e}},ortb2Imp:o}}return null}videoBiddersBack(){this.videoInstreamAmazonReady&&this.videoInstreamPrebidReady&&(window.odT.log("InStream Module - Prebid & Amazon VIDEO bids received"),this.callVideoInstreamCallback())}findConfigForAdslot(e){const t=this.currentVideoAdSlotConfig;if(t)for(const i of t){const t=i.videoAdslots.find((t=>t.adslot===e));if(t)return t}}callVideoInstreamCallback(){if(this.videoInstreamStatus&&"done"!==this.videoInstreamStatus&&"aborted"!==this.videoInstreamStatus){if(window.odT.consentStatusNoGAM&&-1!==window.odT.consentStatusNoGAM.indexOf(window.odT.consentStatus)){if(window.odT.log("InStream Module - CMP consent rejected, aborting GAM callback"),this.videoInstreamStatus="aborted",this.videoInstreamCallback)try{this.videoInstreamCallback([])}catch(e){window.odT.log("InStream Module - Error in video instream callback (consent rejected):",e)}return}if(this.videoInstreamStatus="done",!this.currentVideoAdSlotConfig)return;const e=[];this.vastURLCustomParams={};for(const t of this.currentVideoAdSlotConfig){t.videoAdslots.forEach((t=>{const i=this.findConfigForAdslot(t.adslot);if(!i)return;const o=`${i.adslot}`,n=`optidigital-adslot-${i.adslot}`,d=this.adslotResults.get(n)||{[o]:{vastURL:"",customParams:""}};1===this.videoInstreamDMEncoding?(d[o].customParams=this.getVideoCustomParam(i,this.amazonParams&&this.amazonParams[o]||"",this.prebidParams&&this.prebidParams[o]||""),this.setup.dmGAMVASTParams&&(d[o].customParams+=this.setup.dmGAMVASTParams)):d[o].customParams+=this.getVideoCustomParam(i,this.amazonParams&&this.amazonParams[o]||"",this.prebidParams&&this.prebidParams[o]||""),d[o].customParams=encodeURIComponent(d[o].customParams),this.vastURLCustomParams[o]=d[o].customParams,d[o].vastURL=this.getVideoGAMVASTTagURL(i),e.push(d)}));try{window.odT.log("InStream Module - Callback"),this.videoInstreamCallback(e)}catch(e){window.odT.log("InStream Module - Error in video instream callback:",e)}}}}getVideoGAMVASTTagURL(e){var t,i;let o="https://pubads.g.doubleclick.net/gampad/ads?";o+="iu="+window.odT.initConfig.adUnit,Array.isArray(e.videoAdunitConfig.playerSize[0])?o+="&sz="+e.videoAdunitConfig.playerSize.map((e=>e.join("x"))).join("|"):o+="&sz="+e.videoAdunitConfig.playerSize.join("x"),o+="&ad_rule=0&plcmt="+(e.videoAdunitConfig.plcmt||1)+"&cust_params=",this.vastURLCustomParams&&this.vastURLCustomParams[e.adslot]&&(o+=this.vastURLCustomParams[e.adslot]);let n="auto",d="0";return e.videoAdunitConfig.playbackmethod&&(e.videoAdunitConfig.playbackmethod.includes(3)&&(n="click"),(e.videoAdunitConfig.playbackmethod.includes(2)||e.videoAdunitConfig.playbackmethod.includes(6))&&(d="1")),o+="&vpa="+n+"&vp_mute="+d,o+="&vpos="+e.type,o+="&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp",o+="&correlator="+(this.videoGAMCorrelator++||Math.floor(1e13*Math.random())),o+="&url="+encodeURIComponent((null===(t=window.top)||void 0===t?void 0:t.location.href)||""),o+="&description_url="+encodeURIComponent((null===(i=window.top)||void 0===i?void 0:i.location.href)||""),window.odT.consentV2TCData&&!0===window.odT.consentV2TCData.gdprApplies&&(o+="&gdpr=1",o+="&gdpr_consent="+window.odT.consentV2TCData.tcString),o}getVideoCustomParam(e,t,i){var o;let n="adslot="+e.adslot;return"test"===window.odT.testGroup&&(n+="&test_group=test"),n+="&odtag_status=1",n+=this.videoInstreamPageTargeting,!0!==window.odT.limitedAds||"CMPv2_LAokHBok"!==window.odT.consentStatus&&"CMPv2_LAokHBko"!==window.odT.consentStatus||(n+="&od_limitedads=1"),window.odT.oyStatus&&(null===(o=window.optiyield)||void 0===o||o.cmd.push((()=>{var t;const i=decodeURIComponent(null===(t=window.optiyield)||void 0===t?void 0:t.getVideoInStreamFloor(window.odT.initConfig.adUnit,{cd1:e.adslot}));i&&(n+="&"+i)}))),i&&(n+=i),t&&(n+=t),n}};var m=i(862);window.launcherLoadTime=Math.round(performance.now());const y=class{adRequestStats=!0;adserver="GAM";adSlotsLoadCount=[];adSlotsLoadStatus=[];adSlotsLoadTime=[];adSlotsUnfilledCount=[];apsSizes=[[1e3,250],[1e3,90],[970,250],[970,90],[800,250],[700,250],[728,90],[468,60],[300,600],[120,600],[160,600],[336,280],[320,180],[300,250],[300,100],[300,50],[250,250],[320,100],[320,50],[200,200]];auctionMetrics={};auctionBids={};auctionFailsafe={};consentOK=["CMPv2_GAMokHBok","CMPv2_GAMokHBko","CMPv2_OOS"];consentStatusNoGAM=["CMPv2_RejectALL","CMPv2_GAMmv","CMPv2_GAMko","CMPv2_LAokHBok","CMPv2_LAokHBko","CMPv2_LAko","CMPv2_LAMmv"];consentStatusNoGAMButLA=["CMPv2_RejectALL","CMPv2_GAMmv","CMPv2_GAMko","CMPv2_LAko","CMPv2_LAMmv"];consentType="ko";customDNR=!0;debug=!1;debugBidderDiscount=1;defaultPriceGranularity={buckets:[{max:3,min:0,increment:.01,precision:2},{max:8,min:3,increment:.05,precision:2},{max:20,min:8,increment:.5,precision:2}]};enableArticleReporting=!0;enablePerformances=!0;enableGpid=!0;enableSourceReporting=!0;enableLimitedAds=!0;enableCookieConsent=!1;engageBackfill=!0;eventCallback=[];finalAdSlotsConfig={};firstLoadAdSlots=[];googleInit=!1;gptAdSlots=[];iasId=!1;iasReady=!1;infiniteScrollId=1;infiniteScrollWallpaperSlot=!1;initConfig={};inpEventCount=0;insertInreadStartDone=!1;isFirstCLSTrigerred=!0;lazyLoadPendingAdSlots=[];lazyLoadPendingAdSlotsWithRewarded=[];limitedAds=!1;logPrefix="%cOptiDigital_Debug:%c ";analyticsLogPrefix="%cOptiDigital_Debug_Analytics:%c ";debugAnalytics=!1;mobileEvenVerticalSizes=!1;noGamUseSafeframe=!1;notVisibleAdslots=[];observedPerformances=["navigation","paint","first-input","largest-contentful-paint","layout-shift","longtask","event"];oyStatus=!0;pageViewCalls=0;performances={scriptLoadingTime:0,adFirstRenderTime:0,fcp:0,tbt:0,ttfb:0,height:null,words:null,paragraphs:null,adDensity:null,isPerformances:!0};pfConfig={};prebidSizes=[[1e3,250],[1e3,90],[970,250],[970,90],[800,250],[700,250],[728,90],[468,60],[300,600],[120,600],[160,600],[336,280],[320,200],[320,180],[320,150],[300,250],[300,100],[300,50],[250,250],[320,100],[320,50],[200,200]];prebidSizesAdjusted=!1;rewardedAdPayload=null;rewardedAdContentSelector="article";rewardedAdCookie="opd_rewardedAd";screen=window.top?window.top.document.documentElement.clientWidth<768?"Mobile":"Desktop":document.documentElement.clientWidth<768?"Mobile":"Desktop";secondChancePending=[];setup={};siteCode="na";sizesFor={default:[["fluid"],[336,280],[250,250],[300,250],[200,200]],billboard:[[1e3,250],[1e3,90],[970,250],[800,250],[970,90],[728,90],[700,250],[300,250],[468,60]],halfpagead:[["fluid"],[300,600],[300,250],[160,600],[120,600],[250,250],[200,200]],content:[["fluid"],[336,280],[300,250],[250,250],[728,90],[700,250],[468,60]],interstitial:[[320,480],[336,280],[300,250],[250,250]],mobilepos:[["fluid"],[300,250],[320,160],[320,100],[320,80],[320,50],[250,250],[336,280],[300,50]],desktopsticky:[[1e3,90],[970,90],[728,90]],mobilesticky:[[320,50],[320,80],[320,100],[300,100],[300,50]],verticalsticky:[["fluid"],[300,600],[300,350],[300,250],[336,280],[160,600],[120,600],[250,250],[200,200]],outofpage:[[1,1]],wallpaper:[[1,1]]};sizesForMobilePos=[[300,600],[160,600],[120,600]];sourceDomains=["www.google.fr","www.google.com","news.google.com","www.facebook.com","facebook.com","m.facebook.com","l.facebook.com","lm.facebook.com","from.flipboard.com","pinterest.com","pinterest.fr","www.linkedin.com","linkedin.com","t.co","instagram.com","googleapis.com","www.googleapis.com"];sourceID=!1;stickyAutoCloseScroll=!0;stickyAdAutoHidePx=100;stickyAdDivId=!1;stickyAdMode="bottom";stickyAdStatus="off";stickyAdTopTrigger=0;stickyCookie="opd_sticky";stickyFormatClosed=!0;stickyFormatLoaded=[];tagMode=!1;tagSizes=[["fluid"],[336,280],[250,250],[300,250],[200,200],[1e3,250],[1e3,90],[970,250],[800,250],[970,90],[728,90],[700,250],[468,60],[300,600],[160,600],[120,600],[320,480],[320,100],[320,80],[320,50],[300,50],[320,160],[300,100]];testGroup="control";userAction=[];userPerformances={cls:null,fid:null,inp:null,lcp:0,isUserPerformances:!0};userPerformanceSent=!1;widthBreakpoint=document.documentElement.clientWidth;windowStatus=1;constructor(e={}){window.odT=this,this.optidigitalSetup=window.optidigitalSetup,this.tools=w,this.cyrb53=w.cyrb53.bind(w),this.log=w.log.bind(w),this.checkSafeFrameDelivery=w.checkSafeFrameDelivery.bind(w),this.loadLibs(),window.optidigitalToolbox=this,this.infiniteScrollRefresh=this.spaManualLoad,this.loadConfig(this.optidigitalSetup||{}),this.analytics=new f(this.setup,this.forceAnalytics),this.iasModule=e?.iasModule,this.divIdPrefix=void 0!==this.setup.divIdPrefix?this.setup.divIdPrefix:"optidigital-adslot-",this.adAdaptersFactory=new l(this.screen,this.setup,this.divIdPrefix,this.rewardedAdCookie,this.rewardedAdFrequency,this.rewardedAdFrequencyImps,this.rewardedAdFrequencyInterval),this.stickyAdapter=this.adAdaptersFactory.getStickyAdapter(),this.setup.hasOwnProperty("launcherInit")&&"function"==typeof this.setup.launcherInit&&(this.setup.launcherInit(this.initConfig),this.log("launcherInit executed")),window.optiyield=window.optiyield||{cmd:[]},window.optiyield.initOptiYieldSdk=!1,window.googletag=window.googletag||{cmd:[]},window.googletag.cmd=window.googletag.cmd||[],window.googletag.cmd.push((function(){window.googletag.pubads().disableInitialLoad()})),window.odpbjs=window.odpbjs||{que:[]},this.setup&&this.setup.pbAlias&&(window[this.setup.pbAlias]=window.odpbjs),window.odpbjs.renderAd=function(e,t){window.odT.bidsFromOe&&window.odT.bidsFromOe.length&&window.odT.bidsFromOe.forEach((i=>{if(i.bidId===t)try{const o=e?.defaultView?.frameElement;o&&(o.width=i.w,o.height=i.h),e.write(i.adm);const n=window.odT.bidsFromOe.findIndex((e=>e.bidId===t));-1!==n&&window.odT.bidsFromOe.splice(n,1)}catch(e){}}))};try{const e=window.odT?.setup?.videoInstreamSetup,t=e&&"object"==typeof e&&!Array.isArray(e)&&Array.isArray(e.videoAdSlotConfigurations)&&e.videoAdSlotConfigurations.length>0;this.instreamModule=t?new h(e):null,window.optidigitalToolbox.getVideoInstreamAds=this.instreamModule.getVideoInstreamAds.bind(this.instreamModule)}catch(e){}this.openConnection(),this.bootstrapConsent(),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",(()=>{if(document.body)window.odT.startODT();else{let e=setInterval((()=>{document.body&&(window.odT.startODT(),clearInterval(e))}),10)}})):window.odT.startODT()}getVideoInstreamAds(e,t,i){if(void 0===this.instreamModule){const e=this.setup?.videoInstreamSetup,t=e&&"object"==typeof e&&!Array.isArray(e)&&Array.isArray(e.videoAdSlotConfigurations)&&e.videoAdSlotConfigurations.length>0;this.instreamModule=t?new h(e):null}this.instreamModule&&this.instreamModule.getVideoInstreamAds(e,t,i)}startODT(){window?.odT?.setup?.[`lightPackageAndAmazon${window.odT.screen}`]&&window.odT.loadAPS(),window.odT.analytics.registerPerformanceObserver(),window.odT.processCommandQueue(),window.odT.setup.disableInfiniteScrollFirstLoad||window.odT.setup.spaManualMode||window.odT.setDefaultSizes()}setAdLayout(e,t,i,o,n,d,s){let a,r,l,c,u,p,w={optidigitalWrapper:{display:"flex","align-items":"center","justify-content":"center",width:"100%"},logoLoading:{"background-image":"url('https://scripts.opti-digital.com/img/optidigital_logo.svg')","background-position":"center","background-repeat":"no-repeat","background-size":"50px 50px"},addBackground:{"background-color":"transparent"},optidigitalBrand:{src:"https://scripts.opti-digital.com/img/optidigital_logo.svg",alt:"Optidigital Logo",link:`https://www.optidigital.com/?utm_medium=aio&utm_source=${window.location.host&&window.location.host.replace("www.","")}`,text:"Powered by",textCss:{}},reverse:!1,important:"important",customCss:"",adslotMinHeight:!0,sticky:!0,stickyTop:{769:"0",768:"67",525:"10"},fitContent:!1,width100:!0,checkParentOverflow:!1},g={"font-size":"13px","font-family":"Verdana",padding:"5px 0",margin:"0"},f=function e(t,...i){if(!i.length)return t;const o=i.shift();for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&(o[i]instanceof Object?(t[i]||Object.assign(t,{[i]:{}}),e(t[i],o[i])):Object.assign(t,{[i]:o[i]}));return e(t,...i)}({},w,e),h=f.reverse?"column-reverse":"column";requestAnimationFrame((()=>{let e=function(e){let t,i,o,n=e,d=0;for(;n&&(t=window.getComputedStyle(n),i=parseFloat(t.paddingLeft),o=parseFloat(t.paddingRight),d=n.clientWidth-i-o,!(d>0));)n=n.parentElement;return d}(t);a=o>=e?e+"px":o+"px";let n=i;if(1==f.adslotMinHeight){if(f.optidigitalWrapper["padding-top"]&&(i+=parseFloat(f.optidigitalWrapper["padding-top"].slice(0,-2))),f.optidigitalWrapper["padding-bottom"]&&(i+=parseFloat(f.optidigitalWrapper["padding-bottom"].slice(0,-2))),f.optidigitalBrand&&(i+=20),f.addText&&t.getAttribute("id")&&5!==s){if(f.addText["font-size"]?i+=parseFloat(f.addText["font-size"]):i+=parseFloat(g["font-size"]),f.addText.padding){let e=f.addText.padding.split(" ");1===e.length||2===e.length?i+=2*parseFloat(e[0]):3!==e.length&&4!==e.length||(i+=parseFloat(e[0])+parseFloat(e[2]))}f.addText["padding-top"]&&(i+=parseFloat(f.addText["padding-top"])),f.addText["padding-bottom"]&&(i+=parseFloat(f.addText["padding-bottom"])),f.addText.padding||f.addText["padding-top"]||f.addText["padding-bottom"]||(i+=10)}if(f.addBackground&&"transparent"!==f.addBackground["background-color"]&&!1===f.optidigitalBrand){let e=f.optidigitalWrapper.hasOwnProperty("padding-bottom")?f.optidigitalWrapper["padding-bottom"]:"15px";i+=parseFloat(e)}if(!f.addText&&"transparent"!==f.addBackground["background-color"]&&t.getAttribute("id")&&5!==s){let e=f.optidigitalWrapper.hasOwnProperty("padding-top")?f.optidigitalWrapper["padding-top"]:"15px";r=e,i+=parseFloat(e)}l=i+"px"}let d=t.parentElement;if(d){let e=getComputedStyle(d);!f.forceTextAndBranding&&"number"==typeof parseFloat(e.height)&&parseFloat(e.height)>0&&"number"==typeof parseFloat(e["min-height"])&&parseFloat(e["min-height"])!==parseFloat(e.height)&&parseFloat(e.height)<parseFloat(l)&&(f.optidigitalBrand=!1,f.addText=!1,l=n+"px",c=!0)}let w=t.getBoundingClientRect().width,h=screen.width;if(0===w&&(w=h),u=h,p=(h-w)/2,f.sticky){if(f.checkParentOverflow){let e=t.parentElement;for(;e&&"body"!==e.nodeName.toLowerCase()&&"html"!==e.nodeName.toLowerCase();)"visible"!==getComputedStyle(e).overflow&&(e.style.overflow="clip"),e=e.parentElement}if(t&&(!f.hasOwnProperty("optidigitalBrand")||!1===f.optidigitalBrand))if(t.style.setProperty("position","sticky",f.important),f.hasOwnProperty("stickyTop")){t.style.setProperty("top","0",f.important);for(const e in f.stickyTop)screen.width>e&&t.style.setProperty("top",f.stickyTop[e]+"px",f.important)}else t.style.setProperty("top","0",f.important)}})),requestAnimationFrame((()=>{let e=document.createElement("div");if(e.setAttribute("data-optidigital-slot","true"),e.className="optidigital-wrapper-div",f.nosnippet&&e.setAttribute("data-nosnippet",""),f.hasOwnProperty("optidigitalWrapper")){for(const[t,i]of Object.entries(f.optidigitalWrapper))e.style.setProperty(t,i,f.important);t.getAttribute("id")&&5===s&&e.style.setProperty("padding","0",f.important),d&&e.style.setProperty("justify-content","top"===d?"flex-start":"center"===d?"center":"flex-end",f.important)}if(e.style.setProperty("min-width",a,f.important),e.style.setProperty("flex-direction",h,f.important),e.style.setProperty("padding-top",r,f.important),e.style.setProperty("min-height",l,f.important),f.hasOwnProperty("addBackground")&&(t.getAttribute("id")&&5!==s||f.addBackground.enableSticky)){let t=f.optidigitalWrapper.hasOwnProperty("padding-bottom")?f.optidigitalWrapper["padding-bottom"]:"15px";f.fitContent?(e.style.setProperty("background-color",f.addBackground["background-color"],f.important),e.style.setProperty("width","fit-content",f.important),e.style.setProperty("margin-left","auto",f.important),e.style.setProperty("margin-right","auto",f.important)):e.style.setProperty("background-color",f.addBackground["background-color"],f.important),!1!==f.optidigitalBrand||"transparent"===f.addBackground["background-color"]||c||e.style.setProperty("padding-bottom",t,f.important)}if(t&&(t.parentNode.classList.contains("optidigital-brand")||(t.parentNode.insertBefore(e,t),e.appendChild(t))),u<525&&e.parentElement&&"opd_bottomstickyad"!==e.parentElement.getAttribute("id"))if("100%"===f[`wDivWidth${odT.screen}`])e.style.setProperty("width","100%","important");else{e.style.setProperty("width",`${u}px`,"important");const t="rtl"===document?.documentElement?.dir||"rtl"===document?.body?.dir;e.style.setProperty(t?"margin-right":"margin-left",`-${p}px`,"important")}if(t.closest(".optidigital-wrapper-div")&&t.getAttribute("id")&&(t.getAttribute("id").includes("Content")||t.getAttribute("id").includes("Mobile_Pos")||t.getAttribute("id").includes("Mobile_AI"))&&("".includes("margin-top")||(t.closest(".optidigital-wrapper-div").style.cssText+="margin-top:1em;"),"".includes("margin-bottom")||(t.closest(".optidigital-wrapper-div").style.cssText+="margin-bottom:1em;"),t.style.marginTop=0,t.style.marginBottom=0),f.hasOwnProperty("logoLoading")&&f.logoLoading){let i=Number(l.replace("px",""));i&&i<50&&(f.logoLoading["background-size"]="auto");for(const[i,o]of Object.entries(f.logoLoading))t&&e.style.setProperty(i,o,f.important)}if(f.hasOwnProperty("addText")&&!1!==f.addText&&t.getAttribute("id")&&5!==s){let e=document.createElement("div");e.className="optidigital-text-ads";for(const[t,i]of Object.entries(g))e.style.setProperty(t,i,f.important);if(Object.entries(f.addText).length)for(const[t,i]of Object.entries(f.addText))e.style.setProperty(t,i,f.important);e.style.setProperty("line-height","1"),e.style.setProperty("display","none"),e.style.setProperty("position","static",f.important);let i=document.createElement("span");f.addText.hasOwnProperty("font-size")?i.style.setProperty("font-size",f.addText["font-size"],f.important):i.style.setProperty("font-size",g["font-size"],f.important);let o="La suite après la publicité",n="Publicité";f.addText.textdesktop&&(n=f.addText.textdesktop),f.addText.textmobile&&(o=f.addText.textmobile),i.textContent=window.matchMedia("(min-width: 760px)").matches?n:o,i.style.setProperty("position","static",f.important),e.append(i),t&&t.before(e)}if(f.hasOwnProperty("optidigitalBrand")&&f.optidigitalBrand){if(f.optidigitalBrand.hasOwnProperty("disableBrandStickyFormat")&&f.optidigitalBrand.disableBrandStickyFormat&&t.getAttribute("id")&&5===s)return!1;let e=document.createElement("div");e.className="optidigital-brand",e.style.setProperty("display","flex",f.important),e.style.setProperty("flex-direction",h,f.important),e.style.setProperty("margin","0",f.important),f.width100&&(e.style.setProperty("width","100%",f.important),e.style.setProperty("align-items","center",f.important));let i="";if(f.optidigitalBrand.hasOwnProperty("link")&&""!==f.optidigitalBrand.link){let e=t&&t.getAttribute("id")?t.getAttribute("id"):"";e=e.replace(odT.divIdPrefix,""),i=`<div class="optidigital-brand-logo" style="display:none;"><a href="${f.optidigitalBrand.link}${e?"&utm_campaign="+e:""}" ${!1===f.optidigitalBrand.optidigitalBrandNoFollow?"":"rel='nofollow'"} class="optidigital-brand-logo-link" target="_blank"></a></div>`}else i=`<div class="optidigital-brand-logo" style="display:none;"><img align="right" src="${f.optidigitalBrand.src}" alt="${f.optidigitalBrand.alt}"/></div>`;if(f.sticky&&e){if(e.style.setProperty("position","sticky",f.important),f.hasOwnProperty("stickyTop")){e.style.setProperty("top","0",f.important);for(const t in f.stickyTop)u>t&&e.style.setProperty("top",f.stickyTop[t]+"px",f.important)}else e.style.setProperty("top","0",f.important);t.classList.remove("optidigital-ad-center-sticky")}if(t&&(t.parentNode.classList.contains("optidigital-brand")||(t.parentNode.insertBefore(e,t),e.appendChild(t),t.insertAdjacentHTML("afterend",i))),document.querySelector(".optidigital-brand-logo")&&!document.getElementById("optidigital-layout-style")){let e=document.createElement("style");e.id="optidigital-layout-style";let t=`.optidigital-brand-logo {opacity: 0; transition: opacity 2s; text-align: right; line-height: 1!important; height: 20px!important; margin: 0!important; } .optidigital-brand-logo.optidigital-brand-logo-active { opacity: 1; } .optidigital-brand-logo .optidigital-brand-logo-link {display: inline-block; color: transparent !important; border: none!important; text-decoration: none; box-shadow: none!important; height: 15px!important; background: url(${f.optidigitalBrand.src}) no-repeat right!important; background-size: 13px!important; padding: 0; margin: 3px 0 0 0; width: auto; min-width:${f.optidigitalBrand.textCss["min-width"]?f.optidigitalBrand.textCss["min-width"]:"85px"}!important; letter-spacing: normal!important; } .optidigital-brand-logo img { margin: 1px 0 0 0!important; padding: 0!important; width: 13px!important; height: auto !important; } ${f.optidigitalBrand.hasOwnProperty("link")&&""!==f.optidigitalBrand.link?".optidigital-brand-logo a":".optidigital-brand-logo"}{ position: relative !important; top: 0!important; } ${f.optidigitalBrand.hasOwnProperty("link")&&""!==f.optidigitalBrand.link?".optidigital-brand-logo a":".optidigital-brand-logo"}::before {content: "${f.optidigitalBrand.text?f.optidigitalBrand.text:""}"; position: absolute!important; top: ${f.optidigitalBrand.textCss.top?f.optidigitalBrand.textCss.top:"2px"}!important; right: ${f.optidigitalBrand.textCss.right?f.optidigitalBrand.textCss.right:"16px"}!important; font-size: ${f.optidigitalBrand.textCss["font-size"]?f.optidigitalBrand.textCss["font-size"]:"11px"}!important; line-height: ${f.optidigitalBrand.textCss["line-height"]?f.optidigitalBrand.textCss["line-height"]:"11px"}!important; font-family: ${f.optidigitalBrand.textCss["font-family"]?f.optidigitalBrand.textCss["font-family"]:"Verdana"}!important; color: ${f.optidigitalBrand.textCss.color?f.optidigitalBrand.textCss.color:"#888888"}!important; font-weight: normal!important; }`;e.appendChild(document.createTextNode(t)),document.getElementsByTagName("head")[0].appendChild(e)}}if(t.parentNode.classList.contains("optidigital-brand")&&f.sticky&&t.style.setProperty("position","static",f.important),"auto"===f[`adDivWidth${odT.screen}`]?t.style.setProperty("width","auto",f.important):t.style.setProperty("width","100%",f.important),f.hasOwnProperty("adDivStyle"))for(const[e,i]of Object.entries(f.adDivStyle))t&&t.style.setProperty(e,i,f.important);if(f.hasOwnProperty("customCss")){const e=document.createElement("style");e.textContent=f.customCss,document.head.appendChild(e)}}))}loadLibs(){var e;function t(e,o){var n=i();return(t=function(e,t){return n[e-=456]})(e,o)}function i(){var e=["candidatesData","450TlPpUN","wrapperClass","parentElement","secureCandidateAdder","optidigital","previousTypeExtra","version","parentNode","nextElementSibling","verifyKeepDistanceFromTheBottom failed","_extendDefaults","Crawling DOM searching for possible candidates","forbiddenElements","insertOne","parentDiv","intervalIncrement","dontBreakWithPreviousType","insertInRead","keepTheDistancePx","1735LdfHMK","Step out ","Crawling DOM for candidates finished","_setupForbidden","pop","getBoundingClientRect","getElementsByClassName","topWithDistance","insertAtTheEnd","createElement","from","none","getElementById","infiniteScroll","verifyKeepTheDistanceFrom failed","debug","random","wrapperTag","length","block","verbose","debugLevel","keepDistanceFromBottom","557058HByNRb","invisible","useXPath","tagName","2.2.11","stepOut","getComputedStyle","readDOM","stepIn","appendChild","floor","parentDiv selector missing !","height","getInsertedAds","omitInvisible","color","14154UpmHDx","FIRST_ORDERED_NODE_TYPE","insertBefore","innerHTML","minHeight","error","createAdSlotElement","insertedAds","isOptiDiv","verifyInterval failed","style","exports","25150xPRwoq","insertAdslotIntoTarget","background","adsTag","top","previousType","getContainer","replace","81Hlizbw","includes","interval","recurrenceLevel","8UIFSTG","1396692myCUWX","keepDistanceFromTheBottom","bottom","presentLevel","children","every","setAttribute","classList","keepDistancePx","keepDistanceFromTheTop","display","info","data-adslot-id","forbidden","9912kaukii","insertAdslotBeforeTarget","nextSibling","verifyKeepDistanceFromTheTop failed","396583dGAPEZ"," <= ","className","_insertAll","Insertion start","_overrideTheOptions","getAttribute","parentContainer","2548553ipUeCg","keepDistanceFrom","push","domToolkit","candidateElements","optidigital-adslot-","isOptiClass","nextElement","infiniteAdslot","candidate:","adsCount","adSlots","positionFirst","reverse","isVisible","keepTheDistanceFrom","divIdPrefix","previousTypeClass","log","OptiDigital Smart Inserter","forEach","evaluate","__setupSingleForbidden","toLocaleLowerCase","logger","keepDistanceFromTop","singleNodeValue"];return(i=function(){return e})()}(()=>{var e={895:(e,t,i)=>{var o,n,d;function s(e,t){var i=a();return s=function(t,o){var n=i[t-=393];if(void 0===s.KIyUjI){var d=function(e){for(var t,i,o="",n="",s=o+d,a=0,r=0;i=e.charAt(r++);~i&&(t=a%4?64*t+i:i,a++%4)?o+=s.charCodeAt(r+10)-10!=0?String.fromCharCode(255&t>>(-2*a&6)):a:0)i="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(i);for(var l=0,c=o.length;l<c;l++)n+="%"+("00"+o.charCodeAt(l).toString(16)).slice(-2);return decodeURIComponent(n)};s.rYuNnP=d,e=arguments,s.KIyUjI=!0}var a=t+i[0],r=e[a];if(r)n=r;else{var l=function(e){this.ylGxOJ=e,this.QFRlrM=[1,0,0],this.MYLxhs=function(){return"newState"},this.lRKEDe="\\w+ *\\(\\) *{\\w+ *",this.bxjPTs="['|\"].+['|\"];? *}"};l.prototype.iLVXgA=function(){var e=new RegExp(this.lRKEDe+this.bxjPTs).test(this.MYLxhs.toString())?--this.QFRlrM[1]:--this.QFRlrM[0];return this.zcekba(e)},l.prototype.zcekba=function(e){return Boolean(~e)?this.IVHzJZ(this.ylGxOJ):e},l.prototype.IVHzJZ=function(e){for(var t=0,i=this.QFRlrM.length;t<i;t++)this.QFRlrM.push(Math.round(Math.random())),i=this.QFRlrM.length;return e(this.QFRlrM[0])},new l(s).iLVXgA(),n=s.rYuNnP(n),e[a]=n}return n},s(e,t)}function a(){var e=["Dw5KzwzPBMvK","Dg9tDhjPBMC","mtGZmda4mffcC3zhuq","zgvMAw5LuhjVCa","kcGOlISPkYKRkq","yxbWBhK","y2vPBa","y29UC3rYDwn0BW","zNjVBunOyxjdBW","Dg9tDhjPBMDuyq","zxHWB3j0CW","Eg9YrgvJCNLWDa","ohL6y0PmtW","BgvUz3rO","nZy5Du9nsxzq","mtu3nhbpDunIuG","B2jQzwn0","zNvUy3rPB24","mtC1ote2mxDyr3DQqW","nJyZndbWrhruAxy","DMfSDwu","AgfZt3DUuhjVCa","mJqYmZK0AMTXDhLd","zxj0Eq","zNjVBunVzgvqBW","x19LC01VzhvSzq","C2vHCMnO","yw1K","vvrgoefYCLrVuW","ChjVDg90ExbL","y2HHCKnVzgvbDa","tw9KDwXL","tw9KDwXLCW","mtmWwwflqKTV","Aw50","B0fYCG","mZiYmtC5m0PdBM92qq","y2fSBa","mta1ota4nLPywfPwEq"];return(a=function(){return e})()}e=i.nmd(e),function(e){for(var t=s,i=e();;)try{if(393714==parseInt(t(419))/1*(parseInt(t(420))/2)+parseInt(t(423))/3+parseInt(t(424))/4*(-parseInt(t(399))/5)+-parseInt(t(427))/6+-parseInt(t(404))/7+parseInt(t(417))/8*(-parseInt(t(402))/9)+parseInt(t(407))/10)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(a),function(a,r){var l,c=s,u=(l=!0,function(e,t){var i=l?function(){if(t){var i=t[s(410)](e,arguments);return t=null,i}}:function(){};return l=!1,i}),p=u(this,(function(){var e=s;return p[e(406)]()[e(431)](e(409)+"+$")[e(406)]()[e(412)+"r"](p)[e(431)](e(409)+"+$")}));p(),c(421)==typeof t&&"object"==c(421)?e[c(415)]=r():"function"==c(422)&&i.amdD[c(393)]?(n=[],void 0===(d="function"==typeof(o=r)?o.apply(t,n):o)||(e.exports=d)):c(421)==typeof t?t[c(398)]=r():a[c(398)]=r()}(self,(()=>(()=>{var e=s,t={d:(e,i)=>{var o=s;for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object[o(408)+o(428)](e,n,{enumerable:!0,get:i[n]})},o:(t,i)=>Object[e(395)][e(426)+e(428)][e(403)](t,i),r:t=>{var i=e,o={};o[i(425)]=i(397);var n={};n[i(425)]=!0,i(405)!=typeof Symbol&&Symbol.toStringTag&&Object[i(408)+i(428)](t,Symbol[i(414)+"g"],o),Object[i(408)+"erty"](t,i(430),n)}},i={};function o(t,i){var o=e;const n=t.replace(/[^A-Za-z0-9+/]/g,""),d=n.length,s=i?Math[o(411)]((3*d+1>>2)/i)*i:3*d+1>>2,a=new Uint8Array(s);let r,l,c=0,u=0;for(let e=0;e<d;e++)if(l=3&e,c|=((p=n.charCodeAt(e))>64&&p<91?p-65:p>96&&p<123?p-71:p>47&&p<58?p+4:43===p?62:47===p?63:0)<<6*(3-l),3===l||d-e==1){for(r=0;r<3&&u<s;)a[u]=c>>>(16>>>r&24)&255,r++,u++;c=0}var p;return a}function n(t){var i=e;let o,n="";const d=t[i(418)];for(let e=0;e<d;e++)o=t[e],n+=String[i(429)+i(400)](o>251&&o<254&&e+5<d?1073741824*(o-252)+(t[++e]-128<<24)+(t[++e]-128<<18)+(t[++e]-128<<12)+(t[++e]-128<<6)+t[++e]-128:o>247&&o<252&&e+4<d?(o-248<<24)+(t[++e]-128<<18)+(t[++e]-128<<12)+(t[++e]-128<<6)+t[++e]-128:o>239&&o<248&&e+3<d?(o-240<<18)+(t[++e]-128<<12)+(t[++e]-128<<6)+t[++e]-128:o>223&&o<240&&e+2<d?(o-224<<12)+(t[++e]-128<<6)+t[++e]-128:o>191&&o<224&&e+1<d?(o-192<<6)+t[++e]-128:o);return n}function d(t,i){for(var o=e,n="",d=0;d<t[o(418)];d++){var s=t.charCodeAt(d),a=i[o(396)](d%i.length);n+=String[o(413)+"de"](s^a)}return n}var a={};return a[e(394)+"tr"]=()=>n,a["base64DecT"+e(401)]=()=>o,a[e(416)]=()=>d,t.r(i),t.d(i,a),i})()))}},t={};function i(o){var n=t[o];if(void 0!==n)return n.exports;var d=t[o]={id:o,loaded:!1,exports:{}};return e[o](d,d.exports,i),d.loaded=!0,d.exports}i.amdD=function(){throw new Error("define cannot be used indirect")},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e=i(895),t=function(){var t={config:{},dNR:1,dDevice:"30001",rand:0,randInterstitial:0,samplingInterstitial:25,unitTemplate:"%AU%|%C1%|%NR%|%D%|%C%",seed:100,acceptedConsents:["nocmp","nocmp_api","CMPv2_OOS","CMPv2_GAMokHBok","CMPv2_GAMokHBko"],params:Object.fromEntries(new URLSearchParams(window.location.search).entries()),debug:!1,pubId:0,initConfig:{},i4n3i2tConfig:{},clientDebug:!1,forceDebugPf:!1,pfDebug:void 0,pbjsCustomFloorsConfig:!1,pbjs:void 0,sourceID:void 0,sourceRatio:void 0,pfUnits:{},pbjsEvents:{addAdUnitsEvent:void 0,beforeBidRequestEvent:void 0},conf:{ma:!1},ABModeSplit:!1,randAB:0,ABgroupB:!1,aed:[{max:.01,min:0},{max:.25,min:.01},{max:.5,min:.25},{max:.75,min:.5},{max:1,min:.75},{max:1.25,min:1},{max:1.5,min:1.25},{max:1.75,min:1.5},{max:2,min:1.75},{max:3,min:2},{min:3}],logS:"background: #286090;border-radius:5px;color:#79ba23;font-weight:700;padding:2px 5px;",logC:"color:#1E90FF",logP:"%cOYSDK:%c ",oy_mode_enum:Object.freeze({INACTIVE:"0",YIELD:"1",LASTLOOK:"2",HYBRID:"3"})};function i(e,t){return e.hasOwnProperty(t)}function o(e){if(void 0===e||void 0===e.adUnitPath)return{haveParent:!1,floorConfig:e};const t=e.adUnitPath.match(/(?<dirname>.*)\//);return null!=t&&i(t,"groups")&&void 0!==t.groups&&t.groups.dirname?(e.adUnitPath=t.groups.dirname,{haveParent:!0,floorConfig:e}):{haveParent:!1,floorConfig:e}}function n(e,o=""){let n="";try{n=a(e)}catch(e){}let s=window.odT.cyrb53(n,t.seed);t.debug&&console.log(t.logP+o+" pfUnit "+s+" was encrypted "+n,t.logS,t.logC);let r=function(e,o,n=""){if(!(i(t.config,"cur")&&i(t.config.cur,"code")&&t.config.cur.code.gam&&t.config.cur.code.amazon&&t.config.cur.code.prebid&&i(t.config.cur,"ratio")&&t.config.cur.ratio.gam&&t.config.cur.ratio.amazon&&t.config.cur.ratio.prebid))return;let s={imps:0,unfilled:0,firstUnfilled:0,pf:{def:!1,defgam:"0.00",defprebid:"0.00",defamazon:"0.00"}};if(!i(t.config,e)){t.conf?.spf?(s.is_small=!0,s.tf=87):(s.tf=0,s.ae=0),s.oy_mode=t.oy_mode_enum.LASTLOOK,t.pfUnits[e]=s,t.debug&&console.log("%cOYSDK:%c pfUnit: "+e+" configured as SMALL pfUnit","background: #286090;border-radius:5px;color:#79ba23;font-weight:700;padding:2px 5px;","color:#1E90FF");const i=d(window.location.hostname,window.odT.checkBrowser,o.adUnitPath,o.customDimensions?.cd1);return null!=i&&(s.pf.def=!0,s.pf.defgam=window.odT.getCpmStringValue(i,t.config.pbd),s.pf.defprebid=(s.pf.defgam*t.config.cur.ratio.prebid).toFixed(2),s.pf.defamazon=(s.pf.defgam*t.config.cur.ratio.amazon).toFixed(2)),t.pfUnits[e]}if(void 0!==t.pfUnits[e])return t.pfUnits[e];var a;s.pf.gam="0.00",s.pf.prebid="0.01",s.pf.amazon="0.01",s.tf=t.config[e]?.tf||0,s.ae=t.config[e]?.ae||0,s.oy_mode=(a=t.config[e])&&0===Object.keys(a).length?t.oy_mode_enum.INACTIVE:!("ll"in a)&&a?.pf?t.oy_mode_enum.HYBRID:"ll"in a&&!a.ll?t.oy_mode_enum.YIELD:"pf"in a?(t.debug&&console.warn("%cOYSDK:%c Issue with oy_mode extraction. Invalid configuration for pfUnit: "+a,"background: #286090;border-radius:5px;color:#79ba23;font-weight:700;padding:2px 5px;","color:#1E90FF"),t.oy_mode_enum.INACTIVE):t.oy_mode_enum.LASTLOOK,t.debug&&console.log("%cOYSDK:%c pfUnit: "+e+" oy_mode set to = "+s.oy_mode+" ("+Object.keys(t.oy_mode_enum).find((e=>t.oy_mode_enum[e]===s.oy_mode))+")","background: #286090;border-radius:5px;color:#79ba23;font-weight:700;padding:2px 5px;","color:#1E90FF"),s.status=t.config[e].status;let r=g(t.config[e]),l=t.sourceRatio?t.sourceRatio:1;var c=(t.config[e]?.pf||0)*t.config.cur.ratio.gam*r*l;s.pf.cr=1,s.pf.gam=window.odT.getCpmStringValue(c,t.config.pbd),s.pf.prebid=(s.pf.gam*t.config.cur.ratio.prebid).toFixed(2),s.pf.amazon=(s.pf.gam*t.config.cur.ratio.amazon).toFixed(2);const u=d(window.location.hostname,window.odT.checkBrowser,o.adUnitPath,o.customDimensions?.cd1);return null!=u&&(s.pf.def=!0,s.pf.defgam=window.odT.getCpmStringValue(u,t.config.pbd),s.pf.defprebid=(s.pf.defgam*t.config.cur.ratio.prebid).toFixed(2),s.pf.defamazon=(s.pf.defgam*t.config.cur.ratio.amazon).toFixed(2)),s.oy_mode==t.oy_mode_enum.LASTLOOK&&(s.pf.gam=s.pf.defgam,s.pf.prebid=s.pf.defprebid,s.pf.amazon=s.pf.defamazon),"0.00"==s.pf.amazon&&(s.pf.amazon="0.01"),"0.00"==s.pf.prebid&&(s.pf.prebid="0.01"),t.pfUnits[e]=s,t.debug&&console.log(t.logP+n+" pfUnit "+e+" pf_bucket:"+s.pf.gam+" pf_calculated: "+c+" pf_orig: "+t.config[e]?.pf+" ratio_gam: "+t.config.cur.ratio.gam+" tbr: "+r+" sbr: "+l,t.logS,t.logC),t.pfUnits[e]}(s,e,o);return{pfUnit:s,pfUnitObj:r}}function d(e,i,o,n){if(!t?.config?.defpf)return;const d="string"==typeof i?i.toLowerCase():"",s=t.config.defpf,a=[`${d}|${e}|${n}|${o}`,`${d}|${e}|${n}|*`,`${d}|${e}|*|${o}`,`${d}|${e}|*|*`,`${d}|*|${n}|${o}`,`${d}|*|${n}|*`,`${d}|*|*|${o}`,`${d}|*|*|*`,`*|${e}|${n}|${o}`,`*|${e}|${n}|*`,`*|${e}|*|${o}`,`*|${e}|*|*`,`*|*|${n}|${o}`,`*|*|${n}|*`,`*|*|*|${o}`,"*|*|*|*"];for(const e of a)if(void 0!==s[e])return s[e]}function s(e){if("string"!=typeof e)return e;let t=e;return t.startsWith("/")||(t="/"+t),t=t.replace(/,([^/]*\/)/,"/"),t}function a(e){var o=t.unitTemplate;if(!e)throw"Configuration is missing.";if(!i(e,"adUnitPath"))throw"AdUnitPath is missing. Check the configuration.";{let t=s(e.adUnitPath);o=o.replace("%AU%",t.toLowerCase())}return i(e,"customDimensions")&&Object.keys(e.customDimensions).length>0&&Object.entries(e.customDimensions).forEach((([e,t],i)=>{t&&(o=o.replace(`%C${e.substring(2)}%`,t.toLowerCase()))})),o}function r(e){var o="od_pf_ab";i(t.conf,"ab_key")&&(o=t.conf.ab_key);var n="1";return i(t.conf,"ab_values")?Array.isArray(t.conf.ab_values)&&0!=t.conf.ab_values.length&&(t.conf.ab_values.length>1?n=e?t.conf.ab_values[1]:t.conf.ab_values[0]:e&&(n=t.conf.ab_values[0])):n=e?"1":"0",{abKey:o,abValue:n}}function l(e,i,o){return i===t.oy_mode_enum.LASTLOOK?o?`${e}_2`:`${e}_1`:t.oy_mode_enum.YIELD===i||t.oy_mode_enum.HYBRID===i?o?`${e}_5`:`${e}_4`:`${e}_${i}`}function c(e){var o=!1;return(e.isEmpty||i(t.conf,"hcid")&&null!==e.advertiserId&&t.conf.hcid.includes(e.advertiserId))&&(o=!0),o}function u(){window.googletag.cmd.push((function(){window.googletag.pubads().addEventListener("slotRenderEnded",(function(e){(function(e,o){let n=function(e,o){let n=p(e),d=!1,s="";try{s=a(n)}catch(e){return d}s=window.odT.cyrb53(s,t.seed);let r=t.pfUnits[s];if(void 0===r||!t.config[s])return d;if(c(o)){0==r.firstUnfilled&&(r.firstUnfilled=r.imps+1);var l=.5;i(t.conf,"rd")&&(l=t.conf.rd),r.pf.cr=r.pf.cr*l,d=!0,r.unfilled++}else{var u=1.15;i(t.conf,"ru")&&(u=t.conf.ru);var w=r.pf.cr*u;w<1&&(r.pf.cr=w,d=!0),r.imps++}if(d){var f=g(t.config[s]),h=(t.config[s]?.pf||0)*t.config.cur.ratio.gam*r.pf.cr*f;r.pf.gam=window.odT.getCpmStringValue(h,t.config.pbd),r.pf.prebid=(r.pf.gam*t.config.cur.ratio.prebid).toFixed(2),r.pf.amazon=(r.pf.gam*t.config.cur.ratio.amazon).toFixed(2),r.oy_mode==t.oy_mode_enum.LASTLOOK&&(r.pf.gam=r.pf.defgam,r.pf.prebid=r.pf.defprebid,r.pf.amazon=r.pf.defamazon),"0.00"==r.pf.amazon&&(r.pf.amazon="0.01"),"0.00"==r.pf.prebid&&(r.pf.prebid="0.01"),t.debug&&console.log(t.logP+"REFRESH pfUnit "+s+" pf_bucket:"+r.pf.gam+" pf_calculated: "+h+" pf_orig: "+t.config[s]?.pf+" ratio_gam: "+t.config.cur.ratio.gam+" tbr: "+f+" ratio_refresh:"+r.pf.cr,t.logS,t.logC)}return d}(e,o);if(n){if(window.odT.loadCoreFinished){let e=window.odT.getPbjs(t);void 0!==e&&e.que.push((function(){window.optiyield.setPrebidFloors(e.adUnits,window.odT.setP)}))}w(e)}})(e.slot,e),function(e){if(e.slot.getOutOfPage()){if(t.randInterstitial>t.samplingInterstitial)return;let i=window.odT.cyrb53(a(p(e.slot)),t.seed);if(void 0===t.config[i])return;let o=e.slot.getTargeting("od_pf_group")[0];void 0===o&&(o="0");let n=e.slot.getTargeting("od_pf_ta")[0];void 0===n&&(n="oop_0_0");let d=0;c(e)&&(d=1);try{fetch(`https://optiyield-analytics.opti-digital.com/pfc/interstitial?pfunit=${i}&pubid=${t.pubId}&unfilled=${d}&od_pf_group=${o}&s=${t.samplingInterstitial}&od_pf_ta=${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})}catch(e){}}}(e)}))}))}function p(e){let o={adUnitPath:s(e.getAdUnitPath()),customDimensions:{}};return i(t.initConfig,"gtpCustomDimensionKey")?Object.entries(t.initConfig.gtpCustomDimensionKey).forEach((([t,i],n)=>{o.customDimensions[t]=e.getTargeting(i)[0]})):i(t.initConfig,"gptCustomDimensionKey")?Object.entries(t.initConfig.gptCustomDimensionKey).forEach((([t,i],n)=>{o.customDimensions[t]=e.getTargeting(i)[0]})):i(t.conf,"gcdk")&&Object.entries(t.conf.gcdk).forEach((([t,i],n)=>{o.customDimensions[t]=e.getTargeting(i)[0]})),o.interstitial=!1,e.getOutOfPage()&&(o.interstitial=!0),o}function w(e,o=!1){let n=window.optiyield.getFloors(p(e),"GPT",o);1==n.pfStatus?(e.setTargeting("od_pf_pb",n.pf.gam),e.setTargeting("od_pf_group",n.group),i(n,"tf")&&(e.setTargeting("od_pf_ta",n.kv_ta),e.setTargeting("od_pf_mta",n.kv_mta),e.setTargeting("od_pfg","1")),n?.kv_pff&&1==n?.group&&e.setTargeting("od_pf_filter",n.kv_pff)):(e.setTargeting("od_pf_group","0"),i(n,"tf")&&(e.setTargeting("od_pf_ta",n.kv_ta),e.setTargeting("od_pf_mta",n.kv_mta),e.setTargeting("od_pfg","1"))),t.sourceID&&e.setTargeting("od_pf_sbr",t.sourceID),t.debug&&console.log(t.logP+` GPT ${1==n.pfStatus?`configure a price floor (${n.pf.gam})`:"doesn't find a price floor"} ADSlot ID: ${e.getSlotElementId()}`,t.logS,t.logC)}function g(e){return function(e,t,o){if(void 0===t)return 1;let n;if(i(t,o))n=t[o];else{if(!i(t,"0"))return 1;n=t[0]}let d=n.find((function(t){if(e<=t.h&&e>=t.l)return t}));return d&&i(d,"r")?d.r:1}((new Date).getHours(),t.conf.tbc,e.tbc)}function f(e){return t.oy_mode_enum.YIELD===e?.oy_mode||t.oy_mode_enum.HYBRID===e?.oy_mode}return class{constructor(){}_d1spl4yS9ts(){try{console.log(t.pfUnits)}catch(e){console.error(e)}}_0i4n3i2t(o,n,d,s){try{if(window.optiyield._ready)return;if(window.optiyield._ready=!0,t.pubId=o,s&&"object"==typeof s&&(t.i4n3i2tConfig={...s}),"boolean"==typeof window?.top?.op5tiRyi1eld_dTeb9ugP&&window?.top?.op5tiRyi1eld_dTeb9ugP&&(t.debug=!0),(t.params&&"true"===t.params.optiyield_debug||"true"===sessionStorage.getItem("optiyield_debug"))&&(t.forceDebugPf=!0,t.clientDebug=!0),(t.params&&"false"===t.params.optiyield_debug||"false"===sessionStorage.getItem("optiyield_debug"))&&(t.forceDebugPf=!1,t.clientDebug=!0),t.params&&void 0!==t.params.optiyield_pf&&(t.pfDebug=t.params.optiyield_pf),t.debug&&console.log(t.logP+" version 4.0.29",t.logS,t.logC),n&&"object"==typeof n){if(n.ut){var a,r=(0,e.base64DecToArr)(n.ut),l=(0,e.UTF8ArrToStr)(r);a="number"==typeof o?o.toString():o,t.unitTemplate=(0,e.xorDecrypt)(l,a)}i(n,"conf")&&(t.conf=n.conf,i(t.conf,"si")&&(t.samplingInterstitial=t.conf.si))}var c=navigator.userAgent.toLowerCase();-1!=c.indexOf("safari")?-1==c.indexOf("chrome")&&(t.dNR=0):-1!=c.indexOf("firefox")&&(t.dNR=0),t.config={...n},t.unitTemplate=t.unitTemplate.replace("%NR%",t.dNR),t.rand=Math.floor(Math.random()*Math.floor(100)),t.randInterstitial=Math.floor(Math.random()*Math.floor(100)),t.randAB=Math.floor(Math.random()*Math.floor(100)),i(t.conf,"ab_r")&&i(t.conf,"ab_enable")&&t.conf.ab_enable&&(t.randAB<t.conf.ab_r&&(i(t.conf,"ab_m")&&"split"==t.conf.ab_m&&(t.ABModeSplit=!0),t.ABgroupB=!0),t.debug&&console.log(t.logP+" AB TEST enabled - mode %s - ratio %s% - group %s ",t.logS,t.logC,t.conf.ab_m,t.conf.ab_r,t.ABgroupB?"B":"A")),function(){if(1===t.dNR){let e=t.dNR.toString();window.googletag.cmd.push((function(){window.googletag.pubads().setTargeting("od_pf_nr",e)}))}}();try{!function(e){if(!e)throw"Country is missing.";t.unitTemplate=t.unitTemplate.replace("%C%",e)}(d)}catch(e){}(t.debug||t.clientDebug)&&console.log(t.logP+" is ready",t.logS,t.logC),i(t.conf,"sbr")&&function(o){if(void 0!==t.sourceID)return;if(!o)return;let n,d=(0,e.base64DecToArr)(o),s=(0,e.UTF8ArrToStr)(d),a="";a="number"==typeof t.pubId?t.pubId.toString():t.pubId;try{n=JSON.parse((0,e.xorDecrypt)(s,a))}catch(e){return void console.error(e)}if(void 0!==n){if(window.location&&window.location.href){let e=new URL(window.location.href).searchParams.toString();if(i(n,"sourceCampaignTrackers")){let o=n.sourceCampaignTrackers.find((t=>i(t,"s")&&e.includes(t.s)));if(o)return t.sourceID=window.odT.cyrb53(o.s,100),void(t.sourceRatio=o.r)}}if(document.referrer&&i(n,"sourceDomains")){let e=new URL(document.referrer).hostname,o=n.sourceDomains.find((t=>i(t,"s")&&e.includes(t.s)));if(o)return t.sourceID=window.odT.cyrb53(o.s,100),void(t.sourceRatio=o.r);let d=n.sourceDomains.find((e=>i(e,"s")&&"default".includes(e.s)));d&&(t.sourceID=window.odT.cyrb53(d.s,100),t.sourceRatio=d.r)}}}(t.conf.sbr),function(){if("object"==typeof window.optiyield&&"object"==typeof window.optiyield.cmd)for(window.optiyield.cmd.push=function(e){if("function"==typeof e)try{e.call()}catch(e){console.error(e)}};window.optiyield.cmd.length>0;)try{window.optiyield.cmd.shift().call()}catch(e){console.error(e)}}(),t.ABModeSplit||u(),window.googletag.cmd.push((function(){window.googletag.pubads().setTargeting("od_pfs","1")}))}catch(e){}}init(e,o){try{if(window.optiyield._init_ready)return;if(window.optiyield._init_ready=!0,function(){try{t.dDevice=window.odT.dDevice,t.unitTemplate=t.unitTemplate.replace("%D%",t.dDevice);var e="1";i(t.i4n3i2tConfig,"deviceDetection")&&1==t.i4n3i2tConfig.deviceDetection&&("30000"==t.dDevice?e="0":"30001"==t.dDevice?e="1":"30002"==t.dDevice&&(e="2"),window.googletag.cmd.push((function(){window.googletag.pubads().setTargeting("od_pf_dd",e)})))}catch(e){}}(),"object"==typeof e&&(t.initConfig={...e},t.ABModeSplit))return;"function"==typeof o&&(t.callback=o,t.callback())}catch(e){console.error(e)}}getFloors(e,d="RAW",s=!1){try{var a={};if(t.ABModeSplit)return a.pfStatus=0,a;let c=n(e,d);if(void 0===c.pfUnitObj&&i(t.conf,"faup")&&t.conf.faup){let t={haveParent:!1,floorConfig:e},i=5,s=0;do{if(t=o(t.floorConfig),c=n(t.floorConfig,d),void 0!==c.pfUnitObj)break;s+=1}while(t.haveParent&&s<i)}let u="";i(e,"interstitial")&&e.interstitial&&(u="oop_");let p=c.pfUnitObj,w=c.pfUnit;if(t.acceptedConsents.includes(window.odT.consentStatus))if(void 0!==p){let i=function(e,t){return t.find((function(t){if((void 0===t.max||e<=t.max)&&e>t.min)return t}))}(p.ae,t.aed),o="";e.interstitial||(void 0!==i?o=i.hasOwnProperty("max")?`_${i.max.toFixed(2)}`:"_max":p?.is_small&&(o="_spf"));let n="0";if(s&&(p.oy_mode==t.oy_mode_enum.HYBRID&&(n=s.cpm>parseFloat(p.pf.gam)?window.odT.getCpmStringValue(s.cpm,t.config.pbd):p.pf.gam,t.debug&&console.log("%cOYSDK:%c HYBRID cpm = "+n+" for "+w,"background: #286090;border-radius:5px;color:#79ba23;font-weight:700;padding:2px 5px;","color:#1E90FF")),p.oy_mode==t.oy_mode_enum.LASTLOOK&&(n=window.odT.getCpmStringValue(s.cpm,t.config.pbd),t.debug&&console.log("%cOYSDK:%c LASTLOOK cpm = "+n+" for "+w,"background: #286090;border-radius:5px;color:#79ba23;font-weight:700;padding:2px 5px;","color:#1E90FF"))),!Object.values(p.pf).some((e=>null===e||""===e))&&t.rand<p.tf){a.pfStatus=1,a.group=1,a.tf=p.tf,s||p.oy_mode!=t.oy_mode_enum.LASTLOOK?a.pf={gam:s?n:p.pf.gam,amazon:p.pf.amazon,prebid:p.pf.prebid}:p.pf.def?a.pf={gam:p.pf.defgam,amazon:"0.00"!==p.pf.defamazon?p.pf.defamazon:"0.01",prebid:"0.00"!==p.pf.defprebid?p.pf.defprebid:"0.01"}:a.pf={},a.kv_ta=`${u}1_${a.tf}${o}`,f(p)&&(a.kv_pff="1");const e=f(p)?"&od_pf_filter=1":"";a.kv_mta=l(a.kv_ta,p.oy_mode,s),a.gamSlotTargeting=`od_pf_group=1&od_pfg=1&od_pf_ta=${a.kv_ta}&od_pf_mta=${a.kv_mta}${e}`,a.pf.gam&&(a.gamSlotTargeting+=`&od_pf_pb=${a.pf.gam}`),t.sourceID&&(a.gamSlotTargeting+=`&od_pf_sbr=${t.sourceID}`)}else a.pfStatus=0,a.group=0,a.tf=p.tf,a.kv_ta=`${u}0_${a.tf}${o}`,a.kv_mta=l(a.kv_ta,p.oy_mode,s),a.gamSlotTargeting=`od_pf_group=0&od_pfg=1&od_pf_ta=${a.kv_ta}&od_pf_mta=${a.kv_mta}`,p.pf.def&&(a.pf={gam:p.pf.defgam,amazon:"0.00"!==p.pf.defamazon?p.pf.defamazon:"0.01",prebid:"0.00"!==p.pf.defprebid?p.pf.defprebid:"0.01"},a.gamSlotTargeting+=`&od_pf_pb=${a.pf.gam}`,a.pfStatus=1),t.sourceID&&(a.gamSlotTargeting+=`&od_pf_sbr=${t.sourceID}`)}else a.pfStatus=0,a.group=0,a.tf=0,a.kv_ta=`${u}0_0`,a.kv_mta=`${a.kv_ta}_0`,a.gamSlotTargeting=`od_pf_group=0&od_pfg=1&od_pf_ta=${a.kv_ta}&od_pf_mta=${a.kv_mta}`,t.sourceID&&(a.gamSlotTargeting+=`&od_pf_sbr=${t.sourceID}`),p.pf.def&&(a.pf={gam:p.pf.defgam,amazon:"0.00"!==p.pf.defamazon?p.pf.defamazon:"0.01",prebid:"0.00"!==p.pf.defprebid?p.pf.defprebid:"0.01"},a.gamSlotTargeting+=`&od_pf_pb=${a.pf.gam}`,a.pfStatus=1);if(0===Object.keys(a).length&&(a.pfStatus=0,a.group=0,a.gamSlotTargeting="od_pf_group=0"),t.clientDebug&&(t.forceDebugPf?(a.pfStatus=1,a.pf={gam:"1.00",prebid:"1.01",amazon:"1.02"},void 0!==t.pfDebug&&(a.pf.gam=t.pfDebug,a.pf.prebid=t.pfDebug,a.pf.amazon=t.pfDebug),a.gamSlotTargeting=`od_pf_group=1&od_pf_pb=${a.pf.gam}`):(a.gamSlotTargeting="od_pf_group=0",a.pfStatus=0)),t.debug)if(void 0===p)console.log(t.logP+d+" PfUnit "+w+" doesn't exist. Returned price floor object ",t.logS,t.logC,a);else{var r="ctrl";1==a.group&&(r="test"),console.log(t.logP+d+" PfUnit "+w+" is in "+r+" group . Returned price floor object ",t.logS,t.logC,a)}return a}catch(e){}return{pfStatus:0,gamSlotTargeting:"od_pf_group=0"}}setGptFloors(e){try{window.googletag.cmd.push((function(){if(i(t.conf,"ab_enable")&&t.conf.ab_enable){let e=r(t.ABgroupB);void 0!==typeof e.abValue&&window.googletag.pubads().setTargeting(e.abKey,e.abValue)}t.ABModeSplit||window.googletag.pubads().getSlots().forEach((i=>{let o=!1;e&&e.find((e=>e.adUnitCode===i.getSlotElementId()))?o=e.find((e=>e.adUnitCode===i.getSlotElementId())):e&&t.conf&&t.conf.gmapkey&&t.conf.pmapkey&&e.find((e=>e.adUnitCode===`${t.conf.pmapkey}${i.getTargeting(t.conf.gmapkey)[0]}`))&&(o=e.find((e=>e.adUnitCode===`${t.conf.pmapkey}${i.getTargeting(t.conf.gmapkey)[0]}`))),w(i,o)}))}))}catch(e){}}setAmazonCbk(e,i){if("function"==typeof i)return i(e,t)}setPrebidCbk(e,i){if("function"==typeof i)return i(e,t,s)}getVideoInStreamFloor(e,o={}){try{var n="";if(1===t.dNR&&(n+="od_pf_nr=1"),i(t.conf,"ab_enable")&&t.conf.ab_enable){let e=r(t.ABgroupB);if(""!==n&&(n+="&"),n+=e.abKey+"="+e.abValue,t.ABModeSplit)return encodeURIComponent(n)}var d=window.optiyield.getFloors({adUnitPath:e,customDimensions:o},"Video-instream");return"object"==typeof d&&(""!==n&&(n+="&"),n+=d.gamSlotTargeting),n.includes("od_pfg")||t.acceptedConsents.includes(t.consentStatus)&&(""!==n&&(n+="&"),n+="od_pfg=1"),encodeURIComponent(n)}catch(e){console.error(e)}return""}}}();if(window.optiyield=window.optiyield||{},window.optiyield.cmd=window.optiyield.cmd||[],window.optiyield.initOptiYieldSdk=window.optiyield.initOptiYieldSdk||!1,window.optiyield._ready=window.optiyield._ready||!1,0==window.optiyield._ready)var o=new t;window.optiyield.getFloors=o.getFloors,window.optiyield.setGptFloors=o.setGptFloors,window.optiyield.init=o.init,window.optiyield._0i4n3i2t=o._0i4n3i2t,window.optiyield._d1spl4yS9ts=o._d1spl4yS9ts,window.optiyield.setAmazonFloors=o.setAmazonCbk,window.optiyield.setPrebidFloors=o.setPrebidCbk,window.optiyield.getVideoInStreamFloor=o.getVideoInStreamFloor})()})(),e=new(function(){function e(e,t){return e.hasOwnProperty(t)}return class{constructor(){}getPbjs(t){return e(t.initConfig,"pbjs")?t.initConfig.pbjs:e(t.conf,"pbjs")?(window[t.conf.pbjs]=window[t.conf.pbjs]||{},window[t.conf.pbjs].que=window[t.conf.pbjs].que||[],window[t.conf.pbjs]):void 0!==t.pbjs?t.pbjs:window._pbjsGlobals?window._pbjsGlobals&&1==window._pbjsGlobals.length?(t.pbjs=window[_pbjsGlobals[0]],window[_pbjsGlobals[0]]):void 0:(t.debug&&console.warn(t.logP+" prebid.js isn't loaded yet, assume it will be pbjs",t.logS,t.logC),window.pbjs=window.pbjs||{},window.pbjs.que=window.pbjs.que||[],t.pbjs=window.pbjs,t.pbjs)}setA(t,i){try{return i.ABModeSplit||t.forEach((t=>{if(!e(t,"optiYield"))return;let o={adUnitPath:t.optiYield.adUnitPath,customDimensions:{}};e(t.optiYield,"cd")&&(o.customDimensions=t.optiYield.cd);let n=window.optiyield.getFloors(o,"AMAZON");i.clientDebug&&(1==n.pfStatus&&n.pf?.amazon?console.log(i.logP+" AMAZON configure a price floor ("+n.pf.amazon+") slot slotID: "+t.slotID,i.logS,i.logC):console.log(i.logP+" AMAZON doesn't find a price floor slotID: "+t.slotID,i.logS,i.logC)),0!==n.pfStatus&&void 0!==n.pf.amazon&&(e(t,"floor")?t.floor.value=Math.round(100*parseFloat(n.pf.amazon)):t.floor={currency:e(i.config,"cur")&&e(i.config.cur,"code")&&e(i.config.cur.code,"amazon")?i.config.cur.code.amazon:"USD",value:Math.round(100*parseFloat(n.pf.amazon))})})),t}catch(e){console.error(e)}return t}setP(t,i,o){try{if(i.ABModeSplit)return t;let n;n=e(i.conf,"pwmap")&&(void 0===t||Array.isArray(t)&&0==t.length)?function(t,i){let o=[];return window.googletag.cmd.push((function(){window.googletag.pubads().getSlots().forEach((n=>{let d="",s=t(n.getAdUnitPath());if(e(i.conf,"pwmap")&&"sei"===i.conf.pwmap?d=n.getSlotElementId():e(i.conf,"pwmap")&&"aup"===i.conf.pwmap?d=s:e(i.conf,"gmapkey")&&(e(i.conf,"pmapkey")&&""!==i.conf.pmapkey&&(d=i.conf.pmapkey),d+=n.getTargeting(i.conf.gmapkey)[0]),void 0!==d&&""!==d){let t={};t.code=d,t.optiYield={adUnitPath:s},function(t,i,o){e(o.conf,"gcdk")&&(t.optiYield.cd={},Object.entries(o.conf.gcdk).forEach((([e,o],n)=>{t.optiYield.cd[e]=i.getTargeting(o)[0]})))}(t,n,i),o.push(t)}}))})),o}(o):t;let d=window.odT.getPbjs(i),s={floors:{data:{currency:e(i.config,"cur")&&e(i.config.cur,"code")&&e(i.config.cur.code,"prebid")?i.config.cur.code.prebid:"EUR",schema:{fields:["adUnitCode","mediaType"],delimiter:"|"},values:{}}}};return n.forEach((t=>{if(!e(t,"optiYield"))return;let o={adUnitPath:t.optiYield.adUnitPath,customDimensions:{}};e(t.optiYield,"cd")&&(o.customDimensions=t.optiYield.cd);let n=window.optiyield.getFloors(o,"PREBID");i.clientDebug&&(1==n.pfStatus&&n.pf?.prebid?console.log(i.logP+" PREBID configure a price floor ("+n.pf.prebid+") AdUnit code: "+t.code,i.logS,i.logC):console.log(i.logP+" PREBID doesn't find a price floor AdUnit code: "+t.code,i.logS,i.logC)),0!==n.pfStatus&&void 0!==n.pf.prebid&&(e(t,"code")&&(s.floors.data.values[t.code+"|*"]=parseFloat(n.pf.prebid)),e(t,"floors")?t.floors.values={"*":parseFloat(n.pf.prebid)}:t.floors={currency:e(i.config,"cur")&&e(i.config.cur,"code")&&e(i.config.cur.code,"prebid")?i.config.cur.code.prebid:"EUR",schema:{fields:["mediaType"]},values:{"*":parseFloat(n.pf.prebid)}})})),void 0===d||!i.conf||i.conf.ma||!i.conf.use_pb_cpm&&!i.conf.force_pb_cpm||i.auctionEndDone||(i.auctionEndDone=!0,d.que.push((function(){d.onEvent("auctionEnd",(function(){const e=function(e){if(!e.conf.use_pb_cpm&&!e.conf.force_pb_cpm)return!1;const t=[];try{let i=1,o=!1;const n=odT.getPbjs(e)?.getConfig()?.currency?.adServerCurrency;n!==e?.config?.cur?.code?.gam&&(o=!0,i=.95);let d=odT.getPbjs(e).getHighestCpmBids();if(d.length)return d.map((d=>{const s=function(e,t){if(!t||!t.cpm)return 0;const i={low:"pbLg",medium:"pbMg",high:"pbHg",auto:"pbAg",dense:"pbDg",custom:"pbCg"}["function"==typeof odT.getPbjs(e)?.getConfig&&odT.getPbjs(e)?.getConfig("priceGranularity")]||"pbAg";return t[i]?parseFloat(t[i]):t.cpm}(e,d);t.push({adUnitCode:d.adUnitCode,cpm:parseFloat(o?odT.getPbjs(e).convertCurrency(s,n,e?.config?.cur?.code?.gam):s)*i})})),t}catch(e){}return!1}(i);window.optiyield.setGptFloors(e)}))}))),t}catch(e){console.error(e)}return t}}}()),window.odT.setA=e.setA,window.odT.setP=e.setP,window.odT.getPbjs=e.getPbjs,function(e){for(var i=t,o=e();;)try{if(351602===parseInt(i(530))/1+-parseInt(i(546))/2*(-parseInt(i(566))/3)+-parseInt(i(571))/4+-parseInt(i(507))/5*(parseInt(i(585))/6)+parseInt(i(460))/7*(parseInt(i(570))/8)+parseInt(i(488))/9*(parseInt(i(558))/10)+parseInt(i(589))/11)break;o.push(o.shift())}catch(e){o.push(o.shift())}}(i),(()=>{var e={147:e=>{var i=t;e[i(557)]={i8:i(534)}}},i={};function o(n){var d=t,s=i[n];if(void 0!==s)return s[d(557)];var a=i[n]={exports:{}};return e[n](a,a[d(557)],o),a[d(557)]}(()=>{var e=t;class i{constructor(e,i){var o=t;this[o(522)]=e,this[o(528)]=i}[e(478)](t){var i=e;this[i(522)]&&"verbose"===this[i(528)]&&console[i(478)](t)}[e(582)](t){var i=e;this[i(522)]&&[i(527),i(582)][i(567)](this[i(528)])&&console[i(582)](t)}[e(551)](t){var i=e;this.debug&&console[i(551)](t)}}class n{constructor({previousType:t,adsTag:o,insertAdslotBeforeTarget:n,insertAdslotIntoTarget:d,dontBreakWithPreviousType:s,recurrenceLevel:a,divIdPrefix:r,previousTypeExtra:l,previousTypeClass:c,parentContainer:u,debug:p,debugLevel:w,omitInvisible:g,infiniteScroll:f}){var h=e;this[h(586)]=n,this[h(559)]=d,this.previousType=t,this[h(476)]=r,this[h(493)]=l,this.previousTypeClass=c,this[h(504)]=s,this[h(561)]=o,this[h(522)]=p,this[h(522)]=w,this[h(484)]=new i(p,w),this[h(574)]=0,this[h(470)]=0,this[h(569)]=a,this[h(459)]=u,this[h(544)]=g,this[h(553)]=[],this[h(487)]=[],this.infiniteScroll=f}static[e(564)](t,i=!1){var o=e;if(i)return document[o(481)](t,document,null,XPathResult[o(547)],null)[o(486)];let n=t[o(565)]("#","")[o(565)](".","");if(t[o(567)]("#"))return document[o(519)](n);let d=document[o(513)](n);return d?d[0]:null}stepIn(){this[e(574)]++}stepOut(){this[e(574)]--}isVisible(t){var i=e,o=window[i(536)](t),n=t.getBoundingClientRect()[i(542)];return i(518)!==o[i(581)]&&"hidden"!==o.visibility&&n>0}[e(466)](t){var i=e;return!!t.classList&&t[i(578)].contains(this.previousTypeClass)}[e(491)](t,i,o){var n=e;if(!this.insertAdslotIntoTarget){if(!this[n(474)](o))return;if(!this[n(493)][n(567)](t))return}if(this[n(477)]&&!this.isOptiClass(o))return;if(this[n(559)]||this[n(586)])return this[n(522)]&&(this[n(487)][n(462)]({element:o,rect:o[n(512)]()}),o[n(577)]("data-adslot-top",o[n(512)]().top)),i[n(462)](o);let d=this[n(587)](o);if(this.logger[n(478)]({msg:"next sibling",nextSibling:d,htmlElement:o}),d)return this.candidatesData.push({element:d,rect:d.getBoundingClientRect()}),i.push(d);this.logger[n(582)]({htmlElement:o,nextSibling:d})}[e(537)](t,i=[]){var o=e;let n=t[o(533)][o(483)](),d=Array.from(t[o(575)]);var s,a=0;return this.presentLevel<this[o(569)]&&!this[o(504)][o(567)](n)?(this[o(484)][o(478)]({msg:"Step in "+this[o(574)]+" / "+this[o(569)],htmlElement:t}),this[o(538)](),a=i[o(525)],d[o(480)]((e=>{this[o(537)](e,i)})),s=i.length,this[o(484)][o(478)]({msg:o(508)+this[o(574)]+" / "+this[o(569)],htmlElement:t,found:i[o(525)]}),this[o(535)](),a===s&&this[o(491)](n,i,t)):this.secureCandidateAdder(n,i,t),i}[e(554)](t){var i=e;return!!t.id&&t.id[i(567)](i(492))}nextSibling(t){var i=e;if(t===this.parentContainer)return null;let o=t[i(496)];if(this.logger[i(582)]({msg:i(469),candidate:t,next:o}),o){if(this.omitInvisible||this[i(474)](o))return this[i(554)](o)?this.nextSibling(o):o;this[i(484)][i(582)]({msg:i(531),candidate:t,next:o})}return this[i(587)](t[i(495)])}[e(467)](t){var i=e;return t[i(496)]||this[i(587)](t.parentNode)}[e(501)](t,i,o=null,n=""){var d=e;if(o){var s=document[d(516)](o);s.id="optidigital-ad-wrapper-"+(this[d(553)][d(525)]+1),s.className=n,s[d(539)](i),this[d(559)]?t[d(539)](s):t[d(495)][d(548)](s,t)}else this[d(559)]?t[d(539)](i):t[d(495)][d(548)](i,t);return this[d(553)].push(i),i}[e(515)](t,i){var o=e;return t.appendChild(i),this[o(553)][o(462)](i),i}[e(543)](){return this[e(553)]}[e(552)](t,i=!1){var o=e;let n=document[o(516)](this[o(561)]);return this[o(520)]||i||(n.id=this[o(476)]+t),n[o(577)](o(583),this.divIdPrefix+t),n[o(591)]=t,n[o(556)][o(581)]=o(518),n}}const d={parentDiv:null,divIdPrefix:e(465),omitInvisible:!0,wrapperTag:null,wrapperClass:"",adSlots:[],previousType:"div",previousTypeExtra:[],previousTypeClass:null,positionFirst:1,dontBreakWithPreviousType:["ul","ol"],keepTheDistanceFrom:[],keepDistanceFrom:[],keepTheDistancePx:100,keepDistancePx:null,keepDistanceFromTheTop:0,keepDistanceFromTop:null,keepDistanceFromTheBottom:0,keepDistanceFromBottom:null,interval:1200,intervalIncrement:0,recurrenceLevel:1,insertAdslotBeforeTarget:!1,insertAdslotIntoTarget:!1,infiniteAdslot:!1,infiniteScroll:!1,useXPath:!1,debugLevel:e(527),debug:!1};var s=o(147).i8;function a(t,i,o){var n=e;if(0===t)return!0;if(o){var d=o.getBoundingClientRect()[n(562)];return i.getBoundingClientRect()[n(573)]-t>=d}return!1}function r(t,i,o,n,d,s,a){var r=e;if(0===o)return!0;var l=t+i*(o-1);let c=d[r(512)]()[r(562)];function u(e){var t=r;return t(518)!==window[t(536)](e)[t(581)]}if(!u(d)){let e=null!==d[r(496)]?d[r(496)]:d[r(490)];for(;e;){if(!0===u(e)){c=e[r(512)]()[r(562)];break}e=null!==e[r(496)]?e[r(496)]:e[r(490)]}}let p=c+l;var w=p<=s;return w?a[r(582)]({msg:"verifyInterval ok",interval:t,intervalIncrement:i,adsInserted:o,test:w,candidate:n,lastPickedCandidate:d,lastPickedCandidateTop:d[r(512)]()[r(562)],testLogic:" "+p+r(590)+s+" ?",posY:p,candidateTop:s}):a.info({msg:r(555),interval:t,intervalIncrement:i,adsInserted:o,test:w,candidate:n,lastPickedCandidate:d,lastPickedCandidateTop:d[r(512)]().top,testLogic:" "+p+r(590)+s+" ?",posY:p,candidateTop:s}),w}window.optidigitaltagsinserter=new class{constructor(){this[e(494)]=s}[e(498)](e){var t={};for(var i in d)t[i]=e[i]?e[i]:d[i];return t}[e(457)](t){var i=e;t[i(461)].length>0&&0===t[i(475)][i(525)]&&(t[i(475)]=t[i(461)]),t.keepDistancePx&&(t[i(506)]=t[i(579)]),t[i(485)]&&(t.keepDistanceFromTheTop=t.keepDistanceFromTop),t[i(529)]&&(t[i(572)]=t.keepDistanceFromBottom),t[i(493)]=[...new Set([t[i(563)],...t[i(493)]])],this.adsTag="div",this.parentDiv=t[i(502)],this[i(563)]=t[i(563)],this[i(493)]=t[i(493)],this[i(477)]=t[i(477)],this[i(532)]=t.useXPath,this.debug=t[i(522)],this.debugLevel=t[i(528)],this.keepDistanceFromTheTop=t[i(580)],this.keepDistanceFromTheBottom=t[i(572)],this[i(472)]=t[i(472)],this[i(471)]=[...t[i(471)]][i(473)](),this[i(569)]=t[i(569)],this.interval=t.interval,this[i(503)]=t[i(503)],this.insertAdslotBeforeTarget=t[i(586)],this[i(559)]=t[i(559)],this[i(468)]=t[i(468)],this[i(475)]=t[i(475)],this[i(506)]=t.keepTheDistancePx,this.wrapperTag=t[i(524)],this[i(489)]=t[i(489)],this[i(520)]=t[i(520)]}[e(482)](i){var o=e;function n(e){var i=t,o=window[i(536)](e);return!(!o||!o[i(581)]||i(518)===o[i(581)])}var d=this[o(463)][o(467)](i);if(d){let e=i[o(512)]()[o(562)]-this[o(506)],t=d.getBoundingClientRect()[o(562)]+this[o(506)];t<e&&(t=e+this[o(506)]),n(i)&&(this.forbidden[o(462)]({topWithDistance:i[o(512)]().top-this[o(506)],botWithDistance:t}),this[o(500)][o(462)](i))}else this[o(484)][o(478)]({msg:"Missed next for forbidden element",forbiddenElement:i}),n(i)&&(this.forbiddenElements.push(i),this[o(584)][o(462)]({topWithDistance:i[o(512)]()[o(562)]-this.keepTheDistancePx,botWithDistance:this[o(459)][o(512)]().bottom+this[o(506)]}))}[e(510)](){var t=e;this[t(584)]=[],this[t(500)]=[],this[t(475)][t(480)]((e=>{var i=t;if(e[i(567)]("#")){var o=document[i(519)](e[i(565)]("#",""));o&&this[i(482)](o)}else Array[i(517)](document.getElementsByClassName(e.replace(".","")))[i(480)]((e=>{this.__setupSingleForbidden(e)}))}))}[e(505)](t={}){var o=e,d=this._extendDefaults(t);if(this[o(457)](d),this[o(484)]=new i(this.debug,this[o(528)]),this[o(484)][o(582)]({msg:o(479),version:this[o(494)],config:d}),this[o(502)]){if(this[o(459)]=n[o(564)](this[o(502)],this[o(532)]),this[o(459)])return this[o(463)]=new n({previousType:this[o(563)],adsTag:this[o(561)],insertAdslotBeforeTarget:d[o(586)],insertAdslotIntoTarget:d[o(559)],dontBreakWithPreviousType:d[o(504)],recurrenceLevel:d[o(569)],divIdPrefix:d.divIdPrefix,previousTypeExtra:d.previousTypeExtra,previousTypeClass:d.previousTypeClass,parentContainer:this[o(459)],debug:d[o(522)],debugLevel:d[o(528)],omitInvisible:d[o(544)],infiniteScroll:d[o(520)]}),this[o(484)].info({msg:o(499)}),this[o(464)]=this[o(463)].readDOM(this[o(459)]),this[o(484)][o(582)]({msg:o(509)}),this[o(510)](),this[o(484)].info({forbiddenDimensions:this.forbidden,forbiddenElements:this.forbiddenElements,candidates:this.candidateElements,candidatesData:this[o(463)].candidatesData}),this[o(592)](),this[o(522)]&&this[o(463)].getInsertedAds().forEach((e=>{var t=o;e[t(556)][t(581)]=t(526),e[t(556)][t(545)]="#FFFFF0",e[t(556)][t(560)]="#AA0000";var i=100+Math[t(540)](200*Math[t(523)]());e[t(556)][t(550)]=i+"px",e[t(549)]=e[t(458)](t(583))})),!0;this.logger[o(551)]({msg:"parentDiv missing!",selector:d[o(502)]})}else this[o(484)].error({msg:o(541),selector:d[o(502)]})}_insertAll(){var t=e;if(this[t(484)][t(582)]({msg:t(456),parent:this.parentContainer}),0===this.adSlots[t(525)])return!1;var i=0,o=null,n=this[t(471)][0];if(this.candidateElements.every((e=>{var d,s,l,c,u,p=t;if(0===this[p(471)][p(525)]&&!this[p(468)])return!1;if(i++,!(this[p(472)]<=i))return this[p(484)][p(582)]({msg:"verifyFirstIndex failed",candidate:e,positionFirst:this[p(472)],counter:i}),!0;if(!function(e,t,i){var o=p;if(0===e)return!0;var n=i[o(512)]()[o(562)];return t[o(512)]().top+e<=n}(this[p(580)],this[p(459)],e))return this[p(484)].info({msg:p(588),candidate:e}),!0;if(!r(this[p(568)],this.intervalIncrement,this[p(463)].getInsertedAds()[p(525)],e,o,e[p(512)]()[p(562)],this[p(484)]))return!0;if(d=this[p(584)],s=e,l=this.logger,u=0,!d[(c=p)(576)]((e=>{var t=c;u++;var i=e[t(514)]>s[t(512)]().top||e.botWithDistance<s[t(512)]()[t(562)];return i||l[t(478)]({index:u,avoidDict:e,candidate:s,rectTop:s[t(512)]().top}),i})))return this[p(484)][p(582)]({msg:p(521),candidate:e}),!0;if(!a(this[p(572)],this[p(459)],e))return this.logger[p(582)]({msg:p(497),candidate:e,keepDistanceFromTheBottom:this[p(572)]}),!0;const w=0===this.adSlots.length,g=w?n:this[p(471)].pop(),f=w?n:this.wrapperClass,h=!!w;var m=this[p(463)][p(552)](g,h);return o=e,this.logger[p(582)]({msg:"INSERTING ABOVE",candidate:e,wrapperTag:this[p(524)],wrapperClass:f}),this.domToolkit.insertOne(e,m,this[p(524)],f),!0})),this[t(471)][t(525)]>0&&a(this[t(572)],this[t(459)])&&r(this[t(568)],this[t(503)],this[t(463)][t(543)]()[t(525)],null,o,this[t(459)][t(512)]()[t(573)],this[t(484)])){this.logger.info({msg:"INSERTING at the end of parent"});var d=this[t(471)][t(511)](),s=this[t(463)].createAdSlotElement(d);this[t(463)][t(515)](this[t(459)],s)}return this[t(484)][t(582)]({msg:"Insertion Finished"}),!0}}})()})()}formatSizeArrayToString(e){return e[0]+"x"+e[1]}setDefaultSizes(){const e={};if(!1===this.insertInreadStartDone&&this.setup?.[`insertInread${this.screen}`])try{optidigitaltagsinserter.insertInRead(this.setup[`insertInread${this.screen}`][0])}catch(e){}this.setup.hasOwnProperty("insertInreadTags")&&0==this.insertInreadStartDone&&this.setup.insertInreadTags(this.initConfig.adUnit);let t=document.querySelectorAll(`[id^="${this.divIdPrefix}"]`);t=Array.from(t);this.stickyAdapter.getStickyAdConfigurations();const i=this.stickyAdapter.getStickyNames(),o=(i[0],this.screen,e=>{e.forEach((e=>{if(!t.includes(e)){const o=e.getAttribute("class"),n=e.getAttribute("id");i.find((e=>o&&o.includes(e)||n&&n.includes(e)))||t.push(e)}}))});if(document.querySelectorAll(`[class^="${this.divIdPrefix}"]`).length){o(document.querySelectorAll(`[class^="${this.divIdPrefix}"]`))}if(this.setup.adSlotsConfig&&this.setup.adSlotsConfig.adSlotsPrefixes&&this.setup.adSlotsConfig.adSlotsPrefixes.length){this.mappedSite=!0;let e=this.setup.adSlotsConfig.adSlotsPrefixes.map((e=>`[id^="${e}"]`)).join(","),t=`${this.setup.adSlotsConfig.adSlotsPrefixes.map((e=>`[class^="${e}"]`)).join(",")},${this.setup.adSlotsConfig.adSlotsPrefixes.map((e=>`[class*="${e}"]`)).join(",")}`;if(document.querySelectorAll(e).length){o(document.querySelectorAll(e))}if(document.querySelectorAll(t).length){o(document.querySelectorAll(t))}}else{if(document.querySelectorAll('[id^="Billboard_"], [id^="Mobile_"], [id^="Content_"], [id^="HalfpageAd_"], [id^="Rectangle_"], [id^="Wallpaper"]').length){o(document.querySelectorAll('[id^="Billboard_"], [id^="Mobile_"], [id^="Content_"], [id^="HalfpageAd_"], [id^="Rectangle_"], [id^="Wallpaper"]'))}if(document.querySelectorAll('[class^="Billboard_"], [class^="Mobile_"], [class^="Content_"], [class^="HalfpageAd_"], [class^="Rectangle_"], [class^="Wallpaper"], [class*=" Billboard_"], [class*=" Mobile_"], [class*=" Content_"], [class*=" HalfpageAd_"], [class*=" Rectangle_"], [class*=" Wallpaper"]').length){o(document.querySelectorAll('[class^="Billboard_"], [class^="Mobile_"], [class^="Content_"], [class^="HalfpageAd_"], [class^="Rectangle_"], [class^="Wallpaper"], [class*=" Billboard_"], [class*=" Mobile_"], [class*=" Content_"], [class*=" HalfpageAd_"], [class*=" Rectangle_"], [class*=" Wallpaper"]'))}}if(i.forEach((e=>{try{this.stickyAdapter.createStickyAd(e,{initConfigAdUnit:this.initConfig.adUnit,log:e=>this.log(e),getCookie:e=>this.getCookie(e),stickyFrequency:this.stickyFrequency,stickyFrequencyImps:this.stickyFrequencyImps,stickyCookie:this.stickyCookie,firstLoadAdSlots:this.firstLoadAdSlots,setAttributes:(e,t)=>this.tools.setAttributes(e,t),stickyAutoCloseScroll:this.stickyAutoCloseScroll,refreshAdSlots:e=>this.refreshAdSlots(e),onLegacyStateUpdate:e=>{void 0===e.stickyAdDivId||this.stickyAdDivId||(this.stickyAdDivId=e.stickyAdDivId),void 0!==e.stickyAdMode&&(this.stickyAdMode=e.stickyAdMode),void 0!==e.stickyAdStatus&&(this.stickyAdStatus=e.stickyAdStatus),void 0!==e.stickyAdTopTrigger&&(this.stickyAdTopTrigger=e.stickyAdTopTrigger),void 0!==e.stickyAdAutoHidePx&&(this.stickyAdAutoHidePx=e.stickyAdAutoHidePx)},adLayoutEnabled:this.setup.adLayoutEnabled})}catch(t){this.log('Error creating sticky ad "'+e+'": '+(t&&t.message?t.message:t))}})),i.forEach((e=>{if(document.getElementById(`${this.divIdPrefix}${e}`)&&""!==this.divIdPrefix){document.querySelectorAll(`[id="${this.divIdPrefix}${e}"]`).forEach((e=>{t.includes(e)||t.push(e)}))}})),t.forEach((t=>{let o="",n="",d=0,s=null,a=null,r=null,{deviceTarget:l,adUnitPathSuffix:c,customKeyValues:u,outOfPage:p,disableGPT:w}=window.odT.setup?.adSlotsConfig?.adSlotsDefinitions?.find((e=>e.name===o))||{};const g=t.getAttribute("id"),f=i.some((e=>g===`${window.odT.divIdPrefix}${e}`));if(f)o=t.getAttribute("id"),o=o.replace(window.odT.divIdPrefix,"");else{if(!t.getAttribute("id")||t.getAttribute("id")&&!t.getAttribute("id").startsWith(window.odT.divIdPrefix)&&""!==window.odT.divIdPrefix){o=t.getAttribute("class");const e="Desktop"===window.odT.screen?/(Billboard_|Content_|HalfpageAd_|Rectangle_|Wallpaper_)\w+/:/(Mobile_)\w+/,i=o.match(e);if(i&&(o=i[0]),o=o.replace(window.odT.divIdPrefix,""),document.getElementById(`${window.odT.divIdPrefix}${o}`)&&document.querySelectorAll(`[id="${window.odT.divIdPrefix}${o}"]`).length<2&&document.querySelectorAll(`.${CSS.escape(o)}`).length>1){let e=document.querySelectorAll(`[id^="${window.odT.divIdPrefix}${o}"]`).length;t.setAttribute("id",`${window.odT.divIdPrefix}${o}_${e}`),d=e}else t.setAttribute("id",`${window.odT.divIdPrefix}${o}`)}else o=t.getAttribute("id").replace(window.odT.divIdPrefix,""),n=t.getAttribute("data-template")?t.getAttribute("data-template"):null,s=t.getAttribute("data-adslotname")?t.getAttribute("data-adslotname"):null,a=t.getAttribute("data-adunitcode")?t.getAttribute("data-adunitcode"):c||null,r=t.getAttribute("data-devicetargeting")?t.getAttribute("data-devicetargeting"):l||null,u=t.getAttribute("data-customkeyvalues")?t.getAttribute("data-customkeyvalues"):u||null;o&&"Wallpaper"!==o&&t.classList.add("optidigital-ad-center-sticky")}if(!window.odT.tagMode&&!f){if("Desktop"===window.odT.screen&&o.toLowerCase().includes("mobile")||"Desktop"===window.odT.screen&&r?.toLowerCase().includes("mobile"))return;if("Mobile"===window.odT.screen&&!o.toLowerCase().includes("mobile")||"Mobile"===window.odT.screen&&r?.toLowerCase().includes("desktop"))return}t.setAttribute("style","");const h=o;let m,y={name:s||(d?`${h}_${d}`:h),adUnit:h,divId:`${window.odT.divIdPrefix}${d?`${h}_${d}`:h}`,loadType:1,lazyLoadPx:600,lazyLoadPxWithCore:900,dfpSizes:{},...n&&{adTemplate:n},...a&&{customAdUnitCode:a},...u&&{customKeyValues:u},...p&&{outOfPage:p},...w&&{disableGPT:w}};m="Mobile"!==window.odT.screen||window.odT.setup?.adSlotsConfig?.useParentWidth?t.getBoundingClientRect().width&&t.getBoundingClientRect().width>0?t.getBoundingClientRect().width:t.parentElement?t.parentElement.getBoundingClientRect().width:0:screen.width;const T=window.odT.tagMode?document.documentElement.clientHeight:t.parentElement?getComputedStyle(t.parentElement)&&getComputedStyle(t.parentElement)["max-height"]:"";window.odT.setAdSlotParams(e,y,h,m,T,n),y.dfpSizes.length||window.odT.log(`There is no dfpSizes for ${y.name}`)})),this.setup?.adSlotsConfig?.adSlotsDefinitions&&this.setup.adSlotsConfig.adSlotsDefinitions.some((e=>void 0!==e.divTarget))){this.mappedSite=!0,this.setup.adSlotsConfig.adSlotsDefinitions.filter((e=>e.divTarget)).forEach((e=>{if("Desktop"===window.odT.screen&&(!e.deviceTarget||e?.deviceTarget?.toLowerCase().includes("mobile")))return;if("Mobile"===window.odT.screen&&e?.deviceTarget?.toLowerCase().includes("desktop"))return;let i=1;e.divTarget.length&&e.divTarget.map((o=>{let n={name:e.name,adUnit:e.name,divId:null,loadType:1,lazyLoadPx:600,lazyLoadPxWithCore:900,dfpSizes:{},adTemplate:e.adTemplate};if(e.adUnitPathSuffix&&(n.customAdUnitCode=e.adUnitPathSuffix),e.cdValue&&(n.cdValue=e.cdValue),e.customKeyValues&&(n.customKeyValues=e.customKeyValues),e.outOfPage&&(n.outOfPage=!0),o.startsWith("#")){let d=o.slice(1);document.getElementById(d)&&(n.divId=d,n.name=i>1?`${e.name}_${i}`:e.name,t?.some((e=>e.divId===n.divId))||(t.push(n),i++))}else if(o.startsWith(".")){let d=o.slice(1);document.querySelectorAll(`.${CSS.escape(d)}`).forEach((d=>{let s={name:e.name,adUnit:e.name,divId:null,loadType:1,lazyLoadPx:600,lazyLoadPxWithCore:900,dfpSizes:{},adTemplate:e.adTemplate};e.adUnitPathSuffix&&(s.customAdUnitCode=e.adUnitPathSuffix),e.cdValue&&(s.cdValue=e.cdValue),e.customKeyValues&&(n.customKeyValues=e.customKeyValues),e.outOfPage&&(n.outOfPage=!0),d.getAttribute("id")?(s.name=i>1?`${e.name}_${i}`:e.name,s.divId=d.getAttribute("id")):(d.setAttribute("id",i>1?`${o.slice(1)}_${i}`:o.slice(1)),s.name=i>1?`${e.name}_${i}`:e.name,s.divId=i>1?`${o.slice(1)}_${i}`:o.slice(1)),t?.some((e=>e.divId===s.divId))||(t.push(s),i++)}))}else document.getElementById(o)&&(n.divId=o,n.name=i>1?`${e.name}_${i}`:e.name,t?.some((e=>e.divId===n.divId))||(t.push(n),i++));if(document.getElementById(e.divId)){const t=document.getElementById(e.divId);t.getAttribute("data-template")&&(n.adTemplate=t.getAttribute("data-template")),t.getAttribute("data-adslotname")&&(n.name=t.getAttribute("data-adslotname")),t.getAttribute("data-adunitcode")&&(n.customAdUnitCode=t.getAttribute("data-adunitcode"))}}))})),i.forEach((e=>{let{cdValue:i,adUnitPathSuffix:o,customKeyValues:n,outOfPage:d,adTemplate:s}=this.setup?.adSlotsConfig?.adSlotsDefinitions?.find((t=>t.name===e))||{};if(document.getElementById(`${window.odT.divIdPrefix}${e}`)){let a={name:e,adUnit:e,divId:`${this.divIdPrefix}${e}`,loadType:5,lazyLoadPx:0,lazyLoadPxWithCore:900,dfpSizes:{},adTemplate:s||`${this.screen}sticky`,...i&&{cdValue:i},...o&&{customAdUnitCode:o},...n&&{customKeyValues:n},...d&&{outOfPage:d}};t.push(a)}else window?.odT?.firstLoadAdSlots?.includes(e)&&window.odT.stickyAdDivId&&"string"==typeof e&&(window.odT.firstLoadAdSlots=window.odT.firstLoadAdSlots.filter((t=>t!==e)),window.odT.log(`Sticky postion removed due to mispelling or not existing divId: ${e}`))})),t.forEach((t=>{if(t.divId){let i,o=document.getElementById(t.divId);o.setAttribute("style",""),i="Mobile"!==window.odT.screen||window.odT.setup?.adSlotsConfig?.useParentWidth?o&&o.getBoundingClientRect().width&&o.getBoundingClientRect().width>0?o.getBoundingClientRect().width:o&&o.parentElement?o.parentElement.getBoundingClientRect().width:0:screen.width;const n=window.odT.tagMode?document.documentElement.clientHeight:o&&o.parentElement?getComputedStyle(o.parentElement)&&getComputedStyle(o.parentElement)["max-height"]:"";window.odT.setAdSlotParams(e,t,t.name,i,n,t.adTemplate,t.divId),t.dfpSizes.length||window.odT.log(`There is no dfpSizes for ${t.name}`)}}))}if(this.finalAdSlotsConfig.adSlotsDefinitions=e,"Mobile"===this.screen&&this.mobileEvenVerticalSizes){(e=>{window.odT.mobilePosPostions=0;for(const[t,i]of Object.entries(e))t.startsWith("Mobile_Pos")&&parseInt(t.slice(-1))%2==0&&(i.dfpSizes=[...i.dfpSizes,...window.odT.sizesForMobilePos])})(this.finalAdSlotsConfig.adSlotsDefinitions)}function n(e,t,i=[]){if(e.parentElement&&e.parentElement.classList&&e.parentElement.classList.contains("optidigital-wrapper-div"))return i;const o=e.classList?Array.from(e.classList):[];for(const n of t)if("string"==typeof n)if(n.startsWith(".")){const t=n.substring(1);o.some((e=>e.startsWith(t)))&&i.push({foundEl:e,selector:t})}else if(n.startsWith("#")){const t=n.substring(1);e.id!==t||Object.values(window.odT.finalAdSlotsConfig.adSlotsDefinitions).some((e=>e.divId?.includes(n)))||i.push({foundEl:e,selector:t})}else e.id!==n||Object.values(window.odT.finalAdSlotsConfig.adSlotsDefinitions).some((e=>e.divId?.includes(n)))||i.push({foundEl:e,selector:n});if(e.children&&e.children.length)for(let o=0;o<e.children.length;o++)n(e.children[o],t,i);return i}function d(e,t,i){e.forEach((e=>{"childList"===e.type&&e.addedNodes.forEach((e=>{if(e.nodeType===Node.ELEMENT_NODE){n(e,i).forEach((e=>{window.odT.addNewAdSlot(e)}))}}))}))}this.adAdaptersFactory.addSpecialAdSlots(this.finalAdSlotsConfig.adSlotsDefinitions),this.log("Valid adslots ",this.finalAdSlotsConfig.adSlotsDefinitions),this.createAdStyles(),this.adslotInit();const s=(()=>{let e=null,t=null,i=null;return()=>{const o=window.odT.screen,n=window.odT?.setup?.adSlotsConfig?.adSlotsDefinitions,d=n?JSON.stringify(Object.keys(n).sort()):"";if(e&&t===o&&i===d)return e;let s=[];if(n){const e="Desktop"===o,t="Mobile"===o;for(const[i,o]of Object.entries(n))if(o.divTarget&&Array.isArray(o.divTarget)){const i=o.deviceTarget?.toLowerCase()||"";(e&&i&&!i.includes("mobile")||t&&!i.includes("desktop"))&&s.push(...o.divTarget)}}return 0===s.length&&(s="Mobile"===o?[".Mobile_"]:[".Billboard_",".Content_",".HalfpageAd_",".Rectangle_",".Wallpaper"]),e=s,t=o,i=d,s}})(),a=new MutationObserver(((e,t)=>{if(!e.some((e=>"childList"===e.type&&e.addedNodes.length>0)))return;d(e,0,s())})),r=document,l={childList:!0,subtree:!0};window.odT.setup.disableInfiniteScrollFirstLoad||window.odT.setup.spaManualMode||window.odT?.setup?.adSlotsConfig?.adSlotsPrefixes||a.observe(r,l)}setAdSlotParams(e,t,i,o,n,d,s){let a=d||i.replace(/[0-9]/g,"").replace(/_/g,"").toLowerCase();const r=this.screen?`${this.screen.toLowerCase()}sticky`:null,l=this.stickyAdapter.isStickyAdSlot(i),c=l?this.stickyAdapter.getStickyAdConfigurations():[];let u=!1;l&&(t.loadType=this.stickyAdapter.getLoadType(),t.lazyLoadPx=0,u=this.stickyAdapter.isVerticalStickyAdSlot(i));const p=(e,t,i,o)=>2!==e.length||(!i||e[t]>=i)&&(!o||e[t]<=o),w=e=>e.map((e=>e.startsWith("#")||e.startsWith(".")?e.slice(1):e)),g=e=>!("Desktop"===window.odT.screen&&(!e.deviceTarget||e?.deviceTarget?.toLowerCase().includes("mobile")))&&("Mobile"!==window.odT.screen||!e?.deviceTarget?.toLowerCase().includes("desktop"));let f=function(e,t){for(const i in e)if(i.includes(t.toLowerCase()))return i;for(const i in e)if(t.includes(i.toLowerCase()))return i;return t===r?`${window.odT.screen.toLowerCase()}sticky`:null}(this.sizesFor,a),h=[];if(h=this.tagMode?[...this.tagSizes]:l&&u?[...this.sizesFor.verticalsticky]:f?[...this.sizesFor[f]]:[...this.sizesFor.default],this.setup.adSlotsConfig){if(this.setup.adSlotsConfig.hasOwnProperty("adSlotsDefinitions")){const{odSize:e,size:o,minMaxSizes:n,disableBackfill:d,status:a,lazyLoadPx:r,refreshDelay:l,contentExtraCLS:c,vPos:u,anchor:f,adTemplate:m,customSizes:y,clsMaxHeight:T,adUnitPathSuffix:b,cdValue:S,customKeyValues:v,divTarget:C,name:A,outOfPage:I,multiFormat:k,disableGPT:P}=this.setup.adSlotsConfig.adSlotsDefinitions.find((e=>e.name===i||e.divTarget&&w(e.divTarget).includes(s)&&g(e)||e.name===t?.adUnit))||{};m&&this.sizesFor[m]&&(h=this.sizesFor[m]),I&&(t.outOfPage=I,h=this.sizesFor.outofpage);const _=k?.banner||{customSizes:y,size:o,minMaxSizes:n};if(_.customSizes&&(h=_.customSizes),_.size){const e=_.size;h=h.concat(e.filter((e=>-1===h.indexOf(e))))}_.minMaxSizes&&4===_.minMaxSizes.length&&(h=h.filter((e=>p(e,0,_.minMaxSizes[0],_.minMaxSizes[1])&&p(e,1,_.minMaxSizes[2],_.minMaxSizes[3])))),k&&(k.native&&(h=[["fluid"]],k.nativeSize=e??[300,250]),t.multiFormat=k),d&&(t.disableBackfill=d),0===a&&(t.status=0,document.getElementById(t.divId)&&(document.getElementById(t.divId).classList.remove("optidigital-ad-center-sticky"),document.getElementById(t.divId).style.setProperty("min-height","auto"))),r&&(t.lazyLoadPx=r,t.lazyLoadPxWithCore=r),l&&(t.refreshDelay=l),c&&(t.contentExtraCLS=c),u&&(t.vPos=u),f&&(t.anchor=f),T&&Number.isFinite(T)&&(t.clsMaxHeight=T),b&&!t.customAdUnitCode&&(t.customAdUnitCode=b),S&&!t.cdValue&&(t.cdValue=S),v&&!t.customKeyValues&&(t.customKeyValues=v),C&&(t.adUnit=A),P&&(t.disableGPT=P)}const{lazyLoadPxGlobal:e,lazyLoadPxWithCoreGlobal:o}=this.setup.adSlotsConfig||{};if("object"!=typeof h)return void window.odT.log(`There is no sizes for ${t.name}`);t.multiFormat?this.setup.adSlotsConfig&&this.setup.adSlotsConfig.multiFormat?.banner[`minMaxSizes${this.screen}`]&&4===this.setup.adSlotsConfig.multiFormat?.banner[`minMaxSizes${this.screen}`].length&&(h=h.filter((e=>p(e,0,this.setup.adSlotsConfig.multiFormat?.banner[`minMaxSizes${this.screen}`][0],this.setup.adSlotsConfig.multiFormat?.banner[`minMaxSizes${this.screen}`][1])&&p(e,1,this.setup.adSlotsConfig.multiFormat?.banner[`minMaxSizes${this.screen}`][2],this.setup.adSlotsConfig.multiFormat?.banner[`minMaxSizes${this.screen}`][3])))):this.setup.adSlotsConfig&&this.setup.adSlotsConfig[`minMaxSizes${this.screen}`]&&4===this.setup.adSlotsConfig[`minMaxSizes${this.screen}`].length&&(h=h.filter((e=>p(e,0,this.setup.adSlotsConfig[`minMaxSizes${this.screen}`][0],this.setup.adSlotsConfig[`minMaxSizes${this.screen}`][1])&&p(e,1,this.setup.adSlotsConfig[`minMaxSizes${this.screen}`][2],this.setup.adSlotsConfig[`minMaxSizes${this.screen}`][3])))),e&&600===t.lazyLoadPx&&(t.lazyLoadPx=e),o&&900===t.lazyLoadPxWithCore&&(t.lazyLoadPxWithCore=o)}const m=this.setup?.adSlotsConfig?.adSlotsDefinitions?.find((e=>e.name===i||e.divTarget&&w(e.divTarget).includes(s)&&g(e)||e.name===t?.adUnit))?.allowAdsOverflow??this.setup?.adSlotsConfig?.allowAdsOverflow??10;if(o>0&&((o=m?o*(1+m/100):o)>=screen.width&&(o=screen.width),h=h.filter((e=>2!==e.length||e[0]<=o||1800===e[0]))),("string"==typeof n&&n.endsWith("px")&&parseFloat(n)>0||"number"==typeof n&&n>0)&&(n=parseFloat(n),this.log(`Sizes of ${t.name} were limited to the height of ${n}`),n=m?n*(1+m/100):n,h=h.filter((e=>2!==e.length||e[1]<=n))),l&&!u){const e=this.stickyAdapter.getStickyAdConfigurationBySlotName(i,c);if(e&&e[`fat${this.screen}`]){let e="Desktop"===this.screen?1250:800;if(window.innerHeight>=e){let e="Desktop"===this.screen?[[1e3,250],[970,250],[800,250],[700,250]]:[[320,200],[320,180],[320,150]];h=[...h,...e]}}}u&&(h=this.sizesFor.verticalsticky),l&&!u&&0===h.length&&(h=this.stickyAdapter.getHorizontalSizes()),t.dfpSizes=h,void 0!==t.status&&0===t.status||!t.dfpSizes.length||(e[t.name]=t)}insertNewSlot(e,t,i,o){this.mobilePosPostions++,o?(e[`${t.className}${i}`]={...e[o]},e[`${t.className}${i}`].adUnit=`${t.className}`):e[`${t.className}${i}`]={...e[t.className]},e[`${t.className}${i}`].name=`${t.className}${i}`,e[`${t.className}${i}`].divId=`${this.divIdPrefix}${t.className}${i}`,e[`${t.className}${i}`].parentDiv=!1;let n=e[`${t.className}${i}`];n&&n.name&&n.name.startsWith("Mobile_Pos")&&"Mobile"===this.screen&&this.mobileEvenVerticalSizes&&(this.mobilePosPostions%2==0&&n.name?(n.dfpSizes=n.dfpSizes.filter((e=>!this.sizesForMobilePos.some((t=>JSON.stringify(t)===JSON.stringify(e))))),n.dfpSizes=[...n.dfpSizes,...this.sizesForMobilePos]):n.dfpSizes=n.dfpSizes.filter((e=>!this.sizesForMobilePos.some((t=>JSON.stringify(t)===JSON.stringify(e)))))),t.setAttribute("id",e[`${t.className}${i}`].divId),this.adslotInit([e[`${t.className}${i}`]]),!this.lazyLoadPendingAdSlots.includes(e[`${t.className}${i}`].name)&&window?.odT?.monitorLazyLoadCalled&&(this.lazyLoadPendingAdSlots.push(e[`${t.className}${i}`].name),this.monitorLazyLoadAdSlots(e[`${t.className}${i}`].name))}addNewAdSlot(e){let t,i;if(e&&"object"==typeof e&&!Array.isArray(e)&&Object.keys(e).length)({foundEl:t,selector:i}=e);else{if(!(e&&e instanceof HTMLElement))return;t=e}let o=t.getAttribute("id");const{adSlotsDefinitions:n}=window.odT.finalAdSlotsConfig,d=window.odT?.setup?.adSlotsConfig?.adSlotsDefinitions?.filter((e=>e?.divTarget?.includes(i)||e?.divTarget?.includes(`#${i}`)||e?.divTarget?.includes(`.${i}`)));if(document.getElementById(o)){if(!Object.values(window.odT.finalAdSlotsConfig.adSlotsDefinitions).some((e=>e.divId.replace(window.odT.divIdPrefix,"")===o.replace(window.odT.divIdPrefix,"")))){window.odT.log("New element with ID",t);let e=o.replace(window.odT.divIdPrefix,"");const i=t.parentElement?getComputedStyle(t.parentElement)&&getComputedStyle(t.parentElement)["max-height"]:"";let d,s={};s.name=e,s.adUnit=e,s.divId=o,s.parentDiv=!0,s.loadType=1,s.lazyLoadPx=600,s.lazyLoadPxWithCore=900,s.dfpSizes={},d="Mobile"!==window.odT.screen||window.odT.setup?.adSlotsConfig?.useParentWidth?t.getBoundingClientRect().width&&t.getBoundingClientRect().width>0?t.getBoundingClientRect().width:t.parentElement?t.parentElement.getBoundingClientRect().width:0:screen.width,window.odT.setAdSlotParams(n,s,e,d,i,!1,s.divId),n[s.name]&&(window.odT.adslotInit([n[s.name]]),!window.odT.lazyLoadPendingAdSlots.includes(n[s.name].name)&&window?.odT?.monitorLazyLoadCalled&&(window.odT.lazyLoadPendingAdSlots.push(n[s.name].name),window.odT.monitorLazyLoadAdSlots(n[s.name].name)))}}else{window.odT.log("New element",t);const e="Desktop"===window.odT.screen?/(Billboard_|Mobile_|Content_|HalfpageAd_|Rectangle_|Wallpaper_)\w+/:/(Mobile_)\w+/,o=t.className.match(e);o&&(t.className=o[0]);let s=2;if(n[t.className]){s=`_${Object.keys(window.odT.finalAdSlotsConfig.adSlotsDefinitions).filter((e=>e.startsWith(t.className))).length}`,void 0!==n[t.className]&&0===n[t.className].status||window.odT.insertNewSlot(n,t,s)}else if(Array.isArray(d)&&d.length){const e=d?.[0]?.name;if(!e)return;let o=Object.keys(window.odT.finalAdSlotsConfig.adSlotsDefinitions).filter((t=>t.startsWith(e))).length;s=o>0?`_${o+1}`:"";const a=t.parentElement?getComputedStyle(t.parentElement)&&getComputedStyle(t.parentElement)["max-height"]:"";let r,l={};l.name=`${e}${s}`,l.adUnit=`${e}`,l.divId=`${window.odT.divIdPrefix}${e}${s}`,l.parentDiv=!0,l.loadType=1,l.lazyLoadPx=600,l.lazyLoadPxWithCore=900,l.dfpSizes={},r="Mobile"!==window.odT.screen||window.odT.setup?.adSlotsConfig?.useParentWidth?t.getBoundingClientRect().width&&t.getBoundingClientRect().width>0?t.getBoundingClientRect().width:t.parentElement?t.parentElement.getBoundingClientRect().width:0:screen.width,window.odT.setAdSlotParams(n,l,i,r,a,!1,l.divId),n[l.name]&&(t.setAttribute("id",n[l.name].divId),window.odT.adslotInit([n[l.name]]),!window.odT.lazyLoadPendingAdSlots.includes(n[l.name].name)&&window?.odT?.monitorLazyLoadCalled&&(window.odT.lazyLoadPendingAdSlots.push(n[l.name].name),window.odT.monitorLazyLoadAdSlots(n[l.name].name)))}else{let e=window.odT.tools.hasNameInObject(window.odT.finalAdSlotsConfig.adSlotsDefinitions,`${t.className}_`),i=Object.keys(window.odT.finalAdSlotsConfig.adSlotsDefinitions).filter((e=>e.startsWith(t.className))).length;s=e?`_${i}`:"";const o=t.parentElement?getComputedStyle(t.parentElement)&&getComputedStyle(t.parentElement)["max-height"]:"";let d,a={};a.name=`${t.className}${s}`,a.adUnit=`${t.className}`,a.divId=`${window.odT.divIdPrefix}${t.className}${s}`,a.parentDiv=!0,a.loadType=1,a.lazyLoadPx=600,a.lazyLoadPxWithCore=900,a.dfpSizes={},d="Mobile"!==window.odT.screen||window.odT.setup?.adSlotsConfig?.useParentWidth?t.getBoundingClientRect().width&&t.getBoundingClientRect().width>0?t.getBoundingClientRect().width:t.parentElement?t.parentElement.getBoundingClientRect().width:0:screen.width,window.odT.setAdSlotParams(n,a,t.className,d,o,!1,a.divId),n[a.name]&&(t.setAttribute("id",n[`${t.className}${s}`].divId),window.odT.adslotInit([n[`${t.className}${s}`]]),!window.odT.lazyLoadPendingAdSlots.includes(n[`${t.className}${s}`].name)&&window?.odT?.monitorLazyLoadCalled&&(window.odT.lazyLoadPendingAdSlots.push(n[`${t.className}${s}`].name),window.odT.monitorLazyLoadAdSlots(n[`${t.className}${s}`].name)))}}}handleRewardedAdsCropping(){if(!this.setup?.adSlotsConfig?.rewardedAdConfiguration||!this.setup?.adSlotsConfig?.rewardedAdConfiguration?.enableForArticles||!this.adAdaptersFactory.rewardedAdsAdapter.checkRewardedAdFrequency())return;let e=this.setup?.adSlotsConfig?.rewardedAdConfiguration;window.odT.rewardedAdContentSelector=e?.articleContentSelector||"article";const t=e?.contentOffset;let i=e?.blurLastParagraphs;const o=e?.blurInPercentage||.2,n=e?.minParagraphs||10,d=e?.minParagraphsHeight||500,s=e?.excludedElements||{},a=e?.blurLayerZIndex||2147483646,r=e?.minAreaToBlur||!1,l=e?.blurRatio||8,c=e?.customTagName||"P";let u=document.querySelector(window.odT.rewardedAdContentSelector);if(!u)return void window.odT.log("Rewarded ad: Content selector not found");window.odT.enablePerformances&&window.odT.analytics.isSamplingCase()&&"Chrome"===window.odT.checkBrowser&&!0===window.odT.analytics.isFirstAd&&window.odT.analytics.setContentMetrics();let p=u.scrollHeight,w=Array.from(u.children);i&&i>w.length&&(i=w.length);let g=-1,f=0,h=-1,m=0;const y="number"==typeof i?p:t?p*(.8-t):p*o,T=w.length-1;"number"==typeof i&&w.length;for(let e=T;e>=0;e--)if(f+=w[e].offsetHeight,w[e].tagName===c)if("number"==typeof i&&m<i)m++,g=e;else{if(!(0===m&&f<=y))break;g=e}if(Object.keys(s).length){f=0;const e={},t=Object.keys(s),i={};for(let o=T;o>=0;o--){const n=w[o],d=n.id,a=n.classList;f+=n.offsetHeight;for(const r of t){if(e[r]>=(s[r]||1))continue;(r.startsWith(".")?a.contains(r.slice(1)):r.startsWith("#")?d===r.slice(1):d===r||a.contains(r))&&(e[r]=(e[r]||0)+1,i[r]={index:o+1,acc:f-n.offsetHeight})}}Object.keys(i).length&&(h=Math.max(...Object.values(i).map((e=>e.index))),f=Math.min(...Object.values(i).map((e=>e.acc))))}if(g=g>h?g:h,r&&f>=r&&(e.enableBlur=!0),w.length<=n)return void window.odT.log("Rewarded ad: Not enough paragraphs");if(p<=d)return void window.odT.log("Rewarded ad: Content height is less than minimum required");if(-1===g)return void window.odT.log("Rewarded ad: No suitable cut-off index found");const b=t=>{let i;return e?.consentHTML&&(i=document.createElement("div"),i.id="od_rwdad_consent_container",i.innerHTML=e?.consentHTML,e?.rewardedContainer?.style&&Object.keys(e?.rewardedContainer?.style).forEach((t=>{i.style[t]=e?.rewardedContainer?.style[t]})),t.appendChild(i)),i},S=(t,i=!1,o=!1)=>{let n,d=!0;document.querySelector("#od_rwdad_enable_reward_ad")?n=document.querySelector("#od_rwdad_enable_reward_ad"):(n=document.createElement("button"),d=!1),n.type="button",n.id="od_rwdad_enable_reward_ad",n.className=e?.readMoreButton?.className||"mx-auto btn-inscription-newsletter btn btn-secondary",n.textContent=e?.readMoreButton?.textContent||"Read more";const s=e?.readMoreButton?.bottomPosition||"135px",r=e?.readMoreButton?.spinColor||"#fff";if(e?.readMoreButton?.style&&Object.keys(e?.readMoreButton?.style).forEach((t=>{n.style[t]=e?.readMoreButton?.style[t]})),!d&&n&&t.appendChild(n),!document.getElementById("od-blur-overlay-style")){const t=document.createElement("style");t.id="od-blur-overlay-style",t.textContent=`\n          .od-loading { position: relative; color: transparent !important; pointer-events: none; user-select: none; }\n          .od-loading::after { content: ""; position: absolute; top: 50%; left: 50%; width: 1em; height: 1em; margin: -0.5em 0 0 -0.5em; border: 2px solid ${r}; border-top: 2px solid transparent; border-radius: 50%; animation: spin 0.6s linear infinite; background-color: transparent; }\n          @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }\n        `,e?.enableBlur&&(t.textContent+=`\n            #od_rwdad_consent_container { opacity: 0; position: fixed; left: ${i.left}px; right: 0; bottom: ${s}; width: ${i.width}px; z-index: 2147483646; display: flex; justify-content: center; align-items: center; transition: opacity 0.3s; }\n            .od-blur-overlay { position: absolute; left: -15px; right: 0; top: ${o}px; bottom: 0; width: calc(100% + 30px); height: calc(100% - ${o}px); pointer-events: all; backdrop-filter: blur(${l}px); z-index: ${a}; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; transition: opacity 0.3s; }\n          `),document.head.appendChild(t)}};if(e?.enableBlur){let e=w[g];if(!e)return void window.odT.log("Rewarded ad: No suitable overlay start element found");const t=u.getBoundingClientRect();let i=e.getBoundingClientRect();if(0===i.top&&0===i.width){e=w[g-1!=-1?g-1:g],i=e.getBoundingClientRect()}const o=i.top-t.top;if(o<0&&0===i.top&&0===i.width)return void window.odT.log("Rewarded ad: Top offset is less than 0");window.odT.hiddenContainer=[];for(let e=w.length-1;e>=g;e--)window.odT.hiddenContainer.push({element:w[e],filter:w[e].style.filter,pointerEvents:w[e].style.pointerEvents}),w[e].style.filter=`blur(${l}px)`,w[e].style.pointerEvents="none";let n=b(document.body);S(n,t,o);const d=()=>{const t=e.getBoundingClientRect(),i=u.getBoundingClientRect(),o=n.getBoundingClientRect(),d=o.bottom-o.height/2;t.top<d&&i.bottom>o.bottom?(n.style.opacity="1",n.style.pointerEvents="auto"):(n.style.opacity="0",n.style.pointerEvents="all")};window.addEventListener("scroll",d,{passive:!0})}else{let t=document.createElement("div");if(t.id="od_rwdad_wrapper",0==!document.querySelectorAll(`#${t.id}`).length)return;if(u.parentNode.insertBefore(t,u),e?.enableFade){let i=document.createElement("div");i.id="od_rwdad_fade_container",i.style.maskImage=`linear-gradient(to bottom, rgba(0,0,0,1) ${100-(e?.gradientPercentage||15)}%, rgba(0,0,0,0) 100%)`,i.style.webkitMaskImage=i.style.maskImage,0==document.querySelectorAll(`#${i.id}`).length&&(t.appendChild(i),document.querySelector(`#${i.id}`).appendChild(u))}else document.querySelector(`#${t.id}`).appendChild(u);window.odT.hiddenContainer=[];for(let e=w.length-1;e>=g;e--)window.odT.hiddenContainer.push({element:w[e],display:w[e].style.display}),w[e].style.display="none";b(t),S(t)}if(window.odT.rewardedAdReady=!0,e?.articleLeftToRead&&document.querySelector(".od_article_left_to_read")){const e=parseInt(f/p*100);e>=40?document.querySelector(".od_article_left_to_read").innerHTML=e:document.querySelector(".od_article_left_to_read").parentElement.style.display="none"}}handleRewardedAdsUncropping(){if(window.odT.setup?.adSlotsConfig?.rewardedAdConfiguration?.enableForArticles)if(window.odT.setup?.adSlotsConfig?.rewardedAdConfiguration?.enableBlur)window.odT.hiddenContainer.forEach((e=>{e.element.style.filter=e.filter,e.element.style.pointerEvents=e.pointerEvents})),document.querySelector(".od-blur-overlay")&&(document.querySelector(".od-blur-overlay").style.display="none"),document.querySelector("#od_rwdad_consent_container")&&(document.querySelector("#od_rwdad_consent_container").style.display="none"),window.odT.rewardedAdReady=!1,window.odT.refreshAdSlots(window.odT.lazyLoadPendingAdSlotsWithRewarded,"lazy"),window.odT.lazyLoadPendingAdSlotsWithRewarded=[];else if(window.odT.hiddenContainer.forEach((e=>{e.element.style.display=e.display})),document.querySelector("#od_rwdad_consent_container")&&(document.querySelector("#od_rwdad_consent_container").style.display="none"),document.querySelector("#od_rwdad_enable_reward_ad")&&(document.querySelector("#od_rwdad_enable_reward_ad").style.display="none"),window.odT.setup?.adSlotsConfig?.rewardedAdConfiguration?.enableFade){let e=document.querySelector("#od_rwdad_fade_container");e&&(e.style.maskImage="none",e.style.webkitMaskImage="none")}}pageViewEvent(e={},t=!1){if(e.isPerformanceCall||e.isUserPerformanceCall||t||(this.pageViewCalls+=1),this.analytics.isSamplingCase()||t){if(!this.liveAnalyticsId){let e;try{e=self.crypto.randomUUID()}catch(t){e=this.tools.generateUuid()}this.liveAnalyticsId=e}let i,o=window.location.protocol+"//"+window.location.host+window.location.pathname;i=this.consentCMPUIShown&&!e.userAction?"ui":"CMPv2_OOS"===this.consentStatus?"oos":1!==this.pageViewCalls||!e.firstCall||this.consentV2TCData&&this.consentV2TCData.gdprApplies&&!1!==this.consentV2TCData.gdprApplies?this.consentType:this.waitingForCMPFinished?"waiting_callback":"waiting_tcfapi";let n={id:this.liveAnalyticsId,part:this.pageViewCalls,gdpr:{gdprUi:this.consentCMPUIShown?1:0,gdprApplies:window.optidigitalToolboxGdpr?1:0,status:i}},d=JSON.parse(JSON.stringify(n)),s={sampling:this.analytics.liveAnalyticsSampling||25,country:window.optidigitalToolboxCC,networkId:this.setup.info.networkId,publisherId:this.setup.info.publisherId,siteId:this.setup.info.siteId,revision:this.setup.info.revision,domain:window.location.hostname,uri:window.location.pathname,urlHash:this.tools.cyrb53(o,100),abTest:this.testGroup?this.testGroup:"control",device:{deviceCategory:this.deviceCategory,browserWidth:window.top.document.documentElement.clientWidth,breakpoint:this.widthBreakpoint,browser:this.checkBrowser,os:this.checkOs},meta:{},...d};e.firstCall||(s.gdpr.delayForCallback=this.tools.getElapsedTime()),document.referrer&&(s.source||(s.source={}),s.source.referrer=document.referrer,s.source.refDomain=new URL(document.referrer).hostname),new URL(window.location.href).searchParams.get("utm_source")&&(s.source||(s.source={}),s.source.utmSource=new URL(window.location.href).searchParams.get("utm_source")),new URL(window.location.href).searchParams.get("utm_campaign")&&(s.source||(s.source={}),s.source.utmCampaign=new URL(window.location.href).searchParams.get("utm_campaign")),this.initConfig.adUnit&&""!==this.initConfig.adUnit&&(s.adUnitPath=this.initConfig.adUnit);const a=window.top.document.querySelector("meta[property='og:title']");a&&a.getAttribute("content")?s.meta.title=a.getAttribute("content"):document.title&&(s.meta.title=document.title);const r=window.top.document.querySelector("meta[property='og:description']"),l=window.top.document.querySelector('meta[name="description"]');r&&r.getAttribute("content")?s.meta.description=r.getAttribute("content"):l&&l.content&&(s.meta.description=l.content);const c=window.top.document.querySelector("meta[property='og:image']");c&&c.getAttribute("content")&&(s.meta.image=c.getAttribute("content"));const u=window.top.document.querySelector("meta[property='article:author']"),p=window.top.document.querySelector('meta[name="author"]');u&&u.getAttribute("content")?s.meta.articleAuthor=u.getAttribute("content"):p&&p.content&&(s.meta.articleAuthor=p.getAttribute("content"));const w=window.top.document.querySelector("meta[property='article:published_time']");if(w&&w.getAttribute("content")&&(s.meta.articlePublishedTime=w.getAttribute("content")),this.pageViewPayload={...s},!this.tagMode&&!t){let t=null;if(e.isPerformanceCall)t={performances:{...this.performances},...d},this.log("Succesfully get performances payload",t);else if(e.isUserPerformanceCall)t={userPerformances:{},...d},0!==this.userPerformances.inp&&(t.userPerformances.inp=this.userPerformances.inp),0!==this.userPerformances.fid&&(t.userPerformances.fid=this.userPerformances.fid),t.userPerformances.lcp=this.userPerformances.lcp,this.isFirstCLSTrigerred&&(t.userPerformances.cls=this.userPerformances.cls),t.userPerformances.isUserPerformances=!0,this.log("Succesfully get user performances payload",t.userPerformances),this.userPerformanceSent=!0;else{let i=d;3===this.pageViewCalls||e.userAction?i.gdpr.delayForUserAction=Date.now()-this.timeStampCMPUIShown:i.gdpr.delayForCallback=this.tools.getElapsedTime(),t=1===this.pageViewCalls?s:i}window?.odT?.finalAdSlotsConfig?.adSlotsDefinitions&&(t.adslotsNumber=Object.keys(window.odT.finalAdSlotsConfig.adSlotsDefinitions).length),this.analytics.sendAnalyticsRequest(t,"https://analytics.optidigital.com/pageview",!!e.sendBeacon)}}}getMinHeight(e,t,i){let o=0;for(const t of e){if(2===t.length&&1e3===t[1]&&!i){o=0;break}2===t.length&&1e3===t[1]&&i||2===t.length&&t[1]>0&&t[1]>o&&(o=t[1])}return t?Math.min(o,t):o}getMaxWidth(e){let t=0;for(let i=0;i<e.length;i++)2==e[i].length&&e[i][0]>t&&this.prebidSizes.some((t=>e[i].every(((e,i)=>e===t[i]))))&&(t=e[i][0]);return t}adslotInit(e){this.log("Initialize adslot CSS");let t=e||this.finalAdSlotsConfig.adSlotsDefinitions;for(const i of Object.values(t))if("object"==typeof i){const t=document.getElementById(i.divId);if(null!=t){let o=!1;if(i.dfpSizes&&i.dfpSizes.length){let e=i.dfpSizes,t=[[1,1],[1800,1e3]];e=e.filter((e=>!t.some((t=>t[0]===e[0]&&t[1]===e[1])))),e.length||(o=!0)}let n=!("function"!=typeof this.setAdLayout||!this.setup.adLayoutEnabled||o||this.setup?.adLayoutConfig?.excludedAdslots?.includes(i.name)||this.setup?.adLayoutConfig?.excludedAdslots?.includes(i.adUnit)||this.stickyAdapter.isVerticalStickyAdSlot(i.adUnit)),d=i.vPos||"center",s=i.clsMaxHeight||null,a=i.loadType,r=5===a||i.outOfPage?null:this.getMinHeight(i.dfpSizes,s,n);if(i.hasOwnProperty("contentExtraCLS")&&parseFloat(i.contentExtraCLS)>0?r+=i.contentExtraCLS:this.setup.hasOwnProperty("adSlotsConfig")&&this.setup.adSlotsConfig.hasOwnProperty("contentExtraCLS")&&parseFloat(this.setup.adSlotsConfig.contentExtraCLS)>0&&(i.adUnit.toLowerCase().includes("content_")||i.adUnit.toLowerCase().includes("mobile_pos")||i.adUnit.toLowerCase().includes("mobile_ai"))&&(r+=parseFloat(this.setup.adSlotsConfig.contentExtraCLS)),!i.vPos&&this.setup.hasOwnProperty("adSlotsConfig")&&this.setup.adSlotsConfig.hasOwnProperty("contentExtraCLS")&&parseFloat(this.setup.adSlotsConfig.contentExtraCLS)>0&&(i.adUnit.toLowerCase().includes("content_")||i.adUnit.toLowerCase().includes("mobile_pos")||i.adUnit.toLowerCase().includes("mobile_ai"))&&(d="top"),n){let o;const n=this.stickyAdapter.getStickyAdSlotNameFromDivId(t.id);if(!n||"left"!==this.stickyAdapter.getStickyAdMode(n)&&"right"!==this.stickyAdapter.getStickyAdMode(n))o=this.getMaxWidth(i.dfpSizes);else if(i.dfpSizes&&i.dfpSizes.length>0){let e=!1;for(let t of i.dfpSizes)if(Array.isArray(t)&&2===t.length&&t[1]>t[0]){o=t[0],e=!0;break}e||(o=300)}else o=300;let s=this.setup.adLayoutConfig?this.setup.adLayoutConfig:{};e&&t.setAttribute("style",""),this.setAdLayout(s,t,r,o,i,d,a)}else{if(r>1){e&&t.setAttribute("style",""),this.log("CLS size for "+i.name+" => "+r+"px");const o=document.createElement("div"),n=`min-height: ${r}px; display: flex; flex-direction: column; justify-content: ${"center"===d?"center":"start"}; align-items: center; margin: auto;`;o.setAttribute("style",n),o.setAttribute("data-optidigital-slot","true"),o.classList.add("optidigital-wrapper-div"),t.parentNode.insertBefore(o,t),o.appendChild(t)}else t.parentElement?.setAttribute("data-optidigital-slot","true"),this.log("CLS size for "+i.adUnit+" => 0 => NO PARENT DIV");i.parentDiv=!0}}}this.log("Finish ad slot initialization"),this.layoutReady=!0,this.CMPready&&!e?this.runAuction("layoutReady"):!1===this.CMPready&&this.loadOdas(this.runOdasAuction)}checkVendor(e){let t=!1;return this.consentV2TCData&&this.consentV2TCData.hasOwnProperty("vendor")&&this.consentV2TCData.vendor.hasOwnProperty("consents")&&this.consentV2TCData.vendor.consents.hasOwnProperty(e)&&this.consentV2TCData.vendor.consents[e]&&(t=!0),t}consentCheckHBVendors(){let e=!1,t="CMP vendors MISSING: ",i=[{id:755,name:"google"},{id:915,name:"optidigital"},{id:32,name:"xandr"},{id:52,name:"magnite"},{id:45,name:"smart"},{id:91,name:"criteo"},{id:132,name:"teads"},{id:436,name:"invibes"},{id:793,name:"amazon"},{id:28,name:"triplelift"},{id:76,name:"pubmatic"},{id:259,name:"adyoulike"},{id:108,name:"richaudience"},{id:157,name:"seedtag"},{id:164,name:"outbrain"}],o=0;for(let e=0;e<i.length;e++)this.consentV2TCData.vendor.consents.hasOwnProperty(i[e].id)&&1==this.consentV2TCData.vendor.consents[i[e].id]?(o++,t+=`${i[e].name}_OK,`):t+=`${i[e].name}_KO,`;return o==i.length&&(e=!0,t=t.replace("MISSING","OK")),this.log(t),e}checkRejectAll(e){let t=!1,i=0,o=0;for(let t in e)"boolean"==typeof e[t]&&(i++,0==e[t]&&o++);return o==i&&(t=!0),t}analyzeConsentV2(){const e=this.consentV2TCData;if(!e||"object"!=typeof e)return;const{gdprApplies:t,purpose:i,vendor:o}=e;if(t&&i&&i.consents&&o&&o.consents&&o.legitimateInterests)if(t)if(this.checkRejectAll(i.consents))if(this.checkRejectAll(i.legitimateInterests))this.consentStatus="CMPv2_RejectALL";else if(!0===o.legitimateInterests[755]){[2,7,9,10].every((e=>!0===i.legitimateInterests[e]))?(this.consentType="li",this.consentCheckHBVendors()?this.consentStatus="CMPv2_LAokHBok":this.consentStatus="CMPv2_LAokHBko"):this.consentStatus="CMPv2_LAko"}else this.consentStatus="CMPv2_LAMmv";else if(o.consents.hasOwnProperty("755")&&!0===o.consents[755]){const e=[2,7,9,10].every((e=>i.consents.hasOwnProperty(e)&&!0===i.consents[e]||i.legitimateInterests.hasOwnProperty(e)&&!0===i.legitimateInterests[e]));i.consents.hasOwnProperty(1)&&!0===i.consents[1]&&e?(this.consentType="ok",!0===i.consents[3]&&!0===i.consents[4]?this.consentCheckHBVendors()?this.consentStatus="CMPv2_GAMokHBok":this.consentStatus="CMPv2_GAMokHBko":!0===this.consentCheckHBVendors()?this.consentStatus="CMPv2_GAMnpHBok":this.consentStatus="CMPv2_GAMnpHBko"):this.consentStatus="CMPv2_GAMko"}else this.consentStatus="CMPv2_GAMmv";else this.consentStatus="CMPv2_OOS",this.consentType="ok";else this.consentStatus="CMPv2_invalid"}loadConfig(e){if(window!==window.top&&(this.tagMode=!0),"object"==typeof window.top.location&&window.top.location.hasOwnProperty("search")){const e=window.top.location.search;(e.includes("optidigital_debug=true")||!0===window.optidigital_debug)&&(this.debug=!0),(e.includes("optidigital_debug_analytics=true")||!0===window.optidigital_debug_analytics)&&(this.debugAnalytics=!0),e.includes("optidigital_debug_wallpaper=true")&&(this.debugWallpaper=!0,this.debugBidderDiscount=100),e.includes("optidigital_gamenv=test")&&(this.GAMEnv="test"),(e.includes("optidigital_fanalytics=true")||1==window.optidigital_fanalytics)&&(this.forceAnalytics=!0),e.includes("optidigital_fdload=true")&&(this.forceDload=!0),e.includes("optidigital_aicontent=true")&&(this.forceAiContent=!0)}this.setup=e,this.log("Load setup file and page configuration"),this.setup?.testGroup&&(this.testGroup=this.setup.testGroup,this.log(`Test group sampling is ${this.setup.sampling}`),this.log(`Test config revision is ${this.setup.info.revision}`));let t=document.getElementById("optidigital-ad-init");if(null!==t){let e=t.getAttribute("config");if(null==e&&(e=t.getAttribute("data-config")),e)try{this.initConfig=JSON.parse(e)}catch(t){let i=e;i=i.replace(",]","]"),this.log("Invalid JSON input => fixed "+t.message);try{this.initConfig=JSON.parse(i)}catch(e){this.log("Invalid JSON input => load error adUnit "),this.setup.hasOwnProperty("adUnitError")&&(this.initConfig={adUnit:this.setup.adUnitError})}}else this.setup.hasOwnProperty("adUnitError")&&(this.initConfig={adUnit:this.setup.adUnitError});let i=t.getAttribute("src");i.length>0&&(this.siteCode=i.substring(i.indexOf("site=")+5),-1!=this.siteCode.indexOf("&")&&(this.siteCode=this.siteCode.slice(0,this.siteCode.indexOf("&"))),this.log("Script site code => "+this.siteCode)),this.log("Opti Digital script config",this.initConfig)}else this.log("No script with id:optidigital-ad-init","error"),this.setup.hasOwnProperty("adUnitError")&&(this.initConfig={adUnit:this.setup.adUnitError});if(!(this.setup?.info?.publisherId&&this.setup?.info?.networkId&&this.setup?.info?.siteId&&this.setup?.info?.revision))return void this.log("No setup info");if(this.setup.hasOwnProperty("info")&&this.setup.info.hasOwnProperty("revision")&&this.log("PUBLIHSER:"+this.setup.info.publisherId+" - SITE:"+this.setup.info.siteId+" - REVISION:"+this.setup.info.revision),this.setup.info.hasOwnProperty("odNetworkId")&&this.setup.info.odNetworkId&&(this.odNetworkId=this.setup.info.odNetworkId),this.setup?.breakpoint&&(this.screen=window.top?window.top.document.documentElement.clientWidth<this.setup.breakpoint?"Mobile":"Desktop":document.documentElement.clientWidth<this.setup.breakpoint?"Mobile":"Desktop"),this.setup.hasOwnProperty("publisherInit")&&"function"==typeof this.setup.publisherInit)try{this.setup.publisherInit(this.initConfig)}catch(e){}if(this.setup.hasOwnProperty("publisherInitStart")&&"function"==typeof this.setup.publisherInitStart)try{this.setup.publisherInitStart(this.initConfig)}catch(e){}if(this.setup.hasOwnProperty("oyStatus")&&(this.oyStatus=this.setup.oyStatus),this.setup&&this.setup.hasOwnProperty("enableCookieConsent")&&(this.enableCookieConsent=this.setup.enableCookieConsent),this.setup.hasOwnProperty("enableArticleReporting")&&(this.enableArticleReporting=this.setup.enableArticleReporting),this.setup.hasOwnProperty("enablePerformances")&&(this.enablePerformances=this.setup.enablePerformances),this.setup.hasOwnProperty("iasId")&&(this.iasId=this.setup.iasId),this.enableArticleReporting){let e=window.location.protocol+"//"+window.location.host+window.location.pathname;e.length>0&&(this.articleID=this.cyrb53(e,100)),this.setup.hasOwnProperty("enableArticleReportingKey")&&this.initConfig.hasOwnProperty("pageTargeting")&&this.initConfig.pageTargeting.hasOwnProperty(this.setup.enableArticleReportingKey)&&(this.articleID=this.initConfig.pageTargeting[this.setup.enableArticleReportingKey],this.log("Custom reporting key: "+this.setup.enableArticleReportingKey+" with value: "+this.articleID))}if(this.setup.hasOwnProperty("enableSourceReporting")&&(this.enableSourceReporting=this.setup.enableSourceReporting),this.enableSourceReporting){let e=document.referrer,t="direct_traffic";if(this.setup.hasOwnProperty("sourceCampaignTrackers")&&this.setup.sourceCampaignTrackers.length>0)for(let e in this.setup.sourceCampaignTrackers)if(-1!=window.location.search.indexOf(this.setup.sourceCampaignTrackers[e])){this.sourceID=this.cyrb53(this.setup.sourceCampaignTrackers[e],100),this.log("Source campaign: "+this.setup.sourceCampaignTrackers[e]);break}if(0==this.sourceID){if(e.length>0){let e=document.createElement("a");e.href=document.referrer,t=-1!=this.sourceDomains.indexOf(e.hostname)||this.setup.hasOwnProperty("sourceDomains")&&-1!=this.setup.sourceDomains.indexOf(e.hostname)?e.hostname:"referrer_unknown"}this.sourceID=this.cyrb53(t,100)}}this.setup.hasOwnProperty("enableLimitedAds")&&(this.enableLimitedAds=this.setup.enableLimitedAds),this.enableLimitedAds&&(this.consentStatusNoGAM=this.consentStatusNoGAMButLA,this.limitedAds=!0),this.setup.hasOwnProperty("targetingODBidder")&&1==this.setup.targetingODBidder&&(this.targetingPrebidPB="odtag_pb",this.targetingODBidder=!0),this.setup.hasOwnProperty("engageBackfill")&&!1===this.setup.engageBackfill&&(this.engageBackfill=!1),this.setup.hasOwnProperty("adRequestStats")&&!1===this.setup.adRequestStats&&(this.adRequestStats=!1),this.setup.hasOwnProperty("infiniteScrollWallpaperSlot")&&(this.infiniteScrollWallpaperSlot=this.setup.infiniteScrollWallpaperSlot),this.setup.hasOwnProperty("mobileEvenVerticalSizes")&&this.setup.mobileEvenVerticalSizes&&(this.mobileEvenVerticalSizes=!0),this.setup.hasOwnProperty("enableGpid")&&!1===this.setup.enableGpid&&(this.enableGpid=!1),this.setup.hasOwnProperty("noGamUseSafeframe")&&(this.noGamUseSafeframe=this.setup.noGamUseSafeframe),this.deviceDetection(),this.checkBrowser=this.tools.detectBrowser(),this.checkOs=this.tools.detectOS(),"Safari"!==this.checkBrowser&&"Firefox"!==this.checkBrowser||(this.customDNR=!1);let i=this.setup.pageViewEventTimeout||0===this.setup.pageViewEventTimeout?this.setup.pageViewEventTimeout:1e3;setTimeout((()=>{window.odT.consentV2TCData||window.odT.consentCMPUIShown||!window.optidigitalToolboxGdpr||"timeout_tcfapi"===window.odT.consentType||window.odT.pageViewEvent({firstCall:!0})}),i);const o=this.setup?.adSlotsConfig?.stickyAdConfiguration||this.setup?.stickyAdConfiguration;if(o&&"object"==typeof o){!Object.keys(o).some((e=>e.includes(`${this.screen}_Sticky_`)))&&o.hasOwnProperty("frequency")&&o.hasOwnProperty("frequencyImps")&&o.hasOwnProperty("frequencyInterval")&&(this.stickyFrequency=o.frequency,this.stickyFrequencyImps=o.frequencyImps,this.stickyFrequencyInterval=o.frequencyInterval)}this.setup.hasOwnProperty("adSlotsConfig")&&this.setup.adSlotsConfig.hasOwnProperty("rewardedAdConfiguration")&&this.setup.adSlotsConfig.rewardedAdConfiguration.hasOwnProperty("frequency")&&this.setup.adSlotsConfig.rewardedAdConfiguration.hasOwnProperty("frequencyImps")&&this.setup.adSlotsConfig.rewardedAdConfiguration.hasOwnProperty("frequencyInterval")&&(this.rewardedAdFrequency=this.setup.adSlotsConfig.rewardedAdConfiguration.frequency,this.rewardedAdFrequencyImps=this.setup.adSlotsConfig.rewardedAdConfiguration.frequencyImps,this.rewardedAdFrequencyInterval=this.setup.adSlotsConfig.rewardedAdConfiguration.frequencyInterval),this.setup.hasOwnProperty("enableOdas")&&this.setup.enableOdas.includes("ok")&&(this.setup.enableOdas=[...this.setup.enableOdas,"timeout_callback","timeout_tcfapi"]),window.top.addEventListener("blur",(function(){window.odT.log("Window blur"),window.setTimeout((function(){"iframe"==document.activeElement.tagName.toLowerCase()?window.odT.windowStatus=1:window.odT.windowStatus=0}),0)})),window.top.addEventListener("focus",(function(){window.odT.windowStatus=1,window.odT.log("Window focus")})),window.top.document.addEventListener("visibilitychange",(e=>{window.odT.enablePerformances&&window.odT.analytics.isSamplingCase()&&"Chrome"===window.odT.checkBrowser&&"hidden"===document.visibilityState&&!window.odT.userPerformanceSent&&(window.odT.log("Sending user performances analytics on visibility change",window.odT.userPerformances),"ko"!==window.odT.consentType&&window.odT.consentCMPUIShown?window.odT.pageViewEvent({isUserPerformanceCall:!0,sendBeacon:!0,userAction:!0}):window.odT.pageViewEvent({isUserPerformanceCall:!0,sendBeacon:!0})),"visible"!==document.visibilityState&&(window.odT.windowStatus=0,window.odT.log("Window not visible"))})),window.addEventListener("mousedown",(e=>{window.odT.userAction.includes(e.type)||window.odT.userAction.push(e.type)})),window.addEventListener("mousemove",(e=>{window.odT.userAction.includes(e.type)||window.odT.userAction.push(e.type)})),window.addEventListener("touchstart",(e=>{window.odT.userAction.includes(e.type)||window.odT.userAction.push(e.type)})),window.addEventListener("scroll",(e=>{window.odT.userAction.includes(e.type)||window.odT.userAction.push(e.type)}),{passive:!0})}getInfiniteScrollDPFSizes(e){return e.filter((function(e){let t=!1;return void 0!==e&&1800!=e[0]&&(t=!0),t}))}defineSlots(e){const{adSlotsDefinitions:t}=this.finalAdSlotsConfig,{adSlotsConfig:i}=this.setup;for(let o in e)if(!this.gptAdSlots.hasOwnProperty(e[o])&&t.hasOwnProperty(e[o])){let n=i&&i.adManagerKeyName?i.adManagerKeyName:this.setup?.customTargeting?.adslot?.name?this.setup.customTargeting.adslot.name:"adslot";if(6==t[e[o]].loadType){let i=window.googletag.defineOutOfPageSlot(`${this.initConfig.adUnit}${t[e[o]].customAdUnitCode?"/"+t[e[o]].customAdUnitCode:""}`,window.googletag.enums.OutOfPageFormat.INTERSTITIAL);if(i){if(i.setTargeting(n,t[e[o]].cdValue?t[e[o]].cdValue:t[e[o]].adUnit),i.addService(window.googletag.pubads()),t[e[o]].customKeyValues)for(let n in t[e[o]].customKeyValues)i.setTargeting(n,t[e[o]].customKeyValues[n]);this.gptAdSlots[t[e[o]].name]=i,this.log("Created INTERSTITIAL adslot "+e[o])}else this.log("FAILED to create INTERSTITIAL adslot "+e[o]);continue}if(7==t[e[o]].loadType&&(e[o].toLowerCase().includes("siderail_left")||e[o].toLowerCase().includes(window.odT.setup?.adSlotsConfig?.sideRailsConfig?.nameSiderailLeft?.toLowerCase()))){let i=googletag.defineOutOfPageSlot(`${this.initConfig.adUnit}${t[e[o]].customAdUnitCode?"/"+t[e[o]].customAdUnitCode:""}`,googletag.enums.OutOfPageFormat.LEFT_SIDE_RAIL);if(i){if(i.setTargeting(n,t[e[o]].cdValue?t[e[o]].cdValue:t[e[o]].adUnit),i.addService(googletag.pubads()),t[e[o]].customKeyValues)for(let n in t[e[o]].customKeyValues)i.setTargeting(n,t[e[o]].customKeyValues[n]);this.gptAdSlots[t[e[o]].name]=i,this.log("Created SIDE RAIL LEFT adslot "+e[o])}else this.log("FAILED to create SIDE RAIL LEFT adslot "+e[o]);continue}if(7==t[e[o]].loadType&&(e[o].toLowerCase().includes("siderail_right")||e[o].toLowerCase().includes(window.odT.setup?.adSlotsConfig?.sideRailsConfig?.nameSiderailRight?.toLowerCase()))){let i=googletag.defineOutOfPageSlot(`${this.initConfig.adUnit}${t[e[o]].customAdUnitCode?"/"+t[e[o]].customAdUnitCode:""}`,googletag.enums.OutOfPageFormat.RIGHT_SIDE_RAIL);if(i){if(i.setTargeting(n,t[e[o]].cdValue?t[e[o]].cdValue:t[e[o]].adUnit),i.addService(googletag.pubads()),t[e[o]].customKeyValues)for(let n in t[e[o]].customKeyValues)i.setTargeting(n,t[e[o]].customKeyValues[n]);this.gptAdSlots[t[e[o]].name]=i,this.log("Created SIDE RAIL RIGHT adslot "+e[o])}else this.log("FAILED to create SIDE RAIL RIGHT adslot "+e[o]);continue}if(8==t[e[o]].loadType&&(e[o].toLowerCase().includes("_rewardedad")||e[o].toLowerCase().includes(window.odT.setup?.adSlotsConfig?.rewardedAdConfiguration?.[`nameRewardedAd${this.screen}`]?.toLowerCase()))){let i=googletag.defineOutOfPageSlot(`${this.initConfig.adUnit}${t[e[o]].customAdUnitCode?"/"+t[e[o]].customAdUnitCode:""}`,googletag.enums.OutOfPageFormat.REWARDED);i?(i.setTargeting(n,t[e[o]].cdValue?t[e[o]].cdValue:t[e[o]].adUnit),i.addService(googletag.pubads()),this.gptAdSlots[t[e[o]].name]=i,this.log("Created REWARDED AD adslot "+e[o]),googletag.pubads().addEventListener("rewardedSlotReady",(e=>{if(window.odT.rewardedAdsReady=!0,document.getElementById("od_rwdad_enable_reward_ad")&&document.getElementById("od_rwdad_enable_reward_ad").classList.remove("od-loading"),window.odT.setup?.adSlotsConfig?.rewardedAdConfiguration?.rewardedSlotReady)window.odT.setup?.adSlotsConfig?.rewardedAdConfiguration?.rewardedSlotReady(e);else if(window.odT.setup?.adSlotsConfig?.rewardedAdConfiguration?.enableForArticles){const t=document.getElementById("od_rwdad_enable_reward_ad");t&&t.addEventListener("click",(t=>{e.makeRewardedVisible(),this.log("Rewarded ad is active.")}))}})),googletag.pubads().addEventListener("rewardedSlotClosed",(()=>{window.odT.rewardedAdPayload&&(window.odT.rewardedAdPayload=null),i&&(googletag.destroySlots([i]),window.googletag.cmd.push((function(){window.googletag.pubads().refresh(window.odT.getGPTSlots([i]))}))),this.handleRewardedAdsUncropping()})),googletag.pubads().addEventListener("rewardedSlotGranted",(e=>{if(1==window.odT.rewardedAdFrequency){let e=window.odT.getCookie(window.odT.rewardedAdCookie);e.length>0?e++:e=1,window.odT.setCookie(window.odT.rewardedAdCookie,e,window.odT.rewardedAdFrequencyInterval)}window.odT.setup?.adSlotsConfig?.rewardedAdConfiguration?.rewardedSlotGranted?window.odT.setup?.adSlotsConfig?.rewardedAdConfiguration?.rewardedSlotGranted(e):(window.odT.rewardedAdPayload=e.payload,this.handleRewardedAdsUncropping())}))):this.log("FAILED to create REWARDED AD adslot "+e[o]);continue}if((-1!=t[e[o]].name.indexOf("OutOfPage")||t[e[o]].outOfPage)&&this.setup.sourceDomains&&"frandroid.com"!=this.setup.sourceDomains[0]&&this.setup.sourceDomains&&"numerama.com"!=this.setup.sourceDomains[0])this.gptAdSlots[t[e[o]].name]=window.googletag.defineOutOfPageSlot(`${this.initConfig.adUnit}${t[e[o]].customAdUnitCode?"/"+t[e[o]].customAdUnitCode:""}`,t[e[o]].divId).setCollapseEmptyDiv(!0).setTargeting(n,t[e[o]].cdValue?t[e[o]].cdValue:t[e[o]].adUnit).addService(window.googletag.pubads());else{let i=!1,d=t[e[o]].dfpSizes;t[e[o]].hasOwnProperty("infiniteScrollId")&&t[e[o]].infiniteScrollId>1&&(d=this.getInfiniteScrollDPFSizes(d),i=!0);const s=document.getElementById(t[e[o]].divId)+"-iframe-odadsrv";null!=s&&null!=s.parentElement&&s.parentElement.removeChild(s);try{if(this.gptAdSlots[t[e[o]].name]=window.googletag.defineSlot(`${this.initConfig.adUnit}${t[e[o]].customAdUnitCode?"/"+t[e[o]].customAdUnitCode:""}`,d,t[e[o]].divId).setCollapseEmptyDiv(!0).setTargeting(n,t[e[o]].cdValue?t[e[o]].cdValue:t[e[o]].adUnit).addService(window.googletag.pubads()),t[e[o]].customKeyValues)for(let i in t[e[o]].customKeyValues)this.gptAdSlots[t[e[o]].name].setTargeting(i,t[e[o]].customKeyValues[i]);1==i&&window.odT.setSlotTargeting(this.gptAdSlots[t[e[o]].name],"infinite-scroll","yes")}catch(e){}}}}initPageTargeting(){if(window.odT.initConfig.hasOwnProperty("pageTargeting")&&"object"==typeof window.odT.initConfig.pageTargeting&&null!=window.odT.initConfig.pageTargeting){let e=Object.keys(window.odT.initConfig.pageTargeting);for(let t in e){if("string"!=typeof e[t])continue;let i=window.odT.initConfig.pageTargeting[e[t]];"number"==typeof i&&(i=i.toString()),window.odT.setPageTargeting(e[t],i)}}if(window.odT.articleID&&window.odT.setPageTargeting("article_id",window.odT.articleID.toString()),window.odT.sourceID&&window.odT.setPageTargeting("source_id",window.odT.sourceID.toString()),window.odT.testGroup&&"test"==window.odT.testGroup&&window.odT.setPageTargeting("test_group","test"),window.odT.GAMEnv&&"test"==window.odT.GAMEnv&&window.odT.setPageTargeting("optidigital_gamenv","test"),!window.odT.limitedAds||"CMPv2_LAokHBok"!=window.odT.consentStatus&&"CMPv2_LAokHBko"!=window.odT.consentStatus||window.odT.setPageTargeting("od_limitedads","1"),window.odT.setPageTargeting("odtag_status","1"),"Chrome"===window.odT.checkBrowser){let e="0";window.odT.setPageTargeting("od_ccd",e),"cookieDeprecationLabel"in navigator&&navigator.cookieDeprecationLabel.getValue().then((t=>{-1!=t.indexOf("treatment_1.")&&(e="1"),-1!=t.indexOf("control_2")&&(e="2"),window.odT.setPageTargeting("od_ccd",e)}))}}isAdslotVisible(e){if(!e&&!e.parentElement)return!1;if(window.odT.setup?.adSlotsConfig?.adSlotsDefinitions){const t=e.getAttribute("id").replace(window.odT.divIdPrefix,""),i=e=>e.map((e=>e.startsWith("#")||e.startsWith(".")?e.slice(1):e)),o=e=>!("Desktop"===window.odT.screen&&(!e.deviceTarget||e?.deviceTarget?.toLowerCase().includes("mobile")))&&("Mobile"!==window.odT.screen||!e?.deviceTarget?.toLowerCase().includes("desktop")),n=Object.values(window.odT.finalAdSlotsConfig.adSlotsDefinitions).find((e=>e.divId===t)),d=window.odT.setup.adSlotsConfig.adSlotsDefinitions.find((e=>e.name===t||e.divTarget&&i(e.divTarget).includes(t)&&o(e)||e.name===n?.adUnit));if(d&&d?.ignoreParentVisibility)return!0}return!(0==e.parentElement.offsetWidth&&0==e.parentElement.offsetHeight)&&"hidden"!==getComputedStyle(e)?.visibility}buildFirstLoadAdSlots(){for(let e of Object.values(this.finalAdSlotsConfig.adSlotsDefinitions)){if(!e.hasOwnProperty("dfpSizes"))continue;let t=0,i=0;if(e.hasOwnProperty("loadType")&&(t=e.loadType),e.hasOwnProperty("lazyLoadPx")&&(i=e?.lazyLoadPxWithCore?Math.max(e.lazyLoadPxWithCore,e.lazyLoadPx):e.lazyLoadPx),0==t||this.adAdaptersFactory.isSpecialAdLoadType(t)){this.stickyAdapter.isStickyAdSlot(e.name)&&0!==(this.stickyAdapter.getStickyAdTopTrigger(e.name)||0)||-1!=this.firstLoadAdSlots.indexOf(e.name)||this.firstLoadAdSlots.push(e.name)}else if(1==t){const t=document.getElementById(e.divId);if(null!=t&&this.isAdslotVisible(t)){const o=t.getBoundingClientRect();this.log(`Position for ${e.name} - top: ${o.top}, innerHeight: ${window.innerHeight}`),o.top>=0&&o.top-window.innerHeight<=i||o.top<0&&Math.abs(o.top)<=i||this.forceDload?-1==this.firstLoadAdSlots.indexOf(e.name)&&this.firstLoadAdSlots.push(e.name):-1==this.lazyLoadPendingAdSlots.indexOf(e.name)&&this.lazyLoadPendingAdSlots.push(e.name)}else null==t||this.isAdslotVisible(t)||this.notVisibleAdslots.push(e.divId)}}if(window.odT.loadByGroup(window.odT.firstLoadAdSlots),window.odT.fetchAPSBids(window.odT.firstLoadAdSlots||[]),this.log("First ad slots were created"),this.notVisibleAdslots.length){const e=new Map,t=t=>{const i=document.getElementById(t);if(!i)return;const o=i.parentElement;if(!o)return;let n=!1;const d=()=>{if(n)return;n=!0;const d=window?.odT?.finalAdSlotsConfig?.adSlotsDefinitions?Object.values(window.odT.finalAdSlotsConfig.adSlotsDefinitions).find((e=>e.divId===t)):null,s=d?d.name:null;s&&(window.odT.lazyLoadPendingAdSlots.push(s),window.odT.monitorLazyLoadAdSlots(s)),window.odT.notVisibleAdslots=window.odT.notVisibleAdslots.filter((e=>e!==t));const a=e.get(t);a&&(a.intersection?.unobserve(i),a.resize?.unobserve(o),e.delete(t))},s=new IntersectionObserver(((e,t)=>{e.forEach((e=>{e.isIntersecting&&e.intersectionRatio>0&&d()}))}),{threshold:.1}),a=new ResizeObserver((e=>{e.forEach((e=>{const{width:t,height:i}=e.contentRect;t>0&&i>0&&d()}))}));s.observe(i),a.observe(o),e.set(t,{intersection:s,resize:a})};window.odT.notVisibleAdslots.forEach(t)}window.odT.AIArticles=new u(optidigitaltagsinserter)}createAdStyles(){let e=document.createElement("style");e.type="text/css";let t=".optidigital-ad-center { text-align: center; } .optidigital-ad-center-sticky { text-align: center; width:100%; position: -webkit-sticky; position: sticky; top: 0; }";for(let e of Object.values(this.finalAdSlotsConfig.adSlotsDefinitions))"object"!=typeof e||this.tagMode||(e.adUnit.includes("Content")||e.adUnit.includes("Mobile_Pos")||e.adUnit.includes("Mobile_AI"))&&(t+="."+e.adUnit+"{margin-top: 1em;margin-bottom: 1em;}");e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t)),document.getElementsByTagName("head")[0].appendChild(e)}getGPTSlots(e){var t=[];for(var i in e)this.gptAdSlots.hasOwnProperty(e[i])&&t.push(this.gptAdSlots[e[i]]);return t}refreshAdSlots(e,t,i){window.odT.setup[`fullPackage${window.odT.screen}`]||"OD"===window.odT.adserver||window?.odT?.dynamicAdslotsCalled||window.odT.loadCore();const o=(e,t,i,o=!1)=>{null!==e&&window.odT.log(`Refresh ad slots - loadType:${t} prebidTimeout: ${i}, slot: ${e}`);window.odT.stickyAdapter.getStickyAdConfigurations();this.stickyAdapter.getStickyNames().forEach((t=>{if(null!==e&&e.includes(`${t}`)){const e=`${window.odT.divIdPrefix}${t}`;if(document.getElementById(`sf_tag_${e}`)||document.getElementById(`${e}-iframe-od`)||document.getElementById(`${e}-iframe-odadsrv`)){const i=document.getElementById(e);if(i){i.style.height=getComputedStyle(i).height,i.innerHTML="";const e=String(t).replace(/[^a-zA-Z0-9]/g,"_"),o=document.getElementsByClassName(`opd_adsticky-scroll_${e}`)[0];o&&(o.style.display="none")}}}})),void 0===t&&(t="manual"),void 0===i&&(i=null);let n=[],d=[],s=window.odT.setup.biddersSetup&&window.odT.setup.timeouts&&window.odT.setup.timeouts.prebidIndirect?window.odT.setup.timeouts.prebidIndirect:1500,a=window.odT.setup.biddersSetup&&window.odT.setup.timeouts&&window.odT.setup.timeouts.failsafe?window.odT.setup.timeouts.failsafe:2500;if(n="string"==typeof e?[e]:e,!window.odT.firstLoadAdSlotsShowed&&window.odT.setup[`fullPackage${window.odT.screen}`]&&(n=n?n.concat(window.odT.firstLoadAdSlots):window.odT.firstLoadAdSlots,window.odT.firstLoadAdSlotsShowed=!0),"OD"==window.odT.adserver&&window.odT.setup.adSlotsConfig&&window.odT.setup.adSlotsConfig.adSlotsDefinitions&&window.odT.setup.adSlotsConfig.adSlotsDefinitions.some((e=>void 0!==e.odZoneId))){let e=[];for(let t=0;t<n.length;t++)for(let i in window.odT.setup.adSlotsConfig.adSlotsDefinitions)if("object"==typeof window.odT.setup.adSlotsConfig.adSlotsDefinitions[i]&&window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].odZoneId&&window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].odSize&&window.odT.finalAdSlotsConfig.adSlotsDefinitions[n[t]].adUnit==window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].name){let o={adslot:window.odT.setup.adSlotsConfig.adSlotsDefinitions[i]?.cdValue?window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].cdValue:window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].name,zoneId:window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].odZoneId,size:window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].odSize,divId:window.odT.finalAdSlotsConfig.adSlotsDefinitions[n[t]].divId};e.push(o);break}if(e.length>0){let i=window.odT.customDNR?"1":"0";optidigitalAdsrv.getAds(window.odT.initConfig.adUnit,e,"refresh",window.odT.consentType,window.odT.testGroup,t,!1,i)}return"ok"}for(let e in n)window.odT.finalAdSlotsConfig.adSlotsDefinitions.hasOwnProperty(n[e])&&d.push(n[e]);if(0==d.length)return"error: no matching slot";const r=d.filter((e=>!window.odT.isGPTdisabledForSlot(e)));null!==i&&(s=i),r.length>0&&window.googletag.cmd.push((function(){window.odT.defineSlots(r)})),window.odT.setup.hasOwnProperty("prebidIndirectStaticCpm")&&1==window.odT.setup.prebidIndirectStaticCpm&&window.odT.setup.hasOwnProperty("consentData")&&window.odT.setup.consentData.hasOwnProperty("consentData")&&window.odT.setup.consentData.hasOwnProperty("gdprApplies")&&!o&&window.odpbjs.que.push((function(){window.odpbjs.setConfig({consentManagement:{gdpr:{cmpApi:"static",allowAuctionWithoutConsent:!0,consentData:{getTCData:{tcString:window.odT.consentData.consentData,gdprApplies:window.odT.consentData.gdprApplies}}}},cache:{url:"https://pbs.optidigital.com/cache",ignoreBidderCacheKey:!0}})}));for(let e in r)window.odT.gptAdSlots.hasOwnProperty(r[e])&&(window.googletag.cmd.push((function(){window.odT.gptAdSlots[r[e]].getTargetingKeys().forEach((t=>{t.includes("hb_")&&window.odT.gptAdSlots[r[e]].clearTargeting(t)}))})),"auto"==t&&window.googletag.cmd.push((function(){window.odT.setSlotTargeting(window.odT.gptAdSlots[r[e]],"auto_refresh","yes")})));return s>0&&!o?window.odTC.executeAPSAndPrebid(s,a,structuredClone(d)):o?window.odT.callPrebidAdapter("refresh",null,null,d):r.length>0&&window.googletag.cmd.push((function(){window.googletag.pubads().refresh(window.odT.getGPTSlots(r))})),"ok"};if(window.odT.loadCoreFinished&&window.odT.userAction.length)o(e,t,i);else if(!window.odT.loadCoreFinished&&window.odT.userAction.length){let n=0;const d=setInterval((()=>{let s=window.odT.setup.loadCoreTimeout?window.odT.setup.loadCoreTimeout:1e3;window.odT.loadCoreFinished?(clearInterval(d),o(e,t,i)):n>s&&(clearInterval(d),o(e,t,i,!0)),n+=50}),50)}else o(e,t,i,!0)}monitorAutomaticRefresh(){const{automaticRefresh:e}=this.setup;let t=e&&e.intervalTimeout?e.intervalTimeout:2e3;setInterval((()=>{if(0==window.odT.windowStatus)return!1;if(window.odT?.setup?.refreshAfterUserAction&&!window.odT?.userAction?.length)return!1;const t=new Date,i=Object.keys(window.odT.finalAdSlotsConfig.adSlotsDefinitions);let o=[];for(let n in i){if("string"!=typeof i[n])continue;let d=window.odT.finalAdSlotsConfig.adSlotsDefinitions[i[n]].adUnit,s=window.odT.finalAdSlotsConfig.adSlotsDefinitions[i[n]].divId,a=window.odT.finalAdSlotsConfig.adSlotsDefinitions[i[n]].loadType,r=e&&e.max?e.max:1/0,l=3e4;if(window.odT.finalAdSlotsConfig.adSlotsDefinitions[i[n]].refreshDelay?l=window.odT.adSlotsLoadStatus?.[s]?.delay?window.odT.adSlotsLoadStatus[s].delay:window.odT.finalAdSlotsConfig.adSlotsDefinitions[i[n]].refreshDelay:window.odT.adSlotsLoadStatus?.[s]?.delay&&(l=window.odT.adSlotsLoadStatus[s].delay),window.odT.adSlotsLoadCount[s]>=1&&window.odT.adSlotsLoadCount[s]<r&&l>0&&t.getTime()-window.odT.adSlotsLoadTime[s]>=l){let r=.5;e&&e.adSlots&&e.adSlots[d]&&e.adSlots[d].hasOwnProperty("view")&&"number"==typeof e.adSlots[d].view&&(r=e.adSlots[d].view);const l=document.getElementById(s);if(null==l||window.odT.tagMode){if(null!==l&&window.odT.tagMode){const e=e=>{let t=e.getBoundingClientRect();return(!window.odT.adSlotsUnfilledCount[s]||window.odT.adSlotsUnfilledCount[s]<3)&&t.height>=50&&(t.top>=0&&window.top.innerHeight-t.top>t.height*r||t.top<0&&Math.abs(t.top)<t.height*r)||0==r};let t=window.top.document.querySelectorAll("iframe");for(let d=0;d<t.length;d++){let s=t[d];if(s.contentWindow===window){e(s)&&o.push(i[n]);break}}}}else{const e=getComputedStyle(l)?.visibility;let d=l.getBoundingClientRect();if(0===d.top&&0===d.width)if(l.closest(".optidigital-wrapper-div")&&5!==a)d=l.closest(".optidigital-wrapper-div").getBoundingClientRect();else{let e=l.parentElement;for(;e&&e.offsetHeight<1;)e=e.parentElement;d=e?e.getBoundingClientRect():l.getBoundingClientRect()}window.odT.log(`Position for ${i[n]}, top: ${d.top}, height: ${d.height}, innerHeight: ${window.innerHeight}`);const c=window.odT.stickyAdapter.getStickyAdSlotNameFromDivId(s);let u=!0;if(c){const e=window.odT.stickyAdapter.getStickyAdContainerId(c),t=document.getElementById(e);if(t&&t.getBoundingClientRect()){let e=t.getBoundingClientRect();0===e.top&&0===e.bottom&&0===e.width&&0===e.height&&(u=!1)}}const p=document.getElementById("opd_bottomstickyad");if(p&&p.getBoundingClientRect()){let e=p.getBoundingClientRect();0===e.top&&0===e.bottom&&0===e.width&&0===e.height&&(u=!1)}const w="closed"===(c?window.odT.stickyAdapter.getStickyAdStatus(c):null)||"closed"===window.odT.stickyAdStatus;5===a&&(!window.odT.adSlotsUnfilledCount[s]||window.odT.adSlotsUnfilledCount[s]<3)&&!w&&c&&window.odT.stickyAdapter.shouldRefreshStickyAd(c,u)?(window.odT.log("Refresh slot => "+(t.getTime()-window.odT.adSlotsLoadTime[s])),window.odT.adSlotsLoadTime[s]=t.getTime(),o.push(s.replace(window.odT.divIdPrefix,""))):(5===a||window.odT.finalAdSlotsConfig.adSlotsDefinitions[i[n]].outOfPage||s.toLowerCase().includes("outofpage")||s.toLowerCase().includes("wallpaper")&&window.odT.wallpaperFilled||s.toLowerCase().includes("billboard_1")&&window.odT.wallpaperForBillboard||window.odT.adSlotsUnfilledCount[s]&&!(window.odT.adSlotsUnfilledCount[s]<3)||"hidden"===e||!(d.height>=1)||!(d.top>=0&&window.innerHeight-d.top>d.height*r||d.top<0&&Math.abs(d.top)<d.height*r))&&0!=r||(window.odT.log("Refresh slot => "+(t.getTime()-window.odT.adSlotsLoadTime[s])),window.odT.adSlotsLoadTime[s]=t.getTime(),o.push(i[n]),window.odT.loadByGroup(o,!1))}}else!window.odT.tagMode&&7===window.odT?.finalAdSlotsConfig?.adSlotsDefinitions?.[i[n]].loadType&&l>0&&t.getTime()-window.odT?.adSlotsLoadTime?.[window.odT?.gptAdSlots?.[i[n]]?.getSlotElementId()]>=l&&(!window.odT.adSlotsUnfilledCount[window.odT?.gptAdSlots?.[i[n]]?.getSlotElementId()]||window.odT.adSlotsUnfilledCount[window.odT?.gptAdSlots?.[i[n]]?.getSlotElementId()]<3)&&(window.odT.log("Refresh slot => "+(t.getTime()-window.odT?.adSlotsLoadTime?.[window.odT?.gptAdSlots?.[i[n]]?.getSlotElementId()])),window.odT.adSlotsLoadTime[window.odT?.gptAdSlots?.[i[n]]?.getSlotElementId()]=t.getTime(),o.push(i[n]));if(window.odT.adSlotsLoadCount[s]>=1&&window.odT.adSlotsLoadCount[s]<r&&t.getTime()-window.odT.adSlotsLoadTime[s]>=l-5e3){let t=.5;e&&e.adSlots&&e.adSlots[d]&&e.adSlots[d].hasOwnProperty("view")&&"number"==typeof e.adSlots[d].view&&(t=e.adSlots[d].view);const i=document.getElementById(s);if(null!=i){const e=i.getBoundingClientRect();(e.height>=1&&(e.top>=0&&window.innerHeight-e.top>e.height*t||e.top<0&&Math.abs(e.top)<e.height*t)||0==t)&&(window.odT.setup[`fullPackage${window.odT.screen}`]||window.odT.loadCore())}}}o.length>0&&window.odT.refreshAdSlots(o,"auto")}),t),this.log("Monitor automatic refresh is starting")}monitorLazyLoadAdSlots(e=!1){if(e&&!window?.odT?.monitorLazyLoadCalled&&(window.odT.dynamicAdslotsCalled=!0),e||(window.odT.monitorLazyLoadCalled=!0),!window?.odT?.monitorLazyLoadCalled)return;const t=(e,t)=>new IntersectionObserver(((e,i)=>{const o=[];e.forEach((e=>{if(e.isIntersecting){const n=window.odT.finalAdSlotsConfig?.adSlotsDefinitions?.[t]?.divId,d=n?document.getElementById(n):null;let s=!1;window.odT.rewardedAdReady&&window.odT?.setup?.adSlotsConfig?.rewardedAdConfiguration?.articleContentSelector&&(s=window.odT.isElementUnderBlur(d,document.querySelector(window.odT.setup.adSlotsConfig.rewardedAdConfiguration.articleContentSelector))),!window.odT.rewardedAdReady||window.odT.rewardedAdReady&&!s?o.push(t):window.odT.lazyLoadPendingAdSlotsWithRewarded.push(t),window.odT.lazyLoadPendingAdSlots=window.odT.lazyLoadPendingAdSlots.filter((e=>e!==t)),i.unobserve(e.target)}})),o.length>0&&(window.odT.loadByGroup(o),window.odT.refreshAdSlots(o,"lazy"))}),{root:null,rootMargin:e,threshold:0});let i=null;const o=new Map,n=e=>{const n=window.odT.finalAdSlotsConfig?.adSlotsDefinitions?.[e]?.divId;if(!n)return;if(o.has(n))return;let d="0px";const s=window.odT.finalAdSlotsConfig?.adSlotsDefinitions?.[e];s?.lazyLoadPx&&(d=`${s.lazyLoadPxWithCore?Math.max(s.lazyLoadPxWithCore,s.lazyLoadPx):s.lazyLoadPx}px`),o.set(n,{lazyLoadObserver:null,adSlotId:e,rootMargin:d}),i||(i=new MutationObserver((e=>{if(0===o.size)return;const i=new Set(o.keys());e.forEach((e=>{"childList"===e.type&&e.addedNodes.forEach((e=>{if(e.nodeType===Node.ELEMENT_NODE&&e.id&&i.has(e.id)){const i=o.get(e.id);if(!i)return;i.lazyLoadObserver||(i.lazyLoadObserver=t(i.rootMargin||"0px",i.adSlotId)),i.lazyLoadObserver.observe(e)}}))}))})),i.observe(document.body,{childList:!0,subtree:!0}));const a=document.getElementById(n);if(!a)return;const r=o.get(n);r&&(r.lazyLoadObserver||(r.lazyLoadObserver=t(d,e)),r.lazyLoadObserver.observe(a))};e?n(e):this.lazyLoadPendingAdSlots.forEach((e=>{n(e)})),this.log("Monitor lazy load is starting")}loadCoreConfig(){!function(){var e=document.createElement("link");e.rel="preload",e.as="script",e.href=`https://scripts.opti-digital.com/tags/?lib=corev2_c&site=${window.odT.siteCode}${"test"===window.odT.testGroup?"&test=true":""}`;var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t);var i=document.createElement("script");i.async=!0,i.type="text/javascript",i.src=e.href,i.onload=function(){"object"==typeof window.odTC&&window.odTC.start()},e.after(i)}()}loadCore(){!window.odT.loadOTExecuted&&!window.odT.userAction.length||!0===window.odT.loadOTExecuted&&window.odT.userAction.length||!0===window.odT.loadOTExecuted&&!window.odT.userAction.length||(window.odT.setup[`fullPackage${window.odT.screen}`]||window.odT.loadCoreConfig(),window.odT.loadCoreLib())}async loadCoreLib(){if(window.odT.loadOTExecuted=!0,-1==window.location.search.indexOf("optidigital_loads=0"))if(window.odT.setup[`fullPackage${window.odT.screen}`])"object"==typeof optidigitalSetupCore&&"object"==typeof window.odTC&&window.odTC.start();else{let e=`https://scripts.opti-digital.com/lib/?lib=corev2&site=${window.odT.siteCode}&v=${odTLibs.odcore}`;const{default:t}=await import(e);new t}}initAdserver(e,t,i){const o=(e,t,i)=>{if(window.odpbjs.initAdserverSet)return;window.odpbjs.initAdserverSet=!0;const o=[];if(!i&&window.odT.firstLoadAdSlots.length>0)for(const e of window.odT.firstLoadAdSlots)if(window.odT.isGPTdisabledForSlot(e)){const t=window.odT.finalAdSlotsConfig?.adSlotsDefinitions?.[e]?.divId;if(t){window.odT.log(`First Chance: ${e} UNFILLED (GPT disabled)`),window.odT.callEventCallback("ADSLOT_UNFILLED",{adslot:{divId:t,name:e}}),window.odT.updateAdSlotLoad(t);const i=window.googletag&&"function"==typeof window.googletag.pubads?window.googletag.pubads().getSlots().find((e=>e.getSlotElementId()===t)):null,{amznbid:o,od_pfg:n,od_pf_group:d,od_pf_pb:s}=window.odT.checkSlotTargeting(i),a=window.odT.addBidderMetrics(t,null,null,o);let r={divId:e,divIdFull:t,filled:!1,demandType:"unfilled",lineItemId:null,prebidWinner:null,amazonStatus:o,oyStatus:n,oyTestGroup:d,oyPb:s,prebidBid:null,nogam:!0,bidders:Object.keys(a).length?a:null};window.odT.adRequestEvent(r,!0)}}else o.push(e);window.googletag.cmd.push((function(){window.odT.log(`Init ads server from ${t}, CMP consent status: ${window.odT.consentStatus}`),void 0===window.googletag.pubadsReady?setTimeout((function(){window.googletag.cmd.push((function(){i?window.googletag.pubads().refresh(window.odT.getGPTSlots(i)):o.length>0&&window.googletag.pubads().refresh(window.odT.getGPTSlots(o))}))}),10):i?window.googletag.pubads().refresh(window.odT.getGPTSlots(i)):o.length>0&&window.googletag.pubads().refresh(window.odT.getGPTSlots(o))}))};if(!window.odT.enableAmazonAPS||window.odT.amazonBidsReady)o(0,t,i);else{const e=(window.odT.setup.biddersSetup.amazon.timeout||1e3)-(Date.now()-window.odT.initAPS);let n=0;if(e>0){let d=setInterval((()=>{window.odT.amazonBidsReady||n>=e?(clearInterval(d),o(0,t,i)):n+=20}),20)}else o(0,t,i)}}setCookie(e,t,i,o){let n=new Date;n.setTime(n.getTime()+1e3*i);let d="expires="+n.toUTCString();document.cookie=o?e+"="+t+";"+d+";domain="+o+";path=/;sameSite=Lax":e+"="+t+";"+d+";path=/"}getCookie(e){let t=e+"=",i=document.cookie.split(";");for(let e=0;e<i.length;e++){let o=i[e];for(;" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""}registerAdslotLoad(e,t,i,o){let n=(new Date).getTime(),d=0,s=!1;const{hb_bidder:a,hb_pb:r,amznbid:l,od_pfg:c,od_pf_group:u,od_pf_pb:p,hb_format:w}=window.odT.checkSlotTargeting(i.slot);let g="gam_direct";if(null!=i.yieldGroupIds&&(g="gam_adx"),null!=i.advertiserId&&window.odT.setup.hasOwnProperty("advertisers")?(window.odT.setup.advertisers.hasOwnProperty("adx")?-1!=window.odT.setup.advertisers.adx.indexOf(i.advertiserId)&&(g=i.lineItemId?"gam_direct":"gam_adx"):g=i.lineItemId?"gam_direct":"gam_adx",window.odT.setup.advertisers.hasOwnProperty("house")&&-1!=window.odT.setup.advertisers.house.indexOf(i.advertiserId)&&(g="gam_house"),window.odT.setup.advertisers.hasOwnProperty("amazon")&&-1!=window.odT.setup.advertisers.amazon.indexOf(i.advertiserId)&&(g="amazon"),window.odT.setup.advertisers.hasOwnProperty("prebid")&&-1!=window.odT.setup.advertisers.prebid.indexOf(i.advertiserId)&&(g="prebid",s=!0)):g=i.lineItemId?"gam_direct":"gam_adx",t?d++:g="unfilled",window.odT.adSlotsLoadStatus.hasOwnProperty(e)?("prebid"!==g||"prebid"===g&&!window.odT.loadCoreFinished)&&(window.odT.adSlotsLoadStatus[e].time=n,window.odT.adSlotsLoadStatus[e].c++,window.odT.adSlotsLoadStatus[e].f1+=d,window.odT.adSlotsLoadStatus[e].s.push("prebid"===g?`${g}_${a}`:g)):("prebid"!==g||"prebid"===g&&!window.odT.loadCoreFinished)&&(window.odT.adSlotsLoadStatus[e]={time:n,c:1,f1:d,s:["prebid"===g?`${g}_${a}`:g]}),"gam_direct"===g){if(window.odT.adSlotsLoadStatus[e].delay=!1,window.odT.setup.directDemandRefreshDelay&&(window.odT.adSlotsLoadStatus[e].delay=window.odT.setup.directDemandRefreshDelay),window.odT.setup.directDemandCustomRefresh){const t=((e=null,t=null)=>{const i=window.odT.setup.directDemandCustomRefresh.find((e=>t&&e.lineItems&&e.lineItems.includes(t)));if(i)return i.delay;const o=window.odT.setup.directDemandCustomRefresh.find((t=>e&&t.advertisers&&t.advertisers.includes(e)));return o?o.delay:null})(i.advertiserId,i.lineItemId);t&&(window.odT.adSlotsLoadStatus[e].delay=t)}}else("prebid"!==g||"prebid"===g&&!window.odT.loadCoreFinished)&&(window.odT.adSlotsLoadStatus[e].delay=!1);if("gam_direct"===g){let e=!1;(()=>(e=window.odT.setup.anchorModeDirectDemand||window.odT.setup?.anchorModeAdvertisers?.includes(i.advertiserId)||window.odT.setup?.anchorModeLineItems?.includes(i.lineItemId),e))(),!e||window.odT.stickyFormatLoaded.length&&window.odT.stickyFormatLoaded.includes(o)||null===i.size||1===i.size[0]||1800===i.size[0]||1e3===i.size[1]||!window.odT.stickyFormatClosed||window.odT.setStickyFormat(o,i.size?.[0],window.odT.setup.stickyFormatTimeout?window.odT.setup.stickyFormatTimeout:4e3)}let f="null";null!=i.size&&(f=window.odT.formatSizeArrayToString(i.size));const h=window.odT.addBidderMetrics(e,a,r,l),m={divId:o,divIdFull:e,filled:t,demandType:g,lineItemId:i.lineItemId,size:f,prebidWinner:a,prebidBid:r,amazonStatus:l,oyStatus:c,oyTestGroup:u,oyPb:p,nogam:!1,bidders:Object.keys(h).length?h:null,...s&&{format:w}};"unfilled"===g||window.odT.replaceHouseCampaigns(o,i?.advertiserId)||window.odT.adRequestEvent(m),"unfilled"!==g||window.odT.isBackfillEnabled(o)||window.odT.isSecondChanceEnabled(o,e)||window.odT.adRequestEvent(m)}handleUnfilledSlot(e,t,i,o){window.odT.log(`First Chance: ${e} UNFILLED ${i}`);const n=window.odT.stickyAdapter.getStickyAdSlotNameFromDivId(t);if(n){const e=window.odT.stickyAdapter.getStickyAdContainerId(n),i=document.getElementById(e);if(i){const e=n.replace(/[^a-zA-Z0-9]/g,"_");i.classList.remove("opd_adsticky-scroll_"+e)}if(t==window.odT.stickyAdDivId){const e=document.getElementById("opd_bottomstickyad");e&&e.classList.remove("opd_adsticky-scroll")}}window.odT.loadChildrenIfEmpty&&window.odT.loadChildrenIfEmpty.hasOwnProperty(t)&&window.odT.refreshAdSlots(window.odT.loadChildrenIfEmpty[t],"parent"),window.odT.isBackfillEnabled(e)?window.odT.callPrebidAdapter("backfill",t,e):window.odT.isSecondChanceEnabled(e,t)?"undefined"!=typeof optidigitalAdsrv?window.odT.runSecondChance(e,t,o):(window.odT.secondChancePending.push({adslotKV:e,divId:t,event:o}),window.odT.loadOdas(window.odT.runSecondChance,window.odT.secondChancePending)):window.odT.callEventCallback("ADSLOT_UNFILLED",{adslot:{divId:t,name:e}}),window.odT.updateAdSlotLoad(t);let d={slot:o};window.odT.registerAdslotLoad(t,!1,d,e)}getSlotNameFromEntry(e){return"string"==typeof e?e:e?.adUnitCode||e?.placementId||e}buildOptiyieldDebugFromGptSlot(e){let t="OY_PF:";try{e&&1==e.getTargeting("od_pf_pb").length?t+=e.getTargeting("od_pf_pb")[0]:t+="na"}catch(e){t+="na"}return t}handleUnfilledSlotEntry(e){const t=e.getSlotElementId(),i=this.buildOptiyieldDebugFromGptSlot(e);let o="";if(1==e.getTargeting(window.odT.setup?.adSlotsConfig?.adManagerKeyName?window.odT.setup.adSlotsConfig.adManagerKeyName:window.odT.setup?.customTargeting?.adslot?.name?window.odT.setup.customTargeting.adslot.name:"adslot").length){let t=e.getTargeting(window.odT.setup?.adSlotsConfig?.adManagerKeyName?window.odT.setup.adSlotsConfig.adManagerKeyName:window.odT.setup?.customTargeting?.adslot?.name?window.odT.setup.customTargeting.adslot.name:"adslot")[0];o=Object.values(window.odT.finalAdSlotsConfig.adSlotsDefinitions).find((e=>e&&e.cdValue===t||e.adUnit===t))&&Object.values(window.odT.finalAdSlotsConfig.adSlotsDefinitions).find((e=>e&&e.cdValue===t||e.adUnit===t)).name}this.handleUnfilledSlot(o,t,i,e)}eventSlotRendered(e){window.odT.analytics.handleFirstAdPerformanceTracking("through GAM");const t=e.slot.getSlotElementId();let i="";if(1==e.slot.getTargeting(window.odT.setup?.adSlotsConfig?.adManagerKeyName?window.odT.setup.adSlotsConfig.adManagerKeyName:window.odT.setup?.customTargeting?.adslot?.name?window.odT.setup.customTargeting.adslot.name:"adslot").length){let t=e.slot.getTargeting(window.odT.setup?.adSlotsConfig?.adManagerKeyName?window.odT.setup.adSlotsConfig.adManagerKeyName:window.odT.setup?.customTargeting?.adslot?.name?window.odT.setup.customTargeting.adslot.name:"adslot")[0];i=Object.values(window.odT.finalAdSlotsConfig.adSlotsDefinitions).find((e=>e&&e.cdValue===t||e.adUnit===t))&&Object.values(window.odT.finalAdSlotsConfig.adSlotsDefinitions).find((e=>e&&e.cdValue===t||e.adUnit===t)).name}if(!window.odT.finalAdSlotsConfig.adSlotsDefinitions[i])return;let o="OY_PF:";1==e.slot.getTargeting("od_pf_pb").length?o+=e.slot.getTargeting("od_pf_pb")[0]:o+="na";window.odT.stickyAdapter.getStickyAdSlotNameFromDivId(t)&&document.getElementById(t)&&(document.getElementById(t).style.height="auto");let n=`${window.odT.screen}_Sticky_Bottom`;const d=window.odT.setup?.adSlotsConfig?.stickyAdConfiguration||window.odT.setup?.stickyAdConfiguration;if(d&&"object"==typeof d){const e=Object.keys(d);if(e.some((e=>e.includes(`${window.odT.screen}_Sticky_`)))){const t=e.filter((e=>e.includes(`${window.odT.screen}_Sticky_`)));t.length>0&&(n=t[0])}else d[`name${window.odT.screen}`]&&(n=d[`name${window.odT.screen}`])}if(t===window.odT.stickyAdDivId&&document.getElementById(`${window.odT.divIdPrefix}${n}`)&&(document.getElementById(`${window.odT.divIdPrefix}${n}`).style.height="auto"),e.isEmpty)window.odT.handleUnfilledSlot(i,t,o,e.slot);else{let n="null";if(null!=e.size&&(n=window.odT.formatSizeArrayToString(e.size)),window.odT.log(`First Chance: ${i} FILLED (${n}) ${o} `),8===window.odT.finalAdSlotsConfig?.adSlotsDefinitions?.[i]?.loadType){window.odT.handleRewardedAdsCropping();const e=window.odT.setup?.adSlotsConfig?.rewardedAdConfiguration?.timeout||5e3,t=performance.now(),i=()=>{if(window.odT?.rewardedAdsReady)return;performance.now()-t>=e?window.odT.handleRewardedAdsUncropping():requestAnimationFrame(i)};requestAnimationFrame(i)}window.odT.adSlotsLoadCount.hasOwnProperty(t)||window.odT.stickyFormatLoaded.length&&window.odT.stickyFormatLoaded.includes(i)||!window.odT.finalAdSlotsConfig.adSlotsDefinitions.hasOwnProperty(i)||!window.odT.finalAdSlotsConfig.adSlotsDefinitions[i].hasOwnProperty("anchor")||!window.odT.finalAdSlotsConfig.adSlotsDefinitions[i].anchor||null===e.size||1===e.size[0]||1800===e.size[0]||1e3===e.size[1]||!window.odT.stickyFormatClosed||window.odT.setStickyFormat(i,e.size[0],window.odT.setup.stickyFormatTimeout?window.odT.setup.stickyFormatTimeout:4e3),window.odT.callEventCallback("ADSLOT_FILLED",{adslot:{divId:t,size:n,name:i,gptEvent:e}}),window.odT.loadChildrenIfFilled&&window.odT.loadChildrenIfFilled.hasOwnProperty(t)&&window.odT.refreshAdSlots(window.odT.loadChildrenIfFilled[t],"parent");const d=window.odT.stickyAdapter.getStickyAdSlotNameFromDivId(t);if(d){const e=window.odT.stickyAdapter.getStickyAdContainerId(d),i=`opd_adsticky-scroll_${d.replace(/[^a-zA-Z0-9]/g,"_")}`,o=document.getElementById(e);if(o&&o.classList.add(i),window.odT.stickyAdapter.setStickyAdStatus(d,"rendered"),t==window.odT.stickyAdDivId){window.odT.stickyAdStatus="rendered";const e=document.getElementById("opd_bottomstickyad");e&&e.classList.add("opd_adsticky-scroll")}if(1==window.odT.stickyFrequency){let e=window.odT.getCookie(window.odT.stickyCookie);e.length>0?e++:e=1,window.odT.setCookie(window.odT.stickyCookie,e,window.odT.stickyFrequencyInterval)}}window.odT.replaceHouseCampaigns(i,e?.advertiserId)&&window.odT.callPrebidAdapter("backfill",t,i),window.odT.updateAdSlotLoad(t),window.odT.registerAdslotLoad(t,!0,e,i)}}updateAdSlotLoad(e){let t=new Date;window.odT.adSlotsLoadTime[e]=t.getTime(),window.odT.adSlotsLoadCount.hasOwnProperty(e)?window.odT.adSlotsLoadCount[e]++:window.odT.adSlotsLoadCount[e]=1}replaceHouseCampaigns(e,t){return!!this.isBackfillEnabled(e)&&(!(!Array.isArray(this.setup?.advertisers?.house_backfill)||!this.setup?.advertisers?.house_backfill?.includes(t))||!!(this.setup.backfillReplaceHouse&&Array.isArray(this.setup?.advertisers?.house)&&this.setup?.advertisers?.house?.includes(t)&&!Array.isArray(this.setup?.advertisers?.house_backfill)||0===this.setup?.advertisers?.house_backfill?.length))}callPrebidAdapter(e,t,i,o){window.odT.log("Build Engage payload - "+e);let n="backfill"===e,d="refresh"===e;const s=e=>{let t=[];for(let i=0;i<e.length;i++)if(2===e[i].length){let o=window.odT.formatSizeArrayToString(e[i]);t.push(o)}return t},a=function(){let e=0;return function(){return e++,e}}(),r=()=>a()+Math.random().toString(16).substr(2),l={ko:"1",li:"2",ok:"3",timeout_callback:"3",timeout_tcfapi:"3"};let c=[];const u=e=>{let i={},o=t||(window.odT.mappedSite?window.odT.finalAdSlotsConfig.adSlotsDefinitions[e].divId:window.odT.divIdPrefix+e);if(i={sizes:s(window.odT.getPrebidAdUnitsSizes(window?.odT?.finalAdSlotsConfig?.adSlotsDefinitions?.[e]?.dfpSizes||[])),bidId:r(),adUnitCode:o,placementId:n&&window.odT.finalAdSlotsConfig.adSlotsDefinitions[e]?.cdValue?window.odT.finalAdSlotsConfig.adSlotsDefinitions[e].cdValue:window.odT.finalAdSlotsConfig.adSlotsDefinitions[e].adUnit},document.getElementById(`${o}`)&&(i.adContainerWidth=document.getElementById(`${o}`).offsetWidth,i.adContainerHeight=document.getElementById(`${o}`).offsetHeight),window.odT.initConfig&&window.odT.initConfig.adUnit&&window.odT.finalAdSlotsConfig.adSlotsDefinitions[e]&&window.odT.finalAdSlotsConfig.adSlotsDefinitions[e].adUnit&&window.odT.enableGpid){let t=`${window.odT.initConfig.adUnit}/${window.odT.finalAdSlotsConfig.adSlotsDefinitions[e].adUnit}`;i.gpid=t}if(!n&&window.odT.setup?.s2sConfig){const e=((e,t)=>{let i={};return Object.entries(e).forEach((([o,n])=>{const d=n.adSlots?.[t];if(d){const d=n?.countries,s=n?.browsers,a=n?.devices;if((!d||d.includes(window.optidigitalToolboxCC))&&(!s||s.includes(window.odT.checkBrowser.toLowerCase()))&&(!a||a.includes(window.odT.deviceCategory.toLowerCase()))){let d;switch(o){case"outbrain":let i;n.adSlots[t].hasOwnProperty("publisherId")&&(i={publisher:{id:n.adSlots[t].publisherId}},i.publisher.name=window.location.host.replace("www.",""),i.publisher.domain=window.location.host,i.tagid=t,d=i);break;case"optidigital":try{let i;if(!n.adSlots[t].hasOwnProperty("status")||"1"!=n.adSlots[t].status||1!==e?.optidigitalAdSlots)return d;i={},i.publisherId="direct"===window.odT.setup?.schain?`p${window.odT.setup.info.publisherId.toString()}`:`s${window.odT.setup.info.siteId.toString()}`,i.placementId=window.odT.finalAdSlotsConfig.adSlotsDefinitions[t].adUnit,i.divId=""!==window.odT.divIdPrefix?window.odT.divIdPrefix+t:window.odT.finalAdSlotsConfig.adSlotsDefinitions[t].divId,i.pageTemplate=window.odT.initConfig.adUnit,odT.setup.hasOwnProperty("bapp")&&Array.isArray(odT.setup.bapp)&&(i.bapp=window.odT.setup.bapp),d=i}catch(e){}break;default:n.adSlots[t]}i[o]=d||n.adSlots[t]}}})),0!==Object.keys(i).length&&i})(window.odT.setup.s2sConfig,i.placementId);e&&(i.s2sConfig=e)}return i};if(n||d)if(!n&&d)o&&o.forEach((e=>{let t=window.odT.finalAdSlotsConfig?.adSlotsDefinitions?.[e]?.loadType;if(this.adAdaptersFactory.isSpecialAdSlot(e)||t&&6===t||t&&7===t||t&&8===t)return;const i=window.odT.finalAdSlotsConfig?.adSlotsDefinitions?.[e]?.dfpSizes;if(i&&i.length){if(!window.odT.getPrebidAdUnitsSizes(window.odT.finalAdSlotsConfig.adSlotsDefinitions[e].dfpSizes).length)return}let o=u(e);o?.sizes?.length?c.push(o):window.odT.runGPTAuction("EngageNoBidRefresh",[e])}));else{let e=u(i);if(!e?.sizes?.length)return;c.push(e)}else{if(window.odT.callOy(),!window.odT.firstLoadAdSlots.length)return void window.odT.runGPTAuction("EngageNoDirectSlot");if(window.odT.firstLoadAdSlots.forEach((e=>{let t=window.odT.finalAdSlotsConfig?.adSlotsDefinitions?.[e]?.loadType;if(this.adAdaptersFactory.isSpecialAdSlot(e)||t&&6===t||t&&7===t||t&&8===t)return;const i=window.odT.finalAdSlotsConfig?.adSlotsDefinitions?.[e]?.dfpSizes;if(i&&i.length){if(!window.odT.getPrebidAdUnitsSizes(window.odT.finalAdSlotsConfig.adSlotsDefinitions[e].dfpSizes).length)return}let o=u(e);if(!o?.sizes?.length)return window.odT.firstLoadAdSlots=window.odT.firstLoadAdSlots.filter((t=>t!==e)),void window.odT.runGPTAuction("EngageNoBidRefresh",[e]);c.push(o)})),!c.length)return void window.odT.runGPTAuction("EngageNotEligible")}const p={referrer:window.location.href,pageTemplate:window.odT.initConfig.adUnit,hb_version:"optidigital/3.0.0",deviceWidth:document.documentElement.clientWidth,bidderRequestId:r(),publisherId:"direct"===window.odT.setup?.schain?`p${window.odT.setup.info.publisherId.toString()}`:`s${window.odT.setup.info.siteId.toString()}`,imp:c,badv:[],bcat:[],bapp:[]};if(window.odT.setup.schain&&"direct"===window.odT.setup.schain||(p.schain={complete:1,nodes:[{asi:"optidigital.com",hp:1,sid:window.odT?.setup?.info?.sellerId?window.odT.setup.info.sellerId.toString():window.odT.odNetworkId?`p${window.odT.setup.info.publisherId.toString()}`:window.odT.setup.info.siteId.toString()}],ver:"1.0"}),p.device={w:window.screen.width,h:window.screen.height,dnt:navigator.doNotTrack?1:0,ua:navigator.userAgent,language:navigator.language,ext:{vpw:window.innerWidth,vph:window.innerHeight}},navigator?.userAgentData?.brands?.length&&(p.device.sua={source:navigator.userAgentData?1:0,platform:{brand:navigator.userAgentData.platform},browsers:navigator.userAgentData.brands.map((e=>({brand:e.brand,version:[e.version]}))),mobile:navigator.userAgentData.mobile?1:0}),n){const e=window.googletag&&"function"==typeof window.googletag.pubads?window.googletag.pubads().getSlots().find((e=>e.getSlotElementId()===window.odT.finalAdSlotsConfig.adSlotsDefinitions?.[i]?.divId)):null,{od_pf_group:o,od_pf_ta:n}=window.odT.checkSlotTargeting(e);p.subids={},window.odT.testGroup&&"test"===window.odT.testGroup&&(p.subids.sub1="test"),window.odT.adSlotsLoadCount.hasOwnProperty(t)&&window.odT.adSlotsLoadCount[t]>0&&(p.subids.sub2="yes"),window.odT.consentType&&l[window.odT.consentType]&&(p.subids.sub3=l[window.odT.consentType]),o&&(p.subids.sub4="test"),p.subids.sub5=window.odT.customDNR?"1":"0",p.subids.sub6=window.odT.finalAdSlotsConfig.adSlotsDefinitions?.[i].cdValue?window.odT.finalAdSlotsConfig.adSlotsDefinitions[i].cdValue:i,n&&(p.subids.sub7=n)}p.gdpr={consent:window.odT.consentV2TCData&&window.odT.consentV2TCData.tcString?window.odT.consentV2TCData.tcString:"",required:!!window.optidigitalToolboxGdpr},window.odT?.consentV2TCData?.addtlConsent&&(p.gdpr.addtlConsent=window.odT.consentV2TCData.addtlConsent),-1!==window.location.href.indexOf("optidigitalTestMode=true")&&(p.testMode=!0),this.setup.hasOwnProperty("bcat")&&Array.isArray(this.setup.bcat)&&(p.bcat=[...this.setup.bcat]),this.setup.hasOwnProperty("badv")&&Array.isArray(this.setup.badv)&&(p.badv=[...this.setup.badv]),this.setup.hasOwnProperty("bapp")&&Array.isArray(this.setup.bapp)&&(p.bapp=[...this.setup.bapp]);let w=document.querySelector('meta[name="keywords"]'),g=w?.content?.trim().replace(/\s+/g,"");g&&(p.site=p.site||{},p.site.keywords=g);const f={eids:[]};let h={criteoId:{source:"criteo.com",uids:[{id:"",atype:1}]},sharedId:{source:"pubcid.org",uids:[{atype:1}]},id5Id:{source:"id5-sync.com",uids:[{id:"",atype:1,ext:""}]},liverampId:{source:"liveramp.com",uids:[{id:"",atype:3}]},pairId:{source:"google.com",uids:[]}};window.odT.setup?.userids&&Object.keys(window.odT.setup.userids).length&&(h=((e,t)=>Object.keys(e).reduce(((i,o)=>1===t[o]?.status?{...i,[o]:e[o]}:i),{}))(h,window.odT.setup.userids));try{let e={adUnits:[]};for(let t in window.odT.finalAdSlotsConfig.adSlotsDefinitions){const i=window.odT.finalAdSlotsConfig.adSlotsDefinitions[t].dfpSizes.filter((e=>Array.isArray(e)&&2===e.length&&"number"==typeof e[0]&&"number"==typeof e[1]));if(i.length>0){let o={code:window.odT.finalAdSlotsConfig.adSlotsDefinitions[t].divId,mediaTypes:{banner:{sizes:i}},bids:[]};e.adUnits.push(o)}}if(this.iasModule&&this.iasId&&!n&&!Object.keys(window.odT.adSlotsLoadCount).length&&!window.odT.iasModuleCalled){this.iasModuleCalled=!0;let t={name:"ias",waitForIt:!1,params:{pubId:this.iasId}};this.log("IAS Initialization"),this.iasModule.init(t),e=e||window.odpbjs.adUnits,this.iasModule.getBidRequestData(e,(()=>{this.iasModule.getTargetingData(e.adUnits.map((e=>(window.odT.iasReady=!0,e.code))))}),t)}}catch(e){e instanceof Error||(e=new Error(e)),this.log("IAS Module failed")}if(this.setUserId(!0,h,f),f.eids.length&&(p.user=f),!n&&window.odT.setup?.s2sConfig){const e=Object.entries(window.odT.setup.s2sConfig).reduce(((e,[t,i])=>{if("aliasBidders"===t)Object.entries(i).forEach((([t,i])=>{e[t]={aliases:i}}));else{if("optidigitalAdSlots"===t&&1===i)return p.optidigitalAdSlots=i,e;if("directBidders"!==t&&(!i.countries||i.countries.includes(window.optidigitalToolboxCC))&&(!i.browsers||i.browsers.includes(window.odT.checkBrowser.toLowerCase()))&&(!i.devices||i.devices.includes(window.odT.deviceCategory.toLowerCase()))){if("optidigital"===t&&1!==p?.optidigitalAdSlots)return e;e[t]={discount:i.discount,...e[t]||{}},(window.odT.setup.s2sConfig?.directBidders&&window.odT.setup.s2sConfig.directBidders.includes(t)||window.odT.setup?.directBidders?.length&&window.odT.setup.directBidders.includes(t))&&(e[t].direct=!0)}}return e}),{});Object.keys(e).length&&p.imp&&Object.values(p.imp)?.some((e=>e.hasOwnProperty("s2sConfig")))&&(p.s2sConfig=e)}function m(){if(window.odT.id5Obj&&!p?.user?.eids.some((e=>Object.values(e).includes("id5-sync.com")))&&h?.id5Id&&(h.id5Id.uids[0].id=window.odT.id5Obj.universal_uid,h.id5Id.uids[0].ext=window.odT.id5Obj.ext,f.eids.push(h.id5Id)),window.odT.liveRampObj&&!p?.user?.eids.some((e=>Object.values(e).includes("liveramp.com")))&&h?.liverampId&&(h.liverampId.uids[0].id=window.odT.getCookie("_lr_env"),f.eids.push(h.liverampId)),window.odT.pairIdObj&&window.odT.getCookie("_lr_pairId")&&!p?.user?.eids.some((e=>Object.values(e).includes("google.com")))&&h?.pairId){let e=JSON.parse(atob(decodeURIComponent(window.odT.getCookie("_lr_pairId"))))&&JSON.parse(atob(decodeURIComponent(window.odT.getCookie("_lr_pairId")))).envelope;e&&e.length&&(e.forEach((e=>{h.pairId.uids.push({id:e,atype:571187})})),f.eids.push(h.pairId))}f.eids.length&&!p.user&&(p.user={}),f.eids.length&&!p.user.eids&&(p.user.eids=f.eids),!n&&window.optiyield._ready&&window.odT.firstLoadAdSlots.forEach((e=>{let t={adUnitPath:`${window.odT.initConfig.adUnit}${window.odT.finalAdSlotsConfig.adSlotsDefinitions?.[e].customAdUnitCode?"/"+window.odT.finalAdSlotsConfig.adSlotsDefinitions[e].customAdUnitCode:""}`,customDimensions:{cd1:window.odT.finalAdSlotsConfig.adSlotsDefinitions?.[e].cdValue?window.odT.finalAdSlotsConfig.adSlotsDefinitions[e].cdValue:e}};window.optiyield.cmd.push((function(){let i=window.optiyield.getFloors(t,"prebid");i&&1===i.pfStatus&&p.imp.forEach(((t,o)=>{if(t.placementId===e&&i.pf.prebid){const e=(e,t)=>Math.ceil((parseFloat(e)*Math.pow(10,t)).toFixed(1))/Math.pow(10,t),t=(e,t)=>{const i=Math.pow(10,10);return e*i/(t*i)*(e*i)/i},n=((i,o=.99)=>{if(i>0){let n=t(i,i*o);return e(n,4)}})(window.odT.convertToCurrency(Number(i.pf.prebid),"USD"));isNaN(n)||(p.imp[o].bidFloor=n)}}))}))}))}let y=window.odT.setup.processTimeout?window.odT.setup.processTimeout:300,T=0;if(window.odT.checkServicesReady())window.odT.log("Services are ready without wait"),m(),this.sendEngageRequest("PresyncReady",p,n,d,o);else{let e=setInterval((()=>{window.odT.checkServicesReady()?(window.odT.log("Services are ready after some time"),clearInterval(e),m(),window.odT.sendEngageRequest("PresyncReady",p,n,d,o)):T>=y?(clearInterval(e),window.odT.log("Some services might be skipped due to timeout"),m(),window.odT.sendEngageRequest("PresyncTimeout",p,n,d,o)):T+=20}),20)}if(this.id5Obj){const e=new Date(localStorage.getItem("id5id_last")),t=28800;Date.now()-e.getTime()>1e3*t&&this.setId5Id()}}callPrebidAndAmazon(){window.odT.setUserId();let e=window.odT.setup.processTimeout?window.odT.setup.processTimeout:300,t=0;if(window.odT.checkServicesReady())window.odT.refreshAdSlots(null);else{let i=setInterval((()=>{window.odT.checkServicesReady()?(window.odT.log("User IDs are ready"),clearInterval(i),window.odT.refreshAdSlots(null)):t>=e?(clearInterval(i),window.odT.refreshAdSlots(null)):t+=20}),20)}if(window.odT.id5Obj){const e=new Date(localStorage.getItem("id5id_last")),t=28800;Date.now()-e.getTime()>1e3*t&&window.odT.setId5Id()}}sendEngageRequest(e,t,i=!1,o=!1,n=[]){const d=new PerformanceObserver((e=>{e.getEntries().forEach((e=>{if("xmlhttprequest"===e.initiatorType&&e.name.includes("https://pbs.optidigital.com/bidder")){const i=parseInt(e.duration);t.imp.forEach((e=>{window.odT.auctionMetrics[e.adUnitCode]=i})),d.disconnect()}}))}));if(d.observe({type:"resource",buffered:!0}),i||1!==t?.optidigitalAdSlots||t.s2sConfig){t?.imp&&t.imp.forEach((e=>{window.odT.auctionMetrics.firstCallConfig=window.odT.auctionMetrics.firstCallConfig||{},window.odT.auctionMetrics.firstCallConfig[e.adUnitCode]=Object.keys(e?.s2sConfig||{})})),this.log("Send Engage request - "+e);const n=i?`https://pbs.optidigital.com/bidder/backfill/${t.publisherId}`:`https://pbs.optidigital.com/bidder/${t.publisherId}`,d=(new Date).getTime(),s=new XMLHttpRequest;s.withCredentials=!0,s.open("POST",n,!0),s.timeout=this.setup.timeouts&&this.setup.timeouts.prebidDirect?this.setup.timeouts.prebidDirect:1500,s.onreadystatechange=function(){if(4==this.readyState)if(200==this.status){const e=(new Date).getTime()-d;let n;window.odT.bidTimeStamp=(new Date).getTime();try{n=JSON.parse(this.responseText)}catch(e){}if(n?.analytics?.imps&&t.imp.forEach((e=>{window.odT.auctionMetrics.firstCall=window.odT.auctionMetrics.firstCall||{},window.odT.auctionMetrics.firstCall[e.adUnitCode]=n.analytics.imps?.[e.bidId]||{}})),n&&n.hasOwnProperty("bids")&&n.bids.length>0){if(!i){let i=[];window.odT.bidsFromOe=[],window.odT.setup.minCpm=window.odT.setup.minCpm??1e3,n.bids.forEach((o=>{if(window.odT.log(`Engage bid - response received for ${o.placementId} - $${o.cpm}`),(window.odT.setup.minCpm||0===window.odT.setup.minCpm)&&o.cpm>window.odT.setup.minCpm||window.odT.isGPTdisabledForSlot(o.placementId)){window.odT.log(`Engage bid - for ${o.placementId} - $${o.cpm} rendered directly`),window.odT.renderEngage(o.creativeId,o.adm,[Number(o.w),Number(o.h)],o),window.odT.analytics.handleFirstAdPerformanceTracking("without GAM");const n=window.odT.formatSizeArrayToString([Number(o.w),Number(o.h)]);window.odT.log(`First Chance: ${o.placementId} FILLED (${n})`),window.odT.callEventCallback("ADSLOT_FILLED",{adslot:{divId:o.creativeId,size:n,name:o.placementId}}),i.push(o.placementId),window.odT.updateAdSlotLoad(o.creativeId),t.imp.forEach((t=>{t.placementId===o.placementId&&window.googletag&&window.googletag.cmd.push((function(){const t=window.googletag&&"function"==typeof window.googletag.pubads?window.googletag.pubads().getSlots().find((e=>e.getSlotElementId()===o.creativeId)):null;let i=window.odT.convertBidCpm(o.cpm);const{amznbid:d,od_pfg:s,od_pf_group:a,od_pf_pb:r}=window.odT.checkSlotTargeting(t),l=window.odT.addBidderMetrics(o.creativeId,o.hb_bidder||"optidigital",i,null,e);let c={divId:o.placementId,divIdFull:o.creativeId,filled:!0,demandType:"prebid",lineItemId:null,prebidWinner:o.hb_bidder||"optidigital",amazonStatus:d,oyStatus:s,oyTestGroup:a,oyPb:r,size:`${n}`,prebidBid:i,nogam:!0,bidders:Object.keys(l).length?l:null};window.odT.adRequestEvent(c,!0)}))}))}else{let e={creativeId:o.creativeId,placementId:o.placementId,cpm:o.cpm,bidId:o.bidId,w:o.w,h:o.h,adm:o.adm,ttl:o.ttl,cur:o.cur};o.hb_bidder&&(e.hb_bidder=o.hb_bidder),window.odT.bidsFromOe.push(e)}}));let d=((e,t)=>{const i=new Set(t.map(JSON.stringify));return e.filter((e=>!i.has(JSON.stringify(e))))})(o?t?.imp.map((e=>odT?.gptAdSlots?.[e.placementId]?e.placementId:e.adUnitCode)):window.odT.firstLoadAdSlots,i);return void(d.length&&window.odT.runGPTAuction(""+(o?"EngageNoBidRefresh":"EngageBidsReady"),d,window.odT.bidsFromOe))}n.bids.forEach((e=>{window.odT.renderEngage(e.creativeId,e.adm,[Number(e.w),Number(e.h)],e);const t=window.googletag&&"function"==typeof window.googletag.pubads?window.googletag.pubads().getSlots().find((t=>t.getSlotElementId()===e.creativeId)):null,{amznbid:i,od_pfg:o,od_pf_group:n,od_pf_pb:d}=window.odT.checkSlotTargeting(t);let s=window.odT.convertBidCpm(e.cpm);const a=window.odT.addBidderMetrics(e.creativeId,e.hb_bidder||"optidigital",s,i);let r={divId:e.placementId,divIdFull:e.creativeId,filled:!0,demandType:"backfill",lineItemId:null,prebidWinner:e.hb_bidder||"optidigital",amazonStatus:i,oyStatus:o,oyTestGroup:n,oyPb:d,size:`${e.w}x${e.h}`,prebidBid:s,nogam:!1,bidders:Object.keys(a).length?a:null};window.odT.adRequestEvent(r),window.odT.log(`Second Chance (backfill): ${e.placementId} FILLED`);const l=window.odT.formatSizeArrayToString([Number(e.w),Number(e.h)]);window.odT.callEventCallback("ADSLOT_FILLED",{adslot:{divId:e.creativeId,size:l,name:e.placementId}}),window.odT.adSlotsLoadCount.hasOwnProperty(e.creativeId)&&window.odT.adSlotsLoadCount[e.creativeId]<2&&(!window.odT.stickyFormatLoaded.length||!window.odT.stickyFormatLoaded.includes(e.placementId))&&window.odT.finalAdSlotsConfig.adSlotsDefinitions.hasOwnProperty(e.placementId)&&window.odT.finalAdSlotsConfig.adSlotsDefinitions[e.placementId].hasOwnProperty("anchor")&&window.odT.finalAdSlotsConfig.adSlotsDefinitions[e.placementId].anchor&&1!==Number(e.w)&&1800!==Number(e.w)&&1e3!==Number(e.h)&&window.odT.stickyFormatClosed&&window.odT.setStickyFormat(e.placementId,Number(e.w),window.odT.setup.stickyFormatTimeout?window.odT.setup.stickyFormatTimeout:4e3)}))}else i?window.odT.handleUnfilled(t.imp[0].placementId,t.imp[0].adUnitCode):(window.odT.log("Engage request - no bid in response"),window.odT.runGPTAuction(""+(o?"EngageNoBidRefresh":"EngageNoBid"),o?t.imp:null))}else 0===this.status?i?window.odT.handleUnfilled(t.imp[0].placementId,t.imp[0].adUnitCode):(window.odT.log("Engage request - timeout"),window.odT.runGPTAuction(""+(o?"EngageNoBidRefresh":"EngageTimeout"),o?t.imp:null)):i?window.odT.handleUnfilled(t.imp[0].placementId,t.imp[0].adUnitCode):(window.odT.log("Engage request - no bid"),window.odT.runGPTAuction(""+(o?"EngageNoBidRefresh":"EngageNoBid"),o?t.imp:null))},s.setRequestHeader("Content-type","text/plain"),s.send(JSON.stringify(t))}else{let e=window.odT?.firstLoadAdSlots?.length&&!o?window.odT.firstLoadAdSlots:n,t=o?"EngageNoBidRefresh":"NoEnagageCall";window.odT.runGPTAuction(t,e)}}handleUnfilled(e,t){const i=Object.values(odT.finalAdSlotsConfig.adSlotsDefinitions).find((t=>t.cdValue===e));i&&(e=i.adUnit),window.odT.log(`Second Chance (backfill): ${e} UNFILLED`);const o=window.googletag&&"function"==typeof window.googletag.pubads?window.googletag.pubads().getSlots().find((e=>e.getSlotElementId()===t)):null;if(window.odT.isSecondChanceEnabled(e,t))"undefined"!=typeof optidigitalAdsrv?window.odT.runSecondChance(e,t,o):(window.odT.secondChancePending.push({adslotKV:e,divId:t,event:o}),window.odT.loadOdas(window.odT.runSecondChance,window.odT.secondChancePending));else{window.odT.callEventCallback("ADSLOT_UNFILLED",{adslot:{divId:t,name:e}});const{amznbid:i,od_pfg:n,od_pf_group:d,od_pf_pb:s}=window.odT.checkSlotTargeting(o),a=window.odT.addBidderMetrics(t,null,null,i);let r={divId:e,divIdFull:t,filled:!1,demandType:"unfilled",lineItemId:null,prebidWinner:null,amazonStatus:i,oyStatus:n,oyTestGroup:d,oyPb:s,prebidBid:null,nogam:!1,bidders:Object.keys(a).length?a:null};window.odT.adRequestEvent(r)}}async renderEngage(e,t,o,n){const d=this.stickyAdapter.getStickyAdSlotNameFromDivId(e);if(d){const t=this.stickyAdapter.getStickyAdContainerId(d),i=`opd_adsticky-scroll_${d.replace(/[^a-zA-Z0-9]/g,"_")}`,o=document.getElementById(t);if(o&&(o.classList.add(i),o.style.display="block"),this.stickyAdapter.setStickyAdStatus(d,"rendered"),e==this.stickyAdDivId){this.stickyAdStatus="rendered";const e=document.getElementById("opd_bottomstickyad");e&&e.classList.add("opd_adsticky-scroll")}if(1==this.stickyFrequency){let e=window.odT.getCookie(window.odT.stickyCookie);e.length>0?e++:e=1,window.odT.setCookie(window.odT.stickyCookie,e,window.odT.stickyFrequencyInterval)}}const s={hb_bidder:n.hb_bidder||n.bidder,hb_size:window.odT.formatSizeArrayToString(o)};if(n.hasOwnProperty("hb_deal_appnexus")&&(s.hb_deal_appnexus=n.hb_deal_appnexus),n.hasOwnProperty("hb_deal_xandr")&&(s.hb_deal_xandr=n.hb_deal_xandr),(window.odT.noGamUseSafeframe||this.stickyAdapter.isVerticalStickyAdSlot(d??e))&&window.odT.checkSafeFrameDelivery(e,s)){const{EmbeddedSafeFrame:n}=i(764),d=new n;let s=[{id:e,size:window.odT.formatSizeArrayToString(o),renderHtml:t,renderFile:"https://scripts.opti-digital.com/lib/?site="+window.odT.siteCode+"&lib=safeframe&v=1.1.0"}];document.getElementById(e).style.display="block",await d.init(s)}else{const i=document.getElementById(e);if(null!==i){i.innerHTML="";let n=t,d=document.createElement("div");d.setAttribute("style","border: 0pt none; margin: auto; text-align: center; width: "+o[0]+"px; height: "+o[1]+"px;");var a=document.createElement("iframe");window.odT.tools.setAttributes(a,{id:e+"-iframe-od",width:o[0],height:o[1],scrolling:"no",marginwidth:"0",marginheight:"0",frameborder:"0"}),d.appendChild(a),i.appendChild(d),a.contentWindow.document.open(),a.contentWindow.document.write(n),a.contentWindow.document.close(),i.style.display="block"}}return!0}setUserId(e=!1,t={},i=!1){if(this.consentOK.includes(this.consentStatus)){if(e&&t?.criteoId){const{criteoId:e}=t,o=localStorage.getItem("cto_bidid"),n=91;o&&this.checkVendor(n)&&(e.uids[0].id=o,i.eids.push(e))}const o=this.getCookie("_pbjs_id_optout")||this.getCookie("_pubcid_optout"),n=localStorage.getItem("_pbjs_id_optout")||localStorage.getItem("_pubcid_optout"),d=this.getCookie("_lr_env"),s=this.getCookie("_lr_pairId");if(!o&&!n&&t?.sharedId){const{sharedId:o}=t;let n=this.getCookie("_sharedid");const d=this.getCookie("_sharedid_cst"),{calculatedId:s,finalHashedConsent:a}=this.setShareId();let r=7776e3,l=window.location.host&&window.location.host.indexOf("www.")||window.location.host.replace("www.","");if(n)d&&d!==a&&this.setCookie("_sharedid_cst",a,r,l),e&&(o.uids[0].id=n,i.eids.push(o));else if(s&&a){let t=s;"object"==typeof window.PublisherCommonId&&window.PublisherCommonId.hasOwnProperty("getId")&&"function"==typeof window.PublisherCommonId.getId&&(t=window.PublisherCommonId.getId()),this.setCookie("_sharedid",t,r,l),this.setCookie("_sharedid_cst",a,r,l),e&&(o.uids[0].id=t,i.eids.push(o))}}if(this.checkVendor("131")&&t?.id5Id){const{id5Id:o}=t;if(this.id5Permission=!0,localStorage.getItem("id5id")){if(this.id5Obj=JSON.parse(decodeURIComponent(localStorage.getItem("id5id"))),localStorage.getItem("id5id_1019_nb")){let e=parseInt(localStorage.getItem("id5id_1019_nb"))+1,t=new Date(Date.now()+2592e6).toUTCString();localStorage.setItem("id5id_1019_nb",e),localStorage.setItem("id5id_1019_nb_exp",t)}e&&(o.uids[0].id=this.id5Obj.universal_uid,o.uids[0].ext=this.id5Obj.ext,i.eids.push(o))}else this.setId5Id()}if(t?.liverampId&&d&&(this.setup.liverampId||window.odT.setup?.userids?.liverampId?.params?.pid)&&e){const{liverampId:e}=t;e.uids[0].id=d,i.eids.push(e)}if(s&&(this.setup.liverampId||window.odT.setup?.userids?.liverampId?.params?.pid)&&e&&t?.pairId){const{pairId:e}=t;let o=JSON.parse(atob(decodeURIComponent(window.odT.getCookie("_lr_pairId"))))&&JSON.parse(atob(decodeURIComponent(window.odT.getCookie("_lr_pairId")))).envelope;o&&o.length&&(o.forEach((t=>{e.uids.push({id:t,atype:571187})})),i.eids.push(e))}if(1===window.odT.setup?.userids?.truelinkId?.status){if(window.odT.setup?.userids?.truelinkId?.params?.cookie?window.odT.getCookie(window.odT.setup.userids.truelinkId.params.cookie):window.odT.getCookie("id5-true-link")?window.odT.getCookie("id5-true-link"):null){const e={source:"true-link-id5-sync.com",uids:[{id:window.odT.getCookie("id5-true-link"),atype:1}]};i.eids.push(e)}}}}setShareId(){let e=null;window.odT.consentV2TCData&&window.odT.consentV2TCData.hasOwnProperty("gdprApplies")&&window.odT.consentV2TCData.gdprApplies&&window.odT.consentV2TCData.hasOwnProperty("tcString")&&window.odT.consentV2TCData.tcString&&(e=[window.odT.consentV2TCData.gdprApplies,window.odT.consentV2TCData.tcString]);const t=[JSON.stringify(e),"null","null"];let i="";t.forEach(((e,t)=>{i+=`${t>0?":":""}${this.cyrb53(e)}`})),i+=":0";const o=this.cyrb53(i),n=encodeURIComponent((e=>{let t=Number(e);const i=[];for(;t>0;)i.push(String.fromCharCode(255&t)),t>>>=8;return btoa(i.join())})(o)),d=e=>e?(e^(window&&window.crypto&&window.crypto.getRandomValues?crypto.getRandomValues(new Uint8Array(1))[0]%16:16*Math.random())>>e/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,d);return{calculatedId:d(),finalHashedConsent:n}}setId5Id(){if(window.odT.id5CallSent)return;window.odT.id5CallSent=!0;const{calculatedId:e,finalHashedConsent:t}=this.setShareId(),i=e=>new Date(Date.now()+864e5*e).toUTCString(),o=localStorage.getItem("id5id"),n=i(90),d=i(30),s=window.odT.setup?.userids?.id5Id?.params?.partner||"1019",a={partner:s,gdpr:window.optidigitalToolboxGdpr?1:0,v:"optidigital/3.0.0",o:"client-side-fetch-api",u:window.location.href,top:(()=>{try{if(window.top===window.self)return!0}catch(e){return!1}return!1})?1:0};if(window.optidigitalToolboxGdpr&&(a.gdpr_consent=this.consentV2TCData&&this.consentV2TCData.tcString?this.consentV2TCData.tcString:""),document.referrer&&(a.rf=document.referrer),window.odT.setup?.userids?.id5Id?.params?.pd&&(a.pd=window.odT.setup.userids.id5Id.params.pd),o){const e=JSON.parse(decodeURIComponent(o));a.s=e.signature}let r=0;localStorage.getItem(`id5id_${s}_nb`)&&(r=parseInt(localStorage.getItem(`id5id_${s}_nb`))+1);const l=window.odT.setup?.userids?.id5Id?.params?.abTesting||{enabled:!1};l.enabled&&(a.ab_testing={enabled:!0,control_group_pct:l.controlGroupPct||.1});const c=`https://id5-sync.com/g/v2/${s}.json`,u=new XMLHttpRequest;u.open("POST",c,!0),u.onreadystatechange=function(){if(4==this.readyState&&200==this.status){window.odT.log("ID5 was set");let e=JSON.parse(this.responseText);window.odT.id5Obj=e,localStorage.setItem("id5id",encodeURIComponent(this.responseText)),localStorage.setItem("id5id_exp",n),localStorage.setItem("id5id_last",(new Date).toUTCString()),localStorage.setItem("id5id_last_exp",n),localStorage.setItem(`id5id_${s}_nb`,r),localStorage.setItem(`id5id_${s}_nb_exp`,d),localStorage.setItem("id5id_privacy",JSON.stringify(e.privacy)),localStorage.setItem("id5id_privacy_exp",d),localStorage.setItem("id5id_cst",decodeURIComponent(t)),window.odT.setPpid()}},u.send(JSON.stringify(a))}initOy(){let e=window.odT.odNetworkId?window.odT.odNetworkId:window.odT.setup.info.networkId;window.optiyield&&"function"==typeof window.optiyield._0i4n3i2t&&window.optiyield._0i4n3i2t(e,window.odT.pfConfig,window.odT.pfConfig.country),window.optiyield.cmd.push((function(){let t={pubId:e,mode:"manual"};""!==window.odT.setup?.adSlotsConfig?.adManagerKeyName?t.gtpCustomDimensionKey={cd1:window.odT.setup?.adSlotsConfig?.adManagerKeyName?window.odT.setup.adSlotsConfig.adManagerKeyName:"adslot"}:""!==window.odT.setup?.customTargeting?.adslot?.name&&(t.gtpCustomDimensionKey={cd1:window.odT.setup?.customTargeting?.adslot?.name||"adslot"}),window.optiyield.init(t,(function(){window.odT.log("window.optiyield SDK is ready")})),window.optiyield.setGptFloors()}))}callOy(){this.log("Call OY SDK config"),this.pfConfig=window.optidigitalPFconfig,Object.keys(this.pfConfig).length>0?this.initOy():this.skipOy=!0}runAuction(e){this.setup?.info?.publisherId&&this.setup?.info?.networkId&&this.setup?.info?.siteId&&this.setup?.info?.revision&&(this.setup?.sspPriorities?.ssp&&(this.enableCookieSync=!0,this.runPBSUserSync()),this.buildFirstLoadAdSlots(),this.monitorLazyLoadAdSlots(),this.monitorAutomaticRefresh(),this.initConfig.uuid&&Object.keys(this.initConfig.uuid).some((e=>["email_md5","email_sha256","email_sha1"].includes(e)))&&(this.setup.liverampId||this.setup?.userids?.liverampId?.params?.pid)?(window&&!window.ats&&(window.ats={},window.ats.retrieveEnvelope=this.retrieveEnvelope),this.refreshAtsEnvelope()):this.skipLiveRamp=!0,window.googletag.cmd.push((function(){window.odT.log("GPT is starting"),window.odT.setPpid(),window.odT.initPageTargeting(),window.odT.defineSlots(window.odT.firstLoadAdSlots),window.googletag.pubads().enableSingleRequest(),window.googletag.pubads().setCentering(!0),window.googletag.pubads().addEventListener("slotRenderEnded",window.odT.eventSlotRendered),window.googletag.enableServices()})),this.setup[`fullPackage${this.screen}`]?(this.userAction.push("fullPackage"),this.callOy(),this.loadCore(),this.callPrebidAndAmazon()):this.callPrebidAdapter(e))}getCpmStringValue(e,t){let i="";const o=t.reduce(((e,t)=>e.max>t.max?e:t),{max:0});let n=0,d=t.find((function(t){if(e>o.max){let e=t.precision;void 0===e&&(e=_defaultPrecision),i=t.max.toFixed(e)}else{if(e<=t.max&&e>=n)return t.min=n,t;n=t.max}}));return d&&(i=window.odT.getCpmTarget(e,d)),i}getCpmTarget(e,t){const i=t.hasOwnProperty("precision")&&t.precision?t.precision:2,o=t.increment,n=t.min;let d,s,a=Math.pow(10,i+2),r=(e*a-n*a)/(o*a);try{d=Math.floor(r)*o+n}catch(e){s=!0}return(s||"number"!=typeof d)&&(d=Math.floor(r)*o+n),d=Number(d.toFixed(10)),d.toFixed(i)}convertToCurrency(e,t="EUR"){let i=window.odT.setup.adServerCurrency?window.odT.setup.adServerCurrency:"EUR";if("USD"==window.odT.setup.adServerCurrency)return e;if("EUR"===t){let t=window.odT.setup.defaultRates?window.odT.setup.defaultRates:{USD:{EUR:.84,PLN:3.53}};window.odT.setup.currentRates?e*=window.odT.setup.currentRates.USD[i]:e*=t.USD[i]}if("USD"===t){e*=(window.odT.setup.defaultRatesUsd?window.odT.setup.defaultRatesUsd:{EUR:{USD:1.19,PLN:4.21}}).EUR.USD}return e}isGPTdisabledForSlot(e){const t=window.odT?.finalAdSlotsConfig?.adSlotsDefinitions?.[e];return t&&(this.stickyAdapter.isVerticalStickyAdSlot(e)||!0===t?.disableGPT)}runGPTAuction(e,t,i){if(!0===window.odT.setup?.disableGPT){if(Array.isArray(t)&&t.length)t.forEach((e=>{const t=window.odT.getGPTSlots([this.getSlotNameFromEntry(e)]);t&&this.handleUnfilledSlotEntry(t[0])}));else if(!t&&Array.isArray(window.odT.firstLoadAdSlots)&&window.odT.firstLoadAdSlots.length){(window.odT.getGPTSlots(window.odT.firstLoadAdSlots)||[]).forEach((e=>this.handleUnfilledSlotEntry(e)))}return}let o=t;if(t){const e=t.filter((e=>this.isGPTdisabledForSlot("string"==typeof e?e:e?.placementId||e?.adUnitCode||e)));if(e&&e.length&&e.forEach((e=>{const t=window.odT.getGPTSlots([this.getSlotNameFromEntry(e)]);t.length>0&&this.handleUnfilledSlotEntry(t[0])})),o=t.filter((e=>!this.isGPTdisabledForSlot("string"==typeof e?e:e?.placementId||e?.adUnitCode||e))),0===o.length)return}if(window.googletag.cmd.push((function(){if(i&&i.length){const e=i.map((e=>{let t=window.odT.convertToCurrency(e.cpm,"EUR"),i=window.odT.setup.prebidPriceGranularity?window.odT.setup.prebidPriceGranularity:window.odT.defaultPriceGranularity;const o=window.odT.getCpmStringValue(t,i.buckets);let n;return window.odT?.gptAdSlots?.[e.placementId]?n=window.odT.gptAdSlots[e.placementId]:window.odT?.gptAdSlots?.[e.creativeId]&&(n=window.odT.gptAdSlots[e.creativeId]),n&&(window.odT.setSlotTargeting(n,"hb_pb",window.odT.getCpmStringValue(t,i.buckets),e.hb_bidder,!0),window.odT.setSlotTargeting(n,"hb_bidder",e.hb_bidder?e.hb_bidder:"optidigital",e.hb_bidder,!0),window.odT.setSlotTargeting(n,"hb_adid",e.bidId,e.hb_bidder,!0),window.odT.setSlotTargeting(n,"hb_size",`${e.w}x${e.h}`,e.hb_bidder,!0),window.odT.setSlotTargeting(n,"hb_format",e.hb_format?e.hb_format:"banner",e.hb_bidder,!0),window.odT.setSlotTargeting(n,"hb_safeframe","native"!=e.hb_format&&"video"!=e.hb_format&&window.odT.checkSafeFrameDelivery(e.placementId,e)?"1":"0",!1,!1),window.odT.setSlotTargeting(n,"multi_format","banner"!=e.hb_format?"1":"0")),{adUnitCode:e.creativeId,cpm:o}}));window.optiyield.cmd.push((function(){window.optiyield.setGptFloors(e)})),window.addEventListener("message",window.odT.receivedMessage,!1)}})),o&&"EngageNoBidRefresh"!==e)window.odT.initAdserver(null,e,o);else if(o||"EngageNoBidRefresh"===e){let e=[];Array.isArray(o)&&(o.forEach((t=>{t&&(t.hasOwnProperty("adUnitCode")&&window.odT?.gptAdSlots?.[t.adUnitCode]?e.push(t.adUnitCode):t.hasOwnProperty("placementId")&&window.odT?.gptAdSlots?.[t.placementId]?e.push(t.placementId):e.push(t))})),window.odT.refreshGPTSlots(e))}else window.odT.initAdserver(null,e)}receivedMessage(e){if(window.odT.bidsFromOe&&window.odT.bidsFromOe.length){let t=e.message?"message":"data",i={};try{i=JSON.parse(e[t])}catch(e){return}if(i&&i.adId&&i.message&&"Prebid Request"===i.message&&window.odT.bidsFromOe.some((e=>e.bidId===i.adId))){let t=window.odT.getReplier(e);const o=window.odT.bidsFromOe.find((e=>e.bidId===i.adId)),n={adId:o.bidId,ad:o.adm,width:Number(o.w),height:Number(o.h),cpm:o.cpm,originalCpm:o.cpm};window.odT.sendAdToCreative(n,t)}}}getReplier(e){return e.ports.length>0?function(t){e.ports[0].postMessage(JSON.stringify(t))}:null!==e.origin?function(t){e.source.postMessage(JSON.stringify(t),e.origin)}:void 0}sendAdToCreative(e,t){const{adId:i,ad:o,adUrl:n,width:d,height:s}=e;if(i){t({message:"Prebid Response",ad:o,adUrl:n,adId:i,width:d,height:s});const e=window.odT.bidsFromOe.findIndex((e=>e.bidId===i));-1!==e&&window.odT.bidsFromOe.splice(e,1)}}refreshGPTSlots(e){window.googletag.cmd.push((function(){window.odT.getGPTSlots(e),window.optiyield.cmd.push((function(){window.optiyield.setGptFloors()})),window.googletag.pubads().refresh(window.odT.getGPTSlots(e))}))}callEventCallback(e,t){window.odT.eventCallback.forEach((i=>{if("function"==typeof i)try{i(e,t)}catch(e){}}))}getCMPConsent(){if(this.enableCookieConsent&&this.CMPready&&this.consentStatus&&"nocmp"!==this.consentStatus)return this.log("Cookie consent: Already retrieved, registering event listener for updates"),void("function"==typeof window.top.__tcfapi&&window.top.__tcfapi("addEventListener",2,((e,t)=>{!t||"useractioncomplete"!==e.eventStatus&&"cmpuiclosed"!==e.eventStatus||(this.consentStatus="CMPv2_ready",this.consentV2TCData=e,this.analyzeConsentV2(),this.setup&&this.setup.hasOwnProperty("onConsentCaptured")&&"function"==typeof this.setup.onConsentCaptured&&this.setup.onConsentCaptured(this.consentStatus,e),-1==this.consentStatusNoGAM.indexOf(this.consentStatus)?(this.CMPready=!0,this.layoutReady&&this.runAuction("cmpConsentUpdated")):(this.CMPready=!1,this.layoutReady&&this.loadOdas(this.runOdasAuction)),this.callEventCallback("CONSENT_READY",{status:this.consentStatus,tcData:e,source:"cmp_update"}))})));let e=this.setup?this.setup.cmpCallbackTimeout||(0===this.setup.cmpCallbackTimeout?this.setup.cmpCallbackTimeout:1500):1500,t=!1,i=0,o=!1;i=setTimeout((()=>{o=!0,window.odT.log("Timeout NO RESPONSE FROM CMP CALLBACK"),window.odT.consentStatus="CMPv2_GAMokHBok",window.odT.consentType="timeout_callback",-1==window.odT.consentStatusNoGAM.indexOf(window.odT.consentStatus)&&(window.odT.log(`Consent ready, consent status: ${window.odT.consentStatus}`),window.odT.CMPready=!0,window.odT.layoutReady&&window.odT.runAuction("cmpTimeoutCallback")),window.odT.callEventCallback("CONSENT_READY",{status:window.odT.consentStatus}),window.odT.pageViewEvent(),t=!0}),e),"function"==typeof window.top.__tcfapi?window.top.__tcfapi("addEventListener",2,(function(e,n){o||(n&&"cmpuishown"===e.eventStatus&&(clearTimeout(i),window.odT.consentCMPUIShown=!0,window.odT.timeStampCMPUIShown=Date.now(),window.odT.log("CMP UI shown"),t||(window.odT.pageViewEvent(),t=!0)),!n||"tcloaded"!==e.eventStatus&&"useractioncomplete"!==e.eventStatus&&"cmpuiclosed"!=e.eventStatus?n&&!e.gdprApplies&&(clearTimeout(i),window.odT.consentStatus="CMPv2_OOS",window.odT.consentType="ok",window.odT.consentCMPUIShown?window.odT.pageViewEvent({userAction:!0}):window.odT.pageViewEvent(),window.odT.log(`CMP consent ready ${window.odT.consentStatus}`),window.odT.CMPready=!0,window.odT.layoutReady&&window.odT.runAuction("cmpReadyOOS")):(clearTimeout(i),window.odT.consentStatus="CMPv2_ready",window.odT.consentV2TCData=e,window.odT.analyzeConsentV2(),window.odT.setup&&window.odT.setup.hasOwnProperty("onConsentCaptured")&&(window.odT.setup.onConsentCaptured,1)&&window.odT.setup.onConsentCaptured(window.odT.consentStatus,e),window.odT.log(`CMP consent ready ${window.odT.consentStatus}`),-1==window.odT.consentStatusNoGAM.indexOf(window.odT.consentStatus)?(window.odT.CMPready=!0,window.odT.layoutReady&&window.odT.runAuction("cmpConsentReadyOK"),window.odT?.setup?.enableCrModal?.includes(window.odT.consentType)&&"ok"!==window.odT.consentType&&window.odT?.setup?.crZoneId&&(window.odT.userAction.push("Load Cr Modal"),window.odT.loadOdas(odT.initCRModal))):(window.odT.CMPready=!1,window.odT.layoutReady&&window.odT.loadOdas(window.odT.runOdasAuction)),window.odT.callEventCallback("CONSENT_READY",{status:window.odT.consentStatus,tcData:e}),window.top.__tcfapi("removeEventListener",2,(function(e){e&&window.odT.log("TCFAPPI event listener removed")}),e.listenerId),window.odT.consentCMPUIShown?window.odT.pageViewEvent({userAction:!0}):window.odT.pageViewEvent()))})):this.consentStatus="nocmp"}tryCookieConsent(){if(!this.enableCookieConsent||!window.optidigitalToolboxGdpr)return!1;const e=[];this.setup&&this.setup.consentCookieName&&e.push(this.setup.consentCookieName),e.push("euconsent-v2","euconsent");let t=null;for(const i of e){const e=this.getCookie(i);if(e&&""!==e.trim()){t=e;break}}if(!t)return!1;try{const e=this.decodeTCStringFromCookie(t);if(e&&this.validateTCData(e))return this.processConsentData(e),!0}catch(e){}return this.log("Cookie consent: Failed to decode TC String from cookie"),!1}decodeTCStringFromCookie(e){try{const t=(0,m.K)(e);if(t&&t.core)return this.convertParsedTCToTCData(t,e)}catch(e){}this.log("Failed to decode TC String from cookie")}convertParsedTCToTCData(e,t){const i=e.core||{},o=e.publisherTC||{},n=i.vendorConsents||{},d=i.vendorLegitimateInterests||{},s=i.purposeConsents||{},a=i.purposeLegitimateInterests||{},r=o.purposeConsents||{},l=o.purposeLegitimateInterests||{},c=o.customPurposeConsents||{},u=o.customPurposeLegitimateInterests||{},p={...s},w={...a},g=Object.values(r).some((e=>!0===e))||Object.values(l).some((e=>!0===e)),f=Object.keys(o).some((e=>"purposeConsents"!==e&&"purposeLegitimateInterests"!==e));(g||f)&&(Object.assign(p,r),Object.assign(w,l));return{tcString:t,gdprApplies:window.optidigitalToolboxGdpr?1:0,cmpId:i.cmpId,cmpVersion:i.cmpVersion,tcfPolicyVersion:i.policyVersion,purpose:{consents:p,legitimateInterests:w},vendor:{consents:n,legitimateInterests:d},publisher:{consents:r,legitimateInterests:l,customPurpose:{consents:c,legitimateInterests:u},restrictions:i.publisherRestrictions||{}},isServiceSpecific:i.isServiceSpecified,publisherCC:i.publisherCountryCode,useNonStandardTexts:i.useNonStandardStacks,purposeOneTreatment:i.purposeOneTreatment,specialFeatureOptins:i.specialFeatureOptins||{},vendorListVersion:i.vendorListVersion,consentLanguage:i.consentLanguage,consentScreen:i.consentScreen,created:i.created,lastUpdated:i.lastUpdated}}validateTCData(e){return e&&e.hasOwnProperty("tcString")&&e.hasOwnProperty("gdprApplies")&&e.hasOwnProperty("purpose")&&e.hasOwnProperty("vendor")&&e.tcString&&"string"==typeof e.tcString&&e.tcString.length>0}processConsentData(e){this.consentStatus="CMPv2_ready",this.consentV2TCData=e,this.analyzeConsentV2(),this.log(`Cookie consent: Retrieved consent, status: ${this.consentStatus}`),this.setup&&this.setup.hasOwnProperty("onConsentCaptured")&&"function"==typeof this.setup.onConsentCaptured&&this.setup.onConsentCaptured(this.consentStatus,e),-1==this.consentStatusNoGAM.indexOf(this.consentStatus)?(this.CMPready=!0,this.layoutReady&&this.runAuction("cookieConsentReady"),this?.setup?.enableCrModal?.includes(this.consentType)&&"ok"!==this.consentType&&this?.setup?.crZoneId&&(this.userAction.push("Load Cr Modal"),this.loadOdas(this.initCRModal))):(this.CMPready=!1,this.layoutReady&&this.loadOdas(this.runOdasAuction)),this.callEventCallback("CONSENT_READY",{status:this.consentStatus,tcData:e,source:"cookie"}),this.pageViewEvent()}bootstrapConsent(){if(this.enableCookieConsent){const e=this.tryCookieConsent();setTimeout((()=>{e||this.CMPready?(e||this.CMPready)&&"function"==typeof window.top.__tcfapi&&window.top.__tcfapi("addEventListener",2,((e,t)=>{!t||"useractioncomplete"!==e.eventStatus&&"cmpuiclosed"!==e.eventStatus||(this.consentStatus="CMPv2_ready",this.consentV2TCData=e,this.analyzeConsentV2(),this.setup&&this.setup.hasOwnProperty("onConsentCaptured")&&"function"==typeof this.setup.onConsentCaptured&&this.setup.onConsentCaptured(this.consentStatus,e),-1==this.consentStatusNoGAM.indexOf(this.consentStatus)?(this.CMPready=!0,this.layoutReady&&this.runAuction("cmpConsentUpdated")):(this.CMPready=!1,this.layoutReady&&this.loadOdas(this.runOdasAuction)),this.callEventCallback("CONSENT_READY",{status:this.consentStatus,tcData:e,source:"cmp_update"}))})):this.waitForCMP()}),150)}else this.waitForCMP()}waitForCMP(){window.odT.log("CMP Start waiting API");let e=0,t=window.odT.setup&&(window.odT.setup.cmpApiTimeout||0===window.odT.setup.cmpApiTimeout)?window.odT.setup.cmpApiTimeout:1e3,i=0,o=!1;window.optidigitalToolboxGdpr?"function"==typeof window.top.__tcfapi?(window.odT.log("CMP API ready, wait for consent signal"),o=!0,window.odT.waitingForCMPFinished=!0,"loading"!==document.readyState?window.odT.getCMPConsent():document.addEventListener("DOMContentLoaded",(function(e){window.odT.getCMPConsent()}))):e=window.setInterval((function(){i+=50,o||("function"==typeof window.top.__tcfapi?(window.odT.log("CMP API ready, wait for consent signal"),window.clearInterval(e),o=!0,window.odT.waitingForCMPFinished=!0,"loading"!==document.readyState?window.odT.getCMPConsent():document.addEventListener("DOMContentLoaded",(function(e){window.odT.getCMPConsent()}))):i>=t&&(window.clearInterval(e),o=!0,window.odT.waitingForCMPFinished=!0,window.odT.log("Timeout NO CMP API"),window.odT.consentStatus="CMPv2_GAMokHBok",-1==window.odT.consentStatusNoGAM.indexOf(window.odT.consentStatus)&&(window.odT.log(`Consent ready, consent status: ${window.odT.consentStatus}`),window.odT.CMPready=!0,window.odT.layoutReady&&window.odT.runAuction("cmpTimeoutAPI")),window.odT.callEventCallback("CONSENT_READY",{status:window.odT.consentStatus}),window.odT.consentType="timeout_tcfapi",window.odT.pageViewEvent()))}),50):(window.odT.consentStatus="CMPv2_OOS",window.odT.consentType="ok",window.odT.log("NO GDPR"),window.odT.pageViewEvent(),window.odT.log(`Consent ready, consent status: ${window.odT.consentStatus}`),window.odT.CMPready=!0,window.odT.layoutReady&&window.odT.runAuction("initnoGDPR"))}runPBSUserSync(e=!1){try{if(window.odT.setup.hasOwnProperty("disablePresync")&&window.odT.setup.disablePresync)return!1;if("Chrome"!==window.odT.checkBrowser&&"Edge"!==window.odT.checkBrowser)return!1;if(-1!=window.odT.consentOK.indexOf(window.odT.consentStatus)){let t="rubicon,smartadserver,pubmatic,criteo,appnexus,triplelift,outbrain,onetag,ix,ttd";window.odT?.setup?.sspList&&"string"==typeof window.odT.setup.sspList&&(window.odT.setup.sspList.includes("ttd")&&(window.odT.setup.sspList=window.odT.setup.sspList.replace("ttd","thetradedesk")),t=window.odT.setup.sspList.toString());const i=window.odT?.setup?.sspPriorities?.ssp||[],o=i.filter((e=>1===Number(e?.priority))).map((e=>e?.name)).filter(Boolean).join(","),n=i.slice().sort(((e,t)=>Number(e?.priority??Number.POSITIVE_INFINITY)-Number(t?.priority??Number.POSITIVE_INFINITY))).map((e=>e?.name)).filter(Boolean).join(","),d=e?n||t:o||"",s=e?null:Number.isInteger(window.odT?.setup?.sspPriorities?.maxSspSync)?window.odT.setup.sspPriorities.maxSspSync:null;this.CookieSync=new p(d,s)}}catch(e){}}isBackfillEnabled(e){let t=!1;if(window.odT.finalAdSlotsConfig.adSlotsDefinitions[e]&&window.odT.finalAdSlotsConfig.adSlotsDefinitions[e].disableBackfill)return t;if(window.odT.engageBackfill&&window.odT.consentOK.includes(window.odT.consentStatus)){let i=window.odT.finalAdSlotsConfig?.adSlotsDefinitions?.[e]?.loadType;const o=window.odT.getPrebidAdUnitsSizes(window?.odT?.finalAdSlotsConfig?.adSlotsDefinitions?.[e]?.dfpSizes||[]);e&&!this.adAdaptersFactory.isSpecialAdSlot(e)&&(!i||i&&6!==i)&&(!i||i&&7!==i)&&(!i||i&&8!==i)&&o.length&&(t=!0)}return t}deviceDetection(){window.odT.tools.isClientMobileOrTablet()?window.odT.tools.isClientMobile()?(window.odT.deviceCategory="Smartphone",window.odT.dDevice="30001"):(window.odT.deviceCategory="Tablet",window.odT.dDevice="30002"):"Mobile"===window.odT?.screen?(window.odT.deviceCategory="Smartphone",window.odT.dDevice="30001"):(window.odT.deviceCategory="Desktop",window.odT.dDevice="30000")}adRequestEvent(e,t=!1){const{divId:i,divIdFull:o,filled:n,demandType:d,lineItemId:s,size:a,prebidBid:r,prebidWinner:l,amazonStatus:c,oyStatus:u,oyTestGroup:p,oyPb:w,nogam:g,bidders:f,format:h}=e;let m;if(o&&(m=document.getElementById(o)),n&&o&&(m&&m.closest(".optidigital-wrapper-div")&&(m.closest(".optidigital-brand")&&m.closest(".optidigital-brand").previousSibling&&m.closest(".optidigital-brand").previousSibling.classList.contains("optidigital-text-ads")&&m.closest(".optidigital-brand").previousSibling.style.setProperty("display","block"),m.previousSibling&&m.previousSibling.classList.contains("optidigital-text-ads")&&m.previousSibling.style.setProperty("display","block"),m.nextElementSibling&&(m.nextElementSibling.style.setProperty("display","block"),setTimeout((()=>{m.nextElementSibling?.classList.add("optidigital-brand-logo-active")}),2e3),m.firstChild&&m.firstChild.firstChild&&m.firstChild.firstChild.offsetWidth&&m.firstChild.firstChild.offsetWidth>1?(m.nextElementSibling.style.setProperty("width",m.firstChild.firstChild.offsetWidth+"px","important"),m.firstChild.firstChild.offsetWidth===document.documentElement.clientWidth&&m.nextElementSibling.style.setProperty("margin-right","15px","important")):(m.nextElementSibling.style.setProperty("width","100%","important"),m.nextElementSibling.style.setProperty("margin-right","15px","important")))),window.odT.adSlotsUnfilledCount.hasOwnProperty(`${o}`)&&(window.odT.adSlotsUnfilledCount[`${o}`]=0)),!n&&o){if(m&&m.closest(".optidigital-wrapper-div")){"none"===(getComputedStyle(m)&&getComputedStyle(m).display)&&(m.closest(".optidigital-brand")&&m.closest(".optidigital-brand").previousSibling&&m.closest(".optidigital-brand").previousSibling.classList.contains("optidigital-text-ads")&&m.closest(".optidigital-brand").previousSibling.style.setProperty("display","none"),m.previousSibling&&m.previousSibling.classList.contains("optidigital-text-ads")&&m.previousSibling.style.setProperty("display","none"),m.nextElementSibling&&m.nextElementSibling.style.setProperty("display","none"))}window.odT.adSlotsUnfilledCount.hasOwnProperty(`${o}`)?window.odT.adSlotsUnfilledCount[`${o}`]++:window.odT.adSlotsUnfilledCount[`${o}`]=1}if(m&&m.closest(".optidigital-wrapper-div")&&m.closest(".optidigital-wrapper-div").style.setProperty("background-image","none"),"Billboard_1"===i&&n&&"1800x1000"!==a&&(window.odT.finalAdSlotsConfig.adSlotsDefinitions.Billboard_1.dfpSizes=window.odT.finalAdSlotsConfig.adSlotsDefinitions.Billboard_1.dfpSizes.filter((e=>!(1800===e[0]&&1e3===e[1])))),"Billboard_1"===i&&n&&"1800x1000"===a&&(window.odT.wallpaperForBillboard=!0),i.toLowerCase().includes("wallpaper")&&n&&"1800x1000"===a&&(window.odT.wallpaperFilled=!0),window.odT.adRequestStats&&(t||window.odT.analytics.isSamplingCase())){t&&"object"!=typeof window.odT.pageViewPayload&&window.odT.pageViewEvent({},!0),window.odT.pageViewPayload.sampling=t?100:window.odT.analytics.liveAnalyticsSampling||25,delete window.odT.pageViewPayload.gdpr;let e={0:"Direct",1:"Lazy Load",2:"Manual",5:"Sticky",6:"Interstitial",7:"Siderail",8:"Rewarded"};const m=o||`${window.odT.divIdPrefix}${i}`;let y={adRequest:{adSlot:void 0!==i&&window.odT?.finalAdSlotsConfig?.adSlotsDefinitions?.[i]?.cdValue?window.odT.finalAdSlotsConfig.adSlotsDefinitions[i].cdValue:i,lineItemId:s,filled:n?1:0,refresh:window.odT.adSlotsLoadCount[m]&&window.odT.adSlotsLoadCount[m]>1?1:0,adSize:a,demandType:d,prebidWinner:l,prebidBid:r,amazonStatus:c,oyStatus:u,oyTestGroup:p,oyPb:w,nogam:g,format:h},gdpr:{gdprApplies:window.optidigitalToolboxGdpr?1:0,gdprUi:window.odT.consentCMPUIShown?1:0,status:window.odT.consentType},...window.odT.pageViewPayload};window.odT?.initConfig?.adUnit&&"string"==typeof window.odT.initConfig.adUnit&&""!==window.odT.initConfig.adUnit&&window.odT?.finalAdSlotsConfig?.adSlotsDefinitions?.[i]?.customAdUnitCode&&(y.adUnitPath=`${window.odT.initConfig.adUnit}/${window.odT.finalAdSlotsConfig.adSlotsDefinitions[i].customAdUnitCode}`),window.odT.finalAdSlotsConfig.adSlotsDefinitions[i]&&window.odT.finalAdSlotsConfig.adSlotsDefinitions[i].hasOwnProperty("loadType")&&(y.adRequest.loadType=e[window.odT.finalAdSlotsConfig.adSlotsDefinitions[i].loadType]),f&&"object"==typeof f&&Object.keys(f).length&&(f?.isCached&&(y.adRequest.isCached=!0,delete f.isCached),y.adRequest.bidders=f),window.odTLibs&&(y.v={l:window.odTLibs.odlauncher,c:window.odTLibs.odcore}),y.adRequest=Object.fromEntries(Object.entries(y.adRequest).filter((([e,t])=>""!==t&&null!=t))),window.odT.analytics.sendAnalyticsRequest(y)}}checkSlotTargeting(e){if(e){const t=e.getTargetingKeys();return{hb_bidder:t.find((e=>e.includes("hb_bidder")))?e.getTargeting(t.find((e=>e.includes("hb_bidder"))))[0]:"",hb_pb:t.find((e=>e.includes("hb_pb")))?e.getTargeting(t.find((e=>e.includes("hb_pb"))))[0]:"",amznbid:e.getTargeting("amznbid").length&&e.getTargeting("amznbid")[0].length>1?1:0,od_pfg:e.getTargeting("od_pfg").length&&"1"===e.getTargeting("od_pfg")[0]?1:0,od_pf_group:e.getTargeting("od_pf_group").length&&"1"===e.getTargeting("od_pf_group")[0]?1:0,od_pf_pb:e.getTargeting("od_pf_pb").length?parseFloat(e.getTargeting("od_pf_pb")[0]):"",od_pf_ta:e.getTargeting("od_pf_ta").length?e.getTargeting("od_pf_ta")[0]:"",hb_format:e.getTargeting("hb_format").length?e.getTargeting("hb_format")[0]:null}}return{}}setStickyFormat(e,t,i=4e3){const o=window.odT?.setup?.anchorModeTop?window.odT.setup.anchorModeTop:0;let n,d=document.getElementById(`${window.odT.divIdPrefix}${e}`);if(!d){const t=window.odT.finalAdSlotsConfig?.adSlotsDefinitions?.[e]?.divId;t&&(d=document.getElementById(`${t}`))}if(""===window.odT.divIdPrefix&&(n=window.odT.finalAdSlotsConfig.adSlotsDefinitions?.[e]?.adUnit,e=window.odT.finalAdSlotsConfig.adSlotsDefinitions?.[e]?.divId,d=document.getElementById(`${e}`)),d&&"none"!==getComputedStyle(d).display&&"hidden"!==getComputedStyle(d).visibility){let s;window.odT.stickyFormatLoaded.push(e);let a={},r={},l=d.parentElement,c=window.getComputedStyle(d),u=window.getComputedStyle(l),p=parseFloat(c.marginTop)+parseFloat(c.marginBottom),w=Math.ceil(parseFloat(c.height)+p),g=!1;window.odT.stickyFormatClosed=!1;let f=0;r.display=u.display,r["flex-direction"]=u.flexDirection,r["align-items"]=u.alignItems,!window.odT.setup.adLayoutEnabled||window.odT.setup?.adLayoutConfig?.excludedAdslots&&(window.odT.setup?.adLayoutConfig?.excludedAdslots?.includes(e)||window.odT.setup?.adLayoutConfig?.excludedAdslots?.includes(n))?(r["min-height"]=u.minHeight,r["justify-content"]=u.justifyContent,r.margin=u.margin):(r.width=u.width,r.position=u.position,r.top=u.top),a.position=c.position,a.background=c.background,a.margin=c.margin,a.width=c.width,a["max-width"]=c.maxWidth,a.top=c.top,a.left=c.left,a.right=c.right,a.display=c.display,a["padding-left"]=c.paddingLeft,a["padding-right"]=c.paddingRight,a["border-color"]=c.borderColor;const h=()=>{if(g){d.style.setProperty("visibility","hidden"),d.style.setProperty("opacity","0"),d.style.setProperty("transition","visibility 0s .5s, opacity .5s linear");const e=document.querySelector(".optidigital-close-button");e&&(e.style.setProperty("visibility","hidden"),e.style.setProperty("opacity","0"),e.style.setProperty("transition","visibility 0s .5s, opacity .5s linear"))}},m=()=>{const e=document.querySelector(".optidigital-temporary-element");e&&e.remove();const t=document.querySelector(".optidigital-close-button");t&&t.remove(),g=!1,d.style.setProperty("top","0"),d.style.setProperty("left","0"),d.style.setProperty("z-index","1"),d.style.setProperty("visibility","visible"),d.style.setProperty("opacity","1");for(const e in a)d.style.setProperty(e,a[e]);for(const e in r)l.style.setProperty(e,r[e])},y=e=>{if(!window.odT.stickyFormatClosed){let i=document.documentElement.clientWidth;if(t>0&&(f=(i-t)/2),!g||!document.querySelector(".optidigital-temporary-element")){g=!0;const t=document.createElement("div");t.classList.add("optidigital-temporary-element"),t.style.setProperty("height",`${w}px`),l.insertBefore(t,d);const i=document.createElement("div");if(i.innerHTML='<span><svg><path stroke="#ffffff" transform="translate(5.5,5) scale(0.6)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/><circle r="7.5" cx="9.5" cy="9.5"></circle></svg></span>',i.classList.add("optidigital-close-button"),i.setAttribute("style",`position: fixed; top: ${o}px; left: 0; width: 100%; z-index: 2147483647; background: rgba(0,0,0, 0.2); color: #fff; height: 25px; padding: 0; cursor: pointer; display: flex; align-items: center; justify-content: flex-end; user-select: none; -webkit-tap-highlight-color: transparent;`),l.insertBefore(i,d),document.querySelector(".optidigital-close-button")){const t=document.querySelector(".optidigital-close-button span");t.setAttribute("style","display: flex; height: 25px; align-items: center; position: relative; top: 0;");document.querySelector(".optidigital-close-button span svg").setAttribute("style",`position: absolute; top: 2.5px; right: ${f}px; width: 20px; height: 20px; transform: rotateY(-180deg) rotateZ(-90deg); max-width: unset;`);document.querySelector(".optidigital-close-button span svg circle").setAttribute("style",`stroke-dasharray: 47px; stroke-dashoffset: 0px; stroke-linecap: round; stroke-width: 2px; stroke: white; fill: none; animation: countdown ${e}ms linear forwards;`);let i=document.createElement("style");i.type="text/css";let o="@keyframes countdown {from {stroke-dashoffset: 0px;} to {stroke-dashoffset: 47px;}}";i.appendChild(document.createTextNode(o)),document.getElementsByTagName("head")[0].appendChild(i),t.addEventListener("click",(()=>{h(),setTimeout((()=>{m(),clearTimeout(s),window.odT.stickyFormatClosed=!0}),500)}))}}d.setAttribute("style",`position: fixed; top: ${o+25}px; left: 0; right: 0; z-index: 2147483647; width: 100%; max-width: unset; background: rgba(0,0,0, 0.2); margin: 0 auto; border-color: transparent!important; padding-right: 0; padding-left: 0;`),window.odT.setup.adLayoutEnabled&&l.setAttribute("style","z-index","2147483647"),"flex"!==getComputedStyle(l).display&&d.style.setProperty("display","flex")}};let T;const b=new window.IntersectionObserver((([e])=>{if(e.isIntersecting)return T=Date.now(),void(s=setTimeout((()=>{h(),setTimeout((()=>{m(),b.unobserve(d),window.odT.stickyFormatClosed=!0}),500)}),i))}),{root:null,threshold:.1});if(b.observe(d),d.getBoundingClientRect().top<0){T=Date.now();let e=Date.now();e-T<i&&y(i-(e-T))}const S=()=>{const t="number"==typeof window?.odT?.setup?.anchorModeTopTrigger?window.odT.setup.anchorModeTopTrigger:25,o="number"==typeof window?.odT?.setup?.anchorModeTopTrigger?window.odT.setup.anchorModeTopTrigger:0,n=d?.getBoundingClientRect(),s=l?.getBoundingClientRect();if(n.top<t){let t=Date.now();t-T<i&&odT.stickyFormatLoaded.slice(-1)[0]===e&&y(i-(t-T))}s.top>=o&&m()};let v=!1;window.addEventListener("scroll",(()=>{v||(v=!0,requestAnimationFrame((()=>{S(),v=!1})))}),{passive:!0})}}registerEventCallback(e){var t=!1;return"function"==typeof e&&(window.odT.eventCallback.push(e),t=!0),t}adjustPrebidSizesForInfiniteScroll(){if(this.prebidSizesAdjusted)return!0;this.prebidSizesAdjusted=!0,this.log("Adjust sizes for Prebid infiniteScroll (remove 1800x1000)");for(let e in window.odpbjs.adUnits){if(window.odpbjs.adUnits[e].hasOwnProperty("mediaTypes")&&window.odpbjs.adUnits[e].mediaTypes.hasOwnProperty("banner")&&window.odpbjs.adUnits[e].mediaTypes.banner.hasOwnProperty("sizes"))for(let t in window.odpbjs.adUnits[e].mediaTypes.banner.sizes)1800==window.odpbjs.adUnits[e].mediaTypes.banner.sizes[t][0]&&1e3==window.odpbjs.adUnits[e].mediaTypes.banner.sizes[t][1]&&(window.odpbjs.adUnits[e].mediaTypes.banner.sizes[t][0]=1,window.odpbjs.adUnits[e].mediaTypes.banner.sizes[t][1]=1);if(window.odpbjs.adUnits[e].hasOwnProperty("sizes"))for(let t in window.odpbjs.adUnits[e].sizes)1800==window.odpbjs.adUnits[e].sizes[t][0]&&1e3==window.odpbjs.adUnits[e].sizes[t][1]&&(window.odpbjs.adUnits[e].sizes[t][0]=1,window.odpbjs.adUnits[e].sizes[t][1]=1)}return!0}cleanWallpaper(){this.log("Wallpaper cleanup");let e=document.getElementById("rp-skin-container-sandbox");null!=e&&(e.style.display="none"),e=document.getElementById("rubiconExpander"),null!=e&&(e.style.display="none")}spaManualLoad(e){if("string"==typeof e&&(window.odT.initConfig.adUnit=e),window.odT.setup.hasOwnProperty("publisherInfiniteScrollRefresh")&&"function"==typeof window.odT.setup.publisherInfiniteScrollRefresh&&window.odT.setup.publisherInfiniteScrollRefresh(window.odT.initConfig),(window.odT.setup.disableInfiniteScrollFirstLoad||window.odT.setup.spaManualMode)&&0===Object.keys(window.odT.finalAdSlotsConfig).length)window.odT.log("Call SPA manual mode after first load"),window.odT.setDefaultSizes();else if((window.odT.setup.disableInfiniteScrollFirstLoad||window.odT.setup.spaManualMode)&&Object.keys(window.odT.finalAdSlotsConfig).length){const e="Desktop"===window.odT.screen?'[class^="Billboard_"], [class^="Content_"], [class^="HalfpageAd_"], [class^="Rectangle_"], [class^="Wallpaper"], [class*=" Billboard_"], [class*=" Content_"], [class*=" HalfpageAd_"], [class*=" Rectangle_"], [class*=" Wallpaper"]':'[class^="Mobile_"], [class*=" Mobile_"]';document.querySelectorAll(e).length&&(window.odT.log("Call SPA manual mode"),document.querySelectorAll(e).forEach((e=>{window.odT.addNewAdSlot(e)})))}window.odT.log(`Call SPA function with adUnit: ${window.odT.initConfig.adUnit}`),window.odT.log("Updated adslots list",window.odT.finalAdSlotsConfig.adSlotsDefinitions),!1!==window.odT.infiniteScrollWallpaperSlot&&(window.odT.log("Manage infiniteScrollWallpaperSlot"),window.odT.adjustPrebidSizesForInfiniteScroll(),2==window.odT.infiniteScrollWallpaperSlot&&window.odT.cleanWallpaper()),window.odT.infiniteScrollId++}processCommandQueue(){window.odT.log("Processing command queue");const e=async function(e){try{if("function"!=typeof e)return;if(-1!==e.toString().indexOf("getVideoInstreamAds"))return window.odT.userAction.push("triggerInstream"),window.optidigitalCoreQueue=window.optidigitalCoreQueue||{},window.optidigitalCoreQueue.cmd=window.optidigitalCoreQueue.cmd||[],window.optidigitalCoreQueue.cmd.push(e),void window.odT.loadCore();e.call()}catch(e){window.odT.log("Error processing command : "+e.message)}};if("object"==typeof optidigitalQueue&&"object"==typeof optidigitalQueue.cmd)for(optidigitalQueue.cmd.push=function(t){e(t)};optidigitalQueue.cmd.length>0;)e(optidigitalQueue.cmd.shift())}loadOdas(e,t){if(!this.odasLoaded&&this.setup.hasOwnProperty("enableOdas")&&this.setup.enableOdas.includes(this.consentType)&&this.setup.hasOwnProperty("adSlotsConfig")&&this.setup.adSlotsConfig.hasOwnProperty("adSlotsDefinitions")&&Array.isArray(this.setup.adSlotsConfig.adSlotsDefinitions)&&this.setup.adSlotsConfig.adSlotsDefinitions.length&&this.setup.adSlotsConfig.adSlotsDefinitions.some((e=>void 0!==e.odZoneId))&&("ko"===this.consentType||this.userAction.length&&"ko"!==this.consentType)){this.log("Load odas"),this.odasLoaded=!0,"ko"===this.consentType&&(this.adserver="OD",this.buildFirstLoadAdSlots(),this.monitorLazyLoadAdSlots());let i=document.createElement("script");i.async=!0,i.type="text/javascript",i.src=`https://scripts.opti-digital.com/lib/?lib=od-exads-tagsv3&v=${odTLibs.odas}`,i.onload=function(){"undefined"!=typeof optidigitalAdsrv&&(t?t.forEach((t=>{e(t.adslotKV,t.divId,t.event)})):e())};let o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(i,o)}}isSecondChanceEnabled(e,t){let i=!1,o=t.substring(this.divIdPrefix.length);if(this.engageBackfill&&this.setup.hasOwnProperty("enableOdas")&&this.setup.enableOdas.includes(this.consentType)&&this.setup.hasOwnProperty("adSlotsConfig")&&this.setup.adSlotsConfig.hasOwnProperty("adSlotsDefinitions")&&("ko"===this.consentType||this.userAction.length&&"ko"!==this.consentType)&&(1==this.finalAdSlotsConfig.adSlotsDefinitions.hasOwnProperty(o)||Object.values(this.finalAdSlotsConfig.adSlotsDefinitions).find((e=>e.divId===o))))for(let t in this.setup.adSlotsConfig.adSlotsDefinitions)if("object"==typeof this.setup.adSlotsConfig.adSlotsDefinitions[t]&&this.setup.adSlotsConfig.adSlotsDefinitions[t].odZoneId&&this.setup.adSlotsConfig.adSlotsDefinitions[t].odSize&&e==this.setup.adSlotsConfig.adSlotsDefinitions[t].name&&!this.setup.adSlotsConfig.adSlotsDefinitions[t].disableBackfill){i=!0;break}return i}runOdasAuction(){let e=[];for(let t=0;t<window.odT.firstLoadAdSlots.length;t++)for(let i=0;i<window.odT.setup.adSlotsConfig.adSlotsDefinitions.length;i++)if("object"==typeof window.odT.setup.adSlotsConfig.adSlotsDefinitions[i]&&window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].odZoneId&&window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].odSize&&window.odT.finalAdSlotsConfig.adSlotsDefinitions[window.odT.firstLoadAdSlots[t]]?.adUnit==window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].name){let o={adslot:window.odT.setup.adSlotsConfig.adSlotsDefinitions[i]?.cdValue?window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].cdValue:window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].name,zoneId:window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].odZoneId,size:window.odT.setup.adSlotsConfig.adSlotsDefinitions[i].odSize,divId:window.odT.finalAdSlotsConfig.adSlotsDefinitions[window.odT.firstLoadAdSlots[t]].divId};e.push(o);break}if(e.length>0){let t=window.odT.customDNR?"1":"0";optidigitalAdsrv.getAds(window.odT.initConfig.adUnit,e,"start",window.odT.consentType,window.odT.testGroup,"direct",!1,1,t)}window.odT.initCRModal()}runSecondChance(e,t,i){let o=e,n=[];for(let e in window.odT.setup.adSlotsConfig.adSlotsDefinitions)if("object"==typeof window.odT.setup.adSlotsConfig.adSlotsDefinitions[e]&&window.odT.setup.adSlotsConfig.adSlotsDefinitions[e].odZoneId&&window.odT.setup.adSlotsConfig.adSlotsDefinitions[e].odSize&&window.odT.finalAdSlotsConfig.adSlotsDefinitions[o]?.adUnit==window.odT.setup.adSlotsConfig.adSlotsDefinitions[e].name){let i={adslot:window.odT.setup.adSlotsConfig.adSlotsDefinitions[e]?.cdValue?window.odT.setup.adSlotsConfig.adSlotsDefinitions[e].cdValue:window.odT.setup.adSlotsConfig.adSlotsDefinitions[e].name,zoneId:window.odT.setup.adSlotsConfig.adSlotsDefinitions[e].odZoneId,size:window.odT.setup.adSlotsConfig.adSlotsDefinitions[e].odSize,divId:t};n.push(i);break}if(n.length>0){let e=window.odT.adSlotsLoadCount[t]>=1?"auto":"no",o=-1!=i.getTargeting("od_pf_group").indexOf("1"),d="0";window.googletag.cmd.push((function(){-1!=window.googletag.pubads().getTargeting("od_pf_nr").indexOf("1")&&(d="1")})),optidigitalAdsrv.getAds(window.odT.initConfig.adUnit,n,"unfilled",window.odT.consentType,window.odT.testGroup,e,o,d)}else{window.odT.callEventCallback("ADSLOT_UNFILLED",{adslot:{divId:t,name:e}});const i=window.googletag&&"function"==typeof window.googletag.pubads?window.googletag.pubads().getSlots().find((e=>e.getSlotElementId()===t)):null,{hb_bidder:o,hb_pb:n,amznbid:d,od_pfg:s,od_pf_group:a,od_pf_pb:r}=window.odT.checkSlotTargeting(i),l=window.odT.addBidderMetrics(t,o,n,d);let c={divId:e,divIdFull:t,filled:!1,demandType:"unfilled",lineItemId:null,prebidWinner:o,prebidBid:n,amazonStatus:d,oyStatus:s,oyTestGroup:a,oyPb:r,nogam:!1,bidders:Object.keys(l).length?l:null};window.odT.adRequestEvent(c)}}setPageTargeting(e,t){if(!e||!t)return;let i=window.odT?.setup?.customTargeting?.[e]?.name||e,o=window.odT?.setup?.customTargeting?.[e]?.value||t;this.log("CALL setPageTargeting key="+i+" value="+o),window.googletag.cmd.push((function(){window.googletag.pubads().setTargeting(i,o)}))}retrieveEnvelope(e){let t;try{t=decodeURIComponent(document.cookie.match("(^|;) *_lr_env=([^;]*)")[2]),t={envelope:JSON.parse(atob(t)).envelope},t=JSON.stringify(t)}catch(e){return t}finally{if(!e)return t;e(t)}}callAtsEnvelope(){const{email_md5:e,email_sha256:t,email_sha1:i}=this.initConfig.uuid,o={method:"GET"};let n=`https://api.rlcdn.com/api/identity/v2/envelope?pid=${Number(this.setup?.userids?.liverampId?.params?.pid||this.setup.liverampId)||0}`;n+=e?`&it=4&iv=${e}`:"",n+=t?`&it=4&iv=${t}`:"",n+=i?`&it=4&iv=${i}`:"",n+=`&ct=${window.optidigitalToolboxGdpr?"4":"3"}&cv=${this.consentV2TCData&&this.consentV2TCData.tcString}`;try{fetch(n,o).then((e=>e&&200!==e.status?(window.odT.skipLiveRamp=!0,!1):e)).then((e=>e.json())).then((e=>{e.envelopes&&e.envelopes.length&&window.odT.getEnvelope(e.envelopes)})).catch((e=>{}))}catch(e){}}refreshAtsEnvelope(){const e={method:"GET"};let t=window.odT.retrieveEnvelope();if(!t)return void window.odT.callAtsEnvelope();t=JSON.parse(t).envelope;const i=`https://api.rlcdn.com/api/identity/v2/envelope/refresh?pid=${this.setup?.userids?.liverampId?.params?.pid||this.setup.liverampId}&it=19&iv=${t}&ct=${window.optidigitalToolboxGdpr?"4":"3"}&cv=${this.consentV2TCData&&this.consentV2TCData.tcString}`;try{fetch(i,e).then((e=>e&&200!==e.status?(window.odT.skipLiveRamp=!0,!1):e)).then((e=>e.json())).then((e=>{e.envelopes&&e.envelopes.length?window.odT.getEnvelope(e.envelopes):window.odT.callAtsEnvelope()})).catch((e=>{}))}catch(e){}}calculateEnvelopeTTL(e,t){let i=2592e3;"US"===e&&"CA"===t&&(i=1296e3);return{expirationTime:i,expirationDate:1e3*i+ +new Date}}getEnvelope(e){const t=e.find((e=>"envelopeLiveramp"===e.source)),i=e.find((e=>"pairIds"===e.source)),o=t?t.value:null,n=i?i.value:null,d=window.odT.calculateEnvelopeTTL();if(o){const e={envelope:o},t=btoa(JSON.stringify(e));window.odT.liveRampObj=t,window.odT.setCookie("_lr_env",encodeURIComponent(t),d.expirationTime),window.odT.setCookie("_lr_env_exp",d.expirationDate,d.expirationTime)}if(n){const e=atob(n),t={envelope:JSON.parse(e)},i=btoa(JSON.stringify(t));window.odT.setCookie("_lr_pairId",encodeURIComponent(i),d.expirationTime),window.odT.setCookie("_lr_pairId_exp",d.expirationDate,d.expirationTime),window.odT.pairIdObj=i}}setPpid(){if(this.setup.enablePPID&&this.consentV2TCData&&this.consentV2TCData.hasOwnProperty("publisher")&&this.consentV2TCData.publisher.hasOwnProperty("consents")&&this.consentV2TCData.publisher.consents[1]){let e;const t=this.setup?.enablePPIDSource;if(t){const i=window.localStorage.getItem(t);if(i)try{const o=decodeURIComponent(i);let n;try{n=JSON.parse(o)}catch{n=o}e="id5Id"===t?n?.gp:n}catch(e){}else e=window.odT?.getCookie(t)}if(this.setup.hasOwnProperty("enablePPIDSource")&&!e)return;e||(e=this.getCookie("_oppid"));const i=15552e3;if(!e)try{e=self.crypto.randomUUID()}catch(t){e=this.tools.generateUuid()}this.setCookie("_oppid",e,i),window.googletag.cmd.push((function(){window.googletag.pubads().setPublisherProvidedId(e)}))}}setSlotTargeting(e,t,i,o="optidigital",n=!1){const d=!!window.odT.setup.enableSendAllBids&&`_${o}`;let s=window.odT?.setup?.customTargeting?.[t]?.name||t,a=window.odT?.setup?.customTargeting?.[t]?.value||i;d&&n&&(s=`${s}${d}`.slice(0,20)),e.setTargeting(s,a)}initCRModal(){if(window.odT.setup.crZoneId&&!window.odT.consentOK.includes(window.odT.consentStatus)){window.odT.log("Load Consent Recovery Modal");const e=window.odT.setup.crZoneId;let t=document.createElement("div");t.setAttribute("id","optidigital-adslot-CRModal"),t.setAttribute("class","CRModal"),t.setAttribute("style","display:none;"),document.body.appendChild(t);let i=[],o={zoneId:e,adslot:"CRModal",size:[1,1],divId:"optidigital-adslot-CRModal"};i.push(o);let n=window.odT.customDNR?"1":"0";optidigitalAdsrv.getAds(window.odT.initConfig.adUnit,i,"start",window.odT.consentType,window.odT.testGroup,"direct",!1,n)}}start(){this.runAuction("cmpConsentReadyOK")}loadByGroup(e,t=!0){if(window.odT.setup?.adSlotsConfig?.groups&&"object"==typeof window.odT.setup.adSlotsConfig.groups&&e){Object.keys(window.odT.setup.adSlotsConfig.groups).forEach((e=>{Object.values(window.odT.finalAdSlotsConfig.adSlotsDefinitions).forEach((t=>{window.odT.setup.adSlotsConfig.groups[e].includes(t.adUnit)&&!window.odT.setup.adSlotsConfig.groups[e].includes(t.name)&&window.odT.setup.adSlotsConfig.groups[e].push(t.name)}))}));Object.entries(window.odT.setup.adSlotsConfig.groups).filter((([t,i])=>i.some((t=>e.includes(t))))).forEach((([t,i])=>{i.forEach((t=>{!e.includes(t)&&Object.values(window?.odT?.finalAdSlotsConfig?.adSlotsDefinitions)?.find((e=>e.name===t))&&e.push(t)}))}))}t&&(window.odT.lazyLoadPendingAdSlots=window.odT.lazyLoadPendingAdSlots.filter((t=>!e.includes(t))))}getPrebidAdUnitsSizes(e){return e.filter((function(e){let t=!1;if(void 0!==e&&2==e.length)for(let i in odT.prebidSizes)odT.prebidSizes[i][0]==e[0]&&odT.prebidSizes[i][1]==e[1]&&(t=!0);return t}))}isElementUnderBlur(e,t){if(!e)return!1;return((e,t)=>{let i=e.parentElement;for(;i;){if(i.style.filter.includes("blur("))return!0;if(i===t)break;i=i.parentElement}return!1})(e,t)}addBidderMetrics(e,t,i,o,n){const d=()=>{const t={};if(e&&"function"==typeof odpbjs?.getBidResponsesForAdUnitCode&&"function"==typeof odpbjs.getNoBidsForAdUnitCode){const i=odpbjs.getBidResponsesForAdUnitCode(e),o=odpbjs.getNoBidsForAdUnitCode(e);window.odT.auctionBids[e]=[...i.bids,...o.bids];const n=(e=>{if(0===e.length)return[];const t=e[e.length-1].auctionId;return e.every((e=>e.auctionId===t))?[...e]:e.filter((e=>e.auctionId===t))})(window.odT.auctionBids[e]),d=odpbjs?.getHighestUnusedBidResponseForAdUnitCode(e)?.cpm,s=window.odT?.bidsFromOe?.find((t=>t.creativeId===e))?.cpm;let a=0,r=!1;t.c2s=t.c2s||[],t.s2s=t.s2s||[];for(let i of n){const o={name:i.cpm?i.bidderCode:i.bidder,bid:i.cpm?i.cpm:i.timeout?-1:0,time:i.cpm?i.timeToRespond:window.odT.auctionMetrics?.[i.auctionId]?.[i.bidder]};if(i.cpm&&(a=i.cpm>a?i.cpm:a),window.odT.auctionFailsafe?.[e?.replace(window.odT.divIdPrefix,"")]&&(o.bid=-3),"client"!==i?.src&&"client"!==i?.source||t.c2s.push(o),"s2s"===i?.src||"s2s"===i?.source){const e="context deadline exceeded";i?.serverErrors?.find((t=>t.message===e))&&(o.bid=-2),t.s2s.push(o)}}(d&&d>a||s&&s>a)&&(r=!0,t.isCached=r)}if(window.odT.auctionMetrics?.firstCall?.[e]&&!t.c2s?.length&&!t.s2s?.length){t.dc=t.dc||[];const i=window.odT.auctionMetrics?.firstCall?.[e]?.dc||[],o=Object.entries(i).map((([e,{bid:t,time:i}])=>({name:e,bid:t<0?-2:parseFloat(window.odT.convertBidCpm(t)),time:i})));t.dc.push(...o)}if(!window.odT.auctionMetrics?.firstCall?.[e]&&window.odT.auctionMetrics?.[e]&&!t.c2s?.length&&!t.s2s?.length){t.dc=t.dc||[];(window.odT.auctionMetrics?.firstCallConfig?.[e]||[]).forEach((i=>{const o={name:i,bid:-1,time:window.odT.auctionMetrics?.[e]};t.dc.push(o)}))}if(window.odT.auctionMetrics?.amazon?.[e]){t.c2s=t.c2s||[];const i={name:"amazon",bid:Number(o)>0?404:window.odT.setup?.biddersSetup?.amazon?.timeout>window.odT.auctionMetrics?.amazon?.[e]?0:-1,time:window.odT.auctionMetrics?.amazon?.[e]};window.odT.auctionFailsafe?.[e?.replace(window.odT.divIdPrefix,"")]&&(i.bid=-3),t.c2s.push(i)}const i=Object.fromEntries(["c2s","s2s","dc"].filter((e=>Array.isArray(t[e])&&t[e].length)).map((e=>[e,t[e]])));return t.isCached&&(i.isCached=!0),Object.keys(i).length?i:{}};if("undefined"!=typeof odpbjs&&"function"==typeof odpbjs.getBidResponsesForAdUnitCode)return d();const s=d();return odpbjs.que.push(d),s}checkServicesReady(){return(window.odT.id5Obj||!window.odT.id5Permission)&&(window.optiyield._ready||window.odT.skipOy)&&(window.odT.liveRampObj||window.odT.skipLiveRamp)&&(window.odT.iasReady||!window.odT.iasId)&&(window.odT.cookieSyncReady||!window.odT.enableCookieSync)}loadAPS(){if(window.odT.setup.biddersSetup&&window.odT.setup.biddersSetup.hasOwnProperty("amazon")&&(0==window.odT.setup.hasOwnProperty("skipAmazonInit")||1!=window.odT.setup.skipAmazonInit)&&(!window.odT.setup.biddersSetup?.amazon?.countries?.length||window.odT.setup.biddersSetup?.amazon?.countries.includes(window.optidigitalToolboxCC))&&(!window.odT.setup.biddersSetup?.amazon?.browsers?.length||window.odT.setup.biddersSetup?.amazon?.browsers.includes(window.odT.checkBrowser.toLowerCase()))&&(!window.odT.setup.biddersSetup?.amazon?.devices?.length||window.odT.setup.biddersSetup?.amazon?.devices.includes(window.odT.deviceCategory.toLowerCase()))&&!window.odT.enableAmazonAPS){var e=document.createElement("link");e.rel="preload",e.as="script",e.href="//c.amazon-adsystem.com/aax2/apstag.js";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t),function(e,t,i,o,n,d,s){function a(i,o){t[e]._Q.push([i,o])}t[e]||(t[e]={init:function(){a("i",arguments)},fetchBids:function(){a("f",arguments)},setDisplayBids:function(){},targetingKeys:function(){return[]},_Q:[]},(d=i.createElement(o)).async=!0,d.src="//c.amazon-adsystem.com/aax2/apstag.js",(s=i.getElementsByTagName(o)[0]).parentNode.insertBefore(d,s))}("apstag",window,document,"script");var i={pubID:window.odT.setup.amazonPubId?window.odT.setup.amazonPubId:window.odT.setup.biddersSetup.amazon.pubID,adServer:"googletag",videoAdServer:"DFP",isSelfServePub:!0};!window.odT.setup.hasOwnProperty("info")||!window.odT.setup.info.hasOwnProperty("siteId")||window.odT.setup?.directBidders?.length&&window.odT.setup?.directBidders?.includes("amazon")||(i.schain={complete:1,ver:"1.0",nodes:[{asi:"optidigital.com",sid:window.odT?.setup?.info?.sellerId?window.odT.setup.info.sellerId.toString():window.odT.odNetworkId?`p${window.odT.setup.info.publisherId.toString()}`:window.odT.setup.info.siteId.toString(),hp:1}]}),window.apstag.init(i),window.odT.enableAmazonAPS=!0}(window.odT.setup.hasOwnProperty("skipAmazonInit")||1==window.odT.setup.skipAmazonInit)&&(window.odT.enableAmazonAPS=!0)}getAPSAdslotSizes(e){return e.filter((function(e){let t=!1;if(void 0!==e&&2==e.length)for(let i in window.odT.apsSizes)window.odT.apsSizes[i][0]==e[0]&&window.odT.apsSizes[i][1]==e[1]&&(t=!0);return t}))}fetchAPSBids(e,t,i){if(window.odT.enableAmazonAPS&&e.length>0){let o=[];for(let t in e)if(window.odT.finalAdSlotsConfig.adSlotsDefinitions.hasOwnProperty(e[t])&&window.odT.setup.biddersSetup.amazon.adSlots.hasOwnProperty(window.odT.finalAdSlotsConfig.adSlotsDefinitions[e[t]].adUnit)){let i={};i.slotID=window.odT.finalAdSlotsConfig.adSlotsDefinitions[e[t]].divId,i.slotName=window.odT.initConfig.adUnit+"/"+window.odT.finalAdSlotsConfig.adSlotsDefinitions[e[t]].name,i.sizes=window.odT.getAPSAdslotSizes(window.odT.finalAdSlotsConfig.adSlotsDefinitions[e[t]].dfpSizes),i.optiYield={adUnitPath:`${window.odT.initConfig.adUnit}${window.odT.finalAdSlotsConfig.adSlotsDefinitions[e[t]].customAdUnitCode?"/"+window.odT.finalAdSlotsConfig.adSlotsDefinitions[e[t]].customAdUnitCode:""}`,cd:{cd1:window.odT.finalAdSlotsConfig.adSlotsDefinitions[e[t]].cdValue?window.odT.finalAdSlotsConfig.adSlotsDefinitions[e[t]].cdValue:window.odT.finalAdSlotsConfig.adSlotsDefinitions[e[t]].adUnit}},o.push(i)}if(o.length>0){window.odT.oyStatus&&window.optiyield.cmd.push((function(){Object.keys(window.optidigitalPFconfig).length>0&&!window.optiyield._init_ready&&window.odT.initOy(),o=window.optiyield.setAmazonFloors(o,window.odT.setA)}));const e=Date.now();window.odT.initAPS=Date.now(),window.apstag.fetchBids({slots:o,timeout:window.odT.setup.biddersSetup.amazon.timeout},(function(n){const d=Date.now();o.forEach((t=>{window.odT.auctionMetrics.amazon=window.odT.auctionMetrics?.amazon||{},window.odT.auctionMetrics.amazon[t.slotID]=d-e})),window.odT.log("Amazon bids received"),window.googletag.cmd.push((function(){window.apstag.setDisplayBids(),t&&i?(t.aps=!0,i()):window.odT.amazonBidsReady=!0}))}))}else window.odT.log("No APS slots to request bids for"),t&&i?(t.aps=!0,i()):window.odT.amazonBidsReady=!0}}convertBidCpm(e=null){let t=e;if(t){const i=window.odT.convertToCurrency(e,"EUR"),o=window.odT.setup.prebidPriceGranularity?window.odT.setup.prebidPriceGranularity:window.odT.defaultPriceGranularity;t=window.odT.getCpmStringValue(i,o.buckets)}return t}openConnection(){try{if(!this.setup?.sspPriorities?.ssp)return;window.odT.log("Open connection");const e="https://pbs.optidigital.com/status",t=new XMLHttpRequest;t.withCredentials=!window.optidigitalToolboxGdpr,t.open("GET",e,!0),t.timeout=3e3,t.onreadystatechange=function(){this.readyState},t.send()}catch(e){}}};var T=o.A;export{T as default};