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.querySelectorAll(".bonus__item"),n=document.querySelector(".popup__container"),c=document.querySelector(".left"),a=document.querySelector(".right");t.forEach(e=>{e.addEventListener("click",()=>{e.style.background="url('./img/box/box-win.webp') center center/contain no-repeat",n.style.visibility="visible",c.classList.add("confetti-animation"),a.classList.add("confetti-animation")})});let i=window.location.search;""===i?i="?show_popup_reg=1&lp=fpg_b":i+="&show_popup_reg=1&lp=fpg_b";let r="https://"+window.location.hostname.replace("promo.","")+i;document.querySelector(".popup__button").href=r,document.querySelector(".popup__button").addEventListener("click",function(){document.cookie="offer_last_point="+i+"; max-age=2592000"})});