document.addEventListener("DOMContentLoaded",function(){const e=new URLSearchParams(window.location.search).get("lang");let o;o=e||navigator.language,console.log("Browser language:",o);const t=document.querySelector(".wheel__wrapper"),n=document.querySelector(".wheel"),c=document.querySelector(".button"),a=document.querySelector(".popup__container"),i=document.querySelector(".left"),l=document.querySelector(".right");function r(){n.classList.add("wheel-animated"),window.scrollTo({top:0,behavior:"smooth"}),setTimeout(function(){a.style.visibility="visible",document.body.classList.add("popup-open"),i.classList.add("confetti-animation"),l.classList.add("confetti-animation")},6e3)}t.addEventListener("click",r),c.addEventListener("click",r);let d=window.location.search;""===d?d="?show_popup_reg=1&lp=bod_w":d+="&show_popup_reg=1&lp=bod_w";let u="https://"+window.location.hostname.replace("promo.","")+d;document.querySelector(".popup__button").href=u,document.querySelector(".popup__button").addEventListener("click",function(){document.cookie="offer_last_point="+d+"; max-age=2592000"})});