"use strict"; (self.webpackChunk_N_E = self.webpackChunk_N_E || []).push([ [3715], { 72864: function (e, t, r) { let i, o, n, s, a, c; function u(e) { let t = null == e ? void 0 : e.host; return (null == t ? void 0 : t.shadowRoot) === e; } function l(e) { return "[object ShadowRoot]" === Object.prototype.toString.call(e); } function p(e) { try { var t; let r = e.rules || e.cssRules; return r ? ((t = Array.from(r, h).join("")).includes( " background-clip: text;" ) && !t.includes(" -webkit-background-clip: text;") && (t = t.replace( " background-clip: text;", " -webkit-background-clip: text; background-clip: text;" )), t) : null; } catch (e) { return null; } } function h(e) { let t; if ("styleSheet" in e) try { t = p(e.styleSheet) || (function (e) { let { cssText: t } = e; if (t.split('"').length < 3) return t; let r = ["@import", "url(".concat(JSON.stringify(e.href), ")")]; return ( "" === e.layerName ? r.push("layer") : e.layerName && r.push("layer(".concat(e.layerName, ")")), e.supportsText && r.push("supports(".concat(e.supportsText, ")")), e.media.length && r.push(e.media.mediaText), r.join(" ") + ";" ); })(e); } catch (e) {} else if ("selectorText" in e && e.selectorText.includes(":")) return e.cssText.replace( /(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm, "$1\\$2" ); return t || e.cssText; } r.d(t, { Z: function () { return r4; }, }), ((eE = eC || (eC = {}))[(eE.Document = 0)] = "Document"), (eE[(eE.DocumentType = 1)] = "DocumentType"), (eE[(eE.Element = 2)] = "Element"), (eE[(eE.Text = 3)] = "Text"), (eE[(eE.CDATA = 4)] = "CDATA"), (eE[(eE.Comment = 5)] = "Comment"); class d { getId(e) { var t; if (!e) return -1; let r = null === (t = this.getMeta(e)) || void 0 === t ? void 0 : t.id; return null != r ? r : -1; } getNode(e) { return this.idNodeMap.get(e) || null; } getIds() { return Array.from(this.idNodeMap.keys()); } getMeta(e) { return this.nodeMetaMap.get(e) || null; } removeNodeFromMap(e) { let t = this.getId(e); this.idNodeMap.delete(t), e.childNodes && e.childNodes.forEach((e) => this.removeNodeFromMap(e)); } has(e) { return this.idNodeMap.has(e); } hasNode(e) { return this.nodeMetaMap.has(e); } add(e, t) { let r = t.id; this.idNodeMap.set(r, e), this.nodeMetaMap.set(e, t); } replace(e, t) { let r = this.getNode(e); if (r) { let e = this.nodeMetaMap.get(r); e && this.nodeMetaMap.set(t, e); } this.idNodeMap.set(e, t); } reset() { (this.idNodeMap = new Map()), (this.nodeMetaMap = new WeakMap()); } constructor() { (this.idNodeMap = new Map()), (this.nodeMetaMap = new WeakMap()); } } function f(e) { let { element: t, maskInputOptions: r, tagName: i, type: o, value: n, maskInputFn: s, } = e, a = n || "", c = o && _(o); return ( (r[i.toLowerCase()] || (c && r[c])) && (a = s ? s(a, t) : "*".repeat(a.length)), a ); } function _(e) { return e.toLowerCase(); } let g = "__rrweb_original__"; function m(e) { let t = e.type; return e.hasAttribute("data-rr-is-password") ? "password" : t ? _(t) : null; } function y(e, t) { var r; let i; try { i = new URL(e, null != t ? t : window.location.href); } catch (e) { return null; } let o = i.pathname.match(/\.([0-9a-z]+)(?:$)/i); return null !== (r = null == o ? void 0 : o[1]) && void 0 !== r ? r : null; } let v = 1, b = RegExp("[^a-z0-9-_:]"); function S() { return v++; } let k = /url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm, w = /^(?:[a-z+]+:)?\/\//i, M = /^www\..*/i, I = /^(data:)([^,]*),(.*)/i; function E(e, t) { return (e || "").replace(k, (e, r, i, o, n, s) => { let a = i || n || s, c = r || o || ""; if (!a) return e; if (w.test(a) || M.test(a) || I.test(a)) return "url(".concat(c).concat(a).concat(c, ")"); if ("/" === a[0]) return "url(" .concat(c) .concat( (t.indexOf("//") > -1 ? t.split("/").slice(0, 3).join("/") : t.split("/")[0] ).split("?")[0] + a ) .concat(c, ")"); let u = t.split("/"), l = a.split("/"); for (let e of (u.pop(), l)) "." !== e && (".." === e ? u.pop() : u.push(e)); return "url(".concat(c).concat(u.join("/")).concat(c, ")"); }); } let x = /^[^ \t\n\r\u000c]+/, C = /^[, \t\n\r\u000c]+/; function O(e, t) { if (!t || "" === t.trim()) return t; let r = e.createElement("a"); return (r.href = t), r.href; } function T() { let e = document.createElement("a"); return (e.href = ""), e.href; } function R(e, t, r, i) { return i ? "src" !== r && ("href" !== r || ("use" === t && "#" === i[0])) && ("xlink:href" !== r || "#" === i[0]) && ("background" !== r || ("table" !== t && "td" !== t && "th" !== t)) ? "srcset" === r ? (function (e, t) { if ("" === t.trim()) return t; let r = 0; function i(e) { let i; let o = e.exec(t.substring(r)); return o ? ((i = o[0]), (r += i.length), i) : ""; } let o = []; for (; i(C), !(r >= t.length); ) { let n = i(x); if ("," === n.slice(-1)) (n = O(e, n.substring(0, n.length - 1))), o.push(n); else { let i = ""; n = O(e, n); let s = !1; for (;;) { let e = t.charAt(r); if ("" === e) { o.push((n + i).trim()); break; } if (s) ")" === e && (s = !1); else { if ("," === e) { (r += 1), o.push((n + i).trim()); break; } "(" === e && (s = !0); } (i += e), (r += 1); } } } return o.join(", "); })(e, i) : "style" === r ? E(i, T()) : "object" === t && "data" === r ? O(e, i) : i : O(e, i) : i; } function D(e, t, r) { return ("video" === e || "audio" === e) && "autoplay" === t; } function N(e, t, r) { if (!e) return !1; if (e.nodeType !== e.ELEMENT_NODE) return !!r && N(e.parentNode, t, r); for (let r = e.classList.length; r--; ) { let i = e.classList[r]; if (t.test(i)) return !0; } return !!r && N(e.parentNode, t, r); } function A(e, t, r, i) { try { let o = e.nodeType === e.ELEMENT_NODE ? e : e.parentElement; if (null === o) return !1; if ("string" == typeof t) { if (i) { if (o.closest(".".concat(t))) return !0; } else if (o.classList.contains(t)) return !0; } else if (N(o, t, i)) return !0; if (r) { if (i) { if (o.closest(r)) return !0; } else if (o.matches(r)) return !0; } } catch (e) {} return !1; } function q(e) { return null == e ? "" : e.toLowerCase(); } function L(e, t) { let r; let { doc: n, mirror: s, blockClass: a, blockSelector: c, maskTextClass: h, maskTextSelector: d, skipChild: v = !1, inlineStylesheet: k = !0, maskInputOptions: w = {}, maskTextFn: M, maskInputFn: I, slimDOMOptions: x, dataURLOptions: C = {}, inlineImages: O = !1, recordCanvas: N = !1, onSerialize: P, onIframeLoad: F, iframeLoadTimeout: U = 5e3, onStylesheetLoad: j, stylesheetLoadTimeout: B = 5e3, keepIframeSrcFn: $ = () => !1, newlyAddedElement: z = !1, } = t, { needsMask: W } = t, { preserveWhiteSpace: V = !0 } = t; !W && e.childNodes && (W = A(e, h, d, void 0 === W)); let H = (function (e, t) { let { doc: r, mirror: n, blockClass: s, blockSelector: a, needsMask: c, inlineStylesheet: u, maskInputOptions: l = {}, maskTextFn: h, maskInputFn: d, dataURLOptions: y = {}, inlineImages: v, recordCanvas: S, keepIframeSrcFn: k, newlyAddedElement: w = !1, } = t, M = (function (e, t) { if (!t.hasNode(e)) return; let r = t.getId(e); return 1 === r ? void 0 : r; })(r, n); switch (e.nodeType) { case e.DOCUMENT_NODE: if ("CSS1Compat" !== e.compatMode) return { type: eC.Document, childNodes: [], compatMode: e.compatMode, }; return { type: eC.Document, childNodes: [] }; case e.DOCUMENT_TYPE_NODE: return { type: eC.DocumentType, name: e.name, publicId: e.publicId, systemId: e.systemId, rootId: M, }; case e.ELEMENT_NODE: return (function (e, t) { let r; let { doc: n, blockClass: s, blockSelector: a, inlineStylesheet: c, maskInputOptions: u = {}, maskInputFn: l, dataURLOptions: h = {}, inlineImages: d, recordCanvas: y, keepIframeSrcFn: v, newlyAddedElement: S = !1, rootId: k, } = t, w = (function (e, t, r) { try { if ("string" == typeof t) { if (e.classList.contains(t)) return !0; } else for (let r = e.classList.length; r--; ) { let i = e.classList[r]; if (t.test(i)) return !0; } if (r) return e.matches(r); } catch (e) {} return !1; })(e, s, a), M = (function (e) { if (e instanceof HTMLFormElement) return "form"; let t = _(e.tagName); return b.test(t) ? "div" : t; })(e), I = {}, x = e.attributes.length; for (let t = 0; t < x; t++) { let r = e.attributes[t]; D(M, r.name, r.value) || (I[r.name] = R(n, M, _(r.name), r.value)); } if ("link" === M && c) { let t = Array.from(n.styleSheets).find( (t) => t.href === e.href ), r = null; t && (r = p(t)), r && (delete I.rel, delete I.href, (I._cssText = E(r, t.href))); } if ( "style" === M && e.sheet && !(e.innerText || e.textContent || "").trim().length ) { let t = p(e.sheet); t && (I._cssText = E(t, T())); } if ("input" === M || "textarea" === M || "select" === M) { let t = e.value, r = e.checked; "radio" !== I.type && "checkbox" !== I.type && "submit" !== I.type && "button" !== I.type && t ? (I.value = f({ element: e, type: m(e), tagName: M, value: t, maskInputOptions: u, maskInputFn: l, })) : r && (I.checked = r); } if ( ("option" === M && (e.selected && !u.select ? (I.selected = !0) : delete I.selected), "canvas" === M && y) ) { if ("2d" === e.__context) !(function (e) { let t = e.getContext("2d"); if (!t) return !0; for (let r = 0; r < e.width; r += 50) for (let i = 0; i < e.height; i += 50) { let o = t.getImageData, n = g in o ? o[g] : o; if ( new Uint32Array( n.call( t, r, i, Math.min(50, e.width - r), Math.min(50, e.height - i) ).data.buffer ).some((e) => 0 !== e) ) return !1; } return !0; })(e) && (I.rr_dataURL = e.toDataURL(h.type, h.quality)); else if (!("__context" in e)) { let t = e.toDataURL(h.type, h.quality), r = document.createElement("canvas"); (r.width = e.width), (r.height = e.height), t !== r.toDataURL(h.type, h.quality) && (I.rr_dataURL = t); } } if ("img" === M && d) { i || (o = (i = n.createElement("canvas")).getContext("2d")); let t = e.crossOrigin; e.crossOrigin = "anonymous"; let r = () => { e.removeEventListener("load", r); try { (i.width = e.naturalWidth), (i.height = e.naturalHeight), o.drawImage(e, 0, 0), (I.rr_dataURL = i.toDataURL(h.type, h.quality)); } catch (t) { console.warn( "Cannot inline img src=" .concat(e.currentSrc, "! Error: ") .concat(t) ); } t ? (I.crossOrigin = t) : e.removeAttribute("crossorigin"); }; e.complete && 0 !== e.naturalWidth ? r() : e.addEventListener("load", r); } if ("audio" === M || "video" === M) { let t = I; (t.rr_mediaState = e.paused ? "paused" : "played"), (t.rr_mediaCurrentTime = e.currentTime), (t.rr_mediaPlaybackRate = e.playbackRate), (t.rr_mediaMuted = e.muted), (t.rr_mediaLoop = e.loop), (t.rr_mediaVolume = e.volume); } if ( (!S && (e.scrollLeft && (I.rr_scrollLeft = e.scrollLeft), e.scrollTop && (I.rr_scrollTop = e.scrollTop)), w) ) { let { width: t, height: r } = e.getBoundingClientRect(); I = { class: I.class, rr_width: "".concat(t, "px"), rr_height: "".concat(r, "px"), }; } "iframe" !== M || v(I.src) || (e.contentDocument || (I.rr_src = I.src), delete I.src); try { customElements.get(M) && (r = !0); } catch (e) {} return { type: eC.Element, tagName: M, attributes: I, childNodes: [], isSVG: !!("svg" === e.tagName || e.ownerSVGElement) || void 0, needBlock: w, rootId: k, isCustom: r, }; })(e, { doc: r, blockClass: s, blockSelector: a, inlineStylesheet: u, maskInputOptions: l, maskInputFn: d, dataURLOptions: y, inlineImages: v, recordCanvas: S, keepIframeSrcFn: k, newlyAddedElement: w, rootId: M, }); case e.TEXT_NODE: return (function (e, t) { var r; let { needsMask: i, maskTextFn: o, rootId: n } = t, s = e.parentNode && e.parentNode.tagName, a = e.textContent, c = "STYLE" === s || void 0, u = "SCRIPT" === s || void 0; if (c && a) { try { e.nextSibling || e.previousSibling || ((null === (r = e.parentNode.sheet) || void 0 === r ? void 0 : r.cssRules) && (a = p(e.parentNode.sheet))); } catch (t) { console.warn( "Cannot get CSS styles from text's parentNode. Error: ".concat( t ), e ); } a = E(a, T()); } return ( u && (a = "SCRIPT_PLACEHOLDER"), !c && !u && a && i && (a = o ? o(a, e.parentElement) : a.replace(/[\S]/g, "*")), { type: eC.Text, textContent: a || "", isStyle: c, rootId: n } ); })(e, { needsMask: c, maskTextFn: h, rootId: M }); case e.CDATA_SECTION_NODE: return { type: eC.CDATA, textContent: "", rootId: M }; case e.COMMENT_NODE: return { type: eC.Comment, textContent: e.textContent || "", rootId: M, }; default: return !1; } })(e, { doc: n, mirror: s, blockClass: a, blockSelector: c, needsMask: W, inlineStylesheet: k, maskInputOptions: w, maskTextFn: M, maskInputFn: I, dataURLOptions: C, inlineImages: O, recordCanvas: N, keepIframeSrcFn: $, newlyAddedElement: z, }); if (!H) return console.warn(e, "not serialized"), null; r = s.hasNode(e) ? s.getId(e) : !(function (e, t) { if (t.comment && e.type === eC.Comment) return !0; if (e.type === eC.Element) { if ( (t.script && ("script" === e.tagName || ("link" === e.tagName && ("preload" === e.attributes.rel || "modulepreload" === e.attributes.rel) && "script" === e.attributes.as) || ("link" === e.tagName && "prefetch" === e.attributes.rel && "string" == typeof e.attributes.href && "js" === y(e.attributes.href)))) || (t.headFavicon && (("link" === e.tagName && "shortcut icon" === e.attributes.rel) || ("meta" === e.tagName && (q(e.attributes.name).match( /^msapplication-tile(image|color)$/ ) || "application-name" === q(e.attributes.name) || "icon" === q(e.attributes.rel) || "apple-touch-icon" === q(e.attributes.rel) || "shortcut icon" === q(e.attributes.rel))))) ) return !0; if ("meta" === e.tagName) { if ( (t.headMetaDescKeywords && q(e.attributes.name).match(/^description|keywords$/)) || (t.headMetaSocial && (q(e.attributes.property).match(/^(og|twitter|fb):/) || q(e.attributes.name).match(/^(og|twitter):/) || "pinterest" === q(e.attributes.name))) ) return !0; if ( t.headMetaRobots && ("robots" === q(e.attributes.name) || "googlebot" === q(e.attributes.name) || "bingbot" === q(e.attributes.name)) ) return !0; if ( t.headMetaHttpEquiv && void 0 !== e.attributes["http-equiv"] ) return !0; else if ( t.headMetaAuthorship && ("author" === q(e.attributes.name) || "generator" === q(e.attributes.name) || "framework" === q(e.attributes.name) || "publisher" === q(e.attributes.name) || "progid" === q(e.attributes.name) || q(e.attributes.property).match(/^article:/) || q(e.attributes.property).match(/^product:/)) ) return !0; else if ( t.headMetaVerification && ("google-site-verification" === q(e.attributes.name) || "yandex-verification" === q(e.attributes.name) || "csrf-token" === q(e.attributes.name) || "p:domain_verify" === q(e.attributes.name) || "verify-v1" === q(e.attributes.name) || "verification" === q(e.attributes.name) || "shopify-checkout-api-token" === q(e.attributes.name)) ) return !0; } } return !1; })(H, x) && (V || H.type !== eC.Text || H.isStyle || H.textContent.replace(/^\s+|\s+$/gm, "").length) ? S() : -2; let G = Object.assign(H, { id: r }); if ((s.add(e, G), -2 === r)) return null; P && P(e); let J = !v; if (G.type === eC.Element) { (J = J && !G.needBlock), delete G.needBlock; let t = e.shadowRoot; t && l(t) && (G.isShadowHost = !0); } if ((G.type === eC.Document || G.type === eC.Element) && J) { x.headWhitespace && G.type === eC.Element && "head" === G.tagName && (V = !1); let t = { doc: n, mirror: s, blockClass: a, blockSelector: c, needsMask: W, maskTextClass: h, maskTextSelector: d, skipChild: v, inlineStylesheet: k, maskInputOptions: w, maskTextFn: M, maskInputFn: I, slimDOMOptions: x, dataURLOptions: C, inlineImages: O, recordCanvas: N, preserveWhiteSpace: V, onSerialize: P, onIframeLoad: F, iframeLoadTimeout: U, onStylesheetLoad: j, stylesheetLoadTimeout: B, keepIframeSrcFn: $, }; if ( G.type === eC.Element && "textarea" === G.tagName && void 0 !== G.attributes.value ); else for (let r of Array.from(e.childNodes)) { let e = L(r, t); e && G.childNodes.push(e); } if (e.nodeType === e.ELEMENT_NODE && e.shadowRoot) for (let r of Array.from(e.shadowRoot.childNodes)) { let i = L(r, t); i && (l(e.shadowRoot) && (i.isShadow = !0), G.childNodes.push(i)); } } return ( e.parentNode && u(e.parentNode) && l(e.parentNode) && (G.isShadow = !0), G.type === eC.Element && "iframe" === G.tagName && (function (e, t, r) { let i; let o = e.contentWindow; if (!o) return; let n = !1; try { i = o.document.readyState; } catch (e) { return; } if ("complete" !== i) { let i = setTimeout(() => { n || (t(), (n = !0)); }, r); e.addEventListener("load", () => { clearTimeout(i), (n = !0), t(); }); return; } let s = "about:blank"; if (o.location.href !== s || e.src === s || "" === e.src) return setTimeout(t, 0), e.addEventListener("load", t); e.addEventListener("load", t); })( e, () => { let t = e.contentDocument; if (t && F) { let r = L(t, { doc: t, mirror: s, blockClass: a, blockSelector: c, needsMask: W, maskTextClass: h, maskTextSelector: d, skipChild: !1, inlineStylesheet: k, maskInputOptions: w, maskTextFn: M, maskInputFn: I, slimDOMOptions: x, dataURLOptions: C, inlineImages: O, recordCanvas: N, preserveWhiteSpace: V, onSerialize: P, onIframeLoad: F, iframeLoadTimeout: U, onStylesheetLoad: j, stylesheetLoadTimeout: B, keepIframeSrcFn: $, }); r && F(e, r); } }, U ), G.type === eC.Element && "link" === G.tagName && "string" == typeof G.attributes.rel && ("stylesheet" === G.attributes.rel || ("preload" === G.attributes.rel && "string" == typeof G.attributes.href && "css" === y(G.attributes.href))) && (function (e, t, r) { let i, o = !1; try { i = e.sheet; } catch (e) { return; } if (i) return; let n = setTimeout(() => { o || (t(), (o = !0)); }, r); e.addEventListener("load", () => { clearTimeout(n), (o = !0), t(); }); })( e, () => { if (j) { let t = L(e, { doc: n, mirror: s, blockClass: a, blockSelector: c, needsMask: W, maskTextClass: h, maskTextSelector: d, skipChild: !1, inlineStylesheet: k, maskInputOptions: w, maskTextFn: M, maskInputFn: I, slimDOMOptions: x, dataURLOptions: C, inlineImages: O, recordCanvas: N, preserveWhiteSpace: V, onSerialize: P, onIframeLoad: F, iframeLoadTimeout: U, onStylesheetLoad: j, stylesheetLoadTimeout: B, keepIframeSrcFn: $, }); t && j(e, t); } }, B ), G ); } function P(e, t) { let r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : document, i = { capture: !0, passive: !0 }; return ( r.addEventListener(e, t, i), () => r.removeEventListener(e, t, i) ); } let F = "Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.", U = { map: {}, getId: () => (console.error(F), -1), getNode: () => (console.error(F), null), removeNodeFromMap() { console.error(F); }, has: () => (console.error(F), !1), reset() { console.error(F); }, }; function j(e, t) { let r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, i = null, o = 0; return function () { for (var n = arguments.length, s = Array(n), a = 0; a < n; a++) s[a] = arguments[a]; let c = Date.now(); o || !1 !== r.leading || (o = c); let u = t - (c - o), l = this; u <= 0 || u > t ? (i && (clearTimeout(i), (i = null)), (o = c), e.apply(l, s)) : i || !1 === r.trailing || (i = setTimeout(() => { (o = !1 === r.leading ? 0 : Date.now()), (i = null), e.apply(l, s); }, u)); }; } function B(e, t, r, i) { let o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : window, n = o.Object.getOwnPropertyDescriptor(e, t); return ( o.Object.defineProperty( e, t, i ? r : { set(e) { setTimeout(() => { r.set.call(this, e); }, 0), n && n.set && n.set.call(this, e); }, } ), () => B(e, t, n || {}, !0) ); } function $(e, t, r) { try { if (!(t in e)) return () => {}; let i = e[t], o = r(i); return ( "function" == typeof o && ((o.prototype = o.prototype || {}), Object.defineProperties(o, { __rrweb_original__: { enumerable: !1, value: i }, })), (e[t] = o), () => { e[t] = i; } ); } catch (e) { return () => {}; } } window.Proxy && window.Reflect && (U = new Proxy(U, { get: (e, t, r) => ( "map" === t && console.error(F), Reflect.get(e, t, r) ), })); let z = Date.now; function W(e) { var t, r, i, o, n, s; let a = e.document; return { left: a.scrollingElement ? a.scrollingElement.scrollLeft : void 0 !== e.pageXOffset ? e.pageXOffset : (null == a ? void 0 : a.documentElement.scrollLeft) || (null === (r = null === (t = null == a ? void 0 : a.body) || void 0 === t ? void 0 : t.parentElement) || void 0 === r ? void 0 : r.scrollLeft) || (null === (i = null == a ? void 0 : a.body) || void 0 === i ? void 0 : i.scrollLeft) || 0, top: a.scrollingElement ? a.scrollingElement.scrollTop : void 0 !== e.pageYOffset ? e.pageYOffset : (null == a ? void 0 : a.documentElement.scrollTop) || (null === (n = null === (o = null == a ? void 0 : a.body) || void 0 === o ? void 0 : o.parentElement) || void 0 === n ? void 0 : n.scrollTop) || (null === (s = null == a ? void 0 : a.body) || void 0 === s ? void 0 : s.scrollTop) || 0, }; } function V() { return ( window.innerHeight || (document.documentElement && document.documentElement.clientHeight) || (document.body && document.body.clientHeight) ); } function H() { return ( window.innerWidth || (document.documentElement && document.documentElement.clientWidth) || (document.body && document.body.clientWidth) ); } function G(e) { return e ? (e.nodeType === e.ELEMENT_NODE ? e : e.parentElement) : null; } function J(e, t, r, i) { if (!e) return !1; let o = G(e); if (!o) return !1; try { if ("string" == typeof t) { if (o.classList.contains(t) || (i && null !== o.closest("." + t))) return !0; } else if (N(o, t, i)) return !0; } catch (e) {} return !!(r && (o.matches(r) || (i && null !== o.closest(r)))); } function Q(e, t) { return -2 === t.getId(e); } function K(e) { return !!e.changedTouches; } function X(e, t) { return !!("IFRAME" === e.nodeName && t.getMeta(e)); } function Y(e, t) { return !!( "LINK" === e.nodeName && e.nodeType === e.ELEMENT_NODE && e.getAttribute && "stylesheet" === e.getAttribute("rel") && t.getMeta(e) ); } function Z(e) { return !!(null == e ? void 0 : e.shadowRoot); } /[1-9][0-9]{12}/.test(Date.now().toString()) || (z = () => new Date().getTime()); class ee { getId(e) { var t; return null !== (t = this.styleIDMap.get(e)) && void 0 !== t ? t : -1; } has(e) { return this.styleIDMap.has(e); } add(e, t) { let r; return this.has(e) ? this.getId(e) : ((r = void 0 === t ? this.id++ : t), this.styleIDMap.set(e, r), this.idStyleMap.set(r, e), r); } getStyle(e) { return this.idStyleMap.get(e) || null; } reset() { (this.styleIDMap = new WeakMap()), (this.idStyleMap = new Map()), (this.id = 1); } generateId() { return this.id++; } constructor() { (this.id = 1), (this.styleIDMap = new WeakMap()), (this.idStyleMap = new Map()); } } function et(e) { var t, r; let i = null; return ( (null === (r = null === (t = e.getRootNode) || void 0 === t ? void 0 : t.call(e)) || void 0 === r ? void 0 : r.nodeType) === Node.DOCUMENT_FRAGMENT_NODE && e.getRootNode().host && (i = e.getRootNode().host), i ); } function er(e) { let t = e.ownerDocument; return ( !!t && (t.contains(e) || (function (e) { let t = e.ownerDocument; if (!t) return !1; let r = (function (e) { let t, r = e; for (; (t = et(r)); ) r = t; return r; })(e); return t.contains(r); })(e)) ); } var ei, eo, en, es, ea, ec, eu, el, ep, eh, ed, ef, e_, eg, em, ey, ev, eb, eS, ek, ew, eM, eI, eE, ex, eC, eO, eT, eR, eD = (((ex = eD || {})[(ex.DomContentLoaded = 0)] = "DomContentLoaded"), (ex[(ex.Load = 1)] = "Load"), (ex[(ex.FullSnapshot = 2)] = "FullSnapshot"), (ex[(ex.IncrementalSnapshot = 3)] = "IncrementalSnapshot"), (ex[(ex.Meta = 4)] = "Meta"), (ex[(ex.Custom = 5)] = "Custom"), (ex[(ex.Plugin = 6)] = "Plugin"), ex), eN = (((ei = eN || {})[(ei.Mutation = 0)] = "Mutation"), (ei[(ei.MouseMove = 1)] = "MouseMove"), (ei[(ei.MouseInteraction = 2)] = "MouseInteraction"), (ei[(ei.Scroll = 3)] = "Scroll"), (ei[(ei.ViewportResize = 4)] = "ViewportResize"), (ei[(ei.Input = 5)] = "Input"), (ei[(ei.TouchMove = 6)] = "TouchMove"), (ei[(ei.MediaInteraction = 7)] = "MediaInteraction"), (ei[(ei.StyleSheetRule = 8)] = "StyleSheetRule"), (ei[(ei.CanvasMutation = 9)] = "CanvasMutation"), (ei[(ei.Font = 10)] = "Font"), (ei[(ei.Log = 11)] = "Log"), (ei[(ei.Drag = 12)] = "Drag"), (ei[(ei.StyleDeclaration = 13)] = "StyleDeclaration"), (ei[(ei.Selection = 14)] = "Selection"), (ei[(ei.AdoptedStyleSheet = 15)] = "AdoptedStyleSheet"), (ei[(ei.CustomElement = 16)] = "CustomElement"), ei), eA = (((eo = eA || {})[(eo.MouseUp = 0)] = "MouseUp"), (eo[(eo.MouseDown = 1)] = "MouseDown"), (eo[(eo.Click = 2)] = "Click"), (eo[(eo.ContextMenu = 3)] = "ContextMenu"), (eo[(eo.DblClick = 4)] = "DblClick"), (eo[(eo.Focus = 5)] = "Focus"), (eo[(eo.Blur = 6)] = "Blur"), (eo[(eo.TouchStart = 7)] = "TouchStart"), (eo[(eo.TouchMove_Departed = 8)] = "TouchMove_Departed"), (eo[(eo.TouchEnd = 9)] = "TouchEnd"), (eo[(eo.TouchCancel = 10)] = "TouchCancel"), eo), eq = (((en = eq || {})[(en.Mouse = 0)] = "Mouse"), (en[(en.Pen = 1)] = "Pen"), (en[(en.Touch = 2)] = "Touch"), en), eL = (((es = eL || {})[(es["2D"] = 0)] = "2D"), (es[(es.WebGL = 1)] = "WebGL"), (es[(es.WebGL2 = 2)] = "WebGL2"), es); class eP { get(e) { if (e >= this.length) throw Error("Position outside of list range"); let t = this.head; for (let r = 0; r < e; r++) t = (null == t ? void 0 : t.next) || null; return t; } addNode(e) { let t = { value: e, previous: null, next: null }; if ( ((e.__ln = t), e.previousSibling && "__ln" in e.previousSibling) ) { let r = e.previousSibling.__ln.next; (t.next = r), (t.previous = e.previousSibling.__ln), (e.previousSibling.__ln.next = t), r && (r.previous = t); } else if ( e.nextSibling && "__ln" in e.nextSibling && e.nextSibling.__ln.previous ) { let r = e.nextSibling.__ln.previous; (t.previous = r), (t.next = e.nextSibling.__ln), (e.nextSibling.__ln.previous = t), r && (r.next = t); } else this.head && (this.head.previous = t), (t.next = this.head), (this.head = t); null === t.next && (this.tail = t), this.length++; } removeNode(e) { let t = e.__ln; this.head && (t.previous ? ((t.previous.next = t.next), t.next ? (t.next.previous = t.previous) : (this.tail = t.previous)) : ((this.head = t.next), this.head ? (this.head.previous = null) : (this.tail = null)), e.__ln && delete e.__ln, this.length--); } constructor() { (this.length = 0), (this.head = null), (this.tail = null); } } let eF = (e, t) => "".concat(e, "@").concat(t); class eU { init(e) { [ "mutationCb", "blockClass", "blockSelector", "maskTextClass", "maskTextSelector", "inlineStylesheet", "maskInputOptions", "maskTextFn", "maskInputFn", "keepIframeSrcFn", "recordCanvas", "inlineImages", "slimDOMOptions", "dataURLOptions", "doc", "mirror", "iframeManager", "stylesheetManager", "shadowDomManager", "canvasManager", "processedNodeManager", ].forEach((t) => { this[t] = e[t]; }); } freeze() { (this.frozen = !0), this.canvasManager.freeze(); } unfreeze() { (this.frozen = !1), this.canvasManager.unfreeze(), this.emit(); } isFrozen() { return this.frozen; } lock() { (this.locked = !0), this.canvasManager.lock(); } unlock() { (this.locked = !1), this.canvasManager.unlock(), this.emit(); } reset() { this.shadowDomManager.reset(), this.canvasManager.reset(); } constructor() { (this.frozen = !1), (this.locked = !1), (this.texts = []), (this.attributes = []), (this.attributeMap = new WeakMap()), (this.removes = []), (this.mapRemoves = []), (this.movedMap = {}), (this.addedSet = new Set()), (this.movedSet = new Set()), (this.droppedSet = new Set()), (this.processMutations = (e) => { e.forEach(this.processMutation), this.emit(); }), (this.emit = () => { if (this.frozen || this.locked) return; let e = [], t = new Set(), r = new eP(), i = (e) => { let t = e, r = -2; for (; -2 === r; ) r = (t = t && t.nextSibling) && this.mirror.getId(t); return r; }, o = (o) => { if ( !o.parentNode || !er(o) || "TEXTAREA" === o.parentNode.tagName ) return; let n = u(o.parentNode) ? this.mirror.getId(et(o)) : this.mirror.getId(o.parentNode), s = i(o); if (-1 === n || -1 === s) return r.addNode(o); let a = L(o, { doc: this.doc, mirror: this.mirror, blockClass: this.blockClass, blockSelector: this.blockSelector, maskTextClass: this.maskTextClass, maskTextSelector: this.maskTextSelector, skipChild: !0, newlyAddedElement: !0, inlineStylesheet: this.inlineStylesheet, maskInputOptions: this.maskInputOptions, maskTextFn: this.maskTextFn, maskInputFn: this.maskInputFn, slimDOMOptions: this.slimDOMOptions, dataURLOptions: this.dataURLOptions, recordCanvas: this.recordCanvas, inlineImages: this.inlineImages, onSerialize: (e) => { X(e, this.mirror) && this.iframeManager.addIframe(e), Y(e, this.mirror) && this.stylesheetManager.trackLinkElement(e), Z(o) && this.shadowDomManager.addShadowRoot( o.shadowRoot, this.doc ); }, onIframeLoad: (e, t) => { this.iframeManager.attachIframe(e, t), this.shadowDomManager.observeAttachShadow(e); }, onStylesheetLoad: (e, t) => { this.stylesheetManager.attachLinkElement(e, t); }, }); a && (e.push({ parentId: n, nextId: s, node: a }), t.add(a.id)); }; for (; this.mapRemoves.length; ) this.mirror.removeNodeFromMap(this.mapRemoves.shift()); for (let e of this.movedSet) (!eB(this.removes, e, this.mirror) || this.movedSet.has(e.parentNode)) && o(e); for (let e of this.addedSet) e$(this.droppedSet, e) || eB(this.removes, e, this.mirror) ? e$(this.movedSet, e) ? o(e) : this.droppedSet.add(e) : o(e); let n = null; for (; r.length; ) { let e = null; if (n) { let t = this.mirror.getId(n.value.parentNode), r = i(n.value); -1 !== t && -1 !== r && (e = n); } if (!e) { let t = r.tail; for (; t; ) { let r = t; if (((t = t.previous), r)) { let t = this.mirror.getId(r.value.parentNode); if (-1 === i(r.value)) continue; if (-1 !== t) { e = r; break; } { let t = r.value; if ( t.parentNode && t.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE ) { let i = t.parentNode.host; if (-1 !== this.mirror.getId(i)) { e = r; break; } } } } } } if (!e) { for (; r.head; ) r.removeNode(r.head.value); break; } (n = e.previous), r.removeNode(e.value), o(e.value); } let s = { texts: this.texts .map((e) => { let t = e.node; return ( t.parentNode && "TEXTAREA" === t.parentNode.tagName && this.genTextAreaValueMutation(t.parentNode), { id: this.mirror.getId(t), value: e.value } ); }) .filter((e) => !t.has(e.id)) .filter((e) => this.mirror.has(e.id)), attributes: this.attributes .map((e) => { let { attributes: t } = e; if ("string" == typeof t.style) { let r = JSON.stringify(e.styleDiff), i = JSON.stringify(e._unchangedStyles); r.length < t.style.length && (r + i).split("var(").length === t.style.split("var(").length && (t.style = e.styleDiff); } return { id: this.mirror.getId(e.node), attributes: t }; }) .filter((e) => !t.has(e.id)) .filter((e) => this.mirror.has(e.id)), removes: this.removes, adds: e, }; (s.texts.length || s.attributes.length || s.removes.length || s.adds.length) && ((this.texts = []), (this.attributes = []), (this.attributeMap = new WeakMap()), (this.removes = []), (this.addedSet = new Set()), (this.movedSet = new Set()), (this.droppedSet = new Set()), (this.movedMap = {}), this.mutationCb(s)); }), (this.genTextAreaValueMutation = (e) => { let t = this.attributeMap.get(e); t || ((t = { node: e, attributes: {}, styleDiff: {}, _unchangedStyles: {}, }), this.attributes.push(t), this.attributeMap.set(e, t)), (t.attributes.value = Array.from( e.childNodes, (e) => e.textContent || "" ).join("")); }), (this.processMutation = (e) => { if (!Q(e.target, this.mirror)) switch (e.type) { case "characterData": { let t = e.target.textContent; J(e.target, this.blockClass, this.blockSelector, !1) || t === e.oldValue || this.texts.push({ value: A( e.target, this.maskTextClass, this.maskTextSelector, !0 ) && t ? this.maskTextFn ? this.maskTextFn(t, G(e.target)) : t.replace(/[\S]/g, "*") : t, node: e.target, }); break; } case "attributes": { let t = e.target, r = e.attributeName, i = e.target.getAttribute(r); if ("value" === r) { let e = m(t); i = f({ element: t, maskInputOptions: this.maskInputOptions, tagName: t.tagName, type: e, value: i, maskInputFn: this.maskInputFn, }); } if ( J(e.target, this.blockClass, this.blockSelector, !1) || i === e.oldValue ) return; let o = this.attributeMap.get(e.target); if ( "IFRAME" === t.tagName && "src" === r && !this.keepIframeSrcFn(i) ) { if (t.contentDocument) return; r = "rr_src"; } if ( (o || ((o = { node: e.target, attributes: {}, styleDiff: {}, _unchangedStyles: {}, }), this.attributes.push(o), this.attributeMap.set(e.target, o)), "type" === r && "INPUT" === t.tagName && "password" === (e.oldValue || "").toLowerCase() && t.setAttribute("data-rr-is-password", "true"), !D(t.tagName, r) && ((o.attributes[r] = R(this.doc, _(t.tagName), _(r), i)), "style" === r)) ) { if (!this.unattachedDoc) try { this.unattachedDoc = document.implementation.createHTMLDocument(); } catch (e) { this.unattachedDoc = this.doc; } let r = this.unattachedDoc.createElement("span"); for (let i of (e.oldValue && r.setAttribute("style", e.oldValue), Array.from(t.style))) { let e = t.style.getPropertyValue(i), n = t.style.getPropertyPriority(i); e !== r.style.getPropertyValue(i) || n !== r.style.getPropertyPriority(i) ? "" === n ? (o.styleDiff[i] = e) : (o.styleDiff[i] = [e, n]) : (o._unchangedStyles[i] = [e, n]); } for (let e of Array.from(r.style)) "" === t.style.getPropertyValue(e) && (o.styleDiff[e] = !1); } break; } case "childList": if (J(e.target, this.blockClass, this.blockSelector, !0)) return; if ("TEXTAREA" === e.target.tagName) { this.genTextAreaValueMutation(e.target); return; } e.addedNodes.forEach((t) => this.genAdds(t, e.target)), e.removedNodes.forEach((t) => { let r = this.mirror.getId(t), i = u(e.target) ? this.mirror.getId(e.target.host) : this.mirror.getId(e.target); J(e.target, this.blockClass, this.blockSelector, !1) || Q(t, this.mirror) || -1 === this.mirror.getId(t) || (this.addedSet.has(t) ? (ej(this.addedSet, t), this.droppedSet.add(t)) : (this.addedSet.has(e.target) && -1 === r) || (function e(t, r) { if (u(t)) return !1; let i = r.getId(t); return ( !r.has(i) || ((!t.parentNode || t.parentNode.nodeType !== t.DOCUMENT_NODE) && (!t.parentNode || e(t.parentNode, r))) ); })(e.target, this.mirror) || (this.movedSet.has(t) && this.movedMap[eF(r, i)] ? ej(this.movedSet, t) : this.removes.push({ parentId: i, id: r, isShadow: !!(u(e.target) && l(e.target)) || void 0, })), this.mapRemoves.push(t)); }); } }), (this.genAdds = (e, t) => { if ( !this.processedNodeManager.inOtherBuffer(e, this) && !(this.addedSet.has(e) || this.movedSet.has(e)) ) { if (this.mirror.hasNode(e)) { if (Q(e, this.mirror)) return; this.movedSet.add(e); let r = null; t && this.mirror.hasNode(t) && (r = this.mirror.getId(t)), r && -1 !== r && (this.movedMap[eF(this.mirror.getId(e), r)] = !0); } else this.addedSet.add(e), this.droppedSet.delete(e); !J(e, this.blockClass, this.blockSelector, !1) && (e.childNodes.forEach((e) => this.genAdds(e)), Z(e) && e.shadowRoot.childNodes.forEach((t) => { this.processedNodeManager.add(t, this), this.genAdds(t, e); })); } }); } } function ej(e, t) { e.delete(t), t.childNodes.forEach((t) => ej(e, t)); } function eB(e, t, r) { return ( 0 !== e.length && (function e(t, r, i) { let { parentNode: o } = r; if (!o) return !1; let n = i.getId(o); return !!t.some((e) => e.id === n) || e(t, o, i); })(e, t, r) ); } function e$(e, t) { return ( 0 !== e.size && (function e(t, r) { let { parentNode: i } = r; return !!i && (!!t.has(i) || e(t, i)); })(e, t) ); } let ez = (e) => n ? function () { for (var t = arguments.length, r = Array(t), i = 0; i < t; i++) r[i] = arguments[i]; try { return e(...r); } catch (e) { if (n && !0 === n(e)) return; throw e; } } : e, eW = []; function eV(e) { try { if ("composedPath" in e) { let t = e.composedPath(); if (t.length) return t[0]; } else if ("path" in e && e.path.length) return e.path[0]; } catch (e) {} return e && e.target; } function eH(e, t) { var r, i; let o = new eU(); eW.push(o), o.init(e); let n = window.MutationObserver || window.__rrMutationObserver, s = null === (i = null === (r = null == window ? void 0 : window.Zone) || void 0 === r ? void 0 : r.__symbol__) || void 0 === i ? void 0 : i.call(r, "MutationObserver"); s && window[s] && (n = window[s]); let a = new n(ez(o.processMutations.bind(o))); return ( a.observe(t, { attributes: !0, attributeOldValue: !0, characterData: !0, characterDataOldValue: !0, childList: !0, subtree: !0, }), a ); } function eG(e) { let { scrollCb: t, doc: r, mirror: i, blockClass: o, blockSelector: n, sampling: s, } = e; return P( "scroll", ez( j( ez((e) => { let s = eV(e); if (!s || J(s, o, n, !0)) return; let a = i.getId(s); if (s === r && r.defaultView) { let e = W(r.defaultView); t({ id: a, x: e.left, y: e.top }); } else t({ id: a, x: s.scrollLeft, y: s.scrollTop }); }), s.scroll || 100 ) ), r ); } let eJ = ["INPUT", "TEXTAREA", "SELECT"], eQ = new WeakMap(); function eK(e) { var t; return ( (t = []), (e0("CSSGroupingRule") && e.parentRule instanceof CSSGroupingRule) || (e0("CSSMediaRule") && e.parentRule instanceof CSSMediaRule) || (e0("CSSSupportsRule") && e.parentRule instanceof CSSSupportsRule) || (e0("CSSConditionRule") && e.parentRule instanceof CSSConditionRule) ? t.unshift(Array.from(e.parentRule.cssRules).indexOf(e)) : e.parentStyleSheet && t.unshift(Array.from(e.parentStyleSheet.cssRules).indexOf(e)), t ); } function eX(e, t, r) { let i, o; return e ? (e.ownerNode ? (i = t.getId(e.ownerNode)) : (o = r.getId(e)), { styleId: o, id: i }) : {}; } function eY(e, t) { var r, i, o; let { mirror: n, stylesheetManager: s } = e, a = null; a = "#document" === t.nodeName ? n.getId(t) : n.getId(t.host); let c = "#document" === t.nodeName ? null === (r = t.defaultView) || void 0 === r ? void 0 : r.Document : null === (o = null === (i = t.ownerDocument) || void 0 === i ? void 0 : i.defaultView) || void 0 === o ? void 0 : o.ShadowRoot, u = (null == c ? void 0 : c.prototype) ? Object.getOwnPropertyDescriptor( null == c ? void 0 : c.prototype, "adoptedStyleSheets" ) : void 0; return null !== a && -1 !== a && c && u ? (Object.defineProperty(t, "adoptedStyleSheets", { configurable: u.configurable, enumerable: u.enumerable, get() { var e; return null === (e = u.get) || void 0 === e ? void 0 : e.call(this); }, set(e) { var t; let r = null === (t = u.set) || void 0 === t ? void 0 : t.call(this, e); if (null !== a && -1 !== a) try { s.adoptStyleSheets(e, a); } catch (e) {} return r; }, }), ez(() => { Object.defineProperty(t, "adoptedStyleSheets", { configurable: u.configurable, enumerable: u.enumerable, get: u.get, set: u.set, }); })) : () => {}; } function eZ(e) { let t, r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, i = e.doc.defaultView; if (!i) return () => {}; !(function (e, t) { let { mutationCb: r, mousemoveCb: i, mouseInteractionCb: o, scrollCb: n, viewportResizeCb: s, inputCb: a, mediaInteractionCb: c, styleSheetRuleCb: u, styleDeclarationCb: l, canvasMutationCb: p, fontCb: h, selectionCb: d, customElementCb: f, } = e; (e.mutationCb = function () { for (var e = arguments.length, i = Array(e), o = 0; o < e; o++) i[o] = arguments[o]; t.mutation && t.mutation(...i), r(...i); }), (e.mousemoveCb = function () { for (var e = arguments.length, r = Array(e), o = 0; o < e; o++) r[o] = arguments[o]; t.mousemove && t.mousemove(...r), i(...r); }), (e.mouseInteractionCb = function () { for (var e = arguments.length, r = Array(e), i = 0; i < e; i++) r[i] = arguments[i]; t.mouseInteraction && t.mouseInteraction(...r), o(...r); }), (e.scrollCb = function () { for (var e = arguments.length, r = Array(e), i = 0; i < e; i++) r[i] = arguments[i]; t.scroll && t.scroll(...r), n(...r); }), (e.viewportResizeCb = function () { for (var e = arguments.length, r = Array(e), i = 0; i < e; i++) r[i] = arguments[i]; t.viewportResize && t.viewportResize(...r), s(...r); }), (e.inputCb = function () { for (var e = arguments.length, r = Array(e), i = 0; i < e; i++) r[i] = arguments[i]; t.input && t.input(...r), a(...r); }), (e.mediaInteractionCb = function () { for (var e = arguments.length, r = Array(e), i = 0; i < e; i++) r[i] = arguments[i]; t.mediaInteaction && t.mediaInteaction(...r), c(...r); }), (e.styleSheetRuleCb = function () { for (var e = arguments.length, r = Array(e), i = 0; i < e; i++) r[i] = arguments[i]; t.styleSheetRule && t.styleSheetRule(...r), u(...r); }), (e.styleDeclarationCb = function () { for (var e = arguments.length, r = Array(e), i = 0; i < e; i++) r[i] = arguments[i]; t.styleDeclaration && t.styleDeclaration(...r), l(...r); }), (e.canvasMutationCb = function () { for (var e = arguments.length, r = Array(e), i = 0; i < e; i++) r[i] = arguments[i]; t.canvasMutation && t.canvasMutation(...r), p(...r); }), (e.fontCb = function () { for (var e = arguments.length, r = Array(e), i = 0; i < e; i++) r[i] = arguments[i]; t.font && t.font(...r), h(...r); }), (e.selectionCb = function () { for (var e = arguments.length, r = Array(e), i = 0; i < e; i++) r[i] = arguments[i]; t.selection && t.selection(...r), d(...r); }), (e.customElementCb = function () { for (var e = arguments.length, r = Array(e), i = 0; i < e; i++) r[i] = arguments[i]; t.customElement && t.customElement(...r), f(...r); }); })(e, r), e.recordDOM && (t = eH(e, e.doc)); let o = (function (e) { let t, { mousemoveCb: r, sampling: i, doc: o, mirror: n } = e; if (!1 === i.mousemove) return () => {}; let s = "number" == typeof i.mousemove ? i.mousemove : 50, a = "number" == typeof i.mousemoveCallback ? i.mousemoveCallback : 500, c = [], u = j( ez((e) => { let i = Date.now() - t; r( c.map((e) => ((e.timeOffset -= i), e)), e ), (c = []), (t = null); }), a ), l = ez( j( ez((e) => { let r = eV(e), { clientX: i, clientY: o } = K(e) ? e.changedTouches[0] : e; t || (t = z()), c.push({ x: i, y: o, id: n.getId(r), timeOffset: z() - t, }), u( "undefined" != typeof DragEvent && e instanceof DragEvent ? eN.Drag : e instanceof MouseEvent ? eN.MouseMove : eN.TouchMove ); }), s, { trailing: !1 } ) ), p = [P("mousemove", l, o), P("touchmove", l, o), P("drag", l, o)]; return ez(() => { p.forEach((e) => e()); }); })(e), n = (function (e) { let { mouseInteractionCb: t, doc: r, mirror: i, blockClass: o, blockSelector: n, sampling: s, } = e; if (!1 === s.mouseInteraction) return () => {}; let a = !0 === s.mouseInteraction || void 0 === s.mouseInteraction ? {} : s.mouseInteraction, c = [], u = null, l = (e) => (r) => { let s = eV(r); if (J(s, o, n, !0)) return; let a = null, c = e; if ("pointerType" in r) { switch (r.pointerType) { case "mouse": a = eq.Mouse; break; case "touch": a = eq.Touch; break; case "pen": a = eq.Pen; } a === eq.Touch ? eA[e] === eA.MouseDown ? (c = "TouchStart") : eA[e] === eA.MouseUp && (c = "TouchEnd") : eq.Pen; } else K(r) && (a = eq.Touch); null !== a ? ((u = a), ((c.startsWith("Touch") && a === eq.Touch) || (c.startsWith("Mouse") && a === eq.Mouse)) && (a = null)) : eA[e] === eA.Click && ((a = u), (u = null)); let l = K(r) ? r.changedTouches[0] : r; if (!l) return; let p = i.getId(s), { clientX: h, clientY: d } = l; ez(t)( Object.assign( { type: eA[c], id: p, x: h, y: d }, null !== a && { pointerType: a } ) ); }; return ( Object.keys(eA) .filter( (e) => Number.isNaN(Number(e)) && !e.endsWith("_Departed") && !1 !== a[e] ) .forEach((e) => { let t = _(e), i = l(e); if (window.PointerEvent) switch (eA[e]) { case eA.MouseDown: case eA.MouseUp: t = t.replace("mouse", "pointer"); break; case eA.TouchStart: case eA.TouchEnd: return; } c.push(P(t, i, r)); }), ez(() => { c.forEach((e) => e()); }) ); })(e), s = eG(e), a = (function (e, t) { let { viewportResizeCb: r } = e, { win: i } = t, o = -1, n = -1; return P( "resize", ez( j( ez(() => { let e = V(), t = H(); (o !== e || n !== t) && (r({ width: Number(t), height: Number(e) }), (o = e), (n = t)); }), 200 ) ), i ); })(e, { win: i }), c = (function (e) { let { inputCb: t, doc: r, mirror: i, blockClass: o, blockSelector: n, ignoreClass: s, ignoreSelector: a, maskInputOptions: c, maskInputFn: u, sampling: l, userTriggeredOnInput: p, } = e; function h(e) { let t = eV(e), i = e.isTrusted, l = t && t.tagName; if ( (t && "OPTION" === l && (t = t.parentElement), !t || !l || 0 > eJ.indexOf(l) || J(t, o, n, !0) || t.classList.contains(s) || (a && t.matches(a))) ) return; let h = t.value, _ = !1, g = m(t) || ""; "radio" === g || "checkbox" === g ? (_ = t.checked) : (c[l.toLowerCase()] || c[g]) && (h = f({ element: t, maskInputOptions: c, tagName: l, type: g, value: h, maskInputFn: u, })), d( t, p ? { text: h, isChecked: _, userTriggered: i } : { text: h, isChecked: _ } ); let y = t.name; "radio" === g && y && _ && r .querySelectorAll( 'input[type="radio"][name="'.concat(y, '"]') ) .forEach((e) => { if (e !== t) { let t = e.value; d( e, p ? { text: t, isChecked: !_, userTriggered: !1 } : { text: t, isChecked: !_ } ); } }); } function d(e, r) { let o = eQ.get(e); if (!o || o.text !== r.text || o.isChecked !== r.isChecked) { eQ.set(e, r); let o = i.getId(e); ez(t)(Object.assign(Object.assign({}, r), { id: o })); } } let _ = ("last" === l.input ? ["change"] : ["input", "change"]).map( (e) => P(e, ez(h), r) ), g = r.defaultView; if (!g) return () => { _.forEach((e) => e()); }; let y = g.Object.getOwnPropertyDescriptor( g.HTMLInputElement.prototype, "value" ), v = [ [g.HTMLInputElement.prototype, "value"], [g.HTMLInputElement.prototype, "checked"], [g.HTMLSelectElement.prototype, "value"], [g.HTMLTextAreaElement.prototype, "value"], [g.HTMLSelectElement.prototype, "selectedIndex"], [g.HTMLOptionElement.prototype, "selected"], ]; return ( y && y.set && _.push( ...v.map((e) => B( e[0], e[1], { set() { ez(h)({ target: this, isTrusted: !1 }); }, }, !1, g ) ) ), ez(() => { _.forEach((e) => e()); }) ); })(e), u = (function (e) { let { mediaInteractionCb: t, blockClass: r, blockSelector: i, mirror: o, sampling: n, doc: s, } = e, a = ez((e) => j( ez((n) => { let s = eV(n); if (!s || J(s, r, i, !0)) return; let { currentTime: a, volume: c, muted: u, playbackRate: l, loop: p, } = s; t({ type: e, id: o.getId(s), currentTime: a, volume: c, muted: u, playbackRate: l, loop: p, }); }), n.media || 500 ) ), c = [ P("play", a(0), s), P("pause", a(1), s), P("seeked", a(2), s), P("volumechange", a(3), s), P("ratechange", a(4), s), ]; return ez(() => { c.forEach((e) => e()); }); })(e), l = () => {}, p = () => {}, h = () => {}, d = () => {}; e.recordDOM && ((l = (function (e, t) { let r, i, { styleSheetRuleCb: o, mirror: n, stylesheetManager: s } = e, { win: a } = t; if (!a.CSSStyleSheet || !a.CSSStyleSheet.prototype) return () => {}; let c = a.CSSStyleSheet.prototype.insertRule; a.CSSStyleSheet.prototype.insertRule = new Proxy(c, { apply: ez((e, t, r) => { let [i, a] = r, { id: c, styleId: u } = eX(t, n, s.styleMirror); return ( ((c && -1 !== c) || (u && -1 !== u)) && o({ id: c, styleId: u, adds: [{ rule: i, index: a }] }), e.apply(t, r) ); }), }); let u = a.CSSStyleSheet.prototype.deleteRule; (a.CSSStyleSheet.prototype.deleteRule = new Proxy(u, { apply: ez((e, t, r) => { let [i] = r, { id: a, styleId: c } = eX(t, n, s.styleMirror); return ( ((a && -1 !== a) || (c && -1 !== c)) && o({ id: a, styleId: c, removes: [{ index: i }] }), e.apply(t, r) ); }), })), a.CSSStyleSheet.prototype.replace && ((r = a.CSSStyleSheet.prototype.replace), (a.CSSStyleSheet.prototype.replace = new Proxy(r, { apply: ez((e, t, r) => { let [i] = r, { id: a, styleId: c } = eX(t, n, s.styleMirror); return ( ((a && -1 !== a) || (c && -1 !== c)) && o({ id: a, styleId: c, replace: i }), e.apply(t, r) ); }), }))), a.CSSStyleSheet.prototype.replaceSync && ((i = a.CSSStyleSheet.prototype.replaceSync), (a.CSSStyleSheet.prototype.replaceSync = new Proxy(i, { apply: ez((e, t, r) => { let [i] = r, { id: a, styleId: c } = eX(t, n, s.styleMirror); return ( ((a && -1 !== a) || (c && -1 !== c)) && o({ id: a, styleId: c, replaceSync: i }), e.apply(t, r) ); }), }))); let l = {}; e1("CSSGroupingRule") ? (l.CSSGroupingRule = a.CSSGroupingRule) : (e1("CSSMediaRule") && (l.CSSMediaRule = a.CSSMediaRule), e1("CSSConditionRule") && (l.CSSConditionRule = a.CSSConditionRule), e1("CSSSupportsRule") && (l.CSSSupportsRule = a.CSSSupportsRule)); let p = {}; return ( Object.entries(l).forEach((e) => { let [t, r] = e; (p[t] = { insertRule: r.prototype.insertRule, deleteRule: r.prototype.deleteRule, }), (r.prototype.insertRule = new Proxy(p[t].insertRule, { apply: ez((e, t, r) => { let [i, a] = r, { id: c, styleId: u } = eX( t.parentStyleSheet, n, s.styleMirror ); return ( ((c && -1 !== c) || (u && -1 !== u)) && o({ id: c, styleId: u, adds: [{ rule: i, index: [...eK(t), a || 0] }], }), e.apply(t, r) ); }), })), (r.prototype.deleteRule = new Proxy(p[t].deleteRule, { apply: ez((e, t, r) => { let [i] = r, { id: a, styleId: c } = eX( t.parentStyleSheet, n, s.styleMirror ); return ( ((a && -1 !== a) || (c && -1 !== c)) && o({ id: a, styleId: c, removes: [{ index: [...eK(t), i] }], }), e.apply(t, r) ); }), })); }), ez(() => { (a.CSSStyleSheet.prototype.insertRule = c), (a.CSSStyleSheet.prototype.deleteRule = u), r && (a.CSSStyleSheet.prototype.replace = r), i && (a.CSSStyleSheet.prototype.replaceSync = i), Object.entries(l).forEach((e) => { let [t, r] = e; (r.prototype.insertRule = p[t].insertRule), (r.prototype.deleteRule = p[t].deleteRule); }); }) ); })(e, { win: i })), (p = eY(e, e.doc)), (h = (function (e, t) { let { styleDeclarationCb: r, mirror: i, ignoreCSSAttributes: o, stylesheetManager: n, } = e, { win: s } = t, a = s.CSSStyleDeclaration.prototype.setProperty; s.CSSStyleDeclaration.prototype.setProperty = new Proxy(a, { apply: ez((e, t, s) => { var c; let [u, l, p] = s; if (o.has(u)) return a.apply(t, [u, l, p]); let { id: h, styleId: d } = eX( null === (c = t.parentRule) || void 0 === c ? void 0 : c.parentStyleSheet, i, n.styleMirror ); return ( ((h && -1 !== h) || (d && -1 !== d)) && r({ id: h, styleId: d, set: { property: u, value: l, priority: p }, index: eK(t.parentRule), }), e.apply(t, s) ); }), }); let c = s.CSSStyleDeclaration.prototype.removeProperty; return ( (s.CSSStyleDeclaration.prototype.removeProperty = new Proxy(c, { apply: ez((e, t, s) => { var a; let [u] = s; if (o.has(u)) return c.apply(t, [u]); let { id: l, styleId: p } = eX( null === (a = t.parentRule) || void 0 === a ? void 0 : a.parentStyleSheet, i, n.styleMirror ); return ( ((l && -1 !== l) || (p && -1 !== p)) && r({ id: l, styleId: p, remove: { property: u }, index: eK(t.parentRule), }), e.apply(t, s) ); }), })), ez(() => { (s.CSSStyleDeclaration.prototype.setProperty = a), (s.CSSStyleDeclaration.prototype.removeProperty = c); }) ); })(e, { win: i })), e.collectFonts && (d = (function (e) { let { fontCb: t, doc: r } = e, i = r.defaultView; if (!i) return () => {}; let o = [], n = new WeakMap(), s = i.FontFace; i.FontFace = function (e, t, r) { let i = new s(e, t, r); return ( n.set(i, { family: e, buffer: "string" != typeof t, descriptors: r, fontSource: "string" == typeof t ? t : JSON.stringify(Array.from(new Uint8Array(t))), }), i ); }; let a = $(r.fonts, "add", function (e) { return function (r) { return ( setTimeout( ez(() => { let e = n.get(r); e && (t(e), n.delete(r)); }), 0 ), e.apply(this, [r]) ); }; }); return ( o.push(() => { i.FontFace = s; }), o.push(a), ez(() => { o.forEach((e) => e()); }) ); })(e))); let g = (function (e) { let { doc: t, mirror: r, blockClass: i, blockSelector: o, selectionCb: n, } = e, s = !0, a = ez(() => { let e = t.getSelection(); if (!e || (s && (null == e ? void 0 : e.isCollapsed))) return; s = e.isCollapsed || !1; let a = [], c = e.rangeCount || 0; for (let t = 0; t < c; t++) { let { startContainer: n, startOffset: s, endContainer: c, endOffset: u, } = e.getRangeAt(t); J(n, i, o, !0) || J(c, i, o, !0) || a.push({ start: r.getId(n), startOffset: s, end: r.getId(c), endOffset: u, }); } n({ ranges: a }); }); return a(), P("selectionchange", a); })(e), y = (function (e) { let { doc: t, customElementCb: r } = e, i = t.defaultView; return i && i.customElements ? $(i.customElements, "define", function (e) { return function (t, i, o) { try { r({ define: { name: t } }); } catch (e) { console.warn( "Custom element callback failed for ".concat(t) ); } return e.apply(this, [t, i, o]); }; }) : () => {}; })(e), v = []; for (let t of e.plugins) v.push(t.observer(t.callback, i, t.options)); return ez(() => { eW.forEach((e) => e.reset()), null == t || t.disconnect(), o(), n(), s(), a(), c(), u(), l(), p(), h(), d(), g(), y(), v.forEach((e) => e()); }); } function e0(e) { return void 0 !== window[e]; } function e1(e) { return !!( void 0 !== window[e] && window[e].prototype && "insertRule" in window[e].prototype && "deleteRule" in window[e].prototype ); } class e2 { getId(e, t, r, i) { let o = r || this.getIdToRemoteIdMap(e), n = i || this.getRemoteIdToIdMap(e), s = o.get(t); return s || ((s = this.generateIdFn()), o.set(t, s), n.set(s, t)), s; } getIds(e, t) { let r = this.getIdToRemoteIdMap(e), i = this.getRemoteIdToIdMap(e); return t.map((t) => this.getId(e, t, r, i)); } getRemoteId(e, t, r) { let i = r || this.getRemoteIdToIdMap(e); return "number" != typeof t ? t : i.get(t) || -1; } getRemoteIds(e, t) { let r = this.getRemoteIdToIdMap(e); return t.map((t) => this.getRemoteId(e, t, r)); } reset(e) { if (!e) { (this.iframeIdToRemoteIdMap = new WeakMap()), (this.iframeRemoteIdToIdMap = new WeakMap()); return; } this.iframeIdToRemoteIdMap.delete(e), this.iframeRemoteIdToIdMap.delete(e); } getIdToRemoteIdMap(e) { let t = this.iframeIdToRemoteIdMap.get(e); return ( t || ((t = new Map()), this.iframeIdToRemoteIdMap.set(e, t)), t ); } getRemoteIdToIdMap(e) { let t = this.iframeRemoteIdToIdMap.get(e); return ( t || ((t = new Map()), this.iframeRemoteIdToIdMap.set(e, t)), t ); } constructor(e) { (this.generateIdFn = e), (this.iframeIdToRemoteIdMap = new WeakMap()), (this.iframeRemoteIdToIdMap = new WeakMap()); } } class e3 { addIframe(e) { this.iframes.set(e, !0), e.contentWindow && this.crossOriginIframeMap.set(e.contentWindow, e); } addLoadListener(e) { this.loadListener = e; } attachIframe(e, t) { var r; this.mutationCb({ adds: [{ parentId: this.mirror.getId(e), nextId: null, node: t }], removes: [], texts: [], attributes: [], isAttachIframe: !0, }), null === (r = this.loadListener) || void 0 === r || r.call(this, e), e.contentDocument && e.contentDocument.adoptedStyleSheets && e.contentDocument.adoptedStyleSheets.length > 0 && this.stylesheetManager.adoptStyleSheets( e.contentDocument.adoptedStyleSheets, this.mirror.getId(e.contentDocument) ); } handleMessage(e) { if ( "rrweb" !== e.data.type || e.origin !== e.data.origin || !e.source ) return; let t = this.crossOriginIframeMap.get(e.source); if (!t) return; let r = this.transformCrossOriginEvent(t, e.data.event); r && this.wrappedEmit(r, e.data.isCheckout); } transformCrossOriginEvent(e, t) { var r; switch (t.type) { case eD.FullSnapshot: { this.crossOriginIframeMirror.reset(e), this.crossOriginIframeStyleMirror.reset(e), this.replaceIdOnNode(t.data.node, e); let r = t.data.node.id; return ( this.crossOriginIframeRootIdMap.set(e, r), this.patchRootIdOnNode(t.data.node, r), { timestamp: t.timestamp, type: eD.IncrementalSnapshot, data: { source: eN.Mutation, adds: [ { parentId: this.mirror.getId(e), nextId: null, node: t.data.node, }, ], removes: [], texts: [], attributes: [], isAttachIframe: !0, }, } ); } case eD.Meta: case eD.Load: case eD.DomContentLoaded: break; case eD.Plugin: return t; case eD.Custom: return ( this.replaceIds(t.data.payload, e, [ "id", "parentId", "previousId", "nextId", ]), t ); case eD.IncrementalSnapshot: switch (t.data.source) { case eN.Mutation: return ( t.data.adds.forEach((t) => { this.replaceIds(t, e, [ "parentId", "nextId", "previousId", ]), this.replaceIdOnNode(t.node, e); let r = this.crossOriginIframeRootIdMap.get(e); r && this.patchRootIdOnNode(t.node, r); }), t.data.removes.forEach((t) => { this.replaceIds(t, e, ["parentId", "id"]); }), t.data.attributes.forEach((t) => { this.replaceIds(t, e, ["id"]); }), t.data.texts.forEach((t) => { this.replaceIds(t, e, ["id"]); }), t ); case eN.Drag: case eN.TouchMove: case eN.MouseMove: return ( t.data.positions.forEach((t) => { this.replaceIds(t, e, ["id"]); }), t ); case eN.ViewportResize: return !1; case eN.MediaInteraction: case eN.MouseInteraction: case eN.Scroll: case eN.CanvasMutation: case eN.Input: return this.replaceIds(t.data, e, ["id"]), t; case eN.StyleSheetRule: case eN.StyleDeclaration: return ( this.replaceIds(t.data, e, ["id"]), this.replaceStyleIds(t.data, e, ["styleId"]), t ); case eN.Font: return t; case eN.Selection: return ( t.data.ranges.forEach((t) => { this.replaceIds(t, e, ["start", "end"]); }), t ); case eN.AdoptedStyleSheet: return ( this.replaceIds(t.data, e, ["id"]), this.replaceStyleIds(t.data, e, ["styleIds"]), null === (r = t.data.styles) || void 0 === r || r.forEach((t) => { this.replaceStyleIds(t, e, ["styleId"]); }), t ); } } return !1; } replace(e, t, r, i) { for (let o of i) (Array.isArray(t[o]) || "number" == typeof t[o]) && (Array.isArray(t[o]) ? (t[o] = e.getIds(r, t[o])) : (t[o] = e.getId(r, t[o]))); return t; } replaceIds(e, t, r) { return this.replace(this.crossOriginIframeMirror, e, t, r); } replaceStyleIds(e, t, r) { return this.replace(this.crossOriginIframeStyleMirror, e, t, r); } replaceIdOnNode(e, t) { this.replaceIds(e, t, ["id", "rootId"]), "childNodes" in e && e.childNodes.forEach((e) => { this.replaceIdOnNode(e, t); }); } patchRootIdOnNode(e, t) { e.type === eC.Document || e.rootId || (e.rootId = t), "childNodes" in e && e.childNodes.forEach((e) => { this.patchRootIdOnNode(e, t); }); } constructor(e) { (this.iframes = new WeakMap()), (this.crossOriginIframeMap = new WeakMap()), (this.crossOriginIframeMirror = new e2(S)), (this.crossOriginIframeRootIdMap = new WeakMap()), (this.mutationCb = e.mutationCb), (this.wrappedEmit = e.wrappedEmit), (this.stylesheetManager = e.stylesheetManager), (this.recordCrossOriginIframes = e.recordCrossOriginIframes), (this.crossOriginIframeStyleMirror = new e2( this.stylesheetManager.styleMirror.generateId.bind( this.stylesheetManager.styleMirror ) )), (this.mirror = e.mirror), this.recordCrossOriginIframes && window.addEventListener("message", this.handleMessage.bind(this)); } } class e6 { init() { this.reset(), this.patchAttachShadow(Element, document); } addShadowRoot(e, t) { if (!l(e) || this.shadowDoms.has(e)) return; this.shadowDoms.add(e); let r = eH( Object.assign(Object.assign({}, this.bypassOptions), { doc: t, mutationCb: this.mutationCb, mirror: this.mirror, shadowDomManager: this, }), e ); this.restoreHandlers.push(() => r.disconnect()), this.restoreHandlers.push( eG( Object.assign(Object.assign({}, this.bypassOptions), { scrollCb: this.scrollCb, doc: e, mirror: this.mirror, }) ) ), setTimeout(() => { e.adoptedStyleSheets && e.adoptedStyleSheets.length > 0 && this.bypassOptions.stylesheetManager.adoptStyleSheets( e.adoptedStyleSheets, this.mirror.getId(e.host) ), this.restoreHandlers.push( eY( { mirror: this.mirror, stylesheetManager: this.bypassOptions.stylesheetManager, }, e ) ); }, 0); } observeAttachShadow(e) { e.contentWindow && e.contentDocument && this.patchAttachShadow(e.contentWindow.Element, e.contentDocument); } patchAttachShadow(e, t) { let r = this; this.restoreHandlers.push( $(e.prototype, "attachShadow", function (e) { return function (i) { let o = e.call(this, i); return ( this.shadowRoot && er(this) && r.addShadowRoot(this.shadowRoot, t), o ); }; }) ); } reset() { this.restoreHandlers.forEach((e) => { try { e(); } catch (e) {} }), (this.restoreHandlers = []), (this.shadowDoms = new WeakSet()); } constructor(e) { (this.shadowDoms = new WeakSet()), (this.restoreHandlers = []), (this.mutationCb = e.mutationCb), (this.scrollCb = e.scrollCb), (this.bypassOptions = e.bypassOptions), (this.mirror = e.mirror), this.init(); } } for ( var e4 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", e5 = "undefined" == typeof Uint8Array ? [] : new Uint8Array(256), e8 = 0; e8 < e4.length; e8++ ) e5[e4.charCodeAt(e8)] = e8; var e9 = function (e) { var t, r = new Uint8Array(e), i = r.length, o = ""; for (t = 0; t < i; t += 3) o += e4[r[t] >> 2] + e4[((3 & r[t]) << 4) | (r[t + 1] >> 4)] + e4[((15 & r[t + 1]) << 2) | (r[t + 2] >> 6)] + e4[63 & r[t + 2]]; return ( i % 3 == 2 ? (o = o.substring(0, o.length - 1) + "=") : i % 3 == 1 && (o = o.substring(0, o.length - 2) + "=="), o ); }; let e7 = new Map(), te = (e, t, r) => { let i; if (!e || !(tr(e, t) || "object" == typeof e)) return; let o = e.constructor.name, n = ((i = e7.get(r)) || ((i = new Map()), e7.set(r, i)), i.has(o) || i.set(o, []), i.get(o)), s = n.indexOf(e); return -1 === s && ((s = n.length), n.push(e)), s; }, tt = (e, t, r) => e.map((e) => (function e(t, r, i) { if (t instanceof Array) return t.map((t) => e(t, r, i)); if (null === t); else if ( t instanceof Float32Array || t instanceof Float64Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Uint8Array || t instanceof Uint16Array || t instanceof Int16Array || t instanceof Int8Array || t instanceof Uint8ClampedArray ) return { rr_type: t.constructor.name, args: [Object.values(t)], }; else if (t instanceof ArrayBuffer) return { rr_type: t.constructor.name, base64: e9(t) }; else if (t instanceof DataView) return { rr_type: t.constructor.name, args: [e(t.buffer, r, i), t.byteOffset, t.byteLength], }; else if (t instanceof HTMLImageElement) { let e = t.constructor.name, { src: r } = t; return { rr_type: e, src: r }; } else if (t instanceof HTMLCanvasElement) return { rr_type: "HTMLImageElement", src: t.toDataURL() }; else if (t instanceof ImageData) return { rr_type: t.constructor.name, args: [e(t.data, r, i), t.width, t.height], }; else if (tr(t, r) || "object" == typeof t) return { rr_type: t.constructor.name, index: te(t, r, i) }; return t; })(e, t, r) ), tr = (e, t) => !![ "WebGLActiveInfo", "WebGLBuffer", "WebGLFramebuffer", "WebGLProgram", "WebGLRenderbuffer", "WebGLShader", "WebGLShaderPrecisionFormat", "WebGLTexture", "WebGLUniformLocation", "WebGLVertexArrayObject", "WebGLVertexArrayObjectOES", ] .filter((e) => "function" == typeof t[e]) .find((r) => e instanceof t[r]); function ti(e, t, r, i) { let o = []; try { let n = $(e.HTMLCanvasElement.prototype, "getContext", function (e) { return function (o) { for ( var n = arguments.length, s = Array(n > 1 ? n - 1 : 0), a = 1; a < n; a++ ) s[a - 1] = arguments[a]; if (!J(this, t, r, !0)) { let e = "experimental-webgl" === o ? "webgl" : o; if ( ("__context" in this || (this.__context = e), i && ["webgl", "webgl2"].includes(e)) ) { if (s[0] && "object" == typeof s[0]) { let e = s[0]; e.preserveDrawingBuffer || (e.preserveDrawingBuffer = !0); } else s.splice(0, 1, { preserveDrawingBuffer: !0 }); } } return e.apply(this, [o, ...s]); }; }); o.push(n); } catch (e) { console.error( "failed to patch HTMLCanvasElement.prototype.getContext" ); } return () => { o.forEach((e) => e()); }; } function to(e, t, r, i, o, n, s) { let a = []; for (let n of Object.getOwnPropertyNames(e)) if ( ![ "isContextLost", "canvas", "drawingBufferWidth", "drawingBufferHeight", ].includes(n) ) try { if ("function" != typeof e[n]) continue; let c = $(e, n, function (e) { return function () { for ( var a = arguments.length, c = Array(a), u = 0; u < a; u++ ) c[u] = arguments[u]; let l = e.apply(this, c); if ( (te(l, s, this), "tagName" in this.canvas && !J(this.canvas, i, o, !0)) ) { let e = tt(c, s, this), i = { type: t, property: n, args: e }; r(this.canvas, i); } return l; }; }); a.push(c); } catch (o) { let i = B(e, n, { set(e) { r(this.canvas, { type: t, property: n, args: [e], setter: !0, }); }, }); a.push(i); } return a; } var tn = ((ea = function () { !(function () { /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ function e( e, t, r, i ) { return new (r || (r = Promise))(function (o, n) { function s(e) { try { c(i.next(e)); } catch (e) { n(e); } } function a(e) { try { c(i.throw(e)); } catch (e) { n(e); } } function c(e) { var t; e.done ? o(e.value) : ((t = e.value) instanceof r ? t : new r(function (e) { e(t); }) ).then(s, a); } c((i = i.apply(e, t || [])).next()); }); } for ( var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", r = "undefined" == typeof Uint8Array ? [] : new Uint8Array(256), i = 0; i < t.length; i++ ) r[t.charCodeAt(i)] = i; var o = function (e) { var r, i = new Uint8Array(e), o = i.length, n = ""; for (r = 0; r < o; r += 3) n += t[i[r] >> 2] + t[((3 & i[r]) << 4) | (i[r + 1] >> 4)] + t[((15 & i[r + 1]) << 2) | (i[r + 2] >> 6)] + t[63 & i[r + 2]]; return ( o % 3 == 2 ? (n = n.substring(0, n.length - 1) + "=") : o % 3 == 1 && (n = n.substring(0, n.length - 2) + "=="), n ); }; let n = new Map(), s = new Map(), a = self; a.onmessage = function (t) { return e(this, void 0, void 0, function* () { if (!("OffscreenCanvas" in globalThis)) return a.postMessage({ id: t.data.id }); { let { id: r, bitmap: i, width: c, height: u, dataURLOptions: l, } = t.data, p = (function (t, r, i) { return e(this, void 0, void 0, function* () { let e = "".concat(t, "-").concat(r); if (!("OffscreenCanvas" in globalThis)) return ""; { if (s.has(e)) return s.get(e); let n = new OffscreenCanvas(t, r); n.getContext("2d"); let a = yield n.convertToBlob(i), c = o(yield a.arrayBuffer()); return s.set(e, c), c; } }); })(c, u, l), h = new OffscreenCanvas(c, u); h.getContext("2d").drawImage(i, 0, 0), i.close(); let d = yield h.convertToBlob(l), f = d.type, _ = o(yield d.arrayBuffer()); if (!n.has(r) && (yield p) === _) return n.set(r, _), a.postMessage({ id: r }); if (n.get(r) === _) return a.postMessage({ id: r }); a.postMessage({ id: r, type: f, base64: _, width: c, height: u, }), n.set(r, _); } }); }; })(); }), function (e) { var t, r; return ( (ec = ec || ((t = (function (e, t) { var r = void 0 === t ? null : t, i = e.toString().split("\n"); i.pop(), i.shift(); for ( var o = i[0].search(/\S/), n = /(['"])__worker_loader_strict__(['"])/g, s = 0, a = i.length; s < a; ++s ) i[s] = i[s].substring(o).replace(n, "$1use strict$2") + "\n"; return r && i.push("//# sourceMappingURL=" + r + "\n"), i; })(ea, null)), (r = new Blob(t, { type: "application/javascript" })), URL.createObjectURL(r))), new Worker(ec, e) ); }); class ts { reset() { this.pendingCanvasMutations.clear(), this.resetObservers && this.resetObservers(); } freeze() { this.frozen = !0; } unfreeze() { this.frozen = !1; } lock() { this.locked = !0; } unlock() { this.locked = !1; } initCanvasFPSObserver(e, t, r, i, o) { let n; let s = ti(t, r, i, !0), a = new Map(), c = new tn(); c.onmessage = (e) => { let { id: t } = e.data; if ((a.set(t, !1), !("base64" in e.data))) return; let { base64: r, type: i, width: o, height: n } = e.data; this.mutationCb({ id: t, type: eL["2D"], commands: [ { property: "clearRect", args: [0, 0, o, n] }, { property: "drawImage", args: [ { rr_type: "ImageBitmap", args: [ { rr_type: "Blob", data: [{ rr_type: "ArrayBuffer", base64: r }], type: i, }, ], }, 0, 0, ], }, ], }); }; let u = 1e3 / e, l = 0, p = () => { let e = []; return ( t.document.querySelectorAll("canvas").forEach((t) => { J(t, r, i, !0) || e.push(t); }), e ); }, h = (e) => { if (l && e - l < u) { n = requestAnimationFrame(h); return; } (l = e), p().forEach((e) => { var t, r, i, n; return ( (t = this), (r = void 0), (i = void 0), (n = function* () { var t; let r = this.mirror.getId(e); if (a.get(r) || 0 === e.width || 0 === e.height) return; if ( (a.set(r, !0), ["webgl", "webgl2"].includes(e.__context)) ) { let r = e.getContext(e.__context); (null === (t = null == r ? void 0 : r.getContextAttributes()) || void 0 === t ? void 0 : t.preserveDrawingBuffer) === !1 && r.clear(r.COLOR_BUFFER_BIT); } let i = yield createImageBitmap(e); c.postMessage( { id: r, bitmap: i, width: e.width, height: e.height, dataURLOptions: o.dataURLOptions, }, [i] ); }), new (i || (i = Promise))(function (e, o) { function s(e) { try { c(n.next(e)); } catch (e) { o(e); } } function a(e) { try { c(n.throw(e)); } catch (e) { o(e); } } function c(t) { var r; t.done ? e(t.value) : ((r = t.value) instanceof i ? r : new i(function (e) { e(r); }) ).then(s, a); } c((n = n.apply(t, r || [])).next()); }) ); }), (n = requestAnimationFrame(h)); }; (n = requestAnimationFrame(h)), (this.resetObservers = () => { s(), cancelAnimationFrame(n); }); } initCanvasMutationObserver(e, t, r) { this.startRAFTimestamping(), this.startPendingCanvasMutationFlusher(); let i = ti(e, t, r, !1), o = (function (e, t, r, i) { let o = []; for (let n of Object.getOwnPropertyNames( t.CanvasRenderingContext2D.prototype )) try { if ( "function" != typeof t.CanvasRenderingContext2D.prototype[n] ) continue; let s = $( t.CanvasRenderingContext2D.prototype, n, function (o) { return function () { for ( var s = arguments.length, a = Array(s), c = 0; c < s; c++ ) a[c] = arguments[c]; return ( J(this.canvas, r, i, !0) || setTimeout(() => { let r = tt(a, t, this); e(this.canvas, { type: eL["2D"], property: n, args: r, }); }, 0), o.apply(this, a) ); }; } ); o.push(s); } catch (i) { let r = B(t.CanvasRenderingContext2D.prototype, n, { set(t) { e(this.canvas, { type: eL["2D"], property: n, args: [t], setter: !0, }); }, }); o.push(r); } return () => { o.forEach((e) => e()); }; })(this.processMutation.bind(this), e, t, r), n = (function (e, t, r, i, o) { let n = []; return ( n.push( ...to( t.WebGLRenderingContext.prototype, eL.WebGL, e, r, i, o, t ) ), void 0 !== t.WebGL2RenderingContext && n.push( ...to( t.WebGL2RenderingContext.prototype, eL.WebGL2, e, r, i, o, t ) ), () => { n.forEach((e) => e()); } ); })(this.processMutation.bind(this), e, t, r, this.mirror); this.resetObservers = () => { i(), o(), n(); }; } startPendingCanvasMutationFlusher() { requestAnimationFrame(() => this.flushPendingCanvasMutations()); } startRAFTimestamping() { let e = (t) => { (this.rafStamps.latestId = t), requestAnimationFrame(e); }; requestAnimationFrame(e); } flushPendingCanvasMutations() { this.pendingCanvasMutations.forEach((e, t) => { let r = this.mirror.getId(t); this.flushPendingCanvasMutationFor(t, r); }), requestAnimationFrame(() => this.flushPendingCanvasMutations()); } flushPendingCanvasMutationFor(e, t) { if (this.frozen || this.locked) return; let r = this.pendingCanvasMutations.get(e); if (!r || -1 === t) return; let i = r.map((e) => /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ (function ( e, t ) { var r = {}; for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && 0 > t.indexOf(i) && (r[i] = e[i]); if ( null != e && "function" == typeof Object.getOwnPropertySymbols ) for ( var o = 0, i = Object.getOwnPropertySymbols(e); o < i.length; o++ ) 0 > t.indexOf(i[o]) && Object.prototype.propertyIsEnumerable.call(e, i[o]) && (r[i[o]] = e[i[o]]); return r; })(e, ["type"]) ), { type: o } = r[0]; this.mutationCb({ id: t, type: o, commands: i }), this.pendingCanvasMutations.delete(e); } constructor(e) { (this.pendingCanvasMutations = new Map()), (this.rafStamps = { latestId: 0, invokeId: null }), (this.frozen = !1), (this.locked = !1), (this.processMutation = (e, t) => { ((this.rafStamps.invokeId && this.rafStamps.latestId !== this.rafStamps.invokeId) || !this.rafStamps.invokeId) && (this.rafStamps.invokeId = this.rafStamps.latestId), this.pendingCanvasMutations.has(e) || this.pendingCanvasMutations.set(e, []), this.pendingCanvasMutations.get(e).push(t); }); let { sampling: t = "all", win: r, blockClass: i, blockSelector: o, recordCanvas: n, dataURLOptions: s, } = e; (this.mutationCb = e.mutationCb), (this.mirror = e.mirror), n && "all" === t && this.initCanvasMutationObserver(r, i, o), n && "number" == typeof t && this.initCanvasFPSObserver(t, r, i, o, { dataURLOptions: s }); } } class ta { attachLinkElement(e, t) { "_cssText" in t.attributes && this.mutationCb({ adds: [], removes: [], texts: [], attributes: [{ id: t.id, attributes: t.attributes }], }), this.trackLinkElement(e); } trackLinkElement(e) { this.trackedLinkElements.has(e) || (this.trackedLinkElements.add(e), this.trackStylesheetInLinkElement(e)); } adoptStyleSheets(e, t) { if (0 === e.length) return; let r = { id: t, styleIds: [] }, i = []; for (let t of e) { let e; this.styleMirror.has(t) ? (e = this.styleMirror.getId(t)) : ((e = this.styleMirror.add(t)), i.push({ styleId: e, rules: Array.from(t.rules || CSSRule, (e, t) => ({ rule: h(e), index: t, })), })), r.styleIds.push(e); } i.length > 0 && (r.styles = i), this.adoptedStyleSheetCb(r); } reset() { this.styleMirror.reset(), (this.trackedLinkElements = new WeakSet()); } trackStylesheetInLinkElement(e) {} constructor(e) { (this.trackedLinkElements = new WeakSet()), (this.styleMirror = new ee()), (this.mutationCb = e.mutationCb), (this.adoptedStyleSheetCb = e.adoptedStyleSheetCb); } } class tc { periodicallyClear() { requestAnimationFrame(() => { this.clear(), this.loop && this.periodicallyClear(); }); } inOtherBuffer(e, t) { let r = this.nodeMap.get(e); return r && Array.from(r).some((e) => e !== t); } add(e, t) { this.nodeMap.set(e, (this.nodeMap.get(e) || new Set()).add(t)); } clear() { this.nodeMap = new WeakMap(); } destroy() { this.loop = !1; } constructor() { (this.nodeMap = new WeakMap()), (this.loop = !0), this.periodicallyClear(); } } function tu(e) { return Object.assign(Object.assign({}, e), { timestamp: z() }); } let tl = !1, tp = new d(); function th() { let e, t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, { emit: r, checkoutEveryNms: i, checkoutEveryNth: o, blockClass: u = "rr-block", blockSelector: l = null, ignoreClass: p = "rr-ignore", ignoreSelector: h = null, maskTextClass: f = "rr-mask", maskTextSelector: _ = null, inlineStylesheet: g = !0, maskAllInputs: m, maskInputOptions: y, slimDOMOptions: v, maskInputFn: b, maskTextFn: S, hooks: k, packFn: w, sampling: M = {}, dataURLOptions: I = {}, mousemoveWait: E, recordDOM: x = !0, recordCanvas: C = !1, recordCrossOriginIframes: O = !1, recordAfter: T = "DOMContentLoaded" === t.recordAfter ? t.recordAfter : "load", userTriggeredOnInput: R = !1, collectFonts: D = !1, inlineImages: N = !1, plugins: A, keepIframeSrcFn: q = () => !1, ignoreCSSAttributes: F = new Set([]), errorHandler: U, } = t; n = U; let j = !O || window.parent === window, B = !1; if (!j) try { window.parent.document && (B = !1); } catch (e) { B = !0; } if (j && !r) throw Error("emit function is required"); void 0 !== E && void 0 === M.mousemove && (M.mousemove = E), tp.reset(); let $ = !0 === m ? { color: !0, date: !0, "datetime-local": !0, email: !0, month: !0, number: !0, range: !0, search: !0, tel: !0, text: !0, time: !0, url: !0, week: !0, textarea: !0, select: !0, password: !0, } : void 0 !== y ? y : { password: !0 }, z = !0 === v || "all" === v ? { script: !0, comment: !0, headFavicon: !0, headWhitespace: !0, headMetaSocial: !0, headMetaRobots: !0, headMetaHttpEquiv: !0, headMetaVerification: !0, headMetaAuthorship: "all" === v, headMetaDescKeywords: "all" === v, } : v || {}; !(function () { let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : window; if ( ("NodeList" in e && !e.NodeList.prototype.forEach && (e.NodeList.prototype.forEach = Array.prototype.forEach), "DOMTokenList" in e && !e.DOMTokenList.prototype.forEach && (e.DOMTokenList.prototype.forEach = Array.prototype.forEach), !Node.prototype.contains) ) { var t = this; Node.prototype.contains = function () { for (var e = arguments.length, r = Array(e), i = 0; i < e; i++) r[i] = arguments[i]; let o = r[0]; if (!(0 in r)) throw TypeError("1 argument is required"); do if (t === o) return !0; while ((o = o && o.parentNode)); return !1; }; } })(); let G = 0, J = (e) => { for (let t of A || []) t.eventProcessor && (e = t.eventProcessor(e)); return w && !B && (e = w(e)), e; }; s = (t, n) => { var s; if ( ((null === (s = eW[0]) || void 0 === s ? void 0 : s.isFrozen()) && t.type !== eD.FullSnapshot && !( t.type === eD.IncrementalSnapshot && t.data.source === eN.Mutation ) && eW.forEach((e) => e.unfreeze()), j) ) null == r || r(J(t), n); else if (B) { let e = { type: "rrweb", event: J(t), origin: window.location.origin, isCheckout: n, }; window.parent.postMessage(e, "*"); } if (t.type === eD.FullSnapshot) (e = t), (G = 0); else if (t.type === eD.IncrementalSnapshot) { if (t.data.source === eN.Mutation && t.data.isAttachIframe) return; G++; let r = o && G >= o, n = i && t.timestamp - e.timestamp > i; (r || n) && a(!0); } }; let Q = (e) => { s( tu({ type: eD.IncrementalSnapshot, data: Object.assign({ source: eN.Mutation }, e), }) ); }, K = (e) => s( tu({ type: eD.IncrementalSnapshot, data: Object.assign({ source: eN.Scroll }, e), }) ), ee = (e) => s( tu({ type: eD.IncrementalSnapshot, data: Object.assign({ source: eN.CanvasMutation }, e), }) ), et = new ta({ mutationCb: Q, adoptedStyleSheetCb: (e) => s( tu({ type: eD.IncrementalSnapshot, data: Object.assign({ source: eN.AdoptedStyleSheet }, e), }) ), }), er = new e3({ mirror: tp, mutationCb: Q, stylesheetManager: et, recordCrossOriginIframes: O, wrappedEmit: s, }); for (let e of A || []) e.getMirror && e.getMirror({ nodeMirror: tp, crossOriginIframeMirror: er.crossOriginIframeMirror, crossOriginIframeStyleMirror: er.crossOriginIframeStyleMirror, }); let ei = new tc(); c = new ts({ recordCanvas: C, mutationCb: ee, win: window, blockClass: u, blockSelector: l, mirror: tp, sampling: M.canvas, dataURLOptions: I, }); let eo = new e6({ mutationCb: Q, scrollCb: K, bypassOptions: { blockClass: u, blockSelector: l, maskTextClass: f, maskTextSelector: _, inlineStylesheet: g, maskInputOptions: $, dataURLOptions: I, maskTextFn: S, maskInputFn: b, recordCanvas: C, inlineImages: N, sampling: M, slimDOMOptions: z, iframeManager: er, stylesheetManager: et, canvasManager: c, keepIframeSrcFn: q, processedNodeManager: ei, }, mirror: tp, }); a = function () { let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0]; if (!x) return; s( tu({ type: eD.Meta, data: { href: window.location.href, width: H(), height: V() }, }), e ), et.reset(), eo.init(), eW.forEach((e) => e.lock()); let t = (function (e, t) { let { mirror: r = new d(), blockClass: i = "rr-block", blockSelector: o = null, maskTextClass: n = "rr-mask", maskTextSelector: s = null, inlineStylesheet: a = !0, inlineImages: c = !1, recordCanvas: u = !1, maskAllInputs: l = !1, maskTextFn: p, maskInputFn: h, slimDOM: f = !1, dataURLOptions: _, preserveWhiteSpace: g, onSerialize: m, onIframeLoad: y, iframeLoadTimeout: v, onStylesheetLoad: b, stylesheetLoadTimeout: S, keepIframeSrcFn: k = () => !1, } = t || {}; return L(e, { doc: e, mirror: r, blockClass: i, blockSelector: o, maskTextClass: n, maskTextSelector: s, skipChild: !1, inlineStylesheet: a, maskInputOptions: !0 === l ? { color: !0, date: !0, "datetime-local": !0, email: !0, month: !0, number: !0, range: !0, search: !0, tel: !0, text: !0, time: !0, url: !0, week: !0, textarea: !0, select: !0, password: !0, } : !1 === l ? { password: !0 } : l, maskTextFn: p, maskInputFn: h, slimDOMOptions: !0 === f || "all" === f ? { script: !0, comment: !0, headFavicon: !0, headWhitespace: !0, headMetaDescKeywords: "all" === f, headMetaSocial: !0, headMetaRobots: !0, headMetaHttpEquiv: !0, headMetaAuthorship: !0, headMetaVerification: !0, } : !1 === f ? {} : f, dataURLOptions: _, inlineImages: c, recordCanvas: u, preserveWhiteSpace: g, onSerialize: m, onIframeLoad: y, iframeLoadTimeout: v, onStylesheetLoad: b, stylesheetLoadTimeout: S, keepIframeSrcFn: k, newlyAddedElement: !1, }); })(document, { mirror: tp, blockClass: u, blockSelector: l, maskTextClass: f, maskTextSelector: _, inlineStylesheet: g, maskAllInputs: $, maskTextFn: S, slimDOM: z, dataURLOptions: I, recordCanvas: C, inlineImages: N, onSerialize: (e) => { X(e, tp) && er.addIframe(e), Y(e, tp) && et.trackLinkElement(e), Z(e) && eo.addShadowRoot(e.shadowRoot, document); }, onIframeLoad: (e, t) => { er.attachIframe(e, t), eo.observeAttachShadow(e); }, onStylesheetLoad: (e, t) => { et.attachLinkElement(e, t); }, keepIframeSrcFn: q, }); if (!t) return console.warn("Failed to snapshot the document"); s( tu({ type: eD.FullSnapshot, data: { node: t, initialOffset: W(window) }, }), e ), eW.forEach((e) => e.unlock()), document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0 && et.adoptStyleSheets( document.adoptedStyleSheets, tp.getId(document) ); }; try { let e = [], t = (e) => { var t; return ez(eZ)( { mutationCb: Q, mousemoveCb: (e, t) => s( tu({ type: eD.IncrementalSnapshot, data: { source: t, positions: e }, }) ), mouseInteractionCb: (e) => s( tu({ type: eD.IncrementalSnapshot, data: Object.assign({ source: eN.MouseInteraction }, e), }) ), scrollCb: K, viewportResizeCb: (e) => s( tu({ type: eD.IncrementalSnapshot, data: Object.assign({ source: eN.ViewportResize }, e), }) ), inputCb: (e) => s( tu({ type: eD.IncrementalSnapshot, data: Object.assign({ source: eN.Input }, e), }) ), mediaInteractionCb: (e) => s( tu({ type: eD.IncrementalSnapshot, data: Object.assign({ source: eN.MediaInteraction }, e), }) ), styleSheetRuleCb: (e) => s( tu({ type: eD.IncrementalSnapshot, data: Object.assign({ source: eN.StyleSheetRule }, e), }) ), styleDeclarationCb: (e) => s( tu({ type: eD.IncrementalSnapshot, data: Object.assign({ source: eN.StyleDeclaration }, e), }) ), canvasMutationCb: ee, fontCb: (e) => s( tu({ type: eD.IncrementalSnapshot, data: Object.assign({ source: eN.Font }, e), }) ), selectionCb: (e) => { s( tu({ type: eD.IncrementalSnapshot, data: Object.assign({ source: eN.Selection }, e), }) ); }, customElementCb: (e) => { s( tu({ type: eD.IncrementalSnapshot, data: Object.assign({ source: eN.CustomElement }, e), }) ); }, blockClass: u, ignoreClass: p, ignoreSelector: h, maskTextClass: f, maskTextSelector: _, maskInputOptions: $, inlineStylesheet: g, sampling: M, recordDOM: x, recordCanvas: C, inlineImages: N, userTriggeredOnInput: R, collectFonts: D, doc: e, maskInputFn: b, maskTextFn: S, keepIframeSrcFn: q, blockSelector: l, slimDOMOptions: z, dataURLOptions: I, mirror: tp, iframeManager: er, stylesheetManager: et, shadowDomManager: eo, processedNodeManager: ei, canvasManager: c, ignoreCSSAttributes: F, plugins: (null === (t = null == A ? void 0 : A.filter((e) => e.observer)) || void 0 === t ? void 0 : t.map((e) => ({ observer: e.observer, options: e.options, callback: (t) => s( tu({ type: eD.Plugin, data: { plugin: e.name, payload: t }, }) ), }))) || [], }, k ); }; er.addLoadListener((r) => { try { e.push(t(r.contentDocument)); } catch (e) { console.warn(e); } }); let r = () => { a(), e.push(t(document)), (tl = !0); }; return ( "interactive" === document.readyState || "complete" === document.readyState ? r() : (e.push( P("DOMContentLoaded", () => { s(tu({ type: eD.DomContentLoaded, data: {} })), "DOMContentLoaded" === T && r(); }) ), e.push( P( "load", () => { s(tu({ type: eD.Load, data: {} })), "load" === T && r(); }, window ) )), () => { e.forEach((e) => e()), ei.destroy(), (tl = !1), (n = void 0); } ); } catch (e) { console.warn(e); } } (th.addCustomEvent = (e, t) => { if (!tl) throw Error("please add custom event after start recording"); s(tu({ type: eD.Custom, data: { tag: e, payload: t } })); }), (th.freezePage = () => { eW.forEach((e) => e.freeze()); }), (th.takeFullSnapshot = (e) => { if (!tl) throw Error("please take full snapshot after start recording"); a(e); }), (th.mirror = tp); var td = (((eu = td || {})[(eu.DomContentLoaded = 0)] = "DomContentLoaded"), (eu[(eu.Load = 1)] = "Load"), (eu[(eu.FullSnapshot = 2)] = "FullSnapshot"), (eu[(eu.IncrementalSnapshot = 3)] = "IncrementalSnapshot"), (eu[(eu.Meta = 4)] = "Meta"), (eu[(eu.Custom = 5)] = "Custom"), (eu[(eu.Plugin = 6)] = "Plugin"), eu), tf = (((el = tf || {})[(el.Mutation = 0)] = "Mutation"), (el[(el.MouseMove = 1)] = "MouseMove"), (el[(el.MouseInteraction = 2)] = "MouseInteraction"), (el[(el.Scroll = 3)] = "Scroll"), (el[(el.ViewportResize = 4)] = "ViewportResize"), (el[(el.Input = 5)] = "Input"), (el[(el.TouchMove = 6)] = "TouchMove"), (el[(el.MediaInteraction = 7)] = "MediaInteraction"), (el[(el.StyleSheetRule = 8)] = "StyleSheetRule"), (el[(el.CanvasMutation = 9)] = "CanvasMutation"), (el[(el.Font = 10)] = "Font"), (el[(el.Log = 11)] = "Log"), (el[(el.Drag = 12)] = "Drag"), (el[(el.StyleDeclaration = 13)] = "StyleDeclaration"), (el[(el.Selection = 14)] = "Selection"), (el[(el.AdoptedStyleSheet = 15)] = "AdoptedStyleSheet"), (el[(el.CustomElement = 16)] = "CustomElement"), el), t_ = { DEBUG: !1, LIB_VERSION: "2.56.0" }; if ("undefined" == typeof window) { var tg = { hostname: "" }; eO = { navigator: { userAgent: "", onLine: !0 }, document: { location: tg, referrer: "" }, screen: { width: 0, height: 0 }, location: tg, }; } else eO = window; var tm = Array.prototype, ty = Function.prototype, tv = Object.prototype, tb = tm.slice, tS = tv.toString, tk = tv.hasOwnProperty, tw = eO.console, tM = eO.navigator, tI = eO.document, tE = eO.opera, tx = eO.screen, tC = tM.userAgent, tO = ty.bind, tT = tm.forEach, tR = tm.indexOf, tD = tm.map, tN = Array.isArray, tA = {}, tq = { trim: function (e) { return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); }, }, tL = { log: function () { if (t_.DEBUG && !tq.isUndefined(tw) && tw) try { tw.log.apply(tw, arguments); } catch (e) { tq.each(arguments, function (e) { tw.log(e); }); } }, warn: function () { if (t_.DEBUG && !tq.isUndefined(tw) && tw) { var e = ["Mixpanel warning:"].concat(tq.toArray(arguments)); try { tw.warn.apply(tw, e); } catch (t) { tq.each(e, function (e) { tw.warn(e); }); } } }, error: function () { if (t_.DEBUG && !tq.isUndefined(tw) && tw) { var e = ["Mixpanel error:"].concat(tq.toArray(arguments)); try { tw.error.apply(tw, e); } catch (t) { tq.each(e, function (e) { tw.error(e); }); } } }, critical: function () { if (!tq.isUndefined(tw) && tw) { var e = ["Mixpanel error:"].concat(tq.toArray(arguments)); try { tw.error.apply(tw, e); } catch (t) { tq.each(e, function (e) { tw.error(e); }); } } }, }, tP = function (e, t) { return function () { return ( (arguments[0] = "[" + t + "] " + arguments[0]), e.apply(tL, arguments) ); }; }, tF = function (e) { return { log: tP(tL.log, e), error: tP(tL.error, e), critical: tP(tL.critical, e), }; }; (tq.bind = function (e, t) { var r, i; if (tO && e.bind === tO) return tO.apply(e, tb.call(arguments, 1)); if (!tq.isFunction(e)) throw TypeError(); return ( (r = tb.call(arguments, 2)), (i = function () { if (!(this instanceof i)) return e.apply(t, r.concat(tb.call(arguments))); var o = {}; o.prototype = e.prototype; var n = new o(); o.prototype = null; var s = e.apply(n, r.concat(tb.call(arguments))); return Object(s) === s ? s : n; }) ); }), (tq.each = function (e, t, r) { if (null != e) { if (tT && e.forEach === tT) e.forEach(t, r); else if (e.length === +e.length) { for (var i = 0, o = e.length; i < o; i++) if (i in e && t.call(r, e[i], i, e) === tA) return; } else for (var n in e) if (tk.call(e, n) && t.call(r, e[n], n, e) === tA) return; } }), (tq.extend = function (e) { return ( tq.each(tb.call(arguments, 1), function (t) { for (var r in t) void 0 !== t[r] && (e[r] = t[r]); }), e ); }), (tq.isArray = tN || function (e) { return "[object Array]" === tS.call(e); }), (tq.isFunction = function (e) { try { return /^\s*\bfunction\b/.test(e); } catch (e) { return !1; } }), (tq.isArguments = function (e) { return !!(e && tk.call(e, "callee")); }), (tq.toArray = function (e) { return e ? e.toArray ? e.toArray() : tq.isArray(e) || tq.isArguments(e) ? tb.call(e) : tq.values(e) : []; }), (tq.map = function (e, t, r) { if (tD && e.map === tD) return e.map(t, r); var i = []; return ( tq.each(e, function (e) { i.push(t.call(r, e)); }), i ); }), (tq.keys = function (e) { var t = []; return ( null === e || tq.each(e, function (e, r) { t[t.length] = r; }), t ); }), (tq.values = function (e) { var t = []; return ( null === e || tq.each(e, function (e) { t[t.length] = e; }), t ); }), (tq.include = function (e, t) { var r = !1; return null === e ? r : tR && e.indexOf === tR ? -1 != e.indexOf(t) : (tq.each(e, function (e) { if (r || (r = e === t)) return tA; }), r); }), (tq.includes = function (e, t) { return -1 !== e.indexOf(t); }), (tq.inherit = function (e, t) { return ( (e.prototype = new t()), (e.prototype.constructor = e), (e.superclass = t.prototype), e ); }), (tq.isObject = function (e) { return e === Object(e) && !tq.isArray(e); }), (tq.isEmptyObject = function (e) { if (tq.isObject(e)) { for (var t in e) if (tk.call(e, t)) return !1; return !0; } return !1; }), (tq.isUndefined = function (e) { return void 0 === e; }), (tq.isString = function (e) { return "[object String]" == tS.call(e); }), (tq.isDate = function (e) { return "[object Date]" == tS.call(e); }), (tq.isNumber = function (e) { return "[object Number]" == tS.call(e); }), (tq.isElement = function (e) { return !!(e && 1 === e.nodeType); }), (tq.encodeDates = function (e) { return ( tq.each(e, function (t, r) { tq.isDate(t) ? (e[r] = tq.formatDate(t)) : tq.isObject(t) && (e[r] = tq.encodeDates(t)); }), e ); }), (tq.timestamp = function () { return ( (Date.now = Date.now || function () { return +new Date(); }), Date.now() ); }), (tq.formatDate = function (e) { function t(e) { return e < 10 ? "0" + e : e; } return ( e.getUTCFullYear() + "-" + t(e.getUTCMonth() + 1) + "-" + t(e.getUTCDate()) + "T" + t(e.getUTCHours()) + ":" + t(e.getUTCMinutes()) + ":" + t(e.getUTCSeconds()) ); }), (tq.strip_empty_properties = function (e) { var t = {}; return ( tq.each(e, function (e, r) { tq.isString(e) && e.length > 0 && (t[r] = e); }), t ); }), (tq.truncate = function (e, t) { var r; return ( "string" == typeof e ? (r = e.slice(0, t)) : tq.isArray(e) ? ((r = []), tq.each(e, function (e) { r.push(tq.truncate(e, t)); })) : tq.isObject(e) ? ((r = {}), tq.each(e, function (e, i) { r[i] = tq.truncate(e, t); })) : (r = e), r ); }), (tq.JSONEncode = function (e) { var t = function (e) { var t = /[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, r = { "\b": "\\b", " ": "\\t", "\n": "\\n", "\f": "\\f", "\r": "\\r", '"': '\\"', "\\": "\\\\", }; return ( (t.lastIndex = 0), t.test(e) ? '"' + e.replace(t, function (e) { var t = r[e]; return "string" == typeof t ? t : "\\u" + ("0000" + e.charCodeAt(0).toString(16)).slice(-4); }) + '"' : '"' + e + '"' ); }, r = function (e, i) { var o = "", n = 0, s = "", a = "", c = 0, u = o, l = [], p = i[e]; switch ( (p && "object" == typeof p && "function" == typeof p.toJSON && (p = p.toJSON(e)), typeof p) ) { case "string": return t(p); case "number": return isFinite(p) ? String(p) : "null"; case "boolean": case "null": return String(p); case "object": if (!p) return "null"; if ( ((o += " "), (l = []), "[object Array]" === tS.apply(p)) ) { for (n = 0, c = p.length; n < c; n += 1) l[n] = r(n, p) || "null"; return ( (a = 0 === l.length ? "[]" : o ? "[\n" + o + l.join(",\n" + o) + "\n" + u + "]" : "[" + l.join(",") + "]"), (o = u), a ); } for (s in p) tk.call(p, s) && (a = r(s, p)) && l.push(t(s) + (o ? ": " : ":") + a); return ( (a = 0 === l.length ? "{}" : o ? "{" + l.join(",") + u + "}" : "{" + l.join(",") + "}"), (o = u), a ); } }; return r("", { "": e }); }), (tq.JSONDecode = ((e_ = { '"': '"', "\\": "\\", "/": "/", b: "\b", f: "\f", n: "\n", r: "\r", t: " ", }), (eg = function (e) { var t = SyntaxError(e); throw ((t.at = ep), (t.text = ed), t); }), (em = function (e) { return ( e && e !== eh && eg("Expected '" + e + "' instead of '" + eh + "'"), (eh = ed.charAt(ep)), (ep += 1), eh ); }), (ey = function () { var e, t = ""; for ("-" === eh && ((t = "-"), em("-")); eh >= "0" && eh <= "9"; ) (t += eh), em(); if ("." === eh) for (t += "."; em() && eh >= "0" && eh <= "9"; ) t += eh; if ("e" === eh || "E" === eh) for ( t += eh, em(), ("-" === eh || "+" === eh) && ((t += eh), em()); eh >= "0" && eh <= "9"; ) (t += eh), em(); if (isFinite((e = +t))) return e; eg("Bad number"); }), (ev = function () { var e, t, r, i = ""; if ('"' === eh) for (; em(); ) { if ('"' === eh) return em(), i; if ("\\" === eh) { if ((em(), "u" === eh)) { for ( t = 0, r = 0; t < 4 && isFinite((e = parseInt(em(), 16))); t += 1 ) r = 16 * r + e; i += String.fromCharCode(r); } else if ("string" == typeof e_[eh]) i += e_[eh]; else break; } else i += eh; } eg("Bad string"); }), (eb = function () { for (; eh && eh <= " "; ) em(); }), (eS = function () { switch (eh) { case "t": return em("t"), em("r"), em("u"), em("e"), !0; case "f": return em("f"), em("a"), em("l"), em("s"), em("e"), !1; case "n": return em("n"), em("u"), em("l"), em("l"), null; } eg('Unexpected "' + eh + '"'); }), (ek = function () { var e = []; if ("[" === eh) { if ((em("["), eb(), "]" === eh)) return em("]"), e; for (; eh; ) { if ((e.push(ef()), eb(), "]" === eh)) return em("]"), e; em(","), eb(); } } eg("Bad array"); }), (ew = function () { var e, t = {}; if ("{" === eh) { if ((em("{"), eb(), "}" === eh)) return em("}"), t; for (; eh; ) { if ( ((e = ev()), eb(), em(":"), Object.hasOwnProperty.call(t, e) && eg('Duplicate key "' + e + '"'), (t[e] = ef()), eb(), "}" === eh) ) return em("}"), t; em(","), eb(); } } eg("Bad object"); }), (ef = function () { switch ((eb(), eh)) { case "{": return ew(); case "[": return ek(); case '"': return ev(); case "-": return ey(); default: return eh >= "0" && eh <= "9" ? ey() : eS(); } }), function (e) { var t; return ( (ed = e), (ep = 0), (eh = " "), (t = ef()), eb(), eh && eg("Syntax error"), t ); })), (tq.base64Encode = function (e) { var t, r, i, o, n, s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", a = 0, c = 0, u = "", l = []; if (!e) return e; e = tq.utf8Encode(e); do (t = ((n = (e.charCodeAt(a++) << 16) | (e.charCodeAt(a++) << 8) | e.charCodeAt(a++)) >> 18) & 63), (r = (n >> 12) & 63), (i = (n >> 6) & 63), (o = 63 & n), (l[c++] = s.charAt(t) + s.charAt(r) + s.charAt(i) + s.charAt(o)); while (a < e.length); switch (((u = l.join("")), e.length % 3)) { case 1: u = u.slice(0, -2) + "=="; break; case 2: u = u.slice(0, -1) + "="; } return u; }), (tq.utf8Encode = function (e) { e = (e + "").replace(/\r\n/g, "\n").replace(/\r/g, "\n"); var t, r, i, o = "", n = 0; for (i = 0, t = r = 0, n = e.length; i < n; i++) { var s = e.charCodeAt(i), a = null; s < 128 ? r++ : (a = s > 127 && s < 2048 ? String.fromCharCode((s >> 6) | 192, (63 & s) | 128) : String.fromCharCode( (s >> 12) | 224, ((s >> 6) & 63) | 128, (63 & s) | 128 )), null !== a && (r > t && (o += e.substring(t, r)), (o += a), (t = r = i + 1)); } return r > t && (o += e.substring(t, e.length)), o; }), (tq.UUID = ((eM = function () { var e, t = 1 * new Date(); if (eO.performance && eO.performance.now) e = eO.performance.now(); else for (e = 0; t == 1 * new Date(); ) e++; return t.toString(16) + Math.floor(e).toString(16); }), (eI = function () { var e, t, r = [], i = 0; function o(e, t) { var i, o = 0; for (i = 0; i < t.length; i++) o |= r[i] << (8 * i); return e ^ o; } for (e = 0; e < tC.length; e++) (t = tC.charCodeAt(e)), r.unshift(255 & t), r.length >= 4 && ((i = o(i, r)), (r = [])); return r.length > 0 && (i = o(i, r)), i.toString(16); }), function () { var e = (tx.height * tx.width).toString(16); return ( eM() + "-" + Math.random().toString(16).replace(".", "") + "-" + eI() + "-" + e + "-" + eM() ); })); var tU = [ "ahrefsbot", "ahrefssiteaudit", "baiduspider", "bingbot", "bingpreview", "chrome-lighthouse", "facebookexternal", "petalbot", "pinterest", "screaming frog", "yahoo! slurp", "yandexbot", "adsbot-google", "apis-google", "duplexweb-google", "feedfetcher-google", "google favicon", "google web preview", "google-read-aloud", "googlebot", "googleweblight", "mediapartners-google", "storebot-google", ]; (tq.isBlockedUA = function (e) { var t; for (t = 0, e = e.toLowerCase(); t < tU.length; t++) if (-1 !== e.indexOf(tU[t])) return !0; return !1; }), (tq.HTTPBuildQuery = function (e, t) { var r, i, o = []; return ( tq.isUndefined(t) && (t = "&"), tq.each(e, function (e, t) { (r = encodeURIComponent(e.toString())), (i = encodeURIComponent(t)), (o[o.length] = i + "=" + r); }), o.join(t) ); }), (tq.getQueryParam = function (e, t) { var r = RegExp( "[\\?&]" + (t = t.replace(/[[]/g, "\\[").replace(/[\]]/g, "\\]")) + "=([^&#]*)" ).exec(e); if (null === r || (r && "string" != typeof r[1] && r[1].length)) return ""; var i = r[1]; try { i = decodeURIComponent(i); } catch (e) { tL.error("Skipping decoding for malformed query param: " + i); } return i.replace(/\+/g, " "); }), (tq.cookie = { get: function (e) { for ( var t = e + "=", r = tI.cookie.split(";"), i = 0; i < r.length; i++ ) { for (var o = r[i]; " " == o.charAt(0); ) o = o.substring(1, o.length); if (0 === o.indexOf(t)) return decodeURIComponent(o.substring(t.length, o.length)); } return null; }, parse: function (e) { var t; try { t = tq.JSONDecode(tq.cookie.get(e)) || {}; } catch (e) {} return t; }, set_seconds: function (e, t, r, i, o, n, s) { var a = "", c = "", u = ""; if (s) a = "; domain=" + s; else if (i) { var l = tJ(tI.location.hostname); a = l ? "; domain=." + l : ""; } if (r) { var p = new Date(); p.setTime(p.getTime() + 1e3 * r), (c = "; expires=" + p.toGMTString()); } n && ((o = !0), (u = "; SameSite=None")), o && (u += "; secure"), (tI.cookie = e + "=" + encodeURIComponent(t) + c + "; path=/" + a + u); }, set: function (e, t, r, i, o, n, s) { var a = "", c = "", u = ""; if (s) a = "; domain=" + s; else if (i) { var l = tJ(tI.location.hostname); a = l ? "; domain=." + l : ""; } if (r) { var p = new Date(); p.setTime(p.getTime() + 864e5 * r), (c = "; expires=" + p.toGMTString()); } n && ((o = !0), (u = "; SameSite=None")), o && (u += "; secure"); var h = e + "=" + encodeURIComponent(t) + c + "; path=/" + a + u; return (tI.cookie = h), h; }, remove: function (e, t, r) { tq.cookie.set(e, "", -1, t, !1, !1, r); }, }); var tj = null, tB = function (e, t) { if (null !== tj && !t) return tj; var r = !0; try { e = e || window.localStorage; var i = "__mplss_" + tV(8); e.setItem(i, "xyz"), "xyz" !== e.getItem(i) && (r = !1), e.removeItem(i); } catch (e) { r = !1; } return (tj = r), r; }; (tq.localStorage = { is_supported: function (e) { var t = tB(null, e); return ( t || tL.error( "localStorage unsupported; falling back to cookie store" ), t ); }, error: function (e) { tL.error("localStorage error: " + e); }, get: function (e) { try { return window.localStorage.getItem(e); } catch (e) { tq.localStorage.error(e); } return null; }, parse: function (e) { try { return tq.JSONDecode(tq.localStorage.get(e)) || {}; } catch (e) {} return null; }, set: function (e, t) { try { window.localStorage.setItem(e, t); } catch (e) { tq.localStorage.error(e); } }, remove: function (e) { try { window.localStorage.removeItem(e); } catch (e) { tq.localStorage.error(e); } }, }), (tq.register_event = (function () { function e(t) { return ( t && ((t.preventDefault = e.preventDefault), (t.stopPropagation = e.stopPropagation)), t ); } return ( (e.preventDefault = function () { this.returnValue = !1; }), (e.stopPropagation = function () { this.cancelBubble = !0; }), function (t, r, i, o, n) { if (!t) { tL.error("No valid element provided to register_event"); return; } if (t.addEventListener && !o) t.addEventListener(r, i, !!n); else { var s = "on" + r, a = t[s]; t[s] = function (r) { if ((r = r || e(window.event))) { var o, n, s = !0; return ( tq.isFunction(a) && (o = a(r)), (n = i.call(t, r)), (!1 === o || !1 === n) && (s = !1), s ); } }; } } ); })()); var t$ = RegExp( '^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$' ); tq.dom_query = (function () { function e(e) { return e.all ? e.all : e.getElementsByTagName("*"); } var t = /[\t\r\n]/g; function r(r) { if (!tI.getElementsByTagName) return []; var i = r.split(" "), o = [tI]; for (f = 0; f < i.length; f++) { if ( (u = i[f].replace(/^\s+/, "").replace(/\s+$/, "")).indexOf("#") > -1 ) { p = (l = u.split("#"))[0]; var n = l[1], s = tI.getElementById(n); if (!s || (p && s.nodeName.toLowerCase() != p)) return []; o = [s]; continue; } if (u.indexOf(".") > -1) { p = (l = u.split("."))[0]; var a = l[1]; for (p || (p = "*"), h = [], d = 0, _ = 0; _ < o.length; _++) for ( g = 0, m = "*" == p ? e(o[_]) : o[_].getElementsByTagName(p); g < m.length; g++ ) h[d++] = m[g]; for (_ = 0, o = [], y = 0; _ < h.length; _++) h[_].className && tq.isString(h[_].className) && (" " + h[_].className + " ") .replace(t, " ") .indexOf(" " + a + " ") >= 0 && (o[y++] = h[_]); continue; } var c = u.match(t$); if (c) { p = c[1]; var u, l, p, h, d, f, _, g, m, y, v, b = c[2], S = c[3], k = c[4]; for (p || (p = "*"), h = [], d = 0, _ = 0; _ < o.length; _++) for ( g = 0, m = "*" == p ? e(o[_]) : o[_].getElementsByTagName(p); g < m.length; g++ ) h[d++] = m[g]; switch (((o = []), (y = 0), S)) { case "=": v = function (e) { return e.getAttribute(b) == k; }; break; case "~": v = function (e) { return e.getAttribute(b).match(RegExp("\\b" + k + "\\b")); }; break; case "|": v = function (e) { return e.getAttribute(b).match(RegExp("^" + k + "-?")); }; break; case "^": v = function (e) { return 0 === e.getAttribute(b).indexOf(k); }; break; case "$": v = function (e) { return ( e.getAttribute(b).lastIndexOf(k) == e.getAttribute(b).length - k.length ); }; break; case "*": v = function (e) { return e.getAttribute(b).indexOf(k) > -1; }; break; default: v = function (e) { return e.getAttribute(b); }; } for (_ = 0, o = [], y = 0; _ < h.length; _++) v(h[_]) && (o[y++] = h[_]); continue; } for (_ = 0, p = u, h = [], d = 0; _ < o.length; _++) for (g = 0, m = o[_].getElementsByTagName(p); g < m.length; g++) h[d++] = m[g]; o = h; } return o; } return function (e) { return tq.isElement(e) ? [e] : tq.isObject(e) && !tq.isUndefined(e.length) ? e : r.call(this, e); }; })(); var tz = [ "utm_source", "utm_medium", "utm_campaign", "utm_content", "utm_term", "utm_id", "utm_source_platform", "utm_campaign_id", "utm_creative_format", "utm_marketing_tactic", ], tW = [ "dclid", "fbclid", "gclid", "ko_click_id", "li_fat_id", "msclkid", "sccid", "ttclid", "twclid", "wbraid", ]; tq.info = { campaignParams: function (e) { var t = "", r = {}; return ( tq.each(tz, function (i) { (t = tq.getQueryParam(tI.URL, i)).length ? (r[i] = t) : void 0 !== e && (r[i] = e); }), r ); }, clickParams: function () { var e = "", t = {}; return ( tq.each(tW, function (r) { (e = tq.getQueryParam(tI.URL, r)).length && (t[r] = e); }), t ); }, marketingParams: function () { return tq.extend(tq.info.campaignParams(), tq.info.clickParams()); }, searchEngine: function (e) { return 0 === e.search("https?://(.*)google.([^/?]*)") ? "google" : 0 === e.search("https?://(.*)bing.com") ? "bing" : 0 === e.search("https?://(.*)yahoo.com") ? "yahoo" : 0 === e.search("https?://(.*)duckduckgo.com") ? "duckduckgo" : null; }, searchInfo: function (e) { var t = tq.info.searchEngine(e), r = {}; if (null !== t) { r.$search_engine = t; var i = tq.getQueryParam(e, "yahoo" != t ? "q" : "p"); i.length && (r.mp_keyword = i); } return r; }, browser: function (e, t, r) { if (((t = t || ""), r || tq.includes(e, " OPR/"))) return tq.includes(e, "Mini") ? "Opera Mini" : "Opera"; if (/(BlackBerry|PlayBook|BB10)/i.test(e)) return "BlackBerry"; if (tq.includes(e, "IEMobile") || tq.includes(e, "WPDesktop")) return "Internet Explorer Mobile"; if (tq.includes(e, "SamsungBrowser/")) return "Samsung Internet"; if (tq.includes(e, "Edge") || tq.includes(e, "Edg/")) return "Microsoft Edge"; if (tq.includes(e, "FBIOS")) return "Facebook Mobile"; if (tq.includes(e, "Chrome")) return "Chrome"; else if (tq.includes(e, "CriOS")) return "Chrome iOS"; else if (tq.includes(e, "UCWEB") || tq.includes(e, "UCBrowser")) return "UC Browser"; else if (tq.includes(e, "FxiOS")) return "Firefox iOS"; else if (tq.includes(t, "Apple")) return tq.includes(e, "Mobile") ? "Mobile Safari" : "Safari"; else if (tq.includes(e, "Android")) return "Android Mobile"; else if (tq.includes(e, "Konqueror")) return "Konqueror"; else if (tq.includes(e, "Firefox")) return "Firefox"; else if (tq.includes(e, "MSIE") || tq.includes(e, "Trident/")) return "Internet Explorer"; else if (tq.includes(e, "Gecko")) return "Mozilla"; else return ""; }, browserVersion: function (e, t, r) { var i = { "Internet Explorer Mobile": /rv:(\d+(\.\d+)?)/, "Microsoft Edge": /Edge?\/(\d+(\.\d+)?)/, Chrome: /Chrome\/(\d+(\.\d+)?)/, "Chrome iOS": /CriOS\/(\d+(\.\d+)?)/, "UC Browser": /(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/, Safari: /Version\/(\d+(\.\d+)?)/, "Mobile Safari": /Version\/(\d+(\.\d+)?)/, Opera: /(Opera|OPR)\/(\d+(\.\d+)?)/, Firefox: /Firefox\/(\d+(\.\d+)?)/, "Firefox iOS": /FxiOS\/(\d+(\.\d+)?)/, Konqueror: /Konqueror:(\d+(\.\d+)?)/, BlackBerry: /BlackBerry (\d+(\.\d+)?)/, "Android Mobile": /android\s(\d+(\.\d+)?)/, "Samsung Internet": /SamsungBrowser\/(\d+(\.\d+)?)/, "Internet Explorer": /(rv:|MSIE )(\d+(\.\d+)?)/, Mozilla: /rv:(\d+(\.\d+)?)/, }[tq.info.browser(e, t, r)]; if (void 0 === i) return null; var o = e.match(i); return o ? parseFloat(o[o.length - 2]) : null; }, os: function () { if (/Windows/i.test(tC)) return /Phone/.test(tC) || /WPDesktop/.test(tC) ? "Windows Phone" : "Windows"; if (/(iPhone|iPad|iPod)/.test(tC)) return "iOS"; if (/Android/.test(tC)) return "Android"; if (/(BlackBerry|PlayBook|BB10)/i.test(tC)) return "BlackBerry"; if (/Mac/i.test(tC)) return "Mac OS X"; if (/Linux/.test(tC)) return "Linux"; if (/CrOS/.test(tC)) return "Chrome OS"; else return ""; }, device: function (e) { return /Windows Phone/i.test(e) || /WPDesktop/.test(e) ? "Windows Phone" : /iPad/.test(e) ? "iPad" : /iPod/.test(e) ? "iPod Touch" : /iPhone/.test(e) ? "iPhone" : /(BlackBerry|PlayBook|BB10)/i.test(e) ? "BlackBerry" : /Android/.test(e) ? "Android" : ""; }, referringDomain: function (e) { var t = e.split("/"); return t.length >= 3 ? t[2] : ""; }, currentUrl: function () { return eO.location.href; }, properties: function (e) { return ( "object" != typeof e && (e = {}), tq.extend( tq.strip_empty_properties({ $os: tq.info.os(), $browser: tq.info.browser(tC, tM.vendor, tE), $referrer: tI.referrer, $referring_domain: tq.info.referringDomain(tI.referrer), $device: tq.info.device(tC), }), { $current_url: tq.info.currentUrl(), $browser_version: tq.info.browserVersion(tC, tM.vendor, tE), $screen_height: tx.height, $screen_width: tx.width, mp_lib: "web", $lib_version: t_.LIB_VERSION, $insert_id: tV(), time: tq.timestamp() / 1e3, }, tq.strip_empty_properties(e) ) ); }, people_properties: function () { return tq.extend( tq.strip_empty_properties({ $os: tq.info.os(), $browser: tq.info.browser(tC, tM.vendor, tE), }), { $browser_version: tq.info.browserVersion(tC, tM.vendor, tE) } ); }, mpPageViewProperties: function () { return tq.strip_empty_properties({ current_page_title: tI.title, current_domain: eO.location.hostname, current_url_path: eO.location.pathname, current_url_protocol: eO.location.protocol, current_url_search: eO.location.search, }); }, }; var tV = function (e) { var t = Math.random().toString(36).substring(2, 10) + Math.random().toString(36).substring(2, 10); return e ? t.substring(0, e) : t; }, tH = /[a-z0-9][a-z0-9-]*\.[a-z]+$/i, tG = /[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i, tJ = function (e) { var t = tG, r = e.split("."), i = r[r.length - 1]; (i.length > 4 || "com" === i || "org" === i) && (t = tH); var o = e.match(t); return o ? o[0] : ""; }, tQ = function () { var e = eO.navigator.onLine; return tq.isUndefined(e) || e; }, tK = null, tX = null; function tY(e, t) { t7(!0, e, t); } function tZ(e, t) { t7(!1, e, t); } function t0(e, t) { return "1" === t9(e, t); } function t1(e, t) { if ( (function (e) { if (e && e.ignoreDnt) return !1; var t = (e && e.window) || eO, r = t.navigator || {}, i = !1; return ( tq.each( [r.doNotTrack, r.msDoNotTrack, t.doNotTrack], function (e) { tq.includes([!0, 1, "1", "yes"], e) && (i = !0); } ), i ); })(t) ) return ( tL.warn( 'This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"' ), !0 ); var r = "0" === t9(e, t); return ( r && tL.warn( "You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data." ), r ); } function t2(e) { return re(e, function (e) { return this.get_config(e); }); } function t3(e) { return re(e, function (e) { return this._get_config(e); }); } function t6(e) { return re(e, function (e) { return this._get_config(e); }); } function t4(e, t) { t5((t = t || {})).remove( t8(e, t), !!t.crossSubdomainCookie, t.cookieDomain ); } function t5(e) { return "localStorage" === (e = e || {}).persistenceType ? tq.localStorage : tq.cookie; } function t8(e, t) { return ((t = t || {}).persistencePrefix || "__mp_opt_in_out_") + e; } function t9(e, t) { return t5(t).get(t8(e, t)); } function t7(e, t, r) { if (!tq.isString(t) || !t.length) { tL.error( "gdpr." + (e ? "optIn" : "optOut") + " called with an invalid token" ); return; } t5((r = r || {})).set( t8(t, r), e ? 1 : 0, tq.isNumber(r.cookieExpiration) ? r.cookieExpiration : null, !!r.crossSubdomainCookie, !!r.secureCookie, !!r.crossSiteCookie, r.cookieDomain ), r.track && e && r.track(r.trackEventName || "$opt_in", r.trackProperties, { send_immediately: !0, }); } function re(e, t) { return function () { var r = !1; try { var i = t.call(this, "token"), o = t.call(this, "ignore_dnt"), n = t.call(this, "opt_out_tracking_persistence_type"), s = t.call(this, "opt_out_tracking_cookie_prefix"), a = t.call(this, "window"); i && (r = t1(i, { ignoreDnt: o, persistenceType: n, persistencePrefix: s, window: a, })); } catch (e) { tL.error( "Unexpected error when checking tracking opt-out status: " + e ); } if (!r) return e.apply(this, arguments); var c = arguments[arguments.length - 1]; "function" == typeof c && c(0); }; } "undefined" != typeof JSON && ((tK = JSON.stringify), (tX = JSON.parse)), (tK = tK || tq.JSONEncode), (tX = tX || tq.JSONDecode), (tq.toArray = tq.toArray), (tq.isObject = tq.isObject), (tq.JSONEncode = tq.JSONEncode), (tq.JSONDecode = tq.JSONDecode), (tq.isBlockedUA = tq.isBlockedUA), (tq.isEmptyObject = tq.isEmptyObject), (tq.info = tq.info), (tq.info.device = tq.info.device), (tq.info.browser = tq.info.browser), (tq.info.browserVersion = tq.info.browserVersion), (tq.info.properties = tq.info.properties); var rt = tF("lock"), rr = function (e, t) { (t = t || {}), (this.storageKey = e), (this.storage = t.storage || window.localStorage), (this.pollIntervalMS = t.pollIntervalMS || 100), (this.timeoutMS = t.timeoutMS || 2e3); }; rr.prototype.withLock = function (e, t, r) { r || "function" == typeof t || ((r = t), (t = null)); var i = r || new Date().getTime() + "|" + Math.random(), o = new Date().getTime(), n = this.storageKey, s = this.pollIntervalMS, a = this.timeoutMS, c = this.storage, u = n + ":X", l = n + ":Y", p = n + ":Z", h = function (e) { t && t(e); }, d = function (e) { if (new Date().getTime() - o > a) { rt.error( "Timeout waiting for mutex on " + n + "; clearing lock. [" + i + "]" ), c.removeItem(p), c.removeItem(l), g(); return; } setTimeout(function () { try { e(); } catch (e) { h(e); } }, s * (Math.random() + 0.1)); }, f = function (e, t) { e() ? t() : d(function () { f(e, t); }); }, _ = function () { var e = c.getItem(l); if (e && e !== i) return !1; if ((c.setItem(l, i), c.getItem(l) === i)) return !0; if (!tB(c, !0)) throw Error("localStorage support dropped while acquiring lock"); return !1; }, g = function () { c.setItem(u, i), f(_, function () { if (c.getItem(u) === i) { m(); return; } d(function () { if (c.getItem(l) !== i) { g(); return; } f(function () { return !c.getItem(p); }, m); }); }); }, m = function () { c.setItem(p, "1"); try { e(); } finally { c.removeItem(p), c.getItem(l) === i && c.removeItem(l), c.getItem(u) === i && c.removeItem(u); } }; try { if (tB(c, !0)) g(); else throw Error("localStorage support check failed"); } catch (e) { h(e); } }; var ri = tF("batch"), ro = function (e, t) { (t = t || {}), (this.storageKey = e), (this.usePersistence = t.usePersistence), this.usePersistence && ((this.storage = t.storage || window.localStorage), (this.lock = new rr(e, { storage: this.storage }))), (this.reportError = t.errorReporter || tq.bind(ri.error, ri)), (this.pid = t.pid || null), (this.memQueue = []); }; (ro.prototype.enqueue = function (e, t, r) { var i = { id: tV(), flushAfter: new Date().getTime() + 2 * t, payload: e, }; this.usePersistence ? this.lock.withLock( tq.bind(function () { var t; try { var o = this.readFromStorage(); o.push(i), (t = this.saveToStorage(o)) && this.memQueue.push(i); } catch (r) { this.reportError("Error enqueueing item", e), (t = !1); } r && r(t); }, this), tq.bind(function (e) { this.reportError("Error acquiring storage lock", e), r && r(!1); }, this), this.pid ) : (this.memQueue.push(i), r && r(!0)); }), (ro.prototype.fillBatch = function (e) { var t = this.memQueue.slice(0, e); if (this.usePersistence && t.length < e) { var r = this.readFromStorage(); if (r.length) { var i = {}; tq.each(t, function (e) { i[e.id] = !0; }); for (var o = 0; o < r.length; o++) { var n = r[o]; if ( new Date().getTime() > n.flushAfter && !i[n.id] && ((n.orphaned = !0), t.push(n), t.length >= e) ) break; } } } return t; }); var rn = function (e, t) { var r = []; return ( tq.each(e, function (e) { e.id && !t[e.id] && r.push(e); }), r ); }; ro.prototype.removeItemsByID = function (e, t) { var r = {}; if ( (tq.each(e, function (e) { r[e] = !0; }), (this.memQueue = rn(this.memQueue, r)), this.usePersistence) ) { var i = tq.bind(function () { var t; try { var i = this.readFromStorage(); if (((i = rn(i, r)), (t = this.saveToStorage(i)))) { i = this.readFromStorage(); for (var o = 0; o < i.length; o++) { var n = i[o]; if (n.id && r[n.id]) return ( this.reportError("Item not removed from storage"), !1 ); } } } catch (r) { this.reportError("Error removing items", e), (t = !1); } return t; }, this); this.lock.withLock( function () { var e = i(); t && t(e); }, tq.bind(function (e) { var r = !1; if ( (this.reportError("Error acquiring storage lock", e), !tB(this.storage, !0) && !(r = i())) ) try { this.storage.removeItem(this.storageKey); } catch (e) { this.reportError("Error clearing queue", e); } t && t(r); }, this), this.pid ); } else t && t(!0); }; var rs = function (e, t) { var r = []; return ( tq.each(e, function (e) { var i = e.id; if (i in t) { var o = t[i]; null !== o && ((e.payload = o), r.push(e)); } else r.push(e); }), r ); }; (ro.prototype.updatePayloads = function (e, t) { (this.memQueue = rs(this.memQueue, e)), this.usePersistence ? this.lock.withLock( tq.bind(function () { var r; try { var i = this.readFromStorage(); (i = rs(i, e)), (r = this.saveToStorage(i)); } catch (t) { this.reportError("Error updating items", e), (r = !1); } t && t(r); }, this), tq.bind(function (e) { this.reportError("Error acquiring storage lock", e), t && t(!1); }, this), this.pid ) : t && t(!0); }), (ro.prototype.readFromStorage = function () { var e; try { (e = this.storage.getItem(this.storageKey)) && ((e = tX(e)), tq.isArray(e) || (this.reportError("Invalid storage entry:", e), (e = null))); } catch (t) { this.reportError("Error retrieving queue", t), (e = null); } return e || []; }), (ro.prototype.saveToStorage = function (e) { try { return this.storage.setItem(this.storageKey, tK(e)), !0; } catch (e) { return this.reportError("Error saving queue", e), !1; } }), (ro.prototype.clear = function () { (this.memQueue = []), this.usePersistence && this.storage.removeItem(this.storageKey); }); var ra = tF("batch"), rc = function (e, t) { (this.errorReporter = t.errorReporter), (this.queue = new ro(e, { errorReporter: tq.bind(this.reportError, this), storage: t.storage, usePersistence: t.usePersistence, })), (this.libConfig = t.libConfig), (this.sendRequest = t.sendRequestFunc), (this.beforeSendHook = t.beforeSendHook), (this.stopAllBatching = t.stopAllBatchingFunc), (this.batchSize = this.libConfig.batch_size), (this.flushInterval = this.libConfig.batch_flush_interval_ms), (this.stopped = !this.libConfig.batch_autostart), (this.consecutiveRemovalFailures = 0), (this.itemIdsSentSuccessfully = {}), (this.flushOnlyOnInterval = t.flushOnlyOnInterval || !1); }; (rc.prototype.enqueue = function (e, t) { this.queue.enqueue(e, this.flushInterval, t); }), (rc.prototype.start = function () { (this.stopped = !1), (this.consecutiveRemovalFailures = 0), this.flush(); }), (rc.prototype.stop = function () { (this.stopped = !0), this.timeoutID && (clearTimeout(this.timeoutID), (this.timeoutID = null)); }), (rc.prototype.clear = function () { this.queue.clear(); }), (rc.prototype.resetBatchSize = function () { this.batchSize = this.libConfig.batch_size; }), (rc.prototype.resetFlush = function () { this.scheduleFlush(this.libConfig.batch_flush_interval_ms); }), (rc.prototype.scheduleFlush = function (e) { (this.flushInterval = e), this.stopped || (this.timeoutID = setTimeout( tq.bind(function () { this.stopped || this.flush(); }, this), this.flushInterval )); }), (rc.prototype.flush = function (e) { try { if (this.requestInProgress) { ra.log("Flush: Request already in progress"); return; } e = e || {}; var t = this.libConfig.batch_request_timeout_ms, r = new Date().getTime(), i = this.batchSize, o = this.queue.fillBatch(i), n = o.length === i, s = [], a = {}; if ( (tq.each( o, function (e) { var t = e.payload; if ( (this.beforeSendHook && !e.orphaned && (t = this.beforeSendHook(t)), t) ) { t.event && t.properties && (t.properties = tq.extend({}, t.properties, { mp_sent_by_lib_version: t_.LIB_VERSION, })); var r = !0, i = e.id; i ? (this.itemIdsSentSuccessfully[i] || 0) > 5 && (this.reportError( "[dupe] item ID sent too many times, not sending", { item: e, batchSize: o.length, timesSent: this.itemIdsSentSuccessfully[i], } ), (r = !1)) : this.reportError("[dupe] found item with no ID", { item: e, }), r && s.push(t); } a[e.id] = t; }, this ), s.length < 1) ) { this.resetFlush(); return; } this.requestInProgress = !0; var c = tq.bind(function (s) { this.requestInProgress = !1; try { var c = !1; if (e.unloading) this.queue.updatePayloads(a); else if ( tq.isObject(s) && "timeout" === s.error && new Date().getTime() - r >= t ) this.reportError("Network timeout; retrying"), this.flush(); else if ( tq.isObject(s) && (s.httpStatusCode >= 500 || 429 === s.httpStatusCode || (s.httpStatusCode <= 0 && !tQ()) || "timeout" === s.error) ) { var u = 2 * this.flushInterval; s.retryAfter && (u = 1e3 * parseInt(s.retryAfter, 10) || u), (u = Math.min(6e5, u)), this.reportError("Error; retry in " + u + " ms"), this.scheduleFlush(u); } else if (tq.isObject(s) && 413 === s.httpStatusCode) { if (o.length > 1) { var l = Math.max(1, Math.floor(i / 2)); (this.batchSize = Math.min( this.batchSize, l, o.length - 1 )), this.reportError( "413 response; reducing batch size to " + this.batchSize ), this.resetFlush(); } else this.reportError( "Single-event request too large; dropping", o ), this.resetBatchSize(), (c = !0); } else c = !0; c && (this.queue.removeItemsByID( tq.map(o, function (e) { return e.id; }), tq.bind(function (e) { e ? ((this.consecutiveRemovalFailures = 0), this.flushOnlyOnInterval && !n ? this.resetFlush() : this.flush()) : (this.reportError( "Failed to remove items from queue" ), ++this.consecutiveRemovalFailures > 5 ? (this.reportError( "Too many queue failures; disabling batching system." ), this.stopAllBatching()) : this.resetFlush()); }, this) ), tq.each( o, tq.bind(function (e) { var t = e.id; t ? ((this.itemIdsSentSuccessfully[t] = this.itemIdsSentSuccessfully[t] || 0), this.itemIdsSentSuccessfully[t]++, this.itemIdsSentSuccessfully[t] > 5 && this.reportError( "[dupe] item ID sent too many times", { item: e, batchSize: o.length, timesSent: this.itemIdsSentSuccessfully[t], } )) : this.reportError( "[dupe] found item with no ID while removing", { item: e } ); }, this) )); } catch (e) { this.reportError("Error handling API response", e), this.resetFlush(); } }, this), u = { method: "POST", verbose: !0, ignore_json_errors: !0, timeout_ms: t, }; e.unloading && (u.transport = "sendBeacon"), ra.log("MIXPANEL REQUEST:", s), this.sendRequest(s, u, c); } catch (e) { this.reportError("Error flushing request queue", e), this.resetFlush(); } }), (rc.prototype.reportError = function (e, t) { if ((ra.error.apply(ra.error, arguments), this.errorReporter)) try { t instanceof Error || (t = Error(e)), this.errorReporter(e, t); } catch (e) { ra.error(e); } }); var ru = tF("recorder"), rl = eO.CompressionStream, rp = { batch_size: 1e3, batch_flush_interval_ms: 1e4, batch_request_timeout_ms: 9e4, batch_autostart: !0, }, rh = new Set([ tf.MouseMove, tf.MouseInteraction, tf.Scroll, tf.ViewportResize, tf.Input, tf.TouchMove, tf.MediaInteraction, tf.Drag, tf.Selection, ]), rd = function (e) { (this._mixpanel = e.mixpanelInstance), (this._onIdleTimeout = e.onIdleTimeout), (this._onMaxLengthReached = e.onMaxLengthReached), (this._rrwebRecord = e.rrwebRecord), (this.replayId = e.replayId), (this._stopRecording = null), (this.seqNo = 0), (this.replayStartTime = null), (this.batchStartUrl = null), (this.idleTimeoutId = null), (this.maxTimeoutId = null), (this.recordMaxMs = 864e5), (this.recordMinMs = 0); var t = "__mprec_" + this.getConfig("token") + "_" + this.replayId; this.batcher = new rc(t, { errorReporter: tq.bind(this.reportError, this), flushOnlyOnInterval: !0, libConfig: rp, sendRequestFunc: tq.bind(this.flushEventsWithOptOut, this), usePersistence: !1, }); }; (rd.prototype.getConfig = function (e) { return this._mixpanel.get_config(e); }), (rd.prototype.get_config = function (e) { return this.getConfig(e); }), (rd.prototype.startRecording = function (e) { if (null !== this._stopRecording) { ru.log("Recording already in progress, skipping startRecording."); return; } (this.recordMaxMs = this.getConfig("record_max_ms")), this.recordMaxMs > 864e5 && ((this.recordMaxMs = 864e5), ru.critical( "record_max_ms cannot be greater than 86400000ms. Capping value." )), (this.recordMinMs = this.getConfig("record_min_ms")), this.recordMinMs > 8e3 && ((this.recordMinMs = 8e3), ru.critical( "record_min_ms cannot be greater than 8000ms. Capping value." )), (this.replayStartTime = new Date().getTime()), (this.batchStartUrl = tq.info.currentUrl()), e || this.recordMinMs > 0 ? this.batcher.stop() : this.batcher.start(); var t = tq.bind(function () { clearTimeout(this.idleTimeoutId), (this.idleTimeoutId = setTimeout( this._onIdleTimeout, this.getConfig("record_idle_timeout_ms") )); }, this), r = this.getConfig("record_block_selector"); if ( (("" === r || null === r) && (r = void 0), (this._stopRecording = this._rrwebRecord({ emit: tq.bind(function (e) { this.batcher.enqueue(e), e.type === td.IncrementalSnapshot && rh.has(e.data.source) && (this.batcher.stopped && new Date().getTime() - this.replayStartTime >= this.recordMinMs && this.batcher.start(), t()); }, this), blockClass: this.getConfig("record_block_class"), blockSelector: r, collectFonts: this.getConfig("record_collect_fonts"), maskAllInputs: !0, maskTextClass: this.getConfig("record_mask_text_class"), maskTextSelector: this.getConfig("record_mask_text_selector"), })), "function" != typeof this._stopRecording) ) { this.reportError("rrweb failed to start, skipping this recording."), (this._stopRecording = null), this.stopRecording(); return; } t(), (this.maxTimeoutId = setTimeout( tq.bind(this._onMaxLengthReached, this), this.recordMaxMs )); }), (rd.prototype.stopRecording = function () { if (!this.isRrwebStopped()) { try { this._stopRecording(); } catch (e) { this.reportError("Error with rrweb stopRecording", e); } this._stopRecording = null; } this.batcher.stopped ? this.batcher.clear() : (this.batcher.flush(), this.batcher.stop()), clearTimeout(this.idleTimeoutId), clearTimeout(this.maxTimeoutId); }), (rd.prototype.isRrwebStopped = function () { return null === this._stopRecording; }), (rd.prototype.flushEventsWithOptOut = function (e, t, r) { this._flushEvents(e, t, r, tq.bind(this._onOptOut, this)); }), (rd.prototype._onOptOut = function (e) { 0 === e && this.stopRecording(); }), (rd.prototype._sendRequest = function (e, t, r, i) { var o = tq.bind(function (t, r) { 200 === t.status && this.replayId === e && (this.seqNo++, (this.batchStartUrl = tq.info.currentUrl())), i({ status: 0, httpStatusCode: t.status, responseBody: r, retryAfter: t.headers.get("Retry-After"), }); }, this); eO.fetch( this.getConfig("api_host") + "/" + this.getConfig("api_routes").record + "?" + new URLSearchParams(t), { method: "POST", headers: { Authorization: "Basic " + btoa(this.getConfig("token") + ":"), "Content-Type": "application/octet-stream", }, body: r, } ) .then(function (e) { e.json() .then(function (t) { o(e, t); }) .catch(function (e) { i({ error: e }); }); }) .catch(function (e) { i({ error: e, httpStatusCode: 0 }); }); }), (rd.prototype._flushEvents = t2(function (e, t, r) { let i = e.length; if (i > 0) { var o = this.replayId, n = e[0].timestamp; (0 !== this.seqNo && this.replayStartTime) || (0 !== this.seqNo && this.reportError( "Replay start time not set but seqNo is not 0. Using current batch start time as a fallback." ), (this.replayStartTime = n)); var s = e[i - 1].timestamp - this.replayStartTime, a = { $current_url: this.batchStartUrl, $lib_version: t_.LIB_VERSION, batch_start_time: n / 1e3, distinct_id: String(this._mixpanel.get_distinct_id()), mp_lib: "web", replay_id: o, replay_length_ms: s, replay_start_time: this.replayStartTime / 1e3, seq: this.seqNo, }, c = tq.JSONEncode(e), u = this._mixpanel.get_property("$device_id"); u && (a.$device_id = u); var l = this._mixpanel.get_property("$user_id"); if ((l && (a.$user_id = l), rl)) { var p = new Blob([c], { type: "application/json" }) .stream() .pipeThrough(new rl("gzip")); new Response(p).blob().then( tq.bind(function (e) { (a.format = "gzip"), this._sendRequest(o, a, e, r); }, this) ); } else (a.format = "body"), this._sendRequest(o, a, c, r); } })), (rd.prototype.reportError = function (e, t) { ru.error.apply(ru.error, arguments); try { t || e instanceof Error || (e = Error(e)), this.getConfig("error_reporter")(e, t); } catch (e) { ru.error(e); } }); var rf = tF("recorder"), r_ = function (e) { (this._mixpanel = e), (this.activeRecording = null); }; (r_.prototype.startRecording = function (e) { if (this.activeRecording && !this.activeRecording.isRrwebStopped()) { rf.log("Recording already in progress, skipping startRecording."); return; } var t = tq.bind(function () { rf.log("Idle timeout reached, restarting recording."), this.resetRecording(); }, this), r = tq.bind(function () { rf.log("Max recording length reached, stopping recording."), this.resetRecording(); }, this); (this.activeRecording = new rd({ mixpanelInstance: this._mixpanel, onIdleTimeout: t, onMaxLengthReached: r, replayId: tq.UUID(), rrwebRecord: th, })), this.activeRecording.startRecording(e); }), (r_.prototype.stopRecording = function () { this.activeRecording && (this.activeRecording.stopRecording(), (this.activeRecording = null)); }), (r_.prototype.resetRecording = function () { this.stopRecording(), this.startRecording(!0); }), (r_.prototype.getActiveReplayId = function () { return this.activeRecording && !this.activeRecording.isRrwebStopped() ? this.activeRecording.replayId : null; }), Object.defineProperty(r_.prototype, "replayId", { get: function () { return this.getActiveReplayId(); }, }), (eO.__mp_recorder = r_); var rg = function () {}; (rg.prototype.create_properties = function () {}), (rg.prototype.event_handler = function () {}), (rg.prototype.after_track_handler = function () {}), (rg.prototype.init = function (e) { return (this.mp = e), this; }), (rg.prototype.track = function (e, t, r, i) { var o = this, n = tq.dom_query(e); if (0 === n.length) { tL.error("The DOM query (" + e + ") returned 0 elements"); return; } return ( tq.each( n, function (e) { tq.register_event(e, this.override_event, function (e) { var n = {}, s = o.create_properties(r, this), a = o.mp.get_config("track_links_timeout"); o.event_handler(e, this, n), window.setTimeout(o.track_callback(i, s, n, !0), a), o.mp.track(t, s, o.track_callback(i, s, n)); }); }, this ), !0 ); }), (rg.prototype.track_callback = function (e, t, r, i) { i = i || !1; var o = this; return function () { !r.callback_fired && ((r.callback_fired = !0), (e && !1 === e(i, t)) || o.after_track_handler(t, r, i)); }; }), (rg.prototype.create_properties = function (e, t) { return "function" == typeof e ? e(t) : tq.extend({}, e); }); var rm = function () { this.override_event = "click"; }; tq.inherit(rm, rg), (rm.prototype.create_properties = function (e, t) { var r = rm.superclass.create_properties.apply(this, arguments); return t.href && (r.url = t.href), r; }), (rm.prototype.event_handler = function (e, t, r) { (r.new_tab = 2 === e.which || e.metaKey || e.ctrlKey || "_blank" === t.target), (r.href = t.href), r.new_tab || e.preventDefault(); }), (rm.prototype.after_track_handler = function (e, t) { t.new_tab || setTimeout(function () { window.location = t.href; }, 0); }); var ry = function () { this.override_event = "submit"; }; tq.inherit(ry, rg), (ry.prototype.event_handler = function (e, t, r) { (r.element = t), e.preventDefault(); }), (ry.prototype.after_track_handler = function (e, t) { setTimeout(function () { t.element.submit(); }, 0); }); var rv = "$set", rb = "$set_once", rS = "$unset", rk = "$add", rw = "$append", rM = "$union", rI = "$remove", rE = { set_action: function (e, t) { var r = {}, i = {}; return ( tq.isObject(e) ? tq.each( e, function (e, t) { this._is_reserved_property(t) || (i[t] = e); }, this ) : (i[e] = t), (r[rv] = i), r ); }, unset_action: function (e) { var t = {}, r = []; return ( tq.isArray(e) || (e = [e]), tq.each( e, function (e) { this._is_reserved_property(e) || r.push(e); }, this ), (t[rS] = r), t ); }, set_once_action: function (e, t) { var r = {}, i = {}; return ( tq.isObject(e) ? tq.each( e, function (e, t) { this._is_reserved_property(t) || (i[t] = e); }, this ) : (i[e] = t), (r[rb] = i), r ); }, union_action: function (e, t) { var r = {}, i = {}; return ( tq.isObject(e) ? tq.each( e, function (e, t) { this._is_reserved_property(t) || (i[t] = tq.isArray(e) ? e : [e]); }, this ) : (i[e] = tq.isArray(t) ? t : [t]), (r[rM] = i), r ); }, append_action: function (e, t) { var r = {}, i = {}; return ( tq.isObject(e) ? tq.each( e, function (e, t) { this._is_reserved_property(t) || (i[t] = e); }, this ) : (i[e] = t), (r[rw] = i), r ); }, remove_action: function (e, t) { var r = {}, i = {}; return ( tq.isObject(e) ? tq.each( e, function (e, t) { this._is_reserved_property(t) || (i[t] = e); }, this ) : (i[e] = t), (r[rI] = i), r ); }, delete_action: function () { var e = {}; return (e.$delete = ""), e; }, }, rx = function () {}; tq.extend(rx.prototype, rE), (rx.prototype._init = function (e, t, r) { (this._mixpanel = e), (this._group_key = t), (this._group_id = r); }), (rx.prototype.set = t6(function (e, t, r) { var i = this.set_action(e, t); return tq.isObject(e) && (r = t), this._send_request(i, r); })), (rx.prototype.set_once = t6(function (e, t, r) { var i = this.set_once_action(e, t); return tq.isObject(e) && (r = t), this._send_request(i, r); })), (rx.prototype.unset = t6(function (e, t) { var r = this.unset_action(e); return this._send_request(r, t); })), (rx.prototype.union = t6(function (e, t, r) { tq.isObject(e) && (r = t); var i = this.union_action(e, t); return this._send_request(i, r); })), (rx.prototype.delete = t6(function (e) { var t = this.delete_action(); return this._send_request(t, e); })), (rx.prototype.remove = t6(function (e, t, r) { var i = this.remove_action(e, t); return this._send_request(i, r); })), (rx.prototype._send_request = function (e, t) { (e.$group_key = this._group_key), (e.$group_id = this._group_id), (e.$token = this._get_config("token")); var r = tq.encodeDates(e); return this._mixpanel._track_or_batch( { type: "groups", data: r, endpoint: this._get_config("api_host") + "/" + this._get_config("api_routes").groups, batcher: this._mixpanel.request_batchers.groups, }, t ); }), (rx.prototype._is_reserved_property = function (e) { return "$group_key" === e || "$group_id" === e; }), (rx.prototype._get_config = function (e) { return this._mixpanel.get_config(e); }), (rx.prototype.toString = function () { return ( this._mixpanel.toString() + ".group." + this._group_key + "." + this._group_id ); }), (rx.prototype.remove = rx.prototype.remove), (rx.prototype.set = rx.prototype.set), (rx.prototype.set_once = rx.prototype.set_once), (rx.prototype.union = rx.prototype.union), (rx.prototype.unset = rx.prototype.unset), (rx.prototype.toString = rx.prototype.toString); var rC = function () {}; tq.extend(rC.prototype, rE), (rC.prototype._init = function (e) { this._mixpanel = e; }), (rC.prototype.set = t3(function (e, t, r) { var i = this.set_action(e, t); return ( tq.isObject(e) && (r = t), this._get_config("save_referrer") && this._mixpanel.persistence.update_referrer_info( document.referrer ), (i[rv] = tq.extend({}, tq.info.people_properties(), i[rv])), this._send_request(i, r) ); })), (rC.prototype.set_once = t3(function (e, t, r) { var i = this.set_once_action(e, t); return tq.isObject(e) && (r = t), this._send_request(i, r); })), (rC.prototype.unset = t3(function (e, t) { var r = this.unset_action(e); return this._send_request(r, t); })), (rC.prototype.increment = t3(function (e, t, r) { var i = {}, o = {}; return ( tq.isObject(e) ? (tq.each( e, function (e, t) { if (!this._is_reserved_property(t)) { if (isNaN(parseFloat(e))) { tL.error( "Invalid increment value passed to mixpanel.people.increment - must be a number" ); return; } o[t] = e; } }, this ), (r = t)) : (tq.isUndefined(t) && (t = 1), (o[e] = t)), (i[rk] = o), this._send_request(i, r) ); })), (rC.prototype.append = t3(function (e, t, r) { tq.isObject(e) && (r = t); var i = this.append_action(e, t); return this._send_request(i, r); })), (rC.prototype.remove = t3(function (e, t, r) { tq.isObject(e) && (r = t); var i = this.remove_action(e, t); return this._send_request(i, r); })), (rC.prototype.union = t3(function (e, t, r) { tq.isObject(e) && (r = t); var i = this.union_action(e, t); return this._send_request(i, r); })), (rC.prototype.track_charge = t3(function (e, t, r) { if (!tq.isNumber(e) && isNaN((e = parseFloat(e)))) { tL.error( "Invalid value passed to mixpanel.people.track_charge - must be a number" ); return; } return this.append("$transactions", tq.extend({ $amount: e }, t), r); })), (rC.prototype.clear_charges = function (e) { return this.set("$transactions", [], e); }), (rC.prototype.delete_user = function () { if (!this._identify_called()) { tL.error( "mixpanel.people.delete_user() requires you to call identify() first" ); return; } var e = { $delete: this._mixpanel.get_distinct_id() }; return this._send_request(e); }), (rC.prototype.toString = function () { return this._mixpanel.toString() + ".people"; }), (rC.prototype._send_request = function (e, t) { (e.$token = this._get_config("token")), (e.$distinct_id = this._mixpanel.get_distinct_id()); var r = this._mixpanel.get_property("$device_id"), i = this._mixpanel.get_property("$user_id"), o = this._mixpanel.get_property("$had_persisted_distinct_id"); r && (e.$device_id = r), i && (e.$user_id = i), o && (e.$had_persisted_distinct_id = o); var n = tq.encodeDates(e); return this._identify_called() ? this._mixpanel._track_or_batch( { type: "people", data: n, endpoint: this._get_config("api_host") + "/" + this._get_config("api_routes").engage, batcher: this._mixpanel.request_batchers.people, }, t ) : (this._enqueue(e), tq.isUndefined(t) || t( this._get_config("verbose") ? { status: -1, error: null } : -1 ), tq.truncate(n, 255)); }), (rC.prototype._get_config = function (e) { return this._mixpanel.get_config(e); }), (rC.prototype._identify_called = function () { return !0 === this._mixpanel._flags.identify_called; }), (rC.prototype._enqueue = function (e) { rv in e ? this._mixpanel.persistence._add_to_people_queue(rv, e) : rb in e ? this._mixpanel.persistence._add_to_people_queue(rb, e) : rS in e ? this._mixpanel.persistence._add_to_people_queue(rS, e) : rk in e ? this._mixpanel.persistence._add_to_people_queue(rk, e) : rw in e ? this._mixpanel.persistence._add_to_people_queue(rw, e) : rI in e ? this._mixpanel.persistence._add_to_people_queue(rI, e) : rM in e ? this._mixpanel.persistence._add_to_people_queue(rM, e) : tL.error("Invalid call to _enqueue():", e); }), (rC.prototype._flush_one_queue = function (e, t, r, i) { var o = this, n = tq.extend({}, this._mixpanel.persistence.load_queue(e)), s = n; !tq.isUndefined(n) && tq.isObject(n) && !tq.isEmptyObject(n) && (o._mixpanel.persistence._pop_from_people_queue(e, n), o._mixpanel.persistence.save(), i && (s = i(n)), t.call(o, s, function (t, i) { 0 === t && o._mixpanel.persistence._add_to_people_queue(e, n), tq.isUndefined(r) || r(t, i); })); }), (rC.prototype._flush = function (e, t, r, i, o, n, s) { var a = this; this._flush_one_queue(rv, this.set, e), this._flush_one_queue(rb, this.set_once, i), this._flush_one_queue(rS, this.unset, n, function (e) { return tq.keys(e); }), this._flush_one_queue(rk, this.increment, t), this._flush_one_queue(rM, this.union, o); var c = this._mixpanel.persistence.load_queue(rw); if (!tq.isUndefined(c) && tq.isArray(c) && c.length) for ( var u, l = function (e, t) { 0 === e && a._mixpanel.persistence._add_to_people_queue(rw, u), tq.isUndefined(r) || r(e, t); }, p = c.length - 1; p >= 0; p-- ) (u = (c = this._mixpanel.persistence.load_queue(rw)).pop()), a._mixpanel.persistence.save(), tq.isEmptyObject(u) || a.append(u, l); var h = this._mixpanel.persistence.load_queue(rI); if (!tq.isUndefined(h) && tq.isArray(h) && h.length) for ( var d, f = function (e, t) { 0 === e && a._mixpanel.persistence._add_to_people_queue(rI, d), tq.isUndefined(s) || s(e, t); }, _ = h.length - 1; _ >= 0; _-- ) (d = (h = this._mixpanel.persistence.load_queue(rI)).pop()), a._mixpanel.persistence.save(), tq.isEmptyObject(d) || a.remove(d, f); }), (rC.prototype._is_reserved_property = function (e) { return ( "$distinct_id" === e || "$token" === e || "$device_id" === e || "$user_id" === e || "$had_persisted_distinct_id" === e ); }), (rC.prototype.set = rC.prototype.set), (rC.prototype.set_once = rC.prototype.set_once), (rC.prototype.unset = rC.prototype.unset), (rC.prototype.increment = rC.prototype.increment), (rC.prototype.append = rC.prototype.append), (rC.prototype.remove = rC.prototype.remove), (rC.prototype.union = rC.prototype.union), (rC.prototype.track_charge = rC.prototype.track_charge), (rC.prototype.clear_charges = rC.prototype.clear_charges), (rC.prototype.delete_user = rC.prototype.delete_user), (rC.prototype.toString = rC.prototype.toString); var rO = "__mps", rT = "__mpso", rR = "__mpus", rD = "__mpa", rN = "__mpap", rA = "__mpr", rq = "__mpu", rL = "$people_distinct_id", rP = "__alias", rF = "__timers", rU = [rO, rT, rR, rD, rN, rA, rq, rL, rP, rF], rj = function (e) { (this.props = {}), (this.campaign_params_saved = !1), e.persistence_name ? (this.name = "mp_" + e.persistence_name) : (this.name = "mp_" + e.token + "_mixpanel"); var t = e.persistence; "cookie" !== t && "localStorage" !== t && (tL.critical( "Unknown persistence type " + t + "; falling back to cookie" ), (t = e.persistence = "cookie")), "localStorage" === t && tq.localStorage.is_supported() ? (this.storage = tq.localStorage) : (this.storage = tq.cookie), this.load(), this.update_config(e), this.upgrade(), this.save(); }; (rj.prototype.properties = function () { var e = {}; return ( this.load(), tq.each(this.props, function (t, r) { tq.include(rU, r) || (e[r] = t); }), e ); }), (rj.prototype.load = function () { if (!this.disabled) { var e = this.storage.parse(this.name); e && (this.props = tq.extend({}, e)); } }), (rj.prototype.upgrade = function () { var e, t; this.storage === tq.localStorage ? ((e = tq.cookie.parse(this.name)), tq.cookie.remove(this.name), tq.cookie.remove(this.name, !0), e && this.register_once(e)) : this.storage === tq.cookie && ((t = tq.localStorage.parse(this.name)), tq.localStorage.remove(this.name), t && this.register_once(t)); }), (rj.prototype.save = function () { this.disabled || this.storage.set( this.name, tq.JSONEncode(this.props), this.expire_days, this.cross_subdomain, this.secure, this.cross_site, this.cookie_domain ); }), (rj.prototype.load_prop = function (e) { return this.load(), this.props[e]; }), (rj.prototype.remove = function () { this.storage.remove(this.name, !1, this.cookie_domain), this.storage.remove(this.name, !0, this.cookie_domain); }), (rj.prototype.clear = function () { this.remove(), (this.props = {}); }), (rj.prototype.register_once = function (e, t, r) { return ( !!tq.isObject(e) && (void 0 === t && (t = "None"), (this.expire_days = void 0 === r ? this.default_expiry : r), this.load(), tq.each( e, function (e, r) { (this.props.hasOwnProperty(r) && this.props[r] !== t) || (this.props[r] = e); }, this ), this.save(), !0) ); }), (rj.prototype.register = function (e, t) { return ( !!tq.isObject(e) && ((this.expire_days = void 0 === t ? this.default_expiry : t), this.load(), tq.extend(this.props, e), this.save(), !0) ); }), (rj.prototype.unregister = function (e) { this.load(), e in this.props && (delete this.props[e], this.save()); }), (rj.prototype.update_search_keyword = function (e) { this.register(tq.info.searchInfo(e)); }), (rj.prototype.update_referrer_info = function (e) { this.register_once( { $initial_referrer: e || "$direct", $initial_referring_domain: tq.info.referringDomain(e) || "$direct", }, "" ); }), (rj.prototype.get_referrer_info = function () { return tq.strip_empty_properties({ $initial_referrer: this.props.$initial_referrer, $initial_referring_domain: this.props.$initial_referring_domain, }); }), (rj.prototype.update_config = function (e) { (this.default_expiry = this.expire_days = e.cookie_expiration), this.set_disabled(e.disable_persistence), this.set_cookie_domain(e.cookie_domain), this.set_cross_site(e.cross_site_cookie), this.set_cross_subdomain(e.cross_subdomain_cookie), this.set_secure(e.secure_cookie); }), (rj.prototype.set_disabled = function (e) { (this.disabled = e), this.disabled ? this.remove() : this.save(); }), (rj.prototype.set_cookie_domain = function (e) { e !== this.cookie_domain && (this.remove(), (this.cookie_domain = e), this.save()); }), (rj.prototype.set_cross_site = function (e) { e !== this.cross_site && ((this.cross_site = e), this.remove(), this.save()); }), (rj.prototype.set_cross_subdomain = function (e) { e !== this.cross_subdomain && ((this.cross_subdomain = e), this.remove(), this.save()); }), (rj.prototype.get_cross_subdomain = function () { return this.cross_subdomain; }), (rj.prototype.set_secure = function (e) { e !== this.secure && ((this.secure = !!e), this.remove(), this.save()); }), (rj.prototype._add_to_people_queue = function (e, t) { var r = this._get_queue_key(e), i = t[e], o = this._get_or_create_queue(rv), n = this._get_or_create_queue(rb), s = this._get_or_create_queue(rS), a = this._get_or_create_queue(rk), c = this._get_or_create_queue(rM), u = this._get_or_create_queue(rI, []), l = this._get_or_create_queue(rw, []); r === rO ? (tq.extend(o, i), this._pop_from_people_queue(rk, i), this._pop_from_people_queue(rM, i), this._pop_from_people_queue(rS, i)) : r === rT ? (tq.each(i, function (e, t) { t in n || (n[t] = e); }), this._pop_from_people_queue(rS, i)) : r === rR ? tq.each(i, function (e) { tq.each([o, n, a, c], function (t) { e in t && delete t[e]; }), tq.each(l, function (t) { e in t && delete t[e]; }), (s[e] = !0); }) : r === rD ? (tq.each( i, function (e, t) { t in o ? (o[t] += e) : (t in a || (a[t] = 0), (a[t] += e)); }, this ), this._pop_from_people_queue(rS, i)) : r === rq ? (tq.each(i, function (e, t) { tq.isArray(e) && (t in c || (c[t] = []), (c[t] = c[t].concat(e))); }), this._pop_from_people_queue(rS, i)) : r === rA ? (u.push(i), this._pop_from_people_queue(rw, i)) : r === rN && (l.push(i), this._pop_from_people_queue(rS, i)), tL.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"), tL.log(t), this.save(); }), (rj.prototype._pop_from_people_queue = function (e, t) { var r = this.props[this._get_queue_key(e)]; tq.isUndefined(r) || tq.each( t, function (t, i) { e === rw || e === rI ? tq.each(r, function (e) { e[i] === t && delete e[i]; }) : delete r[i]; }, this ); }), (rj.prototype.load_queue = function (e) { return this.load_prop(this._get_queue_key(e)); }), (rj.prototype._get_queue_key = function (e) { return e === rv ? rO : e === rb ? rT : e === rS ? rR : e === rk ? rD : e === rw ? rN : e === rI ? rA : e === rM ? rq : void tL.error("Invalid queue:", e); }), (rj.prototype._get_or_create_queue = function (e, t) { var r = this._get_queue_key(e); return ( (t = tq.isUndefined(t) ? {} : t), this.props[r] || (this.props[r] = t) ); }), (rj.prototype.set_event_timer = function (e, t) { var r = this.load_prop(rF) || {}; (r[e] = t), (this.props[rF] = r), this.save(); }), (rj.prototype.remove_event_timer = function (e) { var t = (this.load_prop(rF) || {})[e]; return ( tq.isUndefined(t) || (delete this.props[rF][e], this.save()), t ); }); var rB = function (e, t) { throw Error(e + " not available in this build."); }, r$ = function (e) { return e; }, rz = function () {}, rW = "mixpanel", rV = "base64", rH = "$device:", rG = eO.XMLHttpRequest && "withCredentials" in new XMLHttpRequest(), rJ = !rG && -1 === tC.indexOf("MSIE") && -1 === tC.indexOf("Mozilla"), rQ = null; tM.sendBeacon && (rQ = function () { return tM.sendBeacon.apply(tM, arguments); }); var rK = { track: "track/", engage: "engage/", groups: "groups/", record: "record/", }, rX = { api_host: "https://api-js.mixpanel.com", api_routes: rK, api_method: "POST", api_transport: "XHR", api_payload_format: rV, app_host: "https://mixpanel.com", cdn: "https://cdn.mxpnl.com", cross_site_cookie: !1, cross_subdomain_cookie: !0, error_reporter: rz, persistence: "cookie", persistence_name: "", cookie_domain: "", cookie_name: "", loaded: rz, mp_loader: null, track_marketing: !0, track_pageview: !1, skip_first_touch_marketing: !1, store_google: !0, stop_utm_persistence: !1, save_referrer: !0, test: !1, verbose: !1, img: !1, debug: !1, track_links_timeout: 300, cookie_expiration: 365, upgrade: !1, disable_persistence: !1, disable_cookie: !1, secure_cookie: !1, ip: !0, opt_out_tracking_by_default: !1, opt_out_persistence_by_default: !1, opt_out_tracking_persistence_type: "localStorage", opt_out_tracking_cookie_prefix: null, property_blacklist: [], xhr_headers: {}, ignore_dnt: !1, batch_requests: !0, batch_size: 50, batch_flush_interval_ms: 5e3, batch_request_timeout_ms: 9e4, batch_autostart: !0, hooks: {}, record_block_class: RegExp( "^(mp-block|fs-exclude|amp-block|rr-block|ph-no-capture)$" ), record_block_selector: "img, video", record_collect_fonts: !1, record_idle_timeout_ms: 18e5, record_mask_text_class: RegExp( "^(mp-mask|fs-mask|amp-mask|rr-mask|ph-mask)$" ), record_mask_text_selector: "*", record_max_ms: 864e5, record_min_ms: 0, record_sessions_percent: 0, recorder_src: "https://cdn.mxpnl.com/libs/mixpanel-recorder.min.js", }, rY = !1, rZ = function () {}, r0 = function (e, t, r) { var i, o = r === rW ? eR : eR[r]; if (o && 0 === eT) i = o; else { if (o && !tq.isArray(o)) { tL.error("You have already initialized " + r); return; } i = new rZ(); } if ( ((i._cached_groups = {}), i._init(e, t, r), (i.people = new rC()), i.people._init(i), !i.get_config("skip_first_touch_marketing")) ) { var n = tq.info.campaignParams(null), s = {}, a = !1; tq.each(n, function (e, t) { (s["initial_" + t] = e), e && (a = !0); }), a && i.people.set_once(s); } return ( (t_.DEBUG = t_.DEBUG || i.get_config("debug")), !tq.isUndefined(o) && tq.isArray(o) && (i._execute_array.call(i.people, o.people), i._execute_array(o)), i ); }; (rZ.prototype.init = function (e, t, r) { if (tq.isUndefined(r)) { this.report_error( "You must name your new library: init(token, config, name)" ); return; } if (r === rW) { this.report_error( "You must initialize the main mixpanel object right after you include the Mixpanel js snippet" ); return; } var i = r0(e, t, r); return (eR[r] = i), i._loaded(), i; }), (rZ.prototype._init = function (e, t, r) { (t = t || {}), (this.__loaded = !0), (this.config = {}); var i = {}; if ( (!("api_payload_format" in t) && (t.api_host || rX.api_host).match(/\.mixpanel\.com/) && (i.api_payload_format = "json"), this.set_config( tq.extend({}, rX, i, t, { name: r, token: e, callback_fn: (r === rW ? r : rW + "." + r) + "._jsc", }) ), (this._jsc = rz), (this.__dom_loaded_queue = []), (this.__request_queue = []), (this.__disabled_events = []), (this._flags = { disable_all_events: !1, identify_called: !1 }), (this.request_batchers = {}), (this._batch_requests = this.get_config("batch_requests")), this._batch_requests) ) { if (tq.localStorage.is_supported(!0) && rG) { if ((this.init_batchers(), rQ && eO.addEventListener)) { var o = tq.bind(function () { this.request_batchers.events.stopped || this.request_batchers.events.flush({ unloading: !0 }); }, this); eO.addEventListener("pagehide", function (e) { e.persisted && o(); }), eO.addEventListener("visibilitychange", function () { "hidden" === tI.visibilityState && o(); }); } } else (this._batch_requests = !1), tL.log( "Turning off Mixpanel request-queueing; needs XHR and localStorage support" ), tq.each(this.get_batcher_configs(), function (e) { tL.log("Clearing batch queue " + e.queue_key), tq.localStorage.remove(e.queue_key); }); } (this.persistence = this.cookie = new rj(this.config)), (this.unpersisted_superprops = {}), this._gdpr_init(); var n = tq.UUID(); this.get_distinct_id() || this.register_once({ distinct_id: rH + n, $device_id: n }, ""); var s = this.get_config("track_pageview"); s && this._init_url_change_tracking(s), this.get_config("record_sessions_percent") > 0 && 100 * Math.random() <= this.get_config("record_sessions_percent") && this.start_session_recording(); }), (rZ.prototype.start_session_recording = t2(function () { if (!eO.MutationObserver) { tL.critical( "Browser does not support MutationObserver; skipping session recording" ); return; } var e = tq.bind(function () { (this._recorder = this._recorder || new eO.__mp_recorder(this)), this._recorder.startRecording(); }, this); tq.isUndefined(eO.__mp_recorder) ? rB(this.get_config("recorder_src"), e) : e(); })), (rZ.prototype.stop_session_recording = function () { this._recorder ? this._recorder.stopRecording() : tL.critical("Session recorder module not loaded"); }), (rZ.prototype.get_session_recording_properties = function () { var e = {}, t = this._get_session_replay_id(); return t && (e.$mp_replay_id = t), e; }), (rZ.prototype.get_session_replay_url = function () { var e = null, t = this._get_session_replay_id(); return ( t && (e = "https://mixpanel.com/projects/replay-redirect?" + tq.HTTPBuildQuery({ replay_id: t, distinct_id: this.get_distinct_id(), token: this.get_config("token"), })), e ); }), (rZ.prototype._get_session_replay_id = function () { var e = null; return this._recorder && (e = this._recorder.replayId), e || null; }), (rZ.prototype._loaded = function () { if ( (this.get_config("loaded")(this), this._set_default_superprops(), this.people.set_once(this.persistence.get_referrer_info()), this.get_config("store_google") && this.get_config("stop_utm_persistence")) ) { var e = tq.info.campaignParams(null); tq.each( e, function (e, t) { this.unregister(t); }.bind(this) ); } }), (rZ.prototype._set_default_superprops = function () { this.persistence.update_search_keyword(tI.referrer), this.get_config("store_google") && !this.get_config("stop_utm_persistence") && this.register(tq.info.campaignParams()), this.get_config("save_referrer") && this.persistence.update_referrer_info(tI.referrer); }), (rZ.prototype._dom_loaded = function () { tq.each( this.__dom_loaded_queue, function (e) { this._track_dom.apply(this, e); }, this ), this.has_opted_out_tracking() || tq.each( this.__request_queue, function (e) { this._send_request.apply(this, e); }, this ), delete this.__dom_loaded_queue, delete this.__request_queue; }), (rZ.prototype._track_dom = function (e, t) { if (this.get_config("img")) return ( this.report_error( "You can't use DOM tracking functions with img = true." ), !1 ); if (!rY) return this.__dom_loaded_queue.push([e, t]), !1; var r = new e().init(this); return r.track.apply(r, t); }), (rZ.prototype._init_url_change_tracking = function (e) { var t = ""; if ( (this.track_pageview() && (t = tq.info.currentUrl()), tq.include( ["full-url", "url-with-path-and-query-string", "url-with-path"], e )) ) { eO.addEventListener("popstate", function () { eO.dispatchEvent(new Event("mp_locationchange")); }), eO.addEventListener("hashchange", function () { eO.dispatchEvent(new Event("mp_locationchange")); }); var r = eO.history.pushState; "function" == typeof r && (eO.history.pushState = function (e, t, i) { r.call(eO.history, e, t, i), eO.dispatchEvent(new Event("mp_locationchange")); }); var i = eO.history.replaceState; "function" == typeof i && (eO.history.replaceState = function (e, t, r) { i.call(eO.history, e, t, r), eO.dispatchEvent(new Event("mp_locationchange")); }), eO.addEventListener( "mp_locationchange", function () { var r = tq.info.currentUrl(), i = !1; "full-url" === e ? (i = r !== t) : "url-with-path-and-query-string" === e ? (i = r.split("#")[0] !== t.split("#")[0]) : "url-with-path" === e && (i = r.split("#")[0].split("?")[0] !== t.split("#")[0].split("?")[0]), i && this.track_pageview() && (t = r); }.bind(this) ); } }), (rZ.prototype._prepare_callback = function (e, t) { if (tq.isUndefined(e)) return null; if (rG) return function (r) { e(r, t); }; var r = this._jsc, i = "" + Math.floor(1e8 * Math.random()), o = this.get_config("callback_fn") + "[" + i + "]"; return ( (r[i] = function (o) { delete r[i], e(o, t); }), o ); }), (rZ.prototype._send_request = function (e, t, r, i) { var o = !0; if (rJ) return this.__request_queue.push(arguments), o; var n = { method: this.get_config("api_method"), transport: this.get_config("api_transport"), verbose: this.get_config("verbose"), }, s = null; !i && (tq.isFunction(r) || "string" == typeof r) && ((i = r), (r = null)), (r = tq.extend(n, r || {})), rG || (r.method = "GET"); var a = "POST" === r.method, c = rQ && a && "sendbeacon" === r.transport.toLowerCase(), u = r.verbose; t.verbose && (u = !0), this.get_config("test") && (t.test = 1), u && (t.verbose = 1), this.get_config("img") && (t.img = 1), !rG && (i ? (t.callback = i) : (u || this.get_config("test")) && (t.callback = "(function(){})")), (t.ip = this.get_config("ip") ? 1 : 0), (t._ = new Date().getTime().toString()), a && ((s = "data=" + encodeURIComponent(t.data)), delete t.data), (e += "?" + tq.HTTPBuildQuery(t)); var l = this; if ("img" in t) { var p = tI.createElement("img"); (p.src = e), tI.body.appendChild(p); } else if (c) { try { o = rQ(e, s); } catch (e) { l.report_error(e), (o = !1); } try { i && i(o ? 1 : 0); } catch (e) { l.report_error(e); } } else if (rG) try { var h = new XMLHttpRequest(); h.open(r.method, e, !0); var d = this.get_config("xhr_headers"); if ( (a && (d["Content-Type"] = "application/x-www-form-urlencoded"), tq.each(d, function (e, t) { h.setRequestHeader(t, e); }), r.timeout_ms && void 0 !== h.timeout) ) { h.timeout = r.timeout_ms; var f = new Date().getTime(); } (h.withCredentials = !0), (h.onreadystatechange = function () { if (4 === h.readyState) { if (200 === h.status) { if (i) { if (u) { try { e = tq.JSONDecode(h.responseText); } catch (t) { if ((l.report_error(t), !r.ignore_json_errors)) return; e = h.responseText; } i(e); } else i(Number(h.responseText)); } } else if ( ((t = h.timeout && !h.status && new Date().getTime() - f >= h.timeout ? "timeout" : "Bad HTTP status: " + h.status + " " + h.statusText), l.report_error(t), i) ) { if (u) { var e, t, o = h.responseHeaders || {}; i({ status: 0, httpStatusCode: h.status, error: t, retryAfter: o["Retry-After"], }); } else i(0); } } }), h.send(s); } catch (e) { l.report_error(e), (o = !1); } else { var _ = tI.createElement("script"); (_.type = "text/javascript"), (_.async = !0), (_.defer = !0), (_.src = e); var g = tI.getElementsByTagName("script")[0]; g.parentNode.insertBefore(_, g); } return o; }), (rZ.prototype._execute_array = function (e) { var t, r = [], i = [], o = []; tq.each( e, function (e) { e && ((t = e[0]), tq.isArray(t) ? o.push(e) : "function" == typeof e ? e.call(this) : tq.isArray(e) && "alias" === t ? r.push(e) : tq.isArray(e) && -1 !== t.indexOf("track") && "function" == typeof this[t] ? o.push(e) : i.push(e)); }, this ); var n = function (e, t) { tq.each( e, function (e) { if (tq.isArray(e[0])) { var r = t; tq.each(e, function (e) { r = r[e[0]].apply(r, e.slice(1)); }); } else this[e[0]].apply(this, e.slice(1)); }, t ); }; n(r, this), n(i, this), n(o, this); }), (rZ.prototype.are_batchers_initialized = function () { return !!this.request_batchers.events; }), (rZ.prototype.get_batcher_configs = function () { var e = "__mpq_" + this.get_config("token"), t = this.get_config("api_routes"); return ( (this._batcher_configs = this._batcher_configs || { events: { type: "events", endpoint: "/" + t.track, queue_key: e + "_ev", }, people: { type: "people", endpoint: "/" + t.engage, queue_key: e + "_pp", }, groups: { type: "groups", endpoint: "/" + t.groups, queue_key: e + "_gr", }, }), this._batcher_configs ); }), (rZ.prototype.init_batchers = function () { if (!this.are_batchers_initialized()) { var e = tq.bind(function (e) { return new rc(e.queue_key, { libConfig: this.config, errorReporter: this.get_config("error_reporter"), sendRequestFunc: tq.bind(function (t, r, i) { this._send_request( this.get_config("api_host") + e.endpoint, this._encode_data_for_request(t), r, this._prepare_callback(i, t) ); }, this), beforeSendHook: tq.bind(function (t) { return this._run_hook("before_send_" + e.type, t); }, this), stopAllBatchingFunc: tq.bind(this.stop_batch_senders, this), usePersistence: !0, }); }, this), t = this.get_batcher_configs(); this.request_batchers = { events: e(t.events), people: e(t.people), groups: e(t.groups), }; } this.get_config("batch_autostart") && this.start_batch_senders(); }), (rZ.prototype.start_batch_senders = function () { (this._batchers_were_started = !0), this.are_batchers_initialized() && ((this._batch_requests = !0), tq.each(this.request_batchers, function (e) { e.start(); })); }), (rZ.prototype.stop_batch_senders = function () { (this._batch_requests = !1), tq.each(this.request_batchers, function (e) { e.stop(), e.clear(); }); }), (rZ.prototype.push = function (e) { this._execute_array([e]); }), (rZ.prototype.disable = function (e) { void 0 === e ? (this._flags.disable_all_events = !0) : (this.__disabled_events = this.__disabled_events.concat(e)); }), (rZ.prototype._encode_data_for_request = function (e) { var t = tq.JSONEncode(e); return ( this.get_config("api_payload_format") === rV && (t = tq.base64Encode(t)), { data: t } ); }), (rZ.prototype._track_or_batch = function (e, t) { var r = tq.truncate(e.data, 255), i = e.endpoint, o = e.batcher, n = e.should_send_immediately, s = e.send_request_options || {}; t = t || rz; var a = !0, c = tq.bind(function () { return (s.skip_hooks || (r = this._run_hook("before_send_" + e.type, r)), r) ? (tL.log("MIXPANEL REQUEST:"), tL.log(r), this._send_request( i, this._encode_data_for_request(r), s, this._prepare_callback(t, r) )) : null; }, this); return ( this._batch_requests && !n ? o.enqueue(r, function (e) { e ? t(1, r) : c(); }) : (a = c()), a && r ); }), (rZ.prototype.track = t2(function (e, t, r, i) { i || "function" != typeof r || ((i = r), (r = null)); var o = (r = r || {}).transport; o && (r.transport = o); var n = r.send_immediately; if (("function" != typeof i && (i = rz), tq.isUndefined(e))) { this.report_error("No event name provided to mixpanel.track"); return; } if (this._event_is_disabled(e)) { i(0); return; } (t = tq.extend({}, t)).token = this.get_config("token"); var s = this.persistence.remove_event_timer(e); if (!tq.isUndefined(s)) { var a = new Date().getTime() - s; t.$duration = parseFloat((a / 1e3).toFixed(3)); } this._set_default_superprops(); var c = this.get_config("track_marketing") ? tq.info.marketingParams() : {}; t = tq.extend( {}, tq.info.properties({ mp_loader: this.get_config("mp_loader") }), c, this.persistence.properties(), this.unpersisted_superprops, this.get_session_recording_properties(), t ); var u = this.get_config("property_blacklist"); tq.isArray(u) ? tq.each(u, function (e) { delete t[e]; }) : this.report_error( "Invalid value for property_blacklist config: " + u ); var l = { event: e, properties: t }; return this._track_or_batch( { type: "events", data: l, endpoint: this.get_config("api_host") + "/" + this.get_config("api_routes").track, batcher: this.request_batchers.events, should_send_immediately: n, send_request_options: r, }, i ); })), (rZ.prototype.set_group = t2(function (e, t, r) { tq.isArray(t) || (t = [t]); var i = {}; return (i[e] = t), this.register(i), this.people.set(e, t, r); })), (rZ.prototype.add_group = t2(function (e, t, r) { var i = this.get_property(e), o = {}; return ( void 0 === i ? ((o[e] = [t]), this.register(o)) : -1 === i.indexOf(t) && (i.push(t), (o[e] = i), this.register(o)), this.people.union(e, t, r) ); })), (rZ.prototype.remove_group = t2(function (e, t, r) { var i = this.get_property(e); if (void 0 !== i) { var o = i.indexOf(t); o > -1 && (i.splice(o, 1), this.register({ group_key: i })), 0 === i.length && this.unregister(e); } return this.people.remove(e, t, r); })), (rZ.prototype.track_with_groups = t2(function (e, t, r, i) { var o = tq.extend({}, t || {}); return ( tq.each(r, function (e, t) { null != e && (o[t] = e); }), this.track(e, o, i) ); })), (rZ.prototype._create_map_key = function (e, t) { return e + "_" + JSON.stringify(t); }), (rZ.prototype._remove_group_from_cache = function (e, t) { delete this._cached_groups[this._create_map_key(e, t)]; }), (rZ.prototype.get_group = function (e, t) { var r = this._create_map_key(e, t), i = this._cached_groups[r]; return ( (void 0 === i || i._group_key !== e || i._group_id !== t) && ((i = new rx())._init(this, e, t), (this._cached_groups[r] = i)), i ); }), (rZ.prototype.track_pageview = t2(function (e, t) { "object" != typeof e && (e = {}); var r = (t = t || {}).event_name || "$mp_web_page_view", i = tq.extend( tq.info.mpPageViewProperties(), tq.info.campaignParams(), tq.info.clickParams() ), o = tq.extend({}, i, e); return this.track(r, o); })), (rZ.prototype.track_links = function () { return this._track_dom.call(this, rm, arguments); }), (rZ.prototype.track_forms = function () { return this._track_dom.call(this, ry, arguments); }), (rZ.prototype.time_event = function (e) { if (tq.isUndefined(e)) { this.report_error("No event name provided to mixpanel.time_event"); return; } this._event_is_disabled(e) || this.persistence.set_event_timer(e, new Date().getTime()); }); var r1 = { persistent: !0 }, r2 = function (e) { var t; return ( (t = tq.isObject(e) ? e : tq.isUndefined(e) ? {} : { days: e }), tq.extend({}, r1, t) ); }; (rZ.prototype.register = function (e, t) { var r = r2(t); r.persistent ? this.persistence.register(e, r.days) : tq.extend(this.unpersisted_superprops, e); }), (rZ.prototype.register_once = function (e, t, r) { var i = r2(r); i.persistent ? this.persistence.register_once(e, t, i.days) : (void 0 === t && (t = "None"), tq.each( e, function (e, r) { (this.unpersisted_superprops.hasOwnProperty(r) && this.unpersisted_superprops[r] !== t) || (this.unpersisted_superprops[r] = e); }, this )); }), (rZ.prototype.unregister = function (e, t) { (t = r2(t)).persistent ? this.persistence.unregister(e) : delete this.unpersisted_superprops[e]; }), (rZ.prototype._register_single = function (e, t) { var r = {}; (r[e] = t), this.register(r); }), (rZ.prototype.identify = function (e, t, r, i, o, n, s, a) { var c = this.get_distinct_id(); if (e && c !== e) { if ("string" == typeof e && 0 === e.indexOf(rH)) return ( this.report_error("distinct_id cannot have $device: prefix"), -1 ); this.register({ $user_id: e }); } this.get_property("$device_id") || this.register_once( { $had_persisted_distinct_id: !0, $device_id: c }, "" ), e !== c && e !== this.get_property(rP) && (this.unregister(rP), this.register({ distinct_id: e })), (this._flags.identify_called = !0), this.people._flush(t, r, i, o, n, s, a), e !== c && this.track( "$identify", { distinct_id: e, $anon_distinct_id: c }, { skip_hooks: !0 } ); }), (rZ.prototype.reset = function () { this.persistence.clear(), (this._flags.identify_called = !1); var e = tq.UUID(); this.register_once({ distinct_id: rH + e, $device_id: e }, ""); }), (rZ.prototype.get_distinct_id = function () { return this.get_property("distinct_id"); }), (rZ.prototype.alias = function (e, t) { if (e === this.get_property(rL)) return ( this.report_error( "Attempting to create alias for existing People user - aborting." ), -2 ); var r = this; return (tq.isUndefined(t) && (t = this.get_distinct_id()), e !== t) ? (this._register_single(rP, e), this.track( "$create_alias", { alias: e, distinct_id: t }, { skip_hooks: !0 }, function () { r.identify(e); } )) : (this.report_error( "alias matches current distinct_id - skipping api call." ), this.identify(e), -1); }), (rZ.prototype.name_tag = function (e) { this._register_single("mp_name_tag", e); }), (rZ.prototype.set_config = function (e) { tq.isObject(e) && (tq.extend(this.config, e), e.batch_size && tq.each(this.request_batchers, function (e) { e.resetBatchSize(); }), this.get_config("persistence_name") || (this.config.persistence_name = this.config.cookie_name), this.get_config("disable_persistence") || (this.config.disable_persistence = this.config.disable_cookie), this.persistence && this.persistence.update_config(this.config), (t_.DEBUG = t_.DEBUG || this.get_config("debug"))); }), (rZ.prototype.get_config = function (e) { return this.config[e]; }), (rZ.prototype._run_hook = function (e) { var t = (this.config.hooks[e] || r$).apply( this, tb.call(arguments, 1) ); return ( void 0 === t && (this.report_error(e + " hook did not return a value"), (t = null)), t ); }), (rZ.prototype.get_property = function (e) { return this.persistence.load_prop([e]); }), (rZ.prototype.toString = function () { var e = this.get_config("name"); return e !== rW && (e = rW + "." + e), e; }), (rZ.prototype._event_is_disabled = function (e) { return ( tq.isBlockedUA(tC) || this._flags.disable_all_events || tq.include(this.__disabled_events, e) ); }), (rZ.prototype._gdpr_init = function () { "localStorage" === this.get_config("opt_out_tracking_persistence_type") && tq.localStorage.is_supported() && (!this.has_opted_in_tracking() && this.has_opted_in_tracking({ persistence_type: "cookie" }) && this.opt_in_tracking({ enable_persistence: !1 }), !this.has_opted_out_tracking() && this.has_opted_out_tracking({ persistence_type: "cookie" }) && this.opt_out_tracking({ clear_persistence: !1 }), this.clear_opt_in_out_tracking({ persistence_type: "cookie", enable_persistence: !1, })), this.has_opted_out_tracking() ? this._gdpr_update_persistence({ clear_persistence: !0 }) : !this.has_opted_in_tracking() && (this.get_config("opt_out_tracking_by_default") || tq.cookie.get("mp_optout")) && (tq.cookie.remove("mp_optout"), this.opt_out_tracking({ clear_persistence: this.get_config( "opt_out_persistence_by_default" ), })); }), (rZ.prototype._gdpr_update_persistence = function (e) { var t; if (e && e.clear_persistence) t = !0; else { if (!e || !e.enable_persistence) return; t = !1; } this.get_config("disable_persistence") || this.persistence.disabled === t || this.persistence.set_disabled(t), t ? this.stop_batch_senders() : this._batchers_were_started && this.start_batch_senders(); }), (rZ.prototype._gdpr_call_func = function (e, t) { return ( (t = tq.extend( { track: tq.bind(this.track, this), persistence_type: this.get_config( "opt_out_tracking_persistence_type" ), cookie_prefix: this.get_config( "opt_out_tracking_cookie_prefix" ), cookie_expiration: this.get_config("cookie_expiration"), cross_site_cookie: this.get_config("cross_site_cookie"), cross_subdomain_cookie: this.get_config( "cross_subdomain_cookie" ), cookie_domain: this.get_config("cookie_domain"), secure_cookie: this.get_config("secure_cookie"), ignore_dnt: this.get_config("ignore_dnt"), }, t )), tq.localStorage.is_supported() || (t.persistence_type = "cookie"), e(this.get_config("token"), { track: t.track, trackEventName: t.track_event_name, trackProperties: t.track_properties, persistenceType: t.persistence_type, persistencePrefix: t.cookie_prefix, cookieDomain: t.cookie_domain, cookieExpiration: t.cookie_expiration, crossSiteCookie: t.cross_site_cookie, crossSubdomainCookie: t.cross_subdomain_cookie, secureCookie: t.secure_cookie, ignoreDnt: t.ignore_dnt, }) ); }), (rZ.prototype.opt_in_tracking = function (e) { (e = tq.extend({ enable_persistence: !0 }, e)), this._gdpr_call_func(tY, e), this._gdpr_update_persistence(e); }), (rZ.prototype.opt_out_tracking = function (e) { (e = tq.extend({ clear_persistence: !0, delete_user: !0 }, e)) .delete_user && this.people && this.people._identify_called() && (this.people.delete_user(), this.people.clear_charges()), this._gdpr_call_func(tZ, e), this._gdpr_update_persistence(e); }), (rZ.prototype.has_opted_in_tracking = function (e) { return this._gdpr_call_func(t0, e); }), (rZ.prototype.has_opted_out_tracking = function (e) { return this._gdpr_call_func(t1, e); }), (rZ.prototype.clear_opt_in_out_tracking = function (e) { (e = tq.extend({ enable_persistence: !0 }, e)), this._gdpr_call_func(t4, e), this._gdpr_update_persistence(e); }), (rZ.prototype.report_error = function (e, t) { tL.error.apply(tL.error, arguments); try { t || e instanceof Error || (e = Error(e)), this.get_config("error_reporter")(e, t); } catch (e) { tL.error(e); } }), (rZ.prototype.init = rZ.prototype.init), (rZ.prototype.reset = rZ.prototype.reset), (rZ.prototype.disable = rZ.prototype.disable), (rZ.prototype.time_event = rZ.prototype.time_event), (rZ.prototype.track = rZ.prototype.track), (rZ.prototype.track_links = rZ.prototype.track_links), (rZ.prototype.track_forms = rZ.prototype.track_forms), (rZ.prototype.track_pageview = rZ.prototype.track_pageview), (rZ.prototype.register = rZ.prototype.register), (rZ.prototype.register_once = rZ.prototype.register_once), (rZ.prototype.unregister = rZ.prototype.unregister), (rZ.prototype.identify = rZ.prototype.identify), (rZ.prototype.alias = rZ.prototype.alias), (rZ.prototype.name_tag = rZ.prototype.name_tag), (rZ.prototype.set_config = rZ.prototype.set_config), (rZ.prototype.get_config = rZ.prototype.get_config), (rZ.prototype.get_property = rZ.prototype.get_property), (rZ.prototype.get_distinct_id = rZ.prototype.get_distinct_id), (rZ.prototype.toString = rZ.prototype.toString), (rZ.prototype.opt_out_tracking = rZ.prototype.opt_out_tracking), (rZ.prototype.opt_in_tracking = rZ.prototype.opt_in_tracking), (rZ.prototype.has_opted_out_tracking = rZ.prototype.has_opted_out_tracking), (rZ.prototype.has_opted_in_tracking = rZ.prototype.has_opted_in_tracking), (rZ.prototype.clear_opt_in_out_tracking = rZ.prototype.clear_opt_in_out_tracking), (rZ.prototype.get_group = rZ.prototype.get_group), (rZ.prototype.set_group = rZ.prototype.set_group), (rZ.prototype.add_group = rZ.prototype.add_group), (rZ.prototype.remove_group = rZ.prototype.remove_group), (rZ.prototype.track_with_groups = rZ.prototype.track_with_groups), (rZ.prototype.start_batch_senders = rZ.prototype.start_batch_senders), (rZ.prototype.stop_batch_senders = rZ.prototype.stop_batch_senders), (rZ.prototype.start_session_recording = rZ.prototype.start_session_recording), (rZ.prototype.stop_session_recording = rZ.prototype.stop_session_recording), (rZ.prototype.get_session_recording_properties = rZ.prototype.get_session_recording_properties), (rZ.prototype.get_session_replay_url = rZ.prototype.get_session_replay_url), (rZ.prototype.DEFAULT_API_ROUTES = rK), (rj.prototype.properties = rj.prototype.properties), (rj.prototype.update_search_keyword = rj.prototype.update_search_keyword), (rj.prototype.update_referrer_info = rj.prototype.update_referrer_info), (rj.prototype.get_cross_subdomain = rj.prototype.get_cross_subdomain), (rj.prototype.clear = rj.prototype.clear); var r3 = {}, r6 = function () { tq.each(r3, function (e, t) { t !== rW && (eR[t] = e); }), (eR._ = tq); }, r4 = ((rB = function (e, t) { t(); }), (eT = 0), ((eR = new rZ()).init = function (e, t, r) { if (r) return ( eR[r] || ((eR[r] = r3[r] = r0(e, t, r)), eR[r]._loaded()), eR[r] ); var i = eR; r3[rW] ? (i = r3[rW]) : e && ((i = r0(e, t, rW))._loaded(), (r3[rW] = i)), (eR = i), 1 === eT && (eO[rW] = eR), r6(); }), eR.init(), (function () { function e() { e.done || ((e.done = !0), (rY = !0), (rJ = !1), tq.each(r3, function (e) { e._dom_loaded(); })); } if (tI.addEventListener) "complete" === tI.readyState ? e() : tI.addEventListener("DOMContentLoaded", e, !1); else if (tI.attachEvent) { tI.attachEvent("onreadystatechange", e); var t = !1; try { t = null === eO.frameElement; } catch (e) {} tI.documentElement.doScroll && t && (function t() { try { tI.documentElement.doScroll("left"); } catch (e) { setTimeout(t, 1); return; } e(); })(); } tq.register_event(eO, "load", e, !0); })(), eR); }, }, ]);