function sendForm(e){var t=new XMLHttpRequest,o=document.location.pathname.replace("/api/popups/","").replace("/render",""),n=new FormData(e);t.open("POST","/api/popups/"+o+"/form"),t.onload=function(){if(200===t.status){for(var o of(window.conversion={},n.entries()))o[1]&&(window.conversion[o[0]]=o[1]);renderConversionPage()}400===t.status&&(enableSubmitButton(e),function(e){function t(){document.querySelectorAll(".popup-form-error-tooltip").forEach((e=>e.remove()))}function o(){document.querySelectorAll(".popup-form-error-tooltip").forEach((function(e){var t=document.getElementById(e.getAttribute("data-uid"));e.setAttribute("style","display: inline-block;"),e.addEventListener("click",(function(){e.remove()})),e.style.position="absolute",e.style.top=t.getBoundingClientRect().top+(t.getBoundingClientRect().height-e.offsetHeight)/2+"px",e.style.left=t.getBoundingClientRect().left-e.offsetWidth-2+"px",e.style.zIndex=9999999999999,parseFloat(e.style.left)<20&&(e.style.left="20px",e.style.top=t.getBoundingClientRect().top+t.getBoundingClientRect().height+2+"px")}))}t(),document.querySelector("body").insertAdjacentHTML("beforeend",e),document.querySelectorAll(".form-error-tooltip").forEach((function(e){e.className="popup-form-error-tooltip"})),o(),document.querySelector(".widget-section").addEventListener("scroll",o)}(JSON.parse(t.response).html))},function(e){if(-1!=document.location.toString().indexOf("hash=")){var t=document.location.search.replace("?","").split("&")[0];t&&2===(t=t.split("=")).length&&e.set("_landing_hash",t[1])}}(n),function(e){if(-1!=document.location.toString().indexOf("lang=")){var t=document.location.search.replace("?","").split("&")[1];t&&2===(t=t.split("=")).length&&e.set("_landing_lang",t[1])}}(n),t.send(n)}