@lucida-analytics/browser 0.1.12 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/autocapture.d.ts +1 -1
- package/dist/{client-C9F2fWI4.d.ts → client-D732FYEb.d.ts} +2 -2
- package/dist/consent.d.ts +6 -2
- package/dist/consent.js +1 -1
- package/dist/core.d.ts +3 -3
- package/dist/core.js +2 -2
- package/dist/correlate.d.ts +1 -1
- package/dist/early-access.d.ts +1 -1
- package/dist/experiments.d.ts +1 -1
- package/dist/flags.d.ts +1 -1
- package/dist/forms.d.ts +1 -1
- package/dist/guides.d.ts +1 -1
- package/dist/heatmaps.d.ts +1 -1
- package/dist/host-headers.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/inspector.d.ts +1 -1
- package/dist/lucida.js +2 -2
- package/dist/recommendations.d.ts +1 -1
- package/dist/{recorder-AJ7XX7OZ.js → recorder-MHNUIAAP.js} +1 -1
- package/dist/replay.d.ts +2 -2
- package/dist/replay.js +1 -1
- package/dist/static/v0/consent.js +1 -1
- package/dist/static/v0/core.js +2 -2
- package/dist/static/v0/index.js +2 -2
- package/dist/static/v0/lucida.js +2 -2
- package/dist/static/v0/manifest.json +8 -8
- package/dist/static/{v0.1.12/recorder-AJ7XX7OZ.js → v0/recorder-MHNUIAAP.js} +1 -1
- package/dist/static/v0/replay.js +1 -1
- package/dist/static/v0/toolbar.js +4 -4
- package/dist/static/v0.1.14/consent.js +1 -0
- package/dist/static/{v0.1.12 → v0.1.14}/core.js +2 -2
- package/dist/static/v0.1.14/index.js +3 -0
- package/dist/static/v0.1.14/lucida.js +3 -0
- package/dist/static/{v0.1.12 → v0.1.14}/manifest.json +8 -8
- package/dist/static/{v0/recorder-AJ7XX7OZ.js → v0.1.14/recorder-MHNUIAAP.js} +1 -1
- package/dist/static/{v0.1.12 → v0.1.14}/replay.js +1 -1
- package/dist/static/v0.1.14/toolbar.js +4 -0
- package/dist/toolbar.d.ts +1 -1
- package/dist/toolbar.js +4 -4
- package/dist/{types-Chfj1wdu.d.ts → types-BnEbxGJq.d.ts} +1 -1
- package/dist/webmcp.d.ts +1 -1
- package/package.json +1 -1
- package/storage.json +1 -1
- package/dist/static/v0.1.12/consent.js +0 -1
- package/dist/static/v0.1.12/index.js +0 -3
- package/dist/static/v0.1.12/lucida.js +0 -3
- package/dist/static/v0.1.12/toolbar.js +0 -4
- /package/dist/static/{v0.1.12 → v0.1.14}/autocapture.js +0 -0
- /package/dist/static/{v0.1.12 → v0.1.14}/banner-TXLAMTQM.js +0 -0
- /package/dist/static/{v0.1.12 → v0.1.14}/chunk-AWIQCFGN.js +0 -0
- /package/dist/static/{v0.1.12 → v0.1.14}/chunk-B722OERZ.js +0 -0
- /package/dist/static/{v0.1.12 → v0.1.14}/chunk-EFNCQJI3.js +0 -0
- /package/dist/static/{v0.1.12 → v0.1.14}/chunk-IXDYCBAD.js +0 -0
- /package/dist/static/{v0.1.12 → v0.1.14}/chunk-UPPUYIIH.js +0 -0
- /package/dist/static/{v0.1.12 → v0.1.14}/correlate.js +0 -0
- /package/dist/static/{v0.1.12 → v0.1.14}/early-access.js +0 -0
- /package/dist/static/{v0.1.12 → v0.1.14}/experiments.js +0 -0
- /package/dist/static/{v0.1.12 → v0.1.14}/flags.js +0 -0
- /package/dist/static/{v0.1.12 → v0.1.14}/forms.js +0 -0
- /package/dist/static/{v0.1.12 → v0.1.14}/guides.js +0 -0
- /package/dist/static/{v0.1.12 → v0.1.14}/heatmaps.js +0 -0
- /package/dist/static/{v0.1.12 → v0.1.14}/host-headers.js +0 -0
- /package/dist/static/{v0.1.12 → v0.1.14}/inspector.js +0 -0
- /package/dist/static/{v0.1.12 → v0.1.14}/modules-FANMZRDJ.js +0 -0
- /package/dist/static/{v0.1.12 → v0.1.14}/persistent-G2OR2L2N.js +0 -0
- /package/dist/static/{v0.1.12 → v0.1.14}/recommendations.js +0 -0
- /package/dist/static/{v0.1.12 → v0.1.14}/validation-S6TYVWAI.js +0 -0
- /package/dist/static/{v0.1.12 → v0.1.14}/webmcp.js +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.1.
|
|
2
|
+
"version": "0.1.14",
|
|
3
3
|
"files": {
|
|
4
4
|
"autocapture.js": "sha384-Yeaj4auYKc2SUHup0hcU28qycDNQF23biNXJ31IpaE4jLhAO1UJM97e3wba2PPNt",
|
|
5
5
|
"banner-TXLAMTQM.js": "sha384-o/r8rh/gOYIPxFRZUpf8EVcVpOMMszbgdkHVkHs603LjCxNkA5cXiYki9GVL+KkD",
|
|
6
|
-
"consent.js": "sha384-
|
|
7
|
-
"core.js": "sha384-
|
|
6
|
+
"consent.js": "sha384-OTuFOodMIW5E/44jKwKGtvBw+DHqnuaS4dQ0eEGKbuP0kKO2cwEMgWrsEIPKpM8u",
|
|
7
|
+
"core.js": "sha384-B46Q8aQZtbFNypGAS+sqEHNZcClmcpAlrFB5YaaNCtZL5KjJtmWoYrOC2wefW+Ff",
|
|
8
8
|
"correlate.js": "sha384-VcfDDPARiL7tAELZDbkb0gT78Y9BLGY6iB7KHjApfDLTxfaUeo07l0o5pnY2AjRT",
|
|
9
9
|
"early-access.js": "sha384-5JZ6DWRYgfoeu7QgSPi8kvVlys4CZ6H2wWuvEEggc83iau5z0sJ8RQD1AXtLCjGQ",
|
|
10
10
|
"experiments.js": "sha384-5smoFlAcR2T1XmBgazy5HGun22PvX5Pa7IKIKtONtN/CpNy6U9SDWb7W7Di9d5fR",
|
|
@@ -13,15 +13,15 @@
|
|
|
13
13
|
"guides.js": "sha384-L04oyaUz6CUQsRmlgACfa+LIO1X5V6IxynArZ/BbnBFNOF/KtzAcNhjSKrCUEpwX",
|
|
14
14
|
"heatmaps.js": "sha384-5+7QtGYM5CTW7R/ZL42MiCVdJUxRwglV6sHwWtyatO6SzjHuuYrZ29SoXm/NtasE",
|
|
15
15
|
"host-headers.js": "sha384-8OsSDIVDEo3Lsk3G+L5xNJ4pkAYXDEAz+ggBK7sG1cj7tOITAXDKaM2EFtQCHGiF",
|
|
16
|
-
"index.js": "sha384-
|
|
16
|
+
"index.js": "sha384-fE912LAyxdkvEL95+HD5hI+UK5a3IQH0rvYOZDZPwgUPWqLtPoIomSJYgO7ofnOW",
|
|
17
17
|
"inspector.js": "sha384-wCjcdzjbZ1mAYS3w19Io8NOJQfrnlmfDkinoan/0LUTqCw6M7OSR9QDwxDp6M5+T",
|
|
18
|
-
"lucida.js": "sha384-
|
|
18
|
+
"lucida.js": "sha384-4SgljJALO+s7wdXTCnXcV2ZMnoPZk7vYVPZJcfRsgntBGySaNHx2XICE8XELI95a",
|
|
19
19
|
"modules-FANMZRDJ.js": "sha384-UjLSth+cPZTIxwMGFgoUEocqFSHXnM7IgYpICNSRRU7NTlFkfCg3WUNUbu8u04EP",
|
|
20
20
|
"persistent-G2OR2L2N.js": "sha384-CsRTVYxlt1E++G7NYAPkyM+1qFJWbIBLRUNukG/wFP1pPLHTvKp6XIlxlGm9+efp",
|
|
21
21
|
"recommendations.js": "sha384-6XyPo/sQd1LNvQ87+vlgOLYe/ecapP9mmDeKlkTRx15d9gTAmDRwCPrX+n6zy2lx",
|
|
22
|
-
"recorder-
|
|
23
|
-
"replay.js": "sha384-
|
|
24
|
-
"toolbar.js": "sha384-
|
|
22
|
+
"recorder-MHNUIAAP.js": "sha384-e4zEmTuDgvv1OwNBei0HkABbpgW+T5WQGeQl9gDxoelIZZ84t9EslLCdvdbUO/r/",
|
|
23
|
+
"replay.js": "sha384-35wLbPcEOHEutSWCaPqOIr1i/rNYike634HoLU0gPbjBvVJMAXfK5VQTmW6GEbQh",
|
|
24
|
+
"toolbar.js": "sha384-sj5J2VxduVx3JUkgQreWVs9lkk6iLsrPjiVSHh7kNQXxf+xUO6s5MvAOs5R3RCAv",
|
|
25
25
|
"validation-S6TYVWAI.js": "sha384-FJISudb3fVX9JZKMgLnOxqdzmfOj9BetMKw7jVvI3UlkyGNaarRpTCMBqfXKupRW",
|
|
26
26
|
"webmcp.js": "sha384-Vs+fImvLlnbEZtId9H/pA4VXB1bVaxEjOYY+DcAUTN5pXXuNNFOYQfltuj2giALZ"
|
|
27
27
|
}
|
|
@@ -75,5 +75,5 @@ or you can use record.mirror to access the mirror instance during recording.`,mr
|
|
|
75
75
|
};
|
|
76
76
|
})();
|
|
77
77
|
//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
|
|
78
|
-
`,Cr=typeof self<"u"&&self.Blob&&new Blob([Zr],{type:"text/javascript;charset=utf-8"});function fi(e){let t;try{if(t=Cr&&(self.URL||self.webkitURL).createObjectURL(Cr),!t)throw"";let r=new Worker(t,{name:e?.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Zr),{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var Ut=class{constructor(t){v(this,"pendingCanvasMutations",new Map),v(this,"rafStamps",{latestId:0,invokeId:null}),v(this,"mirror"),v(this,"mutationCb"),v(this,"resetObservers"),v(this,"frozen",!1),v(this,"locked",!1),v(this,"processMutation",(l,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(c)});let{sampling:r="all",win:n,blockClass:o,blockSelector:i,recordCanvas:s,dataURLOptions:a}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,s&&r==="all"&&this.initCanvasMutationObserver(n,o,i),s&&typeof r=="number"&&this.initCanvasFPSObserver(r,n,o,i,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,r,n,o,i){let s=br(r,n,o,!0),a=new Map,l=new fi;l.onmessage=m=>{let{id:f}=m.data;if(a.set(f,!1),!("base64"in m.data))return;let{base64:y,type:S,width:w,height:g}=m.data;this.mutationCb({id:f,type:Ue["2D"],commands:[{property:"clearRect",args:[0,0,w,g]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:y}],type:S}]},0,0]}]})};let c=1e3/t,u=0,p,d=()=>{let m=[];return r.document.querySelectorAll("canvas").forEach(f=>{le(f,n,o,!0)||m.push(f)}),m},h=m=>{if(u&&m-u<c){p=requestAnimationFrame(h);return}u=m,d().forEach(async f=>{var y;let S=this.mirror.getId(f);if(a.get(S)||f.width===0||f.height===0)return;if(a.set(S,!0),["webgl","webgl2"].includes(f.__context)){let g=f.getContext(f.__context);((y=g?.getContextAttributes())==null?void 0:y.preserveDrawingBuffer)===!1&&g.clear(g.COLOR_BUFFER_BIT)}let w=await createImageBitmap(f);l.postMessage({id:S,bitmap:w,width:f.width,height:f.height,dataURLOptions:i.dataURLOptions},[w])}),p=requestAnimationFrame(h)};p=requestAnimationFrame(h),this.resetObservers=()=>{s(),cancelAnimationFrame(p)}}initCanvasMutationObserver(t,r,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let o=br(t,r,n,!1),i=li(this.processMutation.bind(this),t,r,n),s=ci(this.processMutation.bind(this),t,r,n);this.resetObservers=()=>{o(),i(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{let n=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(t);if(!n||r===-1)return;let o=n.map(s=>{let{type:a,...l}=s;return l}),{type:i}=n[0];this.mutationCb({id:r,type:i,commands:o}),this.pendingCanvasMutations.delete(t)}},$t=class{constructor(t){v(this,"trackedLinkElements",new WeakSet),v(this,"mutationCb"),v(this,"adoptedStyleSheetCb"),v(this,"styleMirror",new At),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;let n={id:r,styleIds:[]},o=[];for(let i of t){let s;this.styleMirror.has(i)?s=this.styleMirror.getId(i):(s=this.styleMirror.add(i),o.push({styleId:s,rules:Array.from(i.rules||CSSRule,(a,l)=>({rule:xr(a,i.href),index:l}))})),n.styleIds.push(s)}o.length>0&&(n.styles=o),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}},Bt=class{constructor(){v(this,"nodeMap",new WeakMap),v(this,"active",!1)}inOtherBuffer(t,r){let n=this.nodeMap.get(t);return n&&Array.from(n).some(o=>o!==r)}add(t,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}},q,ct,xe,Ke=!1;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=((lr=e.contentWindow)==null?void 0:lr.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var ge=fo();function ue(e={}){let{emit:t,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:o="rr-block",blockSelector:i=null,ignoreClass:s="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=!0,maskAllInputs:p,maskInputOptions:d,slimDOMOptions:h,maskInputFn:m,maskTextFn:f,hooks:y,packFn:S,sampling:w={},dataURLOptions:g={},mousemoveWait:b,recordDOM:k=!0,recordCanvas:R=!1,recordCrossOriginIframes:E=!1,recordAfter:I=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:x=!1,collectFonts:P=!1,inlineImages:H=!1,plugins:U,keepIframeSrcFn:T=()=>!1,ignoreCSSAttributes:X=new Set([]),errorHandler:K}=e;Go(K);let N=E?window.parent===window:!0,F=!1;if(!N)try{window.parent.document&&(F=!1)}catch{F=!0}if(N&&!t)throw new Error("emit function is required");if(!N&&!F)return()=>{};b!==void 0&&w.mousemove===void 0&&(w.mousemove=b),ge.reset();let W=p===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:d!==void 0?d:{password:!0},G=Ar(h);$o();let de,ne=0,ye=D=>{for(let Y of U||[])Y.eventProcessor&&(D=Y.eventProcessor(D));return S&&!F&&(D=S(D)),D};q=(D,Y)=>{let O=D;if(O.timestamp=Xe(),O.type!==L.FullSnapshot&&!(O.type===L.IncrementalSnapshot&&O.data.source===A.Mutation)){xe.unfreeze();for(let V of Pe)if(V.isFrozen())V.unfreeze();else break}if(N)t?.(ye(O),Y);else if(F){let V={type:"rrweb",event:ye(O),origin:window.location.origin,isCheckout:Y};window.parent.postMessage(V,"*")}if(O.type===L.FullSnapshot)de=O,ne=0;else if(O.type===L.IncrementalSnapshot){if(O.data.source===A.Mutation&&O.data.isAttachIframe)return;ne++;let V=n&&ne>=n,ae=r&&O.timestamp-de.timestamp>r;(V||ae)&&ct(!0)}};let te=D=>{q({type:L.IncrementalSnapshot,data:{source:A.Mutation,...D}})},oe=D=>q({type:L.IncrementalSnapshot,data:{source:A.Scroll,...D}}),j=D=>q({type:L.IncrementalSnapshot,data:{source:A.CanvasMutation,...D}}),ve=D=>q({type:L.IncrementalSnapshot,data:{source:A.AdoptedStyleSheet,...D}}),me=new $t({mutationCb:te,adoptedStyleSheetCb:ve}),ie=new zt({mirror:ge,mutationCb:te,stylesheetManager:me,recordCrossOriginIframes:E,wrappedEmit:q});for(let D of U||[])D.getMirror&&D.getMirror({nodeMirror:ge,crossOriginIframeMirror:ie.crossOriginIframeMirror,crossOriginIframeStyleMirror:ie.crossOriginIframeStyleMirror});let we=new Bt;xe=new Ut({recordCanvas:R,mutationCb:j,win:window,blockClass:o,blockSelector:i,mirror:ge,sampling:w.canvas,dataURLOptions:g});let se=new Pt({mutationCb:te,scrollCb:oe,bypassOptions:{blockClass:o,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:W,dataURLOptions:g,maskTextFn:f,maskInputFn:m,recordCanvas:R,inlineImages:H,sampling:w,slimDOMOptions:G,iframeManager:ie,stylesheetManager:me,canvasManager:xe,keepIframeSrcFn:T,processedNodeManager:we},mirror:ge});ct=(D=!1)=>{if(!k)return;q({type:L.Meta,data:{href:window.location.href,width:Fr(),height:_r()}},D),me.reset(),se.init(),xe.lock(),Pe.forEach(O=>O.lock());let Y=Po(document,{mirror:ge,blockClass:o,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:W,maskTextFn:f,maskInputFn:m,slimDOM:G,dataURLOptions:g,recordCanvas:R,inlineImages:H,onSerialize:O=>{Ur(O,ge)&&ie.addIframe(O),$r(O,ge)&&me.trackLinkElement(O),Lt(O)&&se.addShadowRoot(M.shadowRoot(O),document)},onIframeLoad:(O,V)=>{ie.attachIframe(O,V),se.observeAttachShadow(O)},onStylesheetLoad:(O,V)=>{me.attachLinkElement(O,V)},keepIframeSrcFn:T});if(!Y)return console.warn("Failed to snapshot the document");q({type:L.FullSnapshot,data:{node:Y,initialOffset:Dr(window)}},D),xe.unlock(),Pe.forEach(O=>O.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&me.adoptStyleSheets(document.adoptedStyleSheets,ge.getId(document))};try{let D=[],Y=ae=>{var J;return _(oi)({mutationCb:te,mousemoveCb:($,be)=>q({type:L.IncrementalSnapshot,data:{source:be,positions:$}}),mouseInteractionCb:$=>q({type:L.IncrementalSnapshot,data:{source:A.MouseInteraction,...$}}),scrollCb:oe,viewportResizeCb:$=>q({type:L.IncrementalSnapshot,data:{source:A.ViewportResize,...$}}),inputCb:$=>q({type:L.IncrementalSnapshot,data:{source:A.Input,...$}}),mediaInteractionCb:$=>q({type:L.IncrementalSnapshot,data:{source:A.MediaInteraction,...$}}),styleSheetRuleCb:$=>q({type:L.IncrementalSnapshot,data:{source:A.StyleSheetRule,...$}}),styleDeclarationCb:$=>q({type:L.IncrementalSnapshot,data:{source:A.StyleDeclaration,...$}}),canvasMutationCb:j,fontCb:$=>q({type:L.IncrementalSnapshot,data:{source:A.Font,...$}}),selectionCb:$=>{q({type:L.IncrementalSnapshot,data:{source:A.Selection,...$}})},customElementCb:$=>{q({type:L.IncrementalSnapshot,data:{source:A.CustomElement,...$}})},blockClass:o,ignoreClass:s,ignoreSelector:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:W,inlineStylesheet:u,sampling:w,recordDOM:k,recordCanvas:R,inlineImages:H,userTriggeredOnInput:x,collectFonts:P,doc:ae,maskInputFn:m,maskTextFn:f,keepIframeSrcFn:T,blockSelector:i,slimDOMOptions:G,dataURLOptions:g,mirror:ge,iframeManager:ie,stylesheetManager:me,shadowDomManager:se,processedNodeManager:we,canvasManager:xe,ignoreCSSAttributes:X,plugins:((J=U?.filter($=>$.observer))==null?void 0:J.map($=>({observer:$.observer,options:$.options,callback:be=>q({type:L.Plugin,data:{plugin:$.name,payload:be}})})))||[]},y)},O=new Map;ie.addLoadListener(ae=>{try{let J=ae.contentDocument;if(O.has(J))return;O.set(J,Y(J))}catch(J){console.warn(J)}}),ie.addUnloadListener(ae=>{let J=O.get(ae);J&&(O.delete(ae),J(),se.removeShadowRootsIn(ae),ge.removeNodeFromMap(ae))});let V=()=>{ct(),D.push(Y(document)),Ke=!0};return["interactive","complete"].includes(document.readyState)?V():(D.push(re("DOMContentLoaded",()=>{q({type:L.DomContentLoaded,data:{}}),I==="DOMContentLoaded"&&V()})),D.push(re("load",()=>{q({type:L.Load,data:{}}),I==="load"&&V()},window))),()=>{[...D,...O.values()].forEach(ae=>{try{ae()}catch(J){String(J).toLowerCase().includes("cross-origin")||console.warn(J)}}),O.clear(),ie.destroy(),we.destroy(),se.reset(),xe.reset(),Ke=!1,jo()}}catch(D){console.warn(D)}}ue.addCustomEvent=(e,t)=>{if(!Ke)throw new Error("please add custom event after start recording");q({type:L.Custom,data:{tag:e,payload:t}})};ue.addAnnotation=e=>{if(!Ke)throw new Error("please add annotation after recording started");q({type:L.Annotation,data:e})};ue.freezePage=()=>{xe.freeze(),Pe.forEach(e=>e.freeze())};ue.takeFullSnapshot=e=>{if(!Ke)throw new Error("please take full snapshot after start recording");ct(e)};ue.mirror=ge;var Kr=["gclid","gad_source","gclsrc","dclid","gbraid","wbraid","fbclid","igshid","msclkid","ttclid","li_fat_id","twclid","mc_cid","rdt_cid","epik","qclid","sccid","oppref","bfcid","irclid","_kx"];var Yr=["utm_source","utm_medium","utm_campaign","utm_term","utm_content"];var di="<masked>",hi=["password","passwd","pwd","pass","token","access_token","refresh_token","id_token","secret","client_secret","api_key","apikey","key","auth","authorization","code","otp","email","ssn"];var pi=[/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,/^[0-9a-hjkmnp-tv-z]{26}$/i,/^\d{4,}$/,/^[0-9a-f]{16,}$/i,/^(?=.*\d)[a-z0-9_-]{20,}$/i],mi=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");function gi(e,t){let r=e;for(let n of t.pathRules??[])try{r=r.replace(typeof n.match=="string"?new RegExp(n.match):n.match,n.replace)}catch{}return t.maskPathIds?r.split("/").map(n=>pi.some(o=>o.test(n))?":id":n).join("/"):r}function Jr(e,t){let r=e;if(t.pathRules?.length||t.maskPathIds){let o=/^((?:[a-z][a-z0-9+.-]*:)?\/\/[^/?#]*)?([^?#]*)([\s\S]*)$/i.exec(r);o&&(r=(o[1]??"")+gi(o[2],t)+o[3])}let n=[...hi,...t.maskParams??[],...t.maskCampaignParams?[...Yr,...Kr]:[]];if(n.length){let o=r.indexOf("#"),i=o<0?r:r.slice(0,o),s=o<0?"":r.slice(o);r=i.replace(new RegExp(`([?&])(${n.map(mi).join("|")})=[^&]*`,"gi"),`$1$2=${di}`)+s}return t.stripHash&&(r=r.replace(/#.*$/,"")),r}var fe=Uint8Array,pe=Uint16Array,Zt=Int32Array,Kt=new fe([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]),Yt=new fe([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]),Qr=new fe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),on=function(e,t){for(var r=new pe(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];for(var o=new Zt(r[30]),n=1;n<30;++n)for(var i=r[n];i<r[n+1];++i)o[i]=i-r[n]<<5|n;return{b:r,r:o}},sn=on(Kt,2),yi=sn.b,jt=sn.r;yi[28]=258,jt[258]=28;var an=on(Yt,0),ts=an.b,en=an.r,qt=new pe(32768);for(z=0;z<32768;++z)ke=(z&43690)>>1|(z&21845)<<1,ke=(ke&52428)>>2|(ke&13107)<<2,ke=(ke&61680)>>4|(ke&3855)<<4,qt[z]=((ke&65280)>>8|(ke&255)<<8)>>1;var ke,z,et=(function(e,t,r){for(var n=e.length,o=0,i=new pe(t);o<n;++o)e[o]&&++i[e[o]-1];var s=new pe(t);for(o=1;o<t;++o)s[o]=s[o-1]+i[o-1]<<1;var a;if(r){a=new pe(1<<t);var l=15-t;for(o=0;o<n;++o)if(e[o])for(var c=o<<4|e[o],u=t-e[o],p=s[e[o]-1]++<<u,d=p|(1<<u)-1;p<=d;++p)a[qt[p]>>l]=c}else for(a=new pe(n),o=0;o<n;++o)e[o]&&(a[o]=qt[s[e[o]-1]++]>>15-e[o]);return a}),Oe=new fe(288);for(z=0;z<144;++z)Oe[z]=8;var z;for(z=144;z<256;++z)Oe[z]=9;var z;for(z=256;z<280;++z)Oe[z]=7;var z;for(z=280;z<288;++z)Oe[z]=8;var z,bt=new fe(32);for(z=0;z<32;++z)bt[z]=5;var z,vi=et(Oe,9,0);var wi=et(bt,5,0);var ln=function(e){return(e+7)/8|0},un=function(e,t,r){return(t==null||t<0)&&(t=0),(r==null||r>e.length)&&(r=e.length),new fe(e.subarray(t,r))};var Me=function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8},Je=function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8,e[n+2]|=r>>16},Gt=function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var o=r.length,i=r.slice();if(!o)return{t:fn,l:0};if(o==1){var s=new fe(r[0].s+1);return s[r[0].s]=1,{t:s,l:1}}r.sort(function(k,R){return k.f-R.f}),r.push({s:-1,f:25001});var a=r[0],l=r[1],c=0,u=1,p=2;for(r[0]={s:-1,f:a.f+l.f,l:a,r:l};u!=o-1;)a=r[r[c].f<r[p].f?c++:p++],l=r[c!=u&&r[c].f<r[p].f?c++:p++],r[u++]={s:-1,f:a.f+l.f,l:a,r:l};for(var d=i[0].s,n=1;n<o;++n)i[n].s>d&&(d=i[n].s);var h=new pe(d+1),m=Vt(r[u-1],h,0);if(m>t){var n=0,f=0,y=m-t,S=1<<y;for(i.sort(function(R,E){return h[E.s]-h[R.s]||R.f-E.f});n<o;++n){var w=i[n].s;if(h[w]>t)f+=S-(1<<m-h[w]),h[w]=t;else break}for(f>>=y;f>0;){var g=i[n].s;h[g]<t?f-=1<<t-h[g]++-1:++n}for(;n>=0&&f;--n){var b=i[n].s;h[b]==t&&(--h[b],++f)}m=t}return{t:new fe(h),l:m}},Vt=function(e,t,r){return e.s==-1?Math.max(Vt(e.l,t,r+1),Vt(e.r,t,r+1)):t[e.s]=r},tn=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new pe(++t),n=0,o=e[0],i=1,s=function(l){r[n++]=l},a=1;a<=t;++a)if(e[a]==o&&a!=t)++i;else{if(!o&&i>2){for(;i>138;i-=138)s(32754);i>2&&(s(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(s(o),--i;i>6;i-=6)s(8304);i>2&&(s(i-3<<5|8208),i=0)}for(;i--;)s(o);i=1,o=e[a]}return{c:r.subarray(0,n),n:t}},Qe=function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},cn=function(e,t,r){var n=r.length,o=ln(t+2);e[o]=n&255,e[o+1]=n>>8,e[o+2]=e[o]^255,e[o+3]=e[o+1]^255;for(var i=0;i<n;++i)e[o+i+4]=r[i];return(o+4+n)*8},rn=function(e,t,r,n,o,i,s,a,l,c,u){Me(t,u++,r),++o[256];for(var p=Gt(o,15),d=p.t,h=p.l,m=Gt(i,15),f=m.t,y=m.l,S=tn(d),w=S.c,g=S.n,b=tn(f),k=b.c,R=b.n,E=new pe(19),I=0;I<w.length;++I)++E[w[I]&31];for(var I=0;I<k.length;++I)++E[k[I]&31];for(var x=Gt(E,7),P=x.t,H=x.l,U=19;U>4&&!P[Qr[U-1]];--U);var T=c+5<<3,X=Qe(o,Oe)+Qe(i,bt)+s,K=Qe(o,d)+Qe(i,f)+s+14+3*U+Qe(E,P)+2*E[16]+3*E[17]+7*E[18];if(l>=0&&T<=X&&T<=K)return cn(t,u,e.subarray(l,l+c));var N,F,W,G;if(Me(t,u,1+(K<X)),u+=2,K<X){N=et(d,h,0),F=d,W=et(f,y,0),G=f;var de=et(P,H,0);Me(t,u,g-257),Me(t,u+5,R-1),Me(t,u+10,U-4),u+=14;for(var I=0;I<U;++I)Me(t,u+3*I,P[Qr[I]]);u+=3*U;for(var ne=[w,k],ye=0;ye<2;++ye)for(var te=ne[ye],I=0;I<te.length;++I){var oe=te[I]&31;Me(t,u,de[oe]),u+=P[oe],oe>15&&(Me(t,u,te[I]>>5&127),u+=te[I]>>12)}}else N=vi,F=Oe,W=wi,G=bt;for(var I=0;I<a;++I){var j=n[I];if(j>255){var oe=j>>18&31;Je(t,u,N[oe+257]),u+=F[oe+257],oe>7&&(Me(t,u,j>>23&31),u+=Kt[oe]);var ve=j&31;Je(t,u,W[ve]),u+=G[ve],ve>3&&(Je(t,u,j>>5&8191),u+=Yt[ve])}else Je(t,u,N[j]),u+=F[j]}return Je(t,u,N[256]),u+F[256]},bi=new Zt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),fn=new fe(0),Si=function(e,t,r,n,o,i){var s=i.z||e.length,a=new fe(n+s+5*(1+Math.ceil(s/7e3))+o),l=a.subarray(n,a.length-o),c=i.l,u=(i.r||0)&7;if(t){u&&(l[0]=i.r>>3);for(var p=bi[t-1],d=p>>13,h=p&8191,m=(1<<r)-1,f=i.p||new pe(32768),y=i.h||new pe(m+1),S=Math.ceil(r/3),w=2*S,g=function(V){return(e[V]^e[V+1]<<S^e[V+2]<<w)&m},b=new Zt(25e3),k=new pe(288),R=new pe(32),E=0,I=0,x=i.i||0,P=0,H=i.w||0,U=0;x+2<s;++x){var T=g(x),X=x&32767,K=y[T];if(f[X]=K,y[T]=X,H<=x){var N=s-x;if((E>7e3||P>24576)&&(N>423||!c)){u=rn(e,l,0,b,k,R,I,P,U,x-U,u),P=E=I=0,U=x;for(var F=0;F<286;++F)k[F]=0;for(var F=0;F<30;++F)R[F]=0}var W=2,G=0,de=h,ne=X-K&32767;if(N>2&&T==g(x-ne))for(var ye=Math.min(d,N)-1,te=Math.min(32767,x),oe=Math.min(258,N);ne<=te&&--de&&X!=K;){if(e[x+W]==e[x+W-ne]){for(var j=0;j<oe&&e[x+j]==e[x+j-ne];++j);if(j>W){if(W=j,G=ne,j>ye)break;for(var ve=Math.min(ne,j-2),me=0,F=0;F<ve;++F){var ie=x-ne+F&32767,we=f[ie],se=ie-we&32767;se>me&&(me=se,K=ie)}}}X=K,K=f[X],ne+=X-K&32767}if(G){b[P++]=268435456|jt[W]<<18|en[G];var D=jt[W]&31,Y=en[G]&31;I+=Kt[D]+Yt[Y],++k[257+D],++R[Y],H=x+W,++E}else b[P++]=e[x],++k[e[x]]}}for(x=Math.max(x,H);x<s;++x)b[P++]=e[x],++k[e[x]];u=rn(e,l,c,b,k,R,I,P,U,x-U,u),c||(i.r=u&7|l[u/8|0]<<3,u-=7,i.h=y,i.p=f,i.i=x,i.w=H)}else{for(var x=i.w||0;x<s+c;x+=65535){var O=x+65535;O>=s&&(l[u/8|0]=c,O=s),u=cn(l,u+1,e.subarray(x,O))}i.i=s}return un(a,0,n+ln(u)+o)},Ci=(function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,n=9;--n;)r=(r&1&&-306674912)^r>>>1;e[t]=r}return e})(),ki=function(){var e=-1;return{p:function(t){for(var r=e,n=0;n<t.length;++n)r=Ci[r&255^t[n]]^r>>>8;e=r},d:function(){return~e}}};var Mi=function(e,t,r,n,o){if(!o&&(o={l:1},t.dictionary)){var i=t.dictionary.subarray(-32768),s=new fe(i.length+e.length);s.set(i),s.set(e,i.length),e=s,o.w=i.length}return Si(e,t.level==null?6:t.level,t.mem==null?o.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,r,n,o)};var Xt=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},Ri=function(e,t){var r=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:t.level==9?2:0,e[9]=3,t.mtime!=0&&Xt(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),r){e[3]=8;for(var n=0;n<=r.length;++n)e[n+10]=r.charCodeAt(n)}};var xi=function(e){return 10+(e.filename?e.filename.length+1:0)};function dn(e,t){t||(t={});var r=ki(),n=e.length;r.p(e);var o=Mi(e,t,xi(t),8),i=o.length;return Ri(o,t),Xt(o,i-8,r.d()),Xt(o,i-4,n),o}var nn=typeof TextEncoder<"u"&&new TextEncoder,Ii=typeof TextDecoder<"u"&&new TextDecoder,Ei=0;try{Ii.decode(fn,{stream:!0}),Ei=1}catch{}function hn(e,t){if(t){for(var r=new fe(e.length),n=0;n<e.length;++n)r[n]=e.charCodeAt(n);return r}if(nn)return nn.encode(e);for(var o=e.length,i=new fe(e.length+(e.length>>1)),s=0,a=function(u){i[s++]=u},n=0;n<o;++n){if(s+5>i.length){var l=new fe(s+8+(o-n<<1));l.set(i),i=l}var c=e.charCodeAt(n);c<128||t?a(c):c<2048?(a(192|c>>6),a(128|c&63)):c>55295&&c<57344?(c=65536+(c&1047552)|e.charCodeAt(++n)&1023,a(240|c>>18),a(128|c>>12&63),a(128|c>>6&63),a(128|c&63)):(a(224|c>>12),a(128|c>>6&63),a(128|c&63))}return un(i,0,s)}async function pn(e){if(typeof CompressionStream<"u"&&typeof Response<"u")try{let t=new Response(e).body?.pipeThrough(new CompressionStream("gzip"));if(t)return new Uint8Array(await new Response(t).arrayBuffer())}catch{}return Jt(e)}function Jt(e){return dn(hn(e))}var Ti=8e6,mn=6e4;function gn(e){let t=[],r=0,n=0,o,i=!!e.hold,s=!1,a,l,c=[],u=()=>c.reduce((w,g)=>w+g.json.length,0),p=()=>{if(!t.length)return;let{sessionId:w,windowId:g}=e.ids();o&&o!==w&&(n=0,e.onSessionChange?.()),o=w,c.push({json:d(w,g,n,t),parts:t,window:g,session:w,seq:n++,tries:0}),t=[],r=0},d=(w,g,b,k)=>`{"api_key":${JSON.stringify(e.apiKey)},"session_id":${JSON.stringify(w)},"window_id":${JSON.stringify(g)},"seq":${b},"events":[${k.join(",")}]}`,h=0,m=async w=>{try{let g=await pn(w.json),b=await e.fetch(`${e.url}?compression=gzip`,{method:"POST",body:g,headers:{"Content-Type":"text/plain;charset=UTF-8"},credentials:"omit",keepalive:g.length<mn}),k=b.headers?.get?.("Retry-After")?.trim()??"";return h=/^\d+$/.test(k)?Math.min(Number(k),300)*1e3:0,b.status}catch{return 0}},f=()=>i||s?Promise.resolve():(l??=(async()=>{for(;c.length&&!i&&!s;){let w=c[0],g=await m(w);g>=200&&g<300?(c.shift(),e.onSent?.(w.session,w.json.length)):!ir(g)||++w.tries>(e.maxRetries??5)?(e.log?.("replay chunk dropped",w.seq,g),c.shift(),e.onGap?.()):await new Promise(b=>setTimeout(b,Math.max(h,or(w.tries-1,e.backoff))))}})().finally(()=>{l=void 0}),l),y=()=>{a??=setTimeout(()=>{a=void 0,S()},e.flushMs)},S=()=>(a!==void 0&&clearTimeout(a),a=void 0,p(),i&&u()>Ti&&(i=!1),f());return{add(w){if(s)return;let g=JSON.stringify(w);if(g.length>rr-4096)return e.log?.("replay event too large",g.length);r&&r+g.length>e.chunkBytes&&S(),t.push(g),r+=g.length+1,r>=e.chunkBytes?S():y()},flush:S,beacon(){if(i||s)return;p();let w=c[0]?.seq??0,g=c[0]?.session;for(let b of c.splice(0)){b.session!==g&&([g,w]=[b.session,b.seq]);let k=R=>{let E=Jt(d(b.session,b.window,w,R));if(E.length>mn&&R.length>1){k(R.slice(0,R.length>>1)),k(R.slice(R.length>>1));return}w++,navigator.sendBeacon?.(`${e.url}?compression=gzip`,new Blob([E],{type:"text/plain"}))};k(b.parts)}n=Math.max(n,w)},release(){i=!1,S()},discard(){s=!0,t=[],c.length=0,a!==void 0&&clearTimeout(a)},get unsent(){return r+u()},get seq(){return n},get held(){return i}}}var yn=(e,t)=>{let r=e(t);return r&&r.nodeType===1?r:null};function $e(e,t,r){let n=o=>{o&&(o.type===2&&o.attributes&&r(o.attributes,(o.tagName??"").toLowerCase(),yn(t,o.id)),o.childNodes?.forEach(n))};if(e.type===2&&n(e.data?.node),!(e.type!==3||e.data?.source!==0)){e.data.adds?.forEach(o=>n(o.node));for(let o of e.data.attributes??[]){let i=yn(t,o.id);r(o.attributes,i?.tagName.toLowerCase()??"",i)}}}var Oi=["title","alt","placeholder","aria-label","aria-description","aria-placeholder","aria-roledescription","aria-valuetext"],Ni=new Set(["input","textarea","select"]),vn=e=>e.replace(/\S/g,"*");function wn(e,t){let r=o=>{try{return!!o?.closest(t)&&!o.closest(e)}catch{return!1}},n=(o,i,s)=>{if(!r(s))for(let a of Object.keys(o)){let l=o[a];(Oi.includes(a)||a==="value"&&!Ni.has(i))&&typeof l=="string"&&(o[a]=vn(l))}};return{maskTextFn:(o,i)=>r(i)?o:vn(o),scrub:(o,i)=>$e(o,i,n)}}var bn="data-lc-fixed";function Sn(e,t){$e(e,t,(r,n,o)=>{if(!(!o||bn in r))try{let i=getComputedStyle(o).position;(i==="fixed"||i==="sticky")&&(r[bn]="")}catch{}})}var Cn=()=>window.parent!==window;function Li(){let e=location.ancestorOrigins;if(e?.length)return e[0];try{return document.referrer?new URL(document.referrer).origin:void 0}catch{return}}var kn=e=>{let t=Li();return!!t&&e.includes(t)};function Mn(e){let t=r=>{let n=r.data;n&&typeof n=="object"&&n.type==="rrweb"&&!e.includes(r.origin)&&r.stopImmediatePropagation()};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)}var Ai=new Set(["Shift","Control","Alt","Meta","CapsLock","AltGraph"]);function Rn(e,t,r=1e3){let n=0,o,i=()=>{o=void 0,n>0&&e(n)&&(n=0)},s=l=>{if(!(l instanceof Element))return!1;if(l instanceof HTMLInputElement&&l.type==="password")return!0;let c=t();try{return!!c&&!!l.closest(c)}catch{return!1}},a=l=>{l.repeat||Ai.has(l.key)||s(l.target)||(n++,o??=setTimeout(i,r))};return document.addEventListener("keydown",a,{capture:!0,passive:!0}),{flush:i,stop(){document.removeEventListener("keydown",a,{capture:!0}),o!==void 0&&clearTimeout(o),i()}}}function xn(e,t=1e3){let r=0,n,o=()=>{n=void 0;let s=Math.max(document.documentElement.scrollHeight,document.body?.scrollHeight??0);s>0&&s!==r&&(r=s,e(s))},i=()=>{n??=setTimeout(o,t)};return window.addEventListener("load",i),window.addEventListener("resize",i),{schedule:i,reset(){r=0,n!==void 0&&clearTimeout(n),o()},stop(){window.removeEventListener("load",i),window.removeEventListener("resize",i),n!==void 0&&clearTimeout(n)}}}function In(){let e=[[]];return{push(t,r){r&&(e=[e[e.length-1],[]]),e[e.length-1].push(t)},drain(){let t=e.flat();return e=[[]],t},get size(){return e.reduce((t,r)=>t+r.length,0)}}}function En(e,t,r){if(!e)return null;let n=null;try{let o=e.proxy&&new URL(e.proxy.url,location.href);o&&/^https?:$/.test(o.protocol)&&r.includes(o.origin)&&e.proxy?.origins.length&&(n={url:o.toString(),origins:[...e.proxy.origins]})}catch{}return{inlineImages:!!e.inlineImages&&!t,maxInlineBytes:e.maxInlineBytes??256*1024,collectFonts:!!e.collectFonts,proxy:n}}var Di=new Set(["img","source","video","audio","track","image","input"]),_i=/url\(\s*(['"]?)([^'")]+)\1\s*\)/g;function Tn(e){let t=i=>{if(!e.proxy||i.startsWith("data:"))return i;try{let s=new URL(i,location.href);return e.proxy.origins.includes(s.origin)?`${e.proxy.url}${e.proxy.url.includes("?")?"&":"?"}url=${encodeURIComponent(s.toString())}`:i}catch{return i}},r=i=>i.replace(_i,(s,a,l)=>{let c=t(l.trim());return c===l.trim()?s:`url(${a}${c}${a})`}),n=i=>i.split(",").map(s=>{let[a,...l]=s.trim().split(/\s+/);return a?[t(a),...l].join(" "):s}).join(", "),o=(i,s)=>{if(s==="img"&&typeof i.rr_dataURL=="string"&&i.rr_dataURL.length>e.maxInlineBytes&&delete i.rr_dataURL,!!e.proxy)for(let[a,l]of Object.entries(i))typeof l=="string"&&(a==="_cssText"||a==="style"?i[a]=r(l):a==="srcset"?i[a]=n(l):(a==="poster"||a==="src"&&Di.has(s)||a==="href"&&s==="link"||a==="xlink:href"&&s==="image")&&(i[a]=t(l)))};return{scrub(i,s){if($e(i,s,o),e.proxy&&i.type===3&&i.data?.source===8)for(let a of i.data.adds??[])typeof a.rule=="string"&&(a.rule=r(a.rule))}}}function Fi(e,t,r){let n={x:0,y:0,width:e.width,height:e.height},o=[];try{o=r?.(e)??[]}catch{o=[n]}let i=t.flatMap(s=>{try{return e.matches(s.selector)?s.regions??[n]:[]}catch{return[n]}});return[...o,...i]}function On(e){let t=new Map,r=document.createElement("canvas"),n=()=>{for(let i of Array.from(document.querySelectorAll("canvas"))){let s=e.idOf(i);if(!(s<=0||!i.width||!i.height||i.closest(e.skip)))try{r.width=i.width,r.height=i.height;let a=r.getContext("2d");if(!a)return;a.drawImage(i,0,0),a.fillStyle="#000";for(let p of Fi(i,e.rules,e.regionsFn))a.fillRect(p.x,p.y,p.width,p.height);let l=r.toDataURL("image/jpeg",e.quality),c=l.slice(l.indexOf(",")+1);if(!c||t.get(s)===c)continue;t.set(s,c);let u={rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:c}],type:"image/jpeg"};e.emit({type:3,timestamp:Date.now(),data:{source:9,id:s,type:0,commands:[{property:"clearRect",args:[0,0,i.width,i.height]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[u]},0,0]}]}})}catch{}}},o=setInterval(n,Math.round(1e3/e.fps));return{reset:()=>t.clear(),tick:n,stop:()=>clearInterval(o)}}function Nn(e,t=Date.now){let r=e.eventsPerSecond??10,n=e.burst??100,o=n,i=t();return()=>{let s=t();return o=Math.min(n,o+(s-i)/1e3*r),i=s,o<1?!1:(o-=1,!0)}}var zi=1e4;function Ln(e,t=Date.now){let r=new Map,n=0;return{allow(o){let i=o.data;return o.type!==3||i?.source!==0||!i.attributes?.length?!0:(r.size>zi&&r.clear(),i.attributes=i.attributes.filter(s=>{let a=r.get(s.id);return a||r.set(s.id,a=Nn({burst:e.burst??100,eventsPerSecond:e.perSecond??10},t)),a()?!0:(n++,!1)}),!!(i.attributes.length||i.adds?.length||i.removes?.length||i.texts?.length))},get dropped(){return n}}}var Pi=new Set([1,2,3,4,5,6,7,12]);function An(e){let t,r=!1,n=0;return{check(o){if(e<=0)return{keep:!0,resumed:!1};let i=o.timestamp??Date.now();if(t??=i,o.type===3&&Pi.has(o.data?.source??-1)){t=i;let s=r&&n>0;return r=!1,n=0,{keep:!0,resumed:s}}return!r&&i-t>e&&(r=!0),r?(n++,{keep:!1,resumed:!1}):{keep:!0,resumed:!1}}}}function Dn(e,t,r){let n=[],o;switch(t.mode){case"on_event":e.onCapture(i=>t.events.includes(i.event)&&r());break;case"on_flag":{let i=e.flags?.onChange(s=>s[t.flag]&&r());i&&n.push(i);break}case"on_url":try{o=new RegExp(t.pattern)}catch{e.log("bad on_url pattern",t.pattern)}break;case"on_frustration":{let i=[],s=a=>{let l=Date.now();for(i.push({t:l,x:a.clientX,y:a.clientY});i.length&&l-i[0].t>1e3;)i.shift();i.filter(u=>Math.hypot(u.x-a.clientX,u.y-a.clientY)<=30).length>=3&&r()};document.addEventListener("click",s,!0),n.push(()=>document.removeEventListener("click",s,!0));break}default:}return{checkUrl:i=>o?.test(i)&&r(),stop:()=>n.forEach(i=>i())}}var St="[redacted]",Ui=/^(authorization|proxy-authorization|cookie|set-cookie|x-api-key|x-auth-token|x-csrf-token)$/i,er=/pass(word|wd|phrase)?|secret|token|api[-_]?key|card|cvv|cvc|ssn|authorization/i;var Re=(e,t=4096)=>e.length>t?`${e.slice(0,t)}...[truncated ${e.length-t}]`:e;function tt(e){let t={};for(let r of Object.keys(e))t[r]=Ui.test(r)?St:Re(e[r]??"",512);return t}function Qt(e,t){if(t>6||e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(n=>Qt(n,t+1));let r={};for(let[n,o]of Object.entries(e))r[n]=er.test(n)?St:Qt(o,t+1);return r}function Be(e){if(e==null)return;if(typeof e!="string")return typeof URLSearchParams<"u"&&e instanceof URLSearchParams?Be(e.toString()):"[binary]";let t=e.trim();if(t.startsWith("{")||t.startsWith("["))try{return Re(JSON.stringify(Qt(JSON.parse(t),0)))}catch{}if(/^[^\s=&]+=[^\s]*$/.test(t)){let r=new URLSearchParams(t);for(let n of[...r.keys()])er.test(n)&&r.set(n,St);return Re(r.toString())}return Re(e)}function _n(e,t=1e3){try{if(typeof e=="string")return Re(e,t);if(e instanceof Error)return Re(`${e.name}: ${e.message}${e.stack?`
|
|
78
|
+
`,Cr=typeof self<"u"&&self.Blob&&new Blob([Zr],{type:"text/javascript;charset=utf-8"});function fi(e){let t;try{if(t=Cr&&(self.URL||self.webkitURL).createObjectURL(Cr),!t)throw"";let r=new Worker(t,{name:e?.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Zr),{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var Ut=class{constructor(t){v(this,"pendingCanvasMutations",new Map),v(this,"rafStamps",{latestId:0,invokeId:null}),v(this,"mirror"),v(this,"mutationCb"),v(this,"resetObservers"),v(this,"frozen",!1),v(this,"locked",!1),v(this,"processMutation",(l,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(c)});let{sampling:r="all",win:n,blockClass:o,blockSelector:i,recordCanvas:s,dataURLOptions:a}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,s&&r==="all"&&this.initCanvasMutationObserver(n,o,i),s&&typeof r=="number"&&this.initCanvasFPSObserver(r,n,o,i,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,r,n,o,i){let s=br(r,n,o,!0),a=new Map,l=new fi;l.onmessage=m=>{let{id:f}=m.data;if(a.set(f,!1),!("base64"in m.data))return;let{base64:y,type:S,width:w,height:g}=m.data;this.mutationCb({id:f,type:Ue["2D"],commands:[{property:"clearRect",args:[0,0,w,g]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:y}],type:S}]},0,0]}]})};let c=1e3/t,u=0,p,d=()=>{let m=[];return r.document.querySelectorAll("canvas").forEach(f=>{le(f,n,o,!0)||m.push(f)}),m},h=m=>{if(u&&m-u<c){p=requestAnimationFrame(h);return}u=m,d().forEach(async f=>{var y;let S=this.mirror.getId(f);if(a.get(S)||f.width===0||f.height===0)return;if(a.set(S,!0),["webgl","webgl2"].includes(f.__context)){let g=f.getContext(f.__context);((y=g?.getContextAttributes())==null?void 0:y.preserveDrawingBuffer)===!1&&g.clear(g.COLOR_BUFFER_BIT)}let w=await createImageBitmap(f);l.postMessage({id:S,bitmap:w,width:f.width,height:f.height,dataURLOptions:i.dataURLOptions},[w])}),p=requestAnimationFrame(h)};p=requestAnimationFrame(h),this.resetObservers=()=>{s(),cancelAnimationFrame(p)}}initCanvasMutationObserver(t,r,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let o=br(t,r,n,!1),i=li(this.processMutation.bind(this),t,r,n),s=ci(this.processMutation.bind(this),t,r,n);this.resetObservers=()=>{o(),i(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{let n=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(t);if(!n||r===-1)return;let o=n.map(s=>{let{type:a,...l}=s;return l}),{type:i}=n[0];this.mutationCb({id:r,type:i,commands:o}),this.pendingCanvasMutations.delete(t)}},$t=class{constructor(t){v(this,"trackedLinkElements",new WeakSet),v(this,"mutationCb"),v(this,"adoptedStyleSheetCb"),v(this,"styleMirror",new At),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;let n={id:r,styleIds:[]},o=[];for(let i of t){let s;this.styleMirror.has(i)?s=this.styleMirror.getId(i):(s=this.styleMirror.add(i),o.push({styleId:s,rules:Array.from(i.rules||CSSRule,(a,l)=>({rule:xr(a,i.href),index:l}))})),n.styleIds.push(s)}o.length>0&&(n.styles=o),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}},Bt=class{constructor(){v(this,"nodeMap",new WeakMap),v(this,"active",!1)}inOtherBuffer(t,r){let n=this.nodeMap.get(t);return n&&Array.from(n).some(o=>o!==r)}add(t,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}},q,ct,xe,Ke=!1;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=((lr=e.contentWindow)==null?void 0:lr.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var ge=fo();function ue(e={}){let{emit:t,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:o="rr-block",blockSelector:i=null,ignoreClass:s="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=!0,maskAllInputs:p,maskInputOptions:d,slimDOMOptions:h,maskInputFn:m,maskTextFn:f,hooks:y,packFn:S,sampling:w={},dataURLOptions:g={},mousemoveWait:b,recordDOM:k=!0,recordCanvas:R=!1,recordCrossOriginIframes:E=!1,recordAfter:I=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:x=!1,collectFonts:P=!1,inlineImages:H=!1,plugins:U,keepIframeSrcFn:T=()=>!1,ignoreCSSAttributes:X=new Set([]),errorHandler:K}=e;Go(K);let N=E?window.parent===window:!0,F=!1;if(!N)try{window.parent.document&&(F=!1)}catch{F=!0}if(N&&!t)throw new Error("emit function is required");if(!N&&!F)return()=>{};b!==void 0&&w.mousemove===void 0&&(w.mousemove=b),ge.reset();let W=p===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:d!==void 0?d:{password:!0},G=Ar(h);$o();let de,ne=0,ye=D=>{for(let Y of U||[])Y.eventProcessor&&(D=Y.eventProcessor(D));return S&&!F&&(D=S(D)),D};q=(D,Y)=>{let O=D;if(O.timestamp=Xe(),O.type!==L.FullSnapshot&&!(O.type===L.IncrementalSnapshot&&O.data.source===A.Mutation)){xe.unfreeze();for(let V of Pe)if(V.isFrozen())V.unfreeze();else break}if(N)t?.(ye(O),Y);else if(F){let V={type:"rrweb",event:ye(O),origin:window.location.origin,isCheckout:Y};window.parent.postMessage(V,"*")}if(O.type===L.FullSnapshot)de=O,ne=0;else if(O.type===L.IncrementalSnapshot){if(O.data.source===A.Mutation&&O.data.isAttachIframe)return;ne++;let V=n&&ne>=n,ae=r&&O.timestamp-de.timestamp>r;(V||ae)&&ct(!0)}};let te=D=>{q({type:L.IncrementalSnapshot,data:{source:A.Mutation,...D}})},oe=D=>q({type:L.IncrementalSnapshot,data:{source:A.Scroll,...D}}),j=D=>q({type:L.IncrementalSnapshot,data:{source:A.CanvasMutation,...D}}),ve=D=>q({type:L.IncrementalSnapshot,data:{source:A.AdoptedStyleSheet,...D}}),me=new $t({mutationCb:te,adoptedStyleSheetCb:ve}),ie=new zt({mirror:ge,mutationCb:te,stylesheetManager:me,recordCrossOriginIframes:E,wrappedEmit:q});for(let D of U||[])D.getMirror&&D.getMirror({nodeMirror:ge,crossOriginIframeMirror:ie.crossOriginIframeMirror,crossOriginIframeStyleMirror:ie.crossOriginIframeStyleMirror});let we=new Bt;xe=new Ut({recordCanvas:R,mutationCb:j,win:window,blockClass:o,blockSelector:i,mirror:ge,sampling:w.canvas,dataURLOptions:g});let se=new Pt({mutationCb:te,scrollCb:oe,bypassOptions:{blockClass:o,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:W,dataURLOptions:g,maskTextFn:f,maskInputFn:m,recordCanvas:R,inlineImages:H,sampling:w,slimDOMOptions:G,iframeManager:ie,stylesheetManager:me,canvasManager:xe,keepIframeSrcFn:T,processedNodeManager:we},mirror:ge});ct=(D=!1)=>{if(!k)return;q({type:L.Meta,data:{href:window.location.href,width:Fr(),height:_r()}},D),me.reset(),se.init(),xe.lock(),Pe.forEach(O=>O.lock());let Y=Po(document,{mirror:ge,blockClass:o,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:W,maskTextFn:f,maskInputFn:m,slimDOM:G,dataURLOptions:g,recordCanvas:R,inlineImages:H,onSerialize:O=>{Ur(O,ge)&&ie.addIframe(O),$r(O,ge)&&me.trackLinkElement(O),Lt(O)&&se.addShadowRoot(M.shadowRoot(O),document)},onIframeLoad:(O,V)=>{ie.attachIframe(O,V),se.observeAttachShadow(O)},onStylesheetLoad:(O,V)=>{me.attachLinkElement(O,V)},keepIframeSrcFn:T});if(!Y)return console.warn("Failed to snapshot the document");q({type:L.FullSnapshot,data:{node:Y,initialOffset:Dr(window)}},D),xe.unlock(),Pe.forEach(O=>O.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&me.adoptStyleSheets(document.adoptedStyleSheets,ge.getId(document))};try{let D=[],Y=ae=>{var J;return _(oi)({mutationCb:te,mousemoveCb:($,be)=>q({type:L.IncrementalSnapshot,data:{source:be,positions:$}}),mouseInteractionCb:$=>q({type:L.IncrementalSnapshot,data:{source:A.MouseInteraction,...$}}),scrollCb:oe,viewportResizeCb:$=>q({type:L.IncrementalSnapshot,data:{source:A.ViewportResize,...$}}),inputCb:$=>q({type:L.IncrementalSnapshot,data:{source:A.Input,...$}}),mediaInteractionCb:$=>q({type:L.IncrementalSnapshot,data:{source:A.MediaInteraction,...$}}),styleSheetRuleCb:$=>q({type:L.IncrementalSnapshot,data:{source:A.StyleSheetRule,...$}}),styleDeclarationCb:$=>q({type:L.IncrementalSnapshot,data:{source:A.StyleDeclaration,...$}}),canvasMutationCb:j,fontCb:$=>q({type:L.IncrementalSnapshot,data:{source:A.Font,...$}}),selectionCb:$=>{q({type:L.IncrementalSnapshot,data:{source:A.Selection,...$}})},customElementCb:$=>{q({type:L.IncrementalSnapshot,data:{source:A.CustomElement,...$}})},blockClass:o,ignoreClass:s,ignoreSelector:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:W,inlineStylesheet:u,sampling:w,recordDOM:k,recordCanvas:R,inlineImages:H,userTriggeredOnInput:x,collectFonts:P,doc:ae,maskInputFn:m,maskTextFn:f,keepIframeSrcFn:T,blockSelector:i,slimDOMOptions:G,dataURLOptions:g,mirror:ge,iframeManager:ie,stylesheetManager:me,shadowDomManager:se,processedNodeManager:we,canvasManager:xe,ignoreCSSAttributes:X,plugins:((J=U?.filter($=>$.observer))==null?void 0:J.map($=>({observer:$.observer,options:$.options,callback:be=>q({type:L.Plugin,data:{plugin:$.name,payload:be}})})))||[]},y)},O=new Map;ie.addLoadListener(ae=>{try{let J=ae.contentDocument;if(O.has(J))return;O.set(J,Y(J))}catch(J){console.warn(J)}}),ie.addUnloadListener(ae=>{let J=O.get(ae);J&&(O.delete(ae),J(),se.removeShadowRootsIn(ae),ge.removeNodeFromMap(ae))});let V=()=>{ct(),D.push(Y(document)),Ke=!0};return["interactive","complete"].includes(document.readyState)?V():(D.push(re("DOMContentLoaded",()=>{q({type:L.DomContentLoaded,data:{}}),I==="DOMContentLoaded"&&V()})),D.push(re("load",()=>{q({type:L.Load,data:{}}),I==="load"&&V()},window))),()=>{[...D,...O.values()].forEach(ae=>{try{ae()}catch(J){String(J).toLowerCase().includes("cross-origin")||console.warn(J)}}),O.clear(),ie.destroy(),we.destroy(),se.reset(),xe.reset(),Ke=!1,jo()}}catch(D){console.warn(D)}}ue.addCustomEvent=(e,t)=>{if(!Ke)throw new Error("please add custom event after start recording");q({type:L.Custom,data:{tag:e,payload:t}})};ue.addAnnotation=e=>{if(!Ke)throw new Error("please add annotation after recording started");q({type:L.Annotation,data:e})};ue.freezePage=()=>{xe.freeze(),Pe.forEach(e=>e.freeze())};ue.takeFullSnapshot=e=>{if(!Ke)throw new Error("please take full snapshot after start recording");ct(e)};ue.mirror=ge;var Kr=["gclid","gad_source","gclsrc","dclid","gbraid","wbraid","fbclid","igshid","msclkid","ttclid","li_fat_id","twclid","mc_cid","rdt_cid","epik","qclid","sccid","oppref","bfcid","irclid","_kx"];var Yr=["utm_source","utm_medium","utm_campaign","utm_term","utm_content"];var di="<masked>",hi=["password","passwd","pwd","pass","token","access_token","refresh_token","id_token","secret","client_secret","state","session","api_key","apikey","key","auth","authorization","code","otp","email","ssn"];var pi=[/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,/^[0-9a-hjkmnp-tv-z]{26}$/i,/^\d{4,}$/,/^[0-9a-f]{16,}$/i,/^(?=.*\d)[a-z0-9_-]{20,}$/i],mi=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");function gi(e,t){let r=e;for(let n of t.pathRules??[])try{r=r.replace(typeof n.match=="string"?new RegExp(n.match):n.match,n.replace)}catch{}return t.maskPathIds?r.split("/").map(n=>pi.some(o=>o.test(n))?":id":n).join("/"):r}function Jr(e,t){let r=e;if(t.pathRules?.length||t.maskPathIds){let o=/^((?:[a-z][a-z0-9+.-]*:)?\/\/[^/?#]*)?([^?#]*)([\s\S]*)$/i.exec(r);o&&(r=(o[1]??"")+gi(o[2],t)+o[3])}let n=[...hi,...t.maskParams??[],...t.maskCampaignParams?[...Yr,...Kr]:[]];if(n.length){let o=r.indexOf("#"),i=o<0?r:r.slice(0,o),s=o<0?"":r.slice(o);r=i.replace(new RegExp(`([?&])(${n.map(mi).join("|")})=[^&]*`,"gi"),`$1$2=${di}`)+s}return t.stripHash&&(r=r.replace(/#.*$/,"")),r}var fe=Uint8Array,pe=Uint16Array,Zt=Int32Array,Kt=new fe([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]),Yt=new fe([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]),Qr=new fe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),on=function(e,t){for(var r=new pe(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];for(var o=new Zt(r[30]),n=1;n<30;++n)for(var i=r[n];i<r[n+1];++i)o[i]=i-r[n]<<5|n;return{b:r,r:o}},sn=on(Kt,2),yi=sn.b,jt=sn.r;yi[28]=258,jt[258]=28;var an=on(Yt,0),ts=an.b,en=an.r,qt=new pe(32768);for(z=0;z<32768;++z)ke=(z&43690)>>1|(z&21845)<<1,ke=(ke&52428)>>2|(ke&13107)<<2,ke=(ke&61680)>>4|(ke&3855)<<4,qt[z]=((ke&65280)>>8|(ke&255)<<8)>>1;var ke,z,et=(function(e,t,r){for(var n=e.length,o=0,i=new pe(t);o<n;++o)e[o]&&++i[e[o]-1];var s=new pe(t);for(o=1;o<t;++o)s[o]=s[o-1]+i[o-1]<<1;var a;if(r){a=new pe(1<<t);var l=15-t;for(o=0;o<n;++o)if(e[o])for(var c=o<<4|e[o],u=t-e[o],p=s[e[o]-1]++<<u,d=p|(1<<u)-1;p<=d;++p)a[qt[p]>>l]=c}else for(a=new pe(n),o=0;o<n;++o)e[o]&&(a[o]=qt[s[e[o]-1]++]>>15-e[o]);return a}),Oe=new fe(288);for(z=0;z<144;++z)Oe[z]=8;var z;for(z=144;z<256;++z)Oe[z]=9;var z;for(z=256;z<280;++z)Oe[z]=7;var z;for(z=280;z<288;++z)Oe[z]=8;var z,bt=new fe(32);for(z=0;z<32;++z)bt[z]=5;var z,vi=et(Oe,9,0);var wi=et(bt,5,0);var ln=function(e){return(e+7)/8|0},un=function(e,t,r){return(t==null||t<0)&&(t=0),(r==null||r>e.length)&&(r=e.length),new fe(e.subarray(t,r))};var Me=function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8},Je=function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8,e[n+2]|=r>>16},Gt=function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var o=r.length,i=r.slice();if(!o)return{t:fn,l:0};if(o==1){var s=new fe(r[0].s+1);return s[r[0].s]=1,{t:s,l:1}}r.sort(function(k,R){return k.f-R.f}),r.push({s:-1,f:25001});var a=r[0],l=r[1],c=0,u=1,p=2;for(r[0]={s:-1,f:a.f+l.f,l:a,r:l};u!=o-1;)a=r[r[c].f<r[p].f?c++:p++],l=r[c!=u&&r[c].f<r[p].f?c++:p++],r[u++]={s:-1,f:a.f+l.f,l:a,r:l};for(var d=i[0].s,n=1;n<o;++n)i[n].s>d&&(d=i[n].s);var h=new pe(d+1),m=Vt(r[u-1],h,0);if(m>t){var n=0,f=0,y=m-t,S=1<<y;for(i.sort(function(R,E){return h[E.s]-h[R.s]||R.f-E.f});n<o;++n){var w=i[n].s;if(h[w]>t)f+=S-(1<<m-h[w]),h[w]=t;else break}for(f>>=y;f>0;){var g=i[n].s;h[g]<t?f-=1<<t-h[g]++-1:++n}for(;n>=0&&f;--n){var b=i[n].s;h[b]==t&&(--h[b],++f)}m=t}return{t:new fe(h),l:m}},Vt=function(e,t,r){return e.s==-1?Math.max(Vt(e.l,t,r+1),Vt(e.r,t,r+1)):t[e.s]=r},tn=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new pe(++t),n=0,o=e[0],i=1,s=function(l){r[n++]=l},a=1;a<=t;++a)if(e[a]==o&&a!=t)++i;else{if(!o&&i>2){for(;i>138;i-=138)s(32754);i>2&&(s(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(s(o),--i;i>6;i-=6)s(8304);i>2&&(s(i-3<<5|8208),i=0)}for(;i--;)s(o);i=1,o=e[a]}return{c:r.subarray(0,n),n:t}},Qe=function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},cn=function(e,t,r){var n=r.length,o=ln(t+2);e[o]=n&255,e[o+1]=n>>8,e[o+2]=e[o]^255,e[o+3]=e[o+1]^255;for(var i=0;i<n;++i)e[o+i+4]=r[i];return(o+4+n)*8},rn=function(e,t,r,n,o,i,s,a,l,c,u){Me(t,u++,r),++o[256];for(var p=Gt(o,15),d=p.t,h=p.l,m=Gt(i,15),f=m.t,y=m.l,S=tn(d),w=S.c,g=S.n,b=tn(f),k=b.c,R=b.n,E=new pe(19),I=0;I<w.length;++I)++E[w[I]&31];for(var I=0;I<k.length;++I)++E[k[I]&31];for(var x=Gt(E,7),P=x.t,H=x.l,U=19;U>4&&!P[Qr[U-1]];--U);var T=c+5<<3,X=Qe(o,Oe)+Qe(i,bt)+s,K=Qe(o,d)+Qe(i,f)+s+14+3*U+Qe(E,P)+2*E[16]+3*E[17]+7*E[18];if(l>=0&&T<=X&&T<=K)return cn(t,u,e.subarray(l,l+c));var N,F,W,G;if(Me(t,u,1+(K<X)),u+=2,K<X){N=et(d,h,0),F=d,W=et(f,y,0),G=f;var de=et(P,H,0);Me(t,u,g-257),Me(t,u+5,R-1),Me(t,u+10,U-4),u+=14;for(var I=0;I<U;++I)Me(t,u+3*I,P[Qr[I]]);u+=3*U;for(var ne=[w,k],ye=0;ye<2;++ye)for(var te=ne[ye],I=0;I<te.length;++I){var oe=te[I]&31;Me(t,u,de[oe]),u+=P[oe],oe>15&&(Me(t,u,te[I]>>5&127),u+=te[I]>>12)}}else N=vi,F=Oe,W=wi,G=bt;for(var I=0;I<a;++I){var j=n[I];if(j>255){var oe=j>>18&31;Je(t,u,N[oe+257]),u+=F[oe+257],oe>7&&(Me(t,u,j>>23&31),u+=Kt[oe]);var ve=j&31;Je(t,u,W[ve]),u+=G[ve],ve>3&&(Je(t,u,j>>5&8191),u+=Yt[ve])}else Je(t,u,N[j]),u+=F[j]}return Je(t,u,N[256]),u+F[256]},bi=new Zt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),fn=new fe(0),Si=function(e,t,r,n,o,i){var s=i.z||e.length,a=new fe(n+s+5*(1+Math.ceil(s/7e3))+o),l=a.subarray(n,a.length-o),c=i.l,u=(i.r||0)&7;if(t){u&&(l[0]=i.r>>3);for(var p=bi[t-1],d=p>>13,h=p&8191,m=(1<<r)-1,f=i.p||new pe(32768),y=i.h||new pe(m+1),S=Math.ceil(r/3),w=2*S,g=function(V){return(e[V]^e[V+1]<<S^e[V+2]<<w)&m},b=new Zt(25e3),k=new pe(288),R=new pe(32),E=0,I=0,x=i.i||0,P=0,H=i.w||0,U=0;x+2<s;++x){var T=g(x),X=x&32767,K=y[T];if(f[X]=K,y[T]=X,H<=x){var N=s-x;if((E>7e3||P>24576)&&(N>423||!c)){u=rn(e,l,0,b,k,R,I,P,U,x-U,u),P=E=I=0,U=x;for(var F=0;F<286;++F)k[F]=0;for(var F=0;F<30;++F)R[F]=0}var W=2,G=0,de=h,ne=X-K&32767;if(N>2&&T==g(x-ne))for(var ye=Math.min(d,N)-1,te=Math.min(32767,x),oe=Math.min(258,N);ne<=te&&--de&&X!=K;){if(e[x+W]==e[x+W-ne]){for(var j=0;j<oe&&e[x+j]==e[x+j-ne];++j);if(j>W){if(W=j,G=ne,j>ye)break;for(var ve=Math.min(ne,j-2),me=0,F=0;F<ve;++F){var ie=x-ne+F&32767,we=f[ie],se=ie-we&32767;se>me&&(me=se,K=ie)}}}X=K,K=f[X],ne+=X-K&32767}if(G){b[P++]=268435456|jt[W]<<18|en[G];var D=jt[W]&31,Y=en[G]&31;I+=Kt[D]+Yt[Y],++k[257+D],++R[Y],H=x+W,++E}else b[P++]=e[x],++k[e[x]]}}for(x=Math.max(x,H);x<s;++x)b[P++]=e[x],++k[e[x]];u=rn(e,l,c,b,k,R,I,P,U,x-U,u),c||(i.r=u&7|l[u/8|0]<<3,u-=7,i.h=y,i.p=f,i.i=x,i.w=H)}else{for(var x=i.w||0;x<s+c;x+=65535){var O=x+65535;O>=s&&(l[u/8|0]=c,O=s),u=cn(l,u+1,e.subarray(x,O))}i.i=s}return un(a,0,n+ln(u)+o)},Ci=(function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,n=9;--n;)r=(r&1&&-306674912)^r>>>1;e[t]=r}return e})(),ki=function(){var e=-1;return{p:function(t){for(var r=e,n=0;n<t.length;++n)r=Ci[r&255^t[n]]^r>>>8;e=r},d:function(){return~e}}};var Mi=function(e,t,r,n,o){if(!o&&(o={l:1},t.dictionary)){var i=t.dictionary.subarray(-32768),s=new fe(i.length+e.length);s.set(i),s.set(e,i.length),e=s,o.w=i.length}return Si(e,t.level==null?6:t.level,t.mem==null?o.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,r,n,o)};var Xt=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},Ri=function(e,t){var r=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:t.level==9?2:0,e[9]=3,t.mtime!=0&&Xt(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),r){e[3]=8;for(var n=0;n<=r.length;++n)e[n+10]=r.charCodeAt(n)}};var xi=function(e){return 10+(e.filename?e.filename.length+1:0)};function dn(e,t){t||(t={});var r=ki(),n=e.length;r.p(e);var o=Mi(e,t,xi(t),8),i=o.length;return Ri(o,t),Xt(o,i-8,r.d()),Xt(o,i-4,n),o}var nn=typeof TextEncoder<"u"&&new TextEncoder,Ii=typeof TextDecoder<"u"&&new TextDecoder,Ei=0;try{Ii.decode(fn,{stream:!0}),Ei=1}catch{}function hn(e,t){if(t){for(var r=new fe(e.length),n=0;n<e.length;++n)r[n]=e.charCodeAt(n);return r}if(nn)return nn.encode(e);for(var o=e.length,i=new fe(e.length+(e.length>>1)),s=0,a=function(u){i[s++]=u},n=0;n<o;++n){if(s+5>i.length){var l=new fe(s+8+(o-n<<1));l.set(i),i=l}var c=e.charCodeAt(n);c<128||t?a(c):c<2048?(a(192|c>>6),a(128|c&63)):c>55295&&c<57344?(c=65536+(c&1047552)|e.charCodeAt(++n)&1023,a(240|c>>18),a(128|c>>12&63),a(128|c>>6&63),a(128|c&63)):(a(224|c>>12),a(128|c>>6&63),a(128|c&63))}return un(i,0,s)}async function pn(e){if(typeof CompressionStream<"u"&&typeof Response<"u")try{let t=new Response(e).body?.pipeThrough(new CompressionStream("gzip"));if(t)return new Uint8Array(await new Response(t).arrayBuffer())}catch{}return Jt(e)}function Jt(e){return dn(hn(e))}var Ti=8e6,mn=6e4;function gn(e){let t=[],r=0,n=0,o,i=!!e.hold,s=!1,a,l,c=[],u=()=>c.reduce((w,g)=>w+g.json.length,0),p=()=>{if(!t.length)return;let{sessionId:w,windowId:g}=e.ids();o&&o!==w&&(n=0,e.onSessionChange?.()),o=w,c.push({json:d(w,g,n,t),parts:t,window:g,session:w,seq:n++,tries:0}),t=[],r=0},d=(w,g,b,k)=>`{"api_key":${JSON.stringify(e.apiKey)},"session_id":${JSON.stringify(w)},"window_id":${JSON.stringify(g)},"seq":${b},"events":[${k.join(",")}]}`,h=0,m=async w=>{try{let g=await pn(w.json),b=await e.fetch(`${e.url}?compression=gzip`,{method:"POST",body:g,headers:{"Content-Type":"text/plain;charset=UTF-8"},credentials:"omit",keepalive:g.length<mn}),k=b.headers?.get?.("Retry-After")?.trim()??"";return h=/^\d+$/.test(k)?Math.min(Number(k),300)*1e3:0,b.status}catch{return 0}},f=()=>i||s?Promise.resolve():(l??=(async()=>{for(;c.length&&!i&&!s;){let w=c[0],g=await m(w);g>=200&&g<300?(c.shift(),e.onSent?.(w.session,w.json.length)):!ir(g)||++w.tries>(e.maxRetries??5)?(e.log?.("replay chunk dropped",w.seq,g),c.shift(),e.onGap?.()):await new Promise(b=>setTimeout(b,Math.max(h,or(w.tries-1,e.backoff))))}})().finally(()=>{l=void 0}),l),y=()=>{a??=setTimeout(()=>{a=void 0,S()},e.flushMs)},S=()=>(a!==void 0&&clearTimeout(a),a=void 0,p(),i&&u()>Ti&&(i=!1),f());return{add(w){if(s)return;let g=JSON.stringify(w);if(g.length>rr-4096)return e.log?.("replay event too large",g.length);r&&r+g.length>e.chunkBytes&&S(),t.push(g),r+=g.length+1,r>=e.chunkBytes?S():y()},flush:S,beacon(){if(i||s)return;p();let w=c[0]?.seq??0,g=c[0]?.session;for(let b of c.splice(0)){b.session!==g&&([g,w]=[b.session,b.seq]);let k=R=>{let E=Jt(d(b.session,b.window,w,R));if(E.length>mn&&R.length>1){k(R.slice(0,R.length>>1)),k(R.slice(R.length>>1));return}w++,navigator.sendBeacon?.(`${e.url}?compression=gzip`,new Blob([E],{type:"text/plain"}))};k(b.parts)}n=Math.max(n,w)},release(){i=!1,S()},discard(){s=!0,t=[],c.length=0,a!==void 0&&clearTimeout(a)},get unsent(){return r+u()},get seq(){return n},get held(){return i}}}var yn=(e,t)=>{let r=e(t);return r&&r.nodeType===1?r:null};function $e(e,t,r){let n=o=>{o&&(o.type===2&&o.attributes&&r(o.attributes,(o.tagName??"").toLowerCase(),yn(t,o.id)),o.childNodes?.forEach(n))};if(e.type===2&&n(e.data?.node),!(e.type!==3||e.data?.source!==0)){e.data.adds?.forEach(o=>n(o.node));for(let o of e.data.attributes??[]){let i=yn(t,o.id);r(o.attributes,i?.tagName.toLowerCase()??"",i)}}}var Oi=["title","alt","placeholder","aria-label","aria-description","aria-placeholder","aria-roledescription","aria-valuetext"],Ni=new Set(["input","textarea","select"]),vn=e=>e.replace(/\S/g,"*");function wn(e,t){let r=o=>{try{return!!o?.closest(t)&&!o.closest(e)}catch{return!1}},n=(o,i,s)=>{if(!r(s))for(let a of Object.keys(o)){let l=o[a];(Oi.includes(a)||a==="value"&&!Ni.has(i))&&typeof l=="string"&&(o[a]=vn(l))}};return{maskTextFn:(o,i)=>r(i)?o:vn(o),scrub:(o,i)=>$e(o,i,n)}}var bn="data-lc-fixed";function Sn(e,t){$e(e,t,(r,n,o)=>{if(!(!o||bn in r))try{let i=getComputedStyle(o).position;(i==="fixed"||i==="sticky")&&(r[bn]="")}catch{}})}var Cn=()=>window.parent!==window;function Li(){let e=location.ancestorOrigins;if(e?.length)return e[0];try{return document.referrer?new URL(document.referrer).origin:void 0}catch{return}}var kn=e=>{let t=Li();return!!t&&e.includes(t)};function Mn(e){let t=r=>{let n=r.data;n&&typeof n=="object"&&n.type==="rrweb"&&!e.includes(r.origin)&&r.stopImmediatePropagation()};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)}var Ai=new Set(["Shift","Control","Alt","Meta","CapsLock","AltGraph"]);function Rn(e,t,r=1e3){let n=0,o,i=()=>{o=void 0,n>0&&e(n)&&(n=0)},s=l=>{if(!(l instanceof Element))return!1;if(l instanceof HTMLInputElement&&l.type==="password")return!0;let c=t();try{return!!c&&!!l.closest(c)}catch{return!1}},a=l=>{l.repeat||Ai.has(l.key)||s(l.target)||(n++,o??=setTimeout(i,r))};return document.addEventListener("keydown",a,{capture:!0,passive:!0}),{flush:i,stop(){document.removeEventListener("keydown",a,{capture:!0}),o!==void 0&&clearTimeout(o),i()}}}function xn(e,t=1e3){let r=0,n,o=()=>{n=void 0;let s=Math.max(document.documentElement.scrollHeight,document.body?.scrollHeight??0);s>0&&s!==r&&(r=s,e(s))},i=()=>{n??=setTimeout(o,t)};return window.addEventListener("load",i),window.addEventListener("resize",i),{schedule:i,reset(){r=0,n!==void 0&&clearTimeout(n),o()},stop(){window.removeEventListener("load",i),window.removeEventListener("resize",i),n!==void 0&&clearTimeout(n)}}}function In(){let e=[[]];return{push(t,r){r&&(e=[e[e.length-1],[]]),e[e.length-1].push(t)},drain(){let t=e.flat();return e=[[]],t},get size(){return e.reduce((t,r)=>t+r.length,0)}}}function En(e,t,r){if(!e)return null;let n=null;try{let o=e.proxy&&new URL(e.proxy.url,location.href);o&&/^https?:$/.test(o.protocol)&&r.includes(o.origin)&&e.proxy?.origins.length&&(n={url:o.toString(),origins:[...e.proxy.origins]})}catch{}return{inlineImages:!!e.inlineImages&&!t,maxInlineBytes:e.maxInlineBytes??256*1024,collectFonts:!!e.collectFonts,proxy:n}}var Di=new Set(["img","source","video","audio","track","image","input"]),_i=/url\(\s*(['"]?)([^'")]+)\1\s*\)/g;function Tn(e){let t=i=>{if(!e.proxy||i.startsWith("data:"))return i;try{let s=new URL(i,location.href);return e.proxy.origins.includes(s.origin)?`${e.proxy.url}${e.proxy.url.includes("?")?"&":"?"}url=${encodeURIComponent(s.toString())}`:i}catch{return i}},r=i=>i.replace(_i,(s,a,l)=>{let c=t(l.trim());return c===l.trim()?s:`url(${a}${c}${a})`}),n=i=>i.split(",").map(s=>{let[a,...l]=s.trim().split(/\s+/);return a?[t(a),...l].join(" "):s}).join(", "),o=(i,s)=>{if(s==="img"&&typeof i.rr_dataURL=="string"&&i.rr_dataURL.length>e.maxInlineBytes&&delete i.rr_dataURL,!!e.proxy)for(let[a,l]of Object.entries(i))typeof l=="string"&&(a==="_cssText"||a==="style"?i[a]=r(l):a==="srcset"?i[a]=n(l):(a==="poster"||a==="src"&&Di.has(s)||a==="href"&&s==="link"||a==="xlink:href"&&s==="image")&&(i[a]=t(l)))};return{scrub(i,s){if($e(i,s,o),e.proxy&&i.type===3&&i.data?.source===8)for(let a of i.data.adds??[])typeof a.rule=="string"&&(a.rule=r(a.rule))}}}function Fi(e,t,r){let n={x:0,y:0,width:e.width,height:e.height},o=[];try{o=r?.(e)??[]}catch{o=[n]}let i=t.flatMap(s=>{try{return e.matches(s.selector)?s.regions??[n]:[]}catch{return[n]}});return[...o,...i]}function On(e){let t=new Map,r=document.createElement("canvas"),n=()=>{for(let i of Array.from(document.querySelectorAll("canvas"))){let s=e.idOf(i);if(!(s<=0||!i.width||!i.height||i.closest(e.skip)))try{r.width=i.width,r.height=i.height;let a=r.getContext("2d");if(!a)return;a.drawImage(i,0,0),a.fillStyle="#000";for(let p of Fi(i,e.rules,e.regionsFn))a.fillRect(p.x,p.y,p.width,p.height);let l=r.toDataURL("image/jpeg",e.quality),c=l.slice(l.indexOf(",")+1);if(!c||t.get(s)===c)continue;t.set(s,c);let u={rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:c}],type:"image/jpeg"};e.emit({type:3,timestamp:Date.now(),data:{source:9,id:s,type:0,commands:[{property:"clearRect",args:[0,0,i.width,i.height]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[u]},0,0]}]}})}catch{}}},o=setInterval(n,Math.round(1e3/e.fps));return{reset:()=>t.clear(),tick:n,stop:()=>clearInterval(o)}}function Nn(e,t=Date.now){let r=e.eventsPerSecond??10,n=e.burst??100,o=n,i=t();return()=>{let s=t();return o=Math.min(n,o+(s-i)/1e3*r),i=s,o<1?!1:(o-=1,!0)}}var zi=1e4;function Ln(e,t=Date.now){let r=new Map,n=0;return{allow(o){let i=o.data;return o.type!==3||i?.source!==0||!i.attributes?.length?!0:(r.size>zi&&r.clear(),i.attributes=i.attributes.filter(s=>{let a=r.get(s.id);return a||r.set(s.id,a=Nn({burst:e.burst??100,eventsPerSecond:e.perSecond??10},t)),a()?!0:(n++,!1)}),!!(i.attributes.length||i.adds?.length||i.removes?.length||i.texts?.length))},get dropped(){return n}}}var Pi=new Set([1,2,3,4,5,6,7,12]);function An(e){let t,r=!1,n=0;return{check(o){if(e<=0)return{keep:!0,resumed:!1};let i=o.timestamp??Date.now();if(t??=i,o.type===3&&Pi.has(o.data?.source??-1)){t=i;let s=r&&n>0;return r=!1,n=0,{keep:!0,resumed:s}}return!r&&i-t>e&&(r=!0),r?(n++,{keep:!1,resumed:!1}):{keep:!0,resumed:!1}}}}function Dn(e,t,r){let n=[],o;switch(t.mode){case"on_event":e.onCapture(i=>t.events.includes(i.event)&&r());break;case"on_flag":{let i=e.flags?.onChange(s=>s[t.flag]&&r());i&&n.push(i);break}case"on_url":try{o=new RegExp(t.pattern)}catch{e.log("bad on_url pattern",t.pattern)}break;case"on_frustration":{let i=[],s=a=>{let l=Date.now();for(i.push({t:l,x:a.clientX,y:a.clientY});i.length&&l-i[0].t>1e3;)i.shift();i.filter(u=>Math.hypot(u.x-a.clientX,u.y-a.clientY)<=30).length>=3&&r()};document.addEventListener("click",s,!0),n.push(()=>document.removeEventListener("click",s,!0));break}default:}return{checkUrl:i=>o?.test(i)&&r(),stop:()=>n.forEach(i=>i())}}var St="[redacted]",Ui=/^(authorization|proxy-authorization|cookie|set-cookie|x-api-key|x-auth-token|x-csrf-token)$/i,er=/pass(word|wd|phrase)?|secret|token|api[-_]?key|card|cvv|cvc|ssn|authorization/i;var Re=(e,t=4096)=>e.length>t?`${e.slice(0,t)}...[truncated ${e.length-t}]`:e;function tt(e){let t={};for(let r of Object.keys(e))t[r]=Ui.test(r)?St:Re(e[r]??"",512);return t}function Qt(e,t){if(t>6||e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(n=>Qt(n,t+1));let r={};for(let[n,o]of Object.entries(e))r[n]=er.test(n)?St:Qt(o,t+1);return r}function Be(e){if(e==null)return;if(typeof e!="string")return typeof URLSearchParams<"u"&&e instanceof URLSearchParams?Be(e.toString()):"[binary]";let t=e.trim();if(t.startsWith("{")||t.startsWith("["))try{return Re(JSON.stringify(Qt(JSON.parse(t),0)))}catch{}if(/^[^\s=&]+=[^\s]*$/.test(t)){let r=new URLSearchParams(t);for(let n of[...r.keys()])er.test(n)&&r.set(n,St);return Re(r.toString())}return Re(e)}function _n(e,t=1e3){try{if(typeof e=="string")return Re(e,t);if(e instanceof Error)return Re(`${e.name}: ${e.message}${e.stack?`
|
|
79
79
|
${e.stack}`:""}`,t);if(typeof Node<"u"&&e instanceof Node)return`<${e.nodeName.toLowerCase()}>`;if(typeof e=="function")return`[Function ${e.name||"anonymous"}]`;if(e===null||typeof e!="object")return String(e);let r=new WeakSet;return Re(JSON.stringify(e,(n,o)=>{if(typeof o=="bigint")return String(o);if(typeof Node<"u"&&o instanceof Node)return`<${o.nodeName.toLowerCase()}>`;if(o!==null&&typeof o=="object"){if(r.has(o))return"[Circular]";r.add(o)}return er.test(n)?St:o}),t)}catch{return"[unserializable]"}}var rt=(e,t)=>!!e?.some(r=>typeof r=="string"?t.includes(r):(r.lastIndex=0,r.test(t)));var Fn=["log","info","warn","error","debug"],$i=1e3,Bi=10;function zn(e,t){let r=0,n=!1,o=(c,u)=>{if(!(n||r>=$i)){n=!0;try{r++,e({level:c,args:t()?["[masked]"]:u.slice(0,Bi).map(p=>_n(p))})}catch{}finally{n=!1}}},i={},s={};for(let c of Fn){let u=console[c];i[c]=u,s[c]=function(...p){u.apply(this,p),o(c,p)},console[c]=s[c]}let a=c=>o("error",[c.error??c.message]),l=c=>o("error",["Unhandled rejection:",c.reason]);return window.addEventListener("error",a),window.addEventListener("unhandledrejection",l),()=>{for(let c of Fn)console[c]===s[c]&&(console[c]=i[c]);window.removeEventListener("error",a),window.removeEventListener("unhandledrejection",l)}}var Pn=e=>{let t={};return e.forEach((r,n)=>t[n]=r),t},Hi=e=>{let t={};for(let r of e.trim().split(/[\r\n]+/)){let n=r.indexOf(":");n>0&&(t[r.slice(0,n).trim().toLowerCase()]=r.slice(n+1).trim())}return t},nt=e=>{try{return new URL(e,location.href).href}catch{return e}};function Un(e,t,r){let n=d=>{try{if(r(d.url)||rt(t.deny,d.url)||t.allow&&!rt(t.allow,d.url))return;t.headers||(delete d.req?.headers,delete d.res?.headers),t.body||(delete d.req?.body,delete d.res?.body),d.req&&!d.req.headers&&!d.req.body&&delete d.req,d.res&&!d.res.headers&&!d.res.body&&delete d.res;let h=t.redact?t.redact(d):d;h&&e(h)}catch{}},o=d=>r(nt(d))||rt(t.deny,nt(d))||!!t.allow&&!rt(t.allow,nt(d)),i=window.fetch;window.fetch=function(d,h){let m=i.call(this,d,h);try{let f=nt(d instanceof Request?d.url:String(d));if(o(f))return m;let y=Date.now(),S=performance.now(),w=(h?.method??(d instanceof Request?d.method:"GET")).toUpperCase(),g=t.headers||t.body?{headers:tt(Pn(new Headers(h?.headers??(d instanceof Request?d.headers:void 0)))),body:Be(h?.body)}:void 0,b=k=>n({method:w,url:f,status:0,start:y,duration:Math.round(performance.now()-S),type:"fetch",req:g,...k});m.then(k=>{let R=Number(k.headers.get("content-length"))||void 0,E={status:k.status,size:R,res:t.headers?{headers:tt(Pn(k.headers))}:void 0};if(!t.body)return b(E);k.clone().text().then(I=>b({...E,size:R??I.length,res:{...E.res,body:Be(I)}}),()=>b(E))},k=>b({error:Re(String(k?.message??k),200)}))}catch{}return m};let s=window.fetch,a=XMLHttpRequest.prototype,{open:l,send:c,setRequestHeader:u}=a,p=new WeakMap;return a.open=function(d,h,...m){return p.set(this,{method:d.toUpperCase(),url:nt(String(h)),headers:{}}),l.call(this,d,h,...m)},a.setRequestHeader=function(d,h){let m=p.get(this);return m&&(m.headers[d.toLowerCase()]=h),u.call(this,d,h)},a.send=function(d){let h=p.get(this);if(h&&!o(h.url)){let m=Date.now(),f=performance.now();this.addEventListener("loadend",()=>{try{let y=t.body&&(this.responseType===""||this.responseType==="text")?this.responseText:void 0;n({method:h.method,url:h.url,status:this.status,start:m,duration:Math.round(performance.now()-f),size:Number(this.getResponseHeader("content-length"))||y?.length||void 0,type:"xhr",...this.status===0&&{error:"network error"},req:{headers:tt(h.headers),body:Be(d)},res:{headers:tt(Hi(this.getAllResponseHeaders())),body:y===void 0?void 0:Be(y)}})}catch{}})}return c.call(this,d)},()=>{window.fetch===s&&(window.fetch=i),a.open=l,a.send=c,a.setRequestHeader=u}}var Wi={on_event:"event_trigger_matched",on_url:"url_trigger_matched",on_flag:"linked_flag_matched",on_frustration:"frustration_detected"};function Gi(e){let t=parseInt(e.replace(/-/g,"").slice(0,12),16);return Number.isFinite(t)&&t>0?t:Date.now()}var ji=5*6e4,qi={$pageview:e=>({url:e.$current_url}),$pageleave:()=>({}),$form_start:e=>({form:e.form}),$form_submit:e=>({form:e.form}),$replay_tag:e=>({name:e.name})},Vi="********";function Ks(e,t,r,n){let{core:o}=e,i=e.config.apiHost,s=t.trigger_groups,a=t.trigger.mode,l=a==="on_url"&&n?.url_trigger||a==="on_event"&&n?.event_trigger||a==="on_flag"&&n?.linked_flag,u=!(s.length>0||a!=="always"&&!l),p=t.min_duration_ms,d=!!(n?.url_trigger||n?.event_trigger||n?.linked_flag);r.startReason=u?d?"trigger_overridden":n?.sampling?"sampling_overridden":"recording_initialized":void 0;let h=!1,m=!1,f=!1,y,S=!1,w=In(),g=t.min_duration_mode==="session"?Gi(o.sessionId):Date.now();r.bufferLength=()=>w.size;let b=()=>{r.status=S?"disabled":h?m?"excluded":"paused":u?"active":"buffering"},k=()=>{try{ue.takeFullSnapshot(!0)}catch{}},R=gn({url:`${i}/v1/replay`,apiKey:e.apiKey,fetch:e.fetch,ids:()=>({sessionId:o.sessionId,windowId:o.session.touch().windowId}),chunkBytes:t.chunk_bytes,flushMs:t.flush_interval_ms,hold:p>0||s.some(C=>(C.min_duration_ms??0)>0),onSent:(C,Z)=>{r.flushedBytes+=Z,r.ack(C)},onSessionChange:()=>k(),onGap:()=>k(),log:e.log}),E=xn(C=>{try{ue.addCustomEvent("page_height",{height:C})}catch{}}),I=ar(t.url_privacy_rules),x=kt(I,location.href),P="",H="",U,T=()=>{P=["[data-lc-mask]",...t.mask_selectors,...x.mask].join(","),H=["[data-lc-block]",...t.block_selectors,...x.block].join(","),U=t.mask_all_text||x.maskAllText?wn(P,["[data-lc-unmask]",...t.unmask_selectors].join(",")):void 0};T(),r.bufferBytes=()=>R.unsent;let X=t.mutationThrottle?Ln(t.mutationThrottle):void 0;r.throttled=()=>X?.dropped??0;let K=C=>{try{return C?[new URL(C).origin]:[]}catch{return[]}},N=En(t.assets,t.mask_all_text||I.some(C=>C.mask_all_text),[location.origin,...K(i),...K(e.config.uiHost)]),F=N&&(N.proxy||N.inlineImages)?Tn(N):void 0,W=!!t.canvas&&(t.canvasMask.length>0||!!t.canvasMaskRegions),G,de=t.maskUrlFn??(C=>Jr(C,e.config.urlPrivacy??{})),ne=An(t.idle_threshold_ms),ye=(C,Z)=>{if(h||S)return;let Q=ne.check(C);if(!Q.keep||(Q.resumed&&k(),X&&!X.allow(C)))return;C.type===2&&G?.reset();let Se=it=>ue.mirror.getNode(it);if(U?.scrub(C,Se),F?.scrub(C,Se),Sn(C,Se),de&&C.type===4&&typeof C.data?.href=="string"){let it=C.data;it.href=de(it.href)}C.type===3&&C.data?.source===0&&E.schedule(),u?R.add(C):w.push(C,!!Z)},te=t.crossOriginIframes,oe=!!te&&Cn(),j=oe&&!kn(te),ve=te&&!oe?Mn(te):void 0,me=j?void 0:Rn(C=>{try{return ue.addCustomEvent("keys",{n:C}),!0}catch{return!1}},()=>[P,H,"[data-lc-ignore]"].filter(Boolean).join(",")),ie=(C,Z)=>{if(!(h||S||!y))try{ue.addCustomEvent(C,Z)}catch{}},we=[];if(!j){let C=()=>t.mask_all_text||x.maskAllText;if(t.console&&we.push(zn(Z=>ie("console",Z),C)),t.network){let Z=`${(i??"").replace(/\/+$/,"")}/v1/`;we.push(Un(Q=>ie("network",{...Q,url:de?de(Q.url):Q.url}),t.network,Q=>Q.startsWith(Z)))}}let se=()=>{if(!(y||S||j)){try{y=D()}catch(C){r.status="rrweb_error",r.rrwebError=String(C).slice(0,200);return}W&&t.canvas&&(G=On({...t.canvas,skip:`${H},[data-lc-ignore]`,rules:t.canvasMask,regionsFn:t.canvasMaskRegions,idOf:C=>ue.mirror.getId(C),emit:C=>ye(C)})),E.reset(),b()}},D=()=>ue({emit:ye,checkoutEveryNms:u?ji:t.buffer_ms/2,maskAllInputs:t.mask_all_inputs,maskInputOptions:{...t.maskInputOptions,password:!0},maskInputFn:t.maskInputFn??(()=>Vi),maskTextSelector:U?"*":P,...U?{maskTextFn:U.maskTextFn}:t.maskTextFn&&{maskTextFn:t.maskTextFn},blockSelector:H,ignoreSelector:"[data-lc-ignore]",sampling:{mousemove:50,scroll:150,input:"last",...t.canvas&&!W&&{canvas:t.canvas.fps}},...t.canvas&&!W&&{dataURLOptions:{type:"image/jpeg",quality:t.canvas.quality}},...N?.inlineImages&&{inlineImages:!0},...N?.collectFonts&&{collectFonts:!0},errorHandler:C=>(r.rrwebErrors++,r.rrwebError=String(C).slice(0,200),!0),recordCrossOriginIframes:!!te,slimDOMOptions:{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0},recordCanvas:!!t.canvas&&!W})??void 0,Y=()=>{y?.(),y=void 0,G?.stop(),G=void 0},O=(C,Z)=>{if(!(u||S)){u=!0,r.startReason=C??Wi[a]??"recording_initialized",Z?.min_duration_ms!==void 0&&(p=Z.min_duration_ms),r.minDurationMs=p;for(let Q of w.drain())R.add(Q);Y(),h||se(),ae(),b()}},V,ae=()=>{!R.held||V!==void 0||(V=setTimeout(()=>R.release(),Math.max(0,p-(Date.now()-g))))},J=s.length?sr(e,s,()=>o.sessionId,C=>O("trigger_group_matched",C),{url:n?.url_trigger,event:n?.event_trigger,flag:n?.linked_flag,sampling:n?.sampling}):void 0,$=J??Dn(e,t.trigger,()=>O());J&&(r.triggers=J.states,r.matchedGroups=J.matched);let be="",He=()=>{if(location.href===be)return;be=location.href;let C=kt(I,be),Z=C.key!==x.key;Z&&(x=C,T());let Q=!!y,Se=nr(be,t.include_urls,t.exclude_urls);!Se&&!m?(m=h=!0,Y(),w.drain(),R.flush(),b()):Se&&m&&(m=!1,h=f,h||se(),b()),Se&&$.checkUrl(be),Z&&Q&&y&&(Y(),se())},$n=setInterval(He,1e3),Ct=window.navigation,ot=[],Ne=()=>He();if(Ct)Ct.addEventListener("currententrychange",Ne),ot.push(()=>Ct.removeEventListener("currententrychange",Ne));else for(let C of["pushState","replaceState"]){let Z=history[C],Q=function(...Se){Z.apply(this,Se),He()};history[C]=Q,ot.push(()=>{history[C]===Q&&(history[C]=Z)})}window.addEventListener("popstate",Ne),window.addEventListener("hashchange",Ne),ot.push(()=>(window.removeEventListener("popstate",Ne),window.removeEventListener("hashchange",Ne))),e.onCapture(C=>{C.event==="$pageview"&&He();let Z=qi[C.event];if(!(!Z||h||S||!y))try{let Q=Z(C.properties);de&&typeof Q.url=="string"&&(Q.url=de(Q.url)),ue.addCustomEvent(C.event,Q)}catch{}});let tr=()=>{document.visibilityState==="visible"?u&&y&&ue.takeFullSnapshot(!0):R.beacon()};return document.addEventListener("visibilitychange",tr),e.onUnload(()=>{R.held?R.discard():R.beacon()}),He(),J?.check(),h||se(),u&&ae(),b(),{stop:()=>{S=!0,Y(),clearInterval($n);for(let C of ot)C();clearTimeout(V),document.removeEventListener("visibilitychange",tr),ve?.(),E.stop(),me?.stop();for(let C of we)C();$.stop(),w.drain(),R.discard(),b()},paused:()=>h,pause(){f||S||(f=h=!0,Y(),w.drain(),R.flush(),b())},resume(){!f||S||(f=!1,h=m,h||se(),b())}}}export{Ks as startRecorder};
|
package/dist/static/v0/replay.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as f,c as v,d as b,e as R,f as W,g as h,i as D,j as U}from"./chunk-UPPUYIIH.js";import"./chunk-EFNCQJI3.js";var k="lc_replay_ack",z=()=>{try{let e=sessionStorage.getItem(k);return e?[e]:[]}catch{return[]}};function j(){let e={status:"awaiting_config",disabledReason:void 0,startReason:void 0,sampleRate:void 0,minDurationMs:void 0,triggers:void 0,matchedGroups:void 0,bufferLength:void 0,flushedBytes:0,confirmed:new Set(z()),rrwebError:void 0,rrwebErrors:0,bufferBytes:void 0,throttled:void 0};return Object.assign(e,{ack(t){if(!e.confirmed.has(t)){e.confirmed.add(t);try{sessionStorage.setItem(k,t)}catch{}}},props(t){let i=e.triggers?.(),r={$recording_status:e.status,$has_recording:e.confirmed.has(t)};e.disabledReason&&(r.$replay_disabled_reason=e.disabledReason),e.startReason&&(r.$session_recording_start_reason=e.startReason),e.sampleRate!==void 0&&(r.$replay_sample_rate=e.sampleRate),e.minDurationMs!==void 0&&(r.$replay_minimum_duration=e.minDurationMs),i&&(r.$replay_url_trigger_status=i.url,r.$replay_event_trigger_status=i.event,r.$replay_linked_flag_trigger_status=i.flag);let d=e.matchedGroups?.();d?.length&&(r.$replay_trigger_groups_matched=d),e.bufferLength&&(r.$replay_buffer_length=e.bufferLength()),e.flushedBytes&&(r.$replay_flushed_size=e.flushedBytes),e.rrwebError&&(r.$replay_rrweb_error=e.rrwebError),e.rrwebErrors&&(r.$replay_rrweb_error_count=e.rrwebErrors);let c=e.bufferBytes?.();c&&(r.$replay_buffer_size=c);let a=e.throttled?.();return a&&(r.$replay_throttled_mutations=a),r}})}var C="lucida_replay_url";function E(e,t,i,r=2e3){let d={},c=()=>{if(!i())return;let o=globalThis,s=t();try{e.intercom&&typeof o.Intercom=="function"&&d.intercom!==s&&(o.Intercom("update",{[C]:s}),d.intercom=s),e.crisp&&typeof o.$crisp?.push=="function"&&d.crisp!==s&&(o.$crisp.push(["set","session:data",[[[C,s]]]]),d.crisp=s)}catch{}};c();let a=setInterval(c,r);return()=>clearInterval(a)}var Y=e=>{let t=j();e.eventExtras.push(n=>t.props(n));let i=e.config.replay??{},r=n=>{t.status="disabled",t.disabledReason=n};if(i.enabled===!1)return r("disabled_locally");let d=e.config.replayOwner??i.owner;if(!R(d))return d||console.warn("[lucida] replay is off: Watchtower is already recording this page. Set replayOwner: 'lucida' (or 'both') to record with Lucida too."),e.loadConfig(),r("owner_watchtower");if(navigator.connection?.saveData)return r("data_saver");let a="idle",o,s=0,g=!1,M=location.href,w=()=>e.core.hasConsent("analytics")&&e.core.hasConsent("replay"),m=async(n,_=!1)=>{if(a!=="idle")return;if(!w())return r("no_consent");a="starting",t.status="awaiting_config";let p=++s,u=await e.loadConfig(),x=f(u?.replay_never_record,M)||(!!n||_)&&f(u?.replay_never_record,location.href),l=x?null:v(i,u);if(p!==s)return void(a="idle");if(!l)return r(x?"never_record_page":"remote_disabled"),void(a="idle");let I=e.core.sessionId,$=l.trigger_groups.length>0,O=!!n?.sampling||$||h(I,"",l.sample_rate);if(t.sampleRate=$?void 0:l.sample_rate,t.minDurationMs=l.min_duration_ms,!O)return t.status=b(location.href,l.include_urls,l.exclude_urls)?"sampled":"excluded",void(a="idle");t.status="lazy_loading",t.disabledReason=void 0;let{startRecorder:P}=await import("./recorder-
|
|
1
|
+
import{a as f,c as v,d as b,e as R,f as W,g as h,i as D,j as U}from"./chunk-UPPUYIIH.js";import"./chunk-EFNCQJI3.js";var k="lc_replay_ack",z=()=>{try{let e=sessionStorage.getItem(k);return e?[e]:[]}catch{return[]}};function j(){let e={status:"awaiting_config",disabledReason:void 0,startReason:void 0,sampleRate:void 0,minDurationMs:void 0,triggers:void 0,matchedGroups:void 0,bufferLength:void 0,flushedBytes:0,confirmed:new Set(z()),rrwebError:void 0,rrwebErrors:0,bufferBytes:void 0,throttled:void 0};return Object.assign(e,{ack(t){if(!e.confirmed.has(t)){e.confirmed.add(t);try{sessionStorage.setItem(k,t)}catch{}}},props(t){let i=e.triggers?.(),r={$recording_status:e.status,$has_recording:e.confirmed.has(t)};e.disabledReason&&(r.$replay_disabled_reason=e.disabledReason),e.startReason&&(r.$session_recording_start_reason=e.startReason),e.sampleRate!==void 0&&(r.$replay_sample_rate=e.sampleRate),e.minDurationMs!==void 0&&(r.$replay_minimum_duration=e.minDurationMs),i&&(r.$replay_url_trigger_status=i.url,r.$replay_event_trigger_status=i.event,r.$replay_linked_flag_trigger_status=i.flag);let d=e.matchedGroups?.();d?.length&&(r.$replay_trigger_groups_matched=d),e.bufferLength&&(r.$replay_buffer_length=e.bufferLength()),e.flushedBytes&&(r.$replay_flushed_size=e.flushedBytes),e.rrwebError&&(r.$replay_rrweb_error=e.rrwebError),e.rrwebErrors&&(r.$replay_rrweb_error_count=e.rrwebErrors);let c=e.bufferBytes?.();c&&(r.$replay_buffer_size=c);let a=e.throttled?.();return a&&(r.$replay_throttled_mutations=a),r}})}var C="lucida_replay_url";function E(e,t,i,r=2e3){let d={},c=()=>{if(!i())return;let o=globalThis,s=t();try{e.intercom&&typeof o.Intercom=="function"&&d.intercom!==s&&(o.Intercom("update",{[C]:s}),d.intercom=s),e.crisp&&typeof o.$crisp?.push=="function"&&d.crisp!==s&&(o.$crisp.push(["set","session:data",[[[C,s]]]]),d.crisp=s)}catch{}};c();let a=setInterval(c,r);return()=>clearInterval(a)}var Y=e=>{let t=j();e.eventExtras.push(n=>t.props(n));let i=e.config.replay??{},r=n=>{t.status="disabled",t.disabledReason=n};if(i.enabled===!1)return r("disabled_locally");let d=e.config.replayOwner??i.owner;if(!R(d))return d||console.warn("[lucida] replay is off: Watchtower is already recording this page. Set replayOwner: 'lucida' (or 'both') to record with Lucida too."),e.loadConfig(),r("owner_watchtower");if(navigator.connection?.saveData)return r("data_saver");let a="idle",o,s=0,g=!1,M=location.href,w=()=>e.core.hasConsent("analytics")&&e.core.hasConsent("replay"),m=async(n,_=!1)=>{if(a!=="idle")return;if(!w())return r("no_consent");a="starting",t.status="awaiting_config";let p=++s,u=await e.loadConfig(),x=f(u?.replay_never_record,M)||(!!n||_)&&f(u?.replay_never_record,location.href),l=x?null:v(i,u);if(p!==s)return void(a="idle");if(!l)return r(x?"never_record_page":"remote_disabled"),void(a="idle");let I=e.core.sessionId,$=l.trigger_groups.length>0,O=!!n?.sampling||$||h(I,"",l.sample_rate);if(t.sampleRate=$?void 0:l.sample_rate,t.minDurationMs=l.min_duration_ms,!O)return t.status=b(location.href,l.include_urls,l.exclude_urls)?"sampled":"excluded",void(a="idle");t.status="lazy_loading",t.disabledReason=void 0;let{startRecorder:P}=await import("./recorder-MHNUIAAP.js");if(p!==s)return void(a="idle");o=P(e,l,t,n),a="on"},S=()=>{s++,o?.stop(),o=void 0,a="idle"};e.replay={start:async n=>{g=!1;let _=n===!0,p=u=>_||typeof n=="object"&&!!n[u];await m({sampling:n===void 0||p("sampling"),url_trigger:p("url_trigger"),event_trigger:p("event_trigger"),linked_flag:p("linked_flag")})},stop:()=>{g=!0,S(),r("stopped_manually")},pause:()=>o?.pause(),resume:()=>o?.resume(),tag:n=>e.client.capture("$replay_tag",{name:n,session_id:e.core.sessionId}),isRecording:()=>a==="on"&&!o?.paused()},e.core.onChange(n=>{n==="consent"&&(w()?g||m(void 0,!0):(S(),r("no_consent")))}),m();let y=i.supportWidgets,T=y?.intercom||y?.crisp?E(y,()=>e.client.getReplayUrl(),()=>a==="on"&&!o?.paused()):void 0;return()=>{s++,o?.stop(),T?.()}};export{W as fnv1a32,R as lucidaRecords,U as pagePrivacy,f as policyMatches,Y as replay,v as resolveReplay,h as sampled,b as urlAllowed,D as urlRules};
|