export const __webpack_ids__=["8349"];export const __webpack_modules__={35281:function(e,i,t){t.d(i,{P:()=>l});var s=t(35470),n=t(14703),r=t(51968);let o={threshold:.5};let ViewedController=class ViewedController{#e;constructor(e,i,t,s=o){this.#e=e,this.#e.addController(this),this.target=i,this.callback=t,this.intersectionObserverOptions=s,this._visible=!globalThis.document?.hidden,this._timer=null,this._hasViewed=!1,this._onVisibilityChange=this.onVisibilityChange.bind(this)}hostConnected(){document.addEventListener("visibilitychange",this._onVisibilityChange)}hostDisconnected(){this.disconnectObserver(),document.removeEventListener("visibilitychange",this._onVisibilityChange)}hostUpdated(){let e=this.target.value;e&&(this._observer=new IntersectionObserver(e=>{for(let i of e)this._checkAndSetTimer(i.isIntersecting)},this.intersectionObserverOptions),this._observer.observe(e))}disconnectObserver(){this._observer&&this._observer.disconnect()}onVisibilityChange(){this._visible=!document.hidden,this._checkAndSetTimer()}_checkAndSetTimer(e=!1){!this._hasViewed&&this._visible&&e?null===this._timer&&(this._timer=globalThis.setTimeout(()=>{this._hasViewed=!0,this.callback()},1e3)):null!==this._timer&&(clearTimeout(this._timer),this._timer=null)}};var h=t(48832);t(43028);let l=e=>class extends e{_placementRef=(0,r.V)();_dataTask=new s.iQ(this,{task:async()=>await (0,h.b)()});constructor(...e){super(...e),this._viewedUrl,this._version,this.viewed=new ViewedController(this,this._placementRef,()=>{this._viewedUrl&&navigator.sendBeacon?.(this.viewedLink(this._viewedUrl,this._version))})}connectedCallback(){super.connectedCallback(),this._dataTask.run()}renderComplete(e){throw Error("Must be implemented by subclass")}renderFallback(){return n.Ld}renderInitial(){return n.Ld}render(){return this._dataTask.render({initial:()=>this.renderInitial(),pending:()=>this.renderInitial(),error:()=>this.renderFallback(),complete:e=>this.renderComplete(e)})}clickLink(e,i){return`/pong/click?code=${encodeURIComponent(e)}&version=${i}`}imgLink(e){return`/pimg/${encodeURIComponent(e||"")}`}viewedLink(e,i){return`/pong/viewed?code=${encodeURIComponent(e)}${i?`&version=${i}`:""}`}}}};
//# sourceMappingURL=8349.320132b1876fa6d0.js.map