function d(n){const t={};if(!(n&&n.nodeType==1))return t;const e=n.attributes;if(e.length===0)return{};for(let o=0,s;s=e[o];o++)t[s.name]=s.value;return t}const p="80",g="443",R=RegExp(":("+p+"|"+g+")$"),i=document.createElement("a"),u={};function T(n){if(n=!n||n=="."?location.href:n,u[n])return u[n];if(i.href=n,n.charAt(0)=="."||n.charAt(0)=="/")return T(i.href);let t=i.port==p||i.port==g?"":i.port;t=t=="0"?"":t;const e=i.host.replace(R,""),o=i.origin?i.origin:i.protocol+"//"+e,s=i.pathname.charAt(0)=="/"?i.pathname:"/"+i.pathname;return u[n]={hash:i.hash,host:e,hostname:i.hostname,href:i.href,origin:o,pathname:s,port:t,protocol:i.protocol,search:i.search}}const w="2.4.1",f="i5iSjo",A="_av",h="_au";function D(n,t,e=void 0,o=void 0,s=void 0,a=void 0){if(typeof o=="function"){const r=e.get("buildHitTask");return{buildHitTask:c=>{c.set(n,null,!0),c.set(t,null,!0),o(c,s,a),r(c)}}}else return _({},n,t)}function K(n,t){const e=d(n),o={};return Object.keys(e).forEach(function(s){if(s.indexOf(t)===0&&s!=t+"on"){let a=e[s];a=="true"&&(a=!0),a=="false"&&(a=!1);const r=E(s.slice(t.length));o[r]=a}}),o}function L(n,t=2e3){let e=!1;const o=function(){e||(e=!0,n())};return setTimeout(o,t),o}const _=Object.assign||function(n,...t){for(let e=0,o=t.length;e<o;e++){const s=Object(t[e]);for(let a in s)Object.prototype.hasOwnProperty.call(s,a)&&(n[a]=s[a])}return n};function E(n){return n.replace(/[\-\_]+(\w?)/g,function(t,e){return e.toUpperCase()})}function O(n){return n.charAt(0).toUpperCase()+n.slice(1)}function N(n,t){const e=window.GoogleAnalyticsObject||"ga";window[e]=window[e]||function(...o){(window[e].q=window[e].q||[]).push(o)},window.gaDevIds=window.gaDevIds||[],window.gaDevIds.indexOf(f)<0&&window.gaDevIds.push(f),window[e]("provide",n,t),window.gaplugins=window.gaplugins||{},window.gaplugins[O(n)]=t}const I={CLEAN_URL_TRACKER:1,EVENT_TRACKER:2,IMPRESSION_TRACKER:3,MEDIA_QUERY_TRACKER:4,OUTBOUND_FORM_TRACKER:5,OUTBOUND_LINK_TRACKER:6,PAGE_VISIBILITY_TRACKER:7,SOCIAL_WIDGET_TRACKER:8,URL_CHANGE_TRACKER:9,MAX_SCROLL_TRACKER:10},l=Object.keys(I).length;function m(n,t){v(n),S(n,t)}function C(n){return parseInt(n||"0",16).toString(2)}function U(n){return parseInt(n||"0",2).toString(16)}function b(n,t){if(n.length<t){let e=t-n.length;for(;e;)n="0"+n,e--}return n}function P(n,t){return n.substr(0,t)+1+n.substr(t+1)}function S(n,t){const e=n.get("&"+h);let o=b(C(e),l);o=P(o,l-t),n.set("&"+h,U(o))}function v(n){n.set("&"+A,w)}export{I as a,_ as b,D as c,T as d,K as g,N as p,m as t,L as w};
