latest posts

`,forceHttps:“,prod:“}[t]||””}}let x;”undefined”!==typeof window&&window.TSM&&window.TSM.adApi?x=window.TSM.adApi:(x=new m,”undefined”!==typeof window&&(window.TSM=window.TSM||{},window.TSM.adApi=x));class S{constructor(t){this.callbackQ={},this.qTopPointer=0,this.params=d()({},S.defaults,t),this.ticking=!1,this.hasInitialized=!1}init(){const{root:t,rootMargin:e,threshold:o}=this.params;this.observer=new IntersectionObserver(this.params.eventHandler.bind(this),{root:t,rootMargin:e,threshold:o}),this.hasInitialized=!0}addToEventQ(t,e){this.hasInitialized||this.init();let o=this.qTopPointer;return this.callbackQ[o]=e,this.observer.observe(t),this.qTopPointer++,t.setAttribute(“data-cbId”,o),o}removeFromEventQ(t,e){this.observer.unobserve(t),delete this.callbackQ[e],t.removeAttribute(“data-cbId”)}}S.defaults={root:null,rootMargin:”0px”,threshold:[0],eventHandler:function(){}};const _=S;function j(t){t.forEach((t=>{let e=t.target.getAttribute(“data-cbId”);e&&(t.isIntersecting?this.callbackQ[e].call(this,t,!0):this.callbackQ[e].call(this,t,!1))}))}new _({root:null,rootMargin:”200%”,threshold:[0],eventHandler:j});const O=new…



Categories

Archives