PageSourceSearch

https://static.fcinter1908.it/build/7473.cb7aaee7.js

js fcinter1908.it collected 2026-10-02 06:15:37 UTC 120,639 bytes, 2 lines download raw bytes

1(self.webpackChunkgazzanet_symfony=self.webpackChunkgazzanet_symfony||[]).push([[7473],{25490:function(e,t,i){var s={"./adv-position1_controller.ts":14366,"./adv-skin_controller.ts":8019,"./adv-sticky-block_controller.ts":23489,"./adv_controller.ts":97038,"./category-intro_controller.ts":71473,"./cmp-bridge_controller.ts":91326,"./comments_controller.ts":68502,"./csrf_protection_controller.js":83568,"./dailymotion_controller.ts":83505,"./facebook_embed_controller.ts":14974,"./floor_ad_controller.ts":14074,"./font_resizer_controller.ts":10148,"./header_article_controller.ts":84408,"./header_main_controller.ts":85997,"./instagram_embed_controller.ts":20246,"./lightbox_controller.ts":35075,"./lineup-filter_controller.ts":24508,"./login-form_controller.ts":85986,"./match_center_controller.ts":805,"./modal-manager_controller.ts":22441,"./modal-trigger_controller.ts":47524,"./next_match_controller.ts":54625,"./oddschecker_controller.ts":93603,"./offcanvas_menu_controller.ts":42691,"./password_visibility_controller.ts":17054,"./poll_controller.ts":40107,"./profile-form_controller.ts":18922,"./pull_to_refresh_controller.ts":18415,"./pwa_installer_controller.ts":69537,"./read_more_controller.ts":49560,"./reading_progress_controller.ts":58014,"./recover-password-form_controller.ts":1693,"./register-form_controller.ts":75142,"./reset-password-form_controller.ts":7584,"./revive_controller.ts":83151,"./search-bar_controller.ts":10632,"./sky_controller.ts":56315,"./social-login_controller.ts":87861,"./social_embed_controller.ts":10287,"./sticky_player_controller.ts":69847,"./taboola_controller.ts":39578,"./taboola_passback_controller.ts":32379,"./teams_menu_controller.ts":79472,"./user-menu_controller.ts":83107};function n(e){var t=o(e);return i(t)}function o(e){if(!i.o(s,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return s[e]}n.keys=function(){return Object.keys(s)},n.resolve=o,e.exports=n,n.id=25490},35828:function(e,t){"use strict";t.A={}},83568:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return n}});var s=i(52891);const n=class extends s.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||i.e(2436).then(i.bind(i,32436)).then(e=>{this.application.register(this.identifier,e.default)})}}},14366:function(e,t,i){"use strict";i.r(t);var s=i(52891);const n=(0,i(51405).h)("adv","position1");t.default=class extends s.xI{constructor(){super(...arguments),this.countdownInterval=null,this.boundOnSlotFilled=this.onSlotFilled.bind(this),this.boundOnSlotEmpty=this.onSlotEmpty.bind(this),this.headerElement=null,this.timeSpan=null}connect(){this.element.addEventListener("adv:slot-filled",this.boundOnSlotFilled),this.element.addEventListener("adv:slot-empty",this.boundOnSlotEmpty)}disconnect(){this.element.removeEventListener("adv:slot-filled",this.boundOnSlotFilled),this.element.removeEventListener("adv:slot-empty",this.boundOnSlotEmpty),this.cleanUp()}onSlotEmpty(){this.cleanUp(),this.element.style.display="none"}onSlotFilled(e){const t=e.detail?.size;this.isOneByOne(t)?n.info("Native 1x1 Interstitial rilevato. Lascio il controllo agli script esterni."):(n.info(`Banner standard rilevato (${t}). Costruisco l'interfaccia Interstitial manuale...`),this.buildManualInterstitial())}isOneByOne(e){return Array.isArray(e)&&2===e.length?1===Number(e[0])&&1===Number(e[1]):!(!Array.isArray(e)||!Array.isArray(e[0])||2!==e[0].length)&&(1===Number(e[0][0])&&1===Number(e[0][1]))}buildManualInterstitial(){this.cleanUp();let e=7;this.element.classList.add("adv-intro-overlay"),this.headerElement=document.createElement("div"),this.headerElement.className="absolute top-4 left-0 w-full px-4 md:px-8 grid grid-cols-[1fr_auto_1fr] items-center z-[10000000] text-white font-sans";const t=document.createElement("div");t.className="col-start-2 justify-self-center text-base font-bold uppercase tracking-widest select-none ",t.innerHTML=`CHIUSURA IN <span data-adv-timer>${e}</span>
1 SECONDI`,this.timeSpan=t.querySelector("[data-adv-timer]");const i=document.createElement("button");i.className="col-start-3 justify-self-end w-10 h-10 flex items-center justify-center rounded-full bg-white/20 hover:bg-white/40 backdrop-blur-md border border-white transition-colors cursor-pointer shadow-lg",i.innerHTML='\n            <svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24" class="w-6 h-6">\n                <path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"/>\n            </svg>\n        ',i.addEventListener("click",()=>this.closeInterstitial()),this.headerElement.appendChild(t),this.headerElement.appendChild(i),this.element.appendChild(this.headerElement),this.countdownInterval=window.setInterval(()=>{e--,e>0?this.timeSpan&&(this.timeSpan.textContent=String(e)):this.closeInterstitial()},1e3)}closeInterstitial(){n.info("Chiusura Interstitial manuale."),this.cleanUp(),this.element.style.display="none"}stopTimer(){this.countdownInterval&&(window.clearInterval(this.countdownInterval),this.countdownInterval=null)}cleanUp(){this.stopTimer(),this.element.classList.remove("adv-intro-overlay"),this.headerElement&&(this.headerElement.remove(),this.headerElement=null,this.timeSpan=null)}}},8019:function(e,t,i){"use strict";i.r(t);var s=i(52891),n=i(85937),o=i(51405),r=i(23782);const a=(0,o.h)("adv","skin-controller");t.default=class extends s.xI{constructor(){super(...arguments),this.advElement=null,this.skinActive=!1,this.boundOnSlotFilled=this.onSlotFilled.bind(this),this.boundOnSlotEmpty=this.onSlotEmpty.bind(this),this.boundSyncHeaderHeight=this.syncHeaderHeight.bind(this)}connect(){this.advElement=this.element.querySelector('[data-controller~="adv"]')||this.element,this.advElement.addEventListener("adv:slot-filled",this.boundOnSlotFilled),this.advElement.addEventListener("adv:slot-empty",this.boundOnSlotEmpty)}disconnect(){this.advElement&&(this.advElement.removeEventListener("adv:slot-filled",this.boundOnSlotFilled),this.advElement.removeEventListener("adv:slot-empty",this.boundOnSlotEmpty)),this.resetSkin()}resetSkin(){if(!this.skinActive)return;this.skinActive=!1,a.info("Eseguo reset completo Skin/Wallpaper prima del nuovo banner");const e=["has-adv-skin","skin-rendered","is-fullscreen-skin","is-fake-skin","is-skin-pending","skinVa","skin","skin25","skinLiquid","RECOD3SkinContainer","skinAdForm"];document.body.classList.remove(...e),document.documentElement.classList.remove(...e),this.element.classList.remove(...e);const t=e.map(e=>`.${e}`).join(", ");document.querySelectorAll(t).forEach(t=>{t.classList.remove(...e)}),document.body.className=document.body.className.replace(/\bRECOD3[^\s]*\b/g,"");["#barra_click_top","#barra_click_sx","#barra_click_dx","#skin_link_css"].forEach(e=>document.querySelector(e)?.remove()),this.element&&(this.element.style.height="",this.element.style.backgroundColor=""),window.removeEventListener("resize",this.boundSyncHeaderHeight),document.body.style.removeProperty("--site-header-height")}syncHeaderHeight(){const e=document.querySelector("header"),t=document.getElementById("gazzetta-topbar"),i=e?.getBoundingClientRect().height??0,s=t?.getBoundingClientRect().height??0;document.body.style.setProperty("--site-header-height",`${Math.round(i+s)}px`)}waitForElement(e,t,i){const s=e.querySelector(t);if(s)return void i(s);const n=new MutationObserver(()=>{const s=e.querySelector(t);s&&(n.disconnect(),i(s))});n.observe(e,{childList:!0,subtree:!0})}getAdFormMarker(){const e=this.advElement?.querySelector("iframe");let t=null;try{t=e?.contentDocument||e?.contentWindow?.document||null}catch{t=null}return t?.querySelector('.GoogleActiveViewElement script[src*="adform.net"]')??null}setupAdFormSkin(){a.info("[SKIN] AdForm rilevato"),this.advElement.classList.add("skinVa","skinAdForm"),document.body.classList.add("skinAdForm");const e=this.advElement.querySelector("iframe"),t=e?.contentDocument||e?.contentWindow?.document;t&&this.waitForElement(t,".adform-adbox > div > iframe",e=>{e.addEventListener("load",()=>{const t=e.contentDocument||e.contentWindow?.document;t&&this.waitForElement(t,"#adf-banner",()=>{if(!t.head||t.getElementById("rcs-adform-skin-internal-style"))return;const e=t.createElement("style");e.id="rcs-adform-skin-internal-style";const i=document.querySelector("main")?.getBoundingClientRect().width||1200,s=document.body.style.getPropertyValue("--site-header-height")||"0px";e.textContent=`\n                        #adf-banner {\n                            --site-container-width: ${i}px;\n                            --banner-left-rightpos: calc(50% + var(--site-container-width) / 2);\n                            --banner-right-leftpos: calc(50% + var(--site-container-width) / 2);\n                        }\n                        #adf-banner > * {\n                            position: absolute;\n                        }\n                        #adf-banner-top,\n                        #adf-banner-left,\n                        #adf-banner-right {\n                            top: ${s} !important;\n                        }\n                        #adf-banner-top {\n                            margin-left: 0 !important;\n                            transform: translateX(-50%);\n                            left: 50vw;\n                        }\n                        #adf-banner-left {\n                            left: auto !important;\n                            right: var(--banner-left-rightpos);\n                        }\n                        #adf-banner-right {\n                            left: var(--banner-right-leftpos) !important;\n                        }\n                    `,t.head.appendChild(e),a.info("[SKIN] css custom per skin AdForm inserito in iframe")})})})}onSlotEmpty(){a.info("Slot empty, resetto skin e chiamo gli skyscraper"),this.resetSkin(),(0,r.Qr)("adv:trigger-skyscrapers")}onSlotFilled(e){const t=e.detail?.renderType,i=e.detail?.size;if(this.resetSkin(),a.info(`Valutazione banner post-render. Type: ${t}`,i),t&&"unknown"!==t&&"oop"!==t&&("skin"===t?(a.info("Dimensione da Skin rilevata. Avvio Quarantena e val
1idazione empirica..."),this.advElement.classList.add("is-skin-pending"),(0,n.f)(()=>{if(this.advElement.querySelector('iframe[iat-market], iframe[src*="criteo"], iframe[src*="rubicon"]'))throw new Error("FakeSkinDetected");const e=document.getElementById("barra_click_dx"),t=document.querySelector(".skinLiquid"),i=document.querySelector("iframe[data-skin-recod3]"),s=this.getAdFormMarker();if(e||t||i||s)return e||document.body;throw new Error("Elementi della Skin non ancora trovati...")},{numOfAttempts:20,startingDelay:150,timeMultiple:1.1}).then(e=>{a.info("✅ Skin verificata! Rilascio la quarantena e mi espando."),this.skinActive=!0,this.advElement.classList.remove("is-skin-pending"),this.syncHeaderHeight(),window.addEventListener("resize",this.boundSyncHeaderHeight,{passive:!0}),(0,r.Qr)("adv:kill-skyscrapers"),this.element.classList.add("is-fullscreen-skin"),document.body.classList.add("has-adv-skin"),this.getAdFormMarker()&&this.setupAdFormSkin(),e&&e.style&&(e.style.height=String(document.body.scrollHeight)+"px"),requestAnimationFrame(()=>{requestAnimationFrame(()=>{a.info("Forzo evento resize sintetico per allineamento Skin RCS"),window.dispatchEvent(new Event("resize"))})})}).catch(e=>{a.warn(`❌ Falso positivo rilevato (${e.message}). Applico il BAVAGLIO a 250px.`),this.advElement.classList.remove("is-skin-pending"),this.element.classList.add("is-fake-skin"),(0,r.Qr)("adv:trigger-skyscrapers")})):"standard"!==t&&"giant"!==t&&"empty"!==t||(a.info("Banner standard erogato. Sveglio gli skyscraper!"),(0,r.Qr)("adv:trigger-skyscrapers")),"giant"===t)){a.info("Banner GIANT erogato. Tolgo il tappo CSS e permetto l'espansione.");const e=document.getElementById("rcsad_TopLeft");e&&e.classList.remove("h-[250px]")}}}},23489:function(e,t,i){"use strict";i.r(t);var s=i(52891);const n=(0,i(51405).h)("adv","sticky-block");class o extends s.xI{constructor(){super(...arguments),this.advEl=null,this.blockerEl=null,this.isSticky=!1,this.isHidden=!1,this.isFinished=!1,this.stickyTop=0,this.naturalAbsoluteTop=0,this.timerId=null,this.attrObserver=null,this.onScroll=()=>{const e=this.naturalAbsoluteTop-window.scrollY;if(e>this.stickyTop)(this.isSticky||this.isHidden)&&this.resetToNormal();else if(!this.isFinished&&e<=this.stickyTop){if(!this.isSticky&&!this.isHidden){if(this.advEl&&this.advEl.offsetHeight>260)return n.info("Banner troppo alto (Giant/Espanso). Stickyness abortita.",{altezza:this.advEl.offsetHeight}),this.isFinished=!0,void this.disableSticky();this.makeSticky()}if(this.isSticky&&!this.isHidden){if(this.advEl&&this.advEl.offsetHeight>260)return n.info("Il banner si è espanso a causa di un refresh mentre era sticky! Lo rimetto al suo posto.",{altezza:this.advEl.offsetHeight}),void this.resetToNormal();if(this.blockerEl){const e=this.blockerEl.getBoundingClientRect(),t=this.advEl?.offsetHeight||0;e.top<=t&&this.hideSticky("blocker")}}}}}connect(){this.isDesktopViewport()?(this.advEl=this.resolveAdvElement(),this.blockerEl=this.resolveBlockerElement(),this.advEl&&(this.isEligibleNow()?this.armOnScroll():this.observeAdvAttributes())):n.info("skip: mobile viewport")}disconnect(){this.resetToNormal(),this.disableSticky(),this.attrObserver?.disconnect(),this.attrObserver=null,this.advEl=null,this.blockerEl=null}resolveAdvElement(){const e=this.element.querySelector("[data-adv-render-type]");return e||this.element.querySelector('[data-controller~="adv"]')}resolveBlockerElement(){if(!this.hasBlockerIdValue)return null;const e=this.blockerIdValue?.trim();return e?document.getElementById(e):null}isDesktopViewport(){return window.matchMedia("(min-width: 768px)").matches}isEligibleNow(){if(!this.advEl)return!1;const e=this.advEl.dataset.advStatus??"loading",t=this.advEl.dataset.advRenderType??"unknown";return"filled"===e&&"standard"===t}observeAdvAttributes(){this.advEl&&(this.attrObserver=new MutationObserver(()=>{this.isEligibleNow()&&(this.attrObserver?.disconnect(),this.attrObserver=null,this.armOnScroll())}),this.attrObserver.observe(this.advEl,{attributes:!0,attributeFilter:["data-adv-status","data-adv-render-type"]}))}armOnScroll(){this.advEl&&(this.stickyTop=-this.advEl.offsetTop,this.naturalAbsoluteTop=window.scrollY+this.element.getBoundingClientRect().top,this.element.style.top=`${this.stickyTop}px`,this.element.classList.add("is-adv-sticky-container"),window.addEventListener("scroll",this.onScroll,{passive:!0}))}makeSticky(){this.advEl&&(n.info("make-sticky"),this.isSticky=!0,this.advEl.classList.add("is-adv-sticky","is-adv-sticky-size"),this.advEl.classList.remove("is-adv-hidden"),this.timerId=window.setTimeout(()=>{this.hideSticky("timeout")},1e6))}hideSticky(e){this.advEl&&this.isSticky&&(n.info("hide-sticky",{reason:e}),this.isHidden=!0,this.isFinished=!0,this.advEl.classList.add("is-adv-hidden"))}resetToNormal(){this.advEl&&(n.info("reset-to-normal"),this.timerId&&(window.clearTimeout(this.timerId),this.timerId=null),this.isSticky=!1,this.isHidden=!1,this.isFinished=!0,this.advEl.classList.remove("is-adv-sticky","is-adv-hidden"),this.disableSticky())}disableSticky(){this.element.classList.remove("is-adv-sticky-container"),this.element.style.top="",this.advEl?.classList.remove("is-adv-sticky-size"),window.removeEventListener("scroll",this.onScroll)}}o.values={blockerId:String},t.default=o},97038:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return g}});
1var s=i(52891),n=i(85937),o=i(55821),r=i(51405),a=i(32781),l=i(23782);const c=new Set;var d=i(5379),h=i(2549);const u=(0,r.h)("adv","controller"),p=(0,r.h)("hb","controller");class m extends s.xI{constructor(){super(...arguments),this.dmpReady=!1,this.gaveUp=!1,this.consentDenied=!1,this.unsubscribeFromBus=[],this.claimedGptId=null,this.lazyObserver=null,this.onSignal=()=>{this.consentDenied=!1,this.kickRenderLoop()},this.onConsentError=e=>{"consent-denied"===e?.reason&&(this.consentDenied=!0,this.element.dataset.advStatus="error",u.warn("adv:consent-denied",this.keyValue))},this.onKillSkyscrapers=()=>{("skyscraper"===this.fetchGroupValue||this.element.id.includes("Position3.1")||this.element.id.includes("Position3.2"))&&(u.info(`[ADV] Ordine di distruzione skyscraper: ${this.claimedGptId}`),this.element.remove(),this.gaveUp=!0,this.disconnect())}}connect(){if(!this.matchesViewport())return this.gaveUp=!0,this.element.classList.add("adv--skipped"),void u.info("skip-viewport",this.keyValue);const e=(0,h.EW)(),t=e?.site,i=this.keyValue,s=t?e?.adunits?.[t]?.[i]:void 0;if(!s)return u.warn("skip: missing adv config",{key:i,site:t}),void(this.gaveUp=!0);const n=s.rcsId;
1return n?(o=n,c.has(o)||(c.add(o),0)?(this.gaveUp=!0,this.element.classList.add("adv--skipped"),void u.info("skip: rcsId already claimed",{key:i,id:n})):(this.claimedGptId=n,this.element.id=n,this.element.setAttribute("data-adv-claimed",n),this.element.dataset.advStatus="loading",this.element.dataset.advRenderType="unknown",this.element.dataset.advSizes=this.serializeSizes(s.sizes),this.element.dataset.advRenderedSize="",this.element.classList.add("adv--loading"),this.unsubscribeBus(),this.unsubscribeFromBus=[(0,l.HS)("adv:ready",this.onSignal),(0,l.HS)("gpt:ready",this.onSignal),(0,l.HS)("dmp:ready",()=>{this.dmpReady=!0,this.onSignal()}),(0,l.HS)("adv:error",this.onConsentError),(0,l.HS)("adv:kill-skyscrapers",this.onKillSkyscrapers)],void(this.tryRender()?this.gaveUp=!0:this.kickRenderLoop()))):(u.error("FATAL: missing rcsId in adv config",{key:i,site:t,conf:s}),void(this.gaveUp=!0));var o}disconnect(){var e;this.unsubscribeBus(),this.claimedGptId&&(e=this.claimedGptId,c.delete(e),this.claimedGptId=null),this.lazyObserver&&(this.lazyObserver.disconnect(),this.lazyObserver=null),u.info("Adv disconnected",this.keyValue)}unsubscribeBus(){this.unsubscribeFromBus.length&&(this.unsubscribeFromBus.forEach(e=>e()),this.unsubscribeFromBus=[])}matchesViewport(){const e=this.hasIsMobileValue&&this.isMobileValue,t=this.hasIsDesktopValue&&this.isDesktopValue;if(!e&&!t)return!0;const i=window.matchMedia("(min-width: 768px)").matches;return e&&!t?!i:!(t&&!e)||i}kickRenderLoop(){this.gaveUp||this.consentDenied||(0,n.f)(()=>{if(this.tryRender())return this.gaveUp=!0,!0;throw new Error("adv not ready")},{startingDelay:120,timeMultiple:1.7,maxDelay:2e3,numOfAttempts:Number.POSITIVE_INFINITY,retry:()=>!this.gaveUp&&!this.consentDenied,jitter:.2}).catch(e=>{this.gaveUp||this.consentDenied||u.warn("Back Off giveup",this.keyValue,e)})}tryRender(){if(this.gaveUp||this.consentDenied)return!1;const e=(0,h.EW)(),t=e?.site,i=this.keyValue,s=t?e?.adunits?.[t]?.[i]:void 0;if(!s||!s.rcsId)return!1;if(!(0,h.fj)()||!window.googletag?.pubads)return!1;const n=o.s.get(),r=(0,a.p)(n);if(!this.dmpReady&&!r)return!1;const c=s.rcsId,m=window.googletag;return m.cmd.push(()=>{if(this.gaveUp)return;const e=window.screen.width;let t="KO";e>=1484&&(t="normal",e>=1920&&(t="super_skin")),m.pubads().setTargeting("Skin",t),u.info(`[ADV] Skin key value: ${t}`);const n=m.defineSlot(s.adUnitPath,s.sizes,c).addService(m.pubads());if(s.sizeMapping?.length){const e=m.sizeMapping();s.sizeMapping.sort((e,t)=>e.mq-t.mq).forEach(t=>e.addSize([t.mq,0],t.sizes)),n.defineSizeMapping(e.build())}m.pubads().addEventListener("slotRenderEnded",e=>this.onSlotRenderEnded(e,n,s)),m.display(c);const o=this.fetchGroupValue;switch(o){case"sra":case"skyscraper":(0,d.Is)(c,n,o),(0,l.Qr)("hb:slot-registered",{id:c,group:o});break;case"native":case"lazy":p.info("Setup Lazy Load observer",{key:i,id:c}),this.setupLazyLoad(c,n,o)}}),!0}setupLazyLoad(e,t,i){this.lazyObserver=new IntersectionObserver(s=>{s[0].isIntersecting&&(this.lazyObserver?.disconnect(),this.lazyObserver=null,"native"===i?(p.info("Native slot in view, forcing Direct Refresh (No HB)",{id:e}),window.googletag.cmd.push(()=>{window.googletag.pubads().refresh([t])})):(p.info("Lazy slot in view, triggering HB auction",{id:e}),(0,l.Qr)("hb:lazy-trigger",{id:e,slot:t})))},{rootMargin:"1500px 0px"}),this.lazyObserver.observe(this.element)}inferRenderTypeFromEventSize(e){if("fluid"===e||Array.isArray(e)&&"fluid"===e[0])return"standard";if(!Array.isArray(e)||2!==e.length)return"unknown";const t=Number(e[0]),i=Number(e[1]);return Number.isFinite(t)&&Number.isFinite(i)?1920===t&&1080===i||1800===t&&1e3===i||1===t&&1===i?"skin":940===t&&530===i||940===t&&531===i?"giant":"standard":"unknown"}serializeSizes(e){if(!Array.isArray(e))return"";const t=[];for(const i of e)"fluid"===i?t.push("fluid"):Array.isArray(i)&&2===i.length&&Number.isFinite(i[0])&&Number.isFinite(i[1])&&t.push(`${i[0]}x${i[1]}`);return Array.from(new Set(t)).join(",")}onSlotRenderEnded(e,t,i){if(e.slot!==t)return;if(this.element.classList.remove("adv--loading","adv--empty","adv--filled"),e.isEmpty)return this.element.classList.add("adv--empty"),this.element.dataset.advRenderType="unknown",this.element.dataset.advRenderedSize="",this.element.dataset.advStatus="empty",void this.element.dispatchEvent(new CustomEvent("adv:slot-empty",{detail:{id:this.claimedGptId},bubbles:!0}));const s=e.size;"fluid"===s||Array.isArray(s)&&"fluid"===s[0]?this.element.dataset.advRenderedSize="fluid":Array.isArray(s)&&2===s.length?this.element.dataset.advRenderedSize=`${s[0]}x${s[1]}`:this.element.dataset.advRenderedSize="";const n=this.inferRenderTypeFromEventSize(s);if(this.element.dataset.advRenderType=n,this.element.classList.add("adv--filled"),this.element.dataset.advStatus="filled","standard"===n&&!this.element.dataset.sizesRestricted){this.element.dataset.sizesRestricted="true";const e=window.googletag.sizeMapping();let s=!1;const n=e=>{if("fluid"===e)return!0;
1if(Array.isArray(e)&&2===e.length){const t=Number(e[0]),i=Number(e[1]);if(t>=1800)return!1;if(1===t&&1===i)return!1;if(t>=900&&i>=500)return!1}return!0};if(i.sizeMapping?.length)i.sizeMapping.forEach(t=>{const i=t.sizes.filter(n);e.addSize([t.mq,0],i)}),s=!0;else{const t=i.sizes.filter(n);e.addSize([0,0],t),s=!0}s&&(t.defineSizeMapping(e.build()),u.info(`[ADV] Gabbia di Refresh attivata: taglie giganti disabilitate per ${this.claimedGptId}`))}this.element.dispatchEvent(new CustomEvent("adv:slot-filled",{detail:{renderType:this.element.dataset.advRenderType,size:s},bubbles:!0}))}}m.values={key:String,isMobile:Boolean,isDesktop:Boolean,fetchGroup:{type:String,default:"lazy"}};var g=m},71473:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return n}});var s=i(52891);const n=class extends s.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||i.e(6181).then(i.bind(i,66181)).then(e=>{this.application.register(this.identifier,e.default)})}}},91326:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return n}});var s=i(52891);const n=class extends s.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||i.e(8474).then(i.bind(i,38474)).then(e=>{this.application.register(this.identifier,e.default)})}}},68502:function(e,t,i){"use strict";i.r(t);var s=i(52891),n=i(52752),o=i(42627),r=i(1853);const a=(0,i(51405).h)("comments","controller"),l="user_voted_comments";class c extends s.xI{constructor(){super(...arguments),this.isAuthenticated=!1,this.authCheckPromise=null,this.offset=0,this.isLoading=!1,this.allLoaded=!1,this.handleAuthSuccess=()=>{this.isAuthenticated=!0}}connect(){this.authCheckPromise=this.checkAuthStatus(),window.addEventListener("auth:success",this.handleAuthSuccess),this.postIdValue&&(0,n.v1)(this,{rootMargin:"100px",threshold:.1})}disconnect(){window.removeEventListener("auth:success",this.handleAuthSuccess)}async loadMore(e){e.preventDefault(),await this.loadComments()}async appear(e,t){a.info("Appear modal - Post Id:",this.postIdValue),await this.loadComments(),t.unobserve(e.target)}async loadComments(){if(this.isLoading||this.allLoaded)return;const e=(0,r.J)("endpoints.api_comment");
1if(!e)return void a.warn('Endpoint "endpoints.api_comment" mancante in page-data.');this.isLoading=!0,this.hasLoaderTarget&&this.loaderTarget.classList.remove("hidden");const t=new URL(e,window.location.origin);t.searchParams.append("post_id",this.postIdValue),t.searchParams.append("limit",this.limitValue.toString()),t.searchParams.append("offset",this.offset.toString());try{const e=await fetch(t.toString(),{headers:{"X-Requested-With":"XMLHttpRequest"}});if(!e.ok)return this.disableCommentPagination(),void a.warn("Caricamento commenti non riuscito.",{status:e.status,statusText:e.statusText});const i="1"===e.headers.get("X-Has-Next-Page"),s=await e.text();this.listTarget.insertAdjacentHTML("beforeend",s),this.offset+=this.limitValue,this.updateVotedUI(),i||(this.allLoaded=!0,this.hasLoadMoreBtnTarget&&this.loadMoreBtnTarget.classList.add("hidden"))}catch(e){this.disableCommentPagination(),a.warn("Errore caricamento commenti:",e)}finally{this.isLoading=!1,this.hasLoaderTarget&&this.loaderTarget.classList.add("hidden")}}disableCommentPagination(){this.allLoaded=!0,this.hasLoadMoreBtnTarget&&this.loadMoreBtnTarget.classList.add("hidden")}async checkAuthStatus(){this.isAuthenticated=await o.u.checkStatus()}async checkInteraction(e){this.authCheckPromise&&await this.authCheckPromise,this.isAuthenticated||(e.preventDefault(),e.target instanceof HTMLTextAreaElement&&e.target.blur(),this.triggerLoginModal("modal_login"))}async handleVote(e){if(this.authCheckPromise&&await this.authCheckPromise,!this.isAuthenticated)return e.preventDefault(),void this.triggerLoginModal("modal_login");const t=e.currentTarget,i=t.closest("[data-comment-id]"),s=i?.dataset.commentId,n=t.dataset.voteType,o=(0,r.J)("endpoints.api_vote");if(s&&n&&o&&!this.getVotedIds().includes(s))try{t.disabled=!0;const e=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},body:JSON.stringify({comment_id:s,type:n})});if(401===e.status&&this.handleUnauthorizedSession(),!e.ok)throw new Error("Vote failed");this.saveVotedId(s);const i=await e.json(),r=t.parentElement;if(r){const e=r.querySelector('[data-vote-type="up"] span'),t=r.querySelector('[data-vote-type="down"] span');e&&(e.textContent=i.likes),t&&(t.textContent=i.dislikes)}this.updateVotedUI()}catch(e){console.error("Errore voto:",e),t.disabled=!1}}async submitComment(e){if(this.authCheckPromise&&await this.authCheckPromise,!this.isAuthenticated)return e.preventDefault(),void this.triggerLoginModal("modal_login");const t=e.currentTarget,i=t.innerText;let s,n=null,o=null,a=null;const l=t.closest('[data-comments-target="replyContainer"]');if(l){n=l,o=n.querySelector("textarea"),a=n.querySelector('[data-comments-target="message"]');const e=t.closest("[data-wp-id]");e&&(s=e.dataset.wpId)}else n=t.closest(".p-4"),o=this.mainTextareaTarget,n&&(a=n.querySelector('[data-comments-target="message"]'));if(!o)return void console.error("Textarea non trovata");a&&a.classList.add("hidden"),t.disabled=!0,t.innerText="Invio...";const c=(0,r.J)("endpoints.api_comment");
1if(!c){const e="Servizio commenti non disponibile.";return a?this.renderErrorMessage(a,e):alert(e),t.disabled=!1,void(t.innerText=i)}try{const e=o.value.trim();if(!e||e.length<3)throw new Error("Non puoi inviare un commento vuoto o troppo breve.");const t={content:e,post_id:this.wordpressPostIdValue,parent_id:s?parseInt(s):null},i=await fetch(c,{method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},body:JSON.stringify(t)});let n;401===i.status&&this.handleUnauthorizedSession();try{n=await i.json()}catch{n={}}if(!i.ok){const e=n.message||n.error||"Errore durante l'invio.";throw new Error(e)}o.value="",a&&(a.innerHTML='\n                    <div class="p-3 bg-green-50 text-green-700 text-sm rounded border border-green-200 shadow-sm">\n                        <span class="font-bold">✓ Inviato!</span> In attesa di approvazione.\n                    </div>\n                ',a.classList.remove("hidden"))}catch(e){console.error("Submit error:",e);const t=e.message||"Errore imprevisto.";a?(this.renderErrorMessage(a,t),a.classList.remove("hidden")):alert(t)}finally{t.disabled=!1,t.innerText=i}}async toggleReply(e){if(e.preventDefault(),this.authCheckPromise&&await this.authCheckPromise,!this.isAuthenticated)return void this.triggerLoginModal("modal_login");const t=e.currentTarget.closest(".comment-item");if(!t)return;const i=t.querySelector('[data-comments-target="replyContainer"]');if(i){if(i.classList.toggle("hidden"),!i.classList.contains("hidden")){const e=i.querySelector("textarea");e?.focus()}e.currentTarget.classList.add("hidden")}}triggerLoginModal(e){window.dispatchEvent(new CustomEvent("open-modal",{detail:{route:e}}))}handleUnauthorizedSession(){this.isAuthenticated=!1,o.u.clearIdentityCache()}getVotedIds(){try{const e=localStorage.getItem(l);return e?JSON.parse(e):[]}catch{return[]}}saveVotedId(e){let t=this.getVotedIds();if(!t.includes(e)){t.push(e),t.length>500&&(t=t.slice(-500));try{localStorage.setItem(l,JSON.stringify(t))}catch{console.warn("LocalStorage full, impossibile salvare voto")}}}updateVotedUI(){const e=this.getVotedIds();this.listTarget.querySelectorAll("button[data-vote-type]").forEach(t=>{const i=t,s=i.closest("[data-comment-id]");if(!s)return;const n=s.dataset.commentId;if(n&&e.includes(n)){i.disabled=!0,i.classList.add("opacity-40","cursor-not-allowed"),i.classList.remove("hover:text-primary-light","group/up","group/down");const e=i.querySelector("svg");e&&e.classList.remove("clickable","cursor-pointer")}})}renderErrorMessage(e,t){const i=document.createElement("div");i.className="p-3 bg-red-50 text-red-700 text-sm rounded border border-red-200 shadow-sm flex flex-col gap-1";const s=document.createElement("span");s.className="font-bold uppercase text-xs text-red-800",s.textContent="Attenzione";const n=document.createElement("span");n.textContent=t,i.append(s,n),e.replaceChildren(i)}}c.targets=["mainTextarea","list","replyContainer","loader","loadMoreBtn","message"],c.values={postId:String,wordpressPostId:{type:Number,default:0},limit:{type:Number,default:5}},t.default=c},83505:function(e,t,i){"use strict";i.r(t);var s=i(52891),n=i(85937),o=i(47455),r=i(55821),a=i(1853),l=i(71578),c=i(51405),d=i(23782),h=i(77062),u=i(73113);const p=(0,c.h)("player","dailymotion");let m=null;async function g(e){return window.dailymotion?Promise.resolve():m||(m=new Promise((t,i)=>{const s=document.createElement("script");s.id="gzn-dailymotion-sdk",s.async=!0,s.src=`https://geo.dailymotion.com/libs/player/${encodeURIComponent(e)}.js`,s.onload=()=>t(),s.onerror=()=>{m=null,i(new Error("Errore SDK DM"))},document.head.appendChild(s)}),m)}class f extends s.xI{constructor(){super(...arguments),this.isFirstPreroll=!0,this.isInitialized=!1,this.dmpReady=!1,this.gaveUp=!1,this.consentDenied=!1,this.wantsToPlay=!1,this.isInitLoopRunning=!1,this.unsubscribeFromBus=[],this.boundForcePause=this.pause.bind(this),this.isInViewport=!1,this.onSignal=()=>{this.consentDenied=!1,this.kickInitLoop()},this.onConsentError=e=>{"consent-denied"===e?.reason&&(this.consentDenied=!0,p.warn("[DM] adv:consent-denied ricevuto"))}}connect(){if(this.playerIdCache=`dm-container-${Math.random().toString(16).slice(2)}`,this.hasPlayerTarget&&(this.playerTarget.id=this.playerIdCache),g(this.playerIdValue).cat
1ch(e=>p.warn("Preload SDK Dailymotion fallito",e)),this.unsubscribeFromBus=[(0,d.HS)("dmp:ready",()=>{this.dmpReady=!0,this.onSignal()}),(0,d.HS)("adv:ready",this.onSignal),(0,d.HS)("adv:error",this.onConsentError)],this.element.addEventListener("player:force-pause",this.boundForcePause),this.autoplayValue){this.wantsToPlay=!0;const e=(0,l.X)();this.observer=new IntersectionObserver(t=>{(0,l.$)(t,e)?(p.info(`[DM] Player nel viewport (soglia ${e}): avvio init loop e aste HB...`),this.isInViewport=!0,this.showLoader(),this.observer?.disconnect(),this.kickInitLoop()):this.showPlayHint()},{rootMargin:"0px 0px",threshold:e}),this.observer.observe(this.element)}else this.showPlayHint()}disconnect(){this.unsubscribeFromBus.forEach(e=>e()),this.unsubscribeFromBus=[],this.element.removeEventListener("player:force-pause",this.boundForcePause),void 0!==this.forcePlayTimeoutId&&window.clearTimeout(this.forcePlayTimeoutId),this.observer?.disconnect(),this.dmPlayer?.destroy?.(),this.dmPlayer=void 0}start(e){this.posterTarget.classList.contains("pointer-events-none")||(e?.preventDefault(),this.showLoader(),this.isInitialized?this.play():(this.wantsToPlay=!0,this.autoplayValue=!0,this.isInViewport=!0,this.observer?.disconnect(),this.kickInitLoop()))}pause(){p.info("Ricevuto comando di stop da chiusura sticky"),this.dmPlayer?.pause?.()}showPlayHint(){!this.isInViewport&&this.hasPlayHintTarget&&this.playHintTarget.classList.remove("hidden")}showLoader(){this.hasPlayHintTarget&&this.playHintTarget.classList.add("hidden"),this.hasLoaderTarget&&this.loaderTarget.classList.remove("hidden")}hidePoster(){this.posterTarget.classList.contains("hidden")||(p.info("[PLAYER] Rimuovo copertina"),this.posterTarget.classList.add("opacity-0","pointer-events-none"),setTimeout(()=>this.posterTarget.classList.add("hidden"),500))}hasAdvertisingConsent(){const e=r.s.get();if(!e)return!1;const t=(0,o.zY)(e,o.nb.StorageAndAccess),i=(0,o.zY)(e,o.nb.PersonalisedProfile),s=(0,o.zY)(e,o.nb.PersonalisedAds);return t&&(i||s)}kickInitLoop(){this.autoplayValue&&!this.isInViewport||this.gaveUp||this.consentDenied||!this.wantsToPlay||this.isInitialized||this.isInitLoopRunning||(this.isInitLoopRunning=!0,void 0===this.forcePlayTimeoutId&&(this.forcePlayTimeoutId=window.setTimeout(()=>this.forcePlayWithoutAds(),3e4)),(0,n.f)(()=>{if(this.tryInit())return!0;throw new Error("Dailymotion deps non pronte")},{startingDelay:120,timeMultiple:1.7,maxDelay:2e3,numOfAttempts:Number.POSITIVE_INFINITY,retry:()=>!this.gaveUp&&!this.consentDenied&&!this.isInitialized,jitter:.2}).catch(e=>{this.isInitLoopRunning=!1,this.gaveUp||this.consentDenied||this.isInitialized||p.warn("[DM] Back Off giveup",e)}))}forcePlayWithoutAds(){this.forcePlayTimeoutId=void 0,this.isInitialized||(p.warn("[DM] Timeout di 30000ms superato senza consenso/DMP pronti: avvio il player senza pubblicità"),this.gaveUp=!0,this.isInitialized=!0,this.customConfigCache={},this.initPlayerInstance().catch(e=>p.error("[DM] Errore durante il force-play senza pubblicità",e)))}tryInit(){if(this.advEnabledValue){if(!this.hasAdvertisingConsent())return!1;if(!this.dmpReady)return!1}return this.isInitialized=!0,this.executePlayerSetup(),!0}async executePlayerSetup(){try{this.advEnabledValue?this.customConfigCache=await this.fetchConfigAndBuildVast():(p.info("[DM] ADV disabilitato: salto asta HB e iniezione VAST"),this.customConfigCache={}),await this.initPlayerInstance()}catch(e){p.error("[DM] Errore durante il setup finale del player",e)}}async initPlayerInstance(){if(await g(this.playerIdValue),!window.dailymotion)throw new Error("Dailymotion SDK non caricato.");const e={player:this.playerIdValue};p.info(`[DM] Init player id="${this.playerIdValue}" per video="${this.videoIdValue}" (originPath="${this.originPathValue}")`),this.dmPlayer=await window.dailymotion.createPlayer(this.playerIdCache,e),this.bindEvents(),this.dmPlayer?.loadContent({video:this.videoIdValue,customConfig:this.customConfigCache})}async fetchConfigAndBuildVast(){const e=this.element.getBoundingClientRect(),t=Math.round(e.width)||640,i=Math.round(e.height||t/(16/9)),s=(0,a.K)(),n=s?.adv?.pre_roll||"";if(!n)return p.info("[ADV] Nessuna Ad Unit configurata in JSON per il preroll. Pubblicità saltata."),{};p.info(`[HB] Richiesta asta per il preroll su: ${n}`);const o=await(0,h.X6)(n,[640,360]);p.info("[HB] Risultati asta preroll:",o);const r={id:this.videoIdValue,isPortrait:!1},l={autoplay:this.autoplayValue,vid_d:this.durationValue||0,plcmt:"1",playerWidth:t,playerHe
1ight:i,vpos:"preroll",iu:n,extraCustParams:o},c=u.A.buildVastUrl(r,l);return u.A.getDmConfigFromVast(c)}play(){this.dmPlayer?.play?.()}bindEvents(){if(!this.dmPlayer||!window.dailymotion.events)return;const e=window.dailymotion.events,t=(e,t={})=>{const i={...t,videoId:this.videoIdValue,title:this.titleValue||document.title,publishDate:this.publishDateValue,originPath:this.originPathValue,provider:"dailymotion",autoplay:this.autoplayValue};this.element.dispatchEvent(new CustomEvent(`player:${e}`,{detail:i,bubbles:!0}))};this.dmPlayer.on(e.PLAYER_CRITICALPATHREADY,()=>{p.info("[PLAYER] CRITICALPATHREADY - Rimuovo cover"),this.hidePoster()}),this.dmPlayer.on(e.AD_READYTOFETCH,e=>{const i=e?.type||"preroll";return this.advEnabledValue&&"preroll"===i?this.isFirstPreroll?(p.info("[ADV] AD_READYTOFETCH - Salto l'asta HB (già effettuata nel setup iniziale)",e),this.isFirstPreroll=!1,this.dmPlayer?.setCustomConfig(this.customConfigCache),void t("ad:readytofetch",e)):(p.info("[ADV] AD_READYTOFETCH - Richiesta nuova asta per il preroll",e),void this.fetchConfigAndBuildVast().then(i=>{this.customConfigCache=i,this.dmPlayer?.setCustomConfig(this.customConfigCache),t("ad:readytofetch",e)}).catch(i=>{p.error("[ADV] Errore aggiornamento config HB/VAST",i),this.dmPlayer?.setCustomConfig(this.customConfigCache),t("ad:readytofetch",e)})):(p.info(`🛑 [ADV DM] ADV disabilitato o posizione "${i}" non consentita (solo preroll). Skippo.`),this.dmPlayer?.setCustomConfig({}),void t("ad:readytofetch",e))}),this.dmPlayer.on(e.AD_START,e=>{t("ad:start",e)}),this.dmPlayer.on(e.AD_END,e=>{t("ad:end",e)}),this.dmPlayer.on(e.AD_LOADED,()=>{p.info("[ADV] AD_LOADED"),t("ad:loaded")}),this.dmPlayer.on(e.AD_PLAY,()=>{p.info("[ADV] AD_PLAY"),t("ad:play")}),this.dmPlayer.on(e.AD_IMPRESSION,()=>{p.info("[ADV] AD_IMPRESSION"),t("ad:impression")}),this.dmPlayer.on(e.AD_PAUSE,()=>{p.info("[ADV] AD_PAUSE"),t("ad:pause")}),this.dmPlayer.on(e.AD_ERROR,e=>{p.warn("[ADV] AD_ERROR - Problema VAST o No-Fill",e),t("ad:error",e)}),this.dmPlayer.on(e.VIDEO_START,()=>{t("video:start")}),this.dmPlayer.on(e.VIDEO_PLAY,()=>{p.info("[VIDEO] VIDEO_PLAY"),t("video:play")}),this.dmPlayer.on(e.VIDEO_PAUSE,()=>{p.info("[VIDEO] VIDEO_PAUSE"),t("video:pause")}),this.dmPlayer.on(e.VIDEO_END,()=>{p.info("[VIDEO] VIDEO_END"),t("video:end")}),this.dmPlayer.on(e.PLAYER_START,()=>{p.info("[PLAYER] PLAYER_START"),t("player:start")}),this.dmPlayer.on(e.PLAYER_ERROR,e=>{p.error("[PLAYER] PLAYER_ERROR",e),t("player:error",e)})}}f.values={videoId:String,playerId:{type:String,default:"x1na4i"},title:{type:String,default:""},publishDate:{type:String,default:""},originPath:{type:String,default:""},duration:Number,advEnabled:{type:Boolean,default:!0},autoplay:{type:Boolean,default:!0}},f.targets=["player","poster","loader","playHint"],t.default=f},14974:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return n}});var s=i(52891);const n=class extends s.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||i.e(4538).then(i.bind(i,74538)).then(e=>{this.application.register(this.identifier,e.default)})}}},14074:function(e,t,i){"use strict";i.r(t);var s=i(52891),n=i(52752);const o=(0,i(51405).h)("adv","floor");class r extends s.xI{constructor(){super(...arguments),this.observer=null,this.isClosedManually=!1,this.isFilled=!1}connect(){if(!window.matchMedia("(max-width: 767px)").matches)return void o.info("Non-mobile device detected. Terminating controller initialization.");o.info("Connecting Floor Adv Controller (Mobile Mode)...",{taboola:this.taboolaSelectorValue});const e=document.querySelector(this.taboolaSelectorValue);e&&(o.info("Taboola target found, monitoring intersection."),(0,n.v1)(this,{element:e})),this.setupMutationObserver(),this.checkInitialFilledState()}setupMutationObserver(){o.debug("Initializing MutationObserver (subtree: true) to detect filled status on children."),this.observer=new MutationObserver(e=>{e.forEach(e=>{if("attributes"===e.type&&"class"===e.attributeName){const t=e.target;t.classList.contains("adv--filled")&&!this.isFilled&&(o.info(`Mutation: child element <${t.tagName.toLowerCase()}> is now FILLED.`),this.handleFilledState())}})}),this.observer.observe(this.element,{attributes:!0,subtree:!0,attributeFilter:["class"]})}checkInitialFilledState(){this.element.querySelector(".adv--filled")&&(o.info("Initial check: Found an already filled child element."),this.handleFilledState())}handleFilledState(){this.isFilled||(this.isFilled=!0,o.info(`Banner active. Close button countdown: ${this.countdownValue/1e3}s.`),setTimeout(()=>{this.hasCloseButtonTarget&&!this.isClosedManually&&(o.info("Revealing close button."),this.closeButtonTarget.classList.add("flex"),this.closeButtonTarget.classList.remove("hidden"))},this.countdownValue))}appear(){o.info("Taboola visible: hiding floor banner."),this.hideBanner()}disappear(){!this.isClosedManually&&this.isFilled&&(o.info("Taboola gone: restoring floor banner."),this.showBanner())}close(e){e&&e.preventDefault(),o.info("Banner closed manually by user."),this.isClosedManually=!0,this.hideBanner(),this.hasCloseButtonTarget&&(o.info("Hiding close button."),this.closeButtonTarget.classList.add("hidden"))}hideBanner(){this.element.classList.add("translate-y-full"),this.closeButtonTarget.classList.add("hidden")}showBanner(){this.element.classList.remove("translate-y-full"),this.closeButtonTarget.classList.remove("hidden")}disconnect(){this.observer?.disconnect(),o.info("Controller disconnected.")}}r.targets=["closeButton"],r.values={taboolaSelector:{type:String,default:"#taboola-container"},countdown:{type:Number,default:1e4},mobileBreakpoint:{type:String,default:"(max-width: 1023px)"}},t.default=r},10148:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return n}});var s=i(52891);const n=class extends s.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||i.e(3664).then(i.bind(i,13664)).then(e=>{this.application.register(this.identifier,e.default)})}}},84408:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return n}});var s=i(52891);const n=class extends s.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||i.e(1412).then(i.bind(i,81412)).then(e=>{this.application.register(this.identifier,e.default)})}}},85997:function(e,t,i){"use strict";i.r(t);var s=i(52891);
1class n extends s.xI{constructor(){super(...arguments),this.lastScrollY=0,this.isSticky=!1,this.isVisible=!1,this.pendingScrollY=0,this.rafId=null,this.MIN_DELTA=2}get placeholderTop(){return this.element.parentElement?.offsetTop||0}get placeholderBottom(){const e=this.element.parentElement;return e?e.offsetTop+e.offsetHeight:100}connect(){this.lastScrollY=window.scrollY,window.scrollY>this.placeholderBottom?this.enableMainStickyShell():this.disableMainStickyShell(),window.addEventListener("scroll",this.onScroll.bind(this),{passive:!0})}disconnect(){window.removeEventListener("scroll",this.onScroll.bind(this)),this.rafId&&cancelAnimationFrame(this.rafId),this.clearHeaderOffset()}onScroll(){this.pendingScrollY=window.scrollY,null===this.rafId&&(this.rafId=requestAnimationFrame(()=>{this.update(),this.rafId=null}))}update(){const e=this.pendingScrollY,t=e-this.lastScrollY;if(!this.isSticky&&e>this.placeholderBottom)this.enableMainStickyShell();else if(this.isSticky&&e<=this.placeholderTop)return this.disableMainStickyShell(),this.isVisible=!1,void(this.lastScrollY=e);this.isSticky&&(t>this.MIN_DELTA?this.isVisible&&this.hideMain():t<-this.MIN_DELTA&&(this.isVisible||this.showMain())),this.lastScrollY=e}showMain(){this.isVisible=!0,document.body.style.setProperty("--header-main-height",`${this.element.getBoundingClientRect().height}px`),document.body.classList.add("has-header-main"),this.element.classList.remove(...this.animUpClasses),this.element.classList.add(...this.animDownClasses),this.hasInnerTarget&&this.hasInnerStickyClass&&this.innerTarget.classList.add(...this.innerStickyClasses),this.hasLogoTarget&&this.isHomepageValue&&this.hasLogoHiddenClass&&this.logoTarget.classList.remove(...this.logoHiddenClasses),requestAnimationFrame(()=>{this.element.classList.add(...this.slideDownClasses)})}hideMain(){this.isVisible=!1,this.clearHeaderOffset(),this.element.classList.remove(...this.animDownClasses),this.element.classList.add(...this.animUpClasses),this.element.classList.remove(...this.slideDownClasses),this.hasInnerTarget&&this.hasInnerStickyClass&&this.innerTarget.classList.remove(...this.innerStickyClasses),this.hasLogoTarget&&this.isHomepageValue&&this.hasLogoHiddenClass&&this.logoTarget.classList.add(...this.logoHiddenClasses)}enableMainStickyShell(){this.isSticky=!0,this.element.classList.add(...this.stickyClasses)}disableMainStickyShell(){this.isSticky=!1,this.clearHeaderOffset(),this.element.classList.remove(...this.stickyClasses),this.element.classList.remove(...this.slideDownClasses),this.element.classList.remove(...this.animDownClasses),this.element.classList.remove(...this.animUpClasses),this.hasLogoTarget&&this.isHomepageValue&&this.hasLogoHiddenClass&&this.logoTarget.classList.add(...this.logoHiddenClasses)}clearHeaderOffset(){document.body.classList.remove("has-header-main"),document.body.style.removeProperty("--header-main-height")}}n.targets=["inner","logo"],n.values={isHomepage:{type:Boolean,default:!1}},n.classes=["sticky","animDown","slideDown","animUp","innerSticky","logoHidden"],t.default=n},20246:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return n}});var s=i(52891);const n=class extends s.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||i.e(7450).then(i.bind(i,77450)).then(e=>{this.application.register(this.identifier,e.default)})}}},35075:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return n}});var s=i(52891);const n=class extends s.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||i.e(4343).then(i.bind(i,44343)).then(e=>{this.application.register(this.identifier,e.default)})}}},24508:function(e,t,i){"use strict";i.r(t);var s=i(52891);class n extends s.xI{constructor(){super(...arguments),this.dragStartX=0,this.dragStartScrollLeft=0,this.hasDragged=!1,this.activePointerId=null}startDrag(e){"mouse"===e.pointerType&&0===e.button&&(this.hasDragged=!1,this.activePointerId=e.pointerId,this.dragStartX=e.clientX,this.dragStartScrollLeft=this.scrollerTarget.scrollLeft)}drag(e){if(e.pointerId!==this.activePointerId)return;const t=e.clientX-this.dragStartX;this.hasDragged||(this.hasDragged=Math.abs(t)>3),this.hasDragged&&(this.scrollerTarget.hasPointerCapture(e.pointerId)||this.scrollerTarget.setPointerCapture(e.pointerId),e.preventDefault(),this.scrollerTarget.scrollLeft=this.dragStartScrollLeft-t)}endDrag(e){this.scrollerTarget.hasPointerCapture(e.pointerId)&&this.scrollerTarget.releasePointerCapture(e.pointerId),this.activePointerId=null,this.hasDragged=!1}
1filter(e){const t=e.currentTarget,i=t.dataset.matchId;this.buttonTargets.forEach(e=>{e.setAttribute("aria-pressed",String(e===t)),e===t?(e.classList.remove("bg-white","text-ink","border-gray-300"),e.classList.add("bg-primary-light","text-white","border-primary-light")):(e.classList.remove("bg-primary-light","text-white","border-primary-light"),e.classList.add("bg-white","text-ink","border-gray-300"))}),this.cardTargets.forEach(e=>{"all"!==i?e.dataset.matchId===i?e.style.display="":e.style.display="none":e.style.display=""})}}n.targets=["button","card","scroller"],t.default=n},85986:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return n}});var s=i(52891);const n=class extends s.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||i.e(198).then(i.bind(i,10198)).then(e=>{this.application.register(this.identifier,e.default)})}}},805:function(e,t,i){"use strict";i.r(t);var s=i(52891),n=i(52752);const o=(0,i(51405).h)("mc","controller"),r="gzn-match-center-sdk",a="RCSMcWidget:load";let l=null;t.default=class extends s.xI{connect(){o.info("Match center controller connect");const[e,t]=(0,n.v1)(this,{root:null,rootMargin:"300px",threshold:.25});this.observe=e,this.unobserve=t,this.observe()}async appear(e){if(!e.isIntersecting)return;this.unobserve?.(),function(){if(window.rcsOrchestrator||(window.rcsOrchestrator={}),window.rcsOrchestrator.eventManager?.dispatchEvent)return;const e=Object.create(null);window.rcsOrchestrator.eventManager={addEventListener(t,i){t&&"function"==typeof i&&(e[t]||(e[t]=[])).push(i)},removeEventListener(t,i){e[t]&&(e[t]=e[t].filter(e=>e!==i))},dispatchEvent(t,i){if(e[t])for(const s of e[t])try{s(i)}catch{}}}}();try{o.info("Match center: widget visibile → load SDK"),await async function(){return l||(document.getElementById(r)?(l=Promise.resolve(),l):(l=new Promise((e,t)=>{const i=document.createElement("script");i.id=r,i.async=!0,i.src="https://components2.gazzettaobjects.it/rcs_mc_widget_gazzanet_FE/v2/index.min.js",i.onload=()=>{o.info("Match Center SDK caricato"),e()},i.onerror=()=>{t(new Error("Errore nel caricamento Match Center SDK"))},document.head.appendChild(i)}),l))}()}catch(e){return void o.error("Match center: errore load SDK",e)}(()=>{try{window.rcsOrchestrator?.eventManager?.dispatchEvent?.(a),o.info("Match center: dispatched",{event:a})}catch(e){o.warn("Match center: dispatch failed",e)}})()}}},22441:function(e,t,i){"use strict";i.r(t);var s=i(52891),n=i(42627),o=i(47455),r=i(55821),a=i(1853);const l=(0,i(51405).h)("modal","controller");class c extends s.xI{constructor(){super(...arguments),this.isHardBlock=!1,this.loaderTemplate='\n        <div class="fixed inset-0 z-50 flex items-center justify-center bg-black/20 backdrop-blur-sm transition-opacity duration-300">\n            <div class="p-4 bg-white rounded-full shadow-xl animate-pulse">\n                <svg class="w-8 h-8 text-primary-light animate-spin" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">\n                    <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>\n                    <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>\n                </svg>\n            </div>\n        </div>\n    '}connect(){window.dispatchEvent(new CustomEvent("modal-system:ready")),window.addEventListener("cmp:accept-all",()=>this.close()),window.addEventListener("cmp:open-preferences",()=>this.close())}disconnect(){window.dispatchEvent(new CustomEvent("close-modal")),window.removeEventListener("cmp:accept-all",()=>this.close()),window.removeEventListener("cmp:open-preferences",()=>this.close())}load(e){e.preventDefault();const t=e.currentTarget.dataset.url;t&&this.fetchAndShow(t),l.info(`Loading modal from URL: ${t}`)}openFromEvent(e){const{route:t,params:i={}}=e.detail,s=(0,a.J)(`endpoints.${t}`);if(s)try{const e=new URL(s,window.location.origin);
1Object.entries(i).forEach(([t,i])=>{e.searchParams.append(t,i)}),this.fetchAndShow(e.toString())}catch(e){console.error("[ModalManager] URL Error",e)}else l.error(`ModalManager: route '${t}' not found in page data.`)}async fetchAndShow(e){this.element.innerHTML=this.loaderTemplate;try{const t=await fetch(e,{headers:{"X-Requested-With":"XMLHttpRequest"}});if(!t.ok)throw new Error(`HTTP ${t.status}`);this.element.innerHTML=await t.text();const i=this.element.querySelector("dialog");i instanceof HTMLDialogElement&&(this.isHardBlock="true"===i.dataset.hardBlock,i.classList.add("dialog-animated"),i.showModal(),this.setupDialogListeners(i),l.info(`Fetch and show from URL: ${e}`))}catch(e){console.error("[ModalManager] Fetch failed:",e),this.element.innerHTML=""}}close(){const e=this.element.querySelector("dialog");if(e instanceof HTMLDialogElement){if(this.isHardBlock)return void l.info("Hard-block modal cannot be closed by user interaction.");e.close(),l.info("Modal closed.")}}setupDialogListeners(e){const t="true"===e.dataset.modalLocked;e.addEventListener("click",i=>{t||i.target===e&&e.close()}),e.addEventListener("keydown",e=>{t&&"Escape"===e.key&&e.preventDefault()}),e.addEventListener("cancel",e=>{t&&e.preventDefault()}),e.addEventListener("close",()=>{window.dispatchEvent(new CustomEvent("close-modal")),setTimeout(async()=>{if(this.element.contains(e)&&(this.element.innerHTML=""),this.dispatch("closed"),""===this.element.innerHTML.trim()){const e=r.s.get(),t="cmpuishown"===e?.eventStatus,i=null!==document.querySelector('a[data-role="b_agree"], a[data-role="b_options"]');if(t||i)return void l.info("[ModalManager] Rilevata modale nativa di Clickio attiva. Abortisco riapertura Paywall.");if(e){const t=(0,o.zY)(e,o.nb.StorageAndAccess),i=(0,o.zY)(e,o.nb.PersonalisedProfile),s=(0,o.zY)(e,o.nb.PersonalisedAds);if(!t||!i&&!s){await n.u.checkStatus()||(l.info("[ModalManager] L'utente non ha i consensi e ha chiuso la modale. Riapro il Paywall."),window.dispatchEvent(new CustomEvent("open-modal",{detail:{route:"modal_paywall"}})))}}}},300)},{once:!0})}}c.targets=[],t.default=c},47524:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return n}});var s=i(52891);const n=class extends s.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||i.e(104).then(i.bind(i,30104)).then(e=>{this.application.register(this.identifier,e.default)})}}},54625:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return n}});var s=i(52891);const n=class extends s.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||i.e(8844).then(i.bind(i,68844)).then(e=>{this.application.register(this.identifier,e.default)})}}},93603:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return n}});var s=i(52891);const n=class extends s.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||i.e(1623).then(i.bind(i,51623)).then(e=>{this.application.register(this.identifier,e.default)})}}},42691:function(e,t,i){"use strict";i.r(t);var s=i(52891),n=i(52752);class o extends s.xI{constructor(){super(...arguments),this.isOpen=!1,this.currentParentId=null,this.currentButton=null,this.scrollLockClass="overflow-hidden",this.boundKeydownHandler=this.handleKeydown.bind(this)}connect(){(0,n.Ls)(this,{element:this.panelTarget})}disconnect(){document.removeEventListener("keydown",this.boundKeydownHandler)}clickOutside(e){if(!this.isOpen)return;e.target.closest('[data-menu-trigger="main"]')||this.close(e)}open(e){e?.preventDefault(),this.isOpen||(this.isOpen=!0,this.menuTarget.removeAttribute("inert"),this.menuTarget.classList.remove("invisible","pointer-events-none"),this.menuTarget.setAttribute("aria-hidden","false"),this.overlayTarget.classList.remove("pointer-events-none","opacity-0"),this.overlayTarget.classList.add("opacity-100"),this.panelTarget.classList.remove("-translate-x-full"),this.panelTarget.classList.add("translate-x-0"),document.documentElement.classList.add(this.scrollLockClass),this.updateAria(!0),document.addEventListener("keydown",this.boundKeydownHandler))}close(e){e?.preventDefault(),this.isOpen&&(this.isOpen=!1,this.menuTarget.setAttribute("inert",""),this.menuTarget.setAttribute("aria-hidden","true"),this.overlayTarget.classList.add("opacity-0","pointer-events-none"),this.overlayTarget.classList.remove("opacity-100"),this.panelTarget.classList.remove("translate-x-0"),this.panelTarget.classList.add("-translate-x-full"),window.setTimeout(()=>{this.isOpen||this.menuTarget.classList.add("invisible","pointer-events-none")},200),document.documentElement.classList.remove(this.scrollLockClass),this.updateAria(!1),this.showRootView(),this.hideLevelHeader(),this.currentParentId=null,this.currentButton&&(this.currentButton.setAttribute("aria-expanded","fal
1se"),this.currentButton=null),document.removeEventListener("keydown",this.boundKeydownHandler))}handleKeydown(e){"Escape"!==e.key&&"Esc"!==e.key||this.close()}openSection(e){e.preventDefault();const t=e.currentTarget,i=t.getAttribute("data-offcanvas-menu-parent-id");i&&this._openSectionForButton(t,i)}_openSectionForButton(e,t){this.currentButton&&this.currentButton!==e&&this.currentButton.setAttribute("aria-expanded","false"),this.currentParentId=t,this.currentButton=e,this.currentButton.setAttribute("aria-expanded","true"),this.showLevelHeader(),this.showView(t)}goBack(e){e?.preventDefault(),this.currentButton&&(this.currentButton.setAttribute("aria-expanded","false"),this.currentButton=null),this.currentParentId=null,this.showRootView(),this.hideLevelHeader()}showLevelHeader(){this.levelTitleTarget.textContent="Torna indietro",this.levelHeaderTarget.classList.remove("hidden"),this.levelHeaderTarget.classList.add("flex")}hideLevelHeader(){this.levelHeaderTarget.classList.remove("flex"),this.levelHeaderTarget.classList.add("hidden"),this.levelTitleTarget.textContent=""}showView(e){if(!this.hasListTarget)return;const t=this.listTarget.querySelector('[data-offcanvas-menu-view="root"]'),i=this.listTarget.querySelectorAll('[data-offcanvas-menu-view="children"]');t&&(t.classList.add("hidden"),t.setAttribute("aria-hidden","true")),i.forEach(t=>{t.getAttribute("data-offcanvas-menu-parent-id")===e?(t.classList.remove("hidden"),t.setAttribute("aria-hidden","false")):(t.classList.add("hidden"),t.setAttribute("aria-hidden","true"))})}showRootView(){if(!this.hasListTarget)return;const e=this.listTarget.querySelector('[data-offcanvas-menu-view="root"]'),t=this.listTarget.querySelectorAll('[data-offcanvas-menu-view="children"]');e&&(e.classList.remove("hidden"),e.setAttribute("aria-hidden","false")),t.forEach(e=>{e.classList.add("hidden"),e.setAttribute("aria-hidden","true")})}updateAria(e){const t=this.element.querySelector('[data-menu-trigger="main"]');t&&(t.setAttribute("aria-expanded",e?"true":"false"),t.classList.toggle("is-open",e))}}o.targets=["menu","overlay","panel","levelHeader","levelTitle","list"],t.default=o},17054:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return n}});var s=i(52891);const n=class extends s.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||i.e(7298).then(i.bind(i,7298)).then(e=>{this.application.register(this.identifier,e.default)})}}},40107:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return n}});var s=i(52891);const n=class extends s.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||i.e(1367).then(i.bind(i,51367)).then(e=>{this.application.register(this.identifier,e.default)})}}},18922:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return n}});var s=i(52891);const n=class extends s.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||i.e(9294).then(i.bind(i,39294)).then(e=>{this.application.register(this.identifier,e.default)})}}},18415:function(e,t,i){"use strict";i.r(t);var s=i(52891);class n extends s.xI{constructor(){super(...arguments),this.startY=0,this.currentY=0,this.isPulling=!1,this.threshold=80,this.isIosPwa=!1,this.boundTouchStart=this.handleTouchStart.bind(this),this.boundTouchMove=this.handleTouchMove.bind(this),this.boundTouchEnd=this.handleTouchEnd.bind(this)}connect(){const e=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,t="standalone"in window.navigator&&!!window.navigator.standalone;this.isIosPwa=e&&t,this.isIosPwa?(document.addEventListener("touchstart",this.boundTouchStart,{passive:!1}),document.addEventListener("touchmove",this.boundTouchMove,{passive:!1}),document.addEventListener("touchend",this.boundTouchEnd,{passive:!1}),document.addEventListener("touchcancel",this.boundTouchEnd,{passive:!1}
1)):this.hasSpinnerTarget&&this.spinnerTarget.remove()}disconnect(){this.isIosPwa&&(document.removeEventListener("touchstart",this.boundTouchStart),document.removeEventListener("touchmove",this.boundTouchMove),document.removeEventListener("touchend",this.boundTouchEnd),document.removeEventListener("touchcancel",this.boundTouchEnd))}handleTouchStart(e){window.scrollY<=1&&(this.startY=e.touches[0].clientY,this.currentY=this.startY,this.isPulling=!0,this.hasSpinnerTarget&&(this.spinnerTarget.style.transition="none"))}handleTouchMove(e){if(!this.isPulling)return;this.currentY=e.touches[0].clientY;const t=this.currentY-this.startY;if(t>0&&window.scrollY<=1){e.cancelable&&e.preventDefault();const i=t<this.threshold?t:this.threshold+.3*(t-this.threshold);this.hasSpinnerTarget&&(this.spinnerTarget.style.transform=`translateY(${i}px) rotate(${2*i}deg)`,this.spinnerTarget.style.opacity=String(Math.min(i/this.threshold,1)))}}handleTouchEnd(e){if(!this.isPulling)return;this.isPulling=!1;if(this.currentY-this.startY>=this.threshold&&window.scrollY<=1){if(this.hasSpinnerTarget){this.spinnerTarget.style.transition="transform 0.3s ease-out",this.spinnerTarget.style.transform=`translateY(${this.threshold}px)`;const e=this.spinnerTarget.querySelector("svg");e&&e.classList.add("animate-spin")}setTimeout(()=>window.location.reload(),500)}else this.hasSpinnerTarget&&(this.spinnerTarget.style.transition="transform 0.3s ease-out, opacity 0.3s ease-out",this.spinnerTarget.style.transform="translateY(0) rotate(0deg)",this.spinnerTarget.style.opacity="0");this.startY=0,this.currentY=0}}n.targets=["spinner"],t.default=n},69537:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return n}});var s=i(52891);const n=class extends s.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||i.e(7093).then(i.bind(i,37093)).then(e=>{this.application.register(this.identifier,e.default)})}}},49560:function(e,t,i){"use strict";i.r(t);var s=i(52891);class n extends s.xI{expand(e){e.preventDefault();Array.from(this.wrapperTarget.classList).forEach(e=>{e.startsWith("max-h-")&&this.wrapperTarget.classList.remove(e)}),this.wrapperTarget.classList.remove("max-h-[700px]"),this.hasFadeTarget&&(this.fadeTarget.style.display="none"),this.buttonTarget.style.display="none"}}n.targets=["wrapper","fade","button"],t.default=n},58014:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return n}});var s=i(52891);const n=class extends s.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||i.e(7106).then(i.bind(i,57106)).then(e=>{this.application.register(this.identifier,e.default)})}}},1693:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return n}});var s=i(52891);const n=class extends s.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||i.e(5529).then(i.bind(i,77910)).then(e=>{this.application.register(this.identifier,e.default)})}}},75142:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return n}});var s=i(52891);const n=class extends s.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||i.e(850).then(i.bind(i,90850)).then(e=>{this.application.register(this.identifier,e.default)})}}},7584:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return n}});var s=i(52891);const n=class extends s.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||i.e(6356).then(i.bind(i,66356)).then(e=>{this.application.register(this.identifier,e.default)})}}},83151:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return n}});var s=i(52891);const n=class extends s.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||i.e(5075).then(i.bind(i,15075)).then(e=>{this.application.register(this.identifier,e.default)})}}},10632:function(e,t,i){"use strict";i.r(t);var s=i(52891);
1class n extends s.xI{connect(){this.clickOutside=this.clickOutside.bind(this)}toggle(e){e.preventDefault(),e.stopPropagation(),this.dropdownTarget.classList.contains("hidden")?this.open():this.close()}open(){this.dropdownTarget.classList.remove("hidden"),setTimeout(()=>{this.inputTarget.focus()},50),window.addEventListener("click",this.clickOutside),window.addEventListener("keydown",this.closeOnEsc.bind(this))}close(){this.dropdownTarget.classList.add("hidden"),window.removeEventListener("click",this.clickOutside),window.removeEventListener("keydown",this.closeOnEsc.bind(this))}clickOutside(e){this.element.contains(e.target)||this.close()}closeOnEsc(e){"Escape"===e.key&&this.close()}}n.targets=["dropdown","input"],t.default=n},56315:function(e,t,i){"use strict";i.r(t);var s=i(52891),n=i(85937),o=i(47455),r=i(55821),a=i(1853),l=i(71578),c=i(51405),d=i(23782),h=i(77062),u=i(73113);const p=(0,c.h)("player","sky");class m extends s.xI{constructor(){super(...arguments),this.isInitialized=!1,this.boundSkyEventHandler=this.handleSkyEvents.bind(this),this.dmpReady=!1,this.gaveUp=!1,this.consentDenied=!1,this.wantsToPlay=!1,this.isInitLoopRunning=!1,this.isInViewport=!1,this.customConfigCache="",this.unsubscribeFromBus=[],this.boundForcePause=this.pause.bind(this),this.onSignal=()=>{this.consentDenied=!1,this.kickInitLoop()},this.onConsentError=e=>{"consent-denied"===e?.reason&&(this.consentDenied=!0,p.warn("[SKY] adv:consent-denied ricevuto"))}}connect(){if(this.unsubscribeFromBus=[(0,d.HS)("dmp:ready",()=>{this.dmpReady=!0,this.onSignal()}),(0,d.HS)("adv:ready",this.onSignal),(0,d.HS)("adv:error",this.onConsentError)],this.element.addEventListener("player:force-pause",this.boundForcePause),this.autoplayValue){this.wantsToPlay=!0;const e=(0,l.X)();this.observer=new IntersectionObserver(t=>{(0,l.$)(t,e)?(p.info(`[SKY] Player nel viewport (soglia ${e}): avvio init loop e aste HB...`),this.isInViewport=!0,this.showLoader(),this.observer?.disconnect(),this.kickInitLoop()):this.showPlayHint()},{rootMargin:"0px 0px",threshold:e}),this.observer.observe(this.element)}else this.showPlayHint()}disconnect(){this.unsubscribeFromBus.forEach(e=>e()),this.unsubscribeFromBus=[],this.element.removeEventListener("player:force-pause",this.boundForcePause),this.observer?.disconnect(),this.insElement&&this.insElement.removeEventListener("fluidAdobe",this.boundSkyEventHandler,!0),this.playerTarget.innerHTML=""}pause(){p.info("[SKY] Ricevuto comando di stop da chiusura sticky");try{const e=this.insElement?.querySelector("iframe"),t=e?.contentWindow?.document,i=t?.querySelector("video");i&&"function"==typeof i.pause&&i.pause()}catch(e){p.warn("[SKY] Impossibile forzare la pausa",e)}}start(e){this.posterTarget.classList.contains("pointer-events-none")||(e?.preventDefault(),this.showLoader(),this.isInitialized?p.warn("[SKY] Tentativo di play manuale su player già inizializzato"):(this.wantsToPlay=!0,this.autoplayValue=!0,this.isInViewport=!0,this.observer?.disconnect(),this.kickInitLoop()))}showPlayHint(){!this.isInViewport&&this.hasPlayHintTarget&&this.playHintTarget.classList.remove("hidden")}showLoader(){this.hasPlayHintTarget&&this.playHintTarget.classList.add("hidden"),this.hasLoaderTarget&&this.loaderTarget.classList.remove("hidden")}hidePoster(){this.posterTarget.classList.contains("hidden")||(p.info("[PLAYER] Rimuovo copertina"),this.posterTarget.classList.add("opacity-0","pointer-events-none"),setTimeout(()=>this.posterTarget.classList.add("hidden"),500))}hasAdvertisingConsent(){const e=r.s.get();if(!e)return!1;const t=(0,o.zY)(e,o.nb.StorageAndAccess),i=(0,o.zY)(e,o.nb.PersonalisedProfile),s=(0,o.zY)(e,o.nb.PersonalisedAds);return t&&(i||s)}kickInitLoop(){this.autoplayValue&&!this.isInViewport||this.gaveUp||this.consentDenied||!this.wantsToPlay||this.isInitialized||this.isInitLoopRunning||(this.isInitLoopRunning=!0,(0,n.f)(()=>{if(this.tryInit())return!0;throw new Error("Sky deps non pronte (attesa consenso/dmp)")},{startingDelay:120,timeMultiple:1.7,maxDelay:2e3,numOfAttempts:Number.POSITIVE_INFINITY,retry:()=>!this.gaveUp&&!this.consentDenied&&!this.isInitialized,jitter:.2}).catch(e=>{this.isInitLoopRunning=!1,this.gaveUp||this.consentDenied||this.isInitialized||p.warn("[SKY] Back Off giveup",e)}))}tryInit(){if(this.advEnabledValue){if(!this.hasAdvertisingConsent())return!1;if(!this.dmpReady)return!1}return this.isInitialized=!0,this.executePlayerSetup(),!0}async executePlayerSetup(){try{if(p.info(`Inizializzazione Sky. Video: ${this.videoIdValue}`),this.advEnabledValue){const e=await this.fetchConfigAndBuildVast();this.customConfigCache=e?this.cleanAdTagUrl(e):""}else p.info("[SKY] ADV disabilitato: salto asta HB e iniezione VAST"),this.customConfigCache="";await this.initPlayerInstance()}catch(e){p.error("[SKY] Errore durante il setup finale del player",e)}}async initPlayerInstance(){let e=(await this.fetchSkyTemplate()).replace(/<script>\s*let intervalCounter[\s\S]*?<\/script>/,"").replace(/muted:\s*(true|false)/,"muted: "+(this.autoplayValue?"true":"false")).replace(/width:\s*\d+,/g,'width: "100%",').replace(/textKeys:\s*\{[^}]+\},/,"").replace(/postRoll:\s*(true|false)/gi,"postRoll: false").replace(/postroll:\s*(true|false)/gi,"postroll: false").replace(/widthRepo:\s*\d+,/g,'widthRepo: "100%",').replace(/search:\s*true/,"search: false").replace(/reposition:\s*\d+/g,"reposition: 0").replace(/popOut:\s*(true|false)/g,"popOut: false").replace(/fullReposition:\s*(true|false)/g,"fullReposition: false");this.customConfigCache&&(e=e.replace(/tag:\s*"\[RCS_AD_TAG\]"/,`tag: "${this.customConfigCache}"`)),this.mountPlayer(e)}async fetchSkyTemplate(){const e=`https://prx.videofluid.it/api/zones/${this.zoneIdValue}/video/${this.videoIdValue}`,t=await fetch(e);return(await t.json())[0].html}mountPlayer(e){this.insElement=document.createElement("ins"),this.insElement.setAttribute("data-revive-videoid",this.videoIdValue),this.insElement.setAttribute("data-revive-zoneid",this.zoneIdValue.toString()),this.insElement.setAttribute("id",`skyplayer-${this.videoIdValue}`),this.insElement.className="video-js block w-full h-full",this.insElement.addEventListener("fluidAdobe",this.boundSkyEventHandler,!0);const t=document.createElement("iframe");t.setAttribute("videoId",this.videoIdValue),t.setAttribute("scrolling","no"),t.setAttribute("frameborder","0"),t.setAttribute("title","Sky Player Tecnico"),t.setAttribute("aria-hidden","true"),t.setAttribute("style","border: 0px; overflow: hidden; height: 1px; width: 1px; position: absolute; visibility: hidden;"),this.insElement.appendChild(t),this.playerTarget.innerHTML="",this.playerTarget.appendChild(this.insElement);const i=t.contentWindow?.document;i&&(i.open(),i.write(e),i.close())}handleSkyEvents(e){if(!this.element.contains(e.target))return;const t=e,i=t.detail?.message?.action;p.info(`[SKY EVENT] ${i}`,t.detail);const s=(e,t={})=>{const i={...t,videoId:this.videoIdValue,title:this.titleValue||document.title,publishDate:this.publishDateValue,originPath:this.originPathValue,provider:"sky",auto
1play:this.autoplayValue};this.element.dispatchEvent(new CustomEvent(`player:${e}`,{detail:i,bubbles:!0}))};switch(i){case"ready":this.hidePoster(),s("ready");break;case"prerollStart":this.hidePoster(),p.info("[ADV SKY] AD_START (preroll)"),s("ad:start",{adPosition:"preroll"});break;case"prerollEnd":p.info("[ADV SKY] AD_END (preroll)"),s("ad:end",{adPosition:"preroll"});break;case"postrollStart":p.info("🛑 [ADV SKY] Tentativo di postroll rilevato. Lo blocco forzatamente!"),this.pause();break;case"postrollEnd":p.info("🛑 [ADV SKY] Postroll End (ignorato)");break;case"start":this.hidePoster(),p.info("[VIDEO SKY] VIDEO_START"),s("video:start");break;case"pause":s("video:pause");break;case"restart":s("video:play");break;case"complete":p.info("[VIDEO SKY] VIDEO_END"),s("video:end")}}async fetchConfigAndBuildVast(){const e=this.element.getBoundingClientRect(),t=Math.round(e.width)||640,i=Math.round(e.height||t/(16/9)),s=(0,a.K)(),n=s?.adv?.pre_roll||"";let o={};n&&(p.info(`[HB] Richiesta asta per preroll Sky su: ${n}`),o=await(0,h.X6)(n,[640,360]));const r={id:this.videoIdValue,isPortrait:!1},l={autoplay:this.autoplayValue,vid_d:this.durationValue||0,plcmt:"1",playerWidth:t,playerHeight:i,vpos:"preroll",iu:n,extraCustParams:o};return u.A.buildVastUrl(r,l)}cleanAdTagUrl(e){try{const t=new URL(e);return t.searchParams.delete("cmsid"),t.toString()}catch{return e.replace(/(&cmsid=[^&]+|cmsid=[^&]+&)/g,"").replace(/[?&]$/,"")}}}m.values={videoId:String,title:{type:String,default:""},publishDate:{type:String,default:""},originPath:{type:String,default:""},duration:{type:Number,default:0},autoplay:{type:Boolean,default:!0},advEnabled:{type:Boolean,default:!0},zoneId:{type:Number,default:8664}},m.targets=["player","poster","loader","playHint"],t.default=m},87861:function(e,t,i){"use strict";i.r(t);var s=i(52891),n=i(42627);let o=null,r=null,a=null;class l extends s.xI{connect(){"facebook"===this.providerValue||"google"===this.providerValue?"facebook"!==this.providerValue||this.facebookAppIdValue?"google"!==this.providerValue||this.googleClientIdValue?"google"===this.providerValue&&this.initializeGoogleButton():this.disableButton("Google non configurato."):this.disableButton("Facebook non configurato."):this.disableButton("Provider social non supportato.")}async login(e){if(e.preventDefault(),"facebook"===this.providerValue){this.hideError(),this.setLoading(!0);try{const e=await this.requestFacebookIdentity();await this.completeSocialLogin(e.token,e.email)}catch(e){this.showError("Login social non riuscito.")}finally{this.setLoading(!1)}}}async requestFacebookIdentity(){const e=await this.loadFacebookSdk(this.facebookAppIdValue);return await new Promise((t,i)=>{e.login(e=>{const s=e.authResponse?.accessToken??null;"connected"===e.status&&null!==s&&""!==s?this.fetchFacebookEmail(s).then(e=>t({token:s,email:e})).catch(i):i(new Error("Missing Facebook access token."))},{scope:"email,public_profile"})})}async initializeGoogleButton(){if(!this.hasGoogleButtonContainerTarget)return void this.showError("Google login non disponibile.");const e=await this.loadGoogleSdk(),t=e.accounts?.id;t?(t.initialize({client_id:this.googleClientIdValue,callback:e=>{e.credential?this.resolveGoogleEmail(e.credential).then(t=>{if(t)return this.completeSocialLogin(e.credential,t);this.showError("Login social non riuscito.")}).catch(()=>{this.showError("Login social non riuscito.")}):this.showError("Login social non riuscito.")}}),this.googleButtonContainerTarget.innerHTML="",t.renderButton(this.googleButtonContainerTarget,{type:"standard",theme:"outline",size:"large",text:"continue_with",shape:"rectangular",logo_alignment:"left",width:"360",locale:"it"})):this.showError("Google login non disponibile.")}async completeSocialLogin(e,t){this.hideError(),this.setLoading(!0);try{const i=await n.u.loginSocial(this.providerValue,e);if(i.success)return void window.location.reload();if("5.3"===i.errorCode)return i.runaId&&i.sessionId&&i.email?(window.__gznPendingSubscribeFlow={loginType:"social",action:"subscribe",email:i.email,runaId:i.runaId,sessionId:i.sessionId,provider:this.providerValue,shortLifeToken:e},void window.dispatchEvent(new CustomEvent("open-modal",{detail:{route:"modal_signup",params:{source:"login_5_3"}}}))):void this.showError("Registrazione non completabile. Ripeti il login social.");if("5.1"===i.errorCode)return window.__gznPendingSubscribeFlow={loginType:"social",action:"social-register",email:t,provider:this.providerValue,shortLifeToken:e},void window.dispatchEvent(new CustomEvent("open-modal",{detail:{route:"modal_signup",params:{source:"social_login_5_1"}}}));this.showError(i.message||"Login social non riuscito.")}catch(e){this.showError("Login social non riuscito.")}finally{this.setLoading(!1)}}async loadFacebookSdk(e){if(window.FB&&a===e)return window.FB;if(null!==o){const t=await o;return this.initializeFacebookSdk(t,e),t}o=new Promise((e,t)=>
1{if(window.FB)return void e(window.FB);window.fbAsyncInit=()=>{window.FB?e(window.FB):t(new Error("Facebook SDK not available."))};const i=document.createElement("script");i.src="https://connect.facebook.net/it_IT/sdk.js",i.async=!0,i.defer=!0,i.onerror=()=>t(new Error("Facebook SDK load failed.")),document.head.appendChild(i)});const t=await o;return this.initializeFacebookSdk(t,e),t}initializeFacebookSdk(e,t){a!==t&&(e.init({appId:t,cookie:!0,xfbml:!1,version:"v22.0"}),a=t)}async fetchFacebookEmail(e){const t=await fetch(`https://graph.facebook.com/me?fields=email&access_token=${encodeURIComponent(e)}`);if(!t.ok)throw new Error("Facebook profile lookup failed.");const i=await t.json();if(!i.email)throw new Error("Facebook email missing.");return i.email}async loadGoogleSdk(){return window.google?.accounts?.id?window.google:(null!==r||(r=new Promise((e,t)=>{const i=document.createElement("script");i.src="https://accounts.google.com/gsi/client",i.async=!0,i.defer=!0,i.onload=()=>{window.google?.accounts?.id?e(window.google):t(new Error("Google SDK not available."))},i.onerror=()=>t(new Error("Google SDK load failed.")),document.head.appendChild(i)})),r)}extractGoogleEmail(e){const t=e.split(".");if(3!==t.length)return null;try{const e=JSON.parse(atob(t[1].replace(/-/g,"+").replace(/_/g,"/")));return"string"==typeof e.email&&""!==e.email?e.email:null}catch(e){return null}}async resolveGoogleEmail(e){const t=this.extractGoogleEmail(e);if(t)return t;try{const t=await fetch("https://www.googleapis.com/oauth2/v3/userinfo",{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)return null;const i=await t.json();return"string"==typeof i.email&&""!==i.email?i.email:null}catch(e){return null}}showError(e){this.hasErrorContainerTarget&&this.hasErrorMessageTarget&&(this.errorMessageTarget.textContent=e,this.errorContainerTarget.classList.remove("hidden"))}hideError(){this.hasErrorContainerTarget&&this.errorContainerTarget.classList.add("hidden")}disableButton(e){if("google"===this.providerValue)return this.hasGoogleButtonContainerTarget&&this.googleButtonContainerTarget.classList.add("opacity-60","pointer-events-none"),void this.showError(e);this.hasButtonTarget&&(this.buttonTarget.disabled=!0,this.buttonTarget.classList.add("opacity-60","cursor-not-allowed"),this.showError(e))}setLoading(e){if("google"===this.providerValue){if(!this.hasGoogleButtonContainerTarget)return;return this.googleButtonContainerTarget.classList.toggle("opacity-75",e),void this.googleButtonContainerTarget.classList.toggle("pointer-events-none",e)}if(this.hasButtonTarget){if(e)return this.buttonTarget.disabled=!0,void this.buttonTarget.classList.add("opacity-75","cursor-wait");this.buttonTarget.disabled=!1,this.buttonTarget.classList.remove("opacity-75","cursor-wait")}}}l.values={provider:String,facebookAppId:String,googleClientId:String},l.targets=["button","googleButtonContainer","errorContainer","errorMessage"],t.default=l},10287:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return n}});var s=i(52891);const n=class extends s.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||i.e(7032).then(i.bind(i,7032)).then(e=>{this.application.register(this.identifier,e.default)})}}},69847:function(e,t,i){"use strict";i.r(t);var s=i(52891),n=i(52752),o=i(19987);const r=(0,i(51405).h)("player","sticky"),a=[0,.25,.5,.75,.8,.9,.95,.99,1];class l extends s.xI{constructor(){super(...arguments),this.stickyAuthorized=!1,this.isCurrentlySticky=!1,this.isMobile=!1,this.isTaboolaVisible=!1,this.closeIconImmediate=!1}connect(){r.info("Sticky Controller connected"),this.checkDevice(),window.addEventListener("resize",this.checkDevice.bind(this)),this.closeIconImmediate=(0,o.lf)("sticky_player.close_icon_immediate",!1),this.isMobile&&this.setupTaboolaObserver()}disconnect(){this.disableStickyLogic()}checkDevice(){const e=this.isMobile;this.isMobile=window.innerWidth<768,this.isMobile&&!e&&this.setupTaboolaObserver()}setupTaboolaObserver(){const e=document.querySelector(this.taboolaSelectorValue);e&&(r.info("[STICKY] Elemento Taboola trovato. Avvio IntersectionObserver per collisioni."),(0,n.v1)(this,{element:e}))}appear(){r.info("[STICKY] Taboola visibile nel viewport. Disarmo temporaneo dello Sticky."),this.isTaboolaVisible=!0,this.removeSticky()}disappear(){r.info("[STICKY] Taboola non più visibile. Ri-armo lo Sticky."),this.isTaboolaVisible=!1,this.updateSticky()}onAdStart(e){if("postroll"===e.detail?.adPosition)return r.info("Postroll rilevato! Chiusura sticky annullata, lascio finire la pubblicità."),void(this.pendingCloseTimeout&&(clearTimeout(this.pendingCloseTimeout),this.pendingCloseTimeout=void 0));r.info("Preroll Started -> Autorizzo Sticky e osservo la posizione del player"),this.stickyAuthorized=!0,this.observePosition()}onAdEnd(e){if("postroll"===(e.detail?.adPosition||"preroll"))return r.info("Postroll terminato -> Chiudo lo sticky automaticamente"),void this.closeAutomatically();r.info("Ad Ended -> Spengo autorizzazioni future se non è già sticky"),this.isCurrentlySticky||this.disableStickyLogic()}onVideoStart(){this.closeIconImmediate?r.info("Video Editoriale Started -> X già mostrata subito in sticky, nessun timer da avviare"):(r.info("Video Editoriale Started -> Avvio timer 3s per mostrare la X se sticky"),this.videoStartTimeout&&clearTimeout(this.videoStartTimeout),this.videoStartTimeout=window.setTimeout(()=>{r.info("3 secondi di editoriale passati -> Mostro la X di chiusura"),this.closeIconTarget.classList.add("is-visible")},3e3))}onVideoEnd(){r.info("Video Editoriale Terminato -> Attendo eventuali postroll prima di chiudere..."),this.pendingCloseTimeout=window.setTimeout(()=>{r.info("Nessun postroll rilevato -> Chiudo lo sticky automaticamente"),this.closeAutomatically()},3e3)}closeAutomatically(){this.videoStartTimeout&&clearTimeout(this.videoStartTimeout),this.disableStickyLogic(),this.closeIconTarget.classList.remove("is-visible"),document.body.classList.remove("has-sticky-player")}closeSticky(e){e.preventDefault(),e.stopPropagation(),this.disableStickyLogic(),this.closeIconTarget.classList.remove("is-visible"),document.body.classList.remove("has-sticky-player"),this.element.dispatchEvent(new CustomEvent("player:force-pause",{bubbles:!0}))}disableStickyLogic(){this.stickyAuthorized=!1,this.positionObserver?.disconnect(),this.positionObserver=void 0,this.lastPosition=void 0,this.removeSticky(),document.body.classList.remove("has-sticky-player")}observePosition(){this.positionObserver||(this.positionObserver=new IntersectionObserver(e=>{const t=e[e.length-1];this.lastPosition={rect:t.boundingClientRect,viewportBottom:t.rootBounds?.bottom??window.innerHeight},this.updateSticky()},{threshold:a}),this.positionObserver.observe(this.element))}updateSticky(){if(!this.stickyAuthorized||!this.lastPosition)return;if(this.isTaboolaVisible&&this.isMobile)return;const{rect:e,viewportBottom:t}=this.lastPosition,i=this.isMobile?0:-.2*e.height;e.top<i||e.bottom>t?this.makeSticky():this.removeSticky()}makeSticky(){if(!this.isCurrentlySticky){if(this.isCurrentlySticky=!0,r.info("Player is now STICKY"),this.closeIconImmediate&&(r.info("Mostro subito la X di chiusura (richiesta Google per questo sito)"),this.closeIconTarget.classList.add("is-visible")),document.body.classList.add("has-sticky-player"),this.isMobile){const e=this.containerTarget.getBoundingClientRect();return this.containerTarget.style.left=`${e.left}px`,this.containerTarget.style.width=`${e.width}px`,this.containerTarget.style.right="auto",void this.containerTarget.classList.add("is-sticky","is-sticky-mobile")}this.containerTarget.classList.add("opacity-0"),setTimeout(()=>{this.containerTarget.classList.add("is-sticky"),this.containerTarget.classList.remove("opacity-0")},300)}}removeSticky(){if(this.isCurrentlySticky){if(this.isCurrentlySticky=!1,r.info("Player STICKY removed (Tornato al posto originario)"),document.body.classList.remove("has-sticky-player"),this.isMobile)return this.containerTarget.classList.remove("is-sticky","is-sticky-mobile"),this.containerTarget.style.removeProperty("left"),this.containerTarget.style.removeProperty("width"),void this.containerTarget.style.removeProperty("right");this.containerTarget.classList.add("opacity-0"),setTimeout(()=>{this.containerTarget.classList.remove("is-sticky","is-sticky-mobile"),this.containerTarget.classList.remove("opacity-0")},300)}}}l.targets=["container","closeIcon"],l.values={taboolaSelector:{type:String,default:"#taboola-container"}},t.default=l},39578:function(e,t,i){"use strict";i.r(t);var s=i(52891),n=i(47455),o=i(55821),r=i(51405),a=i(23782);const l=(0,r.h)("adv","taboola");let c=!1,d=!1;class h extends s.xI{constructor(){super(...arguments),this.unsubscribeFromBus=[],this.consentReady=!1,this.isInViewport=!1,this.isInitialized=!1}connect(){this.isDeviceAllowed()?(this.containerIdValue?this.element.i
1d=this.containerIdValue:this.element.id||(this.element.id=`taboola-widget-${Math.random().toString(16).slice(2)}`),this.unsubscribeFromBus=[(0,a.HS)("adv:ready",()=>{this.hasAdvertisingConsent()&&(this.consentReady=!0,this.tryInit())})],this.observer=new IntersectionObserver(e=>{e[0].isIntersecting&&(l.info(`[TABOOLA] Widget ${this.placementValue} a 600px dal viewport!`),this.isInViewport=!0,this.observer?.disconnect(),this.tryInit())},{rootMargin:"600px 0px",threshold:.01}),this.observer.observe(this.element)):l.info(`[TABOOLA] Widget ${this.placementValue} skippato: configurato per ${this.deviceValue}, ma device non compatibile.`)}disconnect(){this.observer?.disconnect(),this.unsubscribeFromBus.forEach(e=>e()),this.unsubscribeFromBus=[]}isDeviceAllowed(){if("all"===this.deviceValue)return!0;const e=window.matchMedia("(min-width: 768px)").matches;return!("desktop"===this.deviceValue&&!e)&&("mobile"!==this.deviceValue||!e)}hasAdvertisingConsent(){const e=o.s.get();if(!e)return!1;const t=(0,n.zY)(e,n.nb.StorageAndAccess),i=(0,n.zY)(e,n.nb.PersonalisedProfile),s=(0,n.zY)(e,n.nb.PersonalisedAds);return t&&(i||s)}async tryInit(){if(this.consentReady&&this.isInViewport&&!this.isInitialized){this.isInitialized=!0,window._taboola=window._taboola||[],d||(window._taboola.push({[this.pageTypeValue]:"auto"}),d=!0,l.info(`[TABOOLA] Pushed pageType: ${this.pageTypeValue}`)),window._taboola.push({mode:this.modeValue,container:this.element.id,placement:this.placementValue,target_type:this.targetTypeValue});try{await async function(){if(!c&&!document.getElementById("tb_loader_script"))return c=!0,new Promise((e,t)=>{const i=document.createElement("script");i.id="tb_loader_script",i.async=!0,i.src="//cdn.taboola.com/libtrc/rcs-gazzanet-network/loader.js",i.onload=()=>{window.performance&&"function"==typeof window.performance.mark&&window.performance.mark("tbl_ic"),e()},i.onerror=e=>t(e),document.head.appendChild(i)})}(),window._taboola.push({flush:!0}),l.info(`[TABOOLA] Renderizzato widget: ${this.placementValue}`)}catch(e){l.error("[TABOOLA] Errore durante il caricamento dell'SDK",e)}}}}h.values={mode:String,placement:String,targetType:{type:String,default:"mix"},pageType:{type:String,default:"article"},device:{type:String,default:"all"},containerId:{type:String,default:""}},t.default=h},32379:function(e,t,i){"use strict";i.r(t);var s=i(52891);const n=(0,i(51405).h)("adv","taboola-passback");class o extends s.xI{handleEmptySlot(e){n.info("Ricevuto evento slot vuoto dal figlio, avvio passback Taboola",{slotId:e.detail?.id});const t=`taboola-passback-${Math.random().toString(36).substring(2,9)}`,i=document.createElement("div");i.id=t,this.element.appendChild(i),window._taboola=window._taboola||[],window._taboola.push({mode:this.modeValue,container:t,placement:this.placementValue,target_type:this.targetTypeValue}),window._taboola.push({flush:!0}),n.info("Taboola renderizzato nel parent",{containerId:t})}}o.values={mode:{type:String,default:"thumbnails-a"},placement:{type:String,default:"Below Article Thumbnails"},targetType:{type:String,default:"mix"}},t.default=o},79472:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return n}});var s=i(52891);const n=class extends s.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||i.e(1844).then(i.bind(i,81844)).then(e=>{this.application.register(this.identifier,e.default)})}}},83107:function(e,t,i){"use strict";i.r(t);var s=i(52891),n=i(42627),o=i(1853);class r extends s.xI{constructor(){super(...arguments),this.onDocumentClickBound=e=>this.onDocumentClick(e)}disconnect(){this.detachOutsideClickListener()}async interact(e){if(e.preventDefault(),e.stopPropagation(),!this.hasMenuTarget||this.menuTarget.classList.contains("hidden")){this.setLoading(!0);try{await n.u.checkStatus()?this.showMenu():this.openModal("modal_login")}finally{this.setLoading(!1)}}else this.hideMenu()}openProfile(e){e.preventDefault(),this.hideMenu(),this.openModal("modal_profile")}logout(e){e.preventDefault(),this.hideMenu(),n.u.clearIdentityCache(),window.location.href=(0,o.J)("endpoints.logout","/logout")}showMenu(){this.hasMenuTarget?(this.menuTarget.classList.remove("hidden"),this.attachOutsideClickListener()):this.openModal("modal_profile")}hideMenu(){this.hasMenuTarget&&(this.menuTarget.classList.add("hidden"),this.detachOutsideClickListener())}attachOutsideClickListener(){document.addEventListener("click",this.onDocumentClickBound)}detachOutsideClickListener(){document.removeEventListener("click",this.onDocumentClickBound)}onDocumentClick(e){const t=e.target;t instanceof Node&&this.element.contains(t)||this.hideMenu()}openModal(e){window.dispatchEvent(new CustomEvent("open-modal",{detail:{route:e}}))}setLoading(e){e?(this.iconTarget.classList.add("hidden"),this.loaderTarget.classList.remove("hidden"),this.element.classList.add("cursor-wait","opacity-80")):(this.iconTarget.classList.remove("hidden"),this.loaderTarget.classList.add("hidden"),this.element.classList.remove("cursor-wait","opacity-80"))}}r.targets=["icon","loader","menu"],t.default=r},56013:function(e,t,i){"use strict";var s=i(3066);i(13511);(0,s.E)(i(25490))},42627:function(e,t,i){"use strict";i.d(t,{u:function(){return h}});var s=i(1853);const n="gzn.identity.v1";let o=null;function r(e){return Date.now()-e.updatedAt<3e5}function a(e){401===e.status&&c(null)}function l(){try{const e=localStorage.getItem(n);if(!e)return null;const t=JSON.parse(e);return t&&"object"==typeof t?{isLoggedIn:!0===t.isLoggedIn,login:"string"==typeof t.login&&""!==t.login?t.login:null,age:"number"==typeof t.age?t.age:null,gender:"string"==typeof t.gender&&""!==t.gender?t.gender:null,updatedAt:"number"==typeof t.updatedAt?t.updatedAt:Date.now()}:null}catch(e){return null}}function c(e){try{if(null===e)return void localStorage.removeItem(n);localStorage.setItem(n,JSON.stringify(e))}catch(e){}}async function d(){const e=(0,s.J)("endpoints.api_whoami");if(!e)return null;try{const t=await fetch(e,{headers:{"X-Requested-With":"XMLHttpRequest"}});if(a(t),!t.ok)return 404===t.status||401===t.status?{isLoggedIn:!1,login:null,age:null,gender:null,updatedAt:Date.now()}:null;const i=function(e){if(!e||!0!==e.success||!e.user||"object"!=typeof e.user)return null;const t=e.user;return{isLoggedIn:!0,login:"string"==typeof t.login&&""!==t.login?t.login:null,age:"number"==typeof t.age?t.age:null,gender:"string"==typeof t.gender&&""!==t.gender?t.gender:null,updatedAt:Date.now()}}(await t.json());return i}catch(e){return null}}const h={async checkStatus(){const e=await this.getIdentity();return null!==e&&e.isLoggedIn},getIdentitySync(){const e=l();return null!==e&&r(e)?e:null},async getIdentity(){const e=l();return null!==e&&r(e)?e:this.refreshIdentity()},async refreshIdentity(){return null!==o||(o=d().then(e=>(c(e),e)).finally(()=>{o=null})),o},clearIdentityCache(){c(null)},async login(e,t){const i=(0,s.J)("endpoints.api_login");try{const s=await fetch(i,{method:"POST",body:JSON.stringify({email:e,pass:t}),headers:{"Content-Type":"application/json"}}),n=await s.json();return s.ok&&n.success?(await this.refreshIdentity(),{success:!0}):{success:!1,message:n.message||"Credenziali non valide",errorCode:"string"==typeof n.errorCode?n.errorCode:null,runaId:"string"==typeof n.runaId?n.runaId:null,
1sessionId:"string"==typeof n.sessionId?n.sessionId:null}}catch(e){return{success:!1,message:"Errore di connessione"}}},async loginSocial(e,t){const i=(0,s.J)("endpoints.api_login_social");if(!i)return{success:!1,message:"Servizio di login social non disponibile."};try{const s=await fetch(i,{method:"POST",body:JSON.stringify({provider:e,shortLifeToken:t}),headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}),n=await s.json();return s.ok&&n.success?(await this.refreshIdentity(),{success:!0}):{success:!1,message:n.message||"Login social non riuscito.",errorCode:"string"==typeof n.errorCode?n.errorCode:null,runaId:"string"==typeof n.runaId?n.runaId:null,sessionId:"string"==typeof n.sessionId?n.sessionId:null,email:"string"==typeof n.email?n.email:null}}catch(e){return{success:!1,message:"Errore di connessione"}}},async register(e){const t=(0,s.J)("endpoints.api_register");try{const i=await fetch(t,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}),s=await i.json();return i.ok&&s.success?{success:!0}:{success:!1,message:s.message||"Registrazione non riuscita."}}catch(e){return{success:!1,message:"Errore di connessione"}}},async registerSocial(e){const t=(0,s.J)("endpoints.api_register_social");if(!t)return{success:!1,message:"Servizio di registrazione non disponibile."};try{const i=await fetch(t,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}),s=await i.json();return i.ok&&s.success?{success:!0}:{success:!1,message:s.message||"Registrazione social non riuscita."}}catch(e){return{success:!1,message:"Errore di connessione"}}},async completeSubscription(e){const t=(0,s.J)("endpoints.api_register_complete_subscription");if(!t)return{success:!1,message:"Servizio di registrazione non disponibile."};try{const i=await fetch(t,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}),s=await i.json();return i.ok&&s.success?{success:!0}:{success:!1,message:s.message||"Completamento registrazione non riuscito."}}catch(e){return{success:!1,message:"Errore di connessione"}}},async getProfile(){const e=(0,s.J)("endpoints.api_profile_get");if(!e)return{success:!1,message:"Servizio profilo non disponibile."};try{const t=await fetch(e,{headers:{"X-Requested-With":"XMLHttpRequest"}});a(t);const i=await t.json();return t.ok&&i.success?{success:!0,profile:i.profile}:{success:!1,message:i.message||"Caricamento profilo non riuscito."}}catch(e){return{success:!1,message:"Errore di connessione"}}},async updateProfile(e){const t=(0,s.J)("endpoints.api_profile_update");if(!t)return{success:!1,message:"Servizio profilo non disponibile."};try{const i=await fetch(t,{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}});a(i);const s=await i.json();return i.ok&&s.success?{success:!0}:{success:!1,message:s.message||"Aggiornamento profilo non riuscito."}}catch(e){return{success:!1,message:"Errore di connessione"}}},async getProfileComments(){const e=(0,s.J)("endpoints.api_profile_comments");if(!e)return{success:!1,message:"Servizio commenti non disponibile."};try{const t=await fetch(e,{headers:{"X-Requested-With":"XMLHttpRequest"}});a(t);const i=await t.json();return t.ok&&i.success?{success:!0,comments:i.comments}:{success:!1,message:i.message||"Caricamento commenti non riuscito."}}catch(e){return{success:!1,message:"Errore di connessione"}}},async updateProfilePassword(e){const t=(0,s.J)("endpoints.api_profile_password_update");if(!t)return{success:!1,message:"Servizio profilo non disponibile."};try{const i=await fetch(t,{method:"POST",body:JSON.stringify({password:e}),headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}});a(i);const s=await i.json();return i.ok&&s.success?{success:!0}:{success:!1,message:s.message||"Aggiornamento password non riuscito."}}catch(e){return{success:!1,message:"Errore di connessione"}}},async recoverPassword(e){const t=(0,s.J)("endpoints.api_recover_password");if(!t)return{success:!1,message:"Servizio di recupero non disponibile."};try{const i=await fetch(t,{method:"POST",body:JSON.stringify({email:e}),headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}),s=await i.json();return i.ok?{success:!0}:{success:!1,message:s.message||"Si è verificato un errore."}}catch(e){return{success:!1,message:"Errore di connessione. Riprova più tardi."}}},async resetPassword(e,t){const i=(0,s.J)("endpoints.api_reset_password");if(!i)return{success:!1,message:"Servizio reset password non disponibile."};try{const s=await fetch(i,{method:"POST",body:JSON.stringify({token:e,password:t}),headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}),n=await s.json();return s.ok&&n.success?{success:!0}:{success:!1,message:n.message||"Il link è scaduto o non valido."}}catch(e){return{success:!1,message:"Errore di connessione. Riprova."}}}}},63020:function(e,t,i){"use strict";i.d(t,{Gc:function(){return r},ND:function(){return n},tE:function(){return o}});const s=(0,i(51405).h)("cmp","bus"),n=new EventTarget;function o(e,t){s.info("dispatch",e,t),n.dispatchEvent(new CustomEvent(e,{detail:t}))}function r(e,t){const i=e=>t(e.detail);return n.addEventListener(e,i),s.info("onCmp",e),()=>n.removeEventListener(e,i)}},13511:function(){"use strict";
1function e(){return"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window}function t(e){const t=(e+"=".repeat((4-e.length%4)%4)).replace(/-/g,"+").replace(/_/g,"/"),i=window.atob(t),s=new Uint8Array(i.length);for(let e=0;e<i.length;++e)s[e]=i.charCodeAt(e);return s.buffer}!function(){if("serviceWorker"in navigator)window.location.hostname.includes("forzaroma.info")?(navigator.serviceWorker.getRegistrations().then(e=>{for(const t of e)t.unregister()}),console.log("[PWA] Service Worker disabilitato e rimosso temporaneamente per test SEO.")):window.addEventListener("load",()=>{const e=document.querySelector('meta[name="pwa-sw"]'),t=document.querySelector('meta[name="pwa-scope"]'),i=e?.content??"/sw.js",s=t?.content??"/";navigator.serviceWorker?.register(i,{scope:s})})}(),window.gazzanetNotifications={subscribeToWebPush:async function(){const i=navigator.serviceWorker;if(!e()||!i)return null;const s=await async function(){const e=await fetch("/api/notifications/web-push/public-key",{credentials:"same-origin"});if(!e.ok)return{enabled:!1,publicKey:null};return e.json()}();if(!s.enabled||null===s.publicKey)return null;if("granted"!==await Notification.requestPermission())return null;const n=await i.ready,o=await n.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t(s.publicKey)});return await async function(e){const t=e.toJSON();t.contentEncoding="aes128gcm";if(!(await fetch("/api/notifications/web-push/subscriptions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),credentials:"same-origin"})).ok)throw new Error("Unable to save the Web Push subscription.")}(o),o},unsubscribeFromWebPush:async function(){const t=navigator.serviceWorker;if(!e()||!t)return!1;const i=await t.ready,s=await i.pushManager.getSubscription();return null!==s&&(await fetch("/api/notifications/web-push/subscriptions",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({endpoint:s.endpoint}),credentials:"same-origin"}),s.unsubscribe())},supportsWebPush:e}},77425:function(e,t,i){"use strict";function s(){const e=new URLSearchParams(window.location.search),t=window.location.pathname,i=e.get("action"),s=e.get("token"),n="/reset-password";"resetChangePassword"===i&&s&&t!==n&&window.location.assign(`${n}?token=${encodeURIComponent(s)}`);const o=e.get("open_modal");if(o){window.dispatchEvent(new CustomEvent("open-modal",{detail:{route:o}})),e.delete("open_modal");const i=t+(e.toString()?`?${e.toString()}`:"")+window.location.hash;window.history.replaceState({},"",i)}}s(),window.addEventListener("modal-system:ready",()=>{s()},{once:!0})},37953:function(e,t,i){"use strict";i.d(t,{W:function(){return d}});var s=i(51405),n=i(63020),o=i(55821);const r=(0,s.h)("cmp","registry"),a="function"==typeof queueMicrotask?e=>queueMicrotask(e):e=>Promise.resolve().then(e),l=e=>{setTimeout(e,0)},c={high:a,normal:l,low:e=>{"undefined"!=typeof window&&"requestIdleCallback"in window&&"function"==typeof window.requestIdleCallback?window.requestIdleCallback(()=>e()):setTimeout(e,50)}};class d{constructor(e){this.latestTcData=null,this.isInitialized=!1,this.initialReplayScheduled=!1,this.vendors=e.slice(),this.sortVendors()}init(){r.info("init",this.vendors);for(const e of this.vendors)try{e.register()}catch(t){r.warn(`[vendor:${e.name}] register error`,t)}(0,n.Gc)("cmp:consent-ready",({tcData:e})=>{r.info("cmp:consent-ready",e);const t=this.updateLatestTcData(e);t?this.broadcastToVendors("onConsentReady",t,"onConsentReady"):r.warn("cmp:consent-ready received but ConsentStore is empty")}),(0,n.Gc)("cmp:changed",({tcData:e})=>{const t=this.updateLatestTcData(e);t?this.broadcastToVendors("onConsentChanged",t,"onConsentChanged"):r.warn("cmp:changed received but ConsentStore is empty")}),(0,n.Gc)("cmp:useractioncomplete",({tcData:e})=>{const t=this.updateLatestTcData(e);t?this.broadcastToVendors("onUserActionComplete",t,"onUserActionComplete"):r.warn("cmp:useractioncomplete received but ConsentStore is empty")}),this.scheduleInitialConsentReplay(),this.isInitialized=!0}scheduleVendorHook(e,t,i){(c[e.priority]||l)(()=>{try{Promise.resolve(i()).catch(i=>{r.warn(`[vendor:${e.name}] ${t} rejection`,i)})}catch(i){r.warn(`[vendor:${e.name}] ${t} error`,i)}})}registerVendor(e){if(this.vendors.some(t=>t.name===e.name))r.warn(`[vendor:${e.name}] already registered, skipping`);else if(this.vendors.push(e),this.sortVendors(),this.isInitialized){try{e.register()}catch(t){r.warn(`[vendor:${e.name}] register error`,t)}this.latestTcData&&e.onConsentReady&&(r.info(`[vendor:${e.name}] replaying consent after late registration`,this.latestTcData),this.scheduleVendorHook(e,"onConsentReady(replay)",()=>e.onConsentReady.call(e,this.latestTcData)))}}sortVendors(){const e={high:3,normal:2,low:1};this.vendors.sort((t,i)=>e[i.priority]-e[t.priority])}updateLatestTcData(e){const t=o.s.get()??e??null;return t&&(this.latestTcData=t),t}broadcastToVendors(e,t,i){for(const s of this.vendors){const n=s[e];n&&this.scheduleVendorHook(s,i,()=>n.call(s,t))}}scheduleInitialConsentReplay(){this.initialReplayScheduled||(this.initialReplayScheduled=!0,a(()=>
1{if(this.latestTcData)return;const e=this.updateLatestTcData();e&&(r.info("replaying stored consent for initial vendors",e),this.broadcastToVendors("onConsentReady",e,"onConsentReady(initial)"))}))}}},33470:function(e,t,i){"use strict";var s=i(75735),n=i.n(s),o=i(47455);const r=(0,i(51405).h)("analytics","audicom");let a=null,l=!1;function c(e){const t=(0,o.zY)(e,o.nb.StorageAndAccess),i=(0,o.zY)(e,o.nb.Measurement);return t&&i}function d(e){const t=e?"false":"true";if(a===t)return;var i,s;r.info(`Esecuzione Audicom con optout: ${t}`),l||((i=window)[s="NOLBUNDLE"]=i[s]||{nlsQ:function(e,t,n,o,r,a){return(o=(r=i.document).createElement("script")).async=1,o.src=("http:"===i.location.protocol?"http:":"https:")+"//cdn-gl.imrworldwide.com/conf/"+e+".js#name="+t+"&ns="+s,(a=r.getElementsByTagName("script")[0]).parentNode.insertBefore(o,a),i[s][t]=i[s][t]||{g:n||{},ggPM:function(e,n,o,r,a){(i[s][t].q=i[s][t].q||[]).push([e,n,o,r,a])}},i[s][t]}},l=!0);const o=function(){const e=window.location.origin+window.location.pathname;return n().hash(e)}();try{const e=window.NOLBUNDLE.nlsQ("P7F136709-92B1-4796-B34C-931009E15EAD","nlsnInstance",{optout:t}),i={type:"static",assetid:o,section:"LaGazzettadelloSportTALCalcioSports_BRW"};e.ggPM("staticstart",i),r.info(`Evento "staticstart" inviato con successo (optout: ${t}):`,i),a=t}catch(e){r.error("Errore durante l'avvio di Audicom:",e)}}const h={name:"audicom",priority:"high",requiresConsent:"analytics",register(){r.info("Modulo registrato. In attesa degli eventi CMP dal Registry...")},onConsentReady(e){r.info("onConsentReady invocato dall'oracolo CMP"),d(c(e))},onUserActionComplete(e){r.info("onUserActionComplete invocato dall'oracolo CMP"),d(c(e))},onConsentChanged(e){r.info("onConsentChanged invocato dall'oracolo CMP"),d(c(e))}};t.A=h},90113:function(e,t,i){"use strict";i.d(t,{A:function(){return y}});var s=i(63020),n=i(47455),o=i(55821),r=i(51405),a=i(19987),l=i(85937);const c=(0,r.h)("cmp","vendor");let d=!1;function h(){const e={adStorage:{storageName:"ad_storage",serialNumber:0},analyticsStorage:{storageName:"analytics_storage",serialNumber:1},functionalityStorage:{storageName:"functionality_storage",serialNumber:2},personalizationStorage:{storageName:"personalization_storage",serialNumber:3},securityStorage:{storageName:"security_storage",serialNumber:4},adUserData:{storageName:"ad_user_data",serialNumber:5},adPersonalization:{storageName:"ad_personalization",serialNumber:6}},t=localStorage.getItem("__lxG__consent__v2");if(t)try{let i=JSON.parse(t);if(i&&i.cls_val&&(i=i.cls_val),i&&"string"==typeof i&&(i=i.split("|")),i&&i.length&&void 0!==i[14]){const t=i[14].split("").map(e=>parseInt(e,10));if(t.length){const i={};Object.values(e).sort((e,t)=>e.serialNumber-t.serialNumber).forEach(e=>{i[e.storageName]=t[e.serialNumber]?"granted":"denied"}),c.info("Syncing Clickio consent to Gtag:",i),"function"==typeof window.gtag||(window.dataLayer=window.dataLayer||[],window.gtag=function(...e){window.dataLayer.push(e)}),window.gtag("consent","update",i)}}}catch(e){c.warn("Error parsing Clickio consent storage",e)}}const u=(0,r.h)("cmp","vendor");function p(e,t){return"boolean"==typeof t?{tcData:e??null,success:t}:"boolean"==typeof e?{tcData:t??null,success:e}:{tcData:e??null,success:Boolean(t)}}let m;function g(e,t={}){const i=o.s.signature();o.s.update(e);const n=o.s.signature();return null===i?(u.info("consent-ready event received"),(0,s.tE)("cmp:consent-ready",{tcData:e}),"initial"):n===i?(u.info(`${e.eventStatus} ignored - signature unchanged`),"unchanged"):t.forceUserActionComplete||"useractioncomplete"===e.eventStatus?(u.info("useractioncomplete event received"),(0,s.tE)("cmp:useractioncomplete",{tcData:e}),"changed"):(u.info("consent-changed event received"),(0,s.tE)("cmp:changed",{tcData:e}),"changed")}function f(){s.ND.addEventListener("cmp:api-ready",e=>{u.info("cmp:api-ready event received, bootstrapping bridge",e.detail.api),function(e){u.info("bootstrapCmpBridge");try{e("addEventListener",2,(e,t)=>{const{tcData:i,success:s}=p(e,t);u.info("addEventListener callback",{ok:s,tc:i}),s&&(0,n.U5)(i)&&g(i)})}catch(e){u.warn("addEventListener error",e)}try{e("getTCData",2,(e,t)=>{const{tcData:i,success:s}=p(e,t);u.info("getTCData snapshot",{ok:s,tc:i}),s&&(0,n.U5)(i)&&g(i)})}catch(e){u.warn("getTCData error",e)}}(e.detail.api)},{once:!1})}function v(e){u.info("handleCmpApiReady",e),(0,s.tE)("cmp:api-ready",{api:e})}var y={name:"cmp",priority:"high",requiresConsent:"none",register(){u.info("register"),f(),u.info("bridge"),function(e){if(u.info("installReactiveTcfSetter"),"function"==typeof window.__tcfapi)return u.info("__tcfapi already present, bootstrapping immediately"),void e(m=window.__tcfapi);Object.defineProperty(window,"__tcfapi",{configurable:!0,enumerable:!0,get(){return m},set(t){"function"==typeof t&&(u.info("__tcfapi setter called"),m=t,m("ping",2,t=>{u.info("__tcfapi ping: ",t);const i=t?.cmpStatus;"stub"!==i?t.cmpLoaded&&(u.info("__tcfapi real implementation received (status:",i,"), bootstrapping"),e(m)):u.info("__tcfapi stub detected, skipping")}))}})}(v),function(){if(d)return;d=!0,c.info("Clickio CMP bootstrap");const e=document.head||document.getElementsByTagName("head")[0],t=document.createElement("script");t.type="text/javascript",t.text="\n\n            window.__lxG__consent__ = window.__lxG__consent__ || {};\n             window.__lxG__consent__.messageControl = function () {\n             return true;\n           };\n\n\n        window.dataLayer = window.dataLayer || [];\n        function gtag(){dataLayer.push(arguments);}\n        window.gtag = gtag;\n\n        gtag('consent', 'default', {\n            'ad_storage': 'denied',\n            'anal
1ytics_storage': 'denied',\n            'functionality_storage': 'denied',\n            'personalization_storage': 'denied',\n            'security_storage': 'denied',\n            'ad_user_data': 'denied',\n            'ad_personalization': 'denied',\n            'wait_for_update': 1500,\n            'region': ['AT', 'BE', 'BG', 'HR', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HU', 'IS', 'IE', 'IT', 'LV', 'LI', 'LT', 'LU', 'MT', 'NL', 'NO', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE', 'GB', 'CH']\n        });\n\n        gtag('set', 'ads_data_redaction', true);\n        gtag('set', 'url_passthrough', false);\n    ",e.appendChild(t),h(),(0,s.Gc)("cmp:useractioncomplete",()=>{c.info("User action complete - resyncing Gtag"),setTimeout(h,200)}),(0,s.Gc)("cmp:changed",()=>{c.info("Consent changed - resyncing Gtag"),setTimeout(h,200)});const i=(0,a.lf)("clickioId");if(!i)return void alert("Clickio ID mancante nei config! Impossibile caricare la CMP.");const n=document.createElement("script");n.async=!0,n.type="text/javascript",n.src=`//clickiocmp.com/t/consent_${i}.js`,e.appendChild(n),n.addEventListener("load",()=>c.info(`Clickio CMP script loaded (ID: ${i})`))}(),u.info("bootstrap"),window.addEventListener("cmp:accept-all",()=>{c.info("[CustomUI] Richiesta accettazione totale ricevuta."),(0,l.f)(async()=>{const e=document.querySelector('a[data-role="b_agree"]');if(!e)throw new Error("Bottone Agree non ancora nel DOM");return c.info("[CustomUI] Bottone Agree trovato! Clicco..."),e.click(),!0},{numOfAttempts:20,startingDelay:100,timeMultiple:1.1,maxDelay:500}).catch(e=>{c.error("[CustomUI] Impossibile trovare il bottone Agree dopo vari tentativi",e)})}),window.addEventListener("cmp:open-preferences",()=>{c.info("[CustomUI] Richiesta apertura preferenze ricevuta."),(0,l.f)(async()=>{const e=document.querySelector('a[data-role="b_options"]');if(!e)throw new Error("Bottone Options non ancora nel DOM");return c.info("[CustomUI] Bottone Options trovato! Clicco..."),e.click(),!0},{numOfAttempts:20,startingDelay:100,timeMultiple:1.1,maxDelay:500}).catch(e=>{c.error("[CustomUI] Impossibile trovare il bottone Options dopo vari tentativi",e)})}),u.info("custom listeners ready")}}},25307:function(e,t,i){"use strict";var s=i(63020),n=i(47455),o=i(55821),r=i(19987),a=i(51405),l=i(23782);const c=(0,a.h)("dmp","liveramp"),d="https://launchpad-wrapper.privacymanager.io/da0a0b90-2255-42fa-af6b-0d2d8bec11b7/launchpad-liveramp.js";let h=!1,u=!1;function p(){const e=window;return!!e.envelopeModuleReady||(!!e.ats||!!function(e){const t=`; ${document.cookie}`.split(`; ${e}=`);return t.length>=2?decodeURIComponent(t.pop().split(";").shift()):null}("_lr_env"))}function m(e){u||(u=!0,(0,l.Qr)("dmp:liveramp:ready",{source:e}),(0,l.Qr)("dmp:ready",{vendor:"liveramp",source:e}),c.info("LiveRamp done",{reason:e}))}async function g(e,t){if(!u&&!h){h=!0;try{if(!function(e){const t=(0,n.zY)(e,n.nb.StorageAndAccess),i=(0,n.zY)(e,n.nb.PersonalisedProfile),s=(0,n.zY)(e,n.nb.PersonalisedAds);return t&&(i||s)}(e))return c.info("skip: no adv consent",{source:t}),void m("no-adv-consent");!function(){try{const e=document.createElement("link");e.rel="preload",e.as="script",e.href="https://launchpad.privacymanager.io/latest/launchpad.bundle.js",document.head.appendChild(e)}catch{}}(),function(){if(document.querySelector(`script[data-gzn="liveramp-ats"][src="${d}"]`))return;const e=document.createElement("script");e.async=!0,e.defer=!0,e.src=d,e.setAttribute("data-gzn","liveramp-ats");const t=document.getElementsByTagName("script")[0];t?.parentNode?.insertBefore(e,t)}();m("ready"===await(i=1200,new Promise(e=>{if(p())return void e("ready");const t=()=>{s(),e("ready")},s=()=>{window.removeEventListener("envelopeModuleReady",t),document.removeEventListener("envelopeModuleReady",t)};window.addEventListener("envelopeModuleReady",t,{once:!0}),document.addEventListener("envelopeModuleReady",t,{once:!0});const n=window.setInterval(()=>{p()&&(window.clearInterval(n),s(),e("ready"))},50);window.setTimeout(()=>{window.clearInterval(n),s(),e("timeout")},i)}))?"envelope-ready":"timeout")}catch(e){c.warn("bootstrap failed",{source:t,e:e}),m("error")}finally{h=!1}var i}}const f={name:"liveramp",priority:"high",requiresConsent:"advertising",register(){const e=!0===(0,r.lf)("adv.dfpTagConf.ats"),t=!1!==(0,r.lf)("liveramp.enabled",!0);if(!e||!t)return c.info("skip: disabled by config",{atsEnabled:e,lrEnabled:t}),(0,l.Qr)("dmp:liveramp:ready",{source:"disabled"}),void(0,l.Qr)("dmp:ready",{vendor:"liveramp",source:"disabled"});s.ND.addEventListener("cmp:consent-ready",e=>{const t=e.detail?.tcData;t&&g(t,"cmp:consent-ready")}),s.ND.addEventListener("cmp:changed",e=>{const t=e.detail?.tcData;t&&g(t,"cmp:changed")});const i=o.s.get();i&&g(i,"register-snapshot")}};t.A=f},35983:function(e,t,i){"use strict";i.d(t,{A:function(){return S}});var s=i(42627),n=i(47455),o=i(55821),r=i(1853),a=i(51405),l=i(23782),c=i(68169);const d=(0,a.h)("dmp","permutive");let h=!1,u=!1;function p(){return performance?.now?.()??Date.now()}function m(e){return`t=+${Math.round((performance?.now?.()??Date.now())-e)}ms`}function g(){try{return window.localStorage.getItem("_pdfps")}catch{return null}}function f(e,t){if(u)return;u=!0,(0,c.KR)();const i={source:e,dt:m(t)};(0,l.Qr)("dmp:permutive:ready",i),(0,l.Qr)("dmp:ready",{vendor:"permutive",...i}),d.info(`[${m(t)}] Permutive pipeline unlocked (done)`,i)}async function v(e,t){if(u||h)return;h=!0;const i=p();if(d.info(`[${m(i)}] Starting Permutive bootstrap`,{source:t}),!function(e){const t=(0,n.zY)(e,n.nb.StorageAndAccess)&&((0,n.zY)(e,n.nb.PersonalisedProfile)||(0,n.zY)(e,n.nb.PersonalisedAds)),i=(0,n.jR)(e,361);return t&&i}(e))return d.warn(`[${m(i)}] Missing required consent for Permutive, aborting`),h=!1,void f("no-consent",i);if(!function(){try{return window.localStorage.setItem("__probe__","1"),window.localStorage.removeItem("__probe__"),!0}catch{return!1}}())return d.warn(`[${m(i)}] LocalStorage disabled, aborting and failing open`),void f("fail-open-no-localstorage",i
1);const o=g();let a=!1;const l=e=>{a||(a=!0,d.info(`[${m(i)}] Resolving Permutive pipeline`,{reason:e}),function(e){const t=window;t.googletag=t.googletag||{cmd:[]},d.info(`[${m(e)}] Queueing GAM setTargeting for Permutive`),t.googletag.cmd.push(()=>{const e=p();try{const i=t.googletag.pubads?.();if(!i?.getTargeting||!i?.setTargeting)return void d.warn(`[${m(e)}] GAM pubads not fully initialized, skipping targeting`);const s=i.getTargeting("permutive")||[];if(Array.isArray(s)&&s.length>0)return void d.info(`[${m(e)}] GAM targeting already set, skipping`);const n=g(),o=n?JSON.parse(n):[],r=Array.isArray(o)?o.filter(e=>"string"==typeof e):[];i.setTargeting("permutive",r),d.info(`[${m(e)}] GAM setTargeting executed`,{count:r.length,sample:r.slice(0,5)})}catch(t){d.error(`[${m(e)}] GAM setTargeting error`,t)}})}(i),f(e,i))},c=function(e){const t=window;if(!t.permutive){d.info(`[${m(e)}] Creating Permutive Stub/Queue`),t.permutive={q:[],config:{apiKey:"28fbeef2-8763-403b-b4f5-228613440332",environment:"production",watson:{enabled:!0},consentRequired:!0}};const i=["addon","identify","track","trigger","query","segment","segments","ready","on","once","user","consent"];for(const s of i)t.permutive[s]=(...i)=>{d.debug(`[${m(e)}] [Permutive Queue] ${s} called`,i),t.permutive.q.push({functionName:s,arguments:i})}}return t.permutive}(i);try{const t=e.tcString;d.info(`[${m(i)}] Pushing Consent to Permutive queue`,{tcString:`${t.substring(0,10)}...`}),c.consent?.({opt_in:!0,token:t})}catch(e){d.warn(`[${m(i)}] permutive.consent failed`,e)}const v=function(e,t=window.location.pathname,i=window.location.hostname){const s=t.replace(/^\/+|\/+$/g,"").split("/").filter(Boolean),n={};let o=[...s];"article"===e&&(o=o.filter(e=>!/^\d+$/.test(e))),o.forEach((e,t)=>{n[`url_path_${t+1}`]=e});const r=o.filter(e=>!/^pagina-\d+$/i.test(e));let a="default",l="default";const c=`gazzetta.it/${i}`;let d=c;switch(e){case"home":a="home",l="default",d=`${c}/home`;break;case"article":r.length>=3?(a=r[0],l=r[1]):2===r.length&&(a=r[0],l="default"),d=`${c}/${r.join("/")}`;break;case"section":r.length>=2?(a=r[0],l=r[1]):1===r.length&&(a=r[0],l="default"),d=`${c}/${r.join("/")}`;break;case"author":a="section",l="author",d=`${c}/section/author`;break;case"video":a="video",l="default",d=`${c}/video/default`;break;case"page":a=r[0]||"page",l="default",d=`${c}/${a}/default`;break;default:a=r[0]||"default",l=r[1]||"default",d=r.length>0?`${c}/${r.join("/")}`:c}return{section_lv1:a,section_lv2:l,section_chain:d,...n}}((0,r.J)("permutive.type")||"home"),S=(0,r.J)("permutive.article_author"),k=await s.u.getIdentity(),L={login_status:k?.isLoggedIn?"logged in":"not logged in",...k?.login&&{login:k.login},..."number"==typeof k?.age&&{age:k.age},...k?.gender&&{gender:k.gender}},E=(0,r.J)("classifications_rcs");try{d.info(`[${m(i)}] Pushing Web Addon (Page Data) to Permutive queue`),c.addon?.("web",{page:{name:y(),type:(0,r.J)("permutive.type"),device_type:b(),rand_num:w(),...v,...S?{article_author:S}:{},...E?{classifications_rcs:E}:{}},user:L})}catch(e){d.warn(`[${m(i)}] permutive payload error`,e)}if(function(e){const t="https://8d1a3da1-b625-4b4a-872b-13622b855ae6.edge.permutive.app/6ccc4e64-d4bc-4642-97b6-db50a75d8a5d-web.js";if(document.querySelector(`script[src="${t}"]`))return void d.info(`[${m(e)}] Permutive script already in DOM`);d.info(`[${m(e)}] Injecting Permutive script into DOM`,{src:t});const i=document.createElement("script");i.async=!0,i.src=t,document.head.appendChild(i)}(i),o&&"[]"!==o)d.info(`[${m(i)}] Cache HIT - fast path unlocked`,{cached:o.length>50?`${o.substring(0,50)}...`:o}),l("cached-immediate");else{d.info(`[${m(i)}] Cache MISS - starting polling... max wait: 2000ms`);const e=i+2e3;let t=0;const s=()=>{t++;const n=g();return null!==n&&n!==o?(d.info(`[${m(i)}] Permutive WROTE new data after ${t} ticks!`,{current:n.length>50?`${n.substring(0,50)}...`:n}),l("pdfps-changed")):performance.now()>=e?(d.warn(`[${m(i)}] Polling TIMEOUT reached after ${t} ticks. No data written.`),l("timeout")):void setTimeout(s,50)};s()}}function y(){try{let e=window.location.hostname;e=e.replace(/^www\./i,"").toUpperCase();return`${e}${window.location.pathname}`}catch{return""}}function b(){return window.matchMedia("(max-width: 767px)").matches?"mobile":"desktop"}function w(){const e="_gzn_permutive_rand_num";try{const t=window.localStorage.getItem(e);if(null!==t){const e=parseInt(t,10);if(!isNaN(e)&&e>=0&&e<=9)return e}const i=Math.floor(10*Math.random());return window.localStorage.setItem(e,i.toString()),i}catch(e){return 10}}var S={name:"permutive",priority:"high",requiresConsent:"advertising",register(){const e=o.s.get();e&&v(e,"register-snapshot")},onConsentReady(e){v(e,"consent-ready")},onConsentChanged(e){v(e,"consent-changed")},onUserActionComplete(e){v(e,"user-action")}}}}]);
2//# sourceMappingURL=7473.cb7aaee7.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.