@replayd/core 0.1.3 → 0.1.5
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.
- package/dist/capacitor.js +1 -1
- package/dist/capacitor.js.map +3 -3
- package/dist/flows.js +2 -0
- package/dist/flows.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/replay.js +3 -3
- package/dist/replay.js.map +3 -3
- package/dist/replayd-flows.min.js +2 -0
- package/dist/replayd-flows.min.js.map +1 -0
- package/dist/replayd.min.js +1 -1
- package/dist/replayd.min.js.map +1 -1
- package/dist/types/config.d.ts +11 -13
- package/dist/types/flows-iife.d.ts +1 -0
- package/dist/types/flows.d.ts +10 -0
- package/dist/types/replay/sig.d.ts +1 -1
- package/dist/types/ring.d.ts +4 -0
- package/dist/types/seg.d.ts +3 -2
- package/dist/types/types.d.ts +24 -5
- package/dist/types/worker/wsx.d.ts +25 -0
- package/dist/worker.js +1 -1
- package/dist/worker.js.map +1 -1
- package/dist/wsx.js +2 -0
- package/dist/wsx.js.map +1 -0
- package/package.json +7 -2
package/dist/replay.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var Xr=Object.defineProperty,Yr=(e,t,r)=>t in e?Xr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t,r)=>Yr(e,typeof t!="symbol"?t+"":t,r),Yt,P=(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[e.Asset=7]="Asset",e[e.Annotation=8]="Annotation",e))(P||{}),F=(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[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(F||{}),me=(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))(me||{}),Ie=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Ie||{}),He=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(He||{}),_e=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(_e||{}),ee=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(ee||{}),Kt={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument","firstChild","lastChild","nextSibling","previousSibling"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},Zt={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},Ge={},kt={},Qt=0,Kr=()=>!!globalThis.Zone;function Bt(e){if(Ge[e])return Ge[e];let t=globalThis[e],r=t.prototype,n=e in Kt?Kt[e]:void 0,s=!!(n&&n.every(c=>{var i,d;return!!((d=(i=Object.getOwnPropertyDescriptor(r,c))==null?void 0:i.get)!=null&&d.toString().includes("[native code]"))})),o=e in Zt?Zt[e]:void 0,a=!!(o&&o.every(c=>{var i;return typeof r[c]=="function"&&((i=r[c])==null?void 0:i.toString().includes("[native code]"))}));if(s&&a&&!Kr())return Ge[e]=t.prototype,t.prototype;try{let c=document.createElement("iframe");c.style.display="none",document.body.appendChild(c);let i=c.contentWindow;if(!i)return t.prototype;let d=i[e].prototype;if(!d)return c.remove(),r;let u=navigator.userAgent;return u.includes("Safari")&&!u.includes("Chrome")?(c.classList.add("rr-block"),c.setAttribute("__rrwebUntaintedMutationObserver",""),kt[e]=()=>c.remove()):c.remove(),Ge[e]=d}catch{return r}}var vt={};function ge(e,t,r){var n,s;let o=(n=vt[e])==null?void 0:n[r];if(o)return o.call(t);let a=Bt(e),c=(s=Object.getOwnPropertyDescriptor(a,r))==null?void 0:s.get;return c?((vt[e]||(vt[e]={}))[r]=c,c.call(t)):t[r]}var Ct={};function ur(e,t,r){let n=`${e}.${String(r)}`;if(Ct[n])return Ct[n].bind(t);let o=Bt(e)[r];return typeof o!="function"?t[r]:(Ct[n]=o,o.bind(t))}function Zr(e){return ge("Node",e,"ownerDocument")}function Qr(e){return ge("Node",e,"childNodes")}function en(e){return ge("Node",e,"parentNode")}function tn(e){return ge("Node",e,"parentElement")}function rn(e){return ge("Node",e,"textContent")}function nn(e){return ge("Node",e,"firstChild")}function sn(e){return ge("Node",e,"lastChild")}function on(e){return ge("Node",e,"nextSibling")}function an(e){return ge("Node",e,"previousSibling")}function ln(e,t){return ur("Node",e,"contains")(t)}function cn(e){return ur("Node",e,"getRootNode")()}function dn(e){return!e||!("host"in e)?null:ge("ShadowRoot",e,"host")}function un(e){return e.styleSheets}function fn(e){return!e||!("shadowRoot"in e)?null:ge("Element",e,"shadowRoot")}function hn(e,t){return ge("Element",e,"querySelector")(t)}function pn(e,t){return ge("Element",e,"querySelectorAll")(t)}function fr(){let e=Bt("MutationObserver");Qt++;let t=!1;return[e.constructor,()=>{if(t||(t=!0,--Qt!==0))return;let r=kt.MutationObserver;if(r)try{r()}finally{delete Ge.MutationObserver,delete kt.MutationObserver}}]}var Ye=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Ye=()=>new Date().getTime());function xe(e,t,r){try{if(!(t in e))return()=>{};let n=e[t],s=r(n);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=s,()=>{e[t]=n}}catch{return()=>{}}}var C={ownerDocument:Zr,childNodes:Qr,parentNode:en,parentElement:tn,textContent:rn,firstChild:nn,lastChild:sn,nextSibling:on,previousSibling:an,contains:ln,getRootNode:cn,host:dn,styleSheets:un,shadowRoot:fn,querySelector:hn,querySelectorAll:pn,nowTimestamp:Ye,mutationObserverCtor:fr,patch:xe};function hr(e){return e.nodeType===e.ELEMENT_NODE}function Ve(e){let t=e&&"host"in e&&"mode"in e&&C.host(e)||null;return!!(t&&"shadowRoot"in t&&C.shadowRoot(t)===e)}function Je(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function mn(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function gn(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function Rt(e){try{let t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);let n=Array.from(t,s=>pr(s,r)).join("");return mn(n)}catch{return null}}function pr(e,t){if(bn(e)){let r;try{r=Rt(e.styleSheet)||gn(e)}catch{r=e.cssText}return e.styleSheet.href?dt(r,e.styleSheet.href):r}else{let r=e.cssText;return Sn(e)&&e.selectorText.includes(":")&&(r=yn(r)),t?dt(r,t):r}}function yn(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function bn(e){return"styleSheet"in e}function Sn(e){return"selectorText"in e}var at=class{constructor(){y(this,"idNodeMap",new Map),y(this,"nodeMetaMap",new WeakMap)}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s));let n=C.shadowRoot(t);n&&this.removeNodeFromMap(n)}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){let n=r.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,r)}replace(t,r){let n=this.getNode(t);if(n){let s=this.nodeMetaMap.get(n);s&&this.nodeMetaMap.set(r,s)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function wn(){return new at}function lt({element:e,maskInputOptions:t,tagName:r,type:n,value:s,maskInputFn:o}){let a=s||"",c=n&&Oe(n);return(t[r.toLowerCase()]||c&&t[c])&&(o?a=o(a,e):a="*".repeat(a.length)),a}function Oe(e){return e.toLowerCase()}var er="__rrweb_original__";function vn(e){let t=e.getContext("2d");if(!t)return!0;let r=50;for(let n=0;n<e.width;n+=r)for(let s=0;s<e.height;s+=r){let o=t.getImageData,a=er in o?o[er]:o;if(new Uint32Array(a.call(t,n,s,Math.min(r,e.width-n),Math.min(r,e.height-s)).data.buffer).some(i=>i!==0))return!1}return!0}function ct(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Oe(t):null}function mr(e,t){let r;try{r=new URL(e,t??window.location.href)}catch{return null}let n=/\.([0-9a-z]+)(?:$)/i,s=r.pathname.match(n);return s?.[1]??null}function Cn(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var Mn=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,In=/^(?:[a-z+]+:)?\/\//i,kn=/^www\..*/i,Rn=/^(data:)([^,]*),(.*)/i;function dt(e,t){return(e||"").replace(Mn,(r,n,s,o,a,c)=>{let i=s||a||c,d=n||o||"";if(!i)return r;if(In.test(i)||kn.test(i))return`url(${d}${i}${d})`;if(Rn.test(i))return`url(${d}${i}${d})`;if(i[0]==="/")return`url(${d}${Cn(t)+i}${d})`;let u=i.split("#")[0],h=i.substring(u.length),m=t.split("#")[0].split("/"),p=u.split("/");m.pop();for(let g of p)g!=="."&&(g===".."?m.pop():m.push(g));return`url(${d}${m.join("/")}${h}${d})`})}var gr="(?:/\\*[^*]*\\*/)|[\\s;]",En=new RegExp(`${gr}|\\b(0)px?`,"g"),On=new RegExp(gr,"g");function rt(e,t=!1){return t?e.replace(On,""):e.replace(En,"$1")}function Nn(e,t,r=!1){let n=Array.from(t.childNodes),s=[],o=0;if(n.length>1&&e&&typeof e=="string"){let a=rt(e,r),c=a.length/e.length;for(let i=1;i<n.length;i++)if(n[i].textContent&&typeof n[i].textContent=="string"){let d=rt(n[i].textContent,r),u=100,h=3;for(;h<d.length&&(d[h].match(/[a-zA-Z0-9]/)||d.indexOf(d.substring(0,h),1)!==-1);h++);for(;h<d.length;h++){let m=d.substring(0,h),p=a.split(m),g=-1;if(p.length===2)g=p[0].length;else if(p.length>2&&p[0]===""&&n[i-1].textContent!=="")g=a.indexOf(m,1);else if(p.length===1){if(m=m.substring(0,m.length-1),p=a.split(m),p.length<=1)return s.push(e),s;h=u+1}else h===d.length-1&&(g=a.indexOf(m));if(p.length>=2&&h>u){let l=n[i-1].textContent;if(l&&typeof l=="string"){let b=rt(l).length;g=a.indexOf(m,b)}g===-1&&(g=p[0].length)}if(g!==-1){let l=Math.floor(g/c);for(;l>0&&l<e.length;){if(o+=1,o>50*n.length)return s.push(e),s;let b=rt(e.substring(0,l),r);if(b.length===g){s.push(e.substring(0,l)),e=e.substring(l),a=a.substring(g);break}else b.length<g?l+=Math.max(1,Math.floor((g-b.length)/c)):l-=Math.max(1,Math.floor((b.length-g)*c))}break}}}}return s.push(e),s}function Tn(e,t){return Nn(e,t).join("/* rr_split */")}var xn=1,Dn=new RegExp("[^a-z0-9-_:]"),ut=-2;function yr(){return xn++}function Ln(e){if(e instanceof HTMLFormElement)return"form";let t=Oe(e.tagName);return Dn.test(t)?"div":t}var Ae,tr,An=/^[^ \t\n\r\u000c]+/,_n=/^[, \t\n\r\u000c]+/;function Pn(e,t){if(t.trim()==="")return t;let r=0;function n(o){let a,c=o.exec(t.substring(r));return c?(a=c[0],r+=a.length,a):""}let s=[];for(;n(_n),!(r>=t.length);){let o=n(An);if(o.slice(-1)===",")o=Fe(e,o.substring(0,o.length-1)),s.push(o);else{let a="";o=Fe(e,o);let c=!1;for(;;){let i=t.charAt(r);if(i===""){s.push((o+a).trim());break}else if(c)i===")"&&(c=!1);else if(i===","){r+=1,s.push((o+a).trim());break}else i==="("&&(c=!0);a+=i,r+=1}}}return s.join(", ")}var rr=new WeakMap;function Fe(e,t){return!t||t.trim()===""?t:Ht(e,t)}function Fn(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Ht(e,t){let r=rr.get(e);if(r||(r=e.createElement("a"),rr.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function br(e,t,r,n){return n&&(r==="src"||r==="href"&&!(t==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&["table","td","th"].includes(t)?Fe(e,n):r==="srcset"?Pn(e,n):r==="style"?dt(n,Ht(e)):t==="object"&&r==="data"?Fe(e,n):n)}function Sr(e,t,r){return["video","audio"].includes(e)&&Oe(t)==="autoplay"}function Wn(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){let s=e.classList[n];if(t.test(s))return!0}if(r)return e.matches(r)}catch{}return!1}function ft(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?ft(C.parentNode(e),t,r):!1;for(let n=e.classList.length;n--;){let s=e.classList[n];if(t.test(s))return!0}return r?ft(C.parentNode(e),t,r):!1}function wr(e,t,r,n){let s;if(hr(e)){if(s=e,!C.childNodes(s).length)return!1}else{if(C.parentElement(e)===null)return!1;s=C.parentElement(e)}try{if(typeof t=="string"){if(n){if(s.closest(`.${t}`))return!0}else if(s.classList.contains(t))return!0}else if(ft(s,t,n))return!0;if(r){if(n){if(s.closest(r))return!0}else if(s.matches(r))return!0}}catch{}return!1}function Un(e,t,r){let n=e.contentWindow;if(!n)return;let s=!1,o;try{o=n.document.readyState}catch{return}if(o!=="complete"){let c=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(c),s=!0,t()});return}let 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 Bn(e,t,r){let n=!1,s;try{s=e.sheet}catch{return}if(s)return;let o=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(o),n=!0,t()})}function Hn(e,t){let{doc:r,mirror:n,blockClass:s,blockSelector:o,needsMask:a,inlineStylesheet:c,maskInputOptions:i={},maskTextFn:d,maskInputFn:u,dataURLOptions:h={},inlineImages:m,recordCanvas:p,keepIframeSrcFn:g,newlyAddedElement:l=!1,cssCaptured:b=!1}=t,k=zn(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:ee.Document,childNodes:[],compatMode:e.compatMode}:{type:ee.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:ee.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:k};case e.ELEMENT_NODE:return qn(e,{doc:r,blockClass:s,blockSelector:o,inlineStylesheet:c,maskInputOptions:i,maskInputFn:u,dataURLOptions:h,inlineImages:m,recordCanvas:p,keepIframeSrcFn:g,newlyAddedElement:l,rootId:k});case e.TEXT_NODE:return jn(e,{doc:r,needsMask:a,maskTextFn:d,rootId:k,cssCaptured:b});case e.CDATA_SECTION_NODE:return{type:ee.CDATA,textContent:"",rootId:k};case e.COMMENT_NODE:return{type:ee.Comment,textContent:C.textContent(e)||"",rootId:k};default:return!1}}function zn(e,t){let r=t.getId(e);return r===-1||r===1?void 0:r}function jn(e,t){let{needsMask:r,maskTextFn:n,rootId:s,cssCaptured:o}=t,a=C.parentNode(e),c=a&&a.tagName,i="",d=c==="STYLE"?!0:void 0,u=c==="SCRIPT"?!0:void 0;return u?i="SCRIPT_PLACEHOLDER":o||(i=C.textContent(e),d&&i&&(i=dt(i,Ht(t.doc)))),!d&&!u&&i&&r&&(i=n?n(i,C.parentElement(e)):i.replace(/[\S]/g,"*")),{type:ee.Text,textContent:i||"",rootId:s}}function qn(e,t){let{doc:r,blockClass:n,blockSelector:s,inlineStylesheet:o,maskInputOptions:a={},maskInputFn:c,dataURLOptions:i={},inlineImages:d,recordCanvas:u,keepIframeSrcFn:h,newlyAddedElement:m=!1,rootId:p}=t,g=Wn(e,n,s),l=Ln(e),b={},k=e.attributes.length;for(let f=0;f<k;f++){let v=e.attributes[f];Sr(l,v.name,v.value)||(b[v.name]=br(r,l,Oe(v.name),v.value))}if(l==="link"&&o){let f=Array.from(r.styleSheets).find(D=>D.href===e.href),v=null;f&&(v=Rt(f)),v&&(delete b.rel,delete b.href,b._cssText=v)}if(l==="style"&&e.sheet){let f=Rt(e.sheet);f&&(e.childNodes.length>1&&(f=Tn(f,e)),b._cssText=f)}if(["input","textarea","select"].includes(l)){let f=e.value,v=e.checked;b.type!=="radio"&&b.type!=="checkbox"&&b.type!=="submit"&&b.type!=="button"&&f?b.value=lt({element:e,type:ct(e),tagName:l,value:f,maskInputOptions:a,maskInputFn:c}):v&&(b.checked=v)}if(l==="option"&&(e.selected&&!a.select?b.selected=!0:delete b.selected),l==="dialog"&&e.open&&(b.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),l==="canvas"&&u){if(e.__context==="2d")vn(e)||(b.rr_dataURL=e.toDataURL(i.type,i.quality));else if(!("__context"in e)){let f=e.toDataURL(i.type,i.quality),v=r.createElement("canvas");v.width=e.width,v.height=e.height;let D=v.toDataURL(i.type,i.quality);f!==D&&(b.rr_dataURL=f)}}if(l==="img"&&d){Ae||(Ae=r.createElement("canvas"),tr=Ae.getContext("2d"));let f=e,v=f.currentSrc||f.getAttribute("src")||"<unknown-src>",D=f.crossOrigin,_=()=>{f.removeEventListener("load",_);try{Ae.width=f.naturalWidth,Ae.height=f.naturalHeight,tr.drawImage(f,0,0),b.rr_dataURL=Ae.toDataURL(i.type,i.quality)}catch(R){if(f.crossOrigin!=="anonymous"){f.crossOrigin="anonymous",f.complete&&f.naturalWidth!==0?_():f.addEventListener("load",_);return}else console.warn(`Cannot inline img src=${v}! Error: ${R}`)}f.crossOrigin==="anonymous"&&(D?b.crossOrigin=D:f.removeAttribute("crossorigin"))};f.complete&&f.naturalWidth!==0?_():f.addEventListener("load",_)}if(["audio","video"].includes(l)){let f=b;f.rr_mediaState=e.paused?"paused":"played",f.rr_mediaCurrentTime=e.currentTime,f.rr_mediaPlaybackRate=e.playbackRate,f.rr_mediaMuted=e.muted,f.rr_mediaLoop=e.loop,f.rr_mediaVolume=e.volume}if(m||(e.scrollLeft&&(b.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(b.rr_scrollTop=e.scrollTop)),g){let{width:f,height:v}=e.getBoundingClientRect();b={class:b.class,rr_width:`${f}px`,rr_height:`${v}px`}}l==="iframe"&&!h(b.src)&&(e.contentDocument||(b.rr_src=b.src),delete b.src);let I;try{customElements.get(l)&&(I=!0)}catch{}return{type:ee.Element,tagName:l,attributes:b,childNodes:[],isSVG:Fn(e)||void 0,needBlock:g,rootId:p,isCustom:I}}function G(e){return e==null?"":e.toLowerCase()}function vr(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function $n(e,t){if(t.comment&&e.type===ee.Comment)return!0;if(e.type===ee.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&mr(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(G(e.attributes.name).match(/^msapplication-tile(image|color)$/)||G(e.attributes.name)==="application-name"||G(e.attributes.rel)==="icon"||G(e.attributes.rel)==="apple-touch-icon"||G(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&G(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(G(e.attributes.property).match(/^(og|twitter|fb):/)||G(e.attributes.name).match(/^(og|twitter):/)||G(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(G(e.attributes.name)==="robots"||G(e.attributes.name)==="googlebot"||G(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(G(e.attributes.name)==="author"||G(e.attributes.name)==="generator"||G(e.attributes.name)==="framework"||G(e.attributes.name)==="publisher"||G(e.attributes.name)==="progid"||G(e.attributes.property).match(/^article:/)||G(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(G(e.attributes.name)==="google-site-verification"||G(e.attributes.name)==="yandex-verification"||G(e.attributes.name)==="csrf-token"||G(e.attributes.name)==="p:domain_verify"||G(e.attributes.name)==="verify-v1"||G(e.attributes.name)==="verification"||G(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function We(e,t){let{doc:r,mirror:n,blockClass:s,blockSelector:o,maskTextClass:a,maskTextSelector:c,skipChild:i=!1,inlineStylesheet:d=!0,maskInputOptions:u={},maskTextFn:h,maskInputFn:m,slimDOMOptions:p,dataURLOptions:g={},inlineImages:l=!1,recordCanvas:b=!1,onSerialize:k,onIframeLoad:I,iframeLoadTimeout:f=5e3,onStylesheetLoad:v,stylesheetLoadTimeout:D=5e3,keepIframeSrcFn:_=()=>!1,newlyAddedElement:R=!1,cssCaptured:J=!1}=t,{needsMask:te}=t,{preserveWhiteSpace:ne=!0}=t;te||(te=wr(e,a,c,te===void 0));let K=Hn(e,{doc:r,mirror:n,blockClass:s,blockSelector:o,needsMask:te,inlineStylesheet:d,maskInputOptions:u,maskTextFn:h,maskInputFn:m,dataURLOptions:g,inlineImages:l,recordCanvas:b,keepIframeSrcFn:_,newlyAddedElement:R,cssCaptured:J});if(!K)return console.warn(e,"not serialized"),null;let ce;n.hasNode(e)?ce=n.getId(e):$n(K,p)||!ne&&K.type===ee.Text&&!K.textContent.replace(/^\s+|\s+$/gm,"").length?ce=ut:ce=yr();let x=K;if(x.id=ce,n.add(e,x),ce===ut)return null;k&&k(e);let ve=!i;if(x.type===ee.Element){ve=ve&&!x.needBlock,delete x.needBlock;let V=C.shadowRoot(e);V&&Je(V)&&(x.isShadowHost=!0)}if((x.type===ee.Document||x.type===ee.Element)&&ve){p.headWhitespace&&x.type===ee.Element&&x.tagName==="head"&&(ne=!1);let V={doc:r,mirror:n,blockClass:s,blockSelector:o,needsMask:te,maskTextClass:a,maskTextSelector:c,skipChild:i,inlineStylesheet:d,maskInputOptions:u,maskTextFn:h,maskInputFn:m,slimDOMOptions:p,dataURLOptions:g,inlineImages:l,recordCanvas:b,preserveWhiteSpace:ne,onSerialize:k,onIframeLoad:I,iframeLoadTimeout:f,onStylesheetLoad:v,stylesheetLoadTimeout:D,keepIframeSrcFn:_,cssCaptured:!1};if(!(x.type===ee.Element&&x.tagName==="textarea"&&x.attributes.value!==void 0)){x.type===ee.Element&&x.attributes._cssText!==void 0&&typeof x.attributes._cssText=="string"&&(V.cssCaptured=!0);for(let se of Array.from(C.childNodes(e))){let re=We(se,V);re&&x.childNodes.push(re)}}let X=null;if(hr(e)&&(X=C.shadowRoot(e)))for(let se of Array.from(C.childNodes(X))){let re=We(se,V);re&&(Je(X)&&(re.isShadow=!0),x.childNodes.push(re))}}let ye=C.parentNode(e);return ye&&Ve(ye)&&Je(ye)&&(x.isShadow=!0),x.type===ee.Element&&x.tagName==="iframe"&&Un(e,()=>{let V=e.contentDocument;if(V&&I){let X=We(V,{doc:V,mirror:n,blockClass:s,blockSelector:o,needsMask:te,maskTextClass:a,maskTextSelector:c,skipChild:!1,inlineStylesheet:d,maskInputOptions:u,maskTextFn:h,maskInputFn:m,slimDOMOptions:p,dataURLOptions:g,inlineImages:l,recordCanvas:b,preserveWhiteSpace:ne,onSerialize:k,onIframeLoad:I,iframeLoadTimeout:f,onStylesheetLoad:v,stylesheetLoadTimeout:D,keepIframeSrcFn:_});X&&I(e,X)}},f),x.type===ee.Element&&x.tagName==="link"&&typeof x.attributes.rel=="string"&&(x.attributes.rel==="stylesheet"||x.attributes.rel==="preload"&&typeof x.attributes.href=="string"&&mr(x.attributes.href)==="css")&&Bn(e,()=>{if(v){let V=We(e,{doc:r,mirror:n,blockClass:s,blockSelector:o,needsMask:te,maskTextClass:a,maskTextSelector:c,skipChild:!1,inlineStylesheet:d,maskInputOptions:u,maskTextFn:h,maskInputFn:m,slimDOMOptions:p,dataURLOptions:g,inlineImages:l,recordCanvas:b,preserveWhiteSpace:ne,onSerialize:k,onIframeLoad:I,iframeLoadTimeout:f,onStylesheetLoad:v,stylesheetLoadTimeout:D,keepIframeSrcFn:_});V&&v(e,V)}},D),x}function Gn(e,t){let{mirror:r=new at,blockClass:n="rr-block",blockSelector:s=null,maskTextClass:o="rr-mask",maskTextSelector:a=null,inlineStylesheet:c=!0,inlineImages:i=!1,recordCanvas:d=!1,maskAllInputs:u=!1,maskTextFn:h,maskInputFn:m,slimDOM:p=!1,dataURLOptions:g,preserveWhiteSpace:l,onSerialize:b,onIframeLoad:k,iframeLoadTimeout:I,onStylesheetLoad:f,stylesheetLoadTimeout:v,keepIframeSrcFn:D=()=>!1}=t,_=u===!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}:u===!1?{password:!0}:u,R=vr(p);return We(e,{doc:e,mirror:r,blockClass:n,blockSelector:s,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:_,maskTextFn:h,maskInputFn:m,slimDOMOptions:R,dataURLOptions:g,inlineImages:i,recordCanvas:d,preserveWhiteSpace:l,onSerialize:b,onIframeLoad:k,iframeLoadTimeout:I,onStylesheetLoad:f,stylesheetLoadTimeout:v,keepIframeSrcFn:D,newlyAddedElement:!1})}var Et=class e{constructor(...t){y(this,"parentElement",null),y(this,"parentNode",null),y(this,"ownerDocument"),y(this,"firstChild",null),y(this,"lastChild",null),y(this,"previousSibling",null),y(this,"nextSibling",null),y(this,"ELEMENT_NODE",1),y(this,"TEXT_NODE",3),y(this,"nodeType"),y(this,"nodeName"),y(this,"RRNodeType")}get childNodes(){let t=[],r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof e){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}};function le(e,t,r=document){let n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}var Pe=`Please stop import mirror directly. Instead of that,\r
|
|
1
|
+
var on=Object.defineProperty,an=(e,t,r)=>t in e?on(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t,r)=>an(e,typeof t!="symbol"?t+"":t,r),or,F=(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[e.Asset=7]="Asset",e[e.Annotation=8]="Annotation",e))(F||{}),W=(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[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(W||{}),ue=(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))(ue||{}),Ce=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Ce||{}),ze=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(ze||{}),Pe=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Pe||{}),te=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(te||{}),ir={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument","firstChild","lastChild","nextSibling","previousSibling"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},ar={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},Je={},Dt={},lr=0,ln=()=>!!globalThis.Zone;function Vt(e){if(Je[e])return Je[e];let t=globalThis[e],r=t.prototype,n=e in ir?ir[e]:void 0,s=!!(n&&n.every(c=>{var i,d;return!!((d=(i=Object.getOwnPropertyDescriptor(r,c))==null?void 0:i.get)!=null&&d.toString().includes("[native code]"))})),o=e in ar?ar[e]:void 0,a=!!(o&&o.every(c=>{var i;return typeof r[c]=="function"&&((i=r[c])==null?void 0:i.toString().includes("[native code]"))}));if(s&&a&&!ln())return Je[e]=t.prototype,t.prototype;try{let c=document.createElement("iframe");c.style.display="none",document.body.appendChild(c);let i=c.contentWindow;if(!i)return t.prototype;let d=i[e].prototype;if(!d)return c.remove(),r;let u=navigator.userAgent;return u.includes("Safari")&&!u.includes("Chrome")?(c.classList.add("rr-block"),c.setAttribute("__rrwebUntaintedMutationObserver",""),Dt[e]=()=>c.remove()):c.remove(),Je[e]=d}catch{return r}}var Ot={};function he(e,t,r){var n,s;let o=(n=Ot[e])==null?void 0:n[r];if(o)return o.call(t);let a=Vt(e),c=(s=Object.getOwnPropertyDescriptor(a,r))==null?void 0:s.get;return c?((Ot[e]||(Ot[e]={}))[r]=c,c.call(t)):t[r]}var Nt={};function wr(e,t,r){let n=`${e}.${String(r)}`;if(Nt[n])return Nt[n].bind(t);let o=Vt(e)[r];return typeof o!="function"?t[r]:(Nt[n]=o,o.bind(t))}function cn(e){return he("Node",e,"ownerDocument")}function dn(e){return he("Node",e,"childNodes")}function un(e){return he("Node",e,"parentNode")}function fn(e){return he("Node",e,"parentElement")}function hn(e){return he("Node",e,"textContent")}function pn(e){return he("Node",e,"firstChild")}function mn(e){return he("Node",e,"lastChild")}function gn(e){return he("Node",e,"nextSibling")}function yn(e){return he("Node",e,"previousSibling")}function bn(e,t){return wr("Node",e,"contains")(t)}function Sn(e){return wr("Node",e,"getRootNode")()}function wn(e){return!e||!("host"in e)?null:he("ShadowRoot",e,"host")}function vn(e){return e.styleSheets}function Cn(e){return!e||!("shadowRoot"in e)?null:he("Element",e,"shadowRoot")}function Mn(e,t){return he("Element",e,"querySelector")(t)}function In(e,t){return he("Element",e,"querySelectorAll")(t)}function vr(){let e=Vt("MutationObserver");lr++;let t=!1;return[e.constructor,()=>{if(t||(t=!0,--lr!==0))return;let r=Dt.MutationObserver;if(r)try{r()}finally{delete Je.MutationObserver,delete Dt.MutationObserver}}]}var Ze=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Ze=()=>new Date().getTime());function xe(e,t,r){try{if(!(t in e))return()=>{};let n=e[t],s=r(n);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=s,()=>{e[t]=n}}catch{return()=>{}}}var M={ownerDocument:cn,childNodes:dn,parentNode:un,parentElement:fn,textContent:hn,firstChild:pn,lastChild:mn,nextSibling:gn,previousSibling:yn,contains:bn,getRootNode:Sn,host:wn,styleSheets:vn,shadowRoot:Cn,querySelector:Mn,querySelectorAll:In,nowTimestamp:Ze,mutationObserverCtor:vr,patch:xe};function Cr(e){return e.nodeType===e.ELEMENT_NODE}function Xe(e){let t=e&&"host"in e&&"mode"in e&&M.host(e)||null;return!!(t&&"shadowRoot"in t&&M.shadowRoot(t)===e)}function Ye(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function kn(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function Rn(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function Lt(e){try{let t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);let n=Array.from(t,s=>Mr(s,r)).join("");return kn(n)}catch{return null}}function Mr(e,t){if(On(e)){let r;try{r=Lt(e.styleSheet)||Rn(e)}catch{r=e.cssText}return e.styleSheet.href?ht(r,e.styleSheet.href):r}else{let r=e.cssText;return Nn(e)&&e.selectorText.includes(":")&&(r=En(r)),t?ht(r,t):r}}function En(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function On(e){return"styleSheet"in e}function Nn(e){return"selectorText"in e}var dt=class{constructor(){y(this,"idNodeMap",new Map),y(this,"nodeMetaMap",new WeakMap)}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s));let n=M.shadowRoot(t);n&&this.removeNodeFromMap(n)}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){let n=r.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,r)}replace(t,r){let n=this.getNode(t);if(n){let s=this.nodeMetaMap.get(n);s&&this.nodeMetaMap.set(r,s)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function xn(){return new dt}function ut({element:e,maskInputOptions:t,tagName:r,type:n,value:s,maskInputFn:o}){let a=s||"",c=n&&Re(n);return(t[r.toLowerCase()]||c&&t[c])&&(o?a=o(a,e):a="*".repeat(a.length)),a}function Re(e){return e.toLowerCase()}var cr="__rrweb_original__";function Tn(e){let t=e.getContext("2d");if(!t)return!0;let r=50;for(let n=0;n<e.width;n+=r)for(let s=0;s<e.height;s+=r){let o=t.getImageData,a=cr in o?o[cr]:o;if(new Uint32Array(a.call(t,n,s,Math.min(r,e.width-n),Math.min(r,e.height-s)).data.buffer).some(i=>i!==0))return!1}return!0}function ft(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Re(t):null}function Ir(e,t){let r;try{r=new URL(e,t??window.location.href)}catch{return null}let n=/\.([0-9a-z]+)(?:$)/i,s=r.pathname.match(n);return s?.[1]??null}function Dn(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var Ln=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,An=/^(?:[a-z+]+:)?\/\//i,_n=/^www\..*/i,Pn=/^(data:)([^,]*),(.*)/i;function ht(e,t){return(e||"").replace(Ln,(r,n,s,o,a,c)=>{let i=s||a||c,d=n||o||"";if(!i)return r;if(An.test(i)||_n.test(i))return`url(${d}${i}${d})`;if(Pn.test(i))return`url(${d}${i}${d})`;if(i[0]==="/")return`url(${d}${Dn(t)+i}${d})`;let u=i.split("#")[0],f=i.substring(u.length),h=t.split("#")[0].split("/"),p=u.split("/");h.pop();for(let m of p)m!=="."&&(m===".."?h.pop():h.push(m));return`url(${d}${h.join("/")}${f}${d})`})}var kr="(?:/\\*[^*]*\\*/)|[\\s;]",Fn=new RegExp(`${kr}|\\b(0)px?`,"g"),Wn=new RegExp(kr,"g");function ot(e,t=!1){return t?e.replace(Wn,""):e.replace(Fn,"$1")}function Un(e,t,r=!1){let n=Array.from(t.childNodes),s=[],o=0;if(n.length>1&&e&&typeof e=="string"){let a=ot(e,r),c=a.length/e.length;for(let i=1;i<n.length;i++)if(n[i].textContent&&typeof n[i].textContent=="string"){let d=ot(n[i].textContent,r),u=100,f=3;for(;f<d.length&&(d[f].match(/[a-zA-Z0-9]/)||d.indexOf(d.substring(0,f),1)!==-1);f++);for(;f<d.length;f++){let h=d.substring(0,f),p=a.split(h),m=-1;if(p.length===2)m=p[0].length;else if(p.length>2&&p[0]===""&&n[i-1].textContent!=="")m=a.indexOf(h,1);else if(p.length===1){if(h=h.substring(0,h.length-1),p=a.split(h),p.length<=1)return s.push(e),s;f=u+1}else f===d.length-1&&(m=a.indexOf(h));if(p.length>=2&&f>u){let l=n[i-1].textContent;if(l&&typeof l=="string"){let b=ot(l).length;m=a.indexOf(h,b)}m===-1&&(m=p[0].length)}if(m!==-1){let l=Math.floor(m/c);for(;l>0&&l<e.length;){if(o+=1,o>50*n.length)return s.push(e),s;let b=ot(e.substring(0,l),r);if(b.length===m){s.push(e.substring(0,l)),e=e.substring(l),a=a.substring(m);break}else b.length<m?l+=Math.max(1,Math.floor((m-b.length)/c)):l-=Math.max(1,Math.floor((b.length-m)*c))}break}}}}return s.push(e),s}function Bn(e,t){return Un(e,t).join("/* rr_split */")}var Hn=1,zn=new RegExp("[^a-z0-9-_:]"),pt=-2;function Rr(){return Hn++}function jn(e){if(e instanceof HTMLFormElement)return"form";let t=Re(e.tagName);return zn.test(t)?"div":t}var _e,dr,qn=/^[^ \t\n\r\u000c]+/,$n=/^[, \t\n\r\u000c]+/;function Gn(e,t){if(t.trim()==="")return t;let r=0;function n(o){let a,c=o.exec(t.substring(r));return c?(a=c[0],r+=a.length,a):""}let s=[];for(;n($n),!(r>=t.length);){let o=n(qn);if(o.slice(-1)===",")o=We(e,o.substring(0,o.length-1)),s.push(o);else{let a="";o=We(e,o);let c=!1;for(;;){let i=t.charAt(r);if(i===""){s.push((o+a).trim());break}else if(c)i===")"&&(c=!1);else if(i===","){r+=1,s.push((o+a).trim());break}else i==="("&&(c=!0);a+=i,r+=1}}}return s.join(", ")}var ur=new WeakMap;function We(e,t){return!t||t.trim()===""?t:Jt(e,t)}function Vn(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Jt(e,t){let r=ur.get(e);if(r||(r=e.createElement("a"),ur.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function Er(e,t,r,n){return n&&(r==="src"||r==="href"&&!(t==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&["table","td","th"].includes(t)?We(e,n):r==="srcset"?Gn(e,n):r==="style"?ht(n,Jt(e)):t==="object"&&r==="data"?We(e,n):n)}function Or(e,t,r){return["video","audio"].includes(e)&&Re(t)==="autoplay"}function Jn(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){let s=e.classList[n];if(t.test(s))return!0}if(r)return e.matches(r)}catch{}return!1}function mt(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?mt(M.parentNode(e),t,r):!1;for(let n=e.classList.length;n--;){let s=e.classList[n];if(t.test(s))return!0}return r?mt(M.parentNode(e),t,r):!1}function Nr(e,t,r,n){let s;if(Cr(e)){if(s=e,!M.childNodes(s).length)return!1}else{if(M.parentElement(e)===null)return!1;s=M.parentElement(e)}try{if(typeof t=="string"){if(n){if(s.closest(`.${t}`))return!0}else if(s.classList.contains(t))return!0}else if(mt(s,t,n))return!0;if(r){if(n){if(s.closest(r))return!0}else if(s.matches(r))return!0}}catch{}return!1}function Xn(e,t,r){let n=e.contentWindow;if(!n)return;let s=!1,o;try{o=n.document.readyState}catch{return}if(o!=="complete"){let c=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(c),s=!0,t()});return}let 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 Yn(e,t,r){let n=!1,s;try{s=e.sheet}catch{return}if(s)return;let o=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(o),n=!0,t()})}function Kn(e,t){let{doc:r,mirror:n,blockClass:s,blockSelector:o,needsMask:a,inlineStylesheet:c,maskInputOptions:i={},maskTextFn:d,maskInputFn:u,dataURLOptions:f={},inlineImages:h,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:l=!1,cssCaptured:b=!1}=t,E=Zn(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:te.Document,childNodes:[],compatMode:e.compatMode}:{type:te.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:te.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:E};case e.ELEMENT_NODE:return es(e,{doc:r,blockClass:s,blockSelector:o,inlineStylesheet:c,maskInputOptions:i,maskInputFn:u,dataURLOptions:f,inlineImages:h,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:l,rootId:E});case e.TEXT_NODE:return Qn(e,{doc:r,needsMask:a,maskTextFn:d,rootId:E,cssCaptured:b});case e.CDATA_SECTION_NODE:return{type:te.CDATA,textContent:"",rootId:E};case e.COMMENT_NODE:return{type:te.Comment,textContent:M.textContent(e)||"",rootId:E};default:return!1}}function Zn(e,t){let r=t.getId(e);return r===-1||r===1?void 0:r}function Qn(e,t){let{needsMask:r,maskTextFn:n,rootId:s,cssCaptured:o}=t,a=M.parentNode(e),c=a&&a.tagName,i="",d=c==="STYLE"?!0:void 0,u=c==="SCRIPT"?!0:void 0;return u?i="SCRIPT_PLACEHOLDER":o||(i=M.textContent(e),d&&i&&(i=ht(i,Jt(t.doc)))),!d&&!u&&i&&r&&(i=n?n(i,M.parentElement(e)):i.replace(/[\S]/g,"*")),{type:te.Text,textContent:i||"",rootId:s}}function es(e,t){let{doc:r,blockClass:n,blockSelector:s,inlineStylesheet:o,maskInputOptions:a={},maskInputFn:c,dataURLOptions:i={},inlineImages:d,recordCanvas:u,keepIframeSrcFn:f,newlyAddedElement:h=!1,rootId:p}=t,m=Jn(e,n,s),l=jn(e),b={},E=e.attributes.length;for(let g=0;g<E;g++){let w=e.attributes[g];Or(l,w.name,w.value)||(b[w.name]=Er(r,l,Re(w.name),w.value))}if(l==="link"&&o){let g=Array.from(r.styleSheets).find(N=>N.href===e.href),w=null;g&&(w=Lt(g)),w&&(delete b.rel,delete b.href,b._cssText=w)}if(l==="style"&&e.sheet){let g=Lt(e.sheet);g&&(e.childNodes.length>1&&(g=Bn(g,e)),b._cssText=g)}if(["input","textarea","select"].includes(l)){let g=e.value,w=e.checked;b.type!=="radio"&&b.type!=="checkbox"&&b.type!=="submit"&&b.type!=="button"&&g?b.value=ut({element:e,type:ft(e),tagName:l,value:g,maskInputOptions:a,maskInputFn:c}):w&&(b.checked=w)}if(l==="option"&&(e.selected&&!a.select?b.selected=!0:delete b.selected),l==="dialog"&&e.open&&(b.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),l==="canvas"&&u){if(e.__context==="2d")Tn(e)||(b.rr_dataURL=e.toDataURL(i.type,i.quality));else if(!("__context"in e)){let g=e.toDataURL(i.type,i.quality),w=r.createElement("canvas");w.width=e.width,w.height=e.height;let N=w.toDataURL(i.type,i.quality);g!==N&&(b.rr_dataURL=g)}}if(l==="img"&&d){_e||(_e=r.createElement("canvas"),dr=_e.getContext("2d"));let g=e,w=g.currentSrc||g.getAttribute("src")||"<unknown-src>",N=g.crossOrigin,_=()=>{g.removeEventListener("load",_);try{_e.width=g.naturalWidth,_e.height=g.naturalHeight,dr.drawImage(g,0,0),b.rr_dataURL=_e.toDataURL(i.type,i.quality)}catch(j){if(g.crossOrigin!=="anonymous"){g.crossOrigin="anonymous",g.complete&&g.naturalWidth!==0?_():g.addEventListener("load",_);return}else console.warn(`Cannot inline img src=${w}! Error: ${j}`)}g.crossOrigin==="anonymous"&&(N?b.crossOrigin=N:g.removeAttribute("crossorigin"))};g.complete&&g.naturalWidth!==0?_():g.addEventListener("load",_)}if(["audio","video"].includes(l)){let g=b;g.rr_mediaState=e.paused?"paused":"played",g.rr_mediaCurrentTime=e.currentTime,g.rr_mediaPlaybackRate=e.playbackRate,g.rr_mediaMuted=e.muted,g.rr_mediaLoop=e.loop,g.rr_mediaVolume=e.volume}if(h||(e.scrollLeft&&(b.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(b.rr_scrollTop=e.scrollTop)),m){let{width:g,height:w}=e.getBoundingClientRect();b={class:b.class,rr_width:`${g}px`,rr_height:`${w}px`}}l==="iframe"&&!f(b.src)&&(e.contentDocument||(b.rr_src=b.src),delete b.src);let k;try{customElements.get(l)&&(k=!0)}catch{}return{type:te.Element,tagName:l,attributes:b,childNodes:[],isSVG:Vn(e)||void 0,needBlock:m,rootId:p,isCustom:k}}function X(e){return e==null?"":e.toLowerCase()}function xr(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function ts(e,t){if(t.comment&&e.type===te.Comment)return!0;if(e.type===te.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Ir(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(X(e.attributes.name).match(/^msapplication-tile(image|color)$/)||X(e.attributes.name)==="application-name"||X(e.attributes.rel)==="icon"||X(e.attributes.rel)==="apple-touch-icon"||X(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&X(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(X(e.attributes.property).match(/^(og|twitter|fb):/)||X(e.attributes.name).match(/^(og|twitter):/)||X(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(X(e.attributes.name)==="robots"||X(e.attributes.name)==="googlebot"||X(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(X(e.attributes.name)==="author"||X(e.attributes.name)==="generator"||X(e.attributes.name)==="framework"||X(e.attributes.name)==="publisher"||X(e.attributes.name)==="progid"||X(e.attributes.property).match(/^article:/)||X(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(X(e.attributes.name)==="google-site-verification"||X(e.attributes.name)==="yandex-verification"||X(e.attributes.name)==="csrf-token"||X(e.attributes.name)==="p:domain_verify"||X(e.attributes.name)==="verify-v1"||X(e.attributes.name)==="verification"||X(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ue(e,t){let{doc:r,mirror:n,blockClass:s,blockSelector:o,maskTextClass:a,maskTextSelector:c,skipChild:i=!1,inlineStylesheet:d=!0,maskInputOptions:u={},maskTextFn:f,maskInputFn:h,slimDOMOptions:p,dataURLOptions:m={},inlineImages:l=!1,recordCanvas:b=!1,onSerialize:E,onIframeLoad:k,iframeLoadTimeout:g=5e3,onStylesheetLoad:w,stylesheetLoadTimeout:N=5e3,keepIframeSrcFn:_=()=>!1,newlyAddedElement:j=!1,cssCaptured:x=!1}=t,{needsMask:V}=t,{preserveWhiteSpace:re=!0}=t;V||(V=Nr(e,a,c,V===void 0));let Z=Kn(e,{doc:r,mirror:n,blockClass:s,blockSelector:o,needsMask:V,inlineStylesheet:d,maskInputOptions:u,maskTextFn:f,maskInputFn:h,dataURLOptions:m,inlineImages:l,recordCanvas:b,keepIframeSrcFn:_,newlyAddedElement:j,cssCaptured:x});if(!Z)return console.warn(e,"not serialized"),null;let oe;n.hasNode(e)?oe=n.getId(e):ts(Z,p)||!re&&Z.type===te.Text&&!Z.textContent.replace(/^\s+|\s+$/gm,"").length?oe=pt:oe=Rr();let L=Z;if(L.id=oe,n.add(e,L),oe===pt)return null;E&&E(e);let be=!i;if(L.type===te.Element){be=be&&!L.needBlock,delete L.needBlock;let Y=M.shadowRoot(e);Y&&Ye(Y)&&(L.isShadowHost=!0)}if((L.type===te.Document||L.type===te.Element)&&be){p.headWhitespace&&L.type===te.Element&&L.tagName==="head"&&(re=!1);let Y={doc:r,mirror:n,blockClass:s,blockSelector:o,needsMask:V,maskTextClass:a,maskTextSelector:c,skipChild:i,inlineStylesheet:d,maskInputOptions:u,maskTextFn:f,maskInputFn:h,slimDOMOptions:p,dataURLOptions:m,inlineImages:l,recordCanvas:b,preserveWhiteSpace:re,onSerialize:E,onIframeLoad:k,iframeLoadTimeout:g,onStylesheetLoad:w,stylesheetLoadTimeout:N,keepIframeSrcFn:_,cssCaptured:!1};if(!(L.type===te.Element&&L.tagName==="textarea"&&L.attributes.value!==void 0)){L.type===te.Element&&L.attributes._cssText!==void 0&&typeof L.attributes._cssText=="string"&&(Y.cssCaptured=!0);for(let me of Array.from(M.childNodes(e))){let J=Ue(me,Y);J&&L.childNodes.push(J)}}let ne=null;if(Cr(e)&&(ne=M.shadowRoot(e)))for(let me of Array.from(M.childNodes(ne))){let J=Ue(me,Y);J&&(Ye(ne)&&(J.isShadow=!0),L.childNodes.push(J))}}let pe=M.parentNode(e);return pe&&Xe(pe)&&Ye(pe)&&(L.isShadow=!0),L.type===te.Element&&L.tagName==="iframe"&&Xn(e,()=>{let Y=e.contentDocument;if(Y&&k){let ne=Ue(Y,{doc:Y,mirror:n,blockClass:s,blockSelector:o,needsMask:V,maskTextClass:a,maskTextSelector:c,skipChild:!1,inlineStylesheet:d,maskInputOptions:u,maskTextFn:f,maskInputFn:h,slimDOMOptions:p,dataURLOptions:m,inlineImages:l,recordCanvas:b,preserveWhiteSpace:re,onSerialize:E,onIframeLoad:k,iframeLoadTimeout:g,onStylesheetLoad:w,stylesheetLoadTimeout:N,keepIframeSrcFn:_});ne&&k(e,ne)}},g),L.type===te.Element&&L.tagName==="link"&&typeof L.attributes.rel=="string"&&(L.attributes.rel==="stylesheet"||L.attributes.rel==="preload"&&typeof L.attributes.href=="string"&&Ir(L.attributes.href)==="css")&&Yn(e,()=>{if(w){let Y=Ue(e,{doc:r,mirror:n,blockClass:s,blockSelector:o,needsMask:V,maskTextClass:a,maskTextSelector:c,skipChild:!1,inlineStylesheet:d,maskInputOptions:u,maskTextFn:f,maskInputFn:h,slimDOMOptions:p,dataURLOptions:m,inlineImages:l,recordCanvas:b,preserveWhiteSpace:re,onSerialize:E,onIframeLoad:k,iframeLoadTimeout:g,onStylesheetLoad:w,stylesheetLoadTimeout:N,keepIframeSrcFn:_});Y&&w(e,Y)}},N),L}function rs(e,t){let{mirror:r=new dt,blockClass:n="rr-block",blockSelector:s=null,maskTextClass:o="rr-mask",maskTextSelector:a=null,inlineStylesheet:c=!0,inlineImages:i=!1,recordCanvas:d=!1,maskAllInputs:u=!1,maskTextFn:f,maskInputFn:h,slimDOM:p=!1,dataURLOptions:m,preserveWhiteSpace:l,onSerialize:b,onIframeLoad:E,iframeLoadTimeout:k,onStylesheetLoad:g,stylesheetLoadTimeout:w,keepIframeSrcFn:N=()=>!1}=t,_=u===!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}:u===!1?{password:!0}:u,j=xr(p);return Ue(e,{doc:e,mirror:r,blockClass:n,blockSelector:s,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:_,maskTextFn:f,maskInputFn:h,slimDOMOptions:j,dataURLOptions:m,inlineImages:i,recordCanvas:d,preserveWhiteSpace:l,onSerialize:b,onIframeLoad:E,iframeLoadTimeout:k,onStylesheetLoad:g,stylesheetLoadTimeout:w,keepIframeSrcFn:N,newlyAddedElement:!1})}var At=class e{constructor(...t){y(this,"parentElement",null),y(this,"parentNode",null),y(this,"ownerDocument"),y(this,"firstChild",null),y(this,"lastChild",null),y(this,"previousSibling",null),y(this,"nextSibling",null),y(this,"ELEMENT_NODE",1),y(this,"TEXT_NODE",3),y(this,"nodeType"),y(this,"nodeName"),y(this,"RRNodeType")}get childNodes(){let t=[],r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof e){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}};function le(e,t,r=document){let n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}var Fe=`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.`,nr={map:{},getId(){return console.error(Pe),-1},getNode(){return console.error(Pe),null},removeNodeFromMap(){console.error(Pe)},has(){return console.error(Pe),!1},reset(){console.error(Pe)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(nr=new Proxy(nr,{get(e,t,r){return t==="map"&&console.error(Pe),Reflect.get(e,t,r)}}));function Ke(e,t,r={}){let n=null,s=0;return function(...o){let a=Date.now();!s&&r.leading===!1&&(s=a);let c=t-(a-s),i=this;c<=0||c>t?(n&&(clearTimeout(n),n=null),s=a,e.apply(i,o)):!n&&r.trailing!==!1&&(n=setTimeout(()=>{s=r.leading===!1?0:Date.now(),n=null,e.apply(i,o)},c))}}function mt(e,t,r,n,s=window){let o=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,n?r:{set(a){setTimeout(()=>{r.set.call(this,a)},0),o&&o.set&&o.set.call(this,a)}}),()=>mt(e,t,o||{},!0)}function Cr(e){var t,r,n,s;let o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:o.documentElement.scrollLeft||o?.body&&((t=C.parentElement(o.body))==null?void 0:t.scrollLeft)||((r=o?.body)==null?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:o?.documentElement.scrollTop||o?.body&&((n=C.parentElement(o.body))==null?void 0:n.scrollTop)||((s=o?.body)==null?void 0:s.scrollTop)||0}}function Mr(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ir(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function kr(e){return e?e.nodeType===e.ELEMENT_NODE?e:C.parentElement(e):null}function he(e,t,r,n){if(!e)return!1;let s=kr(e);if(!s)return!1;try{if(typeof t=="string"){if(s.classList.contains(t)||n&&s.closest("."+t)!==null)return!0}else if(ft(s,t,n))return!0}catch{}return!!(r&&(s.matches(r)||n&&s.closest(r)!==null))}function Vn(e,t){return t.getId(e)!==-1}function Mt(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===ut}function Rr(e,t){if(Ve(e))return!1;let r=t.getId(e);if(!t.has(r))return!0;let n=C.parentNode(e);return n&&n.nodeType===e.DOCUMENT_NODE?!1:n?Rr(n,t):!0}function Ot(e){return!!e.changedTouches}function Jn(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)}function Er(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Or(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Nt(e){return e?e instanceof Et&&"shadowRoot"in e?!!e.shadowRoot:!!C.shadowRoot(e):!1}var Tt=class{constructor(){y(this,"id",1),y(this,"styleIDMap",new WeakMap),y(this,"idStyleMap",new Map)}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function Nr(e){var t;let r=null;return"getRootNode"in e&&((t=C.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&C.host(C.getRootNode(e))&&(r=C.host(C.getRootNode(e))),r}function Xn(e){let t=e,r;for(;r=Nr(t);)t=r;return t}function Yn(e){let t=C.ownerDocument(e);if(!t)return!1;let r=Xn(e);return C.contains(t,r)}function xt(e){let t=C.ownerDocument(e);return t?C.contains(t,e)||Yn(e):!1}var sr=(e,t)=>`${e}@${t}`,Dt=class{constructor(){y(this,"frozen",!1),y(this,"locked",!1),y(this,"texts",[]),y(this,"attributes",[]),y(this,"attributeMap",new WeakMap),y(this,"removes",[]),y(this,"mapRemoves",[]),y(this,"movedMap",{}),y(this,"addedSet",new Set),y(this,"movedSet",new Set),y(this,"droppedSet",new Set),y(this,"removesSubTreeCache",new Set),y(this,"mutationCb"),y(this,"blockClass"),y(this,"blockSelector"),y(this,"maskTextClass"),y(this,"maskTextSelector"),y(this,"inlineStylesheet"),y(this,"maskInputOptions"),y(this,"maskTextFn"),y(this,"maskInputFn"),y(this,"keepIframeSrcFn"),y(this,"recordCanvas"),y(this,"inlineImages"),y(this,"slimDOMOptions"),y(this,"dataURLOptions"),y(this,"doc"),y(this,"mirror"),y(this,"iframeManager"),y(this,"stylesheetManager"),y(this,"shadowDomManager"),y(this,"processedNodeManager"),y(this,"unattachedDoc"),y(this,"processMutations",t=>{At&&(t=At(t),!t.length)||(t.forEach(this.processMutation),this.emit())}),y(this,"emit",()=>{if(this.frozen||this.locked)return;let t=[],r=new Set;for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let m of this.movedSet){let p=C.parentNode(m);this.removesSubTreeCache.has(p)&&!this.movedSet.has(p)||this.addedSet.add(m)}let n=null,s=null,o=-1,a=null,c=!1,i=new Set,d=this.addedSet.values(),u=d.next();for(;this.addedSet.size;){if(n!==null&&this.addedSet.has(C.previousSibling(n)))a=n,n=C.previousSibling(n);else{for(this.addedSet.has(u.value)||(u=d.next()),n=u.value;;){if(s=C.parentNode(n),this.addedSet.has(s)){n=s;continue}break}if(i.has(s))s=null;else if(s){if(xt(s)?(c=or(this.droppedSet,s)||this.removesSubTreeCache.has(s),c&&or(this.movedSet,n)&&(c=!1)):c=!0,this.addedSet.has(C.lastChild(s)))n=C.lastChild(s),a=null;else for(;;){if(a=C.nextSibling(n),this.addedSet.has(a)){n=a;continue}break}if(o=Ve(s)?this.mirror.getId(Nr(n)):this.mirror.getId(s),o===-1&&s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let l=C.host(s);o=this.mirror.getId(l)}}}if(this.addedSet.delete(n),!s||o===-1){i.add(n);continue}else if(c){this.droppedSet.add(n);continue}let m=!1;if(n.nodeType===Node.TEXT_NODE){let l=s.tagName;if(l==="TEXTAREA")continue;l==="STYLE"&&r.has(o)&&(m=!0)}let p=a?this.mirror.getId(a):null;for(;p===ut;)a=a&&C.nextSibling(a),p=a&&this.mirror.getId(a);if(p===-1){console.warn("Couldn't record new node. Couldn't find mirror id for nextSibling:",a),n=null;continue}let g=We(n,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:l=>{Er(l,this.mirror)&&this.iframeManager.addIframe(l),Or(l,this.mirror)&&this.stylesheetManager.trackLinkElement(l),Nt(n)&&this.shadowDomManager.addShadowRoot(C.shadowRoot(n),this.doc)},onIframeLoad:(l,b)=>{this.iframeManager.attachIframe(l,b),this.shadowDomManager.observeAttachShadow(l)},onStylesheetLoad:(l,b)=>{this.stylesheetManager.attachLinkElement(l,b)},cssCaptured:m});g&&(t.push({parentId:o,nextId:p,node:g}),r.add(g.id))}let h={texts:this.texts.map(m=>{let p=m.node,g=C.parentNode(p);return g&&g.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(g),{id:this.mirror.getId(p),value:m.value}}).filter(m=>!r.has(m.id)).filter(m=>this.mirror.has(m.id)),attributes:this.attributes.map(m=>{let{attributes:p}=m;if(typeof p.style=="string"){let g=JSON.stringify(m.styleDiff),l=JSON.stringify(m._unchangedStyles);g.length<p.style.length&&(g+l).split("var(").length===p.style.split("var(").length&&(p.style=m.styleDiff)}return{id:this.mirror.getId(m.node),attributes:p}}).filter(m=>!r.has(m.id)).filter(m=>this.mirror.has(m.id)),removes:this.removes,adds:t};!h.texts.length&&!h.attributes.length&&!h.removes.length&&!h.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(h))}),y(this,"genTextAreaValueMutation",t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r));let n=Array.from(C.childNodes(t),s=>C.textContent(s)||"").join("");r.attributes.value=lt({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:ct(t),value:n,maskInputFn:this.maskInputFn})}),y(this,"processMutation",t=>{if(!Mt(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{let r=C.textContent(t.target);!he(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:wr(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,kr(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{let r=t.target,n=Oe(r.tagName),s=t.attributeName,o=t.target.getAttribute(s);if(s==="value"){let c=ct(r);o=lt({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:c,value:o,maskInputFn:this.maskInputFn})}if(he(t.target,this.blockClass,this.blockSelector,!1)||o===t.oldValue)return;let a=this.attributeMap.get(t.target);if(n==="iframe"&&s==="src"&&!this.keepIframeSrcFn(o))if(!r.contentDocument)s="rr_src";else return;if(a||(a={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(t.target,a)),s==="type"&&n==="input"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!Sr(n,s))if(a.attributes[s]=br(this.doc,n,Oe(s),o),s==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let c=this.unattachedDoc.createElement("span");t.oldValue&&c.setAttribute("style",t.oldValue);for(let i of Array.from(r.style)){let d=r.style.getPropertyValue(i),u=r.style.getPropertyPriority(i);d!==c.style.getPropertyValue(i)||u!==c.style.getPropertyPriority(i)?u===""?a.styleDiff[i]=d:a.styleDiff[i]=[d,u]:a._unchangedStyles[i]=[d,u]}for(let i of Array.from(c.style))r.style.getPropertyValue(i)===""&&(a.styleDiff[i]=!1)}else s==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?a.attributes.rr_open_mode="modal":a.attributes.rr_open_mode="non-modal");break}case"childList":{if(he(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{xt(r)||this.shadowDomManager.removeShadowRootsIn(r);let n=this.mirror.getId(r),s=Ve(t.target)?this.mirror.getId(C.host(t.target)):this.mirror.getId(t.target);he(t.target,this.blockClass,this.blockSelector,!1)||Mt(r,this.mirror,this.slimDOMOptions)||!Vn(r,this.mirror)||(this.addedSet.has(r)?(Lt(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&n===-1||Rr(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[sr(n,s)]?Lt(this.movedSet,r):(this.removes.push({parentId:s,id:n,isShadow:Ve(t.target)&&Je(t.target)?!0:void 0}),Kn(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),y(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Mt(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[sr(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);he(t,this.blockClass,this.blockSelector,!1)||(C.childNodes(t).forEach(n=>this.genAdds(n)),Nt(t)&&C.childNodes(C.shadowRoot(t)).forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","processedNodeManager"].forEach(r=>{this[r]=t[r]})}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1,this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0}unlock(){this.locked=!1,this.emit()}};function Lt(e,t){e.delete(t),C.childNodes(t).forEach(r=>Lt(e,r))}function Kn(e,t){let r=[e];for(;r.length;){let n=r.pop();t.has(n)||(t.add(n),C.childNodes(n).forEach(s=>r.push(s)))}}function or(e,t){return e.size===0?!1:Tr(e,t)}function Tr(e,t){if(e.has(t))return!0;let r=C.parentNode(t);return r?Tr(e,r):!1}var Xe;function Zn(e){Xe=e}function Qn(){Xe=void 0}var W=e=>Xe?(...r)=>{try{return e(...r)}catch(n){if(Xe&&Xe(n)===!0)return;throw n}}:e,At=null,Be=new Set;function Qe(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function xr(e,t){let r=new Dt;Be.add(r),r.init(e);let[n,s]=fr(),o=new n(W(r.processMutations.bind(r)));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),()=>{o.disconnect(),Be.delete(r),s()}}function es({mousemoveCb:e,sampling:t,doc:r,mirror:n}){if(t.mousemove===!1)return()=>{};let s=typeof t.mousemove=="number"?t.mousemove:50,o=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,a=[],c,i=Ke(W(h=>{let m=Date.now()-c;e(a.map(p=>(p.timeOffset-=m,p)),h),a=[],c=null}),o),d=W(Ke(W(h=>{let m=Qe(h),{clientX:p,clientY:g}=Ot(h)?h.changedTouches[0]:h;c||(c=Ye()),a.push({x:p,y:g,id:n.getId(m),timeOffset:Ye()-c}),i(typeof DragEvent<"u"&&h instanceof DragEvent?F.Drag:h instanceof MouseEvent?F.MouseMove:F.TouchMove)}),s,{trailing:!1})),u=[le("mousemove",d,r),le("touchmove",d,r),le("drag",d,r)];return W(()=>{u.forEach(h=>h())})}function ts({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:s,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[],i=null,d=u=>h=>{let m=Qe(h);if(he(m,n,s,!0))return;let p=null,g=u;if("pointerType"in h){switch(h.pointerType){case"mouse":p=Ie.Mouse;break;case"touch":p=Ie.Touch;break;case"pen":p=Ie.Pen;break}p===Ie.Touch?me[u]===me.MouseDown?g="TouchStart":me[u]===me.MouseUp&&(g="TouchEnd"):Ie.Pen}else Ot(h)&&(p=Ie.Touch);p!==null?(i=p,(g.startsWith("Touch")&&p===Ie.Touch||g.startsWith("Mouse")&&p===Ie.Mouse)&&(p=null)):me[u]===me.Click&&(p=i,i=null);let l=Ot(h)?h.changedTouches[0]:h;if(!l)return;let b=r.getId(m),{clientX:k,clientY:I}=l;W(e)({type:me[g],id:b,x:k,y:I,...p!==null&&{pointerType:p}})};return Object.keys(me).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&a[u]!==!1).forEach(u=>{let h=Oe(u),m=d(u);if(window.PointerEvent)switch(me[u]){case me.MouseDown:case me.MouseUp:h=h.replace("mouse","pointer");break;case me.TouchStart:case me.TouchEnd:return}c.push(le(h,m,t))}),W(()=>{c.forEach(u=>u())})}function Dr({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:s,sampling:o}){let a=W(Ke(W(c=>{let i=Qe(c);if(!i||he(i,n,s,!0))return;let d=r.getId(i);if(i===t&&t.defaultView){let u=Cr(t.defaultView);e({id:d,x:u.left,y:u.top})}else e({id:d,x:i.scrollLeft,y:i.scrollTop})}),o.scroll||100));return le("scroll",a,t)}function rs({viewportResizeCb:e},{win:t}){let r=-1,n=-1,s=W(Ke(W(()=>{let o=Mr(),a=Ir();(r!==o||n!==a)&&(e({width:Number(a),height:Number(o)}),r=o,n=a)}),200));return le("resize",s,t)}var ns=["INPUT","TEXTAREA","SELECT"],ir=new WeakMap;function ss({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:s,ignoreClass:o,ignoreSelector:a,maskInputOptions:c,maskInputFn:i,sampling:d,userTriggeredOnInput:u}){function h(I){let f=Qe(I),v=I.isTrusted,D=f&&f.tagName;if(f&&D==="OPTION"&&(f=C.parentElement(f)),!f||!D||ns.indexOf(D)<0||he(f,n,s,!0)||f.classList.contains(o)||a&&f.matches(a))return;let _=f.value,R=!1,J=ct(f)||"";J==="radio"||J==="checkbox"?R=f.checked:(c[D.toLowerCase()]||c[J])&&(_=lt({element:f,maskInputOptions:c,tagName:D,type:J,value:_,maskInputFn:i})),m(f,u?{text:_,isChecked:R,userTriggered:v}:{text:_,isChecked:R});let te=f.name;J==="radio"&&te&&R&&t.querySelectorAll(`input[type="radio"][name="${te}"]`).forEach(ne=>{if(ne!==f){let K=ne.value;m(ne,u?{text:K,isChecked:!R,userTriggered:!1}:{text:K,isChecked:!R})}})}function m(I,f){let v=ir.get(I);if(!v||v.text!==f.text||v.isChecked!==f.isChecked){ir.set(I,f);let D=r.getId(I);W(e)({...f,id:D})}}let g=(d.input==="last"?["change"]:["input","change"]).map(I=>le(I,W(h),t)),l=t.defaultView;if(!l)return()=>{g.forEach(I=>I())};let b=l.Object.getOwnPropertyDescriptor(l.HTMLInputElement.prototype,"value"),k=[[l.HTMLInputElement.prototype,"value"],[l.HTMLInputElement.prototype,"checked"],[l.HTMLSelectElement.prototype,"value"],[l.HTMLTextAreaElement.prototype,"value"],[l.HTMLSelectElement.prototype,"selectedIndex"],[l.HTMLOptionElement.prototype,"selected"]];return b&&b.set&&g.push(...k.map(I=>mt(I[0],I[1],{set(){W(h)({target:this,isTrusted:!1})}},!1,l))),W(()=>{g.forEach(I=>I())})}function ht(e){let t=[];function r(n,s){if(nt("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||nt("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||nt("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||nt("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){let a=Array.from(n.parentRule.cssRules).indexOf(n);return s.unshift(a),r(n.parentRule,s)}else if(n.parentStyleSheet){let a=Array.from(n.parentStyleSheet.cssRules).indexOf(n);s.unshift(a)}return s}return r(e,t)}function Ee(e,t,r){let n,s;return e?(e.ownerNode?n=t.getId(e.ownerNode):s=r.getId(e),{styleId:s,id:n}):{}}function os({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};let s=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:W((u,h,m)=>{let[p,g]=m,{id:l,styleId:b}=Ee(h,t,r.styleMirror);return(l&&l!==-1||b&&b!==-1)&&e({id:l,styleId:b,adds:[{rule:p,index:g}]}),u.apply(h,m)})}),n.CSSStyleSheet.prototype.addRule=function(u,h,m=this.cssRules.length){let p=`${u} { ${h} }`;return n.CSSStyleSheet.prototype.insertRule.apply(this,[p,m])};let o=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:W((u,h,m)=>{let[p]=m,{id:g,styleId:l}=Ee(h,t,r.styleMirror);return(g&&g!==-1||l&&l!==-1)&&e({id:g,styleId:l,removes:[{index:p}]}),u.apply(h,m)})}),n.CSSStyleSheet.prototype.removeRule=function(u){return n.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let a;n.CSSStyleSheet.prototype.replace&&(a=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:W((u,h,m)=>{let[p]=m,{id:g,styleId:l}=Ee(h,t,r.styleMirror);return(g&&g!==-1||l&&l!==-1)&&e({id:g,styleId:l,replace:p}),u.apply(h,m)})}));let c;n.CSSStyleSheet.prototype.replaceSync&&(c=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:W((u,h,m)=>{let[p]=m,{id:g,styleId:l}=Ee(h,t,r.styleMirror);return(g&&g!==-1||l&&l!==-1)&&e({id:g,styleId:l,replaceSync:p}),u.apply(h,m)})}));let i={};st("CSSGroupingRule")?i.CSSGroupingRule=n.CSSGroupingRule:(st("CSSMediaRule")&&(i.CSSMediaRule=n.CSSMediaRule),st("CSSConditionRule")&&(i.CSSConditionRule=n.CSSConditionRule),st("CSSSupportsRule")&&(i.CSSSupportsRule=n.CSSSupportsRule));let d={};return Object.entries(i).forEach(([u,h])=>{d[u]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(d[u].insertRule,{apply:W((m,p,g)=>{let[l,b]=g,{id:k,styleId:I}=Ee(p.parentStyleSheet,t,r.styleMirror);return(k&&k!==-1||I&&I!==-1)&&e({id:k,styleId:I,adds:[{rule:l,index:[...ht(p),b||0]}]}),m.apply(p,g)})}),h.prototype.deleteRule=new Proxy(d[u].deleteRule,{apply:W((m,p,g)=>{let[l]=g,{id:b,styleId:k}=Ee(p.parentStyleSheet,t,r.styleMirror);return(b&&b!==-1||k&&k!==-1)&&e({id:b,styleId:k,removes:[{index:[...ht(p),l]}]}),m.apply(p,g)})})}),W(()=>{n.CSSStyleSheet.prototype.insertRule=s,n.CSSStyleSheet.prototype.deleteRule=o,a&&(n.CSSStyleSheet.prototype.replace=a),c&&(n.CSSStyleSheet.prototype.replaceSync=c),Object.entries(i).forEach(([u,h])=>{h.prototype.insertRule=d[u].insertRule,h.prototype.deleteRule=d[u].deleteRule})})}function Lr({mirror:e,stylesheetManager:t},r){var n,s,o;let a=null;r.nodeName==="#document"?a=e.getId(r):a=e.getId(C.host(r));let c=r.nodeName==="#document"?(n=r.defaultView)==null?void 0:n.Document:(o=(s=r.ownerDocument)==null?void 0:s.defaultView)==null?void 0:o.ShadowRoot,i=c?.prototype?Object.getOwnPropertyDescriptor(c?.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!c||!i?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){var d;return(d=i.get)==null?void 0:d.call(this)},set(d){var u;let h=(u=i.set)==null?void 0:u.call(this,d);if(a!==null&&a!==-1)try{t.adoptStyleSheets(d,a)}catch{}return h}}),W(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function is({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:s}){let o=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:W((c,i,d)=>{var u;let[h,m,p]=d;if(r.has(h))return o.apply(i,[h,m,p]);let{id:g,styleId:l}=Ee((u=i.parentRule)==null?void 0:u.parentStyleSheet,t,n.styleMirror);return(g&&g!==-1||l&&l!==-1)&&e({id:g,styleId:l,set:{property:h,value:m,priority:p},index:ht(i.parentRule)}),c.apply(i,d)})});let a=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:W((c,i,d)=>{var u;let[h]=d;if(r.has(h))return a.apply(i,[h]);let{id:m,styleId:p}=Ee((u=i.parentRule)==null?void 0:u.parentStyleSheet,t,n.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,remove:{property:h},index:ht(i.parentRule)}),c.apply(i,d)})}),W(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=a})}function as({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:n,sampling:s,doc:o}){let a=W(i=>Ke(W(d=>{let u=Qe(d);if(!u||he(u,t,r,!0))return;let{currentTime:h,volume:m,muted:p,playbackRate:g,loop:l}=u;e({type:i,id:n.getId(u),currentTime:h,volume:m,muted:p,playbackRate:g,loop:l})}),s.media||500)),c=[le("play",a(_e.Play),o),le("pause",a(_e.Pause),o),le("seeked",a(_e.Seeked),o),le("volumechange",a(_e.VolumeChange),o),le("ratechange",a(_e.RateChange),o)];return W(()=>{c.forEach(i=>i())})}function ls({fontCb:e,doc:t}){let r=t.defaultView;if(!r)return()=>{};let n=[],s=new WeakMap,o=r.FontFace;r.FontFace=function(i,d,u){let h=new o(i,d,u);return s.set(h,{family:i,buffer:typeof d!="string",descriptors:u,fontSource:typeof d=="string"?d:JSON.stringify(Array.from(new Uint8Array(d)))}),h};let a=xe(t.fonts,"add",function(c){return function(i){return setTimeout(W(()=>{let d=s.get(i);d&&(e(d),s.delete(i))}),0),c.apply(this,[i])}});return n.push(()=>{r.FontFace=o}),n.push(a),W(()=>{n.forEach(c=>c())})}function cs(e){let{doc:t,mirror:r,blockClass:n,blockSelector:s,selectionCb:o}=e,a=!0,c=W(()=>{let i=t.getSelection();if(!i||a&&i?.isCollapsed)return;a=i.isCollapsed||!1;let d=[],u=i.rangeCount||0;for(let h=0;h<u;h++){let m=i.getRangeAt(h),{startContainer:p,startOffset:g,endContainer:l,endOffset:b}=m;he(p,n,s,!0)||he(l,n,s,!0)||d.push({start:r.getId(p),startOffset:g,end:r.getId(l),endOffset:b})}o({ranges:d})});return c(),le("selectionchange",c)}function ds({doc:e,customElementCb:t}){let r=e.defaultView;return!r||!r.customElements?()=>{}:xe(r.customElements,"define",function(s){return function(o,a,c){try{t({define:{name:o}})}catch{console.warn(`Custom element callback failed for ${o}`)}return s.apply(this,[o,a,c])}})}function us(e,t){let{mutationCb:r,mousemoveCb:n,mouseInteractionCb:s,scrollCb:o,viewportResizeCb:a,inputCb:c,mediaInteractionCb:i,styleSheetRuleCb:d,styleDeclarationCb:u,canvasMutationCb:h,fontCb:m,selectionCb:p,customElementCb:g}=e;e.mutationCb=(...l)=>{t.mutation&&t.mutation(...l),r(...l)},e.mousemoveCb=(...l)=>{t.mousemove&&t.mousemove(...l),n(...l)},e.mouseInteractionCb=(...l)=>{t.mouseInteraction&&t.mouseInteraction(...l),s(...l)},e.scrollCb=(...l)=>{t.scroll&&t.scroll(...l),o(...l)},e.viewportResizeCb=(...l)=>{t.viewportResize&&t.viewportResize(...l),a(...l)},e.inputCb=(...l)=>{t.input&&t.input(...l),c(...l)},e.mediaInteractionCb=(...l)=>{t.mediaInteaction&&t.mediaInteaction(...l),i(...l)},e.styleSheetRuleCb=(...l)=>{t.styleSheetRule&&t.styleSheetRule(...l),d(...l)},e.styleDeclarationCb=(...l)=>{t.styleDeclaration&&t.styleDeclaration(...l),u(...l)},e.canvasMutationCb=(...l)=>{t.canvasMutation&&t.canvasMutation(...l),h(...l)},e.fontCb=(...l)=>{t.font&&t.font(...l),m(...l)},e.selectionCb=(...l)=>{t.selection&&t.selection(...l),p(...l)},e.customElementCb=(...l)=>{t.customElement&&t.customElement(...l),g(...l)}}function fs(e,t={}){let r=e.doc.defaultView;if(!r)return()=>{};us(e,t);let n;e.recordDOM&&(n=xr(e,e.doc));let s=es(e),o=ts(e),a=Dr(e),c=rs(e,{win:r}),i=ss(e),d=as(e),u=()=>{},h=()=>{},m=()=>{},p=()=>{};e.recordDOM&&(u=os(e,{win:r}),h=Lr(e,e.doc),m=is(e,{win:r}),e.collectFonts&&(p=ls(e)));let g=cs(e),l=ds(e),b=[];for(let k of e.plugins)b.push(k.observer(k.callback,r,k.options));return W(()=>{n?.(),s(),o(),a(),c(),i(),d(),u(),h(),m(),p(),g(),l(),b.forEach(k=>k())})}function nt(e){return typeof window[e]<"u"}function st(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var pt=class{constructor(t){y(this,"iframeIdToRemoteIdMap",new WeakMap),y(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,r,n,s){let o=n||this.getIdToRemoteIdMap(t),a=s||this.getRemoteIdToIdMap(t),c=o.get(r);return c||(c=this.generateIdFn(),o.set(r,c),a.set(c,r)),c}getIds(t,r){let n=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return r.map(o=>this.getId(t,o,n,s))}getRemoteId(t,r,n){let s=n||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;let o=s.get(r);return o||-1}getRemoteIds(t,r){let n=this.getRemoteIdToIdMap(t);return r.map(s=>this.getRemoteId(t,s,n))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}},_t=class{constructor(t){y(this,"iframes",new WeakMap),y(this,"crossOriginIframeMap",new WeakMap),y(this,"crossOriginIframeMirror",new pt(yr)),y(this,"crossOriginIframeStyleMirror"),y(this,"crossOriginIframeRootIdMap",new WeakMap),y(this,"mirror"),y(this,"mutationCb"),y(this,"wrappedEmit"),y(this,"loadListener"),y(this,"unloadListener"),y(this,"attachedWindows",new Map),y(this,"messageHandler",r=>this.handleMessage(r)),y(this,"stylesheetManager"),y(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new pt(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}addUnloadListener(t){this.unloadListener=t}attachIframe(t,r){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.watchIframeWindow(t),(n=this.loadListener)==null||n.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}destroy(){window.removeEventListener("message",this.messageHandler),this.attachedWindows.forEach(t=>t())}watchIframeWindow(t){let r=t.contentWindow;if(!r||this.attachedWindows.has(r))return;let n=[],s=()=>{this.attachedWindows.delete(r),n.forEach(o=>{try{o()}catch{}})};this.attachedWindows.set(r,s),this.recordCrossOriginIframes&&n.push(le("message",this.messageHandler,r)),n.push(le("pagehide",o=>{var a;if(o.persisted)return;let c=r.document;s(),(a=this.unloadListener)==null||a.call(this,c)},r))}handleMessage(t){let r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;let s=this.crossOriginIframeMap.get(t.source);if(!s)return;let o=this.transformCrossOriginEvent(s,r.data.event);o&&this.wrappedEmit(o,r.data.isCheckout)}transformCrossOriginEvent(t,r){var n;switch(r.type){case P.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);let s=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,s),this.patchRootIdOnNode(r.data.node,s),{timestamp:r.timestamp,type:P.IncrementalSnapshot,data:{source:F.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case P.Meta:case P.Load:case P.DomContentLoaded:return!1;case P.Annotation:case P.Plugin:return r;case P.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case P.IncrementalSnapshot:switch(r.data.source){case F.Mutation:return r.data.adds.forEach(s=>{this.replaceIds(s,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,t);let o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(s.node,o)}),r.data.removes.forEach(s=>{this.replaceIds(s,t,["parentId","id"])}),r.data.attributes.forEach(s=>{this.replaceIds(s,t,["id"])}),r.data.texts.forEach(s=>{this.replaceIds(s,t,["id"])}),r;case F.Drag:case F.TouchMove:case F.MouseMove:return r.data.positions.forEach(s=>{this.replaceIds(s,t,["id"])}),r;case F.ViewportResize:return!1;case F.MediaInteraction:case F.MouseInteraction:case F.Scroll:case F.CanvasMutation:case F.Input:return this.replaceIds(r.data,t,["id"]),r;case F.StyleSheetRule:case F.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case F.Font:return r;case F.Selection:return r.data.ranges.forEach(s=>{this.replaceIds(s,t,["start","end"])}),r;case F.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(n=r.data.styles)==null||n.forEach(s=>{this.replaceStyleIds(s,t,["styleId"])}),r}}return!1}replace(t,r,n,s){for(let o of s)!Array.isArray(r[o])&&typeof r[o]!="number"||(Array.isArray(r[o])?r[o]=t.getIds(n,r[o]):r[o]=t.getId(n,r[o]));return r}replaceIds(t,r,n){return this.replace(this.crossOriginIframeMirror,t,r,n)}replaceStyleIds(t,r,n){return this.replace(this.crossOriginIframeStyleMirror,t,r,n)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(n=>{this.replaceIdOnNode(n,r)})}patchRootIdOnNode(t,r){t.type!==ee.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(n=>{this.patchRootIdOnNode(n,r)})}},Pt=class{constructor(t){y(this,"shadowDoms",new Map),y(this,"mutationCb"),y(this,"scrollCb"),y(this,"bypassOptions"),y(this,"mirror"),y(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!Je(t)||this.shadowDoms.has(t))return;let n=[];this.shadowDoms.set(t,n);let s=xr({...this.bypassOptions,doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);n.push(s),n.push(Dr({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{this.shadowDoms.get(t)===n&&(t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(C.host(t))),n.push(Lr({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t)))},0)}removeShadowRootsIn(t){if(this.shadowDoms.size===0)return;let r=C.shadowRoot(t);r&&(this.shadowDoms.has(r)&&this.removeShadowRoot(r),this.removeShadowRootsIn(r)),C.childNodes(t).forEach(n=>this.removeShadowRootsIn(n))}removeShadowRoot(t){let r=this.shadowDoms.get(t);this.shadowDoms.delete(t),r?.forEach(It)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){let n=this;this.restoreHandlers.push(xe(t.prototype,"attachShadow",function(s){return function(o){let a=s.call(this,o),c=C.shadowRoot(this);return c&&xt(this)&&n.addShadowRoot(c,r),a}}))}reset(){this.restoreHandlers.forEach(It),this.restoreHandlers=[];let t=this.shadowDoms;this.shadowDoms=new Map,t.forEach(r=>r.forEach(It))}};function It(e){try{e()}catch{}}var Ue="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hs=typeof Uint8Array>"u"?[]:new Uint8Array(256);for($e=0;$e<Ue.length;$e++)hs[Ue.charCodeAt($e)]=$e;var $e,ps=function(e){var t=new Uint8Array(e),r,n=t.length,s="";for(r=0;r<n;r+=3)s+=Ue[t[r]>>2],s+=Ue[(t[r]&3)<<4|t[r+1]>>4],s+=Ue[(t[r+1]&15)<<2|t[r+2]>>6],s+=Ue[t[r+2]&63];return n%3===2?s=s.substring(0,s.length-1)+"=":n%3===1&&(s=s.substring(0,s.length-2)+"=="),s},ar=new Map;function ms(e,t){let r=ar.get(e);return r||(r=new Map,ar.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}var Ar=(e,t,r)=>{if(!e||!(Pr(e,t)||typeof e=="object"))return;let n=e.constructor.name,s=ms(r,n),o=s.indexOf(e);return o===-1&&(o=s.length,s.push(e)),o};function ot(e,t,r){if(e instanceof Array)return e.map(n=>ot(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){let n=e.constructor.name,s=ps(e);return{rr_type:n,base64:s}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[ot(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let n=e.constructor.name,{src:s}=e;return{rr_type:n,src:s}}else if(e instanceof HTMLCanvasElement){let n="HTMLImageElement",s=e.toDataURL();return{rr_type:n,src:s}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[ot(e.data,t,r),e.width,e.height]};if(Pr(e,t)||typeof e=="object"){let n=e.constructor.name,s=Ar(e,t,r);return{rr_type:n,index:s}}}}return e}var _r=(e,t,r)=>e.map(n=>ot(n,t,r)),Pr=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof t[s]=="function").find(s=>e instanceof t[s]);function gs(e,t,r,n){let s=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let a of o)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;let c=xe(t.CanvasRenderingContext2D.prototype,a,function(i){return function(...d){return he(this.canvas,r,n,!0)||setTimeout(()=>{let u=_r(d,t,this);e(this.canvas,{type:He["2D"],property:a,args:u})},0),i.apply(this,d)}});s.push(c)}catch{let c=mt(t.CanvasRenderingContext2D.prototype,a,{set(i){e(this.canvas,{type:He["2D"],property:a,args:[i],setter:!0})}});s.push(c)}return()=>{s.forEach(a=>a())}}function ys(e){return e==="experimental-webgl"?"webgl":e}function lr(e,t,r,n){let s=[];try{let o=xe(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...i){if(!he(this,t,r,!0)){let d=ys(c);if("__context"in this||(this.__context=d),n&&["webgl","webgl2"].includes(d))if(i[0]&&typeof i[0]=="object"){let u=i[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else i.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...i])}});s.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(o=>o())}}function cr(e,t,r,n,s,o){let a=[],c=Object.getOwnPropertyNames(e);for(let i of c)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(i))try{if(typeof e[i]!="function")continue;let d=xe(e,i,function(u){return function(...h){let m=u.apply(this,h);if(Ar(m,o,this),"tagName"in this.canvas&&!he(this.canvas,n,s,!0)){let p=_r(h,o,this),g={type:t,property:i,args:p};r(this.canvas,g)}return m}});a.push(d)}catch{let d=mt(e,i,{set(u){r(this.canvas,{type:t,property:i,args:[u],setter:!0})}});a.push(d)}return a}function bs(e,t,r,n){let s=[];return typeof t.WebGLRenderingContext<"u"&&s.push(...cr(t.WebGLRenderingContext.prototype,He.WebGL,e,r,n,t)),typeof t.WebGL2RenderingContext<"u"&&s.push(...cr(t.WebGL2RenderingContext.prototype,He.WebGL2,e,r,n,t)),()=>{s.forEach(o=>o())}}var Fr=`(function() {
|
|
3
|
+
or you can use record.mirror to access the mirror instance during recording.`,fr={map:{},getId(){return console.error(Fe),-1},getNode(){return console.error(Fe),null},removeNodeFromMap(){console.error(Fe)},has(){return console.error(Fe),!1},reset(){console.error(Fe)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(fr=new Proxy(fr,{get(e,t,r){return t==="map"&&console.error(Fe),Reflect.get(e,t,r)}}));function Qe(e,t,r={}){let n=null,s=0;return function(...o){let a=Date.now();!s&&r.leading===!1&&(s=a);let c=t-(a-s),i=this;c<=0||c>t?(n&&(clearTimeout(n),n=null),s=a,e.apply(i,o)):!n&&r.trailing!==!1&&(n=setTimeout(()=>{s=r.leading===!1?0:Date.now(),n=null,e.apply(i,o)},c))}}function bt(e,t,r,n,s=window){let o=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,n?r:{set(a){setTimeout(()=>{r.set.call(this,a)},0),o&&o.set&&o.set.call(this,a)}}),()=>bt(e,t,o||{},!0)}function Tr(e){var t,r,n,s;let o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:o.documentElement.scrollLeft||o?.body&&((t=M.parentElement(o.body))==null?void 0:t.scrollLeft)||((r=o?.body)==null?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:o?.documentElement.scrollTop||o?.body&&((n=M.parentElement(o.body))==null?void 0:n.scrollTop)||((s=o?.body)==null?void 0:s.scrollTop)||0}}function Dr(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Lr(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Ar(e){return e?e.nodeType===e.ELEMENT_NODE?e:M.parentElement(e):null}function de(e,t,r,n){if(!e)return!1;let s=Ar(e);if(!s)return!1;try{if(typeof t=="string"){if(s.classList.contains(t)||n&&s.closest("."+t)!==null)return!0}else if(mt(s,t,n))return!0}catch{}return!!(r&&(s.matches(r)||n&&s.closest(r)!==null))}function ns(e,t){return t.getId(e)!==-1}function xt(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===pt}function _r(e,t){if(Xe(e))return!1;let r=t.getId(e);if(!t.has(r))return!0;let n=M.parentNode(e);return n&&n.nodeType===e.DOCUMENT_NODE?!1:n?_r(n,t):!0}function _t(e){return!!e.changedTouches}function ss(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)}function Pr(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Fr(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Pt(e){return e?e instanceof At&&"shadowRoot"in e?!!e.shadowRoot:!!M.shadowRoot(e):!1}var Ft=class{constructor(){y(this,"id",1),y(this,"styleIDMap",new WeakMap),y(this,"idStyleMap",new Map)}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function Wr(e){var t;let r=null;return"getRootNode"in e&&((t=M.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&M.host(M.getRootNode(e))&&(r=M.host(M.getRootNode(e))),r}function os(e){let t=e,r;for(;r=Wr(t);)t=r;return t}function is(e){let t=M.ownerDocument(e);if(!t)return!1;let r=os(e);return M.contains(t,r)}function Wt(e){let t=M.ownerDocument(e);return t?M.contains(t,e)||is(e):!1}var hr=(e,t)=>`${e}@${t}`,Ut=class{constructor(){y(this,"frozen",!1),y(this,"locked",!1),y(this,"texts",[]),y(this,"attributes",[]),y(this,"attributeMap",new WeakMap),y(this,"removes",[]),y(this,"mapRemoves",[]),y(this,"movedMap",{}),y(this,"addedSet",new Set),y(this,"movedSet",new Set),y(this,"droppedSet",new Set),y(this,"removesSubTreeCache",new Set),y(this,"mutationCb"),y(this,"blockClass"),y(this,"blockSelector"),y(this,"maskTextClass"),y(this,"maskTextSelector"),y(this,"inlineStylesheet"),y(this,"maskInputOptions"),y(this,"maskTextFn"),y(this,"maskInputFn"),y(this,"keepIframeSrcFn"),y(this,"recordCanvas"),y(this,"inlineImages"),y(this,"slimDOMOptions"),y(this,"dataURLOptions"),y(this,"doc"),y(this,"mirror"),y(this,"iframeManager"),y(this,"stylesheetManager"),y(this,"shadowDomManager"),y(this,"processedNodeManager"),y(this,"unattachedDoc"),y(this,"processMutations",t=>{Ht&&(t=Ht(t),!t.length)||(t.forEach(this.processMutation),this.emit())}),y(this,"emit",()=>{if(this.frozen||this.locked)return;let t=[],r=new Set;for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let h of this.movedSet){let p=M.parentNode(h);this.removesSubTreeCache.has(p)&&!this.movedSet.has(p)||this.addedSet.add(h)}let n=null,s=null,o=-1,a=null,c=!1,i=new Set,d=this.addedSet.values(),u=d.next();for(;this.addedSet.size;){if(n!==null&&this.addedSet.has(M.previousSibling(n)))a=n,n=M.previousSibling(n);else{for(this.addedSet.has(u.value)||(u=d.next()),n=u.value;;){if(s=M.parentNode(n),this.addedSet.has(s)){n=s;continue}break}if(i.has(s))s=null;else if(s){if(Wt(s)?(c=pr(this.droppedSet,s)||this.removesSubTreeCache.has(s),c&&pr(this.movedSet,n)&&(c=!1)):c=!0,this.addedSet.has(M.lastChild(s)))n=M.lastChild(s),a=null;else for(;;){if(a=M.nextSibling(n),this.addedSet.has(a)){n=a;continue}break}if(o=Xe(s)?this.mirror.getId(Wr(n)):this.mirror.getId(s),o===-1&&s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let l=M.host(s);o=this.mirror.getId(l)}}}if(this.addedSet.delete(n),!s||o===-1){i.add(n);continue}else if(c){this.droppedSet.add(n);continue}let h=!1;if(n.nodeType===Node.TEXT_NODE){let l=s.tagName;if(l==="TEXTAREA")continue;l==="STYLE"&&r.has(o)&&(h=!0)}let p=a?this.mirror.getId(a):null;for(;p===pt;)a=a&&M.nextSibling(a),p=a&&this.mirror.getId(a);if(p===-1){console.warn("Couldn't record new node. Couldn't find mirror id for nextSibling:",a),n=null;continue}let m=Ue(n,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:l=>{Pr(l,this.mirror)&&this.iframeManager.addIframe(l),Fr(l,this.mirror)&&this.stylesheetManager.trackLinkElement(l),Pt(n)&&this.shadowDomManager.addShadowRoot(M.shadowRoot(n),this.doc)},onIframeLoad:(l,b)=>{this.iframeManager.attachIframe(l,b),this.shadowDomManager.observeAttachShadow(l)},onStylesheetLoad:(l,b)=>{this.stylesheetManager.attachLinkElement(l,b)},cssCaptured:h});m&&(t.push({parentId:o,nextId:p,node:m}),r.add(m.id))}let f={texts:this.texts.map(h=>{let p=h.node,m=M.parentNode(p);return m&&m.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(m),{id:this.mirror.getId(p),value:h.value}}).filter(h=>!r.has(h.id)).filter(h=>this.mirror.has(h.id)),attributes:this.attributes.map(h=>{let{attributes:p}=h;if(typeof p.style=="string"){let m=JSON.stringify(h.styleDiff),l=JSON.stringify(h._unchangedStyles);m.length<p.style.length&&(m+l).split("var(").length===p.style.split("var(").length&&(p.style=h.styleDiff)}return{id:this.mirror.getId(h.node),attributes:p}}).filter(h=>!r.has(h.id)).filter(h=>this.mirror.has(h.id)),removes:this.removes,adds:t};!f.texts.length&&!f.attributes.length&&!f.removes.length&&!f.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(f))}),y(this,"genTextAreaValueMutation",t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r));let n=Array.from(M.childNodes(t),s=>M.textContent(s)||"").join("");r.attributes.value=ut({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:ft(t),value:n,maskInputFn:this.maskInputFn})}),y(this,"processMutation",t=>{if(!xt(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{let r=M.textContent(t.target);!de(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:Nr(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,Ar(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{let r=t.target,n=Re(r.tagName),s=t.attributeName,o=t.target.getAttribute(s);if(s==="value"){let c=ft(r);o=ut({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:c,value:o,maskInputFn:this.maskInputFn})}if(de(t.target,this.blockClass,this.blockSelector,!1)||o===t.oldValue)return;let a=this.attributeMap.get(t.target);if(n==="iframe"&&s==="src"&&!this.keepIframeSrcFn(o))if(!r.contentDocument)s="rr_src";else return;if(a||(a={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(t.target,a)),s==="type"&&n==="input"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!Or(n,s))if(a.attributes[s]=Er(this.doc,n,Re(s),o),s==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let c=this.unattachedDoc.createElement("span");t.oldValue&&c.setAttribute("style",t.oldValue);for(let i of Array.from(r.style)){let d=r.style.getPropertyValue(i),u=r.style.getPropertyPriority(i);d!==c.style.getPropertyValue(i)||u!==c.style.getPropertyPriority(i)?u===""?a.styleDiff[i]=d:a.styleDiff[i]=[d,u]:a._unchangedStyles[i]=[d,u]}for(let i of Array.from(c.style))r.style.getPropertyValue(i)===""&&(a.styleDiff[i]=!1)}else s==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?a.attributes.rr_open_mode="modal":a.attributes.rr_open_mode="non-modal");break}case"childList":{if(de(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{Wt(r)||this.shadowDomManager.removeShadowRootsIn(r);let n=this.mirror.getId(r),s=Xe(t.target)?this.mirror.getId(M.host(t.target)):this.mirror.getId(t.target);de(t.target,this.blockClass,this.blockSelector,!1)||xt(r,this.mirror,this.slimDOMOptions)||!ns(r,this.mirror)||(this.addedSet.has(r)?(Bt(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&n===-1||_r(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[hr(n,s)]?Bt(this.movedSet,r):(this.removes.push({parentId:s,id:n,isShadow:Xe(t.target)&&Ye(t.target)?!0:void 0}),as(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),y(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(xt(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[hr(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);de(t,this.blockClass,this.blockSelector,!1)||(M.childNodes(t).forEach(n=>this.genAdds(n)),Pt(t)&&M.childNodes(M.shadowRoot(t)).forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","processedNodeManager"].forEach(r=>{this[r]=t[r]})}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1,this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0}unlock(){this.locked=!1,this.emit()}};function Bt(e,t){e.delete(t),M.childNodes(t).forEach(r=>Bt(e,r))}function as(e,t){let r=[e];for(;r.length;){let n=r.pop();t.has(n)||(t.add(n),M.childNodes(n).forEach(s=>r.push(s)))}}function pr(e,t){return e.size===0?!1:Ur(e,t)}function Ur(e,t){if(e.has(t))return!0;let r=M.parentNode(t);return r?Ur(e,r):!1}var Ke;function ls(e){Ke=e}function cs(){Ke=void 0}var U=e=>Ke?(...r)=>{try{return e(...r)}catch(n){if(Ke&&Ke(n)===!0)return;throw n}}:e,Ht=null,He=new Set;function tt(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Br(e,t){let r=new Ut;He.add(r),r.init(e);let[n,s]=vr(),o=new n(U(r.processMutations.bind(r)));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),()=>{o.disconnect(),He.delete(r),s()}}function ds({mousemoveCb:e,sampling:t,doc:r,mirror:n}){if(t.mousemove===!1)return()=>{};let s=typeof t.mousemove=="number"?t.mousemove:50,o=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,a=[],c,i=Qe(U(f=>{let h=Date.now()-c;e(a.map(p=>(p.timeOffset-=h,p)),f),a=[],c=null}),o),d=U(Qe(U(f=>{let h=tt(f),{clientX:p,clientY:m}=_t(f)?f.changedTouches[0]:f;c||(c=Ze()),a.push({x:p,y:m,id:n.getId(h),timeOffset:Ze()-c}),i(typeof DragEvent<"u"&&f instanceof DragEvent?W.Drag:f instanceof MouseEvent?W.MouseMove:W.TouchMove)}),s,{trailing:!1})),u=[le("mousemove",d,r),le("touchmove",d,r),le("drag",d,r)];return U(()=>{u.forEach(f=>f())})}function us({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:s,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[],i=null,d=u=>f=>{let h=tt(f);if(de(h,n,s,!0))return;let p=null,m=u;if("pointerType"in f){switch(f.pointerType){case"mouse":p=Ce.Mouse;break;case"touch":p=Ce.Touch;break;case"pen":p=Ce.Pen;break}p===Ce.Touch?ue[u]===ue.MouseDown?m="TouchStart":ue[u]===ue.MouseUp&&(m="TouchEnd"):Ce.Pen}else _t(f)&&(p=Ce.Touch);p!==null?(i=p,(m.startsWith("Touch")&&p===Ce.Touch||m.startsWith("Mouse")&&p===Ce.Mouse)&&(p=null)):ue[u]===ue.Click&&(p=i,i=null);let l=_t(f)?f.changedTouches[0]:f;if(!l)return;let b=r.getId(h),{clientX:E,clientY:k}=l;U(e)({type:ue[m],id:b,x:E,y:k,...p!==null&&{pointerType:p}})};return Object.keys(ue).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&a[u]!==!1).forEach(u=>{let f=Re(u),h=d(u);if(window.PointerEvent)switch(ue[u]){case ue.MouseDown:case ue.MouseUp:f=f.replace("mouse","pointer");break;case ue.TouchStart:case ue.TouchEnd:return}c.push(le(f,h,t))}),U(()=>{c.forEach(u=>u())})}function Hr({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:s,sampling:o}){let a=U(Qe(U(c=>{let i=tt(c);if(!i||de(i,n,s,!0))return;let d=r.getId(i);if(i===t&&t.defaultView){let u=Tr(t.defaultView);e({id:d,x:u.left,y:u.top})}else e({id:d,x:i.scrollLeft,y:i.scrollTop})}),o.scroll||100));return le("scroll",a,t)}function fs({viewportResizeCb:e},{win:t}){let r=-1,n=-1,s=U(Qe(U(()=>{let o=Dr(),a=Lr();(r!==o||n!==a)&&(e({width:Number(a),height:Number(o)}),r=o,n=a)}),200));return le("resize",s,t)}var hs=["INPUT","TEXTAREA","SELECT"],mr=new WeakMap;function ps({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:s,ignoreClass:o,ignoreSelector:a,maskInputOptions:c,maskInputFn:i,sampling:d,userTriggeredOnInput:u}){function f(k){let g=tt(k),w=k.isTrusted,N=g&&g.tagName;if(g&&N==="OPTION"&&(g=M.parentElement(g)),!g||!N||hs.indexOf(N)<0||de(g,n,s,!0)||g.classList.contains(o)||a&&g.matches(a))return;let _=g.value,j=!1,x=ft(g)||"";x==="radio"||x==="checkbox"?j=g.checked:(c[N.toLowerCase()]||c[x])&&(_=ut({element:g,maskInputOptions:c,tagName:N,type:x,value:_,maskInputFn:i})),h(g,u?{text:_,isChecked:j,userTriggered:w}:{text:_,isChecked:j});let V=g.name;x==="radio"&&V&&j&&t.querySelectorAll(`input[type="radio"][name="${V}"]`).forEach(re=>{if(re!==g){let Z=re.value;h(re,u?{text:Z,isChecked:!j,userTriggered:!1}:{text:Z,isChecked:!j})}})}function h(k,g){let w=mr.get(k);if(!w||w.text!==g.text||w.isChecked!==g.isChecked){mr.set(k,g);let N=r.getId(k);U(e)({...g,id:N})}}let m=(d.input==="last"?["change"]:["input","change"]).map(k=>le(k,U(f),t)),l=t.defaultView;if(!l)return()=>{m.forEach(k=>k())};let b=l.Object.getOwnPropertyDescriptor(l.HTMLInputElement.prototype,"value"),E=[[l.HTMLInputElement.prototype,"value"],[l.HTMLInputElement.prototype,"checked"],[l.HTMLSelectElement.prototype,"value"],[l.HTMLTextAreaElement.prototype,"value"],[l.HTMLSelectElement.prototype,"selectedIndex"],[l.HTMLOptionElement.prototype,"selected"]];return b&&b.set&&m.push(...E.map(k=>bt(k[0],k[1],{set(){U(f)({target:this,isTrusted:!1})}},!1,l))),U(()=>{m.forEach(k=>k())})}function gt(e){let t=[];function r(n,s){if(it("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||it("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||it("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||it("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){let a=Array.from(n.parentRule.cssRules).indexOf(n);return s.unshift(a),r(n.parentRule,s)}else if(n.parentStyleSheet){let a=Array.from(n.parentStyleSheet.cssRules).indexOf(n);s.unshift(a)}return s}return r(e,t)}function ke(e,t,r){let n,s;return e?(e.ownerNode?n=t.getId(e.ownerNode):s=r.getId(e),{styleId:s,id:n}):{}}function ms({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};let s=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:U((u,f,h)=>{let[p,m]=h,{id:l,styleId:b}=ke(f,t,r.styleMirror);return(l&&l!==-1||b&&b!==-1)&&e({id:l,styleId:b,adds:[{rule:p,index:m}]}),u.apply(f,h)})}),n.CSSStyleSheet.prototype.addRule=function(u,f,h=this.cssRules.length){let p=`${u} { ${f} }`;return n.CSSStyleSheet.prototype.insertRule.apply(this,[p,h])};let o=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:U((u,f,h)=>{let[p]=h,{id:m,styleId:l}=ke(f,t,r.styleMirror);return(m&&m!==-1||l&&l!==-1)&&e({id:m,styleId:l,removes:[{index:p}]}),u.apply(f,h)})}),n.CSSStyleSheet.prototype.removeRule=function(u){return n.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let a;n.CSSStyleSheet.prototype.replace&&(a=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:U((u,f,h)=>{let[p]=h,{id:m,styleId:l}=ke(f,t,r.styleMirror);return(m&&m!==-1||l&&l!==-1)&&e({id:m,styleId:l,replace:p}),u.apply(f,h)})}));let c;n.CSSStyleSheet.prototype.replaceSync&&(c=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:U((u,f,h)=>{let[p]=h,{id:m,styleId:l}=ke(f,t,r.styleMirror);return(m&&m!==-1||l&&l!==-1)&&e({id:m,styleId:l,replaceSync:p}),u.apply(f,h)})}));let i={};at("CSSGroupingRule")?i.CSSGroupingRule=n.CSSGroupingRule:(at("CSSMediaRule")&&(i.CSSMediaRule=n.CSSMediaRule),at("CSSConditionRule")&&(i.CSSConditionRule=n.CSSConditionRule),at("CSSSupportsRule")&&(i.CSSSupportsRule=n.CSSSupportsRule));let d={};return Object.entries(i).forEach(([u,f])=>{d[u]={insertRule:f.prototype.insertRule,deleteRule:f.prototype.deleteRule},f.prototype.insertRule=new Proxy(d[u].insertRule,{apply:U((h,p,m)=>{let[l,b]=m,{id:E,styleId:k}=ke(p.parentStyleSheet,t,r.styleMirror);return(E&&E!==-1||k&&k!==-1)&&e({id:E,styleId:k,adds:[{rule:l,index:[...gt(p),b||0]}]}),h.apply(p,m)})}),f.prototype.deleteRule=new Proxy(d[u].deleteRule,{apply:U((h,p,m)=>{let[l]=m,{id:b,styleId:E}=ke(p.parentStyleSheet,t,r.styleMirror);return(b&&b!==-1||E&&E!==-1)&&e({id:b,styleId:E,removes:[{index:[...gt(p),l]}]}),h.apply(p,m)})})}),U(()=>{n.CSSStyleSheet.prototype.insertRule=s,n.CSSStyleSheet.prototype.deleteRule=o,a&&(n.CSSStyleSheet.prototype.replace=a),c&&(n.CSSStyleSheet.prototype.replaceSync=c),Object.entries(i).forEach(([u,f])=>{f.prototype.insertRule=d[u].insertRule,f.prototype.deleteRule=d[u].deleteRule})})}function zr({mirror:e,stylesheetManager:t},r){var n,s,o;let a=null;r.nodeName==="#document"?a=e.getId(r):a=e.getId(M.host(r));let c=r.nodeName==="#document"?(n=r.defaultView)==null?void 0:n.Document:(o=(s=r.ownerDocument)==null?void 0:s.defaultView)==null?void 0:o.ShadowRoot,i=c?.prototype?Object.getOwnPropertyDescriptor(c?.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!c||!i?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){var d;return(d=i.get)==null?void 0:d.call(this)},set(d){var u;let f=(u=i.set)==null?void 0:u.call(this,d);if(a!==null&&a!==-1)try{t.adoptStyleSheets(d,a)}catch{}return f}}),U(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function gs({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:s}){let o=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:U((c,i,d)=>{var u;let[f,h,p]=d;if(r.has(f))return o.apply(i,[f,h,p]);let{id:m,styleId:l}=ke((u=i.parentRule)==null?void 0:u.parentStyleSheet,t,n.styleMirror);return(m&&m!==-1||l&&l!==-1)&&e({id:m,styleId:l,set:{property:f,value:h,priority:p},index:gt(i.parentRule)}),c.apply(i,d)})});let a=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:U((c,i,d)=>{var u;let[f]=d;if(r.has(f))return a.apply(i,[f]);let{id:h,styleId:p}=ke((u=i.parentRule)==null?void 0:u.parentStyleSheet,t,n.styleMirror);return(h&&h!==-1||p&&p!==-1)&&e({id:h,styleId:p,remove:{property:f},index:gt(i.parentRule)}),c.apply(i,d)})}),U(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=a})}function ys({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:n,sampling:s,doc:o}){let a=U(i=>Qe(U(d=>{let u=tt(d);if(!u||de(u,t,r,!0))return;let{currentTime:f,volume:h,muted:p,playbackRate:m,loop:l}=u;e({type:i,id:n.getId(u),currentTime:f,volume:h,muted:p,playbackRate:m,loop:l})}),s.media||500)),c=[le("play",a(Pe.Play),o),le("pause",a(Pe.Pause),o),le("seeked",a(Pe.Seeked),o),le("volumechange",a(Pe.VolumeChange),o),le("ratechange",a(Pe.RateChange),o)];return U(()=>{c.forEach(i=>i())})}function bs({fontCb:e,doc:t}){let r=t.defaultView;if(!r)return()=>{};let n=[],s=new WeakMap,o=r.FontFace;r.FontFace=function(i,d,u){let f=new o(i,d,u);return s.set(f,{family:i,buffer:typeof d!="string",descriptors:u,fontSource:typeof d=="string"?d:JSON.stringify(Array.from(new Uint8Array(d)))}),f};let a=xe(t.fonts,"add",function(c){return function(i){return setTimeout(U(()=>{let d=s.get(i);d&&(e(d),s.delete(i))}),0),c.apply(this,[i])}});return n.push(()=>{r.FontFace=o}),n.push(a),U(()=>{n.forEach(c=>c())})}function Ss(e){let{doc:t,mirror:r,blockClass:n,blockSelector:s,selectionCb:o}=e,a=!0,c=U(()=>{let i=t.getSelection();if(!i||a&&i?.isCollapsed)return;a=i.isCollapsed||!1;let d=[],u=i.rangeCount||0;for(let f=0;f<u;f++){let h=i.getRangeAt(f),{startContainer:p,startOffset:m,endContainer:l,endOffset:b}=h;de(p,n,s,!0)||de(l,n,s,!0)||d.push({start:r.getId(p),startOffset:m,end:r.getId(l),endOffset:b})}o({ranges:d})});return c(),le("selectionchange",c)}function ws({doc:e,customElementCb:t}){let r=e.defaultView;return!r||!r.customElements?()=>{}:xe(r.customElements,"define",function(s){return function(o,a,c){try{t({define:{name:o}})}catch{console.warn(`Custom element callback failed for ${o}`)}return s.apply(this,[o,a,c])}})}function vs(e,t){let{mutationCb:r,mousemoveCb:n,mouseInteractionCb:s,scrollCb:o,viewportResizeCb:a,inputCb:c,mediaInteractionCb:i,styleSheetRuleCb:d,styleDeclarationCb:u,canvasMutationCb:f,fontCb:h,selectionCb:p,customElementCb:m}=e;e.mutationCb=(...l)=>{t.mutation&&t.mutation(...l),r(...l)},e.mousemoveCb=(...l)=>{t.mousemove&&t.mousemove(...l),n(...l)},e.mouseInteractionCb=(...l)=>{t.mouseInteraction&&t.mouseInteraction(...l),s(...l)},e.scrollCb=(...l)=>{t.scroll&&t.scroll(...l),o(...l)},e.viewportResizeCb=(...l)=>{t.viewportResize&&t.viewportResize(...l),a(...l)},e.inputCb=(...l)=>{t.input&&t.input(...l),c(...l)},e.mediaInteractionCb=(...l)=>{t.mediaInteaction&&t.mediaInteaction(...l),i(...l)},e.styleSheetRuleCb=(...l)=>{t.styleSheetRule&&t.styleSheetRule(...l),d(...l)},e.styleDeclarationCb=(...l)=>{t.styleDeclaration&&t.styleDeclaration(...l),u(...l)},e.canvasMutationCb=(...l)=>{t.canvasMutation&&t.canvasMutation(...l),f(...l)},e.fontCb=(...l)=>{t.font&&t.font(...l),h(...l)},e.selectionCb=(...l)=>{t.selection&&t.selection(...l),p(...l)},e.customElementCb=(...l)=>{t.customElement&&t.customElement(...l),m(...l)}}function Cs(e,t={}){let r=e.doc.defaultView;if(!r)return()=>{};vs(e,t);let n;e.recordDOM&&(n=Br(e,e.doc));let s=ds(e),o=us(e),a=Hr(e),c=fs(e,{win:r}),i=ps(e),d=ys(e),u=()=>{},f=()=>{},h=()=>{},p=()=>{};e.recordDOM&&(u=ms(e,{win:r}),f=zr(e,e.doc),h=gs(e,{win:r}),e.collectFonts&&(p=bs(e)));let m=Ss(e),l=ws(e),b=[];for(let E of e.plugins)b.push(E.observer(E.callback,r,E.options));return U(()=>{n?.(),s(),o(),a(),c(),i(),d(),u(),f(),h(),p(),m(),l(),b.forEach(E=>E())})}function it(e){return typeof window[e]<"u"}function at(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var yt=class{constructor(t){y(this,"iframeIdToRemoteIdMap",new WeakMap),y(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,r,n,s){let o=n||this.getIdToRemoteIdMap(t),a=s||this.getRemoteIdToIdMap(t),c=o.get(r);return c||(c=this.generateIdFn(),o.set(r,c),a.set(c,r)),c}getIds(t,r){let n=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return r.map(o=>this.getId(t,o,n,s))}getRemoteId(t,r,n){let s=n||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;let o=s.get(r);return o||-1}getRemoteIds(t,r){let n=this.getRemoteIdToIdMap(t);return r.map(s=>this.getRemoteId(t,s,n))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}},zt=class{constructor(t){y(this,"iframes",new WeakMap),y(this,"crossOriginIframeMap",new WeakMap),y(this,"crossOriginIframeMirror",new yt(Rr)),y(this,"crossOriginIframeStyleMirror"),y(this,"crossOriginIframeRootIdMap",new WeakMap),y(this,"mirror"),y(this,"mutationCb"),y(this,"wrappedEmit"),y(this,"loadListener"),y(this,"unloadListener"),y(this,"attachedWindows",new Map),y(this,"messageHandler",r=>this.handleMessage(r)),y(this,"stylesheetManager"),y(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new yt(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}addUnloadListener(t){this.unloadListener=t}attachIframe(t,r){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.watchIframeWindow(t),(n=this.loadListener)==null||n.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}destroy(){window.removeEventListener("message",this.messageHandler),this.attachedWindows.forEach(t=>t())}watchIframeWindow(t){let r=t.contentWindow;if(!r||this.attachedWindows.has(r))return;let n=[],s=()=>{this.attachedWindows.delete(r),n.forEach(o=>{try{o()}catch{}})};this.attachedWindows.set(r,s),this.recordCrossOriginIframes&&n.push(le("message",this.messageHandler,r)),n.push(le("pagehide",o=>{var a;if(o.persisted)return;let c=r.document;s(),(a=this.unloadListener)==null||a.call(this,c)},r))}handleMessage(t){let r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;let s=this.crossOriginIframeMap.get(t.source);if(!s)return;let o=this.transformCrossOriginEvent(s,r.data.event);o&&this.wrappedEmit(o,r.data.isCheckout)}transformCrossOriginEvent(t,r){var n;switch(r.type){case F.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);let s=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,s),this.patchRootIdOnNode(r.data.node,s),{timestamp:r.timestamp,type:F.IncrementalSnapshot,data:{source:W.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case F.Meta:case F.Load:case F.DomContentLoaded:return!1;case F.Annotation:case F.Plugin:return r;case F.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case F.IncrementalSnapshot:switch(r.data.source){case W.Mutation:return r.data.adds.forEach(s=>{this.replaceIds(s,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,t);let o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(s.node,o)}),r.data.removes.forEach(s=>{this.replaceIds(s,t,["parentId","id"])}),r.data.attributes.forEach(s=>{this.replaceIds(s,t,["id"])}),r.data.texts.forEach(s=>{this.replaceIds(s,t,["id"])}),r;case W.Drag:case W.TouchMove:case W.MouseMove:return r.data.positions.forEach(s=>{this.replaceIds(s,t,["id"])}),r;case W.ViewportResize:return!1;case W.MediaInteraction:case W.MouseInteraction:case W.Scroll:case W.CanvasMutation:case W.Input:return this.replaceIds(r.data,t,["id"]),r;case W.StyleSheetRule:case W.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case W.Font:return r;case W.Selection:return r.data.ranges.forEach(s=>{this.replaceIds(s,t,["start","end"])}),r;case W.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(n=r.data.styles)==null||n.forEach(s=>{this.replaceStyleIds(s,t,["styleId"])}),r}}return!1}replace(t,r,n,s){for(let o of s)!Array.isArray(r[o])&&typeof r[o]!="number"||(Array.isArray(r[o])?r[o]=t.getIds(n,r[o]):r[o]=t.getId(n,r[o]));return r}replaceIds(t,r,n){return this.replace(this.crossOriginIframeMirror,t,r,n)}replaceStyleIds(t,r,n){return this.replace(this.crossOriginIframeStyleMirror,t,r,n)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(n=>{this.replaceIdOnNode(n,r)})}patchRootIdOnNode(t,r){t.type!==te.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(n=>{this.patchRootIdOnNode(n,r)})}},jt=class{constructor(t){y(this,"shadowDoms",new Map),y(this,"mutationCb"),y(this,"scrollCb"),y(this,"bypassOptions"),y(this,"mirror"),y(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!Ye(t)||this.shadowDoms.has(t))return;let n=[];this.shadowDoms.set(t,n);let s=Br({...this.bypassOptions,doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);n.push(s),n.push(Hr({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{this.shadowDoms.get(t)===n&&(t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(M.host(t))),n.push(zr({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t)))},0)}removeShadowRootsIn(t){if(this.shadowDoms.size===0)return;let r=M.shadowRoot(t);r&&(this.shadowDoms.has(r)&&this.removeShadowRoot(r),this.removeShadowRootsIn(r)),M.childNodes(t).forEach(n=>this.removeShadowRootsIn(n))}removeShadowRoot(t){let r=this.shadowDoms.get(t);this.shadowDoms.delete(t),r?.forEach(Tt)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){let n=this;this.restoreHandlers.push(xe(t.prototype,"attachShadow",function(s){return function(o){let a=s.call(this,o),c=M.shadowRoot(this);return c&&Wt(this)&&n.addShadowRoot(c,r),a}}))}reset(){this.restoreHandlers.forEach(Tt),this.restoreHandlers=[];let t=this.shadowDoms;this.shadowDoms=new Map,t.forEach(r=>r.forEach(Tt))}};function Tt(e){try{e()}catch{}}var Be="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ms=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(Ve=0;Ve<Be.length;Ve++)Ms[Be.charCodeAt(Ve)]=Ve;var Ve,Is=function(e){var t=new Uint8Array(e),r,n=t.length,s="";for(r=0;r<n;r+=3)s+=Be[t[r]>>2],s+=Be[(t[r]&3)<<4|t[r+1]>>4],s+=Be[(t[r+1]&15)<<2|t[r+2]>>6],s+=Be[t[r+2]&63];return n%3===2?s=s.substring(0,s.length-1)+"=":n%3===1&&(s=s.substring(0,s.length-2)+"=="),s},gr=new Map;function ks(e,t){let r=gr.get(e);return r||(r=new Map,gr.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}var jr=(e,t,r)=>{if(!e||!($r(e,t)||typeof e=="object"))return;let n=e.constructor.name,s=ks(r,n),o=s.indexOf(e);return o===-1&&(o=s.length,s.push(e)),o};function lt(e,t,r){if(e instanceof Array)return e.map(n=>lt(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){let n=e.constructor.name,s=Is(e);return{rr_type:n,base64:s}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[lt(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let n=e.constructor.name,{src:s}=e;return{rr_type:n,src:s}}else if(e instanceof HTMLCanvasElement){let n="HTMLImageElement",s=e.toDataURL();return{rr_type:n,src:s}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[lt(e.data,t,r),e.width,e.height]};if($r(e,t)||typeof e=="object"){let n=e.constructor.name,s=jr(e,t,r);return{rr_type:n,index:s}}}}return e}var qr=(e,t,r)=>e.map(n=>lt(n,t,r)),$r=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof t[s]=="function").find(s=>e instanceof t[s]);function Rs(e,t,r,n){let s=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let a of o)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;let c=xe(t.CanvasRenderingContext2D.prototype,a,function(i){return function(...d){return de(this.canvas,r,n,!0)||setTimeout(()=>{let u=qr(d,t,this);e(this.canvas,{type:ze["2D"],property:a,args:u})},0),i.apply(this,d)}});s.push(c)}catch{let c=bt(t.CanvasRenderingContext2D.prototype,a,{set(i){e(this.canvas,{type:ze["2D"],property:a,args:[i],setter:!0})}});s.push(c)}return()=>{s.forEach(a=>a())}}function Es(e){return e==="experimental-webgl"?"webgl":e}function yr(e,t,r,n){let s=[];try{let o=xe(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...i){if(!de(this,t,r,!0)){let d=Es(c);if("__context"in this||(this.__context=d),n&&["webgl","webgl2"].includes(d))if(i[0]&&typeof i[0]=="object"){let u=i[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else i.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...i])}});s.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(o=>o())}}function br(e,t,r,n,s,o){let a=[],c=Object.getOwnPropertyNames(e);for(let i of c)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(i))try{if(typeof e[i]!="function")continue;let d=xe(e,i,function(u){return function(...f){let h=u.apply(this,f);if(jr(h,o,this),"tagName"in this.canvas&&!de(this.canvas,n,s,!0)){let p=qr(f,o,this),m={type:t,property:i,args:p};r(this.canvas,m)}return h}});a.push(d)}catch{let d=bt(e,i,{set(u){r(this.canvas,{type:t,property:i,args:[u],setter:!0})}});a.push(d)}return a}function Os(e,t,r,n){let s=[];return typeof t.WebGLRenderingContext<"u"&&s.push(...br(t.WebGLRenderingContext.prototype,ze.WebGL,e,r,n,t)),typeof t.WebGL2RenderingContext<"u"&&s.push(...br(t.WebGL2RenderingContext.prototype,ze.WebGL2,e,r,n,t)),()=>{s.forEach(o=>o())}}var Gr=`(function() {
|
|
4
4
|
"use strict";
|
|
5
5
|
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
6
6
|
var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
|
|
@@ -75,5 +75,5 @@ or you can use record.mirror to access the mirror instance during recording.`,nr
|
|
|
75
75
|
};
|
|
76
76
|
})();
|
|
77
77
|
//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
|
|
78
|
-
`,dr=typeof self<"u"&&self.Blob&&new Blob([Fr],{type:"text/javascript;charset=utf-8"});function Ss(e){let t;try{if(t=dr&&(self.URL||self.webkitURL).createObjectURL(dr),!t)throw"";let r=new Worker(t,{name:e?.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Fr),{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var Ft=class{constructor(t){y(this,"pendingCanvasMutations",new Map),y(this,"rafStamps",{latestId:0,invokeId:null}),y(this,"mirror"),y(this,"mutationCb"),y(this,"resetObservers"),y(this,"frozen",!1),y(this,"locked",!1),y(this,"processMutation",(i,d)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(i)||this.pendingCanvasMutations.set(i,[]),this.pendingCanvasMutations.get(i).push(d)});let{sampling:r="all",win:n,blockClass:s,blockSelector:o,recordCanvas:a,dataURLOptions:c}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,a&&r==="all"&&this.initCanvasMutationObserver(n,s,o),a&&typeof r=="number"&&this.initCanvasFPSObserver(r,n,s,o,{dataURLOptions:c})}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,s,o){let a=lr(r,n,s,!0),c=new Map,i=new Ss;i.onmessage=g=>{let{id:l}=g.data;if(c.set(l,!1),!("base64"in g.data))return;let{base64:b,type:k,width:I,height:f}=g.data;this.mutationCb({id:l,type:He["2D"],commands:[{property:"clearRect",args:[0,0,I,f]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:b}],type:k}]},0,0]}]})};let d=1e3/t,u=0,h,m=()=>{let g=[];return r.document.querySelectorAll("canvas").forEach(l=>{he(l,n,s,!0)||g.push(l)}),g},p=g=>{if(u&&g-u<d){h=requestAnimationFrame(p);return}u=g,m().forEach(async l=>{var b;let k=this.mirror.getId(l);if(c.get(k)||l.width===0||l.height===0)return;if(c.set(k,!0),["webgl","webgl2"].includes(l.__context)){let f=l.getContext(l.__context);((b=f?.getContextAttributes())==null?void 0:b.preserveDrawingBuffer)===!1&&f.clear(f.COLOR_BUFFER_BIT)}let I=await createImageBitmap(l);i.postMessage({id:k,bitmap:I,width:l.width,height:l.height,dataURLOptions:o.dataURLOptions},[I])}),h=requestAnimationFrame(p)};h=requestAnimationFrame(p),this.resetObservers=()=>{a(),cancelAnimationFrame(h)}}initCanvasMutationObserver(t,r,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let s=lr(t,r,n,!1),o=gs(this.processMutation.bind(this),t,r,n),a=bs(this.processMutation.bind(this),t,r,n);this.resetObservers=()=>{s(),o(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{let n=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(t);if(!n||r===-1)return;let s=n.map(a=>{let{type:c,...i}=a;return i}),{type:o}=n[0];this.mutationCb({id:r,type:o,commands:s}),this.pendingCanvasMutations.delete(t)}},Wt=class{constructor(t){y(this,"trackedLinkElements",new WeakSet),y(this,"mutationCb"),y(this,"adoptedStyleSheetCb"),y(this,"styleMirror",new Tt),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;let n={id:r,styleIds:[]},s=[];for(let o of t){let a;this.styleMirror.has(o)?a=this.styleMirror.getId(o):(a=this.styleMirror.add(o),s.push({styleId:a,rules:Array.from(o.rules||CSSRule,(c,i)=>({rule:pr(c,o.href),index:i}))})),n.styleIds.push(a)}s.length>0&&(n.styles=s),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}},Ut=class{constructor(){y(this,"nodeMap",new WeakMap),y(this,"active",!1)}inOtherBuffer(t,r){let n=this.nodeMap.get(t);return n&&Array.from(n).some(s=>s!==r)}add(t,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}},Y,it,Re,Ze=!1;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Yt=e.contentWindow)==null?void 0:Yt.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var Se=wn();function Ne(e={}){let{emit:t,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:s="rr-block",blockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskTextClass:i="rr-mask",maskTextSelector:d=null,inlineStylesheet:u=!0,maskAllInputs:h,maskInputOptions:m,slimDOMOptions:p,maskInputFn:g,maskTextFn:l,hooks:b,packFn:k,sampling:I={},dataURLOptions:f={},mousemoveWait:v,recordDOM:D=!0,recordCanvas:_=!1,recordCrossOriginIframes:R=!1,recordAfter:J=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:te=!1,collectFonts:ne=!1,inlineImages:K=!1,plugins:ce,keepIframeSrcFn:x=()=>!1,ignoreCSSAttributes:ve=new Set([]),errorHandler:ye}=e;Zn(ye);let V=R?window.parent===window:!0,X=!1;if(!V)try{window.parent.document&&(X=!1)}catch{X=!0}if(V&&!t)throw new Error("emit function is required");if(!V&&!X)return()=>{};v!==void 0&&I.mousemove===void 0&&(I.mousemove=v),Se.reset();let se=h===!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}:m!==void 0?m:{password:!0},re=vr(p);Jn();let we,Ce=0,Me=T=>{for(let de of ce||[])de.eventProcessor&&(T=de.eventProcessor(T));return k&&!X&&(T=k(T)),T};Y=(T,de)=>{let L=T;if(L.timestamp=Ye(),L.type!==P.FullSnapshot&&!(L.type===P.IncrementalSnapshot&&L.data.source===F.Mutation)){Re.unfreeze();for(let ie of Be)if(ie.isFrozen())ie.unfreeze();else break}if(V)t?.(Me(L),de);else if(X){let ie={type:"rrweb",event:Me(L),origin:window.location.origin,isCheckout:de};window.parent.postMessage(ie,"*")}if(L.type===P.FullSnapshot)we=L,Ce=0;else if(L.type===P.IncrementalSnapshot){if(L.data.source===F.Mutation&&L.data.isAttachIframe)return;Ce++;let ie=n&&Ce>=n,fe=r&&L.timestamp-we.timestamp>r;(ie||fe)&&it(!0)}};let be=T=>{Y({type:P.IncrementalSnapshot,data:{source:F.Mutation,...T}})},M=T=>Y({type:P.IncrementalSnapshot,data:{source:F.Scroll,...T}}),O=T=>Y({type:P.IncrementalSnapshot,data:{source:F.CanvasMutation,...T}}),E=T=>Y({type:P.IncrementalSnapshot,data:{source:F.AdoptedStyleSheet,...T}}),N=new Wt({mutationCb:be,adoptedStyleSheetCb:E}),q=new _t({mirror:Se,mutationCb:be,stylesheetManager:N,recordCrossOriginIframes:R,wrappedEmit:Y});for(let T of ce||[])T.getMirror&&T.getMirror({nodeMirror:Se,crossOriginIframeMirror:q.crossOriginIframeMirror,crossOriginIframeStyleMirror:q.crossOriginIframeStyleMirror});let pe=new Ut;Re=new Ft({recordCanvas:_,mutationCb:O,win:window,blockClass:s,blockSelector:o,mirror:Se,sampling:I.canvas,dataURLOptions:f});let oe=new Pt({mutationCb:be,scrollCb:M,bypassOptions:{blockClass:s,blockSelector:o,maskTextClass:i,maskTextSelector:d,inlineStylesheet:u,maskInputOptions:se,dataURLOptions:f,maskTextFn:l,maskInputFn:g,recordCanvas:_,inlineImages:K,sampling:I,slimDOMOptions:re,iframeManager:q,stylesheetManager:N,canvasManager:Re,keepIframeSrcFn:x,processedNodeManager:pe},mirror:Se});it=(T=!1)=>{if(!D)return;Y({type:P.Meta,data:{href:window.location.href,width:Ir(),height:Mr()}},T),N.reset(),oe.init(),Re.lock(),Be.forEach(L=>L.lock());let de=Gn(document,{mirror:Se,blockClass:s,blockSelector:o,maskTextClass:i,maskTextSelector:d,inlineStylesheet:u,maskAllInputs:se,maskTextFn:l,maskInputFn:g,slimDOM:re,dataURLOptions:f,recordCanvas:_,inlineImages:K,onSerialize:L=>{L.nodeType===1&&(Er(L,Se)&&q.addIframe(L),Or(L,Se)&&N.trackLinkElement(L),Nt(L)&&oe.addShadowRoot(C.shadowRoot(L),document))},onIframeLoad:(L,ie)=>{q.attachIframe(L,ie),oe.observeAttachShadow(L)},onStylesheetLoad:(L,ie)=>{N.attachLinkElement(L,ie)},keepIframeSrcFn:x});if(!de)return console.warn("Failed to snapshot the document");Y({type:P.FullSnapshot,data:{node:de,initialOffset:Cr(window)}},T),Re.unlock(),Be.forEach(L=>L.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&N.adoptStyleSheets(document.adoptedStyleSheets,Se.getId(document))};try{let T=[],de=fe=>{var ue;return W(fs)({mutationCb:be,mousemoveCb:(z,je)=>Y({type:P.IncrementalSnapshot,data:{source:je,positions:z}}),mouseInteractionCb:z=>Y({type:P.IncrementalSnapshot,data:{source:F.MouseInteraction,...z}}),scrollCb:M,viewportResizeCb:z=>Y({type:P.IncrementalSnapshot,data:{source:F.ViewportResize,...z}}),inputCb:z=>Y({type:P.IncrementalSnapshot,data:{source:F.Input,...z}}),mediaInteractionCb:z=>Y({type:P.IncrementalSnapshot,data:{source:F.MediaInteraction,...z}}),styleSheetRuleCb:z=>Y({type:P.IncrementalSnapshot,data:{source:F.StyleSheetRule,...z}}),styleDeclarationCb:z=>Y({type:P.IncrementalSnapshot,data:{source:F.StyleDeclaration,...z}}),canvasMutationCb:O,fontCb:z=>Y({type:P.IncrementalSnapshot,data:{source:F.Font,...z}}),selectionCb:z=>{Y({type:P.IncrementalSnapshot,data:{source:F.Selection,...z}})},customElementCb:z=>{Y({type:P.IncrementalSnapshot,data:{source:F.CustomElement,...z}})},blockClass:s,ignoreClass:a,ignoreSelector:c,maskTextClass:i,maskTextSelector:d,maskInputOptions:se,inlineStylesheet:u,sampling:I,recordDOM:D,recordCanvas:_,inlineImages:K,userTriggeredOnInput:te,collectFonts:ne,doc:fe,maskInputFn:g,maskTextFn:l,keepIframeSrcFn:x,blockSelector:o,slimDOMOptions:re,dataURLOptions:f,mirror:Se,iframeManager:q,stylesheetManager:N,shadowDomManager:oe,processedNodeManager:pe,canvasManager:Re,ignoreCSSAttributes:ve,plugins:((ue=ce?.filter(z=>z.observer))==null?void 0:ue.map(z=>({observer:z.observer,options:z.options,callback:je=>Y({type:P.Plugin,data:{plugin:z.name,payload:je}})})))||[]},b)},L=new Map;q.addLoadListener(fe=>{try{let ue=fe.contentDocument;if(L.has(ue))return;L.set(ue,de(ue))}catch(ue){console.warn(ue)}}),q.addUnloadListener(fe=>{let ue=L.get(fe);ue&&(L.delete(fe),ue(),oe.removeShadowRootsIn(fe),Se.removeNodeFromMap(fe))});let ie=()=>{it(),T.push(de(document)),Ze=!0};return["interactive","complete"].includes(document.readyState)?ie():(T.push(le("DOMContentLoaded",()=>{Y({type:P.DomContentLoaded,data:{}}),J==="DOMContentLoaded"&&ie()})),T.push(le("load",()=>{Y({type:P.Load,data:{}}),J==="load"&&ie()},window))),()=>{[...T,...L.values()].forEach(fe=>{try{fe()}catch(ue){String(ue).toLowerCase().includes("cross-origin")||console.warn(ue)}}),L.clear(),q.destroy(),pe.destroy(),oe.reset(),Re.reset(),Ze=!1,Qn()}}catch(T){console.warn(T)}}Ne.addCustomEvent=(e,t)=>{if(!Ze)throw new Error("please add custom event after start recording");Y({type:P.Custom,data:{tag:e,payload:t}})};Ne.addAnnotation=e=>{if(!Ze)throw new Error("please add annotation after recording started");Y({type:P.Annotation,data:e})};Ne.freezePage=()=>{Re.freeze(),Be.forEach(e=>e.freeze())};Ne.takeFullSnapshot=e=>{if(!Ze)throw new Error("please take full snapshot after start recording");it(e)};Ne.mirror=Se;Ne.setMutationHook=e=>{At=e};var Wr=(e,t)=>{let r=[],n=0,s=0,o=0,a=0,c=0,i=0,d=0,u=[],h={},m=[],p,g=[],l=[],b=f=>l.length<30&&!l.includes(f)&&l.push(f),k=f=>typeof f=="string"&&(b("u:"+f),u.length<10&&!u.includes(f)&&u.push(f)),I=()=>{r=[],n=s=a=c=i=d=0,u=[],h={},m=[],p=void 0,g=[],l=[]};return{raw:()=>n,n:()=>s,reset:I,add(f){let v=f.data,D=f.timestamp;if(f.type==4&&v.href)k(v.href=e.u(v.href));else if(f.type==3&&v.source==2&&v.type==2)c++;else if(f.type==5){let R=v.payload;if(v.tag=="error")R.level=="warning"?d++:i++;else if(v.tag=="sig")h[R.k]=(h[R.k]??0)+1,R.k=="vitals"&&m.push(R),R.k=="mem"&&(p={...p,...R,used:Math.max(p?.used??0,R.used??0)});else if(v.tag=="fields")R.value=e.j(R.value);else if(v.tag=="nav"&&typeof R.to=="string")k(R.to=e.u(R.to));else if(v.tag=="network"){for(let J of["reqBody","resBody"])typeof R[J]=="string"&&(R[J]=e.t(R[J]));(R.status>=400||R.status===0)&&g.length<10&&!g.includes(R.status)&&g.push(R.status)}else if(v.tag=="breadcrumb")b(("c:"+R.cat+":"+R.msg).slice(0,100));else if(v.tag=="ws"&&typeof R.raw=="string"){if(t&&R.dir=="in"){let J=t(R.raw,D);if(J==null)return;R.raw=J}R.raw=e.t(R.raw)}}s++||(o=D),D>a&&(a=D);let _=JSON.stringify(f);n+=_.length,r.push(_)},take(f,v){f.init&&(f.init.url=e.u(f.init.url),f.init.ref=e.u(f.init.ref),f.init.user=e.j(f.init.user)),f.fields&&(f.fields.user=e.j(f.fields.user),f.fields.custom_fields=e.j(f.fields.custom_fields),f.fields.tags=e.j(f.fields.tags),new TextEncoder().encode(JSON.stringify(f.fields.tags)).length>8192&&delete f.fields.tags),v&&r.unshift(JSON.stringify({type:5,timestamp:o,data:{tag:"gap",payload:{reason:"dropped",segments:v}}}));let D=JSON.stringify({canvas_bytes:0,...f,t0:o,t1:a,enc:"gzip",n:s,urls:u,clicks:c,errs:i,warns:d,sig:h,vitals:m,mem:p,st:g,tr:l,has_error:i>0,gap:v>0}),_=`[${r.join(",")}]`;return I(),[D,_]}}},gt,Ur=e=>{if(!gt){gt=new Int32Array(256);for(let i=0;i<256;i++){let d=i;for(let u=0;u<8;u++)d=d&1?3988292384^d>>>1:d>>>1;gt[i]=d}}let t=e.length,r=Math.ceil(t/65535)||1,n=new Uint8Array(18+t+r*5),s=new DataView(n.buffer);n.set([31,139,8,0,0,0,0,0,0,255]);let o=10,a=0,c=-1;for(let i=0;i<r;i++){let d=Math.min(65535,t-a);n[o]=+(i==r-1),s.setUint16(o+1,d,!0),s.setUint16(o+3,~d,!0),n.set(e.subarray(a,a+=d),o+=5),o+=d}for(let i=0;i<t;i++)c=gt[(c^e[i])&255]^c>>>8;return s.setUint32(o,~c,!0),s.setUint32(o+4,t,!0),n},Br=(e,t)=>{let r=new TextEncoder().encode(e),n=new Uint8Array(8+r.length+t.length),s=new DataView(n.buffer);return s.setUint16(0,r.length,!0),n.set(r,2),s.setUint32(2+r.length,t.length,!0),n.set(t,6+r.length),n};var ze=(e,t,r)=>{if(!PerformanceObserver.supportedEntryTypes?.includes(e))return;let n=new PerformanceObserver(s=>{try{for(let o of s.getEntries())t(o)}catch{}});return n.observe({type:e,buffered:!0,...r}),n},ws="a,button,summary,[role=button],[role=link],[role=tab],[role=menuitem],[role=checkbox],[role=switch],input[type=submit],input[type=button],input[type=checkbox],input[type=radio]",vs="a[target=_blank],a[download],input[type=file],[data-rp-no-dead]",Hr=e=>{let t=e.tagName.toLowerCase()+(e.id?"#"+e.id:"");for(let r of[...e.classList].slice(0,3))t+="."+r;return t},zr=(e,t,r)=>{let n=e.o().signals??{},s=document,o=null,a=0,c=0,i=0,d=0,u=M=>{let O=M.target,E=Date.now();if(!O?.closest)return;let N=O.closest(ws);if(n.rage!==!1){let q=N??O;q===o&&E-a<1e3?++c==3&&t("rage",{el:Hr(q),id:r(q),n:c},E):(o=q,a=E,c=1)}n.dead!==!1&&N&&!N.closest(vs)&&!N.disabled&&(d++,setTimeout(()=>{d--,i<E&&N.isConnected&&t("dead",{el:Hr(N),id:r(N)},E)},3e3))},h=[],m=M=>{if(M.duration<200)return;let O={ms:Math.round(M.duration)},E;for(let N of M.scripts??[])(!E||N.duration>E.duration)&&(E=N);E&&(E.sourceURL&&(O.src=e.rd.u(E.sourceURL)),E.invoker&&(O.by=e.rd.u(E.invoker).slice(0,100))),t("freeze",O,Math.round(performance.timeOrigin+M.startTime))},p="[Filtered]",g=/eyJ[\w-]{8,}\.[\w-]{8,}\.[\w-]*|[\w+/=-]{32,}/g,l=Storage.prototype,b=[l.setItem,l.removeItem,l.clear],k=0,I=0,f=0,v=n.storage!==!1,D=[],_=(M,O,E,N)=>{if(!v||E?.startsWith("rp_"))return;let q=Date.now(),pe={area:M,op:O};if(q-k>1e3&&(k=q,I=0),++I>20)return void f++;E!=null&&(pe.key=E.slice(0,128)),N!=null&&(pe.v=e.rd.j({[E]:0})[E]==p?p:e.rd.t(N.slice(0,256)).replace(g,p)),f&&(pe.skipped=f),f=0,t("storage",pe,q)},R=M=>{try{return M===localStorage?"local":"session"}catch{return"session"}},J=Object.getOwnPropertyDescriptor(Document.prototype,"cookie");if(v){let M=(O,E)=>function(...N){O.apply(this,N);try{E(this,N)}catch{}};D=[l.setItem=M(b[0],(O,[E,N])=>_(R(O),"set",String(E),String(N))),l.removeItem=M(b[1],(O,[E])=>_(R(O),"remove",String(E))),l.clear=M(b[2],O=>_(R(O),"clear"))],J?.set&&Object.defineProperty(s,"cookie",{configurable:!0,get:J.get,set(O){J.set.call(this,O);try{let E=String(O),N=/expires=([^;]+)/i.exec(E);_("cookie",/max-age=(0|-)/i.test(E)||N&&Date.parse(N[1])<Date.now()?"remove":"set",E.split("=")[0].trim())}catch{}}})}let te=0,ne=0,K=0,ce=0,x=0,ve=0,ye=0,V="",X=new Map;try{n.freeze!==!1&&h.push(ze("long-animation-frame",m)??ze("longtask",m)),n.vitals!==!1&&h.push(ze("largest-contentful-paint",M=>te=M.startTime),ze("paint",M=>M.name=="first-contentful-paint"&&(ne=M.startTime)),ze("layout-shift",M=>{if(M.hadRecentInput)return;let O=M.startTime;(O-ve>1e3||O-x>5e3)&&(x=O,ce=0),ve=O,K=Math.max(K,ce+=M.value)}),ze("event",M=>{if(M.interactionId&&(X.set(M.interactionId,Math.max(X.get(M.interactionId)??0,M.duration)),X.size>200)){let O=[...X].sort((E,N)=>N[1]-E[1]).slice(0,10);ye+=X.size-10,X.clear();for(let[E,N]of O)X.set(E,N)}},{durationThreshold:40}))}catch{}let se=navigator,re=M=>Math.round(M/1e5)/10,we=1,Ce=()=>{if(s.visibilityState=="hidden")return;let M=performance.memory,O={};M&&Object.assign(O,{used:re(M.usedJSHeapSize),total:re(M.totalJSHeapSize),limit:re(M.jsHeapSizeLimit)}),we&&Object.assign(O,{dm:se.deviceMemory,cores:se.hardwareConcurrency}),we=0,(O.used||O.dm)&&t("mem",O,Date.now())},Me=n.memory!==!1?[setTimeout(Ce),setInterval(Ce,3e4)]:[],be=()=>{let M=performance.getEntriesByType?.("navigation")[0];if(n.vitals===!1||!(te||ne||M))return;let O=[...X.values()].sort((pe,oe)=>oe-pe),E=Math.round,N={lcp:E(te),fcp:E(ne),cls:Math.round(K*1e4)/1e4,inp:E(O[Math.min(9,(O.length+ye)/50|0)]??0),url:e.rd.u(location.href)};M&&Object.assign(N,{ttfb:E(M.responseStart),dcl:E(M.domContentLoadedEventEnd),load:E(M.loadEventEnd),nav:M.type});let q=JSON.stringify(N);q!=V&&t("vitals",{...N,page:E(performance.timeOrigin)},Date.now()),V=q};return{stop(){h.forEach(M=>M?.disconnect()),Me.forEach(clearInterval),v&&(v=!1,[l.setItem,l.removeItem,l.clear].every((M,O)=>M===D[O])&&([l.setItem,l.removeItem,l.clear]=b),Object.getOwnPropertyDescriptor(s,"cookie")&&delete s.cookie)},click:u,see(M){if(!d)return;let O=M.data,E=O?.source,N=O?.tag;M.type==2||M.type==4||M.type==3&&E!=1&&E!=2&&E!=6?i=Date.now():M.type==5&&N!="sig"&&N!="console"&&N!="breadcrumb"&&N!="fields"&&N!="ws"&&(i=Math.max(i,N=="network"&&typeof O?.payload?.start=="number"?O.payload.start:Date.now()))},away(){i=Date.now(),be()}}};var De=Ne,jr=1e4,Cs="[data-rp-throttle]";function xs(e){try{Is(e)}catch{}}var Ms=()=>{let e=new URL("./worker.js",import.meta.url).href;try{return new Worker(e)}catch{return new Worker(URL.createObjectURL(new Blob([`importScripts(${JSON.stringify(e)})`],{type:"text/javascript"})))}};function Is(e){let t=e.o(),r=t.replay,n=t.redact,s=window,o=document,a=De.mirror,c=Ms(),i=`.rr-mask,${r.maskSelector??"[data-rp-mask]"}`,d=[],u=0,h=0,m=0,p=[],g=()=>{let S=n.headers.length+n.bodyKeys.length+n.queryParams.length;return S!=h?(h=S,n):0},l=()=>{d.length&&(c.postMessage([1,d,g()]),p.push(d),d=[],u=1)},b=S=>{m||(I.see(S),d.push(S)>=300&&l())},k=S=>b({type:5,timestamp:S.ts,data:{tag:S.type,payload:S.data}}),I=zr(e,(S,w,A)=>k({type:"sig",ts:A,data:{k:S,...w}}),S=>a.getId(S)),f={n:o,id:-1,i:0,s:!1,q:!1,e:0},v=[],D=0,_=new WeakMap,R=0,J=Symbol(),te=S=>{let w=S[J];return w&&w.g==R?w:void 0},ne=(S,w)=>S[J]=w==f?{...f,g:R}:Object.assign(w,{g:R}),K=S=>{let w=_.get(S);if(w===void 0){let A=S.closest?.(Cs);w=A&&+A.getAttribute("data-rp-throttle")||0,w&&(r.maskAllText||S.closest(i))&&(w=-w),_.set(S,w)}return w},ce=S=>{for(let w=0;w<S.length;w++)if(S[w].nodeType!=3)return!1;return!0},x=S=>{if(!S.q){S.q=!0,D++;let w=(S.i<0?-S.i:S.i)/500|0,A=S.id<0||w<2?0:S.id%w;(v[A]??=[]).push(S)}},ve=S=>{let w=null,A=0;for(let U=0;U<S.length;U++){let B=S[U],H=B.target,j=!1;if(B.type=="characterData"){let Z=te(H);if(!Z){let ae=H.parentNode,$=ae?K(ae):0;Z=ne(H,$?{n:H,id:-2,i:$,s:!1,q:!1,e:0}:f)}Z.i&&(x(Z),j=!0)}else if(B.type=="childList"){let Z=te(H),ae=H.firstChild;if(Z?.s)ae===H.lastChild&&(!ae||ae.nodeType==3)&&(x(Z),j=!0);else if(H.nodeType==1&&K(H)&&ae===H.lastChild&&ce(B.addedNodes)&&ce(B.removedNodes)){if(!Z){let $=B.removedNodes[0],Q=$?a.getId($):-1;Q>0&&(Z=ne(H,{n:H,id:Q,i:K(H),s:!0,q:!1,e:0}))}Z&&(x(Z),j=!0)}if(!j&&A<=jr){let $=B.addedNodes;for(let Q=0;Q<$.length;Q++)A+=1+($[Q].getElementsByTagName?.("*").length??0)}}j?w??=S.slice(0,U):w&&w.push(B)}return A>jr?(De.takeFullSnapshot(!0),[]):w??S},ye=0,V=()=>{if(ye++,!D)return;let S=new Int32Array(D),w=0,A="",U=[],B=Date.now();for(let j=0;j<v.length;j++){let Z=v[j];if(!Z?.length)continue;let ae=[];for(let $ of Z){let Q=$.i,Te=Q<0?-Q:Q,ke=Te/500|0;if(ke>1&&$.id>=0&&ye%ke!=$.id%ke||B-$.e<Te-50){ae.push($);continue}$.q=!1,D--;let qe=$.n;if($.id<0){let tt=a.getId(qe);if(tt<0||a.getNode(tt)!==qe)continue;if($.id=tt,ke>1&&ye%ke!=tt%ke){x($);continue}}else if(!qe.isConnected)continue;$.e=B;let Xt=($.s?qe.textContent:qe.nodeValue)??"";A+=(w?"\0":"")+(Q<0?Xt.replace(/\S/g,"*"):Xt),S[w++]=$.id}U[j]=ae}for(let j=0;j<U.length;j++)U[j]&&(v[j]=U[j]);if(!w)return;let H=w==S.length?S:S.slice(0,w);c.postMessage([2,H,A,Date.now(),d,g()],[H.buffer]),p.push(d),d=[],u=1},X=()=>{m||(V(),l())},se="",re=-1,we=0,Ce=0,Me=0,be=0,M=-1,O,E=navigator,N=()=>{let S=e.m(),w=S.ctx.app??{};return{url:location.href,ref:o.referrer,ua:E.userAgent,vw:s.innerWidth,vh:s.innerHeight,lang:E.language,release:t.release,env:t.environment,platform:e.platform,user:S.user,app_ver:t.appVersion??w.version,device:w.device,os_ver:w.os,wv_ver:w.webview,...e.clock?.(e.sess().st)}},q=S=>{if(Me)return;if(!e.en())return wt();if(be)return;if(e.idle()){m||$r();return}if(m&&zt(),l(),!u)return;u=0;let w=e.sess(),A=se&&w.id!=se,U=A?re+1:(se=w.id,e.seq()),B=e.c.ws_disc,H=B>=Ce?B-Ce:B;Ce=B;let j=e.m(),Z=j.fields_version??0,ae=t.appVersion??j.ctx.app?.version,$=!we||Z!==M||ae!==O?{user:j.user??null,custom_fields:j.custom_fields??{},tags:j.tags,app_ver:ae}:void 0,Q={sid:se,seq:U,ws_disc:H,ie:e.ie(),fields:$,...we?{}:{init:N()}};S===2?fe(Q):(c.postMessage([3,Q,t.redact,!!S]),oe.push([Q,p])>4&&oe.shift()),p=[],M=Z,O=ae,re=U,we=1,A&&(se=w.id,re=-1,we=0,De.takeFullSnapshot(!0))},pe="rp_tail",oe=[],T=[],de=0,L=()=>{try{let S=T.map(w=>w[1]);de&&S.unshift(`${de}`),S.length?sessionStorage.setItem(pe,S.join("")):sessionStorage.removeItem(pe)}catch{}},ie;try{let S=indexedDB.open("replayd",1);S.onupgradeneeded=()=>{for(let w of["q","e"])S.result.createObjectStore(w,{autoIncrement:!0})},S.onsuccess=()=>ie=S.result}catch{}let fe=S=>{c.postMessage([5,1]);let w=6e4;for(let[B,H]of S?[...oe,[S,p]]:oe){let j=Wr(e.rd);for(let Te of H)for(let ke of Te)j.add(ke);if(!j.n())continue;let[Z,ae]=j.take(B,0),$=`${B.sid}:${B.seq}`,Q=Br(Z,Ur(new TextEncoder().encode(ae)));if(T.push([$,`${Z}\0${ae}`]),Q.length<w)w-=Q.length,e.fetch(e.url("replay"),{method:"POST",body:Q,keepalive:!0,credentials:"omit",headers:{"Content-Type":"text/plain"}}).catch(()=>{});else try{let Te=ie.transaction("q","readwrite");Te.objectStore("q").add({t:Date.now(),b:Q,s:$}),Te.commit?.()}catch{}}oe=[];let A=T.at(-1)?.[1].length??0,U=T.length-1;for(;U>0&&(A+=T[U-1][1].length)<=1e6;)U--;U>0&&(de+=U,T=T.slice(U)),L()},ue=()=>{I.away(),V(),q(2),oe.length&&!Me&&fe(),be=1},z=()=>{let S=0,w=0;T=[];try{for(let A of sessionStorage.getItem(pe)?.split("")??[]){let U=A.indexOf("\0");if(U<0)w=S+=+A||0;else{let B=A.slice(0,U),H=JSON.parse(B);T.push([`${H.sid}:${H.seq}`,A]),c.postMessage([6,B,A.slice(U+1),S]),S=0}}}catch{}de=0,w&&L()},je=S=>{oe=oe.filter(([A])=>`${A.sid}:${A.seq}`!=S);let w=T.length;T=T.filter(A=>A[0]!=S),T.length<w&&L()},qr=S=>S.persisted&&(be=0,z(),bt()),$r=()=>{m=1,d=[],p=[],u=0,c.postMessage([5])},zt=()=>{m=0,se=e.sess().id,re=-1,we=0,De.takeFullSnapshot(!0)},yt=()=>m&&!be&&!e.idle()&&zt(),jt=()=>{I.away(),X(),q(!0)},Gr=()=>o.visibilityState=="hidden"&&jt(),bt=()=>c.postMessage([4]),Le=r.canvas,et=new Set,Vr=`.rr-block,${r.blockSelector??"[data-rp-block]"}`,qt=Le.enabled&&Le.fps>0&&typeof OffscreenCanvas=="function"&&typeof createImageBitmap=="function",$t=()=>{if(m||be||Me||o.visibilityState=="hidden")return;let S=Date.now(),w=[],A=(U,B)=>{for(let H of U.querySelectorAll(Le.selector))H.tagName=="CANVAS"&&w.push(H);if(B<3)for(let H of U.querySelectorAll("iframe"))try{let j=H.contentDocument;j&&A(j,B+1)}catch{}};A(o,0);for(let U of w){let B=a.getId(U);B<1||et.has(B)||!U.width||!U.height||U.closest(Vr)||(et.add(B),createImageBitmap(U).then(H=>c.postMessage([7,B,H,S,Le.maxWidth,Le.quality],[H]),()=>et.delete(B)))}},Gt=[[s,"pagehide",ue],[s,"pageshow",qr],[o,"visibilitychange",Gr],[s,"online",bt],[s,"replayd:resume",bt],[s,"replayd:flush",jt],[s,"pointerdown",yt],[s,"keydown",yt],[s,"scroll",yt],[s,"click",I.click]],Vt=[setInterval(X,500),setInterval(q,5e3)],St=qt?setInterval($t,1e3/Le.fps/(E.hardwareConcurrency<=4?.5:1)):void 0;St&&Vt.push(St);let wt=()=>{Me=1,I.stop();for(let S of Vt)clearInterval(S);De.setMutationHook(null),e.sink(null),e.onError(()=>{});for(let[S,w,A]of Gt)S.removeEventListener(w,A,!0);try{Jr?.()}catch{}c.terminate()};c.postMessage([0,new URL(e.url("replay"),location.href).href,t.redact,(t.websocket.channelOf??"centrifugo-json")=="centrifugo-json"?1:0,t.websocket.sample.perChannelPerSec,e.platform!="web"||!!t.offlineQueue]),z(),c.onmessage=S=>{let w=S.data;w[0]==2?(et.delete(w[1]),w[2]&&clearInterval(St)):w[0]==3?je(w[1]):w[0]?wt():q()},c.onerror=wt;for(let[S,w,A]of Gt)S.addEventListener(w,A,!0);e.onError(()=>q()),De.setMutationHook(ve);let Jr=De({emit:S=>{if(S.type==2){_=new WeakMap,R++;for(let w of v)for(let A of w??[])A.q=!1;v=[],D=0,qt&&setTimeout($t,50)}b(S)},checkoutEveryNms:6e5,sampling:{mousemove:50,mouseInteraction:!0,scroll:150,media:800,input:"last"},blockSelector:r.blockSelector??"[data-rp-block]",maskTextSelector:r.maskAllText?"*":r.maskSelector??"[data-rp-mask]",maskAllInputs:!!r.maskAllInputs,maskInputOptions:{password:!0},recordCanvas:!1,collectFonts:!1,inlineImages:!1,inlineStylesheet:!0,slimDOMOptions:"all",recordCrossOriginIframes:!1}),Jt=performance.getEntriesByType?.("navigation")[0];k({type:"nav",ts:Math.round(performance.timeOrigin),data:{to:Jt?.name||location.href,load:Jt?.type||"navigate"}});for(let S of e.drain())k(S);e.sink(k)}export{xs as startReplay};
|
|
78
|
+
`,Sr=typeof self<"u"&&self.Blob&&new Blob([Gr],{type:"text/javascript;charset=utf-8"});function Ns(e){let t;try{if(t=Sr&&(self.URL||self.webkitURL).createObjectURL(Sr),!t)throw"";let r=new Worker(t,{name:e?.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Gr),{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var qt=class{constructor(t){y(this,"pendingCanvasMutations",new Map),y(this,"rafStamps",{latestId:0,invokeId:null}),y(this,"mirror"),y(this,"mutationCb"),y(this,"resetObservers"),y(this,"frozen",!1),y(this,"locked",!1),y(this,"processMutation",(i,d)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(i)||this.pendingCanvasMutations.set(i,[]),this.pendingCanvasMutations.get(i).push(d)});let{sampling:r="all",win:n,blockClass:s,blockSelector:o,recordCanvas:a,dataURLOptions:c}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,a&&r==="all"&&this.initCanvasMutationObserver(n,s,o),a&&typeof r=="number"&&this.initCanvasFPSObserver(r,n,s,o,{dataURLOptions:c})}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,s,o){let a=yr(r,n,s,!0),c=new Map,i=new Ns;i.onmessage=m=>{let{id:l}=m.data;if(c.set(l,!1),!("base64"in m.data))return;let{base64:b,type:E,width:k,height:g}=m.data;this.mutationCb({id:l,type:ze["2D"],commands:[{property:"clearRect",args:[0,0,k,g]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:b}],type:E}]},0,0]}]})};let d=1e3/t,u=0,f,h=()=>{let m=[];return r.document.querySelectorAll("canvas").forEach(l=>{de(l,n,s,!0)||m.push(l)}),m},p=m=>{if(u&&m-u<d){f=requestAnimationFrame(p);return}u=m,h().forEach(async l=>{var b;let E=this.mirror.getId(l);if(c.get(E)||l.width===0||l.height===0)return;if(c.set(E,!0),["webgl","webgl2"].includes(l.__context)){let g=l.getContext(l.__context);((b=g?.getContextAttributes())==null?void 0:b.preserveDrawingBuffer)===!1&&g.clear(g.COLOR_BUFFER_BIT)}let k=await createImageBitmap(l);i.postMessage({id:E,bitmap:k,width:l.width,height:l.height,dataURLOptions:o.dataURLOptions},[k])}),f=requestAnimationFrame(p)};f=requestAnimationFrame(p),this.resetObservers=()=>{a(),cancelAnimationFrame(f)}}initCanvasMutationObserver(t,r,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let s=yr(t,r,n,!1),o=Rs(this.processMutation.bind(this),t,r,n),a=Os(this.processMutation.bind(this),t,r,n);this.resetObservers=()=>{s(),o(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{let n=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(t);if(!n||r===-1)return;let s=n.map(a=>{let{type:c,...i}=a;return i}),{type:o}=n[0];this.mutationCb({id:r,type:o,commands:s}),this.pendingCanvasMutations.delete(t)}},$t=class{constructor(t){y(this,"trackedLinkElements",new WeakSet),y(this,"mutationCb"),y(this,"adoptedStyleSheetCb"),y(this,"styleMirror",new Ft),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;let n={id:r,styleIds:[]},s=[];for(let o of t){let a;this.styleMirror.has(o)?a=this.styleMirror.getId(o):(a=this.styleMirror.add(o),s.push({styleId:a,rules:Array.from(o.rules||CSSRule,(c,i)=>({rule:Mr(c,o.href),index:i}))})),n.styleIds.push(a)}s.length>0&&(n.styles=s),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}},Gt=class{constructor(){y(this,"nodeMap",new WeakMap),y(this,"active",!1)}inOtherBuffer(t,r){let n=this.nodeMap.get(t);return n&&Array.from(n).some(s=>s!==r)}add(t,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}},K,ct,Ie,et=!1;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=((or=e.contentWindow)==null?void 0:or.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var ye=xn();function Ee(e={}){let{emit:t,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:s="rr-block",blockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskTextClass:i="rr-mask",maskTextSelector:d=null,inlineStylesheet:u=!0,maskAllInputs:f,maskInputOptions:h,slimDOMOptions:p,maskInputFn:m,maskTextFn:l,hooks:b,packFn:E,sampling:k={},dataURLOptions:g={},mousemoveWait:w,recordDOM:N=!0,recordCanvas:_=!1,recordCrossOriginIframes:j=!1,recordAfter:x=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:V=!1,collectFonts:re=!1,inlineImages:Z=!1,plugins:oe,keepIframeSrcFn:L=()=>!1,ignoreCSSAttributes:be=new Set([]),errorHandler:pe}=e;ls(pe);let Y=j?window.parent===window:!0,ne=!1;if(!Y)try{window.parent.document&&(ne=!1)}catch{ne=!0}if(Y&&!t)throw new Error("emit function is required");if(!Y&&!ne)return()=>{};w!==void 0&&k.mousemove===void 0&&(k.mousemove=w),ye.reset();let me=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}:h!==void 0?h:{password:!0},J=xr(p);ss();let Se,fe=0,ve=O=>{for(let H of oe||[])H.eventProcessor&&(O=H.eventProcessor(O));return E&&!ne&&(O=E(O)),O};K=(O,H)=>{let D=O;if(D.timestamp=Ze(),D.type!==F.FullSnapshot&&!(D.type===F.IncrementalSnapshot&&D.data.source===W.Mutation)){Ie.unfreeze();for(let se of He)if(se.isFrozen())se.unfreeze();else break}if(Y)t?.(ve(D),H);else if(ne){let se={type:"rrweb",event:ve(D),origin:window.location.origin,isCheckout:H};window.parent.postMessage(se,"*")}if(D.type===F.FullSnapshot)Se=D,fe=0;else if(D.type===F.IncrementalSnapshot){if(D.data.source===W.Mutation&&D.data.isAttachIframe)return;fe++;let se=n&&fe>=n,ce=r&&D.timestamp-Se.timestamp>r;(se||ce)&&ct(!0)}};let ge=O=>{K({type:F.IncrementalSnapshot,data:{source:W.Mutation,...O}})},we=O=>K({type:F.IncrementalSnapshot,data:{source:W.Scroll,...O}}),Oe=O=>K({type:F.IncrementalSnapshot,data:{source:W.CanvasMutation,...O}}),De=O=>K({type:F.IncrementalSnapshot,data:{source:W.AdoptedStyleSheet,...O}}),C=new $t({mutationCb:ge,adoptedStyleSheetCb:De}),R=new zt({mirror:ye,mutationCb:ge,stylesheetManager:C,recordCrossOriginIframes:j,wrappedEmit:K});for(let O of oe||[])O.getMirror&&O.getMirror({nodeMirror:ye,crossOriginIframeMirror:R.crossOriginIframeMirror,crossOriginIframeStyleMirror:R.crossOriginIframeStyleMirror});let I=new Gt;Ie=new qt({recordCanvas:_,mutationCb:Oe,win:window,blockClass:s,blockSelector:o,mirror:ye,sampling:k.canvas,dataURLOptions:g});let T=new jt({mutationCb:ge,scrollCb:we,bypassOptions:{blockClass:s,blockSelector:o,maskTextClass:i,maskTextSelector:d,inlineStylesheet:u,maskInputOptions:me,dataURLOptions:g,maskTextFn:l,maskInputFn:m,recordCanvas:_,inlineImages:Z,sampling:k,slimDOMOptions:J,iframeManager:R,stylesheetManager:C,canvasManager:Ie,keepIframeSrcFn:L,processedNodeManager:I},mirror:ye});ct=(O=!1)=>{if(!N)return;K({type:F.Meta,data:{href:window.location.href,width:Lr(),height:Dr()}},O),C.reset(),T.init(),Ie.lock(),He.forEach(D=>D.lock());let H=rs(document,{mirror:ye,blockClass:s,blockSelector:o,maskTextClass:i,maskTextSelector:d,inlineStylesheet:u,maskAllInputs:me,maskTextFn:l,maskInputFn:m,slimDOM:J,dataURLOptions:g,recordCanvas:_,inlineImages:Z,onSerialize:D=>{D.nodeType===1&&(Pr(D,ye)&&R.addIframe(D),Fr(D,ye)&&C.trackLinkElement(D),Pt(D)&&T.addShadowRoot(M.shadowRoot(D),document))},onIframeLoad:(D,se)=>{R.attachIframe(D,se),T.observeAttachShadow(D)},onStylesheetLoad:(D,se)=>{C.attachLinkElement(D,se)},keepIframeSrcFn:L});if(!H)return console.warn("Failed to snapshot the document");K({type:F.FullSnapshot,data:{node:H,initialOffset:Tr(window)}},O),Ie.unlock(),He.forEach(D=>D.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&C.adoptStyleSheets(document.adoptedStyleSheets,ye.getId(document))};try{let O=[],H=ce=>{var ie;return U(Cs)({mutationCb:ge,mousemoveCb:($,Le)=>K({type:F.IncrementalSnapshot,data:{source:Le,positions:$}}),mouseInteractionCb:$=>K({type:F.IncrementalSnapshot,data:{source:W.MouseInteraction,...$}}),scrollCb:we,viewportResizeCb:$=>K({type:F.IncrementalSnapshot,data:{source:W.ViewportResize,...$}}),inputCb:$=>K({type:F.IncrementalSnapshot,data:{source:W.Input,...$}}),mediaInteractionCb:$=>K({type:F.IncrementalSnapshot,data:{source:W.MediaInteraction,...$}}),styleSheetRuleCb:$=>K({type:F.IncrementalSnapshot,data:{source:W.StyleSheetRule,...$}}),styleDeclarationCb:$=>K({type:F.IncrementalSnapshot,data:{source:W.StyleDeclaration,...$}}),canvasMutationCb:Oe,fontCb:$=>K({type:F.IncrementalSnapshot,data:{source:W.Font,...$}}),selectionCb:$=>{K({type:F.IncrementalSnapshot,data:{source:W.Selection,...$}})},customElementCb:$=>{K({type:F.IncrementalSnapshot,data:{source:W.CustomElement,...$}})},blockClass:s,ignoreClass:a,ignoreSelector:c,maskTextClass:i,maskTextSelector:d,maskInputOptions:me,inlineStylesheet:u,sampling:k,recordDOM:N,recordCanvas:_,inlineImages:Z,userTriggeredOnInput:V,collectFonts:re,doc:ce,maskInputFn:m,maskTextFn:l,keepIframeSrcFn:L,blockSelector:o,slimDOMOptions:J,dataURLOptions:g,mirror:ye,iframeManager:R,stylesheetManager:C,shadowDomManager:T,processedNodeManager:I,canvasManager:Ie,ignoreCSSAttributes:be,plugins:((ie=oe?.filter($=>$.observer))==null?void 0:ie.map($=>({observer:$.observer,options:$.options,callback:Le=>K({type:F.Plugin,data:{plugin:$.name,payload:Le}})})))||[]},b)},D=new Map;R.addLoadListener(ce=>{try{let ie=ce.contentDocument;if(D.has(ie))return;D.set(ie,H(ie))}catch(ie){console.warn(ie)}}),R.addUnloadListener(ce=>{let ie=D.get(ce);ie&&(D.delete(ce),ie(),T.removeShadowRootsIn(ce),ye.removeNodeFromMap(ce))});let se=()=>{ct(),O.push(H(document)),et=!0};return["interactive","complete"].includes(document.readyState)?se():(O.push(le("DOMContentLoaded",()=>{K({type:F.DomContentLoaded,data:{}}),x==="DOMContentLoaded"&&se()})),O.push(le("load",()=>{K({type:F.Load,data:{}}),x==="load"&&se()},window))),()=>{[...O,...D.values()].forEach(ce=>{try{ce()}catch(ie){String(ie).toLowerCase().includes("cross-origin")||console.warn(ie)}}),D.clear(),R.destroy(),I.destroy(),T.reset(),Ie.reset(),et=!1,cs()}}catch(O){console.warn(O)}}Ee.addCustomEvent=(e,t)=>{if(!et)throw new Error("please add custom event after start recording");K({type:F.Custom,data:{tag:e,payload:t}})};Ee.addAnnotation=e=>{if(!et)throw new Error("please add annotation after recording started");K({type:F.Annotation,data:e})};Ee.freezePage=()=>{Ie.freeze(),He.forEach(e=>e.freeze())};Ee.takeFullSnapshot=e=>{if(!et)throw new Error("please take full snapshot after start recording");ct(e)};Ee.mirror=ye;Ee.setMutationHook=e=>{Ht=e};var Vr=(e,t)=>{let r=[],n=0,s=0,o=0,a=0,c=0,i=0,d=0,u=0,f=[],h={},p=[],m,l=[],b=[],E=w=>b.length<30&&!b.includes(w)&&b.push(w),k=w=>typeof w=="string"&&(E("u:"+w),f.length<10&&!f.includes(w)&&f.push(w)),g=()=>{r=[],n=s=a=c=i=d=u=0,f=[],h={},p=[],m=void 0,l=[],b=[]};return{raw:()=>n,n:()=>s,reset:g,add(w){let N=w.data,_=w.timestamp;if(w.type==4&&N.href)k(N.href=e.u(N.href));else if(w.type==3&&N.source==2&&N.type==2)c++;else if(w.type==5){let x=N.payload;if(N.tag=="error")x.level=="warning"?d++:i++;else if(N.tag=="sig")h[x.k]=(h[x.k]??0)+1,x.k=="vitals"&&p.push(x),x.k=="lag"&&(u=Math.max(u,x.max)),x.k=="mem"&&(m={...m,...x,used:Math.max(m?.used??0,x.used??0)});else if(N.tag=="fields")x.value=e.j(x.value);else if(N.tag=="nav"&&typeof x.to=="string")k(x.to=e.u(x.to));else if(N.tag=="network"){for(let V of["reqBody","resBody"])typeof x[V]=="string"&&(x[V]=e.t(x[V]));(x.status>=400||x.status===0)&&l.length<10&&!l.includes(x.status)&&l.push(x.status)}else if(N.tag=="breadcrumb")E(("c:"+x.cat+":"+x.msg).slice(0,100));else if(N.tag=="ws"&&typeof x.raw=="string"){if(t&&x.dir=="in"){let V=t(x.raw,_,x.id);if(V==null)return;x.raw=V}x.raw=e.t(x.raw)}}s++||(o=_),_>a&&(a=_);let j=JSON.stringify(w);n+=j.length,r.push(j)},take(w,N){w.init&&(w.init.url=e.u(w.init.url),w.init.ref=e.u(w.init.ref),w.init.user=e.j(w.init.user)),w.fields&&(w.fields.user=e.j(w.fields.user),w.fields.custom_fields=e.j(w.fields.custom_fields),w.fields.tags=e.j(w.fields.tags),new TextEncoder().encode(JSON.stringify(w.fields.tags)).length>8192&&delete w.fields.tags),N&&r.unshift(JSON.stringify({type:5,timestamp:o,data:{tag:"gap",payload:{reason:"dropped",segments:N}}}));let _=JSON.stringify({canvas_bytes:0,...w,t0:o,t1:a,enc:"gzip",n:s,urls:f,clicks:c,errs:i,warns:d,sig:h,vitals:p,mem:m,st:l,tr:b,lag:u||void 0,has_error:i>0,gap:N>0}),j=`[${r.join(",")}]`;return g(),[_,j]}}},St,Jr=e=>{if(!St){St=new Int32Array(256);for(let i=0;i<256;i++){let d=i;for(let u=0;u<8;u++)d=d&1?3988292384^d>>>1:d>>>1;St[i]=d}}let t=e.length,r=Math.ceil(t/65535)||1,n=new Uint8Array(18+t+r*5),s=new DataView(n.buffer);n.set([31,139,8,0,0,0,0,0,0,255]);let o=10,a=0,c=-1;for(let i=0;i<r;i++){let d=Math.min(65535,t-a);n[o]=+(i==r-1),s.setUint16(o+1,d,!0),s.setUint16(o+3,~d,!0),n.set(e.subarray(a,a+=d),o+=5),o+=d}for(let i=0;i<t;i++)c=St[(c^e[i])&255]^c>>>8;return s.setUint32(o,~c,!0),s.setUint32(o+4,t,!0),n},Xr=(e,t)=>{let r=new TextEncoder().encode(e),n=new Uint8Array(8+r.length+t.length),s=new DataView(n.buffer);return s.setUint16(0,r.length,!0),n.set(r,2),s.setUint32(2+r.length,t.length,!0),n.set(t,6+r.length),n};var je=(e,t,r)=>{if(!PerformanceObserver.supportedEntryTypes?.includes(e))return;let n=new PerformanceObserver(s=>{try{for(let o of s.getEntries())t(o)}catch{}});return n.observe({type:e,buffered:!0,...r}),n},xs="a,button,summary,[role=button],[role=link],[role=tab],[role=menuitem],[role=checkbox],[role=switch],input[type=submit],input[type=button],input[type=checkbox],input[type=radio]",Ts="a[target=_blank],a[download],input[type=file],[data-rp-no-dead]",Yr=e=>{let t=e.tagName.toLowerCase()+(e.id?"#"+e.id:"");for(let r of[...e.classList].slice(0,3))t+="."+r;return t},Kr=(e,t,r)=>{let n=e.o().signals??{},s=document,o=null,a=0,c=0,i=0,d=new Set,u=C=>{let R=C.target,I=Date.now();if(!R?.closest)return;let T=R.closest(xs);if(n.rage!==!1){let O=T??R;O===o&&I-a<1e3?++c==3&&t("rage",{el:Yr(O),id:r(O),n:c},I):(o=O,a=I,c=1)}if(n.dead!==!1&&T&&d.size<32&&!T.closest(Ts)&&!T.disabled){let O=setTimeout(()=>{d.delete(O),i<I&&T.isConnected&&t("dead",{el:Yr(T),id:r(T)},I)},3e3);d.add(O)}};n.dead!==!1&&(e.go.f=()=>d.size&&(i=Date.now()));let f=[],h=C=>{if(C.duration<200)return;let R={ms:Math.round(C.duration)},I;for(let T of C.scripts??[])(!I||T.duration>I.duration)&&(I=T);I&&(I.sourceURL&&(R.src=e.rd.u(I.sourceURL)),I.invoker&&(R.by=e.rd.u(I.invoker).slice(0,100))),t("freeze",R,Math.round(performance.timeOrigin+C.startTime))},p="[Filtered]",m=/eyJ[\w-]{8,}\.[\w-]{8,}\.[\w-]*|[\w+/=-]{32,}/g,l=Storage.prototype,b=[l.setItem,l.removeItem,l.clear],E=0,k=0,g=0,w=n.storage!==!1,N=[],_=(C,R,I,T)=>{if(!w||I?.startsWith("rp_"))return;let O=Date.now(),H={area:C,op:R};if(O-E>1e3&&(E=O,k=0),++k>20)return void g++;I!=null&&(H.key=I.slice(0,128)),T!=null&&(H.v=e.rd.j({[I]:0})[I]==p?p:e.rd.t(T.slice(0,256)).replace(m,p)),g&&(H.skipped=g),g=0,t("storage",H,O)},j=C=>{try{return C===localStorage?"local":"session"}catch{return"session"}},x=Object.getOwnPropertyDescriptor(s,"cookie"),V=x??Object.getOwnPropertyDescriptor(Document.prototype,"cookie"),re;if(w){let C=(R,I)=>function(...T){R.apply(this,T);try{I(this,T)}catch{}};N=[l.setItem=C(b[0],(R,[I,T])=>_(j(R),"set",String(I),String(T))),l.removeItem=C(b[1],(R,[I])=>_(j(R),"remove",String(I))),l.clear=C(b[2],R=>_(j(R),"clear"))],V?.set&&(!x||x.configurable)&&Object.defineProperty(s,"cookie",re={...V,set(R){V.set.call(this,R);try{let I=String(R),T=/expires=([^;]+)/i.exec(I);_("cookie",/max-age=(0|-)/i.test(I)||T&&Date.parse(T[1])<Date.now()?"remove":"set",I.split("=")[0].trim())}catch{}}})}let Z=0,oe=0,L=0,be=0,pe=0,Y=-1e4,ne=0,me="",J=new Map;try{n.freeze!==!1&&f.push(je("long-animation-frame",h)??je("longtask",h)),n.vitals!==!1&&f.push(je("largest-contentful-paint",C=>Z=C.startTime),je("paint",C=>C.name=="first-contentful-paint"&&(oe=C.startTime)),je("layout-shift",C=>{if(C.hadRecentInput)return;let R=C.startTime;(R-Y>1e3||R-pe>5e3)&&(pe=R,be=0),Y=R,L=Math.max(L,be+=C.value)}),je("event",C=>{if(C.interactionId&&(J.set(C.interactionId,Math.max(J.get(C.interactionId)??0,C.duration)),J.size>200)){let R=[...J].sort((I,T)=>T[1]-I[1]).slice(0,10);ne+=J.size-10,J.clear();for(let[I,T]of R)J.set(I,T)}},{durationThreshold:40}))}catch{}let Se=navigator,fe=C=>Math.round(C/1e5)/10,ve=1,ge=()=>{if(s.visibilityState=="hidden")return;let C=performance.memory,R={};C&&Object.assign(R,{used:fe(C.usedJSHeapSize),total:fe(C.totalJSHeapSize),limit:fe(C.jsHeapSizeLimit)}),ve&&Object.assign(R,{dm:Se.deviceMemory,cores:Se.hardwareConcurrency}),ve=0,(R.used||R.dm)&&t("mem",R,Date.now())},we=n.memory!==!1?[setTimeout(ge),setInterval(ge,3e4)]:[],Oe=location.href,De=()=>{let C=performance.getEntriesByType?.("navigation")[0];if(n.vitals===!1||!(Z||oe||C))return;let R=[...J.values()].sort((H,D)=>D-H),I=Math.round,T={lcp:I(Z),fcp:I(oe),cls:Math.round(L*1e4)/1e4,inp:I(R[Math.min(9,(R.length+ne)/50|0)]??0),url:e.rd.u(C?.name||Oe)};C&&Object.assign(T,{ttfb:I(C.responseStart),dcl:I(C.domContentLoadedEventEnd),load:I(C.loadEventEnd),nav:C.type});let O=JSON.stringify(T);O!=me&&t("vitals",{...T,page:I(performance.timeOrigin)},Date.now()),me=O};return{stop(){if(f.forEach(C=>C?.disconnect()),we.forEach(clearInterval),d.forEach(clearTimeout),d.clear(),e.go.f=null,w){w=!1,[l.setItem,l.removeItem,l.clear].every((R,I)=>R===N[I])&&([l.setItem,l.removeItem,l.clear]=b);let C=re&&Object.getOwnPropertyDescriptor(s,"cookie");C&&C.get===re.get&&C.set===re.set&&(x?Object.defineProperty(s,"cookie",x):delete s.cookie)}},click:u,see(C){if(!d.size)return;let R=C.data,I=R?.source,T=R?.tag;C.type==2||C.type==4||C.type==3&&I!=1&&I!=2&&I!=6?i=Date.now():C.type==5&&T!="sig"&&T!="console"&&T!="breadcrumb"&&T!="fields"&&T!="ws"&&(i=Math.max(i,T=="network"&&typeof R?.payload?.start=="number"?R.payload.start:Date.now()))},away(){i=Date.now(),De()}}};var Te=Ee,Zr=1e4,Ds="[data-rp-throttle]";function Hs(e){try{As(e)}catch{}}var Ls=()=>{let e=new URL("./worker.js",import.meta.url).href;try{return new Worker(e)}catch{return new Worker(URL.createObjectURL(new Blob([`importScripts(${JSON.stringify(e)})`],{type:"text/javascript"})))}};function As(e){let t=e.o(),r=t.replay,n=t.redact,s=window,o=document,a=Te.mirror,c=Ls(),i=`.rr-mask,${r.maskSelector??"[data-rp-mask]"}`,d=[],u=0,f=0,h=0,p=[],m=()=>{let S=n.headers.length+n.bodyKeys.length+n.queryParams.length;return S!=f?(f=S,n):0},l=()=>{d.length&&(c.postMessage([1,d,m()]),p.push(d),d=[],u=1)},b=S=>{h||(k.see(S),d.push(S)>=300&&l())},E=S=>b({type:5,timestamp:S.ts,data:{tag:S.type,payload:S.data}}),k=Kr(e,(S,v,A)=>E({type:"sig",ts:A,data:{k:S,...v}}),S=>a.getId(S)),g={n:o,id:-1,i:0,s:!1,q:!1,e:0},w=[],N=0,_=new WeakMap,j=0,x=Symbol(),V=S=>{let v=S[x];return v&&v.g==j?v:void 0},re=(S,v)=>S[x]=v==g?{...g,g:j}:Object.assign(v,{g:j}),Z=S=>{let v=_.get(S);if(v===void 0){let A=S.closest?.(Ds);v=A&&+A.getAttribute("data-rp-throttle")||0,v&&(r.maskAllText||S.closest(i))&&(v=-v),_.set(S,v)}return v},oe=S=>{for(let v=0;v<S.length;v++)if(S[v].nodeType!=3)return!1;return!0},L=S=>{if(!S.q){S.q=!0,N++;let v=(S.i<0?-S.i:S.i)/500|0,A=S.id<0||v<2?0:S.id%v;(w[A]??=[]).push(S)}},be=S=>{let v=null,A=0;for(let P=0;P<S.length;P++){let B=S[P],z=B.target,q=!1;if(B.type=="characterData"){let Q=V(z);if(!Q){let ae=z.parentNode,G=ae?Z(ae):0;Q=re(z,G?{n:z,id:-2,i:G,s:!1,q:!1,e:0}:g)}Q.i&&(L(Q),q=!0)}else if(B.type=="childList"){let Q=V(z),ae=z.firstChild;if(Q?.s)ae===z.lastChild&&(!ae||ae.nodeType==3)&&(L(Q),q=!0);else if(z.nodeType==1&&Z(z)&&ae===z.lastChild&&oe(B.addedNodes)&&oe(B.removedNodes)){if(!Q){let G=B.removedNodes[0],ee=G?a.getId(G):-1;ee>0&&(Q=re(z,{n:z,id:ee,i:Z(z),s:!0,q:!1,e:0}))}Q&&(L(Q),q=!0)}if(!q&&A<=Zr){let G=B.addedNodes;for(let ee=0;ee<G.length;ee++)A+=1+(G[ee].getElementsByTagName?.("*").length??0)}}q?v??=S.slice(0,P):v&&v.push(B)}return A>Zr?(Te.takeFullSnapshot(!0),[]):v??S},pe=0,Y=()=>{if(pe++,!N)return;let S=new Int32Array(N),v=0,A="",P=[],B=Date.now();for(let q=0;q<w.length;q++){let Q=w[q];if(!Q?.length)continue;let ae=[];for(let G of Q){let ee=G.i,Ne=ee<0?-ee:ee,Me=Ne/500|0;if(Me>1&&G.id>=0&&pe%Me!=G.id%Me||B-G.e<Ne-50){ae.push(G);continue}G.q=!1,N--;let Ge=G.n;if(G.id<0){let st=a.getId(Ge);if(st<0||a.getNode(st)!==Ge)continue;if(G.id=st,Me>1&&pe%Me!=st%Me){L(G);continue}}else if(!Ge.isConnected)continue;G.e=B;let sr=(G.s?Ge.textContent:Ge.nodeValue)??"";A+=(v?"\0":"")+(ee<0?sr.replace(/\S/g,"*"):sr),S[v++]=G.id}P[q]=ae}for(let q=0;q<P.length;q++)P[q]&&(w[q]=P[q]);if(!v)return;let z=v==S.length?S:S.slice(0,v);c.postMessage([2,z,A,Date.now(),d,m()],[z.buffer]),p.push(d),d=[],u=1},ne=()=>{h||(Y(),l())},me=e.sess().smp!=1,J="",Se=-1,fe=0,ve=0,ge=0,we=0,Oe=-1,De,C=navigator,R=()=>{let S=e.m(),v=S.ctx.app??{};return{url:location.href,ref:o.referrer,ua:C.userAgent,vw:s.innerWidth,vh:s.innerHeight,lang:C.language,release:t.release,env:t.environment,platform:e.platform,user:S.user,app_ver:t.appVersion??v.version,device:v.device,os_ver:v.os,wv_ver:v.webview,dbg:+e.d(),...e.clock?.(e.sess().st)}},I=S=>{if(ge)return;if(!e.en()||me&&!e.d())return kt();if(we)return;if(e.idle()){h||tn();return}if(h&&Xt(),l(),!u)return;u=0;let v=e.sess(),A=J&&v.id!=J,P=A?Se+1:(J=v.id,e.seq()),B=e.c.ws_disc,z=B>=ve?B-ve:B;ve=B;let q=e.m(),Q=q.fields_version??0,ae=t.appVersion??q.ctx.app?.version,G=!fe||Q!==Oe||ae!==De?{user:q.user??null,custom_fields:q.custom_fields??{},tags:q.tags,app_ver:ae}:void 0,ee={sid:J,seq:P,ws_disc:z,ie:e.ie(),fields:G,...fe?{}:{init:R()}};S===2?ie(ee):(c.postMessage([3,ee,t.redact,!!S]),O.push([ee,p])>4&&O.shift()),p=[],Oe=Q,De=ae,Se=P,fe=1,A&&(J=v.id,Se=-1,fe=0,Te.takeFullSnapshot(!0))},T="rp_tail",O=[],H=[],D=0,se=()=>{try{let S=H.map(v=>v[1]);D&&S.unshift(`${D}`),S.length?sessionStorage.setItem(T,S.join("")):sessionStorage.removeItem(T)}catch{}},ce;try{let S=indexedDB.open("replayd",1);S.onupgradeneeded=()=>{for(let v of["q","e"])S.result.createObjectStore(v,{autoIncrement:!0})},S.onsuccess=()=>ce=S.result}catch{}let ie=S=>{c.postMessage([5,1]);let v=6e4;for(let[B,z]of S?[...O,[S,p]]:O){let q=Vr(e.rd);for(let Ne of z)for(let Me of Ne)q.add(Me);if(!q.n())continue;let[Q,ae]=q.take(B,0),G=`${B.sid}:${B.seq}`,ee=Xr(Q,Jr(new TextEncoder().encode(ae)));if(H.push([G,`${Q}\0${ae}`]),ee.length<v)v-=ee.length,e.fetch(e.url("replay"),{method:"POST",body:ee,keepalive:!0,credentials:"omit",headers:{"Content-Type":"text/plain"}}).catch(()=>{});else try{let Ne=ce.transaction("q","readwrite");Ne.objectStore("q").add({t:Date.now(),b:ee,s:G}),Ne.commit?.()}catch{}}O=[];let A=H.at(-1)?.[1].length??0,P=H.length-1;for(;P>0&&(A+=H[P-1][1].length)<=1e6;)P--;P>0&&(D+=P,H=H.slice(P)),se()},$=()=>{k.away(),Y(),I(2),O.length&&!ge&&ie(),we=1},Le=()=>{let S=0,v=0;H=[];try{for(let A of sessionStorage.getItem(T)?.split("")??[]){let P=A.indexOf("\0");if(P<0)v=S+=+A||0;else{let B=A.slice(0,P),z=JSON.parse(B);H.push([`${z.sid}:${z.seq}`,A]),c.postMessage([6,B,A.slice(P+1),S]),S=0}}}catch{}D=0,v&&se()},Qr=S=>{O=O.filter(([A])=>`${A.sid}:${A.seq}`!=S);let v=H.length;H=H.filter(A=>A[0]!=S),H.length<v&&se()},en=S=>S.persisted&&(we=0,Le(),vt()),rt=()=>c.postMessage([9,h||o.visibilityState=="hidden"?1:0]),tn=()=>{h=1,d=[],p=[],u=0,c.postMessage([5]),rt()},Xt=()=>{h=0,rt(),J=e.sess().id,Se=-1,fe=0,Te.takeFullSnapshot(!0)},wt=()=>h&&!we&&!e.idle()&&Xt(),Yt=()=>{k.away(),ne(),I(!0)},rn=()=>(rt(),o.visibilityState=="hidden"&&Yt()),vt=()=>c.postMessage([4]),Ae={enabled:!0,fps:.2,maxWidth:960,quality:.35,selector:"canvas",...r.canvas},qe=new Set,$e=[],nn=`.rr-block,${r.blockSelector??"[data-rp-block]"}`,Kt=Ae.enabled&&Ae.fps>0&&typeof OffscreenCanvas=="function"&&typeof createImageBitmap=="function",Ct=()=>{for(;qe.size-$e.length<2&&$e.length;){let[S,v,A]=$e.shift();createImageBitmap(v).then(P=>c.postMessage([7,S,P,A,Ae.maxWidth,Ae.quality],[P]),()=>(qe.delete(S),Ct()))}},Zt=()=>{if(h||we||ge||o.visibilityState=="hidden")return;let S=Date.now(),v=[],A=(P,B)=>{for(let z of P.querySelectorAll(Ae.selector))z.tagName=="CANVAS"&&v.push(z);if(B<3)for(let z of P.querySelectorAll("iframe"))try{let q=z.contentDocument;q&&A(q,B+1)}catch{}};A(o,0);for(let P of v){let B=a.getId(P);B<1||qe.has(B)||!P.width||!P.height||P.closest(nn)||(qe.add(B),$e.push([B,P,S]))}Ct()},Mt=[[s,"pagehide",$],[s,"pageshow",en],[o,"visibilitychange",rn],[s,"online",vt],[s,"replayd:resume",vt],[s,"replayd:flush",Yt],[s,"pointerdown",wt],[s,"keydown",wt],[s,"scroll",wt],[s,"click",k.click]],nt=C.connection,Qt=()=>{nt?.effectiveType&&(e.m().ctx.net=nt.effectiveType)};Qt(),nt?.addEventListener&&Mt.push([nt,"change",Qt]);let er=[setInterval(ne,500),setInterval(I,5e3)],It=Kt?setInterval(Zt,1e3/Ae.fps/(C.hardwareConcurrency<=4?.5:1)):void 0;It&&er.push(It);let kt=()=>{ge=1,k.stop();for(let S of er)clearInterval(S);Te.setMutationHook(null),e.sink(null),e.onError(()=>{});for(let[S,v,A]of Mt)S.removeEventListener(v,A,!0);try{sn?.()}catch{}c.terminate()},Rt={};try{Rt=JSON.parse(localStorage.getItem("rp_cfg"+e.url(""))).c.ws??{}}catch{}let Et=Number(Rt.staleMs??t.websocket.staleMs)||0,tr=String(Rt.lagField??t.websocket.lagField??""),rr=Et>0||tr?new URL("./wsx.js",import.meta.url).href:0;c.postMessage([0,new URL(e.url("replay"),location.href).href,t.redact,(t.websocket.channelOf??"centrifugo-json")=="centrifugo-json"?1:0,t.websocket.sample.perChannelPerSec,e.platform!="web"||!!t.offlineQueue,rr,Et>0?Math.min(6e5,Math.max(5e3,Et)):0,tr.slice(0,64),t.websocket.sample.maxFramesPerSec]),rr&&rt(),Le(),c.onmessage=S=>{let v=S.data;if(v[0]==2)qe.delete(v[1]),v[2]&&(clearInterval(It),$e.length=0),Ct();else if(v[0]==3)Qr(v[1]);else if(v[0]==8){v[2]&&(u=1);for(let[A,P,B]of v[1]){let z=A.replace(/\d{3,}|[0-9a-f]{8,}/gi,"{id}");e.w("warning","ws","StaleData",`Stale data on ${z}`,void 0,{ws:{channel:z,silent_ms:P,sampled:!!B}})}}else v[0]?kt():I()},c.onerror=kt;for(let[S,v,A]of Mt)S.addEventListener(v,A,!0);e.onError(()=>I()),Te.setMutationHook(be);let sn=Te({emit:S=>{if(S.type==2){_=new WeakMap,j++;for(let v of w)for(let A of v??[])A.q=!1;w=[],N=0,Kt&&setTimeout(Zt,50)}b(S)},checkoutEveryNms:6e5,sampling:{mousemove:50,mouseInteraction:!0,scroll:150,media:800,input:"last"},blockSelector:r.blockSelector??"[data-rp-block]",maskTextSelector:r.maskAllText?"*":r.maskSelector??"[data-rp-mask]",maskAllInputs:!!r.maskAllInputs,maskInputOptions:{password:!0},recordCanvas:!1,collectFonts:!1,inlineImages:!1,inlineStylesheet:!0,slimDOMOptions:"all",recordCrossOriginIframes:!1}),nr=performance.getEntriesByType?.("navigation")[0];E({type:"nav",ts:Math.round(performance.timeOrigin),data:{to:nr?.name||location.href,load:nr?.type||"navigate"}});for(let S of e.drain())E(S);e.sink(E)}export{Hs as startReplay};
|
|
79
79
|
//# sourceMappingURL=replay.js.map
|