document.addEventListener("DOMContentLoaded",function(){const e="aviator",o=document.querySelector(".button"),t=document.querySelector(".header__close"),n=document.querySelector(".popup__wrapper"),c=document.querySelector("a"),i=new URLSearchParams(window.location.search).get("lang");let r;r=i||navigator.language,console.log("Browser language:",r),setTimeout(()=>{n.style.visibility="visible"},2e4),o.addEventListener("click",function(){n.style.visibility="visible"}),t.addEventListener("click",function(){n.style.visibility="hidden"});let a=window.location.search;""===a?a="?show_popup_reg=1&lp="+e:a.includes("show_popup_reg=1")?a+="&lp="+e:a+="&show_popup_reg=1&lp="+e;const l=window.location.hostname.replace("promo.",""),d="https://"+l+a,s=()=>{document.cookie="offer_last_point="+a+"; max-age=2592000",window.location.href=d};s(),c&&c.addEventListener("click",()=>{s()}),"en-NZ"===r?document.cookie="currency=NZD; path=/; domain="+l:"en-AU"===r?document.cookie="currency=AUD; path=/; domain="+l:"cs"===r&&(document.cookie="currency=CZK; path=/; domain="+l),document.querySelector(".iframe").src="https://"+l+"/platform/game/aviator/demo?lobbyUrl=https://"+l});