1(function () { 2 var g, 3 aa = 4 'function' == typeof Object.defineProperties 5 ? Object.defineProperty 6 : function (a, b, c) { 7 if (c.get || c.set) throw new TypeError('ES3 does not support getters and setters.'); 8 a != Array.prototype && a != Object.prototype && (a[b] = c.value); 9 }, 10 k = 11 'undefined' != typeof window && window === this 12 ? this 13 : 'undefined' != typeof global && null != global 14 ? global 15 : this; 16 function l() { 17 l = function () {}; 18 k.Symbol || (k.Symbol = ba); 19 } 20 var ca = 0; 21 function ba(a) { 22 return 'jscomp_symbol_' + (a || '') + ca++; 23 } 24 function m() { 25 l(); 26 var a = k.Symbol.iterator; 27 a || (a = k.Symbol.iterator = k.Symbol('iterator')); 28 'function' != typeof Array.prototype[a] && 29 aa(Array.prototype, a, { 30 configurable: !0, 31 writable: !0, 32 value: function () { 33 return da(this); 34 }, 35 }); 36 m = function () {}; 37 } 38 function da(a) { 39 var b = 0; 40 return ea(function () { 41 return b < a.length ? { done: !1, value: a[b++] } : { done: !0 }; 42 }); 43 } 44 function ea(a) { 45 m(); 46 a = { next: a }; 47 a[k.Symbol.iterator] = function () { 48 return this; 49 }; 50 return a; 51 } 52 function fa(a) { 53 m(); 54 l(); 55 m(); 56 var b = a[Symbol.iterator]; 57 return b ? b.call(a) : da(a); 58 } 59 function n(a) { 60 if (!(a instanceof Array)) { 61 a = fa(a); 62 for (var b, c = []; !(b = a.next()).done; ) c.push(b.value); 63 a = c; 64 } 65 return a; 66 } 67 function ha(a, b) { 68 function c() {} 69 c.prototype = b.prototype; 70 a.ha = b.prototype; 71 a.prototype = new c(); 72 a.prototype.constructor = a; 73 for (var d in b) 74 if (Object.defineProperties) { 75 var e = Object.getOwnPropertyDescriptor(b, d); 76 e && Object.defineProperty(a, d, e); 77 } else a[d] = b[d]; 78 } 79 var p = window.Element.prototype, 80 ia = 81 p.matches || 82 p.matchesSelector || 83 p.webkitMatchesSelector || 84 p.mozMatchesSelector || 85 p.msMatchesSelector || 86 p.oMatchesSelector; 87 function ja(a, b) { 88 if (a && 1 == a.nodeType && b) { 89 if ('string' == typeof b || 1 == b.nodeType) return a == b || ka(a, b); 90 if ('length' in b) for (var c = 0, d; (d = b[c]); c++) if (a == d || ka(a, d)) return !0; 91 } 92 return !1; 93 } 94 function ka(a, b) { 95 if ('string' != typeof b) return !1; 96 if (ia) return ia.call(a, b); 97 b = a.parentNode.querySelectorAll(b); 98 for (var c = 0, d; (d = b[c]); c++) if (d == a) return !0; 99 return !1; 100 } 101 function la(a) { 102 for (var b = []; a && a.parentNode && 1 == a.parentNode.nodeType; ) 103 (a = a.parentNode), b.push(a); 104 return b; 105 } 106 function q(a, b, c) { 107 function d(a) { 108 var d; 109 if (h.composed && 'function' == typeof a.composedPath) 110 for (var e = a.composedPath(), f = 0, F; (F = e[f]); f++) 111 1 == F.nodeType && ja(F, b) && (d = F); 112 else 113 a: { 114 if ((d = a.target) && 1 == d.nodeType && b) 115 for (d = [d].concat(la(d)), e = 0; (f = d[e]); e++) 116 if (ja(f, b)) { 117 d = f; 118 break a; 119 } 120 d = void 0; 121 } 122 d && c.call(d, a, d); 123 } 124 var e = document, 125 h = { composed: !0, S: !0 }, 126 h = void 0 === h ? {} : h; 127 e.addEventListener(a, d, h.S); 128 return { 129 j: function () { 130 e.removeEventListener(a, d, h.S); 131 }, 132 }; 133 } 134 function ma(a) { 135 var b = {}; 136 if (!a || 1 != a.nodeType) return b; 137 a = a.attributes; 138 if (!a.length) return {}; 139 for (var c = 0, d; (d = a[c]); c++) b[d.name] = d.value; 140 return b; 141 } 142 var na = /:(80|443)$/, 143 r = document.createElement('a'), 144 t = {}; 145 function u(a) { 146 a = a && '.' != a ? a : location.href; 147 if (t[a]) return t[a]; 148 r.href = a; 149 if ('.' == a.charAt(0) || '/' == a.charAt(0)) return u(r.href); 150 var b = '80' == r.port || '443' == r.port ? '' : r.port, 151 b = '0' == b ? '' : b, 152 c = r.host.replace(na, ''); 153 return (t[a] = { 154 hash: r.hash, 155 host: c, 156 hostname: r.hostname, 157 href: r.href, 158 origin: r.origin ? r.origin : r.protocol + '//' + c, 159 pathname: '/' == r.pathname.charAt(0) ? r.pathname : '/' + r.pathname, 160 port: b, 161 protocol: r.protocol, 162 search: r.search, 163 }); 164 } 165 var w = []; 166 function oa(a, b) { 167 var c = this; 168 this.context = a; 169 this.P = b; 170 this.f = (this.c = /Task$/.test(b)) ? a.get(b) : a[b]; 171 this.b = []; 172 this.a = []; 173 this.g = function (a) { 174 for (var b = [], d = 0; d < arguments.length; ++d) b[d - 0] = arguments[d]; 175 return c.a[c.a.length - 1].apply(null, [].concat(n(b))); 176 }; 177 this.c ? a.set(b, this.g) : (a[b] = this.g); 178 } 179 function x(a, b, c) { 180 a = pa(a, b); 181 a.b.push(c); 182 qa(a); 183 } 184 function y(a, b, c) { 185 a = pa(a, b); 186 c = a.b.indexOf(c); 187 -1 < c && (a.b.splice(c, 1), 0 < a.b.length ? qa(a) : a.j()); 188 } 189 function qa(a) { 190 a.a = []; 191 for (var b, c = 0; (b = a.b[c]); c++) { 192 var d = a.a[c - 1] || a.f.bind(a.context); 193 a.a.push(b(d)); 194 } 195 } 196 oa.prototype.j = function () { 197 var a = w.indexOf(this); 198 -1 < a && 199 (w.splice(a, 1), this.c ? this.context.set(this.P, this.f) : (this.context[this.P] = this.f)); 200 }; 201 function pa(a, b) { 202 var c = w.filter(function (c) { 203 return c.context == a && c.P == b; 204 })[0]; 205 c || ((c = new oa(a, b)), w.push(c)); 206 return c; 207 } 208 function z(a, b, c, d, e, h) { 209 if ('function' == typeof d) { 210 var f = c.get('buildHitTask'); 211 return { 212 buildHitTask: function (c) { 213 c.set(a, null, !0); 214 c.set(b, null, !0); 215 d(c, e, h); 216 f(c); 217 }, 218 }; 219 } 220 return A({}, a, b); 221 } 222 function B(a, b) { 223 var c = ma(a), 224 d = {};
225 Object.keys(c).forEach(function (a) { 226 if (!a.indexOf(b) && a != b + 'on') { 227 var e = c[a]; 228 'true' == e && (e = !0); 229 'false' == e && (e = !1); 230 a = ra(a.slice(b.length)); 231 d[a] = e; 232 } 233 }); 234 return d; 235 } 236 function sa(a) { 237 'loading' == document.readyState 238 ? document.addEventListener('DOMContentLoaded', function c() { 239 document.removeEventListener('DOMContentLoaded', c); 240 a(); 241 }) 242 : a(); 243 } 244 function ta(a, b) { 245 var c; 246 return function (d) { 247 for (var e = [], h = 0; h < arguments.length; ++h) e[h - 0] = arguments[h]; 248 clearTimeout(c); 249 c = setTimeout(function () { 250 return a.apply(null, [].concat(n(e))); 251 }, b); 252 }; 253 } 254 function ua(a) { 255 function b() { 256 c || ((c = !0), a()); 257 } 258 var c = !1; 259 setTimeout(b, 2e3); 260 return b; 261 } 262 var C = {}; 263 function va(a, b) { 264 function c() { 265 clearTimeout(e.timeout); 266 e.send && y(a, 'send', e.send); 267 delete C[d]; 268 e.R.forEach(function (a) { 269 return a(); 270 }); 271 } 272 var d = a.get('trackingId'), 273 e = (C[d] = C[d] || {}); 274 clearTimeout(e.timeout); 275 e.timeout = setTimeout(c, 0); 276 e.R = e.R || []; 277 e.R.push(b); 278 e.send || 279 ((e.send = function (a) { 280 return function (b) { 281 for (var d = [], e = 0; e < arguments.length; ++e) d[e - 0] = arguments[e]; 282 c(); 283 a.apply(null, [].concat(n(d))); 284 }; 285 }), 286 x(a, 'send', e.send)); 287 } 288 var A = 289 Object.assign || 290 function (a, b) { 291 for (var c = [], d = 1; d < arguments.length; ++d) c[d - 1] = arguments[d]; 292 for (var d = 0, e = c.length; d < e; d++) { 293 var h = Object(c[d]), 294 f; 295 for (f in h) Object.prototype.hasOwnProperty.call(h, f) && (a[f] = h[f]); 296 } 297 return a; 298 }; 299 function ra(a) { 300 return a.replace(/[\-\_]+(\w?)/g, function (a, c) { 301 return c.toUpperCase(); 302 }); 303 } 304 function D(a) { 305 return 'object' == typeof a && null !== a; 306 } 307 var E = function wa(b) { 308 return b 309 ? (b ^ ((16 * Math.random()) >> (b / 4))).toString(16) 310 : '10000000-1000-4000-8000-100000000000'.replace(/[018]/g, wa); 311 }; 312 function G(a, b) { 313 var c = window.GoogleAnalyticsObject || 'ga'; 314 window[c] = 315 window[c] || 316 function (a) { 317 for (var b = [], d = 0; d < arguments.length; ++d) b[d - 0] = arguments[d]; 318 (window[c].q = window[c].q || []).push(b); 319 }; 320 window.gaDevIds = window.gaDevIds || []; 321 0 > window.gaDevIds.indexOf('i5iSjo') && window.gaDevIds.push('i5iSjo'); 322 window[c]('provide', a, b); 323 window.gaplugins = window.gaplugins || {}; 324 window.gaplugins[a.charAt(0).toUpperCase() + a.slice(1)] = b; 325 } 326 var H = { T: 1, U: 2, V: 3, X: 4, Y: 5, Z: 6, $: 7, aa: 8, ba: 9, W: 10 }, 327 I = Object.keys(H).length; 328 function J(a, b) { 329 a.set('\x26_av', '2.4.1'); 330 var c = a.get('\x26_au'), 331 c = parseInt(c || '0', 16).toString(2); 332 if (c.length < I) for (var d = I - c.length; d; ) (c = '0' + c), d--; 333 b = I - b; 334 c = c.substr(0, b) + 1 + c.substr(b + 1); 335 a.set('\x26_au', parseInt(c || '0', 2).toString(16)); 336 } 337 function K(a, b) { 338 J(a, H.T); 339 this.a = A({}, b); 340 this.g = a; 341 this.b = 342 this.a.stripQuery && this.a.queryDimensionIndex 343 ? 'dimension' + this.a.queryDimensionIndex 344 : null; 345 this.f = this.f.bind(this); 346 this.c = this.c.bind(this); 347 x(a, 'get', this.f); 348 x(a, 'buildHitTask', this.c); 349 } 350 K.prototype.f = function (a) { 351 var b = this; 352 return function (c) { 353 if ('page' == c || c == b.b) { 354 var d = { location: a('location'), page: a('page') }; 355 return xa(b, d)[c]; 356 } 357 return a(c); 358 }; 359 }; 360 K.prototype.c = function (a) { 361 var b = this; 362 return function (c) { 363 var d = xa(b, { location: c.get('location'), page: c.get('page') }); 364 c.set(d, null, !0); 365 a(c); 366 }; 367 }; 368 function xa(a, b) { 369 var c = u(b.page || b.location), 370 d = c.pathname; 371 if (a.a.indexFilename) { 372 var e = d.split('/'); 373 a.a.indexFilename == e[e.length - 1] && ((e[e.length - 1] = ''), (d = e.join('/'))); 374 } 375 'remove' == a.a.trailingSlash 376 ? (d = d.replace(/\/+$/, '')) 377 : 'add' == a.a.trailingSlash && (/\.\w+$/.test(d) || '/' == d.substr(-1) || (d += '/')); 378 d = { page: d + (a.a.stripQuery ? ya(a, c.search) : c.search) }; 379 b.location && (d.location = b.location); 380 a.b && (d[a.b] = c.search.slice(1) || '(not set)'); 381 return 'function' == typeof a.a.urlFieldsFilter 382 ? ((b = a.a.urlFieldsFilter(d, u)), 383 (c = { page: b.page, location: b.location }), 384 a.b && (c[a.b] = b[a.b]), 385 c) 386 : d; 387 } 388 function ya(a, b) { 389 if (Array.isArray(a.a.queryParamsWhitelist)) { 390 var c = []; 391 b.slice(1) 392 .split('\x26') 393 .forEach(function (b) { 394 var d = fa(b.split('\x3d')); 395 b = d.next().value; 396 d = d.next().value; 397 -1 < a.a.queryParamsWhitelist.indexOf(b) && d && c.push([b, d]); 398 }); 399 return c.length 400 ? '?' + 401 c 402 .map(function (a) { 403 return a.join('\x3d'); 404 }) 405 .join('\x26') 406 : ''; 407 } 408 return ''; 409 } 410 K.prototype.remove = function () { 411 y(this.g, 'get', this.f); 412 y(this.g, 'buildHitTask', this.c); 413 }; 414 G('cleanUrlTracker', K); 415 function L(a, b) { 416 var c = this; 417 J(a, H.U); 418 if (window.addEventListener) { 419 this.a = A({ events: ['click'], fieldsObj: {}, attributePrefix: 'ga-' }, b); 420 this.f = a; 421 this.c = this.c.bind(this); 422 var d = '[' + this.a.attributePrefix + 'on]'; 423 this.b = {};
424 this.a.events.forEach(function (a) { 425 c.b[a] = q(a, d, c.c); 426 }); 427 } 428 } 429 L.prototype.c = function (a, b) { 430 var c = this.a.attributePrefix; 431 if ( 432 !( 433 0 > 434 b 435 .getAttribute(c + 'on') 436 .split(/\s*,\s*/) 437 .indexOf(a.type) 438 ) 439 ) { 440 var c = B(b, c), 441 d = A({}, this.a.fieldsObj, c); 442 this.f.send( 443 c.hitType || 'event', 444 z({ transport: 'beacon' }, d, this.f, this.a.hitFilter, b, a), 445 ); 446 } 447 }; 448 L.prototype.remove = function () { 449 var a = this; 450 Object.keys(this.b).forEach(function (b) { 451 a.b[b].j(); 452 }); 453 }; 454 G('eventTracker', L); 455 function za(a, b) { 456 var c = this; 457 J(a, H.V); 458 window.IntersectionObserver && 459 window.MutationObserver && 460 ((this.a = A({ rootMargin: '0px', fieldsObj: {}, attributePrefix: 'ga-' }, b)), 461 (this.c = a), 462 (this.M = this.M.bind(this)), 463 (this.O = this.O.bind(this)), 464 (this.K = this.K.bind(this)), 465 (this.L = this.L.bind(this)), 466 (this.b = null), 467 (this.items = []), 468 (this.i = {}), 469 (this.h = {}), 470 sa(function () { 471 c.a.elements && c.observeElements(c.a.elements); 472 })); 473 } 474 g = za.prototype; 475 g.observeElements = function (a) { 476 var b = this; 477 a = M(this, a); 478 this.items = this.items.concat(a.items); 479 this.i = A({}, a.i, this.i); 480 this.h = A({}, a.h, this.h); 481 a.items.forEach(function (a) { 482 var c = (b.h[a.threshold] = 483 b.h[a.threshold] || 484 new IntersectionObserver(b.O, { 485 rootMargin: b.a.rootMargin, 486 threshold: [+a.threshold], 487 })); 488 (a = b.i[a.id] || (b.i[a.id] = document.getElementById(a.id))) && c.observe(a); 489 }); 490 this.b || 491 ((this.b = new MutationObserver(this.M)), 492 this.b.observe(document.body, { childList: !0, subtree: !0 })); 493 requestAnimationFrame(function () {}); 494 }; 495 g.unobserveElements = function (a) { 496 var b = [], 497 c = []; 498 this.items.forEach(function (d) { 499 a.some(function (a) { 500 a = Aa(a); 501 return ( 502 a.id === d.id && 503 a.threshold === d.threshold && 504 a.trackFirstImpressionOnly === d.trackFirstImpressionOnly 505 ); 506 }) 507 ? c.push(d) 508 : b.push(d); 509 }); 510 if (b.length) { 511 var d = M(this, b), 512 e = M(this, c); 513 this.items = d.items; 514 this.i = d.i; 515 this.h = d.h; 516 c.forEach(function (a) { 517 if (!d.i[a.id]) { 518 var b = e.h[a.threshold], 519 c = e.i[a.id]; 520 c && b.unobserve(c); 521 d.h[a.threshold] || e.h[a.threshold].disconnect(); 522 } 523 }); 524 } else this.unobserveAllElements(); 525 }; 526 g.unobserveAllElements = function () { 527 var a = this;
528 Object.keys(this.h).forEach(function (b) { 529 a.h[b].disconnect(); 530 }); 531 this.b.disconnect(); 532 this.b = null; 533 this.items = []; 534 this.i = {}; 535 this.h = {}; 536 }; 537 function M(a, b) { 538 var c = [], 539 d = {}, 540 e = {}; 541 b.length && 542 b.forEach(function (b) { 543 b = Aa(b); 544 c.push(b); 545 e[b.id] = a.i[b.id] || null; 546 d[b.threshold] = a.h[b.threshold] || null; 547 }); 548 return { items: c, i: e, h: d }; 549 } 550 g.M = function (a) { 551 for (var b = 0, c; (c = a[b]); b++) { 552 for (var d = 0, e; (e = c.removedNodes[d]); d++) N(this, e, this.L); 553 for (d = 0; (e = c.addedNodes[d]); d++) N(this, e, this.K); 554 } 555 }; 556 function N(a, b, c) { 557 1 == b.nodeType && b.id in a.i && c(b.id); 558 for (var d = 0, e; (e = b.childNodes[d]); d++) N(a, e, c); 559 } 560 g.O = function (a) { 561 for (var b = [], c = 0, d; (d = a[c]); c++) 562 for (var e = 0, h; (h = this.items[e]); e++) { 563 var f; 564 if ((f = d.target.id === h.id)) 565 (f = h.threshold) 566 ? (f = d.intersectionRatio >= f) 567 : ((f = d.intersectionRect), 568 (f = 0 < f.top || 0 < f.bottom || 0 < f.left || 0 < f.right)); 569 if (f) { 570 var v = h.id; 571 f = document.getElementById(v); 572 var v = { 573 transport: 'beacon', 574 eventCategory: 'Viewport', 575 eventAction: 'impression', 576 eventLabel: v, 577 nonInteraction: !0, 578 }, 579 Na = A({}, this.a.fieldsObj, B(f, this.a.attributePrefix)); 580 this.c.send('event', z(v, Na, this.c, this.a.hitFilter, f)); 581 h.trackFirstImpressionOnly && b.push(h); 582 } 583 } 584 b.length && this.unobserveElements(b); 585 }; 586 g.K = function (a) { 587 var b = this, 588 c = (this.i[a] = document.getElementById(a)); 589 this.items.forEach(function (d) { 590 a == d.id && b.h[d.threshold].observe(c); 591 }); 592 }; 593 g.L = function (a) { 594 var b = this, 595 c = this.i[a]; 596 this.items.forEach(function (d) { 597 a == d.id && b.h[d.threshold].unobserve(c); 598 }); 599 this.i[a] = null; 600 }; 601 g.remove = function () { 602 this.unobserveAllElements(); 603 }; 604 G('impressionTracker', za); 605 function Aa(a) { 606 'string' == typeof a && (a = { id: a }); 607 return A({ threshold: 0, trackFirstImpressionOnly: !0 }, a); 608 } 609 function Ba() { 610 this.a = {}; 611 } 612 function Ca(a, b) { 613 (a.a.externalSet = a.a.externalSet || []).push(b); 614 } 615 Ba.prototype.ca = function (a, b) { 616 for (var c = [], d = 1; d < arguments.length; ++d) c[d - 1] = arguments[d]; 617 (this.a[a] = this.a[a] || []).forEach(function (a) { 618 return a.apply(null, [].concat(n(c))); 619 }); 620 }; 621 var O = {}, 622 P = !1, 623 Q; 624 function R(a, b) { 625 b = void 0 === b ? {} : b; 626 this.a = {}; 627 this.b = a; 628 this.w = b; 629 this.l = null; 630 } 631 ha(R, Ba); 632 function S(a, b, c) { 633 a = ['autotrack', a, b].join(':'); 634 O[a] || ((O[a] = new R(a, c)), P || (window.addEventListener('storage', Da), (P = !0))); 635 return O[a]; 636 } 637 function Ea() { 638 if (null != Q) return Q; 639 try { 640 window.localStorage.setItem('autotrack', 'autotrack'), 641 window.localStorage.removeItem('autotrack'), 642 (Q = !0); 643 } catch (a) { 644 Q = !1; 645 } 646 return Q; 647 } 648 R.prototype.get = function () { 649 if (this.l) return this.l; 650 if (Ea()) 651 try { 652 this.l = Fa(window.localStorage.getItem(this.b)); 653 } catch (a) {} 654 return (this.l = A({}, this.w, this.l)); 655 }; 656 R.prototype.set = function (a) { 657 this.l = A({}, this.w, this.l, a); 658 if (Ea()) 659 try { 660 var b = JSON.stringify(this.l); 661 window.localStorage.setItem(this.b, b); 662 } catch (c) {} 663 }; 664 function Ga(a) { 665 a.l = {}; 666 if (Ea()) 667 try { 668 window.localStorage.removeItem(a.b); 669 } catch (b) {} 670 } 671 R.prototype.j = function () { 672 delete O[this.b]; 673 Object.keys(O).length || (window.removeEventListener('storage', Da), (P = !1)); 674 }; 675 function Da(a) { 676 var b = O[a.key]; 677 if (b) { 678 var c = A({}, b.w, Fa(a.oldValue)); 679 a = A({}, b.w, Fa(a.newValue)); 680 b.l = a; 681 b.ca('externalSet', a, c); 682 } 683 } 684 function Fa(a) { 685 var b = {}; 686 if (a)
687 try { 688 b = JSON.parse(a); 689 } catch (c) {} 690 return b; 691 } 692 var T = {}; 693 function U(a, b, c) { 694 this.f = a; 695 this.timeout = b || Ha; 696 this.timeZone = c; 697 this.b = this.b.bind(this); 698 x(a, 'sendHitTask', this.b); 699 try { 700 this.c = new Intl.DateTimeFormat('en-US', { timeZone: this.timeZone }); 701 } catch (d) {} 702 this.a = S(a.get('trackingId'), 'session', { hitTime: 0, isExpired: !1 }); 703 this.a.get().id || this.a.set({ id: E() }); 704 } 705 function Ia(a, b, c) { 706 var d = a.get('trackingId'); 707 return T[d] ? T[d] : (T[d] = new U(a, b, c)); 708 } 709 function V(a) { 710 return a.a.get().id; 711 } 712 U.prototype.isExpired = function (a) { 713 a = void 0 === a ? V(this) : a; 714 if (a != V(this)) return !0; 715 a = this.a.get(); 716 if (a.isExpired) return !0; 717 var b = a.hitTime; 718 return b && 719 ((a = new Date()), 720 (b = new Date(b)), 721 a - b > 6e4 * this.timeout || (this.c && this.c.format(a) != this.c.format(b))) 722 ? !0 723 : !1; 724 }; 725 U.prototype.b = function (a) { 726 var b = this; 727 return function (c) { 728 a(c); 729 var d = c.get('sessionControl'); 730 c = 'start' == d || b.isExpired(); 731 var d = 'end' == d, 732 e = b.a.get(); 733 e.hitTime = +new Date(); 734 c && ((e.isExpired = !1), (e.id = E())); 735 d && (e.isExpired = !0); 736 b.a.set(e); 737 }; 738 }; 739 U.prototype.j = function () { 740 y(this.f, 'sendHitTask', this.b); 741 this.a.j(); 742 delete T[this.f.get('trackingId')]; 743 }; 744 var Ha = 30; 745 function W(a, b) { 746 J(a, H.W); 747 window.addEventListener && 748 ((this.b = A({ increaseThreshold: 20, sessionTimeout: Ha, fieldsObj: {} }, b)), 749 (this.f = a), 750 (this.c = Ja(this)), 751 (this.g = ta(this.g.bind(this), 500)), 752 (this.o = this.o.bind(this)), 753 (this.a = S(a.get('trackingId'), 'plugins/max-scroll-tracker')), 754 (this.m = Ia(a, this.b.sessionTimeout, this.b.timeZone)), 755 x(a, 'set', this.o), 756 Ka(this)); 757 } 758 function Ka(a) { 759 100 > (a.a.get()[a.c] || 0) && window.addEventListener('scroll', a.g); 760 } 761 W.prototype.g = function () { 762 var a = document.documentElement, 763 b = document.body, 764 a = Math.min( 765 100, 766 Math.max( 767 0, 768 Math.round( 769 (window.pageYOffset / 770 (Math.max(a.offsetHeight, a.scrollHeight, b.offsetHeight, b.scrollHeight) - 771 window.innerHeight)) * 772 100, 773 ), 774 ), 775 ), 776 b = V(this.m); 777 b != this.a.get().sessionId && (Ga(this.a), this.a.set({ sessionId: b })); 778 if (this.m.isExpired(this.a.get().sessionId)) Ga(this.a); 779 else if ( 780 ((b = this.a.get()[this.c] || 0), 781 a > b && 782 ((100 != a && 100 != b) || window.removeEventListener('scroll', this.g), 783 (b = a - b), 784 100 == a || b >= this.b.increaseThreshold)) 785 ) { 786 var c = {}; 787 this.a.set(((c[this.c] = a), (c.sessionId = V(this.m)), c)); 788 a = { 789 transport: 'beacon', 790 eventCategory: 'Max Scroll', 791 eventAction: 'increase', 792 eventValue: b, 793 eventLabel: String(a), 794 nonInteraction: !0, 795 }; 796 this.b.maxScrollMetricIndex && (a['metric' + this.b.maxScrollMetricIndex] = b); 797 this.f.send('event', z(a, this.b.fieldsObj, this.f, this.b.hitFilter)); 798 } 799 }; 800 W.prototype.o = function (a) { 801 var b = this; 802 return function (c, d) { 803 a(c, d); 804 var e = {}; 805 (D(c) ? c : ((e[c] = d), e)).page && ((c = b.c), (b.c = Ja(b)), b.c != c && Ka(b)); 806 }; 807 }; 808 function Ja(a) { 809 a = u(a.f.get('page') || a.f.get('location')); 810 return a.pathname + a.search; 811 } 812 W.prototype.remove = function () { 813 this.m.j(); 814 window.removeEventListener('scroll', this.g); 815 y(this.f, 'set', this.o); 816 }; 817 G('maxScrollTracker', W); 818 var La = {}; 819 function Ma(a, b) { 820 J(a, H.X); 821 window.matchMedia && 822 ((this.a = A( 823 { 824 changeTemplate: this.changeTemplate, 825 changeTimeout: 1e3, 826 fieldsObj: {}, 827 }, 828 b, 829 )), 830 D(this.a.definitions) && 831 ((b = this.a.definitions), 832 (this.a.definitions = Array.isArray(b) ? b : [b]), 833 (this.b = a), 834 (this.c = []), 835 Oa(this))); 836 } 837 function Oa(a) { 838 a.a.definitions.forEach(function (b) { 839 if (b.name && b.dimensionIndex) { 840 var c = Pa(b); 841 a.b.set('dimension' + b.dimensionIndex, c); 842 Qa(a, b); 843 } 844 }); 845 } 846 function Pa(a) { 847 var b;
848 a.items.forEach(function (a) { 849 Ra(a.media).matches && (b = a); 850 }); 851 return b ? b.name : '(not set)'; 852 } 853 function Qa(a, b) { 854 b.items.forEach(function (c) { 855 c = Ra(c.media); 856 var d = ta(function () { 857 var c = Pa(b), 858 d = a.b.get('dimension' + b.dimensionIndex); 859 c !== d && 860 (a.b.set('dimension' + b.dimensionIndex, c), 861 (c = { 862 transport: 'beacon', 863 eventCategory: b.name, 864 eventAction: 'change', 865 eventLabel: a.a.changeTemplate(d, c), 866 nonInteraction: !0, 867 }), 868 a.b.send('event', z(c, a.a.fieldsObj, a.b, a.a.hitFilter))); 869 }, a.a.changeTimeout); 870 c.addListener(d); 871 a.c.push({ fa: c, da: d }); 872 }); 873 } 874 Ma.prototype.remove = function () { 875 for (var a = 0, b; (b = this.c[a]); a++) b.fa.removeListener(b.da); 876 }; 877 Ma.prototype.changeTemplate = function (a, b) { 878 return a + ' \x3d\x3e ' + b; 879 }; 880 G('mediaQueryTracker', Ma); 881 function Ra(a) { 882 return La[a] || (La[a] = window.matchMedia(a)); 883 } 884 function X(a, b) { 885 J(a, H.Y); 886 window.addEventListener && 887 ((this.a = A( 888 { 889 formSelector: 'form', 890 shouldTrackOutboundForm: this.shouldTrackOutboundForm, 891 fieldsObj: {}, 892 attributePrefix: 'ga-', 893 }, 894 b, 895 )), 896 (this.b = a), 897 (this.c = q('submit', this.a.formSelector, this.f.bind(this)))); 898 } 899 X.prototype.f = function (a, b) { 900 var c = { 901 transport: 'beacon', 902 eventCategory: 'Outbound Form', 903 eventAction: 'submit', 904 eventLabel: u(b.action).href, 905 }; 906 if (this.a.shouldTrackOutboundForm(b, u)) { 907 navigator.sendBeacon || 908 (a.preventDefault(), 909 (c.hitCallback = ua(function () { 910 b.submit(); 911 }))); 912 var d = A({}, this.a.fieldsObj, B(b, this.a.attributePrefix)); 913 this.b.send('event', z(c, d, this.b, this.a.hitFilter, b, a)); 914 } 915 }; 916 X.prototype.shouldTrackOutboundForm = function (a, b) { 917 a = b(a.action); 918 return a.hostname != location.hostname && 'http' == a.protocol.slice(0, 4); 919 }; 920 X.prototype.remove = function () { 921 this.c.j(); 922 }; 923 G('outboundFormTracker', X); 924 function Y(a, b) { 925 var c = this; 926 J(a, H.Z); 927 window.addEventListener && 928 ((this.a = A( 929 { 930 events: ['click'], 931 linkSelector: 'a, area', 932 shouldTrackOutboundLink: this.shouldTrackOutboundLink, 933 fieldsObj: {}, 934 attributePrefix: 'ga-', 935 }, 936 b, 937 )), 938 (this.c = a), 939 (this.f = this.f.bind(this)), 940 (this.b = {}), 941 this.a.events.forEach(function (a) { 942 c.b[a] = q(a, c.a.linkSelector, c.f); 943 })); 944 } 945 Y.prototype.f = function (a, b) { 946 var c = this; 947 if (this.a.shouldTrackOutboundLink(b, u)) { 948 var d = b.getAttribute('href') || b.getAttribute('xlink:href'), 949 e = u(d), 950 e = { 951 transport: 'beacon', 952 eventCategory: 'Outbound Link', 953 eventAction: a.type, 954 eventLabel: e.href, 955 }, 956 h = A({}, this.a.fieldsObj, B(b, this.a.attributePrefix)), 957 f = z(e, h, this.c, this.a.hitFilter, b, a); 958 if ( 959 navigator.sendBeacon || 960 'click' != a.type || 961 '_blank' == b.target || 962 a.metaKey || 963 a.ctrlKey || 964 a.shiftKey || 965 a.altKey || 966 1 < a.which 967 ) 968 this.c.send('event', f); 969 else { 970 var v = function () { 971 window.removeEventListener('click', v); 972 if (!a.defaultPrevented) { 973 a.preventDefault(); 974 var b = f.hitCallback; 975 f.hitCallback = ua(function () { 976 'function' == typeof b && b(); 977 location.href = d; 978 }); 979 } 980 c.c.send('event', f); 981 }; 982 window.addEventListener('click', v); 983 } 984 } 985 }; 986 Y.prototype.shouldTrackOutboundLink = function (a, b) { 987 a = a.getAttribute('href') || a.getAttribute('xlink:href'); 988 b = b(a); 989 return b.hostname != location.hostname && 'http' == b.protocol.slice(0, 4); 990 }; 991 Y.prototype.remove = function () { 992 var a = this;
993 Object.keys(this.b).forEach(function (b) { 994 a.b[b].j(); 995 }); 996 }; 997 G('outboundLinkTracker', Y); 998 var Z = E(); 999 function Sa(a, b) { 1000 var c = this; 1001 J(a, H.$); 1002 document.visibilityState && 1003 ((this.a = A( 1004 { 1005 sessionTimeout: Ha, 1006 visibleThreshold: 5e3, 1007 sendInitialPageview: !1, 1008 fieldsObj: {}, 1009 }, 1010 b, 1011 )), 1012 (this.b = a), 1013 (this.g = document.visibilityState), 1014 (this.m = null), 1015 (this.o = !1), 1016 (this.v = this.v.bind(this)), 1017 (this.s = this.s.bind(this)), 1018 (this.G = this.G.bind(this)), 1019 (this.N = this.N.bind(this)), 1020 (this.c = S(a.get('trackingId'), 'plugins/page-visibility-tracker')), 1021 Ca(this.c, this.N), 1022 (this.f = Ia(a, this.a.sessionTimeout, this.a.timeZone)), 1023 x(a, 'set', this.v), 1024 window.addEventListener('unload', this.G), 1025 document.addEventListener('visibilitychange', this.s), 1026 va(this.b, function () { 1027 if ('visible' == document.visibilityState) 1028 c.a.sendInitialPageview && (Ta(c, { ea: !0 }), (c.o = !0)), 1029 c.c.set({ 1030 time: +new Date(), 1031 state: 'visible', 1032 pageId: Z, 1033 sessionId: V(c.f), 1034 }); 1035 else if (c.a.sendInitialPageview && c.a.pageLoadsMetricIndex) { 1036 var a = {}, 1037 a = 1038 ((a.transport = 'beacon'), 1039 (a.eventCategory = 'Page Visibility'), 1040 (a.eventAction = 'page load'), 1041 (a.eventLabel = '(not set)'), 1042 (a['metric' + c.a.pageLoadsMetricIndex] = 1), 1043 (a.nonInteraction = !0), 1044 a); 1045 c.b.send('event', z(a, c.a.fieldsObj, c.b, c.a.hitFilter)); 1046 } 1047 })); 1048 } 1049 g = Sa.prototype; 1050 g.s = function () { 1051 var a = this; 1052 if ('visible' == document.visibilityState || 'hidden' == document.visibilityState) { 1053 var b = Ua(this), 1054 c = { 1055 time: +new Date(), 1056 state: document.visibilityState, 1057 pageId: Z, 1058 sessionId: V(this.f), 1059 }; 1060 'visible' == document.visibilityState && 1061 this.a.sendInitialPageview && 1062 !this.o && 1063 (Ta(this), (this.o = !0)); 1064 'hidden' == document.visibilityState && this.m && clearTimeout(this.m); 1065 this.f.isExpired(b.sessionId) 1066 ? (Ga(this.c), 1067 'hidden' == this.g && 1068 'visible' == document.visibilityState && 1069 (clearTimeout(this.m), 1070 (this.m = setTimeout(function () { 1071 a.c.set(c); 1072 Ta(a, { hitTime: c.time }); 1073 }, this.a.visibleThreshold)))) 1074 : (b.pageId == Z && 'visible' == b.state && Va(this, b), this.c.set(c)); 1075 this.g = document.visibilityState; 1076 } 1077 }; 1078 function Ua(a) { 1079 var b = a.c.get(); 1080 'visible' == a.g && 1081 'hidden' == b.state && 1082 b.pageId != Z && 1083 ((b.state = 'visible'), (b.pageId = Z), a.c.set(b)); 1084 return b; 1085 } 1086 function Va(a, b, c) { 1087 c = (c ? c : {}).hitTime; 1088 var d = { hitTime: c }, 1089 d = (d ? d : {}).hitTime; 1090 (b = b.time ? (d || +new Date()) - b.time : 0) && 1091 b >= a.a.visibleThreshold && 1092 ((b = Math.round(b / 1e3)), 1093 (d = { 1094 transport: 'beacon', 1095 nonInteraction: !0, 1096 eventCategory: 'Page Visibility', 1097 eventAction: 'track', 1098 eventValue: b, 1099 eventLabel: '(not set)', 1100 }), 1101 c && (d.queueTime = +new Date() - c), 1102 a.a.visibleMetricIndex && (d['metric' + a.a.visibleMetricIndex] = b), 1103 a.b.send('event', z(d, a.a.fieldsObj, a.b, a.a.hitFilter))); 1104 } 1105 function Ta(a, b) { 1106 var c = b ? b : {}; 1107 b = c.hitTime; 1108 var c = c.ea, 1109 d = { transport: 'beacon' }; 1110 b && (d.queueTime = +new Date() - b); 1111 c && a.a.pageLoadsMetricIndex && (d['metric' + a.a.pageLoadsMetricIndex] = 1); 1112 a.b.send('pageview', z(d, a.a.fieldsObj, a.b, a.a.hitFilter)); 1113 } 1114 g.v = function (a) { 1115 var b = this; 1116 return function (c, d) { 1117 var e = {}, 1118 e = D(c) ? c : ((e[c] = d), e); 1119 e.page && e.page !== b.b.get('page') && 'visible' == b.g && b.s(); 1120 a(c, d); 1121 }; 1122 }; 1123 g.N = function (a, b) { 1124 a.time != b.time && 1125 (b.pageId != Z || 1126 'visible' != b.state || 1127 this.f.isExpired(b.sessionId) || 1128 Va(this, b, { hitTime: a.time })); 1129 }; 1130 g.G = function () { 1131 'hidden' != this.g && this.s(); 1132 }; 1133 g.remove = function () { 1134 this.c.j(); 1135 this.f.j(); 1136 y(this.b, 'set', this.v); 1137 window.removeEventListener('unload', this.G); 1138 document.removeEventListener('visibilitychange', this.s); 1139 }; 1140 G('pageVisibilityTracker', Sa); 1141 function Wa(a, b) { 1142 J(a, H.aa); 1143 window.addEventListener && 1144 ((this.a = A({ fieldsObj: {}, hitFilter: null }, b)), 1145 (this.b = a), 1146 (this.u = this.u.bind(this)), 1147 (this.J = this.J.bind(this)), 1148 (this.D = this.D.bind(this)), 1149 (this.A = this.A.bind(this)), 1150 (this.B = this.B.bind(this)), 1151 (this.F = this.F.bind(this)), 1152 'complete' != document.readyState ? window.addEventListener('load', this.u) : this.u()); 1153 } 1154 g = Wa.prototype; 1155 g.u = function () { 1156 if (window.FB)
1157 try { 1158 window.FB.Event.subscribe('edge.create', this.B), 1159 window.FB.Event.subscribe('edge.remove', this.F); 1160 } catch (a) {} 1161 window.twttr && this.J(); 1162 }; 1163 g.J = function () { 1164 var a = this; 1165 try { 1166 window.twttr.ready(function () { 1167 window.twttr.events.bind('tweet', a.D); 1168 window.twttr.events.bind('follow', a.A); 1169 }); 1170 } catch (b) {} 1171 }; 1172 function Xa(a) { 1173 try { 1174 window.twttr.ready(function () { 1175 window.twttr.events.unbind('tweet', a.D); 1176 window.twttr.events.unbind('follow', a.A); 1177 }); 1178 } catch (b) {} 1179 } 1180 g.D = function (a) { 1181 if ('tweet' == a.region) { 1182 var b = { 1183 transport: 'beacon', 1184 socialNetwork: 'Twitter', 1185 socialAction: 'tweet', 1186 socialTarget: a.data.url || a.target.getAttribute('data-url') || location.href, 1187 }; 1188 this.b.send('social', z(b, this.a.fieldsObj, this.b, this.a.hitFilter, a.target, a)); 1189 } 1190 }; 1191 g.A = function (a) { 1192 if ('follow' == a.region) { 1193 var b = { 1194 transport: 'beacon', 1195 socialNetwork: 'Twitter', 1196 socialAction: 'follow', 1197 socialTarget: a.data.screen_name || a.target.getAttribute('data-screen-name'), 1198 }; 1199 this.b.send('social', z(b, this.a.fieldsObj, this.b, this.a.hitFilter, a.target, a)); 1200 } 1201 }; 1202 g.B = function (a) { 1203 this.b.send( 1204 'social', 1205 z( 1206 { 1207 transport: 'beacon', 1208 socialNetwork: 'Facebook', 1209 socialAction: 'like', 1210 socialTarget: a, 1211 }, 1212 this.a.fieldsObj, 1213 this.b, 1214 this.a.hitFilter, 1215 ), 1216 ); 1217 }; 1218 g.F = function (a) { 1219 this.b.send( 1220 'social', 1221 z( 1222 { 1223 transport: 'beacon', 1224 socialNetwork: 'Facebook', 1225 socialAction: 'unlike', 1226 socialTarget: a, 1227 }, 1228 this.a.fieldsObj, 1229 this.b, 1230 this.a.hitFilter, 1231 ), 1232 ); 1233 }; 1234 g.remove = function () { 1235 window.removeEventListener('load', this.u); 1236 try { 1237 window.FB.Event.unsubscribe('edge.create', this.B), 1238 window.FB.Event.unsubscribe('edge.remove', this.F); 1239 } catch (a) {} 1240 Xa(this); 1241 }; 1242 G('socialWidgetTracker', Wa); 1243 function Ya(a, b) { 1244 J(a, H.ba); 1245 history.pushState && 1246 window.addEventListener && 1247 ((this.a = A( 1248 { 1249 shouldTrackUrlChange: this.shouldTrackUrlChange, 1250 trackReplaceState: !1, 1251 fieldsObj: {}, 1252 hitFilter: null, 1253 }, 1254 b, 1255 )), 1256 (this.b = a), 1257 (this.c = location.pathname + location.search), 1258 (this.H = this.H.bind(this)), 1259 (this.I = this.I.bind(this)), 1260 (this.C = this.C.bind(this)), 1261 x(history, 'pushState', this.H), 1262 x(history, 'replaceState', this.I), 1263 window.addEventListener('popstate', this.C)); 1264 } 1265 g = Ya.prototype; 1266 g.H = function (a) { 1267 var b = this; 1268 return function (c) { 1269 for (var d = [], e = 0; e < arguments.length; ++e) d[e - 0] = arguments[e]; 1270 a.apply(null, [].concat(n(d))); 1271 Za(b, !0); 1272 }; 1273 }; 1274 g.I = function (a) { 1275 var b = this; 1276 return function (c) { 1277 for (var d = [], e = 0; e < arguments.length; ++e) d[e - 0] = arguments[e]; 1278 a.apply(null, [].concat(n(d))); 1279 Za(b, !1); 1280 }; 1281 }; 1282 g.C = function () { 1283 Za(this, !0); 1284 }; 1285 function Za(a, b) { 1286 setTimeout(function () { 1287 var c = a.c, 1288 d = location.pathname + location.search; 1289 c != d && 1290 a.a.shouldTrackUrlChange.call(a, d, c) && 1291 ((a.c = d), 1292 a.b.set({ page: d, title: document.title }), 1293 (b || a.a.trackReplaceState) && 1294 a.b.send('pageview', z({ transport: 'beacon' }, a.a.fieldsObj, a.b, a.a.hitFilter))); 1295 }, 0); 1296 } 1297 g.shouldTrackUrlChange = function (a, b) { 1298 return !(!a || !b); 1299 }; 1300 g.remove = function () { 1301 y(history, 'pushState', this.H); 1302 y(history, 'replaceState', this.I); 1303 window.removeEventListener('popstate', this.C); 1304 }; 1305 G('urlChangeTracker', Ya); 1306})(); 1307//# sourceMappingURL=autotrack.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.