!function(){const t=window.PCScriptLoaderTimeout||0;window.PCScriptLoader=new class{constructor(t){this.loadDelay=t,this.loadTimer=null,this.scriptsLoaded=!1,this.triggerEvents=["mouseover","click","keydown","wheel","touchmove","touchstart","touchend"],this.userEventHandler=this.triggerLoader.bind(this),this.init()}init(){const t=this;for(const t of this.triggerEvents)window.addEventListener(t,this.userEventHandler,{passive:!0});this.loadDelay>0&&(this.loadTimer=setTimeout((()=>{t.loadScripts()}),this.loadDelay))}triggerLoader(){if(!this.scriptsLoaded){this.loadScripts(),clearTimeout(this.loadTimer);for(const t of this.triggerEvents)window.removeEventListener(t,this.userEventHandler,{passive:!0})}}loadScripts(){this.scriptsLoaded=!0,this.loadScriptsWithType("data-type='lazy'"),this.loadScriptsWithType("defer",!0),console.log("Script(s) loaded with delay or interaction")}loadScriptsWithType(t,e=!1){const i=document.querySelectorAll(`script[${t}]`),s=t=>{const e=t.getAttribute("data-src");null!==e&&(t.setAttribute("src",e),t.removeAttribute("data-src"),t.setAttribute("data-lazy-loaded","true"))};e?setTimeout((()=>{i.forEach(s)}),0):i.forEach(s)}}(t)}();