(function(){var prometheus=window.prometheus||{};prometheus.noop=function(){console.log('Noop called.')};prometheus.log=function(msg,css){if(css&&css!==''){try{console.log('%c'+msg,css)}catch(e){console.log(msg)}}else{console.log(msg)}};prometheus.get_timezone_name=function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){console.debug('Had to skip getting timezone name.')}};prometheus.appendTrackingToObject=function(data){if(data&&prometheus.tracking){data.pit_cookie=prometheus.tracking.cookie;data.pit_session=prometheus.tracking.session;data.pit_pagehit=prometheus.tracking.pagehit;data.pit_referrer=prometheus.tracking.referrer}
return data};prometheus.setElementValue=function(elem,val){try{elem.textContent=val}catch(e){}
try{elem.value=val}catch(e){}};prometheus.addEvent=function(element,eventName,callback){if(element.addEventListener){element.addEventListener(eventName,callback,!1)}else if(element.attachEvent){element.attachEvent('on'+eventName,callback)}};prometheus.readCookie=function(name){var nameEQ=name+'=';var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return null};prometheus.createCookieInHours=function(name,value,hours){var expires='';if(hours){var date=new Date();date.setTime(date.getTime()+(hours*60*60*1000));expires='; expires='+date.toGMTString()}
document.cookie=name+'='+value+expires+'; SameSite=None; Secure; path=/'};prometheus.sendAsyncBeacon=function(url,data){var data2=new URLSearchParams(data);if(navigator.sendBeacon)
navigator.sendBeacon(url,data2);else new Image().src=url+"?"+data2.toString()}
prometheus.sendAsyncForm=function(url,data){if(navigator.sendBeacon)
navigator.sendBeacon(url,data);else prometheus.ajaxform(url,data)}
prometheus.tryAppend=function(obj,errCallback){try{document.getElementsByTagName('script')[0].parentElement.appendChild(obj)}catch(e){if(errCallback)errCallback();}};prometheus.makeRef=function(tag,url){var iCB=document.createElement(tag);iCB.async=!0;iCB.src=url;return iCB};prometheus.callBackMessage=function(varname,value){parent.postMessage(varname+':'+value,'*')};prometheus.callBack=function(cb,varname,value){if(cb===''){return null}else if(cb.indexOf('/')===-1){prometheus.callBackMessage(cb,value)}else{if(cb.indexOf('@'+varname+'@')!==-1){prometheus.tryAppend(prometheus.makeRef('script',cb.replace('@'+varname+'@',value)))}else if(cb.indexOf('?')!==-1){prometheus.tryAppend(prometheus.makeRef('script',cb+'&'+varname+'='+value))}else{prometheus.tryAppend(prometheus.makeRef('script',cb+'?'+varname+'='+value))}}};prometheus.iFrame=function(url){var f=document.createElement('iframe');f.title='prometheus';f.setAttribute('lazyload','off');f.style.position='absolute';f.style.visibility='hidden';f.style.display='none';f.style.width='0px';f.style.height='0px';f.style.padding='0px';f.style.border='none';f.src=url;document.body.appendChild(f)};prometheus.trySetById=function(id,value){try{var x=document.getElementById(id);if(!x)return;try{x.value=value}catch(e2){}
try{x.innerText=value}catch(e2){}}catch(e){}};prometheus.ajaxget=function(url,cb){prometheus._ajaxreal(url,null,cb,null,"GET")}
prometheus.ajaxform=function(url,contents,cb){prometheus._ajaxreal(url,contents,cb,"application/x-www-form-urlencoded","POST")}
prometheus.ajaxjson=function(url,contents,cb){prometheus._ajaxreal(url,contents,cb,"application/json","POST")}
prometheus._ajaxreal=function(url,contents,cb,contentType,method){if(!method||method==='')method="POST";if(window.fetch){let req={method:method,mode:"cors",body:contents,cache:"no-cache",credentials:"include",referrerPolicy:"unsafe-url",headers:{},};if(contentType)
req.headers["Content-Type"]=contentType;if(cb)
fetch(url,req).then(p=>p.json()).then(function(p){cb(p)}).catch(function(err){console.log(err)});else fetch(url,req).then(p=>p.text()).catch(function(err){console.log(err)})}else{var xhr=new XMLHttpRequest();if('withCredentials' in xhr){xhr.withCredentials=!0;xhr.open(method,url,!0);if(contentType)
xhr.setRequestHeader('Content-Type',contentType);}else if(typeof XDomainRequest!='undefined'){xhr=new XDomainRequest();xhr.open(method,url);if(contentType)
xhr.setRequestHeader('Content-Type',contentType);}else{var newurl=url+(url.indexOf('?')===-1?'?':'&')+contents;if(newurl.length>4000)newurl=newurl.substring(0,4000);method="GET";xhr.open(method,newurl);contents=null}
if(cb)
xhr.onload=function(){if(xhr.status===200)cb(JSON.parse(xhr.responseText));else if(xhr.status>=400)console.error('PIT AJAX call failed: '+url);};if(contents&&contents!=='')
xhr.send(contents);else xhr.send()}};prometheus.storeEvent=function(eventName,refId,value){var eventUrl=prometheus.baseurl+'/event';eventUrl+='?event='+eventName;if(prometheus.tracking.pagehit)eventUrl+='&pagehit='+prometheus.tracking.pagehit;if(refId&&refId!=='')eventUrl+='&refid='+encodeURIComponent(refId);if(value&&value!=='')eventUrl+='&value='+encodeURIComponent(value);prometheus.loadTag(document,'script','',eventUrl)};prometheus.addToFormArray=function(array,key,value){array.push(encodeURIComponent(key)+'='+encodeURIComponent(value));return array};prometheus.formatArrayToForm=function(array){var ret='';prometheus.forEach(Object.keys(array),function(key){var val=array[key];if(val&&val!==''){if(ret.length>0)ret+='&';ret+=encodeURIComponent(key)+'='+encodeURIComponent(val)}});return ret};prometheus.formatObjectToForm=prometheus.formatArrayToForm;prometheus.saveExternalRef=function(refid){var pit=window.prometheus;var url='/syncref?pagehit='+pit.tracking.pit_pagehit;url+='&refid='+encodeURIComponent(refid);pit.ajaxget(pit.baseurl+url)};prometheus.saveKnownAs=function(system_name,id_type,id_value){var pit=window.prometheus;if(!pit.tracking||!pit.tracking.session||!pit.tracking.pagehit){setTimeout(function(){pit.saveKnownAs(system_name,id_type,id_value)},2000);return}
if(!system_name||system_name==='')return;if(!id_type||id_type==='')id_type='id';if(!id_value||id_value==='')return;var url='/sync204?phid='+pit.tracking.pagehit;url+='&s='+pit.tracking.session;if(pit.tracking.cookie)url+='&c='+pit.tracking.cookie;url+='&remote_system='+encodeURIComponent(system_name);url+='&remote_id_type='+encodeURIComponent(id_type);url+='&remote_id='+encodeURIComponent(id_value);pit.ajaxget(pit.baseurl+url);return id_value};prometheus.get_from_data_layer=function(key,callback){window.dataLayer=window.dataLayer||[];window.dataLayer.push(function(){var value=this.get(key);if(value)callback(key,value);})};prometheus.watched_data_layer=prometheus.watched_data_layer||{};prometheus.watch_for_data_layer=function(key,waitForKey){var pit=window.prometheus;pit.get_from_data_layer(key,function(key,value){if(!value||!pit.saveKnownAsJson)return;pit.watched_data_layer.yes=!0;pit.watched_data_layer[key]=value;pit.saveKnownAsJson('google-dataLayer',key,value);if(waitForKey&&waitForKey!==''&&(!pit.watched_data_layer[waitForKey]||pit.watched_data_layer[waitForKey]===''))
setTimeout(function(){pit.watch_for_data_layer(key,waitForKey)},1000)})};prometheus.saveKnownAsJson=function(system_name,prefix,obj){var pit=window.prometheus;if(!pit.tracking||!pit.tracking.session||!pit.tracking.pagehit){setTimeout(function(){pit.saveKnownAsJson(system_name,prefix,obj)},2000);return}
if(!system_name||system_name==='')return;var url='/syncjson?phid='+pit.tracking.pagehit;url+='&s='+pit.tracking.session;if(pit.tracking.cookie)url+='&c='+pit.tracking.cookie;url+='&remote_system='+encodeURIComponent(system_name);if(prefix&&prefix!=='')url+="&remote_id_prefix="+prefix;pit.ajaxjson(pit.baseurl+url,JSON.stringify(obj));return id_value};prometheus.trySetByClass=function(className,value){try{var x=document.getElementsByClassName(className);var i;for(i=0;i<x.length;i++){try{x[i].value=value}catch(e2){}
try{x[i].innerText=value}catch(e2){}}}catch(e){}};prometheus.trySetBySelector=function(selectorMatch,value){try{var x=document.querySelectorAll(selectorMatch);var i;for(i=0;i<x.length;i++){try{x[i].value=value}catch(e2){}
try{x[i].innerText=value}catch(e2){}}}catch(e){}};prometheus.trySetByName=function(className,value){try{var x=document.getElementsByName(className);var i;for(i=0;i<x.length;i++){try{x[i].value=value}catch(e2){}
try{x[i].innerText=value}catch(e2){}}}catch(e){}};prometheus.passIdAlong=function(suffix,id,skipMessage){prometheus.trySetById('pit_'+suffix,id);prometheus.trySetById('evercookie_'+suffix,id);prometheus.trySetByClass('pit_'+suffix,id);prometheus.trySetByClass('evercookie_'+suffix,id);prometheus.trySetByName('pit_'+suffix,id);prometheus.trySetByName('evercookie_'+suffix,id);prometheus.trySetBySelector('[title="pit_'+suffix+'"]',id);if(!skipMessage)prometheus.callBackMessage('pit_'+suffix,id);prometheus.tracking=prometheus.tracking||{};switch(suffix){case 'cookie':prometheus.tracking.cookie=id;break;case 'session':prometheus.tracking.session=id;break;case 'pagehit':prometheus.tracking.pagehit=id;break}};prometheus.findTrackingPinId_getId=function(){var list=document.getElementsByTagName('script');for(idx=0;idx<list.length;idx++){var val=list[idx].innerText;var n=val.indexOf('_paq.push([\"setSiteId\",');if(n==-1){n=val.indexOf("_paq.push(['setSiteId',")}
if(n!=-1){n+='_paq.push([\"setSiteId\",'.length;foundId=val.substr(n,100).split(']')[0];foundId=foundId.replace(/"/g,'');return foundId}}
return null};prometheus.findTrackingPinId=function(){try{if(prometheus.readCookie('trackingpin_sync')==null){foundId=prometheus.findTrackingPinId_getId();if(foundId&&foundId!=''){foundId=foundId.replace(/\D/g,'');console.info('Prometheus found trackingpin site: '+foundId);var date=new Date();date.setTime(date.getTime()+(1*24*60*60*1000));var expires=date.toGMTString();document.cookie='trackingpin_sync=1; expires='+expires+'; path=/';return foundId}}}catch(e){console.warn(e)}};prometheus.loadTag=function(doc,tag,id,url){if(id&&id!==''&&doc.getElementById(id))return;var first=doc.getElementsByTagName(tag)[0];e=doc.createElement(tag);if(id&&id!=='')e.id=id;e.async=!0;e.src=url;if(first&&first.parentNode)first.parentNode.insertBefore(e,first);else doc.body.appendChild(e)};prometheus.forEach=function(arr,func){Array.prototype.filter.call(arr,func)};prometheus.getTagMatchContent=function(tag,matchProp,matchValue,retProp){var ret='';try{prometheus.forEach(document.getElementsByTagName(tag),function(i){if(i.getAttribute(matchProp)===matchValue)ret=i.getAttribute(retProp);})}catch(e){}
return ret};prometheus.getMetaTagPropertyContent=function(name){return prometheus.getTagMatchContent('meta','property',name,'content')};prometheus.getMetaTagNameContent=function(name){return prometheus.getTagMatchContent('meta','name',name,'content')};prometheus.parseQueryString=function(url,prefix){var query={};var urlparts=url.toString().split('?');if(urlparts.length>=2){var pars=urlparts[1].split('&');for(var i=pars.length;i-->0;){var kv=pars[i].split('=');if(!prefix||prefix===''||kv[0].lastIndexOf(prefix,0)===0){query[decodeURIComponent(kv[0])]=decodeURIComponent(kv[1]||'')}}}
return query};prometheus.buildQueryString=function(obj){var parts=[];for(var i in obj){if(obj.hasOwnProperty(i)){parts.push(encodeURIComponent(i)+'='+encodeURIComponent(obj[i]))}}
return parts.join('&')};prometheus.pin_fix_a_href_tag=function(tag,topQuery){let url=tag.getAttribute('href');if(url&&url.length&&url.substring(0,1)!=='#'&&tag.onclick===null&&(url.length<7||url.substring(0,7)!=='mailto:')&&(url.length<11||url.substring(0,11)!=='javascript:')&&(url.length<4||url.substring(0,4)!=='tel:')&&!url.includes('//ads.')){var urlhash='';if(url.indexOf('#')>0){urlhash=url.substring(url.indexOf('#'),url.length);url=url.substring(0,url.indexOf('#'))}
var query={};if(url.lastIndexOf('?')!==-1){query=prometheus.parseQueryString(url,'');url=url.substring(0,url.indexOf('?'))}
if(!query.utm_content||query.utm_content===''){var thetext=tag.innerText;if(thetext&&thetext.length&&thetext.length>100)thetext=thetext.substr(0,100);query.utm_content=thetext}
for(var k in topQuery){if(topQuery.hasOwnProperty(k)){query[k]=topQuery[k]}}
tag.href=url+'?'+prometheus.buildQueryString(query)+urlhash}
return tag};window.prometheus=prometheus;window.prometheus=window.prometheus||{};window.prometheus.tracking=window.prometheus.tracking||{};window.prometheus.tracking.max_scroll_y=0;window.prometheus.session_hours=parseInt('6');window.prometheus.foundEmails=window.prometheus.foundEmails||[];window.prometheus.captureFoundEmails=function(){var pit=window.prometheus;try{var arr=Array.from(document.getElementsByTagName('input'));arr.forEach(function(input){if(input.value&&input.value!==''&&input.value.indexOf('@')>-1&&input.value.indexOf('.')>input.value.indexOf('@')&&!pit.foundEmails.includes(input.value)){pit.foundEmails.push(input.value);pit.sync_email(input.value)}})}catch(e){console.warn(e)}};window.prometheus.setupFormCapture=function(){var pit=window.prometheus;try{var arr=Array.from(document.getElementsByTagName('input'));arr.forEach(function(input){input.onblur=pit.captureFoundEmails})}catch(e){console.warn(e)}};window.prometheus.saveTimings=function(){var pit=window.prometheus;pit.timing_data={navigation:performance.getEntriesByType("navigation"),resource:performance.getEntriesByType("resource"),mark:performance.getEntriesByType("mark"),measure:performance.getEntriesByType("measure"),paint:performance.getEntriesByType("paint"),frame:performance.getEntriesByType("frame"),};pit.ajaxjson(pit.baseurl+'/store_timings?ph='+pit.tracking.pagehit,JSON.stringify(pit.timing_data))};window.prometheus.repopulateForms=function(){pit.passIdAlong('cookie',window.prometheus.tracking.cookie,!0);pit.passIdAlong('session',window.prometheus.tracking.session,!0);pit.passIdAlong('pagehit',window.prometheus.tracking.pagehit,!0);pit.passIdAlong('referrer',window.prometheus.tracking.referrer,!0)};window.prometheus.pitinit_setTimezone=function(value){var pit=window.prometheus;pit.timezone=value;console.info('Prometheus timezone: '+value)}
window.prometheus.disable_ipv6_cookie=function(){window.prometheus.createCookieInHours("disable_ipv6","1")};window.prometheus.pitinit_saveCookie=function(value){var pit=window.prometheus;if(value.indexOf('-')===-1){value=value.slice(0,8)+'-'+value.slice(8,12)+'-'+value.slice(12,16)+'-'+value.slice(16,20)+'-'+value.slice(20,value.length+1)}
console.info('Prometheus cookie: '+value);pit.tracking.cookie=value;pit.tracking.pit_cookie=value;pit.createCookieInHours('pit_cookie',value,24*365);pit.passIdAlong('cookie',value);try{document.querySelectorAll("[data-export='sys:field:pin_id']").forEach(function(div){var id=div.getAttribute('data-id');pit.trySetById('form_'+id,value)})}catch(e){console.log(e)}
var url=pit.baseurl+'/store_cookie';url+='?pit_cookie='+value;url+='&id1='+pit.tracking.pagehit;if(pit.tracking.pagehit_ref)url+='&id2='+pit.tracking.pagehit_ref;pit.tryAppend(pit.makeRef('script',url));if(!pit.disable_ipv6||pit.disable_ipv6!=='1'&&pit.readCookie('disable_ipv6')===null){var url=pit.baseurl_ipv6+'/store_ipv6';url+='?pit_cookie='+value;url+='&id1='+pit.tracking.pagehit;if(pit.tracking.pagehit_ref)url+='&id2='+pit.tracking.pagehit_ref;pit.tryAppend(pit.makeRef('script',url),pit.disable_ipv6_cookie)}
var iPid=pit.findTrackingPinId();if(iPid&&0!==iPid.length&&'null'!==iPid&&pit.readCookie('pit_tpsync')===null){console.info('Prometheus-TrackingPIN sync: '+iPid);var url=pit.tpinbaseurl+'/tpin.php?cookie=1&rec=1';url+='&uid='+value;url+='&idsite='+iPid;url+='&url='+encodeURIComponent(window.location.href);pit.tryAppend(pit.makeRef('img',url));pit.createCookieInHours('pit_tpsync','1',pit.session_hours)}
if(window._paq)try{window._paq.push(['setUserId',value])}catch(e){console.debug(e)}
if(pit.cookie_loaded)pit.cookie_loaded();};window.prometheus.pitinit_saveSession=function(value){var pit=window.prometheus;console.info('Prometheus session id: '+value);pit.tracking.session=value;pit.tracking.pit_session=value;pit.createCookieInHours('pit_session',value,pit.session_hours);pit.passIdAlong('session',value);if(pit.session_loaded)pit.session_loaded();};window.prometheus.pitinit_savePagehit=function(value,value_ref,ipv4){var pit=window.prometheus;console.info('Prometheus page hit id: '+value);console.info('Your IP is '+ipv4);pit.tracking.pagehit=value;pit.tracking.ipv4=ipv4;pit.tracking.pit_pagehit=value;if(value_ref)pit.tracking.pagehit_ref=value_ref;pit.createCookieInHours('pit_lastknown_pagehit',value,6);pit.passIdAlong('pagehit',value);pit.passIdAlong('ipaddress',ipv4);if(pit.pagehit_loaded)pit.pagehit_loaded();if(pit.myJson&&pit.myJson.captureWindow){try{pit.myJson.captureWindow()}catch(e){console.warn(e)}}};window.prometheus.pitinit_processEvent=function(event){if(Object.prototype.toString.call(event.data)!=='[object String]')return;if(event.data.lastIndexOf('pit_detected_cookie',0)!==0)return;var value=event.data.substring('pit_detected_cookie'.length+1);window.prometheus.pitinit_saveCookie(value)};window.prometheus.pitinit_trackpagetime=function(){try{var pit=window.prometheus;pit.window_timer=pit.window_timer||0;pit.window_timer+=10;if(pit.window_timer%60===0){var url=pit.baseurl+'/pagetimer';url+='?id1='+pit.tracking.pagehit;url+='&maxYPos='+pit.tracking.max_scroll_y;url+='&time='+pit.window_timer;new Image().src=url}}catch(e){console.warn(e)}};window.prometheus.track_y_pos=function(){var pit=window.prometheus;if(document.body.scrollTop&&document.body.scrollTop>pit.tracking.max_scroll_y){pit.tracking.max_scroll_y=document.body.scrollTop}
if(document.documentElement.scrollTop&&document.documentElement.scrollTop>pit.tracking.max_scroll_y){pit.tracking.max_scroll_y=document.documentElement.scrollTop}};window.prometheus.sync_dspcen=function(pagehit_id){var pit=window.prometheus;var theirUrl='https://pixel-sync.sitescout.com/connectors/pinbn/usersync?redir=';var ourUrl=window.prometheus.baseurl+'/syncjs?phid='+pagehit_id;ourUrl+='&remote_system=DSPCEN&remote_id={userId}';pit.tryAppend(pit.makeRef('script',theirUrl+encodeURIComponent(ourUrl)))};window.prometheus.sync_3rdparty=function(pagehit_id){var pit=window.prometheus;if(window.CallTrkSwap&&window.CallTrkSwap.getSessionID){var url=pit.baseurl+'/syncjs?s='+pit.tracking.session;url+='&c='+pit.tracking.cookie;url+='&phid='+pit.tracking.pagehit;url+='&remote_system=pincalls';url+='&remote_id='+window.CallTrkSwap.getSessionID();pit.tryAppend(pit.makeRef('script',url))}};window.prometheus.sync_email=function(email){var pit=window.prometheus;var url=pit.baseurl+'/sync204';var data={remote_system:"Email",remote_id_type:"Email",remote_id:email,phid:pit.tracking.pagehit,s:pit.tracking.session,c:pit.tracking.cookie,};pit.sendAsyncBeacon(url,data)}
window.prometheus.pitinit_beforeUnload=function(){window.prometheus=window.prometheus||{};var pit=window.prometheus;pit.window_timer=pit.window_timer||0;console.log('Prometheus window timer: '+pit.window_timer);if(pit.window_timer&&pit.window_timer>0){var url=pit.baseurl+'/pagetimer';var data={id1:pit.tracking.pagehit,maxYPos:pit.tracking.max_scroll_y,time:pit.window_timer,};pit.sendAsyncBeacon(url,data)}
var firstNameFields=['first_name','firstname','first','first name'];var lastNameFields=['last_name','lastname','last','last name'];var fullNameFields=['fullname','full name','full_name','name'];var aa=document.getElementsByTagName('input');for(var i=0,len=aa.length;i<len;i++){try{var name=aa[i].name.toLowerCase();var val=aa[i].value;if(val&&val.indexOf('@')!==-1&&val.lastIndexOf('.')>val.indexOf('@')+1){pit.sync_email(val)}else if(val&&name&&fullNameFields.indexOf(name)!==-1){}else if(val&&name&&firstNameFields.indexOf(name)!==-1){}else if(val&&name&&lastNameFields.indexOf(name)!==-1){}}catch(e){console.warn(e)}}};window.prometheus.pitinit_tracking_outlink=function(link){var pit=window.prometheus;if(link.href&&link.href.length&&link.href.substring(0,1)!=='#'&&link.href.substring(0,4)==='http'&&link.href.indexOf('#')===-1&&(link.href.length<11||link.href.substring(0,11).toLowerCase()!='javascript:')&&link.hostname!==window.location.hostname){pit.addEvent(link,'click',function(ev){var query=[];query.c=pit.company_id;if(pit.tracking){if(pit.tracking.pagehit)query.ph=pit.tracking.pagehit;if(pit.tracking.cookie)query.ec=pit.tracking.cookie;if(pit.tracking.session)query.s=pit.tracking.session}
query.u=ev.target.href;new Image().src=pit.baseurl+'/track?'+pit.buildQueryString(query)})}};window.prometheus.pitinit_tracking_itp=function(link){var pit=window.prometheus;if(link.href&&link.href.length&&link.href.substring(0,1)!=='#'&&link.href.indexOf('#')===-1&&(link.href.length<11||link.href.substring(0,11).toLowerCase()!='javascript:')){link.onclick=null;pit.addEvent(link,'click',function(ev){var query=[];query.c=pit.company_id;if(pit.tracking){if(pit.tracking.pagehit)query.ph=pit.tracking.pagehit;if(pit.tracking.cookie)query.ec=pit.tracking.cookie;if(pit.tracking.session)query.s=pit.tracking.session}
query.u=ev.target.href;ev.target.href=pit.baseurl+'/r?'+pit.buildQueryString(query);pit.createCookieInHours('pit_itp','1',pit.session_hours)})}};window.prometheus.pitinit_tracking=function(){var pit=window.prometheus;pit.tracking=pit.tracking||{};if(!pit.disable_timings||pit.disable_timings!=='1')
try{pit.saveTimings()}catch(e){console.warn(e)}
pit.tracking.itp_mode='normal';if(navigator.vendor.indexOf('Apple')>-1){if(pit.readCookie('pit_itp')!==null){pit.tracking.itp_mode='skipped'}else if(pit.itp_override&&pit.itp_override==='no_itp'){pit.tracking.itp_mode='skipping';pit.createCookieInHours('pit_itp','1',pit.session_hours)}else{pit.tracking.itp_mode='itp'}}
console.info('PIT ITP Mode: '+pit.tracking.itp_mode);pit.callBackMessage('pit_itp_mode',pit.tracking.itp_mode);var aa=document.getElementsByTagName('a');for(var i=0,len=aa.length;i<len;i++){try{pit.tracking.itp_mode==='itp'?pit.pitinit_tracking_itp(aa[i]):pit.pitinit_tracking_outlink(aa[i])}catch(e){console.warn(e)}}};window.prometheus.start_fp=function(){var pit=window.prometheus;pit.loadTag(document,'script','pit-fp-script',pit.baseurl+'/fp?fp='+(pit.tracking.fp2||''))};window.prometheus.pitinit_loaded=function(response){var pit=window.prometheus;pit.tracking=pit.tracking||{};pit.pitinit_savePagehit(response.pagehit,response.pagehit_ref,response.ipv4);pit.pitinit_saveSession(response.session);if(response.cookie&&response.cookie!=='')pit.pitinit_saveCookie(response.cookie);if(response.geo&&response.geo.timezone&&response.geo.timezone!=='')pit.pitinit_setTimezone(response.geo.timezone);pit.sync_dspcen(response.pagehit);pit.addEvent(window,'message',pit.pitinit_processEvent);pit.addEvent(window,'beforeunload',pit.pitinit_beforeUnload);setInterval(pit.pitinit_trackpagetime,10000);setTimeout(pit.sync_3rdparty,3000);if(!response.nocaptureemails){setInterval(pit.captureFoundEmails,5000);pit.setupFormCapture()}
pit.addEvent(window,'scroll',pit.track_y_pos);if(!pit.tracking.cookie||pit.tracking.cookie==='')pit.iFrame(pit.baseurl+'/frame');if(!response.nofp&&!pit.no_fp){if(pit.fptime&&pit.fptime>0)
setTimeout(function(){pit.start_fp()},pit.fptime*1000);else pit.start_fp()}
if(document.readyState==='complete')pit.pitinit_tracking();else window.addEventListener('DOMContentLoaded',function(){window.prometheus.pitinit_tracking()})};window.prometheus.pit_newpage=function(url){var pit=window.prometheus;pit.tracking.referrer=pit.tracking.url;pit.tracking.url=url;var url=window.prometheus.get_hit_url();pit.ajaxform(url,pit.formatObjectToForm(pit.tracking),window.prometheus.pit_newpage_loaded)};window.prometheus.pit_newpage_loaded=function(response){window.prometheus.pitinit_savePagehit(response.pagehit,response.pagehit_ref)};window.prometheus.get_hit_url=function(){var pit=window.prometheus;var url=pit.baseurl+'/hit?v=2';url+='&c='+encodeURIComponent(pit.company_id);if(pit.tracking.session)url+='&_s='+encodeURIComponent(pit.tracking.session);if(pit.tracking.cookie)url+='&_c='+encodeURIComponent(pit.tracking.cookie);url+='&_u='+encodeURIComponent(pit.tracking.url);url+='&_r='+encodeURIComponent(pit.tracking.referrer);if(url.length>2000)url=url.substring(0,2000);return url};window.prometheus.mousetracker_log=function(log){let pit=window.prometheus;var url=pit.baseurl+'/mouselog?phid='+pit.tracking.pagehit;if(log&&log!=='')pit.ajaxjson(url,log);};window.prometheus.mousetracker_full=function(log){if(window.prometheus.mousetracker_periodic_ref){clearInterval(window.prometheus.mousetracker_periodic_ref);window.prometheus.mousetracker_periodic_ref=null}
window.prometheus.mousetracker_log(log)};window.prometheus.mousetracker_periodic=function(){if(window.mousetracker&&window.mousetracker.getData&&window.mousetracker.hasData&&window.mousetracker.hasData()){window.prometheus.mousetracker_log(window.mousetracker.getData())}};window.prometheus.initDone=window.prometheus.initDone||!1;window.prometheus.mainInit=function(){var pit=window.prometheus;if(pit.initDone)return;pit.initDone=!0;if(!pit.baseurl||pit.baseurl==='')pit.baseurl='https://pit.ourcommunitynow.com/pit';if(!pit.baseurl_ipv6||pit.baseurl_ipv6==='')pit.baseurl_ipv6='https://ipv6.pitai.io/pit';if(!pit.query||pit.query==='')pit.query='c=b0ae8c1d-c220-4267-b3d1-83836bee1d32&force_itp=2&fpdelay=10';if(!pit.force_itp||pit.force_itp==='')pit.force_itp='2';if(!pit.no_fp||pit.no_fp==='')pit.no_fp='';if(!pit.fptime||pit.fptime==='')pit.fptime='';if(!pit.disable_ipv6||pit.disable_ipv6==='')pit.disable_ipv6='';if(!pit.disable_timings||pit.disable_timings==='')pit.disable_timings='';if(!pit.company_id||pit.company_id==='')pit.company_id='b0ae8c1d-c220-4267-b3d1-83836bee1d32';if(!pit.itp_override||pit.itp_override==='')pit.itp_override='allow_itp';if(!pit.tpinbaseurl||pit.tpinbaseurl==='')pit.tpinbaseurl='://tpin.';pit.tracking=pit.tracking||{};pit.tracking.url=document.location.href;pit.tracking.referrer=document.referrer;pit.tracking.session=pit.readCookie('pit_session');pit.tracking.cookie=pit.readCookie('pit_cookie');pit.tracking.tzoffset=(new Date().getTimezoneOffset());pit.tracking.tzname=pit.get_timezone_name();pit.tracking.gpc=!!navigator.globalPrivacyControl;pit.tracking.page_height=window.innerHeight;pit.tracking.page_title=document.title;if(window.screen){pit.tracking.screen_width=window.screen.width;pit.tracking.screen_height=window.screen.height}
pit.tracking.window_width=window.innerWidth;pit.tracking.window_height=window.innerHeight;pit.tracking.num_dom_elements=document.getElementsByTagName('*').length;var url=pit.get_hit_url();if(document.referrer&&document.referrer!==''){try{pit.passIdAlong('referrer',document.referrer)}catch(e){console.warn(e)}}
pit.ajaxform(url,pit.formatObjectToForm(pit.tracking),window.prometheus.pitinit_loaded);if(window.mousetracker&&window.mousetracker.setup){window.mousetracker.setup(pit.mousetracker_full);pit.mousetracker_periodic_ref=setInterval(pit.mousetracker_periodic,30000)}};if(document.readyState==='complete')window.prometheus.mainInit();else{window.addEventListener('DOMContentLoaded',function(){window.prometheus.mainInit()});setTimeout(function(){window.prometheus.mainInit()},3000)};})();