const configBase={apiBase:"https://client.10-x.eu/api",bookingformVersion:"1",containerId:"10x-Bookingform",wrapperId:"10x-Wrapper",encryptionKey:"75a197bdd496f387d239e1f513640c81",production:!0,};const errorHtml=`
Es ist ein Fehler aufgetreten
Bitte versuchen Sie es später erneut.
`;window.onload=function(){const wrapper=document.createElement("div");const loaderUrl=configBase.apiBase+"/utils/loader";document.getElementById(configBase.containerId).appendChild(wrapper);wrapper.id=configBase.wrapperId;wrapper.style.position="relative";document.getElementById(configBase.containerId).appendChild(wrapper);fetch(loaderUrl,{method:"GET",priority:"high"}).then(response=>{if(!response.ok){throw new Error(`HTTP error! ${response}`)}
return response.text()}).then(responseData=>{document.getElementById(configBase.wrapperId).innerHTML+=responseData;setTimeout(()=>{document.getElementById("10x-Loader-Wrapper").style.display="none"},5000)})
wrapper.id=configBase.wrapperId;const domain=window.location.hostname;const http=window.location.protocol==="https:"?"https://":"http://";const formUrl=configBase.apiBase+"/forms/html?encrypt="+configBase.encryptionKey+"&domain="+domain+"&version="+configBase.bookingformVersion;const iframe=document.createElement("iframe");document.getElementById(configBase.wrapperId).appendChild(iframe);iframe.src=formUrl;iframe.name="10x-BookingformFrame";iframe.title="10x-BookingformFrame";iframe.id="10x-BookingformFrame";iframe.width="100%";iframe.height="700px";iframe.style.border="none";iframe.style.overflow="hidden";iframe.scrolling="no";window.addEventListener("message",function(e){var iframe=document.getElementById("10x-BookingformFrame");var eventName=e.data[0];var data=e.data[1];switch(eventName){case "setHeight":iframe.height=data;break;case "loaded":document.getElementById("10x-Loader-Wrapper").style.display="none";break}},!1)}