1import BonusesPopup from"bonusesPopup";import{eventID,utmParams as exitPopupUtmParams}from"globals";class ExitPopup extends BonusesPopup{constructor(e,t,o){super(),this.data=e,this.loc=t,this.title=this.exitPopupTitle(),this.localCountry=o,this.exitPopupShown-=!1,this.exitPopupStorage=storage.getExitPopup(),this.selector=document.querySelector('.bonusesPopup[data-type="exitPopup"]'),this.eventCat="w_website_exit_popup"}exitPopupInit(){this.selector&&this.exitPopupTrigger()}exitPopupTrigger(){document.body.addEventListener("mouseleave",e=>{const t=document.querySelector("#emailPopup"),o=document.querySelector("#authPopup"),i=document.querySelector("#userReviewPopup"),s=t&&t.classList.contains("show");if(this.exitPopupShown=!!this.selector.dataset.popupShown&&this.selector.dataset.popupShown,!(e.toElement||e.relatedTarget||this.exitPopupShown||this.exitPopupStorage||!(window.innerWidth>1250)||s||o||i)){if(0===this.selector.children.length){document.body.classList.add("bonusesPopup__show"),document.body.dataset.popupType="exitPopup",this.generatePopup(),this.exitPopupClicks();const e={widgetTitle:"fr"===document.body.dataset.geo?"Avant de partir, obtenez ces ð¥ Bonus les plus chauds!":"pl"===document.body.dataset.geo?"Zanim Odejdziesz, ZdobÄ
dź Te ð¥ NajgorÄtsze Bonusy!":"Before You Go, Get These ð¥ Hottest Bonuses!",eventCat:"w_website_exit_popup",widgetPref:"showBlock",clickAffLinkVersion:30,showWidgetVersion:31,eventAffClickName:"casino_visit",casinos:storage.getKeitaro()};setTimeout(()=>{this.showBlockAmplitude(e)},0)}this.selector.classList.add("show");let e=Array.from(this.selector.querySelectorAll(".bonusesPopup__item__bonus "));this.bonusesPopupEqualBonusHeight(e)}})}showBlockAmplitude(e){const{casinos:t,widgetTitle:o,eventCat:i,widgetPref:s,showWidgetVersion:n}=e,a=t.map(e=>e.casino.domain),r=t.slice(0,10).filter(e=>e&&e.code).length,c=a.filter((e,t,o)=>o.indexOf(e)===t).length,u=t.filter(e=>!e.affiliateUrl).length,l=t.slice(0,10).filter(e=>e&&!e.affiliateUrl).length,p=t.filter(e=>e.code).length,d=(t.slice(0,10).filter(e=>e).reduce((e,t)=>e+t.score,0)/t.slice(0,10).filter(e=>e).length).toFixed(1),_=t.slice(0,10).filter(e=>e&&5===e.score).length,g=t.slice(0,10).filter(e=>e&&e.score>4.5&&e.score<=4.9).length,h=t.slice(0,10).filter(e=>e&&e.score>4&&e.score<=4.5).length,f=t.slice(0,10).filter(e=>e&&e.score<=4).length,y=document.location.pathname,m=document.location.origin+document.location.pathname,S=document.location.href,P=document.body.dataset.routeBonus,b=document.body.dataset.routeId,O=eventID.findIndex(e=>e===P),N=(O>-1||eventID.length,O>-1?eventID[O]:eventID[eventID.length-1]),w=(document.body.dataset.localeLang,document.body.dataset.websiteEnv,document.body.dataset.localeCountry,document.body.dataset.geo);dataLayer&&dataLayer.push(Object.assign({event:`addEvents_${s}`,event_id:`d-v${document.body.dataset.amplitudeVersion}-e${n}`,event_cat:i,event_name:"open",page_current_path:JSON.stringify(y),page_url:JSON.stringify(m),page_url_full:JSON.stringify(S),page_group:JSON.stringify(N),widget_title:JSON.stringify(o),widget_id:JSON.stringify(null),page_route_id:JSON.stringify(b),widget_handler:JSON.stringify(null),widget_section:JSON.stringify(null),widget_position:JSON.stringify(null),casino_bonus_short:JSON.stringify(!1),casino_list_user_country:JSON.stringify(w),casino_user_country:JSON.stringify(w),casino_list_for_geo:JSON.stringify(!1),casino_id_list:JSON.stringify(t.map(e=>e.casino.casinoId)),casino_domain_list:JSON.stringify(a),casino_bonus_id_list:JSON.stringify(t.map(e=>e.id)),casino_domain_bonus_id_list:JSON.stringify(t.map(e=>`${e.casino.domain}_${e.id}`)),casino_list_count:JSON.stringify(t.length),casino_list_code_top10_count:JSON.stringify(r),casino_list_casino_unique_count:JSON.stringify(c),casino_list_noafflink_count:JSON.stringify(u),casino_list_noafflink_top10_count:JSON.stringify(l),casino_list_code_count:JSON.stringify(p),casino_score_geo_top10_median:JSON.stringify(d),casino_score_geo_a_top10_count:JSON.stringify(_),casino_score_geo_b_top10_count:JSON.stringify(g),casino_score_geo_c_top10_count:JSON.stringify(h),casino_score_geo_d_top10_count:JSON.stringify(f),website_domain:JSON.stringify(document.location.hostname)},exitPopupUtmParams()))}exitPopupClicks(){const e=this.selector.querySelectorAll(".bonusesPopup__item");this.isBonusesPopupsShow();
1e.forEach(e=>{e.addEventListener("click",e=>{const{target:t}=e;t.closest(".bonusesPopup__item__btn")&&(storage.setExitPopup(!0),delete document.body.dataset.popupType)})}),this.selector.addEventListener("click",e=>{const{target:t}=e;t.closest(".bonusesPopup__close")&&(storage.setExitPopup(!0),delete document.body.dataset.popupType)})}exitPopupTitle(){let e="Before You Go, Get These ð¥ Hottest Bonuses!";return"pl"===this.localCountry&&(e="Zanim Odejdziesz, ZdobÄ
dź Te ð¥ NajgorÄtsze Bonusy!"),"fr"===this.localCountry&&(e="Avant de partir, obtenez ces ð¥ Bonus les plus chauds"),e}}export{ExitPopup};
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.