1(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};n.SENTRY_RELEASE={id:"7bf5649e0b7438902e52b4925b080d07b0800702"};var e=new n.Error().stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="9b8625d2-78cf-4e49-a5d1-f1b21302d807",n._sentryDebugIdIdentifier="sentry-dbid-9b8625d2-78cf-4e49-a5d1-f1b21302d807")}catch{}})();(function(){function n(i,a,u,c,h,f,m){try{var y=i[f](m),S=y.value}catch(C){return void u(C)}y.done?a(S):Promise.resolve(S).then(c,h)}function e(i){return function(){var a=this,u=arguments;return new Promise((function(c,h){var f=i.apply(a,u);function m(S){n(f,c,h,m,y,"next",S)}function y(S){n(f,c,h,m,y,"throw",S)}m(void 0)}))}}function t(){return t=Object.assign?Object.assign.bind():function(i){for(var a=1;a<arguments.length;a++){var u=arguments[a];for(var c in u)({}).hasOwnProperty.call(u,c)&&(i[c]=u[c])}return i},t.apply(null,arguments)}var r,s=["type"],o=Object.defineProperty,l=(i,a,u)=>((c,h,f)=>h in c?o(c,h,{enumerable:!0,configurable:!0,writable:!0,value:f}):c[h]=f)(i,typeof a!="symbol"?a+"":a,u),d=Object.defineProperty,p=(i,a,u)=>((c,h,f)=>h in c?d(c,h,{enumerable:!0,configurable:!0,writable:!0,value:f}):c[h]=f)(i,typeof a!="symbol"?a+"":a,u),g=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(g||{}),v={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},w={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},b={};function I(i){if(b[i])return b[i];var a=(function(k){var O,G=globalThis==null||(O=globalThis.Zone)==null||O.__symbol__==null?void 0:O.__symbol__(k);return G&&globalThis[G]?globalThis[G]:void 0})(i)||globalThis[i],u=a.prototype,c=i in v?v[i]:void 0,h=!!(c&&c.every((k=>{var O,G;return!!((G=(O=Object.getOwnPropertyDescriptor(u,k))==null?void 0:O.get)!=null&&G.toString().includes("[native code]"))}))),f=i in w?w[i]:void 0,m=!!(f&&f.every((k=>{var O;return typeof u[k]=="function"&&((O=u[k])==null?void 0:O.toString().includes("[native code]"))})));if(h&&m)return b[i]=a.prototype,a.prototype;try{var y=document.createElement("iframe");document.body.appendChild(y);var S=y.contentWindow;if(!S)return a.prototype;var C=S[i].prototype;return document.body.removeChild(y),C?b[i]=C:a.prototype}catch{return a.prototype}}var R={};function M(i,a,u){var c,h=i+"."+String(u);if(R[h])return R[h].call(a);var f=I(i),m=(c=Object.getOwnPropertyDescriptor(f,u))==null?void 0:c.get;return m?(R[h]=m,m.call(a)):a[u]}var H={};function X(i,a,u){var c=i+"."+String(u);if(H[c])return H[c].bind(a);var h=I(i)[u];return typeof h!="function"?a[u]:(H[c]=h,h.bind(a))}var q={childNodes:function(i){return M("Node",i,"childNodes")},parentNode:function(i){return M("Node",i,"parentNode")},parentElement:function(i){return M("Node",i,"parentElement")},textContent:function(i){return M("Node",i,"textContent")},contains:function(i,a){return X("Node",i,"contains")(a)},getRootNode:function(i){return X("Node",i,"getRootNode")()},host:function(i){return i&&"host"in i?M("ShadowRoot",i,"host"):null},styleSheets:function(i){return i.styleSheets},shadowRoot:function(i){return i&&"shadowRoot"in i?M("Element",i,"shadowRoot"):null},querySelector:function(i,a){return M("Element",i,"querySelector")(a)},querySelectorAll:function(i,a){return M("Element",i,"querySelectorAll")(a)},mutationObserver:function(){return I("MutationObserver").constructor}};function de(i){return i.nodeType===i.ELEMENT_NODE}function pe(i){var a=i&&"host"in i&&"mode"in i&&q.host(i)||null;return!!(a&&"shadowRoot"in a&&q.shadowRoot(a)===i)}function Ae(i){return Object.prototype.toString.call(i)==="[object ShadowRoot]"}function He(i){try{var a=i.rules||i.cssRules;if(!a)return null;var u=Array.from(a,(h=>Ze(h,i.href))).join("");return(c=u).includes(" background-clip: text;")&&!c.includes(" -webkit-background-clip: text;")&&(c=c.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),c}catch{return null}var c}function Ze(i,a){if((function(f){return"styleSheet"in f})(i)){var u;try{u=He(i.styleSheet)||(function(f){var{cssText:m}=f;if(m.split('"').length<3)return m;var y=["@import","url("+JSON.stringify(f.href)+")"];return f.layerName===""?y.push("layer"):f.layerName&&y.push("layer("+f.layerName+")"),f.supportsText&&y.push("supports("+f.supportsText+")"),f.media.length&&y.push(f.media.mediaText),y.join(" ")+";"})(i)}catch{u=i.cssText}return i.styleSheet.href?ut(u,i.styleSheet.href):u}var c,h=i.cssText;return(function(f){return"selectorText"in f})(i)&&i.selectorText.includes(":")&&(c=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,h=h.replace(c,"$1\\$2")),a?ut(h,a):h}function Ee(i,a){return Array.from(i.styleSheets).find((u=>u.href===a))}let vt=class{constructor(){p(this,"idNodeMap",new Map),p(this,"nodeMetaMap",new WeakMap)}getId(i){var a;if(!i)return-1;var u=(a=this.getMeta(i))==null?void 0:a.id;return u??-1}getNode(i){return this.idNodeMap.get(i)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(i){return this.nodeMetaMap.get(i)||null}removeNodeFromMap(i){var a=this.getId(i);
1this.idNodeMap.delete(a),i.childNodes&&i.childNodes.forEach((u=>this.removeNodeFromMap(u)))}has(i){return this.idNodeMap.has(i)}hasNode(i){return this.nodeMetaMap.has(i)}add(i,a){var u=a.id;this.idNodeMap.set(u,i),this.nodeMetaMap.set(i,a)}replace(i,a){var u=this.getNode(i);if(u){var c=this.nodeMetaMap.get(u);c&&this.nodeMetaMap.set(a,c)}this.idNodeMap.set(i,a)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function tt(i){var{element:a,maskInputOptions:u,tagName:c,type:h,value:f,maskInputFn:m}=i,y=f||"",S=h&&Ve(h);return(u[c.toLowerCase()]||S&&u[S])&&(y=m?m(y,a):"*".repeat(y.length)),y}function Ve(i){return i.toLowerCase()}var Ke="__rrweb_original__";function wt(i){var a=i.type;return i.hasAttribute("data-rr-is-password")?"password":a?Ve(a):null}function mt(i,a){var u,c;try{c=new URL(i,a??window.location.href)}catch{return null}var h=c.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(u=h==null?void 0:h[1])!==null&&u!==void 0?u:null}var Ct=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,rt=/^(?:[a-z+]+:)?\/\//i,_t=/^www\..*/i,Lt=/^(data:)([^,]*),(.*)/i;function ut(i,a){return(i||"").replace(Ct,((u,c,h,f,m,y)=>{var S,C=h||m||y,k=c||f||"";if(!C)return u;if(rt.test(C)||_t.test(C)||Lt.test(C))return"url("+k+C+k+")";
1if(C[0]==="/")return"url("+k+(((S=a).indexOf("//")>-1?S.split("/").slice(0,3).join("/"):S.split("/")[0]).split("?")[0]+C)+k+")";var O=a.split("/"),G=C.split("/");for(var B of(O.pop(),G))B!=="."&&(B===".."?O.pop():O.push(B));return"url("+k+O.join("/")+k+")"}))}var dt,kt,nt=1,yt=new RegExp("[^a-z0-9-_:]"),Ge=-2;function ct(){return nt++}var St=/^[^ \t\n\r\u000c]+/,hr=/^[, \t\n\r\u000c]+/,Rt=new WeakMap;function Yt(i,a){return a&&a.trim()!==""?Qt(i,a):a}function Et(i){return!!(i.tagName==="svg"||i.ownerSVGElement)}function Qt(i,a){var u=Rt.get(i);if(u||(u=i.createElement("a"),Rt.set(i,u)),a){if(a.startsWith("blob:")||a.startsWith("data:"))return a}else a="";return u.setAttribute("href",a),u.href}function le(i,a,u,c){return c&&(u==="src"||u==="href"&&(a!=="use"||c[0]!=="#")||u==="xlink:href"&&c[0]!=="#"?Yt(i,c):u!=="background"||a!=="table"&&a!=="td"&&a!=="th"?u==="srcset"?(function(h,f){if(f.trim()==="")return f;var m=0;function y(B){var ae,fe=B.exec(f.substring(m));return fe?(ae=fe[0],m+=ae.length,ae):""}for(var S=[];y(hr),!(m>=f.length);){var C=y(St);if(C.slice(-1)===",")C=Yt(h,C.substring(0,C.length-1)),S.push(C);else{var k="";C=Yt(h,C);for(var O=!1;;){var G=f.charAt(m);if(G===""){S.push((C+k).trim());break}if(O)G===")"&&(O=!1);else{if(G===","){m+=1,S.push((C+k).trim());break}G==="("&&(O=!0)}k+=G,m+=1}}}return S.join(", ")})(i,c):u==="style"?ut(c,Qt(i)):a==="object"&&u==="data"?Yt(i,c):c:Yt(i,c))}function _(i,a,u){return(i==="video"||i==="audio")&&a==="autoplay"}function E(i,a,u){if(!i)return!1;if(i.nodeType!==i.ELEMENT_NODE)return!!u&&E(q.parentNode(i),a,u);for(var c=i.classList.length;c--;){var h=i.classList[c];if(a.test(h))return!0}return!!u&&E(q.parentNode(i),a,u)}function T(i,a,u,c){var h;if(de(i)){if(h=i,!q.childNodes(h).length)return!1}else{if(q.parentElement(i)===null)return!1;h=q.parentElement(i)}try{if(typeof a=="string"){if(c){if(h.closest("."+a))return!0}else if(h.classList.contains(a))return!0}else if(E(h,a,c))return!0;if(u){if(c){if(h.closest(u))return!0}else if(h.matches(u))return!0}}catch{}return!1}function L(i,a){var{doc:u,mirror:c,blockClass:h,blockSelector:f,needsMask:m,inlineStylesheet:y,maskInputOptions:S={},maskTextFn:C,maskInputFn:k,dataURLOptions:O={},inlineImages:G,recordCanvas:B,keepIframeSrcFn:ae,newlyAddedElement:fe=!1}=a,oe=(function(P,F){if(F.hasNode(P)){var N=F.getId(P);return N===1?void 0:N}})(u,c);switch(i.nodeType){case i.DOCUMENT_NODE:return i.compatMode!=="CSS1Compat"?{type:g.Document,childNodes:[],compatMode:i.compatMode}:{type:g.Document,childNodes:[]};case i.DOCUMENT_TYPE_NODE:return{type:g.DocumentType,name:i.name,publicId:i.publicId,systemId:i.systemId,rootId:oe};case i.ELEMENT_NODE:return(function(P,F){for(var N,{doc:W,blockClass:z,blockSelector:K,inlineStylesheet:J,maskInputOptions:ie={},maskInputFn:ce,dataURLOptions:ve={},inlineImages:Ie,recordCanvas:U,keepIframeSrcFn:Ce,newlyAddedElement:me=!1,rootId:ye}=F,ge=(function(Re,$t,rr){try{if(typeof $t=="string"){if(Re.classList.contains($t))return!0}else for(var nr=Re.classList.length;nr--;){var mr=Re.classList[nr];if($t.test(mr))return!0}if(rr)return Re.matches(rr)}catch{}return!1})(P,z,K),ue=(function(Re){if(Re instanceof HTMLFormElement)return"form";var $t=Ve(Re.tagName);return yt.test($t)?"div":$t})(P),te={},Le=P.attributes.length,De=0;De<Le;De++){var Oe=P.attributes[De];_(ue,Oe.name,Oe.value)||(te[Oe.name]=le(W,ue,Ve(Oe.name),Oe.value))}if(ue==="link"&&J){var Y=(function(Re){return Re==null?void 0:Re.href})(P);if(Y){var Me=Ee(W,Y);!Me&&Y.includes(".css")&&(Me=Ee(W,window.location.origin+"/"+Y.replace(window.location.href,"")));var Ot=null;Me&&(Ot=He(Me)),Ot&&(delete te.rel,delete te.href,te._cssText=Ot)}}if(ue==="style"&&P.sheet&&!(P.innerText||q.textContent(P)||"").trim().length){var ht=He(P.sheet);ht&&(te._cssText=ht)}if(ue==="input"||ue==="textarea"||ue==="select"){var Je=P.value,pt=P.checked;te.type!=="radio"&&te.type!=="checkbox"&&te.type!=="submit"&&te.type!=="button"&&Je?te.value=tt({element:P,type:wt(P),tagName:ue,value:Je,maskInputOptions:ie,maskInputFn:ce}):pt&&(te.checked=pt)}if(ue==="option"&&(P.selected&&!ie.select?te.selected=!0:delete te.selected),ue==="dialog"&&P.open)try{te.rr_open_mode=P.matches("dialog:modal")?"modal":"non-modal"}catch{te.rr_open_mode="modal",te.ph_rr_could_not_detect_modal=!0}if(ue==="canvas"&&U){if(P.__context==="2d")(function(Re){var $t=Re.getContext("2d");if(!$t)return!0;for(var rr=0;rr<Re.width;
1rr+=50)for(var nr=0;nr<Re.height;nr+=50){var mr=$t.getImageData,si=Ke in mr?mr[Ke]:mr;if(new Uint32Array(si.call($t,rr,nr,Math.min(50,Re.width-rr),Math.min(50,Re.height-nr)).data.buffer).some((fs=>fs!==0)))return!1}return!0})(P)||(te.rr_dataURL=P.toDataURL(ve.type,ve.quality));else if(!("__context"in P)){var Vt=P.toDataURL(ve.type,ve.quality),Zt=W.createElement("canvas");Zt.width=P.width,Zt.height=P.height,Vt!==Zt.toDataURL(ve.type,ve.quality)&&(te.rr_dataURL=Vt)}}if(ue==="img"&&Ie){dt||(dt=W.createElement("canvas"),kt=dt.getContext("2d"));var Qe=P,Br=Qe.currentSrc||Qe.getAttribute("src")||"<unknown-src>",yn=Qe.crossOrigin,vr=()=>{Qe.removeEventListener("load",vr);try{dt.width=Qe.naturalWidth,dt.height=Qe.naturalHeight,kt.drawImage(Qe,0,0),te.rr_dataURL=dt.toDataURL(ve.type,ve.quality)}catch(Re){if(Qe.crossOrigin!=="anonymous")return Qe.crossOrigin="anonymous",void(Qe.complete&&Qe.naturalWidth!==0?vr():Qe.addEventListener("load",vr));console.warn("Cannot inline img src="+Br+"! Error: "+Re)}Qe.crossOrigin==="anonymous"&&(yn?te.crossOrigin=yn:Qe.removeAttribute("crossorigin"))};Qe.complete&&Qe.naturalWidth!==0?vr():Qe.addEventListener("load",vr)}if(ue==="audio"||ue==="video"){var xe=te;xe.rr_mediaState=P.paused?"paused":"played",xe.rr_mediaCurrentTime=P.currentTime,xe.rr_mediaPlaybackRate=P.playbackRate,xe.rr_mediaMuted=P.muted,xe.rr_mediaLoop=P.loop,xe.rr_mediaVolume=P.volume}if(me||(P.scrollLeft&&(te.rr_scrollLeft=P.scrollLeft),P.scrollTop&&(te.rr_scrollTop=P.scrollTop)),ge){var{width:Nt,height:we}=P.getBoundingClientRect();te={class:te.class,rr_width:Nt+"px",rr_height:we+"px"}}ue!=="iframe"||Ce(te.src)||(P.contentDocument||(te.rr_src=te.src),delete te.src);try{customElements.get(ue)&&(N=!0)}catch{}return{type:g.Element,tagName:ue,attributes:te,childNodes:[],isSVG:Et(P)||void 0,needBlock:ge,rootId:ye,isCustom:N}})(i,{doc:u,blockClass:h,blockSelector:f,inlineStylesheet:y,maskInputOptions:S,maskInputFn:k,dataURLOptions:O,inlineImages:G,recordCanvas:B,keepIframeSrcFn:ae,newlyAddedElement:fe,rootId:oe});case i.TEXT_NODE:return(function(P,F){var N,{needsMask:W,maskTextFn:z,rootId:K}=F,J=q.parentNode(P),ie=J&&J.tagName,ce=q.textContent(P),ve=ie==="STYLE"||void 0,Ie=ie==="SCRIPT"||void 0;if(ve&&ce){try{P.nextSibling||P.previousSibling||(N=J.sheet)!=null&&N.cssRules&&(ce=He(J.sheet))}catch(U){console.warn("Cannot get CSS styles from text's parentNode. Error: "+U,P)}ce=ut(ce,Qt(F.doc))}return Ie&&(ce="SCRIPT_PLACEHOLDER"),!ve&&!Ie&&ce&&W&&(ce=z?z(ce,q.parentElement(P)):ce.replace(/[\S]/g,"*")),{type:g.Text,textContent:ce||"",isStyle:ve,rootId:K}})(i,{doc:u,needsMask:m,maskTextFn:C,rootId:oe});case i.CDATA_SECTION_NODE:return{type:g.CDATA,textContent:"",rootId:oe};case i.COMMENT_NODE:return{type:g.Comment,textContent:q.textContent(i)||"",rootId:oe};default:return!1}}function D(i){return i==null?"":i.toLowerCase()}function ke(i,a){var{doc:u,mirror:c,blockClass:h,blockSelector:f,maskTextClass:m,maskTextSelector:y,skipChild:S=!1,inlineStylesheet:C=!0,maskInputOptions:k={},maskTextFn:O,maskInputFn:G,slimDOMOptions:B,dataURLOptions:ae={},inlineImages:fe=!1,recordCanvas:oe=!1,onSerialize:P,onIframeLoad:F,iframeLoadTimeout:N=5e3,onStylesheetLoad:W,stylesheetLoadTimeout:z=5e3,keepIframeSrcFn:K=(()=>!1),newlyAddedElement:J=!1}=a,{needsMask:ie}=a,{preserveWhiteSpace:ce=!0}=a;ie||(ie=T(i,m,y,ie===void 0));var ve,Ie=L(i,{doc:u,mirror:c,blockClass:h,blockSelector:f,needsMask:ie,inlineStylesheet:C,maskInputOptions:k,maskTextFn:O,maskInputFn:G,dataURLOptions:ae,inlineImages:fe,recordCanvas:oe,keepIframeSrcFn:K,newlyAddedElement:J});if(!Ie)return console.warn(i,"not serialized"),null;ve=c.hasNode(i)?c.getId(i):!(function(Y,Me){return!!(Me.comment&&Y.type===g.Comment||Y.type===g.Element&&(Me.script&&(Y.tagName==="script"||Y.tagName==="link"&&(Y.attributes.rel==="preload"||Y.attributes.rel==="modulepreload")&&Y.attributes.as==="script"||Y.tagName==="link"&&Y.attributes.rel==="prefetch"&&typeof Y.attributes.href=="string"&&mt(Y.attributes.href)==="js")||Me.headFavicon&&(Y.tagName==="link"&&Y.attributes.rel==="shortcut icon"||Y.tagName==="meta"&&(D(Y.attributes.name).match(/^msapplication-tile(image|color)$/)||D(Y.attributes.name)==="application-name"||D(Y.attributes.rel)==="icon"||D(Y.attributes.rel)==="apple-touch-icon"||D(Y.attributes.rel)==="shortcut icon"))||Y.tagName==="meta"&&(Me.headMetaDescKeywords&&D(Y.attributes.name).match(/^description|keywords$/)||Me.headMetaSocial&&(D(Y.attributes.property).match(/^(og|twitter|fb):/)||D(Y.attributes.name).match(/^(og|twitter):/)||D(Y.attributes.name)==="pinterest")||Me.headMetaRobots&&(D(Y.attributes.name)==="robots"||D(Y.attributes.name)==="googlebot"||D(Y.attributes.name)==="bingbot")||Me.headMetaHttpEquiv&&Y.attributes["http-equiv"]!==void 0||Me.headMetaAuthorship&&(D(Y.attributes.name)==="author"||D(Y.attributes.name)==="generator"||D(Y.attributes.name)==="framework"||D(Y.attributes.name)==="publisher"||D(Y.attributes.name)==="progid"||D(Y.attributes.property).match(/^article:/)||D(Y.attributes.property).match(/^product:/))||Me.headMetaVerification&&(D(Y.attributes.name)==="google-site-verification"||D(Y.attributes.name)==="yandex-verification"||D(Y.attributes.name)==="csrf-token"||D(Y.attributes.name)==="p:domain_verify"||D(Y.attributes.name)==="verify-v1"||D(Y.attributes.name)==="verification"||D(Y.attributes.name)==="shopify-checkout-api-token"))))})(Ie,B)&&(ce||Ie.type!==g.Text||Ie.isStyle||Ie.textContent.replace(/^\s+|\s+$/gm,"").length)?ct():Ge;var U=Object.assign(Ie,{id:ve});if(c.add(i,U),ve===Ge)return null;P&&P(i);var Ce=!S;if(U.type===g.Element){Ce=Ce&&!U.needBlock,delete U.needBlock;var me=q.shadowRoot(i);me&&Ae(me)&&(U.isShadowHost=!0)}if((U.type===g.Document||U.type===g.Element)&&Ce){B.headWhitespace&&U.type===g.Element&&U.tagName==="head"&&(ce=!1);var ye={doc:u,mirror:c,blockClass:h,blockSelector:f,needsMask:ie,maskTextClass:m,maskTextSelector:y,skipChild:S,inlineStylesheet:C,maskInputOptions:k,maskTextFn:O,maskInputFn:G,slimDOMOptions:B,dataURLOptions:ae,inlineImages:fe,re
1cordCanvas:oe,preserveWhiteSpace:ce,onSerialize:P,onIframeLoad:F,iframeLoadTimeout:N,onStylesheetLoad:W,stylesheetLoadTimeout:z,keepIframeSrcFn:K};if(!(U.type===g.Element&&U.tagName==="textarea"&&U.attributes.value!==void 0))for(var ge of Array.from(q.childNodes(i))){var ue=ke(ge,ye);ue&&U.childNodes.push(ue)}var te=null;if(de(i)&&(te=q.shadowRoot(i)))for(var Le of Array.from(q.childNodes(te))){var De=ke(Le,ye);De&&(Ae(te)&&(De.isShadow=!0),U.childNodes.push(De))}}var Oe=q.parentNode(i);return Oe&&pe(Oe)&&Ae(Oe)&&(U.isShadow=!0),U.type===g.Element&&U.tagName==="iframe"&&(function(Y,Me,Ot){var ht=Y.contentWindow;if(ht){var Je,pt=!1;try{Je=ht.document.readyState}catch{return}if(Je==="complete"){var Vt="about:blank";if(ht.location.href!==Vt||Y.src===Vt||Y.src==="")return setTimeout(Me,0),Y.addEventListener("load",Me);Y.addEventListener("load",Me)}else{var Zt=setTimeout((()=>{pt||(Me(),pt=!0)}),Ot);Y.addEventListener("load",(()=>{clearTimeout(Zt),pt=!0,Me()}))}}})(i,(()=>{var Y=i.contentDocument;if(Y&&F){var Me=ke(Y,{doc:Y,mirror:c,blockClass:h,blockSelector:f,needsMask:ie,maskTextClass:m,maskTextSelector:y,skipChild:!1,inlineStylesheet:C,maskInputOptions:k,maskTextFn:O,maskInputFn:G,slimDOMOptions:B,dataURLOptions:ae,inlineImages:fe,recordCanvas:oe,preserveWhiteSpace:ce,onSerialize:P,onIframeLoad:F,iframeLoadTimeout:N,onStylesheetLoad:W,stylesheetLoadTimeout:z,keepIframeSrcFn:K});Me&&F(i,Me)}}),N),U.type===g.Element&&U.tagName==="link"&&typeof U.attributes.rel=="string"&&(U.attributes.rel==="stylesheet"||U.attributes.rel==="preload"&&typeof U.attributes.href=="string"&&mt(U.attributes.href)==="css")&&(function(Y,Me,Ot){var ht,Je=!1;try{ht=Y.sheet}catch{return}if(!ht){var pt=setTimeout((()=>{Je||(Me(),Je=!0)}),Ot);Y.addEventListener("load",(()=>{clearTimeout(pt),Je=!0,Me()}))}})(i,(()=>{if(W){var Y=ke(i,{doc:u,mirror:c,blockClass:h,blockSelector:f,needsMask:ie,maskTextClass:m,maskTextSelector:y,skipChild:!1,inlineStylesheet:C,maskInputOptions:k,maskTextFn:O,maskInputFn:G,slimDOMOptions:B,dataURLOptions:ae,inlineImages:fe,recordCanvas:oe,preserveWhiteSpace:ce,onSerialize:P,onIframeLoad:F,iframeLoadTimeout:N,onStylesheetLoad:W,stylesheetLoadTimeout:z,keepIframeSrcFn:K});Y&&W(i,Y)}}),z),U}let je=class jl{constructor(){__publicField2(this,"parentElement",null),__publicField2(this,"parentNode",null),__publicField2(this,"ownerDocument"),__publicField2(this,"firstChild",null),__publicField2(this,"lastChild",null),__publicField2(this,"previousSibling",null),__publicField2(this,"nextSibling",null),__publicField2(this,"ELEMENT_NODE",1),__publicField2(this,"TEXT_NODE",3),__publicField2(this,"nodeType"),__publicField2(this,"nodeName"),__publicField2(this,"RRNodeType")}get childNodes(){for(var a=[],u=this.firstChild;u;)a.push(u),u=u.nextSibling;return a}contains(a){if(!(a instanceof jl)||a.ownerDocument!==this.ownerDocument)return!1;if(a===this)return!0;for(;a.parentNode;){if(a.parentNode===this)return!0;a=a.parentNode}return!1}appendChild(a){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(a,u){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(a){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}};var Xe={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},A={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},j={};function se(i){if(j[i])return j[i];var a=(function(k){var O,G=globalThis==null||(O=globalThis.Zone)==null||O.__symbol__==null?void 0:O.__symbol__(k);return G&&globalThis[G]?globalThis[G]:void 0})(i)||globalThis[i],u=a.prototype,c=i in Xe?Xe[i]:void 0,h=!!(c&&c.every((k=>{var O,G;return!!((G=(O=Object.getOwnPropertyDescriptor(u,k))==null?void 0:O.get)!=null&&G.toString().includes("[native code]"))}))),f=i in A?A[i]:void 0,m=!!(f&&f.every((k=>{var O;return typeof u[k]=="function"&&((O=u[k])==null?void 0:O.toString().includes("[native code]"))})));if(h&&m)return j[i]=a.prototype,a.prototype;try{var y=document.createElement("iframe");document.body.appendChild(y);var S=y.contentWindow;if(!S)return a.prototype;var C=S[i].prototype;return document.body.removeChild(y),C?j[i]=C:u}catch{return u}}var ne={};function $(i,a,u){var c,h=i+"."+String(u);if(ne[h])return ne[h].call(a);var f=se(i),m=(c=Object.getOwnPropertyDescriptor(f,u))==null?void 0:c.get;return m?(ne[h]=m,m.call(a)):a[u]}var _e={};function he(i,a,u){var c=i+"."+String(u);if(_e[c])return _e[c].bind(a);var h=se(i)[u];return typeof h!="function"?a[u]:(_e[c]=h,h.bind(a))}function Se(){return se("MutationObserver").constructor}var ee={childNodes:function(i){return $("Node",i,"childNodes")},parentNode:function(i){return $("Node",i,"parentNode")},parentElement:function(i){return $("Node",i,"parentElement")},textContent:function(i){return $("Node",i,"textContent")},contains:function(i,a){return he("Node",i,"contains")(a)},getRootNode:function(i){return he("Node",i,"getRootNode")()},host:function(i){return i&&"host"in i?$("ShadowRoot",i,"host"):null},styleSheets:function(i){return i.styleSheets},shadowRoot:function(i){return i&&"shadowRoot"in i?$("Element",i,"shadowRoot"):null},querySelector:function(i,a){return $("Element",i,"querySelector")(a)},querySelectorAll:function(i,a){return $("Element",i,"querySelectorAll")(a)},mutationObserver:Se};function Te(i,a,u){u===void 0&&(u=document);var c={capture:!0,passive:!0};return u.addEventListener(i,a,c),()=>u.removeEventListener(i,a,c)}var Ue=`Please stop import mirror directly. Instead of that,\r
2now you can use replayer.getMirror() to access the mirror instance of a replayer,\r 3or you can use record.mirror to access the mirror instance during recording.`,ot={map:{},getId:()=>(console.error(Ue),-1),getNode:()=>(console.error(Ue),null),removeNodeFromMap(){console.error(Ue)},has:()=>(console.error(Ue),!1),reset(){console.error(Ue)}};function Dt(i,a,u){u===void 0&&(u={});var c=null,h=0;return function(){for(var f=arguments.length,m=new Array(f),y=0;y<f;y++)m[y]=arguments[y];var S=Date.now();h||u.leading!==!1||(h=S);var C=a-(S-h),k=this;C<=0||C>a?(c&&(clearTimeout(c),c=null),h=S,i.apply(k,m)):c||u.trailing===!1||(c=setTimeout((()=>{h=u.leading===!1?0:Date.now(),c=null,i.apply(k,m)}),C))}}function ar(i,a,u,c,h){h===void 0&&(h=window);var f=h.Object.getOwnPropertyDescriptor(i,a);return h.Object.defineProperty(i,a,c?u:{set(m){setTimeout((()=>{u.set.call(this,m)}),0),f&&f.set&&f.set.call(this,m)}}),()=>ar(i,a,f||{},!0)}function er(i,a,u){try{if(!(a in i))return()=>{};var c=i[a],h=u(c);return typeof h=="function"&&(h.prototype=h.prototype||{},Object.defineProperties(h,{__rrweb_original__:{enumerable:!1,value:c}})),i[a]=h,()=>{i[a]=c}}catch{return()=>{}}}typeof window<"u"&&window.Proxy&&window.Reflect&&(ot=new Proxy(ot,{get:(i,a,u)=>(a==="map"&&console.error(Ue),Reflect.get(i,a,u))}));var qr=Date.now;function pr(i){var a,u,c,h,f=i.document;return{left:f.scrollingElement?f.scrollingElement.scrollLeft:i.pageXOffset!==void 0?i.pageXOffset:f.documentElement.scrollLeft||(f==null?void 0:f.body)&&((a=ee.parentElement(f.body))==null?void 0:a.scrollLeft)||((u=f==null?void 0:f.body)==null?void 0:u.scrollLeft)||0,top:f.scrollingElement?f.scrollingElement.scrollTop:i.pageYOffset!==void 0?i.pageYOffset:(f==null?void 0:f.documentElement.scrollTop)||(f==null?void 0:f.body)&&((c=ee.parentElement(f.body))==null?void 0:c.scrollTop)||((h=f==null?void 0:f.body)==null?void 0:h.scrollTop)||0}}function Gn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ia(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Ca(i){return i?i.nodeType===i.ELEMENT_NODE?i:ee.parentElement(i):null}function At(i,a,u,c){if(!i)return!1;var h=Ca(i);if(!h)return!1;try{if(typeof a=="string"){if(h.classList.contains(a)||c&&h.closest("."+a)!==null)return!0}else if(E(h,a,c))return!0}catch{}return!!(u&&(h.matches(u)||c&&h.closest(u)!==null))}function ji(i,a,u){return!(i.tagName!=="TITLE"||!u.headTitleMutations)||a.getId(i)===Ge}function ka(i,a){if(pe(i))return!1;var u=a.getId(i);if(!a.has(u))return!0;var c=ee.parentNode(i);return(!c||c.nodeType!==i.DOCUMENT_NODE)&&(!c||ka(c,a))}function Gi(i){return!!i.changedTouches}function Ea(i,a){return!!(i.nodeName==="IFRAME"&&a.getMeta(i))}function xa(i,a){return!!(i.nodeName==="LINK"&&i.nodeType===i.ELEMENT_NODE&&i.getAttribute&&i.getAttribute("rel")==="stylesheet"&&a.getMeta(i))}function Wi(i){return!!i&&(i instanceof je&&"shadowRoot"in i?!!i.shadowRoot:!!ee.shadowRoot(i))}/[1-9][0-9]{12}/.test(Date.now().toString())||(qr=()=>new Date().getTime());let tc=class{constructor(){l(this,"id",1),l(this,"styleIDMap",new WeakMap),l(this,"idStyleMap",new Map)}getId(i){var a;return(a=this.styleIDMap.get(i))!==null&&a!==void 0?a:-1}has(i){return this.styleIDMap.has(i)}add(i,a){return this.has(i)?this.getId(i):(u=a===void 0?this.id++:a,this.styleIDMap.set(i,u),this.idStyleMap.set(u,i),u);var u}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 Ta(i){var a,u=null;return"getRootNode"in i&&((a=ee.getRootNode(i))==null?void 0:a.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&ee.host(ee.getRootNode(i))&&(u=ee.host(ee.getRootNode(i))),u}function rc(i){var a=i.ownerDocument;if(!a)return!1;var u=(function(c){for(var h,f=c;h=Ta(f);)f=h;return f})(i);return ee.contains(a,u)}function Ma(i){var a=i.ownerDocument;return!!a&&(ee.contains(a,i)||rc(i))}var $e=(i=>
3(i[i.DomContentLoaded=0]="DomContentLoaded",i[i.Load=1]="Load",i[i.FullSnapshot=2]="FullSnapshot",i[i.IncrementalSnapshot=3]="IncrementalSnapshot",i[i.Meta=4]="Meta",i[i.Custom=5]="Custom",i[i.Plugin=6]="Plugin",i))($e||{}),Fe=(i=>(i[i.Mutation=0]="Mutation",i[i.MouseMove=1]="MouseMove",i[i.MouseInteraction=2]="MouseInteraction",i[i.Scroll=3]="Scroll",i[i.ViewportResize=4]="ViewportResize",i[i.Input=5]="Input",i[i.TouchMove=6]="TouchMove",i[i.MediaInteraction=7]="MediaInteraction",i[i.StyleSheetRule=8]="StyleSheetRule",i[i.CanvasMutation=9]="CanvasMutation",i[i.Font=10]="Font",i[i.Log=11]="Log",i[i.Drag=12]="Drag",i[i.StyleDeclaration=13]="StyleDeclaration",i[i.Selection=14]="Selection",i[i.AdoptedStyleSheet=15]="AdoptedStyleSheet",i[i.CustomElement=16]="CustomElement",i))(Fe||{}),Pt=(i=>(i[i.MouseUp=0]="MouseUp",i[i.MouseDown=1]="MouseDown",i[i.Click=2]="Click",i[i.ContextMenu=3]="ContextMenu",i[i.DblClick=4]="DblClick",i[i.Focus=5]="Focus",i[i.Blur=6]="Blur",i[i.TouchStart=7]="TouchStart",i[i.TouchMove_Departed=8]="TouchMove_Departed",i[i.TouchEnd=9]="TouchEnd",i[i.TouchCancel=10]="TouchCancel",i))(Pt||{}),fr=(i=>(i[i.Mouse=0]="Mouse",i[i.Pen=1]="Pen",i[i.Touch=2]="Touch",i))(fr||{}),Zr=(i=>(i[i["2D"]=0]="2D",i[i.WebGL=1]="WebGL",i[i.WebGL2=2]="WebGL2",i))(Zr||{}),Xr=(i=>(i[i.Play=0]="Play",i[i.Pause=1]="Pause",i[i.Seeked=2]="Seeked",i[i.VolumeChange=3]="VolumeChange",i[i.RateChange=4]="RateChange",i))(Xr||{});function Ra(i){return"__ln"in i}class nc{constructor(){l(this,"length",0),l(this,"head",null),l(this,"tail",null)}get(a){if(a>=this.length)throw new Error("Position outside of list range");for(var u=this.head,c=0;c<a;c++)u=(u==null?void 0:u.next)||null;return u}addNode(a){var u={value:a,previous:null,next:null};if(a.__ln=u,a.previousSibling&&Ra(a.previousSibling)){var c=a.previousSibling.__ln.next;u.next=c,u.previous=a.previousSibling.__ln,a.previousSibling.__ln.next=u,c&&(c.previous=u)}else if(a.nextSibling&&Ra(a.nextSibling)&&a.nextSibling.__ln.previous){var h=a.nextSibling.__ln.previous;u.previous=h,u.next=a.nextSibling.__ln,a.nextSibling.__ln.previous=u,h&&(h.next=u)}else this.head&&(this.head.previous=u),u.next=this.head,this.head=u;u.next===null&&(this.tail=u),this.length++}removeNode(a){var u=a.__ln;this.head&&(u.previous?(u.previous.next=u.next,u.next?u.next.previous=u.previous:this.tail=u.previous):(this.head=u.next,this.head?this.head.previous=null:this.tail=null),a.__ln&&delete a.__ln,this.length--)}}var vn,Aa=(i,a)=>i+"@"+a;class ic{constructor(){l(this,"frozen",!1),l(this,"locked",!1),l(this,"texts",[]),l(this,"attributes",[]),l(this,"attributeMap",new WeakMap),l(this,"removes",[]),l(this,"mapRemoves",[]),l(this,"movedMap",{}),l(this,"addedSet",new Set),l(this,"movedSet",new Set),l(this,"droppedSet",new Set),l(this,"mutationCb"),l(this,"blockClass"),l(this,"blockSelector"),l(this,"maskTextClass"),l(this,"maskTextSelector"),l(this,"inlineStylesheet"),l(this,"maskInputOptions"),l(this,"maskTextFn"),l(this,"maskInputFn"),l(this,"keepIframeSrcFn"),l(this,"recordCanvas"),l(this,"inlineImages"),l(this,"slimDOMOptions"),l(this,"dataURLOptions"),l(this,"doc"),l(this,"mirror"),l(this,"iframeManager"),l(this,"stylesheetManager"),l(this,"shadowDomManager"),l(this,"canvasManager"),l(this,"processedNodeManager"),l(this,"unattachedDoc"),l(this,"processMutations",(a=>{a.forEach(this.processMutation),this.emit()})),l(this,"emit",(()=>{if(!this.frozen&&!this.locked){for(var a=[],u=new Set,c=new nc,h=N=>{for(var W=N,z=Ge;z===Ge;)z=(W=W&&W.nextSibling)&&this.mirror.getId(W);return z},f=N=>{var W=ee.parentNode(N);if(W&&Ma(N)&&W.tagName!=="TEXTAREA"){var z=pe(W)?this.mirror.getId(Ta(N)):this.mirror.getId(W),K=h(N);if(z===-1||K===-1)return c.addNode(N);var J=ke(N,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inl
3ineImages,onSerialize:ie=>{Ea(ie,this.mirror)&&this.iframeManager.addIframe(ie),xa(ie,this.mirror)&&this.stylesheetManager.trackLinkElement(ie),Wi(N)&&this.shadowDomManager.addShadowRoot(ee.shadowRoot(N),this.doc)},onIframeLoad:(ie,ce)=>{this.iframeManager.attachIframe(ie,ce),this.shadowDomManager.observeAttachShadow(ie)},onStylesheetLoad:(ie,ce)=>{this.stylesheetManager.attachLinkElement(ie,ce)}});J&&(a.push({parentId:z,nextId:K,node:J}),u.add(J.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var m of this.movedSet)Oa(this.removes,m,this.mirror)&&!this.movedSet.has(ee.parentNode(m))||f(m);for(var y of this.addedSet)Na(this.droppedSet,y)||Oa(this.removes,y,this.mirror)?Na(this.movedSet,y)?f(y):this.droppedSet.add(y):f(y);for(var S=null;c.length;){var C=null;if(S){var k=this.mirror.getId(ee.parentNode(S.value)),O=h(S.value);k!==-1&&O!==-1&&(C=S)}if(!C)for(var G=c.tail;G;){var B=G;if(G=G.previous,B){var ae=this.mirror.getId(ee.parentNode(B.value));if(h(B.value)===-1)continue;if(ae!==-1){C=B;break}var fe=B.value,oe=ee.parentNode(fe);if(oe&&oe.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var P=ee.host(oe);if(this.mirror.getId(P)!==-1){C=B;break}}}}if(!C){for(;c.head;)c.removeNode(c.head.value);break}S=C.previous,c.removeNode(C.value),f(C.value)}var F={texts:this.texts.map((N=>{var W=N.node,z=ee.parentNode(W);return z&&z.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(z),{id:this.mirror.getId(W),value:N.value}})).filter((N=>!u.has(N.id))).filter((N=>this.mirror.has(N.id))),attributes:this.attributes.map((N=>{var{attributes:W}=N;if(typeof W.style=="string"){var z=JSON.stringify(N.styleDiff),K=JSON.stringify(N._unchangedStyles);z.length<W.style.length&&(z+K).split("var(").length===W.style.split("var(").length&&(W.style=N.styleDiff)}return{id:this.mirror.getId(N.node),attributes:W}})).filter((N=>!u.has(N.id))).filter((N=>this.mirror.has(N.id))),removes:this.removes,adds:a};(F.texts.length||F.attributes.length||F.removes.length||F.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(F))}})),l(this,"genTextAreaValueMutation",(a=>{var u=this.attributeMap.get(a);u||(u={node:a,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(u),this.attributeMap.set(a,u)),u.attributes.value=Array.from(ee.childNodes(a),(c=>ee.textContent(c)||"")).join("")})),l(this,"processMutation",(a=>{if(!ji(a.target,this.mirror,this.slimDOMOptions))switch(a.type){case"characterData":var u=ee.textContent(a.target);At(a.target,this.blockClass,this.blockSelector,!1)||u===a.oldValue||this.texts.push({value:T(a.target,this.maskTextClass,this.maskTextSelector,!0)&&u?this.maskTextFn?this.maskTextFn(u,Ca(a.target)):u.replace(/[\S]/g,"*"):u,node:a.target});break;case"attributes":var c=a.target,h=a.attributeName,f=a.target.getAttribute(h);if(h==="value"){var m=wt(c);f=tt({element:c,maskInputOptions:this.maskInputOptions,tagName:c.tagName,type:m,value:f,maskInputFn:this.maskInputFn})}if(At(a.target,this.blockClass,this.blockSelector,!1)||f===a.oldValue)return;var y=this.attributeMap.get(a.target);if(c.tagName==="IFRAME"&&h==="src"&&!this.keepIframeSrcFn(f)){if(c.contentDocument)return;h="rr_src"}if(y||(y={node:a.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(y),this.attributeMap.set(a.target,y)),h==="type"&&c.tagName==="INPUT"&&(a.oldValue||"").toLowerCase()==="password"&&c.setAttribute("data-rr-is-password","true"),!_(c.tagName,h))if(y.attributes[h]=le(this.doc,Ve(c.tagName),Ve(h),f),h==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}var S=this.unattachedDoc.createElement("span");for(var C of(a.oldValue&&S.setAttribute("style",a.oldValue),Array.from(c.style))){var k=c.style.getPropertyValue(C),O=c.style.getPropertyPriority(C);k!==S.style.getPropertyValue(C)||O!==S.style.getPropertyPriority(C)?y.styleDiff[C]=O===""?k:[k,O]:y._unchangedStyles[C]=[
3k,O]}for(var G of Array.from(S.style))c.style.getPropertyValue(G)===""&&(y.styleDiff[G]=!1)}else h==="open"&&c.tagName==="DIALOG"&&(c.matches("dialog:modal")?y.attributes.rr_open_mode="modal":y.attributes.rr_open_mode="non-modal");break;case"childList":if(At(a.target,this.blockClass,this.blockSelector,!0))return;if(a.target.tagName==="TEXTAREA")return void this.genTextAreaValueMutation(a.target);a.addedNodes.forEach((B=>this.genAdds(B,a.target))),a.removedNodes.forEach((B=>{var ae=this.mirror.getId(B),fe=pe(a.target)?this.mirror.getId(ee.host(a.target)):this.mirror.getId(a.target);At(a.target,this.blockClass,this.blockSelector,!1)||ji(B,this.mirror,this.slimDOMOptions)||!(function(oe,P){return P.getId(oe)!==-1})(B,this.mirror)||(this.addedSet.has(B)?(Yi(this.addedSet,B),this.droppedSet.add(B)):this.addedSet.has(a.target)&&ae===-1||ka(a.target,this.mirror)||(this.movedSet.has(B)&&this.movedMap[Aa(ae,fe)]?Yi(this.movedSet,B):this.removes.push({parentId:fe,id:ae,isShadow:!(!pe(a.target)||!Ae(a.target))||void 0})),this.mapRemoves.push(B))}))}})),l(this,"genAdds",((a,u)=>{if(!this.processedNodeManager.inOtherBuffer(a,this)&&!this.addedSet.has(a)&&!this.movedSet.has(a)){if(this.mirror.hasNode(a)){if(ji(a,this.mirror,this.slimDOMOptions))return;this.movedSet.add(a);var c=null;u&&this.mirror.hasNode(u)&&(c=this.mirror.getId(u)),c&&c!==-1&&(this.movedMap[Aa(this.mirror.getId(a),c)]=!0)}else this.addedSet.add(a),this.droppedSet.delete(a);At(a,this.blockClass,this.blockSelector,!1)||(ee.childNodes(a).forEach((h=>this.genAdds(h))),Wi(a)&&ee.childNodes(ee.shadowRoot(a)).forEach((h=>{this.processedNodeManager.add(h,this),this.genAdds(h,a)})))}}))}init(a){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((u=>{this[u]=a[u]}))}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 Yi(i,a){i.delete(a),ee.childNodes(a).forEach((u=>Yi(i,u)))}function Oa(i,a,u){return i.length!==0&&(function(c,h,f){for(var m,y=ee.parentNode(h),S=function(){var C=f.getId(y);if(c.some((k=>k.id===C)))return{v:!0};y=ee.parentNode(y)};y;)if(m=S())return m.v;return!1})(i,a,u)}function Na(i,a){return i.size!==0&&Fa(i,a)}function Fa(i,a){var u=ee.parentNode(a);return!!u&&(!!i.has(u)||Fa(i,u))}var Pe=i=>vn?function(){try{return i(...arguments)}catch(a){if(vn&&vn(a)===!0)return;throw a}}:i,Pr=[];function mn(i){try{if("composedPath"in i){var a=i.composedPath();if(a.length)return a[0]}else if("path"in i&&i.path.length)return i.path[0]}catch{}return i&&i.target}function La(i,a){var u=new ic;Pr.push(u),u.init(i);var c=new(Se())(Pe(u.processMutations.bind(u)));return c.observe(a,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),c}function sc(i){var{mouseInteractionCb:a,doc:u,mirror:c,blockClass:h,blockSelector:f,sampling:m}=i;if(m.mouseInteraction===!1)return()=>{};var y=m.mouseInteraction===!0||m.mouseInteraction===void 0?{}:m.mouseInteraction,S=[],C=null;return Object.keys(Pt).filter((k=>Number.isNaN(Number(k))&&!k.endsWith("_Departed")&&y[k]!==!1)).forEach((k=>{var O=Ve(k),G=(B=>ae=>{var fe=mn(ae);if(!At(fe,h,f,!0)){var oe=null,P=B;if("pointerType"in ae){switch(ae.pointerType){case"mouse":oe=fr.Mouse;break;case"touch":oe=fr.Touch;break;case"pen":oe=fr.Pen}oe===fr.Touch?Pt[B]===Pt.MouseDown?P="TouchStart":Pt[B]===Pt.MouseUp&&(P="TouchEnd"):fr.Pen}else Gi(ae)&&(oe=fr.Touch);oe!==null?(C=oe,(P.startsWith("Touch")&&oe===fr.Touch||P.startsWith("Mouse")&&oe===fr.Mouse)&&(oe=null)):Pt[B]===Pt.Click&&(oe=C,C=null);var F=Gi(ae)?ae.changedTouches[0]:ae;if(F){var N=c.getId(fe),{clientX:W,clientY:z}=F;Pe(a)(t({type:Pt[P],id:N,x:W,y:z},oe!==null&&{pointerType:oe}))}}})(k);if(window.PointerEvent)switch(Pt[k]){case Pt.MouseDown:case Pt.MouseUp:O=O.replace("mouse","pointer");break;case Pt.TouchStart:case Pt.TouchEnd:return}S.push(Te(O,G,u))})),Pe((()=>
3{S.forEach((k=>k()))}))}function Da(i){var{scrollCb:a,doc:u,mirror:c,blockClass:h,blockSelector:f,sampling:m}=i;return Te("scroll",Pe(Dt(Pe((y=>{var S=mn(y);if(S&&!At(S,h,f,!0)){var C=c.getId(S);if(S===u&&u.defaultView){var k=pr(u.defaultView);a({id:C,x:k.left,y:k.top})}else a({id:C,x:S.scrollLeft,y:S.scrollTop})}})),m.scroll||100)),u)}var ac=["INPUT","TEXTAREA","SELECT"],Pa=new WeakMap;function Wn(i){return(function(a,u){if(Yn("CSSGroupingRule")&&a.parentRule instanceof CSSGroupingRule||Yn("CSSMediaRule")&&a.parentRule instanceof CSSMediaRule||Yn("CSSSupportsRule")&&a.parentRule instanceof CSSSupportsRule||Yn("CSSConditionRule")&&a.parentRule instanceof CSSConditionRule){var c=Array.from(a.parentRule.cssRules).indexOf(a);u.unshift(c)}else if(a.parentStyleSheet){var h=Array.from(a.parentStyleSheet.cssRules).indexOf(a);u.unshift(h)}return u})(i,[])}function kr(i,a,u){var c,h;return i?(i.ownerNode?c=a.getId(i.ownerNode):h=u.getId(i),{styleId:h,id:c}):{}}function Ba(i,a){var u,c,h,{mirror:f,stylesheetManager:m}=i,y=null;y=a.nodeName==="#document"?f.getId(a):f.getId(ee.host(a));var S=a.nodeName==="#document"?(u=a.defaultView)==null?void 0:u.Document:(h=(c=a.ownerDocument)==null?void 0:c.defaultView)==null?void 0:h.ShadowRoot,C=S!=null&&S.prototype?Object.getOwnPropertyDescriptor(S==null?void 0:S.prototype,"adoptedStyleSheets"):void 0;return y!==null&&y!==-1&&S&&C?(Object.defineProperty(a,"adoptedStyleSheets",{configurable:C.configurable,enumerable:C.enumerable,get(){var k;return(k=C.get)==null?void 0:k.call(this)},set(k){var O,G=(O=C.set)==null?void 0:O.call(this,k);if(y!==null&&y!==-1)try{m.adoptStyleSheets(k,y)}catch{}return G}}),Pe((()=>{Object.defineProperty(a,"adoptedStyleSheets",{configurable:C.configurable,enumerable:C.enumerable,get:C.get,set:C.set})}))):()=>{}}function oc(i,a){a===void 0&&(a={});var u,c=i.doc.defaultView;if(!c)return()=>{};(function(F,N){var{mutationCb:W,mousemoveCb:z,mouseInteractionCb:K,scrollCb:J,viewportResizeCb:ie,inputCb:ce,mediaInteractionCb:ve,styleSheetRuleCb:Ie,styleDeclarationCb:U,canvasMutationCb:Ce,fontCb:me,selectionCb:ye,customElementCb:ge}=F;F.mutationCb=function(){N.mutation&&N.mutation(...arguments),W(...arguments)},F.mousemoveCb=function(){N.mousemove&&N.mousemove(...arguments),z(...arguments)},F.mouseInteractionCb=function(){N.mouseInteraction&&N.mouseInteraction(...arguments),K(...arguments)},F.scrollCb=function(){N.scroll&&N.scroll(...arguments),J(...arguments)},F.viewportResizeCb=function(){N.viewportResize&&N.viewportResize(...arguments),ie(...arguments)},F.inputCb=function(){N.input&&N.input(...arguments),ce(...arguments)},F.mediaInteractionCb=function(){N.mediaInteaction&&N.mediaInteaction(...arguments),ve(...arguments)},F.styleSheetRuleCb=function(){N.styleSheetRule&&N.styleSheetRule(...arguments),Ie(...arguments)},F.styleDeclarationCb=function(){N.styleDeclaration&&N.styleDeclaration(...arguments),U(...arguments)},F.canvasMutationCb=function(){N.canvasMutation&&N.canvasMutation(...arguments),Ce(...arguments)},F.fontCb=function(){N.font&&N.font(...arguments),me(...arguments)},F.selectionCb=function(){N.selection&&N.selection(...arguments),ye(...arguments)},F.customElementCb=function(){N.customElement&&N.customElement(...arguments),ge(...arguments)}})(i,a),i.recordDOM&&(u=La(i,i.doc));var h=(function(F){var{mousemoveCb:N,sampling:W,doc:z,mirror:K}=F;if(W.mousemove===!1)return()=>{};var J,ie=typeof W.mousemove=="number"?W.mousemove:50,ce=typeof W.mousemoveCallback=="number"?W.mousemoveCallback:500,ve=[],Ie=Dt(Pe((me=>{var ye=Date.now()-J;N(ve.map((ge=>(ge.timeOffset-=ye,ge))),me),ve=[],J=null})),ce),U=Pe(Dt(Pe((me=>{var ye=mn(me),{clientX:ge,clientY:ue}=Gi(me)?me.changedTouches[0]:me;J||(J=qr()),ve.push({x:ge,y:ue,id:K.getId(ye),timeOffset:qr()-J}),Ie(typeof DragEvent<"u"&&me instanceof DragEvent?Fe.Drag:me instanceof MouseEvent?Fe.MouseMove:Fe.TouchMove)})),ie,{trailing:!1})),Ce=[Te("mousemove",U,z),Te("touchmove",U,z),Te("drag",U,z)];return Pe((()=>{Ce.forEach((me=>me()))}))})(i),f=sc(i),m=Da(i),y=(function(F,N){var{viewportResizeCb:W}=F,{win:z}=N,K=-1,J=-1;return Te("resize",Pe(Dt(Pe((()=>{var ie=Gn(),ce=Ia();K===ie&&J===ce||(W({width:Number(ce),height:Number(ie)}),K=ie,J=ce)})),200)),z)})(i,{win:c}),S=(function(F){var{inputCb:N,doc:W,mirror:z,blockClass:K,blockSelector:J,ignoreClass:ie,ignoreSelector:ce,maskInputOptions:ve,maskInputFn:Ie,sampling:U,userTriggeredOnInput:Ce}=F;function me(De){var Oe=mn(De),Y=De.isTrusted,Me=Oe&&Oe.tagName;if(Oe&&Me==="OPTION"&&(Oe=ee.parentElement(Oe)),Oe&&Me&&!(ac.indexOf(Me)<0)&&!At(Oe,K,J,!0)&&!(Oe.classList.contains(ie)||ce&&Oe.matches(ce))){var Ot=Oe.value,ht=!1,Je=wt(Oe)||"";Je==="radio"||Je==="checkbox"?ht=Oe.checked:(ve[Me.toLowerCase()]||ve[Je])&&(Ot=tt({element:Oe,maskInputOptions:ve,tagName:Me,type:Je,value:Ot,maskInputFn:Ie})),ye(Oe,Ce?{text:Ot,isChecked:ht,userTriggered:Y}:{text:Ot,isChecked:ht});var pt=Oe.name;Je==="radio"&&pt&&ht&&W.querySelectorAll('input[type="radio"][name="'+pt+'"]').forEach((Vt=>{if(Vt!==Oe){var Zt=Vt.value;ye(Vt,Ce?{text:Zt,isChecked:!ht,userTriggered:!1}:{text:Zt,isChecked:!ht})}}))}}function ye(De,Oe){var Y=Pa.get(De);
3if(!Y||Y.text!==Oe.text||Y.isChecked!==Oe.isChecked){Pa.set(De,Oe);var Me=z.getId(De);Pe(N)(t({},Oe,{id:Me}))}}var ge=(U.input==="last"?["change"]:["input","change"]).map((De=>Te(De,Pe(me),W))),ue=W.defaultView;if(!ue)return()=>{ge.forEach((De=>De()))};var te=ue.Object.getOwnPropertyDescriptor(ue.HTMLInputElement.prototype,"value"),Le=[[ue.HTMLInputElement.prototype,"value"],[ue.HTMLInputElement.prototype,"checked"],[ue.HTMLSelectElement.prototype,"value"],[ue.HTMLTextAreaElement.prototype,"value"],[ue.HTMLSelectElement.prototype,"selectedIndex"],[ue.HTMLOptionElement.prototype,"selected"]];return te&&te.set&&ge.push(...Le.map((De=>ar(De[0],De[1],{set(){Pe(me)({target:this,isTrusted:!1})}},!1,ue)))),Pe((()=>{ge.forEach((De=>De()))}))})(i),C=(function(F){var{mediaInteractionCb:N,blockClass:W,blockSelector:z,mirror:K,sampling:J,doc:ie}=F,ce=Pe((Ie=>Dt(Pe((U=>{var Ce=mn(U);if(Ce&&!At(Ce,W,z,!0)){var{currentTime:me,volume:ye,muted:ge,playbackRate:ue,loop:te}=Ce;N({type:Ie,id:K.getId(Ce),currentTime:me,volume:ye,muted:ge,playbackRate:ue,loop:te})}})),J.media||500))),ve=[Te("play",ce(Xr.Play),ie),Te("pause",ce(Xr.Pause),ie),Te("seeked",ce(Xr.Seeked),ie),Te("volumechange",ce(Xr.VolumeChange),ie),Te("ratechange",ce(Xr.RateChange),ie)];return Pe((()=>{ve.forEach((Ie=>Ie()))}))})(i),k=()=>{},O=()=>{},G=()=>{},B=()=>{};i.recordDOM&&(k=(function(F,N){var{styleSheetRuleCb:W,mirror:z,stylesheetManager:K}=F,{win:J}=N;if(!J.CSSStyleSheet||!J.CSSStyleSheet.prototype)return()=>{};var ie=J.CSSStyleSheet.prototype.insertRule;J.CSSStyleSheet.prototype.insertRule=new Proxy(ie,{apply:Pe(((me,ye,ge)=>{var[ue,te]=ge,{id:Le,styleId:De}=kr(ye,z,K.styleMirror);return(Le&&Le!==-1||De&&De!==-1)&&W({id:Le,styleId:De,adds:[{rule:ue,index:te}]}),me.apply(ye,ge)}))}),J.CSSStyleSheet.prototype.addRule=function(me,ye,ge){ge===void 0&&(ge=this.cssRules.length);var ue=me+" { "+ye+" }";return J.CSSStyleSheet.prototype.insertRule.apply(this,[ue,ge])};var ce,ve,Ie=J.CSSStyleSheet.prototype.deleteRule;J.CSSStyleSheet.prototype.deleteRule=new Proxy(Ie,{apply:Pe(((me,ye,ge)=>{var[ue]=ge,{id:te,styleId:Le}=kr(ye,z,K.styleMirror);return(te&&te!==-1||Le&&Le!==-1)&&W({id:te,styleId:Le,removes:[{index:ue}]}),me.apply(ye,ge)}))}),J.CSSStyleSheet.prototype.removeRule=function(me){return J.CSSStyleSheet.prototype.deleteRule.apply(this,[me])},J.CSSStyleSheet.prototype.replace&&(ce=J.CSSStyleSheet.prototype.replace,J.CSSStyleSheet.prototype.replace=new Proxy(ce,{apply:Pe(((me,ye,ge)=>{var[ue]=ge,{id:te,styleId:Le}=kr(ye,z,K.styleMirror);return(te&&te!==-1||Le&&Le!==-1)&&W({id:te,styleId:Le,replace:ue}),me.apply(ye,ge)}))})),J.CSSStyleSheet.prototype.replaceSync&&(ve=J.CSSStyleSheet.prototype.replaceSync,J.CSSStyleSheet.prototype.replaceSync=new Proxy(ve,{apply:Pe(((me,ye,ge)=>{var[ue]=ge,{id:te,styleId:Le}=kr(ye,z,K.styleMirror);return(te&&te!==-1||Le&&Le!==-1)&&W({id:te,styleId:Le,replaceSync:ue}),me.apply(ye,ge)}))}));var U={};Vn("CSSGroupingRule")?U.CSSGroupingRule=J.CSSGroupingRule:(Vn("CSSMediaRule")&&(U.CSSMediaRule=J.CSSMediaRule),Vn("CSSConditionRule")&&(U.CSSConditionRule=J.CSSConditionRule),Vn("CSSSupportsRule")&&(U.CSSSupportsRule=J.CSSSupportsRule));var Ce={};
3return Object.entries(U).forEach((me=>{var[ye,ge]=me;Ce[ye]={insertRule:ge.prototype.insertRule,deleteRule:ge.prototype.deleteRule},ge.prototype.insertRule=new Proxy(Ce[ye].insertRule,{apply:Pe(((ue,te,Le)=>{var[De,Oe]=Le,{id:Y,styleId:Me}=kr(te.parentStyleSheet,z,K.styleMirror);return(Y&&Y!==-1||Me&&Me!==-1)&&W({id:Y,styleId:Me,adds:[{rule:De,index:[...Wn(te),Oe||0]}]}),ue.apply(te,Le)}))}),ge.prototype.deleteRule=new Proxy(Ce[ye].deleteRule,{apply:Pe(((ue,te,Le)=>{var[De]=Le,{id:Oe,styleId:Y}=kr(te.parentStyleSheet,z,K.styleMirror);return(Oe&&Oe!==-1||Y&&Y!==-1)&&W({id:Oe,styleId:Y,removes:[{index:[...Wn(te),De]}]}),ue.apply(te,Le)}))})})),Pe((()=>{J.CSSStyleSheet.prototype.insertRule=ie,J.CSSStyleSheet.prototype.deleteRule=Ie,ce&&(J.CSSStyleSheet.prototype.replace=ce),ve&&(J.CSSStyleSheet.prototype.replaceSync=ve),Object.entries(U).forEach((me=>{var[ye,ge]=me;ge.prototype.insertRule=Ce[ye].insertRule,ge.prototype.deleteRule=Ce[ye].deleteRule}))}))})(i,{win:c}),O=Ba(i,i.doc),G=(function(F,N){var{styleDeclarationCb:W,mirror:z,ignoreCSSAttributes:K,stylesheetManager:J}=F,{win:ie}=N,ce=ie.CSSStyleDeclaration.prototype.setProperty;ie.CSSStyleDeclaration.prototype.setProperty=new Proxy(ce,{apply:Pe(((Ie,U,Ce)=>{var me,[ye,ge,ue]=Ce;if(K.has(ye))return ce.apply(U,[ye,ge,ue]);var{id:te,styleId:Le}=kr((me=U.parentRule)==null?void 0:me.parentStyleSheet,z,J.styleMirror);return(te&&te!==-1||Le&&Le!==-1)&&W({id:te,styleId:Le,set:{property:ye,value:ge,priority:ue},index:Wn(U.parentRule)}),Ie.apply(U,Ce)}))});var ve=ie.CSSStyleDeclaration.prototype.removeProperty;return ie.CSSStyleDeclaration.prototype.removeProperty=new Proxy(ve,{apply:Pe(((Ie,U,Ce)=>{var me,[ye]=Ce;if(K.has(ye))return ve.apply(U,[ye]);var{id:ge,styleId:ue}=kr((me=U.parentRule)==null?void 0:me.parentStyleSheet,z,J.styleMirror);return(ge&&ge!==-1||ue&&ue!==-1)&&W({id:ge,styleId:ue,remove:{property:ye},index:Wn(U.parentRule)}),Ie.apply(U,Ce)}))}),Pe((()=>{ie.CSSStyleDeclaration.prototype.setProperty=ce,ie.CSSStyleDeclaration.prototype.removeProperty=ve}))})(i,{win:c}),i.collectFonts&&(B=(function(F){var{fontCb:N,doc:W}=F,z=W.defaultView;if(!z)return()=>{};var K=[],J=new WeakMap,ie=z.FontFace;z.FontFace=function(ve,Ie,U){var Ce=new ie(ve,Ie,U);return J.set(Ce,{family:ve,buffer:typeof Ie!="string",descriptors:U,fontSource:typeof Ie=="string"?Ie:JSON.stringify(Array.from(new Uint8Array(Ie)))}),Ce};var ce=er(W.fonts,"add",(function(ve){return function(Ie){return setTimeout(Pe((()=>{var U=J.get(Ie);U&&(N(U),J.delete(Ie))})),0),ve.apply(this,[Ie])}}));return K.push((()=>{z.FontFace=ie})),K.push(ce),Pe((()=>{K.forEach((ve=>ve()))}))})(i)));var ae=(function(F){var{doc:N,mirror:W,blockClass:z,blockSelector:K,selectionCb:J}=F,ie=!0,ce=Pe((()=>{var ve=N.getSelection();if(!(!ve||ie&&(ve!=null&&ve.isCollapsed))){ie=ve.isCollapsed||!1;for(var Ie=[],U=ve.rangeCount||0,Ce=0;Ce<U;Ce++){var me=ve.getRangeAt(Ce),{startContainer:ye,startOffset:ge,endContainer:ue,endOffset:te}=me;At(ye,z,K,!0)||At(ue,z,K,!0)||Ie.push({start:W.getId(ye),startOffset:ge,end:W.getId(ue),endOffset:te})}J({ranges:Ie})}}));return ce(),Te("selectionchange",ce)})(i),fe=(function(F){var{doc:N,customElementCb:W}=F,z=N.defaultView;return z&&z.customElements?er(z.customElements,"define",(function(K){return function(J,ie,ce){try{W({define:{name:J}})}catch{console.warn("Custom element callback failed for "+J)}return K.apply(this,[J,ie,ce])}})):()=>{}})(i),oe=[];for(var P of i.plugins)oe.push(P.observer(P.callback,c,P.options));return Pe((()=>{Pr.forEach((F=>F.reset())),u==null||u.disconnect(),h(),f(),m(),y(),S(),C(),k(),O(),G(),B(),ae(),fe(),oe.forEach((F=>F()))}))}function Yn(i){return window[i]!==void 0}function Vn(i){return!!(window[i]!==void 0&&window[i].prototype&&"insertRule"in window[i].prototype&&"deleteRule"in window[i].prototype)}class $a{constructor(a){l(this,"iframeIdToRemoteIdMap",new WeakMap),l(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=a}getId(a,u,c,h){var f=c||this.getIdToRemoteIdMap(a),m=h||this.getRemoteIdToIdMap(a),y=f.get(u);return y||(y=this.generateIdFn(),f.set(u,y),m.set(y,u)),y}getIds(a,u){var c=this.getIdToRemoteIdMap(a),h=this.getRemoteIdToIdMap(a);return u.map((f=>this.getId(a,f,c,h)))}getRemoteId(a,u,c){var h=c||this.getRemoteIdToIdMap(a);if(typeof u!="number")return u;var f=h.get(u);return f||-1}getRemoteIds(a,u){var c=this.getRemoteIdToIdMap(a);return u.map((h=>this.getRemoteId(a,h,c)))}reset(a){if(!a)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(a),this.iframeRemoteIdToIdMap.delete(a)}getIdToRemoteIdMap(a){var u=this.iframeIdToRemoteIdMap.get(a);return u||(u=new Map,this.iframeIdToRemoteIdMap.set(a,u)),u}getRemoteIdToIdMap(a){var u=this.iframeRemoteIdToIdMap.get(a);return u||(u=new Map,this.iframeRemoteIdToIdMap.set(a,u)),u}}class lc{constructor(a){l(this,"iframes",new WeakMap),l(this,"crossOriginIframeMap",new WeakMap),l(this,"crossOriginIframeMirror",new $a(ct)),l(this,"crossOriginIframeStyleMirror"),l(this,"crossOriginIframeRootIdMap",new WeakMap),l(this,"mirror"),l(this,"mutationCb"),l(this,"wrappedEmit"),l(this,"loadListener"),l(this,"stylesheetManager"),l(this,"recordCrossOriginIframes"),this.mutationCb=a.mutationCb,this.wrappedEmit=a.wrappedEmit,this.stylesheetManager=a.stylesheetManager,this.recordCrossOriginIframes=a.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=ne
3w $a(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=a.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(a){this.iframes.set(a,!0),a.contentWindow&&this.crossOriginIframeMap.set(a.contentWindow,a)}addLoadListener(a){this.loadListener=a}attachIframe(a,u){var c,h;this.mutationCb({adds:[{parentId:this.mirror.getId(a),nextId:null,node:u}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((c=a.contentWindow)==null||c.addEventListener("message",this.handleMessage.bind(this))),(h=this.loadListener)==null||h.call(this,a),a.contentDocument&&a.contentDocument.adoptedStyleSheets&&a.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(a.contentDocument.adoptedStyleSheets,this.mirror.getId(a.contentDocument))}handleMessage(a){var u=a;if(u.data.type==="rrweb"&&u.origin===u.data.origin&&a.source){var c=this.crossOriginIframeMap.get(a.source);if(c){var h=this.transformCrossOriginEvent(c,u.data.event);h&&this.wrappedEmit(h,u.data.isCheckout)}}}transformCrossOriginEvent(a,u){var c;switch(u.type){case $e.FullSnapshot:this.crossOriginIframeMirror.reset(a),this.crossOriginIframeStyleMirror.reset(a),this.replaceIdOnNode(u.data.node,a);var h=u.data.node.id;return this.crossOriginIframeRootIdMap.set(a,h),this.patchRootIdOnNode(u.data.node,h),{timestamp:u.timestamp,type:$e.IncrementalSnapshot,data:{source:Fe.Mutation,adds:[{parentId:this.mirror.getId(a),nextId:null,node:u.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case $e.Meta:case $e.Load:case $e.DomContentLoaded:return!1;case $e.Plugin:return u;case $e.Custom:return this.replaceIds(u.data.payload,a,["id","parentId","previousId","nextId"]),u;case $e.IncrementalSnapshot:switch(u.data.source){case Fe.Mutation:return u.data.adds.forEach((f=>{this.replaceIds(f,a,["parentId","nextId","previousId"]),this.replaceIdOnNode(f.node,a);var m=this.crossOriginIframeRootIdMap.get(a);m&&this.patchRootIdOnNode(f.node,m)})),u.data.removes.forEach((f=>{this.replaceIds(f,a,["parentId","id"])})),u.data.attributes.forEach((f=>{this.replaceIds(f,a,["id"])})),u.data.texts.forEach((f=>{this.replaceIds(f,a,["id"])})),u;case Fe.Drag:case Fe.TouchMove:case Fe.MouseMove:return u.data.positions.forEach((f=>{this.replaceIds(f,a,["id"])})),u;case Fe.ViewportResize:return!1;case Fe.MediaInteraction:case Fe.MouseInteraction:case Fe.Scroll:case Fe.CanvasMutation:case Fe.Input:return this.replaceIds(u.data,a,["id"]),u;case Fe.StyleSheetRule:case Fe.StyleDeclaration:return this.replaceIds(u.data,a,["id"]),this.replaceStyleIds(u.data,a,["styleId"]),u;case Fe.Font:return u;case Fe.Selection:return u.data.ranges.forEach((f=>{this.replaceIds(f,a,["start","end"])})),u;case Fe.AdoptedStyleSheet:return this.replaceIds(u.data,a,["id"]),this.replaceStyleIds(u.data,a,["styleIds"]),(c=u.data.styles)==null||c.forEach((f=>{this.replaceStyleIds(f,a,["styleId"])})),u}}return!1}replace(a,u,c,h){for(var f of h)(Array.isArray(u[f])||typeof u[f]=="number")&&(Array.isArray(u[f])?u[f]=a.getIds(c,u[f]):u[f]=a.getId(c,u[f]));return u}replaceIds(a,u,c){return this.replace(this.crossOriginIframeMirror,a,u,c)}replaceStyleIds(a,u,c){return this.replace(this.crossOriginIframeStyleMirror,a,u,c)}replaceIdOnNode(a,u){this.replaceIds(a,u,["id","rootId"]),"childNodes"in a&&a.childNodes.forEach((c=>{this.replaceIdOnNode(c,u)}))}patchRootIdOnNode(a,u){a.type===g.Document||a.rootId||(a.rootId=u),"childNodes"in a&&a.childNodes.forEach((c=>{this.patchRootIdOnNode(c,u)}))}}class uc{constructor(a){l(this,"shadowDoms",new WeakSet),l(this,"mutationCb"),l(this,"scrollCb"),l(this,"bypassOptions"),l(this,"mirror"),l(this,"restoreHandlers",[]),this.mutationCb=a.mutationCb,this.scrollCb=a.scrollCb,this.bypassOptions=a.bypassOptions,this.mirror=a.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(a,u){if(Ae(a)&&!this.shadowDoms.has(a)){this.shadowDoms.add(a);var c=La(t({},this.bypassOptions,{doc:u,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),a);this.restoreHandlers.push((()=>c.disconnect())),this.restoreHandlers.push(Da(t({},this.bypassOptions,{scrollCb:this.scrollCb,doc:a,mirror:this.mirror}))),setTimeout((()=>{a.adoptedStyleSheets&&a.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(a.adoptedStyleSheets,this.mirror.getId(ee.host(a))),this.restoreHandlers.push(Ba({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},a))}),0)}}observeAttachShadow(a){a.contentWindow&&a.contentDocument&&this.patchAttachShadow(a.contentWindow.Element,a.contentDocument)}patchAttachShadow(a,u){var c=this;this.restoreHandlers.push(er(a.prototype,"attachShadow",(function(h){return function(f){var m=h.call(this,f),y=ee.shadowRoot(this);return y&&Ma(this)&&c.addShadowRoot(y,u),m}})))}
3reset(){this.restoreHandlers.forEach((a=>{try{a()}catch{}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var _n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",cc=typeof Uint8Array>"u"?[]:new Uint8Array(256),Un=0;Un<64;Un++)cc[_n.charCodeAt(Un)]=Un;var Ha=new Map,ja=(i,a,u)=>{if(i&&(Wa(i,a)||typeof i=="object")){var c=(function(f,m){var y=Ha.get(f);return y||(y=new Map,Ha.set(f,y)),y.has(m)||y.set(m,[]),y.get(m)})(u,i.constructor.name),h=c.indexOf(i);return h===-1&&(h=c.length,c.push(i)),h}};function zn(i,a,u){if(i instanceof Array)return i.map((f=>zn(f,a,u)));if(i===null)return i;if(i instanceof Float32Array||i instanceof Float64Array||i instanceof Int32Array||i instanceof Uint32Array||i instanceof Uint8Array||i instanceof Uint16Array||i instanceof Int16Array||i instanceof Int8Array||i instanceof Uint8ClampedArray)return{rr_type:i.constructor.name,args:[Object.values(i)]};if(i instanceof ArrayBuffer)return{rr_type:i.constructor.name,base64:(function(f){var m,y=new Uint8Array(f),S=y.length,C="";for(m=0;m<S;m+=3)C+=_n[y[m]>>2],C+=_n[(3&y[m])<<4|y[m+1]>>4],C+=_n[(15&y[m+1])<<2|y[m+2]>>6],C+=_n[63&y[m+2]];return S%3==2?C=C.substring(0,C.length-1)+"=":S%3==1&&(C=C.substring(0,C.length-2)+"=="),C})(i)};if(i instanceof DataView)return{rr_type:i.constructor.name,args:[zn(i.buffer,a,u),i.byteOffset,i.byteLength]};if(i instanceof HTMLImageElement){var c=i.constructor.name,{src:h}=i;return{rr_type:c,src:h}}return i instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:i.toDataURL()}:i instanceof ImageData?{rr_type:i.constructor.name,args:[zn(i.data,a,u),i.width,i.height]}:Wa(i,a)||typeof i=="object"?{rr_type:i.constructor.name,index:ja(i,a,u)}:i}var Ga=(i,a,u)=>i.map((c=>zn(c,a,u))),Wa=(i,a)=>{var u=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((c=>typeof a[c]=="function"));return!!u.find((c=>i instanceof a[c]))};function Ya(i,a,u,c){var h=[];try{var f=er(i.HTMLCanvasElement.prototype,"getContext",(function(m){return function(y){for(var S=arguments.length,C=new Array(S>1?S-1:0),k=1;k<S;k++)C[k-1]=arguments[k];if(!At(this,a,u,!0)){var O=(function(B){return B==="experimental-webgl"?"webgl":B})(y);if("__context"in this||(this.__context=O),c&&["webgl","webgl2"].includes(O))if(C[0]&&typeof C[0]=="object"){var G=C[0];G.preserveDrawingBuffer||(G.preserveDrawingBuffer=!0)}else C.splice(0,1,{preserveDrawingBuffer:!0})}return m.apply(this,[y,...C])}}));h.push(f)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{h.forEach((m=>m()))}}function Va(i,a,u,c,h,f){var m=[],y=Object.getOwnPropertyNames(i),S=function(k){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(k))return 0;try{if(typeof i[k]!="function")return 0;var O=er(i,k,(function(B){return function(){for(var ae=arguments.length,fe=new Array(ae),oe=0;oe<ae;oe++)fe[oe]=arguments[oe];var P=B.apply(this,fe);if(ja(P,f,this),"tagName"in this.canvas&&!At(this.canvas,c,h,!0)){var F=Ga(fe,f,this),N={type:a,property:k,args:F};u(this.canvas,N)}return P}}));m.push(O)}catch{var G=ar(i,k,{set(ae){u(this.canvas,{type:a,property:k,args:[ae],setter:!0})}});m.push(G)}};for(var C of y)S(C);return m}var Ua,it,qn,Vi,za="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSA
3yKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",qa=typeof window<"u"&&window.Blob&&new Blob([(Ua=za,Uint8Array.from(atob(Ua),(i=>i.charCodeAt(0))))],{type:"text/javascript;charset=utf-8"});function dc(i){var a;try{if(!(a=qa&&(window.URL||window.webkitURL).createObjectURL(qa)))throw"";var u=new Worker(a,{name:i==null?void 0:i.name});return u.addEventListener("error",(()=>{(window.URL||window.webkitURL).revokeObjectURL(a)})),u}catch{return new Worker("data:text/javascript;base64,"+za,{name:i==null?void 0:i.name})}finally{a&&(window.URL||window.webkitURL).revokeObjectURL(a)}}class hc{constructor(a){l(this,"pendingCanvasMutations",new Map),l(this,"rafStamps",{latestId:0,invokeId:null}),l(this,"mirror"),l(this,"mutationCb"),l(this,"resetObservers"),l(this,"frozen",!1),l(this,"locked",!1),l(this,"processMutation",((S,C)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(S)||this.pendingCanvasMutations.set(S,[]),this.pendingCanvasMutations.get(S).push(C)}));var{sampling:u="all",win:c,blockClass:h,blockSelector:f,recordCanvas:m,dataURLOptions:y}=a;this.mutationCb=a.mutationCb,this.mirror=a.mirror,m&&u==="all"&&this.initCanvasMutationObserver(c,h,f),m&&typeof u=="number"&&this.initCanvasFPSObserver(u,c,h,f,{dataURLOptions:y})}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(a,u,c,h,f){var m=this,y=Ya(u,c,h,!0),S=new Map,C=new dc;C.onmessage=ae=>{var{id:fe}=ae.data;if(S.set(fe,!1),"base64"in ae.data){var{base64:oe,type:P,width:F,height:N}=ae.data;this.mutationCb({id:fe,type:Zr["2D"],commands:[{property:"clearRect",args:[0,0,F,N]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:oe}],type:P}]},0,0]}]})}};var k,O=1e3/a,G=0,B=ae=>{var fe,oe;G&&ae-G<O||(G=ae,(fe=[],oe=P=>{P.querySelectorAll("canvas").forEach((F=>{At(F,c,h,!0)||fe.push(F)})),P.querySelectorAll("*").forEach((F=>{F.shadowRoot&&oe(F.shadowRoot)}))},oe(u.document),fe).forEach((function(){var P=e((function*(F){var N,W=m.mirror.getId(F);if(!S.get(W)&&F.width!==0&&F.height!==0){if(S.set(W,!0),["webgl","webgl2"].includes(F.__context)){var z=F.getContext(F.__context);((N=z==null?void 0:z.getContextAttributes())==null?void 0:N.preserveDrawingBuffer)===!1&&z.clear(z.COLOR_BUFFER_BIT)}var K=F.clientWidth||F.width,J=F.clientHeight||F.height,ie=yield createImageBitmap(F,{resizeWidth:K,resizeHeight:J});C.postMessage({id:W,bitmap:ie,width:K,height:J,dataURLOptions:f.dataURLOptions},[ie])}}));return function(F){return P.apply(this,arguments)}})())),k=requestAnimationFrame(B)};k=requestAnimationFrame(B),this.resetObservers=()=>{y(),cancelAnimationFrame(k)}}initCanvasMutationObserver(a,u,c){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var h=Ya(a,u,c,!1),f=(function(y,S,C,k){var O=[],G=Object.getOwnPropertyNames(S.CanvasRenderingContext2D.prototype),B=function(fe){try{if(typeof S.CanvasRenderingContext2D.prototype[fe]!="function")return 1;var oe=er(S.CanvasRenderingContext2D.prototype,fe,(function(F){return function(){for(var N=arguments.length,W=new Array(N),z=0;z<N;z++)W[z]=arguments[z];return At(this.canvas,C,k,!0)||setTimeout((()=>{var K=Ga(W,S,this);y(this.canvas,{type:Zr["2D"],property:fe,args:K})}),0),F.apply(this,W)}}));
3O.push(oe)}catch{var P=ar(S.CanvasRenderingContext2D.prototype,fe,{set(N){y(this.canvas,{type:Zr["2D"],property:fe,args:[N],setter:!0})}});O.push(P)}};for(var ae of G)B(ae);return()=>{O.forEach((fe=>fe()))}})(this.processMutation.bind(this),a,u,c),m=(function(y,S,C,k){var O=[];return O.push(...Va(S.WebGLRenderingContext.prototype,Zr.WebGL,y,C,k,S)),S.WebGL2RenderingContext!==void 0&&O.push(...Va(S.WebGL2RenderingContext.prototype,Zr.WebGL2,y,C,k,S)),()=>{O.forEach((G=>G()))}})(this.processMutation.bind(this),a,u,c);this.resetObservers=()=>{h(),f(),m()}}startPendingCanvasMutationFlusher(){requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){var a=u=>{this.rafStamps.latestId=u,requestAnimationFrame(a)};requestAnimationFrame(a)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((a,u)=>{var c=this.mirror.getId(u);this.flushPendingCanvasMutationFor(u,c)})),requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(a,u){if(!this.frozen&&!this.locked){var c=this.pendingCanvasMutations.get(a);if(c&&u!==-1){var h=c.map((m=>{var y=(function(S,C){if(S==null)return{};var k={};for(var O in S)if({}.hasOwnProperty.call(S,O)){if(C.indexOf(O)!==-1)continue;k[O]=S[O]}return k})(m,s);return y})),{type:f}=c[0];this.mutationCb({id:u,type:f,commands:h}),this.pendingCanvasMutations.delete(a)}}}}class pc{constructor(a){l(this,"trackedLinkElements",new WeakSet),l(this,"mutationCb"),l(this,"adoptedStyleSheetCb"),l(this,"styleMirror",new tc),this.mutationCb=a.mutationCb,this.adoptedStyleSheetCb=a.adoptedStyleSheetCb}attachLinkElement(a,u){"_cssText"in u.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:u.id,attributes:u.attributes}]}),this.trackLinkElement(a)}trackLinkElement(a){this.trackedLinkElements.has(a)||(this.trackedLinkElements.add(a),this.trackStylesheetInLinkElement(a))}adoptStyleSheets(a,u){var c=this;if(a.length!==0){var h={id:u,styleIds:[]},f=[],m=function(S){var C;c.styleMirror.has(S)?C=c.styleMirror.getId(S):(C=c.styleMirror.add(S),f.push({styleId:C,rules:Array.from(S.rules||CSSRule,((k,O)=>({rule:Ze(k,S.href),index:O})))})),h.styleIds.push(C)};for(var y of a)m(y);f.length>0&&(h.styles=f),this.adoptedStyleSheetCb(h)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(a){}}class fc{constructor(){l(this,"nodeMap",new WeakMap),l(this,"active",!1)}inOtherBuffer(a,u){var c=this.nodeMap.get(a);return c&&Array.from(c).some((h=>h!==u))}add(a,u){this.active||(this.active=!0,requestAnimationFrame((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(a,(this.nodeMap.get(a)||new Set).add(u))}destroy(){}}var Zn=!1;try{if(Array.from([1],(i=>2*i))[0]!==2){var Ui=document.createElement("iframe");document.body.appendChild(Ui),Array.from=((r=Ui.contentWindow)==null?void 0:r.Array.from)||Array.from,document.body.removeChild(Ui)}}catch(i){console.debug("Unable to override Array.from",i)}var Za,Kr,tr=new vt;function Jr(i){i===void 0&&(i={});var{emit:a,checkoutEveryNms:u,checkoutEveryNth:c,blockClass:h="rr-block",blockSelector:f=null,ignoreClass:m="rr-ignore",ignoreSelector:y=null,maskTextClass:S="rr-mask",maskTextSelector:C=null,inlineStylesheet:k=!0,maskAllInputs:O,maskInputOptions:G,slimDOMOptions:B,maskInputFn:ae,maskTextFn:fe,hooks:oe,packFn:P,sampling:F={},dataURLOptions:N={},mousemoveWait:W,recordDOM:z=!0,recordCanvas:K=!1,recordCrossOriginIframes:J=!1,recordAfter:ie=i.recordAfter==="DOMContentLoaded"?i.recordAfter:"load",userTriggeredOnInput:ce=!1,collectFonts:ve=!1,inlineImages:Ie=!1,plugins:U,keepIframeSrcFn:Ce=(()=>!1),ignoreCSSAttributes:me=new Set([]),errorHandler:ye}=i;vn=ye;var ge=!J||window.parent===window,ue=!1;if(!ge)try{window.parent.document&&(ue=!1)}catch{ue=!0}if(ge&&!a)throw new Error("emit function is required");if(!ge&&!ue)return()=>{};W!==void 0&&F.mousemove===void 0&&(F.mousemove=W),tr.reset();var te,Le=O===!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}:G!==void 0?G:{password:!0},De=B===!0||B==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:B==="all",headMetaDescKeywords:B==="all",headTitleMutations:B==="all"}:B||{};(function(xe){xe===void 0&&(xe=window),"NodeList"in xe&&!xe.NodeList.prototype.forEach&&(xe.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in xe&&!xe.DOMTokenList.prototype.forEach&&(xe.DOMTokenList.prototype.forEach=Array.prototype.forEach)})();var Oe=0,Y=xe=>{for(var Nt of U||[])Nt.eventProcessor&&(xe=Nt.eventProcessor(xe));return P&&!ue&&(xe=P(xe)),xe};it=(xe,Nt)=>{var we,Re=xe;if(Re.timestamp=qr(),!((we=Pr[0])!=null&&we.isFrozen())||Re.type===$e.FullSnapshot||Re.type===$e.IncrementalSnapshot&&Re.data.source===Fe.Mutation||Pr.forEach((mr=>mr.unfreeze())),ge)a==null||a(Y(Re),Nt);else if(ue){var $t={type:"rrweb",event:Y(Re),origin:window.location.origin,isCheckout:Nt};window.parent.postMessage($t,"*")}if(Re.type===$e.FullSnapshot)te=Re,Oe=0;else if(Re.type===$e.IncrementalSnapshot){if(Re.data.source===Fe.Mutation&&Re.data.isAttachIframe)return;Oe++;var rr=c&&Oe>=c,nr=u&&Re.timestamp-te.timestamp>u;(rr||nr)&&qn(!0)}};var Me=xe=>{it({type:$e.IncrementalSnapshot,data:t({source:Fe.Mutation},xe)})},Ot=xe=>it({type:$e.IncrementalSnapshot,data:t({source:Fe.Scroll},xe)}),ht=xe=>it({type:$e.IncrementalSnapshot,data:t({source:Fe.CanvasMutation},xe)}),Je=new pc({mutationCb:Me,adoptedStyleSheetCb:xe=>it({type:$e.IncrementalSnapshot,data:t({source:Fe.AdoptedStyleSheet},xe)})}),pt=new lc({mirror:tr,mutationCb:Me,stylesheetManager:Je,recordCrossOriginIframes:J,wrappedEmit:it});for(var Vt of U||[])Vt.getMirror&&Vt.getMirror({nodeMirror:tr,crossOriginIframeMirror:pt.crossOriginIframeMirror,crossOriginIframeStyleMirror:pt.crossOriginIframeStyleMirror});var Zt=new fc;Vi=new hc({recordCanvas:K,mutationCb:ht,win:window,blockClass:h,blockSelector:f,mirror:tr,sampling:F.canvas,dataURLOptions:N});var Qe=new uc({mutationCb:Me,scrollCb:Ot,bypassOptions:{blockClass:h,blockSelector:f,maskTextClass:S,maskTextSelector:C,inlineStylesheet:k,maskInputOptions:Le,dataURLOptions:N,maskTextFn:fe,maskInputFn:ae,recordCanvas:K,inlineImages:Ie,sampling:F,slimDOMOptions:De,iframeManager:pt,stylesheetManager:Je,canvasManager:Vi,keepIframeSrcFn:Ce,processedNodeManager:Zt},mirror:tr});qn=function(xe){if(xe===void 0&&(xe=!1),z){it({type:$e.Meta,data:{href:window.location.href,width:Ia(),height:Gn()}},xe),Je.reset(),Qe.init(),Pr.forEach((we=>we.lock()));var Nt=(function(we,Re){var{mirror:$t=new vt,blockClass:rr="rr-block",blockSelector:nr=null,maskTextClass:mr="rr-mask",maskTextSelector:si=null,inlineStylesheet:fs=!0,inl
3ineImages:Hc=!1,recordCanvas:jc=!1,maskAllInputs:gs=!1,maskTextFn:Gc,maskInputFn:Wc,slimDOM:bn=!1,dataURLOptions:Yc,preserveWhiteSpace:Vc,onSerialize:Uc,onIframeLoad:zc,iframeLoadTimeout:qc,onStylesheetLoad:Zc,stylesheetLoadTimeout:Xc,keepIframeSrcFn:Kc=(()=>!1)}=Re||{};return ke(we,{doc:we,mirror:$t,blockClass:rr,blockSelector:nr,maskTextClass:mr,maskTextSelector:si,skipChild:!1,inlineStylesheet:fs,maskInputOptions:gs===!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}:gs===!1?{password:!0}:gs,maskTextFn:Gc,maskInputFn:Wc,slimDOMOptions:bn===!0||bn==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:bn==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:bn===!1?{}:bn,dataURLOptions:Yc,inlineImages:Hc,recordCanvas:jc,preserveWhiteSpace:Vc,onSerialize:Uc,onIframeLoad:zc,iframeLoadTimeout:qc,onStylesheetLoad:Zc,stylesheetLoadTimeout:Xc,keepIframeSrcFn:Kc,newlyAddedElement:!1})})(document,{mirror:tr,blockClass:h,blockSelector:f,maskTextClass:S,maskTextSelector:C,inlineStylesheet:k,maskAllInputs:Le,maskTextFn:fe,maskInputFn:ae,slimDOM:De,dataURLOptions:N,recordCanvas:K,inlineImages:Ie,onSerialize:we=>{Ea(we,tr)&&pt.addIframe(we),xa(we,tr)&&Je.trackLinkElement(we),Wi(we)&&Qe.addShadowRoot(ee.shadowRoot(we),document)},onIframeLoad:(we,Re)=>{pt.attachIframe(we,Re),Qe.observeAttachShadow(we)},onStylesheetLoad:(we,Re)=>{Je.attachLinkElement(we,Re)},keepIframeSrcFn:Ce});if(!Nt)return console.warn("Failed to snapshot the document");it({type:$e.FullSnapshot,data:{node:Nt,initialOffset:pr(window)}},xe),Pr.forEach((we=>we.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Je.adoptStyleSheets(document.adoptedStyleSheets,tr.getId(document))}};try{var Br=[],yn=xe=>{var Nt;return Pe(oc)({mutationCb:Me,mousemoveCb:(we,Re)=>it({type:$e.IncrementalSnapshot,data:{source:Re,positions:we}}),mouseInteractionCb:we=>it({type:$e.IncrementalSnapshot,data:t({source:Fe.MouseInteraction},we)}),scrollCb:Ot,viewportResizeCb:we=>it({type:$e.IncrementalSnapshot,data:t({source:Fe.ViewportResize},we)}),inputCb:we=>it({type:$e.IncrementalSnapshot,data:t({source:Fe.Input},we)}),mediaInteractionCb:we=>it({type:$e.IncrementalSnapshot,data:t({source:Fe.MediaInteraction},we)}),styleSheetRuleCb:we=>it({type:$e.IncrementalSnapshot,data:t({source:Fe.StyleSheetRule},we)}),styleDeclarationCb:we=>it({type:$e.IncrementalSnapshot,data:t({source:Fe.StyleDeclaration},we)}),canvasMutationCb:ht,fontCb:we=>it({type:$e.IncrementalSnapshot,data:t({source:Fe.Font},we)}),selectionCb:we=>{it({type:$e.IncrementalSnapshot,data:t({source:Fe.Selection},we)})},customElementCb:we=>{it({type:$e.IncrementalSnapshot,data:t({source:Fe.CustomElement},we)})},blockClass:h,ignoreClass:m,ignoreSelector:y,maskTextClass:S,maskTextSelector:C,maskInputOptions:Le,inlineStylesheet:k,sampling:F,recordDOM:z,recordCanvas:K,inlineImages:Ie,userTriggeredOnInput:ce,collectFonts:ve,doc:xe,maskInputFn:ae,maskTextFn:fe,keepIframeSrcFn:Ce,blockSelector:f,slimDOMOptions:De,dataURLOptions:N,mirror:tr,iframeManager:pt,stylesheetManager:Je,shadowDomManager:Qe,processedNodeManager:Zt,canvasManager:Vi,ignoreCSSAttributes:me,plugins:((Nt=U==null?void 0:U.filter((we=>we.observer)))==null?void 0:Nt.map((we=>({observer:we.observer,options:we.options,callback:Re=>it({type:$e.Plugin,data:{plugin:we.name,payload:Re}})}))))||[]},oe)};pt.addLoadListener((xe=>{try{Br.push(yn(xe.contentDocument))}catch(Nt){console.warn(Nt)}}));var vr=()=>{qn(),Br.push(yn(document)),Zn=!0};return document.readyState==="interactive"||document.readyState==="complete"?vr():(Br.push(Te("DOMContentLoaded",(()=>{it({type:$e.DomContentLoaded,data:{}}),ie==="DOMContentLoaded"&&vr()}))),Br.push(Te("load",(()=>{it({type:$e.Load,data:{}}),ie==="load"&&vr()}),window))),()=>{Br.forEach((xe=>xe())),Zt.destroy(),Zn=!1,vn=void 0}}catch(xe){console.warn(xe)}}Jr.addCustomEvent=(i,a)=>{if(!Zn)throw new Error("please add custom event after start recording");it({type:$e.Custom,data:{tag:i,payload:a}})},Jr.freezePage=()=>{Pr.forEach((i=>i.freeze()))},Jr.takeFullSnapshot=i=>
3{if(!Zn)throw new Error("please take full snapshot after start recording");qn(i)},Jr.mirror=tr,(Kr=Za||(Za={}))[Kr.NotStarted=0]="NotStarted",Kr[Kr.Running=1]="Running",Kr[Kr.Stopped=2]="Stopped";var Xa,gc=Object.defineProperty,Xn=(i,a,u)=>((c,h,f)=>h in c?gc(c,h,{enumerable:!0,configurable:!0,writable:!0,value:f}):c[h]=f)(i,typeof a!="symbol"?a+"":a,u),vc=Object.defineProperty,zi=(i,a,u)=>((c,h,f)=>h in c?vc(c,h,{enumerable:!0,configurable:!0,writable:!0,value:f}):c[h]=f)(i,typeof a!="symbol"?a+"":a,u),mc=Object.defineProperty,Ka=(i,a,u)=>((c,h,f)=>h in c?mc(c,h,{enumerable:!0,configurable:!0,writable:!0,value:f}):c[h]=f)(i,typeof a!="symbol"?a+"":a,u),Ja={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Qa={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Kn={};function qi(i){if(Kn[i])return Kn[i];var a=globalThis[i],u=a.prototype,c=i in Ja?Ja[i]:void 0,h=!!(c&&c.every((k=>{var O,G;return!!((G=(O=Object.getOwnPropertyDescriptor(u,k))==null?void 0:O.get)!=null&&G.toString().includes("[native code]"))}))),f=i in Qa?Qa[i]:void 0,m=!!(f&&f.every((k=>{var O;return typeof u[k]=="function"&&((O=u[k])==null?void 0:O.toString().includes("[native code]"))})));if(h&&m)return Kn[i]=a.prototype,a.prototype;try{var y=document.createElement("iframe");document.body.appendChild(y);var S=y.contentWindow;if(!S)return a.prototype;var C=S[i].prototype;return document.body.removeChild(y),C?Kn[i]=C:u}catch{return u}}var Zi={};function Er(i,a,u){var c,h=i+"."+String(u);if(Zi[h])return Zi[h].call(a);var f=qi(i),m=(c=Object.getOwnPropertyDescriptor(f,u))==null?void 0:c.get;return m?(Zi[h]=m,m.call(a)):a[u]}var Xi={};function eo(i,a,u){var c=i+"."+String(u);if(Xi[c])return Xi[c].bind(a);var h=qi(i)[u];return typeof h!="function"?a[u]:(Xi[c]=h,h.bind(a))}var Jn={childNodes:function(i){return Er("Node",i,"childNodes")},parentNode:function(i){return Er("Node",i,"parentNode")},parentElement:function(i){return Er("Node",i,"parentElement")},textContent:function(i){return Er("Node",i,"textContent")},contains:function(i,a){return eo("Node",i,"contains")(a)},getRootNode:function(i){return eo("Node",i,"getRootNode")()},host:function(i){return i&&"host"in i?Er("ShadowRoot",i,"host"):null},styleSheets:function(i){return i.styleSheets},shadowRoot:function(i){return i&&"shadowRoot"in i?Er("Element",i,"shadowRoot"):null},querySelector:function(i,a){return Er("Element",i,"querySelector")(a)},querySelectorAll:function(i,a){return Er("Element",i,"querySelectorAll")(a)},mutationObserver:function(){return qi("MutationObserver").constructor}};class _c{constructor(){Ka(this,"idNodeMap",new Map),Ka(this,"nodeMetaMap",new WeakMap)}getId(a){var u;if(!a)return-1;var c=(u=this.getMeta(a))==null?void 0:u.id;return c??-1}getNode(a){return this.idNodeMap.get(a)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(a){return this.nodeMetaMap.get(a)||null}removeNodeFromMap(a){var u=this.getId(a);this.idNodeMap.delete(u),a.childNodes&&a.childNodes.forEach((c=>this.removeNodeFromMap(c)))}has(a){return this.idNodeMap.has(a)}hasNode(a){return this.nodeMetaMap.has(a)}add(a,u){var c=u.id;this.idNodeMap.set(c,a),this.nodeMetaMap.set(a,u)}replace(a,u){var c=this.getNode(a);if(c){var h=this.nodeMetaMap.get(c);h&&this.nodeMetaMap.set(u,h)}this.idNodeMap.set(a,u)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Ki(i,a,u){if(!i)return!1;if(i.nodeType!==i.ELEMENT_NODE)return!!u&&Ki(Jn.parentNode(i),a,u);for(var c=i.classList.length;c--;){var h=i.classList[c];if(a.test(h))return!0}return!!u&&Ki(Jn.parentNode(i),a,u)}class Ji{constructor(){__publicField22(this,"parentElement",null),__publicField22(this,"parentNode",null),__publicField22(this,"ownerDocument"),__publicField22(this,"firstChild",null),__publicField22(this,"lastChild",null),__publicField22(this,"previousSibling",null),__publicField22(this,"nextSibling",null),__publicField22(this,"ELEMENT_NODE",1),__publicField22(this,"TEXT_NODE",3),__publicField22(this,"nodeType"),__publicField22(this,"nodeName"),__publicField22(this,"RRNodeType")}get childNodes(){for(var a=[],u=this.firstChild;u;)a.push(u),u=u.nextSibling;return a}contains(a){if(!(a instanceof Ji)||a.ownerDocument!==this.ownerDocument)return!1;if(a===this)return!0;for(;a.parentNode;){if(a.parentNode===this)return!0;a=a.parentNode}return!1}appendChild(a){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(a,u){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(a){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}var to={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ro={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Qn={};function Qi(i){if(Qn[i])return Qn[i];var a=globalThis[i],u=a.prototype,c=i in to?to[i]:void 0,h=!!(c&&c.every((k=>{var O,G;return!!((G=(O=Object.getOwnPropertyDescriptor(u,k))==null?void 0:O.get)!=null&&G.toString().includes("[native code]"))}))),f=i in ro?ro[i]:void 0,m=!!(f&&f.every((k=>{var O;return typeof u[k]=="function"&&((O=u[k])==null?void 0:O.toString().includes("[native code]"))})));if(h&&m)return Qn[i]=a.prototype,a.prototype;try{var y=document.createElement("iframe");document.body.appendChild(y);var S=y.contentWindow;if(!S)return a.prototype;var C=S[i].prototype;return document.body.removeChild(y),C?Qn[i]=C:u}catch{return u}}var es={};function xr(i,a,u){var c,h=i+"."+String(u);if(es[h])return es[h].call(a);var f=Qi(i),m=(c=Object.getOwnPropertyDescriptor(f,u))==null?void 0:c.get;return m?(es[h]=m,m.call(a)):a[u]}var ts={};function no(i,a,u){var c=i+"."+String(u);if(ts[c])return ts[c].bind(a);var h=Qi(i)[u];return typeof h!="function"?a[u]:(ts[c]=h,h.bind(a))}var qt={childNodes:function(i){return xr("Node",i,"childNodes")},parentNode:function(i){return xr("Node",i,"parentNode")},parentElement:function(i){return xr("Node",i,"parentElement")},textContent:function(i){return xr("Node",i,"textContent")},contains:function(i,a){return no("Node",i,"contains")(a)},getRootNode:function(i){return no("Node",i,"getRootNode")()},host:function(i){return i&&"host"in i?xr("ShadowRoot",i,"host"):null},styleSheets:function(i){return i.styleSheets},shadowRoot:function(i){return i&&"shadowRoot"in i?xr("Element",i,"shadowRoot"):null},querySelector:function(i,a){return xr("Element",i,"querySelector")(a)},querySelectorAll:function(i,a){return xr("Element",i,"querySelectorAll")(a)},mutationObserver:function(){return Qi("MutationObserver").constructor}},Qr=`Please stop import mirror directly. Instead of that,\r
4now you can use replayer.getMirror() to access the mirror instance of a replayer,\r 5or you can use record.mirror to access the mirror instance during recording.`,rs={map:{},getId:()=>(console.error(Qr),-1),getNode:()=>(console.error(Qr),null),removeNodeFromMap(){console.error(Qr)},has:()=>(console.error(Qr),!1),reset(){console.error(Qr)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(rs=new Proxy(rs,{get:(i,a,u)=>(a==="map"&&console.error(Qr),Reflect.get(i,a,u))}));var io=Date.now;function so(i){return i?i.nodeType===i.ELEMENT_NODE?i:qt.parentElement(i):null}/[1-9][0-9]{12}/.test(Date.now().toString())||(io=()=>new Date().getTime());function ao(i){var a,u=null;return"getRootNode"in i&&((a=qt.getRootNode(i))==null?void 0:a.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&qt.host(qt.getRootNode(i))&&(u=qt.host(qt.getRootNode(i))),u}function oo(i){for(var a,u=i;a=ao(u);)u=a;return u}function lo(i){var a=i.ownerDocument;if(!a)return!1;var u=oo(i);return qt.contains(a,u)}for(var yc=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){zi(this,"id",1),zi(this,"styleIDMap",new WeakMap),zi(this,"idStyleMap",new Map)}getId(i){var a;return(a=this.styleIDMap.get(i))!==null&&a!==void 0?a:-1}has(i){return this.styleIDMap.has(i)}add(i,a){return this.has(i)?this.getId(i):(u=a===void 0?this.id++:a,this.styleIDMap.set(i,u),this.idStyleMap.set(u,i),u);var u}getStyle(i){return this.idStyleMap.get(i)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}},get _mirror(){return rs},closestElementOfNode:so,getBaseDimension:function i(a,u){var c,h,f=(h=(c=a.ownerDocument)==null?void 0:c.defaultView)==null?void 0:h.frameElement;if(!f||f===u)return{x:0,y:0,relativeScale:1,absoluteScale:1};var m=f.getBoundingClientRect(),y=i(f,u),S=m.height/f.clientHeight;return{x:m.x*y.relativeScale+y.x,y:m.y*y.relativeScale+y.y,relativeScale:S,absoluteScale:y.absoluteScale*S}},getNestedRule:function i(a,u){var c=a[u[0]];return u.length===1?c:i(c.cssRules[u[1]].cssRules,u.slice(2))},getPositionsAndIndex:function(i){var a=[...i],u=a.pop();return{positions:a,index:u}},getRootShadowHost:oo,getShadowHost:ao,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(i){var a,u,c,h,f=i.document;return{left:f.scrollingElement?f.scrollingElement.scrollLeft:i.pageXOffset!==void 0?i.pageXOffset:f.documentElement.scrollLeft||(f==null?void 0:f.body)&&((a=qt.parentElement(f.body))==null?void 0:a.scrollLeft)||((u=f==null?void 0:f.body)==null?void 0:u.scrollLeft)||0,top:f.scrollingElement?f.scrollingElement.scrollTop:i.pageYOffset!==void 0?i.pageYOffset:(f==null?void 0:f.documentElement.scrollTop)||(f==null?void 0:f.body)&&((c=qt.parentElement(f.body))==null?void 0:c.scrollTop)||((h=f==null?void 0:f.body)==null?void 0:h.scrollTop)||0}},getWindowWidth:function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},hasShadowRoot:function(i){return!!i&&(i instanceof Ji&&"shadowRoot"in i?!!i.shadowRoot:!!qt.shadowRoot(i))},hookSetter:function i(a,u,c,h,f){f===void 0&&(f=window);var m=f.Object.getOwnPropertyDescriptor(a,u);return f.Object.defineProperty(a,u,h?c:{set(y){setTimeout((()=>{c.set.call(this,y)}),0),m&&m.set&&m.set.call(this,y)}}),()=>i(a,u,m||{},!0)},inDom:function(i){var a=i.ownerDocument;return!!a&&(qt.contains(a,i)||lo(i))},isAncestorRemoved:function i(a,u){if(h=(c=a)&&"host"in c&&"mode"in c&&Jn.host(c)||null,!!(h&&"shadowRoot"in h&&Jn.shadowRoot(h)===c))return!1;var c,h,f=u.getId(a);if(!u.has(f))return!0;var m=qt.parentNode(a);return(!m||m.nodeType!==a.DOCUMENT_NODE)&&(!m||i(m,u))},isBlocked:function(i,a,u,c){if(!i)return!1;var h=so(i);if(!h)return!1;try{if(typeof a=="string"){if(h.classList.contains(a)||c&&h.closest("."+a)!==null)return!0}else if(Ki(h,a,c))return!0}catch{}return!!(u&&(h.matches(u)||c&&h.closest(u)!==null))},isIgnored:function(i,a,u){return!(i.tagName!=="TITLE"||!u.headTitleMutations)||a.getId(i)===-2},isSerialized:function(i,a){return a.getId(i)!==-1},isSerializedIframe:function(i,a){return!!(i.nodeName==="IFRAME"&&a.getMeta(i))},isSerializedStylesheet:function(i,a){return!!(i.nodeName==="LINK"&&i.nodeType===i.ELEMENT_NODE&&i.getAttribute&&i.getAttribute("rel")==="stylesheet"&&a.getMeta(i))},iterateResolveTree:function i(a,u){u(a.value);for(var c=a.children.length-1;c>=0;c--)i(a.children[c],u)},legacy_isTouchEvent:function(i){return!!i.changedTouches},get nowTimestamp(){return io},on:function(i,a,u){u===void 0&&(u=document);var c={capture:!0,passive:!0};return u.addEventListener(i,a,c),()=>u.removeEventListener(i,a,c)},patch:function(i,a,u){try{if(!(a in i))return()=>{};var c=i[a],h=u(c);return typeof h=="function"&&(h.prototype=h.prototype||{},Object.defineProperties(h,{__rrweb_original__:{enumerable:!1,value:c}})),i[a]=h,()=>{i[a]=c}}catch{return()=>{}}},polyfill:function(i){i===void 0&&(i=window),"NodeList"in i&&!i.NodeList.prototype.forEach&&(i.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in i&&!i.DOMTokenList.prototype.forEach&&(i.DOMTokenList.prototype.forEach=Array.prototype.forEach)},queueToResolveTrees:function(i){var a={},u=(O,G)=>{var B={value:O,parent:G,children:[]};return a[O.node.id]=B,B},c=[];for(var h of i){var{nextId:f,parentId:m}=h;if(f&&f in a){var y=a[f];if(y.parent){var S=y.parent.children.indexOf(y);y.parent.children.splice(S,0,u(h,y.parent))}else{var C=c.indexOf(y);c.splice(C,0,u(h,null))}}else if(m in a){var k=a[m];k.children.push(u(h,k))}else c.push(u(h,null))}return c},shadowHostInDom:lo,throttle:function(i,a,u){u===void 0&&(u={});var c=null,h=0;return function(){for(var f=arguments.length,m=new Array(f),y=0;y<f;y++)m[y]=arguments[y];var S=Date.now();h||u.leading!==!1||(h=S);
5var C=a-(S-h),k=this;C<=0||C>a?(c&&(clearTimeout(c),c=null),h=S,i.apply(k,m)):c||u.trailing===!1||(c=setTimeout((()=>{h=u.leading===!1?0:Date.now(),c=null,i.apply(k,m)}),C))}},uniqueTextMutations:function(i){for(var a=new Set,u=[],c=i.length;c--;){var h=i[c];a.has(h.id)||(u.push(h),a.add(h.id))}return u}},Symbol.toStringTag,{value:"Module"})),bc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wc=typeof Uint8Array>"u"?[]:new Uint8Array(256),ei=0;ei<64;ei++)wc[bc.charCodeAt(ei)]=ei;var uo;typeof window<"u"&&window.Blob&&new Blob([(i=>Uint8Array.from(atob(i),(a=>a.charCodeAt(0))))("KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3B
5hcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=")],{type:"text/javascript;charset=utf-8"});try{if(Array.from([1],(i=>2*i))[0]!==2){var ns=document.createElement("iframe");document.body.appendChild(ns),Array.from=((Xa=ns.contentWindow)==null?void 0:Xa.Array.from)||Array.from,document.body.removeChild(ns)}}catch(i){console.debug("Unable to override Array.from",i)}new _c,(function(i){i[i.NotStarted=0]="NotStarted",i[i.Running=1]="Running",i[i.Stopped=2]="Stopped"})(uo||(uo={}));class en{constructor(a){Xn(this,"fileName"),Xn(this,"functionName"),Xn(this,"lineNumber"),Xn(this,"columnNumber"),this.fileName=a.fileName||"",this.functionName=a.functionName||"",this.lineNumber=a.lineNumber,this.columnNumber=a.columnNumber}toString(){var a=this.lineNumber||"",u=this.columnNumber||"";return this.functionName?this.functionName+" ("+this.fileName+":"+a+":"+u+")":this.fileName+":"+a+":"+u}}var Sc=/(^|@)\S+:\d+/,co=/^\s*at .*(\S+:\d+|\(native\))/m,Ic=/^(eval@)?(\[native code])?$/,is={parse:function(i){return i?i.stacktrace!==void 0||i["opera#sourceloc"]!==void 0?this.parseOpera(i):i.stack&&i.stack.match(co)?this.parseV8OrIE(i):i.stack?this.parseFFOrSafari(i):(console.warn("[console-record-plugin]: Failed to parse error object:",i),[]):[]},extractLocation:function(i){if(i.indexOf(":")===-1)return[i];var a=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(i.replace(/[()]/g,""));if(!a)throw new Error("Cannot parse given url: "+i);return[a[1],a[2]||void 0,a[3]||void 0]},parseV8OrIE:function(i){return i.stack.split(` 6`).filter((function(a){return!!a.match(co)}),this).map((function(a){a.indexOf("(eval ")>-1&&(a=a.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var u=a.replace(/^\s+/,"").replace(/\(eval code/g,"("),c=u.match(/ (\((.+):(\d+):(\d+)\)$)/),h=(u=c?u.replace(c[0],""):u).split(/\s+/).slice(1),f=this.extractLocation(c?c[1]:h.pop()),m=h.join(" ")||void 0,y=["eval","<anonymous>"].indexOf(f[0])>-1?void 0:f[0];return new en({functionName:m,fileName:y,lineNumber:f[1],columnNumber:f[2]})}),this)},parseFFOrSafari:function(i){return i.stack.split(` 7`).filter((function(a){return!a.match(Ic)}
7),this).map((function(a){if(a.indexOf(" > eval")>-1&&(a=a.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),a.indexOf("@")===-1&&a.indexOf(":")===-1)return new en({functionName:a});var u=/((.*".+"[^@]*)?[^@]*)(?:@)/,c=a.match(u),h=c&&c[1]?c[1]:void 0,f=this.extractLocation(a.replace(u,""));return new en({functionName:h,fileName:f[0],lineNumber:f[1],columnNumber:f[2]})}),this)},parseOpera:function(i){return!i.stacktrace||i.message.indexOf(` 8`)>-1&&i.message.split(` 9`).length>i.stacktrace.split(` 10`).length?this.parseOpera9(i):i.stack?this.parseOpera11(i):this.parseOpera10(i)},parseOpera9:function(i){for(var a=/Line (\d+).*script (?:in )?(\S+)/i,u=i.message.split(` 11`),c=[],h=2,f=u.length;h<f;h+=2){var m=a.exec(u[h]);m&&c.push(new en({fileName:m[2],lineNumber:parseFloat(m[1])}))}return c},parseOpera10:function(i){for(var a=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,u=i.stacktrace.split(` 12`),c=[],h=0,f=u.length;h<f;h+=2){var m=a.exec(u[h]);m&&c.push(new en({functionName:m[3]||void 0,fileName:m[2],lineNumber:parseFloat(m[1])}))}return c},parseOpera11:function(i){return i.stack.split(` 13`).filter((function(a){return!!a.match(Sc)&&!a.match(/^Error created at/)}),this).map((function(a){var u=a.split("@"),c=this.extractLocation(u.pop()),h=(u.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new en({functionName:h,fileName:c[0],lineNumber:c[1],columnNumber:c[2]})}),this)}};function Cc(i){if(!i||!i.outerHTML)return"";for(var a="";i.parentElement;){var u=i.localName;if(!u)break;u=u.toLowerCase();var c=i.parentElement,h=[];if(c.children&&c.children.length>0)for(var f=0;f<c.children.length;f++){var m=c.children[f];m.localName&&m.localName.toLowerCase&&m.localName.toLowerCase()===u&&h.push(m)}h.length>1&&(u+=":eq("+h.indexOf(i)+")"),a=u+(a?">"+a:""),i=c}return a}function ss(i){return Object.prototype.toString.call(i)==="[object Object]"}function ho(i,a){if(a===0)return!0;var u=Object.keys(i);for(var c of u)if(ss(i[c])&&ho(i[c],a-1))return!0;return!1}function tn(i,a){var u={numOfKeysLimit:50,depthOfLimit:4};Object.assign(u,a);var c=[],h=[];return JSON.stringify(i,(function(f,m){if(c.length>0){var y=c.indexOf(this);~y?c.splice(y+1):c.push(this),~y?h.splice(y,1/0,f):h.push(f),~c.indexOf(m)&&(m=c[0]===m?"[Circular ~]":"[Circular ~."+h.slice(0,c.indexOf(m)).join(".")+"]")}else c.push(m);if(m===null)return m;if(m===void 0)return"undefined";if((function(O){return!!(ss(O)&&Object.keys(O).length>u.numOfKeysLimit||typeof O=="function"||ss(O)&&ho(O,u.depthOfLimit))})(m))return(function(O){var G=O.toString();return u.stringLengthLimit&&G.length>u.stringLengthLimit&&(G=G.slice(0,u.stringLengthLimit)+"..."),G})(m);if(typeof m=="bigint")return m.toString()+"n";if(m instanceof Event){var S={};for(var C in m){var k=m[C];Array.isArray(k)?S[C]=Cc(k.length?k[0]:null):S[C]=k}return S}return m instanceof Node?m instanceof HTMLElement?m?m.outerHTML:"":m.nodeName:m instanceof Error?m.stack?m.stack+` 14End of stack for Error object`:m.name+": "+m.message:m}))}var po={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function kc(i,a,u){var c,h=u?Object.assign({},po,u):po,f=h.logger;if(!f)return()=>{};c=typeof f=="string"?a[f]:f;var m=0,y=!1,S=[];if(h.level.includes("error")){var C=B=>{var ae=B.message,fe=B.error,oe=is.parse(fe).map((F=>F.toString())),P=[tn(ae,h.stringifyOptions)];i({level:"error",trace:oe,payload:P})};a.addEventListener("error",C),S.push((()=>{a.removeEventListener("error",C)}));var k=B=>{var ae,fe;B.reason instanceof Error?fe=[tn("Uncaught (in promise) "+(ae=B.reason).name+": "+ae.message,h.stringifyOptions)]:(ae=new Error,fe=[tn("Uncaught (in promise)",h.stringifyOptions),tn(B.reason,h.stringifyOptions)]);var oe=is.parse(ae).map((P=>P.toString()));i({level:"error",trace:oe,payload:fe})};a.addEventListener("unhandledrejection",k),S.push((()=>{a.removeEventListener("unhandledrejection",k)}))}for(var O of h.level)S.push(G(c,O));return()=>
14{S.forEach((B=>B()))};function G(B,ae){var fe=this;return B[ae]?yc.patch(B,ae,(oe=>function(){for(var P=arguments.length,F=new Array(P),N=0;N<P;N++)F[N]=arguments[N];if(oe.apply(fe,F),!(ae==="assert"&&F[0]||y)){y=!0;try{var W=is.parse(new Error).map((K=>K.toString())).splice(1),z=(ae==="assert"?F.slice(1):F).map((K=>tn(K,h.stringifyOptions)));++m<h.lengthThreshold?i({level:ae,trace:W,payload:z}):m===h.lengthThreshold&&i({level:"warn",trace:[],payload:[tn("The number of log records reached the threshold.")]})}catch(K){oe("rrweb logger error:",K,...F)}finally{y=!1}}})):()=>{}}}var fo=i=>({name:"rrweb/console@1",observer:kc,options:i}),Ec=Array.isArray,go=Object.prototype,xc=go.hasOwnProperty,as=go.toString,ti=Ec||function(i){return as.call(i)==="[object Array]"},Tc=i=>typeof i=="function",Mc=i=>i===Object(i)&&!ti(i),Tr=i=>i===void 0,Rc=i=>as.call(i)=="[object String]",os=i=>i===null,vo=i=>Tr(i)||os(i),ls=i=>as.call(i)==="[object Boolean]",mo=i=>i instanceof FormData,gr=typeof window<"u"?window:void 0,Bt=typeof globalThis<"u"?globalThis:gr,_o=Array.prototype.forEach,yo=Bt==null?void 0:Bt.navigator;Bt==null||Bt.document,Bt==null||Bt.location,Bt==null||Bt.fetch,Bt!=null&&Bt.XMLHttpRequest&&"withCredentials"in new Bt.XMLHttpRequest&&Bt.XMLHttpRequest,Bt==null||Bt.AbortController,yo==null||yo.userAgent;var Mr=gr??{},Ac=i=>i instanceof Document,bo=i=>{var a={t:function(u){if(gr&&Mr.POSTHOG_DEBUG&&!Tr(gr.console)&&gr.console){for(var c=("__rrweb_original__"in gr.console[u])?gr.console[u].__rrweb_original__:gr.console[u],h=arguments.length,f=new Array(h>1?h-1:0),m=1;m<h;m++)f[m-1]=arguments[m];c(i,...f)}},info:function(){for(var u=arguments.length,c=new Array(u),h=0;h<u;h++)c[h]=arguments[h];a.t("log",...c)},warn:function(){for(var u=arguments.length,c=new Array(u),h=0;h<u;h++)c[h]=arguments[h];a.t("warn",...c)},error:function(){for(var u=arguments.length,c=new Array(u),h=0;h<u;h++)c[h]=arguments[h];a.t("error",...c)},critical:function(){for(var u=arguments.length,c=new Array(u),h=0;h<u;h++)c[h]=arguments[h];console.error(i,...c)},uninitializedWarning:u=>{a.error("You must initialize PostHog before calling "+u)},createLogger:u=>bo(i+" "+u)};return a},Oc=bo("[PostHog.js]").createLogger,us={};function Nc(i,a,u){if(!vo(i)){if(ti(i))return(function(f,m,y){if(ti(f)){if(_o&&f.forEach===_o)f.forEach(m,y);else if("length"in f&&f.length===+f.length){for(var S=0,C=f.length;S<C;S++)if(S in f&&m.call(y,f[S],S)===us)return}}})(i,a,u);if(mo(i)){for(var c of i.entries())if(a.call(u,c[1],c[0])===us)return}else for(var h in i)if(xc.call(i,h)&&a.call(u,i[h],h)===us)return}}var Fc=function(i,a){var u,c;a===void 0&&(a="&");var h=[];return Nc(i,(function(f,m){Tr(f)||Tr(m)||m==="undefined"||(u=encodeURIComponent(f instanceof File?f.name:f.toString()),c=encodeURIComponent(m),h[h.length]=c+"="+u)})),h.join(a)};function wo(i,a,u){try{if(!(a in i))return()=>{};var c=i[a],h=u(c);return Tc(h)&&(h.prototype=h.prototype||{},Object.defineProperties(h,{__posthog_wrapped__:{enumerable:!1,value:!0}})),i[a]=h,()=>{i[a]=c}}catch{return()=>{}}}function cs(i,a){var u,c=(function(m){try{return typeof m=="string"?new URL(m).hostname:"url"in m?new URL(m.url).hostname:m.hostname}catch{return null}})(i),h={hostname:c,isHostDenied:!1};if((u=a.payloadHostDenyList)==null||!u.length||c==null||!c.trim().length)return h;for(var f of a.payloadHostDenyList)if(c.endsWith(f))return{hostname:c,isHostDenied:!0};return h}var So={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:i=>i,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io",".clarity.ms","analytics.google.com","bam.nr-data.net"]},Io=Oc("[Recorder]"),Co=i=>i.entryType==="navigation",ds=i=>i.entryType==="resource";function Lc(i,a,u){if(u.recordInitialRequests){var c=a.performance.getEntries().filter((m=>Co(m)||ds(m)&&u.initiatorTypes.includes(m.initiatorType)));i({requests:c.flatMap((m=>ii({entry:m,method:void 0,status:void 0,networkRequest:{},isInitial:!0}))),isInitial:!0})}var h=new a.PerformanceObserver((m=>{var y=m.getEntries().filter((S=>
14Co(S)||ds(S)&&u.initiatorTypes.includes(S.initiatorType)&&(C=>!u.recordBody&&!u.recordHeaders||C.initiatorType!=="xmlhttprequest"&&C.initiatorType!=="fetch")(S)));i({requests:y.flatMap((S=>ii({entry:S,method:void 0,status:void 0,networkRequest:{}})))})})),f=PerformanceObserver.supportedEntryTypes.filter((m=>u.performanceEntryTypeToObserve.includes(m)));return h.observe({entryTypes:f}),()=>{h.disconnect()}}function ri(i,a){return!!a&&(ls(a)||a[i])}function ni(i){var{type:a,recordBody:u,headers:c,url:h}=i;function f(y){var S=Object.keys(c).find((k=>k.toLowerCase()==="content-type")),C=S&&c[S];return y.some((k=>C==null?void 0:C.includes(k)))}if(!u||(function y(S){try{return typeof S=="string"?S.startsWith("blob:"):S instanceof URL?S.protocol==="blob:":S instanceof Request&&y(S.url)}catch{return!1}})(h))return!1;if(ls(u))return!0;if(ti(u))return f(u);var m=u[a];return ls(m)?m:f(m)}function hs(i,a,u,c,h,f){return ps.apply(this,arguments)}function ps(){return ps=e((function*(i,a,u,c,h,f){if(f===void 0&&(f=0),f>10)return Io.warn("Failed to get performance entry for request",{url:u,initiatorType:a}),null;var m=(function(y,S){for(var C=y.length-1;C>=0;C-=1)if(S(y[C]))return y[C]})(i.performance.getEntriesByName(u),(y=>ds(y)&&y.initiatorType===a&&(Tr(c)||y.startTime>=c)&&(Tr(h)||y.startTime<=h)));return m||(yield new Promise((y=>setTimeout(y,50*f))),hs(i,a,u,c,h,f+1))})),ps.apply(this,arguments)}function ko(i){var{body:a,options:u,url:c}=i;if(vo(a))return null;var{hostname:h,isHostDenied:f}=cs(c,u);if(f)return h+" is in deny list";if(Rc(a))return a;if(Ac(a))return a.textContent;if(mo(a))return Fc(a);if(Mc(a))try{return JSON.stringify(a)}catch{return"[SessionReplay] Failed to stringify response object"}return"[SessionReplay] Cannot read body of type "+toString.call(a)}var Dc=i=>!os(i)&&(i.entryType==="navigation"||i.entryType==="resource");function ii(i){var{entry:a,method:u,status:c,networkRequest:h,isInitial:f,start:m,end:y,url:S,initiatorType:C}=i;m=a?a.startTime:m,y=a?a.responseEnd:y;var k=Math.floor(Date.now()-performance.now()),O=Math.floor(k+(m||0)),G=[t({},a?a.toJSON():{name:S},{startTime:Tr(m)?void 0:Math.round(m),endTime:Tr(y)?void 0:Math.round(y),timeOrigin:k,timestamp:O,method:u,initiatorType:C||(a?a.initiatorType:void 0),status:c,requestHeaders:h.requestHeaders,requestBody:h.requestBody,responseHeaders:h.responseHeaders,responseBody:h.responseBody,isInitial:f})];if(Dc(a))for(var B of a.serverTiming||[])G.push({timeOrigin:k,timestamp:O,startTime:Math.round(a.startTime),name:B.name,duration:B.duration,entryType:"serverTiming"});return G}var Pc=["video/","audio/"];function Eo(i){return new Promise(((a,u)=>{var c=setTimeout((()=>a("[SessionReplay] Timeout while trying to read body")),500);try{i.clone().text().then((h=>a(h)),(h=>u(h))).finally((()=>clearTimeout(c)))}catch{clearTimeout(c),a("[SessionReplay] Failed to read body")}}))}function xo(){return(xo=e((function*(i){var{r:a,options:u,url:c}=i,{hostname:h,isHostDenied:f}=cs(c,u);return f?Promise.resolve(h+" is in deny list"):Eo(a)}))).apply(this,arguments)}function To(){return(To=e((function*(i){var{r:a,options:u,url:c}=i,h=(function(f){var m,{r:y,options:S,url:C}=f;if(y.headers.get("Transfer-Encoding")==="chunked")return"Chunked Transfer-Encoding is not supported";var k=(m=y.headers.get("Content-Type"))==null?void 0:m.toLowerCase(),O=Pc.some((ae=>k==null?void 0:k.startsWith(ae)));if(k&&O)return"Content-Type "+k+" is not supported";var{hostname:G,isHostDenied:B}=cs(C,S);return B?G+" is in deny list":null})({r:a,options:u,url:c});return os(h)?Eo(a):Promise.resolve(h)}))).apply(this,arguments)}function Bc(i,a,u){if(!u.initiatorTypes.includes("fetch"))return()=>{};var c=ri("request",u.recordHeaders),h=ri("response",u.recordHeaders),f=wo(a,"fetch",(m=>(function(){var y=e((function*(S,C){var k,O,G,B=new Request(S,C),ae={};try{var fe={};B.headers.forEach(((P,F)=>{fe[F]=P})),c&&(ae.requestHeaders=fe),ni({type:"request",headers:fe,url:S,recordBody:u.recordBody})&&(ae.requestBody=yield(function(P){return xo.apply(this,arguments)})({r:B,options:u,url:S})),O=a.performance.now(),k=yield m(B),G=a.performance.now();var oe={};
14return k.headers.forEach(((P,F)=>{oe[F]=P})),h&&(ae.responseHeaders=oe),ni({type:"response",headers:oe,url:S,recordBody:u.recordBody})&&(ae.responseBody=yield(function(P){return To.apply(this,arguments)})({r:k,options:u,url:S})),k}finally{hs(a,"fetch",B.url,O,G).then((P=>{var F,N=ii({entry:P,method:B.method,status:(F=k)==null?void 0:F.status,networkRequest:ae,start:O,end:G,url:B.url,initiatorType:"fetch"});i({requests:N})})).catch((()=>{}))}}));return function(S,C){return y.apply(this,arguments)}})()));return()=>{f()}}var Mo=null;function $c(i,a,u){if(!("performance"in a))return()=>{};if(Mo)return Io.warn("Network observer already initialised, doing nothing"),()=>{};var c=u?Object.assign({},So,u):So,h=S=>{var C=[];S.requests.forEach((k=>{var O=c.maskRequestFn(k);O&&C.push(O)})),C.length>0&&i(t({},S,{requests:C}))},f=Lc(h,a,c),m=()=>{},y=()=>{};return(c.recordHeaders||c.recordBody)&&(m=(function(S,C,k){if(!k.initiatorTypes.includes("xmlhttprequest"))return()=>{};var O=ri("request",k.recordHeaders),G=ri("response",k.recordHeaders),B=wo(C.XMLHttpRequest.prototype,"open",(ae=>function(fe,oe,P,F,N){P===void 0&&(P=!0);var W,z,K=this,J=new Request(oe),ie={},ce={},ve=K.setRequestHeader.bind(K);K.setRequestHeader=(U,Ce)=>(ce[U]=Ce,ve(U,Ce)),O&&(ie.requestHeaders=ce);var Ie=K.send.bind(K);K.send=U=>(ni({type:"request",headers:ce,url:oe,recordBody:k.recordBody})&&(ie.requestBody=ko({body:U,options:k,url:oe})),W=C.performance.now(),Ie(U)),K.addEventListener("readystatechange",(()=>{if(K.readyState===K.DONE){z=C.performance.now();var U={};K.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((Ce=>{var me=Ce.split(": "),ye=me.shift(),ge=me.join(": ");ye&&(U[ye]=ge)})),G&&(ie.responseHeaders=U),ni({type:"response",headers:U,url:oe,recordBody:k.recordBody})&&(ie.responseBody=ko({body:K.response,options:k,url:oe})),hs(C,"xmlhttprequest",J.url,W,z).then((Ce=>{var me=ii({entry:Ce,method:fe,status:K==null?void 0:K.status,networkRequest:ie,start:W,end:z,url:oe.toString(),initiatorType:"xmlhttprequest"});S({requests:me})})).catch((()=>{}))}})),ae.call(K,fe,oe,P,F,N)}));return()=>{B()}})(h,a,c),y=Bc(h,a,c)),Mo=()=>{f(),m(),y()}}var Ro=i=>({name:"rrweb/network@1",observer:$c,options:i});Mr.__PosthogExtensions__=Mr.__PosthogExtensions__||{},Mr.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:fo,getRecordNetworkPlugin:Ro},Mr.__PosthogExtensions__.rrweb={record:Jr,version:"v2"},Mr.rrweb={record:Jr,version:"v2"},Mr.rrwebConsoleRecord={getRecordConsolePlugin:fo},Mr.getRecordNetworkPlugin=Ro})();(function(){var n=typeof window<"u"?window:void 0,e=typeof globalThis<"u"?globalThis:n,t=e==null?void 0:e.navigator;e==null||e.document,e==null||e.location,e==null||e.fetch,e!=null&&e.XMLHttpRequest&&"withCredentials"in new e.XMLHttpRequest&&e.XMLHttpRequest,e==null||e.AbortController,t==null||t.userAgent;var r=n??{};function s(le,_,E,T,L,D,ke){try{var je=le[D](ke),Xe=je.value}catch(A){return void E(A)}je.done?_(Xe):Promise.resolve(Xe).then(T,L)}function o(le){return function(){var _=this,E=arguments;return new Promise((function(T,L){var D=le.apply(_,E);function ke(Xe){s(D,T,L,ke,je,"next",Xe)}function je(Xe){s(D,T,L,ke,je,"throw",Xe)}ke(void 0)}))}}function l(){return l=Object.assign?Object.assign.bind():function(le){for(var _=1;_<arguments.length;_++){var E=arguments[_];for(var T in E)({}).hasOwnProperty.call(E,T)&&(le[T]=E[T])}return le},l.apply(null,arguments)}var d=Object.prototype.toString,p=le=>le===void 0,g=le=>d.call(le)=="[object String]";function v(le){return le===null||typeof le!="object"}function w(le,_){return Object.prototype.toString.call(le)==="[object "+_+"]"}function b(le){return!p(Event)&&(function(_,E){try{return _ instanceof E}catch{return!1}})(le,Event)}var I,R,M;function H(le){var _=globalThis._posthogChunkIds;if(_){var E=Object.keys(_);return M&&E.length===R?M:(R=E.length,M=E.reduce(((T,L)=>{I||(I={});var D=I[L];if(D)T[D[0]]=D[1];else for(var ke=le(L),je=ke.length-1;je>=0;je--){var Xe=ke[je],A=Xe==null?void 0:Xe.filename,j=_[L];if(A&&j){T[A]=j,I[L]=[A,j];break}}return T}),{}))}}var X="?";function q(le,_,E,T){var L={platform:"web:javascript",filename:le,function:_==="<anonymous>"?X:_,in_app:!0};return p(E)||(L.lineno=E),p(T)||(L.colno=T),L}var de=(le,_)=>{var E=le.indexOf("safari-extension")!==-1,T=le.indexOf("safari-web-extension")!==-1;return E||T?[le.indexOf("@")!==-1?le.split("@")[0]:X,E?"safari-extension:"+_:"safari-web-extension:"+_]:[le,_]},pe=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Ae=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,He=/\((\S*)(?::(\d+))(?::(\d+))\)/,Ze=le=>{var _=pe.exec(le);if(_){var[,E,T,L]=_;return q(E,X,+T,+L)}var D=Ae.exec(le);if(D){if(D[2]&&D[2].indexOf("eval")===0){var ke=He.exec(D[2]);ke&&(D[2]=ke[1],D[3]=ke[2],D[4]=ke[3])}var[je,Xe]=de(D[1]||X,D[2]);return q(Xe,je,D[3]?+D[3]:void 0,D[4]?+D[4]:void 0)}},Ee=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,vt=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,tt=le=>{var _=Ee.exec(le);if(_){if(_[3]&&_[3].indexOf(" > eval")>-1){var E=vt.exec(_[3]);E&&(_[1]=_[1]||"eval",_[3]=E[1],_[4]=E[2],_[5]="")}var T=_[3],L=_[1]||X;return[L,T]=de(L,T),q(T,L,_[4]?+_[4]:void 0,_[5]?+_[5]:void 0)}},Ve=/\(error: (.*)\)/,Ke=50;function wt(){for(var le=arguments.length,_=new Array(le),E=0;E<le;E++)_[E]=arguments[E];return function(T){for(var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,D=[],ke=T.split(` 15`),je=L;je<ke.length;je++){var Xe=ke[je];if(!(Xe.length>1024)){var A=Ve.test(Xe)?Xe.replace(Ve,"$1"):Xe;if(!A.match(/\S*Error: /)){for(var j of _){var se=j(A);if(se){D.push(se);break}}if(D.length>=Ke)break}}}return(function(ne){if(!ne.length)return[];var $=Array.from(ne);return $.reverse(),$.slice(0,Ke).map((_e=>{return l({},_e,{filename:_e.filename||(he=$,he[he.length-1]||{}).filename,function:_e.function||X});var he}))})(D)}}class mt{buildFromUnknown(_){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},T=E&&E.mechanism||{handled:!0,type:"generic"},L=this.buildCoercingContext(T,E,0).apply(_),D=this.buildParsingContext(),ke=this.parseStacktrace(L,D);return{$exception_list:this.convertToExceptionList(ke,T),$exception_level:"error"}}coerceFallback(_){var E;return{type:"Error",value:"Unknown error",stack:(E=_.syntheticException)==null?void 0:E.stack,synthetic:!0}}parseStacktrace(_,E){var T,L;return _.cause!=null&&(T=this.parseStacktrace(_.cause,E)),_.stack!=""&&_.stack!=null&&(L=this.applyChunkIds(this.stackParser(_.stack,_.synthetic?1:0),E.chunkIdMap)),l({},_,{cause:T,stack:L})}applyChunkIds(_,E){return _.map((T=>(T.filename&&E&&(T.chunk_id=E[T.filename]),T)))}applyCoercers(_,E){for(var T of this.coercers)if(T.match(_))return T.coerce(_,E);return this.coerceFallback(E)}applyModifiers(_){var E=this;return o((function*(){var T=_;for(var L of E.modifiers)T=yield L(T);return T}))()}modifyFrames(_){var E=this;return o((function*(){var T;_.cause!=null&&(T=yield E.modifyFrames(_.cause));var L=[];return _.stack!=null&&(L=yield E.applyModifiers(_.stack)),l({},_,{cause:T,stack:L})}))()}convertToExceptionList(_,E){var T,L,D,ke={type:_.type,value:_.value,mechanism:{type:(T=E.type)!=null?T:"generic",handled:(L=E.handled)==null||L,synthetic:(D=_.synthetic)!=null&&D}};_.stack&&(ke.stacktrace={type:"raw",frames:_.stack});var je=[ke];return _.cause!=null&&je.push(...this.convertToExceptionList(_.cause,l({},E,{handled:!0}))),je}buildParsingContext(){return{chunkIdMap:H(this.stackParser)}}buildCoercingContext(_,E){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,L=(D,ke)=>{if(ke<=4){var je=this.buildCoercingContext(_,E,ke);return this.applyCoercers(D,je)}};return l({},E,{syntheticException:T==0?E.syntheticException:void 0,mechanism:_,apply:D=>L(D,T),next:D=>L(D,T+1)})}constructor(_,E,T){_===void 0&&(_=[]),E===void 0&&(E=[]),T===void 0&&(T=[]),this.coercers=_,this.modifiers=T,this.stackParser=wt(...E)}}class Ct{match(_){return this.isDOMException(_)||this.isDOMError(_)}coerce(_,E){var T=g(_.stack);return{type:this.getType(_),value:this.getValue(_),stack:T?_.stack:void 0,cause:_.cause?E.next(_.cause):void 0,synthetic:!1}}getType(_){return this.isDOMError(_)?"DOMError":"DOMException"}getValue(_){var E=_.name||(this.isDOMError(_)?"DOMError":"DOMException");return _.message?E+": "+_.message:E}isDOMException(_){return w(_,"DOMException")}isDOMError(_){return w(_,"DOMError")}}class rt{match(_){return _ instanceof Error}coerce(_,E){return{type:this.getType(_),value:this.getMessage(_,E),stack:this.getStack(_),cause:_.cause?E.next(_.cause):void 0,synthetic:!1}}getType(_){return _.name||_.constructor.name}getMessage(_,E){var T=_.message;return T.error&&typeof T.error.message=="string"?String(T.error.message):String(T)}getStack(_){return _.stacktrace||_.stack||void 0}}class _t{match(_){return w(_,"ErrorEvent")&&_.error!=null}coerce(_,E){var T,L=E.apply(_.error);
15return L||{type:"ErrorEvent",value:_.message,stack:(T=E.syntheticException)==null?void 0:T.stack,synthetic:!0}}constructor(){}}var Lt=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class ut{match(_){return typeof _=="string"}coerce(_,E){var T,[L,D]=this.getInfos(_);return{type:L??"Error",value:D??_,stack:(T=E.syntheticException)==null?void 0:T.stack,synthetic:!0}}getInfos(_){var E="Error",T=_,L=_.match(Lt);return L&&(E=L[1],T=L[2]),[E,T]}}var dt=["fatal","error","warning","log","info","debug"];function kt(le){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:40,E=Object.keys(le);if(E.sort(),!E.length)return"[object has no keys]";for(var T=E.length;T>0;T--){var L=E.slice(0,T).join(", ");if(!(L.length>_))return T===E.length||L.length<=_?L:L.slice(0,_)+"..."}return""}class nt{match(_){return typeof _=="object"&&_!==null}coerce(_,E){var T,L=this.getErrorPropertyFromObject(_);return L?E.apply(L):{type:this.getType(_),value:this.getValue(_),stack:(T=E.syntheticException)==null?void 0:T.stack,level:this.isSeverityLevel(_.level)?_.level:"error",synthetic:!0}}getType(_){return b(_)?_.constructor.name:"Error"}getValue(_){if("name"in _&&typeof _.name=="string"){var E="'"+_.name+"' captured as exception";return"message"in _&&typeof _.message=="string"&&(E+=" with message: '"+_.message+"'"),E}if("message"in _&&typeof _.message=="string")return _.message;var T=this.getObjectClassName(_);return(T&&T!=="Object"?"'"+T+"'":"Object")+" captured as exception with keys: "+kt(_)}isSeverityLevel(_){return g(_)&&!(E=>g(E)&&E.trim().length===0)(_)&&dt.indexOf(_)>=0}getErrorPropertyFromObject(_){for(var E in _)if(Object.prototype.hasOwnProperty.call(_,E)){var T=_[E];if(T instanceof Error)return T}}getObjectClassName(_){try{var E=Object.getPrototypeOf(_);return E?E.constructor.name:void 0}catch{return}}}class yt{match(_){return b(_)}coerce(_,E){var T,L=_.constructor.name;return{type:L,value:L+" captured as exception with keys: "+kt(_),stack:(T=E.syntheticException)==null?void 0:T.stack,synthetic:!0}}}class Ge{match(_){return v(_)}coerce(_,E){var T;return{type:"Error",value:"Primitive value captured as exception: "+String(_),stack:(T=E.syntheticException)==null?void 0:T.stack,synthetic:!0}}}class ct{match(_){return w(_,"PromiseRejectionEvent")}coerce(_,E){var T,L=this.getUnhandledRejectionReason(_);return v(L)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(L),stack:(T=E.syntheticException)==null?void 0:T.stack,synthetic:!0}:E.apply(L)}getUnhandledRejectionReason(_){if(v(_))return _;try{if("reason"in _)return _.reason;if("detail"in _&&"reason"in _.detail)return _.detail.reason}catch{}return _}}var St=le=>{var _={t:function(E){if(n&&r.POSTHOG_DEBUG&&!p(n.console)&&n.console){for(var T=("__rrweb_original__"in n.console[E])?n.console[E].__rrweb_original__:n.console[E],L=arguments.length,D=new Array(L>1?L-1:0),ke=1;ke<L;ke++)D[ke-1]=arguments[ke];T(le,...D)}},info:function(){for(var E=arguments.length,T=new Array(E),L=0;L<E;L++)T[L]=arguments[L];_.t("log",...T)},warn:function(){for(var E=arguments.length,T=new Array(E),L=0;L<E;L++)T[L]=arguments[L];_.t("warn",...T)},error:function(){for(var E=arguments.length,T=new Array(E),L=0;L<E;L++)T[L]=arguments[L];_.t("error",...T)},critical:function(){for(var E=arguments.length,T=new Array(E),L=0;L<E;L++)T[L]=arguments[L];console.error(le,...T)},uninitializedWarning:E=>{_.error("You must initialize PostHog before calling "+E)},createLogger:E=>St(le+" "+E)};return _},hr=St("[PostHog.js]").createLogger;t!=null&&t.sendBeacon;var Rt=hr("[ExceptionAutocapture]"),Yt=new mt([new Ct,new ct,new _t,new rt,new yt,new nt,new ut,new Ge],[Ze,tt]);function Et(le){var{event:_,error:E}=le;return Yt.buildFromUnknown(E||_,{mechanism:{handled:!1}})}var Qt={wrapOnError:le=>{var _=n;_||Rt.info("window not available, cannot wrap onerror");var E=_.onerror;return _.onerror=function(){for(var T,L=arguments.length,D=new Array(L),ke=0;ke<L;ke++)D[ke]=arguments[ke];var je=Et({event:D[0],error:D[4]});return le(je),(T=E==null?void 0:E(...D))!==null&&T!==void 0&&T},_.onerror.__POSTHOG_INSTRUMENTED__=!0,()=>{var T;(T=_.onerror)==null||delete T.__POSTHOG_INSTRUMENTED__,_.onerror=E}},wrapUnhandledRejection:le=>{var _=n;_||Rt.info("window not available, cannot wrap onUnhandledRejection");var E=_.onunhandledrejection;return _.onunhandledrejection=function(T){var L,D=Et({event:T});return le(D),(L=E==null?void 0:E.apply(_,[T]))!==null&&L!==void 0&&L},_.onunhandledrejection.__POSTHOG_INSTRUMENTED__=!0,()=>{var T;(T=_.onunhandledrejection)==null||delete T.__POSTHOG_INSTRUMENTED__,_.onunhandledrejection=E}},wrapConsoleError:le=>{var _=console;_||Rt.info("console not available, cannot wrap console.error");var E=_.error;return _.error=function(){for(var T=arguments.length,L=new Array(T),D=0;D<T;D++)L[D]=arguments[D];var ke=L.join(" "),je=Et({error:L.find((Xe=>Xe instanceof Error)),event:ke});return le(je),E==null?void 0:E(...L)},_.error.__POSTHOG_INSTRUMENTED__=!0,()=>{var T;(T=_.error)==null||delete T.__POSTHOG_INSTRUMENTED__,_.error=E}}};r.__PosthogExtensions__=r.__PosthogExtensions__||{},r.__PosthogExtensions__.errorWrappingFunctions=Qt,r.posthogErrorWrappingFunctions=Qt})();(function(){function n(w,b,I,R,M,H,X){try{var q=w[H](X),de=q.value}catch(pe){return void I(pe)}q.done?b(de):Promise.resolve(de).then(R,M)}var e=Array.isArray,t=Object.prototype.toString,r=e||function(w){return t.call(w)==="[object Array]"};function s(w,b,I){try{if(!(b in w))return()=>{};var R=w[b],M=I(R);return typeof M=="function"&&(M.prototype=M.prototype||{},Object.defineProperties(M,{__posthog_wrapped__:{enumerable:!1,value:!0}})),w[b]=M,()=>{w[b]=R}}catch{return()=>{}}}var o=typeof window<"u"?window:void 0,l=typeof globalThis<"u"?globalThis:o,d=l==null?void 0:l.navigator;l==null||l.document,l==null||l.location,l==null||l.fetch,l!=null&&l.XMLHttpRequest&&"withCredentials"in new l.XMLHttpRequest&&l.XMLHttpRequest,l==null||l.AbortController,d==null||d.userAgent;var p=o??{},g=(w,b,I,R)=>{var M;try{M=new URL(R.url).hostname}catch{return}if(!r(w)||w.includes(M)){if(I){var{sessionId:H,windowId:X}=I.checkAndGetSessionAndWindowId(!0);R.headers.set("X-POSTHOG-SESSION-ID",H),R.headers.set("X-POSTHOG-WINDOW-ID",X)}b!=="$posthog_cookieless"&&R.headers.set("X-POSTHOG-DISTINCT-ID",b)}};p.__PosthogExtensions__=p.__PosthogExtensions__||{};var v={_patchFetch:(w,b,I)=>s(o,"fetch",(R=>
vendor: 9,777 bytes, line 15
15(function(){var M,H=(M=function*(X,q){var de=new Request(X,q);return g(w,b,I,de),R(de)},function(){var X=this,q=arguments;return new Promise((function(de,pe){var Ae=M.apply(X,q);function He(Ee){n(Ae,de,pe,He,Ze,"next",Ee)}function Ze(Ee){n(Ae,de,pe,He,Ze,"throw",Ee)}He(void 0)}))});return function(X,q){return H.apply(this,arguments)}})())),_patchXHR:(w,b,I)=>s(o.XMLHttpRequest.prototype,"open",(R=>function(M,H,X,q,de){X===void 0&&(X=!0);var pe=new Request(H);return g(w,b,I,pe),R.call(this,M,pe.url,X,q,de)}))};p.__PosthogExtensions__.tracingHeadersPatchFns=v,p.postHogTracingHeadersPatchFns=v})();(function(){var n,e,t=function(){var A=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(A&&A.responseStart>0&&A.responseStart<performance.now())return A},r=function(A){if(document.readyState==="loading")return"loading";var j=t();if(j){if(A<j.domInteractive)return"loading";if(j.domContentLoadedEventStart===0||A<j.domContentLoadedEventStart)return"dom-interactive";if(j.domComplete===0||A<j.domComplete)return"dom-content-loaded"}return"complete"},s=function(A){var j=A.nodeName;return A.nodeType===1?j.toLowerCase():j.toUpperCase().replace(/^#/,"")},o=function(A,j){var se="";try{for(;A&&A.nodeType!==9;){var ne=A,$=ne.id?"#"+ne.id:s(ne)+(ne.classList&&ne.classList.value&&ne.classList.value.trim()&&ne.classList.value.trim().length?"."+ne.classList.value.trim().replace(/\s+/g,"."):"");if(se.length+$.length>(j||100)-1)return se||$;if(se=se?$+">"+se:$,ne.id)break;A=ne.parentNode}}catch{}return se},l=-1,d=function(){return l},p=function(A){addEventListener("pageshow",(function(j){j.persisted&&(l=j.timeStamp,A(j))}),!0)},g=function(){var A=t();return A&&A.activationStart||0},v=function(A,j){var se=t(),ne="navigate";return d()>=0?ne="back-forward-cache":se&&(document.prerendering||g()>0?ne="prerender":document.wasDiscarded?ne="restore":se.type&&(ne=se.type.replace(/_/g,"-"))),{name:A,value:j===void 0?-1:j,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:ne}},w=function(A,j,se){try{if(PerformanceObserver.supportedEntryTypes.includes(A)){var ne=new PerformanceObserver((function($){Promise.resolve().then((function(){j($.getEntries())}))}));return ne.observe(Object.assign({type:A,buffered:!0},se||{})),ne}}catch{}},b=function(A,j,se,ne){var $,_e;return function(he){j.value>=0&&(he||ne)&&((_e=j.value-($||0))||$===void 0)&&($=j.value,j.delta=_e,j.rating=(function(Se,ee){return Se>ee[1]?"poor":Se>ee[0]?"needs-improvement":"good"})(j.value,se),A(j))}},I=function(A){requestAnimationFrame((function(){return requestAnimationFrame((function(){return A()}))}))},R=function(A){document.addEventListener("visibilitychange",(function(){document.visibilityState==="hidden"&&A()}))},M=function(A){var j=!1;return function(){j||(A(),j=!0)}},H=-1,X=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},q=function(A){document.visibilityState==="hidden"&&H>-1&&(H=A.type==="visibilitychange"?A.timeStamp:0,pe())},de=function(){addEventListener("visibilitychange",q,!0),addEventListener("prerenderingchange",q,!0)},pe=function(){removeEventListener("visibilitychange",q,!0),removeEventListener("prerenderingchange",q,!0)},Ae=function(){return H<0&&(H=X(),de(),p((function(){setTimeout((function(){H=X(),de()}),0)}))),{get firstHiddenTime(){return H}}},He=function(A){document.prerendering?addEventListener("prerenderingchange",(function(){return A()}),!0):A()},Ze=[1800,3e3],Ee=function(A,j){j=j||{},He((function(){var se,ne=Ae(),$=v("FCP"),_e=w("paint",(function(he){he.forEach((function(Se){Se.name==="first-contentful-paint"&&(_e.disconnect(),Se.startTime<ne.firstHiddenTime&&($.value=Math.max(Se.startTime-g(),0),$.entries.push(Se),se(!0)))}))}));_e&&(se=b(A,$,Ze,j.reportAllChanges),p((function(he){$=v("FCP"),se=b(A,$,Ze,j.reportAllChanges),I((function(){$.value=performance.now()-he.timeStamp,se(!0)}))})))}))},vt=[.1,.25],tt=0,Ve=1/0,Ke=0,wt=function(A){A.forEach((function(j){j.interactionId&&(Ve=Math.min(Ve,j.interactionId),Ke=Math.max(Ke,j.interactionId),tt=Ke?(Ke-Ve)/7+1:0)}))},mt=function(){return n?tt:performance.interactionCount||0},Ct=function(){"interactionCount"in performance||n||(n=w("event",wt,{type:"event",buffered:!0,durationThreshold:0}))},rt=[],_t=new Map,Lt=0,ut=[],dt=function(A){if(ut.forEach((function($){return $(A)})),A.interactionId||A.entryType==="first-input"){var j=rt[rt.length-1],se=_t.get(A.interactionId);if(se||rt.length<10||A.duration>j.latency){if(se)A.duration>se.latency?(se.entries=[A],se.latency=A.duration):A.duration===se.latency&&A.startTime===se.entries[0].startTime&&se.entries.push(A);else{var ne={id:A.interactionId,latency:A.duration,entries:[A]};_t.set(ne.id,ne),rt.push(ne)}rt.sort((function($,_e){return _e.latency-$.latency})),rt.length>10&&rt.splice(10).forEach((function($){return _t.delete($.id)}))}}},kt=function(A){var j=self.requestIdleCallback||self.setTimeout,se=-1;return A=M(A),document.visibilityState==="hidden"?A():(se=j(A),R(A)),se},nt=[200,500],yt=function(A,j){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(j=j||{},He((function(){var se;Ct();var ne,$=v("INP"),_e=function(Se){kt((function(){Se.forEach(dt);var ee=(function(){var Te=Math.min(rt.length-1,Math.floor((mt()-Lt)/50));return rt[Te]})();ee&&ee.latency!==$.value&&($.value=ee.latency,$.entries=ee.entries,ne())}))},he=w("event",_e,{durationThreshold:(se=j.durationThreshold)!==null&&se!==void 0?se:40});ne=b(A,$,nt,j.reportAllChanges),he&&(he.observe({type:"first-input",buffered:!0}),R((function(){_e(he.takeRecords()),ne(!0)})),p((function(){Lt=mt(),rt.length=0,_t.clear(),$=v("INP"),ne=b(A,$,nt,j.reportAllChanges)})))})))},Ge=[],ct=[],St=0,hr=new WeakMap,Rt=new Map,Yt=-1,Et=function(A){Ge=Ge.concat(A),Qt()},Qt=function(){Yt<0&&(Yt=kt(le))},le=function(){Rt.size>10&&Rt.forEach((function(he,Se){_t.has(Se)||Rt.delete(Se)}));var A=rt.map((function(he){return hr.get(he.entries[0])})),j=ct.length-50;ct=ct.filter((function(he,Se){return Se>=j||A.includes(he)}));for(var se=new Set,ne=0;ne<ct.length;ne++){var $=ct[ne];_($.startTime,$.processingEnd).forEach((function(he){se.add(he)}))}var _e=Ge.length-1-50;Ge=Ge.filter((function(he,Se){return he.startTime>St&&Se>_e||se.has(he)})),Yt=-1};ut.push((function(A){A.interactionId&&A.target&&!Rt.has(A.interactionId)&&Rt.set(A.interactionId,A.target)}),(function(A){var j,se=A.startTime+A.duration;St=Math.max(St,A.processingEnd);for(var ne=ct.length-1;ne>=0;ne--){var $=ct[ne];if(Math.abs(se-$.renderTime)<=8){(j=$).startTime=Math.min(A.startTime,j.startTime),j.processingStart=Math.min(A.processingStart,j.processingStart),j.processingEnd=Math.max(A.processingEnd,j.processingEnd),j.entries.push(A);break}}j||(j={startTime:A.startTime,processingStart:A.processingStart,processingEnd:A.processingEnd,renderTime:se,entries:[A]},ct.push(j)),(A.interactionId||A.entryType==="first-input")&&hr.set(A,j),Qt()}));var _=function(A,j){for(var se,ne=[],$=0;se=Ge[$];$++)if(!(se.startTime+se.duration<A)){if(se.startTime>j)break;ne.push(se)}return ne},E=[2500,4e3],T={},L=typeof window<"u"?window:void 0,D=typeof globalThis<"u"?globalThis:L,ke=D==null?void 0:D.navigator;D==null||D.document,D==null||D.location,D==null||D.fetch,D!=null&&D.XMLHttpRequest&&"withCredentials"in new D.XMLHttpRequest&&D.XMLHttpRequest,D==null||D.AbortController,ke==null||ke.userAgent;var je=L??{},Xe={onLCP:function(A,j){(function(se,ne){ne=ne||{},He((function(){var $,_e=Ae(),he=v("LCP"),Se=function(Ue){ne.reportAllChanges||(Ue=Ue.slice(-1)),Ue.forEach((function(ot){ot.startTime<_e.firstHiddenTime&&(he.value=Math.max(ot.startTime-g(),0),he.entries=[ot],$())}))},ee=w("largest-contentful-paint",Se);if(ee){$=b(se,he,E,ne.reportAllChanges);var Te=M((function(){T[he.id]||(Se(ee.takeRecords()),ee.disconnect(),T[he.id]=!0,$(!0))}));["keydown","click"].forEach((function(Ue){addEventListener(Ue,(function(){return kt(Te)}),{once:!0,capture:!0})})),R(Te),p((function(Ue){he=v("LCP"),$=b(se,he,E,ne.reportAllChanges),I((function(){he.value=performance.now()-Ue.timeStamp,T[he.id]=!0,$(!0)}))}))}}))})((function(se){var ne=(function($){var _e={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:$.value};if($.entries.length){var he=t();if(he){var Se=he.activationStart||0,ee=$.entries[$.entries.length-1],Te=ee.url&&performance.getEntriesByType("resource").filter((function(er){return er.name===ee.url}))[0],Ue=Math.max(0,he.responseStart-Se),ot=Math.max(Ue,Te?(Te.requestStart||Te.startTime)-Se:0),Dt=Math.max(ot,Te?Te.responseEnd-Se:0),ar=Math.max(Dt,ee.startTime-Se);_e={element:o(ee.element),timeToFirstByte:Ue,resourceLoadDelay:ot-Ue,resourceLoadDuration:Dt-ot,elementRenderDelay:ar-Dt,navigationEntry:he,lcpEntry:ee},ee.url&&(_e.url=ee.url),Te&&(_e.lcpResourceEntry=Te)}}return Object.assign($,{attribution:_e})})(se);A(ne)}),j)},onCLS:function(A,j){(function(se,ne){ne=ne||{},Ee(M((function(){var $,_e=v("CLS",0),he=0,Se=[],ee=function(Ue){Ue.forEach((function(ot){if(!ot.hadRecentInput){var Dt=Se[0],ar=Se[Se.length-1];he&&ot.startTime-ar.startTime<1e3&&ot.startTime-Dt.startTime<5e3?(he+=ot.value,Se.push(ot)):(he=ot.value,Se=[ot])}})),he>_e.value&&(_e.value=he,_e.entries=Se,$())},Te=w("layout-shift",ee);Te&&($=b(se,_e,vt,ne.reportAllChanges),R((function(){ee(Te.takeRecords()),$(!0)})),p((function(){he=0,_e=v("CLS",0),$=b(se,_e,vt,ne.reportAllChanges),I((function(){return $()}))})),setTimeout($,0))})))})((function(se){var ne=(function($){var _e,he={};if($.entries.length){var Se=$.entries.reduce((function(Te,Ue){return Te&&Te.value>Ue.value?Te:Ue}));if(Se&&Se.sources&&Se.sources.length){var ee=(_e=Se.sources).find((function(Te){return Te.node&&Te.node.nodeType===1}))||_e[0];
15ee&&(he={largestShiftTarget:o(ee.node),largestShiftTime:Se.startTime,largestShiftValue:Se.value,largestShiftSource:ee,largestShiftEntry:Se,loadState:r(Se.startTime)})}}return Object.assign($,{attribution:he})})(se);A(ne)}),j)},onFCP:function(A,j){Ee((function(se){var ne=(function($){var _e={timeToFirstByte:0,firstByteToFCP:$.value,loadState:r(d())};if($.entries.length){var he=t(),Se=$.entries[$.entries.length-1];if(he){var ee=he.activationStart||0,Te=Math.max(0,he.responseStart-ee);_e={timeToFirstByte:Te,firstByteToFCP:$.value-Te,loadState:r($.entries[0].startTime),navigationEntry:he,fcpEntry:Se}}}return Object.assign($,{attribution:_e})})(se);A(ne)}),j)},onINP:function(A,j){e||(e=w("long-animation-frame",Et)),yt((function(se){var ne=(function($){var _e=$.entries[0],he=hr.get(_e),Se=_e.processingStart,ee=he.processingEnd,Te=he.entries.sort((function(pr,Gn){return pr.processingStart-Gn.processingStart})),Ue=_(_e.startTime,ee),ot=$.entries.find((function(pr){return pr.target})),Dt=ot&&ot.target||Rt.get(_e.interactionId),ar=[_e.startTime+_e.duration,ee].concat(Ue.map((function(pr){return pr.startTime+pr.duration}))),er=Math.max.apply(Math,ar),qr={interactionTarget:o(Dt),interactionTargetElement:Dt,interactionType:_e.name.startsWith("key")?"keyboard":"pointer",interactionTime:_e.startTime,nextPaintTime:er,processedEventEntries:Te,longAnimationFrameEntries:Ue,inputDelay:Se-_e.startTime,processingDuration:ee-Se,presentationDelay:Math.max(er-ee,0),loadState:r(_e.startTime)};return Object.assign($,{attribution:qr})})(se);A(ne)}),j)}};je.__PosthogExtensions__=je.__PosthogExtensions__||{},je.__PosthogExtensions__.postHogWebVitalsCallbacks=Xe,je.postHogWebVitalsCallbacks=Xe})();var x=typeof window<"u"?window:void 0,Gt=typeof globalThis<"u"?globalThis:x,Gl=Array.prototype,Ao=Gl.forEach,Oo=Gl.indexOf,Ut=Gt==null?void 0:Gt.navigator,re=Gt==null?void 0:Gt.document,jt=Gt==null?void 0:Gt.location,Rs=Gt==null?void 0:Gt.fetch,As=Gt!=null&&Gt.XMLHttpRequest&&"withCredentials"in new Gt.XMLHttpRequest?Gt.XMLHttpRequest:void 0,No=Gt==null?void 0:Gt.AbortController,Ht=Ut==null?void 0:Ut.userAgent,be=x??{},Sr={DEBUG:!1,LIB_VERSION:"1.268.1"};function Fo(n,e,t,r,s,o,l){try{var d=n[o](l),p=d.value}catch(g){return void t(g)}d.done?e(p):Promise.resolve(p).then(r,s)}function Lo(n){return function(){var e=this,t=arguments;return new Promise((function(r,s){var o=n.apply(e,t);function l(p){Fo(o,r,s,l,d,"next",p)}function d(p){Fo(o,r,s,l,d,"throw",p)}l(void 0)}))}}function Z(){return Z=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Z.apply(null,arguments)}function Wl(n,e){if(n==null)return{};var t={};for(var r in n)if({}.hasOwnProperty.call(n,r)){if(e.indexOf(r)!==-1)continue;t[r]=n[r]}return t}var Jc=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"];function Ne(n,e){return n.indexOf(e)!==-1}var Fi=function(n){return n.trim()},Os=function(n){return n.replace(/^\$/,"")},Qc=Array.isArray,Yl=Object.prototype,Vl=Yl.hasOwnProperty,Li=Yl.toString,ze=Qc||function(n){return Li.call(n)==="[object Array]"},Xt=n=>typeof n=="function",st=n=>n===Object(n)&&!ze(n),sn=n=>{if(st(n)){for(var e in n)if(Vl.call(n,e))return!1;return!0}return!1},V=n=>n===void 0,at=n=>Li.call(n)=="[object String]",Ns=n=>at(n)&&n.trim().length===0,Cr=n=>n===null,Be=n=>V(n)||Cr(n),Tt=n=>Li.call(n)=="[object Number]",sr=n=>Li.call(n)==="[object Boolean]",ed=n=>n instanceof FormData,td=n=>Ne(Jc,n);function Fs(n){return n===null||typeof n!="object"}function _i(n,e){return Object.prototype.toString.call(n)==="[object "+e+"]"}function Ul(n){return!V(Event)&&(function(e,t){try{return e instanceof t}catch{return!1}})(n,Event)}var rd=[!0,"true",1,"1","yes"],vs=n=>Ne(rd,n),nd=[!1,"false",0,"0","no"];function zt(n,e,t,r,s){return e>t&&(r.warn("min cannot be greater than max."),e=t),Tt(n)?n>t?(r.warn(" cannot be greater than max: "+t+". Using max value instead."),t):n<e?(r.warn(" cannot be less than min: "+e+". Using min value instead."),e):n:(r.warn(" must be a number. using max or fallback. max: "+t+", fallback: "+s),zt(s||t,e,t,r))}class zl{stop(){this.t&&(clearInterval(this.t),this.t=void 0)}constructor(e){this.i=e,this.o={},this.h=()=>
15{Object.keys(this.o).forEach((t=>{var r=this.m(t)+this.S;r>=this.k?delete this.o[t]:this.$(t,r)}))},this.m=t=>this.o[String(t)],this.$=(t,r)=>{this.o[String(t)]=r},this.consumeRateLimit=t=>{var r,s=(r=this.m(t))!=null?r:this.k;if((s=Math.max(s-1,0))===0)return!0;this.$(t,s);var o,l=s===0;return l&&((o=this.P)==null||o.call(this,t)),l},this.P=this.i.P,this.k=zt(this.i.bucketSize,0,100,this.i.I),this.S=zt(this.i.refillRate,0,this.k,this.i.I),this.R=zt(this.i.refillInterval,0,864e5,this.i.I),this.t=setInterval((()=>{this.h()}),this.R)}}var ai,Do,ms,id=n=>n instanceof Error;function sd(n){var e=globalThis._posthogChunkIds;if(e){var t=Object.keys(e);return ms&&t.length===Do||(Do=t.length,ms=t.reduce(((r,s)=>{ai||(ai={});var o=ai[s];if(o)r[o[0]]=o[1];else for(var l=n(s),d=l.length-1;d>=0;d--){var p=l[d],g=p==null?void 0:p.filename,v=e[s];if(g&&v){r[g]=v,ai[s]=[g,v];break}}return r}),{})),ms}}var cn="?";function Ls(n,e,t,r){var s={platform:"web:javascript",filename:n,function:e==="<anonymous>"?cn:e,in_app:!0};return V(t)||(s.lineno=t),V(r)||(s.colno=r),s}var ql=(n,e)=>{var t=n.indexOf("safari-extension")!==-1,r=n.indexOf("safari-web-extension")!==-1;return t||r?[n.indexOf("@")!==-1?n.split("@")[0]:cn,t?"safari-extension:"+e:"safari-web-extension:"+e]:[n,e]}
15,ad=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,od=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ld=/\((\S*)(?::(\d+))(?::(\d+))\)/,ud=n=>{var e=ad.exec(n);if(e){var[,t,r,s]=e;return Ls(t,cn,+r,+s)}var o=od.exec(n);if(o){if(o[2]&&o[2].indexOf("eval")===0){var l=ld.exec(o[2]);l&&(o[2]=l[1],o[3]=l[2],o[4]=l[3])}var[d,p]=ql(o[1]||cn,o[2]);return Ls(p,d,o[3]?+o[3]:void 0,o[4]?+o[4]:void 0)}},cd=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,dd=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,hd=n=>{var e=cd.exec(n);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){var t=dd.exec(e[3]);t&&(e[1]=e[1]||"eval",e[3]=t[1],e[4]=t[2],e[5]="")}var r=e[3],s=e[1]||cn;return[s,r]=ql(s,r),Ls(r,s,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},Po=/\(error: (.*)\)/,Bo=50;function pd(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return function(r){for(var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=[],l=r.split(` 16`),d=s;d<l.length;d++){var p=l[d];if(!(p.length>1024)){var g=Po.test(p)?p.replace(Po,"$1"):p;if(!g.match(/\S*Error: /)){for(var v of e){var w=v(g);if(w){o.push(w);break}}if(o.length>=Bo)break}}}return(function(b){if(!b.length)return[];var I=Array.from(b);return I.reverse(),I.slice(0,Bo).map((R=>{return Z({},R,{filename:R.filename||(M=I,M[M.length-1]||{}).filename,function:R.function||cn});var M}))})(o)}}class fd{buildFromUnknown(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t&&t.mechanism||{handled:!0,type:"generic"},s=this.buildCoercingContext(r,t,0).apply(e),o=this.buildParsingContext(),l=this.parseStacktrace(s,o);return{$exception_list:this.convertToExceptionList(l,r),$exception_level:"error"}}coerceFallback(e){var t;return{type:"Error",value:"Unknown error",stack:(t=e.syntheticException)==null?void 0:t.stack,synthetic:!0}}parseStacktrace(e,t){var r,s;return e.cause!=null&&(r=this.parseStacktrace(e.cause,t)),e.stack!=""&&e.stack!=null&&(s=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?1:0),t.chunkIdMap)),Z({},e,{cause:r,stack:s})}applyChunkIds(e,t){return e.map((r=>(r.filename&&t&&(r.chunk_id=t[r.filename]),r)))}applyCoercers(e,t){for(var r of this.coercers)if(r.match(e))return r.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var t=this;return Lo((function*(){var r=e;for(var s of t.modifiers)r=yield s(r);return r}))()}modifyFrames(e){var t=this;return Lo((function*(){var r;e.cause!=null&&(r=yield t.modifyFrames(e.cause));var s=[];return e.stack!=null&&(s=yield t.applyModifiers(e.stack)),Z({},e,{cause:r,stack:s})}))()}convertToExceptionList(e,t){var r,s,o,l={type:e.type,value:e.value,mechanism:{type:(r=t.type)!=null?r:"generic",handled:(s=t.handled)==null||s,synthetic:(o=e.synthetic)!=null&&o}};e.stack&&(l.stacktrace={type:"raw",frames:e.stack});var d=[l];return e.cause!=null&&d.push(...this.convertToExceptionList(e.cause,Z({},t,{handled:!0}))),d}buildParsingContext(){return{chunkIdMap:sd(this.stackParser)}}buildCoercingContext(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,s=(o,l)=>{if(l<=4){var d=this.buildCoercingContext(e,t,l);return this.applyCoercers(o,d)}};return Z({},t,{syntheticException:r==0?t.syntheticException:void 0,mechanism:e,apply:o=>s(o,r),next:o=>s(o,r+1)})}constructor(e,t,r){e===void 0&&(e=[]),t===void 0&&(t=[]),r===void 0&&(r=[]),this.coercers=e,this.modifiers=r,this.stackParser=pd(...t)}}class gd{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var r=at(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:r?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?t+": "+e.message:t}isDOMException(e){return _i(e,"DOMException")}isDOMError(e){return _i(e,"DOMError")}}class vd{match(e){return(t=>t instanceof Error)(e)}coerce(e,t){return{type:this.getType(e),value:this.getMessage(e,t),stack:this.getStack(e),cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,t){var r=e.message;return r.error&&typeof r.error.message=="string"?String(r.error.message):String(r)}getStack(e){return e.stacktrace||e.stack||void 0}}class md{match(e){return _i(e,"ErrorEvent")&&e.error!=null}coerce(e,t){var r,s=t.apply(e.error);return s||{type:"ErrorEvent",value:e.message,stack:(r=t.syntheticException)==null?void 0:r.stack,synthetic:!0}}constructor(){}}var _d=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class yd{match(e){return typeof e=="string"}coerce(e,t){var r,[s,o]=this.getInfos(e);return{type:s??"Error",value:o??e,stack:(r=t.syntheticException)==null?void 0:r.stack,synthetic:!0}}getInfos(e){var t="Error",r=e,s=e.match(_d);return s&&(t=s[1],r=s[2]),[t,r]}}var bd=["fatal","error","warning","log","info","debug"];function Zl(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:40,t=Object.keys(n);if(t.sort(),!t.length)return"[object has no keys]";for(var r=t.length;r>0;r--){var s=t.slice(0,r).join(", ");
16if(!(s.length>e))return r===t.length||s.length<=e?s:s.slice(0,e)+"..."}return""}class wd{match(e){return typeof e=="object"&&e!==null}coerce(e,t){var r,s=this.getErrorPropertyFromObject(e);return s?t.apply(s):{type:this.getType(e),value:this.getValue(e),stack:(r=t.syntheticException)==null?void 0:r.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return Ul(e)?e.constructor.name:"Error"}getValue(e){if("name"in e&&typeof e.name=="string"){var t="'"+e.name+"' captured as exception";return"message"in e&&typeof e.message=="string"&&(t+=" with message: '"+e.message+"'"),t}if("message"in e&&typeof e.message=="string")return e.message;var r=this.getObjectClassName(e);return(r&&r!=="Object"?"'"+r+"'":"Object")+" captured as exception with keys: "+Zl(e)}isSeverityLevel(e){return at(e)&&!Ns(e)&&bd.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var r=e[t];if(id(r))return r}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{return}}}class Sd{match(e){return Ul(e)}coerce(e,t){var r,s=e.constructor.name;return{type:s,value:s+" captured as exception with keys: "+Zl(e),stack:(r=t.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class Id{match(e){return Fs(e)}coerce(e,t){var r;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:(r=t.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class Cd{match(e){return _i(e,"PromiseRejectionEvent")}coerce(e,t){var r,s=this.getUnhandledRejectionReason(e);return Fs(s)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(s),stack:(r=t.syntheticException)==null?void 0:r.stack,synthetic:!0}:t.apply(s)}getUnhandledRejectionReason(e){if(Fs(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}}var Xl=n=>{var e={T:function(t){if(x&&(Sr.DEBUG||be.POSTHOG_DEBUG)&&!V(x.console)&&x.console){for(var r=("__rrweb_original__"in x.console[t])?x.console[t].__rrweb_original__:x.console[t],s=arguments.length,o=new Array(s>1?s-1:0),l=1;l<s;l++)o[l-1]=arguments[l];r(n,...o)}},info:function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];e.T("log",...r)},warn:function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];e.T("warn",...r)},error:function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];e.T("error",...r)},critical:function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];console.error(n,...r)},uninitializedWarning:t=>{e.error("You must initialize PostHog before calling "+t)},createLogger:t=>Xl(n+" "+t)};return e},Q=Xl("[PostHog.js]"),gt=Q.createLogger,kd=gt("[ExternalScriptsLoader]"),$o=(n,e,t)=>{if(n.config.disable_external_dependency_loading)return kd.warn(e+" was requested but loading of external scripts is disabled."),t("Loading of external scripts is disabled");var r=re==null?void 0:re.querySelectorAll("script");if(r){for(var s,o=function(){if(r[l].src===e){var p=r[l];return p.__posthog_loading_callback_fired?{v:t()}:(p.addEventListener("load",(g=>{p.__posthog_loading_callback_fired=!0,t(void 0,g)})),p.onerror=g=>t(g),{v:void 0})}},l=0;l<r.length;l++)if(s=o())return s.v}var d=()=>{if(!re)return t("document not found");var p=re.createElement("script");if(p.type="text/javascript",p.crossOrigin="anonymous",p.src=e,p.onload=w=>{p.__posthog_loading_callback_fired=!0,t(void 0,w)},p.onerror=w=>t(w),n.config.prepare_external_dependency_script&&(p=n.config.prepare_external_dependency_script(p)),!p)return t("prepare_external_dependency_script returned null");var g,v=re.querySelectorAll("body > script");v.length>0?(g=v[0].parentNode)==null||g.insertBefore(p,v[0]):re.body.appendChild(p)};re!=null&&re.body?d():re==null||re.addEventListener("DOMContentLoaded",d)};be.__PosthogExtensions__=be.__PosthogExtensions__||{},be.__PosthogExtensions__.loadExternalDependency=(n,e,t)=>{var r="/static/"+e+".js?v="+n.version;if(e==="remote-config"&&(r="/array/"+n.config.token+"/config.js"),e==="toolbar"){var s=3e5;r=r+"&t="+Math.floor(Date.now()/s)*s}var o=n.requestRouter.endpointFor("assets",r);$o(n,o,t)},be.__PosthogExtensions__.loadSiteApp=(n,e,t)=>{var r=n.requestRouter.endpointFor("api",e);$o(n,r,t)};var yi={};
16function Fr(n,e,t){if(ze(n)){if(Ao&&n.forEach===Ao)n.forEach(e,t);else if("length"in n&&n.length===+n.length){for(var r=0,s=n.length;r<s;r++)if(r in n&&e.call(t,n[r],r)===yi)return}}}function Ye(n,e,t){if(!Be(n)){if(ze(n))return Fr(n,e,t);if(ed(n)){for(var r of n.entries())if(e.call(t,r[1],r[0])===yi)return}else for(var s in n)if(Vl.call(n,s)&&e.call(t,n[s],s)===yi)return}}var lt=function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return Fr(t,(function(s){for(var o in s)s[o]!==void 0&&(n[o]=s[o])})),n},Di=function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return Fr(t,(function(s){Fr(s,(function(o){n.push(o)}))})),n};function gi(n){for(var e=Object.keys(n),t=e.length,r=new Array(t);t--;)r[t]=[e[t],n[e[t]]];return r}var Ho=function(n){try{return n()}catch{return}},Ed=function(n){return function(){try{for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.apply(this,t)}catch(s){Q.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),Q.critical(s)}}},la=function(n){var e={};return Ye(n,(function(t,r){(at(t)&&t.length>0||Tt(t))&&(e[r]=t)})),e};function xd(n,e){return t=n,r=o=>at(o)&&!Cr(e)?o.slice(0,e):o,s=new Set,(function o(l,d){return l!==Object(l)?r?r(l,d):l:s.has(l)?void 0:(s.add(l),ze(l)?(p=[],Fr(l,(g=>{p.push(o(g))}))):(p={},Ye(l,((g,v)=>{s.has(g)||(p[v]=o(g,v))}))),p);var p})(t);var t,r,s}var Td=["herokuapp.com","vercel.app","netlify.app"];function Md(n){var e=n==null?void 0:n.hostname;if(!at(e))return!1;var t=e.split(".").slice(-2).join(".");for(var r of Td)if(t===r)return!1;return!0}function Kl(n,e){for(var t=0;t<n.length;t++)if(e(n[t]))return n[t]}function et(n,e,t,r){var{capture:s=!1,passive:o=!0}=r??{};n==null||n.addEventListener(e,t,{capture:s,passive:o})}var Jl="$people_distinct_id",Tn="__alias",Mn="__timers",jo="$autocapture_disabled_server_side",Ds="$heatmaps_enabled_server_side",Go="$exception_capture_enabled_server_side",Ps="$error_tracking_suppression_rules",Wo="$error_tracking_capture_extension_exceptions",Yo="$web_vitals_enabled_server_side",Ql="$dead_clicks_enabled_server_side",Vo="$web_vitals_allowed_metrics",_s="$session_recording_remote_config",Bs="$session_recording_enabled_server_side",Uo="$console_log_recording_enabled_server_side",zo="$session_recording_network_payload_capture",qo="$session_recording_masking",Zo="$session_recording_canvas_recording",Xo="$replay_sample_rate",Ko="$replay_minimum_duration",Jo="$replay_script_config",bi="$sesid",an="$session_is_sampled",$s="$session_recording_url_trigger_activated_session",Hs="$session_recording_event_trigger_activated_session",on="$enabled_feature_flags",Rn="$early_access_features",js="$feature_flag_details",An="$stored_person_properties",Wr="$stored_group_properties",Gs="$surveys",oi="$surveys_activated",wi="$flag_call_reported",yr="$user_state",Ws="$client_session_props",Ys="$capture_rate_limit",Vs="$initial_campaign_params",Us="$initial_referrer_info",Si="$initial_person_info",Ii="$epp",eu="__POSTHOG_TOOLBAR__",wn="$posthog_cookieless",Rd=[Jl,Tn,"__cmpns",Mn,Bs,Ds,bi,on,Ps,yr,Rn,js,Wr,An,Gs,wi,Ws,Ys,Vs,Us,Ii,Si];function Qo(n){return n instanceof Element&&(n.id===eu||!(n.closest==null||!n.closest(".toolbar-global-fade-container")))}function Pi(n){return!!n&&n.nodeType===1}function Lr(n,e){return!!n&&!!n.tagName&&n.tagName.toLowerCase()===e.toLowerCase()}function tu(n){return!!n&&n.nodeType===3}function ru(n){return!!n&&n.nodeType===11}function ua(n){return n?Fi(n).split(/\s+/):[]}function el(n){var e=x==null?void 0:x.location.href;return!!(e&&n&&n.some((t=>e.match(t))))}function Ci(n){var e="";switch(typeof n.className){case"string":e=n.className;break;case"object":e=(n.className&&"baseVal"in n.className?n.className.baseVal:null)||n.getAttribute("class")||"";break;default:e=""}return ua(e)}function nu(n){return Be(n)?null:Fi(n).split(/(\s+)/).filter((e=>dn(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function Bi(n){var e="";return zs(n)&&!lu(n)&&n.childNodes&&n.childNodes.length&&Ye(n.childNodes,(function(t){var r;tu(t)&&t.textContent&&(e+=(r=nu(t.textContent))!==null&&r!==void 0?r:"")})),Fi(e)}function iu(n){return V(n.target)?n.srcElement||null:(e=n.target)!=null&&e.shadowRoot?n.composedPath()[0]||null:n.target||null;var e}var ca=["a","button","form","input","select","textarea","label"];function su(n,e){if(V(e))return!0;
16var t,r=function(o){if(e.some((l=>o.matches(l))))return{v:!0}};for(var s of n)if(t=r(s))return t.v;return!1}function au(n){var e=n.parentNode;return!(!e||!Pi(e))&&e}var tl=[".ph-no-rageclick",".ph-no-capture"],da=n=>!n||Lr(n,"html")||!Pi(n),ou=(n,e)=>{if(!x||da(n))return{parentIsUsefulElement:!1,targetElementList:[]};for(var t=!1,r=[n],s=n;s.parentNode&&!Lr(s,"body");)if(ru(s.parentNode))r.push(s.parentNode.host),s=s.parentNode.host;else{var o=au(s);if(!o)break;if(e||ca.indexOf(o.tagName.toLowerCase())>-1)t=!0;else{var l=x.getComputedStyle(o);l&&l.getPropertyValue("cursor")==="pointer"&&(t=!0)}r.push(o),s=o}return{parentIsUsefulElement:t,targetElementList:r}};function Ad(n,e,t,r,s){var o,l,d,p;if(t===void 0&&(t=void 0),!x||da(n)||(o=t)!=null&&o.url_allowlist&&!el(t.url_allowlist)||(l=t)!=null&&l.url_ignorelist&&el(t.url_ignorelist))return!1;if((d=t)!=null&&d.dom_event_allowlist){var g=t.dom_event_allowlist;if(g&&!g.some((R=>e.type===R)))return!1}var{parentIsUsefulElement:v,targetElementList:w}=ou(n,r);if(!(function(R,M){var H=M==null?void 0:M.element_allowlist;if(V(H))return!0;var X,q=function(pe){if(H.some((Ae=>pe.tagName.toLowerCase()===Ae)))return{v:!0}};for(var de of R)if(X=q(de))return X.v;return!1})(w,t)||!su(w,(p=t)==null?void 0:p.css_selector_allowlist))return!1;var b=x.getComputedStyle(n);if(b&&b.getPropertyValue("cursor")==="pointer"&&e.type==="click")return!0;var I=n.tagName.toLowerCase();switch(I){case"html":return!1;case"form":return(s||["submit"]).indexOf(e.type)>=0;case"input":case"select":case"textarea":return(s||["change","click"]).indexOf(e.type)>=0;default:return v?(s||["click"]).indexOf(e.type)>=0:(s||["click"]).indexOf(e.type)>=0&&(ca.indexOf(I)>-1||n.getAttribute("contenteditable")==="true")}}function zs(n){for(var e=n;e.parentNode&&!Lr(e,"body");e=e.parentNode){var t=Ci(e);if(Ne(t,"ph-sensitive")||Ne(t,"ph-no-capture"))return!1}if(Ne(Ci(n),"ph-include"))return!0;var r=n.type||"";if(at(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var s=n.name||n.id||"";return!(at(s)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(s.replace(/[^a-zA-Z0-9]/g,"")))}function lu(n){return!!(Lr(n,"input")&&!["button","checkbox","submit","reset"].includes(n.type)||Lr(n,"select")||Lr(n,"textarea")||n.getAttribute("contenteditable")==="true")}var uu="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",Od=new RegExp("^(?:"+uu+")$"),Nd=new RegExp(uu),cu="\\d{3}-?\\d{2}-?\\d{4}",Fd=new RegExp("^("+cu+")$"),Ld=new RegExp("("+cu+")");function dn(n,e){return e===void 0&&(e=!0),!(Be(n)||at(n)&&(n=Fi(n),(e?Od:Nd).test((n||"").replace(/[- ]/g,""))||(e?Fd:Ld).test(n)))}function du(n){var e=Bi(n);return dn(e=(e+" "+hu(n)).trim())?e:""}function hu(n){var e="";return n&&n.childNodes&&n.childNodes.length&&Ye(n.childNodes,(function(t){var r;if(t&&((r=t.tagName)==null?void 0:r.toLowerCase())==="span")try{var s=Bi(t);e=(e+" "+s).trim(),t.childNodes&&t.childNodes.length&&(e=(e+" "+hu(t)).trim())}catch(o){Q.error("[AutoCapture]",o)}})),e}function Dd(n){return(function(e){var t=e.map((r=>{var s,o,l="";if(r.tag_name&&(l+=r.tag_name),r.attr_class)for(var d of(r.attr_class.sort(),r.attr_class))l+="."+d.replace(/"/g,"");var p=Z({},r.text?{text:r.text}:{},{"nth-child":(s=r.nth_child)!==null&&s!==void 0?s:0,"nth-of-type":(o=r.nth_of_type)!==null&&o!==void 0?o:0},r.href?{href:r.href}:{},r.attr_id?{attr_id:r.attr_id}:{},r.attributes),g={};return gi(p).sort(((v,w)=>{var[b]=v,[I]=w;return b.localeCompare(I)})).forEach((v=>{var[w,b]=v;return g[rl(w.toString())]=rl(b.toString())})),l+=":",l+=gi(g).map((v=>{var[w,b]=v;return w+'="'+b+'"'})).join("")}));return t.join(";")})((function(e){return e.map((t=>{var r,s,o={text:(r=t.$el_text)==null?void 0:r.slice(0,400),tag_name:t.tag_name,href:(s=t.attr__href)==null?void 0:s.slice(0,2048),attr_class:Pd(t),attr_id:t.attr__id,nth_child:t.nth_child,nth_of_type:t.nth_of_type,attributes:{}};return gi(t).filter((l=>{var[d]=l;return d.indexOf("attr__")===0}
16)).forEach((l=>{var[d,p]=l;return o.attributes[d]=p})),o}))})(n))}function rl(n){return n.replace(/"|\\"/g,'\\"')}function Pd(n){var e=n.attr__class;return e?ze(e)?e:ua(e):void 0}class pu{constructor(){this.clicks=[]}isRageClick(e,t,r){var s=this.clicks[this.clicks.length-1];if(s&&Math.abs(e-s.x)+Math.abs(t-s.y)<30&&r-s.timestamp<1e3){if(this.clicks.push({x:e,y:t,timestamp:r}),this.clicks.length===3)return!0}else this.clicks=[{x:e,y:t,timestamp:r}];return!1}}var ys="$copy_autocapture",Ir=(function(n){return n.GZipJS="gzip-js",n.Base64="base64",n})({}),Bd=["localhost","127.0.0.1"],hn=n=>{var e=re==null?void 0:re.createElement("a");return V(e)?null:(e.href=n,e)},$d=function(n,e){var t,r;e===void 0&&(e="&");var s=[];return Ye(n,(function(o,l){V(o)||V(l)||l==="undefined"||(t=encodeURIComponent((d=>d instanceof File)(o)?o.name:o.toString()),r=encodeURIComponent(l),s[s.length]=r+"="+t)})),s.join(e)},ki=function(n,e){for(var t,r=((n.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),s=0;s<r.length;s++){var o=r[s].split("=");if(o[0]===e){t=o;break}}if(!ze(t)||t.length<2)return"";var l=t[1];try{l=decodeURIComponent(l)}catch{Q.error("Skipping decoding for malformed query param: "+l)}return l.replace(/\+/g," ")},ha=function(n,e,t){if(!n||!e||!e.length)return n;for(var r=n.split("#"),s=r[0]||"",o=r[1],l=s.split("?"),d=l[1],p=l[0],g=(d||"").split("&"),v=[],w=0;w<g.length;w++){var b=g[w].split("=");ze(b)&&(e.includes(b[0])?v.push(b[0]+"="+t):v.push(g[w]))}var I=p;return d!=null&&(I+="?"+v.join("&")),o!=null&&(I+="#"+o),I},Ei=function(n,e){var t=n.match(new RegExp(e+"=([^&]*)"));return t?t[1]:null},nl=gt("[AutoCapture]");function bs(n,e){return e.length>n?e.slice(0,n)+"...":e}function Hd(n){if(n.previousElementSibling)return n.previousElementSibling;var e=n;do e=e.previousSibling;while(e&&!Pi(e));return e}function jd(n,e,t,r){var s=n.tagName.toLowerCase(),o={tag_name:s};ca.indexOf(s)>-1&&!t&&(s.toLowerCase()==="a"||s.toLowerCase()==="button"?o.$el_text=bs(1024,du(n)):o.$el_text=bs(1024,Bi(n)));var l=Ci(n);l.length>0&&(o.classes=l.filter((function(v){return v!==""}))),Ye(n.attributes,(function(v){var w;if((!lu(n)||["name","id","class","aria-label"].indexOf(v.name)!==-1)&&(r==null||!r.includes(v.name))&&!e&&dn(v.value)&&(w=v.name,!at(w)||w.substring(0,10)!=="_ngcontent"&&w.substring(0,7)!=="_nghost")){var b=v.value;v.name==="class"&&(b=ua(b).join(" ")),o["attr__"+v.name]=bs(1024,b)}}));for(var d=1,p=1,g=n;g=Hd(g);)d++,g.tagName===n.tagName&&p++;return o.nth_child=d,o.nth_of_type=p,o}function Gd(n,e){for(var t,r,{e:s,maskAllElementAttributes:o,maskAllText:l,elementAttributeIgnoreList:d,elementsC
16hainAsString:p}=e,g=[n],v=n;v.parentNode&&!Lr(v,"body");)ru(v.parentNode)?(g.push(v.parentNode.host),v=v.parentNode.host):(g.push(v.parentNode),v=v.parentNode);var w,b=[],I={},R=!1,M=!1;if(Ye(g,(pe=>{var Ae=zs(pe);pe.tagName.toLowerCase()==="a"&&(R=pe.getAttribute("href"),R=Ae&&R&&dn(R)&&R),Ne(Ci(pe),"ph-no-capture")&&(M=!0),b.push(jd(pe,o,l,d));var He=(function(Ze){if(!zs(Ze))return{};var Ee={};return Ye(Ze.attributes,(function(vt){if(vt.name&&vt.name.indexOf("data-ph-capture-attribute")===0){var tt=vt.name.replace("data-ph-capture-attribute-",""),Ve=vt.value;tt&&Ve&&dn(Ve)&&(Ee[tt]=Ve)}})),Ee})(pe);lt(I,He)})),M)return{props:{},explicitNoCapture:M};if(l||(n.tagName.toLowerCase()==="a"||n.tagName.toLowerCase()==="button"?b[0].$el_text=du(n):b[0].$el_text=Bi(n)),R){var H,X;b[0].attr__href=R;var q=(H=hn(R))==null?void 0:H.host,de=x==null||(X=x.location)==null?void 0:X.host;q&&de&&q!==de&&(w=R)}return{props:lt({$event_type:s.type,$ce_version:1},p?{}:{$elements:b},{$elements_chain:Dd(b)},(t=b[0])!=null&&t.$el_text?{$el_text:(r=b[0])==null?void 0:r.$el_text}:{},w&&s.type==="click"?{$external_click_url:w}:{},I)}}class Wd{constructor(e){this.C=!1,this.M=null,this.rageclicks=new pu,this.O=!1,this.instance=e,this.F=null}get A(){var e,t,r=st(this.instance.config.autocapture)?this.instance.config.autocapture:{};return r.url_allowlist=(e=r.url_allowlist)==null?void 0:e.map((s=>new RegExp(s))),r.url_ignorelist=(t=r.url_ignorelist)==null?void 0:t.map((s=>new RegExp(s))),r}D(){if(this.isBrowserSupported()){if(x&&re){var e=r=>{r=r||(x==null?void 0:x.event);try{this.j(r)}catch(s){nl.error("Failed to capture event",s)}};if(et(re,"submit",e,{capture:!0}),et(re,"change",e,{capture:!0}),et(re,"click",e,{capture:!0}),this.A.capture_copied_text){var t=r=>{r=r||(x==null?void 0:x.event),this.j(r,ys)};et(re,"copy",t,{capture:!0}),et(re,"cut",t,{capture:!0})}}}else nl.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.C&&(this.D(),this.C=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.O=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[jo]:!!e.autocapture_opt_out}),this.M=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.F=e}getElementSelectors(e){var t,r=[];return(t=this.F)==null||t.forEach((s=>{var o=re==null?void 0:re.querySelectorAll(s);o==null||o.forEach((l=>{e===l&&r.push(s)}))})),r}get isEnabled(){var e,t,r=(e=this.instance.persistence)==null?void 0:e.props[jo],s=this.M;if(Cr(s)&&!sr(r)&&!this.instance.L())return!1;var o=(t=this.M)!==null&&t!==void 0?t:!!r;return!!this.instance.config.autocapture&&!o}j(e,t){if(t===void 0&&(t="$autocapture"),this.isEnabled){var r,s=iu(e);tu(s)&&(s=s.parentNode||null),t==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&this.instance.config.rageclick&&(r=this.rageclicks)!=null&&r.isRageClick(e.clientX,e.clientY,new Date().getTime())&&(function(b,I){if(!x||da(b))return!1;var R,M;if((R=sr(I)?!!I&&tl:(M=I==null?void 0:I.css_selector_ignorelist)!==null&&M!==void 0?M:tl)===!1)return!1;var{targetElementList:H}=ou(b,!1);return!su(H,R)})(s,this.instance.config.rageclick)&&this.j(e,"$rageclick");var o=t===ys;if(s&&Ad(s,e,this.A,o,o?["copy","cut"]:void 0)){var{props:l,explicitNoCapture:d}=Gd(s,{e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.A.element_attribute_ignorelist,elementsChainAsString:this.O});if(d)return!1;var p=this.getElementSelectors(s);if(p&&p.length>0&&(l.$element_selectors=p),t===ys){var g,v=nu(x==null||(g=x.getSelection())==null?void 0:g.toString()),w=e.type||"clipboard";if(!v)return!1;l.$selected_content=v,l.$copy_type=w}return this.instance.capture(t,l),!0}}}isBrowserSupported(){return Xt(re==null?void 0:re.querySelectorAll)}}Math.trunc||(Math.trunc=function(n){return n<0?Math.ceil(n):Math.floor(n)}),Number.isInteger||(Number.isInteger=function(n){return Tt(n)&&isFinite(n)&&Math.floor(n)===n});var il="0123456789abcdef";class xi{constructor(e){if(this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,t,r,s){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(r)||!Number.isInteger(s)||e<0||t<0||r<0||s<0||e>0xffffffffffff||t>4095||r>1073741823||s>4294967295)throw new RangeError("invalid field value");var o=new Uint8Array(16);return o[0]=e/Math.pow(2,40),o[1]=e/Math.pow(2,32),o[2]=e/Math.pow(2,24),o[3]=e/Math.pow(2,16),o[4]=e/Math.pow(2,8),o[5]=e,o[6]=112|t>>>8,o[7]=t,o[8]=128|r>>>24,o[9]=r>>>16,o[10]=r>>>8,o[11]=r,o[12]=s>>>24,o[13]=s>>>16,o[14]=s>>>8,o[15]=s,new xi(o)}toString(){for(var e="",t=0;t<this.bytes.length;t++)e=e+il.charAt(this.bytes[t]>>>4)+il.charAt(15&this.bytes[t]),t!==3&&t!==5&&t!==7&&t!==9||(e+="-");if(e.length!==36)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new xi(this.bytes.slice(0))}equals(e){return this.compareTo(e)===0}compareTo(e){for(var t=0;t<16;t++){var r=this.bytes[t]-e.bytes[t];if(r!==0)return Math.sign(r)}return 0}}
vendor: 4,302 bytes, line 16
16class Yd{constructor(){this.N=0,this.U=0,this.q=new Vd}generate(){var e=this.generateOrAbort();if(V(e)){this.N=0;var t=this.generateOrAbort();if(V(t))throw new Error("Could not generate UUID after timestamp reset");return t}return e}generateOrAbort(){var e=Date.now();if(e>this.N)this.N=e,this.B();else{if(!(e+1e4>this.N))return;this.U++,this.U>4398046511103&&(this.N++,this.B())}return xi.fromFieldsV7(this.N,Math.trunc(this.U/Math.pow(2,30)),this.U&Math.pow(2,30)-1,this.q.nextUint32())}B(){this.U=1024*this.q.nextUint32()+(1023&this.q.nextUint32())}}var sl,fu=n=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var e=0;e<n.length;e++)n[e]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return n};x&&!V(x.crypto)&&crypto.getRandomValues&&(fu=n=>crypto.getRandomValues(n));class Vd{constructor(){this.H=new Uint32Array(8),this.W=1/0}nextUint32(){return this.W>=this.H.length&&(fu(this.H),this.W=0),this.H[this.W++]}}var Nr=()=>Ud().toString(),Ud=()=>(sl||(sl=new Yd)).generate(),Sn="",zd=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;function qd(n,e){if(e){var t=(function(s,o){if(o===void 0&&(o=re),Sn)return Sn;if(!o||["localhost","127.0.0.1"].includes(s))return"";for(var l=s.split("."),d=Math.min(l.length,8),p="dmn_chk_"+Nr();!Sn&&d--;){var g=l.slice(d).join("."),v=p+"=1;domain=."+g+";path=/";o.cookie=v+";max-age=3",o.cookie.includes(p)&&(o.cookie=v+";max-age=0",Sn=g)}return Sn})(n);if(!t){var r=(s=>{var o=s.match(zd);return o?o[0]:""})(n);r!==t&&Q.info("Warning: cookie subdomain discovery mismatch",r,t),t=r}return t?"; domain=."+t:""}return""}var ur={G:()=>!!re,V:function(n){Q.error("cookieStore error: "+n)},J:function(n){if(re){try{for(var e=n+"=",t=re.cookie.split(";").filter((o=>o.length)),r=0;r<t.length;r++){for(var s=t[r];s.charAt(0)==" ";)s=s.substring(1,s.length);if(s.indexOf(e)===0)return decodeURIComponent(s.substring(e.length,s.length))}}catch{}return null}},K:function(n){var e;try{e=JSON.parse(ur.J(n))||{}}catch{}return e},Y:function(n,e,t,r,s){if(re)try{var o="",l="",d=qd(re.location.hostname,r);if(t){var p=new Date;p.setTime(p.getTime()+24*t*60*60*1e3),o="; expires="+p.toUTCString()}s&&(l="; secure");var g=n+"="+encodeURIComponent(JSON.stringify(e))+o+"; SameSite=Lax; path=/"+d+l;return g.length>3686.4&&Q.warn("cookieStore warning: large cookie, len="+g.length),re.cookie=g,g}catch{return}},X:function(n,e){if(re!=null&&re.cookie)try{ur.Y(n,"",-1,e)}catch{return}}},ws=null,ft={G:function(){if(!Cr(ws))return ws;var n=!0;if(V(x))n=!1;else try{var e="__mplssupport__";ft.Y(e,"xyz"),ft.J(e)!=='"xyz"'&&(n=!1),ft.X(e)}catch{n=!1}return n||Q.error("localStorage unsupported; falling back to cookie store"),ws=n,n},V:function(n){Q.error("localStorage error: "+n)},J:function(n){try{return x==null?void 0:x.localStorage.getItem(n)}catch(e){ft.V(e)}return null},K:function(n){try{return JSON.parse(ft.J(n))||{}}catch{}return null},Y:function(n,e){try{x==null||x.localStorage.setItem(n,JSON.stringify(e))}catch(t){ft.V(t)}},X:function(n){try{x==null||x.localStorage.removeItem(n)}catch(e){ft.V(e)}}},Zd=["distinct_id",bi,an,Ii,Si],li=Z({},ft,{K:function(n){try{var e={};try{e=ur.K(n)||{}}catch{}var t=lt(e,JSON.parse(ft.J(n)||"{}"));return ft.Y(n,t),t}catch{}return null},Y:function(n,e,t,r,s,o){try{ft.Y(n,e,void 0,void 0,o);var l={};Zd.forEach((d=>{e[d]&&(l[d]=e[d])})),Object.keys(l).length&&ur.Y(n,l,t,r,s,o)}catch(d){ft.V(d)}},X:function(n,e){try{x==null||x.localStorage.removeItem(n),ur.X(n,e)}catch(t){ft.V(t)}}}),ui={},Xd={G:function(){return!0},V:function(n){Q.error("memoryStorage error: "+n)},J:function(n){return ui[n]||null},K:function(n){return ui[n]||null},Y:function(n,e){ui[n]=e},X:function(n){delete ui[n]}},$r=null,It={G:function(){if(!Cr($r))return $r;if($r=!0,V(x))$r=!1;else try{var n="__support__";It.Y(n,"xyz"),It.J(n)!=='"xyz"'&&($r=!1),It.X(n)}catch{$r=!1}return $r},V:function(n){Q.error("sessionStorage error: ",n)},J:function(n){try{return x==null?void 0:x.sessionStorage.getItem(n)}catch(e){It.V(e)}return null},K:function(n){try{return JSON.parse(It.J(n))||null}catch{}return null},Y:function(n,e){try{x==null||x.sessionStorage.setItem(n,JSON.stringify(e))}catch(t){It.V(t)}},X:function(n){try{x==null||x.sessionStorage.removeItem(n)}catch(e){It.V(e)}}}
16,br=(function(n){return n[n.PENDING=-1]="PENDING",n[n.DENIED=0]="DENIED",n[n.GRANTED=1]="GRANTED",n})({});class Kd{constructor(e){this._instance=e}get A(){return this._instance.config}get consent(){return this.Z()?br.DENIED:this.tt}isOptedOut(){return this.A.cookieless_mode==="always"||this.consent===br.DENIED||this.consent===br.PENDING&&(this.A.opt_out_capturing_by_default||this.A.cookieless_mode==="on_reject")}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===br.DENIED}optInOut(e){this.it.Y(this.et,e?1:0,this.A.cookie_expiration,this.A.cross_subdomain_cookie,this.A.secure_cookie)}reset(){this.it.X(this.et,this.A.cross_subdomain_cookie)}get et(){var{token:e,opt_out_capturing_cookie_prefix:t,consent_persistence_name:r}=this._instance.config;return r||(t?t+e:"__ph_opt_in_out_"+e)}get tt(){var e=this.it.J(this.et);return vs(e)?br.GRANTED:Ne(nd,e)?br.DENIED:br.PENDING}get it(){if(!this.rt){var e=this.A.opt_out_capturing_persistence_type;this.rt=e==="localStorage"?ft:ur;var t=e==="localStorage"?ur:ft;t.J(this.et)&&(this.rt.J(this.et)||this.optInOut(vs(t.J(this.et))),t.X(this.et,this.A.cross_subdomain_cookie))}return this.rt}Z(){return!!this.A.respect_dnt&&!!Kl([Ut==null?void 0:Ut.doNotTrack,Ut==null?void 0:Ut.msDoNotTrack,be.doNotTrack],(e=>vs(e)))}}var ci=gt("[Dead Clicks]"),Jd=()=>!0,Qd=n=>{var e,t=!((e=n.instance.persistence)==null||!e.get_property(Ql)),r=n.instance.config.capture_dead_clicks;return sr(r)?r:t};class gu{get lazyLoadedDeadClicksAutocapture(){return this.st}constructor(e,t,r){this.instance=e,this.isEnabled=t,this.onCapture=r,this.startIfEnabled()}onRemoteConfig(e){this.instance.persistence&&this.instance.persistence.register({[Ql]:e==null?void 0:e.captureDeadClicks}),this.startIfEnabled()}startIfEnabled(){this.isEnabled(this)&&this.nt((()=>{this.ot()}))}nt(e){var t,r;(t=be.__PosthogExtensions__)!=null&&t.initDeadClicksAutocapture&&e(),(r=be.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this.instance,"dead-clicks-autocapture",(s=>{s?ci.error("failed to load script",s):e()}))}ot(){var e;if(re){if(!this.st&&(e=be.__PosthogExtensions__)!=null&&e.initDeadClicksAutocapture){var t=st(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};t.__onCapture=this.onCapture,this.st=be.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this.st.start(re),ci.info("starting...")}}else ci.error("`document` not found. Cannot start.")}stop(){this.st&&(this.st.stop(),this.st=void 0,ci.info("stopping..."))}}var In=gt("[ExceptionAutocapture]");class eh{constructor(e){var t,r,s;this.lt=()=>{var o;if(x&&this.isEnabled&&(o=be.__PosthogExtensions__)!=null&&o.errorWrappingFunctions){var l=be.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,d=be.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,p=be.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.ut&&this.A.capture_unhandled_errors&&(this.ut=l(this.captureException.bind(this))),!this.ht&&this.A.capture_unhandled_rejections&&(this.ht=d(this.captureException.bind(this))),!this.dt&&this.A.capture_console_errors&&(this.dt=p(this.captureException.bind(this)))}catch(g){In.error("failed to start",g),this.vt()}}},this._instance=e,this.ct=!((t=this._instance.persistence)==null||!t.props[Go]),this.A=this.ft(),this.gt=new zl({refillRate:(r=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&r!==void 0?r:1,bucketSize:(s=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&s!==void 0?s:10,refillInterval:1e4,I:In}),this.startIfEnabled()}ft(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return st(e)?t=Z({},t,e):(V(e)?this.ct:e)&&(t=Z({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.A.capture_console_errors||this.A.capture_unhandled_errors||this.A.capture_unhandled_rejections}startIfEnabled(){this.isEnabled&&(In.info("enabled"),this.nt(this.lt))}nt(e){var t,r;(t=be.__PosthogExtensions__)!=null&&t.errorWrappingFunctions&&e(
16),(r=be.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"exception-autocapture",(s=>{if(s)return In.error("failed to load script",s);e()}))}vt(){var e,t,r;(e=this.ut)==null||e.call(this),this.ut=void 0,(t=this.ht)==null||t.call(this),this.ht=void 0,(r=this.dt)==null||r.call(this),this.dt=void 0}onRemoteConfig(e){var t=e.autocaptureExceptions;this.ct=!!t||!1,this.A=this.ft(),this._instance.persistence&&this._instance.persistence.register({[Go]:this.ct}),this.startIfEnabled()}captureException(e){var t,r,s=(t=e==null||(r=e.$exception_list)==null||(r=r[0])==null?void 0:r.type)!==null&&t!==void 0?t:"Exception";this.gt.consumeRateLimit(s)?In.info("Skipping exception capture because of client rate limiting.",{exception:s}):this._instance.exceptions.sendExceptionEvent(e)}}function al(n,e,t){try{if(!(e in n))return()=>{};var r=n[e],s=t(r);return Xt(s)&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__posthog_wrapped__:{enumerable:!1,value:!0}})),n[e]=s,()=>{n[e]=r}}catch{return()=>{}}}class th{constructor(e){var t;this._instance=e,this._t=(x==null||(t=x.location)==null?void 0:t.pathname)||""}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(Q.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.yt&&this.yt(),this.yt=void 0,Q.info("History API monitoring stopped")}monitorHistoryChanges(){var e,t;if(x&&x.history){var r=this;(e=x.history.pushState)!=null&&e.__posthog_wrapped__||al(x.history,"pushState",(s=>function(o,l,d){s.call(this,o,l,d),r.bt("pushState")})),(t=x.history.replaceState)!=null&&t.__posthog_wrapped__||al(x.history,"replaceState",(s=>function(o,l,d){s.call(this,o,l,d),r.bt("replaceState")})),this.wt()}}bt(e){try{var t,r=x==null||(t=x.location)==null?void 0:t.pathname;if(!r)return;r!==this._t&&this.isEnabled&&this._instance.capture("$pageview",{navigation_type:e}),this._t=r}catch(s){Q.error("Error capturing "+e+" pageview",s)}}wt(){if(!this.yt){var e=()=>{this.bt("popstate")};et(x,"popstate",e),this.yt=()=>{x&&x.removeEventListener("popstate",e)}}}}function Ti(n){var e,t;return((e=JSON.stringify(n,(t=[],function(r,s){if(st(s)){for(;t.length>0&&t[t.length-1]!==this;)t.pop();return t.includes(s)?"[Circular]":(t.push(s),s)}return s})))==null?void 0:e.length)||0}function qs(n,e){if(e===void 0&&(e=66060288e-1),n.size>=e&&n.data.length>1){var t=Math.floor(n.data.length/2),r=n.data.slice(0,t),s=n.data.slice(t);return[qs({size:Ti(r),data:r,sessionId:n.sessionId,windowId:n.windowId}),qs({size:Ti(s),data:s,sessionId:n.sessionId,windowId:n.windowId})].flatMap((o=>o))}return[n]}var wr=(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))(wr||{}),ir=(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))(ir||{}),Zs="[SessionRecording]",Xs="redacted",di={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:n=>n,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io",".clarity.ms","analytics.google.com","bam.nr-data.net"]},rh=["authorization","x-forwarded-for","authorization","cookie","set-cookie","x-api-key","x-real-ip","remote-addr","forwarded","proxy-authorization","x-csrf-token","x-csrftoken","x-xsrf-token"],nh=["password","secret","passwd","api_key","apikey","auth","credentials","mysql_pwd","privatekey","private_key","token"],ih=["/s/","/e/","/i/"];function ol(n,e,t,r){if(Be(n))return n;var s=(e==null?void 0:e["content-length"])||(function(o){return new Blob([o]).size})(n);return at(s)&&(s=parseInt(s)),s>t?Zs+" "+r+" body too large to record ("+s+" bytes)":n}function ll(n,e){if(Be(n))return n;var t=n;return dn(t,!1)||(t=Zs+" "+e+" body "+Xs),Ye(nh,(r=>{var s,o;(s=t)!=null&&s.length&&((o=t)==null?void 0:o.indexOf(r))!==-1&&(t=Zs+" "+e+" body "+Xs+" as might contain: "+r)})),t}var sh=(n,e)=>{var t,r,s,o={payloadSizeLimitBytes:di.payloadSizeLimitBytes,performanceEntryTypeToObserve:[...di.performanceEntryTypeToObserve],payloadHostDenyList:[...e.payloadHostDenyList||[],...di.payloadHostDenyList]},l=n.session_recording.recordHeaders!==!1&&e.recordHeaders,d=n.session_recording.recordBody!==!1&&e.recordBody,p=n.capture_performance!==!1&&e.recordPerformance,g=(t=o,s=Math.min(1e6,(r=t.payloadSizeLimitBytes)!==null&&r!==void 0?r:1e6),b=>(b!=null&&b.requestBody&&(b.requestBody=ol(b.requestBody,b.requestHeaders,s,"Request")),b!=null&&b.responseBody&&(b.responseBody=ol(b.responseBody,b.responseHeaders,s,"Response")),b)),v=b=>{return g(((M,H)=>{var X,q=hn(M.name),de=H.indexOf("http")===0?(X=hn(H))==null?void 0:X.pathname:H;de==="/"&&(de="");var pe=q==null?void 0:q.pathname.replace(de||"","");if(!(q&&pe&&ih.some((Ae=>pe.indexOf(Ae)===0))))return M})((R=(I=b).requestHeaders,Be(R)||Ye(Object.keys(R??{}),(M=>{rh.includes(M.toLowerCase())&&(R[M]=Xs)})),I),n.api_host));var I,R}
16,w=Xt(n.session_recording.maskNetworkRequestFn);return w&&Xt(n.session_recording.maskCapturedNetworkRequestFn)&&Q.warn("Both `maskNetworkRequestFn` and `maskCapturedNetworkRequestFn` are defined. `maskNetworkRequestFn` will be ignored."),w&&(n.session_recording.maskCapturedNetworkRequestFn=b=>{var I=n.session_recording.maskNetworkRequestFn({url:b.name});return Z({},b,{name:I==null?void 0:I.url})}),o.maskRequestFn=Xt(n.session_recording.maskCapturedNetworkRequestFn)?b=>{var I,R=v(b);return R&&(I=n.session_recording.maskCapturedNetworkRequestFn==null?void 0:n.session_recording.maskCapturedNetworkRequestFn(R))!==null&&I!==void 0?I:void 0}:b=>(function(I){if(!V(I))return I.requestBody=ll(I.requestBody,"Request"),I.responseBody=ll(I.responseBody,"Response"),I})(v(b)),Z({},di,o,{recordHeaders:l,recordBody:d,recordPerformance:p,recordInitialRequests:p})};class ah{constructor(e,t){var r,s;t===void 0&&(t={}),this.St={},this.kt=o=>{if(!this.St[o]){var l,d;this.St[o]=!0;var p=this.$t(o);(l=(d=this.i).onBlockedNode)==null||l.call(d,o,p)}},this.xt=o=>{var l=this.$t(o);if((l==null?void 0:l.nodeName)!=="svg"&&l instanceof Element){var d=l.closest("svg");if(d)return[this._rrweb.mirror.getId(d),d]}return[o,l]},this.$t=o=>this._rrweb.mirror.getNode(o),this.Et=o=>{var l,d,p,g,v,w,b,I;return((l=(d=o.removes)==null?void 0:d.length)!==null&&l!==void 0?l:0)+((p=(g=o.attributes)==null?void 0:g.length)!==null&&p!==void 0?p:0)+((v=(w=o.texts)==null?void 0:w.length)!==null&&v!==void 0?v:0)+((b=(I=o.adds)==null?void 0:I.length)!==null&&b!==void 0?b:0)},this.throttleMutations=o=>{if(o.type!==3||o.data.source!==0)return o;var l=o.data,d=this.Et(l);l.attributes&&(l.attributes=l.attributes.filter((g=>{var[v]=this.xt(g.id);return!this.gt.consumeRateLimit(v)&&g})));var p=this.Et(l);return p!==0||d===p?o:void 0},this._rrweb=e,this.i=t,this.gt=new zl({bucketSize:(r=this.i.bucketSize)!==null&&r!==void 0?r:100,refillRate:(s=this.i.refillRate)!==null&&s!==void 0?s:10,refillInterval:1e3,P:this.kt,I:Q})}}var Kt=Uint8Array,Wt=Uint16Array,pn=Uint32Array,pa=new Kt([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]),fa=new Kt([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]),ul=new Kt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),vu=function(n,e){for(var t=new Wt(31),r=0;r<31;++r)t[r]=e+=1<<n[r-1];var s=new pn(t[30]);for(r=1;r<30;++r)for(var o=t[r];o<t[r+1];++o)s[o]=o-t[r]<<5|r;return[t,s]},mu=vu(pa,2),oh=mu[0],Ks=mu[1];oh[28]=258,Ks[258]=28;for(var cl=vu(fa,0)[1],_u=new Wt(32768),qe=0;qe<32768;++qe){var Hr=(43690&qe)>>>1|(21845&qe)<<1;Hr=(61680&(Hr=(52428&Hr)>>>2|(13107&Hr)<<2))>>>4|(3855&Hr)<<4,_u[qe]=((65280&Hr)>>>8|(255&Hr)<<8)>>>1}var Dn=function(n,e,t){for(var r=n.length,s=0,o=new Wt(e);s<r;++s)++o[n[s]-1];var l,d=new Wt(e);for(s=0;s<e;++s)d[s]=d[s-1]+o[s-1]<<1;for(l=new Wt(r),s=0;s<r;++s)l[s]=_u[d[n[s]-1]++]>>>15-n[s];return l},Vr=new Kt(288);for(qe=0;qe<144;++qe)Vr[qe]=8;for(qe=144;qe<256;++qe)Vr[qe]=9;for(qe=256;qe<280;++qe)Vr[qe]=7;for(qe=280;qe<288;++qe)Vr[qe]=8;var Mi=new Kt(32);for(qe=0;qe<32;++qe)Mi[qe]=5;var lh=Dn(Vr,9),uh=Dn(Mi,5),yu=function(n){return(n/8>>0)+(7&n&&1)},bu=function(n,e,t){(t==null||t>n.length)&&(t=n.length);var r=new(n instanceof Wt?Wt:n instanceof pn?pn:Kt)(t-e);return r.set(n.subarray(e,t)),r},_r=function(n,e,t){t<<=7&e;var r=e/8>>0;n[r]|=t,n[r+1]|=t>>>8},Cn=function(n,e,t){t<<=7&e;var r=e/8>>0;n[r]|=t,n[r+1]|=t>>>8,n[r+2]|=t>>>16},Ss=function(n,e){for(var t=[],r=0;r<n.length;++r)n[r]&&t.push({s:r,f:n[r]});var s=t.length,o=t.slice();if(!s)return[new Kt(0),0];if(s==1){var l=new Kt(t[0].s+1);return l[t[0].s]=1,[l,1]}t.sort((function(Ae,He){return Ae.f-He.f})),t.push({s:-1,f:25001});var d=t[0],p=t[1],g=0,v=1,w=2;for(t[0]={s:-1,f:d.f+p.f,l:d,r:p};v!=s-1;)d=t[t[g].f<t[w].f?g++:w++],p=t[g!=v&&t[g].f<t[w].f?g++:w++],t[v++]={s:-1,f:d.f+p.f,l:d,r:p};var b=o[0].s;for(r=1;r<s;++r)o[r].s>b&&(b=o[r].s);var I=new Wt(b+1),R=Js(t[v-1],I,0);if(R>e){r=0;var M=0,H=R-e,X=1<<H;for(o.sort((function(Ae,He){return I[He.s]-I[Ae.s]||Ae.f-He.f}));r<s;++r){var q=o[r].s;if(!(I[q]>e))break;M+=X-(1<<R-I[q]),I[q]=e}for(M>>>=H;M>0;){var de=o[r].s;I[de]<e?M-=1<<e-I[de]++-1:++r}for(;r>=0&&M;--r){var pe=o[r].s;I[pe]==e&&(--I[pe],++M)}R=e}
vendor: 4,437 bytes, line 16
16return[new Kt(I),R]},Js=function(n,e,t){return n.s==-1?Math.max(Js(n.l,e,t+1),Js(n.r,e,t+1)):e[n.s]=t},dl=function(n){for(var e=n.length;e&&!n[--e];);for(var t=new Wt(++e),r=0,s=n[0],o=1,l=function(p){t[r++]=p},d=1;d<=e;++d)if(n[d]==s&&d!=e)++o;else{if(!s&&o>2){for(;o>138;o-=138)l(32754);o>2&&(l(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(l(s),--o;o>6;o-=6)l(8304);o>2&&(l(o-3<<5|8208),o=0)}for(;o--;)l(s);o=1,s=n[d]}return[t.subarray(0,r),e]},kn=function(n,e){for(var t=0,r=0;r<e.length;++r)t+=n[r]*e[r];return t},Qs=function(n,e,t){var r=t.length,s=yu(e+2);n[s]=255&r,n[s+1]=r>>>8,n[s+2]=255^n[s],n[s+3]=255^n[s+1];for(var o=0;o<r;++o)n[s+o+4]=t[o];return 8*(s+4+r)},hl=function(n,e,t,r,s,o,l,d,p,g,v){_r(e,v++,t),++s[256];for(var w=Ss(s,15),b=w[0],I=w[1],R=Ss(o,15),M=R[0],H=R[1],X=dl(b),q=X[0],de=X[1],pe=dl(M),Ae=pe[0],He=pe[1],Ze=new Wt(19),Ee=0;Ee<q.length;++Ee)Ze[31&q[Ee]]++;for(Ee=0;Ee<Ae.length;++Ee)Ze[31&Ae[Ee]]++;for(var vt=Ss(Ze,7),tt=vt[0],Ve=vt[1],Ke=19;Ke>4&&!tt[ul[Ke-1]];--Ke);var wt,mt,Ct,rt,_t=g+5<<3,Lt=kn(s,Vr)+kn(o,Mi)+l,ut=kn(s,b)+kn(o,M)+l+14+3*Ke+kn(Ze,tt)+(2*Ze[16]+3*Ze[17]+7*Ze[18]);if(_t<=Lt&&_t<=ut)return Qs(e,v,n.subarray(p,p+g));if(_r(e,v,1+(ut<Lt)),v+=2,ut<Lt){wt=Dn(b,I),mt=b,Ct=Dn(M,H),rt=M;var dt=Dn(tt,Ve);for(_r(e,v,de-257),_r(e,v+5,He-1),_r(e,v+10,Ke-4),v+=14,Ee=0;Ee<Ke;++Ee)_r(e,v+3*Ee,tt[ul[Ee]]);v+=3*Ke;for(var kt=[q,Ae],nt=0;nt<2;++nt){var yt=kt[nt];for(Ee=0;Ee<yt.length;++Ee){var Ge=31&yt[Ee];_r(e,v,dt[Ge]),v+=tt[Ge],Ge>15&&(_r(e,v,yt[Ee]>>>5&127),v+=yt[Ee]>>>12)}}}else wt=lh,mt=Vr,Ct=uh,rt=Mi;for(Ee=0;Ee<d;++Ee)if(r[Ee]>255){Ge=r[Ee]>>>18&31,Cn(e,v,wt[Ge+257]),v+=mt[Ge+257],Ge>7&&(_r(e,v,r[Ee]>>>23&31),v+=pa[Ge]);var ct=31&r[Ee];Cn(e,v,Ct[ct]),v+=rt[ct],ct>3&&(Cn(e,v,r[Ee]>>>5&8191),v+=fa[ct])}else Cn(e,v,wt[r[Ee]]),v+=mt[r[Ee]];return Cn(e,v,wt[256]),v+mt[256]},ch=new pn([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),dh=(function(){for(var n=new pn(256),e=0;e<256;++e){for(var t=e,r=9;--r;)t=(1&t&&3988292384)^t>>>1;n[e]=t}return n})(),hh=function(){var n=4294967295;return{p:function(e){for(var t=n,r=0;r<e.length;++r)t=dh[255&t^e[r]]^t>>>8;n=t},d:function(){return 4294967295^n}}},ph=function(n,e,t,r,s){return(function(o,l,d,p,g,v){var w=o.length,b=new Kt(p+w+5*(1+Math.floor(w/7e3))+g),I=b.subarray(p,b.length-g),R=0;if(!l||w<8)for(var M=0;M<=w;M+=65535){var H=M+65535;H<w?R=Qs(I,R,o.subarray(M,H)):(I[M]=v,R=Qs(I,R,o.subarray(M,w)))}else{for(var X=ch[l-1],q=X>>>13,de=8191&X,pe=(1<<d)-1,Ae=new Wt(32768),He=new Wt(pe+1),Ze=Math.ceil(d/3),Ee=2*Ze,vt=function(D){return(o[D]^o[D+1]<<Ze^o[D+2]<<Ee)&pe},tt=new pn(25e3),Ve=new Wt(288),Ke=new Wt(32),wt=0,mt=0,Ct=(M=0,0),rt=0,_t=0;M<w;++M){var Lt=vt(M),ut=32767&M,dt=He[Lt];if(Ae[ut]=dt,He[Lt]=ut,rt<=M){var kt=w-M;if((wt>7e3||Ct>24576)&&kt>423){R=hl(o,I,0,tt,Ve,Ke,mt,Ct,_t,M-_t,R),Ct=wt=mt=0,_t=M;for(var nt=0;nt<286;++nt)Ve[nt]=0;for(nt=0;nt<30;++nt)Ke[nt]=0}var yt=2,Ge=0,ct=de,St=ut-dt&32767;if(kt>2&&Lt==vt(M-St))for(var hr=Math.min(q,kt)-1,Rt=Math.min(32767,M),Yt=Math.min(258,kt);St<=Rt&&--ct&&ut!=dt;){if(o[M+yt]==o[M+yt-St]){for(var Et=0;Et<Yt&&o[M+Et]==o[M+Et-St];++Et);if(Et>yt){if(yt=Et,Ge=St,Et>hr)break;var Qt=Math.min(St,Et-2),le=0;for(nt=0;nt<Qt;++nt){var _=M-St+nt+32768&32767,E=_-Ae[_]+32768&32767;E>le&&(le=E,dt=_)}}}St+=(ut=dt)-(dt=Ae[ut])+32768&32767}if(Ge){tt[Ct++]=268435456|Ks[yt]<<18|cl[Ge];var T=31&Ks[yt],L=31&cl[Ge];mt+=pa[T]+fa[L],++Ve[257+T],++Ke[L],rt=M+yt,++wt}else tt[Ct++]=o[M],++Ve[o[M]]}}R=hl(o,I,v,tt,Ve,Ke,mt,Ct,_t,M-_t,R)}return bu(b,0,p+yu(R)+g)})(n,e.level==null?6:e.level,e.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(n.length)))):12+e.mem,t,r,!0)},ea=function(n,e,t){for(;t;++e)n[e]=t,t>>>=8},fh=function(n,e){var t=e.filename;if(n[0]=31,n[1]=139,n[2]=8,n[8]=e.level<2?4:e.level==9?2:0,n[9]=3,e.mtime!=0&&ea(n,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),t){n[3]=8;for(var r=0;r<=t.length;++r)n[r+10]=t.charCodeAt(r)}},gh=function(n){return 10+(n.filename&&n.filename.length+1||0)};function wu(n,e){e===void 0&&(e={});var t=hh(),r=n.length;t.p(n);var s=ph(n,e,gh(e),8),o=s.length;return fh(s,e),ea(s,o-8,t.d()),ea(s,o-4,r),s}function Su(n,e){var t=n.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(n);for(var r=new Kt(n.length+(n.length>>>1)),s=0,o=function(g){r[s++]=g},l=0;l<t;++l){if(s+5>r.length){var d=new Kt(s+8+(t-l<<1));d.set(r),r=d}var p=n.charCodeAt(l);p<128||e?o(p):p<2048?(o(192|p>>>6),o(128|63&p)):p>
1655295&&p<57344?(o(240|(p=65536+(1047552&p)|1023&n.charCodeAt(++l))>>>18),o(128|p>>>12&63),o(128|p>>>6&63),o(128|63&p)):(o(224|p>>>12),o(128|p>>>6&63),o(128|63&p))}return bu(r,0,s)}function vh(n,e){return(function(t){for(var r=0,s=0;s<t.length;s++)r=(r<<5)-r+t.charCodeAt(s),r|=0;return Math.abs(r)})(n)%100<zt(100*e,0,100,Q)}var Dr="disabled",ga="sampled",Ri="active",Ur="buffering",va="paused",ma="trigger",cr=ma+"_activated",Mt=ma+"_pending",dr=ma+"_"+Dr;function pl(n,e){return e.some((t=>t.matching==="regex"&&new RegExp(t.url).test(n)))}class Iu{constructor(e){this.Pt=e}triggerStatus(e){var t=this.Pt.map((r=>r.triggerStatus(e)));return t.includes(cr)?cr:t.includes(Mt)?Mt:dr}stop(){this.Pt.forEach((e=>e.stop()))}}class Cu{constructor(e){this.Pt=e}triggerStatus(e){var t=new Set;for(var r of this.Pt)t.add(r.triggerStatus(e));switch(t.delete(dr),t.size){case 0:return dr;case 1:return Array.from(t)[0];default:return Mt}}stop(){this.Pt.forEach((e=>e.stop()))}}class mh{triggerStatus(){return Mt}stop(){}}var Ai=n=>"sessionRecording"in n;class _h{constructor(e){this.It=[],this.Rt=[],this.urlBlocked=!1,this._instance=e}onConfig(e){var t,r;this.It=(Ai(e)?(t=e.sessionRecording)==null?void 0:t.urlTriggers:e==null?void 0:e.urlTriggers)||[],this.Rt=(Ai(e)?(r=e.sessionRecording)==null?void 0:r.urlBlocklist:e==null?void 0:e.urlBlocklist)||[]}Tt(e){var t;return this.It.length===0?dr:((t=this._instance)==null?void 0:t.get_property($s))===e?cr:Mt}triggerStatus(e){var t=this.Tt(e),r=t===cr?cr:t===Mt?Mt:dr;return this._instance.register_for_session({$sdk_debug_replay_url_trigger_status:r}),r}checkUrlTriggerConditions(e,t,r){if(x!==void 0&&x.location.href){var s=x.location.href,o=this.urlBlocked,l=pl(s,this.Rt);o&&l||(l&&!o?e():!l&&o&&t(),pl(s,this.It)&&r("url"))}}stop(){}}class yh{constructor(e){this.linkedFlag=null,this.linkedFlagSeen=!1,this.Ct=()=>{},this._instance=e}triggerStatus(){var e=Mt;return Be(this.linkedFlag)&&(e=dr),this.linkedFlagSeen&&(e=cr),this._instance.register_for_session({$sdk_debug_replay_linked_flag_trigger_status:e}),e}onConfig(e,t){var r;if(this.linkedFlag=(Ai(e)?(r=e.sessionRecording)==null?void 0:r.linkedFlag:e==null?void 0:e.linkedFlag)||null,!Be(this.linkedFlag)&&!this.linkedFlagSeen){var s=at(this.linkedFlag)?this.linkedFlag:this.linkedFlag.flag,o=at(this.linkedFlag)?null:this.linkedFlag.variant;this.Ct=this._instance.onFeatureFlags(((l,d)=>{var p=!1;if(st(d)&&s in d){var g=d[s];p=sr(g)?g===!0:o?g===o:!!g}this.linkedFlagSeen=p,p&&t(s,o)}))}}stop(){this.Ct()}}class bh{constructor(e){this.Mt=[],this._instance=e}onConfig(e){var t;this.Mt=(Ai(e)?(t=e.sessionRecording)==null?void 0:t.eventTriggers:e==null?void 0:e.eventTriggers)||[]}Ot(e){var t;return this.Mt.length===0?dr:((t=this._instance)==null?void 0:t.get_property(Hs))===e?cr:Mt}triggerStatus(e){var t=this.Ot(e),r=t===cr?cr:t===Mt?Mt:dr;return this._instance.register_for_session({$sdk_debug_replay_event_trigger_status:r}),r}stop(){}}function wh(n){return n.isRecordingEnabled?Ur:Dr}function Sh(n){if(!n.receivedFlags)return Ur;if(!n.isRecordingEnabled)return Dr;if(n.urlTriggerMatching.urlBlocked)return va;var e=n.isSampled===!0,t=new Iu([n.eventTriggerMatching,n.urlTriggerMatching,n.linkedFlagMatching]).triggerStatus(n.sessionId);return e?ga:t===cr?Ri:t===Mt?Ur:n.isSampled===!1?Dr:Ri}function Ih(n){if(!n.receivedFlags)return Ur;if(!n.isRecordingEnabled)return Dr;if(n.urlTriggerMatching.urlBlocked)return va;var e=new Cu([n.eventTriggerMatching,n.urlTriggerMatching,n.linkedFlagMatching]).triggerStatus(n.sessionId),t=e!==dr,r=sr(n.isSampled);return t&&e===Mt?Ur:t&&e===dr||r&&!n.isSampled?Dr:n.isSampled===!0?ga:Ri}var On="[SessionRecording]",bt=gt(On);function hi(){var n;return be==null||(n=be.__PosthogExtensions__)==null||(n=n.rrweb)==null?void 0:n.record}var Ch=3e5,kh=[ir.MouseMove,ir.MouseInteraction,ir.Scroll,ir.ViewportResize,ir.Input,ir.TouchMove,ir.MediaInteraction,ir.Drag],fl=n=>({rrwebMethod:n,enqueuedAt:Date.now(),attempt:1});function jr(n){return(function(e,t){for(var r="",s=0;s<e.length;){var o=e[s++];r+=String.fromCharCode(o)}return r})(wu(Su(JSON.stringify(n))))}function gl(n){return n.type===wr.Custom&&n.data.tag==="sessionIdle"}class vl{get sessionId(){return this.Ft}get At(){return this._instance.config.session_recording.session_idle_threshold_ms||3e5}get started(){return this.Dt}get jt(){if(!this._instance.sessionManager)throw new Error(On+" must be started with a valid sessionManager.");return this._instance.sessionManager}get Lt(){var e,t;return this.Nt.triggerStatus(this.sessionId)===Mt?6e4:(e=(t=this._instance.config.session_recording)==null?void 0:t.full_snapshot_interval_millis)!==null&&e!==void 0?e:Ch}get Ut(){var e=this._instance.get_property(an);return sr(e)?e:null}get zt(){var e,t,r=(e=this.H)==null?void 0:e.data[((t=this.H)==null?void 0:t.data.length)-1],{sessionStartTimestamp:s}=this.jt.checkAndGetSessionAndWindowId(!0);return r?r.timestamp-s:null}get qt(){var e=!!this._instance.get_property(Bs),t=!this._instance.config.disable_session_recording;return x&&e&&t}get Bt(){var e=!!this._instance.get_property(Uo),t=this._instance.config.enable_recording_console_log;return t??e}get Ht(){var e,t,r,s,o,l,d=this._instance.config.session_recording.captureCanvas,p=this._instance.get_property(Zo),g=(e=(t=d==null?void 0:d.recordCanvas)!==null&&t!==void 0?t:p==null?void 0:p.enabled)!==null&&e!==void 0&&e,v=(r=(s=d==null?void 0:d.canvasFps)!==null&&s!==void 0?s:p==null?void 0:p.fps)!==null&&r!==void 0?r:4,w=(o=(l=d==null?void 0:d.canvasQuality)!==null&&l!==void 0?l:p==null?void 0:p.quality)!==null&&o!==void 0?o:.4;if(typeof w=="string"){var b=parseFloat(w);w=isNaN(b)?.4:b}return{enabled:g,fps:zt(v,0,12,bt.createLogger("canvas recording fps"),4),quality:zt(w,0,1,bt.createLogger("canvas recording quality"),.4)}}get Wt(){var e,t,r=this._instance.get_property(zo),s={recordHeaders:(e=this._instance.config.session_recording)==null?void 0:e.recordHeaders,recordBody:(t=this._instance.config.session_recording)==null?void 0:t.recordBody},o=(s==null?void 0:s.recordHeaders)||(r==null?void 0:r.recordHeaders),l=(s==null?void 0:s.recordBody)||(r==null?void 0:r.recordBody),d=st(this._instance.config.capture_performance)?this._instance.config.capture_performance.network_timing:this._instance.config.capture_performance,p=!!(sr(d)?d:r
16!=null&&r.capturePerformance);return o||l||p?{recordHeaders:o,recordBody:l,recordPerformance:p}:void 0}get Gt(){var e,t,r,s,o,l,d=this._instance.get_property(qo),p={maskAllInputs:(e=this._instance.config.session_recording)==null?void 0:e.maskAllInputs,maskTextSelector:(t=this._instance.config.session_recording)==null?void 0:t.maskTextSelector,blockSelector:(r=this._instance.config.session_recording)==null?void 0:r.blockSelector},g=(s=p==null?void 0:p.maskAllInputs)!==null&&s!==void 0?s:d==null?void 0:d.maskAllInputs,v=(o=p==null?void 0:p.maskTextSelector)!==null&&o!==void 0?o:d==null?void 0:d.maskTextSelector,w=(l=p==null?void 0:p.blockSelector)!==null&&l!==void 0?l:d==null?void 0:d.blockSelector;return V(g)&&V(v)&&V(w)?void 0:{maskAllInputs:g==null||g,maskTextSelector:v,blockSelector:w}}get Vt(){var e=this._instance.get_property(Xo);return Tt(e)?e:null}get Jt(){var e=this._instance.get_property(Ko);return Tt(e)?e:null}get status(){return this.Kt?this.Yt({receivedFlags:this.Kt,isRecordingEnabled:this.qt,isSampled:this.Ut,urlTriggerMatching:this.Xt,eventTriggerMatching:this.Qt,linkedFlagMatching:this.Zt,sessionId:this.sessionId}):Ur}constructor(e){if(this.Yt=wh,this.Kt=!1,this.ti=[],this.ii="unknown",this.ei=Date.now(),this.Nt=new mh,this.ri=void 0,this.si=void 0,this.ni=void 0,this.oi=void 0,this.ai=void 0,this._forceAllowLocalhostNetworkCapture=!1,this.li=()=>{this.ui()},this.hi=()=>{this.tryAddCustomEvent("browser offline",{})},this.di=()=>{this.tryAddCustomEvent("browser online",{})},this.vi=()=>
16{if(re!=null&&re.visibilityState){var s="window "+re.visibilityState;this.tryAddCustomEvent(s,{})}},this._instance=e,this.Dt=!1,this.ci="/s/",this.fi=void 0,this.Kt=!1,!this._instance.sessionManager)throw bt.error("started without valid sessionManager"),new Error(On+" started without valid sessionManager. This is a bug.");if(this._instance.config.cookieless_mode==="always")throw new Error(On+' cannot be used with cookieless_mode="always"');this.Zt=new yh(this._instance),this.Xt=new _h(this._instance),this.Qt=new bh(this._instance);var{sessionId:t,windowId:r}=this.jt.checkAndGetSessionAndWindowId();this.Ft=t,this.pi=r,this.H=this.gi(),this.At>=this.jt.sessionTimeoutMs&&bt.warn("session_idle_threshold_ms ("+this.At+") is greater than the session timeout ("+this.jt.sessionTimeoutMs+"). Session will never be detected as idle")}startIfEnabledOrStop(e){this.qt?(this.mi(e),et(x,"beforeunload",this.li),et(x,"offline",this.hi),et(x,"online",this.di),et(x,"visibilitychange",this.vi),this.yi(),this.bi(),Be(this.ri)&&(this.ri=this._instance.on("eventCaptured",(t=>{try{if(t.event==="$pageview"){var r=t!=null&&t.properties.$current_url?this.wi(t==null?void 0:t.properties.$current_url):"";if(!r)return;this.tryAddCustomEvent("$pageview",{href:r})}}catch(s){bt.error("Could not add $pageview to rrweb session",s)}}))),this.si||(this.si=this.jt.onSessionId(((t,r,s)=>{var o,l;s&&(this.tryAddCustomEvent("$session_id_change",{sessionId:t,windowId:r,changeReason:s}),(o=this._instance)==null||(o=o.persistence)==null||o.unregister(Hs),(l=this._instance)==null||(l=l.persistence)==null||l.unregister($s))})))):this.stopRecording()}stopRecording(){var e,t,r,s;this.Dt&&this.fi&&(this.fi(),this.fi=void 0,this.Dt=!1,x==null||x.removeEventListener("beforeunload",this.li),x==null||x.removeEventListener("offline",this.hi),x==null||x.removeEventListener("online",this.di),x==null||x.removeEventListener("visibilitychange",this.vi),this.gi(),clearInterval(this.Si),(e=this.ri)==null||e.call(this),this.ri=void 0,(t=this.ai)==null||t.call(this),this.ai=void 0,(r=this.si)==null||r.call(this),this.si=void 0,(s=this.oi)==null||s.call(this),this.oi=void 0,this.Qt.stop(),this.Xt.stop(),this.Zt.stop(),bt.info("stopped"))}ki(){var e;(e=this._instance.persistence)==null||e.unregister(an)}$i(e){var t,r=this.Ft!==e,s=this.Vt;if(Tt(s)){var o=this.Ut,l=r||!sr(o),d=l?vh(e,s):o;l&&(d?this.xi(ga):bt.warn("Sample rate ("+s+") has determined that this sessionId ("+e+") will not be sent to the server."),this.tryAddCustomEvent("samplingDecisionMade",{sampleRate:s,isSampled:d})),(t=this._instance.persistence)==null||t.register({[an]:d})}else this.ki()}onRemoteConfig(e){var t,r,s,o;this.tryAddCustomEvent("$remote_config_received",e),this.Ei(e),(t=e.sessionRecording)!=null&&t.endpoint&&(this.ci=(o=e.sessionRecording)==null?void 0:o.endpoint),this.yi(),((r=e.sessionRecording)==null?void 0:r.triggerMatchType)==="any"?(this.Yt=Sh,this.Nt=new Iu([this.Qt,this.Xt])):(this.Yt=Ih,this.Nt=new Cu([this.Qt,this.Xt])),this._instance.register_for_session({$sdk_debug_replay_remote_trigger_matching_config:(s=e.sessionRecording)==null?void 0:s.triggerMatchType}),this.Xt.onConfig(e),this.Qt.onConfig(e),this.Zt.onConfig(e,((l,d)=>{this.xi("linked_flag_matched",{flag:l,variant:d})})),this.Kt=!0,this.startIfEnabledOrStop()}yi(){Tt(this.Vt)&&Be(this.oi)&&(this.oi=this.jt.onSessionId((e=>{this.$i(e)})))}Ei(e){if(this._instance.persistence){var t,r=this._instance.persistence,s=()=>{var o,l,d,p,g,v,w,b,I,R=(o=e.sessionRecording)==null?void 0:o.sampleRate,M=Be(R)?null:parseFloat(R);Be(M)&&this.ki();var H=(l=e.sessionRecording)==null?void 0:l.minimumDurationMilliseconds;r.register({[Bs]:!!e.sessionRecording,[Uo]:(d=e.sessionRecording)==null?void 0:d.consoleLogRecordingEnabled,[zo]:Z({capturePerformance:e.capturePerformance},(p=e.sessionRecording)==null?void 0:p.networkPayloadCapture),[qo]:(g=e.sessionRecording)==null?void 0:g.masking,[Zo]:{enabled:(v=e.sessionRecording)==null?void 0:v.recordCanvas,fps:(w=e.sessionRecording)==null?void 0:w.canvasFps,quality:(b=e.sessionRecording)==null?void 0:b.canvasQuality},[Xo]:M,[Ko]:V(H)?null:H,[Jo]:(I=e.sessionRecording)==null?void 0:I.scriptConfig})};s(),(t=this.ni)==null||t.call(this),this.ni=this.jt.onSessionId(s)}}log(e,t){var r;t===void 0&&(t="log"),(r=this._instance.sessionRecording)==null||r.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:t,trace:[],payload:[JSON.stringify(e)]}},timestamp:Date.now()})}mi(e){if(!V(Object.assign)&&!V(Array.from)&&!(this.Dt||this._instance.config.disable_session_recording||this._instance.consent.isOptedOut())){var t;this.Dt=!0,this.jt.checkAndGetSessionAndWindowId(),hi()?this.Pi():(t=be.__PosthogExtensions__)==null||t.loadExternalDependency==null||t.loadExternalDependency(this._instance,this.Ii,(r=>{if(r)return bt.error("could not load recorder",r);this.Pi()})),bt.info("starting"),this.status===Ri&&this.xi(e||"recording_initialized")}}get Ii(){var e;return((e=this._instance)==null||(e=e.persistence)==null||(e=e.get_property(Jo))==null?void 0:e.script)||"recorder"}Ri(e){var t;return e.type===3&&kh.indexOf((t=e.data)==null?void 0:t.source)!==-1}Ti(e){var t=this.Ri(e);t||this.ii||e.timestamp-this.ei>this.At&&(this.ii=!0,clearInterval(this.Si),this.tryAddCustomEvent("sessionIdle",{eventTimestamp:e.timestamp,lastActivityTimestamp:this.ei,threshold:this.At,bufferLength:this.H.data.length,bufferSize:this.H.size}),this.ui());var r=!1;if(t&&(this.ei=e.timestamp,this.ii)){var s=this.ii==="unknown";this.ii=!1,s||(this.tryAddCustomEvent("sessionNoLongerIdle",{reason:"user activity",type:e.type}),r=!0)}if(!this.ii){var{windowId:o,sessionId:l}=this.jt.checkAndGetSessionAndWindowId(!t,e.timestamp),d=this.Ft!==l,p=this.pi!==o;this.pi=o,this.Ft=l,d||p?(this.stopRecording(),this.startIfEnabledOrStop("session_id_changed")):r&&this.Ci()}}Mi(e){try{return e.rrwebMethod(),!0}catch(t){return this.ti.length<10?this.ti.push({enqueuedAt:e.enqueuedAt||Date.now(),attempt:e.attempt++,rrwebMethod:e.rrwebMethod}):bt.warn("could not emit queued rrweb event.",t,e),!1}}tryAddCustomEvent(e,t){return this.Mi(fl((()=>hi().addCustomEvent(e,t))))}Oi(){return this.Mi(fl((()=>hi().takeFullSnapshot())))}Pi(){var e,t,r,s,o={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{password:!0},maskInputFn:void 0,slimDOMOptions:{}
16,collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1},l=this._instance.config.session_recording;for(var[d,p]of Object.entries(l||{}))d in o&&(d==="maskInputOptions"?o.maskInputOptions=Z({password:!0},p):o[d]=p);this.Ht&&this.Ht.enabled&&(o.recordCanvas=!0,o.sampling={canvas:this.Ht.fps},o.dataURLOptions={type:"image/webp",quality:this.Ht.quality}),this.Gt&&(o.maskAllInputs=(t=this.Gt.maskAllInputs)===null||t===void 0||t,o.maskTextSelector=(r=this.Gt.maskTextSelector)!==null&&r!==void 0?r:void 0,o.blockSelector=(s=this.Gt.blockSelector)!==null&&s!==void 0?s:void 0);var g=hi();if(g){this.Fi=(e=this.Fi)!==null&&e!==void 0?e:new ah(g,{refillRate:this._instance.config.session_recording.__mutationThrottlerRefillRate,bucketSize:this._instance.config.session_recording.__mutationThrottlerBucketSize,onBlockedNode:(w,b)=>{var I="Too many mutations on node '"+w+"'. Rate limiting. This could be due to SVG animations or something similar";bt.info(I,{node:b}),this.log(On+" "+I,"warn")}});var v=this.Ai();this.fi=g(Z({emit:w=>{this.onRRwebEmit(w)},plugins:v},o)),this.ei=Date.now(),this.ii=sr(this.ii)?this.ii:"unknown",this.tryAddCustomEvent("$session_options",{sessionRecordingOptions:o,activePlugins:v.map((w=>w==null?void 0:w.name))}),this.tryAddCustomEvent("$posthog_config",{config:this._instance.config})}else bt.error("onScriptLoaded was called but rrwebRecord is not available. This indicates something has gone wrong.")}Ci(){if(this.Si&&clearInterval(this.Si),this.ii!==!0){var e=this.Lt;e&&(this.Si=setInterval((()=>{this.Oi()}),e))}}Ai(){var e,t,r=[],s=(e=be.__PosthogExtensions__)==null||(e=e.rrwebPlugins)==null?void 0:e.getRecordConsolePlugin;s&&this.Bt&&r.push(s());var o=(t=be.__PosthogExtensions__)==null||(t=t.rrwebPlugins)==null?void 0:t.getRecordNetworkPlugin;return this.Wt&&Xt(o)&&(!Bd.includes(location.hostname)||this._forceAllowLocalhostNetworkCapture?r.push(o(sh(this._instance.config,this.Wt))):bt.info("NetworkCapture not started because we are on localhost.")),r}onRRwebEmit(e){var t;if(this.Di(),e&&st(e)){if(e.type===wr.Meta){var r=this.wi(e.data.href);if(this.ji=r,!r)return;e.data.href=r}else this.Li();if(this.Xt.checkUrlTriggerConditions((()=>this.Ni()),(()=>this.Ui()),(b=>this.zi(b))),!this.Xt.urlBlocked||(s=e).type===wr.Custom&&s.data.tag==="recording paused"){var s;e.type===wr.FullSnapshot&&this.Ci(),e.type===wr.FullSnapshot&&this.Kt&&this.Nt.triggerStatus(this.sessionId)===Mt&&this.gi();var o=this.Fi?this.Fi.throttleMutations(e):e;if(o){var l=(function(b){var I=b;if(I&&st(I)&&I.type===6&&st(I.data)&&I.data.plugin==="rrweb/console@1"){I.data.payload.payload.length>10&&(I.data.payload.payload=I.data.payload.payload.slice(0,10),I.data.payload.payload.push("...[truncated]"));for(var R=[],M=0;M<I.data.payload.payload.length;M++)I.data.payload.payload[M]&&I.data.payload.payload[M].length>2e3?R.push(I.data.payload.payload[M].slice(0,2e3)+"...[truncated]"):R.push(I.data.payload.payload[M]);return I.data.payload.payload=R,b}return b})(o);if(this.Ti(l),this.ii!==!0||gl(l)){if(gl(l)){var d=l.data.payload;if(d){var p=d.lastActivityTimestamp,g=d.threshold;l.timestamp=p+g}}var v=(t=this._instance.config.session_recording.compress_events)===null||t===void 0||t?(function(b){if(Ti(b)<1024)return b;try{if(b.type===wr.FullSnapshot)return Z({},b,{data:jr(b.data),cv:"2024-10"});if(b.type===wr.IncrementalSnapshot&&b.data.source===ir.Mutation)return Z({},b,{cv:"2024-10",data:Z({},b.data,{texts:jr(b.data.texts),attributes:jr(b.data.attributes),removes:jr(b.data.removes),adds:jr(b.data.adds)})});if(b.type===wr.IncrementalSnapshot&&b.data.source===ir.StyleSheetRule)return Z({},b,{cv:"2024-10",data:Z({},b.data,{adds:b.data.adds?jr(b.data.adds):void 0,removes:b.data.removes?jr(b.data.removes):void 0})})}catch(I){bt.error("could not compress event - will use uncompressed event",I)}return b})(l):l,w={$snapshot_bytes:Ti(v),$snapshot_data:v,$session_id:this.Ft,$window_id:this.pi};this.status!==Dr?this.qi(w):this.gi()}}}}}Li(){if(!this._instance.config.capture_pageview&&x){var e=this.wi(x.location.href);this.ji!==e&&(this.tryAddCustomEvent("$url_changed",{href:e}),this.ji=e)}}Di(){if(this.ti.length){var e=[...this.ti];this.ti=[],e.forEach((t=>{Date.now()-t.enqueuedAt<=2e3&&this.Mi(t)}))}}wi(e){var t=this._instance.config.session_recording;
16if(t.maskNetworkRequestFn){var r,s={url:e};return(r=s=t.maskNetworkRequestFn(s))==null?void 0:r.url}return e}gi(){return this.H={size:0,data:[],sessionId:this.Ft,windowId:this.pi},this.H}ui(){this.Bi&&(clearTimeout(this.Bi),this.Bi=void 0);var e=this.Jt,t=this.zt,r=Tt(t)&&t>=0,s=Tt(e)&&r&&t<e;return this.status===Ur||this.status===va||this.status===Dr||s?(this.Bi=setTimeout((()=>{this.ui()}),2e3),this.H):(this.H.data.length>0&&qs(this.H).forEach((o=>{this.Hi({$snapshot_bytes:o.size,$snapshot_data:o.data,$session_id:o.sessionId,$window_id:o.windowId,$lib:"web",$lib_version:Sr.LIB_VERSION})})),this.gi())}qi(e){var t,r=2+(((t=this.H)==null?void 0:t.data.length)||0);!this.ii&&(this.H.size+e.$snapshot_bytes+r>943718.4||this.H.sessionId!==this.Ft)&&(this.H=this.ui()),this.H.size+=e.$snapshot_bytes,this.H.data.push(e.$snapshot_data),this.Bi||this.ii||(this.Bi=setTimeout((()=>{this.ui()}),2e3))}Hi(e){this._instance.capture("$snapshot",e,{_url:this._instance.requestRouter.endpointFor("api",this.ci),_noTruncate:!0,_batchKey:"recordings",skip_client_rate_limiting:!0})}zi(e){var t;this.Nt.triggerStatus(this.sessionId)===Mt&&((t=this._instance)==null||(t=t.persistence)==null||t.register({[e==="url"?$s:Hs]:this.Ft}),this.ui(),this.xi(e+"_trigger_matched"))}Ni(){this.Xt.urlBlocked||(this.Xt.urlBlocked=!0,clearInterval(this.Si),bt.info("recording paused due to URL blocker"),this.tryAddCustomEvent("recording paused",{reason:"url blocker"}))}Ui(){this.Xt.urlBlocked&&(this.Xt.urlBlocked=!1,this.Oi(),this.Ci(),this.tryAddCustomEvent("recording resumed",{reason:"left blocked url"}),bt.info("recording resumed"))}bi(){this.Qt.Mt.length!==0&&Be(this.ai)&&(this.ai=this._instance.on("eventCaptured",(e=>{try{this.Qt.Mt.includes(e.event)&&this.zi("event")}catch(t){bt.error("Could not activate event trigger",t)}})))}overrideLinkedFlag(){this.Zt.linkedFlagSeen=!0,this.Oi(),this.xi("linked_flag_overridden")}overrideSampling(){var e;(e=this._instance.persistence)==null||e.register({[an]:!0}),this.Oi(),this.xi("sampling_overridden")}overrideTrigger(e){this.zi(e)}xi(e,t){this._instance.register_for_session({$session_recording_start_reason:e}),bt.info(e.replace("_"," "),t),Ne(["recording_initialized","session_id_changed"],e)||this.tryAddCustomEvent(e,t)}get sdkDebugProperties(){var{sessionStartTimestamp:e}=this.jt.checkAndGetSessionAndWindowId(!0);return{$recording_status:this.status,$sdk_debug_replay_internal_buffer_length:this.H.data.length,$sdk_debug_replay_internal_buffer_size:this.H.size,$sdk_debug_current_session_duration:this.zt,$sdk_debug_session_start:e}}}var Is=gt("[SegmentIntegration]");function Eh(n,e){var t=n.config.segment;if(!t)return e();(function(r,s){var o=r.config.segment;if(!o)return s();var l=p=>{var g=()=>p.anonymousId()||Nr();r.config.get_device_id=g,p.id()&&(r.register({distinct_id:p.id(),$device_id:g()}),r.persistence.set_property(yr,"identified")),s()},d=o.user();"then"in d&&Xt(d.then)?d.then((p=>l(p))):l(d)})(n,(()=>{t.register((r=>{Promise&&Promise.resolve||Is.warn("This browser does not have Promise support, and can not use the segment integration");var s=(o,l)=>{if(!l)return o;o.event.userId||o.event.anonymousId===r.get_distinct_id()||(Is.info("No userId set, resetting PostHog"),r.reset()),o.event.userId&&o.event.userId!==r.get_distinct_id()&&(Is.info("UserId set, identifying with PostHog"),r.identify(o.event.userId));var d=r.calculateEventProperties(l,o.event.properties);return o.event.properties=Object.assign({},d,o.event.properties),o};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:o=>s(o,o.event.event),page:o=>s(o,"$pageview"),identify:o=>s(o,"$identify"),screen:o=>s(o,"$screen")}})(n)).then((()=>{e()}))}))}var ku="posthog-js";function Eu(n,e){var{organization:t,projectId:r,prefix:s,severityAllowList:o=["error"],sendExceptionsToPostHog:l=!0}=e===void 0?{}:e;return d=>{var p,g,v,w,b;if(!(o==="*"||o.includes(d.level))||!n.__loaded)return d;d.tags||(d.tags={});var I=n.requestRouter.endpointFor("ui","/project/"+n.config.token+"/person/"+n.get_distinct_id());d.tags["PostHog Person URL"]=I,n.sessionRecordingStarted()&&(d.tags["PostHog Recording URL"]=n.get_session_replay_url({withTimestamp:!0}));var R=((p=d.exception)==null?void 0:p.values)||[],M=R.map((X=>Z({},X,{stacktrace:X.stacktrace?Z({},X.stacktrace,{type:"raw",frames:(X.stacktrace.frames||[]).map((q=>Z({},q,{platform:"web:javascript"})))}):void 0}))),H={$exception_message:((g=R[0])==null?void 0:g.value)||d.message,$exception_type:(v
16=R[0])==null?void 0:v.type,$exception_personURL:I,$exception_level:d.level,$exception_list:M,$sentry_event_id:d.event_id,$sentry_exception:d.exception,$sentry_exception_message:((w=R[0])==null?void 0:w.value)||d.message,$sentry_exception_type:(b=R[0])==null?void 0:b.type,$sentry_tags:d.tags};return t&&r&&(H.$sentry_url=(s||"https://sentry.io/organizations/")+t+"/issues/?project="+r+"&query="+d.event_id),l&&n.exceptions.sendExceptionEvent(H),d}}class xh{constructor(e,t,r,s,o,l){this.name=ku,this.setupOnce=function(d){d(Eu(e,{organization:t,projectId:r,prefix:s,severityAllowList:o,sendExceptionsToPostHog:l==null||l}))}}}var Th=x!=null&&x.location?Ei(x.location.hash,"__posthog")||Ei(location.hash,"state"):null,ml="_postHogToolbarParams",_l=gt("[Toolbar]"),Or=(function(n){return n[n.UNINITIALIZED=0]="UNINITIALIZED",n[n.LOADING=1]="LOADING",n[n.LOADED=2]="LOADED",n})(Or||{});class Mh{constructor(e){this.instance=e}Wi(e){be.ph_toolbar_state=e}Gi(){var e;return(e=be.ph_toolbar_state)!==null&&e!==void 0?e:Or.UNINITIALIZED}maybeLoadToolbar(e,t,r){if(e===void 0&&(e=void 0),t===void 0&&(t=void 0),r===void 0&&(r=void 0),!x||!re)return!1;e=e??x.location,r=r??x.history;try{if(!t){try{x.localStorage.setItem("test","test"),x.localStorage.removeItem("test")}catch{return!1}t=x==null?void 0:x.localStorage}var s,o=Th||Ei(e.hash,"__posthog")||Ei(e.hash,"state"),l=o?Ho((()=>JSON.parse(atob(decodeURIComponent(o)))))||Ho((()=>JSON.parse(decodeURIComponent(o)))):null;return l&&l.action==="ph_authorize"?((s=l).source="url",s&&Object.keys(s).length>0&&(l.desiredHash?e.hash=l.desiredHash:r?r.replaceState(r.state,"",e.pathname+e.search):e.hash="")):((s=JSON.parse(t.getItem(ml)||"{}")).source="localstorage",delete s.userIntent),!(!s.token||this.instance.config.token!==s.token)&&(this.loadToolbar(s),!0)}catch{return!1}}Vi(e){var t=be.ph_load_toolbar||be.ph_load_editor;!Be(t)&&Xt(t)?t(e,this.instance):_l.warn("No toolbar load function found")}loadToolbar(e){var t=!(re==null||!re.getElementById(eu));if(!x||t)return!1;var r=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,s=Z({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},r?{instrument:!1}:{});if(x.localStorage.setItem(ml,JSON.stringify(Z({},s,{source:void 0}))),this.Gi()===Or.LOADED)this.Vi(s);else if(this.Gi()===Or.UNINITIALIZED){var o;this.Wi(Or.LOADING),(o=be.__PosthogExtensions__)==null||o.loadExternalDependency==null||o.loadExternalDependency(this.instance,"toolbar",(l=>{if(l)return _l.error("[Toolbar] Failed to load",l),void this.Wi(Or.UNINITIALIZED);this.Wi(Or.LOADED),this.Vi(s)})),et(x,"turbolinks:load",(()=>{this.Wi(Or.UNINITIALIZED),this.loadToolbar(s)}))}return!0}Ji(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,r){return e===void 0&&(e=void 0),t===void 0&&(t=void 0),r===void 0&&(r=void 0),this.maybeLoadToolbar(e,t,r)}}var Rh=gt("[TracingHeaders]");class Ah{constructor(e){this.Ki=void 0,this.Yi=void 0,this.lt=()=>{var t,r;V(this.Ki)&&((t=be.__PosthogExtensions__)==null||(t=t.tracingHeadersPatchFns)==null||t._patchXHR(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager)),V(this.Yi)&&((r=be.__PosthogExtensions__)==null||(r=r.tracingHeadersPatchFns)==null||r._patchFetch(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}nt(e){var t,r;(t=be.__PosthogExtensions__)!=null&&t.tracingHeadersPatchFns&&e(),(r=be.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"tracing-headers",(s=>{if(s)return Rh.error("failed to load script",s);e()}))}startIfEnabledOrStop(){var e,t;this._instance.config.__add_tracing_headers?this.nt(this.lt):((e=this.Ki)==null||e.call(this),(t=this.Yi)==null||t.call(this),this.Ki=void 0,this.Yi=void 0)}}var Rr=gt("[Web Vitals]"),yl=9e5;class Oh{constructor(e){var t;this.Xi=!1,this.C=!1,this.H={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.Qi=()=>{clearTimeout(this.Zi),this.H.metrics.length!==0&&(this._instance.capture("$web_vitals",this.H.metrics.reduce(((r,s)=>Z({},r,{["$web_vitals_"+s.name+"_event"]:Z({},s),["$web_vitals_"+s.name+"_value"]:s.value})),{})),this.H={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.te=r=>{var s,o=(s=this._instance.sessionManager)==null?void 0:s.checkAndGetSessionAndWindowId(!0);if(V(o))Rr.error("Could not read session ID. Dropping metrics!");else{this.H=this.H||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var l=this.ie();V(l)||(Be(r==null?void 0:r.name)||Be(r==null?void 0:r.value)?Rr.error("Invalid metric received",r):this.ee&&r.value>=this.ee?Rr.error("Ignoring metric with value >= "+this.ee,r):(this.H.url!==l&&(this.Qi(),this.Zi=setTimeout(this.Qi,this.flushToCaptureTimeoutMs)),V(this.H.url)&&(this.H.url=l),this.H.firstMetricTimestamp=V(this.H.firstMetricTimestamp)?Date.now():this.H.firstMetricTimestamp,r.attribution&&r.attribution.interactionTargetElement&&(r.attribution.interactionTargetElement=void 0),this.H.metrics.push(Z({},r,{$current_url:l,$session_id:o.sessionId,$window_id:o.windowId,timestamp:Date.now()})),this.H.metrics.length===this.allowedMetrics.length&&this.Qi()))}},this.lt=()=>{var r,s,o,l,d=be.__PosthogExtensions__;V(d)||V(d.postHogWebVitalsCallbacks)||({onLCP:r,onCLS:s,onFCP:o,onINP:l}=d.postHogWebVitalsCallbacks),r&&s&&o&&l?(this.allowedMetrics.indexOf("LCP")>-1&&r(this.te.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&s(this.te.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&o(this.te.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&l(this.te.bind(this)),this.C=!0):Rr.error("web vitals callbacks not loaded - not starting")},this._instance=e,this.Xi=!((t=this._instance.persistence)==null||!t.props[Yo]),this.startIfEnabled()}get allowedMetrics(){var e,t,r=st(this._instance.config.capture_performance)?(e=this._instance.config.capture_performance)==null?void 0:e.web_vitals_allowed_metrics:void 0;return V(r)?((t=this._instance.persistence)==null?void 0:t.props[Vo])||["CLS","FCP","INP","LCP"]:r}get flushToCaptureTimeoutMs(){return(st(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}get ee(){var e=st(this._instance.config.capture_performance)&&Tt(this._instance.config.capture_performance.__web_vitals_max_value)?this._instance.config.capture_performance.__web_vitals_max_value:yl;return 0<e&&e<=6e4?yl:e}get isEnabled(){var e=jt==null?void 0:jt.protocol;if(e!=="http:"&&e!=="https:")return Rr.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=st(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals:sr
16(this._instance.config.capture_performance)?this._instance.config.capture_performance:void 0;return sr(t)?t:this.Xi}startIfEnabled(){this.isEnabled&&!this.C&&(Rr.info("enabled, starting..."),this.nt(this.lt))}onRemoteConfig(e){var t=st(e.capturePerformance)&&!!e.capturePerformance.web_vitals,r=st(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[Yo]:t}),this._instance.persistence.register({[Vo]:r})),this.Xi=t,this.startIfEnabled()}nt(e){var t,r;(t=be.__PosthogExtensions__)!=null&&t.postHogWebVitalsCallbacks&&e(),(r=be.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"web-vitals",(s=>{s?Rr.error("failed to load script",s):e()}))}ie(){var e=x?x.location.href:void 0;return e||Rr.error("Could not determine current URL"),e}}var Nh=gt("[Heatmaps]");function bl(n){return st(n)&&"clientX"in n&&"clientY"in n&&Tt(n.clientX)&&Tt(n.clientY)}class Fh{constructor(e){var t;this.rageclicks=new pu,this.Xi=!1,this.C=!1,this.re=null,this.instance=e,this.Xi=!((t=this.instance.persistence)==null||!t.props[Ds])}get flushIntervalMilliseconds(){var e=5e3;return st(this.instance.config.capture_heatmaps)&&this.instance.config.capture_heatmaps.flush_interval_milliseconds&&(e=this.instance.config.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return V(this.instance.config.capture_heatmaps)?V(this.instance.config.enable_heatmaps)?this.Xi:this.instance.config.enable_heatmaps:this.instance.config.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.C)return;Nh.info("starting..."),this.se(),this.re=setInterval(this.ne.bind(this),this.flushIntervalMilliseconds)}else{var e,t;clearInterval((e=this.re)!==null&&e!==void 0?e:void 0),(t=this.oe)==null||t.stop(),this.getAndClearBuffer()}}onRemoteConfig(e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[Ds]:t}),this.Xi=t,this.startIfEnabled()}getAndClearBuffer(){var e=this.H;return this.H=void 0,e}ae(e){this.le(e.originalEvent,"deadclick")}se(){x&&re&&(et(x,"beforeunload",this.ne.bind(this)),et(re,"click",(e=>this.le(e||(x==null?void 0:x.event))),{capture:!0}),et(re,"mousemove",(e=>this.ue(e||(x==null?void 0:x.event))),{capture:!0}),this.oe=new gu(this.instance,Jd,this.ae.bind(this)),this.oe.startIfEnabled(),this.C=!0)}he(e,t){var r=this.instance.scrollManager.scrollY(),s=this.instance.scrollManager.scrollX(),o=this.instance.scrollManager.scrollElement(),l=(function(d,p,g){for(var v=d;v&&Pi(v)&&!Lr(v,"body");){if(v===g)return!1;if(Ne(p,x==null?void 0:x.getComputedStyle(v).position))return!0;v=au(v)}return!1})(iu(e),["fixed","sticky"],o);return{x:e.clientX+(l?0:s),y:e.clientY+(l?0:r),target_fixed:l,type:t}}le(e,t){var r;if(t===void 0&&(t="click"),!Qo(e.target)&&bl(e)){var s=this.he(e,t);(r=this.rageclicks)!=null&&r.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this.de(Z({},s,{type:"rageclick"})),this.de(s)}}ue(e){!Qo(e.target)&&bl(e)&&(clearTimeout(this.ve),this.ve=setTimeout((()=>{this.de(this.he(e,"mousemove"))}),500))}de(e){if(x){var t=x.location.href;this.H=this.H||{},this.H[t]||(this.H[t]=[]),this.H[t].push(e)}}ne(){this.H&&!sn(this.H)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}}class Lh{constructor(e){this._instance=e}doPageView(e,t){var r,s=this.ce(e,t);return this.fe={pathname:(r=x==null?void 0:x.location.pathname)!==null&&r!==void 0?r:"",pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),s}doPageLeave(e){var t;return this.ce(e,(t=this.fe)==null?void 0:t.pageViewId)}doEvent(){var e;return{$pageview_id:(e=this.fe)==null?void 0:e.pageViewId}}ce(e,t){var r=this.fe;if(!r)return{$pageview_id:t};var s={$pageview_id:t,$prev_pageview_id:r.pageViewId},o=this._instance.scrollManager.getContext();if(o&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:l,lastScrollY:d,maxScrollY:p,maxContentHeight:g,lastContentY:v,maxContentY:w}=o;if(!(V(l)||V(d)||V(p)||V(g)||V(v)||V(w))){l=Math.ceil(l),d=Math.ceil(d),p=Math.ceil(p),g=Math.ceil(g),v=Math.ceil(v),w=Math.ceil(w);var b=l<=1?1:zt(d/l,0,1,Q),I=l<=1?1:zt(p/l,0,1,Q),R=g<=1?1:zt(v/g,0,1,Q),M=g<=1?1:zt(w/g,0,1,Q);s=lt(s,{$prev_pageview_last_scroll:d,$prev_pageview_last_scroll_percentage:b,$prev_pageview_max_scroll:p,$prev_pageview_max_scroll_percentage:I,$prev_pageview_last_content:v,$prev_pageview_last_content_percentage:R,$prev_pageview_max_content:w,$prev_pageview_max_content_percentage:M})}}return r.pathname&&(s.$prev_pageview_pathname=r.pathname),r.timestamp&&(s.$prev_pageview_duration=(e.getTime()-r.timestamp.getTime())/1e3),s}}var Dh=function(n){var e,t,r,s,o="";for(e=t=0,r=(n=(n+"").replace(/\r\n/g,` 17`).replace(/\r/g,` 18`)).length,s=0;s<r;s++){var l=n.charCodeAt(s),d=null;l<128?t++:d=l>127&&l<2048?String.fromCharCode(l>>6|192,63&l|128):String.fromCharCode(l>>12|224,l>>6&63|128,63&l|128),Cr(d)||(t>e&&(o+=n.substring(e,t)),o+=d,e=t=s+1)}return t>e&&(o+=n.substring(e,n.length)),o},Ph=!!As||!!Rs,wl="text/plain",Oi=(n,e)=>{var[t,r]=n.split("?"),s=Z({},e);r==null||r.split("&").forEach((l=>{var[d]=l.split("=");delete s[d]}));var o=$d(s);return t+"?"+(o=o?(r?r+"&":"")+o:r)},Nn=(n,e)=>JSON.stringify(n,((t,r)=>typeof r=="bigint"?r.toString():r),e),Cs=n=>
18{var{data:e,compression:t}=n;if(e){if(t===Ir.GZipJS){var r=wu(Su(Nn(e)),{mtime:0}),s=new Blob([r],{type:wl});return{contentType:wl,body:s,estimatedSize:s.size}}if(t===Ir.Base64){var o=(function(p){var g,v,w,b,I,R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",M=0,H=0,X="",q=[];if(!p)return p;p=Dh(p);do g=(I=p.charCodeAt(M++)<<16|p.charCodeAt(M++)<<8|p.charCodeAt(M++))>>18&63,v=I>>12&63,w=I>>6&63,b=63&I,q[H++]=R.charAt(g)+R.charAt(v)+R.charAt(w)+R.charAt(b);while(M<p.length);switch(X=q.join(""),p.length%3){case 1:X=X.slice(0,-2)+"==";break;case 2:X=X.slice(0,-1)+"="}return X})(Nn(e)),l=(p=>"data="+encodeURIComponent(typeof p=="string"?p:Nn(p)))(o);return{contentType:"application/x-www-form-urlencoded",body:l,estimatedSize:new Blob([l]).size}}var d=Nn(e);return{contentType:"application/json",body:d,estimatedSize:new Blob([d]).size}}},vi=[];Rs&&vi.push({transport:"fetch",method:n=>{var e,t,{contentType:r,body:s,estimatedSize:o}=(e=Cs(n))!==null&&e!==void 0?e:{},l=new Headers;Ye(n.headers,(function(v,w){l.append(w,v)})),r&&l.append("Content-Type",r);var d=n.url,p=null;if(No){var g=new No;p={signal:g.signal,timeout:setTimeout((()=>g.abort()),n.timeout)}}Rs(d,Z({method:(n==null?void 0:n.method)||"GET",headers:l,keepalive:n.method==="POST"&&(o||0)<52428.8,body:s,signal:(t=p)==null?void 0:t.signal},n.fetchOptions)).then((v=>v.text().then((w=>{var b={statusCode:v.status,text:w};if(v.status===200)try{b.json=JSON.parse(w)}catch(I){Q.error(I)}n.callback==null||n.callback(b)})))).catch((v=>{Q.error(v),n.callback==null||n.callback({statusCode:0,text:v})})).finally((()=>p?clearTimeout(p.timeout):null))}}),As&&vi.push({transport:"XHR",method:n=>{var e,t=new As;t.open(n.method||"GET",n.url,!0);var{contentType:r,body:s}=(e=Cs(n))!==null&&e!==void 0?e:{};Ye(n.headers,(function(o,l){t.setRequestHeader(l,o)})),r&&t.setRequestHeader("Content-Type",r),n.timeout&&(t.timeout=n.timeout),n.disableXHRCredentials||(t.withCredentials=!0),t.onreadystatechange=()=>{if(t.readyState===4){var o={statusCode:t.status,text:t.responseText};if(t.status===200)try{o.json=JSON.parse(t.responseText)}catch{}n.callback==null||n.callback(o)}},t.send(s)}}),Ut!=null&&Ut.sendBeacon&&vi.push({transport:"sendBeacon",method:n=>{var e=Oi(n.url,{beacon:"1"});try{var t,{contentType:r,body:s}=(t=Cs(n))!==null&&t!==void 0?t:{},o=typeof s=="string"?new Blob([s],{type:r}):s;Ut.sendBeacon(e,o)}catch{}}});var fn=function(n,e){if(!(function(t){try{new RegExp(t)}catch{return!1}return!0})(e))return!1;try{return new RegExp(e).test(n)}catch{return!1}};function Sl(n,e,t){return Nn({distinct_id:n,userPropertiesToSet:e,userPropertiesToSetOnce:t})}var xu={exact:(n,e)=>e.some((t=>n.some((r=>t===r)))),is_not:(n,e)=>e.every((t=>n.every((r=>t!==r)))),regex:(n,e)=>e.some((t=>n.some((r=>fn(t,r))))),not_regex:(n,e)=>e.every((t=>n.every((r=>!fn(t,r))))),icontains:(n,e)=>e.map(pi).some((t=>n.map(pi).some((r=>t.includes(r))))),not_icontains:(n,e)=>e.map(pi).every((t=>n.map(pi).every((r=>!t.includes(r)))))},pi=n=>n.toLowerCase(),Il=gt("[Error tracking]");class Bh{constructor(e){var t,r;this.pe=[],this.ge=new fd([new gd,new Cd,new md,new vd,new Sd,new wd,new yd,new Id],[ud,hd]),this._instance=e,this.pe=(t=(r=this._instance.persistence)==null?void 0:r.get_property(Ps))!==null&&t!==void 0?t:[]}onRemoteConfig(e){var t,r,s,o=(t=(r=e.errorTracking)==null?void 0:r.suppressionRules)!==null&&t!==void 0?t:[],l=(s=e.errorTracking)==null?void 0:s.captureExtensionExceptions;this.pe=o,this._instance.persistence&&this._instance.persistence.register({[Ps]:this.pe,[Wo]:l})}get _e(){var e,t=!!this._instance.get_property(Wo),r=this._instance.config.error_tracking.captureExtensionExceptions;return(e=r??t)!==null&&e!==void 0&&e}buildProperties(e,t){return this.ge.buildFromUnknown(e,{syntheticException:t==null?void 0:t.syntheticException,mechanism:{handled:t==null?void 0:t.handled}})}sendExceptionEvent(e){if(this.me(e))Il.info("Skipping exception capture because a suppression rule matched");else{if(this._e||!this.ye(e))return this._instance.capture("$exception",e,{_noTruncate:!0,_batchKey:"exceptionEvent"});Il.info("Skipping exception capture because it was thrown by an extension")}}me(e){var t=e.$exception_list;if(!t||!ze(t)||t.length===0)return!1;var r=t.reduce(((s,o)=>{var{type:l,value:d}=o;return at(l)&&l.length>0&&s.$exception_types.push(l),at(d)&&d.length>0&&s.$exception_values.push(d),s}),{$exception_types:[],$exception_values:[]});return this.pe.some((s=>{var o=s.values.map((l=>{var d,p=xu[l.operator],g=ze(l.value)?l.value:[l.value],v=(d=r[l.key])!==null&&d!==void 0?d:[];return g.length>0&&p(g,v)}));return s.type==="OR"?o.some(Boolean):o.every(Boolean)}))}ye(e){var t=e.$exception_list;return!(!t||!ze(t))&&t.flatMap((r=>{var s,o;return(s=(o=r.stacktrace)==null?void 0:o.frames)!==null&&s!==void 0?s:[]})).some((r=>r.filename&&r.filename.startsWith("chrome-extension://")))}}var Jt="Mobile",Ni="iOS",lr="Android",Bn="Tablet",Tu=lr+" "+Bn,Mu="iPad",Ru="Apple",Au=Ru+" Watch",$n="Safari",gn="BlackBerry",Ou="Samsung",Nu=Ou+"Browser",Fu=Ou+" Internet",zr="Chrome",$h=zr+" OS",Lu=zr+" "+Ni,_a="Internet Explorer",Du=_a+" "+Jt,ya="Opera",Hh=ya+" Mini",ba="Edge",Pu="Microsoft "+ba,ln="Firefox",Bu=ln+" "+Ni,Hn="Nintendo",jn="PlayStation",un="Xbox",$u=lr+" "+Jt,Hu=Jt+" "+$n,Fn="Windows",ta=Fn+" Phone",Cl="Nokia",ra="Ouya",ju="Generic",jh=ju+" "+Jt.toLowerCase(),Gu=ju+" "+Bn.toLowerCase(),na="Konqueror",Ft="(\\d+(\\.\\d+)?)",ks=new RegExp("Version/"+Ft),Gh=new RegExp(un,"i"),Wh=new RegExp(jn+" \\w+","i"),Yh=new RegExp(Hn+" \\w+","i"),wa=new RegExp(gn+"|PlayBook|BB10","i"),Vh={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},Uh=(n,e)=>e&&Ne(e,Ru)||(function(t){return Ne(t,$n)&&!Ne(t,zr)&&!Ne(t,lr)})(n),Wu=function(n,e){return e=e||"",Ne(n," OPR/")&&Ne(n,"Mini")?Hh:Ne(n," OPR/")?ya:wa.test(n)?gn:Ne(n,"IE"+Jt)||Ne(n,"WPDesktop")?Du:Ne(n,Nu)?Fu:Ne(n,ba)||Ne(n,"Edg/")?Pu:Ne(n,"FBIOS")?"Facebook "+Jt:Ne(n,"UCWEB")||Ne(n,"UCBrowser")?"UC Browser":Ne(n,"CriOS")?Lu:Ne(n,"CrMo")||Ne(n,zr)?zr:Ne(n,lr)&&Ne(n,$n)?$u:Ne(n,"FxiOS")?Bu:Ne(n.toLowerCase(),na.toLowerCase())?na:Uh(n,e)?Ne(n,Jt)?Hu:$n:Ne(n,ln)?ln:Ne(n,"MSIE")||Ne(n,"Trident/")?_a:Ne(n,"Gecko")?ln:""},zh={[Du]:[new RegExp("rv:"+Ft)],[Pu]:[new RegExp(ba+"?\\/"+Ft)],[zr]:[new RegExp("("+zr+"|CrMo)\\/"+Ft)],[Lu]:[new RegExp("CriOS\\/"+Ft)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Ft)],[$n]:[ks],[Hu]:[ks],[ya]:[new RegExp("(Opera|OPR)\\/"+Ft)],[ln]:[new RegExp(ln+"\\/"+Ft)],[Bu]:[new RegExp("FxiOS\\/"+Ft)],[na]:[new RegExp("Konqueror[:/]?"+Ft,"i")],[gn]:[new RegExp(gn+" "+Ft),ks],[$u]:[new RegExp("android\\s"+Ft,"i")],[Fu]:[new RegExp(Nu+"\\/"+Ft)],[_a]:[new RegExp("(rv:|MSIE )"+Ft)],Mozilla:[new RegExp("rv:"+Ft)]},qh=function(n,e){var t=Wu(n,e),r=zh[t];if(V(r))return null;for(var s=0;s<r.length;s++){var o=r[s],l=n.match(o);if(l)return parseFloat(l[l.length-2])}return null},kl=[[new RegExp(un+"; "+un+" (.*?)[);]","i"),n=>[un,n&&n[1]||""]],[new RegExp(Hn,"i"),[Hn,""]],[new RegExp(jn,"i"),[jn,""]],[wa,[gn,""]],[new RegExp(Fn,"i"),(n,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[ta,""];if(new RegExp(Jt).test(e)&&!/IEMobile\b/.test(e))return[Fn+" "+Jt,""];var t=/Windows NT ([0-9.]+)/i.exec(e);if(t&&t[1]){var r=t[1],s=Vh[r]||"";return/arm/i.test(e)&&(s="RT"),[Fn,s]}return[Fn,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,n=>{if(n&&n[3]){var e=[n[3],n[4],n[5]||"0"];return[Ni,e.join(".")]}return[Ni,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,n=>{var e="";return n&&n.length>=3&&(e=V(n[2])?n[3]:n[2]),["watchOS",e]}],[new RegExp("("+lr+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+lr+")","i"),n=>
18{if(n&&n[2]){var e=[n[2],n[3],n[4]||"0"];return[lr,e.join(".")]}return[lr,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,n=>{var e=["Mac OS X",""];if(n&&n[1]){var t=[n[1],n[2],n[3]||"0"];e[1]=t.join(".")}return e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[$h,""]],[/Linux|debian/i,["Linux",""]]],El=function(n){return Yh.test(n)?Hn:Wh.test(n)?jn:Gh.test(n)?un:new RegExp(ra,"i").test(n)?ra:new RegExp("("+ta+"|WPDesktop)","i").test(n)?ta:/iPad/.test(n)?Mu:/iPod/.test(n)?"iPod Touch":/iPhone/.test(n)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(n)?Au:wa.test(n)?gn:/(kobo)\s(ereader|touch)/i.test(n)?"Kobo":new RegExp(Cl,"i").test(n)?Cl:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(n)||/(kf[a-z]+)( bui|\)).+silk\//i.test(n)?"Kindle Fire":/(Android|ZTE)/i.test(n)?!new RegExp(Jt).test(n)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(n)?/pixel[\daxl ]{1,6}/i.test(n)&&!/pixel c/i.test(n)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(n)||/lmy47v/i.test(n)&&!/QTAQZ3/i.test(n)?lr:Tu:lr:new RegExp("(pda|"+Jt+")","i").test(n)?jh:new RegExp(Bn,"i").test(n)&&!new RegExp(Bn+" pc","i").test(n)?Gu:""},fi="https?://(.*)",$i=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],Zh=Di(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],$i),Sa="<masked>",Xh=["li_fat_id"];function Yu(n,e,t){if(!re)return{};var r,s=e?Di([],$i,t||[]):[],o=Vu(ha(re.URL,s,Sa),n),l=(r={},Ye(Xh,(function(d){var p=ur.J(d);r[d]=p||null})),r);return lt(l,o)}function Vu(n,e){var t=Zh.concat(e||[]),r={};return Ye(t,(function(s){var o=ki(n,s);r[s]=o||null})),r}function Uu(n){var e=(function(o){return o?o.search(fi+"google.([^/?]*)")===0?"google":o.search(fi+"bing.com")===0?"bing":o.search(fi+"yahoo.com")===0?"yahoo":o.search(fi+"duckduckgo.com")===0?"duckduckgo":null:null})(n),t=e!="yahoo"?"q":"p",r={};if(!Cr(e)){r.$search_engine=e;var s=re?ki(re.referrer,t):"";s.length&&(r.ph_keyword=s)}return r}function xl(){return navigator.language||navigator.userLanguage}function zu(){return(re==null?void 0:re.referrer)||"$direct"}function qu(n,e){var t=n?Di([],$i,e||[]):[],r=jt==null?void 0:jt.href.substring(0,1e3);return{r:zu().substring(0,1e3),u:r?ha(r,t,Sa):void 0}}function Zu(n){var e,{r:t,u:r}=n,s={$referrer:t,$referring_domain:t==null?void 0:t=="$direct"?"$direct":(e=hn(t))==null?void 0:e.host};if(r){s.$current_url=r;var o=hn(r);s.$host=o==null?void 0:o.host,s.$pathname=o==null?void 0:o.pathname;var l=Vu(r);lt(s,l)}if(t){var d=Uu(t);lt(s,d)}return s}function Xu(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function Kh(){try{return new Date().getTimezoneOffset()}catch{return}}function Jh(n,e){if(!Ht)return{};var t,r,s,o=n?Di([],$i,e||[]):[],[l,d]=(function(p){for(var g=0;g<kl.length;g++){var[v,w]=kl[g],b=v.exec(p),I=b&&(Xt(w)?w(b,p):w);if(I)return I}return["",""]})(Ht);return lt(la({$os:l,$os_version:d,$browser:Wu(Ht,navigator.vendor),$device:El(Ht),$device_type:(r=Ht,s=El(r),s===Mu||s===Tu||s==="Kobo"||s==="Kindle Fire"||s===Gu?Bn:s===Hn||s===un||s===jn||s===ra?"Console":s===Au?"Wearable":s?Jt:"Desktop"),$timezone:Xu(),$timezone_offset:Kh()}),{$current_url:ha(jt==null?void 0:jt.href,o,Sa),$host:jt==null?void 0:jt.host,$pathname:jt==null?void 0:jt.pathname,$raw_user_agent:Ht.length>1e3?Ht.substring(0,997)+"...":Ht,$browser_version:qh(Ht,navigator.vendor),$browser_language:xl(),$browser_language_prefix:(t=xl(),typeof t=="string"?t.split("-")[0]:void 0),$screen_height:x==null?void 0:x.screen.height,$screen_width:x==null?void 0:x.screen.width,$viewport_height:x==null?void 0:x.innerHeight,$viewport_width:x==null?void 0:x.innerWidth,$lib:"web",$lib_version:Sr.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}var or=gt("[FeatureFlags]"),Es="$active_feature_flags",rn="$override_feature_flags",Tl="$feature_flag_payloads",En="$override_feature_flag_payloads",Ml="$feature_flag_request_id",Rl=n=>{var e={};for(var[t,r]of gi(n||{}))r&&(e[t]=r);return e},Qh=n=>{var e=n.flags;return e?(n.featureFlags=Object.fromEntries(Object.keys(e).map((t=>{var r;return[t,(r=e[t].variant)!==null&&r!==void 0?r:e[t].enabled]}))),n.featureFlagPayloads=Object.fromEntries(Object.keys(e).filter((t=>e[t].enabled)).filter((t=>{var r;return(r=e[t].metadata)==null?void 0:r.payload})).map((t=>{var r;return[t,(r=e[t].metadata)==null?void 0:r.payload]})))):or.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),n},ep=(function(n){return n.FeatureFlags="feature_flags",n.Recordings="recordings",n})({});class tp{constructor(e){this.be=!1,this.we=!1,this.Se=!1,this.ke=!1,this.$e=!1,this.xe=!1,this.Ee=!1,this._instance=e,this.featureFlagEventHandlers=[]}flags(){if(this._instance.config.__preview_remote_config)this.xe=!0;else{var e=!this.Pe&&(this._instance.config.advanced_disable_feature_flags||this._instance.config.advanced_disable_feature_flags_on_first_load);this.Ie({disableFlags:e})}}get hasLoadedFlags(){return this.we}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this._instance.get_property(js),t=this._instance.get_property(rn),r=this._instance.get_property(En);if(!r&&!t)return e||{};var s=lt({},e||{}),o=[...new Set([...Object.keys(r||{}),...Object.keys(t||{})])];for(var l of o){var d,p,g=s[l],v=t==null?void 0:t[l],w=V(v)?(d=g==null?void 0:g.enabled)!==null&&d!==void 0&&d:!!v,b=V(v)?g.variant:typeof v=="string"?v:void 0,I=r==null?void 0:r[l],R=Z({},g,{enabled:w,variant:w?b??(g==null?void 0:g.variant):void 0});w!==(g==null?void 0:g.enabled)&&(R.original_enabled=g==null?void 0:g.enabled),b!==(g==null?void 0:g.variant)&&(R.original_variant=g==null?void 0:g.variant),I&&(R.metadata=Z({},g==null?void 0:g.metadata,{payload:I,original_payload:g==null||(p=g.metadata)==null?void 0:p.payload})),s[l]=R}return this.be||(or.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:r,finalDetails:s}),this.be=!0),s}getFlagVariants(){var e=this._instance.get_property(on),t=this._instance.get_property(rn);if(!t)return e||{};for(var r=lt({},e),s=Object.keys(t),o=0;o<s.length;o++)r[s[o]]=t[s[o]];return this.be||(or.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:r}),this.be=!0),r}getFlagPayloads(){var e=this._instance.get_property(Tl),t=this._instance.get_property(En);if(!t)return e||{};for(var r=lt({},e||{}),s=Object.keys(t),o=0;o<s.length;o++)r[s[o]]=t[s[o]];return this.be||(or.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:r}),this.be=!0),r}reloadFeatureFlags(){this.ke||this._instance.config.advanced_disable_feature_flags||this.Pe||(this.Pe=setTimeout((()=>{this.Ie()}),5))}Re(){clearTimeout(this.Pe),this.Pe=void 0}ensureFlagsLoaded(){this.we||this.Se||this.Pe||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.ke=e}Ie(e){var t;if(this.Re(),!this._instance.L())if(this.Se)this.$e=!0;else{var r={token:this._instance.config.token,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:Z({},((t=this._instance.persistence)==null?void 0:t.get_initial_props())||{},this._instance.get_property(An)||{}),group_properties:this._instance.get_property(Wr)};(e!=null&&e.disableFlags||this._instance.config.advanced_disable_feature_flags)&&(r.disable_flags=!0);var s=this._instance.config.__preview_remote_config,o=s?"/flags/?v=2":"/flags/?v=2&config=true",l=this._instance.config.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":"",d=this._instance.requestRouter.endpointFor("api",o+l);s&&(r.timezone=Xu()),this.Se=!0,this._instance.Te({method:"POST",url:d,data:r,compression:this._instance.config.disable_compression?void 0:Ir.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:p=>{var g,v,w=!0;if(p.statusCode===200&&(this.$e||(this.$anon_distinct_id=void 0),w=!1),this.Se=!1,this.xe||(this.xe=!0,this._instance.Ce((v=p.json)!==null&&v!==void 0?v:{})),!r.disable_flags||this.$e)if(this.Ee=!w,p.json&&(g=p.json.quotaLimited)!=null&&g.includes(ep.FeatureFlags))or.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more.");else{var b;r.disable_flags||this.receivedFeatureFlags((b=p.json)!==null&&b!==void 0?b:{},w),this.$e&&(this.$e=!1,this.Ie())}}})}}getFeatureFlag(e,t){if(t===void 0&&(t={}),this.we||this.getFlags()&&this.getFlags().length>0){var r=this.getFlagVariants()[e],s=""+r,o=this._instance.get_property(Ml)||void 0,l=this._instance.get_property(wi)||{};if((t.send_event||!("send_event"in t))&&(!(e in l)||!l[e].includes(s))){var d,p,g,v,w,b,I,R,M;ze(l[e])?l[e].push(s):l[e]=[s],(d=this._instance.persistence)==null||d.register({[wi]:l});var H=this.getFeatureFlagDetails(e),X={$feature_flag:e,$feature_flag_response:r,$feature_flag_payload:this.getFeatureFlagPayload(e)||null,$feature_flag_request_id:o,$feature_flag_bootstrapped_response:((p=this._instance.config.bootstrap)==null||(p=p.featureFlags)==null?void 0:p[e])||null,$feature_flag_bootstrapped_payload:((g=this._instance.config.bootstrap)==null||(g=g.featureFlagPayloads)==null?void 0:g[e])||null,$used_bootstrap_value:!this.Ee};V(H==null||(v=H.metadata)==null?void 0:v.version)||(X.$feature_flag_version=H.metadata.version);var q,de=(w=H==null||(b=H.reason)==null?void 0:b.description)!==null&&w!==void 0?w:H==null||(I=H.reason)==null?void 0:I.code;de&&(X.$feature_flag_reason=de),H!=null&&(R=H.metadata)!=null&&R.id&&(X.$feature_flag_id=H.metadata.id),V(H==null?void 0:H.original_variant)&&V(H==null?void 0:H.original_enabled)||(X.$feature_flag_original_response=V(H.original_variant)?H.original_enabled:H.original_variant),H!=null&&(M=H.metadata)!=null&&M.original_payload&&(X.$feature_flag_original_payload=H==null||(q=H.metadata)==null?void 0:q.original_payload),this._instance.capture("$feature_flag_called",X)}return r}or.warn('getFeatureFlag for key "'+e+`" failed. Feature flags didn't load in time.`)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){return this.getFlagPayloads()[e]}getRemoteConfigPayload(e,t){var r=this._instance.config.token;this._instance.Te({method:"POST",url:this._instance.requestRouter.endpointFor("api","/flags/?v=2&config=true"),data:{distinct_id:this._instance.get_distinct_id(),token:r},compression:this._instance.config.disable_compression?void 0:Ir.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:s=>{var o,l=(o=s.json)==null?void 0:o.featureFlagPayloads;t((l==null?void 0:l[e])||void 0)}})}isFeatureEnabled(e,t){if(t===void 0&&(t={}),this.we||this.getFlags()&&this.getFlags().length>0){var r=this.getFeatureFlag(e,t);return V(r)?void 0:!!r}or.warn('isFeatureEnabled for key "'+e+`" failed. Feature flags didn't load in time.`)}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((t=>t!==e))}receivedFeatureFlags(e,t){if(this._instance.persistence){this.we=!0;var r=this.getFlagVariants(),s=this.getFlagPayloads(),o=this.getFlagsWithDetails();(function(l,d,p,g,v){p===void 0&&(p={}),g===void 0&&(g={}),v===void 0&&(v={});var w=Qh(l),b=w.flags,I=w.featureFlags,R=w.featureFlagPayloads;if(I){var M=l.requestId;if(ze(I)){or.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var H={};if(I)for(var X=0;X<I.length;X++)H[I[X]]=!0;d&&d.register({[Es]:I,[on]:H})}else{var q=I,de=R,pe=b;l.errorsWhileComputingFlags&&(q=Z({},p,q),de=Z({},g,de),pe=Z({},v,pe)),d&&d.register(Z({[Es]:Object.keys(Rl(q)),[on]:q||{},[Tl]:de||{},[js]:pe||{}},M?{[Ml]:M}:{}))}}})(e,this._instance.persistence,r,s,o),this.Me(t)}}override(e,t){t===void 0&&(t=!1),or.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this._instance.persistence)return or.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(e===!1)return this._instance.persistence.unregister(rn),this._instance.persistence.unregister(En),void this.Me();if(e&&typeof e=="object"&&("flags"in e||"payloads"in e)){var t,r=e;if(this.be=!!((t=r.suppressWarning)!==null&&t!==void 0&&t),"flags"in r){if(r.flags===!1)this._instance.persistence.unregister(rn);else if(r.flags)if(ze(r.flags)){for(var s={},o=0;o<r.flags.length;o++)s[r.flags[o]]=!0;this._instance.persistence.register({[rn]:s}
18)}else this._instance.persistence.register({[rn]:r.flags})}return"payloads"in r&&(r.payloads===!1?this._instance.persistence.unregister(En):r.payloads&&this._instance.persistence.register({[En]:r.payloads})),void this.Me()}this.Me()}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.we){var{flags:t,flagVariants:r}=this.Oe();e(t,r)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,r){var s,o=(this._instance.get_property(Rn)||[]).find((g=>g.flagKey===e)),l={["$feature_enrollment/"+e]:t},d={$feature_flag:e,$feature_enrollment:t,$set:l};o&&(d.$early_access_feature_name=o.name),r&&(d.$feature_enrollment_stage=r),this._instance.capture("$feature_enrollment_update",d),this.setPersonPropertiesForFlags(l,!1);var p=Z({},this.getFlagVariants(),{[e]:t});(s=this._instance.persistence)==null||s.register({[Es]:Object.keys(Rl(p)),[on]:p}),this.Me()}getEarlyAccessFeatures(e,t,r){t===void 0&&(t=!1);var s=this._instance.get_property(Rn),o=r?"&"+r.map((l=>"stage="+l)).join("&"):"";if(s&&!t)return e(s);this._instance.Te({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this._instance.config.token+o),method:"GET",callback:l=>{var d,p;if(l.json){var g=l.json.earlyAccessFeatures;return(d=this._instance.persistence)==null||d.unregister(Rn),(p=this._instance.persistence)==null||p.register({[Rn]:g}),e(g)}}})}Oe(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter((r=>t[r])),flagVariants:Object.keys(t).filter((r=>t[r])).reduce(((r,s)=>(r[s]=t[s],r)),{})}}Me(e){var{flags:t,flagVariants:r}=this.Oe();this.featureFlagEventHandlers.forEach((s=>s(t,r,{errorsLoading:e})))}setPersonPropertiesForFlags(e,t){t===void 0&&(t=!0);var r=this._instance.get_property(An)||{};this._instance.register({[An]:Z({},r,e)}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(An)}setGroupPropertiesForFlags(e,t){t===void 0&&(t=!0);var r=this._instance.get_property(Wr)||{};Object.keys(r).length!==0&&Object.keys(r).forEach((s=>{r[s]=Z({},r[s],e[s]),delete e[s]})),this._instance.register({[Wr]:Z({},r,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this._instance.get_property(Wr)||{};this._instance.register({[Wr]:Z({},t,{[e]:{}})})}else this._instance.unregister(Wr)}reset(){this.we=!1,this.Se=!1,this.ke=!1,this.$e=!1,this.xe=!1,this.Ee=!1,this.$anon_distinct_id=void 0,this.Re(),this.be=!1}}var rp=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class xs{constructor(e,t){this.A=e,this.props={},this.Fe=!1,this.Ae=(r=>{var s="";return r.token&&(s=r.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),r.persistence_name?"ph_"+r.persistence_name:"ph_"+s+"_posthog"})(e),this.it=this.De(e),this.load(),e.debug&&Q.info("Persistence loaded",e.persistence,Z({},this.props)),this.update_config(e,e,t),this.save()}isDisabled(){return!!this.je}De(e){rp.indexOf(e.persistence.toLowerCase())===-1&&(Q.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t=e.persistence.toLowerCase();return t==="localstorage"&&ft.G()?ft:t==="localstorage+cookie"&&li.G()?li:t==="sessionstorage"&&It.G()?It:t==="memory"?Xd:t==="cookie"?ur:li.G()?li:ur}properties(){var e={};return Ye(this.props,(function(t,r){if(r===on&&st(t))for(var s=Object.keys(t),o=0;o<s.length;o++)e["$feature/"+s[o]]=t[s[o]];else d=r,p=!1,(Cr(l=Rd)?p:Oo&&l.indexOf===Oo?l.indexOf(d)!=-1:(Ye(l,(function(g){if(p||(p=g===d))return yi})),p))||(e[r]=t);var l,d,p})),e}load(){if(!this.je){var e=this.it.K(this.Ae);e&&(this.props=lt({},e))}}save(){this.je||this.it.Y(this.Ae,this.props,this.Le,this.Ne,this.Ue,this.A.debug)}remove(){this.it.X(this.Ae,!1),this.it.X(this.Ae,!0)}clear(){this.remove(),this.props={}}register_once(e,t,r){if(st(e)){V(t)&&(t="None"),this.Le=V(r)?this.ze:r;var s=!1;if(Ye(e,((o,l)=>{this.props.hasOwnProperty(l)&&this.props[l]!==t||(this.props[l]=o,s=!0)})),s)return this.save(),!0}return!1}register(e,t){if(st(e)){this.Le=V(t)?this.ze:t;var r=!1;if(Ye(e,((s,o)=>{e.hasOwnProperty(o)&&this.props[o]!==s&&(this.props[o]=s,r=!0)})),r)return this.save(),!0}return!1}unregister(e){e in this.props&&(delete this.props[e],this.save())}update_campaign_params(){if(!this.Fe){var e=Yu(this.A.custom_campaign_params,this.A.mask_personal_data_properties,this.A.custom_personal_data_properties);sn(la(e))||this.register(e),this.Fe=!0}}update_search_keyword(){var e;this.register((e=re==null?void 0:re.referrer)?Uu(e):{})}update_referrer_info(){var e;this.register_once({$referrer:zu(),$referring_domain:re!=null&&re.referrer&&((e=hn(re.referrer))==null?void 0:e.host)||"$direct"},void 0)}set_initial_person_info(){this.props[Vs]||this.props[Us]||this.register_once({[Si]:qu(this.A.mask_personal_data_properties,this.A.custom_personal_data_properties)},void 0)}get_initial_props(){var e={};Ye([Us,Vs],(l=>{var d=this.props[l];d&&Ye(d,(function(p,g){e["$initial_"+Os(g)]=p}))}));var t,r,s=this.props[Si];if(s){var o=(t=Zu(s),r={},Ye(t,(function(l,d){r["$initial_"+Os(d)]=l})),r);lt(e,o)}return e}safe_merge(e){return Ye(this.props,(function(t,r){r in e||(e[r]=t)})),e}update_config(e,t,r){if(this.ze=this.Le=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!r),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==t.persistence){var s=this.De(e),o=this.props;this.clear(),this.it=s,this.props=o,this.save()}}set_disabled(e){this.je=e,this.je?this.remove():this.save()}set_cross_subdomain(e){e!==this.Ne&&(this.Ne=e,this.remove(),this.save())}set_secure(e){e!==this.Ue&&(this.Ue=e,this.remove(),this.save())}set_event_timer(e,t){var r=this.props[Mn]||{};r[e]=t,this.props[Mn]=r,this.save()}remove_event_timer(e){var t=(this.props[Mn]||{})[e];return V(t)||(delete this.props[Mn][e],this.save()),t}get_property(e){return this.props[e]}set_property(e,t){this.props[e]=t,this.save()}}(function(n){return n.Button="button",n.Tab="tab",n.Selector="selector",n})({});(function(n){return n.TopLeft="top_left",n.TopRight="top_right",n.TopCenter="top_center",n.MiddleLeft="middle_left",n.MiddleRight="middle_right",n.MiddleCenter="middle_center",n.Left="left",n.Center="center",n.Right="right",n.NextToTrigger="next_to_trigger",n})({});var Ts=(function(n){return n.Popover="popover",n.API="api",n.Widget="widget",n.ExternalSurvey="external_survey",n})({});(function(n){return n.Open="open",n.MultipleChoice="multiple_choice",n.SingleChoice="single_choice",n.Rating="rating",n.Link="link",n})({});(function(n){return n.NextQuestion="next_question",n.End="end",n.ResponseBased="response_based",n.SpecificQuestion="specific_question",n})({});(function(n){return n.Once="once",n.Recurring="recurring",n.Always="always",n})({});var mi=(function(n){return n.SHOWN="survey shown",n.DISMISSED="survey dismissed",n.SENT="survey sent",n})({}),Al=(function(n){return n.SURVEY_ID="$survey_id",n.SURVEY_NAME="$survey_name",n.SURVEY_RESPONSE="$survey_response",n.SURVEY_ITERATION="$survey_iteration",n.SURVEY_ITERATION_
18START_DATE="$survey_iteration_start_date",n.SURVEY_PARTIALLY_COMPLETED="$survey_partially_completed",n.SURVEY_SUBMISSION_ID="$survey_submission_id",n.SURVEY_QUESTIONS="$survey_questions",n.SURVEY_COMPLETED="$survey_completed",n})({}),Ku=(function(n){return n.Popover="popover",n.Inline="inline",n})({});class Ju{constructor(){this.qe={},this.qe={}}on(e,t){return this.qe[e]||(this.qe[e]=[]),this.qe[e].push(t),()=>{this.qe[e]=this.qe[e].filter((r=>r!==t))}}emit(e,t){for(var r of this.qe[e]||[])r(t);for(var s of this.qe["*"]||[])s(e,t)}}class Yr{constructor(e){this.Be=new Ju,this.He=(t,r)=>this.We(t,r)&&this.Ge(t,r)&&this.Ve(t,r),this.We=(t,r)=>r==null||!r.event||(t==null?void 0:t.event)===(r==null?void 0:r.event),this._instance=e,this.Je=new Set,this.Ke=new Set}init(){var e;if(!V((e=this._instance)==null?void 0:e.Ye)){var t;(t=this._instance)==null||t.Ye(((r,s)=>{this.on(r,s)}))}}register(e){var t,r;if(!V((t=this._instance)==null?void 0:t.Ye)&&(e.forEach((l=>{var d,p;(d=this.Ke)==null||d.add(l),(p=l.steps)==null||p.forEach((g=>{var v;(v=this.Je)==null||v.add((g==null?void 0:g.event)||"")}))})),(r=this._instance)!=null&&r.autocapture)){var s,o=new Set;e.forEach((l=>{var d;(d=l.steps)==null||d.forEach((p=>{p!=null&&p.selector&&o.add(p==null?void 0:p.selector)}))})),(s=this._instance)==null||s.autocapture.setElementSelectors(o)}}on(e,t){var r;t!=null&&e.length!=0&&(this.Je.has(e)||this.Je.has(t==null?void 0:t.event))&&this.Ke&&((r=this.Ke)==null?void 0:r.size)>0&&this.Ke.forEach((s=>{this.Xe(t,s)&&this.Be.emit("actionCaptured",s.name)}))}Qe(e){this.onAction("actionCaptured",(t=>e(t)))}Xe(e,t){if((t==null?void 0:t.steps)==null)return!1;for(var r of t.steps)if(this.He(e,r))return!0;return!1}onAction(e,t){return this.Be.on(e,t)}Ge(e,t){if(t!=null&&t.url){var r,s=e==null||(r=e.properties)==null?void 0:r.$current_url;if(!s||typeof s!="string"||!Yr.Ze(s,t==null?void 0:t.url,(t==null?void 0:t.url_matching)||"contains"))return!1}return!0}static Ze(e,t,r){switch(r){case"regex":return!!x&&fn(e,t);case"exact":return t===e;case"contains":var s=Yr.tr(t).replace(/_/g,".").replace(/%/g,".*");return fn(e,s);default:return!1}}static tr(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}Ve(e,t){if((t!=null&&t.href||t!=null&&t.tag_name||t!=null&&t.text)&&!this.ir(e).some((o=>!(t!=null&&t.href&&!Yr.Ze(o.href||"",t==null?void 0:t.href,(t==null?void 0:t.href_matching)||"exact"))&&(t==null||!t.tag_name||o.tag_name===(t==null?void 0:t.tag_name))&&!(t!=null&&t.text&&!Yr.Ze(o.text||"",t==null?void 0:t.text,(t==null?void 0:t.text_matching)||"exact")&&!Yr.Ze(o.$el_text||"",t==null?void 0:t.text,(t==null?void 0:t.text_matching)||"exact")))))return!1;if(t!=null&&t.selector){var r,s=e==null||(r=e.properties)==null?void 0:r.$element_selectors;if(!s||!s.includes(t==null?void 0:t.selector))return!1}return!0}ir(e){return(e==null?void 0:e.properties.$elements)==null?[]:e==null?void 0:e.properties.$elements}}var We=gt("[Surveys]"),ia="seenSurvey_",np=(n,e)=>{var t="$survey_"+e+"/"+n.id;return n.current_iteration&&n.current_iteration>0&&(t="$survey_"+e+"/"+n.id+"/"+n.current_iteration),t},Ol=n=>{var e=""+ia+n.id;return n.current_iteration&&n.current_iteration>0&&(e=""+ia+n.id+"_"+n.current_iteration),e},ip=[Ts.Popover,Ts.Widget,Ts.API],sp={ignoreConditions:!1,ignoreDelay:!1,displayType:Ku.Popover};class ap{constructor(e){this._instance=e,this.er=new Map,this.rr=new Map}register(e){var t;V((t=this._instance)==null?void 0:t.Ye)||(this.sr(e),this.nr(e))}nr(e){var t=e.filter((r=>{var s,o;return((s=r.conditions)==null?void 0:s.actions)&&((o=r.conditions)==null||(o=o.actions)==null||(o=o.values)==null?void 0:o.length)>0}));t.length!==0&&(this.ar==null&&(this.ar=new Yr(this._instance),this.ar.init(),this.ar.Qe((r=>{this.onAction(r)}))),t.forEach((r=>{var s,o,l,d,p;r.conditions&&(s=r.conditions)!=null&&s.actions&&(o=r.conditions)!=null&&(o=o.actions)!=null&&o.values&&((l=r.conditions)==null||(l=l.actions)==null||(l=l.values)==null?void 0:l.length)>0&&((d=this.ar)==null||d.register(r.conditions.actions.values),(p=r.conditions)==null||(p=p.actions)==null||(p=p.values)==null||p.forEach((g=>{if(g&&g.name){var v=this.rr.get(g.name);
18v&&v.push(r.id),this.rr.set(g.name,v||[r.id])}})))})))}sr(e){var t;e.filter((r=>{var s,o;return((s=r.conditions)==null?void 0:s.events)&&((o=r.conditions)==null||(o=o.events)==null||(o=o.values)==null?void 0:o.length)>0})).length!==0&&((t=this._instance)==null||t.Ye(((r,s)=>{this.onEvent(r,s)})),e.forEach((r=>{var s;(s=r.conditions)==null||(s=s.events)==null||(s=s.values)==null||s.forEach((o=>{if(o&&o.name){var l=this.er.get(o.name);l&&l.push(r.id),this.er.set(o.name,l||[r.id])}}))})))}onEvent(e,t){var r,s,o=((r=this._instance)==null||(r=r.persistence)==null?void 0:r.props[oi])||[];if(mi.SHOWN===e&&t&&o.length>0){var l;We.info("survey event matched, removing survey from activated surveys",{event:e,eventPayload:t,existingActivatedSurveys:o});var d=t==null||(l=t.properties)==null?void 0:l.$survey_id;if(d){var p=o.indexOf(d);p>=0&&(o.splice(p,1),this.lr(o))}}else if(this.er.has(e)){We.info("survey event name matched",{event:e,eventPayload:t,surveys:this.er.get(e)});var g=[];(s=this._instance)==null||s.getSurveys((w=>{g=w.filter((b=>{var I;return(I=this.er.get(e))==null?void 0:I.includes(b.id)}))}));var v=g.filter((w=>{var b,I=(b=w.conditions)==null||(b=b.events)==null||(b=b.values)==null?void 0:b.find((R=>R.name===e));return!!I&&(!I.propertyFilters||Object.entries(I.propertyFilters).every((R=>{var M,[H,X]=R,q=t==null||(M=t.properties)==null?void 0:M[H];if(V(q)||Cr(q))return!1;var de=[String(q)],pe=xu[X.operator];return pe?pe(X.values,de):(We.warn("Unknown property comparison operator: "+X.operator),!1)})))}));this.lr(o.concat(v.map((w=>w.id))||[]))}}onAction(e){var t,r=((t=this._instance)==null||(t=t.persistence)==null?void 0:t.props[oi])||[];this.rr.has(e)&&this.lr(r.concat(this.rr.get(e)||[]))}lr(e){var t;We.info("updating activated surveys",{activatedSurveys:e}),(t=this._instance)==null||(t=t.persistence)==null||t.register({[oi]:[...new Set(e)]})}getSurveys(){var e,t=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[oi];return t||[]}getEventToSurveys(){return this.er}ur(){return this.ar}}class op{constructor(e){this.hr=void 0,this._surveyManager=null,this.dr=!1,this.vr=!1,this.cr=[],this._instance=e,this._surveyEventReceiver=null}onRemoteConfig(e){if(!this._instance.config.disable_surveys){var t=e.surveys;if(Be(t))return We.warn("Flags not loaded yet. Not loading surveys.");var r=ze(t);this.hr=r?t.length>0:t,We.info("flags response received, isSurveysEnabled: "+this.hr),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var r=localStorage.key(t);(r!=null&&r.startsWith(ia)||r!=null&&r.startsWith("inProgressSurvey_"))&&e.push(r)}e.forEach((s=>localStorage.removeItem(s)))}loadIfEnabled(){if(!this._surveyManager)if(this.vr)We.info("Already initializing surveys, skipping...");else if(this._instance.config.disable_surveys)We.info("Disabled. Not loading surveys.");else if(this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())We.info("Not loading surveys in cookieless mode without consent.");else{var e=be==null?void 0:be.__PosthogExtensions__;if(e){if(!V(this.hr)||this._instance.config.advanced_enable_surveys){var t=this.hr||this._instance.config.advanced_enable_surveys;this.vr=!0;try{var r=e.generateSurveys;if(r)return void this.pr(r,t);var s=e.loadExternalDependency;if(!s)return void this.gr("PostHog loadExternalDependency extension not found.");s(this._instance,"surveys",(o=>{o||!e.generateSurveys?this.gr("Could not load surveys script",o):this.pr(e.generateSurveys,t)}))}catch(o){throw this.gr("Error initializing surveys",o),o}finally{this.vr=!1}}}else We.error("PostHog Extensions not found.")}}pr(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new ap(this._instance),We.info("Surveys loaded successfully"),this._r({isLoaded:!0})}gr(e,t){We.error(e,t),this._r({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.cr.push(e),this._surveyManager&&this._r({isLoaded:!0}),()=>{this.cr=this.cr.filter((t=>t!==e))}}getSurveys(e,t){if(t===void 0&&(t=!1),this._instance.config.disable_surveys)return We.info("Disabled. Not loading surveys."),e([]);var r=this._instance.get_property(Gs);if(r&&!t)return e(r,{isLoaded:!0});if(this.dr)return e([],{isLoaded:!1,error:"Surveys are already being loaded"});try{this.dr=!0,this._instance.Te({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this._instance.config.token),method:"GET",timeout:this._instance.config.surveys_request_timeout_ms,callback:s=>{var o;this.dr=!1;var l=s.statusCode;if(l!==200||!s.json){var d="Surveys API could not be loaded, status: "+l;return We.error(d),e([],{isLoaded:!1,error:d})}var p,g=s.json.surveys||[],v=g.filter((w=>(function(b){return!(!b.start_date||b.end_date)})(w)&&((function(b){var I;return!((I=b.conditions)==null||(I=I.events)==null||(I=I.values)==null||!I.length)})(w)||(function(b){var I;return!((I=b.conditions)==null||(I=I.actions)==null||(I=I.values)==null||!I.length)})(w))));return v.length>0&&((p=this._surveyEventReceiver)==null||p.register(v)),(o=this._instance.persistence)==null||o.register({[Gs]:g}),e(g,{isLoaded:!0})}})}catch(s){throw this.dr=!1,s}}_r(e){for(var t of this.cr)try{if(!e.isLoaded)return t([],e);
18this.getSurveys(t)}catch(r){We.error("Error in survey callback",r)}}getActiveMatchingSurveys(e,t){if(t===void 0&&(t=!1),!Be(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);We.warn("init was not called")}mr(e){var t=null;return this.getSurveys((r=>{var s;t=(s=r.find((o=>o.id===e)))!==null&&s!==void 0?s:null})),t}yr(e){if(Be(this._surveyManager))return{eligible:!1,reason:"SDK is not enabled or survey functionality is not yet loaded"};var t=typeof e=="string"?this.mr(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(Be(this._surveyManager))return We.warn("init was not called"),{visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"};var t=this.yr(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return Be(this._surveyManager)?(We.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"})):new Promise((r=>{this.getSurveys((s=>{var o,l=(o=s.find((p=>p.id===e)))!==null&&o!==void 0?o:null;if(l){var d=this.yr(l);r({visible:d.eligible,disabledReason:d.reason})}else r({visible:!1,disabledReason:"Survey not found"})}),t)}))}renderSurvey(e,t){var r;if(Be(this._surveyManager))We.warn("init was not called");else{var s=typeof e=="string"?this.mr(e):e;if(s!=null&&s.id)if(ip.includes(s.type)){var o=re==null?void 0:re.querySelector(t);if(o)return(r=s.appearance)!=null&&r.surveyPopupDelaySeconds?(We.info("Rendering survey "+s.id+" with delay of "+s.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((()=>{var l,d;We.info("Rendering survey "+s.id+" with delay of "+((l=s.appearance)==null?void 0:l.surveyPopupDelaySeconds)+" seconds"),(d=this._surveyManager)==null||d.renderSurvey(s,o),We.info("Survey "+s.id+" rendered")}),1e3*s.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(s,o);We.warn("Survey element not found")}else We.warn("Surveys of type "+s.type+" cannot be rendered in the app");else We.warn("Survey not found")}}displaySurvey(e,t){var r;if(Be(this._surveyManager))We.warn("init was not called");else{var s=this.mr(e);if(s){var o=s;if((r=s.appearance)!=null&&r.surveyPopupDelaySeconds&&t.ignoreDelay&&(o=Z({},s,{appearance:Z({},s.appearance,{surveyPopupDelaySeconds:0})})),t.ignoreConditions===!1){var l=this.canRenderSurvey(s);if(!l.visible)return void We.warn("Survey is not eligible to be displayed: ",l.disabledReason)}t.displayType!==Ku.Inline?this._surveyManager.handlePopoverSurvey(o):this.renderSurvey(o,t.selector)}else We.warn("Survey not found")}}}var Nl=gt("[RateLimiter]");class lp{constructor(e){var t,r;this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=s=>{var o=s.text;if(o&&o.length)try{(JSON.parse(o).quota_limited||[]).forEach((l=>{Nl.info((l||"events")+" is quota limited."),this.serverLimits[l]=new Date().getTime()+6e4}))}catch(l){return void Nl.warn('could not rate limit - continuing. Error: "'+(l==null?void 0:l.message)+'"',{text:o})}},this.instance=e,this.captureEventsPerSecond=((t=e.config.rate_limiting)==null?void 0:t.events_per_second)||10,this.captureEventsBurstLimit=Math.max(((r=e.config.rate_limiting)==null?void 0:r.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond),this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}clientRateLimitContext(e){var t,r,s;e===void 0&&(e=!1);var o=new Date().getTime(),l=(t=(r=this.instance.persistence)==null?void 0:r.get_property(Ys))!==null&&t!==void 0?t:{tokens:this.captureEventsBurstLimit,last:o};l.tokens+=(o-l.last)/1e3*this.captureEventsPerSecond,l.last=o,l.tokens>this.captureEventsBurstLimit&&(l.tokens=this.captureEventsBurstLimit);var d=l.tokens<1;return d||e||(l.tokens=Math.max(0,l.tokens-1)),!d||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+this.captureEventsPerSecond+" events per second and "+this.captureEventsBurstLimit+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=d,(s=this.instance.persistence)==null||s.set_property(Ys,l),{isRateLimited:d,remainingTokens:l.tokens}
18}isServerRateLimited(e){var t=this.serverLimits[e||"events"]||!1;return t!==!1&&new Date().getTime()<t}}var Gr=gt("[RemoteConfig]");class up{constructor(e){this._instance=e}get remoteConfig(){var e;return(e=be._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.config}br(e){var t,r;(t=be.__PosthogExtensions__)!=null&&t.loadExternalDependency?(r=be.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"remote-config",(()=>e(this.remoteConfig))):(Gr.error("PostHog Extensions not found. Cannot load remote config."),e())}wr(e){this._instance.Te({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback:t=>{e(t.json)}})}load(){try{if(this.remoteConfig)return Gr.info("Using preloaded remote config",this.remoteConfig),void this.Ce(this.remoteConfig);if(this._instance.L())return void Gr.warn("Remote config is disabled. Falling back to local config.");this.br((e=>{if(!e)return Gr.info("No config found after loading remote JS config. Falling back to JSON."),void this.wr((t=>{this.Ce(t)}));this.Ce(e)}))}catch(e){Gr.error("Error loading remote config",e)}}Ce(e){e?this._instance.config.__preview_remote_config?(this._instance.Ce(e),e.hasFeatureFlags!==!1&&this._instance.featureFlags.ensureFlagsLoaded()):Gr.info("__preview_remote_config is disabled. Logging config instead",e):Gr.error("Failed to fetch remote config from PostHog.")}}var sa=3e3;class cp{constructor(e,t){this.Sr=!0,this.kr=[],this.$r=zt((t==null?void 0:t.flush_interval_ms)||sa,250,5e3,Q.createLogger("flush interval"),sa),this.Er=e}enqueue(e){this.kr.push(e),this.Pr||this.Ir()}unload(){this.Rr();var e=this.kr.length>0?this.Tr():{},t=Object.values(e);[...t.filter((r=>r.url.indexOf("/e")===0)),...t.filter((r=>r.url.indexOf("/e")!==0))].map((r=>{this.Er(Z({},r,{transport:"sendBeacon"}))}))}enable(){this.Sr=!1,this.Ir()}Ir(){var e=this;this.Sr||(this.Pr=setTimeout((()=>{if(this.Rr(),this.kr.length>0){var t=this.Tr(),r=function(){var o=t[s],l=new Date().getTime();o.data&&ze(o.data)&&Ye(o.data,(d=>{d.offset=Math.abs(d.timestamp-l),delete d.timestamp})),e.Er(o)};for(var s in t)r()}}),this.$r))}Rr(){clearTimeout(this.Pr),this.Pr=void 0}Tr(){var e={};return Ye(this.kr,(t=>{var r,s=t,o=(s?s.batchKey:null)||s.url;V(e[o])&&(e[o]=Z({},s,{data:[]})),(r=e[o].data)==null||r.push(s.data)})),this.kr=[],e}}var dp=["retriesPerformedSoFar"];class hp{constructor(e){this.Cr=!1,this.Mr=3e3,this.kr=[],this._instance=e,this.kr=[],this.Or=!0,!V(x)&&"onLine"in x.navigator&&(this.Or=x.navigator.onLine,et(x,"online",(()=>{this.Or=!0,this.ne()})),et(x,"offline",(()=>{this.Or=!1})))}get length(){return this.kr.length}retriableRequest(e){var{retriesPerformedSoFar:t}=e,r=Wl(e,dp);Tt(t)&&t>0&&(r.url=Oi(r.url,{retry_count:t})),this._instance.Te(Z({},r,{callback:s=>{s.statusCode!==200&&(s.statusCode<400||s.statusCode>=500)&&(t??0)<10?this.Fr(Z({retriesPerformedSoFar:t},r)):r.callback==null||r.callback(s)}}))}Fr(e){var t=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=t+1;var r=(function(l){var d=3e3*Math.pow(2,l),p=d/2,g=Math.min(18e5,d),v=(Math.random()-.5)*(g-p);return Math.ceil(g+v)})(t),s=Date.now()+r;this.kr.push({retryAt:s,requestOptions:e});var o="Enqueued failed request for retry in "+r;navigator.onLine||(o+=" (Browser is offline)"),Q.warn(o),this.Cr||(this.Cr=!0,this.Ar())}Ar(){this.Dr&&clearTimeout(this.Dr),this.Dr=setTimeout((()=>{this.Or&&this.kr.length>0&&this.ne(),this.Ar()}),this.Mr)}ne(){var e=Date.now(),t=[],r=this.kr.filter((o=>o.retryAt<e||(t.push(o),!1)));if(this.kr=t,r.length>0)for(var{requestOptions:s}of r)this.retriableRequest(s)}unload(){for(var{requestOptions:e}of(this.Dr&&(clearTimeout(this.Dr),this.Dr=void 0),this.kr))try{this._instance.Te(Z({},e,{transport:"sendBeacon"}))}catch(t){Q.error(t)}this.kr=[]}}class pp{constructor(e){this.jr=()=>{var t,r,s,o;this.Lr||(this.Lr={});var l=this.scrollElement(),d=this.scrollY(),p=l?Math.max(0,l.scrollHeight-l.clientHeight):0,g=d+((l==null?void 0:l.clientHeight)||0),v=(l==null?void 0:l.scrollHeight)||0;this.Lr.lastScrollY=Math.ceil(d),this.Lr.maxScrollY=Math.max(d,(t=this.Lr.maxScrollY)!==null&&t!==void 0?t:0),this.Lr.maxScrollHeight=Math.max(p,(r=this.Lr.maxScrollHeight)!==null&&r!==void 0?r:0),this.Lr.lastContentY=g,this.Lr.maxContentY=Math.max(g,(s=this.Lr.maxContentY)!==null&&s!==void 0?s:0),this.Lr.maxContentHeight=Math.max(v,(o=this.Lr.maxContentHeight)!==null&&o!==void 0?o:0)},this._instance=e}getContext(){return this.Lr}resetContext(){var e=this.Lr;return setTimeout(this.jr,0),e}
18startMeasuringScrollPosition(){et(x,"scroll",this.jr,{capture:!0}),et(x,"scrollend",this.jr,{capture:!0}),et(x,"resize",this.jr)}scrollElement(){if(!this._instance.config.scroll_root_selector)return x==null?void 0:x.document.documentElement;var e=ze(this._instance.config.scroll_root_selector)?this._instance.config.scroll_root_selector:[this._instance.config.scroll_root_selector];for(var t of e){var r=x==null?void 0:x.document.querySelector(t);if(r)return r}}scrollY(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollTop||0}return x&&(x.scrollY||x.pageYOffset||x.document.documentElement.scrollTop)||0}scrollX(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollLeft||0}return x&&(x.scrollX||x.pageXOffset||x.document.documentElement.scrollLeft)||0}}var fp=n=>qu(n==null?void 0:n.config.mask_personal_data_properties,n==null?void 0:n.config.custom_personal_data_properties);class Fl{constructor(e,t,r,s){this.Nr=o=>{var l=this.Ur();if(!l||l.sessionId!==o){var d={sessionId:o,props:this.zr(this._instance)};this.qr.register({[Ws]:d})}},this._instance=e,this.Br=t,this.qr=r,this.zr=s||fp,this.Br.onSessionId(this.Nr)}Ur(){return this.qr.props[Ws]}getSetOnceProps(){var e,t=(e=this.Ur())==null?void 0:e.props;return t?"r"in t?Zu(t):{$referring_domain:t.referringDomain,$pathname:t.initialPathName,utm_source:t.utm_source,utm_campaign:t.utm_campaign,utm_medium:t.utm_medium,utm_content:t.utm_content,utm_term:t.utm_term}:{}}getSessionProps(){var e={};return Ye(la(this.getSetOnceProps()),((t,r)=>{r==="$current_url"&&(r="url"),e["$session_entry_"+Os(r)]=t})),e}}var Ms=gt("[SessionId]");class Ll{constructor(e,t,r){var s;if(this.Hr=[],this.Wr=(v,w)=>Math.abs(v-w)>this.sessionTimeoutMs,!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode==="always")throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.A=e.config,this.qr=e.persistence,this.pi=void 0,this.Ft=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.Gr=t||Nr,this.Vr=r||Nr;var o=this.A.persistence_name||this.A.token,l=this.A.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*zt(l,60,36e3,Ms.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.Jr(),this.Kr="ph_"+o+"_window_id",this.Yr="ph_"+o+"_primary_window_exists",this.Xr()){var d=It.K(this.Kr),p=It.K(this.Yr);d&&!p?this.pi=d:It.X(this.Kr),It.Y(this.Yr,!0)}if((s=this.A.bootstrap)!=null&&s.sessionID)try{var g=(v=>{var w=v.replace(/-/g,"");if(w.length!==32)throw new Error("Not a valid UUID");if(w[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(w.substring(0,12),16)})(this.A.bootstrap.sessionID);this.Qr(this.A.bootstrap.sessionID,new Date().getTime(),g)}catch(v){Ms.error("Invalid sessionID in bootstrap",v)}this.Zr()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return V(this.Hr)&&(this.Hr=[]),this.Hr.push(e),this.Ft&&e(this.Ft,this.pi),()=>{this.Hr=this.Hr.filter((t=>t!==e))}}Xr(){return this.A.persistence!=="memory"&&!this.qr.je&&It.G()}ts(e){e!==this.pi&&(this.pi=e,this.Xr()&&It.Y(this.Kr,e))}es(){return this.pi?this.pi:this.Xr()?It.K(this.Kr):null}Qr(e,t,r){e===this.Ft&&t===this._sessionActivityTimestamp&&r===this._sessionStartTimestamp||(this._sessionStartTimestamp=r,this._sessionActivityTimestamp=t,this.Ft=e,this.qr.register({[bi]:[t,e,r]}))}rs(){if(this.Ft&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this.Ft,this._sessionStartTimestamp];var e=this.qr.props[bi];return ze(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.Qr(null,null,null)}Zr(){et(x,"beforeunload",(()=>
18{this.Xr()&&It.X(this.Yr)}),{capture:!1})}checkAndGetSessionAndWindowId(e,t){if(e===void 0&&(e=!1),t===void 0&&(t=null),this.A.cookieless_mode==="always")throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var r=t||new Date().getTime(),[s,o,l]=this.rs(),d=this.es(),p=Tt(l)&&l>0&&Math.abs(r-l)>864e5,g=!1,v=!o,w=!e&&this.Wr(r,s);v||w||p?(o=this.Gr(),d=this.Vr(),Ms.info("new session ID generated",{sessionId:o,windowId:d,changeReason:{noSessionId:v,activityTimeout:w,sessionPastMaximumLength:p}}),l=r,g=!0):d||(d=this.Vr(),g=!0);var b=s===0||!e||p?r:s,I=l===0?new Date().getTime():l;return this.ts(d),this.Qr(o,b,I),e||this.Jr(),g&&this.Hr.forEach((R=>R(o,d,g?{noSessionId:v,activityTimeout:w,sessionPastMaximumLength:p}:void 0))),{sessionId:o,windowId:d,sessionStartTimestamp:I,changeReason:g?{noSessionId:v,activityTimeout:w,sessionPastMaximumLength:p}:void 0,lastActivityTimestamp:s}}Jr(){clearTimeout(this.ss),this.ss=setTimeout((()=>{var[e]=this.rs();this.Wr(new Date().getTime(),e)&&this.resetSessionId()}),1.1*this.sessionTimeoutMs)}}var gp=["$set_once","$set"],Ar=gt("[SiteApps]");class vp{constructor(e){this._instance=e,this.ns=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}os(e,t){if(t){var r=this.globalsForEvent(t);this.ns.push(r),this.ns.length>1e3&&(this.ns=this.ns.slice(10))}}get siteAppLoaders(){var e;return(e=be._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.siteApps}init(){if(this.isEnabled){var e=this._instance.Ye(this.os.bind(this));this.ls=()=>{e(),this.ns=[],this.ls=void 0}}}globalsForEvent(e){var t,r,s,o,l,d,p;if(!e)throw new Error("Event payload is required");var g={},v=this._instance.get_property("$groups")||[],w=this._instance.get_property("$stored_group_properties")||{};for(var[b,I]of Object.entries(w))g[b]={id:v[b],type:b,properties:I};var{$set_once:R,$set:M}=e;return{event:Z({},Wl(e,gp),{properties:Z({},e.properties,M?{$set:Z({},(t=(r=e.properties)==null?void 0:r.$set)!==null&&t!==void 0?t:{},M)}:{},R?{$set_once:Z({},(s=(o=e.properties)==null?void 0:o.$set_once)!==null&&s!==void 0?s:{},R)}:{}),elements_chain:(l=(d=e.properties)==null?void 0:d.$elements_chain)!==null&&l!==void 0?l:"",distinct_id:(p=e.properties)==null?void 0:p.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:g}}setupSiteApp(e){var t=this.apps[e.id],r=()=>{var d;!t.errored&&this.ns.length&&(Ar.info("Processing "+this.ns.length+" events for site app with id "+e.id),this.ns.forEach((p=>t.processEvent==null?void 0:t.processEvent(p))),t.processedBuffer=!0),Object.values(this.apps).every((p=>p.processedBuffer||p.errored))&&((d=this.ls)==null||d.call(this))},s=!1,o=d=>{t.errored=!d,t.loaded=!0,Ar.info("Site app with id "+e.id+" "+(d?"loaded":"errored")),s&&r()};try{var{processEvent:l}=e.init({posthog:this._instance,callback:d=>{o(d)}});l&&(t.processEvent=l),s=!0}catch(d){Ar.error("Error while initializing PostHog app with config id "+e.id,d),o(!1)}if(s&&t.loaded)try{r()}catch(d){Ar.error("Error while processing buffered events PostHog app with config id "+e.id,d),t.errored=!0}}us(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var r of e)this.setupSiteApp(r)}hs(e){if(Object.keys(this.apps).length!==0){var t=this.globalsForEvent(e);for(var r of Object.values(this.apps))try{r.processEvent==null||r.processEvent(t)}catch(s){Ar.error("Error while processing event "+e.event+" for site app "+r.id,s)}}}onRemoteConfig(e){var t,r,s,o=this;if((t=this.siteAppLoaders)!=null&&t.length)return this.isEnabled?(this.us(),void this._instance.on("eventCaptured",(g=>this.hs(g)))):void Ar.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((r=this.ls)==null||r.call(this),(s=e.siteApps)!=null&&s.length)if(this.isEnabled){var l=function(g){var v;be["__$$ph_site_app_"+g]=o._instance,(v=be.__PosthogExtensions__)==null||v.loadSiteApp==null||v.loadSiteApp(o._instance,p,(w=>{if(w)return Ar.error("Error while initializing PostHog app with config id "+g,w)}))};for(var{id:d,url:p}of e.siteApps)l(d)}else Ar.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}var mp=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hub
18spot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],Dl=function(n,e){if(!n)return!1;var t=n.toLowerCase();return mp.concat(e||[]).some((r=>{var s=r.toLowerCase();return t.indexOf(s)!==-1}))},Qu=function(n,e){if(!n)return!1;var t=n.userAgent;if(t&&Dl(t,e))return!0;try{var r=n==null?void 0:n.userAgentData;if(r!=null&&r.brands&&r.brands.some((s=>Dl(s==null?void 0:s.brand,e))))return!0}catch{}return!!n.webdriver},Ln=(function(n){return n.US="us",n.EU="eu",n.CUSTOM="custom",n})({}),Pl="i.posthog.com";class _p{constructor(e){this.ds={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return e==="https://app.posthog.com"?"https://us.i.posthog.com":e}get uiHost(){var e,t=(e=this.instance.config.ui_host)==null?void 0:e.replace(/\/$/,"");return t||(t=this.apiHost.replace("."+Pl,".posthog.com")),t==="https://app.posthog.com"?"https://us.posthog.com":t}get region(){return this.ds[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.ds[this.apiHost]=Ln.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.ds[this.apiHost]=Ln.EU:this.ds[this.apiHost]=Ln.CUSTOM),this.ds[this.apiHost]}endpointFor(e,t){if(t===void 0&&(t=""),t&&(t=t[0]==="/"?t:"/"+t),e==="ui")return this.uiHost+t;if(this.region===Ln.CUSTOM)return this.apiHost+t;var r=Pl+t;switch(e){case"assets":return"https://"+this.region+"-assets."+r;case"api":return"https://"+this.region+"."+r}}}var yp={icontains:(n,e)=>!!x&&e.href.toLowerCase().indexOf(n.toLowerCase())>-1,not_icontains:(n,e)=>!!x&&e.href.toLowerCase().indexOf(n.toLowerCase())===-1,regex:(n,e)=>!!x&&fn(e.href,n),not_regex:(n,e)=>!!x&&!fn(e.href,n),exact:(n,e)=>e.href===n,is_not:(n,e)=>e.href!==n};class xt{constructor(e){var t=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(r){r===void 0&&(r=!1),t.getWebExperiments((s=>{xt.vs("retrieved web experiments from the server"),t.cs=new Map,s.forEac
18h((o=>{if(o.feature_flag_key){var l;t.cs&&(xt.vs("setting flag key ",o.feature_flag_key," to web experiment ",o),(l=t.cs)==null||l.set(o.feature_flag_key,o));var d=t._instance.getFeatureFlag(o.feature_flag_key);at(d)&&o.variants[d]&&t.fs(o.name,d,o.variants[d].transforms)}else if(o.variants)for(var p in o.variants){var g=o.variants[p];xt.ps(g)&&t.fs(o.name,p,g.transforms)}}))}),r)},this._instance=e,this._instance.onFeatureFlags((r=>{this.onFeatureFlags(r)}))}onFeatureFlags(e){if(this._is_bot())xt.vs("Refusing to render web experiment since the viewer is a likely bot");else if(!this._instance.config.disable_web_experiments){if(Be(this.cs))return this.cs=new Map,this.loadIfEnabled(),void this.previewWebExperiment();xt.vs("applying feature flags",e),e.forEach((t=>{var r;if(this.cs&&(r=this.cs)!=null&&r.has(t)){var s,o=this._instance.getFeatureFlag(t),l=(s=this.cs)==null?void 0:s.get(t);o&&l!=null&&l.variants[o]&&this.fs(l.name,o,l.variants[o].transforms)}}))}}previewWebExperiment(){var e=xt.getWindowLocation();if(e!=null&&e.search){var t=ki(e==null?void 0:e.search,"__experiment_id"),r=ki(e==null?void 0:e.search,"__experiment_variant");t&&r&&(xt.vs("previewing web experiments "+t+" && "+r),this.getWebExperiments((s=>{this.gs(parseInt(t),r,s)}),!1,!0))}}loadIfEnabled(){this._instance.config.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,t,r){if(this._instance.config.disable_web_experiments&&!r)return e([]);var s=this._instance.get_property("$web_experiments");if(s&&!t)return e(s);this._instance.Te({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this._instance.config.token),method:"GET",callback:o=>{if(o.statusCode!==200||!o.json)return e([]);var l=o.json.experiments||[];return e(l)}})}gs(e,t,r){var s=r.filter((o=>o.id===e));s&&s.length>0&&(xt.vs("Previewing web experiment ["+s[0].name+"] with variant ["+t+"]"),this.fs(s[0].name,t,s[0].variants[t].transforms))}static ps(e){return!Be(e.conditions)&&xt._s(e)&&xt.ys(e)}static _s(e){var t;if(Be(e.conditions)||Be((t=e.conditions)==null?void 0:t.url))return!0;var r,s,o,l=xt.getWindowLocation();return!!l&&((r=e.conditions)==null||!r.url||yp[(s=(o=e.conditions)==null?void 0:o.urlMatchType)!==null&&s!==void 0?s:"icontains"](e.conditions.url,l))}
18static getWindowLocation(){return x==null?void 0:x.location}static ys(e){var t;if(Be(e.conditions)||Be((t=e.conditions)==null?void 0:t.utm))return!0;var r=Yu();if(r.utm_source){var s,o,l,d,p,g,v,w,b=(s=e.conditions)==null||(s=s.utm)==null||!s.utm_campaign||((o=e.conditions)==null||(o=o.utm)==null?void 0:o.utm_campaign)==r.utm_campaign,I=(l=e.conditions)==null||(l=l.utm)==null||!l.utm_source||((d=e.conditions)==null||(d=d.utm)==null?void 0:d.utm_source)==r.utm_source,R=(p=e.conditions)==null||(p=p.utm)==null||!p.utm_medium||((g=e.conditions)==null||(g=g.utm)==null?void 0:g.utm_medium)==r.utm_medium,M=(v=e.conditions)==null||(v=v.utm)==null||!v.utm_term||((w=e.conditions)==null||(w=w.utm)==null?void 0:w.utm_term)==r.utm_term;return b&&R&&M&&I}return!1}static vs(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),s=1;s<t;s++)r[s-1]=arguments[s];Q.info("[WebExperiments] "+e,r)}fs(e,t,r){this._is_bot()?xt.vs("Refusing to render web experiment since the viewer is a likely bot"):t!=="control"?r.forEach((s=>{if(s.selector){var o;xt.vs("applying transform of variant "+t+" for experiment "+e+" ",s);var l=(o=document)==null?void 0:o.querySelectorAll(s.selector);l==null||l.forEach((d=>{var p=d;s.html&&(p.innerHTML=s.html),s.css&&p.setAttribute("style",s.css)}))}})):xt.vs("Control variants leave the page unmodified.")}_is_bot(){return Ut&&this._instance?Qu(Ut,this._instance.config.custom_blocked_useragents):void 0}}var bp=gt("[PostHog ExternalIntegrations]"),wp={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class Sp{constructor(e){this._instance=e}nt(e,t){var r;(r=be.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,e,(s=>{if(s)return bp.error("failed to load script",s);t()}))}startIfEnabledOrStop(){var e=this,t=function(l){var d,p,g;!s||(d=be.__PosthogExtensions__)!=null&&(d=d.integrations)!=null&&d[l]||e.nt(wp[l],(()=>{var v;(v=be.__PosthogExtensions__)==null||(v=v.integrations)==null||(v=v[l])==null||v.start(e._instance)})),!s&&(p=be.__PosthogExtensions__)!=null&&(p=p.integrations)!=null&&p[l]&&((g=be.__PosthogExtensions__)==null||(g=g.integrations)==null||(g=g[l])==null||g.stop())};for(var[r,s]of Object.entries((o=this._instance.config.integrations)!==null&&o!==void 0?o:{})){var o;t(r)}}}var aa="[SessionRecording]",xn=gt(aa);class Ip{get started(){var e;return!((e=this.bs)==null||!e.isStarted)}get status(){var e;return((e=this.bs)==null?void 0:e.status)||"lazy_loading"}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.ni=void 0,this._instance=e,!this._instance.sessionManager)throw xn.error("started without valid sessionManager"),new Error(aa+" started without valid sessionManager. This is a bug.");if(this._instance.config.cookieless_mode==="always")throw new Error(aa+' cannot be used with cookieless_mode="always"')}get qt(){var e,t=!((e=this._instance.get_property(_s))==null||!e.enabled),r=!this._instance.config.disable_session_recording,s=this._instance.config.disable_session_recording||this._instance.consent.isOptedOut();return x&&t&&r&&!s}startIfEnabledOrStop(e){var t;if(!this.qt||(t=this.bs)==null||!t.isStarted){var r=!V(Object.assign)&&!V(Array.from);this.qt&&r?(this.ws(e),xn.info("starting")):this.stopRecording()}}ws(e){var t,r,s;this.qt&&(be!=null&&(t=be.__PosthogExtensions__)!=null&&(t=t.rrweb)!=null&&t.record&&(r=be.__PosthogExtensions__)!=null&&r.initSessionRecording?this.Pi(e):(s=be.__PosthogExtensions__)==null||s.loadExternalDependency==null||s.loadExternalDependency(this._instance,this.Ii,(o=>{if(o)return xn.error("could not load recorder",o);this.Pi(e)})))}stopRecording(){var e;(e=this.bs)==null||e.stop()}ki(){var e;(e=this._instance.persistence)==null||e.unregister(an)}Ei(e){if(this._instance.persistence){var t,r,s=this._instance.persistence,o=()=>{var l=e.sessionRecording,d=l==null?void 0:l.sampleRate,p=Be(d)?null:parseFloat(d);Be(p)&&this.ki();var g=l==null?void 0:l.minimumDurationMilliseconds;s.register({[_s]:Z({enabled:!!l},l,{networkPayloadCapture:Z({capturePerformance:e.capturePerformance},l==null?void 0:l.networkPayloadCapture),canvasRecording:{enabled:l==null?void 0:l.recordCanvas,fps:l==null?void 0:l.canvasFps,quality:l==null?void 0:l.canvasQuality},sampleRate:p,minimumDurationMilliseconds:V(g)?null:g,endpoint:l==null?void 0:l.endpoint,triggerMatchType:l==null?void 0:l.triggerMatchType,masking:l==null?void 0:l.masking,urlTriggers:l==null?void 0:l.urlTriggers})})};o(),(t=this.ni)==null||t.call(this),this.ni=(r=this._instance.sessionManager)==null?void 0:r.onSessionId(o)}}onRemoteConfig(e){"sessionRecording"in e?(this.Ei(e),this.startIfEnabledOrStop()):xn.info("skipping remote config with no sessionRecording",e)}log(e,t){var r;t===void 0&&(t="log"),(r=this.bs)!=null&&r.log?this.bs.log(e,t):xn.warn("log called before recorder was ready")}get Ii(){var e,t,r=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.get_property(_s);return(r==null||(t=r.scriptConfig)==null?void 0:t.script)||"lazy-recorder"}Pi(e){var t,r;if((t=be.__PosthogExtensions__)==null||!t.initSessionRecording)throw Error("Called on script loaded before session recording is available");this.bs||(this.bs=(r=be.__PosthogExtensions__)==null?void 0:r.initSessionRecording(this._instance),this.bs._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),this.bs.start(e)}onRRwebEmit(e){var t;(t=this.bs)==null||t.onRRwebEmit==null||t.onRRwebEmit(e)}overrideLinkedFlag(){var e;(e=this.bs)==null||e.overrideLinkedFlag()}overrideSampling(){var e;(e=this.bs)==null||e.overrideSampling()}overrideTrigger(e){var t;(t=this.bs)==null||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return((e=this.bs)==null?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var r;return!((r=this.bs)==null||!r.tryAddCustomEvent(e,t))}}var Pn={},oa=()=>{},nn="posthog",ec=!Ph&&(Ht==null?void 0:Ht.indexOf("MSIE"))===-1&&(Ht==null?void 0:Ht.indexOf("Mozilla"))===-1,Bl=n=>{var e;return{api_host:"https://us.i.posthog.com",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:Md(re==null?void 0:re.location),persistence:"localStorage+cookie",persistence_name:"",loaded:oa,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageview:n!=="2025-05-24"||"history_change",capture_pageleave:"if_capture_pageview",defaults:n??"unset",debug:jt&&at(jt==null?void 0:jt.search)&&jt.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:(x==null||(e=x.location)==null?void 0:e.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,session_recording:{},mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error:t=>{var r="Bad HTTP status: "+t.statusCode+" "+t.text;Q.error(r)},get_device_id:t=>t,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:"identified_only",before_send:void 0,request_queue_config:{flush_interval_ms:sa},error_tracking:{},_onCapture:oa,__preview_eager_load_replay:!0}},$l=n=>{var e={};V(n.process_person)||(e.person_profiles=n.process_person),V(n.xhr_headers)||(e.request_headers=n.xhr_headers),V(n.cookie_name)||(e.persistence_name=n.cookie_name),V(n.disable_cookie)||(e.disable_persistence=n.disable_cookie),V(n.store_google)||(e.save_campaign_params=n.store_google),V(n.verbose)||(e.debug=n.verbose);var t=lt({},e,n);return ze(n.property_blacklist)&&(V(n.property_denylist)?t.property_denylist=n.property_blacklist:ze(n.property_denylist)?t.property_denylist=[...n.property_blacklist,...n.property_denylist]:Q.error("Invalid value for property_denylist config: "+n.property_denylist)),t};class Cp{constructor(){this.__forceAllowLocalhost=!1}get Ss(){return this.__forceAllowLocalhost}set Ss(e){Q.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class Hi{get decideEndpointWasHit(){var e,t;return(e=(t=this.featureFlags)==null?void 0:t.hasLoadedFlags)!==null&&e!==void 0&&e}get flagsEndpointWasHit(){var e,t;return(e=(t=this.featureFlags)==null?void 0:t.hasLoadedFlags)!==null&&e!==void 0&&e}constructor(){this.webPerformance=new Cp,this.ks=!1,this.version=Sr.LIB_VERSION,this.$s=new Ju,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=Bl(),this.SentryIntegration=xh,this.sentryIntegration=e=>(function(t,r){var s=Eu(t,r);return{name:ku,processEvent:o=>s(o)}})(this,e),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.xs=!1,this.Es=null,this.Ps=null,this.Is=null,this.featureFlags=new tp(this),this.toolbar=ne
18w Mh(this),this.scrollManager=new pp(this),this.pageViewManager=new Lh(this),this.surveys=new op(this),this.experiments=new xt(this),this.exceptions=new Bh(this),this.rateLimiter=new lp(this),this.requestRouter=new _p(this),this.consent=new Kd(this),this.externalIntegrations=new Sp(this),this.people={set:(e,t,r)=>{var s=at(e)?{[e]:t}:e;this.setPersonProperties(s),r==null||r({})},set_once:(e,t,r)=>{var s=at(e)?{[e]:t}:e;this.setPersonProperties(void 0,s),r==null||r({})}},this.on("eventCaptured",(e=>Q.info('send "'+(e==null?void 0:e.event)+'"',e)))}init(e,t,r){if(r&&r!==nn){var s,o=(s=Pn[r])!==null&&s!==void 0?s:new Hi;return o._init(e,t,r),Pn[r]=o,Pn[nn][r]=o,o}return this._init(e,t,r)}_init(e,t,r){var s,o;if(t===void 0&&(t={}),V(e)||Ns(e))return Q.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return Q.warn("You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},this.Rs=t,this.Ts=[],t.person_profiles&&(this.Ps=t.person_profiles),this.set_config(lt({},Bl(t.defaults),$l(t),{name:r,token:e})),this.config.on_xhr_error&&Q.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=t.disable_compression?void 0:Ir.GZipJS;var l=this.Cs();this.persistence=new xs(this.config,l),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new xs(Z({},this.config,{persistence:"sessionStorage"}),l);var d=Z({},this.persistence.props),p=Z({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Ms=new cp((de=>this.Os(de)),this.config.request_queue_config),this.Fs=new hp(this),this.__request_queue=[];var g=this.config.cookieless_mode==="always"||this.config.cookieless_mode==="on_reject"&&this.consent.isExplicitlyOptedOut();if(g||(this.sessionManager=new Ll(this),this.sessionPropsManager=new Fl(this,this.sessionManager,this.persistence)),new Ah(this).startIfEnabledOrStop(),this.siteApps=new vp(this),(s=this.siteApps)==null||s.init(),g||(this.config.__preview_eager_load_replay?this.sessionRecording=new vl(this):this.sessionRecording=new Ip(this),this.sessionRecording.startIfEnabledOrStop()),this.config.disable_scroll_properties||this.scrollManager.startMeasuringScrollPosition(),this.autocapture=new Wd(this),this.autocapture.startIfEnabled(),this.surveys.loadIfEnabled(),this.heatmaps=new Fh(this),this.heatmaps.startIfEnabled(),this.webVitalsAutocapture=new Oh(this),this.exceptionObserver=new eh(this),this.exceptionObserver.startIfEnabled(),this.deadClicksAutocapture=new gu(this,Qd),this.deadClicksAutocapture.startIfEnabled(),this.historyAutocapture=new th(this),this.historyAutocapture.startIfEnabled(),Sr.DEBUG=Sr.DEBUG||this.config.debug,Sr.DEBUG&&Q.info("Starting in debug mode",{this:this,config:t,thisC:Z({},this.config),p:d,s:p}),((o=t.bootstrap)==null?void 0:o.distinctID)!==void 0){var v,w,b=this.config.get_device_id(Nr()),I=(v=t.bootstrap)!=null&&v.isIdentifiedID?b:t.bootstrap.distinctID;this.persistence.set_property(yr,(w=t.bootstrap)!=null&&w.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:t.bootstrap.distinctID,$device_id:I})}if(this.As()){var R,M,H=Object.keys(((R=t.bootstrap)==null?void 0:R.featureFlags)||{}).filter((de=>{var pe;return!((pe=t.bootstrap)==null||(pe=pe.featureFlags)==null||!pe[de])})).reduce(((de,pe)=>{var Ae;return de[pe]=((Ae=t.bootstrap)==null||(Ae=Ae.featureFlags)==null?void 0:Ae[pe])||!1,de}),{}),X=Object.keys(((M=t.bootstrap)==null?void 0:M.featureFlagPayloads)||{}).filter((de=>H[de])).reduce(((de,pe)=>{var Ae,He;return(Ae=t.bootstrap)!=null&&(Ae=Ae.featureFlagPayloads)!=null&&Ae[pe]&&(de[pe]=(He=t.bootstrap)==null||(He=He.featureFlagPayloads)==null?void 0:He[pe]),de}),{});this.featureFlags.receivedFeatureFlags({featureFlags:H,featureFlagPayloads:X})}if(g)this.register_once({distinct_id:wn,$device_id:null},"");else if(!this.get_distinct_id()){var q=this.config.get_device_id(Nr());this.register_once({distinct_id:q,$device_id:q},""),this.persistence.set_property(yr,"anonymous")}return et(x,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),this.toolbar.maybeLoadToolbar(),t.segment?Eh(this,(()=>this.Ds())):this.Ds(),Xt(this.config._onCapture)&&this.config._onCapture!==oa&&(Q.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(de=>this.config._onCapture(de.event,de)))),this.config.ip&&Q.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}Ce(e){var t,r,s,o,l,d,p,g;if(!re||!re.body)return Q.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((()=>{this.Ce(e)}),500);this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=Ne(e.supportedCompression,Ir.GZipJS)?Ir.GZipJS:Ne(e.supportedCompression,Ir.Base64)?Ir.Base64:void 0),(t=e.anal
18ytics)!=null&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.Ps?this.Ps:"identified_only"}),(r=this.siteApps)==null||r.onRemoteConfig(e),(s=this.sessionRecording)==null||s.onRemoteConfig(e),(o=this.autocapture)==null||o.onRemoteConfig(e),(l=this.heatmaps)==null||l.onRemoteConfig(e),this.surveys.onRemoteConfig(e),(d=this.webVitalsAutocapture)==null||d.onRemoteConfig(e),(p=this.exceptionObserver)==null||p.onRemoteConfig(e),this.exceptions.onRemoteConfig(e),(g=this.deadClicksAutocapture)==null||g.onRemoteConfig(e)}Ds(){try{this.config.loaded(this)}catch(e){Q.critical("`loaded` function failed",e)}this.js(),this.config.capture_pageview&&setTimeout((()=>{(this.consent.isOptedIn()||this.config.cookieless_mode==="always")&&this.Ls()}),1),new up(this).load(),this.featureFlags.flags()}js(){var e;this.is_capturing()&&this.config.request_batching&&((e=this.Ms)==null||e.enable())}_dom_loaded(){this.is_capturing()&&Fr(this.__request_queue,(e=>this.Os(e))),this.__request_queue=[],this.js()}_handle_unload(){var e,t;this.config.request_batching?(this.Ns()&&this.capture("$pageleave"),(e=this.Ms)==null||e.unload(),(t=this.Fs)==null||t.unload()):this.Ns()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}Te(e){this.__loaded&&(ec?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=Oi(e.url,{ip:this.config.ip?1:0}),e.headers=Z({},this.config.request_headers),e.compression=e.compression==="best-available"?this.compression:e.compression,e.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,(t=>{var r,s,o,l=Z({},t);l.timeout=l.timeout||6e4,l.url=Oi(l.url,{_:new Date().getTime().toString(),ver:Sr.LIB_VERSION,compression:l.compression});var d=(r=l.transport)!==null&&r!==void 0?r:"fetch",p=vi.filter((v=>!l.disableTransport||!v.transport||!l.disableTransport.includes(v.transport))),g=(s=(o=Kl(p,(v=>v.transport===d)))==null?void 0:o.method)!==null&&s!==void 0?s:p[0].method;if(!g)throw new Error("No available transport method");g(l)})(Z({},e,{callback:t=>{var r,s;this.rateLimiter.checkForLimiting(t),t.statusCode>=400&&((r=(s=this.config).on_request_error)==null||r.call(s,t)),e.callback==null||e.callback(t)}}))))}Os(e){this.Fs?this.Fs.retriableRequest(e):this.Te(e)}_execute_array(e){var t,r=[],s=[],o=[];Fr(e,(d=>{d&&(t=d[0],ze(t)?o.push(d):Xt(d)?d.call(this):ze(d)&&t==="alias"?r.push(d):ze(d)&&t.indexOf("capture")!==-1&&Xt(this[t])?o.push(d):s.push(d))}));var l=function(d,p){Fr(d,(function(g){if(ze(g[0])){var v=p;Ye(g,(function(w){v=v[w[0]].apply(v,w.slice(1))}))}else this[g[0]].apply(this,g.slice(1))}),p)};l(r,this),l(s,this),l(o,this)}As(){var e,t;return((e=this.config.bootstrap)==null?void 0:e.featureFlags)&&Object.keys((t=this.config.bootstrap)==null?void 0:t.featureFlags).length>0||!1}push(e){this._execute_array([e])}capture(e,t,r){var s;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Ms){if(this.is_capturing())if(!V(e)&&at(e)){if(this.config.opt_out_useragent_filter||!this._is_bot()){var o=r!=null&&r.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(o==null||!o.isRateLimited){t!=null&&t.$current_url&&!at(t==null?void 0:t.$current_url)&&(Q.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),t==null||delete t.$current_url),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var l=new Date,d=(r==null?void 0:r.timestamp)||l,p=Nr(),g={uuid:p,event:e,properties:this.calculateEventProperties(e,t||{},d,p)};o&&(g.properties.$lib_rate_limit_remaining_tokens=o.remainingTokens),r!=null&&r.$set&&(g.$set=r==null?void 0:r.$set);var v,w=this.Us(r==null?void 0:r.$set_once);if(w&&(g.$set_once=w),(g=xd(g,r!=null&&r._noTruncate?null:this.config.properties_string_max_length)).timestamp=d,V(r==null?void 0:r.timestamp)||(g.properties.$event_time_override_provided=!0,g.properties.$event_time_override_system_time=l),e===mi.DISMISSED||e===mi.SENT){var b=t==null?void 0:t[Al.SURVEY_ID],I=t==null?void 0:t[Al.SURVEY_ITERATION];v={id:b,current_iteration:I},localStorage.getItem(Ol(v))||localStorage.setItem(Ol(v),"true"),g.$set=Z({},g.$set,{[np({id:b,current_iteration:I},e===mi.SENT?"responded":"dismissed")]:!0})}var R=Z({},g.properties.$set,g.$set);if(sn(R)||this.setPersonPropertiesForFlags(R),!Be(this.config.before_send)){var M=this.zs(g);if(!M)return;g=M}this.$s.emit("eventCaptured",g);var H={method:"POST",url:(s=r==null?void 0:r._url)!==null&&s!==void 0?s:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:g,compression:"best-available",batchKey:r==null?void 0:r._batchKey};return!this.config.request_batching||r&&(r==null||!r._batchKey)||r!=null&&r.send_instantly?this.Os(H):this.Ms.enqueue(H),g}Q.critical("This capture call is ignored due to client rate limiting.")}}else Q.error("No event name provided to posthog.capture")}else Q.uninitializedWarning("posthog.capture")}Ye(e){return this.on("eventCaptured",(t=>e(t.event,t)))}calculateEventProperties(e,t,r,s,o){if(r=r||new Date,!this.persistence||!this.sessionPersistence)return t;var l=o?void 0:this.persistence.remove_event_timer(e),d=Z({},t);if(d.token=this.config.token,d.$config_defaults=this.config.defaults,(this.config.cookieless_mode=="always"||this.config.cookieless_mode=="on_reject"&&this.consent.isExplicitlyOptedOut())&&(d.$cookieless_mode=!0),e==="$snapshot"){var p=Z({},this.persistence.properties(),this.sessionPersistence.properties());return d.distinct_id=p.distinct_id,(!at(d.distinct_id)&&!Tt(d.distinct_id)||Ns(d.distinct_id))&&Q.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),d}var g,v=Jh(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:w,windowId:b}=this.sessionManager.checkAndGetSessionAndWindowId(o,r.getTime());d.$session_id=w,d.$window_id=b}this.sessionPropsManager&<(d,this.sessionPropsManager.getSessionProps());try{var I;this.sessionRecording&<(d,this.sessionRecording.sdkDebugProperties),d.$sdk_debug_retry_queue_size=(I=this.Fs)==null?void 0:I.length}catch(X){d.$sdk_debug_error_capturing_properties=String(X)}if(this.requestRouter.region===Ln.CUSTOM&&(d.$lib_custom_api_host=this.config.api_host),g=e!=="$pageview"||o?e!=="$pageleave"||o?this.pageViewM
vendor: 11,357 bytes, line 18
18anager.doEvent():this.pageViewManager.doPageLeave(r):this.pageViewManager.doPageView(r,s),d=lt(d,g),e==="$pageview"&&re&&(d.title=re.title),!V(l)){var R=r.getTime()-l;d.$duration=parseFloat((R/1e3).toFixed(3))}Ht&&this.config.opt_out_useragent_filter&&(d.$browser_type=this._is_bot()?"bot":"browser"),(d=lt({},v,this.persistence.properties(),this.sessionPersistence.properties(),d)).$is_identified=this._isIdentified(),ze(this.config.property_denylist)?Ye(this.config.property_denylist,(function(X){delete d[X]})):Q.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var M=this.config.sanitize_properties;M&&(Q.error("sanitize_properties is deprecated. Use before_send instead"),d=M(d,e));var H=this.qs();return d.$process_person_profile=H,H&&!o&&this.Bs("_calculate_event_properties"),d}Us(e){var t;if(!this.persistence||!this.qs()||this.ks)return e;var r=this.persistence.get_initial_props(),s=(t=this.sessionPropsManager)==null?void 0:t.getSetOnceProps(),o=lt({},r,s||{},e||{}),l=this.config.sanitize_properties;return l&&(Q.error("sanitize_properties is deprecated. Use before_send instead"),o=l(o,"$set_once")),this.ks=!0,sn(o)?void 0:o}register(e,t){var r;(r=this.persistence)==null||r.register(e,t)}register_once(e,t,r){var s;(s=this.persistence)==null||s.register_once(e,t,r)}register_for_session(e){var t;(t=this.sessionPersistence)==null||t.register(e)}unregister(e){var t;(t=this.persistence)==null||t.unregister(e)}unregister_for_session(e){var t;(t=this.sessionPersistence)==null||t.unregister(e)}Hs(e,t){this.register({[e]:t})}getFeatureFlag(e,t){return this.featureFlags.getFeatureFlag(e,t)}getFeatureFlagPayload(e){var t=this.featureFlags.getFeatureFlagPayload(e);try{return JSON.parse(t)}catch{return t}}isFeatureEnabled(e,t){return this.featureFlags.isFeatureEnabled(e,t)}reloadFeatureFlags(){this.featureFlags.reloadFeatureFlags()}updateEarlyAccessFeatureEnrollment(e,t,r){this.featureFlags.updateEarlyAccessFeatureEnrollment(e,t,r)}getEarlyAccessFeatures(e,t,r){return t===void 0&&(t=!1),this.featureFlags.getEarlyAccessFeatures(e,t,r)}on(e,t){return this.$s.on(e,t)}onFeatureFlags(e){return this.featureFlags.onFeatureFlags(e)}onSurveysLoaded(e){return this.surveys.onSurveysLoaded(e)}onSessionId(e){var t,r;return(t=(r=this.sessionManager)==null?void 0:r.onSessionId(e))!==null&&t!==void 0?t:()=>{}}getSurveys(e,t){t===void 0&&(t=!1),this.surveys.getSurveys(e,t)}getActiveMatchingSurveys(e,t){t===void 0&&(t=!1),this.surveys.getActiveMatchingSurveys(e,t)}renderSurvey(e,t){this.surveys.renderSurvey(e,t)}displaySurvey(e,t){t===void 0&&(t=sp),this.surveys.displaySurvey(e,t)}canRenderSurvey(e){return this.surveys.canRenderSurvey(e)}canRenderSurveyAsync(e,t){return t===void 0&&(t=!1),this.surveys.canRenderSurveyAsync(e,t)}identify(e,t,r){if(!this.__loaded||!this.persistence)return Q.uninitializedWarning("posthog.identify");if(Tt(e)&&(e=e.toString(),Q.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),e)if(["distinct_id","distinctid"].includes(e.toLowerCase()))Q.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.');else if(e!==wn){if(this.Bs("posthog.identify")){var s=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var o=s;this.register_once({$had_persisted_distinct_id:!0,$device_id:o},"")}e!==s&&e!==this.get_property(Tn)&&(this.unregister(Tn),this.register({distinct_id:e}));var l=(this.persistence.get_property(yr)||"anonymous")==="anonymous";e!==s&&l?(this.persistence.set_property(yr,"identified"),this.setPersonPropertiesForFlags(Z({},r||{},t||{}),!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:s},{$set:t||{},$set_once:r||{}}),this.Is=Sl(e,t,r),this.featureFlags.setAnonymousDistinctId(s)):(t||r)&&this.setPersonProperties(t,r),e!==s&&(this.reloadFeatureFlags(),this.unregister(wi))}}else Q.critical('The string "'+wn+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.');else Q.error("Unique user id has not been set in posthog.identify")}setPersonProperties(e,t){if((e||t)&&this.Bs("posthog.setPersonProperties")){var r=Sl(this.get_distinct_id(),e,t);this.Is!==r?(this.setPersonPropertiesForFlags(Z({},t||{},e||{})),this.capture("$set",{$set:e||{},$set_once:t||{}}),this.Is=r):Q.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(e,t,r){if(e&&t){if(this.Bs("posthog.group")){var s=this.getGroups();s[e]!==t&&this.resetGroupPropertiesForFlags(e),this.register({$groups:Z({},s,{[e]:t})}),r&&(this.capture("$groupidentify",{$group_type:e,$group_key:t,$group_set:r}),this.setGroupPropertiesForFlags({[e]:r})),s[e]===t||r||this.reloadFeatureFlags()}}else Q.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,t){t===void 0&&(t=!0),this.featureFlags.setPersonPropertiesForFlags(e,t)}resetPersonPropertiesForFlags(){this.featureFlags.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(e,t){t===void 0&&(t=!0),this.Bs("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(e,t)}resetGroupPropertiesForFlags(e){this.featureFlags.resetGroupPropertiesForFlags(e)}reset(e){var t,r,s,o;if(Q.info("reset"),!this.__loaded)return Q.uninitializedWarning("posthog.reset");var l=this.get_property("$device_id");if(this.consent.reset(),(t=this.persistence)==null||t.clear(),(r=this.sessionPersistence)==null||r.clear(),this.surveys.reset(),this.featureFlags.reset(),(s=this.persistence)==null||s.set_property(yr,"anonymous"),(o=this.sessionManager)==null||o.resetSessionId(),this.Is=null,this.config.cookieless_mode==="always")this.register_once({distinct_id:wn,$device_id:null},"");else{var d=this.config.get_device_id(Nr());this.register_once({distinct_id:d,$device_id:e?d:l},"")}this.register({$last_posthog_reset:new Date().toISOString()},1)}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,t;return(e=(t=this.sessionManager)==null?void 0:t.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&e!==void 0?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:t,sessionStartTimestamp:r}=this.sessionManager.checkAndGetSessionAndWindowId(!0),s=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+t);if(e!=null&&e.withTimestamp&&r){var o,l=(o=e.timestampLookBack)!==null&&o!==void 0?o:10;if(!r)return s;s+="?t="+Math.max(Math.floor((new Date().getTime()-r)/1e3)-l,0)}return s}alias(e,t){return e===this.get_property(Jl)?(Q.critical("Attempting to create alias for existing People user - aborting."),-2):this.Bs("posthog.alias")?(V(t)&&(t=this.get_distinct_id()),e!==t?(this.Hs(Tn,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(Q.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var t=Z({},this.config);if(st(e)){var r,s,o,l,d;lt(this.config,$l(e));var p=this.Cs();(r=this.persistence)==null||r.update_config(this.config,t,p),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new xs(Z({},this.config,{persistence:"sessionStorage"}),p),ft.G()&&ft.J("ph_debug")==="true"&&(this.config.debug=!0),this.config.debug&&(Sr.DEBUG=!0,Q.info("set_config",{config:e,oldConfig:t,newConfig:Z({},this.config)})),(s=this.sessionRecording)==null||s.startIfEnabledOrStop(),(o=this.autocapture)==null||o.startIfEnabled(),(l=this.heatmaps)==null||l.startIfEnabled(),this.surveys.loadIfEnabled(),this.Ws(),(d=this.externalIntegrations)==null||d.startIfEnabledOrStop()}}startSessionRecording(e){var t=e===!0,r={sampling:t||!(e==null||!e.sampling),linked_flag:t||!(e==null||!e.linked_flag),url_trigger:t||!(e==null||!e.url_trigger),event_trigger:t||!(e==null||!e.event_trigger)};if(Object.values(r).some(Boolean)){var s,o,l,d,p;(s=this.sessionManager)==null||s.checkAndGetSessionAndWindowId(),r.sampling&&((o=this.sessionRecording)==null||o.overrideSampling()),r.linked_flag&&((l=this.sessionRecording)==null||l.overrideLinkedFlag()),r.url_trigger&&((d=this.sessionRecording)==null||d.overrideTrigger("url")),r.event_trigger&&((p=this.sessionRecording)==null||p.overrideTrigger("event"))}this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!((e=this.sessionRecording)==null||!e.started)}captureException(e,t){var r=new Error("PostHog syntheticException"),s=this.exceptions.buildProperties(e,{handled:!0,syntheticException:r});return this.exceptions.sendExceptionEvent(Z({},s,t))}loadToolbar(e){return this.toolbar.loadToolbar(e)}get_property(e){var t;return(t=this.persistence)==null?void 0:t.props[e]}getSessionProperty(e){var t;return(t=this.sessionPersistence)==null?void 0:t.props[e]}toString(){var e,t=(e=this.config.name)!==null&&e!==void 0?e:nn;return t!==nn&&(t=nn+"."+t),t}_isIdentified(){var e,t;return((e=this.persistence)==null?void 0:e.get_property(yr))==="identified"||((t=this.sessionPersistence)==null?void 0:t.get_property(yr))==="identified"}qs(){var e,t;return!(this.config.person_profiles==="never"||this.config.person_profiles==="identified_only"&&!this._isIdentified()&&sn(this.getGroups())&&((e=this.persistence)==null||(e=e.props)==null||!e[Tn])&&((t=this.persistence)==null||(t=t.props)==null||!t[Ii]))}Ns(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.qs()||this.Bs("posthog.createPersonProfile")&&this.setPersonProperties({},{})}Bs(e){return this.config.person_profiles==="never"?(Q.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Hs(Ii,!0),!0)}Cs(){if(this.config.cookieless_mode==="always")return!0;var e=this.consent.isOptedOut(),t=this.config.opt_out_persistence_by_default||this.config.cookieless_mode==="on_reject";return this.config.disable_persistence||e&&!!t}Ws(){var e,t,r,s,o=this.Cs();return((e=this.persistence)==null?void 0:e.je)!==o&&((r=this.persistence)==null||r.set_disabled(o)),((t=this.sessionPersistence)==null?void 0:t.je)!==o&&((s=this.sessionPersistence)==null||s.set_disabled(o)),o}opt_in_capturing(e){if(this.config.cookieless_mode!=="always"){var t;this.config.cookieless_mode==="on_reject"&&this.consent.isExplicitlyOptedOut()&&(this.reset(!0),this.sessionManager=new Ll(this),this.persistence&&(this.sessionPropsManager=new Fl(this,this.sessionManager,this.persistence)),this.sessionRecording=new vl(this),this.sessionRecording.startIfEnabledOrStop()),this.consent.optInOut(!0),this.Ws(),this.config.cookieless_mode=="on_reject"&&this.surveys.loadIfEnabled(),(V(e==null?void 0:e.captureEventName)||e!=null&&e.captureEventName)&&this.capture((t=e==null?void 0:e.captureEventName)!==null&&t!==void 0?t:"$opt_in",e==null?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Ls()}
18else Q.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}opt_out_capturing(){var e;this.config.cookieless_mode!=="always"?(this.config.cookieless_mode==="on_reject"&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.Ws(),this.config.cookieless_mode==="on_reject"&&(this.register({distinct_id:wn,$device_id:null}),this.sessionManager=void 0,this.sessionPropsManager=void 0,(e=this.sessionRecording)==null||e.stopRecording(),this.sessionRecording=void 0,this.Ls())):Q.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return e===br.GRANTED?"granted":e===br.DENIED?"denied":"pending"}is_capturing(){return this.config.cookieless_mode==="always"||(this.config.cookieless_mode==="on_reject"?this.consent.isExplicitlyOptedOut()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.Ws()}_is_bot(){return Ut?Qu(Ut,this.config.custom_blocked_useragents):void 0}Ls(){re&&(re.visibilityState==="visible"?this.xs||(this.xs=!0,this.capture("$pageview",{title:re.title},{send_instantly:!0}),this.Es&&(re.removeEventListener("visibilitychange",this.Es),this.Es=null)):this.Es||(this.Es=this.Ls.bind(this),et(re,"visibilitychange",this.Es)))}debug(e){e===!1?(x==null||x.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(x==null||x.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}L(){var e,t,r,s,o,l,d,p=this.Rs||{};return"advanced_disable_flags"in p?!!p.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(Q.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(r="advanced_disable_decide",s=!1,o=Q,l=(t="advanced_disable_flags")in(e=p)&&!V(e[t]),d=r in e&&!V(e[r]),l?e[t]:d?(o&&o.warn("Config field '"+r+"' is deprecated. Please use '"+t+"' instead. The old field will be removed in a future major version."),e[r]):s)}zs(e){if(Be(this.config.before_send))return e;var t=ze(this.config.before_send)?this.config.before_send:[this.config.before_send],r=e;for(var s of t){if(r=s(r),Be(r)){var o="Event '"+e.event+"' was rejected in beforeSend function";return td(e.event)?Q.warn(o+". This can cause unexpected behavior."):Q.info(o),null}r.properties&&!sn(r.properties)||Q.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return r}getPageViewId(){var e;return(e=this.pageViewManager.fe)==null?void 0:e.pageViewId}captureTraceFeedback(e,t){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:t})}captureTraceMetric(e,t,r){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:t,$ai_metric_value:String(r)})}}(function(n,e){for(var t=0;t<e.length;t++)n.prototype[e[t]]=Ed(n.prototype[e[t]])})(Hi,["identify"]);var Hl,kp=(Hl=Pn[nn]=new Hi,(function(){function n(){n.done||(n.done=!0,ec=!1,Ye(Pn,(function(e){e._dom_loaded()})))}re!=null&&re.addEventListener?re.readyState==="complete"?n():et(re,"DOMContentLoaded",n,{capture:!1}):x&&Q.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")})(),Hl);export{kp as D};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.