document.querySelectorAll||(document.querySelectorAll=function(e){var t=document,o=t.documentElement.firstChild,n=t.createElement("STYLE");return o.appendChild(n),t.__qsaels=[],n.styleSheet.cssText=e+"{x:expression(document.__qsaels.push(this))}",window.scrollBy(0,0),t.__qsaels}),window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),window.Element&&window.Element.prototype&&window.Element.prototype.hasAttribute||function(){function e(e){return void 0!==this[e]}for(var t=document.getElementsByTagName("form"),o=0;o<t.length;o++)t[o].hasAttribute=e}(),Function.prototype.bind||(Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var t=Array.prototype.slice.call(arguments,1),o=this,n=function(){},i=function(){return o.apply(this instanceof n?this:e,t.concat(Array.prototype.slice.call(arguments)))};return this.prototype&&(n.prototype=this.prototype),i.prototype=new n,i}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var t,o=Object(this),n=o.length>>>0,i=arguments[1],r=0;r<n;r++)if(t=o[r],e.call(i,t,r,o))return t}}),Object.keys||(Object.keys=function(){"use strict";var e=Object.prototype.hasOwnProperty,t=!{toString:null}.propertyIsEnumerable("toString"),o=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],n=o.length;return function(i){if("function"!=typeof i&&("object"!=typeof i||null===i))throw new TypeError("Object.keys called on non-object");var r,a,s=[];for(r in i)e.call(i,r)&&s.push(r);if(t)for(a=0;a<n;a++)e.call(i,o[a])&&s.push(o[a]);return s}}()),function(e,t){"function"==typeof define&&define.amd?define(["domReady"],function(o){return e.MCFX=t(o)}):e.MCFX=t(e.domReady)}("undefined"!=typeof self?self:this,function(e){function t(e){var t={id:0,lateInit:!1,formMappings:[]};this.settings=s.merge(t,e),this.forms=[]}function o(e){var t={id:0,CTXname:!1};this.settings=s.merge(t,e),this.startTime=(new Date).getTime(),this.visitID=s.uuid4(),this.visits=s.get_count(),this.gaID=s.get_uid(),this.unloading=!1,s.saveQueryStringParams(),this.addVisit(),"onpagehide"in window&&s.addEvent(window,"pagehide",function(e){s.renewUserSession()}),"onbeforeunload"in window&&s.addEvent(window,"beforeunload",function(e){s.renewUserSession()})}var n=navigator.sendBeacon.bind(navigator);"function"!=typeof e&&(e=function(){var e,t=[],o="object"==typeof document&&document,n=o&&o.documentElement.doScroll,i=o&&(n?/^loaded|^c/:/^loaded|^i|^c/).test(o.readyState);return!i&&o&&o.addEventListener("DOMContentLoaded",e=function(){for(o.removeEventListener("DOMContentLoaded",e),i=1;e=t.shift();)e()}),function(e){i?setTimeout(e,0):t.push(e)}}()),t.prototype.setupForms=function(e){void 0!==e&&(this.settings.formMappings=e);for(var t=0;t<this.settings.formMappings.length;t++){var o=this.settings.formMappings[t],n=this.getForm(o);n&&(this.setupForm(n,o),d.features.lmfx&&s.addEvent(n,"submit",this.onFormSubmit.bind(this)),this.forms.push(n))}},t.prototype.setupForm=function(e,t){void 0!==t.id&&e.appendChild(s.createInput("mcfx_form_id",function(){return t.id})),void 0!==t.leadType&&e.appendChild(s.createInput("fx_type",function(){return t.leadType})),e.appendChild(s.createInput("lmfx_submit_uuid",s.uuid4)),e.appendChild(s.createInput("ga_count",s.get_count)),e.appendChild(s.createInput("ga_id",s.get_uid))},t.prototype.onFormSubmit=function(e){this.sendFormData(e.currentTarget)},t.prototype.getForm=function(e){var t=!1,o="";switch(e.selectBy){case"attribute":o=document.querySelectorAll('[name="'+e.selector+'"]'),o.length&&(t=o[0].form);break;default:if(!(t=document.getElementById(e.selector))){t=!1;break}"form"!==t.tagName.toLowerCase()&&(o=document.querySelectorAll("#"+e.selector+" form"),t=!!o.length&&o[0])}return t},t.prototype.sendFormData=function(e){var t;try{var o=("https:"==document.location.protocol?"https://":"http://")+"t.leadmanagerfx.com/lead/add/";void 0!==this.settings.id&&(o+=this.settings.id),navigator.sendBeacon?(t=this.collectFormData(e),n(o,t)):(t=this.collectFormData(e,!0),s.ajax({url:o,type:"POST",data:t,async:!1}))}catch(e){}},t.prototype.collectFormData=function(e,t){t=void 0!==t&&t,void 0===window.FormData&&(t=!0);var o=t?s.serialize(e):s.formData(e),n=s.get_utm_overrides();t?o+="&fx_referrer="+encodeURIComponent(s.get_referrer()):o.append("fx_referrer",s.get_referrer()),t?o+="&fx_document_title="+s.getCookie("fx_document_title"):o.append("fx_document_title",s.getCookie("fx_document_title")),t?o+="&fx_mcfxvsid="+encodeURIComponent(s.getUserSession()):o.append("fx_mcfxvsid",s.getUserSession()),t&&s.getCookie("fx_matchtype")?o+="&fx_matchtype="+encodeURIComponent(s.getCookie("fx_matchtype")):s.getCookie("fx_matchtype")&&o.append("fx_matchtype",s.getCookie("fx_matchtype")),t&&s.getCookie("fx_network")?o+="&fx_network="+encodeURIComponent(s.getCookie("fx_network")):s.getCookie("fx_network")&&o.append("fx_network",s.getCookie("fx_network")),t&&s.getCookie("fx_creative")?o+="&fx_creative="+encodeURIComponent(s.getCookie("fx_creative")):s.getCookie("fx_creative")&&o.append("fx_creative",s.getCookie("fx_creative")),t&&s.getCookie("fx_keyword")?o+="&fx_keyword="+encodeURIComponent(s.getCookie("fx_keyword")):s.getCookie("fx_keyword")&&o.append("fx_keyword",s.getCookie("fx_keyword")),t&&s.getCookie("fx_placement")?o+="&fx_placement="+encodeURIComponent(s.getCookie("fx_placement")):s.getCookie("fx_placement")&&o.append("fx_placement",s.getCookie("fx_placement")),t&&s.getCookie("fx_aceid")?o+="&fx_aceid="+encodeURIComponent(s.getCookie("fx_aceid")):s.getCookie("fx_aceid")&&o.append("fx_aceid",s.getCookie("fx_aceid")),t&&s.getCookie("fx_adposition")?o+="&fx_adposition="+encodeURIComponent(s.getCookie("fx_adposition")):s.getCookie("fx_adposition")&&o.append("fx_adposition",s.getCookie("fx_adposition")),t&&s.getCookie("mcfxPGID")?o+="&fx_mcfxpgid="+encodeURIComponent(s.getCookie("mcfxPGID")):s.getCookie("mcfxPGID")&&o.append("fx_mcfxpgid",s.getCookie("fx_mcfxpgid")),t&&s.getCookie("gclid")?o+="&gclid="+encodeURIComponent(s.getCookie("gclid")):s.getCookie("gclid")&&o.append("gclid",s.getCookie("gclid"));for(var i=Object.keys(n),r=0;r<i.length;r++){var a=i[r];t?o+="&"+a+"="+encodeURIComponent(n[a]):o.append(a,n[a])}return o},o.prototype.addVisit=function(){var e=this.collectData(!0);try{var t=("https:"==document.location.protocol?"https://":"http://")+"t.leadmanagerfx.com/visit/add";t+="/"+this.settings.id,this.settings.CTXname&&(t+="?company="+this.settings.CTXname),s.ajax({url:t,type:"POST",data:e,async:!0}),a.last={type:"pageenter"}}catch(e){}},o.prototype.collectData=function(e){e=void 0!==e&&e,void 0===window.FormData&&(e=!0);var t=e?"":new FormData,o=s.get_utm_overrides();e?(t+="ga_count="+this.visits,t+="&ga_id="+this.gaID,t+="&page="+encodeURIComponent(window.location.href.replace(/^(?:\/\/|[^\/]+)*/,"")),t+="&time_on_page="+this.startTime,t+="&time_left_page="+(new Date).getTime(),t+="&fx_document_title="+s.getCookie("fx_document_title"),t+="&fx_referrer="+encodeURIComponent(s.get_referrer()),t+="&visitid="+this.visitID,t+="&origin="+window.location.host,t+="&fx_mcfxvsid="+encodeURIComponent(s.getUserSession())):(t.append("ga_count",this.visits),t.append("ga_id",this.gaID),t.append("page",encodeURIComponent(window.location.href.replace(/^(?:\/\/|[^\/]+)*/,""))),t.append("time_on_page",this.startTime),t.append("time_left_page",(new Date).getTime()),t.append("fx_document_title",s.getCookie("fx_document_title")),t.append("fx_referrer",s.get_referrer()),t.append("visitid",this.visitID),t.append("origin",window.location.host),t.append("fx_mcfxvsid",s.getUserSession())),e&&s.getCookie("fx_matchtype")?t+="&fx_matchtype="+encodeURIComponent(s.getCookie("fx_matchtype")):s.getCookie("fx_matchtype")&&t.append("fx_matchtype",s.getCookie("fx_matchtype")),e&&s.getCookie("fx_network")?t+="&fx_network="+encodeURIComponent(s.getCookie("fx_network")):s.getCookie("fx_network")&&t.append("fx_network",s.getCookie("fx_network")),e&&s.getCookie("fx_creative")?t+="&fx_creative="+encodeURIComponent(s.getCookie("fx_creative")):s.getCookie("fx_creative")&&t.append("fx_creative",s.getCookie("fx_creative")),s.getCookie("fx_keyword")?t+="&fx_keyword="+encodeURIComponent(s.getCookie("fx_keyword")):s.getCookie("fx_keyword")&&t.append("fx_keyword",s.getCookie("fx_keyword")),e&&s.getCookie("fx_placement")?t+="&fx_placement="+encodeURIComponent(s.getCookie("fx_placement")):s.getCookie("fx_placement")&&t.append("fx_placement",s.getCookie("fx_placement")),e&&s.getCookie("fx_aceid")?t+="&fx_aceid="+encodeURIComponent(s.getCookie("fx_aceid")):s.getCookie("fx_aceid")&&t.append("fx_aceid",s.getCookie("fx_aceid")),e&&s.getCookie("fx_adposition")?t+="&fx_adposition="+encodeURIComponent(s.getCookie("fx_adposition")):s.getCookie("fx_adposition")&&t.append("fx_adposition",s.getCookie("fx_adposition")),e&&s.getCookie("mcfxPGID")?t+="&fx_mcfxpgid="+encodeURIComponent(s.getCookie("mcfxPGID")):s.getCookie("mcfxPGID")&&t.append("fx_mcfxpgid",s.getCookie("fx_mcfxpgid")),e&&s.getCookie("gclid")?t+="&gclid="+encodeURIComponent(s.getCookie("gclid")):s.getCookie("gclid")&&t.append("gclid",s.getCookie("gclid"));for(var n=Object.keys(o),i=0;i<n.length;i++){var r=n[i];e?t+="&"+r+"="+encodeURIComponent(o[r]):t.append(r,o[r])}return t};var i=function(e){var t={enabled:!1,captureInputs:!1};this.settings=s.merge(t,e),this.userSession=s.getUserSession(),this.capturing=!1,this.paused=!0,this.frameTimer=!1,this.pingTimer=!1,this.frameData=[],this.frames=[],this.frameEvents=[],this.mousePosition={x:0,y:0},this.settings.enabled&&(this.onMouseMove=this.onMouseMove.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onClick=this.onClick.bind(this),this.onScroll=this.onScroll.bind(this),this.onVisibilityChange=this.onVisibilityChange.bind(this),this.onBeforeUnload=this.onBeforeUnload.bind(this),this.onInputChange=this.onInputChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.captureFrame=this.captureFrame.bind(this),this.captureEvent=this.captureEvent.bind(this),this.sendCapturedFrames=this.sendCapturedFrames.bind(this),this.maybePauseCapture=this.maybePauseCapture.bind(this),"undefined"!=typeof Storage&&localStorage.mcfxRecorderFrames&&(s.ajax({url:("https:"==document.location.protocol?"https://":"http://")+"recorder.marketingcloudfx.com",type:"POST",dataType:"json",data:localStorage.mcfxRecorderFrames,async:!0}),localStorage.removeItem("mcfxRecorderFrames")))};i.prototype.start=function(){this.settings.enabled&&(s.addEvent(document,"mousemove",this.onMouseMove),s.addEvent(document,"mouseover",this.onMouseOver),s.addEvent(document,"mouseout",this.onMouseOut),s.addEvent(document,"focusin",this.onFocus),s.addEvent(document,"focusout",this.onBlur),s.addEvent(document,"click",this.onClick),s.addEvent(document,"scroll",this.onScroll),this.settings.captureInputs&&("oninput"in document.createElement("input")?s.addEvent(document,"input",this.onInputChange):s.addEvent(document,"keyup",this.onInputChange),s.addEvent(document,"change",this.onInputChange)),void 0!==document.addEventListener&&!1!==s.getVisibilityProp()&&s.addEvent(document,s.getVisibilityEvent(),this.onVisibilityChange),"onpagehide"in window?s.addEvent(window,"pagehide",this.onBeforeUnload):s.addEvent(window,"beforeunload",this.onBeforeUnload),this.capturing=!0,this.paused=!1,this.lastEventTime=Math.floor(new Date/1e3),this.frameTimer=setInterval(this.captureFrame,50),this.pingTimer=setInterval(this.sendCapturedFrames,6e4),this.pauseTimer=setInterval(this.maybePauseCapture,1e3))},i.prototype.stop=function(){s.removeEvent(document,"mouseover",this.onMouseOver),s.removeEvent(document,"mouseout",this.onMouseOut),s.removeEvent(document,"focusin",this.onFocus),s.removeEvent(document,"focusout",this.onBlur),s.removeEvent(document,"click",this.onClick),s.removeEvent(document,"scroll",this.onScroll),this.settings.captureInputs&&("oninput"in document.createElement("input")?s.removeEvent(document,"input",this.onInputChange):s.removeEvent(document,"keyup",this.onInputChange),s.removeEvent(document,"change",this.onInputChange)),void 0!==document.addEventListener&&!1!==s.getVisibilityProp()&&s.removeEvent(document,s.getVisibilityEvent(),this.onVisibilityChange),"onpagehide"in window?s.removeEvent(window,"pagehide",this.onBeforeUnload):s.removeEvent(window,"beforeunload",this.onBeforeUnload),this.capturing=!1,this.paused=!0,clearInterval(this.frameTimer),clearInterval(this.pingTimer),clearInterval(this.pauseTimer)},i.prototype.pause=function(){!0!==this.paused&&(this.paused=!0,this.sendCapturedFrames(),clearInterval(this.frameTimer),clearInterval(this.pingTimer),clearInterval(this.pauseTimer))},i.prototype.unpause=function(){!1!==this.paused&&(this.paused=!1,this.frameTimer=setInterval(this.captureFrame,50),this.pingTimer=setInterval(this.sendCapturedFrames,6e4),this.pauseTimer=setInterval(this.maybePauseCapture,1e3))},i.prototype.maybePauseCapture=function(){Math.floor(new Date/1e3)-this.lastEventTime>10&&this.pause()},i.prototype.captureEvent=function(e){this.lastEventTime=Math.floor(new Date/1e3),this.unpause(),void 0!==e&&this.frameEvents.push(e)},i.prototype.getAttributesPairs=function(e){if(void 0===e)return{};var t={},o=["id","class","name"];for(var n in o){var i=o[n],r=e.getNamedItem(i);null!==r&&(t[i]=r.value)}return t},i.prototype.captureFrame=function(){if(this.capturing){var e={session:s.getUserSession(),time:Date.now(),scroll:this.captureScroll(),mouse:this.captureMouse(),events:this.frameEvents,page:window.location.href,size:s.viewport()};this.frameData.push(e),this.frameEvents=[]}},i.prototype.onInputChange=function(e){var t=e.srcElement||e.target,o={};o={type:"input",el:this.getAttributesPairs(t.attributes),form:void 0!==t.form&&null!==t.form&&void 0!==t.form.attributes?this.getAttributesPairs(t.form.attributes):""},void 0!==t.attributes.name&&(s.isAllowedField(t.attributes.name.name,t.value,t)?o.value=t.value:o.value="********",this.captureEvent(o))},i.prototype.onClick=function(e){var t=e.srcElement||e.target,o={type:"click",el:this.getAttributesPairs(t.attributes),form:"",value:""};this.captureEvent(o)},i.prototype.onMouseOver=function(e){e=e||window.event;var t=e.srcElement||e.target,o={type:"mouseover",el:this.getAttributesPairs(t.attributes),form:"",value:""};this.captureEvent(o)},i.prototype.onMouseOut=function(e){e=e||window.event;var t=e.srcElement||e.target,o={type:"mouseout",el:this.getAttributesPairs(t.attributes),form:"",value:""};this.captureEvent(o)},i.prototype.onFocus=function(e){var t=e.srcElement||e.target;if(t)var o={type:"focus",el:this.getAttributesPairs(t.attributes),form:void 0!==t.form&&null!==t.form&&void 0!==t.form.attributes?this.getAttributesPairs(t.form.attributes):""};this.captureEvent(o)},i.prototype.onBlur=function(e){var t=e.srcElement||e.target,o={type:"blur",el:this.getAttributesPairs(t.attributes),form:void 0!==t.form&&null!==t.form&&void 0!==t.form.attributes?this.getAttributesPairs(t.form.attributes):""};this.captureEvent(o)},i.prototype.onMouseMove=function(e){this.mousePosition={x:e.pageX,y:e.pageY},this.captureEvent()},i.prototype.onVisibilityChange=function(){switch(document[s.getVisibilityState()]){case"visible":this.captureEvent();break;case"hidden":this.pause()}},i.prototype.onBeforeUnload=function(e){this.settings.enabled&&this.sendCapturedFrames(!0)},i.prototype.captureScroll=function(){return{x:s.pageOffset?window.pageXOffset:s.isCSS1Compat?document.documentElement.scrollLeft:document.body.scrollLeft,y:s.pageOffset?window.pageYOffset:s.isCSS1Compat?document.documentElement.scrollTop:document.body.scrollTop}},i.prototype.onScroll=function(e){this.captureEvent()},i.prototype.captureMouse=function(){return this.mousePosition},i.prototype.sendCapturedFrames=function(e){if(0!==this.frameData.length){if(!0===(e=void 0!==e&&e))return void("undefined"!=typeof Storage&&(localStorage.mcfxRecorderFrames=JSON.stringify(this.frameData)));s.ajax({url:("https:"==document.location.protocol?"https://":"http://")+"recorder.marketingcloudfx.com",type:"POST",dataType:"json",data:JSON.stringify(this.frameData),async:!0}),this.frameData=[]}};var r=function(e){this.el=null,this.url=("https:"==document.location.protocol?"https://":"http://")+"cdn.leadmanagerfx.com/reviews/"+e.id+"/",this.reviews=[],this.ready=!1};r.prototype.fetch=function(){var e=this;s.ajax({type:"GET",url:e.url,async:!0,onComplete:function(t){t=JSON.parse(t),e.el=t.selector,e.reviews=t.reviews,e.ready=!0}})},r.prototype.render=function(){if(!this.ready){var e=this;return void setTimeout(function(){e.render()},2e3)}var t=document.getElementById(this.el);if(t){for(var o=this.reviews.length,n=0,i='<div class="mcfx-reviews">';n<o;)i+=this.renderOne(this.reviews[n]),n++;i+="</div>",t.innerHTML=i}},r.prototype.renderOne=function(e){var t='<div class="mcfx-review" itemprop="review" itemscope itemtype="http://schema.org/Review">';t+='<span class="mcfx-review-author" itemprop="author">'+e.author_name+"</span> ",t+='<span class="mcfx-review-date" itemprop="datePublished">'+e.date+"</span>",t+='<div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">',t+='<meta itemprop="worstRating" content = "1"/>',t+='<span class="mcfx-review-number-rating">',t+='<span class="mcfx-review-rating" itemprop="ratingValue">'+e.rating+"</span>/",t+='<span class="mcfx-review-max" itemprop="bestRating">5</span> stars',t+="</span>",t+='<span class="mcfx-review-stars">';var o;for(o=1;o<=5;o++)e.rating>=o&&(t+='<span class="mcfx-star mcfx-star-active"></span>');return t+="</span>",t+="</div>",t+='<span class="mcfx-review-description" itemprop="reviewBody">'+e.text+"</span>",t+="</div>"};var a={isIdle:!1,isIdleTrack:null,idleInterval:6e4,last:null,send:function(e,t){if(payload={type:e,date:(new Date).getTime(),visitId:c.visitID,visitorId:s.get_uid(),sessionId:s.getUserSession(),meta:void 0!==typeof t?t:null},a.last&&payload.type===a.last.type&&payload.date-a.last.date<101)return void(a.last=payload);if(a.last&&"pageactive"===payload.type&&"pageenter"===a.last.type)return void(a.last=payload);if(a.last&&"pageactive"===payload.type&&"pageactive"===a.last.type)return void(a.last=payload);if(a.last&&"pageinactive"===payload.type&&"pageinactive"===a.last.type)return void(a.last=payload);if(a.last&&"pageleave"===a.last.type)return void(a.last=payload);var o=("https:"==document.location.protocol?"https://":"http://")+"t.leadmanagerfx.com";navigator.sendBeacon?n(o,new Blob([JSON.stringify(payload)],{type:"text/plain; charset=UTF-8"})):s.ajax({url:o,type:"POST",data:JSON.stringify(payload),async:!1}),a.last=payload},track:function(){a.isIdleTrack=setTimeout(a.onIdle,a.idleInterval),s.addEvent(document,"mousemove",a.wakeup),void 0!==document.addEventListener&&!1!==s.getVisibilityProp()&&s.addEvent(document,s.getVisibilityEvent(),function(e){document[s.getVisibilityProp()]&&!1===a.isIdle?(a.isIdle=!0,a.send("pageinactive"),clearTimeout(a.isIdleTrack)):document[s.getVisibilityProp]||!0!==a.isIdle||(a.send("pageactive"),a.isIdle=!1,a.isIdleTrack=setTimeout(a.onIdle,a.idleInterval))}),"onpagehide"in window?s.addEvent(window,"pagehide",function(){a.send("pageleave")}):(a.send("pageleave"),s.addEvent(window,"beforeunload",function(){a.send("pageleave")}))},onIdle:function(){a.send("pageinactive"),a.isIdle=!0},wakeup:function(e){var t,o,n;e=e||window.event,null==e.pageX&&null!=e.clientX&&(t=e.target&&e.target.ownerDocument||document,o=t.documentElement,n=t.body,e.pageX=e.clientX+(o&&o.scrollLeft||n&&n.scrollLeft||0)-(o&&o.clientLeft||n&&n.clientLeft||0),e.pageY=e.clientY+(o&&o.scrollTop||n&&n.scrollTop||0)-(o&&o.clientTop||n&&n.clientTop||0)),a.isIdle&&(a.isIdle=!1,a.send("pageactive")),clearTimeout(a.isIdleTrack),a.isIdleTrack=setTimeout(a.onIdle,a.idleInterval),m.settings.enabled&&!m.paused&&m.onMouseMove(e)}},s={pageOffset:void 0!==window.pageXOffset,isCSS1Compat:"CSS1Compat"===(document.compatMode||""),getUserSession:function(){return s.userSession?s.userSession:s.getCookie("mcfxVSID")?(s.userSession=s.getCookie("mcfxVSID"),s.userSession):(s.generateUserSession(),s.userSession)},generateUserSession:function(){return s.userSession=s.uuid4(),s.renewUserSession(),s.userSession},renewUserSession:function(){var e=new Date;s.setCookie("mcfxVSID",s.getUserSession(),s.dateModify(e,10,"minute"))},getDomainName:function(){if(void 0!==s.domain&&""!==s.domain)return s.domain;for(var e=0,t=document.domain,o=t.split("."),n="_gd"+(new Date).getTime();e<o.length-1&&-1==document.cookie.indexOf(n+"="+n);)t=o.slice(-1-++e).join("."),document.cookie=n+"="+n+";domain="+t+";";return document.cookie=n+"=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain="+t+";",s.domain=t,s.domain},merge:function(){for(var e,t={},o=0,n=arguments.length;o<n;o++)for(e in arguments[o])arguments[o].hasOwnProperty(e)&&(t[e]=arguments[o][e]);return t},createInput:function(e,t){var o=document.createElement("input");return o.type="hidden",o.name=e,o.value=t(),o},ajax:function(e){var t,o;window.XDomainRequest?(t=new XDomainRequest,o=!0):(t=window.XMLHttpRequest?new window.XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),o=!1);var n={url:"",type:"GET",data:"",dataType:"",async:!0,timeout:3e3,onComplete:function(e){},onError:function(e){}};e=void 0!==e?e:{},e=s.merge(n,e),o?(t.timeout=e.timeout,t.onload=function(){e.onComplete(t.responseText)},t.onerror=function(){e.onError(t.responseText)},t.ontimeout=function(){},t.onprogress=function(){},t.open(e.type,e.url)):(t.onreadystatechange=function(){4==t.readyState&&(200==t.status?e.onComplete(t.responseText):400==t.status&&e.onError(t.responseText))},t.open(e.type,e.url,e.async),"POST"===e.type&&"json"!==e.dataType&&t.setRequestHeader("Content-type","application/x-www-form-urlencoded")),t.send(e.data)},addEvent:function(e,t,o){e.attachEvent?(e["e"+t+o]=o,e[t+o]=function(){e["e"+t+o](window.event)},e.attachEvent("on"+t,e[t+o])):e.addEventListener(t,o,!1)},removeEvent:function(e,t,o){try{e.removeEventListener(t,o,!1)}catch(n){e.detachEvent("on"+t,o)}},getCookie:function(e){var t,o,n,i=document.cookie.split(";");for(t=0;t<i.length;t++)if(o=i[t].substr(0,i[t].indexOf("=")),n=i[t].substr(i[t].indexOf("=")+1),(o=o.replace(/^\s+|\s+$/g,""))==e)return unescape(n)},enforceSecureCookies:false,setCookie:function(e,t,o){var n="";if(o instanceof Date)n=" expires="+o.toUTCString();else if(o>0){var i=new Date;i.setDate(i.getDate()+o),n=" expires="+i.toUTCString()}const r=s.enforceSecureCookies&&"https:"===window.location.protocol?"; secure;":"";var a=encodeURI(t)+"; path=/; domain="+this.getDomainName()+"; "+n+r;document.cookie=e+"="+a},deleteCookie:function(e){s.setCookie(e,null,-1)},get_uid:function(){if(void 0!=s.getCookie("fx_uuid"))return s.getCookie("fx_uuid");var e=s.uuid4();return s.setCookie("fx_uuid",e,730),e},get_count:function(){var e=s.getCookie("fx_count");return void 0==e&&(e=0),parseInt(e)},get_referrer:function(){var e=s.getCookie("fx_referrer");if(void 0!=e)return e.substr(0,e.length-1)},set_referrer:function(e){e?s.setCookie("fx_referrer",e,7):s.setCookie("fx_referrer",document.referrer,7)},get_utm_overrides:function(){var e={};return s.getQueryStringParams("utm_source")?(e.utm_source=s.getQueryStringParams("utm_source"),s.setCookie("utm_source",s.getQueryStringParams("utm_source"),1)):void 0!==s.getCookie("utm_source")&&(e.utm_source=s.getCookie("utm_source")),s.getQueryStringParams("utm_medium")?(e.utm_medium=s.getQueryStringParams("utm_medium"),s.setCookie("utm_medium",s.getQueryStringParams("utm_medium"),1)):void 0!==s.getCookie("utm_medium")&&(e.utm_medium=s.getCookie("utm_medium")),s.getQueryStringParams("utm_segment")?(e.utm_segment=s.getQueryStringParams("utm_segment"),s.setCookie("utm_segment",s.getQueryStringParams("utm_segment"),1)):void 0!==s.getCookie("utm_segment")&&(e.utm_segment=s.getCookie("utm_segment")),s.getQueryStringParams("utm_campaign")?(e.utm_campaign=s.getQueryStringParams("utm_campaign"),s.setCookie("utm_campaign",s.getQueryStringParams("utm_campaign"),1)):void 0!==s.getCookie("utm_campaign")&&(e.utm_campaign=s.getCookie("utm_campaign")),e},register_load:function(){void 0==s.get_referrer()&&s.set_referrer(),void 0==s.getCookie("fx_document_title")&&s.setCookie("fx_document_title",encodeURIComponent(document.title),0);var e=s.get_count();e+=1,s.setCookie("fx_count",e,730),void 0!==s.getCookie("utm_source")&&s.setCookie("utm_source",s.getCookie("utm_source"),1),void 0!==s.getCookie("utm_medium")&&s.setCookie("utm_medium",s.getCookie("utm_medium"),1),void 0!==s.getCookie("utm_segment")&&s.setCookie("utm_segment",s.getCookie("utm_segment"),1),void 0!==s.getCookie("utm_campaign")&&s.setCookie("utm_campaign",s.getCookie("utm_campaign"),1)},formData:function(e){if(e&&"FORM"===e.nodeName){var t,o=e.elements.length-1,n=new FormData;for(o;o>=0;o-=1)if(""!==e.elements[o].name&&"company_name"!=e.elements[o].name&&"imahuman"!=e.elements[o].name&&"captcha"!=e.elements[o].name)if(s.isAllowedField(e.elements[o].name,e.elements[o].value))switch(e.elements[o].nodeName){case"INPUT":switch(e.elements[o].type){case"checkbox":case"radio":e.elements[o].checked&&n.append(e.elements[o].name,e.elements[o].value);break;case"file":break;case"password":n.append(e.elements[o].name,"********");break;default:n.append(e.elements[o].name,e.elements[o].value)}break;case"TEXTAREA":n.append(e.elements[o].name,e.elements[o].value);break;case"SELECT":switch(e.elements[o].type){case"select-one":n.append(e.elements[o].name,e.elements[o].value);break;case"select-multiple":var i=/([a-zA-Z0-9]+\[\]$)/.test(e.elements[o].name)?"":"[]";for(t=e.elements[o].options.length-1;t>=0;t-=1)e.elements[o].options[t].selected&&n.append(e.elements[o].name+i,e.elements[o].options[t].value)}}else n.append(e.elements[o].name,"********");return n}},serialize:function(e){if(e&&"FORM"===e.nodeName){var t,o,n=[];for(t=e.elements.length-1;t>=0;t-=1)if(""!==e.elements[t].name&&"company_name"!=e.elements[t].name&&"imahuman"!=e.elements[t].name&&"captcha"!=e.elements[t].name)if(s.isAllowedField(e.elements[t].name,e.elements[t].value))switch(e.elements[t].nodeName){case"INPUT":switch(e.elements[t].type){case"checkbox":case"radio":e.elements[t].checked&&n.push(e.elements[t].name+"="+encodeURIComponent(e.elements[t].value));break;case"file":break;case"password":n.push(e.elements[t].name+"="+encodeURIComponent("********"));break;default:n.push(e.elements[t].name+"="+encodeURIComponent(e.elements[t].value))}break;case"TEXTAREA":n.push(e.elements[t].name+"="+encodeURIComponent(e.elements[t].value));break;case"SELECT":switch(e.elements[t].type){case"select-one":n.push(e.elements[t].name+"="+encodeURIComponent(e.elements[t].value));break;case"select-multiple":for(o=e.elements[t].options.length-1;o>=0;o-=1)e.elements[t].options[o].selected&&n.push(e.elements[t].name+"="+encodeURIComponent(e.elements[t].options[o].value))}break;case"BUTTON":switch(e.elements[t].type){case"reset":case"submit":case"button":n.push(e.elements[t].name+"="+encodeURIComponent(e.elements[t].value))}}else n.push(e.elements[t].name+"="+encodeURIComponent("********"));return n.join("&")}},uuid4:function(e,t,o){var n=t&&o||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null),e=e||{};var i=e.random||(e.rng||s.rng)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t)for(var r=0;r<16;++r)t[n+r]=i[r];return t||s.bytesToUuid(i)},bytesToUuid:function(e,t){if(!this.byteToHex){this.byteToHex=[];for(var o=0;o<256;++o)this.byteToHex[o]=(o+256).toString(16).substr(1)}var o=t||0,n=this.byteToHex;return[n[e[o++]],n[e[o++]],n[e[o++]],n[e[o++]],"-",n[e[o++]],n[e[o++]],"-",n[e[o++]],n[e[o++]],"-",n[e[o++]],n[e[o++]],"-",n[e[o++]],n[e[o++]],n[e[o++]],n[e[o++]],n[e[o++]],n[e[o++]]].join("")},rng:function(){var e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(e){var t=new Uint8Array(16);return e(t),t}for(var o,n=new Array(16),i=0;i<16;i++)0==(3&i)&&(o=4294967296*Math.random()),n[i]=o>>>((3&i)<<3)&255;return n},randomInt:function(){return Math.floor(4294967296*Math.random())},getQueryStringParams:function(e){return decodeURIComponent((new RegExp("[?|&]"+e+"=([^&;]+?)(&|#|;|$)").exec(location.search)||[null,""])[1].replace(/\+/g,"%20"))||null},saveQueryStringParams:function(){for(var e,t=[],o={fx_matchtype:!0,fx_network:!0,fx_creative:!0,fx_keyword:!0,fx_placement:!0,fx_aceid:!0,fx_adposition:!0,utm_campaign:!0,utm_source:!0,utm_medium:!0,gclid:!0},n=[],i=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),r=0;r<i.length;r++)e=i[r].split("="),"utm_"===e[0].toLowerCase().substr(0,4)&&n.push({key:e[0],value:e[1]}),o[e[0]]&&void 0==s.getCookie(e[0])&&("gclid"==e[0]?s.setCookie(e[0],e[1],7):s.setCookie(e[0],e[1],0));return void 0!==s.getCookie("mcfxUTM")?s.setCookie("mcfxUTM",s.getCookie("mcfxUTM"),1):n.length&&s.setCookie("mcfxUTM",JSON.stringify(n),1),t},getUTMParams:function(){var e=s.getCookie("mcfxUTM");return void 0===e?[]:JSON.parse(e)},isNodeList:function(e){var t=Object.prototype.toString.call(e);return"object"==typeof e&&/^\[object (HTMLCollection|NodeList|Object)\]$/.test(t)&&"number"==typeof e.length&&(0===e.length||"object"==typeof e[0]&&e[0].nodeType>0)},viewport:function(){var e=0,t=0;return window.innerWidth?(e=window.innerWidth,t=window.innerHeight):0!=document.documentElement.clientWidth?(e=document.documentElement.clientWidth,t=document.documentElement.clientHeight):(e=document.body.clientWidth,t=document.body.clientHeight),{width:e,height:t}},dateModify:function(e,t,o){var n=new Date(e);switch(o.toLowerCase()){case"year":n.setFullYear(n.getFullYear()+t);break;case"quarter":n.setMonth(n.getMonth()+3*t);break;case"month":n.setMonth(n.getMonth()+t);break;case"week":n.setDate(n.getDate()+7*t);break;case"day":n.setDate(n.getDate()+t);break;case"hour":n.setTime(n.getTime()+36e5*t);break;case"minute":n.setTime(n.getTime()+6e4*t);break;case"second":n.setTime(n.getTime()+1e3*t);break;default:n=void 0}return n},getVisibilityProp:function(){return void 0!==document.hidden?"hidden":void 0!==document.mozHidden?"mozHidden":void 0!==document.msHidden?"msHidden":void 0!==document.webkitHidden&&"webkitHidden"},getVisibilityEvent:function(){return void 0!==document.hidden?"visibilitychange":void 0!==document.mozHidden?"mozvisibilitychange":void 0!==document.msHidden?"msvisibilitychange":void 0!==document.webkitHidden&&"webkitvisibilitychange"},getVisibilityState:function(){return void 0!==document.hidden?"visibilityState":void 0!==document.mozHidden?"mozVisibilityState":void 0!==document.msHidden?"msVisibilityState":void 0!==document.webkitHidden&&"webkitVisibilityState"},isAllowedField:function(e,t,o){return void 0===e||""===e||(void 0===t||""===t||(t=t.trim(),(void 0===o||void 0===o.attributes.type||"password"!==o.attributes.type.name.toLowerCase())&&(e=e.toLowerCase(),!(/password/.test(e)||/pin[_-]?(num(ber)?)?/.test(e)||/credit[_-]?card/.test(e)||/card[_-]?number/.test(e)||/cc[_-]?num(ber)?/.test(e)||/cvv/.test(e)||s.valid_cc(t)||/^\d{3}-\d{2}-\d{4}$/.test(t)||/social[_-]?(security)?[_-]?(num(ber)?)?/.test(e)))))},valid_cc:function(e){if(/[^0-9-\s]+/.test(e))return!1;if(String(e).length<12||String(e).length>19)return!1;var t=0,o=0,n=!1;e=e.replace(/\D/g,"");for(var i=e.length-1;i>=0;i--){var r=e.charAt(i);o=parseInt(r,10),n&&(o*=2)>9&&(o-=9),t+=o,n=!n}return t%10==0},upgradeCookies:function(){var e=[{name:"fx_matchtype",expire:1},{name:"fx_network",expire:1},{name:"fx_creative",expire:1},{name:"fx_keyword",expire:1},{name:"fx_placement",expire:1},{name:"fx_aceid",expire:1},{name:"fx_adposition",expire:1},{name:"mcfxVSID",
expire:this.dateModify(new Date,10,"minute")},{name:"utm_source",expire:1},{name:"utm_medium",expire:1},{name:"utm_segment",expire:1},{name:"utm_campaign",expire:1},{name:"fx_referrer",expire:7},{name:"fx_document_title",expire:0},{name:"fx_uuid",expire:730},{name:"fx_count",expire:730}],t=e.length;if(2!=this.getCookie("mcfxCookiesVersion")){for(var o=0;o<t;o++)this.getCookie(e[o].name)&&(value=this.getCookie(e[o].name),document.cookie=e[o].name+"="+value+"; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;",this.setCookie(e[o].name,value,e[o].expire));this.setCookie("mcfxCookiesVersion",2,730)}}};s.upgradeCookies(),s.register_load();var d={id:3556,originalId:3556,lateInit:false,url:"www.nxtbookmedia.com/",formMappings:[{"id":"5ed5493f5f736f696e71693a","selectBy":"attribute","selector":"3642_483135pi_3642_483135","leadType":"Contact"},{"id":"5ee7a9389853e06c8acbfd20","selectBy":"attribute","selector":"3642_483137pi_3642_483137","leadType":"Schedule A Demo"},{"id":"6015a91347dff15ecde0f49f","selectBy":"attribute","selector":"field[2]","leadType":"Schedule A Demo"}],features:{lmfx:true,ctfx:!0,recorder:false,reviews:false},Recorder:{enabled:false,captureInputs:false}},u=new t(d),c=new o(d),m=new i(d.Recorder),p=new r(d);return d.features.reviews&&p.fetch(),e(function(){1===parseInt(s.getQueryStringParams("mcfxdebug"))?s.ajax({type:"GET",url:("https:"==document.location.protocol?"https://":"http://")+"api.leadmanagerfx.com/js/mcfx/options/"+d.id,onComplete:function(e){formMappings=JSON.parse(e),u.setupForms(formMappings)}}):d.lateInit?setTimeout(function(){u.setupForms()},5e3):u.setupForms(),d.features.recorder&&m.start(),d.features.reviews&&p.render(),a.track(),window==top?setTimeout(function(){var e=document.querySelectorAll("iframe"),t=s.getUTMParams(),o={};t.forEach(function(e){o[e.key]=e.value}),o.referrer=s.get_referrer(),o=JSON.stringify(o),e.forEach(function(e){e.contentWindow.postMessage(o,"*")})},6e3):window.addEventListener("message",function(e){if(e.origin.replace(/https?:\/\//,"")==d.url){var t=JSON.parse(e.data);void 0!==t.referrer&&s.set_referrer(t.referrer),void 0!==t.utm_source&&s.setCookie("utm_source",t.utm_source,1),void 0!==t.utm_medium&&s.setCookie("utm_medium",t.utm_medium,1),void 0!==t.utm_segment&&s.setCookie("utm_segment",t.utm_segment,1),void 0!==t.utm_campaign&&s.setCookie("utm_campaign",t.utm_campaign,1)}},!1)}),{setClientId:function(e){d.id=e,u.settings.id=e,c.settings.id=e},restoreOriginalId:function(){d.id=d.originalId,u.settings.id=d.originalId,c.settings.id=d.originalId},getSessionId:function(){return s.getUserSession()},getUTMParams:function(){return s.getUTMParams()},Form:{getConfig:function(e){return void 0===e?u.settings.formMappings:u.settings.formMappings.find(function(t,o,n){return t.selector===e})},setup:function(e,t){u.setupForm(e,t)},submit:function(e){u.sendFormData(e)},rebindForm:function(e){var t=MCFX.Form.getConfig(e),o=u.getForm(t);o&&(u.setupForm(o,t),s.addEvent(o,"submit",u.onFormSubmit.bind(u)),u.forms.push(o))},rebindAll:function(){u.setupForms(MCFX.Form.getConfig())}},Recorder:{start:function(){m.start()},stop:function(){m.stop()},status:function(){return{capturing:m.capturing,paused:m.paused}}},Cookie:{get:function(e){return s.getCookie(e)},set:function(e,t,o){return s.setCookie(e,t,o)},delete:function(e){return s.deleteCookie(e)}},Settings:{get:function(){return d}},uuid:function(){return s.uuid4()},getFormConfig:function(e){return void 0===e?u.settings.formMappings:u.settings.formMappings.find(function(t,o,n){return t.selector===e})},setupFormData:function(e,t){u.setupForm(e,t)},submitForm:function(e){u.sendFormData(e)},getCookie:function(e){return s.getCookie(e)},setCookie:function(e,t,o){return s.setCookie(e,t,o)},deleteCookie:function(e){return s.deleteCookie(e)}}});