window.WpStatisticsUserTracker||(window.WpStatisticsUserTracker={JSON.stringify(WP_Statistics_Tracker_Object.hitParams)!==JSON.stringify(e.hitParams))?(WP_Statistics_Tracker_Object=e,!a&&s&&(a=!0,s())):++n<20?setTimeout(r,100):!a&&s&&(a=!0,s())}catch(t){console.error("WP Statistics: Error parsing WP_Statistics_Tracker_Object",t),!a&&s&&(a=!0,s())}else++n<20?setTimeout(r,100):!a&&s&&(a=!0,s())}let a=!1,n=0;setTimeout(r,50)},trackUrlChange:function(){if(!this.hasUrlChangeTrackerInitialized){this.hasUrlChangeTrackerInitialized=!0;let t=this;window.removeEventListener("popstate",t.handleUrlChange),history.pushState=function(){t.originalPushState.apply(history,arguments),t.handleUrlChange()},history.replaceState=function(){t.originalReplaceState.apply(history,arguments),t.handleUrlChange()},window.addEventListener("popstate",function(){t.handleUrlChange()})}},handleUrlChange:function(){let t=this;window.location.href!==this.lastUrl&&(this.lastUrl=window.location.href,this.updateTrackerObject(function(){t.checkHitRequestConditions()}))}}); window.WpStatisticsEventTracker||(window.WpStatisticsEventTracker={n)&&(t=new URL(a).pathname,e.df=n?a.substring(a.lastIndexOf("download_file=")+14).split("&").shift():"",e.dk=n?a.substring(a.lastIndexOf("key=")+4).split("&").shift():"",e.en="file_download",e.fn=n?e.df:t.substring(t.lastIndexOf("/")+1).split(".").shift(),e.fx=n?e.df:t.split(".").pop()),"click"===e.en){if(!this.linkTracker)return!1;try{if(new URL(a).host===window.location.host)return!1}catch(t){}}return!("file_download"===e.en&&!this.downloadTracker)&&e},sendEventData:async function(t,e){var n,a=new URLSearchParams;for(n in t)a.append(n,t[n]);if(!e)throw new Error("AJAX URL is not defined.");try{(await fetch(e,{method:"POST",keepalive:!0,body:a})).ok}catch(t){console.error("Error:",t)}}}); function handleWpConsentApiIntegration(){(WpStatisticsUserTracker.init(),WpStatisticsEventTracker.init())})}function handleRealCookieBannerIntegration(){Promise.resolve()).then(()=>{WpStatisticsUserTracker.init(),WpStatisticsEventTracker.init()}).catch(()=>{var t=window.consentApi?.consentSync("wp-statistics-with-data-processing");null!=t.cookie&&t.cookieOptIn?(WpStatisticsUserTracker.init(),WpStatisticsEventTracker.init()):console.log("WP Statistics: Real Cookie Banner consent is not given to track visitor information.")})}document.addEventListener("DOMContentLoaded",function t(){(WpStatisticsUserTracker.init(),WpStatisticsEventTracker.init()),"wp_consent_api"===n&&handleWpConsentApiIntegration(),"real_cookie_banner"===n&&handleRealCookieBannerIntegration())});