1document.addEventListener("DOMContentLoaded",function(){const signInBanner=document.getElementById("already-sign-in-banner");const noAccountBanner=document.getElementById("no-account-banner");const loginForm=document.querySelector(".login-form-container");const registerForm=document.querySelector(".register-form-container");const submitButton=document.getElementById("wppb-submit");const registerButtonPB=document.querySelector("input#register");const goToRegisterBtn=document.querySelector("#register-quick-link");const goToLoginBtn=document.querySelector("#login-quick-link");const socialLoginsBtn=document.querySelector(".wppb-sc-button");const registrationSuccess=document.getElementById("registration-success");const registerHeadline=document.querySelector(".register-headline");if(registrationSuccess){if(signInBanner){signInBanner.style.display="none"} 2if(noAccountBanner){noAccountBanner.style.display="none"} 3if(registerHeadline){registerHeadline.style.display="none"} 4const registerFormElements=document.querySelector(".register-form-container #wppb-register-user");if(registerFormElements){registerFormElements.style.display="none"} 5applyRegistrationSuccessColors(registrationSuccess);initResendConfirmationEmail(registrationSuccess)} 6function applyRegistrationSuccessColors(container){function updateColors(){const isDarkMode=document.documentElement.getAttribute("data-theme")==="dark";const messageTextEl=container.querySelector(".wppb-registration-success__message");const resendTextEl=container.querySelector(".wppb-registration-success__resend-text");const resendBtnEl=container.querySelector(".wppb-registration-success__resend-btn");if(isDarkMode){if(messageTextEl)messageTextEl.style.setProperty("color","#ffffff","important");if(resendTextEl)resendTextEl.style.setProperty("color","#A0AEC0","important");if(resendBtnEl)resendBtnEl.style.setProperty("color","#9F7AEA","important")}else{if(messageTextEl)messageTextEl.style.setProperty("color","black","important");if(resendTextEl)resendTextEl.style.setProperty("color","#6E7A86","important");if(resendBtnEl)resendBtnEl.style.setProperty("color","#6B4EE6","important")}} 7updateColors();const observer=new MutationObserver(function(mutations){mutations.forEach(function(mutation){if(mutation.attributeName==="data-theme"){updateColors()}})});observer.observe(document.documentElement,{attributes:!0})} 8function initResendConfirmationEmail(container){const resendBtn=container.querySelector(".wppb-registration-success__resend-btn");const feedbackEl=container.querySelector(".wppb-registration-success__feedback");const email=container.getAttribute("data-email");const nonce=container.getAttribute("data-nonce");const restUrl=container.getAttribute("data-rest-url");if(!resendBtn||!email||!nonce||!restUrl){return} 9const COLOR_SUCCESS="#27E286";const COLOR_ERROR="#E25555";let isLoading=!1;let cooldownTimer=null;resendBtn.addEventListener("click",function(){if(isLoading||resendBtn.disabled){return} 10isLoading=!0;resendBtn.disabled=!0;resendBtn.classList.add("loading");resendBtn.style.opacity="0.6";if(feedbackEl){feedbackEl.textContent="";feedbackEl.style.color=""} 11fetch(restUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:email,nonce:nonce}),credentials:"same-origin"}).then(function(response){if(!response.ok&&response.status!==429){throw new Error("HTTP error "+response.status)} 12return response.json().then(function(data){return{status:response.status,data:data}}).catch(function(){throw new Error("Invalid JSON response")})}).then(function(result){isLoading=!1;resendBtn.classList.remove("loading");resendBtn.style.opacity="1";if(result.data.success){if(feedbackEl){feedbackEl.textContent=resendBtn.getAttribute("data-success-text");feedbackEl.style.color=COLOR_SUCCESS} 13startCooldown(60)}else if(result.status===429){if(feedbackEl){feedbackEl.textContent=resendBtn.getAttribute("data-cooldown-text");feedbackEl.style.color=COLOR_ERROR} 14const remaining=result.data.data&&result.data.data.remaining?result.data.data.remaining:60;startCooldown(remaining)}else{if(feedbackEl){feedbackEl.textContent=resendBtn.getAttribute("data-error-text");feedbackEl.style.color=COLOR_ERROR} 15resendBtn.disabled=!1}}).catch(function(){isLoading=!1;resendBtn.classList.remove("loading");resendBtn.style.opacity="1";if(feedbackEl){feedbackEl.textContent=resendBtn.getAttribute("data-error-text");feedbackEl.style.color=COLOR_ERROR} 16resendBtn.disabled=!1})});function startCooldown(seconds){let remaining=seconds;resendBtn.disabled=!0;resendBtn.style.opacity="0.6";resendBtn.style.cursor="not-allowed";updateCooldownText(remaining);if(cooldownTimer){clearInterval(cooldownTimer)} 17cooldownTimer=setInterval(function(){remaining--;if(remaining<=0){clearInterval(cooldownTimer);cooldownTimer=null;resendBtn.disabled=!1;resendBtn.style.opacity="1";resendBtn.style.cursor="pointer";resendBtn.textContent=resendBtn.getAttribute("data-original-text")||resendBtn.textContent.replace(/\s*\(\d+s\)/,"")}else{updateCooldownText(remaining)}},1000)} 18function updateCooldownText(seconds){var originalText=resendBtn.getAttribute("data-original-text");if(!originalText){originalText=resendBtn.textContent.replace(/\s*\(\d+s\)/,"");resendBtn.setAttribute("data-original-text",originalText)} 19resendBtn.textContent=originalText+" ("+seconds+"s)"}} 20const RETURNING_USER_COOKIE='bf_returning_user';function setReturningUserCookie(){const expiryDate=new Date();expiryDate.setDate(expiryDate.getDate()+30);document.cookie=RETURNING_USER_COOKIE+"=1; path=/; expires="+expiryDate.toUTCString()} 21function isReturningUser(){return document.cookie.split(';').some(function(item){return item.trim().indexOf(RETURNING_USER_COOKIE+'=')===0})} 22if(typeof isLoggedIn!=='undefined'&&isLoggedIn==1){setReturningUserCookie()} 23if(socialLoginsBtn){socialLoginsBtn.addEventListener("click",function(){clearWindowQueryStrings();setReturningUserCookie()})}
24if(goToRegisterBtn){goToRegisterBtn.addEventListener("click",function(){sessionStorage.setItem('userWantsToRegister','true')})} 25if(goToLoginBtn){goToLoginBtn.addEventListener("click",function(){sessionStorage.setItem('userWantsToRegister','false')})} 26function clearWindowQueryStrings(){if(window.history&&window.history.replaceState){window.history.replaceState({},document.title,window.location.pathname)}} 27function pushSignUpDisplayedEvent(triggerElement){window.dataLayer=window.dataLayer||[];const sessionKey='ga4_signup_displayed_sent';if(sessionStorage.getItem(sessionKey)){return} 28let location='landing_page';if(triggerElement){const parent=triggerElement.closest('header, footer, nav, .sticky-cta, .mobile-nav, article, main');if(parent){if(parent.tagName==='HEADER'||parent.classList.contains('header')){location='global_header'}else if(parent.tagName==='FOOTER'||parent.classList.contains('footer')){location='global_footer'}else if(parent.tagName==='NAV'||parent.classList.contains('mobile-nav')){location='mobile_nav'}else if(parent.classList.contains('sticky-cta')){location='sticky_cta'}}} 29if(location==='landing_page'){const pathname=window.location.pathname;const href=window.location.href;if(href.includes('forum')){if(document.querySelector('.forum-message')||document.body.classList.contains('forum-message')){location='forum_message'}else if(document.querySelector('.forum-reply-gate')||document.body.classList.contains('forum-reply')){location='forum_reply_gate'}else if(document.querySelector('.forum-thread-header')||document.body.classList.contains('forum-thread')){location='forum_thread_header'}else{location='forum_message'}}else if(pathname==='/'||pathname===''){location='homepage_hero'}else if(document.body.classList.contains('single-post')||document.body.classList.contains('single')){if(triggerElement&&triggerElement.closest('article, .article-content, .post-content')){const articleElement=triggerElement.closest('article, .article-content, .post-content');const triggerPosition=triggerElement.getBoundingClientRect().top;const articleEnd=articleElement.getBoundingClientRect().bottom;if(articleEnd-triggerPosition<articleElement.offsetHeight*0.2){location='article_end'}else{location='article_inline'}}else{location='article_inline'}}else if(pathname.includes('/casinos')||pathname.includes('/games')||pathname.includes('/bonuses')||document.body.classList.contains('archive')||document.body.classList.contains('oplist')){location='oplist'}else{location='landing_page'}} 30const eventData={event:'sign_up_displayed',location:location,display_type:'modal'};window.dataLayer.push(eventData);sessionStorage.setItem(sessionKey,'true')} 31function pushLoginDisplayedEvent(triggerElement){window.dataLayer=window.dataLayer||[];var sessionKey='ga4_login_displayed_sent';if(sessionStorage.getItem(sessionKey)){return} 32var location='landing_page';if(triggerElement){var parent=triggerElement.closest('header, footer, nav, .sticky-cta, .mobile-nav, article, main');if(parent){if(parent.tagName==='HEADER'||parent.classList.contains('header')){location='global_header'}else if(parent.tagName==='FOOTER'||parent.classList.contains('footer')){location='global_footer'}else if(parent.tagName==='NAV'||parent.classList.contains('mobile-nav')){location='mobile_nav'}else if(parent.classList.contains('sticky-cta')){location='sticky_cta'}}} 33if(location==='landing_page'){var pathname=window.location.pathname;var href=window.location.href;if(href.includes('forum')){if(document.querySelector('.forum-message')||document.body.classList.contains('forum-message')){location='forum_message'}else if(document.querySelector('.forum-reply-gate')||document.body.classList.contains('forum-reply')){location='forum_reply_gate'}else if(document.querySelector('.forum-thread-header')||document.body.classList.contains('forum-thread')){location='forum_thread_header'}else{location='forum_message'}}else if(pathname==='/'||pathname===''){location='homepage_hero'}else if(document.body.classList.contains('single-post')||document.body.classList.contains('single')){if(triggerElement&&triggerElement.closest('article, .article-content, .post-content')){var articleElement=triggerElement.closest('article, .article-content, .post-content');var triggerPosition=triggerElement.getBoundingClientRect().top;var articleEnd=articleElement.getBoundingClientRect().bottom;if(articleEnd-triggerPosition<articleElement.offsetHeight*0.2){location='article_end'}else{location='article_inline'}}else{location='article_inline'}}else if(pathname.includes('/casinos')||pathname.includes('/games')||pathname.includes('/bonuses')||document.body.classList.contains('archive')||document.body.classList.contains('oplist')){location='oplist'}} 34const eventData={event:'login_displayed',location:location,display_type:'modal'};window.dataLayer.push(eventData);sessionStorage.setItem(sessionKey,'true')} 35function pushLoginStartEvent(){window.dataLayer=window.dataLayer||[];var sessionKey='ga4_login_start_sent';if(sessionStorage.getItem(sessionKey)){return} 36window.dataLayer.push({event:'login_start'});sessionStorage.setItem(sessionKey,'true')} 37function pushSignUpStartEvent(){window.dataLayer=window.dataLayer||[];var sessionKey='ga4_sign_up_start_sent';if(sessionStorage.getItem(sessionKey)){return} 38window.dataLayer.push({event:'sign_up_start'});sessionStorage.setItem(sessionKey,'true')} 39var loginStartEvents=['click','focusin','input'];
39if(loginForm){loginStartEvents.forEach(function(evt){loginForm.addEventListener(evt,pushLoginStartEvent)})} 40if(registerForm){loginStartEvents.forEach(function(evt){registerForm.addEventListener(evt,pushSignUpStartEvent)})} 41if(submitButton){submitButton.addEventListener("click",function(){document.cookie="wordpress_logged_in_x=1; path=/";setReturningUserCookie()})} 42function activateLogin(){loginForm.classList.add("active");registerForm.classList.remove("active");signInBanner.classList.remove("active");noAccountBanner.classList.add("active");var triggerBtn=document.querySelector(".subscription-sign-up-wrapper");pushLoginDisplayedEvent(triggerBtn)} 43function activateRegister(){registerForm.classList.add("active");loginForm.classList.remove("active");noAccountBanner.classList.remove("active");signInBanner.classList.add("active");const triggerBtn=document.querySelector(".subscription-sign-up-wrapper");pushSignUpDisplayedEvent(triggerBtn)} 44const registrationError=document.querySelector("p#registration-error[data-show-wppb-modal='true']");const loginError=document.querySelector("p#login-error");const hideMenu=sessionStorage.getItem('hideSubscriptionForm');const userWantsToRegister=sessionStorage.getItem('userWantsToRegister');if(loginError&&!registrationError&&!hideMenu){const headerSubscriptionFormWrapper=document.querySelector("div.header-subscription-form-wrapper");const subscriptionOverlay=document.querySelector('#subscription-overlay');if(subscriptionOverlay){subscriptionOverlay.classList.add('active')} 45if(headerSubscriptionFormWrapper){headerSubscriptionFormWrapper.classList.add("active")} 46const loginFormContainer=document.querySelector(".login-form-container");if(loginFormContainer){loginFormContainer.classList.add("active")} 47const registerFormContainer=document.querySelector(".register-form-container");if(registerFormContainer){registerFormContainer.classList.remove("active")} 48pushLoginDisplayedEvent(null)}else if(registrationError&&loginError&&!hideMenu){const headerSubscriptionFormWrapper=document.querySelector("div.header-subscription-form-wrapper");const subscriptionOverlay=document.querySelector('#subscription-overlay');if(subscriptionOverlay){subscriptionOverlay.classList.add('active')} 49if(headerSubscriptionFormWrapper){headerSubscriptionFormWrapper.classList.add("active")} 50const registerFormContainer=document.querySelector(".register-form-container");const loginFormContainer=document.querySelector(".login-form-container");if(userWantsToRegister==='true'){if(registerFormContainer){registerFormContainer.classList.add("active")} 51if(loginFormContainer){loginFormContainer.classList.remove("active")} 52pushSignUpDisplayedEvent(null)}else{if(loginFormContainer){loginFormContainer.classList.add("active")} 53if(registerFormContainer){registerFormContainer.classList.remove("active")} 54pushLoginDisplayedEvent(null)}}else if(registrationError&&!loginError&&!hideMenu){const headerSubscriptionFormWrapper=document.querySelector("div.header-subscription-form-wrapper");const subscriptionOverlay=document.querySelector('#subscription-overlay');if(subscriptionOverlay){subscriptionOverlay.classList.add('active')} 55if(headerSubscriptionFormWrapper){headerSubscriptionFormWrapper.classList.add("active")} 56const registerFormContainer=document.querySelector(".register-form-container");if(registerFormContainer){registerFormContainer.classList.add("active")} 57pushSignUpDisplayedEvent(null)} 58if(signInBanner&&noAccountBanner){signInBanner.addEventListener("click",function(e){e.preventDefault();activateLogin()});noAccountBanner.addEventListener("click",function(e){e.preventDefault();activateRegister()})} 59const hasLoginError=window.location.href.includes("loginerror");if(hasLoginError&&!userWantsToRegister){activateLogin()} 60if(registerButtonPB){registerButtonPB.addEventListener("click",function(){if(window.history&&window.history.replaceState){window.history.replaceState({},document.title,window.location.pathname)}})} 61var firedForms=new Set();function mailSubscriptionDisplayedTracking(debugValue){window.dataLayer=window.dataLayer||[];window.dataLayer.push({event:'news_subscribe_displayed',category:'News Subscribe',action:'Displayed',form_location:debugValue})} 62function trackSubscriptionFormsVisibility(forms){var observer=new IntersectionObserver(function(entries){entries.forEac
62h(function(entry){if(entry.isIntersecting){var form=entry.target;var formIdentifier=form.getAttribute('data-tracking-id');if(!firedForms.has(formIdentifier)){firedForms.add(formIdentifier);var debugInput=form.querySelector('input[name="debug"]');if(debugInput){mailSubscriptionDisplayedTracking(debugInput.value)}}}})},{threshold:0.1});forms.forEach(function(form){if(!form.hasAttribute('data-tracking-id')){form.setAttribute('data-tracking-id','form-'+Math.random().toString(36).substr(2,9))} 63observer.observe(form)})} 64function mailSubscriptionClosedTracking(){window.dataLayer=window.dataLayer||[];window.dataLayer.push({ecommerce:null});window.dataLayer.push({event:'news_subscribe_closed',category:'News Subscribe',action:'Close',})} 65var headerSubscriptionForm=document.querySelector('.header-subscription-form-wrapper');var footerSubscriptionForm=document.querySelector('.footer-subscription-form-wrapper .form-wrapper.subscription-form');var subscriptionOverlay=document.querySelector('#subscription-overlay');var subscriptionCloseBtn=document.getElementById('close-btn-subscription-form');if(headerSubscriptionForm){var floatingInputs=headerSubscriptionForm.querySelectorAll('input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="url"], input[type="search"], input[type="number"]');Array.prototype.forEach.call(floatingInputs,function(floatingInput){if(!floatingInput.hasAttribute('placeholder')){floatingInput.setAttribute('placeholder',' ')}});var descFields=headerSubscriptionForm.querySelectorAll('.wppb-form-field');Array.prototype.forEach.call(descFields,function(descField){if(descField.querySelector(':scope > .bf-input-line')){return} 66var lineLabel=descField.querySelector(':scope > label');var lineInput=descField.querySelector(':scope > input[placeholder]');var lineDesc=descField.querySelector(':scope > .wppb-description-delimiter');if(!lineLabel||!lineInput||!lineDesc||!lineDesc.textContent.trim()){return} 67var line=document.createElement('div');line.className='bf-input-line';descField.insertBefore(line,lineLabel);line.appendChild(lineLabel);line.appendChild(lineInput)});var floatingLabels=headerSubscriptionForm.querySelectorAll('.wppb-form-field label');Array.prototype.forEach.call(floatingLabels,function(floatingLabel){if(floatingLabel.querySelector('input')||floatingLabel.querySelector('.bf-label-text')){return} 68var textSpan=document.createElement('span');textSpan.className='bf-label-text';while(floatingLabel.firstChild){textSpan.appendChild(floatingLabel.firstChild)} 69floatingLabel.appendChild(textSpan)});var eyeShow='<svg class="wppb-eye wppb-eye--show" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9M12,4.5C17,4.5 21.27,7.61 23,12C21.27,16.39 17,19.5 12,19.5C7,19.5 2.73,16.39 1,12C2.73,7.61 7,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C15.76,17.5 19.17,15.36 20.82,12C19.17,8.64 15.76,6.5 12,6.5C8.24,6.5 4.83,8.64 3.18,12Z"/></svg>';var eyeHide='<svg class="wppb-eye wppb-eye--hide" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z"/></svg>';var pwToggles=headerSubscriptionForm.querySelectorAll('.wppb-toggle-pw');Array.prototype.forEach.call(pwToggles,function(toggle){if(toggle.getAttribute('data-inline-eye')){return} 70toggle.setAttribute('data-inline-eye','1');var eyeImg=toggle.querySelector('img');if(eyeImg){eyeImg.parentNode.removeChild(eyeImg)} 71toggle.insertAdjacentHTML('beforeend',eyeShow+eyeHide)});var pwInput=headerSubscriptionForm.querySelector('input[name="passw1"]');var pw2Input=headerSubscriptionForm.querySelector('input[name="passw2"]');if(pwInput&&!pwInput.getAttribute('data-pw-ux')){pwInput.setAttribute('data-pw-ux','1');var anchorField=(pw2Input?pw2Input.closest('.wppb-form-field'):null)||pwInput.closest('.wppb-form-field');var meta=document.createElement('li');meta.className='bf-pw-meta';meta.innerHTML='<div class="bf-pw-strength__bars" aria-hidden="true">'+'<span class="bf-pw-strength__seg"></span>'+'<span class="bf-pw-strength__seg"></span>'+'<span class="bf-pw-strength__seg"></span>'+'<span class="bf-pw-strength__seg"></span>'+'</div>'+'<span class="bf-pw-strength__label" role="status"></span>';if(anchorField&&anchorField.parentNode){anchorField.parentNode.insertBefore(meta,anchorField.nextSibling)} 72var strengthLabel=meta.querySelector('.bf-pw-strength__label');var LEVEL_NAMES=['','Weak','Fair','Good','Strong'];var scoreToLevel=function(value){if(typeof window.zxcvbn==='function'){var score=window.zxcvbn(value).score;if(score<=1){return 1} 73if(score===2){return 2} 74if(score===3){return 3} 75return 4} 76if(value.length>=12){return 4} 77if(value.length>=9){return 3} 78if(value.length>=6){return 2} 79return 1};var updatePwUx=function(){var value=pwInput.value||'';var level=value.length?scoreToLevel(value):0;var mismatch=!!(pw2Input&&pw2Input.value.length&&pwInput.value!==pw2Input.value);var show=value.length>0&&(level<4||mismatch);meta.classList.toggle('is-visible',show);meta.classList.toggle('is-mismatch',mismatch);if(show){meta.setAttribute('data-level',String(level));strengthLabel.textContent=mismatch?'Passwords donât match':LEVEL_NAMES[level]}else{meta.removeAttribute('data-level')}};pwInput.addEventListener('input',updatePwUx);if(pw2Input){pw2Input.addEventListener('input',updatePwUx)} 80updatePwUx()} 81var registerUl=headerSubscriptionForm.querySelector('.register-form-container form > ul');
81if(registerUl&&!registerUl.querySelector('.bf-checkboxes-group')){var checkboxFields=registerUl.querySelectorAll(':scope > .wppb-form-field[class*="checkbox"]');if(checkboxFields.length){var checkboxGroup=document.createElement('li');checkboxGroup.className='bf-checkboxes-group';checkboxFields[0].parentNode.insertBefore(checkboxGroup,checkboxFields[0]);Array.prototype.forEach.call(checkboxFields,function(field){checkboxGroup.appendChild(field)})}}} 82if(headerSubscriptionForm&&typeof MutationObserver!=='undefined'){var syncBodyScrollLock=function(){var isOpen=headerSubscriptionForm.classList.contains('active');if(isOpen){var scrollbarWidth=window.innerWidth-document.documentElement.clientWidth;document.body.style.paddingRight=scrollbarWidth>0?scrollbarWidth+'px':''}else{document.body.style.paddingRight=''} 83document.body.classList.toggle('subscription-open',isOpen)};new MutationObserver(syncBodyScrollLock).observe(headerSubscriptionForm,{attributes:!0,attributeFilter:['class'],});syncBodyScrollLock()} 84var consentWrappers=document.querySelectorAll('.consent-wrapper');var inlineSubscriptionForms=Array.from(document.querySelectorAll('.form-wrapper.subscription-form')).filter(function(form){return!form.closest('.header-subscription-form-wrapper')&&!form.closest('.footer-subscription-form-wrapper')});if(inlineSubscriptionForms.length>0){trackSubscriptionFormsVisibility(inlineSubscriptionForms)} 85if(footerSubscriptionForm){trackSubscriptionFormsVisibility([footerSubscriptionForm])} 86var signUpButtons=document.querySelectorAll('.subscription-sign-up-wrapper');var menuToggle=document.getElementById('menu-toggle');var profileDropdownWrapper=null;signUpButtons.forEach(function(signUpButtonEl){var profileDropdown=signUpButtonEl.querySelector('.profile-dropdown');if(profileDropdown){if(signUpButtonEl.classList.contains('bf-mega-menu__drawer-account')){var profileLink=profileDropdown.querySelector('.profile-dropdown__link');if(profileLink){signUpButtonEl.removeAttribute('aria-haspopup');signUpButtonEl.removeAttribute('aria-controls');signUpButtonEl.removeAttribute('aria-expanded');signUpButtonEl.addEventListener('click',function(e){e.preventDefault();window.location.href=profileLink.href});signUpButtonEl.addEventListener('keydown',function(e){if(e.key==='Enter'||e.key===' '){e.preventDefault();window.location.href=profileLink.href}});return}} 87profileDropdownWrapper=signUpButtonEl;var toggleProfileDropdown=function(e){if(e.target.closest&&e.target.closest('.profile-dropdown')){return} 88e.preventDefault();var isOpen=profileDropdown.classList.toggle('profile-dropdown--open');signUpButtonEl.setAttribute('aria-expanded',isOpen?'true':'false')};signUpButtonEl.addEventListener('click',toggleProfileDropdown);signUpButtonEl.addEventListener('keydown',function(e){if(e.key==='Enter'||e.key===' '){toggleProfileDropdown(e)}});return} 89signUpButtonEl.addEventListener('click',function(){if(menuToggle){menuToggle.checked=!1} 90if(headerSubscriptionForm){headerSubscriptionForm.classList.add('active')} 91if(subscriptionOverlay){subscriptionOverlay.classList.add('active')} 92clearWindowQueryStrings();document.cookie="wordpress_logged_in_x=1; path=/";sessionStorage.removeItem('hideSubscriptionForm');if(isReturningUser()&&(typeof isLoggedIn==='undefined'||isLoggedIn!=1)){sessionStorage.setItem('userWantsToRegister','false');setTimeout(function(){activateLogin()},10)}else{sessionStorage.setItem('userWantsToRegister','true')} 93setTimeout(function(){var registerFormContainer=document.querySelector(".register-form-container");if(registerFormContainer&®isterFormContainer.classList.contains("active")){pushSignUpDisplayedEvent(signUpButtonEl)} 94var loginFormContainer=document.querySelector(".login-form-container");if(loginFormContainer&&loginFormContainer.classList.contains("active")){pushLoginDisplayedEvent(signUpButtonEl)}},100)})});if(profileDropdownWrapper){var closeProfileDropdown=function(){var openDropdown=profileDropdownWrapper.querySelector('.profile-dropdown--open');if(openDropdown){openDropdown.classList.remove('profile-dropdown--open');profileDropdownWrapper.setAttribute('aria-expanded','false')}};document.addEventListener('click',function(e){if(!profileDropdownWrapper.contains(e.target)){closeProfileDropdown()}});document.addEventListener('keydown',function(e){if(e.key==='Escape'){closeProfileDropdown()}});profileDropdownWrapper.addEventListener('focusout',function(e){if(!profileDropdownWrapper.contains(e.relatedTarget)){closeProfileDropdown()}})} 95if(subscriptionCloseBtn){subscriptionCloseBtn.addEventListener('click',function(){if(headerSubscriptionForm){headerSubscriptionForm.classList.remove('active')} 96if(subscriptionOverlay){subscriptionOverlay.classList.remove('active')} 97mailSubscriptionClosedTracking();sessionStorage.setItem('hideSubscriptionForm','true');sessionStorage.removeItem('ga4_signup_displayed_sent');sessionStorage.removeItem('ga4_login_displayed_sent');sessionStorage.removeItem('ga4_login_start_sent');sessionStorage.removeItem('ga4_sign_up_start_sent');clearWindowQueryStrings()})} 98if(subscriptionOverlay){subscriptionOverlay.addEventListener('click',function(){if(headerSubscriptionForm){headerSubscriptionForm.classList.remove('active')} 99subscriptionOverlay.classList.remove('active');clearWindowQueryStrings();sessionStorage.removeItem('hideSubscriptionForm');sessionStorage.removeItem('ga4_login_displayed_sent');sessionStorage.removeItem('ga4_login_start_sent');sessionStorage.removeItem('ga4_sign_up_start_sent');mailSubscriptionClosedTracking()})}
100consentWrappers.forEach(function(consentWrapperDiv){consentWrapperDiv.addEventListener('click',function(){var checkbox=consentWrapperDiv.querySelector('.consent-checkbox');if(checkbox){checkbox.checked=!checkbox.checked}})});var profileBuilderTriggerButtons=document.querySelectorAll('.profile-builder-trigger');var profileBuilderFormWrapper=document.querySelector('.profile-builder-form-wrapper');var profileBuilderForm=document.querySelector('.profile-builder-form-wrapper .profile-builder-form');var profileBuilderOverlay=document.querySelector('#profile-builder-overlay');var profileBuilderCloseBtn=document.querySelector('#close-btn-profile-builder-form');if(profileBuilderTriggerButtons.length>0){profileBuilderTriggerButtons.forEach(function(triggerEl){triggerEl.addEventListener('click',function(){if(profileBuilderFormWrapper){profileBuilderFormWrapper.classList.add('active')} 101if(profileBuilderForm){profileBuilderForm.classList.add('active')} 102if(profileBuilderOverlay){profileBuilderOverlay.classList.add('active')} 103var debugInput=profileBuilderForm?profileBuilderForm.querySelector('input[name="debug"]'):null;if(debugInput){mailSubscriptionDisplayedTracking(debugInput.value)}})})} 104if(profileBuilderOverlay){profileBuilderOverlay.addEventListener('click',function(){if(profileBuilderFormWrapper){profileBuilderFormWrapper.classList.remove('active')} 105if(profileBuilderForm){profileBuilderForm.classList.remove('active')} 106profileBuilderOverlay.classList.remove('active');mailSubscriptionClosedTracking()})} 107if(profileBuilderCloseBtn){profileBuilderCloseBtn.addEventListener('click',function(){if(profileBuilderFormWrapper){profileBuilderFormWrapper.classList.remove('active')} 108if(profileBuilderForm){profileBuilderForm.classList.remove('active')} 109if(profileBuilderOverlay){profileBuilderOverlay.classList.remove('active')} 110mailSubscriptionClosedTracking()})} 111function bfOpenAuthPopup(mode){try{sessionStorage.removeItem('hideSubscriptionForm')}catch(e){} 112if(menuToggle){menuToggle.checked=!1} 113if(headerSubscriptionForm){headerSubscriptionForm.classList.add('active')} 114if(subscriptionOverlay){subscriptionOverlay.classList.add('active')} 115if('login'===mode){activateLogin()}else{activateRegister()}} 116document.addEventListener('click',function(event){const root=document.getElementById('mycred-loyalty-widget-root');if(!root||!root.contains(event.target)){return} 117const cta=event.target.closest('button, a, span, p');if(!cta||!root.contains(cta)){return} 118const label=(cta.textContent||'').trim().toLowerCase();const isSignIn=/sign\s*in|log\s*in/.test(label);const isJoin=/join|sign\s*up|register|create/.test(label);if(!isSignIn&&!isJoin){return} 119event.preventDefault();event.stopPropagation();root.style.display='none';const exitPopup=document.querySelector('.exit-popup.page.exit-popup-slider.active');if(exitPopup){exitPopup.classList.remove('active')} 120bfOpenAuthPopup(isSignIn?'login':'register')},!0)})
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.