@mcpjam/inspector 3.8.0 → 3.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{dead-clicks-autocapture-BTvoPsHr.js → dead-clicks-autocapture-CFcUq1il.js} +2 -2
- package/dist/client/assets/{exception-autocapture-CbZNLkrO.js → exception-autocapture-1geYDXGl.js} +2 -2
- package/dist/client/assets/{highlighted-body-OFNGDK62-waZXuFZ0.js → highlighted-body-OFNGDK62-zLNPg1k9.js} +2 -2
- package/dist/client/assets/{index-BBgBtcD7.js → index-Cie6k1zh.js} +254 -254
- package/dist/client/assets/{jszip.min-Bo9LSZ25.js → jszip.min-U1sbFv3l.js} +2 -2
- package/dist/client/assets/{posthog-recorder-DBHV7V7y.js → posthog-recorder-ajpd22PN.js} +2 -2
- package/dist/client/assets/{surveys-DMDr7cqK.js → surveys-zRw1Mhpa.js} +2 -2
- package/dist/client/assets/{web-vitals-Cc_UIaaC.js → web-vitals-BEgICNer.js} +2 -2
- package/dist/client/index.html +1 -1
- package/dist/server/{chunk-ZXGRD3M7.js → chunk-3FC5GVEK.js} +2 -2
- package/dist/server/harness-install-cli.js +1 -1
- package/dist/server/index.js +20 -20
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){try{var We=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};We.SENTRY_RELEASE={id:"3.8.0"};var je=new We.Error().stack;je&&(We._sentryDebugIds=We._sentryDebugIds||{},We._sentryDebugIds[je]="e06f55b6-f7d4-42cf-a9cd-0e5606fd8e60",We._sentryDebugIdIdentifier="sentry-dbid-e06f55b6-f7d4-42cf-a9cd-0e5606fd8e60")}catch{}})();(function(){function We(t,e,r,n,s,a,i){try{var o=t[a](i),u=o.value}catch(l){return void r(l)}o.done?e(u):Promise.resolve(u).then(n,s)}function je(t){return function(){var e=this,r=arguments;return new Promise((function(n,s){var a=t.apply(e,r);function i(u){We(a,n,s,i,o,"next",u)}function o(u){We(a,n,s,i,o,"throw",u)}i(void 0)}))}}function Y(){return Y=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Y.apply(null,arguments)}var On,ma=["type"],ga=Object.defineProperty,k=(t,e,r)=>((n,s,a)=>s in n?ga(n,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[s]=a)(t,typeof e!="symbol"?e+"":e,r),X=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(X||{}),Z=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(Z||{}),be=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(be||{}),Ge=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(Ge||{}),ct=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(ct||{}),ht=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(ht||{}),le=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(le||{}),Ln={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},Nn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},jt={};function Mr(t){if(jt[t])return jt[t];var e=(function(d){var c,m,h=(m=(c=globalThis?.Zone)==null?void 0:c.__symbol__)==null?void 0:m.call(c,d);return h&&globalThis[h]?globalThis[h]:void 0})(t)||globalThis[t],r=e.prototype,n=t in Ln?Ln[t]:void 0,s=!!(n&&n.every((d=>{var c,m;return!!((m=(c=Object.getOwnPropertyDescriptor(r,d))==null?void 0:c.get)!=null&&m.toString().includes("[native code]"))}))),a=t in Nn?Nn[t]:void 0,i=!!(a&&a.every((d=>{var c;return typeof r[d]=="function"&&((c=r[d])==null?void 0:c.toString().includes("[native code]"))})));if(s&&i)return jt[t]=e.prototype,e.prototype;var o=document.createElement("iframe");try{document.body.appendChild(o);var u=o.contentWindow;if(!u)return e.prototype;var l=u[t].prototype;return l?jt[t]=l:r}catch{return r}finally{o.parentNode&&document.body.removeChild(o)}}var Tr={};function pt(t,e,r){var n,s=t+"."+String(r);if(Tr[s])return Tr[s].call(e);var a=Mr(t),i=(n=Object.getOwnPropertyDescriptor(a,r))==null?void 0:n.get;return i?(Tr[s]=i,i.call(e)):e[r]}var Rr={};function Gt(t,e,r){var n=t+"."+String(r);if(Rr[n])return Rr[n].bind(e);var s=Mr(t)[r];return typeof s!="function"?e[r]:(Rr[n]=s,s.bind(e))}function Dn(){return Mr("MutationObserver").constructor}function Qe(t,e,r){try{if(!(e in t))return()=>{};var n=t[e],s=r(n);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:n}})),t[e]=s,()=>{t[e]=n}}catch{return()=>{}}}var U={childNodes:t=>pt("Node",t,"childNodes"),parentNode:t=>pt("Node",t,"parentNode"),parentElement:t=>pt("Node",t,"parentElement"),textContent:t=>pt("Node",t,"textContent"),contains:(t,e)=>Gt("Node",t,"contains")(e),getRootNode:t=>Gt("Node",t,"getRootNode")(),host:t=>t&&"host"in t?pt("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?pt("Element",t,"shadowRoot"):null,querySelector:(t,e)=>Gt("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>Gt("Element",t,"querySelectorAll")(e),mutationObserver:Dn,patch:Qe};function Er(t){return t.nodeType===t.ELEMENT_NODE}function Tt(t){var e=t&&"host"in t&&"mode"in t&&U.host(t)||null;return!!(e&&"shadowRoot"in e&&U.shadowRoot(e)===t)}function Rt(t){return{}.toString.call(t)==="[object ShadowRoot]"}function Vt(t){try{var e=t.rules||t.cssRules;if(!e)return null;var r=t.href;return!r&&t.ownerNode&&(r=t.ownerNode.baseURI),(n=Array.from(e,(s=>Fn(s,r))).join("")).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),n}catch{return null}var n}function Fn(t,e){var r;if((function(a){return"styleSheet"in a})(t)){var n;try{n=Vt(t.styleSheet)||(function(a){var{cssText:i}=a;if(3>i.split('"').length)return i;var o=["@import","url("+JSON.stringify(a.href)+")"];return a.layerName===""?o.push("layer"):a.layerName&&o.push("layer("+a.layerName+")"),a.supportsText&&o.push("supports("+a.supportsText+")"),a.media.length&&o.push(a.media.mediaText),o.join(" ")+";"})(t)}catch{n=t.cssText}try{if(n&&((r=t.styleSheet)!=null&&r.href))return Yt(n,t.styleSheet.href)}catch{}return n}var s=t.cssText;return(function(a){return"selectorText"in a})(t)&&t.selectorText.includes(":")&&(s=s.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),e?Yt(s,e):s}class An{constructor(){k(this,"idNodeMap",new Map),k(this,"nodeMetaMap",new WeakMap)}getId(e){var r;if(!e)return-1;var n=(r=this.getMeta(e))==null?void 0:r.id;return n??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){var r=this.getId(e);if(this.idNodeMap.delete(r),e.childNodes&&e.childNodes.forEach((s=>this.removeNodeFromMap(s))),Er(e)){var n=U.shadowRoot(e);n&&this.removeNodeFromMap(n),e.nodeName==="IFRAME"&&e.contentDocument&&this.removeNodeFromMap(e.contentDocument)}}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,r){this.idNodeMap.set(r.id,e),this.nodeMetaMap.set(e,r)}replace(e,r){var n=this.getNode(e);if(n){var s=this.nodeMetaMap.get(n);s&&this.nodeMetaMap.set(r,s)}this.idNodeMap.set(e,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Zt(t){var{element:e,maskInputOptions:r,tagName:n,type:s,value:a,maskInputFn:i}=t,o=a||"",u=s&&et(s);return(r[n.toLowerCase()]||u&&r[u])&&(o=i?i(o,e):"*".repeat(o.length)),o}function et(t){return t.toLowerCase()}var Pn="__rrweb_original__";function Jt(t){var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?et(e):null}function Bn(t,e){var r,n;try{n=new URL(t,e??window.location.href)}catch{return null}var s=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(r=s?.[1])!==null&&r!==void 0?r:null}var va=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ya=/^(?:[a-z+]+:)?\/\//i,ba=/^www\..*/i,Sa=/^(data:)([^,]*),(.*)/i;function Yt(t,e){return(t||"").replace(va,((r,n,s,a,i,o)=>{var u,l=s||i||o,d=n||a||"";if(!l)return r;if(ya.test(l)||ba.test(l)||Sa.test(l))return"url("+d+l+d+")";if(l[0]==="/")return"url("+d+(((u=e).indexOf("//")>-1?u.split("/").slice(0,3).join("/"):u.split("/")[0]).split("?")[0]+l)+d+")";var c=e.split("/"),m=l.split("/");for(var h of(c.pop(),m))h!=="."&&(h===".."?c.pop():c.push(h));return"url("+d+c.join("/")+d+")"}))}var ft,Wn,wa="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",qn=4096,ka=1,Ia=new RegExp("[^a-z0-9-_:]"),Et=-2;function Hn(){return ka++}var Ca=/^[^ \t\n\r\u000c]+/,_a=/^[, \t\n\r\u000c]+/,zn=new WeakMap;function mt(t,e){return e&&e.trim()!==""?xr(t,e):e}function xr(t,e){var r=zn.get(t);if(r||(r=t.createElement("a"),zn.set(t,r)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return r.setAttribute("href",e),r.href}function Un(t,e,r,n,s,a){if(!n)return n;if(r==="src"||r==="href"&&(e!=="use"||n[0]!=="#")){var i=mt(t,n);if(e==="img"&&i.startsWith("data:")&&s){var o=i;return(a?.type||a?.quality!==void 0)&&(o=(function(d,c,m,h){if(!d.complete||d.naturalWidth===0||d.naturalWidth>qn||d.naturalHeight>qn)return c;try{var I=document.createElement("canvas");I.width=d.naturalWidth,I.height=d.naturalHeight;var g=I.getContext("2d");return g?(g.drawImage(d,0,0),I.toDataURL(m||"image/webp",h??.4)):c}catch{return c}})(s,i,a.type,a.quality)),a?.maxBase64ImageLength&&(u=o,o=(l=a.maxBase64ImageLength)&&u.length>l?wa:u),o}return i}return r==="xlink:href"&&n[0]!=="#"?mt(t,n):r!=="background"||e!=="table"&&e!=="td"&&e!=="th"?r==="srcset"?(function(d,c){if(c.trim()==="")return c;var m=0;function h(x){var y,v=x.exec(c.substring(m));return v?(m+=(y=v[0]).length,y):""}for(var I=[];h(_a),c.length>m;){var g=h(Ca);if(g.slice(-1)===",")g=mt(d,g.substring(0,g.length-1)),I.push(g);else{var R="";g=mt(d,g);for(var S=!1;;){var f=c.charAt(m);if(f===""){I.push((g+R).trim());break}if(S)f===")"&&(S=!1);else{if(f===","){m+=1,I.push((g+R).trim());break}f==="("&&(S=!0)}R+=f,m+=1}}}return I.join(", ")})(t,n):r==="style"?Yt(n,xr(t)):e==="object"&&r==="data"?mt(t,n):n:mt(t,n);var u,l}function $n(t,e,r){return(t==="video"||t==="audio")&&e==="autoplay"}function Xt(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return!!r&&Xt(U.parentNode(t),e,r);for(var n=t.classList.length;n--;)if(e.test(t.classList[n]))return!0;return!!r&&Xt(U.parentNode(t),e,r)}function jn(t,e,r,n){var s;if(Er(t)){if(!U.childNodes(s=t).length)return!1}else{if(U.parentElement(t)===null)return!1;s=U.parentElement(t)}try{if(typeof e=="string"){if(n){if(s.closest("."+e))return!0}else if(s.classList.contains(e))return!0}else if(Xt(s,e,n))return!0;if(r){if(n){if(s.closest(r))return!0}else if(s.matches(r))return!0}}catch{}return!1}function Gn(t,e){return Array.from(t.styleSheets).find((r=>r.href===e))}function _e(t){return t==null?"":t.toLowerCase()}var Ma=50,Or=!1,Lr=!1;function gt(t,e){var{doc:r,mirror:n,blockClass:s,blockSelector:a,maskTextClass:i,maskTextSelector:o,skipChild:u=!1,inlineStylesheet:l=!0,maskInputOptions:d={},maskTextFn:c,maskInputFn:m,slimDOMOptions:h,dataURLOptions:I={},inlineImages:g=!1,recordCanvas:R=!1,onSerialize:S,onIframeLoad:f,iframeLoadTimeout:x=5e3,onStylesheetLoad:y,stylesheetLoadTimeout:v=5e3,keepIframeSrcFn:b=(()=>!1),newlyAddedElement:T=!1,depth:w=0,maxDepth:p=Ma}=e,{needsMask:_}=e,{preserveWhiteSpace:L=!0}=e;if(w>=p)return Lr=!0,Or||(Or=!0,console.warn("[rrweb-snapshot] DOM tree depth exceeded max depth of "+p+". Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.")),null;_||(_=jn(t,i,o,_===void 0));var E,B=(function(C,j){var{doc:ee,mirror:de,blockClass:ae,blockSelector:te,needsMask:oe,inlineStylesheet:Ue,maskInputOptions:Ae={},maskTextFn:Oe,maskInputFn:ot,dataURLOptions:Je={},inlineImages:$,recordCanvas:re,keepIframeSrcFn:D,newlyAddedElement:V=!1}=j,ie=(function(z,$e){if($e.hasNode(z)){var Pe=$e.getId(z);return Pe===1?void 0:Pe}})(ee,de);switch(C.nodeType){case C.DOCUMENT_NODE:return C.compatMode!=="CSS1Compat"?{type:le.Document,childNodes:[],compatMode:C.compatMode}:{type:le.Document,childNodes:[]};case C.DOCUMENT_TYPE_NODE:return{type:le.DocumentType,name:C.name,publicId:C.publicId,systemId:C.systemId,rootId:ie};case C.ELEMENT_NODE:return(function(z,$e){for(var Pe,Ct,lt,{doc:Le,blockClass:Ye,blockSelector:Xe,inlineStylesheet:ke,maskInputOptions:Ke={},maskInputFn:_t,dataURLOptions:Ce={},inlineImages:kn,recordCanvas:In,keepIframeSrcFn:Cn,newlyAddedElement:_n=!1,rootId:Mn}=$e,wr=(function(he,Be,ut){try{if(typeof Be=="string"){if(he.classList.contains(Be))return!0}else for(var dt=he.classList.length;dt--;)if(Be.test(he.classList[dt]))return!0;if(ut)return he.matches(ut)}catch{}return!1})(z,Ye,Xe),ce=(function(he){if(he instanceof HTMLFormElement)return"form";var Be=et(he.tagName);return Ia.test(Be)?"div":Be})(z),K={},Ci=z.attributes.length,Tn=0;Ci>Tn;Tn++){var kr=z.attributes[Tn];$n(ce,kr.name)||(K[kr.name]=Un(Le,ce,et(kr.name),kr.value,z,Ce))}if(ce==="link"&&ke){var Ir=(function(he){return he.href})(z);if(Ir){var Cr=Gn(Le,Ir);!Cr&&Ir.includes(".css")&&(Cr=Gn(Le,window.location.origin+"/"+Ir.replace(window.location.href,"")));var Rn=null;Cr&&(Rn=Vt(Cr)),Rn&&(delete K.rel,delete K.href,K._cssText=Rn)}}if(ce==="style"&&z.sheet&&!(z.innerText||U.textContent(z)||"").trim().length){var da=Vt(z.sheet);da&&(K._cssText=da)}if(ce==="input"||ce==="textarea"||ce==="select"){var ca=z.value,ha=z.checked;K.type!=="radio"&&K.type!=="checkbox"&&K.type!=="submit"&&K.type!=="button"&&ca?K.value=Zt({element:z,type:Jt(z),tagName:ce,value:ca,maskInputOptions:Ke,maskInputFn:_t}):ha&&(K.checked=ha)}if(ce==="option"&&(z.selected&&!Ke.select?K.selected=!0:delete K.selected),ce==="dialog"&&z.open)try{K.rr_open_mode=z.matches("dialog:modal")?"modal":"non-modal"}catch{K.rr_open_mode="modal",K.ph_rr_could_not_detect_modal=!0}if(ce==="canvas"&&In){if(z.__context==="2d")(function(he){var Be=he.getContext("2d");if(!Be)return!0;for(var ut=0;he.width>ut;ut+=50)for(var dt=0;he.height>dt;dt+=50){var _r=Be.getImageData;if(new Uint32Array((Pn in _r?_r[Pn]:_r).call(Be,ut,dt,Math.min(50,he.width-ut),Math.min(50,he.height-dt)).data.buffer).some((xi=>xi!==0)))return!1}return!0})(z)||(K.rr_dataURL=z.toDataURL(Ce.type,Ce.quality));else if(!("__context"in z)){var pa=z.toDataURL(Ce.type,Ce.quality),En=Le.createElement("canvas");En.width=z.width,En.height=z.height,pa!==En.toDataURL(Ce.type,Ce.quality)&&(K.rr_dataURL=pa)}}if(ce==="img"&&kn){ft||(ft=Le.createElement("canvas"),Wn=ft.getContext("2d"));var pe=z,_i=pe.currentSrc||pe.getAttribute("src")||"<unknown-src>",fa=pe.crossOrigin,$t=()=>{pe.removeEventListener("load",$t);try{ft.width=pe.naturalWidth,ft.height=pe.naturalHeight,Wn.drawImage(pe,0,0),K.rr_dataURL=ft.toDataURL(Ce.type,Ce.quality)}catch(he){if(pe.crossOrigin!=="anonymous")return pe.crossOrigin="anonymous",void(pe.complete&&pe.naturalWidth!==0?$t():pe.addEventListener("load",$t));console.warn("Cannot inline img src="+_i+"! Error: "+he)}pe.crossOrigin==="anonymous"&&(fa?K.crossOrigin=fa:pe.removeAttribute("crossorigin"))};pe.complete&&pe.naturalWidth!==0?$t():pe.addEventListener("load",$t)}if(ce==="audio"||ce==="video"){var Mt=K;Mt.rr_mediaState=z.paused?"paused":"played",Mt.rr_mediaCurrentTime=z.currentTime,Mt.rr_mediaPlaybackRate=z.playbackRate,Mt.rr_mediaMuted=z.muted,Mt.rr_mediaLoop=z.loop,Mt.rr_mediaVolume=z.volume}if(_n||(z.scrollLeft&&(K.rr_scrollLeft=z.scrollLeft),z.scrollTop&&(K.rr_scrollTop=z.scrollTop)),wr){var{width:Mi,height:Ti,left:Ri,top:Ei}=z.getBoundingClientRect();K={class:K.class,rr_width:Mi+"px",rr_height:Ti+"px",rr_left:Math.floor(Ri+(((Pe=Le.defaultView)==null?void 0:Pe.scrollX)||0))+"px",rr_top:Math.floor(Ei+(((Ct=Le.defaultView)==null?void 0:Ct.scrollY)||0))+"px"}}ce!=="iframe"||Cn(K.src)||(z.contentDocument||(K.rr_src=K.src),delete K.src);try{customElements.get(ce)&&(lt=!0)}catch{}return{type:le.Element,tagName:ce,attributes:K,childNodes:[],isSVG:(xn=z,!!(xn.tagName==="svg"||xn.ownerSVGElement)||void 0),needBlock:wr,rootId:Mn,isCustom:lt};var xn})(C,{doc:ee,blockClass:ae,blockSelector:te,inlineStylesheet:Ue,maskInputOptions:Ae,maskInputFn:ot,dataURLOptions:Je,inlineImages:$,recordCanvas:re,keepIframeSrcFn:D,newlyAddedElement:V,rootId:ie});case C.TEXT_NODE:return(function(z,$e){var Pe,{needsMask:Ct,maskTextFn:lt,rootId:Le}=$e,Ye=U.parentNode(z),Xe=Ye&&Ye.tagName,ke=U.textContent(z),Ke=Xe==="STYLE"||void 0,_t=Xe==="SCRIPT"||void 0;if(Ke&&ke){try{z.nextSibling||z.previousSibling||(Pe=Ye.sheet)!=null&&Pe.cssRules&&(ke=Vt(Ye.sheet))}catch(Ce){console.warn("Cannot get CSS styles from text's parentNode. Error: "+Ce,z)}ke=Yt(ke,xr($e.doc))}return _t&&(ke="SCRIPT_PLACEHOLDER"),!Ke&&!_t&&ke&&Ct&&(ke=lt?lt(ke,U.parentElement(z)):ke.replace(/[\S]/g,"*")),{type:le.Text,textContent:ke||"",isStyle:Ke,rootId:Le}})(C,{doc:ee,needsMask:oe,maskTextFn:Oe,rootId:ie});case C.CDATA_SECTION_NODE:return{type:le.CDATA,textContent:"",rootId:ie};case C.COMMENT_NODE:return{type:le.Comment,textContent:U.textContent(C)||"",rootId:ie};default:return!1}})(t,{doc:r,mirror:n,blockClass:s,blockSelector:a,needsMask:_,inlineStylesheet:l,maskInputOptions:d,maskTextFn:c,maskInputFn:m,dataURLOptions:I,inlineImages:g,recordCanvas:R,keepIframeSrcFn:b,newlyAddedElement:T});if(!B)return console.warn(t,"not serialized"),null;E=n.hasNode(t)?n.getId(t):!(function(C,j){return!!(j.comment&&C.type===le.Comment||C.type===le.Element&&(j.script&&(C.tagName==="script"||C.tagName==="link"&&(C.attributes.rel==="preload"&&C.attributes.as==="script"||C.attributes.rel==="modulepreload")||C.tagName==="link"&&C.attributes.rel==="prefetch"&&typeof C.attributes.href=="string"&&Bn(C.attributes.href)==="js")||j.headFavicon&&(C.tagName==="link"&&C.attributes.rel==="shortcut icon"||C.tagName==="meta"&&(_e(C.attributes.name).match(/^msapplication-tile(image|color)$/)||_e(C.attributes.name)==="application-name"||["icon","apple-touch-icon","shortcut icon"].includes(_e(C.attributes.rel))))||C.tagName==="meta"&&(j.headMetaDescKeywords&&_e(C.attributes.name).match(/^description|keywords$/)||j.headMetaSocial&&(_e(C.attributes.property).match(/^(og|twitter|fb):/)||_e(C.attributes.name).match(/^(og|twitter):/)||_e(C.attributes.name)==="pinterest")||j.headMetaRobots&&["robots","googlebot","bingbot"].includes(_e(C.attributes.name))||j.headMetaHttpEquiv&&C.attributes["http-equiv"]!==void 0||j.headMetaAuthorship&&(["author","generator","framework","publisher","progid"].includes(_e(C.attributes.name))||_e(C.attributes.property).match(/^article:/)||_e(C.attributes.property).match(/^product:/))||j.headMetaVerification&&["google-site-verification","yandex-verification","csrf-token","p:domain_verify","verify-v1","verification","shopify-checkout-api-token"].includes(_e(C.attributes.name)))))})(B,h)&&(L||B.type!==le.Text||B.isStyle||B.textContent.replace(/^\s+|\s+$/gm,"").length)?Hn():Et;var M=Object.assign(B,{id:E});if(n.add(t,M),E===Et)return null;S&&S(t);var W=!u;if(M.type===le.Element){W=W&&!M.needBlock,delete M.needBlock;var F=U.shadowRoot(t);F&&Rt(F)&&(M.isShadowHost=!0)}if((M.type===le.Document||M.type===le.Element)&&W){h.headWhitespace&&M.type===le.Element&&M.tagName==="head"&&(L=!1);var N={doc:r,mirror:n,blockClass:s,blockSelector:a,needsMask:_,maskTextClass:i,maskTextSelector:o,skipChild:u,inlineStylesheet:l,maskInputOptions:d,maskTextFn:c,maskInputFn:m,slimDOMOptions:h,dataURLOptions:I,inlineImages:g,recordCanvas:R,preserveWhiteSpace:L,onSerialize:S,onIframeLoad:f,iframeLoadTimeout:x,onStylesheetLoad:y,stylesheetLoadTimeout:v,keepIframeSrcFn:b,depth:w+1,maxDepth:p};if(!(M.type===le.Element&&M.tagName==="textarea"&&M.attributes.value!==void 0))for(var O of Array.from(U.childNodes(t))){var q=gt(O,N);q&&M.childNodes.push(q)}var A=null;if(Er(t)&&(A=U.shadowRoot(t)))for(var P of Array.from(U.childNodes(A))){var H=gt(P,N);H&&(Rt(A)&&(H.isShadow=!0),M.childNodes.push(H))}}var G=U.parentNode(t);return G&&Tt(G)&&Rt(G)&&(M.isShadow=!0),M.type===le.Element&&M.tagName==="iframe"&&(function(C,j,ee){var de=C.contentWindow;if(de){var ae,te=!1;try{ae=de.document.readyState}catch{return}if(ae==="complete"){var oe="about:blank";if(de.location.href!==oe||C.src===oe||C.src==="")return setTimeout(j,0),C.addEventListener("load",j);C.addEventListener("load",j)}else{var Ue=setTimeout((()=>{te||(j(),te=!0)}),ee);C.addEventListener("load",(()=>{clearTimeout(Ue),te=!0,j()}))}}})(t,(()=>{var C=t.contentDocument;if(C&&f){var j=gt(C,{doc:C,mirror:n,blockClass:s,blockSelector:a,needsMask:_,maskTextClass:i,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:d,maskTextFn:c,maskInputFn:m,slimDOMOptions:h,dataURLOptions:I,inlineImages:g,recordCanvas:R,preserveWhiteSpace:L,onSerialize:S,onIframeLoad:f,iframeLoadTimeout:x,onStylesheetLoad:y,stylesheetLoadTimeout:v,keepIframeSrcFn:b,depth:w+1,maxDepth:p});j&&f(t,j)}}),x),M.type===le.Element&&M.tagName==="link"&&typeof M.attributes.rel=="string"&&(M.attributes.rel==="stylesheet"||M.attributes.rel==="preload"&&typeof M.attributes.href=="string"&&Bn(M.attributes.href)==="css")&&(function(C,j,ee){var de,ae=!1;try{de=C.sheet}catch{return}if(!de){var te=setTimeout((()=>{ae||(j(),ae=!0)}),ee);C.addEventListener("load",(()=>{clearTimeout(te),ae=!0,j()}))}})(t,(()=>{if(y){var C=gt(t,{doc:r,mirror:n,blockClass:s,blockSelector:a,needsMask:_,maskTextClass:i,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:d,maskTextFn:c,maskInputFn:m,slimDOMOptions:h,dataURLOptions:I,inlineImages:g,recordCanvas:R,preserveWhiteSpace:L,onSerialize:S,onIframeLoad:f,iframeLoadTimeout:x,onStylesheetLoad:y,stylesheetLoadTimeout:v,keepIframeSrcFn:b,depth:w,maxDepth:p});C&&y(t,C)}}),v),M}function Vn(t){return t===!0||t==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:t==="all",headMetaDescKeywords:t==="all",headTitleMutations:t==="all"}:t===!1?{}:t}class Nr{constructor(){k(this,"parentElement",null),k(this,"parentNode",null),k(this,"ownerDocument"),k(this,"firstChild",null),k(this,"lastChild",null),k(this,"previousSibling",null),k(this,"nextSibling",null),k(this,"ELEMENT_NODE",1),k(this,"TEXT_NODE",3),k(this,"nodeType"),k(this,"nodeName"),k(this,"RRNodeType")}get childNodes(){for(var e=[],r=this.firstChild;r;)e.push(r),r=r.nextSibling;return e}contains(e){if(!(e instanceof Nr)||e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}function fe(t,e,r){r===void 0&&(r=document);var n={capture:!0,passive:!0};return r.addEventListener(t,e,n),()=>r.removeEventListener(t,e,n)}function Dr(t){try{t()}catch(e){if(!(e instanceof DOMException&&e.name==="SecurityError"))throw e}}var vt=`Please stop import mirror directly. Instead of that,\r
|
|
1
|
+
(function(){try{var We=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};We.SENTRY_RELEASE={id:"3.8.1"};var je=new We.Error().stack;je&&(We._sentryDebugIds=We._sentryDebugIds||{},We._sentryDebugIds[je]="e06f55b6-f7d4-42cf-a9cd-0e5606fd8e60",We._sentryDebugIdIdentifier="sentry-dbid-e06f55b6-f7d4-42cf-a9cd-0e5606fd8e60")}catch{}})();(function(){function We(t,e,r,n,s,a,i){try{var o=t[a](i),u=o.value}catch(l){return void r(l)}o.done?e(u):Promise.resolve(u).then(n,s)}function je(t){return function(){var e=this,r=arguments;return new Promise((function(n,s){var a=t.apply(e,r);function i(u){We(a,n,s,i,o,"next",u)}function o(u){We(a,n,s,i,o,"throw",u)}i(void 0)}))}}function Y(){return Y=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Y.apply(null,arguments)}var On,ma=["type"],ga=Object.defineProperty,k=(t,e,r)=>((n,s,a)=>s in n?ga(n,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[s]=a)(t,typeof e!="symbol"?e+"":e,r),X=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(X||{}),Z=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(Z||{}),be=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(be||{}),Ge=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(Ge||{}),ct=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(ct||{}),ht=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(ht||{}),le=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(le||{}),Ln={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},Nn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},jt={};function Mr(t){if(jt[t])return jt[t];var e=(function(d){var c,m,h=(m=(c=globalThis?.Zone)==null?void 0:c.__symbol__)==null?void 0:m.call(c,d);return h&&globalThis[h]?globalThis[h]:void 0})(t)||globalThis[t],r=e.prototype,n=t in Ln?Ln[t]:void 0,s=!!(n&&n.every((d=>{var c,m;return!!((m=(c=Object.getOwnPropertyDescriptor(r,d))==null?void 0:c.get)!=null&&m.toString().includes("[native code]"))}))),a=t in Nn?Nn[t]:void 0,i=!!(a&&a.every((d=>{var c;return typeof r[d]=="function"&&((c=r[d])==null?void 0:c.toString().includes("[native code]"))})));if(s&&i)return jt[t]=e.prototype,e.prototype;var o=document.createElement("iframe");try{document.body.appendChild(o);var u=o.contentWindow;if(!u)return e.prototype;var l=u[t].prototype;return l?jt[t]=l:r}catch{return r}finally{o.parentNode&&document.body.removeChild(o)}}var Tr={};function pt(t,e,r){var n,s=t+"."+String(r);if(Tr[s])return Tr[s].call(e);var a=Mr(t),i=(n=Object.getOwnPropertyDescriptor(a,r))==null?void 0:n.get;return i?(Tr[s]=i,i.call(e)):e[r]}var Rr={};function Gt(t,e,r){var n=t+"."+String(r);if(Rr[n])return Rr[n].bind(e);var s=Mr(t)[r];return typeof s!="function"?e[r]:(Rr[n]=s,s.bind(e))}function Dn(){return Mr("MutationObserver").constructor}function Qe(t,e,r){try{if(!(e in t))return()=>{};var n=t[e],s=r(n);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:n}})),t[e]=s,()=>{t[e]=n}}catch{return()=>{}}}var U={childNodes:t=>pt("Node",t,"childNodes"),parentNode:t=>pt("Node",t,"parentNode"),parentElement:t=>pt("Node",t,"parentElement"),textContent:t=>pt("Node",t,"textContent"),contains:(t,e)=>Gt("Node",t,"contains")(e),getRootNode:t=>Gt("Node",t,"getRootNode")(),host:t=>t&&"host"in t?pt("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?pt("Element",t,"shadowRoot"):null,querySelector:(t,e)=>Gt("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>Gt("Element",t,"querySelectorAll")(e),mutationObserver:Dn,patch:Qe};function Er(t){return t.nodeType===t.ELEMENT_NODE}function Tt(t){var e=t&&"host"in t&&"mode"in t&&U.host(t)||null;return!!(e&&"shadowRoot"in e&&U.shadowRoot(e)===t)}function Rt(t){return{}.toString.call(t)==="[object ShadowRoot]"}function Vt(t){try{var e=t.rules||t.cssRules;if(!e)return null;var r=t.href;return!r&&t.ownerNode&&(r=t.ownerNode.baseURI),(n=Array.from(e,(s=>Fn(s,r))).join("")).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),n}catch{return null}var n}function Fn(t,e){var r;if((function(a){return"styleSheet"in a})(t)){var n;try{n=Vt(t.styleSheet)||(function(a){var{cssText:i}=a;if(3>i.split('"').length)return i;var o=["@import","url("+JSON.stringify(a.href)+")"];return a.layerName===""?o.push("layer"):a.layerName&&o.push("layer("+a.layerName+")"),a.supportsText&&o.push("supports("+a.supportsText+")"),a.media.length&&o.push(a.media.mediaText),o.join(" ")+";"})(t)}catch{n=t.cssText}try{if(n&&((r=t.styleSheet)!=null&&r.href))return Yt(n,t.styleSheet.href)}catch{}return n}var s=t.cssText;return(function(a){return"selectorText"in a})(t)&&t.selectorText.includes(":")&&(s=s.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),e?Yt(s,e):s}class An{constructor(){k(this,"idNodeMap",new Map),k(this,"nodeMetaMap",new WeakMap)}getId(e){var r;if(!e)return-1;var n=(r=this.getMeta(e))==null?void 0:r.id;return n??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){var r=this.getId(e);if(this.idNodeMap.delete(r),e.childNodes&&e.childNodes.forEach((s=>this.removeNodeFromMap(s))),Er(e)){var n=U.shadowRoot(e);n&&this.removeNodeFromMap(n),e.nodeName==="IFRAME"&&e.contentDocument&&this.removeNodeFromMap(e.contentDocument)}}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,r){this.idNodeMap.set(r.id,e),this.nodeMetaMap.set(e,r)}replace(e,r){var n=this.getNode(e);if(n){var s=this.nodeMetaMap.get(n);s&&this.nodeMetaMap.set(r,s)}this.idNodeMap.set(e,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Zt(t){var{element:e,maskInputOptions:r,tagName:n,type:s,value:a,maskInputFn:i}=t,o=a||"",u=s&&et(s);return(r[n.toLowerCase()]||u&&r[u])&&(o=i?i(o,e):"*".repeat(o.length)),o}function et(t){return t.toLowerCase()}var Pn="__rrweb_original__";function Jt(t){var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?et(e):null}function Bn(t,e){var r,n;try{n=new URL(t,e??window.location.href)}catch{return null}var s=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(r=s?.[1])!==null&&r!==void 0?r:null}var va=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ya=/^(?:[a-z+]+:)?\/\//i,ba=/^www\..*/i,Sa=/^(data:)([^,]*),(.*)/i;function Yt(t,e){return(t||"").replace(va,((r,n,s,a,i,o)=>{var u,l=s||i||o,d=n||a||"";if(!l)return r;if(ya.test(l)||ba.test(l)||Sa.test(l))return"url("+d+l+d+")";if(l[0]==="/")return"url("+d+(((u=e).indexOf("//")>-1?u.split("/").slice(0,3).join("/"):u.split("/")[0]).split("?")[0]+l)+d+")";var c=e.split("/"),m=l.split("/");for(var h of(c.pop(),m))h!=="."&&(h===".."?c.pop():c.push(h));return"url("+d+c.join("/")+d+")"}))}var ft,Wn,wa="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",qn=4096,ka=1,Ia=new RegExp("[^a-z0-9-_:]"),Et=-2;function Hn(){return ka++}var Ca=/^[^ \t\n\r\u000c]+/,_a=/^[, \t\n\r\u000c]+/,zn=new WeakMap;function mt(t,e){return e&&e.trim()!==""?xr(t,e):e}function xr(t,e){var r=zn.get(t);if(r||(r=t.createElement("a"),zn.set(t,r)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return r.setAttribute("href",e),r.href}function Un(t,e,r,n,s,a){if(!n)return n;if(r==="src"||r==="href"&&(e!=="use"||n[0]!=="#")){var i=mt(t,n);if(e==="img"&&i.startsWith("data:")&&s){var o=i;return(a?.type||a?.quality!==void 0)&&(o=(function(d,c,m,h){if(!d.complete||d.naturalWidth===0||d.naturalWidth>qn||d.naturalHeight>qn)return c;try{var I=document.createElement("canvas");I.width=d.naturalWidth,I.height=d.naturalHeight;var g=I.getContext("2d");return g?(g.drawImage(d,0,0),I.toDataURL(m||"image/webp",h??.4)):c}catch{return c}})(s,i,a.type,a.quality)),a?.maxBase64ImageLength&&(u=o,o=(l=a.maxBase64ImageLength)&&u.length>l?wa:u),o}return i}return r==="xlink:href"&&n[0]!=="#"?mt(t,n):r!=="background"||e!=="table"&&e!=="td"&&e!=="th"?r==="srcset"?(function(d,c){if(c.trim()==="")return c;var m=0;function h(x){var y,v=x.exec(c.substring(m));return v?(m+=(y=v[0]).length,y):""}for(var I=[];h(_a),c.length>m;){var g=h(Ca);if(g.slice(-1)===",")g=mt(d,g.substring(0,g.length-1)),I.push(g);else{var R="";g=mt(d,g);for(var S=!1;;){var f=c.charAt(m);if(f===""){I.push((g+R).trim());break}if(S)f===")"&&(S=!1);else{if(f===","){m+=1,I.push((g+R).trim());break}f==="("&&(S=!0)}R+=f,m+=1}}}return I.join(", ")})(t,n):r==="style"?Yt(n,xr(t)):e==="object"&&r==="data"?mt(t,n):n:mt(t,n);var u,l}function $n(t,e,r){return(t==="video"||t==="audio")&&e==="autoplay"}function Xt(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return!!r&&Xt(U.parentNode(t),e,r);for(var n=t.classList.length;n--;)if(e.test(t.classList[n]))return!0;return!!r&&Xt(U.parentNode(t),e,r)}function jn(t,e,r,n){var s;if(Er(t)){if(!U.childNodes(s=t).length)return!1}else{if(U.parentElement(t)===null)return!1;s=U.parentElement(t)}try{if(typeof e=="string"){if(n){if(s.closest("."+e))return!0}else if(s.classList.contains(e))return!0}else if(Xt(s,e,n))return!0;if(r){if(n){if(s.closest(r))return!0}else if(s.matches(r))return!0}}catch{}return!1}function Gn(t,e){return Array.from(t.styleSheets).find((r=>r.href===e))}function _e(t){return t==null?"":t.toLowerCase()}var Ma=50,Or=!1,Lr=!1;function gt(t,e){var{doc:r,mirror:n,blockClass:s,blockSelector:a,maskTextClass:i,maskTextSelector:o,skipChild:u=!1,inlineStylesheet:l=!0,maskInputOptions:d={},maskTextFn:c,maskInputFn:m,slimDOMOptions:h,dataURLOptions:I={},inlineImages:g=!1,recordCanvas:R=!1,onSerialize:S,onIframeLoad:f,iframeLoadTimeout:x=5e3,onStylesheetLoad:y,stylesheetLoadTimeout:v=5e3,keepIframeSrcFn:b=(()=>!1),newlyAddedElement:T=!1,depth:w=0,maxDepth:p=Ma}=e,{needsMask:_}=e,{preserveWhiteSpace:L=!0}=e;if(w>=p)return Lr=!0,Or||(Or=!0,console.warn("[rrweb-snapshot] DOM tree depth exceeded max depth of "+p+". Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.")),null;_||(_=jn(t,i,o,_===void 0));var E,B=(function(C,j){var{doc:ee,mirror:de,blockClass:ae,blockSelector:te,needsMask:oe,inlineStylesheet:Ue,maskInputOptions:Ae={},maskTextFn:Oe,maskInputFn:ot,dataURLOptions:Je={},inlineImages:$,recordCanvas:re,keepIframeSrcFn:D,newlyAddedElement:V=!1}=j,ie=(function(z,$e){if($e.hasNode(z)){var Pe=$e.getId(z);return Pe===1?void 0:Pe}})(ee,de);switch(C.nodeType){case C.DOCUMENT_NODE:return C.compatMode!=="CSS1Compat"?{type:le.Document,childNodes:[],compatMode:C.compatMode}:{type:le.Document,childNodes:[]};case C.DOCUMENT_TYPE_NODE:return{type:le.DocumentType,name:C.name,publicId:C.publicId,systemId:C.systemId,rootId:ie};case C.ELEMENT_NODE:return(function(z,$e){for(var Pe,Ct,lt,{doc:Le,blockClass:Ye,blockSelector:Xe,inlineStylesheet:ke,maskInputOptions:Ke={},maskInputFn:_t,dataURLOptions:Ce={},inlineImages:kn,recordCanvas:In,keepIframeSrcFn:Cn,newlyAddedElement:_n=!1,rootId:Mn}=$e,wr=(function(he,Be,ut){try{if(typeof Be=="string"){if(he.classList.contains(Be))return!0}else for(var dt=he.classList.length;dt--;)if(Be.test(he.classList[dt]))return!0;if(ut)return he.matches(ut)}catch{}return!1})(z,Ye,Xe),ce=(function(he){if(he instanceof HTMLFormElement)return"form";var Be=et(he.tagName);return Ia.test(Be)?"div":Be})(z),K={},Ci=z.attributes.length,Tn=0;Ci>Tn;Tn++){var kr=z.attributes[Tn];$n(ce,kr.name)||(K[kr.name]=Un(Le,ce,et(kr.name),kr.value,z,Ce))}if(ce==="link"&&ke){var Ir=(function(he){return he.href})(z);if(Ir){var Cr=Gn(Le,Ir);!Cr&&Ir.includes(".css")&&(Cr=Gn(Le,window.location.origin+"/"+Ir.replace(window.location.href,"")));var Rn=null;Cr&&(Rn=Vt(Cr)),Rn&&(delete K.rel,delete K.href,K._cssText=Rn)}}if(ce==="style"&&z.sheet&&!(z.innerText||U.textContent(z)||"").trim().length){var da=Vt(z.sheet);da&&(K._cssText=da)}if(ce==="input"||ce==="textarea"||ce==="select"){var ca=z.value,ha=z.checked;K.type!=="radio"&&K.type!=="checkbox"&&K.type!=="submit"&&K.type!=="button"&&ca?K.value=Zt({element:z,type:Jt(z),tagName:ce,value:ca,maskInputOptions:Ke,maskInputFn:_t}):ha&&(K.checked=ha)}if(ce==="option"&&(z.selected&&!Ke.select?K.selected=!0:delete K.selected),ce==="dialog"&&z.open)try{K.rr_open_mode=z.matches("dialog:modal")?"modal":"non-modal"}catch{K.rr_open_mode="modal",K.ph_rr_could_not_detect_modal=!0}if(ce==="canvas"&&In){if(z.__context==="2d")(function(he){var Be=he.getContext("2d");if(!Be)return!0;for(var ut=0;he.width>ut;ut+=50)for(var dt=0;he.height>dt;dt+=50){var _r=Be.getImageData;if(new Uint32Array((Pn in _r?_r[Pn]:_r).call(Be,ut,dt,Math.min(50,he.width-ut),Math.min(50,he.height-dt)).data.buffer).some((xi=>xi!==0)))return!1}return!0})(z)||(K.rr_dataURL=z.toDataURL(Ce.type,Ce.quality));else if(!("__context"in z)){var pa=z.toDataURL(Ce.type,Ce.quality),En=Le.createElement("canvas");En.width=z.width,En.height=z.height,pa!==En.toDataURL(Ce.type,Ce.quality)&&(K.rr_dataURL=pa)}}if(ce==="img"&&kn){ft||(ft=Le.createElement("canvas"),Wn=ft.getContext("2d"));var pe=z,_i=pe.currentSrc||pe.getAttribute("src")||"<unknown-src>",fa=pe.crossOrigin,$t=()=>{pe.removeEventListener("load",$t);try{ft.width=pe.naturalWidth,ft.height=pe.naturalHeight,Wn.drawImage(pe,0,0),K.rr_dataURL=ft.toDataURL(Ce.type,Ce.quality)}catch(he){if(pe.crossOrigin!=="anonymous")return pe.crossOrigin="anonymous",void(pe.complete&&pe.naturalWidth!==0?$t():pe.addEventListener("load",$t));console.warn("Cannot inline img src="+_i+"! Error: "+he)}pe.crossOrigin==="anonymous"&&(fa?K.crossOrigin=fa:pe.removeAttribute("crossorigin"))};pe.complete&&pe.naturalWidth!==0?$t():pe.addEventListener("load",$t)}if(ce==="audio"||ce==="video"){var Mt=K;Mt.rr_mediaState=z.paused?"paused":"played",Mt.rr_mediaCurrentTime=z.currentTime,Mt.rr_mediaPlaybackRate=z.playbackRate,Mt.rr_mediaMuted=z.muted,Mt.rr_mediaLoop=z.loop,Mt.rr_mediaVolume=z.volume}if(_n||(z.scrollLeft&&(K.rr_scrollLeft=z.scrollLeft),z.scrollTop&&(K.rr_scrollTop=z.scrollTop)),wr){var{width:Mi,height:Ti,left:Ri,top:Ei}=z.getBoundingClientRect();K={class:K.class,rr_width:Mi+"px",rr_height:Ti+"px",rr_left:Math.floor(Ri+(((Pe=Le.defaultView)==null?void 0:Pe.scrollX)||0))+"px",rr_top:Math.floor(Ei+(((Ct=Le.defaultView)==null?void 0:Ct.scrollY)||0))+"px"}}ce!=="iframe"||Cn(K.src)||(z.contentDocument||(K.rr_src=K.src),delete K.src);try{customElements.get(ce)&&(lt=!0)}catch{}return{type:le.Element,tagName:ce,attributes:K,childNodes:[],isSVG:(xn=z,!!(xn.tagName==="svg"||xn.ownerSVGElement)||void 0),needBlock:wr,rootId:Mn,isCustom:lt};var xn})(C,{doc:ee,blockClass:ae,blockSelector:te,inlineStylesheet:Ue,maskInputOptions:Ae,maskInputFn:ot,dataURLOptions:Je,inlineImages:$,recordCanvas:re,keepIframeSrcFn:D,newlyAddedElement:V,rootId:ie});case C.TEXT_NODE:return(function(z,$e){var Pe,{needsMask:Ct,maskTextFn:lt,rootId:Le}=$e,Ye=U.parentNode(z),Xe=Ye&&Ye.tagName,ke=U.textContent(z),Ke=Xe==="STYLE"||void 0,_t=Xe==="SCRIPT"||void 0;if(Ke&&ke){try{z.nextSibling||z.previousSibling||(Pe=Ye.sheet)!=null&&Pe.cssRules&&(ke=Vt(Ye.sheet))}catch(Ce){console.warn("Cannot get CSS styles from text's parentNode. Error: "+Ce,z)}ke=Yt(ke,xr($e.doc))}return _t&&(ke="SCRIPT_PLACEHOLDER"),!Ke&&!_t&&ke&&Ct&&(ke=lt?lt(ke,U.parentElement(z)):ke.replace(/[\S]/g,"*")),{type:le.Text,textContent:ke||"",isStyle:Ke,rootId:Le}})(C,{doc:ee,needsMask:oe,maskTextFn:Oe,rootId:ie});case C.CDATA_SECTION_NODE:return{type:le.CDATA,textContent:"",rootId:ie};case C.COMMENT_NODE:return{type:le.Comment,textContent:U.textContent(C)||"",rootId:ie};default:return!1}})(t,{doc:r,mirror:n,blockClass:s,blockSelector:a,needsMask:_,inlineStylesheet:l,maskInputOptions:d,maskTextFn:c,maskInputFn:m,dataURLOptions:I,inlineImages:g,recordCanvas:R,keepIframeSrcFn:b,newlyAddedElement:T});if(!B)return console.warn(t,"not serialized"),null;E=n.hasNode(t)?n.getId(t):!(function(C,j){return!!(j.comment&&C.type===le.Comment||C.type===le.Element&&(j.script&&(C.tagName==="script"||C.tagName==="link"&&(C.attributes.rel==="preload"&&C.attributes.as==="script"||C.attributes.rel==="modulepreload")||C.tagName==="link"&&C.attributes.rel==="prefetch"&&typeof C.attributes.href=="string"&&Bn(C.attributes.href)==="js")||j.headFavicon&&(C.tagName==="link"&&C.attributes.rel==="shortcut icon"||C.tagName==="meta"&&(_e(C.attributes.name).match(/^msapplication-tile(image|color)$/)||_e(C.attributes.name)==="application-name"||["icon","apple-touch-icon","shortcut icon"].includes(_e(C.attributes.rel))))||C.tagName==="meta"&&(j.headMetaDescKeywords&&_e(C.attributes.name).match(/^description|keywords$/)||j.headMetaSocial&&(_e(C.attributes.property).match(/^(og|twitter|fb):/)||_e(C.attributes.name).match(/^(og|twitter):/)||_e(C.attributes.name)==="pinterest")||j.headMetaRobots&&["robots","googlebot","bingbot"].includes(_e(C.attributes.name))||j.headMetaHttpEquiv&&C.attributes["http-equiv"]!==void 0||j.headMetaAuthorship&&(["author","generator","framework","publisher","progid"].includes(_e(C.attributes.name))||_e(C.attributes.property).match(/^article:/)||_e(C.attributes.property).match(/^product:/))||j.headMetaVerification&&["google-site-verification","yandex-verification","csrf-token","p:domain_verify","verify-v1","verification","shopify-checkout-api-token"].includes(_e(C.attributes.name)))))})(B,h)&&(L||B.type!==le.Text||B.isStyle||B.textContent.replace(/^\s+|\s+$/gm,"").length)?Hn():Et;var M=Object.assign(B,{id:E});if(n.add(t,M),E===Et)return null;S&&S(t);var W=!u;if(M.type===le.Element){W=W&&!M.needBlock,delete M.needBlock;var F=U.shadowRoot(t);F&&Rt(F)&&(M.isShadowHost=!0)}if((M.type===le.Document||M.type===le.Element)&&W){h.headWhitespace&&M.type===le.Element&&M.tagName==="head"&&(L=!1);var N={doc:r,mirror:n,blockClass:s,blockSelector:a,needsMask:_,maskTextClass:i,maskTextSelector:o,skipChild:u,inlineStylesheet:l,maskInputOptions:d,maskTextFn:c,maskInputFn:m,slimDOMOptions:h,dataURLOptions:I,inlineImages:g,recordCanvas:R,preserveWhiteSpace:L,onSerialize:S,onIframeLoad:f,iframeLoadTimeout:x,onStylesheetLoad:y,stylesheetLoadTimeout:v,keepIframeSrcFn:b,depth:w+1,maxDepth:p};if(!(M.type===le.Element&&M.tagName==="textarea"&&M.attributes.value!==void 0))for(var O of Array.from(U.childNodes(t))){var q=gt(O,N);q&&M.childNodes.push(q)}var A=null;if(Er(t)&&(A=U.shadowRoot(t)))for(var P of Array.from(U.childNodes(A))){var H=gt(P,N);H&&(Rt(A)&&(H.isShadow=!0),M.childNodes.push(H))}}var G=U.parentNode(t);return G&&Tt(G)&&Rt(G)&&(M.isShadow=!0),M.type===le.Element&&M.tagName==="iframe"&&(function(C,j,ee){var de=C.contentWindow;if(de){var ae,te=!1;try{ae=de.document.readyState}catch{return}if(ae==="complete"){var oe="about:blank";if(de.location.href!==oe||C.src===oe||C.src==="")return setTimeout(j,0),C.addEventListener("load",j);C.addEventListener("load",j)}else{var Ue=setTimeout((()=>{te||(j(),te=!0)}),ee);C.addEventListener("load",(()=>{clearTimeout(Ue),te=!0,j()}))}}})(t,(()=>{var C=t.contentDocument;if(C&&f){var j=gt(C,{doc:C,mirror:n,blockClass:s,blockSelector:a,needsMask:_,maskTextClass:i,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:d,maskTextFn:c,maskInputFn:m,slimDOMOptions:h,dataURLOptions:I,inlineImages:g,recordCanvas:R,preserveWhiteSpace:L,onSerialize:S,onIframeLoad:f,iframeLoadTimeout:x,onStylesheetLoad:y,stylesheetLoadTimeout:v,keepIframeSrcFn:b,depth:w+1,maxDepth:p});j&&f(t,j)}}),x),M.type===le.Element&&M.tagName==="link"&&typeof M.attributes.rel=="string"&&(M.attributes.rel==="stylesheet"||M.attributes.rel==="preload"&&typeof M.attributes.href=="string"&&Bn(M.attributes.href)==="css")&&(function(C,j,ee){var de,ae=!1;try{de=C.sheet}catch{return}if(!de){var te=setTimeout((()=>{ae||(j(),ae=!0)}),ee);C.addEventListener("load",(()=>{clearTimeout(te),ae=!0,j()}))}})(t,(()=>{if(y){var C=gt(t,{doc:r,mirror:n,blockClass:s,blockSelector:a,needsMask:_,maskTextClass:i,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:d,maskTextFn:c,maskInputFn:m,slimDOMOptions:h,dataURLOptions:I,inlineImages:g,recordCanvas:R,preserveWhiteSpace:L,onSerialize:S,onIframeLoad:f,iframeLoadTimeout:x,onStylesheetLoad:y,stylesheetLoadTimeout:v,keepIframeSrcFn:b,depth:w,maxDepth:p});C&&y(t,C)}}),v),M}function Vn(t){return t===!0||t==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:t==="all",headMetaDescKeywords:t==="all",headTitleMutations:t==="all"}:t===!1?{}:t}class Nr{constructor(){k(this,"parentElement",null),k(this,"parentNode",null),k(this,"ownerDocument"),k(this,"firstChild",null),k(this,"lastChild",null),k(this,"previousSibling",null),k(this,"nextSibling",null),k(this,"ELEMENT_NODE",1),k(this,"TEXT_NODE",3),k(this,"nodeType"),k(this,"nodeName"),k(this,"RRNodeType")}get childNodes(){for(var e=[],r=this.firstChild;r;)e.push(r),r=r.nextSibling;return e}contains(e){if(!(e instanceof Nr)||e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}function fe(t,e,r){r===void 0&&(r=document);var n={capture:!0,passive:!0};return r.addEventListener(t,e,n),()=>r.removeEventListener(t,e,n)}function Dr(t){try{t()}catch(e){if(!(e instanceof DOMException&&e.name==="SecurityError"))throw e}}var vt=`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
3
|
or you can use record.mirror to access the mirror instance during recording.`,Zn={map:{},getId(){return console.error(vt),-1},getNode(){return console.error(vt),null},removeNodeFromMap(){console.error(vt)},has(){return console.error(vt),!1},reset(){console.error(vt)}};function xt(t,e,r){r===void 0&&(r={});var n=null,s=0;return function(){for(var a=arguments.length,i=new Array(a),o=0;a>o;o++)i[o]=arguments[o];var u=Date.now();s||r.leading!==!1||(s=u);var l=e-(u-s),d=this;0>=l||l>e?(n&&(clearTimeout(n),n=null),s=u,t.apply(d,i)):n||r.trailing===!1||(n=setTimeout((()=>{s=r.leading===!1?0:Date.now(),n=null,t.apply(d,i)}),l))}}function Kt(t,e,r,n,s){s===void 0&&(s=window);var a=s.Object.getOwnPropertyDescriptor(t,e);return s.Object.defineProperty(t,e,n?r:{set(i){setTimeout((()=>{r.set.call(this,i)}),0),a&&a.set&&a.set.call(this,i)}}),()=>Kt(t,e,a||{},!0)}typeof window<"u"&&window.Proxy&&window.Reflect&&(Zn=new Proxy(Zn,{get(t,e,r){return e==="map"&&console.error(vt),Reflect.get(t,e,r)}}));var Qt=Date.now;function Jn(t){var e,r,n,s,a=t.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:a.documentElement.scrollLeft||a?.body&&((e=U.parentElement(a.body))==null?void 0:e.scrollLeft)||((r=a?.body)==null?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:a?.documentElement.scrollTop||a?.body&&((n=U.parentElement(a.body))==null?void 0:n.scrollTop)||((s=a?.body)==null?void 0:s.scrollTop)||0}}function Yn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Xn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Kn(t){return t?t.nodeType===t.ELEMENT_NODE?t:U.parentElement(t):null}function me(t,e,r,n){if(!t)return!1;var s=Kn(t);if(!s)return!1;try{if(typeof e=="string"){if(s.classList.contains(e)||n&&s.closest("."+e)!==null)return!0}else if(Xt(s,e,n))return!0}catch{}return!!(r&&(s.matches(r)||n&&s.closest(r)!==null))}function Fr(t,e,r){return!(t.tagName!=="TITLE"||!r.headTitleMutations)||e.getId(t)===Et}function Qn(t,e){if(Tt(t))return!1;var r=e.getId(t);if(!e.has(r))return!0;var n=U.parentNode(t);return(!n||n.nodeType!==t.DOCUMENT_NODE)&&(!n||Qn(n,e))}function Ar(t){return!!t.changedTouches}function es(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function ts(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function Pr(t){return!!t&&(t instanceof Nr&&"shadowRoot"in t?!!t.shadowRoot:!!U.shadowRoot(t))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Qt=()=>new Date().getTime());class Ta{constructor(){k(this,"id",1),k(this,"styleIDMap",new WeakMap),k(this,"idStyleMap",new Map)}getId(e){var r;return(r=this.styleIDMap.get(e))!==null&&r!==void 0?r:-1}has(e){return this.styleIDMap.has(e)}add(e,r){return this.has(e)?this.getId(e):(n=r===void 0?this.id++:r,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n);var n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function rs(t){var e,r=null;return"getRootNode"in t&&((e=U.getRootNode(t))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&U.host(U.getRootNode(t))&&(r=U.host(U.getRootNode(t))),r}function ns(t){var e=t.ownerDocument;return!!e&&(U.contains(e,t)||(function(r){var n=r.ownerDocument;if(!n)return!1;var s=(function(a){for(var i,o=a;i=rs(o);)o=i;return o})(r);return U.contains(n,s)})(t))}function ss(t){return"__ln"in t}class Ra{constructor(){k(this,"length",0),k(this,"head",null),k(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");for(var r=this.head,n=0;e>n;n++)r=r?.next||null;return r}addNode(e){var r={value:e,previous:null,next:null};if(e.__ln=r,e.previousSibling&&ss(e.previousSibling)){var n=e.previousSibling.__ln.next;r.next=n,r.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=r,n&&(n.previous=r)}else if(e.nextSibling&&ss(e.nextSibling)&&e.nextSibling.__ln.previous){var s=e.nextSibling.__ln.previous;r.previous=s,r.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=r,s&&(s.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(e){var r=e.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}var Ot,as=(t,e)=>t+"@"+e;class Ea{constructor(){k(this,"frozen",!1),k(this,"locked",!1),k(this,"texts",[]),k(this,"attributes",[]),k(this,"attributeMap",new WeakMap),k(this,"removes",[]),k(this,"mapRemoves",[]),k(this,"movedMap",{}),k(this,"addedSet",new Set),k(this,"movedSet",new Set),k(this,"droppedSet",new Set),k(this,"removesSubTreeCache",new Set),k(this,"mutationCb"),k(this,"blockClass"),k(this,"blockSelector"),k(this,"maskTextClass"),k(this,"maskTextSelector"),k(this,"inlineStylesheet"),k(this,"maskInputOptions"),k(this,"maskTextFn"),k(this,"maskInputFn"),k(this,"keepIframeSrcFn"),k(this,"recordCanvas"),k(this,"inlineImages"),k(this,"slimDOMOptions"),k(this,"dataURLOptions"),k(this,"doc"),k(this,"mirror"),k(this,"iframeManager"),k(this,"stylesheetManager"),k(this,"shadowDomManager"),k(this,"canvasManager"),k(this,"processedNodeManager"),k(this,"unattachedDoc"),k(this,"processMutations",(e=>{e.forEach(this.processMutation),this.emit()})),k(this,"emit",(()=>{if(!this.frozen&&!this.locked){for(var e=[],r=new Set,n=new Ra,s=f=>{for(var x=f,y=Et;y===Et;)y=(x=x&&x.nextSibling)&&this.mirror.getId(x);return y},a=f=>{var x=U.parentNode(f);if(x&&ns(f)&&x.tagName!=="TEXTAREA"){var y=Tt(x)?this.mirror.getId(rs(f)):this.mirror.getId(x),v=s(f);if(y===-1||v===-1)return n.addNode(f);var b=gt(f,{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:T=>{es(T,this.mirror)&&this.iframeManager.addIframe(T),ts(T,this.mirror)&&this.stylesheetManager.trackLinkElement(T),Pr(f)&&this.shadowDomManager.addShadowRoot(U.shadowRoot(f),this.doc)},onIframeLoad:(T,w)=>{this.iframeManager.attachIframe(T,w),this.shadowDomManager.observeAttachShadow(T)},onStylesheetLoad:(T,w)=>{this.stylesheetManager.attachLinkElement(T,w)}});b&&(e.push({parentId:y,nextId:v,node:b}),r.add(b.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var i of this.movedSet)is(this.removesSubTreeCache,i)&&!this.movedSet.has(U.parentNode(i))||a(i);for(var o of this.addedSet)os(this.droppedSet,o)||is(this.removesSubTreeCache,o)?os(this.movedSet,o)?a(o):this.droppedSet.add(o):a(o);for(var u=null;n.length;){var l=null;if(u){var d=this.mirror.getId(U.parentNode(u.value)),c=s(u.value);d!==-1&&c!==-1&&(l=u)}if(!l)for(var m=n.tail;m;){var h=m;if(m=m.previous,h){var I=this.mirror.getId(U.parentNode(h.value));if(s(h.value)===-1)continue;if(I!==-1){l=h;break}var g=U.parentNode(h.value);if(g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var R=U.host(g);if(this.mirror.getId(R)!==-1){l=h;break}}}}if(!l){for(;n.head;)n.removeNode(n.head.value);break}u=l.previous,n.removeNode(l.value),a(l.value)}var S={texts:this.texts.map((f=>{var x=f.node,y=U.parentNode(x);return y&&y.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(y),{id:this.mirror.getId(x),value:f.value}})).filter((f=>!r.has(f.id))).filter((f=>this.mirror.has(f.id))),attributes:this.attributes.map((f=>{var{attributes:x}=f;if(typeof x.style=="string"){var y=JSON.stringify(f.styleDiff),v=JSON.stringify(f._unchangedStyles);x.style.length>y.length&&(y+v).split("var(").length===x.style.split("var(").length&&(x.style=f.styleDiff)}return{id:this.mirror.getId(f.node),attributes:x}})).filter((f=>!r.has(f.id))).filter((f=>this.mirror.has(f.id))),removes:this.removes,adds:e};(S.texts.length||S.attributes.length||S.removes.length||S.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(S))}})),k(this,"bufferBelongsToIframe",(e=>this.doc===e.contentDocument)),k(this,"genTextAreaValueMutation",(e=>{var r=this.attributeMap.get(e);r||(this.attributes.push(r={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(e,r));var n=Array.from(U.childNodes(e),(s=>U.textContent(s)||"")).join("");r.attributes.value=Zt({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Jt(e),value:n,maskInputFn:this.maskInputFn})})),k(this,"processMutation",(e=>{if(!Fr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":var r=U.textContent(e.target);me(e.target,this.blockClass,this.blockSelector,!1)||r===e.oldValue||this.texts.push({value:jn(e.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,Kn(e.target)):r.replace(/[\S]/g,"*"):r,node:e.target});break;case"attributes":var n=e.target,s=e.attributeName,a=e.target.getAttribute(s);if(s==="value"){var i=Jt(n);a=Zt({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:i,value:a,maskInputFn:this.maskInputFn})}if(me(e.target,this.blockClass,this.blockSelector,!1)||a===e.oldValue)return;var o=this.attributeMap.get(e.target);if(n.tagName==="IFRAME"&&s==="src"&&!this.keepIframeSrcFn(a)){if(n.contentDocument)return;s="rr_src"}if(o||(this.attributes.push(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(e.target,o)),s==="type"&&n.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!$n(n.tagName,s))if(o.attributes[s]=Un(this.doc,et(n.tagName),et(s),a,n,this.dataURLOptions),s==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}var u=this.unattachedDoc.createElement("span");for(var l of(e.oldValue&&u.setAttribute("style",e.oldValue),Array.from(n.style))){var d=n.style.getPropertyValue(l),c=n.style.getPropertyPriority(l);d!==u.style.getPropertyValue(l)||c!==u.style.getPropertyPriority(l)?o.styleDiff[l]=c===""?d:[d,c]:o._unchangedStyles[l]=[d,c]}for(var m of Array.from(u.style))n.style.getPropertyValue(m)===""&&(o.styleDiff[m]=!1)}else s==="open"&&n.tagName==="DIALOG"&&(o.attributes.rr_open_mode=n.matches("dialog:modal")?"modal":"non-modal");break;case"childList":if(me(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA")return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach((h=>this.genAdds(h,e.target))),e.removedNodes.forEach((h=>{var I=this.mirror.getId(h),g=Tt(e.target)?this.mirror.getId(U.host(e.target)):this.mirror.getId(e.target);me(e.target,this.blockClass,this.blockSelector,!1)||Fr(h,this.mirror,this.slimDOMOptions)||!(function(R,S){return S.getId(R)!==-1})(h,this.mirror)||(this.addedSet.has(h)?(Br(this.addedSet,h),this.droppedSet.add(h)):this.addedSet.has(e.target)&&I===-1||Qn(e.target,this.mirror)||(this.movedSet.has(h)&&this.movedMap[as(I,g)]?Br(this.movedSet,h):(this.removes.push({parentId:g,id:I,isShadow:!(!Tt(e.target)||!Rt(e.target))||void 0}),(function(R,S){for(var f=[R];f.length;){var x=f.pop();S.has(x)||(S.add(x),U.childNodes(x).forEach((y=>f.push(y))))}})(h,this.removesSubTreeCache))),this.mapRemoves.push(h))}))}})),k(this,"genAdds",((e,r)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Fr(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);var n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[as(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);me(e,this.blockClass,this.blockSelector,!1)||(U.childNodes(e).forEach((s=>this.genAdds(s))),Pr(e)&&U.childNodes(U.shadowRoot(e)).forEach((s=>{this.processedNodeManager.add(s,this),this.genAdds(s,e)})))}}))}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((r=>{this[r]=e[r]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}destroy(){for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift())}}function Br(t,e){t.delete(e),U.childNodes(e).forEach((r=>Br(t,r)))}function is(t,e,r){return t.size!==0&&(function(n,s,a){var i=U.parentNode(s);return!!i&&n.has(i)})(t,e)}function os(t,e){return t.size!==0&&ls(t,e)}function ls(t,e){var r=U.parentNode(e);return!!r&&(!!t.has(r)||ls(t,r))}var J=t=>Ot?function(){try{return t(...arguments)}catch(e){if(Ot&&Ot(e)===!0)return;throw e}}:t,Ie=[];function Lt(t){try{if("composedPath"in t){var e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch{}return t&&t.target}function us(t,e){var r=new Ea;Ie.push(r),r.init(t);var n=new(Dn())(J(r.processMutations.bind(r)));return n.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{observer:n,buffer:r}}function ds(t){var{scrollCb:e,doc:r,mirror:n,blockClass:s,blockSelector:a,sampling:i}=t;return fe("scroll",J(xt(J((o=>{var u=Lt(o);if(u&&!me(u,s,a,!0)){var l=n.getId(u);if(u===r&&r.defaultView){var d=Jn(r.defaultView);e({id:l,x:d.left,y:d.top})}else e({id:l,x:u.scrollLeft,y:u.scrollTop})}})),i.scroll||100)),r)}var xa=["INPUT","TEXTAREA","SELECT"],cs=new WeakMap;function er(t){return(function e(r,n){if(tr("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||tr("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||tr("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||tr("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){var s=Array.from(r.parentRule.cssRules).indexOf(r);return n.unshift(s),e(r.parentRule,n)}if(r.parentStyleSheet){var a=Array.from(r.parentStyleSheet.cssRules).indexOf(r);n.unshift(a)}return n})(t,[])}function Ve(t,e,r){var n,s;return t?(t.ownerNode?n=e.getId(t.ownerNode):s=r.getId(t),{styleId:s,id:n}):{}}function hs(t,e){var r,n,s,a,{mirror:i,stylesheetManager:o}=t;a=i.getId(e.nodeName==="#document"?e:U.host(e));var u=e.nodeName==="#document"?(r=e.defaultView)==null?void 0:r.Document:(s=(n=e.ownerDocument)==null?void 0:n.defaultView)==null?void 0:s.ShadowRoot,l=u?.prototype?Object.getOwnPropertyDescriptor(u?.prototype,"adoptedStyleSheets"):void 0;return a!==null&&a!==-1&&u&&l?(Object.defineProperty(e,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var d;return(d=l.get)==null?void 0:d.call(this)},set(d){var c,m=(c=l.set)==null?void 0:c.call(this,d);if(a!==null&&a!==-1)try{o.adoptStyleSheets(d,a)}catch{}return m}}),J((()=>{Object.defineProperty(e,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))):()=>{}}function Oa(t,e){e===void 0&&(e={});var r,n,s=t.doc.defaultView;if(!s)return()=>{};if((function(y,v){var{mutationCb:b,mousemoveCb:T,mouseInteractionCb:w,scrollCb:p,viewportResizeCb:_,inputCb:L,mediaInteractionCb:E,styleSheetRuleCb:B,styleDeclarationCb:M,canvasMutationCb:W,fontCb:F,selectionCb:N,customElementCb:O}=y;y.mutationCb=function(){v.mutation&&v.mutation(...arguments),b(...arguments)},y.mousemoveCb=function(){v.mousemove&&v.mousemove(...arguments),T(...arguments)},y.mouseInteractionCb=function(){v.mouseInteraction&&v.mouseInteraction(...arguments),w(...arguments)},y.scrollCb=function(){v.scroll&&v.scroll(...arguments),p(...arguments)},y.viewportResizeCb=function(){v.viewportResize&&v.viewportResize(...arguments),_(...arguments)},y.inputCb=function(){v.input&&v.input(...arguments),L(...arguments)},y.mediaInteractionCb=function(){v.mediaInteaction&&v.mediaInteaction(...arguments),E(...arguments)},y.styleSheetRuleCb=function(){v.styleSheetRule&&v.styleSheetRule(...arguments),B(...arguments)},y.styleDeclarationCb=function(){v.styleDeclaration&&v.styleDeclaration(...arguments),M(...arguments)},y.canvasMutationCb=function(){v.canvasMutation&&v.canvasMutation(...arguments),W(...arguments)},y.fontCb=function(){v.font&&v.font(...arguments),F(...arguments)},y.selectionCb=function(){v.selection&&v.selection(...arguments),N(...arguments)},y.customElementCb=function(){v.customElement&&v.customElement(...arguments),O(...arguments)}})(t,e),t.recordDOM){var a=us(t,t.doc);r=a.observer,n=a.buffer}var i=(function(y){var{mousemoveCb:v,sampling:b,doc:T,mirror:w}=y;if(b.mousemove===!1)return()=>{};var p,_=typeof b.mousemove=="number"?b.mousemove:50,L=typeof b.mousemoveCallback=="number"?b.mousemoveCallback:500,E=[],B=xt(J((F=>{var N=Date.now()-p;v(E.map((O=>(O.timeOffset-=N,O))),F),E=[],p=null})),L),M=J(xt(J((F=>{var N=Lt(F),{clientX:O,clientY:q}=Ar(F)?F.changedTouches[0]:F;p||(p=Qt()),E.push({x:O,y:q,id:w.getId(N),timeOffset:Qt()-p}),B(typeof DragEvent<"u"&&F instanceof DragEvent?Z.Drag:F instanceof MouseEvent?Z.MouseMove:Z.TouchMove)})),_,{trailing:!1})),W=[fe("mousemove",M,T),fe("touchmove",M,T),fe("drag",M,T)];return J((()=>{W.forEach((F=>F()))}))})(t),o=(function(y){var{mouseInteractionCb:v,doc:b,mirror:T,blockClass:w,blockSelector:p,sampling:_}=y;if(_.mouseInteraction===!1)return()=>{};var L=_.mouseInteraction===!0||_.mouseInteraction===void 0?{}:_.mouseInteraction,E=[],B=null;return Object.keys(be).filter((M=>Number.isNaN(Number(M))&&!M.endsWith("_Departed")&&L[M]!==!1)).forEach((M=>{var W=et(M),F=(N=>O=>{var q=Lt(O);if(!me(q,w,p,!0)){var A=null,P=N;if("pointerType"in O){switch(O.pointerType){case"mouse":A=Ge.Mouse;break;case"touch":A=Ge.Touch;break;case"pen":A=Ge.Pen}A===Ge.Touch&&(be[N]===be.MouseDown?P="TouchStart":be[N]===be.MouseUp&&(P="TouchEnd"))}else Ar(O)&&(A=Ge.Touch);A!==null?(B=A,(P.startsWith("Touch")&&A===Ge.Touch||P.startsWith("Mouse")&&A===Ge.Mouse)&&(A=null)):be[N]===be.Click&&(A=B,B=null);var H=Ar(O)?O.changedTouches[0]:O;if(H){var G=T.getId(q),{clientX:C,clientY:j}=H;J(v)(Y({type:be[P],id:G,x:C,y:j},A!==null&&{pointerType:A}))}}})(M);if(window.PointerEvent)switch(be[M]){case be.MouseDown:case be.MouseUp:W=W.replace("mouse","pointer");break;case be.TouchStart:case be.TouchEnd:return}E.push(fe(W,F,b))})),J((()=>{E.forEach((M=>M()))}))})(t),u=ds(t),l=(function(y,v){var{viewportResizeCb:b}=y,{win:T}=v,w=-1,p=-1;return fe("resize",J(xt(J((()=>{var _=Yn(),L=Xn();w===_&&p===L||(b({width:Number(L),height:Number(_)}),w=_,p=L)})),200)),T)})(t,{win:s}),d=(function(y){var{inputCb:v,doc:b,mirror:T,blockClass:w,blockSelector:p,ignoreClass:_,ignoreSelector:L,maskInputOptions:E,maskInputFn:B,sampling:M,userTriggeredOnInput:W}=y;function F(P){var H=Lt(P),G=P.isTrusted,C=H&&H.tagName;if(H&&C==="OPTION"&&(H=U.parentElement(H)),H&&C&&xa.indexOf(C)>=0&&!me(H,w,p,!0)&&!(H.classList.contains(_)||L&&H.matches(L))){var j=H.value,ee=!1,de=Jt(H)||"";de==="radio"||de==="checkbox"?ee=H.checked:(E[C.toLowerCase()]||E[de])&&(j=Zt({element:H,maskInputOptions:E,tagName:C,type:de,value:j,maskInputFn:B})),N(H,W?{text:j,isChecked:ee,userTriggered:G}:{text:j,isChecked:ee});var ae=H.name;de==="radio"&&ae&&ee&&b.querySelectorAll('input[type="radio"][name="'+ae+'"]').forEach((te=>{if(te!==H){var oe=te.value;N(te,W?{text:oe,isChecked:!ee,userTriggered:!1}:{text:oe,isChecked:!ee})}}))}}function N(P,H){var G=cs.get(P);if(!G||G.text!==H.text||G.isChecked!==H.isChecked){cs.set(P,H);var C=T.getId(P);J(v)(Y({},H,{id:C}))}}var O=(M.input==="last"?["change"]:["input","change"]).map((P=>fe(P,J(F),b))),q=b.defaultView;if(!q)return()=>{O.forEach((P=>P()))};var A=q.Object.getOwnPropertyDescriptor(q.HTMLInputElement.prototype,"value");return A&&A.set&&O.push(...[[q.HTMLInputElement.prototype,"value"],[q.HTMLInputElement.prototype,"checked"],[q.HTMLSelectElement.prototype,"value"],[q.HTMLTextAreaElement.prototype,"value"],[q.HTMLSelectElement.prototype,"selectedIndex"],[q.HTMLOptionElement.prototype,"selected"]].map((P=>Kt(P[0],P[1],{set(){J(F)({target:this,isTrusted:!1})}},!1,q)))),J((()=>{O.forEach((P=>P()))}))})(t),c=(function(y){var{mediaInteractionCb:v,blockClass:b,blockSelector:T,mirror:w,sampling:p,doc:_}=y,L=J((B=>xt(J((M=>{var W=Lt(M);if(W&&!me(W,b,T,!0)){var{currentTime:F,volume:N,muted:O,playbackRate:q,loop:A}=W;v({type:B,id:w.getId(W),currentTime:F,volume:N,muted:O,playbackRate:q,loop:A})}})),p.media||500))),E=[fe("play",L(ht.Play),_),fe("pause",L(ht.Pause),_),fe("seeked",L(ht.Seeked),_),fe("volumechange",L(ht.VolumeChange),_),fe("ratechange",L(ht.RateChange),_)];return J((()=>{E.forEach((B=>B()))}))})(t),m=()=>{},h=()=>{},I=()=>{},g=()=>{};t.recordDOM&&(m=(function(y,v){var{styleSheetRuleCb:b,mirror:T,stylesheetManager:w}=y,{win:p}=v;if(!p.CSSStyleSheet||!p.CSSStyleSheet.prototype)return()=>{};var _=p.CSSStyleSheet.prototype.insertRule;p.CSSStyleSheet.prototype.insertRule=new Proxy(_,{apply:J(((F,N,O)=>{var[q,A]=O,{id:P,styleId:H}=Ve(N,T,w.styleMirror);return(P&&P!==-1||H&&H!==-1)&&b({id:P,styleId:H,adds:[{rule:q,index:A}]}),F.apply(N,O)}))}),p.CSSStyleSheet.prototype.addRule=function(F,N,O){return O===void 0&&(O=this.cssRules.length),p.CSSStyleSheet.prototype.insertRule.apply(this,[F+" { "+N+" }",O])};var L,E,B=p.CSSStyleSheet.prototype.deleteRule;p.CSSStyleSheet.prototype.deleteRule=new Proxy(B,{apply:J(((F,N,O)=>{var[q]=O,{id:A,styleId:P}=Ve(N,T,w.styleMirror);return(A&&A!==-1||P&&P!==-1)&&b({id:A,styleId:P,removes:[{index:q}]}),F.apply(N,O)}))}),p.CSSStyleSheet.prototype.removeRule=function(F){return p.CSSStyleSheet.prototype.deleteRule.apply(this,[F])},p.CSSStyleSheet.prototype.replace&&(L=p.CSSStyleSheet.prototype.replace,p.CSSStyleSheet.prototype.replace=new Proxy(L,{apply:J(((F,N,O)=>{var[q]=O,{id:A,styleId:P}=Ve(N,T,w.styleMirror);return(A&&A!==-1||P&&P!==-1)&&b({id:A,styleId:P,replace:q}),F.apply(N,O)}))})),p.CSSStyleSheet.prototype.replaceSync&&(E=p.CSSStyleSheet.prototype.replaceSync,p.CSSStyleSheet.prototype.replaceSync=new Proxy(E,{apply:J(((F,N,O)=>{var[q]=O,{id:A,styleId:P}=Ve(N,T,w.styleMirror);return(A&&A!==-1||P&&P!==-1)&&b({id:A,styleId:P,replaceSync:q}),F.apply(N,O)}))}));var M={};rr("CSSGroupingRule")?M.CSSGroupingRule=p.CSSGroupingRule:(rr("CSSMediaRule")&&(M.CSSMediaRule=p.CSSMediaRule),rr("CSSConditionRule")&&(M.CSSConditionRule=p.CSSConditionRule),rr("CSSSupportsRule")&&(M.CSSSupportsRule=p.CSSSupportsRule));var W={};return Object.entries(M).forEach((F=>{var[N,O]=F;W[N]={insertRule:O.prototype.insertRule,deleteRule:O.prototype.deleteRule},O.prototype.insertRule=new Proxy(W[N].insertRule,{apply:J(((q,A,P)=>{var[H,G]=P,{id:C,styleId:j}=Ve(A.parentStyleSheet,T,w.styleMirror);return(C&&C!==-1||j&&j!==-1)&&b({id:C,styleId:j,adds:[{rule:H,index:[...er(A),G||0]}]}),q.apply(A,P)}))}),O.prototype.deleteRule=new Proxy(W[N].deleteRule,{apply:J(((q,A,P)=>{var[H]=P,{id:G,styleId:C}=Ve(A.parentStyleSheet,T,w.styleMirror);return(G&&G!==-1||C&&C!==-1)&&b({id:G,styleId:C,removes:[{index:[...er(A),H]}]}),q.apply(A,P)}))})})),J((()=>{p.CSSStyleSheet.prototype.insertRule=_,p.CSSStyleSheet.prototype.deleteRule=B,L&&(p.CSSStyleSheet.prototype.replace=L),E&&(p.CSSStyleSheet.prototype.replaceSync=E),Object.entries(M).forEach((F=>{var[N,O]=F;O.prototype.insertRule=W[N].insertRule,O.prototype.deleteRule=W[N].deleteRule}))}))})(t,{win:s}),h=hs(t,t.doc),I=(function(y,v){var{styleDeclarationCb:b,mirror:T,ignoreCSSAttributes:w,stylesheetManager:p}=y,{win:_}=v,L=_.CSSStyleDeclaration.prototype.setProperty;_.CSSStyleDeclaration.prototype.setProperty=new Proxy(L,{apply:J(((B,M,W)=>{var F,[N,O,q]=W;if(w.has(N))return L.apply(M,[N,O,q]);var{id:A,styleId:P}=Ve((F=M.parentRule)==null?void 0:F.parentStyleSheet,T,p.styleMirror);return(A&&A!==-1||P&&P!==-1)&&b({id:A,styleId:P,set:{property:N,value:O,priority:q},index:er(M.parentRule)}),B.apply(M,W)}))});var E=_.CSSStyleDeclaration.prototype.removeProperty;return _.CSSStyleDeclaration.prototype.removeProperty=new Proxy(E,{apply:J(((B,M,W)=>{var F,[N]=W;if(w.has(N))return E.apply(M,[N]);var{id:O,styleId:q}=Ve((F=M.parentRule)==null?void 0:F.parentStyleSheet,T,p.styleMirror);return(O&&O!==-1||q&&q!==-1)&&b({id:O,styleId:q,remove:{property:N},index:er(M.parentRule)}),B.apply(M,W)}))}),J((()=>{_.CSSStyleDeclaration.prototype.setProperty=L,_.CSSStyleDeclaration.prototype.removeProperty=E}))})(t,{win:s}),t.collectFonts&&(g=(function(y){var{fontCb:v,doc:b}=y,T=b.defaultView;if(!T)return()=>{};var w=[],p=new WeakMap,_=T.FontFace;T.FontFace=function(E,B,M){var W=new _(E,B,M);return p.set(W,{family:E,buffer:typeof B!="string",descriptors:M,fontSource:typeof B=="string"?B:JSON.stringify(Array.from(new Uint8Array(B)))}),W};var L=Qe(b.fonts,"add",(function(E){return function(B){return setTimeout(J((()=>{var M=p.get(B);M&&(v(M),p.delete(B))})),0),E.apply(this,[B])}}));return w.push((()=>{T.FontFace=_})),w.push(L),J((()=>{w.forEach((E=>E()))}))})(t)));var R=(function(y){var{doc:v,mirror:b,blockClass:T,blockSelector:w,selectionCb:p}=y,_=!0,L=J((()=>{var E=v.getSelection();if(!(!E||_&&E?.isCollapsed)){_=E.isCollapsed||!1;for(var B=[],M=E.rangeCount||0,W=0;M>W;W++){var F=E.getRangeAt(W),{startContainer:N,startOffset:O,endContainer:q,endOffset:A}=F;me(N,T,w,!0)||me(q,T,w,!0)||B.push({start:b.getId(N),startOffset:O,end:b.getId(q),endOffset:A})}p({ranges:B})}}));return L(),fe("selectionchange",L)})(t),S=(function(y){var{doc:v,customElementCb:b}=y,T=v.defaultView;return T&&T.customElements?Qe(T.customElements,"define",(function(w){return function(p,_,L){try{b({define:{name:p}})}catch{console.warn("Custom element callback failed for "+p)}return w.apply(this,[p,_,L])}})):()=>{}})(t),f=[];for(var x of t.plugins)f.push(x.observer(x.callback,s,x.options));return J((()=>{if(n){n.destroy(),n.reset();var y=Ie.indexOf(n);y!==-1&&Ie.splice(y,1)}r?.disconnect(),i(),o(),u(),l(),d(),c(),m(),h(),I(),g(),R(),S(),f.forEach((v=>v()))}))}function tr(t){return window[t]!==void 0}function rr(t){return!!(window[t]!==void 0&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class ps{constructor(e){k(this,"iframeIdToRemoteIdMap",new WeakMap),k(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,r,n,s){var a=n||this.getIdToRemoteIdMap(e),i=s||this.getRemoteIdToIdMap(e),o=a.get(r);return o||(o=this.generateIdFn(),a.set(r,o),i.set(o,r)),o}getIds(e,r){var n=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return r.map((a=>this.getId(e,a,n,s)))}getRemoteId(e,r,n){var s=n||this.getRemoteIdToIdMap(e);return typeof r!="number"?r:s.get(r)||-1}getRemoteIds(e,r){var n=this.getRemoteIdToIdMap(e);return r.map((s=>this.getRemoteId(e,s,n)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){var r=this.iframeIdToRemoteIdMap.get(e);return r||this.iframeIdToRemoteIdMap.set(e,r=new Map),r}getRemoteIdToIdMap(e){var r=this.iframeRemoteIdToIdMap.get(e);return r||this.iframeRemoteIdToIdMap.set(e,r=new Map),r}}class La{constructor(e){k(this,"iframes",new WeakMap),k(this,"crossOriginIframeMap",new WeakMap),k(this,"crossOriginIframeMirror",new ps(Hn)),k(this,"crossOriginIframeStyleMirror"),k(this,"crossOriginIframeRootIdMap",new WeakMap),k(this,"mirror"),k(this,"mutationCb"),k(this,"wrappedEmit"),k(this,"loadListener"),k(this,"pageHideListener"),k(this,"stylesheetManager"),k(this,"recordCrossOriginIframes"),k(this,"messageHandler"),k(this,"nestedIframeListeners",new Map),k(this,"attachedIframes",new Map),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ps(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}addPageHideListener(e){this.pageHideListener=e}removeLoadListener(){this.loadListener=void 0}trackIframeContent(e,r){var n=this.mirror.getId(e);return this.attachedIframes.set(n,{element:e,content:r}),n}attachIframe(e,r){var n,s,a=this.trackIframeContent(e,r);this.mutationCb({adds:[{parentId:a,nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0});var i=e.contentWindow;if(this.recordCrossOriginIframes&&i&&!this.nestedIframeListeners.has(i)){var o=this.handleMessage.bind(this);this.nestedIframeListeners.set(i,o),i.addEventListener("message",o)}(n=e.contentWindow)==null||n.addEventListener("pagehide",(()=>{var u;(u=this.pageHideListener)==null||u.call(this,e),e.contentDocument&&this.mirror.removeNodeFromMap(e.contentDocument),e.contentWindow&&this.crossOriginIframeMap.delete(e.contentWindow)})),(s=this.loadListener)==null||s.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){var r=e;if(r.data.type==="rrweb"&&r.origin===r.data.origin&&e.source){var n=this.crossOriginIframeMap.get(e.source);if(n){var s=this.transformCrossOriginEvent(n,r.data.event);s&&this.wrappedEmit(s,r.data.isCheckout)}}}transformCrossOriginEvent(e,r){var n;switch(r.type){case X.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(r.data.node,e);var s=r.data.node.id;return this.crossOriginIframeRootIdMap.set(e,s),this.patchRootIdOnNode(r.data.node,s),this.trackIframeContent(e,r.data.node),{timestamp:r.timestamp,type:X.IncrementalSnapshot,data:{source:Z.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case X.Meta:case X.Load:case X.DomContentLoaded:return!1;case X.Plugin:return r;case X.Custom:return this.replaceIds(r.data.payload,e,["id","parentId","previousId","nextId"]),r;case X.IncrementalSnapshot:switch(r.data.source){case Z.Mutation:return r.data.adds.forEach((a=>{this.replaceIds(a,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(a.node,e);var i=this.crossOriginIframeRootIdMap.get(e);i&&this.patchRootIdOnNode(a.node,i)})),r.data.removes.forEach((a=>{this.replaceIds(a,e,["parentId","id"])})),r.data.attributes.forEach((a=>{this.replaceIds(a,e,["id"])})),r.data.texts.forEach((a=>{this.replaceIds(a,e,["id"])})),r;case Z.Drag:case Z.TouchMove:case Z.MouseMove:return r.data.positions.forEach((a=>{this.replaceIds(a,e,["id"])})),r;case Z.ViewportResize:return!1;case Z.MediaInteraction:case Z.MouseInteraction:case Z.Scroll:case Z.CanvasMutation:case Z.Input:return this.replaceIds(r.data,e,["id"]),r;case Z.StyleSheetRule:case Z.StyleDeclaration:return this.replaceIds(r.data,e,["id"]),this.replaceStyleIds(r.data,e,["styleId"]),r;case Z.Font:return r;case Z.Selection:return r.data.ranges.forEach((a=>{this.replaceIds(a,e,["start","end"])})),r;case Z.AdoptedStyleSheet:return this.replaceIds(r.data,e,["id"]),this.replaceStyleIds(r.data,e,["styleIds"]),(n=r.data.styles)==null||n.forEach((a=>{this.replaceStyleIds(a,e,["styleId"])})),r}}return!1}replace(e,r,n,s){for(var a of s)(Array.isArray(r[a])||typeof r[a]=="number")&&(r[a]=Array.isArray(r[a])?e.getIds(n,r[a]):e.getId(n,r[a]));return r}replaceIds(e,r,n){return this.replace(this.crossOriginIframeMirror,e,r,n)}replaceStyleIds(e,r,n){return this.replace(this.crossOriginIframeStyleMirror,e,r,n)}replaceIdOnNode(e,r){this.replaceIds(e,r,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((n=>{this.replaceIdOnNode(n,r)}))}patchRootIdOnNode(e,r){e.type===le.Document||e.rootId||(e.rootId=r),"childNodes"in e&&e.childNodes.forEach((n=>{this.patchRootIdOnNode(n,r)}))}removeIframeById(e){var r=this.attachedIframes.get(e),n=r?.element||this.mirror.getNode(e);if(n){var s=n.contentWindow;if(s&&this.nestedIframeListeners.has(s)){var a=this.nestedIframeListeners.get(s);Dr((()=>s.removeEventListener("message",a))),this.nestedIframeListeners.delete(s)}s&&this.crossOriginIframeMap.delete(s),this.iframes.delete(n)}r&&this.attachedIframes.delete(e)}reattachIframes(){this.attachedIframes.forEach(((e,r)=>{var{content:n}=e;this.mirror.has(r)?this.mutationCb({adds:[{parentId:r,nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}):this.attachedIframes.delete(r)}))}destroy(){this.recordCrossOriginIframes&&window.removeEventListener("message",this.messageHandler),this.nestedIframeListeners.forEach(((e,r)=>{Dr((()=>r.removeEventListener("message",e)))})),this.nestedIframeListeners.clear(),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset(),this.attachedIframes.clear(),this.crossOriginIframeMap=new WeakMap,this.iframes=new WeakMap,this.crossOriginIframeRootIdMap=new WeakMap}}class Na{constructor(e){k(this,"shadowDoms",new WeakSet),k(this,"mutationCb"),k(this,"scrollCb"),k(this,"bypassOptions"),k(this,"mirror"),k(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,r){if(Rt(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var{observer:n,buffer:s}=us(Y({},this.bypassOptions,{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push((()=>{n.disconnect(),s.destroy();var a=Ie.indexOf(s);a!==-1&&Ie.splice(a,1)})),this.restoreHandlers.push(ds(Y({},this.bypassOptions,{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(U.host(e))),this.restoreHandlers.push(hs({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,r){var n=this;this.restoreHandlers.push(Qe(e.prototype,"attachShadow",(function(s){return function(a){var i=s.call(this,a),o=U.shadowRoot(this);return o&&ns(this)&&n.addShadowRoot(o,r),i}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch{}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Nt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Da=typeof Uint8Array>"u"?[]:new Uint8Array(256),nr=0;64>nr;nr++)Da[Nt.charCodeAt(nr)]=nr;var fs=new Map,ms=(t,e,r)=>{if(t&&(vs(t,e)||typeof t=="object")){var n=(function(a,i){var o=fs.get(a);return o||fs.set(a,o=new Map),o.has(i)||o.set(i,[]),o.get(i)})(r,t.constructor.name),s=n.indexOf(t);return s===-1&&(s=n.length,n.push(t)),s}};function sr(t,e,r,n){if(t instanceof Array)return t.map((u=>sr(u,e,r,n)));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){var s=t.constructor.name,a=(function(u){var l,d=new Uint8Array(u),c=d.length,m="";for(l=0;c>l;l+=3)m+=Nt[d[l]>>2],m+=Nt[(3&d[l])<<4|d[l+1]>>4],m+=Nt[(15&d[l+1])<<2|d[l+2]>>6],m+=Nt[63&d[l+2]];return c%3==2?m=m.substring(0,m.length-1)+"=":c%3==1&&(m=m.substring(0,m.length-2)+"=="),m})(t);return{rr_type:s,base64:a}}if(t instanceof DataView)return{rr_type:t.constructor.name,args:[sr(t.buffer,e,r,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){var i=t.constructor.name,{src:o}=t;return{rr_type:i,src:o}}return t instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:t.toDataURL(n.type,n.quality)}:t instanceof ImageData?{rr_type:t.constructor.name,args:[sr(t.data,e,r,n),t.width,t.height]}:vs(t,e)||typeof t=="object"?{rr_type:t.constructor.name,index:ms(t,e,r)}:t}var gs=(t,e,r,n)=>t.map((s=>sr(s,e,r,n))),vs=(t,e)=>{var r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((n=>typeof e[n]=="function"));return!!r.find((n=>t instanceof e[n]))};function ys(t,e,r,n){var s=[];try{var a=Qe(t.HTMLCanvasElement.prototype,"getContext",(function(i){return function(o){for(var u=arguments.length,l=new Array(u>1?u-1:0),d=1;u>d;d++)l[d-1]=arguments[d];if(!me(this,e,r,!0)){var c=(function(h){return h==="experimental-webgl"?"webgl":h})(o);if("__context"in this||(this.__context=c),n&&["webgl","webgl2"].includes(c))if(l[0]&&typeof l[0]=="object"){var m=l[0];m.preserveDrawingBuffer||(m.preserveDrawingBuffer=!0)}else l.splice(0,1,{preserveDrawingBuffer:!0})}return i.apply(this,[o,...l])}}));s.push(a)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach((i=>i()))}}function bs(t,e,r,n,s,a,i){var o=[],u=Object.getOwnPropertyNames(t),l=function(c){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(c))return 0;try{if(typeof t[c]!="function")return 0;var m=Qe(t,c,(function(I){return function(){for(var g=arguments.length,R=new Array(g),S=0;g>S;S++)R[S]=arguments[S];var f=I.apply(this,R);if(ms(f,a,this),"tagName"in this.canvas&&!me(this.canvas,n,s,!0)){var x=gs(R,a,this,i);r(this.canvas,{type:e,property:c,args:x})}return f}}));o.push(m)}catch{var h=Kt(t,c,{set(g){r(this.canvas,{type:e,property:c,args:[g],setter:!0})}});o.push(h)}};for(var d of u)l(d);return o}var se,ar,Wr,Ss=`(function() {
|
|
4
4
|
"use strict";
|
|
@@ -106,4 +106,4 @@ or you can use record.mirror to access the mirror instance during recording.`,Zn
|
|
|
106
106
|
`),n=[],s=0,a=r.length;a>s;s+=2){var i=e.exec(r[s]);i&&n.push(new yt({functionName:i[3]||void 0,fileName:i[2],lineNumber:parseFloat(i[1])}))}return n},parseOpera11(t){return t.stack.split(`
|
|
107
107
|
`).filter((function(e){return!!e.match(qa)&&!e.match(/^Error created at/)}),this).map((function(e){var r=e.split("@"),n=this.extractLocation(r.pop()),s=(r.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new yt({functionName:s,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}),this)}};function za(t){if(!t||!t.outerHTML)return"";for(var e="";t.parentElement;){var r=t.localName;if(!r)break;r=r.toLowerCase();var n=t.parentElement,s=[];if(n.children&&n.children.length>0)for(var a=0;n.children.length>a;a++){var i=n.children[a];i.localName&&i.localName.toLowerCase&&i.localName.toLowerCase()===r&&s.push(i)}s.length>1&&(r+=":eq("+s.indexOf(t)+")"),e=r+(e?">"+e:""),t=n}return e}function Is(t){return Array.isArray(t)}function zr(t){return typeof t=="object"&&t!==null&&!Is(t)}function Cs(t,e){if(e===0)return!0;var r=Object.keys(t);for(var n of r)if(zr(t[n])&&Cs(t[n],e-1))return!0;return!1}function bt(t,e){var r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,e);var n=[],s=[];return JSON.stringify(t,(function(a,i){if(n.length>0){var o=n.indexOf(this);~o?n.splice(o+1):n.push(this),~o?s.splice(o,1/0,a):s.push(a),~n.indexOf(i)&&(i=n[0]===i?"[Circular ~]":"[Circular ~."+s.slice(0,n.indexOf(i)).join(".")+"]")}else n.push(i);if(i===null)return i;if(i===void 0)return"undefined";if(zr(u=i)&&Object.keys(u).length>r.numOfKeysLimit||typeof u=="function"||zr(u)&&Cs(u,r.depthOfLimit))return(function(m){var h=m.toString();return r.stringLengthLimit&&h.length>r.stringLengthLimit&&(h=h.slice(0,r.stringLengthLimit)+"..."),h})(i);var u;if(typeof i=="bigint")return i.toString()+"n";if(i instanceof Event){var l={};for(var d in i){var c=i[d];l[d]=Is(c)?za(c.length?c[0]:null):c}return l}return i instanceof Node?i instanceof HTMLElement?i?i.outerHTML:"":i.nodeName:i instanceof Error?i.stack?i.stack+`
|
|
108
108
|
End of stack for Error object`:i.name+": "+i.message:i}))}var _s={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function Ua(t,e,r){var n,s=r?Object.assign({},_s,r):_s,a=s.logger;if(!a)return()=>{};n=typeof a=="string"?e[a]:a;var i=0,o=!1,u=[];if(s.level.includes("error")){var l=h=>{var I=h.message,g=Hr.parse(h.error).map((S=>S.toString())),R=[bt(I,s.stringifyOptions)];t({level:"error",trace:g,payload:R})};e.addEventListener("error",l),u.push((()=>{e.removeEventListener("error",l)}));var d=h=>{var I,g;h.reason instanceof Error?g=[bt("Uncaught (in promise) "+(I=h.reason).name+": "+I.message,s.stringifyOptions)]:(I=new Error,g=[bt("Uncaught (in promise)",s.stringifyOptions),bt(h.reason,s.stringifyOptions)]);var R=Hr.parse(I).map((S=>S.toString()));t({level:"error",trace:R,payload:g})};e.addEventListener("unhandledrejection",d),u.push((()=>{e.removeEventListener("unhandledrejection",d)}))}for(var c of s.level)u.push(m(n,c));return()=>{u.forEach((h=>h()))};function m(h,I){var g=this;return h[I]?(function(R,S,f){try{if(!(S in R))return()=>{};var x=R[S],y=(v=>function(){for(var b=arguments.length,T=new Array(b),w=0;b>w;w++)T[w]=arguments[w];if(v.apply(g,T),!(I==="assert"&&T[0]||o)){o=!0;try{var p=Hr.parse(new Error).map((L=>L.toString())).splice(1),_=(I==="assert"?T.slice(1):T).map((L=>bt(L,s.stringifyOptions)));i++,s.lengthThreshold>i?t({level:I,trace:p,payload:_}):i===s.lengthThreshold&&t({level:"warn",trace:[],payload:[bt("The number of log records reached the threshold.")]})}catch(L){v("rrweb logger error:",L,...T)}finally{o=!1}}})(x);return typeof y=="function"&&(y.prototype=y.prototype||{},Object.defineProperties(y,{__rrweb_original__:{enumerable:!1,value:x}})),R[S]=y,()=>{R[S]=x}}catch{return()=>{}}})(h,I):()=>{}}}var Q=typeof window<"u"?window:void 0,Ze=typeof globalThis<"u"?globalThis:Q;typeof self>"u"&&(Ze.self=Ze),typeof File>"u"&&(Ze.File=function(){});var Ft=Ze?.document;Ze!=null&&Ze.XMLHttpRequest&&new Ze.XMLHttpRequest;var Ne=Q??{},Ms=Object.prototype,$a=Ms.hasOwnProperty,lr=Ms.toString,tt=Array.isArray||function(t){return lr.call(t)==="[object Array]"},At=t=>typeof t=="function",Me=t=>t===Object(t)&&!tt(t),ue=t=>t===void 0,St=t=>lr.call(t)=="[object String]",qe=t=>t===null,Re=t=>ue(t)||qe(t),Ee=t=>lr.call(t)=="[object Number]"&&t==t,He=t=>lr.call(t)==="[object Boolean]",Ts=t=>t instanceof FormData;function rt(t,e,r,n,s){return e>r&&(n.warn("min cannot be greater than max."),e=r),Ee(t)?t>r?(n.warn(" cannot be greater than max: "+r+". Using max value instead."),r):e>t?(n.warn(" cannot be less than min: "+e+". Using min value instead."),e):t:(n.warn(" must be a number. using max or fallback. max: "+r+", fallback: "+s),rt(s||r,e,r,n))}class ja{constructor(e){this.Pt={},this.Dt=e.Dt,this.jt=rt(e.bucketSize,0,100,e.qt),this.$t=rt(e.refillRate,0,this.jt,e.qt),this.Vt=rt(e.refillInterval,0,864e5,e.qt)}Ht(e,r){var n=Math.floor((r-e.lastAccess)/this.Vt);n>0&&(e.tokens=Math.min(e.tokens+n*this.$t,this.jt),e.lastAccess=e.lastAccess+n*this.Vt)}consumeRateLimit(e){var r,n=Date.now(),s=String(e),a=this.Pt[s];return a?this.Ht(a,n):this.Pt[s]=a={tokens:this.jt,lastAccess:n},a.tokens===0||(a.tokens--,a.tokens===0&&((r=this.Dt)==null||r.call(this,e)),a.tokens===0)}stop(){this.Pt={}}}var Ga=t=>t instanceof Document,Va="1.369.0",Za="web",Rs=function(t,e){var{debugEnabled:r}=e===void 0?{}:e,n={C(s){if(Q&&(Ne.POSTHOG_DEBUG||r)&&!ue(Q.console)&&Q.console){for(var a=("__rrweb_original__"in Q.console[s])?Q.console[s].__rrweb_original__:Q.console[s],i=arguments.length,o=new Array(i>1?i-1:0),u=1;i>u;u++)o[u-1]=arguments[u];a(t,...o)}},info(){for(var s=arguments.length,a=new Array(s),i=0;s>i;i++)a[i]=arguments[i];n.C("log",...a)},warn(){for(var s=arguments.length,a=new Array(s),i=0;s>i;i++)a[i]=arguments[i];n.C("warn",...a)},error(){for(var s=arguments.length,a=new Array(s),i=0;s>i;i++)a[i]=arguments[i];n.C("error",...a)},critical(){for(var s=arguments.length,a=new Array(s),i=0;s>i;i++)a[i]=arguments[i];console.error(t,...a)},uninitializedWarning(s){n.error("You must initialize PostHog before calling "+s)},createLogger:(s,a)=>Rs(t+" "+s,a)};return n},nt=Rs("[PostHog.js]"),Pt=nt.createLogger;function Ur(t,e){if(!Re(t))if(tt(t))t.forEach(e);else if(Ts(t))t.forEach(((n,s)=>e(n,s)));else for(var r in t)$a.call(t,r)&&e(t[r],r)}function ur(t,e,r,n){var{capture:s=!1,passive:a=!0}={};t?.addEventListener(e,r,{capture:s,passive:a})}var Ja=["localhost","127.0.0.1"],Es=t=>{var e=Ft?.createElement("a");return ue(e)?null:(e.href=t,e)},Ya=function(t,e){var r,n;e===void 0&&(e="&");var s=[];return Ur(t,(function(a,i){ue(a)||ue(i)||i==="undefined"||(r=encodeURIComponent((o=>o instanceof File)(a)?a.name:a.toString()),n=encodeURIComponent(i),s[s.length]=n+"="+r)})),s.join(e)};function xs(t,e,r){try{if(!(e in t))return()=>{};var n=t[e],s=r(n);return At(s)&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__posthog_wrapped__:{enumerable:!1,value:!0}})),t[e]=s,()=>{t[e]=n}}catch{return()=>{}}}function $r(t,e){var r,n=(function(i){try{return typeof i=="string"?new URL(i).hostname:"url"in i?new URL(i.url).hostname:i.hostname}catch{return null}})(t),s={hostname:n,isHostDenied:!1};if((r=e.payloadHostDenyList)==null||!r.length||n==null||!n.trim().length)return s;for(var a of e.payloadHostDenyList)if(n.endsWith(a))return{hostname:n,isHostDenied:!0};return s}var Os="$session_recording_remote_config",st="$session_is_sampled",dr="$session_past_minimum_duration",jr="$session_recording_url_trigger_activated_session",Gr="$session_recording_event_trigger_activated_session",Vr="$posthog_sr_group_event_trigger_",Zr="$posthog_sr_group_url_trigger_",Ls="$posthog_sr_group_sampling_",Jr="$debug_first_full_snapshot_timestamp",Ns="$stored_person_properties",Xa=new RegExp("(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})"),Ka=new RegExp("(\\d{3}-?\\d{2}-?\\d{4})"),Yr="[SessionRecording]",Xr="redacted",wt={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:t=>t,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io",".clarity.ms","analytics.google.com","bam.nr-data.net"]},Qa=["authorization","x-forwarded-for","authorization","cookie","set-cookie","x-api-key","x-real-ip","remote-addr","forwarded","proxy-authorization","x-csrf-token","x-csrftoken","x-xsrf-token"],ei=["password","secret","passwd","api_key","apikey","auth","credentials","mysql_pwd","privatekey","private_key","token"],ti=["/s/","/e/","/i/"];function Ds(t,e,r,n){if(Re(t))return t;var s=e?.["content-length"]||(function(a){return new Blob([a]).size})(t);return St(s)&&(s=parseInt(s)),s>r?Yr+" "+n+" body too large to record ("+s+" bytes)":t}function Fs(t,e){if(Re(t))return t;var r=t;return(function(n,s){return!(Re(n)||St(n)&&(n=n.trim(),Xa.test((n||"").replace(/[- ]/g,""))||Ka.test(n)))})(r)||(r=Yr+" "+e+" body "+Xr),Ur(ei,(n=>{var s,a;(s=r)!=null&&s.length&&((a=r)==null?void 0:a.indexOf(n))!==-1&&(r=Yr+" "+e+" body "+Xr+" as might contain: "+n)})),r}var As=Pt("[Recorder]"),Ps=t=>t.entryType==="navigation",Kr=t=>t.entryType==="resource";function cr(t,e){return!!e&&(He(e)||e[t])}function hr(t){var{type:e,recordBody:r,headers:n,url:s}=t;function a(o){var u=Object.keys(n).find((d=>d.toLowerCase()==="content-type")),l=u&&n[u];return o.some((d=>l?.includes(d)))}if(!r||(function o(u){try{return typeof u=="string"?u.startsWith("blob:"):u instanceof URL?u.protocol==="blob:":u instanceof Request&&o(u.url)}catch{return!1}})(s))return!1;if(He(r))return!0;if(tt(r))return a(r);var i=r[e];return He(i)?i:a(i)}function Qr(t,e,r,n,s,a){return en.apply(this,arguments)}function en(){return en=je((function*(t,e,r,n,s,a){if(a===void 0&&(a=0),a>10)return As.warn("Failed to get performance entry for request",{url:r,initiatorType:e}),null;var i=(function(o,u){for(var l=o.length-1;l>=0;l-=1)if(Kr(d=o[l])&&d.initiatorType===e&&(ue(n)||d.startTime>=n)&&(ue(s)||s>=d.startTime))return o[l];var d})(t.performance.getEntriesByName(r));return i||(yield new Promise((o=>setTimeout(o,50*a))),Qr(t,e,r,n,s,a+1))})),en.apply(this,arguments)}function Bs(t){var{body:e,options:r,url:n}=t;if(Re(e))return null;var{hostname:s,isHostDenied:a}=$r(n,r);if(a)return s+" is in deny list";if(St(e))return e;if(Ga(e))return e.textContent;if(Ts(e))return Ya(e);if(Me(e))try{return JSON.stringify(e)}catch{return"[SessionReplay] Failed to stringify response object"}return"[SessionReplay] Cannot read body of type "+toString.call(e)}var ri=t=>!qe(t)&&(t.entryType==="navigation"||t.entryType==="resource");function pr(t){var{entry:e,method:r,status:n,networkRequest:s,isInitial:a,start:i,end:o,url:u,initiatorType:l}=t;i=e?e.startTime:i,o=e?e.responseEnd:o;var d=Math.floor(Date.now()-performance.now()),c=Math.floor(d+(i||0)),m=[Y({},e?e.toJSON():{name:u},{startTime:ue(i)?void 0:Math.round(i),endTime:ue(o)?void 0:Math.round(o),timeOrigin:d,timestamp:c,method:r,initiatorType:l||(e?e.initiatorType:void 0),status:n,requestHeaders:s.requestHeaders,requestBody:s.requestBody,responseHeaders:s.responseHeaders,responseBody:s.responseBody,isInitial:a})];if(ri(e))for(var h of e.serverTiming||[])m.push({timeOrigin:d,timestamp:c,startTime:Math.round(e.startTime),name:h.name,duration:h.duration,entryType:"serverTiming"});return m}var ni=["video/","audio/"];function Ws(t){return new Promise((e=>{var r=setTimeout((()=>e("[SessionReplay] Timeout while trying to read body")),500);try{t.clone().text().then((n=>e(n)),(n=>e("[SessionReplay] Failed to read body: "+n))).finally((()=>clearTimeout(r)))}catch{clearTimeout(r),e("[SessionReplay] Failed to read body")}}))}function qs(){return(qs=je((function*(t){var{r:e,options:r,url:n}=t,{hostname:s,isHostDenied:a}=$r(n,r);return a?Promise.resolve(s+" is in deny list"):Ws(e)}))).apply(this,arguments)}function Hs(){return(Hs=je((function*(t){var{r:e,options:r,url:n}=t,s=(function(a){var i,{r:o,options:u,url:l}=a;if(o.headers.get("Transfer-Encoding")==="chunked")return"Chunked Transfer-Encoding is not supported";var d=(i=o.headers.get("Content-Type"))==null?void 0:i.toLowerCase(),c=ni.some((I=>d?.startsWith(I)));if(d&&c)return"Content-Type "+d+" is not supported";var{hostname:m,isHostDenied:h}=$r(l,u);return h?m+" is in deny list":null})({r:e,options:r,url:n});return qe(s)?Ws(e):Promise.resolve(s)}))).apply(this,arguments)}var tn=null;function si(t,e,r){if(!("performance"in e))return()=>{};if(tn)return As.warn("Network observer already initialised, doing nothing"),()=>{};var n=r?Object.assign({},wt,r):wt,s=u=>{var l=[];u.requests.forEach((d=>{var c=n.maskRequestFn(d);c&&l.push(c)})),l.length>0&&t(Y({},u,{requests:l}))},a=(function(u,l,d){if(d.recordInitialRequests){var c=l.performance.getEntries().filter((I=>Ps(I)||Kr(I)&&d.initiatorTypes.includes(I.initiatorType)));u({requests:c.flatMap((I=>pr({entry:I,method:void 0,status:void 0,networkRequest:{},isInitial:!0}))),isInitial:!0})}var m=new l.PerformanceObserver((I=>{var g=I.getEntries().filter((R=>Ps(R)||Kr(R)&&d.initiatorTypes.includes(R.initiatorType)&&(S=>!d.recordBody&&!d.recordHeaders||S.initiatorType!=="xmlhttprequest"&&S.initiatorType!=="fetch")(R)));u({requests:g.flatMap((R=>pr({entry:R,method:void 0,status:void 0,networkRequest:{}})))})})),h=PerformanceObserver.supportedEntryTypes.filter((I=>d.performanceEntryTypeToObserve.includes(I)));return m.observe({entryTypes:h}),()=>{m.disconnect()}})(s,e,n),i=()=>{},o=()=>{};return(n.recordHeaders||n.recordBody)&&(i=(function(u,l,d){if(!d.initiatorTypes.includes("xmlhttprequest"))return()=>{};var c=cr("request",d.recordHeaders),m=cr("response",d.recordHeaders),h=xs(l.XMLHttpRequest.prototype,"open",(I=>function(g,R,S,f,x){S===void 0&&(S=!0);var y,v,b=this,T=new Request(R),w={},p={},_=b.setRequestHeader.bind(b);b.setRequestHeader=(M,W)=>(p[M]=W,_(M,W)),c&&(w.requestHeaders=p);var L=b.send.bind(b);b.send=M=>(hr({type:"request",headers:p,url:R,recordBody:d.recordBody})&&(w.requestBody=Bs({body:M,options:d,url:R})),y=l.performance.now(),L(M));var E=()=>{b.removeEventListener("readystatechange",B),b.removeEventListener("error",E),b.removeEventListener("abort",E),b.removeEventListener("timeout",E)},B=()=>{if(b.readyState===b.DONE){E(),v=l.performance.now();var M={};b.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((W=>{var F=W.split(": "),N=F.shift(),O=F.join(": ");N&&(M[N]=O)})),m&&(w.responseHeaders=M),hr({type:"response",headers:M,url:R,recordBody:d.recordBody})&&(w.responseBody=Bs({body:b.response,options:d,url:R})),Qr(l,"xmlhttprequest",T.url,y,v).then((W=>{var F=pr({entry:W,method:g,status:b?.status,networkRequest:w,start:y,end:v,url:R.toString(),initiatorType:"xmlhttprequest"});u({requests:F})})).catch((()=>{}))}};b.addEventListener("readystatechange",B),b.addEventListener("error",E),b.addEventListener("abort",E),b.addEventListener("timeout",E),I.call(b,g,R.toString(),S,f,x)}));return()=>{h()}})(s,e,n),o=(function(u,l,d){if(!d.initiatorTypes.includes("fetch"))return()=>{};var c=cr("request",d.recordHeaders),m=cr("response",d.recordHeaders),h=xs(l,"fetch",(I=>(function(){var g=je((function*(R,S){var f,x,y,v=new Request(R,S),b={};try{var T={};v.headers.forEach(((p,_)=>{T[_]=p})),c&&(b.requestHeaders=T),hr({type:"request",headers:T,url:R,recordBody:d.recordBody})&&(b.requestBody=yield(function(p){return qs.apply(this,arguments)})({r:v,options:d,url:R})),x=l.performance.now(),f=yield I(v),y=l.performance.now();var w={};return f.headers.forEach(((p,_)=>{w[_]=p})),m&&(b.responseHeaders=w),hr({type:"response",headers:w,url:R,recordBody:d.recordBody})&&(b.responseBody=yield(function(p){return Hs.apply(this,arguments)})({r:f,options:d,url:R})),f}finally{Qr(l,"fetch",v.url,x,y).then((p=>{var _,L=pr({entry:p,method:v.method,status:(_=f)==null?void 0:_.status,networkRequest:b,start:x,end:y,url:v.url,initiatorType:"fetch"});u({requests:L})})).catch((()=>{}))}}));return function(R,S){return g.apply(this,arguments)}})()));return()=>{h()}})(s,e,n)),tn=()=>{a(),i(),o(),tn=null}}var xe={DomContentLoaded:0,Load:1,FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Custom:5,Plugin:6},De="disabled",rn="sampled",fr="active",at="buffering",mr="paused",nn="rrweb_error",sn="trigger",Se=sn+"_activated",ve=sn+"_pending",Fe=sn+"_"+De;function an(t,e,r){return e.some((n=>{var s;return n.matching==="regex"&&((s=r?.get(n.url))!==null&&s!==void 0?s:new RegExp(n.url)).test(t)}))}class on{constructor(e){this.t=e}triggerStatus(e){var r=this.t.map((n=>n.triggerStatus(e)));return r.includes(Se)?Se:r.includes(ve)?ve:Fe}stop(){this.t.forEach((e=>e.stop()))}}class ln{constructor(e){this.t=e}triggerStatus(e){var r=new Set;for(var n of this.t)r.add(n.triggerStatus(e));switch(r.delete(Fe),r.size){case 0:return Fe;case 1:return Array.from(r)[0];default:return ve}}stop(){this.t.forEach((e=>e.stop()))}}class ai{triggerStatus(){return Se}stop(){}}var gr=t=>"sessionRecording"in t;class zs{constructor(e,r){this.u=[],this.ha=[],this.ca=new Map,this.va=new Map,this.fa="",this.urlBlocked=!1,this._instance=e,this.ga=r}onConfig(e){var r,n;this.u=(gr(e)?Me(e.sessionRecording)?(r=e.sessionRecording)==null?void 0:r.urlTriggers:[]:e?.urlTriggers)||[],this.ha=(gr(e)?Me(e.sessionRecording)?(n=e.sessionRecording)==null?void 0:n.urlBlocklist:[]:e?.urlBlocklist)||[],this.ma()}ma(){for(var e of(this.ca.clear(),this.va.clear(),this.u))if(e.matching==="regex"&&!this.ca.has(e.url))try{this.ca.set(e.url,new RegExp(e.url))}catch(n){nt.error("Invalid URL trigger regex pattern:",e.url,n)}for(var r of this.ha)if(r.matching==="regex"&&!this.va.has(r.url))try{this.va.set(r.url,new RegExp(r.url))}catch(n){nt.error("Invalid URL blocklist regex pattern:",r.url,n)}}onRemoteConfig(e){this.onConfig(e)}pa(e){var r;return this.u.length===0?Fe:((r=this._instance)==null?void 0:r.get_property(this.ga?Zr+this.ga:jr))===e?Se:ve}triggerStatus(e){var r=this.pa(e),n=r===Se?Se:r===ve?ve:Fe;return this._instance.register_for_session({$sdk_debug_replay_url_trigger_status:n}),n}checkUrlBlocklist(e,r){if(Q!==void 0&&Q.location.href){var n=Q.location.href;if(n!==this.fa){this.fa=n;var s=this.urlBlocked,a=an(n,this.ha,this.va);s&&a||(a&&!s?e():!a&&s&&r())}}}checkUrlTriggerConditions(e,r,n,s){if(Q!==void 0&&Q.location.href){var a=Q.location.href;if(a!==this.fa){this.fa=a;var i=this.urlBlocked,o=an(a,this.ha,this.va);o&&!i?e():!o&&i&&r();var u=this.pa(s)===Se,l=an(a,this.u,this.ca);!u&&l&&n("url",a)}}}stop(){this.fa=""}}class Us{constructor(e){this.linkedFlag=null,this.linkedFlagSeen=!1,this.Ia=()=>{},this._instance=e}triggerStatus(){var e=ve;return Re(this.linkedFlag)&&(e=Fe),this.linkedFlagSeen&&(e=Se),this._instance.register_for_session({$sdk_debug_replay_linked_flag_trigger_status:e}),e}onConfig(e,r){var n;if(this.linkedFlag=(gr(e)?Me(e.sessionRecording)?(n=e.sessionRecording)==null?void 0:n.linkedFlag:null:e?.linkedFlag)||null,!Re(this.linkedFlag)&&!this.linkedFlagSeen){var s=St(this.linkedFlag)?this.linkedFlag:this.linkedFlag.flag,a=St(this.linkedFlag)?null:this.linkedFlag.variant;this.Ia=this._instance.onFeatureFlags(((i,o)=>{var u=!1;if(Me(o)&&s in o){var l=o[s];u=He(l)?l===!0:a?l===a:!!l}this.linkedFlagSeen=u,u&&r(s,a)}))}}onRemoteConfig(e,r){this.onConfig(e,r)}stop(){this.Ia()}}class $s{constructor(e,r){this.ya=[],this._instance=e,this.ga=r}onConfig(e){var r;this.ya=(gr(e)?Me(e.sessionRecording)?(r=e.sessionRecording)==null?void 0:r.eventTriggers:[]:e?.eventTriggers)||[]}onRemoteConfig(e){this.onConfig(e)}ba(e){var r;return this.ya.length===0?Fe:((r=this._instance)==null?void 0:r.get_property(this.ga?Vr+this.ga:Gr))===e?Se:ve}triggerStatus(e){var r=this.ba(e),n=r===Se?Se:r===ve?ve:Fe;return this._instance.register_for_session({$sdk_debug_replay_event_trigger_status:n}),n}checkEventTriggerConditions(e,r,n){if(this.ya.length!==0){var s=this.ba(n)===Se,a=this.ya.includes(e);!s&&a&&r("event",e)}}stop(){}}class ii{constructor(e,r,n){if(this._instance=e,this.group=r,this.Ca=new zs(e,r.id),this.wa=new $s(e,r.id),this.Sa=new Us(e),r.conditions.events&&r.conditions.events.length>0||r.conditions.urls&&r.conditions.urls.length>0||r.conditions.flag){var s=(r.conditions.events||[]).map((o=>o.name)),a={urlTriggers:r.conditions.urls||[],eventTriggers:s,linkedFlag:r.conditions.flag||null,urlBlocklist:[]};this.Ca.onConfig(a),this.wa.onConfig(a),this.Sa.onConfig(a,n);var i=[this.wa,this.Ca,this.Sa];this.ka=r.conditions.matchType==="any"?new on(i):new ln(i)}else this.ka=new ai}triggerStatus(e){return this.ka.triggerStatus(e)}checkEventTriggerConditions(e,r,n){this.wa.checkEventTriggerConditions(e,r,n)}checkUrlTriggerConditions(e,r,n,s){this.Ca.checkUrlTriggerConditions(e,r,n,s)}activateTrigger(e,r){var n;(n=this._instance.persistence)==null||n.register({[e==="url"?Zr+this.group.id:Vr+this.group.id]:r})}stop(){this.Ca.stop(),this.wa.stop(),this.Sa.stop()}}function oi(t){if(t.rrwebError)return nn;if(!t.receivedFlags)return at;if(!t.isRecordingEnabled)return De;if(t.urlTriggerMatching.urlBlocked)return mr;var e=t.isSampled===!0,r=new on([t.eventTriggerMatching,t.urlTriggerMatching,t.linkedFlagMatching]).triggerStatus(t.sessionId);return e?rn:r===Se?fr:r===ve?at:t.isSampled===!1?De:fr}function js(t){if(t.rrwebError)return nn;if(!t.receivedFlags)return at;if(!t.isRecordingEnabled)return De;if(t.urlTriggerMatching.urlBlocked)return mr;var e=new ln([t.eventTriggerMatching,t.urlTriggerMatching,t.linkedFlagMatching]).triggerStatus(t.sessionId),r=e!==Fe,n=He(t.isSampled);return r&&e===ve?at:r&&e===Fe||n&&!t.isSampled?De:t.isSampled===!0?rn:fr}function Gs(t){var e,r;return((e=JSON.stringify(t,(r=[],function(n,s){if(Me(s)){for(;r.length>0&&r[r.length-1]!==this;)r.pop();return r.includes(s)?"[Circular]":(r.push(s),s)}return s})))==null?void 0:e.length)||0}function Bt(t){if(qe(t))return 4;if(ue(t))return 0;switch(typeof t){case"string":return t.length+2;case"number":return String(t).length;case"boolean":return t?4:5;case"object":if(tt(t)){for(var e=2,r=0;t.length>r;r++){r>0&&(e+=1);var n=t[r];e+=ue(n)||qe(n)?4:Bt(n)}return e}var s=t,a=2,i=!0;for(var o in s)if({}.hasOwnProperty.call(s,o)){var u=s[o];ue(u)||(i||(a+=1),i=!1,a+=o.length+3+Bt(u))}return a;default:return 0}}var Te=Uint8Array,we=Uint16Array,kt=Uint32Array,un=new Te([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),dn=new Te([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Vs=new Te([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Zs=function(t,e){for(var r=new we(31),n=0;31>n;++n)r[n]=e+=1<<t[n-1];var s=new kt(r[30]);for(n=1;30>n;++n)for(var a=r[n];r[n+1]>a;++a)s[a]=a-r[n]<<5|n;return[r,s]},Js=Zs(un,2),cn=Js[1];Js[0][28]=258,cn[258]=28;for(var Ys=Zs(dn,0)[1],Xs=new we(32768),ne=0;32768>ne;++ne){var It=(43690&ne)>>>1|(21845&ne)<<1;Xs[ne]=((65280&(It=(61680&(It=(52428&It)>>>2|(13107&It)<<2))>>>4|(3855&It)<<4))>>>8|(255&It)<<8)>>>1}var Wt=function(t,e,r){for(var n=t.length,s=0,a=new we(e);n>s;++s)++a[t[s]-1];var i,o=new we(e);for(s=0;e>s;++s)o[s]=o[s-1]+a[s-1]<<1;for(i=new we(n),s=0;n>s;++s)i[s]=Xs[o[t[s]-1]++]>>>15-t[s];return i},it=new Te(288);for(ne=0;144>ne;++ne)it[ne]=8;for(ne=144;256>ne;++ne)it[ne]=9;for(ne=256;280>ne;++ne)it[ne]=7;for(ne=280;288>ne;++ne)it[ne]=8;var vr=new Te(32);for(ne=0;32>ne;++ne)vr[ne]=5;var li=Wt(it,9),ui=Wt(vr,5),Ks=function(t){return(t/8>>0)+(7&t&&1)},Qs=function(t,e,r){(r==null||r>t.length)&&(r=t.length);var n=new(t instanceof we?we:t instanceof kt?kt:Te)(r-e);return n.set(t.subarray(e,r)),n},ze=function(t,e,r){var n=e/8>>0;t[n]|=r<<=7&e,t[n+1]|=r>>>8},qt=function(t,e,r){var n=e/8>>0;t[n]|=r<<=7&e,t[n+1]|=r>>>8,t[n+2]|=r>>>16},hn=function(t,e){for(var r=[],n=0;t.length>n;++n)t[n]&&r.push({s:n,f:t[n]});var s=r.length,a=r.slice();if(!s)return[new Te(0),0];if(s==1){var i=new Te(r[0].s+1);return i[r[0].s]=1,[i,1]}r.sort((function(v,b){return v.f-b.f})),r.push({s:-1,f:25001});var o=r[0],u=r[1],l=0,d=1,c=2;for(r[0]={s:-1,f:o.f+u.f,l:o,r:u};d!=s-1;)o=r[r[c].f>r[l].f?l++:c++],u=r[l!=d&&r[c].f>r[l].f?l++:c++],r[d++]={s:-1,f:o.f+u.f,l:o,r:u};var m=a[0].s;for(n=1;s>n;++n)a[n].s>m&&(m=a[n].s);var h=new we(m+1),I=pn(r[d-1],h,0);if(I>e){n=0;var g=0,R=I-e,S=1<<R;for(a.sort((function(v,b){return h[b.s]-h[v.s]||v.f-b.f}));s>n;++n){var f=a[n].s;if(e>=h[f])break;g+=S-(1<<I-h[f]),h[f]=e}for(g>>>=R;g>0;){var x=a[n].s;e>h[x]?g-=1<<e-h[x]++-1:++n}for(;n>=0&&g;--n){var y=a[n].s;h[y]==e&&(--h[y],++g)}I=e}return[new Te(h),I]},pn=function(t,e,r){return t.s==-1?Math.max(pn(t.l,e,r+1),pn(t.r,e,r+1)):e[t.s]=r},ea=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new we(++e),n=0,s=t[0],a=1,i=function(u){r[n++]=u},o=1;e>=o;++o)if(t[o]==s&&o!=e)++a;else{if(!s&&a>2){for(;a>138;a-=138)i(32754);a>2&&(i(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(i(s),--a;a>6;a-=6)i(8304);a>2&&(i(a-3<<5|8208),a=0)}for(;a--;)i(s);a=1,s=t[o]}return[r.subarray(0,n),e]},Ht=function(t,e){for(var r=0,n=0;e.length>n;++n)r+=t[n]*e[n];return r},fn=function(t,e,r){var n=r.length,s=Ks(e+2);t[s]=255&n,t[s+1]=n>>>8,t[s+2]=255^t[s],t[s+3]=255^t[s+1];for(var a=0;n>a;++a)t[s+a+4]=r[a];return 8*(s+4+n)},ta=function(t,e,r,n,s,a,i,o,u,l,d){ze(e,d++,r),++s[256];for(var c=hn(s,15),m=c[0],h=c[1],I=hn(a,15),g=I[0],R=I[1],S=ea(m),f=S[0],x=S[1],y=ea(g),v=y[0],b=y[1],T=new we(19),w=0;f.length>w;++w)T[31&f[w]]++;for(w=0;v.length>w;++w)T[31&v[w]]++;for(var p=hn(T,7),_=p[0],L=p[1],E=19;E>4&&!_[Vs[E-1]];--E);var B,M,W,F,N=l+5<<3,O=Ht(s,it)+Ht(a,vr)+i,q=Ht(s,m)+Ht(a,g)+i+14+3*E+Ht(T,_)+(2*T[16]+3*T[17]+7*T[18]);if(O>=N&&q>=N)return fn(e,d,t.subarray(u,u+l));if(ze(e,d,1+(O>q)),d+=2,O>q){B=Wt(m,h),M=m,W=Wt(g,R),F=g;var A=Wt(_,L);for(ze(e,d,x-257),ze(e,d+5,b-1),ze(e,d+10,E-4),d+=14,w=0;E>w;++w)ze(e,d+3*w,_[Vs[w]]);d+=3*E;for(var P=[f,v],H=0;2>H;++H){var G=P[H];for(w=0;G.length>w;++w)ze(e,d,A[C=31&G[w]]),d+=_[C],C>15&&(ze(e,d,G[w]>>>5&127),d+=G[w]>>>12)}}else B=li,M=it,W=ui,F=vr;for(w=0;o>w;++w)if(n[w]>255){var C;qt(e,d,B[257+(C=n[w]>>>18&31)]),d+=M[C+257],C>7&&(ze(e,d,n[w]>>>23&31),d+=un[C]);var j=31&n[w];qt(e,d,W[j]),d+=F[j],j>3&&(qt(e,d,n[w]>>>5&8191),d+=dn[j])}else qt(e,d,B[n[w]]),d+=M[n[w]];return qt(e,d,B[256]),d+M[256]},di=new kt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ci=(function(){for(var t=new kt(256),e=0;256>e;++e){for(var r=e,n=9;--n;)r=(1&r&&3988292384)^r>>>1;t[e]=r}return t})(),hi=function(){var t=4294967295;return{p(e){for(var r=t,n=0;e.length>n;++n)r=ci[255&r^e[n]]^r>>>8;t=r},d:()=>4294967295^t}},pi=function(t,e,r,n,s){return(function(a,i,o,u,l,d){var c=a.length,m=new Te(u+c+5*(1+Math.floor(c/7e3))+l),h=m.subarray(u,m.length-l),I=0;if(!i||8>c)for(var g=0;c>=g;g+=65535){var R=g+65535;c>R?I=fn(h,I,a.subarray(g,R)):(h[g]=!0,I=fn(h,I,a.subarray(g,c)))}else{for(var S=di[i-1],f=S>>>13,x=8191&S,y=(1<<o)-1,v=new we(32768),b=new we(y+1),T=Math.ceil(o/3),w=2*T,p=function(re){return(a[re]^a[re+1]<<T^a[re+2]<<w)&y},_=new kt(25e3),L=new we(288),E=new we(32),B=0,M=0,W=(g=0,0),F=0,N=0;c>g;++g){var O=p(g),q=32767&g,A=b[O];if(v[q]=A,b[O]=q,g>=F){var P=c-g;if((B>7e3||W>24576)&&P>423){I=ta(a,h,0,_,L,E,M,W,N,g-N,I),W=B=M=0,N=g;for(var H=0;286>H;++H)L[H]=0;for(H=0;30>H;++H)E[H]=0}var G=2,C=0,j=x,ee=q-A&32767;if(P>2&&O==p(g-ee))for(var de=Math.min(f,P)-1,ae=Math.min(32767,g),te=Math.min(258,P);ae>=ee&&--j&&q!=A;){if(a[g+G]==a[g+G-ee]){for(var oe=0;te>oe&&a[g+oe]==a[g+oe-ee];++oe);if(oe>G){if(G=oe,C=ee,oe>de)break;var Ue=Math.min(ee,oe-2),Ae=0;for(H=0;Ue>H;++H){var Oe=g-ee+H+32768&32767,ot=Oe-v[Oe]+32768&32767;ot>Ae&&(Ae=ot,A=Oe)}}}ee+=(q=A)-(A=v[q])+32768&32767}if(C){_[W++]=268435456|cn[G]<<18|Ys[C];var Je=31&cn[G],$=31&Ys[C];M+=un[Je]+dn[$],++L[257+Je],++E[$],F=g+G,++B}else _[W++]=a[g],++L[a[g]]}}I=ta(a,h,!0,_,L,E,M,W,N,g-N,I)}return Qs(m,0,u+Ks(I)+l)})(t,e.level==null?6:e.level,e.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,r,n)},mn=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},fi=function(t,e){var r=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=2>e.level?4:e.level==9?2:0,t[9]=3,e.mtime!=0&&mn(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),r){t[3]=8;for(var n=0;r.length>=n;++n)t[n+10]=r.charCodeAt(n)}},mi=function(t){return 10+(t.filename&&t.filename.length+1||0)};class gi{constructor(e,r){var n,s;r===void 0&&(r={}),this.Aa={},this._a=a=>{if(!this.Aa[a]){var i,o;this.Aa[a]=!0;var u=this.Ra(a);(i=(o=this.Na).onBlockedNode)==null||i.call(o,a,u)}},this.Ta=a=>{var i=this.Ra(a);if(i?.nodeName!=="svg"&&i instanceof Element){var o=i.closest("svg");if(o)return[this._rrweb.mirror.getId(o),o]}return[a,i]},this.Ra=a=>this._rrweb.mirror.getNode(a),this.Ma=a=>{var i,o,u,l,d,c,m,h;return((i=(o=a.removes)==null?void 0:o.length)!==null&&i!==void 0?i:0)+((u=(l=a.attributes)==null?void 0:l.length)!==null&&u!==void 0?u:0)+((d=(c=a.texts)==null?void 0:c.length)!==null&&d!==void 0?d:0)+((m=(h=a.adds)==null?void 0:h.length)!==null&&m!==void 0?m:0)},this.throttleMutations=a=>{if(a.type!==3||a.data.source!==0)return a;var i=a.data,o=this.Ma(i);i.attributes&&(i.attributes=i.attributes.filter((l=>{var[d]=this.Ta(l.id);return!this.io.consumeRateLimit(d)&&l})));var u=this.Ma(i);return u!==0||o===u?a:void 0},this._rrweb=e,this.Na=r,this.io=new ja({bucketSize:(n=this.Na.bucketSize)!==null&&n!==void 0?n:100,refillRate:(s=this.Na.refillRate)!==null&&s!==void 0?s:10,refillInterval:1e3,Dt:this._a,qt:nt})}reset(){this.Aa={}}stop(){this.io.stop(),this.reset()}}var yr="$sess_rec_flush_size";class vi{constructor(e){if(!e.persistence)throw new Error("it is not valid to not have persistence and be this far into setting up the application");this.Fa=e.get_property.bind(e),this.xa=e.persistence.set_property.bind(e.persistence)}trackSize(e){var r=Number(this.Fa(yr))||0;this.xa(yr,r+e)}reset(){return this.xa(yr,0)}get currentTrackedSize(){return Number(this.Fa(yr))||0}}function ra(t,e){return(function(r){for(var n=0,s=0;r.length>s;s++)n=(n<<5)-n+r.charCodeAt(s),n|=0;return Math.abs(n)})(t)%100<rt(100*e,0,100,nt)}var na=function(t,e){if(!(function(r){try{new RegExp(r)}catch{return!1}return!0})(e))return!1;try{return new RegExp(e).test(t)}catch{return!1}},yi={exact:(t,e)=>e.some((r=>t.some((n=>r===n)))),is_not:(t,e)=>e.every((r=>t.every((n=>r!==n)))),regex:(t,e)=>e.some((r=>t.some((n=>na(r,n))))),not_regex:(t,e)=>e.every((r=>t.every((n=>!na(r,n))))),icontains:(t,e)=>e.map(br).some((r=>t.map(br).some((n=>r.includes(n))))),not_icontains:(t,e)=>e.map(br).every((r=>t.map(br).every((n=>!r.includes(n))))),gt:(t,e)=>e.some((r=>{var n=parseFloat(r);return!isNaN(n)&&t.some((s=>n>parseFloat(s)))})),lt:(t,e)=>e.some((r=>{var n=parseFloat(r);return!isNaN(n)&&t.some((s=>n<parseFloat(s)))}))},br=t=>t.toLowerCase(),bi=new Set(["is_not","not_icontains","not_regex"]);function sa(t,e,r){return!t||t.length===0||t.every((n=>{var s=n.type==="person"?r:e,a=s?.[n.key],i=n.operator||"exact";if(ue(a)||qe(a))return bi.has(i);var o=yi[i];return!!o&&!ue(n.value)&&!qe(n.value)&&o(tt(n.value)?n.value.map(String):[String(n.value)],tt(a)?a.map(String):[String(a)])}))}var zt=Pt("[SessionRecording]");class Si{constructor(e,r,n,s,a,i){this.Ba=null,this.Oa=js,this._instance=e,this.Ca=r,this.wa=n,this.Sa=s,this.Za=a,this.Ya=i}onRemoteConfig(e){this.Ba=Ee(e.sampleRate)?e.sampleRate:null,e.triggerMatchType==="any"?(this.Ea=new on([this.wa,this.Ca]),this.Oa=oi):(this.Ea=new ln([this.wa,this.Ca]),this.Oa=js),this._instance.register_for_session({$sdk_debug_replay_remote_trigger_matching_config:e.triggerMatchType}),this.Ca.onConfig(e),this.wa.onConfig(e),this.Sa.onConfig(e,((r,n)=>{this.Za("linked_flag_matched",{flag:r,variant:n})}))}getStatus(e){return this.Oa({receivedFlags:!0,isRecordingEnabled:!0,isSampled:e.isSampled,rrwebError:e.rrwebError,urlTriggerMatching:e.urlTriggerMatching,eventTriggerMatching:e.eventTriggerMatching,linkedFlagMatching:e.linkedFlagMatching,sessionId:e.sessionId})}getMinimumDuration(e){var r=this._instance.get_property("$session_recording_remote_config"),n=r?.minimumDurationMilliseconds;return Ee(n)?n:null}checkUrlTriggers(e,r,n,s){this.Ca.checkUrlTriggerConditions(r,n,s,e)}setupEventTriggerListeners(e,r,n){if(this.wa.ya.length!==0&&Re(this.Ga))return this.Ga=e((s=>{try{this.wa.checkEventTriggerConditions(s.event,n,r)}catch(a){zt.error("Could not activate event trigger",a)}})),this.Ga}makeSamplingDecisions(e){var r,n=this.Ba;if(Ee(n)){var s=this._instance.get_property(st),a=s===e||s!==!1&&null,i=typeof s=="string"&&s!==e||!He(a),o=i?ra(e,n):a;i&&(o?this.Za("sampled"):zt.warn("Sample rate ("+n+") has determined that this sessionId ("+e+") will not be sent to the server.")),(r=this._instance.persistence)==null||r.register({[st]:!!o&&e})}else{var u;(u=this._instance.persistence)==null||u.unregister(st)}}onFlushComplete(){}clearConditionalRecordingPersistence(){var e,r,n,s;(e=this._instance.persistence)==null||e.unregister(Gr),(r=this._instance.persistence)==null||r.unregister(jr),(n=this._instance.persistence)==null||n.unregister(st),(s=this._instance.persistence)==null||s.unregister(dr)}updateActiveTriggers(e){}hasPendingTriggers(e){var r;return((r=this.Ea)==null?void 0:r.triggerStatus(e))===ve}stop(){var e;(e=this.Ga)==null||e.call(this),this.Ga=void 0,this.wa.stop(),this.Ca.stop(),this.Sa.stop()}}class wi{constructor(e,r,n,s){this.La=[],this.Da=new Map,this.Wa=!1,this._instance=e,this.Ca=r,this.Za=n,this.Va=s}onRemoteConfig(e){e.triggerGroups&&e.triggerGroups.length!==0?(this.Xa(e.triggerGroups),this._instance.register_for_session({$sdk_debug_replay_remote_trigger_matching_config:"v2_trigger_groups",$sdk_debug_replay_trigger_groups_count:e.triggerGroups.length}),this.Ca.onConfig(e)):zt.warn("[V2Strategy] No trigger groups configured")}getStatus(e){return(function(r){if(r.rrwebError)return nn;if(r.urlTriggerMatching.urlBlocked)return mr;var n=r.triggerGroupMatchers,s=r.triggerGroupSamplingResults;if(n.length===0)return De;var a=!1,i=!1;for(var o of n){var u=o.triggerStatus(r.sessionId);if(u===Se){var l=o.group.id,d=s.get(l);ue(d)?nt.warn("[V2 Triggers] Group activated but no sampling decision found",{groupId:l}):d===!0&&(i=!0)}else u===ve&&(a=!0)}return i?rn:a?at:De})({isSampled:e.isSampled,rrwebError:e.rrwebError,urlTriggerMatching:e.urlTriggerMatching,eventTriggerMatching:e.eventTriggerMatching,linkedFlagMatching:e.linkedFlagMatching,sessionId:e.sessionId,triggerGroupMatchers:this.La,triggerGroupSamplingResults:this.Da,minimumDuration:this.getMinimumDuration(e.sessionId)})}getMinimumDuration(e){var r=null;for(var n of this.La)if(n.triggerStatus(e)==="trigger_activated"){var s=n.group.minDurationMs;Ee(s)&&(qe(r)||r>s)&&(r=s)}return r}checkUrlTriggers(e,r,n,s){var a=this;this.Ca.checkUrlBlocklist(r,n);var i=function(u){u.checkUrlTriggerConditions(r,n,(l=>{a.za(u,void 0)&&(u.activateTrigger(l,e),a.updateActiveTriggers(e))}),e)};for(var o of this.La)i(o)}setupEventTriggerListeners(e,r,n){var s=this;return this.Ga=e((a=>{var i;if(this.Wa)return zt.info("[SessionRecorder] Stopping trigger checks - initial buffer flushed"),(i=this.Ga)==null||i.call(this),void(this.Ga=void 0);try{var o=function(l){l.checkEventTriggerConditions(a.event,(d=>{if(s.za(l,a.properties)){var c=(l.group.conditions.events||[]).filter((h=>h.name===a.event)),m=s._instance.get_property(Ns);c.some((h=>!h.properties||h.properties.length===0||sa(h.properties,a.properties,m)))&&(l.activateTrigger(d,r),s.updateActiveTriggers(r))}}),r)};for(var u of this.La)o(u)}catch(l){zt.error("Could not activate event trigger for trigger groups",l)}})),this.Ga}makeSamplingDecisions(e){for(var r of this.La){var n,s=r.group,a=s.id,i=s.sampleRate,o=Ls+a,u=this._instance.get_property(o),l=u===e||u!==!1&&null,d=typeof u=="string"&&u!==e||!He(l),c=d?ra(e+a,i):l;d&&this.Va("triggerGroupSamplingDecisionMade",{group_id:a,group_name:s.name,sampleRate:i,isSampled:c}),this.Da.set(a,c),(n=this._instance.persistence)==null||n.register({[o]:!!c&&e})}this.updateActiveTriggers(e)}onFlushComplete(){this.Wa=!0}clearConditionalRecordingPersistence(){var e,r;for(var n of((e=this._instance.persistence)==null||e.unregister(st),(r=this._instance.persistence)==null||r.unregister(dr),this.La)){var s,a,i,o=n.group.id;(s=this._instance.persistence)==null||s.unregister(Vr+o),(a=this._instance.persistence)==null||a.unregister(Zr+o),(i=this._instance.persistence)==null||i.unregister(Ls+o)}}updateActiveTriggers(e){var r=[];for(var n of this.La){var s=n.group,a=s.id,i=n.triggerStatus(e)==="trigger_activated",o=this.Da.get(a)===!0;i&&r.push({id:a,name:s.name,matched:!0,sampled:o})}this._instance.register_for_session({$sdk_debug_replay_matched_recording_trigger_groups:r})}hasPendingTriggers(e){for(var r of this.La)if(r.triggerStatus(e)===ve)return!0;return!1}stop(){var e;(e=this.Ga)==null||e.call(this),this.Ga=void 0,this.La.forEach((r=>r.stop())),this.La=[],this.Da.clear(),this.Ca.stop()}za(e,r){var n=e.group.conditions.properties;return!n||n.length===0||sa(n,r,this._instance.get_property(Ns))}Xa(e){var r=this;this.La.forEach((a=>a.stop())),this.La=[],this.Da.clear();var n=function(a){var i=new ii(r._instance,a,((o,u)=>{r.Za("linked_flag_matched",{flag:o,variant:u,group_id:a.id,group_name:a.name})}));r.La.push(i)};for(var s of e)n(s)}}function aa(t){return Me(t)?t.network_timing:t}var gn,vn="[SessionRecording]",ye=Pt(vn),ki=[1,2,3,4,5,6,7,12],ia=t=>({rrwebMethod:t,enqueuedAt:Date.now(),attempt:1});function yn(){var t;return Ne==null||(t=Ne.__PosthogExtensions__)==null?void 0:t.rrweb}function bn(){var t;return(t=yn())==null?void 0:t.record}function Ut(t){return(function(e,r){for(var n="",s=0;e.length>s;){var a=e[s++];n+=String.fromCharCode(a)}return n})((function(e,r){r===void 0&&(r={});var n=hi(),s=e.length;n.p(e);var a=pi(e,r,mi(r),8),i=a.length;return fi(a,r),mn(a,i-8,n.d()),mn(a,i-4,s),a})((function(e,r){var n=e.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(e);for(var s=new Te(e.length+(e.length>>>1)),a=0,i=function(d){s[a++]=d},o=0;n>o;++o){if(a+5>s.length){var u=new Te(a+8+(n-o<<1));u.set(s),s=u}var l=e.charCodeAt(o);128>l?i(l):2048>l?(i(192|l>>>6),i(128|63&l)):l>55295&&57344>l?(i(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++o))>>>18),i(128|l>>>12&63),i(128|l>>>6&63),i(128|63&l)):(i(224|l>>>12),i(128|l>>>6&63),i(128|63&l))}return Qs(s,0,a)})(JSON.stringify(t))))}function Sr(t){return tt(t)&&t.length===0?gn=gn??Ut([]):Ut(t)}function Sn(t,e){return t.type===xe.Custom&&t.data.tag===e}function oa(t){return Sn(t,"sessionIdle")}function la(t){return Sn(t,"$session_ending")}function ua(t){return Sn(t,"$session_starting")}function wn(t,e){if(e===void 0&&(e=66060288e-1),t.size>=e&&t.data.length>1){var r=Math.floor(t.data.length/2),n=t.sizes.slice(0,r),s=t.sizes.slice(r);return[wn({size:n.reduce(((a,i)=>a+i),0),data:t.data.slice(0,r),sizes:n,sessionId:t.sessionId,windowId:t.windowId}),wn({size:s.reduce(((a,i)=>a+i),0),data:t.data.slice(r),sizes:s,sessionId:t.sessionId,windowId:t.windowId})].flatMap((a=>a))}return[t]}class Ii{get sessionId(){return this.nr}get Ja(){if(!this._instance.sessionManager)throw new Error(vn+" must be started with a valid sessionManager.");return this._instance.sessionManager}get Ka(){return this._instance.config.session_recording.session_idle_threshold_ms||3e5}get Ha(){var e=this._instance.get_property(st);return e===!0?null:e!==!1&&(St(e)?e===this.sessionId:null)}get Ba(){var e,r=(e=this.Do)==null?void 0:e.sampleRate;return Ee(r)?r:null}get ja(){var e,r;return(e=(r=this.Ua)==null?void 0:r.getMinimumDuration(this.sessionId))!==null&&e!==void 0?e:null}constructor(e){this.Pa="/s/",this._forceAllowLocalhostNetworkCapture=!1,this.qa=void 0,this.Qa=Date.now(),this.$a=!1,this.tu=[],this.eu="unknown",this.ru=!1,this.iu=!1,this.nu=[],this.su=void 0,this.Ga=void 0,this.ou=void 0,this.au=void 0,this.lu=void 0,this.uu=void 0,this.Yi=(s,a,i)=>{var o,u;if(i&&(s!==this.nr||a!==this.rr)){var l,d,c=!i.noSessionId&&(i.activityTimeout||i.sessionPastMaximumLength),m=this.nr,h=this.rr;c&&this.Va("$session_ending",{currentSessionId:m,currentWindowId:h,nextSessionId:s,nextWindowId:a,changeReason:i,lastActivityTimestamp:this.Qa,flushed_size:(l=this.hu)==null?void 0:l.currentTrackedSize}),this.hu&&this.hu.reset(),(o=this._instance.persistence)==null||o.unregister(Jr),this.iu=!1,(u=yn())==null||u.resetMaxDepthState==null||u.resetMaxDepthState(),this.Va("$session_id_change",{sessionId:s,windowId:a,changeReason:i}),this.du(),this.eu===!0&&(this.eu="unknown",this.stop(),this.start("session_id_changed")),c&&this.Va("$session_starting",{previousSessionId:m,previousWindowId:h,nextSessionId:s,nextWindowId:a,changeReason:i,lastActivityTimestamp:this.Qa}),Ee(this.Ba)&&Re(this.lu)&&((d=this.Ua)==null||d.makeSamplingDecisions(s))}},this.cu=()=>{var s;return((s=this._instance.persistence)==null?void 0:s.props[dr])===this.nr},this.vu=()=>{var s,a;if(this.T.data.length===0)return null;var i=(s=this.T.data[0])==null?void 0:s.timestamp,o=(a=this.T.data[this.T.data.length-1])==null?void 0:a.timestamp;return Ee(i)&&Ee(o)?o-i:null},this.fu=()=>{var s,a,i=this.ja;if(!Ee(i))return!1;if((s=(a=this._instance.config.session_recording)==null?void 0:a.strictMinimumDuration)===null||s===void 0||!s){var o=this.gu;return Ee(o)&&o>=0&&i>o}if(this.cu())return!1;var u,l=this.vu();return!!qe(l)||i>l||((u=this._instance.persistence)==null||u.register({[dr]:this.nr}),!1)},this.mu=()=>{this.status!==at?this.pu():this.Iu()},this.yu=()=>{this.Va("browser offline",{})},this.bu=()=>{this.Va("browser online",{})},this.Tt=()=>{Ft!=null&&Ft.visibilityState&&this.Va("window "+Ft.visibilityState,{})},this._instance=e;var{sessionId:r,windowId:n}=this.Ja.checkAndGetSessionAndWindowId();this.nr=r,this.rr=n,this.Sa=new Us(this._instance),this.Ca=new zs(this._instance),this.wa=new $s(this._instance),this.T=this.Iu(),this.Ja.sessionTimeoutMs>this.Ka||ye.warn("session_idle_threshold_ms ("+this.Ka+") is greater than the session timeout ("+this.Ja.sessionTimeoutMs+"). Session will never be detected as idle"),this.hu=new vi(this._instance)}get Cu(){var e,r,n,s,a,i,o,u=(e=this.Do)==null?void 0:e.masking,l={maskAllInputs:(r=this._instance.config.session_recording)==null?void 0:r.maskAllInputs,maskTextSelector:(n=this._instance.config.session_recording)==null?void 0:n.maskTextSelector,blockSelector:(s=this._instance.config.session_recording)==null?void 0:s.blockSelector},d=(a=l?.maskAllInputs)!==null&&a!==void 0?a:u?.maskAllInputs,c=(i=l?.maskTextSelector)!==null&&i!==void 0?i:u?.maskTextSelector,m=(o=l?.blockSelector)!==null&&o!==void 0?o:u?.blockSelector;return ue(d)&&ue(c)&&ue(m)?void 0:{maskAllInputs:d==null||d,maskTextSelector:c,blockSelector:m}}get wu(){var e,r,n,s,a,i,o,u=this._instance.config.session_recording.captureCanvas,l=(e=this.Do)==null?void 0:e.canvasRecording,d=(r=(n=u?.recordCanvas)!==null&&n!==void 0?n:l?.enabled)!==null&&r!==void 0&&r,c=(s=(a=u?.canvasFps)!==null&&a!==void 0?a:l?.fps)!==null&&s!==void 0?s:4,m=(i=(o=u?.canvasQuality)!==null&&o!==void 0?o:l?.quality)!==null&&i!==void 0?i:.4;if(typeof m=="string"){var h=parseFloat(m);m=isNaN(h)?.4:h}return{enabled:d,fps:rt(c,0,12,Pt("canvas recording fps"),4),quality:rt(m,0,1,Pt("canvas recording quality"),.4)}}get Su(){var e,r=!((e=this.Do)==null||!e.consoleLogRecordingEnabled),n=this._instance.config.enable_recording_console_log;return n??r}get ku(){var e,r,n,s=(e=this.Do)==null?void 0:e.networkPayloadCapture,a={recordHeaders:(r=this._instance.config.session_recording)==null?void 0:r.recordHeaders,recordBody:(n=this._instance.config.session_recording)==null?void 0:n.recordBody},i=a?.recordHeaders||s?.recordHeaders,o=a?.recordBody||s?.recordBody,u=aa(this._instance.config.capture_performance),l=aa(s?.capturePerformance),d=!!(He(u)?u:l);return i||o||d?{recordHeaders:i,recordBody:o,recordPerformance:d}:void 0}Au(){var e,r,n=[],s=(e=Ne.__PosthogExtensions__)==null||(e=e.rrwebPlugins)==null?void 0:e.getRecordConsolePlugin;s&&this.Su&&n.push(s());var a,i,o,u,l,d,c,m,h,I,g,R=(r=Ne.__PosthogExtensions__)==null||(r=r.rrwebPlugins)==null?void 0:r.getRecordNetworkPlugin;return this.ku&&At(R)&&(!Ja.includes(location.hostname)||this._forceAllowLocalhostNetworkCapture?n.push(R((l={payloadSizeLimitBytes:wt.payloadSizeLimitBytes,performanceEntryTypeToObserve:[...wt.performanceEntryTypeToObserve],payloadHostDenyList:[...(i=this.ku).payloadHostDenyList||[],...wt.payloadHostDenyList]},d=(a=this._instance.config).session_recording.recordHeaders!==!1&&i.recordHeaders,c=a.session_recording.recordBody!==!1&&i.recordBody,m=a.capture_performance!==!1&&i.recordPerformance,u=Math.min(1e6,(o=l.payloadSizeLimitBytes)!==null&&o!==void 0?o:1e6),h=S=>(S!=null&&S.requestBody&&(S.requestBody=Ds(S.requestBody,S.requestHeaders,u,"Request")),S!=null&&S.responseBody&&(S.responseBody=Ds(S.responseBody,S.responseHeaders,u,"Response")),S),I=S=>{return h(((y,v)=>{var b,T=Es(y.name),w=v.indexOf("http")===0?(b=Es(v))==null?void 0:b.pathname:v;w==="/"&&(w="");var p=T?.pathname.replace(w||"","");if(!(T&&p&&ti.some((_=>p.indexOf(_)===0))))return y})((Re(x=(f=S).requestHeaders)||Ur(Object.keys(x??{}),(y=>{Qa.includes(y.toLowerCase())&&(x[y]=Xr)})),f),a.api_host));var f,x},(g=At(a.session_recording.maskNetworkRequestFn))&&At(a.session_recording.maskCapturedNetworkRequestFn)&&nt.warn("Both `maskNetworkRequestFn` and `maskCapturedNetworkRequestFn` are defined. `maskNetworkRequestFn` will be ignored."),g&&(a.session_recording.maskCapturedNetworkRequestFn=S=>{var f=a.session_recording.maskNetworkRequestFn({url:S.name});return Y({},S,{name:f?.url})}),l.maskRequestFn=At(a.session_recording.maskCapturedNetworkRequestFn)?S=>{var f,x=I(S);return x&&(f=a.session_recording.maskCapturedNetworkRequestFn==null?void 0:a.session_recording.maskCapturedNetworkRequestFn(x))!==null&&f!==void 0?f:void 0}:S=>(function(f){if(!ue(f))return f.requestBody=Fs(f.requestBody,"Request"),f.responseBody=Fs(f.responseBody,"Response"),f})(I(S)),Y({},wt,l,{recordHeaders:d,recordBody:c,recordPerformance:m,recordInitialRequests:m})))):ye.info("NetworkCapture not started because we are on localhost.")),n}_u(e){var r=this._instance.config.session_recording;if(r.maskCapturedNetworkRequestFn){var n,s=r.maskCapturedNetworkRequestFn({name:e});return(n=s?.name)!==null&&n!==void 0?n:s?.url}if(r.maskNetworkRequestFn){var a=r.maskNetworkRequestFn({url:e});return a?.url}return e}Ru(e){try{return e.rrwebMethod(),!0}catch(r){return 10>this.tu.length?this.tu.push({enqueuedAt:e.enqueuedAt||Date.now(),attempt:e.attempt+1,rrwebMethod:e.rrwebMethod}):ye.warn("could not emit queued rrweb event.",r,e),!1}}Va(e,r){return this.Ru(ia((()=>bn().addCustomEvent(e,r))))}Nu(){try{if(this._instance.config.capture_pageview||!Q)return;var e=new URL(Q.location.href),r=this._u(e.origin+e.pathname+e.search);this.Tu!==r&&(this.Tu=r,this.Va("$url_changed",{href:r}))}catch{}}Mu(){if(this.tu.length){var e=[...this.tu];this.tu=[],e.forEach((r=>{Date.now()-r.enqueuedAt>2e3||this.Ru(r)}))}}Ya(){return this.Ru(ia((()=>bn().takeFullSnapshot())))}get Fu(){var e,r,n;return(e=this.Ua)!=null&&e.hasPendingTriggers(this.sessionId)&&!["sampled","active"].includes(this.status)?6e4:(r=(n=this._instance.config.session_recording)==null?void 0:n.full_snapshot_interval_millis)!==null&&r!==void 0?r:3e5}xu(){if(this.Bu&&clearInterval(this.Bu),this.eu!==!0){var e=this.Fu;e&&(this.Bu=setInterval((()=>{this.Ya()}),e))}}Ou(){this.Ca.urlBlocked||(this.Ca.urlBlocked=!0,clearInterval(this.Bu),ye.info("recording paused due to URL blocker"),this.Va("recording paused",{reason:"url blocker"}))}Zu(){this.Ca.urlBlocked&&(this.Ca.urlBlocked=!1,this.Ya(),this.xu(),this.Va("recording resumed",{reason:"left blocked url"}),ye.info("recording resumed"))}Yu(e,r){var n;if(!this.$a&&(n=this.Ua)!=null&&n.hasPendingTriggers(this.sessionId)){this.$a=!0;try{var s,a;(s=this._instance.persistence)==null||s.register({[e==="url"?jr:Gr]:this.sessionId}),(a=this.Ua)==null||a.updateActiveTriggers(this.sessionId),this.pu(),this.Za(e+"_trigger_matched",{[e==="url"?"matchedUrl":"matchedEvent"]:r})}finally{this.$a=!1}}}get isStarted(){return!!this.qa}get Do(){var e=this._instance.get_property(Os);if(e){var r=Me(e)?e:JSON.parse(e);if(!this.isStarted){var n,s,a=(n=r.cache_timestamp)!==null&&n!==void 0?n:Date.now();if(Date.now()-a>36e5)return ye.info("persisted remote config for session recording is stale and will be ignored",{cacheTimestamp:a,persistedConfig:e}),void((s=this._instance.persistence)==null||s.unregister(Os))}return r}}Eu(e,r){var n;this._instance.get_property(e)&&(r(),(n=this._instance.persistence)==null||n.unregister(e))}start(e){var r,n,s=this.Do;if(s){var{sessionId:a,windowId:i}=this.Ja.checkAndGetSessionAndWindowId();this.nr=a,this.rr=i,(r=this._instance.persistence)==null||r.unregister(Jr),s!=null&&s.endpoint&&(this.Pa=s?.endpoint),this.Ua=s?.version===2&&s?.triggerGroups&&s.triggerGroups.length>0?new wi(this._instance,this.Ca,this.Za.bind(this),this.Va.bind(this)):new Si(this._instance,this.Ca,this.wa,this.Sa,this.Za.bind(this),this.Ya.bind(this)),this.Ua.onRemoteConfig(s),(n=this.Ga)==null||n.call(this),this.Ga=this.Ua.setupEventTriggerListeners(this._instance.on.bind(this._instance,"eventCaptured"),this.sessionId,((o,u)=>this.Yu(o,u))),this.Eu("$replay_override_sampling",(()=>{this.overrideSampling()})),this.Eu("$replay_override_linked_flag",(()=>{this.overrideLinkedFlag()})),this.Eu("$replay_override_event_trigger",(()=>{this.overrideTrigger("event")})),this.Eu("$replay_override_url_trigger",(()=>{this.overrideTrigger("url")})),this.Ua.makeSamplingDecisions(this.sessionId),this.Gu(),this.ru||(ur(Q,"beforeunload",this.mu),ur(Q,"offline",this.yu),ur(Q,"online",this.bu),ur(Q,"visibilitychange",this.Tt),this.ou||(this.ou=this.Ja.onSessionId(this.Yi)),this.au||(this.au=this.Ja.on("forcedIdleReset",(()=>{this.du(),this.eu="unknown",this.stop(),this.uu=this.Ja.onSessionId(((o,u,l)=>{var d;(d=this.uu)==null||d.call(this),this.uu=void 0,this.Yi(o,u,l)}))}))),Re(this.su)&&(this.su=this._instance.on("eventCaptured",(o=>{try{if(o.event==="$pageview"){var u=o!=null&&o.properties.$current_url?this._u(o?.properties.$current_url):"";if(!u)return;this.Va("$pageview",{href:u})}}catch(l){ye.error("Could not add $pageview to rrweb session",l)}}))),this.status===fr&&this.Za(e||"recording_initialized"))}else ye.info("remote config must be stored in persistence before recording can start")}Lu(){var e,r,n,s,a,i,o,u,l;Q?.removeEventListener("beforeunload",this.mu),Q?.removeEventListener("offline",this.yu),Q?.removeEventListener("online",this.bu),Q?.removeEventListener("visibilitychange",this.Tt),clearInterval(this.Bu),this.Du(),(e=this.su)==null||e.call(this),this.su=void 0,(r=this.Ga)==null||r.call(this),this.Ga=void 0,(n=this.ou)==null||n.call(this),this.ou=void 0,(s=this.au)==null||s.call(this),this.au=void 0,(a=this.lu)==null||a.call(this),this.lu=void 0,(i=this.uu)==null||i.call(this),this.uu=void 0,(o=this.Ua)==null||o.stop(),(u=this.Wu)==null||u.stop(),this.tu=[],(l=this.qa)==null||l.call(this),this.qa=void 0}stop(){this.pu(),this.Iu(),this.Lu(),ye.info("stopped")}discard(){this.Iu(),this.Lu(),ye.info("discarded")}onRRwebEmit(e){var r,n,s,a,i,o,u,l;if(this.Mu(),e&&Me(e)){if(e.type===xe.Meta){var d=this._u(e.data.href);if(this.Tu=d,!d)return;e.data.href=d}else this.Nu();if((r=this.Ua)==null||r.checkUrlTriggers(this.sessionId,(()=>this.Ou()),(()=>this.Zu()),((p,_)=>this.Yu(p,_))),!this.Ca.urlBlocked||(c=e).type===xe.Custom&&c.data.tag==="recording paused"){var c,m,h;e.type===xe.FullSnapshot&&(this.xu(),(m=this.Wu)==null||m.reset(),(h=this._instance.persistence)==null||h.register_once({[Jr]:e.timestamp},void 0)),e.type===xe.FullSnapshot&&(n=this.Ua)!=null&&n.hasPendingTriggers(this.sessionId)&&this.Vu();var I=this.Wu?this.Wu.throttleMutations(e):e;if(I){var g=(function(p){var _=p;if(_&&Me(_)&&_.type===6&&Me(_.data)&&_.data.plugin==="rrweb/console@1"){_.data.payload.payload.length>10&&(_.data.payload.payload=_.data.payload.payload.slice(0,10),_.data.payload.payload.push("...[truncated]"));for(var L=[],E=0;_.data.payload.payload.length>E;E++)L.push(_.data.payload.payload[E]&&_.data.payload.payload[E].length>2e3?_.data.payload.payload[E].slice(0,2e3)+"...[truncated]":_.data.payload.payload[E]);return _.data.payload.payload=L,p}return p})(I),R=(function(p){return la(p)?p.data.payload:null})(g),S=(function(p){return ua(p)?p.data.payload:null})(g);if(R||S){var f=R??S;f!=null&&f.lastActivityTimestamp&&(g.timestamp=f.lastActivityTimestamp)}else this.Xu(g);e.type===xe.FullSnapshot&&(this.nu.push([this.nr,e.timestamp]),this.nu.length>6&&(this.nu=this.nu.slice(-6)));var x=(s=(a=R?.currentSessionId)!==null&&a!==void 0?a:S?.nextSessionId)!==null&&s!==void 0?s:this.nr,y=(i=(o=R?.currentWindowId)!==null&&o!==void 0?o:S?.nextWindowId)!==null&&i!==void 0?i:this.rr;if(this.eu!==!0||(function(p){return oa(p)||la(p)||ua(p)})(g)){if(oa(g)){var v=g.data.payload;v&&(g.timestamp=v.lastActivityTimestamp+v.threshold)}var{event:b,size:T}=(u=this._instance.config.session_recording.compress_events)===null||u===void 0||u?(function(p){try{if(p.type===xe.FullSnapshot){var _=Y({},p,{data:Ut(p.data),cv:"2024-10"});return{event:_,size:Bt(_)}}if(p.type===xe.IncrementalSnapshot&&p.data.source===0){var L=Y({},p,{cv:"2024-10",data:Y({},p.data,{texts:Sr(p.data.texts),attributes:Sr(p.data.attributes),removes:Sr(p.data.removes),adds:Sr(p.data.adds)})});return{event:L,size:Bt(L)}}if(p.type===xe.IncrementalSnapshot&&p.data.source===8){var E=Y({},p,{cv:"2024-10",data:Y({},p.data,{adds:p.data.adds?Ut(p.data.adds):void 0,removes:p.data.removes?Ut(p.data.removes):void 0})});return{event:E,size:Bt(E)}}}catch(B){ye.error("could not compress event - will use uncompressed event",B)}return{event:p,size:Gs(p)}})(g):{event:g,size:Gs(g)},w={$snapshot_bytes:T,$snapshot_data:b,$session_id:x,$window_id:y};g.type===xe.FullSnapshot&&(l=yn())!=null&&l.wasMaxDepthReached!=null&&l.wasMaxDepthReached()&&(this.iu=!0),this.status!==De?this.zu(w):this.Iu()}}}}}get status(){return this.Ua?this.Ua.getStatus({instance:this._instance,sessionId:this.sessionId,isSampled:this.Ha,rrwebError:this.ru,urlTriggerMatching:this.Ca,eventTriggerMatching:this.wa,linkedFlagMatching:this.Sa,remoteConfig:this.Do}):De}log(e,r){var n;r===void 0&&(r="log"),(n=this._instance.sessionRecording)==null||n.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:r,trace:[],payload:[JSON.stringify(e)]}},timestamp:Date.now()})}overrideLinkedFlag(){this.Sa.linkedFlagSeen=!0,this.Ya(),this.Za("linked_flag_overridden")}overrideSampling(){var e;(e=this._instance.persistence)==null||e.register({[st]:this.sessionId}),this.Ya(),this.Za("sampling_overridden")}overrideTrigger(e){this.Yu(e)}Du(){this.Ju&&(clearTimeout(this.Ju),this.Ju=void 0)}pu(){this.Du();var e,r=this.fu();return this.status===at||this.status===mr||this.status===De||r?(this.Ju=setTimeout((()=>{this.pu()}),2e3),this.T):(this.T.data.length>0&&(wn(this.T).forEach((n=>{var s;(s=this.hu)==null||s.trackSize(n.size),this.Ku({$snapshot_bytes:n.size,$snapshot_data:n.data,$session_id:n.sessionId,$window_id:n.windowId,$lib:Za,$lib_version:Va})})),(e=this.Ua)==null||e.onFlushComplete()),this.Iu())}zu(e){var r,n=2+(((r=this.T)==null?void 0:r.data.length)||0),s=e.$session_id;this.eu||943718.4>=this.T.size+e.$snapshot_bytes+n&&this.T.sessionId===s||(this.T=this.pu(),this.T.sessionId=s,this.T.windowId=e.$window_id),this.T.size+=e.$snapshot_bytes,this.T.data.push(e.$snapshot_data),this.T.sizes.push(e.$snapshot_bytes),this.Ju||this.eu||(this.Ju=setTimeout((()=>{this.pu()}),2e3))}Ku(e){this._instance.capture("$snapshot",e,{_url:this._instance.requestRouter.endpointFor("api",this.Pa),_noTruncate:!0,_batchKey:"recordings",skip_client_rate_limiting:!0})}get gu(){var e,r,n=(e=this.T)==null?void 0:e.data[((r=this.T)==null?void 0:r.data.length)-1],{sessionStartTimestamp:s}=this.Ja.checkAndGetSessionAndWindowId(!0);return n?n.timestamp-s:null}Vu(){if(!this.T||this.T.data.length===0)return this.Iu();for(var e=-1,r=this.T.data.length-1;r>=0;r--)if(this.T.data[r].type===xe.Meta){e=r;break}return 0>e?this.Iu():(this.T.data=this.T.data.slice(e),this.T.sizes=this.T.sizes.slice(e),this.T.size=this.T.sizes.reduce(((n,s)=>n+s),0),this.T)}Iu(){return this.T={size:0,data:[],sizes:[],sessionId:this.nr,windowId:this.rr},this.T}Za(e,r){this._instance.register_for_session({$session_recording_start_reason:e}),ye.info(e.replace("_"," "),r),e!=="session_id_changed"&&this.Va("$recording_started",Y({reason:e},r))}Hu(e){var r;return e.type===3&&ki.indexOf((r=e.data)==null?void 0:r.source)!==-1}Xu(e){var r=this.Hu(e);r||this.eu||e.timestamp-this.Qa>this.Ka&&(this.eu=!0,clearInterval(this.Bu),this.Va("sessionIdle",{eventTimestamp:e.timestamp,lastActivityTimestamp:this.Qa,threshold:this.Ka,bufferLength:this.T.data.length,bufferSize:this.T.size}),this.pu());var n=!1;if(r&&(this.Qa=e.timestamp,this.eu)){var s=this.eu==="unknown";this.eu=!1,s||(this.Va("sessionNoLongerIdle",{reason:"user activity",type:e.type}),n=!0)}if(!this.eu){var{windowId:a,sessionId:i}=this.Ja.checkAndGetSessionAndWindowId(!r,e.timestamp),o=this.nr!==i,u=this.rr!==a;this.rr=a,this.nr=i,o||u?(this.stop(),this.start("session_id_changed")):n&&this.xu()}}du(){var e;(e=this.Ua)==null||e.clearConditionalRecordingPersistence()}get sdkDebugProperties(){var e,{sessionStartTimestamp:r}=this.Ja.checkAndGetSessionAndWindowId(!0);return{$recording_status:this.status,$sdk_debug_replay_internal_buffer_length:this.T.data.length,$sdk_debug_replay_internal_buffer_size:this.T.size,$sdk_debug_current_session_duration:this.gu,$sdk_debug_session_start:r,$sdk_debug_replay_flushed_size:(e=this.hu)==null?void 0:e.currentTrackedSize,$sdk_debug_replay_full_snapshots:this.nu,$snapshot_max_depth_exceeded:this.iu,$sdk_debug_replay_rrweb_error:this.ru}}Gu(){var e;if(!this.qa){var r,n,s,a={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{password:!0},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1},i=this._instance.config.session_recording;for(var[o,u]of Object.entries(i||{}))o in a&&(o==="maskInputOptions"?a.maskInputOptions=Y({password:!0},u):a[o]=u);this.wu&&this.wu.enabled&&(a.recordCanvas=!0,a.sampling={canvas:this.wu.fps},a.dataURLOptions={type:"image/webp",quality:this.wu.quality}),this.Cu&&(a.maskAllInputs=(r=this.Cu.maskAllInputs)===null||r===void 0||r,a.maskTextSelector=(n=this.Cu.maskTextSelector)!==null&&n!==void 0?n:void 0,a.blockSelector=(s=this.Cu.blockSelector)!==null&&s!==void 0?s:void 0);var l=bn();if(l){this.Wu=(e=this.Wu)!==null&&e!==void 0?e:new gi(l,{refillRate:this._instance.config.session_recording.__mutationThrottlerRefillRate,bucketSize:this._instance.config.session_recording.__mutationThrottlerBucketSize,onBlockedNode:(c,m)=>{var h="Too many mutations on node '"+c+"'. Rate limiting. This could be due to SVG animations or something similar";ye.info(h,{node:m}),this.log(vn+" "+h,"warn")}});var d=this.Au();if(this.qa=l(Y({emit:c=>{this.onRRwebEmit(c)},plugins:d},a)),!this.qa)return this.ru=!0,void ye.error("rrweb failed to start - Loss of recording data is possible. Check the browser console for rrweb errors.");this.ru=!1,this.Qa=Date.now(),this.eu=He(this.eu)?this.eu:"unknown",this.tryAddCustomEvent("$remote_config_received",this.Do),this.Va("$session_options",{sessionRecordingOptions:a,activePlugins:d.map((c=>c?.name))}),this.Va("$posthog_config",{config:this._instance.config})}else ye.error("_startRecorder was called but rrwebRecord is not available. This indicates something has gone wrong.")}}tryAddCustomEvent(e,r){return this.Va(e,r)}}Ne.__PosthogExtensions__=Ne.__PosthogExtensions__||{},Ne.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:t=>({name:"rrweb/console@1",observer:Ua,options:t}),getRecordNetworkPlugin:t=>({name:"rrweb/network@1",observer:si,options:t})},Ne.__PosthogExtensions__.rrweb={record:Dt,version:"v2",wasMaxDepthReached:()=>Lr,resetMaxDepthState(){Lr=!1,Or=!1}},Ne.__PosthogExtensions__.initSessionRecording=t=>new Ii(t)})();
|
|
109
|
-
//# sourceMappingURL=posthog-recorder-
|
|
109
|
+
//# sourceMappingURL=posthog-recorder-ajpd22PN.js.map
|