@epic-web/workshop-app 6.11.1 → 6.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -51,5 +51,5 @@ Error:`,c)}}function Zb(){return Cb(n=>{Jr("cls",{metric:n}),py=n},{reportAllCha
51
51
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
52
52
  or you can use record.mirror to access the mirror instance during recording.`;let hg={map:{},getId(){return console.error(gi),-1},getNode(){return console.error(gi),null},removeNodeFromMap(){console.error(gi)},has(){return console.error(gi),!1},reset(){console.error(gi)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(hg=new Proxy(hg,{get(n,i,l){return i==="map"&&console.error(gi),Reflect.get(n,i,l)}}));function Xr(n,i,l={}){let s=null,c=0;return function(...f){const h=Date.now();!c&&l.leading===!1&&(c=h);const g=i-(h-c),m=this;g<=0||g>i?(s&&(nM(s),s=null),c=h,n.apply(m,f)):!s&&l.trailing!==!1&&(s=$s(()=>{c=l.leading===!1?0:Date.now(),s=null,n.apply(m,f)},g))}}function By(n,i,l,s,c=window){const f=c.Object.getOwnPropertyDescriptor(n,i);return c.Object.defineProperty(n,i,s?l:{set(h){$s(()=>{l.set.call(this,h)},0),f&&f.set&&f.set.call(this,h)}}),()=>By(n,i,f||{},!0)}function Mf(n,i,l){try{if(!(i in n))return()=>{};const s=n[i],c=l(s);return typeof c=="function"&&(c.prototype=c.prototype||{},Object.defineProperties(c,{__rrweb_original__:{enumerable:!1,value:s}})),n[i]=c,()=>{n[i]=s}}catch{return()=>{}}}let Hs=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Hs=()=>new Date().getTime());function Hy(n){const i=n.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:n.pageXOffset!==void 0?n.pageXOffset:i?.documentElement.scrollLeft||i?.body?.parentElement?.scrollLeft||i?.body?.scrollLeft||0,top:i.scrollingElement?i.scrollingElement.scrollTop:n.pageYOffset!==void 0?n.pageYOffset:i?.documentElement.scrollTop||i?.body?.parentElement?.scrollTop||i?.body?.scrollTop||0}}function Iy(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function qy(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Yy(n){if(!n)return null;try{return n.nodeType===n.ELEMENT_NODE?n:n.parentElement}catch{return null}}function xe(n,i,l,s,c){if(!n)return!1;const f=Yy(n);if(!f)return!1;const h=_i(i,l);if(!c){const y=s&&f.matches(s);return h(f)&&!y}const g=ba(f,h);let m=-1;return g<0?!1:(s&&(m=ba(f,_i(null,s))),g>-1&&m<0?!0:g<m)}function JT(n,i){return i.getId(n)!==-1}function Oc(n,i){return i.getId(n)===jr}function Gy(n,i){if(Br(n))return!1;const l=i.getId(n);return i.has(l)?n.parentNode&&n.parentNode.nodeType===n.DOCUMENT_NODE?!1:n.parentNode?Gy(n.parentNode,i):!0:!0}function Fc(n){return!!n.changedTouches}function WT(n=window){"NodeList"in n&&!n.NodeList.prototype.forEach&&(n.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in n&&!n.DOMTokenList.prototype.forEach&&(n.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...i)=>{let l=i[0];if(!(0 in i))throw new TypeError("1 argument is required");do if(this===l)return!0;while(l=l&&l.parentNode);return!1})}function jy(n,i){return!!(n.nodeName==="IFRAME"&&i.getMeta(n))}function Xy(n,i){return!!(n.nodeName==="LINK"&&n.nodeType===n.ELEMENT_NODE&&n.getAttribute&&n.getAttribute("rel")==="stylesheet"&&i.getMeta(n))}function Jc(n){return!!n?.shadowRoot}class $T{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(i){return this.styleIDMap.get(i)??-1}has(i){return this.styleIDMap.has(i)}add(i,l){if(this.has(i))return this.getId(i);let s;return l===void 0?s=this.id++:s=l,this.styleIDMap.set(i,s),this.idStyleMap.set(s,i),s}getStyle(i){return this.idStyleMap.get(i)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Vy(n){let i=null;return n.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&n.getRootNode().host&&(i=n.getRootNode().host),i}function PT(n){let i=n,l;for(;l=Vy(i);)i=l;return i}function tM(n){const i=n.ownerDocument;if(!i)return!1;const l=PT(n);return i.contains(l)}function Qy(n){const i=n.ownerDocument;return i?i.contains(n)||tM(n):!1}const mg={};function Rf(n){const i=mg[n];if(i)return i;const l=window.document;let s=window[n];if(l&&typeof l.createElement=="function")try{const c=l.createElement("iframe");c.hidden=!0,l.head.appendChild(c);const f=c.contentWindow;f&&f[n]&&(s=f[n]),l.head.removeChild(c)}catch{}return mg[n]=s.bind(window)}function eM(...n){return Rf("requestAnimationFrame")(...n)}function $s(...n){return Rf("setTimeout")(...n)}function nM(...n){return Rf("clearTimeout")(...n)}var rt=(n=>(n[n.DomContentLoaded=0]="DomContentLoaded",n[n.Load=1]="Load",n[n.FullSnapshot=2]="FullSnapshot",n[n.IncrementalSnapshot=3]="IncrementalSnapshot",n[n.Meta=4]="Meta",n[n.Custom=5]="Custom",n[n.Plugin=6]="Plugin",n))(rt||{}),et=(n=>(n[n.Mutation=0]="Mutation",n[n.MouseMove=1]="MouseMove",n[n.MouseInteraction=2]="MouseInteraction",n[n.Scroll=3]="Scroll",n[n.ViewportResize=4]="ViewportResize",n[n.Input=5]="Input",n[n.TouchMove=6]="TouchMove",n[n.MediaInteraction=7]="MediaInteraction",n[n.StyleSheetRule=8]="StyleSheetRule",n[n.CanvasMutation=9]="CanvasMutation",n[n.Font=10]="Font",n[n.Log=11]="Log",n[n.Drag=12]="Drag",n[n.StyleDeclaration=13]="StyleDeclaration",n[n.Selection=14]="Selection",n[n.AdoptedStyleSheet=15]="AdoptedStyleSheet",n[n.CustomElement=16]="CustomElement",n))(et||{}),de=(n=>(n[n.MouseUp=0]="MouseUp",n[n.MouseDown=1]="MouseDown",n[n.Click=2]="Click",n[n.ContextMenu=3]="ContextMenu",n[n.DblClick=4]="DblClick",n[n.Focus=5]="Focus",n[n.Blur=6]="Blur",n[n.TouchStart=7]="TouchStart",n[n.TouchMove_Departed=8]="TouchMove_Departed",n[n.TouchEnd=9]="TouchEnd",n[n.TouchCancel=10]="TouchCancel",n))(de||{}),Sn=(n=>(n[n.Mouse=0]="Mouse",n[n.Pen=1]="Pen",n[n.Touch=2]="Touch",n))(Sn||{}),yi=(n=>(n[n.Play=0]="Play",n[n.Pause=1]="Pause",n[n.Seeked=2]="Seeked",n[n.VolumeChange=3]="VolumeChange",n[n.RateChange=4]="RateChange",n))(yi||{});function Of(n){try{return n.contentDocument}catch{}}function aM(n){try{return n.contentWindow}catch{}}function pg(n){return"__ln"in n}class iM{constructor(){this.length=0,this.head=null,this.tail=null}get(i){if(i>=this.length)throw new Error("Position outside of list range");let l=this.head;for(let s=0;s<i;s++)l=l?.next||null;return l}addNode(i){const l={value:i,previous:null,next:null};if(i.__ln=l,i.previousSibling&&pg(i.previousSibling)){const s=i.previousSibling.__ln.next;l.next=s,l.previous=i.previousSibling.__ln,i.previousSibling.__ln.next=l,s&&(s.previous=l)}else if(i.nextSibling&&pg(i.nextSibling)&&i.nextSibling.__ln.previous){const s=i.nextSibling.__ln.previous;l.previous=s,l.next=i.nextSibling.__ln,i.nextSibling.__ln.previous=l,s&&(s.next=l)}else this.head&&(this.head.previous=l),l.next=this.head,this.head=l;l.next===null&&(this.tail=l),this.length++}removeNode(i){const l=i.__ln;this.head&&(l.previous?(l.previous.next=l.next,l.next?l.next.previous=l.previous:this.tail=l.previous):(this.head=l.next,this.head?this.head.previous=null:this.tail=null),i.__ln&&delete i.__ln,this.length--)}}const gg=(n,i)=>`${n}@${i}`;class rM{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=i=>{i.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const i=[],l=new Set,s=new iM,c=m=>{let y=m,E=jr;for(;E===jr;)y=y&&y.nextSibling,E=y&&this.mirror.getId(y);return E},f=m=>{if(!m.parentNode||!Qy(m))return;const y=Br(m.parentNode)?this.mirror.getId(Vy(m)):this.mirror.getId(m.parentNode),E=c(m);if(y===-1||E===-1)return s.addNode(m);const _=Ei(m,{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:R=>{jy(R,this.mirror)&&!xe(R,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(R),Xy(R,this.mirror)&&this.stylesheetManager.trackLinkElement(R),Jc(m)&&this.shadowDomManager.addShadowRoot(m.shadowRoot,this.doc)},onIframeLoad:(R,w)=>{xe(R,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(R,w),R.contentWindow&&this.canvasManager.addWindow(R.contentWindow),this.shadowDomManager.observeAttachShadow(R))},onStylesheetLoad:(R,w)=>{this.stylesheetManager.attachLinkElement(R,w)}});_&&(i.push({parentId:y,nextId:E,node:_}),l.add(_.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const m of this.movedSet)yg(this.removes,m,this.mirror)&&!this.movedSet.has(m.parentNode)||f(m);for(const m of this.addedSet)!vg(this.droppedSet,m)&&!yg(this.removes,m,this.mirror)||vg(this.movedSet,m)?f(m):this.droppedSet.add(m);let h=null;for(;s.length;){let m=null;if(h){const y=this.mirror.getId(h.value.parentNode),E=c(h.value);y!==-1&&E!==-1&&(m=h)}if(!m){let y=s.tail;for(;y;){const E=y;if(y=y.previous,E){const _=this.mirror.getId(E.value.parentNode);if(c(E.value)===-1)continue;if(_!==-1){m=E;break}else{const w=E.value;if(w.parentNode&&w.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const k=w.parentNode.host;if(this.mirror.getId(k)!==-1){m=E;break}}}}}}if(!m){for(;s.head;)s.removeNode(s.head.value);break}h=m.previous,s.removeNode(m.value),f(m.value)}const g={texts:this.texts.map(m=>({id:this.mirror.getId(m.node),value:m.value})).filter(m=>!l.has(m.id)).filter(m=>this.mirror.has(m.id)),attributes:this.attributes.map(m=>{const{attributes:y}=m;if(typeof y.style=="string"){const E=JSON.stringify(m.styleDiff),_=JSON.stringify(m._unchangedStyles);E.length<y.style.length&&(E+_).split("var(").length===y.style.split("var(").length&&(y.style=m.styleDiff)}return{id:this.mirror.getId(m.node),attributes:y}}).filter(m=>!l.has(m.id)).filter(m=>this.mirror.has(m.id)),removes:this.removes,adds:i};!g.texts.length&&!g.attributes.length&&!g.removes.length&&!g.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(g))},this.processMutation=i=>{if(!Oc(i.target,this.mirror))switch(i.type){case"characterData":{const l=i.target.textContent;!xe(i.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&l!==i.oldValue&&this.texts.push({value:Oi(i.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&l?this.maskTextFn?this.maskTextFn(l,Yy(i.target)):l.replace(/[\S]/g,"*"):l,node:i.target});break}case"attributes":{const l=i.target;let s=i.attributeName,c=i.target.getAttribute(s);if(s==="value"){const h=bf(l),g=l.tagName;c=Ls(l,g,h);const m=Js({maskInputOptions:this.maskInputOptions,tagName:g,type:h}),y=Oi(i.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,m);c=Gr({isMasked:y,element:l,value:c,maskInputFn:this.maskInputFn})}if(xe(i.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||c===i.oldValue)return;let f=this.attributeMap.get(i.target);if(l.tagName==="IFRAME"&&s==="src"&&!this.keepIframeSrcFn(c))if(!Of(l))s="rr_src";else return;if(f||(f={node:i.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(f),this.attributeMap.set(i.target,f)),s==="type"&&l.tagName==="INPUT"&&(i.oldValue||"").toLowerCase()==="password"&&l.setAttribute("data-rr-is-password","true"),!Uy(l.tagName,s)&&(f.attributes[s]=zy(this.doc,Ri(l.tagName),Ri(s),c,l,this.maskAttributeFn),s==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const h=this.unattachedDoc.createElement("span");i.oldValue&&h.setAttribute("style",i.oldValue);for(const g of Array.from(l.style)){const m=l.style.getPropertyValue(g),y=l.style.getPropertyPriority(g);m!==h.style.getPropertyValue(g)||y!==h.style.getPropertyPriority(g)?y===""?f.styleDiff[g]=m:f.styleDiff[g]=[m,y]:f._unchangedStyles[g]=[m,y]}for(const g of Array.from(h.style))l.style.getPropertyValue(g)===""&&(f.styleDiff[g]=!1)}break}case"childList":{if(xe(i.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;i.addedNodes.forEach(l=>this.genAdds(l,i.target)),i.removedNodes.forEach(l=>{const s=this.mirror.getId(l),c=Br(i.target)?this.mirror.getId(i.target.host):this.mirror.getId(i.target);xe(i.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Oc(l,this.mirror)||!JT(l,this.mirror)||(this.addedSet.has(l)?(Wc(this.addedSet,l),this.droppedSet.add(l)):this.addedSet.has(i.target)&&s===-1||Gy(i.target,this.mirror)||(this.movedSet.has(l)&&this.movedMap[gg(s,c)]?Wc(this.movedSet,l):this.removes.push({parentId:c,id:s,isShadow:Br(i.target)&&Hr(i.target)?!0:void 0})),this.mapRemoves.push(l))});break}}},this.genAdds=(i,l)=>{if(!this.processedNodeManager.inOtherBuffer(i,this)&&!(this.addedSet.has(i)||this.movedSet.has(i))){if(this.mirror.hasNode(i)){if(Oc(i,this.mirror))return;this.movedSet.add(i);let s=null;l&&this.mirror.hasNode(l)&&(s=this.mirror.getId(l)),s&&s!==-1&&(this.movedMap[gg(this.mirror.getId(i),s)]=!0)}else this.addedSet.add(i),this.droppedSet.delete(i);xe(i,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(i.childNodes.forEach(s=>this.genAdds(s)),Jc(i)&&i.shadowRoot.childNodes.forEach(s=>{this.processedNodeManager.add(s,this),this.genAdds(s,i)}))}}}init(i){["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(l=>{this[l]=i[l]})}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 Wc(n,i){n.delete(i),i.childNodes.forEach(l=>Wc(n,l))}function yg(n,i,l){return n.length===0?!1:lM(n,i,l)}function lM(n,i,l){let s=i.parentNode;for(;s;){const c=l.getId(s);if(n.some(f=>f.id===c))return!0;s=s.parentNode}return!1}function vg(n,i){return n.size===0?!1:Zy(n,i)}function Zy(n,i){const{parentNode:l}=i;return l?n.has(l)?!0:Zy(n,l):!1}let Ir;function sM(n){Ir=n}function uM(){Ir=void 0}const gt=n=>Ir?(...l)=>{try{return n(...l)}catch(s){if(Ir&&Ir(s)===!0)return()=>{};throw s}}:n,bi=[];function $r(n){try{if("composedPath"in n){const i=n.composedPath();if(i.length)return i[0]}else if("path"in n&&n.path.length)return n.path[0]}catch{}return n&&n.target}function Ky(n,i){const l=new rM;bi.push(l),l.init(n);let s=window.MutationObserver||window.__rrMutationObserver;const c=window?.Zone?.__symbol__?.("MutationObserver");c&&window[c]&&(s=window[c]);const f=new s(gt(h=>{n.onMutation&&n.onMutation(h)===!1||l.processMutations.bind(l)(h)}));return f.observe(i,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),f}function oM({mousemoveCb:n,sampling:i,doc:l,mirror:s}){if(i.mousemove===!1)return()=>{};const c=typeof i.mousemove=="number"?i.mousemove:50,f=typeof i.mousemoveCallback=="number"?i.mousemoveCallback:500;let h=[],g;const m=Xr(gt(_=>{const R=Date.now()-g;n(h.map(w=>(w.timeOffset-=R,w)),_),h=[],g=null}),f),y=gt(Xr(gt(_=>{const R=$r(_),{clientX:w,clientY:k}=Fc(_)?_.changedTouches[0]:_;g||(g=Hs()),h.push({x:w,y:k,id:s.getId(R),timeOffset:Hs()-g}),m(typeof DragEvent<"u"&&_ instanceof DragEvent?et.Drag:_ instanceof MouseEvent?et.MouseMove:et.TouchMove)}),c,{trailing:!1})),E=[he("mousemove",y,l),he("touchmove",y,l),he("drag",y,l)];return gt(()=>{E.forEach(_=>_())})}function cM({mouseInteractionCb:n,doc:i,mirror:l,blockClass:s,blockSelector:c,unblockSelector:f,sampling:h}){if(h.mouseInteraction===!1)return()=>{};const g=h.mouseInteraction===!0||h.mouseInteraction===void 0?{}:h.mouseInteraction,m=[];let y=null;const E=_=>R=>{const w=$r(R);if(xe(w,s,c,f,!0))return;let k=null,U=_;if("pointerType"in R){switch(R.pointerType){case"mouse":k=Sn.Mouse;break;case"touch":k=Sn.Touch;break;case"pen":k=Sn.Pen;break}k===Sn.Touch?de[_]===de.MouseDown?U="TouchStart":de[_]===de.MouseUp&&(U="TouchEnd"):Sn.Pen}else Fc(R)&&(k=Sn.Touch);k!==null?(y=k,(U.startsWith("Touch")&&k===Sn.Touch||U.startsWith("Mouse")&&k===Sn.Mouse)&&(k=null)):de[_]===de.Click&&(k=y,y=null);const q=Fc(R)?R.changedTouches[0]:R;if(!q)return;const Y=l.getId(w),{clientX:K,clientY:at}=q;gt(n)({type:de[U],id:Y,x:K,y:at,...k!==null&&{pointerType:k}})};return Object.keys(de).filter(_=>Number.isNaN(Number(_))&&!_.endsWith("_Departed")&&g[_]!==!1).forEach(_=>{let R=Ri(_);const w=E(_);if(window.PointerEvent)switch(de[_]){case de.MouseDown:case de.MouseUp:R=R.replace("mouse","pointer");break;case de.TouchStart:case de.TouchEnd:return}m.push(he(R,w,i))}),gt(()=>{m.forEach(_=>_())})}function Fy({scrollCb:n,doc:i,mirror:l,blockClass:s,blockSelector:c,unblockSelector:f,sampling:h}){const g=gt(Xr(gt(m=>{const y=$r(m);if(!y||xe(y,s,c,f,!0))return;const E=l.getId(y);if(y===i&&i.defaultView){const _=Hy(i.defaultView);n({id:E,x:_.left,y:_.top})}else n({id:E,x:y.scrollLeft,y:y.scrollTop})}),h.scroll||100));return he("scroll",g,i)}function fM({viewportResizeCb:n},{win:i}){let l=-1,s=-1;const c=gt(Xr(gt(()=>{const f=Iy(),h=qy();(l!==f||s!==h)&&(n({width:Number(h),height:Number(f)}),l=f,s=h)}),200));return he("resize",c,i)}const dM=["INPUT","TEXTAREA","SELECT"],Sg=new WeakMap;function hM({inputCb:n,doc:i,mirror:l,blockClass:s,blockSelector:c,unblockSelector:f,ignoreClass:h,ignoreSelector:g,maskInputOptions:m,maskInputFn:y,sampling:E,userTriggeredOnInput:_,maskTextClass:R,unmaskTextClass:w,maskTextSelector:k,unmaskTextSelector:U}){function q(tt){let J=$r(tt);const B=tt.isTrusted,Z=J&&Zc(J.tagName);if(Z==="OPTION"&&(J=J.parentElement),!J||!Z||dM.indexOf(Z)<0||xe(J,s,c,f,!0))return;const ht=J;if(ht.classList.contains(h)||g&&ht.matches(g))return;const ct=bf(J);let Ut=Ls(ht,Z,ct),Ht=!1;const qt=Js({maskInputOptions:m,tagName:Z,type:ct}),A=Oi(J,R,k,w,U,qt);(ct==="radio"||ct==="checkbox")&&(Ht=J.checked),Ut=Gr({isMasked:A,element:J,value:Ut,maskInputFn:y}),Y(J,_?{text:Ut,isChecked:Ht,userTriggered:B}:{text:Ut,isChecked:Ht});const z=J.name;ct==="radio"&&z&&Ht&&i.querySelectorAll(`input[type="radio"][name="${z}"]`).forEach(L=>{if(L!==J){const st=Gr({isMasked:A,element:L,value:Ls(L,Z,ct),maskInputFn:y});Y(L,_?{text:st,isChecked:!Ht,userTriggered:!1}:{text:st,isChecked:!Ht})}})}function Y(tt,J){const B=Sg.get(tt);if(!B||B.text!==J.text||B.isChecked!==J.isChecked){Sg.set(tt,J);const Z=l.getId(tt);gt(n)({...J,id:Z})}}const at=(E.input==="last"?["change"]:["input","change"]).map(tt=>he(tt,gt(q),i)),nt=i.defaultView;if(!nt)return()=>{at.forEach(tt=>tt())};const F=nt.Object.getOwnPropertyDescriptor(nt.HTMLInputElement.prototype,"value"),j=[[nt.HTMLInputElement.prototype,"value"],[nt.HTMLInputElement.prototype,"checked"],[nt.HTMLSelectElement.prototype,"value"],[nt.HTMLTextAreaElement.prototype,"value"],[nt.HTMLSelectElement.prototype,"selectedIndex"],[nt.HTMLOptionElement.prototype,"selected"]];return F&&F.set&&at.push(...j.map(tt=>By(tt[0],tt[1],{set(){gt(q)({target:this,isTrusted:!1})}},!1,nt))),gt(()=>{at.forEach(tt=>tt())})}function Is(n){const i=[];function l(s,c){if(ys("CSSGroupingRule")&&s.parentRule instanceof CSSGroupingRule||ys("CSSMediaRule")&&s.parentRule instanceof CSSMediaRule||ys("CSSSupportsRule")&&s.parentRule instanceof CSSSupportsRule||ys("CSSConditionRule")&&s.parentRule instanceof CSSConditionRule){const h=Array.from(s.parentRule.cssRules).indexOf(s);c.unshift(h)}else if(s.parentStyleSheet){const h=Array.from(s.parentStyleSheet.cssRules).indexOf(s);c.unshift(h)}return c}return l(n,i)}function Jn(n,i,l){let s,c;return n?(n.ownerNode?s=i.getId(n.ownerNode):c=l.getId(n),{styleId:c,id:s}):{}}function mM({styleSheetRuleCb:n,mirror:i,stylesheetManager:l},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const c=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(c,{apply:gt((E,_,R)=>{const[w,k]=R,{id:U,styleId:q}=Jn(_,i,l.styleMirror);return(U&&U!==-1||q&&q!==-1)&&n({id:U,styleId:q,adds:[{rule:w,index:k}]}),E.apply(_,R)})});const f=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(f,{apply:gt((E,_,R)=>{const[w]=R,{id:k,styleId:U}=Jn(_,i,l.styleMirror);return(k&&k!==-1||U&&U!==-1)&&n({id:k,styleId:U,removes:[{index:w}]}),E.apply(_,R)})});let h;s.CSSStyleSheet.prototype.replace&&(h=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(h,{apply:gt((E,_,R)=>{const[w]=R,{id:k,styleId:U}=Jn(_,i,l.styleMirror);return(k&&k!==-1||U&&U!==-1)&&n({id:k,styleId:U,replace:w}),E.apply(_,R)})}));let g;s.CSSStyleSheet.prototype.replaceSync&&(g=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(g,{apply:gt((E,_,R)=>{const[w]=R,{id:k,styleId:U}=Jn(_,i,l.styleMirror);return(k&&k!==-1||U&&U!==-1)&&n({id:k,styleId:U,replaceSync:w}),E.apply(_,R)})}));const m={};vs("CSSGroupingRule")?m.CSSGroupingRule=s.CSSGroupingRule:(vs("CSSMediaRule")&&(m.CSSMediaRule=s.CSSMediaRule),vs("CSSConditionRule")&&(m.CSSConditionRule=s.CSSConditionRule),vs("CSSSupportsRule")&&(m.CSSSupportsRule=s.CSSSupportsRule));const y={};return Object.entries(m).forEach(([E,_])=>{y[E]={insertRule:_.prototype.insertRule,deleteRule:_.prototype.deleteRule},_.prototype.insertRule=new Proxy(y[E].insertRule,{apply:gt((R,w,k)=>{const[U,q]=k,{id:Y,styleId:K}=Jn(w.parentStyleSheet,i,l.styleMirror);return(Y&&Y!==-1||K&&K!==-1)&&n({id:Y,styleId:K,adds:[{rule:U,index:[...Is(w),q||0]}]}),R.apply(w,k)})}),_.prototype.deleteRule=new Proxy(y[E].deleteRule,{apply:gt((R,w,k)=>{const[U]=k,{id:q,styleId:Y}=Jn(w.parentStyleSheet,i,l.styleMirror);return(q&&q!==-1||Y&&Y!==-1)&&n({id:q,styleId:Y,removes:[{index:[...Is(w),U]}]}),R.apply(w,k)})})}),gt(()=>{s.CSSStyleSheet.prototype.insertRule=c,s.CSSStyleSheet.prototype.deleteRule=f,h&&(s.CSSStyleSheet.prototype.replace=h),g&&(s.CSSStyleSheet.prototype.replaceSync=g),Object.entries(m).forEach(([E,_])=>{_.prototype.insertRule=y[E].insertRule,_.prototype.deleteRule=y[E].deleteRule})})}function Jy({mirror:n,stylesheetManager:i},l){let s=null;l.nodeName==="#document"?s=n.getId(l):s=n.getId(l.host);const c=l.nodeName==="#document"?l.defaultView?.Document:l.ownerDocument?.defaultView?.ShadowRoot,f=c?.prototype?Object.getOwnPropertyDescriptor(c?.prototype,"adoptedStyleSheets"):void 0;return s===null||s===-1||!c||!f?()=>{}:(Object.defineProperty(l,"adoptedStyleSheets",{configurable:f.configurable,enumerable:f.enumerable,get(){return f.get?.call(this)},set(h){const g=f.set?.call(this,h);if(s!==null&&s!==-1)try{i.adoptStyleSheets(h,s)}catch{}return g}}),gt(()=>{Object.defineProperty(l,"adoptedStyleSheets",{configurable:f.configurable,enumerable:f.enumerable,get:f.get,set:f.set})}))}function pM({styleDeclarationCb:n,mirror:i,ignoreCSSAttributes:l,stylesheetManager:s},{win:c}){const f=c.CSSStyleDeclaration.prototype.setProperty;c.CSSStyleDeclaration.prototype.setProperty=new Proxy(f,{apply:gt((g,m,y)=>{const[E,_,R]=y;if(l.has(E))return f.apply(m,[E,_,R]);const{id:w,styleId:k}=Jn(m.parentRule?.parentStyleSheet,i,s.styleMirror);return(w&&w!==-1||k&&k!==-1)&&n({id:w,styleId:k,set:{property:E,value:_,priority:R},index:Is(m.parentRule)}),g.apply(m,y)})});const h=c.CSSStyleDeclaration.prototype.removeProperty;return c.CSSStyleDeclaration.prototype.removeProperty=new Proxy(h,{apply:gt((g,m,y)=>{const[E]=y;if(l.has(E))return h.apply(m,[E]);const{id:_,styleId:R}=Jn(m.parentRule?.parentStyleSheet,i,s.styleMirror);return(_&&_!==-1||R&&R!==-1)&&n({id:_,styleId:R,remove:{property:E},index:Is(m.parentRule)}),g.apply(m,y)})}),gt(()=>{c.CSSStyleDeclaration.prototype.setProperty=f,c.CSSStyleDeclaration.prototype.removeProperty=h})}function gM({mediaInteractionCb:n,blockClass:i,blockSelector:l,unblockSelector:s,mirror:c,sampling:f,doc:h}){const g=gt(y=>Xr(gt(E=>{const _=$r(E);if(!_||xe(_,i,l,s,!0))return;const{currentTime:R,volume:w,muted:k,playbackRate:U}=_;n({type:y,id:c.getId(_),currentTime:R,volume:w,muted:k,playbackRate:U})}),f.media||500)),m=[he("play",g(yi.Play),h),he("pause",g(yi.Pause),h),he("seeked",g(yi.Seeked),h),he("volumechange",g(yi.VolumeChange),h),he("ratechange",g(yi.RateChange),h)];return gt(()=>{m.forEach(y=>y())})}function yM({fontCb:n,doc:i}){const l=i.defaultView;if(!l)return()=>{};const s=[],c=new WeakMap,f=l.FontFace;l.FontFace=function(m,y,E){const _=new f(m,y,E);return c.set(_,{family:m,buffer:typeof y!="string",descriptors:E,fontSource:typeof y=="string"?y:JSON.stringify(Array.from(new Uint8Array(y)))}),_};const h=Mf(i.fonts,"add",function(g){return function(m){return $s(gt(()=>{const y=c.get(m);y&&(n(y),c.delete(m))}),0),g.apply(this,[m])}});return s.push(()=>{l.FontFace=f}),s.push(h),gt(()=>{s.forEach(g=>g())})}function vM(n){const{doc:i,mirror:l,blockClass:s,blockSelector:c,unblockSelector:f,selectionCb:h}=n;let g=!0;const m=gt(()=>{const y=i.getSelection();if(!y||g&&y?.isCollapsed)return;g=y.isCollapsed||!1;const E=[],_=y.rangeCount||0;for(let R=0;R<_;R++){const w=y.getRangeAt(R),{startContainer:k,startOffset:U,endContainer:q,endOffset:Y}=w;xe(k,s,c,f,!0)||xe(q,s,c,f,!0)||E.push({start:l.getId(k),startOffset:U,end:l.getId(q),endOffset:Y})}h({ranges:E})});return m(),he("selectionchange",m)}function SM({doc:n,customElementCb:i}){const l=n.defaultView;return!l||!l.customElements?()=>{}:Mf(l.customElements,"define",function(c){return function(f,h,g){try{i({define:{name:f}})}catch{}return c.apply(this,[f,h,g])}})}function _M(n,i={}){const l=n.doc.defaultView;if(!l)return()=>{};let s;n.recordDOM&&(s=Ky(n,n.doc));const c=oM(n),f=cM(n),h=Fy(n),g=fM(n,{win:l}),m=hM(n),y=gM(n);let E=()=>{},_=()=>{},R=()=>{},w=()=>{};n.recordDOM&&(E=mM(n,{win:l}),_=Jy(n,n.doc),R=pM(n,{win:l}),n.collectFonts&&(w=yM(n)));const k=vM(n),U=SM(n),q=[];for(const Y of n.plugins)q.push(Y.observer(Y.callback,l,Y.options));return gt(()=>{bi.forEach(Y=>Y.reset()),s?.disconnect(),c(),f(),h(),g(),m(),y(),E(),_(),R(),w(),k(),U(),q.forEach(Y=>Y())})}function ys(n){return typeof window[n]<"u"}function vs(n){return!!(typeof window[n]<"u"&&window[n].prototype&&"insertRule"in window[n].prototype&&"deleteRule"in window[n].prototype)}class $c{constructor(i){this.generateIdFn=i,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(i,l,s,c){const f=s||this.getIdToRemoteIdMap(i),h=c||this.getRemoteIdToIdMap(i);let g=f.get(l);return g||(g=this.generateIdFn(),f.set(l,g),h.set(g,l)),g}getIds(i,l){const s=this.getIdToRemoteIdMap(i),c=this.getRemoteIdToIdMap(i);return l.map(f=>this.getId(i,f,s,c))}getRemoteId(i,l,s){const c=s||this.getRemoteIdToIdMap(i);if(typeof l!="number")return l;const f=c.get(l);return f||-1}getRemoteIds(i,l){const s=this.getRemoteIdToIdMap(i);return l.map(c=>this.getRemoteId(i,c,s))}reset(i){if(!i){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(i),this.iframeRemoteIdToIdMap.delete(i)}getIdToRemoteIdMap(i){let l=this.iframeIdToRemoteIdMap.get(i);return l||(l=new Map,this.iframeIdToRemoteIdMap.set(i,l)),l}getRemoteIdToIdMap(i){let l=this.iframeRemoteIdToIdMap.get(i);return l||(l=new Map,this.iframeRemoteIdToIdMap.set(i,l)),l}}class EM{constructor(){this.crossOriginIframeMirror=new $c(Tf),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class bM{constructor(i){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new $c(Tf),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=i.mutationCb,this.wrappedEmit=i.wrappedEmit,this.stylesheetManager=i.stylesheetManager,this.recordCrossOriginIframes=i.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new $c(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=i.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(i){this.iframes.set(i,!0),i.contentWindow&&this.crossOriginIframeMap.set(i.contentWindow,i)}addLoadListener(i){this.loadListener=i}attachIframe(i,l){this.mutationCb({adds:[{parentId:this.mirror.getId(i),nextId:null,node:l}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&i.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(i);const s=Of(i);s&&s.adoptedStyleSheets&&s.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(s.adoptedStyleSheets,this.mirror.getId(s))}handleMessage(i){const l=i;if(l.data.type!=="rrweb"||l.origin!==l.data.origin||!i.source)return;const c=this.crossOriginIframeMap.get(i.source);if(!c)return;const f=this.transformCrossOriginEvent(c,l.data.event);f&&this.wrappedEmit(f,l.data.isCheckout)}transformCrossOriginEvent(i,l){switch(l.type){case rt.FullSnapshot:{this.crossOriginIframeMirror.reset(i),this.crossOriginIframeStyleMirror.reset(i),this.replaceIdOnNode(l.data.node,i);const s=l.data.node.id;return this.crossOriginIframeRootIdMap.set(i,s),this.patchRootIdOnNode(l.data.node,s),{timestamp:l.timestamp,type:rt.IncrementalSnapshot,data:{source:et.Mutation,adds:[{parentId:this.mirror.getId(i),nextId:null,node:l.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case rt.Meta:case rt.Load:case rt.DomContentLoaded:return!1;case rt.Plugin:return l;case rt.Custom:return this.replaceIds(l.data.payload,i,["id","parentId","previousId","nextId"]),l;case rt.IncrementalSnapshot:switch(l.data.source){case et.Mutation:return l.data.adds.forEach(s=>{this.replaceIds(s,i,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,i);const c=this.crossOriginIframeRootIdMap.get(i);c&&this.patchRootIdOnNode(s.node,c)}),l.data.removes.forEach(s=>{this.replaceIds(s,i,["parentId","id"])}),l.data.attributes.forEach(s=>{this.replaceIds(s,i,["id"])}),l.data.texts.forEach(s=>{this.replaceIds(s,i,["id"])}),l;case et.Drag:case et.TouchMove:case et.MouseMove:return l.data.positions.forEach(s=>{this.replaceIds(s,i,["id"])}),l;case et.ViewportResize:return!1;case et.MediaInteraction:case et.MouseInteraction:case et.Scroll:case et.CanvasMutation:case et.Input:return this.replaceIds(l.data,i,["id"]),l;case et.StyleSheetRule:case et.StyleDeclaration:return this.replaceIds(l.data,i,["id"]),this.replaceStyleIds(l.data,i,["styleId"]),l;case et.Font:return l;case et.Selection:return l.data.ranges.forEach(s=>{this.replaceIds(s,i,["start","end"])}),l;case et.AdoptedStyleSheet:return this.replaceIds(l.data,i,["id"]),this.replaceStyleIds(l.data,i,["styleIds"]),l.data.styles?.forEach(s=>{this.replaceStyleIds(s,i,["styleId"])}),l}}return!1}replace(i,l,s,c){for(const f of c)!Array.isArray(l[f])&&typeof l[f]!="number"||(Array.isArray(l[f])?l[f]=i.getIds(s,l[f]):l[f]=i.getId(s,l[f]));return l}replaceIds(i,l,s){return this.replace(this.crossOriginIframeMirror,i,l,s)}replaceStyleIds(i,l,s){return this.replace(this.crossOriginIframeStyleMirror,i,l,s)}replaceIdOnNode(i,l){this.replaceIds(i,l,["id","rootId"]),"childNodes"in i&&i.childNodes.forEach(s=>{this.replaceIdOnNode(s,l)})}patchRootIdOnNode(i,l){i.type!==ie.Document&&!i.rootId&&(i.rootId=l),"childNodes"in i&&i.childNodes.forEach(s=>{this.patchRootIdOnNode(s,l)})}}class TM{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class MM{constructor(i){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=i.mutationCb,this.scrollCb=i.scrollCb,this.bypassOptions=i.bypassOptions,this.mirror=i.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(i,l){if(!Hr(i)||this.shadowDoms.has(i))return;this.shadowDoms.add(i),this.bypassOptions.canvasManager.addShadowRoot(i);const s=Ky({...this.bypassOptions,doc:l,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},i);this.restoreHandlers.push(()=>s.disconnect()),this.restoreHandlers.push(Fy({...this.bypassOptions,scrollCb:this.scrollCb,doc:i,mirror:this.mirror})),$s(()=>{i.adoptedStyleSheets&&i.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(i.adoptedStyleSheets,this.mirror.getId(i.host)),this.restoreHandlers.push(Jy({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},i))},0)}observeAttachShadow(i){const l=Of(i),s=aM(i);!l||!s||this.patchAttachShadow(s.Element,l)}patchAttachShadow(i,l){const s=this;this.restoreHandlers.push(Mf(i.prototype,"attachShadow",function(c){return function(f){const h=c.call(this,f);return this.shadowRoot&&Qy(this)&&s.addShadowRoot(this.shadowRoot,l),h}}))}reset(){this.restoreHandlers.forEach(i=>{try{i()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}var _g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",RM=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Ss=0;Ss<_g.length;Ss++)RM[_g.charCodeAt(Ss)]=Ss;class Eg{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class OM{constructor(i){this.trackedLinkElements=new WeakSet,this.styleMirror=new $T,this.mutationCb=i.mutationCb,this.adoptedStyleSheetCb=i.adoptedStyleSheetCb}attachLinkElement(i,l){"_cssText"in l.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:l.id,attributes:l.attributes}]}),this.trackLinkElement(i)}trackLinkElement(i){this.trackedLinkElements.has(i)||(this.trackedLinkElements.add(i),this.trackStylesheetInLinkElement(i))}adoptStyleSheets(i,l){if(i.length===0)return;const s={id:l,styleIds:[]},c=[];for(const f of i){let h;this.styleMirror.has(f)?h=this.styleMirror.getId(f):(h=this.styleMirror.add(f),c.push({styleId:h,rules:Array.from(f.rules||CSSRule,(g,m)=>({rule:Dy(g),index:m}))})),s.styleIds.push(h)}c.length>0&&(s.styles=c),this.adoptedStyleSheetCb(s)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(i){}}class AM{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(i,l){const s=this.nodeMap.get(i);return s&&Array.from(s).some(c=>c!==l)}add(i,l){this.active||(this.active=!0,eM(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(i,(this.nodeMap.get(i)||new Set).add(l))}destroy(){}}let jt,qs;try{if(Array.from([1],n=>n*2)[0]!==2){const n=document.createElement("iframe");document.body.appendChild(n),Array.from=n.contentWindow?.Array.from||Array.from,document.body.removeChild(n)}}catch(n){console.debug("Unable to override Array.from",n)}const Ze=AT();function En(n={}){const{emit:i,checkoutEveryNms:l,checkoutEveryNth:s,blockClass:c="rr-block",blockSelector:f=null,unblockSelector:h=null,ignoreClass:g="rr-ignore",ignoreSelector:m=null,maskAllText:y=!1,maskTextClass:E="rr-mask",unmaskTextClass:_=null,maskTextSelector:R=null,unmaskTextSelector:w=null,inlineStylesheet:k=!0,maskAllInputs:U,maskInputOptions:q,slimDOMOptions:Y,maskAttributeFn:K,maskInputFn:at,maskTextFn:nt,maxCanvasSize:F=null,packFn:j,sampling:tt={},dataURLOptions:J={},mousemoveWait:B,recordDOM:Z=!0,recordCanvas:ht=!1,recordCrossOriginIframes:ct=!1,recordAfter:Ut=n.recordAfter==="DOMContentLoaded"?n.recordAfter:"load",userTriggeredOnInput:Ht=!1,collectFonts:qt=!1,inlineImages:A=!1,plugins:z,keepIframeSrcFn:L=()=>!1,ignoreCSSAttributes:st=new Set([]),errorHandler:dt,onMutation:$t,getCanvasManager:kt}=n;sM(dt);const yt=ct?window.parent===window:!0;let Lt=!1;if(!yt)try{window.parent.document&&(Lt=!1)}catch{Lt=!0}if(yt&&!i)throw new Error("emit function is required");if(!yt&&!Lt)return()=>{};B!==void 0&&tt.mousemove===void 0&&(tt.mousemove=B),Ze.reset();const me=U===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:q!==void 0?q:{},Ne=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||{};WT();let Tn,Mn=0;const en=mt=>{for(const ue of z||[])ue.eventProcessor&&(mt=ue.eventProcessor(mt));return j&&!Lt&&(mt=j(mt)),mt};jt=(mt,ue)=>{const ft=mt;if(ft.timestamp=Hs(),bi[0]?.isFrozen()&&ft.type!==rt.FullSnapshot&&!(ft.type===rt.IncrementalSnapshot&&ft.data.source===et.Mutation)&&bi.forEach(Pt=>Pt.unfreeze()),yt)i?.(en(ft),ue);else if(Lt){const Pt={type:"rrweb",event:en(ft),origin:window.location.origin,isCheckout:ue};window.parent.postMessage(Pt,"*")}if(ft.type===rt.FullSnapshot)Tn=ft,Mn=0;else if(ft.type===rt.IncrementalSnapshot){if(ft.data.source===et.Mutation&&ft.data.isAttachIframe)return;Mn++;const Pt=s&&Mn>=s,_t=l&&Tn&&ft.timestamp-Tn.timestamp>l;(Pt||_t)&&wa(!0)}};const Rn=mt=>{jt({type:rt.IncrementalSnapshot,data:{source:et.Mutation,...mt}})},ea=mt=>jt({type:rt.IncrementalSnapshot,data:{source:et.Scroll,...mt}}),Ci=mt=>jt({type:rt.IncrementalSnapshot,data:{source:et.CanvasMutation,...mt}}),xi=mt=>jt({type:rt.IncrementalSnapshot,data:{source:et.AdoptedStyleSheet,...mt}}),je=new OM({mutationCb:Rn,adoptedStyleSheetCb:xi}),nn=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new EM:new bM({mirror:Ze,mutationCb:Rn,stylesheetManager:je,recordCrossOriginIframes:ct,wrappedEmit:jt});for(const mt of z||[])mt.getMirror&&mt.getMirror({nodeMirror:Ze,crossOriginIframeMirror:nn.crossOriginIframeMirror,crossOriginIframeStyleMirror:nn.crossOriginIframeStyleMirror});const Ni=new AM,pe=wM(kt,{mirror:Ze,win:window,mutationCb:mt=>jt({type:rt.IncrementalSnapshot,data:{source:et.CanvasMutation,...mt}}),recordCanvas:ht,blockClass:c,blockSelector:f,unblockSelector:h,maxCanvasSize:F,sampling:tt.canvas,dataURLOptions:J,errorHandler:dt}),Da=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new TM:new MM({mutationCb:Rn,scrollCb:ea,bypassOptions:{onMutation:$t,blockClass:c,blockSelector:f,unblockSelector:h,maskAllText:y,maskTextClass:E,unmaskTextClass:_,maskTextSelector:R,unmaskTextSelector:w,inlineStylesheet:k,maskInputOptions:me,dataURLOptions:J,maskAttributeFn:K,maskTextFn:nt,maskInputFn:at,recordCanvas:ht,inlineImages:A,sampling:tt,slimDOMOptions:Ne,iframeManager:nn,stylesheetManager:je,canvasManager:pe,keepIframeSrcFn:L,processedNodeManager:Ni},mirror:Ze}),wa=(mt=!1)=>{if(!Z)return;jt({type:rt.Meta,data:{href:window.location.href,width:qy(),height:Iy()}},mt),je.reset(),Da.init(),bi.forEach(ft=>ft.lock());const ue=FT(document,{mirror:Ze,blockClass:c,blockSelector:f,unblockSelector:h,maskAllText:y,maskTextClass:E,unmaskTextClass:_,maskTextSelector:R,unmaskTextSelector:w,inlineStylesheet:k,maskAllInputs:me,maskAttributeFn:K,maskInputFn:at,maskTextFn:nt,slimDOM:Ne,dataURLOptions:J,recordCanvas:ht,inlineImages:A,onSerialize:ft=>{jy(ft,Ze)&&nn.addIframe(ft),Xy(ft,Ze)&&je.trackLinkElement(ft),Jc(ft)&&Da.addShadowRoot(ft.shadowRoot,document)},onIframeLoad:(ft,Pt)=>{nn.attachIframe(ft,Pt),ft.contentWindow&&pe.addWindow(ft.contentWindow),Da.observeAttachShadow(ft)},onStylesheetLoad:(ft,Pt)=>{je.attachLinkElement(ft,Pt)},keepIframeSrcFn:L});if(!ue)return console.warn("Failed to snapshot the document");jt({type:rt.FullSnapshot,data:{node:ue,initialOffset:Hy(window)}}),bi.forEach(ft=>ft.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&je.adoptStyleSheets(document.adoptedStyleSheets,Ze.getId(document))};qs=wa;try{const mt=[],ue=Pt=>gt(_M)({onMutation:$t,mutationCb:Rn,mousemoveCb:(_t,ki)=>jt({type:rt.IncrementalSnapshot,data:{source:ki,positions:_t}}),mouseInteractionCb:_t=>jt({type:rt.IncrementalSnapshot,data:{source:et.MouseInteraction,..._t}}),scrollCb:ea,viewportResizeCb:_t=>jt({type:rt.IncrementalSnapshot,data:{source:et.ViewportResize,..._t}}),inputCb:_t=>jt({type:rt.IncrementalSnapshot,data:{source:et.Input,..._t}}),mediaInteractionCb:_t=>jt({type:rt.IncrementalSnapshot,data:{source:et.MediaInteraction,..._t}}),styleSheetRuleCb:_t=>jt({type:rt.IncrementalSnapshot,data:{source:et.StyleSheetRule,..._t}}),styleDeclarationCb:_t=>jt({type:rt.IncrementalSnapshot,data:{source:et.StyleDeclaration,..._t}}),canvasMutationCb:Ci,fontCb:_t=>jt({type:rt.IncrementalSnapshot,data:{source:et.Font,..._t}}),selectionCb:_t=>{jt({type:rt.IncrementalSnapshot,data:{source:et.Selection,..._t}})},customElementCb:_t=>{jt({type:rt.IncrementalSnapshot,data:{source:et.CustomElement,..._t}})},blockClass:c,ignoreClass:g,ignoreSelector:m,maskAllText:y,maskTextClass:E,unmaskTextClass:_,maskTextSelector:R,unmaskTextSelector:w,maskInputOptions:me,inlineStylesheet:k,sampling:tt,recordDOM:Z,recordCanvas:ht,inlineImages:A,userTriggeredOnInput:Ht,collectFonts:qt,doc:Pt,maskAttributeFn:K,maskInputFn:at,maskTextFn:nt,keepIframeSrcFn:L,blockSelector:f,unblockSelector:h,slimDOMOptions:Ne,dataURLOptions:J,mirror:Ze,iframeManager:nn,stylesheetManager:je,shadowDomManager:Da,processedNodeManager:Ni,canvasManager:pe,ignoreCSSAttributes:st,plugins:z?.filter(_t=>_t.observer)?.map(_t=>({observer:_t.observer,options:_t.options,callback:ki=>jt({type:rt.Plugin,data:{plugin:_t.name,payload:ki}})}))||[]},{});nn.addLoadListener(Pt=>{try{mt.push(ue(Pt.contentDocument))}catch(_t){console.warn(_t)}});const ft=()=>{wa(),mt.push(ue(document))};return document.readyState==="interactive"||document.readyState==="complete"?ft():(mt.push(he("DOMContentLoaded",()=>{jt({type:rt.DomContentLoaded,data:{}}),Ut==="DOMContentLoaded"&&ft()})),mt.push(he("load",()=>{jt({type:rt.Load,data:{}}),Ut==="load"&&ft()},window))),()=>{mt.forEach(Pt=>Pt()),Ni.destroy(),qs=void 0,uM()}}catch(mt){console.warn(mt)}}function DM(n){if(!qs)throw new Error("please take full snapshot after start recording");qs(n)}En.mirror=Ze;En.takeFullSnapshot=DM;function wM(n,i){try{return n?n(i):new Eg}catch{return console.warn("Unable to initialize CanvasManager"),new Eg}}var bg;(function(n){n[n.NotStarted=0]="NotStarted",n[n.Running=1]="Running",n[n.Stopped=2]="Stopped"})(bg||(bg={}));const CM=3,xM=5;function Af(n){return n>9999999999?n:n*1e3}function Ac(n){return n>9999999999?n/1e3:n}function Pr(n,i){i.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(i.category)?n.triggerUserActivity():n.checkAndHandleExpiredSession(),n.addUpdate(()=>(n.throttledAddEvent({type:rt.Custom,timestamp:(i.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:af(i,10,1e3)}}),i.category==="console")))}const NM="button,a";function Wy(n){return n.closest(NM)||n}function $y(n){const i=Py(n);return!i||!(i instanceof Element)?i:Wy(i)}function Py(n){return kM(n)?n.target:n}function kM(n){return typeof n=="object"&&!!n&&"target"in n}let Wn;function zM(n){return Wn||(Wn=[],UM()),Wn.push(n),()=>{const i=Wn?Wn.indexOf(n):-1;i>-1&&Wn.splice(i,1)}}function UM(){Ee(xt,"open",function(n){return function(...i){if(Wn)try{Wn.forEach(l=>l())}catch{}return n.apply(xt,i)}})}const LM=new Set([et.Mutation,et.StyleSheetRule,et.StyleDeclaration,et.AdoptedStyleSheet,et.CanvasMutation,et.Selection,et.MediaInteraction]);function BM(n,i,l){n.handleClick(i,l)}class HM{constructor(i,l,s=Pr){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=l.timeout/1e3,this._threshold=l.threshold/1e3,this._scrollTimeout=l.scrollTimeout/1e3,this._replay=i,this._ignoreSelector=l.ignoreSelector,this._addBreadcrumbEvent=s}addListeners(){const i=zM(()=>{this._lastMutation=Tg()});this._teardown=()=>{i(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(i,l){if(qM(l,this._ignoreSelector)||!YM(i))return;const s={timestamp:Ac(i.timestamp),clickBreadcrumb:i,clickCount:0,node:l};this._clicks.some(c=>c.node===s.node&&Math.abs(c.timestamp-s.timestamp)<1)||(this._clicks.push(s),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(i=Date.now()){this._lastMutation=Ac(i)}registerScroll(i=Date.now()){this._lastScroll=Ac(i)}registerClick(i){const l=Wy(i);this._handleMultiClick(l)}_handleMultiClick(i){this._getClicks(i).forEach(l=>{l.clickCount++})}_getClicks(i){return this._clicks.filter(l=>l.node===i)}_checkClicks(){const i=[],l=Tg();this._clicks.forEach(s=>{!s.mutationAfter&&this._lastMutation&&(s.mutationAfter=s.timestamp<=this._lastMutation?this._lastMutation-s.timestamp:void 0),!s.scrollAfter&&this._lastScroll&&(s.scrollAfter=s.timestamp<=this._lastScroll?this._lastScroll-s.timestamp:void 0),s.timestamp+this._timeout<=l&&i.push(s)});for(const s of i){const c=this._clicks.indexOf(s);c>-1&&(this._generateBreadcrumbs(s),this._clicks.splice(c,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(i){const l=this._replay,s=i.scrollAfter&&i.scrollAfter<=this._scrollTimeout,c=i.mutationAfter&&i.mutationAfter<=this._threshold,f=!s&&!c,{clickCount:h,clickBreadcrumb:g}=i;if(f){const m=Math.min(i.mutationAfter||this._timeout,this._timeout)*1e3,y=m<this._timeout*1e3?"mutation":"timeout",E={type:"default",message:g.message,timestamp:g.timestamp,category:"ui.slowClickDetected",data:{...g.data,url:xt.location.href,route:l.getCurrentRoute(),timeAfterClickMs:m,endReason:y,clickCount:h||1}};this._addBreadcrumbEvent(l,E);return}if(h>1){const m={type:"default",message:g.message,timestamp:g.timestamp,category:"ui.multiClick",data:{...g.data,url:xt.location.href,route:l.getCurrentRoute(),clickCount:h,metric:!0}};this._addBreadcrumbEvent(l,m)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Wr(()=>this._checkClicks(),1e3)}}const IM=["A","BUTTON","INPUT"];function qM(n,i){return!!(!IM.includes(n.tagName)||n.tagName==="INPUT"&&!["submit","button"].includes(n.getAttribute("type")||"")||n.tagName==="A"&&(n.hasAttribute("download")||n.hasAttribute("target")&&n.getAttribute("target")!=="_self")||i&&n.matches(i))}function YM(n){return!!(n.data&&typeof n.data.nodeId=="number"&&n.timestamp)}function Tg(){return Date.now()/1e3}function GM(n,i){try{if(!jM(i))return;const{source:l}=i.data;if(LM.has(l)&&n.registerMutation(i.timestamp),l===et.Scroll&&n.registerScroll(i.timestamp),XM(i)){const{type:s,id:c}=i.data,f=En.mirror.getNode(c);f instanceof HTMLElement&&s===de.Click&&n.registerClick(f)}}catch{}}function jM(n){return n.type===CM}function XM(n){return n.data.source===et.MouseInteraction}function tn(n){return{timestamp:Date.now()/1e3,type:"default",...n}}var Df=(n=>(n[n.Document=0]="Document",n[n.DocumentType=1]="DocumentType",n[n.Element=2]="Element",n[n.Text=3]="Text",n[n.CDATA=4]="CDATA",n[n.Comment=5]="Comment",n))(Df||{});const VM=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function QM(n){const i={};!n["data-sentry-component"]&&n["data-sentry-element"]&&(n["data-sentry-component"]=n["data-sentry-element"]);for(const l in n)if(VM.has(l)){let s=l;(l==="data-testid"||l==="data-test-id")&&(s="testId"),i[s]=n[l]}return i}const ZM=n=>i=>{if(!n.isEnabled())return;const l=KM(i);if(!l)return;const s=i.name==="click",c=s?i.event:void 0;s&&n.clickDetector&&c&&c.target&&!c.altKey&&!c.metaKey&&!c.ctrlKey&&!c.shiftKey&&BM(n.clickDetector,l,$y(i.event)),Pr(n,l)};function tv(n,i){const l=En.mirror.getId(n),s=l&&En.mirror.getNode(l),c=s&&En.mirror.getMeta(s),f=c&&JM(c)?c:null;return{message:i,data:f?{nodeId:l,node:{id:l,tagName:f.tagName,textContent:Array.from(f.childNodes).map(h=>h.type===Df.Text&&h.textContent).filter(Boolean).map(h=>h.trim()).join(""),attributes:QM(f.attributes)}}:{}}}function KM(n){const{target:i,message:l}=FM(n);return tn({category:`ui.${n.name}`,...tv(i,l)})}function FM(n){const i=n.name==="click";let l,s=null;try{s=i?$y(n.event):Py(n.event),l=of(s,{maxStringLength:200})||"<unknown>"}catch{l="<unknown>"}return{target:s,message:l}}function JM(n){return n.type===Df.Element}function WM(n,i){if(!n.isEnabled())return;n.updateUserActivity();const l=$M(i);l&&Pr(n,l)}function $M(n){const{metaKey:i,shiftKey:l,ctrlKey:s,altKey:c,key:f,target:h}=n;if(!h||PM(h)||!f)return null;const g=i||s||c,m=f.length===1;if(!g&&m)return null;const y=of(h,{maxStringLength:200})||"<unknown>",E=tv(h,y);return tn({category:"ui.keyDown",message:y,data:{...E.data,metaKey:i,shiftKey:l,ctrlKey:s,altKey:c,key:f}})}function PM(n){return n.tagName==="INPUT"||n.tagName==="TEXTAREA"||n.isContentEditable}const tR={resource:rR,paint:aR,navigation:iR};function _s(n,i){return({metric:l})=>void i.replayPerformanceEntries.push(n(l))}function eR(n){return n.map(nR).filter(Boolean)}function nR(n){const i=tR[n.entryType];return i?i(n):null}function Ai(n){return((Zg()||xt.performance.timeOrigin)+n)/1e3}function aR(n){const{duration:i,entryType:l,name:s,startTime:c}=n,f=Ai(c);return{type:l,name:s,start:f,end:f+i,data:void 0}}function iR(n){const{entryType:i,name:l,decodedBodySize:s,duration:c,domComplete:f,encodedBodySize:h,domContentLoadedEventStart:g,domContentLoadedEventEnd:m,domInteractive:y,loadEventStart:E,loadEventEnd:_,redirectCount:R,startTime:w,transferSize:k,type:U}=n;return c===0?null:{type:`${i}.${U}`,start:Ai(w),end:Ai(f),name:l,data:{size:k,decodedBodySize:s,encodedBodySize:h,duration:c,domInteractive:y,domContentLoadedEventStart:g,domContentLoadedEventEnd:m,loadEventStart:E,loadEventEnd:_,domComplete:f,redirectCount:R}}}function rR(n){const{entryType:i,initiatorType:l,name:s,responseEnd:c,startTime:f,decodedBodySize:h,encodedBodySize:g,responseStatus:m,transferSize:y}=n;return["fetch","xmlhttprequest"].includes(l)?null:{type:`${i}.${l}`,start:Ai(f),end:Ai(c),name:s,data:{size:y,statusCode:m,decodedBodySize:h,encodedBodySize:g}}}function lR(n){const i=n.entries[n.entries.length-1],l=i?.element?[i.element]:void 0;return Ps(n,"largest-contentful-paint",l)}function sR(n){return n.sources!==void 0}function uR(n){const i=[],l=[];for(const s of n.entries)if(sR(s)){const c=[];for(const f of s.sources)if(f.node){l.push(f.node);const h=En.mirror.getId(f.node);h&&c.push(h)}i.push({value:s.value,nodeIds:c.length?c:void 0})}return Ps(n,"cumulative-layout-shift",l,i)}function oR(n){const i=n.entries[n.entries.length-1],l=i?.target?[i.target]:void 0;return Ps(n,"first-input-delay",l)}function cR(n){const i=n.entries[n.entries.length-1],l=i?.target?[i.target]:void 0;return Ps(n,"interaction-to-next-paint",l)}function Ps(n,i,l,s){const c=n.value,f=n.rating,h=Ai(c);return{type:"web-vital",name:i,start:h,end:h,data:{value:c,size:c,rating:f,nodeIds:l?l.map(g=>En.mirror.getId(g)):void 0,attributions:s}}}function fR(n){function i(c){n.performanceEntries.includes(c)||n.performanceEntries.push(c)}function l({entries:c}){c.forEach(i)}const s=[];return["navigation","paint","resource"].forEach(c=>{s.push(Qb(c,l))}),s.push(jb(_s(lR,n)),Gb(_s(uR,n)),Xb(_s(oR,n)),Vb(_s(cR,n))),()=>{s.forEach(c=>c())}}const $=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,dR='var 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;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}}},L=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}}},O=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)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=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&&j(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)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=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(O(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}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(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=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){G.prototype.flush.call(this)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(J)return J.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)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),s=i.length;return q(i,n),j(i,s-8,r.d()),j(i,s-4,e),i}(P(t))}const R=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 H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[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});';function hR(){const n=new Blob([dR]);return URL.createObjectURL(n)}const Mg=["info","warn","error","log"],Rs="[Replay] ";function Dc(n,i="info"){ta({category:"console",data:{logger:"replay"},level:i,message:`${Rs}${n}`},{level:i})}function mR(){let n=!1,i=!1;const l={exception:()=>{},infoTick:()=>{},setConfig:s=>{n=!!s.captureExceptions,i=!!s.traceInternals}};return $?(Mg.forEach(s=>{l[s]=(...c)=>{I[s](Rs,...c),i&&Dc(c.join(""),iy(s))}}),l.exception=(s,...c)=>{c.length&&l.error&&l.error(...c),I.error(Rs,s),n?Xg(s):i&&Dc(s,"error")},l.infoTick=(...s)=>{I.info(Rs,...s),i&&setTimeout(()=>Dc(s[0]),0)}):Mg.forEach(s=>{l[s]=()=>{}}),l}const P=mR();class wf extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Ef}.`)}}class ev{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(i){const l=JSON.stringify(i).length;if(this._totalSize+=l,this._totalSize>Ef)throw new wf;this.events.push(i)}finish(){return new Promise(i=>{const l=this.events;this.clear(),i(JSON.stringify(l))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const i=this.events.map(l=>l.timestamp).sort()[0];return i?Af(i):null}}class pR{constructor(i){this._worker=i,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((i,l)=>{this._worker.addEventListener("message",({data:s})=>{s.success?i():l()},{once:!0}),this._worker.addEventListener("error",s=>{l(s)},{once:!0})}),this._ensureReadyPromise)}destroy(){$&&P.info("Destroying compression worker"),this._worker.terminate()}postMessage(i,l){const s=this._getAndIncrementId();return new Promise((c,f)=>{const h=({data:g})=>{const m=g;if(m.method===i&&m.id===s){if(this._worker.removeEventListener("message",h),!m.success){$&&P.error("Error in compression worker: ",m.response),f(new Error("Error in compression worker"));return}c(m.response)}};this._worker.addEventListener("message",h),this._worker.postMessage({id:s,method:i,arg:l})})}_getAndIncrementId(){return this._id++}}class gR{constructor(i){this._worker=new pR(i),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(i){const l=Af(i.timestamp);(!this._earliestTimestamp||l<this._earliestTimestamp)&&(this._earliestTimestamp=l);const s=JSON.stringify(i);return this._totalSize+=s.length,this._totalSize>Ef?Promise.reject(new wf):this._sendEventToWorker(s)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,i=>{$&&P.exception(i,'Sending "clear" message to worker failed',i)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(i){return this._worker.postMessage("addEvent",i)}async _finishRequest(){const i=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,i}}class yR{constructor(i){this._fallback=new ev,this._compression=new gR(i),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(i){this._used.hasCheckout=i}set waitForCheckout(i){this._used.waitForCheckout=i}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(i){return this._used.addEvent(i)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(i){$&&P.exception(i,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:i,hasCheckout:l,waitForCheckout:s}=this._fallback,c=[];for(const f of i)c.push(this._compression.addEvent(f));this._compression.hasCheckout=l,this._compression.waitForCheckout=s,this._used=this._compression;try{await Promise.all(c),this._fallback.clear()}catch(f){$&&P.exception(f,"Failed to add events when switching buffers.")}}}function vR({useCompression:n,workerUrl:i}){if(n&&window.Worker){const l=SR(i);if(l)return l}return $&&P.info("Using simple buffer"),new ev}function SR(n){try{const i=n||_R();if(!i)return;$&&P.info(`Using compression worker${n?` from ${n}`:""}`);const l=new Worker(i);return new yR(l)}catch(i){$&&P.exception(i,"Failed to create compression worker")}}function _R(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?hR():""}function Cf(){try{return"sessionStorage"in xt&&!!xt.sessionStorage}catch{return!1}}function ER(n){bR(),n.session=void 0}function bR(){if(Cf())try{xt.sessionStorage.removeItem(Sf)}catch{}}function nv(n){return n===void 0?!1:Math.random()<n}function xf(n){if(Cf())try{xt.sessionStorage.setItem(Sf,JSON.stringify(n))}catch{}}function av(n){const i=Date.now(),l=n.id||Ma(),s=n.started||i,c=n.lastActivity||i,f=n.segmentId||0,h=n.sampled,g=n.previousSessionId;return{id:l,started:s,lastActivity:c,segmentId:f,sampled:h,previousSessionId:g}}function TR(n,i){return nv(n)?"session":i?"buffer":!1}function Rg({sessionSampleRate:n,allowBuffering:i,stickySession:l=!1},{previousSessionId:s}={}){const c=TR(n,i),f=av({sampled:c,previousSessionId:s});return l&&xf(f),f}function MR(){if(!Cf())return null;try{const n=xt.sessionStorage.getItem(Sf);if(!n)return null;const i=JSON.parse(n);return $&&P.infoTick("Loading existing session"),av(i)}catch{return null}}function Pc(n,i,l=+new Date){return n===null||i===void 0||i<0?!0:i===0?!1:n+i<=l}function iv(n,{maxReplayDuration:i,sessionIdleExpire:l,targetTime:s=Date.now()}){return Pc(n.started,i,s)||Pc(n.lastActivity,l,s)}function rv(n,{sessionIdleExpire:i,maxReplayDuration:l}){return!(!iv(n,{sessionIdleExpire:i,maxReplayDuration:l})||n.sampled==="buffer"&&n.segmentId===0)}function wc({sessionIdleExpire:n,maxReplayDuration:i,previousSessionId:l},s){const c=s.stickySession&&MR();return c?rv(c,{sessionIdleExpire:n,maxReplayDuration:i})?($&&P.infoTick("Session in sessionStorage is expired, creating new one..."),Rg(s,{previousSessionId:c.id})):c:($&&P.infoTick("Creating new session"),Rg(s,{previousSessionId:l}))}function RR(n){return n.type===rt.Custom}function Nf(n,i,l){return sv(n,i)?(lv(n,i,l),!0):!1}function OR(n,i,l){return sv(n,i)?lv(n,i,l):Promise.resolve(null)}async function lv(n,i,l){const{eventBuffer:s}=n;if(!s||s.waitForCheckout&&!l)return null;const c=n.recordingMode==="buffer";try{l&&c&&s.clear(),l&&(s.hasCheckout=!0,s.waitForCheckout=!1);const f=n.getOptions(),h=AR(i,f.beforeAddRecordingEvent);return h?await s.addEvent(h):void 0}catch(f){const h=f&&f instanceof wf,g=h?"addEventSizeExceeded":"addEvent";if(h&&c)return s.clear(),s.waitForCheckout=!0,null;n.handleException(f),await n.stop({reason:g});const m=Zt();m&&m.recordDroppedEvent("internal_sdk_error","replay")}}function sv(n,i){if(!n.eventBuffer||n.isPaused()||!n.isEnabled())return!1;const l=Af(i.timestamp);return l+n.timeouts.sessionIdlePause<Date.now()?!1:l>n.getContext().initialTimestamp+n.getOptions().maxReplayDuration?($&&P.infoTick(`Skipping event with timestamp ${l} because it is after maxReplayDuration`),!1):!0}function AR(n,i){try{if(typeof i=="function"&&RR(n))return i(n)}catch(l){return $&&P.exception(l,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return n}function kf(n){return!n.type}function tf(n){return n.type==="transaction"}function DR(n){return n.type==="replay_event"}function Og(n){return n.type==="feedback"}function wR(n){return(i,l)=>{if(!n.isEnabled()||!kf(i)&&!tf(i))return;const s=l?.statusCode;if(!(!s||s<200||s>=300)){if(tf(i)){CR(n,i);return}xR(n,i)}}}function CR(n,i){const l=n.getContext();i.contexts?.trace?.trace_id&&l.traceIds.size<100&&l.traceIds.add(i.contexts.trace.trace_id)}function xR(n,i){const l=n.getContext();if(i.event_id&&l.errorIds.size<100&&l.errorIds.add(i.event_id),n.recordingMode!=="buffer"||!i.tags||!i.tags.replayId)return;const{beforeErrorSampling:s}=n.getOptions();typeof s=="function"&&!s(i)||Wr(async()=>{try{await n.sendBufferedReplayOrFlush()}catch(c){n.handleException(c)}})}function NR(n){return i=>{!n.isEnabled()||!kf(i)||kR(n,i)}}function kR(n,i){const l=i.exception?.values?.[0]?.value;if(typeof l=="string"&&(l.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||l.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const s=tn({category:"replay.hydrate-error",data:{url:Vs()}});Pr(n,s)}}function zR(n){const i=Zt();i&&i.on("beforeAddBreadcrumb",l=>UR(n,l))}function UR(n,i){if(!n.isEnabled()||!uv(i))return;const l=LR(i);l&&Pr(n,l)}function LR(n){return!uv(n)||["fetch","xhr","sentry.event","sentry.transaction"].includes(n.category)||n.category.startsWith("ui.")?null:n.category==="console"?BR(n):tn(n)}function BR(n){const i=n.data?.arguments;if(!Array.isArray(i)||i.length===0)return tn(n);let l=!1;const s=i.map(c=>{if(!c)return c;if(typeof c=="string")return c.length>gs?(l=!0,`${c.slice(0,gs)}…`):c;if(typeof c=="object")try{const f=af(c,7);return JSON.stringify(f).length>gs?(l=!0,`${JSON.stringify(f,null,2).slice(0,gs)}…`):f}catch{}return c});return tn({...n,data:{...n.data,arguments:s,...l?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function uv(n){return!!n.category}function HR(n,i){return n.type||!n.exception||!n.exception.values||!n.exception.values.length?!1:!!i.originalException?.__rrweb__}function ov(){const n=Di().getPropagationContext().dsc;n&&delete n.replay_id;const i=cf();if(i){const l=b_(i);delete l.replay_id}}function IR(n,i){n.triggerUserActivity(),n.addUpdate(()=>i.timestamp?(n.throttledAddEvent({type:rt.Custom,timestamp:i.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:i.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:i.event_id}}}}),!1):!0)}function qR(n,i){return n.recordingMode!=="buffer"||i.message===_f||!i.exception||i.type?!1:nv(n.getOptions().errorSampleRate)}function YR(n){return Object.assign((i,l)=>!n.isEnabled()||n.isPaused()?i:DR(i)?(delete i.breadcrumbs,i):!kf(i)&&!tf(i)&&!Og(i)?i:n.checkAndHandleExpiredSession()?Og(i)?(n.flush(),i.contexts.feedback.replay_id=n.getSessionId(),IR(n,i),i):HR(i,l)&&!n.getOptions()._experiments.captureExceptions?($&&P.log("Ignoring error from rrweb internals",i),null):((qR(n,i)||n.recordingMode==="session")&&(i.tags={...i.tags,replayId:n.getSessionId()}),i):(ov(),i),{id:"Replay"})}function tu(n,i){return i.map(({type:l,start:s,end:c,name:f,data:h})=>{const g=n.throttledAddEvent({type:rt.Custom,timestamp:s,data:{tag:"performanceSpan",payload:{op:l,description:f,startTimestamp:s,endTimestamp:c,data:h}}});return typeof g=="string"?Promise.resolve(null):g})}function GR(n){const{from:i,to:l}=n,s=Date.now()/1e3;return{type:"navigation.push",start:s,end:s,name:l,data:{previous:i}}}function jR(n){return i=>{if(!n.isEnabled())return;const l=GR(i);l!==null&&(n.getContext().urls.push(l.name),n.triggerUserActivity(),n.addUpdate(()=>(tu(n,[l]),!1)))}}function XR(n,i){return $&&n.getOptions()._experiments.traceInternals?!1:SE(i,Zt())}function cv(n,i){n.isEnabled()&&i!==null&&(XR(n,i.name)||n.addUpdate(()=>(tu(n,[i]),!0)))}function eu(n){if(!n)return;const i=new TextEncoder;try{if(typeof n=="string")return i.encode(n).length;if(n instanceof URLSearchParams)return i.encode(n.toString()).length;if(n instanceof FormData){const l=Ty(n);return i.encode(l).length}if(n instanceof Blob)return n.size;if(n instanceof ArrayBuffer)return n.byteLength}catch{}}function fv(n){if(!n)return;const i=parseInt(n,10);return isNaN(i)?void 0:i}function Ys(n,i){if(!n)return{headers:{},size:void 0,_meta:{warnings:[i]}};const l={...n._meta},s=l.warnings||[];return l.warnings=[...s,i],n._meta=l,n}function dv(n,i){if(!i)return null;const{startTimestamp:l,endTimestamp:s,url:c,method:f,statusCode:h,request:g,response:m}=i;return{type:n,start:l/1e3,end:s/1e3,name:c,data:{method:f,statusCode:h,request:g,response:m}}}function Vr(n){return{headers:{},size:n,_meta:{warnings:["URL_SKIPPED"]}}}function $n(n,i,l){if(!i&&Object.keys(n).length===0)return;if(!i)return{headers:n};if(!l)return{headers:n,size:i};const s={headers:n,size:i},{body:c,warnings:f}=VR(l);return s.body=c,f?.length&&(s._meta={warnings:f}),s}function ef(n,i){return Object.entries(n).reduce((l,[s,c])=>{const f=s.toLowerCase();return i.includes(f)&&n[s]&&(l[f]=c),l},{})}function VR(n){if(!n||typeof n!="string")return{body:n};const i=n.length>lg,l=QR(n);if(i){const s=n.slice(0,lg);return l?{body:s,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${s}…`,warnings:["TEXT_TRUNCATED"]}}if(l)try{return{body:JSON.parse(n)}}catch{}return{body:n}}function QR(n){const i=n[0],l=n[n.length-1];return i==="["&&l==="]"||i==="{"&&l==="}"}function Gs(n,i){const l=ZR(n);return Zr(l,i)}function ZR(n,i=xt.document.baseURI){if(n.startsWith("http://")||n.startsWith("https://")||n.startsWith(xt.location.origin))return n;const l=new URL(n,i);if(l.origin!==new URL(i).origin)return n;const s=l.href;return!n.endsWith("/")&&s.endsWith("/")?s.slice(0,-1):s}async function KR(n,i,l){try{const s=await JR(n,i,l),c=dv("resource.fetch",s);cv(l.replay,c)}catch(s){$&&P.exception(s,"Failed to capture fetch breadcrumb")}}function FR(n,i){const{input:l,response:s}=i,c=l?Ry(l):void 0,f=eu(c),h=s?fv(s.headers.get("content-length")):void 0;f!==void 0&&(n.data.request_body_size=f),h!==void 0&&(n.data.response_body_size=h)}async function JR(n,i,l){const s=Date.now(),{startTimestamp:c=s,endTimestamp:f=s}=i,{url:h,method:g,status_code:m=0,request_body_size:y,response_body_size:E}=n.data,_=Gs(h,l.networkDetailAllowUrls)&&!Gs(h,l.networkDetailDenyUrls),R=_?WR(l,i.input,y):Vr(y),w=await $R(_,l,i.response,E);return{startTimestamp:c,endTimestamp:f,url:h,method:g,statusCode:m,request:R,response:w}}function WR({networkCaptureBodies:n,networkRequestHeaders:i},l,s){const c=l?eO(l,i):{};if(!n)return $n(c,s,void 0);const f=Ry(l),[h,g]=My(f,P),m=$n(c,s,h);return g?Ys(m,g):m}async function $R(n,{networkCaptureBodies:i,networkResponseHeaders:l},s,c){if(!n&&c!==void 0)return Vr(c);const f=s?hv(s.headers,l):{};if(!s||!i&&c!==void 0)return $n(f,c,void 0);const[h,g]=await tO(s),m=PR(h,{networkCaptureBodies:i,responseBodySize:c,captureDetails:n,headers:f});return g?Ys(m,g):m}function PR(n,{networkCaptureBodies:i,responseBodySize:l,captureDetails:s,headers:c}){try{const f=n?.length&&l===void 0?eu(n):l;return s?i?$n(c,f,n):$n(c,f,void 0):Vr(f)}catch(f){return $&&P.exception(f,"Failed to serialize response body"),$n(c,l,void 0)}}async function tO(n){const i=nO(n);if(!i)return[void 0,"BODY_PARSE_ERROR"];try{return[await aO(i)]}catch(l){return l instanceof Error&&l.message.indexOf("Timeout")>-1?($&&P.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):($&&P.exception(l,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function hv(n,i){const l={};return i.forEach(s=>{n.get(s)&&(l[s]=n.get(s))}),l}function eO(n,i){return n.length===1&&typeof n[0]!="string"?Ag(n[0],i):n.length===2?Ag(n[1],i):{}}function Ag(n,i){if(!n)return{};const l=n.headers;return l?l instanceof Headers?hv(l,i):Array.isArray(l)?{}:ef(l,i):{}}function nO(n){try{return n.clone()}catch(i){$&&P.exception(i,"Failed to clone response body")}}function aO(n){return new Promise((i,l)=>{const s=Wr(()=>l(new Error("Timeout while trying to read response body")),500);iO(n).then(c=>i(c),c=>l(c)).finally(()=>clearTimeout(s))})}async function iO(n){return await n.text()}async function rO(n,i,l){try{const s=sO(n,i,l),c=dv("resource.xhr",s);cv(l.replay,c)}catch(s){$&&P.exception(s,"Failed to capture xhr breadcrumb")}}function lO(n,i){const{xhr:l,input:s}=i;if(!l)return;const c=eu(s),f=l.getResponseHeader("content-length")?fv(l.getResponseHeader("content-length")):fO(l.response,l.responseType);c!==void 0&&(n.data.request_body_size=c),f!==void 0&&(n.data.response_body_size=f)}function sO(n,i,l){const s=Date.now(),{startTimestamp:c=s,endTimestamp:f=s,input:h,xhr:g}=i,{url:m,method:y,status_code:E=0,request_body_size:_,response_body_size:R}=n.data;if(!m)return null;if(!g||!Gs(m,l.networkDetailAllowUrls)||Gs(m,l.networkDetailDenyUrls)){const j=Vr(_),tt=Vr(R);return{startTimestamp:c,endTimestamp:f,url:m,method:y,statusCode:E,request:j,response:tt}}const w=g[vi],k=w?ef(w.request_headers,l.networkRequestHeaders):{},U=ef(uO(g),l.networkResponseHeaders),[q,Y]=l.networkCaptureBodies?My(h,P):[void 0],[K,at]=l.networkCaptureBodies?oO(g):[void 0],nt=$n(k,_,q),F=$n(U,R,K);return{startTimestamp:c,endTimestamp:f,url:m,method:y,statusCode:E,request:Y?Ys(nt,Y):nt,response:at?Ys(F,at):F}}function uO(n){const i=n.getAllResponseHeaders();return i?i.split(`\r
53
53
  `).reduce((l,s)=>{const[c,f]=s.split(": ");return f&&(l[c.toLowerCase()]=f),l},{}):{}}function oO(n){const i=[];try{return[n.responseText]}catch(l){i.push(l)}try{return cO(n.response,n.responseType)}catch(l){i.push(l)}return $&&P.warn("Failed to get xhr response body",...i),[void 0]}function cO(n,i){try{if(typeof n=="string")return[n];if(n instanceof Document)return[n.body.outerHTML];if(i==="json"&&n&&typeof n=="object")return[JSON.stringify(n)];if(!n)return[void 0]}catch(l){return $&&P.exception(l,"Failed to serialize body",n),[void 0,"BODY_PARSE_ERROR"]}return $&&P.info("Skipping network body because of body type",n),[void 0,"UNPARSEABLE_BODY_TYPE"]}function fO(n,i){try{const l=i==="json"&&n&&typeof n=="object"?JSON.stringify(n):n;return eu(l)}catch{return}}function dO(n){const i=Zt();try{const{networkDetailAllowUrls:l,networkDetailDenyUrls:s,networkCaptureBodies:c,networkRequestHeaders:f,networkResponseHeaders:h}=n.getOptions(),g={replay:n,networkDetailAllowUrls:l,networkDetailDenyUrls:s,networkCaptureBodies:c,networkRequestHeaders:f,networkResponseHeaders:h};i&&i.on("beforeAddBreadcrumb",(m,y)=>hO(g,m,y))}catch{}}function hO(n,i,l){if(i.data)try{mO(i)&&gO(l)&&(lO(i,l),rO(i,l,n)),pO(i)&&yO(l)&&(FR(i,l),KR(i,l,n))}catch(s){$&&P.exception(s,"Error when enriching network breadcrumb")}}function mO(n){return n.category==="xhr"}function pO(n){return n.category==="fetch"}function gO(n){return n?.xhr}function yO(n){return n?.response}function vO(n,{autoFlushOnFeedback:i}){const l=Zt();Ey(ZM(n)),vf(jR(n)),zR(n),dO(n);const s=YR(n);T_(s),l&&(l.on("beforeSendEvent",NR(n)),l.on("afterSendEvent",wR(n)),l.on("createDsc",c=>{const f=n.getSessionId();f&&n.isEnabled()&&n.recordingMode==="session"&&n.checkAndHandleExpiredSession()&&(c.replay_id=f)}),l.on("spanStart",c=>{n.lastActiveSpan=c}),l.on("spanEnd",c=>{n.lastActiveSpan=c}),l.on("beforeSendFeedback",async(c,f)=>{const h=n.getSessionId();f?.includeReplay&&n.isEnabled()&&h&&c.contexts?.feedback&&(c.contexts.feedback.source==="api"&&i&&await n.flush(),c.contexts.feedback.replay_id=h)}),i&&l.on("openFeedbackWidget",async()=>{await n.flush()}))}async function SO(n){try{return Promise.all(tu(n,[_O(xt.performance.memory)]))}catch{return[]}}function _O(n){const{jsHeapSizeLimit:i,totalJSHeapSize:l,usedJSHeapSize:s}=n,c=Date.now()/1e3;return{type:"memory",name:"memory",start:c,end:c,data:{memory:{jsHeapSizeLimit:i,totalJSHeapSize:l,usedJSHeapSize:s}}}}function EO(n,i,l){return ME(n,i,{...l,setTimeoutImpl:Wr})}const Es=Xt.navigator;function bO(){return/iPhone|iPad|iPod/i.test(Es?.userAgent??"")||/Macintosh/i.test(Es?.userAgent??"")&&Es?.maxTouchPoints&&Es?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function TO(n){let i=!1;return(l,s)=>{if(!n.checkAndHandleExpiredSession()){$&&P.warn("Received replay event after session expired.");return}const c=s||!i;i=!0,n.clickDetector&&GM(n.clickDetector,l),n.addUpdate(()=>{if(n.recordingMode==="buffer"&&c&&n.setInitialState(),!Nf(n,l,c))return!0;if(!c)return!1;const f=n.session;if(RO(n,c),n.recordingMode==="buffer"&&f&&n.eventBuffer){const h=n.eventBuffer.getEarliestTimestamp();h&&($&&P.info(`Updating session start time to earliest event in buffer to ${new Date(h)}`),f.started=h,n.getOptions().stickySession&&xf(f))}return f?.previousSessionId||n.recordingMode==="session"&&n.flush(),!0})}}function MO(n){const i=n.getOptions();return{type:rt.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:n.isRecordingCanvas(),sessionSampleRate:i.sessionSampleRate,errorSampleRate:i.errorSampleRate,useCompressionOption:i.useCompression,blockAllMedia:i.blockAllMedia,maskAllText:i.maskAllText,maskAllInputs:i.maskAllInputs,useCompression:n.eventBuffer?n.eventBuffer.type==="worker":!1,networkDetailHasUrls:i.networkDetailAllowUrls.length>0,networkCaptureBodies:i.networkCaptureBodies,networkRequestHasHeaders:i.networkRequestHeaders.length>0,networkResponseHasHeaders:i.networkResponseHeaders.length>0}}}}function RO(n,i){!i||!n.session||n.session.segmentId!==0||Nf(n,MO(n),!1)}function OO(n,i,l,s){return wi(Kg(n,ff(n),s,l),[[{type:"replay_event"},n],[{type:"replay_recording",length:typeof i=="string"?new TextEncoder().encode(i).length:i.length},i]])}function AO({recordingData:n,headers:i}){let l;const s=`${JSON.stringify(i)}
54
- `;if(typeof n=="string")l=`${s}${n}`;else{const f=new TextEncoder().encode(s);l=new Uint8Array(f.length+n.length),l.set(f),l.set(n,f.length)}return l}async function DO({client:n,scope:i,replayId:l,event:s}){const c=typeof n._integrations=="object"&&n._integrations!==null&&!Array.isArray(n._integrations)?Object.keys(n._integrations):void 0,f={event_id:l,integrations:c};n.emit("preprocessEvent",s,f);const h=await Yg(n.getOptions(),s,f,i,n,lf());if(!h)return null;n.emit("postprocessEvent",h,f),h.platform=h.platform||"javascript";const g=n.getSdkMetadata(),{name:m,version:y}=g?.sdk||{};return h.sdk={...h.sdk,name:m||"sentry.javascript.unknown",version:y||"0.0.0"},h}async function wO({recordingData:n,replayId:i,segmentId:l,eventContext:s,timestamp:c,session:f}){const h=AO({recordingData:n,headers:{segment_id:l}}),{urls:g,errorIds:m,traceIds:y,initialTimestamp:E}=s,_=Zt(),R=Di(),w=_?.getTransport(),k=_?.getDsn();if(!_||!w||!k||!f.sampled)return bn({});const U={type:lT,replay_start_timestamp:E/1e3,timestamp:c/1e3,error_ids:m,trace_ids:y,urls:g,replay_id:i,segment_id:l,replay_type:f.sampled},q=await DO({scope:R,client:_,replayId:i,event:U});if(!q)return _.recordDroppedEvent("event_processor","replay"),$&&P.info("An event processor returned `null`, will not send event."),bn({});delete q.sdkProcessingMetadata;const Y=OO(q,h,k,_.getOptions().tunnel);let K;try{K=await w.send(Y)}catch(nt){const F=new Error(_f);try{F.cause=nt}catch{}throw F}if(typeof K.statusCode=="number"&&(K.statusCode<200||K.statusCode>=300))throw new mv(K.statusCode);const at=ny({},K);if(ey(at,"replay"))throw new zf(at);return K}class mv extends Error{constructor(i){super(`Transport returned status code ${i}`)}}class zf extends Error{constructor(i){super("Rate limit hit"),this.rateLimits=i}}async function pv(n,i={count:0,interval:dT}){const{recordingData:l,onError:s}=n;if(l.length)try{return await wO(n),!0}catch(c){if(c instanceof mv||c instanceof zf)throw c;if(M_("Replays",{_retryCount:i.count}),s&&s(c),i.count>=hT){const f=new Error(`${_f} - max retries exceeded`);try{f.cause=c}catch{}throw f}return i.interval*=++i.count,new Promise((f,h)=>{Wr(async()=>{try{await pv(n,i),f(!0)}catch(g){h(g)}},i.interval)})}}const gv="__THROTTLED",CO="__SKIPPED";function xO(n,i,l){const s=new Map,c=g=>{const m=g-l;s.forEach((y,E)=>{E<m&&s.delete(E)})},f=()=>[...s.values()].reduce((g,m)=>g+m,0);let h=!1;return(...g)=>{const m=Math.floor(Date.now()/1e3);if(c(m),f()>=i){const E=h;return h=!0,E?CO:gv}h=!1;const y=s.get(m)||0;return s.set(m,y+1),n(...g)}}class NO{constructor({options:i,recordingOptions:l}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:sT,sessionIdleExpire:uT},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=l,this._options=i,this._debouncedFlush=EO(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=xO((h,g)=>OR(this,h,g),300,5);const{slowClickTimeout:s,slowClickIgnoreSelectors:c}=this.getOptions(),f=s?{threshold:Math.min(mT,s),timeout:s,scrollTimeout:pT,ignoreSelector:c?c.join(","):""}:void 0;if(f&&(this.clickDetector=new HM(this,f)),$){const h=i._experiments;P.setConfig({captureExceptions:!!h.captureExceptions,traceInternals:!!h.traceInternals})}this._handleVisibilityChange=()=>{xt.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const h=tn({category:"ui.blur"});this._doChangeToBackgroundTasks(h)},this._handleWindowFocus=()=>{const h=tn({category:"ui.focus"});this._doChangeToForegroundTasks(h)},this._handleKeyboardEvent=h=>{WM(this,h)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(i){$&&P.exception(i),this._options.onError&&this._options.onError(i)}initializeSampling(i){const{errorSampleRate:l,sessionSampleRate:s}=this._options,c=l<=0&&s<=0;if(this._requiresManualStart=c,!c){if(this._initializeSessionForSampling(i),!this.session){$&&P.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",$&&P.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){$&&P.info("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){$&&P.info("Buffering is in progress, call `flush()` to save the replay");return}$&&P.infoTick("Starting replay in session mode"),this._updateUserActivity();const i=wc({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=i,this._initializeRecording()}startBuffering(){if(this._isEnabled){$&&P.info("Buffering is in progress, call `flush()` to save the replay");return}$&&P.infoTick("Starting replay in buffer mode");const i=wc({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=i,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const i=this._canvas;this._stopRecording=En({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:fT}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:TO(this),...bO(),onMutation:this._onMutationHandler.bind(this),...i?{recordCanvas:i.recordCanvas,getCanvasManager:i.getCanvasManager,sampling:i.sampling,dataURLOptions:i.dataURLOptions}:{}})}catch(i){this.handleException(i)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(i){return this.handleException(i),!1}}async stop({forceFlush:i=!1,reason:l}={}){if(this._isEnabled){this._isEnabled=!1;try{$&&P.info(`Stopping Replay${l?` triggered by ${l}`:""}`),ov(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),i&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,ER(this)}catch(s){this.handleException(s)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),$&&P.info("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),$&&P.info("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:i=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const l=Date.now();$&&P.info("Converting buffer to session"),await this.flushImmediate();const s=this.stopRecording();!i||!s||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(l),this._updateSessionActivity(l),this._maybeSaveSession()),this.startRecording())}addUpdate(i){const l=i();this.recordingMode!=="buffer"&&l!==!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(){return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Pc(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const i=`${xt.location.pathname}${xt.location.hash}${xt.location.search}`,l=`${xt.location.origin}${i}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=l,this._context.initialTimestamp=Date.now(),this._context.urls.push(l)}throttledAddEvent(i,l){const s=this._throttledAddEvent(i,l);if(s===gv){const c=tn({category:"replay.throttled"});this.addUpdate(()=>!Nf(this,{type:xM,timestamp:c.timestamp||0,data:{tag:"breadcrumb",payload:c,metric:!0}}))}return s}getCurrentRoute(){const i=this.lastActiveSpan||cf(),l=i&&kc(i),c=(l&&Ea(l).data||{})[E_];if(!(!l||!c||!["route","custom"].includes(c)))return Ea(l).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=vR({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(i){const l=this._options.errorSampleRate>0,s=wc({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:i},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:l});this.session=s}_checkSession(){if(!this.session)return!1;const i=this.session;return rv(i,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(i),!1):!0}async _refreshSession(i){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(i.id))}_addListeners(){try{xt.document.addEventListener("visibilitychange",this._handleVisibilityChange),xt.addEventListener("blur",this._handleWindowBlur),xt.addEventListener("focus",this._handleWindowFocus),xt.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(vO(this,{autoFlushOnFeedback:this._options._experiments.autoFlushOnFeedback}),this._hasInitializedCoreListeners=!0)}catch(i){this.handleException(i)}this._performanceCleanupCallback=fR(this)}_removeListeners(){try{xt.document.removeEventListener("visibilitychange",this._handleVisibilityChange),xt.removeEventListener("blur",this._handleWindowBlur),xt.removeEventListener("focus",this._handleWindowFocus),xt.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(i){this.handleException(i)}}_doChangeToBackgroundTasks(i){!this.session||iv(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(i&&this._createCustomBreadcrumb(i),this.conditionalFlush())}_doChangeToForegroundTasks(i){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){$&&P.info("Document has become active, but session has expired");return}i&&this._createCustomBreadcrumb(i)}_updateUserActivity(i=Date.now()){this._lastActivity=i}_updateSessionActivity(i=Date.now()){this.session&&(this.session.lastActivity=i,this._maybeSaveSession())}_createCustomBreadcrumb(i){this.addUpdate(()=>{this.throttledAddEvent({type:rt.Custom,timestamp:i.timestamp||0,data:{tag:"breadcrumb",payload:i}})})}_addPerformanceEntries(){let i=eR(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const l=this._context.initialTimestamp/1e3;i=i.filter(s=>s.start>=l)}return Promise.all(tu(this,i))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:i,eventBuffer:l}=this;if(!i||!l||this._requiresManualStart||i.segmentId)return;const s=l.getEarliestTimestamp();s&&s<this._context.initialTimestamp&&(this._context.initialTimestamp=s)}_popEventContext(){const i={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(),i}async _runFlush(){const i=this.getSessionId();if(!this.session||!this.eventBuffer||!i){$&&P.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await SO(this),!!this.eventBuffer&&i===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const l=Date.now();if(l-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const s=this._popEventContext(),c=this.session.segmentId++;this._maybeSaveSession();const f=await this.eventBuffer.finish();await pv({replayId:i,recordingData:f,segmentId:c,eventContext:s,session:this.session,timestamp:l,onError:h=>this.handleException(h)})}catch(l){this.handleException(l),this.stop({reason:"sendReplay"});const s=Zt();if(s){const c=l instanceof zf?"ratelimit_backoff":"send_error";s.recordDroppedEvent(c,"replay")}}}async _flush({force:i=!1}={}){if(!this._isEnabled&&!i)return;if(!this.checkAndHandleExpiredSession()){$&&P.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const l=this.session.started,c=Date.now()-l;this._debouncedFlush.cancel();const f=c<this._options.minReplayDuration,h=c>this._options.maxReplayDuration+5e3;if(f||h){$&&P.info(`Session duration (${Math.floor(c/1e3)}s) is too ${f?"short":"long"}, not sending replay.`),f&&this._debouncedFlush();return}const g=this.eventBuffer;g&&this.session.segmentId===0&&!g.hasCheckout&&$&&P.info("Flushing initial segment without checkout.");const m=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(y){this.handleException(y)}finally{this._flushLock=void 0,m&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&xf(this.session)}_onMutationHandler(i){const l=i.length,s=this._options.mutationLimit,c=this._options.mutationBreadcrumbLimit,f=s&&l>s;if(l>c||f){const h=tn({category:"replay.mutations",data:{count:l,limit:f}});this._createCustomBreadcrumb(h)}return f?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function kr(n,i){return[...n,...i].join(",")}function kO({mask:n,unmask:i,block:l,unblock:s,ignore:c}){const f=["base","iframe[srcdoc]:not([src])"],h=kr(n,[".sentry-mask","[data-sentry-mask]"]),g=kr(i,[]);return{maskTextSelector:h,unmaskTextSelector:g,blockSelector:kr(l,[".sentry-block","[data-sentry-block]",...f]),unblockSelector:kr(s,[]),ignoreSelector:kr(c,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function zO({el:n,key:i,maskAttributes:l,maskAllText:s,privacyOptions:c,value:f}){return!s||c.unmaskTextSelector&&n.matches(c.unmaskTextSelector)?f:l.includes(i)||i==="value"&&n.tagName==="INPUT"&&["submit","button"].includes(n.getAttribute("type")||"")?f.replace(/[\S]/g,"*"):f}const Dg='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',UO=["content-length","content-type","accept"];let wg=!1;const LO=n=>new BO(n);class BO{constructor({flushMinDelay:i=oT,flushMaxDelay:l=cT,minReplayDuration:s=gT,maxReplayDuration:c=sg,stickySession:f=!0,useCompression:h=!0,workerUrl:g,_experiments:m={},maskAllText:y=!0,maskAllInputs:E=!0,blockAllMedia:_=!0,mutationBreadcrumbLimit:R=750,mutationLimit:w=1e4,slowClickTimeout:k=7e3,slowClickIgnoreSelectors:U=[],networkDetailAllowUrls:q=[],networkDetailDenyUrls:Y=[],networkCaptureBodies:K=!0,networkRequestHeaders:at=[],networkResponseHeaders:nt=[],mask:F=[],maskAttributes:j=["title","placeholder","aria-label"],unmask:tt=[],block:J=[],unblock:B=[],ignore:Z=[],maskFn:ht,beforeAddRecordingEvent:ct,beforeErrorSampling:Ut,onError:Ht}={}){this.name="Replay";const qt=kO({mask:F,unmask:tt,block:J,unblock:B,ignore:Z});if(this._recordingOptions={maskAllInputs:E,maskAllText:y,maskInputOptions:{password:!0},maskTextFn:ht,maskInputFn:ht,maskAttributeFn:(A,z,L)=>zO({maskAttributes:j,maskAllText:y,privacyOptions:qt,key:A,value:z,el:L}),...qt,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:A=>{try{A.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!m.recordCrossOriginIframes},this._initialOptions={flushMinDelay:i,flushMaxDelay:l,minReplayDuration:Math.min(s,yT),maxReplayDuration:Math.min(c,sg),stickySession:f,useCompression:h,workerUrl:g,blockAllMedia:_,maskAllInputs:E,maskAllText:y,mutationBreadcrumbLimit:R,mutationLimit:w,slowClickTimeout:k,slowClickIgnoreSelectors:U,networkDetailAllowUrls:q,networkDetailDenyUrls:Y,networkCaptureBodies:K,networkRequestHeaders:Cg(at),networkResponseHeaders:Cg(nt),beforeAddRecordingEvent:ct,beforeErrorSampling:Ut,onError:Ht,_experiments:m},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Dg}`:Dg),this._isInitialized&&tg())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return wg}set _isInitialized(i){wg=i}afterAllSetup(i){!tg()||this._replay||(this._setup(i),this._initialize(i))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(i){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(i):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(this._replay?.isEnabled())return this._replay.getSessionId()}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(i){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(i),this._replay.initializeSampling())}_setup(i){const l=HO(this._initialOptions,i);this._replay=new NO({options:l,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(i){try{const l=i.getIntegrationByName("ReplayCanvas");if(!l)return;this._replay._canvas=l.getOptions()}catch{}}}function HO(n,i){const l=i.getOptions(),s={sessionSampleRate:0,errorSampleRate:0,...n},c=zc(l.replaysSessionSampleRate),f=zc(l.replaysOnErrorSampleRate);return c==null&&f==null&&Qr(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),c!=null&&(s.sessionSampleRate=c),f!=null&&(s.errorSampleRate=f),s}function Cg(n){return[...UO,...n.map(i=>i.toLowerCase())]}const xg=1e6,Os=String(0),IO="main",js=Nt.navigator;let yv="",vv="",Sv="",nf=js?.userAgent||"",_v="";const qO=js?.language||js?.languages?.[0]||"";function YO(n){return typeof n=="object"&&n!==null&&"getHighEntropyValues"in n}const Ng=js?.userAgentData;YO(Ng)&&Ng.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(n=>{if(yv=n.platform||"",Sv=n.architecture||"",_v=n.model||"",vv=n.platformVersion||"",n.fullVersionList?.length){const i=n.fullVersionList[n.fullVersionList.length-1];nf=`${i.brand} ${i.version}`}}).catch(n=>{});function GO(n){return!("thread_metadata"in n)}function jO(n){return GO(n)?QO(n):n}function XO(n){const i=n.contexts?.trace?.trace_id;return typeof i=="string"&&i.length!==32&&zt&&I.log(`[Profiling] Invalid traceId: ${i} on profiled event`),typeof i!="string"?"":i}function VO(n,i,l,s){if(s.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(l==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${l} instead.`);const c=XO(s),f=jO(l),h=i||(typeof s.start_timestamp=="number"?s.start_timestamp*1e3:_n()*1e3),g=typeof s.timestamp=="number"?s.timestamp*1e3:_n()*1e3;return{event_id:n,timestamp:new Date(h).toISOString(),platform:"javascript",version:"1",release:s.release||"",environment:s.environment||Ig,runtime:{name:"javascript",version:Nt.navigator.userAgent},os:{name:yv,version:vv,build_number:nf},device:{locale:qO,model:_v,manufacturer:nf,architecture:Sv,is_emulator:!1},debug_meta:{images:FO(l.resources)},profile:f,transactions:[{name:s.transaction||"",id:s.event_id||Ma(),trace_id:c,active_thread_id:Os,relative_start_ns:"0",relative_end_ns:((g-h)*1e6).toFixed(0)}]}}function Ev(n){return Ea(n).op==="pageload"}function QO(n){let i,l=0;const s={samples:[],stacks:[],frames:[],thread_metadata:{[Os]:{name:IO}}},c=n.samples[0];if(!c)return s;const f=c.timestamp,h=Zg(),g=typeof performance.timeOrigin=="number"?performance.timeOrigin:h||0,m=g-(h||g);return n.samples.forEach((y,E)=>{if(y.stackId===void 0){i===void 0&&(i=l,s.stacks[i]=[],l++),s.samples[E]={elapsed_since_start_ns:((y.timestamp+m-f)*xg).toFixed(0),stack_id:i,thread_id:Os};return}let _=n.stacks[y.stackId];const R=[];for(;_;){R.push(_.frameId);const k=n.frames[_.frameId];k&&s.frames[_.frameId]===void 0&&(s.frames[_.frameId]={function:k.name,abs_path:typeof k.resourceId=="number"?n.resources[k.resourceId]:void 0,lineno:k.line,colno:k.column}),_=_.parentId===void 0?void 0:n.stacks[_.parentId]}const w={elapsed_since_start_ns:((y.timestamp+m-f)*xg).toFixed(0),stack_id:l,thread_id:Os};s.stacks[l]=R,s.samples[E]=w,l++}),s}function ZO(n,i){if(!i.length)return n;for(const l of i)n[1].push([{type:"profile"},l]);return n}function KO(n){const i=[];return Uc(n,(l,s)=>{if(s==="transaction")for(let c=1;c<l.length;c++){const f=l[c];f?.contexts&&f.contexts.profile&&f.contexts.profile.profile_id&&i.push(l[c])}}),i}function FO(n){const s=Zt()?.getOptions()?.stackParser;return s?R_(s,n):[]}function JO(n){return typeof n!="number"&&typeof n!="boolean"||typeof n=="number"&&isNaN(n)?(zt&&I.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(n)} of type ${JSON.stringify(typeof n)}.`),!1):n===!0||n===!1?!0:n<0||n>1?(zt&&I.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${n}.`),!1):!0}function WO(n){return n.samples.length<2?(zt&&I.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):n.frames.length?!0:(zt&&I.log("[Profiling] Discarding profile because it contains no frames"),!1)}let bv=!1;const Tv=3e4;function $O(n){return typeof n=="function"}function PO(){const n=Nt.Profiler;if(!$O(n)){zt&&I.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const i=10,l=Math.floor(Tv/i);try{return new n({sampleInterval:i,maxBufferSize:l})}catch{zt&&(I.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),I.log("[Profiling] Disabling profiling for current user session.")),bv=!0}}function kg(n){if(bv)return zt&&I.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!n.isRecording())return zt&&I.log("[Profiling] Discarding profile because transaction was not sampled."),!1;const l=Zt()?.getOptions();if(!l)return zt&&I.log("[Profiling] Profiling disabled, no options found."),!1;const s=l.profilesSampleRate;return JO(s)?s?(s===!0?!0:Math.random()<s)?!0:(zt&&I.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(s)})`),!1):(zt&&I.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(zt&&I.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function tA(n,i,l,s){return WO(l)?VO(n,i,l,s):null}const Ta=new Map;function eA(){return Ta.size}function nA(n){const i=Ta.get(n);return i&&Ta.delete(n),i}function aA(n,i){if(Ta.set(n,i),Ta.size>30){const l=Ta.keys().next().value;Ta.delete(l)}}function zg(n){let i;Ev(n)&&(i=_n()*1e3);const l=PO();if(!l)return;zt&&I.log(`[Profiling] started profiling span: ${Ea(n).description}`);const s=Ma();Di().setContext("profile",{profile_id:s,start_timestamp:i});async function c(){if(n&&l)return l.stop().then(m=>{if(f&&(Nt.clearTimeout(f),f=void 0),zt&&I.log(`[Profiling] stopped profiling of span: ${Ea(n).description}`),!m){zt&&I.log(`[Profiling] profiler returned null profile for: ${Ea(n).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}aA(s,m)}).catch(m=>{zt&&I.log("[Profiling] error while stopping profiler:",m)})}let f=Nt.setTimeout(()=>{zt&&I.log("[Profiling] max profile duration elapsed, stopping profiling for:",Ea(n).description),c()},Tv);const h=n.end.bind(n);function g(){return n?(c().then(()=>{h()},()=>{h()}),n):h()}n.end=g}const iA="BrowserProfiling",rA=()=>({name:iA,setup(n){const i=cf(),l=i&&kc(i);l&&Ev(l)&&kg(l)&&zg(l),n.on("spanStart",s=>{s===kc(s)&&kg(s)&&zg(s)}),n.on("beforeEnvelope",s=>{if(!eA())return;const c=KO(s);if(!c.length)return;const f=[];for(const h of c){const g=h?.contexts,m=g?.profile?.profile_id,y=g?.profile?.start_timestamp;if(typeof m!="string"){zt&&I.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!m){zt&&I.log("[Profiling] cannot find profile for a span without a profile context");continue}g?.profile&&delete g.profile;const E=nA(m);if(!E){zt&&I.log(`[Profiling] Could not retrieve profile for span: ${m}`);continue}const _=tA(m,y,E,h);_&&f.push(_)}ZO(s,f)})}}),lA=rA,sA="BrowserTracing";function uA(n){n.integrations&&Array.isArray(n.integrations)&&n.integrations.some(s=>s.name===sA)&&Qr(()=>{console.warn("browserTracingIntegration is not fully compatible with @sentry/react-router. Please use reactRouterTracingIntegration instead.")}),ay(n,"react-router",["react-router","browser"]);const i=rT(n);return O_("runtime","browser"),i}function oA(){ENV.EPICSHOP_IS_PUBLISHED&&uA({dsn:ENV.SENTRY_DSN,environment:ENV.MODE,tunnel:"/resources/lookout",beforeSend(n){if(n.request?.url){const i=new URL(n.request.url);if(i.protocol==="chrome-extension:"||i.protocol==="moz-extension:")return null}return n},integrations:[LO(),lA()],tracesSampleRate:1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1})}oA();x_.hydrateRoot(document,q0.jsx(U_,{}));
55
- //# sourceMappingURL=entry.client-CIjf7Myv.js.map
54
+ `;if(typeof n=="string")l=`${s}${n}`;else{const f=new TextEncoder().encode(s);l=new Uint8Array(f.length+n.length),l.set(f),l.set(n,f.length)}return l}async function DO({client:n,scope:i,replayId:l,event:s}){const c=typeof n._integrations=="object"&&n._integrations!==null&&!Array.isArray(n._integrations)?Object.keys(n._integrations):void 0,f={event_id:l,integrations:c};n.emit("preprocessEvent",s,f);const h=await Yg(n.getOptions(),s,f,i,n,lf());if(!h)return null;n.emit("postprocessEvent",h,f),h.platform=h.platform||"javascript";const g=n.getSdkMetadata(),{name:m,version:y}=g?.sdk||{};return h.sdk={...h.sdk,name:m||"sentry.javascript.unknown",version:y||"0.0.0"},h}async function wO({recordingData:n,replayId:i,segmentId:l,eventContext:s,timestamp:c,session:f}){const h=AO({recordingData:n,headers:{segment_id:l}}),{urls:g,errorIds:m,traceIds:y,initialTimestamp:E}=s,_=Zt(),R=Di(),w=_?.getTransport(),k=_?.getDsn();if(!_||!w||!k||!f.sampled)return bn({});const U={type:lT,replay_start_timestamp:E/1e3,timestamp:c/1e3,error_ids:m,trace_ids:y,urls:g,replay_id:i,segment_id:l,replay_type:f.sampled},q=await DO({scope:R,client:_,replayId:i,event:U});if(!q)return _.recordDroppedEvent("event_processor","replay"),$&&P.info("An event processor returned `null`, will not send event."),bn({});delete q.sdkProcessingMetadata;const Y=OO(q,h,k,_.getOptions().tunnel);let K;try{K=await w.send(Y)}catch(nt){const F=new Error(_f);try{F.cause=nt}catch{}throw F}if(typeof K.statusCode=="number"&&(K.statusCode<200||K.statusCode>=300))throw new mv(K.statusCode);const at=ny({},K);if(ey(at,"replay"))throw new zf(at);return K}class mv extends Error{constructor(i){super(`Transport returned status code ${i}`)}}class zf extends Error{constructor(i){super("Rate limit hit"),this.rateLimits=i}}async function pv(n,i={count:0,interval:dT}){const{recordingData:l,onError:s}=n;if(l.length)try{return await wO(n),!0}catch(c){if(c instanceof mv||c instanceof zf)throw c;if(M_("Replays",{_retryCount:i.count}),s&&s(c),i.count>=hT){const f=new Error(`${_f} - max retries exceeded`);try{f.cause=c}catch{}throw f}return i.interval*=++i.count,new Promise((f,h)=>{Wr(async()=>{try{await pv(n,i),f(!0)}catch(g){h(g)}},i.interval)})}}const gv="__THROTTLED",CO="__SKIPPED";function xO(n,i,l){const s=new Map,c=g=>{const m=g-l;s.forEach((y,E)=>{E<m&&s.delete(E)})},f=()=>[...s.values()].reduce((g,m)=>g+m,0);let h=!1;return(...g)=>{const m=Math.floor(Date.now()/1e3);if(c(m),f()>=i){const E=h;return h=!0,E?CO:gv}h=!1;const y=s.get(m)||0;return s.set(m,y+1),n(...g)}}class NO{constructor({options:i,recordingOptions:l}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:sT,sessionIdleExpire:uT},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=l,this._options=i,this._debouncedFlush=EO(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=xO((h,g)=>OR(this,h,g),300,5);const{slowClickTimeout:s,slowClickIgnoreSelectors:c}=this.getOptions(),f=s?{threshold:Math.min(mT,s),timeout:s,scrollTimeout:pT,ignoreSelector:c?c.join(","):""}:void 0;if(f&&(this.clickDetector=new HM(this,f)),$){const h=i._experiments;P.setConfig({captureExceptions:!!h.captureExceptions,traceInternals:!!h.traceInternals})}this._handleVisibilityChange=()=>{xt.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const h=tn({category:"ui.blur"});this._doChangeToBackgroundTasks(h)},this._handleWindowFocus=()=>{const h=tn({category:"ui.focus"});this._doChangeToForegroundTasks(h)},this._handleKeyboardEvent=h=>{WM(this,h)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(i){$&&P.exception(i),this._options.onError&&this._options.onError(i)}initializeSampling(i){const{errorSampleRate:l,sessionSampleRate:s}=this._options,c=l<=0&&s<=0;if(this._requiresManualStart=c,!c){if(this._initializeSessionForSampling(i),!this.session){$&&P.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",$&&P.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){$&&P.info("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){$&&P.info("Buffering is in progress, call `flush()` to save the replay");return}$&&P.infoTick("Starting replay in session mode"),this._updateUserActivity();const i=wc({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=i,this._initializeRecording()}startBuffering(){if(this._isEnabled){$&&P.info("Buffering is in progress, call `flush()` to save the replay");return}$&&P.infoTick("Starting replay in buffer mode");const i=wc({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=i,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const i=this._canvas;this._stopRecording=En({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:fT}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:TO(this),...bO(),onMutation:this._onMutationHandler.bind(this),...i?{recordCanvas:i.recordCanvas,getCanvasManager:i.getCanvasManager,sampling:i.sampling,dataURLOptions:i.dataURLOptions}:{}})}catch(i){this.handleException(i)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(i){return this.handleException(i),!1}}async stop({forceFlush:i=!1,reason:l}={}){if(this._isEnabled){this._isEnabled=!1;try{$&&P.info(`Stopping Replay${l?` triggered by ${l}`:""}`),ov(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),i&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,ER(this)}catch(s){this.handleException(s)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),$&&P.info("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),$&&P.info("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:i=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const l=Date.now();$&&P.info("Converting buffer to session"),await this.flushImmediate();const s=this.stopRecording();!i||!s||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(l),this._updateSessionActivity(l),this._maybeSaveSession()),this.startRecording())}addUpdate(i){const l=i();this.recordingMode!=="buffer"&&l!==!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(){return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Pc(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const i=`${xt.location.pathname}${xt.location.hash}${xt.location.search}`,l=`${xt.location.origin}${i}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=l,this._context.initialTimestamp=Date.now(),this._context.urls.push(l)}throttledAddEvent(i,l){const s=this._throttledAddEvent(i,l);if(s===gv){const c=tn({category:"replay.throttled"});this.addUpdate(()=>!Nf(this,{type:xM,timestamp:c.timestamp||0,data:{tag:"breadcrumb",payload:c,metric:!0}}))}return s}getCurrentRoute(){const i=this.lastActiveSpan||cf(),l=i&&kc(i),c=(l&&Ea(l).data||{})[E_];if(!(!l||!c||!["route","custom"].includes(c)))return Ea(l).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=vR({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(i){const l=this._options.errorSampleRate>0,s=wc({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:i},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:l});this.session=s}_checkSession(){if(!this.session)return!1;const i=this.session;return rv(i,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(i),!1):!0}async _refreshSession(i){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(i.id))}_addListeners(){try{xt.document.addEventListener("visibilitychange",this._handleVisibilityChange),xt.addEventListener("blur",this._handleWindowBlur),xt.addEventListener("focus",this._handleWindowFocus),xt.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(vO(this,{autoFlushOnFeedback:this._options._experiments.autoFlushOnFeedback}),this._hasInitializedCoreListeners=!0)}catch(i){this.handleException(i)}this._performanceCleanupCallback=fR(this)}_removeListeners(){try{xt.document.removeEventListener("visibilitychange",this._handleVisibilityChange),xt.removeEventListener("blur",this._handleWindowBlur),xt.removeEventListener("focus",this._handleWindowFocus),xt.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(i){this.handleException(i)}}_doChangeToBackgroundTasks(i){!this.session||iv(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(i&&this._createCustomBreadcrumb(i),this.conditionalFlush())}_doChangeToForegroundTasks(i){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){$&&P.info("Document has become active, but session has expired");return}i&&this._createCustomBreadcrumb(i)}_updateUserActivity(i=Date.now()){this._lastActivity=i}_updateSessionActivity(i=Date.now()){this.session&&(this.session.lastActivity=i,this._maybeSaveSession())}_createCustomBreadcrumb(i){this.addUpdate(()=>{this.throttledAddEvent({type:rt.Custom,timestamp:i.timestamp||0,data:{tag:"breadcrumb",payload:i}})})}_addPerformanceEntries(){let i=eR(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const l=this._context.initialTimestamp/1e3;i=i.filter(s=>s.start>=l)}return Promise.all(tu(this,i))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:i,eventBuffer:l}=this;if(!i||!l||this._requiresManualStart||i.segmentId)return;const s=l.getEarliestTimestamp();s&&s<this._context.initialTimestamp&&(this._context.initialTimestamp=s)}_popEventContext(){const i={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(),i}async _runFlush(){const i=this.getSessionId();if(!this.session||!this.eventBuffer||!i){$&&P.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await SO(this),!!this.eventBuffer&&i===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const l=Date.now();if(l-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const s=this._popEventContext(),c=this.session.segmentId++;this._maybeSaveSession();const f=await this.eventBuffer.finish();await pv({replayId:i,recordingData:f,segmentId:c,eventContext:s,session:this.session,timestamp:l,onError:h=>this.handleException(h)})}catch(l){this.handleException(l),this.stop({reason:"sendReplay"});const s=Zt();if(s){const c=l instanceof zf?"ratelimit_backoff":"send_error";s.recordDroppedEvent(c,"replay")}}}async _flush({force:i=!1}={}){if(!this._isEnabled&&!i)return;if(!this.checkAndHandleExpiredSession()){$&&P.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const l=this.session.started,c=Date.now()-l;this._debouncedFlush.cancel();const f=c<this._options.minReplayDuration,h=c>this._options.maxReplayDuration+5e3;if(f||h){$&&P.info(`Session duration (${Math.floor(c/1e3)}s) is too ${f?"short":"long"}, not sending replay.`),f&&this._debouncedFlush();return}const g=this.eventBuffer;g&&this.session.segmentId===0&&!g.hasCheckout&&$&&P.info("Flushing initial segment without checkout.");const m=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(y){this.handleException(y)}finally{this._flushLock=void 0,m&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&xf(this.session)}_onMutationHandler(i){const l=i.length,s=this._options.mutationLimit,c=this._options.mutationBreadcrumbLimit,f=s&&l>s;if(l>c||f){const h=tn({category:"replay.mutations",data:{count:l,limit:f}});this._createCustomBreadcrumb(h)}return f?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function kr(n,i){return[...n,...i].join(",")}function kO({mask:n,unmask:i,block:l,unblock:s,ignore:c}){const f=["base","iframe[srcdoc]:not([src])"],h=kr(n,[".sentry-mask","[data-sentry-mask]"]),g=kr(i,[]);return{maskTextSelector:h,unmaskTextSelector:g,blockSelector:kr(l,[".sentry-block","[data-sentry-block]",...f]),unblockSelector:kr(s,[]),ignoreSelector:kr(c,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function zO({el:n,key:i,maskAttributes:l,maskAllText:s,privacyOptions:c,value:f}){return!s||c.unmaskTextSelector&&n.matches(c.unmaskTextSelector)?f:l.includes(i)||i==="value"&&n.tagName==="INPUT"&&["submit","button"].includes(n.getAttribute("type")||"")?f.replace(/[\S]/g,"*"):f}const Dg='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',UO=["content-length","content-type","accept"];let wg=!1;const LO=n=>new BO(n);class BO{constructor({flushMinDelay:i=oT,flushMaxDelay:l=cT,minReplayDuration:s=gT,maxReplayDuration:c=sg,stickySession:f=!0,useCompression:h=!0,workerUrl:g,_experiments:m={},maskAllText:y=!0,maskAllInputs:E=!0,blockAllMedia:_=!0,mutationBreadcrumbLimit:R=750,mutationLimit:w=1e4,slowClickTimeout:k=7e3,slowClickIgnoreSelectors:U=[],networkDetailAllowUrls:q=[],networkDetailDenyUrls:Y=[],networkCaptureBodies:K=!0,networkRequestHeaders:at=[],networkResponseHeaders:nt=[],mask:F=[],maskAttributes:j=["title","placeholder","aria-label"],unmask:tt=[],block:J=[],unblock:B=[],ignore:Z=[],maskFn:ht,beforeAddRecordingEvent:ct,beforeErrorSampling:Ut,onError:Ht}={}){this.name="Replay";const qt=kO({mask:F,unmask:tt,block:J,unblock:B,ignore:Z});if(this._recordingOptions={maskAllInputs:E,maskAllText:y,maskInputOptions:{password:!0},maskTextFn:ht,maskInputFn:ht,maskAttributeFn:(A,z,L)=>zO({maskAttributes:j,maskAllText:y,privacyOptions:qt,key:A,value:z,el:L}),...qt,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:A=>{try{A.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!m.recordCrossOriginIframes},this._initialOptions={flushMinDelay:i,flushMaxDelay:l,minReplayDuration:Math.min(s,yT),maxReplayDuration:Math.min(c,sg),stickySession:f,useCompression:h,workerUrl:g,blockAllMedia:_,maskAllInputs:E,maskAllText:y,mutationBreadcrumbLimit:R,mutationLimit:w,slowClickTimeout:k,slowClickIgnoreSelectors:U,networkDetailAllowUrls:q,networkDetailDenyUrls:Y,networkCaptureBodies:K,networkRequestHeaders:Cg(at),networkResponseHeaders:Cg(nt),beforeAddRecordingEvent:ct,beforeErrorSampling:Ut,onError:Ht,_experiments:m},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Dg}`:Dg),this._isInitialized&&tg())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return wg}set _isInitialized(i){wg=i}afterAllSetup(i){!tg()||this._replay||(this._setup(i),this._initialize(i))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(i){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(i):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(this._replay?.isEnabled())return this._replay.getSessionId()}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(i){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(i),this._replay.initializeSampling())}_setup(i){const l=HO(this._initialOptions,i);this._replay=new NO({options:l,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(i){try{const l=i.getIntegrationByName("ReplayCanvas");if(!l)return;this._replay._canvas=l.getOptions()}catch{}}}function HO(n,i){const l=i.getOptions(),s={sessionSampleRate:0,errorSampleRate:0,...n},c=zc(l.replaysSessionSampleRate),f=zc(l.replaysOnErrorSampleRate);return c==null&&f==null&&Qr(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),c!=null&&(s.sessionSampleRate=c),f!=null&&(s.errorSampleRate=f),s}function Cg(n){return[...UO,...n.map(i=>i.toLowerCase())]}const xg=1e6,Os=String(0),IO="main",js=Nt.navigator;let yv="",vv="",Sv="",nf=js?.userAgent||"",_v="";const qO=js?.language||js?.languages?.[0]||"";function YO(n){return typeof n=="object"&&n!==null&&"getHighEntropyValues"in n}const Ng=js?.userAgentData;YO(Ng)&&Ng.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(n=>{if(yv=n.platform||"",Sv=n.architecture||"",_v=n.model||"",vv=n.platformVersion||"",n.fullVersionList?.length){const i=n.fullVersionList[n.fullVersionList.length-1];nf=`${i.brand} ${i.version}`}}).catch(n=>{});function GO(n){return!("thread_metadata"in n)}function jO(n){return GO(n)?QO(n):n}function XO(n){const i=n.contexts?.trace?.trace_id;return typeof i=="string"&&i.length!==32&&zt&&I.log(`[Profiling] Invalid traceId: ${i} on profiled event`),typeof i!="string"?"":i}function VO(n,i,l,s){if(s.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(l==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${l} instead.`);const c=XO(s),f=jO(l),h=i||(typeof s.start_timestamp=="number"?s.start_timestamp*1e3:_n()*1e3),g=typeof s.timestamp=="number"?s.timestamp*1e3:_n()*1e3;return{event_id:n,timestamp:new Date(h).toISOString(),platform:"javascript",version:"1",release:s.release||"",environment:s.environment||Ig,runtime:{name:"javascript",version:Nt.navigator.userAgent},os:{name:yv,version:vv,build_number:nf},device:{locale:qO,model:_v,manufacturer:nf,architecture:Sv,is_emulator:!1},debug_meta:{images:FO(l.resources)},profile:f,transactions:[{name:s.transaction||"",id:s.event_id||Ma(),trace_id:c,active_thread_id:Os,relative_start_ns:"0",relative_end_ns:((g-h)*1e6).toFixed(0)}]}}function Ev(n){return Ea(n).op==="pageload"}function QO(n){let i,l=0;const s={samples:[],stacks:[],frames:[],thread_metadata:{[Os]:{name:IO}}},c=n.samples[0];if(!c)return s;const f=c.timestamp,h=Zg(),g=typeof performance.timeOrigin=="number"?performance.timeOrigin:h||0,m=g-(h||g);return n.samples.forEach((y,E)=>{if(y.stackId===void 0){i===void 0&&(i=l,s.stacks[i]=[],l++),s.samples[E]={elapsed_since_start_ns:((y.timestamp+m-f)*xg).toFixed(0),stack_id:i,thread_id:Os};return}let _=n.stacks[y.stackId];const R=[];for(;_;){R.push(_.frameId);const k=n.frames[_.frameId];k&&s.frames[_.frameId]===void 0&&(s.frames[_.frameId]={function:k.name,abs_path:typeof k.resourceId=="number"?n.resources[k.resourceId]:void 0,lineno:k.line,colno:k.column}),_=_.parentId===void 0?void 0:n.stacks[_.parentId]}const w={elapsed_since_start_ns:((y.timestamp+m-f)*xg).toFixed(0),stack_id:l,thread_id:Os};s.stacks[l]=R,s.samples[E]=w,l++}),s}function ZO(n,i){if(!i.length)return n;for(const l of i)n[1].push([{type:"profile"},l]);return n}function KO(n){const i=[];return Uc(n,(l,s)=>{if(s==="transaction")for(let c=1;c<l.length;c++){const f=l[c];f?.contexts&&f.contexts.profile&&f.contexts.profile.profile_id&&i.push(l[c])}}),i}function FO(n){const s=Zt()?.getOptions()?.stackParser;return s?R_(s,n):[]}function JO(n){return typeof n!="number"&&typeof n!="boolean"||typeof n=="number"&&isNaN(n)?(zt&&I.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(n)} of type ${JSON.stringify(typeof n)}.`),!1):n===!0||n===!1?!0:n<0||n>1?(zt&&I.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${n}.`),!1):!0}function WO(n){return n.samples.length<2?(zt&&I.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):n.frames.length?!0:(zt&&I.log("[Profiling] Discarding profile because it contains no frames"),!1)}let bv=!1;const Tv=3e4;function $O(n){return typeof n=="function"}function PO(){const n=Nt.Profiler;if(!$O(n)){zt&&I.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const i=10,l=Math.floor(Tv/i);try{return new n({sampleInterval:i,maxBufferSize:l})}catch{zt&&(I.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),I.log("[Profiling] Disabling profiling for current user session.")),bv=!0}}function kg(n){if(bv)return zt&&I.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!n.isRecording())return zt&&I.log("[Profiling] Discarding profile because transaction was not sampled."),!1;const l=Zt()?.getOptions();if(!l)return zt&&I.log("[Profiling] Profiling disabled, no options found."),!1;const s=l.profilesSampleRate;return JO(s)?s?(s===!0?!0:Math.random()<s)?!0:(zt&&I.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(s)})`),!1):(zt&&I.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(zt&&I.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function tA(n,i,l,s){return WO(l)?VO(n,i,l,s):null}const Ta=new Map;function eA(){return Ta.size}function nA(n){const i=Ta.get(n);return i&&Ta.delete(n),i}function aA(n,i){if(Ta.set(n,i),Ta.size>30){const l=Ta.keys().next().value;Ta.delete(l)}}function zg(n){let i;Ev(n)&&(i=_n()*1e3);const l=PO();if(!l)return;zt&&I.log(`[Profiling] started profiling span: ${Ea(n).description}`);const s=Ma();Di().setContext("profile",{profile_id:s,start_timestamp:i});async function c(){if(n&&l)return l.stop().then(m=>{if(f&&(Nt.clearTimeout(f),f=void 0),zt&&I.log(`[Profiling] stopped profiling of span: ${Ea(n).description}`),!m){zt&&I.log(`[Profiling] profiler returned null profile for: ${Ea(n).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}aA(s,m)}).catch(m=>{zt&&I.log("[Profiling] error while stopping profiler:",m)})}let f=Nt.setTimeout(()=>{zt&&I.log("[Profiling] max profile duration elapsed, stopping profiling for:",Ea(n).description),c()},Tv);const h=n.end.bind(n);function g(){return n?(c().then(()=>{h()},()=>{h()}),n):h()}n.end=g}const iA="BrowserProfiling",rA=()=>({name:iA,setup(n){const i=cf(),l=i&&kc(i);l&&Ev(l)&&kg(l)&&zg(l),n.on("spanStart",s=>{s===kc(s)&&kg(s)&&zg(s)}),n.on("beforeEnvelope",s=>{if(!eA())return;const c=KO(s);if(!c.length)return;const f=[];for(const h of c){const g=h?.contexts,m=g?.profile?.profile_id,y=g?.profile?.start_timestamp;if(typeof m!="string"){zt&&I.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!m){zt&&I.log("[Profiling] cannot find profile for a span without a profile context");continue}g?.profile&&delete g.profile;const E=nA(m);if(!E){zt&&I.log(`[Profiling] Could not retrieve profile for span: ${m}`);continue}const _=tA(m,y,E,h);_&&f.push(_)}ZO(s,f)})}}),lA=rA,sA="BrowserTracing";function uA(n){n.integrations&&Array.isArray(n.integrations)&&n.integrations.some(s=>s.name===sA)&&Qr(()=>{console.warn("browserTracingIntegration is not fully compatible with @sentry/react-router. Please use reactRouterTracingIntegration instead.")}),ay(n,"react-router",["react-router","browser"]);const i=rT(n);return O_("runtime","browser"),i}function oA(){ENV.EPICSHOP_IS_PUBLISHED&&uA({dsn:ENV.SENTRY_DSN,environment:ENV.MODE,tunnel:"/resources/lookout",denyUrls:[/extensions\//i,/^chrome:\/\//i],beforeSend(n){if(n.request?.url){const i=new URL(n.request.url);if(i.protocol==="chrome-extension:"||i.protocol==="moz-extension:")return null}return n},integrations:[LO(),lA()],tracesSampleRate:1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1})}oA();x_.hydrateRoot(document,q0.jsx(U_,{}));
55
+ //# sourceMappingURL=entry.client-BBAOJsmr.js.map