@highlight-run/rrweb 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/record/rrweb-record.js +3 -3
  2. package/dist/record/rrweb-record.min.js +3 -3
  3. package/dist/record/rrweb-record.min.js.map +1 -1
  4. package/dist/rrweb-all.js +8 -8
  5. package/dist/rrweb-all.min.js +8 -8
  6. package/dist/rrweb-all.min.js.map +1 -1
  7. package/dist/rrweb.js +5 -5
  8. package/dist/rrweb.min.js +5 -5
  9. package/dist/rrweb.min.js.map +1 -1
  10. package/es/rrweb/packages/rrweb/src/record/index.js +3 -3
  11. package/lib/record/rrweb-record.js +2 -2
  12. package/lib/rrweb-all.js +2 -2
  13. package/lib/rrweb.js +2 -2
  14. package/package.json +2 -2
  15. package/typings/entries/all.d.ts +0 -0
  16. package/typings/entries/record-pack.d.ts +0 -0
  17. package/typings/entries/replay-unpack.d.ts +0 -0
  18. package/typings/index.d.ts +0 -0
  19. package/typings/packer/base.d.ts +0 -0
  20. package/typings/packer/index.d.ts +0 -0
  21. package/typings/packer/pack.d.ts +0 -0
  22. package/typings/packer/unpack.d.ts +0 -0
  23. package/typings/plugins/console/record/error-stack-parser.d.ts +0 -0
  24. package/typings/plugins/console/record/index.d.ts +0 -0
  25. package/typings/plugins/console/record/stringify.d.ts +0 -0
  26. package/typings/plugins/console/replay/index.d.ts +0 -0
  27. package/typings/plugins/sequential-id/record/index.d.ts +0 -0
  28. package/typings/plugins/sequential-id/replay/index.d.ts +0 -0
  29. package/typings/record/iframe-manager.d.ts +0 -0
  30. package/typings/record/index.d.ts +0 -0
  31. package/typings/record/mutation.d.ts +0 -0
  32. package/typings/record/observer.d.ts +0 -0
  33. package/typings/record/observers/canvas/2d.d.ts +0 -0
  34. package/typings/record/observers/canvas/canvas-manager.d.ts +0 -0
  35. package/typings/record/observers/canvas/canvas.d.ts +0 -0
  36. package/typings/record/observers/canvas/serialize-args.d.ts +0 -0
  37. package/typings/record/observers/canvas/webgl.d.ts +0 -0
  38. package/typings/record/shadow-dom-manager.d.ts +0 -0
  39. package/typings/record/stylesheet-manager.d.ts +0 -0
  40. package/typings/record/workers/image-bitmap-data-url-worker.d.ts +0 -0
  41. package/typings/replay/canvas/2d.d.ts +0 -0
  42. package/typings/replay/canvas/deserialize-args.d.ts +0 -0
  43. package/typings/replay/canvas/index.d.ts +0 -0
  44. package/typings/replay/canvas/webgl.d.ts +0 -0
  45. package/typings/replay/index.d.ts +0 -0
  46. package/typings/replay/machine.d.ts +0 -0
  47. package/typings/replay/smoothscroll.d.ts +0 -0
  48. package/typings/replay/styles/inject-style.d.ts +0 -0
  49. package/typings/replay/timer.d.ts +0 -0
  50. package/typings/rrdom/index.d.ts +0 -0
  51. package/typings/rrdom/tree-node.d.ts +0 -0
  52. package/typings/types.d.ts +0 -0
  53. package/typings/utils.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- var rrwebRecord=function(){"use strict";var N;(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"})(N||(N={}));function Lt(e){return e.nodeType===e.ELEMENT_NODE}function de(e){var t=e?.host;return Boolean(t?.shadowRoot===e)}function pe(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}var Fe=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(t){var n;if(!t)return-1;var r=(n=this.getMeta(t))===null||n===void 0?void 0:n.id;return r??-1},e.prototype.getNode=function(t){return this.idNodeMap.get(t)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(t){return this.nodeMetaMap.get(t)||null},e.prototype.removeNodeFromMap=function(t){var n=this,r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(function(o){return n.removeNodeFromMap(o)})},e.prototype.has=function(t){return this.idNodeMap.has(t)},e.prototype.hasNode=function(t){return this.nodeMetaMap.has(t)},e.prototype.add=function(t,n){var r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)},e.prototype.replace=function(t,n){this.idNodeMap.set(t,n)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function Nt(){return new Fe}function Te(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,o=e.value,s=e.maskInputFn,c=o||"";return(t[n.toLowerCase()]||t[r])&&(s?c=s(c):c="*".repeat(c.length)),c}var Pe="__rrweb_original__";function xt(e){var t=e.getContext("2d");if(!t)return!0;for(var n=50,r=0;r<e.width;r+=n)for(var o=0;o<e.height;o+=n){var s=t.getImageData,c=Pe in s?s[Pe]:s,a=new Uint32Array(c.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer);if(a.some(function(i){return i!==0}))return!1}return!0}function Ae(e){return e=e.replace(/[^ -~]+/g,""),e=e?.split(" ").map(function(t){return Math.random().toString(20).substr(2,t.length)}).join(" ")||"",e}var Et=1,Rt=new RegExp("[^a-z0-9-_:]"),he=-2;function Dt(){return Et++}function Ft(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return Rt.test(t)?"div":t}function Oe(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(Pt).join(""):null}catch{return null}}function Pt(e){var t=e.cssText;if(At(e))try{t=Oe(e.styleSheet)||t}catch{}return t}function At(e){return"styleSheet"in e}function _t(e){return e.cssRules?Array.from(e.cssRules).map(function(t){return t.cssText||""}).join(""):""}function Wt(e){var t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var oe,_e,Gt=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,zt=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,Vt=/^(data:)([^,]*),(.*)/i;function be(e,t){return(e||"").replace(Gt,function(n,r,o,s,c,a){var i=o||c||a,l=r||s||"";if(!i)return n;if(!zt.test(i)||Vt.test(i))return"url(".concat(l).concat(i).concat(l,")");if(i[0]==="/")return"url(".concat(l).concat(Wt(t)+i).concat(l,")");var d=t.split("/"),p=i.split("/");d.pop();for(var m=0,u=p;m<u.length;m++){var h=u[m];h!=="."&&(h===".."?d.pop():d.push(h))}return"url(".concat(l).concat(d.join("/")).concat(l,")")})}var jt=/^[^ \t\n\r\u000c]+/,Zt=/^[, \t\n\r\u000c]+/;function Ut(e,t){if(t.trim()==="")return t;var n=0;function r(l){var d,p=l.exec(t.substring(n));return p?(d=p[0],n+=d.length,d):""}for(var o=[];r(Zt),!(n>=t.length);){var s=r(jt);if(s.slice(-1)===",")s=Se(e,s.substring(0,s.length-1)),o.push(s);else{var c="";s=Se(e,s);for(var a=!1;;){var i=t.charAt(n);if(i===""){o.push((s+c).trim());break}else if(a)i===")"&&(a=!1);else if(i===","){n+=1,o.push((s+c).trim());break}else i==="("&&(a=!0);c+=i,n+=1}}}return o.join(", ")}function Se(e,t){if(!t||t.trim()==="")return t;var n=e.createElement("a");return n.href=t,n.href}function Yt(e){return Boolean(e.tagName==="svg"||e.ownerSVGElement)}function Le(){var e=document.createElement("a");return e.href="",e.href}function We(e,t,n,r){return n==="src"||n==="href"&&r&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r&&r[0]!=="#"||n==="background"&&r&&(t==="table"||t==="td"||t==="th")?Se(e,r):n==="srcset"&&r?Ut(e,r):n==="style"&&r?be(r,Le()):t==="object"&&n==="data"&&r?Se(e,r):r}function Ht(e,t,n){if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return n?e.matches(n):!1}function ke(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return n?ke(e.parentNode,t,n):!1;for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return n?ke(e.parentNode,t,n):!1}function Ge(e,t,n){var r=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(r===null)return!1;if(typeof t=="string"){if(r.classList.contains(t)||r.closest(".".concat(t)))return!0}else if(ke(r,t,!0))return!0;return!!(n&&(r.matches(n)||r.closest(n)))}function Xt(e,t,n){var r=e.contentWindow;if(r){var o=!1,s;try{s=r.document.readyState}catch{return}if(s!=="complete"){var c=setTimeout(function(){o||(t(),o=!0)},n);e.addEventListener("load",function(){clearTimeout(c),o=!0,t()});return}var a="about:blank";if(r.location.href!==a||e.src===a||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}}function ze(e){return e.getAttribute("href")?e.sheet!==null:!0}function Ve(e,t,n){var r=!1,o;try{o=e.sheet}catch{return}if(!o){var s=setTimeout(function(){r||(t(),r=!0)},n);e.addEventListener("load",function(){clearTimeout(s),r=!0,t()})}}function Bt(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,s=t.blockSelector,c=t.maskTextClass,a=t.maskTextSelector,i=t.inlineStylesheet,l=t.maskInputOptions,d=l===void 0?{}:l,p=t.maskTextFn,m=t.maskInputFn,u=t.dataURLOptions,h=u===void 0?{}:u,v=t.inlineImages,S=t.recordCanvas,I=t.keepIframeSrcFn,w=t.newlyAddedElement,y=w===void 0?!1:w,f=t.enableStrictPrivacy,O=Kt(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:N.Document,childNodes:[],compatMode:e.compatMode,rootId:O}:{type:N.Document,childNodes:[],rootId:O};case e.DOCUMENT_TYPE_NODE:return{type:N.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:O};case e.ELEMENT_NODE:return Jt(e,{doc:n,blockClass:o,blockSelector:s,inlineStylesheet:i,maskInputOptions:d,maskInputFn:m,dataURLOptions:h,inlineImages:v,recordCanvas:S,keepIframeSrcFn:I,newlyAddedElement:y,enableStrictPrivacy:f,rootId:O});case e.TEXT_NODE:return $t(e,{maskTextClass:c,maskTextSelector:a,maskTextFn:p,enableStrictPrivacy:f,rootId:O});case e.CDATA_SECTION_NODE:return{type:N.CDATA,textContent:"",rootId:O};case e.COMMENT_NODE:return{type:N.Comment,textContent:e.textContent||"",rootId:O};default:return!1}}function Kt(e,t){if(t.hasNode(e)){var n=t.getId(e);return n===1?void 0:n}}function $t(e,t){var n,r=t.maskTextClass,o=t.maskTextSelector,s=t.maskTextFn,c=t.enableStrictPrivacy,a=t.rootId,i=e.parentNode&&e.parentNode.tagName,l=e.textContent,d=i==="STYLE"?!0:void 0,p=i==="SCRIPT"?!0:void 0,m=!1;if(d&&l){try{e.nextSibling||e.previousSibling||!((n=e.parentNode.sheet)===null||n===void 0)&&n.cssRules&&(l=_t(e.parentNode.sheet))}catch(h){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(h),e)}l=be(l,Le()),m=!0}if(p?(l="SCRIPT_PLACEHOLDER",m=!0):i==="NOSCRIPT"&&(l="",m=!0),!d&&!p&&l&&Ge(e,r,o)&&(l=s?s(l):l.replace(/[\S]/g,"*")),c&&!m&&i){var u=new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]);!u.has(i)&&l&&(l=Ae(l))}return{type:N.Text,textContent:l||"",isStyle:d,rootId:a}}function Jt(e,t){for(var n=t.doc,r=t.blockClass,o=t.blockSelector,s=t.inlineStylesheet,c=t.maskInputOptions,a=c===void 0?{}:c,i=t.maskInputFn,l=t.dataURLOptions,d=l===void 0?{}:l,p=t.inlineImages,m=t.recordCanvas,u=t.keepIframeSrcFn,h=t.newlyAddedElement,v=h===void 0?!1:h,S=t.enableStrictPrivacy,I=t.rootId,w=Ht(e,r,o),y=Ft(e),f={},O=e.attributes.length,_=0;_<O;_++){var R=e.attributes[_];f[R.name]=We(n,y,R.name,R.value)}if(y==="link"&&s){var L=Array.from(n.styleSheets).find(function(z){return z.href===e.href}),W=null;L&&(W=Oe(L)),W&&(delete f.rel,delete f.href,f._cssText=be(W,L.href))}if(y==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){var W=Oe(e.sheet);W&&(f._cssText=be(W,Le()))}if(y==="input"||y==="textarea"||y==="select"){var j=e.value;f.type!=="radio"&&f.type!=="checkbox"&&f.type!=="submit"&&f.type!=="button"&&j?f.value=Te({type:f.type,tagName:y,value:j,maskInputOptions:a,maskInputFn:i}):e.checked&&(f.checked=e.checked)}if(y==="option"&&(e.selected&&!a.select?f.selected=!0:delete f.selected),y==="canvas"&&m){if(e.__context==="2d")xt(e)||(f.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){var D=e.toDataURL(d.type,d.quality),K=document.createElement("canvas");K.width=e.width,K.height=e.height;var Z=K.toDataURL(d.type,d.quality);D!==Z&&(f.rr_dataURL=D)}}if(y==="img"&&p){oe||(oe=n.createElement("canvas"),_e=oe.getContext("2d"));var F=e,G=F.crossOrigin;F.crossOrigin="anonymous";var $=function(){try{oe.width=F.naturalWidth,oe.height=F.naturalHeight,_e.drawImage(F,0,0),f.rr_dataURL=oe.toDataURL(d.type,d.quality)}catch(z){console.warn("Cannot inline img src=".concat(F.currentSrc,"! Error: ").concat(z))}G?f.crossOrigin=G:F.removeAttribute("crossorigin")};F.complete&&F.naturalWidth!==0?$():F.onload=$}if((y==="audio"||y==="video")&&(f.rr_mediaState=e.paused?"paused":"played",f.rr_mediaCurrentTime=e.currentTime),v||(e.scrollLeft&&(f.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(f.rr_scrollTop=e.scrollTop)),w||y==="img"&&S){var ee=e.getBoundingClientRect(),A=ee.width,J=ee.height;f={class:f.class,rr_width:"".concat(A,"px"),rr_height:"".concat(J,"px")},w=!0}return y==="iframe"&&!u(f.src)&&(e.contentDocument||(f.rr_src=f.src),delete f.src),{type:N.Element,tagName:y,attributes:f,childNodes:[],isSVG:Yt(e)||void 0,needBlock:w,rootId:I}}function C(e){return e===void 0?"":e.toLowerCase()}function Qt(e,t){return!!(t.comment&&e.type===N.Comment||e.type===N.Element&&(t.script&&(e.tagName==="script"||e.tagName==="link"&&e.attributes.rel==="preload"&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js"))||t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(C(e.attributes.name).match(/^msapplication-tile(image|color)$/)||C(e.attributes.name)==="application-name"||C(e.attributes.rel)==="icon"||C(e.attributes.rel)==="apple-touch-icon"||C(e.attributes.rel)==="shortcut icon"))||e.tagName==="meta"&&(t.headMetaDescKeywords&&C(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(C(e.attributes.property).match(/^(og|twitter|fb):/)||C(e.attributes.name).match(/^(og|twitter):/)||C(e.attributes.name)==="pinterest")||t.headMetaRobots&&(C(e.attributes.name)==="robots"||C(e.attributes.name)==="googlebot"||C(e.attributes.name)==="bingbot")||t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0||t.headMetaAuthorship&&(C(e.attributes.name)==="author"||C(e.attributes.name)==="generator"||C(e.attributes.name)==="framework"||C(e.attributes.name)==="publisher"||C(e.attributes.name)==="progid"||C(e.attributes.property).match(/^article:/)||C(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(C(e.attributes.name)==="google-site-verification"||C(e.attributes.name)==="yandex-verification"||C(e.attributes.name)==="csrf-token"||C(e.attributes.name)==="p:domain_verify"||C(e.attributes.name)==="verify-v1"||C(e.attributes.name)==="verification"||C(e.attributes.name)==="shopify-checkout-api-token"))))}function ne(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,s=t.blockSelector,c=t.maskTextClass,a=t.maskTextSelector,i=t.skipChild,l=i===void 0?!1:i,d=t.inlineStylesheet,p=d===void 0?!0:d,m=t.maskInputOptions,u=m===void 0?{}:m,h=t.maskTextFn,v=t.maskInputFn,S=t.slimDOMOptions,I=t.dataURLOptions,w=I===void 0?{}:I,y=t.inlineImages,f=y===void 0?!1:y,O=t.recordCanvas,_=O===void 0?!1:O,R=t.onSerialize,L=t.onIframeLoad,W=t.iframeLoadTimeout,j=W===void 0?5e3:W,D=t.onStylesheetLoad,K=t.stylesheetLoadTimeout,Z=K===void 0?5e3:K,F=t.keepIframeSrcFn,G=F===void 0?function(){return!1}:F,$=t.newlyAddedElement,ee=$===void 0?!1:$,A=t.enableStrictPrivacy,J=t.preserveWhiteSpace,z=J===void 0?!0:J,H=Bt(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:c,maskTextSelector:a,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:v,dataURLOptions:w,inlineImages:f,recordCanvas:_,keepIframeSrcFn:G,newlyAddedElement:ee,enableStrictPrivacy:A});if(!H)return console.warn(e,"not serialized"),null;var g;if(r.hasNode(e)?g=r.getId(e):Qt(H,S)||!z&&H.type===N.Text&&!H.isStyle&&!H.textContent.replace(/^\s+|\s+$/gm,"").length?g=he:g=Dt(),g===he)return null;var b=Object.assign(H,{id:g});r.add(e,b),R&&R(e);var X=!l;if(b.type===N.Element){if(X=X&&!b.needBlock,b.needBlock&&b.tagName==="img"){var V=e.cloneNode();V.src="",r.add(V,b)}delete b.needBlock;var q=e.shadowRoot;q&&pe(q)&&(b.isShadowHost=!0)}if((b.type===N.Document||b.type===N.Element)&&X){S.headWhitespace&&b.type===N.Element&&b.tagName==="head"&&(z=!1);for(var k={doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:c,maskTextSelector:a,skipChild:l,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:v,slimDOMOptions:S,dataURLOptions:w,inlineImages:f,recordCanvas:_,preserveWhiteSpace:z,onSerialize:R,onIframeLoad:L,iframeLoadTimeout:j,onStylesheetLoad:D,stylesheetLoadTimeout:Z,keepIframeSrcFn:G,enableStrictPrivacy:A},M=0,ce=Array.from(e.childNodes);M<ce.length;M++){var Re=ce[M],ue=ne(Re,k);ue&&b.childNodes.push(ue)}if(Lt(e)&&e.shadowRoot)for(var De=0,Tt=Array.from(e.shadowRoot.childNodes);De<Tt.length;De++){var Re=Tt[De],ue=ne(Re,k);ue&&(pe(e.shadowRoot)&&(ue.isShadow=!0),b.childNodes.push(ue))}}return e.parentNode&&de(e.parentNode)&&pe(e.parentNode)&&(b.isShadow=!0),b.type===N.Element&&b.tagName==="iframe"&&Xt(e,function(){var te=e.contentDocument;if(te&&L){var Ot=ne(te,{doc:te,mirror:r,blockClass:o,blockSelector:s,maskTextClass:c,maskTextSelector:a,skipChild:!1,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:v,slimDOMOptions:S,dataURLOptions:w,inlineImages:f,recordCanvas:_,preserveWhiteSpace:z,onSerialize:R,onIframeLoad:L,iframeLoadTimeout:j,onStylesheetLoad:D,stylesheetLoadTimeout:Z,keepIframeSrcFn:G,enableStrictPrivacy:A});Ot&&L(e,Ot)}},j),b.type===N.Element&&b.tagName==="link"&&b.attributes.rel==="stylesheet"&&(Ve(e,function(){if(D){var te=ne(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:c,maskTextSelector:a,skipChild:!1,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:v,slimDOMOptions:S,dataURLOptions:w,inlineImages:f,recordCanvas:_,preserveWhiteSpace:z,onSerialize:R,onIframeLoad:L,iframeLoadTimeout:j,onStylesheetLoad:D,stylesheetLoadTimeout:Z,keepIframeSrcFn:G,enableStrictPrivacy:A});te&&D(e,te)}},Z),ze(e)===!1)||b.type===N.Element&&b.tagName==="link"&&b.attributes.rel==="stylesheet"&&(Ve(e,function(){if(D){var te=ne(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:c,maskTextSelector:a,skipChild:!1,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:v,slimDOMOptions:S,dataURLOptions:w,inlineImages:f,recordCanvas:_,preserveWhiteSpace:z,onSerialize:R,onIframeLoad:L,iframeLoadTimeout:j,enableStrictPrivacy:A,onStylesheetLoad:D,stylesheetLoadTimeout:Z,keepIframeSrcFn:G});te&&D(e,te)}},Z),ze(e)===!1)?null:b}function qt(e,t){var n=t||{},r=n.mirror,o=r===void 0?new Fe:r,s=n.blockClass,c=s===void 0?"highlight-block":s,a=n.blockSelector,i=a===void 0?null:a,l=n.maskTextClass,d=l===void 0?"highlight-mask":l,p=n.maskTextSelector,m=p===void 0?null:p,u=n.inlineStylesheet,h=u===void 0?!0:u,v=n.inlineImages,S=v===void 0?!1:v,I=n.recordCanvas,w=I===void 0?!1:I,y=n.maskAllInputs,f=y===void 0?!1:y,O=n.maskTextFn,_=n.maskInputFn,R=n.slimDOM,L=R===void 0?!1:R,W=n.dataURLOptions,j=n.preserveWhiteSpace,D=n.onSerialize,K=n.onIframeLoad,Z=n.iframeLoadTimeout,F=n.onStylesheetLoad,G=n.stylesheetLoadTimeout,$=n.keepIframeSrcFn,ee=$===void 0?function(){return!1}:$,A=n.enableStrictPrivacy,J=A===void 0?!1:A,z=f===!0?{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}:f===!1?{password:!0}:f,H=L===!0||L==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:L==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:L===!1?{}:L;return ne(e,{doc:e,mirror:o,blockClass:c,blockSelector:i,maskTextClass:d,maskTextSelector:m,skipChild:!1,inlineStylesheet:h,maskInputOptions:z,maskTextFn:O,maskInputFn:_,slimDOMOptions:H,dataURLOptions:W,inlineImages:S,recordCanvas:w,preserveWhiteSpace:j,onSerialize:D,onIframeLoad:K,iframeLoadTimeout:Z,onStylesheetLoad:F,stylesheetLoadTimeout:G,keepIframeSrcFn:ee,newlyAddedElement:!1,enableStrictPrivacy:J})}function U(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const ae=`Please stop import mirror directly. Instead of that,\r
1
+ var rrwebRecord=function(){"use strict";var N;(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"})(N||(N={}));function Lt(e){return e.nodeType===e.ELEMENT_NODE}function de(e){var t=e?.host;return Boolean(t?.shadowRoot===e)}function pe(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}var Pe=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(t){var r;if(!t)return-1;var n=(r=this.getMeta(t))===null||r===void 0?void 0:r.id;return n??-1},e.prototype.getNode=function(t){return this.idNodeMap.get(t)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(t){return this.nodeMetaMap.get(t)||null},e.prototype.removeNodeFromMap=function(t){var r=this,n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(function(o){return r.removeNodeFromMap(o)})},e.prototype.has=function(t){return this.idNodeMap.has(t)},e.prototype.hasNode=function(t){return this.nodeMetaMap.has(t)},e.prototype.add=function(t,r){var n=r.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,r)},e.prototype.replace=function(t,r){this.idNodeMap.set(t,r)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function Nt(){return new Pe}function Te(e){var t=e.maskInputOptions,r=e.tagName,n=e.type,o=e.value,s=e.maskInputFn,c=o||"";return(t[r.toLowerCase()]||t[n])&&(s?c=s(c):c="*".repeat(c.length)),c}var Ae="__rrweb_original__";function xt(e){var t=e.getContext("2d");if(!t)return!0;for(var r=50,n=0;n<e.width;n+=r)for(var o=0;o<e.height;o+=r){var s=t.getImageData,c=Ae in s?s[Ae]:s,a=new Uint32Array(c.call(t,n,o,Math.min(r,e.width-n),Math.min(r,e.height-o)).data.buffer);if(a.some(function(i){return i!==0}))return!1}return!0}function Oe(e){return e=e.replace(/[^ -~]+/g,""),e=e?.split(" ").map(function(t){return Math.random().toString(20).substr(2,t.length)}).join(" ")||"",e}var Et=1,Rt=new RegExp("[^a-z0-9-_:]"),he=-2;function Dt(){return Et++}function Ft(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return Rt.test(t)?"div":t}function Le(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(Pt).join(""):null}catch{return null}}function Pt(e){var t=e.cssText;if(At(e))try{t=Le(e.styleSheet)||t}catch{}return t}function At(e){return"styleSheet"in e}function _t(e){return e.cssRules?Array.from(e.cssRules).map(function(t){return t.cssText||""}).join(""):""}function Wt(e){var t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var oe,_e,Gt=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,zt=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,Vt=/^(data:)([^,]*),(.*)/i;function be(e,t){return(e||"").replace(Gt,function(r,n,o,s,c,a){var i=o||c||a,l=n||s||"";if(!i)return r;if(!zt.test(i)||Vt.test(i))return"url(".concat(l).concat(i).concat(l,")");if(i[0]==="/")return"url(".concat(l).concat(Wt(t)+i).concat(l,")");var d=t.split("/"),p=i.split("/");d.pop();for(var m=0,u=p;m<u.length;m++){var h=u[m];h!=="."&&(h===".."?d.pop():d.push(h))}return"url(".concat(l).concat(d.join("/")).concat(l,")")})}var jt=/^[^ \t\n\r\u000c]+/,Zt=/^[, \t\n\r\u000c]+/;function Ut(e,t){if(t.trim()==="")return t;var r=0;function n(l){var d,p=l.exec(t.substring(r));return p?(d=p[0],r+=d.length,d):""}for(var o=[];n(Zt),!(r>=t.length);){var s=n(jt);if(s.slice(-1)===",")s=Se(e,s.substring(0,s.length-1)),o.push(s);else{var c="";s=Se(e,s);for(var a=!1;;){var i=t.charAt(r);if(i===""){o.push((s+c).trim());break}else if(a)i===")"&&(a=!1);else if(i===","){r+=1,o.push((s+c).trim());break}else i==="("&&(a=!0);c+=i,r+=1}}}return o.join(", ")}function Se(e,t){if(!t||t.trim()==="")return t;var r=e.createElement("a");return r.href=t,r.href}function Yt(e){return Boolean(e.tagName==="svg"||e.ownerSVGElement)}function Ne(){var e=document.createElement("a");return e.href="",e.href}function We(e,t,r,n){return r==="src"||r==="href"&&n&&!(t==="use"&&n[0]==="#")||r==="xlink:href"&&n&&n[0]!=="#"||r==="background"&&n&&(t==="table"||t==="td"||t==="th")?Se(e,n):r==="srcset"&&n?Ut(e,n):r==="style"&&n?be(n,Ne()):t==="object"&&r==="data"&&n?Se(e,n):n}function Ht(e,t,r){if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(var n=e.classList.length;n--;){var o=e.classList[n];if(t.test(o))return!0}return r?e.matches(r):!1}function ke(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?ke(e.parentNode,t,r):!1;for(var n=e.classList.length;n--;){var o=e.classList[n];if(t.test(o))return!0}return r?ke(e.parentNode,t,r):!1}function Ge(e,t,r){var n=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(n===null)return!1;if(typeof t=="string"){if(n.classList.contains(t)||n.closest(".".concat(t)))return!0}else if(ke(n,t,!0))return!0;return!!(r&&(n.matches(r)||n.closest(r)))}function Xt(e,t,r){var n=e.contentWindow;if(n){var o=!1,s;try{s=n.document.readyState}catch{return}if(s!=="complete"){var c=setTimeout(function(){o||(t(),o=!0)},r);e.addEventListener("load",function(){clearTimeout(c),o=!0,t()});return}var a="about:blank";if(n.location.href!==a||e.src===a||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}}function ze(e){return e.getAttribute("href")?e.sheet!==null:!0}function Ve(e,t,r){var n=!1,o;try{o=e.sheet}catch{return}if(!o){var s=setTimeout(function(){n||(t(),n=!0)},r);e.addEventListener("load",function(){clearTimeout(s),n=!0,t()})}}function Bt(e,t){var r=t.doc,n=t.mirror,o=t.blockClass,s=t.blockSelector,c=t.maskTextClass,a=t.maskTextSelector,i=t.inlineStylesheet,l=t.maskInputOptions,d=l===void 0?{}:l,p=t.maskTextFn,m=t.maskInputFn,u=t.dataURLOptions,h=u===void 0?{}:u,v=t.inlineImages,S=t.recordCanvas,I=t.keepIframeSrcFn,w=t.newlyAddedElement,y=w===void 0?!1:w,f=t.enableStrictPrivacy,O=Kt(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:N.Document,childNodes:[],compatMode:e.compatMode,rootId:O}:{type:N.Document,childNodes:[],rootId:O};case e.DOCUMENT_TYPE_NODE:return{type:N.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:O};case e.ELEMENT_NODE:return Jt(e,{doc:r,blockClass:o,blockSelector:s,inlineStylesheet:i,maskInputOptions:d,maskInputFn:m,dataURLOptions:h,inlineImages:v,recordCanvas:S,keepIframeSrcFn:I,newlyAddedElement:y,enableStrictPrivacy:f,rootId:O});case e.TEXT_NODE:return $t(e,{maskTextClass:c,maskTextSelector:a,maskTextFn:p,enableStrictPrivacy:f,rootId:O});case e.CDATA_SECTION_NODE:return{type:N.CDATA,textContent:"",rootId:O};case e.COMMENT_NODE:return{type:N.Comment,textContent:e.textContent||"",rootId:O};default:return!1}}function Kt(e,t){if(t.hasNode(e)){var r=t.getId(e);return r===1?void 0:r}}function $t(e,t){var r,n=t.maskTextClass,o=t.maskTextSelector,s=t.maskTextFn,c=t.enableStrictPrivacy,a=t.rootId,i=e.parentNode&&e.parentNode.tagName,l=e.textContent,d=i==="STYLE"?!0:void 0,p=i==="SCRIPT"?!0:void 0,m=!1;if(d&&l){try{e.nextSibling||e.previousSibling||!((r=e.parentNode.sheet)===null||r===void 0)&&r.cssRules&&(l=_t(e.parentNode.sheet))}catch(h){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(h),e)}l=be(l,Ne()),m=!0}if(p?(l="SCRIPT_PLACEHOLDER",m=!0):i==="NOSCRIPT"&&(l="",m=!0),!d&&!p&&l&&Ge(e,n,o)&&(l=s?s(l):l.replace(/[\S]/g,"*")),c&&!m&&i){var u=new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]);!u.has(i)&&l&&(l=Oe(l))}return{type:N.Text,textContent:l||"",isStyle:d,rootId:a}}function Jt(e,t){for(var r=t.doc,n=t.blockClass,o=t.blockSelector,s=t.inlineStylesheet,c=t.maskInputOptions,a=c===void 0?{}:c,i=t.maskInputFn,l=t.dataURLOptions,d=l===void 0?{}:l,p=t.inlineImages,m=t.recordCanvas,u=t.keepIframeSrcFn,h=t.newlyAddedElement,v=h===void 0?!1:h,S=t.enableStrictPrivacy,I=t.rootId,w=Ht(e,n,o),y=Ft(e),f={},O=e.attributes.length,_=0;_<O;_++){var R=e.attributes[_];f[R.name]=We(r,y,R.name,R.value)}if(y==="link"&&s){var L=Array.from(r.styleSheets).find(function(z){return z.href===e.href}),W=null;L&&(W=Le(L)),W&&(delete f.rel,delete f.href,f._cssText=be(W,L.href))}if(y==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){var W=Le(e.sheet);W&&(f._cssText=be(W,Ne()))}if(y==="input"||y==="textarea"||y==="select"){var j=e.value;f.type!=="radio"&&f.type!=="checkbox"&&f.type!=="submit"&&f.type!=="button"&&j?f.value=Te({type:f.type,tagName:y,value:j,maskInputOptions:a,maskInputFn:i}):e.checked&&(f.checked=e.checked)}if(y==="option"&&(e.selected&&!a.select?f.selected=!0:delete f.selected),y==="canvas"&&m){if(e.__context==="2d")xt(e)||(f.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){var D=e.toDataURL(d.type,d.quality),K=document.createElement("canvas");K.width=e.width,K.height=e.height;var Z=K.toDataURL(d.type,d.quality);D!==Z&&(f.rr_dataURL=D)}}if(y==="img"&&p){oe||(oe=r.createElement("canvas"),_e=oe.getContext("2d"));var F=e,G=F.crossOrigin;F.crossOrigin="anonymous";var $=function(){try{oe.width=F.naturalWidth,oe.height=F.naturalHeight,_e.drawImage(F,0,0),f.rr_dataURL=oe.toDataURL(d.type,d.quality)}catch(z){console.warn("Cannot inline img src=".concat(F.currentSrc,"! Error: ").concat(z))}G?f.crossOrigin=G:F.removeAttribute("crossorigin")};F.complete&&F.naturalWidth!==0?$():F.onload=$}if((y==="audio"||y==="video")&&(f.rr_mediaState=e.paused?"paused":"played",f.rr_mediaCurrentTime=e.currentTime),v||(e.scrollLeft&&(f.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(f.rr_scrollTop=e.scrollTop)),w||y==="img"&&S){var ee=e.getBoundingClientRect(),A=ee.width,J=ee.height;f={class:f.class,rr_width:"".concat(A,"px"),rr_height:"".concat(J,"px")},w=!0}return y==="iframe"&&!u(f.src)&&(e.contentDocument||(f.rr_src=f.src),delete f.src),{type:N.Element,tagName:y,attributes:f,childNodes:[],isSVG:Yt(e)||void 0,needBlock:w,rootId:I}}function C(e){return e===void 0?"":e.toLowerCase()}function Qt(e,t){return!!(t.comment&&e.type===N.Comment||e.type===N.Element&&(t.script&&(e.tagName==="script"||e.tagName==="link"&&e.attributes.rel==="preload"&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js"))||t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(C(e.attributes.name).match(/^msapplication-tile(image|color)$/)||C(e.attributes.name)==="application-name"||C(e.attributes.rel)==="icon"||C(e.attributes.rel)==="apple-touch-icon"||C(e.attributes.rel)==="shortcut icon"))||e.tagName==="meta"&&(t.headMetaDescKeywords&&C(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(C(e.attributes.property).match(/^(og|twitter|fb):/)||C(e.attributes.name).match(/^(og|twitter):/)||C(e.attributes.name)==="pinterest")||t.headMetaRobots&&(C(e.attributes.name)==="robots"||C(e.attributes.name)==="googlebot"||C(e.attributes.name)==="bingbot")||t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0||t.headMetaAuthorship&&(C(e.attributes.name)==="author"||C(e.attributes.name)==="generator"||C(e.attributes.name)==="framework"||C(e.attributes.name)==="publisher"||C(e.attributes.name)==="progid"||C(e.attributes.property).match(/^article:/)||C(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(C(e.attributes.name)==="google-site-verification"||C(e.attributes.name)==="yandex-verification"||C(e.attributes.name)==="csrf-token"||C(e.attributes.name)==="p:domain_verify"||C(e.attributes.name)==="verify-v1"||C(e.attributes.name)==="verification"||C(e.attributes.name)==="shopify-checkout-api-token"))))}function re(e,t){var r=t.doc,n=t.mirror,o=t.blockClass,s=t.blockSelector,c=t.maskTextClass,a=t.maskTextSelector,i=t.skipChild,l=i===void 0?!1:i,d=t.inlineStylesheet,p=d===void 0?!0:d,m=t.maskInputOptions,u=m===void 0?{}:m,h=t.maskTextFn,v=t.maskInputFn,S=t.slimDOMOptions,I=t.dataURLOptions,w=I===void 0?{}:I,y=t.inlineImages,f=y===void 0?!1:y,O=t.recordCanvas,_=O===void 0?!1:O,R=t.onSerialize,L=t.onIframeLoad,W=t.iframeLoadTimeout,j=W===void 0?5e3:W,D=t.onStylesheetLoad,K=t.stylesheetLoadTimeout,Z=K===void 0?5e3:K,F=t.keepIframeSrcFn,G=F===void 0?function(){return!1}:F,$=t.newlyAddedElement,ee=$===void 0?!1:$,A=t.enableStrictPrivacy,J=t.preserveWhiteSpace,z=J===void 0?!0:J,H=Bt(e,{doc:r,mirror:n,blockClass:o,blockSelector:s,maskTextClass:c,maskTextSelector:a,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:v,dataURLOptions:w,inlineImages:f,recordCanvas:_,keepIframeSrcFn:G,newlyAddedElement:ee,enableStrictPrivacy:A});if(!H)return console.warn(e,"not serialized"),null;var g;if(n.hasNode(e)?g=n.getId(e):Qt(H,S)||!z&&H.type===N.Text&&!H.isStyle&&!H.textContent.replace(/^\s+|\s+$/gm,"").length?g=he:g=Dt(),g===he)return null;var b=Object.assign(H,{id:g});n.add(e,b),R&&R(e);var X=!l;if(b.type===N.Element){if(X=X&&!b.needBlock,b.needBlock&&b.tagName==="img"){var V=e.cloneNode();V.src="",n.add(V,b)}delete b.needBlock;var q=e.shadowRoot;q&&pe(q)&&(b.isShadowHost=!0)}if((b.type===N.Document||b.type===N.Element)&&X){S.headWhitespace&&b.type===N.Element&&b.tagName==="head"&&(z=!1);for(var k={doc:r,mirror:n,blockClass:o,blockSelector:s,maskTextClass:c,maskTextSelector:a,skipChild:l,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:v,slimDOMOptions:S,dataURLOptions:w,inlineImages:f,recordCanvas:_,preserveWhiteSpace:z,onSerialize:R,onIframeLoad:L,iframeLoadTimeout:j,onStylesheetLoad:D,stylesheetLoadTimeout:Z,keepIframeSrcFn:G,enableStrictPrivacy:A},M=0,ce=Array.from(e.childNodes);M<ce.length;M++){var De=ce[M],ue=re(De,k);ue&&b.childNodes.push(ue)}if(Lt(e)&&e.shadowRoot)for(var Fe=0,Tt=Array.from(e.shadowRoot.childNodes);Fe<Tt.length;Fe++){var De=Tt[Fe],ue=re(De,k);ue&&(pe(e.shadowRoot)&&(ue.isShadow=!0),b.childNodes.push(ue))}}return e.parentNode&&de(e.parentNode)&&pe(e.parentNode)&&(b.isShadow=!0),b.type===N.Element&&b.tagName==="iframe"&&Xt(e,function(){var te=e.contentDocument;if(te&&L){var Ot=re(te,{doc:te,mirror:n,blockClass:o,blockSelector:s,maskTextClass:c,maskTextSelector:a,skipChild:!1,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:v,slimDOMOptions:S,dataURLOptions:w,inlineImages:f,recordCanvas:_,preserveWhiteSpace:z,onSerialize:R,onIframeLoad:L,iframeLoadTimeout:j,onStylesheetLoad:D,stylesheetLoadTimeout:Z,keepIframeSrcFn:G,enableStrictPrivacy:A});Ot&&L(e,Ot)}},j),b.type===N.Element&&b.tagName==="link"&&b.attributes.rel==="stylesheet"&&(Ve(e,function(){if(D){var te=re(e,{doc:r,mirror:n,blockClass:o,blockSelector:s,maskTextClass:c,maskTextSelector:a,skipChild:!1,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:v,slimDOMOptions:S,dataURLOptions:w,inlineImages:f,recordCanvas:_,preserveWhiteSpace:z,onSerialize:R,onIframeLoad:L,iframeLoadTimeout:j,onStylesheetLoad:D,stylesheetLoadTimeout:Z,keepIframeSrcFn:G,enableStrictPrivacy:A});te&&D(e,te)}},Z),ze(e)===!1)||b.type===N.Element&&b.tagName==="link"&&b.attributes.rel==="stylesheet"&&(Ve(e,function(){if(D){var te=re(e,{doc:r,mirror:n,blockClass:o,blockSelector:s,maskTextClass:c,maskTextSelector:a,skipChild:!1,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:v,slimDOMOptions:S,dataURLOptions:w,inlineImages:f,recordCanvas:_,preserveWhiteSpace:z,onSerialize:R,onIframeLoad:L,iframeLoadTimeout:j,enableStrictPrivacy:A,onStylesheetLoad:D,stylesheetLoadTimeout:Z,keepIframeSrcFn:G});te&&D(e,te)}},Z),ze(e)===!1)?null:b}function qt(e,t){var r=t||{},n=r.mirror,o=n===void 0?new Pe:n,s=r.blockClass,c=s===void 0?"highlight-block":s,a=r.blockSelector,i=a===void 0?null:a,l=r.maskTextClass,d=l===void 0?"highlight-mask":l,p=r.maskTextSelector,m=p===void 0?null:p,u=r.inlineStylesheet,h=u===void 0?!0:u,v=r.inlineImages,S=v===void 0?!1:v,I=r.recordCanvas,w=I===void 0?!1:I,y=r.maskAllInputs,f=y===void 0?!1:y,O=r.maskTextFn,_=r.maskInputFn,R=r.slimDOM,L=R===void 0?!1:R,W=r.dataURLOptions,j=r.preserveWhiteSpace,D=r.onSerialize,K=r.onIframeLoad,Z=r.iframeLoadTimeout,F=r.onStylesheetLoad,G=r.stylesheetLoadTimeout,$=r.keepIframeSrcFn,ee=$===void 0?function(){return!1}:$,A=r.enableStrictPrivacy,J=A===void 0?!1:A,z=f===!0?{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}:f===!1?{password:!0}:f,H=L===!0||L==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:L==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:L===!1?{}:L;return re(e,{doc:e,mirror:o,blockClass:c,blockSelector:i,maskTextClass:d,maskTextSelector:m,skipChild:!1,inlineStylesheet:h,maskInputOptions:z,maskTextFn:O,maskInputFn:_,slimDOMOptions:H,dataURLOptions:W,inlineImages:S,recordCanvas:w,preserveWhiteSpace:j,onSerialize:D,onIframeLoad:K,iframeLoadTimeout:Z,onStylesheetLoad:F,stylesheetLoadTimeout:G,keepIframeSrcFn:ee,newlyAddedElement:!1,enableStrictPrivacy:J})}function U(e,t,r=document){const n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}const ae=`Please stop import mirror directly. Instead of that,\r
2
2
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
3
- or you can use record.mirror to access the mirror instance during recording.`;let je={map:{},getId(){return console.error(ae),-1},getNode(){return console.error(ae),null},removeNodeFromMap(){console.error(ae)},has(){return console.error(ae),!1},reset(){console.error(ae)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(je=new Proxy(je,{get(e,t,n){return t==="map"&&console.error(ae),Reflect.get(e,t,n)}}));function me(e,t,n={}){let r=null,o=0;return function(...s){const c=Date.now();!o&&n.leading===!1&&(o=c);const a=t-(c-o),i=this;a<=0||a>t?(r&&(clearTimeout(r),r=null),o=c,e.apply(i,s)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(i,s)},a))}}function Ce(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(c){setTimeout(()=>{n.set.call(this,c)},0),s&&s.set&&s.set.call(this,c)}}),()=>Ce(e,t,s||{},!0)}function se(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}function Ze(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ue(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}const en=e=>{try{if(e instanceof HTMLElement)return e.tagName==="CANVAS"}catch{return!1}return!1};function Y(e,t,n){if(!e)return!1;const r=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!r)return!1;if(typeof t=="string"){if(r.classList.contains(t)||n&&r.closest("."+t)!==null)return!0}else if(ke(r,t,n))return!0;return!1}function tn(e,t){return t.getId(e)!==-1}function Ne(e,t){return t.getId(e)===he}function Ye(e,t){if(de(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?Ye(e.parentNode,t):!0:!0}function He(e){return Boolean(e.changedTouches)}function nn(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function Xe(e,t){return Boolean(e.nodeName==="IFRAME"&&t.getMeta(e))}function Be(e,t){return Boolean(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Ke(e){return Boolean(e?.shadowRoot)}var T=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(T||{}),P=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e))(P||{}),xe=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(xe||{}),ie=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(ie||{}),fe=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e))(fe||{}),rn=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e))(rn||{});function $e(e){return"__ln"in e}class on{constructor(){this.length=0,this.head=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&$e(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&$e(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;this.length++}removeNode(t){const n=t.__ln;!this.head||(n.previous?(n.previous.next=n.next,n.next&&(n.next.previous=n.previous)):(this.head=n.next,this.head&&(this.head.previous=null)),t.__ln&&delete t.__ln,this.length--)}}const Je=(e,t)=>`${e}@${t}`;class an{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new on,r=a=>{let i=a,l=he;for(;l===he;)i=i&&i.nextSibling,l=i&&this.mirror.getId(i);return l},o=a=>{var i,l,d,p,m;const u=a.getRootNode?(i=a.getRootNode())==null?void 0:i.host:null;let h=u;for(;(d=(l=h?.getRootNode)==null?void 0:l.call(h))!=null&&d.host;)h=((m=(p=h?.getRootNode)==null?void 0:p.call(h))==null?void 0:m.host)||null;const v=!this.doc.contains(a)&&(!h||!this.doc.contains(h));if(!a.parentNode||v)return;const S=de(a.parentNode)?this.mirror.getId(u):this.mirror.getId(a.parentNode),I=r(a);if(S===-1||I===-1)return n.addNode(a);const w=ne(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,enableStrictPrivacy:this.enableStrictPrivacy,onSerialize:y=>{Xe(y,this.mirror)&&this.iframeManager.addIframe(y),Be(y,this.mirror)&&this.stylesheetManager.addStylesheet(y),Ke(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,document)},onIframeLoad:(y,f)=>{this.iframeManager.attachIframe(y,f,this.mirror),this.shadowDomManager.observeAttachShadow(y)},onStylesheetLoad:(y,f)=>{this.stylesheetManager.attachStylesheet(y,f,this.mirror)}});w&&t.push({parentId:S,nextId:I,node:w})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of Array.from(this.movedSet.values()))Qe(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||o(a);for(const a of Array.from(this.addedSet.values()))!et(this.droppedSet,a)&&!Qe(this.removes,a,this.mirror)||et(this.movedSet,a)?o(a):this.droppedSet.add(a);let s=null;for(;n.length;){let a=null;if(s){const i=this.mirror.getId(s.value.parentNode),l=r(s.value);i!==-1&&l!==-1&&(a=s)}if(!a)for(let i=n.length-1;i>=0;i--){const l=n.get(i);if(l){const d=this.mirror.getId(l.value.parentNode),p=r(l.value);if(d!==-1&&p!==-1){a=l;break}}}if(!a){for(;n.head;)n.removeNode(n.head.value);break}s=a.previous,n.removeNode(a.value),o(a.value)}const c={texts:this.texts.map(a=>{let i=a.value;return this.enableStrictPrivacy&&i&&(i=Ae(i)),{id:this.mirror.getId(a.node),value:i}}).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>({id:this.mirror.getId(a.node),attributes:a.attributes})).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:t};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(c))},this.processMutation=t=>{if(!Ne(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Y(t.target,this.blockClass,!1)&&n!==t.oldValue&&this.texts.push({value:Ge(t.target,this.maskTextClass,this.maskTextSelector)&&n?this.maskTextFn?this.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.target.getAttribute(t.attributeName);if(t.attributeName==="value"&&(r=Te({maskInputOptions:this.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:r,maskInputFn:this.maskInputFn})),Y(t.target,this.blockClass,!1)||r===t.oldValue)return;let o=this.attributes.find(s=>s.node===t.target);if(n.tagName==="IFRAME"&&t.attributeName==="src"&&!this.keepIframeSrcFn(r))if(!n.contentDocument)t.attributeName="rr_src";else return;if(o||(o={node:t.target,attributes:{}},this.attributes.push(o)),t.attributeName==="style"){const s=this.doc.createElement("span");t.oldValue&&s.setAttribute("style",t.oldValue),(o.attributes.style===void 0||o.attributes.style===null)&&(o.attributes.style={});const c=o.attributes.style;for(const a of Array.from(n.style)){const i=n.style.getPropertyValue(a),l=n.style.getPropertyPriority(a);(i!==s.style.getPropertyValue(a)||l!==s.style.getPropertyPriority(a))&&(l===""?c[a]=i:c[a]=[i,l])}for(const a of Array.from(s.style))n.style.getPropertyValue(a)===""&&(c[a]=!1)}else{if(t.target.tagName==="INPUT"){const s=t.target;if(s.type==="password"){o.attributes.value="*".repeat(s.value.length);break}}o.attributes[t.attributeName]=We(this.doc,n.tagName,t.attributeName,r)}break}case"childList":{if(Y(t.target,this.blockClass,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),o=de(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Y(t.target,this.blockClass,!1)||Ne(n,this.mirror)||!tn(n,this.mirror)||(this.addedSet.has(n)?(Ee(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||Ye(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Je(r,o)]?Ee(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:de(t.target)&&pe(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(this.mirror.hasNode(t)){if(Ne(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[Je(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Y(t,this.blockClass,!1)||t.childNodes.forEach(r=>this.genAdds(r))}}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","enableStrictPrivacy"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Ee(e,t){e.delete(t),t.childNodes.forEach(n=>Ee(e,n))}function Qe(e,t,n){return e.length===0?!1:qe(e,t,n)}function qe(e,t,n){const{parentNode:r}=t;if(!r)return!1;const o=n.getId(r);return e.some(s=>s.id===o)?!0:qe(e,r,n)}function et(e,t){return e.size===0?!1:tt(e,t)}function tt(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:tt(e,n):!1}var sn=Object.defineProperty,ln=Object.defineProperties,cn=Object.getOwnPropertyDescriptors,nt=Object.getOwnPropertySymbols,un=Object.prototype.hasOwnProperty,dn=Object.prototype.propertyIsEnumerable,rt=(e,t,n)=>t in e?sn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ot=(e,t)=>{for(var n in t||(t={}))un.call(t,n)&&rt(e,n,t[n]);if(nt)for(var n of nt(t))dn.call(t,n)&&rt(e,n,t[n]);return e},pn=(e,t)=>ln(e,cn(t));const re=[],at=typeof CSSGroupingRule<"u",st=typeof CSSMediaRule<"u",it=typeof CSSSupportsRule<"u",lt=typeof CSSConditionRule<"u";function ve(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch{return e.target}}function ct(e,t){var n,r;const o=new an;re.push(o),o.init(e);let s=window.MutationObserver||window.__rrMutationObserver;const c=(r=(n=window?.Zone)==null?void 0:n.__symbol__)==null?void 0:r.call(n,"MutationObserver");c&&window[c]&&(s=window[c]);const a=new s(o.processMutations.bind(o));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function hn({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const o=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let c=[],a;const i=me(p=>{const m=Date.now()-a;e(c.map(u=>(u.timeOffset-=m,u)),p),c=[],a=null},s),l=me(p=>{const m=ve(p),{clientX:u,clientY:h}=He(p)?p.changedTouches[0]:p;a||(a=Date.now()),c.push({x:u,y:h,id:r.getId(m),timeOffset:Date.now()-a}),i(typeof DragEvent<"u"&&p instanceof DragEvent?P.Drag:p instanceof MouseEvent?P.MouseMove:P.TouchMove)},o,{trailing:!1}),d=[U("mousemove",l,n),U("touchmove",l,n),U("drag",l,n)];return()=>{d.forEach(p=>p())}}function mn({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[],a=i=>l=>{const d=ve(l);if(Y(d,r,!0)||en(d))return;const p=He(l)?l.changedTouches[0]:l;if(!p)return;const m=n.getId(d),{clientX:u,clientY:h}=p;e({type:xe[i],id:m,x:u,y:h})};return Object.keys(xe).filter(i=>Number.isNaN(Number(i))&&!i.endsWith("_Departed")&&s[i]!==!1).forEach(i=>{const l=i.toLowerCase(),d=a(i);c.push(U(l,d,t))}),()=>{c.forEach(i=>i())}}function ut({scrollCb:e,doc:t,mirror:n,blockClass:r,sampling:o}){const s=me(c=>{const a=ve(c);if(!a||Y(a,r,!0))return;const i=n.getId(a);if(a===t){const l=t.scrollingElement||t.documentElement;e({id:i,x:l.scrollLeft,y:l.scrollTop})}else e({id:i,x:a.scrollLeft,y:a.scrollTop})},o.scroll||100);return U("scroll",s,t)}function fn({viewportResizeCb:e}){let t=-1,n=-1;const r=me(()=>{const o=Ze(),s=Ue();(t!==o||n!==s)&&(e({width:Number(s),height:Number(o)}),t=o,n=s)},200);return U("resize",r,window)}function dt(e,t){const n=ot({},e);return t||delete n.userTriggered,n}const vn=["INPUT","TEXTAREA","SELECT"],pt=new WeakMap;function yn({inputCb:e,doc:t,mirror:n,blockClass:r,ignoreClass:o,maskInputOptions:s,maskInputFn:c,sampling:a,userTriggeredOnInput:i}){function l(h){let v=ve(h);const S=h.isTrusted;if(v&&v.tagName==="OPTION"&&(v=v.parentElement),!v||!v.tagName||vn.indexOf(v.tagName)<0||Y(v,r,!0))return;const I=v.type;if(v.classList.contains(o))return;let w=v.value,y=!1;I==="radio"||I==="checkbox"?y=v.checked:(s[v.tagName.toLowerCase()]||s[I])&&(w=Te({maskInputOptions:s,tagName:v.tagName,type:I,value:w,maskInputFn:c})),d(v,dt({text:w,isChecked:y,userTriggered:S},i));const f=v.name;I==="radio"&&f&&y&&t.querySelectorAll(`input[type="radio"][name="${f}"]`).forEach(O=>{O!==v&&d(O,dt({text:O.value,isChecked:!y,userTriggered:!1},i))})}function d(h,v){const S=pt.get(h);if(!S||S.text!==v.text||S.isChecked!==v.isChecked){pt.set(h,v);const I=n.getId(h);e(pn(ot({},v),{id:I}))}}const p=(a.input==="last"?["change"]:["input","change"]).map(h=>U(h,l,t)),m=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),u=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return m&&m.set&&p.push(...u.map(h=>Ce(h[0],h[1],{set(){l({target:this})}}))),()=>{p.forEach(h=>h())}}function Ie(e){const t=[];function n(r,o){if(at&&r.parentRule instanceof CSSGroupingRule||st&&r.parentRule instanceof CSSMediaRule||it&&r.parentRule instanceof CSSSupportsRule||lt&&r.parentRule instanceof CSSConditionRule){const s=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(s)}else{const s=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(s)}return o}return n(e,t)}function gn({styleSheetRuleCb:e,mirror:t},{win:n}){const r=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=function(a,i){const l=t.getId(this.ownerNode);return l!==-1&&e({id:l,adds:[{rule:a,index:i}]}),r.apply(this,[a,i])};const o=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=function(a){const i=t.getId(this.ownerNode);return i!==-1&&e({id:i,removes:[{index:a}]}),o.apply(this,[a])};const s={};at?s.CSSGroupingRule=n.CSSGroupingRule:(st&&(s.CSSMediaRule=n.CSSMediaRule),lt&&(s.CSSConditionRule=n.CSSConditionRule),it&&(s.CSSSupportsRule=n.CSSSupportsRule));const c={};return Object.entries(s).forEach(([a,i])=>{c[a]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=function(l,d){const p=t.getId(this.parentStyleSheet.ownerNode);return p!==-1&&e({id:p,adds:[{rule:l,index:[...Ie(this),d||0]}]}),c[a].insertRule.apply(this,[l,d])},i.prototype.deleteRule=function(l){const d=t.getId(this.parentStyleSheet.ownerNode);return d!==-1&&e({id:d,removes:[{index:[...Ie(this),l]}]}),c[a].deleteRule.apply(this,[l])}}),()=>{n.CSSStyleSheet.prototype.insertRule=r,n.CSSStyleSheet.prototype.deleteRule=o,Object.entries(s).forEach(([a,i])=>{i.prototype.insertRule=c[a].insertRule,i.prototype.deleteRule=c[a].deleteRule})}}function bn({styleDeclarationCb:e,mirror:t},{win:n}){const r=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=function(s,c,a){var i,l;const d=t.getId((l=(i=this.parentRule)==null?void 0:i.parentStyleSheet)==null?void 0:l.ownerNode);return d!==-1&&e({id:d,set:{property:s,value:c,priority:a},index:Ie(this.parentRule)}),r.apply(this,[s,c,a])};const o=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=function(s){var c,a;const i=t.getId((a=(c=this.parentRule)==null?void 0:c.parentStyleSheet)==null?void 0:a.ownerNode);return i!==-1&&e({id:i,remove:{property:s},index:Ie(this.parentRule)}),o.apply(this,[s])},()=>{n.CSSStyleDeclaration.prototype.setProperty=r,n.CSSStyleDeclaration.prototype.removeProperty=o}}function Sn({mediaInteractionCb:e,blockClass:t,mirror:n,sampling:r}){const o=c=>me(a=>{const i=ve(a);if(!i||Y(i,t,!0))return;const{currentTime:l,volume:d,muted:p}=i;e({type:c,id:n.getId(i),currentTime:l,volume:d,muted:p})},r.media||500),s=[U("play",o(fe.Play)),U("pause",o(fe.Pause)),U("seeked",o(fe.Seeked)),U("volumechange",o(fe.VolumeChange))];return()=>{s.forEach(c=>c())}}function kn({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,s=n.FontFace;n.FontFace=function(a,i,l){const d=new s(a,i,l);return o.set(d,{family:a,buffer:typeof i!="string",descriptors:l,fontSource:typeof i=="string"?i:JSON.stringify(Array.from(new Uint8Array(i)))}),d};const c=se(t.fonts,"add",function(a){return function(i){return setTimeout(()=>{const l=o.get(i);l&&(e(l),o.delete(i))},0),a.apply(this,[i])}});return r.push(()=>{n.FontFace=s}),r.push(c),()=>{r.forEach(a=>a())}}function Cn(e,t){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:s,viewportResizeCb:c,inputCb:a,mediaInteractionCb:i,styleSheetRuleCb:l,styleDeclarationCb:d,canvasMutationCb:p,fontCb:m}=e;e.mutationCb=(...u)=>{t.mutation&&t.mutation(...u),n(...u)},e.mousemoveCb=(...u)=>{t.mousemove&&t.mousemove(...u),r(...u)},e.mouseInteractionCb=(...u)=>{t.mouseInteraction&&t.mouseInteraction(...u),o(...u)},e.scrollCb=(...u)=>{t.scroll&&t.scroll(...u),s(...u)},e.viewportResizeCb=(...u)=>{t.viewportResize&&t.viewportResize(...u),c(...u)},e.inputCb=(...u)=>{t.input&&t.input(...u),a(...u)},e.mediaInteractionCb=(...u)=>{t.mediaInteaction&&t.mediaInteaction(...u),i(...u)},e.styleSheetRuleCb=(...u)=>{t.styleSheetRule&&t.styleSheetRule(...u),l(...u)},e.styleDeclarationCb=(...u)=>{t.styleDeclaration&&t.styleDeclaration(...u),d(...u)},e.canvasMutationCb=(...u)=>{t.canvasMutation&&t.canvasMutation(...u),p(...u)},e.fontCb=(...u)=>{t.font&&t.font(...u),m(...u)}}function In(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};Cn(e,t);const r=ct(e,e.doc),o=hn(e),s=mn(e),c=ut(e),a=fn(e),i=yn(e),l=Sn(e),d=gn(e,{win:n}),p=bn(e,{win:n}),m=e.collectFonts?kn(e):()=>{},u=[];for(const h of e.plugins)u.push(h.observer(h.callback,n,h.options));return()=>{re.forEach(h=>h.reset()),r.disconnect(),o(),s(),c(),a(),i(),l(),d(),p(),m(),u.forEach(h=>h())}}class wn{constructor(t){this.iframes=new WeakMap,this.mutationCb=t.mutationCb}addIframe(t){this.iframes.set(t,!0)}addLoadListener(t){this.loadListener=t}attachIframe(t,n,r){var o;this.mutationCb({adds:[{parentId:r.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(o=this.loadListener)==null||o.call(this,t)}}var Mn=Object.defineProperty,Tn=Object.defineProperties,On=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,Ln=Object.prototype.hasOwnProperty,Nn=Object.prototype.propertyIsEnumerable,mt=(e,t,n)=>t in e?Mn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ft=(e,t)=>{for(var n in t||(t={}))Ln.call(t,n)&&mt(e,n,t[n]);if(ht)for(var n of ht(t))Nn.call(t,n)&&mt(e,n,t[n]);return e},vt=(e,t)=>Tn(e,On(t));class xn{constructor(t){this.restorePatches=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror;const n=this;this.restorePatches.push(se(HTMLElement.prototype,"attachShadow",function(r){return function(o){const s=r.call(this,o);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,this.ownerDocument),s}}))}addShadowRoot(t,n){!pe(t)||(ct(vt(ft({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),ut(vt(ft({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror})))}observeAttachShadow(t){if(t.contentWindow){const n=this;this.restorePatches.push(se(t.contentWindow.HTMLElement.prototype,"attachShadow",function(r){return function(o){const s=r.call(this,o);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,t.contentDocument),s}}))}}reset(){this.restorePatches.forEach(t=>t())}}for(var le="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",En=typeof Uint8Array>"u"?[]:new Uint8Array(256),we=0;we<le.length;we++)En[le.charCodeAt(we)]=we;var Rn=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=le[t[n]>>2],o+=le[(t[n]&3)<<4|t[n+1]>>4],o+=le[(t[n+1]&15)<<2|t[n+2]>>6],o+=le[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o};const yt=new Map;function Dn(e,t){let n=yt.get(e);return n||(n=new Map,yt.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const gt=(e,t,n)=>{if(!e||!(St(e,t)||typeof e=="object"))return;const r=e.constructor.name,o=Dn(n,r);let s=o.indexOf(e);return s===-1&&(s=o.length,o.push(e)),s};function Me(e,t,n){if(e instanceof Array)return e.map(r=>Me(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,o=Rn(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Me(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",o=e.toDataURL();return{rr_type:r,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Me(e.data,t,n),e.width,e.height]};if(St(e,t)||typeof e=="object"){const r=e.constructor.name,o=gt(e,t,n);return{rr_type:r,index:o}}}}return e}const bt=(e,t,n)=>[...e].map(r=>Me(r,t,n)),St=(e,t)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(r=>typeof t[r]=="function");return Boolean(n.find(r=>e instanceof t[r]))};function Fn(e,t,n,r){const o=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const c of s)try{if(typeof t.CanvasRenderingContext2D.prototype[c]!="function")continue;const a=se(t.CanvasRenderingContext2D.prototype,c,function(i){return function(...l){return Y(this.canvas,n,!0)||setTimeout(()=>{const d=bt([...l],t,this);e(this.canvas,{type:ie["2D"],property:c,args:d})},0),i.apply(this,l)}});o.push(a)}catch{const i=Ce(t.CanvasRenderingContext2D.prototype,c,{set(l){e(this.canvas,{type:ie["2D"],property:c,args:[l],setter:!0})}});o.push(i)}return()=>{o.forEach(c=>c())}}function kt(e,t){const n=[];try{const r=se(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(s,...c){return Y(this,t,!0)||"__context"in this||(this.__context=s),o.apply(this,[s,...c])}});n.push(r)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(r=>r())}}function Ct(e,t,n,r,o,s){const c=[],a=Object.getOwnPropertyNames(e);for(const i of a)try{if(typeof e[i]!="function")continue;const l=se(e,i,function(d){return function(...p){const m=d.apply(this,p);if(gt(m,s,e),!Y(this.canvas,r,!0)){const u=bt([...p],s,e),h={type:t,property:i,args:u};n(this.canvas,h)}return m}});c.push(l)}catch{const d=Ce(e,i,{set(p){n(this.canvas,{type:t,property:i,args:[p],setter:!0})}});c.push(d)}return c}function Pn(e,t,n,r){const o=[];return o.push(...Ct(t.WebGLRenderingContext.prototype,ie.WebGL,e,n,r,t)),typeof t.WebGL2RenderingContext<"u"&&o.push(...Ct(t.WebGL2RenderingContext.prototype,ie.WebGL2,e,n,r,t)),()=>{o.forEach(s=>s())}}function An(e,t){var n=atob(e);if(t){for(var r=new Uint8Array(n.length),o=0,s=n.length;o<s;++o)r[o]=n.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}function _n(e,t,n){var r=t===void 0?null:t,o=n===void 0?!1:n,s=An(e,o),c=s.indexOf(`
4
- `,10)+1,a=s.substring(c)+(r?"//# sourceMappingURL="+r:""),i=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(i)}function Wn(e,t,n){var r;return function(s){return r=r||_n(e,t,n),new Worker(r,s)}}var Gn=Wn("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Zm9yKHZhciByPSJBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OSsvIixsPXR5cGVvZiBVaW50OEFycmF5PiJ1Ij9bXTpuZXcgVWludDhBcnJheSgyNTYpLGY9MDtmPHIubGVuZ3RoO2YrKylsW3IuY2hhckNvZGVBdChmKV09Zjt2YXIgZD1mdW5jdGlvbihzKXt2YXIgZT1uZXcgVWludDhBcnJheShzKSxuLGE9ZS5sZW5ndGgsdD0iIjtmb3Iobj0wO248YTtuKz0zKXQrPXJbZVtuXT4+Ml0sdCs9clsoZVtuXSYzKTw8NHxlW24rMV0+PjRdLHQrPXJbKGVbbisxXSYxNSk8PDJ8ZVtuKzJdPj42XSx0Kz1yW2VbbisyXSY2M107cmV0dXJuIGElMz09PTI/dD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTEpKyI9IjphJTM9PT0xJiYodD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTIpKyI9PSIpLHR9O2NvbnN0IGM9bmV3IE1hcCx1PW5ldyBNYXA7YXN5bmMgZnVuY3Rpb24gcChzLGUpe2NvbnN0IG49YCR7c30tJHtlfWA7aWYodS5oYXMobikpcmV0dXJuIHUuZ2V0KG4pO2NvbnN0IGE9bmV3IE9mZnNjcmVlbkNhbnZhcyhzLGUpO2EuZ2V0Q29udGV4dCgiMmQiKTtjb25zdCB0PWF3YWl0KGF3YWl0IGEuY29udmVydFRvQmxvYigpKS5hcnJheUJ1ZmZlcigpLGc9ZCh0KTtyZXR1cm4gdS5zZXQobixnKSxnfWNvbnN0IGk9c2VsZjtpLm9ubWVzc2FnZT1hc3luYyBmdW5jdGlvbihzKXtpZighKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcykpcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOnMuZGF0YS5pZH0pO2NvbnN0e2lkOmUsYml0bWFwOm4sd2lkdGg6YSxoZWlnaHQ6dH09cy5kYXRhLGc9cChhLHQpLGg9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2guZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCB3PWF3YWl0IGguY29udmVydFRvQmxvYigpLHk9dy50eXBlLGI9YXdhaXQgdy5hcnJheUJ1ZmZlcigpLG89ZChiKTtpZighYy5oYXMoZSkmJmF3YWl0IGc9PT1vKXJldHVybiBjLnNldChlLG8pLGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpZihjLmdldChlKT09PW8pcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpLnBvc3RNZXNzYWdlKHtpZDplLHR5cGU6eSxiYXNlNjQ6byx3aWR0aDphLGhlaWdodDp0fSksYy5zZXQoZSxvKX19KSgpOwoK",null,!1),It=Object.getOwnPropertySymbols,zn=Object.prototype.hasOwnProperty,Vn=Object.prototype.propertyIsEnumerable,jn=(e,t)=>{var n={};for(var r in e)zn.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&It)for(var r of It(e))t.indexOf(r)<0&&Vn.call(e,r)&&(n[r]=e[r]);return n},Zn=(e,t,n)=>new Promise((r,o)=>{var s=i=>{try{a(n.next(i))}catch(l){o(l)}},c=i=>{try{a(n.throw(i))}catch(l){o(l)}},a=i=>i.done?r(i.value):Promise.resolve(i.value).then(s,c);a((n=n.apply(e,t)).next())});class Un{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(c,a)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(c)||this.pendingCanvasMutations.set(c,[]),this.pendingCanvasMutations.get(c).push(a)};const{sampling:n="all",win:r,blockClass:o,recordCanvas:s}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,s&&n==="all"&&this.initCanvasMutationObserver(r,o),s&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,o)}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,n,r){const o=kt(n,r),s=new Map,c=new Gn;c.onmessage=p=>{const{id:m}=p.data;if(s.set(m,!1),!("base64"in p.data))return;const{base64:u,type:h,width:v,height:S}=p.data;this.mutationCb({id:m,type:ie["2D"],commands:[{property:"clearRect",args:[0,0,v,S]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:u}],type:h}]},0,0]}]})};const a=1e3/t;let i=0,l;const d=p=>{if(i&&p-i<a){l=requestAnimationFrame(d);return}i=p,n.document.querySelectorAll(`canvas:not(.${r} *)`).forEach(m=>Zn(this,null,function*(){var u;const h=this.mirror.getId(m);if(s.get(h))return;if(s.set(h,!0),["webgl","webgl2"].includes(m.__context)){const S=m.getContext(m.__context);((u=S?.getContextAttributes())==null?void 0:u.preserveDrawingBuffer)===!1&&S?.clear(S.COLOR_BUFFER_BIT)}if(m.width===0||m.height===0)return;const v=yield createImageBitmap(m);c.postMessage({id:h,bitmap:v,width:m.width,height:m.height},[v])})),l=requestAnimationFrame(d)};l=requestAnimationFrame(d),this.resetObservers=()=>{o(),cancelAnimationFrame(l)}}initCanvasMutationObserver(t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=kt(t,n),o=Fn(this.processMutation.bind(this),t,n,this.mirror),s=Pn(this.processMutation.bind(this),t,n,this.mirror);this.resetObservers=()=>{r(),o(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const o=r.map(c=>jn(c,["type"])),{type:s}=r[0];this.mutationCb({id:n,type:s,commands:o}),this.pendingCanvasMutations.delete(t)}}class Yn{constructor(t){this.trackedStylesheets=new WeakSet,this.mutationCb=t.mutationCb}addStylesheet(t){this.trackedStylesheets.has(t)||(this.trackedStylesheets.add(t),this.trackStylesheet(t))}trackStylesheet(t){}attachStylesheet(t,n,r){this.mutationCb({adds:[{parentId:r.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[]}),this.addStylesheet(t)}}var Hn=Object.defineProperty,Xn=Object.defineProperties,Bn=Object.getOwnPropertyDescriptors,wt=Object.getOwnPropertySymbols,Kn=Object.prototype.hasOwnProperty,$n=Object.prototype.propertyIsEnumerable,Mt=(e,t,n)=>t in e?Hn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B=(e,t)=>{for(var n in t||(t={}))Kn.call(t,n)&&Mt(e,n,t[n]);if(wt)for(var n of wt(t))$n.call(t,n)&&Mt(e,n,t[n]);return e},Jn=(e,t)=>Xn(e,Bn(t));function E(e){return Jn(B({},e),{timestamp:Date.now()})}let x,ye;const Q=Nt();function ge(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="highlight-block",blockSelector:s=null,ignoreClass:c="highlight-ignore",maskTextClass:a="highlight-mask",maskTextSelector:i=null,inlineStylesheet:l=!0,maskAllInputs:d,maskInputOptions:p,slimDOMOptions:m,maskInputFn:u,maskTextFn:h,hooks:v,packFn:S,sampling:I={},mousemoveWait:w,recordCanvas:y=!1,userTriggeredOnInput:f=!1,collectFonts:O=!1,inlineImages:_=!1,plugins:R,keepIframeSrcFn:L=()=>!1,enableStrictPrivacy:W=!1}=e;if(!t)throw new Error("emit function is required");w!==void 0&&I.mousemove===void 0&&(I.mousemove=w),Q.reset();const j=d===!0?{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}:p!==void 0?p:{password:!0},D=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all"}:m||{};nn();let K,Z=0;const F=g=>{for(const b of R||[])b.eventProcessor&&(g=b.eventProcessor(g));return S&&(g=S(g)),g};x=(g,b)=>{var X;if(((X=re[0])==null?void 0:X.isFrozen())&&g.type!==T.FullSnapshot&&!(g.type===T.IncrementalSnapshot&&g.data.source===P.Mutation)&&re.forEach(V=>V.unfreeze()),t(F(g),b),g.type===T.FullSnapshot)K=g,Z=0;else if(g.type===T.IncrementalSnapshot){if(g.data.source===P.Mutation&&g.data.isAttachIframe)return;Z++;const V=r&&Z>=r,q=n&&g.timestamp-K.timestamp>n;(V||q)&&ye(!0)}};const G=g=>{x(E({type:T.IncrementalSnapshot,data:B({source:P.Mutation},g)}))},$=g=>x(E({type:T.IncrementalSnapshot,data:B({source:P.Scroll},g)})),ee=g=>x(E({type:T.IncrementalSnapshot,data:B({source:P.CanvasMutation},g)})),A=new wn({mutationCb:G}),J=new Yn({mutationCb:G}),z=new Un({recordCanvas:y,mutationCb:ee,win:window,blockClass:o,mirror:Q,sampling:I.canvas}),H=new xn({mutationCb:G,scrollCb:$,bypassOptions:{blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:i,inlineStylesheet:l,maskInputOptions:j,maskTextFn:h,maskInputFn:u,recordCanvas:y,inlineImages:_,sampling:I,slimDOMOptions:D,iframeManager:A,stylesheetManager:J,canvasManager:z,keepIframeSrcFn:L,enableStrictPrivacy:W},mirror:Q});ye=(g=!1)=>{var b,X,V,q;x(E({type:T.Meta,data:{href:window.location.href,width:Ue(),height:Ze()}}),g),re.forEach(M=>M.lock());const k=qt(document,{mirror:Q,blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:i,inlineStylesheet:l,maskAllInputs:j,maskTextFn:h,slimDOM:D,recordCanvas:y,inlineImages:_,enableStrictPrivacy:W,onSerialize:M=>{Xe(M,Q)&&A.addIframe(M),Be(M,Q)&&J.addStylesheet(M),Ke(M)&&H.addShadowRoot(M.shadowRoot,document)},onIframeLoad:(M,ce)=>{A.attachIframe(M,ce,Q),H.observeAttachShadow(M)},onStylesheetLoad:(M,ce)=>{J.attachStylesheet(M,ce,Q)},keepIframeSrcFn:L});if(!k)return console.warn("Failed to snapshot the document");x(E({type:T.FullSnapshot,data:{node:k,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:document?.documentElement.scrollLeft||((X=(b=document?.body)==null?void 0:b.parentElement)==null?void 0:X.scrollLeft)||document?.body.scrollLeft||0,top:window.pageYOffset!==void 0?window.pageYOffset:document?.documentElement.scrollTop||((q=(V=document?.body)==null?void 0:V.parentElement)==null?void 0:q.scrollTop)||document?.body.scrollTop||0}}})),re.forEach(M=>M.unlock())};try{const g=[];g.push(U("DOMContentLoaded",()=>{x(E({type:T.DomContentLoaded,data:{}}))}));const b=V=>{var q;return In({mutationCb:G,mousemoveCb:(k,M)=>x(E({type:T.IncrementalSnapshot,data:{source:M,positions:k}})),mouseInteractionCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.MouseInteraction},k)})),scrollCb:$,viewportResizeCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.ViewportResize},k)})),inputCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.Input},k)})),mediaInteractionCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.MediaInteraction},k)})),styleSheetRuleCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.StyleSheetRule},k)})),styleDeclarationCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.StyleDeclaration},k)})),canvasMutationCb:ee,fontCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.Font},k)})),blockClass:o,ignoreClass:c,maskTextClass:a,maskTextSelector:i,maskInputOptions:j,inlineStylesheet:l,sampling:I,recordCanvas:y,inlineImages:_,userTriggeredOnInput:f,collectFonts:O,doc:V,maskInputFn:u,maskTextFn:h,keepIframeSrcFn:L,blockSelector:s,slimDOMOptions:D,mirror:Q,iframeManager:A,stylesheetManager:J,shadowDomManager:H,canvasManager:z,enableStrictPrivacy:W,plugins:((q=R?.filter(k=>k.observer))==null?void 0:q.map(k=>({observer:k.observer,options:k.options,callback:M=>x(E({type:T.Plugin,data:{plugin:k.name,payload:M}}))})))||[]},v)};A.addLoadListener(V=>{g.push(b(V.contentDocument))});const X=()=>{ye(),g.push(b(document))};return document.readyState==="interactive"||document.readyState==="complete"?X():g.push(U("load",()=>{x(E({type:T.Load,data:{}})),X()},window)),()=>{g.forEach(V=>V())}}catch(g){console.warn(g)}}return ge.addCustomEvent=(e,t)=>{!x||x(E({type:T.Custom,data:{tag:e,payload:t}}))},ge.freezePage=()=>{re.forEach(e=>e.freeze())},ge.takeFullSnapshot=e=>{if(!ye)throw new Error("please take full snapshot after start recording");ye(e)},ge.mirror=Q,ge}();
3
+ or you can use record.mirror to access the mirror instance during recording.`;let je={map:{},getId(){return console.error(ae),-1},getNode(){return console.error(ae),null},removeNodeFromMap(){console.error(ae)},has(){return console.error(ae),!1},reset(){console.error(ae)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(je=new Proxy(je,{get(e,t,r){return t==="map"&&console.error(ae),Reflect.get(e,t,r)}}));function me(e,t,r={}){let n=null,o=0;return function(...s){const c=Date.now();!o&&r.leading===!1&&(o=c);const a=t-(c-o),i=this;a<=0||a>t?(n&&(clearTimeout(n),n=null),o=c,e.apply(i,s)):!n&&r.trailing!==!1&&(n=setTimeout(()=>{o=r.leading===!1?0:Date.now(),n=null,e.apply(i,s)},a))}}function Ce(e,t,r,n,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,n?r:{set(c){setTimeout(()=>{r.set.call(this,c)},0),s&&s.set&&s.set.call(this,c)}}),()=>Ce(e,t,s||{},!0)}function se(e,t,r){try{if(!(t in e))return()=>{};const n=e[t],o=r(n);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=o,()=>{e[t]=n}}catch{return()=>{}}}function Ze(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ue(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}const er=e=>{try{if(e instanceof HTMLElement)return e.tagName==="CANVAS"}catch{return!1}return!1};function Y(e,t,r){if(!e)return!1;const n=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!n)return!1;if(typeof t=="string"){if(n.classList.contains(t)||r&&n.closest("."+t)!==null)return!0}else if(ke(n,t,r))return!0;return!1}function tr(e,t){return t.getId(e)!==-1}function xe(e,t){return t.getId(e)===he}function Ye(e,t){if(de(e))return!1;const r=t.getId(e);return t.has(r)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?Ye(e.parentNode,t):!0:!0}function He(e){return Boolean(e.changedTouches)}function rr(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let r=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===r)return!0;while(r=r&&r.parentNode);return!1})}function Xe(e,t){return Boolean(e.nodeName==="IFRAME"&&t.getMeta(e))}function Be(e,t){return Boolean(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Ke(e){return Boolean(e?.shadowRoot)}var T=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(T||{}),P=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e))(P||{}),Ee=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Ee||{}),ie=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(ie||{}),fe=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e))(fe||{}),nr=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e))(nr||{});function $e(e){return"__ln"in e}class or{constructor(){this.length=0,this.head=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let n=0;n<t;n++)r=r?.next||null;return r}addNode(t){const r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&$e(t.previousSibling)){const n=t.previousSibling.__ln.next;r.next=n,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,n&&(n.previous=r)}else if(t.nextSibling&&$e(t.nextSibling)&&t.nextSibling.__ln.previous){const n=t.nextSibling.__ln.previous;r.previous=n,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,n&&(n.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;this.length++}removeNode(t){const r=t.__ln;!this.head||(r.previous?(r.previous.next=r.next,r.next&&(r.next.previous=r.previous)):(this.head=r.next,this.head&&(this.head.previous=null)),t.__ln&&delete t.__ln,this.length--)}}const Je=(e,t)=>`${e}@${t}`;class ar{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],r=new or,n=a=>{let i=a,l=he;for(;l===he;)i=i&&i.nextSibling,l=i&&this.mirror.getId(i);return l},o=a=>{var i,l,d,p,m;const u=a.getRootNode?(i=a.getRootNode())==null?void 0:i.host:null;let h=u;for(;(d=(l=h?.getRootNode)==null?void 0:l.call(h))!=null&&d.host;)h=((m=(p=h?.getRootNode)==null?void 0:p.call(h))==null?void 0:m.host)||null;const v=!this.doc.contains(a)&&(!h||!this.doc.contains(h));if(!a.parentNode||v)return;const S=de(a.parentNode)?this.mirror.getId(u):this.mirror.getId(a.parentNode),I=n(a);if(S===-1||I===-1)return r.addNode(a);const w=re(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,enableStrictPrivacy:this.enableStrictPrivacy,onSerialize:y=>{Xe(y,this.mirror)&&this.iframeManager.addIframe(y),Be(y,this.mirror)&&this.stylesheetManager.addStylesheet(y),Ke(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,document)},onIframeLoad:(y,f)=>{this.iframeManager.attachIframe(y,f,this.mirror),this.shadowDomManager.observeAttachShadow(y)},onStylesheetLoad:(y,f)=>{this.stylesheetManager.attachStylesheet(y,f,this.mirror)}});w&&t.push({parentId:S,nextId:I,node:w})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of Array.from(this.movedSet.values()))Qe(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||o(a);for(const a of Array.from(this.addedSet.values()))!et(this.droppedSet,a)&&!Qe(this.removes,a,this.mirror)||et(this.movedSet,a)?o(a):this.droppedSet.add(a);let s=null;for(;r.length;){let a=null;if(s){const i=this.mirror.getId(s.value.parentNode),l=n(s.value);i!==-1&&l!==-1&&(a=s)}if(!a)for(let i=r.length-1;i>=0;i--){const l=r.get(i);if(l){const d=this.mirror.getId(l.value.parentNode),p=n(l.value);if(d!==-1&&p!==-1){a=l;break}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}s=a.previous,r.removeNode(a.value),o(a.value)}const c={texts:this.texts.map(a=>{let i=a.value;return this.enableStrictPrivacy&&i&&(i=Oe(i)),{id:this.mirror.getId(a.node),value:i}}).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>({id:this.mirror.getId(a.node),attributes:a.attributes})).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:t};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(c))},this.processMutation=t=>{if(!xe(t.target,this.mirror))switch(t.type){case"characterData":{const r=t.target.textContent;!Y(t.target,this.blockClass,!1)&&r!==t.oldValue&&this.texts.push({value:Ge(t.target,this.maskTextClass,this.maskTextSelector)&&r?this.maskTextFn?this.maskTextFn(r):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{const r=t.target;let n=t.target.getAttribute(t.attributeName);if(t.attributeName==="value"&&(n=Te({maskInputOptions:this.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:n,maskInputFn:this.maskInputFn})),Y(t.target,this.blockClass,!1)||n===t.oldValue)return;let o=this.attributes.find(s=>s.node===t.target);if(r.tagName==="IFRAME"&&t.attributeName==="src"&&!this.keepIframeSrcFn(n))if(!r.contentDocument)t.attributeName="rr_src";else return;if(o||(o={node:t.target,attributes:{}},this.attributes.push(o)),t.attributeName==="style"){const s=this.doc.createElement("span");t.oldValue&&s.setAttribute("style",t.oldValue),(o.attributes.style===void 0||o.attributes.style===null)&&(o.attributes.style={});const c=o.attributes.style;for(const a of Array.from(r.style)){const i=r.style.getPropertyValue(a),l=r.style.getPropertyPriority(a);(i!==s.style.getPropertyValue(a)||l!==s.style.getPropertyPriority(a))&&(l===""?c[a]=i:c[a]=[i,l])}for(const a of Array.from(s.style))r.style.getPropertyValue(a)===""&&(c[a]=!1)}else{if(t.target.tagName==="INPUT"){const s=t.target;if(s.type==="password"){o.attributes.value="*".repeat(s.value.length);break}}o.attributes[t.attributeName]=We(this.doc,r.tagName,t.attributeName,n)}break}case"childList":{if(Y(t.target,this.blockClass,!0))return;t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{const n=this.mirror.getId(r),o=de(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Y(t.target,this.blockClass,!1)||xe(r,this.mirror)||!tr(r,this.mirror)||(this.addedSet.has(r)?(Re(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&n===-1||Ye(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Je(n,o)]?Re(this.movedSet,r):this.removes.push({parentId:o,id:n,isShadow:de(t.target)&&pe(t.target)?!0:void 0})),this.mapRemoves.push(r))});break}}},this.genAdds=(t,r)=>{if(this.mirror.hasNode(t)){if(xe(t,this.mirror))return;this.movedSet.add(t);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[Je(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Y(t,this.blockClass,!1)||t.childNodes.forEach(n=>this.genAdds(n))}}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","enableStrictPrivacy"].forEach(r=>{this[r]=t[r]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Re(e,t){e.delete(t),t.childNodes.forEach(r=>Re(e,r))}function Qe(e,t,r){return e.length===0?!1:qe(e,t,r)}function qe(e,t,r){const{parentNode:n}=t;if(!n)return!1;const o=r.getId(n);return e.some(s=>s.id===o)?!0:qe(e,n,r)}function et(e,t){return e.size===0?!1:tt(e,t)}function tt(e,t){const{parentNode:r}=t;return r?e.has(r)?!0:tt(e,r):!1}var sr=Object.defineProperty,ir=Object.defineProperties,lr=Object.getOwnPropertyDescriptors,rt=Object.getOwnPropertySymbols,cr=Object.prototype.hasOwnProperty,ur=Object.prototype.propertyIsEnumerable,nt=(e,t,r)=>t in e?sr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ot=(e,t)=>{for(var r in t||(t={}))cr.call(t,r)&&nt(e,r,t[r]);if(rt)for(var r of rt(t))ur.call(t,r)&&nt(e,r,t[r]);return e},dr=(e,t)=>ir(e,lr(t));const ne=[],at=typeof CSSGroupingRule<"u",st=typeof CSSMediaRule<"u",it=typeof CSSSupportsRule<"u",lt=typeof CSSConditionRule<"u";function ve(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch{return e.target}}function ct(e,t){var r,n;const o=new ar;ne.push(o),o.init(e);let s=window.MutationObserver||window.__rrMutationObserver;const c=(n=(r=window?.Zone)==null?void 0:r.__symbol__)==null?void 0:n.call(r,"MutationObserver");c&&window[c]&&(s=window[c]);const a=new s(o.processMutations.bind(o));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function pr({mousemoveCb:e,sampling:t,doc:r,mirror:n}){if(t.mousemove===!1)return()=>{};const o=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let c=[],a;const i=me(p=>{const m=Date.now()-a;e(c.map(u=>(u.timeOffset-=m,u)),p),c=[],a=null},s),l=me(p=>{const m=ve(p),{clientX:u,clientY:h}=He(p)?p.changedTouches[0]:p;a||(a=Date.now()),c.push({x:u,y:h,id:n.getId(m),timeOffset:Date.now()-a}),i(typeof DragEvent<"u"&&p instanceof DragEvent?P.Drag:p instanceof MouseEvent?P.MouseMove:P.TouchMove)},o,{trailing:!1}),d=[U("mousemove",l,r),U("touchmove",l,r),U("drag",l,r)];return()=>{d.forEach(p=>p())}}function hr({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[],a=i=>l=>{const d=ve(l);if(Y(d,n,!0)||er(d))return;const p=He(l)?l.changedTouches[0]:l;if(!p)return;const m=r.getId(d),{clientX:u,clientY:h}=p;e({type:Ee[i],id:m,x:u,y:h})};return Object.keys(Ee).filter(i=>Number.isNaN(Number(i))&&!i.endsWith("_Departed")&&s[i]!==!1).forEach(i=>{const l=i.toLowerCase(),d=a(i);c.push(U(l,d,t))}),()=>{c.forEach(i=>i())}}function ut({scrollCb:e,doc:t,mirror:r,blockClass:n,sampling:o}){const s=me(c=>{const a=ve(c);if(!a||Y(a,n,!0))return;const i=r.getId(a);if(a===t){const l=t.scrollingElement||t.documentElement;e({id:i,x:l.scrollLeft,y:l.scrollTop})}else e({id:i,x:a.scrollLeft,y:a.scrollTop})},o.scroll||100);return U("scroll",s,t)}function mr({viewportResizeCb:e}){let t=-1,r=-1;const n=me(()=>{const o=Ze(),s=Ue();(t!==o||r!==s)&&(e({width:Number(s),height:Number(o)}),t=o,r=s)},200);return U("resize",n,window)}function dt(e,t){const r=ot({},e);return t||delete r.userTriggered,r}const fr=["INPUT","TEXTAREA","SELECT"],pt=new WeakMap;function vr({inputCb:e,doc:t,mirror:r,blockClass:n,ignoreClass:o,maskInputOptions:s,maskInputFn:c,sampling:a,userTriggeredOnInput:i}){function l(h){let v=ve(h);const S=h.isTrusted;if(v&&v.tagName==="OPTION"&&(v=v.parentElement),!v||!v.tagName||fr.indexOf(v.tagName)<0||Y(v,n,!0))return;const I=v.type;if(v.classList.contains(o))return;let w=v.value,y=!1;I==="radio"||I==="checkbox"?y=v.checked:(s[v.tagName.toLowerCase()]||s[I])&&(w=Te({maskInputOptions:s,tagName:v.tagName,type:I,value:w,maskInputFn:c})),d(v,dt({text:w,isChecked:y,userTriggered:S},i));const f=v.name;I==="radio"&&f&&y&&t.querySelectorAll(`input[type="radio"][name="${f}"]`).forEach(O=>{O!==v&&d(O,dt({text:O.value,isChecked:!y,userTriggered:!1},i))})}function d(h,v){const S=pt.get(h);if(!S||S.text!==v.text||S.isChecked!==v.isChecked){pt.set(h,v);const I=r.getId(h);e(dr(ot({},v),{id:I}))}}const p=(a.input==="last"?["change"]:["input","change"]).map(h=>U(h,l,t)),m=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),u=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return m&&m.set&&p.push(...u.map(h=>Ce(h[0],h[1],{set(){l({target:this})}}))),()=>{p.forEach(h=>h())}}function Ie(e){const t=[];function r(n,o){if(at&&n.parentRule instanceof CSSGroupingRule||st&&n.parentRule instanceof CSSMediaRule||it&&n.parentRule instanceof CSSSupportsRule||lt&&n.parentRule instanceof CSSConditionRule){const s=Array.from(n.parentRule.cssRules).indexOf(n);o.unshift(s)}else{const s=Array.from(n.parentStyleSheet.cssRules).indexOf(n);o.unshift(s)}return o}return r(e,t)}function yr({styleSheetRuleCb:e,mirror:t},{win:r}){const n=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=function(a,i){const l=t.getId(this.ownerNode);return l!==-1&&e({id:l,adds:[{rule:a,index:i}]}),n.apply(this,[a,i])};const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=function(a){const i=t.getId(this.ownerNode);return i!==-1&&e({id:i,removes:[{index:a}]}),o.apply(this,[a])};const s={};at?s.CSSGroupingRule=r.CSSGroupingRule:(st&&(s.CSSMediaRule=r.CSSMediaRule),lt&&(s.CSSConditionRule=r.CSSConditionRule),it&&(s.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(s).forEach(([a,i])=>{c[a]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=function(l,d){const p=t.getId(this.parentStyleSheet.ownerNode);return p!==-1&&e({id:p,adds:[{rule:l,index:[...Ie(this),d||0]}]}),c[a].insertRule.apply(this,[l,d])},i.prototype.deleteRule=function(l){const d=t.getId(this.parentStyleSheet.ownerNode);return d!==-1&&e({id:d,removes:[{index:[...Ie(this),l]}]}),c[a].deleteRule.apply(this,[l])}}),()=>{r.CSSStyleSheet.prototype.insertRule=n,r.CSSStyleSheet.prototype.deleteRule=o,Object.entries(s).forEach(([a,i])=>{i.prototype.insertRule=c[a].insertRule,i.prototype.deleteRule=c[a].deleteRule})}}function gr({styleDeclarationCb:e,mirror:t},{win:r}){const n=r.CSSStyleDeclaration.prototype.setProperty;r.CSSStyleDeclaration.prototype.setProperty=function(s,c,a){var i,l;const d=t.getId((l=(i=this.parentRule)==null?void 0:i.parentStyleSheet)==null?void 0:l.ownerNode);return d!==-1&&e({id:d,set:{property:s,value:c,priority:a},index:Ie(this.parentRule)}),n.apply(this,[s,c,a])};const o=r.CSSStyleDeclaration.prototype.removeProperty;return r.CSSStyleDeclaration.prototype.removeProperty=function(s){var c,a;const i=t.getId((a=(c=this.parentRule)==null?void 0:c.parentStyleSheet)==null?void 0:a.ownerNode);return i!==-1&&e({id:i,remove:{property:s},index:Ie(this.parentRule)}),o.apply(this,[s])},()=>{r.CSSStyleDeclaration.prototype.setProperty=n,r.CSSStyleDeclaration.prototype.removeProperty=o}}function br({mediaInteractionCb:e,blockClass:t,mirror:r,sampling:n}){const o=c=>me(a=>{const i=ve(a);if(!i||Y(i,t,!0))return;const{currentTime:l,volume:d,muted:p}=i;e({type:c,id:r.getId(i),currentTime:l,volume:d,muted:p})},n.media||500),s=[U("play",o(fe.Play)),U("pause",o(fe.Pause)),U("seeked",o(fe.Seeked)),U("volumechange",o(fe.VolumeChange))];return()=>{s.forEach(c=>c())}}function Sr({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const n=[],o=new WeakMap,s=r.FontFace;r.FontFace=function(a,i,l){const d=new s(a,i,l);return o.set(d,{family:a,buffer:typeof i!="string",descriptors:l,fontSource:typeof i=="string"?i:JSON.stringify(Array.from(new Uint8Array(i)))}),d};const c=se(t.fonts,"add",function(a){return function(i){return setTimeout(()=>{const l=o.get(i);l&&(e(l),o.delete(i))},0),a.apply(this,[i])}});return n.push(()=>{r.FontFace=s}),n.push(c),()=>{n.forEach(a=>a())}}function kr(e,t){const{mutationCb:r,mousemoveCb:n,mouseInteractionCb:o,scrollCb:s,viewportResizeCb:c,inputCb:a,mediaInteractionCb:i,styleSheetRuleCb:l,styleDeclarationCb:d,canvasMutationCb:p,fontCb:m}=e;e.mutationCb=(...u)=>{t.mutation&&t.mutation(...u),r(...u)},e.mousemoveCb=(...u)=>{t.mousemove&&t.mousemove(...u),n(...u)},e.mouseInteractionCb=(...u)=>{t.mouseInteraction&&t.mouseInteraction(...u),o(...u)},e.scrollCb=(...u)=>{t.scroll&&t.scroll(...u),s(...u)},e.viewportResizeCb=(...u)=>{t.viewportResize&&t.viewportResize(...u),c(...u)},e.inputCb=(...u)=>{t.input&&t.input(...u),a(...u)},e.mediaInteractionCb=(...u)=>{t.mediaInteaction&&t.mediaInteaction(...u),i(...u)},e.styleSheetRuleCb=(...u)=>{t.styleSheetRule&&t.styleSheetRule(...u),l(...u)},e.styleDeclarationCb=(...u)=>{t.styleDeclaration&&t.styleDeclaration(...u),d(...u)},e.canvasMutationCb=(...u)=>{t.canvasMutation&&t.canvasMutation(...u),p(...u)},e.fontCb=(...u)=>{t.font&&t.font(...u),m(...u)}}function Cr(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};kr(e,t);const n=ct(e,e.doc),o=pr(e),s=hr(e),c=ut(e),a=mr(e),i=vr(e),l=br(e),d=yr(e,{win:r}),p=gr(e,{win:r}),m=e.collectFonts?Sr(e):()=>{},u=[];for(const h of e.plugins)u.push(h.observer(h.callback,r,h.options));return()=>{ne.forEach(h=>h.reset()),n.disconnect(),o(),s(),c(),a(),i(),l(),d(),p(),m(),u.forEach(h=>h())}}class Ir{constructor(t){this.iframes=new WeakMap,this.mutationCb=t.mutationCb}addIframe(t){this.iframes.set(t,!0)}addLoadListener(t){this.loadListener=t}attachIframe(t,r,n){var o;this.mutationCb({adds:[{parentId:n.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(o=this.loadListener)==null||o.call(this,t)}}var wr=Object.defineProperty,Mr=Object.defineProperties,Tr=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,Or=Object.prototype.hasOwnProperty,Lr=Object.prototype.propertyIsEnumerable,mt=(e,t,r)=>t in e?wr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ft=(e,t)=>{for(var r in t||(t={}))Or.call(t,r)&&mt(e,r,t[r]);if(ht)for(var r of ht(t))Lr.call(t,r)&&mt(e,r,t[r]);return e},vt=(e,t)=>Mr(e,Tr(t));class Nr{constructor(t){this.restorePatches=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror;const r=this;this.restorePatches.push(se(HTMLElement.prototype,"attachShadow",function(n){return function(o){const s=n.call(this,o);return this.shadowRoot&&r.addShadowRoot(this.shadowRoot,this.ownerDocument),s}}))}addShadowRoot(t,r){!pe(t)||(ct(vt(ft({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),ut(vt(ft({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror})))}observeAttachShadow(t){if(t.contentWindow){const r=this;this.restorePatches.push(se(t.contentWindow.HTMLElement.prototype,"attachShadow",function(n){return function(o){const s=n.call(this,o);return this.shadowRoot&&r.addShadowRoot(this.shadowRoot,t.contentDocument),s}}))}}reset(){this.restorePatches.forEach(t=>t())}}for(var le="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xr=typeof Uint8Array>"u"?[]:new Uint8Array(256),we=0;we<le.length;we++)xr[le.charCodeAt(we)]=we;var Er=function(e){var t=new Uint8Array(e),r,n=t.length,o="";for(r=0;r<n;r+=3)o+=le[t[r]>>2],o+=le[(t[r]&3)<<4|t[r+1]>>4],o+=le[(t[r+1]&15)<<2|t[r+2]>>6],o+=le[t[r+2]&63];return n%3===2?o=o.substring(0,o.length-1)+"=":n%3===1&&(o=o.substring(0,o.length-2)+"=="),o};const yt=new Map;function Rr(e,t){let r=yt.get(e);return r||(r=new Map,yt.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}const gt=(e,t,r)=>{if(!e||!(St(e,t)||typeof e=="object"))return;const n=e.constructor.name,o=Rr(r,n);let s=o.indexOf(e);return s===-1&&(s=o.length,o.push(e)),s};function Me(e,t,r){if(e instanceof Array)return e.map(n=>Me(n,t,r));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const n=e.constructor.name,o=Er(e);return{rr_type:n,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Me(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const n=e.constructor.name,{src:o}=e;return{rr_type:n,src:o}}else if(e instanceof HTMLCanvasElement){const n="HTMLImageElement",o=e.toDataURL();return{rr_type:n,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Me(e.data,t,r),e.width,e.height]};if(St(e,t)||typeof e=="object"){const n=e.constructor.name,o=gt(e,t,r);return{rr_type:n,index:o}}}}return e}const bt=(e,t,r)=>[...e].map(n=>Me(n,t,r)),St=(e,t)=>{const r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(n=>typeof t[n]=="function");return Boolean(r.find(n=>e instanceof t[n]))};function Dr(e,t,r,n){const o=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const c of s)try{if(typeof t.CanvasRenderingContext2D.prototype[c]!="function")continue;const a=se(t.CanvasRenderingContext2D.prototype,c,function(i){return function(...l){return Y(this.canvas,r,!0)||setTimeout(()=>{const d=bt([...l],t,this);e(this.canvas,{type:ie["2D"],property:c,args:d})},0),i.apply(this,l)}});o.push(a)}catch{const i=Ce(t.CanvasRenderingContext2D.prototype,c,{set(l){e(this.canvas,{type:ie["2D"],property:c,args:[l],setter:!0})}});o.push(i)}return()=>{o.forEach(c=>c())}}function kt(e,t){const r=[];try{const n=se(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(s,...c){return Y(this,t,!0)||"__context"in this||(this.__context=s),o.apply(this,[s,...c])}});r.push(n)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{r.forEach(n=>n())}}function Ct(e,t,r,n,o,s){const c=[],a=Object.getOwnPropertyNames(e);for(const i of a)try{if(typeof e[i]!="function")continue;const l=se(e,i,function(d){return function(...p){const m=d.apply(this,p);if(gt(m,s,e),!Y(this.canvas,n,!0)){const u=bt([...p],s,e),h={type:t,property:i,args:u};r(this.canvas,h)}return m}});c.push(l)}catch{const d=Ce(e,i,{set(p){r(this.canvas,{type:t,property:i,args:[p],setter:!0})}});c.push(d)}return c}function Fr(e,t,r,n){const o=[];return o.push(...Ct(t.WebGLRenderingContext.prototype,ie.WebGL,e,r,n,t)),typeof t.WebGL2RenderingContext<"u"&&o.push(...Ct(t.WebGL2RenderingContext.prototype,ie.WebGL2,e,r,n,t)),()=>{o.forEach(s=>s())}}function Pr(e,t){var r=atob(e);if(t){for(var n=new Uint8Array(r.length),o=0,s=r.length;o<s;++o)n[o]=r.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(n.buffer))}return r}function Ar(e,t,r){var n=t===void 0?null:t,o=r===void 0?!1:r,s=Pr(e,o),c=s.indexOf(`
4
+ `,10)+1,a=s.substring(c)+(n?"//# sourceMappingURL="+n:""),i=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(i)}function _r(e,t,r){var n;return function(s){return n=n||Ar(e,t,r),new Worker(n,s)}}var Wr=_r("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Zm9yKHZhciByPSJBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OSsvIixsPXR5cGVvZiBVaW50OEFycmF5PiJ1Ij9bXTpuZXcgVWludDhBcnJheSgyNTYpLGY9MDtmPHIubGVuZ3RoO2YrKylsW3IuY2hhckNvZGVBdChmKV09Zjt2YXIgZD1mdW5jdGlvbihzKXt2YXIgZT1uZXcgVWludDhBcnJheShzKSxuLGE9ZS5sZW5ndGgsdD0iIjtmb3Iobj0wO248YTtuKz0zKXQrPXJbZVtuXT4+Ml0sdCs9clsoZVtuXSYzKTw8NHxlW24rMV0+PjRdLHQrPXJbKGVbbisxXSYxNSk8PDJ8ZVtuKzJdPj42XSx0Kz1yW2VbbisyXSY2M107cmV0dXJuIGElMz09PTI/dD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTEpKyI9IjphJTM9PT0xJiYodD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTIpKyI9PSIpLHR9O2NvbnN0IGM9bmV3IE1hcCx1PW5ldyBNYXA7YXN5bmMgZnVuY3Rpb24gcChzLGUpe2NvbnN0IG49YCR7c30tJHtlfWA7aWYodS5oYXMobikpcmV0dXJuIHUuZ2V0KG4pO2NvbnN0IGE9bmV3IE9mZnNjcmVlbkNhbnZhcyhzLGUpO2EuZ2V0Q29udGV4dCgiMmQiKTtjb25zdCB0PWF3YWl0KGF3YWl0IGEuY29udmVydFRvQmxvYigpKS5hcnJheUJ1ZmZlcigpLGc9ZCh0KTtyZXR1cm4gdS5zZXQobixnKSxnfWNvbnN0IGk9c2VsZjtpLm9ubWVzc2FnZT1hc3luYyBmdW5jdGlvbihzKXtpZighKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcykpcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOnMuZGF0YS5pZH0pO2NvbnN0e2lkOmUsYml0bWFwOm4sd2lkdGg6YSxoZWlnaHQ6dH09cy5kYXRhLGc9cChhLHQpLGg9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2guZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCB3PWF3YWl0IGguY29udmVydFRvQmxvYigpLHk9dy50eXBlLGI9YXdhaXQgdy5hcnJheUJ1ZmZlcigpLG89ZChiKTtpZighYy5oYXMoZSkmJmF3YWl0IGc9PT1vKXJldHVybiBjLnNldChlLG8pLGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpZihjLmdldChlKT09PW8pcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpLnBvc3RNZXNzYWdlKHtpZDplLHR5cGU6eSxiYXNlNjQ6byx3aWR0aDphLGhlaWdodDp0fSksYy5zZXQoZSxvKX19KSgpOwoK",null,!1),It=Object.getOwnPropertySymbols,Gr=Object.prototype.hasOwnProperty,zr=Object.prototype.propertyIsEnumerable,Vr=(e,t)=>{var r={};for(var n in e)Gr.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&It)for(var n of It(e))t.indexOf(n)<0&&zr.call(e,n)&&(r[n]=e[n]);return r},jr=(e,t,r)=>new Promise((n,o)=>{var s=i=>{try{a(r.next(i))}catch(l){o(l)}},c=i=>{try{a(r.throw(i))}catch(l){o(l)}},a=i=>i.done?n(i.value):Promise.resolve(i.value).then(s,c);a((r=r.apply(e,t)).next())});class Zr{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(c,a)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(c)||this.pendingCanvasMutations.set(c,[]),this.pendingCanvasMutations.get(c).push(a)};const{sampling:r="all",win:n,blockClass:o,recordCanvas:s}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,s&&r==="all"&&this.initCanvasMutationObserver(n,o),s&&typeof r=="number"&&this.initCanvasFPSObserver(r,n,o)}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,r,n){const o=kt(r,n),s=new Map,c=new Wr;c.onmessage=p=>{const{id:m}=p.data;if(s.set(m,!1),!("base64"in p.data))return;const{base64:u,type:h,width:v,height:S}=p.data;this.mutationCb({id:m,type:ie["2D"],commands:[{property:"clearRect",args:[0,0,v,S]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:u}],type:h}]},0,0]}]})};const a=1e3/t;let i=0,l;const d=p=>{if(i&&p-i<a){l=requestAnimationFrame(d);return}i=p,r.document.querySelectorAll(`canvas:not(.${n} *)`).forEach(m=>jr(this,null,function*(){var u;const h=this.mirror.getId(m);if(s.get(h))return;if(s.set(h,!0),["webgl","webgl2"].includes(m.__context)){const S=m.getContext(m.__context);((u=S?.getContextAttributes())==null?void 0:u.preserveDrawingBuffer)===!1&&S?.clear(S.COLOR_BUFFER_BIT)}if(m.width===0||m.height===0)return;const v=yield createImageBitmap(m);c.postMessage({id:h,bitmap:v,width:m.width,height:m.height},[v])})),l=requestAnimationFrame(d)};l=requestAnimationFrame(d),this.resetObservers=()=>{o(),cancelAnimationFrame(l)}}initCanvasMutationObserver(t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const n=kt(t,r),o=Dr(this.processMutation.bind(this),t,r,this.mirror),s=Fr(this.processMutation.bind(this),t,r,this.mirror);this.resetObservers=()=>{n(),o(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{const n=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(t);if(!n||r===-1)return;const o=n.map(c=>Vr(c,["type"])),{type:s}=n[0];this.mutationCb({id:r,type:s,commands:o}),this.pendingCanvasMutations.delete(t)}}class Ur{constructor(t){this.trackedStylesheets=new WeakSet,this.mutationCb=t.mutationCb}addStylesheet(t){this.trackedStylesheets.has(t)||(this.trackedStylesheets.add(t),this.trackStylesheet(t))}trackStylesheet(t){}attachStylesheet(t,r,n){this.mutationCb({adds:[{parentId:n.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[]}),this.addStylesheet(t)}}var Yr=Object.defineProperty,Hr=Object.defineProperties,Xr=Object.getOwnPropertyDescriptors,wt=Object.getOwnPropertySymbols,Br=Object.prototype.hasOwnProperty,Kr=Object.prototype.propertyIsEnumerable,Mt=(e,t,r)=>t in e?Yr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,B=(e,t)=>{for(var r in t||(t={}))Br.call(t,r)&&Mt(e,r,t[r]);if(wt)for(var r of wt(t))Kr.call(t,r)&&Mt(e,r,t[r]);return e},$r=(e,t)=>Hr(e,Xr(t));function E(e){return $r(B({},e),{timestamp:Date.now()})}let x,ye;const Q=Nt();function ge(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:o="highlight-block",blockSelector:s=null,ignoreClass:c="highlight-ignore",maskTextClass:a="highlight-mask",maskTextSelector:i=null,inlineStylesheet:l=!0,maskAllInputs:d,maskInputOptions:p,slimDOMOptions:m,maskInputFn:u,maskTextFn:h=Oe,hooks:v,packFn:S,sampling:I={},mousemoveWait:w,recordCanvas:y=!1,userTriggeredOnInput:f=!1,collectFonts:O=!1,inlineImages:_=!1,plugins:R,keepIframeSrcFn:L=()=>!1,enableStrictPrivacy:W=!1}=e;if(!t)throw new Error("emit function is required");w!==void 0&&I.mousemove===void 0&&(I.mousemove=w),Q.reset();const j=d===!0?{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}:p!==void 0?p:{password:!0},D=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all"}:m||{};rr();let K,Z=0;const F=g=>{for(const b of R||[])b.eventProcessor&&(g=b.eventProcessor(g));return S&&(g=S(g)),g};x=(g,b)=>{var X;if(((X=ne[0])==null?void 0:X.isFrozen())&&g.type!==T.FullSnapshot&&!(g.type===T.IncrementalSnapshot&&g.data.source===P.Mutation)&&ne.forEach(V=>V.unfreeze()),t(F(g),b),g.type===T.FullSnapshot)K=g,Z=0;else if(g.type===T.IncrementalSnapshot){if(g.data.source===P.Mutation&&g.data.isAttachIframe)return;Z++;const V=n&&Z>=n,q=r&&g.timestamp-K.timestamp>r;(V||q)&&ye(!0)}};const G=g=>{x(E({type:T.IncrementalSnapshot,data:B({source:P.Mutation},g)}))},$=g=>x(E({type:T.IncrementalSnapshot,data:B({source:P.Scroll},g)})),ee=g=>x(E({type:T.IncrementalSnapshot,data:B({source:P.CanvasMutation},g)})),A=new Ir({mutationCb:G}),J=new Ur({mutationCb:G}),z=new Zr({recordCanvas:y,mutationCb:ee,win:window,blockClass:o,mirror:Q,sampling:I.canvas}),H=new Nr({mutationCb:G,scrollCb:$,bypassOptions:{blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:i,inlineStylesheet:l,maskInputOptions:j,maskTextFn:h,maskInputFn:u,recordCanvas:y,inlineImages:_,sampling:I,slimDOMOptions:D,iframeManager:A,stylesheetManager:J,canvasManager:z,keepIframeSrcFn:L,enableStrictPrivacy:W},mirror:Q});ye=(g=!1)=>{var b,X,V,q;x(E({type:T.Meta,data:{href:window.location.href,width:Ue(),height:Ze()}}),g),ne.forEach(M=>M.lock());const k=qt(document,{mirror:Q,blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:i,inlineStylesheet:l,maskAllInputs:j,maskTextFn:h,slimDOM:D,recordCanvas:y,inlineImages:_,enableStrictPrivacy:W,onSerialize:M=>{Xe(M,Q)&&A.addIframe(M),Be(M,Q)&&J.addStylesheet(M),Ke(M)&&H.addShadowRoot(M.shadowRoot,document)},onIframeLoad:(M,ce)=>{A.attachIframe(M,ce,Q),H.observeAttachShadow(M)},onStylesheetLoad:(M,ce)=>{J.attachStylesheet(M,ce,Q)},keepIframeSrcFn:L});if(!k)return console.warn("Failed to snapshot the document");x(E({type:T.FullSnapshot,data:{node:k,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:document?.documentElement.scrollLeft||((X=(b=document?.body)==null?void 0:b.parentElement)==null?void 0:X.scrollLeft)||document?.body.scrollLeft||0,top:window.pageYOffset!==void 0?window.pageYOffset:document?.documentElement.scrollTop||((q=(V=document?.body)==null?void 0:V.parentElement)==null?void 0:q.scrollTop)||document?.body.scrollTop||0}}})),ne.forEach(M=>M.unlock())};try{const g=[];g.push(U("DOMContentLoaded",()=>{x(E({type:T.DomContentLoaded,data:{}}))}));const b=V=>{var q;return Cr({mutationCb:G,mousemoveCb:(k,M)=>x(E({type:T.IncrementalSnapshot,data:{source:M,positions:k}})),mouseInteractionCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.MouseInteraction},k)})),scrollCb:$,viewportResizeCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.ViewportResize},k)})),inputCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.Input},k)})),mediaInteractionCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.MediaInteraction},k)})),styleSheetRuleCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.StyleSheetRule},k)})),styleDeclarationCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.StyleDeclaration},k)})),canvasMutationCb:ee,fontCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.Font},k)})),blockClass:o,ignoreClass:c,maskTextClass:a,maskTextSelector:i,maskInputOptions:j,inlineStylesheet:l,sampling:I,recordCanvas:y,inlineImages:_,userTriggeredOnInput:f,collectFonts:O,doc:V,maskInputFn:u,maskTextFn:h,keepIframeSrcFn:L,blockSelector:s,slimDOMOptions:D,mirror:Q,iframeManager:A,stylesheetManager:J,shadowDomManager:H,canvasManager:z,enableStrictPrivacy:W,plugins:((q=R?.filter(k=>k.observer))==null?void 0:q.map(k=>({observer:k.observer,options:k.options,callback:M=>x(E({type:T.Plugin,data:{plugin:k.name,payload:M}}))})))||[]},v)};A.addLoadListener(V=>{g.push(b(V.contentDocument))});const X=()=>{ye(),g.push(b(document))};return document.readyState==="interactive"||document.readyState==="complete"?X():g.push(U("load",()=>{x(E({type:T.Load,data:{}})),X()},window)),()=>{g.forEach(V=>V())}}catch(g){console.warn(g)}}return ge.addCustomEvent=(e,t)=>{!x||x(E({type:T.Custom,data:{tag:e,payload:t}}))},ge.freezePage=()=>{ne.forEach(e=>e.freeze())},ge.takeFullSnapshot=e=>{if(!ye)throw new Error("please take full snapshot after start recording");ye(e)},ge.mirror=Q,ge}();
@@ -1,5 +1,5 @@
1
- var rrwebRecord=function(){"use strict";var N;(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"})(N||(N={}));function Lt(e){return e.nodeType===e.ELEMENT_NODE}function de(e){var t=e?.host;return Boolean(t?.shadowRoot===e)}function pe(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}var Fe=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(t){var n;if(!t)return-1;var r=(n=this.getMeta(t))===null||n===void 0?void 0:n.id;return r??-1},e.prototype.getNode=function(t){return this.idNodeMap.get(t)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(t){return this.nodeMetaMap.get(t)||null},e.prototype.removeNodeFromMap=function(t){var n=this,r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(function(o){return n.removeNodeFromMap(o)})},e.prototype.has=function(t){return this.idNodeMap.has(t)},e.prototype.hasNode=function(t){return this.nodeMetaMap.has(t)},e.prototype.add=function(t,n){var r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)},e.prototype.replace=function(t,n){this.idNodeMap.set(t,n)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function Nt(){return new Fe}function Te(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,o=e.value,s=e.maskInputFn,c=o||"";return(t[n.toLowerCase()]||t[r])&&(s?c=s(c):c="*".repeat(c.length)),c}var Pe="__rrweb_original__";function xt(e){var t=e.getContext("2d");if(!t)return!0;for(var n=50,r=0;r<e.width;r+=n)for(var o=0;o<e.height;o+=n){var s=t.getImageData,c=Pe in s?s[Pe]:s,a=new Uint32Array(c.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer);if(a.some(function(i){return i!==0}))return!1}return!0}function Ae(e){return e=e.replace(/[^ -~]+/g,""),e=e?.split(" ").map(function(t){return Math.random().toString(20).substr(2,t.length)}).join(" ")||"",e}var Et=1,Rt=new RegExp("[^a-z0-9-_:]"),he=-2;function Dt(){return Et++}function Ft(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return Rt.test(t)?"div":t}function Oe(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(Pt).join(""):null}catch{return null}}function Pt(e){var t=e.cssText;if(At(e))try{t=Oe(e.styleSheet)||t}catch{}return t}function At(e){return"styleSheet"in e}function _t(e){return e.cssRules?Array.from(e.cssRules).map(function(t){return t.cssText||""}).join(""):""}function Wt(e){var t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var oe,_e,Gt=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,zt=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,Vt=/^(data:)([^,]*),(.*)/i;function be(e,t){return(e||"").replace(Gt,function(n,r,o,s,c,a){var i=o||c||a,l=r||s||"";if(!i)return n;if(!zt.test(i)||Vt.test(i))return"url(".concat(l).concat(i).concat(l,")");if(i[0]==="/")return"url(".concat(l).concat(Wt(t)+i).concat(l,")");var d=t.split("/"),p=i.split("/");d.pop();for(var m=0,u=p;m<u.length;m++){var h=u[m];h!=="."&&(h===".."?d.pop():d.push(h))}return"url(".concat(l).concat(d.join("/")).concat(l,")")})}var jt=/^[^ \t\n\r\u000c]+/,Zt=/^[, \t\n\r\u000c]+/;function Ut(e,t){if(t.trim()==="")return t;var n=0;function r(l){var d,p=l.exec(t.substring(n));return p?(d=p[0],n+=d.length,d):""}for(var o=[];r(Zt),!(n>=t.length);){var s=r(jt);if(s.slice(-1)===",")s=Se(e,s.substring(0,s.length-1)),o.push(s);else{var c="";s=Se(e,s);for(var a=!1;;){var i=t.charAt(n);if(i===""){o.push((s+c).trim());break}else if(a)i===")"&&(a=!1);else if(i===","){n+=1,o.push((s+c).trim());break}else i==="("&&(a=!0);c+=i,n+=1}}}return o.join(", ")}function Se(e,t){if(!t||t.trim()==="")return t;var n=e.createElement("a");return n.href=t,n.href}function Yt(e){return Boolean(e.tagName==="svg"||e.ownerSVGElement)}function Le(){var e=document.createElement("a");return e.href="",e.href}function We(e,t,n,r){return n==="src"||n==="href"&&r&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r&&r[0]!=="#"||n==="background"&&r&&(t==="table"||t==="td"||t==="th")?Se(e,r):n==="srcset"&&r?Ut(e,r):n==="style"&&r?be(r,Le()):t==="object"&&n==="data"&&r?Se(e,r):r}function Ht(e,t,n){if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return n?e.matches(n):!1}function ke(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return n?ke(e.parentNode,t,n):!1;for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return n?ke(e.parentNode,t,n):!1}function Ge(e,t,n){var r=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(r===null)return!1;if(typeof t=="string"){if(r.classList.contains(t)||r.closest(".".concat(t)))return!0}else if(ke(r,t,!0))return!0;return!!(n&&(r.matches(n)||r.closest(n)))}function Xt(e,t,n){var r=e.contentWindow;if(r){var o=!1,s;try{s=r.document.readyState}catch{return}if(s!=="complete"){var c=setTimeout(function(){o||(t(),o=!0)},n);e.addEventListener("load",function(){clearTimeout(c),o=!0,t()});return}var a="about:blank";if(r.location.href!==a||e.src===a||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}}function ze(e){return e.getAttribute("href")?e.sheet!==null:!0}function Ve(e,t,n){var r=!1,o;try{o=e.sheet}catch{return}if(!o){var s=setTimeout(function(){r||(t(),r=!0)},n);e.addEventListener("load",function(){clearTimeout(s),r=!0,t()})}}function Bt(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,s=t.blockSelector,c=t.maskTextClass,a=t.maskTextSelector,i=t.inlineStylesheet,l=t.maskInputOptions,d=l===void 0?{}:l,p=t.maskTextFn,m=t.maskInputFn,u=t.dataURLOptions,h=u===void 0?{}:u,v=t.inlineImages,S=t.recordCanvas,I=t.keepIframeSrcFn,w=t.newlyAddedElement,y=w===void 0?!1:w,f=t.enableStrictPrivacy,O=Kt(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:N.Document,childNodes:[],compatMode:e.compatMode,rootId:O}:{type:N.Document,childNodes:[],rootId:O};case e.DOCUMENT_TYPE_NODE:return{type:N.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:O};case e.ELEMENT_NODE:return Jt(e,{doc:n,blockClass:o,blockSelector:s,inlineStylesheet:i,maskInputOptions:d,maskInputFn:m,dataURLOptions:h,inlineImages:v,recordCanvas:S,keepIframeSrcFn:I,newlyAddedElement:y,enableStrictPrivacy:f,rootId:O});case e.TEXT_NODE:return $t(e,{maskTextClass:c,maskTextSelector:a,maskTextFn:p,enableStrictPrivacy:f,rootId:O});case e.CDATA_SECTION_NODE:return{type:N.CDATA,textContent:"",rootId:O};case e.COMMENT_NODE:return{type:N.Comment,textContent:e.textContent||"",rootId:O};default:return!1}}function Kt(e,t){if(t.hasNode(e)){var n=t.getId(e);return n===1?void 0:n}}function $t(e,t){var n,r=t.maskTextClass,o=t.maskTextSelector,s=t.maskTextFn,c=t.enableStrictPrivacy,a=t.rootId,i=e.parentNode&&e.parentNode.tagName,l=e.textContent,d=i==="STYLE"?!0:void 0,p=i==="SCRIPT"?!0:void 0,m=!1;if(d&&l){try{e.nextSibling||e.previousSibling||!((n=e.parentNode.sheet)===null||n===void 0)&&n.cssRules&&(l=_t(e.parentNode.sheet))}catch(h){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(h),e)}l=be(l,Le()),m=!0}if(p?(l="SCRIPT_PLACEHOLDER",m=!0):i==="NOSCRIPT"&&(l="",m=!0),!d&&!p&&l&&Ge(e,r,o)&&(l=s?s(l):l.replace(/[\S]/g,"*")),c&&!m&&i){var u=new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]);!u.has(i)&&l&&(l=Ae(l))}return{type:N.Text,textContent:l||"",isStyle:d,rootId:a}}function Jt(e,t){for(var n=t.doc,r=t.blockClass,o=t.blockSelector,s=t.inlineStylesheet,c=t.maskInputOptions,a=c===void 0?{}:c,i=t.maskInputFn,l=t.dataURLOptions,d=l===void 0?{}:l,p=t.inlineImages,m=t.recordCanvas,u=t.keepIframeSrcFn,h=t.newlyAddedElement,v=h===void 0?!1:h,S=t.enableStrictPrivacy,I=t.rootId,w=Ht(e,r,o),y=Ft(e),f={},O=e.attributes.length,_=0;_<O;_++){var R=e.attributes[_];f[R.name]=We(n,y,R.name,R.value)}if(y==="link"&&s){var L=Array.from(n.styleSheets).find(function(z){return z.href===e.href}),W=null;L&&(W=Oe(L)),W&&(delete f.rel,delete f.href,f._cssText=be(W,L.href))}if(y==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){var W=Oe(e.sheet);W&&(f._cssText=be(W,Le()))}if(y==="input"||y==="textarea"||y==="select"){var j=e.value;f.type!=="radio"&&f.type!=="checkbox"&&f.type!=="submit"&&f.type!=="button"&&j?f.value=Te({type:f.type,tagName:y,value:j,maskInputOptions:a,maskInputFn:i}):e.checked&&(f.checked=e.checked)}if(y==="option"&&(e.selected&&!a.select?f.selected=!0:delete f.selected),y==="canvas"&&m){if(e.__context==="2d")xt(e)||(f.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){var D=e.toDataURL(d.type,d.quality),K=document.createElement("canvas");K.width=e.width,K.height=e.height;var Z=K.toDataURL(d.type,d.quality);D!==Z&&(f.rr_dataURL=D)}}if(y==="img"&&p){oe||(oe=n.createElement("canvas"),_e=oe.getContext("2d"));var F=e,G=F.crossOrigin;F.crossOrigin="anonymous";var $=function(){try{oe.width=F.naturalWidth,oe.height=F.naturalHeight,_e.drawImage(F,0,0),f.rr_dataURL=oe.toDataURL(d.type,d.quality)}catch(z){console.warn("Cannot inline img src=".concat(F.currentSrc,"! Error: ").concat(z))}G?f.crossOrigin=G:F.removeAttribute("crossorigin")};F.complete&&F.naturalWidth!==0?$():F.onload=$}if((y==="audio"||y==="video")&&(f.rr_mediaState=e.paused?"paused":"played",f.rr_mediaCurrentTime=e.currentTime),v||(e.scrollLeft&&(f.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(f.rr_scrollTop=e.scrollTop)),w||y==="img"&&S){var ee=e.getBoundingClientRect(),A=ee.width,J=ee.height;f={class:f.class,rr_width:"".concat(A,"px"),rr_height:"".concat(J,"px")},w=!0}return y==="iframe"&&!u(f.src)&&(e.contentDocument||(f.rr_src=f.src),delete f.src),{type:N.Element,tagName:y,attributes:f,childNodes:[],isSVG:Yt(e)||void 0,needBlock:w,rootId:I}}function C(e){return e===void 0?"":e.toLowerCase()}function Qt(e,t){return!!(t.comment&&e.type===N.Comment||e.type===N.Element&&(t.script&&(e.tagName==="script"||e.tagName==="link"&&e.attributes.rel==="preload"&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js"))||t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(C(e.attributes.name).match(/^msapplication-tile(image|color)$/)||C(e.attributes.name)==="application-name"||C(e.attributes.rel)==="icon"||C(e.attributes.rel)==="apple-touch-icon"||C(e.attributes.rel)==="shortcut icon"))||e.tagName==="meta"&&(t.headMetaDescKeywords&&C(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(C(e.attributes.property).match(/^(og|twitter|fb):/)||C(e.attributes.name).match(/^(og|twitter):/)||C(e.attributes.name)==="pinterest")||t.headMetaRobots&&(C(e.attributes.name)==="robots"||C(e.attributes.name)==="googlebot"||C(e.attributes.name)==="bingbot")||t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0||t.headMetaAuthorship&&(C(e.attributes.name)==="author"||C(e.attributes.name)==="generator"||C(e.attributes.name)==="framework"||C(e.attributes.name)==="publisher"||C(e.attributes.name)==="progid"||C(e.attributes.property).match(/^article:/)||C(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(C(e.attributes.name)==="google-site-verification"||C(e.attributes.name)==="yandex-verification"||C(e.attributes.name)==="csrf-token"||C(e.attributes.name)==="p:domain_verify"||C(e.attributes.name)==="verify-v1"||C(e.attributes.name)==="verification"||C(e.attributes.name)==="shopify-checkout-api-token"))))}function ne(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,s=t.blockSelector,c=t.maskTextClass,a=t.maskTextSelector,i=t.skipChild,l=i===void 0?!1:i,d=t.inlineStylesheet,p=d===void 0?!0:d,m=t.maskInputOptions,u=m===void 0?{}:m,h=t.maskTextFn,v=t.maskInputFn,S=t.slimDOMOptions,I=t.dataURLOptions,w=I===void 0?{}:I,y=t.inlineImages,f=y===void 0?!1:y,O=t.recordCanvas,_=O===void 0?!1:O,R=t.onSerialize,L=t.onIframeLoad,W=t.iframeLoadTimeout,j=W===void 0?5e3:W,D=t.onStylesheetLoad,K=t.stylesheetLoadTimeout,Z=K===void 0?5e3:K,F=t.keepIframeSrcFn,G=F===void 0?function(){return!1}:F,$=t.newlyAddedElement,ee=$===void 0?!1:$,A=t.enableStrictPrivacy,J=t.preserveWhiteSpace,z=J===void 0?!0:J,H=Bt(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:c,maskTextSelector:a,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:v,dataURLOptions:w,inlineImages:f,recordCanvas:_,keepIframeSrcFn:G,newlyAddedElement:ee,enableStrictPrivacy:A});if(!H)return console.warn(e,"not serialized"),null;var g;if(r.hasNode(e)?g=r.getId(e):Qt(H,S)||!z&&H.type===N.Text&&!H.isStyle&&!H.textContent.replace(/^\s+|\s+$/gm,"").length?g=he:g=Dt(),g===he)return null;var b=Object.assign(H,{id:g});r.add(e,b),R&&R(e);var X=!l;if(b.type===N.Element){if(X=X&&!b.needBlock,b.needBlock&&b.tagName==="img"){var V=e.cloneNode();V.src="",r.add(V,b)}delete b.needBlock;var q=e.shadowRoot;q&&pe(q)&&(b.isShadowHost=!0)}if((b.type===N.Document||b.type===N.Element)&&X){S.headWhitespace&&b.type===N.Element&&b.tagName==="head"&&(z=!1);for(var k={doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:c,maskTextSelector:a,skipChild:l,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:v,slimDOMOptions:S,dataURLOptions:w,inlineImages:f,recordCanvas:_,preserveWhiteSpace:z,onSerialize:R,onIframeLoad:L,iframeLoadTimeout:j,onStylesheetLoad:D,stylesheetLoadTimeout:Z,keepIframeSrcFn:G,enableStrictPrivacy:A},M=0,ce=Array.from(e.childNodes);M<ce.length;M++){var Re=ce[M],ue=ne(Re,k);ue&&b.childNodes.push(ue)}if(Lt(e)&&e.shadowRoot)for(var De=0,Tt=Array.from(e.shadowRoot.childNodes);De<Tt.length;De++){var Re=Tt[De],ue=ne(Re,k);ue&&(pe(e.shadowRoot)&&(ue.isShadow=!0),b.childNodes.push(ue))}}return e.parentNode&&de(e.parentNode)&&pe(e.parentNode)&&(b.isShadow=!0),b.type===N.Element&&b.tagName==="iframe"&&Xt(e,function(){var te=e.contentDocument;if(te&&L){var Ot=ne(te,{doc:te,mirror:r,blockClass:o,blockSelector:s,maskTextClass:c,maskTextSelector:a,skipChild:!1,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:v,slimDOMOptions:S,dataURLOptions:w,inlineImages:f,recordCanvas:_,preserveWhiteSpace:z,onSerialize:R,onIframeLoad:L,iframeLoadTimeout:j,onStylesheetLoad:D,stylesheetLoadTimeout:Z,keepIframeSrcFn:G,enableStrictPrivacy:A});Ot&&L(e,Ot)}},j),b.type===N.Element&&b.tagName==="link"&&b.attributes.rel==="stylesheet"&&(Ve(e,function(){if(D){var te=ne(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:c,maskTextSelector:a,skipChild:!1,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:v,slimDOMOptions:S,dataURLOptions:w,inlineImages:f,recordCanvas:_,preserveWhiteSpace:z,onSerialize:R,onIframeLoad:L,iframeLoadTimeout:j,onStylesheetLoad:D,stylesheetLoadTimeout:Z,keepIframeSrcFn:G,enableStrictPrivacy:A});te&&D(e,te)}},Z),ze(e)===!1)||b.type===N.Element&&b.tagName==="link"&&b.attributes.rel==="stylesheet"&&(Ve(e,function(){if(D){var te=ne(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:c,maskTextSelector:a,skipChild:!1,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:v,slimDOMOptions:S,dataURLOptions:w,inlineImages:f,recordCanvas:_,preserveWhiteSpace:z,onSerialize:R,onIframeLoad:L,iframeLoadTimeout:j,enableStrictPrivacy:A,onStylesheetLoad:D,stylesheetLoadTimeout:Z,keepIframeSrcFn:G});te&&D(e,te)}},Z),ze(e)===!1)?null:b}function qt(e,t){var n=t||{},r=n.mirror,o=r===void 0?new Fe:r,s=n.blockClass,c=s===void 0?"highlight-block":s,a=n.blockSelector,i=a===void 0?null:a,l=n.maskTextClass,d=l===void 0?"highlight-mask":l,p=n.maskTextSelector,m=p===void 0?null:p,u=n.inlineStylesheet,h=u===void 0?!0:u,v=n.inlineImages,S=v===void 0?!1:v,I=n.recordCanvas,w=I===void 0?!1:I,y=n.maskAllInputs,f=y===void 0?!1:y,O=n.maskTextFn,_=n.maskInputFn,R=n.slimDOM,L=R===void 0?!1:R,W=n.dataURLOptions,j=n.preserveWhiteSpace,D=n.onSerialize,K=n.onIframeLoad,Z=n.iframeLoadTimeout,F=n.onStylesheetLoad,G=n.stylesheetLoadTimeout,$=n.keepIframeSrcFn,ee=$===void 0?function(){return!1}:$,A=n.enableStrictPrivacy,J=A===void 0?!1:A,z=f===!0?{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}:f===!1?{password:!0}:f,H=L===!0||L==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:L==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:L===!1?{}:L;return ne(e,{doc:e,mirror:o,blockClass:c,blockSelector:i,maskTextClass:d,maskTextSelector:m,skipChild:!1,inlineStylesheet:h,maskInputOptions:z,maskTextFn:O,maskInputFn:_,slimDOMOptions:H,dataURLOptions:W,inlineImages:S,recordCanvas:w,preserveWhiteSpace:j,onSerialize:D,onIframeLoad:K,iframeLoadTimeout:Z,onStylesheetLoad:F,stylesheetLoadTimeout:G,keepIframeSrcFn:ee,newlyAddedElement:!1,enableStrictPrivacy:J})}function U(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const ae=`Please stop import mirror directly. Instead of that,\r
1
+ var rrwebRecord=function(){"use strict";var N;(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"})(N||(N={}));function Lt(e){return e.nodeType===e.ELEMENT_NODE}function de(e){var t=e?.host;return Boolean(t?.shadowRoot===e)}function pe(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}var Pe=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(t){var r;if(!t)return-1;var n=(r=this.getMeta(t))===null||r===void 0?void 0:r.id;return n??-1},e.prototype.getNode=function(t){return this.idNodeMap.get(t)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(t){return this.nodeMetaMap.get(t)||null},e.prototype.removeNodeFromMap=function(t){var r=this,n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(function(o){return r.removeNodeFromMap(o)})},e.prototype.has=function(t){return this.idNodeMap.has(t)},e.prototype.hasNode=function(t){return this.nodeMetaMap.has(t)},e.prototype.add=function(t,r){var n=r.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,r)},e.prototype.replace=function(t,r){this.idNodeMap.set(t,r)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function Nt(){return new Pe}function Te(e){var t=e.maskInputOptions,r=e.tagName,n=e.type,o=e.value,s=e.maskInputFn,c=o||"";return(t[r.toLowerCase()]||t[n])&&(s?c=s(c):c="*".repeat(c.length)),c}var Ae="__rrweb_original__";function xt(e){var t=e.getContext("2d");if(!t)return!0;for(var r=50,n=0;n<e.width;n+=r)for(var o=0;o<e.height;o+=r){var s=t.getImageData,c=Ae in s?s[Ae]:s,a=new Uint32Array(c.call(t,n,o,Math.min(r,e.width-n),Math.min(r,e.height-o)).data.buffer);if(a.some(function(i){return i!==0}))return!1}return!0}function Oe(e){return e=e.replace(/[^ -~]+/g,""),e=e?.split(" ").map(function(t){return Math.random().toString(20).substr(2,t.length)}).join(" ")||"",e}var Et=1,Rt=new RegExp("[^a-z0-9-_:]"),he=-2;function Dt(){return Et++}function Ft(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return Rt.test(t)?"div":t}function Le(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(Pt).join(""):null}catch{return null}}function Pt(e){var t=e.cssText;if(At(e))try{t=Le(e.styleSheet)||t}catch{}return t}function At(e){return"styleSheet"in e}function _t(e){return e.cssRules?Array.from(e.cssRules).map(function(t){return t.cssText||""}).join(""):""}function Wt(e){var t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var oe,_e,Gt=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,zt=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,Vt=/^(data:)([^,]*),(.*)/i;function be(e,t){return(e||"").replace(Gt,function(r,n,o,s,c,a){var i=o||c||a,l=n||s||"";if(!i)return r;if(!zt.test(i)||Vt.test(i))return"url(".concat(l).concat(i).concat(l,")");if(i[0]==="/")return"url(".concat(l).concat(Wt(t)+i).concat(l,")");var d=t.split("/"),p=i.split("/");d.pop();for(var m=0,u=p;m<u.length;m++){var h=u[m];h!=="."&&(h===".."?d.pop():d.push(h))}return"url(".concat(l).concat(d.join("/")).concat(l,")")})}var jt=/^[^ \t\n\r\u000c]+/,Zt=/^[, \t\n\r\u000c]+/;function Ut(e,t){if(t.trim()==="")return t;var r=0;function n(l){var d,p=l.exec(t.substring(r));return p?(d=p[0],r+=d.length,d):""}for(var o=[];n(Zt),!(r>=t.length);){var s=n(jt);if(s.slice(-1)===",")s=Se(e,s.substring(0,s.length-1)),o.push(s);else{var c="";s=Se(e,s);for(var a=!1;;){var i=t.charAt(r);if(i===""){o.push((s+c).trim());break}else if(a)i===")"&&(a=!1);else if(i===","){r+=1,o.push((s+c).trim());break}else i==="("&&(a=!0);c+=i,r+=1}}}return o.join(", ")}function Se(e,t){if(!t||t.trim()==="")return t;var r=e.createElement("a");return r.href=t,r.href}function Yt(e){return Boolean(e.tagName==="svg"||e.ownerSVGElement)}function Ne(){var e=document.createElement("a");return e.href="",e.href}function We(e,t,r,n){return r==="src"||r==="href"&&n&&!(t==="use"&&n[0]==="#")||r==="xlink:href"&&n&&n[0]!=="#"||r==="background"&&n&&(t==="table"||t==="td"||t==="th")?Se(e,n):r==="srcset"&&n?Ut(e,n):r==="style"&&n?be(n,Ne()):t==="object"&&r==="data"&&n?Se(e,n):n}function Ht(e,t,r){if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(var n=e.classList.length;n--;){var o=e.classList[n];if(t.test(o))return!0}return r?e.matches(r):!1}function ke(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?ke(e.parentNode,t,r):!1;for(var n=e.classList.length;n--;){var o=e.classList[n];if(t.test(o))return!0}return r?ke(e.parentNode,t,r):!1}function Ge(e,t,r){var n=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(n===null)return!1;if(typeof t=="string"){if(n.classList.contains(t)||n.closest(".".concat(t)))return!0}else if(ke(n,t,!0))return!0;return!!(r&&(n.matches(r)||n.closest(r)))}function Xt(e,t,r){var n=e.contentWindow;if(n){var o=!1,s;try{s=n.document.readyState}catch{return}if(s!=="complete"){var c=setTimeout(function(){o||(t(),o=!0)},r);e.addEventListener("load",function(){clearTimeout(c),o=!0,t()});return}var a="about:blank";if(n.location.href!==a||e.src===a||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}}function ze(e){return e.getAttribute("href")?e.sheet!==null:!0}function Ve(e,t,r){var n=!1,o;try{o=e.sheet}catch{return}if(!o){var s=setTimeout(function(){n||(t(),n=!0)},r);e.addEventListener("load",function(){clearTimeout(s),n=!0,t()})}}function Bt(e,t){var r=t.doc,n=t.mirror,o=t.blockClass,s=t.blockSelector,c=t.maskTextClass,a=t.maskTextSelector,i=t.inlineStylesheet,l=t.maskInputOptions,d=l===void 0?{}:l,p=t.maskTextFn,m=t.maskInputFn,u=t.dataURLOptions,h=u===void 0?{}:u,v=t.inlineImages,S=t.recordCanvas,I=t.keepIframeSrcFn,w=t.newlyAddedElement,y=w===void 0?!1:w,f=t.enableStrictPrivacy,O=Kt(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:N.Document,childNodes:[],compatMode:e.compatMode,rootId:O}:{type:N.Document,childNodes:[],rootId:O};case e.DOCUMENT_TYPE_NODE:return{type:N.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:O};case e.ELEMENT_NODE:return Jt(e,{doc:r,blockClass:o,blockSelector:s,inlineStylesheet:i,maskInputOptions:d,maskInputFn:m,dataURLOptions:h,inlineImages:v,recordCanvas:S,keepIframeSrcFn:I,newlyAddedElement:y,enableStrictPrivacy:f,rootId:O});case e.TEXT_NODE:return $t(e,{maskTextClass:c,maskTextSelector:a,maskTextFn:p,enableStrictPrivacy:f,rootId:O});case e.CDATA_SECTION_NODE:return{type:N.CDATA,textContent:"",rootId:O};case e.COMMENT_NODE:return{type:N.Comment,textContent:e.textContent||"",rootId:O};default:return!1}}function Kt(e,t){if(t.hasNode(e)){var r=t.getId(e);return r===1?void 0:r}}function $t(e,t){var r,n=t.maskTextClass,o=t.maskTextSelector,s=t.maskTextFn,c=t.enableStrictPrivacy,a=t.rootId,i=e.parentNode&&e.parentNode.tagName,l=e.textContent,d=i==="STYLE"?!0:void 0,p=i==="SCRIPT"?!0:void 0,m=!1;if(d&&l){try{e.nextSibling||e.previousSibling||!((r=e.parentNode.sheet)===null||r===void 0)&&r.cssRules&&(l=_t(e.parentNode.sheet))}catch(h){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(h),e)}l=be(l,Ne()),m=!0}if(p?(l="SCRIPT_PLACEHOLDER",m=!0):i==="NOSCRIPT"&&(l="",m=!0),!d&&!p&&l&&Ge(e,n,o)&&(l=s?s(l):l.replace(/[\S]/g,"*")),c&&!m&&i){var u=new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]);!u.has(i)&&l&&(l=Oe(l))}return{type:N.Text,textContent:l||"",isStyle:d,rootId:a}}function Jt(e,t){for(var r=t.doc,n=t.blockClass,o=t.blockSelector,s=t.inlineStylesheet,c=t.maskInputOptions,a=c===void 0?{}:c,i=t.maskInputFn,l=t.dataURLOptions,d=l===void 0?{}:l,p=t.inlineImages,m=t.recordCanvas,u=t.keepIframeSrcFn,h=t.newlyAddedElement,v=h===void 0?!1:h,S=t.enableStrictPrivacy,I=t.rootId,w=Ht(e,n,o),y=Ft(e),f={},O=e.attributes.length,_=0;_<O;_++){var R=e.attributes[_];f[R.name]=We(r,y,R.name,R.value)}if(y==="link"&&s){var L=Array.from(r.styleSheets).find(function(z){return z.href===e.href}),W=null;L&&(W=Le(L)),W&&(delete f.rel,delete f.href,f._cssText=be(W,L.href))}if(y==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){var W=Le(e.sheet);W&&(f._cssText=be(W,Ne()))}if(y==="input"||y==="textarea"||y==="select"){var j=e.value;f.type!=="radio"&&f.type!=="checkbox"&&f.type!=="submit"&&f.type!=="button"&&j?f.value=Te({type:f.type,tagName:y,value:j,maskInputOptions:a,maskInputFn:i}):e.checked&&(f.checked=e.checked)}if(y==="option"&&(e.selected&&!a.select?f.selected=!0:delete f.selected),y==="canvas"&&m){if(e.__context==="2d")xt(e)||(f.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){var D=e.toDataURL(d.type,d.quality),K=document.createElement("canvas");K.width=e.width,K.height=e.height;var Z=K.toDataURL(d.type,d.quality);D!==Z&&(f.rr_dataURL=D)}}if(y==="img"&&p){oe||(oe=r.createElement("canvas"),_e=oe.getContext("2d"));var F=e,G=F.crossOrigin;F.crossOrigin="anonymous";var $=function(){try{oe.width=F.naturalWidth,oe.height=F.naturalHeight,_e.drawImage(F,0,0),f.rr_dataURL=oe.toDataURL(d.type,d.quality)}catch(z){console.warn("Cannot inline img src=".concat(F.currentSrc,"! Error: ").concat(z))}G?f.crossOrigin=G:F.removeAttribute("crossorigin")};F.complete&&F.naturalWidth!==0?$():F.onload=$}if((y==="audio"||y==="video")&&(f.rr_mediaState=e.paused?"paused":"played",f.rr_mediaCurrentTime=e.currentTime),v||(e.scrollLeft&&(f.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(f.rr_scrollTop=e.scrollTop)),w||y==="img"&&S){var ee=e.getBoundingClientRect(),A=ee.width,J=ee.height;f={class:f.class,rr_width:"".concat(A,"px"),rr_height:"".concat(J,"px")},w=!0}return y==="iframe"&&!u(f.src)&&(e.contentDocument||(f.rr_src=f.src),delete f.src),{type:N.Element,tagName:y,attributes:f,childNodes:[],isSVG:Yt(e)||void 0,needBlock:w,rootId:I}}function C(e){return e===void 0?"":e.toLowerCase()}function Qt(e,t){return!!(t.comment&&e.type===N.Comment||e.type===N.Element&&(t.script&&(e.tagName==="script"||e.tagName==="link"&&e.attributes.rel==="preload"&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js"))||t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(C(e.attributes.name).match(/^msapplication-tile(image|color)$/)||C(e.attributes.name)==="application-name"||C(e.attributes.rel)==="icon"||C(e.attributes.rel)==="apple-touch-icon"||C(e.attributes.rel)==="shortcut icon"))||e.tagName==="meta"&&(t.headMetaDescKeywords&&C(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(C(e.attributes.property).match(/^(og|twitter|fb):/)||C(e.attributes.name).match(/^(og|twitter):/)||C(e.attributes.name)==="pinterest")||t.headMetaRobots&&(C(e.attributes.name)==="robots"||C(e.attributes.name)==="googlebot"||C(e.attributes.name)==="bingbot")||t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0||t.headMetaAuthorship&&(C(e.attributes.name)==="author"||C(e.attributes.name)==="generator"||C(e.attributes.name)==="framework"||C(e.attributes.name)==="publisher"||C(e.attributes.name)==="progid"||C(e.attributes.property).match(/^article:/)||C(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(C(e.attributes.name)==="google-site-verification"||C(e.attributes.name)==="yandex-verification"||C(e.attributes.name)==="csrf-token"||C(e.attributes.name)==="p:domain_verify"||C(e.attributes.name)==="verify-v1"||C(e.attributes.name)==="verification"||C(e.attributes.name)==="shopify-checkout-api-token"))))}function re(e,t){var r=t.doc,n=t.mirror,o=t.blockClass,s=t.blockSelector,c=t.maskTextClass,a=t.maskTextSelector,i=t.skipChild,l=i===void 0?!1:i,d=t.inlineStylesheet,p=d===void 0?!0:d,m=t.maskInputOptions,u=m===void 0?{}:m,h=t.maskTextFn,v=t.maskInputFn,S=t.slimDOMOptions,I=t.dataURLOptions,w=I===void 0?{}:I,y=t.inlineImages,f=y===void 0?!1:y,O=t.recordCanvas,_=O===void 0?!1:O,R=t.onSerialize,L=t.onIframeLoad,W=t.iframeLoadTimeout,j=W===void 0?5e3:W,D=t.onStylesheetLoad,K=t.stylesheetLoadTimeout,Z=K===void 0?5e3:K,F=t.keepIframeSrcFn,G=F===void 0?function(){return!1}:F,$=t.newlyAddedElement,ee=$===void 0?!1:$,A=t.enableStrictPrivacy,J=t.preserveWhiteSpace,z=J===void 0?!0:J,H=Bt(e,{doc:r,mirror:n,blockClass:o,blockSelector:s,maskTextClass:c,maskTextSelector:a,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:v,dataURLOptions:w,inlineImages:f,recordCanvas:_,keepIframeSrcFn:G,newlyAddedElement:ee,enableStrictPrivacy:A});if(!H)return console.warn(e,"not serialized"),null;var g;if(n.hasNode(e)?g=n.getId(e):Qt(H,S)||!z&&H.type===N.Text&&!H.isStyle&&!H.textContent.replace(/^\s+|\s+$/gm,"").length?g=he:g=Dt(),g===he)return null;var b=Object.assign(H,{id:g});n.add(e,b),R&&R(e);var X=!l;if(b.type===N.Element){if(X=X&&!b.needBlock,b.needBlock&&b.tagName==="img"){var V=e.cloneNode();V.src="",n.add(V,b)}delete b.needBlock;var q=e.shadowRoot;q&&pe(q)&&(b.isShadowHost=!0)}if((b.type===N.Document||b.type===N.Element)&&X){S.headWhitespace&&b.type===N.Element&&b.tagName==="head"&&(z=!1);for(var k={doc:r,mirror:n,blockClass:o,blockSelector:s,maskTextClass:c,maskTextSelector:a,skipChild:l,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:v,slimDOMOptions:S,dataURLOptions:w,inlineImages:f,recordCanvas:_,preserveWhiteSpace:z,onSerialize:R,onIframeLoad:L,iframeLoadTimeout:j,onStylesheetLoad:D,stylesheetLoadTimeout:Z,keepIframeSrcFn:G,enableStrictPrivacy:A},M=0,ce=Array.from(e.childNodes);M<ce.length;M++){var De=ce[M],ue=re(De,k);ue&&b.childNodes.push(ue)}if(Lt(e)&&e.shadowRoot)for(var Fe=0,Tt=Array.from(e.shadowRoot.childNodes);Fe<Tt.length;Fe++){var De=Tt[Fe],ue=re(De,k);ue&&(pe(e.shadowRoot)&&(ue.isShadow=!0),b.childNodes.push(ue))}}return e.parentNode&&de(e.parentNode)&&pe(e.parentNode)&&(b.isShadow=!0),b.type===N.Element&&b.tagName==="iframe"&&Xt(e,function(){var te=e.contentDocument;if(te&&L){var Ot=re(te,{doc:te,mirror:n,blockClass:o,blockSelector:s,maskTextClass:c,maskTextSelector:a,skipChild:!1,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:v,slimDOMOptions:S,dataURLOptions:w,inlineImages:f,recordCanvas:_,preserveWhiteSpace:z,onSerialize:R,onIframeLoad:L,iframeLoadTimeout:j,onStylesheetLoad:D,stylesheetLoadTimeout:Z,keepIframeSrcFn:G,enableStrictPrivacy:A});Ot&&L(e,Ot)}},j),b.type===N.Element&&b.tagName==="link"&&b.attributes.rel==="stylesheet"&&(Ve(e,function(){if(D){var te=re(e,{doc:r,mirror:n,blockClass:o,blockSelector:s,maskTextClass:c,maskTextSelector:a,skipChild:!1,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:v,slimDOMOptions:S,dataURLOptions:w,inlineImages:f,recordCanvas:_,preserveWhiteSpace:z,onSerialize:R,onIframeLoad:L,iframeLoadTimeout:j,onStylesheetLoad:D,stylesheetLoadTimeout:Z,keepIframeSrcFn:G,enableStrictPrivacy:A});te&&D(e,te)}},Z),ze(e)===!1)||b.type===N.Element&&b.tagName==="link"&&b.attributes.rel==="stylesheet"&&(Ve(e,function(){if(D){var te=re(e,{doc:r,mirror:n,blockClass:o,blockSelector:s,maskTextClass:c,maskTextSelector:a,skipChild:!1,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:v,slimDOMOptions:S,dataURLOptions:w,inlineImages:f,recordCanvas:_,preserveWhiteSpace:z,onSerialize:R,onIframeLoad:L,iframeLoadTimeout:j,enableStrictPrivacy:A,onStylesheetLoad:D,stylesheetLoadTimeout:Z,keepIframeSrcFn:G});te&&D(e,te)}},Z),ze(e)===!1)?null:b}function qt(e,t){var r=t||{},n=r.mirror,o=n===void 0?new Pe:n,s=r.blockClass,c=s===void 0?"highlight-block":s,a=r.blockSelector,i=a===void 0?null:a,l=r.maskTextClass,d=l===void 0?"highlight-mask":l,p=r.maskTextSelector,m=p===void 0?null:p,u=r.inlineStylesheet,h=u===void 0?!0:u,v=r.inlineImages,S=v===void 0?!1:v,I=r.recordCanvas,w=I===void 0?!1:I,y=r.maskAllInputs,f=y===void 0?!1:y,O=r.maskTextFn,_=r.maskInputFn,R=r.slimDOM,L=R===void 0?!1:R,W=r.dataURLOptions,j=r.preserveWhiteSpace,D=r.onSerialize,K=r.onIframeLoad,Z=r.iframeLoadTimeout,F=r.onStylesheetLoad,G=r.stylesheetLoadTimeout,$=r.keepIframeSrcFn,ee=$===void 0?function(){return!1}:$,A=r.enableStrictPrivacy,J=A===void 0?!1:A,z=f===!0?{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}:f===!1?{password:!0}:f,H=L===!0||L==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:L==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:L===!1?{}:L;return re(e,{doc:e,mirror:o,blockClass:c,blockSelector:i,maskTextClass:d,maskTextSelector:m,skipChild:!1,inlineStylesheet:h,maskInputOptions:z,maskTextFn:O,maskInputFn:_,slimDOMOptions:H,dataURLOptions:W,inlineImages:S,recordCanvas:w,preserveWhiteSpace:j,onSerialize:D,onIframeLoad:K,iframeLoadTimeout:Z,onStylesheetLoad:F,stylesheetLoadTimeout:G,keepIframeSrcFn:ee,newlyAddedElement:!1,enableStrictPrivacy:J})}function U(e,t,r=document){const n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}const ae=`Please stop import mirror directly. Instead of that,\r
2
2
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
3
- or you can use record.mirror to access the mirror instance during recording.`;let je={map:{},getId(){return console.error(ae),-1},getNode(){return console.error(ae),null},removeNodeFromMap(){console.error(ae)},has(){return console.error(ae),!1},reset(){console.error(ae)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(je=new Proxy(je,{get(e,t,n){return t==="map"&&console.error(ae),Reflect.get(e,t,n)}}));function me(e,t,n={}){let r=null,o=0;return function(...s){const c=Date.now();!o&&n.leading===!1&&(o=c);const a=t-(c-o),i=this;a<=0||a>t?(r&&(clearTimeout(r),r=null),o=c,e.apply(i,s)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(i,s)},a))}}function Ce(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(c){setTimeout(()=>{n.set.call(this,c)},0),s&&s.set&&s.set.call(this,c)}}),()=>Ce(e,t,s||{},!0)}function se(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}function Ze(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ue(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}const en=e=>{try{if(e instanceof HTMLElement)return e.tagName==="CANVAS"}catch{return!1}return!1};function Y(e,t,n){if(!e)return!1;const r=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!r)return!1;if(typeof t=="string"){if(r.classList.contains(t)||n&&r.closest("."+t)!==null)return!0}else if(ke(r,t,n))return!0;return!1}function tn(e,t){return t.getId(e)!==-1}function Ne(e,t){return t.getId(e)===he}function Ye(e,t){if(de(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?Ye(e.parentNode,t):!0:!0}function He(e){return Boolean(e.changedTouches)}function nn(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function Xe(e,t){return Boolean(e.nodeName==="IFRAME"&&t.getMeta(e))}function Be(e,t){return Boolean(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Ke(e){return Boolean(e?.shadowRoot)}var T=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(T||{}),P=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e))(P||{}),xe=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(xe||{}),ie=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(ie||{}),fe=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e))(fe||{}),rn=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e))(rn||{});function $e(e){return"__ln"in e}class on{constructor(){this.length=0,this.head=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&$e(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&$e(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;this.length++}removeNode(t){const n=t.__ln;!this.head||(n.previous?(n.previous.next=n.next,n.next&&(n.next.previous=n.previous)):(this.head=n.next,this.head&&(this.head.previous=null)),t.__ln&&delete t.__ln,this.length--)}}const Je=(e,t)=>`${e}@${t}`;class an{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new on,r=a=>{let i=a,l=he;for(;l===he;)i=i&&i.nextSibling,l=i&&this.mirror.getId(i);return l},o=a=>{var i,l,d,p,m;const u=a.getRootNode?(i=a.getRootNode())==null?void 0:i.host:null;let h=u;for(;(d=(l=h?.getRootNode)==null?void 0:l.call(h))!=null&&d.host;)h=((m=(p=h?.getRootNode)==null?void 0:p.call(h))==null?void 0:m.host)||null;const v=!this.doc.contains(a)&&(!h||!this.doc.contains(h));if(!a.parentNode||v)return;const S=de(a.parentNode)?this.mirror.getId(u):this.mirror.getId(a.parentNode),I=r(a);if(S===-1||I===-1)return n.addNode(a);const w=ne(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,enableStrictPrivacy:this.enableStrictPrivacy,onSerialize:y=>{Xe(y,this.mirror)&&this.iframeManager.addIframe(y),Be(y,this.mirror)&&this.stylesheetManager.addStylesheet(y),Ke(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,document)},onIframeLoad:(y,f)=>{this.iframeManager.attachIframe(y,f,this.mirror),this.shadowDomManager.observeAttachShadow(y)},onStylesheetLoad:(y,f)=>{this.stylesheetManager.attachStylesheet(y,f,this.mirror)}});w&&t.push({parentId:S,nextId:I,node:w})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of Array.from(this.movedSet.values()))Qe(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||o(a);for(const a of Array.from(this.addedSet.values()))!et(this.droppedSet,a)&&!Qe(this.removes,a,this.mirror)||et(this.movedSet,a)?o(a):this.droppedSet.add(a);let s=null;for(;n.length;){let a=null;if(s){const i=this.mirror.getId(s.value.parentNode),l=r(s.value);i!==-1&&l!==-1&&(a=s)}if(!a)for(let i=n.length-1;i>=0;i--){const l=n.get(i);if(l){const d=this.mirror.getId(l.value.parentNode),p=r(l.value);if(d!==-1&&p!==-1){a=l;break}}}if(!a){for(;n.head;)n.removeNode(n.head.value);break}s=a.previous,n.removeNode(a.value),o(a.value)}const c={texts:this.texts.map(a=>{let i=a.value;return this.enableStrictPrivacy&&i&&(i=Ae(i)),{id:this.mirror.getId(a.node),value:i}}).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>({id:this.mirror.getId(a.node),attributes:a.attributes})).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:t};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(c))},this.processMutation=t=>{if(!Ne(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Y(t.target,this.blockClass,!1)&&n!==t.oldValue&&this.texts.push({value:Ge(t.target,this.maskTextClass,this.maskTextSelector)&&n?this.maskTextFn?this.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.target.getAttribute(t.attributeName);if(t.attributeName==="value"&&(r=Te({maskInputOptions:this.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:r,maskInputFn:this.maskInputFn})),Y(t.target,this.blockClass,!1)||r===t.oldValue)return;let o=this.attributes.find(s=>s.node===t.target);if(n.tagName==="IFRAME"&&t.attributeName==="src"&&!this.keepIframeSrcFn(r))if(!n.contentDocument)t.attributeName="rr_src";else return;if(o||(o={node:t.target,attributes:{}},this.attributes.push(o)),t.attributeName==="style"){const s=this.doc.createElement("span");t.oldValue&&s.setAttribute("style",t.oldValue),(o.attributes.style===void 0||o.attributes.style===null)&&(o.attributes.style={});const c=o.attributes.style;for(const a of Array.from(n.style)){const i=n.style.getPropertyValue(a),l=n.style.getPropertyPriority(a);(i!==s.style.getPropertyValue(a)||l!==s.style.getPropertyPriority(a))&&(l===""?c[a]=i:c[a]=[i,l])}for(const a of Array.from(s.style))n.style.getPropertyValue(a)===""&&(c[a]=!1)}else{if(t.target.tagName==="INPUT"){const s=t.target;if(s.type==="password"){o.attributes.value="*".repeat(s.value.length);break}}o.attributes[t.attributeName]=We(this.doc,n.tagName,t.attributeName,r)}break}case"childList":{if(Y(t.target,this.blockClass,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),o=de(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Y(t.target,this.blockClass,!1)||Ne(n,this.mirror)||!tn(n,this.mirror)||(this.addedSet.has(n)?(Ee(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||Ye(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Je(r,o)]?Ee(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:de(t.target)&&pe(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(this.mirror.hasNode(t)){if(Ne(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[Je(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Y(t,this.blockClass,!1)||t.childNodes.forEach(r=>this.genAdds(r))}}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","enableStrictPrivacy"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Ee(e,t){e.delete(t),t.childNodes.forEach(n=>Ee(e,n))}function Qe(e,t,n){return e.length===0?!1:qe(e,t,n)}function qe(e,t,n){const{parentNode:r}=t;if(!r)return!1;const o=n.getId(r);return e.some(s=>s.id===o)?!0:qe(e,r,n)}function et(e,t){return e.size===0?!1:tt(e,t)}function tt(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:tt(e,n):!1}var sn=Object.defineProperty,ln=Object.defineProperties,cn=Object.getOwnPropertyDescriptors,nt=Object.getOwnPropertySymbols,un=Object.prototype.hasOwnProperty,dn=Object.prototype.propertyIsEnumerable,rt=(e,t,n)=>t in e?sn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ot=(e,t)=>{for(var n in t||(t={}))un.call(t,n)&&rt(e,n,t[n]);if(nt)for(var n of nt(t))dn.call(t,n)&&rt(e,n,t[n]);return e},pn=(e,t)=>ln(e,cn(t));const re=[],at=typeof CSSGroupingRule<"u",st=typeof CSSMediaRule<"u",it=typeof CSSSupportsRule<"u",lt=typeof CSSConditionRule<"u";function ve(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch{return e.target}}function ct(e,t){var n,r;const o=new an;re.push(o),o.init(e);let s=window.MutationObserver||window.__rrMutationObserver;const c=(r=(n=window?.Zone)==null?void 0:n.__symbol__)==null?void 0:r.call(n,"MutationObserver");c&&window[c]&&(s=window[c]);const a=new s(o.processMutations.bind(o));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function hn({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const o=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let c=[],a;const i=me(p=>{const m=Date.now()-a;e(c.map(u=>(u.timeOffset-=m,u)),p),c=[],a=null},s),l=me(p=>{const m=ve(p),{clientX:u,clientY:h}=He(p)?p.changedTouches[0]:p;a||(a=Date.now()),c.push({x:u,y:h,id:r.getId(m),timeOffset:Date.now()-a}),i(typeof DragEvent<"u"&&p instanceof DragEvent?P.Drag:p instanceof MouseEvent?P.MouseMove:P.TouchMove)},o,{trailing:!1}),d=[U("mousemove",l,n),U("touchmove",l,n),U("drag",l,n)];return()=>{d.forEach(p=>p())}}function mn({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[],a=i=>l=>{const d=ve(l);if(Y(d,r,!0)||en(d))return;const p=He(l)?l.changedTouches[0]:l;if(!p)return;const m=n.getId(d),{clientX:u,clientY:h}=p;e({type:xe[i],id:m,x:u,y:h})};return Object.keys(xe).filter(i=>Number.isNaN(Number(i))&&!i.endsWith("_Departed")&&s[i]!==!1).forEach(i=>{const l=i.toLowerCase(),d=a(i);c.push(U(l,d,t))}),()=>{c.forEach(i=>i())}}function ut({scrollCb:e,doc:t,mirror:n,blockClass:r,sampling:o}){const s=me(c=>{const a=ve(c);if(!a||Y(a,r,!0))return;const i=n.getId(a);if(a===t){const l=t.scrollingElement||t.documentElement;e({id:i,x:l.scrollLeft,y:l.scrollTop})}else e({id:i,x:a.scrollLeft,y:a.scrollTop})},o.scroll||100);return U("scroll",s,t)}function fn({viewportResizeCb:e}){let t=-1,n=-1;const r=me(()=>{const o=Ze(),s=Ue();(t!==o||n!==s)&&(e({width:Number(s),height:Number(o)}),t=o,n=s)},200);return U("resize",r,window)}function dt(e,t){const n=ot({},e);return t||delete n.userTriggered,n}const vn=["INPUT","TEXTAREA","SELECT"],pt=new WeakMap;function yn({inputCb:e,doc:t,mirror:n,blockClass:r,ignoreClass:o,maskInputOptions:s,maskInputFn:c,sampling:a,userTriggeredOnInput:i}){function l(h){let v=ve(h);const S=h.isTrusted;if(v&&v.tagName==="OPTION"&&(v=v.parentElement),!v||!v.tagName||vn.indexOf(v.tagName)<0||Y(v,r,!0))return;const I=v.type;if(v.classList.contains(o))return;let w=v.value,y=!1;I==="radio"||I==="checkbox"?y=v.checked:(s[v.tagName.toLowerCase()]||s[I])&&(w=Te({maskInputOptions:s,tagName:v.tagName,type:I,value:w,maskInputFn:c})),d(v,dt({text:w,isChecked:y,userTriggered:S},i));const f=v.name;I==="radio"&&f&&y&&t.querySelectorAll(`input[type="radio"][name="${f}"]`).forEach(O=>{O!==v&&d(O,dt({text:O.value,isChecked:!y,userTriggered:!1},i))})}function d(h,v){const S=pt.get(h);if(!S||S.text!==v.text||S.isChecked!==v.isChecked){pt.set(h,v);const I=n.getId(h);e(pn(ot({},v),{id:I}))}}const p=(a.input==="last"?["change"]:["input","change"]).map(h=>U(h,l,t)),m=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),u=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return m&&m.set&&p.push(...u.map(h=>Ce(h[0],h[1],{set(){l({target:this})}}))),()=>{p.forEach(h=>h())}}function Ie(e){const t=[];function n(r,o){if(at&&r.parentRule instanceof CSSGroupingRule||st&&r.parentRule instanceof CSSMediaRule||it&&r.parentRule instanceof CSSSupportsRule||lt&&r.parentRule instanceof CSSConditionRule){const s=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(s)}else{const s=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(s)}return o}return n(e,t)}function gn({styleSheetRuleCb:e,mirror:t},{win:n}){const r=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=function(a,i){const l=t.getId(this.ownerNode);return l!==-1&&e({id:l,adds:[{rule:a,index:i}]}),r.apply(this,[a,i])};const o=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=function(a){const i=t.getId(this.ownerNode);return i!==-1&&e({id:i,removes:[{index:a}]}),o.apply(this,[a])};const s={};at?s.CSSGroupingRule=n.CSSGroupingRule:(st&&(s.CSSMediaRule=n.CSSMediaRule),lt&&(s.CSSConditionRule=n.CSSConditionRule),it&&(s.CSSSupportsRule=n.CSSSupportsRule));const c={};return Object.entries(s).forEach(([a,i])=>{c[a]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=function(l,d){const p=t.getId(this.parentStyleSheet.ownerNode);return p!==-1&&e({id:p,adds:[{rule:l,index:[...Ie(this),d||0]}]}),c[a].insertRule.apply(this,[l,d])},i.prototype.deleteRule=function(l){const d=t.getId(this.parentStyleSheet.ownerNode);return d!==-1&&e({id:d,removes:[{index:[...Ie(this),l]}]}),c[a].deleteRule.apply(this,[l])}}),()=>{n.CSSStyleSheet.prototype.insertRule=r,n.CSSStyleSheet.prototype.deleteRule=o,Object.entries(s).forEach(([a,i])=>{i.prototype.insertRule=c[a].insertRule,i.prototype.deleteRule=c[a].deleteRule})}}function bn({styleDeclarationCb:e,mirror:t},{win:n}){const r=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=function(s,c,a){var i,l;const d=t.getId((l=(i=this.parentRule)==null?void 0:i.parentStyleSheet)==null?void 0:l.ownerNode);return d!==-1&&e({id:d,set:{property:s,value:c,priority:a},index:Ie(this.parentRule)}),r.apply(this,[s,c,a])};const o=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=function(s){var c,a;const i=t.getId((a=(c=this.parentRule)==null?void 0:c.parentStyleSheet)==null?void 0:a.ownerNode);return i!==-1&&e({id:i,remove:{property:s},index:Ie(this.parentRule)}),o.apply(this,[s])},()=>{n.CSSStyleDeclaration.prototype.setProperty=r,n.CSSStyleDeclaration.prototype.removeProperty=o}}function Sn({mediaInteractionCb:e,blockClass:t,mirror:n,sampling:r}){const o=c=>me(a=>{const i=ve(a);if(!i||Y(i,t,!0))return;const{currentTime:l,volume:d,muted:p}=i;e({type:c,id:n.getId(i),currentTime:l,volume:d,muted:p})},r.media||500),s=[U("play",o(fe.Play)),U("pause",o(fe.Pause)),U("seeked",o(fe.Seeked)),U("volumechange",o(fe.VolumeChange))];return()=>{s.forEach(c=>c())}}function kn({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,s=n.FontFace;n.FontFace=function(a,i,l){const d=new s(a,i,l);return o.set(d,{family:a,buffer:typeof i!="string",descriptors:l,fontSource:typeof i=="string"?i:JSON.stringify(Array.from(new Uint8Array(i)))}),d};const c=se(t.fonts,"add",function(a){return function(i){return setTimeout(()=>{const l=o.get(i);l&&(e(l),o.delete(i))},0),a.apply(this,[i])}});return r.push(()=>{n.FontFace=s}),r.push(c),()=>{r.forEach(a=>a())}}function Cn(e,t){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:s,viewportResizeCb:c,inputCb:a,mediaInteractionCb:i,styleSheetRuleCb:l,styleDeclarationCb:d,canvasMutationCb:p,fontCb:m}=e;e.mutationCb=(...u)=>{t.mutation&&t.mutation(...u),n(...u)},e.mousemoveCb=(...u)=>{t.mousemove&&t.mousemove(...u),r(...u)},e.mouseInteractionCb=(...u)=>{t.mouseInteraction&&t.mouseInteraction(...u),o(...u)},e.scrollCb=(...u)=>{t.scroll&&t.scroll(...u),s(...u)},e.viewportResizeCb=(...u)=>{t.viewportResize&&t.viewportResize(...u),c(...u)},e.inputCb=(...u)=>{t.input&&t.input(...u),a(...u)},e.mediaInteractionCb=(...u)=>{t.mediaInteaction&&t.mediaInteaction(...u),i(...u)},e.styleSheetRuleCb=(...u)=>{t.styleSheetRule&&t.styleSheetRule(...u),l(...u)},e.styleDeclarationCb=(...u)=>{t.styleDeclaration&&t.styleDeclaration(...u),d(...u)},e.canvasMutationCb=(...u)=>{t.canvasMutation&&t.canvasMutation(...u),p(...u)},e.fontCb=(...u)=>{t.font&&t.font(...u),m(...u)}}function In(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};Cn(e,t);const r=ct(e,e.doc),o=hn(e),s=mn(e),c=ut(e),a=fn(e),i=yn(e),l=Sn(e),d=gn(e,{win:n}),p=bn(e,{win:n}),m=e.collectFonts?kn(e):()=>{},u=[];for(const h of e.plugins)u.push(h.observer(h.callback,n,h.options));return()=>{re.forEach(h=>h.reset()),r.disconnect(),o(),s(),c(),a(),i(),l(),d(),p(),m(),u.forEach(h=>h())}}class wn{constructor(t){this.iframes=new WeakMap,this.mutationCb=t.mutationCb}addIframe(t){this.iframes.set(t,!0)}addLoadListener(t){this.loadListener=t}attachIframe(t,n,r){var o;this.mutationCb({adds:[{parentId:r.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(o=this.loadListener)==null||o.call(this,t)}}var Mn=Object.defineProperty,Tn=Object.defineProperties,On=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,Ln=Object.prototype.hasOwnProperty,Nn=Object.prototype.propertyIsEnumerable,mt=(e,t,n)=>t in e?Mn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ft=(e,t)=>{for(var n in t||(t={}))Ln.call(t,n)&&mt(e,n,t[n]);if(ht)for(var n of ht(t))Nn.call(t,n)&&mt(e,n,t[n]);return e},vt=(e,t)=>Tn(e,On(t));class xn{constructor(t){this.restorePatches=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror;const n=this;this.restorePatches.push(se(HTMLElement.prototype,"attachShadow",function(r){return function(o){const s=r.call(this,o);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,this.ownerDocument),s}}))}addShadowRoot(t,n){!pe(t)||(ct(vt(ft({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),ut(vt(ft({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror})))}observeAttachShadow(t){if(t.contentWindow){const n=this;this.restorePatches.push(se(t.contentWindow.HTMLElement.prototype,"attachShadow",function(r){return function(o){const s=r.call(this,o);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,t.contentDocument),s}}))}}reset(){this.restorePatches.forEach(t=>t())}}for(var le="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",En=typeof Uint8Array>"u"?[]:new Uint8Array(256),we=0;we<le.length;we++)En[le.charCodeAt(we)]=we;var Rn=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=le[t[n]>>2],o+=le[(t[n]&3)<<4|t[n+1]>>4],o+=le[(t[n+1]&15)<<2|t[n+2]>>6],o+=le[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o};const yt=new Map;function Dn(e,t){let n=yt.get(e);return n||(n=new Map,yt.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const gt=(e,t,n)=>{if(!e||!(St(e,t)||typeof e=="object"))return;const r=e.constructor.name,o=Dn(n,r);let s=o.indexOf(e);return s===-1&&(s=o.length,o.push(e)),s};function Me(e,t,n){if(e instanceof Array)return e.map(r=>Me(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,o=Rn(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Me(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",o=e.toDataURL();return{rr_type:r,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Me(e.data,t,n),e.width,e.height]};if(St(e,t)||typeof e=="object"){const r=e.constructor.name,o=gt(e,t,n);return{rr_type:r,index:o}}}}return e}const bt=(e,t,n)=>[...e].map(r=>Me(r,t,n)),St=(e,t)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(r=>typeof t[r]=="function");return Boolean(n.find(r=>e instanceof t[r]))};function Fn(e,t,n,r){const o=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const c of s)try{if(typeof t.CanvasRenderingContext2D.prototype[c]!="function")continue;const a=se(t.CanvasRenderingContext2D.prototype,c,function(i){return function(...l){return Y(this.canvas,n,!0)||setTimeout(()=>{const d=bt([...l],t,this);e(this.canvas,{type:ie["2D"],property:c,args:d})},0),i.apply(this,l)}});o.push(a)}catch{const i=Ce(t.CanvasRenderingContext2D.prototype,c,{set(l){e(this.canvas,{type:ie["2D"],property:c,args:[l],setter:!0})}});o.push(i)}return()=>{o.forEach(c=>c())}}function kt(e,t){const n=[];try{const r=se(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(s,...c){return Y(this,t,!0)||"__context"in this||(this.__context=s),o.apply(this,[s,...c])}});n.push(r)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(r=>r())}}function Ct(e,t,n,r,o,s){const c=[],a=Object.getOwnPropertyNames(e);for(const i of a)try{if(typeof e[i]!="function")continue;const l=se(e,i,function(d){return function(...p){const m=d.apply(this,p);if(gt(m,s,e),!Y(this.canvas,r,!0)){const u=bt([...p],s,e),h={type:t,property:i,args:u};n(this.canvas,h)}return m}});c.push(l)}catch{const d=Ce(e,i,{set(p){n(this.canvas,{type:t,property:i,args:[p],setter:!0})}});c.push(d)}return c}function Pn(e,t,n,r){const o=[];return o.push(...Ct(t.WebGLRenderingContext.prototype,ie.WebGL,e,n,r,t)),typeof t.WebGL2RenderingContext<"u"&&o.push(...Ct(t.WebGL2RenderingContext.prototype,ie.WebGL2,e,n,r,t)),()=>{o.forEach(s=>s())}}function An(e,t){var n=atob(e);if(t){for(var r=new Uint8Array(n.length),o=0,s=n.length;o<s;++o)r[o]=n.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}function _n(e,t,n){var r=t===void 0?null:t,o=n===void 0?!1:n,s=An(e,o),c=s.indexOf(`
4
- `,10)+1,a=s.substring(c)+(r?"//# sourceMappingURL="+r:""),i=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(i)}function Wn(e,t,n){var r;return function(s){return r=r||_n(e,t,n),new Worker(r,s)}}var Gn=Wn("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Zm9yKHZhciByPSJBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OSsvIixsPXR5cGVvZiBVaW50OEFycmF5PiJ1Ij9bXTpuZXcgVWludDhBcnJheSgyNTYpLGY9MDtmPHIubGVuZ3RoO2YrKylsW3IuY2hhckNvZGVBdChmKV09Zjt2YXIgZD1mdW5jdGlvbihzKXt2YXIgZT1uZXcgVWludDhBcnJheShzKSxuLGE9ZS5sZW5ndGgsdD0iIjtmb3Iobj0wO248YTtuKz0zKXQrPXJbZVtuXT4+Ml0sdCs9clsoZVtuXSYzKTw8NHxlW24rMV0+PjRdLHQrPXJbKGVbbisxXSYxNSk8PDJ8ZVtuKzJdPj42XSx0Kz1yW2VbbisyXSY2M107cmV0dXJuIGElMz09PTI/dD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTEpKyI9IjphJTM9PT0xJiYodD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTIpKyI9PSIpLHR9O2NvbnN0IGM9bmV3IE1hcCx1PW5ldyBNYXA7YXN5bmMgZnVuY3Rpb24gcChzLGUpe2NvbnN0IG49YCR7c30tJHtlfWA7aWYodS5oYXMobikpcmV0dXJuIHUuZ2V0KG4pO2NvbnN0IGE9bmV3IE9mZnNjcmVlbkNhbnZhcyhzLGUpO2EuZ2V0Q29udGV4dCgiMmQiKTtjb25zdCB0PWF3YWl0KGF3YWl0IGEuY29udmVydFRvQmxvYigpKS5hcnJheUJ1ZmZlcigpLGc9ZCh0KTtyZXR1cm4gdS5zZXQobixnKSxnfWNvbnN0IGk9c2VsZjtpLm9ubWVzc2FnZT1hc3luYyBmdW5jdGlvbihzKXtpZighKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcykpcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOnMuZGF0YS5pZH0pO2NvbnN0e2lkOmUsYml0bWFwOm4sd2lkdGg6YSxoZWlnaHQ6dH09cy5kYXRhLGc9cChhLHQpLGg9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2guZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCB3PWF3YWl0IGguY29udmVydFRvQmxvYigpLHk9dy50eXBlLGI9YXdhaXQgdy5hcnJheUJ1ZmZlcigpLG89ZChiKTtpZighYy5oYXMoZSkmJmF3YWl0IGc9PT1vKXJldHVybiBjLnNldChlLG8pLGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpZihjLmdldChlKT09PW8pcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpLnBvc3RNZXNzYWdlKHtpZDplLHR5cGU6eSxiYXNlNjQ6byx3aWR0aDphLGhlaWdodDp0fSksYy5zZXQoZSxvKX19KSgpOwoK",null,!1),It=Object.getOwnPropertySymbols,zn=Object.prototype.hasOwnProperty,Vn=Object.prototype.propertyIsEnumerable,jn=(e,t)=>{var n={};for(var r in e)zn.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&It)for(var r of It(e))t.indexOf(r)<0&&Vn.call(e,r)&&(n[r]=e[r]);return n},Zn=(e,t,n)=>new Promise((r,o)=>{var s=i=>{try{a(n.next(i))}catch(l){o(l)}},c=i=>{try{a(n.throw(i))}catch(l){o(l)}},a=i=>i.done?r(i.value):Promise.resolve(i.value).then(s,c);a((n=n.apply(e,t)).next())});class Un{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(c,a)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(c)||this.pendingCanvasMutations.set(c,[]),this.pendingCanvasMutations.get(c).push(a)};const{sampling:n="all",win:r,blockClass:o,recordCanvas:s}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,s&&n==="all"&&this.initCanvasMutationObserver(r,o),s&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,o)}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,n,r){const o=kt(n,r),s=new Map,c=new Gn;c.onmessage=p=>{const{id:m}=p.data;if(s.set(m,!1),!("base64"in p.data))return;const{base64:u,type:h,width:v,height:S}=p.data;this.mutationCb({id:m,type:ie["2D"],commands:[{property:"clearRect",args:[0,0,v,S]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:u}],type:h}]},0,0]}]})};const a=1e3/t;let i=0,l;const d=p=>{if(i&&p-i<a){l=requestAnimationFrame(d);return}i=p,n.document.querySelectorAll(`canvas:not(.${r} *)`).forEach(m=>Zn(this,null,function*(){var u;const h=this.mirror.getId(m);if(s.get(h))return;if(s.set(h,!0),["webgl","webgl2"].includes(m.__context)){const S=m.getContext(m.__context);((u=S?.getContextAttributes())==null?void 0:u.preserveDrawingBuffer)===!1&&S?.clear(S.COLOR_BUFFER_BIT)}if(m.width===0||m.height===0)return;const v=yield createImageBitmap(m);c.postMessage({id:h,bitmap:v,width:m.width,height:m.height},[v])})),l=requestAnimationFrame(d)};l=requestAnimationFrame(d),this.resetObservers=()=>{o(),cancelAnimationFrame(l)}}initCanvasMutationObserver(t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=kt(t,n),o=Fn(this.processMutation.bind(this),t,n,this.mirror),s=Pn(this.processMutation.bind(this),t,n,this.mirror);this.resetObservers=()=>{r(),o(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const o=r.map(c=>jn(c,["type"])),{type:s}=r[0];this.mutationCb({id:n,type:s,commands:o}),this.pendingCanvasMutations.delete(t)}}class Yn{constructor(t){this.trackedStylesheets=new WeakSet,this.mutationCb=t.mutationCb}addStylesheet(t){this.trackedStylesheets.has(t)||(this.trackedStylesheets.add(t),this.trackStylesheet(t))}trackStylesheet(t){}attachStylesheet(t,n,r){this.mutationCb({adds:[{parentId:r.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[]}),this.addStylesheet(t)}}var Hn=Object.defineProperty,Xn=Object.defineProperties,Bn=Object.getOwnPropertyDescriptors,wt=Object.getOwnPropertySymbols,Kn=Object.prototype.hasOwnProperty,$n=Object.prototype.propertyIsEnumerable,Mt=(e,t,n)=>t in e?Hn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B=(e,t)=>{for(var n in t||(t={}))Kn.call(t,n)&&Mt(e,n,t[n]);if(wt)for(var n of wt(t))$n.call(t,n)&&Mt(e,n,t[n]);return e},Jn=(e,t)=>Xn(e,Bn(t));function E(e){return Jn(B({},e),{timestamp:Date.now()})}let x,ye;const Q=Nt();function ge(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="highlight-block",blockSelector:s=null,ignoreClass:c="highlight-ignore",maskTextClass:a="highlight-mask",maskTextSelector:i=null,inlineStylesheet:l=!0,maskAllInputs:d,maskInputOptions:p,slimDOMOptions:m,maskInputFn:u,maskTextFn:h,hooks:v,packFn:S,sampling:I={},mousemoveWait:w,recordCanvas:y=!1,userTriggeredOnInput:f=!1,collectFonts:O=!1,inlineImages:_=!1,plugins:R,keepIframeSrcFn:L=()=>!1,enableStrictPrivacy:W=!1}=e;if(!t)throw new Error("emit function is required");w!==void 0&&I.mousemove===void 0&&(I.mousemove=w),Q.reset();const j=d===!0?{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}:p!==void 0?p:{password:!0},D=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all"}:m||{};nn();let K,Z=0;const F=g=>{for(const b of R||[])b.eventProcessor&&(g=b.eventProcessor(g));return S&&(g=S(g)),g};x=(g,b)=>{var X;if(((X=re[0])==null?void 0:X.isFrozen())&&g.type!==T.FullSnapshot&&!(g.type===T.IncrementalSnapshot&&g.data.source===P.Mutation)&&re.forEach(V=>V.unfreeze()),t(F(g),b),g.type===T.FullSnapshot)K=g,Z=0;else if(g.type===T.IncrementalSnapshot){if(g.data.source===P.Mutation&&g.data.isAttachIframe)return;Z++;const V=r&&Z>=r,q=n&&g.timestamp-K.timestamp>n;(V||q)&&ye(!0)}};const G=g=>{x(E({type:T.IncrementalSnapshot,data:B({source:P.Mutation},g)}))},$=g=>x(E({type:T.IncrementalSnapshot,data:B({source:P.Scroll},g)})),ee=g=>x(E({type:T.IncrementalSnapshot,data:B({source:P.CanvasMutation},g)})),A=new wn({mutationCb:G}),J=new Yn({mutationCb:G}),z=new Un({recordCanvas:y,mutationCb:ee,win:window,blockClass:o,mirror:Q,sampling:I.canvas}),H=new xn({mutationCb:G,scrollCb:$,bypassOptions:{blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:i,inlineStylesheet:l,maskInputOptions:j,maskTextFn:h,maskInputFn:u,recordCanvas:y,inlineImages:_,sampling:I,slimDOMOptions:D,iframeManager:A,stylesheetManager:J,canvasManager:z,keepIframeSrcFn:L,enableStrictPrivacy:W},mirror:Q});ye=(g=!1)=>{var b,X,V,q;x(E({type:T.Meta,data:{href:window.location.href,width:Ue(),height:Ze()}}),g),re.forEach(M=>M.lock());const k=qt(document,{mirror:Q,blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:i,inlineStylesheet:l,maskAllInputs:j,maskTextFn:h,slimDOM:D,recordCanvas:y,inlineImages:_,enableStrictPrivacy:W,onSerialize:M=>{Xe(M,Q)&&A.addIframe(M),Be(M,Q)&&J.addStylesheet(M),Ke(M)&&H.addShadowRoot(M.shadowRoot,document)},onIframeLoad:(M,ce)=>{A.attachIframe(M,ce,Q),H.observeAttachShadow(M)},onStylesheetLoad:(M,ce)=>{J.attachStylesheet(M,ce,Q)},keepIframeSrcFn:L});if(!k)return console.warn("Failed to snapshot the document");x(E({type:T.FullSnapshot,data:{node:k,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:document?.documentElement.scrollLeft||((X=(b=document?.body)==null?void 0:b.parentElement)==null?void 0:X.scrollLeft)||document?.body.scrollLeft||0,top:window.pageYOffset!==void 0?window.pageYOffset:document?.documentElement.scrollTop||((q=(V=document?.body)==null?void 0:V.parentElement)==null?void 0:q.scrollTop)||document?.body.scrollTop||0}}})),re.forEach(M=>M.unlock())};try{const g=[];g.push(U("DOMContentLoaded",()=>{x(E({type:T.DomContentLoaded,data:{}}))}));const b=V=>{var q;return In({mutationCb:G,mousemoveCb:(k,M)=>x(E({type:T.IncrementalSnapshot,data:{source:M,positions:k}})),mouseInteractionCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.MouseInteraction},k)})),scrollCb:$,viewportResizeCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.ViewportResize},k)})),inputCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.Input},k)})),mediaInteractionCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.MediaInteraction},k)})),styleSheetRuleCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.StyleSheetRule},k)})),styleDeclarationCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.StyleDeclaration},k)})),canvasMutationCb:ee,fontCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.Font},k)})),blockClass:o,ignoreClass:c,maskTextClass:a,maskTextSelector:i,maskInputOptions:j,inlineStylesheet:l,sampling:I,recordCanvas:y,inlineImages:_,userTriggeredOnInput:f,collectFonts:O,doc:V,maskInputFn:u,maskTextFn:h,keepIframeSrcFn:L,blockSelector:s,slimDOMOptions:D,mirror:Q,iframeManager:A,stylesheetManager:J,shadowDomManager:H,canvasManager:z,enableStrictPrivacy:W,plugins:((q=R?.filter(k=>k.observer))==null?void 0:q.map(k=>({observer:k.observer,options:k.options,callback:M=>x(E({type:T.Plugin,data:{plugin:k.name,payload:M}}))})))||[]},v)};A.addLoadListener(V=>{g.push(b(V.contentDocument))});const X=()=>{ye(),g.push(b(document))};return document.readyState==="interactive"||document.readyState==="complete"?X():g.push(U("load",()=>{x(E({type:T.Load,data:{}})),X()},window)),()=>{g.forEach(V=>V())}}catch(g){console.warn(g)}}return ge.addCustomEvent=(e,t)=>{!x||x(E({type:T.Custom,data:{tag:e,payload:t}}))},ge.freezePage=()=>{re.forEach(e=>e.freeze())},ge.takeFullSnapshot=e=>{if(!ye)throw new Error("please take full snapshot after start recording");ye(e)},ge.mirror=Q,ge}();
3
+ or you can use record.mirror to access the mirror instance during recording.`;let je={map:{},getId(){return console.error(ae),-1},getNode(){return console.error(ae),null},removeNodeFromMap(){console.error(ae)},has(){return console.error(ae),!1},reset(){console.error(ae)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(je=new Proxy(je,{get(e,t,r){return t==="map"&&console.error(ae),Reflect.get(e,t,r)}}));function me(e,t,r={}){let n=null,o=0;return function(...s){const c=Date.now();!o&&r.leading===!1&&(o=c);const a=t-(c-o),i=this;a<=0||a>t?(n&&(clearTimeout(n),n=null),o=c,e.apply(i,s)):!n&&r.trailing!==!1&&(n=setTimeout(()=>{o=r.leading===!1?0:Date.now(),n=null,e.apply(i,s)},a))}}function Ce(e,t,r,n,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,n?r:{set(c){setTimeout(()=>{r.set.call(this,c)},0),s&&s.set&&s.set.call(this,c)}}),()=>Ce(e,t,s||{},!0)}function se(e,t,r){try{if(!(t in e))return()=>{};const n=e[t],o=r(n);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=o,()=>{e[t]=n}}catch{return()=>{}}}function Ze(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ue(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}const er=e=>{try{if(e instanceof HTMLElement)return e.tagName==="CANVAS"}catch{return!1}return!1};function Y(e,t,r){if(!e)return!1;const n=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!n)return!1;if(typeof t=="string"){if(n.classList.contains(t)||r&&n.closest("."+t)!==null)return!0}else if(ke(n,t,r))return!0;return!1}function tr(e,t){return t.getId(e)!==-1}function xe(e,t){return t.getId(e)===he}function Ye(e,t){if(de(e))return!1;const r=t.getId(e);return t.has(r)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?Ye(e.parentNode,t):!0:!0}function He(e){return Boolean(e.changedTouches)}function rr(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let r=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===r)return!0;while(r=r&&r.parentNode);return!1})}function Xe(e,t){return Boolean(e.nodeName==="IFRAME"&&t.getMeta(e))}function Be(e,t){return Boolean(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Ke(e){return Boolean(e?.shadowRoot)}var T=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(T||{}),P=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e))(P||{}),Ee=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Ee||{}),ie=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(ie||{}),fe=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e))(fe||{}),nr=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e))(nr||{});function $e(e){return"__ln"in e}class or{constructor(){this.length=0,this.head=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let n=0;n<t;n++)r=r?.next||null;return r}addNode(t){const r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&$e(t.previousSibling)){const n=t.previousSibling.__ln.next;r.next=n,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,n&&(n.previous=r)}else if(t.nextSibling&&$e(t.nextSibling)&&t.nextSibling.__ln.previous){const n=t.nextSibling.__ln.previous;r.previous=n,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,n&&(n.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;this.length++}removeNode(t){const r=t.__ln;!this.head||(r.previous?(r.previous.next=r.next,r.next&&(r.next.previous=r.previous)):(this.head=r.next,this.head&&(this.head.previous=null)),t.__ln&&delete t.__ln,this.length--)}}const Je=(e,t)=>`${e}@${t}`;class ar{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],r=new or,n=a=>{let i=a,l=he;for(;l===he;)i=i&&i.nextSibling,l=i&&this.mirror.getId(i);return l},o=a=>{var i,l,d,p,m;const u=a.getRootNode?(i=a.getRootNode())==null?void 0:i.host:null;let h=u;for(;(d=(l=h?.getRootNode)==null?void 0:l.call(h))!=null&&d.host;)h=((m=(p=h?.getRootNode)==null?void 0:p.call(h))==null?void 0:m.host)||null;const v=!this.doc.contains(a)&&(!h||!this.doc.contains(h));if(!a.parentNode||v)return;const S=de(a.parentNode)?this.mirror.getId(u):this.mirror.getId(a.parentNode),I=n(a);if(S===-1||I===-1)return r.addNode(a);const w=re(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,enableStrictPrivacy:this.enableStrictPrivacy,onSerialize:y=>{Xe(y,this.mirror)&&this.iframeManager.addIframe(y),Be(y,this.mirror)&&this.stylesheetManager.addStylesheet(y),Ke(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,document)},onIframeLoad:(y,f)=>{this.iframeManager.attachIframe(y,f,this.mirror),this.shadowDomManager.observeAttachShadow(y)},onStylesheetLoad:(y,f)=>{this.stylesheetManager.attachStylesheet(y,f,this.mirror)}});w&&t.push({parentId:S,nextId:I,node:w})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of Array.from(this.movedSet.values()))Qe(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||o(a);for(const a of Array.from(this.addedSet.values()))!et(this.droppedSet,a)&&!Qe(this.removes,a,this.mirror)||et(this.movedSet,a)?o(a):this.droppedSet.add(a);let s=null;for(;r.length;){let a=null;if(s){const i=this.mirror.getId(s.value.parentNode),l=n(s.value);i!==-1&&l!==-1&&(a=s)}if(!a)for(let i=r.length-1;i>=0;i--){const l=r.get(i);if(l){const d=this.mirror.getId(l.value.parentNode),p=n(l.value);if(d!==-1&&p!==-1){a=l;break}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}s=a.previous,r.removeNode(a.value),o(a.value)}const c={texts:this.texts.map(a=>{let i=a.value;return this.enableStrictPrivacy&&i&&(i=Oe(i)),{id:this.mirror.getId(a.node),value:i}}).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>({id:this.mirror.getId(a.node),attributes:a.attributes})).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:t};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(c))},this.processMutation=t=>{if(!xe(t.target,this.mirror))switch(t.type){case"characterData":{const r=t.target.textContent;!Y(t.target,this.blockClass,!1)&&r!==t.oldValue&&this.texts.push({value:Ge(t.target,this.maskTextClass,this.maskTextSelector)&&r?this.maskTextFn?this.maskTextFn(r):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{const r=t.target;let n=t.target.getAttribute(t.attributeName);if(t.attributeName==="value"&&(n=Te({maskInputOptions:this.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:n,maskInputFn:this.maskInputFn})),Y(t.target,this.blockClass,!1)||n===t.oldValue)return;let o=this.attributes.find(s=>s.node===t.target);if(r.tagName==="IFRAME"&&t.attributeName==="src"&&!this.keepIframeSrcFn(n))if(!r.contentDocument)t.attributeName="rr_src";else return;if(o||(o={node:t.target,attributes:{}},this.attributes.push(o)),t.attributeName==="style"){const s=this.doc.createElement("span");t.oldValue&&s.setAttribute("style",t.oldValue),(o.attributes.style===void 0||o.attributes.style===null)&&(o.attributes.style={});const c=o.attributes.style;for(const a of Array.from(r.style)){const i=r.style.getPropertyValue(a),l=r.style.getPropertyPriority(a);(i!==s.style.getPropertyValue(a)||l!==s.style.getPropertyPriority(a))&&(l===""?c[a]=i:c[a]=[i,l])}for(const a of Array.from(s.style))r.style.getPropertyValue(a)===""&&(c[a]=!1)}else{if(t.target.tagName==="INPUT"){const s=t.target;if(s.type==="password"){o.attributes.value="*".repeat(s.value.length);break}}o.attributes[t.attributeName]=We(this.doc,r.tagName,t.attributeName,n)}break}case"childList":{if(Y(t.target,this.blockClass,!0))return;t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{const n=this.mirror.getId(r),o=de(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Y(t.target,this.blockClass,!1)||xe(r,this.mirror)||!tr(r,this.mirror)||(this.addedSet.has(r)?(Re(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&n===-1||Ye(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Je(n,o)]?Re(this.movedSet,r):this.removes.push({parentId:o,id:n,isShadow:de(t.target)&&pe(t.target)?!0:void 0})),this.mapRemoves.push(r))});break}}},this.genAdds=(t,r)=>{if(this.mirror.hasNode(t)){if(xe(t,this.mirror))return;this.movedSet.add(t);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[Je(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Y(t,this.blockClass,!1)||t.childNodes.forEach(n=>this.genAdds(n))}}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","enableStrictPrivacy"].forEach(r=>{this[r]=t[r]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Re(e,t){e.delete(t),t.childNodes.forEach(r=>Re(e,r))}function Qe(e,t,r){return e.length===0?!1:qe(e,t,r)}function qe(e,t,r){const{parentNode:n}=t;if(!n)return!1;const o=r.getId(n);return e.some(s=>s.id===o)?!0:qe(e,n,r)}function et(e,t){return e.size===0?!1:tt(e,t)}function tt(e,t){const{parentNode:r}=t;return r?e.has(r)?!0:tt(e,r):!1}var sr=Object.defineProperty,ir=Object.defineProperties,lr=Object.getOwnPropertyDescriptors,rt=Object.getOwnPropertySymbols,cr=Object.prototype.hasOwnProperty,ur=Object.prototype.propertyIsEnumerable,nt=(e,t,r)=>t in e?sr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ot=(e,t)=>{for(var r in t||(t={}))cr.call(t,r)&&nt(e,r,t[r]);if(rt)for(var r of rt(t))ur.call(t,r)&&nt(e,r,t[r]);return e},dr=(e,t)=>ir(e,lr(t));const ne=[],at=typeof CSSGroupingRule<"u",st=typeof CSSMediaRule<"u",it=typeof CSSSupportsRule<"u",lt=typeof CSSConditionRule<"u";function ve(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch{return e.target}}function ct(e,t){var r,n;const o=new ar;ne.push(o),o.init(e);let s=window.MutationObserver||window.__rrMutationObserver;const c=(n=(r=window?.Zone)==null?void 0:r.__symbol__)==null?void 0:n.call(r,"MutationObserver");c&&window[c]&&(s=window[c]);const a=new s(o.processMutations.bind(o));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function pr({mousemoveCb:e,sampling:t,doc:r,mirror:n}){if(t.mousemove===!1)return()=>{};const o=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let c=[],a;const i=me(p=>{const m=Date.now()-a;e(c.map(u=>(u.timeOffset-=m,u)),p),c=[],a=null},s),l=me(p=>{const m=ve(p),{clientX:u,clientY:h}=He(p)?p.changedTouches[0]:p;a||(a=Date.now()),c.push({x:u,y:h,id:n.getId(m),timeOffset:Date.now()-a}),i(typeof DragEvent<"u"&&p instanceof DragEvent?P.Drag:p instanceof MouseEvent?P.MouseMove:P.TouchMove)},o,{trailing:!1}),d=[U("mousemove",l,r),U("touchmove",l,r),U("drag",l,r)];return()=>{d.forEach(p=>p())}}function hr({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[],a=i=>l=>{const d=ve(l);if(Y(d,n,!0)||er(d))return;const p=He(l)?l.changedTouches[0]:l;if(!p)return;const m=r.getId(d),{clientX:u,clientY:h}=p;e({type:Ee[i],id:m,x:u,y:h})};return Object.keys(Ee).filter(i=>Number.isNaN(Number(i))&&!i.endsWith("_Departed")&&s[i]!==!1).forEach(i=>{const l=i.toLowerCase(),d=a(i);c.push(U(l,d,t))}),()=>{c.forEach(i=>i())}}function ut({scrollCb:e,doc:t,mirror:r,blockClass:n,sampling:o}){const s=me(c=>{const a=ve(c);if(!a||Y(a,n,!0))return;const i=r.getId(a);if(a===t){const l=t.scrollingElement||t.documentElement;e({id:i,x:l.scrollLeft,y:l.scrollTop})}else e({id:i,x:a.scrollLeft,y:a.scrollTop})},o.scroll||100);return U("scroll",s,t)}function mr({viewportResizeCb:e}){let t=-1,r=-1;const n=me(()=>{const o=Ze(),s=Ue();(t!==o||r!==s)&&(e({width:Number(s),height:Number(o)}),t=o,r=s)},200);return U("resize",n,window)}function dt(e,t){const r=ot({},e);return t||delete r.userTriggered,r}const fr=["INPUT","TEXTAREA","SELECT"],pt=new WeakMap;function vr({inputCb:e,doc:t,mirror:r,blockClass:n,ignoreClass:o,maskInputOptions:s,maskInputFn:c,sampling:a,userTriggeredOnInput:i}){function l(h){let v=ve(h);const S=h.isTrusted;if(v&&v.tagName==="OPTION"&&(v=v.parentElement),!v||!v.tagName||fr.indexOf(v.tagName)<0||Y(v,n,!0))return;const I=v.type;if(v.classList.contains(o))return;let w=v.value,y=!1;I==="radio"||I==="checkbox"?y=v.checked:(s[v.tagName.toLowerCase()]||s[I])&&(w=Te({maskInputOptions:s,tagName:v.tagName,type:I,value:w,maskInputFn:c})),d(v,dt({text:w,isChecked:y,userTriggered:S},i));const f=v.name;I==="radio"&&f&&y&&t.querySelectorAll(`input[type="radio"][name="${f}"]`).forEach(O=>{O!==v&&d(O,dt({text:O.value,isChecked:!y,userTriggered:!1},i))})}function d(h,v){const S=pt.get(h);if(!S||S.text!==v.text||S.isChecked!==v.isChecked){pt.set(h,v);const I=r.getId(h);e(dr(ot({},v),{id:I}))}}const p=(a.input==="last"?["change"]:["input","change"]).map(h=>U(h,l,t)),m=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),u=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return m&&m.set&&p.push(...u.map(h=>Ce(h[0],h[1],{set(){l({target:this})}}))),()=>{p.forEach(h=>h())}}function Ie(e){const t=[];function r(n,o){if(at&&n.parentRule instanceof CSSGroupingRule||st&&n.parentRule instanceof CSSMediaRule||it&&n.parentRule instanceof CSSSupportsRule||lt&&n.parentRule instanceof CSSConditionRule){const s=Array.from(n.parentRule.cssRules).indexOf(n);o.unshift(s)}else{const s=Array.from(n.parentStyleSheet.cssRules).indexOf(n);o.unshift(s)}return o}return r(e,t)}function yr({styleSheetRuleCb:e,mirror:t},{win:r}){const n=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=function(a,i){const l=t.getId(this.ownerNode);return l!==-1&&e({id:l,adds:[{rule:a,index:i}]}),n.apply(this,[a,i])};const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=function(a){const i=t.getId(this.ownerNode);return i!==-1&&e({id:i,removes:[{index:a}]}),o.apply(this,[a])};const s={};at?s.CSSGroupingRule=r.CSSGroupingRule:(st&&(s.CSSMediaRule=r.CSSMediaRule),lt&&(s.CSSConditionRule=r.CSSConditionRule),it&&(s.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(s).forEach(([a,i])=>{c[a]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=function(l,d){const p=t.getId(this.parentStyleSheet.ownerNode);return p!==-1&&e({id:p,adds:[{rule:l,index:[...Ie(this),d||0]}]}),c[a].insertRule.apply(this,[l,d])},i.prototype.deleteRule=function(l){const d=t.getId(this.parentStyleSheet.ownerNode);return d!==-1&&e({id:d,removes:[{index:[...Ie(this),l]}]}),c[a].deleteRule.apply(this,[l])}}),()=>{r.CSSStyleSheet.prototype.insertRule=n,r.CSSStyleSheet.prototype.deleteRule=o,Object.entries(s).forEach(([a,i])=>{i.prototype.insertRule=c[a].insertRule,i.prototype.deleteRule=c[a].deleteRule})}}function gr({styleDeclarationCb:e,mirror:t},{win:r}){const n=r.CSSStyleDeclaration.prototype.setProperty;r.CSSStyleDeclaration.prototype.setProperty=function(s,c,a){var i,l;const d=t.getId((l=(i=this.parentRule)==null?void 0:i.parentStyleSheet)==null?void 0:l.ownerNode);return d!==-1&&e({id:d,set:{property:s,value:c,priority:a},index:Ie(this.parentRule)}),n.apply(this,[s,c,a])};const o=r.CSSStyleDeclaration.prototype.removeProperty;return r.CSSStyleDeclaration.prototype.removeProperty=function(s){var c,a;const i=t.getId((a=(c=this.parentRule)==null?void 0:c.parentStyleSheet)==null?void 0:a.ownerNode);return i!==-1&&e({id:i,remove:{property:s},index:Ie(this.parentRule)}),o.apply(this,[s])},()=>{r.CSSStyleDeclaration.prototype.setProperty=n,r.CSSStyleDeclaration.prototype.removeProperty=o}}function br({mediaInteractionCb:e,blockClass:t,mirror:r,sampling:n}){const o=c=>me(a=>{const i=ve(a);if(!i||Y(i,t,!0))return;const{currentTime:l,volume:d,muted:p}=i;e({type:c,id:r.getId(i),currentTime:l,volume:d,muted:p})},n.media||500),s=[U("play",o(fe.Play)),U("pause",o(fe.Pause)),U("seeked",o(fe.Seeked)),U("volumechange",o(fe.VolumeChange))];return()=>{s.forEach(c=>c())}}function Sr({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const n=[],o=new WeakMap,s=r.FontFace;r.FontFace=function(a,i,l){const d=new s(a,i,l);return o.set(d,{family:a,buffer:typeof i!="string",descriptors:l,fontSource:typeof i=="string"?i:JSON.stringify(Array.from(new Uint8Array(i)))}),d};const c=se(t.fonts,"add",function(a){return function(i){return setTimeout(()=>{const l=o.get(i);l&&(e(l),o.delete(i))},0),a.apply(this,[i])}});return n.push(()=>{r.FontFace=s}),n.push(c),()=>{n.forEach(a=>a())}}function kr(e,t){const{mutationCb:r,mousemoveCb:n,mouseInteractionCb:o,scrollCb:s,viewportResizeCb:c,inputCb:a,mediaInteractionCb:i,styleSheetRuleCb:l,styleDeclarationCb:d,canvasMutationCb:p,fontCb:m}=e;e.mutationCb=(...u)=>{t.mutation&&t.mutation(...u),r(...u)},e.mousemoveCb=(...u)=>{t.mousemove&&t.mousemove(...u),n(...u)},e.mouseInteractionCb=(...u)=>{t.mouseInteraction&&t.mouseInteraction(...u),o(...u)},e.scrollCb=(...u)=>{t.scroll&&t.scroll(...u),s(...u)},e.viewportResizeCb=(...u)=>{t.viewportResize&&t.viewportResize(...u),c(...u)},e.inputCb=(...u)=>{t.input&&t.input(...u),a(...u)},e.mediaInteractionCb=(...u)=>{t.mediaInteaction&&t.mediaInteaction(...u),i(...u)},e.styleSheetRuleCb=(...u)=>{t.styleSheetRule&&t.styleSheetRule(...u),l(...u)},e.styleDeclarationCb=(...u)=>{t.styleDeclaration&&t.styleDeclaration(...u),d(...u)},e.canvasMutationCb=(...u)=>{t.canvasMutation&&t.canvasMutation(...u),p(...u)},e.fontCb=(...u)=>{t.font&&t.font(...u),m(...u)}}function Cr(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};kr(e,t);const n=ct(e,e.doc),o=pr(e),s=hr(e),c=ut(e),a=mr(e),i=vr(e),l=br(e),d=yr(e,{win:r}),p=gr(e,{win:r}),m=e.collectFonts?Sr(e):()=>{},u=[];for(const h of e.plugins)u.push(h.observer(h.callback,r,h.options));return()=>{ne.forEach(h=>h.reset()),n.disconnect(),o(),s(),c(),a(),i(),l(),d(),p(),m(),u.forEach(h=>h())}}class Ir{constructor(t){this.iframes=new WeakMap,this.mutationCb=t.mutationCb}addIframe(t){this.iframes.set(t,!0)}addLoadListener(t){this.loadListener=t}attachIframe(t,r,n){var o;this.mutationCb({adds:[{parentId:n.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(o=this.loadListener)==null||o.call(this,t)}}var wr=Object.defineProperty,Mr=Object.defineProperties,Tr=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,Or=Object.prototype.hasOwnProperty,Lr=Object.prototype.propertyIsEnumerable,mt=(e,t,r)=>t in e?wr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ft=(e,t)=>{for(var r in t||(t={}))Or.call(t,r)&&mt(e,r,t[r]);if(ht)for(var r of ht(t))Lr.call(t,r)&&mt(e,r,t[r]);return e},vt=(e,t)=>Mr(e,Tr(t));class Nr{constructor(t){this.restorePatches=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror;const r=this;this.restorePatches.push(se(HTMLElement.prototype,"attachShadow",function(n){return function(o){const s=n.call(this,o);return this.shadowRoot&&r.addShadowRoot(this.shadowRoot,this.ownerDocument),s}}))}addShadowRoot(t,r){!pe(t)||(ct(vt(ft({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),ut(vt(ft({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror})))}observeAttachShadow(t){if(t.contentWindow){const r=this;this.restorePatches.push(se(t.contentWindow.HTMLElement.prototype,"attachShadow",function(n){return function(o){const s=n.call(this,o);return this.shadowRoot&&r.addShadowRoot(this.shadowRoot,t.contentDocument),s}}))}}reset(){this.restorePatches.forEach(t=>t())}}for(var le="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xr=typeof Uint8Array>"u"?[]:new Uint8Array(256),we=0;we<le.length;we++)xr[le.charCodeAt(we)]=we;var Er=function(e){var t=new Uint8Array(e),r,n=t.length,o="";for(r=0;r<n;r+=3)o+=le[t[r]>>2],o+=le[(t[r]&3)<<4|t[r+1]>>4],o+=le[(t[r+1]&15)<<2|t[r+2]>>6],o+=le[t[r+2]&63];return n%3===2?o=o.substring(0,o.length-1)+"=":n%3===1&&(o=o.substring(0,o.length-2)+"=="),o};const yt=new Map;function Rr(e,t){let r=yt.get(e);return r||(r=new Map,yt.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}const gt=(e,t,r)=>{if(!e||!(St(e,t)||typeof e=="object"))return;const n=e.constructor.name,o=Rr(r,n);let s=o.indexOf(e);return s===-1&&(s=o.length,o.push(e)),s};function Me(e,t,r){if(e instanceof Array)return e.map(n=>Me(n,t,r));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const n=e.constructor.name,o=Er(e);return{rr_type:n,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Me(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const n=e.constructor.name,{src:o}=e;return{rr_type:n,src:o}}else if(e instanceof HTMLCanvasElement){const n="HTMLImageElement",o=e.toDataURL();return{rr_type:n,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Me(e.data,t,r),e.width,e.height]};if(St(e,t)||typeof e=="object"){const n=e.constructor.name,o=gt(e,t,r);return{rr_type:n,index:o}}}}return e}const bt=(e,t,r)=>[...e].map(n=>Me(n,t,r)),St=(e,t)=>{const r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(n=>typeof t[n]=="function");return Boolean(r.find(n=>e instanceof t[n]))};function Dr(e,t,r,n){const o=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const c of s)try{if(typeof t.CanvasRenderingContext2D.prototype[c]!="function")continue;const a=se(t.CanvasRenderingContext2D.prototype,c,function(i){return function(...l){return Y(this.canvas,r,!0)||setTimeout(()=>{const d=bt([...l],t,this);e(this.canvas,{type:ie["2D"],property:c,args:d})},0),i.apply(this,l)}});o.push(a)}catch{const i=Ce(t.CanvasRenderingContext2D.prototype,c,{set(l){e(this.canvas,{type:ie["2D"],property:c,args:[l],setter:!0})}});o.push(i)}return()=>{o.forEach(c=>c())}}function kt(e,t){const r=[];try{const n=se(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(s,...c){return Y(this,t,!0)||"__context"in this||(this.__context=s),o.apply(this,[s,...c])}});r.push(n)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{r.forEach(n=>n())}}function Ct(e,t,r,n,o,s){const c=[],a=Object.getOwnPropertyNames(e);for(const i of a)try{if(typeof e[i]!="function")continue;const l=se(e,i,function(d){return function(...p){const m=d.apply(this,p);if(gt(m,s,e),!Y(this.canvas,n,!0)){const u=bt([...p],s,e),h={type:t,property:i,args:u};r(this.canvas,h)}return m}});c.push(l)}catch{const d=Ce(e,i,{set(p){r(this.canvas,{type:t,property:i,args:[p],setter:!0})}});c.push(d)}return c}function Fr(e,t,r,n){const o=[];return o.push(...Ct(t.WebGLRenderingContext.prototype,ie.WebGL,e,r,n,t)),typeof t.WebGL2RenderingContext<"u"&&o.push(...Ct(t.WebGL2RenderingContext.prototype,ie.WebGL2,e,r,n,t)),()=>{o.forEach(s=>s())}}function Pr(e,t){var r=atob(e);if(t){for(var n=new Uint8Array(r.length),o=0,s=r.length;o<s;++o)n[o]=r.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(n.buffer))}return r}function Ar(e,t,r){var n=t===void 0?null:t,o=r===void 0?!1:r,s=Pr(e,o),c=s.indexOf(`
4
+ `,10)+1,a=s.substring(c)+(n?"//# sourceMappingURL="+n:""),i=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(i)}function _r(e,t,r){var n;return function(s){return n=n||Ar(e,t,r),new Worker(n,s)}}var Wr=_r("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Zm9yKHZhciByPSJBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OSsvIixsPXR5cGVvZiBVaW50OEFycmF5PiJ1Ij9bXTpuZXcgVWludDhBcnJheSgyNTYpLGY9MDtmPHIubGVuZ3RoO2YrKylsW3IuY2hhckNvZGVBdChmKV09Zjt2YXIgZD1mdW5jdGlvbihzKXt2YXIgZT1uZXcgVWludDhBcnJheShzKSxuLGE9ZS5sZW5ndGgsdD0iIjtmb3Iobj0wO248YTtuKz0zKXQrPXJbZVtuXT4+Ml0sdCs9clsoZVtuXSYzKTw8NHxlW24rMV0+PjRdLHQrPXJbKGVbbisxXSYxNSk8PDJ8ZVtuKzJdPj42XSx0Kz1yW2VbbisyXSY2M107cmV0dXJuIGElMz09PTI/dD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTEpKyI9IjphJTM9PT0xJiYodD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTIpKyI9PSIpLHR9O2NvbnN0IGM9bmV3IE1hcCx1PW5ldyBNYXA7YXN5bmMgZnVuY3Rpb24gcChzLGUpe2NvbnN0IG49YCR7c30tJHtlfWA7aWYodS5oYXMobikpcmV0dXJuIHUuZ2V0KG4pO2NvbnN0IGE9bmV3IE9mZnNjcmVlbkNhbnZhcyhzLGUpO2EuZ2V0Q29udGV4dCgiMmQiKTtjb25zdCB0PWF3YWl0KGF3YWl0IGEuY29udmVydFRvQmxvYigpKS5hcnJheUJ1ZmZlcigpLGc9ZCh0KTtyZXR1cm4gdS5zZXQobixnKSxnfWNvbnN0IGk9c2VsZjtpLm9ubWVzc2FnZT1hc3luYyBmdW5jdGlvbihzKXtpZighKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcykpcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOnMuZGF0YS5pZH0pO2NvbnN0e2lkOmUsYml0bWFwOm4sd2lkdGg6YSxoZWlnaHQ6dH09cy5kYXRhLGc9cChhLHQpLGg9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2guZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCB3PWF3YWl0IGguY29udmVydFRvQmxvYigpLHk9dy50eXBlLGI9YXdhaXQgdy5hcnJheUJ1ZmZlcigpLG89ZChiKTtpZighYy5oYXMoZSkmJmF3YWl0IGc9PT1vKXJldHVybiBjLnNldChlLG8pLGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpZihjLmdldChlKT09PW8pcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpLnBvc3RNZXNzYWdlKHtpZDplLHR5cGU6eSxiYXNlNjQ6byx3aWR0aDphLGhlaWdodDp0fSksYy5zZXQoZSxvKX19KSgpOwoK",null,!1),It=Object.getOwnPropertySymbols,Gr=Object.prototype.hasOwnProperty,zr=Object.prototype.propertyIsEnumerable,Vr=(e,t)=>{var r={};for(var n in e)Gr.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&It)for(var n of It(e))t.indexOf(n)<0&&zr.call(e,n)&&(r[n]=e[n]);return r},jr=(e,t,r)=>new Promise((n,o)=>{var s=i=>{try{a(r.next(i))}catch(l){o(l)}},c=i=>{try{a(r.throw(i))}catch(l){o(l)}},a=i=>i.done?n(i.value):Promise.resolve(i.value).then(s,c);a((r=r.apply(e,t)).next())});class Zr{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(c,a)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(c)||this.pendingCanvasMutations.set(c,[]),this.pendingCanvasMutations.get(c).push(a)};const{sampling:r="all",win:n,blockClass:o,recordCanvas:s}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,s&&r==="all"&&this.initCanvasMutationObserver(n,o),s&&typeof r=="number"&&this.initCanvasFPSObserver(r,n,o)}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,r,n){const o=kt(r,n),s=new Map,c=new Wr;c.onmessage=p=>{const{id:m}=p.data;if(s.set(m,!1),!("base64"in p.data))return;const{base64:u,type:h,width:v,height:S}=p.data;this.mutationCb({id:m,type:ie["2D"],commands:[{property:"clearRect",args:[0,0,v,S]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:u}],type:h}]},0,0]}]})};const a=1e3/t;let i=0,l;const d=p=>{if(i&&p-i<a){l=requestAnimationFrame(d);return}i=p,r.document.querySelectorAll(`canvas:not(.${n} *)`).forEach(m=>jr(this,null,function*(){var u;const h=this.mirror.getId(m);if(s.get(h))return;if(s.set(h,!0),["webgl","webgl2"].includes(m.__context)){const S=m.getContext(m.__context);((u=S?.getContextAttributes())==null?void 0:u.preserveDrawingBuffer)===!1&&S?.clear(S.COLOR_BUFFER_BIT)}if(m.width===0||m.height===0)return;const v=yield createImageBitmap(m);c.postMessage({id:h,bitmap:v,width:m.width,height:m.height},[v])})),l=requestAnimationFrame(d)};l=requestAnimationFrame(d),this.resetObservers=()=>{o(),cancelAnimationFrame(l)}}initCanvasMutationObserver(t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const n=kt(t,r),o=Dr(this.processMutation.bind(this),t,r,this.mirror),s=Fr(this.processMutation.bind(this),t,r,this.mirror);this.resetObservers=()=>{n(),o(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{const n=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(t);if(!n||r===-1)return;const o=n.map(c=>Vr(c,["type"])),{type:s}=n[0];this.mutationCb({id:r,type:s,commands:o}),this.pendingCanvasMutations.delete(t)}}class Ur{constructor(t){this.trackedStylesheets=new WeakSet,this.mutationCb=t.mutationCb}addStylesheet(t){this.trackedStylesheets.has(t)||(this.trackedStylesheets.add(t),this.trackStylesheet(t))}trackStylesheet(t){}attachStylesheet(t,r,n){this.mutationCb({adds:[{parentId:n.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[]}),this.addStylesheet(t)}}var Yr=Object.defineProperty,Hr=Object.defineProperties,Xr=Object.getOwnPropertyDescriptors,wt=Object.getOwnPropertySymbols,Br=Object.prototype.hasOwnProperty,Kr=Object.prototype.propertyIsEnumerable,Mt=(e,t,r)=>t in e?Yr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,B=(e,t)=>{for(var r in t||(t={}))Br.call(t,r)&&Mt(e,r,t[r]);if(wt)for(var r of wt(t))Kr.call(t,r)&&Mt(e,r,t[r]);return e},$r=(e,t)=>Hr(e,Xr(t));function E(e){return $r(B({},e),{timestamp:Date.now()})}let x,ye;const Q=Nt();function ge(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:o="highlight-block",blockSelector:s=null,ignoreClass:c="highlight-ignore",maskTextClass:a="highlight-mask",maskTextSelector:i=null,inlineStylesheet:l=!0,maskAllInputs:d,maskInputOptions:p,slimDOMOptions:m,maskInputFn:u,maskTextFn:h=Oe,hooks:v,packFn:S,sampling:I={},mousemoveWait:w,recordCanvas:y=!1,userTriggeredOnInput:f=!1,collectFonts:O=!1,inlineImages:_=!1,plugins:R,keepIframeSrcFn:L=()=>!1,enableStrictPrivacy:W=!1}=e;if(!t)throw new Error("emit function is required");w!==void 0&&I.mousemove===void 0&&(I.mousemove=w),Q.reset();const j=d===!0?{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}:p!==void 0?p:{password:!0},D=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all"}:m||{};rr();let K,Z=0;const F=g=>{for(const b of R||[])b.eventProcessor&&(g=b.eventProcessor(g));return S&&(g=S(g)),g};x=(g,b)=>{var X;if(((X=ne[0])==null?void 0:X.isFrozen())&&g.type!==T.FullSnapshot&&!(g.type===T.IncrementalSnapshot&&g.data.source===P.Mutation)&&ne.forEach(V=>V.unfreeze()),t(F(g),b),g.type===T.FullSnapshot)K=g,Z=0;else if(g.type===T.IncrementalSnapshot){if(g.data.source===P.Mutation&&g.data.isAttachIframe)return;Z++;const V=n&&Z>=n,q=r&&g.timestamp-K.timestamp>r;(V||q)&&ye(!0)}};const G=g=>{x(E({type:T.IncrementalSnapshot,data:B({source:P.Mutation},g)}))},$=g=>x(E({type:T.IncrementalSnapshot,data:B({source:P.Scroll},g)})),ee=g=>x(E({type:T.IncrementalSnapshot,data:B({source:P.CanvasMutation},g)})),A=new Ir({mutationCb:G}),J=new Ur({mutationCb:G}),z=new Zr({recordCanvas:y,mutationCb:ee,win:window,blockClass:o,mirror:Q,sampling:I.canvas}),H=new Nr({mutationCb:G,scrollCb:$,bypassOptions:{blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:i,inlineStylesheet:l,maskInputOptions:j,maskTextFn:h,maskInputFn:u,recordCanvas:y,inlineImages:_,sampling:I,slimDOMOptions:D,iframeManager:A,stylesheetManager:J,canvasManager:z,keepIframeSrcFn:L,enableStrictPrivacy:W},mirror:Q});ye=(g=!1)=>{var b,X,V,q;x(E({type:T.Meta,data:{href:window.location.href,width:Ue(),height:Ze()}}),g),ne.forEach(M=>M.lock());const k=qt(document,{mirror:Q,blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:i,inlineStylesheet:l,maskAllInputs:j,maskTextFn:h,slimDOM:D,recordCanvas:y,inlineImages:_,enableStrictPrivacy:W,onSerialize:M=>{Xe(M,Q)&&A.addIframe(M),Be(M,Q)&&J.addStylesheet(M),Ke(M)&&H.addShadowRoot(M.shadowRoot,document)},onIframeLoad:(M,ce)=>{A.attachIframe(M,ce,Q),H.observeAttachShadow(M)},onStylesheetLoad:(M,ce)=>{J.attachStylesheet(M,ce,Q)},keepIframeSrcFn:L});if(!k)return console.warn("Failed to snapshot the document");x(E({type:T.FullSnapshot,data:{node:k,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:document?.documentElement.scrollLeft||((X=(b=document?.body)==null?void 0:b.parentElement)==null?void 0:X.scrollLeft)||document?.body.scrollLeft||0,top:window.pageYOffset!==void 0?window.pageYOffset:document?.documentElement.scrollTop||((q=(V=document?.body)==null?void 0:V.parentElement)==null?void 0:q.scrollTop)||document?.body.scrollTop||0}}})),ne.forEach(M=>M.unlock())};try{const g=[];g.push(U("DOMContentLoaded",()=>{x(E({type:T.DomContentLoaded,data:{}}))}));const b=V=>{var q;return Cr({mutationCb:G,mousemoveCb:(k,M)=>x(E({type:T.IncrementalSnapshot,data:{source:M,positions:k}})),mouseInteractionCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.MouseInteraction},k)})),scrollCb:$,viewportResizeCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.ViewportResize},k)})),inputCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.Input},k)})),mediaInteractionCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.MediaInteraction},k)})),styleSheetRuleCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.StyleSheetRule},k)})),styleDeclarationCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.StyleDeclaration},k)})),canvasMutationCb:ee,fontCb:k=>x(E({type:T.IncrementalSnapshot,data:B({source:P.Font},k)})),blockClass:o,ignoreClass:c,maskTextClass:a,maskTextSelector:i,maskInputOptions:j,inlineStylesheet:l,sampling:I,recordCanvas:y,inlineImages:_,userTriggeredOnInput:f,collectFonts:O,doc:V,maskInputFn:u,maskTextFn:h,keepIframeSrcFn:L,blockSelector:s,slimDOMOptions:D,mirror:Q,iframeManager:A,stylesheetManager:J,shadowDomManager:H,canvasManager:z,enableStrictPrivacy:W,plugins:((q=R?.filter(k=>k.observer))==null?void 0:q.map(k=>({observer:k.observer,options:k.options,callback:M=>x(E({type:T.Plugin,data:{plugin:k.name,payload:M}}))})))||[]},v)};A.addLoadListener(V=>{g.push(b(V.contentDocument))});const X=()=>{ye(),g.push(b(document))};return document.readyState==="interactive"||document.readyState==="complete"?X():g.push(U("load",()=>{x(E({type:T.Load,data:{}})),X()},window)),()=>{g.forEach(V=>V())}}catch(g){console.warn(g)}}return ge.addCustomEvent=(e,t)=>{!x||x(E({type:T.Custom,data:{tag:e,payload:t}}))},ge.freezePage=()=>{ne.forEach(e=>e.freeze())},ge.takeFullSnapshot=e=>{if(!ye)throw new Error("please take full snapshot after start recording");ye(e)},ge.mirror=Q,ge}();
5
5
  //# sourceMappingURL=rrweb-record.min.js.map