Skip to content

Instantly share code, notes, and snippets.

@steckel
Created February 28, 2019 17:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steckel/c9f2e7c1760ceac2d07f3cbc8568c0c7 to your computer and use it in GitHub Desktop.
Save steckel/c9f2e7c1760ceac2d07f3cbc8568c0c7 to your computer and use it in GitHub Desktop.
//!Portions of this code are licensed under the following license:
//! * @overview es6-promise - a tiny implementation of Promises/A+.
//! * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
//! * @license Licensed under MIT license
//! * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
//! * @version 4.1.0+f9a5575b
!function(e) {
var t = {};
function n(r) {
if (t[r])
return t[r].exports;
var i = t[r] = {
i: r,
l: !1,
exports: {}
};
return e[r].call(i.exports, i, i.exports, n),
i.l = !0,
i.exports
}
n.m = e,
n.c = t,
n.d = function(e, t, r) {
n.o(e, t) || Object.defineProperty(e, t, {
enumerable: !0,
get: r
})
}
,
n.r = function(e) {
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
value: "Module"
}),
Object.defineProperty(e, "__esModule", {
value: !0
})
}
,
n.t = function(e, t) {
if (1 & t && (e = n(e)),
8 & t)
return e;
if (4 & t && "object" == typeof e && e && e.__esModule)
return e;
var r = Object.create(null);
if (n.r(r),
Object.defineProperty(r, "default", {
enumerable: !0,
value: e
}),
2 & t && "string" != typeof e)
for (var i in e)
n.d(r, i, function(t) {
return e[t]
}
.bind(null, i));
return r
}
,
n.n = function(e) {
var t = e && e.__esModule ? function() {
return e["default"]
}
: function() {
return e
}
;
return n.d(t, "a", t),
t
}
,
n.o = function(e, t) {
return Object.prototype.hasOwnProperty.call(e, t)
}
,
n.p = "",
n(n.s = 29)
}([function(e, t, n) {
"use strict";
var r, i = this && this.__awaiter || function(e, t, n, r) {
return new (n || (n = Promise))(function(i, o) {
function s(e) {
try {
u(r.next(e))
} catch (e) {
o(e)
}
}
function a(e) {
try {
u(r["throw"](e))
} catch (e) {
o(e)
}
}
function u(e) {
e.done ? i(e.value) : new n(function(t) {
t(e.value)
}
).then(s, a)
}
u((r = r.apply(e, t || [])).next())
}
)
}
, o = this && this.__generator || function(e, t) {
var n, r, i, o, s = {
label: 0,
sent: function() {
if (1 & i[0])
throw i[1];
return i[1]
},
trys: [],
ops: []
};
return o = {
next: a(0),
"throw": a(1),
"return": a(2)
},
"function" == typeof Symbol && (o[Symbol.iterator] = function() {
return this
}
),
o;
function a(o) {
return function(a) {
return function(o) {
if (n)
throw new TypeError("Generator is already executing.");
for (; s; )
try {
if (n = 1,
r && (i = 2 & o[0] ? r["return"] : o[0] ? r["throw"] || ((i = r["return"]) && i.call(r),
0) : r.next) && !(i = i.call(r, o[1])).done)
return i;
switch (r = 0,
i && (o = [2 & o[0], i.value]),
o[0]) {
case 0:
case 1:
i = o;
break;
case 4:
return s.label++,
{
value: o[1],
done: !1
};
case 5:
s.label++,
r = o[1],
o = [0];
continue;
case 7:
o = s.ops.pop(),
s.trys.pop();
continue;
default:
if (!(i = (i = s.trys).length > 0 && i[i.length - 1]) && (6 === o[0] || 2 === o[0])) {
s = 0;
continue
}
if (3 === o[0] && (!i || o[1] > i[0] && o[1] < i[3])) {
s.label = o[1];
break
}
if (6 === o[0] && s.label < i[1]) {
s.label = i[1],
i = o;
break
}
if (i && s.label < i[2]) {
s.label = i[2],
s.ops.push(o);
break
}
i[2] && s.ops.pop(),
s.trys.pop();
continue;
}
o = t.call(e, s)
} catch (e) {
o = [6, e],
r = 0
} finally {
n = i = 0
}
if (5 & o[0])
throw o[1];
return {
value: o[0] ? o[1] : void 0,
done: !0
}
}([o, a])
}
}
}
;
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(10)
, a = n(6)
, u = n(5)
, c = n(1)
, h = n(12);
t._native_bind = function(e, t) {
for (var n = [], r = 2; r < arguments.length; r++)
n[r - 2] = arguments[r];
return e.bind.apply(e, [t].concat(n))
}
,
t._js_bind = function(e, t) {
for (var n = [], r = 2; r < arguments.length; r++)
n[r - 2] = arguments[r];
return function() {
var r = Array.prototype.slice.call(arguments);
e.call.apply(e, [t].concat(n, r))
}
}
,
t.bind = Function.prototype.bind ? t._native_bind : t._js_bind,
t._native_map = function(e, t, n) {
return e.map(t, n)
}
,
t._js_map = function(e, t, n) {
for (var r = Array(e.length), i = 0; i < e.length; i++)
r[i] = t.call(n, e[i], i, e);
return r
}
,
t.map = Array.prototype.map ? t._native_map : t._js_map,
t._native_trim = function(e) {
return e.trim()
}
,
t._js_trim = function(e) {
return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "")
}
,
t.trim = String.prototype.trim ? t._native_trim : t._js_trim,
t._native_filter = function(e, t, n) {
return e.filter(t, n)
}
,
t._js_filter = function(e, t, n) {
for (var r = Array(e.length), i = 0; i < e.length; i++)
r[i] = t.call(n, e[i], i, e);
return r
}
,
t.filter = Array.prototype.filter ? t._native_filter : t._js_filter;
function d() {
var e = function(e) {
return e.matches || e.msMatchesSelector || e.webkitMatchesSelector
}
, t = e(window.Element.prototype)
, n = window.document ? window.document.documentElement : void 0;
return !n || t && n instanceof window.Element || (t = e(n)),
[t, function(e, n) {
return t.call(e, n)
}
]
}
t.isArray = u.windex.arrayIsArray ? function(e) {
return u.windex.arrayIsArray(e)
}
: function(e) {
return "[object Array]" == u.windex.objectToString.call(e)
}
,
t._native_keys = function(e) {
return u.windex.objectKeys(e)
}
,
t._js_keys = function(e) {
var t = [];
for (var n in e)
u.windex.objectHasOwnProp(e, n) && t.push(n);
return t
}
,
t.keys = "function" == typeof u.windex.objectKeys ? t._native_keys : t._js_keys,
t.setMatchesSelector = function(e) {
t.matchesSelector = e
}
,
t.setUpMatchesSelector = d,
r = d(),
t._native_matchesSelector = r[0],
t.matchesSelector = r[1],
t.hasPrefix = function(e, t) {
return 0 == e.lastIndexOf(t, 0)
}
,
t.hasSuffix = function(e, t) {
return !(t.length > e.length) && e.substring(e.length - t.length) == t
}
,
t.forIn = function(e, t) {
for (var n in e)
u.windex.objectHasOwnProp(e, n) && t(e[n], n, e)
}
,
t.forInAsync = function(e, t) {
return i(this, void 0, a.FSPromise, function() {
var n, r, i, s;
return o(this, function(o) {
switch (o.label) {
case 0:
for (r in n = [],
e)
n.push(r);
i = 0,
o.label = 1;
case 1:
return i < n.length ? (s = n[i],
u.windex.objectHasOwnProp(e, s) ? [4, t(e[s], s, e)] : [3, 3]) : [3, 4];
case 2:
o.sent(),
o.label = 3;
case 3:
return i++,
[3, 1];
case 4:
return [2];
}
})
})
}
,
t.firstKey = function(e) {
for (var t in e)
if (Object.prototype.hasOwnProperty.call(e, t))
return t
}
,
t.firstValue = function(e) {
for (var t in e)
if (Object.prototype.hasOwnProperty.call(e, t))
return e[t]
}
,
t.hasNKeys = function(e, t) {
var n = 0;
for (var r in e)
if (Object.prototype.hasOwnProperty.call(e, r) && ++n > t)
return !1;
return n == t
}
,
t.hasMoreThanNKeys = function(e, t) {
var n = 0;
for (var r in e)
if (Object.prototype.hasOwnProperty.call(e, r) && ++n > t)
return !0;
return !1
}
;
t.nextSibling = s.uaIsIE ? function(e) {
var t = e.nextSibling;
return t && e.parentNode && t === e.parentNode.firstChild ? null : t
}
: function(e) {
return e.nextSibling
}
;
t.forEachNextSibling = s.uaIsIE ? function(e, t) {
if (e) {
var n = e.parentNode ? e.parentNode.firstChild : null;
do {
t(e),
e = e.nextSibling
} while (e && e != n)
}
}
: function(e, t) {
for (; e; e = e.nextSibling)
t(e)
}
;
function l(e, t) {
if (!e)
return h.doNothing;
var n = function(e) {
try {
var t = window;
return t.Zone && t.Zone.root && "function" == typeof t.Zone.root.wrap ? t.Zone.root.wrap(e) : e
} catch (t) {
return e
}
}(e);
return t && (n = n.bind(t)),
h.guard(n, function(e) {
c.logIfDebug("Unexpected error: " + e)
})
}
function f(e) {
var t = "Internal error: unable to determine what JSON error was";
try {
t = (t = "" + e).replace(/[^a-zA-Z0-9\.\:\!\, ]/g, "_")
} catch (e) {}
return "\"" + t + "\""
}
t.previousSibling = s.uaIsIE ? function(e) {
var t = e.previousSibling;
return t && e.parentNode && t === e.parentNode.lastChild ? null : t
}
: function(e) {
return e.previousSibling
}
,
t.values = function(e) {
if (u.windex.objectValues)
return u.windex.objectValues(e || {});
var t = [];
for (var n in e)
e.hasOwnProperty(n) && t.push(e[n]);
return t
}
,
t.$entry = l,
t.stringify = function(e) {
var t, n = Array.prototype.toJSON, r = String.prototype.toJSON;
n && (Array.prototype.toJSON = void 0),
r && (String.prototype.toJSON = void 0);
try {
t = u.windex.jsonStringify(e)
} catch (e) {
t = f(e)
} finally {
n && (Array.prototype.toJSON = n),
r && (String.prototype.toJSON = r)
}
return t
}
,
t.jsonErrorString = f,
t.doctypeString = function(e) {
var t = e.doctype;
if (!t)
return "";
var n = "<!DOCTYPE ";
return n += t.name,
t.publicId && (n += " PUBLIC \"" + t.publicId + "\""),
t.systemId && (n += " \"" + t.systemId + "\""),
n + ">"
}
,
t.parseJson = function(e) {
return u.windex.jsonParse(e)
}
,
t.tryGetScreenDims = function(e) {
var t = 0
, n = 0;
return null == e.screen ? [t, n] : (t = parseInt(String(e.screen.width)),
n = parseInt(String(e.screen.height)),
[t = isNaN(t) ? 0 : t, n = isNaN(n) ? 0 : n])
}
;
var p = function() {
function e(e, t) {
this.target = e,
this.propertyName = t,
this._before = h.doNothing,
this._afterSync = h.doNothing,
this._afterAsync = h.doNothing,
this.on = !1,
this.attached = !1,
this["native"] = e[t]
}
return e.prototype.before = function(e) {
return this._before = l(e),
this
}
,
e.prototype.afterSync = function(e) {
return this._afterSync = l(e),
this
}
,
e.prototype.afterAsync = function(e) {
var t = this;
return this._afterAsync = l(function(e) {
u.windex.setWindowTimeout(window, h.guard(function() {
t._afterAsync(e)
}), 0)
}),
this
}
,
e.prototype.disable = function() {
this.on = !1,
this.target[this.propertyName] == this.shim && (this.target[this.propertyName] = this["native"],
this.attached = !1)
}
,
e.prototype.enable = function() {
if (this.on = !0,
this.attached)
return !0;
this.shim || (this.shim = this.makeShim());
try {
this.target[this.propertyName] = this.shim
} catch (e) {
return !1
}
return this.attached = !0,
!0
}
,
e.prototype.makeShim = function() {
var e = this;
return function() {
var t = {
that: this,
args: arguments
};
e.on && e._before(t);
var n = e["native"].apply(this, arguments);
return e.on && (e._afterSync(t),
e._afterAsync(t)),
n
}
}
,
e
}()
, _ = {};
t.activateHook = function(e, t) {
if (!e || "function" != typeof e[t])
return null;
var n;
_[t] = _[t] || [];
for (var r = 0; r < _[t].length; r++)
_[t][r].obj == e && (n = _[t][r].hook);
return n || (n = new p(e,t),
_[t].push({
obj: e,
hook: n
})),
n.enable() ? n : null
}
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = !1;
function i() {
return r
}
t.initDebug = function(e) {
r = e
}
,
t.isDebug = i,
t.logIfDebug = function(e) {
i() && window.console && console.log(e)
}
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(17)
, i = n(1)
, o = n(7)
, s = n(19)
, a = n(12)
, u = 10
, c = "[anonymous]"
, h = /function\s*([\w\-$]+)?\s*\(/i;
function d(e) {
return e.stack || e.backtrace || e.stacktrace
}
var l = function() {
function e() {}
return e.wrap = function(t, n) {
return void 0 === n && (n = "error"),
a.guard(t, function(t) {
return e.sendToBugsnag(t, n)
})
}
,
e.errorLimit = 15,
e.sendToBugsnag = function(t, n, a) {
if (!(e.errorLimit <= 0)) {
e.errorLimit--,
"string" == typeof t && (t = new Error(t));
var l = r.getCookies(document).fs_uid
, f = l ? r.parseIdentityCookie(l) : void 0;
f && f.OrgId != o._fs_org(window) && (f = void 0);
var p = Date.now()
, _ = new Date(1e3 * s.CompiledTimestamp).toISOString()
, g = {
projectRoot: window.location.origin,
deviceTime: p,
inIframe: function() {
try {
return window.self !== window.top
} catch (e) {
return !0
}
}(),
CompiledTimestamp: s.CompiledTimestamp,
CompiledTime: _,
orgId: o._fs_org(window),
"userId:sessionId": f ? f.UserId + ":" + f.SessionId : "NA",
context: document.location && document.location.pathname,
message: t.message,
name: "Recording Error",
releaseStage: "production " + _,
severity: n,
language: navigator.language || navigator.userLanguage || "en-GB",
stacktrace: d(t) || function() {
var e, t;
try {
throw new Error("")
} catch (n) {
e = "<generated>\n",
t = d(n)
}
if (!t) {
e = "<generated-ie>\n";
var n = [];
try {
for (var r = arguments.callee.caller.caller; r && n.length < u; ) {
var o = h.test(r.toString()) && RegExp.$1 || c;
n.push(o),
r = r.caller
}
} catch (e) {
i.logIfDebug(e)
}
t = n.join("\n")
}
return e + t
}()
};
if (a)
for (var v in a)
g["aux_" + v] = a[v];
var y = [];
for (var v in g)
y.push(encodeURIComponent(v) + "=" + encodeURIComponent(g[v]));
new Image().src = "https://" + o._fs_rec_host(window) + "/rec/except?" + y.join("&")
}
}
,
e
}();
t.FsBugSnag = l;
var f = {};
t.assert = function(e, t, n) {
if (void 0 === n && (n = 1),
e)
return !0;
if (f[t] = f[t] || 0,
f[t]++,
f[t] > n)
return !1;
var r = new Error("Assertion failed: " + t);
return l.sendToBugsnag(r, "error"),
e
}
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.EVENT_MUT_INSERT = 2,
t.EVENT_MUT_REMOVE = 3,
t.EVENT_MUT_ATTR = 4,
t.EVENT_MUT_ATTR_CURVE = 5,
t.EVENT_MUT_TEXT = 6,
t.EVENT_MUT_SKIPIDS = 7,
t.EVENT_MOUSEMOVE = 8,
t.EVENT_MOUSEMOVE_CURVE = 9,
t.EVENT_SCROLL_LAYOUT = 10,
t.EVENT_SCROLL_LAYOUT_CURVE = 11,
t.EVENT_MOUSEDOWN = 12,
t.EVENT_MOUSEUP = 13,
t.EVENT_KEYDOWN = 14,
t.EVENT_KEYUP = 15,
t.EVENT_CLICK = 16,
t.EVENT_FOCUS = 17,
t.EVENT_VALUECHANGE = 18,
t.EVENT_RESIZE_LAYOUT = 19,
t.EVENT_DOMLOADED = 20,
t.EVENT_LOAD = 21,
t.EVENT_PLACEHOLDER_SIZE = 22,
t.EVENT_UNLOAD = 23,
t.EVENT_BLUR = 24,
t.EVENT_SET_FRAME_BASE = 25,
t.EVENT_TOUCHSTART = 32,
t.EVENT_TOUCHEND = 33,
t.EVENT_TOUCHCANCEL = 34,
t.EVENT_TOUCHMOVE = 35,
t.EVENT_TOUCHMOVE_CURVE = 36,
t.EVENT_NAVIGATE = 37,
t.EVENT_PLAY = 38,
t.EVENT_PAUSE = 39,
t.EVENT_RESIZE_VISUAL = 40,
t.EVENT_RESIZE_VISUAL_CURVE = 41,
t.EVENT_LOG = 48,
t.EVENT_ERROR = 49,
t.EVENT_DBL_CLICK = 50,
t.EVENT_FORM_SUBMIT = 51,
t.EVENT_WINDOW_FOCUS = 52,
t.EVENT_WINDOW_BLUR = 53,
t.EVENT_HEARTBEAT = 54,
t.EVENT_WATCHED_ELEM = 56,
t.PerfEntryTiming = 0,
t.PerfEntryNavigation = 1,
t.PerfEntryResource = 2,
t.PerfEntryPaint = 3,
t.PerfEntryMark = 4,
t.PerfEntryMeasure = 5,
t.PerfEntryMemory = 6,
t.EVENT_PERF_ENTRY = 57,
t.RecFeaturePerformance = 0,
t.RecFeaturePerformanceEntries = 1,
t.RecFeaturePerformanceMemory = 2,
t.RecFeatureConsole = 3,
t.RecFeatureAjax = 4,
t.EVENT_REC_FEAT_SUPPORTED = 58,
t.EVENT_SELECT = 59,
t.RecStylesheetOwnerTypeNode = 0,
t.RecStylesheetOwnerTypeRule = 1,
t.EVENT_CSSRULE_INSERT = 60,
t.EVENT_CSSRULE_DELETE = 61,
t.ThrottledStyleSheetHooks = 0,
t.ThrottledSetPropertyHooks = 1,
t.EVENT_FAIL_THROTTLED = 62,
t.EVENT_AJAX_REQUEST = 63,
t.EVENT_SCROLL_VISUAL_OFFSET = 64,
t.EVENT_SCROLL_VISUAL_OFFSET_CURVE = 65,
t.EVENT_MEDIA_QUERY_CHANGE = 66,
t.EVENT_RESOURCE_TIMING_BUFFER_FULL = 67,
t.EVENT_SYS_SETMETA = 8192,
t.EVENT_SYS_SETVAR = 8193,
t.EVENT_SYS_HIGHLIGHT = 8194,
t.EVENT_SYS_RESOURCEHASH = 8195,
t.EVENT_SYS_SETCONSENT = 8196,
t.EVENT_SYS_CUSTOM = 8197,
t.EVENT_COOKED_LOAD_MELTED = "load-melted",
t.EVENT_COOKED_LOAD = "load",
t.EVENT_COOKED_UNLOAD = "unload",
t.EVENT_COOKED_NAVIGATE = "navigate",
t.EVENT_COOKED_CLICK = "click",
t.EVENT_COOKED_TAP = "tap",
t.EVENT_COOKED_FOCUS = "focus",
t.EVENT_COOKED_CHANGE = "change",
t.EVENT_COOKED_MOUSE_THRASH = "thrash",
t.EVENT_FORM_ABANDONED = "abandon",
t.EVENT_COOKED_ELEM_SEEN = "seen",
t.EVENT_COOKED_REQUEST = "request",
t.EVENT_COOKED_LONG_CLICK = "long_click",
t.EVENT_COOKED_UNHANDLED_CLICK = "unhandled_click",
t.EVENT_COOKED_UNHANDLED_LONG_CLICK = "unhandled_long_click",
t.EVENT_COOKED_BACKGROUNDED = "backgrounded",
t.EVENT_COOKED_CRASHED = "crashed",
t.EVENT_COOKED_CUSTOM = "custom",
t.EVENT_COOKED_USERVAR = "uservar",
t.isUserActionEvent = function(e) {
switch (e) {
case t.EVENT_MOUSEDOWN:
case t.EVENT_MOUSEMOVE:
case t.EVENT_MOUSEMOVE_CURVE:
case t.EVENT_MOUSEUP:
case t.EVENT_KEYDOWN:
case t.EVENT_KEYUP:
case t.EVENT_TOUCHSTART:
case t.EVENT_TOUCHEND:
case t.EVENT_TOUCHMOVE:
case t.EVENT_TOUCHMOVE_CURVE:
case t.EVENT_TOUCHCANCEL:
case t.EVENT_CLICK:
case t.EVENT_SCROLL_LAYOUT:
case t.EVENT_SCROLL_LAYOUT_CURVE:
case t.EVENT_SCROLL_VISUAL_OFFSET:
case t.EVENT_SCROLL_VISUAL_OFFSET_CURVE:
case t.EVENT_NAVIGATE:
return !0;
}
return !1
}
,
t.MAX_LOGS_PER_PAGE = 1024,
t.AjaxBodyElide = 0,
t.AjaxBodyRecord = 1,
t.AjaxBodyWhitelist = 2
}
, function(e, t, n) {
"use strict";
var r, i = this && this.__extends || (r = function(e, t) {
return (r = Object.setPrototypeOf || {
__proto__: []
}instanceof Array && function(e, t) {
e.__proto__ = t
}
|| function(e, t) {
for (var n in t)
t.hasOwnProperty(n) && (e[n] = t[n])
}
)(e, t)
}
,
function(e, t) {
function n() {
this.constructor = e
}
r(e, t),
e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype,
new n)
}
);
Object.defineProperty(t, "__esModule", {
value: !0
});
var o = n(0)
, s = n(2)
, a = n(6)
, u = n(5)
, c = function() {
function e() {
var t = this;
this._wrappedTick = s.FsBugSnag.wrap(function() {
t.unregister(),
t._tick()
}),
this._due = 0,
this._id = e.nextId++
}
return e._rearm = function() {
e.checkedAlready = !1,
e.lastCheck = 0
}
,
e.checkForBrokenSchedulers = function() {
if (u.windex.requestWindowAnimationFrame && !e.checkedAlready) {
var t = Date.now();
if (!(t - e.lastCheck < 100)) {
e.lastCheck = t,
e.checkedAlready = !0;
var n = [];
return o.forIn(e.registry, function(e) {
var r = e.maybeForceTick(t);
r && n.push(r)
}),
a.FSPromise.all(n).then(function() {
u.windex.requestWindowAnimationFrame(window, s.FsBugSnag.wrap(function() {
e.checkedAlready = !1
}))
})
}
}
}
,
e.stopAll = function() {
o.forIn(this.registry, function(e) {
return e.stop()
})
}
,
e.prototype.setTick = function(e) {
this._tick = e
}
,
e.prototype.stop = function() {
this.cancel(),
delete e.registry[this._id]
}
,
e.prototype.register = function(t) {
this._due = Date.now() + 100 + 1.5 * t,
e.registry[this._id] = this
}
,
e.prototype.unregister = function() {
delete e.registry[this._id]
}
,
e.prototype.maybeForceTick = function(e) {
if (e > this._due)
return a.FSPromise.resolve().then(this._wrappedTick)["catch"](function() {})
}
,
e.registry = {},
e.nextId = 0,
e.checkedAlready = !1,
e.lastCheck = 0,
e
}();
t.Scheduler = c;
var h = function(e) {
function t(t) {
var n = e.call(this) || this;
return n._interval = t,
n._handle = -1,
n
}
return i(t, e),
t.prototype.start = function(e) {
var t = this;
-1 == this._handle && (this.setTick(function() {
e(),
t.register(t._interval)
}),
this._handle = u.windex.setWindowInterval(window, this._wrappedTick, this._interval),
this.register(this._interval))
}
,
t.prototype.cancel = function() {
-1 != this._handle && (u.windex.clearWindowInterval(window, this._handle),
this._handle = -1,
this.setTick(function() {}))
}
,
t
}(c);
t.RealTicker = h;
var d = function(e) {
function t(t, n, r) {
void 0 === n && (n = 0);
for (var i = [], o = 3; o < arguments.length; o++)
i[o - 3] = arguments[o];
var s = e.call(this) || this;
return s.delay = n,
s.timer = -1,
s.setTick(function() {
t.apply(void 0 === r ? window : r, i),
s.stop()
}),
s
}
return i(t, e),
t.prototype.start = function(e) {
return void 0 === e && (e = this.delay),
this.delay = e,
u.windex.clearWindowTimeout(window, this.timer),
this.timer = u.windex.setWindowTimeout(window, this._wrappedTick, this.delay),
this.register(e),
this
}
,
t.prototype.cancel = function() {
-1 != this.timer && (u.windex.clearWindowTimeout(window, this.timer),
this.timer = -1)
}
,
t
}(c);
t.RealTimeout = d;
var l = function() {
function e(e, t, n) {
this.limit = e,
this.breaker = n,
this.remaining = 0,
this.ticker = new h(t),
this.open()
}
return e.prototype.guard = function(e) {
var t = this;
return function() {
return 0 == t.remaining ? (t.breaker(),
void t.remaining--) : t.remaining < 0 ? void 0 : (t.remaining--,
e.apply(this, arguments))
}
}
,
e.prototype.close = function() {
return this.ticker.stop(),
this
}
,
e.prototype.open = function() {
var e = this;
return this.remaining = this.limit,
this.ticker.start(function() {
e.remaining = e.limit
}),
this
}
,
e
}();
t.Throttle = l;
var f = function() {
function e() {
this._startTime = this.wallTime()
}
return e.prototype.wallTime = function() {
return Date.now()
}
,
e.prototype.now = function() {
return this.wallTime() - this._startTime
}
,
e.prototype.startTime = function() {
return this._startTime
}
,
e.prototype.setStartTime = function(e) {
this._startTime = e
}
,
e
}();
t.Timekeeper = f
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}),
n(23);
var r = n(10)
, i = n(1)
, o = n(2)
, s = n(6);
function a(e, t) {
try {
return {
done: t,
jsonParse: e.JSON.parse,
jsonStringify: e.JSON.stringify,
arrayShift: u(e.Array.prototype.shift),
arrayIsArray: e.Array.isArray,
objectToString: u(e.Object.prototype.toString),
objectKeys: e.Object.keys,
objectValues: e.Object.values || null,
objectHasOwnProp: u(e.Object.prototype.hasOwnProperty),
matchMedia: c(e.matchMedia),
setWindowTimeout: u(e.setTimeout),
setWindowInterval: u(e.setInterval),
clearWindowTimeout: u(e.clearTimeout),
clearWindowInterval: u(e.clearInterval),
requestWindowAnimationFrame: c(e.requestAnimationFrame)
}
} catch (e) {
return
}
}
function u(e) {
return function(t) {
for (var n = [], r = 1; r < arguments.length; r++)
n[r - 1] = arguments[r];
return e.apply(t, n)
}
}
function c(e) {
return e ? u(e) : null
}
t.initWindex = function(e) {
try {
if (r.uaIsIE || r.uaIsEdge || function(e) {
var t = [function() {
throw new Error("")
}
, Function.prototype.toString].map(function(e) {
try {
return void e.call(null)
} catch (e) {
return e.stack || ""
}
})
, n = t[0]
, r = t[1];
if (!n || !r)
return !1;
for (var i = "\n".charCodeAt(0), o = Math.min(n.length, r.length), s = 1, a = s; a < o; a++) {
var u = n.charCodeAt(n.length - a)
, c = r.charCodeAt(r.length - a);
if (u != c)
break;
c != i && a != o - 1 || (s = a)
}
if (r.slice(0, r.length - s + 1).match(/\.js:\d+([:)]|$)/m))
return !1;
var h = function(e) {
return "function" == typeof e && Function.prototype.toString.call(e).indexOf("[native code]") < 0
};
return !(h(e.JSON.parse) || h(e.JSON.stringify) || h(e.Array) || h(e.Array.prototype.shift) || h(e.Array.isArray) || h(e.Object.prototype.toString) || h(e.Object.keys) || h(e.Object.values) || h(e.Object.prototype.hasOwnProperty) || h(e.setTimeout) || h(e.setInterval) || h(e.clearTimeout) || h(e.clearInterval))
}(e))
return t.windex.done = !0,
s.FSPromise.resolve();
if (!e.document || t.windex.done)
return s.FSPromise.resolve();
i.logIfDebug("Window object doesn't look clean; creating windex.");
var n = e.document.createElement("iframe");
n.id = "FullStory-iframe",
n.className = "fs-hide",
n.style.display = "none";
var u = e.document.body || e.document.head || e.document.documentElement || e.document;
try {
u.appendChild(n)
} catch (e) {
return s.FSPromise.resolve()
}
if (n.src = "about:blank",
!n.contentWindow)
return s.FSPromise.resolve();
var c, h = a(n.contentWindow, !0);
if (n.parentNode && n.parentNode.removeChild(n),
!h)
return s.FSPromise.resolve();
var d = new s.FSPromise(function(e) {
return c = e
}
);
return setTimeout(function() {
try {
if (!h)
throw "";
h.jsonParse("[]").push(0),
t._setWindex(h)
} catch (e) {
t.windex.done = !0
}
c()
}),
d
} catch (e) {
return o.FsBugSnag.sendToBugsnag(e, "error"),
s.FSPromise.resolve()
}
}
,
t._makeWindex = a,
t.windex = a(window, !1),
t._setWindex = function(e) {
for (var n in t.windex)
t.windex[n] = e[n]
}
}
, function(e, t, n) {
"use strict";
function r(e) {
return "function" == typeof e
}
Object.defineProperty(t, "__esModule", {
value: !0
});
var i = Array.isArray ? Array.isArray : function(e) {
return "[object Array]" === Object.prototype.toString.call(e)
}
, o = 0
, s = function(e, t) {
_[o] = e,
_[o + 1] = t,
2 === (o += 2) && c()
};
var a = window.MutationObserver || window.WebKitMutationObserver
, u = "undefined" != typeof Uint8ClampedArray && "undefined" != typeof self && void 0 !== self.importScripts && "undefined" != typeof MessageChannel;
var c, h, d, l, f, p, _ = new Array(1e3);
function g() {
for (var e = 0; e < o; e += 2) {
(0,
_[e])(_[e + 1]),
_[e] = void 0,
_[e + 1] = void 0
}
o = 0
}
function v(e, t) {
var n = arguments
, r = this
, i = new this.constructor(E);
void 0 === i[m] && L(i);
var o, a = r._state;
return a ? (o = n[a - 1],
s(function() {
return x(a, i, o, r._result)
})) : A(r, i, e, t),
i
}
function y(e) {
if (e && "object" == typeof e && e.constructor === this)
return e;
var t = new this(E);
return O(t, e),
t
}
a ? (l = 0,
f = new a(g),
p = document.createTextNode(""),
f.observe(p, {
characterData: !0
}),
c = function() {
var e = l = ++l % 2;
p.data = e + ""
}
) : u ? ((d = new MessageChannel).port1.onmessage = g,
c = function() {
return d.port2.postMessage(0)
}
) : (h = setTimeout,
c = function() {
return h(g, 1)
}
);
var m = Math.random().toString(36).substring(16);
function E() {}
var S = void 0
, w = 1
, T = 2
, b = new F;
function I(e) {
try {
return e.then
} catch (e) {
return b.error = e,
b
}
}
function N(e, t, n) {
t.constructor === e.constructor && n === v && t.constructor.resolve === y ? function(e, t) {
t._state === w ? R(e, t._result) : t._state === T ? k(e, t._result) : A(t, void 0, function(t) {
return O(e, t)
}, function(t) {
return k(e, t)
})
}(e, t) : n === b ? (k(e, b.error),
b.error = null) : void 0 === n ? R(e, t) : r(n) ? function(e, t, n) {
s(function(e) {
var r = !1
, i = function(e, t, n, r, i) {
try {
e.call(t, n, r)
} catch (e) {
return e
}
}(n, t, function(n) {
r || (r = !0,
t !== n ? O(e, n) : R(e, n))
}, function(t) {
r || (r = !0,
k(e, t))
}, e._label);
!r && i && (r = !0,
k(e, i))
}, e)
}(e, t, n) : R(e, t)
}
function O(e, t) {
var n;
e === t ? k(e, new TypeError("You cannot resolve a promise with itself")) : "function" == typeof (n = t) || "object" == typeof n && null !== n ? N(e, t, I(t)) : R(e, t)
}
function C(e) {
e._onerror && e._onerror(e._result),
P(e)
}
function R(e, t) {
e._state === S && (e._result = t,
e._state = w,
0 !== e._subscribers.length && s(P, e))
}
function k(e, t) {
e._state === S && (e._state = T,
e._result = t,
s(C, e))
}
function A(e, t, n, r) {
var i = e._subscribers
, o = i.length;
e._onerror = null,
i[o] = t,
i[o + w] = n,
i[o + T] = r,
0 === o && e._state && s(P, e)
}
function P(e) {
var t = e._subscribers
, n = e._state;
if (0 !== t.length) {
for (var r, i, o = e._result, s = 0; s < t.length; s += 3)
r = t[s],
i = t[s + n],
r ? x(n, r, i, o) : i(o);
e._subscribers.length = 0
}
}
function F() {
this.error = null
}
var D = new F;
function x(e, t, n, i) {
var o, s, a, u, c = r(n);
if (c) {
if ((o = function(e, t) {
try {
return e(t)
} catch (e) {
return D.error = e,
D
}
}(n, i)) === D ? (u = !0,
s = o.error,
o.error = null) : a = !0,
t === o)
return void k(t, new TypeError("A promises callback cannot return that same promise."))
} else
o = i,
a = !0;
t._state !== S || (c && a ? O(t, o) : u ? k(t, s) : e === w ? R(t, o) : e === T && k(t, o))
}
var M = 0;
function L(e) {
e[m] = M++,
e._state = void 0,
e._result = void 0,
e._subscribers = []
}
function U(e, t) {
this._instanceConstructor = e,
this.promise = new e(E),
this.promise[m] || L(this.promise),
i(t) ? (this._input = t,
this.length = t.length,
this._remaining = t.length,
this._result = new Array(this.length),
0 === this.length ? R(this.promise, this._result) : (this.length = this.length || 0,
this._enumerate(),
0 === this._remaining && R(this.promise, this._result))) : k(this.promise, new Error("Array Methods must be provided an Array"))
}
U.prototype._enumerate = function() {
for (var e = this.length, t = this._input, n = 0; this._state === S && n < e; n++)
this._eachEntry(t[n], n)
}
,
U.prototype._eachEntry = function(e, t) {
var n = this._instanceConstructor
, r = n.resolve;
if (r === y) {
var i = I(e);
if (i === v && e._state !== S)
this._settledAt(e._state, t, e._result);
else if ("function" != typeof i)
this._remaining--,
this._result[t] = e;
else if (n === V) {
var o = new n(E);
N(o, e, i),
this._willSettleAt(o, t)
} else
this._willSettleAt(new n(function(t) {
return t(e)
}
), t)
} else
this._willSettleAt(r(e), t)
}
,
U.prototype._settledAt = function(e, t, n) {
var r = this.promise;
r._state === S && (this._remaining--,
e === T ? k(r, n) : this._result[t] = n),
0 === this._remaining && R(r, this._result)
}
,
U.prototype._willSettleAt = function(e, t) {
var n = this;
A(e, void 0, function(e) {
return n._settledAt(w, t, e)
}, function(e) {
return n._settledAt(T, t, e)
})
}
;
var V = function(e) {
this[m] = M++,
this._result = this._state = void 0,
this._subscribers = [],
E !== e && ("function" != typeof e && function() {
throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")
}(),
this instanceof V ? function(e, t) {
try {
t(function(t) {
O(e, t)
}, function(t) {
k(e, t)
})
} catch (t) {
k(e, t)
}
}(this, e) : function() {
throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")
}())
};
V.all = function(e) {
return new U(this,e).promise
}
,
V.race = function(e) {
var t = this;
return i(e) ? new t(function(n, r) {
for (var i = e.length, o = 0; o < i; o++)
t.resolve(e[o]).then(n, r)
}
) : new t(function(e, t) {
return t(new TypeError("You must pass an array to race."))
}
)
}
,
V.resolve = y,
V.reject = function(e) {
var t = new this(E);
return k(t, e),
t
}
,
V._setAsap = function(e) {
s = e
}
,
V._asap = s,
V.prototype = {
constructor: V,
then: v,
"catch": function(e) {
return this.then(null, e)
}
},
t.FSPromise = "function" == typeof window.Promise ? window.Promise : V
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(18)
, i = n(22);
function o(e) {
return e._fs_ext_host || e._fs_host
}
function s(e) {
if (!e)
return e;
if (i.isLocalhost(i.domainFromHost(e)))
return e;
return 0 == e.indexOf("www.") ? "rs." + e.slice(4) : 0 == e.indexOf("app.") ? "rs." + e.slice(4) : "rs." + e
}
function a(e) {
return e ? i.isLocalhost(i.domainFromHost(e)) ? e : 0 == e.indexOf("www.") ? "app." + e.slice(4) : "app." + e : e
}
function u(e) {
return e ? e + "/s/fs.js" : void 0
}
t._fs_debug = function(e) {
return !!e._fs_ext_debug || !!e._fs_debug
}
,
t._fs_script = function(e) {
return e._fs_script || u(o(e))
}
,
t._fs_rec_host = function(e) {
return e._fs_rec_host || s(o(e))
}
,
t._fs_app_host = function(e) {
return e._fs_app_host || a(o(e))
}
,
t._fs_org = function(e) {
return e._fs_ext_org || e._fs_org
}
,
t._fs_csp = function(e) {
return e._fs_csp
}
,
t._fs_cookie_domain = function(e) {
return e._fs_cookie_domain
}
,
t._fs_ready = function(e) {
return e._fs_ready
}
,
t._fs_run_in_iframe = function(e) {
return !!e._fs_run_in_iframe
}
,
t._fs_is_outer_script = function(e) {
return !!e._fs_is_outer_script
}
,
t._fs_replay_flags = function(e) {
return e._fs_replay_flags
}
,
t._fs_transport = function(e) {
return e._fs_transport
}
,
t.set_fs_shutdown = function(e, t) {
e._fs_shutdown = t
}
,
t._fs_use_socket = function(e) {
return !!e._fs_use_socket
}
,
t.FS_q_drain = function(e) {
var t = e[r.Namespace(e)];
if (t && "q"in t) {
var n = t.q;
return delete t.q,
n
}
return []
}
,
t.FS_q_push = function(e, t) {
var n = e[r.Namespace(e)];
"q"in n || (n.q = []),
n.q.push(t)
}
,
t.defaultGceHost = s,
t.defaultAppHost = a,
t.defaultScript = u
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.MutationProcessingInterval = 250,
t.CurveSamplingInterval = 142,
t.UploadInterval = 5e3,
t.HeartbeatInitial = 4e3,
t.HeartbeatMax = 256e3,
t.PageInactivityTimeout = 18e5,
t.BackoffMax = 3e5,
t.ScrollSampleInterval = t.MutationProcessingInterval / 5,
t.InactivityThreshold = 4e3,
t.MaxPayloadLength = 16384,
t.SwanSongLocalStorageKey = "singSwanSong"
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(14)
, i = n(0)
, o = n(10)
, s = n(20)
, a = n(15)
, u = n(2);
function c(e) {
return !!e._fswatch
}
function h(e) {
var t = d(e);
return !!t && t != r.WatchKindWatch
}
function d(e) {
return e._fswatch
}
function l(e, t) {
("_fswatch"in e || t) && (e._fswatch = t)
}
function f(e) {
return e ? t._mirrors[e._fs] : null
}
function p(e) {
try {
return e && e._fs || 0
} catch (e) {
return 0
}
}
function _(e) {
if (e.parent) {
if (i.hasMoreThanNKeys(e.watchedChildSet, 0) || c(e.node))
for (var n = e.watchedChildSet && i.hasMoreThanNKeys(e.watchedChildSet, 1) || c(e.node) ? e.id : i.firstKey(e.watchedChildSet), r = n ? e.parent : null; r && r.watchedChildSet && r.watchedChildSet[n]; ) {
if (delete r.watchedChildSet[n],
i.hasNKeys(r.watchedChildSet, 1)) {
var o = r.id
, s = i.firstValue(r.watchedChildSet);
for (r = r.parent; r && r.watchedChildSet && r.watchedChildSet[o]; )
delete r.watchedChildSet[o],
r.watchedChildSet[s.id] = s,
r = r.parent;
break
}
r = r.parent
}
e.parent.child == e && (e.parent.child = e.next),
e.parent.lastChild == e && (e.parent.lastChild = e.prev),
e.prev && (e.prev.next = e.next),
e.next && (e.next.prev = e.prev),
e.parent = e.prev = e.next = null,
delete t._mirrors[e.id],
e.node._fs == e.id && (e.node._fs = 0),
e.id = 0,
e.child && g(e.child)
}
}
function g(e) {
for (var n = [e]; n.length > 0 && n.length < 1e4; ) {
var r = n.pop();
delete t._mirrors[r.id],
r.node._fs == r.id && (r.node._fs = 0),
r.id = 0,
r.next && n.push(r.next),
r.child && n.push(r.child)
}
u.assert(n.length < 1e4, "clearIds is fast")
}
function v(e, t) {
if (!o.uaIsEdge || "output" != a.tagName(e)) {
var n = e;
if (n.attributes && n.attributes.length > 0)
for (var r = 0; r < n.attributes.length; r++) {
var i = n.attributes[r];
null != i && t(w(i.name), i.value)
}
}
}
t.MaxTextSizeBytes = 16e6,
t.setMaxTextSizeBytes = function(e) {
t.MaxTextSizeBytes = e
}
,
t.isWatched = c,
t.isBlocked = h,
t.watchKind = d,
t.setWatched = l,
t._mirrors = {},
t.setMirrors = function(e) {
t._mirrors = e
}
,
t.mirrorFor = f,
t.fsid = p,
t.fsidIfNotBlocked = function(e) {
return h(e) ? 0 : p(e)
}
,
t.removeMirror = _,
t.clearIds = g;
var y = function() {
function e(e) {
this._watcher = e,
this._curId = 1
}
return e.prototype.curId = function() {
return this._curId
}
,
e.prototype.tokenizeNode = function(e, t, n, r, i) {
var o = this._curId;
try {
var s = f(e)
, a = f(t)
, u = [];
return this.tokeNode(s, a, n, u, r, i),
u
} catch (e) {
return this._curId = o,
[]
}
}
,
e.prototype.tokeNode = function(e, n, o, h, d, l) {
var f = this;
if ("script" == a.tagName(o) || o.nodeType == s.Node_COMMENT_NODE)
return null;
var p, g, y, E = {
id: this._curId++,
node: o
};
if (t._mirrors[E.id] = E,
o._fs = E.id,
e && (p = e,
y = n,
_(g = E),
g.parent = p,
g.next = y,
y && (g.prev = y.prev,
y.prev = g),
null == g.next ? (g.prev = p.lastChild,
p.lastChild = g) : g.next.prev = g,
null == g.prev ? p.child = g : g.prev.next = g),
o.nodeType == s.Node_DOCUMENT_TYPE_NODE) {
var S = o;
return h.push("<!DOCTYPE", ":name", S.name, ":publicId", S.publicId || "", ":systemId", S.systemId || ""),
E
}
try {
var w = function(e) {
e && (h.push("["),
i.forEachNextSibling(o.firstChild, function(e) {
f.tokeNode(E, null, e, h, d, l)
}),
h.push("]"))
};
switch (o.nodeType) {
default:
h.push("<" + o.nodeName),
m(o, d);
break;
case s.Node_DOCUMENT_FRAGMENT_NODE:
case s.Node_DOCUMENT_NODE:
h.push("<" + o.nodeName),
w(o.firstChild);
break;
case s.Node_TEXT_NODE:
h.push("<" + o.nodeName),
m(o, d),
h.push(T(o));
break;
case s.Node_ELEMENT_NODE:
var b = o
, I = b.nodeName;
"http://www.w3.org/2000/svg" == b.namespaceURI && (I = "svg:" + I),
h.push("<" + I);
var N = this.processWatchedElem(b, h);
if (N && (function(e, t) {
if (c(e.node))
for (var n = e, r = e.parent; r; r = r.parent) {
if (r.watchedChildSet || (r.watchedChildSet = {}),
n.watchedChildSet)
for (var o in n.watchedChildSet)
delete r.watchedChildSet[o];
if (r.watchedChildSet[n.id] = n,
i.hasNKeys(r.watchedChildSet, 2))
n = r;
else if (i.hasMoreThanNKeys(r.watchedChildSet, 2))
break
}
}(E),
N != r.WatchKindWatch))
return E;
m(o, d),
v(b, function(e, t) {
if (h.push(":" + e),
h.push(t),
l)
try {
l(b, e, t)
} catch (e) {
u.FsBugSnag.sendToBugsnag(e, "error")
}
}),
w(b.firstChild);
}
} catch (e) {
u.FsBugSnag.sendToBugsnag(e, "error")
}
return E
}
,
e.prototype.processWatchedElem = function(e, t) {
if (this._watcher) {
var n = this._watcher.isWatched(e);
if (l(e, n),
n && n != r.WatchKindWatch) {
var i, o = !1;
v(e, function(n, r) {
var s = E(e, n, r);
"class" == n ? i = !0 : "style" == n && (o = !0),
null != s && (t.push(":" + n),
t.push(s))
}),
i || (t.push(":class"),
t.push("_fs_block_" + n)),
o || (t.push(":style"),
t.push(this._watcher.mungeWatchedStyle(e, "")))
}
return n
}
return null
}
,
e
}();
function m(e, t) {
if (t)
try {
t(e)
} catch (e) {
u.FsBugSnag.sendToBugsnag(e, "error")
}
}
function E(e, t, n) {
switch (t) {
case "class":
n.indexOf("_fs_block_") < 0 && (n += " _fs_block_" + d(e));
break;
case "alt":
case "checked":
case "data":
case "src":
case "srcset":
case "title":
case "value":
return null;
}
return n
}
t.NodeEncoder = y,
t.rewriteBlockedAttribute = E;
var S = {
ATTRIBUTENAME: "attributeName",
ATTRIBUTETYPE: "attributeType",
BASEFREQUENCY: "baseFrequency",
BASEPROFILE: "baseProfile",
CALCMODE: "calcMode",
CLIPPATHUNITS: "clipPathUnits",
CONTENTSCRIPTTYPE: "contentScriptType",
CONTENTSTYLETYPE: "contentStyleType",
DIFFUSECONSTANT: "diffuseConstant",
EDGEMODE: "edgeMode",
EXTERNALRESOURCESREQUIRED: "externalResourcesRequired",
FILTERRES: "filterRes",
FILTERUNITS: "filterUnits",
GLYPHREF: "glyphRef",
GRADIENTTRANSFORM: "gradientTransform",
GRADIENTUNITS: "gradientUnits",
KERNELMATRIX: "kernelMatrix",
KERNELUNITLENGTH: "kernelUnitLength",
KEYPOINTS: "keyPoints",
KEYSPLINES: "keySplines",
KEYTIMES: "keyTimes",
LENGTHADJUST: "lengthAdjust",
LIMITINGCONEANGLE: "limitingConeAngle",
MARKERHEIGHT: "markerHeight",
MARKERUNITS: "markerUnits",
MARKERWIDTH: "markerWidth",
MASKCONTENTUNITS: "maskContentUnits",
MASKUNITS: "maskUnits",
NUMOCTAVES: "numOctaves",
PATHLENGTH: "pathLength",
PATTERNCONTENTUNITS: "patternContentUnits",
PATTERNTRANSFORM: "patternTransform",
PATTERNUNITS: "patternUnits",
POINTSATX: "pointsAtX",
POINTSATY: "pointsAtY",
POINTSATZ: "pointsAtZ",
PRESERVEALPHA: "preserveAlpha",
PRESERVEASPECTRATIO: "preserveAspectRatio",
PRIMITIVEUNITS: "primitiveUnits",
REFX: "refX",
REFY: "refY",
REPEATCOUNT: "repeatCount",
REPEATDUR: "repeatDur",
REQUIREDEXTENSIONS: "requiredExtensions",
REQUIREDFEATURES: "requiredFeatures",
SPECULARCONSTANT: "specularConstant",
SPECULAREXPONENT: "specularExponent",
SPREADMETHOD: "spreadMethod",
STARTOFFSET: "startOffset",
STDDEVIATION: "stdDeviation",
STITCHTILES: "stitchTiles",
SURFACESCALE: "surfaceScale",
SYSTEMLANGUAGE: "systemLanguage",
TABLEVALUES: "tableValues",
TARGETX: "targetX",
TARGETY: "targetY",
TEXTLENGTH: "textLength",
VIEWBOX: "viewBox",
VIEWTARGET: "viewTarget",
XCHANNELSELECTOR: "xChannelSelector",
YCHANNELSELECTOR: "yChannelSelector",
ZOOMANDPAN: "zoomAndPan"
};
function w(e) {
return /[a-z]/.test(e) ? e : S[e] || e.toLowerCase()
}
function T(e) {
var n = e.textContent;
if (!n)
return "";
var r = n.length;
return r > t.MaxTextSizeBytes ? (u.FsBugSnag.sendToBugsnag("Ignoring huge text node with length [" + r + "]", "warning"),
"") : n
}
t.fixAttrName = w,
t.safeTextContent = T
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = navigator.userAgent;
t.uaIsIE = r.indexOf("MSIE ") > -1 || r.indexOf("Trident/") > -1,
t.uaIsIE11 = t.uaIsIE && r.indexOf("rv:11") > -1,
t.uaIsEdge = r.indexOf("Edge/") > -1,
t.uaIsSafari = /^((?!chrome|android).)*safari/i.test(window.navigator.userAgent)
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(24)
, i = "(redacted)"
, o = /password|token/i;
function s(e, t) {
return e.split("?").map(function(e) {
return function(e, t) {
return e.replace("?", "").split("&").map(function(e) {
return e.split("=")
}).map(function(e) {
var n = e[0]
, r = e[1]
, o = e.slice(2);
return t.test(n) && void 0 !== r ? [n, i].concat(o) : [n, r].concat(o)
}).map(function(e) {
var t = e[0]
, n = e[1]
, r = e.slice(2);
return void 0 === n ? t : [t, n].concat(r).join("=")
}).join("&")
}(e, t)
}).join("?")
}
var a = new (function() {
function e() {
var e = r.theDummyDoc()
, t = e.getElementById("urlresolver-base");
t || ((t = e.createElement("base")).id = "urlresolver-base",
e.head.appendChild(t));
var n = e.getElementById("urlresolver-parser");
n || ((n = e.createElement("a")).id = "urlresolver-parser",
e.head.appendChild(n)),
this.base = t,
this.parser = n
}
return e.prototype.parseUrl = function(e, t) {
this.base.setAttribute("href", e),
this.parser.setAttribute("href", t);
var n = document.createElement("a");
return n.href = this.parser.href,
n
}
,
e.prototype.resolveUrl = function(e, t) {
return this.parseUrl(e, t).href
}
,
e.prototype.resolveToDocument = function(e, t) {
var n = u(e);
return null == n ? t : this.resolveUrl(n, t)
}
,
e.prototype.scrubUrl = function(e) {
var t = this.parseUrl("", e);
return t.hash.indexOf("access_token") >= 0 && (t.hash = "#" + i),
t.search.length > 0 && (t.search = s(t.search, o)),
t.href
}
,
e
}());
function u(e) {
var t = e.document
, n = e.location.href;
if ("string" == typeof t.baseURI)
n = t.baseURI;
else {
var r = t.getElementsByTagName("base")[0];
r && r.href && (n = r.href)
}
return "about:blank" == n && e.parent != e ? u(e.parent) : n
}
t.parseUrl = function(e, t) {
return a.parseUrl(e, t)
}
,
t.resolveUrl = function(e, t) {
return a.resolveUrl(e, t)
}
,
t.resolveUrlToDocument = function(e, t) {
return a.resolveToDocument(e, t)
}
,
t.scrubUrl = function(e) {
return a.scrubUrl(e)
}
,
t.baseUri = u
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.guard = function(e, t) {
return function() {
try {
return e.apply(this, arguments)
} catch (e) {
try {
t && t(e)
} catch (e) {}
}
}
}
,
t.doNothing = function() {}
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(9)
, i = n(0)
, o = n(33)
, s = n(1)
, a = n(18)
, u = n(34)
, c = n(7)
, h = n(44)
, d = n(46)
, l = n(48)
, f = n(14)
, p = n(4)
, _ = n(2)
, g = n(50)
, v = n(16);
function y(e) {
var t = r.fsid(e) + " ";
return e.id && (t += "#" + e.id),
t += "[src=" + e.src + "]"
}
t.FS_REQUEST_FRAME_ID = "RequestFrameId",
t.FS_GREET_CHILD_FRAME = "GreetFrame",
t.FS_SET_FRAME_ID_CMD = "SetFrameId",
t.FS_IFRAME_EVENTS = "EvtBundle",
t.FS_SHUTDOWN_FRAME = "ShutdownFrame",
t.FS_RESTART_FRAME = "RestartFrame",
t.FS_SET_CONSENT = "SetConsent",
t.FS_INIT_MOBILE_CMD = "InitFrameMobile",
t.defaultInjector = function(e, t, n, r, i, o) {
var u = y(e);
s.logIfDebug("Injecting into Frame " + u);
try {
if (function(e) {
return e.id == e.name && E.test(e.id)
}(e))
return void s.logIfDebug("Blacklisted iframe: " + u);
if (function(e) {
if (!e.contentDocument || !e.contentWindow || !e.contentWindow.location)
return !0;
return function(e) {
return !!e.src && "about:blank" != e.src && e.src.indexOf("javascript:") < 0
}(e) && e.src != e.contentWindow.location.href && "loading" == e.contentDocument.readyState
}(e))
return void s.logIfDebug("Frame not yet loaded: " + u);
var c = e.contentWindow
, h = e.contentDocument;
if (!c || !h)
return void s.logIfDebug("Missing contentWindow or contentDocument: " + u);
if (!h.head)
return void s.logIfDebug("Missing contentDocument.head: " + u);
if (c[a.Namespace(c)])
return void s.logIfDebug("FS already defined in Frame contentWindow: " + u + ". Ignoring.");
c._fs_org = t,
c._fs_script = r,
c._fs_rec_host = i,
c._fs_app_host = o,
c._fs_debug = s.isDebug(),
c._fs_run_in_iframe = !0;
var d = h.createElement("script");
d.async = !0,
d.src = n + "//" + r,
"testdrive" == t && (d.src += "?allowMoo=true"),
h.head.appendChild(d)
} catch (e) {
s.logIfDebug("iFrame no injecty. Probably not same origin.")
}
}
;
var m, E = /^fb\d{18}$/;
!function(e) {
e[e.NoInfoYet = 1] = "NoInfoYet",
e[e.Enabled = 2] = "Enabled",
e[e.Disabled = 3] = "Disabled"
}(m = t.GetCurrentSessionEnabledState || (t.GetCurrentSessionEnabledState = {}));
var S = function() {
function e(e, t, n, r) {
var i = this;
this._ctx = e,
this._transport = n,
this._injector = r,
this._iFrames = [],
this._pendingChildFrameIdInits = [],
this._listeners = new o.DomListeners,
this._getCurrentSessionEnabled = m.NoInfoYet,
this._resourceUploadingEnabled = !1,
this._tickerTasks = [],
this._watcher = new l.Watcher,
this._queue = new d.EventQueue(e,this._transport,function(e) {
for (var t = i._eventWatcher.bundleEvents(e), n = void 0; n = i._tickerTasks.pop(); )
n();
return t
}
,t),
this._eventWatcher = new u.EventWatcher(e,this._queue,this._watcher,this._listeners,function(e) {
i.onFrameCreated(e)
}
,function(e) {
i.beforeFrameRemoved(e)
}
,new g.ResourceUploader(e,this._queue,new v.HttpResourceProtocol(e))),
this._consoleWatcher = new h.ConsoleWatcher(e,this._queue,this._listeners),
this._scheme = e.options.scheme,
this._script = e.options.script,
this._recHost = e.options.recHost,
this._appHost = e.options.appHost,
this._orgId = e.options.orgId,
this._wnd = e.window
}
return e.prototype.start = function(e, t) {
var n = this;
this._onFullyStarted = t,
this.addDefaultWatches(),
"onpagehide"in this._wnd ? this._listeners.add(this._wnd, "pagehide", !1, function(e) {
n.onUnload("pagehide")
}) : this._listeners.add(this._wnd, "unload", !1, function(e) {
n.onUnload("unload")
}),
this._listeners.add(this._wnd, "message", !1, function(e) {
if ("string" == typeof e.data) {
var t = e.source;
n.postMessageReceived(t, T(e.data))
}
});
var r = this._wnd.Document ? this._wnd.Document.prototype : this._wnd.document;
this._docCloseHook = i.activateHook(r, "close"),
this._docCloseHook && this._docCloseHook.afterAsync(function() {
n._listeners.refresh()
})
}
,
e.prototype.queue = function() {
return this._queue
}
,
e.prototype.eventWatcher = function() {
return this._eventWatcher
}
,
e.prototype.console = function() {
return this._consoleWatcher
}
,
e.prototype.onDomLoad = function() {
this._eventWatcher.onDomLoad()
}
,
e.prototype.onLoad = function() {
this._eventWatcher.onLoad()
}
,
e.prototype.shutdown = function(e) {
this._eventWatcher.shutdown(e),
this._consoleWatcher.disable(),
this._listeners.clear(),
this._docCloseHook && this._docCloseHook.disable(),
this.tellAllFramesTo([t.FS_SHUTDOWN_FRAME])
}
,
e.prototype.tellAllFramesTo = function(e) {
for (var t = 0; t < this._iFrames.length; t++) {
var n = this._iFrames[t];
n.contentWindow && w(n.contentWindow, e)
}
}
,
e.prototype.getCurrentSessionURL = function(e) {
var t = this._getCurrentSessionEnabled;
if (t == m.NoInfoYet)
return null;
if (t == m.Disabled)
return this._scheme + "//" + this._appHost + "/opt/upgrade";
var n = this.getCurrentSession();
return n ? (e && (n += ":" + this._ctx.time.wallTime()),
this._scheme + "//" + this._appHost + "/ui/" + this._ctx.options.orgId + "/session/" + encodeURIComponent(n)) : null
}
,
e.prototype.getCurrentSession = function() {
var e = this._getCurrentSessionEnabled;
return e == m.NoInfoYet || e == m.Disabled ? null : this._userId ? this._userId + ":" + this._sessionId : null
}
,
e.prototype.setConsent = function(e) {
this._watcher.setConsent(e),
this.tellAllFramesTo([t.FS_SET_CONSENT, e])
}
,
e.prototype.pageSignature = function() {
return this._userId + ":" + this._sessionId + ":" + this._pageId
}
,
e.prototype.fireFsReady = function(e) {
void 0 === e && (e = !1);
var t = c._fs_ready(this._wnd);
if (t)
try {
e ? t(!0) : t()
} catch (e) {
s.logIfDebug("exception in _fs_ready(): " + e)
}
}
,
e.prototype.onUnload = function(e) {
this._queue.addUnload(e),
p.Scheduler.stopAll()
}
,
e.prototype.handleResponse = function(e) {
if (this._pageRsp = e,
this._userId = e.UserIntId,
this._sessionId = e.SessionIntId,
this._pageId = e.PageIntId,
this._serverPageStart = e.PageStart,
this._getCurrentSessionEnabled = e.GetCurrentSessionEnabled ? m.Enabled : m.Disabled,
e.ResourceUploadingEnabled && this.enableResourceUploading(),
e.AjaxWatcherEnabled && this.enableAjaxWatcher(),
e.ConsoleWatcherEnabled && this.enableConsoleWatcher(),
e.Blocks)
for (var t = 0; t < e.Blocks.length; ++t)
this._watcher.addRule(e.Blocks[t]);
if (e.Watches)
for (t = 0; t < e.Watches.length; ++t)
this._watcher.addRule(e.Watches[t]);
e.AjaxWatcherEnabled && e.AjaxWatches && this._eventWatcher.ajaxWatcher().setWatches(e.AjaxWatches),
this._watcher.setConsent(!!e.Consented)
}
,
e.prototype.addDefaultWatches = function() {
for (var e = 0, t = ["object:not([type^=\"image/\"])", "embed:not([type^=\"image/\"])", "canvas", "noscript", ".fs-block", ".fs-hide"]; e < t.length; e++) {
var n = t[e];
this._watcher.addRule({
Selector: n,
Kind: f.WatchKindBlocked
})
}
}
,
e.prototype.fullyStarted = function() {
this._onFullyStarted()
}
,
e.prototype.enableResourceUploading = function() {
this._resourceUploadingEnabled = !0,
this._eventWatcher.initResourceUploading()
}
,
e.prototype.enableAjaxWatcher = function() {
this.eventWatcher().ajaxWatcher().enable()
}
,
e.prototype.enableConsoleWatcher = function() {
this.console().enable()
}
,
e.prototype.flushPendingChildFrameInits = function() {
if (this._pendingChildFrameIdInits.length > 0) {
for (var e = 0; e < this._pendingChildFrameIdInits.length; e++)
this._pendingChildFrameIdInits[e]();
this._pendingChildFrameIdInits = []
}
}
,
e.prototype.onFrameCreated = function(e) {
var n = this;
if (r.fsid(e)) {
this._iFrames.push(e);
var o = function(e) {
var t = e.src
, n = location.protocol + "//" + location.host;
return !t || "about:blank" == t || i.hasPrefix(t, "javascript:") || i.hasPrefix(t, n)
}(e)
, u = !1;
if (e.contentWindow)
try {
u = !!e.contentWindow[a.Namespace(e.contentWindow)]
} catch (e) {
u = !0
}
(!o || u) && e.contentWindow && e.contentWindow.postMessage ? (s.logIfDebug("Cross-origin iframe " + y(e)),
w(e.contentWindow, [t.FS_GREET_CHILD_FRAME])) : o ? (s.logIfDebug("Attempting to setup Frame " + y(e)),
this._injector(e, this._orgId, this._scheme, this._script, this._recHost, this._appHost),
e.addEventListener("load", _.FsBugSnag.wrap(function(t) {
try {
n._tickerTasks.push(function() {
s.logIfDebug("onload for frame " + y(e)),
n._injector(e, n._orgId, n._scheme, n._script, n._recHost, n._appHost)
})
} catch (t) {
_.FsBugSnag.sendToBugsnag(t, "error")
}
}))) : s.logIfDebug("Frame Doesn't need injecting. Probably cross domain " + y(e))
} else
s.logIfDebug("fsid missing or invalid for iFrame " + y(e))
}
,
e.prototype.beforeFrameRemoved = function(e) {
for (var t = 0; t < this._iFrames.length; t++) {
if (e == this._iFrames[t])
return void this._iFrames.splice(t, 1)
}
}
,
e.prototype.postMessageReceived = function(e, n) {
if (e.parent == this._wnd)
switch (n[0]) {
case t.FS_IFRAME_EVENTS:
var r = n[1]
, i = this.pageSignature()
, o = n[2];
if (i != o)
return _.FsBugSnag.sendToBugsnag("Page signature mismatch: " + i + " != " + o, "warning"),
void w(e, [t.FS_SHUTDOWN_FRAME]);
r.length > 0 && this._transport.enqueueEvents(i, r);
break;
case t.FS_REQUEST_FRAME_ID:
var a = this.iFrameWndToFsId(e);
e && a ? (s.logIfDebug("Responding to FID request for frame " + a),
this.sendFrameIdToInnerFrame(e, a)) : s.logIfDebug("No FrameId found. Hoping to send one later.");
}
}
,
e.prototype.sendFrameIdToInnerFrame = function(e, n) {
var r = this
, i = function() {
var i = [];
0 != r._frameId && (i = r._parentIds ? r._parentIds.concat(r._frameId) : [r._frameId]);
var o = r._ctx.time.startTime();
w(e, [t.FS_SET_FRAME_ID_CMD, n, i, o, r._scheme, r._script, r._appHost, r._orgId, r._pageRsp])
};
null == this._frameId ? this._pendingChildFrameIdInits.push(i) : i()
}
,
e.prototype.iFrameWndToFsId = function(e) {
for (var t = 0; t < this._iFrames.length; t++)
if (this._iFrames[t].contentWindow == e)
return r.fsid(this._iFrames[t]);
return s.logIfDebug("Unable to locate frame for window"),
NaN
}
,
e
}();
function w(e, t) {
e && e.postMessage && e.postMessage(i.stringify({
__fs: t
}), "*")
}
function T(e) {
try {
var t = i.parseJson(e);
if ("__fs"in t)
return t.__fs
} catch (e) {}
return []
}
t.AbstractRecorder = S,
t.parsePostMessageData = T
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.WatchKindBlocked = "blocked",
t.WatchKindBlockedConsent = "blocked-consent",
t.WatchKindWatch = "watch"
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.tagName = function(e) {
var t = e;
return t.tagName ? "object" == typeof t.tagName ? "form" : t.tagName.toLowerCase() : null
}
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(0)
, i = n(1)
, o = n(2)
, s = n(6)
, a = n(20)
, u = n(8)
, c = function() {
function e(e) {
this._byteCount = 0,
this._scheme = e.options.scheme,
this._recHost = e.options.recHost
}
return e.prototype.page = function(e, t, n) {
this.post("/rec/page", r.stringify(e), function(e) {
try {
t(r.parseJson(e))
} catch (e) {
n(0)
}
}, n)
}
,
e.prototype.bundle = function(e, t, n, s, a, u, c, h, l, f) {
var p = r.stringify(e);
this._byteCount += p.length,
i.logIfDebug("total bytes written: " + this._byteCount);
var _ = d(t, n, s, a, e.Seq, u, c, h);
return this.post(_, p, function(e) {
try {
l(r.parseJson(e))
} catch (t) {
o.FsBugSnag.sendToBugsnag("Failed to JSON parse /rec/bundle response: " + e + ": " + t, "error"),
f(0)
}
}, f),
this._byteCount
}
,
e.prototype.bundleBeacon = function(e, t, n, r, i, o, s, a) {
return f(this._scheme, this._recHost, e, t, n, r, i, o, s, a)
}
,
e.prototype.exponentialBackoffMs = function(e, t) {
var n = Math.min(u.BackoffMax, 5e3 * Math.pow(2, e));
return t ? n + .25 * Math.random() * n : n
}
,
e.prototype.post = function(e, t, n, r) {
l(this._scheme, this._recHost, e, t, n, r)
}
,
e
}();
t.HttpProtocol = c;
var h = function() {
function e(e) {
this._scheme = e.options.scheme,
this._recHost = e.options.recHost
}
return e.prototype.newResources = function(e, t) {
var n = this;
return new s.FSPromise(function(i, o) {
l(n._scheme, n._recHost, "/rec/newResources?OrgId=" + e, r.stringify(t), i, o)
}
)
}
,
e.prototype.uploadResource = function(e) {
var t = this;
return new s.FSPromise(function(n, r) {
l(t._scheme, t._recHost, "/rec/uploadResource", e, n, r)
}
)
}
,
e
}();
function d(e, t, n, r, i, o, s, a) {
var u = "/rec/bundle?OrgId=" + e + "&UserId=" + t + "&SessionId=" + n + "&PageId=" + r + "&Seq=" + i;
return null != o && (u += "&PageStart=" + o),
null != s && (u += "&PrevBundleTime=" + s),
null != a && (u += "&DeltaT=" + a),
u
}
function l(e, t, n, r, i, s) {
var u = "//" + t + n
, c = !1
, h = new XMLHttpRequest;
if ("withCredentials"in h)
h.onreadystatechange = function() {
if (h.readyState == a.XHR_DONE) {
if (c)
return;
c = !0;
try {
200 == h.status ? i(h.responseText) : s && s(h.status)
} catch (e) {
o.FsBugSnag.sendToBugsnag(e, "error")
}
}
}
,
h.open("POST", e + u, !0),
h.withCredentials = !0,
"function" != typeof r.append && h.setRequestHeader("Content-Type", "text/plain"),
h.send(r);
else {
var d = new XDomainRequest;
d.onload = function() {
i(d.responseText)
}
,
d.onerror = function() {
s && s("Not Found" == d.responseText ? 404 : 500)
}
,
d.onprogress = function() {}
,
d.open("POST", u),
d.send(r)
}
}
function f(e, t, n, i, o, s, a, u, c, h) {
var l = e + "//" + t + d(i, o, s, a, n.Seq, u, c, h);
return "function" == typeof navigator.sendBeacon && (navigator.sendBeacon(l, r.stringify(n)),
!0)
}
t.HttpResourceProtocol = h,
t.bundleUrl = d,
t.bundleBeacon = f
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(1);
t.BAD_APP_IDS = ["", "0", "1", "-1", "true", "false", "n/a", "nan", "undefined", "null", "nil", "the_id_that_you_use_in_your_app_for_this_user"],
t.parseIdentityCookie = function(e) {
var n = ""
, i = ""
, o = ""
, s = ""
, a = "";
if (e) {
var u = e.split("`");
u.length < 3 ? n = e : (o = u[0],
s = u[1],
n = u[2],
u.length >= 5 && (a = decodeURIComponent(u[3]),
t.BAD_APP_IDS.indexOf(a) >= 0 && (r.logIfDebug("ignoring invalid app key \"" + a + "\" from cookie."),
a = "")))
}
var c = n.indexOf(":");
return -1 != c && (i = n.slice(c + 1),
n = n.slice(0, c)),
{
Host: o,
OrgId: s,
UserId: n,
SessionId: i,
AppKey: a
}
}
,
t.getCookies = function(e) {
for (var t = {}, n = e.cookie.split(";"), r = 0; r < n.length; r++) {
var i = n[r].replace(/^\s+|\s+$/g, "").split("=");
t[i[0]] || (t[i[0]] = i[1])
}
return t
}
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r, i = "FS", o = "_fs_loaded", s = "_fs_namespace";
function a(e) {
return e[o]
}
t.Namespace = function(e) {
if (!r) {
var t = a(e);
r = t || (e[s] ? e[s] : i)
}
return r
}
,
t.isLoaded = a,
t.setLoaded = function(e, t) {
e[o] = t,
t in e || (e[t] = {})
}
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.CompiledTimestamp = 1551142899,
t.CompiledVersion = "UNSET"
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.Node_ELEMENT_NODE = 1,
t.Node_ATTRIBUTE_NODE = 2,
t.Node_TEXT_NODE = 3,
t.Node_CDATA_SECTION_NODE = 4,
t.Node_ENTITY_REFERENCE_NODE = 5,
t.Node_ENTITY_NODE = 6,
t.Node_PROCESSING_INSTRUCTION_NODE = 7,
t.Node_COMMENT_NODE = 8,
t.Node_DOCUMENT_NODE = 9,
t.Node_DOCUMENT_TYPE_NODE = 10,
t.Node_DOCUMENT_FRAGMENT_NODE = 11,
t.Node_NOTATION_NODE = 12,
t.XHR_UNSENT = 0,
t.XHR_OPENED = 1,
t.XHR_HEADERS_RECEIVED = 2,
t.XHR_LOADING = 3,
t.XHR_DONE = 4,
t.XHR_STATUS_ABORTED = 0
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(5);
function i(e) {
return e && e.body && e.documentElement ? "BackCompat" == e.compatMode ? [e.body.clientWidth, e.body.clientHeight] : [e.documentElement.clientWidth, e.documentElement.clientHeight] : [0, 0]
}
t.getDocumentClientArea = i;
var o = function() {
function e(e, t) {
var n, r;
this.hasKnownPosition = !1,
this.pageLeft = 0,
this.pageTop = 0,
this.width = 0,
this.height = 0,
this.clientWidth = 0,
this.clientHeight = 0;
var o = e.document;
if (o && o.documentElement && o.body) {
if ("visualViewport"in e) {
var s = o.documentElement.getBoundingClientRect();
this.hasKnownPosition = !0,
this.pageLeft = 0 == s.left ? 0 : -s.left,
this.pageTop = 0 == s.top ? 0 : -s.top
}
if (n = i(o),
this.clientWidth = n[0],
this.clientHeight = n[1],
void 0 !== t && this.clientWidth == t.clientWidth && this.clientHeight == t.clientHeight && t.width > 0 && t.height > 0)
return this.width = t.width,
void (this.height = t.height);
r = this.computeLayoutViewportSizeFromMediaQueries(e),
this.width = r[0],
this.height = r[1]
}
}
return e.prototype.computeLayoutViewportSizeFromMediaQueries = function(e) {
var t = this.findMediaValue(e, "width", this.clientWidth, this.clientWidth + 128);
void 0 === t && (t = this.tryToGet(e, "innerWidth")),
void 0 === t && (t = this.clientWidth);
var n = this.findMediaValue(e, "height", this.clientHeight, this.clientHeight + 128);
return void 0 === n && (n = this.tryToGet(e, "innerHeight")),
void 0 === n && (n = this.clientHeight),
[t, n]
}
,
e.prototype.findMediaValue = function(e, t, n, i) {
if (r.windex.matchMedia) {
var o = r.windex.matchMedia(e, "(min-" + t + ": " + n + "px)");
if (null != o) {
if (o.matches && r.windex.matchMedia(e, "(max-" + t + ": " + n + "px)").matches)
return n;
for (; n <= i; ) {
var s = Math.floor((n + i) / 2);
if (r.windex.matchMedia(e, "(min-" + t + ": " + s + "px)").matches) {
if (r.windex.matchMedia(e, "(max-" + t + ": " + s + "px)").matches)
return s;
n = s + 1
} else
i = s - 1
}
}
}
}
,
e.prototype.tryToGet = function(e, t) {
try {
return e[t]
} catch (e) {
return
}
}
,
e
}();
function s(e, t) {
return new o(e,t)
}
t.getLayoutViewport = s;
var a = function() {
return function(e, t) {
this.offsetLeft = 0,
this.offsetTop = 0,
this.pageLeft = 0,
this.pageTop = 0,
this.width = 0,
this.height = 0,
this.scale = 0;
var n = e.document;
if (n.body) {
var r = "BackCompat" == n.compatMode;
"pageXOffset"in e ? (this.pageLeft = e.pageXOffset,
this.pageTop = e.pageYOffset) : n.scrollingElement ? (this.pageLeft = n.scrollingElement.scrollLeft,
this.pageTop = n.scrollingElement.scrollTop) : r ? (this.pageLeft = n.body.scrollLeft,
this.pageTop = n.body.scrollTop) : n.documentElement && (n.documentElement.scrollLeft > 0 || n.documentElement.scrollTop > 0) ? (this.pageLeft = n.documentElement.scrollLeft,
this.pageTop = n.documentElement.scrollTop) : (this.pageLeft = n.body.scrollLeft || 0,
this.pageTop = n.body.scrollTop || 0),
this.offsetLeft = this.pageLeft - t.pageLeft,
this.offsetTop = this.pageTop - t.pageTop;
try {
var i = e.innerWidth
, o = e.innerHeight
} catch (e) {
return
}
if (0 != i && 0 != o) {
this.scale = t.width / i,
this.scale < 1 && (this.scale = 1);
var s = t.width - t.clientWidth
, a = t.height - t.clientHeight;
this.width = i - s / this.scale,
this.height = o - a / this.scale
}
}
}
}();
t.getVisualViewport = function(e, t) {
return "visualViewport"in e ? e.visualViewport : (void 0 === t && (t = s(e)),
new a(e,t))
}
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.domainFromHost = function(e) {
var t = e
, n = t.indexOf(":");
return n >= 0 && (t = t.slice(0, n)),
t
}
,
t.isLocalhost = function(e) {
return "localhost" == e || "127.0.0.1" == e
}
,
t.isIP = function(e) {
return !!e.match(/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/g)
}
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
})
}
, function(e, t, n) {
"use strict";
var r;
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.theDummyDoc = function() {
return r || (r = function() {
var e = document.implementation.createHTMLDocument("");
return e.head || e.documentElement.appendChild(e.createElement("head")),
e.body || e.documentElement.appendChild(e.createElement("body")),
e
}()),
r
}
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.parseFieldPatterns = function(e) {
var t = 0
, n = {
id: t++,
edges: {}
};
return e.split("\n").forEach(function(e) {
if ("" != (e = e.trim())) {
if (0 == e.indexOf("/") || e.lastIndexOf("/") == e.length - 1)
throw new Error("Leading and trailing slashes are not supported");
var r = n
, i = e.split("/");
i.forEach(function(e, n) {
if ("" === (e = e.trim()))
throw new Error("Empty elements are not allowed");
if ("**" != e && "*" != e && -1 != e.indexOf("*"))
throw new Error("Embedded wildcards are not supported");
var o = null;
"**" == e ? (r.loop = !0,
o = r) : e in r.edges && (o = r.edges[e]),
o || (o = {
id: t++,
edges: {}
},
r.edges[e] = o),
n == i.length - 1 && (o.term = !0),
r = o
})
}
}),
n
}
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(6)
, i = n(5)
, o = n(12);
t.wait = function(e) {
return new r.FSPromise(function(t) {
i.windex.setWindowTimeout(window, o.guard(t), e)
}
)
}
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.isErrorFatal = function(e) {
return e >= 400 || 202 == e || 206 == e
}
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(22)
, i = n(17)
, o = n(7);
t.HighlightTypeFsId = "fsidentity",
t.HighlightTypeNewUid = "newuid",
t.UID_COOKIE = "fs_uid";
var s = function() {
function e(e) {
void 0 === e && (e = document),
this._doc = e,
this._cookies = {}
}
return e.prototype.initFromCookies = function(e, n) {
this._cookies = i.getCookies(this._doc),
this._cookie = i.parseIdentityCookie(this._cookies[t.UID_COOKIE]),
this._cookie.Host.replace(/^www\./, "") == e.replace(/^www\./, "") && this._cookie.OrgId == n || (this._cookie = {
Host: e,
OrgId: n,
UserId: "",
SessionId: "",
AppKey: ""
})
}
,
e.prototype.initFromParsedCookie = function(e) {
this._cookie = e
}
,
e.prototype.clear = function() {
var e = this.host()
, t = this.orgId();
this._cookie = {
Host: e,
OrgId: t,
UserId: "",
SessionId: "",
AppKey: ""
},
this.write()
}
,
e.prototype.host = function() {
return this._cookie.Host
}
,
e.prototype.orgId = function() {
return this._cookie.OrgId
}
,
e.prototype.userId = function() {
return this._cookie.UserId
}
,
e.prototype.sessionId = function() {
return this._cookie.SessionId
}
,
e.prototype.appKey = function() {
return this._cookie.AppKey
}
,
e.prototype.cookieData = function() {
return this._cookie
}
,
e.prototype.cookies = function() {
return this._cookies
}
,
e.prototype.setCookie = function(e, t) {
var n = e + "=" + t;
this._domain ? n += "; domain=." + encodeURIComponent(this._domain) : n += "; domain=",
n += "; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/",
this._doc.cookie = n
}
,
e.prototype.setIds = function(e, t, n, i) {
(r.isLocalhost(t) || r.isIP(t)) && (t = "");
var s = o._fs_cookie_domain(e);
"string" == typeof s && (t = s),
this._domain = t,
this._cookie.UserId = n,
this._cookie.SessionId = i,
this.write()
}
,
e.prototype.clearAppId = function() {
return !!this._cookie.AppKey && (this._cookie.AppKey = "",
this.write(),
!0)
}
,
e.prototype.setAppId = function(e) {
this._cookie.AppKey = e,
this.write()
}
,
e.prototype.encode = function() {
var e = this._cookie.Host + "`" + this._cookie.OrgId + "`" + this._cookie.UserId + ":" + this._cookie.SessionId;
return this._cookie.AppKey && (e += "`" + encodeURIComponent(this._cookie.AppKey) + "`"),
e
}
,
e.prototype.write = function() {
null != this._domain && this.setCookie(t.UID_COOKIE, this.encode())
}
,
e
}();
t.Identity = s
}
, function(e, t, n) {
e.exports = n(30)
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}),
n(31);
var r = n(32)
, i = n(2)
, o = n(7);
try {
new r.Conductor().init()
} catch (e) {
i.FsBugSnag.sendToBugsnag(e, "error"),
o._fs_debug(window) && window.console && console.log && console.log("Failed to initialize FullStory.")
}
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
})
}
, function(e, t, n) {
"use strict";
var r = this && this.__awaiter || function(e, t, n, r) {
return new (n || (n = Promise))(function(i, o) {
function s(e) {
try {
u(r.next(e))
} catch (e) {
o(e)
}
}
function a(e) {
try {
u(r["throw"](e))
} catch (e) {
o(e)
}
}
function u(e) {
e.done ? i(e.value) : new n(function(t) {
t(e.value)
}
).then(s, a)
}
u((r = r.apply(e, t || [])).next())
}
)
}
, i = this && this.__generator || function(e, t) {
var n, r, i, o, s = {
label: 0,
sent: function() {
if (1 & i[0])
throw i[1];
return i[1]
},
trys: [],
ops: []
};
return o = {
next: a(0),
"throw": a(1),
"return": a(2)
},
"function" == typeof Symbol && (o[Symbol.iterator] = function() {
return this
}
),
o;
function a(o) {
return function(a) {
return function(o) {
if (n)
throw new TypeError("Generator is already executing.");
for (; s; )
try {
if (n = 1,
r && (i = 2 & o[0] ? r["return"] : o[0] ? r["throw"] || ((i = r["return"]) && i.call(r),
0) : r.next) && !(i = i.call(r, o[1])).done)
return i;
switch (r = 0,
i && (o = [2 & o[0], i.value]),
o[0]) {
case 0:
case 1:
i = o;
break;
case 4:
return s.label++,
{
value: o[1],
done: !1
};
case 5:
s.label++,
r = o[1],
o = [0];
continue;
case 7:
o = s.ops.pop(),
s.trys.pop();
continue;
default:
if (!(i = (i = s.trys).length > 0 && i[i.length - 1]) && (6 === o[0] || 2 === o[0])) {
s = 0;
continue
}
if (3 === o[0] && (!i || o[1] > i[0] && o[1] < i[3])) {
s.label = o[1];
break
}
if (6 === o[0] && s.label < i[1]) {
s.label = i[1],
i = o;
break
}
if (i && s.label < i[2]) {
s.label = i[2],
s.ops.push(o);
break
}
i[2] && s.ops.pop(),
s.trys.pop();
continue;
}
o = t.call(e, s)
} catch (e) {
o = [6, e],
r = 0
} finally {
n = i = 0
}
if (5 & o[0])
throw o[1];
return {
value: o[0] ? o[1] : void 0,
done: !0
}
}([o, a])
}
}
}
;
Object.defineProperty(t, "__esModule", {
value: !0
});
var o = n(2)
, s = n(13)
, a = n(54)
, u = n(57)
, c = n(28)
, h = n(59)
, d = n(18)
, l = n(5)
, f = n(0)
, p = n(1)
, _ = n(7)
, g = n(19)
, v = n(4)
, y = n(21)
, m = n(11)
, E = n(6)
, S = n(26)
, w = n(16)
, T = n(60)
, b = function() {
function e() {}
return e.prototype.createTopRecorder = function(e) {
var t = _._fs_use_socket(e.window) && T.SockProtocol.isSupported() ? new T.SockProtocol(e) : new w.HttpProtocol(e);
return new a.TopRecorder(e,t)
}
,
e.prototype.createInnerRecorder = function(e) {
return new u.InnerRecorder(e)
}
,
e
}();
t.DefaultRecorderMaker = b;
var I = function() {
function e(e, t) {
void 0 === e && (e = window),
void 0 === t && (t = new b),
this.wnd = e,
this.recMaker = t,
this.scheme = "https:",
this.domDoneLoaded = !1,
this.waitingOnStart = !1,
this.reidentifyCount = 0
}
return e.prototype.init = function() {
d.isLoaded(this.wnd) || (d.setLoaded(this.wnd, d.Namespace(this.wnd)),
l.initWindex(this.wnd),
this.initApi(),
this.start())
}
,
e.prototype.getCurrentSessionURL = function(e) {
return this.recorder ? this.recorder.getCurrentSessionURL(e) : null
}
,
e.prototype.getCurrentSession = function() {
return this.recorder ? this.recorder.getCurrentSession() : null
}
,
e.prototype.enableConsole = function() {
this.recorder && this.recorder.console().enable()
}
,
e.prototype.disableConsole = function() {
this.recorder && this.recorder.console().disable()
}
,
e.prototype.log = function(e) {
for (var t = [], n = 1; n < arguments.length; n++)
t[n - 1] = arguments[n];
this.recorder && ("log" !== e && "info" !== e && "warn" !== e && "error" !== e && "debug" !== e && (t.unshift(e),
e = "log"),
this.recorder.console().addLog(e, t))
}
,
e.prototype.shutdownApi = function() {
this.shutdown("FS.shutdown()")
}
,
e.prototype.shutdown = function(e) {
this.recorder && !this.deferredStart ? (this.recorder.shutdown(e),
this.recorder = null) : p.logIfDebug("Recording already shut down.")
}
,
e.prototype.restart = function() {
if (this.deferredStart)
return this.deferredStart(),
void (this.deferredStart = null);
this.recorder ? p.logIfDebug("Recording already started.") : this.recorder = this.createRecorder(!0)
}
,
e.prototype.splitPage = function(e, t) {
return r(this, void 0, E.FSPromise, function() {
return i(this, function(n) {
switch (n.label) {
case 0:
return t && null == this.identity ? (p.logIfDebug("Can't re-identify from an iframe"),
[2]) : this.waitingOnStart ? (this.splitPending = [e, t],
[2]) : (this.shutdown(e),
[4, S.wait(0)]);
case 1:
return n.sent(),
[4, S.wait(0)];
case 2:
return n.sent(),
t && this.identity && this.identity.clear(),
this.restart(),
[2];
}
})
})
}
,
e.prototype._api = function(e, t, n) {
if (this.inFrame())
p.logIfDebug("API calls may only be made from the top-most frame");
else if (this.recorder) {
var r = this.vars.api(e, t, n)
, i = r.events
, o = r.reidentify
, s = r.consent;
if (o) {
if (this.reidentifyCount < 8)
return this.reidentifyCount++,
_.FS_q_push(this.wnd, [e, t]),
void this.splitPage("reidentify", !0);
p.logIfDebug("reidentified too many times; giving up")
}
void 0 !== s && this.recorder.setConsent(s);
for (var a = 0; a < i.length; a++)
this.recorder.queue().enqueue(i[a].Kind, i[a].Args)
} else
_.FS_q_push(this.wnd, [e, t])
}
,
e.prototype._cookies = function() {
return this.identity ? this.identity.cookies() : (p.logIfDebug("Error in FS integration: Can't get cookies from inside an iframe"),
null)
}
,
e.prototype._setCookie = function(e, t) {
this.identity ? this.identity.setCookie(e, t) : p.logIfDebug("Error in FS integration: Can't set cookies from inside an iframe")
}
,
e.prototype.initApi = function() {
var e = this.wnd[d.Namespace(this.wnd)];
e.getCurrentSessionURL = f.$entry(this.getCurrentSessionURL, this),
e.getCurrentSession = f.$entry(this.getCurrentSession, this),
e.enableConsole = f.$entry(this.enableConsole, this),
e.disableConsole = f.$entry(this.disableConsole, this),
e.log = f.$entry(this.log, this),
e.shutdown = f.$entry(this.shutdownApi, this),
e.restart = f.$entry(this.restart, this),
e._api = f.$entry(this._api, this),
e._cookies = f.$entry(this._cookies, this),
e._setCookie = f.$entry(this._setCookie, this)
}
,
e.prototype.start = function() {
var e = this;
p.initDebug(_._fs_debug(this.wnd)),
p.logIfDebug("script version " + g.CompiledVersion + " (compiled at " + g.CompiledTimestamp + ")"),
this.orgId = _._fs_org(this.wnd),
this.script = _._fs_script(this.wnd),
this.recHost = _._fs_rec_host(this.wnd),
this.appHost = _._fs_app_host(this.wnd),
this.recHost ? this.orgId ? (p.logIfDebug("script: " + this.script),
p.logIfDebug("recording host: " + this.recHost),
p.logIfDebug("orgid: " + this.orgId),
"localhost:8080" == this.recHost && (this.scheme = "http:"),
this.inFrame() || (this.identity = new c.Identity(this.wnd.document),
this.vars = new h.Vars(this.identity),
this.identity.initFromCookies(this.recHost, this.orgId)),
this.canRecord(this.orgId) ? (this.recorder = this.createRecorder(),
this.recorder.eventWatcher().watchEvents(),
this.hookLoadEvents(),
this.wnd.addEventListener("message", o.FsBugSnag.wrap(function(t) {
if ("string" == typeof t.data && (t.source == e.wnd.parent || t.source == e.wnd))
switch (s.parsePostMessageData(t.data)[0]) {
case s.FS_SHUTDOWN_FRAME:
e.shutdown("ShutdownFrame message");
break;
case s.FS_RESTART_FRAME:
e.restart();
}
}))) : this.hailMary()) : p.logIfDebug("Missing global _fs_org. Recording disabled.") : p.logIfDebug("Missing global _fs_host or _fs_rec_host. Recording disabled.")
}
,
e.prototype._context = function(e) {
var t = this;
return {
window: this.wnd,
time: new v.Timekeeper,
options: {
orgId: this.orgId,
scheme: this.scheme,
script: this.script,
recHost: this.recHost,
appHost: this.appHost
},
recording: {
inFrame: this.inFrame(),
vars: this.vars,
identity: this.identity,
splitPage: function(e, n) {
return t.splitPage(e, n)
},
pageSignature: function() {
return e().pageSignature()
}
}
}
}
,
e.prototype.createRecorder = function(e) {
var t, n = this, r = this._context(function() {
return t
});
if (this.inFrame())
t = this.recMaker.createInnerRecorder(r);
else {
t = this.recMaker.createTopRecorder(r);
for (var i = this.drainApiQueue(_.FS_q_drain(this.wnd)), o = i.events, a = i.reidentify, u = i.appId, c = i.defer, h = i.consent, d = 0, l = o; d < l.length; d++) {
var f = l[d];
t.queue().enqueue(f.Kind, f.Args)
}
void 0 !== h && t.setConsent(h)
}
this.waitingOnStart = !0;
var p = function() {
t.start(!!a, function() {
n.waitingOnStart = !1,
e && t.tellAllFramesTo([s.FS_RESTART_FRAME]),
n.splitPending && (n.splitPage(n.splitPending[0], n.splitPending[1]),
n.splitPending = null)
}, u),
e && t.eventWatcher().watchEvents()
};
return c ? this.deferredStart = p : p(),
t
}
,
e.prototype.drainApiQueue = function(e) {
if (!e)
return {
events: []
};
for (var t, n, r, i, o = [], s = 0, a = e; s < a.length; s++) {
var u = a[s]
, c = u.length > 2 ? u[2] : null;
"user" == u[0] && u[1] && u[1].uid && (t = h.transformValidateAppId(u[1].uid)[0]);
var d = this.vars.api(u[0], u[1], c)
, l = d.events
, f = d.reidentify
, p = d.recStatus
, _ = d.consent;
p && (i = "shutdown" === p),
f && (o = [],
n = !0),
void 0 !== _ && (r = _),
o.push.apply(o, l)
}
return {
events: o,
reidentify: n,
consent: r,
appId: t,
defer: i
}
}
,
e.prototype.inFrame = function() {
if ("boolean" == typeof this._inFrame)
return this._inFrame;
var e = _._fs_transport(this.wnd);
return _._fs_is_outer_script(this.wnd) ? this._inFrame = !1 : this.wnd != top ? this._inFrame = !0 : e ? e.init && e.init(this.orgId) && (this._inFrame = !0) : this._inFrame = !1,
this._inFrame
}
,
e.prototype.canRecord = function(e) {
return (this.wnd.MutationObserver || this.wnd.MutationEvent) && this.wnd.postMessage && f._native_matchesSelector ? !!function e(t) {
if (t == top || _._fs_is_outer_script(t) || _._fs_run_in_iframe(t) || _._fs_transport(t))
return !0;
try {
return t.parent.document,
e(t.parent)
} catch (e) {
return !1
}
}(this.wnd) || (p.logIfDebug("Fullstory recording for this page is NOT allowed within an iFrame."),
!1) : (p.logIfDebug("missing required browser features"),
!1)
}
,
e.prototype.hailMary = function() {
var e = this;
if (this.identity) {
var t = _._fs_replay_flags(this.wnd);
p.logIfDebug("Unable to record playback stream.");
var n = document.createElement("script");
this.wnd.__fs_startResponse = function(t) {
t && e.identity.setIds(e.wnd, t.CookieDomain, t.UserIntId, t.SessionIntId),
document.head && document.head.removeChild(n)
}
;
var r = y.getDocumentClientArea(this.wnd.document)
, i = r[0]
, o = r[1]
, s = f.tryGetScreenDims(this.wnd)
, a = s[0]
, u = s[1];
n.src = "//" + this.recHost + "/rec/page?OrgId=" + this.orgId + "&UserId=" + this.identity.userId() + "&Url=" + encodeURIComponent(m.scrubUrl(this.wnd.location.href)) + "&Base=" + encodeURIComponent(m.scrubUrl(m.baseUri(this.wnd))) + "&Width=" + i + "&Height=" + o + "&ScreenWidth=" + a + "&ScreenHeight=" + u + "&Referrer=" + encodeURIComponent(document.referrer) + "&Doctype=" + encodeURIComponent(f.doctypeString(document)) + "&CompiledTimestamp=" + g.CompiledTimestamp + "&Fallback=true" + (t ? "&ReplayFlags=" + t : ""),
document.head && document.head.appendChild(n)
}
}
,
e.prototype.hookLoadEvents = function() {
var e = this
, t = function() {
e.domDoneLoaded || (e.domDoneLoaded = !0,
e.recorder && e.recorder.onDomLoad())
}
, n = !1
, r = function() {
n || (n = !0,
e.recorder && e.recorder.onLoad())
};
switch (document.readyState) {
case "interactive":
document.attachEvent || t();
break;
case "complete":
t(),
r();
}
this.domDoneLoaded || document.addEventListener("DOMContentLoaded", o.FsBugSnag.wrap(t)),
n || this.wnd.addEventListener("load", o.FsBugSnag.wrap(function(e) {
t(),
r()
}))
}
,
e
}();
t.Conductor = I
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(1)
, i = n(2)
, o = n(12);
function s(e, t, n, i) {
void 0 !== n && ("function" == typeof e.addEventListener ? e.addEventListener(t, n, i) : "function" == typeof e.addListener ? e.addListener(n) : r.logIfDebug("Target of " + t + " doesn't seem to support listeners"))
}
function a(e, t, n, i) {
void 0 !== n && ("function" == typeof e.removeEventListener ? e.removeEventListener(t, n, i) : "function" == typeof e.removeListener ? e.removeListener(n) : r.logIfDebug("Target of " + t + " doesn't seem to support listeners"))
}
t._trustEventOverride = "_fs_trust_event";
var u = function() {
function e() {
var e = this;
this._listeners = [],
this._children = [],
this._yesCapture = !0,
this._noCapture = !1;
try {
var t = Object.defineProperty({}, "passive", {
get: function() {
e._yesCapture = {
capture: !0,
passive: !0
},
e._noCapture = {
capture: !1,
passive: !0
}
}
});
window.addEventListener("test", o.doNothing, t)
} catch (e) {}
}
return e.prototype.add = function(e, n, r, o, a) {
void 0 === a && (a = !1);
var u = {
target: e,
type: n,
fn: i.FsBugSnag.wrap(function(e) {
(a || !1 !== e.isTrusted || "message" == n || e[t._trustEventOverride]) && o(e)
}),
options: r ? this._yesCapture : this._noCapture,
index: this._listeners.length
};
return this._listeners.push(u),
s(e, n, u.fn, u.options),
u
}
,
e.prototype.remove = function(e) {
e.target && (a(e.target, e.type, e.fn, e.options),
e.target = null,
e.fn = void 0)
}
,
e.prototype.clear = function() {
for (var e = 0; e < this._listeners.length; e++)
this._listeners[e].target && this.remove(this._listeners[e]);
this._listeners = []
}
,
e.prototype.createChild = function() {
var t = new e;
return this._children.push(t),
t
}
,
e.prototype.refresh = function() {
for (var e = 0, t = this._listeners; e < t.length; e++) {
var n = t[e];
n.target && (a(n.target, n.type, n.fn, n.options),
s(n.target, n.type, n.fn, n.options))
}
for (var r = 0, i = this._children; r < i.length; r++) {
i[r].refresh()
}
}
,
e
}();
t.DomListeners = u
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(35)
, i = n(21)
, o = n(36)
, s = n(37)
, a = n(39)
, u = n(40)
, c = n(42)
, h = n(0)
, d = n(9)
, l = n(3)
, f = n(4)
, p = n(8)
, _ = n(15)
, g = n(10)
, v = n(5)
, y = n(11)
, m = n(20)
, E = function() {
function e(e, t, n, r, i, h, l) {
var f = this;
this._queue = t,
this._onFrameCreated = i,
this._beforeFrameRemoved = h,
this._resourceUploader = l,
this._curSelection = [],
this._scrollTimeouts = {},
this._quirks = !1,
this._uploadResources = !1,
this._initialized = !1,
this._wnd = e.window,
this._doc = this._wnd.document,
this._loc = this._wnd.location,
this._hst = this._wnd.history,
this._listeners = r.createChild(),
this._quirks = "BackCompat" == this._doc.compatMode,
this._currentUrl = this._loc.href,
this._inputWatcher = new o.InputWatcher(function(e) {
f.addChangeElem(e)
}
,function(e) {
return !!d.fsid(e)
}
),
this._ajaxWatcher = new u.AjaxWatcher(e,t),
this._perfWatcher = new a.PerfWatcher(e,t,this._listeners),
this._styleSheetWatcher = new c.StyleSheetWatcher(e,t),
this._mutWatcher = new s.MutationWatcher(e,n,!0,function(e, t, n) {
f.visitNode(e, t, n)
}
,function(e) {
var t = e.node;
if ("iframe" == _.tagName(e.node))
f._beforeFrameRemoved(e.node);
else if ("function" == typeof t.getElementsByTagName)
for (var n = t.getElementsByTagName("iframe"), r = 0; r < n.length; r++) {
var i = n[r];
f._beforeFrameRemoved(i)
}
}
,function(e, t, n) {
if (!d.isBlocked(e) && f._uploadResources)
for (var r = 0, i = T(e, t, n); r < i.length; r++) {
var o = i[r];
0 == o.lastIndexOf("blob:", 0) && f._resourceUploader.uploadBlob(o)
}
}
)
}
return Object.defineProperty(e.prototype, "perfWatcher", {
get: function() {
return this._perfWatcher
},
enumerable: !0,
configurable: !0
}),
e.prototype.watchEvents = function() {
var e = this;
this._mutWatcher.hookMutations(),
this._inputWatcher.hookEvents(),
this._styleSheetWatcher.start(),
this._listeners.add(this._wnd, "mousemove", !0, function(t) {
e.addMouseMove(t)
}),
this._listeners.add(this._wnd, "mousedown", !0, function(t) {
e.addMouseDown(t)
}),
this._listeners.add(this._wnd, "mouseup", !0, function(t) {
e.addMouseUp(t)
}),
this._listeners.add(this._wnd, "keydown", !0, function(t) {
e.addKeyDown(t)
}),
this._listeners.add(this._wnd, "keyup", !0, function(t) {
e.addKeyUp(t)
}),
this._listeners.add(this._wnd, "click", !0, function(t) {
e.addClick(t)
}),
this._listeners.add(this._wnd, "dblclick", !0, function(t) {
e.addDblClick(t)
}),
this._listeners.add(this._wnd, "focus", !0, function(t) {
e.addFocus(t)
}),
this._listeners.add(this._wnd, "blur", !0, function(t) {
e.addBlur(t)
}),
this._listeners.add(this._wnd, "change", !0, function(t) {
e.addChange(t)
}, !0),
this._listeners.add(this._wnd, "touchstart", !0, function(t) {
e.addTouchEvent(t, l.EVENT_TOUCHSTART),
e.addWindowScrollOrResize()
}),
this._listeners.add(this._wnd, "touchend", !0, function(t) {
e.addTouchEvent(t, l.EVENT_TOUCHEND),
e.addWindowScrollOrResize()
}),
this._listeners.add(this._wnd, "touchmove", !0, function(t) {
e.addTouchEvent(t, l.EVENT_TOUCHMOVE),
e.addWindowScrollOrResize()
}),
this._listeners.add(this._wnd, "touchcancel", !0, function(t) {
e.addTouchEvent(t, l.EVENT_TOUCHCANCEL)
}),
this._listeners.add(this._wnd, "play", !0, function(t) {
e.addPlayPauseEvent(t, l.EVENT_PLAY)
}),
this._listeners.add(this._wnd, "pause", !0, function(t) {
e.addPlayPauseEvent(t, l.EVENT_PAUSE)
}),
this._listeners.add(this._wnd, "scroll", !1, function(t) {
e.addWindowScrollOrResize()
}),
this._listeners.add(this._wnd, "resize", !1, function(t) {
e.addWindowScrollOrResize()
}),
this._listeners.add(this._wnd, "submit", !1, function(t) {
e.addFormSubmit(t)
}),
this._listeners.add(this._wnd, "focus", !1, function(t) {
e.addWindowFocus(t)
}),
this._listeners.add(this._wnd, "blur", !1, function(t) {
e.addWindowBlur(t)
}),
this._listeners.add(this._wnd, "popstate", !1, function() {
e.addNavigate()
}),
this._listeners.add(this._wnd, "selectstart", !0, function(t) {
e.addSelection()
}),
this._listeners.add(this._doc, "selectionchange", !0, function(t) {
e.addSelection()
});
var t = this._wnd.visualViewport;
if (t ? (this._listeners.add(t, "scroll", !0, function() {
return e.addWindowScrollOrResize()
}),
this._listeners.add(t, "resize", !0, function() {
return e.addWindowScrollOrResize()
})) : this._listeners.add(this._wnd, "mousewheel", !0, function() {
e.addWindowScrollOrResize()
}),
this._pushHook = h.activateHook(this._hst, "pushState"),
this._pushHook && this._pushHook.afterSync(function() {
return e.addNavigate()
}),
this._replaceHook = h.activateHook(this._hst, "replaceState"),
this._replaceHook && this._replaceHook.afterSync(function() {
return e.addNavigate()
}),
"function" == typeof this._wnd.document.hasFocus && this._queue.enqueue(this._wnd.document.hasFocus() ? l.EVENT_WINDOW_FOCUS : l.EVENT_WINDOW_BLUR, []),
v.windex.matchMedia)
for (var n = function(t, n, i) {
var o = v.windex.matchMedia(r._wnd, i);
if (!o)
return "continue";
var s = function() {
o.matches && e._queue.enqueue(l.EVENT_MEDIA_QUERY_CHANGE, [t, n])
};
r._listeners.add(o, "change", !0, s),
s()
}, r = this, i = 0, o = [["any-pointer", "coarse", "not screen and (any-pointer: fine)"], ["any-pointer", "fine", "only screen and (any-pointer: fine)"], ["any-hover", "none", "not screen and (any-hover: hover)"], ["any-hover", "hover", "only screen and (any-hover: hover)"]]; i < o.length; i++) {
var s = o[i];
n(s[0], s[1], s[2])
}
this._initialized = !0
}
,
e.prototype.initResourceUploading = function() {
this._resourceUploader.init(),
this._uploadResources = !0
}
,
e.prototype.onDomLoad = function() {
this.addDomLoaded(),
this.addViewportChange(),
this._mutWatcher._checkForMissingInsertions(g.uaIsIE)
}
,
e.prototype.onLoad = function() {
var e = this;
setTimeout(function() {
e._perfWatcher.onLoad(),
e.addLoad(),
e.addViewportChange()
}, 0)
}
,
e.prototype.ajaxWatcher = function() {
return this._ajaxWatcher
}
,
e.prototype.bundleEvents = function(e) {
return this._inputWatcher.tick(),
this._perfWatcher.tick(e),
this._ajaxWatcher.tick(e),
this.addViewportChange(),
this._mutWatcher.processMutations()
}
,
e.prototype.shutdown = function(e) {
this._initialized && (this._initialized = !1,
this._listeners.clear(),
this._pushHook && this._pushHook.disable(),
this._replaceHook && this._replaceHook.disable(),
this._perfWatcher.onLoad(),
this._inputWatcher.shutdown(),
this._mutWatcher.shutdown(),
this._ajaxWatcher.disable(),
this._perfWatcher.shutdown(),
this._queue.shutdown(e))
}
,
e.prototype.recordingIsDetached = function() {
return this._mutWatcher.recordingIsDetached()
}
,
e.prototype.visitNode = function(e, t, n) {
var r = this;
switch (t.nodeName) {
case "HTML":
this._docElScrollListener && this._listeners.remove(this._docElScrollListener),
this._docElScrollListener = this._listeners.add(t, "scroll", !0, function(e) {
r.addScroll(b(e))
});
break;
case "BODY":
this.addViewportChange(),
n.push(function() {
r.addSelection()
});
break;
case "INPUT":
case "TEXTAREA":
case "SELECT":
this._inputWatcher.addInput(t);
break;
case "FRAME":
case "IFRAME":
this._onFrameCreated(t);
break;
case "VIDEO":
case "AUDIO":
t.paused || this.addPlayPauseEventById(d.fsid(t), l.EVENT_PLAY);
break;
case "STYLE":
var i = t
, o = i.sheet;
if (!o)
break;
try {
o.rules || o.cssRules
} catch (e) {
break
}
var s = c.getDynamicRuleTail(i);
void 0 !== s && n.push(function() {
r._styleSheetWatcher.snapshot(i, s)
});
}
var a = t;
"number" != typeof a.scrollLeft || 0 == a.scrollLeft && 0 == a.scrollTop || this.addScroll(a)
}
,
e.prototype.addMouseMove = function(e) {
var t = d.fsid(b(e)) ? [e.clientX, e.clientY, d.fsid(b(e))] : [e.clientX, e.clientY];
this._queue.enqueue(l.EVENT_MOUSEMOVE, t)
}
,
e.prototype.addMouseDown = function(e) {
this._queue.enqueue(l.EVENT_MOUSEDOWN, [e.clientX, e.clientY])
}
,
e.prototype.addMouseUp = function(e) {
this._queue.enqueue(l.EVENT_MOUSEUP, [e.clientX, e.clientY])
}
,
e.prototype.addTouchEvent = function(e, t) {
if (void 0 !== e.changedTouches)
for (var n = 0; n < e.changedTouches.length; ++n) {
var r = e.changedTouches[n];
isNaN(parseInt(r.identifier)) && (r.identifier = 0),
this._queue.enqueue(t, [r.identifier, r.clientX, r.clientY])
}
}
,
e.prototype.addPlayPauseEvent = function(e, t) {
var n = b(e)
, r = d.fsid(n);
r && this.addPlayPauseEventById(r, t)
}
,
e.prototype.addPlayPauseEventById = function(e, t) {
this._queue.enqueue(t, [e])
}
,
e.prototype.addWindowFocus = function(e) {
this._queue.enqueue(l.EVENT_WINDOW_FOCUS, [])
}
,
e.prototype.addWindowBlur = function(e) {
this._queue.enqueue(l.EVENT_WINDOW_BLUR, [])
}
,
e.prototype.maybeAddValueChange = function() {
var e = this._doc.activeElement;
e && this._inputWatcher.onChange(e)
}
,
e.prototype.addKeyDown = function(e) {
var t = this._doc.activeElement;
t && !d.fsidIfNotBlocked(t) || (this.maybeAddValueChange(),
this._queue.enqueue(l.EVENT_KEYDOWN, []))
}
,
e.prototype.addKeyUp = function(e) {
var t = this._doc.activeElement;
t && !d.fsidIfNotBlocked(t) || (this.maybeAddValueChange(),
this._queue.enqueue(l.EVENT_KEYUP, []))
}
,
e.prototype.addViewportChange = function() {
var e = d.fsid(this.getWindowScrollingElement());
if (e) {
var t = i.getLayoutViewport(this._wnd, this._curLayoutViewport)
, n = i.getVisualViewport(this._wnd, t);
t.hasKnownPosition ? (r.sameViewportPos(t, this._curLayoutViewport) || this._queue.enqueue(l.EVENT_SCROLL_LAYOUT, [e, t.pageLeft, t.pageTop]),
r.sameVisualViewportOffset(n, this._curVisualViewport) || this._queue.enqueue(l.EVENT_SCROLL_VISUAL_OFFSET, [e, n.offsetLeft, n.offsetTop])) : r.sameViewportPos(n, this._curVisualViewport) || this._queue.enqueue(l.EVENT_SCROLL_LAYOUT, [e, n.pageLeft, n.pageTop]),
r.sameLayoutViewportSize(t, this._curLayoutViewport) || (t.width == t.clientWidth && t.height == t.clientHeight ? this._queue.enqueue(l.EVENT_RESIZE_LAYOUT, [t.clientWidth, t.clientHeight]) : this._queue.enqueue(l.EVENT_RESIZE_LAYOUT, [t.clientWidth, t.clientHeight, t.width, t.height])),
r.sameViewportSize(n, this._curVisualViewport) || this._queue.enqueue(l.EVENT_RESIZE_VISUAL, [n.width, n.height]),
this._curLayoutViewport = r.createLayoutViewportLike(t),
this._curVisualViewport = r.createVisualViewportLike(n)
}
}
,
e.prototype.doWorkInScrollTimeout = function(e, t) {
var n = this;
e in this._scrollTimeouts || (this._scrollTimeouts[e] = t,
new f.RealTimeout(function() {
if (e in n._scrollTimeouts) {
var t = n._scrollTimeouts[e];
delete n._scrollTimeouts[e],
t()
}
}
,p.ScrollSampleInterval).start())
}
,
e.prototype._fireScrollTimeouts = function() {
for (var e in this._scrollTimeouts)
this._scrollTimeouts[e](),
delete this._scrollTimeouts[e];
this._scrollTimeouts = []
}
,
e.prototype.getWindowScrollingElement = function() {
return this._doc.scrollingElement || this._doc.body || this._doc.documentElement
}
,
e.prototype.addWindowScrollOrResize = function() {
var e = this
, t = d.fsid(this.getWindowScrollingElement());
t && this.doWorkInScrollTimeout(t, function() {
return e.addViewportChange()
})
}
,
e.prototype.addScroll = function(e) {
var t = this
, n = d.fsid(e)
, r = e;
n && "number" == typeof r.scrollLeft && this.doWorkInScrollTimeout(n, function() {
t._queue.enqueue(l.EVENT_SCROLL_LAYOUT, [n, r.scrollLeft, r.scrollTop])
})
}
,
e.prototype.addDomLoaded = function() {
this._queue.enqueue(l.EVENT_DOMLOADED, [])
}
,
e.prototype.addLoad = function() {
this._queue.enqueue(l.EVENT_LOAD, [])
}
,
e.prototype.addNavigate = function() {
var e = this._loc.href;
this._currentUrl != e && (this._currentUrl = e,
this._queue.enqueue(l.EVENT_NAVIGATE, [y.scrubUrl(this._loc.href), this._doc.title]))
}
,
e.prototype.addClick = function(e) {
var t = b(e)
, n = d.fsid(t);
if (n) {
var r = 0
, i = 0
, o = 0
, s = 0;
if (t && t.getBoundingClientRect) {
var a = t.getBoundingClientRect();
r = a.left,
i = a.top,
o = a.width,
s = a.height
}
this._queue.enqueue(l.EVENT_CLICK, [n, e.clientX, e.clientY, r, i, o, s])
}
}
,
e.prototype.addDblClick = function(e) {
var t = b(e)
, n = d.fsid(t);
n && this._queue.enqueue(l.EVENT_DBL_CLICK, [n])
}
,
e.prototype.addFormSubmit = function(e) {
var t = b(e)
, n = d.fsid(t);
n && this._queue.enqueue(l.EVENT_FORM_SUBMIT, [n])
}
,
e.prototype.addFocus = function(e) {
var t = b(e)
, n = d.fsid(t);
n && this._queue.enqueue(l.EVENT_FOCUS, [n])
}
,
e.prototype.addBlur = function(e) {
var t = b(e)
, n = d.fsid(t);
n && this._queue.enqueue(l.EVENT_BLUR, [n])
}
,
e.prototype.addChange = function(e) {
this._inputWatcher.onChange(b(e))
}
,
e.prototype.addChangeElem = function(e) {
var t = d.fsidIfNotBlocked(e);
t && this._queue.enqueue(l.EVENT_VALUECHANGE, [t, o.valueOfInputishElem(e)])
}
,
e.prototype.addSelection = function() {
try {
var e = this.selectionArgs()
} catch (e) {
return
}
for (var t = !1, n = 0; n < 4; n++)
if (this._curSelection[n] !== e[n]) {
t = !0;
break
}
t && (this._curSelection = e,
this._queue.enqueue(l.EVENT_SELECT, e))
}
,
e.prototype.selectionArgs = function() {
if (!this._wnd.getSelection)
return [];
var e = this._wnd.getSelection();
if (!e)
return [];
if ("None" == e.type)
return [];
if ("Caret" == e.type) {
var t = d.fsid(e.anchorNode);
return t ? [t, e.anchorOffset] : []
}
if (!e.anchorNode || !e.focusNode)
return [];
var n = S(e.anchorNode, e.anchorOffset)
, r = n[0]
, i = n[1]
, o = S(e.focusNode, e.focusOffset)
, s = o[0]
, a = o[1]
, u = Boolean(r.compareDocumentPosition(s) & Node.DOCUMENT_POSITION_FOLLOWING)
, c = u ? [r, s] : [s, r]
, l = c[0]
, f = c[1]
, p = u ? [i, a] : [a, i]
, _ = p[0]
, g = p[1];
for (d.fsid(l) || (_ = 0); l && !d.fsid(l) && l != f; )
l = h.nextSibling(l) || l.parentNode;
for (d.fsid(f) || (g = 0); f && !d.fsid(f) && f != l; )
f = h.previousSibling(f) || f.parentNode;
if (l == f && _ == g)
return [];
var v = d.fsid(l)
, y = d.fsid(f);
return l && f && v && y ? [v, _, y, g, u] : []
}
,
e
}();
function S(e, t) {
if (!e.firstChild)
return [e, t];
e = e.firstChild;
for (var n = 0; n < t - 1; n++) {
var r = h.nextSibling(e);
if (!r)
return [e, 0];
e = r
}
return [e, 0]
}
t.EventWatcher = E;
var w = {
src: {
img: !0,
embed: !0
},
href: {
use: !0,
image: !0
},
data: {
object: !0
}
};
function T(e, t, n) {
var r, i = _.tagName(e);
return w[t] && w[t][i] ? [n] : "link" == i && "href" == t && (r = e.getAttribute("rel")) && r.indexOf("stylesheet") > -1 ? [n] : "srcset" != t || "img" != i && "source" != i ? [] : null != n.match(/^\s*$/) ? [] : h.map(n.split(","), function(e) {
return h.trim(e).split(/\s+/)[0]
})
}
function b(e) {
if (e.composed && e.target) {
var t = e.target;
if (t.nodeType == m.Node_ELEMENT_NODE && t.shadowRoot) {
var n = e.composedPath();
if (n.length > 0)
return n[0]
}
}
return e.target
}
t.getResourceUrls = T,
t.evtTarget = b
}
, function(e, t, n) {
"use strict";
function r(e) {
return {
pageLeft: e.pageLeft,
pageTop: e.pageTop,
width: e.width,
height: e.height
}
}
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.sameViewportPos = function(e, t) {
return t && e.pageLeft == t.pageLeft && e.pageTop == t.pageTop
}
,
t.sameVisualViewportOffset = function(e, t) {
return t && e.offsetLeft == t.offsetLeft && e.offsetTop == t.offsetTop
}
,
t.sameViewportSize = function(e, t) {
return t && e.width == t.width && e.height == t.height
}
,
t.sameLayoutViewportSize = function(e, t) {
return t && e.width == t.width && e.height == t.height && e.clientWidth == t.clientWidth && e.clientHeight == t.clientHeight
}
,
t.createVisualViewportLike = function(e) {
var t = r(e);
return t.offsetLeft = e.offsetLeft,
t.offsetTop = e.offsetTop,
t
}
,
t.createLayoutViewportLike = function(e) {
var t = r(e);
return t.clientWidth = e.clientWidth,
t.clientHeight = e.clientHeight,
t
}
}
, function(e, t, n) {
"use strict";
var r = this && this.__assign || function() {
return (r = Object.assign || function(e) {
for (var t, n = 1, r = arguments.length; n < r; n++)
for (var i in t = arguments[n])
Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
return e
}
).apply(this, arguments)
}
;
Object.defineProperty(t, "__esModule", {
value: !0
});
var i = n(9)
, o = n(4)
, s = n(0)
, a = n(15)
, u = function() {
function e(e, n) {
this._onchange = e,
this._checkElem = n,
this._fallback = !1,
this._elems = {},
this.values = {},
this.radios = {},
t._globalInputWatcher = this
}
return e.prototype.hookEvents = function() {
(function() {
var e = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value");
if (!e || !e.set)
return !1;
c || (_(HTMLInputElement, "value"),
_(HTMLInputElement, "checked"),
_(HTMLSelectElement, "value"),
_(HTMLTextAreaElement, "value"),
_(HTMLSelectElement, "selectedIndex"),
_(HTMLOptionElement, "selected"),
c = !0);
return !0
}
)() || (this._fallback = !0)
}
,
e.prototype.addInput = function(e) {
var t = i.fsid(e);
if (this._elems[t] = e,
v(e)) {
var n = f(e);
e.checked && (this.radios[n] = t)
} else
this.values[t] = g(e);
(function(e) {
switch (e.type) {
case "checkbox":
case "radio":
return e.checked != e.hasAttribute("checked");
default:
var t = e.value || "";
return t != function(e) {
if ("select" != a.tagName(e))
return e.getAttribute("value") || "";
var t = e
, n = t.querySelector("option[selected]") || t.querySelector("option");
if (!n)
return "";
return n.value || ""
}(e);
}
}
)(e) && this._onchange(e)
}
,
e.prototype.diffValue = function(e, t) {
var n = i.fsid(e);
if (v(e)) {
var r = f(e);
return this.radios[r] == n != ("true" == t)
}
return this.values[n] != t
}
,
e.prototype.onChange = function(e, t) {
void 0 === t && (t = g(e));
var n = i.fsid(e);
if ((e = this._elems[n]) && this.diffValue(e, t))
if (this._onchange(e),
v(e)) {
var r = f(e);
"false" == t && this.radios[r] == n ? delete this.radios[r] : this.radios[r] = n
} else
this.values[n] = t
}
,
e.prototype.tick = function() {
for (var e in this._elems) {
var t = this._elems[e];
if (this._checkElem(t)) {
if (this._fallback) {
var n = g(t);
if (t && this.diffValue(t, n))
if (this._onchange(t),
v(t)) {
var r = f(t);
this.radios[r] = +e
} else
this.values[e] = n
}
} else
delete this._elems[e],
delete this.values[e],
v(t) && delete this.radios[f(t)]
}
}
,
e.prototype.shutdown = function() {
t._globalInputWatcher = null
}
,
e.prototype._usingFallback = function() {
return this._fallback
}
,
e.prototype._trackingElem = function(e) {
return !!this._elems[e]
}
,
e
}();
t.InputWatcher = u;
var c = !1;
var h, d = {};
function l() {
try {
if (t._globalInputWatcher)
for (var e in d) {
var n = d[e]
, r = n[0]
, i = n[1];
t._globalInputWatcher.onChange(r, i)
}
} finally {
h = null,
d = {}
}
}
function f(e) {
if (!e)
return "";
for (var t = e; t && "form" != a.tagName(t); )
t = t.parentElement;
return (t && "form" == a.tagName(t) ? i.fsid(t) : 0) + ":" + e.name
}
var p = s.$entry(function(e, n) {
var r = function e(t, n) {
if (void 0 === n && (n = 2),
n <= 0)
return t;
var r = a.tagName(t);
return "option" != r && "optgroup" != r || !t.parentElement ? t : e(t.parentElement, n - 1)
}(e)
, s = i.fsid(r);
s && t._globalInputWatcher && t._globalInputWatcher.diffValue(r, "" + n) && (d[s] = [r, "" + n],
h || (h = new o.RealTimeout(l)).start())
});
function _(e, t) {
var n = Object.getOwnPropertyDescriptor(e.prototype, t);
n && n.set && Object.defineProperty(e.prototype, t, r({}, n, {
set: function(e) {
return p(this, e),
n.set.call(this, e)
}
}))
}
function g(e) {
switch (e.type) {
case "checkbox":
case "radio":
return "" + e.checked;
default:
var t = e.value;
return t || (t = ""),
"" + t;
}
}
function v(e) {
return e && "radio" == e.type
}
t.valueOfInputishElem = g
}
, function(e, t, n) {
"use strict";
var r = this && this.__assign || function() {
return (r = Object.assign || function(e) {
for (var t, n = 1, r = arguments.length; n < r; n++)
for (var i in t = arguments[n])
Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
return e
}
).apply(this, arguments)
}
;
Object.defineProperty(t, "__esModule", {
value: !0
});
var i = n(9)
, o = n(38)
, s = n(0)
, a = n(1)
, u = n(4)
, c = n(14)
, h = n(10)
, d = n(3)
, l = n(2)
, f = function() {
function e(e, t, n, r, o, s) {
void 0 === n && (n = !0),
void 0 === r && (r = function() {}
),
void 0 === o && (o = function() {}
),
void 0 === s && (s = function() {}
);
var a = this;
this._ctx = e,
this._watcher = t,
this._compress = n,
this._nodeVisitor = r,
this._beforeRemove = o,
this._attrVisitor = s,
this._sentDomSnapshot = !1,
this._toRefresh = [],
this._records = [],
this._watchedDims = {},
this._setPropertyWasThrottled = !1,
this._wnd = e.window,
this._encoder = new i.NodeEncoder(t),
l.assert(!this._watcher.onConsentChange, "This is the only consent change listener."),
this._watcher.onConsentChange = function() {
return a.updateConsent()
}
}
return e.prototype.hookMutations = function(e) {
var t = this;
void 0 === e && (e = this._wnd.document),
this._root = e,
this._sentDomSnapshot = !1,
this._compress && (this._lz = new o.LZJGWEncoder);
var n = !0;
if (h.uaIsIE)
try {
this.setUpIEWorkarounds()
} catch (e) {
a.logIfDebug("Error setting up IE workarounds for mutation watcher: " + e),
n = !1
}
n && (this._observer = new MutationObserver(function(e) {
for (var n = 0, r = e; n < r.length; n++) {
var i = r[n];
t._records.push(i)
}
}
))
}
,
e.prototype._observerOff = function() {
this._observer && this._observer.disconnect()
}
,
e.prototype.shutdown = function() {
this._observer && this._observer.disconnect();
var e = i.mirrorFor(this._root);
e && i.clearIds(e),
this._records = [],
h.uaIsIE && this.tearDownIEWorkarounds(),
this._watcher.onConsentChange = null
}
,
e.prototype.processMutations = function() {
if (!this._root)
return [];
var e = this._ctx.time.now()
, t = [];
if (this.maybeGetInitialSnapshot(e, t),
this._setPropertyWasThrottled && (t.push({
Kind: d.EVENT_FAIL_THROTTLED,
When: e,
Args: [d.ThrottledSetPropertyHooks]
}),
this._setPropertyWasThrottled = !1),
this._records.length > 0 || this._toRefresh.length > 0) {
var n = {}
, r = {};
for (var i in this.processRecords(e, t, r, n),
r) {
var o = i.split("\t");
t.push({
Kind: d.EVENT_MUT_ATTR,
When: e,
Args: [parseInt(o[0]), o[1], r[i]]
})
}
for (var i in n)
t.push({
Kind: d.EVENT_MUT_TEXT,
When: e,
Args: [parseInt(i), n[i]]
})
}
return this._records = [],
t
}
,
e.prototype.recordingIsDetached = function() {
return this._root && this._root != this._wnd.document
}
,
e.prototype.maybeGetInitialSnapshot = function(e, t) {
this._sentDomSnapshot || (this.genInsert(e, t, null, this._root, null),
this.resizeRelatedWatchedElements(e, t, this._root),
this._observer && this.observe(this._root),
this._sentDomSnapshot = !0)
}
,
e.prototype.observe = function(e) {
this._observer.observe(e, {
childList: !0,
attributes: !0,
characterData: !0,
subtree: !0,
attributeOldValue: !0,
characterDataOldValue: !0
})
}
,
e.prototype.processRecords = function(e, t, n, r) {
for (var o = this, s = {}, a = {}, u = function(n) {
if (i.mirrorFor(n)) {
o.genRemove(e, t, i.mirrorFor(n));
var r = i.mirrorFor(n.parentNode);
r && (a[r.id] = r.node)
}
}, h = 0; h < this._records.length; ++h)
try {
var d = this._records[h]
, f = i.fsid(d.target);
if (!f)
continue;
switch (s[f] = d.target,
d.type) {
case "childList":
if (d.removedNodes.length > 0)
for (var _ = 0; _ < d.removedNodes.length; ++_) {
var g = i.mirrorFor(d.removedNodes[_]);
g && g.id && this.genRemove(e, t, g)
}
d.addedNodes.length > 0 && (a[f] = d.target);
break;
case "characterData":
var v = i.safeTextContent(d.target);
d.oldValue != v && (i.isBlocked(d.target) || (r[f] = v));
break;
case "attributes":
var y = d.target
, m = this._watcher.isWatched(y);
if (m && m != c.WatchKindWatch && !i.isBlocked(y)) {
u(y);
break
}
var E = p(d.attributeNamespace) + (d.attributeName || "")
, S = i.fixAttrName(E);
if (y.hasAttribute(E)) {
var w = d.target.getAttribute(E);
d.oldValue != w && (w = this.rewriteAttr(d.target, S, w || ""),
this._attrVisitor(d.target, S, w || ""),
null !== w && (n[f + "\t" + S] = w))
} else
n[f + "\t" + S] = null;
}
} catch (e) {}
for (var T = 0, b = this._toRefresh; T < b.length; T++) {
var I = b[T];
try {
u(I)
} catch (e) {
l.FsBugSnag.sendToBugsnag(e, "error")
}
}
for (var N in this._toRefresh = [],
a) {
var O = a[N]
, C = i.mirrorFor(O);
C && C.id && this.diff(e, t, O, C.child, O.firstChild)
}
for (var N in s) {
O = s[N];
this.resizeRelatedWatchedElements(e, t, O)
}
}
,
e.prototype._checkForMissingInsertions = function(e) {
if (!this._sentDomSnapshot || !e)
return [];
return this.walkAddRecords(this._root),
[]
}
,
e.prototype.walkAddRecords = function(e) {
var t = this;
i.fsid(e) ? s.forEachNextSibling(e.firstChild, function(e) {
t.walkAddRecords(e)
}) : this._records.push({
addedNodes: [e],
attributeName: null,
attributeNamespace: null,
nextSibling: e.nextSibling,
oldValue: null,
previousSibling: e.previousSibling,
removedNodes: [],
target: e.parentNode,
type: "childList"
})
}
,
e.prototype.diff = function(e, t, n, r, o) {
for (var a = [], u = r, c = o; u && c; ) {
var h = i.mirrorFor(c);
i.fsid(c) ? h && u.id == h.id ? (u = u.next,
c = s.nextSibling(c)) : (a.push({
remove: u
}),
u = u.next) : (a.push({
insert: [n, c, u.node]
}),
c = s.nextSibling(c))
}
for (; u; u = u.next)
a.push({
remove: u
});
s.forEachNextSibling(c, function(e) {
a.push({
insert: [n, e, null]
})
});
for (var d = !1, f = 0; f < a.length; f++) {
var p = a[f];
p.insert ? this.genInsert(e, t, p.insert[0], p.insert[1], p.insert[2]) : p.remove && (d = !0,
this.genRemove(e, t, p.remove))
}
l.assert(!d, "All remove events should have been generated earlier, in MutationWatcher.processMutations")
}
,
e.prototype.resizeRelatedWatchedElements = function(e, t, n) {
var r = i.mirrorFor(n);
if (r)
for (var o = [r], a = 0; o.length && ++a < 1e3; ) {
var u = o.pop();
null != (c = i.watchKind(u.node)) ? this.addPlaceholderResize(e, t, u.node, c) : u.watchedChildSet && s.forIn(u.watchedChildSet, function(e) {
o.push(e)
})
}
else {
for (var c, h = n; h && !i.fsid(h); )
h = h.parentNode;
if (h)
null != (c = i.watchKind(h)) && this.addPlaceholderResize(e, t, h, c)
}
}
,
e.prototype.addPlaceholderResize = function(e, t, n, r) {
try {
var o = n.getBoundingClientRect()
, s = Math.floor(o.width)
, a = Math.floor(o.height)
, u = i.fsid(n)
, h = this._watchedDims[u];
if (h && h.w == s && h.h == a)
return;
if (r == c.WatchKindWatch) {
var l = !!h && 0 != h.w && 0 != h.h
, f = 0 != s && 0 != a;
l != f && t.push({
When: e,
Kind: d.EVENT_WATCHED_ELEM,
Args: [u, f]
})
} else
t.push({
When: e,
Kind: d.EVENT_PLACEHOLDER_SIZE,
Args: [u, s, a]
});
this._watchedDims[u] = {
w: s,
h: a
}
} catch (e) {}
}
,
e.prototype.genInsert = function(e, t, n, r, o) {
var s = i.fsid(n) || -1
, a = i.fsid(o) || -1
, u = this.genDocStream(e, n, r, o);
u.length > 0 && t.push({
When: e,
Kind: d.EVENT_MUT_INSERT,
Args: [s, a, this._compress ? this._lz.encode(u) : u]
})
}
,
e.prototype.genDocStream = function(e, t, n, r) {
var o = this;
if (t && i.isBlocked(t))
return [];
for (var s = [], a = this._encoder.tokenizeNode(t, r, n, function(t) {
o._nodeVisitor(e, t, s)
}, function(e, t, n) {
o._attrVisitor(e, t, n)
}), u = 0, c = s; u < c.length; u++) {
(0,
c[u])()
}
return a
}
,
e.prototype.genRemove = function(e, t, n) {
var r = n.id;
if (this._beforeRemove(n),
i.removeMirror(n),
t.length > 0) {
var o = t[t.length - 1];
if (o.Kind == d.EVENT_MUT_REMOVE)
return void o.Args.push(r)
}
t.push({
When: e,
Kind: d.EVENT_MUT_REMOVE,
Args: [r]
})
}
,
e.prototype.rewriteAttr = function(e, t, n) {
return i.isBlocked(e) ? i.rewriteBlockedAttribute(e, t, n) : n
}
,
e.prototype.setUpIEWorkarounds = function() {
var t = this;
if (h.uaIsIE11) {
var n = Object.getOwnPropertyDescriptor(Node.prototype, "textContent")
, i = n && n.set;
if (!n || !i)
throw new Error("Missing textContent setter -- not safe to record mutations.");
Object.defineProperty(Element.prototype, "textContent", r({}, n, {
set: function(e) {
try {
for (var t = void 0; t = this.firstChild; )
this.removeChild(t);
if (null === e || "" == e)
return;
var n = (this.ownerDocument || document).createTextNode(e);
this.appendChild(n)
} catch (e) {
i && i.apply(this, arguments)
}
}
}))
}
this._setPropertyThrottle = new u.Throttle(e.ThrottleMax,e.ThrottleInterval,function() {
return new u.RealTimeout(function() {
t._setPropertyWasThrottled = !0,
t.tearDownIEWorkarounds()
}
).start()
}
);
var o = this._setPropertyThrottle.guard(function(e) {
return e.cssText = e.cssText
});
this._setPropertyThrottle.open(),
this._setPropertyHook = s.activateHook(CSSStyleDeclaration.prototype, "setProperty"),
this._setPropertyHook && this._setPropertyHook.afterSync(function() {
o(this)
}),
this._removePropertyHook = s.activateHook(CSSStyleDeclaration.prototype, "removeProperty"),
this._removePropertyHook && this._removePropertyHook.afterSync(function() {
o(this)
})
}
,
e.prototype.tearDownIEWorkarounds = function() {
this._setPropertyThrottle && this._setPropertyThrottle.close(),
this._setPropertyHook && this._setPropertyHook.disable(),
this._removePropertyHook && this._removePropertyHook.disable()
}
,
e.prototype.updateConsent = function() {
for (var e = this._watcher.allConsentSensitiveElements(this._root), t = 0; t < e.length; t++)
i.fsid(e[t]) && this._toRefresh.push(e[t])
}
,
e.ThrottleMax = 1024,
e.ThrottleInterval = 1e4,
e
}();
function p(e) {
return void 0 === e && (e = ""),
null === e ? "" : {
"http://www.w3.org/1999/xlink": "xlink:",
"http://www.w3.org/XML/1998/namespace": "xml:",
"http://www.w3.org/2000/xmlns/": "xmlns:"
}[e] || ""
}
t.MutationWatcher = f
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = function() {
function e() {
this.dict = {
idx: -1,
map: {}
},
this.nodeCount = 1,
this.startIdx = 0
}
return e.prototype.encode = function(t) {
if (0 == t.length)
return [];
var n, r, i = t[0], o = Object.prototype.hasOwnProperty.call(this.dict.map, i) ? this.dict.map[i] : null, s = [], a = 1;
function u() {
o ? a > 1 ? s.push([o.idx, a]) : s.push(o.idx) : s.push(i)
}
for (n = 1; n < t.length; n++)
if (r = t[n],
o && Object.prototype.hasOwnProperty.call(o.map, r))
a++,
i = r,
o = o.map[r];
else {
u();
var c = this.startIdx + n - a;
null == o && this.nodeCount < e.MAX_NODES && (o = {
idx: c,
map: {}
},
this.dict.map[i] = o,
this.nodeCount++),
o && this.nodeCount < e.MAX_NODES && (o.map[r] = {
idx: c,
map: {}
},
this.nodeCount++),
a = 1,
i = r,
o = Object.prototype.hasOwnProperty.call(this.dict.map, r) ? this.dict.map[r] : null
}
return u(),
this.startIdx += t.length,
s
}
,
e.MAX_NODES = 1e4,
e
}();
t.LZJGWEncoder = r;
var i = function() {
function e() {
this._seq = []
}
return e.prototype.sequence = function() {
return this._seq
}
,
e.prototype.decode = function(e) {
for (var t = this._seq.length, n = 0; n < e.length; ++n) {
var r = e[n];
switch (typeof r) {
case "string":
this._seq.push(r);
break;
case "number":
this._seq.push(this._seq[r]);
break;
case "object":
if (null == r) {
this._seq.push("");
break
}
for (var i = 0; i < r[1]; i++)
this._seq.push(this._seq[r[0] + i]);
}
}
return t
}
,
e
}();
t.LZJGWDecoder = i
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}),
n(23);
var r = n(3)
, i = n(11)
, o = ["navigationStart", "unloadEventStart", "unloadEventEnd", "redirectStart", "redirectEnd", "fetchStart", "domainLookupStart", "domainLookupEnd", "connectStart", "connectEnd", "secureConnectionStart", "requestStart", "responseStart", "responseEnd", "domLoading", "domInteractive", "domContentLoadedEventStart", "domContentLoadedEventEnd", "domComplete", "loadEventStart", "loadEventEnd"]
, s = ["name", "startTime", "duration", "initiatorType", "redirectStart", "redirectEnd", "fetchStart", "domainLookupStart", "domainLookupEnd", "connectStart", "connectEnd", "secureConnectionStart", "requestStart", "responseStart", "responseEnd", "unloadEventStart", "unloadEventEnd", "domInteractive", "domContentLoadedEventStart", "domContentLoadedEventEnd", "domComplete", "loadEventStart", "loadEventEnd", "type", "redirectCount", "decodedBodySize", "encodedBodySize", "transferSize"]
, a = ["name", "startTime", "duration", "initiatorType", "redirectStart", "redirectEnd", "fetchStart", "domainLookupStart", "domainLookupEnd", "connectStart", "connectEnd", "secureConnectionStart", "requestStart", "responseStart", "responseEnd", "decodedBodySize", "encodedBodySize", "transferSize"]
, u = ["name", "startTime", "duration"]
, c = ["jsHeapSizeLimit", "totalJSHeapSize", "usedJSHeapSize"]
, h = function() {
function e(e, t, n) {
var i = this;
if (this._ctx = e,
this._queue = t,
this._perfSupported = !1,
this._timingSupported = !1,
this._getEntriesSupported = !1,
this._memorySupported = !1,
this._lastUsedJSHeapSize = 0,
this.prevEntries = [],
this._gotLoad = !1,
window.performance) {
var o = window.performance;
this._perfSupported = !0,
o.timing && (this._timingSupported = !0),
o.memory && (this._memorySupported = !0),
"function" == typeof o.getEntries && (this._getEntriesSupported = !0),
e.recording.inFrame || this._queue.enqueue(r.EVENT_REC_FEAT_SUPPORTED, [r.RecFeaturePerformance, this._timingSupported, r.RecFeaturePerformanceEntries, this._getEntriesSupported, r.RecFeaturePerformanceMemory, this._memorySupported]),
o.addEventListener && o.removeEventListener && (this._listeners = n.createChild(),
this._listeners.add(o, "resourcetimingbufferfull", !0, function() {
i._queue.enqueue(r.EVENT_RESOURCE_TIMING_BUFFER_FULL, [])
})),
this.checkMemory()
}
}
return e.prototype.onLoad = function() {
this._gotLoad || (this._gotLoad = !0,
this._timingSupported && (this.recordTiming(performance.timing),
this.checkForNewEntries()))
}
,
e.prototype.tick = function(e) {
this.checkMemory(),
e && this.checkForNewEntries()
}
,
e.prototype.shutdown = function() {
this._listeners && this._listeners.clear()
}
,
e.prototype.checkMemory = function() {
var e = performance.memory;
if (this._memorySupported && e && !this._ctx.recording.inFrame) {
var t = e.usedJSHeapSize - this._lastUsedJSHeapSize;
(0 == this._lastUsedJSHeapSize || Math.abs(t / this._lastUsedJSHeapSize) > .2) && (this.addPerfEvent(r.PerfEntryMemory, e, c),
this._lastUsedJSHeapSize = e.usedJSHeapSize)
}
}
,
e.prototype.recordEntry = function(e) {
switch (e.entryType) {
case "navigation":
this.recordNavigation(e);
break;
case "resource":
this.recordResource(e);
break;
case "paint":
this.recordPaint(e);
break;
case "measure":
this.recordMeasure(e);
break;
case "mark":
this.recordMark(e);
}
}
,
e.prototype.checkForNewEntries = function() {
if (this._perfSupported && this._getEntriesSupported) {
var e = performance.getEntries()
, t = function(e) {
return e.name + ":" + e.entryType + ":" + e.startTime + ":" + e.duration
};
e.sort(function(e, n) {
return e.startTime == n.startTime ? t(e).localeCompare(t(n)) : e.startTime - n.startTime
});
for (var n = 0, r = 0; n < e.length && r < this.prevEntries.length; )
t(e[n]) != t(this.prevEntries[r]) ? (this.recordEntry(e[n]),
n++) : (n++,
r++);
for (; n < e.length; )
this.recordEntry(e[n]),
n++;
this.prevEntries = e
}
}
,
e.prototype.recordTiming = function(e) {
this.addPerfEvent(r.PerfEntryTiming, e, o)
}
,
e.prototype.recordNavigation = function(e) {
this.addPerfEvent(r.PerfEntryNavigation, e, s, {
name: "scrub"
})
}
,
e.prototype.recordResource = function(e) {
this.addPerfEvent(r.PerfEntryResource, e, a, {
name: "scrub"
})
}
,
e.prototype.recordPaint = function(e) {
this.addPerfEvent(r.PerfEntryPaint, e, u)
}
,
e.prototype.recordMark = function(e) {
this.addPerfEvent(r.PerfEntryMark, e, u)
}
,
e.prototype.recordMeasure = function(e) {
this.addPerfEvent(r.PerfEntryMeasure, e, u)
}
,
e.prototype.addPerfEvent = function(e, t, n, o) {
void 0 === o && (o = {});
for (var s = [e], a = 0, u = n; a < u.length; a++) {
var c = u[a]
, h = t[c];
void 0 === h && (h = -1),
c in o && (h = i.scrubUrl(h)),
s.push(h)
}
this._queue.enqueue(r.EVENT_PERF_ENTRY, s)
}
,
e
}();
t.PerfWatcher = h
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(0)
, i = n(1)
, o = n(25)
, s = n(11)
, a = n(3)
, u = n(41)
, c = n(8)
, h = n(5)
, d = "\r\n"
, l = ["a-im", "accept", "accept-charset", "accept-encoding", "accept-language", "accept-datetime", "access-control-request-method,", "access-control-request-headers", "cache-control", "connection", "content-length", "content-md5", "content-type", "date", "expect", "forwarded", "from", "host", "if-match", "if-modified-since", "if-none-match", "if-range", "if-unmodified-since", "max-forwards", "origin", "pragma", "range", "referer", "te", "user-agent", "upgrade", "via", "warning"]
, f = ["access-control-allow-origin", "access-control-allow-credentials", "access-control-expose-headers", "access-control-max-age", "access-control-allow-methods", "access-control-allow-headers", "accept-patch", "accept-ranges", "age", "allow", "alt-svc", "cache-control", "connection", "content-disposition", "content-encoding", "content-language", "content-length", "content-location", "content-md5", "content-range", "content-type", "date", "delta-base", "etag", "expires", "im", "last-modified", "link", "location", "permanent", "p3p", "pragma", "proxy-authenticate", "public-key-pins", "retry-after", "permanent", "server", "status", "strict-transport-security", "trailer", "transfer-encoding", "tk", "upgrade", "vary", "via", "warning", "www-authenticate", "x-frame-options"]
, p = {
BM7A6: ["x-b3-traceid"]
}
, _ = {}
, g = function() {
function e(e, t) {
this._ctx = e,
this._queue = t,
this._enabled = !1,
this._reqHeaderWhitelist = {},
this._rspHeaderWhitelist = {},
this._pendingReqs = {},
this._events = [],
this._curId = 1,
this.addHeaderWhitelist(l, f),
this.addHeaderWhitelist(p[e.options.orgId], _[e.options.orgId])
}
return e.prototype.isEnabled = function() {
return this._enabled
}
,
e.prototype.enable = function() {
this._enabled || (this._enabled = !0,
this._queue.enqueue(a.EVENT_REC_FEAT_SUPPORTED, [a.RecFeatureAjax, !0]),
this.maybeShimXHR(this._ctx.window))
}
,
e.prototype.disable = function() {
this._enabled && (this._enabled = !1,
this._xhrOpenHook && (this._xhrOpenHook.disable(),
this._xhrOpenHook = null),
this._xhrSetHeaderHook && (this._xhrSetHeaderHook.disable(),
this._xhrSetHeaderHook = null))
}
,
e.prototype.setWatches = function(e) {
var t = this
, n = [];
this._reqWhitelist = [],
this._rspWhitelist = [],
e.forEach(function(e) {
n.push(e.URLRegex),
t._reqWhitelist.push(R(e.RecordReq, e.ReqWhitelist)),
t._rspWhitelist.push(R(e.RecordRsp, e.RspWhitelist))
}),
this._reqBodyRegex = new RegExp("(" + n.join(")|(") + ")")
}
,
e.prototype.addHeaderWhitelist = function(e, t) {
var n = this;
e && e.forEach(function(e) {
return n._reqHeaderWhitelist[e] = !0
}),
t && t.forEach(function(e) {
return n._rspHeaderWhitelist[e] = !0
})
}
,
e.prototype.tick = function(e) {
if (e) {
for (var t = 0; t < this._events.length; t++)
this._queue.enqueue(a.EVENT_AJAX_REQUEST, this._events[t]);
this._events = []
}
}
,
e.prototype.maybeShimXHR = function(e) {
var t = this
, n = e.XMLHttpRequest;
if (n) {
var i = n.prototype;
this._xhrOpenHook = r.activateHook(i, "open"),
this._xhrOpenHook && this._xhrOpenHook.before(function(e) {
var n = e.args[0]
, r = e.args[1];
t.addPendingReq(e.that, n, r),
e.that.addEventListener("load", function(n) {
t.onComplete(e.that)
}),
e.that.addEventListener("error", function(n) {
t.onComplete(e.that)
})
}),
this._xhrSendHook = r.activateHook(i, "send"),
this._xhrSendHook && this._xhrSendHook.before(function(e) {
var n = e.args[0];
t.maybeRecordReqBody(e.that, n)
}),
this._xhrSetHeaderHook = r.activateHook(i, "setRequestHeader"),
this._xhrSetHeaderHook && this._xhrSetHeaderHook.before(function(e) {
var n = e.args[0]
, r = e.args[1];
t.addHeader(e.that, n, r)
})
}
}
,
e.prototype.pendingReq = function(e) {
var t = O(e);
return t ? this._pendingReqs[t] : (i.logIfDebug("missing xhr req id"),
null)
}
,
e.prototype.deletePending = function(e) {
var t = O(e);
t && delete this._pendingReqs[t]
}
,
e.prototype.maybeRecordReqBody = function(e, t) {
var n, r = this.pendingReq(e);
r && (n = this.requestBody(r.url, t),
r.reqSize = n[0],
r.reqBody = n[1])
}
,
e.prototype.addPendingReq = function(e, t, n) {
this.deletePending(e);
var r = this._curId++;
n = s.resolveUrlToDocument(this._ctx.window, n),
this._pendingReqs[r] = {
id: r,
xhr: e,
method: t,
url: n,
startTime: Date.now(),
headers: [],
reqSize: 0,
reqBody: void 0
},
function(e, t) {
e._fs = t
}(e, r)
}
,
e.prototype.addHeader = function(e, t, n) {
var r = this.pendingReq(e);
r && r.headers.push([t, n])
}
,
e.prototype.onComplete = function(e) {
var t = this
, n = this.pendingReq(e);
if (n) {
this.deletePending(e);
var r = Date.now() - n.startTime
, i = A(n.headers, function(e) {
return e[0]in t._reqHeaderWhitelist
})
, o = A(k(e.getAllResponseHeaders()), function(e) {
return e[0]in t._rspHeaderWhitelist
})
, a = this.responseBody(n.url, e)
, u = a[0]
, c = a[1]
, h = [n.method, s.scrubUrl(n.url), r, e.status, i, o, n.startTime, n.reqSize, u];
h.push(n.reqBody ? n.reqBody : null),
h.push(c || null),
this._events.push(h)
}
}
,
e.prototype.findWhitelistIndexFor = function(e) {
if (this._reqBodyRegex) {
var t = this._reqBodyRegex.exec(e);
if (t)
for (var n = 1; n < t.length; n++)
if (void 0 !== t[n])
return n - 1
}
return -1
}
,
e.prototype.requestBody = function(e, t) {
if (null == t)
return [0, void 0];
var n = this.findWhitelistIndexFor(e)
, r = n >= 0 && this._reqWhitelist[n]
, i = typeof t;
if ("string" == i)
return v(t, r);
if ("object" == i) {
var o = i.constructor;
switch (o) {
case String:
case Object:
default:
return y(t, r);
case Blob:
return E(t, r);
case ArrayBuffer:
return m(t, r);
case Document:
case FormData:
case URLSearchParams:
case ReadableStream:
return [-1, r ? "" + o.name : void 0];
}
}
return [-1, r ? "[unknown]" : void 0]
}
,
e.prototype.responseBody = function(e, t) {
var n = this.findWhitelistIndexFor(e)
, r = n >= 0 && this._rspWhitelist[n];
if (t.responseType) {
var o = t.response;
switch (o || i.logIfDebug("Maybe response type was different that expected."),
t.responseType) {
case "text":
return S(t.responseText, r);
case "json":
return w(o, r);
case "arraybuffer":
return b(o, r);
case "blob":
return I(o, r);
case "document":
return T(t.responseText, r);
}
}
return S(t.responseText, r)
}
,
e
}();
function v(e, t) {
return [e.length, C(e, t)]
}
function y(e, t) {
var n = void 0;
return !1 !== t && (n = u.whitelistedJson(e, c.MaxPayloadLength, t)),
[N(e), n]
}
function m(e, t) {
var n = void 0;
return t && (n = "[ArrayBuffer]"),
[e.byteLength, n]
}
function E(e, t) {
var n = void 0;
return t && (n = "[Blob]"),
[e.size, n]
}
function S(e, t) {
return e ? [e.length, C(e, t)] : [-1, void 0]
}
function w(e, t) {
return e ? [N(e), u.whitelistedJson(e, c.MaxPayloadLength, t)] : [-1, void 0]
}
function T(e, t) {
return [e ? e.length : -1, t ? "[Document]" : void 0]
}
function b(e, t) {
return [e ? e.byteLength : -1, t ? "[ArrayBuffer]" : void 0]
}
function I(e, t) {
return [e ? e.size : -1, t ? "[Blob]" : void 0]
}
function N(e) {
try {
return h.windex.jsonStringify(e).length
} catch (e) {}
return 0
}
function O(e) {
return e._fs
}
function C(e, t) {
if (0 != t)
try {
return u.whitelistedJson(h.windex.jsonParse(e), c.MaxPayloadLength, t)
} catch (n) {
return 1 == t ? e.slice(0, c.MaxPayloadLength) : void 0
}
}
function R(e, t) {
switch (e) {
default:
case a.AjaxBodyElide:
return !1;
case a.AjaxBodyRecord:
return !0;
case a.AjaxBodyWhitelist:
try {
return o.parseFieldPatterns(t)
} catch (e) {
return i.logIfDebug("error parsing field whitelist (" + t + ": " + e),
!1
}
}
}
function k(e) {
var t = [];
return e.split(d).forEach(function(e) {
var n = e.indexOf(":");
-1 != n ? t.push([e.slice(0, n).trim(), e.slice(n + 1, e.length).trim()]) : t.push([e.trim(), null])
}),
t
}
function A(e, t) {
var n = "";
return e.forEach(function(e) {
e[0] = e[0].toLowerCase();
var r = t(e);
n += e[0] + (r ? ": " + e[1] : "") + d
}),
n
}
t.AjaxWatcher = g,
t._reqBodyString = v,
t._reqBodyObject = y,
t._reqBodyArrayBuffer = m,
t._reqBodyBlob = E,
t._rspBodyText = S,
t._rspBodyObject = w,
t._rspBodyDocument = T,
t._rspBodyArrayBuffer = b,
t._rspBodyBlob = I,
t.parseHeaders = k
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(25)
, i = n(5)
, o = r.parseFieldPatterns("**");
t.whitelistedJson = function(e, t, n) {
var r;
if (n) {
r = 1 == n ? o : n;
try {
var s = 0
, a = [1]
, u = []
, c = {};
return c[r.id] = r,
u.push(c),
i.windex.jsonStringify(e, function(e, n) {
var r = n && "object" == typeof n;
if ("" == e && 1 == a.length)
return a[0]--,
r && a.push(i.windex.objectKeys(n).length),
n;
var o = {}
, c = u[u.length - 1]
, h = !0
, d = !1
, l = function(e) {
o[e.id] = e,
h = !1,
e.term && (d = !0)
};
for (var f in c) {
var p = c[f];
e in p.edges && l(p.edges[e]),
"*"in p.edges && l(p.edges["*"]),
p.loop && l(p)
}
for ((h || !r && !d) && (n = null),
s += e.length + 2,
(s += r ? 2 : null === n ? 4 : n.toString().length) >= t && (n = void 0),
a[a.length - 1]--,
n && r && (a.push(i.windex.objectKeys(n).length),
u.push(o)); a[a.length - 1] <= 0; )
a.pop(),
u.pop();
return n
})
} catch (e) {}
return "[error serializing " + e.constructor.name + "]"
}
}
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r, i = n(0), o = n(1), s = n(4), a = n(3), u = n(9), c = n(24), h = n(43), d = n(2), l = function() {
function e(t, n) {
var r = this;
this.ctx = t,
this.queue = n,
this.hooks = [];
var i = e;
this.throttle = new s.Throttle(i.ThrottleMax,i.ThrottleInterval,function() {
return setTimeout(function() {
r.queue.enqueue(a.EVENT_FAIL_THROTTLED, [a.ThrottledStyleSheetHooks]),
r.stop()
})
}
),
this.addInsert = this.throttle.guard(this.addInsert),
this.addDelete = this.throttle.guard(this.addDelete)
}
return e.prototype.start = function() {
var e = this;
this.throttle.open();
var t = this.ctx.window;
if (t.CSSStyleSheet) {
var n, r = t.CSSStyleSheet.prototype;
(n = i.activateHook(r, "insertRule")) && (n.afterSync(function(t) {
e.addInsert(t.that, t.args[0], t.args[1])
}),
this.hooks.push(n)),
(n = i.activateHook(r, "deleteRule")) && (n.afterSync(function(t) {
e.addDelete(t.that, t.args[0])
}),
this.hooks.push(n))
}
}
,
e.prototype.snapshot = function(e, t) {
void 0 === t && (t = 0);
var n = u.fsid(e);
if (n) {
var i = h.sheetRules(h.elemSheet(e));
if (i)
for (var o = t; o < i.length; o++) {
var s = void 0;
try {
s = r(i[o])
} catch (e) {
s = "html {}"
}
this.queue.enqueue(a.EVENT_CSSRULE_INSERT, [n, s, o])
}
}
}
,
e.prototype.addInsert = function(t, n, r) {
var i = u.fsid(t.ownerNode);
if (i && "string" == typeof n) {
n.length > e.MaxRuleBytes && (o.logIfDebug("CSSRule too large, inserting dummy instead: " + n.length),
n = "dummy {}");
var s = [i, n];
"number" == typeof r && s.push(r),
this.queue.enqueue(a.EVENT_CSSRULE_INSERT, s)
}
}
,
e.prototype.addDelete = function(e, t) {
var n = u.fsid(e.ownerNode);
n && "number" == typeof t && this.queue.enqueue(a.EVENT_CSSRULE_DELETE, [n, t])
}
,
e.prototype.stop = function() {
this.throttle.close();
for (var e = 0, t = this.hooks; e < t.length; e++) {
t[e].disable()
}
this.hooks = []
}
,
e.ThrottleMax = 1e4,
e.ThrottleInterval = 1e4,
e.MaxRuleBytes = 16384,
e
}();
t.StyleSheetWatcher = l;
var f = document.createElement("div");
function p(e, t) {
if (void 0 === t && (t = 0),
!d.assert(t <= 20, "No deep recursion for CSS rules"))
return "html { /* Depth limit exceeded! */ }";
var n = function(e) {
switch (e.type) {
case CSSRule.PAGE_RULE:
var t = e.selectorText || "";
return t && i.hasPrefix(t, "@page") ? t : "@page " + t;
case CSSRule.KEYFRAME_RULE:
return e.keyText;
case CSSRule.STYLE_RULE:
return e.selectorText;
case CSSRule.MEDIA_RULE:
return "@media " + e.media.mediaText;
case CSSRule.KEYFRAMES_RULE:
return "@keyframes " + e.name;
case CSSRule.SUPPORTS_RULE:
return "@supports " + e.conditionText;
default:
return null;
}
}(e);
if (null == n)
return e.cssText;
var r = function(e, t) {
var n = e
, r = n.style;
if (r) {
for (var i = "", o = 0; o < r.length; o++) {
var s = r[o]
, a = r[s];
i += s + ": " + a,
"important" === r.getPropertyPriority(s) && (i += " !important"),
i += "; "
}
return i
}
var u = n.cssRules;
if (!u)
return null;
for (var c = "", o = 0; o < u.length; o++)
c += p(u[o], t + 1);
return c
}(e, t);
return null == r ? e.cssText : n + " { " + r + "} "
}
f.style.width = "initial",
r = "" != f.style.cssText ? function(e) {
return e.cssText
}
: p,
t._jsCssText = p,
t.getDynamicRuleTail = function(e) {
var t = e.textContent || "";
if (!(t.length > 5e5)) {
var n = h.sheetRules(h.elemSheet(e));
if (n) {
if (n.length > 0 && /^\s*$/.test(t))
return 0;
var r = c.theDummyDoc()
, i = r.importNode(e, !0);
r.head.appendChild(i);
var o = h.sheetRules(h.elemSheet(i));
if (r.head.removeChild(i),
o)
return n.length > o.length ? o.length : void 0
}
}
}
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.elemSheet = function(e) {
return e ? e.sheet : void 0
}
,
t.sheetRules = function(e) {
try {
return e ? e.cssRules || e.rules : void 0
} catch (e) {
return
}
}
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(3)
, i = n(0)
, o = n(45)
, s = n(9)
, a = n(15)
, u = n(10)
, c = n(5)
, h = function() {
function e(e, t, n) {
this._queue = t,
this._enabled = !1,
this._overflow = !1,
this._total = 0,
this._hooks = [],
this._wnd = e.window,
this._listeners = n.createChild(),
this.maxLogsPerPage = "P2C" == e.options.orgId || "ESHFX" == e.options.orgId ? 3e3 : r.MAX_LOGS_PER_PAGE
}
return e.prototype._overflowMsg = function() {
return "\"[received more than " + this.maxLogsPerPage + " messages]\""
}
,
e.prototype.enable = function() {
var e = this;
if (this._listeners.add(this._wnd, "error", !0, function(t) {
return e.addError(t)
}),
this._listeners.add(this._wnd, "unhandledrejection", !0, function(t) {
e.addLog("error", ["Uncaught (in promise)", t.reason])
}, !0),
!this._enabled)
if (this._enabled = !0,
this._queue.enqueue(r.EVENT_REC_FEAT_SUPPORTED, [r.RecFeatureConsole, !0]),
this._wnd.console)
for (var t = function(t) {
var r = i.activateHook(n._wnd.console, t);
if (!r)
return "continue";
r.before(function(n) {
var r = n.args;
return e.addLog(t, r)
}),
n._hooks.push(r)
}, n = this, o = 0, s = ["log", "info", "warn", "error"]; o < s.length; o++) {
t(s[o])
}
else
this.addLog("log", ["NOTE: Log messages cannot be captured on IE9"])
}
,
e.prototype.isEnabled = function() {
return this._enabled
}
,
e.prototype.disable = function() {
var e;
if (this._listeners.clear(),
this._enabled)
for (this._enabled = !1; e = this._hooks.pop(); )
e.disable()
}
,
e.prototype.addLog = function(e, t) {
if (this.checkOverflow()) {
for (var n = [e], i = 0; i < t.length; ++i)
n.push(d(t[i], 1e3));
this._queue.enqueue(r.EVENT_LOG, n)
}
}
,
e.prototype.addError = function(e) {
if (this.checkOverflow()) {
var t = e.message
, n = e.filename
, i = e.lineno;
if (t || n || i) {
"object" == typeof t && (t = d(t, 1e3)),
"object" == typeof n && (n = d(n, 100)),
"object" == typeof i && (i = -1);
var s = [t, n, i];
s = s.concat(o.stackTraceFromError(e.error)),
this._queue.enqueue(r.EVENT_ERROR, s)
}
}
}
,
e.prototype.checkOverflow = function() {
return !this._overflow && (this._total == r.MAX_LOGS_PER_PAGE ? (this._queue.enqueue(r.EVENT_LOG, ["warn", this._overflowMsg()]),
this._overflow = !0,
!1) : (this._total++,
!0))
}
,
e
}();
function d(e, t) {
try {
var n = {
tokens: [],
opath: [],
cyclic: function(e, t) {
var n = 0;
try {
c.windex.jsonStringify(e, function(e, r) {
if (n++ > t)
throw "break";
if ("object" == typeof r)
return r
})
} catch (e) {
return "break" != e
}
return !1
}(e, t / 4)
};
return function e(t, n, r, o) {
if (n < 1)
return 0;
var h = t && t.constructor == Date ? l(t) : function(e) {
return "object" == typeof Node ? e instanceof Node : e && "object" == typeof e && e.nodeType > 0 && "string" == typeof e.nodeName
}(t) ? function(e) {
if (!s.fsidIfNotBlocked(e))
return e.toString();
if (e.tagName) {
var t = a.tagName(e)
, n = u.uaIsEdge && "output" == t ? {} : e.attributes;
return "<" + t + (n && n.type ? " type=\"" + n.type.value + "\"" : "") + (e.id ? " id=\"" + e.id + "\"" : "") + (e.className ? " class=\"" + e.className + "\"" : "") + ">" + (e.firstChild ? "..." : "") + "</" + t + ">"
}
var r = "";
return e.data && e.data.substring && (r = " " + e.data.substring(0, 50) + (e.data.length > 50 ? "..." : "")),
e.nodeName + r
}(t) : void 0 === t ? "undefined" : "object" != typeof t || null == t ? t : t instanceof Error ? t.stack || t.name + ": " + t.message : void 0;
if (void 0 !== h)
return void 0 === (h = c.windex.jsonStringify(h)) ? 0 : ("\"" == h[0] && (h = f(h, n, "...\"")),
h.length <= n ? (o.tokens.push(h),
h.length) : 0);
if (o.cyclic) {
o.opath.splice(r);
var d = o.opath.lastIndexOf(t);
if (d > -1) {
var p = "<Cycle to ancestor #" + (r - d - 1) + ">";
return p = "\"" + f(p, n - 2) + "\"",
o.tokens.push(p),
p.length
}
o.opath.push(t)
}
var _ = n;
var g = function(e) {
return _ >= e.length && (_ -= e.length,
o.tokens.push(e),
!0)
};
var v = function(e) {
var t = o.tokens[o.tokens.length - 1];
"," == t ? o.tokens[o.tokens.length - 1] = e : g(e)
};
if (_ < 2)
return 0;
if (i.isArray(t)) {
g("[");
for (var y = 0; y < t.length && _ > 0; y++) {
var m = e(t[y], _ - 1, r + 1, o);
if (_ -= m,
0 == m && !g("null"))
break;
g(",")
}
v("]")
} else {
g("{");
for (var E = i.keys(t), y = 0; y < E.length && _ > 0; y++) {
var S = E[y]
, w = t[S];
if (!g("\"" + S + "\":"))
break;
var m = e(w, _ - 1, r + 1, o);
if (0 == m) {
o.tokens.pop();
break
}
_ -= m,
g(",")
}
v("}")
}
return n == 1 / 0 ? 1 : n - _
}(e, t, 0, n),
n.tokens.join("")
} catch (e) {
return i.jsonErrorString(e)
}
}
t.ConsoleWatcher = h,
t.stringifyLogMessage = d;
var l = function(e) {
return isNaN(e) ? "Invalid Date" : e.toUTCString()
}
, f = function(e, t, n) {
return void 0 === n && (n = "..."),
e.length <= t ? e : e.length <= n.length || t <= n.length ? e.substring(0, t) : e.substring(0, t - n.length) + n
}
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = /^\s*at .*(\S+\:\d+|native|(<anonymous>))/m
, i = /^(eval@)?(\[native code\])?$/;
function o(e) {
if (!e || "string" != typeof e.stack)
return [];
var t = e;
return t.stack.match(r) ? t.stack.split("\n").filter(function(e) {
return !!e.match(r)
}).map(function(e) {
e.indexOf("(eval ") > -1 && (e = e.replace(/eval code/g, "eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g, ""));
var t = e.replace(/^\s+/, "").replace(/\(eval code/g, "(").replace(/\(native code\)/, "").split(/\s+/).slice(1)
, n = a(t.pop())
, r = t.join(" ")
, i = ["eval", "<anonymous>"].indexOf(n[0]) > -1 ? "" : n[0];
return s(r, i, n[1], n[2])
}) : function(e) {
return e.split("\n").filter(function(e) {
return !e.match(i)
}).map(function(e) {
if (e.indexOf(" > eval") > -1 && (e = e.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g, ":$1")),
-1 === e.indexOf("@") && -1 === e.indexOf(":"))
return [e, "", -1, -1];
var t = e.split("@")
, n = a(t.pop())
, r = t.join("@");
return s(r, n[0], n[1], n[2])
})
}(t.stack)
}
function s(e, t, n, r) {
return [e || "", t || "", parseInt(n || "-1"), parseInt(r || "-1")]
}
function a(e) {
if (!e || -1 === e.indexOf(":"))
return ["", "", ""];
var t = /(.+?)(?:\:(\d+))?(?:\:(\d+))?$/.exec(e.replace(/[\(\)]/g, ""));
return t ? [t[1] || "", t[2] || "", t[3] || ""] : ["", "", ""]
}
t.genStackTrace = function() {
try {
throw new Error
} catch (e) {
return o(e).slice(1)
}
}
,
t.stackTraceFromError = o
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(47)
, i = n(3)
, o = n(4)
, s = n(8)
, a = function() {
function e(e, t, n, i) {
void 0 === n && (n = function() {
return []
}
),
void 0 === i && (i = o.RealTicker),
this._ctx = e,
this._transport = t,
this._gatherExternalEvents = n,
this._tickerFactory = i,
this._recordingDisabled = !1,
this._lastWhen = -1,
this._gotUnload = !1,
this._eventQueue = [],
this._sampleCurvesTicker = new this._tickerFactory(s.CurveSamplingInterval),
this._processMutationsTicker = new this._tickerFactory(s.MutationProcessingInterval),
this._processor = new r.EventProcessor(e)
}
return e.prototype.startPipeline = function(e, t, n, r) {
var i = this;
void 0 === n && (n = 0),
void 0 === r && (r = []),
this._recordingDisabled || this._pipelineStarted || (this._pipelineStarted = !0,
this._frameId = n,
this._parentIds = r,
this.processEvents(),
this._processMutationsTicker.start(function() {
i.processEvents()
}),
this._sampleCurvesTicker.start(function() {
i.processEvents(!0)
}),
this._transport.startPipeline(e, t))
}
,
e.prototype.enqueue = function(e, t) {
this.enqueueAt(this._ctx.time.now(), e, t),
o.Scheduler.checkForBrokenSchedulers()
}
,
e.prototype.enqueueAt = function(e, t, n) {
this._recordingDisabled || (e <= this._lastWhen && (e = this._lastWhen + 1),
this._lastWhen = e,
this._eventQueue.push({
When: e,
Kind: t,
Args: n
}))
}
,
e.prototype.enqueueFirst = function(e, t) {
this._eventQueue.length > 0 ? this._eventQueue.unshift({
When: this._eventQueue[0].When,
Kind: e,
Args: t
}) : this.enqueue(e, t)
}
,
e.prototype.addUnload = function(e) {
this._gotUnload || (this._gotUnload = !0,
this.enqueue(i.EVENT_UNLOAD, [e]),
this.singSwanSong())
}
,
e.prototype.shutdown = function(e) {
this._flush(),
this.addUnload(e),
this._flush(),
this._recordingDisabled = !0,
this.stopPipeline()
}
,
e.prototype._flush = function() {
this.processEvents(),
this._transport.flush()
}
,
e.prototype.prequeue = function(e, t) {
this._recordingDisabled || this._eventQueue.unshift({
When: 0,
Kind: e,
Args: t
})
}
,
e.prototype.appendToQueue = function(e) {
this._eventQueue = this._eventQueue.concat(e)
}
,
e.prototype.singSwanSong = function() {
this._recordingDisabled || (this.processEvents(),
this._transport.singSwanSong())
}
,
e.prototype.rebaseIframe = function(e) {
for (var t = 0, n = this._eventQueue.length; t < n; t++) {
var r = this._eventQueue[t]
, i = r.When + this._ctx.time.startTime() - e;
i < 0 && (i = 0),
r.When = i
}
}
,
e.prototype.processEvents = function(e) {
if (this._pipelineStarted) {
var t = this._eventQueue;
this._eventQueue = [];
var n = this._processor.processQueue(t);
e || (n = n.concat(this._gatherExternalEvents(0 != n.length))),
this.ensureFrameIds(n),
0 != n.length && this._transport.enqueueEvents(this._ctx.recording.pageSignature(), n)
}
}
,
e.prototype.ensureFrameIds = function(e) {
if (this._frameId)
for (var t = this._parentIds, n = t && t.length > 0, r = 0; r < e.length; ++r) {
var i = e[r];
i.FId || (i.FId = this._frameId),
n && !i.PIds && (i.PIds = t)
}
}
,
e.prototype.stopPipeline = function() {
this._pipelineStarted && (this._sampleCurvesTicker.stop(),
this._processMutationsTicker.stop(),
this._eventQueue = [],
this._transport.stopPipeline())
}
,
e
}();
t.EventQueue = a
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(3)
, i = function() {
function e(e, t) {
this._q = e,
this._valueIndices = t,
this._evts = []
}
return e.prototype.add = function(e) {
0 == this._evts.length && this._q.push(e),
this._evts.push(e)
}
,
e.prototype.finish = function(e, t) {
var n = this._evts.length;
if (n <= 1)
return !1;
for (var r = this._evts[0].When, i = this._evts[n - 1].When, o = 0; o < this._valueIndices.length; ++o) {
var s = this._valueIndices[o]
, a = this._evts[0].Args[s]
, u = (this._evts[1].When - r) / (i - r)
, c = (this._evts[1].Args[s] - a) / u
, h = this._evts[n - 1].Args[s]
, d = (u = (i - this._evts[n - 2].When) / (i - r),
(h - this._evts[n - 2].Args[s]) / u);
t.push(a, h, c, d)
}
return this._evts[0].Kind = e,
this._evts[0].Args = t,
!0
}
,
e.prototype.evts = function() {
return this._evts
}
,
e
}()
, o = function() {
function e(e) {
this._ctx = e
}
return e.prototype.processQueue = function(e) {
if (0 == e.length)
return e;
for (var t, n = this._ctx.time.now(), o = [], s = new i(o,[0, 1]), a = {}, u = {}, c = {}, h = 0; h < e.length; ++h) {
var d = e[h];
switch (d.Kind) {
case r.EVENT_MOUSEMOVE:
s.add(d);
break;
case r.EVENT_TOUCHMOVE:
(l = d.Args[0])in a || (a[l] = new i(o,[1, 2])),
a[l].add(d);
break;
case r.EVENT_SCROLL_LAYOUT:
(l = d.Args[0])in u || (u[l] = new i(o,[1, 2])),
u[l].add(d);
break;
case r.EVENT_SCROLL_VISUAL_OFFSET:
var l;
(l = d.Args[0])in c || (c[l] = new i(o,[1, 2])),
c[l].add(d);
break;
case r.EVENT_RESIZE_VISUAL:
t || (t = new i(o,[0, 1])),
t.add(d);
break;
default:
o.push(d);
}
}
if (s.finish(r.EVENT_MOUSEMOVE_CURVE, [n])) {
var f = s.evts()
, p = f[f.length - 1].Args;
p.length > 2 && p[2] && f[0].Args.push(p[2])
}
for (l in u) {
u[_ = parseInt(l)].finish(r.EVENT_SCROLL_LAYOUT_CURVE, [n, _])
}
for (l in c) {
c[_ = parseInt(l)].finish(r.EVENT_SCROLL_VISUAL_OFFSET_CURVE, [n, _])
}
for (l in a) {
var _;
a[_ = parseInt(l)].finish(r.EVENT_TOUCHMOVE_CURVE, [n, _])
}
return t && t.finish(r.EVENT_RESIZE_VISUAL_CURVE, [n]),
o
}
,
e
}();
t.EventProcessor = o
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(0)
, i = n(49)
, o = n(14)
, s = n(2)
, a = function() {
function e() {
this._consent = !1,
this._hasWatched = !1,
this._rules = Object.create ? Object.create(null) : {},
this._rules[o.WatchKindBlocked] = [],
this._rules[o.WatchKindBlockedConsent] = [],
this._rules[o.WatchKindWatch] = []
}
return e.prototype.isWatched = function(e) {
this._hasWatched = !0;
for (var t = 0, n = this._consent ? [o.WatchKindBlocked, o.WatchKindWatch] : [o.WatchKindBlockedConsent, o.WatchKindBlocked, o.WatchKindWatch]; t < n.length; t++)
for (var i = n[t], s = 0, a = this._rules[i]; s < a.length; s++) {
var u = a[s];
if (r.matchesSelector(e, u))
return i
}
return null
}
,
e.prototype.addRule = function(e) {
try {
return !(!e.Selector.match(i.WATCH_RULE_COMMENT) && "" != r.trim(e.Selector)) || this.mergeRule(e.Kind, e.Selector)
} catch (t) {
return s.FsBugSnag.sendToBugsnag("Error adding block rule '" + e.Selector + "': " + t, "error"),
!1
}
}
,
e.prototype.getConsent = function() {
return this._consent
}
,
e.prototype.setConsent = function(e) {
this._consent !== e && (this._consent = e,
this._hasWatched && this.onConsentChange && this.onConsentChange())
}
,
e.prototype.mergeRule = function(e, t) {
var n = document.documentElement || document.createElement("div");
try {
r.matchesSelector(n, t)
} catch (e) {
return s.FsBugSnag.sendToBugsnag("Browser rejected block rule '" + t + "': " + e.toString(), "error"),
!1
}
if (e != o.WatchKindBlocked && e != o.WatchKindBlockedConsent && e != o.WatchKindWatch && (e = o.WatchKindBlocked),
0 == this._rules[e].length)
return this._rules[e].push(t),
!0;
var i = this._rules[e].length - 1
, a = this._rules[e][i].concat(", ", t);
try {
r.matchesSelector(n, a)
} catch (n) {
return this._rules[e].push(t),
s.FsBugSnag.sendToBugsnag("Browser rejected merged block rule when adding '" + t + "': " + n.toString(), "warning"),
!0
}
return this._rules[e][i] = a,
!0
}
,
e.prototype.allConsentSensitiveElements = function(e) {
if (0 == this._rules[o.WatchKindBlockedConsent].length)
return [];
if (1 == this._rules[o.WatchKindBlockedConsent].length)
return e.querySelectorAll(this._rules[o.WatchKindBlockedConsent][0]);
for (var t = [], n = 0, r = this._rules[o.WatchKindBlockedConsent]; n < r.length; n++)
for (var i = r[n], s = e.querySelectorAll(i), a = 0; a < s.length; a++)
t.push(s[a]);
return t
}
,
e.prototype.mungeWatchedStyle = function(e, t) {
var n = e.getBoundingClientRect()
, r = Math.floor(n.width)
, i = Math.floor(n.height)
, o = "";
return null != t && (o = t.trim()),
o.length > 0 && ";" != o.charAt(o.length - 1) && (o += ";"),
0 == r && 0 == i || (o += "width:" + r + "px;height:" + i + "px;"),
o
}
,
e
}();
t.Watcher = a
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
t.urlValueDelims = [["url\\(\\s*\"", "\"\\s*\\)"], ["url\\(\\s*'", "'\\s*\\)"], ["url\\(\\s*", "\\s*\\)"]];
var r = [["@import\\s+\"", "\""], ["@import\\s+'", "'"]].concat(t.urlValueDelims)
, i = /(?:[^\\](?:\\\\)*)/.source;
t.urlPattern = ".*?" + i,
t.CSS_URL = new RegExp(r.map(function(e) {
var n = e[0]
, r = e[1];
return "(" + n + ")(" + t.urlPattern + ")(" + r + ")"
}).join("|"),"g"),
t.replaceCssUrls = function(e, n) {
return e.replace(t.CSS_URL, function(e) {
for (var t = [], r = 1; r < arguments.length; r++)
t[r - 1] = arguments[r];
var i = t[0] || t[3] || t[6] || t[9] || t[12]
, o = t[1] || t[4] || t[7] || t[10] || t[13]
, s = t[2] || t[5] || t[8] || t[11] || t[14]
, a = t[15];
return n(i, o, s, a)
})
}
,
t.QUOTES = /\"|'/g,
t.HOVER = /\:hover/g,
t.FOCUS = /\:focus/g,
t.FOCUS_WITHIN = /\:focus-within/g,
t.MEDIA_QUERY = /(@media.*?{)/g,
t.DOMAIN = /^[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]\.[a-zA-Z]{2,}$/,
t.DOMAIN_PART = /^[a-zA-Z0-9-:]{1,61}$/,
t.IPv4_PART = /^[0-9]{1,3}$/,
t.IPv6_PART = /^[0-9a-f]{0,4}$/,
t.PLAYBACK_URL_PARAMS = /.*\?Base=(.*)&Url=(.*)/,
t.EMAIL = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
t.IMAGE_FILENAME = /\.(jpe?g|png|svg|gif|bmp)$/,
t.WATCH_RULE_COMMENT = /^\s*\/\//,
t.DATA_URI = /^data:([^;,]*)[;,]/i,
t.SKETCHY_CONTENT_TYPES = /(application|script|text\/js|text\/html)/i,
t.WHITELISTED_CONTENT_TYPES = /(^application\/octet-stream)|(^font\/)|(^application\/[a-z_.-]*font)/i,
t.SKETCHY_URI_SCHEMES = /javascript:|file:/i
}
, function(e, t, n) {
"use strict";
var r = this && this.__awaiter || function(e, t, n, r) {
return new (n || (n = Promise))(function(i, o) {
function s(e) {
try {
u(r.next(e))
} catch (e) {
o(e)
}
}
function a(e) {
try {
u(r["throw"](e))
} catch (e) {
o(e)
}
}
function u(e) {
e.done ? i(e.value) : new n(function(t) {
t(e.value)
}
).then(s, a)
}
u((r = r.apply(e, t || [])).next())
}
)
}
, i = this && this.__generator || function(e, t) {
var n, r, i, o, s = {
label: 0,
sent: function() {
if (1 & i[0])
throw i[1];
return i[1]
},
trys: [],
ops: []
};
return o = {
next: a(0),
"throw": a(1),
"return": a(2)
},
"function" == typeof Symbol && (o[Symbol.iterator] = function() {
return this
}
),
o;
function a(o) {
return function(a) {
return function(o) {
if (n)
throw new TypeError("Generator is already executing.");
for (; s; )
try {
if (n = 1,
r && (i = 2 & o[0] ? r["return"] : o[0] ? r["throw"] || ((i = r["return"]) && i.call(r),
0) : r.next) && !(i = i.call(r, o[1])).done)
return i;
switch (r = 0,
i && (o = [2 & o[0], i.value]),
o[0]) {
case 0:
case 1:
i = o;
break;
case 4:
return s.label++,
{
value: o[1],
done: !1
};
case 5:
s.label++,
r = o[1],
o = [0];
continue;
case 7:
o = s.ops.pop(),
s.trys.pop();
continue;
default:
if (!(i = (i = s.trys).length > 0 && i[i.length - 1]) && (6 === o[0] || 2 === o[0])) {
s = 0;
continue
}
if (3 === o[0] && (!i || o[1] > i[0] && o[1] < i[3])) {
s.label = o[1];
break
}
if (6 === o[0] && s.label < i[1]) {
s.label = i[1],
i = o;
break
}
if (i && s.label < i[2]) {
s.label = i[2],
s.ops.push(o);
break
}
i[2] && s.ops.pop(),
s.trys.pop();
continue;
}
o = t.call(e, s)
} catch (e) {
o = [6, e],
r = 0
} finally {
n = i = 0
}
if (5 & o[0])
throw o[1];
return {
value: o[0] ? o[1] : void 0,
done: !0
}
}([o, a])
}
}
}
;
Object.defineProperty(t, "__esModule", {
value: !0
});
var o = n(4)
, s = n(0)
, a = n(51)
, u = n(1)
, c = n(2)
, h = n(3)
, d = n(6)
, l = n(52)
, f = 6e6
, p = function() {
function e(e, t, n, r, i) {
void 0 === r && (r = window.FormData),
void 0 === i && (i = o.RealTimeout),
this.ctx = e,
this.queue = t,
this.protocol = n,
this.FormDataCtr = r,
this.Timeout = i,
this.started = {},
this.byUrl = {},
this.batchReady = !1,
this.existsBatch = []
}
return e.prototype.init = function() {
this.FormDataCtr && this.main()["catch"](function(e) {
c.FsBugSnag.sendToBugsnag(e, "error")
})
}
,
e.prototype.main = function() {
return r(this, void 0, d.FSPromise, function() {
var e, t, n, o, a, h, l, f, p, _, g = this;
return i(this, function(v) {
switch (v.label) {
case 0:
return [4, this.getBatch()];
case 1:
for (e = v.sent(),
t = {
fsnv: s.map(e, function(e) {
return e.hash
})
},
n = {},
o = 0,
a = e; o < a.length; o++)
h = a[o],
n[h.hash] = h;
l = this.ctx.options.orgId,
v.label = 2;
case 2:
return v.trys.push([2, 4, , 5]),
[4, this.protocol.newResources(l, t)];
case 3:
return f = v.sent(),
[3, 5];
case 4:
return p = v.sent(),
u.logIfDebug("/rec/newResources failed with status " + p),
[3, 0];
case 5:
try {
_ = JSON.parse(f)
} catch (e) {
return c.FsBugSnag.sendToBugsnag("Error parsing /rec/newResources response", "error"),
[3, 0]
}
return [4, s.forInAsync(_, function(e, t) {
return r(g, void 0, d.FSPromise, function() {
var r, o, s, a, h, d, f, p, _;
return i(this, function(i) {
switch (i.label) {
case 0:
if ("fsnv" != t)
return [2];
r = 0,
o = e,
i.label = 1;
case 1:
if (!(r < o.length))
return [3, 6];
if (s = o[r],
null == (a = n[s]))
return c.FsBugSnag.sendToBugsnag("Server told us to upload a hash we don't have", "error"),
[3, 5];
if (h = a.url,
d = a.contentType,
!(f = a.blob || a.stringData))
return c.FsBugSnag.sendToBugsnag("Missing resource contents", "error"),
[3, 5];
if (p = a.blob || new Blob([f],{
type: d
}),
null == f)
return c.FsBugSnag.sendToBugsnag("Tried to re-upload a resource", "error"),
[3, 5];
(_ = new this.FormDataCtr).append("orgId", l),
_.append("baseUrl", h),
_.append("fsnvHash", s),
_.append("contents", p, "blob"),
a.blob = a.stringData = null,
i.label = 2;
case 2:
return i.trys.push([2, 4, , 5]),
[4, this.protocol.uploadResource(_)];
case 3:
return i.sent(),
[3, 5];
case 4:
return i.sent(),
u.logIfDebug("Server error uploading resource"),
[3, 5];
case 5:
return r++,
[3, 1];
case 6:
return [2];
}
})
})
})];
case 6:
return v.sent(),
[3, 0];
case 7:
return [2];
}
})
})
}
,
e.prototype.getBatch = function() {
var e = this
, t = a.createFSPromise()
, n = t.resolve
, r = t.promise
, i = function() {
e.popBatch = null,
e.batchReady = !1;
var t = e.existsBatch;
e.existsBatch = [],
n(t)
};
return this.batchReady ? i() : this.popBatch = i,
r
}
,
e.prototype.uploadBlob = function(e) {
return r(this, void 0, d.FSPromise, function() {
var t, n, r = this;
return i(this, function(i) {
switch (i.label) {
case 0:
return 0 != e.lastIndexOf("blob:", 0) ? [2] : this.FormDataCtr ? this.started[e] ? [2] : (this.started[e] = !0,
[4, this.processResource(e)]) : [2];
case 1:
return (t = i.sent()) ? (n = 0 == this.existsBatch.length,
this.existsBatch.push(t),
n && new this.Timeout(function() {
r.batchReady = !0,
r.popBatch && r.popBatch()
}
,50).start(),
[2]) : [2];
}
})
})
}
,
e.prototype.processResource = function(e) {
return r(this, void 0, d.FSPromise, function() {
var t, n, r;
return i(this, function(i) {
switch (i.label) {
case 0:
return this.byUrl[e] ? [2, this.byUrl[e]] : [4, function(e) {
var t = a.createFSPromise()
, n = t.resolve
, r = t.promise;
if (!c.assert(s.hasPrefix(e, "blob:"), "Blob url must start with \"blob:\""))
return n(null),
r;
var i = new XMLHttpRequest;
if ("string" != typeof i.responseType)
return n(null),
r;
return i.open("GET", e),
i.responseType = "blob",
i.onerror = function() {
n(null)
}
,
i.onload = function() {
if (200 != i.status)
return u.logIfDebug("Error loading blob resource " + e),
void n(null);
var t = i.response;
if ((t.size || t.length) > f)
return c.FsBugSnag.sendToBugsnag("Size of blob resource " + e + " exceeds limit of " + f, "warning"),
void n(null);
(function(e) {
var t = a.createFSPromise()
, n = t.resolve
, r = t.promise
, i = new FileReader;
return i.readAsArrayBuffer(e),
i.onload = function() {
n(i.result)
}
,
i.onerror = function(e) {
c.FsBugSnag.sendToBugsnag(e, "error"),
n(null)
}
,
r
}
)(t).then(function(e) {
n(e ? {
buffer: e,
blob: t,
contentType: t.type
} : null)
})
}
,
i.send(),
r
}(e)];
case 1:
return (t = i.sent()) ? [4, l.hash128NonBlocking(this.ctx.time, t.buffer)] : [2, null];
case 2:
return n = i.sent().hash,
r = {
hash: n,
url: e,
blob: t.blob,
contentType: t.contentType
},
this.byUrl[r.url] = r,
this.queue.enqueue(h.EVENT_SYS_RESOURCEHASH, ["url", e, r.hash]),
[2, r];
}
})
})
}
,
e
}();
t.ResourceUploader = p
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(6);
t.createFSPromise = function() {
var e, t;
return {
promise: new r.FSPromise(function(n, r) {
e = n,
t = r
}
),
resolve: e,
reject: t
}
}
}
, function(e, t, n) {
"use strict";
var r = this && this.__awaiter || function(e, t, n, r) {
return new (n || (n = Promise))(function(i, o) {
function s(e) {
try {
u(r.next(e))
} catch (e) {
o(e)
}
}
function a(e) {
try {
u(r["throw"](e))
} catch (e) {
o(e)
}
}
function u(e) {
e.done ? i(e.value) : new n(function(t) {
t(e.value)
}
).then(s, a)
}
u((r = r.apply(e, t || [])).next())
}
)
}
, i = this && this.__generator || function(e, t) {
var n, r, i, o, s = {
label: 0,
sent: function() {
if (1 & i[0])
throw i[1];
return i[1]
},
trys: [],
ops: []
};
return o = {
next: a(0),
"throw": a(1),
"return": a(2)
},
"function" == typeof Symbol && (o[Symbol.iterator] = function() {
return this
}
),
o;
function a(o) {
return function(a) {
return function(o) {
if (n)
throw new TypeError("Generator is already executing.");
for (; s; )
try {
if (n = 1,
r && (i = 2 & o[0] ? r["return"] : o[0] ? r["throw"] || ((i = r["return"]) && i.call(r),
0) : r.next) && !(i = i.call(r, o[1])).done)
return i;
switch (r = 0,
i && (o = [2 & o[0], i.value]),
o[0]) {
case 0:
case 1:
i = o;
break;
case 4:
return s.label++,
{
value: o[1],
done: !1
};
case 5:
s.label++,
r = o[1],
o = [0];
continue;
case 7:
o = s.ops.pop(),
s.trys.pop();
continue;
default:
if (!(i = (i = s.trys).length > 0 && i[i.length - 1]) && (6 === o[0] || 2 === o[0])) {
s = 0;
continue
}
if (3 === o[0] && (!i || o[1] > i[0] && o[1] < i[3])) {
s.label = o[1];
break
}
if (6 === o[0] && s.label < i[1]) {
s.label = i[1],
i = o;
break
}
if (i && s.label < i[2]) {
s.label = i[2],
s.ops.push(o);
break
}
i[2] && s.ops.pop(),
s.trys.pop();
continue;
}
o = t.call(e, s)
} catch (e) {
o = [6, e],
r = 0
} finally {
n = i = 0
}
if (5 & o[0])
throw o[1];
return {
value: o[0] ? o[1] : void 0,
done: !0
}
}([o, a])
}
}
}
;
Object.defineProperty(t, "__esModule", {
value: !0
});
var o = n(53)
, s = n(6)
, a = n(26)
, u = 1e4
, c = 25
, h = 100;
t.hash128NonBlocking = function(e, t, n) {
return void 0 === n && (n = new o._FSNV),
r(this, void 0, s.FSPromise, function() {
var r, o, s, d;
return i(this, function(i) {
switch (i.label) {
case 0:
r = e.now(),
o = t.byteLength,
s = 0,
i.label = 1;
case 1:
return s < o ? e.now() - r > c ? [4, a.wait(h)] : [3, 3] : [3, 5];
case 2:
i.sent(),
r = e.now(),
i.label = 3;
case 3:
d = new Uint8Array(t,s,Math.min(o - s, u)),
n.write(d),
i.label = 4;
case 4:
return s += u,
[3, 1];
case 5:
return [2, {
hash: n.sum(),
hasher: n
}];
}
})
})
}
}
, function(e, t, n) {
"use strict";
var r, i = this && this.__extends || (r = function(e, t) {
return (r = Object.setPrototypeOf || {
__proto__: []
}instanceof Array && function(e, t) {
e.__proto__ = t
}
|| function(e, t) {
for (var n in t)
t.hasOwnProperty(n) && (e[n] = t[n])
}
)(e, t)
}
,
function(e, t) {
function n() {
this.constructor = e
}
r(e, t),
e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype,
new n)
}
);
Object.defineProperty(t, "__esModule", {
value: !0
});
var o = function() {
function e(e) {
void 0 === e && (e = 4),
this.hashCount = e,
this.idx = 0,
this.hashMask = e - 1,
this.reset()
}
return e.prototype.reset = function() {
this.idx = 0,
this.hash = [];
for (var e = 0; e < this.hashCount; ++e)
this.hash.push(2166136261)
}
,
e.prototype.write = function(e) {
for (var t = this.hashMask, n = this.idx, r = 0; r < e.length; r++)
this.hash[n] = this.hash[n] ^ e[r],
this.hash[n] += (this.hash[n] << 1) + (this.hash[n] << 4) + (this.hash[n] << 7) + (this.hash[n] << 8) + (this.hash[n] << 24),
n = n + 1 & t;
this.idx = n
}
,
e.prototype.writeAscii = function(e) {
for (var t = this.hashMask, n = this.idx, r = 0; r < e.length; r++)
this.hash[n] = this.hash[n] ^ e.charCodeAt(r),
this.hash[n] += (this.hash[n] << 1) + (this.hash[n] << 4) + (this.hash[n] << 7) + (this.hash[n] << 8) + (this.hash[n] << 24),
n = n + 1 & t;
this.idx = n
}
,
e.prototype.sum = function() {
var e, t = this.sumAsHex();
return (e = t,
u(String.fromCharCode.apply(null, e.replace(/\r|\n/g, "").replace(/([\da-fA-F]{2}) ?/g, "0x$1 ").replace(/ +$/, "").split(" ")))).replace(/\+/g, "-").replace(/\//g, "_")
}
,
e.prototype.sumAsHex = function() {
for (var e = "", t = 0; t < this.hashCount; ++t)
e += ("00000000" + (this.hash[t] >>> 0).toString(16)).slice(-8);
return e
}
,
e
}();
t._FSNV = o,
t.hashString32Blocking = function(e) {
var t = new o(1);
return t.writeAscii(e),
t.sumAsHex()
}
;
var s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
, a = function(e) {
function t() {
return null !== e && e.apply(this, arguments) || this
}
return i(t, e),
t
}(Error)
, u = window.btoa || c;
function c(e) {
for (var t, n, r = String(e), i = 0, o = s, u = []; r.charAt(0 | i) || (o = "=",
i % 1); u.push(o.charAt(63 & t >> 8 - i % 1 * 8))) {
if ((n = r.charCodeAt(i += .75)) > 255)
throw new a("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");
t = t << 8 | n
}
return u.join("")
}
t._jsbtoa = c
}
, function(e, t, n) {
"use strict";
var r, i = this && this.__extends || (r = function(e, t) {
return (r = Object.setPrototypeOf || {
__proto__: []
}instanceof Array && function(e, t) {
e.__proto__ = t
}
|| function(e, t) {
for (var n in t)
t.hasOwnProperty(n) && (e[n] = t[n])
}
)(e, t)
}
,
function(e, t) {
function n() {
this.constructor = e
}
r(e, t),
e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype,
new n)
}
);
Object.defineProperty(t, "__esModule", {
value: !0
});
var o = n(13)
, s = n(4)
, a = n(7)
, u = n(21)
, c = n(0)
, h = n(1)
, d = n(3)
, l = n(11)
, f = n(19)
, p = n(55)
, _ = function(e) {
function t(t, n, r, i, u) {
void 0 === r && (r = new p.NetworkEventTransport(t,n)),
void 0 === i && (i = s.RealTicker),
void 0 === u && (u = o.defaultInjector);
var c = e.call(this, t, i, r, u) || this;
return c._protocol = n,
c._domLoaded = !1,
c._recordingDisabled = !1,
c._integrationScriptFetched = !1,
r.onShutdown(function() {
return c.shutdown("transport")
}),
c._doc = c._wnd.document,
c._frameId = 0,
c._identity = t.recording.identity,
c._getCurrentSessionEnabled = o.GetCurrentSessionEnabledState.NoInfoYet,
a.set_fs_shutdown(c._wnd, function(e) {
if (c._eventWatcher.shutdown("_fs_shutdown"),
e) {
var t = c._doc.getElementById(e);
t && t.setAttribute("_fs_embed_token", c._embedToken)
}
}),
c
}
return i(t, e),
t.prototype.onDomLoad = function() {
var t = this;
e.prototype.onDomLoad.call(this),
this._domLoaded = !0,
this.injectIntegrationScript(function() {
t.fireFsReady(t._recordingDisabled)
})
}
,
t.prototype.start = function(t, n, r) {
var i = this;
e.prototype.start.call(this, t, n);
var o = a._fs_replay_flags(this._wnd)
, s = u.getDocumentClientArea(this._doc)
, h = s[0]
, p = s[1]
, _ = c.tryGetScreenDims(this._wnd)
, g = _[0]
, v = _[1]
, y = "";
t || (y = this._identity.userId());
var m = {
OrgId: this._orgId,
UserId: y,
Url: l.scrubUrl(location.href),
Base: l.scrubUrl(l.baseUri(this._wnd)),
Width: h,
Height: p,
ScreenWidth: g,
ScreenHeight: v,
Referrer: this._doc.referrer,
Doctype: c.doctypeString(this._doc),
CompiledTimestamp: f.CompiledTimestamp
};
r && (m.AppId = r),
o && (m.ReplayFlags = o),
this._protocol.page(m, function(e) {
i.handleResponse(e),
i.handleIdentity(e.CookieDomain, e.UserIntId, e.SessionIntId, e.PageIntId, e.EmbedToken),
i.handleIntegrationScript(e.IntegrationScript),
i._queue.enqueueFirst(d.EVENT_SET_FRAME_BASE, [l.scrubUrl(l.baseUri(i._wnd)), c.doctypeString(i._doc)]),
i._queue.startPipeline(e.PageIntId, e.PageStart),
i.fullyStarted()
}, function(e) {
i.disableBecauseRecPageSaidSo()
})
}
,
t.prototype.handleIntegrationScript = function(e) {
var t = this;
this._integrationScriptFetched = !0,
this._integrationScript = e,
this.injectIntegrationScript(function() {
t.fireFsReady(t._recordingDisabled)
})
}
,
t.prototype.handleIdentity = function(e, t, n, r, i) {
var o = this._identity;
o.setIds(this._wnd, e, t, n),
this._embedToken = i,
h.logIfDebug("/User," + o.userId() + "/Session," + o.sessionId() + "/Page," + r)
}
,
t.prototype.injectIntegrationScript = function(e) {
if (this._domLoaded && this._integrationScriptFetched)
if (this._integrationScript) {
var t = this._doc.createElement("script");
a._fs_csp(this._wnd) ? (t.addEventListener("load", e),
t.addEventListener("error", e),
t.async = !0,
t.src = this._scheme + "//" + this._recHost + "/rec/integrations?OrgId=" + this._orgId,
this._doc.head.appendChild(t)) : (t.text = this._integrationScript,
this._doc.head.appendChild(t),
e())
} else
e()
}
,
t.prototype.disableBecauseRecPageSaidSo = function() {
this.shutdown("because /rec/page said so"),
h.logIfDebug("Disabling FS."),
this._recordingDisabled = !0,
this.fireFsReady(this._recordingDisabled)
}
,
t
}(o.AbstractRecorder);
t.TopRecorder = _
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(3)
, i = n(56)
, o = n(4)
, s = n(27)
, a = n(16)
, u = n(8)
, c = n(2)
, h = n(1)
, d = function() {
function e(e, t, n, s) {
void 0 === t && (t = new a.HttpProtocol(e)),
void 0 === n && (n = o.RealTicker),
void 0 === s && (s = o.RealTimeout);
var c = this;
this._ctx = e,
this._protocol = t,
this._tickerFactory = n,
this._backoffRetries = 0,
this._backoffTime = 0,
this._bundleSeq = 1,
this._lastPostTime = 0,
this._serverBundleTime = 0,
this._largePageSize = 16e6,
this._outgoingEventQueue = [],
this._bundleQueue = [],
this._hibernating = !1,
this._heartbeatInterval = 0,
this._lastUserEvent = 0,
this._finished = !1,
this._scheme = e.options.scheme,
this._identity = e.recording.identity,
this._lastBundleTime = e.time.wallTime(),
this._uploadTicker = new this._tickerFactory(u.UploadInterval),
this._swanSong = new i.SwanSong(e,this._protocol,this._identity,s),
this._heartbeatTimeout = new s(function() {
c._outgoingEventQueue.push({
Kind: r.EVENT_HEARTBEAT,
When: c._ctx.time.now(),
Args: []
}),
c._heartbeatInterval *= 2,
c._heartbeatInterval > u.HeartbeatMax && (c._heartbeatInterval = u.HeartbeatMax),
c._heartbeatTimeout.start(c._heartbeatInterval)
}
),
this._hibernationTimeout = new s(function() {
c._ctx.time.now() - c._lastUserEvent <= 2 * u.PageInactivityTimeout && (c._outgoingEventQueue.push({
Kind: r.EVENT_UNLOAD,
When: c._ctx.time.now(),
Args: ["hibernation"]
}),
c.singSwanSong()),
c.stopPipeline(),
c._hibernating = !0
}
,u.PageInactivityTimeout)
}
return e.prototype.onShutdown = function(e) {
this._onShutdown = e
}
,
e.prototype.scheme = function() {
return this._scheme
}
,
e.prototype.enqueueEvents = function(e, t) {
if (this._hibernating) {
if (this._finished)
return;
for (var n = 0, i = t; n < i.length; n++) {
var o = i[n];
if (r.isUserActionEvent(o.Kind)) {
this._ctx.recording.splitPage("post-hibernation"),
this._finished = !0;
break
}
}
} else {
for (var s = 0, a = t; s < a.length; s++) {
o = a[s];
if (r.isUserActionEvent(o.Kind)) {
this._hibernationTimeout.start(),
this._heartbeatInterval = u.HeartbeatInitial,
this._heartbeatTimeout.start(this._heartbeatInterval),
this._lastUserEvent = this._ctx.time.now();
break
}
}
for (var c = 0, h = t; c < h.length; c++) {
o = h[c];
this._outgoingEventQueue.push(o)
}
}
}
,
e.prototype.startPipeline = function(e, t) {
var n = this;
this._pageId = e,
this._serverPageStart = t,
this.enqueueAndSendBundle(),
this._uploadTicker.start(function() {
n.enqueueAndSendBundle()
}),
this._heartbeatInterval = u.HeartbeatInitial,
this._heartbeatTimeout.start(this._heartbeatInterval),
this._hibernationTimeout.start()
}
,
e.prototype.stopPipeline = function() {
this._uploadTicker.stop(),
this._outgoingEventQueue = [],
this._bundleQueue = [],
this._hibernationTimeout.stop(),
this._heartbeatTimeout.stop()
}
,
e.prototype.flush = function() {
this.maybeSendNextBundle()
}
,
e.prototype.singSwanSong = function() {
if (!this._hibernating && (this._outgoingEventQueue.length > 0 && this.enqueueNextBundle(!0),
this._bundleQueue.length > 0 || this._pendingBundle)) {
var e = this._bundleQueue.concat();
this._pendingBundle && e.unshift(this._pendingBundle),
this._swanSong.sing(this._pageId, e, this._lastBundleTime, this._serverPageStart, this._serverBundleTime)
}
}
,
e.prototype.enqueueAndSendBundle = function() {
this._pendingBundle ? this._pendingBundleFailed && this._sendPendingBundle() : 0 != this._outgoingEventQueue.length ? this.enqueueNextBundle() : this.maybeSendNextBundle()
}
,
e.prototype.enqueueNextBundle = function(e) {
void 0 === e && (e = !1);
var t = {
When: this._outgoingEventQueue[0].When,
Seq: this._bundleSeq++,
Evts: this._outgoingEventQueue
};
this._outgoingEventQueue = [],
this._bundleQueue.push(t),
e ? this._protocol.bundleBeacon(t, this._identity.orgId(), this._identity.userId(), this._identity.sessionId(), this._pageId, this._serverPageStart, this._serverBundleTime, null) : this.maybeSendNextBundle()
}
,
e.prototype.maybeSendNextBundle = function() {
this._pageId && this._serverPageStart && !this._pendingBundle && 0 != this._bundleQueue.length && (this._pendingBundle = this._bundleQueue.shift(),
this._sendPendingBundle())
}
,
e.prototype._sendPendingBundle = function() {
var e = this
, t = this._ctx.time.wallTime();
if (!(t < this._backoffTime)) {
var n = this._pendingBundle;
n && (this._pendingBundleFailed = !1,
this._lastPostTime = this._lastBundleTime = t,
this.sendBundle(n, function(t) {
h.logIfDebug("Sent bundle " + n.Seq + " with " + n.Evts.length + " events"),
e._serverBundleTime = t.BundleTime,
e._pendingBundle = null,
e._backoffTime = 0,
e._backoffRetries = 0,
e._ctx.time.wallTime() - e._lastPostTime > u.UploadInterval && e.maybeSendNextBundle()
}, function(t) {
if (h.logIfDebug("Failed to send events."),
s.isErrorFatal(t))
return 206 == t && c.FsBugSnag.sendToBugsnag("Failed to send bundle, probably because of its large size", "error"),
void (e._onShutdown && e._onShutdown());
e._pendingBundleFailed = !0,
e._backoffTime = e._lastPostTime + e._protocol.exponentialBackoffMs(e._backoffRetries++, !1)
}))
}
}
,
e.prototype.sendBundle = function(e, t, n) {
var r = this._protocol.bundle(e, this._identity.orgId(), this._identity.userId(), this._identity.sessionId(), this._pageId, this._serverPageStart, this._serverBundleTime, null, t, n);
if (r > this._largePageSize && this._bundleSeq > 16) {
var i = "splitting large page of size: " + r;
h.logIfDebug(i),
c.FsBugSnag.sendToBugsnag(new Error(i), "info"),
this._ctx.recording.splitPage("size")
}
}
,
e
}();
t.NetworkEventTransport = d
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(8)
, i = n(4)
, o = n(0)
, s = n(27)
, a = n(1)
, u = function() {
function e(e, t, n, r) {
void 0 === r && (r = i.RealTimeout),
this._ctx = e,
this._protocol = t,
this._identity = n,
this._timeoutFactory = r,
this._recover()
}
return e.prototype.sing = function(e, t, n, i, s) {
a.logIfDebug("Saving " + t.length + " bundles in swan-song.");
var u = {
OrgId: this._identity.orgId(),
UserId: this._identity.userId(),
SessionId: this._identity.sessionId(),
PageId: e,
Bundles: t,
PageStartTime: this._ctx.time.startTime(),
LastBundleTime: n,
ServerPageStart: i,
ServerBundleTime: s
}
, c = o.stringify(u);
if (!(c.length > 2e6))
try {
localStorage[r.SwanSongLocalStorageKey] = c
} catch (e) {}
}
,
e.prototype._recover = function() {
try {
if (r.SwanSongLocalStorageKey in localStorage) {
var e = localStorage[r.SwanSongLocalStorageKey];
delete localStorage[r.SwanSongLocalStorageKey];
var t = o.parseJson(e);
if (!(t.Bundles && t.UserId && t.SessionId && t.PageId))
return void a.logIfDebug("Malformed swan song found. Ignoring it.");
t.OrgId || (t.OrgId = this._identity.orgId()),
t.Bundles.length > 0 && (a.logIfDebug("Sending " + t.Bundles.length + " bundles as prior page swan song"),
this.sendSwanSongBundles(t.OrgId, t.UserId, t.SessionId, t.PageId, t.Bundles, t.ServerPageStart, t.ServerBundleTime, t.LastBundleTime))
}
} catch (e) {
a.logIfDebug("Error recovering swan-song: " + e)
}
}
,
e.prototype.sendSwanSongBundles = function(e, t, n, r, i, u, c, h, d) {
var l = this;
void 0 === d && (d = 0);
var f = null;
o.isArray(i) && 0 !== i.length && void 0 !== i[0] && (1 == i.length && (f = this._ctx.time.wallTime() - (h || 0)),
this._protocol.bundle(i[0], e, t, n, r, u, c, f, function(o) {
a.logIfDebug("Sent " + i[0].Evts.length + " trailing events from last session as Seq " + i[0].Seq),
i.shift(),
i.length > 0 ? l.sendSwanSongBundles(e, t, n, r, i, u, o.BundleTime, h) : a.logIfDebug("Done with prior page swan song")
}, function(o) {
s.isErrorFatal(o) ? a.logIfDebug("Fatal error while sending events, giving up") : (a.logIfDebug("Failed to send events from last session, will retry while on this page"),
l._lastSwanSongRetryTimeout = new l._timeoutFactory(l.sendSwanSongBundles,l._protocol.exponentialBackoffMs(d, !0),l,e,t,n,r,i,u,c,h,d + 1).start())
}))
}
,
e
}();
t.SwanSong = u
}
, function(e, t, n) {
"use strict";
var r, i = this && this.__extends || (r = function(e, t) {
return (r = Object.setPrototypeOf || {
__proto__: []
}instanceof Array && function(e, t) {
e.__proto__ = t
}
|| function(e, t) {
for (var n in t)
t.hasOwnProperty(n) && (e[n] = t[n])
}
)(e, t)
}
,
function(e, t) {
function n() {
this.constructor = e
}
r(e, t),
e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype,
new n)
}
);
Object.defineProperty(t, "__esModule", {
value: !0
});
var o = n(13)
, s = n(4)
, a = n(0)
, u = n(1)
, c = n(3)
, h = n(11)
, d = n(58)
, l = n(7)
, f = function(e) {
function t(t, n, r, i, a) {
void 0 === n && (n = new d.PostMessagePoster),
void 0 === r && (r = new d.PostMessageEventTransport(t.window)),
void 0 === i && (i = s.RealTicker),
void 0 === a && (a = o.defaultInjector);
var u = e.call(this, t, i, r, a) || this;
return u._messagePoster = n,
u
}
return i(t, e),
t.prototype.start = function(t, n) {
var r = this;
e.prototype.start.call(this, t, n),
this.sendRequestForFrameId(),
this._listeners.add(this._wnd, "load", !1, function() {
r._eventWatcher.recordingIsDetached() && (u.logIfDebug("Recording wrong document. Restarting recording in iframe."),
r._ctx.recording.splitPage("detached iframe"))
})
}
,
t.prototype.postMessageReceived = function(t, n) {
if (e.prototype.postMessageReceived.call(this, t, n),
t == this._wnd.parent || t == this._wnd)
switch (n[0]) {
case o.FS_GREET_CHILD_FRAME:
this.sendRequestForFrameId();
break;
case o.FS_SET_FRAME_ID_CMD:
try {
var r = n[1]
, i = n[2]
, s = n[3]
, c = n[4]
, h = n[5]
, d = n[6]
, f = n[7]
, p = n[8];
this.setFrameIdFromOutside(r, i, s, c, h, d, f, p)
} catch (e) {
u.logIfDebug("Failed to parse frameId from message: " + a.stringify(n))
}
break;
case o.FS_SET_CONSENT:
var _ = n[1];
this.setConsent(_);
break;
case o.FS_INIT_MOBILE_CMD:
try {
var g = JSON.parse(n[1])
, v = g.StartTime;
if (n.length > 2) {
var y = n[2];
if (y.hasOwnProperty("ProtocolVersion"))
y.ProtocolVersion >= 20180723 && y.hasOwnProperty("OuterStartTime") && (v = y.OuterStartTime)
}
var m = g.Host;
this.setFrameIdFromOutside(-1, [], v, "https", l.defaultScript(m), l.defaultAppHost(m), g.OrgId, g.PageResponse)
} catch (e) {
u.logIfDebug("Failed to initialize mobile web recording from message: " + a.stringify(n))
}
}
}
,
t.prototype.sendRequestForFrameId = function() {
this._frameId || (0 != this._frameId ? this._wnd.parent ? (u.logIfDebug("Asking for a frame ID from within frame: " + location.href),
this._messagePoster.postMessage(this._wnd.parent, o.FS_REQUEST_FRAME_ID, [])) : u.logIfDebug("Orphaned window. Location href = " + location.href) : u.logIfDebug("For some reason the outer window attempted to request a frameId"))
}
,
t.prototype.setFrameIdFromOutside = function(e, t, n, r, i, o, s, d) {
e ? this._frameId ? this._frameId != e ? (u.logIfDebug("Updating frame id from " + this._frameId + " to " + e),
this._ctx.recording.splitPage("stale iframe")) : u.logIfDebug("frame Id is already set to " + this._frameId) : (u.logIfDebug("FrameId received within frame " + location.href + ": " + e),
this._scheme = r,
this._script = i,
this._appHost = o,
this._orgId = s,
this._frameId = e,
this._parentIds = t,
this.handleResponse(d),
this.fireFsReady(),
this._queue.enqueueFirst(c.EVENT_SET_FRAME_BASE, [h.scrubUrl(h.baseUri(this._wnd)), a.doctypeString(this._wnd.document)]),
this._queue.rebaseIframe(n),
this._ctx.time.setStartTime(n),
this._queue.startPipeline(this._pageId, d.PageStart, e, t),
this.flushPendingChildFrameInits(),
this.fullyStarted()) : u.logIfDebug("Outer page gave us a bogus frame Id! Iframe: " + location.href)
}
,
t
}(o.AbstractRecorder);
t.InnerRecorder = f
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(13)
, i = n(7)
, o = n(0)
, s = function() {
function e(e, t) {
void 0 === t && (t = new a),
this._wnd = e,
this._messagePoster = t
}
return e.prototype.enqueueEvents = function(e, t) {
this._messagePoster.postMessage(this._wnd.parent, r.FS_IFRAME_EVENTS, t, e)
}
,
e.prototype.startPipeline = function(e, t) {}
,
e.prototype.stopPipeline = function() {}
,
e.prototype.flush = function() {}
,
e.prototype.singSwanSong = function() {}
,
e.prototype.onShutdown = function(e) {}
,
e
}();
t.PostMessageEventTransport = s;
var a = function() {
function e() {}
return e.prototype.postMessage = function(e, t, n, r) {
var s;
try {
s = i._fs_transport(e)
} catch (e) {}
s ? s.send(t, o.stringify(n)) : e.postMessage(u(t, n, r), "*")
}
,
e
}();
function u(e, t, n) {
var r = [e, t];
return n && r.push(n),
o.stringify({
__fs: r
})
}
t.PostMessagePoster = a,
t.formatPostMessageData = u
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r, i, o = n(3), s = n(28), a = n(0), u = n(17), c = n(1), h = n(5);
!function(e) {
e.rec = "rec",
e.user = "user",
e.account = "account",
e.consent = "consent",
e.customEvent = "event"
}(r = t.ApiType || (t.ApiType = {})),
function(e) {
e.user = "user",
e.account = "acct",
e.event = "evt"
}(i = t.VarScope || (t.VarScope = {}));
var d = {
acctId: "str",
displayName: "str",
website: "str"
}
, l = {
uid: "str",
displayName: "str",
email: "str"
}
, f = {
str: p,
bool: _,
real: g,
"int": v,
date: y,
strs: m(p),
bools: m(_),
reals: m(g),
ints: m(v),
dates: m(y),
objs: m(E),
obj: E
};
function p(e) {
return "string" == typeof e
}
function _(e) {
return "boolean" == typeof e
}
function g(e) {
return "number" == typeof e
}
function v(e) {
return "number" == typeof e && e - Math.floor(e) == 0
}
function y(e) {
return !!e && (e.constructor === Date ? !isNaN(e) : ("number" == typeof e || "string" == typeof e) && !isNaN(new Date(e)))
}
function m(e) {
return function(t) {
if (!(t instanceof Array))
return !1;
for (var n = 0; n < t.length; n++)
if (!e(t[n]))
return !1;
return !0
}
}
function E(e) {
return !!e && "object" == typeof e
}
var S = /^[a-zA-Z][a-zA-Z0-9_]*$/
, w = function() {
function e(e) {
this._identity = e
}
return e.prototype.identity = function() {
return this._identity
}
,
e.prototype.api = function(e, t, n) {
var u = !1
, h = [];
try {
switch (e) {
case r.rec:
return {
events: [],
recStatus: t ? "restart" : "shutdown"
};
case r.consent:
var f = typeof t;
if ("boolean" != typeof t) {
c.logIfDebug("Expected consent status of type 'boolean' instead got type: \"" + f + "\", value: \"" + t + "\"");
break
}
return {
events: [{
When: 0,
Kind: o.EVENT_SYS_SETCONSENT,
Args: [t]
}],
consent: t
};
case r.account:
h.push.apply(h, this.rawEventsFromApi(i.account, d, t, n));
break;
case r.user:
if ("object" != typeof t)
c.logIfDebug("Expected argument of type 'object' instead got type: '" + typeof t + "', value: " + a.stringify(t));
else if ("uid"in t) {
var p = t.uid;
if (!1 === p)
this._identity.clearAppId() && (u = !0),
delete t.uid;
else {
var _ = b(p, this._identity)
, g = _[0]
, v = _[1];
if (!g) {
switch (v) {
case s.HighlightTypeFsId:
h.push({
When: 0,
Kind: o.EVENT_SYS_HIGHLIGHT,
Args: [s.HighlightTypeFsId, t.uid + ""]
});
break;
case void 0:
break;
default:
c.logIfDebug("unexpected failReason returned from setAppId: " + v);
}
return {
events: h
}
}
t.uid = g,
this._identity.setAppId(t.uid),
v == s.HighlightTypeNewUid && (u = !0)
}
}
h.push.apply(h, this.rawEventsFromApi(i.user, l, t, n));
break;
case r.customEvent:
var y = t.n
, m = t.p;
h.push.apply(h, this.rawEventsFromApi(i.event, {}, m, n, y));
break;
default:
c.logIfDebug("invalid operation \"" + e + "\"; only \"rec\", \"account\", and \"user\" are supported at present");
}
} catch (t) {
c.logIfDebug("unexpected exception handling " + e + " API call: " + t.message)
}
return {
events: h,
reidentify: u
}
}
,
e.prototype.rawEventsFromApi = function(e, t, n, r, s) {
var u = function e(t, n, r) {
var o = {
PayloadToSend: {},
ValidationErrors: []
};
var s = function(r) {
var i = e(t, n, r);
return o.ValidationErrors = o.ValidationErrors.concat(i.ValidationErrors),
i.PayloadToSend
};
a.forIn(r, function(e, r) {
var u = function(e, t, n, r) {
var i = t
, o = typeof n;
if ("undefined" === o)
return c.logIfDebug("Cannot infer type of " + o + " " + n),
r.push({
Type: "vartype",
FieldName: t,
ValueType: o + " (unsupported)"
}),
null;
if (h.windex.objectHasOwnProp(e, t))
return {
name: t,
type: e[t]
};
var s = t.lastIndexOf("_");
if (-1 == s || !I(t.substring(s + 1))) {
var u = function(e) {
for (var t in f)
if (f[t](e))
return t;
return null
}(n);
if (null == u)
return c.logIfDebug("Cannot infer type of " + o + " " + n),
n ? r.push({
Type: "vartype",
FieldName: t
}) : r.push({
Type: "vartype",
FieldName: t,
ValueType: "null (unsupported)"
}),
null;
s = t.length,
c.logIfDebug("Warning: Inferring user variable \"" + t + "\" to be of type \"" + u + "\""),
t = t + "_" + u
}
var d = [t.substring(0, s), t.substring(s + 1)]
, l = d[0]
, p = d[1];
if ("object" === o && !n)
return c.logIfDebug("null is not a valid object type"),
r.push({
Type: "vartype",
FieldName: i,
ValueType: "null (unsupported)"
}),
null;
if (!S.test(l)) {
l = l.replace(/[^a-zA-Z0-9_]/g, "").replace(/^[0-9]+/, ""),
/[0-9]/.test(l[0]) && (l = l.substring(1)),
r.push({
Type: "varname",
FieldName: i
});
var _ = l + "_" + p;
if (c.logIfDebug("Warning: variable \"" + i + "\" has invalid characters. It should match /" + S.source + "/. Converted name to \"" + _ + "\"."),
"" == l)
return null;
t = _
}
if (!I(p))
return c.logIfDebug("Variable \"" + i + "\" has invalid type \"" + p + "\""),
r.push({
Type: "varname",
FieldName: i
}),
null;
if (!function(e, t) {
return f[e](t)
}(p, n))
return c.logIfDebug("illegal value " + a.stringify(n) + " for type " + p),
"number" === o ? o = n % 1 == 0 ? "integer" : "real" : "object" == o && null != n && n.constructor == Date && (o = isNaN(n) ? "invalid date" : "date"),
r.push({
Type: "vartype",
FieldName: i,
ValueType: o
}),
null;
return {
name: t,
type: p
}
}(n, r, e, o.ValidationErrors);
if (u) {
var d = u.name
, l = u.type;
if ("obj" != l) {
if ("objs" != l)
o.PayloadToSend[d] = T(l, e);
else {
t != i.event && o.ValidationErrors.push({
Type: "vartype",
FieldName: d,
ValueType: "Array<Object> (unsupported)"
});
for (var p = e, _ = [], g = 0; g < p.length; g++) {
var v = s(p[g]);
v && _.push(v)
}
_.length > 0 && (o.PayloadToSend[d] = _)
}
} else {
var v = s(e)
, y = a.hasSuffix(r, "_obj") ? d : d.substring(0, d.length - "_obj".length);
o.PayloadToSend[y] = v
}
} else
o.PayloadToSend[r] = T("", e)
});
return o
}(e, t, n)
, d = this.eventsForValidationErrors(e, u.ValidationErrors)
, l = e == i.event
, p = [e, a.stringify(u.PayloadToSend)]
, _ = o.EVENT_SYS_SETVAR;
return l && (_ = o.EVENT_SYS_CUSTOM,
p[0] = s),
r && "fs" != r && p.push(r),
d.push({
When: 0,
Kind: _,
Args: p
}),
d
}
,
e.prototype.eventsForValidationErrors = function(e, t) {
if (e == i.event)
return [];
for (var n = [], r = 0, s = t; r < s.length; r++) {
var a = s[r]
, u = [a.Type, e + ":" + a.FieldName];
a.ValueType && u.push(a.ValueType),
n.push({
When: 0,
Kind: o.EVENT_SYS_HIGHLIGHT,
Args: u
})
}
return n
}
,
e
}();
function T(e, t) {
return "str" == e && null != t && (t = t.trim()),
null == t || "date" != e && t.constructor != Date || (t = function(e) {
var t, n = e.constructor === Date ? e : new Date(e);
try {
t = n.toISOString()
} catch (e) {
t = null
}
return t
}(t)),
t
}
function b(e, t) {
if ("number" == typeof e && Math.floor(e) == e && (c.logIfDebug("Expected appId of type 'string' instead got value: " + e + " of type: " + typeof e),
e = "" + e),
"string" != typeof e)
return c.logIfDebug("blocking FS.identify API call; uid value (" + e + ") must be a string"),
[void 0, s.HighlightTypeFsId];
var n = e.trim();
if (u.BAD_APP_IDS.indexOf(n.toLowerCase()) >= 0)
return c.logIfDebug("blocking FS.identify API call; uid value (" + e + ") is illegal"),
[void 0, s.HighlightTypeFsId];
var r = void 0;
return t && t._cookie.AppKey && t._cookie.AppKey != n && (c.logIfDebug("user re-identified; existing uid (" + t._cookie.AppKey + ") does not match provided uid (" + n + ")"),
r = s.HighlightTypeNewUid),
[n, r]
}
function I(e) {
return !!f[e]
}
t.Vars = w,
t.transformValidateAppId = b
}
, function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(8)
, i = n(0)
, o = n(16)
, s = n(5)
, a = n(1)
, u = n(2);
t.cmdReqPage = 1,
t.cmdReqBundle = 2,
t.cmdRspError = 3,
t.cmdRspPage = 4,
t.cmdRspBundle = 5;
var c = function() {
function e(e, t) {
void 0 === t && (t = function(e) {
return new WebSocket(e)
}
),
this._newSock = t,
this._connecting = !1,
this._connected = !1,
this._queue = {},
this._seq = 1,
this._wnd = e.window,
this._scheme = e.options.scheme,
this._host = e.options.recHost
}
return e.isSupported = function() {
return "WebSocket"in window
}
,
e.prototype.page = function(e, n, r) {
this.request({
Cmd: t.cmdReqPage,
Page: e
}, function(e) {
return n(e.Page)
}, r)
}
,
e.prototype.bundle = function(e, n, r, i, o, s, a, u, c, h) {
return this.request({
Cmd: t.cmdReqBundle,
Bundle: {
OrgId: n,
UserId: r,
SessionId: i,
PageId: o,
Seq: e.Seq,
DeltaT: null === u ? void 0 : u,
PageStart: null == s ? void 0 : s,
PrevBundleTime: null == a ? void 0 : a,
Bundle: e
}
}, function(e) {
return c(e.Bundle)
}, h)
}
,
e.prototype.bundleBeacon = function(e, t, n, r, i, s, a, u) {
return o.bundleBeacon(this._scheme, this._host, e, t, n, r, i, s, a, u)
}
,
e.prototype.exponentialBackoffMs = function(e, t) {
var n = Math.min(r.BackoffMax, 5e3 * Math.pow(2, e));
return t ? n + .25 * Math.random() * n : n
}
,
e.prototype.request = function(e, t, n) {
e.Seq = this._seq++;
var r = i.stringify(e);
return this._queue[e.Seq] = {
payload: r,
win: t,
lose: n
},
this.maybeConnect(),
r.length
}
,
e.prototype.handleMessage = function(e) {
var n;
try {
n = i.parseJson(e)
} catch (e) {
return void a.logIfDebug("socket: error parsing frame: " + e.toString())
}
var r = this._queue[n.Seq];
delete this._queue[n.Seq],
r ? n.Cmd == t.cmdRspError ? (a.logIfDebug(n.Fail.Error),
r.lose(n.Fail.Status)) : r.win(n) : a.logIfDebug("socket: mismatched request seq " + n.Seq + "; ignoring")
}
,
e.prototype.drainQueue = function() {
if (this._connected)
for (var e in this._queue) {
var t = this._queue[e];
t.sent || (this._sock.send(t.payload),
t.sent = !0)
}
else
a.logIfDebug("socket: attempt to drain queue when disconnected.")
}
,
e.prototype.reconnect = function() {
var e = this;
if (!this._connected) {
for (var t in this._queue)
this._queue[t].sent = !1;
var n = 0;
s.windex.setWindowTimeout(this._wnd, u.FsBugSnag.wrap(function() {
return e.maybeConnect()
}), this.exponentialBackoffMs(n++, !0))
}
}
,
e.prototype.maybeConnect = function() {
var e = this;
if (this._connected)
this.drainQueue();
else if (!this._connecting) {
this._connecting = !0;
var t = ("https:" == this._scheme ? "wss:" : "ws:") + "//" + this._host + "/rec/sock";
this._sock = this._newSock(t),
this._sock.onopen = function(t) {
e._connecting = !1,
e._connected = !0,
e.drainQueue()
}
,
this._sock.onmessage = function(t) {
e.handleMessage(t.data),
e.drainQueue()
}
,
this._sock.onclose = function(t) {
a.logIfDebug("socket: closed; reconnecting"),
e._connecting = e._connected = !1,
e.reconnect()
}
,
this._sock.onerror = function(t) {
a.logIfDebug("socket: error; reconnecting"),
e._connecting = e._connected = !1,
e.reconnect()
}
}
}
,
e
}();
t.SockProtocol = c
}
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment