PageSourceSearch

https://www.tampabay.com/pf/resources/js/analytics/autotrack.custom.js?d=798

js tampabay.com collected 2026-09-24 08:26:13 UTC 13,465 bytes, 488 lines download raw bytes

1(function() {
2  var f =
3      "function" == typeof Object.defineProperties
4        ? Object.defineProperty
5        : function(a, b, c) {
6            if (c.get || c.set)
7              throw new TypeError("ES3 does not support getters and setters.");
8            a != Array.prototype && a != Object.prototype && (a[b] = c.value);
9          },
10    g =
11      "undefined" != typeof window && window === this
12        ? this
13        : "undefined" != typeof global && null != global
14        ? global
15        : this;
16  function h() {
17    h = function() {};
18    g.Symbol || (g.Symbol = k);
19  }
20  var l = 0;
21  function k(a) {
22    return "jscomp_symbol_" + (a || "") + l++;
23  }
24  function m() {
25    h();
26    var a = g.Symbol.iterator;
27    a || (a = g.Symbol.iterator = g.Symbol("iterator"));
28    "function" != typeof Array.prototype[a] &&
29      f(Array.prototype, a, {
30        configurable: !0,
31        writable: !0,
32        value: function() {
33          return n(this);
34        }
35      });
36    m = function() {};
37  }
38  function n(a) {
39    var b = 0;
40    return q(function() {
41      return b < a.length ? { done: !1, value: a[b++] } : { done: !0 };
42    });
43  }
44  function q(a) {
45    m();
46    a = { next: a };
47    a[g.Symbol.iterator] = function() {
48      return this;
49    };
50    return a;
51  }
52  function r(a) {
53    if (!(a instanceof Array)) {
54      m();
55      var b = a[Symbol.iterator];
56      a = b ? b.call(a) : n(a);
57      for (var c = []; !(b = a.next()).done; ) c.push(b.value);
58      a = c;
59    }
60    return a;
61  }
62  function t(a, b) {
63    function c() {}
64    c.prototype = b.prototype;
65    a.N = b.prototype;
66    a.prototype = new c();
67    a.prototype.constructor = a;
68    for (var d in b)
69      if (Object.defineProperties) {
70        var e = Object.getOwnPropertyDescriptor(b, d);
71        e && Object.defineProperty(a, d, e);
72      } else a[d] = b[d];
73  }
74  var u = [];
75  function w(a, b) {
76    var c = this;
77    this.context = a;
78    this.u = b;
79    this.f = (this.c = /Task$/.test(b)) ? a.get(b) : a[b];
80    this.b = [];
81    this.a = [];
82    this.h = function(a) {
83      for (var b = [], d = 0; d < arguments.length; ++d)
84        b[d - 0] = arguments[d];
85      return c.a[c.a.length - 1].apply(null, [].concat(r(b)));
86    };
87    this.c ? a.set(b, this.h) : (a[b] = this.h);
88  }
89  function x(a, b, c) {
90    a = y(a, b);
91    a.b.push(c);
92    z(a);
93  }
94  function A(a, b, c) {
95    a = y(a, b);
96    c = a.b.indexOf(c);
97    -1 < c &&
98      (a.b.splice(c, 1),
99      0 < a.b.length
100        ? z(a)
101        : ((c = u.indexOf(a)),
102          -1 < c &&
103            (u.splice(c, 1),
104            a.c ? a.context.set(a.u, a.f) : (a.context[a.u] = a.f))));
105  }
106  function z(a) {
107    a.a = [];
108    for (var b, c = 0; (b = a.b[c]); c++) {
109      var d = a.a[c - 1] || a.f.bind(a.context);
110      a.a.push(b(d));
111    }
112  }
113  function y(a, b) {
114    var c = u.filter(function(c) {
115      return c.context == a && c.u == b;
116    })[0];
117    c || ((c = new w(a, b)), u.push(c));
118    return c;
119  }
120  function B(a, b, c, d) {
121    if ("function" == typeof d) {
122      var e = c.get("buildHitTask");
123      return {
124        buildHitTask: function(c) {
125          c.set(a, null, !0);
126          c.set(b, null, !0);
127          d(c, void 0, void 0);
128          e(c);
129        }
130      };
131    }
132    return C({}, a, b);
133  }
134  var D = {};
135  function E(a, b) {
136    function c() {
137      clearTimeout(e.timeout);
138      e.send && A(a, "send", e.send);
139      delete D[d];
140      e.w.forEach(function(a) {
141        return a();
142      });
143    }
144    var d = a.get("trackingId"),
145      e = (D[d] = D[d] || {});
146    clearTimeout(e.timeout);
147    e.timeout = setTimeout(c, 0);
148    e.w = e.w || [];
149    e.w.push(b);
150    e.send ||
151      ((e.send = function(a) {
152        return function(b) {
153          for (var d = [], e = 0; e < arguments.length; ++e)
154            d[e - 0] = arguments[e];
155          c();
156          a.apply(null, [].concat(r(d)));
157        };
158      }),
159      x(a, "send", e.send));
160  }
161  var C =
162      Object.assign ||
163      function(a, b) {
164        for (var c = [], d = 1; d < arguments.length; ++d)
165          c[d - 1] = arguments[d];
166        for (var d = 0, e = c.length; d < e; d++) {
167          var v = Object(c[d]),
168            p;
169          for (p in v)
170            Object.prototype.hasOwnProperty.call(v, p) && (a[p] = v[p]);
171        }
172        return a;
173      },
174    G = function F(b) {
175      return b
176        ? (b ^ ((16 * Math.random()) >> (b / 4))).toString(16)
177        : "10000000-1000-4000-8000-100000000000".replace(/[018]/g, F);
178    };
179  function H() {
180    this.a = {};
181  }
182  function aa(a, b) {
183    (a.a.externalSet = a.a.externalSet || []).push(b);
184  }
185  H.prototype.B = function(a, b) {
186    for (var c = [], d = 1; d < arguments.length; ++d) c[d - 1] = arguments[d];
187    (this.a[a] = this.a[a] || []).forEach(function(a) {
188      return a.apply(null, [].concat(r(c)));
189    });
190  };
191  var I = {},
192    J = !1,
193    K;
194  function L(a, b) {
195    b = void 0 === b ? {} : b;
196    this.a = {};
197    this.b = a;
198    this.j = b;
199    this.g = null;
200  }
201  t(L, H);
202  function M(a, b, c) {
203    a = ["autotrack", a, b].join(":");
204    I[a] ||
205      ((I[a] = new L(a, c)),
206      J || (window.addEventListener("storage", N), (J = !0)));
207    return I[a];
208  }
209  function O() {
210    if (null != K) return K;
211    try {
212      window.localStorage.setItem("autotrack", "autotrack"),
213        window.localStorage.removeItem("autotrack"),
214        (K = !0);
215    } catch (a) {
216      K = !1;
217    }
218    return K;
219  }
220  L.prototype.get = function() {
221    if (this.g) return this.g;
222    if (O())
223      try {
224        this.g = P(window.localStorage.getItem(this.b));
225      } catch (a) {}
226    return (this.g = C({}, this.j, this.g));
227  };
228  L.prototype.set = function(a) {
229    this.g = C({}, this.j, this.g, a);
230    if (O())
231      try {
232        var b = JSON.stringify(this.g);
233        window.localStorage.setItem(this.b, b);
234      } catch (c) {}
235  };
236  function ba(a) {
237    a.g = {};
238    if (O())
239      try {
240        window.localStorage.removeItem(a.b);
241      } catch (b) {}
242  }
243  function Q(a) {
244    delete I[a.b];
245    Object.keys(I).length ||
246      (window.removeEventListener("storage", N), (J = !1));
247  }
248  function N(a) {
249    var b = I[a.key];
250    if (b) {
251      var c = C({}, b.j, P(a.oldValue));
252      a = C({}, b.j, P(a.newValue));
253      b.g = a;
254      b.B("externalSet", a, c);
255    }
256  }
257  function P(a) {
258    var b = {};
259    if (a)
260      try {
261        b = JSON.parse(a);
262      } catch (c) {}
263    return b;
264  }
265  var R = {};
266  function S(a, b, c) {
267    this.f = a;
268    this.timeout = b || T;
269    this.timeZone = c;
270    this.b = this.b.bind(this);
271    x(a, "sendHitTask", this.b);
272    try {
273      this.c = new Intl.DateTimeFormat("en-US", { timeZone: this.timeZone });
274    } catch (d) {}
275    this.a = M(a.get("trackingId"), "session", { hitTime: 0, isExpired: !1 });
276    this.a.get().id || this.a.set({ id: G() });
277  }
278  function ca(a, b, c) {
279    var d = a.get("trackingId");
280    return R[d] ? R[d] : (R[d] = new S(a, b, c));
281  }
282  S.prototype.isExpired = function(a) {
283    a = void 0 === a ? this.a.get().id : a;
284    if (a != this.a.get().id) return !0;
285    a = this.a.get();
286    if (a.isExpired) return !0;
287    var b = a.hitTime;
288    return b &&
289      ((a = new Date()),
290      (b = new Date(b)),
291      a - b > 6e4 * this.timeout ||
292        (this.c && this.c.format(a) != this.c.format(b)))
293      ? !0
294      : !1;
295  };
296  S.prototype.b = function(a) {
297    var b = this;
298    return function(c) {
299      a(c);
300      var d = c.get("sessionControl");
301      c = "start" == d || b.isExpired();
302      var d = "end" == d,
303        e = b.a.get();
304      e.hitTime = +new Date();
305      c && ((e.isExpired = !1), (e.id = G()));
306      d && (e.isExpired = !0);
307      b.a.set(e);
308    };
309  };
310  var T = 30,
311    U = { D: 1, F: 2, G: 3, I: 4, J: 5, K: 6, A: 7, L: 8, M: 9, H: 10 },
312    V = Object.keys(U).length;
313  function da(a) {
314    var b = U.A;
315    a.set("\x26_av", "2.4.1");
316    var c = a.get("\x26_au"),
317      c = parseInt(c || "0", 16).toString(2);
318    if (c.length < V) for (var d = V - c.length; d; ) (c = "0" + c), d--;
319    b = V - b;
320    c = c.substr(0, b) + 1 + c.substr(b + 1);
321    a.set("\x26_au", parseInt(c || "0", 2).toString(16));
322  }
323  var W = G();
324  function X(a, b) {
325    var c = this;
326    da(a);
327    document.visibilityState &&
328      ((this.a = C(
329        {
330          sessionTimeout: T,
331          visibleThreshold: 5e3,
332          sendInitialPageview: !1,
333          fieldsObj: {}
334        },
335        b
336      )),
337      (this.b = a),
338      (this.h = document.visibilityState),
339      (this.o = null),
340      (this.v = !1),
341      (this.m = this.m.bind(this)),
342      (this.f = this.f.bind(this)),
343      (this.l = this.l.bind(this)),
344      (this.s = this.s.bind(this)),
345      (this.c = M(a.get("trackingId"), "plugins/page-visibility-tracker")),
346      aa(this.c, this.s),
347      (this.i = ca(a, this.a.sessionTimeout, this.a.timeZone)),
348      x(a, "set", this.m),
349      window.addEventListener("unload", this.l),
350      document.addEventListener("visibilitychange", this.f),
351      E(this.b, function() {
352        if ("visible" == document.visibilityState)
353          c.a.sendInitialPageview && (Y(c, { C: !0 }), (c.v = !0)),
354            c.c.set({
355              time: +new Date(),
356              state: "visible",
357              pageId: W,
358              sessionId: c.i.a.get().id
359            });
360        else if (c.a.sendInitialPageview && c.a.pageLoadsMetricIndex) {
361          var a = {},
362            a =
363              ((a.transport = "beacon"),
364              (a.eventCategory = "Page Visibility"),
365              (a.eventAction = "page load"),
366              (a.eventLabel = "(not set)"),
367              (a["metric" + c.a.pageLoadsMetricIndex] = 1),
368              (a.nonInteraction = !0),
369              a);
370          c.b.send("event", B(a, c.a.fieldsObj, c.b, c.a.hitFilter));
371        }
372      }));
373  }
374  X.prototype.f = function() {
375    var a = this;
376    if (
377      "visible" == document.visibilityState ||
378      "hidden" == document.visibilityState
379    ) {
380      var b = ea(this),
381        c = {
382          time: +new Date(),
383          state: document.visibilityState,
384          pageId: W,
385          sessionId: this.i.a.get().id
386        };
387      "visible" == document.visibilityState &&
388        this.a.sendInitialPageview &&
389        !this.v &&
390        (Y(this), (this.v = !0));
391      "hidden" == document.visibilityState && this.o && clearTimeout(this.o);
392      this.i.isExpired(b.sessionId)
393        ? (ba(this.c),
394          "hidden" == this.h &&
395            "visible" == document.visibilityState &&
396            (clearTimeout(this.o),
397            (this.o = setTimeout(function() {
398              a.c.set(c);
399              Y(a, { hitTime: c.time });
400            }, this.a.visibleThreshold))))
401        : (b.pageId == W && "visible" == b.state && Z(this, b), this.c.set(c));
402      this.h = document.visibilityState;
403    }
404  };
405  function ea(a) {
406    var b = a.c.get();
407    "visible" == a.h &&
408      "hidden" == b.state &&
409      b.pageId != W &&
410      ((b.state = "visible"), (b.pageId = W), a.c.set(b));
411    return b;
412  }
413  function Z(a, b, c) {
414    c = (c ? c : {}).hitTime;
415    var d = { hitTime: c },
416      d = (d ? d : {}).hitTime;
417    (b = b.time ? (d || +new Date()) - b.time : 0) &&
418      b >= a.a.visibleThreshold &&
419      ((b = Math.round(b / 1e3)),
420      (d = {
421        transport: "beacon",
422        nonInteraction: !0,
423        eventCategory: "Page Visibility",
424        eventAction: "track",
425        eventValue: b,
426        eventLabel: "(not set)"
427      }),
428      c && (d.queueTime = +new Date() - c),
429      a.a.visibleMetricIndex && (d["metric" + a.a.visibleMetricIndex] = b),
430      a.b.send("event", B(d, a.a.fieldsObj, a.b, a.a.hitFilter)));
431  }
432  function Y(a, b) {
433    var c = b ? b : {};
434    b = c.hitTime;
435    var c = c.C,
436      d = { transport: "beacon" };
437    b && (d.queueTime = +new Date() - b);
438    c &&
439      a.a.pageLoadsMetricIndex &&
440      (d["metric" + a.a.pageLoadsMetricIndex] = 1);
441    a.b.send("pageview", B(d, a.a.fieldsObj, a.b, a.a.hitFilter));
442  }
443  X.prototype.m = function(a) {
444    var b = this;
445    return function(c, d) {
446      var e = {},
447        e = "object" == typeof c && null !== c ? c : ((e[c] = d), e);
448      e.page && e.page !== b.b.get("page") && "visible" == b.h && b.f();
449      a(c, d);
450    };
451  };
452  X.prototype.s = function(a, b) {
453    a.time != b.time &&
454      (b.pageId != W ||
455        "visible" != b.state ||
456        this.i.isExpired(b.sessionId) ||
457        Z(this, b, { hitTime: a.time }));
458  };
459  X.prototype.l = function() {
460    "hidden" != this.h && this.f();
461  };
462  X.prototype.remove = function() {
463    Q(this.c);
464    var a = this.i;
465    A(a.f, "sendHitTask", a.b);
466    Q(a.a);
467    delete R[a.f.get("trackingId")];
468    A(this.b, "set", this.m);
469    window.removeEventListener("unload", this.l);
470    document.removeEventListener("visibilitychange", this.f);
471  };
472  (function(a, b) {
473    var c = window.GoogleAnalyticsObject || "ga";
474    window[c] =
475      window[c] ||
476      function(a) {
477        for (var b = [], d = 0; d < arguments.length; ++d)
478          b[d - 0] = arguments[d];
479        (window[c].q = window[c].q || []).push(b);
480      };
481    window.gaDevIds = window.gaDevIds || [];
482    0 > window.gaDevIds.indexOf("i5iSjo") && window.gaDevIds.push("i5iSjo");
483    window[c]("provide", a, b);
484    window.gaplugins = window.gaplugins || {};
485    window.gaplugins[a.charAt(0).toUpperCase() + a.slice(1)] = b;
486  })("pageVisibilityTracker", X);
487})();
488//# sourceMappingURL=autotrack.custom.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.