(()=>{const EmbedVariables={newPotentialVisitorTrackingId:"mbbjeek524rtw4vhl6rzwpneqp9v6ouayg744xwk36ztc3m32bu56lk7gilrziqg",visitorTrackingIdCookieName:"clive-visitor-tid-844",currentCliveId:6470,currentCliveType:"form",domainName:"live.clive.cloud",formId:6470,smartContentVersionQueryParam:""},visitorTrackingIdCookieName=EmbedVariables.visitorTrackingIdCookieName,getCookie=(e,t)=>{const r=e+"=",i=t.split(";");for(let n=0;n<i.length;n++){let o=i[n];for(;o.charAt(0)==" ";)o=o.substring(1);if(o.indexOf(r)==0)return o.substring(r.length,o.length)}return""},getCookieDomain=()=>{const e=window.location.hostname;if(!isNaN(Number(e.replace(/\\./gi,""))))return null;const t=e.split("."),r=t.length;return r<2?null:"."+t[r-2]+"."+t[r-1]},setCookie=(e,t,r)=>{const i=new Date;i.setTime(i.getTime()+r*24*60*60*1e3);const n="expires="+i.toUTCString(),o=getCookieDomain(),s=o?";Domain="+encodeURIComponent(o):"";document.cookie=e+"="+t+";"+n+";path=/"+s,getCookie(e,document.cookie)||(document.cookie=e+"="+t+";"+n+";path=/")},setVisitorTrackingIdCookie=e=>{setCookie(visitorTrackingIdCookieName,e,3650)},determineVisitorTrackingId=()=>{let e=getCookie(visitorTrackingIdCookieName,document.cookie);return e||(e=EmbedVariables.newPotentialVisitorTrackingId,setVisitorTrackingIdCookie(EmbedVariables.newPotentialVisitorTrackingId)),e},ajax=(e,t,r,i,n)=>{const o=new XMLHttpRequest;o.withCredentials=n!==!1,o.open(t,appendReferer(e),!0);for(let s in i)o[s]=i[s];o.send(r)},appendReferer=e=>{const t=new URL(e);return t.searchParams.set("referer",window.location.href),t.toString()},findScriptNode=()=>{const e=document.currentScript;if(e)return e;const t=document.getElementsByTagName("script");for(let r=0;r<t.length;r++){const i=t[r],n=i.getAttribute("data-clive-id"),o=i.getAttribute("data-clive-type");if(n==EmbedVariables.currentCliveId&&o==EmbedVariables.currentCliveType)return i}return null},visitorTrackingId=determineVisitorTrackingId(),scriptNode=findScriptNode();scriptNode&&scriptNode.parentNode&&ajax(`https://${EmbedVariables.domainName}/forms/${EmbedVariables.formId}/visitors/${visitorTrackingId}/render${EmbedVariables.smartContentVersionQueryParam}`,"GET",null,{onload:function(){const newNode=document.createElement("DIV");newNode.innerHTML=this.responseText;const form=newNode.querySelector("form"),script=newNode.getElementsByTagName("SCRIPT")[0];if(scriptNode&&scriptNode.parentNode&&(scriptNode.parentNode.insertBefore(newNode,scriptNode),script))try{eval(script.innerHTML)}catch(e){console.log("Error: ",e,e.stack)}}});})();