document.addEventListener("DOMContentLoaded",function(){const e=new URLSearchParams(window.location.search).get("lang");let t;t=e||navigator.language,console.log("Browser language:",t);const o=document.querySelectorAll(".bonus__item"),n=document.querySelector(".popup__container"),c=document.querySelector(".left"),l=document.querySelector(".right"),a=document.createElement("link");a.setAttribute("rel","stylesheet"),a.setAttribute("class","custom-css");(document.head||document.getElementsByTagName("head")[0]).appendChild(a),document.querySelector(".custom-css").href="css/wolfgold_box.css",o.forEach(e=>{e.addEventListener("click",()=>{e.style.background="url('./img/win/box-win.webp') center center/contain no-repeat",n.style.visibility="visible",c.classList.add("confetti-animation"),l.classList.add("confetti-animation")})});const s="wolfgold_b";let r=window.location.search;""===r?r="?show_popup_reg=1&lp="+s:r+="&show_popup_reg=1&lp="+s;let i="https://"+window.location.hostname.replace("promo.","")+r;document.querySelector(".popup__button").href=i,document.querySelector(".popup__button").addEventListener("click",function(){document.cookie="offer_last_point="+r+"; max-age=2592000"})});