Created
March 19, 2025 19:10
-
-
Save taoeffect/3b15f18d20156ed6b5a27f0b615a1369 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "use strict"; | |
| (self.webpackChunk_N_E = self.webpackChunk_N_E || []).push([[1362], { | |
| 11492: function(t, e, r) { | |
| let n, s, i, a, o, l, d; | |
| r.d(e, { | |
| U: function() { | |
| return rR | |
| } | |
| }); | |
| var u, h, c, p, g, m, f, _, y, I, b, C = r(30979), w = r(2467), v = r(79339), S = r(91267), A = r(45144), E = r(79114), k = r(37101), R = r(52074), T = r(16796), x = r(12022), M = r(35567), N = r(41430), D = r(14212), O = r(31470), U = r(2728), B = r(37513), L = r(58902); | |
| let F = E.n2 | |
| , z = "sentryReplaySession" | |
| , Z = "Unable to send Replay"; | |
| function W(t) { | |
| let e = null == t ? void 0 : t.host; | |
| return (null == e ? void 0 : e.shadowRoot) === t | |
| } | |
| function G(t) { | |
| return "[object ShadowRoot]" === Object.prototype.toString.call(t) | |
| } | |
| function V(t) { | |
| try { | |
| var e; | |
| let r = t.rules || t.cssRules; | |
| return r ? ((e = Array.from(r, K).join("")).includes(" background-clip: text;") && !e.includes(" -webkit-background-clip: text;") && (e = e.replace(" background-clip: text;", " -webkit-background-clip: text; background-clip: text;")), | |
| e) : null | |
| } catch (t) { | |
| return null | |
| } | |
| } | |
| function K(t) { | |
| let e; | |
| if ("styleSheet"in t) | |
| try { | |
| e = V(t.styleSheet) || function(t) { | |
| let {cssText: e} = t; | |
| if (e.split('"').length < 3) | |
| return e; | |
| let r = ["@import", `url(${JSON.stringify(t.href)})`]; | |
| return "" === t.layerName ? r.push("layer") : t.layerName && r.push(`layer(${t.layerName})`), | |
| t.supportsText && r.push(`supports(${t.supportsText})`), | |
| t.media.length && r.push(t.media.mediaText), | |
| r.join(" ") + ";" | |
| }(t) | |
| } catch (t) {} | |
| else if ("selectorText"in t && t.selectorText.includes(":")) | |
| return t.cssText.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm, "$1\\$2"); | |
| return e || t.cssText | |
| } | |
| (u = I || (I = {}))[u.Document = 0] = "Document", | |
| u[u.DocumentType = 1] = "DocumentType", | |
| u[u.Element = 2] = "Element", | |
| u[u.Text = 3] = "Text", | |
| u[u.CDATA = 4] = "CDATA", | |
| u[u.Comment = 5] = "Comment"; | |
| class Y { | |
| constructor() { | |
| this.idNodeMap = new Map, | |
| this.nodeMetaMap = new WeakMap | |
| } | |
| getId(t) { | |
| var e; | |
| if (!t) | |
| return -1; | |
| let r = null === (e = this.getMeta(t)) || void 0 === e ? void 0 : e.id; | |
| return null != r ? r : -1 | |
| } | |
| getNode(t) { | |
| return this.idNodeMap.get(t) || null | |
| } | |
| getIds() { | |
| return Array.from(this.idNodeMap.keys()) | |
| } | |
| getMeta(t) { | |
| return this.nodeMetaMap.get(t) || null | |
| } | |
| removeNodeFromMap(t) { | |
| let e = this.getId(t); | |
| this.idNodeMap.delete(e), | |
| t.childNodes && t.childNodes.forEach(t => this.removeNodeFromMap(t)) | |
| } | |
| has(t) { | |
| return this.idNodeMap.has(t) | |
| } | |
| hasNode(t) { | |
| return this.nodeMetaMap.has(t) | |
| } | |
| add(t, e) { | |
| let r = e.id; | |
| this.idNodeMap.set(r, t), | |
| this.nodeMetaMap.set(t, e) | |
| } | |
| replace(t, e) { | |
| let r = this.getNode(t); | |
| if (r) { | |
| let t = this.nodeMetaMap.get(r); | |
| t && this.nodeMetaMap.set(e, t) | |
| } | |
| this.idNodeMap.set(t, e) | |
| } | |
| reset() { | |
| this.idNodeMap = new Map, | |
| this.nodeMetaMap = new WeakMap | |
| } | |
| } | |
| function P({maskInputOptions: t, tagName: e, type: r}) { | |
| return "OPTION" === e && (e = "SELECT"), | |
| !!(t[e.toLowerCase()] || r && t[r] || "password" === r || "INPUT" === e && !r && t.text) | |
| } | |
| function H({isMasked: t, element: e, value: r, maskInputFn: n}) { | |
| let s = r || ""; | |
| return t ? (n && (s = n(s, e)), | |
| "*".repeat(s.length)) : s | |
| } | |
| function J(t) { | |
| return t.toLowerCase() | |
| } | |
| function j(t) { | |
| return t.toUpperCase() | |
| } | |
| let X = "__rrweb_original__"; | |
| function Q(t) { | |
| let e = t.type; | |
| return t.hasAttribute("data-rr-is-password") ? "password" : e ? J(e) : null | |
| } | |
| function q(t, e, r) { | |
| return "INPUT" === e && ("radio" === r || "checkbox" === r) ? t.getAttribute("value") || "" : t.value | |
| } | |
| let $ = 1 | |
| , tt = RegExp("[^a-z0-9-_:]"); | |
| function te() { | |
| return $++ | |
| } | |
| let tr = /url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm | |
| , tn = /^(?:[a-z+]+:)?\/\//i | |
| , ts = /^www\..*/i | |
| , ti = /^(data:)([^,]*),(.*)/i; | |
| function ta(t, e) { | |
| return (t || "").replace(tr, (t, r, n, s, i, a) => { | |
| let o = n || i || a | |
| , l = r || s || ""; | |
| if (!o) | |
| return t; | |
| if (tn.test(o) || ts.test(o) || ti.test(o)) | |
| return `url(${l}${o}${l})`; | |
| if ("/" === o[0]) | |
| return `url(${l}${(e.indexOf("//") > -1 ? e.split("/").slice(0, 3).join("/") : e.split("/")[0]).split("?")[0] + o}${l})`; | |
| let d = e.split("/") | |
| , u = o.split("/"); | |
| for (let t of (d.pop(), | |
| u)) | |
| "." !== t && (".." === t ? d.pop() : d.push(t)); | |
| return `url(${l}${d.join("/")}${l})` | |
| } | |
| ) | |
| } | |
| let to = /^[^ \t\n\r\u000c]+/ | |
| , tl = /^[, \t\n\r\u000c]+/; | |
| function td(t, e) { | |
| if (!e || "" === e.trim()) | |
| return e; | |
| let r = t.createElement("a"); | |
| return r.href = e, | |
| r.href | |
| } | |
| function tu() { | |
| let t = document.createElement("a"); | |
| return t.href = "", | |
| t.href | |
| } | |
| function th(t, e, r, n, s, i) { | |
| return n ? "src" !== r && ("href" !== r || "use" === e && "#" === n[0]) && ("xlink:href" !== r || "#" === n[0]) && ("background" !== r || "table" !== e && "td" !== e && "th" !== e) ? "srcset" === r ? function(t, e) { | |
| if ("" === e.trim()) | |
| return e; | |
| let r = 0; | |
| function n(t) { | |
| let n; | |
| let s = t.exec(e.substring(r)); | |
| return s ? (n = s[0], | |
| r += n.length, | |
| n) : "" | |
| } | |
| let s = []; | |
| for (; n(tl), | |
| !(r >= e.length); ) { | |
| let i = n(to); | |
| if ("," === i.slice(-1)) | |
| i = td(t, i.substring(0, i.length - 1)), | |
| s.push(i); | |
| else { | |
| let n = ""; | |
| i = td(t, i); | |
| let a = !1; | |
| for (; ; ) { | |
| let t = e.charAt(r); | |
| if ("" === t) { | |
| s.push((i + n).trim()); | |
| break | |
| } | |
| if (a) | |
| ")" === t && (a = !1); | |
| else { | |
| if ("," === t) { | |
| r += 1, | |
| s.push((i + n).trim()); | |
| break | |
| } | |
| "(" === t && (a = !0) | |
| } | |
| n += t, | |
| r += 1 | |
| } | |
| } | |
| } | |
| return s.join(", ") | |
| }(t, n) : "style" === r ? ta(n, tu()) : "object" === e && "data" === r ? td(t, n) : "function" == typeof i ? i(r, n, s) : n : td(t, n) : n | |
| } | |
| function tc(t, e, r) { | |
| return ("video" === t || "audio" === t) && "autoplay" === e | |
| } | |
| function tp(t, e, r=1 / 0, n=0) { | |
| return !t || t.nodeType !== t.ELEMENT_NODE || n > r ? -1 : e(t) ? n : tp(t.parentNode, e, r, n + 1) | |
| } | |
| function tg(t, e) { | |
| return r => { | |
| if (null === r) | |
| return !1; | |
| if (t) { | |
| if ("string" == typeof t) { | |
| if (r.matches(`.${t}`)) | |
| return !0 | |
| } else if (function(t, e) { | |
| for (let r = t.classList.length; r--; ) { | |
| let n = t.classList[r]; | |
| if (e.test(n)) | |
| return !0 | |
| } | |
| return !1 | |
| }(r, t)) | |
| return !0 | |
| } | |
| return !!(e && r.matches(e)) | |
| } | |
| } | |
| function tm(t, e, r, n, s, i) { | |
| try { | |
| let a = t.nodeType === t.ELEMENT_NODE ? t : t.parentElement; | |
| if (null === a) | |
| return !1; | |
| let o = -1 | |
| , l = -1; | |
| if (i) { | |
| if ((l = tp(a, tg(n, s))) < 0) | |
| return !0; | |
| o = tp(a, tg(e, r), l >= 0 ? l : 1 / 0) | |
| } else { | |
| if ((o = tp(a, tg(e, r))) < 0) | |
| return !1; | |
| l = tp(a, tg(n, s), o >= 0 ? o : 1 / 0) | |
| } | |
| return o >= 0 ? !(l >= 0) || o <= l : !(l >= 0) && !!i | |
| } catch (t) {} | |
| return !!i | |
| } | |
| function tf(t) { | |
| return null == t ? "" : t.toLowerCase() | |
| } | |
| function t_(t, e) { | |
| let r; | |
| let {doc: i, mirror: a, blockClass: o, blockSelector: l, unblockSelector: d, maskAllText: u, maskTextClass: h, unmaskTextClass: c, maskTextSelector: p, unmaskTextSelector: g, skipChild: m=!1, inlineStylesheet: f=!0, maskInputOptions: _={}, maskAttributeFn: y, maskTextFn: b, maskInputFn: C, slimDOMOptions: w, dataURLOptions: v={}, inlineImages: S=!1, recordCanvas: A=!1, onSerialize: E, onIframeLoad: k, iframeLoadTimeout: R=5e3, onStylesheetLoad: T, stylesheetLoadTimeout: x=5e3, keepIframeSrcFn: M= () => !1, newlyAddedElement: N=!1} = e | |
| , {preserveWhiteSpace: D=!0} = e | |
| , O = function(t, e) { | |
| let {doc: r, mirror: i, blockClass: a, blockSelector: o, unblockSelector: l, maskAllText: d, maskAttributeFn: u, maskTextClass: h, unmaskTextClass: c, maskTextSelector: p, unmaskTextSelector: g, inlineStylesheet: m, maskInputOptions: f={}, maskTextFn: _, maskInputFn: y, dataURLOptions: b={}, inlineImages: C, recordCanvas: w, keepIframeSrcFn: v, newlyAddedElement: S=!1} = e | |
| , A = function(t, e) { | |
| if (!e.hasNode(t)) | |
| return; | |
| let r = e.getId(t); | |
| return 1 === r ? void 0 : r | |
| }(r, i); | |
| switch (t.nodeType) { | |
| case t.DOCUMENT_NODE: | |
| if ("CSS1Compat" !== t.compatMode) | |
| return { | |
| type: I.Document, | |
| childNodes: [], | |
| compatMode: t.compatMode | |
| }; | |
| return { | |
| type: I.Document, | |
| childNodes: [] | |
| }; | |
| case t.DOCUMENT_TYPE_NODE: | |
| return { | |
| type: I.DocumentType, | |
| name: t.name, | |
| publicId: t.publicId, | |
| systemId: t.systemId, | |
| rootId: A | |
| }; | |
| case t.ELEMENT_NODE: | |
| return function(t, e) { | |
| let r; | |
| let {doc: i, blockClass: a, blockSelector: o, unblockSelector: l, inlineStylesheet: d, maskInputOptions: u={}, maskAttributeFn: h, maskInputFn: c, dataURLOptions: p={}, inlineImages: g, recordCanvas: m, keepIframeSrcFn: f, newlyAddedElement: _=!1, rootId: y, maskAllText: b, maskTextClass: C, unmaskTextClass: w, maskTextSelector: v, unmaskTextSelector: S} = e | |
| , A = function(t, e, r, n) { | |
| try { | |
| if (n && t.matches(n)) | |
| return !1; | |
| if ("string" == typeof e) { | |
| if (t.classList.contains(e)) | |
| return !0 | |
| } else | |
| for (let r = t.classList.length; r--; ) { | |
| let n = t.classList[r]; | |
| if (e.test(n)) | |
| return !0 | |
| } | |
| if (r) | |
| return t.matches(r) | |
| } catch (t) {} | |
| return !1 | |
| }(t, a, o, l) | |
| , E = function(t) { | |
| if (t instanceof HTMLFormElement) | |
| return "form"; | |
| let e = J(t.tagName); | |
| return tt.test(e) ? "div" : e | |
| }(t) | |
| , k = {} | |
| , R = t.attributes.length; | |
| for (let e = 0; e < R; e++) { | |
| let r = t.attributes[e]; | |
| tc(E, r.name, r.value) || (k[r.name] = th(i, E, J(r.name), r.value, t, h)) | |
| } | |
| if ("link" === E && d) { | |
| let e = Array.from(i.styleSheets).find(e => e.href === t.href) | |
| , r = null; | |
| e && (r = V(e)), | |
| r && (delete k.rel, | |
| delete k.href, | |
| k._cssText = ta(r, e.href)) | |
| } | |
| if ("style" === E && t.sheet && !(t.innerText || t.textContent || "").trim().length) { | |
| let e = V(t.sheet); | |
| e && (k._cssText = ta(e, tu())) | |
| } | |
| if ("input" === E || "textarea" === E || "select" === E || "option" === E) { | |
| let e = Q(t) | |
| , r = q(t, j(E), e) | |
| , n = t.checked; | |
| if ("submit" !== e && "button" !== e && r) { | |
| let n = tm(t, C, v, w, S, P({ | |
| type: e, | |
| tagName: j(E), | |
| maskInputOptions: u | |
| })); | |
| k.value = H({ | |
| isMasked: n, | |
| element: t, | |
| value: r, | |
| maskInputFn: c | |
| }) | |
| } | |
| n && (k.checked = n) | |
| } | |
| if ("option" === E && (t.selected && !u.select ? k.selected = !0 : delete k.selected), | |
| "canvas" === E && m) { | |
| if ("2d" === t.__context) | |
| !function(t) { | |
| let e = t.getContext("2d"); | |
| if (!e) | |
| return !0; | |
| for (let r = 0; r < t.width; r += 50) | |
| for (let n = 0; n < t.height; n += 50) { | |
| let s = e.getImageData; | |
| if (new Uint32Array((X in s ? s[X] : s).call(e, r, n, Math.min(50, t.width - r), Math.min(50, t.height - n)).data.buffer).some(t => 0 !== t)) | |
| return !1 | |
| } | |
| return !0 | |
| }(t) && (k.rr_dataURL = t.toDataURL(p.type, p.quality)); | |
| else if (!("__context"in t)) { | |
| let e = t.toDataURL(p.type, p.quality) | |
| , r = document.createElement("canvas"); | |
| r.width = t.width, | |
| r.height = t.height, | |
| e !== r.toDataURL(p.type, p.quality) && (k.rr_dataURL = e) | |
| } | |
| } | |
| if ("img" === E && g) { | |
| n || (s = (n = i.createElement("canvas")).getContext("2d")); | |
| let e = t.crossOrigin; | |
| t.crossOrigin = "anonymous"; | |
| let r = () => { | |
| t.removeEventListener("load", r); | |
| try { | |
| n.width = t.naturalWidth, | |
| n.height = t.naturalHeight, | |
| s.drawImage(t, 0, 0), | |
| k.rr_dataURL = n.toDataURL(p.type, p.quality) | |
| } catch (e) { | |
| console.warn(`Cannot inline img src=${t.currentSrc}! Error: ${e}`) | |
| } | |
| e ? k.crossOrigin = e : t.removeAttribute("crossorigin") | |
| } | |
| ; | |
| t.complete && 0 !== t.naturalWidth ? r() : t.addEventListener("load", r) | |
| } | |
| if (("audio" === E || "video" === E) && (k.rr_mediaState = t.paused ? "paused" : "played", | |
| k.rr_mediaCurrentTime = t.currentTime), | |
| !_ && (t.scrollLeft && (k.rr_scrollLeft = t.scrollLeft), | |
| t.scrollTop && (k.rr_scrollTop = t.scrollTop)), | |
| A) { | |
| let {width: e, height: r} = t.getBoundingClientRect(); | |
| k = { | |
| class: k.class, | |
| rr_width: `${e}px`, | |
| rr_height: `${r}px` | |
| } | |
| } | |
| "iframe" !== E || f(k.src) || (t.contentDocument || (k.rr_src = k.src), | |
| delete k.src); | |
| try { | |
| customElements.get(E) && (r = !0) | |
| } catch (t) {} | |
| return { | |
| type: I.Element, | |
| tagName: E, | |
| attributes: k, | |
| childNodes: [], | |
| isSVG: !!("svg" === t.tagName || t.ownerSVGElement) || void 0, | |
| needBlock: A, | |
| rootId: y, | |
| isCustom: r | |
| } | |
| }(t, { | |
| doc: r, | |
| blockClass: a, | |
| blockSelector: o, | |
| unblockSelector: l, | |
| inlineStylesheet: m, | |
| maskAttributeFn: u, | |
| maskInputOptions: f, | |
| maskInputFn: y, | |
| dataURLOptions: b, | |
| inlineImages: C, | |
| recordCanvas: w, | |
| keepIframeSrcFn: v, | |
| newlyAddedElement: S, | |
| rootId: A, | |
| maskAllText: d, | |
| maskTextClass: h, | |
| unmaskTextClass: c, | |
| maskTextSelector: p, | |
| unmaskTextSelector: g | |
| }); | |
| case t.TEXT_NODE: | |
| return function(t, e) { | |
| var r; | |
| let {maskAllText: n, maskTextClass: s, unmaskTextClass: i, maskTextSelector: a, unmaskTextSelector: o, maskTextFn: l, maskInputOptions: d, maskInputFn: u, rootId: h} = e | |
| , c = t.parentNode && t.parentNode.tagName | |
| , p = t.textContent | |
| , g = "STYLE" === c || void 0 | |
| , m = "SCRIPT" === c || void 0 | |
| , f = "TEXTAREA" === c || void 0; | |
| if (g && p) { | |
| try { | |
| t.nextSibling || t.previousSibling || (null === (r = t.parentNode.sheet) || void 0 === r ? void 0 : r.cssRules) && (p = V(t.parentNode.sheet)) | |
| } catch (e) { | |
| console.warn(`Cannot get CSS styles from text's parentNode. Error: ${e}`, t) | |
| } | |
| p = ta(p, tu()) | |
| } | |
| m && (p = "SCRIPT_PLACEHOLDER"); | |
| let _ = tm(t, s, a, i, o, n); | |
| return g || m || f || !p || !_ || (p = l ? l(p) : p.replace(/[\S]/g, "*")), | |
| f && p && (d.textarea || _) && (p = u ? u(p, t.parentNode) : p.replace(/[\S]/g, "*")), | |
| "OPTION" === c && p && (p = H({ | |
| isMasked: tm(t, s, a, i, o, P({ | |
| type: null, | |
| tagName: c, | |
| maskInputOptions: d | |
| })), | |
| element: t, | |
| value: p, | |
| maskInputFn: u | |
| })), | |
| { | |
| type: I.Text, | |
| textContent: p || "", | |
| isStyle: g, | |
| rootId: h | |
| } | |
| }(t, { | |
| maskAllText: d, | |
| maskTextClass: h, | |
| unmaskTextClass: c, | |
| maskTextSelector: p, | |
| unmaskTextSelector: g, | |
| maskTextFn: _, | |
| maskInputOptions: f, | |
| maskInputFn: y, | |
| rootId: A | |
| }); | |
| case t.CDATA_SECTION_NODE: | |
| return { | |
| type: I.CDATA, | |
| textContent: "", | |
| rootId: A | |
| }; | |
| case t.COMMENT_NODE: | |
| return { | |
| type: I.Comment, | |
| textContent: t.textContent || "", | |
| rootId: A | |
| }; | |
| default: | |
| return !1 | |
| } | |
| }(t, { | |
| doc: i, | |
| mirror: a, | |
| blockClass: o, | |
| blockSelector: l, | |
| maskAllText: u, | |
| unblockSelector: d, | |
| maskTextClass: h, | |
| unmaskTextClass: c, | |
| maskTextSelector: p, | |
| unmaskTextSelector: g, | |
| inlineStylesheet: f, | |
| maskInputOptions: _, | |
| maskAttributeFn: y, | |
| maskTextFn: b, | |
| maskInputFn: C, | |
| dataURLOptions: v, | |
| inlineImages: S, | |
| recordCanvas: A, | |
| keepIframeSrcFn: M, | |
| newlyAddedElement: N | |
| }); | |
| if (!O) | |
| return console.warn(t, "not serialized"), | |
| null; | |
| r = a.hasNode(t) ? a.getId(t) : !function(t, e) { | |
| if (e.comment && t.type === I.Comment) | |
| return !0; | |
| if (t.type === I.Element) { | |
| if (e.script && ("script" === t.tagName || "link" === t.tagName && ("preload" === t.attributes.rel || "modulepreload" === t.attributes.rel) && "script" === t.attributes.as || "link" === t.tagName && "prefetch" === t.attributes.rel && "string" == typeof t.attributes.href && t.attributes.href.endsWith(".js")) || e.headFavicon && ("link" === t.tagName && "shortcut icon" === t.attributes.rel || "meta" === t.tagName && (tf(t.attributes.name).match(/^msapplication-tile(image|color)$/) || "application-name" === tf(t.attributes.name) || "icon" === tf(t.attributes.rel) || "apple-touch-icon" === tf(t.attributes.rel) || "shortcut icon" === tf(t.attributes.rel)))) | |
| return !0; | |
| if ("meta" === t.tagName) { | |
| if (e.headMetaDescKeywords && tf(t.attributes.name).match(/^description|keywords$/) || e.headMetaSocial && (tf(t.attributes.property).match(/^(og|twitter|fb):/) || tf(t.attributes.name).match(/^(og|twitter):/) || "pinterest" === tf(t.attributes.name))) | |
| return !0; | |
| if (e.headMetaRobots && ("robots" === tf(t.attributes.name) || "googlebot" === tf(t.attributes.name) || "bingbot" === tf(t.attributes.name))) | |
| return !0; | |
| if (e.headMetaHttpEquiv && void 0 !== t.attributes["http-equiv"]) | |
| return !0; | |
| else if (e.headMetaAuthorship && ("author" === tf(t.attributes.name) || "generator" === tf(t.attributes.name) || "framework" === tf(t.attributes.name) || "publisher" === tf(t.attributes.name) || "progid" === tf(t.attributes.name) || tf(t.attributes.property).match(/^article:/) || tf(t.attributes.property).match(/^product:/))) | |
| return !0; | |
| else if (e.headMetaVerification && ("google-site-verification" === tf(t.attributes.name) || "yandex-verification" === tf(t.attributes.name) || "csrf-token" === tf(t.attributes.name) || "p:domain_verify" === tf(t.attributes.name) || "verify-v1" === tf(t.attributes.name) || "verification" === tf(t.attributes.name) || "shopify-checkout-api-token" === tf(t.attributes.name))) | |
| return !0 | |
| } | |
| } | |
| return !1 | |
| }(O, w) && (D || O.type !== I.Text || O.isStyle || O.textContent.replace(/^\s+|\s+$/gm, "").length) ? te() : -2; | |
| let U = Object.assign(O, { | |
| id: r | |
| }); | |
| if (a.add(t, U), | |
| -2 === r) | |
| return null; | |
| E && E(t); | |
| let B = !m; | |
| if (U.type === I.Element) { | |
| B = B && !U.needBlock, | |
| delete U.needBlock; | |
| let e = t.shadowRoot; | |
| e && G(e) && (U.isShadowHost = !0) | |
| } | |
| if ((U.type === I.Document || U.type === I.Element) && B) { | |
| w.headWhitespace && U.type === I.Element && "head" === U.tagName && (D = !1); | |
| let e = { | |
| doc: i, | |
| mirror: a, | |
| blockClass: o, | |
| blockSelector: l, | |
| maskAllText: u, | |
| unblockSelector: d, | |
| maskTextClass: h, | |
| unmaskTextClass: c, | |
| maskTextSelector: p, | |
| unmaskTextSelector: g, | |
| skipChild: m, | |
| inlineStylesheet: f, | |
| maskInputOptions: _, | |
| maskAttributeFn: y, | |
| maskTextFn: b, | |
| maskInputFn: C, | |
| slimDOMOptions: w, | |
| dataURLOptions: v, | |
| inlineImages: S, | |
| recordCanvas: A, | |
| preserveWhiteSpace: D, | |
| onSerialize: E, | |
| onIframeLoad: k, | |
| iframeLoadTimeout: R, | |
| onStylesheetLoad: T, | |
| stylesheetLoadTimeout: x, | |
| keepIframeSrcFn: M | |
| }; | |
| for (let r of Array.from(t.childNodes)) { | |
| let t = t_(r, e); | |
| t && U.childNodes.push(t) | |
| } | |
| if (t.nodeType === t.ELEMENT_NODE && t.shadowRoot) | |
| for (let r of Array.from(t.shadowRoot.childNodes)) { | |
| let n = t_(r, e); | |
| n && (G(t.shadowRoot) && (n.isShadow = !0), | |
| U.childNodes.push(n)) | |
| } | |
| } | |
| return t.parentNode && W(t.parentNode) && G(t.parentNode) && (U.isShadow = !0), | |
| U.type === I.Element && "iframe" === U.tagName && function(t, e, r) { | |
| let n; | |
| let s = t.contentWindow; | |
| if (!s) | |
| return; | |
| let i = !1; | |
| try { | |
| n = s.document.readyState | |
| } catch (t) { | |
| return | |
| } | |
| if ("complete" !== n) { | |
| let n = setTimeout( () => { | |
| i || (e(), | |
| i = !0) | |
| } | |
| , r); | |
| t.addEventListener("load", () => { | |
| clearTimeout(n), | |
| i = !0, | |
| e() | |
| } | |
| ); | |
| return | |
| } | |
| let a = "about:blank"; | |
| if (s.location.href !== a || t.src === a || "" === t.src) | |
| return setTimeout(e, 0), | |
| t.addEventListener("load", e); | |
| t.addEventListener("load", e) | |
| }(t, () => { | |
| let e = t.contentDocument; | |
| if (e && k) { | |
| let r = t_(e, { | |
| doc: e, | |
| mirror: a, | |
| blockClass: o, | |
| blockSelector: l, | |
| unblockSelector: d, | |
| maskAllText: u, | |
| maskTextClass: h, | |
| unmaskTextClass: c, | |
| maskTextSelector: p, | |
| unmaskTextSelector: g, | |
| skipChild: !1, | |
| inlineStylesheet: f, | |
| maskInputOptions: _, | |
| maskAttributeFn: y, | |
| maskTextFn: b, | |
| maskInputFn: C, | |
| slimDOMOptions: w, | |
| dataURLOptions: v, | |
| inlineImages: S, | |
| recordCanvas: A, | |
| preserveWhiteSpace: D, | |
| onSerialize: E, | |
| onIframeLoad: k, | |
| iframeLoadTimeout: R, | |
| onStylesheetLoad: T, | |
| stylesheetLoadTimeout: x, | |
| keepIframeSrcFn: M | |
| }); | |
| r && k(t, r) | |
| } | |
| } | |
| , R), | |
| U.type === I.Element && "link" === U.tagName && "stylesheet" === U.attributes.rel && function(t, e, r) { | |
| let n, s = !1; | |
| try { | |
| n = t.sheet | |
| } catch (t) { | |
| return | |
| } | |
| if (n) | |
| return; | |
| let i = setTimeout( () => { | |
| s || (e(), | |
| s = !0) | |
| } | |
| , r); | |
| t.addEventListener("load", () => { | |
| clearTimeout(i), | |
| s = !0, | |
| e() | |
| } | |
| ) | |
| }(t, () => { | |
| if (T) { | |
| let e = t_(t, { | |
| doc: i, | |
| mirror: a, | |
| blockClass: o, | |
| blockSelector: l, | |
| unblockSelector: d, | |
| maskAllText: u, | |
| maskTextClass: h, | |
| unmaskTextClass: c, | |
| maskTextSelector: p, | |
| unmaskTextSelector: g, | |
| skipChild: !1, | |
| inlineStylesheet: f, | |
| maskInputOptions: _, | |
| maskAttributeFn: y, | |
| maskTextFn: b, | |
| maskInputFn: C, | |
| slimDOMOptions: w, | |
| dataURLOptions: v, | |
| inlineImages: S, | |
| recordCanvas: A, | |
| preserveWhiteSpace: D, | |
| onSerialize: E, | |
| onIframeLoad: k, | |
| iframeLoadTimeout: R, | |
| onStylesheetLoad: T, | |
| stylesheetLoadTimeout: x, | |
| keepIframeSrcFn: M | |
| }); | |
| e && T(t, e) | |
| } | |
| } | |
| , x), | |
| U | |
| } | |
| function ty(t, e, r=document) { | |
| let n = { | |
| capture: !0, | |
| passive: !0 | |
| }; | |
| return r.addEventListener(t, e, n), | |
| () => r.removeEventListener(t, e, n) | |
| } | |
| let tI = "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." | |
| , tb = { | |
| map: {}, | |
| getId: () => (console.error(tI), | |
| -1), | |
| getNode: () => (console.error(tI), | |
| null), | |
| removeNodeFromMap() { | |
| console.error(tI) | |
| }, | |
| has: () => (console.error(tI), | |
| !1), | |
| reset() { | |
| console.error(tI) | |
| } | |
| }; | |
| function tC(t, e, r={}) { | |
| let n = null | |
| , s = 0; | |
| return function(...i) { | |
| let a = Date.now(); | |
| s || !1 !== r.leading || (s = a); | |
| let o = e - (a - s) | |
| , l = this; | |
| o <= 0 || o > e ? (n && (clearTimeout(n), | |
| n = null), | |
| s = a, | |
| t.apply(l, i)) : n || !1 === r.trailing || (n = setTimeout( () => { | |
| s = !1 === r.leading ? 0 : Date.now(), | |
| n = null, | |
| t.apply(l, i) | |
| } | |
| , o)) | |
| } | |
| } | |
| function tw(t, e, r, n, s=window) { | |
| let i = s.Object.getOwnPropertyDescriptor(t, e); | |
| return s.Object.defineProperty(t, e, n ? r : { | |
| set(t) { | |
| setTimeout( () => { | |
| r.set.call(this, t) | |
| } | |
| , 0), | |
| i && i.set && i.set.call(this, t) | |
| } | |
| }), | |
| () => tw(t, e, i || {}, !0) | |
| } | |
| function tv(t, e, r) { | |
| try { | |
| if (!(e in t)) | |
| return () => {} | |
| ; | |
| let n = t[e] | |
| , s = r(n); | |
| return "function" == typeof s && (s.prototype = s.prototype || {}, | |
| Object.defineProperties(s, { | |
| __rrweb_original__: { | |
| enumerable: !1, | |
| value: n | |
| } | |
| })), | |
| t[e] = s, | |
| () => { | |
| t[e] = n | |
| } | |
| } catch (t) { | |
| return () => {} | |
| } | |
| } | |
| "undefined" != typeof window && window.Proxy && window.Reflect && (tb = new Proxy(tb,{ | |
| get: (t, e, r) => ("map" === e && console.error(tI), | |
| Reflect.get(t, e, r)) | |
| })); | |
| let tS = Date.now; | |
| function tA(t) { | |
| var e, r, n, s, i, a; | |
| let o = t.document; | |
| return { | |
| left: o.scrollingElement ? o.scrollingElement.scrollLeft : void 0 !== t.pageXOffset ? t.pageXOffset : (null == o ? void 0 : o.documentElement.scrollLeft) || (null === (r = null === (e = null == o ? void 0 : o.body) || void 0 === e ? void 0 : e.parentElement) || void 0 === r ? void 0 : r.scrollLeft) || (null === (n = null == o ? void 0 : o.body) || void 0 === n ? void 0 : n.scrollLeft) || 0, | |
| top: o.scrollingElement ? o.scrollingElement.scrollTop : void 0 !== t.pageYOffset ? t.pageYOffset : (null == o ? void 0 : o.documentElement.scrollTop) || (null === (i = null === (s = null == o ? void 0 : o.body) || void 0 === s ? void 0 : s.parentElement) || void 0 === i ? void 0 : i.scrollTop) || (null === (a = null == o ? void 0 : o.body) || void 0 === a ? void 0 : a.scrollTop) || 0 | |
| } | |
| } | |
| function tE() { | |
| return window.innerHeight || document.documentElement && document.documentElement.clientHeight || document.body && document.body.clientHeight | |
| } | |
| function tk() { | |
| return window.innerWidth || document.documentElement && document.documentElement.clientWidth || document.body && document.body.clientWidth | |
| } | |
| function tR(t, e, r, n, s) { | |
| if (!t) | |
| return !1; | |
| let i = t.nodeType === t.ELEMENT_NODE ? t : t.parentElement; | |
| if (!i) | |
| return !1; | |
| let a = tg(e, r); | |
| if (!s) { | |
| let t = n && i.matches(n); | |
| return a(i) && !t | |
| } | |
| let o = tp(i, a) | |
| , l = -1; | |
| return !(o < 0) && (n && (l = tp(i, tg(null, n))), | |
| o > -1 && l < 0 || o < l) | |
| } | |
| function tT(t, e) { | |
| return -2 === e.getId(t) | |
| } | |
| function tx(t) { | |
| return !!t.changedTouches | |
| } | |
| function tM(t, e) { | |
| return !!("IFRAME" === t.nodeName && e.getMeta(t)) | |
| } | |
| function tN(t, e) { | |
| return !!("LINK" === t.nodeName && t.nodeType === t.ELEMENT_NODE && t.getAttribute && "stylesheet" === t.getAttribute("rel") && e.getMeta(t)) | |
| } | |
| function tD(t) { | |
| return !!(null == t ? void 0 : t.shadowRoot) | |
| } | |
| /[1-9][0-9]{12}/.test(Date.now().toString()) || (tS = () => new Date().getTime()); | |
| class tO { | |
| constructor() { | |
| this.id = 1, | |
| this.styleIDMap = new WeakMap, | |
| this.idStyleMap = new Map | |
| } | |
| getId(t) { | |
| var e; | |
| return null !== (e = this.styleIDMap.get(t)) && void 0 !== e ? e : -1 | |
| } | |
| has(t) { | |
| return this.styleIDMap.has(t) | |
| } | |
| add(t, e) { | |
| let r; | |
| return this.has(t) ? this.getId(t) : (r = void 0 === e ? this.id++ : e, | |
| this.styleIDMap.set(t, r), | |
| this.idStyleMap.set(r, t), | |
| r) | |
| } | |
| getStyle(t) { | |
| return this.idStyleMap.get(t) || null | |
| } | |
| reset() { | |
| this.styleIDMap = new WeakMap, | |
| this.idStyleMap = new Map, | |
| this.id = 1 | |
| } | |
| generateId() { | |
| return this.id++ | |
| } | |
| } | |
| function tU(t) { | |
| var e, r; | |
| let n = null; | |
| return (null === (r = null === (e = t.getRootNode) || void 0 === e ? void 0 : e.call(t)) || void 0 === r ? void 0 : r.nodeType) === Node.DOCUMENT_FRAGMENT_NODE && t.getRootNode().host && (n = t.getRootNode().host), | |
| n | |
| } | |
| function tB(t) { | |
| let e = t.ownerDocument; | |
| return !!e && (e.contains(t) || function(t) { | |
| let e = t.ownerDocument; | |
| if (!e) | |
| return !1; | |
| let r = function(t) { | |
| let e, r = t; | |
| for (; e = tU(r); ) | |
| r = e; | |
| return r | |
| }(t); | |
| return e.contains(r) | |
| }(t)) | |
| } | |
| var tL = ((h = tL || {})[h.DomContentLoaded = 0] = "DomContentLoaded", | |
| h[h.Load = 1] = "Load", | |
| h[h.FullSnapshot = 2] = "FullSnapshot", | |
| h[h.IncrementalSnapshot = 3] = "IncrementalSnapshot", | |
| h[h.Meta = 4] = "Meta", | |
| h[h.Custom = 5] = "Custom", | |
| h[h.Plugin = 6] = "Plugin", | |
| h) | |
| , tF = ((c = tF || {})[c.Mutation = 0] = "Mutation", | |
| c[c.MouseMove = 1] = "MouseMove", | |
| c[c.MouseInteraction = 2] = "MouseInteraction", | |
| c[c.Scroll = 3] = "Scroll", | |
| c[c.ViewportResize = 4] = "ViewportResize", | |
| c[c.Input = 5] = "Input", | |
| c[c.TouchMove = 6] = "TouchMove", | |
| c[c.MediaInteraction = 7] = "MediaInteraction", | |
| c[c.StyleSheetRule = 8] = "StyleSheetRule", | |
| c[c.CanvasMutation = 9] = "CanvasMutation", | |
| c[c.Font = 10] = "Font", | |
| c[c.Log = 11] = "Log", | |
| c[c.Drag = 12] = "Drag", | |
| c[c.StyleDeclaration = 13] = "StyleDeclaration", | |
| c[c.Selection = 14] = "Selection", | |
| c[c.AdoptedStyleSheet = 15] = "AdoptedStyleSheet", | |
| c[c.CustomElement = 16] = "CustomElement", | |
| c) | |
| , tz = ((p = tz || {})[p.MouseUp = 0] = "MouseUp", | |
| p[p.MouseDown = 1] = "MouseDown", | |
| p[p.Click = 2] = "Click", | |
| p[p.ContextMenu = 3] = "ContextMenu", | |
| p[p.DblClick = 4] = "DblClick", | |
| p[p.Focus = 5] = "Focus", | |
| p[p.Blur = 6] = "Blur", | |
| p[p.TouchStart = 7] = "TouchStart", | |
| p[p.TouchMove_Departed = 8] = "TouchMove_Departed", | |
| p[p.TouchEnd = 9] = "TouchEnd", | |
| p[p.TouchCancel = 10] = "TouchCancel", | |
| p) | |
| , tZ = ((g = tZ || {})[g.Mouse = 0] = "Mouse", | |
| g[g.Pen = 1] = "Pen", | |
| g[g.Touch = 2] = "Touch", | |
| g) | |
| , tW = ((m = tW || {})[m["2D"] = 0] = "2D", | |
| m[m.WebGL = 1] = "WebGL", | |
| m[m.WebGL2 = 2] = "WebGL2", | |
| m); | |
| class tG { | |
| constructor() { | |
| this.length = 0, | |
| this.head = null, | |
| this.tail = null | |
| } | |
| get(t) { | |
| if (t >= this.length) | |
| throw Error("Position outside of list range"); | |
| let e = this.head; | |
| for (let r = 0; r < t; r++) | |
| e = (null == e ? void 0 : e.next) || null; | |
| return e | |
| } | |
| addNode(t) { | |
| let e = { | |
| value: t, | |
| previous: null, | |
| next: null | |
| }; | |
| if (t.__ln = e, | |
| t.previousSibling && "__ln"in t.previousSibling) { | |
| let r = t.previousSibling.__ln.next; | |
| e.next = r, | |
| e.previous = t.previousSibling.__ln, | |
| t.previousSibling.__ln.next = e, | |
| r && (r.previous = e) | |
| } else if (t.nextSibling && "__ln"in t.nextSibling && t.nextSibling.__ln.previous) { | |
| let r = t.nextSibling.__ln.previous; | |
| e.previous = r, | |
| e.next = t.nextSibling.__ln, | |
| t.nextSibling.__ln.previous = e, | |
| r && (r.next = e) | |
| } else | |
| this.head && (this.head.previous = e), | |
| e.next = this.head, | |
| this.head = e; | |
| null === e.next && (this.tail = e), | |
| this.length++ | |
| } | |
| removeNode(t) { | |
| let e = t.__ln; | |
| this.head && (e.previous ? (e.previous.next = e.next, | |
| e.next ? e.next.previous = e.previous : this.tail = e.previous) : (this.head = e.next, | |
| this.head ? this.head.previous = null : this.tail = null), | |
| t.__ln && delete t.__ln, | |
| this.length--) | |
| } | |
| } | |
| let tV = (t, e) => `${t}@${e}`; | |
| class tK { | |
| constructor() { | |
| this.frozen = !1, | |
| this.locked = !1, | |
| this.texts = [], | |
| this.attributes = [], | |
| this.removes = [], | |
| this.mapRemoves = [], | |
| this.movedMap = {}, | |
| this.addedSet = new Set, | |
| this.movedSet = new Set, | |
| this.droppedSet = new Set, | |
| this.processMutations = t => { | |
| t.forEach(this.processMutation), | |
| this.emit() | |
| } | |
| , | |
| this.emit = () => { | |
| if (this.frozen || this.locked) | |
| return; | |
| let t = [] | |
| , e = new Set | |
| , r = new tG | |
| , n = t => { | |
| let e = t | |
| , r = -2; | |
| for (; -2 === r; ) | |
| r = (e = e && e.nextSibling) && this.mirror.getId(e); | |
| return r | |
| } | |
| , s = s => { | |
| if (!s.parentNode || !tB(s)) | |
| return; | |
| let i = W(s.parentNode) ? this.mirror.getId(tU(s)) : this.mirror.getId(s.parentNode) | |
| , a = n(s); | |
| if (-1 === i || -1 === a) | |
| return r.addNode(s); | |
| let o = t_(s, { | |
| doc: this.doc, | |
| mirror: this.mirror, | |
| blockClass: this.blockClass, | |
| blockSelector: this.blockSelector, | |
| maskAllText: this.maskAllText, | |
| unblockSelector: this.unblockSelector, | |
| maskTextClass: this.maskTextClass, | |
| unmaskTextClass: this.unmaskTextClass, | |
| maskTextSelector: this.maskTextSelector, | |
| unmaskTextSelector: this.unmaskTextSelector, | |
| skipChild: !0, | |
| newlyAddedElement: !0, | |
| inlineStylesheet: this.inlineStylesheet, | |
| maskInputOptions: this.maskInputOptions, | |
| maskAttributeFn: this.maskAttributeFn, | |
| maskTextFn: this.maskTextFn, | |
| maskInputFn: this.maskInputFn, | |
| slimDOMOptions: this.slimDOMOptions, | |
| dataURLOptions: this.dataURLOptions, | |
| recordCanvas: this.recordCanvas, | |
| inlineImages: this.inlineImages, | |
| onSerialize: t => { | |
| tM(t, this.mirror) && this.iframeManager.addIframe(t), | |
| tN(t, this.mirror) && this.stylesheetManager.trackLinkElement(t), | |
| tD(s) && this.shadowDomManager.addShadowRoot(s.shadowRoot, this.doc) | |
| } | |
| , | |
| onIframeLoad: (t, e) => { | |
| this.iframeManager.attachIframe(t, e), | |
| this.shadowDomManager.observeAttachShadow(t) | |
| } | |
| , | |
| onStylesheetLoad: (t, e) => { | |
| this.stylesheetManager.attachLinkElement(t, e) | |
| } | |
| }); | |
| o && (t.push({ | |
| parentId: i, | |
| nextId: a, | |
| node: o | |
| }), | |
| e.add(o.id)) | |
| } | |
| ; | |
| for (; this.mapRemoves.length; ) | |
| this.mirror.removeNodeFromMap(this.mapRemoves.shift()); | |
| for (let t of this.movedSet) | |
| (!tP(this.removes, t, this.mirror) || this.movedSet.has(t.parentNode)) && s(t); | |
| for (let t of this.addedSet) | |
| tH(this.droppedSet, t) || tP(this.removes, t, this.mirror) ? tH(this.movedSet, t) ? s(t) : this.droppedSet.add(t) : s(t); | |
| let i = null; | |
| for (; r.length; ) { | |
| let t = null; | |
| if (i) { | |
| let e = this.mirror.getId(i.value.parentNode) | |
| , r = n(i.value); | |
| -1 !== e && -1 !== r && (t = i) | |
| } | |
| if (!t) { | |
| let e = r.tail; | |
| for (; e; ) { | |
| let r = e; | |
| if (e = e.previous, | |
| r) { | |
| let e = this.mirror.getId(r.value.parentNode); | |
| if (-1 === n(r.value)) | |
| continue; | |
| if (-1 !== e) { | |
| t = r; | |
| break | |
| } | |
| { | |
| let e = r.value; | |
| if (e.parentNode && e.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { | |
| let n = e.parentNode.host; | |
| if (-1 !== this.mirror.getId(n)) { | |
| t = r; | |
| break | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| if (!t) { | |
| for (; r.head; ) | |
| r.removeNode(r.head.value); | |
| break | |
| } | |
| i = t.previous, | |
| r.removeNode(t.value), | |
| s(t.value) | |
| } | |
| let a = { | |
| texts: this.texts.map(t => ({ | |
| id: this.mirror.getId(t.node), | |
| value: t.value | |
| })).filter(t => !e.has(t.id)).filter(t => this.mirror.has(t.id)), | |
| attributes: this.attributes.map(t => { | |
| let {attributes: e} = t; | |
| if ("string" == typeof e.style) { | |
| let r = JSON.stringify(t.styleDiff) | |
| , n = JSON.stringify(t._unchangedStyles); | |
| r.length < e.style.length && (r + n).split("var(").length === e.style.split("var(").length && (e.style = t.styleDiff) | |
| } | |
| return { | |
| id: this.mirror.getId(t.node), | |
| attributes: e | |
| } | |
| } | |
| ).filter(t => !e.has(t.id)).filter(t => this.mirror.has(t.id)), | |
| removes: this.removes, | |
| adds: t | |
| }; | |
| (a.texts.length || a.attributes.length || a.removes.length || a.adds.length) && (this.texts = [], | |
| this.attributes = [], | |
| this.removes = [], | |
| this.addedSet = new Set, | |
| this.movedSet = new Set, | |
| this.droppedSet = new Set, | |
| this.movedMap = {}, | |
| this.mutationCb(a)) | |
| } | |
| , | |
| this.processMutation = t => { | |
| let e; | |
| if (!tT(t.target, this.mirror)) { | |
| try { | |
| e = document.implementation.createHTMLDocument() | |
| } catch (t) { | |
| e = this.doc | |
| } | |
| switch (t.type) { | |
| case "characterData": | |
| { | |
| let e = t.target.textContent; | |
| tR(t.target, this.blockClass, this.blockSelector, this.unblockSelector, !1) || e === t.oldValue || this.texts.push({ | |
| value: tm(t.target, this.maskTextClass, this.maskTextSelector, this.unmaskTextClass, this.unmaskTextSelector, this.maskAllText) && e ? this.maskTextFn ? this.maskTextFn(e) : e.replace(/[\S]/g, "*") : e, | |
| node: t.target | |
| }); | |
| break | |
| } | |
| case "attributes": | |
| { | |
| let r = t.target | |
| , n = t.attributeName | |
| , s = t.target.getAttribute(n); | |
| if ("value" === n) { | |
| let e = Q(r) | |
| , n = r.tagName; | |
| s = q(r, n, e); | |
| let i = P({ | |
| maskInputOptions: this.maskInputOptions, | |
| tagName: n, | |
| type: e | |
| }); | |
| s = H({ | |
| isMasked: tm(t.target, this.maskTextClass, this.maskTextSelector, this.unmaskTextClass, this.unmaskTextSelector, i), | |
| element: r, | |
| value: s, | |
| maskInputFn: this.maskInputFn | |
| }) | |
| } | |
| if (tR(t.target, this.blockClass, this.blockSelector, this.unblockSelector, !1) || s === t.oldValue) | |
| return; | |
| let i = this.attributes.find(e => e.node === t.target); | |
| if ("IFRAME" === r.tagName && "src" === n && !this.keepIframeSrcFn(s)) { | |
| if (r.contentDocument) | |
| return; | |
| n = "rr_src" | |
| } | |
| if (i || (i = { | |
| node: t.target, | |
| attributes: {}, | |
| styleDiff: {}, | |
| _unchangedStyles: {} | |
| }, | |
| this.attributes.push(i)), | |
| "type" === n && "INPUT" === r.tagName && "password" === (t.oldValue || "").toLowerCase() && r.setAttribute("data-rr-is-password", "true"), | |
| !tc(r.tagName, n) && (i.attributes[n] = th(this.doc, J(r.tagName), J(n), s, r, this.maskAttributeFn), | |
| "style" === n)) { | |
| let n = e.createElement("span"); | |
| for (let e of (t.oldValue && n.setAttribute("style", t.oldValue), | |
| Array.from(r.style))) { | |
| let t = r.style.getPropertyValue(e) | |
| , s = r.style.getPropertyPriority(e); | |
| t !== n.style.getPropertyValue(e) || s !== n.style.getPropertyPriority(e) ? "" === s ? i.styleDiff[e] = t : i.styleDiff[e] = [t, s] : i._unchangedStyles[e] = [t, s] | |
| } | |
| for (let t of Array.from(n.style)) | |
| "" === r.style.getPropertyValue(t) && (i.styleDiff[t] = !1) | |
| } | |
| break | |
| } | |
| case "childList": | |
| if (tR(t.target, this.blockClass, this.blockSelector, this.unblockSelector, !0)) | |
| return; | |
| t.addedNodes.forEach(e => this.genAdds(e, t.target)), | |
| t.removedNodes.forEach(e => { | |
| let r = this.mirror.getId(e) | |
| , n = W(t.target) ? this.mirror.getId(t.target.host) : this.mirror.getId(t.target); | |
| tR(t.target, this.blockClass, this.blockSelector, this.unblockSelector, !1) || tT(e, this.mirror) || -1 === this.mirror.getId(e) || (this.addedSet.has(e) ? (tY(this.addedSet, e), | |
| this.droppedSet.add(e)) : this.addedSet.has(t.target) && -1 === r || function t(e, r) { | |
| if (W(e)) | |
| return !1; | |
| let n = r.getId(e); | |
| return !r.has(n) || (!e.parentNode || e.parentNode.nodeType !== e.DOCUMENT_NODE) && (!e.parentNode || t(e.parentNode, r)) | |
| }(t.target, this.mirror) || (this.movedSet.has(e) && this.movedMap[tV(r, n)] ? tY(this.movedSet, e) : this.removes.push({ | |
| parentId: n, | |
| id: r, | |
| isShadow: !!(W(t.target) && G(t.target)) || void 0 | |
| })), | |
| this.mapRemoves.push(e)) | |
| } | |
| ) | |
| } | |
| } | |
| } | |
| , | |
| this.genAdds = (t, e) => { | |
| if (!this.processedNodeManager.inOtherBuffer(t, this) && !(this.addedSet.has(t) || this.movedSet.has(t))) { | |
| if (this.mirror.hasNode(t)) { | |
| if (tT(t, this.mirror)) | |
| return; | |
| this.movedSet.add(t); | |
| let r = null; | |
| e && this.mirror.hasNode(e) && (r = this.mirror.getId(e)), | |
| r && -1 !== r && (this.movedMap[tV(this.mirror.getId(t), r)] = !0) | |
| } else | |
| this.addedSet.add(t), | |
| this.droppedSet.delete(t); | |
| !tR(t, this.blockClass, this.blockSelector, this.unblockSelector, !1) && (t.childNodes.forEach(t => this.genAdds(t)), | |
| tD(t) && t.shadowRoot.childNodes.forEach(e => { | |
| this.processedNodeManager.add(e, this), | |
| this.genAdds(e, t) | |
| } | |
| )) | |
| } | |
| } | |
| } | |
| init(t) { | |
| ["mutationCb", "blockClass", "blockSelector", "unblockSelector", "maskAllText", "maskTextClass", "unmaskTextClass", "maskTextSelector", "unmaskTextSelector", "inlineStylesheet", "maskInputOptions", "maskAttributeFn", "maskTextFn", "maskInputFn", "keepIframeSrcFn", "recordCanvas", "inlineImages", "slimDOMOptions", "dataURLOptions", "doc", "mirror", "iframeManager", "stylesheetManager", "shadowDomManager", "canvasManager", "processedNodeManager"].forEach(e => { | |
| this[e] = t[e] | |
| } | |
| ) | |
| } | |
| 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() | |
| } | |
| } | |
| function tY(t, e) { | |
| t.delete(e), | |
| e.childNodes.forEach(e => tY(t, e)) | |
| } | |
| function tP(t, e, r) { | |
| return 0 !== t.length && function t(e, r, n) { | |
| let {parentNode: s} = r; | |
| if (!s) | |
| return !1; | |
| let i = n.getId(s); | |
| return !!e.some(t => t.id === i) || t(e, s, n) | |
| }(t, e, r) | |
| } | |
| function tH(t, e) { | |
| return 0 !== t.size && function t(e, r) { | |
| let {parentNode: n} = r; | |
| return !!n && (!!e.has(n) || t(e, n)) | |
| }(t, e) | |
| } | |
| let tJ = t => i ? (...e) => { | |
| try { | |
| return t(...e) | |
| } catch (t) { | |
| if (i && !0 === i(t)) | |
| return () => {} | |
| ; | |
| throw t | |
| } | |
| } | |
| : t | |
| , tj = []; | |
| function tX(t) { | |
| try { | |
| if ("composedPath"in t) { | |
| let e = t.composedPath(); | |
| if (e.length) | |
| return e[0] | |
| } else if ("path"in t && t.path.length) | |
| return t.path[0] | |
| } catch (t) {} | |
| return t && t.target | |
| } | |
| function tQ(t, e) { | |
| var r, n; | |
| let s = new tK; | |
| tj.push(s), | |
| s.init(t); | |
| let i = window.MutationObserver || window.__rrMutationObserver | |
| , a = null === (n = null === (r = null == window ? void 0 : window.Zone) || void 0 === r ? void 0 : r.__symbol__) || void 0 === n ? void 0 : n.call(r, "MutationObserver"); | |
| a && window[a] && (i = window[a]); | |
| let o = new i(tJ(e => { | |
| t.onMutation && !1 === t.onMutation(e) || s.processMutations.bind(s)(e) | |
| } | |
| )); | |
| return o.observe(e, { | |
| attributes: !0, | |
| attributeOldValue: !0, | |
| characterData: !0, | |
| characterDataOldValue: !0, | |
| childList: !0, | |
| subtree: !0 | |
| }), | |
| o | |
| } | |
| function tq({scrollCb: t, doc: e, mirror: r, blockClass: n, blockSelector: s, unblockSelector: i, sampling: a}) { | |
| return ty("scroll", tJ(tC(tJ(a => { | |
| let o = tX(a); | |
| if (!o || tR(o, n, s, i, !0)) | |
| return; | |
| let l = r.getId(o); | |
| if (o === e && e.defaultView) { | |
| let r = tA(e.defaultView); | |
| t({ | |
| id: l, | |
| x: r.left, | |
| y: r.top | |
| }) | |
| } else | |
| t({ | |
| id: l, | |
| x: o.scrollLeft, | |
| y: o.scrollTop | |
| }) | |
| } | |
| ), a.scroll || 100)), e) | |
| } | |
| function t$(t, e) { | |
| let r = Object.assign({}, t); | |
| return e || delete r.userTriggered, | |
| r | |
| } | |
| let t0 = ["INPUT", "TEXTAREA", "SELECT"] | |
| , t1 = new WeakMap; | |
| function t2(t) { | |
| var e; | |
| return e = [], | |
| t9("CSSGroupingRule") && t.parentRule instanceof CSSGroupingRule || t9("CSSMediaRule") && t.parentRule instanceof CSSMediaRule || t9("CSSSupportsRule") && t.parentRule instanceof CSSSupportsRule || t9("CSSConditionRule") && t.parentRule instanceof CSSConditionRule ? e.unshift(Array.from(t.parentRule.cssRules).indexOf(t)) : t.parentStyleSheet && e.unshift(Array.from(t.parentStyleSheet.cssRules).indexOf(t)), | |
| e | |
| } | |
| function t5(t, e, r) { | |
| let n, s; | |
| return t ? (t.ownerNode ? n = e.getId(t.ownerNode) : s = r.getId(t), | |
| { | |
| styleId: s, | |
| id: n | |
| }) : {} | |
| } | |
| function t3({mirror: t, stylesheetManager: e}, r) { | |
| var n, s, i; | |
| let a = null; | |
| a = "#document" === r.nodeName ? t.getId(r) : t.getId(r.host); | |
| let o = "#document" === r.nodeName ? null === (n = r.defaultView) || void 0 === n ? void 0 : n.Document : null === (i = null === (s = r.ownerDocument) || void 0 === s ? void 0 : s.defaultView) || void 0 === i ? void 0 : i.ShadowRoot | |
| , l = (null == o ? void 0 : o.prototype) ? Object.getOwnPropertyDescriptor(null == o ? void 0 : o.prototype, "adoptedStyleSheets") : void 0; | |
| return null !== a && -1 !== a && o && l ? (Object.defineProperty(r, "adoptedStyleSheets", { | |
| configurable: l.configurable, | |
| enumerable: l.enumerable, | |
| get() { | |
| var t; | |
| return null === (t = l.get) || void 0 === t ? void 0 : t.call(this) | |
| }, | |
| set(t) { | |
| var r; | |
| let n = null === (r = l.set) || void 0 === r ? void 0 : r.call(this, t); | |
| if (null !== a && -1 !== a) | |
| try { | |
| e.adoptStyleSheets(t, a) | |
| } catch (t) {} | |
| return n | |
| } | |
| }), | |
| tJ( () => { | |
| Object.defineProperty(r, "adoptedStyleSheets", { | |
| configurable: l.configurable, | |
| enumerable: l.enumerable, | |
| get: l.get, | |
| set: l.set | |
| }) | |
| } | |
| )) : () => {} | |
| } | |
| function t6(t, e={}) { | |
| let r = t.doc.defaultView; | |
| if (!r) | |
| return () => {} | |
| ; | |
| !function(t, e) { | |
| let {mutationCb: r, mousemoveCb: n, mouseInteractionCb: s, scrollCb: i, viewportResizeCb: a, inputCb: o, mediaInteractionCb: l, styleSheetRuleCb: d, styleDeclarationCb: u, canvasMutationCb: h, fontCb: c, selectionCb: p, customElementCb: g} = t; | |
| t.mutationCb = (...t) => { | |
| e.mutation && e.mutation(...t), | |
| r(...t) | |
| } | |
| , | |
| t.mousemoveCb = (...t) => { | |
| e.mousemove && e.mousemove(...t), | |
| n(...t) | |
| } | |
| , | |
| t.mouseInteractionCb = (...t) => { | |
| e.mouseInteraction && e.mouseInteraction(...t), | |
| s(...t) | |
| } | |
| , | |
| t.scrollCb = (...t) => { | |
| e.scroll && e.scroll(...t), | |
| i(...t) | |
| } | |
| , | |
| t.viewportResizeCb = (...t) => { | |
| e.viewportResize && e.viewportResize(...t), | |
| a(...t) | |
| } | |
| , | |
| t.inputCb = (...t) => { | |
| e.input && e.input(...t), | |
| o(...t) | |
| } | |
| , | |
| t.mediaInteractionCb = (...t) => { | |
| e.mediaInteaction && e.mediaInteaction(...t), | |
| l(...t) | |
| } | |
| , | |
| t.styleSheetRuleCb = (...t) => { | |
| e.styleSheetRule && e.styleSheetRule(...t), | |
| d(...t) | |
| } | |
| , | |
| t.styleDeclarationCb = (...t) => { | |
| e.styleDeclaration && e.styleDeclaration(...t), | |
| u(...t) | |
| } | |
| , | |
| t.canvasMutationCb = (...t) => { | |
| e.canvasMutation && e.canvasMutation(...t), | |
| h(...t) | |
| } | |
| , | |
| t.fontCb = (...t) => { | |
| e.font && e.font(...t), | |
| c(...t) | |
| } | |
| , | |
| t.selectionCb = (...t) => { | |
| e.selection && e.selection(...t), | |
| p(...t) | |
| } | |
| , | |
| t.customElementCb = (...t) => { | |
| e.customElement && e.customElement(...t), | |
| g(...t) | |
| } | |
| }(t, e); | |
| let n = tQ(t, t.doc) | |
| , s = function({mousemoveCb: t, sampling: e, doc: r, mirror: n}) { | |
| let s; | |
| if (!1 === e.mousemove) | |
| return () => {} | |
| ; | |
| let i = "number" == typeof e.mousemove ? e.mousemove : 50 | |
| , a = "number" == typeof e.mousemoveCallback ? e.mousemoveCallback : 500 | |
| , o = [] | |
| , l = tC(tJ(e => { | |
| let r = Date.now() - s; | |
| t(o.map(t => (t.timeOffset -= r, | |
| t)), e), | |
| o = [], | |
| s = null | |
| } | |
| ), a) | |
| , d = tJ(tC(tJ(t => { | |
| let e = tX(t) | |
| , {clientX: r, clientY: i} = tx(t) ? t.changedTouches[0] : t; | |
| s || (s = tS()), | |
| o.push({ | |
| x: r, | |
| y: i, | |
| id: n.getId(e), | |
| timeOffset: tS() - s | |
| }), | |
| l("undefined" != typeof DragEvent && t instanceof DragEvent ? tF.Drag : t instanceof MouseEvent ? tF.MouseMove : tF.TouchMove) | |
| } | |
| ), i, { | |
| trailing: !1 | |
| })) | |
| , u = [ty("mousemove", d, r), ty("touchmove", d, r), ty("drag", d, r)]; | |
| return tJ( () => { | |
| u.forEach(t => t()) | |
| } | |
| ) | |
| }(t) | |
| , i = function({mouseInteractionCb: t, doc: e, mirror: r, blockClass: n, blockSelector: s, unblockSelector: i, sampling: a}) { | |
| if (!1 === a.mouseInteraction) | |
| return () => {} | |
| ; | |
| let o = !0 === a.mouseInteraction || void 0 === a.mouseInteraction ? {} : a.mouseInteraction | |
| , l = [] | |
| , d = null | |
| , u = e => a => { | |
| let o = tX(a); | |
| if (tR(o, n, s, i, !0)) | |
| return; | |
| let l = null | |
| , u = e; | |
| if ("pointerType"in a) { | |
| switch (a.pointerType) { | |
| case "mouse": | |
| l = tZ.Mouse; | |
| break; | |
| case "touch": | |
| l = tZ.Touch; | |
| break; | |
| case "pen": | |
| l = tZ.Pen | |
| } | |
| l === tZ.Touch ? tz[e] === tz.MouseDown ? u = "TouchStart" : tz[e] === tz.MouseUp && (u = "TouchEnd") : tZ.Pen | |
| } else | |
| tx(a) && (l = tZ.Touch); | |
| null !== l ? (d = l, | |
| (u.startsWith("Touch") && l === tZ.Touch || u.startsWith("Mouse") && l === tZ.Mouse) && (l = null)) : tz[e] === tz.Click && (l = d, | |
| d = null); | |
| let h = tx(a) ? a.changedTouches[0] : a; | |
| if (!h) | |
| return; | |
| let c = r.getId(o) | |
| , {clientX: p, clientY: g} = h; | |
| tJ(t)(Object.assign({ | |
| type: tz[u], | |
| id: c, | |
| x: p, | |
| y: g | |
| }, null !== l && { | |
| pointerType: l | |
| })) | |
| } | |
| ; | |
| return Object.keys(tz).filter(t => Number.isNaN(Number(t)) && !t.endsWith("_Departed") && !1 !== o[t]).forEach(t => { | |
| let r = J(t) | |
| , n = u(t); | |
| if (window.PointerEvent) | |
| switch (tz[t]) { | |
| case tz.MouseDown: | |
| case tz.MouseUp: | |
| r = r.replace("mouse", "pointer"); | |
| break; | |
| case tz.TouchStart: | |
| case tz.TouchEnd: | |
| return | |
| } | |
| l.push(ty(r, n, e)) | |
| } | |
| ), | |
| tJ( () => { | |
| l.forEach(t => t()) | |
| } | |
| ) | |
| }(t) | |
| , a = tq(t) | |
| , o = function({viewportResizeCb: t}, {win: e}) { | |
| let r = -1 | |
| , n = -1; | |
| return ty("resize", tJ(tC(tJ( () => { | |
| let e = tE() | |
| , s = tk(); | |
| (r !== e || n !== s) && (t({ | |
| width: Number(s), | |
| height: Number(e) | |
| }), | |
| r = e, | |
| n = s) | |
| } | |
| ), 200)), e) | |
| }(t, { | |
| win: r | |
| }) | |
| , l = function({inputCb: t, doc: e, mirror: r, blockClass: n, blockSelector: s, unblockSelector: i, ignoreClass: a, ignoreSelector: o, maskInputOptions: l, maskInputFn: d, sampling: u, userTriggeredOnInput: h, maskTextClass: c, unmaskTextClass: p, maskTextSelector: g, unmaskTextSelector: m}) { | |
| function f(t) { | |
| let r = tX(t) | |
| , u = t.isTrusted | |
| , f = r && j(r.tagName); | |
| if ("OPTION" === f && (r = r.parentElement), | |
| !r || !f || 0 > t0.indexOf(f) || tR(r, n, s, i, !0)) | |
| return; | |
| let y = r; | |
| if (y.classList.contains(a) || o && y.matches(o)) | |
| return; | |
| let I = Q(r) | |
| , b = q(y, f, I) | |
| , C = !1 | |
| , w = P({ | |
| maskInputOptions: l, | |
| tagName: f, | |
| type: I | |
| }) | |
| , v = tm(r, c, g, p, m, w); | |
| ("radio" === I || "checkbox" === I) && (C = r.checked), | |
| b = H({ | |
| isMasked: v, | |
| element: r, | |
| value: b, | |
| maskInputFn: d | |
| }), | |
| _(r, tJ(t$)({ | |
| text: b, | |
| isChecked: C, | |
| userTriggered: u | |
| }, h)); | |
| let S = r.name; | |
| "radio" === I && S && C && e.querySelectorAll(`input[type="radio"][name="${S}"]`).forEach(t => { | |
| if (t !== r) { | |
| let e = H({ | |
| isMasked: v, | |
| element: t, | |
| value: q(t, f, I), | |
| maskInputFn: d | |
| }); | |
| _(t, tJ(t$)({ | |
| text: e, | |
| isChecked: !C, | |
| userTriggered: !1 | |
| }, h)) | |
| } | |
| } | |
| ) | |
| } | |
| function _(e, n) { | |
| let s = t1.get(e); | |
| if (!s || s.text !== n.text || s.isChecked !== n.isChecked) { | |
| t1.set(e, n); | |
| let s = r.getId(e); | |
| tJ(t)(Object.assign(Object.assign({}, n), { | |
| id: s | |
| })) | |
| } | |
| } | |
| let y = ("last" === u.input ? ["change"] : ["input", "change"]).map(t => ty(t, tJ(f), e)) | |
| , I = e.defaultView; | |
| if (!I) | |
| return () => { | |
| y.forEach(t => t()) | |
| } | |
| ; | |
| let b = I.Object.getOwnPropertyDescriptor(I.HTMLInputElement.prototype, "value") | |
| , C = [[I.HTMLInputElement.prototype, "value"], [I.HTMLInputElement.prototype, "checked"], [I.HTMLSelectElement.prototype, "value"], [I.HTMLTextAreaElement.prototype, "value"], [I.HTMLSelectElement.prototype, "selectedIndex"], [I.HTMLOptionElement.prototype, "selected"]]; | |
| return b && b.set && y.push(...C.map(t => tw(t[0], t[1], { | |
| set() { | |
| tJ(f)({ | |
| target: this, | |
| isTrusted: !1 | |
| }) | |
| } | |
| }, !1, I))), | |
| tJ( () => { | |
| y.forEach(t => t()) | |
| } | |
| ) | |
| }(t) | |
| , d = function({mediaInteractionCb: t, blockClass: e, blockSelector: r, unblockSelector: n, mirror: s, sampling: i, doc: a}) { | |
| let o = tJ(a => tC(tJ(i => { | |
| let o = tX(i); | |
| if (!o || tR(o, e, r, n, !0)) | |
| return; | |
| let {currentTime: l, volume: d, muted: u, playbackRate: h} = o; | |
| t({ | |
| type: a, | |
| id: s.getId(o), | |
| currentTime: l, | |
| volume: d, | |
| muted: u, | |
| playbackRate: h | |
| }) | |
| } | |
| ), i.media || 500)) | |
| , l = [ty("play", o(0), a), ty("pause", o(1), a), ty("seeked", o(2), a), ty("volumechange", o(3), a), ty("ratechange", o(4), a)]; | |
| return tJ( () => { | |
| l.forEach(t => t()) | |
| } | |
| ) | |
| }(t) | |
| , u = function({styleSheetRuleCb: t, mirror: e, stylesheetManager: r}, {win: n}) { | |
| let s, i; | |
| if (!n.CSSStyleSheet || !n.CSSStyleSheet.prototype) | |
| return () => {} | |
| ; | |
| let a = n.CSSStyleSheet.prototype.insertRule; | |
| n.CSSStyleSheet.prototype.insertRule = new Proxy(a,{ | |
| apply: tJ( (n, s, i) => { | |
| let[a,o] = i | |
| , {id: l, styleId: d} = t5(s, e, r.styleMirror); | |
| return (l && -1 !== l || d && -1 !== d) && t({ | |
| id: l, | |
| styleId: d, | |
| adds: [{ | |
| rule: a, | |
| index: o | |
| }] | |
| }), | |
| n.apply(s, i) | |
| } | |
| ) | |
| }); | |
| let o = n.CSSStyleSheet.prototype.deleteRule; | |
| n.CSSStyleSheet.prototype.deleteRule = new Proxy(o,{ | |
| apply: tJ( (n, s, i) => { | |
| let[a] = i | |
| , {id: o, styleId: l} = t5(s, e, r.styleMirror); | |
| return (o && -1 !== o || l && -1 !== l) && t({ | |
| id: o, | |
| styleId: l, | |
| removes: [{ | |
| index: a | |
| }] | |
| }), | |
| n.apply(s, i) | |
| } | |
| ) | |
| }), | |
| n.CSSStyleSheet.prototype.replace && (s = n.CSSStyleSheet.prototype.replace, | |
| n.CSSStyleSheet.prototype.replace = new Proxy(s,{ | |
| apply: tJ( (n, s, i) => { | |
| let[a] = i | |
| , {id: o, styleId: l} = t5(s, e, r.styleMirror); | |
| return (o && -1 !== o || l && -1 !== l) && t({ | |
| id: o, | |
| styleId: l, | |
| replace: a | |
| }), | |
| n.apply(s, i) | |
| } | |
| ) | |
| })), | |
| n.CSSStyleSheet.prototype.replaceSync && (i = n.CSSStyleSheet.prototype.replaceSync, | |
| n.CSSStyleSheet.prototype.replaceSync = new Proxy(i,{ | |
| apply: tJ( (n, s, i) => { | |
| let[a] = i | |
| , {id: o, styleId: l} = t5(s, e, r.styleMirror); | |
| return (o && -1 !== o || l && -1 !== l) && t({ | |
| id: o, | |
| styleId: l, | |
| replaceSync: a | |
| }), | |
| n.apply(s, i) | |
| } | |
| ) | |
| })); | |
| let l = {}; | |
| t4("CSSGroupingRule") ? l.CSSGroupingRule = n.CSSGroupingRule : (t4("CSSMediaRule") && (l.CSSMediaRule = n.CSSMediaRule), | |
| t4("CSSConditionRule") && (l.CSSConditionRule = n.CSSConditionRule), | |
| t4("CSSSupportsRule") && (l.CSSSupportsRule = n.CSSSupportsRule)); | |
| let d = {}; | |
| return Object.entries(l).forEach( ([n,s]) => { | |
| d[n] = { | |
| insertRule: s.prototype.insertRule, | |
| deleteRule: s.prototype.deleteRule | |
| }, | |
| s.prototype.insertRule = new Proxy(d[n].insertRule,{ | |
| apply: tJ( (n, s, i) => { | |
| let[a,o] = i | |
| , {id: l, styleId: d} = t5(s.parentStyleSheet, e, r.styleMirror); | |
| return (l && -1 !== l || d && -1 !== d) && t({ | |
| id: l, | |
| styleId: d, | |
| adds: [{ | |
| rule: a, | |
| index: [...t2(s), o || 0] | |
| }] | |
| }), | |
| n.apply(s, i) | |
| } | |
| ) | |
| }), | |
| s.prototype.deleteRule = new Proxy(d[n].deleteRule,{ | |
| apply: tJ( (n, s, i) => { | |
| let[a] = i | |
| , {id: o, styleId: l} = t5(s.parentStyleSheet, e, r.styleMirror); | |
| return (o && -1 !== o || l && -1 !== l) && t({ | |
| id: o, | |
| styleId: l, | |
| removes: [{ | |
| index: [...t2(s), a] | |
| }] | |
| }), | |
| n.apply(s, i) | |
| } | |
| ) | |
| }) | |
| } | |
| ), | |
| tJ( () => { | |
| n.CSSStyleSheet.prototype.insertRule = a, | |
| n.CSSStyleSheet.prototype.deleteRule = o, | |
| s && (n.CSSStyleSheet.prototype.replace = s), | |
| i && (n.CSSStyleSheet.prototype.replaceSync = i), | |
| Object.entries(l).forEach( ([t,e]) => { | |
| e.prototype.insertRule = d[t].insertRule, | |
| e.prototype.deleteRule = d[t].deleteRule | |
| } | |
| ) | |
| } | |
| ) | |
| }(t, { | |
| win: r | |
| }) | |
| , h = t3(t, t.doc) | |
| , c = function({styleDeclarationCb: t, mirror: e, ignoreCSSAttributes: r, stylesheetManager: n}, {win: s}) { | |
| let i = s.CSSStyleDeclaration.prototype.setProperty; | |
| s.CSSStyleDeclaration.prototype.setProperty = new Proxy(i,{ | |
| apply: tJ( (s, a, o) => { | |
| var l; | |
| let[d,u,h] = o; | |
| if (r.has(d)) | |
| return i.apply(a, [d, u, h]); | |
| let {id: c, styleId: p} = t5(null === (l = a.parentRule) || void 0 === l ? void 0 : l.parentStyleSheet, e, n.styleMirror); | |
| return (c && -1 !== c || p && -1 !== p) && t({ | |
| id: c, | |
| styleId: p, | |
| set: { | |
| property: d, | |
| value: u, | |
| priority: h | |
| }, | |
| index: t2(a.parentRule) | |
| }), | |
| s.apply(a, o) | |
| } | |
| ) | |
| }); | |
| let a = s.CSSStyleDeclaration.prototype.removeProperty; | |
| return s.CSSStyleDeclaration.prototype.removeProperty = new Proxy(a,{ | |
| apply: tJ( (s, i, o) => { | |
| var l; | |
| let[d] = o; | |
| if (r.has(d)) | |
| return a.apply(i, [d]); | |
| let {id: u, styleId: h} = t5(null === (l = i.parentRule) || void 0 === l ? void 0 : l.parentStyleSheet, e, n.styleMirror); | |
| return (u && -1 !== u || h && -1 !== h) && t({ | |
| id: u, | |
| styleId: h, | |
| remove: { | |
| property: d | |
| }, | |
| index: t2(i.parentRule) | |
| }), | |
| s.apply(i, o) | |
| } | |
| ) | |
| }), | |
| tJ( () => { | |
| s.CSSStyleDeclaration.prototype.setProperty = i, | |
| s.CSSStyleDeclaration.prototype.removeProperty = a | |
| } | |
| ) | |
| }(t, { | |
| win: r | |
| }) | |
| , p = t.collectFonts ? function({fontCb: t, doc: e}) { | |
| let r = e.defaultView; | |
| if (!r) | |
| return () => {} | |
| ; | |
| let n = [] | |
| , s = new WeakMap | |
| , i = r.FontFace; | |
| r.FontFace = function(t, e, r) { | |
| let n = new i(t,e,r); | |
| return s.set(n, { | |
| family: t, | |
| buffer: "string" != typeof e, | |
| descriptors: r, | |
| fontSource: "string" == typeof e ? e : JSON.stringify(Array.from(new Uint8Array(e))) | |
| }), | |
| n | |
| } | |
| ; | |
| let a = tv(e.fonts, "add", function(e) { | |
| return function(r) { | |
| return setTimeout(tJ( () => { | |
| let e = s.get(r); | |
| e && (t(e), | |
| s.delete(r)) | |
| } | |
| ), 0), | |
| e.apply(this, [r]) | |
| } | |
| }); | |
| return n.push( () => { | |
| r.FontFace = i | |
| } | |
| ), | |
| n.push(a), | |
| tJ( () => { | |
| n.forEach(t => t()) | |
| } | |
| ) | |
| }(t) : () => {} | |
| , g = function(t) { | |
| let {doc: e, mirror: r, blockClass: n, blockSelector: s, unblockSelector: i, selectionCb: a} = t | |
| , o = !0 | |
| , l = tJ( () => { | |
| let t = e.getSelection(); | |
| if (!t || o && (null == t ? void 0 : t.isCollapsed)) | |
| return; | |
| o = t.isCollapsed || !1; | |
| let l = [] | |
| , d = t.rangeCount || 0; | |
| for (let e = 0; e < d; e++) { | |
| let {startContainer: a, startOffset: o, endContainer: d, endOffset: u} = t.getRangeAt(e); | |
| tR(a, n, s, i, !0) || tR(d, n, s, i, !0) || l.push({ | |
| start: r.getId(a), | |
| startOffset: o, | |
| end: r.getId(d), | |
| endOffset: u | |
| }) | |
| } | |
| a({ | |
| ranges: l | |
| }) | |
| } | |
| ); | |
| return l(), | |
| ty("selectionchange", l) | |
| }(t) | |
| , m = function({doc: t, customElementCb: e}) { | |
| let r = t.defaultView; | |
| return r && r.customElements ? tv(r.customElements, "define", function(t) { | |
| return function(r, n, s) { | |
| try { | |
| e({ | |
| define: { | |
| name: r | |
| } | |
| }) | |
| } catch (t) {} | |
| return t.apply(this, [r, n, s]) | |
| } | |
| }) : () => {} | |
| }(t) | |
| , f = []; | |
| for (let e of t.plugins) | |
| f.push(e.observer(e.callback, r, e.options)); | |
| return tJ( () => { | |
| tj.forEach(t => t.reset()), | |
| n.disconnect(), | |
| s(), | |
| i(), | |
| a(), | |
| o(), | |
| l(), | |
| d(), | |
| u(), | |
| h(), | |
| c(), | |
| p(), | |
| g(), | |
| m(), | |
| f.forEach(t => t()) | |
| } | |
| ) | |
| } | |
| function t9(t) { | |
| return void 0 !== window[t] | |
| } | |
| function t4(t) { | |
| return !!(void 0 !== window[t] && window[t].prototype && "insertRule"in window[t].prototype && "deleteRule"in window[t].prototype) | |
| } | |
| class t8 { | |
| constructor(t) { | |
| this.generateIdFn = t, | |
| this.iframeIdToRemoteIdMap = new WeakMap, | |
| this.iframeRemoteIdToIdMap = new WeakMap | |
| } | |
| getId(t, e, r, n) { | |
| let s = r || this.getIdToRemoteIdMap(t) | |
| , i = n || this.getRemoteIdToIdMap(t) | |
| , a = s.get(e); | |
| return a || (a = this.generateIdFn(), | |
| s.set(e, a), | |
| i.set(a, e)), | |
| a | |
| } | |
| getIds(t, e) { | |
| let r = this.getIdToRemoteIdMap(t) | |
| , n = this.getRemoteIdToIdMap(t); | |
| return e.map(e => this.getId(t, e, r, n)) | |
| } | |
| getRemoteId(t, e, r) { | |
| let n = r || this.getRemoteIdToIdMap(t); | |
| return "number" != typeof e ? e : n.get(e) || -1 | |
| } | |
| getRemoteIds(t, e) { | |
| let r = this.getRemoteIdToIdMap(t); | |
| return e.map(e => this.getRemoteId(t, e, r)) | |
| } | |
| reset(t) { | |
| if (!t) { | |
| this.iframeIdToRemoteIdMap = new WeakMap, | |
| this.iframeRemoteIdToIdMap = new WeakMap; | |
| return | |
| } | |
| this.iframeIdToRemoteIdMap.delete(t), | |
| this.iframeRemoteIdToIdMap.delete(t) | |
| } | |
| getIdToRemoteIdMap(t) { | |
| let e = this.iframeIdToRemoteIdMap.get(t); | |
| return e || (e = new Map, | |
| this.iframeIdToRemoteIdMap.set(t, e)), | |
| e | |
| } | |
| getRemoteIdToIdMap(t) { | |
| let e = this.iframeRemoteIdToIdMap.get(t); | |
| return e || (e = new Map, | |
| this.iframeRemoteIdToIdMap.set(t, e)), | |
| e | |
| } | |
| } | |
| class t7 { | |
| constructor() { | |
| this.crossOriginIframeMirror = new t8(te), | |
| this.crossOriginIframeRootIdMap = new WeakMap | |
| } | |
| addIframe() {} | |
| addLoadListener() {} | |
| attachIframe() {} | |
| } | |
| class et { | |
| constructor(t) { | |
| this.iframes = new WeakMap, | |
| this.crossOriginIframeMap = new WeakMap, | |
| this.crossOriginIframeMirror = new t8(te), | |
| this.crossOriginIframeRootIdMap = new WeakMap, | |
| this.mutationCb = t.mutationCb, | |
| this.wrappedEmit = t.wrappedEmit, | |
| this.stylesheetManager = t.stylesheetManager, | |
| this.recordCrossOriginIframes = t.recordCrossOriginIframes, | |
| this.crossOriginIframeStyleMirror = new t8(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)), | |
| this.mirror = t.mirror, | |
| this.recordCrossOriginIframes && window.addEventListener("message", this.handleMessage.bind(this)) | |
| } | |
| addIframe(t) { | |
| this.iframes.set(t, !0), | |
| t.contentWindow && this.crossOriginIframeMap.set(t.contentWindow, t) | |
| } | |
| addLoadListener(t) { | |
| this.loadListener = t | |
| } | |
| attachIframe(t, e) { | |
| var r; | |
| this.mutationCb({ | |
| adds: [{ | |
| parentId: this.mirror.getId(t), | |
| nextId: null, | |
| node: e | |
| }], | |
| removes: [], | |
| texts: [], | |
| attributes: [], | |
| isAttachIframe: !0 | |
| }), | |
| null === (r = this.loadListener) || void 0 === r || r.call(this, t), | |
| t.contentDocument && t.contentDocument.adoptedStyleSheets && t.contentDocument.adoptedStyleSheets.length > 0 && this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets, this.mirror.getId(t.contentDocument)) | |
| } | |
| handleMessage(t) { | |
| if ("rrweb" !== t.data.type || t.origin !== t.data.origin || !t.source) | |
| return; | |
| let e = this.crossOriginIframeMap.get(t.source); | |
| if (!e) | |
| return; | |
| let r = this.transformCrossOriginEvent(e, t.data.event); | |
| r && this.wrappedEmit(r, t.data.isCheckout) | |
| } | |
| transformCrossOriginEvent(t, e) { | |
| var r; | |
| switch (e.type) { | |
| case tL.FullSnapshot: | |
| { | |
| this.crossOriginIframeMirror.reset(t), | |
| this.crossOriginIframeStyleMirror.reset(t), | |
| this.replaceIdOnNode(e.data.node, t); | |
| let r = e.data.node.id; | |
| return this.crossOriginIframeRootIdMap.set(t, r), | |
| this.patchRootIdOnNode(e.data.node, r), | |
| { | |
| timestamp: e.timestamp, | |
| type: tL.IncrementalSnapshot, | |
| data: { | |
| source: tF.Mutation, | |
| adds: [{ | |
| parentId: this.mirror.getId(t), | |
| nextId: null, | |
| node: e.data.node | |
| }], | |
| removes: [], | |
| texts: [], | |
| attributes: [], | |
| isAttachIframe: !0 | |
| } | |
| } | |
| } | |
| case tL.Meta: | |
| case tL.Load: | |
| case tL.DomContentLoaded: | |
| break; | |
| case tL.Plugin: | |
| return e; | |
| case tL.Custom: | |
| return this.replaceIds(e.data.payload, t, ["id", "parentId", "previousId", "nextId"]), | |
| e; | |
| case tL.IncrementalSnapshot: | |
| switch (e.data.source) { | |
| case tF.Mutation: | |
| return e.data.adds.forEach(e => { | |
| this.replaceIds(e, t, ["parentId", "nextId", "previousId"]), | |
| this.replaceIdOnNode(e.node, t); | |
| let r = this.crossOriginIframeRootIdMap.get(t); | |
| r && this.patchRootIdOnNode(e.node, r) | |
| } | |
| ), | |
| e.data.removes.forEach(e => { | |
| this.replaceIds(e, t, ["parentId", "id"]) | |
| } | |
| ), | |
| e.data.attributes.forEach(e => { | |
| this.replaceIds(e, t, ["id"]) | |
| } | |
| ), | |
| e.data.texts.forEach(e => { | |
| this.replaceIds(e, t, ["id"]) | |
| } | |
| ), | |
| e; | |
| case tF.Drag: | |
| case tF.TouchMove: | |
| case tF.MouseMove: | |
| return e.data.positions.forEach(e => { | |
| this.replaceIds(e, t, ["id"]) | |
| } | |
| ), | |
| e; | |
| case tF.ViewportResize: | |
| return !1; | |
| case tF.MediaInteraction: | |
| case tF.MouseInteraction: | |
| case tF.Scroll: | |
| case tF.CanvasMutation: | |
| case tF.Input: | |
| return this.replaceIds(e.data, t, ["id"]), | |
| e; | |
| case tF.StyleSheetRule: | |
| case tF.StyleDeclaration: | |
| return this.replaceIds(e.data, t, ["id"]), | |
| this.replaceStyleIds(e.data, t, ["styleId"]), | |
| e; | |
| case tF.Font: | |
| return e; | |
| case tF.Selection: | |
| return e.data.ranges.forEach(e => { | |
| this.replaceIds(e, t, ["start", "end"]) | |
| } | |
| ), | |
| e; | |
| case tF.AdoptedStyleSheet: | |
| return this.replaceIds(e.data, t, ["id"]), | |
| this.replaceStyleIds(e.data, t, ["styleIds"]), | |
| null === (r = e.data.styles) || void 0 === r || r.forEach(e => { | |
| this.replaceStyleIds(e, t, ["styleId"]) | |
| } | |
| ), | |
| e | |
| } | |
| } | |
| return !1 | |
| } | |
| replace(t, e, r, n) { | |
| for (let s of n) | |
| (Array.isArray(e[s]) || "number" == typeof e[s]) && (Array.isArray(e[s]) ? e[s] = t.getIds(r, e[s]) : e[s] = t.getId(r, e[s])); | |
| return e | |
| } | |
| replaceIds(t, e, r) { | |
| return this.replace(this.crossOriginIframeMirror, t, e, r) | |
| } | |
| replaceStyleIds(t, e, r) { | |
| return this.replace(this.crossOriginIframeStyleMirror, t, e, r) | |
| } | |
| replaceIdOnNode(t, e) { | |
| this.replaceIds(t, e, ["id", "rootId"]), | |
| "childNodes"in t && t.childNodes.forEach(t => { | |
| this.replaceIdOnNode(t, e) | |
| } | |
| ) | |
| } | |
| patchRootIdOnNode(t, e) { | |
| t.type === I.Document || t.rootId || (t.rootId = e), | |
| "childNodes"in t && t.childNodes.forEach(t => { | |
| this.patchRootIdOnNode(t, e) | |
| } | |
| ) | |
| } | |
| } | |
| class ee { | |
| init() {} | |
| addShadowRoot() {} | |
| observeAttachShadow() {} | |
| reset() {} | |
| } | |
| class er { | |
| constructor(t) { | |
| this.shadowDoms = new WeakSet, | |
| this.restoreHandlers = [], | |
| this.mutationCb = t.mutationCb, | |
| this.scrollCb = t.scrollCb, | |
| this.bypassOptions = t.bypassOptions, | |
| this.mirror = t.mirror, | |
| this.init() | |
| } | |
| init() { | |
| this.reset(), | |
| this.patchAttachShadow(Element, document) | |
| } | |
| addShadowRoot(t, e) { | |
| if (!G(t) || this.shadowDoms.has(t)) | |
| return; | |
| this.shadowDoms.add(t); | |
| let r = tQ(Object.assign(Object.assign({}, this.bypassOptions), { | |
| doc: e, | |
| mutationCb: this.mutationCb, | |
| mirror: this.mirror, | |
| shadowDomManager: this | |
| }), t); | |
| this.restoreHandlers.push( () => r.disconnect()), | |
| this.restoreHandlers.push(tq(Object.assign(Object.assign({}, this.bypassOptions), { | |
| scrollCb: this.scrollCb, | |
| doc: t, | |
| mirror: this.mirror | |
| }))), | |
| setTimeout( () => { | |
| t.adoptedStyleSheets && t.adoptedStyleSheets.length > 0 && this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets, this.mirror.getId(t.host)), | |
| this.restoreHandlers.push(t3({ | |
| mirror: this.mirror, | |
| stylesheetManager: this.bypassOptions.stylesheetManager | |
| }, t)) | |
| } | |
| , 0) | |
| } | |
| observeAttachShadow(t) { | |
| t.contentWindow && t.contentDocument && this.patchAttachShadow(t.contentWindow.Element, t.contentDocument) | |
| } | |
| patchAttachShadow(t, e) { | |
| let r = this; | |
| this.restoreHandlers.push(tv(t.prototype, "attachShadow", function(t) { | |
| return function(n) { | |
| let s = t.call(this, n); | |
| return this.shadowRoot && tB(this) && r.addShadowRoot(this.shadowRoot, e), | |
| s | |
| } | |
| })) | |
| } | |
| reset() { | |
| this.restoreHandlers.forEach(t => { | |
| try { | |
| t() | |
| } catch (t) {} | |
| } | |
| ), | |
| this.restoreHandlers = [], | |
| this.shadowDoms = new WeakSet | |
| } | |
| } | |
| for (var en = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", es = "undefined" == typeof Uint8Array ? [] : new Uint8Array(256), ei = 0; ei < en.length; ei++) | |
| es[en.charCodeAt(ei)] = ei; | |
| var ea = function(t) { | |
| var e, r = new Uint8Array(t), n = r.length, s = ""; | |
| for (e = 0; e < n; e += 3) | |
| s += en[r[e] >> 2] + en[(3 & r[e]) << 4 | r[e + 1] >> 4] + en[(15 & r[e + 1]) << 2 | r[e + 2] >> 6] + en[63 & r[e + 2]]; | |
| return n % 3 == 2 ? s = s.substring(0, s.length - 1) + "=" : n % 3 == 1 && (s = s.substring(0, s.length - 2) + "=="), | |
| s | |
| }; | |
| let eo = new Map | |
| , el = (t, e, r) => { | |
| let n; | |
| if (!t || !(eu(t, e) || "object" == typeof t)) | |
| return; | |
| let s = t.constructor.name | |
| , i = ((n = eo.get(r)) || (n = new Map, | |
| eo.set(r, n)), | |
| n.has(s) || n.set(s, []), | |
| n.get(s)) | |
| , a = i.indexOf(t); | |
| return -1 === a && (a = i.length, | |
| i.push(t)), | |
| a | |
| } | |
| , ed = (t, e, r) => [...t].map(t => (function t(e, r, n) { | |
| if (e instanceof Array) | |
| return e.map(e => t(e, r, n)); | |
| if (null === e) | |
| ; | |
| else if (e instanceof Float32Array || e instanceof Float64Array || e instanceof Int32Array || e instanceof Uint32Array || e instanceof Uint8Array || e instanceof Uint16Array || e instanceof Int16Array || e instanceof Int8Array || e instanceof Uint8ClampedArray) | |
| return { | |
| rr_type: e.constructor.name, | |
| args: [Object.values(e)] | |
| }; | |
| else if (e instanceof ArrayBuffer) | |
| return { | |
| rr_type: e.constructor.name, | |
| base64: ea(e) | |
| }; | |
| else if (e instanceof DataView) | |
| return { | |
| rr_type: e.constructor.name, | |
| args: [t(e.buffer, r, n), e.byteOffset, e.byteLength] | |
| }; | |
| else if (e instanceof HTMLImageElement) { | |
| let t = e.constructor.name | |
| , {src: r} = e; | |
| return { | |
| rr_type: t, | |
| src: r | |
| } | |
| } else if (e instanceof HTMLCanvasElement) | |
| return { | |
| rr_type: "HTMLImageElement", | |
| src: e.toDataURL() | |
| }; | |
| else if (e instanceof ImageData) | |
| return { | |
| rr_type: e.constructor.name, | |
| args: [t(e.data, r, n), e.width, e.height] | |
| }; | |
| else if (eu(e, r) || "object" == typeof e) | |
| return { | |
| rr_type: e.constructor.name, | |
| index: el(e, r, n) | |
| }; | |
| return e | |
| } | |
| )(t, e, r)) | |
| , eu = (t, e) => !!["WebGLActiveInfo", "WebGLBuffer", "WebGLFramebuffer", "WebGLProgram", "WebGLRenderbuffer", "WebGLShader", "WebGLShaderPrecisionFormat", "WebGLTexture", "WebGLUniformLocation", "WebGLVertexArrayObject", "WebGLVertexArrayObjectOES"].filter(t => "function" == typeof e[t]).find(r => t instanceof e[r]); | |
| function eh(t, e, r, n, s) { | |
| let i = []; | |
| try { | |
| let a = tv(t.HTMLCanvasElement.prototype, "getContext", function(t) { | |
| return function(i, ...a) { | |
| if (!tR(this, e, r, n, !0)) { | |
| let t = "experimental-webgl" === i ? "webgl" : i; | |
| if ("__context"in this || (this.__context = t), | |
| s && ["webgl", "webgl2"].includes(t)) { | |
| if (a[0] && "object" == typeof a[0]) { | |
| let t = a[0]; | |
| t.preserveDrawingBuffer || (t.preserveDrawingBuffer = !0) | |
| } else | |
| a.splice(0, 1, { | |
| preserveDrawingBuffer: !0 | |
| }) | |
| } | |
| } | |
| return t.apply(this, [i, ...a]) | |
| } | |
| }); | |
| i.push(a) | |
| } catch (t) { | |
| console.error("failed to patch HTMLCanvasElement.prototype.getContext") | |
| } | |
| return () => { | |
| i.forEach(t => t()) | |
| } | |
| } | |
| function ec(t, e, r, n, s, i, a, o) { | |
| let l = []; | |
| for (let a of Object.getOwnPropertyNames(t)) | |
| if (!["isContextLost", "canvas", "drawingBufferWidth", "drawingBufferHeight"].includes(a)) | |
| try { | |
| if ("function" != typeof t[a]) | |
| continue; | |
| let d = tv(t, a, function(t) { | |
| return function(...l) { | |
| let d = t.apply(this, l); | |
| if (el(d, o, this), | |
| "tagName"in this.canvas && !tR(this.canvas, n, s, i, !0)) { | |
| let t = ed([...l], o, this) | |
| , n = { | |
| type: e, | |
| property: a, | |
| args: t | |
| }; | |
| r(this.canvas, n) | |
| } | |
| return d | |
| } | |
| }); | |
| l.push(d) | |
| } catch (s) { | |
| let n = tw(t, a, { | |
| set(t) { | |
| r(this.canvas, { | |
| type: e, | |
| property: a, | |
| args: [t], | |
| setter: !0 | |
| }) | |
| } | |
| }); | |
| l.push(n) | |
| } | |
| return l | |
| } | |
| var ep = (f = "Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SDQogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4NCiAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLw0KDQogICAgZnVuY3Rpb24gX19hd2FpdGVyKHRoaXNBcmcsIF9hcmd1bWVudHMsIFAsIGdlbmVyYXRvcikgew0KICAgICAgICBmdW5jdGlvbiBhZG9wdCh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBQID8gdmFsdWUgOiBuZXcgUChmdW5jdGlvbiAocmVzb2x2ZSkgeyByZXNvbHZlKHZhbHVlKTsgfSk7IH0NCiAgICAgICAgcmV0dXJuIG5ldyAoUCB8fCAoUCA9IFByb21pc2UpKShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7DQogICAgICAgICAgICBmdW5jdGlvbiBmdWxmaWxsZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3IubmV4dCh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiByZWplY3RlZCh2YWx1ZSkgeyB0cnkgeyBzdGVwKGdlbmVyYXRvclsidGhyb3ciXSh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiBzdGVwKHJlc3VsdCkgeyByZXN1bHQuZG9uZSA/IHJlc29sdmUocmVzdWx0LnZhbHVlKSA6IGFkb3B0KHJlc3VsdC52YWx1ZSkudGhlbihmdWxmaWxsZWQsIHJlamVjdGVkKTsgfQ0KICAgICAgICAgICAgc3RlcCgoZ2VuZXJhdG9yID0gZ2VuZXJhdG9yLmFwcGx5KHRoaXNBcmcsIF9hcmd1bWVudHMgfHwgW10pKS5uZXh0KCkpOw0KICAgICAgICB9KTsNCiAgICB9CgogICAgLyoKICAgICAqIGJhc2U2NC1hcnJheWJ1ZmZlciAxLjAuMSA8aHR0cHM6Ly9naXRodWIuY29tL25pa2xhc3ZoL2Jhc2U2NC1hcnJheWJ1ZmZlcj4KICAgICAqIENvcHlyaWdodCAoYykgMjAyMSBOaWtsYXMgdm9uIEhlcnR6ZW4gPGh0dHBzOi8vaGVydHplbi5jb20+CiAgICAgKiBSZWxlYXNlZCB1bmRlciBNSVQgTGljZW5zZQogICAgICovCiAgICB2YXIgY2hhcnMgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CiAgICAvLyBVc2UgYSBsb29rdXAgdGFibGUgdG8gZmluZCB0aGUgaW5kZXguCiAgICB2YXIgbG9va3VwID0gdHlwZW9mIFVpbnQ4QXJyYXkgPT09ICd1bmRlZmluZWQnID8gW10gOiBuZXcgVWludDhBcnJheSgyNTYpOwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFycy5sZW5ndGg7IGkrKykgewogICAgICAgIGxvb2t1cFtjaGFycy5jaGFyQ29kZUF0KGkpXSA9IGk7CiAgICB9CiAgICB2YXIgZW5jb2RlID0gZnVuY3Rpb24gKGFycmF5YnVmZmVyKSB7CiAgICAgICAgdmFyIGJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlidWZmZXIpLCBpLCBsZW4gPSBieXRlcy5sZW5ndGgsIGJhc2U2NCA9ICcnOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gMykgewogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaV0gPj4gMl07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2ldICYgMykgPDwgNCkgfCAoYnl0ZXNbaSArIDFdID4+IDQpXTsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzWygoYnl0ZXNbaSArIDFdICYgMTUpIDw8IDIpIHwgKGJ5dGVzW2kgKyAyXSA+PiA2KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1tieXRlc1tpICsgMl0gJiA2M107CiAgICAgICAgfQogICAgICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgJz0nOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgJz09JzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJhc2U2NDsKICAgIH07CgogICAgY29uc3QgbGFzdEJsb2JNYXAgPSBuZXcgTWFwKCk7DQogICAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIGZ1bmN0aW9uIGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucykgew0KICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgY29uc3QgeyBpZCwgYml0bWFwLCB3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucyB9ID0gZS5kYXRhOw0KICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zKTsNCiAgICAgICAgICAgICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=", | |
| function(t) { | |
| var e, r, n; | |
| return new Worker(_ = _ || (r = (e = function(t, e) { | |
| var r = atob(t); | |
| if (e) { | |
| for (var n = new Uint8Array(r.length), s = 0, i = r.length; s < i; ++s) | |
| n[s] = r.charCodeAt(s); | |
| return String.fromCharCode.apply(null, new Uint16Array(n.buffer)) | |
| } | |
| return r | |
| }(f, !1)).indexOf("\n", 10) + 1, | |
| n = new Blob([e.substring(r) + ""],{ | |
| type: "application/javascript" | |
| }), | |
| URL.createObjectURL(n)),t) | |
| } | |
| ); | |
| class eg { | |
| reset() {} | |
| freeze() {} | |
| unfreeze() {} | |
| lock() {} | |
| unlock() {} | |
| } | |
| class em { | |
| reset() { | |
| this.pendingCanvasMutations.clear(), | |
| this.resetObservers && this.resetObservers() | |
| } | |
| freeze() { | |
| this.frozen = !0 | |
| } | |
| unfreeze() { | |
| this.frozen = !1 | |
| } | |
| lock() { | |
| this.locked = !0 | |
| } | |
| unlock() { | |
| this.locked = !1 | |
| } | |
| constructor(t) { | |
| this.pendingCanvasMutations = new Map, | |
| this.rafStamps = { | |
| latestId: 0, | |
| invokeId: null | |
| }, | |
| this.frozen = !1, | |
| this.locked = !1, | |
| this.processMutation = (t, e) => { | |
| (this.rafStamps.invokeId && this.rafStamps.latestId !== this.rafStamps.invokeId || !this.rafStamps.invokeId) && (this.rafStamps.invokeId = this.rafStamps.latestId), | |
| this.pendingCanvasMutations.has(t) || this.pendingCanvasMutations.set(t, []), | |
| this.pendingCanvasMutations.get(t).push(e) | |
| } | |
| ; | |
| let {sampling: e="all", win: r, blockClass: n, blockSelector: s, unblockSelector: i, recordCanvas: a, dataURLOptions: o} = t; | |
| this.mutationCb = t.mutationCb, | |
| this.mirror = t.mirror, | |
| a && "all" === e && this.initCanvasMutationObserver(r, n, s, i), | |
| a && "number" == typeof e && this.initCanvasFPSObserver(e, r, n, s, i, { | |
| dataURLOptions: o | |
| }) | |
| } | |
| initCanvasFPSObserver(t, e, r, n, s, i) { | |
| let a; | |
| let o = eh(e, r, n, s, !0) | |
| , l = new Map | |
| , d = new ep; | |
| d.onmessage = t => { | |
| let {id: e} = t.data; | |
| if (l.set(e, !1), | |
| !("base64"in t.data)) | |
| return; | |
| let {base64: r, type: n, width: s, height: i} = t.data; | |
| this.mutationCb({ | |
| id: e, | |
| type: tW["2D"], | |
| commands: [{ | |
| property: "clearRect", | |
| args: [0, 0, s, i] | |
| }, { | |
| property: "drawImage", | |
| args: [{ | |
| rr_type: "ImageBitmap", | |
| args: [{ | |
| rr_type: "Blob", | |
| data: [{ | |
| rr_type: "ArrayBuffer", | |
| base64: r | |
| }], | |
| type: n | |
| }] | |
| }, 0, 0] | |
| }] | |
| }) | |
| } | |
| ; | |
| let u = 1e3 / t | |
| , h = 0 | |
| , c = () => { | |
| let t = []; | |
| return e.document.querySelectorAll("canvas").forEach(e => { | |
| tR(e, r, n, s, !0) || t.push(e) | |
| } | |
| ), | |
| t | |
| } | |
| , p = t => { | |
| if (h && t - h < u) { | |
| a = requestAnimationFrame(p); | |
| return | |
| } | |
| h = t, | |
| c().forEach(t => { | |
| var e, r, n, s; | |
| return e = this, | |
| r = void 0, | |
| n = void 0, | |
| s = function*() { | |
| var e; | |
| let r = this.mirror.getId(t); | |
| if (l.get(r)) | |
| return; | |
| if (l.set(r, !0), | |
| ["webgl", "webgl2"].includes(t.__context)) { | |
| let r = t.getContext(t.__context); | |
| (null === (e = null == r ? void 0 : r.getContextAttributes()) || void 0 === e ? void 0 : e.preserveDrawingBuffer) === !1 && r.clear(r.COLOR_BUFFER_BIT) | |
| } | |
| let n = yield createImageBitmap(t); | |
| d.postMessage({ | |
| id: r, | |
| bitmap: n, | |
| width: t.width, | |
| height: t.height, | |
| dataURLOptions: i.dataURLOptions | |
| }, [n]) | |
| } | |
| , | |
| new (n || (n = Promise))(function(t, i) { | |
| function a(t) { | |
| try { | |
| l(s.next(t)) | |
| } catch (t) { | |
| i(t) | |
| } | |
| } | |
| function o(t) { | |
| try { | |
| l(s.throw(t)) | |
| } catch (t) { | |
| i(t) | |
| } | |
| } | |
| function l(e) { | |
| var r; | |
| e.done ? t(e.value) : ((r = e.value)instanceof n ? r : new n(function(t) { | |
| t(r) | |
| } | |
| )).then(a, o) | |
| } | |
| l((s = s.apply(e, r || [])).next()) | |
| } | |
| ) | |
| } | |
| ), | |
| a = requestAnimationFrame(p) | |
| } | |
| ; | |
| a = requestAnimationFrame(p), | |
| this.resetObservers = () => { | |
| o(), | |
| cancelAnimationFrame(a) | |
| } | |
| } | |
| initCanvasMutationObserver(t, e, r, n) { | |
| this.startRAFTimestamping(), | |
| this.startPendingCanvasMutationFlusher(); | |
| let s = eh(t, e, r, n, !1) | |
| , i = function(t, e, r, n, s) { | |
| let i = []; | |
| for (let a of Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype)) | |
| try { | |
| if ("function" != typeof e.CanvasRenderingContext2D.prototype[a]) | |
| continue; | |
| let o = tv(e.CanvasRenderingContext2D.prototype, a, function(i) { | |
| return function(...o) { | |
| return tR(this.canvas, r, n, s, !0) || setTimeout( () => { | |
| let r = ed([...o], e, this); | |
| t(this.canvas, { | |
| type: tW["2D"], | |
| property: a, | |
| args: r | |
| }) | |
| } | |
| , 0), | |
| i.apply(this, o) | |
| } | |
| }); | |
| i.push(o) | |
| } catch (n) { | |
| let r = tw(e.CanvasRenderingContext2D.prototype, a, { | |
| set(e) { | |
| t(this.canvas, { | |
| type: tW["2D"], | |
| property: a, | |
| args: [e], | |
| setter: !0 | |
| }) | |
| } | |
| }); | |
| i.push(r) | |
| } | |
| return () => { | |
| i.forEach(t => t()) | |
| } | |
| }(this.processMutation.bind(this), t, e, r, n) | |
| , a = function(t, e, r, n, s, i) { | |
| let a = []; | |
| return a.push(...ec(e.WebGLRenderingContext.prototype, tW.WebGL, t, r, n, s, i, e)), | |
| void 0 !== e.WebGL2RenderingContext && a.push(...ec(e.WebGL2RenderingContext.prototype, tW.WebGL2, t, r, n, s, i, e)), | |
| () => { | |
| a.forEach(t => t()) | |
| } | |
| }(this.processMutation.bind(this), t, e, r, n, this.mirror); | |
| this.resetObservers = () => { | |
| s(), | |
| i(), | |
| a() | |
| } | |
| } | |
| startPendingCanvasMutationFlusher() { | |
| requestAnimationFrame( () => this.flushPendingCanvasMutations()) | |
| } | |
| startRAFTimestamping() { | |
| let t = e => { | |
| this.rafStamps.latestId = e, | |
| requestAnimationFrame(t) | |
| } | |
| ; | |
| requestAnimationFrame(t) | |
| } | |
| flushPendingCanvasMutations() { | |
| this.pendingCanvasMutations.forEach( (t, e) => { | |
| let r = this.mirror.getId(e); | |
| this.flushPendingCanvasMutationFor(e, r) | |
| } | |
| ), | |
| requestAnimationFrame( () => this.flushPendingCanvasMutations()) | |
| } | |
| flushPendingCanvasMutationFor(t, e) { | |
| if (this.frozen || this.locked) | |
| return; | |
| let r = this.pendingCanvasMutations.get(t); | |
| if (!r || -1 === e) | |
| return; | |
| let n = r.map(t => (function(t, e) { | |
| var r = {}; | |
| for (var n in t) | |
| Object.prototype.hasOwnProperty.call(t, n) && 0 > e.indexOf(n) && (r[n] = t[n]); | |
| if (null != t && "function" == typeof Object.getOwnPropertySymbols) | |
| for (var s = 0, n = Object.getOwnPropertySymbols(t); s < n.length; s++) | |
| 0 > e.indexOf(n[s]) && Object.prototype.propertyIsEnumerable.call(t, n[s]) && (r[n[s]] = t[n[s]]); | |
| return r | |
| } | |
| )(t, ["type"])) | |
| , {type: s} = r[0]; | |
| this.mutationCb({ | |
| id: e, | |
| type: s, | |
| commands: n | |
| }), | |
| this.pendingCanvasMutations.delete(t) | |
| } | |
| } | |
| class ef { | |
| constructor(t) { | |
| this.trackedLinkElements = new WeakSet, | |
| this.styleMirror = new tO, | |
| this.mutationCb = t.mutationCb, | |
| this.adoptedStyleSheetCb = t.adoptedStyleSheetCb | |
| } | |
| attachLinkElement(t, e) { | |
| "_cssText"in e.attributes && this.mutationCb({ | |
| adds: [], | |
| removes: [], | |
| texts: [], | |
| attributes: [{ | |
| id: e.id, | |
| attributes: e.attributes | |
| }] | |
| }), | |
| this.trackLinkElement(t) | |
| } | |
| trackLinkElement(t) { | |
| this.trackedLinkElements.has(t) || (this.trackedLinkElements.add(t), | |
| this.trackStylesheetInLinkElement(t)) | |
| } | |
| adoptStyleSheets(t, e) { | |
| if (0 === t.length) | |
| return; | |
| let r = { | |
| id: e, | |
| styleIds: [] | |
| } | |
| , n = []; | |
| for (let e of t) { | |
| let t; | |
| this.styleMirror.has(e) ? t = this.styleMirror.getId(e) : (t = this.styleMirror.add(e), | |
| n.push({ | |
| styleId: t, | |
| rules: Array.from(e.rules || CSSRule, (t, e) => ({ | |
| rule: K(t), | |
| index: e | |
| })) | |
| })), | |
| r.styleIds.push(t) | |
| } | |
| n.length > 0 && (r.styles = n), | |
| this.adoptedStyleSheetCb(r) | |
| } | |
| reset() { | |
| this.styleMirror.reset(), | |
| this.trackedLinkElements = new WeakSet | |
| } | |
| trackStylesheetInLinkElement(t) {} | |
| } | |
| class e_ { | |
| constructor() { | |
| this.nodeMap = new WeakMap, | |
| this.loop = !0, | |
| this.periodicallyClear() | |
| } | |
| periodicallyClear() { | |
| requestAnimationFrame( () => { | |
| this.clear(), | |
| this.loop && this.periodicallyClear() | |
| } | |
| ) | |
| } | |
| inOtherBuffer(t, e) { | |
| let r = this.nodeMap.get(t); | |
| return r && Array.from(r).some(t => t !== e) | |
| } | |
| add(t, e) { | |
| this.nodeMap.set(t, (this.nodeMap.get(t) || new Set).add(e)) | |
| } | |
| clear() { | |
| this.nodeMap = new WeakMap | |
| } | |
| destroy() { | |
| this.loop = !1 | |
| } | |
| } | |
| function ey(t) { | |
| return Object.assign(Object.assign({}, t), { | |
| timestamp: tS() | |
| }) | |
| } | |
| let eI = !1 | |
| , eb = new Y; | |
| function eC(t={}) { | |
| let e; | |
| let {emit: r, checkoutEveryNms: n, checkoutEveryNth: s, blockClass: d="rr-block", blockSelector: u=null, unblockSelector: h=null, ignoreClass: c="rr-ignore", ignoreSelector: p=null, maskAllText: g=!1, maskTextClass: m="rr-mask", unmaskTextClass: f=null, maskTextSelector: _=null, unmaskTextSelector: y=null, inlineStylesheet: I=!0, maskAllInputs: b, maskInputOptions: C, slimDOMOptions: w, maskAttributeFn: v, maskInputFn: S, maskTextFn: A, hooks: E, packFn: k, sampling: R={}, dataURLOptions: T={}, mousemoveWait: x, recordCanvas: M=!1, recordCrossOriginIframes: N=!1, recordAfter: D="DOMContentLoaded" === t.recordAfter ? t.recordAfter : "load", userTriggeredOnInput: O=!1, collectFonts: U=!1, inlineImages: B=!1, plugins: L, keepIframeSrcFn: F= () => !1, ignoreCSSAttributes: z=new Set([]), errorHandler: Z, onMutation: W} = t; | |
| i = Z; | |
| let G = !N || window.parent === window | |
| , V = !1; | |
| if (!G) | |
| try { | |
| window.parent.document && (V = !1) | |
| } catch (t) { | |
| V = !0 | |
| } | |
| if (G && !r) | |
| throw Error("emit function is required"); | |
| void 0 !== x && void 0 === R.mousemove && (R.mousemove = x), | |
| eb.reset(); | |
| let K = !0 === b ? { | |
| 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, | |
| radio: !0, | |
| checkbox: !0 | |
| } : void 0 !== C ? C : {} | |
| , P = !0 === w || "all" === w ? { | |
| script: !0, | |
| comment: !0, | |
| headFavicon: !0, | |
| headWhitespace: !0, | |
| headMetaSocial: !0, | |
| headMetaRobots: !0, | |
| headMetaHttpEquiv: !0, | |
| headMetaVerification: !0, | |
| headMetaAuthorship: "all" === w, | |
| headMetaDescKeywords: "all" === w | |
| } : w || {}; | |
| !function(t=window) { | |
| "NodeList"in t && !t.NodeList.prototype.forEach && (t.NodeList.prototype.forEach = Array.prototype.forEach), | |
| "DOMTokenList"in t && !t.DOMTokenList.prototype.forEach && (t.DOMTokenList.prototype.forEach = Array.prototype.forEach), | |
| Node.prototype.contains || (Node.prototype.contains = (...t) => { | |
| let e = t[0]; | |
| if (!(0 in t)) | |
| throw TypeError("1 argument is required"); | |
| do | |
| if (this === e) | |
| return !0; | |
| while (e = e && e.parentNode); | |
| return !1 | |
| } | |
| ) | |
| }(); | |
| let H = 0 | |
| , J = t => { | |
| for (let e of L || []) | |
| e.eventProcessor && (t = e.eventProcessor(t)); | |
| return k && !V && (t = k(t)), | |
| t | |
| } | |
| ; | |
| a = (t, i) => { | |
| var a; | |
| if ((null === (a = tj[0]) || void 0 === a ? void 0 : a.isFrozen()) && t.type !== tL.FullSnapshot && !(t.type === tL.IncrementalSnapshot && t.data.source === tF.Mutation) && tj.forEach(t => t.unfreeze()), | |
| G) | |
| null == r || r(J(t), i); | |
| else if (V) { | |
| let e = { | |
| type: "rrweb", | |
| event: J(t), | |
| origin: window.location.origin, | |
| isCheckout: i | |
| }; | |
| window.parent.postMessage(e, "*") | |
| } | |
| if (t.type === tL.FullSnapshot) | |
| e = t, | |
| H = 0; | |
| else if (t.type === tL.IncrementalSnapshot) { | |
| if (t.data.source === tF.Mutation && t.data.isAttachIframe) | |
| return; | |
| H++; | |
| let r = s && H >= s | |
| , i = n && t.timestamp - e.timestamp > n; | |
| (r || i) && o(!0) | |
| } | |
| } | |
| ; | |
| let j = t => { | |
| a(ey({ | |
| type: tL.IncrementalSnapshot, | |
| data: Object.assign({ | |
| source: tF.Mutation | |
| }, t) | |
| })) | |
| } | |
| , X = t => a(ey({ | |
| type: tL.IncrementalSnapshot, | |
| data: Object.assign({ | |
| source: tF.Scroll | |
| }, t) | |
| })) | |
| , Q = t => a(ey({ | |
| type: tL.IncrementalSnapshot, | |
| data: Object.assign({ | |
| source: tF.CanvasMutation | |
| }, t) | |
| })) | |
| , q = new ef({ | |
| mutationCb: j, | |
| adoptedStyleSheetCb: t => a(ey({ | |
| type: tL.IncrementalSnapshot, | |
| data: Object.assign({ | |
| source: tF.AdoptedStyleSheet | |
| }, t) | |
| })) | |
| }) | |
| , $ = "boolean" == typeof __RRWEB_EXCLUDE_IFRAME__ && __RRWEB_EXCLUDE_IFRAME__ ? new t7 : new et({ | |
| mirror: eb, | |
| mutationCb: j, | |
| stylesheetManager: q, | |
| recordCrossOriginIframes: N, | |
| wrappedEmit: a | |
| }); | |
| for (let t of L || []) | |
| t.getMirror && t.getMirror({ | |
| nodeMirror: eb, | |
| crossOriginIframeMirror: $.crossOriginIframeMirror, | |
| crossOriginIframeStyleMirror: $.crossOriginIframeStyleMirror | |
| }); | |
| let tt = new e_; | |
| l = "boolean" == typeof __RRWEB_EXCLUDE_CANVAS__ && __RRWEB_EXCLUDE_CANVAS__ ? new eg : new em({ | |
| recordCanvas: M, | |
| mutationCb: Q, | |
| win: window, | |
| blockClass: d, | |
| blockSelector: u, | |
| unblockSelector: h, | |
| mirror: eb, | |
| sampling: R.canvas, | |
| dataURLOptions: T | |
| }); | |
| let te = "boolean" == typeof __RRWEB_EXCLUDE_SHADOW_DOM__ && __RRWEB_EXCLUDE_SHADOW_DOM__ ? new ee : new er({ | |
| mutationCb: j, | |
| scrollCb: X, | |
| bypassOptions: { | |
| onMutation: W, | |
| blockClass: d, | |
| blockSelector: u, | |
| unblockSelector: h, | |
| maskAllText: g, | |
| maskTextClass: m, | |
| unmaskTextClass: f, | |
| maskTextSelector: _, | |
| unmaskTextSelector: y, | |
| inlineStylesheet: I, | |
| maskInputOptions: K, | |
| dataURLOptions: T, | |
| maskAttributeFn: v, | |
| maskTextFn: A, | |
| maskInputFn: S, | |
| recordCanvas: M, | |
| inlineImages: B, | |
| sampling: R, | |
| slimDOMOptions: P, | |
| iframeManager: $, | |
| stylesheetManager: q, | |
| canvasManager: l, | |
| keepIframeSrcFn: F, | |
| processedNodeManager: tt | |
| }, | |
| mirror: eb | |
| }); | |
| o = (t=!1) => { | |
| a(ey({ | |
| type: tL.Meta, | |
| data: { | |
| href: window.location.href, | |
| width: tk(), | |
| height: tE() | |
| } | |
| }), t), | |
| q.reset(), | |
| te.init(), | |
| tj.forEach(t => t.lock()); | |
| let e = function(t, e) { | |
| let {mirror: r=new Y, blockClass: n="rr-block", blockSelector: s=null, unblockSelector: i=null, maskAllText: a=!1, maskTextClass: o="rr-mask", unmaskTextClass: l=null, maskTextSelector: d=null, unmaskTextSelector: u=null, inlineStylesheet: h=!0, inlineImages: c=!1, recordCanvas: p=!1, maskAllInputs: g=!1, maskAttributeFn: m, maskTextFn: f, maskInputFn: _, slimDOM: y=!1, dataURLOptions: I, preserveWhiteSpace: b, onSerialize: C, onIframeLoad: w, iframeLoadTimeout: v, onStylesheetLoad: S, stylesheetLoadTimeout: A, keepIframeSrcFn: E= () => !1} = e || {}; | |
| return t_(t, { | |
| doc: t, | |
| mirror: r, | |
| blockClass: n, | |
| blockSelector: s, | |
| unblockSelector: i, | |
| maskAllText: a, | |
| maskTextClass: o, | |
| unmaskTextClass: l, | |
| maskTextSelector: d, | |
| unmaskTextSelector: u, | |
| skipChild: !1, | |
| inlineStylesheet: h, | |
| maskInputOptions: !0 === g ? { | |
| 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 | |
| } : !1 === g ? {} : g, | |
| maskAttributeFn: m, | |
| maskTextFn: f, | |
| maskInputFn: _, | |
| slimDOMOptions: !0 === y || "all" === y ? { | |
| script: !0, | |
| comment: !0, | |
| headFavicon: !0, | |
| headWhitespace: !0, | |
| headMetaDescKeywords: "all" === y, | |
| headMetaSocial: !0, | |
| headMetaRobots: !0, | |
| headMetaHttpEquiv: !0, | |
| headMetaAuthorship: !0, | |
| headMetaVerification: !0 | |
| } : !1 === y ? {} : y, | |
| dataURLOptions: I, | |
| inlineImages: c, | |
| recordCanvas: p, | |
| preserveWhiteSpace: b, | |
| onSerialize: C, | |
| onIframeLoad: w, | |
| iframeLoadTimeout: v, | |
| onStylesheetLoad: S, | |
| stylesheetLoadTimeout: A, | |
| keepIframeSrcFn: E, | |
| newlyAddedElement: !1 | |
| }) | |
| }(document, { | |
| mirror: eb, | |
| blockClass: d, | |
| blockSelector: u, | |
| unblockSelector: h, | |
| maskAllText: g, | |
| maskTextClass: m, | |
| unmaskTextClass: f, | |
| maskTextSelector: _, | |
| unmaskTextSelector: y, | |
| inlineStylesheet: I, | |
| maskAllInputs: K, | |
| maskAttributeFn: v, | |
| maskInputFn: S, | |
| maskTextFn: A, | |
| slimDOM: P, | |
| dataURLOptions: T, | |
| recordCanvas: M, | |
| inlineImages: B, | |
| onSerialize: t => { | |
| tM(t, eb) && $.addIframe(t), | |
| tN(t, eb) && q.trackLinkElement(t), | |
| tD(t) && te.addShadowRoot(t.shadowRoot, document) | |
| } | |
| , | |
| onIframeLoad: (t, e) => { | |
| $.attachIframe(t, e), | |
| te.observeAttachShadow(t) | |
| } | |
| , | |
| onStylesheetLoad: (t, e) => { | |
| q.attachLinkElement(t, e) | |
| } | |
| , | |
| keepIframeSrcFn: F | |
| }); | |
| if (!e) | |
| return console.warn("Failed to snapshot the document"); | |
| a(ey({ | |
| type: tL.FullSnapshot, | |
| data: { | |
| node: e, | |
| initialOffset: tA(window) | |
| } | |
| }), t), | |
| tj.forEach(t => t.unlock()), | |
| document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0 && q.adoptStyleSheets(document.adoptedStyleSheets, eb.getId(document)) | |
| } | |
| ; | |
| try { | |
| let t = [] | |
| , e = t => { | |
| var e; | |
| return tJ(t6)({ | |
| onMutation: W, | |
| mutationCb: j, | |
| mousemoveCb: (t, e) => a(ey({ | |
| type: tL.IncrementalSnapshot, | |
| data: { | |
| source: e, | |
| positions: t | |
| } | |
| })), | |
| mouseInteractionCb: t => a(ey({ | |
| type: tL.IncrementalSnapshot, | |
| data: Object.assign({ | |
| source: tF.MouseInteraction | |
| }, t) | |
| })), | |
| scrollCb: X, | |
| viewportResizeCb: t => a(ey({ | |
| type: tL.IncrementalSnapshot, | |
| data: Object.assign({ | |
| source: tF.ViewportResize | |
| }, t) | |
| })), | |
| inputCb: t => a(ey({ | |
| type: tL.IncrementalSnapshot, | |
| data: Object.assign({ | |
| source: tF.Input | |
| }, t) | |
| })), | |
| mediaInteractionCb: t => a(ey({ | |
| type: tL.IncrementalSnapshot, | |
| data: Object.assign({ | |
| source: tF.MediaInteraction | |
| }, t) | |
| })), | |
| styleSheetRuleCb: t => a(ey({ | |
| type: tL.IncrementalSnapshot, | |
| data: Object.assign({ | |
| source: tF.StyleSheetRule | |
| }, t) | |
| })), | |
| styleDeclarationCb: t => a(ey({ | |
| type: tL.IncrementalSnapshot, | |
| data: Object.assign({ | |
| source: tF.StyleDeclaration | |
| }, t) | |
| })), | |
| canvasMutationCb: Q, | |
| fontCb: t => a(ey({ | |
| type: tL.IncrementalSnapshot, | |
| data: Object.assign({ | |
| source: tF.Font | |
| }, t) | |
| })), | |
| selectionCb: t => { | |
| a(ey({ | |
| type: tL.IncrementalSnapshot, | |
| data: Object.assign({ | |
| source: tF.Selection | |
| }, t) | |
| })) | |
| } | |
| , | |
| customElementCb: t => { | |
| a(ey({ | |
| type: tL.IncrementalSnapshot, | |
| data: Object.assign({ | |
| source: tF.CustomElement | |
| }, t) | |
| })) | |
| } | |
| , | |
| blockClass: d, | |
| ignoreClass: c, | |
| ignoreSelector: p, | |
| maskAllText: g, | |
| maskTextClass: m, | |
| unmaskTextClass: f, | |
| maskTextSelector: _, | |
| unmaskTextSelector: y, | |
| maskInputOptions: K, | |
| inlineStylesheet: I, | |
| sampling: R, | |
| recordCanvas: M, | |
| inlineImages: B, | |
| userTriggeredOnInput: O, | |
| collectFonts: U, | |
| doc: t, | |
| maskAttributeFn: v, | |
| maskInputFn: S, | |
| maskTextFn: A, | |
| keepIframeSrcFn: F, | |
| blockSelector: u, | |
| unblockSelector: h, | |
| slimDOMOptions: P, | |
| dataURLOptions: T, | |
| mirror: eb, | |
| iframeManager: $, | |
| stylesheetManager: q, | |
| shadowDomManager: te, | |
| processedNodeManager: tt, | |
| canvasManager: l, | |
| ignoreCSSAttributes: z, | |
| plugins: (null === (e = null == L ? void 0 : L.filter(t => t.observer)) || void 0 === e ? void 0 : e.map(t => ({ | |
| observer: t.observer, | |
| options: t.options, | |
| callback: e => a(ey({ | |
| type: tL.Plugin, | |
| data: { | |
| plugin: t.name, | |
| payload: e | |
| } | |
| })) | |
| }))) || [] | |
| }, E) | |
| } | |
| ; | |
| $.addLoadListener(r => { | |
| try { | |
| t.push(e(r.contentDocument)) | |
| } catch (t) { | |
| console.warn(t) | |
| } | |
| } | |
| ); | |
| let r = () => { | |
| o(), | |
| t.push(e(document)), | |
| eI = !0 | |
| } | |
| ; | |
| return "interactive" === document.readyState || "complete" === document.readyState ? r() : (t.push(ty("DOMContentLoaded", () => { | |
| a(ey({ | |
| type: tL.DomContentLoaded, | |
| data: {} | |
| })), | |
| "DOMContentLoaded" === D && r() | |
| } | |
| )), | |
| t.push(ty("load", () => { | |
| a(ey({ | |
| type: tL.Load, | |
| data: {} | |
| })), | |
| "load" === D && r() | |
| } | |
| , window))), | |
| () => { | |
| t.forEach(t => t()), | |
| tt.destroy(), | |
| eI = !1, | |
| i = void 0 | |
| } | |
| } catch (t) { | |
| console.warn(t) | |
| } | |
| } | |
| function ew(t) { | |
| return t > 9999999999 ? t : 1e3 * t | |
| } | |
| function ev(t, e) { | |
| "sentry.transaction" !== e.category && (["ui.click", "ui.input"].includes(e.category) ? t.triggerUserActivity() : t.checkAndHandleExpiredSession(), | |
| t.addUpdate( () => (t.throttledAddEvent({ | |
| type: tL.Custom, | |
| timestamp: 1e3 * (e.timestamp || 0), | |
| data: { | |
| tag: "breadcrumb", | |
| payload: (0, | |
| k.Fv)(e, 10, 1e3) | |
| } | |
| }), | |
| "console" === e.category))) | |
| } | |
| function eS(t) { | |
| let e = eA(t); | |
| return e && e instanceof Element && e.closest("button,a") || e | |
| } | |
| function eA(t) { | |
| return "object" == typeof t && t && "target"in t ? t.target : t | |
| } | |
| eC.addCustomEvent = (t, e) => { | |
| if (!eI) | |
| throw Error("please add custom event after start recording"); | |
| a(ey({ | |
| type: tL.Custom, | |
| data: { | |
| tag: t, | |
| payload: e | |
| } | |
| })) | |
| } | |
| , | |
| eC.freezePage = () => { | |
| tj.forEach(t => t.freeze()) | |
| } | |
| , | |
| eC.takeFullSnapshot = t => { | |
| if (!eI) | |
| throw Error("please take full snapshot after start recording"); | |
| o(t) | |
| } | |
| , | |
| eC.mirror = eb; | |
| class eE { | |
| constructor(t, e, r=ev) { | |
| this._lastMutation = 0, | |
| this._lastScroll = 0, | |
| this._clicks = [], | |
| this._timeout = e.timeout / 1e3, | |
| this._threshold = e.threshold / 1e3, | |
| this._scollTimeout = e.scrollTimeout / 1e3, | |
| this._replay = t, | |
| this._ignoreSelector = e.ignoreSelector, | |
| this._addBreadcrumbEvent = r | |
| } | |
| addListeners() { | |
| var t; | |
| let e = () => { | |
| this._lastScroll = eR() | |
| } | |
| , r = (t = () => { | |
| this._lastMutation = eR() | |
| } | |
| , | |
| d || (d = [], | |
| (0, | |
| R.hl)(F, "open", function(t) { | |
| return function(...e) { | |
| if (d) | |
| try { | |
| d.forEach(t => t()) | |
| } catch (t) {} | |
| return t.apply(F, e) | |
| } | |
| })), | |
| d.push(t), | |
| () => { | |
| let e = d ? d.indexOf(t) : -1; | |
| e > -1 && d.splice(e, 1) | |
| } | |
| ) | |
| , n = t => { | |
| if (!t.target) | |
| return; | |
| let e = eS(t); | |
| e && this._handleMultiClick(e) | |
| } | |
| , s = new MutationObserver( () => { | |
| this._lastMutation = eR() | |
| } | |
| ); | |
| s.observe(F.document.documentElement, { | |
| attributes: !0, | |
| characterData: !0, | |
| childList: !0, | |
| subtree: !0 | |
| }), | |
| F.addEventListener("scroll", e, { | |
| passive: !0 | |
| }), | |
| F.addEventListener("click", n, { | |
| passive: !0 | |
| }), | |
| this._teardown = () => { | |
| F.removeEventListener("scroll", e), | |
| F.removeEventListener("click", n), | |
| r(), | |
| s.disconnect(), | |
| this._clicks = [], | |
| this._lastMutation = 0, | |
| this._lastScroll = 0 | |
| } | |
| } | |
| removeListeners() { | |
| this._teardown && this._teardown(), | |
| this._checkClickTimeout && clearTimeout(this._checkClickTimeout) | |
| } | |
| handleClick(t, e) { | |
| var r, n; | |
| if (n = this._ignoreSelector, | |
| !ek.includes(e.tagName) || "INPUT" === e.tagName && !["submit", "button"].includes(e.getAttribute("type") || "") || "A" === e.tagName && (e.hasAttribute("download") || e.hasAttribute("target") && "_self" !== e.getAttribute("target")) || n && e.matches(n) || !(t.data && "number" == typeof t.data.nodeId && t.timestamp)) | |
| return; | |
| let s = { | |
| timestamp: (r = t.timestamp) > 9999999999 ? r / 1e3 : r, | |
| clickBreadcrumb: t, | |
| clickCount: 0, | |
| node: e | |
| }; | |
| this._clicks.some(t => t.node === s.node && 1 > Math.abs(t.timestamp - s.timestamp)) || (this._clicks.push(s), | |
| 1 === this._clicks.length && this._scheduleCheckClicks()) | |
| } | |
| _handleMultiClick(t) { | |
| this._getClicks(t).forEach(t => { | |
| t.clickCount++ | |
| } | |
| ) | |
| } | |
| _getClicks(t) { | |
| return this._clicks.filter(e => e.node === t) | |
| } | |
| _checkClicks() { | |
| let t = [] | |
| , e = eR(); | |
| for (let r of (this._clicks.forEach(r => { | |
| !r.mutationAfter && this._lastMutation && (r.mutationAfter = r.timestamp <= this._lastMutation ? this._lastMutation - r.timestamp : void 0), | |
| !r.scrollAfter && this._lastScroll && (r.scrollAfter = r.timestamp <= this._lastScroll ? this._lastScroll - r.timestamp : void 0), | |
| r.timestamp + this._timeout <= e && t.push(r) | |
| } | |
| ), | |
| t)) { | |
| let t = this._clicks.indexOf(r); | |
| t > -1 && (this._generateBreadcrumbs(r), | |
| this._clicks.splice(t, 1)) | |
| } | |
| this._clicks.length && this._scheduleCheckClicks() | |
| } | |
| _generateBreadcrumbs(t) { | |
| let e = this._replay | |
| , r = t.scrollAfter && t.scrollAfter <= this._scollTimeout | |
| , n = t.mutationAfter && t.mutationAfter <= this._threshold | |
| , {clickCount: s, clickBreadcrumb: i} = t; | |
| if (!r && !n) { | |
| let r = 1e3 * Math.min(t.mutationAfter || this._timeout, this._timeout) | |
| , n = r < 1e3 * this._timeout ? "mutation" : "timeout" | |
| , a = { | |
| type: "default", | |
| message: i.message, | |
| timestamp: i.timestamp, | |
| category: "ui.slowClickDetected", | |
| data: { | |
| ...i.data, | |
| url: F.location.href, | |
| route: e.getCurrentRoute(), | |
| timeAfterClickMs: r, | |
| endReason: n, | |
| clickCount: s || 1 | |
| } | |
| }; | |
| this._addBreadcrumbEvent(e, a); | |
| return | |
| } | |
| if (s > 1) { | |
| let t = { | |
| type: "default", | |
| message: i.message, | |
| timestamp: i.timestamp, | |
| category: "ui.multiClick", | |
| data: { | |
| ...i.data, | |
| url: F.location.href, | |
| route: e.getCurrentRoute(), | |
| clickCount: s, | |
| metric: !0 | |
| } | |
| }; | |
| this._addBreadcrumbEvent(e, t) | |
| } | |
| } | |
| _scheduleCheckClicks() { | |
| this._checkClickTimeout && clearTimeout(this._checkClickTimeout), | |
| this._checkClickTimeout = setTimeout( () => this._checkClicks(), 1e3) | |
| } | |
| } | |
| let ek = ["A", "BUTTON", "INPUT"]; | |
| function eR() { | |
| return Date.now() / 1e3 | |
| } | |
| function eT(t) { | |
| return { | |
| timestamp: Date.now() / 1e3, | |
| type: "default", | |
| ...t | |
| } | |
| } | |
| (y = b || (b = {}))[y.Document = 0] = "Document", | |
| y[y.DocumentType = 1] = "DocumentType", | |
| y[y.Element = 2] = "Element", | |
| y[y.Text = 3] = "Text", | |
| y[y.CDATA = 4] = "CDATA", | |
| y[y.Comment = 5] = "Comment"; | |
| let ex = new Set(["id", "class", "aria-label", "role", "name", "alt", "title", "data-test-id", "data-testid", "disabled", "aria-disabled"]) | |
| , eM = t => e => { | |
| if (!t.isEnabled()) | |
| return; | |
| let r = function(t) { | |
| let {target: e, message: r} = function(t) { | |
| let e; | |
| let r = "click" === t.name | |
| , n = null; | |
| try { | |
| n = r ? eS(t.event) : eA(t.event), | |
| e = (0, | |
| T.Rt)(n, { | |
| maxStringLength: 200 | |
| }) || "<unknown>" | |
| } catch (t) { | |
| e = "<unknown>" | |
| } | |
| return { | |
| target: n, | |
| message: e | |
| } | |
| }(t); | |
| return eT({ | |
| category: `ui.${t.name}`, | |
| ...eN(e, r) | |
| }) | |
| }(e); | |
| if (!r) | |
| return; | |
| let n = "click" === e.name | |
| , s = n && e.event; | |
| !n || !t.clickDetector || !s || s.altKey || s.metaKey || s.ctrlKey || s.shiftKey || function(t, e, r) { | |
| t.handleClick(e, r) | |
| }(t.clickDetector, r, eS(e.event)), | |
| ev(t, r) | |
| } | |
| ; | |
| function eN(t, e) { | |
| let r = eC.mirror.getId(t) | |
| , n = r && eC.mirror.getNode(r) | |
| , s = n && eC.mirror.getMeta(n) | |
| , i = s && s.type === b.Element ? s : null; | |
| return { | |
| message: e, | |
| data: i ? { | |
| nodeId: r, | |
| node: { | |
| id: r, | |
| tagName: i.tagName, | |
| textContent: Array.from(i.childNodes).map(t => t.type === b.Text && t.textContent).filter(Boolean).map(t => t.trim()).join(""), | |
| attributes: function(t) { | |
| let e = {}; | |
| for (let r in t) | |
| if (ex.has(r)) { | |
| let n = r; | |
| ("data-testid" === r || "data-test-id" === r) && (n = "testId"), | |
| e[n] = t[r] | |
| } | |
| return e | |
| }(i.attributes) | |
| } | |
| } : {} | |
| } | |
| } | |
| let eD = { | |
| resource: function(t) { | |
| let {entryType: e, initiatorType: r, name: n, responseEnd: s, startTime: i, decodedBodySize: a, encodedBodySize: o, responseStatus: l, transferSize: d} = t; | |
| return ["fetch", "xmlhttprequest"].includes(r) ? null : { | |
| type: `${e}.${r}`, | |
| start: eU(i), | |
| end: eU(s), | |
| name: n, | |
| data: { | |
| size: d, | |
| statusCode: l, | |
| decodedBodySize: a, | |
| encodedBodySize: o | |
| } | |
| } | |
| }, | |
| paint: function(t) { | |
| let {duration: e, entryType: r, name: n, startTime: s} = t | |
| , i = eU(s); | |
| return { | |
| type: r, | |
| name: n, | |
| start: i, | |
| end: i + e, | |
| data: void 0 | |
| } | |
| }, | |
| navigation: function(t) { | |
| let {entryType: e, name: r, decodedBodySize: n, duration: s, domComplete: i, encodedBodySize: a, domContentLoadedEventStart: o, domContentLoadedEventEnd: l, domInteractive: d, loadEventStart: u, loadEventEnd: h, redirectCount: c, startTime: p, transferSize: g, type: m} = t; | |
| return 0 === s ? null : { | |
| type: `${e}.${m}`, | |
| start: eU(p), | |
| end: eU(i), | |
| name: r, | |
| data: { | |
| size: g, | |
| decodedBodySize: n, | |
| encodedBodySize: a, | |
| duration: s, | |
| domInteractive: d, | |
| domContentLoadedEventStart: o, | |
| domContentLoadedEventEnd: l, | |
| loadEventStart: u, | |
| loadEventEnd: h, | |
| domComplete: i, | |
| redirectCount: c | |
| } | |
| } | |
| } | |
| }; | |
| function eO(t) { | |
| return eD[t.entryType] ? eD[t.entryType](t) : null | |
| } | |
| function eU(t) { | |
| return ((x.Z1 || F.performance.timeOrigin) + t) / 1e3 | |
| } | |
| function eB(t, e) { | |
| ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && (M.kg.info(t), | |
| e && eF(t)) | |
| } | |
| function eL(t, e) { | |
| ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && (M.kg.info(t), | |
| e && setTimeout( () => { | |
| eF(t) | |
| } | |
| , 0)) | |
| } | |
| function eF(t) { | |
| (0, | |
| C.Gd)().addBreadcrumb({ | |
| category: "console", | |
| data: { | |
| logger: "replay" | |
| }, | |
| level: "info", | |
| message: t | |
| }, { | |
| level: "info" | |
| }) | |
| } | |
| class ez extends Error { | |
| constructor() { | |
| super("Event buffer exceeded maximum size of 20000000.") | |
| } | |
| } | |
| class eZ { | |
| constructor() { | |
| this.events = [], | |
| this._totalSize = 0, | |
| this.hasCheckout = !1 | |
| } | |
| get hasEvents() { | |
| return this.events.length > 0 | |
| } | |
| get type() { | |
| return "sync" | |
| } | |
| destroy() { | |
| this.events = [] | |
| } | |
| async addEvent(t) { | |
| let e = JSON.stringify(t).length; | |
| if (this._totalSize += e, | |
| this._totalSize > 2e7) | |
| throw new ez; | |
| this.events.push(t) | |
| } | |
| finish() { | |
| return new Promise(t => { | |
| let e = this.events; | |
| this.clear(), | |
| t(JSON.stringify(e)) | |
| } | |
| ) | |
| } | |
| clear() { | |
| this.events = [], | |
| this._totalSize = 0, | |
| this.hasCheckout = !1 | |
| } | |
| getEarliestTimestamp() { | |
| let t = this.events.map(t => t.timestamp).sort()[0]; | |
| return t ? ew(t) : null | |
| } | |
| } | |
| class eW { | |
| constructor(t) { | |
| this._worker = t, | |
| this._id = 0 | |
| } | |
| ensureReady() { | |
| return this._ensureReadyPromise || (this._ensureReadyPromise = new Promise( (t, e) => { | |
| this._worker.addEventListener("message", ({data: r}) => { | |
| r.success ? t() : e() | |
| } | |
| , { | |
| once: !0 | |
| }), | |
| this._worker.addEventListener("error", t => { | |
| e(t) | |
| } | |
| , { | |
| once: !0 | |
| }) | |
| } | |
| )), | |
| this._ensureReadyPromise | |
| } | |
| destroy() { | |
| eB("[Replay] Destroying compression worker"), | |
| this._worker.terminate() | |
| } | |
| postMessage(t, e) { | |
| let r = this._getAndIncrementId(); | |
| return new Promise( (n, s) => { | |
| let i = ({data: e}) => { | |
| if (e.method === t && e.id === r) { | |
| if (this._worker.removeEventListener("message", i), | |
| !e.success) { | |
| ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && M.kg.error("[Replay]", e.response), | |
| s(Error("Error in compression worker")); | |
| return | |
| } | |
| n(e.response) | |
| } | |
| } | |
| ; | |
| this._worker.addEventListener("message", i), | |
| this._worker.postMessage({ | |
| id: r, | |
| method: t, | |
| arg: e | |
| }) | |
| } | |
| ) | |
| } | |
| _getAndIncrementId() { | |
| return this._id++ | |
| } | |
| } | |
| class eG { | |
| constructor(t) { | |
| this._worker = new eW(t), | |
| this._earliestTimestamp = null, | |
| this._totalSize = 0, | |
| this.hasCheckout = !1 | |
| } | |
| get hasEvents() { | |
| return !!this._earliestTimestamp | |
| } | |
| get type() { | |
| return "worker" | |
| } | |
| ensureReady() { | |
| return this._worker.ensureReady() | |
| } | |
| destroy() { | |
| this._worker.destroy() | |
| } | |
| addEvent(t) { | |
| let e = ew(t.timestamp); | |
| (!this._earliestTimestamp || e < this._earliestTimestamp) && (this._earliestTimestamp = e); | |
| let r = JSON.stringify(t); | |
| return (this._totalSize += r.length, | |
| this._totalSize > 2e7) ? Promise.reject(new ez) : this._sendEventToWorker(r) | |
| } | |
| finish() { | |
| return this._finishRequest() | |
| } | |
| clear() { | |
| this._earliestTimestamp = null, | |
| this._totalSize = 0, | |
| this.hasCheckout = !1, | |
| this._worker.postMessage("clear") | |
| } | |
| getEarliestTimestamp() { | |
| return this._earliestTimestamp | |
| } | |
| _sendEventToWorker(t) { | |
| return this._worker.postMessage("addEvent", t) | |
| } | |
| async _finishRequest() { | |
| let t = await this._worker.postMessage("finish"); | |
| return this._earliestTimestamp = null, | |
| this._totalSize = 0, | |
| t | |
| } | |
| } | |
| class eV { | |
| constructor(t) { | |
| this._fallback = new eZ, | |
| this._compression = new eG(t), | |
| this._used = this._fallback, | |
| this._ensureWorkerIsLoadedPromise = this._ensureWorkerIsLoaded() | |
| } | |
| get type() { | |
| return this._used.type | |
| } | |
| get hasEvents() { | |
| return this._used.hasEvents | |
| } | |
| get hasCheckout() { | |
| return this._used.hasCheckout | |
| } | |
| set hasCheckout(t) { | |
| this._used.hasCheckout = t | |
| } | |
| destroy() { | |
| this._fallback.destroy(), | |
| this._compression.destroy() | |
| } | |
| clear() { | |
| return this._used.clear() | |
| } | |
| getEarliestTimestamp() { | |
| return this._used.getEarliestTimestamp() | |
| } | |
| addEvent(t) { | |
| return this._used.addEvent(t) | |
| } | |
| async finish() { | |
| return await this.ensureWorkerIsLoaded(), | |
| this._used.finish() | |
| } | |
| ensureWorkerIsLoaded() { | |
| return this._ensureWorkerIsLoadedPromise | |
| } | |
| async _ensureWorkerIsLoaded() { | |
| try { | |
| await this._compression.ensureReady() | |
| } catch (t) { | |
| eB("[Replay] Failed to load the compression worker, falling back to simple buffer"); | |
| return | |
| } | |
| await this._switchToCompressionWorker() | |
| } | |
| async _switchToCompressionWorker() { | |
| let {events: t, hasCheckout: e} = this._fallback | |
| , r = []; | |
| for (let e of t) | |
| r.push(this._compression.addEvent(e)); | |
| this._compression.hasCheckout = e, | |
| this._used = this._compression; | |
| try { | |
| await Promise.all(r) | |
| } catch (t) { | |
| ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && M.kg.warn("[Replay] Failed to add events when switching buffers.", t) | |
| } | |
| } | |
| } | |
| function eK() { | |
| try { | |
| return "sessionStorage"in F && !!F.sessionStorage | |
| } catch (t) { | |
| return !1 | |
| } | |
| } | |
| function eY(t) { | |
| return void 0 !== t && Math.random() < t | |
| } | |
| function eP(t) { | |
| if (eK()) | |
| try { | |
| F.sessionStorage.setItem(z, JSON.stringify(t)) | |
| } catch (t) {} | |
| } | |
| function eH(t) { | |
| let e = Date.now() | |
| , r = t.id || (0, | |
| N.DM)() | |
| , n = t.started || e | |
| , s = t.lastActivity || e; | |
| return { | |
| id: r, | |
| started: n, | |
| lastActivity: s, | |
| segmentId: t.segmentId || 0, | |
| sampled: t.sampled, | |
| previousSessionId: t.previousSessionId | |
| } | |
| } | |
| function eJ({sessionSampleRate: t, allowBuffering: e, stickySession: r=!1}, {previousSessionId: n}={}) { | |
| let s = eH({ | |
| sampled: eY(t) ? "session" : !!e && "buffer", | |
| previousSessionId: n | |
| }); | |
| return r && eP(s), | |
| s | |
| } | |
| function ej(t, e, r=+new Date) { | |
| return null === t || void 0 === e || e < 0 || 0 !== e && t + e <= r | |
| } | |
| function eX(t, {maxReplayDuration: e, sessionIdleExpire: r, targetTime: n=Date.now()}) { | |
| return ej(t.started, e, n) || ej(t.lastActivity, r, n) | |
| } | |
| function eQ(t, {sessionIdleExpire: e, maxReplayDuration: r}) { | |
| return !!eX(t, { | |
| sessionIdleExpire: e, | |
| maxReplayDuration: r | |
| }) && ("buffer" !== t.sampled || 0 !== t.segmentId) | |
| } | |
| function eq({traceInternals: t, sessionIdleExpire: e, maxReplayDuration: r, previousSessionId: n}, s) { | |
| let i = s.stickySession && function(t) { | |
| if (!eK()) | |
| return null; | |
| try { | |
| let e = F.sessionStorage.getItem(z); | |
| if (!e) | |
| return null; | |
| let r = JSON.parse(e); | |
| return eL("[Replay] Loading existing session", t), | |
| eH(r) | |
| } catch (t) { | |
| return null | |
| } | |
| }(t); | |
| return i ? eQ(i, { | |
| sessionIdleExpire: e, | |
| maxReplayDuration: r | |
| }) ? (eL("[Replay] Session in sessionStorage is expired, creating new one..."), | |
| eJ(s, { | |
| previousSessionId: i.id | |
| })) : i : (eL("[Replay] Creating new session", t), | |
| eJ(s, { | |
| previousSessionId: n | |
| })) | |
| } | |
| function e$(t, e, r) { | |
| return !!e1(t, e) && (e0(t, e, r), | |
| !0) | |
| } | |
| async function e0(t, e, r) { | |
| if (!t.eventBuffer) | |
| return null; | |
| try { | |
| r && "buffer" === t.recordingMode && t.eventBuffer.clear(), | |
| r && (t.eventBuffer.hasCheckout = !0); | |
| let n = t.getOptions() | |
| , s = function(t, e) { | |
| try { | |
| if ("function" == typeof e && t.type === tL.Custom) | |
| return e(t) | |
| } catch (t) { | |
| return ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && M.kg.error("[Replay] An error occured in the `beforeAddRecordingEvent` callback, skipping the event...", t), | |
| null | |
| } | |
| return t | |
| }(e, n.beforeAddRecordingEvent); | |
| if (!s) | |
| return; | |
| return await t.eventBuffer.addEvent(s) | |
| } catch (n) { | |
| let e = n && n instanceof ez ? "addEventSizeExceeded" : "addEvent"; | |
| ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && M.kg.error(n), | |
| await t.stop({ | |
| reason: e | |
| }); | |
| let r = (0, | |
| C.Gd)().getClient(); | |
| r && r.recordDroppedEvent("internal_sdk_error", "replay") | |
| } | |
| } | |
| function e1(t, e) { | |
| if (!t.eventBuffer || t.isPaused() || !t.isEnabled()) | |
| return !1; | |
| let r = ew(e.timestamp); | |
| return !(r + t.timeouts.sessionIdlePause < Date.now()) && (!(r > t.getContext().initialTimestamp + t.getOptions().maxReplayDuration) || (eB(`[Replay] Skipping event with timestamp ${r} because it is after maxReplayDuration`, t.getOptions()._experiments.traceInternals), | |
| !1)) | |
| } | |
| function e2(t) { | |
| return "transaction" === t.type | |
| } | |
| function e5(t) { | |
| let e = function() { | |
| let t = (0, | |
| C.Gd)().getClient(); | |
| if (!t) | |
| return !1; | |
| let e = t.getTransport(); | |
| return !!e && (e.send.__sentry__baseTransport__ || !1) | |
| }(); | |
| return (r, n) => { | |
| if (!t.isEnabled() || r.type && !e2(r)) | |
| return; | |
| let s = n && n.statusCode; | |
| if (!e || s && !(s < 200) && !(s >= 300)) { | |
| if (e2(r)) { | |
| !function(t, e) { | |
| let r = t.getContext(); | |
| e.contexts && e.contexts.trace && e.contexts.trace.trace_id && r.traceIds.size < 100 && r.traceIds.add(e.contexts.trace.trace_id) | |
| }(t, r); | |
| return | |
| } | |
| !function(t, e) { | |
| let r = t.getContext(); | |
| e.event_id && r.errorIds.size < 100 && r.errorIds.add(e.event_id), | |
| "buffer" === t.recordingMode && e.tags && e.tags.replayId && setTimeout( () => { | |
| t.sendBufferedReplayOrFlush() | |
| } | |
| ) | |
| }(t, r) | |
| } | |
| } | |
| } | |
| function e3(t, e) { | |
| return e.map( ({type: e, start: r, end: n, name: s, data: i}) => { | |
| let a = t.throttledAddEvent({ | |
| type: tL.Custom, | |
| timestamp: r, | |
| data: { | |
| tag: "performanceSpan", | |
| payload: { | |
| op: e, | |
| description: s, | |
| startTimestamp: r, | |
| endTimestamp: n, | |
| data: i | |
| } | |
| } | |
| }); | |
| return "string" == typeof a ? Promise.resolve(null) : a | |
| } | |
| ) | |
| } | |
| function e6(t, e) { | |
| var r; | |
| t.isEnabled() && null !== e && (r = e.name, | |
| (!("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) || !t.getOptions()._experiments.traceInternals) && (0, | |
| w.W)(r, (0, | |
| C.Gd)()) || t.addUpdate( () => (e3(t, [e]), | |
| !0))) | |
| } | |
| let e9 = ["true", "false", "null"]; | |
| function e4(t) { | |
| let e = function(t) { | |
| let e = []; | |
| for (let r = 0; r < t.length; r++) | |
| !function(t, e, r) { | |
| let n = t[t.length - 1] | |
| , s = e[r]; | |
| if (!/\s/.test(s)) { | |
| if ('"' === s && !function t(e, r) { | |
| return "\\" === e[r - 1] && !t(e, r - 1) | |
| }(e, r)) { | |
| !function(t, e) { | |
| if (14 === e) { | |
| t.pop(), | |
| t.push(15); | |
| return | |
| } | |
| if (22 === e) { | |
| t.pop(), | |
| t.push(23); | |
| return | |
| } | |
| if (13 === e) { | |
| t.push(14); | |
| return | |
| } | |
| if (21 === e) { | |
| t.push(22); | |
| return | |
| } | |
| if (10 === e) { | |
| t.push(12); | |
| return | |
| } | |
| 12 === e && (t.pop(), | |
| t.push(11)) | |
| }(t, n); | |
| return | |
| } | |
| switch (s) { | |
| case "{": | |
| !function(t, e) { | |
| if (!e || 13 === e) { | |
| t.push(10); | |
| return | |
| } | |
| 21 === e && t.push(10), | |
| 20 === e && t.push(10) | |
| }(t, n); | |
| break; | |
| case "[": | |
| !function(t, e) { | |
| if (!e || 13 === e) { | |
| t.push(20), | |
| t.push(21); | |
| return | |
| } | |
| 21 === e && (t.push(20), | |
| t.push(21)), | |
| 20 === e && (t.push(20), | |
| t.push(21)) | |
| }(t, n); | |
| break; | |
| case ":": | |
| 11 === n && (t.pop(), | |
| t.push(13)); | |
| break; | |
| case ",": | |
| !function(t, e) { | |
| if (13 === e) { | |
| t.pop(); | |
| return | |
| } | |
| if (15 === e) { | |
| t.pop(), | |
| t.pop(); | |
| return | |
| } | |
| 21 !== e && 23 === e && t.pop() | |
| }(t, n); | |
| break; | |
| case "}": | |
| 10 === n && t.pop(), | |
| 13 === n && (t.pop(), | |
| t.pop()), | |
| 15 === n && (t.pop(), | |
| t.pop(), | |
| t.pop()), | |
| 13 === t[t.length - 1] && t.push(15), | |
| 21 === t[t.length - 1] && t.push(23); | |
| break; | |
| case "]": | |
| 20 === n && t.pop(), | |
| 21 === n && (t.pop(), | |
| t.pop()), | |
| 23 === n && (t.pop(), | |
| t.pop(), | |
| t.pop()), | |
| 13 === t[t.length - 1] && t.push(15), | |
| 21 === t[t.length - 1] && t.push(23) | |
| } | |
| } | |
| }(e, t, r); | |
| return e | |
| }(t); | |
| return function(t, e) { | |
| if (!e.length) | |
| return t; | |
| let r = t | |
| , n = e.length - 1; | |
| r = function(t, e) { | |
| switch (e) { | |
| case 10: | |
| return `${t}"~~":"~~"`; | |
| case 11: | |
| return `${t}:"~~"`; | |
| case 12: | |
| return `${t}~~":"~~"`; | |
| case 13: | |
| return function(t) { | |
| let e = t.lastIndexOf(":") | |
| , r = t.slice(e + 1); | |
| return e9.includes(r.trim()) ? `${t},"~~":"~~"` : `${t.slice(0, e + 1)}"~~"` | |
| }(t); | |
| case 14: | |
| case 22: | |
| return `${t}~~"`; | |
| case 15: | |
| return `${t},"~~":"~~"`; | |
| case 20: | |
| return `${t}"~~"`; | |
| case 21: | |
| return function(t) { | |
| let e = function(t) { | |
| for (let e = t.length - 1; e >= 0; e--) { | |
| let r = t[e]; | |
| if ("," === r || "[" === r) | |
| return e | |
| } | |
| return -1 | |
| }(t); | |
| if (e > -1) { | |
| let r = t.slice(e + 1); | |
| return e9.includes(r.trim()) ? `${t},"~~"` : `${t.slice(0, e + 1)}"~~"` | |
| } | |
| return t | |
| }(t); | |
| case 23: | |
| return `${t},"~~"` | |
| } | |
| return t | |
| }(r, e[n]); | |
| for (let t = n; t >= 0; t--) | |
| switch (e[t]) { | |
| case 10: | |
| r = `${r}}`; | |
| break; | |
| case 20: | |
| r = `${r}]` | |
| } | |
| return r | |
| }(t, e) | |
| } | |
| function e8(t, e) { | |
| if (t) | |
| try { | |
| if ("string" == typeof t) | |
| return e.encode(t).length; | |
| if (t instanceof URLSearchParams) | |
| return e.encode(t.toString()).length; | |
| if (t instanceof FormData) { | |
| let r = ri(t); | |
| return e.encode(r).length | |
| } | |
| if (t instanceof Blob) | |
| return t.size; | |
| if (t instanceof ArrayBuffer) | |
| return t.byteLength | |
| } catch (t) {} | |
| } | |
| function e7(t) { | |
| if (!t) | |
| return; | |
| let e = parseInt(t, 10); | |
| return isNaN(e) ? void 0 : e | |
| } | |
| function rt(t) { | |
| return "string" == typeof t ? t : t instanceof URLSearchParams ? t.toString() : t instanceof FormData ? ri(t) : void 0 | |
| } | |
| function re(t, e) { | |
| if (!e) | |
| return null; | |
| let {startTimestamp: r, endTimestamp: n, url: s, method: i, statusCode: a, request: o, response: l} = e; | |
| return { | |
| type: t, | |
| start: r / 1e3, | |
| end: n / 1e3, | |
| name: s, | |
| data: (0, | |
| R.Jr)({ | |
| method: i, | |
| statusCode: a, | |
| request: o, | |
| response: l | |
| }) | |
| } | |
| } | |
| function rr(t) { | |
| return { | |
| headers: {}, | |
| size: t, | |
| _meta: { | |
| warnings: ["URL_SKIPPED"] | |
| } | |
| } | |
| } | |
| function rn(t, e, r) { | |
| if (!e && 0 === Object.keys(t).length) | |
| return; | |
| if (!e) | |
| return { | |
| headers: t | |
| }; | |
| if (!r) | |
| return { | |
| headers: t, | |
| size: e | |
| }; | |
| let n = { | |
| headers: t, | |
| size: e | |
| } | |
| , {body: s, warnings: i} = function(t) { | |
| if (!t || "string" != typeof t) | |
| return { | |
| body: t, | |
| warnings: [] | |
| }; | |
| let e = t.length > 15e4; | |
| if (function(t) { | |
| let e = t[0] | |
| , r = t[t.length - 1]; | |
| return "[" === e && "]" === r || "{" === e && "}" === r | |
| }(t)) | |
| try { | |
| let r = e ? e4(t.slice(0, 15e4)) : t; | |
| return { | |
| body: JSON.parse(r), | |
| warnings: e ? ["JSON_TRUNCATED"] : [] | |
| } | |
| } catch (r) { | |
| return { | |
| body: e ? `${t.slice(0, 15e4)}…` : t, | |
| warnings: e ? ["INVALID_JSON", "TEXT_TRUNCATED"] : ["INVALID_JSON"] | |
| } | |
| } | |
| return { | |
| body: e ? `${t.slice(0, 15e4)}…` : t, | |
| warnings: e ? ["TEXT_TRUNCATED"] : [] | |
| } | |
| }(r); | |
| return n.body = s, | |
| i.length > 0 && (n._meta = { | |
| warnings: i | |
| }), | |
| n | |
| } | |
| function rs(t, e) { | |
| return Object.keys(t).reduce( (r, n) => { | |
| let s = n.toLowerCase(); | |
| return e.includes(s) && t[n] && (r[s] = t[n]), | |
| r | |
| } | |
| , {}) | |
| } | |
| function ri(t) { | |
| return new URLSearchParams(t).toString() | |
| } | |
| function ra(t, e) { | |
| let r = function(t, e=F.document.baseURI) { | |
| if (t.startsWith("http://") || t.startsWith("https://") || t.startsWith(F.location.origin)) | |
| return t; | |
| let r = new URL(t,e); | |
| if (r.origin !== new URL(e).origin) | |
| return t; | |
| let n = r.href; | |
| return !t.endsWith("/") && n.endsWith("/") ? n.slice(0, -1) : n | |
| }(t); | |
| return (0, | |
| O.U0)(r, e) | |
| } | |
| async function ro(t, e, r) { | |
| try { | |
| let n = await rl(t, e, r) | |
| , s = re("resource.fetch", n); | |
| e6(r.replay, s) | |
| } catch (t) { | |
| ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && M.kg.error("[Replay] Failed to capture fetch breadcrumb", t) | |
| } | |
| } | |
| async function rl(t, e, r) { | |
| let {startTimestamp: n, endTimestamp: s} = e | |
| , {url: i, method: a, status_code: o=0, request_body_size: l, response_body_size: d} = t.data | |
| , u = ra(i, r.networkDetailAllowUrls) && !ra(i, r.networkDetailDenyUrls); | |
| return { | |
| startTimestamp: n, | |
| endTimestamp: s, | |
| url: i, | |
| method: a, | |
| statusCode: o, | |
| request: u ? function({networkCaptureBodies: t, networkRequestHeaders: e}, r, n) { | |
| let s = 1 === r.length && "string" != typeof r[0] ? rp(r[0], e) : 2 === r.length ? rp(r[1], e) : {}; | |
| return t ? rn(s, n, rt(rh(r))) : rn(s, n, void 0) | |
| }(r, e.input, l) : rr(l), | |
| response: await rd(u, r, e.response, d) | |
| } | |
| } | |
| async function rd(t, {networkCaptureBodies: e, textEncoder: r, networkResponseHeaders: n}, s, i) { | |
| if (!t && void 0 !== i) | |
| return rr(i); | |
| let a = rc(s.headers, n); | |
| if (!e && void 0 !== i) | |
| return rn(a, i, void 0); | |
| try { | |
| let n = s.clone() | |
| , o = await ru(n) | |
| , l = o && o.length && void 0 === i ? e8(o, r) : i; | |
| if (!t) | |
| return rr(l); | |
| if (e) | |
| return rn(a, l, o); | |
| return rn(a, l, void 0) | |
| } catch (t) { | |
| return rn(a, i, void 0) | |
| } | |
| } | |
| async function ru(t) { | |
| try { | |
| return await t.text() | |
| } catch (t) { | |
| return | |
| } | |
| } | |
| function rh(t=[]) { | |
| if (2 === t.length && "object" == typeof t[1]) | |
| return t[1].body | |
| } | |
| function rc(t, e) { | |
| let r = {}; | |
| return e.forEach(e => { | |
| t.get(e) && (r[e] = t.get(e)) | |
| } | |
| ), | |
| r | |
| } | |
| function rp(t, e) { | |
| if (!t) | |
| return {}; | |
| let r = t.headers; | |
| return r ? r instanceof Headers ? rc(r, e) : Array.isArray(r) ? {} : rs(r, e) : {} | |
| } | |
| async function rg(t, e, r) { | |
| try { | |
| let n = function(t, e, r) { | |
| let {startTimestamp: n, endTimestamp: s, input: i, xhr: a} = e | |
| , {url: o, method: l, status_code: d=0, request_body_size: u, response_body_size: h} = t.data; | |
| if (!o) | |
| return null; | |
| if (!ra(o, r.networkDetailAllowUrls) || ra(o, r.networkDetailDenyUrls)) { | |
| let t = rr(u); | |
| return { | |
| startTimestamp: n, | |
| endTimestamp: s, | |
| url: o, | |
| method: l, | |
| statusCode: d, | |
| request: t, | |
| response: rr(h) | |
| } | |
| } | |
| let c = a[D.xU] | |
| , p = c ? rs(c.request_headers, r.networkRequestHeaders) : {} | |
| , g = rs(function(t) { | |
| let e = t.getAllResponseHeaders(); | |
| return e ? e.split("\r\n").reduce( (t, e) => { | |
| let[r,n] = e.split(": "); | |
| return t[r.toLowerCase()] = n, | |
| t | |
| } | |
| , {}) : {} | |
| }(a), r.networkResponseHeaders) | |
| , m = rn(p, u, r.networkCaptureBodies ? rt(i) : void 0); | |
| return { | |
| startTimestamp: n, | |
| endTimestamp: s, | |
| url: o, | |
| method: l, | |
| statusCode: d, | |
| request: m, | |
| response: rn(g, h, r.networkCaptureBodies ? e.xhr.responseText : void 0) | |
| } | |
| }(t, e, r) | |
| , s = re("resource.xhr", n); | |
| e6(r.replay, s) | |
| } catch (t) { | |
| ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && M.kg.error("[Replay] Failed to capture xhr breadcrumb", t) | |
| } | |
| } | |
| let rm = null | |
| , rf = t => e => { | |
| if (!t.isEnabled()) | |
| return; | |
| let r = function(t) { | |
| let e = t.getLastBreadcrumb && t.getLastBreadcrumb(); | |
| return rm !== e && e ? (rm = e, | |
| !e.category || ["fetch", "xhr", "sentry.event", "sentry.transaction"].includes(e.category) || e.category.startsWith("ui.")) ? null : "console" === e.category ? function(t) { | |
| let e = t.data && t.data.arguments; | |
| if (!Array.isArray(e) || 0 === e.length) | |
| return eT(t); | |
| let r = !1 | |
| , n = e.map(t => { | |
| if (!t) | |
| return t; | |
| if ("string" == typeof t) | |
| return t.length > 5e3 ? (r = !0, | |
| `${t.slice(0, 5e3)}…`) : t; | |
| if ("object" == typeof t) | |
| try { | |
| let e = (0, | |
| k.Fv)(t, 7) | |
| , n = JSON.stringify(e); | |
| if (n.length > 5e3) { | |
| let t = e4(n.slice(0, 5e3)) | |
| , e = JSON.parse(t); | |
| return r = !0, | |
| e | |
| } | |
| return e | |
| } catch (t) {} | |
| return t | |
| } | |
| ); | |
| return eT({ | |
| ...t, | |
| data: { | |
| ...t.data, | |
| arguments: n, | |
| ...r ? { | |
| _meta: { | |
| warnings: ["CONSOLE_ARG_TRUNCATED"] | |
| } | |
| } : {} | |
| } | |
| }) | |
| }(e) : eT(e) : null | |
| }(e); | |
| r && ev(t, r) | |
| } | |
| ; | |
| async function r_(t) { | |
| try { | |
| return Promise.all(e3(t, [function(t) { | |
| let {jsHeapSizeLimit: e, totalJSHeapSize: r, usedJSHeapSize: n} = t | |
| , s = Date.now() / 1e3; | |
| return { | |
| type: "memory", | |
| name: "memory", | |
| start: s, | |
| end: s, | |
| data: { | |
| memory: { | |
| jsHeapSizeLimit: e, | |
| totalJSHeapSize: r, | |
| usedJSHeapSize: n | |
| } | |
| } | |
| } | |
| }(F.performance.memory)])) | |
| } catch (t) { | |
| return [] | |
| } | |
| } | |
| async function ry({client: t, scope: e, replayId: r, event: n}) { | |
| let s = { | |
| event_id: r, | |
| integrations: "object" != typeof t._integrations || null === t._integrations || Array.isArray(t._integrations) ? void 0 : Object.keys(t._integrations) | |
| }; | |
| t.emit && t.emit("preprocessEvent", n, s); | |
| let i = await (0, | |
| S.R)(t.getOptions(), n, s, e, t); | |
| if (!i) | |
| return null; | |
| i.platform = i.platform || "javascript"; | |
| let a = t.getSdkMetadata && t.getSdkMetadata() | |
| , {name: o, version: l} = a && a.sdk || {}; | |
| return i.sdk = { | |
| ...i.sdk, | |
| name: o || "sentry.javascript.unknown", | |
| version: l || "0.0.0" | |
| }, | |
| i | |
| } | |
| async function rI({recordingData: t, replayId: e, segmentId: r, eventContext: n, timestamp: s, session: i}) { | |
| var a; | |
| let o; | |
| let l = function({recordingData: t, headers: e}) { | |
| let r; | |
| let n = `${JSON.stringify(e)} | |
| `; | |
| if ("string" == typeof t) | |
| r = `${n}${t}`; | |
| else { | |
| let e = new TextEncoder().encode(n); | |
| (r = new Uint8Array(e.length + t.length)).set(e), | |
| r.set(t, e.length) | |
| } | |
| return r | |
| }({ | |
| recordingData: t, | |
| headers: { | |
| segment_id: r | |
| } | |
| }) | |
| , {urls: d, errorIds: u, traceIds: h, initialTimestamp: c} = n | |
| , p = (0, | |
| C.Gd)() | |
| , g = p.getClient() | |
| , m = p.getScope() | |
| , f = g && g.getTransport() | |
| , _ = g && g.getDsn(); | |
| if (!g || !f || !_ || !i.sampled) | |
| return; | |
| let y = { | |
| type: "replay_event", | |
| replay_start_timestamp: c / 1e3, | |
| timestamp: s / 1e3, | |
| error_ids: u, | |
| trace_ids: h, | |
| urls: d, | |
| replay_id: e, | |
| segment_id: r, | |
| replay_type: i.sampled | |
| } | |
| , I = await ry({ | |
| scope: m, | |
| client: g, | |
| replayId: e, | |
| event: y | |
| }); | |
| if (!I) { | |
| g.recordDroppedEvent("event_processor", "replay", y), | |
| eB("An event processor returned `null`, will not send event."); | |
| return | |
| } | |
| delete I.sdkProcessingMetadata; | |
| let b = (a = g.getOptions().tunnel, | |
| (0, | |
| U.Jd)((0, | |
| U.Cd)(I, (0, | |
| U.HY)(I), a, _), [[{ | |
| type: "replay_event" | |
| }, I], [{ | |
| type: "replay_recording", | |
| length: "string" == typeof l ? new TextEncoder().encode(l).length : l.length | |
| }, l]])); | |
| try { | |
| o = await f.send(b) | |
| } catch (e) { | |
| let t = Error(Z); | |
| try { | |
| t.cause = e | |
| } catch (t) {} | |
| throw t | |
| } | |
| if (!o) | |
| return o; | |
| if ("number" == typeof o.statusCode && (o.statusCode < 200 || o.statusCode >= 300)) | |
| throw new rb(o.statusCode); | |
| return o | |
| } | |
| class rb extends Error { | |
| constructor(t) { | |
| super(`Transport returned status code ${t}`) | |
| } | |
| } | |
| async function rC(t, e={ | |
| count: 0, | |
| interval: 5e3 | |
| }) { | |
| let {recordingData: r, options: n} = t; | |
| if (r.length) | |
| try { | |
| return await rI(t), | |
| !0 | |
| } catch (r) { | |
| if (r instanceof rb) | |
| throw r; | |
| if ((0, | |
| A.v)("Replays", { | |
| _retryCount: e.count | |
| }), | |
| ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && n._experiments && n._experiments.captureExceptions && (0, | |
| A.Tb)(r), | |
| e.count >= 3) { | |
| let t = Error(`${Z} - max retries exceeded`); | |
| try { | |
| t.cause = r | |
| } catch (t) {} | |
| throw t | |
| } | |
| return e.interval *= ++e.count, | |
| new Promise( (r, n) => { | |
| setTimeout(async () => { | |
| try { | |
| await rC(t, e), | |
| r(!0) | |
| } catch (t) { | |
| n(t) | |
| } | |
| } | |
| , e.interval) | |
| } | |
| ) | |
| } | |
| } | |
| let rw = "__THROTTLED"; | |
| class rv { | |
| constructor({options: t, recordingOptions: e}) { | |
| rv.prototype.__init.call(this), | |
| rv.prototype.__init2.call(this), | |
| rv.prototype.__init3.call(this), | |
| rv.prototype.__init4.call(this), | |
| rv.prototype.__init5.call(this), | |
| rv.prototype.__init6.call(this), | |
| this.eventBuffer = null, | |
| this.performanceEntries = [], | |
| this.replayPerformanceEntries = [], | |
| this.recordingMode = "session", | |
| this.timeouts = { | |
| sessionIdlePause: 3e5, | |
| sessionIdleExpire: 9e5 | |
| }, | |
| this._lastActivity = Date.now(), | |
| this._isEnabled = !1, | |
| this._isPaused = !1, | |
| this._hasInitializedCoreListeners = !1, | |
| this._context = { | |
| errorIds: new Set, | |
| traceIds: new Set, | |
| urls: [], | |
| initialTimestamp: Date.now(), | |
| initialUrl: "" | |
| }, | |
| this._recordingOptions = e, | |
| this._options = t, | |
| this._debouncedFlush = function(t, e, r) { | |
| let n, s, i; | |
| let a = r && r.maxWait ? Math.max(r.maxWait, e) : 0; | |
| function o() { | |
| return l(), | |
| n = t() | |
| } | |
| function l() { | |
| void 0 !== s && clearTimeout(s), | |
| void 0 !== i && clearTimeout(i), | |
| s = i = void 0 | |
| } | |
| function d() { | |
| return s && clearTimeout(s), | |
| s = setTimeout(o, e), | |
| a && void 0 === i && (i = setTimeout(o, a)), | |
| n | |
| } | |
| return d.cancel = l, | |
| d.flush = function() { | |
| return void 0 !== s || void 0 !== i ? o() : n | |
| } | |
| , | |
| d | |
| }( () => this._flush(), this._options.flushMinDelay, { | |
| maxWait: this._options.flushMaxDelay | |
| }), | |
| this._throttledAddEvent = function(t, e, r) { | |
| let n = new Map | |
| , s = t => { | |
| let e = t - 5; | |
| n.forEach( (t, r) => { | |
| r < e && n.delete(r) | |
| } | |
| ) | |
| } | |
| , i = () => [...n.values()].reduce( (t, e) => t + e, 0) | |
| , a = !1; | |
| return (...e) => { | |
| let r = Math.floor(Date.now() / 1e3); | |
| if (s(r), | |
| i() >= 300) { | |
| let t = a; | |
| return a = !0, | |
| t ? "__SKIPPED" : rw | |
| } | |
| a = !1; | |
| let o = n.get(r) || 0; | |
| return n.set(r, o + 1), | |
| t(...e) | |
| } | |
| }( (t, e) => e1(this, t) ? e0(this, t, e) : Promise.resolve(null), 0, 0); | |
| let {slowClickTimeout: r, slowClickIgnoreSelectors: n} = this.getOptions() | |
| , s = r ? { | |
| threshold: Math.min(3e3, r), | |
| timeout: r, | |
| scrollTimeout: 300, | |
| ignoreSelector: n ? n.join(",") : "" | |
| } : void 0; | |
| s && (this.clickDetector = new eE(this,s)) | |
| } | |
| getContext() { | |
| return this._context | |
| } | |
| isEnabled() { | |
| return this._isEnabled | |
| } | |
| isPaused() { | |
| return this._isPaused | |
| } | |
| getOptions() { | |
| return this._options | |
| } | |
| initializeSampling(t) { | |
| let {errorSampleRate: e, sessionSampleRate: r} = this._options; | |
| if (!(e <= 0) || !(r <= 0)) { | |
| if (this._initializeSessionForSampling(t), | |
| !this.session) { | |
| this._handleException(Error("Unable to initialize and create session")); | |
| return | |
| } | |
| !1 !== this.session.sampled && (this.recordingMode = "buffer" === this.session.sampled && 0 === this.session.segmentId ? "buffer" : "session", | |
| eL(`[Replay] Starting replay in ${this.recordingMode} mode`, this._options._experiments.traceInternals), | |
| this._initializeRecording()) | |
| } | |
| } | |
| start() { | |
| if (this._isEnabled && "session" === this.recordingMode) | |
| throw Error("Replay recording is already in progress"); | |
| if (this._isEnabled && "buffer" === this.recordingMode) | |
| throw Error("Replay buffering is in progress, call `flush()` to save the replay"); | |
| eL("[Replay] Starting replay in session mode", this._options._experiments.traceInternals); | |
| let t = eq({ | |
| maxReplayDuration: this._options.maxReplayDuration, | |
| sessionIdleExpire: this.timeouts.sessionIdleExpire, | |
| traceInternals: this._options._experiments.traceInternals | |
| }, { | |
| stickySession: this._options.stickySession, | |
| sessionSampleRate: 1, | |
| allowBuffering: !1 | |
| }); | |
| this.session = t, | |
| this._initializeRecording() | |
| } | |
| startBuffering() { | |
| if (this._isEnabled) | |
| throw Error("Replay recording is already in progress"); | |
| eL("[Replay] Starting replay in buffer mode", this._options._experiments.traceInternals); | |
| let t = eq({ | |
| sessionIdleExpire: this.timeouts.sessionIdleExpire, | |
| maxReplayDuration: this._options.maxReplayDuration, | |
| traceInternals: this._options._experiments.traceInternals | |
| }, { | |
| stickySession: this._options.stickySession, | |
| sessionSampleRate: 0, | |
| allowBuffering: !0 | |
| }); | |
| this.session = t, | |
| this.recordingMode = "buffer", | |
| this._initializeRecording() | |
| } | |
| startRecording() { | |
| try { | |
| var t; | |
| let e; | |
| this._stopRecording = eC({ | |
| ...this._recordingOptions, | |
| ..."buffer" === this.recordingMode && { | |
| checkoutEveryNms: 6e4 | |
| }, | |
| emit: (t = this, | |
| e = !1, | |
| (r, n) => { | |
| if (!t.checkAndHandleExpiredSession()) { | |
| ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && M.kg.warn("[Replay] Received replay event after session expired."); | |
| return | |
| } | |
| let s = n || !e; | |
| e = !0, | |
| t.addUpdate( () => { | |
| if ("buffer" === t.recordingMode && s && t.setInitialState(), | |
| !e$(t, r, s)) | |
| return !0; | |
| if (!s) | |
| return !1; | |
| if (s && t.session && 0 === t.session.segmentId && e$(t, function(t) { | |
| let e = t.getOptions(); | |
| return { | |
| type: tL.Custom, | |
| timestamp: Date.now(), | |
| data: { | |
| tag: "options", | |
| payload: { | |
| sessionSampleRate: e.sessionSampleRate, | |
| errorSampleRate: e.errorSampleRate, | |
| useCompressionOption: e.useCompression, | |
| blockAllMedia: e.blockAllMedia, | |
| maskAllText: e.maskAllText, | |
| maskAllInputs: e.maskAllInputs, | |
| useCompression: !!t.eventBuffer && "worker" === t.eventBuffer.type, | |
| networkDetailHasUrls: e.networkDetailAllowUrls.length > 0, | |
| networkCaptureBodies: e.networkCaptureBodies, | |
| networkRequestHasHeaders: e.networkRequestHeaders.length > 0, | |
| networkResponseHasHeaders: e.networkResponseHeaders.length > 0 | |
| } | |
| } | |
| } | |
| }(t), !1), | |
| t.session && t.session.previousSessionId) | |
| return !0; | |
| if ("buffer" === t.recordingMode && t.session && t.eventBuffer) { | |
| let e = t.eventBuffer.getEarliestTimestamp(); | |
| e && (eB(`[Replay] Updating session start time to earliest event in buffer to ${new Date(e)}`, t.getOptions()._experiments.traceInternals), | |
| t.session.started = e, | |
| t.getOptions().stickySession && eP(t.session)) | |
| } | |
| return "session" === t.recordingMode && t.flush(), | |
| !0 | |
| } | |
| ) | |
| } | |
| ), | |
| onMutation: this._onMutationHandler | |
| }) | |
| } catch (t) { | |
| this._handleException(t) | |
| } | |
| } | |
| stopRecording() { | |
| try { | |
| return this._stopRecording && (this._stopRecording(), | |
| this._stopRecording = void 0), | |
| !0 | |
| } catch (t) { | |
| return this._handleException(t), | |
| !1 | |
| } | |
| } | |
| async stop({forceFlush: t=!1, reason: e}={}) { | |
| if (this._isEnabled) { | |
| this._isEnabled = !1; | |
| try { | |
| eB(`[Replay] Stopping Replay${e ? ` triggered by ${e}` : ""}`, this._options._experiments.traceInternals), | |
| this._removeListeners(), | |
| this.stopRecording(), | |
| this._debouncedFlush.cancel(), | |
| t && await this._flush({ | |
| force: !0 | |
| }), | |
| this.eventBuffer && this.eventBuffer.destroy(), | |
| this.eventBuffer = null, | |
| function() { | |
| if (eK()) | |
| try { | |
| F.sessionStorage.removeItem(z) | |
| } catch (t) {} | |
| }(), | |
| this.session = void 0 | |
| } catch (t) { | |
| this._handleException(t) | |
| } | |
| } | |
| } | |
| pause() { | |
| this._isPaused || (this._isPaused = !0, | |
| this.stopRecording(), | |
| eB("[Replay] Pausing replay", this._options._experiments.traceInternals)) | |
| } | |
| resume() { | |
| this._isPaused && this._checkSession() && (this._isPaused = !1, | |
| this.startRecording(), | |
| eB("[Replay] Resuming replay", this._options._experiments.traceInternals)) | |
| } | |
| async sendBufferedReplayOrFlush({continueRecording: t=!0}={}) { | |
| if ("session" === this.recordingMode) | |
| return this.flushImmediate(); | |
| let e = Date.now(); | |
| eB("[Replay] Converting buffer to session", this._options._experiments.traceInternals), | |
| await this.flushImmediate(); | |
| let r = this.stopRecording(); | |
| t && r && "session" !== this.recordingMode && (this.recordingMode = "session", | |
| this.session && (this._updateUserActivity(e), | |
| this._updateSessionActivity(e), | |
| this._maybeSaveSession()), | |
| this.startRecording()) | |
| } | |
| addUpdate(t) { | |
| let e = t(); | |
| "buffer" !== this.recordingMode && !0 !== e && this._debouncedFlush() | |
| } | |
| triggerUserActivity() { | |
| if (this._updateUserActivity(), | |
| !this._stopRecording) { | |
| if (!this._checkSession()) | |
| return; | |
| this.resume(); | |
| return | |
| } | |
| this.checkAndHandleExpiredSession(), | |
| this._updateSessionActivity() | |
| } | |
| updateUserActivity() { | |
| this._updateUserActivity(), | |
| this._updateSessionActivity() | |
| } | |
| conditionalFlush() { | |
| return "buffer" === this.recordingMode ? Promise.resolve() : this.flushImmediate() | |
| } | |
| flush() { | |
| return this._debouncedFlush() | |
| } | |
| flushImmediate() { | |
| return this._debouncedFlush(), | |
| this._debouncedFlush.flush() | |
| } | |
| cancelFlush() { | |
| this._debouncedFlush.cancel() | |
| } | |
| getSessionId() { | |
| return this.session && this.session.id | |
| } | |
| checkAndHandleExpiredSession() { | |
| if (this._lastActivity && ej(this._lastActivity, this.timeouts.sessionIdlePause) && this.session && "session" === this.session.sampled) { | |
| this.pause(); | |
| return | |
| } | |
| return !!this._checkSession() | |
| } | |
| setInitialState() { | |
| let t = `${F.location.pathname}${F.location.hash}${F.location.search}` | |
| , e = `${F.location.origin}${t}`; | |
| this.performanceEntries = [], | |
| this.replayPerformanceEntries = [], | |
| this._clearContext(), | |
| this._context.initialUrl = e, | |
| this._context.initialTimestamp = Date.now(), | |
| this._context.urls.push(e) | |
| } | |
| throttledAddEvent(t, e) { | |
| let r = this._throttledAddEvent(t, e); | |
| if (r === rw) { | |
| let t = eT({ | |
| category: "replay.throttled" | |
| }); | |
| this.addUpdate( () => !e$(this, { | |
| type: 5, | |
| timestamp: t.timestamp || 0, | |
| data: { | |
| tag: "breadcrumb", | |
| payload: t, | |
| metric: !0 | |
| } | |
| })) | |
| } | |
| return r | |
| } | |
| getCurrentRoute() { | |
| let t = this.lastTransaction || (0, | |
| C.Gd)().getScope().getTransaction(); | |
| if (t && ["route", "custom"].includes(t.metadata.source)) | |
| return t.name | |
| } | |
| _initializeRecording() { | |
| this.setInitialState(), | |
| this._updateSessionActivity(), | |
| this.eventBuffer = function({useCompression: t, workerUrl: e}) { | |
| if (t && window.Worker) { | |
| let t = function(t) { | |
| try { | |
| let e = t || ("undefined" != typeof __SENTRY_EXCLUDE_REPLAY_WORKER__ && __SENTRY_EXCLUDE_REPLAY_WORKER__ ? "" : function() { | |
| let t = new Blob(['var t={},e={};function a(t){let e=t.length;for(;--e>=0;)t[e]=0}const s=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),r=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),n=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),_=new Array(576);a(_);const l=new Array(60);a(l);const h=new Array(512);a(h);const o=new Array(256);a(o);const d=new Array(29);a(d);const u=new Array(30);function f(t,e,a,s,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=s,this.max_length=r,this.has_stree=t&&t.length}let c,p,g;function w(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}a(u);const m=t=>t<256?h[t]:h[256+(t>>>7)],b=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},y=(t,e,a)=>{t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,b(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},v=(t,e,a)=>{y(t,a[2*e],a[2*e+1])},z=(t,e)=>{let a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},k=(t,e,a)=>{const s=new Array(16);let r,n,i=0;for(r=1;r<=15;r++)i=i+a[r-1]<<1,s[r]=i;for(n=0;n<=e;n++){let e=t[2*n+1];0!==e&&(t[2*n]=z(s[e]++,e))}},x=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},A=t=>{t.bi_valid>8?b(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},E=(t,e,a,s)=>{const r=2*e,n=2*a;return t[r]<t[n]||t[r]===t[n]&&s[e]<=s[a]},Z=(t,e,a)=>{const s=t.heap[a];let r=a<<1;for(;r<=t.heap_len&&(r<t.heap_len&&E(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!E(e,s,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=s},S=(t,e,a)=>{let n,i,_,l,h=0;if(0!==t.sym_next)do{n=255&t.pending_buf[t.sym_buf+h++],n+=(255&t.pending_buf[t.sym_buf+h++])<<8,i=t.pending_buf[t.sym_buf+h++],0===n?v(t,i,e):(_=o[i],v(t,_+256+1,e),l=s[_],0!==l&&(i-=d[_],y(t,i,l)),n--,_=m(n),v(t,_,a),l=r[_],0!==l&&(n-=u[_],y(t,n,l)))}while(h<t.sym_next);v(t,256,e)},U=(t,e)=>{const a=e.dyn_tree,s=e.stat_desc.static_tree,r=e.stat_desc.has_stree,n=e.stat_desc.elems;let i,_,l,h=-1;for(t.heap_len=0,t.heap_max=573,i=0;i<n;i++)0!==a[2*i]?(t.heap[++t.heap_len]=h=i,t.depth[i]=0):a[2*i+1]=0;for(;t.heap_len<2;)l=t.heap[++t.heap_len]=h<2?++h:0,a[2*l]=1,t.depth[l]=0,t.opt_len--,r&&(t.static_len-=s[2*l+1]);for(e.max_code=h,i=t.heap_len>>1;i>=1;i--)Z(t,a,i);l=n;do{i=t.heap[1],t.heap[1]=t.heap[t.heap_len--],Z(t,a,1),_=t.heap[1],t.heap[--t.heap_max]=i,t.heap[--t.heap_max]=_,a[2*l]=a[2*i]+a[2*_],t.depth[l]=(t.depth[i]>=t.depth[_]?t.depth[i]:t.depth[_])+1,a[2*i+1]=a[2*_+1]=l,t.heap[1]=l++,Z(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const a=e.dyn_tree,s=e.max_code,r=e.stat_desc.static_tree,n=e.stat_desc.has_stree,i=e.stat_desc.extra_bits,_=e.stat_desc.extra_base,l=e.stat_desc.max_length;let h,o,d,u,f,c,p=0;for(u=0;u<=15;u++)t.bl_count[u]=0;for(a[2*t.heap[t.heap_max]+1]=0,h=t.heap_max+1;h<573;h++)o=t.heap[h],u=a[2*a[2*o+1]+1]+1,u>l&&(u=l,p++),a[2*o+1]=u,o>s||(t.bl_count[u]++,f=0,o>=_&&(f=i[o-_]),c=a[2*o],t.opt_len+=c*(u+f),n&&(t.static_len+=c*(r[2*o+1]+f)));if(0!==p){do{for(u=l-1;0===t.bl_count[u];)u--;t.bl_count[u]--,t.bl_count[u+1]+=2,t.bl_count[l]--,p-=2}while(p>0);for(u=l;0!==u;u--)for(o=t.bl_count[u];0!==o;)d=t.heap[--h],d>s||(a[2*d+1]!==u&&(t.opt_len+=(u-a[2*d+1])*a[2*d],a[2*d+1]=u),o--)}})(t,e),k(a,h,t.bl_count)},R=(t,e,a)=>{let s,r,n=-1,i=e[1],_=0,l=7,h=4;for(0===i&&(l=138,h=3),e[2*(a+1)+1]=65535,s=0;s<=a;s++)r=i,i=e[2*(s+1)+1],++_<l&&r===i||(_<h?t.bl_tree[2*r]+=_:0!==r?(r!==n&&t.bl_tree[2*r]++,t.bl_tree[32]++):_<=10?t.bl_tree[34]++:t.bl_tree[36]++,_=0,n=r,0===i?(l=138,h=3):r===i?(l=6,h=3):(l=7,h=4))},L=(t,e,a)=>{let s,r,n=-1,i=e[1],_=0,l=7,h=4;for(0===i&&(l=138,h=3),s=0;s<=a;s++)if(r=i,i=e[2*(s+1)+1],!(++_<l&&r===i)){if(_<h)do{v(t,r,t.bl_tree)}while(0!=--_);else 0!==r?(r!==n&&(v(t,r,t.bl_tree),_--),v(t,16,t.bl_tree),y(t,_-3,2)):_<=10?(v(t,17,t.bl_tree),y(t,_-3,3)):(v(t,18,t.bl_tree),y(t,_-11,7));_=0,n=r,0===i?(l=138,h=3):r===i?(l=6,h=3):(l=7,h=4)}};let T=!1;const F=(t,e,a,s)=>{y(t,0+(s?1:0),3),A(t),b(t,a),b(t,~a),a&&t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a};e._tr_init=t=>{T||((()=>{let t,e,a,i,w;const m=new Array(16);for(a=0,i=0;i<28;i++)for(d[i]=a,t=0;t<1<<s[i];t++)o[a++]=i;for(o[a-1]=i,w=0,i=0;i<16;i++)for(u[i]=w,t=0;t<1<<r[i];t++)h[w++]=i;for(w>>=7;i<30;i++)for(u[i]=w<<7,t=0;t<1<<r[i]-7;t++)h[256+w++]=i;for(e=0;e<=15;e++)m[e]=0;for(t=0;t<=143;)_[2*t+1]=8,t++,m[8]++;for(;t<=255;)_[2*t+1]=9,t++,m[9]++;for(;t<=279;)_[2*t+1]=7,t++,m[7]++;for(;t<=287;)_[2*t+1]=8,t++,m[8]++;for(k(_,287,m),t=0;t<30;t++)l[2*t+1]=5,l[2*t]=z(t,5);c=new f(_,s,257,286,15),p=new f(l,r,0,30,15),g=new f(new Array(0),n,0,19,7)})(),T=!0),t.l_desc=new w(t.dyn_ltree,c),t.d_desc=new w(t.dyn_dtree,p),t.bl_desc=new w(t.bl_tree,g),t.bi_buf=0,t.bi_valid=0,x(t)},e._tr_stored_block=F,e._tr_flush_block=(t,e,a,s)=>{let r,n,h=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),U(t,t.l_desc),U(t,t.d_desc),h=(t=>{let e;for(R(t,t.dyn_ltree,t.l_desc.max_code),R(t,t.dyn_dtree,t.d_desc.max_code),U(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),r=t.opt_len+3+7>>>3,n=t.static_len+3+7>>>3,n<=r&&(r=n)):r=n=a+5,a+4<=r&&-1!==e?F(t,e,a,s):4===t.strategy||n===r?(y(t,2+(s?1:0),3),S(t,_,l)):(y(t,4+(s?1:0),3),((t,e,a,s)=>{let r;for(y(t,e-257,5),y(t,a-1,5),y(t,s-4,4),r=0;r<s;r++)y(t,t.bl_tree[2*i[r]+1],3);L(t,t.dyn_ltree,e-1),L(t,t.dyn_dtree,a-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,h+1),S(t,t.dyn_ltree,t.dyn_dtree)),x(t),s&&A(t)},e._tr_tally=(t,e,a)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=a,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(o[a]+256+1)]++,t.dyn_dtree[2*m(e)]++),t.sym_next===t.sym_end),e._tr_align=t=>{y(t,2,3),v(t,256,_),(t=>{16===t.bi_valid?(b(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)};var O=(t,e,a,s)=>{let r=65535&t|0,n=t>>>16&65535|0,i=0;for(;0!==a;){i=a>2e3?2e3:a,a-=i;do{r=r+e[s++]|0,n=n+r|0}while(--i);r%=65521,n%=65521}return r|n<<16|0};const D=new Uint32Array((()=>{let t,e=[];for(var a=0;a<256;a++){t=a;for(var s=0;s<8;s++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e})());var N=(t,e,a,s)=>{const r=D,n=s+a;t^=-1;for(let a=s;a<n;a++)t=t>>>8^r[255&(t^e[a])];return-1^t},C={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},I={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:H,_tr_stored_block:B,_tr_flush_block:M,_tr_tally:P,_tr_align:Y}=e,K=O,j=N,G=C,{Z_NO_FLUSH:X,Z_PARTIAL_FLUSH:W,Z_FULL_FLUSH:q,Z_FINISH:J,Z_BLOCK:Q,Z_OK:V,Z_STREAM_END:$,Z_STREAM_ERROR:tt,Z_DATA_ERROR:et,Z_BUF_ERROR:at,Z_DEFAULT_COMPRESSION:st,Z_FILTERED:rt,Z_HUFFMAN_ONLY:nt,Z_RLE:it,Z_FIXED:_t,Z_DEFAULT_STRATEGY:lt,Z_UNKNOWN:ht,Z_DEFLATED:ot}=I,dt=(t,e)=>(t.msg=G[e],e),ut=t=>2*t-(t>4?9:0),ft=t=>{let e=t.length;for(;--e>=0;)t[e]=0},ct=t=>{let e,a,s,r=t.w_size;e=t.hash_size,s=e;do{a=t.head[--s],t.head[s]=a>=r?a-r:0}while(--e);e=r,s=e;do{a=t.prev[--s],t.prev[s]=a>=r?a-r:0}while(--e)};let pt=(t,e,a)=>(e<<t.hash_shift^a)&t.hash_mask;const gt=t=>{const e=t.state;let a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},wt=(t,e)=>{M(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,gt(t.strm)},mt=(t,e)=>{t.pending_buf[t.pending++]=e},bt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},yt=(t,e,a,s)=>{let r=t.avail_in;return r>s&&(r=s),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),a),1===t.state.wrap?t.adler=K(t.adler,e,r,a):2===t.state.wrap&&(t.adler=j(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)},vt=(t,e)=>{let a,s,r=t.max_chain_length,n=t.strstart,i=t.prev_length,_=t.nice_match;const l=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,h=t.window,o=t.w_mask,d=t.prev,u=t.strstart+258;let f=h[n+i-1],c=h[n+i];t.prev_length>=t.good_match&&(r>>=2),_>t.lookahead&&(_=t.lookahead);do{if(a=e,h[a+i]===c&&h[a+i-1]===f&&h[a]===h[n]&&h[++a]===h[n+1]){n+=2,a++;do{}while(h[++n]===h[++a]&&h[++n]===h[++a]&&h[++n]===h[++a]&&h[++n]===h[++a]&&h[++n]===h[++a]&&h[++n]===h[++a]&&h[++n]===h[++a]&&h[++n]===h[++a]&&n<u);if(s=258-(u-n),n=u-258,s>i){if(t.match_start=e,i=s,s>=_)break;f=h[n+i-1],c=h[n+i]}}}while((e=d[e&o])>l&&0!=--r);return i<=t.lookahead?i:t.lookahead},zt=t=>{const e=t.w_size;let a,s,r;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-262)&&(t.window.set(t.window.subarray(e,e+e-s),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),ct(t),s+=e),0===t.strm.avail_in)break;if(a=yt(t.strm,t.window,t.strstart+t.lookahead,s),t.lookahead+=a,t.lookahead+t.insert>=3)for(r=t.strstart-t.insert,t.ins_h=t.window[r],t.ins_h=pt(t,t.ins_h,t.window[r+1]);t.insert&&(t.ins_h=pt(t,t.ins_h,t.window[r+3-1]),t.prev[r&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=r,r++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)},kt=(t,e)=>{let a,s,r,n=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,i=0,_=t.strm.avail_in;do{if(a=65535,r=t.bi_valid+42>>3,t.strm.avail_out<r)break;if(r=t.strm.avail_out-r,s=t.strstart-t.block_start,a>s+t.strm.avail_in&&(a=s+t.strm.avail_in),a>r&&(a=r),a<n&&(0===a&&e!==J||e===X||a!==s+t.strm.avail_in))break;i=e===J&&a===s+t.strm.avail_in?1:0,B(t,0,0,i),t.pending_buf[t.pending-4]=a,t.pending_buf[t.pending-3]=a>>8,t.pending_buf[t.pending-2]=~a,t.pending_buf[t.pending-1]=~a>>8,gt(t.strm),s&&(s>a&&(s=a),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+s),t.strm.next_out),t.strm.next_out+=s,t.strm.avail_out-=s,t.strm.total_out+=s,t.block_start+=s,a-=s),a&&(yt(t.strm,t.strm.output,t.strm.next_out,a),t.strm.next_out+=a,t.strm.avail_out-=a,t.strm.total_out+=a)}while(0===i);return _-=t.strm.avail_in,_&&(_>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=_&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-_,t.strm.next_in),t.strstart),t.strstart+=_,t.insert+=_>t.w_size-t.insert?t.w_size-t.insert:_),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),i?4:e!==X&&e!==J&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(r=t.window_size-t.strstart,t.strm.avail_in>r&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,r+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),r>t.strm.avail_in&&(r=t.strm.avail_in),r&&(yt(t.strm,t.window,t.strstart,r),t.strstart+=r,t.insert+=r>t.w_size-t.insert?t.w_size-t.insert:r),t.high_water<t.strstart&&(t.high_water=t.strstart),r=t.bi_valid+42>>3,r=t.pending_buf_size-r>65535?65535:t.pending_buf_size-r,n=r>t.w_size?t.w_size:r,s=t.strstart-t.block_start,(s>=n||(s||e===J)&&e!==X&&0===t.strm.avail_in&&s<=r)&&(a=s>r?r:s,i=e===J&&0===t.strm.avail_in&&a===s?1:0,B(t,t.block_start,a,i),t.block_start+=a,gt(t.strm)),i?3:1)},xt=(t,e)=>{let a,s;for(;;){if(t.lookahead<262){if(zt(t),t.lookahead<262&&e===X)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=pt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-262&&(t.match_length=vt(t,a)),t.match_length>=3)if(s=P(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=pt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=pt(t,t.ins_h,t.window[t.strstart+1]);else s=P(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(s&&(wt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===J?(wt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(wt(t,!1),0===t.strm.avail_out)?1:2},At=(t,e)=>{let a,s,r;for(;;){if(t.lookahead<262){if(zt(t),t.lookahead<262&&e===X)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=pt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-262&&(t.match_length=vt(t,a),t.match_length<=5&&(t.strategy===rt||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,s=P(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=pt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,s&&(wt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(s=P(t,0,t.window[t.strstart-1]),s&&wt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(s=P(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===J?(wt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(wt(t,!1),0===t.strm.avail_out)?1:2};function Et(t,e,a,s,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=s,this.func=r}const Zt=[new Et(0,0,0,0,kt),new Et(4,4,8,4,xt),new Et(4,5,16,8,xt),new Et(4,6,32,32,xt),new Et(4,4,16,16,At),new Et(8,16,32,32,At),new Et(8,16,128,128,At),new Et(8,32,128,256,At),new Et(32,128,258,1024,At),new Et(32,258,258,4096,At)];function St(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ot,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),ft(this.dyn_ltree),ft(this.dyn_dtree),ft(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),ft(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),ft(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Ut=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||42!==e.status&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&113!==e.status&&666!==e.status?1:0},Rt=t=>{if(Ut(t))return dt(t,tt);t.total_in=t.total_out=0,t.data_type=ht;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=-2,H(e),V},Lt=t=>{const e=Rt(t);var a;return e===V&&((a=t.state).window_size=2*a.w_size,ft(a.head),a.max_lazy_match=Zt[a.level].max_lazy,a.good_match=Zt[a.level].good_length,a.nice_match=Zt[a.level].nice_length,a.max_chain_length=Zt[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=2,a.match_available=0,a.ins_h=0),e},Tt=(t,e,a,s,r,n)=>{if(!t)return tt;let i=1;if(e===st&&(e=6),s<0?(i=0,s=-s):s>15&&(i=2,s-=16),r<1||r>9||a!==ot||s<8||s>15||e<0||e>9||n<0||n>_t||8===s&&1!==i)return dt(t,tt);8===s&&(s=9);const _=new St;return t.state=_,_.strm=t,_.status=42,_.wrap=i,_.gzhead=null,_.w_bits=s,_.w_size=1<<_.w_bits,_.w_mask=_.w_size-1,_.hash_bits=r+7,_.hash_size=1<<_.hash_bits,_.hash_mask=_.hash_size-1,_.hash_shift=~~((_.hash_bits+3-1)/3),_.window=new Uint8Array(2*_.w_size),_.head=new Uint16Array(_.hash_size),_.prev=new Uint16Array(_.w_size),_.lit_bufsize=1<<r+6,_.pending_buf_size=4*_.lit_bufsize,_.pending_buf=new Uint8Array(_.pending_buf_size),_.sym_buf=_.lit_bufsize,_.sym_end=3*(_.lit_bufsize-1),_.level=e,_.strategy=n,_.method=a,Lt(t)};t.deflateInit=(t,e)=>Tt(t,e,ot,15,8,lt),t.deflateInit2=Tt,t.deflateReset=Lt,t.deflateResetKeep=Rt,t.deflateSetHeader=(t,e)=>Ut(t)||2!==t.state.wrap?tt:(t.state.gzhead=e,V),t.deflate=(t,e)=>{if(Ut(t)||e>Q||e<0)return t?dt(t,tt):tt;const a=t.state;if(!t.output||0!==t.avail_in&&!t.input||666===a.status&&e!==J)return dt(t,0===t.avail_out?at:tt);const s=a.last_flush;if(a.last_flush=e,0!==a.pending){if(gt(t),0===t.avail_out)return a.last_flush=-1,V}else if(0===t.avail_in&&ut(e)<=ut(s)&&e!==J)return dt(t,at);if(666===a.status&&0!==t.avail_in)return dt(t,at);if(42===a.status&&0===a.wrap&&(a.status=113),42===a.status){let e=ot+(a.w_bits-8<<4)<<8,s=-1;if(s=a.strategy>=nt||a.level<2?0:a.level<6?1:6===a.level?2:3,e|=s<<6,0!==a.strstart&&(e|=32),e+=31-e%31,bt(a,e),0!==a.strstart&&(bt(a,t.adler>>>16),bt(a,65535&t.adler)),t.adler=1,a.status=113,gt(t),0!==a.pending)return a.last_flush=-1,V}if(57===a.status)if(t.adler=0,mt(a,31),mt(a,139),mt(a,8),a.gzhead)mt(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),mt(a,255&a.gzhead.time),mt(a,a.gzhead.time>>8&255),mt(a,a.gzhead.time>>16&255),mt(a,a.gzhead.time>>24&255),mt(a,9===a.level?2:a.strategy>=nt||a.level<2?4:0),mt(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(mt(a,255&a.gzhead.extra.length),mt(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=j(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69;else if(mt(a,0),mt(a,0),mt(a,0),mt(a,0),mt(a,0),mt(a,9===a.level?2:a.strategy>=nt||a.level<2?4:0),mt(a,3),a.status=113,gt(t),0!==a.pending)return a.last_flush=-1,V;if(69===a.status){if(a.gzhead.extra){let e=a.pending,s=(65535&a.gzhead.extra.length)-a.gzindex;for(;a.pending+s>a.pending_buf_size;){let r=a.pending_buf_size-a.pending;if(a.pending_buf.set(a.gzhead.extra.subarray(a.gzindex,a.gzindex+r),a.pending),a.pending=a.pending_buf_size,a.gzhead.hcrc&&a.pending>e&&(t.adler=j(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex+=r,gt(t),0!==a.pending)return a.last_flush=-1,V;e=0,s-=r}let r=new Uint8Array(a.gzhead.extra);a.pending_buf.set(r.subarray(a.gzindex,a.gzindex+s),a.pending),a.pending+=s,a.gzhead.hcrc&&a.pending>e&&(t.adler=j(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex=0}a.status=73}if(73===a.status){if(a.gzhead.name){let e,s=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>s&&(t.adler=j(t.adler,a.pending_buf,a.pending-s,s)),gt(t),0!==a.pending)return a.last_flush=-1,V;s=0}e=a.gzindex<a.gzhead.name.length?255&a.gzhead.name.charCodeAt(a.gzindex++):0,mt(a,e)}while(0!==e);a.gzhead.hcrc&&a.pending>s&&(t.adler=j(t.adler,a.pending_buf,a.pending-s,s)),a.gzindex=0}a.status=91}if(91===a.status){if(a.gzhead.comment){let e,s=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>s&&(t.adler=j(t.adler,a.pending_buf,a.pending-s,s)),gt(t),0!==a.pending)return a.last_flush=-1,V;s=0}e=a.gzindex<a.gzhead.comment.length?255&a.gzhead.comment.charCodeAt(a.gzindex++):0,mt(a,e)}while(0!==e);a.gzhead.hcrc&&a.pending>s&&(t.adler=j(t.adler,a.pending_buf,a.pending-s,s))}a.status=103}if(103===a.status){if(a.gzhead.hcrc){if(a.pending+2>a.pending_buf_size&&(gt(t),0!==a.pending))return a.last_flush=-1,V;mt(a,255&t.adler),mt(a,t.adler>>8&255),t.adler=0}if(a.status=113,gt(t),0!==a.pending)return a.last_flush=-1,V}if(0!==t.avail_in||0!==a.lookahead||e!==X&&666!==a.status){let s=0===a.level?kt(a,e):a.strategy===nt?((t,e)=>{let a;for(;;){if(0===t.lookahead&&(zt(t),0===t.lookahead)){if(e===X)return 1;break}if(t.match_length=0,a=P(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(wt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===J?(wt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(wt(t,!1),0===t.strm.avail_out)?1:2})(a,e):a.strategy===it?((t,e)=>{let a,s,r,n;const i=t.window;for(;;){if(t.lookahead<=258){if(zt(t),t.lookahead<=258&&e===X)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(r=t.strstart-1,s=i[r],s===i[++r]&&s===i[++r]&&s===i[++r])){n=t.strstart+258;do{}while(s===i[++r]&&s===i[++r]&&s===i[++r]&&s===i[++r]&&s===i[++r]&&s===i[++r]&&s===i[++r]&&s===i[++r]&&r<n);t.match_length=258-(n-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=P(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=P(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(wt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===J?(wt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(wt(t,!1),0===t.strm.avail_out)?1:2})(a,e):Zt[a.level].func(a,e);if(3!==s&&4!==s||(a.status=666),1===s||3===s)return 0===t.avail_out&&(a.last_flush=-1),V;if(2===s&&(e===W?Y(a):e!==Q&&(B(a,0,0,!1),e===q&&(ft(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),gt(t),0===t.avail_out))return a.last_flush=-1,V}return e!==J?V:a.wrap<=0?$:(2===a.wrap?(mt(a,255&t.adler),mt(a,t.adler>>8&255),mt(a,t.adler>>16&255),mt(a,t.adler>>24&255),mt(a,255&t.total_in),mt(a,t.total_in>>8&255),mt(a,t.total_in>>16&255),mt(a,t.total_in>>24&255)):(bt(a,t.adler>>>16),bt(a,65535&t.adler)),gt(t),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?V:$)},t.deflateEnd=t=>{if(Ut(t))return tt;const e=t.state.status;return t.state=null,113===e?dt(t,et):V},t.deflateSetDictionary=(t,e)=>{let a=e.length;if(Ut(t))return tt;const s=t.state,r=s.wrap;if(2===r||1===r&&42!==s.status||s.lookahead)return tt;if(1===r&&(t.adler=K(t.adler,e,a,0)),s.wrap=0,a>=s.w_size){0===r&&(ft(s.head),s.strstart=0,s.block_start=0,s.insert=0);let t=new Uint8Array(s.w_size);t.set(e.subarray(a-s.w_size,a),0),e=t,a=s.w_size}const n=t.avail_in,i=t.next_in,_=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,zt(s);s.lookahead>=3;){let t=s.strstart,e=s.lookahead-2;do{s.ins_h=pt(s,s.ins_h,s.window[t+3-1]),s.prev[t&s.w_mask]=s.head[s.ins_h],s.head[s.ins_h]=t,t++}while(--e);s.strstart=t,s.lookahead=2,zt(s)}return s.strstart+=s.lookahead,s.block_start=s.strstart,s.insert=s.lookahead,s.lookahead=0,s.match_length=s.prev_length=2,s.match_available=0,t.next_in=i,t.input=_,t.avail_in=n,s.wrap=r,V},t.deflateInfo="pako deflate (from Nodeca project)";var Ft={};const Ot=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);Ft.assign=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const a=e.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(const e in a)Ot(a,e)&&(t[e]=a[e])}}return t},Ft.flattenChunks=t=>{let e=0;for(let a=0,s=t.length;a<s;a++)e+=t[a].length;const a=new Uint8Array(e);for(let e=0,s=0,r=t.length;e<r;e++){let r=t[e];a.set(r,s),s+=r.length}return a};var Dt={};let Nt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Nt=!1}const Ct=new Uint8Array(256);for(let t=0;t<256;t++)Ct[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Ct[254]=Ct[254]=1,Dt.string2buf=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,s,r,n,i=t.length,_=0;for(r=0;r<i;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<i&&(s=t.charCodeAt(r+1),56320==(64512&s)&&(a=65536+(a-55296<<10)+(s-56320),r++)),_+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(_),n=0,r=0;n<_;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<i&&(s=t.charCodeAt(r+1),56320==(64512&s)&&(a=65536+(a-55296<<10)+(s-56320),r++)),a<128?e[n++]=a:a<2048?(e[n++]=192|a>>>6,e[n++]=128|63&a):a<65536?(e[n++]=224|a>>>12,e[n++]=128|a>>>6&63,e[n++]=128|63&a):(e[n++]=240|a>>>18,e[n++]=128|a>>>12&63,e[n++]=128|a>>>6&63,e[n++]=128|63&a);return e};Dt.buf2string=(t,e)=>{const a=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let s,r;const n=new Array(2*a);for(r=0,s=0;s<a;){let e=t[s++];if(e<128){n[r++]=e;continue}let i=Ct[e];if(i>4)n[r++]=65533,s+=i-1;else{for(e&=2===i?31:3===i?15:7;i>1&&s<a;)e=e<<6|63&t[s++],i--;i>1?n[r++]=65533:e<65536?n[r++]=e:(e-=65536,n[r++]=55296|e>>10&1023,n[r++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Nt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let a="";for(let s=0;s<e;s++)a+=String.fromCharCode(t[s]);return a})(n,r)},Dt.utf8border=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let a=e-1;for(;a>=0&&128==(192&t[a]);)a--;return a<0||0===a?e:a+Ct[t[a]]>e?a:e};const It=t,Ht=Ft,Bt=Dt,Mt=C,Pt=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},Yt=Object.prototype.toString,{Z_NO_FLUSH:Kt,Z_SYNC_FLUSH:jt,Z_FULL_FLUSH:Gt,Z_FINISH:Xt,Z_OK:Wt,Z_STREAM_END:qt,Z_DEFAULT_COMPRESSION:Jt,Z_DEFAULT_STRATEGY:Qt,Z_DEFLATED:Vt}=I;function $t(t){this.options=Ht.assign({level:Jt,method:Vt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Qt},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Pt,this.strm.avail_out=0;let a=It.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==Wt)throw new Error(Mt[a]);if(e.header&&It.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Bt.string2buf(e.dictionary):"[object ArrayBuffer]"===Yt.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,a=It.deflateSetDictionary(this.strm,t),a!==Wt)throw new Error(Mt[a]);this._dict_set=!0}}$t.prototype.push=function(t,e){const a=this.strm,s=this.options.chunkSize;let r,n;if(this.ended)return!1;for(n=e===~~e?e:!0===e?Xt:Kt,"string"==typeof t?a.input=Bt.string2buf(t):"[object ArrayBuffer]"===Yt.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;)if(0===a.avail_out&&(a.output=new Uint8Array(s),a.next_out=0,a.avail_out=s),(n===jt||n===Gt)&&a.avail_out<=6)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else{if(r=It.deflate(a,n),r===qt)return a.next_out>0&&this.onData(a.output.subarray(0,a.next_out)),r=It.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===Wt;if(0!==a.avail_out){if(n>0&&a.next_out>0)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else if(0===a.avail_in)break}else this.onData(a.output)}return!0},$t.prototype.onData=function(t){this.chunks.push(t)},$t.prototype.onEnd=function(t){t===Wt&&(this.result=Ht.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};const te=$t,ee=function(t,e){const a=new $t(e);if(a.push(t,!0),a.err)throw a.msg||Mt[a.err];return a.result},ae=I;const se=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const e=this._hasEvents?",":"";this.deflate.push(e+t,ae.Z_SYNC_FLUSH),this._hasEvents=!0}finish(){if(this.deflate.push("]",ae.Z_FINISH),this.deflate.err)throw this.deflate.err;const t=this.deflate.result;return this._init(),t}_init(){this._hasEvents=!1,this.deflate=new te,this.deflate.push("[",ae.Z_NO_FLUSH)}},re={clear:()=>{se.clear()},addEvent:t=>se.addEvent(t),finish:()=>se.finish(),compress:t=>function(t){return ee(t)}(t)};addEventListener("message",(function(t){const e=t.data.method,a=t.data.id,s=t.data.arg;if(e in re&&"function"==typeof re[e])try{const t=re[e](s);postMessage({id:a,method:e,success:!0,response:t})}catch(t){postMessage({id:a,method:e,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});']); | |
| return URL.createObjectURL(t) | |
| }()); | |
| if (!e) | |
| return; | |
| eB(`[Replay] Using compression worker${t ? ` from ${t}` : ""}`); | |
| let r = new Worker(e); | |
| return new eV(r) | |
| } catch (t) { | |
| eB("[Replay] Failed to create compression worker") | |
| } | |
| }(e); | |
| if (t) | |
| return t | |
| } | |
| return eB("[Replay] Using simple buffer"), | |
| new eZ | |
| }({ | |
| useCompression: this._options.useCompression, | |
| workerUrl: this._options.workerUrl | |
| }), | |
| this._removeListeners(), | |
| this._addListeners(), | |
| this._isEnabled = !0, | |
| this._isPaused = !1, | |
| this.startRecording() | |
| } | |
| _handleException(t) { | |
| ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && M.kg.error("[Replay]", t), | |
| ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && this._options._experiments && this._options._experiments.captureExceptions && (0, | |
| A.Tb)(t) | |
| } | |
| _initializeSessionForSampling(t) { | |
| let e = this._options.errorSampleRate > 0 | |
| , r = eq({ | |
| sessionIdleExpire: this.timeouts.sessionIdleExpire, | |
| maxReplayDuration: this._options.maxReplayDuration, | |
| traceInternals: this._options._experiments.traceInternals, | |
| previousSessionId: t | |
| }, { | |
| stickySession: this._options.stickySession, | |
| sessionSampleRate: this._options.sessionSampleRate, | |
| allowBuffering: e | |
| }); | |
| this.session = r | |
| } | |
| _checkSession() { | |
| if (!this.session) | |
| return !1; | |
| let t = this.session; | |
| return !eQ(t, { | |
| sessionIdleExpire: this.timeouts.sessionIdleExpire, | |
| maxReplayDuration: this._options.maxReplayDuration | |
| }) || (this._refreshSession(t), | |
| !1) | |
| } | |
| async _refreshSession(t) { | |
| this._isEnabled && (await this.stop({ | |
| reason: "refresh session" | |
| }), | |
| this.initializeSampling(t.id)) | |
| } | |
| _addListeners() { | |
| try { | |
| F.document.addEventListener("visibilitychange", this._handleVisibilityChange), | |
| F.addEventListener("blur", this._handleWindowBlur), | |
| F.addEventListener("focus", this._handleWindowFocus), | |
| F.addEventListener("keydown", this._handleKeyboardEvent), | |
| this.clickDetector && this.clickDetector.addListeners(), | |
| this._hasInitializedCoreListeners || (function(t) { | |
| let e = (0, | |
| C.Gd)().getScope() | |
| , r = (0, | |
| C.Gd)().getClient(); | |
| e.addScopeListener(rf(t)), | |
| (0, | |
| D.oq)("dom", eM(t)), | |
| (0, | |
| D.oq)("history", e => { | |
| if (!t.isEnabled()) | |
| return; | |
| let r = function(t) { | |
| let {from: e, to: r} = t | |
| , n = Date.now() / 1e3; | |
| return { | |
| type: "navigation.push", | |
| start: n, | |
| end: n, | |
| name: r, | |
| data: { | |
| previous: e | |
| } | |
| } | |
| }(e); | |
| null !== r && (t.getContext().urls.push(r.name), | |
| t.triggerUserActivity(), | |
| t.addUpdate( () => (e3(t, [r]), | |
| !1))) | |
| } | |
| ), | |
| function(t) { | |
| let e = (0, | |
| C.Gd)().getClient(); | |
| try { | |
| let r = new TextEncoder | |
| , {networkDetailAllowUrls: n, networkDetailDenyUrls: s, networkCaptureBodies: i, networkRequestHeaders: a, networkResponseHeaders: o} = t.getOptions() | |
| , l = { | |
| replay: t, | |
| textEncoder: r, | |
| networkDetailAllowUrls: n, | |
| networkDetailDenyUrls: s, | |
| networkCaptureBodies: i, | |
| networkRequestHeaders: a, | |
| networkResponseHeaders: o | |
| }; | |
| e && e.on ? e.on("beforeAddBreadcrumb", (t, e) => (function(t, e, r) { | |
| if (e.data) | |
| try { | |
| var n, s; | |
| "xhr" === e.category && (n = r) && n.xhr && (function(t, e, r) { | |
| let {xhr: n, input: s} = e | |
| , i = e8(s, r.textEncoder) | |
| , a = n.getResponseHeader("content-length") ? e7(n.getResponseHeader("content-length")) : e8(n.response, r.textEncoder); | |
| void 0 !== i && (t.data.request_body_size = i), | |
| void 0 !== a && (t.data.response_body_size = a) | |
| }(e, r, t), | |
| rg(e, r, t)), | |
| "fetch" === e.category && (s = r) && s.response && (function(t, e, r) { | |
| let {input: n, response: s} = e | |
| , i = e8(rh(n), r.textEncoder) | |
| , a = s ? e7(s.headers.get("content-length")) : void 0; | |
| void 0 !== i && (t.data.request_body_size = i), | |
| void 0 !== a && (t.data.response_body_size = a) | |
| }(e, r, t), | |
| ro(e, r, t)) | |
| } catch (t) { | |
| ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && M.kg.warn("Error when enriching network breadcrumb") | |
| } | |
| } | |
| )(l, t, e)) : ((0, | |
| D.oq)("fetch", e => { | |
| t.isEnabled() && e6(t, function(t) { | |
| let {startTimestamp: e, endTimestamp: r, fetchData: n, response: s} = t; | |
| if (!r) | |
| return null; | |
| let {method: i, url: a} = n; | |
| return { | |
| type: "resource.fetch", | |
| start: e / 1e3, | |
| end: r / 1e3, | |
| name: a, | |
| data: { | |
| method: i, | |
| statusCode: s ? s.status : void 0 | |
| } | |
| } | |
| }(e)) | |
| } | |
| ), | |
| (0, | |
| D.oq)("xhr", e => { | |
| t.isEnabled() && e6(t, function(t) { | |
| let {startTimestamp: e, endTimestamp: r, xhr: n} = t | |
| , s = n[D.xU]; | |
| if (!e || !r || !s) | |
| return null; | |
| let {method: i, url: a, status_code: o} = s; | |
| return void 0 === a ? null : { | |
| type: "resource.xhr", | |
| name: a, | |
| start: e / 1e3, | |
| end: r / 1e3, | |
| data: { | |
| method: i, | |
| statusCode: o | |
| } | |
| } | |
| }(e)) | |
| } | |
| )) | |
| } catch (t) {} | |
| }(t); | |
| let n = function(t, e=!1) { | |
| let r = e ? e5(t) : void 0; | |
| return Object.assign( (e, n) => t.isEnabled() ? "replay_event" === e.type ? (delete e.breadcrumbs, | |
| e) : (!e.type || e2(e)) && t.checkAndHandleExpiredSession() ? !e.type && e.exception && e.exception.values && e.exception.values.length && n.originalException && n.originalException.__rrweb__ && !t.getOptions()._experiments.captureExceptions ? (("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && M.kg.log("[Replay] Ignoring error from rrweb internals", e), | |
| null) : (("buffer" === t.recordingMode && e.message !== Z && e.exception && !e.type && eY(t.getOptions().errorSampleRate) || "session" === t.recordingMode) && (e.tags = { | |
| ...e.tags, | |
| replayId: t.getSessionId() | |
| }), | |
| r && r(e, { | |
| statusCode: 200 | |
| }), | |
| e) : e : e, { | |
| id: "Replay" | |
| }) | |
| }(t, !(r && r.on)); | |
| r && r.addEventProcessor ? r.addEventProcessor(n) : (0, | |
| v.cc)(n), | |
| r && r.on && (r.on("afterSendEvent", e5(t)), | |
| r.on("createDsc", e => { | |
| let r = t.getSessionId(); | |
| r && t.isEnabled() && "session" === t.recordingMode && t.checkAndHandleExpiredSession() && (e.replay_id = r) | |
| } | |
| ), | |
| r.on("startTransaction", e => { | |
| t.lastTransaction = e | |
| } | |
| ), | |
| r.on("finishTransaction", e => { | |
| t.lastTransaction = e | |
| } | |
| )) | |
| }(this), | |
| this._hasInitializedCoreListeners = !0) | |
| } catch (t) { | |
| this._handleException(t) | |
| } | |
| this._performanceCleanupCallback = function(t) { | |
| function e(e) { | |
| t.performanceEntries.includes(e) || t.performanceEntries.push(e) | |
| } | |
| function r({entries: t}) { | |
| t.forEach(e) | |
| } | |
| let n = []; | |
| return ["navigation", "paint", "resource"].forEach(t => { | |
| n.push((0, | |
| L._j)(t, r)) | |
| } | |
| ), | |
| n.push((0, | |
| L.$A)( ({metric: e}) => { | |
| t.replayPerformanceEntries.push(function(t) { | |
| let e = t.entries | |
| , r = e[e.length - 1] | |
| , n = r ? r.element : void 0 | |
| , s = t.value | |
| , i = eU(s); | |
| return { | |
| type: "largest-contentful-paint", | |
| name: "largest-contentful-paint", | |
| start: i, | |
| end: i, | |
| data: { | |
| value: s, | |
| size: s, | |
| nodeId: n ? eC.mirror.getId(n) : void 0 | |
| } | |
| } | |
| }(e)) | |
| } | |
| )), | |
| () => { | |
| n.forEach(t => t()) | |
| } | |
| }(this) | |
| } | |
| _removeListeners() { | |
| try { | |
| F.document.removeEventListener("visibilitychange", this._handleVisibilityChange), | |
| F.removeEventListener("blur", this._handleWindowBlur), | |
| F.removeEventListener("focus", this._handleWindowFocus), | |
| F.removeEventListener("keydown", this._handleKeyboardEvent), | |
| this.clickDetector && this.clickDetector.removeListeners(), | |
| this._performanceCleanupCallback && this._performanceCleanupCallback() | |
| } catch (t) { | |
| this._handleException(t) | |
| } | |
| } | |
| __init() { | |
| this._handleVisibilityChange = () => { | |
| "visible" === F.document.visibilityState ? this._doChangeToForegroundTasks() : this._doChangeToBackgroundTasks() | |
| } | |
| } | |
| __init2() { | |
| this._handleWindowBlur = () => { | |
| let t = eT({ | |
| category: "ui.blur" | |
| }); | |
| this._doChangeToBackgroundTasks(t) | |
| } | |
| } | |
| __init3() { | |
| this._handleWindowFocus = () => { | |
| let t = eT({ | |
| category: "ui.focus" | |
| }); | |
| this._doChangeToForegroundTasks(t) | |
| } | |
| } | |
| __init4() { | |
| this._handleKeyboardEvent = t => { | |
| !function(t, e) { | |
| if (!t.isEnabled()) | |
| return; | |
| t.updateUserActivity(); | |
| let r = function(t) { | |
| var e; | |
| let {metaKey: r, shiftKey: n, ctrlKey: s, altKey: i, key: a, target: o} = t; | |
| if (!o || "INPUT" === (e = o).tagName || "TEXTAREA" === e.tagName || e.isContentEditable || !a) | |
| return null; | |
| let l = r || s || i | |
| , d = 1 === a.length; | |
| if (!l && d) | |
| return null; | |
| let u = (0, | |
| T.Rt)(o, { | |
| maxStringLength: 200 | |
| }) || "<unknown>" | |
| , h = eN(o, u); | |
| return eT({ | |
| category: "ui.keyDown", | |
| message: u, | |
| data: { | |
| ...h.data, | |
| metaKey: r, | |
| shiftKey: n, | |
| ctrlKey: s, | |
| altKey: i, | |
| key: a | |
| } | |
| }) | |
| }(e); | |
| r && ev(t, r) | |
| }(this, t) | |
| } | |
| } | |
| _doChangeToBackgroundTasks(t) { | |
| !this.session || eX(this.session, { | |
| maxReplayDuration: this._options.maxReplayDuration, | |
| sessionIdleExpire: this.timeouts.sessionIdleExpire | |
| }) || (t && this._createCustomBreadcrumb(t), | |
| this.conditionalFlush()) | |
| } | |
| _doChangeToForegroundTasks(t) { | |
| if (this.session) { | |
| if (!this.checkAndHandleExpiredSession()) { | |
| eB("[Replay] Document has become active, but session has expired"); | |
| return | |
| } | |
| t && this._createCustomBreadcrumb(t) | |
| } | |
| } | |
| _updateUserActivity(t=Date.now()) { | |
| this._lastActivity = t | |
| } | |
| _updateSessionActivity(t=Date.now()) { | |
| this.session && (this.session.lastActivity = t, | |
| this._maybeSaveSession()) | |
| } | |
| _createCustomBreadcrumb(t) { | |
| this.addUpdate( () => { | |
| this.throttledAddEvent({ | |
| type: tL.Custom, | |
| timestamp: t.timestamp || 0, | |
| data: { | |
| tag: "breadcrumb", | |
| payload: t | |
| } | |
| }) | |
| } | |
| ) | |
| } | |
| _addPerformanceEntries() { | |
| let t = this.performanceEntries.map(eO).filter(Boolean).concat(this.replayPerformanceEntries); | |
| return this.performanceEntries = [], | |
| this.replayPerformanceEntries = [], | |
| Promise.all(e3(this, t)) | |
| } | |
| _clearContext() { | |
| this._context.errorIds.clear(), | |
| this._context.traceIds.clear(), | |
| this._context.urls = [] | |
| } | |
| _updateInitialTimestampFromEventBuffer() { | |
| let {session: t, eventBuffer: e} = this; | |
| if (!t || !e || t.segmentId) | |
| return; | |
| let r = e.getEarliestTimestamp(); | |
| r && r < this._context.initialTimestamp && (this._context.initialTimestamp = r) | |
| } | |
| _popEventContext() { | |
| let t = { | |
| initialTimestamp: this._context.initialTimestamp, | |
| initialUrl: this._context.initialUrl, | |
| errorIds: Array.from(this._context.errorIds), | |
| traceIds: Array.from(this._context.traceIds), | |
| urls: this._context.urls | |
| }; | |
| return this._clearContext(), | |
| t | |
| } | |
| async _runFlush() { | |
| let t = this.getSessionId(); | |
| if (!this.session || !this.eventBuffer || !t) { | |
| ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && M.kg.error("[Replay] No session or eventBuffer found to flush."); | |
| return | |
| } | |
| if (await this._addPerformanceEntries(), | |
| this.eventBuffer && this.eventBuffer.hasEvents && (await r_(this), | |
| this.eventBuffer && t === this.getSessionId())) | |
| try { | |
| this._updateInitialTimestampFromEventBuffer(); | |
| let e = Date.now(); | |
| if (e - this._context.initialTimestamp > this._options.maxReplayDuration + 3e4) | |
| throw Error("Session is too long, not sending replay"); | |
| let r = this._popEventContext() | |
| , n = this.session.segmentId++; | |
| this._maybeSaveSession(); | |
| let s = await this.eventBuffer.finish(); | |
| await rC({ | |
| replayId: t, | |
| recordingData: s, | |
| segmentId: n, | |
| eventContext: r, | |
| session: this.session, | |
| options: this.getOptions(), | |
| timestamp: e | |
| }) | |
| } catch (e) { | |
| this._handleException(e), | |
| this.stop({ | |
| reason: "sendReplay" | |
| }); | |
| let t = (0, | |
| C.Gd)().getClient(); | |
| t && t.recordDroppedEvent("send_error", "replay") | |
| } | |
| } | |
| __init5() { | |
| this._flush = async ({force: t=!1}={}) => { | |
| if (!this._isEnabled && !t) | |
| return; | |
| if (!this.checkAndHandleExpiredSession()) { | |
| ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && M.kg.error("[Replay] Attempting to finish replay event after session expired."); | |
| return | |
| } | |
| if (!this.session) | |
| return; | |
| let e = this.session.started | |
| , r = Date.now() - e; | |
| this._debouncedFlush.cancel(); | |
| let n = r < this._options.minReplayDuration | |
| , s = r > this._options.maxReplayDuration + 5e3; | |
| if (n || s) { | |
| eB(`[Replay] Session duration (${Math.floor(r / 1e3)}s) is too ${n ? "short" : "long"}, not sending replay.`, this._options._experiments.traceInternals), | |
| n && this._debouncedFlush(); | |
| return | |
| } | |
| let i = this.eventBuffer; | |
| if (i && 0 === this.session.segmentId && !i.hasCheckout && eB("[Replay] Flushing initial segment without checkout.", this._options._experiments.traceInternals), | |
| !this._flushLock) { | |
| this._flushLock = this._runFlush(), | |
| await this._flushLock, | |
| this._flushLock = void 0; | |
| return | |
| } | |
| try { | |
| await this._flushLock | |
| } catch (t) { | |
| ("undefined" == typeof __SENTRY_DEBUG__ || __SENTRY_DEBUG__) && M.kg.error(t) | |
| } finally { | |
| this._debouncedFlush() | |
| } | |
| } | |
| } | |
| _maybeSaveSession() { | |
| this.session && this._options.stickySession && eP(this.session) | |
| } | |
| __init6() { | |
| this._onMutationHandler = t => { | |
| let e = t.length | |
| , r = this._options.mutationLimit | |
| , n = this._options.mutationBreadcrumbLimit | |
| , s = r && e > r; | |
| if (e > n || s) { | |
| let t = eT({ | |
| category: "replay.mutations", | |
| data: { | |
| count: e, | |
| limit: s | |
| } | |
| }); | |
| this._createCustomBreadcrumb(t) | |
| } | |
| return !s || (this.stop({ | |
| reason: "mutationLimit", | |
| forceFlush: "session" === this.recordingMode | |
| }), | |
| !1) | |
| } | |
| } | |
| } | |
| function rS(t, e, r, n) { | |
| let s = [...t, ..."string" == typeof n ? n.split(",") : [], ...e]; | |
| return void 0 !== r && ("string" == typeof r && s.push(`.${r}`), | |
| console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")), | |
| s.join(",") | |
| } | |
| let rA = 'img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]' | |
| , rE = ["content-length", "content-type", "accept"] | |
| , rk = !1; | |
| class rR { | |
| static __initStatic() { | |
| this.id = "Replay" | |
| } | |
| constructor({flushMinDelay: t=5e3, flushMaxDelay: e=5500, minReplayDuration: r=4999, maxReplayDuration: n=36e5, stickySession: s=!0, useCompression: i=!0, workerUrl: a, _experiments: o={}, sessionSampleRate: l, errorSampleRate: d, maskAllText: u=!0, maskAllInputs: h=!0, blockAllMedia: c=!0, mutationBreadcrumbLimit: p=750, mutationLimit: g=1e4, slowClickTimeout: m=7e3, slowClickIgnoreSelectors: f=[], networkDetailAllowUrls: _=[], networkDetailDenyUrls: y=[], networkCaptureBodies: I=!0, networkRequestHeaders: b=[], networkResponseHeaders: C=[], mask: w=[], maskAttributes: v=["title", "placeholder"], unmask: S=[], block: A=[], unblock: E=[], ignore: k=[], maskFn: R, beforeAddRecordingEvent: T, blockClass: x, blockSelector: M, maskInputOptions: N, maskTextClass: D, maskTextSelector: O, ignoreClass: U}={}) { | |
| this.name = rR.id; | |
| let L = function({mask: t, unmask: e, block: r, unblock: n, ignore: s, blockClass: i, blockSelector: a, maskTextClass: o, maskTextSelector: l, ignoreClass: d}) { | |
| let u = { | |
| maskTextSelector: rS(t, [".sentry-mask", "[data-sentry-mask]"], o, l), | |
| unmaskTextSelector: rS(e, [".sentry-unmask", "[data-sentry-unmask]"]), | |
| blockSelector: rS(r, [".sentry-block", "[data-sentry-block]", 'base[href="/"]'], i, a), | |
| unblockSelector: rS(n, [".sentry-unblock", "[data-sentry-unblock]"]), | |
| ignoreSelector: rS(s, [".sentry-ignore", "[data-sentry-ignore]", 'input[type="file"]'], d) | |
| }; | |
| return i instanceof RegExp && (u.blockClass = i), | |
| o instanceof RegExp && (u.maskTextClass = o), | |
| u | |
| }({ | |
| mask: w, | |
| unmask: S, | |
| block: A, | |
| unblock: E, | |
| ignore: k, | |
| blockClass: x, | |
| blockSelector: M, | |
| maskTextClass: D, | |
| maskTextSelector: O, | |
| ignoreClass: U | |
| }); | |
| if (this._recordingOptions = { | |
| maskAllInputs: h, | |
| maskAllText: u, | |
| maskInputOptions: { | |
| ...N || {}, | |
| password: !0 | |
| }, | |
| maskTextFn: R, | |
| maskInputFn: R, | |
| maskAttributeFn: (t, e, r) => (function({el: t, key: e, maskAttributes: r, maskAllText: n, privacyOptions: s, value: i}) { | |
| return !n || s.unmaskTextSelector && t.matches(s.unmaskTextSelector) ? i : r.includes(e) || "value" === e && "INPUT" === t.tagName && ["submit", "button"].includes(t.getAttribute("type") || "") ? i.replace(/[\S]/g, "*") : i | |
| } | |
| )({ | |
| maskAttributes: v, | |
| maskAllText: u, | |
| privacyOptions: L, | |
| key: t, | |
| value: e, | |
| el: r | |
| }), | |
| ...L, | |
| slimDOMOptions: "all", | |
| inlineStylesheet: !0, | |
| inlineImages: !1, | |
| collectFonts: !0, | |
| errorHandler: t => { | |
| try { | |
| t.__rrweb__ = !0 | |
| } catch (t) {} | |
| } | |
| }, | |
| this._initialOptions = { | |
| flushMinDelay: t, | |
| flushMaxDelay: e, | |
| minReplayDuration: Math.min(r, 15e3), | |
| maxReplayDuration: Math.min(n, 36e5), | |
| stickySession: s, | |
| sessionSampleRate: l, | |
| errorSampleRate: d, | |
| useCompression: i, | |
| workerUrl: a, | |
| blockAllMedia: c, | |
| maskAllInputs: h, | |
| maskAllText: u, | |
| mutationBreadcrumbLimit: p, | |
| mutationLimit: g, | |
| slowClickTimeout: m, | |
| slowClickIgnoreSelectors: f, | |
| networkDetailAllowUrls: _, | |
| networkDetailDenyUrls: y, | |
| networkCaptureBodies: I, | |
| networkRequestHeaders: rT(b), | |
| networkResponseHeaders: rT(C), | |
| beforeAddRecordingEvent: T, | |
| _experiments: o | |
| }, | |
| "number" == typeof l && (console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration. | |
| This option is deprecated and will be removed soon. | |
| Instead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.: | |
| Sentry.init({ replaysSessionSampleRate: ${l} })`), | |
| this._initialOptions.sessionSampleRate = l), | |
| "number" == typeof d && (console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration. | |
| This option is deprecated and will be removed soon. | |
| Instead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.: | |
| Sentry.init({ replaysOnErrorSampleRate: ${d} })`), | |
| this._initialOptions.errorSampleRate = d), | |
| this._initialOptions.blockAllMedia && (this._recordingOptions.blockSelector = this._recordingOptions.blockSelector ? `${this._recordingOptions.blockSelector},${rA}` : rA), | |
| this._isInitialized && (0, | |
| B.j)()) | |
| throw Error("Multiple Sentry Session Replay instances are not supported"); | |
| this._isInitialized = !0 | |
| } | |
| get _isInitialized() { | |
| return rk | |
| } | |
| set _isInitialized(t) { | |
| rk = t | |
| } | |
| setupOnce() { | |
| (0, | |
| B.j)() && (this._setup(), | |
| setTimeout( () => this._initialize())) | |
| } | |
| start() { | |
| this._replay && this._replay.start() | |
| } | |
| startBuffering() { | |
| this._replay && this._replay.startBuffering() | |
| } | |
| stop() { | |
| return this._replay ? this._replay.stop({ | |
| forceFlush: "session" === this._replay.recordingMode | |
| }) : Promise.resolve() | |
| } | |
| flush(t) { | |
| return this._replay && this._replay.isEnabled() ? this._replay.sendBufferedReplayOrFlush(t) : Promise.resolve() | |
| } | |
| getReplayId() { | |
| if (this._replay && this._replay.isEnabled()) | |
| return this._replay.getSessionId() | |
| } | |
| _initialize() { | |
| this._replay && this._replay.initializeSampling() | |
| } | |
| _setup() { | |
| let t = function(t) { | |
| let e = (0, | |
| C.Gd)().getClient() | |
| , r = e && e.getOptions() | |
| , n = { | |
| sessionSampleRate: 0, | |
| errorSampleRate: 0, | |
| ...(0, | |
| R.Jr)(t) | |
| }; | |
| return r ? (null == t.sessionSampleRate && null == t.errorSampleRate && null == r.replaysSessionSampleRate && null == r.replaysOnErrorSampleRate && console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set."), | |
| "number" == typeof r.replaysSessionSampleRate && (n.sessionSampleRate = r.replaysSessionSampleRate), | |
| "number" == typeof r.replaysOnErrorSampleRate && (n.errorSampleRate = r.replaysOnErrorSampleRate)) : console.warn("SDK client is not available."), | |
| n | |
| }(this._initialOptions); | |
| this._replay = new rv({ | |
| options: t, | |
| recordingOptions: this._recordingOptions | |
| }) | |
| } | |
| } | |
| function rT(t) { | |
| return [...rE, ...t.map(t => t.toLowerCase())] | |
| } | |
| rR.__initStatic() | |
| } | |
| }]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment