(function(){"use strict";function s(){const f=document.getElementsByTagName("html")[0].getAttribute("lang");r(dataLayer,"GTM DataLayer present...");t(document.getElementById("js-main-job-search"),"click",function(){const t={culture:f,keyword:i("l-search"),location:i("l-location"),remote:c("l-remote"),careerarea:n("l-department"),company:n("l-company"),ahnfacility:n("l-providerFacility"),shift:n("l-shifttype"),timetype:n("l-type")};dataLayer.push({event:"job_search_filter",searchinfo:t});u(t,"job_search_filter click")});t(document.getElementById("js-quick-job-search"),"click",function(){const n={culture:f,keyword:i("main-search-field"),location:i("location")};dataLayer.push({event:"job_search",searchinfo:n});u(n,"job_search_click")});const l=document.getElementsByClassName("js-template-jobBoard")[0];if(l){const n=window.location.search.substring(1);if(n.length>0){const t=a(n);t.culture=f;dataLayer.push({event:"job_search_page",searchinfo:t});u(t,"job_search_page")}}const s=document.getElementById("js-job-detail");s&&(e("job_view",s,f),t(document.getElementById("js-apply-external"),"click",function(){e("job_apply",s,f)}));t(document.getElementById("js-saved-jobs-page"),"click",function(){o("nav_click_saved_jobs",f)});h(document.getElementsByClassName("js-cta-banner-link"),"click",function(){o("cta_banner_click",f)})}function t(n,t,i){n&&n.addEventListener(t,i)}function h(n,t,i){if(n)for(let r=0;r<n.length;r++){let u=n[r];u.addEventListener(t,i)}}function i(n){const t=document.getElementById(n);return t?t.value:""}function c(n){const t=document.getElementById(n);return t?t.checked:!1}function n(n){const t=document.getElementById(n);return t?Array.from(t.selectedOptions).map(n=>n.value):null}function e(n,t,i){const u=l(t);u&&(dataLayer.push({event:n,jobinfo:{jobtitle:u.jobTitle,jobid:u.jobId,jobref:u.jobRef,culture:i}}),r(u,n))}function l(n){return n?{jobTitle:n.hasAttribute("data-jobtitle")?n.getAttribute("data-jobtitle"):n.text,jobId:n.getAttribute("data-id"),jobRef:n.getAttribute("data-ref")}:null}function o(n,t){r(n,"dataLayer push event");dataLayer.push({event:n,culture:t})}function a(n){const t={};return n.split("&").forEach(function(n){if(n=n.split("="),n[1]!==undefined){let i=decodeURIComponent(n[0]),r=decodeURIComponent(n[1]);if(r=r?r.replace(/\++/g," ").trim():"",i.length===0)return;t[i]===undefined?t[i]=r:("function"!=typeof t[i].push&&(t[i]=[t[i]]),t[i].push(r))}}),t}function r(n,t){f&&n&&(t?console.log(t,n):console.log(n))}function u(n,t){f&&n&&(t?(console.log(t),console.table(n)):console.table(n))}const f=!1;window.addEventListener("load",function(){typeof dataLayer!="undefined"&&dataLayer&&s()})})()