const pageSlug=window.location.pathname.split("/").length>3?window.location.pathname.split("/")[1].concat("-",window.location.pathname.split("/")[2]):window.location.pathname.split("/")[1];TimeMe.initialize({currentPageName:pageSlug,idleTimeoutInSeconds:30});const sendBiEvent=(e,t)=>{const n=`${lushaLinks.config.api_services}${t}`,a=new Blob([JSON.stringify(e)],{type:"application/json"});document.body.classList.contains("logged-in")||navigator.sendBeacon(n,a)},sendData=(e,t)=>{const n=window.location.pathname,a=document.referrer,o=DOMPurify.sanitize(a),i=window.visitorId||null,s=window.retrievedIp,r=TimeMe.getTimeOnCurrentPageInSeconds(),l=getSid();let{eventType:c=null,eventValue:u=null,eventExternalKey:m=null,eventAdditionalInfo:d=null,email:p=null,utmMedium:f=null,utmSource:h=null,utmCampaign:g=null,utmContent:v=null,utmTerm:w=null,eventTriggerType:y=null,subPlatform:b=null,product:k=null,platform:_=null}=e;const C="user@anonymous-user.com"!==e.email?hashEmail(p):null,x="user@anonymous-user.com"!==e.email?getDomainFromEmail(e.email):null;b=e.subPlatform?e.subPlatform:"marketing_growth",k=e.product?e.product:"marketing_site",_=e.platform?e.platform:"lusha_website";const T={platform:_,product:k,subPlatform:b,pageUrl:n,eventType:c,eventValue:u,eventExternalKey:m,eventAdditionalInfo:d,eventDuration:r,prevPageUrl:o,utmMedium:f,utmSource:h,utmCampaign:g,utmContent:v,utmTerm:w,sessionId:l,email:p,hashedEmail:C,teamName:"marketing",visitorId:i,ip:s,userId:-1,domain:x,eventTriggerType:y},$=0!==Object.keys(userPlan).length?"v4/user-events":"v4/user-events/anonymous",S=`${lushaLinks.config.api_services}${$}`,I=new Blob([JSON.stringify(T)],{type:"application/json"});document.body.classList.contains("logged-in")||(i?navigator.sendBeacon(S,I):setTimeout((()=>sendData({eventType:c,eventValue:u,eventExternalKey:m,eventAdditionalInfo:d,utmMedium:f,utmSource:h,utmCampaign:g,utmContent:v,utmTerm:w,email:p,eventTriggerType:y,subPlatform:b,platform:_,product:k},t)),1e3))};function randomInteger(e,t){return Math.floor(Math.random()*(t-e+1))+e}!function(e){var t;pageSlug&&(t=pageSlug,t.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g,(function(e,t){return t.toUpperCase()}))),window.location.hostname;e(document).on("click",".btn.js-contact-form-btn",(function(t){t.preventDefault();const n=e(this).data("position")?e(this).data("position"):null,a=userPlan.email||"user@anonymous-user.com";sendData({eventType:"website_contact_sales_click",eventValue:n,email:a})})),e(document).on("click","button.cf7mls_next",(function(t){t.preventDefault();const n=e(this).attr("id").match(/step-\d+/),a=n?n[0]:null,o=userPlan.email||"user@anonymous-user.com";sendData({eventType:"website_contact_sales_step",eventValue:a,email:o})})),document.addEventListener("wpcf7mailsent",(function(t){if("10310"!==t.detail.contactFormId){const n="website_contact_sales_submit",a=e(`#popupFormContact_${t.detail.contactFormId} input[name=submissionId]`).val(),o=t.detail.inputs,i={};o.forEach((e=>{i[e.name]=e.value})),i.workemail=void 0;const s=t.detail.inputs.find((e=>"workemail"===e.name)).value,r=hashEmail(s);i.hashedEmail=r,sendData({eventType:n,eventExternalKey:a,eventAdditionalInfo:i,email:s})}})),e(document).on("click","a.login",(function(e){const t=userPlan.email||"user@anonymous-user.com";sendData({eventType:"website_login_click",email:t})})),e(document).on("click","a.dashboard",(function(e){const t=userPlan.email;sendData({eventType:"website_myaccount_click",email:t})})),e(document).on("click","a.signup",(function(e){const t=userPlan.email||"user@anonymous-user.com";sendData({eventType:"website_marketing_start_for_free_click",email:t})}));const n={25:!1,50:!1,75:!1};window.addEventListener("scroll",(function(){const e="website_scrolling",t=userPlan.email||"user@anonymous-user.com",a=(document.documentElement.scrollTop+window.innerHeight)/document.documentElement.scrollHeight*100;let o;a>=25&&!n[25]?(o="25",n[25]=!0,sendData({eventType:e,eventValue:o,email:t})):a>=50&&!n[50]?(o="50",n[50]=!0,sendData({eventType:e,eventValue:o,email:t})):a>=75&&!n[75]&&(o="75",n[75]=!0,sendData({eventType:e,eventValue:o,email:t}))}));document.visibilityState;document.addEventListener("visibilitychange",(function(){if("hidden"===document.visibilityState){const e="website_page_exit",t=userPlan.email||"user@anonymous-user.com";sendData({eventType:e,email:t})}}))}(jQuery),$((()=>{const e=$(document);$(window);let t=window.location.pathname.replace("lusha/","");t="/"===t||""===t?"home":t.replace(/\//g,"");const n=window.location.href,a={};new URLSearchParams(window.location.search.slice(1)).forEach(((e,t)=>{a[t]=decodeURIComponent(e)}));e.ready((()=>{$(".wpcf7-intl-tel").on("keypress",(e=>8===e.charCode||0===e.charCode||13===e.charCode?null:e.charCode>=48&&e.charCode<=57)),$(".wpcf7-submit").on("click",(function(e){const t=$(this).closest("form");t.find(".wpcf7-not-valid-tip").remove(),t.find(".wpcf7-not-valid").removeClass("wpcf7-not-valid");let n=!1;const a=t.find('[name="workemail"]');if(a.length>0){const e=o(a.val()),t=i(a.val());if(!e)return n=!0,l(a,"The e-mail address entered is invalid."),!1;if(!t)return n=!0,l(a,"Oops, that's not a valid work email account. Please enter your work email (e.g. you@yourcompany.com)"),!1;c(a)}if(!n)return!0}));let e="",a="";const s=$('');let r;function l(e,t){const n=e.siblings(".wpcf7-not-valid-tip");e.addClass("wpcf7-not-valid"),n.length>0?n.text(t):$(`${t}`).insertAfter(e)}function c(e){const t=e.siblings(".wpcf7-not-valid-tip"),n=e.closest("form").find(".wpcf7-response-output");e.removeClass("wpcf7-not-valid"),t.remove(),n.hide()}$(".registration").submit((function(l){l.preventDefault();const c=$(this),u=c.find('input[type="email"]'),m=c.find('input[name="searched_company"]').val(),d=c.find('input[name="searched_company_domain"]').val(),p=c.find('input[name="prospecting_industry"]').val(),f=c.find('input[name="prospecting_country"]').val(),h=c.find('input[name="searched_person"]').val(),g=u.val(),v=this.className,w=this.querySelector('button[type="submit"]'),y=v.includes("adblock-detected")?"true":"false",b=w.value,k=w.offsetWidth+1,_=v.includes("form-with-popup")?1:-1;switch(r=v.includes("owler")?`${lushaLinks.config.app_auth}/signup?lp=owler&returnUrl=www.owler.com&`:v.includes("form-with-popup")?`${lushaLinks.config.app_auth}/signup?iframe&fullLayout&`:`${lushaLinks.config.app_auth}/signup?`,u.length&&(e=`email=${encodeURIComponent(g)}&page=${encodeURIComponent(t)}&source=plugin&fullurl=${encodeURIComponent(n)}&adblock=${y}`),t){case"chrome-extension":a="&product_id=1";break;case"api":a="&product_id=2";break;case"integrations":a="&product_id=3";break;case"salesforce":a="&product_id=4"}m&&(e+=`&searchedCompany=${encodeURIComponent(m)}`),d&&(e+=`&lookingFor=${encodeURIComponent(d)}`),h&&(e+=`&searchedPerson=${encodeURIComponent(h)}`),p&&(e+=`&prospectingIndustry=${encodeURIComponent(p)}`),f&&(e+=`&prospectingCountry=${encodeURIComponent(f)}`),e+=a,c.removeClass("form-error"),u.removeClass("not-valid"),c.find("span.error").remove(),c.addClass("loading");w.style.width=`${k}px`,w.disabled=!0,w.innerHTML='',e=decodeURIComponent(e);const C=o(g),x=i(g);return C?x?void $.ajax({type:"post",url:ajaxurl,dataType:"json",data:{action:"email_validation",querystring:e}}).done((t=>{const n=t.encrypted?`${r}data=${t.encrypted}`:r+e;window.dataLayer=window.dataLayer||[],dataLayer.push({event:"leadSubmit"});const a=hashEmail(g),o=c.data("position")||null;sendData({eventType:"website_marketing_lead",eventValue:o,eventAdditionalInfo:{hashedEmail:a},email:g}),setTimeout((()=>{_>-1?((e=>{const t=$("#signup-popup"),n=$(".modal-body"),a=$("iframe");a.length&&a.remove();const o=$("