1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="698d0d4f-7631-445b-921e-622d77d6a8a8",e._sentryDebugIdIdentifier="sentry-dbid-698d0d4f-7631-445b-921e-622d77d6a8a8")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9834],{86807:(e,t,r)=>{let n,i,s,o,a,l;r.d(t,{M:()=>rO,w:()=>rD});var u,c=r(77628),d=r(8708),h=r(71830),p=r(69311),m=r(9344),f=r(65411),y=r(56011),g=(r(14034),r(18334)),S=r(98093),_=r(92797),b=r(15806),v=r(38087),w=r(75496),k=r(76076),E=r(63158),M=r(13445),C=r(5896),I=r(66998),T=r(57510),x=r(43946),R=r(25372),D=r(76403),N=r(40567),A=r(46801),O=r(9358),L=r(49172),P=r(35800);let F=c.O,U="sentryReplaySession",B="Unable to send Replay";var z=Object.defineProperty,W=(e,t,r)=>((e,t,r)=>t in e?z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),$=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))($||{});function H(e){let t=e?.host;return t?.shadowRoot===e}function j(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function q(e){try{var t;let r=e.rules||e.cssRules;return r?((t=Array.from(r,V).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t):null}catch(e){return null}}function V(e){let t;if("styleSheet"in e)try{t=q(e.styleSheet)||function(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let r=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(e){}else if("selectorText"in e){let t=e.cssText,r=e.selectorText.includes(":"),n="string"==typeof e.style.all&&e.style.all;if(n&&(t=function(e){let t="";for(let r=0;r<e.style.length;r++){let n=e.style,i=n[r],s=n.getPropertyPriority(i);t+=`${i}:${n.getPropertyValue(i)}${s?" !important":""};`}return`${e.selectorText} { ${t} }`}(e)),r&&(t=t.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),r||n)return t}return t||e.cssText}class K{constructor(){W(this,"idNodeMap",new Map),W(this,"nodeMetaMap",new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-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){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function J({maskInputOptions:e,tagName:t,type:r}){return"OPTION"===t&&(t="SELECT"),!!(e[t.toLowerCase()]||r&&e[r]||"password"===r||"INPUT"===t&&!r&&e.text)}function G({isMasked:e,element:t,value:r,maskInputFn:n}){let i=r||"";return e?(n&&(i=n(i,t)),"*".repeat(i.length)):i}function Y(e){return e.toLowerCase()}function X(e){return e.toUpperCase()}let Z="__rrweb_original__";function Q(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Y(t):null}function ee(e,t,r){return"INPUT"===t&&("radio"===r||"checkbox"===r)?e.getAttribute("value")||"":e.value}function et(e,t){let r;try{r=new URL(e,t??window.location.href)}catch(e){return null}let n=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return n?.[1]??null}let er={};function en(e){let t=er[e];if(t)return t;let r=window.document,n=window[e];if(r&&"function"==typeof r.createElement)try{let t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(t)}catch(e){}return er[e]=n.bind(window)}function ei(...e){return en("setTimeout")(...e)}
1function es(...e){return en("clearTimeout")(...e)}function eo(e){try{return e.contentDocument}catch(e){}}let ea=1,el=RegExp("[^a-z0-9-_:]");function eu(){return ea++}let ec=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ed=/^(?:[a-z+]+:)?\/\//i,eh=/^www\..*/i,ep=/^(data:)([^,]*),(.*)/i;function em(e,t){return(e||"").replace(ec,(e,r,n,i,s,o)=>{let a=n||s||o,l=r||i||"";if(!a)return e;if(ed.test(a)||eh.test(a)||ep.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${(t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0]).split("?")[0]+a}${l})`;let u=t.split("/"),c=a.split("/");for(let e of(u.pop(),c))if("."===e)continue;else".."===e?u.pop():u.push(e);return`url(${l}${u.join("/")}${l})`})}let ef=/^[^ \t\n\r\u000c]+/,ey=/^[, \t\n\r\u000c]+/,eg=new WeakMap;function eS(e,t){return t&&""!==t.trim()?e_(e,t):t}function e_(e,t){let r=eg.get(e);if(r||(r=e.createElement("a"),eg.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function eb(e,t,r,n,i,s,o){if(!n)return n;if("src"===r||"href"===r&&("use"!==t||"#"!==n[0])||"xlink:href"===r&&"#"!==n[0])return eS(e,n);if("background"===r&&("table"===t||"td"===t||"th"===t))return eS(e,n);if("srcset"===r)return function(e,t){if(""===t.trim())return t;let r=0;function n(e){let n,i=e.exec(t.substring(r));return i?(n=i[0],r+=n.length,n):""}let i=[];for(;n(ey),!(r>=t.length);){let s=n(ef);if(","===s.slice(-1))s=eS(e,s.substring(0,s.length-1)),i.push(s);else{let n="";s=eS(e,s);let o=!1;for(;;){let e=t.charAt(r);if(""===e){i.push((s+n).trim());break}if(o)")"===e&&(o=!1);else if(","===e){r+=1,i.push((s+n).trim());break}else"("===e&&(o=!0);n+=e,r+=1}}}return i.join(", ")}(e,n);if("style"===r){let t=em(n,e_(e));return o&&o.size>0&&(t=function(e,t){if(!e||0===t.size)return e;try{let r=e.split(";"),n=[];for(let e of r){if(!(e=e.trim()))continue;let r=e.indexOf(":");if(-1===r){n.push(e);continue}let i=e.slice(0,r).trim();t.has(i)||n.push(e)}return n.join("; ")+(n.length>0&&e.endsWith(";")?";":"")}catch(t){return console.warn("Error filtering CSS properties:",t),e}}(t,o)),t}else if("object"===t&&"data"===r)return eS(e,n);return"function"==typeof s?s(r,n,i):n}function ev(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function ew(e,t,r=1/0,n=0){return!e||e.nodeType!==e.ELEMENT_NODE||n>r?-1:t(e)?n:ew(e.parentNode,t,r,n+1)}function ek(e,t){return r=>{if(null===r)return!1;try{if(e){if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(function(e,t){for(let r=e.classList.length;r--;){let n=e.classList[r];if(t.test(n))return!0}return!1}(r,e))return!0}if(t&&r.matches(t))return!0;return!1}catch{return!1}}}function eE(e,t,r,n,i,s){try{let o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===o)return!1;if("INPUT"===o.tagName){let e=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let a=-1,l=-1;if(s){if((l=ew(o,ek(n,i)))<0)return!0;a=ew(o,ek(t,r),l>=0?l:1/0)}else{if((a=ew(o,ek(t,r)))<0)return!1;l=ew(o,ek(n,i),a>=0?a:1/0)}return a>=0?!(l>=0)||a<=l:!(l>=0)&&!!s}catch(e){}return!!s}function eM(e){return null==e?"":e.toLowerCase()}function eC(e,t){let r,{doc:s,mirror:o,blockClass:a,blockSelector:l,unblockSelector:u,maskAllText:c,maskTextClass:d,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:m,skipChild:f=!1,inlineStylesheet:y=!0,maskInputOptions:g={},maskAttributeFn:S,maskTextFn:_,maskInputFn:b,slimDOMOptions:v,dataURLOptions:w={}
1,inlineImages:k=!1,recordCanvas:E=!1,onSerialize:M,onIframeLoad:C,iframeLoadTimeout:I=5e3,onBlockedImageLoad:T,onStylesheetLoad:x,stylesheetLoadTimeout:R=5e3,keepIframeSrcFn:D=()=>!1,newlyAddedElement:N=!1,ignoreCSSAttributes:A}=t,{preserveWhiteSpace:O=!0}=t,L=function(e,t){let{doc:r,mirror:s,blockClass:o,blockSelector:a,unblockSelector:l,maskAllText:u,maskAttributeFn:c,maskTextClass:d,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:m,inlineStylesheet:f,maskInputOptions:y={},maskTextFn:g,maskInputFn:S,dataURLOptions:_={},inlineImages:b,recordCanvas:v,keepIframeSrcFn:w,newlyAddedElement:k=!1,ignoreCSSAttributes:E}=t,M=function(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return 1===r?void 0:r}(r,s);switch(e.nodeType){case e.DOCUMENT_NODE:if("CSS1Compat"!==e.compatMode)return{type:$.Document,childNodes:[],compatMode:e.compatMode};return{type:$.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:$.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:M};case e.ELEMENT_NODE:return function(e,t){let r,{doc:s,blockClass:o,blockSelector:a,unblockSelector:l,inlineStylesheet:u,maskInputOptions:c={},maskAttributeFn:d,maskInputFn:h,dataURLOptions:p={},inlineImages:m,recordCanvas:f,keepIframeSrcFn:y,newlyAddedElement:g=!1,rootId:S,maskTextClass:_,unmaskTextClass:b,maskTextSelector:v,unmaskTextSelector:w,ignoreCSSAttributes:k}=t,E=function(e,t,r,n){try{if(n&&e.matches(n))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;){let n=e.classList[r];if(t.test(n))return!0}if(r)return e.matches(r)}catch(e){}return!1}(e,o,a,l),M=function(e){if(e instanceof HTMLFormElement)return"form";let t=Y(e.tagName);return el.test(t)?"div":t}(e),C={},I=e.attributes.length;for(let t=0;t<I;t++){let r=e.attributes[t];r.name&&!ev(M,r.name,r.value)&&(C[r.name]=eb(s,M,Y(r.name),r.value,e,d,k))}if("link"===M&&u){let t=Array.from(s.styleSheets).find(t=>t.href===e.href),r=null;t&&(r=q(t)),r&&(C.rel=null,C.href=null,C.crossorigin=null,C._cssText=em(r,t.href))}if("style"===M&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){let t=q(e.sheet);t&&(C._cssText=em(t,e_(s)))}if("input"===M||"textarea"===M||"select"===M||"option"===M){let t=Q(e),r=ee(e,X(M),t),n=e.checked;if("submit"!==t&&"button"!==t&&r){let n=eE(e,_,v,b,w,J({type:t,tagName:X(M),maskInputOptions:c}));C.value=G({isMasked:n,element:e,value:r,maskInputFn:h})}n&&(C.checked=n)}if("option"===M&&(e.selected&&!c.select?C.selected=!0:delete C.selected),"canvas"===M&&f){if("2d"===e.__context)!function(e){let t=e.getContext("2d");if(!t)return!0;for(let r=0;r<e.width;r+=50)for(let n=0;n<e.height;n+=50){let i=t.getImageData;if(new Uint32Array((Z in i?i[Z]:i).call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer).some(e=>0!==e))return!1}return!0}(e)&&(C.rr_dataURL=e.toDataURL(p.type,p.quality));else if(!("__context"in e)){let t=e.toDataURL(p.type,p.quality),r=s.createElement("canvas");r.width=e.width,r.height=e.height,t!==r.toDataURL(p.type,p.quality)&&(C.rr_dataURL=t)}}if("img"===M&&m){n||(i=(n=s.createElement("canvas")).getContext("2d"));let t=e.currentSrc||e.getAttribute("src")||"<unknown-src>",r=e.crossOrigin,o=()=>{e.removeEventListener("load",o);try{n.width=e.naturalWidth,n.height=e.naturalHeight,i.drawImage(e,0,0),C.rr_dataURL=n.toDataURL(p.type,p.quality)}catch(r){if("anonymous"!==e.crossOrigin){e.crossOrigin="anonymous",e.complete&&0!==e.naturalWidth?o():e.addEventListener("load",o);return}console.warn(`Cannot inline img src=${t}! Error: ${r}`)}"anonymous"===e.crossOrigin&&(r?C.crossOrigin=r:e.removeAttribute("crossorigin"))};e.complete&&0!==e.naturalWidth?o():e.addEventListener("load",o)}if(("audio"===M||"video"===M)&&(C.rr_mediaState=e.paused?"paused":"played",C.rr_mediaCurrentTime=e.currentTime),!g&&(e.scrollLeft&&(C.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(C.rr_scrollTop=e.scrollTop)),E){let{width:t,height:r}=e.getBoundingClientRect();C={class:C.class,rr_width:`${t}px`,rr_height:`${r}px`}}"iframe"!==M||y(C.src)||(E||eo(e)||(C.rr_src=C.src),delete C.src);try{customElements.get(M)&&(r=!0)}catch(e){}return{type:$.Element,tagName:M,attributes:C,childNodes:[],isSVG:!!("svg"===e.tagName||e.ownerSVGElement)||void 0,needBlock:E,rootId:S,isCustom:r}}(e,{doc:r,blockClass:o,blockSelector:a,unblockSelector:l,inlineStylesheet:f,maskAttributeFn:c,maskInputOptions:y,maskInputFn:S,dataURLOptions:_,inlineImages:b,recordCanvas:v,keepIframeSrcFn:w,newlyAddedElement:k,rootId:M,maskTextClass:d,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:m,ignoreCSSAttributes:E});case e.TEXT_NODE:return function(e,t){let{maskAllText:r,maskTextClass:n,unmaskTextClass:i,maskTextSelector:s,unmaskTextSelector:o,maskTextFn:a,maskInputOptions:l,maskInputFn:u,rootId:c}=t,d=e.parentNode&&e.parentNode.tagName,h=e.textContent,p="STYLE"===d||void 0,m="SCRIPT"===d||void 0,f="TEXTAREA"===d||void 0;if(p&&h){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(h=q(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}h=em(h,e_(t.doc))}m&&(h="SCRIPT_PLACEHOLDER");let y=eE(e,n,s,i,o,r);return p||m||f||!h||!y||(h=a?a(h,e.parentElement):h.replace(/[\S]/g,"*")),f&&h&&(l.textarea||y)&&(h=u?u(h,e.parentNode):h.replace(/[\S]/g,"*")),"OPTION"===d&&h&&(h=G({isMasked:eE(e,n,s,i,o,J({type:null,tagName:d,maskInputOptions:l})),element:e,value:h,maskInputFn:u})),{type:$.Text,textContent:h||"",isStyle:p,rootId:c}}(e,{doc:r,maskAllText:u,maskTextClass:d,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:m,maskTextFn:g,maskInputOptions:y,maskInputFn:S,rootId:M});case e.CDATA_SECTION_NODE:return{type:$.CDATA,textContent:"",rootId:M};case e.COMMENT_NODE:return{type:$.Comment,textContent:e.textContent||"",rootId:M};default:return!1}}(e,{doc:s,mirror:o,blockClass:a,blockSelector:l,maskAllText:c,unblockSelector:u,maskTextClass:d,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:m,inlineStylesheet:y,maskInputOptions:g,maskAttributeFn:S,maskTextFn:_,maskInputFn:b,dataURLOptions:w,inlineImages:k,recordCanvas:E,keepIframeSrcFn:D,newlyAddedElement:N,ignoreCSSAttributes:A});if(!L)return console.warn(e,"not serialized"),null;r=o.hasNode(e)?o.getId(e):!function(e,t){if(t.comment&&e.type===$.Comment)return!0;
1if(e.type===$.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===et(e.attributes.href)))return!0;else if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(eM(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===eM(e.attributes.name)||"icon"===eM(e.attributes.rel)||"apple-touch-icon"===eM(e.attributes.rel)||"shortcut icon"===eM(e.attributes.rel))))return!0;else if("meta"===e.tagName){if(t.headMetaDescKeywords&&eM(e.attributes.name).match(/^description|keywords$/))return!0;else if(t.headMetaSocial&&(eM(e.attributes.property).match(/^(og|twitter|fb):/)||eM(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===eM(e.attributes.name)))return!0;else if(t.headMetaRobots&&("robots"===eM(e.attributes.name)||"googlebot"===eM(e.attributes.name)||"bingbot"===eM(e.attributes.name)))return!0;else if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;else if(t.headMetaAuthorship&&("author"===eM(e.attributes.name)||"generator"===eM(e.attributes.name)||"framework"===eM(e.attributes.name)||"publisher"===eM(e.attributes.name)||"progid"===eM(e.attributes.name)||eM(e.attributes.property).match(/^article:/)||eM(e.attributes.property).match(/^product:/)))return!0;else if(t.headMetaVerification&&("google-site-verification"===eM(e.attributes.name)||"yandex-verification"===eM(e.attributes.name)||"csrf-token"===eM(e.attributes.name)||"p:domain_verify"===eM(e.attributes.name)||"verify-v1"===eM(e.attributes.name)||"verification"===eM(e.attributes.name)||"shopify-checkout-api-token"===eM(e.attributes.name)))return!0}}return!1}(L,v)&&(O||L.type!==$.Text||L.isStyle||L.textContent.replace(/^\s+|\s+$/gm,"").length)?eu():-2;let P=Object.assign(L,{id:r});if(o.add(e,P),-2===r)return null;M&&M(e);let F=!f;if(P.type===$.Element){F=F&&!P.needBlock;let t=e.shadowRoot;t&&j(t)&&(P.isShadowHost=!0)}if((P.type===$.Document||P.type===$.Element)&&F){v.headWhitespace&&P.type===$.Element&&"head"===P.tagName&&(O=!1);let t={doc:s,mirror:o,blockClass:a,blockSelector:l,maskAllText:c,unblockSelector:u,maskTextClass:d,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:m,skipChild:f,inlineStylesheet:y,maskInputOptions:g,maskAttributeFn:S,maskTextFn:_,maskInputFn:b,slimDOMOptions:v,dataURLOptions:w,inlineImages:k,recordCanvas:E,preserveWhiteSpace:O,onSerialize:M,onIframeLoad:C,iframeLoadTimeout:I,onBlockedImageLoad:T,onStylesheetLoad:x,stylesheetLoadTimeout:R,keepIframeSrcFn:D,ignoreCSSAttributes:A};for(let r of e.childNodes?Array.from(e.childNodes):[]){let e=eC(r,t);e&&P.childNodes.push(e)}if(e.nodeType===e.ELEMENT_NODE&&e.shadowRoot)for(let r of Array.from(e.shadowRoot.childNodes)){let n=eC(r,t);n&&(j(e.shadowRoot)&&(n.isShadow=!0),P.childNodes.push(n))}}if(e.parentNode&&H(e.parentNode)&&j(e.parentNode)&&(P.isShadow=!0),P.type!==$.Element||"iframe"!==P.tagName||P.needBlock||function(e,t,r){let n,i=e.contentWindow;if(!i)return;let s=!1;try{n=i.document.readyState}catch(e){return}if("complete"!==n){let n=ei(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{es(n),s=!0,t()});return}let o="about:blank";if(i.location.href!==o||e.src===o||""===e.src)return ei(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{let t=eo(e);if(t&&C){let r=eC(t,{doc:t,mirror:o,blockClass:a,blockSelector:l,unblockSelector:u,maskAllText:c,maskTextClass:d,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:m,skipChild:!1,inlineStylesheet:y,maskInputOptions:g,maskAttributeFn:S,maskTextFn:_,maskInputFn:b,slimDOMOptions:v,dataURLOptions:w,inlineImages:k,recordCanvas:E,preserveWhiteSpace:O,onSerialize:M,onIframeLoad:C,iframeLoadTimeout:I,onStylesheetLoad:x,stylesheetLoadTimeout:R,keepIframeSrcFn:D,ignoreCSSAttributes:A});r&&C(e,r)}},I),P.type===$.Element&&"img"===P.tagName&&!e.complete&&P.needBlock){let t=()=>{if(e.isConnected&&!e.complete&&T)try{let t=e.getBoundingClientRect();t.width>0&&t.height>0&&T(e,P,t)}catch(e){}e.removeEventListener("load",t)};e.isConnected&&e.addEventListener("load",t)}return P.type===$.Element&&"link"===P.tagName&&"string"==typeof P.attributes.rel&&("stylesheet"===P.attributes.rel||"preload"===P.attributes.rel&&"string"==typeof P.attributes.href&&"css"===et(P.attributes.href))&&function(e,t,r){let n,i=!1;try{n=e.sheet}catch(e){return}if(n)return;let s=ei(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{es(s),i=!0,t()})}(e,()=>{if(x){let t=eC(e,{doc:s,mirror:o,blockClass:a,blockSelector:l,unblockSelector:u,maskAllText:c,maskTextClass:d,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:m,skipChild:!1,inlineStylesheet:y,maskInputOptions:g,maskAttributeFn:S,maskTextFn:_,maskInputFn:b,slimDOMOptions:v,dataURLOptions:w,inlineImages:k,recordCanvas:E,preserveWhiteSpace:O,onSerialize:M,onIframeLoad:C,iframeLoadTimeout:I,onStylesheetLoad:x,stylesheetLoadTimeout:R,keepIframeSrcFn:D,ignoreCSSAttributes:A});t&&x(e,t)}},R),P.type===$.Element&&delete P.needBlock,P}function eI(e,t,r=document){let n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}let eT="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",ex={map:{},getId:()=>(console.error(eT),-1),getNode:()=>(console.error(eT),null),removeNodeFromMap(){console.error(eT)},has:()=>(console.error(eT),!1),reset(){console.error(eT)}};function eR(e,t,r={}){let n=null,i=0;return function(...s){let o=Date.now();i||!1!==r.leading||(i=o);let a=t-(o-i),l=this;a<=0||a>t?(n&&(function(...e){eV("clearTimeout")(...e)}
1(n),n=null),i=o,e.apply(l,s)):n||!1===r.trailing||(n=eK(()=>{i=!1===r.leading?0:Date.now(),n=null,e.apply(l,s)},a))}}function eD(e,t,r){try{if(!(t in e))return()=>{};let n=e[t],i=r(n);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(ex=new Proxy(ex,{get:(e,t,r)=>("map"===t&&console.error(eT),Reflect.get(e,t,r))}));let eN=Date.now;function eA(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function eO(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function eL(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function eP(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch(e){return null}}function eF(e,t,r,n,i){if(!e)return!1;let s=eP(e);if(!s)return!1;let o=ek(t,r);if(!i){let e=n&&s.matches(n);return o(s)&&!e}let a=ew(s,o),l=-1;return!(a<0)&&(n&&(l=ew(s,ek(null,n))),a>-1&&l<0||a<l)}function eU(e,t){return -2===t.getId(e)}function eB(e){return!!e.changedTouches}function ez(e,t){return!!("IFRAME"===e.nodeName&&t.getMeta(e))}function eW(e,t){return!!("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function e$(e){return!!e?.shadowRoot}/[1-9][0-9]{12}/.test(Date.now().toString())||(eN=()=>new Date().getTime());class eH{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){let r;return this.has(e)?this.getId(e):(r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r)}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 ej(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}let eq={};function eV(e){let t=eq[e];if(t)return t;let r=window.document,n=window[e];if(r&&"function"==typeof r.createElement)try{let t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(t)}catch(e){}return eq[e]=n.bind(window)}function eK(...e){return eV("setTimeout")(...e)}var eJ=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(eJ||{}),eG=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(eG||{}),eY=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(eY||{}),eX=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(eX||{}),eZ=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(eZ||{});class eQ{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=t?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&"__ln"in e.previousSibling){let r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&"__ln"in e.nextSibling&&e.nextSibling.__ln.previous){let r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;
1this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}let e0=(e,t)=>`${e}@${t}`;class e1{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,r=new eQ,n=e=>{let t=e,r=-2;for(;-2===r;)r=(t=t&&t.nextSibling)&&this.mirror.getId(t);return r},i=i=>{if(!i.parentNode||!function(e){let t=e.ownerDocument;return!!t&&(t.contains(e)||function(e){let t=e.ownerDocument;if(!t)return!1;let r=function(e){let t,r=e;for(;t=ej(r);)r=t;return r}(e);return t.contains(r)}(e))}(i))return;let s=H(i.parentNode)?this.mirror.getId(ej(i)):this.mirror.getId(i.parentNode),o=n(i);if(-1===s||-1===o)return r.addNode(i);let a=eC(i,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{ez(e,this.mirror)&&!eF(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),eW(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),e$(i)&&this.shadowDomManager.addShadowRoot(i.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{eF(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(e,t),e.contentWindow&&this.canvasManager.addWindow(e.contentWindow),this.shadowDomManager.observeAttachShadow(e))},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:r,height:n})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${r}px`,height:`${n}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});a&&(e.push({parentId:s,nextId:o,node:a}),t.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let e of this.movedSet)(!e2(this.removes,e,this.mirror)||this.movedSet.has(e.parentNode))&&i(e);for(let e of this.addedSet)e5(this.droppedSet,e)||e2(this.removes,e,this.mirror)?e5(this.movedSet,e)?i(e):this.droppedSet.add(e):i(e);let s=null;for(;r.length;){let e=null;if(s){let t=this.mirror.getId(s.value.parentNode),r=n(s.value);-1!==t&&-1!==r&&(e=s)}if(!e){let t=r.tail;for(;t;){let r=t;if(t=t.previous,r){let t=this.mirror.getId(r.value.parentNode);if(-1===n(r.value))continue;if(-1!==t){e=r;break}{let t=r.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let n=t.parentNode.host;if(-1!==this.mirror.getId(n)){e=r;break}}}}}}if(!e){for(;r.head;)r.removeNode(r.head.value);break}s=e.previous,r.removeNode(e.value),i(e.value)}let o={texts:this.texts.map(e=>({id:this.mirror.getId(e.node),value:e.value})).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{let{attributes:t}=e;if("string"==typeof t.style){let r=JSON.stringify(e.styleDiff),n=JSON.stringify(e._unchangedStyles);r.length<t.style.length&&(r+n).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(o.texts.length||o.attributes.length||o.removes.length||o.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.movedMap={},this.mutationCb(o))},this.processMutation=e=>{if(!eU(e.target,this.mirror))switch(e.type){case"characterData":{let t=e.target.textContent;eF(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||t===e.oldValue||this.texts.push({value:eE(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,eP(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,r=e.attributeName,n=e.target.getAttribute(r);if("value"===r){let r=Q(t),i=t.tagName;n=ee(t,i,r);let s=J({maskInputOptions:this.maskInputOptions,tagName:i,type:r});n=G({isMasked:eE(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,s),element:t,value:n,maskInputFn:this.maskInputFn})}if(eF(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||n===e.oldValue)return;let i=this.attributeMap.get(e.target);
1if("IFRAME"===t.tagName&&"src"===r&&!this.keepIframeSrcFn(n)){if(function(e){try{return e.contentDocument}catch(e){}}(t))return;r="rr_src"}if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),"type"===r&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!ev(t.tagName,r)&&(i.attributes[r]=eb(this.doc,Y(t.tagName),Y(r),n,t,this.maskAttributeFn),"style"===r)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}let r=this.unattachedDoc.createElement("span");for(let n of(e.oldValue&&r.setAttribute("style",e.oldValue),Array.from(t.style))){let e=t.style.getPropertyValue(n),s=t.style.getPropertyPriority(n);e!==r.style.getPropertyValue(n)||s!==r.style.getPropertyPriority(n)?""===s?i.styleDiff[n]=e:i.styleDiff[n]=[e,s]:i._unchangedStyles[n]=[e,s]}for(let e of Array.from(r.style))""===t.style.getPropertyValue(e)&&(i.styleDiff[e]=!1)}break}case"childList":if(eF(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let r=this.mirror.getId(t),n=H(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);eF(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||eU(t,this.mirror)||-1===this.mirror.getId(t)||(this.addedSet.has(t)?(e3(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||function e(t,r){if(H(t))return!1;let n=r.getId(t);return!r.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode,r))}(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[e0(r,n)]?e3(this.movedSet,t):this.removes.push({parentId:n,id:r,isShadow:!!(H(e.target)&&j(e.target))||void 0})),this.mapRemoves.push(t))})}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(eU(e,this.mirror))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[e0(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);!eF(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&(e.childNodes&&e.childNodes.forEach(e=>this.genAdds(e)),e$(e)&&e.shadowRoot.childNodes.forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager","ignoreCSSAttributes"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function e3(e,t){e.delete(t),t.childNodes?.forEach(t=>e3(e,t))}function e2(e,t,r){return 0!==e.length&&function(e,t,r){let n=t.parentNode;for(;n;){let t=r.getId(n);if(e.some(e=>e.id===t))return!0;n=n.parentNode}return!1}(e,t,r)}function e5(e,t){return 0!==e.size&&function e(t,r){let{parentNode:n}=r;return!!n&&(!!t.has(n)||e(t,n))}(e,t)}let e4=e=>s?(...t)=>{try{return e(...t)}catch(e){if(s&&!0===s(e))return()=>{};throw e}}:e,e6=[];function e8(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}let e9=["INPUT","TEXTAREA","SELECT"],e7=new WeakMap;function te(e){var t=[];if(tn("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||tn("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||tn("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||tn("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){let r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else if(e.parentStyleSheet){let r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}function tt(e,t,r){let n,i;return e?(e.ownerNode?n=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:n}):{}}function tr(e,t={}){let r,n=e.doc.defaultView;if(!n)return()=>{};e.recordDOM&&(r=function(e,t){let r=new e1;e6.push(r),r.init(e);let n=window.MutationObserver||window.__rrMutationObserver,i=window?.Zone?.__symbol__?.("MutationObserver");i&&window[i]&&(n=window[i]);let s=new n(e4(t=>{e.onMutation&&!1===e.onMutation(t)||r.processMutations.bind(r)(t)}));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}(e,e.doc));let i=function({mousemoveCb:e,sampling:t,doc:r,mirror:n}){let i;if(!1===t.mousemove)return()=>{};let s="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500,a=[],l=eR(e4(t=>{let r=Date.now()-i;e(a.map(e=>(e.timeOffset-=r,e)),t),a=[],i=null}),o),u=e4(eR(e4(e=>{let t=e8(e),{clientX:r,clientY:s}=eB(e)?e.changedTouches[0]:e;i||(i=eN()),a.push({x:r,y:s,id:n.getId(t),timeOffset:eN()-i}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?eG.Drag:e instanceof MouseEvent?eG.MouseMove:eG.TouchMove)}),s,{trailing:!1})),c=[eI("mousemove",u,r),eI("touchmove",u,r),eI("drag",u,r)];return e4(()=>
1{c.forEach(e=>e())})}(e),s=function({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,unblockSelector:s,sampling:o}){if(!1===o.mouseInteraction)return()=>{};let a=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,l=[],u=null;return Object.keys(eY).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]).forEach(o=>{let a=Y(o),c=t=>{let a=e8(t);if(eF(a,n,i,s,!0))return;let l=null,c=o;if("pointerType"in t){switch(t.pointerType){case"mouse":l=eX.Mouse;break;case"touch":l=eX.Touch;break;case"pen":l=eX.Pen}l===eX.Touch?eY[o]===eY.MouseDown?c="TouchStart":eY[o]===eY.MouseUp&&(c="TouchEnd"):eX.Pen}else eB(t)&&(l=eX.Touch);null!==l?(u=l,(c.startsWith("Touch")&&l===eX.Touch||c.startsWith("Mouse")&&l===eX.Mouse)&&(l=null)):eY[o]===eY.Click&&(l=u,u=null);let d=eB(t)?t.changedTouches[0]:t;if(!d)return;let h=r.getId(a),{clientX:p,clientY:m}=d;e4(e)({type:eY[c],id:h,x:p,y:m,...null!==l&&{pointerType:l}})};if(window.PointerEvent)switch(eY[o]){case eY.MouseDown:case eY.MouseUp:a=a.replace("mouse","pointer");break;case eY.TouchStart:case eY.TouchEnd:return}l.push(eI(a,c,t))}),e4(()=>{l.forEach(e=>e())})}(e),o=function({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,unblockSelector:s,sampling:o}){return eI("scroll",e4(eR(e4(o=>{let a=e8(o);if(!a||eF(a,n,i,s,!0))return;let l=r.getId(a);if(a===t&&t.defaultView){let r=eA(t.defaultView);e({id:l,x:r.left,y:r.top})}else e({id:l,x:a.scrollLeft,y:a.scrollTop})}),o.scroll||100)),t)}(e),a=function({viewportResizeCb:e},{win:t}){let r=-1,n=-1;return eI("resize",e4(eR(e4(()=>{let t=eO(),i=eL();(r!==t||n!==i)&&(e({width:Number(i),height:Number(t)}),r=t,n=i)}),200)),t)}(e,{win:n}),l=function({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,unblockSelector:s,ignoreClass:o,ignoreSelector:a,maskInputOptions:l,maskInputFn:u,sampling:c,userTriggeredOnInput:d,maskTextClass:h,unmaskTextClass:p,maskTextSelector:m,unmaskTextSelector:f}
1){function y(e){let r=e8(e),c=e.isTrusted,y=r&&X(r.tagName);if("OPTION"===y&&(r=r.parentElement),!r||!y||0>e9.indexOf(y)||eF(r,n,i,s,!0))return;let S=r;if(S.classList.contains(o)||a&&S.matches(a))return;let _=Q(r),b=ee(S,y,_),v=!1,w=J({maskInputOptions:l,tagName:y,type:_}),k=eE(r,h,m,p,f,w);("radio"===_||"checkbox"===_)&&(v=r.checked),b=G({isMasked:k,element:r,value:b,maskInputFn:u}),g(r,d?{text:b,isChecked:v,userTriggered:c}:{text:b,isChecked:v});let E=r.name;"radio"===_&&E&&v&&t.querySelectorAll(`input[type="radio"][name="${E}"]`).forEach(e=>{if(e!==r){let t=G({isMasked:k,element:e,value:ee(e,y,_),maskInputFn:u});g(e,d?{text:t,isChecked:!v,userTriggered:!1}:{text:t,isChecked:!v})}})}function g(t,n){let i=e7.get(t);if(!i||i.text!==n.text||i.isChecked!==n.isChecked){e7.set(t,n);let i=r.getId(t);e4(e)({...n,id:i})}}let S=("last"===c.input?["change"]:["input","change"]).map(e=>eI(e,e4(y),t)),_=t.defaultView;if(!_)return()=>{S.forEach(e=>e())};let b=_.Object.getOwnPropertyDescriptor(_.HTMLInputElement.prototype,"value"),v=[[_.HTMLInputElement.prototype,"value"],[_.HTMLInputElement.prototype,"checked"],[_.HTMLSelectElement.prototype,"value"],[_.HTMLTextAreaElement.prototype,"value"],[_.HTMLSelectElement.prototype,"selectedIndex"],[_.HTMLOptionElement.prototype,"selected"]];return b&&b.set&&S.push(...v.map(e=>(function e(t,r,n,i,s=window){let o=s.Object.getOwnPropertyDescriptor(t,r);return s.Object.defineProperty(t,r,i?n:{set(e){eK(()=>{n.set.call(this,e)},0),o&&o.set&&o.set.call(this,e)}}),()=>e(t,r,o||{},!0)})(e[0],e[1],{set(){e4(y)({target:this,isTrusted:!1})}},!1,_))),e4(()=>{S.forEach(e=>e())})}(e),u=function({mediaInteractionCb:e,blockClass:t,blockSelector:r,unblockSelector:n,mirror:i,sampling:s,doc:o}){let a=e4(o=>eR(e4(s=>{let a=e8(s);if(!a||eF(a,t,r,n,!0))return;let{currentTime:l,volume:u,muted:c,playbackRate:d}=a;e({type:o,id:i.getId(a),currentTime:l,volume:u,muted:c,playbackRate:d})}),s.media||500)),l=[eI("play",a(eZ.Play),o),eI("pause",a(eZ.Pause),o),eI("seeked",a(eZ.Seeked),o),eI("volumechange",a(eZ.VolumeChange),o),eI("ratechange",a(eZ.RateChange),o)];return e4(()=>{l.forEach(e=>e())})}(e),c=()=>{},d=()=>{},h=()=>{},p=()=>{};e.recordDOM&&(c=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){let i,s;if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};let o=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:e4((n,i,s)=>{let[o,a]=s,{id:l,styleId:u}=tt(i,t,r.styleMirror);return(l&&-1!==l||u&&-1!==u)&&e({id:l,styleId:u,adds:[{rule:o,index:a}]}),n.apply(i,s)})});let a=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:e4((n,i,s)=>{let[o]=s,{id:a,styleId:l}=tt(i,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:o}]}),n.apply(i,s)})}),n.CSSStyleSheet.prototype.replace&&(i=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:e4((n,i,s)=>{let[o]=s,{id:a,styleId:l}=tt(i,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:o}),n.apply(i,s)})})),n.CSSStyleSheet.prototype.replaceSync&&(s=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(s,{apply:e4((n,i,s)=>{let[o]=s,{id:a,styleId:l}=tt(i,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:o}),n.apply(i,s)})}));let l={};ti("CSSGroupingRule")?l.CSSGroupingRule=n.CSSGroupingRule:(ti("CSSMediaRule")&&(l.CSSMediaRule=n.CSSMediaRule),ti("CSSConditionRule")&&(l.CSSConditionRule=n.CSSConditionRule),ti("CSSSupportsRule")&&(l.CSSSupportsRule=n.CSSSupportsRule));let u={};return Object.entries(l).forEach(([n,i])=>{u[n]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(u[n].insertRule,{apply:e4((n,i,s)=>{let[o,a]=s,{id:l,styleId:u}=tt(i.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||u&&-1!==u)&&e({id:l,styleId:u,adds:[{rule:o,index:[...te(i),a||0]}]}),n.apply(i,s)})}),i.prototype.deleteRule=new Proxy(u[n].deleteRule,{apply:e4((n,i,s)=>{let[o]=s,{id:a,styleId:l}=tt(i.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...te(i),o]}]}),n.apply(i,s)})})}),e4(()=>{n.CSSStyleSheet.prototype.insertRule=o,n.CSSStyleSheet.prototype.deleteRule=a,i&&(n.CSSStyleSheet.prototype.replace=i),s&&(n.CSSStyleSheet.prototype.replaceSync=s),Object.entries(l).forEach(([e,t])=>{t.prototype.insertRule=u[e].insertRule,t.prototype.deleteRule=u[e].deleteRule})})}(e,{win:n}),d=function({mirror:e,stylesheetManager:t},r){let n=null;n="#document"===r.nodeName?e.getId(r):e.getId(r.host);let i="#document"===r.nodeName?r.defaultView?.Document:r.ownerDocument?.defaultView?.ShadowRoot,s=i?.prototype?Object.getOwnPropertyDescriptor(i?.prototype,"adoptedStyleSheets"):void 0;return null!==n&&-1!==n&&i&&s?(Object.defineProperty(r,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return s.get?.call(this)},set(e){let r=s.set?.call(this,e);if(null!==n&&-1!==n)try{t.adoptStyleSheets(e,n)}catch(e){}return r}}),e4(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})})):()=>{}}(e,e.doc),h=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:i}){let s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:e4((i,o,a)=>{let[l,u,c]=a;if(r.has(l))return s.apply(o,[l,u,c]);let{id:d,styleId:h}=tt(o.parentRule?.parentStyleSheet,t,n.styleMirror);return(d&&-1!==d||h&&-1!==h)&&e({id:d,styleId:h,set:{property:l,value:u,priority:c},index:te(o.parentRule)}),i.apply(o,a)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:e4((i,s,a)=>{let[l]=a;if(r.has(l))return o.apply(s,[l]);let{id:u,styleId:c}=tt(s.parentRule?.parentStyleSheet,t,n.styleMirror);return(u&&-1!==u||c&&-1!==c)&&e({id:u,styleId:c,remove:{property:l},index:te(s.parentRule)}),i.apply(s,a)})}),e4(()=>{i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=o})}(e,{win:n}),e.collectFonts&&(p=function({fontCb:e,doc:t}){let r=t.defaultView;if(!r)return()=>{};let n=[],i=new WeakMap,s=r.FontFace;r.FontFace=function(e,t,r){let n=new s(e,t,r);return i.set(n,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),n};let o=eD(t.fonts,"add",function(t){return function(r){return eK(e4(()=>{let t=i.get(r);t&&(e(t),i.delete(r))}),0),t.apply(this,[r])}});return n.push(()=>{r.FontFace=s}),n.push(o),e4(()=>
1{n.forEach(e=>e())})}(e)));let m=function(e){let{doc:t,mirror:r,blockClass:n,blockSelector:i,unblockSelector:s,selectionCb:o}=e,a=!0,l=e4(()=>{let e=t.getSelection();if(!e||a&&e?.isCollapsed)return;a=e.isCollapsed||!1;let l=[],u=e.rangeCount||0;for(let t=0;t<u;t++){let{startContainer:o,startOffset:a,endContainer:u,endOffset:c}=e.getRangeAt(t);eF(o,n,i,s,!0)||eF(u,n,i,s,!0)||l.push({start:r.getId(o),startOffset:a,end:r.getId(u),endOffset:c})}o({ranges:l})});return l(),eI("selectionchange",l)}(e),f=function({doc:e,customElementCb:t}){let r=e.defaultView;return r&&r.customElements?eD(r.customElements,"define",function(e){return function(r,n,i){try{t({define:{name:r}})}catch(e){}return e.apply(this,[r,n,i])}}):()=>{}}(e),y=[];for(let t of e.plugins)y.push(t.observer(t.callback,n,t.options));return e4(()=>{e6.forEach(e=>e.reset()),r?.disconnect(),i(),s(),o(),a(),l(),u(),c(),d(),h(),p(),m(),f(),y.forEach(e=>e())})}function tn(e){return void 0!==window[e]}function ti(e){return!!(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class ts{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,r,n){let i=r||this.getIdToRemoteIdMap(e),s=n||this.getRemoteIdToIdMap(e),o=i.get(t);return o||(o=this.generateIdFn(),i.set(t,o),s.set(o,t)),o}getIds(e,t){let r=this.getIdToRemoteIdMap(e),n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,r,n))}getRemoteId(e,t,r){let n=r||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;let i=n.get(t);return i||-1}getRemoteIds(e,t){let r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class to{constructor(){this.crossOriginIframeMirror=new ts(eu),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class ta{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}for(var tl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",tu="undefined"==typeof Uint8Array?[]:new Uint8Array(256),tc=0;tc<tl.length;tc++)tu[tl.charCodeAt(tc)]=tc;class td{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class th{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new eH,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;let r={id:t,styleIds:[]},n=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),n.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,t)=>({rule:V(e),index:t}))})),r.styleIds.push(e)}n.length>0&&(r.styles=n),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class tp{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){let r=this.nodeMap.get(e);return r&&Array.from(r).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,function(...e){eV("requestAnimationFrame")(...e)}(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}try{if(2!==Array.from([1],e=>2*e)[0]){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}let tm=new K;function tf(e={}){let t,{emit:r,checkoutEveryNms:n,checkoutEveryNth:i,blockClass:l="rr-block",blockSelector:u=null,unblockSelector:c=null,ignoreClass:d="rr-ignore",ignoreSelector:h=null,maskAllText:p=!1,maskTextClass:m="rr-mask",unmaskTextClass:f=null,maskTextSelector:y=null,unmaskTextSelector:g=null,inlineStylesheet:S=!0,maskAllInputs:_,maskInputOptions:b,slimDOMOptions:v,maskAttributeFn:w,maskInputFn:k,maskTextFn:E,maxCanvasSize:M=null,packFn:C,sampling:I={},dataURLOptions:T={},mousemoveWait:x,recordDOM:R=!0,recordCanvas:D=!1,recordCrossOriginIframes:N=!1,recordAfter:A="DOMContentLoaded"===e.recordAfter?e.recordAfter:"load",userTriggeredOnInput:O=!1,collectFonts:L=!1,inlineImages:P=!1,plugins:F,keepIframeSrcFn:U=()=>!1,ignoreCSSAttributes:B=new Set([]),errorHandler:z,onMutation:W,getCanvasManager:$}=e;s=z;let H=!N||window.parent===window,j=!1;if(!H)try{window.parent.document&&(j=!1)}catch(e){j=!0}if(H&&!r)throw Error("emit function is required");if(!H&&!j)return()=>{};void 0!==x&&void 0===I.mousemove&&(I.mousemove=x),tm.reset();let q=!0===_?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==b?b:{},V=!0===v||"all"===v?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===v,headMetaDescKeywords:"all"===v}:v||{};!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw TypeError("1 argument is required");do if(this===t)return!0;while(t=t&&t.parentNode);return!1})}();let J=0,G=e=>{for(let t of F||[])t.eventProcessor&&(e=t.eventProcessor(e));return C&&!j&&(e=C(e)),e};o=(e,s)=>{if(e.timestamp=eN(),e6[0]?.isFrozen()&&e.type!==eJ.FullSnapshot&&(e.type!==eJ.IncrementalSnapshot||e.data.source!==eG.Mutation)&&e6.forEac
1h(e=>e.unfreeze()),H)r?.(G(e),s);else if(j){let t={type:"rrweb",event:G(e),origin:window.location.origin,isCheckout:s};window.parent.postMessage(t,"*")}if(e.type===eJ.FullSnapshot)t=e,J=0;else if(e.type===eJ.IncrementalSnapshot){if(e.data.source===eG.Mutation&&e.data.isAttachIframe)return;J++;let r=i&&J>=i,s=n&&t&&e.timestamp-t.timestamp>n;(r||s)&&ei(!0)}};let Y=e=>{o({type:eJ.IncrementalSnapshot,data:{source:eG.Mutation,...e}})},X=e=>o({type:eJ.IncrementalSnapshot,data:{source:eG.Scroll,...e}}),Z=e=>o({type:eJ.IncrementalSnapshot,data:{source:eG.CanvasMutation,...e}}),Q=new th({mutationCb:Y,adoptedStyleSheetCb:e=>o({type:eJ.IncrementalSnapshot,data:{source:eG.AdoptedStyleSheet,...e}})}),ee=new to;for(let e of F||[])e.getMirror&&e.getMirror({nodeMirror:tm,crossOriginIframeMirror:ee.crossOriginIframeMirror,crossOriginIframeStyleMirror:ee.crossOriginIframeStyleMirror});let et=new tp,er=function(e,t){try{return e?e(t):new td}catch{return console.warn("Unable to initialize CanvasManager"),new td}}($,{mirror:tm,win:window,mutationCb:e=>o({type:eJ.IncrementalSnapshot,data:{source:eG.CanvasMutation,...e}}),recordCanvas:D,blockClass:l,blockSelector:u,unblockSelector:c,maxCanvasSize:M,sampling:I.canvas,dataURLOptions:T,errorHandler:z}),en=new ta,ei=(e=!1)=>{if(!R)return;o({type:eJ.Meta,data:{href:window.location.href,width:eL(),height:eO()}},e),Q.reset(),en.init(),e6.forEach(e=>e.lock());let t=function(e,t){let{mirror:r=new K,blockClass:n="rr-block",blockSelector:i=null,unblockSelector:s=null,maskAllText:o=!1,maskTextClass:a="rr-mask",unmaskTextClass:l=null,maskTextSelector:u=null,unmaskTextSelector:c=null,inlineStylesheet:d=!0,inlineImages:h=!1,recordCanvas:p=!1,maskAllInputs:m=!1,maskAttributeFn:f,maskTextFn:y,maskInputFn:g,slimDOM:S=!1,dataURLOptions:_,preserveWhiteSpace:b,onSerialize:v,onIframeLoad:w,iframeLoadTimeout:k,onBlockedImageLoad:E,onStylesheetLoad:M,stylesheetLoadTimeout:C,keepIframeSrcFn:I=()=>!1,ignoreCSSAttributes:T=new Set([])}=t||{};return eC(e,{doc:e,mirror:r,blockClass:n,blockSelector:i,unblockSelector:s,maskAllText:o,maskTextClass:a,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:c,skipChild:!1,inlineStylesheet:d,maskInputOptions:!0===m?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===m?{}:m,maskAttributeFn:f,maskTextFn:y,maskInputFn:g,slimDOMOptions:!0===S||"all"===S?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===S,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===S?{}:S,dataURLOptions:_,inlineImages:h,recordCanvas:p,preserveWhiteSpace:b,onSerialize:v,onIframeLoad:w,iframeLoadTimeout:k,onBlockedImageLoad:E,onStylesheetLoad:M,stylesheetLoadTimeout:C,keepIframeSrcFn:I,newlyAddedElement:!1,ignoreCSSAttributes:T})}(document,{mirror:tm,blockClass:l,blockSelector:u,unblockSelector:c,maskAllText:p,maskTextClass:m,unmaskTextClass:f,maskTextSelector:y,unmaskTextSelector:g,inlineStylesheet:S,maskAllInputs:q,maskAttributeFn:w,maskInputFn:k,maskTextFn:E,slimDOM:V,dataURLOptions:T,recordCanvas:D,inlineImages:P,onSerialize:e=>{ez(e,tm)&&ee.addIframe(e),eW(e,tm)&&Q.trackLinkElement(e),e$(e)&&en.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{ee.attachIframe(e,t),e.contentWindow&&er.addWindow(e.contentWindow),en.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Q.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:r,height:n})=>{Y({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${r}px`,height:`${n}px`}}}]})},keepIframeSrcFn:U,ignoreCSSAttributes:B});if(!t)return console.warn("Failed to snapshot the document");o({type:eJ.FullSnapshot,data:{node:t,initialOffset:eA(window)}}),e6.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Q.adoptStyleSheets(document.adoptedStyleSheets,tm.getId(document))};a=ei;try{let e=[],t=e=>e4(tr)({onMutation:W,mutationCb:Y,mousemoveCb:(e,t)=>o({type:eJ.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>o({type:eJ.IncrementalSnapshot,data:{source:eG.MouseInteraction,...e}}),scrollCb:X,viewportResizeCb:e=>o({type:eJ.IncrementalSnapshot,data:{source:eG.ViewportResize,...e}}),inputCb:e=>o({type:eJ.IncrementalSnapshot,data:{source:eG.Input,...e}}),mediaInteractionCb:e=>o({type:eJ.IncrementalSnapshot,data:{source:eG.MediaInteraction,...e}}),styleSheetRuleCb:e=>o({type:eJ.IncrementalSnapshot,data:{source:eG.StyleSheetRule,...e}}),styleDeclarationCb:e=>o({type:eJ.IncrementalSnapshot,data:{source:eG.StyleDeclaration,...e}}),canvasMutationCb:Z,fontCb:e=>o({type:eJ.IncrementalSnapshot,data:{source:eG.Font,...e}}),selectionCb:e=>{o({type:eJ.IncrementalSnapshot,data:{source:eG.Selection,...e}})},customElementCb:e=>{o({type:eJ.IncrementalSnapshot,data:{source:eG.CustomElement,...e}})},blockClass:l,ignoreClass:d,ignoreSelector:h,maskAllText:p,maskTextClass:m,unmaskTextClass:f,maskTextSelector:y,unmaskTextSelector:g,maskInputOptions:q,inlineStylesheet:S,sampling:I,recordDOM:R,recordCanvas:D,inlineImages:P,userTriggeredOnInput:O,collectFonts:L,doc:e,maskAttributeFn:w,maskInputFn:k,maskTextFn:E,keepIframeSrcFn:U,blockSelector:u,unblockSelector:c,slimDOMOptions:V,dataURLOptions:T,mirror:tm,iframeManager:ee,stylesheetManager:Q,shadowDomManager:en,processedNodeManager:et,canvasManager:er,ignoreCSSAttributes:B,plugins:F?.filter(e=>e.observer)?.map(e=>({observer:e.observer,options:e.options,callback:t=>o({type:eJ.Plugin,data:{plugin:e.name,payload:t}}
1)}))||[]},{});ee.addLoadListener(r=>{try{e.push(t(r.contentDocument))}catch(e){console.warn(e)}});let r=()=>{ei(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?r():(e.push(eI("DOMContentLoaded",()=>{o({type:eJ.DomContentLoaded,data:{}}),"DOMContentLoaded"===A&&r()})),e.push(eI("load",()=>{o({type:eJ.Load,data:{}}),"load"===A&&r()},window))),()=>{e.forEach(e=>e()),et.destroy(),a=void 0,s=void 0}}catch(e){console.warn(e)}}function ty(e){return e>0x2540be3ff?e:1e3*e}function tg(e){return e>0x2540be3ff?e/1e3:e}function tS(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:eJ.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:(0,d.S8)(t,10,1e3)}}),"console"===t.category)))}function t_(e){return e.closest("button,a")||e}function tb(e){let t=tv(e);return t&&t instanceof Element?t_(t):t}function tv(e){var t;return"object"==typeof(t=e)&&t&&"target"in t?e.target:e}tf.mirror=tm,tf.takeFullSnapshot=function(e){if(!a)throw Error("please take full snapshot after start recording");a(e)},!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(u||(u={}));let tw=new Set([eG.Mutation,eG.StyleSheetRule,eG.StyleDeclaration,eG.AdoptedStyleSheet,eG.CanvasMutation,eG.Selection,eG.MediaInteraction]);class tk{constructor(e,t,r=tS){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){var e;let t=(e=()=>{this._lastMutation=tM()},l||(l=[],(0,h.GS)(F,"open",function(e){return function(...t){if(l)try{l.forEach(e=>e())}catch{}return e.apply(F,t)}})),l.push(e),()=>{let t=l?l.indexOf(e):-1;t>-1&&l.splice(t,1)});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){var r,n,i;if(r=t,n=this._ignoreSelector,!tE.includes(r.tagName)||"INPUT"===r.tagName&&!["submit","button"].includes(r.getAttribute("type")||"")||"A"===r.tagName&&(r.hasAttribute("download")||r.hasAttribute("target")&&"_self"!==r.getAttribute("target"))||n&&r.matches(n)||!((i=e).data&&"number"==typeof i.data.nodeId&&i.timestamp))return;let s={timestamp:tg(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some(e=>e.node===s.node&&1>Math.abs(e.timestamp-s.timestamp))||(this._clicks.push(s),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=tg(e)}registerScroll(e=Date.now()){this._lastScroll=tg(e)}registerClick(e){let t=t_(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach(e=>{e.clickCount++})}_getClicks(e){return this._clicks.filter(t=>t.node===e)}_checkClicks(){let e=[],t=tM();for(let r of(this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=t&&e.push(r)}),e)){let e=this._clicks.indexOf(r);e>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){let t=this._replay,r=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,n=e.mutationAfter&&e.mutationAfter<=this._threshold,{clickCount:i,clickBreadcrumb:s}=e;if(!r&&!n){let r=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),n=r<1e3*this._timeout?"mutation":"timeout",o={type:"default",message:s.message,timestamp:s.timestamp,category:"ui.slowClickDetected",data:{...s.data,url:F.location.href,route:t.getCurrentRoute(),timeAfterClickMs:r,endReason:n,clickCount:i||1}};this._addBreadcrumbEvent(t,o);return}if(i>1){let e={type:"default",message:s.message,timestamp:s.timestamp,category:"ui.multiClick",data:{...s.data,url:F.location.href,route:t.getCurrentRoute(),clickCount:i,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=(0,D.wg)(()=>this._checkClicks(),1e3)}}let tE=["A","BUTTON","INPUT"];function tM(){return Date.now()/1e3}function tC(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var tI=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(tI||{});let tT=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function tx(e,t){let r=tf.mirror.getId(e),n=r&&tf.mirror.getNode(r),i=n&&tf.mirror.getMeta(n),s=i&&i.type===tI.Element?i:null;return{message:t,data:s?{nodeId:r,node:{id:r,tagName:s.tagName,textContent:Array.from(s.childNodes).map(e=>
1e.type===tI.Text&&e.textContent).filter(Boolean).map(e=>e.trim()).join(""),attributes:function(e){let t={};for(let r in!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]),e)if(tT.has(r)){let n=r;("data-testid"===r||"data-test-id"===r)&&(n="testId"),t[n]=e[r]}return t}(s.attributes)}}:{}}}let tR={resource:function(e){let{entryType:t,initiatorType:r,name:n,responseEnd:i,startTime:s,decodedBodySize:o,encodedBodySize:a,responseStatus:l,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(r)?null:{type:`${t}.${r}`,start:tA(s),end:tA(i),name:n,data:{size:u,statusCode:l,decodedBodySize:o,encodedBodySize:a}}},paint:function(e){let{duration:t,entryType:r,name:n,startTime:i}=e,s=tA(i);return{type:r,name:n,start:s,end:s+t,data:void 0}},navigation:function(e){let{entryType:t,name:r,decodedBodySize:n,duration:i,domComplete:s,encodedBodySize:o,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,domInteractive:u,loadEventStart:c,loadEventEnd:d,redirectCount:h,startTime:p,transferSize:m,type:f}=e;return 0===i?null:{type:`${t}.${f}`,start:tA(p),end:tA(s),name:r,data:{size:m,decodedBodySize:n,encodedBodySize:o,duration:i,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,loadEventStart:c,loadEventEnd:d,domComplete:s,redirectCount:h}}}};function tD(e,t){return({metric:r})=>void t.replayPerformanceEntries.push(e(r))}function tN(e){let t=tR[e.entryType];return t?t(e):null}function tA(e){return(((0,m.k3)()||F.performance.timeOrigin)+e)/1e3}function tO(e){let t=e.entries[e.entries.length-1];return tF(e,"largest-contentful-paint",t?.element?[t.element]:void 0)}function tL(e){let t=[],r=[];for(let n of e.entries)if(void 0!==n.sources){let e=[];for(let t of n.sources)if(t.node){r.push(t.node);let n=tf.mirror.getId(t.node);n&&e.push(n)}t.push({value:n.value,nodeIds:e.length?e:void 0})}return tF(e,"cumulative-layout-shift",r,t)}function tP(e){let t=e.entries[e.entries.length-1];return tF(e,"interaction-to-next-paint",t?.target?[t.target]:void 0)}function tF(e,t,r,n){let i=e.value,s=e.rating,o=tA(i);return{type:"web-vital",name:t,start:o,end:o,data:{value:i,size:i,rating:s,nodeIds:r?r.map(e=>tf.mirror.getId(e)):void 0,attributions:n}}}let tU=["log","warn","error"],tB=function(){let e={exception:()=>void 0,infoTick:()=>void 0,setConfig:e=>{e.captureExceptions,e.traceInternals}};return tU.forEach(t=>{e[t]=()=>void 0}),e}();class tz extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class tW{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){let t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>2e7)throw new tz;this.events.push(e)}finish(){return new Promise(e=>{let t=this.events;this.clear(),e(JSON.stringify(t))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let e=this.events.map(e=>e.timestamp).sort()[0];return e?ty(e):null}}class t${constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise((e,t)=>{this._worker.addEventListener("message",({data:r})=>{r.success?e():t(Error("Received worker message with unsuccessful status"))},{once:!0}),this._worker.addEventListener("error",e=>{t(Error(`Failed to load Replay compression worker: ${e instanceof ErrorEvent&&e.message?e.message:"Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load."}`))},{once:!0})})),this._ensureReadyPromise}destroy(){this._worker.terminate()}postMessage(e,t){let r=this._getAndIncrementId();return new Promise((n,i)=>{let s=({data:t})=>{if(t.method===e&&t.id===r){if(this._worker.removeEventListener("message",s),!t.success)return void i(Error("Error in compression worker"));n(t.response)}};this._worker.addEventListener("message",s),this._worker.postMessage({id:r,method:e,arg:t})})}_getAndIncrementId(){return this._id++}}class tH{constructor(e){this._worker=new t$(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}
1addEvent(e){let t=ty(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);let r=JSON.stringify(e);return(this._totalSize+=r.length,this._totalSize>2e7)?Promise.reject(new tz):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){let e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class tj{constructor(e){this._fallback=new tW,this._compression=new tH(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:e,hasCheckout:t,waitForCheckout:r}=this._fallback,n=[];for(let t of e)n.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(n),this._fallback.clear()}catch(e){}}}function tq(){try{return"sessionStorage"in F&&!!F.sessionStorage}catch{return!1}}function tV(e){return void 0!==e&&Math.random()<e}function tK(e){if(tq())try{F.sessionStorage.setItem(U,JSON.stringify(e))}catch{}}function tJ(e){let t=Date.now(),r=e.id||(0,S.eJ)(),n=e.started||t,i=e.lastActivity||t,s=e.segmentId||0,o=e.sampled;return{id:r,started:n,lastActivity:i,segmentId:s,sampled:o,previousSessionId:e.previousSessionId,dirty:e.dirty||!1}}function tG({sessionSampleRate:e,allowBuffering:t,stickySession:r=!1},{previousSessionId:n}={}){let i=tJ({sampled:tV(e)?"session":!!t&&"buffer",previousSessionId:n});return r&&tK(i),i}function tY(e,t,r=+new Date){return null===e||void 0===t||t<0||0!==t&&e+t<=r}function tX(e,{maxReplayDuration:t,sessionIdleExpire:r,targetTime:n=Date.now()}){return tY(e.started,t,n)||tY(e.lastActivity,r,n)}function tZ(e,{sessionIdleExpire:t,maxReplayDuration:r}){return!!tX(e,{sessionIdleExpire:t,maxReplayDuration:r})&&("buffer"!==e.sampled||0!==e.segmentId)}function tQ({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:r},n){let i=n.stickySession&&function(){if(!tq())return null;try{let e=F.sessionStorage.getItem(U);if(!e)return null;let t=JSON.parse(e);return tJ(t)}catch{return null}}();return i?tZ(i,{sessionIdleExpire:e,maxReplayDuration:t})?tG(n,{previousSessionId:i.id}):i:tG(n,{previousSessionId:r})}function t0(e,t,r){return!!t3(e,t)&&(t1(e,t,r),!0)}async function t1(e,t,r){let{eventBuffer:n}=e;if(!n||n.waitForCheckout&&!r)return null;let i="buffer"===e.recordingMode;try{r&&i&&n.clear(),r&&(n.hasCheckout=!0,n.waitForCheckout=!1);let s=e.getOptions(),o=function(e,t){try{if("function"==typeof t&&e.type===eJ.Custom)return t(e)}catch(e){return null}return e}(t,s.beforeAddRecordingEvent);if(!o)return;return await n.addEvent(o)}catch(s){let t=s&&s instanceof tz,r=(0,_.KU)();if(r&&r.recordDroppedEvent(t?"buffer_overflow":"internal_sdk_error","replay"),t&&i)return n.clear(),n.waitForCheckout=!0,null;e.handleException(s),await e.stop({reason:t?"addEventSizeExceeded":"addEvent"})}}function t3(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let r=ty(t.timestamp);return!(r+e.timeouts.sessionIdlePause<Date.now())&&!(r>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)}function t2(e){return"transaction"===e.type}function t5(e){return"feedback"===e.type}function t4(e){return!!e.category}function t6(){let e=(0,_.o5)().getPropagationContext().dsc;e&&delete e.replay_id;let t=(0,b.Bk)();if(t){let e=(0,v.k1)(t);delete e.replay_id}}function t8(e,t){return t.map(({type:t,start:r,end:n,name:i,data:s})=>{let o=e.throttledAddEvent({type:eJ.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:t,description:i,startTimestamp:r,endTimestamp:n,data:s}}});return"string"==typeof o?Promise.resolve(null):o})}function t9(e,t){var r;
1e.isEnabled()&&null!==t&&(r=t.name,(0,w.A)(r,(0,_.KU)())||e.addUpdate(()=>(t8(e,[t]),!0)))}function t7(e){if(!e)return;let t=new TextEncoder;try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){let r=(0,A.P4)(e);return t.encode(r).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function re(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function rt(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};let r={...e._meta},n=r.warnings||[];return r.warnings=[...n,t],e._meta=r,e}function rr(e,t){if(!t)return null;let{startTimestamp:r,endTimestamp:n,url:i,method:s,statusCode:o,request:a,response:l}=t;return{type:e,start:r/1e3,end:n/1e3,name:i,data:{method:s,statusCode:o,request:a,response:l}}}function rn(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function ri(e,t,r){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!r)return{headers:e,size:t};let n={headers:e,size:t},{body:i,warnings:s}=function(e){if(!e||"string"!=typeof e)return{body:e};let t=e.length>15e4,r=function(e){let t=e[0],r=e[e.length-1];return"["===t&&"]"===r||"{"===t&&"}"===r}(e);if(t){let t=e.slice(0,15e4);return r?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}â¦`,warnings:["TEXT_TRUNCATED"]}}if(r)try{return{body:JSON.parse(e)}}catch{}return{body:e}}(r);return n.body=i,s?.length&&(n._meta={warnings:s}),n}function rs(e,t){return Object.entries(e).reduce((r,[n,i])=>{let s=n.toLowerCase();return t.includes(s)&&e[n]&&(r[s]=i),r},{})}function ro(e,t){let r=function(e,t=F.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(F.location.origin))return e;let r=new URL(e,t);if(r.origin!==new URL(t).origin)return e;let n=r.href;return!e.endsWith("/")&&n.endsWith("/")?n.slice(0,-1):n}(e);return(0,k.Xr)(r,t)}async function ra(e,t,r){try{let n=await rl(e,t,r),i=rr("resource.fetch",n);t9(r.replay,i)}catch(e){}}async function rl(e,t,r){let n=Date.now(),{startTimestamp:i=n,endTimestamp:s=n}=t,{url:o,method:a,status_code:l=0,request_body_size:u,response_body_size:c}=e.data,d=ro(o,r.networkDetailAllowUrls)&&!ro(o,r.networkDetailDenyUrls);return{startTimestamp:i,endTimestamp:s,url:o,method:a,statusCode:l,request:d?function({networkCaptureBodies:e,networkRequestHeaders:t},r,n){var i,s;let o=r?(i=r,s=t,1===i.length&&"string"!=typeof i[0]?rh(i[0],s):2===i.length?rh(i[1],s):{}):{};if(!e)return ri(o,n,void 0);let a=(0,A.Gv)(r),[l,u]=(0,A.sY)(a,tB),c=ri(o,n,l);return u?rt(c,u):c}(r,t.input,u):rn(u),response:await ru(d,r,t.response,c)}}async function ru(e,{networkCaptureBodies:t,networkResponseHeaders:r},n,i){if(!e&&void 0!==i)return rn(i);let s=n?rd(n.headers,r):{};if(!n||!t&&void 0!==i)return ri(s,i,void 0);let[o,a]=await rc(n),l=function(e,{networkCaptureBodies:t,responseBodySize:r,captureDetails:n,headers:i}){try{let s=e?.length&&void 0===r?t7(e):r;if(!n)return rn(s);if(t)return ri(i,s,e);return ri(i,s,void 0)}catch(e){return ri(i,r,void 0)}}(o,{networkCaptureBodies:t,responseBodySize:i,captureDetails:e,headers:s});return a?rt(l,a):l}async function rc(e){let t=function(e){try{return e.clone()}catch(e){}}(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{var r;return[await (r=t,new Promise((e,t)=>{let n=(0,D.wg)(()=>t(Error("Timeout while trying to read response body")),500);rp(r).then(t=>e(t),e=>
1t(e)).finally(()=>clearTimeout(n))}))]}catch(e){if(e instanceof Error&&e.message.indexOf("Timeout")>-1)return[void 0,"BODY_PARSE_TIMEOUT"];return[void 0,"BODY_PARSE_ERROR"]}}function rd(e,t){let r={};return t.forEach(t=>{e.get(t)&&(r[t]=e.get(t))}),r}function rh(e,t){if(!e)return{};let r=e.headers;return r?r instanceof Headers?rd(r,t):Array.isArray(r)?{}:rs(r,t):{}}async function rp(e){return await e.text()}async function rm(e,t,r){try{let n=function(e,t,r){let n=Date.now(),{startTimestamp:i=n,endTimestamp:s=n,input:o,xhr:a}=t,{url:l,method:u,status_code:c=0,request_body_size:d,response_body_size:h}=e.data;if(!l)return null;if(!a||!ro(l,r.networkDetailAllowUrls)||ro(l,r.networkDetailDenyUrls)){let e=rn(d);return{startTimestamp:i,endTimestamp:s,url:l,method:u,statusCode:c,request:e,response:rn(h)}}let p=a[O.Er],m=p?rs(p.request_headers,r.networkRequestHeaders):{},f=rs((0,A.ti)(a),r.networkResponseHeaders),[y,g]=r.networkCaptureBodies?(0,A.sY)(o,tB):[void 0],[S,_]=r.networkCaptureBodies?function(e){let t=[];try{return[e.responseText]}catch(e){t.push(e)}try{var r=e.response,n=e.responseType;try{if("string"==typeof r)return[r];if(r instanceof Document)return[r.body.outerHTML];if("json"===n&&r&&"object"==typeof r)return[JSON.stringify(r)];if(!r)return[void 0]}catch(e){return[void 0,"BODY_PARSE_ERROR"]}return[void 0,"UNPARSEABLE_BODY_TYPE"]}catch(e){t.push(e)}return[void 0]}(a):[void 0],b=ri(m,d,y),v=ri(f,h,S);return{startTimestamp:i,endTimestamp:s,url:l,method:u,statusCode:c,request:g?rt(b,g):b,response:_?rt(v,_):v}}(e,t,r),i=rr("resource.xhr",n);t9(r.replay,i)}catch(e){}}async function rf(e){try{return Promise.all(t8(e,[function(e){let{jsHeapSizeLimit:t,totalJSHeapSize:r,usedJSHeapSize:n}=e,i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:r,usedJSHeapSize:n}}}}(F.performance.memory)]))}catch{return[]}}let ry=c.O.navigator;async function rg({client:e,scope:t,replayId:r,event:n}){let i={event_id:r,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit("preprocessEvent",n,i);let s=await (0,C.mG)(e.getOptions(),n,i,t,e,(0,_.rm)());if(!s)return null;e.emit("postprocessEvent",s,i),s.platform=s.platform||"javascript";let o=e.getSdkMetadata(),{name:a,version:l,settings:u}=o?.sdk||{};return s.sdk={...s.sdk,name:a||"sentry.javascript.unknown",version:l||"0.0.0",settings:u},s}async function rS({recordingData:e,replayId:t,segmentId:r,eventContext:n,timestamp:i,session:s}){var o;let a,l=function({recordingData:e,headers:t}){let r,n=`${JSON.stringify(t)} 2`;if("string"==typeof e)r=`${n}${e}`;else{let t=new TextEncoder().encode(n);(r=new Uint8Array(t.length+e.length)).set(t),r.set(e,t.length)}return r}({recordingData:e,headers:{segment_id:r}}),{urls:u,errorIds:c,traceIds:d,initialTimestamp:h}=n,p=(0,_.KU)(),m=(0,_.o5)(),f=p?.getTransport(),y=p?.getDsn();if(!p||!f||!y||!s.sampled)return Promise.resolve({});let g={type:"replay_event",replay_start_timestamp:h/1e3,timestamp:i/1e3,error_ids:c,trace_ids:d,urls:u,replay_id:t,segment_id:r,replay_type:s.sampled},S=await rg({scope:m,client:p,replayId:t,event:g});if(!S)return p.recordDroppedEvent("event_processor","replay"),Promise.resolve({});delete S.sdkProcessingMetadata;let b=(o=p.getOptions().tunnel,(0,M.h4)((0,M.n2)(S,(0,M.Cj)(S),o,y),[[{type:"replay_event"},S],[{type:"replay_recording",length:"string"==typeof l?new TextEncoder().encode(l).length:l.length},l]]));try{a=await f.send(b)}catch(t){let e=Error(B);try{e.cause=t}catch{}throw e}let v=(0,I.wq)({},a);if((0,I.Jz)(v,"replay"))throw new rb(v);if("number"==typeof a.statusCode&&(a.statusCode<200||a.statusCode>=300))throw new r_(a.statusCode);return a}class r_ extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class rb extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}class rv extends Error{constructor(){super("Session is too long, not sending replay")}}async function rw(e,t={count:0,interval:5e3}){let{recordingData:r,onError:n}=e;
2if(r.length)try{return await rS(e),!0}catch(r){if(r instanceof r_||r instanceof rb)throw r;if((0,g.o)("Replays",{_retryCount:t.count}),n&&n(r),t.count>=3){let e=Error(`${B} - max retries exceeded`);try{e.cause=r}catch{}throw e}return t.interval*=++t.count,new Promise((r,n)=>{(0,D.wg)(async()=>{try{await rw(e,t),r(!0)}catch(e){n(e)}},t.interval)})}}let rk="__THROTTLED";class rE{constructor({options:e,recordingOptions:t}){var r,n,i;this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=(r=()=>this._flush(),n=this._options.flushMinDelay,i={maxWait:this._options.flushMaxDelay},(0,E.s)(r,n,{...i,setTimeoutImpl:D.wg})),this._throttledAddEvent=function(e,t,r){let n=new Map,i=!1;return(...t)=>{let r=Math.floor(Date.now()/1e3),s=r-5;if(n.forEach((e,t)=>{t<s&&n.delete(t)}),[...n.values()].reduce((e,t)=>e+t,0)>=300){let e=i;return i=!0,e?"__SKIPPED":rk}i=!1;let o=n.get(r)||0;return n.set(r,o+1),e(...t)}}((e,t)=>(function(e,t,r){return t3(e,t)?t1(e,t,r):Promise.resolve(null)})(this,e,t),0,0);let{slowClickTimeout:s,slowClickIgnoreSelectors:o}=this.getOptions(),a=s?{threshold:Math.min(3e3,s),timeout:s,scrollTimeout:300,ignoreSelector:o?o.join(","):""}:void 0;a&&(this.clickDetector=new tk(this,a)),this._handleVisibilityChange=()=>{"visible"===F.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{let e=tC({category:"ui.blur"});this._doChangeToBackgroundTasks(e)},this._handleWindowFocus=()=>{let e=tC({category:"ui.focus"});this._doChangeToForegroundTasks(e)},this._handleKeyboardEvent=e=>{!function(e,t){if(!e.isEnabled())return;e.updateUserActivity();let r=function(e){var t;let{metaKey:r,shiftKey:n,ctrlKey:i,altKey:s,key:o,target:a}=e;if(!a||"INPUT"===(t=a).tagName||"TEXTAREA"===t.tagName||t.isContentEditable||!o)return null;let l=r||i||s,u=1===o.length;if(!l&&u)return null;let c=(0,p.Hd)(a,{maxStringLength:200})||"<unknown>",d=tx(a,c);return tC({category:"ui.keyDown",message:c,data:{...d.data,metaKey:r,shiftKey:n,ctrlKey:i,altKey:s,key:o}})}(t);r&&tS(e,r)}(this,e)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(e){this._options.onError&&this._options.onError(e)}initializeSampling(e){let{errorSampleRate:t,sessionSampleRate:r}=this._options,n=t<=0&&r<=0;if(this._requiresManualStart=n,!n)this._initializeSessionForSampling(e),this.session&&!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",this._initializeRecording())}start(){if(this._isEnabled&&"session"===this.recordingMode||this._isEnabled&&"buffer"===this.recordingMode)return;this._updateUserActivity();let e=tQ({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled)return;let e=tQ({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{var e;let t,r=this._canvas;this._stopRecording=tf({...this._recordingOptions,..."buffer"===this.recordingMode?{checkoutEveryNms:6e4}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:(e=this,t=!1,(r,n)=>{if(!e.checkAndHandleExpiredSession())return;let i=n||!t;t=!0,e.clickDetector&&function(e,t){try{var r;if(r=t,3!==r.type)return;let{source:n}=t.data;if(tw.has(n)&&e.registerMutation(t.timestamp),n===eG.Scroll&&e.registerScroll(t.timestamp),t.data.source===eG.MouseInteraction){let{type:r,id:n}=t.data,i=tf.mirror.getNode(n);i instanceof HTMLElement&&r===eY.Click&&e.registerClick(i)}}catch{}}(e.clickDetector,r),e.addUpdate(()=>{var t;
2if("buffer"===e.recordingMode&&i&&e.setInitialState(),!t0(e,r,i))return!0;if(!i)return!1;let n=e.session;if(t=e,i&&t.session?.segmentId===0&&t0(t,function(e){let t=e.getOptions();return{type:eJ.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:!!e.eventBuffer&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}(t),!1),"buffer"===e.recordingMode&&n&&e.eventBuffer&&!n.dirty){let t=e.eventBuffer.getEarliestTimestamp();t&&(n.started=t,e.getOptions().stickySession&&tK(n))}return!!n?.previousSessionId||("session"===e.recordingMode&&e.flush(),!0)})}),.../iPhone|iPad|iPod/i.test(ry?.userAgent??"")||/Macintosh/i.test(ry?.userAgent??"")&&ry?.maxTouchPoints&&ry?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{},onMutation:this._onMutationHandler.bind(this),...r?{recordCanvas:r.recordCanvas,getCanvasManager:r.getCanvasManager,sampling:r.sampling,dataURLOptions:r.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(this._isEnabled){this._isEnabled=!1,this.recordingMode="buffer";try{t6(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,function(){if(tq())try{F.sessionStorage.removeItem(U)}catch{}}(),this.session=void 0}catch(e){this.handleException(e)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording())}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording())}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();let t=Date.now();await this.flushImmediate();let r=this.stopRecording();e&&r&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){let t=e();"buffer"!==this.recordingMode&&this._isEnabled&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(e){if(!e||this.session?.sampled!==!1)return this.session?.id}checkAndHandleExpiredSession(){return this._lastActivity&&tY(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session?.sampled==="session"?void this.pause():!!this._checkSession()}setInitialState(){let e=`${F.location.pathname}${F.location.hash}${F.location.search}`,t=`${F.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){let r=this._throttledAddEvent(e,t);if(r===rk){let e=tC({category:"replay.throttled"});this.addUpdate(()=>!t0(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}}))}return r}getCurrentRoute(){let e=this.lastActiveSpan||(0,b.Bk)(),t=e&&(0,b.zU)(e),r=(t&&(0,b.et)(t).data||{})[T.i_];if(t&&r&&["route","custom"].includes(r))return(0,b.et)(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=function({useCompression:e,workerUrl:t}){if(e&&window.Worker){let e=function(e){try{let t=e||"";if(!t)return;let r=new Worker(t);return new tj(r)}catch(e){}}(t);if(e)return e}return new tW}({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(e){let t=this._options.errorSampleRate>0,r=tQ({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=r}_checkSession(){if(!this.session)return!1;let e=this.session;return!tZ(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{F.document.addEventListener("visibilitychange",this._handleVisibilityChange),F.addEventListener("blur",this._handleWindowBlur),F.addEventListener("focus",this._handleWindowFocus),F.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(!function(e){let t=(0,_.KU)();(0,L.i)(t=>{var r,n;if(!e.isEnabled())return;let i=function(e){let{target:t,message:r}=function(e){let t,r="click"===e.name,n=null;try{n=r?tb(e.event):tv(e.event),t=(0,p.Hd)(n,{maxStringLength:200})||"<unknown>"}catch{t="<unknown>"}return{target:n,message:t}}(e);return tC({category:`ui.${e.name}`,...tx(t,r)})}(t);if(!i)return;let s="click"===t.name,o=s?t.event:void 0;
2s&&e.clickDetector&&o?.target&&!o.altKey&&!o.metaKey&&!o.ctrlKey&&!o.shiftKey&&(r=e.clickDetector,n=tb(t.event),r.handleClick(i,n)),tS(e,i)}),(0,P._)(t=>{if(!e.isEnabled())return;let r=function(e){let{from:t,to:r}=e,n=Date.now()/1e3;return{type:"navigation.push",start:n,end:n,name:r,data:{previous:t}}}(t);null!==r&&(e.getContext().urls.push(r.name),e.triggerUserActivity(),e.addUpdate(()=>(t8(e,[r]),!1)))});let r=(0,_.KU)();r&&r.on("beforeAddBreadcrumb",t=>(function(e,t){var r;if(!e.isEnabled()||!t4(t))return;let n=(r=t,!t4(r)||["fetch","xhr","sentry.event","sentry.transaction"].includes(r.category)||r.category.startsWith("ui.")?null:"console"===r.category?function(e){let t=e.data?.arguments;if(!Array.isArray(t)||0===t.length)return tC(e);let r=!1,n=t.map(e=>{if(!e)return e;if("string"==typeof e)return e.length>5e3?(r=!0,`${e.slice(0,5e3)}â¦`):e;if("object"==typeof e)try{let t=(0,d.S8)(e,7);if(JSON.stringify(t).length>5e3)return r=!0,`${JSON.stringify(t,null,2).slice(0,5e3)}â¦`;return t}catch{}return e});return tC({...e,data:{...e.data,arguments:n,...r?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(r):tC(r));n&&tS(e,n)})(e,t));let n=(0,_.KU)();try{let{networkDetailAllowUrls:t,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:o}=e.getOptions(),a={replay:e,networkDetailAllowUrls:t,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:o};n&&n.on("beforeAddBreadcrumb",(e,t)=>(function(e,t,r){if(t.data)try{var n,i,s,o;if(n=t,"xhr"===n.category&&(i=r,i?.xhr)&&(!function(e,t){let{xhr:r,input:n}=t;if(!r)return;let i=t7(n),s=r.getResponseHeader("content-length")?re(r.getResponseHeader("content-length")):function(e,t){try{let r="json"===t&&e&&"object"==typeof e?JSON.stringify(e):e;return t7(r)}catch{return}}(r.response,r.responseType);void 0!==i&&(e.data.request_body_size=i),void 0!==s&&(e.data.response_body_size=s)}(t,r),rm(t,r,e)),s=t,"fetch"===s.category&&(o=r,o?.response)){let{input:n,response:i}=r,s=t7(n?(0,A.Gv)(n):void 0),o=i?re(i.headers.get("content-length")):void 0;void 0!==s&&(t.data.request_body_size=s),void 0!==o&&(t.data.response_body_size=o),ra(t,r,e)}}catch(e){}})(a,e,t))}catch{}let i=Object.assign((t,r)=>{if(!e.isEnabled()||e.isPaused())return t;if("replay_event"===t.type)return delete t.breadcrumbs,t;if(t.type&&!t2(t)&&!t5(t))return t;if(!e.checkAndHandleExpiredSession())return t6(),t;if(t5(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),e.triggerUserActivity(),e.addUpdate(()=>!t.timestamp||(e.throttledAddEvent({type:eJ.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1)),t;if(!t.type&&t.exception?.values?.length&&r.originalException?.__rrweb__&&!e.getOptions()._experiments.captureExceptions)return null;let n="buffer"===e.recordingMode&&t.message!==B&&!!t.exception&&!t.type&&tV(e.getOptions().errorSampleRate);if((n||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),n&&"buffer"===e.recordingMode&&e.session?.sampled==="buffer"){let t=e.session;t.dirty=!0,e.getOptions().stickySession&&tK(t)}return t},{id:"Replay"});(0,g.SA)(i),t&&(t.on("beforeSendEvent",t=>{e.isEnabled()&&!t.type&&function(e,t){let r=t.exception?.values?.[0]?.value;"string"==typeof r&&(r.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||r.match(/(does not match server-rendered HTML|Hydration failed because)/i))&&tS(e,tC({category:"replay.hydrate-error",data:{url:(0,p.$N)()}}))}(e,t)}),t.on("afterSendEvent",(t,r)=>{if(!e.isEnabled()||t.type&&!t2(t))return;let n=r.statusCode;if(n&&!(n<200)&&!(n>=300)){if(t2(t))return void function(e,t){let r=e.getContext();t.contexts?.trace?.trace_id&&r.traceIds.size<100&&r.traceIds.add(t.contexts.trace.trace_id)}(e,t);!function(e,t){let r=e.getContext();if(t.event_id&&r.errorIds.size<100&&r.errorIds.add(t.event_id),"buffer"!==e.recordingMode||!t.tags?.replayId)return;let{beforeErrorSampling:n}=e.getOptions();("function"!=typeof n||n(t))&&(0,D.wg)(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}})}(e,t)}}),t.on("createDsc",t=>{let r=e.getSessionId();r&&e.isEnabled()&&"session"===e.recordingMode&&e.checkAndHandleExpiredSession()&&(t.replay_id=r)}),t.on("spanStart",t=>{e.lastActiveSpan=t}),t.on("spanEnd",t=>{e.lastActiveSpan=t}),t.on("beforeSendFeedback",async(t,r)=>{let n=e.getSessionId();r?.includeReplay&&e.isEnabled()&&n&&t.contexts?.feedback&&("api"===t.contexts.feedback.source&&await e.sendBufferedReplayOrFlush(),t.contexts.feedback.replay_id=n)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=function(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function r({entries:e}){e.forEach(t)}let n=[];
2return["navigation","paint","resource"].forEach(e=>{n.push((0,N.wv)(e,r))}),n.push((0,N.Pt)(tD(tO,e)),(0,N.a9)(tD(tL,e)),(0,N.hT)(tD(tP,e))),()=>{n.forEach(e=>e())}}(this)}_removeListeners(){try{F.document.removeEventListener("visibilitychange",this._handleVisibilityChange),F.removeEventListener("blur",this._handleWindowBlur),F.removeEventListener("focus",this._handleWindowFocus),F.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}_doChangeToBackgroundTasks(e){this.session&&(tX(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush()))}_doChangeToForegroundTasks(e){if(this.session)this.checkAndHandleExpiredSession()&&e&&this._createCustomBreadcrumb(e)}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:eJ.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){let e=this.performanceEntries.map(tN).filter(Boolean).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){let t=this._context.initialTimestamp/1e3;e=e.filter(e=>e.start>=t)}return Promise.all(t8(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart||e.segmentId)return;let r=t.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}
2_popEventContext(){let e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){let e=this.getSessionId();if(this.session&&this.eventBuffer&&e&&(await this._addPerformanceEntries(),this.eventBuffer?.hasEvents)){if((await rf(this),this.eventBuffer)&&e===this.getSessionId())try{this._updateInitialTimestampFromEventBuffer();let t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new rv;let r=this._popEventContext(),n=this.session.segmentId++;this._maybeSaveSession();let i=await this.eventBuffer.finish();await rw({replayId:e,recordingData:i,segmentId:n,eventContext:r,session:this.session,timestamp:t,onError:e=>this.handleException(e)})}catch(t){this.handleException(t),this.stop({reason:"sendReplay"});let e=(0,_.KU)();e&&e.recordDroppedEvent(t instanceof rb?"ratelimit_backoff":t instanceof rv?"invalid":"send_error","replay")}}}async _flush({force:e=!1}={}){if(!this._isEnabled&&!e||!this.checkAndHandleExpiredSession()||!this.session)return;let t=this.session.started,r=Date.now()-t;this._debouncedFlush.cancel();let n=r<this._options.minReplayDuration,i=r>this._options.maxReplayDuration+5e3;if(n||i){n&&this._debouncedFlush();return}let s=this.eventBuffer;s&&0===this.session.segmentId&&s.hasCheckout;let o=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,o&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&tK(this.session)}_onMutationHandler(e){let{ignoreMutations:t}=this._options._experiments;if(t?.length&&e.some(e=>{let r=function(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}(e.target),n=t.join(",");return r?.matches(n)}))return!1;let r=e.length,n=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,s=n&&r>n;if(r>i||s){let e=tC({category:"replay.mutations",data:{count:r,limit:s}});this._createCustomBreadcrumb(e)}return!s||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}function rM(e,t){return[...e,...t].join(",")}let rC='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',rI=["content-length","content-type","accept"],rT=Symbol.for("sentry__originalRequestBody"),rx=!1,rR=!1,rD=e=>new rN(e);class rN{constructor({flushMinDelay:e=5e3,flushMaxDelay:t=5500,minReplayDuration:r=4999,maxReplayDuration:n=36e5,stickySession:i=!0,useCompression:s=!0,workerUrl:o,_experiments:a={},maskAllText:l=!0,maskAllInputs:u=!0,blockAllMedia:c=!0,mutationBreadcrumbLimit:d=750,mutationLimit:h=1e4,slowClickTimeout:p=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:f=[],networkDetailDenyUrls:y=[],networkCaptureBodies:g=!0,networkRequestHeaders:S=[],networkResponseHeaders:_=[],mask:b=[],maskAttributes:v=["title","placeholder","aria-label"],unmask:w=[],block:k=[],unblock:E=[],ignore:M=[],maskFn:C,beforeAddRecordingEvent:I,beforeErrorSampling:T,onError:R,attachRawBodyFromRequest:D=!1}={}){this.name="Replay";let N=function({mask:e,unmask:t,block:r,unblock:n,ignore:i}){return{maskTextSelector:rM(e,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:rM(t,[]),blockSelector:rM(r,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:rM(n,[]),ignoreSelector:rM(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}({mask:b,unmask:w,block:k,unblock:E,ignore:M});if(this._recordingOptions={maskAllInputs:u,maskAllText:l,maskInputOptions:{password:!0},maskTextFn:C,maskInputFn:C,maskAttributeFn:(e,t,r)=>(function({el:e,key:t,maskAttributes:r,maskAllText:n,privacyOptions:i,value:s}){return!n||i.unmaskTextSelector&&e.matches(i.unmaskTextSelector)?s:r.includes(t)||"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"")?s.replace(/[\S]/g,"*"):s})({maskAttributes:v,maskAllText:l,privacyOptions:N,key:e,value:t,el:r}),...N,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!a.recordCrossOriginIframes},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(r,5e4),maxReplayDuration:Math.min(n,36e5),stickySession:i,useCompression:s,workerUrl:o,blockAllMedia:c,maskAllInputs:u,maskAllText:l,mutationBreadcrumbLimit:d,mutationLimit:h,slowClickTimeout:p,slowClickIgnoreSelectors:m,networkDetailAllowUrls:f,networkDetailDenyUrls:y,networkCaptureBodies:g,networkRequestHeaders:rA(S),networkResponseHeaders:rA(_),beforeAddRecordingEvent:I,beforeErrorSampling:T,onError:R,attachRawBodyFromRequest:D,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${rC}`:rC,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&(0,x.B)())throw Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return rx}set _isInitialized(e){rx=e}afterAllSetup(e){(0,x.B)()&&!this._replay&&(this._initialOptions.attachRawBodyFromRequest&&function(){if("undefined"==typeof Request||rR)return;let e=Request;try{let t=function(t,r){let n=new e(t,r);return r?.body!=null&&(n[rT]=r.body),n};t.prototype=e.prototype,c.O.Request=t,rR=!0}catch{}}(),this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}
2startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(e){if(this._replay?.isEnabled())return this._replay.getSessionId(e)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){let t=function(e,t){let r=t.getOptions(),n={sessionSampleRate:0,errorSampleRate:0,...e},i=(0,R.i)(r.replaysSessionSampleRate),s=(0,R.i)(r.replaysOnErrorSampleRate);return null==i&&null==s&&(0,y.pq)(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),null!=i&&(n.sessionSampleRate=i),null!=s&&(n.errorSampleRate=s),n}(this._initialOptions,e);this._replay=new rE({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{let t=e.getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch{}}}function rA(e){return[...rI,...e.map(e=>e.toLowerCase())]}function rO(){let e=(0,_.KU)();return e?.getIntegrationByName("Replay")}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.