Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rrweb-snapshot

Package Overview
Dependencies
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rrweb-snapshot - npm Package Compare versions

Comparing version 2.0.0-alpha.5 to 2.0.0-alpha.6

2

dist/rrweb-snapshot.min.js

@@ -1,2 +0,2 @@

var rrwebSnapshot=function(e){"use strict";var t;function r(e){return e.nodeType===e.ELEMENT_NODE}function n(e){var t=null==e?void 0:e.host;return Boolean((null==t?void 0:t.shadowRoot)===e)}function a(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function o(e){try{var t=e.rules||e.cssRules;return t?((r=Array.from(t).map(i).join("")).includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")&&(r=r.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),r):null}catch(e){return null}var r}function i(e){var t=e.cssText;if(s(e))try{t=o(e.styleSheet)||t}catch(e){}return t}function s(e){return"styleSheet"in e}e.NodeType=void 0,(t=e.NodeType||(e.NodeType={}))[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment";var c=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(e){var t;if(!e)return-1;var r=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=r?r:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,r=this.getId(e);this.idNodeMap.delete(r),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var r=this.getNode(e);if(r){var n=this.nodeMetaMap.get(r);n&&this.nodeMetaMap.set(t,n)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function l(e){var t=e.maskInputOptions,r=e.tagName,n=e.type,a=e.value,o=e.maskInputFn,i=a||"";return(t[r.toLowerCase()]||t[n])&&(i=o?o(i):"*".repeat(i.length)),i}var u="__rrweb_original__";function d(e){var t=e.getContext("2d");if(!t)return!0;for(var r=0;r<e.width;r+=50)for(var n=0;n<e.height;n+=50){var a=t.getImageData,o=u in a?a.__rrweb_original__:a;if(new Uint32Array(o.call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer).some((function(e){return 0!==e})))return!1}return!0}function p(t,r){return!(!t||!r||t.type!==r.type)&&(t.type===e.NodeType.Document?t.compatMode===r.compatMode:t.type===e.NodeType.DocumentType?t.name===r.name&&t.publicId===r.publicId&&t.systemId===r.systemId:t.type===e.NodeType.Comment||t.type===e.NodeType.Text||t.type===e.NodeType.CDATA?t.textContent===r.textContent:t.type===e.NodeType.Element&&(t.tagName===r.tagName&&JSON.stringify(t.attributes)===JSON.stringify(r.attributes)&&t.isSVG===r.isSVG&&t.needBlock===r.needBlock))}var f,m,h=1,v=new RegExp("[^a-z0-9-_:]");function y(){return h++}var g=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,T=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,b=/^(data:)([^,]*),(.*)/i;function k(e,t){return(e||"").replace(g,(function(e,r,n,a,o,i){var s,c=n||o||i,l=r||a||"";if(!c)return e;if(!T.test(c))return"url(".concat(l).concat(c).concat(l,")");if(b.test(c))return"url(".concat(l).concat(c).concat(l,")");if("/"===c[0])return"url(".concat(l).concat((s=t,(s.indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+c)).concat(l,")");var u=t.split("/"),d=c.split("/");u.pop();for(var p=0,f=d;p<f.length;p++){var m=f[p];"."!==m&&(".."===m?u.pop():u.push(m))}return"url(".concat(l).concat(u.join("/")).concat(l,")")}))}var N=/^[^ \t\n\r\u000c]+/,S=/^[, \t\n\r\u000c]+/;function C(e,t){if(!t||""===t.trim())return t;var r=e.createElement("a");return r.href=t,r.href}function w(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function x(){var e=document.createElement("a");return e.href="",e.href}function I(e,t,r,n){return"src"===r||"href"===r&&n&&("use"!==t||"#"!==n[0])||"xlink:href"===r&&n&&"#"!==n[0]?C(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,a=e.exec(t.substring(r));return a?(n=a[0],r+=n.length,n):""}for(var a=[];n(S),!(r>=t.length);){var o=n(N);if(","===o.slice(-1))o=C(e,o.substring(0,o.length-1)),a.push(o);else{var i="";o=C(e,o);for(var s=!1;;){var c=t.charAt(r);if(""===c){a.push((o+i).trim());break}if(s)")"===c&&(s=!1);else{if(","===c){r+=1,a.push((o+i).trim());break}"("===c&&(s=!0)}i+=c,r+=1}}}return a.join(", ")}(e,n):"style"===r&&n?k(n,x()):"object"===t&&"data"===r&&n?C(e,n):n:C(e,n)}function E(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&E(e.parentNode,t,r);for(var n=e.classList.length;n--;){var a=e.classList[n];if(t.test(a))return!0}return!!r&&E(e.parentNode,t,r)}function M(e,t,r){var n=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===n)return!1;if("string"==typeof t){if(n.classList.contains(t))return!0;if(n.closest(".".concat(t)))return!0}else if(E(n,t,!0))return!0;if(r){if(n.matches(r))return!0;if(n.closest(r))return!0}return!1}function L(t,r){var n=r.doc,a=r.mirror,i=r.blockClass,s=r.blockSelector,c=r.maskTextClass,u=r.maskTextSelector,p=r.inlineStylesheet,h=r.maskInputOptions,y=void 0===h?{}:h,g=r.maskTextFn,T=r.maskInputFn,b=r.dataURLOptions,N=void 0===b?{}:b,S=r.inlineImages,C=r.recordCanvas,E=r.keepIframeSrcFn,L=r.newlyAddedElement,O=void 0!==L&&L,D=function(e,t){if(!t.hasNode(e))return;var r=t.getId(e);return 1===r?void 0:r}(n,a);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:e.NodeType.Document,childNodes:[],compatMode:t.compatMode}:{type:e.NodeType.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:e.NodeType.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:D};case t.ELEMENT_NODE:return function(t,r){for(var n=r.doc,a=r.blockClass,i=r.blockSelector,s=r.inlineStylesheet,c=r.maskInputOptions,u=void 0===c?{}:c,p=r.maskInputFn,h=r.dataURLOptions,y=void 0===h?{}:h,g=r.inlineImages,T=r.recordCanvas,b=r.keepIframeSrcFn,N=r.newlyAddedElement,S=void 0!==N&&N,C=r.rootId,E=function(e,t,r){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var n=e.classList.length;n--;){var a=e.classList[n];if(t.test(a))return!0}return!!r&&e.matches(r)}(t,a,i),M=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return v.test(t)?"div":t}(t),L={},O=t.attributes.length,D=0;D<O;D++){var _=t.attributes[D];L[_.name]=I(n,M,_.name,_.value)}if("link"===M&&s){var R=Array.from(n.styleSheets).find((function(e){return e.href===t.href})),A=null;R&&(A=o(R)),A&&(delete L.rel,delete L.href,L._cssText=k(A,R.href))}if("style"===M&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){(A=o(t.sheet))&&(L._cssText=k(A,x()))}if("input"===M||"textarea"===M||"select"===M){var F=t.value,U=t.checked;"radio"!==L.type&&"checkbox"!==L.type&&"submit"!==L.type&&"button"!==L.type&&F?L.value=l({type:L.type,tagName:M,value:F,maskInputOptions:u,maskInputFn:p}):U&&(L.checked=U)}"option"===M&&(t.selected&&!u.select?L.selected=!0:delete L.selected);if("canvas"===M&&T)if("2d"===t.__context)d(t)||(L.rr_dataURL=t.toDataURL(y.type,y.quality));else if(!("__context"in t)){var W=t.toDataURL(y.type,y.quality),j=document.createElement("canvas");j.width=t.width,j.height=t.height,W!==j.toDataURL(y.type,y.quality)&&(L.rr_dataURL=W)}if("img"===M&&g){f||(f=n.createElement("canvas"),m=f.getContext("2d"));var B=t,P=B.crossOrigin;B.crossOrigin="anonymous";var G=function(){try{f.width=B.naturalWidth,f.height=B.naturalHeight,m.drawImage(B,0,0),L.rr_dataURL=f.toDataURL(y.type,y.quality)}catch(e){console.warn("Cannot inline img src=".concat(B.currentSrc,"! Error: ").concat(e))}P?L.crossOrigin=P:B.removeAttribute("crossorigin")};B.complete&&0!==B.naturalWidth?G():B.onload=G}"audio"!==M&&"video"!==M||(L.rr_mediaState=t.paused?"paused":"played",L.rr_mediaCurrentTime=t.currentTime);S||(t.scrollLeft&&(L.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(L.rr_scrollTop=t.scrollTop));if(E){var H=t.getBoundingClientRect(),z=H.width,V=H.height;L={class:L.class,rr_width:"".concat(z,"px"),rr_height:"".concat(V,"px")}}"iframe"!==M||b(L.src)||(t.contentDocument||(L.rr_src=L.src),delete L.src);return{type:e.NodeType.Element,tagName:M,attributes:L,childNodes:[],isSVG:w(t)||void 0,needBlock:E,rootId:C}}(t,{doc:n,blockClass:i,blockSelector:s,inlineStylesheet:p,maskInputOptions:y,maskInputFn:T,dataURLOptions:N,inlineImages:S,recordCanvas:C,keepIframeSrcFn:E,newlyAddedElement:O,rootId:D});case t.TEXT_NODE:return function(t,r){var n,a=r.maskTextClass,o=r.maskTextSelector,i=r.maskTextFn,s=r.rootId,c=t.parentNode&&t.parentNode.tagName,l=t.textContent,u="STYLE"===c||void 0,d="SCRIPT"===c||void 0;if(u&&l){try{t.nextSibling||t.previousSibling||(null===(n=t.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(l=(p=t.parentNode.sheet).cssRules?Array.from(p.cssRules).map((function(e){return e.cssText||""})).join(""):"")}catch(e){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(e),t)}l=k(l,x())}var p;d&&(l="SCRIPT_PLACEHOLDER");!u&&!d&&l&&M(t,a,o)&&(l=i?i(l):l.replace(/[\S]/g,"*"));return{type:e.NodeType.Text,textContent:l||"",isStyle:u,rootId:s}}(t,{maskTextClass:c,maskTextSelector:u,maskTextFn:g,rootId:D});case t.CDATA_SECTION_NODE:return{type:e.NodeType.CDATA,textContent:"",rootId:D};case t.COMMENT_NODE:return{type:e.NodeType.Comment,textContent:t.textContent||"",rootId:D};default:return!1}}function O(e){return void 0===e?"":e.toLowerCase()}function D(t,o){var i,s=o.doc,c=o.mirror,l=o.blockClass,u=o.blockSelector,d=o.maskTextClass,p=o.maskTextSelector,f=o.skipChild,m=void 0!==f&&f,h=o.inlineStylesheet,v=void 0===h||h,g=o.maskInputOptions,T=void 0===g?{}:g,b=o.maskTextFn,k=o.maskInputFn,N=o.slimDOMOptions,S=o.dataURLOptions,C=void 0===S?{}:S,w=o.inlineImages,x=void 0!==w&&w,I=o.recordCanvas,E=void 0!==I&&I,M=o.onSerialize,_=o.onIframeLoad,R=o.iframeLoadTimeout,A=void 0===R?5e3:R,F=o.onStylesheetLoad,U=o.stylesheetLoadTimeout,W=void 0===U?5e3:U,j=o.keepIframeSrcFn,B=void 0===j?function(){return!1}:j,P=o.newlyAddedElement,G=void 0!==P&&P,H=o.preserveWhiteSpace,z=void 0===H||H,V=L(t,{doc:s,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:p,inlineStylesheet:v,maskInputOptions:T,maskTextFn:b,maskInputFn:k,dataURLOptions:C,inlineImages:x,recordCanvas:E,keepIframeSrcFn:B,newlyAddedElement:G});if(!V)return console.warn(t,"not serialized"),null;i=c.hasNode(t)?c.getId(t):!function(t,r){if(r.comment&&t.type===e.NodeType.Comment)return!0;if(t.type===e.NodeType.Element){if(r.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")))return!0;if(r.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(O(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===O(t.attributes.name)||"icon"===O(t.attributes.rel)||"apple-touch-icon"===O(t.attributes.rel)||"shortcut icon"===O(t.attributes.rel))))return!0;if("meta"===t.tagName){if(r.headMetaDescKeywords&&O(t.attributes.name).match(/^description|keywords$/))return!0;if(r.headMetaSocial&&(O(t.attributes.property).match(/^(og|twitter|fb):/)||O(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===O(t.attributes.name)))return!0;if(r.headMetaRobots&&("robots"===O(t.attributes.name)||"googlebot"===O(t.attributes.name)||"bingbot"===O(t.attributes.name)))return!0;if(r.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(r.headMetaAuthorship&&("author"===O(t.attributes.name)||"generator"===O(t.attributes.name)||"framework"===O(t.attributes.name)||"publisher"===O(t.attributes.name)||"progid"===O(t.attributes.name)||O(t.attributes.property).match(/^article:/)||O(t.attributes.property).match(/^product:/)))return!0;if(r.headMetaVerification&&("google-site-verification"===O(t.attributes.name)||"yandex-verification"===O(t.attributes.name)||"csrf-token"===O(t.attributes.name)||"p:domain_verify"===O(t.attributes.name)||"verify-v1"===O(t.attributes.name)||"verification"===O(t.attributes.name)||"shopify-checkout-api-token"===O(t.attributes.name)))return!0}}return!1}(V,N)&&(z||V.type!==e.NodeType.Text||V.isStyle||V.textContent.replace(/^\s+|\s+$/gm,"").length)?y():-2;var q=Object.assign(V,{id:i});if(c.add(t,q),-2===i)return null;M&&M(t);var $=!m;if(q.type===e.NodeType.Element){$=$&&!q.needBlock,delete q.needBlock;var Y=t.shadowRoot;Y&&a(Y)&&(q.isShadowHost=!0)}if((q.type===e.NodeType.Document||q.type===e.NodeType.Element)&&$){N.headWhitespace&&q.type===e.NodeType.Element&&"head"===q.tagName&&(z=!1);for(var X={doc:s,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:p,skipChild:m,inlineStylesheet:v,maskInputOptions:T,maskTextFn:b,maskInputFn:k,slimDOMOptions:N,dataURLOptions:C,inlineImages:x,recordCanvas:E,preserveWhiteSpace:z,onSerialize:M,onIframeLoad:_,iframeLoadTimeout:A,onStylesheetLoad:F,stylesheetLoadTimeout:W,keepIframeSrcFn:B},J=0,K=Array.from(t.childNodes);J<K.length;J++){(ee=D(K[J],X))&&q.childNodes.push(ee)}if(r(t)&&t.shadowRoot)for(var Z=0,Q=Array.from(t.shadowRoot.childNodes);Z<Q.length;Z++){var ee;(ee=D(Q[Z],X))&&(a(t.shadowRoot)&&(ee.isShadow=!0),q.childNodes.push(ee))}}return t.parentNode&&n(t.parentNode)&&a(t.parentNode)&&(q.isShadow=!0),q.type===e.NodeType.Element&&"iframe"===q.tagName&&function(e,t,r){var n=e.contentWindow;if(n){var a,o=!1;try{a=n.document.readyState}catch(e){return}if("complete"===a){var i="about:blank";if(n.location.href!==i||e.src===i||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var s=setTimeout((function(){o||(t(),o=!0)}),r);e.addEventListener("load",(function(){clearTimeout(s),o=!0,t()}))}}}(t,(function(){var e=t.contentDocument;if(e&&_){var r=D(e,{doc:e,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:p,skipChild:!1,inlineStylesheet:v,maskInputOptions:T,maskTextFn:b,maskInputFn:k,slimDOMOptions:N,dataURLOptions:C,inlineImages:x,recordCanvas:E,preserveWhiteSpace:z,onSerialize:M,onIframeLoad:_,iframeLoadTimeout:A,onStylesheetLoad:F,stylesheetLoadTimeout:W,keepIframeSrcFn:B});r&&_(t,r)}}),A),q.type===e.NodeType.Element&&"link"===q.tagName&&"stylesheet"===q.attributes.rel&&function(e,t,r){var n,a=!1;try{n=e.sheet}catch(e){return}if(!n){var o=setTimeout((function(){a||(t(),a=!0)}),r);e.addEventListener("load",(function(){clearTimeout(o),a=!0,t()}))}}(t,(function(){if(F){var e=D(t,{doc:s,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:p,skipChild:!1,inlineStylesheet:v,maskInputOptions:T,maskTextFn:b,maskInputFn:k,slimDOMOptions:N,dataURLOptions:C,inlineImages:x,recordCanvas:E,preserveWhiteSpace:z,onSerialize:M,onIframeLoad:_,iframeLoadTimeout:A,onStylesheetLoad:F,stylesheetLoadTimeout:W,keepIframeSrcFn:B});e&&F(t,e)}}),W),q}var _=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function R(e,t){void 0===t&&(t={});var r=1,n=1;function a(e){var t=e.match(/\n/g);t&&(r+=t.length);var a=e.lastIndexOf("\n");n=-1===a?n+e.length:e.length-a}function o(){var e={line:r,column:n};return function(t){return t.position=new i(e),f(),t}}var i=function(e){this.start=e,this.end={line:r,column:n},this.source=t.source};i.prototype.content=e;var s=[];function c(a){var o=new Error("".concat(t.source||"",":").concat(r,":").concat(n,": ").concat(a));if(o.reason=a,o.filename=t.source,o.line=r,o.column=n,o.source=e,!t.silent)throw o;s.push(o)}function l(){return p(/^{\s*/)}function u(){return p(/^}/)}function d(){var t,r=[];for(f(),m(r);e.length&&"}"!==e.charAt(0)&&(t=w()||x());)!1!==t&&(r.push(t),m(r));return r}function p(t){var r=t.exec(e);if(r){var n=r[0];return a(n),e=e.slice(n.length),r}}function f(){p(/^\s*/)}function m(e){var t;for(void 0===e&&(e=[]);t=h();)!1!==t&&e.push(t),t=h();return e}function h(){var t=o();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var r=2;""!==e.charAt(r)&&("*"!==e.charAt(r)||"/"!==e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return c("End of comment missing");var i=e.slice(2,r-2);return n+=2,a(i),e=e.slice(r),n+=2,t({type:"comment",comment:i})}}function v(){var e=p(/^([^{]+)/);if(e)return A(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function y(){var e=o(),t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var r=A(t[0]);if(!p(/^:\s*/))return c("property missing ':'");var n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),a=e({type:"declaration",property:r.replace(_,""),value:n?A(n[0]).replace(_,""):""});return p(/^[;\s]*/),a}}function g(){var e,t=[];if(!l())return c("missing '{'");for(m(t);e=y();)!1!==e&&(t.push(e),m(t)),e=y();return u()?t:c("missing '}'")}function T(){for(var e,t=[],r=o();e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return r({type:"keyframe",values:t,declarations:g()})}var b,k=C("import"),N=C("charset"),S=C("namespace");function C(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var r=o(),n=p(t);if(n){var a={type:e};return a[e]=n[1].trim(),r(a)}}}function w(){if("@"===e[0])return function(){var e=o(),t=p(/^@([-\w]+)?keyframes\s*/);if(t){var r=t[1];if(!(t=p(/^([-\w]+)\s*/)))return c("@keyframes missing name");var n,a=t[1];if(!l())return c("@keyframes missing '{'");for(var i=m();n=T();)i.push(n),i=i.concat(m());return u()?e({type:"keyframes",name:a,vendor:r,keyframes:i}):c("@keyframes missing '}'")}}()||function(){var e=o(),t=p(/^@media *([^{]+)/);if(t){var r=A(t[1]);if(!l())return c("@media missing '{'");var n=m().concat(d());return u()?e({type:"media",media:r,rules:n}):c("@media missing '}'")}}()||function(){var e=o(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:A(t[1]),media:A(t[2])})}()||function(){var e=o(),t=p(/^@supports *([^{]+)/);if(t){var r=A(t[1]);if(!l())return c("@supports missing '{'");var n=m().concat(d());return u()?e({type:"supports",supports:r,rules:n}):c("@supports missing '}'")}}()||k()||N()||S()||function(){var e=o(),t=p(/^@([-\w]+)?document *([^{]+)/);if(t){var r=A(t[1]),n=A(t[2]);if(!l())return c("@document missing '{'");var a=m().concat(d());return u()?e({type:"document",document:n,vendor:r,rules:a}):c("@document missing '}'")}}()||function(){var e=o();if(p(/^@page */)){var t=v()||[];if(!l())return c("@page missing '{'");for(var r,n=m();r=y();)n.push(r),n=n.concat(m());return u()?e({type:"page",selectors:t,declarations:n}):c("@page missing '}'")}}()||function(){var e=o();if(p(/^@host\s*/)){if(!l())return c("@host missing '{'");var t=m().concat(d());return u()?e({type:"host",rules:t}):c("@host missing '}'")}}()||function(){var e=o();if(p(/^@font-face\s*/)){if(!l())return c("@font-face missing '{'");for(var t,r=m();t=y();)r.push(t),r=r.concat(m());return u()?e({type:"font-face",declarations:r}):c("@font-face missing '}'")}}()}function x(){var e=o(),t=v();return t?(m(),e({type:"rule",selectors:t,declarations:g()})):c("selector missing")}return F((b=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:b,parsingErrors:s}}))}function A(e){return e?e.replace(/^\s+|\s+$/g,""):""}function F(e,t){for(var r=e&&"string"==typeof e.type,n=r?e:t,a=0,o=Object.keys(e);a<o.length;a++){var i=e[o[a]];Array.isArray(i)?i.forEach((function(e){F(e,n)})):i&&"object"==typeof i&&F(i,n)}return r&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var U={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};var W=/([^\\]):hover/,j=new RegExp(W.source,"g");function B(e,t){var r=null==t?void 0:t.stylesWithHoverClass.get(e);if(r)return r;var n=R(e,{silent:!0});if(!n.stylesheet)return e;var a=[];if(n.stylesheet.rules.forEach((function(e){"selectors"in e&&(e.selectors||[]).forEach((function(e){W.test(e)&&a.push(e)}))})),0===a.length)return e;var o=new RegExp(a.filter((function(e,t){return a.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join("|"),"g"),i=e.replace(o,(function(e){var t=e.replace(j,"$1.\\:hover");return"".concat(e,", ").concat(t)}));return null==t||t.stylesWithHoverClass.set(e,i),i}function P(t,r){var n=r.doc,a=r.hackCss,o=r.cache;switch(t.type){case e.NodeType.Document:return n.implementation.createDocument(null,"",null);case e.NodeType.DocumentType:return n.implementation.createDocumentType(t.name||"html",t.publicId,t.systemId);case e.NodeType.Element:var i,s=function(e){var t=U[e.tagName]?U[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(t);i=t.isSVG?n.createElementNS("http://www.w3.org/2000/svg",s):n.createElement(s);var c={};for(var l in t.attributes)if(Object.prototype.hasOwnProperty.call(t.attributes,l)){var u=t.attributes[l];if("option"!==s||"selected"!==l||!1!==u)if(!0===u&&(u=""),l.startsWith("rr_"))c[l]=u;else{var d="textarea"===s&&"value"===l,p="style"===s&&"_cssText"===l;if(p&&a&&"string"==typeof u&&(u=B(u,o)),!d&&!p||"string"!=typeof u)try{if(t.isSVG&&"xlink:href"===l)i.setAttributeNS("http://www.w3.org/1999/xlink",l,u.toString());else if("onload"===l||"onclick"===l||"onmouse"===l.substring(0,7))i.setAttribute("_"+l,u.toString());else{if("meta"===s&&"Content-Security-Policy"===t.attributes["http-equiv"]&&"content"===l){i.setAttribute("csp-content",u.toString());continue}("link"!==s||"preload"!==t.attributes.rel&&"modulepreload"!==t.attributes.rel||"script"!==t.attributes.as)&&("link"===s&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js")||("img"===s&&t.attributes.srcset&&t.attributes.rr_dataURL?i.setAttribute("rrweb-original-srcset",t.attributes.srcset):i.setAttribute(l,u.toString())))}}catch(e){}else{for(var f=n.createTextNode(u),m=0,h=Array.from(i.childNodes);m<h.length;m++){var v=h[m];v.nodeType===i.TEXT_NODE&&i.removeChild(v)}i.appendChild(f)}}}var y=function(e){var r=c[e];if("canvas"===s&&"rr_dataURL"===e){var n=document.createElement("img");n.onload=function(){var e=i.getContext("2d");e&&e.drawImage(n,0,0,n.width,n.height)},n.src=r.toString(),i.RRNodeType&&(i.rr_dataURL=r.toString())}else if("img"===s&&"rr_dataURL"===e){var a=i;a.currentSrc.startsWith("data:")||(a.setAttribute("rrweb-original-src",t.attributes.src),a.src=r.toString())}if("rr_width"===e)i.style.width=r.toString();else if("rr_height"===e)i.style.height=r.toString();else if("rr_mediaCurrentTime"===e&&"number"==typeof r)i.currentTime=r;else if("rr_mediaState"===e)switch(r){case"played":i.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":i.pause()}};for(var g in c)y(g);if(t.isShadowHost)if(i.shadowRoot)for(;i.shadowRoot.firstChild;)i.shadowRoot.removeChild(i.shadowRoot.firstChild);else i.attachShadow({mode:"open"});return i;case e.NodeType.Text:return n.createTextNode(t.isStyle&&a?B(t.textContent,o):t.textContent);case e.NodeType.CDATA:return n.createCDATASection(t.textContent);case e.NodeType.Comment:return n.createComment(t.textContent);default:return null}}function G(t,n){var a=n.doc,o=n.mirror,i=n.skipChild,s=void 0!==i&&i,c=n.hackCss,l=void 0===c||c,u=n.afterAppend,d=n.cache;if(o.has(t.id)){var f=o.getNode(t.id);if(p(o.getMeta(f),t))return o.getNode(t.id)}var m=P(t,{doc:a,hackCss:l,cache:d});if(!m)return null;if(t.rootId&&o.getNode(t.rootId)!==a&&o.replace(t.rootId,a),t.type===e.NodeType.Document&&(a.close(),a.open(),"BackCompat"===t.compatMode&&t.childNodes&&t.childNodes[0].type!==e.NodeType.DocumentType&&(t.childNodes[0].type===e.NodeType.Element&&"xmlns"in t.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===t.childNodes[0].attributes.xmlns?a.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):a.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),m=a),o.add(m,t),(t.type===e.NodeType.Document||t.type===e.NodeType.Element)&&!s)for(var h=0,v=t.childNodes;h<v.length;h++){var y=v[h],g=G(y,{doc:a,mirror:o,skipChild:!1,hackCss:l,afterAppend:u,cache:d});g?(y.isShadow&&r(m)&&m.shadowRoot?m.shadowRoot.appendChild(g):m.appendChild(g),u&&u(g,y.id)):console.warn("Failed to rebuild",y)}return m}return e.IGNORED_NODE=-2,e.Mirror=c,e.addHoverClass=B,e.buildNodeWithSN=G,e.classMatchesRegex=E,e.cleanupSnapshot=function(){h=1},e.createCache=function(){return{stylesWithHoverClass:new Map}},e.createMirror=function(){return new c},e.genId=y,e.getCssRuleString=i,e.getCssRulesString=o,e.is2DCanvasBlank=d,e.isCSSImportRule=s,e.isElement=r,e.isNativeShadowDom=a,e.isNodeMetaEqual=p,e.isShadowRoot=n,e.maskInputValue=l,e.needMaskingText=M,e.rebuild=function(t,r){var n=r.doc,a=r.onVisit,o=r.hackCss,i=void 0===o||o,s=r.afterAppend,l=r.cache,u=r.mirror,d=void 0===u?new c:u,p=G(t,{doc:n,mirror:d,skipChild:!1,hackCss:i,afterAppend:s,cache:l});return function(e,t){for(var r=0,n=e.getIds();r<n.length;r++){var a=n[r];e.has(a)&&t(e.getNode(a))}}(d,(function(t){a&&a(t),function(t,r){var n=r.getMeta(t);if((null==n?void 0:n.type)===e.NodeType.Element){var a=t;for(var o in n.attributes)if(Object.prototype.hasOwnProperty.call(n.attributes,o)&&o.startsWith("rr_")){var i=n.attributes[o];"rr_scrollLeft"===o&&(a.scrollLeft=i),"rr_scrollTop"===o&&(a.scrollTop=i)}}}(t,d)})),p},e.serializeNodeWithId=D,e.snapshot=function(e,t){var r=t||{},n=r.mirror,a=void 0===n?new c:n,o=r.blockClass,i=void 0===o?"rr-block":o,s=r.blockSelector,l=void 0===s?null:s,u=r.maskTextClass,d=void 0===u?"rr-mask":u,p=r.maskTextSelector,f=void 0===p?null:p,m=r.inlineStylesheet,h=void 0===m||m,v=r.inlineImages,y=void 0!==v&&v,g=r.recordCanvas,T=void 0!==g&&g,b=r.maskAllInputs,k=void 0!==b&&b,N=r.maskTextFn,S=r.maskInputFn,C=r.slimDOM,w=void 0!==C&&C,x=r.dataURLOptions,I=r.preserveWhiteSpace,E=r.onSerialize,M=r.onIframeLoad,L=r.iframeLoadTimeout,O=r.onStylesheetLoad,_=r.stylesheetLoadTimeout,R=r.keepIframeSrcFn;return D(e,{doc:e,mirror:a,blockClass:i,blockSelector:l,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:h,maskInputOptions:!0===k?{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===k?{password:!0}:k,maskTextFn:N,maskInputFn:S,slimDOMOptions:!0===w||"all"===w?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===w,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===w?{}:w,dataURLOptions:x,inlineImages:y,recordCanvas:T,preserveWhiteSpace:I,onSerialize:E,onIframeLoad:M,iframeLoadTimeout:L,onStylesheetLoad:O,stylesheetLoadTimeout:_,keepIframeSrcFn:void 0===R?function(){return!1}:R,newlyAddedElement:!1})},e.transformAttribute=I,e.visitSnapshot=function(t,r){!function t(n){r(n),n.type!==e.NodeType.Document&&n.type!==e.NodeType.Element||n.childNodes.forEach(t)}(t)},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
var rrwebSnapshot=function(e){"use strict";var t;function r(e){return e.nodeType===e.ELEMENT_NODE}function n(e){var t=null==e?void 0:e.host;return Boolean((null==t?void 0:t.shadowRoot)===e)}function a(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function o(e){try{var t=e.rules||e.cssRules;return t?((r=Array.from(t).map(i).join("")).includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")&&(r=r.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),r):null}catch(e){return null}var r}function i(e){var t=e.cssText;if(s(e))try{t=o(e.styleSheet)||t}catch(e){}return t}function s(e){return"styleSheet"in e}e.NodeType=void 0,(t=e.NodeType||(e.NodeType={}))[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment";var c=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(e){var t;if(!e)return-1;var r=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=r?r:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,r=this.getId(e);this.idNodeMap.delete(r),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var r=this.getNode(e);if(r){var n=this.nodeMetaMap.get(r);n&&this.nodeMetaMap.set(t,n)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function l(e){var t=e.maskInputOptions,r=e.tagName,n=e.type,a=e.value,o=e.maskInputFn,i=a||"";return(t[r.toLowerCase()]||t[n])&&(i=o?o(i):"*".repeat(i.length)),i}var u="__rrweb_original__";function d(e){var t=e.getContext("2d");if(!t)return!0;for(var r=0;r<e.width;r+=50)for(var n=0;n<e.height;n+=50){var a=t.getImageData,o=u in a?a.__rrweb_original__:a;if(new Uint32Array(o.call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer).some((function(e){return 0!==e})))return!1}return!0}function p(t,r){return!(!t||!r||t.type!==r.type)&&(t.type===e.NodeType.Document?t.compatMode===r.compatMode:t.type===e.NodeType.DocumentType?t.name===r.name&&t.publicId===r.publicId&&t.systemId===r.systemId:t.type===e.NodeType.Comment||t.type===e.NodeType.Text||t.type===e.NodeType.CDATA?t.textContent===r.textContent:t.type===e.NodeType.Element&&(t.tagName===r.tagName&&JSON.stringify(t.attributes)===JSON.stringify(r.attributes)&&t.isSVG===r.isSVG&&t.needBlock===r.needBlock))}var f,m,h=1,v=new RegExp("[^a-z0-9-_:]");function y(){return h++}var g=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,T=/^(?:[a-z+]+:)?\/\//i,b=/^www\..*/i,k=/^(data:)([^,]*),(.*)/i;function N(e,t){return(e||"").replace(g,(function(e,r,n,a,o,i){var s,c=n||o||i,l=r||a||"";if(!c)return e;if(T.test(c)||b.test(c))return"url(".concat(l).concat(c).concat(l,")");if(k.test(c))return"url(".concat(l).concat(c).concat(l,")");if("/"===c[0])return"url(".concat(l).concat((s=t,(s.indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+c)).concat(l,")");var u=t.split("/"),d=c.split("/");u.pop();for(var p=0,f=d;p<f.length;p++){var m=f[p];"."!==m&&(".."===m?u.pop():u.push(m))}return"url(".concat(l).concat(u.join("/")).concat(l,")")}))}var C=/^[^ \t\n\r\u000c]+/,S=/^[, \t\n\r\u000c]+/;function w(e,t){if(!t||""===t.trim())return t;var r=e.createElement("a");return r.href=t,r.href}function x(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function I(){var e=document.createElement("a");return e.href="",e.href}function E(e,t,r,n){return n?"src"===r||"href"===r&&("use"!==t||"#"!==n[0])||"xlink:href"===r&&"#"!==n[0]?w(e,n):"background"!==r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r?function(e,t){if(""===t.trim())return t;var r=0;function n(e){var n,a=e.exec(t.substring(r));return a?(n=a[0],r+=n.length,n):""}for(var a=[];n(S),!(r>=t.length);){var o=n(C);if(","===o.slice(-1))o=w(e,o.substring(0,o.length-1)),a.push(o);else{var i="";o=w(e,o);for(var s=!1;;){var c=t.charAt(r);if(""===c){a.push((o+i).trim());break}if(s)")"===c&&(s=!1);else{if(","===c){r+=1,a.push((o+i).trim());break}"("===c&&(s=!0)}i+=c,r+=1}}}return a.join(", ")}(e,n):"style"===r?N(n,I()):"object"===t&&"data"===r?w(e,n):n:w(e,n):n}function M(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function L(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&L(e.parentNode,t,r);for(var n=e.classList.length;n--;){var a=e.classList[n];if(t.test(a))return!0}return!!r&&L(e.parentNode,t,r)}function O(e,t,r){var n=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===n)return!1;if("string"==typeof t){if(n.classList.contains(t))return!0;if(n.closest(".".concat(t)))return!0}else if(L(n,t,!0))return!0;if(r){if(n.matches(r))return!0;if(n.closest(r))return!0}return!1}function D(t,r){var n=r.doc,a=r.mirror,i=r.blockClass,s=r.blockSelector,c=r.maskTextClass,u=r.maskTextSelector,p=r.inlineStylesheet,h=r.maskInputOptions,y=void 0===h?{}:h,g=r.maskTextFn,T=r.maskInputFn,b=r.dataURLOptions,k=void 0===b?{}:b,C=r.inlineImages,S=r.recordCanvas,w=r.keepIframeSrcFn,L=r.newlyAddedElement,D=void 0!==L&&L,_=function(e,t){if(!t.hasNode(e))return;var r=t.getId(e);return 1===r?void 0:r}(n,a);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:e.NodeType.Document,childNodes:[],compatMode:t.compatMode}:{type:e.NodeType.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:e.NodeType.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:_};case t.ELEMENT_NODE:return function(t,r){for(var n=r.doc,a=r.blockClass,i=r.blockSelector,s=r.inlineStylesheet,c=r.maskInputOptions,u=void 0===c?{}:c,p=r.maskInputFn,h=r.dataURLOptions,y=void 0===h?{}:h,g=r.inlineImages,T=r.recordCanvas,b=r.keepIframeSrcFn,k=r.newlyAddedElement,C=void 0!==k&&k,S=r.rootId,w=function(e,t,r){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var n=e.classList.length;n--;){var a=e.classList[n];if(t.test(a))return!0}return!!r&&e.matches(r)}(t,a,i),L=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return v.test(t)?"div":t}(t),O={},D=t.attributes.length,_=0;_<D;_++){var R=t.attributes[_];M(L,R.name,R.value)||(O[R.name]=E(n,L,R.name,R.value))}if("link"===L&&s){var A=Array.from(n.styleSheets).find((function(e){return e.href===t.href})),F=null;A&&(F=o(A)),F&&(delete O.rel,delete O.href,O._cssText=N(F,A.href))}if("style"===L&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){(F=o(t.sheet))&&(O._cssText=N(F,I()))}if("input"===L||"textarea"===L||"select"===L){var U=t.value,W=t.checked;"radio"!==O.type&&"checkbox"!==O.type&&"submit"!==O.type&&"button"!==O.type&&U?O.value=l({type:O.type,tagName:L,value:U,maskInputOptions:u,maskInputFn:p}):W&&(O.checked=W)}"option"===L&&(t.selected&&!u.select?O.selected=!0:delete O.selected);if("canvas"===L&&T)if("2d"===t.__context)d(t)||(O.rr_dataURL=t.toDataURL(y.type,y.quality));else if(!("__context"in t)){var j=t.toDataURL(y.type,y.quality),B=document.createElement("canvas");B.width=t.width,B.height=t.height,j!==B.toDataURL(y.type,y.quality)&&(O.rr_dataURL=j)}if("img"===L&&g){f||(f=n.createElement("canvas"),m=f.getContext("2d"));var P=t,G=P.crossOrigin;P.crossOrigin="anonymous";var H=function(){try{f.width=P.naturalWidth,f.height=P.naturalHeight,m.drawImage(P,0,0),O.rr_dataURL=f.toDataURL(y.type,y.quality)}catch(e){console.warn("Cannot inline img src=".concat(P.currentSrc,"! Error: ").concat(e))}G?O.crossOrigin=G:P.removeAttribute("crossorigin")};P.complete&&0!==P.naturalWidth?H():P.onload=H}"audio"!==L&&"video"!==L||(O.rr_mediaState=t.paused?"paused":"played",O.rr_mediaCurrentTime=t.currentTime);C||(t.scrollLeft&&(O.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(O.rr_scrollTop=t.scrollTop));if(w){var z=t.getBoundingClientRect(),V=z.width,q=z.height;O={class:O.class,rr_width:"".concat(V,"px"),rr_height:"".concat(q,"px")}}"iframe"!==L||b(O.src)||(t.contentDocument||(O.rr_src=O.src),delete O.src);return{type:e.NodeType.Element,tagName:L,attributes:O,childNodes:[],isSVG:x(t)||void 0,needBlock:w,rootId:S}}(t,{doc:n,blockClass:i,blockSelector:s,inlineStylesheet:p,maskInputOptions:y,maskInputFn:T,dataURLOptions:k,inlineImages:C,recordCanvas:S,keepIframeSrcFn:w,newlyAddedElement:D,rootId:_});case t.TEXT_NODE:return function(t,r){var n,a=r.maskTextClass,o=r.maskTextSelector,i=r.maskTextFn,s=r.rootId,c=t.parentNode&&t.parentNode.tagName,l=t.textContent,u="STYLE"===c||void 0,d="SCRIPT"===c||void 0;if(u&&l){try{t.nextSibling||t.previousSibling||(null===(n=t.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(l=(p=t.parentNode.sheet).cssRules?Array.from(p.cssRules).map((function(e){return e.cssText||""})).join(""):"")}catch(e){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(e),t)}l=N(l,I())}var p;d&&(l="SCRIPT_PLACEHOLDER");!u&&!d&&l&&O(t,a,o)&&(l=i?i(l):l.replace(/[\S]/g,"*"));return{type:e.NodeType.Text,textContent:l||"",isStyle:u,rootId:s}}(t,{maskTextClass:c,maskTextSelector:u,maskTextFn:g,rootId:_});case t.CDATA_SECTION_NODE:return{type:e.NodeType.CDATA,textContent:"",rootId:_};case t.COMMENT_NODE:return{type:e.NodeType.Comment,textContent:t.textContent||"",rootId:_};default:return!1}}function _(e){return null==e?"":e.toLowerCase()}function R(t,o){var i,s=o.doc,c=o.mirror,l=o.blockClass,u=o.blockSelector,d=o.maskTextClass,p=o.maskTextSelector,f=o.skipChild,m=void 0!==f&&f,h=o.inlineStylesheet,v=void 0===h||h,g=o.maskInputOptions,T=void 0===g?{}:g,b=o.maskTextFn,k=o.maskInputFn,N=o.slimDOMOptions,C=o.dataURLOptions,S=void 0===C?{}:C,w=o.inlineImages,x=void 0!==w&&w,I=o.recordCanvas,E=void 0!==I&&I,M=o.onSerialize,L=o.onIframeLoad,O=o.iframeLoadTimeout,A=void 0===O?5e3:O,F=o.onStylesheetLoad,U=o.stylesheetLoadTimeout,W=void 0===U?5e3:U,j=o.keepIframeSrcFn,B=void 0===j?function(){return!1}:j,P=o.newlyAddedElement,G=void 0!==P&&P,H=o.preserveWhiteSpace,z=void 0===H||H,V=D(t,{doc:s,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:p,inlineStylesheet:v,maskInputOptions:T,maskTextFn:b,maskInputFn:k,dataURLOptions:S,inlineImages:x,recordCanvas:E,keepIframeSrcFn:B,newlyAddedElement:G});if(!V)return console.warn(t,"not serialized"),null;i=c.hasNode(t)?c.getId(t):!function(t,r){if(r.comment&&t.type===e.NodeType.Comment)return!0;if(t.type===e.NodeType.Element){if(r.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")))return!0;if(r.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(_(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===_(t.attributes.name)||"icon"===_(t.attributes.rel)||"apple-touch-icon"===_(t.attributes.rel)||"shortcut icon"===_(t.attributes.rel))))return!0;if("meta"===t.tagName){if(r.headMetaDescKeywords&&_(t.attributes.name).match(/^description|keywords$/))return!0;if(r.headMetaSocial&&(_(t.attributes.property).match(/^(og|twitter|fb):/)||_(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===_(t.attributes.name)))return!0;if(r.headMetaRobots&&("robots"===_(t.attributes.name)||"googlebot"===_(t.attributes.name)||"bingbot"===_(t.attributes.name)))return!0;if(r.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(r.headMetaAuthorship&&("author"===_(t.attributes.name)||"generator"===_(t.attributes.name)||"framework"===_(t.attributes.name)||"publisher"===_(t.attributes.name)||"progid"===_(t.attributes.name)||_(t.attributes.property).match(/^article:/)||_(t.attributes.property).match(/^product:/)))return!0;if(r.headMetaVerification&&("google-site-verification"===_(t.attributes.name)||"yandex-verification"===_(t.attributes.name)||"csrf-token"===_(t.attributes.name)||"p:domain_verify"===_(t.attributes.name)||"verify-v1"===_(t.attributes.name)||"verification"===_(t.attributes.name)||"shopify-checkout-api-token"===_(t.attributes.name)))return!0}}return!1}(V,N)&&(z||V.type!==e.NodeType.Text||V.isStyle||V.textContent.replace(/^\s+|\s+$/gm,"").length)?y():-2;var q=Object.assign(V,{id:i});if(c.add(t,q),-2===i)return null;M&&M(t);var $=!m;if(q.type===e.NodeType.Element){$=$&&!q.needBlock,delete q.needBlock;var Y=t.shadowRoot;Y&&a(Y)&&(q.isShadowHost=!0)}if((q.type===e.NodeType.Document||q.type===e.NodeType.Element)&&$){N.headWhitespace&&q.type===e.NodeType.Element&&"head"===q.tagName&&(z=!1);for(var X={doc:s,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:p,skipChild:m,inlineStylesheet:v,maskInputOptions:T,maskTextFn:b,maskInputFn:k,slimDOMOptions:N,dataURLOptions:S,inlineImages:x,recordCanvas:E,preserveWhiteSpace:z,onSerialize:M,onIframeLoad:L,iframeLoadTimeout:A,onStylesheetLoad:F,stylesheetLoadTimeout:W,keepIframeSrcFn:B},J=0,K=Array.from(t.childNodes);J<K.length;J++){(ee=R(K[J],X))&&q.childNodes.push(ee)}if(r(t)&&t.shadowRoot)for(var Q=0,Z=Array.from(t.shadowRoot.childNodes);Q<Z.length;Q++){var ee;(ee=R(Z[Q],X))&&(a(t.shadowRoot)&&(ee.isShadow=!0),q.childNodes.push(ee))}}return t.parentNode&&n(t.parentNode)&&a(t.parentNode)&&(q.isShadow=!0),q.type===e.NodeType.Element&&"iframe"===q.tagName&&function(e,t,r){var n=e.contentWindow;if(n){var a,o=!1;try{a=n.document.readyState}catch(e){return}if("complete"===a){var i="about:blank";if(n.location.href!==i||e.src===i||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var s=setTimeout((function(){o||(t(),o=!0)}),r);e.addEventListener("load",(function(){clearTimeout(s),o=!0,t()}))}}}(t,(function(){var e=t.contentDocument;if(e&&L){var r=R(e,{doc:e,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:p,skipChild:!1,inlineStylesheet:v,maskInputOptions:T,maskTextFn:b,maskInputFn:k,slimDOMOptions:N,dataURLOptions:S,inlineImages:x,recordCanvas:E,preserveWhiteSpace:z,onSerialize:M,onIframeLoad:L,iframeLoadTimeout:A,onStylesheetLoad:F,stylesheetLoadTimeout:W,keepIframeSrcFn:B});r&&L(t,r)}}),A),q.type===e.NodeType.Element&&"link"===q.tagName&&"stylesheet"===q.attributes.rel&&function(e,t,r){var n,a=!1;try{n=e.sheet}catch(e){return}if(!n){var o=setTimeout((function(){a||(t(),a=!0)}),r);e.addEventListener("load",(function(){clearTimeout(o),a=!0,t()}))}}(t,(function(){if(F){var e=R(t,{doc:s,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:p,skipChild:!1,inlineStylesheet:v,maskInputOptions:T,maskTextFn:b,maskInputFn:k,slimDOMOptions:N,dataURLOptions:S,inlineImages:x,recordCanvas:E,preserveWhiteSpace:z,onSerialize:M,onIframeLoad:L,iframeLoadTimeout:A,onStylesheetLoad:F,stylesheetLoadTimeout:W,keepIframeSrcFn:B});e&&F(t,e)}}),W),q}var A=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function F(e,t){void 0===t&&(t={});var r=1,n=1;function a(e){var t=e.match(/\n/g);t&&(r+=t.length);var a=e.lastIndexOf("\n");n=-1===a?n+e.length:e.length-a}function o(){var e={line:r,column:n};return function(t){return t.position=new i(e),f(),t}}var i=function(e){this.start=e,this.end={line:r,column:n},this.source=t.source};i.prototype.content=e;var s=[];function c(a){var o=new Error("".concat(t.source||"",":").concat(r,":").concat(n,": ").concat(a));if(o.reason=a,o.filename=t.source,o.line=r,o.column=n,o.source=e,!t.silent)throw o;s.push(o)}function l(){return p(/^{\s*/)}function u(){return p(/^}/)}function d(){var t,r=[];for(f(),m(r);e.length&&"}"!==e.charAt(0)&&(t=w()||x());)!1!==t&&(r.push(t),m(r));return r}function p(t){var r=t.exec(e);if(r){var n=r[0];return a(n),e=e.slice(n.length),r}}function f(){p(/^\s*/)}function m(e){var t;for(void 0===e&&(e=[]);t=h();)!1!==t&&e.push(t),t=h();return e}function h(){var t=o();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var r=2;""!==e.charAt(r)&&("*"!==e.charAt(r)||"/"!==e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return c("End of comment missing");var i=e.slice(2,r-2);return n+=2,a(i),e=e.slice(r),n+=2,t({type:"comment",comment:i})}}function v(){var e=p(/^([^{]+)/);if(e)return U(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function y(){var e=o(),t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var r=U(t[0]);if(!p(/^:\s*/))return c("property missing ':'");var n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),a=e({type:"declaration",property:r.replace(A,""),value:n?U(n[0]).replace(A,""):""});return p(/^[;\s]*/),a}}function g(){var e,t=[];if(!l())return c("missing '{'");for(m(t);e=y();)!1!==e&&(t.push(e),m(t)),e=y();return u()?t:c("missing '}'")}function T(){for(var e,t=[],r=o();e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return r({type:"keyframe",values:t,declarations:g()})}var b,k=S("import"),N=S("charset"),C=S("namespace");function S(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var r=o(),n=p(t);if(n){var a={type:e};return a[e]=n[1].trim(),r(a)}}}function w(){if("@"===e[0])return function(){var e=o(),t=p(/^@([-\w]+)?keyframes\s*/);if(t){var r=t[1];if(!(t=p(/^([-\w]+)\s*/)))return c("@keyframes missing name");var n,a=t[1];if(!l())return c("@keyframes missing '{'");for(var i=m();n=T();)i.push(n),i=i.concat(m());return u()?e({type:"keyframes",name:a,vendor:r,keyframes:i}):c("@keyframes missing '}'")}}()||function(){var e=o(),t=p(/^@media *([^{]+)/);if(t){var r=U(t[1]);if(!l())return c("@media missing '{'");var n=m().concat(d());return u()?e({type:"media",media:r,rules:n}):c("@media missing '}'")}}()||function(){var e=o(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:U(t[1]),media:U(t[2])})}()||function(){var e=o(),t=p(/^@supports *([^{]+)/);if(t){var r=U(t[1]);if(!l())return c("@supports missing '{'");var n=m().concat(d());return u()?e({type:"supports",supports:r,rules:n}):c("@supports missing '}'")}}()||k()||N()||C()||function(){var e=o(),t=p(/^@([-\w]+)?document *([^{]+)/);if(t){var r=U(t[1]),n=U(t[2]);if(!l())return c("@document missing '{'");var a=m().concat(d());return u()?e({type:"document",document:n,vendor:r,rules:a}):c("@document missing '}'")}}()||function(){var e=o();if(p(/^@page */)){var t=v()||[];if(!l())return c("@page missing '{'");for(var r,n=m();r=y();)n.push(r),n=n.concat(m());return u()?e({type:"page",selectors:t,declarations:n}):c("@page missing '}'")}}()||function(){var e=o();if(p(/^@host\s*/)){if(!l())return c("@host missing '{'");var t=m().concat(d());return u()?e({type:"host",rules:t}):c("@host missing '}'")}}()||function(){var e=o();if(p(/^@font-face\s*/)){if(!l())return c("@font-face missing '{'");for(var t,r=m();t=y();)r.push(t),r=r.concat(m());return u()?e({type:"font-face",declarations:r}):c("@font-face missing '}'")}}()}function x(){var e=o(),t=v();return t?(m(),e({type:"rule",selectors:t,declarations:g()})):c("selector missing")}return W((b=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:b,parsingErrors:s}}))}function U(e){return e?e.replace(/^\s+|\s+$/g,""):""}function W(e,t){for(var r=e&&"string"==typeof e.type,n=r?e:t,a=0,o=Object.keys(e);a<o.length;a++){var i=e[o[a]];Array.isArray(i)?i.forEach((function(e){W(e,n)})):i&&"object"==typeof i&&W(i,n)}return r&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var j={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};var B=/([^\\]):hover/,P=new RegExp(B.source,"g");function G(e,t){var r=null==t?void 0:t.stylesWithHoverClass.get(e);if(r)return r;var n=F(e,{silent:!0});if(!n.stylesheet)return e;var a=[];if(n.stylesheet.rules.forEach((function(e){"selectors"in e&&(e.selectors||[]).forEach((function(e){B.test(e)&&a.push(e)}))})),0===a.length)return e;var o=new RegExp(a.filter((function(e,t){return a.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join("|"),"g"),i=e.replace(o,(function(e){var t=e.replace(P,"$1.\\:hover");return"".concat(e,", ").concat(t)}));return null==t||t.stylesWithHoverClass.set(e,i),i}function H(t,r){var n=r.doc,a=r.hackCss,o=r.cache;switch(t.type){case e.NodeType.Document:return n.implementation.createDocument(null,"",null);case e.NodeType.DocumentType:return n.implementation.createDocumentType(t.name||"html",t.publicId,t.systemId);case e.NodeType.Element:var i,s=function(e){var t=j[e.tagName]?j[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(t);i=t.isSVG?n.createElementNS("http://www.w3.org/2000/svg",s):n.createElement(s);var c={};for(var l in t.attributes)if(Object.prototype.hasOwnProperty.call(t.attributes,l)){var u=t.attributes[l];if(("option"!==s||"selected"!==l||!1!==u)&&null!==u)if(!0===u&&(u=""),l.startsWith("rr_"))c[l]=u;else{var d="textarea"===s&&"value"===l,p="style"===s&&"_cssText"===l;if(p&&a&&"string"==typeof u&&(u=G(u,o)),!d&&!p||"string"!=typeof u)try{if(t.isSVG&&"xlink:href"===l)i.setAttributeNS("http://www.w3.org/1999/xlink",l,u.toString());else if("onload"===l||"onclick"===l||"onmouse"===l.substring(0,7))i.setAttribute("_"+l,u.toString());else{if("meta"===s&&"Content-Security-Policy"===t.attributes["http-equiv"]&&"content"===l){i.setAttribute("csp-content",u.toString());continue}("link"!==s||"preload"!==t.attributes.rel&&"modulepreload"!==t.attributes.rel||"script"!==t.attributes.as)&&("link"===s&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js")||("img"===s&&t.attributes.srcset&&t.attributes.rr_dataURL?i.setAttribute("rrweb-original-srcset",t.attributes.srcset):i.setAttribute(l,u.toString())))}}catch(e){}else{for(var f=n.createTextNode(u),m=0,h=Array.from(i.childNodes);m<h.length;m++){var v=h[m];v.nodeType===i.TEXT_NODE&&i.removeChild(v)}i.appendChild(f)}}}var y=function(e){var r=c[e];if("canvas"===s&&"rr_dataURL"===e){var n=document.createElement("img");n.onload=function(){var e=i.getContext("2d");e&&e.drawImage(n,0,0,n.width,n.height)},n.src=r.toString(),i.RRNodeType&&(i.rr_dataURL=r.toString())}else if("img"===s&&"rr_dataURL"===e){var a=i;a.currentSrc.startsWith("data:")||(a.setAttribute("rrweb-original-src",t.attributes.src),a.src=r.toString())}if("rr_width"===e)i.style.width=r.toString();else if("rr_height"===e)i.style.height=r.toString();else if("rr_mediaCurrentTime"===e&&"number"==typeof r)i.currentTime=r;else if("rr_mediaState"===e)switch(r){case"played":i.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":i.pause()}};for(var g in c)y(g);if(t.isShadowHost)if(i.shadowRoot)for(;i.shadowRoot.firstChild;)i.shadowRoot.removeChild(i.shadowRoot.firstChild);else i.attachShadow({mode:"open"});return i;case e.NodeType.Text:return n.createTextNode(t.isStyle&&a?G(t.textContent,o):t.textContent);case e.NodeType.CDATA:return n.createCDATASection(t.textContent);case e.NodeType.Comment:return n.createComment(t.textContent);default:return null}}function z(t,n){var a=n.doc,o=n.mirror,i=n.skipChild,s=void 0!==i&&i,c=n.hackCss,l=void 0===c||c,u=n.afterAppend,d=n.cache;if(o.has(t.id)){var f=o.getNode(t.id);if(p(o.getMeta(f),t))return o.getNode(t.id)}var m=H(t,{doc:a,hackCss:l,cache:d});if(!m)return null;if(t.rootId&&o.getNode(t.rootId)!==a&&o.replace(t.rootId,a),t.type===e.NodeType.Document&&(a.close(),a.open(),"BackCompat"===t.compatMode&&t.childNodes&&t.childNodes[0].type!==e.NodeType.DocumentType&&(t.childNodes[0].type===e.NodeType.Element&&"xmlns"in t.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===t.childNodes[0].attributes.xmlns?a.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):a.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),m=a),o.add(m,t),(t.type===e.NodeType.Document||t.type===e.NodeType.Element)&&!s)for(var h=function(n){var i=z(n,{doc:a,mirror:o,skipChild:!1,hackCss:l,afterAppend:u,cache:d});if(!i)return console.warn("Failed to rebuild",n),"continue";if(n.isShadow&&r(m)&&m.shadowRoot)m.shadowRoot.appendChild(i);else if(t.type===e.NodeType.Document&&n.type==e.NodeType.Element){var s=i,c=null;s.childNodes.forEach((function(e){"BODY"===e.nodeName&&(c=e)})),c?(s.removeChild(c),m.appendChild(i),s.appendChild(c)):m.appendChild(i)}else m.appendChild(i);u&&u(i,n.id)},v=0,y=t.childNodes;v<y.length;v++){h(y[v])}return m}return e.IGNORED_NODE=-2,e.Mirror=c,e.addHoverClass=G,e.buildNodeWithSN=z,e.classMatchesRegex=L,e.cleanupSnapshot=function(){h=1},e.createCache=function(){return{stylesWithHoverClass:new Map}},e.createMirror=function(){return new c},e.genId=y,e.getCssRuleString=i,e.getCssRulesString=o,e.ignoreAttribute=M,e.is2DCanvasBlank=d,e.isCSSImportRule=s,e.isElement=r,e.isNativeShadowDom=a,e.isNodeMetaEqual=p,e.isShadowRoot=n,e.maskInputValue=l,e.needMaskingText=O,e.rebuild=function(t,r){var n=r.doc,a=r.onVisit,o=r.hackCss,i=void 0===o||o,s=r.afterAppend,l=r.cache,u=r.mirror,d=void 0===u?new c:u,p=z(t,{doc:n,mirror:d,skipChild:!1,hackCss:i,afterAppend:s,cache:l});return function(e,t){for(var r=0,n=e.getIds();r<n.length;r++){var a=n[r];e.has(a)&&t(e.getNode(a))}}(d,(function(t){a&&a(t),function(t,r){var n=r.getMeta(t);if((null==n?void 0:n.type)===e.NodeType.Element){var a=t;for(var o in n.attributes)if(Object.prototype.hasOwnProperty.call(n.attributes,o)&&o.startsWith("rr_")){var i=n.attributes[o];"rr_scrollLeft"===o&&(a.scrollLeft=i),"rr_scrollTop"===o&&(a.scrollTop=i)}}}(t,d)})),p},e.serializeNodeWithId=R,e.snapshot=function(e,t){var r=t||{},n=r.mirror,a=void 0===n?new c:n,o=r.blockClass,i=void 0===o?"rr-block":o,s=r.blockSelector,l=void 0===s?null:s,u=r.maskTextClass,d=void 0===u?"rr-mask":u,p=r.maskTextSelector,f=void 0===p?null:p,m=r.inlineStylesheet,h=void 0===m||m,v=r.inlineImages,y=void 0!==v&&v,g=r.recordCanvas,T=void 0!==g&&g,b=r.maskAllInputs,k=void 0!==b&&b,N=r.maskTextFn,C=r.maskInputFn,S=r.slimDOM,w=void 0!==S&&S,x=r.dataURLOptions,I=r.preserveWhiteSpace,E=r.onSerialize,M=r.onIframeLoad,L=r.iframeLoadTimeout,O=r.onStylesheetLoad,D=r.stylesheetLoadTimeout,_=r.keepIframeSrcFn;return R(e,{doc:e,mirror:a,blockClass:i,blockSelector:l,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:h,maskInputOptions:!0===k?{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===k?{password:!0}:k,maskTextFn:N,maskInputFn:C,slimDOMOptions:!0===w||"all"===w?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===w,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===w?{}:w,dataURLOptions:x,inlineImages:y,recordCanvas:T,preserveWhiteSpace:I,onSerialize:E,onIframeLoad:M,iframeLoadTimeout:L,onStylesheetLoad:O,stylesheetLoadTimeout:D,keepIframeSrcFn:void 0===_?function(){return!1}:_,newlyAddedElement:!1})},e.transformAttribute=E,e.visitSnapshot=function(t,r){!function t(n){r(n),n.type!==e.NodeType.Document&&n.type!==e.NodeType.Element||n.childNodes.forEach(t)}(t)},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
//# sourceMappingURL=rrweb-snapshot.min.js.map

@@ -1,2 +0,2 @@

var e;function t(e){return e.nodeType===e.ELEMENT_NODE}function r(e){var t=null==e?void 0:e.host;return Boolean((null==t?void 0:t.shadowRoot)===e)}function n(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function a(e){try{var t=e.rules||e.cssRules;return t?((r=Array.from(t).map(o).join("")).includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")&&(r=r.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),r):null}catch(e){return null}var r}function o(e){var t=e.cssText;if(i(e))try{t=a(e.styleSheet)||t}catch(e){}return t}function i(e){return"styleSheet"in e}!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 s=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(e){var t;if(!e)return-1;var r=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=r?r:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,r=this.getId(e);this.idNodeMap.delete(r),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var r=this.getNode(e);if(r){var n=this.nodeMetaMap.get(r);n&&this.nodeMetaMap.set(t,n)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function c(){return new s}function l(e){var t=e.maskInputOptions,r=e.tagName,n=e.type,a=e.value,o=e.maskInputFn,i=a||"";return(t[r.toLowerCase()]||t[n])&&(i=o?o(i):"*".repeat(i.length)),i}function u(e){var t=e.getContext("2d");if(!t)return!0;for(var r=0;r<e.width;r+=50)for(var n=0;n<e.height;n+=50){var a=t.getImageData,o="__rrweb_original__"in a?a.__rrweb_original__:a;if(new Uint32Array(o.call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer).some((function(e){return 0!==e})))return!1}return!0}function d(t,r){return!(!t||!r||t.type!==r.type)&&(t.type===e.Document?t.compatMode===r.compatMode:t.type===e.DocumentType?t.name===r.name&&t.publicId===r.publicId&&t.systemId===r.systemId:t.type===e.Comment||t.type===e.Text||t.type===e.CDATA?t.textContent===r.textContent:t.type===e.Element&&(t.tagName===r.tagName&&JSON.stringify(t.attributes)===JSON.stringify(r.attributes)&&t.isSVG===r.isSVG&&t.needBlock===r.needBlock))}var f,p,m=1,h=new RegExp("[^a-z0-9-_:]"),v=-2;function g(){return m++}var y=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,b=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,k=/^(data:)([^,]*),(.*)/i;function T(e,t){return(e||"").replace(y,(function(e,r,n,a,o,i){var s,c=n||o||i,l=r||a||"";if(!c)return e;if(!b.test(c))return"url(".concat(l).concat(c).concat(l,")");if(k.test(c))return"url(".concat(l).concat(c).concat(l,")");if("/"===c[0])return"url(".concat(l).concat((s=t,(s.indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+c)).concat(l,")");var u=t.split("/"),d=c.split("/");u.pop();for(var f=0,p=d;f<p.length;f++){var m=p[f];"."!==m&&(".."===m?u.pop():u.push(m))}return"url(".concat(l).concat(u.join("/")).concat(l,")")}))}var C=/^[^ \t\n\r\u000c]+/,S=/^[, \t\n\r\u000c]+/;function w(e,t){if(!t||""===t.trim())return t;var r=e.createElement("a");return r.href=t,r.href}function x(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function N(){var e=document.createElement("a");return e.href="",e.href}function I(e,t,r,n){return"src"===r||"href"===r&&n&&("use"!==t||"#"!==n[0])||"xlink:href"===r&&n&&"#"!==n[0]?w(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,a=e.exec(t.substring(r));return a?(n=a[0],r+=n.length,n):""}for(var a=[];n(S),!(r>=t.length);){var o=n(C);if(","===o.slice(-1))o=w(e,o.substring(0,o.length-1)),a.push(o);else{var i="";o=w(e,o);for(var s=!1;;){var c=t.charAt(r);if(""===c){a.push((o+i).trim());break}if(s)")"===c&&(s=!1);else{if(","===c){r+=1,a.push((o+i).trim());break}"("===c&&(s=!0)}i+=c,r+=1}}}return a.join(", ")}(e,n):"style"===r&&n?T(n,N()):"object"===t&&"data"===r&&n?w(e,n):n:w(e,n)}function E(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&E(e.parentNode,t,r);for(var n=e.classList.length;n--;){var a=e.classList[n];if(t.test(a))return!0}return!!r&&E(e.parentNode,t,r)}function L(e,t,r){var n=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===n)return!1;if("string"==typeof t){if(n.classList.contains(t))return!0;if(n.closest(".".concat(t)))return!0}else if(E(n,t,!0))return!0;if(r){if(n.matches(r))return!0;if(n.closest(r))return!0}return!1}function M(t,r){var n=r.doc,o=r.mirror,i=r.blockClass,s=r.blockSelector,c=r.maskTextClass,d=r.maskTextSelector,m=r.inlineStylesheet,v=r.maskInputOptions,g=void 0===v?{}:v,y=r.maskTextFn,b=r.maskInputFn,k=r.dataURLOptions,C=void 0===k?{}:k,S=r.inlineImages,w=r.recordCanvas,E=r.keepIframeSrcFn,M=r.newlyAddedElement,O=void 0!==M&&M,D=function(e,t){if(!t.hasNode(e))return;var r=t.getId(e);return 1===r?void 0:r}(n,o);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:e.Document,childNodes:[],compatMode:t.compatMode}:{type:e.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:e.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:D};case t.ELEMENT_NODE:return function(t,r){for(var n=r.doc,o=r.blockClass,i=r.blockSelector,s=r.inlineStylesheet,c=r.maskInputOptions,d=void 0===c?{}:c,m=r.maskInputFn,v=r.dataURLOptions,g=void 0===v?{}:v,y=r.inlineImages,b=r.recordCanvas,k=r.keepIframeSrcFn,C=r.newlyAddedElement,S=void 0!==C&&C,w=r.rootId,E=function(e,t,r){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var n=e.classList.length;n--;){var a=e.classList[n];if(t.test(a))return!0}return!!r&&e.matches(r)}(t,o,i),L=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return h.test(t)?"div":t}(t),M={},O=t.attributes.length,D=0;D<O;D++){var _=t.attributes[D];M[_.name]=I(n,L,_.name,_.value)}if("link"===L&&s){var A=Array.from(n.styleSheets).find((function(e){return e.href===t.href})),R=null;A&&(R=a(A)),R&&(delete M.rel,delete M.href,M._cssText=T(R,A.href))}if("style"===L&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){(R=a(t.sheet))&&(M._cssText=T(R,N()))}if("input"===L||"textarea"===L||"select"===L){var F=t.value,U=t.checked;"radio"!==M.type&&"checkbox"!==M.type&&"submit"!==M.type&&"button"!==M.type&&F?M.value=l({type:M.type,tagName:L,value:F,maskInputOptions:d,maskInputFn:m}):U&&(M.checked=U)}"option"===L&&(t.selected&&!d.select?M.selected=!0:delete M.selected);if("canvas"===L&&b)if("2d"===t.__context)u(t)||(M.rr_dataURL=t.toDataURL(g.type,g.quality));else if(!("__context"in t)){var W=t.toDataURL(g.type,g.quality),j=document.createElement("canvas");j.width=t.width,j.height=t.height,W!==j.toDataURL(g.type,g.quality)&&(M.rr_dataURL=W)}if("img"===L&&y){f||(f=n.createElement("canvas"),p=f.getContext("2d"));var B=t,P=B.crossOrigin;B.crossOrigin="anonymous";var G=function(){try{f.width=B.naturalWidth,f.height=B.naturalHeight,p.drawImage(B,0,0),M.rr_dataURL=f.toDataURL(g.type,g.quality)}catch(e){console.warn("Cannot inline img src=".concat(B.currentSrc,"! Error: ").concat(e))}P?M.crossOrigin=P:B.removeAttribute("crossorigin")};B.complete&&0!==B.naturalWidth?G():B.onload=G}"audio"!==L&&"video"!==L||(M.rr_mediaState=t.paused?"paused":"played",M.rr_mediaCurrentTime=t.currentTime);S||(t.scrollLeft&&(M.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(M.rr_scrollTop=t.scrollTop));if(E){var H=t.getBoundingClientRect(),z=H.width,V=H.height;M={class:M.class,rr_width:"".concat(z,"px"),rr_height:"".concat(V,"px")}}"iframe"!==L||k(M.src)||(t.contentDocument||(M.rr_src=M.src),delete M.src);return{type:e.Element,tagName:L,attributes:M,childNodes:[],isSVG:x(t)||void 0,needBlock:E,rootId:w}}(t,{doc:n,blockClass:i,blockSelector:s,inlineStylesheet:m,maskInputOptions:g,maskInputFn:b,dataURLOptions:C,inlineImages:S,recordCanvas:w,keepIframeSrcFn:E,newlyAddedElement:O,rootId:D});case t.TEXT_NODE:return function(t,r){var n,a=r.maskTextClass,o=r.maskTextSelector,i=r.maskTextFn,s=r.rootId,c=t.parentNode&&t.parentNode.tagName,l=t.textContent,u="STYLE"===c||void 0,d="SCRIPT"===c||void 0;if(u&&l){try{t.nextSibling||t.previousSibling||(null===(n=t.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(l=(f=t.parentNode.sheet).cssRules?Array.from(f.cssRules).map((function(e){return e.cssText||""})).join(""):"")}catch(e){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(e),t)}l=T(l,N())}var f;d&&(l="SCRIPT_PLACEHOLDER");!u&&!d&&l&&L(t,a,o)&&(l=i?i(l):l.replace(/[\S]/g,"*"));return{type:e.Text,textContent:l||"",isStyle:u,rootId:s}}(t,{maskTextClass:c,maskTextSelector:d,maskTextFn:y,rootId:D});case t.CDATA_SECTION_NODE:return{type:e.CDATA,textContent:"",rootId:D};case t.COMMENT_NODE:return{type:e.Comment,textContent:t.textContent||"",rootId:D};default:return!1}}function O(e){return void 0===e?"":e.toLowerCase()}function D(a,o){var i,s=o.doc,c=o.mirror,l=o.blockClass,u=o.blockSelector,d=o.maskTextClass,f=o.maskTextSelector,p=o.skipChild,m=void 0!==p&&p,h=o.inlineStylesheet,v=void 0===h||h,y=o.maskInputOptions,b=void 0===y?{}:y,k=o.maskTextFn,T=o.maskInputFn,C=o.slimDOMOptions,S=o.dataURLOptions,w=void 0===S?{}:S,x=o.inlineImages,N=void 0!==x&&x,I=o.recordCanvas,E=void 0!==I&&I,L=o.onSerialize,_=o.onIframeLoad,A=o.iframeLoadTimeout,R=void 0===A?5e3:A,F=o.onStylesheetLoad,U=o.stylesheetLoadTimeout,W=void 0===U?5e3:U,j=o.keepIframeSrcFn,B=void 0===j?function(){return!1}:j,P=o.newlyAddedElement,G=void 0!==P&&P,H=o.preserveWhiteSpace,z=void 0===H||H,V=M(a,{doc:s,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:f,inlineStylesheet:v,maskInputOptions:b,maskTextFn:k,maskInputFn:T,dataURLOptions:w,inlineImages:N,recordCanvas:E,keepIframeSrcFn:B,newlyAddedElement:G});if(!V)return console.warn(a,"not serialized"),null;i=c.hasNode(a)?c.getId(a):!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||"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")))return!0;if(r.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(O(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===O(t.attributes.name)||"icon"===O(t.attributes.rel)||"apple-touch-icon"===O(t.attributes.rel)||"shortcut icon"===O(t.attributes.rel))))return!0;if("meta"===t.tagName){if(r.headMetaDescKeywords&&O(t.attributes.name).match(/^description|keywords$/))return!0;if(r.headMetaSocial&&(O(t.attributes.property).match(/^(og|twitter|fb):/)||O(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===O(t.attributes.name)))return!0;if(r.headMetaRobots&&("robots"===O(t.attributes.name)||"googlebot"===O(t.attributes.name)||"bingbot"===O(t.attributes.name)))return!0;if(r.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(r.headMetaAuthorship&&("author"===O(t.attributes.name)||"generator"===O(t.attributes.name)||"framework"===O(t.attributes.name)||"publisher"===O(t.attributes.name)||"progid"===O(t.attributes.name)||O(t.attributes.property).match(/^article:/)||O(t.attributes.property).match(/^product:/)))return!0;if(r.headMetaVerification&&("google-site-verification"===O(t.attributes.name)||"yandex-verification"===O(t.attributes.name)||"csrf-token"===O(t.attributes.name)||"p:domain_verify"===O(t.attributes.name)||"verify-v1"===O(t.attributes.name)||"verification"===O(t.attributes.name)||"shopify-checkout-api-token"===O(t.attributes.name)))return!0}}return!1}(V,C)&&(z||V.type!==e.Text||V.isStyle||V.textContent.replace(/^\s+|\s+$/gm,"").length)?g():-2;var q=Object.assign(V,{id:i});if(c.add(a,q),-2===i)return null;L&&L(a);var $=!m;if(q.type===e.Element){$=$&&!q.needBlock,delete q.needBlock;var Y=a.shadowRoot;Y&&n(Y)&&(q.isShadowHost=!0)}if((q.type===e.Document||q.type===e.Element)&&$){C.headWhitespace&&q.type===e.Element&&"head"===q.tagName&&(z=!1);for(var X={doc:s,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:f,skipChild:m,inlineStylesheet:v,maskInputOptions:b,maskTextFn:k,maskInputFn:T,slimDOMOptions:C,dataURLOptions:w,inlineImages:N,recordCanvas:E,preserveWhiteSpace:z,onSerialize:L,onIframeLoad:_,iframeLoadTimeout:R,onStylesheetLoad:F,stylesheetLoadTimeout:W,keepIframeSrcFn:B},J=0,K=Array.from(a.childNodes);J<K.length;J++){(ee=D(K[J],X))&&q.childNodes.push(ee)}if(t(a)&&a.shadowRoot)for(var Z=0,Q=Array.from(a.shadowRoot.childNodes);Z<Q.length;Z++){var ee;(ee=D(Q[Z],X))&&(n(a.shadowRoot)&&(ee.isShadow=!0),q.childNodes.push(ee))}}return a.parentNode&&r(a.parentNode)&&n(a.parentNode)&&(q.isShadow=!0),q.type===e.Element&&"iframe"===q.tagName&&function(e,t,r){var n=e.contentWindow;if(n){var a,o=!1;try{a=n.document.readyState}catch(e){return}if("complete"===a){var i="about:blank";if(n.location.href!==i||e.src===i||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var s=setTimeout((function(){o||(t(),o=!0)}),r);e.addEventListener("load",(function(){clearTimeout(s),o=!0,t()}))}}}(a,(function(){var e=a.contentDocument;if(e&&_){var t=D(e,{doc:e,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:v,maskInputOptions:b,maskTextFn:k,maskInputFn:T,slimDOMOptions:C,dataURLOptions:w,inlineImages:N,recordCanvas:E,preserveWhiteSpace:z,onSerialize:L,onIframeLoad:_,iframeLoadTimeout:R,onStylesheetLoad:F,stylesheetLoadTimeout:W,keepIframeSrcFn:B});t&&_(a,t)}}),R),q.type===e.Element&&"link"===q.tagName&&"stylesheet"===q.attributes.rel&&function(e,t,r){var n,a=!1;try{n=e.sheet}catch(e){return}if(!n){var o=setTimeout((function(){a||(t(),a=!0)}),r);e.addEventListener("load",(function(){clearTimeout(o),a=!0,t()}))}}(a,(function(){if(F){var e=D(a,{doc:s,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:v,maskInputOptions:b,maskTextFn:k,maskInputFn:T,slimDOMOptions:C,dataURLOptions:w,inlineImages:N,recordCanvas:E,preserveWhiteSpace:z,onSerialize:L,onIframeLoad:_,iframeLoadTimeout:R,onStylesheetLoad:F,stylesheetLoadTimeout:W,keepIframeSrcFn:B});e&&F(a,e)}}),W),q}function _(e,t){var r=t||{},n=r.mirror,a=void 0===n?new s:n,o=r.blockClass,i=void 0===o?"rr-block":o,c=r.blockSelector,l=void 0===c?null:c,u=r.maskTextClass,d=void 0===u?"rr-mask":u,f=r.maskTextSelector,p=void 0===f?null:f,m=r.inlineStylesheet,h=void 0===m||m,v=r.inlineImages,g=void 0!==v&&v,y=r.recordCanvas,b=void 0!==y&&y,k=r.maskAllInputs,T=void 0!==k&&k,C=r.maskTextFn,S=r.maskInputFn,w=r.slimDOM,x=void 0!==w&&w,N=r.dataURLOptions,I=r.preserveWhiteSpace,E=r.onSerialize,L=r.onIframeLoad,M=r.iframeLoadTimeout,O=r.onStylesheetLoad,_=r.stylesheetLoadTimeout,A=r.keepIframeSrcFn;return D(e,{doc:e,mirror:a,blockClass:i,blockSelector:l,maskTextClass:d,maskTextSelector:p,skipChild:!1,inlineStylesheet:h,maskInputOptions:!0===T?{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===T?{password:!0}:T,maskTextFn:C,maskInputFn:S,slimDOMOptions:!0===x||"all"===x?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===x,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===x?{}:x,dataURLOptions:N,inlineImages:g,recordCanvas:b,preserveWhiteSpace:I,onSerialize:E,onIframeLoad:L,iframeLoadTimeout:M,onStylesheetLoad:O,stylesheetLoadTimeout:_,keepIframeSrcFn:void 0===A?function(){return!1}:A,newlyAddedElement:!1})}function A(t,r){!function t(n){r(n),n.type!==e.Document&&n.type!==e.Element||n.childNodes.forEach(t)}(t)}function R(){m=1}var F=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function U(e,t){void 0===t&&(t={});var r=1,n=1;function a(e){var t=e.match(/\n/g);t&&(r+=t.length);var a=e.lastIndexOf("\n");n=-1===a?n+e.length:e.length-a}function o(){var e={line:r,column:n};return function(t){return t.position=new i(e),p(),t}}var i=function(e){this.start=e,this.end={line:r,column:n},this.source=t.source};i.prototype.content=e;var s=[];function c(a){var o=new Error("".concat(t.source||"",":").concat(r,":").concat(n,": ").concat(a));if(o.reason=a,o.filename=t.source,o.line=r,o.column=n,o.source=e,!t.silent)throw o;s.push(o)}function l(){return f(/^{\s*/)}function u(){return f(/^}/)}function d(){var t,r=[];for(p(),m(r);e.length&&"}"!==e.charAt(0)&&(t=x()||N());)!1!==t&&(r.push(t),m(r));return r}function f(t){var r=t.exec(e);if(r){var n=r[0];return a(n),e=e.slice(n.length),r}}function p(){f(/^\s*/)}function m(e){var t;for(void 0===e&&(e=[]);t=h();)!1!==t&&e.push(t),t=h();return e}function h(){var t=o();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var r=2;""!==e.charAt(r)&&("*"!==e.charAt(r)||"/"!==e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return c("End of comment missing");var i=e.slice(2,r-2);return n+=2,a(i),e=e.slice(r),n+=2,t({type:"comment",comment:i})}}function v(){var e=f(/^([^{]+)/);if(e)return W(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function g(){var e=o(),t=f(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var r=W(t[0]);if(!f(/^:\s*/))return c("property missing ':'");var n=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),a=e({type:"declaration",property:r.replace(F,""),value:n?W(n[0]).replace(F,""):""});return f(/^[;\s]*/),a}}function y(){var e,t=[];if(!l())return c("missing '{'");for(m(t);e=g();)!1!==e&&(t.push(e),m(t)),e=g();return u()?t:c("missing '}'")}function b(){for(var e,t=[],r=o();e=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),f(/^,\s*/);if(t.length)return r({type:"keyframe",values:t,declarations:y()})}var k,T=w("import"),C=w("charset"),S=w("namespace");function w(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var r=o(),n=f(t);if(n){var a={type:e};return a[e]=n[1].trim(),r(a)}}}function x(){if("@"===e[0])return function(){var e=o(),t=f(/^@([-\w]+)?keyframes\s*/);if(t){var r=t[1];if(!(t=f(/^([-\w]+)\s*/)))return c("@keyframes missing name");var n,a=t[1];if(!l())return c("@keyframes missing '{'");for(var i=m();n=b();)i.push(n),i=i.concat(m());return u()?e({type:"keyframes",name:a,vendor:r,keyframes:i}):c("@keyframes missing '}'")}}()||function(){var e=o(),t=f(/^@media *([^{]+)/);if(t){var r=W(t[1]);if(!l())return c("@media missing '{'");var n=m().concat(d());return u()?e({type:"media",media:r,rules:n}):c("@media missing '}'")}}()||function(){var e=o(),t=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:W(t[1]),media:W(t[2])})}()||function(){var e=o(),t=f(/^@supports *([^{]+)/);if(t){var r=W(t[1]);if(!l())return c("@supports missing '{'");var n=m().concat(d());return u()?e({type:"supports",supports:r,rules:n}):c("@supports missing '}'")}}()||T()||C()||S()||function(){var e=o(),t=f(/^@([-\w]+)?document *([^{]+)/);if(t){var r=W(t[1]),n=W(t[2]);if(!l())return c("@document missing '{'");var a=m().concat(d());return u()?e({type:"document",document:n,vendor:r,rules:a}):c("@document missing '}'")}}()||function(){var e=o();if(f(/^@page */)){var t=v()||[];if(!l())return c("@page missing '{'");for(var r,n=m();r=g();)n.push(r),n=n.concat(m());return u()?e({type:"page",selectors:t,declarations:n}):c("@page missing '}'")}}()||function(){var e=o();if(f(/^@host\s*/)){if(!l())return c("@host missing '{'");var t=m().concat(d());return u()?e({type:"host",rules:t}):c("@host missing '}'")}}()||function(){var e=o();if(f(/^@font-face\s*/)){if(!l())return c("@font-face missing '{'");for(var t,r=m();t=g();)r.push(t),r=r.concat(m());return u()?e({type:"font-face",declarations:r}):c("@font-face missing '}'")}}()}function N(){var e=o(),t=v();return t?(m(),e({type:"rule",selectors:t,declarations:y()})):c("selector missing")}return j((k=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:k,parsingErrors:s}}))}function W(e){return e?e.replace(/^\s+|\s+$/g,""):""}function j(e,t){for(var r=e&&"string"==typeof e.type,n=r?e:t,a=0,o=Object.keys(e);a<o.length;a++){var i=e[o[a]];Array.isArray(i)?i.forEach((function(e){j(e,n)})):i&&"object"==typeof i&&j(i,n)}return r&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var B={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};var P=/([^\\]):hover/,G=new RegExp(P.source,"g");function H(e,t){var r=null==t?void 0:t.stylesWithHoverClass.get(e);if(r)return r;var n=U(e,{silent:!0});if(!n.stylesheet)return e;var a=[];if(n.stylesheet.rules.forEach((function(e){"selectors"in e&&(e.selectors||[]).forEach((function(e){P.test(e)&&a.push(e)}))})),0===a.length)return e;var o=new RegExp(a.filter((function(e,t){return a.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join("|"),"g"),i=e.replace(o,(function(e){var t=e.replace(G,"$1.\\:hover");return"".concat(e,", ").concat(t)}));return null==t||t.stylesWithHoverClass.set(e,i),i}function z(){return{stylesWithHoverClass:new Map}}function V(t,r){var n=r.doc,a=r.hackCss,o=r.cache;switch(t.type){case e.Document:return n.implementation.createDocument(null,"",null);case e.DocumentType:return n.implementation.createDocumentType(t.name||"html",t.publicId,t.systemId);case e.Element:var i,s=function(e){var t=B[e.tagName]?B[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(t);i=t.isSVG?n.createElementNS("http://www.w3.org/2000/svg",s):n.createElement(s);var c={};for(var l in t.attributes)if(Object.prototype.hasOwnProperty.call(t.attributes,l)){var u=t.attributes[l];if("option"!==s||"selected"!==l||!1!==u)if(!0===u&&(u=""),l.startsWith("rr_"))c[l]=u;else{var d="textarea"===s&&"value"===l,f="style"===s&&"_cssText"===l;if(f&&a&&"string"==typeof u&&(u=H(u,o)),!d&&!f||"string"!=typeof u)try{if(t.isSVG&&"xlink:href"===l)i.setAttributeNS("http://www.w3.org/1999/xlink",l,u.toString());else if("onload"===l||"onclick"===l||"onmouse"===l.substring(0,7))i.setAttribute("_"+l,u.toString());else{if("meta"===s&&"Content-Security-Policy"===t.attributes["http-equiv"]&&"content"===l){i.setAttribute("csp-content",u.toString());continue}("link"!==s||"preload"!==t.attributes.rel&&"modulepreload"!==t.attributes.rel||"script"!==t.attributes.as)&&("link"===s&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js")||("img"===s&&t.attributes.srcset&&t.attributes.rr_dataURL?i.setAttribute("rrweb-original-srcset",t.attributes.srcset):i.setAttribute(l,u.toString())))}}catch(e){}else{for(var p=n.createTextNode(u),m=0,h=Array.from(i.childNodes);m<h.length;m++){var v=h[m];v.nodeType===i.TEXT_NODE&&i.removeChild(v)}i.appendChild(p)}}}var g=function(e){var r=c[e];if("canvas"===s&&"rr_dataURL"===e){var n=document.createElement("img");n.onload=function(){var e=i.getContext("2d");e&&e.drawImage(n,0,0,n.width,n.height)},n.src=r.toString(),i.RRNodeType&&(i.rr_dataURL=r.toString())}else if("img"===s&&"rr_dataURL"===e){var a=i;a.currentSrc.startsWith("data:")||(a.setAttribute("rrweb-original-src",t.attributes.src),a.src=r.toString())}if("rr_width"===e)i.style.width=r.toString();else if("rr_height"===e)i.style.height=r.toString();else if("rr_mediaCurrentTime"===e&&"number"==typeof r)i.currentTime=r;else if("rr_mediaState"===e)switch(r){case"played":i.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":i.pause()}};for(var y in c)g(y);if(t.isShadowHost)if(i.shadowRoot)for(;i.shadowRoot.firstChild;)i.shadowRoot.removeChild(i.shadowRoot.firstChild);else i.attachShadow({mode:"open"});return i;case e.Text:return n.createTextNode(t.isStyle&&a?H(t.textContent,o):t.textContent);case e.CDATA:return n.createCDATASection(t.textContent);case e.Comment:return n.createComment(t.textContent);default:return null}}function q(r,n){var a=n.doc,o=n.mirror,i=n.skipChild,s=void 0!==i&&i,c=n.hackCss,l=void 0===c||c,u=n.afterAppend,f=n.cache;if(o.has(r.id)){var p=o.getNode(r.id);if(d(o.getMeta(p),r))return o.getNode(r.id)}var m=V(r,{doc:a,hackCss:l,cache:f});if(!m)return null;if(r.rootId&&o.getNode(r.rootId)!==a&&o.replace(r.rootId,a),r.type===e.Document&&(a.close(),a.open(),"BackCompat"===r.compatMode&&r.childNodes&&r.childNodes[0].type!==e.DocumentType&&(r.childNodes[0].type===e.Element&&"xmlns"in r.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===r.childNodes[0].attributes.xmlns?a.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):a.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),m=a),o.add(m,r),(r.type===e.Document||r.type===e.Element)&&!s)for(var h=0,v=r.childNodes;h<v.length;h++){var g=v[h],y=q(g,{doc:a,mirror:o,skipChild:!1,hackCss:l,afterAppend:u,cache:f});y?(g.isShadow&&t(m)&&m.shadowRoot?m.shadowRoot.appendChild(y):m.appendChild(y),u&&u(y,g.id)):console.warn("Failed to rebuild",g)}return m}function $(t,r){var n=r.doc,a=r.onVisit,o=r.hackCss,i=void 0===o||o,c=r.afterAppend,l=r.cache,u=r.mirror,d=void 0===u?new s:u,f=q(t,{doc:n,mirror:d,skipChild:!1,hackCss:i,afterAppend:c,cache:l});return function(e,t){for(var r=0,n=e.getIds();r<n.length;r++){var a=n[r];e.has(a)&&t(e.getNode(a))}}(d,(function(t){a&&a(t),function(t,r){var n=r.getMeta(t);if((null==n?void 0:n.type)===e.Element){var a=t;for(var o in n.attributes)if(Object.prototype.hasOwnProperty.call(n.attributes,o)&&o.startsWith("rr_")){var i=n.attributes[o];"rr_scrollLeft"===o&&(a.scrollLeft=i),"rr_scrollTop"===o&&(a.scrollTop=i)}}}(t,d)})),f}export{v as IGNORED_NODE,s as Mirror,e as NodeType,H as addHoverClass,q as buildNodeWithSN,E as classMatchesRegex,R as cleanupSnapshot,z as createCache,c as createMirror,g as genId,o as getCssRuleString,a as getCssRulesString,u as is2DCanvasBlank,i as isCSSImportRule,t as isElement,n as isNativeShadowDom,d as isNodeMetaEqual,r as isShadowRoot,l as maskInputValue,L as needMaskingText,$ as rebuild,D as serializeNodeWithId,_ as snapshot,I as transformAttribute,A as visitSnapshot};
var e;function t(e){return e.nodeType===e.ELEMENT_NODE}function r(e){var t=null==e?void 0:e.host;return Boolean((null==t?void 0:t.shadowRoot)===e)}function n(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function a(e){try{var t=e.rules||e.cssRules;return t?((r=Array.from(t).map(o).join("")).includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")&&(r=r.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),r):null}catch(e){return null}var r}function o(e){var t=e.cssText;if(i(e))try{t=a(e.styleSheet)||t}catch(e){}return t}function i(e){return"styleSheet"in e}!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 s=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(e){var t;if(!e)return-1;var r=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=r?r:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,r=this.getId(e);this.idNodeMap.delete(r),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var r=this.getNode(e);if(r){var n=this.nodeMetaMap.get(r);n&&this.nodeMetaMap.set(t,n)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function c(){return new s}function l(e){var t=e.maskInputOptions,r=e.tagName,n=e.type,a=e.value,o=e.maskInputFn,i=a||"";return(t[r.toLowerCase()]||t[n])&&(i=o?o(i):"*".repeat(i.length)),i}function u(e){var t=e.getContext("2d");if(!t)return!0;for(var r=0;r<e.width;r+=50)for(var n=0;n<e.height;n+=50){var a=t.getImageData,o="__rrweb_original__"in a?a.__rrweb_original__:a;if(new Uint32Array(o.call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer).some((function(e){return 0!==e})))return!1}return!0}function d(t,r){return!(!t||!r||t.type!==r.type)&&(t.type===e.Document?t.compatMode===r.compatMode:t.type===e.DocumentType?t.name===r.name&&t.publicId===r.publicId&&t.systemId===r.systemId:t.type===e.Comment||t.type===e.Text||t.type===e.CDATA?t.textContent===r.textContent:t.type===e.Element&&(t.tagName===r.tagName&&JSON.stringify(t.attributes)===JSON.stringify(r.attributes)&&t.isSVG===r.isSVG&&t.needBlock===r.needBlock))}var f,p,m=1,h=new RegExp("[^a-z0-9-_:]"),v=-2;function g(){return m++}var y=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,b=/^(?:[a-z+]+:)?\/\//i,k=/^www\..*/i,C=/^(data:)([^,]*),(.*)/i;function T(e,t){return(e||"").replace(y,(function(e,r,n,a,o,i){var s,c=n||o||i,l=r||a||"";if(!c)return e;if(b.test(c)||k.test(c))return"url(".concat(l).concat(c).concat(l,")");if(C.test(c))return"url(".concat(l).concat(c).concat(l,")");if("/"===c[0])return"url(".concat(l).concat((s=t,(s.indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+c)).concat(l,")");var u=t.split("/"),d=c.split("/");u.pop();for(var f=0,p=d;f<p.length;f++){var m=p[f];"."!==m&&(".."===m?u.pop():u.push(m))}return"url(".concat(l).concat(u.join("/")).concat(l,")")}))}var S=/^[^ \t\n\r\u000c]+/,w=/^[, \t\n\r\u000c]+/;function x(e,t){if(!t||""===t.trim())return t;var r=e.createElement("a");return r.href=t,r.href}function N(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function E(){var e=document.createElement("a");return e.href="",e.href}function I(e,t,r,n){return n?"src"===r||"href"===r&&("use"!==t||"#"!==n[0])||"xlink:href"===r&&"#"!==n[0]?x(e,n):"background"!==r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r?function(e,t){if(""===t.trim())return t;var r=0;function n(e){var n,a=e.exec(t.substring(r));return a?(n=a[0],r+=n.length,n):""}for(var a=[];n(w),!(r>=t.length);){var o=n(S);if(","===o.slice(-1))o=x(e,o.substring(0,o.length-1)),a.push(o);else{var i="";o=x(e,o);for(var s=!1;;){var c=t.charAt(r);if(""===c){a.push((o+i).trim());break}if(s)")"===c&&(s=!1);else{if(","===c){r+=1,a.push((o+i).trim());break}"("===c&&(s=!0)}i+=c,r+=1}}}return a.join(", ")}(e,n):"style"===r?T(n,E()):"object"===t&&"data"===r?x(e,n):n:x(e,n):n}function L(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function M(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&M(e.parentNode,t,r);for(var n=e.classList.length;n--;){var a=e.classList[n];if(t.test(a))return!0}return!!r&&M(e.parentNode,t,r)}function O(e,t,r){var n=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===n)return!1;if("string"==typeof t){if(n.classList.contains(t))return!0;if(n.closest(".".concat(t)))return!0}else if(M(n,t,!0))return!0;if(r){if(n.matches(r))return!0;if(n.closest(r))return!0}return!1}function D(t,r){var n=r.doc,o=r.mirror,i=r.blockClass,s=r.blockSelector,c=r.maskTextClass,d=r.maskTextSelector,m=r.inlineStylesheet,v=r.maskInputOptions,g=void 0===v?{}:v,y=r.maskTextFn,b=r.maskInputFn,k=r.dataURLOptions,C=void 0===k?{}:k,S=r.inlineImages,w=r.recordCanvas,x=r.keepIframeSrcFn,M=r.newlyAddedElement,D=void 0!==M&&M,_=function(e,t){if(!t.hasNode(e))return;var r=t.getId(e);return 1===r?void 0:r}(n,o);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:e.Document,childNodes:[],compatMode:t.compatMode}:{type:e.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:e.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:_};case t.ELEMENT_NODE:return function(t,r){for(var n=r.doc,o=r.blockClass,i=r.blockSelector,s=r.inlineStylesheet,c=r.maskInputOptions,d=void 0===c?{}:c,m=r.maskInputFn,v=r.dataURLOptions,g=void 0===v?{}:v,y=r.inlineImages,b=r.recordCanvas,k=r.keepIframeSrcFn,C=r.newlyAddedElement,S=void 0!==C&&C,w=r.rootId,x=function(e,t,r){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var n=e.classList.length;n--;){var a=e.classList[n];if(t.test(a))return!0}return!!r&&e.matches(r)}(t,o,i),M=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return h.test(t)?"div":t}(t),O={},D=t.attributes.length,_=0;_<D;_++){var A=t.attributes[_];L(M,A.name,A.value)||(O[A.name]=I(n,M,A.name,A.value))}if("link"===M&&s){var R=Array.from(n.styleSheets).find((function(e){return e.href===t.href})),F=null;R&&(F=a(R)),F&&(delete O.rel,delete O.href,O._cssText=T(F,R.href))}if("style"===M&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){(F=a(t.sheet))&&(O._cssText=T(F,E()))}if("input"===M||"textarea"===M||"select"===M){var U=t.value,W=t.checked;"radio"!==O.type&&"checkbox"!==O.type&&"submit"!==O.type&&"button"!==O.type&&U?O.value=l({type:O.type,tagName:M,value:U,maskInputOptions:d,maskInputFn:m}):W&&(O.checked=W)}"option"===M&&(t.selected&&!d.select?O.selected=!0:delete O.selected);if("canvas"===M&&b)if("2d"===t.__context)u(t)||(O.rr_dataURL=t.toDataURL(g.type,g.quality));else if(!("__context"in t)){var j=t.toDataURL(g.type,g.quality),B=document.createElement("canvas");B.width=t.width,B.height=t.height,j!==B.toDataURL(g.type,g.quality)&&(O.rr_dataURL=j)}if("img"===M&&y){f||(f=n.createElement("canvas"),p=f.getContext("2d"));var P=t,G=P.crossOrigin;P.crossOrigin="anonymous";var H=function(){try{f.width=P.naturalWidth,f.height=P.naturalHeight,p.drawImage(P,0,0),O.rr_dataURL=f.toDataURL(g.type,g.quality)}catch(e){console.warn("Cannot inline img src=".concat(P.currentSrc,"! Error: ").concat(e))}G?O.crossOrigin=G:P.removeAttribute("crossorigin")};P.complete&&0!==P.naturalWidth?H():P.onload=H}"audio"!==M&&"video"!==M||(O.rr_mediaState=t.paused?"paused":"played",O.rr_mediaCurrentTime=t.currentTime);S||(t.scrollLeft&&(O.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(O.rr_scrollTop=t.scrollTop));if(x){var z=t.getBoundingClientRect(),V=z.width,q=z.height;O={class:O.class,rr_width:"".concat(V,"px"),rr_height:"".concat(q,"px")}}"iframe"!==M||k(O.src)||(t.contentDocument||(O.rr_src=O.src),delete O.src);return{type:e.Element,tagName:M,attributes:O,childNodes:[],isSVG:N(t)||void 0,needBlock:x,rootId:w}}(t,{doc:n,blockClass:i,blockSelector:s,inlineStylesheet:m,maskInputOptions:g,maskInputFn:b,dataURLOptions:C,inlineImages:S,recordCanvas:w,keepIframeSrcFn:x,newlyAddedElement:D,rootId:_});case t.TEXT_NODE:return function(t,r){var n,a=r.maskTextClass,o=r.maskTextSelector,i=r.maskTextFn,s=r.rootId,c=t.parentNode&&t.parentNode.tagName,l=t.textContent,u="STYLE"===c||void 0,d="SCRIPT"===c||void 0;if(u&&l){try{t.nextSibling||t.previousSibling||(null===(n=t.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(l=(f=t.parentNode.sheet).cssRules?Array.from(f.cssRules).map((function(e){return e.cssText||""})).join(""):"")}catch(e){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(e),t)}l=T(l,E())}var f;d&&(l="SCRIPT_PLACEHOLDER");!u&&!d&&l&&O(t,a,o)&&(l=i?i(l):l.replace(/[\S]/g,"*"));return{type:e.Text,textContent:l||"",isStyle:u,rootId:s}}(t,{maskTextClass:c,maskTextSelector:d,maskTextFn:y,rootId:_});case t.CDATA_SECTION_NODE:return{type:e.CDATA,textContent:"",rootId:_};case t.COMMENT_NODE:return{type:e.Comment,textContent:t.textContent||"",rootId:_};default:return!1}}function _(e){return null==e?"":e.toLowerCase()}function A(a,o){var i,s=o.doc,c=o.mirror,l=o.blockClass,u=o.blockSelector,d=o.maskTextClass,f=o.maskTextSelector,p=o.skipChild,m=void 0!==p&&p,h=o.inlineStylesheet,v=void 0===h||h,y=o.maskInputOptions,b=void 0===y?{}:y,k=o.maskTextFn,C=o.maskInputFn,T=o.slimDOMOptions,S=o.dataURLOptions,w=void 0===S?{}:S,x=o.inlineImages,N=void 0!==x&&x,E=o.recordCanvas,I=void 0!==E&&E,L=o.onSerialize,M=o.onIframeLoad,O=o.iframeLoadTimeout,R=void 0===O?5e3:O,F=o.onStylesheetLoad,U=o.stylesheetLoadTimeout,W=void 0===U?5e3:U,j=o.keepIframeSrcFn,B=void 0===j?function(){return!1}:j,P=o.newlyAddedElement,G=void 0!==P&&P,H=o.preserveWhiteSpace,z=void 0===H||H,V=D(a,{doc:s,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:f,inlineStylesheet:v,maskInputOptions:b,maskTextFn:k,maskInputFn:C,dataURLOptions:w,inlineImages:N,recordCanvas:I,keepIframeSrcFn:B,newlyAddedElement:G});if(!V)return console.warn(a,"not serialized"),null;i=c.hasNode(a)?c.getId(a):!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||"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")))return!0;if(r.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(_(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===_(t.attributes.name)||"icon"===_(t.attributes.rel)||"apple-touch-icon"===_(t.attributes.rel)||"shortcut icon"===_(t.attributes.rel))))return!0;if("meta"===t.tagName){if(r.headMetaDescKeywords&&_(t.attributes.name).match(/^description|keywords$/))return!0;if(r.headMetaSocial&&(_(t.attributes.property).match(/^(og|twitter|fb):/)||_(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===_(t.attributes.name)))return!0;if(r.headMetaRobots&&("robots"===_(t.attributes.name)||"googlebot"===_(t.attributes.name)||"bingbot"===_(t.attributes.name)))return!0;if(r.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(r.headMetaAuthorship&&("author"===_(t.attributes.name)||"generator"===_(t.attributes.name)||"framework"===_(t.attributes.name)||"publisher"===_(t.attributes.name)||"progid"===_(t.attributes.name)||_(t.attributes.property).match(/^article:/)||_(t.attributes.property).match(/^product:/)))return!0;if(r.headMetaVerification&&("google-site-verification"===_(t.attributes.name)||"yandex-verification"===_(t.attributes.name)||"csrf-token"===_(t.attributes.name)||"p:domain_verify"===_(t.attributes.name)||"verify-v1"===_(t.attributes.name)||"verification"===_(t.attributes.name)||"shopify-checkout-api-token"===_(t.attributes.name)))return!0}}return!1}(V,T)&&(z||V.type!==e.Text||V.isStyle||V.textContent.replace(/^\s+|\s+$/gm,"").length)?g():-2;var q=Object.assign(V,{id:i});if(c.add(a,q),-2===i)return null;L&&L(a);var $=!m;if(q.type===e.Element){$=$&&!q.needBlock,delete q.needBlock;var Y=a.shadowRoot;Y&&n(Y)&&(q.isShadowHost=!0)}if((q.type===e.Document||q.type===e.Element)&&$){T.headWhitespace&&q.type===e.Element&&"head"===q.tagName&&(z=!1);for(var X={doc:s,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:f,skipChild:m,inlineStylesheet:v,maskInputOptions:b,maskTextFn:k,maskInputFn:C,slimDOMOptions:T,dataURLOptions:w,inlineImages:N,recordCanvas:I,preserveWhiteSpace:z,onSerialize:L,onIframeLoad:M,iframeLoadTimeout:R,onStylesheetLoad:F,stylesheetLoadTimeout:W,keepIframeSrcFn:B},J=0,K=Array.from(a.childNodes);J<K.length;J++){(ee=A(K[J],X))&&q.childNodes.push(ee)}if(t(a)&&a.shadowRoot)for(var Q=0,Z=Array.from(a.shadowRoot.childNodes);Q<Z.length;Q++){var ee;(ee=A(Z[Q],X))&&(n(a.shadowRoot)&&(ee.isShadow=!0),q.childNodes.push(ee))}}return a.parentNode&&r(a.parentNode)&&n(a.parentNode)&&(q.isShadow=!0),q.type===e.Element&&"iframe"===q.tagName&&function(e,t,r){var n=e.contentWindow;if(n){var a,o=!1;try{a=n.document.readyState}catch(e){return}if("complete"===a){var i="about:blank";if(n.location.href!==i||e.src===i||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var s=setTimeout((function(){o||(t(),o=!0)}),r);e.addEventListener("load",(function(){clearTimeout(s),o=!0,t()}))}}}(a,(function(){var e=a.contentDocument;if(e&&M){var t=A(e,{doc:e,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:v,maskInputOptions:b,maskTextFn:k,maskInputFn:C,slimDOMOptions:T,dataURLOptions:w,inlineImages:N,recordCanvas:I,preserveWhiteSpace:z,onSerialize:L,onIframeLoad:M,iframeLoadTimeout:R,onStylesheetLoad:F,stylesheetLoadTimeout:W,keepIframeSrcFn:B});t&&M(a,t)}}),R),q.type===e.Element&&"link"===q.tagName&&"stylesheet"===q.attributes.rel&&function(e,t,r){var n,a=!1;try{n=e.sheet}catch(e){return}if(!n){var o=setTimeout((function(){a||(t(),a=!0)}),r);e.addEventListener("load",(function(){clearTimeout(o),a=!0,t()}))}}(a,(function(){if(F){var e=A(a,{doc:s,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:v,maskInputOptions:b,maskTextFn:k,maskInputFn:C,slimDOMOptions:T,dataURLOptions:w,inlineImages:N,recordCanvas:I,preserveWhiteSpace:z,onSerialize:L,onIframeLoad:M,iframeLoadTimeout:R,onStylesheetLoad:F,stylesheetLoadTimeout:W,keepIframeSrcFn:B});e&&F(a,e)}}),W),q}function R(e,t){var r=t||{},n=r.mirror,a=void 0===n?new s:n,o=r.blockClass,i=void 0===o?"rr-block":o,c=r.blockSelector,l=void 0===c?null:c,u=r.maskTextClass,d=void 0===u?"rr-mask":u,f=r.maskTextSelector,p=void 0===f?null:f,m=r.inlineStylesheet,h=void 0===m||m,v=r.inlineImages,g=void 0!==v&&v,y=r.recordCanvas,b=void 0!==y&&y,k=r.maskAllInputs,C=void 0!==k&&k,T=r.maskTextFn,S=r.maskInputFn,w=r.slimDOM,x=void 0!==w&&w,N=r.dataURLOptions,E=r.preserveWhiteSpace,I=r.onSerialize,L=r.onIframeLoad,M=r.iframeLoadTimeout,O=r.onStylesheetLoad,D=r.stylesheetLoadTimeout,_=r.keepIframeSrcFn;return A(e,{doc:e,mirror:a,blockClass:i,blockSelector:l,maskTextClass:d,maskTextSelector:p,skipChild:!1,inlineStylesheet:h,maskInputOptions:!0===C?{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===C?{password:!0}:C,maskTextFn:T,maskInputFn:S,slimDOMOptions:!0===x||"all"===x?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===x,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===x?{}:x,dataURLOptions:N,inlineImages:g,recordCanvas:b,preserveWhiteSpace:E,onSerialize:I,onIframeLoad:L,iframeLoadTimeout:M,onStylesheetLoad:O,stylesheetLoadTimeout:D,keepIframeSrcFn:void 0===_?function(){return!1}:_,newlyAddedElement:!1})}function F(t,r){!function t(n){r(n),n.type!==e.Document&&n.type!==e.Element||n.childNodes.forEach(t)}(t)}function U(){m=1}var W=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function j(e,t){void 0===t&&(t={});var r=1,n=1;function a(e){var t=e.match(/\n/g);t&&(r+=t.length);var a=e.lastIndexOf("\n");n=-1===a?n+e.length:e.length-a}function o(){var e={line:r,column:n};return function(t){return t.position=new i(e),p(),t}}var i=function(e){this.start=e,this.end={line:r,column:n},this.source=t.source};i.prototype.content=e;var s=[];function c(a){var o=new Error("".concat(t.source||"",":").concat(r,":").concat(n,": ").concat(a));if(o.reason=a,o.filename=t.source,o.line=r,o.column=n,o.source=e,!t.silent)throw o;s.push(o)}function l(){return f(/^{\s*/)}function u(){return f(/^}/)}function d(){var t,r=[];for(p(),m(r);e.length&&"}"!==e.charAt(0)&&(t=x()||N());)!1!==t&&(r.push(t),m(r));return r}function f(t){var r=t.exec(e);if(r){var n=r[0];return a(n),e=e.slice(n.length),r}}function p(){f(/^\s*/)}function m(e){var t;for(void 0===e&&(e=[]);t=h();)!1!==t&&e.push(t),t=h();return e}function h(){var t=o();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var r=2;""!==e.charAt(r)&&("*"!==e.charAt(r)||"/"!==e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return c("End of comment missing");var i=e.slice(2,r-2);return n+=2,a(i),e=e.slice(r),n+=2,t({type:"comment",comment:i})}}function v(){var e=f(/^([^{]+)/);if(e)return B(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function g(){var e=o(),t=f(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var r=B(t[0]);if(!f(/^:\s*/))return c("property missing ':'");var n=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),a=e({type:"declaration",property:r.replace(W,""),value:n?B(n[0]).replace(W,""):""});return f(/^[;\s]*/),a}}function y(){var e,t=[];if(!l())return c("missing '{'");for(m(t);e=g();)!1!==e&&(t.push(e),m(t)),e=g();return u()?t:c("missing '}'")}function b(){for(var e,t=[],r=o();e=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),f(/^,\s*/);if(t.length)return r({type:"keyframe",values:t,declarations:y()})}var k,C=w("import"),T=w("charset"),S=w("namespace");function w(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var r=o(),n=f(t);if(n){var a={type:e};return a[e]=n[1].trim(),r(a)}}}function x(){if("@"===e[0])return function(){var e=o(),t=f(/^@([-\w]+)?keyframes\s*/);if(t){var r=t[1];if(!(t=f(/^([-\w]+)\s*/)))return c("@keyframes missing name");var n,a=t[1];if(!l())return c("@keyframes missing '{'");for(var i=m();n=b();)i.push(n),i=i.concat(m());return u()?e({type:"keyframes",name:a,vendor:r,keyframes:i}):c("@keyframes missing '}'")}}()||function(){var e=o(),t=f(/^@media *([^{]+)/);if(t){var r=B(t[1]);if(!l())return c("@media missing '{'");var n=m().concat(d());return u()?e({type:"media",media:r,rules:n}):c("@media missing '}'")}}()||function(){var e=o(),t=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:B(t[1]),media:B(t[2])})}()||function(){var e=o(),t=f(/^@supports *([^{]+)/);if(t){var r=B(t[1]);if(!l())return c("@supports missing '{'");var n=m().concat(d());return u()?e({type:"supports",supports:r,rules:n}):c("@supports missing '}'")}}()||C()||T()||S()||function(){var e=o(),t=f(/^@([-\w]+)?document *([^{]+)/);if(t){var r=B(t[1]),n=B(t[2]);if(!l())return c("@document missing '{'");var a=m().concat(d());return u()?e({type:"document",document:n,vendor:r,rules:a}):c("@document missing '}'")}}()||function(){var e=o();if(f(/^@page */)){var t=v()||[];if(!l())return c("@page missing '{'");for(var r,n=m();r=g();)n.push(r),n=n.concat(m());return u()?e({type:"page",selectors:t,declarations:n}):c("@page missing '}'")}}()||function(){var e=o();if(f(/^@host\s*/)){if(!l())return c("@host missing '{'");var t=m().concat(d());return u()?e({type:"host",rules:t}):c("@host missing '}'")}}()||function(){var e=o();if(f(/^@font-face\s*/)){if(!l())return c("@font-face missing '{'");for(var t,r=m();t=g();)r.push(t),r=r.concat(m());return u()?e({type:"font-face",declarations:r}):c("@font-face missing '}'")}}()}function N(){var e=o(),t=v();return t?(m(),e({type:"rule",selectors:t,declarations:y()})):c("selector missing")}return P((k=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:k,parsingErrors:s}}))}function B(e){return e?e.replace(/^\s+|\s+$/g,""):""}function P(e,t){for(var r=e&&"string"==typeof e.type,n=r?e:t,a=0,o=Object.keys(e);a<o.length;a++){var i=e[o[a]];Array.isArray(i)?i.forEach((function(e){P(e,n)})):i&&"object"==typeof i&&P(i,n)}return r&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var G={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};var H=/([^\\]):hover/,z=new RegExp(H.source,"g");function V(e,t){var r=null==t?void 0:t.stylesWithHoverClass.get(e);if(r)return r;var n=j(e,{silent:!0});if(!n.stylesheet)return e;var a=[];if(n.stylesheet.rules.forEach((function(e){"selectors"in e&&(e.selectors||[]).forEach((function(e){H.test(e)&&a.push(e)}))})),0===a.length)return e;var o=new RegExp(a.filter((function(e,t){return a.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join("|"),"g"),i=e.replace(o,(function(e){var t=e.replace(z,"$1.\\:hover");return"".concat(e,", ").concat(t)}));return null==t||t.stylesWithHoverClass.set(e,i),i}function q(){return{stylesWithHoverClass:new Map}}function $(t,r){var n=r.doc,a=r.hackCss,o=r.cache;switch(t.type){case e.Document:return n.implementation.createDocument(null,"",null);case e.DocumentType:return n.implementation.createDocumentType(t.name||"html",t.publicId,t.systemId);case e.Element:var i,s=function(e){var t=G[e.tagName]?G[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(t);i=t.isSVG?n.createElementNS("http://www.w3.org/2000/svg",s):n.createElement(s);var c={};for(var l in t.attributes)if(Object.prototype.hasOwnProperty.call(t.attributes,l)){var u=t.attributes[l];if(("option"!==s||"selected"!==l||!1!==u)&&null!==u)if(!0===u&&(u=""),l.startsWith("rr_"))c[l]=u;else{var d="textarea"===s&&"value"===l,f="style"===s&&"_cssText"===l;if(f&&a&&"string"==typeof u&&(u=V(u,o)),!d&&!f||"string"!=typeof u)try{if(t.isSVG&&"xlink:href"===l)i.setAttributeNS("http://www.w3.org/1999/xlink",l,u.toString());else if("onload"===l||"onclick"===l||"onmouse"===l.substring(0,7))i.setAttribute("_"+l,u.toString());else{if("meta"===s&&"Content-Security-Policy"===t.attributes["http-equiv"]&&"content"===l){i.setAttribute("csp-content",u.toString());continue}("link"!==s||"preload"!==t.attributes.rel&&"modulepreload"!==t.attributes.rel||"script"!==t.attributes.as)&&("link"===s&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js")||("img"===s&&t.attributes.srcset&&t.attributes.rr_dataURL?i.setAttribute("rrweb-original-srcset",t.attributes.srcset):i.setAttribute(l,u.toString())))}}catch(e){}else{for(var p=n.createTextNode(u),m=0,h=Array.from(i.childNodes);m<h.length;m++){var v=h[m];v.nodeType===i.TEXT_NODE&&i.removeChild(v)}i.appendChild(p)}}}var g=function(e){var r=c[e];if("canvas"===s&&"rr_dataURL"===e){var n=document.createElement("img");n.onload=function(){var e=i.getContext("2d");e&&e.drawImage(n,0,0,n.width,n.height)},n.src=r.toString(),i.RRNodeType&&(i.rr_dataURL=r.toString())}else if("img"===s&&"rr_dataURL"===e){var a=i;a.currentSrc.startsWith("data:")||(a.setAttribute("rrweb-original-src",t.attributes.src),a.src=r.toString())}if("rr_width"===e)i.style.width=r.toString();else if("rr_height"===e)i.style.height=r.toString();else if("rr_mediaCurrentTime"===e&&"number"==typeof r)i.currentTime=r;else if("rr_mediaState"===e)switch(r){case"played":i.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":i.pause()}};for(var y in c)g(y);if(t.isShadowHost)if(i.shadowRoot)for(;i.shadowRoot.firstChild;)i.shadowRoot.removeChild(i.shadowRoot.firstChild);else i.attachShadow({mode:"open"});return i;case e.Text:return n.createTextNode(t.isStyle&&a?V(t.textContent,o):t.textContent);case e.CDATA:return n.createCDATASection(t.textContent);case e.Comment:return n.createComment(t.textContent);default:return null}}function Y(r,n){var a=n.doc,o=n.mirror,i=n.skipChild,s=void 0!==i&&i,c=n.hackCss,l=void 0===c||c,u=n.afterAppend,f=n.cache;if(o.has(r.id)){var p=o.getNode(r.id);if(d(o.getMeta(p),r))return o.getNode(r.id)}var m=$(r,{doc:a,hackCss:l,cache:f});if(!m)return null;if(r.rootId&&o.getNode(r.rootId)!==a&&o.replace(r.rootId,a),r.type===e.Document&&(a.close(),a.open(),"BackCompat"===r.compatMode&&r.childNodes&&r.childNodes[0].type!==e.DocumentType&&(r.childNodes[0].type===e.Element&&"xmlns"in r.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===r.childNodes[0].attributes.xmlns?a.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):a.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),m=a),o.add(m,r),(r.type===e.Document||r.type===e.Element)&&!s)for(var h=function(n){var i=Y(n,{doc:a,mirror:o,skipChild:!1,hackCss:l,afterAppend:u,cache:f});if(!i)return console.warn("Failed to rebuild",n),"continue";if(n.isShadow&&t(m)&&m.shadowRoot)m.shadowRoot.appendChild(i);else if(r.type===e.Document&&n.type==e.Element){var s=i,c=null;s.childNodes.forEach((function(e){"BODY"===e.nodeName&&(c=e)})),c?(s.removeChild(c),m.appendChild(i),s.appendChild(c)):m.appendChild(i)}else m.appendChild(i);u&&u(i,n.id)},v=0,g=r.childNodes;v<g.length;v++){h(g[v])}return m}function X(t,r){var n=r.doc,a=r.onVisit,o=r.hackCss,i=void 0===o||o,c=r.afterAppend,l=r.cache,u=r.mirror,d=void 0===u?new s:u,f=Y(t,{doc:n,mirror:d,skipChild:!1,hackCss:i,afterAppend:c,cache:l});return function(e,t){for(var r=0,n=e.getIds();r<n.length;r++){var a=n[r];e.has(a)&&t(e.getNode(a))}}(d,(function(t){a&&a(t),function(t,r){var n=r.getMeta(t);if((null==n?void 0:n.type)===e.Element){var a=t;for(var o in n.attributes)if(Object.prototype.hasOwnProperty.call(n.attributes,o)&&o.startsWith("rr_")){var i=n.attributes[o];"rr_scrollLeft"===o&&(a.scrollLeft=i),"rr_scrollTop"===o&&(a.scrollTop=i)}}}(t,d)})),f}export{v as IGNORED_NODE,s as Mirror,e as NodeType,V as addHoverClass,Y as buildNodeWithSN,M as classMatchesRegex,U as cleanupSnapshot,q as createCache,c as createMirror,g as genId,o as getCssRuleString,a as getCssRulesString,L as ignoreAttribute,u as is2DCanvasBlank,i as isCSSImportRule,t as isElement,n as isNativeShadowDom,d as isNodeMetaEqual,r as isShadowRoot,l as maskInputValue,O as needMaskingText,X as rebuild,A as serializeNodeWithId,R as snapshot,I as transformAttribute,F as visitSnapshot};
//# sourceMappingURL=rrweb-snapshot.min.js.map
{
"name": "rrweb-snapshot",
"version": "2.0.0-alpha.5",
"version": "2.0.0-alpha.6",
"description": "rrweb's component to take a snapshot of DOM, aka DOM serializer",

@@ -5,0 +5,0 @@ "scripts": {

@@ -1,5 +0,5 @@

import snapshot, { serializeNodeWithId, transformAttribute, visitSnapshot, cleanupSnapshot, needMaskingText, classMatchesRegex, IGNORED_NODE, genId } from './snapshot';
import snapshot, { serializeNodeWithId, transformAttribute, ignoreAttribute, visitSnapshot, cleanupSnapshot, needMaskingText, classMatchesRegex, IGNORED_NODE, genId } from './snapshot';
import rebuild, { buildNodeWithSN, addHoverClass, createCache } from './rebuild';
export * from './types';
export * from './utils';
export { snapshot, serializeNodeWithId, rebuild, buildNodeWithSN, addHoverClass, createCache, transformAttribute, visitSnapshot, cleanupSnapshot, needMaskingText, classMatchesRegex, IGNORED_NODE, genId, };
export { snapshot, serializeNodeWithId, rebuild, buildNodeWithSN, addHoverClass, createCache, transformAttribute, ignoreAttribute, visitSnapshot, cleanupSnapshot, needMaskingText, classMatchesRegex, IGNORED_NODE, genId, };

@@ -7,3 +7,4 @@ import { serializedNodeWithId, MaskInputOptions, SlimDOMOptions, DataURLOptions, MaskTextFn, MaskInputFn, KeepIframeSrcFn, serializedElementNodeWithId } from './types';

export declare function absoluteToDoc(doc: Document, attributeValue: string): string;
export declare function transformAttribute(doc: Document, tagName: string, name: string, value: string): string;
export declare function transformAttribute(doc: Document, tagName: string, name: string, value: string | null): string | null;
export declare function ignoreAttribute(tagName: string, name: string, _value: unknown): boolean;
export declare function _isBlockedElement(element: HTMLElement, blockClass: string | RegExp, blockSelector: string | null): boolean;

@@ -10,0 +11,0 @@ export declare function classMatchesRegex(node: Node | null, regex: RegExp, checkAncestors: boolean): boolean;

@@ -21,3 +21,3 @@ export declare enum NodeType {

export declare type attributes = {
[key: string]: string | number | true;
[key: string]: string | number | true | null;
};

@@ -24,0 +24,0 @@ export declare type legacyAttributes = {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc