fast-tracker-browser
Version:
用户行为、应用性能、应用异常一体化采集
8 lines • 124 kB
JavaScript
/*!
* Release Version: 1.0.1-r27
* Release Time: Tue Nov 26 2024 18:39:09 GMT+0800 (中国标准时间)
*/
!function(e,t){
if(e===window){e.fastTracker=t();e.myWebLogTracker=t();}
//[ONLINE-CONFIG]
"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("fastTracker",[],t):"object"==typeof exports?exports.fastTracker=t():e.fastTracker=t()}(this,(function(){return function(){var e={553:function(e){var t=function(e){"use strict";var t,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(N){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),i=new C(n||[]);return a._invoke=function(e,t,r){var n=f;return function(o,a){if(n===p)throw new Error("Generator is already running");if(n===m){if("throw"===o)throw a;return D()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var c=O(i,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var s=l(e,t,r);if("normal"===s.type){if(n=r.done?m:d,s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=m,r.method="throw",r.arg=s.arg)}}}(e,r,i),a}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(N){return{type:"throw",arg:N}}}e.wrap=u;var f="suspendedStart",d="suspendedYield",p="executing",m="completed",h={};function g(){}function v(){}function y(){}var _={};s(_,a,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(I([])));w&&w!==r&&n.call(w,a)&&(_=w);var S=y.prototype=g.prototype=Object.create(_);function k(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function r(o,a,i,c){var s=l(e[o],e,a);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(s.arg)}var o;this._invoke=function(e,n){function a(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(a,a):a()}}function O(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator["return"]&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method))return h;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=l(n,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var a=o.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,h):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function I(e){if(e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}return{next:D}}function D(){return{value:t,done:!0}}return v.prototype=y,s(S,"constructor",y),s(y,"constructor",v),v.displayName=s(y,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,c,"GeneratorFunction")),e.prototype=Object.create(S),e},e.awrap=function(e){return{__await:e}},k(x.prototype),s(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new x(u(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(S),s(S,c,"Generator"),s(S,a,(function(){return this})),s(S,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=I,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),h}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),h}},e}(e.exports);try{regeneratorRuntime=t}catch(r){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},757:function(e,t,r){e.exports=r(553)},194:function(){window.$$fastRecord=function(){"use strict";var e,t=function(){return(t=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function r(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function n(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a["return"])&&r.call(a)}finally{if(o)throw o.error}}return i}function o(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(n(arguments[t]));return e}function a(e){var t,r=null===(t=e)||void 0===t?void 0:t.host;return Boolean(r&&r.shadowRoot&&r.shadowRoot===e)}function i(e){var t=e.maskInputOptions,r=e.tagName,n=e.type,o=e.value,a=e.maskInputFn,i=o||"";return(t[r.toLowerCase()]||t[n])&&(i=a?a(i):"*".repeat(i.length)),i}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(e||(e={}));var c=1,s=new RegExp("[^a-z0-9-_:]");function u(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(l).join(""):null}catch(e){return null}}function l(e){var t=e.cssText;if(function(e){return"styleSheet"in e}(e))try{t=u(e.styleSheet)||t}catch(e){}return t}var f=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,d=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,p=/^(data:)([^,]*),(.*)/i;function m(e,t){return(e||"").replace(f,(function(e,r,n,o,a,i){var c,s=n||a||i,u=r||o||"";if(!s)return e;if(!d.test(s))return"url("+u+s+u+")";if(p.test(s))return"url("+u+s+u+")";if("/"===s[0])return"url("+u+(((c=t).indexOf("//")>-1?c.split("/").slice(0,3).join("/"):c.split("/")[0]).split("?")[0]+s)+u+")";var l=t.split("/"),f=s.split("/");l.pop();for(var m=0,h=f;m<h.length;m++){var g=h[m];"."!==g&&(".."===g?l.pop():l.push(g))}return"url("+u+l.join("/")+u+")"}))}var h,g,v,y,_,b=/^[^ \t\n\r\u000c]+/,w=/^[, \t\n\r\u000c]+/;function S(e,t){if(!t||""===t.trim())return t;var r=e.createElement("a");return r.href=t,r.href}function k(){var e=document.createElement("a");return e.href="",e.href}function x(e,t,r,n){return"src"===r||"href"===r&&n||"xlink:href"===r&&n&&"#"!==n[0]?S(e,n):"background"!==r||!n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r&&n?function(e,t){if(""===t.trim())return t;var r=0;function n(e){var n,o=e.exec(t.substring(r));return o?(n=o[0],r+=n.length,n):""}for(var o=[];n(w),!(r>=t.length);){var a=n(b);if(","===a.slice(-1))a=S(e,a.substring(0,a.length-1)),o.push(a);else{var i="";a=S(e,a);for(var c=!1;;){var s=t.charAt(r);if(""===s){o.push((a+i).trim());break}if(c)")"===s&&(c=!1);else{if(","===s){r+=1,o.push((a+i).trim());break}"("===s&&(c=!0)}i+=s,r+=1}}}return o.join(", ")}(e,n):"style"===r&&n?m(n,k()):"object"===t&&"data"===r&&n?S(e,n):n:S(e,n)}function O(e,t,r){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){if("string"==typeof t){if(e.classList.contains(t))return!0}else e.classList.forEach((function(e){if(t.test(e))return!0}));return!(!r||!e.matches(r))||O(e.parentNode,t,r)}return e.nodeType,e.TEXT_NODE,O(e.parentNode,t,r)}function E(t,r){var n,o,a,c,l=r.doc,f=r.blockClass,d=r.blockSelector,p=r.maskTextClass,h=r.maskTextSelector,g=r.inlineStylesheet,v=r.maskInputOptions,y=void 0===v?{}:v,_=r.maskTextFn,b=r.maskInputFn,w=r.recordCanvas,S=r.keepIframeSrcFn;if(l.__sn){var E=l.__sn.id;o=1===E?void 0:E}switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:e.Document,childNodes:[],compatMode:t.compatMode,rootId:o}:{type:e.Document,childNodes:[],rootId:o};case t.DOCUMENT_TYPE_NODE:return{type:e.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:o};case t.ELEMENT_NODE:for(var T=function(e,t,r){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var n=0;n<e.classList.length;n++){var o=e.classList[n];if(t.test(o))return!0}return!!r&&e.matches(r)}(t,f,d),C=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return s.test(t)?"div":t}(t),I={},D=0,N=Array.from(t.attributes);D<N.length;D++){var L=N[D],M=L.name,j=L.value;I[M]=x(l,C,M,j)}if("link"===C&&g){var R,F=Array.from(l.styleSheets).find((function(e){return e.href===t.href}));(R=u(F))&&(delete I.rel,delete I.href,I._cssText=m(R,F.href))}if("style"===C&&t.sheet&&!(t.innerText||t.textContent||"").trim().length&&(R=u(t.sheet))&&(I._cssText=m(R,k())),"input"!==C&&"textarea"!==C&&"select"!==C||(j=t.value,"radio"!==I.type&&"checkbox"!==I.type&&"submit"!==I.type&&"button"!==I.type&&j?I.value=i({type:I.type,tagName:C,value:j,maskInputOptions:y,maskInputFn:b}):t.checked&&(I.checked=t.checked)),"option"===C&&(t.selected?I.selected=!0:delete I.selected),"canvas"===C&&w&&(I.rr_dataURL=t.toDataURL()),"audio"!==C&&"video"!==C||(I.rr_mediaState=t.paused?"paused":"played",I.rr_mediaCurrentTime=t.currentTime),t.scrollLeft&&(I.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(I.rr_scrollTop=t.scrollTop),T){var P=t.getBoundingClientRect(),A=P.width,z=P.height;I={"class":I["class"],rr_width:A+"px",rr_height:z+"px"}}return"iframe"!==C||S(I.src)||(t.contentDocument||(I.rr_src=I.src),delete I.src),{type:e.Element,tagName:C,attributes:I,childNodes:[],isSVG:(c=t,"svg"===c.tagName||c instanceof SVGElement||void 0),needBlock:T,rootId:o};case t.TEXT_NODE:var $=t.parentNode&&t.parentNode.tagName,q=t.textContent,U="STYLE"===$||void 0,B="SCRIPT"===$||void 0;if(U&&q){try{(null===(n=t.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(q=(a=t.parentNode.sheet).cssRules?Array.from(a.cssRules).map((function(e){return e.cssText||""})).join(""):"")}catch(e){}q=m(q,k())}return B&&(q="SCRIPT_PLACEHOLDER"),!U&&!B&&O(t,p,h)&&q&&(q=_?_(q):q.replace(/[\S]/g,"*")),{type:e.Text,textContent:q||"",isStyle:U,rootId:o};case t.CDATA_SECTION_NODE:return{type:e.CDATA,textContent:"",rootId:o};case t.COMMENT_NODE:return{type:e.Comment,textContent:t.textContent||"",rootId:o};default:return!1}}function T(e){return void 0===e?"":e.toLowerCase()}function C(t,r){var n,o=r.doc,i=r.map,s=r.blockClass,u=r.blockSelector,l=r.maskTextClass,f=r.maskTextSelector,d=r.skipChild,p=void 0!==d&&d,m=r.inlineStylesheet,h=void 0===m||m,g=r.maskInputOptions,v=void 0===g?{}:g,y=r.maskTextFn,_=r.maskInputFn,b=r.slimDOMOptions,w=r.recordCanvas,S=void 0!==w&&w,k=r.onSerialize,x=r.onIframeLoad,O=r.iframeLoadTimeout,I=void 0===O?5e3:O,D=r.keepIframeSrcFn,N=void 0===D?function(){return!1}:D,L=r.preserveWhiteSpace,M=void 0===L||L,j=E(t,{doc:o,blockClass:s,blockSelector:u,maskTextClass:l,maskTextSelector:f,inlineStylesheet:h,maskInputOptions:v,maskTextFn:y,maskInputFn:_,recordCanvas:S,keepIframeSrcFn:N});if(!j)return console.warn(t,"not serialized"),null;n="__sn"in t?t.__sn.id:!function(t,r){if(r.comment&&t.type===e.Comment)return!0;if(t.type===e.Element){if(r.script&&("script"===t.tagName||"link"===t.tagName&&"preload"===t.attributes.rel&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js")))return!0;if(r.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(T(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===T(t.attributes.name)||"icon"===T(t.attributes.rel)||"apple-touch-icon"===T(t.attributes.rel)||"shortcut icon"===T(t.attributes.rel))))return!0;if("meta"===t.tagName){if(r.headMetaDescKeywords&&T(t.attributes.name).match(/^description|keywords$/))return!0;if(r.headMetaSocial&&(T(t.attributes.property).match(/^(og|twitter|fb):/)||T(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===T(t.attributes.name)))return!0;if(r.headMetaRobots&&("robots"===T(t.attributes.name)||"googlebot"===T(t.attributes.name)||"bingbot"===T(t.attributes.name)))return!0;if(r.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(r.headMetaAuthorship&&("author"===T(t.attributes.name)||"generator"===T(t.attributes.name)||"framework"===T(t.attributes.name)||"publisher"===T(t.attributes.name)||"progid"===T(t.attributes.name)||T(t.attributes.property).match(/^article:/)||T(t.attributes.property).match(/^product:/)))return!0;if(r.headMetaVerification&&("google-site-verification"===T(t.attributes.name)||"yandex-verification"===T(t.attributes.name)||"csrf-token"===T(t.attributes.name)||"p:domain_verify"===T(t.attributes.name)||"verify-v1"===T(t.attributes.name)||"verification"===T(t.attributes.name)||"shopify-checkout-api-token"===T(t.attributes.name)))return!0}}return!1}(j,b)&&(M||j.type!==e.Text||j.isStyle||j.textContent.replace(/^\s+|\s+$/gm,"").length)?c++:-2;var R=Object.assign(j,{id:n});if(t.__sn=R,-2===n)return null;i[n]=t,k&&k(t);var F=!p;if(R.type===e.Element&&(F=F&&!R.needBlock,delete R.needBlock),(R.type===e.Document||R.type===e.Element)&&F){b.headWhitespace&&j.type===e.Element&&"head"===j.tagName&&(M=!1);for(var P={doc:o,map:i,blockClass:s,blockSelector:u,maskTextClass:l,maskTextSelector:f,skipChild:p,inlineStylesheet:h,maskInputOptions:v,maskTextFn:y,maskInputFn:_,slimDOMOptions:b,recordCanvas:S,preserveWhiteSpace:M,onSerialize:k,onIframeLoad:x,iframeLoadTimeout:I,keepIframeSrcFn:N},A=0,z=Array.from(t.childNodes);A<z.length;A++)(U=C(z[A],P))&&R.childNodes.push(U);if(function(e){return e.nodeType===e.ELEMENT_NODE}(t)&&t.shadowRoot){R.isShadowHost=!0;for(var $=0,q=Array.from(t.shadowRoot.childNodes);$<q.length;$++){var U;(U=C(q[$],P))&&(U.isShadow=!0,R.childNodes.push(U))}}}return t.parentNode&&a(t.parentNode)&&(R.isShadow=!0),R.type===e.Element&&"iframe"===R.tagName&&function(e,t,r){var n=e.contentWindow;if(n){var o,a=!1;try{o=n.document.readyState}catch(e){return}if("complete"===o){var i="about:blank";n.location.href===i&&e.src!==i&&""!==e.src?e.addEventListener("load",t):setTimeout(t,0)}else{var c=setTimeout((function(){a||(t(),a=!0)}),r);e.addEventListener("load",(function(){clearTimeout(c),a=!0,t()}))}}}(t,(function(){var e=t.contentDocument;if(e&&x){var r=C(e,{doc:e,map:i,blockClass:s,blockSelector:u,maskTextClass:l,maskTextSelector:f,skipChild:!1,inlineStylesheet:h,maskInputOptions:v,maskTextFn:y,maskInputFn:_,slimDOMOptions:b,recordCanvas:S,preserveWhiteSpace:M,onSerialize:k,onIframeLoad:x,iframeLoadTimeout:I,keepIframeSrcFn:N});r&&x(t,r)}}),I),R}function I(e,t,r){void 0===r&&(r=document);var n={capture:!0,passive:!0};return r.addEventListener(e,t,n),function(){return r.removeEventListener(e,t,n)}}!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin"}(h||(h={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration"}(g||(g={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel"}(v||(v={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked"}(y||(y={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back"}(_||(_={}));var D="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.",N={map:{},getId:function(){return console.error(D),-1},getNode:function(){return console.error(D),null},removeNodeFromMap:function(){console.error(D)},has:function(){return console.error(D),!1},reset:function(){console.error(D)}};function L(e,t,r){void 0===r&&(r={});var n=null,o=0;return function(a){var i=Date.now();o||!1!==r.leading||(o=i);var c=t-(i-o),s=this,u=arguments;c<=0||c>t?(n&&(clearTimeout(n),n=null),o=i,e.apply(s,u)):n||!1===r.trailing||(n=setTimeout((function(){o=!1===r.leading?0:Date.now(),n=null,e.apply(s,u)}),c))}}function M(e,t,r,n,o){void 0===o&&(o=window);var a=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,n?r:{set:function(e){var t=this;setTimeout((function(){r.set.call(t,e)}),0),a&&a.set&&a.set.call(this,e)}}),function(){return M(e,t,a||{},!0)}}function j(e,t,r){try{if(!(t in e))return function(){};var n=e[t],o=r(n);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=o,function(){e[t]=n}}catch(e){return function(){}}}function R(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function F(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function P(e,t){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var r=!1;return"string"==typeof t?r=e.classList.contains(t):e.classList.forEach((function(e){t.test(e)&&(r=!0)})),r||P(e.parentNode,t)}return e.nodeType,e.TEXT_NODE,P(e.parentNode,t)}function A(e){return"__sn"in e&&-2===e.__sn.id}function z(e,t){if(a(e))return!1;var r=t.getId(e);return!t.has(r)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||z(e.parentNode,t))}function $(e){return Boolean(e.changedTouches)}function q(t){return"__sn"in t&&t.__sn.type===e.Element&&"iframe"===t.__sn.tagName}function U(e){var t;return Boolean(null===(t=e)||void 0===t?void 0:t.shadowRoot)}function B(e){return"__ln"in e}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(N=new Proxy(N,{get:function(e,t,r){return"map"===t&&console.error(D),Reflect.get(e,t,r)}}));var H=function(){function e(){this.length=0,this.head=null}return e.prototype.get=function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,r=0;r<e;r++)t=(null==t?void 0:t.next)||null;return t},e.prototype.addNode=function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&B(e.previousSibling)){var r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else e.nextSibling&&B(e.nextSibling)&&e.nextSibling.__ln.previous?(r=e.nextSibling.__ln.previous,t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)):(this.head&&(this.head.previous=t),t.next=this.head,this.head=t);this.length++},e.prototype.removeNode=function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)},e}(),W=function(e,t){return e+"@"+t};function V(e){return"__sn"in e}var J=function(){function e(){var e=this;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=function(t){t.forEach(e.processMutation),e.emit()},this.emit=function(){var t,n,o,i;if(!e.frozen&&!e.locked){for(var c=[],s=new H,u=function(t){for(var r=t,n=-2;-2===n;)n=(r=r&&r.nextSibling)&&e.mirror.getId(r);return n},l=function(t){var r,n=t.getRootNode?null===(r=t.getRootNode())||void 0===r?void 0:r.host:null,o=!(e.doc.contains(t)||n instanceof Node&&e.doc.contains(n));if(t.parentNode&&!o){var i=a(t.parentNode)?e.mirror.getId(n):e.mirror.getId(t.parentNode),l=u(t);if(-1===i||-1===l)return s.addNode(t);var f=C(t,{doc:e.doc,map:e.mirror.map,blockClass:e.blockClass,blockSelector:e.blockSelector,maskTextClass:e.maskTextClass,maskTextSelector:e.maskTextSelector,skipChild:!0,inlineStylesheet:e.inlineStylesheet,maskInputOptions:e.maskInputOptions,maskTextFn:e.maskTextFn,maskInputFn:e.maskInputFn,slimDOMOptions:e.slimDOMOptions,recordCanvas:e.recordCanvas,onSerialize:function(r){q(r)&&e.iframeManager.addIframe(r),U(t)&&e.shadowDomManager.addShadowRoot(t.shadowRoot,document)},onIframeLoad:function(t,r){e.iframeManager.attachIframe(t,r)}});f&&c.push({parentId:i,nextId:l,node:f})}};e.mapRemoves.length;)e.mirror.removeNodeFromMap(e.mapRemoves.shift());try{for(var f=r(e.movedSet),d=f.next();!d.done;d=f.next()){var p=d.value;X(e.removes,p,e.mirror)&&!e.movedSet.has(p.parentNode)||l(p)}}catch(e){t={error:e}}finally{try{d&&!d.done&&(n=f["return"])&&n.call(f)}finally{if(t)throw t.error}}try{for(var m=r(e.addedSet),h=m.next();!h.done;h=m.next())p=h.value,K(e.droppedSet,p)||X(e.removes,p,e.mirror)?K(e.movedSet,p)?l(p):e.droppedSet.add(p):l(p)}catch(e){o={error:e}}finally{try{h&&!h.done&&(i=m["return"])&&i.call(m)}finally{if(o)throw o.error}}for(var g=null;s.length;){var v=null;if(g){var y=e.mirror.getId(g.value.parentNode),_=u(g.value);-1!==y&&-1!==_&&(v=g)}if(!v)for(var b=s.length-1;b>=0;b--){var w=s.get(b);if(w&&(y=e.mirror.getId(w.value.parentNode),_=u(w.value),-1!==y&&-1!==_)){v=w;break}}if(!v){for(;s.head;)s.removeNode(s.head.value);break}g=v.previous,s.removeNode(v.value),l(v.value)}var S={texts:e.texts.map((function(t){return{id:e.mirror.getId(t.node),value:t.value}})).filter((function(t){return e.mirror.has(t.id)})),attributes:e.attributes.map((function(t){return{id:e.mirror.getId(t.node),attributes:t.attributes}})).filter((function(t){return e.mirror.has(t.id)})),removes:e.removes,adds:c};(S.texts.length||S.attributes.length||S.removes.length||S.adds.length)&&(e.texts=[],e.attributes=[],e.removes=[],e.addedSet=new Set,e.movedSet=new Set,e.droppedSet=new Set,e.movedMap={},e.emissionCallback(S))}},this.processMutation=function(t){var n,o,c,s;if(!A(t.target))switch(t.type){case"characterData":var u=t.target.textContent;P(t.target,e.blockClass)||u===t.oldValue||e.texts.push({value:O(t.target,e.maskTextClass,e.maskTextSelector)&&u?e.maskTextFn?e.maskTextFn(u):u.replace(/[\S]/g,"*"):u,node:t.target});break;case"attributes":var l=t.target;if(u=t.target.getAttribute(t.attributeName),"value"===t.attributeName&&(u=i({maskInputOptions:e.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:u,maskInputFn:e.maskInputFn})),P(t.target,e.blockClass)||u===t.oldValue)return;var f=e.attributes.find((function(e){return e.node===t.target}));if(f||(f={node:t.target,attributes:{}},e.attributes.push(f)),"style"===t.attributeName){var d=e.doc.createElement("span");t.oldValue&&d.setAttribute("style",t.oldValue),void 0!==f.attributes.style&&null!==f.attributes.style||(f.attributes.style={});var p=f.attributes.style;try{for(var m=r(Array.from(l.style)),h=m.next();!h.done;h=m.next()){var g=h.value,v=l.style.getPropertyValue(g),y=l.style.getPropertyPriority(g);v===d.style.getPropertyValue(g)&&y===d.style.getPropertyPriority(g)||(p[g]=""===y?v:[v,y])}}catch(e){n={error:e}}finally{try{h&&!h.done&&(o=m["return"])&&o.call(m)}finally{if(n)throw n.error}}try{for(var _=r(Array.from(d.style)),b=_.next();!b.done;b=_.next())g=b.value,""===l.style.getPropertyValue(g)&&(p[g]=!1)}catch(e){c={error:e}}finally{try{b&&!b.done&&(s=_["return"])&&s.call(_)}finally{if(c)throw c.error}}}else f.attributes[t.attributeName]=x(e.doc,t.target.tagName,t.attributeName,u);break;case"childList":t.addedNodes.forEach((function(r){return e.genAdds(r,t.target)})),t.removedNodes.forEach((function(r){var n=e.mirror.getId(r),o=a(t.target)?e.mirror.getId(t.target.host):e.mirror.getId(t.target);P(t.target,e.blockClass)||A(r)||(e.addedSet.has(r)?(G(e.addedSet,r),e.droppedSet.add(r)):e.addedSet.has(t.target)&&-1===n||z(t.target,e.mirror)||(e.movedSet.has(r)&&e.movedMap[W(n,o)]?G(e.movedSet,r):e.removes.push({parentId:o,id:n,isShadow:!!a(t.target)||void 0})),e.mapRemoves.push(r))}))}},this.genAdds=function(t,r){if(!r||!P(r,e.blockClass)){if(V(t)){if(A(t))return;e.movedSet.add(t);var n=null;r&&V(r)&&(n=r.__sn.id),n&&(e.movedMap[W(t.__sn.id,n)]=!0)}else e.addedSet.add(t),e.droppedSet["delete"](t);P(t,e.blockClass)||t.childNodes.forEach((function(t){return e.genAdds(t)}))}}}return e.prototype.init=function(e,t,r,n,o,a,i,c,s,u,l,f,d,p,m){this.blockClass=t,this.blockSelector=r,this.maskTextClass=n,this.maskTextSelector=o,this.inlineStylesheet=a,this.maskInputOptions=i,this.maskTextFn=c,this.maskInputFn=s,this.recordCanvas=u,this.slimDOMOptions=l,this.emissionCallback=e,this.doc=f,this.mirror=d,this.iframeManager=p,this.shadowDomManager=m},e.prototype.freeze=function(){this.frozen=!0},e.prototype.unfreeze=function(){this.frozen=!1,this.emit()},e.prototype.isFrozen=function(){return this.frozen},e.prototype.lock=function(){this.locked=!0},e.prototype.unlock=function(){this.locked=!1,this.emit()},e}();function G(e,t){e["delete"](t),t.childNodes.forEach((function(t){return G(e,t)}))}function X(e,t,r){var n=t.parentNode;if(!n)return!1;var o=r.getId(n);return!!e.some((function(e){return e.id===o}))||X(e,n,r)}function K(e,t){var r=t.parentNode;return!!r&&(!!e.has(r)||K(e,r))}var Z=[],Y="undefined"!=typeof CSSGroupingRule,Q="undefined"!=typeof CSSMediaRule,ee="undefined"!=typeof CSSSupportsRule,te="undefined"!=typeof CSSConditionRule;function re(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch(t){return e.target}}function ne(e,t,r,n,o,a,i,c,s,u,l,f,d,p,m,h){var g,v,y,_=new J;Z.push(_),_.init(e,r,n,o,a,i,c,s,u,l,f,t,d,p,m);var b=window.MutationObserver||window.__rrMutationObserver,w=null===(y=null===(v=null===(g=window)||void 0===g?void 0:g.Zone)||void 0===v?void 0:v.__symbol__)||void 0===y?void 0:y.call(v,"MutationObserver");w&&window[w]&&(b=window[w]);var S=new b(_.processMutations.bind(_));return S.observe(h,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),S}function oe(e,t,r,n,o){if(!1===o.mouseInteraction)return function(){};var a=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,i=[];return Object.keys(v).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]})).forEach((function(o){var a=o.toLowerCase(),c=function(t){return function(o){var a=re(o);if(!P(a,n)){var i=$(o)?o.changedTouches[0]:o;if(i){var c=r.getId(a),s=i.clientX,u=i.clientY;e({type:v[t],id:c,x:s,y:u})}}}}(o);i.push(I(a,c,t))})),function(){i.forEach((function(e){return e()}))}}function ae(e,t,r,n,o){return I("scroll",L((function(o){var a=re(o);if(a&&!P(a,n)){var i=r.getId(a);if(a===t){var c=t.scrollingElement||t.documentElement;e({id:i,x:c.scrollLeft,y:c.scrollTop})}else e({id:i,x:a.scrollLeft,y:a.scrollTop})}}),o.scroll||100),t)}function ie(e,r){var n=t({},e);return r||delete n.userTriggered,n}var ce=["INPUT","TEXTAREA","SELECT"],se=new WeakMap;function ue(e){return function(e,t){if(Y&&e.parentRule instanceof CSSGroupingRule||Q&&e.parentRule instanceof CSSMediaRule||ee&&e.parentRule instanceof CSSSupportsRule||te&&e.parentRule instanceof CSSConditionRule){var r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else r=Array.from(e.parentStyleSheet.cssRules).indexOf(e),t.unshift(r);return t}(e,[])}function le(e,a){var c,s;void 0===a&&(a={});var u=e.doc.defaultView;if(!u)return function(){};!function(e,t){var r=e.mutationCb,n=e.mousemoveCb,a=e.mouseInteractionCb,i=e.scrollCb,c=e.viewportResizeCb,s=e.inputCb,u=e.mediaInteractionCb,l=e.styleSheetRuleCb,f=e.styleDeclarationCb,d=e.canvasMutationCb,p=e.fontCb;e.mutationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mutation&&t.mutation.apply(t,o(e)),r.apply(void 0,o(e))},e.mousemoveCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mousemove&&t.mousemove.apply(t,o(e)),n.apply(void 0,o(e))},e.mouseInteractionCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mouseInteraction&&t.mouseInteraction.apply(t,o(e)),a.apply(void 0,o(e))},e.scrollCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.scroll&&t.scroll.apply(t,o(e)),i.apply(void 0,o(e))},e.viewportResizeCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.viewportResize&&t.viewportResize.apply(t,o(e)),c.apply(void 0,o(e))},e.inputCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.input&&t.input.apply(t,o(e)),s.apply(void 0,o(e))},e.mediaInteractionCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mediaInteaction&&t.mediaInteaction.apply(t,o(e)),u.apply(void 0,o(e))},e.styleSheetRuleCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.styleSheetRule&&t.styleSheetRule.apply(t,o(e)),l.apply(void 0,o(e))},e.styleDeclarationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.styleDeclaration&&t.styleDeclaration.apply(t,o(e)),f.apply(void 0,o(e))},e.canvasMutationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.canvasMutation&&t.canvasMutation.apply(t,o(e)),d.apply(void 0,o(e))},e.fontCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.font&&t.font.apply(t,o(e)),p.apply(void 0,o(e))}}(e,a);var l,f,d,p=ne(e.mutationCb,e.doc,e.blockClass,e.blockSelector,e.maskTextClass,e.maskTextSelector,e.inlineStylesheet,e.maskInputOptions,e.maskTextFn,e.maskInputFn,e.recordCanvas,e.slimDOMOptions,e.mirror,e.iframeManager,e.shadowDomManager,e.doc),m=function(e,t,r,n){if(!1===t.mousemove)return function(){};var o,a="number"==typeof t.mousemove?t.mousemove:50,i="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500,c=[],s=L((function(t){var r=Date.now()-o;e(c.map((function(e){return e.timeOffset-=r,e})),t),c=[],o=null}),i),u=L((function(e){var t=re(e),r=$(e)?e.changedTouches[0]:e,a=r.clientX,i=r.clientY;o||(o=Date.now()),c.push({x:a,y:i,id:n.getId(t),timeOffset:Date.now()-o}),s("undefined"!=typeof DragEvent&&e instanceof DragEvent?g.Drag:e instanceof MouseEvent?g.MouseMove:g.TouchMove)}),a,{trailing:!1}),l=[I("mousemove",u,r),I("touchmove",u,r),I("drag",u,r)];return function(){l.forEach((function(e){return e()}))}}(e.mousemoveCb,e.sampling,e.doc,e.mirror),h=oe(e.mouseInteractionCb,e.doc,e.mirror,e.blockClass,e.sampling),v=ae(e.scrollCb,e.doc,e.mirror,e.blockClass,e.sampling),y=(l=e.viewportResizeCb,f=-1,d=-1,I("resize",L((function(){var e=R(),t=F();f===e&&d===t||(l({width:Number(t),height:Number(e)}),f=e,d=t)}),200),window)),_=function(e,r,n,a,c,s,u,l,f){function d(e){var t=re(e),n=e.isTrusted;if(t&&t.tagName&&!(ce.indexOf(t.tagName)<0)&&!P(t,a)){var o=t.type;if(!t.classList.contains(c)){var l=t.value,d=!1;"radio"===o||"checkbox"===o?d=t.checked:(s[t.tagName.toLowerCase()]||s[o])&&(l=i({maskInputOptions:s,tagName:t.tagName,type:o,value:l,maskInputFn:u})),p(t,ie({text:l,isChecked:d,userTriggered:n},f));var m=t.name;"radio"===o&&m&&d&&r.querySelectorAll('input[type="radio"][name="'+m+'"]').forEach((function(e){e!==t&&p(e,ie({text:e.value,isChecked:!d,userTriggered:!1},f))}))}}}function p(r,o){var a=se.get(r);if(!a||a.text!==o.text||a.isChecked!==o.isChecked){se.set(r,o);var i=n.getId(r);e(t(t({},o),{id:i}))}}var m=("last"===l.input?["change"]:["input","change"]).map((function(e){return I(e,d,r)})),h=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),g=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"]];return h&&h.set&&m.push.apply(m,o(g.map((function(e){return M(e[0],e[1],{set:function(){d({target:this})}})})))),function(){m.forEach((function(e){return e()}))}}(e.inputCb,e.doc,e.mirror,e.blockClass,e.ignoreClass,e.maskInputOptions,e.maskInputFn,e.sampling,e.userTriggeredOnInput),b=function(e,t,r){var n=function(n){return function(o){var a=re(o);a&&!P(a,t)&&e({type:n,id:r.getId(a),currentTime:a.currentTime})}},o=[I("play",n(0)),I("pause",n(1)),I("seeked",n(2))];return function(){o.forEach((function(e){return e()}))}}(e.mediaInteractionCb,e.blockClass,e.mirror),w=function(e,t,r){var a=t.CSSStyleSheet.prototype.insertRule;t.CSSStyleSheet.prototype.insertRule=function(t,n){var o=r.getId(this.ownerNode);return-1!==o&&e({id:o,adds:[{rule:t,index:n}]}),a.apply(this,arguments)};var i=t.CSSStyleSheet.prototype.deleteRule;t.CSSStyleSheet.prototype.deleteRule=function(t){var n=r.getId(this.ownerNode);return-1!==n&&e({id:n,removes:[{index:t}]}),i.apply(this,arguments)};var c={};Y?c.CSSGroupingRule=t.CSSGroupingRule:(Q&&(c.CSSMediaRule=t.CSSMediaRule),te&&(c.CSSConditionRule=t.CSSConditionRule),ee&&(c.CSSSupportsRule=t.CSSSupportsRule));var s={};return Object.entries(c).forEach((function(t){var a=n(t,2),i=a[0],c=a[1];s[i]={insertRule:c.prototype.insertRule,deleteRule:c.prototype.deleteRule},c.prototype.insertRule=function(t,n){var a=r.getId(this.parentStyleSheet.ownerNode);return-1!==a&&e({id:a,adds:[{rule:t,index:o(ue(this),[n||0])}]}),s[i].insertRule.apply(this,arguments)},c.prototype.deleteRule=function(t){var n=r.getId(this.parentStyleSheet.ownerNode);return-1!==n&&e({id:n,removes:[{index:o(ue(this),[t])}]}),s[i].deleteRule.apply(this,arguments)}})),function(){t.CSSStyleSheet.prototype.insertRule=a,t.CSSStyleSheet.prototype.deleteRule=i,Object.entries(c).forEach((function(e){var t=n(e,2),r=t[0],o=t[1];o.prototype.insertRule=s[r].insertRule,o.prototype.deleteRule=s[r].deleteRule}))}}(e.styleSheetRuleCb,u,e.mirror),S=function(e,t,r){var n=t.CSSStyleDeclaration.prototype.setProperty;t.CSSStyleDeclaration.prototype.setProperty=function(t,o,a){var i,c,s=r.getId(null===(c=null===(i=this.parentRule)||void 0===i?void 0:i.parentStyleSheet)||void 0===c?void 0:c.ownerNode);return-1!==s&&e({id:s,set:{property:t,value:o,priority:a},index:ue(this.parentRule)}),n.apply(this,arguments)};var o=t.CSSStyleDeclaration.prototype.removeProperty;return t.CSSStyleDeclaration.prototype.removeProperty=function(t){var n,a,i=r.getId(null===(a=null===(n=this.parentRule)||void 0===n?void 0:n.parentStyleSheet)||void 0===a?void 0:a.ownerNode);return-1!==i&&e({id:i,remove:{property:t},index:ue(this.parentRule)}),o.apply(this,arguments)},function(){t.CSSStyleDeclaration.prototype.setProperty=n,t.CSSStyleDeclaration.prototype.removeProperty=o}}(e.styleDeclarationCb,u,e.mirror),k=e.recordCanvas?function(e,t,n,a){var i,c,s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),u=[],l=function(r){try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[r])return"continue";var i=j(t.CanvasRenderingContext2D.prototype,r,(function(t){return function(){for(var i=this,c=[],s=0;s<arguments.length;s++)c[s]=arguments[s];return P(this.canvas,n)||setTimeout((function(){var t=o(c);if("drawImage"===r&&t[0]&&t[0]instanceof HTMLCanvasElement){var n=t[0],s=n.getContext("2d"),u=null==s?void 0:s.getImageData(0,0,n.width,n.height),l=null==u?void 0:u.data;t[0]=JSON.stringify(l)}e({id:a.getId(i.canvas),property:r,args:t})}),0),t.apply(this,c)}}));u.push(i)}catch(n){var c=M(t.CanvasRenderingContext2D.prototype,r,{set:function(t){e({id:a.getId(this.canvas),property:r,args:[t],setter:!0})}});u.push(c)}};try{for(var f=r(s),d=f.next();!d.done;d=f.next())l(d.value)}catch(e){i={error:e}}finally{try{d&&!d.done&&(c=f["return"])&&c.call(f)}finally{if(i)throw i.error}}return function(){u.forEach((function(e){return e()}))}}(e.canvasMutationCb,u,e.blockClass,e.mirror):function(){},x=e.collectFonts?function(e,t){var r=t.defaultView;if(!r)return function(){};var n=[],o=new WeakMap,a=r.FontFace;r.FontFace=function(e,t,r){var n=new a(e,t,r);return o.set(n,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),n};var i=j(t.fonts,"add",(function(t){return function(r){return setTimeout((function(){var t=o.get(r);t&&(e(t),o["delete"](r))}),0),t.apply(this,[r])}}));return n.push((function(){r.FontFace=a})),n.push(i),function(){n.forEach((function(e){return e()}))}}(e.fontCb,e.doc):function(){},O=[];try{for(var E=r(e.plugins),T=E.next();!T.done;T=E.next()){var C=T.value;O.push(C.observer(C.callback,u,C.options))}}catch(e){c={error:e}}finally{try{T&&!T.done&&(s=E["return"])&&s.call(E)}finally{if(c)throw c.error}}return function(){p.disconnect(),m(),h(),v(),y(),_(),b(),w(),S(),k(),x(),O.forEach((function(e){return e()}))}}var fe,de,pe=function(){function e(e){this.iframes=new WeakMap,this.mutationCb=e.mutationCb}return e.prototype.addIframe=function(e){this.iframes.set(e,!0)},e.prototype.addLoadListener=function(e){this.loadListener=e},e.prototype.attachIframe=function(e,t){var r;this.mutationCb({adds:[{parentId:e.__sn.id,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(r=this.loadListener)||void 0===r||r.call(this,e)},e}(),me=function(){function e(e){this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror}return e.prototype.addShadowRoot=function(e,t){ne(this.mutationCb,t,this.bypassOptions.blockClass,this.bypassOptions.blockSelector,this.bypassOptions.maskTextClass,this.bypassOptions.maskTextSelector,this.bypassOptions.inlineStylesheet,this.bypassOptions.maskInputOptions,this.bypassOptions.maskTextFn,this.bypassOptions.maskInputFn,this.bypassOptions.recordCanvas,this.bypassOptions.slimDOMOptions,this.mirror,this.bypassOptions.iframeManager,this,e),ae(this.scrollCb,e,this.mirror,this.bypassOptions.blockClass,this.bypassOptions.sampling)},e}();function he(e){return t(t({},e),{timestamp:Date.now()})}var ge={map:{},getId:function(e){return e&&e.__sn?e.__sn.id:-1},getNode:function(e){return this.map[e]||null},removeNodeFromMap:function(e){var t=this,r=e.__sn&&e.__sn.id;delete this.map[r],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}};function ve(e){void 0===e&&(e={});var r=e.emit,o=e.checkoutEveryNms,a=e.checkoutEveryNth,i=e.blockClass,c=void 0===i?"rr-block":i,s=e.blockSelector,u=void 0===s?null:s,l=e.ignoreClass,f=void 0===l?"rr-ignore":l,d=e.maskTextClass,p=void 0===d?"rr-mask":d,m=e.maskTextSelector,v=void 0===m?null:m,y=e.inlineStylesheet,_=void 0===y||y,b=e.maskAllInputs,w=e.maskInputOptions,S=e.slimDOMOptions,k=e.maskInputFn,x=e.maskTextFn,O=e.hooks,E=e.packFn,T=e.sampling,D=void 0===T?{}:T,N=e.mousemoveWait,L=e.recordCanvas,M=void 0!==L&&L,j=e.userTriggeredOnInput,P=void 0!==j&&j,A=e.collectFonts,z=void 0!==A&&A,$=e.plugins,B=e.keepIframeSrcFn,H=void 0===B?function(){return!1}:B;if(!r)throw new Error("emit function is required");void 0!==N&&void 0===D.mousemove&&(D.mousemove=N);var W,V,J=!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,password:!0}:void 0!==w?w:{password:!0},G=!0===S||"all"===S?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===S,headMetaDescKeywords:"all"===S}:S||{};void 0===W&&(W=window),"NodeList"in W&&!W.NodeList.prototype.forEach&&(W.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in W&&!W.DOMTokenList.prototype.forEach&&(W.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1});var X=0;fe=function(e,t){var n;if(!(null===(n=Z[0])||void 0===n?void 0:n.isFrozen())||e.type===h.FullSnapshot||e.type===h.IncrementalSnapshot&&e.data.source===g.Mutation||Z.forEach((function(e){return e.unfreeze()})),r(E?E(e):e,t),e.type===h.FullSnapshot)V=e,X=0;else if(e.type===h.IncrementalSnapshot){if(e.data.source===g.Mutation&&e.data.isAttachIframe)return;X++;var i=a&&X>=a,c=o&&e.timestamp-V.timestamp>o;(i||c)&&de(!0)}};var K=function(e){fe(he({type:h.IncrementalSnapshot,data:t({source:g.Mutation},e)}))},Y=function(e){return fe(he({type:h.IncrementalSnapshot,data:t({source:g.Scroll},e)}))},Q=new pe({mutationCb:K}),ee=new me({mutationCb:K,scrollCb:Y,bypassOptions:{blockClass:c,blockSelector:u,maskTextClass:p,maskTextSelector:v,inlineStylesheet:_,maskInputOptions:J,maskTextFn:x,maskInputFn:k,recordCanvas:M,sampling:D,slimDOMOptions:G,iframeManager:Q},mirror:ge});de=function(e){var t,r,o,a;void 0===e&&(e=!1),fe(he({type:h.Meta,data:{href:window.location.href,width:F(),height:R()}}),e),Z.forEach((function(e){return e.lock()}));var i=n(function(e,t){var r=t||{},n=r.blockClass,o=r.blockSelector,a=r.maskTextClass,i=r.maskTextSelector,c=r.inlineStylesheet,s=r.recordCanvas,u=r.maskAllInputs,l=void 0!==u&&u,f=r.slimDOM,d=void 0!==f&&f,p=r.keepIframeSrcFn,m={};return[C(e,{doc:e,map:m,blockClass:void 0===n?"rr-block":n,blockSelector:void 0===o?null:o,maskTextClass:void 0===a?"rr-mask":a,maskTextSelector:void 0===i?null:i,skipChild:!1,inlineStylesheet:void 0===c||c,maskInputOptions:!0===l?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===l?{password:!0}:l,maskTextFn:r.maskTextFn,maskInputFn:r.maskInputFn,slimDOMOptions:!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===d,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===d?{}:d,recordCanvas:void 0!==s&&s,preserveWhiteSpace:r.preserveWhiteSpace,onSerialize:r.onSerialize,onIframeLoad:r.onIframeLoad,iframeLoadTimeout:r.iframeLoadTimeout,keepIframeSrcFn:void 0===p?function(){return!1}:p}),m]}(document,{blockClass:c,blockSelector:u,maskTextClass:p,maskTextSelector:v,inlineStylesheet:_,maskAllInputs:J,maskTextFn:x,slimDOM:G,recordCanvas:M,onSerialize:function(e){q(e)&&Q.addIframe(e),U(e)&&ee.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){Q.attachIframe(e,t)},keepIframeSrcFn:H}),2),s=i[0],l=i[1];if(!s)return console.warn("Failed to snapshot the document");ge.map=l,fe(he({type:h.FullSnapshot,data:{node:s,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(r=null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.parentElement)||void 0===r?void 0:r.scrollLeft)||(null===document||void 0===document?void 0:document.body.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(a=null===(o=null===document||void 0===document?void 0:document.body)||void 0===o?void 0:o.parentElement)||void 0===a?void 0:a.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}})),Z.forEach((function(e){return e.unlock()}))};try{var te=[];te.push(I("DOMContentLoaded",(function(){fe(he({type:h.DomContentLoaded,data:{}}))})));var re=function(e){return le({mutationCb:K,mousemoveCb:function(e,t){return fe(he({type:h.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return fe(he({type:h.IncrementalSnapshot,data:t({source:g.MouseInteraction},e)}))},scrollCb:Y,viewportResizeCb:function(e){return fe(he({type:h.IncrementalSnapshot,data:t({source:g.ViewportResize},e)}))},inputCb:function(e){return fe(he({type:h.IncrementalSnapshot,data:t({source:g.Input},e)}))},mediaInteractionCb:function(e){return fe(he({type:h.IncrementalSnapshot,data:t({source:g.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return fe(he({type:h.IncrementalSnapshot,data:t({source:g.StyleSheetRule},e)}))},styleDeclarationCb:function(e){return fe(he({type:h.IncrementalSnapshot,data:t({source:g.StyleDeclaration},e)}))},canvasMutationCb:function(e){return fe(he({type:h.IncrementalSnapshot,data:t({source:g.CanvasMutation},e)}))},fontCb:function(e){return fe(he({type:h.IncrementalSnapshot,data:t({source:g.Font},e)}))},blockClass:c,ignoreClass:f,maskTextClass:p,maskTextSelector:v,maskInputOptions:J,inlineStylesheet:_,sampling:D,recordCanvas:M,userTriggeredOnInput:P,collectFonts:z,doc:e,maskInputFn:k,maskTextFn:x,blockSelector:u,slimDOMOptions:G,mirror:ge,iframeManager:Q,shadowDomManager:ee,plugins:(null==$?void 0:$.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return fe(he({type:h.Plugin,data:{plugin:e.name,payload:t}}))}}})))||[]},O)};Q.addLoadListener((function(e){te.push(re(e.contentDocument))}));var ne=function(){de(),te.push(re(document))};return"interactive"===document.readyState||"complete"===document.readyState?ne():te.push(I("load",(function(){fe(he({type:h.Load,data:{}})),ne()}),window)),function(){te.forEach((function(e){return e()}))}}catch(e){console.warn(e)}}return ve.addCustomEvent=function(e,t){if(!fe)throw new Error("please add custom event after start recording");fe(he({type:h.Custom,data:{tag:e,payload:t}}))},ve.freezePage=function(){Z.forEach((function(e){return e.freeze()}))},ve.takeFullSnapshot=function(e){if(!de)throw new Error("please take full snapshot after start recording");de(e)},ve.mirror=ge,ve}()}},t={};function r(n){var o=t[n];if(o!==undefined)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var n={};return function(){"use strict";r.d(n,{"default":function(){return At}});r(194);function e(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof