var _steamlive_contactForm_captchaCode,_sc_chatConfig={server:"https://live.steam.eu.com",unallowedChatExtensions:"bat,exe,cmd,sh,php,pl,cgi,386,dll,com,torrent,js,app,jar,pif,vb,vbscript,wsf,asp,cer,csr,jsp,drv,sys,ade,adp,bas,chm,cpl,crt,csh,fxp,hlp,hta,inf,ins,isp,jse,htaccess,htpasswd,ksh,lnk,mdb,mde,mdt,mdw,msc,msi,msp,mst,ops,pcd,prg,reg,scr,sct,shb,shs,url,vbe,vbs,wsc,wsf,wsh",customerDomain:"steam"},dc={getItem:function(t){return t&&decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null},setItem:function(t,e,a,o,c,n){if(!t||/^(?:expires|max\-age|path|domain|secure)$/i.test(t))return!1;var r="";if(a)switch(a.constructor){case Number:r=1/0===a?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+a;break;case String:r="; expires="+a;break;case Date:r="; expires="+a.toUTCString()}return document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(e)+r+(c?"; domain="+c:"")+(o?"; path="+o:"")+(n?"; secure":""),!0},removeItem:function(t,e,a){return!!this.hasItem(t)&&(document.cookie=encodeURIComponent(t)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(a?"; domain="+a:"")+(e?"; path="+e:""),!0)},hasItem:function(t){return!!t&&new RegExp("(?:^|;\\s*)"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(document.cookie)},keys:function(){for(var t=document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g,"").split(/\s*(?:\=[^;]*)?;\s*/),e=t.length,a=0;a') )",DOM.frame.style.display="block",DOM.frame.frameBorder=0,DOM.frame.style.zIndex="2147483647",DOM.frame.className="_steamlive_contactform_frame",DOM.frame.style.margin="auto",DOM.frame.style.width="100%",DOM.frame.style.height="100%",DOM.frame.style.overflow="hidden",DOM.main=document.createElement("div"),DOM.main.className="_steamContactForm_main",DOM.steamContactForm_container=document.createElement("div"),DOM.steamContactForm_container.className="_steamContactForm_form_container",DOM.steamContactForm_formTitle=document.createElement("div"),DOM.steamContactForm_formTitle.className="_steamContactForm_formTitle",DOM.steamContactForm_formTitle.innerHTML=config.cfd.title,DOM.steamContactForm_saveFormButton=steamContactForm_createButton(config.cfd.buttonText,"submitForm",steamContactForm_saveContactForm),DOM.steamContactForm_afterSaveMessage=document.createElement("div"),DOM.steamContactForm_afterSaveMessage.className="_steamlive_contactForm_afterSaveMessage",DOM.steamContactForm_afterSaveMessage.innerHTML=config.cfd.afterSaveMessage,DOM.steamContactForm_formBody=document.createElement("div"),DOM.steamContactForm_formBody.className="_steamContactForm_formBody",steamContactForm_setFormData(),DOM.captchaContainer=document.createElement("div"),DOM.captchaContainer.name="_steamlive_contactForm_captchaContainer",DOM.captchaContainer.className="_steamlive_contactForm_captchaContainer",DOM.captchaLabel=document.createElement("div"),DOM.captchaLabel.name="_steamlive_contactForm_captchaCanvas",DOM.captchaLabel.className="_steamlive_contactForm_captchaCanvas",DOM.captchaInput=document.createElement("input"),DOM.captchaInput.name="_steamlive_contactForm_captchaInput",DOM.captchaInput.className="_steamlive_contactForm_captchaInput",DOM.captchaInput.placeholder="Captcha",DOM.captchaInput.dataset.mandatory=1,DOM.captchaRefreshBtn=document.createElement("div"),DOM.captchaRefreshBtn.className="_steamlive_contactForm_captchaRefresh",DOM.captchaRefreshBtn.onclick=function(){steamContactForm_generateCaptcha()},DOM.captchaContainer.appendChild(DOM.captchaLabel),DOM.captchaContainer.appendChild(DOM.captchaRefreshBtn),DOM.captchaContainer.appendChild(DOM.captchaInput),DOM.steamContactForm_formBody.appendChild(DOM.captchaContainer),DOM.steamContactForm_formBody.appendChild(DOM.steamContactForm_saveFormButton),DOM.steamContactForm_poweredBy=document.createElement("div"),DOM.steamContactForm_poweredBy.className="_steamlive_contactForm_poweredBy",DOM.steamContactForm_poweredBy.innerHTML="Powered by Steam-connect";var t=document.body.getElementsByClassName("steamContactForm_contentDiv")[0];t.appendChild(DOM.main),DOM.steamContactForm_container.appendChild(DOM.steamContactForm_formTitle),DOM.steamContactForm_container.appendChild(DOM.steamContactForm_formBody),DOM.steamContactForm_container.appendChild(DOM.steamContactForm_poweredBy),DOM.main.appendChild(DOM.steamContactForm_container),steamContactForm_generateCaptcha(),t.appendChild(DOM.frame),DOM.frame.contentDocument.open(),DOM.frame.contentDocument.close(),DOM.frame.contentDocument.body.appendChild(DOM.main);var e=document.createElement("link");e.href=baseURL+"/formcss",e.rel="stylesheet",e.type="text/css";var a=document.createElement("link");a.href=baseURL+"/contactformLibs/css/bootstrap.min.css",a.rel="stylesheet",a.type="text/css";var o=document.createElement("link");o.href=baseURL+"/contactformLibs/css/bootstrap-datetimepicker.min.css",o.rel="stylesheet",o.type="text/css";var c,t=document.createElement("link");t.href=baseURL+"/contactformLibs/css/intlTelInput.min.css",t.rel="stylesheet",t.type="text/css",DOM.frame.contentDocument.head.appendChild(a),DOM.frame.contentDocument.head.appendChild(o),DOM.frame.contentDocument.head.appendChild(t),DOM.frame.contentDocument.head.appendChild(e),"undefined"!=typeof _customCSS&&""!=_customCSS.trim()&&((c=document.createElement("link")).href=_customCSS,c.rel="stylesheet",c.type="text/css",document.body.appendChild(c)),steamContactForm_loadScript(baseURL+"/contactformLibs/js/jquery.min.js",function(){steamContactForm_loadScript(baseURL+"/contactformLibs/js/moment.min.js",function(){steamContactForm_loadScript(baseURL+"/contactformLibs/js/bootstrap.min.js",function(){steamContactForm_loadScript(baseURL+"/contactformLibs/js/bootstrap-datetimepicker.min.js",function(){steamContactForm_loadScript(baseURL+"/contactformLibs/js/intlTelInput-jquery.min.js",function(){steamContactForm_loadScript(baseURL+"/contactformLibs/js/custom.js",function(){})})})})})}),steamContactForm_applyCSS(),void 0!==config.cfd.analytics&&1==config.cfd.analytics&&((c=document.createElement("script")).onload=function(){steamContactForm_gtag("js",new Date),steamContactForm_gtag("config",config.cfd.analyticsTrackingCode),void 0!==config.cfd.contactFormLoaded&&1==config.cfd.contactFormLoaded&&steamContactForm_gtag("event","Contact form loaded",{event_action:"Contact form loaded",event_category:"Chat Pop-up",event_label:Date.now()})},c.src="https://www.googletagmanager.com/gtag/js?id="+config.cfd.analyticsTrackingCode,document.head.appendChild(c))},steamContactForm_createButton=function(t,e,a){var o=document.createElement("div");return o.innerHTML=t,o.onclick=a,o.className="_steamlive_contactForm_btn_"+e,o},steamContactForm_saveContactForm=function(){steamContactForm_checkMandatoryFields()||("undefined"==typeof steamContactForm_previewMode?steamContactForm_callMeBack():(DOM.steamContactForm_formTitle.remove(),DOM.steamContactForm_formBody.remove(),DOM.steamContactForm_poweredBy.remove(),DOM.steamContactForm_container.appendChild(DOM.steamContactForm_afterSaveMessage)))},setVar=function(t,e){t=_scfId+"_"+t,navigator.cookieEnabled&&dc.setItem(t,e,1/0,"/",getDomain(),null),LSAvailable&&localStorage.setItem(t,e)},getVar=function(t){var e=_scfId+"_"+t,e=dc.getItem(e)||localStorage.getItem(e);return e="false"===(e="true"===(e="null"===(e="null"===e||null==e?dc.getItem(t)||localStorage.getItem(t):e)?"":e)?!0:e)?!1:e},steamContactForm_applyCSS=function(){DOM.steamContactForm_container.style.fontFamily=config.cfd.fontFamily.replace("+"," "),DOM.steamContactForm_container.style.fontSize=config.cfd.fontSize+"px",DOM.steamContactForm_formTitle.style.backgroundColor="#"+config.cfd.titleBgColor,DOM.steamContactForm_formTitle.style.color="#"+config.cfd.titleTextColor,DOM.steamContactForm_formTitle.style.borderColor="#"+config.cfd.titleBorderColor,DOM.steamContactForm_saveFormButton.style.backgroundColor="#"+config.cfd.buttonBgColor,DOM.steamContactForm_saveFormButton.style.color="#"+config.cfd.buttonTextColor,DOM.steamContactForm_saveFormButton.style.borderColor="#"+config.cfd.buttonBorderColor,DOM.steamContactForm_afterSaveMessage.style.borderColor="#"+config.cfd.endMsgBordercolor,DOM.steamContactForm_afterSaveMessage.style.color="#"+config.cfd.endMessageTextColor,DOM.steamContactForm_afterSaveMessage.style.backgroundColor="#"+config.cfd.endMessageBgColor,1==config.cfd.fontBold&&(DOM.steamContactForm_container.style.fontWeight="bold",DOM.steamContactForm_afterSaveMessage.style.fontWeight="bold",DOM.steamContactForm_saveFormButton.style.fontWeight="bold"),1==config.cfd.fontItalic&&(DOM.steamContactForm_container.style.fontStyle="italic",DOM.steamContactForm_afterSaveMessage.style.fontStyle="italic",DOM.steamContactForm_saveFormButton.style.fontStyle="italic")},steamContactForm_setFormData=function(){if(contactPrams=[],void 0!==config.cfd.id&&null!=config.cfd.fields[0]&&"{}"!=config.cfd.fields[0]&&""!=config.cfd.fields[0]){var t=JSON.parse(config.cfd.fields);if(0==t.hasOwnProperty("field_0"))for(var e in t){var a,o=t[e][0];for(a in o)DOM.steamContactForm_formBody.appendChild(steamContactForm_createFormLabel(o[a][0].caption+(1===o[a][0].mandatory?" *":""),"inputCaption")),"message"==e?DOM.steamContactForm_formBody.appendChild(steamContactForm_createFormTextarea(e,"boxPID_"+a,o[a][0].mandatory,o[a][0].length)):DOM.steamContactForm_formBody.appendChild(steamContactForm_createFormInput(e,"boxPID_"+a,o[a][0].mandatory,o[a][0].length)),contactPrams.push("boxPID_"+a)}else for(var e in t)1==(e=t[e][0]).status&&0/g,"").replace(/%/g," ").replace(/#/g," ");else if("boxPID_0"!=contactPrams[c]){let t=DOM.steamContactForm_container.getElementsByClassName("_steamlive_contactForm_form_"+contactPrams[c])[0];"phonenumber"==t.dataset.field&&(t.value=t.value.replace("+","00")),e=(e=e+"&"+contactPrams[c])+"="+t.value.replace(/&/g," ").replace(//g,"").replace(/%/g," ").replace(/#/g," ")}void 0!==config.cfd.addressFilePID&&(a=config.cfd.addressFilePID),e=(e=e+"&campagnePID="+config.cfd.campaignPID+"&projectPID="+config.cfd.projectPID+"&adressfile="+a+"&resultcode="+config.cfd.resultcode+"&contactformpid="+config.cfd.contactFormPID)+"&domain="+o+"&callcenterPID="+config.cfd.callcenterPID+"&steamliveChatAction=contactFormCallback",t.open("GET",baseURL+"/s/callMeback?"+e,!0),t.setRequestHeader("Content-Type","application/json"),t.onload=function(){200===t.status&&(DOM.steamContactForm_formTitle.remove(),DOM.steamContactForm_formBody.remove(),DOM.steamContactForm_poweredBy.remove(),DOM.steamContactForm_container.appendChild(DOM.steamContactForm_afterSaveMessage),setVar("steamContactForm_formSent",1),void 0!==config.cfd.analytics&&1==config.cfd.analytics&&1==config.cfd.contactFormSaved&&steamContactForm_gtag("event","Contact Form Saved",{event_action:"Contact Form Saved",event_category:gtagEventCategory,event_label:Date.now()}))},t.send()},steamContactForm_generateCaptcha=function(){try{DOM.captchaLabel.innerHTML="";for(var t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@!#$%&*",e=[],a=0;a<6;a++){var o=Math.floor(Math.random()*t.length+1);-1==e.indexOf(t[o])?e.push(t[o]):a--}_steamlive_contactForm_captchaCode=e.join(""),DOM.captchaLabel.innerHTML=_steamlive_contactForm_captchaCode}catch(t){console.log(t)}},steamContactForm_validateCaptcha=function(){return DOM.steamContactForm_container.getElementsByClassName("_steamContactForm_formBody")[0].getElementsByClassName("_steamlive_contactForm_captchaInput")[0].value==_steamlive_contactForm_captchaCode||(alert("invalid captcha"),!1)},validateEmail=function(t){return/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t)};function validatePhone(t){return/^\s*(?:\+(\d{1,3}))([-. (]*(\d{3})[-. )]*)?((\d{3})[-. ]*(\d{2,4})(?:[-.x ]*(\d+))?)\s*$/.test(t)}var steamContactForm_gtag=function(){dataLayer.push(arguments)};