(function(){var e=document.createElement(`style`);e.textContent=`#div-gpt-ad-leaderboard-728-or-skin,#div-gpt-ad-300x250top-mobile-article,#div-gpt-ad-50-mobile,.div-gpt-ad-300x250-Inlettura,.div-gpt-ad-inlettura-desktop{text-align:center}:root{--adv-label-text:""}div.adv-wrapper{flex-direction:column;justify-content:center;align-items:center;display:flex;max-height:700px!important}div.pubtech-adv-container{margin:35px 0;position:relative;text-align:center!important;justify-content:center!important;display:flex!important}.pubtech-adv-sticky{top:10px;position:-webkit-sticky!important;position:sticky!important}.st-placement.inScreen{z-index:2147483647!important}div.advblockshown:before{content:var(--adv-label-text);color:#999;text-align:center;clear:both;font-family:Verdana,Geneva,sans-serif;font-size:11px;line-height:22px;display:block}div.advblockshown{clear:both}div.anchor-slot{z-index:99999;justify-content:center;align-items:center;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;display:flex;position:fixed;top:0}div.anchor-slot.anchor-slot-desktop-type{padding:15px;right:50%;transform:translate(50%)}div.anchor-slot.anchor-slot-mobile-type{width:100%;padding:10px 0;right:0}div.rendered-slot div.anchor-slot{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-shadow:0 0 5px rgba(0,0,0,.2)}span#anchor-slot-close-button{color:#fff;cursor:pointer;background-color:rgba(0,0,0,.7);border-radius:50%;display:none;position:absolute;bottom:5px;right:5px}div.rendered-slot div.anchor-slot span#anchor-slot-close-button{display:block!important}div.anchor-slot span#anchor-slot-close-button.anchor-slot-desktop-button{width:25px;height:25px;font-size:18px;line-height:25px}div.anchor-slot span#anchor-slot-close-button.anchor-slot-mobile-button{width:20px;height:20px;font-size:12px;line-height:20px}div.hide-adv-label div.advblockshown:before{display:none!important}.pos-right-adv{float:left;opacity:1;visibility:visible;z-index:10;border:0;width:160px;min-width:160px;max-width:160px;height:620px;min-height:620px;max-height:620px;margin:0;padding:0;transition-duration:0s;display:block;top:50px;right:calc(50vw + 700px);overflow:visible;position:fixed!important}.pos-left-adv{float:left;opacity:1;visibility:visible;z-index:10;border:0;width:160px;min-width:160px;max-width:160px;height:620px;min-height:620px;max-height:620px;margin:0;padding:0;transition-duration:0s;display:block;top:50px;left:calc(50vw + 700px);overflow:visible;position:fixed!important} /*$vite$:1*/`,document.head.appendChild(e);function t(){let e=window.scheduler;return e!=null&&typeof e.yield==`function`?e.yield().then(()=>void 0,()=>void 0):Promise.resolve()}function n(){return new Promise(e=>{let t=!1,n,r=()=>{t||(t=!0,n!==void 0&&clearTimeout(n),e(!0))};if(`scheduler`in window&&typeof window.scheduler==`object`&&window.scheduler!=null){if(`yield`in window.scheduler&&typeof window.scheduler.yield==`function`)return window.scheduler.yield().then(r,r);if(`postTask`in window.scheduler&&typeof window.scheduler.postTask==`function`){let e=window.scheduler.postTask(r,{priority:`user-visible`});oe(e)&&e.then(void 0,r);return}}n=setTimeout(r,0),window.requestAnimationFrame(()=>{setTimeout(()=>{r()},0)})})}function r(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function i(e,t){r(e,t),t.add(e)}function a(e,t,n){r(e,t),t.set(e,n)}function o(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function s(e,t,n){return e.set(o(e,t),n),n}function c(e,t){return e.get(o(e,t))}function l(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function u(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){l(a,r,i,o,s,`next`,e)}function s(e){l(a,r,i,o,s,`throw`,e)}o(void 0)})}}var d=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,h=new WeakSet,g=class e{constructor(){var e;i(this,h),a(this,d,void 0),a(this,f,new Set),a(this,p,new Map),a(this,m,new Set),s(d,this,(e=document.head)==null?document.getElementsByTagName(`head`)[0]:e)}static getInstance(){return ee._==null&&(ee._=new e),ee._}loadScript(e){let{appendToBody:t=!1,async:n=!0,onScriptLoaded:r,scriptTag:i,scriptUrl:a}=e;if(a.length===0)return;if(c(f,this).has(a)){typeof r==`function`&&this.onReadyScript(i,r);return}let s=document.createElement(`script`);s.type=`text/javascript`,s.async=n,s.setAttribute(`data-cfasync`,`false`),s.src=a,s.onload=()=>{var e;c(m,this).add(i);let t=(e=c(p,this).get(i))==null?[]:e;c(p,this).delete(i),typeof r==`function`&&t.unshift(r),o(h,this,_).call(this,t)},!t||document.body==null?c(d,this).appendChild(s):document.body.appendChild(s),c(f,this).add(a)}onReadyScript(e,t){if(c(m,this).has(e)){o(h,this,_).call(this,[t]);return}let n=c(p,this).get(e);if(n!=null){n.push(t);return}c(p,this).set(e,[t])}};function _(e){return u(function*(){for(let n of e)yield t(),n()})()}var ee={_:null},v=0,y=!0;function b(){y=!0}window.addEventListener(`resize`,b,{passive:!0}),window.addEventListener(`orientationchange`,b,{passive:!0});function x(){y&&(v=window.innerWidth,window.innerHeight,y=!1)}function S(){return x(),v}var C={DESKTOP:`desktop`,MOBILE:`mobile`,TABLET:`tablet`};function w(){let e=S();return e>=1025?C.DESKTOP:e<1025&&e>=768?C.TABLET:C.MOBILE}function te(){return S()>=768?C.DESKTOP:C.MOBILE}function ne(){return document.readyState===`interactive`||document.readyState===`complete`}function T(e){if(ne())return e(),()=>{};function t(){e()}return document.addEventListener(`DOMContentLoaded`,t),()=>{document.removeEventListener(`DOMContentLoaded`,t)}}function re(){return window.location.pathname.split(`/`).filter(Boolean)}function E(){let e={};return new URLSearchParams(window.location.search).forEach((t,n)=>{e[n]=t}),e}function ie(){var e;let t=document.querySelector(`meta[property="og:type"]`);if(t){var n;return(n=t.getAttribute(`content`))==null?``:n}let r=document.querySelector(`meta[name="page-type"]`);return(e=r==null?void 0:r.getAttribute(`content`))==null?``:e}function ae(e){function t(e){return e.toLowerCase().replace(/[:\s]/g,`_`)}let n={},r=new Set(e.map(e=>t(e))),i=Array.from(document.querySelectorAll(`meta[name], meta[property]`));for(let e of i){var a,o;let i=(a=(o=e.getAttribute(`name`))==null?e.getAttribute(`property`):o)==null?``:a;if(i.length===0)continue;let c=t(i);if(r.has(c)){var s;n[c]=(s=e.getAttribute(`content`))==null?``:s}}return n}function D(){var e;let t=Array.from(document.querySelectorAll(`script[type="application/ld+json"]`)),n=``;for(let e of t)try{var r;let t=JSON.parse((r=e.textContent)==null?``:r);if(Array.isArray(t))for(let e of t){var i;n=(i=O(e))==null?n:i}else{var a;n=(a=O(t))==null?n:a}}catch(e){}if(n.length>0)return n;let o=document.querySelector(`meta[name="author"]`);return(e=o==null?void 0:o.getAttribute(`content`))==null?``:e}function O(e){if(typeof e==`object`&&e&&`author`in e){let t=e;if(t.author!==null&&typeof t.author==`object`&&`name`in t.author){let e=t.author;if(typeof e.name==`string`&&e.name.length>0)return e.name}}return null}function k(e){return typeof e==`function`}function oe(e){return typeof e==`object`&&!!e&&`then`in e&&typeof e.then==`function`}function A(e){return k(e)?e():e}function se(e){return ce.apply(this,arguments)}function ce(){return ce=u(function*(e){return k(e)?e():(oe(e),e)}),ce.apply(this,arguments)}function le(e){let t=window.document.cookie.match(`(^|;)\\s*`+e+`\\s*=\\s*([^;]*)\\s*(;|$)`);return t?decodeURIComponent(t[2]):null}function ue(e,t,n=null,r=`Lax`){let i=``,a=Number(n);if(a>0){let e=new Date;e.setTime(e.getTime()+a*1e3*60),i=`; expires=${e.toUTCString()}`}let o=` ;domain=${de(window.location.hostname)}`,s=r!=null&&r.toLowerCase()==`none`?`; Secure`:``;window.document.cookie=`${e}=${encodeURIComponent(t)}${i}; path=/${o}${r?`; SameSite=${r}`:``}${s}`}function de(e){if(e==null||e===`localhost`)return``;e.startsWith(`www.`)||(e=`www.`+e);let t=e.split(`.`),n=t[t.length-2],r=/^[0-9]+$/.test(e.split(`:`)[0].split(`.`).join(``)),i=2;return!r&&t.length>3&&n.length<4&&(i=3),`.`+t.reverse().slice(0,i).reverse().join(`.`)}function fe(e){return e?(e^pe()>>e/4).toString(16):`10000000-1000-4000-8000-100000000000`.replace(/[018]/g,fe)}function pe(){return window&&window.crypto&&typeof window.crypto.getRandomValues==`function`?crypto.getRandomValues(new Uint8Array(1))[0]%16:Math.random()*16}function me(e){return!!new URLSearchParams(window.location.search).get(e)}function he(e){return!!ge(e)||me(e)}function ge(e){try{return window.localStorage.getItem(e)}catch(t){return console.error(`Error while getting ${e} from local storage`,t),null}}function _e(e){return new Promise(t=>{e.getState()!==`prerendering`&&t(),e.on(`stateChange`,function n(r){r!==`prerendering`&&(e.on(`stateChange`,n),t())})})}function ve(){let e=`direct`,t=document.referrer;if(!t)return e;try{let e=[`facebook.com`,`instagram.com`,`twitter.com`,`linkedin.com`,`reddit.com`,`tiktok.com`,`pinterest.com`,`tumblr.com`,`snapchat.com`,`weibo.com`,`wechat.com`,`t.co`],n=[`google.com`,`google.co.uk`,`google.de`,`google.fr`,`google.es`,`google.it`,`bing.com`,`yahoo.com`,`duckduckgo.com`,`baidu.com`,`yandex.com`,`yandex.ru`,`ecosia.org`,`startpage.com`],r=new URL(t).hostname.toLowerCase().replace(/^www\./,``),i=e=>r===e||r.endsWith(`.`+e);if(e.some(i))return`social`;if(n.some(i))return`organic`}catch(e){}return e}function ye(){try{typeof window.ptecpre==`object`&&window.ptecpre!==null&&Array.isArray(window.ptecpre.queue)||(window.ptecpre={queue:[]})}catch(e){console.error(e)}}function be(){ye();let e=window.ptecpre.queue;Array.isArray(e)&&e.forEach(function(e){e()}),Ee(window.ptecpre)}function xe(){try{typeof window.ptec==`object`&&window.ptec!==null&&Array.isArray(window.ptec.queue)||(window.ptec={queue:[]})}catch(e){console.error(e)}}function Se(e){xe();let t=window.ptec.queue;Array.isArray(t)&&t.forEach(function(t){t(e)}),Ee(window.ptec,e)}var Ce={queue:[]};function we(e){Ce.queue.push(e)}function Te(e){let t=Ce.queue;Array.isArray(t)&&t.forEach(function(t){t(e)}),Ee(Ce,e)}function Ee(e,t=null){Object.isFrozen(e)||(e.queue={push:e=>e(t)},Object.freeze(e))}function De(e,t=w()){let n=[];if(e==null)return n;let r=Oe(e,t);if(r!=null){var i,a;let t=(i=(a=e.getAttribute(r))==null?void 0:a.split(`,`))==null?[]:i;for(let e of t){if(e===`fluid`){n.push(`fluid`);continue}let t=e.split(`x`);t[0]!=null&&t[1]!=null&&!Number.isNaN(t[0])&&!Number.isNaN(t[1])&&n.push([parseInt(t[0]),parseInt(t[1])])}}return n}function Oe(e,t){if(e.hasAttribute(`data-size-`+t)&&e.getAttribute(`data-size-`+t)!==``)return`data-size-`+t;if(t===C.TABLET&&e.hasAttribute(`data-size-`+C.DESKTOP)&&e.getAttribute(`data-size-`+C.DESKTOP)!==``)return`data-size-`+C.DESKTOP;if(e.hasAttribute(`data-size`)&&e.getAttribute(`data-size`)!==``)return`data-size`}function ke(e){"@babel/helpers - typeof";return ke=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},ke(e)}function Ae(e,t){if(ke(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(ke(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function je(e){var t=Ae(e,`string`);return ke(t)==`symbol`?t:t+``}function Me(e,t,n){return(t=je(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function j(e){for(var t=1;t0)}function Fe(e){if(Pe(e.override))return e.override;let t=e.getAdUnitSizes(e.divId);return Pe(t)?t:e.getAdUnitSizes(e.adUnitKey)}function Ie(e){var t,n,r;let i={desktop:j({},(t=e==null?void 0:e.desktop)==null?{}:t),mobile:j({},(n=e==null?void 0:e.mobile)==null?{}:n),tablet:j({},(r=e==null?void 0:e.tablet)==null?{}:r)},a=w();return{addSizeMaps(e,t){var n,r,o;i[a][e]=[...(n=i[a][e])==null?[]:n,...(r=(o=t[a])==null?void 0:o[e])==null?[]:r]},clearSizeMapping(){i.desktop={},i.mobile={},i.tablet={}},getAdUnitSizes(e,t=a){return i[t][e]||[]},getSizeMapping(e){return i[e]},removeAdUnitSizes(e,t=a){delete i[t][e]},setAdUnitSizes(e,t,n=a){i[n][e]=t}}}var M={Prebid:`prebid`,Gpt:`gpt`,PrebidClientRender:`prebid-client-render`,Fallback:`fallback`},N={Success:`success`,Continue:`continue`,Failure:`failure`,Unfilled:`unfilled`},Le=`slot:unfilled`,Re=`slot:filled`,ze=`slot:onLoad`,Be=`slot:renderEnded`,Ve=`slot:responseReceived`,He=`auction:phaseCompleted`,Ue=`batchSelling:dominationDetected`,We=function(e){return e[e.NoDefinableSlot=0]=`NoDefinableSlot`,e[e.FunctionalError=1]=`FunctionalError`,e}({}),Ge=`pt1-ppid-v2`;function Ke(){let e=le(Ge);return(!e||e.length===0)&&(e=fe(),ue(Ge,e,1440*365)),e}function qe(e){e.setPublisherProvidedId(Ke())}function Je(){let e=``,t=[],n=window.ads_targeting_map;if(n!=null)n.category!=null&&n.category.length>0&&(t=typeof n.category==`string`?[n.category]:n.category),typeof n.page==`string`&&(e=n.page);else{var r,i,a,o,s;let n=document.querySelector(`meta[property='og:type']`);if(n!=null){let t=n.getAttribute(`content`);t!=null&&t===`article`&&(e=`articolo`)}document.body!=null&&document.body.className.length>0&&document.body.className.split(` `).indexOf(`home`)>=0&&(e=`homepage`),(((r=window.location)==null?void 0:r.pathname)===``||((i=window.location)==null?void 0:i.pathname)===`/`||((a=window.location)==null?void 0:a.pathname)==null)&&(e=`homepage`),(o=window.location)!=null&&o.hostname&&((s=window.location)==null?void 0:s.hostname.indexOf(`forum`))>=0&&(e=`forum`);let l=document.querySelector(`meta[property='og:section']`),u=document.querySelector(`meta[property='article:section']`);c(l),c(u);function c(e){if(e!=null){let n=e.getAttribute(`content`);if(n!=null&&n!==``){let e=n.split(`,`);for(let n of e)t.push(n.trim())}}}}return{pageTargeting:e,sectionsTargeting:t}}function Ye(e){return e?e.includes(`Firefox`)?`Mozilla Firefox`:e.includes(`SamsungBrowser`)?`Samsung Internet`:e.includes(`Opera`)||e.includes(`OPR`)?`Opera`:e.includes(`Trident`)?`Microsoft Internet Explorer`:e.includes(`Edge`)?`Microsoft Edge (Legacy)`:e.includes(`Edg`)?`Microsoft Edge (Chromium)`:e.includes(`Chrome`)?`Google Chrome or Chromium`:e.includes(`Safari`)?`Apple Safari`:`unknown`:`unknown`}var Xe=.1,Ze=`debug_pps_holdout`,Qe=`debug_pps`,$e=new WeakMap,et=new WeakMap,tt=new WeakMap,nt=new WeakMap,rt=new WeakSet,it=class{constructor({config:e,readPage:t,holdoutRate:n=Xe,random:r=Math.random}){var o;i(this,rt),a(this,$e,void 0),a(this,et,void 0),a(this,tt,void 0),a(this,nt,void 0),s($e,this,e),s(tt,this,t),s(nt,this,dt((o=e==null?void 0:e.vertical)==null?[]:o)),s(et,this,ct(n,r))}isHoldout(){return c(et,this)}resolve(){if(c(et,this))return{holdout:!0,ids:[],pageIds:[],siteIds:[]};let e=dt(o(rt,this,at).call(this));return{holdout:!1,ids:dt([...e,...c(nt,this)]).slice(0,10),pageIds:e,siteIds:c(nt,this)}}};function at(){var e,t,n;let{pageType:r,sections:i}=c(tt,this).call(this),a=(e=c($e,this))==null||(t=e.resolve)==null?void 0:t.call(e,{pageType:r,path:window.location.pathname,sections:i});return a===void 0?ut(i,(n=c($e,this))==null?void 0:n.sections):a}function ot(e){return e.ids.length>0?{taxonomies:{IAB_CONTENT_2_2:{values:e.ids}}}:null}function st(e){return e.holdout?`0`:`1`}function ct(e,t){return he(Ze)?!0:!he(Qe)&&t()[lt(e),t]));return e.flatMap(e=>{var t;return[...(t=n.get(lt(e)))==null?[]:t]})}function dt(e){return[...new Set(e)]}window.googletag=window.googletag||{cmd:[]};var ft=`ptechsdepth`,pt=[`active`,`passive`],mt=`Google Publisher Tag library was overridden or is not available`;function ht(){let e=window.googletag;if(e==null)throw Error(mt);return e}function gt(e){var t;let n=ht();if(n.apiReady)return e();if(typeof((t=n.cmd)==null?void 0:t.push)!=`function`)throw Error(mt);n.cmd.push(()=>{e()})}var P=class extends Error{constructor(e){super(e),this.name=`NoDefinableSlotError`}};function _t(e){if(e.fetchGpt){let e=document.getElementsByTagName(`script`),t=`https://securepubads.g.doubleclick.net/tag/js/gpt.js`,n=!0;for(let r of e)if(r.getAttribute(`src`)===t){n=!1;break}n&&g.getInstance().loadScript({scriptTag:`securepubads`,scriptUrl:t})}return e.fetchGoogleTag&&g.getInstance().loadScript({scriptTag:`googletag`,scriptUrl:`https://www.googletagservices.com/tag/js/gpt.js`}),t=>{var n;return new Tt(j(j({},e),{},{prefixFullNameAd:(n=t.overridePrefixFullNameAd)==null?e.prefixFullNameAd:n,siteCategory:t.siteCategory,contentSignals:t.contentSignals,contextManager:t.contextManager,eventDispatcher:t.eventDispatcher,consentReader:t.consentReader,divIdToAdUnitKeyMapping:t.divIdToAdUnitKeyMapping,getAdUnitSizes:t.getAdUnitSizes}))}}var vt=new WeakMap,yt=new WeakMap,bt=new WeakMap,xt=new WeakMap,St=new WeakMap,Ct=new WeakMap,F=new WeakMap,wt=new WeakMap,I=new WeakMap,L=new WeakSet,Tt=class{constructor({divIdToAdUnitKeyMapping:e,disableInitialLoad:t=!0,getAdUnitSizes:n,prefixFullNameAd:r,siteCategory:l,contentSignals:u,contextManager:d,eventDispatcher:f,globalTargetingTransformer:p,slotTargetingTransformer:m,personalizedAds:h,consentReader:g}){i(this,L),a(this,vt,void 0),a(this,yt,void 0),a(this,bt,void 0),a(this,xt,void 0),a(this,St,void 0),a(this,Ct,void 0),a(this,F,new Set),a(this,wt,new Map),a(this,I,void 0),s(I,this,e),s(xt,this,n),s(vt,this,r),s(St,this,p),s(Ct,this,m),s(bt,this,d),s(yt,this,u),d.on(`contextUpdated`,({context:e,navigationContext:t})=>{o(L,this,Nt).call(this,{siteCategory:l,context:e,navigationContext:t})}),d.on(`visibilityChanged`,e=>{gt(()=>{window.googletag.setConfig({targeting:{tab_visible:pt.includes(e)?`yes`:`no`}})})});let _=d.getCurrentContext();o(L,this,Nt).call(this,{siteCategory:l,context:_,navigationContext:_.navigationContext}),gt(()=>{window.googletag.setConfig({singleRequest:!0,disableInitialLoad:t,centering:!0,autoRefresh:{backForwardCache:!1}}),window.googletag.pubads().addEventListener(`slotOnload`,e=>{let t={EVENT_NAME:ze,adUnitKey:this.resolveSlotDivId(e.slot),adProvider:`gpt`};f.dispatch(t)}),window.googletag.pubads().addEventListener(`slotResponseReceived`,e=>{let t=this.resolveSlotDivId(e.slot),n=c(I,this)&&c(I,this)[t]?c(I,this)[t]:t,r=e.slot.getResponseInformation(),i=j(j({EVENT_NAME:Ve,divId:t,adUnitKey:n,isEmpty:r===null,adProvider:`gpt`},typeof(r==null?void 0:r.lineItemId)==`number`?{lineItemId:r.lineItemId}:{}),typeof(r==null?void 0:r.creativeId)==`number`?{creativeId:r.creativeId}:{});f.dispatch(i)}),window.googletag.pubads().addEventListener(`slotRenderEnded`,e=>{let t=this.resolveSlotDivId(e.slot),n=j(j({EVENT_NAME:Be,divId:t,adUnitKey:c(I,this)&&c(I,this)[t]?c(I,this)[t]:t,isEmpty:e.isEmpty,adProvider:`gpt`},typeof e.lineItemId==`number`?{lineItemId:e.lineItemId}:{}),typeof e.creativeId==`number`?{creativeId:e.creativeId}:{});f.dispatch(n)}),h!==void 0&&window.googletag.pubads().setPrivacySettings({nonPersonalizedAds:!h}),qe(window.googletag.pubads()),window.googletag.enableServices()}),g&&g.onConsentReleased({onConsentCallback:e=>{gt(()=>{window.googletag.pubads().setPrivacySettings({nonPersonalizedAds:!e.personalizedAds})})}})}getPrefixFullNameAd(){return c(vt,this)}applyPublisherProvidedSignals(){if(c(yt,this)==null)return;let e=c(yt,this).resolve();gt(()=>{window.googletag.setConfig({pps:ot(e)})})}hasDefinedSlot(e){return c(F,this).has(e)}resolveSlotDivId(e){var t;let n=e.getSlotElementId();return(t=c(wt,this).get(n))==null?n:t}destroySlot(e){o(L,this,kt).call(this,()=>{let t=googletag.pubads().getSlots().find(t=>this.resolveSlotDivId(t)===e);t!=null&&(googletag.destroySlots([t]),c(wt,this).delete(t.getSlotElementId())),c(F,this).delete(e)})}defineSlot({adUnitKey:e,divId:t,refreshCount:n=0,overrideSlotName:r,overrideTargeting:i,overrideAdUnitSizes:a,slotType:o=`display`,existingGoogleTagSlot:s}){return this.defineSlots([{adUnitKey:e,divId:t,refreshCount:n,overrideSlotName:r,overrideTargeting:i,overrideAdUnitSizes:a,slotType:o,existingGoogleTagSlot:s}]).then(e=>e[0])}defineSlots(e){return o(L,this,kt).call(this,()=>{let t=[];for(let n of e)t.push(o(L,this,Dt).call(this,n));return t})}refreshSlot(e){return this.refreshSlots([e]).then(e=>e[0])}refreshSlots(e){return o(L,this,kt).call(this,()=>{let t=[];for(let n of e){let e=o(L,this,Ot).call(this,n);if(e==null)throw new P(`No defined slot found for adUnitKey: `+n.adUnitKey+` and divId: `+n.divId);t.push(e)}return o(L,this,Et).call(this,t)})}sellAdSlot({adUnitKey:e,divId:t,refreshCount:n=0,overrideSlotName:r,overrideTargeting:i,overrideAdUnitSizes:a,slotType:o=`display`,existingGoogleTagSlot:s}){return this.sellAdSlots([{adUnitKey:e,divId:t,refreshCount:n,overrideSlotName:r,overrideTargeting:i,overrideAdUnitSizes:a,slotType:o,existingGoogleTagSlot:s}]).then(e=>e[0])}sellAdSlots(e){return o(L,this,kt).call(this,()=>{let t=[];for(let n of e)t.push(o(L,this,Dt).call(this,n));return o(L,this,Et).call(this,t)})}};function Et(e){let t=Array.from(e);return window.googletag.pubads().refresh(t),t}function Dt({adUnitKey:e,divId:t,refreshCount:n=0,overrideSlotName:r,overrideTargeting:i,overrideAdUnitSizes:a,slotType:s=`display`,existingGoogleTagSlot:l}){let u=c(vt,this)+(typeof r==`string`?r:e);if(s===`outOfPageInterstitial`)return o(L,this,At).call(this,{fullNameAd:u,divId:t,overrideTargeting:i});if(s===`outOfPageRightSideRail`||s===`outOfPageLeftSideRail`)return o(L,this,jt).call(this,{fullNameAd:u,divId:t,side:s===`outOfPageRightSideRail`?`right`:`left`,overrideTargeting:i});if(s===`outOfPageBottomAnchor`)return o(L,this,Mt).call(this,{fullNameAd:u,divId:t,refreshCount:n,overrideTargeting:i});let d=document.getElementById(t);if(d==null)throw new P(`No HTML element found with id: `+t);let f=c(F,this).has(t)?o(L,this,Ot).call(this,{adUnitKey:e,divId:t,overrideSlotName:r}):l==null?googletag.defineSlot(u,Fe({getAdUnitSizes:c(xt,this),divId:t,adUnitKey:e,override:a}),t):l;if(f==null)throw new P(`No definable slot found for adUnitKey: `+e+` and divId: `+t);return f.addService(googletag.pubads()),f.setConfig({targeting:i==null?o(L,this,Pt).call(this,{adUnitKey:e,htmlSlotElement:d,refreshCount:n}):i,collapseDiv:`DISABLED`}),c(F,this).add(t),f}function Ot({adUnitKey:e,divId:t,overrideSlotName:n}){let r=googletag.pubads().getSlots(),i=r.find(e=>this.resolveSlotDivId(e)===t);if(i!=null)return i;let a=c(vt,this)+(typeof n==`string`?n:e);return r.find(e=>e.getAdUnitPath()===a)}function kt(e){return new Promise((t,n)=>{try{gt(()=>{try{t(e())}catch(e){n({reason:e instanceof P?We.NoDefinableSlot:We.FunctionalError,message:e instanceof Error?e.message:`Unknown error`})}})}catch(e){n({reason:We.FunctionalError,message:mt})}})}function At({fullNameAd:e,divId:t,overrideTargeting:n}){var r;let i=(r=googletag.enums)==null||(r=r.OutOfPageFormat)==null?void 0:r.INTERSTITIAL;if(i==null)throw Error(`GPT OutOfPageFormat.INTERSTITIAL unavailable`);if(c(F,this).has(t)){let t=googletag.pubads().getSlots().find(t=>t.getAdUnitPath()===e);if(t)return t}let a=googletag.defineOutOfPageSlot(e,i);if(a==null)throw new P(`No definable out-of-page interstitial slot for adUnitPath: `+e);return c(F,this).add(t),n!=null&&a.setConfig({targeting:n}),a.addService(googletag.pubads()),a}function jt({fullNameAd:e,divId:t,side:n,overrideTargeting:r}){var i,a;let s=n===`right`?(i=googletag.enums)==null||(i=i.OutOfPageFormat)==null?void 0:i.RIGHT_SIDE_RAIL:(a=googletag.enums)==null||(a=a.OutOfPageFormat)==null?void 0:a.LEFT_SIDE_RAIL;if(s==null)throw Error(`GPT OutOfPageFormat.${n===`right`?`RIGHT_SIDE_RAIL`:`LEFT_SIDE_RAIL`} unavailable`);if(c(F,this).has(t)){let t=googletag.pubads().getSlots().find(t=>t.getAdUnitPath()===e);if(t)return t}let l=googletag.defineOutOfPageSlot(e,s);if(l==null)throw new P(`No definable out-of-page ${n} side rail slot for adUnitPath: `+e);c(F,this).add(t);let u=document.getElementById(t),d=r==null?o(L,this,Pt).call(this,{adUnitKey:t,htmlSlotElement:u==null?document.createElement(`div`):u,refreshCount:0}):r;return l.setConfig({targeting:d}),l.addService(googletag.pubads()),l}function Mt({fullNameAd:e,divId:t,refreshCount:n,overrideTargeting:r}){var i;let a=(i=googletag.enums)==null||(i=i.OutOfPageFormat)==null?void 0:i.BOTTOM_ANCHOR;if(a==null)throw new P(`GPT OutOfPageFormat.BOTTOM_ANCHOR unavailable`);let s=c(F,this).has(t)?googletag.pubads().getSlots().find(e=>this.resolveSlotDivId(e)===t):void 0,l=s==null?googletag.defineOutOfPageSlot(e,a):s;if(l==null)throw new P(`No definable bottom anchor slot for adUnitPath: `+e);return l.setConfig({targeting:r==null?o(L,this,Pt).call(this,{adUnitKey:t,htmlSlotElement:document.createElement(`div`),refreshCount:n}):r}),s==null&&(c(wt,this).set(l.getSlotElementId(),t),c(F,this).add(t),l.addService(googletag.pubads())),l}function Nt({siteCategory:e,context:t,navigationContext:n}){var r;let i=Number(le(ft));i===0?i=1:n!==`infinite-scroll`&&i++;let a=t.navigationContext!==`initial`||document.referrer.indexOf(window.location.hostname)===-1,{pageTargeting:o,sectionsTargeting:s}=Je(),l=(r=c(yt,this))==null?void 0:r.resolve(),u=j({"site-category":e==null?null:[...e],browser:Ye(navigator.userAgent),pageview:a?`1`:`0`,sessiondepth:String(i),tab_visible:pt.includes(t.lifecycleState)?`yes`:`no`,pagina:o,section:s},l?{pps:st(l)}:{});gt(()=>{window.googletag.setConfig(j({targeting:c(St,this)?c(St,this).call(this,u):u},l?{pps:ot(l)}:{}))}),ue(ft,i)}function Pt({adUnitKey:e,htmlSlotElement:t,refreshCount:n}){let r={};if(t!=null&&t.getAttribute(`data-targeting`)!=null)try{for(let[e,n]of Object.entries(JSON.parse(t.getAttribute(`data-targeting`)||`{}`)))r[e]=n}catch(e){}let i=c(bt,this).getCurrentContext().path,a=i.split(`/`)[1]||`home`;return r=j(j({},r),{},{SPurl:a.length>0?a.slice(-40):`home`,path:i.slice(-40),Refresh:String(n)}),c(Ct,this)?c(Ct,this).call(this,e,t,r):r}function Ft(e){let t=window.location.hostname;if(t.indexOf(e)>-1)return!0;let n=e.replace(/\./g,`-`);return t.indexOf(n)>-1||window.location.href.indexOf(e)>-1&&(t.indexOf(`webcache.googleusercontent.com`)>-1||t.indexOf(`web.archive.org`)>-1||t.indexOf(`googleweblight.com`)>-1)}var It=[{site:`qn`,sellerId:`124`,websiteId:124,websiteDomain:`quotidiano.net`,slug:`itquotidianonet`,pubstackId:`f3a4db7f-eb5f-40de-ad42-68b961a08042`,prebidServerAccountId:`f3a4db7f-eb5f-40de-ad42-68b961a08042`},{site:`ilgiorno`,sellerId:`173`,websiteId:173,websiteDomain:`ilgiorno.it`,slug:`itilgiornoit`,pubstackId:`6a5fb336-8bbd-43ec-87b2-73793e762198`,prebidServerAccountId:`6a5fb336-8bbd-43ec-87b2-73793e762198`},{site:`ilresto`,sellerId:`172`,websiteId:172,websiteDomain:`ilrestodelcarlino.it`,slug:`itilrestodelcarlinoit`,fullNameAd:``,pubstackId:`fb3b13cf-93ff-4036-841e-96f21b637aaf`,prebidServerAccountId:`fb3b13cf-93ff-4036-841e-96f21b637aaf`},{site:`lanazione`,sellerId:`174`,websiteId:174,websiteDomain:`lanazione.it`,slug:`itlanazioneit`,pubstackId:`fe387543-0b63-4b5a-99ac-6caa073db85a`,prebidServerAccountId:`fe387543-0b63-4b5a-99ac-6caa073db85a`},{site:`iltelegrafo`,sellerId:`175`,websiteId:175,websiteDomain:`iltelegrafolivorno.it`,slug:`itiltelegrafolivornoit`,pubstackId:`399eb4df-56f7-4618-a1b4-49a90ac548bf`}];function Lt(){return It.find(e=>Ft(e.websiteDomain))}function Rt(e){var t,n,r,i;(t=window).pbstck!=null||(t.pbstck={}),(n=window.pbstck).sdk!=null||(n.sdk={});let a=(i=(r=window.pbstck.sdk)[e])==null?r[e]={}:i;a.g=`Pubstack`,a.q!=null||(a.q=[]),window.Pubstack={cmd:function(...e){var t,n;(t=a.q)==null||t.push([`cmd`,e]),((n=a.p)==null?[]:n).forEach(t=>{t([`cmd`,e])})}};let o=document.createElement(`script`);o.id=`pubstack`,o.type=`text/javascript`,o.async=!0,o.setAttribute(`data-cfasync`,`false`),o.src=`https://boot.pbstck.com/v1/tag/${e}`,document.head.appendChild(o)}function zt(){var e,t,n,r;let i=`km-h2uBS40wpYfw6fm649BUwy-g`;(e=window).confiant!=null||(e.confiant={});let a=(n=(t=window.confiant)[i])==null?t[i]={}:n;((r=a.clientSettings)==null?a.clientSettings={}:r).prebidNameSpace=`pubtech_pbjs`;let o=document.createElement(`script`);o.id=`confiant`,o.type=`text/javascript`,o.async=!0,o.setAttribute(`data-cfasync`,`false`),o.src=`https://cdn.confiant-integrations.net/${i}/gpt_and_prebid/config.js`,document.head.appendChild(o)}var Bt=`https://stg-floor-provider.pubtech.ai`;function Vt({device:e,websiteId:t}){if(typeof fetch!=`function`)return null;let n=`${Bt}/${t}_${e}.json`,r=performance.now(),i=fetch(n,{credentials:`omit`});return i.catch(()=>{}),{device:e,response:i,startedAt:r,url:n}}var Ht=`__engine_prebid_ready__`,Ut=`https://ads.talkscreativity.com/assets/publisher/monrif/prebid.KHgkcHHi.js`,Wt=3;function Gt(e={}){let t=e.dynamicFloors==null?null:Vt({device:w(),websiteId:e.dynamicFloors.websiteId}),n={attempt:0,lastError:`UNKNOWN`},r=null;return new Promise((e,i)=>{let a=n=>{if(r!=null&&(r.onerror=null),!Yt(n)){i(Error(`[Engine] Prebid provider received via event is not a function`));return}e(t==null?n.detail:Kt(n.detail,t))},o=()=>{n.attempt+=1;let e=Zt();r=e,e.onerror=t=>{if(n.lastError=qt(t),e.parentNode!=null&&e.parentNode.removeChild(e),n.attempt>=Wt){document.removeEventListener(Ht,a),i(Error(`[Engine] Failed to load prebid bundle: `+e.src+` - `+n.lastError+` (attempts: `+n.attempt+`)`));return}if(n.lastError===`ERR_NET_OFFLINE`){Xt().then(o);return}o()},document.head.appendChild(e)};document.addEventListener(Ht,a,{once:!0}),o()})}function Kt(e,t){return n=>e(j(j({},n),{},{dynamicFloorsRequest:t}))}function qt(e){let t=String(e);return(e instanceof Event?e.target:null)instanceof HTMLScriptElement||(t=`ERR_NO_SCRIPT_ELEMENT`),navigator.onLine||(t=`ERR_NET_OFFLINE`),t}function Jt(e){return typeof e==`function`}function Yt(e){return e instanceof CustomEvent&&Jt(e.detail)}function Xt(){return navigator.onLine?Promise.resolve():new Promise(e=>{window.addEventListener(`online`,()=>{e()},{once:!0})})}function Zt(){let e=document.createElement(`script`);return e.src=Ut,e.async=!0,e}var Qt=`plugin:completed`;function $t(e,t,n){return en.apply(this,arguments)}function en(){return en=u(function*(e,t,r){let i=Array.isArray(e)?e:[e],a=[];for(let e=0;e0&&(yield n(),r.debug(`Yielded to the main thread before starting compile plugin [${o.pluginName}]`)),a.push(new Promise(e=>{try{let n=o.run(n=>{n.type===`error`&&r.error(`Compile plugin [${o.pluginName}] error:`,n.message);let i=n.type===`completed`&&n.deliveryStatus!==void 0?{deliveryStatus:n.deliveryStatus}:void 0;t.dispatch({EVENT_NAME:Qt,metadata:i,pluginName:o.pluginName,outcome:n.type===`completed`?`success`:n.type}),e()});n instanceof Promise&&n.catch(n=>{r.error(`Compile plugin [${o.pluginName}] threw:`,n),t.dispatch({EVENT_NAME:Qt,pluginName:o.pluginName,outcome:`error`}),e()})}catch(n){r.error(`Compile plugin [${o.pluginName}] threw synchronously:`,n),t.dispatch({EVENT_NAME:Qt,pluginName:o.pluginName,outcome:`error`}),e()}}))}Promise.allSettled(a)}),en.apply(this,arguments)}function tn(e,t,n){let r=Object.entries(e).sort(([e],[t])=>Number(e)-Number(t)).map(([,e])=>e),i=[],a={},o=new Map,s=new Map;for(let e of r)e.plugin!==null&&s.set(e.plugin.pluginName,e);let c=0,l=null,d=null,f=new Map;function p(e,t){return t!==void 0&&f.get(e)===t}function m(e,t){try{var n;let r=(n=e.softTeardown)==null?void 0:n.call(e,t);return r==null?void 0:r.catch(t=>{console.debug(`Plugin [${e.pluginName}] soft teardown rejected:`,t)})}catch(t){console.debug(`Plugin [${e.pluginName}] soft teardown threw:`,t);return}}function h(e,t,n){let i;for(let a=r.length-1;a>=0;a--){let o=r[a].plugin;if((o==null?void 0:o.softTeardown)!=null&&!p(o.pluginName,t)){if(i!=null){i=i.then(()=>{if(e===c)return m(o,n)});continue}i=m(o,n)}}return i}function g(e,t,n,r){let i={afterFlowOnly:r,completions:new Map,token:e,url:t,virtualNavigationType:n};return _(i),i}function _(e){for(let{plugin:t}of r){if(t===null||e.completions.has(t.pluginName)||p(t.pluginName,e.url))continue;let n=o.get(t.pluginName);if(n===void 0||e.afterFlowOnly&&n.position!==`engine:afterFlow`)continue;let r,i=new Promise(e=>{r=e});e.completions.set(t.pluginName,{promise:i,settle:r}),delete a[t.pluginName]}}function ee(e,t){return v.apply(this,arguments)}function v(){return v=u(function*(e,t){let n=t;for(;n!==c;){n=c;let t=(l==null?void 0:l.token)===n?l.closing:void 0;if(t!=null&&(yield t),n!==c)continue;let r=d;if(r===null||r.token!==n)return;let i=b(e,r);if(i.length===0)return;yield Promise.all(i)}}),v.apply(this,arguments)}function y(){let e=d;if(e!==null){d=null;for(let{settle:t}of e.completions.values())t()}}function b(e,t){var n;let r=(n=s.get(e))==null?void 0:n.waitFor;if(r===void 0)return[];let i=[];for(let n of r){if(typeof n!=`string`||n===e)continue;let r=t.completions.get(n);r!==void 0&&i.push(r.promise)}return i}function x(e,t){for(let{plugin:n}of r){if(n===null)continue;if(t.token!==c)return;let r=o.get(n.pluginName);r===void 0||r.position!==e||t.completions.has(n.pluginName)&&S(n.pluginName,r,t)}}function S(e,t,n){return C.apply(this,arguments)}function C(){return C=u(function*(e,t,r){try{let i=b(e,r);if(i.length>0&&(yield Promise.all(i)),r.token!==c)return;if(typeof t.getShouldRun==`function`){let e=t.getShouldRun({context:n,pluginOutcomes:a});if(!(e instanceof Promise?yield e:e)||r.token!==c)return}r.url!==void 0&&f.set(e,r.url),yield t.run(r.virtualNavigationType)}catch(t){console.debug(`Plugin [${e}] rerun failed:`,t)}finally{var i;(i=r.completions.get(e))==null||i.settle()}}),C.apply(this,arguments)}function w(e,t){let n=(l==null?void 0:l.token)===t.token?l.closing:void 0;if(n==null){x(e,t);return}n.then(()=>{t.token===c&&x(e,t)})}function te(e,n){return typeof n==`string`?a[n]!==void 0||s.get(n)===void 0?Promise.resolve():new Promise(r=>{let{unsubscribe:i}=t.subscribe({eventName:Qt,subscriberName:`chain-wait-${e}-for-${n}`,callback:e=>{var t;e.pluginName===n&&(a[e.pluginName]={deliveryStatus:(t=e.metadata)==null?void 0:t.deliveryStatus,outcome:e.outcome},i(),r())}})}):n}function ne(e,t){if(t.type!==`virtual`)return;let r=t.virtualNavigationType;if(r===void 0||r===`infinite-scroll`)return;let i=r===`bfcache-restore`?void 0:t.url;if(e===`engine:beforeFlow`){let t=++c;if(l=null,y(),n.adSlotLifecycleApi.isAdvDisabled())return;let a=g(t,i,r,!1);d=a;let o=h(t,i,r);o==null?_(a):l={closing:o.then(()=>{t===c&&_(a)}),token:t},w(e,a);return}if(n.adSlotLifecycleApi.isAdvDisabled()){y();return}let a=c,o=d!==null&&d.token===a?d:null;o===null&&(o=g(a,i,r,!0),d=o),w(e,o)}for(let e of[es,ts])t.subscribe({eventName:e,subscriberName:`chain-virtual-navigation-${e}`,callback:t=>ne(e,t)});for(let e of r){var T;let r=e.plugin;if(r===null)continue;let s=r.pluginName,{getShouldRun:l,timeout:d,waitFor:p}=e;r.onDisableAds!=null&&t.subscribe({eventName:es,subscriberName:`${s}-disable-ads`,callback:function(){var e=u(function*(e){var t;e.type===`virtual`&&e.virtualNavigationType!==void 0&&n.adSlotLifecycleApi.isAdvDisabled()&&(yield(t=r.onDisableAds)==null?void 0:t.call(r,e.virtualNavigationType))});return function(t){return e.apply(this,arguments)}}()});let m={pluginName:s,onDisableAds:(T=r.onDisableAds)==null?void 0:T.bind(r),run(e){let t=c,i=(p==null?[]:p).map(e=>te(s,e));(function(){var p=u(function*(){yield Promise.all(i),c!==t&&(yield ee(s,t));let u=!1,p=e=>{a[s]={deliveryStatus:e.type===`completed`?e.deliveryStatus:void 0,outcome:e.type===`completed`?`success`:e.type}},m=t=>{if(u)return;u=!0,p(t);let n=t.type===`completed`?t.onVirtualNavigationHook:void 0;n!=null&&(console.debug(`Plugin [${s}] completed with a virtual navigation hook at ${n.position}.`),o.set(s,{getShouldRun:l,position:n.position,run:n.run})),e(t)},h;if(d!==void 0&&d>0&&(h=setTimeout(()=>{m({type:`timeout`,message:`Plugin [${s}] timed out after ${d}ms`})},d)),typeof l==`function`){let e=l({context:n,pluginOutcomes:a});if(!(e instanceof Promise?yield e:e)){m({type:`skipped`});return}}f.set(s,window.location.href);let g=r.run(e=>{if(h!==void 0&&clearTimeout(h),u){p(e);return}m(e)});g instanceof Promise&&g.catch(e=>{h!==void 0&&clearTimeout(h),m({type:`error`,message:String(e)})})});return function(){return p.apply(this,arguments)}})()().catch(t=>{e({type:`error`,message:String(t)})})}};i.push(m)}return i}function nn(e,t,n,r){let i={},a=0;for(let[,n]of Object.entries(e)){if(!n)continue;let e=null;try{e=n.getPluginInstance(t)}catch(e){r.error(`Plugin factory threw during initialization:`,e)}i[a]={plugin:e,getShouldRun:n.getShouldRun,waitFor:n.waitFor,timeout:n.timeout},a++}return tn(i,n,t)}var rn=new Map([[7,{prefix:`usnat`,optOutFields:[`SaleOptOut`,`SharingOptOut`,`TargetedAdvertisingOptOut`]}],[8,{prefix:`usca`,optOutFields:[`SaleOptOut`,`SharingOptOut`]}],[9,{prefix:`usva`,optOutFields:[`SaleOptOut`,`TargetedAdvertisingOptOut`]}],[10,{prefix:`usco`,optOutFields:[`SaleOptOut`,`TargetedAdvertisingOptOut`]}],[12,{prefix:`usct`,optOutFields:[`SaleOptOut`,`TargetedAdvertisingOptOut`]}],[13,{prefix:`usfl`,optOutFields:[`SaleOptOut`,`TargetedAdvertisingOptOut`]}]]),an=[2,7,9,10],on=100,sn=50;function cn(){return{cmpUiShown:!1,consentManagementMetadata:{},consentManagementType:``,personalizedAds:!0}}var R=new WeakMap,ln=new WeakMap,un=new WeakMap,dn=new WeakMap,fn=new WeakMap,pn=new WeakMap,mn=new WeakMap,hn=new WeakMap,gn=new WeakMap,_n=new WeakMap,vn=new WeakMap,yn=new WeakMap,z=new WeakSet,bn=class{constructor(){i(this,z),a(this,R,new Set),a(this,ln,0),a(this,un,`fallback`),a(this,dn,!1),a(this,fn,null),a(this,pn,null),a(this,mn,!0),a(this,hn,!1),a(this,gn,null),a(this,_n,null),a(this,vn,null),a(this,yn,sn)}onConsentReleased(e){var t,n;let r=e==null?void 0:e.onConsentCallback,i=(t=e==null?void 0:e.waitUntilPersonalizedAdsIsTrue)!=null&&t,a=(n=e==null?void 0:e.once)!=null&&n,l=r?{callback:r,waitForPersonalized:i,once:a}:null;return l&&c(R,this).add(l),c(_n,this)&&l?(o(z,this,On).call(this,l,c(_n,this)),()=>{c(R,this).delete(l)}):(c(hn,this)||((e==null?void 0:e.attemptThreshold)!==void 0&&s(yn,this,e.attemptThreshold),s(hn,this,!0),o(z,this,xn).call(this)),()=>{l&&c(R,this).delete(l)})}hasUserAcceptedConsent(){return c(mn,this)}consentManagementApiUsed(){return c(un,this)}destroy(){s(dn,this,!0),o(z,this,An).call(this),o(z,this,jn).call(this),o(z,this,Mn).call(this),c(R,this).clear()}};function xn(){var e;if(!c(dn,this)){if(window.__tcfapi){o(z,this,Sn).call(this);return}if(window.__gpp){o(z,this,Cn).call(this);return}if(window.__uspapi){o(z,this,wn).call(this);return}if(s(ln,this,(e=c(ln,this),e++,e)),c(yn,this)!==null&&c(ln,this)>=c(yn,this)){o(z,this,Tn).call(this);return}s(gn,this,setTimeout(()=>{o(z,this,xn).call(this)},on))}}function Sn(){let e=window.__tcfapi;e&&e(`addEventListener`,2,(e,t)=>{if(c(dn,this)||!t||(s(vn,this,e.listenerId),e.eventStatus!==`tcloaded`&&e.eventStatus!==`useractioncomplete`))return;s(mn,this,an.every(t=>e.purpose.consents[t]===!0));let n={cmpUiShown:e.eventStatus===`useractioncomplete`,consentManagementMetadata:{},consentManagementType:`tcf`,personalizedAds:c(mn,this)};s(un,this,`tcf`),c(mn,this)&&window.dispatchEvent(new Event(`cookie_accepted`)),o(z,this,En).call(this,n)})}function Cn(){let e=window.__gpp;if(!e)return;let t=e=>{if(c(dn,this)||(s(pn,this,e.listenerId),e.eventName!==`signalStatus`||e.data!==`ready`))return;let{applicableSections:t,parsedSections:n}=e.pingData,r,i;for(let e of t){let t=rn.get(e);if(t){r=t,i=e;break}}if(!r||i===void 0){o(z,this,Mn).call(this),window.__tcfapi?o(z,this,Sn).call(this):window.__uspapi?o(z,this,wn).call(this):o(z,this,Tn).call(this);return}let a=n[r.prefix];if(a&&a.length>0){let e=a[0];for(let t of r.optOutFields)if(e[t]===1){s(mn,this,!1);break}}let l={cmpUiShown:!1,consentManagementMetadata:{gppSectionId:i},consentManagementType:`gpp`,personalizedAds:c(mn,this)};s(un,this,`gpp`),o(z,this,En).call(this,l)};s(fn,this,t),e(`addEventListener`,t)}function wn(){let e=window.__uspapi;e&&e(`getUSPData`,1,(e,t)=>{if(c(dn,this))return;if(!t||e.version!==1){o(z,this,Tn).call(this);return}let n={cmpUiShown:!1,consentManagementMetadata:{uspString:e.uspString},consentManagementType:`usp`,personalizedAds:!0};s(un,this,`usp`),s(_n,this,n),o(z,this,Dn).call(this,n)})}function Tn(){let e=cn();console.log(`ConsentReader: no CMP detected, using fallback`),s(_n,this,e),o(z,this,Dn).call(this,e)}function En(e){s(_n,this,e),o(z,this,Dn).call(this,e),o(z,this,kn).call(this)?console.log(`ConsentReader: listener kept active for non-once subscribers`,e):(o(z,this,jn).call(this),o(z,this,Mn).call(this))}function Dn(e){for(let t of Array.from(c(R,this)))o(z,this,On).call(this,t,e)}function On(e,t){e.waitForPersonalized&&!t.personalizedAds||(e.callback(t),e.once&&c(R,this).delete(e))}function kn(){for(let e of c(R,this))if(!e.once)return!0;return!1}function An(){c(gn,this)!==null&&(clearTimeout(c(gn,this)),s(gn,this,null))}function jn(){c(vn,this)!==null&&window.__tcfapi&&(window.__tcfapi(`removeEventListener`,2,()=>{},c(vn,this)),s(vn,this,null))}function Mn(){c(pn,this)!==null&&window.__gpp&&c(fn,this)&&(window.__gpp(`removeEventListener`,c(fn,this),c(pn,this)),s(fn,this,null),s(pn,this,null))}var Nn,Pn=200,Fn=`spa-route`;function In(){var e;return typeof PerformanceObserver<`u`&&!!((e=PerformanceObserver.supportedEntryTypes)!=null&&e.includes(`soft-navigation`))}function Ln(e){return e===`unknown`?Fn:e}function Rn(){return typeof location>`u`?null:location.href}var zn=new WeakMap,Bn=new WeakMap,Vn=new WeakMap,Hn=new WeakMap,Un=new WeakMap,Wn=new WeakMap,Gn=new WeakMap,B=new WeakMap,Kn=new WeakMap,qn=new WeakMap,Jn=new WeakMap,Yn=new WeakMap,Xn=new WeakMap,V=new WeakSet,Zn=class e{constructor(){i(this,V),a(this,zn,{stateChange:new Set,bfcacheRestore:new Set,virtualPageLoad:new Set,networkChange:new Set,viewTransition:new Set}),a(this,Bn,new Set),a(this,Vn,[]),a(this,Hn,null),a(this,Un,null),a(this,Wn,void 0),a(this,Gn,0),a(this,B,null),a(this,Kn,Rn()),a(this,qn,Rn()),a(this,Jn,Pn),a(this,Yn,!1),a(this,Xn,Fn),s(Wn,this,o(V,this,Qn).call(this))}static init(){if(e.instance)return e.instance;let t=new e;return e.instance=t,o(V,t,er).call(t),t}static getInstance(){return e.instance}static resetForTesting(){let t=e.instance;t&&o(V,t,sr).call(t),e.instance=null}getState(){return c(Wn,this)}on(e,t){let n=c(zn,this)[e];return n.add(t),()=>{n.delete(t)}}registerManagedObserver(e){let t={setup:e,teardown:null};return t.teardown=e(),c(Bn,this).add(t),()=>{t.teardown&&t.teardown(),c(Bn,this).delete(t)}}configure(e={}){var t;o(V,this,nr).call(this);let n=e.provider==null&&e.useSoftNavigationApis===!0&&In();if(n&&o(V,this,tr).call(this),e.titleObserver!==!1){var r,i;let t=(r=e.titleObserver)==null?{}:r,c=Ln((i=t.reportsAs)==null?Fn:i);if(n&&c===`spa-route`)console.warn(`[PLM] 'spa-route' is already covered by the soft-navigation observer, skipping the title observer to avoid double-reporting it`);else{var a;s(Jn,this,(a=t.debounceDuration)==null?Pn:a),s(Xn,this,c),s(Yn,this,!0),o(V,this,ir).call(this)}}(t=e.provider)==null||t.call(e,e=>{this.handleVirtualPageLoad(e)})}transitionTo(e){let t=c(Wn,this);t!==e&&(s(Wn,this,e),o(V,this,or).call(this,`stateChange`,e,t))}handleVirtualPageLoad(e){var t=this;return u(function*(){if(o(V,t,ar).call(t,e))return;let n=Ln(e.type);if(n===`spa-route`){let e=Array.from(c(Bn,t));for(let t of e)t.teardown&&(t.teardown(),t.teardown=null);yield Promise.resolve();for(let t of e)t.teardown=t.setup()}o(V,t,or).call(t,`virtualPageLoad`,e),n===`spa-route`&&c(Yn,t)&&(yield new Promise(e=>setTimeout(e,0)),o(V,t,ir).call(t))})()}};Nn=Zn;function Qn(){return typeof document>`u`?`active`:`prerendering`in document&&document.prerendering?`prerendering`:document.visibilityState===`hidden`?`hidden`:document.hasFocus()?`active`:`passive`}function $n(){document.visibilityState===`hidden`?this.transitionTo(`hidden`):document.hasFocus()?this.transitionTo(`active`):this.transitionTo(`passive`)}function er(){o(V,this,H).call(this,document,`visibilitychange`,()=>{o(V,this,$n).call(this)}),o(V,this,H).call(this,window,`focus`,()=>{document.visibilityState===`visible`&&this.transitionTo(`active`)}),o(V,this,H).call(this,window,`blur`,()=>{document.visibilityState===`visible`&&this.transitionTo(`passive`)}),o(V,this,H).call(this,document,`freeze`,()=>{this.transitionTo(`frozen`)}),o(V,this,H).call(this,document,`resume`,()=>{document.visibilityState===`hidden`?this.transitionTo(`hidden`):document.hasFocus()?this.transitionTo(`active`):this.transitionTo(`passive`)}),o(V,this,H).call(this,window,`pageshow`,e=>{e.persisted&&(this.transitionTo(`active`),o(V,this,or).call(this,`bfcacheRestore`,{isOnline:navigator.onLine}))}),o(V,this,H).call(this,window,`pagehide`,e=>{e.persisted?this.transitionTo(`frozen`):this.transitionTo(`terminated`)}),o(V,this,H).call(this,window,`online`,()=>{o(V,this,or).call(this,`networkChange`,!0)}),o(V,this,H).call(this,window,`offline`,()=>{o(V,this,or).call(this,`networkChange`,!1)}),`prerendering`in document&&document.prerendering&&o(V,this,H).call(this,document,`prerenderingchange`,()=>{this.transitionTo(`active`)}),`onpageswap`in window&&o(V,this,H).call(this,window,`pageswap`,e=>{o(V,this,or).call(this,`viewTransition`,e,`swap`)}),`onpagereveal`in window&&o(V,this,H).call(this,window,`pagereveal`,e=>{o(V,this,or).call(this,`viewTransition`,e,`reveal`)})}function tr(){let e=new PerformanceObserver(e=>{for(let t of e.getEntries())this.handleVirtualPageLoad({url:t.name||location.href,type:`spa-route`})});e.observe({type:`soft-navigation`,buffered:!0}),s(Un,this,()=>e.disconnect())}function nr(){s(Yn,this,!1),s(Kn,this,Rn()),s(qn,this,Rn()),s(Xn,this,Fn),s(Jn,this,Pn),o(V,this,rr).call(this),c(Un,this)&&(c(Un,this).call(this),s(Un,this,null))}function rr(){c(Hn,this)&&(c(Hn,this).disconnect(),s(Hn,this,null)),c(B,this)!==null&&(clearTimeout(c(B,this)),s(B,this,null))}function ir(){o(V,this,rr).call(this);let e=null,t=new MutationObserver(()=>{c(B,this)!==null&&clearTimeout(c(B,this)),s(B,this,setTimeout(()=>{var t,n;if(s(B,this,null),document.title==e)return;e=document.title;let r=(t=Rn())==null?``:t,i=r!==c(qn,this);s(qn,this,r),s(Gn,this,(n=c(Gn,this),n++,n)),this.handleVirtualPageLoad({url:i?r:`${r}#pt-title-${c(Gn,this)}`,type:c(Xn,this)})},c(Jn,this)))});function n(){let n=document.querySelector(`title`);if(!n){console.log(`[PLM] No element found, skipping title observer`);return}e=document.title,t.observe(n,{childList:!0,characterData:!0,subtree:!0})}T(function(){document.readyState==`interactive`?document.addEventListener(`readystatechange`,()=>{document.readyState==`complete`&&n()}):n()}),s(Hn,this,t)}function ar({url:e}){return e===c(Kn,this)?!0:(s(Kn,this,e),!1)}function or(e,...t){let n=Array.from(c(zn,this)[e]);for(let e of n)e(...t)}function H(e,t,n){e.addEventListener(t,n),c(Vn,this).push(()=>{e.removeEventListener(t,n)})}function sr(){for(let e of c(Vn,this))e();c(Vn,this).length=0,o(V,this,nr).call(this);for(let e of Array.from(c(Bn,this)))e.teardown&&e.teardown();c(Bn,this).clear();for(let e of Object.keys(c(zn,this)))c(zn,this)[e].clear()}Nn.instance=null;var cr=[`og:type`,`article:section`,`article:tag`,`page-type`],lr=new Set([`active`,`passive`,`hidden`,`frozen`]),ur=new WeakMap,dr=new WeakMap,fr=new WeakMap,pr=new WeakMap,mr=new WeakMap,U=new WeakMap,hr=new WeakMap,W=new WeakSet,gr=class{constructor(e,t){var n;i(this,W),a(this,ur,[]),a(this,dr,{contextUpdated:new Set,visibilityChanged:new Set,networkChanged:new Set}),a(this,fr,[]),a(this,pr,void 0),a(this,mr,void 0),a(this,U,void 0),a(this,hr,null),s(pr,this,(n=e==null?void 0:e.metaTagWhitelist)==null?cr:n),s(mr,this,t==null?((e,t)=>{console.error(`ContextManager: ${e}`,t)}):t),s(U,this,o(W,this,_r).call(this,`initial`)),o(W,this,yr).call(this),ne()||o(W,this,Sr).call(this)}getCurrentContext(){return o(W,this,xr).call(this,c(U,this))}on(e,t){let n=c(dr,this)[e];return n.add(t),()=>{n.delete(t)}}registerContextTransformer(e){c(ur,this).push(e)}destroy(){for(let e of c(fr,this))e();c(fr,this).length=0,c(hr,this)&&(c(hr,this).call(this),s(hr,this,null));for(let e of Object.keys(c(dr,this)))c(dr,this)[e].clear();c(ur,this).length=0}};function _r(e){let t=Zn.getInstance(),n=t?t.getState():`active`;return Object.freeze({url:window.location.href,host:window.location.host,pathSegments:Object.freeze(re()),path:window.location.pathname,queryParams:Object.freeze(E()),pageType:ie(),customTargeting:Object.freeze(ae(c(pr,this))),lifecycleState:n,navigationContext:e,isOnline:navigator.onLine,author:D()})}function vr(e,t){return Object.freeze(j(j({},c(U,this)),{},{[e]:t}))}function yr(){let e=Zn.getInstance();e&&(c(fr,this).push(e.on(`virtualPageLoad`,e=>{let t=e.type===`infinite-scroll`?`infinite-scroll`:`spa-route`;o(W,this,br).call(this,t)})),c(fr,this).push(e.on(`bfcacheRestore`,()=>{o(W,this,br).call(this,`bfcache-restore`)})),c(fr,this).push(e.on(`stateChange`,e=>{lr.has(e)&&(s(U,this,o(W,this,vr).call(this,`lifecycleState`,e)),o(W,this,Cr).call(this,`visibilityChanged`,e))})),c(fr,this).push(e.on(`networkChange`,e=>{s(U,this,o(W,this,vr).call(this,`isOnline`,e)),o(W,this,Cr).call(this,`networkChanged`,e)})))}function br(e){let t=c(U,this);s(U,this,o(W,this,_r).call(this,e)),o(W,this,Cr).call(this,`contextUpdated`,{context:o(W,this,xr).call(this,c(U,this)),previousContext:o(W,this,xr).call(this,t),navigationContext:e})}function xr(e){let t=e;for(let e of c(ur,this))try{t=Object.freeze(e(t))}catch(e){return c(mr,this).call(this,`transformer threw during pipeline execution`,e),t}return t}function Sr(){s(hr,this,T(()=>{s(hr,this,null),o(W,this,br).call(this,`initial`)}))}function Cr(e,...t){let n=Array.from(c(dr,this)[e]);for(let e of n)e(...t)}var wr=new WeakMap,Tr=new WeakMap,G=new WeakMap,Er=class{constructor(e){a(this,wr,0),a(this,Tr,void 0),a(this,G,{}),s(Tr,this,e)}subscribe({callback:e,eventName:t,priority:n,subscriberName:r,waitFor:i}){c(G,this)[t]||(c(G,this)[t]={});let a=n==null?c(wr,this):n;for(;c(G,this)[t][a];)a++;return c(G,this)[t][a]={callback:e,subscriberName:r,waitFor:i},{unsubscribe:()=>{delete c(G,this)[t][a]}}}dispatch(e){let t=e.EVENT_NAME;if(c(Tr,this).isDebug&&(c(Tr,this).debug(`Dispatching event ${t}`,e),c(Tr,this).debug(`Subscribers for event ${t}:`,c(G,this)[t]?Object.values(c(G,this)[t]).map(e=>e.subscriberName):`No subscribers`)),!c(G,this)[t])return;let n=Object.keys(c(G,this)[t]).map(Number).sort((e,t)=>t-e);for(let r of n){let{callback:n,subscriberName:i,waitFor:a}=c(G,this)[t][r];try{a?a.then(()=>{n(e)}).catch(t=>{c(Tr,this).error(`Something went wrong in ${i} waitFor, subscribed to the event: ${e.EVENT_NAME}`,t)}):n(e)}catch(t){c(Tr,this).error(`Something went wrong in ${i}, subscribed to the event: ${e.EVENT_NAME}`,t)}}}},Dr=`slot:missing-element`,Or=`slot:missing-element:abandoned`,kr=new WeakMap,Ar=new WeakMap,jr=new WeakMap,Mr=new WeakMap,Nr=new WeakMap,Pr=new WeakMap,Fr=new WeakMap,K=new WeakMap,Ir=new WeakMap,Lr=new WeakMap,Rr=new WeakMap,q=new WeakMap,J=new WeakSet,zr=class{constructor({monetizationManager:e,eventDispatcher:t,logger:n,observerRootMargin:r}){i(this,J),a(this,kr,1e3),a(this,Ar,`500px 15px`),a(this,jr,`300px 15px`),a(this,Mr,w()),a(this,Nr,void 0),a(this,Pr,void 0),a(this,Fr,void 0),a(this,K,new Map),a(this,Ir,new Map),a(this,Lr,void 0),a(this,Rr,new Map),a(this,q,void 0),s(Nr,this,t),s(Fr,this,n),s(Lr,this,e);let l=r||(c(Mr,this)===C.MOBILE?c(jr,this):c(Ar,this));s(Pr,this,new IntersectionObserver(o(J,this,Br).bind(this),{threshold:0,rootMargin:l}))}register(e,t){let n=document.getElementById(e.divId);if(n!=null){c(Rr,this).set(e.divId,{slot:e,options:t}),c(Pr,this).observe(n);return}c(Fr,this).warn(`Element ${e.divId} not found at registration time, starting recovery`),o(J,this,Vr).call(this,e,t),c(Nr,this).dispatch({EVENT_NAME:Dr})}destroy(){o(J,this,Ur).call(this),o(J,this,Wr).call(this)}};function Br(e){for(let t of e){if(!t.isIntersecting)continue;let e=t.target.id;if(!c(Rr,this).has(e))continue;let{slot:n,options:r}=c(Rr,this).get(e);c(Lr,this).sell(n,r),c(Rr,this).delete(e),c(Pr,this).unobserve(t.target)}}function Vr(e,t){c(K,this).set(e.divId,{slot:e,options:t}),c(q,this)==null&&(s(q,this,new MutationObserver(o(J,this,Hr).bind(this))),c(q,this).observe(document.body,{childList:!0,subtree:!0}));let n=setTimeout(()=>{c(K,this).has(e.divId)&&(c(Fr,this).warn(`Element ${e.divId} was never found, the slot has been abandoned for this session`),c(K,this).delete(e.divId),c(Nr,this).dispatch({EVENT_NAME:Or}),c(K,this).size===0&&o(J,this,Ur).call(this))},c(kr,this));c(Ir,this).set(e.divId,n)}function Hr(){for(let[e,{slot:t,options:n}]of c(K,this)){let r=document.getElementById(e);if(r==null)continue;let i=c(Ir,this).get(e);i!=null&&(clearTimeout(i),c(Ir,this).delete(e)),c(Rr,this).set(e,{slot:t,options:n}),c(Pr,this).observe(r),c(K,this).delete(e)}c(K,this).size===0&&o(J,this,Ur).call(this)}function Ur(){c(q,this)!=null&&(c(q,this).disconnect(),s(q,this,void 0),c(K,this).clear(),c(Ir,this).clear())}function Wr(){c(Pr,this).disconnect(),c(Rr,this).clear()}var Gr,Kr=class e{constructor({logKey:e,label:t}){this.isDebug=!1,this.label=`%cENGINE`,he(e)&&(this.isDebug=!0),typeof t==`string`&&(this.label=`${this.label} ${t}`)}debug(t,...n){this.isDebug&&console.debug(this.label,e.logStyle,t,...n)}error(t,...n){console.trace(this.label,e.errorStyle,t,...n)}warn(t,...n){this.isDebug&&console.warn(this.label,e.warnStyle,t,...n)}};Gr=Kr,Gr.logStyle=`background: #43A047; padding: 2px 4px;`,Gr.errorStyle=`background: #E53935; padding: 2px 4px;`,Gr.warnStyle=`background: #FB8C00; padding: 2px 4px;`;var qr=new WeakMap,Jr=new WeakMap,Yr=new WeakMap,Xr=new WeakMap,Zr=new WeakSet,Qr=class{constructor(e){i(this,Zr),a(this,qr,new Map),a(this,Jr,new Set),a(this,Yr,new Map),a(this,Xr,!1);for(let[t,n]of Object.entries(e==null?{}:e))for(let e of n==null?[]:n)this.setAdSlotAsDisposableOnVirtualNavigation(e,t)}registerAdSlot(e){var t;c(Yr,this).set(e.divId,{adUnitKey:e.adUnitKey,prebidAdUnitCode:(t=e.overridePrebidAdUnitCode)==null?e.adUnitKey:t});let n=e.disposableOnVirtualNavigation;if(n==null)return;let r=Array.isArray(n)?n:[n];for(let t of r)this.setAdSlotAsDisposableOnVirtualNavigation(e.divId,t)}setAdSlotAsDisposableOnVirtualNavigation(e,t){var n;let r=(n=c(qr,this).get(e))==null?new Set:n;r.add(t),c(qr,this).set(e,r)}isAdSlotDisposableOnVirtualNavigation(e,t){var n,r;return(n=(r=c(qr,this).get(e))==null?void 0:r.has(t))!=null&&n}setAdSlotAsSelfManaged(e){c(Jr,this).add(e)}isAdSlotSelfManaged(e){return c(Jr,this).has(e)}isAdvDisabled(){return c(Xr,this)}lockSell(e){if(!c(Xr,this)){s(Xr,this,!0);for(let t of Array.from(c(Yr,this).keys()))o(Zr,this,$r).call(this,t,e)}}unlockSell(){s(Xr,this,!1)}disposeAdSlots(e,t){for(let n of Array.from(c(Yr,this).keys()))this.isAdSlotDisposableOnVirtualNavigation(n,e)&&o(Zr,this,$r).call(this,n,t)}resetSoldAdSlots(e,t){for(let n of Array.from(c(Yr,this).keys()))this.isAdSlotSelfManaged(n)||!t(n)||o(Zr,this,$r).call(this,n,e,{keepContainer:!0})}};function $r(e,{gpt:t,monetizationManager:n,prebidAdapter:r,refreshManager:i},{keepContainer:a=!1}={}){let o=c(Yr,this).get(e);if(o==null)return;let{prebidAdUnitCode:s}=o;try{i.unscheduleSlotRefresh(e)}catch(t){console.error(`Failed to unschedule refresh for ${e}`,t)}try{t==null||t.destroySlot(e)}catch(t){console.error(`Failed to destroy GPT slot for ${e}`,t)}try{r==null||r.removeAdUnit(s)}catch(e){console.error(`Failed to remove Prebid unit for ${s}`,e)}if(n.clearAdSlotState(e),!a)try{let t=document.getElementById(e);if(t!=null){var l;((l=t.closest(`.pubtech-adv-container`))==null?t:l).remove()}}catch(t){console.error(`Failed to remove DOM container for ${e}`,t)}c(Yr,this).delete(e)}var ei=`PREBID_NO_BIDS_CONFIGURED`;function ti(e){return e instanceof Error&&typeof e==`object`&&!!e&&`code`in e&&e.code===ei}var ni=3e4,ri=.04,ii=.99;function ai(e,t){if(e!=null)return e>=ri&&e<=ii?e.toString():null;if(t==null)return null;let n=Math.floor(Number((Math.min(t,ii)*100).toFixed(6)));return n>=ri*100?(n/100).toString():null}var oi=new WeakMap,si=new WeakMap,ci=new WeakMap,li=new WeakMap,Y=new WeakMap,ui=new WeakMap,di=new WeakMap,fi=new WeakMap,pi=new WeakMap,mi=new WeakMap,hi=new WeakMap,gi=new WeakMap,_i=new WeakMap,vi=new WeakMap,yi=new WeakMap,bi=new WeakMap,X=new WeakSet,xi=class{constructor({gpt:e,prebidAdapter:t,eventDispatcher:n,timeout:r=3e3,callbacks:l={},usePrebidClientRenderOnGptUnfilled:u,divIdToAdUnitKeyMapping:d,pageLifecycleManager:f,batchSelling:p,onAdSlotSell:m,isAdvDisabled:h}){if(i(this,X),a(this,oi,void 0),a(this,si,void 0),a(this,ci,void 0),a(this,li,void 0),a(this,Y,void 0),a(this,ui,void 0),a(this,di,void 0),a(this,fi,new Map),a(this,pi,void 0),a(this,mi,void 0),a(this,hi,void 0),a(this,gi,void 0),a(this,_i,void 0),a(this,vi,void 0),a(this,yi,new Set),a(this,bi,new Map),s(oi,this,e),s(si,this,t),s(ci,this,n),s(li,this,r),s(Y,this,l),s(mi,this,f),s(hi,this,m),s(gi,this,h==null?(()=>!1):h),s(di,this,u!==!1),s(pi,this,d),p){let e=e=>{let t=ua(e);return s(vi,this,t),t};if(typeof p==`function`){let t=p();t instanceof Promise?s(_i,this,t.then(e)):s(vi,this,e(t))}else p instanceof Promise?s(_i,this,p.then(e)):s(vi,this,e(p))}s(ui,this,o(X,this,Ji).call(this,e,t)),c(mi,this).on(`virtualPageLoad`,e=>{e.type===`spa-route`&&o(X,this,Pi).call(this)})}sell(e,t){var n;if(c(gi,this).call(this))return;(n=c(hi,this))==null||n.call(this,o(X,this,Si).call(this,e));let r=ca(c(fi,this).get(e.divId),t);r&&c(fi,this).set(e.divId,r),c(_i,this)&&!c(vi,this)?c(_i,this).then(()=>{o(X,this,Ci).call(this,e,o(X,this,Ti).call(this,e.divId))}):o(X,this,Ci).call(this,e,o(X,this,Ti).call(this,e.divId))}clearAdSlotState(e){c(fi,this).delete(e)}};function Si(e){var t;let n=(t=c(pi,this))==null?void 0:t[e.divId];return n?j(j({},e),{},{adUnitKey:n}):e}function Ci(e,t,r=!1){var i=this;return u(function*(){let a=o(X,i,ea).call(i,t==null?void 0:t.callbacks),s=o(X,i,Si).call(i,e),l={params:s,prebidSucceeded:!1,failedPhases:[],disableBatchSelling:r,excludeFromRefresh:(t==null?void 0:t.excludeFromRefresh)===!0},u=o(X,i,qi).call(i,t);yield _e(c(mi,i));for(let e of u){if(!e.canRun(l))continue;let t=yield e.execute(l);if(aa(t))return;if(t.served){o(X,i,Zi).call(i,e.phase,l,s,e.successCallback(a));return}let n=ra(t),r=ia(t);if(n){o(X,i,Xi).call(i,e.phase,s,t.message,e.continuationCallback(a),l.excludeFromRefresh);continue}if(r&&(o(X,i,Yi).call(i,e.phase,l,s,e.unfilledCallback(a)),e.phase!==M.Fallback))return;oa(t)&&(l.failedPhases.push(e.phase),o(X,i,Qi).call(i,e.phase,s,t.error,t.originalError,e.failureCallback(a),l.excludeFromRefresh))}yield n()})()}function wi(e){var t;let n=(t=c(vi,this))==null?void 0:t.slotRefsByDivId.get(e);if(!(!n||c(yi,this).has(n.batchId)))return n}function Ti(e){var t;let n=c(fi,this).get(e),r=(t=o(X,this,wi).call(this,e))==null?void 0:t.slot;return ca(n,la(r==null?void 0:r.sellOptions))}function Ei(e,t){let n=o(X,this,Ti).call(this,e);return t===M.Prebid?(n==null?void 0:n.excludePrebid)!==!0:t!==M.Gpt||(n==null?void 0:n.excludeGpt)!==!0}function Di(e,t,n,r,i,a,s){c(bi,this).has(e)||c(bi,this).set(e,new Map);let l=c(bi,this).get(e);l.has(t)||l.set(t,{items:new Map});let d=l.get(t);return new Promise((c,l)=>{d.items.set(n.divId,{params:n,options:r,ctx:i,resolve:c,reject:l});let f=function(){var e=u(function*(){d.timeoutId!=null&&(clearTimeout(d.timeoutId),d.timeoutId=void 0);let e=Array.from(d.items.values());d.items.clear();try{let n=yield s(e);for(let r of e){var t;let e=(t=n[r.params.divId])==null?{served:!1,error:`No result returned for slot ${r.params.divId}`}:t;r.resolve(e)}}catch(t){for(let n of e)n.reject(t)}});return function(){return e.apply(this,arguments)}}();a.slotList.filter(e=>o(X,this,Ei).call(this,e.divId,t)).every(e=>d.items.has(e.divId))?f():d.timeoutId==null&&(d.timeoutId=window.setTimeout(()=>{d.timeoutId=void 0;let n=Array.from(d.items.values());d.items.clear(),o(X,this,Mi).call(this,e,t,a,n,`Batch phase timed out before all slots queued`)},a.timeout))})}function Oi(e,t,n,r){return o(X,this,Di).call(this,e.batchId,M.Prebid,t.params,o(X,this,Ti).call(this,t.params.divId),t,e.batchDefinition,e=>o(X,this,ki).call(this,e,n,r))}function ki(e,t,n){var r=this;return u(function*(){let i=[],a=e.map(e=>{var t;return i.push((t=e.params.overridePrebidAdUnitCode)==null?e.params.adUnitKey:t),{adUnitKey:e.params.adUnitKey,customSizes:e.params.overrideAdUnitSizes,divId:e.params.divId,overridePrebidAdUnitCode:e.params.overridePrebidAdUnitCode,refreshCount:e.params.refreshCount,sspParams:e.params.sspParams}}),s=[];try{s=yield o(X,r,Vi).call(r,n,e.map(e=>e.params)),yield c(li,r)?na(t.runBatchAuction(a),c(li,r)):t.runBatchAuction(a),n&&(yield t.setTargetingForGPT(i),n.applyPublisherProvidedSignals(),yield o(X,r,Hi).call(r,{adUnitKeys:i,divIds:e.map(e=>e.params.divId),googleSlots:s,prebidAdapter:t}));let l={};for(let t of e)t.ctx.prebidSucceeded=!0,l[t.params.divId]={served:!1,continueNextHandler:!0,message:`Prebid auction executed for ${t.params.adUnitKey}, moving to next handler`};return l}catch(t){let i={},a=ti(t);n&&o(X,r,Ui).call(r,s);for(let r of e)n?i[r.params.divId]={served:!1,continueNextHandler:!0,message:a?`Prebid has no bids configured for ${r.params.adUnitKey}, moving to GPT handler`:`Prebid auction failed or timed out for ${r.params.adUnitKey}, moving to GPT handler`}:i[r.params.divId]={served:!1,error:sa(t,`Prebid auction failed or timed out`),originalError:t};return i}})()}function Ai(e,t,n,r){return o(X,this,Di).call(this,e.batchId,M.Gpt,t.params,o(X,this,Ti).call(this,t.params.divId),t,e.batchDefinition,t=>o(X,this,ji).call(this,t,e,n,r))}function ji(e,t,n,r){var i=this;return u(function*(){let{batchId:a,batchDefinition:s}=t,c=e.map(e=>e.params),l=e.map(e=>o(X,i,Ki).call(i,e.params.divId,`MonetizationManager:batchGptResponseCheck:${a}:${e.params.divId}`));try{let t=Promise.all(l.map(e=>e.promise));yield o(X,i,zi).call(i,c,n);let f=yield t;o(X,i,Fi).call(i,a,s,f);let p=new Map(f.map((t,n)=>[e[n].params.divId,t])),m={};for(let t of e){var u,d;(u=(d=p.get(t.params.divId))==null?void 0:d.isEmpty)==null||u?(t.ctx.clientRenderReason=`gptUnfilled`,m[t.params.divId]={served:!1,emptyAd:!0,continueNextHandler:!!r,message:`GPT rendered empty for ${t.params.adUnitKey}, attempting Prebid client render`}):m[t.params.divId]={served:!0}}return m}catch(t){for(let e of l)e.cancel();o(X,i,Ii).call(i,a,s,`GPT batch failed before domination could be verified`,void 0,t);let n={};for(let i of e)r&&i.ctx.prebidSucceeded?(i.ctx.clientRenderReason=`gptError`,n[i.params.divId]={served:!1,continueNextHandler:!0,message:`GPT sellAdSlots failed for ${i.params.adUnitKey}, attempting Prebid client render`}):n[i.params.divId]={served:!1,error:sa(t,`GPT sellAdSlots failed`),originalError:t};return n}})()}function Mi(e,t,n,r,i){var a;let s=new Map(r.map(e=>[e.params.divId,e])),l=c(bi,this).get(e);if(l)for(let e of l.values()){e.timeoutId!=null&&(clearTimeout(e.timeoutId),e.timeoutId=void 0);for(let t of e.items.values())s.set(t.params.divId,t);e.items.clear()}o(X,this,Ni).call(this,e);let u=Array.from(s.values()),d={batchId:e,phase:t,slots:u.map(e=>({adUnitKey:e.params.adUnitKey,divId:e.params.divId})),reason:i};o(X,this,ta).call(this,(a=n.callbacks)==null?void 0:a.onBatchSplit,d);for(let e of u)e.resolve({served:!1,cancelled:!0}),o(X,this,Ci).call(this,e.params,c(fi,this).get(e.params.divId),!0)}function Ni(e){c(yi,this).add(e),c(bi,this).delete(e)}function Pi(){c(yi,this).clear(),c(bi,this).clear()}function Fi(e,t,n){var r;let i=new Map;for(let e of n)(e==null?void 0:e.adProvider)===`gpt`&&i.set(e.divId,e);let a=[];for(let e of t.slotList){let t=i.get(e.divId);if(!t)return;a.push(t)}let s=a.find(e=>e.isEmpty);if(s){o(X,this,Ii).call(this,e,t,`GPT rendered at least one batch slot empty`,s);return}let l=a.map(e=>e.lineItemId);if(!(l.every(e=>typeof e==`number`)&&new Set(l).size===1)){o(X,this,Ii).call(this,e,t,`GPT rendered the batch, but the slots do not share the same lineItemId`,a[a.length-1]);return}let u={EVENT_NAME:Ue,batchId:e,slots:o(X,this,Li).call(this,t),lineItemId:l[0],adProvider:a[0].adProvider};c(ci,this).dispatch(u),o(X,this,ta).call(this,(r=t.callbacks)==null?void 0:r.onDomination,u)}function Ii(e,t,n,r,i){var a;let s=j(j({batchId:e,slots:o(X,this,Li).call(this,t),reason:n},r?{trigger:r}:{}),i?{originalError:i}:{});o(X,this,Ni).call(this,e),o(X,this,ta).call(this,(a=t.callbacks)==null?void 0:a.onFallback,s)}function Li(e){return e.slotList.map(e=>{var t,n,r;return{adUnitKey:(t=(n=e.adUnitKey)==null?(r=c(pi,this))==null?void 0:r[e.divId]:n)==null?e.divId:t,divId:e.divId}})}function Ri(e,t){return o(X,this,Gi).call(this,e,t)?t.refreshSlot(e):t.sellAdSlot(e)}function zi(e,t){return e.every(e=>o(X,this,Gi).call(this,e,t))?t.refreshSlots(e):t.sellAdSlots(e)}function Bi(e,t){return u(function*(){if(e&&typeof e.defineSlot==`function`)return e.defineSlot(t)})()}function Vi(e,t){return u(function*(){return e&&typeof e.defineSlots==`function`?e.defineSlots(t):[]})()}function Hi({adUnitKeys:e,divIds:t,googleSlots:n,prebidAdapter:r}){var i=this;return u(function*(){if(typeof r.getHighestCpmBids==`function`)for(let l=0;l<e.length;l++){var a,s;let u=e[l],d=t[l],f=n[l];if(f==null)continue;let p=typeof((a=c(oi,i))==null?void 0:a.resolveSlotDivId)==`function`?c(oi,i).resolveSlotDivId(f):f.getSlotElementId();if(p!==u&&p!==d)continue;let m=(yield r.getHighestCpmBids(u))[0],h=m==null||(s=m.adserverTargeting)==null?void 0:s.hb_pb,g=typeof h==`string`,_=!g&&typeof r.getGamFloor==`function`?r.getGamFloor(u):null;f.setConfig({targeting:j(j({},o(X,i,Wi).call(i,f)),{},{pt_fp:ai(g?parseFloat(h):null,_),no_bid:g?null:Math.random()<.5?`1`:`0`})})}})()}function Ui(e){for(let t of e)if(t!=null)try{let e=Object.keys(o(X,this,Wi).call(this,t)).filter(e=>e.startsWith(`hb_`)||e===`pt_fp`||e===`no_bid`);if(e.length===0)continue;t.setConfig({targeting:Object.fromEntries(e.map(e=>[e,null]))})}catch(e){}}function Wi(e){if(typeof e.getConfig==`function`){let t=e.getConfig(`targeting`).targeting;if(t!=null)return j({},t)}return Object.fromEntries(e.getTargetingKeys().map(t=>[t,e.getTargeting(t)]))}function Gi(e,t){return typeof t.hasDefinedSlot==`function`&&typeof t.refreshSlot==`function`&&typeof t.refreshSlots==`function`&&t.hasDefinedSlot(e.divId)}function Ki(e,t,n){let r=!1,i,a,o,s=e=>{r||(r=!0,o!=null&&clearTimeout(o),i==null||i(),a==null||a(e))},l=new Promise(n=>{a=n;let r=c(ci,this).subscribe({eventName:Ve,subscriberName:t,callback:t=>{t.divId===e&&t.adProvider===`gpt`&&s(t)}});i=()=>r.unsubscribe()});return n!=null&&(o=setTimeout(()=>s(),n)),{promise:l,cancel:()=>{s()}}}function qi(e){return!(e!=null&&e.excludePrebid)&&!(e!=null&&e.excludeGpt)&&typeof(e==null?void 0:e.useClientSideRenderFallback)!=`boolean`?c(ui,this):o(X,this,Ji).call(this,e.excludeGpt?void 0:c(oi,this),e.excludePrebid?void 0:c(si,this),{useClientSideRenderFallback:e.useClientSideRenderFallback})}function Ji(e,t,{useClientSideRenderFallback:n}={}){let r=this,i=c(li,this),a=typeof n==`boolean`?n:c(di,this),s=[];return t&&s.push({phase:M.Prebid,successCallback:e=>e.onPrebidSuccess,failureCallback:e=>e.onPrebidFailure,continuationCallback:e=>e.onPrebidContinuation,unfilledCallback:e=>e.onUnfilled,canRun:()=>!0,execute(n){return u(function*(){let a=n.disableBatchSelling?void 0:o(X,r,wi).call(r,n.params.divId);if(a)return o(X,r,Oi).call(r,a,n,t,e);let s;try{var c;let a=[];s=yield o(X,r,Bi).call(r,e,n.params);let l={adUnitKey:n.params.adUnitKey,customSizes:n.params.overrideAdUnitSizes,divId:n.params.divId,outOfPageAdUnitPath:n.params.slotType===`outOfPageBottomAnchor`?s==null?void 0:s.getAdUnitPath():void 0,overridePrebidAdUnitCode:n.params.overridePrebidAdUnitCode,refreshCount:n.params.refreshCount,sspParams:n.params.sspParams};yield i?na(t.runAuction(l),i):t.runAuction(l),a.push((c=n.params.overridePrebidAdUnitCode)==null?n.params.adUnitKey:c),n.prebidSucceeded=!0,e&&(yield t.setTargetingForGPT(a),e.applyPublisherProvidedSignals(),yield o(X,r,Hi).call(r,{adUnitKeys:a,divIds:[n.params.divId],googleSlots:s?[s]:[],prebidAdapter:t}))}catch(t){return e?(o(X,r,Ui).call(r,[s]),{served:!1,continueNextHandler:!0,message:ti(t)?`Prebid has no bids configured for `+n.params.adUnitKey+`, moving to GPT handler`:`Prebid auction failed or timed out for `+n.params.adUnitKey+`, moving to GPT handler`}):{served:!1,error:sa(t,`Prebid auction failed or timed out`),originalError:t}}return{served:!1,continueNextHandler:!0,message:`Prebid auction executed for `+n.params.adUnitKey+`, moving to next handler`}})()}}),e&&s.push({phase:M.Gpt,successCallback:e=>e.onGptSuccess,failureCallback:e=>e.onGptFailure,continuationCallback:e=>e.onGptContinuation,unfilledCallback:e=>e.onUnfilled,canRun:()=>!0,execute(n){return u(function*(){var i;let s=n.disableBatchSelling?void 0:o(X,r,wi).call(r,n.params.divId);if(s)return o(X,r,Ai).call(r,s,n,e,t);let c=n.params.slotType===`outOfPageBottomAnchor`,l=c||a&&n.params.slotType!==`outOfPageInterstitial`,u=l?o(X,r,Ki).call(r,n.params.divId,`MonetizationManager:gptResponseCheck`,c&&((i=n.params.refreshCount)==null?0:i)>0?ni:void 0):void 0;try{var d,f;if(yield o(X,r,Ri).call(r,n.params,e),!l)return{served:!0};let i=(d=(f=yield u.promise)==null?void 0:f.isEmpty)==null||d;return i&&c?{served:!1,emptyAd:!0,message:`GPT left the bottom anchor `+n.params.divId+` empty or did not answer its refresh`}:i?(n.clientRenderReason=`gptUnfilled`,{served:!1,emptyAd:!0,continueNextHandler:!!t,message:`GPT rendered empty for `+n.params.adUnitKey+`, attempting Prebid client render`}):{served:!0}}catch(e){return u==null||u.cancel(),t&&n.prebidSucceeded&&!c?(n.clientRenderReason=`gptError`,{served:!1,continueNextHandler:!0,message:`GPT sellAdSlot failed for `+n.params.adUnitKey+`, attempting Prebid client render`}):{served:!1,error:sa(e,`GPT sellAdSlot failed`),originalError:e}}})()}}),t&&s.push({phase:M.PrebidClientRender,successCallback:e=>e.onClientRenderSuccess,failureCallback:e=>e.onClientRenderFailure,continuationCallback:e=>e.onClientRenderContinuation,canRun:e=>e.prebidSucceeded&&e.params.slotType!==`outOfPageBottomAnchor`,unfilledCallback:e=>e.onUnfilled,execute(e){return u(function*(){try{var n;let r=yield t.renderWinningBid(document,e.params.divId,e.params.adUnitKey,(n=e.clientRenderReason)==null?`noGpt`:n);return r==null?{served:!1,emptyAd:!0,error:`No winning Prebid bid to render`}:(e.renderedMediaType=r,{served:!0})}catch(e){return{served:!1,error:sa(e,`Client-side Prebid render failed`),originalError:e}}})()}}),s.push({phase:M.Fallback,successCallback:()=>void 0,failureCallback:e=>e.onFallback,unfilledCallback:e=>e.onUnfilled,continuationCallback:()=>void 0,canRun:()=>!0,execute:function(){var e=u(function*(e){return{served:!1,emptyAd:!0,continueNextHandler:!1,error:`All selling systems failed for adUnitKey: `+e.params.adUnitKey}});return function(t){return e.apply(this,arguments)}}()}),s}function Yi(e,t,n,r){let i={EVENT_NAME:Le,adUnitKey:n.adUnitKey,divId:n.divId,phase:e,context:t};o(X,this,ta).call(this,r,i);let a=`Ad unit ${n.adUnitKey} unfilled at phase ${e}`;o(X,this,$i).call(this,e,n,N.Unfilled,a,t.excludeFromRefresh),c(ci,this).dispatch(i)}function Xi(e,t,n,r,i){let a={adUnitKey:t.adUnitKey,divId:t.divId,phase:e,type:N.Continue,message:n};o(X,this,ta).call(this,r,a),o(X,this,$i).call(this,e,t,N.Continue,n,i)}function Zi(e,t,n,r){let i={adUnitKey:n.adUnitKey,divId:n.divId,phase:e,type:N.Success};o(X,this,ta).call(this,r,i);let a={EVENT_NAME:Re,adUnitKey:n.adUnitKey,divId:n.divId,phase:e,context:t};o(X,this,$i).call(this,e,n,N.Success,void 0,t.excludeFromRefresh,t.renderedMediaType),c(ci,this).dispatch(a)}function Qi(e,t,n,r,i,a){let s={adUnitKey:t.adUnitKey,divId:t.divId,phase:e,type:N.Failure,error:n,originalError:r};o(X,this,ta).call(this,i,s),o(X,this,$i).call(this,e,t,N.Failure,n,a)}function $i(e,t,n,r,i,a){c(ci,this).dispatch(j(j(j({EVENT_NAME:He,adUnitKey:t.adUnitKey,divId:t.divId,phase:e,outcome:n,sellParams:t},i?{excludeFromRefresh:i}:{}),r?{error:r}:{}),a?{renderedMediaType:a}:{}))}function ea(e){var t,n,r,i,a,o,s,l,u,d,f;return e?{onPrebidSuccess:(t=e.onPrebidSuccess)==null?c(Y,this).onPrebidSuccess:t,onPrebidFailure:(n=e.onPrebidFailure)==null?c(Y,this).onPrebidFailure:n,onPrebidContinuation:(r=e.onPrebidContinuation)==null?c(Y,this).onPrebidContinuation:r,onGptSuccess:(i=e.onGptSuccess)==null?c(Y,this).onGptSuccess:i,onGptFailure:(a=e.onGptFailure)==null?c(Y,this).onGptFailure:a,onGptContinuation:(o=e.onGptContinuation)==null?c(Y,this).onGptContinuation:o,onClientRenderSuccess:(s=e.onClientRenderSuccess)==null?c(Y,this).onClientRenderSuccess:s,onClientRenderFailure:(l=e.onClientRenderFailure)==null?c(Y,this).onClientRenderFailure:l,onClientRenderContinuation:(u=e.onClientRenderContinuation)==null?c(Y,this).onClientRenderContinuation:u,onFallback:(d=e.onFallback)==null?c(Y,this).onFallback:d,onUnfilled:(f=e.onUnfilled)==null?c(Y,this).onUnfilled:f}:c(Y,this)}function ta(e,t){if(e)try{e(t)}catch(e){}}function na(e,t){return new Promise((n,r)=>{let i=setTimeout(()=>r(Error(`Auction timed out after ${t}ms`)),t);e.then(e=>{clearTimeout(i),n(e)},e=>{clearTimeout(i),r(e)})})}function ra(e){return e.served===!1&&`continueNextHandler`in e&&e.continueNextHandler===!0}function ia(e){return e.served===!1&&`emptyAd`in e&&e.emptyAd===!0&&(!(`continueNextHandler`in e)||e.continueNextHandler!==!0)}function aa(e){return e.served===!1&&`cancelled`in e&&e.cancelled===!0}function oa(e){return e.served===!1&&`error`in e&&typeof e.error==`string`}function sa(e,t){return typeof(e==null?void 0:e.message)==`string`?e.message:t}function ca(e,t){if(!e&&!t)return;let n=e!=null&&e.callbacks||t!=null&&t.callbacks?j(j({},e==null?void 0:e.callbacks),t==null?void 0:t.callbacks):void 0;return j(j(j({},e),t),n?{callbacks:n}:{})}function la(e){if(!e)return;let t=j({},e);return delete t.callbacks,t}function ua(e){let t=new Map,n=new Map;for(let[r,i]of Object.entries(e.batches)){let e=new Map,a=[],o={batchId:r,callbacks:i.callbacks,slotList:a,slots:e,timeout:i.timeout};for(let[t,s]of Object.entries(i.slots)){let i=da(t,s);e.set(t,i),a.push(i),n.set(t,{batchId:r,batchDefinition:o,slot:i})}t.set(r,o)}return{batches:t,slotRefsByDivId:n}}function da(e,t){return t===!0?{divId:e}:j(j({},t),{},{divId:e})}var fa=`slot:mrcImpressionReached`,pa=[`F_D`,`F_M`,`S_1`,`S_2`],ma=5,ha=1e3,ga=3e4,_a=5,va=1e3,ya=2e3,ba=.5,xa=.3,Sa=242500,Ca=new WeakMap,wa=new WeakMap,Ta=new WeakMap,Ea=new WeakMap,Da=new WeakMap,Oa=new WeakMap,ka=new WeakMap,Aa=new WeakMap,ja=new WeakMap,Ma=new WeakMap,Na=new WeakMap,Pa=new WeakMap,Fa=new WeakMap,Ia=new WeakMap,Z=new WeakMap,La=new WeakMap,Ra=new WeakMap,za=new WeakMap,Ba=new WeakMap,Va=new WeakMap,Ha=new WeakMap,Ua=new WeakMap,Wa=new WeakMap,Ga=new WeakMap,Q=new WeakSet,Ka=class{constructor({adUnitsExcludedFromRefresh:e,config:t,contextManager:n,customAdUnitRefreshConfigMap:r,disableAutoRefresh:l,eventDispatcher:u,monetizationManager:d,pageLifecycleManager:f,resolveGptSlotDivId:p}){if(i(this,Q),a(this,Ca,new Set([`O_SKIN`,`O_INTERSTITIAL`,`O_INTERSTITIAL_G`])),a(this,wa,void 0),a(this,Ta,void 0),a(this,Ea,void 0),a(this,Da,void 0),a(this,Oa,void 0),a(this,ka,void 0),a(this,Aa,void 0),a(this,ja,void 0),a(this,Ma,void 0),a(this,Na,void 0),a(this,Pa,void 0),a(this,Fa,new Set),a(this,Ia,void 0),a(this,Z,new Map),a(this,La,new Map),a(this,Ra,new Map),a(this,za,new WeakMap),a(this,Ba,void 0),a(this,Va,void 0),a(this,Ha,void 0),a(this,Ua,null),a(this,Wa,!1),a(this,Ga,!0),s(Ea,this,o(Q,this,no).bind(this)),s(Da,this,o(Q,this,ro).bind(this)),s(Oa,this,n),s(ka,this,r),s(Aa,this,l===!0),s(ja,this,u),s(Ma,this,d),s(Na,this,f),s(Pa,this,p==null?(e=>e.getSlotElementId()):p),s(Ia,this,j({consecutiveUnfilledBeforeGoogleExclusion:null,firstUnfilledRetryTime:ha,refreshBlockTime:ga,refreshLimit:_a,refreshOnlyOnVisiblePage:!0,requireMrcImpressionBeforeRefresh:!0,sequentialUnfilledLimit:ma,visibilityPollingTime:1e3},t)),Array.isArray(e))for(let t of e)c(Ca,this).add(t);s(wa,this,c(ja,this).subscribe({callback:e=>o(Q,this,qa).call(this,e),eventName:He,subscriberName:`RefreshManager`})),s(Ta,this,c(ja,this).subscribe({callback:e=>o(Q,this,xo).call(this,e),eventName:Ue,subscriberName:`RefreshManager:domination`})),s(Va,this,c(Oa,this).on(`visibilityChanged`,()=>{o(Q,this,Qa).call(this)&&o(Q,this,yo).call(this)})),s(Ha,this,c(Na,this).on(`networkChange`,e=>{s(Ga,this,e),e&&o(Q,this,Qa).call(this)&&o(Q,this,yo).call(this)})),s(Ba,this,c(Na,this).on(`bfcacheRestore`,()=>{o(Q,this,bo).call(this)}))}expediteSlotRefresh(e,t,n,r){if(c(Aa,this))return;let{slot:i}=o(Q,this,eo).call(this,t,e,n,r);i.unfilledRetryTimeout!=null&&(clearTimeout(i.unfilledRetryTimeout),i.unfilledRetryTimeout=null),i.refreshBlockTimeout!=null&&(clearTimeout(i.refreshBlockTimeout),i.refreshBlockTimeout=null),i.refreshLocked=!1,o(Q,this,lo).call(this,e,i),o(Q,this,Za).call(this,e,i)}unscheduleSlotRefresh(e){let t=c(Z,this).get(e);t!=null&&(c(Fa,this).delete(e),c(Z,this).delete(e),c(La,this).delete(e),o(Q,this,vo).call(this,t),o(Q,this,oo).call(this,e),t.mrcImpressionReached||c(ja,this).dispatch({EVENT_NAME:fa,adUnitKey:t.adUnitKey,divId:e}))}teardown(){var e;c(wa,this).unsubscribe(),c(Ta,this).unsubscribe(),c(Ba,this).call(this),c(Va,this).call(this),c(Ha,this).call(this);for(let e of c(Z,this).values())o(Q,this,vo).call(this,e);c(Fa,this).clear(),c(Z,this).clear(),c(La,this).clear(),(e=c(Ua,this))==null||e.disconnect(),c(Ra,this).clear(),s(Ua,this,null);try{window.googletag.pubads().removeEventListener(`impressionViewable`,c(Ea,this)),window.googletag.pubads().removeEventListener(`slotVisibilityChanged`,c(Da,this)),s(Wa,this,!1)}catch(e){}}isSlotRegistered(e){return c(Z,this).has(e)}isMrcReached(e){let t=c(Z,this).get(e);return t==null?!0:(o(Q,this,lo).call(this,e,t),t.mrcImpressionReached)}whenMrcReached(e){let t=c(Z,this).get(e);return t==null||(o(Q,this,lo).call(this,e,t),t.mrcImpressionReached)?Promise.resolve():new Promise(n=>{let{unsubscribe:r}=c(ja,this).subscribe({callback:t=>{t.divId===e&&(r(),n())},eventName:fa,subscriberName:`RefreshManager:whenMrcReached:${e}`});if(t.isVisible&&t.lastVisibilityUpdateTime!=null){setTimeout(()=>{o(Q,this,lo).call(this,e,t)},o(Q,this,fo).call(this,t)-t.continuousVisibleTime);return}o(Q,this,so).call(this,e,t)})}};function qa(e){if(c(Aa,this)||e.excludeFromRefresh===!0)return;let t=e.outcome;if(t!==N.Success&&t!==N.Unfilled)return;let n=e.adUnitKey;if(n==null||n.length===0||c(Ca,this).has(n))return;let r=e.phase===M.Gpt?`gpt`:`prebid`,i=e.divId,{slot:a,slotRefreshConfig:s}=o(Q,this,eo).call(this,n,i);if(!a.isExausted){if(e.sellParams!=null&&(a.sellParams=e.sellParams),t===N.Success&&(a.renderedMediaType=e.renderedMediaType),o(Q,this,go).call(this,a)||o(Q,this,to).call(this,r,i),t===N.Unfilled){o(Q,this,Ya).call(this,i,a,s);return}o(Q,this,Ja).call(this,i,a,s)}}function Ja(e,t,n){o(Q,this,vo).call(this,t),t.consecutiveUnfilledCount=0,o(Q,this,ho).call(this,t),o(Q,this,go).call(this,t)&&(t.isVisible=!0,t.lastVisibilityUpdateTime=Math.round(performance.now())),o(Q,this,so).call(this,e,t);let r=setTimeout(()=>{t.refreshBlockTimeout===r&&(t.refreshBlockTimeout=null,t.refreshLocked=!1,o(Q,this,Za).call(this,e,t))},n.refreshBlockTime);t.refreshBlockTimeout=r}function Ya(e,t,n){var r,i,a;if(t.consecutiveUnfilledCount+=1,t.consecutiveUnfilledCount>=((r=n.sequentialUnfilledLimit)==null?ma:r))return o(Q,this,_o).call(this,e,t);t.unfilledRetryTimeout!=null&&clearTimeout(t.unfilledRetryTimeout),t.refreshBlockTimeout!=null&&(clearTimeout(t.refreshBlockTimeout),t.refreshBlockTimeout=null);let s=n.consecutiveUnfilledBeforeGoogleExclusion;s!=null&&t.consecutiveUnfilledCount>=s&&(t.excludeGpt=!0);let c=t.consecutiveUnfilledCount===1?(i=n.firstUnfilledRetryTime)==null?ha:i:(a=n.refreshBlockTime)==null?ga:a,l=setTimeout(()=>{t.unfilledRetryTimeout===l&&(t.unfilledRetryTimeout=null,t.refreshLocked=!1,o(Q,this,Za).call(this,e,t))},c);t.unfilledRetryTimeout=l}function Xa(e,t){let n=c(Z,this).get(e);if(!(n==null||n.isExausted)){if(t)n.isVisible||(n.isVisible=!0,n.lastVisibilityUpdateTime=Math.round(performance.now()),n.mrcImpressionReached||o(Q,this,so).call(this,e,n));else{n.isVisible&&(o(Q,this,lo).call(this,e,n),n.continuousVisibleTime=0,n.isVisible=!1,n.lastVisibilityUpdateTime=null,o(Q,this,co).call(this,n));return}o(Q,this,lo).call(this,e,n),o(Q,this,Za).call(this,e,n)}}function Za(e,t){var n;if(t.isExausted||t.refreshLocked)return;if(!o(Q,this,Qa).call(this)){c(Fa,this).add(e);return}if(o(Q,this,mo).call(this,t)&&!t.mrcImpressionReached){t.isVisible&&o(Q,this,so).call(this,e,t);return}if(o(Q,this,mo).call(this,t)&&!t.isVisible)return;c(Fa,this).delete(e),o(Q,this,co).call(this,t);let{slotRefreshConfig:r}=o(Q,this,eo).call(this,t.adUnitKey,e);if(t.refreshCount>=((n=r.refreshLimit)==null?_a:n))return o(Q,this,_o).call(this,e,t);t.refreshLocked=!0,t.refreshCount+=1,c(Ma,this).sell(j(j({},t.sellParams),{},{adUnitKey:t.adUnitKey,divId:e,refreshCount:t.refreshCount}),{excludeGpt:t.excludeGpt})}function Qa(){if(!c(Ga,this))return!1;let e=c(Na,this).getState();return[`active`,`passive`].includes(e)?!0:e===`hidden`&&!c(Ia,this).refreshOnlyOnVisiblePage}function $a(e,t,n,r){var i,a,o;let s=j({adUnitKey:e,consecutiveUnfilledCount:0,continuousVisibleTime:0,excludeGpt:!1,isExausted:!1,isVisible:!1,lastVisibilityUpdateTime:null,mrcImpressionReached:!1,refreshBlockTimeout:null,refreshCount:0,refreshLocked:!0,unfilledRetryTimeout:null,visibilityPollingInterval:null},n),l=j(j(j({},c(Ia,this)),r),(i=(a=c(ka,this))==null?void 0:a[t])==null?(o=c(ka,this))==null?void 0:o[e]:i);return c(Z,this).set(t,s),c(La,this).set(t,l),{slot:s,slotRefreshConfig:l}}function eo(e,t,n,r){let i=c(Z,this).get(t),a=c(La,this).get(t);return i!=null&&a!=null?{slot:i,slotRefreshConfig:a}:o(Q,this,$a).call(this,e,t,n,r)}function to(e,t){let n=c(Z,this).get(t);if(n){if(n.usesGptViewability=!1,e===`gpt`)try{c(Wa,this)||(window.googletag.pubads().addEventListener(`impressionViewable`,c(Ea,this)),window.googletag.pubads().addEventListener(`slotVisibilityChanged`,c(Da,this)),s(Wa,this,!0)),n.usesGptViewability=!0,o(Q,this,oo).call(this,t);return}catch(e){}o(Q,this,oo).call(this,t),o(Q,this,io).call(this,t)}}function no(e){let t=c(Pa,this).call(this,e.slot),n=c(Z,this).get(t);n==null||n.isExausted||n.mrcImpressionReached||o(Q,this,go).call(this,n)||n.usesGptViewability&&(n.gptVisibilityKnown||(n.isVisible=!0),o(Q,this,uo).call(this,t,n),o(Q,this,Za).call(this,t,n))}function ro(e){let t=c(Pa,this).call(this,e.slot),n=c(Z,this).get(t);!(n!=null&&n.usesGptViewability)||o(Q,this,go).call(this,n)||(n.gptVisibilityKnown=!0,o(Q,this,Xa).call(this,t,e.inViewPercentage>=ba*100))}function io(e){if(c(Ua,this)!=null){o(Q,this,ao).call(this,e);return}if(typeof window>`u`||typeof IntersectionObserver>`u`)return;let t={root:null,rootMargin:`0px`,threshold:[xa,ba]};s(Ua,this,new IntersectionObserver(e=>{for(let t of e){let e=c(za,this).get(t.target);if(e==null)continue;let n=c(Z,this).get(e);n!=null&&o(Q,this,Xa).call(this,e,o(Q,this,po).call(this,n,t))}},t)),o(Q,this,ao).call(this,e)}function ao(e){var t,n;let r=document.getElementById(e);if(r==null)return;let i=c(Z,this).get(e),a=(i==null?void 0:i.renderedMediaType)===`video`||(t=r.querySelector(`iframe`))==null?r:t;c(Ra,this).set(e,a),c(za,this).set(a,e),(n=c(Ua,this))==null||n.observe(a)}function oo(e){var t;let n=c(Ra,this).get(e);n!=null&&((t=c(Ua,this))==null||t.unobserve(n),c(Ra,this).delete(e),c(za,this).delete(n))}function so(e,t){t.usesGptViewability||t.visibilityPollingInterval==null&&(t.visibilityPollingInterval=setInterval(()=>{if(t.isExausted||!t.isVisible||t.mrcImpressionReached){o(Q,this,co).call(this,t);return}o(Q,this,lo).call(this,e,t),t.mrcImpressionReached&&(o(Q,this,co).call(this,t),o(Q,this,Za).call(this,e,t))},c(Ia,this).visibilityPollingTime))}function co(e){e.visibilityPollingInterval!=null&&(clearInterval(e.visibilityPollingInterval),e.visibilityPollingInterval=null)}function lo(e,t){if(t.usesGptViewability||!t.isVisible||t.lastVisibilityUpdateTime==null)return;let n=Math.round(performance.now()),r=n-t.lastVisibilityUpdateTime;r>0&&(t.continuousVisibleTime+=r,t.lastVisibilityUpdateTime=n),!(t.mrcImpressionReached||t.continuousVisibleTime<o(Q,this,fo).call(this,t))&&o(Q,this,uo).call(this,e,t)}function uo(e,t){t.mrcImpressionReached=!0,c(ja,this).dispatch({EVENT_NAME:fa,adUnitKey:t.adUnitKey,divId:e})}function fo(e){return e.renderedMediaType===`video`?ya:va}function po(e,t){if(!t.isIntersecting)return!1;let{height:n,width:r}=t.boundingClientRect,i=e.renderedMediaType!==`video`&&r*n>=Sa;return t.intersectionRatio>=(i?xa:ba)}function mo(e){return c(Ia,this).requireMrcImpressionBeforeRefresh===!0&&!o(Q,this,go).call(this,e)}function ho(e){e.continuousVisibleTime=0,e.isVisible=!1,e.lastVisibilityUpdateTime=null,e.mrcImpressionReached=!1,e.gptVisibilityKnown=!1,o(Q,this,co).call(this,e)}function go(e){var t;return pa.includes(e.adUnitKey)&&((t=e.sellParams)==null?void 0:t.slotType)!==`outOfPageBottomAnchor`}function _o(e,t){t.isExausted||(t.isExausted=!0,this.unscheduleSlotRefresh(e))}function vo(e){e.refreshBlockTimeout!=null&&(clearTimeout(e.refreshBlockTimeout),e.refreshBlockTimeout=null),e.unfilledRetryTimeout!=null&&(clearTimeout(e.unfilledRetryTimeout),e.unfilledRetryTimeout=null),o(Q,this,co).call(this,e)}function yo(){for(let e of c(Fa,this)){let t=c(Z,this).get(e);t!=null&&o(Q,this,Za).call(this,e,t)}}function bo(){for(let[e,t]of c(Z,this)){if(o(Q,this,ho).call(this,t),t.usesGptViewability=!1,o(Q,this,go).call(this,t)){t.isVisible=!0,t.lastVisibilityUpdateTime=Math.round(performance.now());continue}o(Q,this,oo).call(this,e),o(Q,this,io).call(this,e)}}function xo(e){for(let t of e.slots)this.unscheduleSlotRefresh(t.divId)}var So;window.__pubtech_queue_on_consent=window.__pubtech_queue_on_consent||[],window.__pubtech_queue_on_consent.push(function(e){e!=null&&(So=e)});var Co=new WeakMap,wo=new WeakMap,To=new WeakMap,Eo=new WeakMap,Do=new WeakMap,Oo=new WeakMap,ko=new WeakMap,Ao=new WeakMap,jo=new WeakMap,Mo=new WeakMap,No=new WeakSet,Po=class{constructor({consentReader:e,contextManager:t,customProperties:n,disableAds:r,logger:c,navigationTrackingOptions:l,pageLifecycleManager:u,websiteId:d}){i(this,No),a(this,Co,void 0),a(this,wo,void 0),a(this,To,void 0),a(this,Eo,void 0),a(this,Do,void 0),a(this,Oo,void 0),a(this,ko,new Set),a(this,Ao,void 0),a(this,jo,void 0),a(this,Mo,[]),s(Co,this,e),s(wo,this,t),s(jo,this,A(n)),s(To,this,r),s(Eo,this,c),s(Do,this,j({spaRoute:!0,infiniteScroll:!1,bfcacheRestore:!0},l)),s(Oo,this,u),s(Ao,this,d),o(No,this,Io).call(this)}trackView(e){var t=this;return u(function*(){let n=(e==null?void 0:e.path)||document.location.pathname;c(ko,t).has(n)||(c(ko,t).add(n),!(yield se(c(To,t)))&&(s(jo,t,j(j({},c(jo,t)),e==null?void 0:e.onDemandCustomProperties)),o(No,t,Fo).call(t,n)))})()}teardown(){for(let e of c(Mo,this))e();s(Mo,this,[])}};function Fo(e){let t={w_id:c(Ao,this),pn:e,wd:S(),sc:ve(),metrics:{pv:{v:1,metadata:j({consent:String(c(Co,this).hasUserAcceptedConsent()),consentApiUsed:c(Co,this).consentManagementApiUsed()},c(jo,this))}},metadata:{product:`engine`}};typeof So==`string`&&(t.ct=So);for(let e of[`https://producer-ovh-node01.intelligence.pubtech.ai:8443/website-metrics`])try{let n=new XMLHttpRequest;n.open(`POST`,e),n.setRequestHeader(`Content-Type`,`application/json`),n.send(JSON.stringify(t)),c(Eo,this).debug(`Sending a new page view request`,t)}catch(e){c(Eo,this).error(`Error while tracking the page view`,e)}}function Io(){let e=c(Do,this).bfcacheRestore,t=c(Do,this).infiniteScroll,n=c(Do,this).spaRoute;if(n||t){let e=c(wo,this).on(`contextUpdated`,({context:e,navigationContext:r})=>{if(r===`spa-route`&&n){c(ko,this).clear(),this.trackView({path:e.path,onDemandCustomProperties:{navigationContext:r}});return}r===`infinite-scroll`&&t&&this.trackView({path:e.path,onDemandCustomProperties:{navigationContext:r}})});c(Mo,this).push(e)}if(e){let e=c(Oo,this).on(`bfcacheRestore`,()=>{c(ko,this).clear(),this.trackView({onDemandCustomProperties:{navigationContext:`bfcache-restore`}})});c(Mo,this).push(e)}}var Lo=`font-weight: bold; font-size: 50px;color: red; text-shadow: 3px 3px 0 rgb(217,31,38) , 6px 6px 0 rgb(226,91,14) , 9px 9px 0 rgb(245,221,8) , 12px 12px 0 rgb(5,148,68) , 15px 15px 0 rgb(2,135,206) , 18px 18px 0 rgb(4,77,145) , 21px 21px 0 rgb(42,21,113)`,Ro=new Set([`VIP`,`O_INTERSTITIAL_G`]),zo=new Set([`O_SKIN`]),Bo=[{color:`green`,minCount:6,text:`ottimale, monetizzazione al top`},{color:`yellow`,minCount:5,text:`buono, monetizzazione nella norma`},{color:`orange`,minCount:2,text:`basso, monetizzazione sotto la media`},{color:`red`,minCount:0,text:`troppo basso, monetizzazione compromessa!`}];function Vo(e){console.debug(`%cPubtech.ai Banner Debug`,Lo);let t=new Set,n=0;for(let r of Object.keys(e)){if(document.getElementById(r)!=null){t.add(r),zo.has(r)||n++;continue}Ro.has(r)&&t.add(r)}console.table([...t]);let r=Ho(n);console.debug(`%cNumero di banner in pagina: ${r.text}`,`color:${r.color};font-size: 14px;`)}function Ho(e){let t=Bo.find(({minCount:t})=>e>=t);return t==null?Bo[Bo.length-1]:t}var Uo=22;function Wo({adUnitKey:e,element:t,otherBlocksToLabel:n,sizes:r,stableMinHeight:i}){var a,o;if((i==null?void 0:i.enabled)===!1||!Go(e)||!(i==null||(a=i.excludeAdUnits)==null)&&a.includes(e))return;let s=qo(Ko(e,n)?Uo:0,r,(o=i==null?void 0:i.strategy)==null?`median`:o),c=t.parentElement,l=c!=null&&c.classList.contains(`container_${t.id}`)?c:t;s!=null&&l.style.minHeight!==`${s}px`&&(l.style.minHeight=`${s}px`)}function Go(e){let t=e.toUpperCase();return![`O_`,`F_`,`S_`].some(e=>t.startsWith(e))}function Ko(e,t){return e.includes(`C_`)||e.includes(`D_`)||e.includes(`B_`)||(t==null?void 0:t.includes(e))===!0}function qo(e,t,n){let r=t.filter(e=>Array.isArray(e)).map(e=>e[1]);if(r.length===0)return;let i;return n===`median`?i=Jo(r):n===`tallest`&&(i=Math.max(...r)),i==null?void 0:i+e}function Jo(e){let t=[...e].sort((e,t)=>e-t),n=Math.floor(t.length/2);return t.length%2==0?(t[n-1]+t[n])/2:t[n]}var Yo=new Set([`O_INTERSTITIAL`,`O_INTERSTITIAL_G`,`O_SKIN`]);function Xo(e){console.debug(`%cFORMAT_PREVIEW_MODE ON`,`background: #E53935; padding: 2px 4px;`);for(let[t,n]of Object.entries(e)){if(Yo.has(t))continue;let e=document.getElementById(t);if(e==null){console.debug(`AdUnit container not found for ${t}, skip`);continue}let r=n.filter(e=>Array.isArray(e));if(r.length===0){console.debug(`AdUnit ${t} has no fixed size to preview, skip`);continue}let[i,a]=r[0];e.innerHTML=` <p>${t}</p> <p>${r.map(e=>e.join(`x`)).join(`, `)}</p> `,e.style.cssText=` align-items:center; background-color:#cbcbcb; display:flex; flex-direction:column; font-size:28px; font-weight:700; height:${a}px; justify-content:center; margin-bottom:15px; margin-top:15px; text-align:center; width:${i}px; `}}var Zo=`/21832376849/TM_OnBoarding_TEST/TM_OnBoarding_TEST_`,Qo=`TM_OnBoarding_TEST`;function $o(e){return console.debug(`%cTEST_FORMAT_MODE ON`,`background: #E53935; padding: 2px 4px;`,`every ad slot is requested on ${Zo}`),j(j({},e),{},{fullNameAd:Zo,slug:Qo})}var es=`engine:beforeFlow`,ts=`engine:afterFlow`,ns=Zn.init(),rs=new gr,is=new bn,$=new Kr({logKey:`debug_engine`,label:`CORE`}),as=new g;window.__engine_inspection={buildId:`[develop]-[2026-11-13_14:39:57]`},window.ptechen=window.ptechen||{},window.ptechvip=window.ptechvip||{},window.ptechen.cmd=window.ptechen.cmd||[],ye(),xe();function os(e,t){return ss.apply(this,arguments)}function ss(){return ss=u(function*(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m;let h=(n=t==null?void 0:t.pageLifecycleManager)==null?ns:n,g=(r=t==null?void 0:t.contextManager)==null?rs:r,_=(i=t==null?void 0:t.consentReader)==null?is:i,ee=new Po({consentReader:_,contextManager:g,customProperties:(a=e.trackingOptions)==null?void 0:a.customProperties,disableAds:(o=e.execution)==null?void 0:o.disableAds,logger:$,navigationTrackingOptions:(s=e.trackingOptions)==null?void 0:s.navigationTrackingOptions,pageLifecycleManager:h,websiteId:e.website.websiteId}),v=(c=(l=e.execution)==null?void 0:l.virtualNavigationConfig)==null?{}:c,y=(u=v.titleObserver)==null?((d=e.compilePlugins)==null?void 0:d.infiniteScroll)==null&&void 0:u;h.configure(j(j({},v),{},{titleObserver:y}));let b=new Promise(e=>{let t=_.onConsentReleased({onConsentCallback:n=>{setTimeout(()=>{t()},0),e(n)},attemptThreshold:100,once:!0})}),x=w();(f=e.execution)!=null&&f.waitDomReady&&(yield ps()),(p=e.adInventoryConfig)!=null&&p.advLabelText&&document.documentElement.style.setProperty(`--adv-label-text`,`'${e.adInventoryConfig.advLabelText}'`);let S={config:e,consentReader:_,consentReady:b,contextManager:g,device:x,pageLifecycleManager:h,viewTracker:ee};if(yield se((m=e.execution)==null?void 0:m.disableAds)){$.warn(`Ads are disabled via execution config: the engine is not built. It will boot on the first virtual navigation where disableAds resolves false.`),cs(S);return}yield ls(S)}),ss.apply(this,arguments)}function cs(e){let t=!1,n=e.pageLifecycleManager.on(`virtualPageLoad`,()=>{if(t)return;function r(){return i.apply(this,arguments)}function i(){return i=u(function*(){var r;(yield se((r=e.config.execution)==null?void 0:r.disableAds))||t||(t=!0,n(),yield ls(e))}),i.apply(this,arguments)}r().catch(e=>{$.error(`Deferred engine boot failed:`,e)})})}function ls(e){return us.apply(this,arguments)}function us(){return us=u(function*({config:e,consentReader:t,consentReady:r,contextManager:i,device:a,pageLifecycleManager:o,viewTracker:s}){var c,l,d,f,p,m,h,g,_,ee,v,y;let b=he(`format_preview`),x=he(`debug_format`);!b&&!x&&(yield s.trackView());let S=x?$o(e.website):e.website,C=new Er($),w=Ie(e.sizeMapping),ne=new it({config:S.contentTaxonomy,readPage:()=>{let{pageTargeting:e,sectionsTargeting:t}=Je();return{pageType:e,sections:t}}}),T=(c=e.googlePublisherTagProvider)==null?void 0:c.call(e,{contentSignals:ne,contextManager:i,eventDispatcher:C,consentReader:t,divIdToAdUnitKeyMapping:(l=e.adInventoryConfig)==null?void 0:l.divIdToAdUnitKeyMapping,getAdUnitSizes:w.getAdUnitSizes,overridePrefixFullNameAd:x?S.fullNameAd:void 0,siteCategory:S.siteCategory}),re=yield r,E;try{var ie,ae;yield n();let r=e.prebidAdapterProvider&&!x?yield se(e.prebidAdapterProvider):void 0;E=r==null?void 0:r({consentReader:t,contentSignals:ne,consentManagementType:re.consentManagementType,contextManager:i,customFloorModelGroups:e.customFloorModelGroups,customFloorModelVersion:e.customFloorModelVersion,customFloorValues:e.customFloorPriceValues,device:a,deviceForSSP:te(),divIdToAdUnitKeyMapping:(ie=e.adInventoryConfig)==null?void 0:ie.divIdToAdUnitKeyMapping,domain:S.websiteDomain,eventDispatcher:C,fullNameAd:(ae=S.fullNameAd)==null?``:ae,sizeMappingRegistry:w,logger:$,pageLifecycleManager:o,personalizedAds:re.personalizedAds,sellerId:S.sellerId,websiteId:S.websiteId,websiteSlug:S.slug}),yield n()}catch(e){$.error(`Failed to initialize PrebidAdapter:`,e)}let D=new Qr(e.disposableAdSlots),O=new xi({gpt:T,prebidAdapter:E,eventDispatcher:C,divIdToAdUnitKeyMapping:(d=e.adInventoryConfig)==null?void 0:d.divIdToAdUnitKeyMapping,pageLifecycleManager:o,batchSelling:e.batchSelling,timeout:!1,onAdSlotSell:e=>D.registerAdSlot(e),isAdvDisabled:()=>D.isAdvDisabled()}),k=new Ka({adUnitsExcludedFromRefresh:(f=e.autoRefreshOptions)==null?void 0:f.adUnitsExcludedFromRefresh,config:(p=e.autoRefreshOptions)==null?void 0:p.config,contextManager:i,customAdUnitRefreshConfigMap:(m=e.autoRefreshOptions)==null?void 0:m.customAdUnitRefreshConfigMap,disableAutoRefresh:(h=e.autoRefreshOptions)==null?void 0:h.disableAutoRefresh,monetizationManager:O,eventDispatcher:C,pageLifecycleManager:o,resolveGptSlotDivId:T?e=>T.resolveSlotDivId(e):void 0}),oe=new zr({monetizationManager:O,eventDispatcher:C,logger:$,observerRootMargin:e.lazyLoadingRootMargin});C.subscribe({eventName:Re,subscriberName:`Engine`,callback:t=>{var n;let r=t.adUnitKey,i=Ko(r,(n=e.adInventoryConfig)==null?void 0:n.otherBlocksToLabel);if(Pe(w.getAdUnitSizes(t.adUnitKey))&&i){let e=document.getElementById(t.adUnitKey);e!=null&&e.classList.add(`advblockshown`)}}});let A={config:e,consentReader:t,contentSignals:ne,contextManager:i,eventDispatcher:C,gpt:T,lazyLoader:oe,logger:$,monetizationManager:O,pageLifecycleManager:o,prebidAdapter:E,refreshApi:{expediteSlotRefresh:k.expediteSlotRefresh.bind(k),isMrcReached:k.isMrcReached.bind(k),teardown:k.teardown.bind(k),unscheduleSlotRefresh:k.unscheduleSlotRefresh.bind(k),whenMrcReached:k.whenMrcReached.bind(k)},adSlotLifecycleApi:{isAdSlotDisposableOnVirtualNavigation:D.isAdSlotDisposableOnVirtualNavigation.bind(D),setAdSlotAsDisposableOnVirtualNavigation:D.setAdSlotAsDisposableOnVirtualNavigation.bind(D),isAdSlotSelfManaged:D.isAdSlotSelfManaged.bind(D),setAdSlotAsSelfManaged:D.setAdSlotAsSelfManaged.bind(D),isAdvDisabled:D.isAdvDisabled.bind(D)},scriptLoader:as,sizeMappingApi:w};function ce(){return le.apply(this,arguments)}function le(){return le=u(function*(){var t;(yield se((t=e.execution)==null?void 0:t.disableAds))?D.lockSell({gpt:T,monetizationManager:O,prebidAdapter:E,refreshManager:k}):D.unlockSell()}),le.apply(this,arguments)}if(yield ce(),e.compilePlugins&&!b){var ue;let t=new Kr({logKey:`debug_engine`,label:`COMPILE_PLUGINS`}),n=nn(e.compilePlugins,j(j({},A),{},{device:a,domain:S.websiteDomain,fullNameAd:(ue=S.fullNameAd)==null?``:ue,isDesktop:a===`desktop`,isMobile:a===`mobile`,isTablet:a===`tablet`,sellerId:S.sellerId}),C,t);n.length>0&&$t(n,C,t)}if(Te({ctx:A,device:a,isDesktop:a===`desktop`,isMobile:a===`mobile`,isTablet:a===`tablet`}),be(),yield n(),typeof((g=e.hooks)==null?void 0:g.beforeFlow)==`function`)try{e.hooks.beforeFlow(A)}catch(e){$.error(`Before flow hook error:`,e)}if(he(`banner_debug`)&&Vo(w.getSizeMapping(a)),b){Xo(w.getSizeMapping(a));return}if(C.dispatch({EVENT_NAME:es,type:`standard`}),ds({customInstantSlotToSell:(_=e.adInventoryConfig)==null?void 0:_.customInstantSlotToSell,device:a,otherBlocksToLabel:(ee=e.adInventoryConfig)==null?void 0:ee.otherBlocksToLabel,stableMinHeight:(v=e.adInventoryConfig)==null?void 0:v.stableMinHeight,isAdSlotSelfManaged:D.isAdSlotSelfManaged.bind(D),lazyLoader:oe,monetizationManager:O,sizeMappingRegistry:w}),C.dispatch({EVENT_NAME:ts,type:`standard`}),typeof((y=e.hooks)==null?void 0:y.afterFlow)==`function`)try{e.hooks.afterFlow(A)}catch(e){$.error(`After flow hook error:`,e)}function de(e){return fe.apply(this,arguments)}function fe(){return fe=u(function*(t){var r,i,o,s,c;if(yield ce(),t.type===`bfcache-restore`?D.resetSoldAdSlots({gpt:T,monetizationManager:O,prebidAdapter:E,refreshManager:k},e=>w.getSizeMapping(a)[e]!=null&&document.getElementById(e)!=null):D.disposeAdSlots(t.type,{gpt:T,monetizationManager:O,prebidAdapter:E,refreshManager:k}),t.type!==`infinite-scroll`&&(E==null||E.removeUserSyncs()),yield n(),typeof((r=e.hooks)==null?void 0:r.beforeVirtualFlow)==`function`)try{e.hooks.beforeVirtualFlow(j(j({},A),{},{virtualPageContext:t}))}catch(e){$.error(`Before virtual flow hook error:`,e)}else $.warn(`No beforeVirtualFlow hook provided, skipping.`);if(C.dispatch({EVENT_NAME:es,type:`virtual`,url:t.url,virtualNavigationType:t.type}),ds({customInstantSlotToSell:(i=e.adInventoryConfig)==null?void 0:i.customInstantSlotToSell,device:a,otherBlocksToLabel:(o=e.adInventoryConfig)==null?void 0:o.otherBlocksToLabel,stableMinHeight:(s=e.adInventoryConfig)==null?void 0:s.stableMinHeight,isAdSlotSelfManaged:D.isAdSlotSelfManaged.bind(D),lazyLoader:oe,monetizationManager:O,sizeMappingRegistry:w,refreshManager:k,virtualNavigationType:t.type}),C.dispatch({EVENT_NAME:ts,type:`virtual`,url:t.url,virtualNavigationType:t.type}),typeof((c=e.hooks)==null?void 0:c.afterVirtualFlow)==`function`)try{e.hooks.afterVirtualFlow(j(j({},A),{},{virtualPageContext:t}))}catch(e){$.error(`After virtual flow hook error:`,e)}else $.warn(`No afterVirtualFlow hook provided, skipping.`)}),fe.apply(this,arguments)}o.on(`virtualPageLoad`,e=>{de(e)}),o.on(`bfcacheRestore`,()=>{de({url:window.location.href,type:`bfcache-restore`})}),Se({ctx:A,device:a,isDesktop:a===`desktop`,isMobile:a===`mobile`,isTablet:a===`tablet`})}),us.apply(this,arguments)}function ds({customInstantSlotToSell:e,device:t,isAdSlotSelfManaged:n,lazyLoader:r,monetizationManager:i,otherBlocksToLabel:a,sizeMappingRegistry:o,refreshManager:s,stableMinHeight:c,virtualNavigationType:l}){let u=fs(t,o,a,c),d=new Set({desktop:[`F_D`,`S_1`,`S_2`],tablet:[`F_D`],mobile:[`F_M`]}[t]);if(e!=null){let n=A(e);if(n[t]instanceof Set)for(let e of n[t])d.add(e)}let f=new Set([`F_M`,`F_D`,`S_1`,`S_2`].filter(e=>u.has(e))),p=new Set([...u].filter(e=>!f.has(e))),m=[...f,...p];for(let e of m)if((n==null?void 0:n(e))!==!0){if(s&&s.isSlotRegistered(e)){l!==`infinite-scroll`&&s.expediteSlotRefresh(e,e);continue}d.has(e)?i.sell({adUnitKey:e,divId:e,refreshCount:0}):r.register({adUnitKey:e,divId:e})}for(;window.ptechen.cmd.length>0;)window.ptechen.cmd.shift()()}function fs(e,t,n,r){let i=new Set,a=t.getSizeMapping(e),o=Object.keys(a);for(let s of o){let o=document.getElementById(s);if(o==null)continue;i.add(s);let c=De(o,e);c.length>0&&t.setAdUnitSizes(s,c),Wo({adUnitKey:s,element:o,otherBlocksToLabel:n,sizes:a[s],stableMinHeight:r})}return i}function ps(){return new Promise(e=>{document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,()=>e(),{once:!0}):e()})}var ms=Lt();if(ms==null)throw Error(`monrif: unrecognized hostname `+window.location.hostname);var{sellerId:hs,websiteId:gs,websiteDomain:_s,slug:vs,fullNameAd:ys,pubstackId:bs}=ms;zt(),bs!=null&&Rt(bs);var xs=Gt(),Ss={"leaderboard-728-or-skin":`T_1`,"leaderboard-728-or-skin-news":`T_1`,"300x250top-mobile-article":`T_1`,"masthead-990":`T_2`,"50-mobile":`T_2`,"300x250top-mobile":`C_1`,"native-mobile-1":`C_2`,"300x250-Inlettura":`C_2`,"Inlettura-desktop":`C_2`,"native-mobile-2":`C_3`,"native-mobile-3":`C_4`,"300x250-mobile-middle":`C_5`,"desktop-correlati-articolo-1":`D_1`,"videobox-top-300":`D_1`,"videobox-bottom-300":`D_2`,"desktop-correlati-articolo-2":`D_2`,"desktop-correlati-articolo-3":`D_2`,"desktop-correlati-articolo-4":`D_2`,"desktop-correlati-articolo-5":`D_2`,"mobile-correlati-articolo-1":`B_1`,"masthead-990-2":`B_1`,"below-article-reload":`B_1`,"mobile-correlati-articolo-2":`B_2`,O_SKIN:`O_SKIN`};function Cs(e){let t=[];for(let n of e)n.width!==void 0&&n.height!==void 0&&t.push([n.width,n.height]);return t}function ws(e){try{var t,n;if(e==null)return e;let r=e.pagina,i=e.section;return((t=window.MonrifPolopolyUtility)==null?void 0:t.page_type)!==void 0&&(r=window.MonrifPolopolyUtility.page_type),((n=window.MonrifPolopolyUtility)==null?void 0:n.top_subject)!==void 0&&(i=[...Array.isArray(i)?i:[],window.MonrifPolopolyUtility.top_subject]),j(j({},e),{},{pagina:r,section:i})}catch(t){return console.error(t),e}}window.ptechen=window.ptechen||{},window.ptechen.loadAdunit=function(e,t){let n=Ss[e];if(n==null)throw Error(`Ad unit with element ID "${e}" is not mapped to any internal code.`);we(e=>{let r=t.getSlotElementId(),i=Cs(t.getSizes());e.ctx.monetizationManager.sell({adUnitKey:n,overridePrebidAdUnitCode:r,divId:r,overrideAdUnitSizes:i,existingGoogleTagSlot:t})})},os({adInventoryConfig:{advLabelText:`advertisement`},autoRefreshOptions:{disableAutoRefresh:!0},googlePublisherTagProvider:_t({prefixFullNameAd:`${vs}/${vs}_`,globalTargetingTransformer:ws}),prebidAdapterProvider:xs,website:{contentTaxonomy:{vertical:[`379`]},fullNameAd:ys,sellerId:hs,slug:vs,websiteDomain:_s,websiteId:gs}})})(); //# sourceMappingURL=init.js.map