PageSourceSearch

https://srm.cleeng.com/assets/_sentry-internal_replay-64N0ZuiD.js

js cleeng.com collected 2026-10-01 11:25:52 UTC 124,481 bytes, 6 lines download raw bytes

1import{aN as Kt,aO as Vt,Y as wn,G as br,ab as Er,ai as vn,a7 as Yt,au as bn,o as pe,aP as En,ak as kr,ay as kn,aQ as In,aR as Cn,aS as Ir,F as ht,H as Cr,r as Xt,aT as Mn,aU as Rn,N as Tn,aK as xn,b as On,aV as Dn,aq as An,aW as Nn,aX as Ln,aY as Pn,a4 as Bn,ah as Fn,aZ as Un,e as zn,D as Wn,K as Hn}from"./_sentry_core-CwfwR2GV.js";import{n as Le,a as $n,d as jn,f as qn,o as Kn,p as Vn,q as Yn,t as Mr,u as Xn,S as Jn,v as Rr}from"./_sentry-internal_browser-utils-B5rWzt4o.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"d77fe5d16c1b6ff8c173b7d7b73c0144e3fdccbf"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d0f0f47c-0bae-430e-b796-f9ba74117c5f",e._sentryDebugIdIdentifier="sentry-dbid-d0f0f47c-0bae-430e-b796-f9ba74117c5f")})()}catch{}const U=br,Mt="sentryReplaySession",Gn="replay_event",Rt="Unable to send Replay",Qn=3e5,Zn=9e5,es=5e3,ts=5500,rs=6e4,ns=5e3,ss=3,Jt=15e4,ze=5e3,is=3e3,os=300,Tt=2e7,as=4999,cs=15e3,Gt=36e5;var ls=Object.defineProperty,us=(e,t,r)=>t in e?ls(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Qt=(e,t,r)=>us(e,typeof t!="symbol"?t+"":t,r),H=(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))(H||{});function ds(e){return e.nodeType===e.ELEMENT_NODE}function Re(e){const t=e==null?void 0:e.host;return(t==null?void 0:t.shadowRoot)===e}function Te(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function hs(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function fs(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function qe(e){try{const t=e.rules||e.cssRules;return t?hs(Array.from(t,Tr).join("")):null}catch{return null}}function ps(e){let t="";for(let r=0;r<e.style.length;r++){const n=e.style,s=n[r],i=n.getPropertyPriority(s);t+=`${s}:${n.getPropertyValue(s)}${i?" !important":""};`}return`${e.selectorText} { ${t} }`}function Tr(e){let t;if(gs(e))try{t=qe(e.styleSheet)||fs(e)}catch{}else if(ys(e)){let r=e.cssText;const n=e.selectorText.includes(":"),s=typeof e.style.all=="string"&&e.style.all;if(s&&(r=ps(e)),n&&(r=ms(r)),n||s)return r}return t||e.cssText}function ms(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function gs(e){return"styleSheet"in e}function ys(e){return"selectorText"in e}class xr{constructor(){Qt(this,"idNodeMap",new Map),Qt(this,"nodeMetaMap",new WeakMap)}getId(t){var n;return t?((n=this.getMeta(t))==null?void 0:n.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const n=r.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,r)}replace(t,r){const n=this.getNode(t);if(n){const s=this.nodeMetaMap.get(n);s&&this.nodeMetaMap.set(r,s)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Ss(){return new xr}function Ze({maskInputOptions:e,tagName:t,type:r}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||r&&e[r]||r==="password"||t==="INPUT"&&!r&&e.text)}function Oe({isMasked:e,element:t,value:r,maskInputFn:n}){let s=r||"";return e?(n&&(s=n(s,t)),"*".repeat(s.length)):s}function be(e){return e.toLowerCase()}function St(e){return e.toUpperCase()}const Zt="__rrweb_original__";function _s(e){const t=e.getContext("2d");if(!t)return!0;const r=50;for(let n=0;n<e.width;n+=r)for(let s=0;s<e.height;s+=r){const i=t.getImageData,o=Zt in i?i[Zt]:i;
1if(new Uint32Array(o.call(t,n,s,Math.min(r,e.width-n),Math.min(r,e.height-s)).data.buffer).some(a=>a!==0))return!1}return!0}function xt(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?be(t):null}function Ke(e,t,r){return t==="INPUT"&&(r==="radio"||r==="checkbox")?e.getAttribute("value")||"":e.value}function Or(e,t){let r;try{r=new URL(e,t??window.location.href)}catch{return null}const n=/\.([0-9a-z]+)(?:$)/i,s=r.pathname.match(n);return(s==null?void 0:s[1])??null}const er={};function Dr(e){const t=er[e];if(t)return t;const r=window.document;let n=window[e];if(r&&typeof r.createElement=="function")try{const s=r.createElement("iframe");s.hidden=!0,r.head.appendChild(s);const i=s.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(s)}catch{}return er[e]=n.bind(window)}function _t(...e){return Dr("setTimeout")(...e)}function Ar(...e){return Dr("clearTimeout")(...e)}function Nr(e){try{return e.contentDocument}catch{}}let ws=1;const vs=new RegExp("[^a-z0-9-_:]"),De=-2;function Ot(){return ws++}function bs(e){if(e instanceof HTMLFormElement)return"form";const t=be(e.tagName);return vs.test(t)?"div":t}function Es(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let me,tr;const ks=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Is=/^(?:[a-z+]+:)?\/\//i,Cs=/^www\..*/i,Ms=/^(data:)([^,]*),(.*)/i;function Ve(e,t){return(e||"").replace(ks,(r,n,s,i,o,c)=>{const a=s||o||c,l=n||i||"";if(!a)return r;if(Is.test(a)||Cs.test(a))return`url(${l}${a}${l})`;if(Ms.test(a))return`url(${l}${a}${l})`;if(a[0]==="/")return`url(${l}${Es(t)+a}${l})`;const d=t.split("/"),u=a.split("/");d.pop();for(const h of u)h!=="."&&(h===".."?d.pop():d.push(h));return`url(${l}${d.join("/")}${l})`})}const Rs=/^[^ \t\n\r\u000c]+/,Ts=/^[, \t\n\r\u000c]+/;function xs(e,t){if(t.trim()==="")return t;let r=0;function n(i){let o;const c=i.exec(t.substring(r));return c?(o=c[0],r+=o.length,o):""}const s=[];for(;n(Ts),!(r>=t.length);){let i=n(Rs);if(i.slice(-1)===",")i=Se(e,i.substring(0,i.length-1)),s.push(i);else{let o="";i=Se(e,i);let c=!1;for(;;){const a=t.charAt(r);if(a===""){s.push((i+o).trim());break}else if(c)a===")"&&(c=!1);else if(a===","){r+=1,s.push((i+o).trim());break}else a==="("&&(c=!0);o+=a,r+=1}}}return s.join(", ")}const rr=new WeakMap;function Se(e,t){return!t||t.trim()===""?t:et(e,t)}function Os(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function et(e,t){let r=rr.get(e);if(r||(r=e.createElement("a"),rr.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function Lr(e,t,r,n,s,i){return n&&(r==="src"||r==="href"&&!(t==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&(t==="table"||t==="td"||t==="th")?Se(e,n):r==="srcset"?xs(e,n):r==="style"?Ve(n,et(e)):t==="object"&&r==="data"?Se(e,n):typeof i=="function"?i(r,n,s):n)}function Pr(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function Ds(e,t,r,n){try{if(n&&e.matches(n))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}if(r)return e.matches(r)}catch{}return!1}function As(e,t){for(let r=e.classList.length;r--;){const n=e.classList[r];if(t.test(n))return!0}return!1}function fe(e,t,r=1/0,n=0){return!e||e.nodeType!==e.ELEMENT_NODE||n>r?-1:t(e)?n:fe(e.parentNode,t,r,n+1)}function _e(e,t){return r=>{const n=r;if(n===null)return!1;try{if(e){if(typeof e=="string"){if(n.matches(`.${e}`))return!0}else if(As(n,e))return!0}return!!(t&&n.matches(t))}catch{return!1}}}function Ee(e,t,r,n,s,i){try{const o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName==="INPUT"){const l=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(l))return!0}let c=-1,a=-1;if(i){if(a=fe(o,_e(n,s)),a<0)return!0;c=fe(o,_e(t,r),a>=0?a:1/0)}else{if(c=fe(o,_e(t,r)),c<0)return!1;a=fe(o,_e(n,s),c>=0?c:1/0)}return c>=0?a>=0?c<=a:!0:a>=0?!1:!!i}catch{}return!!i}function Ns(e,t,r){const n=e.contentWindow;if(!n)return;let s=!1,i;try{i=n.document.readyState}catch{return}if(i!=="complete"){const c=_t(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{Ar(c),s=!0,t()});return}const o="about:blank";if(n.location.href!==o||e.src===o||e.src==="")return _t(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Ls(e,t,r){let n=!1,s;try{s=e.sheet}catch{return}if(s)return;const i=_t(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{Ar(i),n=!0,t()})}function Ps(e,t){const{doc:r,mirror:n,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskAttributeFn:a,maskTextClass:l,unmaskTextClass:d,maskTextSelector:u,unmaskTextSelector:h,inlineStylesheet:p,maskInputOptions:f={},maskTextFn:m,maskInputFn:_,dataURLOptions:y={}
1,inlineImages:k,recordCanvas:L,keepIframeSrcFn:O,newlyAddedElement:I=!1}=t,S=Bs(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:H.Document,childNodes:[],compatMode:e.compatMode}:{type:H.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:H.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:S};case e.ELEMENT_NODE:return Us(e,{doc:r,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:p,maskAttributeFn:a,maskInputOptions:f,maskInputFn:_,dataURLOptions:y,inlineImages:k,recordCanvas:L,keepIframeSrcFn:O,newlyAddedElement:I,rootId:S,maskTextClass:l,unmaskTextClass:d,maskTextSelector:u,unmaskTextSelector:h});case e.TEXT_NODE:return Fs(e,{doc:r,maskAllText:c,maskTextClass:l,unmaskTextClass:d,maskTextSelector:u,unmaskTextSelector:h,maskTextFn:m,maskInputOptions:f,maskInputFn:_,rootId:S});case e.CDATA_SECTION_NODE:return{type:H.CDATA,textContent:"",rootId:S};case e.COMMENT_NODE:return{type:H.Comment,textContent:e.textContent||"",rootId:S};default:return!1}}function Bs(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function Fs(e,t){var y;const{maskAllText:r,maskTextClass:n,unmaskTextClass:s,maskTextSelector:i,unmaskTextSelector:o,maskTextFn:c,maskInputOptions:a,maskInputFn:l,rootId:d}=t,u=e.parentNode&&e.parentNode.tagName;let h=e.textContent;const p=u==="STYLE"?!0:void 0,f=u==="SCRIPT"?!0:void 0,m=u==="TEXTAREA"?!0:void 0;if(p&&h){try{e.nextSibling||e.previousSibling||(y=e.parentNode.sheet)!=null&&y.cssRules&&(h=qe(e.parentNode.sheet))}catch(k){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${k}`,e)}h=Ve(h,et(t.doc))}f&&(h="SCRIPT_PLACEHOLDER");const _=Ee(e,n,i,s,o,r);if(!p&&!f&&!m&&h&&_&&(h=c?c(h,e.parentElement):h.replace(/[\S]/g,"*")),m&&h&&(a.textarea||_)&&(h=l?l(h,e.parentNode):h.replace(/[\S]/g,"*")),u==="OPTION"&&h){const k=Ze({type:null,tagName:u,maskInputOptions:a});h=Oe({isMasked:Ee(e,n,i,s,o,k),element:e,value:h,maskInputFn:l})}return{type:H.Text,textContent:h||"",isStyle:p,rootId:d}}function Us(e,t){const{doc:r,blockClass:n,blockSelector:s,unblockSelector:i,inlineStylesheet:o,maskInputOptions:c={},maskAttributeFn:a,maskInputFn:l,dataURLOptions:d={},inlineImages:u,recordCanvas:h,keepIframeSrcFn:p,newlyAddedElement:f=!1,rootId:m,maskTextClass:_,unmaskTextClass:y,maskTextSelector:k,unmaskTextSelector:L}=t,O=Ds(e,n,s,i),I=bs(e);let S={};const T=e.attributes.length;for(let g=0;g<T;g++){const b=e.attributes[g];b.name&&!Pr(I,b.name,b.value)&&(S[b.name]=Lr(r,I,be(b.name),b.value,e,a))}if(I==="link"&&o){const g=Array.from(r.styleSheets).find(P=>P.href===e.href);let b=null;g&&(b=qe(g)),b&&(S.rel=null,S.href=null,S.crossorigin=null,S._cssText=Ve(b,g.href))}if(I==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const g=qe(e.sheet);g&&(S._cssText=Ve(g,et(r)))}if(I==="input"||I==="textarea"||I==="select"||I==="option"){const g=e,b=xt(g),P=Ke(g,St(I),b),B=g.checked;if(b!=="submit"&&b!=="button"&&P){const $=Ee(g,_,k,y,L,Ze({type:b,tagName:St(I),maskInputOptions:c}));S.value=Oe({isMasked:$,element:g,value:P,maskInputFn:l})}B&&(S.checked=B)}if(I==="option"&&(e.selected&&!c.select?S.selected=!0:delete S.selected),I==="canvas"&&h){if(e.__context==="2d")_s(e)||(S.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){const g=e.toDataURL(d.type,d.quality),b=r.createElement("canvas");b.width=e.width,b.height=e.height;const P=b.toDataURL(d.type,d.quality);g!==P&&(S.rr_dataURL=g)}}if(I==="img"&&u){me||(me=r.createElement("canvas"),tr=me.getContext("2d"));const g=e,b=g.currentSrc||g.getAttribute("src")||"<unknown-src>",P=g.crossOrigin,B=()=>{g.removeEventListener("load",B);try{me.width=g.naturalWidth,me.height=g.naturalHeight,tr.drawImage(g,0,0),S.rr_dataURL=me.toDataURL(d.type,d.quality)}catch($){if(g.crossOrigin!=="anonymous"){g.crossOrigin="anonymous",g.complete&&g.naturalWidth!==0?B():g.addEventListener("load",B);return}else console.warn(`Cannot inline img src=${b}! Error: ${$}`)}g.crossOrigin==="anonymous"&&(P?S.crossOrigin=P:g.removeAttribute("crossorigin"))};g.complete&&g.naturalWidth!==0?B():g.addEventListener("load",B)}if((I==="audio"||I==="video")&&(S.rr_mediaState=e.paused?"paused":"played",S.rr_mediaCurrentTime=e.currentTime),f||(e.scrollLeft&&(S.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(S.rr_scrollTop=e.scrollTop)),O){const{width:g,height:b}=e.getBoundingClientRect();S={class:S.class,rr_width:`${g}px`,rr_height:`${b}px`}}
1I==="iframe"&&!p(S.src)&&(!O&&!Nr(e)&&(S.rr_src=S.src),delete S.src);let R;try{customElements.get(I)&&(R=!0)}catch{}return{type:H.Element,tagName:I,attributes:S,childNodes:[],isSVG:Os(e)||void 0,needBlock:O,rootId:m,isCustom:R}}function F(e){return e==null?"":e.toLowerCase()}function zs(e,t){if(t.comment&&e.type===H.Comment)return!0;if(e.type===H.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Or(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(F(e.attributes.name).match(/^msapplication-tile(image|color)$/)||F(e.attributes.name)==="application-name"||F(e.attributes.rel)==="icon"||F(e.attributes.rel)==="apple-touch-icon"||F(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&F(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(F(e.attributes.property).match(/^(og|twitter|fb):/)||F(e.attributes.name).match(/^(og|twitter):/)||F(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(F(e.attributes.name)==="robots"||F(e.attributes.name)==="googlebot"||F(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(F(e.attributes.name)==="author"||F(e.attributes.name)==="generator"||F(e.attributes.name)==="framework"||F(e.attributes.name)==="publisher"||F(e.attributes.name)==="progid"||F(e.attributes.property).match(/^article:/)||F(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(F(e.attributes.name)==="google-site-verification"||F(e.attributes.name)==="yandex-verification"||F(e.attributes.name)==="csrf-token"||F(e.attributes.name)==="p:domain_verify"||F(e.attributes.name)==="verify-v1"||F(e.attributes.name)==="verification"||F(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function we(e,t){const{doc:r,mirror:n,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskTextClass:a,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:u,skipChild:h=!1,inlineStylesheet:p=!0,maskInputOptions:f={},maskAttributeFn:m,maskTextFn:_,maskInputFn:y,slimDOMOptions:k,dataURLOptions:L={},inlineImages:O=!1,recordCanvas:I=!1,onSerialize:S,onIframeLoad:T,iframeLoadTimeout:R=5e3,onBlockedImageLoad:g,onStylesheetLoad:b,stylesheetLoadTimeout:P=5e3,keepIframeSrcFn:B=()=>!1,newlyAddedElement:$=!1}=t;let{preserveWhiteSpace:j=!0}=t;const J=Ps(e,{doc:r,mirror:n,blockClass:s,blockSelector:i,maskAllText:c,unblockSelector:o,maskTextClass:a,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:u,inlineStylesheet:p,maskInputOptions:f,maskAttributeFn:m,maskTextFn:_,maskInputFn:y,dataURLOptions:L,inlineImages:O,recordCanvas:I,keepIframeSrcFn:B,newlyAddedElement:$});if(!J)return console.warn(e,"not serialized"),null;let q;n.hasNode(e)?q=n.getId(e):zs(J,k)||!j&&J.type===H.Text&&!J.isStyle&&!J.textContent.replace(/^\s+|\s+$/gm,"").length?q=De:q=Ot();const C=Object.assign(J,{id:q});if(n.add(e,C),q===De)return null;S&&S(e);let Y=!h;if(C.type===H.Element){Y=Y&&!C.needBlock;const z=e.shadowRoot;z&&Te(z)&&(C.isShadowHost=!0)}if((C.type===H.Document||C.type===H.Element)&&Y){k.headWhitespace&&C.type===H.Element&&C.tagName==="head"&&(j=!1);const z={doc:r,mirror:n,blockClass:s,blockSelector:i,maskAllText:c,unblockSelector:o,maskTextClass:a,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:u,skipChild:h,inlineStylesheet:p,maskInputOptions:f,maskAttributeFn:m,maskTextFn:_,maskInputFn:y,slimDOMOptions:k,dataURLOptions:L,inlineImages:O,recordCanvas:I,preserveWhiteSpace:j,onSerialize:S,onIframeLoad:T,iframeLoadTimeout:R,onBlockedImageLoad:g,onStylesheetLoad:b,stylesheetLoadTimeout:P,keepIframeSrcFn:B},ne=e.childNodes?Array.from(e.childNodes):[];for(const ee of ne){const ae=we(ee,z);ae&&C.childNodes.push(ae)}if(ds(e)&&e.shadowRoot)for(const ee of Array.from(e.shadowRoot.childNodes)){const ae=we(ee,z);ae&&(Te(e.shadowRoot)&&(ae.isShadow=!0),C.childNodes.push(ae))}}if(e.parentNode&&Re(e.parentNode)&&Te(e.parentNode)&&(C.isShadow=!0),C.type===H.Element&&C.tagName==="iframe"&&!C.needBlock&&Ns(e,()=>{const z=Nr(e);
1if(z&&T){const ne=we(z,{doc:z,mirror:n,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskTextClass:a,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:p,maskInputOptions:f,maskAttributeFn:m,maskTextFn:_,maskInputFn:y,slimDOMOptions:k,dataURLOptions:L,inlineImages:O,recordCanvas:I,preserveWhiteSpace:j,onSerialize:S,onIframeLoad:T,iframeLoadTimeout:R,onStylesheetLoad:b,stylesheetLoadTimeout:P,keepIframeSrcFn:B});ne&&T(e,ne)}},R),C.type===H.Element&&C.tagName==="img"&&!e.complete&&C.needBlock){const z=e,ne=()=>{if(z.isConnected&&!z.complete&&g)try{const ee=z.getBoundingClientRect();ee.width>0&&ee.height>0&&g(z,C,ee)}catch{}z.removeEventListener("load",ne)};z.isConnected&&z.addEventListener("load",ne)}return C.type===H.Element&&C.tagName==="link"&&typeof C.attributes.rel=="string"&&(C.attributes.rel==="stylesheet"||C.attributes.rel==="preload"&&typeof C.attributes.href=="string"&&Or(C.attributes.href)==="css")&&Ls(e,()=>{if(b){const z=we(e,{doc:r,mirror:n,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:c,maskTextClass:a,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:p,maskInputOptions:f,maskAttributeFn:m,maskTextFn:_,maskInputFn:y,slimDOMOptions:k,dataURLOptions:L,inlineImages:O,recordCanvas:I,preserveWhiteSpace:j,onSerialize:S,onIframeLoad:T,iframeLoadTimeout:R,onStylesheetLoad:b,stylesheetLoadTimeout:P,keepIframeSrcFn:B});z&&b(e,z)}},P),C.type===H.Element&&delete C.needBlock,C}function Ws(e,t){const{mirror:r=new xr,blockClass:n="rr-block",blockSelector:s=null,unblockSelector:i=null,maskAllText:o=!1,maskTextClass:c="rr-mask",unmaskTextClass:a=null,maskTextSelector:l=null,unmaskTextSelector:d=null,inlineStylesheet:u=!0,inlineImages:h=!1,recordCanvas:p=!1,maskAllInputs:f=!1,maskAttributeFn:m,maskTextFn:_,maskInputFn:y,slimDOM:k=!1,dataURLOptions:L,preserveWhiteSpace:O,onSerialize:I,onIframeLoad:S,iframeLoadTimeout:T,onBlockedImageLoad:R,onStylesheetLoad:g,stylesheetLoadTimeout:b,keepIframeSrcFn:P=()=>!1}=t||{};return we(e,{doc:e,mirror:r,blockClass:n,blockSelector:s,unblockSelector:i,maskAllText:o,maskTextClass:c,unmaskTextClass:a,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:u,maskInputOptions:f===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:f===!1?{}:f,maskAttributeFn:m,maskTextFn:_,maskInputFn:y,slimDOMOptions:k===!0||k==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:k==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:k===!1?{}:k,dataURLOptions:L,inlineImages:h,recordCanvas:p,preserveWhiteSpace:O,onSerialize:I,onIframeLoad:S,iframeLoadTimeout:T,onBlockedImageLoad:R,onStylesheetLoad:g,stylesheetLoadTimeout:b,keepIframeSrcFn:P,newlyAddedElement:!1})}function V(e,t,r=document){const n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}const ge=`Please stop import mirror directly. Instead of that,\r
2now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
3or you can use record.mirror to access the mirror instance during recording.`;let nr={map:{},getId(){return console.error(ge),-1},getNode(){return console.error(ge),null},removeNodeFromMap(){console.error(ge)},has(){return console.error(ge),!1},reset(){console.error(ge)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(nr=new Proxy(nr,{get(e,t,r){return t==="map"&&console.error(ge),Reflect.get(e,t,r)}}));function Ae(e,t,r={}){let n=null,s=0;return function(...i){const o=Date.now();!s&&r.leading===!1&&(s=o);const c=t-(o-s),a=this;c<=0||c>t?(n&&(Ys(n),n=null),s=o,e.apply(a,i)):!n&&r.trailing!==!1&&(n=tt(()=>{s=r.leading===!1?0:Date.now(),n=null,e.apply(a,i)},c))}}function Br(e,t,r,n,s=window){const i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,n?r:{set(o){tt(()=>{r.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>Br(e,t,i||{},!0)}function Dt(e,t,r){try{if(!(t in e))return()=>{};const n=e[t],s=r(n);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=s,()=>{e[t]=n}}catch{return()=>{}}}let Ye=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Ye=()=>new Date().getTime());function Fr(e){var r,n,s,i,o,c;const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:(t==null?void 0:t.documentElement.scrollLeft)||((n=(r=t==null?void 0:t.body)==null?void 0:r.parentElement)==null?void 0:n.scrollLeft)||((s=t==null?void 0:t.body)==null?void 0:s.scrollLeft)||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(t==null?void 0:t.documentElement.scrollTop)||((o=(i=t==null?void 0:t.body)==null?void 0:i.parentElement)==null?void 0:o.scrollTop)||((c=t==null?void 0:t.body)==null?void 0:c.scrollTop)||0}}function Ur(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function zr(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Wr(e){if(!e)return null;
3try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function G(e,t,r,n,s){if(!e)return!1;const i=Wr(e);if(!i)return!1;const o=_e(t,r);if(!s){const l=n&&i.matches(n);return o(i)&&!l}const c=fe(i,o);let a=-1;return c<0?!1:(n&&(a=fe(i,_e(null,n))),c>-1&&a<0?!0:c<a)}function Hs(e,t){return t.getId(e)!==-1}function ft(e,t){return t.getId(e)===De}function Hr(e,t){if(Re(e))return!1;const r=t.getId(e);return t.has(r)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?Hr(e.parentNode,t):!0:!0}function wt(e){return!!e.changedTouches}function $s(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let r=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===r)return!0;while(r=r&&r.parentNode);return!1})}function $r(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function jr(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function vt(e){return!!(e!=null&&e.shadowRoot)}class js{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function qr(e){var r,n;let t=null;return((n=(r=e.getRootNode)==null?void 0:r.call(e))==null?void 0:n.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function qs(e){let t=e,r;for(;r=qr(t);)t=r;return t}function Ks(e){const t=e.ownerDocument;if(!t)return!1;const r=qs(e);return t.contains(r)}function Kr(e){const t=e.ownerDocument;return t?t.contains(e)||Ks(e):!1}const sr={};function At(e){const t=sr[e];if(t)return t;const r=window.document;let n=window[e];if(r&&typeof r.createElement=="function")try{const s=r.createElement("iframe");s.hidden=!0,r.head.appendChild(s);const i=s.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(s)}catch{}return sr[e]=n.bind(window)}function Vs(...e){return At("requestAnimationFrame")(...e)}function tt(...e){return At("setTimeout")(...e)}
3function Ys(...e){return At("clearTimeout")(...e)}var M=(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))(M||{}),E=(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))(E||{}),K=(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))(K||{}),ie=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ie||{}),ye=(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))(ye||{});function Nt(e){try{return e.contentDocument}catch{}}function Xs(e){try{return e.contentWindow}catch{}}function ir(e){return"__ln"in e}class Js{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let n=0;n<t;n++)r=(r==null?void 0:r.next)||null;return r}addNode(t){const r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&ir(t.previousSibling)){const n=t.previousSibling.__ln.next;r.next=n,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,n&&(n.previous=r)}else if(t.nextSibling&&ir(t.nextSibling)&&t.nextSibling.__ln.previous){const n=t.nextSibling.__ln.previous;r.previous=n,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,n&&(n.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(t){const r=t.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const or=(e,t)=>`${e}@${t}`;class Gs{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=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],r=new Set,n=new Js,s=a=>{let l=a,d=De;for(;d===De;)l=l&&l.nextSibling,d=l&&this.mirror.getId(l);return d},i=a=>{if(!a.parentNode||!Kr(a))return;const l=Re(a.parentNode)?this.mirror.getId(qr(a)):this.mirror.getId(a.parentNode),d=s(a);if(l===-1||d===-1)return n.addNode(a);const u=we(a,{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:h=>{$r(h,this.mirror)&&!G(h,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(h),jr(h,this.mirror)&&this.stylesheetManager.trackLinkElement(h),vt(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,this.doc)},onIframeLoad:(h,p)=>{G(h,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(h,p),h.contentWindow&&this.canvasManager.addWindow(h.contentWindow),this.shadowDomManager.observeAttachShadow(h))},onStylesheetLoad:(h,p)=>{this.stylesheetManager.attachLinkElement(h,p)},onBlockedImageLoad:(h,p,{width:f,height:m})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:p.id,attributes:{style:{width:`${f}px`,height:`${m}px`}}}]})}});u&&(t.push({parentId:l,nextId:d,node:u}),r.add(u.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)ar(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||i(a);for(const a of this.addedSet)!cr(this.droppedSet,a)&&!ar(this.removes,a,this.mirror)||cr(this.movedSet,a)?i(a):this.droppedSet.add(a);let o=null;for(;n.length;){let a=null;if(o){const l=this.mirror.getId(o.value.parentNode),d=s(o.value);l!==-1&&d!==-1&&(a=o)}if(!a){let l=n.tail;for(;l;){const d=l;if(l=l.previous,d){const u=this.mirror.getId(d.value.parentNode);
3if(s(d.value)===-1)continue;if(u!==-1){a=d;break}else{const p=d.value;if(p.parentNode&&p.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const f=p.parentNode.host;if(this.mirror.getId(f)!==-1){a=d;break}}}}}}if(!a){for(;n.head;)n.removeNode(n.head.value);break}o=a.previous,n.removeNode(a.value),i(a.value)}const c={texts:this.texts.map(a=>({id:this.mirror.getId(a.node),value:a.value})).filter(a=>!r.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{const{attributes:l}=a;if(typeof l.style=="string"){const d=JSON.stringify(a.styleDiff),u=JSON.stringify(a._unchangedStyles);d.length<l.style.length&&(d+u).split("var(").length===l.style.split("var(").length&&(l.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:l}}).filter(a=>!r.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:t};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(c))},this.processMutation=t=>{if(!ft(t.target,this.mirror))switch(t.type){case"characterData":{const r=t.target.textContent;!G(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:Ee(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&r?this.maskTextFn?this.maskTextFn(r,Wr(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{const r=t.target;let n=t.attributeName,s=t.target.getAttribute(n);if(n==="value"){const o=xt(r),c=r.tagName;s=Ke(r,c,o);const a=Ze({maskInputOptions:this.maskInputOptions,tagName:c,type:o}),l=Ee(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,a);s=Oe({isMasked:l,element:r,value:s,maskInputFn:this.maskInputFn})}if(G(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||s===t.oldValue)return;let i=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(s))if(!Nt(r))n="rr_src";else return;if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(t.target,i)),n==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!Pr(r.tagName,n)&&(i.attributes[n]=Lr(this.doc,be(r.tagName),be(n),s,r,this.maskAttributeFn),n==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");t.oldValue&&o.setAttribute("style",t.oldValue);for(const c of Array.from(r.style)){const a=r.style.getPropertyValue(c),l=r.style.getPropertyPriority(c);a!==o.style.getPropertyValue(c)||l!==o.style.getPropertyPriority(c)?l===""?i.styleDiff[c]=a:i.styleDiff[c]=[a,l]:i._unchangedStyles[c]=[a,l]}for(const c of Array.from(o.style))r.style.getPropertyValue(c)===""&&(i.styleDiff[c]=!1)}break}case"childList":{if(G(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{const n=this.mirror.getId(r),s=Re(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);G(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||ft(r,this.mirror)||!Hs(r,this.mirror)||(this.addedSet.has(r)?(bt(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&n===-1||Hr(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[or(n,s)]?bt(this.movedSet,r):this.removes.push({parentId:s,id:n,isShadow:Re(t.target)&&Te(t.target)?!0:void 0})),this.mapRemoves.push(r))});break}}},this.genAdds=(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(ft(t,this.mirror))return;this.movedSet.add(t);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[or(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);G(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEac
3h(n=>this.genAdds(n)),vt(t)&&t.shadowRoot.childNodes.forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,t)}))}}}init(t){["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"].forEach(r=>{this[r]=t[r]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function bt(e,t){var r;e.delete(t),(r=t.childNodes)==null||r.forEach(n=>bt(e,n))}function ar(e,t,r){return e.length===0?!1:Qs(e,t,r)}function Qs(e,t,r){let n=t.parentNode;for(;n;){const s=r.getId(n);if(e.some(i=>i.id===s))return!0;n=n.parentNode}return!1}function cr(e,t){return e.size===0?!1:Vr(e,t)}function Vr(e,t){const{parentNode:r}=t;return r?e.has(r)?!0:Vr(e,r):!1}let xe;function Zs(e){xe=e}function ei(){xe=void 0}const D=e=>xe?(...r)=>{try{return e(...r)}catch(n){if(xe&&xe(n)===!0)return()=>{};throw n}}:e,ve=[];function Pe(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Yr(e,t){var o,c;const r=new Gs;ve.push(r),r.init(e);let n=window.MutationObserver||window.__rrMutationObserver;const s=(c=(o=window==null?void 0:window.Zone)==null?void 0:o.__symbol__)==null?void 0:c.call(o,"MutationObserver");s&&window[s]&&(n=window[s]);const i=new n(D(a=>{e.onMutation&&e.onMutation(a)===!1||r.processMutations.bind(r)(a)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function ti({mousemoveCb:e,sampling:t,doc:r,mirror:n}){if(t.mousemove===!1)return()=>{};const s=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],c;const a=Ae(D(u=>{const h=Date.now()-c;e(o.map(p=>(p.timeOffset-=h,p)),u),o=[],c=null}),i),l=D(Ae(D(u=>{const h=Pe(u),{clientX:p,clientY:f}=wt(u)?u.changedTouches[0]:u;c||(c=Ye()),o.push({x:p,y:f,id:n.getId(h),timeOffset:Ye()-c}),a(typeof DragEvent<"u"&&u instanceof DragEvent?E.Drag:u instanceof MouseEvent?E.MouseMove:E.TouchMove)}),s,{trailing:!1})),d=[V("mousemove",l,r),V("touchmove",l,r),V("drag",l,r)];return D(()=>{d.forEach(u=>u())})}function ri({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:s,unblockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const c=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,a=[];let l=null;const d=u=>h=>{const p=Pe(h);if(G(p,n,s,i,!0))return;let f=null,m=u;if("pointerType"in h){switch(h.pointerType){case"mouse":f=ie.Mouse;break;case"touch":f=ie.Touch;break;case"pen":f=ie.Pen;break}f===ie.Touch?K[u]===K.MouseDown?m="TouchStart":K[u]===K.MouseUp&&(m="TouchEnd"):ie.Pen}else wt(h)&&(f=ie.Touch);f!==null?(l=f,(m.startsWith("Touch")&&f===ie.Touch||m.startsWith("Mouse")&&f===ie.Mouse)&&(f=null)):K[u]===K.Click&&(f=l,l=null);const _=wt(h)?h.changedTouches[0]:h;if(!_)return;const y=r.getId(p),{clientX:k,clientY:L}=_;D(e)({type:K[m],id:y,x:k,y:L,...f!==null&&{pointerType:f}})};return Object.keys(K).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&c[u]!==!1).forEach(u=>{let h=be(u);const p=d(u);if(window.PointerEvent)switch(K[u]){case K.MouseDown:case K.MouseUp:h=h.replace("mouse","pointer");break;case K.TouchStart:case K.TouchEnd:return}a.push(V(h,p,t))}),D(()=>{a.forEach(u=>u())})}function Xr({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:s,unblockSelector:i,sampling:o}){const c=D(Ae(D(a=>{const l=Pe(a);if(!l||G(l,n,s,i,!0))return;const d=r.getId(l);if(l===t&&t.defaultView){const u=Fr(t.defaultView);e({id:d,x:u.left,y:u.top})}else e({id:d,x:l.scrollLeft,y:l.scrollTop})}),o.scroll||100));return V("scroll",c,t)}function ni({viewportResizeCb:e},{win:t}){let r=-1,n=-1;const s=D(Ae(D(()=>{const i=Ur(),o=zr();(r!==i||n!==o)&&(e({width:Number(o),height:Number(i)}),r=i,n=o)}),200));return V("resize",s,t)}const si=["INPUT","TEXTAREA","SELECT"],lr=new WeakMap;function ii({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:s,unblockSelector:i,ignoreClass:o,ignoreSelector:c,maskInputOptions:a,maskInputFn:l,sampling:d,userTr
3iggeredOnInput:u,maskTextClass:h,unmaskTextClass:p,maskTextSelector:f,unmaskTextSelector:m}){function _(T){let R=Pe(T);const g=T.isTrusted,b=R&&St(R.tagName);if(b==="OPTION"&&(R=R.parentElement),!R||!b||si.indexOf(b)<0||G(R,n,s,i,!0))return;const P=R;if(P.classList.contains(o)||c&&P.matches(c))return;const B=xt(R);let $=Ke(P,b,B),j=!1;const J=Ze({maskInputOptions:a,tagName:b,type:B}),q=Ee(R,h,f,p,m,J);(B==="radio"||B==="checkbox")&&(j=R.checked),$=Oe({isMasked:q,element:R,value:$,maskInputFn:l}),y(R,u?{text:$,isChecked:j,userTriggered:g}:{text:$,isChecked:j});const C=R.name;B==="radio"&&C&&j&&t.querySelectorAll(`input[type="radio"][name="${C}"]`).forEach(Y=>{if(Y!==R){const z=Oe({isMasked:q,element:Y,value:Ke(Y,b,B),maskInputFn:l});y(Y,u?{text:z,isChecked:!j,userTriggered:!1}:{text:z,isChecked:!j})}})}function y(T,R){const g=lr.get(T);if(!g||g.text!==R.text||g.isChecked!==R.isChecked){lr.set(T,R);const b=r.getId(T);D(e)({...R,id:b})}}const L=(d.input==="last"?["change"]:["input","change"]).map(T=>V(T,D(_),t)),O=t.defaultView;if(!O)return()=>{L.forEach(T=>T())};const I=O.Object.getOwnPropertyDescriptor(O.HTMLInputElement.prototype,"value"),S=[[O.HTMLInputElement.prototype,"value"],[O.HTMLInputElement.prototype,"checked"],[O.HTMLSelectElement.prototype,"value"],[O.HTMLTextAreaElement.prototype,"value"],[O.HTMLSelectElement.prototype,"selectedIndex"],[O.HTMLOptionElement.prototype,"selected"]];return I&&I.set&&L.push(...S.map(T=>Br(T[0],T[1],{set(){D(_)({target:this,isTrusted:!1})}},!1,O))),D(()=>{L.forEach(T=>T())})}function Xe(e){const t=[];function r(n,s){if(We("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||We("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||We("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||We("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){const o=Array.from(n.parentRule.cssRules).indexOf(n);s.unshift(o)}else if(n.parentStyleSheet){const o=Array.from(n.parentStyleSheet.cssRules).indexOf(n);s.unshift(o)}return s}return r(e,t)}function ce(e,t,r){let n,s;return e?(e.ownerNode?n=t.getId(e.ownerNode):s=r.getId(e),{styleId:s,id:n}):{}}function oi({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};const s=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:D((d,u,h)=>{const[p,f]=h,{id:m,styleId:_}=ce(u,t,r.styleMirror);return(m&&m!==-1||_&&_!==-1)&&e({id:m,styleId:_,adds:[{rule:p,index:f}]}),d.apply(u,h)})});const i=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:D((d,u,h)=>{const[p]=h,{id:f,styleId:m}=ce(u,t,r.styleMirror);return(f&&f!==-1||m&&m!==-1)&&e({id:f,styleId:m,removes:[{index:p}]}),d.apply(u,h)})});let o;n.CSSStyleSheet.prototype.replace&&(o=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:D((d,u,h)=>{const[p]=h,{id:f,styleId:m}=ce(u,t,r.styleMirror);return(f&&f!==-1||m&&m!==-1)&&e({id:f,styleId:m,replace:p}),d.apply(u,h)})}));let c;n.CSSStyleSheet.prototype.replaceSync&&(c=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:D((d,u,h)=>{const[p]=h,{id:f,styleId:m}=ce(u,t,r.styleMirror);return(f&&f!==-1||m&&m!==-1)&&e({id:f,styleId:m,replaceSync:p}),d.apply(u,h)})}));const a={};He("CSSGroupingRule")?a.CSSGroupingRule=n.CSSGroupingRule:(He("CSSMediaRule")&&(a.CSSMediaRule=n.CSSMediaRule),He("CSSConditionRule")&&(a.CSSConditionRule=n.CSSConditionRule),He("CSSSupportsRule")&&(a.CSSSupportsRule=n.CSSSupportsRule));const l={};return Object.entries(a).forEach(([d,u])=>{l[d]={insertRule:u.prototype.insertRule,deleteRule:u.prototype.deleteRule},u.prototype.insertRule=new Proxy(l[d].insertRule,{apply:D((h,p,f)=>{const[m,_]=f,{id:y,styleId:k}=ce(p.parentStyleSheet,t,r.styleMirror);return(y&&y!==-1||k&&k!==-1)&&e({id:y,styleId:k,adds:[{rule:m,index:[...Xe(p),_||0]}]}),h.apply(p,f)})}),u.prototype.deleteRule=new Proxy(l[d].deleteRule,{apply:D((h,p,f)=>{const[m]=f,{id:_,styleId:y}=ce(p.parentStyleSheet,t,r.styleMirror);return(_&&_!==-1||y&&y!==-1)&&e({id:_,styleId:y,removes:[{index:[...Xe(p),m]}]}),h.apply(p,f)})})}),D(()=>{n.CSSStyleSheet.prototype.insertRule=s,n.CSSStyleSheet.prototype.deleteRule=i,o&&(n.CSSStyleSheet.prototype.replace=o),c&&(n.CSSStyleSheet.prototype.replaceSync=c),Object.entries(a).forEac
vendor: 10,721 bytes, line 3
3h(([d,u])=>{u.prototype.insertRule=l[d].insertRule,u.prototype.deleteRule=l[d].deleteRule})})}function Jr({mirror:e,stylesheetManager:t},r){var o,c,a;let n=null;r.nodeName==="#document"?n=e.getId(r):n=e.getId(r.host);const s=r.nodeName==="#document"?(o=r.defaultView)==null?void 0:o.Document:(a=(c=r.ownerDocument)==null?void 0:c.defaultView)==null?void 0:a.ShadowRoot,i=s!=null&&s.prototype?Object.getOwnPropertyDescriptor(s==null?void 0:s.prototype,"adoptedStyleSheets"):void 0;return n===null||n===-1||!s||!i?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){var l;return(l=i.get)==null?void 0:l.call(this)},set(l){var u;const d=(u=i.set)==null?void 0:u.call(this,l);if(n!==null&&n!==-1)try{t.adoptStyleSheets(l,n)}catch{}return d}}),D(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function ai({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:s}){const i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:D((c,a,l)=>{var m;const[d,u,h]=l;if(r.has(d))return i.apply(a,[d,u,h]);const{id:p,styleId:f}=ce((m=a.parentRule)==null?void 0:m.parentStyleSheet,t,n.styleMirror);return(p&&p!==-1||f&&f!==-1)&&e({id:p,styleId:f,set:{property:d,value:u,priority:h},index:Xe(a.parentRule)}),c.apply(a,l)})});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:D((c,a,l)=>{var p;const[d]=l;if(r.has(d))return o.apply(a,[d]);const{id:u,styleId:h}=ce((p=a.parentRule)==null?void 0:p.parentStyleSheet,t,n.styleMirror);return(u&&u!==-1||h&&h!==-1)&&e({id:u,styleId:h,remove:{property:d},index:Xe(a.parentRule)}),c.apply(a,l)})}),D(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o})}function ci({mediaInteractionCb:e,blockClass:t,blockSelector:r,unblockSelector:n,mirror:s,sampling:i,doc:o}){const c=D(l=>Ae(D(d=>{const u=Pe(d);if(!u||G(u,t,r,n,!0))return;const{currentTime:h,volume:p,muted:f,playbackRate:m}=u;e({type:l,id:s.getId(u),currentTime:h,volume:p,muted:f,playbackRate:m})}),i.media||500)),a=[V("play",c(ye.Play),o),V("pause",c(ye.Pause),o),V("seeked",c(ye.Seeked),o),V("volumechange",c(ye.VolumeChange),o),V("ratechange",c(ye.RateChange),o)];return D(()=>{a.forEach(l=>l())})}function li({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const n=[],s=new WeakMap,i=r.FontFace;r.FontFace=function(a,l,d){const u=new i(a,l,d);return s.set(u,{family:a,buffer:typeof l!="string",descriptors:d,fontSource:typeof l=="string"?l:JSON.stringify(Array.from(new Uint8Array(l)))}),u};const o=Dt(t.fonts,"add",function(c){return function(a){return tt(D(()=>{const l=s.get(a);l&&(e(l),s.delete(a))}),0),c.apply(this,[a])}});return n.push(()=>{r.FontFace=i}),n.push(o),D(()=>{n.forEach(c=>c())})}function ui(e){const{doc:t,mirror:r,blockClass:n,blockSelector:s,unblockSelector:i,selectionCb:o}=e;let c=!0;const a=D(()=>{const l=t.getSelection();if(!l||c&&(l!=null&&l.isCollapsed))return;c=l.isCollapsed||!1;const d=[],u=l.rangeCount||0;for(let h=0;h<u;h++){const p=l.getRangeAt(h),{startContainer:f,startOffset:m,endContainer:_,endOffset:y}=p;G(f,n,s,i,!0)||G(_,n,s,i,!0)||d.push({start:r.getId(f),startOffset:m,end:r.getId(_),endOffset:y})}o({ranges:d})});return a(),V("selectionchange",a)}function di({doc:e,customElementCb:t}){const r=e.defaultView;return!r||!r.customElements?()=>{}:Dt(r.customElements,"define",function(s){return function(i,o,c){try{t({define:{name:i}})}catch{}return s.apply(this,[i,o,c])}})}function hi(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};let n;e.recordDOM&&(n=Yr(e,e.doc));const s=ti(e),i=ri(e),o=Xr(e),c=ni(e,{win:r}),a=ii(e),l=ci(e);let d=()=>{},u=()=>{},h=()=>{},p=()=>{};e.recordDOM&&(d=oi(e,{win:r}),u=Jr(e,e.doc),h=ai(e,{win:r}),e.collectFonts&&(p=li(e)));const f=ui(e),m=di(e),_=[];for(const y of e.plugins)_.push(y.observer(y.callback,r,y.options));return D(()=>{ve.forEach(y=>y.reset()),n==null||n.disconnect(),s(),i(),o(),c(),a(),l(),d(),u(),h(),p(),f(),m(),_.forEach(y=>y())})}function We(e){return typeof window[e]<"u"}function He(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Et{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,r,n,s){const i=n||this.getIdToRemoteIdMap(t),o=s||this.getRemoteIdToIdMap(t);let c=i.get(r);return c||(c=this.generateIdFn(),i.set(r,c),o.set(c,r)),c}getIds(t,r){const n=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return r.map(i=>this.getId(t,i,n,s))}getRemoteId(t,r,n){const s=n||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;const i=s.get(r);return i||-1}getRemoteIds(t,r){const n=this.getRemoteIdToIdMap(t);return r.map(s=>this.getRemoteId(t,s,n))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}}class fi{constructor(){this.crossOriginIframeMirror=new Et(Ot),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class pi{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Et(Ot),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Et(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,r){var s,i;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((s=t.contentWindow)==null||s.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,t);const n=Nt(t);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(t){const r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;const s=this.crossOriginIframeMap.get(t.source);if(!s)return;const i=this.transformCrossOriginEvent(s,r.data.event);i&&this.wrappedEmit(i,r.data.isCheckout)}transformCrossOriginEvent(t,r){var n;switch(r.type){case M.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);const s=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,s),this.patchRootIdOnNode(r.data.node,s),{timestamp:r.timestamp,type:M.IncrementalSnapshot,data:{source:E.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case M.Meta:case M.Load:case M.DomContentLoaded:return!1;case M.Plugin:return r;case M.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case M.IncrementalSnapshot:switch(r.data.source){case E.Mutation:return r.data.adds.forEach(s=>{this.replaceIds(s,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,t);const i=this.crossOriginIframeRootIdMap.get(t);i&&this.patchRootIdOnNode(s.node,i)}),r.data.removes.forEach(s=>{this.replaceIds(s,t,["parentId","id"])}),r.data.attributes.forEach(s=>{this.replaceIds(s,t,["id"])}),r.data.texts.forEach(s=>{this.replaceIds(s,t,["id"])}),r;case E.Drag:case E.TouchMove:case E.MouseMove:return r.data.positions.forEach(s=>{this.replaceIds(s,t,["id"])}),r;case E.ViewportResize:return!1;case E.MediaInteraction:case E.MouseInteraction:case E.Scroll:case E.CanvasMutation:case E.Input:return this.replaceIds(r.data,t,["id"]),r;case E.StyleSheetRule:case E.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case E.Font:return r;case E.Selection:return r.data.ranges.forEach(s=>{this.replaceIds(s,t,["start","end"])}),r;case E.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(n=r.data.styles)==null||n.forEach(s=>{this.replaceStyleIds(s,t,["styleId"])}),r}}return!1}replace(t,r,n,s){for(const i of s)!Array.isArray(r[i])&&typeof r[i]!="number"||(Array.isArray(r[i])?r[i]=t.getIds(n,r[i]):r[i]=t.getId(n,r[i]));return r}replaceIds(t,r,n){return this.replace(this.crossOriginIframeMirror,t,r,n)}replaceStyleIds(t,r,n){return this.replace(this.crossOriginIframeStyleMirror,t,r,n)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(n=>{this.replaceIdOnNode(n,r)})}patchRootIdOnNode(t,r){t.type!==H.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(n=>{this.patchRootIdOnNode(n,r)})}}class mi{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class gi{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!Te(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const n=Yr({...this.bypassOptions,doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(Xr({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),tt(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(Jr({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const r=Nt(t),n=Xs(t);!r||!n||this.patchAttachShadow(n.Element,r)}patchAttachShadow(t,r){const n=this;this.restoreHandlers.push(Dt(t.prototype,"attachShadow",function(s){return function(i){const o=s.call(this,i);return this.shadowRoot&&Kr(this)&&n.addShadowRoot(this.shadowRoot,r),o}}))}
3reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}var ur="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yi=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var $e=0;$e<ur.length;$e++)yi[ur.charCodeAt($e)]=$e;class dr{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class Si{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new js,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;const n={id:r,styleIds:[]},s=[];for(const i of t){let o;this.styleMirror.has(i)?o=this.styleMirror.getId(i):(o=this.styleMirror.add(i),s.push({styleId:o,rules:Array.from(i.rules||CSSRule,(c,a)=>({rule:Tr(c),index:a}))})),n.styleIds.push(o)}s.length>0&&(n.styles=s),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class _i{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,r){const n=this.nodeMap.get(t);return n&&Array.from(n).some(s=>s!==r)}add(t,r){this.active||(this.active=!0,Vs(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}}let W,Je;var vr;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((vr=e.contentWindow)==null?void 0:vr.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const re=Ss();function oe(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:s="rr-block",blockSelector:i=null,unblockSelector:o=null,ignoreClass:c="rr-ignore",ignoreSelector:a=null,maskAllText:l=!1,maskTextClass:d="rr-mask",unmaskTextClass:u=null,maskTextSelector:h=null,unmaskTextSelector:p=null,inlineStylesheet:f=!0,maskAllInputs:m,maskInputOptions:_,slimDOMOptions:y,maskAttributeFn:k,maskInputFn:L,maskTextFn:O,maxCanvasSize:I=null,packFn:S,sampling:T={},dataURLOptions:R={},mousemoveWait:g,recordDOM:b=!0,recordCanvas:P=!1,recordCrossOriginIframes:B=!1,recordAfter:$=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:j=!1,collectFonts:J=!1,inlineImages:q=!1,plugins:C,keepIframeSrcFn:Y=()=>!1,ignoreCSSAttributes:z=new Set([]),errorHandler:ne,onMutation:ee,getCanvasManager:ae}=e;Zs(ne);const Fe=B?window.parent===window:!0;let Ie=!1;if(!Fe)try{window.parent.document&&(Ie=!1)}catch{Ie=!0}if(Fe&&!t)throw new Error("emit function is required");if(!Fe&&!Ie)return()=>{};g!==void 0&&T.mousemove===void 0&&(T.mousemove=g),re.reset();const st=m===!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?_:{},it=y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:y==="all",headMetaDescKeywords:y==="all"}:y||{};$s();let ot,at=0;const jt=A=>{for(const te of C||[])te.eventProcessor&&(A=te.eventProcessor(A));return S&&!Ie&&(A=S(A)),A};W=(A,te)=>{var X;const x=A;if(x.timestamp=Ye(),(X=ve[0])!=null&&X.isFrozen()&&x.type!==M.FullSnapshot&&!(x.type===M.IncrementalSnapshot&&x.data.source===E.Mutation)&&ve.forEach(Q=>Q.unfreeze()),Fe)t==null||t(jt(x),te);else if(Ie){const Q={type:"rrweb",event:jt(x),origin:window.location.origin,isCheckout:te};window.parent.postMessage(Q,"*")}if(x.type===M.FullSnapshot)ot=x,at=0;else if(x.type===M.IncrementalSnapshot){if(x.data.source===E.Mutation&&x.data.isAttachIframe)return;at++;const Q=n&&at>=n,N=r&&ot&&x.timestamp-ot.timestamp>r;(Q||N)&&ut(!0)}};const Ce=A=>{W({type:M.IncrementalSnapshot,data:{source:E.Mutation,...A}})},qt=A=>W({type:M.IncrementalSnapshot,data:{source:E.Scroll,...A}}),Sn=A=>W({type:M.IncrementalSnapshot,data:{source:E.CanvasMutation,...A}}),_n=A=>W({type:M.IncrementalSnapshot,data:{source:E.AdoptedStyleSheet,...A}}),de=new Si({mutationCb:Ce,adoptedStyleSheetCb:_n}),he=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new fi:new pi({mirror:re,mutationCb:Ce,stylesheetManager:de,recordCrossOriginIframes:B,wrappedEmit:W});for(const A of C||[])A.getMirror&&A.getMirror({nodeMirror:re,crossOriginIframeMirror:he.crossOriginIframeMirror,crossOriginIframeStyleMirror:he.crossOriginIframeStyleMirror});const ct=new _i,lt=vi(ae,{mirror:re,win:window,mutationCb:A=>W({type:M.IncrementalSnapshot,data:{source:E.CanvasMutation,...A}}),recordCanvas:P,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:I,sampling:T.canvas,dataURLOptions:R,errorHandler:ne}),Ue=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new mi:new gi({mutationCb:Ce,scrollCb:qt,bypassOptions:{onMutation:ee,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:l,maskTextClass:d,unmaskTextClass:u,maskTextSelector:h,unmaskTextSelector:p,inlineStylesheet:f,maskInputOptions:st,dataURLOptions:R,maskAttributeFn:k,maskTextFn:O,maskInputFn:L,recordCanvas:P,inlineImages:q,sampling:T,slimDOMOptions:it,iframeManager:he,stylesheetManager:de,canvasManager:lt,keepIframeSrcFn:Y,processedNodeManager:ct},mirror:re}),ut=(A=!1)=>
3{if(!b)return;W({type:M.Meta,data:{href:window.location.href,width:zr(),height:Ur()}},A),de.reset(),Ue.init(),ve.forEach(x=>x.lock());const te=Ws(document,{mirror:re,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:l,maskTextClass:d,unmaskTextClass:u,maskTextSelector:h,unmaskTextSelector:p,inlineStylesheet:f,maskAllInputs:st,maskAttributeFn:k,maskInputFn:L,maskTextFn:O,slimDOM:it,dataURLOptions:R,recordCanvas:P,inlineImages:q,onSerialize:x=>{$r(x,re)&&he.addIframe(x),jr(x,re)&&de.trackLinkElement(x),vt(x)&&Ue.addShadowRoot(x.shadowRoot,document)},onIframeLoad:(x,X)=>{he.attachIframe(x,X),x.contentWindow&&lt.addWindow(x.contentWindow),Ue.observeAttachShadow(x)},onStylesheetLoad:(x,X)=>{de.attachLinkElement(x,X)},onBlockedImageLoad:(x,X,{width:Q,height:N})=>{Ce({adds:[],removes:[],texts:[],attributes:[{id:X.id,attributes:{style:{width:`${Q}px`,height:`${N}px`}}}]})},keepIframeSrcFn:Y});if(!te)return console.warn("Failed to snapshot the document");W({type:M.FullSnapshot,data:{node:te,initialOffset:Fr(window)}}),ve.forEach(x=>x.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&de.adoptStyleSheets(document.adoptedStyleSheets,re.getId(document))};Je=ut;try{const A=[],te=X=>{var Q;return D(hi)({onMutation:ee,mutationCb:Ce,mousemoveCb:(N,dt)=>W({type:M.IncrementalSnapshot,data:{source:dt,positions:N}}),mouseInteractionCb:N=>W({type:M.IncrementalSnapshot,data:{source:E.MouseInteraction,...N}}),scrollCb:qt,viewportResizeCb:N=>W({type:M.IncrementalSnapshot,data:{source:E.ViewportResize,...N}}),inputCb:N=>W({type:M.IncrementalSnapshot,data:{source:E.Input,...N}}),mediaInteractionCb:N=>W({type:M.IncrementalSnapshot,data:{source:E.MediaInteraction,...N}}),styleSheetRuleCb:N=>W({type:M.IncrementalSnapshot,data:{source:E.StyleSheetRule,...N}}),styleDeclarationCb:N=>W({type:M.IncrementalSnapshot,data:{source:E.StyleDeclaration,...N}}),canvasMutationCb:Sn,fontCb:N=>W({type:M.IncrementalSnapshot,data:{source:E.Font,...N}}),selectionCb:N=>{W({type:M.IncrementalSnapshot,data:{source:E.Selection,...N}})},customElementCb:N=>{W({type:M.IncrementalSnapshot,data:{source:E.CustomElement,...N}})},blockClass:s,ignoreClass:c,ignoreSelector:a,maskAllText:l,maskTextClass:d,unmaskTextClass:u,maskTextSelector:h,unmaskTextSelector:p,maskInputOptions:st,inlineStylesheet:f,sampling:T,recordDOM:b,recordCanvas:P,inlineImages:q,userTriggeredOnInput:j,collectFonts:J,doc:X,maskAttributeFn:k,maskInputFn:L,maskTextFn:O,keepIframeSrcFn:Y,blockSelector:i,unblockSelector:o,slimDOMOptions:it,dataURLOptions:R,mirror:re,iframeManager:he,stylesheetManager:de,shadowDomManager:Ue,processedNodeManager:ct,canvasManager:lt,ignoreCSSAttributes:z,plugins:((Q=C==null?void 0:C.filter(N=>N.observer))==null?void 0:Q.map(N=>({observer:N.observer,options:N.options,callback:dt=>W({type:M.Plugin,data:{plugin:N.name,payload:dt}})})))||[]},{})};he.addLoadListener(X=>{try{A.push(te(X.contentDocument))}catch(Q){console.warn(Q)}});const x=()=>{ut(),A.push(te(document))};return document.readyState==="interactive"||document.readyState==="complete"?x():(A.push(V("DOMContentLoaded",()=>{W({type:M.DomContentLoaded,data:{}}),$==="DOMContentLoaded"&&x()})),A.push(V("load",()=>{W({type:M.Load,data:{}}),$==="load"&&x()},window))),()=>{A.forEach(X=>X()),ct.destroy(),Je=void 0,ei()}}catch(A){console.warn(A)}}function wi(e){if(!Je)throw new Error("please take full snapshot after start recording");Je(e)}oe.mirror=re;oe.takeFullSnapshot=wi;function vi(e,t){try{return e?e(t):new dr}catch{return console.warn("Unable to initialize CanvasManager"),new dr}}var hr;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(hr||(hr={}));const bi=3,Ei=5;function Lt(e){return e>9999999999?e:e*1e3}function pt(e){return e>9999999999?e/1e3:e}function Be(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:M.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Ir(t,10,1e3)}}),t.category==="console")))}const ki="button,a";function Gr(e){return e.closest(ki)||e}function Qr(e){const t=Zr(e);return!t||!(t instanceof Element)?t:Gr(t)}function Zr(e){return Ii(e)?e.target:e}function Ii(e){return typeof e=="object"&&!!e&&"target"in e}let le;function Ci(e){return le||(le=[],Mi()),le.push(e),()=>{const t=le?le.indexOf(e):-1;t>-1&&le.splice(t,1)}}function Mi(){Tn(U,"open",function(e){return function(...t){if(le)try{le.forEach(r=>r())}catch{}return e.apply(U,t)}})}const Ri=new Set([E.Mutation,E.StyleSheetRule,E.StyleDeclaration,E.AdoptedStyleSheet,E.CanvasMutation,E.Selection,E.MediaInteraction]);function Ti(e,t,r){e.handleClick(t,r)}class xi{constructor(t,r,n=Be){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=r.timeout/1e3,this._threshold=r.threshold/1e3,this._scrollTimeout=r.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=r.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const t=Ci(()=>{this._lastMutation=fr()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,r){if(Di(r,this._ignoreSelector)||!Ai(t))return;const n={timestamp:pt(t.timestamp),clickBreadcrumb:t,clickCount:0,node:r};this._clicks.some(s=>s.node===n.node&&Math.abs(s.timestamp-n.timestamp)<1)||(this._clicks.push(n),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=pt(t)}registerScroll(t=Date.now()){this._lastScroll=pt(t)}registerClick(t){const r=Gr(t);this._handleMultiClick(r)}_handleMultiClick(t){this._getClicks(t).forEach(r=>{r.clickCount++})}_getClicks(t){return this._clicks.filter(r=>r.node===t)}_checkClicks(){const t=[],r=fr();this._clicks.forEach(n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=r&&t.push(n)});for(const n of t){const s=this._clicks.indexOf(n);s>-1&&(this._generateBreadcrumbs(n),this._clicks.splice(s,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const r=this._replay,n=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,s=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!n&&!s,{clickCount:o,clickBreadcrumb:c}=t;if(i){const a=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,l=a<this._timeout*1e3?"mutation":"timeout",d={type:"default",message:c.message,timestamp:c.timestamp,category:"ui.slowClickDetected",data:{...c.data,url:U.location.href,route:r.getCurrentRoute(),timeAfterClickMs:a,endReason:l,clickCount:o||1}};this._addBreadcrumbEvent(r,d);return}if(o>1){const a={type:"default",message:c.message,timestamp:c.timestamp,category:"ui.multiClick",data:{...c.data,url:U.location.href,route:r.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(r,a)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Le(()=>this._checkClicks(),1e3)}}const Oi=["A","BUTTON","INPUT"];function Di(e,t){return!!(!Oi.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function Ai(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function fr(){return Date.now()/1e3}function Ni(e,t){try{if(!Li(t))return;const{source:r}=t.data;if(Ri.has(r)&&e.registerMutation(t.timestamp),r===E.Scroll&&e.registerScroll(t.timestamp),Pi(t)){const{type:n,id:s}=t.data,i=oe.mirror.getNode(s);i instanceof HTMLElement&&n===K.Click&&e.registerClick(i)}}catch{}}function Li(e){return e.type===bi}function Pi(e){return e.data.source===E.MouseInteraction}function se(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var Pt=(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))(Pt||{});const Bi=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Fi(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const r in e)if(Bi.has(r)){let n=r;
3(r==="data-testid"||r==="data-test-id")&&(n="testId"),t[n]=e[r]}return t}const Ui=e=>t=>{if(!e.isEnabled())return;const r=zi(t);if(!r)return;const n=t.name==="click",s=n?t.event:void 0;n&&e.clickDetector&&(s!=null&&s.target)&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&Ti(e.clickDetector,r,Qr(t.event)),Be(e,r)};function en(e,t){const r=oe.mirror.getId(e),n=r&&oe.mirror.getNode(r),s=n&&oe.mirror.getMeta(n),i=s&&Hi(s)?s:null;return{message:t,data:i?{nodeId:r,node:{id:r,tagName:i.tagName,textContent:Array.from(i.childNodes).map(o=>o.type===Pt.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:Fi(i.attributes)}}:{}}}function zi(e){const{target:t,message:r}=Wi(e);return se({category:`ui.${e.name}`,...en(t,r)})}function Wi(e){const t=e.name==="click";let r,n=null;try{n=t?Qr(e.event):Zr(e.event),r=Cr(n,{maxStringLength:200})||"<unknown>"}catch{r="<unknown>"}return{target:n,message:r}}function Hi(e){return e.type===Pt.Element}function $i(e,t){if(!e.isEnabled())return;e.updateUserActivity();const r=ji(t);r&&Be(e,r)}function ji(e){const{metaKey:t,shiftKey:r,ctrlKey:n,altKey:s,key:i,target:o}=e;if(!o||qi(o)||!i)return null;const c=t||n||s,a=i.length===1;if(!c&&a)return null;const l=Cr(o,{maxStringLength:200})||"<unknown>",d=en(o,l);return se({category:"ui.keyDown",message:l,data:{...d.data,metaKey:t,shiftKey:r,ctrlKey:n,altKey:s,key:i}})}function qi(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const Ki={resource:Gi,paint:Xi,navigation:Ji};function mt(e,t){return({metric:r})=>void t.replayPerformanceEntries.push(e(r))}function Vi(e){return e.map(Yi).filter(Boolean)}function Yi(e){const t=Ki[e.entryType];return t?t(e):null}function ke(e){return((Bn()||U.performance.timeOrigin)+e)/1e3}function Xi(e){const{duration:t,entryType:r,name:n,startTime:s}=e,i=ke(s);return{type:r,name:n,start:i,end:i+t,data:void 0}}function Ji(e){const{entryType:t,name:r,decodedBodySize:n,duration:s,domComplete:i,encodedBodySize:o,domContentLoadedEventStart:c,domContentLoadedEventEnd:a,domInteractive:l,loadEventStart:d,loadEventEnd:u,redirectCount:h,startTime:p,transferSize:f,type:m}=e;return s===0?null:{type:`${t}.${m}`,start:ke(p),end:ke(i),name:r,data:{size:f,decodedBodySize:n,encodedBodySize:o,duration:s,domInteractive:l,domContentLoadedEventStart:c,domContentLoadedEventEnd:a,loadEventStart:d,loadEventEnd:u,domComplete:i,redirectCount:h}}}function Gi(e){const{entryType:t,initiatorType:r,name:n,responseEnd:s,startTime:i,decodedBodySize:o,encodedBodySize:c,responseStatus:a,transferSize:l}=e;return["fetch","xmlhttprequest"].includes(r)?null:{type:`${t}.${r}`,start:ke(i),end:ke(s),name:n,data:{size:l,statusCode:a,decodedBodySize:o,encodedBodySize:c}}}function Qi(e){const t=e.entries[e.entries.length-1],r=t!=null&&t.element?[t.element]:void 0;return Bt(e,"largest-contentful-paint",r)}function Zi(e){return e.sources!==void 0}function eo(e){const t=[],r=[];for(const n of e.entries)if(Zi(n)){const s=[];for(const i of n.sources)if(i.node){r.push(i.node);const o=oe.mirror.getId(i.node);o&&s.push(o)}t.push({value:n.value,nodeIds:s.length?s:void 0})}return Bt(e,"cumulative-layout-shift",r,t)}function to(e){const t=e.entries[e.entries.length-1],r=t!=null&&t.target?[t.target]:void 0;return Bt(e,"interaction-to-next-paint",r)}function Bt(e,t,r,n){const s=e.value,i=e.rating,o=ke(s);return{type:"web-vital",name:t,start:o,end:o,data:{value:s,size:s,rating:i,nodeIds:r?r.map(c=>oe.mirror.getId(c)):void 0,attributions:n}}}function ro(e){function t(s){e.performanceEntries.includes(s)||e.performanceEntries.push(s)}function r({entries:s}){s.forEach(t)}const n=[];return["navigation","paint","resource"].forEach(s=>{n.push(qn(s,r))}),n.push(Kn(mt(Qi,e)),Vn(mt(eo,e)),Yn(mt(to,e))),()=>{n.forEach(s=>s())}}const w=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,no='
vendor: 10,329 bytes, line 3
3var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});
3';function so(){const e=new Blob([no]);return URL.createObjectURL(e)}const pr=["log","warn","error"],je="[Replay] ";function gt(e,t="info"){Wn({category:"console",data:{logger:"replay"},level:t,message:`${je}${e}`},{level:t})}function io(){let e=!1,t=!1;const r={exception:()=>{},infoTick:()=>{},setConfig:n=>{e=!!n.captureExceptions,t=!!n.traceInternals}};return w?(pr.forEach(n=>{r[n]=(...s)=>{ht[n](je,...s),t&&gt(s.join(""),Hn(n))}}),r.exception=(n,...s)=>{s.length&&r.error&&r.error(...s),ht.error(je,n),e?zn(n):t&&gt(n,"error")},r.infoTick=(...n)=>{ht.log(je,...n),t&&setTimeout(()=>gt(n[0]),0)}):pr.forEach(n=>{r[n]=()=>{}}),r}const v=io();class Ft extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Tt}.`)}}class tn{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(t){const r=JSON.stringify(t).length;if(this._totalSize+=r,this._totalSize>Tt)throw new Ft;this.events.push(t)}finish(){return new Promise(t=>{const r=this.events;this.clear(),t(JSON.stringify(r))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(r=>r.timestamp).sort()[0];return t?Lt(t):null}}class oo{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,r)=>{this._worker.addEventListener("message",({data:n})=>{n.success?t():r()},{once:!0}),this._worker.addEventListener("error",n=>{r(n)},{once:!0})}),this._ensureReadyPromise)}destroy(){w&&v.log("Destroying compression worker"),this._worker.terminate()}postMessage(t,r){const n=this._getAndIncrementId();return new Promise((s,i)=>{const o=({data:c})=>{const a=c;if(a.method===t&&a.id===n){if(this._worker.removeEventListener("message",o),!a.success){w&&v.error("Error in compression worker: ",a.response),i(new Error("Error in compression worker"));return}s(a.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:n,method:t,arg:r})})}_getAndIncrementId(){return this._id++}}class ao{constructor(t){this._worker=new oo(t),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()}addEvent(t){const r=Lt(t.timestamp);(!this._earliestTimestamp||r<this._earliestTimestamp)&&(this._earliestTimestamp=r);const n=JSON.stringify(t);return this._totalSize+=n.length,this._totalSize>Tt?Promise.reject(new Ft):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{w&&v.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class co{constructor(t){this._fallback=new tn,this._compression=new ao(t),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(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){w&&v.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:r,waitForCheckout:n}=this._fallback,s=[];for(const i of t)s.push(this._compression.addEvent(i));this._compression.hasCheckout=r,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(s),this._fallback.clear()}catch(i){w&&v.exception(i,"Failed to add events when switching buffers.")}}}function lo({useCompression:e,workerUrl:t}){if(e&&window.Worker){const r=uo(t);if(r)return r}return w&&v.log("Using simple buffer"),new tn}function uo(e){try{const t=e||ho();if(!t)return;w&&v.log(`Using compression worker${e?` from ${e}`:""}`);const r=new Worker(t);return new co(r)}catch(t){w&&v.exception(t,"Failed to create compression worker")}}function ho(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?so():""}function Ut(){try{return"sessionStorage"in U&&!!U.sessionStorage}catch{return!1}}function fo(e){po(),e.session=void 0}function po(){if(Ut())try{U.sessionStorage.removeItem(Mt)}catch{}}function rn(e){return e===void 0?!1:Math.random()<e}function zt(e){if(Ut())try{U.sessionStorage.setItem(Mt,JSON.stringify(e))}catch{}}function nn(e){const t=Date.now(),r=e.id||xn(),n=e.started||t,s=e.lastActivity||t,i=e.segmentId||0,o=e.sampled,c=e.previousSessionId;return{id:r,started:n,lastActivity:s,segmentId:i,sampled:o,previousSessionId:c}}function mo(e,t){return rn(e)?"session":t?"buffer":!1}function mr({sessionSampleRate:e,allowBuffering:t,stickySession:r=!1},{previousSessionId:n}={}
3){const s=mo(e,t),i=nn({sampled:s,previousSessionId:n});return r&&zt(i),i}function go(){if(!Ut())return null;try{const e=U.sessionStorage.getItem(Mt);if(!e)return null;const t=JSON.parse(e);return w&&v.infoTick("Loading existing session"),nn(t)}catch{return null}}function kt(e,t,r=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=r}function sn(e,{maxReplayDuration:t,sessionIdleExpire:r,targetTime:n=Date.now()}){return kt(e.started,t,n)||kt(e.lastActivity,r,n)}function on(e,{sessionIdleExpire:t,maxReplayDuration:r}){return!(!sn(e,{sessionIdleExpire:t,maxReplayDuration:r})||e.sampled==="buffer"&&e.segmentId===0)}function yt({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:r},n){const s=n.stickySession&&go();return s?on(s,{sessionIdleExpire:e,maxReplayDuration:t})?(w&&v.infoTick("Session in sessionStorage is expired, creating new one..."),mr(n,{previousSessionId:s.id})):s:(w&&v.infoTick("Creating new session"),mr(n,{previousSessionId:r}))}function yo(e){return e.type===M.Custom}function Wt(e,t,r){return cn(e,t)?(an(e,t,r),!0):!1}function So(e,t,r){return cn(e,t)?an(e,t,r):Promise.resolve(null)}async function an(e,t,r){const{eventBuffer:n}=e;if(!n||n.waitForCheckout&&!r)return null;const s=e.recordingMode==="buffer";try{r&&s&&n.clear(),r&&(n.hasCheckout=!0,n.waitForCheckout=!1);const i=e.getOptions(),o=_o(t,i.beforeAddRecordingEvent);return o?await n.addEvent(o):void 0}catch(i){const o=i&&i instanceof Ft,c=o?"addEventSizeExceeded":"addEvent";if(o&&s)return n.clear(),n.waitForCheckout=!0,null;e.handleException(i),await e.stop({reason:c});const a=pe();a&&a.recordDroppedEvent("internal_sdk_error","replay")}}function cn(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const r=Lt(t.timestamp);return r+e.timeouts.sessionIdlePause<Date.now()?!1:r>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(w&&v.infoTick(`Skipping event with timestamp ${r} because it is after maxReplayDuration`),!1):!0}function _o(e,t){try{if(typeof t=="function"&&yo(e))return t(e)}catch(r){return w&&v.exception(r,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function Ht(e){return!e.type}function It(e){return e.type==="transaction"}function wo(e){return e.type==="replay_event"}function gr(e){return e.type==="feedback"}function vo(e){return(t,r)=>{if(!e.isEnabled()||!Ht(t)&&!It(t))return;const n=r==null?void 0:r.statusCode;if(!(!n||n<200||n>=300)){if(It(t)){bo(e,t);return}Eo(e,t)}}}function bo(e,t){var n,s;const r=e.getContext();(s=(n=t.contexts)==null?void 0:n.trace)!=null&&s.trace_id&&r.traceIds.size<100&&r.traceIds.add(t.contexts.trace.trace_id)}function Eo(e,t){const r=e.getContext();if(t.event_id&&r.errorIds.size<100&&r.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:n}=e.getOptions();typeof n=="function"&&!n(t)||Le(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(s){e.handleException(s)}})}function ko(e){return t=>{!e.isEnabled()||!Ht(t)||Io(e,t)}}function Io(e,t){var n,s,i;const r=(i=(s=(n=t.exception)==null?void 0:n.values)==null?void 0:s[0])==null?void 0:i.value;if(typeof r=="string"&&(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))){const o=se({category:"replay.hydrate-error",data:{url:On()}});Be(e,o)}}function Co(e){const t=pe();t&&t.on("beforeAddBreadcrumb",r=>Mo(e,r))}function Mo(e,t){if(!e.isEnabled()||!ln(t))return;const r=Ro(t);r&&Be(e,r)}function Ro(e){return!ln(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?To(e):se(e)}function To(e){var s;const t=(s=e.data)==null?void 0:s.arguments;if(!Array.isArray(t)||t.length===0)return se(e);let r=!1;const n=t.map(i=>{if(!i)return i;if(typeof i=="string")return i.length>ze?(r=!0,`${i.slice(0,ze)}…`):i;if(typeof i=="object")try{const o=Ir(i,7);return JSON.stringify(o).length>ze?(r=!0,`${JSON.stringify(o,null,2).slice(0,ze)}…`):o}catch{}return i});return se({...e,data:{...e.data,arguments:n,...r?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function ln(e){return!!e.category}function xo(e,t){var r,n,s;return e.type||!((n=(r=e.exception)==null?void 0:r.values)!=null&&n.length)?!1:!!((s=t.originalException)!=null&&s.__rrweb__)}function un(){const e=kr().getPropagationContext().dsc;e&&delete e.replay_id;const t=Er();if(t){const r=kn(t);delete r.replay_id}}function Oo(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:M.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function Do(e,t){return e.recordingMode!=="buffer"||t.message===Rt||!t.exception||t.type?!1:rn(e.getOptions().errorSampleRate)}function Ao(e){return Object.assign((t,r)=>
3!e.isEnabled()||e.isPaused()?t:wo(t)?(delete t.breadcrumbs,t):!Ht(t)&&!It(t)&&!gr(t)?t:e.checkAndHandleExpiredSession()?gr(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),Oo(e,t),t):xo(t,r)&&!e.getOptions()._experiments.captureExceptions?(w&&v.log("Ignoring error from rrweb internals",t),null):((Do(e,t)||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),t):(un(),t),{id:"Replay"})}function rt(e,t){return t.map(({type:r,start:n,end:s,name:i,data:o})=>{const c=e.throttledAddEvent({type:M.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:r,description:i,startTimestamp:n,endTimestamp:s,data:o}}});return typeof c=="string"?Promise.resolve(null):c})}function No(e){const{from:t,to:r}=e,n=Date.now()/1e3;return{type:"navigation.push",start:n,end:n,name:r,data:{previous:t}}}function Lo(e){return t=>{if(!e.isEnabled())return;const r=No(t);r!==null&&(e.getContext().urls.push(r.name),e.triggerUserActivity(),e.addUpdate(()=>(rt(e,[r]),!1)))}}function Po(e,t){return w&&e.getOptions()._experiments.traceInternals?!1:Un(t,pe())}function dn(e,t){e.isEnabled()&&t!==null&&(Po(e,t.name)||e.addUpdate(()=>(rt(e,[t]),!0)))}function nt(e){if(!e)return;const t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const r=Xn(e);return t.encode(r).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function hn(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Ge(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const r={...e._meta},n=r.warnings||[];return r.warnings=[...n,t],e._meta=r,e}function fn(e,t){if(!t)return null;const{startTimestamp:r,endTimestamp:n,url:s,method:i,statusCode:o,request:c,response:a}=t;return{type:e,start:r/1e3,end:n/1e3,name:s,data:{method:i,statusCode:o,request:c,response:a}}}function Ne(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function ue(e,t,r){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!r)return{headers:e,size:t};const n={headers:e,size:t},{body:s,warnings:i}=Bo(r);return n.body=s,i!=null&&i.length&&(n._meta={warnings:i}),n}function Ct(e,t){return Object.entries(e).reduce((r,[n,s])=>{const i=n.toLowerCase();return t.includes(i)&&e[n]&&(r[i]=s),r},{})}function Bo(e){if(!e||typeof e!="string")return{body:e};const t=e.length>Jt,r=Fo(e);if(t){const n=e.slice(0,Jt);return r?{body:n,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${n}…`,warnings:["TEXT_TRUNCATED"]}}if(r)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function Fo(e){const t=e[0],r=e[e.length-1];return t==="["&&r==="]"||t==="{"&&r==="}"}function Qe(e,t){const r=Uo(e);return Fn(r,t)}function Uo(e,t=U.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(U.location.origin))return e;const r=new URL(e,t);if(r.origin!==new URL(t).origin)return e;const n=r.href;return!e.endsWith("/")&&n.endsWith("/")?n.slice(0,-1):n}async function zo(e,t,r){try{const n=await Ho(e,t,r),s=fn("resource.fetch",n);dn(r.replay,s)}catch(n){w&&v.exception(n,"Failed to capture fetch breadcrumb")}}function Wo(e,t){const{input:r,response:n}=t,s=r?Mr(r):void 0,i=nt(s),o=n?hn(n.headers.get("content-length")):void 0;i!==void 0&&(e.data.request_body_size=i),o!==void 0&&(e.data.response_body_size=o)}async function Ho(e,t,r){const n=Date.now(),{startTimestamp:s=n,endTimestamp:i=n}=t,{url:o,method:c,status_code:a=0,request_body_size:l,response_body_size:d}=e.data,u=Qe(o,r.networkDetailAllowUrls)&&!Qe(o,r.networkDetailDenyUrls),h=u?$o(r,t.input,l):Ne(l),p=await jo(u,r,t.response,d);return{startTimestamp:s,endTimestamp:i,url:o,method:c,statusCode:a,request:h,response:p}}function $o({networkCaptureBodies:e,networkRequestHeaders:t},r,n){const s=r?Vo(r,t):{};if(!e)return ue(s,n,void 0);const i=Mr(r),[o,c]=Rr(i,v),a=ue(s,n,o);return c?Ge(a,c):a}async function jo(e,{networkCaptureBodies:t,networkResponseHeaders:r},n,s){if(!e&&s!==void 0)return Ne(s);const i=n?pn(n.headers,r):{};if(!n||!t&&s!==void 0)return ue(i,s,void 0);const[o,c]=await Ko(n),a=qo(o,{networkCaptureBodies:t,responseBodySize:s,captureDetails:e,headers:i});return c?Ge(a,c):a}function qo(e,{networkCaptureBodies:t,responseBodySize:r,captureDetails:n,headers:s}){try{const i=e!=null&&e.length&&r===void 0?nt(e):r;return n?t?ue(s,i,e):ue(s,i,void 0):Ne(i)}catch(i){return w&&v.exception(i,"Failed to serialize response body"),ue(s,r,void 0)}}async function Ko(e){const t=Yo(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await Xo(t)]}catch(r){return r instanceof Error&&r.message.indexOf("Timeout")>-1?(w&&v.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(w&&v.exception(r,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function pn(e,t){const r={};return t.forEach(n=>{e.get(n)&&(r[n]=e.get(n))}),r}
3function Vo(e,t){return e.length===1&&typeof e[0]!="string"?yr(e[0],t):e.length===2?yr(e[1],t):{}}function yr(e,t){if(!e)return{};const r=e.headers;return r?r instanceof Headers?pn(r,t):Array.isArray(r)?{}:Ct(r,t):{}}function Yo(e){try{return e.clone()}catch(t){w&&v.exception(t,"Failed to clone response body")}}function Xo(e){return new Promise((t,r)=>{const n=Le(()=>r(new Error("Timeout while trying to read response body")),500);Jo(e).then(s=>t(s),s=>r(s)).finally(()=>clearTimeout(n))})}async function Jo(e){return await e.text()}async function Go(e,t,r){try{const n=Zo(e,t,r),s=fn("resource.xhr",n);dn(r.replay,s)}catch(n){w&&v.exception(n,"Failed to capture xhr breadcrumb")}}function Qo(e,t){const{xhr:r,input:n}=t;if(!r)return;const s=nt(n),i=r.getResponseHeader("content-length")?hn(r.getResponseHeader("content-length")):na(r.response,r.responseType);s!==void 0&&(e.data.request_body_size=s),i!==void 0&&(e.data.response_body_size=i)}function Zo(e,t,r){const n=Date.now(),{startTimestamp:s=n,endTimestamp:i=n,input:o,xhr:c}=t,{url:a,method:l,status_code:d=0,request_body_size:u,response_body_size:h}=e.data;if(!a)return null;if(!c||!Qe(a,r.networkDetailAllowUrls)||Qe(a,r.networkDetailDenyUrls)){const S=Ne(u),T=Ne(h);return{startTimestamp:s,endTimestamp:i,url:a,method:l,statusCode:d,request:S,response:T}}const p=c[Jn],f=p?Ct(p.request_headers,r.networkRequestHeaders):{},m=Ct(ea(c),r.networkResponseHeaders),[_,y]=r.networkCaptureBodies?Rr(o,v):[void 0],[k,L]=r.networkCaptureBodies?ta(c):[void 0],O=ue(f,u,_),I=ue(m,h,k);return{startTimestamp:s,endTimestamp:i,url:a,method:l,statusCode:d,request:y?Ge(O,y):O,response:L?Ge(I,L):I}}function ea(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
4`).reduce((r,n)=>{const[s,i]=n.split(": ");return i&&(r[s.toLowerCase()]=i),r},{}):{}}function ta(e){const t=[];try{return[e.responseText]}catch(r){t.push(r)}try{return ra(e.response,e.responseType)}catch(r){t.push(r)}return w&&v.warn("Failed to get xhr response body",...t),[void 0]}function ra(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch(r){return w&&v.exception(r,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return w&&v.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function na(e,t){try{const r=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return nt(r)}catch{return}}function sa(e){const t=pe();try{const{networkDetailAllowUrls:r,networkDetailDenyUrls:n,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o}=e.getOptions(),c={replay:e,networkDetailAllowUrls:r,networkDetailDenyUrls:n,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o};t&&t.on("beforeAddBreadcrumb",(a,l)=>ia(c,a,l))}catch{}}function ia(e,t,r){if(t.data)try{oa(t)&&ca(r)&&(Qo(t,r),Go(t,r,e)),aa(t)&&la(r)&&(Wo(t,r),zo(t,r,e))}catch(n){w&&v.exception(n,"Error when enriching network breadcrumb")}}function oa(e){return e.category==="xhr"}function aa(e){return e.category==="fetch"}function ca(e){return e==null?void 0:e.xhr}function la(e){return e==null?void 0:e.response}function ua(e){const t=pe();$n(Ui(e)),jn(Lo(e)),Co(e),sa(e);const r=Ao(e);In(r),t&&(t.on("beforeSendEvent",ko(e)),t.on("afterSendEvent",vo(e)),t.on("createDsc",n=>{const s=e.getSessionId();s&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(n.replay_id=s)}),t.on("spanStart",n=>{e.lastActiveSpan=n}),t.on("spanEnd",n=>{e.lastActiveSpan=n}),t.on("beforeSendFeedback",async(n,s)=>{var o;const i=e.getSessionId();s!=null&&s.includeReplay&&e.isEnabled()&&i&&((o=n.contexts)!=null&&o.feedback)&&(n.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),n.contexts.feedback.replay_id=i)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function da(e){try{return Promise.all(rt(e,[ha(U.performance.memory)]))}catch{return[]}}function ha(e){const{jsHeapSizeLimit:t,totalJSHeapSize:r,usedJSHeapSize:n}=e,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:r,usedJSHeapSize:n}}}}function fa(e,t,r){return En(e,t,{...r,setTimeoutImpl:Le})}const Z=br.navigator;function pa(){return/iPhone|iPad|iPod/i.test((Z==null?void 0:Z.userAgent)??"")||/Macintosh/i.test((Z==null?void 0:Z.userAgent)??"")&&(Z!=null&&Z.maxTouchPoints)&&(Z==null?void 0:Z.maxTouchPoints)>1?{sampling:{mousemove:!1}}:{}}function ma(e){let t=!1;return(r,n)=>{if(!e.checkAndHandleExpiredSession()){w&&v.warn("Received replay event after session expired.");return}const s=n||!t;t=!0,e.clickDetector&&Ni(e.clickDetector,r),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&s&&e.setInitialState(),!Wt(e,r,s))return!0;
4if(!s)return!1;const i=e.session;if(ya(e,s),e.recordingMode==="buffer"&&i&&e.eventBuffer){const o=e.eventBuffer.getEarliestTimestamp();o&&(w&&v.log(`Updating session start time to earliest event in buffer to ${new Date(o)}`),i.started=o,e.getOptions().stickySession&&zt(i))}return i!=null&&i.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function ga(e){const t=e.getOptions();return{type:M.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?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function ya(e,t){!t||!e.session||e.session.segmentId!==0||Wt(e,ga(e),!1)}function Sa(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function _a(e,t,r,n){return Nn(Ln(e,Pn(e),n,r),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function wa({recordingData:e,headers:t}){let r;const n=`${JSON.stringify(t)}
5`;if(typeof e=="string")r=`${n}${e}`;else{const i=new TextEncoder().encode(n);r=new Uint8Array(i.length+e.length),r.set(i),r.set(e,i.length)}return r}async function va({client:e,scope:t,replayId:r,event:n}){const s=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,i={event_id:r,integrations:s};e.emit("preprocessEvent",n,i);const o=await Dn(e.getOptions(),n,i,t,e,An());if(!o)return null;e.emit("postprocessEvent",o,i),o.platform=o.platform||"javascript";const c=e.getSdkMetadata(),{name:a,version:l,settings:d}=(c==null?void 0:c.sdk)||{};return o.sdk={...o.sdk,name:a||"sentry.javascript.unknown",version:l||"0.0.0",settings:d},o}async function ba({recordingData:e,replayId:t,segmentId:r,eventContext:n,timestamp:s,session:i}){const o=wa({recordingData:e,headers:{segment_id:r}}),{urls:c,errorIds:a,traceIds:l,initialTimestamp:d}=n,u=pe(),h=kr(),p=u==null?void 0:u.getTransport(),f=u==null?void 0:u.getDsn();if(!u||!p||!f||!i.sampled)return Xt({});const m={type:Gn,replay_start_timestamp:d/1e3,timestamp:s/1e3,error_ids:a,trace_ids:l,urls:c,replay_id:t,segment_id:r,replay_type:i.sampled},_=await va({scope:h,client:u,replayId:t,event:m});if(!_)return u.recordDroppedEvent("event_processor","replay"),w&&v.log("An event processor returned `null`, will not send event."),Xt({});delete _.sdkProcessingMetadata;const y=_a(_,o,f,u.getOptions().tunnel);let k;try{k=await p.send(y)}catch(O){const I=new Error(Rt);try{I.cause=O}catch{}throw I}if(typeof k.statusCode=="number"&&(k.statusCode<200||k.statusCode>=300))throw new mn(k.statusCode);const L=Mn({},k);if(Rn(L,"replay"))throw new $t(L);return k}class mn extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class $t extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function gn(e,t={count:0,interval:ns}){const{recordingData:r,onError:n}=e;if(r.length)try{return await ba(e),!0}catch(s){if(s instanceof mn||s instanceof $t)throw s;if(Cn("Replays",{_retryCount:t.count}),n&&n(s),t.count>=ss){const i=new Error(`${Rt} - max retries exceeded`);try{i.cause=s}catch{}throw i}return t.interval*=++t.count,new Promise((i,o)=>{Le(async()=>{try{await gn(e,t),i(!0)}catch(c){o(c)}},t.interval)})}}const yn="__THROTTLED",Ea="__SKIPPED";function ka(e,t,r){const n=new Map,s=c=>{const a=c-r;n.forEach((l,d)=>{d<a&&n.delete(d)})},i=()=>[...n.values()].reduce((c,a)=>c+a,0);let o=!1;return(...c)=>{const a=Math.floor(Date.now()/1e3);if(s(a),i()>=t){const d=o;return o=!0,d?Ea:yn}o=!1;const l=n.get(a)||0;return n.set(a,l+1),e(...c)}}class Ia{constructor({options:t,recordingOptions:r}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:Qn,sessionIdleExpire:Zn},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=r,this._options=t,this._debouncedFlush=fa(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=ka((o,c)=>So(this,o,c),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:s}=this.getOptions(),i=n?{threshold:Math.min(is,n),timeout:n,scrollTimeout:os,ignoreSelector:s?s.join(","):""}:void 0;if(i&&(this.clickDetector=new xi(this,i)),w){const o=t._experiments;v.setConfig({captureExceptions:!!o.captureExceptions,traceInternals:!!o.traceInternals})}this._handleVisibilityChange=()=>{U.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroun
5dTasks()},this._handleWindowBlur=()=>{const o=se({category:"ui.blur"});this._doChangeToBackgroundTasks(o)},this._handleWindowFocus=()=>{const o=se({category:"ui.focus"});this._doChangeToForegroundTasks(o)},this._handleKeyboardEvent=o=>{$i(this,o)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){w&&v.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:r,sessionSampleRate:n}=this._options,s=r<=0&&n<=0;if(this._requiresManualStart=s,!s){if(this._initializeSessionForSampling(t),!this.session){w&&v.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",w&&v.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){w&&v.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){w&&v.log("Buffering is in progress, call `flush()` to save the replay");return}w&&v.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=yt({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){w&&v.log("Buffering is in progress, call `flush()` to save the replay");return}w&&v.infoTick("Starting replay in buffer mode");const t=yt({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=oe({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:rs}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:ma(this),...pa(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:r}={}){var n;if(this._isEnabled){this._isEnabled=!1,this.recordingMode="buffer";try{w&&v.log(`Stopping Replay${r?` triggered by ${r}`:""}`),un(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),(n=this.eventBuffer)==null||n.destroy(),this.eventBuffer=null,fo(this)}catch(s){this.handleException(s)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),w&&v.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),w&&v.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const r=Date.now();w&&v.log("Converting buffer to session"),await this.flushImmediate();const n=this.stopRecording();!t||!n||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(r),this._updateSessionActivity(r),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const r=t();this.recordingMode==="buffer"||!this._isEnabled||r!==!0&&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 this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){var t;return(t=this.session)==null?void 0:t.id}
5checkAndHandleExpiredSession(){if(this._lastActivity&&kt(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${U.location.pathname}${U.location.hash}${U.location.search}`,r=`${U.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=r,this._context.initialTimestamp=Date.now(),this._context.urls.push(r)}throttledAddEvent(t,r){const n=this._throttledAddEvent(t,r);if(n===yn){const s=se({category:"replay.throttled"});this.addUpdate(()=>!Wt(this,{type:Ei,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return n}getCurrentRoute(){const t=this.lastActiveSpan||Er(),r=t&&vn(t),s=(r&&Yt(r).data||{})[bn];if(!(!r||!s||!["route","custom"].includes(s)))return Yt(r).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=lo({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(t){const r=this._options.errorSampleRate>0,n=yt({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:r});this.session=n}_checkSession(){if(!this.session)return!1;const t=this.session;return on(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{U.document.addEventListener("visibilitychange",this._handleVisibilityChange),U.addEventListener("blur",this._handleWindowBlur),U.addEventListener("focus",this._handleWindowFocus),U.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(ua(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=ro(this)}_removeListeners(){try{U.document.removeEventListener("visibilitychange",this._handleVisibilityChange),U.removeEventListener("blur",this._handleWindowBlur),U.removeEventListener("focus",this._handleWindowFocus),U.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||sn(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){w&&v.log("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:M.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=Vi(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const r=this._context.initialTimestamp/1e3;t=t.filter(n=>n.start>=r)}return Promise.all(rt(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:r}=this;if(!t||!r||this._requiresManualStart||t.segmentId)return;const n=r.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}
5_popEventContext(){const t={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(),t}async _runFlush(){var r;const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){w&&v.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!((r=this.eventBuffer)!=null&&r.hasEvents)&&(await da(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const s=this._popEventContext(),i=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await gn({replayId:t,recordingData:o,segmentId:i,eventContext:s,session:this.session,timestamp:n,onError:c=>this.handleException(c)})}catch(n){this.handleException(n),this.stop({reason:"sendReplay"});const s=pe();if(s){const i=n instanceof $t?"ratelimit_backoff":"send_error";s.recordDroppedEvent(i,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){w&&v.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const r=this.session.started,s=Date.now()-r;this._debouncedFlush.cancel();const i=s<this._options.minReplayDuration,o=s>this._options.maxReplayDuration+5e3;if(i||o){w&&v.log(`Session duration (${Math.floor(s/1e3)}s) is too ${i?"short":"long"}, not sending replay.`),i&&this._debouncedFlush();return}const c=this.eventBuffer;c&&this.session.segmentId===0&&!c.hasCheckout&&w&&v.log("Flushing initial segment without checkout.");const a=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(l){this.handleException(l)}finally{this._flushLock=void 0,a&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&zt(this.session)}_onMutationHandler(t){const{ignoreMutations:r}=this._options._experiments;if(r!=null&&r.length&&t.some(c=>{const a=Sa(c.target),l=r.join(",");return a==null?void 0:a.matches(l)}))return!1;const n=t.length,s=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,o=s&&n>s;if(n>i||o){const c=se({category:"replay.mutations",data:{count:n,limit:o}});this._createCustomBreadcrumb(c)}return o?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function Me(e,t){return[...e,...t].join(",")}function Ca({mask:e,unmask:t,block:r,unblock:n,ignore:s}){const i=["base","iframe[srcdoc]:not([src])"],o=Me(e,[".sentry-mask","[data-sentry-mask]"]),c=Me(t,[]);return{maskTextSelector:o,unmaskTextSelector:c,blockSelector:Me(r,[".sentry-block","[data-sentry-block]",...i]),unblockSelector:Me(n,[]),ignoreSelector:Me(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function Ma({el:e,key:t,maskAttributes:r,maskAllText:n,privacyOptions:s,value:i}){return!n||s.unmaskTextSelector&&e.matches(s.unmaskTextSelector)?i:r.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i}const Sr='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Ra=["content-length","content-type","accept"];let _r=!1;const Aa=e=>new Ta(e);class Ta{constructor({flushMinDelay:t=es,flushMaxDelay:r=ts,minReplayDuration:n=as,maxReplayDuration:s=Gt,stickySession:i=!0,useCompression:o=!0,workerUrl:c,_experiments:a={},maskAllText:l=!0,maskAllInputs:d=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:h=750,mutationLimit:p=1e4,slowClickTimeout:f=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:_=[],networkDetailDenyUrls:y=[],networkCaptureBodies:k=!0,networkRequestHeaders:L=[],networkResponseHeaders:O=[],mask:I=[],maskAttributes:S=["title","placeholder","aria-label"],unmask:T=[],block:R=[],unblock:g=[],ignore:b=[],maskFn:P,beforeAddRecordingEvent:B,beforeErrorSampling:$,onError:j}={}){this.name="Replay";const J=Ca({mask:I,unmask:T,block:R,unblock:g,ignore:b});if(this._recordingOptions={maskAllInputs:d,maskAllText:l,maskInputOptions:{password:!0},maskTextFn:P,maskInputFn:P,maskAttributeFn:(q,C,Y)=>Ma({maskAttributes:S,maskAllText:l,privacyOptions:J,key:q,value:C,el:Y}),...J,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:q=>{try{q.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!a.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:r,minReplayDuration:Math.min(n,cs),maxReplayDuration:Math.min(s,Gt),stickySession:i,useCompression:o,workerUrl:c,blockAllMedia:u,maskAllInputs:d,maskAllText:l,mutationBreadcrumbLimit:h,mutationLimit:p,slowClickTimeout:f,slowClickIgnoreSelectors:m,networkDetailAllowUrls:_,networkDetailDenyUrls:y,networkCaptureBodies:k,networkRequestHeaders:wr(L),networkResponseHeaders:wr(O),beforeAddRecordingEvent:B,beforeErrorSampling:$,onError:j,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Sr}`:Sr),this._isInitialized&&Kt())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return _r}set _isInitialized(t){_r=t}afterAllSetup(t){!Kt()||this._replay||(this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}
5startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){var t;if((t=this._replay)!=null&&t.isEnabled())return this._replay.getSessionId()}getRecordingMode(){var t;if((t=this._replay)!=null&&t.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const r=xa(this._initialOptions,t);this._replay=new Ia({options:r,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const r=t.getIntegrationByName("ReplayCanvas");if(!r)return;this._replay._canvas=r.getOptions()}catch{}}}function xa(e,t){const r=t.getOptions(),n={sessionSampleRate:0,errorSampleRate:0,...e},s=Vt(r.replaysSessionSampleRate),i=Vt(r.replaysOnErrorSampleRate);return s==null&&i==null&&wn(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),s!=null&&(n.sessionSampleRate=s),i!=null&&(n.errorSampleRate=i),n}function wr(e){return[...Ra,...e.map(t=>t.toLowerCase())]}export{Aa as r};
6//# sourceMappingURL=_sentry-internal_replay-64N0ZuiD.js.map

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.