PageSourceSearch

https://app.quantlink.ai/_next/static/chunks/c0bd005a273615a7.js?dpl=dpl_BCot4FAZ3ejko5F5hVPtEzNAxGst

js quantlink.ai collected 2026-10-05 12:32:12 UTC 181,210 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,445103,e=>{"use strict";let t,i;var s="u">typeof window?window:void 0,r="u">typeof globalThis?globalThis:s,n=Array.prototype,a=n.forEach,o=n.indexOf,l=null==r?void 0:r.navigator,c=null==r?void 0:r.document,u=null==r?void 0:r.location,h=null==r?void 0:r.fetch,d=null!=r&&r.XMLHttpRequest&&"withCredentials"in new r.XMLHttpRequest?r.XMLHttpRequest:void 0,p=null==r?void 0:r.AbortController,g=null==l?void 0:l.userAgent,_=null!=s?s:{},v={DEBUG:!1,LIB_VERSION:"1.272.1"};function f(e,t,i,s,r,n,a){try{var o=e[n](a),l=o.value}catch(e){return void i(e)}o.done?t(l):Promise.resolve(l).then(s,r)}function m(e){return function(){var t=this,i=arguments;return new Promise(function(s,r){var n=e.apply(t,i);function a(e){f(n,s,r,a,o,"next",e)}function o(e){f(n,s,r,a,o,"throw",e)}a(void 0)})}}function y(){return(y=Object.assign.bind()).apply(null,arguments)}function b(e,t){if(null==e)return{};var i={};for(var s in e)if(({}).hasOwnProperty.call(e,s)){if(-1!==t.indexOf(s))continue;i[s]=e[s]}return i}var w=["$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 E(e,t){return -1!==e.indexOf(t)}var k=function(e){return e.trim()},S=function(e){return e.replace(/^\$/,"")},x=Array.isArray,I=Object.prototype,R=I.hasOwnProperty,F=I.toString,$=x||function(e){return"[object Array]"===F.call(e)},P=e=>"function"==typeof e,C=e=>e===Object(e)&&!$(e),T=e=>{if(C(e)){for(var t in e)if(R.call(e,t))return!1;return!0}return!1},O=e=>void 0===e,A=e=>"[object String]"==F.call(e),M=e=>A(e)&&0===e.trim().length,L=e=>null===e,D=e=>O(e)||L(e),N=e=>"[object Number]"==F.call(e),H=e=>"[object Boolean]"===F.call(e),j=e=>E(w,e);function q(e){return null===e||"object"!=typeof e}function B(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function U(e){return!O(Event)&&function(e,t){try{return e instanceof t}catch(e){return!1}}(e,Event)}var z=[!0,"true",1,"1","yes"],G=[!1,"false",0,"0","no"];function V(e,t,i,s,r){return t>i&&(s.warn("min cannot be greater than max."),t=i),N(e)?e>i?(s.warn(" cannot be  greater than max: "+i+". Using max value instead."),i):e<t?(s.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(s.warn(" must be a number. using max or fallback. max: "+i+", fallback: "+r),V(r||i,t,i,s))}class W{constructor(e){this.t=e,this.i={},this.o=()=>{Object.keys(this.i).forEach(e=>{var t=this.h(e)+this.m;t>=this.S?delete this.i[e]:this.k(e,t)})},this.h=e=>this.i[String(e)],this.k=(e,t)=>{this.i[String(e)]=t},this.consumeRateLimit=e=>{var t,i,s=null!=(t=this.h(e))?t:this.S;if(0===(s=Math.max(s-1,0)))return!0;this.k(e,s);var r=0===s;return r&&(null==(i=this.$)||i.call(this,e)),r},this.$=this.t.$,this.S=V(this.t.bucketSize,0,100,this.t.R),this.m=V(this.t.refillRate,0,this.S,this.t.R),this.I=V(this.t.refillInterval,0,864e5,this.t.R),this.P=setInterval(()=>{this.o()},this.I)}stop(){this.P&&(clearInterval(this.P),this.P=void 0)}}var Y,J,X,K=e=>e instanceof Error;function Z(e,t,i,s){var r={platform:"web:javascript",filename:e,function:"<anonymous>"===t?"?":t,in_app:!0};return O(i)||(r.lineno=i),O(s)||(r.colno=s),r}var Q=(e,t)=>{var i=-1!==e.indexOf("safari-extension"),s=-1!==e.indexOf("safari-web-extension");return i||s?[-1!==e.indexOf("@")?e.split("@")[0]:"?",i?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},ee=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,et=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ei=/\((\S*)(?::(\d+))(?::(\d+))\)/,es=e=>{var t=ee.exec(e);if(t){var[,i,s,r]=t;return Z(i,"?",+s,+r)}var n=et.exec(e);if(n){if(n[2]&&0===n[2].indexOf("eval")){var a=ei.exec(n[2]);a&&(n[2]=a[1],n[3]=a[2],n[4]=a[3])}var[o,l]=Q(n[1]||"?",n[2]);return Z(l,o,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},er=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,en=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ea=e=>{var t=er.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){var i=en.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}var s=t[3],r=t[1]||"?";return[r,s]=Q(r,s),Z(s,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},eo=/\(error: (.*)\)/;
1class el{constructor(e,t,i){void 0===e&&(e=[]),void 0===t&&(t=[]),void 0===i&&(i=[]),this.coercers=e,this.modifiers=i,this.stackParser=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(e,i){void 0===i&&(i=0);for(var s=[],r=e.split("\n"),n=i;n<r.length;n++){var a=r[n];if(!(a.length>1024)){var o=eo.test(a)?a.replace(eo,"$1"):a;if(!o.match(/\S*Error: /)){for(var l of t){var c=l(o);if(c){s.push(c);break}}if(s.length>=50)break}}}if(!s.length)return[];var u=Array.from(s);return u.reverse(),u.slice(0,50).map(e=>y({},e,{filename:e.filename||(u[u.length-1]||{}).filename,function:e.function||"?"}))}}(...t)}buildFromUnknown(e,t){void 0===t&&(t={});var i=t&&t.mechanism||{handled:!0,type:"generic"},s=this.buildCoercingContext(i,t,0).apply(e),r=this.buildParsingContext(),n=this.parseStacktrace(s,r);return{$exception_list:this.convertToExceptionList(n,i),$exception_level:"error"}}modifyFrames(e){var t=this;return m(function*(){for(var i of e)i.stacktrace&&i.stacktrace.frames&&$(i.stacktrace.frames)&&(i.stacktrace.frames=yield t.applyModifiers(i.stacktrace.frames));return e})()}coerceFallback(e){var t;return{type:"Error",value:"Unknown error",stack:null==(t=e.syntheticException)?void 0:t.stack,synthetic:!0}}parseStacktrace(e,t){var i,s;return null!=e.cause&&(i=this.parseStacktrace(e.cause,t)),""!=e.stack&&null!=e.stack&&(s=this.applyChunkIds(this.stackParser(e.stack,+!!e.synthetic),t.chunkIdMap)),y({},e,{cause:i,stack:s})}applyChunkIds(e,t){return e.map(e=>(e.filename&&t&&(e.chunk_id=t[e.filename]),e))}applyCoercers(e,t){for(var i of this.coercers)if(i.match(e))return i.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var t=this;return m(function*(){var i=e;for(var s of t.modifiers)i=yield s(i);return i})()}convertToExceptionList(e,t){var i,s,r,n={type:e.type,value:e.value,mechanism:{type:null!=(i=t.type)?i:"generic",handled:null==(s=t.handled)||s,synthetic:null!=(r=e.synthetic)&&r}};e.stack&&(n.stacktrace={type:"raw",frames:e.stack});var a=[n];return null!=e.cause&&a.push(...this.convertToExceptionList(e.cause,y({},t,{handled:!0}))),a}buildParsingContext(){return{chunkIdMap:function(e){var t=globalThis._posthogChunkIds;if(t){var i=Object.keys(t);return X&&i.length===J||(J=i.length,X=i.reduce((i,s)=>{Y||(Y={});var r=Y[s];if(r)i[r[0]]=r[1];else for(var n=e(s),a=n.length-1;a>=0;a--){var o=n[a],l=null==o?void 0:o.filename,c=t[s];if(l&&c){i[l]=c,Y[s]=[l,c];break}}return i},{})),X}}(this.stackParser)}}buildCoercingContext(e,t,i){void 0===i&&(i=0);var s=(i,s)=>{if(s<=4){var r=this.buildCoercingContext(e,t,s);return this.applyCoercers(i,r)}};return y({},t,{syntheticException:0==i?t.syntheticException:void 0,mechanism:e,apply:e=>s(e,i),next:e=>s(e,i+1)})}}class ec{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var i=A(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:i?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 B(e,"DOMException")}isDOMError(e){return B(e,"DOMError")}}class eu{match(e){return e instanceof Error}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 i=e.message;return i.error&&"string"==typeof i.error.message?String(i.error.message):String(i)}getStack(e){return e.stacktrace||e.stack||void 0}}class eh{match(e){return B(e,"ErrorEvent")&&null!=e.error}coerce(e,t){var i;return t.apply(e.error)||{type:"ErrorEvent",value:e.message,stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}var ed=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class ep{match(e){return"string"==typeof e}coerce(e,t){var i,[s,r]=this.getInfos(e);return{type:null!=s?s:"Error",value:null!=r?r:e,stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}getInfos(e){var t="Error",i=e,s=e.match(ed);return s&&(t=s[1],i=s[2]),[t,i]}}var eg=["fatal","error","warning","log","info","debug"];function e_(e,t){void 0===t&&(t=40);var i=Object.keys(e);if(i.sort(),!i.length)return"[object has no keys]";for(var s=i.length;s>0;s--){var r=i.slice(0,s).join(", ");
1if(!(r.length>t))return s===i.length||r.length<=t?r:r.slice(0,t)+"..."}return""}class ev{match(e){return"object"==typeof e&&null!==e}coerce(e,t){var i,s=this.getErrorPropertyFromObject(e);return s?t.apply(s):{type:this.getType(e),value:this.getValue(e),stack:null==(i=t.syntheticException)?void 0:i.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return U(e)?e.constructor.name:"Error"}getValue(e){if("name"in e&&"string"==typeof e.name){var t="'"+e.name+"' captured as exception";return"message"in e&&"string"==typeof e.message&&(t+=" with message: '"+e.message+"'"),t}if("message"in e&&"string"==typeof e.message)return e.message;var i=this.getObjectClassName(e);return(i&&"Object"!==i?"'"+i+"'":"Object")+" captured as exception with keys: "+e_(e)}isSeverityLevel(e){return A(e)&&!M(e)&&eg.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var i=e[t];if(K(i))return i}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}}}class ef{match(e){return U(e)}coerce(e,t){var i,s=e.constructor.name;return{type:s,value:s+" captured as exception with keys: "+e_(e),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}class em{match(e){return q(e)}coerce(e,t){var i;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}class ey{match(e){return B(e,"PromiseRejectionEvent")}coerce(e,t){var i,s=this.getUnhandledRejectionReason(e);return q(s)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(s),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}:t.apply(s)}getUnhandledRejectionReason(e){if(q(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}}var eb=e=>{var t={T:function(t){if(s&&(v.DEBUG||_.POSTHOG_DEBUG)&&!O(s.console)&&s.console){for(var i=("__rrweb_original__"in s.console[t])?s.console[t].__rrweb_original__:s.console[t],r=arguments.length,n=Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];i(e,...n)}},info:function(){for(var e=arguments.length,i=Array(e),s=0;s<e;s++)i[s]=arguments[s];t.T("log",...i)},warn:function(){for(var e=arguments.length,i=Array(e),s=0;s<e;s++)i[s]=arguments[s];t.T("warn",...i)},error:function(){for(var e=arguments.length,i=Array(e),s=0;s<e;s++)i[s]=arguments[s];t.T("error",...i)},critical:function(){for(var t=arguments.length,i=Array(t),s=0;s<t;s++)i[s]=arguments[s];console.error(e,...i)},uninitializedWarning:e=>{t.error("You must initialize PostHog before calling "+e)},createLogger:t=>eb(e+" "+t)};return t},ew=eb("[PostHog.js]"),eE=ew.createLogger,ek=eE("[ExternalScriptsLoader]"),eS=(e,t,i)=>{if(e.config.disable_external_dependency_loading)return ek.warn(t+" was requested but loading of external scripts is disabled."),i("Loading of external scripts is disabled");var s=null==c?void 0:c.querySelectorAll("script");if(s){for(var r,n=0;n<s.length;n++)if(r=function(){if(s[n].src===t){var e=s[n];return e.__posthog_loading_callback_fired?{v:i()}:(e.addEventListener("load",t=>{e.__posthog_loading_callback_fired=!0,i(void 0,t)}),e.onerror=e=>i(e),{v:void 0})}}())return r.v}var a=()=>{if(!c)return i("document not found");var s=c.createElement("script");if(s.type="text/javascript",s.crossOrigin="anonymous",s.src=t,s.onload=e=>{s.__posthog_loading_callback_fired=!0,i(void 0,e)},s.onerror=e=>i(e),e.config.prepare_external_dependency_script&&(s=e.config.prepare_external_dependency_script(s)),!s)return i("prepare_external_dependency_script returned null");var r,n=c.querySelectorAll("body > script");n.length>0?null==(r=n[0].parentNode)||r.insertBefore(s,n[0]):c.body.appendChild(s)};null!=c&&c.body?a():null==c||c.addEventListener("DOMContentLoaded",a)};_.__PosthogExtensions__=_.__PosthogExtensions__||{},_.__PosthogExtensions__.loadExternalDependency=(e,t,i)=>{var s="/static/"+t+".js?v="+e.version;"remote-config"===t&&(s="/array/"+e.config.token+"/config.js"),"toolbar"===t&&(s=s+"&t="+3e5*Math.floor(Date.now()/3e5));var r=e.requestRouter.endpointFor("assets",s);eS(e,r,i)},_.__PosthogExtensions__.loadSiteApp=(e,t,i)=>{var s=e.requestRouter.endpointFor("api",t);eS(e,s,i)};var ex={};function eI(e,t,i){if($(e)){if(a&&e.forEach===a)e.forEach(t,i);else if("length"in e&&e.length===+e.length){for(var s=0,r=e.length;s<r;s++)if(s in e&&t.call(i,e[s],s)===ex)return}}}function eR(e,t,i){if(!D(e)){if($(e))return eI(e,t,i);if(e instanceof FormData){for(var s of e.entries())if(t.call(i,s[1],s[0])===ex)return}
vendor: 4,667 bytes, line 1
1else for(var r in e)if(R.call(e,r)&&t.call(i,e[r],r)===ex)return}}var eF=function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];return eI(i,function(t){for(var i in t)void 0!==t[i]&&(e[i]=t[i])}),e},e$=function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];return eI(i,function(t){eI(t,function(t){e.push(t)})}),e};function eP(e){for(var t=Object.keys(e),i=t.length,s=Array(i);i--;)s[i]=[t[i],e[t[i]]];return s}var eC=function(e){try{return e()}catch(e){return}},eT=function(e){return function(){try{for(var t=arguments.length,i=Array(t),s=0;s<t;s++)i[s]=arguments[s];return e.apply(this,i)}catch(e){ew.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),ew.critical(e)}}},eO=function(e){var t={};return eR(e,function(e,i){(A(e)&&e.length>0||N(e))&&(t[i]=e)}),t},eA=["herokuapp.com","vercel.app","netlify.app"];function eM(e,t){for(var i=0;i<e.length;i++)if(t(e[i]))return e[i]}function eL(e,t,i,s){var{capture:r=!1,passive:n=!0}=null!=s?s:{};null==e||e.addEventListener(t,i,{capture:r,passive:n})}var eD="$people_distinct_id",eN="__alias",eH="__timers",ej="$autocapture_disabled_server_side",eq="$heatmaps_enabled_server_side",eB="$exception_capture_enabled_server_side",eU="$error_tracking_suppression_rules",ez="$error_tracking_capture_extension_exceptions",eG="$web_vitals_enabled_server_side",eV="$dead_clicks_enabled_server_side",eW="$web_vitals_allowed_metrics",eY="$session_recording_remote_config",eJ="$session_recording_enabled_server_side",eX="$console_log_recording_enabled_server_side",eK="$session_recording_network_payload_capture",eZ="$session_recording_masking",eQ="$session_recording_canvas_recording",e0="$replay_sample_rate",e1="$replay_minimum_duration",e2="$replay_script_config",e3="$sesid",e5="$session_is_sampled",e6="$session_recording_url_trigger_activated_session",e4="$session_recording_event_trigger_activated_session",e8="$enabled_feature_flags",e7="$early_access_features",e9="$feature_flag_details",te="$stored_person_properties",tt="$stored_group_properties",ti="$surveys",ts="$surveys_activated",tr="$flag_call_reported",tn="$user_state",ta="$client_session_props",to="$capture_rate_limit",tl="$initial_campaign_params",tc="$initial_referrer_info",tu="$initial_person_info",th="$epp",td="__POSTHOG_TOOLBAR__",tp="$posthog_cookieless",tg=[eD,eN,"__cmpns",eH,eJ,eq,e3,e8,eU,tn,e7,e9,tt,te,ti,tr,ta,to,tl,tc,th,tu];function t_(e){return e instanceof Element&&(e.id===td||!(null==e.closest||!e.closest(".toolbar-global-fade-container")))}function tv(e){return!!e&&1===e.nodeType}function tf(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function tm(e){return!!e&&3===e.nodeType}function ty(e){return!!e&&11===e.nodeType}function tb(e){return e?k(e).split(/\s+/):[]}function tw(e){var t=null==s?void 0:s.location.href;return!!(t&&e&&e.some(e=>t.match(e)))}function tE(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return tb(t)}function tk(e){return D(e)?null:k(e).split(/(\s+)/).filter(e=>tj(e)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function tS(e){var t="";return tT(e)&&!tO(e)&&e.childNodes&&e.childNodes.length&&eR(e.childNodes,function(e){var i;tm(e)&&e.textContent&&(t+=null!=(i=tk(e.textContent))?i:"")}),k(t)}function tx(e){var t;return O(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null}var tI=["a","button","form","input","select","textarea","label"];function tR(e,t){if(O(t))return!0;var i,s=function(e){if(t.some(t=>e.matches(t)))return{v:!0}};for(var r of e)if(i=s(r))return i.v;return!1}function tF(e){var t=e.parentNode;return!(!t||!tv(t))&&t}var t$=[".ph-no-rageclick",".ph-no-capture"],tP=e=>!e||tf(e,"html")||!tv(e),tC=(e,t)=>{if(!s||tP(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var i=!1,r=[e],n=e;n.parentNode&&!tf(n,"body");)if(ty(n.parentNode))r.push(n.parentNode.host),n=n.parentNode.host;else{var a=tF(n);if(!a)break;if(t||tI.indexOf(a.tagName.toLowerCase())>-1)i=!0;else{var o=s.getComputedStyle(a);o&&"pointer"===o.getPropertyValue("cursor")&&(i=!0)}r.push(a),n=a}return{parentIsUsefulElement:i,targetElementList:r}};function tT(e){for(var t=e;t.parentNode&&!tf(t,"body");t=t.parentNode){var i=tE(t);if(E(i,"ph-sensitive")||E(i,"ph-no-capture"))return!1}if(E(tE(e),"ph-include"))return!0;var s=e.type||"";if(A(s))switch(s.toLowerCase()){case"hidden":case"password":return!1}
1var r=e.name||e.id||"";return!(A(r)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(r.replace(/[^a-zA-Z0-9]/g,"")))}function tO(e){return!!(tf(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||tf(e,"select")||tf(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var tA="(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})",tM=RegExp("^(?:"+tA+")$"),tL=new RegExp(tA),tD="\\d{3}-?\\d{2}-?\\d{4}",tN=RegExp("^("+tD+")$"),tH=RegExp("("+tD+")");function tj(e,t){return void 0===t&&(t=!0),!(D(e)||A(e)&&(e=k(e),(t?tM:tL).test((e||"").replace(/[- ]/g,""))||(t?tN:tH).test(e)))&&!0}function tq(e){var t=tS(e);return tj(t=(t+" "+function e(t){var i="";return t&&t.childNodes&&t.childNodes.length&&eR(t.childNodes,function(t){var s;if(t&&"span"===(null==(s=t.tagName)?void 0:s.toLowerCase()))try{var r=tS(t);i=(i+" "+r).trim(),t.childNodes&&t.childNodes.length&&(i=(i+" "+e(t)).trim())}catch(e){ew.error("[AutoCapture]",e)}}),i}(e)).trim())?t:""}function tB(e){return e.replace(/"|\\"/g,'\\"')}class tU{constructor(){this.clicks=[]}isRageClick(e,t,i){var s=this.clicks[this.clicks.length-1];if(s&&Math.abs(e-s.x)+Math.abs(t-s.y)<30&&i-s.timestamp<1e3){if(this.clicks.push({x:e,y:t,timestamp:i}),3===this.clicks.length)return!0}else this.clicks=[{x:e,y:t,timestamp:i}];return!1}}var tz="$copy_autocapture",tG=((t5={}).GZipJS="gzip-js",t5.Base64="base64",t5),tV=["localhost","127.0.0.1"],tW=e=>{var t=null==c?void 0:c.createElement("a");return O(t)?null:(t.href=e,t)},tY=function(e,t){void 0===t&&(t="&");var i,s,r=[];return eR(e,function(e,t){O(e)||O(t)||"undefined"===t||(i=encodeURIComponent(e instanceof File?e.name:e.toString()),s=encodeURIComponent(t),r[r.length]=s+"="+i)}),r.join(t)},tJ=function(e,t){for(var i,s=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),r=0;r<s.length;r++){var n=s[r].split("=");if(n[0]===t){i=n;break}}if(!$(i)||i.length<2)return"";var a=i[1];try{a=decodeURIComponent(a)}catch(e){ew.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},tX=function(e,t,i){if(!e||!t||!t.length)return e;for(var s=e.split("#"),r=s[0]||"",n=s[1],a=r.split("?"),o=a[1],l=a[0],c=(o||"").split("&"),u=[],h=0;h<c.length;h++){var d=c[h].split("=");$(d)&&(t.includes(d[0])?u.push(d[0]+"="+i):u.push(c[h]))}var p=l;return null!=o&&(p+="?"+u.join("&")),null!=n&&(p+="#"+n),p},tK=function(e,t){var i=e.match(RegExp(t+"=([^&]*)"));return i?i[1]:null},tZ=eE("[AutoCapture]");function tQ(e,t){return t.length>e?t.slice(0,e)+"...":t}class t0{constructor(e){this.C=!1,this.M=null,this.rageclicks=new tU,this.O=!1,this.instance=e,this.F=null}get A(){var e,t,i=C(this.instance.config.autocapture)?this.instance.config.autocapture:{};return i.url_allowlist=null==(e=i.url_allowlist)?void 0:e.map(e=>new RegExp(e)),i.url_ignorelist=null==(t=i.url_ignorelist)?void 0:t.map(e=>new RegExp(e)),i}D(){if(this.isBrowserSupported()){if(s&&c){var e=e=>{e=e||(null==s?void 0:s.event);try{this.j(e)}catch(e){tZ.error("Failed to capture event",e)}};if(eL(c,"submit",e,{capture:!0}),eL(c,"change",e,{capture:!0}),eL(c,"click",e,{capture:!0}),this.A.capture_copied_text){var t=e=>{e=e||(null==s?void 0:s.event),this.j(e,tz)};eL(c,"copy",t,{capture:!0}),eL(c,"cut",t,{capture:!0})}}}else tZ.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({[ej]:!!e.autocapture_opt_out}),this.M=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.F=e}getElementSelectors(e){var t,i=[];return null==(t=this.F)||t.forEach(t=>{var s=null==c?void 0:c.querySelectorAll(t);null==s||s.forEach(s=>{e===s&&i.push(t)})}),i}get isEnabled(){var e,t,i=null==(e=this.instance.persistence)?void 0:e.props[ej];if(L(this.M)&&!H(i)&&!this.instance.L())return!1;var s=null!=(t=this.M)?t:!!i;return!!this.instance.config.autocapture&&!s}j(e,t){if(void 0===t&&(t="$autocapture"),this.isEnabled){var i,r=tx(e);tm(r)&&(r=r.parentNode||null),"$autocapture"===t&&"click"===e.type&&e instanceof MouseEvent&&this.instance.config.rageclick&&null!=(i=this.rageclicks)&&i.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&function(e,t){if(!s||tP(e)||!1===(i=H(t)?!!t&&t$:null!=(r=null==t?void 0:t.css_selector_ignorelist)?r:t$))return!1;var i,r,{targetElementList:n}=tC(e,!1);return!tR(n,i)}(r,this.instance.config.rageclick)&&this.j(e,"$rageclick");var n=t===tz;if(r&&function(e,t,i,r,n){if(void 0===i&&(i=void 0),!s||tP(e)||null!=(a=i)&&a.url_allowlist&&!tw(i.url_allowlist)||null!=(o=i)&&o.url_ignorelist&&tw(i.url_ignorelist))return!1;if(null!=(l=i)&&l.dom_event_allowlist){var a,o,l,c,u=i.dom_event_allowlist;if(u&&!u.some(e=>t.type===e))return!1}var{parentIsUsefulElement:h,targetElementList:d}=tC(e,r);if(!function(e,t){var i=null==t?void 0:t.element_allowlist;if(O(i))return!0;var s,r=function(e){if(i.some(t=>e.tagName.toLowerCase()===t))return{v:!0}};for(var n of e)if(s=r(n))return s.v;return!1}(d,i)||!tR(d,null==(c=i)?void 0:c.css_selector_allowlist))return!1;var p=s.getComputedStyle(e);
1if(p&&"pointer"===p.getPropertyValue("cursor")&&"click"===t.type)return!0;var g=e.tagName.toLowerCase();switch(g){case"html":return!1;case"form":return(n||["submit"]).indexOf(t.type)>=0;case"input":case"select":case"textarea":return(n||["change","click"]).indexOf(t.type)>=0;default:return h?(n||["click"]).indexOf(t.type)>=0:(n||["click"]).indexOf(t.type)>=0&&(tI.indexOf(g)>-1||"true"===e.getAttribute("contenteditable"))}}(r,e,this.A,n,n?["copy","cut"]:void 0)){var{props:a,explicitNoCapture:o}=function(e,t){for(var i,r,{e:n,maskAllElementAttributes:a,maskAllText:o,elementAttributeIgnoreList:l,elementsChainAsString:c}=t,u=[e],h=e;h.parentNode&&!tf(h,"body");)ty(h.parentNode)?(u.push(h.parentNode.host),h=h.parentNode.host):(u.push(h.parentNode),h=h.parentNode);var d,p=[],g={},_=!1,v=!1;if(eR(u,e=>{var t=tT(e);"a"===e.tagName.toLowerCase()&&(_=e.getAttribute("href"),_=t&&_&&tj(_)&&_),E(tE(e),"ph-no-capture")&&(v=!0),p.push(function(e,t,i,s){var r=e.tagName.toLowerCase(),n={tag_name:r};tI.indexOf(r)>-1&&!i&&("a"===r.toLowerCase()||"button"===r.toLowerCase()?n.$el_text=tQ(1024,tq(e)):n.$el_text=tQ(1024,tS(e)));var a=tE(e);a.length>0&&(n.classes=a.filter(function(e){return""!==e})),eR(e.attributes,function(i){var r;if((!tO(e)||-1!==["name","id","class","aria-label"].indexOf(i.name))&&(null==s||!s.includes(i.name))&&!t&&tj(i.value)&&(!A(r=i.name)||"_ngcontent"!==r.substring(0,10)&&"_nghost"!==r.substring(0,7))){var a=i.value;"class"===i.name&&(a=tb(a).join(" ")),n["attr__"+i.name]=tQ(1024,a)}});for(var o=1,l=1,c=e;c=function(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!tv(t))return t}(c);)o++,c.tagName===e.tagName&&l++;return n.nth_child=o,n.nth_of_type=l,n}(e,a,o,l)),eF(g,function(e){if(!tT(e))return{};var t={};return eR(e.attributes,function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var i=e.name.replace("data-ph-capture-attribute-",""),s=e.value;i&&s&&tj(s)&&(t[i]=s)}}),t}(e))}),v)return{props:{},explicitNoCapture:v};if(o||("a"===e.tagName.toLowerCase()||"button"===e.tagName.toLowerCase()?p[0].$el_text=tq(e):p[0].$el_text=tS(e)),_){p[0].attr__href=_;var f,m,b=null==(f=tW(_))?void 0:f.host,w=null==s||null==(m=s.location)?void 0:m.host;b&&w&&b!==w&&(d=_)}return{props:eF({$event_type:n.type,$ce_version:1},c?{}:{$elements:p},{$elements_chain:p.map(e=>{var t,i,s,r={text:null==(i=e.$el_text)?void 0:i.slice(0,400),tag_name:e.tag_name,href:null==(s=e.attr__href)?void 0:s.slice(0,2048),attr_class:(t=e.attr__class)?$(t)?t:tb(t):void 0,attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return eP(e).filter(e=>{var[t]=e;return 0===t.indexOf("attr__")}).forEach(e=>{var[t,i]=e;return r.attributes[t]=i}),r}).map(e=>{var t,i,s="";if(e.tag_name&&(s+=e.tag_name),e.attr_class)for(var r of(e.attr_class.sort(),e.attr_class))s+="."+r.replace(/"/g,"");var n=y({},e.text?{text:e.text}:{},{"nth-child":null!=(t=e.nth_child)?t:0,"nth-of-type":null!=(i=e.nth_of_type)?i:0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),a={};return eP(n).sort((e,t)=>{var[i]=e,[s]=t;return i.localeCompare(s)}).forEach(e=>{var[t,i]=e;return a[tB(t.toString())]=tB(i.toString())}),s+=":",s+=eP(a).map(e=>{var[t,i]=e;return t+'="'+i+'"'}).join("")}).join(";")},null!=(i=p[0])&&i.$el_text?{$el_text:null==(r=p[0])?void 0:r.$el_text}:{},d&&"click"===n.type?{$external_click_url:d}:{},g)}}(r,{e: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(o)return!1;var l=this.getElementSelectors(r);if(l&&l.length>0&&(a.$element_selectors=l),t===tz){var c,u=tk(null==s||null==(c=s.get
vendor: 4,707 bytes, line 1
1Selection())?void 0:c.toString()),h=e.type||"clipboard";if(!u)return!1;a.$selected_content=u,a.$copy_type=h}return this.instance.capture(t,a),!0}}}isBrowserSupported(){return P(null==c?void 0:c.querySelectorAll)}}Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return N(e)&&isFinite(e)&&Math.floor(e)===e});var t1="0123456789abcdef";class t2{constructor(e){if(this.bytes=e,16!==e.length)throw TypeError("not 128-bit length")}static fromFieldsV7(e,t,i,s){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(i)||!Number.isInteger(s)||e<0||t<0||i<0||s<0||e>0xffffffffffff||t>4095||i>0x3fffffff||s>0xffffffff)throw RangeError("invalid field value");var r=new Uint8Array(16);return r[0]=e/0x10000000000,r[1]=e/0x100000000,r[2]=e/0x1000000,r[3]=e/65536,r[4]=e/256,r[5]=e,r[6]=112|t>>>8,r[7]=t,r[8]=128|i>>>24,r[9]=i>>>16,r[10]=i>>>8,r[11]=i,r[12]=s>>>24,r[13]=s>>>16,r[14]=s>>>8,r[15]=s,new t2(r)}toString(){for(var e="",t=0;t<this.bytes.length;t++)e=e+t1.charAt(this.bytes[t]>>>4)+t1.charAt(15&this.bytes[t]),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");if(36!==e.length)throw Error("Invalid UUIDv7 was generated");return e}clone(){return new t2(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(var t=0;t<16;t++){var i=this.bytes[t]-e.bytes[t];if(0!==i)return Math.sign(i)}return 0}}class t3{constructor(){this.N=0,this.U=0,this.B=new t8}generate(){var e=this.generateOrAbort();if(O(e)){this.N=0;var t=this.generateOrAbort();if(O(t))throw 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.q();else{if(!(e+1e4>this.N))return;this.U++,this.U>0x3ffffffffff&&(this.N++,this.q())}return t2.fromFieldsV7(this.N,Math.trunc(this.U/0x40000000),0x3fffffff&this.U,this.B.nextUint32())}q(){this.U=1024*this.B.nextUint32()+(1023&this.B.nextUint32())}}var t5,t6,t4=e=>{if("u">typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw Error("no cryptographically strong RNG available");for(var t=0;t<e.length;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};s&&!O(s.crypto)&&crypto.getRandomValues&&(t4=e=>crypto.getRandomValues(e));class t8{constructor(){this.H=new Uint32Array(8),this.W=1/0}nextUint32(){return this.W>=this.H.length&&(t4(this.H),this.W=0),this.H[this.W++]}}var t7=()=>t9().toString(),t9=()=>(t6||(t6=new t3)).generate(),ie="",it=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,ii={G:()=>!!c,V:function(e){ew.error("cookieStore error: "+e)},J:function(e){if(c){try{for(var t=e+"=",i=c.cookie.split(";").filter(e=>e.length),s=0;s<i.length;s++){for(var r=i[s];" "==r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(t))return decodeURIComponent(r.substring(t.length,r.length))}}catch(e){}return null}},K:function(e){var t;try{t=JSON.parse(ii.J(e))||{}}catch(e){}return t},Y:function(e,t,i,s,r){if(c)try{var n="",a="",o=function(e,t){if(t){var i=function(e,t){if(void 0===t&&(t=c),ie)return ie;if(!t||["localhost","127.0.0.1"].includes(e))return"";for(var i=e.split("."),s=Math.min(i.length,8),r="dmn_chk_"+t7();!ie&&s--;){var n=i.slice(s).join("."),a=r+"=1;domain=."+n+";path=/";t.cookie=a+";max-age=3",t.cookie.includes(r)&&(t.cookie=a+";max-age=0",ie=n)}return ie}(e);if(!i){var s,r=(s=e.match(it))?s[0]:"";r!==i&&ew.info("Warning: cookie subdomain discovery mismatch",r,i),i=r}return i?"; domain=."+i:""}return""}(c.location.hostname,s);if(i){var l=new Date;l.setTime(l.getTime()+24*i*36e5),n="; expires="+l.toUTCString()}r&&(a="; secure");var u=e+"="+encodeURIComponent(JSON.stringify(t))+n+"; SameSite=Lax; path=/"+o+a;return u.length>3686.4&&ew.warn("cookieStore warning: large cookie, len="+u.length),c.cookie=u,u}catch(e){return}},X:function(e,t){if(null!=c&&c.cookie)try{ii.Y(e,"",-1,t)}catch(e){return}}},is=null,ir={G:function(){if(!L(is))return is;var e=!0;if(O(s))e=!1;else try{var t="__mplssupport__";ir.Y(t,"xyz"),'"xyz"'!==ir.J(t)&&(e=!1),ir.X(t)}catch(t){e=!1}return e||ew.error("localStorage unsupported; falling back to cookie store"),is=e,e},V:function(e){ew.error("localStorage error: "+e)},J:function(e){try{return null==s?void 0:s.localStorage.getItem(e)}catch(e){ir.V(e)}return null},K:function(e){try{return JSON.parse(ir.J(e))||{}}catch(e){}return null},Y:function(e,t){try{null==s||s.localStorage.setItem(e,JSON.stringify(t))}catch(e){ir.V(e)}},X:function(e){try{null==s||s.localStorage.removeItem(e)}catch(e){ir.V(e)}}},ia=["distinct_id",e3,e5,th,tu],io=y({},ir,{K:function(e){try{var t={};try{t=ii.K(e)||{}}catch(e){}var i=eF(t,JSON.parse(ir.J(e)||"{}"));return ir.Y(e,i),i}catch(e){}return null},Y:function(e,t,i,s,r,n){try{ir.Y(e,t,void 0,void 0,n);var a={};
1ia.forEach(e=>{t[e]&&(a[e]=t[e])}),Object.keys(a).length&&ii.Y(e,a,i,s,r,n)}catch(e){ir.V(e)}},X:function(e,t){try{null==s||s.localStorage.removeItem(e),ii.X(e,t)}catch(e){ir.V(e)}}}),il={},ic={G:function(){return!0},V:function(e){ew.error("memoryStorage error: "+e)},J:function(e){return il[e]||null},K:function(e){return il[e]||null},Y:function(e,t){il[e]=t},X:function(e){delete il[e]}},iu=null,ih={G:function(){if(!L(iu))return iu;if(iu=!0,O(s))iu=!1;else try{var e="__support__";ih.Y(e,"xyz"),'"xyz"'!==ih.J(e)&&(iu=!1),ih.X(e)}catch(e){iu=!1}return iu},V:function(e){ew.error("sessionStorage error: ",e)},J:function(e){try{return null==s?void 0:s.sessionStorage.getItem(e)}catch(e){ih.V(e)}return null},K:function(e){try{return JSON.parse(ih.J(e))||null}catch(e){}return null},Y:function(e,t){try{null==s||s.sessionStorage.setItem(e,JSON.stringify(t))}catch(e){ih.V(e)}},X:function(e){try{null==s||s.sessionStorage.removeItem(e)}catch(e){ih.V(e)}}},id=((n4={})[n4.PENDING=-1]="PENDING",n4[n4.DENIED=0]="DENIED",n4[n4.GRANTED=1]="GRANTED",n4);class ip{constructor(e){this._instance=e}get A(){return this._instance.config}get consent(){return this.Z()?id.DENIED:this.tt}isOptedOut(){return"always"===this.A.cookieless_mode||this.consent===id.DENIED||this.consent===id.PENDING&&(this.A.opt_out_capturing_by_default||"on_reject"===this.A.cookieless_mode)}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===id.DENIED}optInOut(e){this.it.Y(this.et,+!!e,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:i}=this._instance.config;return i||(t?t+e:"__ph_opt_in_out_"+e)}get tt(){var e=this.it.J(this.et);return E(z,e)?id.GRANTED:E(G,e)?id.DENIED:id.PENDING}get it(){if(!this.rt){var e=this.A.opt_out_capturing_persistence_type;this.rt="localStorage"===e?ir:ii;var t="localStorage"===e?ii:ir;t.J(this.et)&&(this.rt.J(this.et)||this.optInOut(E(z,t.J(this.et))),t.X(this.et,this.A.cross_subdomain_cookie))}return this.rt}Z(){return!!this.A.respect_dnt&&!!eM([null==l?void 0:l.doNotTrack,null==l?void 0:l.msDoNotTrack,_.doNotTrack],e=>E(z,e))}}var ig=eE("[Dead Clicks]"),i_=()=>!0,iv=e=>{var t,i=!(null==(t=e.instance.persistence)||!t.get_property(eV)),s=e.instance.config.capture_dead_clicks;return H(s)?s:i};class im{get lazyLoadedDeadClicksAutocapture(){return this.st}constructor(e,t,i){this.instance=e,this.isEnabled=t,this.onCapture=i,this.startIfEnabled()}onRemoteConfig(e){this.instance.persistence&&this.instance.persistence.register({[eV]:null==e?void 0:e.captureDeadClicks}),this.startIfEnabled()}startIfEnabled(){this.isEnabled(this)&&this.nt(()=>{this.ot()})}nt(e){var t,i;null!=(t=_.__PosthogExtensions__)&&t.initDeadClicksAutocapture&&e(),null==(i=_.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this.instance,"dead-clicks-autocapture",t=>{t?ig.error("failed to load script",t):e()})}ot(){var e;if(c){if(!this.st&&null!=(e=_.__PosthogExtensions__)&&e.initDeadClicksAutocapture){var t=C(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};t.__onCapture=this.onCapture,this.st=_.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this.st.start(c),ig.info("starting...")}}else ig.error("`document` not found. Cannot start.")}stop(){this.st&&(this.st.stop(),this.st=void 0,ig.info("stopping..."))}}var iy=eE("[ExceptionAutocapture]");class ib{constructor(e){var t,i,r;this.lt=()=>{var e;if(s&&this.isEnabled&&null!=(e=_.__PosthogExtensions__)&&e.errorWrappingFunctions){var t=_.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,i=_.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,r=_.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.ut&&this.A.capture_unhandled_errors&&(this.ut=t(this.captureException.bind(this))),!this.ht&&this.A.capture_unhandled_rejections&&(this.ht=i(this.captureException.bind(this))),!this.dt&&this.A.capture_console_errors&&(this.dt=r(this.captureException.bind(this)))}catch(e){iy.error("failed to start",e),this.vt()}}},this._instance=e,this.ct=!(null==(t=this._instance.persistence)||!t.props[eB]),this.A=this.ft(),this.gt=new W({refillRate:null!=(i=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)?i:1,bucketSize:null!=(r=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)?r:10,refillInterval:1e4,R:iy}),this.startIfEnabled()}ft(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return C(e)?t=y({},t,e):(O(e)?this.ct:e)&&(t=y({},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&&(iy.info("enabled"),this.nt(this.lt))}nt(e){var t,i;
1null!=(t=_.__PosthogExtensions__)&&t.errorWrappingFunctions&&e(),null==(i=_.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"exception-autocapture",t=>{if(t)return iy.error("failed to load script",t);e()})}vt(){var e,t,i;null==(e=this.ut)||e.call(this),this.ut=void 0,null==(t=this.ht)||t.call(this),this.ht=void 0,null==(i=this.dt)||i.call(this),this.dt=void 0}onRemoteConfig(e){var t=e.autocaptureExceptions;this.ct=!!t,this.A=this.ft(),this._instance.persistence&&this._instance.persistence.register({[eB]:this.ct}),this.startIfEnabled()}captureException(e){var t,i,s=null!=(t=null==e||null==(i=e.$exception_list)||null==(i=i[0])?void 0:i.type)?t:"Exception";this.gt.consumeRateLimit(s)?iy.info("Skipping exception capture because of client rate limiting.",{exception:s}):this._instance.exceptions.sendExceptionEvent(e)}}function iw(e,t,i){try{if(!(t in e))return()=>{};var s=e[t],r=i(s);return P(r)&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=r,()=>{e[t]=s}}catch(e){return()=>{}}}class iE{constructor(e){var t;this._instance=e,this._t=(null==s||null==(t=s.location)?void 0:t.pathname)||""}get isEnabled(){return"history_change"===this._instance.config.capture_pageview}startIfEnabled(){this.isEnabled&&(ew.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.yt&&this.yt(),this.yt=void 0,ew.info("History API monitoring stopped")}monitorHistoryChanges(){var e,t;if(s&&s.history){var i=this;null!=(e=s.history.pushState)&&e.__posthog_wrapped__||iw(s.history,"pushState",e=>function(t,s,r){e.call(this,t,s,r),i.bt("pushState")}),null!=(t=s.history.replaceState)&&t.__posthog_wrapped__||iw(s.history,"replaceState",e=>function(t,s,r){e.call(this,t,s,r),i.bt("replaceState")}),this.wt()}}bt(e){try{var t,i=null==s||null==(t=s.location)?void 0:t.pathname;if(!i)return;i!==this._t&&this.isEnabled&&this._instance.capture("$pageview",{navigation_type:e}),this._t=i}catch(t){ew.error("Error capturing "+e+" pageview",t)}}wt(){if(!this.yt){var e=()=>{this.bt("popstate")};eL(s,"popstate",e),this.yt=()=>{s&&s.removeEventListener("popstate",e)}}}}function ik(e){var t,i;return(null==(t=JSON.stringify(e,(i=[],function(e,t){if(C(t)){for(;i.length>0&&i[i.length-1]!==this;)i.pop();return i.includes(t)?"[Circular]":(i.push(t),t)}return t})))?void 0:t.length)||0}var iS=((t=iS||{})[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t),ix=((i=ix||{})[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),iI="[SessionRecording]",iR="redacted",iF={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:e=>e,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"]},i$=["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"],iP=["password","secret","passwd","api_key","apikey","auth","credentials","mysql_pwd","privatekey","private_key","token"],iC=["/s/","/e/","/i/"];function iT(e,t,i,s){if(D(e))return e;var r=(null==t?void 0:t["content-length"])||new Blob([e]).size;return A(r)&&(r=parseInt(r)),r>i?iI+" "+s+" body too large to record ("+r+" bytes)":e}function iO(e,t){if(D(e))return e;var i=e;return tj(i,!1)||(i=iI+" "+t+" body "+iR),eR(iP,e=>{var s,r;null!=(s=i)&&s.length&&-1!==(null==(r=i)?void 0:r.indexOf(e))&&(i=iI+" "+t+" body "+iR+" as might contain: "+e)}),i}class iA{constructor(e,t){var i,s;void 0===t&&(t={}),this.St={},this.kt=e=>{if(!this.St[e]){this.St[e]=!0;var t,i,s=this.$t(e);null==(t=(i=this.t).onBlockedNode)||t.call(i,e,s)}},this.xt=e=>{var t=this.$t(e);if("svg"!==(null==t?void 0:t.nodeName)&&t instanceof Element){var i=t.closest("svg");if(i)return[this._rrweb.mirror.getId(i),i]}return[e,t]},this.$t=e=>this._rrweb.mirror.getNode(e),this.Et=e=>{var t,i,s,r,n,a,o,l;return(null!=(t=null==(i=e.removes)?void 0:i.length)?t:0)+(null!=(s=null==(r=e.attributes)?void 0:r.length)?s:0)+(null!=(n=null==(a=e.texts)?void 0:a.length)?n:0)+(null!=(o=null==(l=e.adds)?void 0:l.length)?o:0)},this.throttleMutations=e=>{if(3!==e.type||0!==e.data.source)return e;var t=e.data,i=this.Et(t);t.attributes&&(t.attributes=t.attributes.filter(e=>{var[t]=this.xt(e.id);return!this.gt.consumeRateLimit(t)&&e}));var s=this.Et(t);return 0!==s||i===s?e:void 0},this._rrweb=e,this.t=t,this.gt=new W({bucketSize:null!=(i=this.t.bucketSize)?i:100,refillRate:null!=(s=this.t.refillRate)?s:10,refillInterval:1e3,$:this.kt,R:ew})}}var iM=Uint8Array,iL=Uint16Array,iD=Uint32Array,iN=new iM([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]),iH=new iM([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]),ij=new iM([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),iq=function(e,t){for(var i=new iL(31),s=0;s<31;++s)i[s]=t+=1<<e[s-1];var r=new iD(i[30]);for(s=1;s<30;++s)for(var n=i[s];n<i[s+1];++n)r[n]=n-i[s]<<5|s;return[i,r]},iB=iq(iN,2),iU=iB[0],iz=iB[1];iU[28]=258,iz[258]=28;for(var iG=iq(iH,0)[1],iV=new iL(32768),iW=0;iW<32768;++iW){var iY=(43690&iW)>>>1|(21845&iW)<<1;iY=(61680&(iY=(52428&iY)>>>2|(13107&iY)<<2))>>>4|(3855&iY)<<4,iV[iW]=((65280&iY)>>>8|(255&iY)<<8)>>>1}var iJ=function(e,t,i){for(var s=e.length,r=0,n=new iL(t);r<s;++r)++n[e[r]-1];var a,o=new iL(t);for(r=0;r<t;++r)o[r]=o[r-1]+n[r-1]<<1;if(i){a=new iL(1<<t);var l=15-t;for(r=0;r<s;++r)if(e[r])for(var c=r<<4|e[r],u=t-e[r],h=o[e[r]-1]++<<u,d=h|(1<<u)-1;h<=d;++h)a[iV[h]>>>l]=c}else for(a=new iL(s),r=0;r<s;++r)a[r]=iV[o[e[r]-1]++]>>>15-e[r];return a},iX=new iM(288);for(iW=0;iW<144;++iW)iX[iW]=8;for(iW=144;iW<256;++iW)iX[iW]=9;for(iW=256;iW<280;++iW)iX[iW]=7;for(iW=280;iW<288;++iW)iX[iW]=8;var iK=new iM(32);for(iW=0;iW<32;++iW)iK[iW]=5;var iZ=iJ(iX,9,0),iQ=iJ(iK,5,0),i0=function(e){return(e/8|0)+(7&e&&1)},i1=function(e,t,i){(null==i||i>e.length)&&(i=e.length);var s=new(e instanceof iL?iL:e instanceof iD?iD:iM)(i-t);return s.set(e.subarray(t,i)),s},i2=function(e,t,i){i<<=7&t;var s=t/8|0;e[s]|=i,e[s+1]|=i>>>8},i3=function(e,t,i){i<<=7&t;var s=t/8|0;e[s]|=i,e[s+1]|=i>>>8,e[s+2]|=i>>>16},i5=function(e,t){for(var i=[],s=0;s<e.length;++s)e[s]&&i.push({s:s,f:e[s]});var r=i.length,n=i.slice();if(!r)return[new iM(0),0];if(1==r){var a=new iM(i[0].s+1);return a[i[0].s]=1,[a,1]}i.sort(function(e,t){return e.f-t.f}),i.push({s:-1,f:25001});var o=i[0],l=i[1],c=0,u=1,h=2;for(i[0]={s:-1,f:o.f+l.f,l:o,r:l};u!=r-1;)o=i[i[c].f<i[h].f?c++:h++],l=i[c!=u&&i[c].f<i[h].f?c++:h++],i[u++]={s:-1,f:o.f+l.f,l:o,r:l};var d=n[0].s;for(s=1;s<r;++s)n[s].s>d&&(d=n[s].s);var p=new iL(d+1),g=i6(i[u-1],p,0);if(g>t){s=0;var _=0,v=g-t,f=1<<v;for(n.sort(function(e,t){return p[t.s]-p[e.s]||e.f-t.f});s<r;++s){var m=n[s].s;if(!(p[m]>t))break;_+=f-(1<<g-p[m]),p[m]=t}for(_>>>=v;_>0;){var y=n[s].s;p[y]<t?_-=1<<t-p[y]++-1:++s}for(;s>=0&&_;--s){var b=n[s].s;p[b]==t&&(--p[b],++_)}g=t}return[new iM(p),g]},i6=function(e,t,i){return -1==e.s?Math.max(i6(e.l,t,i+1),i6(e.r,t,i+1)):t[e.s]=i},i4=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new iL(++t),s=0,r=e[0],n=1,a=function(e){i[s++]=e},o=1;o<=t;++o)if(e[o]==r&&o!=t)++n;else{if(!r&&n>2){for(;n>138;n-=138)a(32754);n>2&&(a(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(a(r),--n;n>6;n-=6)a(8304);n>2&&(a(n-3<<5|8208),n=0)}for(;n--;)a(r);n=1,r=e[o]}return[i.subarray(0,s),t]},i8=function(e,t){for(var i=0,s=0;s<t.length;++s)i+=e[s]*t[s];return i},i7=function(e,t,i){var s=i.length,r=i0(t+2);e[r]=255&s,e[r+1]=s>>>8,e[r+2]=255^e[r],e[r+3]=255^e[r+1];for(var n=0;n<s;++n)e[r+n+4]=i[n];return 8*(r+4+s)},i9=function(e,t,i,s,r,n,a,o,l,c,u){i2(t,u++,i),++r[256];for(var h=i5(r,15),d=h[0],p=h[1],g=i5(n,15),_=g[0],v=g[1],f=i4(d),m=f[0],y=f[1],b=i4(_),w=b[0],E=b[1],k=new iL(19),S=0;S<m.length;++S)k[31&m[S]]++;for(S=0;S<w.length;++S)k[31&w[S]]++;for(var x=i5(k,7),I=x[0],R=x[1],F=19;F>4&&!I[ij[F-1]];--F);var $,P,C,T,O=c+5<<3,A=i8(r,iX)+i8(n,iK)+a,M=i8(r,d)+i8(n,_)+a+14+3*F+i8(k,I)+(2*k[16]+3*k[17]+7*k[18]);if(O<=A&&O<=M)return i7(t,u,e.subarray(l,l+c));
1if(i2(t,u,1+(M<A)),u+=2,M<A){$=iJ(d,p,0),P=d,C=iJ(_,v,0),T=_;var L=iJ(I,R,0);for(i2(t,u,y-257),i2(t,u+5,E-1),i2(t,u+10,F-4),u+=14,S=0;S<F;++S)i2(t,u+3*S,I[ij[S]]);u+=3*F;for(var D=[m,w],N=0;N<2;++N){var H=D[N];for(S=0;S<H.length;++S){var j=31&H[S];i2(t,u,L[j]),u+=I[j],j>15&&(i2(t,u,H[S]>>>5&127),u+=H[S]>>>12)}}}else $=iZ,P=iX,C=iQ,T=iK;for(S=0;S<o;++S)if(s[S]>255){i3(t,u,$[(j=s[S]>>>18&31)+257]),u+=P[j+257],j>7&&(i2(t,u,s[S]>>>23&31),u+=iN[j]);var q=31&s[S];i3(t,u,C[q]),u+=T[q],q>3&&(i3(t,u,s[S]>>>5&8191),u+=iH[q])}else i3(t,u,$[s[S]]),u+=P[s[S]];return i3(t,u,$[256]),u+P[256]},se=new iD([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),st=function(){for(var e=new iD(256),t=0;t<256;++t){for(var i=t,s=9;--s;)i=(1&i&&0xedb88320)^i>>>1;e[t]=i}return e}(),si=function(){var e=0xffffffff;return{p:function(t){for(var i=e,s=0;s<t.length;++s)i=st[255&i^t[s]]^i>>>8;e=i},d:function(){return 0xffffffff^e}}},ss=function(e,t,i){for(;i;++t)e[t]=i,i>>>=8},sr=function(e,t){var i=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:2*(9==t.level),e[9]=3,0!=t.mtime&&ss(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),i){e[3]=8;for(var s=0;s<=i.length;++s)e[s+10]=i.charCodeAt(s)}};function sn(e,t){void 0===t&&(t={});var i,s,r,n=si(),a=e.length;n.p(e);var o=(s=t,r=10+((i=t).filename&&i.filename.length+1||0),function(e,t,i,s,r,n){var a=e.length,o=new iM(s+a+5*(1+Math.floor(a/7e3))+8),l=o.subarray(s,o.length-8),c=0;if(!t||a<8)for(var u=0;u<=a;u+=65535){var h=u+65535;h<a?c=i7(l,c,e.subarray(u,h)):(l[u]=n,c=i7(l,c,e.subarray(u,a)))}else{for(var d=se[t-1],p=d>>>13,g=8191&d,_=(1<<i)-1,v=new iL(32768),f=new iL(_+1),m=Math.ceil(i/3),y=2*m,b=function(t){return(e[t]^e[t+1]<<m^e[t+2]<<y)&_},w=new iD(25e3),E=new iL(288),k=new iL(32),S=0,x=0,I=(u=0,0),R=0,F=0;u<a;++u){var $=b(u),P=32767&u,C=f[$];if(v[P]=C,f[$]=P,R<=u){var T=a-u;if((S>7e3||I>24576)&&T>423){c=i9(e,l,0,w,E,k,x,I,F,u-F,c),I=S=x=0,F=u;for(var O=0;O<286;++O)E[O]=0;for(O=0;O<30;++O)k[O]=0}var A=2,M=0,L=g,D=P-C&32767;if(T>2&&$==b(u-D))for(var N=Math.min(p,T)-1,H=Math.min(32767,u),j=Math.min(258,T);D<=H&&--L&&P!=C;){if(e[u+A]==e[u+A-D]){for(var q=0;q<j&&e[u+q]==e[u+q-D];++q);if(q>A){if(A=q,M=D,q>N)break;var B=Math.min(D,q-2),U=0;for(O=0;O<B;++O){var z=u-D+O+32768&32767,G=z-v[z]+32768&32767;G>U&&(U=G,C=z)}}}D+=(P=C)-(C=v[P])+32768&32767}if(M){w[I++]=0x10000000|iz[A]<<18|iG[M];var V=31&iz[A],W=31&iG[M];x+=iN[V]+iH[W],++E[257+V],++k[W],R=u+A,++S}else w[I++]=e[u],++E[e[u]]}}c=i9(e,l,n,w,E,k,x,I,F,u-F,c)}return i1(o,0,s+i0(c)+8)}(e,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+s.mem,r,8,!0)),l=o.length;return sr(o,t),ss(o,l-8,n.d()),ss(o,l-4,a),o}function sa(e,t){var i=e.length;if("u">typeof TextEncoder)return(new TextEncoder).encode(e);for(var s=new iM(e.length+(e.length>>>1)),r=0,n=function(e){s[r++]=e},a=0;a<i;++a){if(r+5>s.length){var o=new iM(r+8+(i-a<<1));o.set(s),s=o}var l=e.charCodeAt(a);l<128||t?n(l):(l<2048?n(192|l>>>6):(l>55295&&l<57344?(n(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++a))>>>18),n(128|l>>>12&63)):n(224|l>>>12),n(128|l>>>6&63)),n(128|63&l))}return i1(s,0,r)}var so="disabled",sl="sampled",sc="active",su="buffering",sh="paused",sd="trigger",sp=sd+"_activated",sg=sd+"_pending",s_=sd+"_"+so;function sv(e,t){return t.some(t=>"regex"===t.matching&&new RegExp(t.url).test(e))}class sf{constructor(e){this.Rt=e}triggerStatus(e){var t=this.Rt.map(t=>t.triggerStatus(e));return t.includes(sp)?sp:t.includes(sg)?sg:s_}stop(){this.Rt.forEach(e=>e.stop())}}class sm{constructor(e){this.Rt=e}triggerStatus(e){var t=new Set;for(var i of this.Rt)t.add(i.triggerStatus(e));switch(t.delete(s_),t.size){case 0:return s_;case 1:return Array.from(t)[0];default:return sg}}stop(){this.Rt.forEach(e=>e.stop())}}class sy{triggerStatus(){return sg}stop(){}}class sb{constructor(e){this.It=[],this.Pt=[],this.urlBlocked=!1,this._instance=e}onConfig(e){var t,i;this.It=("sessionRecording"in e?C(e.sessionRecording)?null==(t=e.sessionRecording)?void 0:t.urlTriggers:[]:null==e?void 0:e.urlTriggers)||[],this.Pt=("sessionRecording"in e?C(e.sessionRecording)?null==(i=e.sessionRecording)?void 0:i.urlBlocklist:[]:null==e?void 0:e.urlBlocklist)||[]}onRemoteConfig(e){this.onConfig(e)}Tt(e){var t;return 0===this.It.length?s_:(null==(t=this._instance)?void 0:t.get_property(e6))===e?sp:sg}triggerStatus(e){var t=this.Tt(e),i=t===sp?sp:t===sg?sg:s_;return this._instance.register_for_session({$sdk_debug_replay_url_trigger_status:i}),i}checkUrlTriggerConditions(e,t,i){if(void 0!==s&&s.location.href){var r=s.location.href,n=this.urlBlocked,a=sv(r,this.Pt);n&&a||(a&&!n?e():!a&&n&&t(),sv(r,this.It)&&i("url"))}}stop(){}}class sw{constructor(e){this.linkedFlag=null,this.linkedFlagSeen=!1,this.Ct=()=>{},this._instance=e}triggerStatus(){var e=sg;return D(this.linkedFlag)&&(e=s_),this.linkedFlagSeen&&(e=sp),this._instance.register_for_session({$sdk_debug_replay_linked_flag_trigger_status:e}),e}onConfig(e,t){var i;if(this.linkedFlag=("sessionRecording"in e?C(e.sessionRecording)?null==(i=e.sessionRecording)?void 0:i.linkedFlag:null:null==e?void 0:e.linkedFlag)||null,!D(this.linkedFlag)&&!this.linkedFlagSeen){var s=A(this.linkedFlag)?this.linkedFlag:this.linkedFlag.flag,r=A(this.linkedFlag)?null:this.linkedFlag.variant;this.Ct=this._instance.onFeatureFlags((e,i)=>{var n=!1;if(C(i)&&s in i){var a=i[s];n=H(a)?!0===a:r?a===r:!!a}this.linkedFlagSeen=n,n&&t(s,r)})}}onRemoteConfig(e,t){this.onConfig(e,t)}stop(){this.Ct()}}class sE{constructor(e){this.Mt=[],this._instance=e}onConfig(e){var t;this.Mt=("sessionRecording"in e?C(e.sessionRecording)?null==(t=e.sessionRecording)?void 0:t.eventTriggers:[]:null==e?void 0:e.eventTriggers)||[]}onRemoteConfig(e){this.onConfig(e)}Ot(e){var t;return 0===this.Mt.length?s_:(null==(t=this._instance)?void 0:t.get_property(e4))===e?sp:sg}triggerStatus(e){var t=this.Ot(e),i=t===sp?sp:t===sg?sg:s_;return this._instance.register_for_session({$sdk_debug_replay_event_trigger_status:i}),i}stop(){}}function sk(e){return e.isRecordingEnabled?su:so}function sS(e){if(!e.receivedFlags)return su;if(!e.isRecordingEnabled)return so;if(e.urlTriggerMatching.urlBlocked)return sh;var t=!0===e.isSampled,i=new sf([e.eventTriggerMatching,e.urlTriggerMatching,e.linkedFlagMatching]).triggerStatus(e.sessionId);return t?sl:i===sp?sc:i===sg?su:!1===e.isSampled?so:sc}function sx(e){if(!e.receivedFlags)return su;if(!e.isRecordingEnabled)return so;if(e.urlTriggerMatching.urlBlocked)return sh;var t=new sm([e.eventTriggerMatching,e.urlTriggerMatching,e.linkedFlagMatching]).triggerStatus(e.sessionId),i=t!==s_,s=H(e.isSampled);return i&&t===sg?su:i&&t===s_||s&&!e.isSampled?so:!0===e.isSampled?sl:sc}var sI="[SessionRecording]",sR=eE(sI);function sF(){var e;return null==_||null==(e=_.__PosthogExtensions__)||null==(e=e.rrweb)?void 0:e.record}var s$=[ix.MouseMove,ix.MouseInteraction,ix.Scroll,ix.ViewportResize,ix.Input,ix.TouchMove,ix.MediaInteraction,ix.Drag],sP=e=>({rrwebMethod:e,enqueuedAt:Date.now(),attempt:1});function sC(e){return function(e,t){for(var i="",s=0;s<e.length;)i+=String.fromCharCode(e[s++]);return i}(sn(sa(JSON.stringify(e))))}function sT(e){return e.type===iS.Custom&&"sessionIdle"===e.data.tag}class sO{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 Error(sI+" must be started with a valid sessionManager.");return this._instance.sessionManager}get Lt(){var e,t;return this.Nt.triggerStatus(this.sessionId)===sg?6e4:null!=(e=null==(t=this._instance.config.session_recording)?void 0:t.full_snapshot_interval_millis)?e:3e5}get Ut(){var e=this._instance.get_property(e5);return H(e)?e:null}get zt(){var e,t,i=null==(e=this.H)?void 0:e.data[(null==(t=this.H)?void 0:t.data.length)-1],{sessionStartTimestamp:s}=this.jt.checkAndGetSessionAndWindowId(!0);return i?i.timestamp-s:null}get Bt(){var e=!!this._instance.get_property(eJ),t=!this._instance.config.disable_session_recording;return s&&e&&t}get qt(){var e=!!this._instance.get_property(eX),t=this._instance.config.enable_recording_console_log;return null!=t?t:e}get Ht(){var e,t,i,s,r,n,a=this._instance.config.session_recording.captureCanvas,o=this._instance.get_property(eQ),l=null!=(e=null!=(t=null==a?void 0:a.recordCanvas)?t:null==o?void 0:o.enabled)&&e,c=null!=(i=null!=(s=null==a?void 0:a.canvasFps)?s:null==o?void 0:o.fps)?i:4,u=null!=(r=null!=(n=null==a?void 0:a.canvasQuality)?n:null==o?void 0:o.quality)?r:.4;if("string"==typeof u){var h=parseFloat(u);u=isNaN(h)?.4:h}
1return{enabled:l,fps:V(c,0,12,sR.createLogger("canvas recording fps"),4),quality:V(u,0,1,sR.createLogger("canvas recording quality"),.4)}}get Wt(){var e,t,i=this._instance.get_property(eK),s={recordHeaders:null==(e=this._instance.config.session_recording)?void 0:e.recordHeaders,recordBody:null==(t=this._instance.config.session_recording)?void 0:t.recordBody},r=(null==s?void 0:s.recordHeaders)||(null==i?void 0:i.recordHeaders),n=(null==s?void 0:s.recordBody)||(null==i?void 0:i.recordBody),a=C(this._instance.config.capture_performance)?this._instance.config.capture_performance.network_timing:this._instance.config.capture_performance,o=!!(H(a)?a:null==i?void 0:i.capturePerformance);return r||n||o?{recordHeaders:r,recordBody:n,recordPerformance:o}:void 0}get Gt(){var e,t,i,s,r,n,a=this._instance.get_property(eZ),o={maskAllInputs:null==(e=this._instance.config.session_recording)?void 0:e.maskAllInputs,maskTextSelector:null==(t=this._instance.config.session_recording)?void 0:t.maskTextSelector,blockSelector:null==(i=this._instance.config.session_recording)?void 0:i.blockSelector},l=null!=(s=null==o?void 0:o.maskAllInputs)?s:null==a?void 0:a.maskAllInputs,c=null!=(r=null==o?void 0:o.maskTextSelector)?r:null==a?void 0:a.maskTextSelector,u=null!=(n=null==o?void 0:o.blockSelector)?n:null==a?void 0:a.blockSelector;return O(l)&&O(c)&&O(u)?void 0:{maskAllInputs:null==l||l,maskTextSelector:c,blockSelector:u}}get Vt(){var e=this._instance.get_property(e0);return N(e)?e:null}get Jt(){var e=this._instance.get_property(e1);return N(e)?e:null}get status(){return this.Kt?this.Yt({receivedFlags:this.Kt,isRecordingEnabled:this.Bt,isSampled:this.Ut,urlTriggerMatching:this.Xt,eventTriggerMatching:this.Qt,linkedFlagMatching:this.Zt,sessionId:this.sessionId}):su}constructor(e){if(this.Yt=sk,this.Kt=!1,this.ti=[],this.ii="unknown",this.ei=Date.now(),this.Nt=new sy,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=()=>
1{if(null!=c&&c.visibilityState){var e="window "+c.visibilityState;this.tryAddCustomEvent(e,{})}},this._instance=e,this.Dt=!1,this.ci="/s/",this.fi=void 0,this.Kt=!1,!this._instance.sessionManager)throw sR.error("started without valid sessionManager"),Error(sI+" started without valid sessionManager. This is a bug.");if("always"===this._instance.config.cookieless_mode)throw Error(sI+' cannot be used with cookieless_mode="always"');this.Zt=new sw(this._instance),this.Xt=new sb(this._instance),this.Qt=new sE(this._instance);var{sessionId:t,windowId:i}=this.jt.checkAndGetSessionAndWindowId();this.Ft=t,this.pi=i,this.H=this.gi(),this.At>=this.jt.sessionTimeoutMs&&sR.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.Bt?(this.mi(e),eL(s,"beforeunload",this.li),eL(s,"offline",this.hi),eL(s,"online",this.di),eL(s,"visibilitychange",this.vi),this.yi(),this.bi(),D(this.ri)&&(this.ri=this._instance.on("eventCaptured",e=>{try{if("$pageview"===e.event){var t=null!=e&&e.properties.$current_url?this.wi(null==e?void 0:e.properties.$current_url):"";if(!t)return;this.tryAddCustomEvent("$pageview",{href:t})}}catch(e){sR.error("Could not add $pageview to rrweb session",e)}})),this.si||(this.si=this.jt.onSessionId((e,t,i)=>{var s,r;i&&(this.tryAddCustomEvent("$session_id_change",{sessionId:e,windowId:t,changeReason:i}),null==(s=this._instance)||null==(s=s.persistence)||s.unregister(e4),null==(r=this._instance)||null==(r=r.persistence)||r.unregister(e6))}))):this.stopRecording()}stopRecording(){var e,t,i,r;this.Dt&&this.fi&&(this.fi(),this.fi=void 0,this.Dt=!1,null==s||s.removeEventListener("beforeunload",this.li),null==s||s.removeEventListener("offline",this.hi),null==s||s.removeEventListener("online",this.di),null==s||s.removeEventListener("visibilitychange",this.vi),this.gi(),clearInterval(this.Si),null==(e=this.ri)||e.call(this),this.ri=void 0,null==(t=this.ai)||t.call(this),this.ai=void 0,null==(i=this.si)||i.call(this),this.si=void 0,null==(r=this.oi)||r.call(this),this.oi=void 0,this.Qt.stop(),this.Xt.stop(),this.Zt.stop(),sR.info("stopped"))}ki(){var e;null==(e=this._instance.persistence)||e.unregister(e5)}$i(e){var t,i=this.Ft!==e,s=this.Vt;if(N(s)){var r=this.Ut,n=i||!H(r),a=n?function(e){for(var t=0,i=0;i<e.length;i++)t=(t<<5)-t+e.charCodeAt(i)|0;return Math.abs(t)}(e)%100<V(100*s,0,100,ew):r;n&&(a?this.xi(sl):sR.warn("Sample rate ("+s+") has determined that this sessionId ("+e+") will not be sent to the server."),this.tryAddCustomEvent("samplingDecisionMade",{sampleRate:s,isSampled:a})),null==(t=this._instance.persistence)||t.register({[e5]:a})}else this.ki()}onRemoteConfig(e){if(this.tryAddCustomEvent("$remote_config_received",e),this.Kt=!0,this.Ei(e),e.sessionRecording){var t,i,s,r;null!=(t=e.sessionRecording)&&t.endpoint&&(this.ci=null==(r=e.sessionRecording)?void 0:r.endpoint),this.yi(),"any"===(null==(i=e.sessionRecording)?void 0:i.triggerMatchType)?(this.Yt=sS,this.Nt=new sf([this.Qt,this.Xt])):(this.Yt=sx,this.Nt=new sm([this.Qt,this.Xt])),this._instance.register_for_session({$sdk_debug_replay_remote_trigger_matching_config:null==(s=e.sessionRecording)?void 0:s.triggerMatchType}),this.Xt.onConfig(e),this.Qt.onConfig(e),this.Zt.onConfig(e,(e,t)=>{this.xi("linked_flag_matched",{flag:e,variant:t})})}this.startIfEnabledOrStop()}yi(){N(this.Vt)&&D(this.oi)&&(this.oi=this.jt.onSessionId(e=>{this.$i(e)}))}Ei(e){if(this._instance.persistence){var t,i=this._instance.persistence,s=()=>{var t=!1===e.sessionRecording?void 0:e.sessionRecording,s=null==t?void 0:t.sampleRate,r=D(s)?null:parseFloat(s);D(r)&&this.ki();var n=null==t?void 0:t.minimumDurationMilliseconds;i.register({[eJ]:!!e.sessionRecording,[eX]:null==t?void 0:t.consoleLogRecordingEnabled,[eK]:y({capturePerformance:e.capturePerformance},null==t?void 0:t.networkPayloadCapture),[eZ]:null==t?void 0:t.masking,[eQ]:{enabled:null==t?void 0:t.recordCanvas,fps:null==t?void 0:t.canvasFps,quality:null==t?void 0:t.canvasQuality},[e0]:r,[e1]:O(n)?null:n,[e2]:null==t?void 0:t.scriptConfig})};s(),null==(t=this.ni)||t.call(this),this.ni=this.jt.onSessionId(s)}}log(e,t){var i;void 0===t&&(t="log"),null==(i=this._instance.sessionRecording)||i.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:t,trace:[],payload:[JSON.stringify(e)]}},timestamp:Date.now()})}mi(e){if(!O(Object.assign)&&!O(Array.from)&&!(this.Dt||this._instance.config.disable_session_recording||this._instance.consent.isOptedOut())){var t;(this.Dt=!0,this.jt.checkAndGetSessionAndWindowId(),sF())?this.Ri():null==(t=_.__PosthogExtensions__)||null==t.loadExternalDependency||t.loadExternalDependency(this._instance,this.Ii,e=>{if(e)return sR.error("could not load recorder",e);this.Ri()}),sR.info("starting"),this.status===sc&&this.xi(e||"recording_initialized")}}get Ii(){var e;return(null==(e=this._instance)||null==(e=e.persistence)||null==(e=e.get_property(e2))?void 0:e.script)||"recorder"}Pi(e){var t;return 3===e.type&&-1!==s$.indexOf(null==(t=e.data)?void 0:t.source)}Ti(e){var t=this.Pi(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 i=!1;if(t&&(this.ei=e.timestamp,this.ii)){var s="unknown"===this.ii;this.ii=!1,s||(this.tryAddCustomEvent("sessionNoLongerIdle",{reason:"user activity",type:e.type}),i=!0)}if(!this.ii){var{windowId:r,sessionId:n}=this.jt.checkAndGetSessionAndWindowId(!t,e.timestamp),a=this.Ft!==n,o=this.pi!==r;this.pi=r,this.Ft=n,a||o?(this.stopRecording(),this.startIfEnabledOrStop("session_id_changed")):i&&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}):sR.warn("could not emit queued rrweb event.",t,e),!1}}tryAddCustomEvent(e,t){return this.Mi(sP(()=>sF().addCustomEvent(e,t)))}Oi(){return this.Mi(sP(()=>sF().takeFullSnapshot()))}Ri(){var e,t,i,s,r={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:{}
1,collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1};for(var[n,a]of Object.entries(this._instance.config.session_recording||{}))n in r&&("maskInputOptions"===n?r.maskInputOptions=y({password:!0},a):r[n]=a);this.Ht&&this.Ht.enabled&&(r.recordCanvas=!0,r.sampling={canvas:this.Ht.fps},r.dataURLOptions={type:"image/webp",quality:this.Ht.quality}),this.Gt&&(r.maskAllInputs=null==(t=this.Gt.maskAllInputs)||t,r.maskTextSelector=null!=(i=this.Gt.maskTextSelector)?i:void 0,r.blockSelector=null!=(s=this.Gt.blockSelector)?s:void 0);var o=sF();if(o){this.Fi=null!=(e=this.Fi)?e:new iA(o,{refillRate:this._instance.config.session_recording.__mutationThrottlerRefillRate,bucketSize:this._instance.config.session_recording.__mutationThrottlerBucketSize,onBlockedNode:(e,t)=>{var i="Too many mutations on node '"+e+"'. Rate limiting. This could be due to SVG animations or something similar";sR.info(i,{node:t}),this.log(sI+" "+i,"warn")}});var l=this.Ai();this.fi=o(y({emit:e=>{this.onRRwebEmit(e)},plugins:l},r)),this.ei=Date.now(),this.ii=H(this.ii)?this.ii:"unknown",this.tryAddCustomEvent("$session_options",{sessionRecordingOptions:r,activePlugins:l.map(e=>null==e?void 0:e.name)}),this.tryAddCustomEvent("$posthog_config",{config:this._instance.config})}else sR.error("onScriptLoaded was called but rrwebRecord is not available. This indicates something has gone wrong.")}Ci(){if(this.Si&&clearInterval(this.Si),!0!==this.ii){var e=this.Lt;e&&(this.Si=setInterval(()=>{this.Oi()},e))}}Ai(){var e,t,i,s,r,n,a,o,l,c,u,h,d,p=[],g=null==(h=_.__PosthogExtensions__)||null==(h=h.rrwebPlugins)?void 0:h.getRecordConsolePlugin;g&&this.qt&&p.push(g());var v=null==(d=_.__PosthogExtensions__)||null==(d=d.rrwebPlugins)?void 0:d.getRecordNetworkPlugin;return this.Wt&&P(v)&&(!tV.includes(location.hostname)||this._forceAllowLocalhostNetworkCapture?p.push(v((e=this._instance.config,t=this.Wt,r={payloadSizeLimitBytes:iF.payloadSizeLimitBytes,performanceEntryTypeToObserve:[...iF.performanceEntryTypeToObserve],payloadHostDenyList:[...t.payloadHostDenyList||[],...iF.payloadHostDenyList]},n=!1!==e.session_recording.recordHeaders&&t.recordHeaders,a=!1!==e.session_recording.recordBody&&t.recordBody,o=!1!==e.capture_performance&&t.recordPerformance,s=Math.min(1e6,null!=(i=r.payloadSizeLimitBytes)?i:1e6),l=e=>(null!=e&&e.requestBody&&(e.requestBody=iT(e.requestBody,e.requestHeaders,s,"Request")),null!=e&&e.responseBody&&(e.responseBody=iT(e.responseBody,e.responseHeaders,s,"Response")),e),c=t=>{var i;return l(((e,t)=>{var i,s=tW(e.name),r=0===t.indexOf("http")?null==(i=tW(t))?void 0:i.pathname:t;"/"===r&&(r="");var n=null==s?void 0:s.pathname.replace(r||"","");if(!(s&&n&&iC.some(e=>0===n.indexOf(e))))return e})((D(i=t.requestHeaders)||eR(Object.keys(null!=i?i:{}),e=>{i$.includes(e.toLowerCase())&&(i[e]=iR)}),t),e.api_host))},(u=P(e.session_recording.maskNetworkRequestFn))&&P(e.session_recording.maskCapturedNetworkRequestFn)&&ew.warn("Both `maskNetworkRequestFn` and `maskCapturedNetworkRequestFn` are defined. `maskNetworkRequestFn` will be ignored."),u&&(e.session_recording.maskCapturedNetworkRequestFn=t=>{var i=e.session_recording.maskNetworkRequestFn({url:t.name});return y({},t,{name:null==i?void 0:i.url})}),r.maskRequestFn=P(e.session_recording.maskCapturedNetworkRequestFn)?t=>{var i,s=c(t);return s&&null!=(i=null==e.session_recording.maskCapturedNetworkRequestFn?void 0:e.session_recording.maskCapturedNetworkRequestFn(s))?i:void 0}:e=>(function(e){if(!O(e))return e.requestBody=iO(e.requestBody,"Request"),e.responseBody=iO(e.responseBody,"Response"),e})(c(e)),y({},iF,r,{recordHeaders:n,recordBody:a,recordPerformance:o,recordInitialRequests:o})))):sR.info("NetworkCapture not started because we are on localhost.")),p}onRRwebEmit(e){var t;if(this.Di(),e&&C(e)){if(e.type===iS.Meta){var i=this.wi(e.data.href);if(this.ji=i,!i)return;e.data.href=i}else this.Li();if(this.Xt.checkUrlTriggerConditions(()=>this.Ni(),()=>this.Ui(),e=>this.zi(e)),!this.Xt.urlBlocked||e.type===iS.Custom&&"recording paused"===e.data.tag){e.type===iS.FullSnapshot&&this.Ci(),e.type===iS.FullSnapshot&&this.Kt&&this.Nt.triggerStatus(this.sessionId)===sg&&this.Bi();var s=this.Fi?this.Fi.throttleMutations(e):e;if(s){var r=function(e){if(e&&C(e)&&6===e.type&&C(e.data)&&"rrweb/console@1"===e.data.plugin){e.data.payload.payload.length>10&&(e.data.payload.payload=e.data.payload.payload.slice(0,10),e.data.payload.payload.push("...[truncated]"));for(var t=[],i=0;i<e.data.payload.payload.length;i++)e.data.payload.payload[i]&&e.data.payload.payload[i].length>2e3?t.push(e.data.payload.payload[i].slice(0,2e3)+"...[truncated]"):t.push(e.data.payload.payload[i]);return e.data.payload.payload=t,e}return e}(s);if(this.Ti(r),!0!==this.ii||sT(r)){if(sT(r)){var n=r.data.payload;n&&(r.timestamp=n.lastActivityTimestamp+n.threshold)}var a=null==(t=this._instance.config.session_recording.compress_events)||t?function(e){try{if(e.type===iS.FullSnapshot)return y({},e,{data:sC(e.data),cv:"2024-10"});if(e.type===iS.IncrementalSnapshot&&e.data.source===ix.Mutation)return y({},e,{cv:"2024-10",data:y({},e.data,{texts:sC(e.data.texts),attributes:sC(e.data.attributes),removes:sC(e.data.removes),adds:sC(e.data.adds)})});if(e.type===iS.IncrementalSnapshot&&e.data.source===ix.StyleSheetRule)return y({},e,{cv:"2024-10",data:y({},e.data,{adds:e.data.adds?sC(e.data.adds):void 0,removes:e.data.removes?sC(e.data.removes):void 0})})}catch(e){sR.error("could not compress event - will use uncompressed event",e)}return e}(r):r,o={$snapshot_bytes:ik(a),$snapshot_data:a,$session_id:this.Ft,$window_id:this.pi};this.status!==so?this.qi(o):this.gi()}}}}}Li(){if(!this._instance.config.capture_pageview&&s){var e=this.wi(s.location.href);this.ji!==e&&(this.tryAddCustomEvent("$url_changed",{href:e}),this.ji=e)}}Di(){if(this.ti.length){var e=[...this.ti];
1this.ti=[],e.forEach(e=>{Date.now()-e.enqueuedAt<=2e3&&this.Mi(e)})}}wi(e){var t=this._instance.config.session_recording;if(t.maskNetworkRequestFn){var i,s={url:e};return null==(i=s=t.maskNetworkRequestFn(s))?void 0:i.url}return e}Bi(){if(!this.H||0===this.H.data.length)return this.gi();for(var e=-1,t=this.H.data.length-1;t>=0;t--)if(this.H.data[t].type===iS.Meta){e=t;break}return e>=0?(this.H.data=this.H.data.slice(e),this.H.size=this.H.data.reduce((e,t)=>e+ik(t),0),this.H):this.gi()}gi(){return this.H={size:0,data:[],sessionId:this.Ft,windowId:this.pi},this.H}ui(){this.Hi&&(clearTimeout(this.Hi),this.Hi=void 0);var e=this.Jt,t=this.zt,i=N(t)&&t>=0,s=N(e)&&i&&t<e;return this.status===su||this.status===sh||this.status===so||s?(this.Hi=setTimeout(()=>{this.ui()},2e3),this.H):(this.H.data.length>0&&(function e(t,i){if(void 0===i&&(i=6606028.8),t.size>=i&&t.data.length>1){var s=Math.floor(t.data.length/2),r=t.data.slice(0,s),n=t.data.slice(s);return[e({size:ik(r),data:r,sessionId:t.sessionId,windowId:t.windowId}),e({size:ik(n),data:n,sessionId:t.sessionId,windowId:t.windowId})].flatMap(e=>e)}return[t]})(this.H).forEach(e=>{this.Wi({$snapshot_bytes:e.size,$snapshot_data:e.data,$session_id:e.sessionId,$window_id:e.windowId,$lib:"web",$lib_version:v.LIB_VERSION})}),this.gi())}qi(e){var t,i=2+((null==(t=this.H)?void 0:t.data.length)||0);!this.ii&&(this.H.size+e.$snapshot_bytes+i>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.Hi||this.ii||(this.Hi=setTimeout(()=>{this.ui()},2e3))}Wi(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)===sg&&(null==(t=this._instance)||null==(t=t.persistence)||t.register({["url"===e?e6:e4]:this.Ft}),this.ui(),this.xi(e+"_trigger_matched"))}Ni(){this.Xt.urlBlocked||(this.Xt.urlBlocked=!0,clearInterval(this.Si),sR.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"}),sR.info("recording resumed"))}bi(){0!==this.Qt.Mt.length&&D(this.ai)&&(this.ai=this._instance.on("eventCaptured",e=>{try{this.Qt.Mt.includes(e.event)&&this.zi("event")}catch(e){sR.error("Could not activate event trigger",e)}}))}overrideLinkedFlag(){this.Zt.linkedFlagSeen=!0,this.Oi(),this.xi("linked_flag_overridden")}overrideSampling(){var e;null==(e=this._instance.persistence)||e.register({[e5]:!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}),sR.info(e.replace("_"," "),t),E(["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 sA=eE("[SegmentIntegration]"),sM="posthog-js";function sL(e,t){var{organization:i,projectId:s,prefix:r,severityAllowList:n=["error"],sendExceptionsToPostHog:a=!0}=void 0===t?{}:t;return t=>{if(!("*"===n||n.includes(t.level))||!e.__loaded)return t;t.tags||(t.tags={});var o,l,c,u,h,d=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());t.tags["PostHog Person URL"]=d,e.sessionRecordingStarted()&&(t.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var p=(null==(o=t.exception)?void 0:o.values)||[],g=p.map(e=>y({},e,{stacktrace:e.stacktrace?y({},e.stacktrace,{type:"raw",frames:(e.stacktrace.frames||[]).map(e=>y({},e,{platform:"web:javascript"}))}):void 0})),_={$exception_message:(null==(l=p[0])?void 0:l.value)||t.message,$exception_type:null==(c=p[0])?void 0:c.type,$exception_personURL:d,$exception_level:t.level,$exception_list:g,$sentry_event_id:t.event_id,$sentry_exception:t.exception,$sentry_exception_message:(null==(u=p[0])?void 0:u.value)||t.message,$sentry_exception_type:null==(h=p[0])?void 0:h.type,$sentry_tags:t.tags};return i&&s&&(_.$sentry_url=(r||"https://sentry.io/organizations/")+i+"/issues/?project="+s+"&query="+t.event_id),a&&e.exceptions.sendExceptionEvent(_),t}}class sD{constructor(e,t,i,s,r,n){this.name=sM,this.setupOnce=function(a){a(sL(e,{organization:t,projectId:i,prefix:s,severityAllowList:r,sendExceptionsToPostHog:null==n||n}))}}}var sN=null!=s&&s.location?tK(s.location.hash,"__posthog")||tK(location.hash,"state"):null,sH="_postHogToolbarParam
1s",sj=eE("[Toolbar]"),sq=((n8=sq||{})[n8.UNINITIALIZED=0]="UNINITIALIZED",n8[n8.LOADING=1]="LOADING",n8[n8.LOADED=2]="LOADED",n8);class sB{constructor(e){this.instance=e}Gi(e){_.ph_toolbar_state=e}Vi(){var e;return null!=(e=_.ph_toolbar_state)?e:sq.UNINITIALIZED}maybeLoadToolbar(e,t,i){if(void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===i&&(i=void 0),!s||!c)return!1;e=null!=e?e:s.location,i=null!=i?i:s.history;try{if(!t){try{s.localStorage.setItem("test","test"),s.localStorage.removeItem("test")}catch(e){return!1}t=null==s?void 0:s.localStorage}var r,n=sN||tK(e.hash,"__posthog")||tK(e.hash,"state"),a=n?eC(()=>JSON.parse(atob(decodeURIComponent(n))))||eC(()=>JSON.parse(decodeURIComponent(n))):null;return a&&"ph_authorize"===a.action?((r=a).source="url",r&&Object.keys(r).length>0&&(a.desiredHash?e.hash=a.desiredHash:i?i.replaceState(i.state,"",e.pathname+e.search):e.hash="")):((r=JSON.parse(t.getItem(sH)||"{}")).source="localstorage",delete r.userIntent),!(!r.token||this.instance.config.token!==r.token)&&(this.loadToolbar(r),!0)}catch(e){return!1}}Ji(e){var t=_.ph_load_toolbar||_.ph_load_editor;!D(t)&&P(t)?t(e,this.instance):sj.warn("No toolbar load function found")}loadToolbar(e){var t,i=!(null==c||!c.getElementById(td));if(!s||i)return!1;var r="custom"===this.instance.requestRouter.region&&this.instance.config.advanced_disable_toolbar_metrics,n=y({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},r?{instrument:!1}:{});return(s.localStorage.setItem(sH,JSON.stringify(y({},n,{source:void 0}))),this.Vi()===sq.LOADED)?this.Ji(n):this.Vi()===sq.UNINITIALIZED&&(this.Gi(sq.LOADING),null==(t=_.__PosthogExtensions__)||null==t.loadExternalDependency||t.loadExternalDependency(this.instance,"toolbar",e=>{e?(sj.error("[Toolbar] Failed to load",e),this.Gi(sq.UNINITIALIZED)):(this.Gi(sq.LOADED),this.Ji(n))}),eL(s,"turbolinks:load",()=>{this.Gi(sq.UNINITIALIZED),this.loadToolbar(n)})),!0}Ki(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,i){return void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===i&&(i=void 0),this.maybeLoadToolbar(e,t,i)}}var sU=eE("[TracingHeaders]");class sz{constructor(e){this.Yi=void 0,this.Xi=void 0,this.lt=()=>{var e,t;O(this.Yi)&&(null==(e=_.__PosthogExtensions__)||null==(e=e.tracingHeadersPatchFns)||e._patchXHR(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager)),O(this.Xi)&&(null==(t=_.__PosthogExtensions__)||null==(t=t.tracingHeadersPatchFns)||t._patchFetch(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}nt(e){var t,i;null!=(t=_.__PosthogExtensions__)&&t.tracingHeadersPatchFns&&e(),null==(i=_.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"tracing-headers",t=>{if(t)return sU.error("failed to load script",t);e()})}startIfEnabledOrStop(){var e,t;this._instance.config.__add_tracing_headers?this.nt(this.lt):(null==(e=this.Yi)||e.call(this),null==(t=this.Xi)||t.call(this),this.Yi=void 0,this.Xi=void 0)}}var sG=eE("[Web Vitals]");class sV{constructor(e){var t;this.Qi=!1,this.C=!1,this.H={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.Zi=()=>{clearTimeout(this.te),0!==this.H.metrics.length&&(this._instance.capture("$web_vitals",this.H.metrics.reduce((e,t)=>y({},e,{["$web_vitals_"+t.name+"_event"]:y({},t),["$web_vitals_"+t.name+"_value"]:t.value}),{})),this.H={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.ie=e=>{var t,i=null==(t=this._instance.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0);if(O(i))sG.error("Could not read session ID. Dropping metrics!");else{this.H=this.H||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var s=this.ee();O(s)||(D(null==e?void 0:e.name)||D(null==e?void 0:e.value)?sG.error("Invalid metric received",e):this.re&&e.value>=this.re?sG.error("Ignoring metric with value >= "+this.re,e):(this.H.url!==s&&(this.Zi(),this.te=setTimeout(this.Zi,this.flushToCaptureTimeoutMs)),O(this.H.url)&&(this.H.url=s),this.H.firstMetricTimestamp=O(this.H.firstMetricTimestamp)?Date.now():this.H.firstMetricTimestamp,e.attribution&&e.attribution.interactionTargetElement&&(e.attribution.interactionTargetElement=void 0),this.H.metrics.push(y({},e,{$current_url:s,$session_id:i.sessionId,$window_id:i.windowId,timestamp:Date.now()})),this.H.metrics.length===this.allowedMetrics.length&&this.Zi()))}},this.lt=()=>{var e,t,i,s,r=_.__PosthogExtensions__;O(r)||O(r.postHogWebVitalsCallbacks)||({onLCP:e,onCLS:t,onFCP:i,onINP:s}=r.postHogWebVitalsCallbacks),e&&t&&i&&s?(this.allowedMetrics.indexOf("LCP")>-1&&e(this.ie.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&t(this.ie.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&i(this.ie.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&s(this.ie.bind(this)),this.C=!0):sG.error("web vitals callbacks not loaded - not starting")},this._instance=e,this.Qi=!(null==(t=this._instance.persistence)||!t.props[eG]),this.startIfEnabled()}get allowedMetrics(){var e,t,i=C(this._instance.config.capture_performance)?null==(e=this._instance.config.capture_performance)?void 0:e.web_vitals_allowed_metrics:void 0;return O(i)?(null==(t=this._instance.persistence)?void 0:t.props[eW])||["CLS","FCP","INP","LCP"]:i}get flushToCaptureTimeoutMs(){return(C(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}get re(){var e=C(this._instance.config.capture_performance)&&N(this._instance.config.capture_performance.__web_vitals_max_value)?this._instance.config.capture_performance.__web_vitals_max_value:9e5;return 0<e&&e<=6e4?9e5:e}get isEnabled(){var e=null==u?void 0:u.protocol;if("http:"!==e&&"https:"!==e)return sG.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=C(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals:H(this._instance.config.capture_performance)?this._instance.config.capture_performance:void 0;return H(t)?t:this.Qi}
1startIfEnabled(){this.isEnabled&&!this.C&&(sG.info("enabled, starting..."),this.nt(this.lt))}onRemoteConfig(e){var t=C(e.capturePerformance)&&!!e.capturePerformance.web_vitals,i=C(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[eG]:t}),this._instance.persistence.register({[eW]:i})),this.Qi=t,this.startIfEnabled()}nt(e){var t,i;null!=(t=_.__PosthogExtensions__)&&t.postHogWebVitalsCallbacks&&e(),null==(i=_.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"web-vitals",t=>{t?sG.error("failed to load script",t):e()})}ee(){var e=s?s.location.href:void 0;return e||sG.error("Could not determine current URL"),e}}var sW=eE("[Heatmaps]");function sY(e){return C(e)&&"clientX"in e&&"clientY"in e&&N(e.clientX)&&N(e.clientY)}class sJ{constructor(e){var t;this.rageclicks=new tU,this.Qi=!1,this.C=!1,this.se=null,this.instance=e,this.Qi=!(null==(t=this.instance.persistence)||!t.props[eq])}get flushIntervalMilliseconds(){var e=5e3;return C(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 O(this.instance.config.capture_heatmaps)?O(this.instance.config.enable_heatmaps)?this.Qi:this.instance.config.enable_heatmaps:!1!==this.instance.config.capture_heatmaps}startIfEnabled(){if(this.isEnabled)this.C||(sW.info("starting..."),this.ne(),this.se=setInterval(this.oe.bind(this),this.flushIntervalMilliseconds));else{var e,t;clearInterval(null!=(e=this.se)?e:void 0),null==(t=this.ae)||t.stop(),this.getAndClearBuffer()}}onRemoteConfig(e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[eq]:t}),this.Qi=t,this.startIfEnabled()}getAndClearBuffer(){var e=this.H;return this.H=void 0,e}le(e){this.ue(e.originalEvent,"deadclick")}ne(){s&&c&&(eL(s,"beforeunload",this.oe.bind(this)),eL(c,"click",e=>this.ue(e||(null==s?void 0:s.event)),{capture:!0}),eL(c,"mousemove",e=>this.he(e||(null==s?void 0:s.event)),{capture:!0}),this.ae=new im(this.instance,i_,this.le.bind(this)),this.ae.startIfEnabled(),this.C=!0)}de(e,t){var i=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),n=this.instance.scrollManager.scrollElement(),a=function(e,t,i){for(var r=e;r&&tv(r)&&!tf(r,"body")&&r!==i;){if(E(t,null==s?void 0:s.getComputedStyle(r).position))return!0;r=tF(r)}return!1}(tx(e),["fixed","sticky"],n);return{x:e.clientX+(a?0:r),y:e.clientY+(a?0:i),target_fixed:a,type:t}}ue(e,t){var i;if(void 0===t&&(t="click"),!t_(e.target)&&sY(e)){var s=this.de(e,t);null!=(i=this.rageclicks)&&i.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&this.ve(y({},s,{type:"rageclick"})),this.ve(s)}}he(e){!t_(e.target)&&sY(e)&&(clearTimeout(this.ce),this.ce=setTimeout(()=>{this.ve(this.de(e,"mousemove"))},500))}ve(e){if(s){var t=s.location.href;this.H=this.H||{},this.H[t]||(this.H[t]=[]),this.H[t].push(e)}}oe(){this.H&&!T(this.H)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}}class sX{constructor(e){this._instance=e}doPageView(e,t){var i,r=this.fe(e,t);return this.pe={pathname:null!=(i=null==s?void 0:s.location.pathname)?i:"",pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),r}doPageLeave(e){var t;return this.fe(e,null==(t=this.pe)?void 0:t.pageViewId)}doEvent(){var e;return{$pageview_id:null==(e=this.pe)?void 0:e.pageViewId}}fe(e,t){var i=this.pe;if(!i)return{$pageview_id:t};var s={$pageview_id:t,$prev_pageview_id:i.pageViewId},r=this._instance.scrollManager.getContext();if(r&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:n,lastScrollY:a,maxScrollY:o,maxContentHeight:l,lastContentY:c,maxContentY:u}=r;if(!(O(n)||O(a)||O(o)||O(l)||O(c)||O(u))){n=Math.ceil(n),a=Math.ceil(a),o=Math.ceil(o),l=Math.ceil(l),c=Math.ceil(c),u=Math.ceil(u);var h=n<=1?1:V(a/n,0,1,ew),d=n<=1?1:V(o/n,0,1,ew),p=l<=1?1:V(c/l,0,1,ew),g=l<=1?1:V(u/l,0,1,ew);s=eF(s,{$prev_pageview_last_scroll:a,$prev_pageview_last_scroll_percentage:h,$prev_pageview_max_scroll:o,$prev_pageview_max_scroll_percentage:d,$prev_pageview_last_content:c,$prev_pageview_last_content_percentage:p,$prev_pageview_max_content:u,$prev_pageview_max_content_percentage:g})}}return i.pathname&&(s.$prev_pageview_pathname=i.pathname),i.timestamp&&(s.$prev_pageview_duration=(e.getTime()-i.timestamp.getTime())/1e3),s}}var sK=function(e){var t,i,s,r,n="";for(t=i=0,s=(e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,r=0;r<s;r++){var a=e.charCodeAt(r),o=null;a<128?i++:o=a>127&&a<2048?String.fromCharCode(a>>6|192,63&a|128):String.fromCharCode(a>>12|224,a>>6&63|128,63&a|128),L(o)||(i>t&&(n+=e.substring(t,i)),n+=o,t=i=r+1)}return i>t&&(n+=e.substring(t,e.length)),n}
1,sZ=!!d||!!h,sQ="text/plain",s0=(e,t)=>{var[i,s]=e.split("?"),r=y({},t);null==s||s.split("&").forEach(e=>{var[t]=e.split("=");delete r[t]});var n=tY(r);return i+"?"+(n=n?(s?s+"&":"")+n:s)},s1=(e,t)=>JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString():t,t),s2=e=>{var{data:t,compression:i}=e;if(t){if(i===tG.GZipJS){var s=new Blob([sn(sa(s1(t)),{mtime:0})],{type:sQ});return{contentType:sQ,body:s,estimatedSize:s.size}}if(i===tG.Base64){let e;var r="data="+encodeURIComponent("string"==typeof(e=function(e){var t,i,s,r,n,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=0,l=0,c="",u=[];if(!e)return e;e=sK(e);do t=(n=e.charCodeAt(o++)<<16|e.charCodeAt(o++)<<8|e.charCodeAt(o++))>>18&63,i=n>>12&63,s=n>>6&63,r=63&n,u[l++]=a.charAt(t)+a.charAt(i)+a.charAt(s)+a.charAt(r);while(o<e.length)switch(c=u.join(""),e.length%3){case 1:c=c.slice(0,-2)+"==";break;case 2:c=c.slice(0,-1)+"="}return c}(s1(t)))?e:s1(e));return{contentType:"application/x-www-form-urlencoded",body:r,estimatedSize:new Blob([r]).size}}var n=s1(t);return{contentType:"application/json",body:n,estimatedSize:new Blob([n]).size}}},s3=[];h&&s3.push({transport:"fetch",method:e=>{var t,i,{contentType:s,body:r,estimatedSize:n}=null!=(t=s2(e))?t:{},a=new Headers;eR(e.headers,function(e,t){a.append(t,e)}),s&&a.append("Content-Type",s);var o=e.url,l=null;if(p){var c=new p;l={signal:c.signal,timeout:setTimeout(()=>c.abort(),e.timeout)}}h(o,y({method:(null==e?void 0:e.method)||"GET",headers:a,keepalive:"POST"===e.method&&52428.8>(n||0),body:r,signal:null==(i=l)?void 0:i.signal},e.fetchOptions)).then(t=>t.text().then(i=>{var s={statusCode:t.status,text:i};if(200===t.status)try{s.json=JSON.parse(i)}catch(e){ew.error(e)}null==e.callback||e.callback(s)})).catch(t=>{ew.error(t),null==e.callback||e.callback({statusCode:0,text:t})}).finally(()=>l?clearTimeout(l.timeout):null)}}),d&&s3.push({transport:"XHR",method:e=>{var t,i=new d;i.open(e.method||"GET",e.url,!0);var{contentType:s,body:r}=null!=(t=s2(e))?t:{};eR(e.headers,function(e,t){i.setRequestHeader(t,e)}),s&&i.setRequestHeader("Content-Type",s),e.timeout&&(i.timeout=e.timeout),e.disableXHRCredentials||(i.withCredentials=!0),i.onreadystatechange=()=>{if(4===i.readyState){var t={statusCode:i.status,text:i.responseText};if(200===i.status)try{t.json=JSON.parse(i.responseText)}catch(e){}null==e.callback||e.callback(t)}},i.send(r)}}),null!=l&&l.sendBeacon&&s3.push({transport:"sendBeacon",method:e=>{var t=s0(e.url,{beacon:"1"});try{var i,{contentType:s,body:r}=null!=(i=s2(e))?i:{},n="string"==typeof r?new Blob([r],{type:s}):r;l.sendBeacon(t,n)}catch(e){}}});var s5=function(e,t){if(!function(e){try{new RegExp(e)}catch(e){return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch(e){return!1}};function s6(e,t,i){return s1({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:i})}var s4={exact:(e,t)=>t.some(t=>e.some(e=>t===e)),is_not:(e,t)=>t.every(t=>e.every(e=>t!==e)),regex:(e,t)=>t.some(t=>e.some(e=>s5(t,e))),not_regex:(e,t)=>t.every(t=>e.every(e=>!s5(t,e))),icontains:(e,t)=>t.map(s8).some(t=>e.map(s8).some(e=>t.includes(e))),not_icontains:(e,t)=>t.map(s8).every(t=>e.map(s8).every(e=>!t.includes(e)))},s8=e=>e.toLowerCase(),s7=eE("[Error tracking]");class s9{constructor(e){var t,i;this.ge=[],this._e=new el([new ec,new ey,new eh,new eu,new ef,new ev,new ep,new em],[es,ea]),this._instance=e,this.ge=null!=(t=null==(i=this._instance.persistence)?void 0:i.get_property(eU))?t:[]}onRemoteConfig(e){var t,i,s,r=null!=(t=null==(i=e.errorTracking)?void 0:i.suppressionRules)?t:[],n=null==(s=e.errorTracking)?void 0:s.captureExtensionExceptions;this.ge=r,this._instance.persistence&&this._instance.persistence.register({[eU]:this.ge,[ez]:n})}get me(){var e,t=!!this._instance.get_property(ez),i=this._instance.config.error_tracking.captureExtensionExceptions;return null!=(e=null!=i?i:t)&&e}buildProperties(e,t){return this._e.buildFromUnknown(e,{syntheticException:null==t?void 0:t.syntheticException,mechanism:{handled:null==t?void 0:t.handled}})}sendExceptionEvent(e){if(this.ye(e))s7.info("Skipping exception capture because a suppression rule matched");else{if(this.me||!this.be(e))return this._instance.capture("$exception",e,{_noTruncate:!0,_batchKey:"exceptionEvent"});s7.info("Skipping exception capture because it was thrown by an extension")}}ye(e){var t=e.$exception_list;if(!t||!$(t)||0===t.length)return!1;var i=t.reduce((e,t)=>
1{var{type:i,value:s}=t;return A(i)&&i.length>0&&e.$exception_types.push(i),A(s)&&s.length>0&&e.$exception_values.push(s),e},{$exception_types:[],$exception_values:[]});return this.ge.some(e=>{var t=e.values.map(e=>{var t,s=s4[e.operator],r=$(e.value)?e.value:[e.value],n=null!=(t=i[e.key])?t:[];return r.length>0&&s(r,n)});return"OR"===e.type?t.some(Boolean):t.every(Boolean)})}be(e){var t=e.$exception_list;return!(!t||!$(t))&&t.flatMap(e=>{var t,i;return null!=(t=null==(i=e.stacktrace)?void 0:i.frames)?t:[]}).some(e=>e.filename&&e.filename.startsWith("chrome-extension://"))}}var re="Mobile",rt="Android",ri="Tablet",rs=rt+" "+ri,rr="iPad",rn="Apple",ra=rn+" Watch",ro="Safari",rl="BlackBerry",rc="Samsung",ru=rc+"Browser",rh=rc+" Internet",rd="Chrome",rp=rd+" OS",rg=rd+" iOS",r_="Internet Explorer",rv=r_+" "+re,rf="Opera",rm=rf+" Mini",ry="Edge",rb="Microsoft "+ry,rw="Firefox",rE=rw+" iOS",rk="Nintendo",rS="PlayStation",rx="Xbox",rI=rt+" "+re,rR=re+" "+ro,rF="Windows",r$=rF+" Phone",rP="Nokia",rC="Ouya",rT="Generic",rO=rT+" "+re.toLowerCase(),rA=rT+" "+ri.toLowerCase(),rM="Konqueror",rL="(\\d+(\\.\\d+)?)",rD=RegExp("Version/"+rL),rN=RegExp(rx,"i"),rH=RegExp(rS+" \\w+","i"),rj=RegExp(rk+" \\w+","i"),rq=RegExp(rl+"|PlayBook|BB10","i"),rB={"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"},rU=function(e,t){var i;return t=t||"",E(e," OPR/")&&E(e,"Mini")?rm:E(e," OPR/")?rf:rq.test(e)?rl:E(e,"IE"+re)||E(e,"WPDesktop")?rv:E(e,ru)?rh:E(e,ry)||E(e,"Edg/")?rb:E(e,"FBIOS")?"Facebook "+re:E(e,"UCWEB")||E(e,"UCBrowser")?"UC Browser":E(e,"CriOS")?rg:E(e,"CrMo")||E(e,rd)?rd:E(e,rt)&&E(e,ro)?rI:E(e,"FxiOS")?rE:E(e.toLowerCase(),rM.toLowerCase())?rM:(i=t)&&E(i,rn)||E(e,ro)&&!E(e,rd)&&!E(e,rt)?E(e,re)?rR:ro:E(e,rw)?rw:E(e,"MSIE")||E(e,"Trident/")?r_:E(e,"Gecko")?rw:""},rz={[rv]:[RegExp("rv:"+rL)],[rb]:[RegExp(ry+"?\\/"+rL)],[rd]:[RegExp("("+rd+"|CrMo)\\/"+rL)],[rg]:[RegExp("CriOS\\/"+rL)],"UC Browser":[RegExp("(UCBrowser|UCWEB)\\/"+rL)],[ro]:[rD],[rR]:[rD],[rf]:[RegExp("(Opera|OPR)\\/"+rL)],[rw]:[RegExp(rw+"\\/"+rL)],[rE]:[RegExp("FxiOS\\/"+rL)],[rM]:[RegExp("Konqueror[:/]?"+rL,"i")],[rl]:[RegExp(rl+" "+rL),rD],[rI]:[RegExp("android\\s"+rL,"i")],[rh]:[RegExp(ru+"\\/"+rL)],[r_]:[RegExp("(rv:|MSIE )"+rL)],Mozilla:[RegExp("rv:"+rL)]},rG=function(e,t){var i=rz[rU(e,t)];if(O(i))return null;for(var s=0;s<i.length;s++){var r=i[s],n=e.match(r);if(n)return parseFloat(n[n.length-2])}return null},rV=[[RegExp(rx+"; "+rx+" (.*?)[);]","i"),e=>[rx,e&&e[1]||""]],[RegExp(rk,"i"),[rk,""]],[RegExp(rS,"i"),[rS,""]],[rq,[rl,""]],[RegExp(rF,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[r$,""];if(new RegExp(re).test(t)&&!/IEMobile\b/.test(t))return[rF+" "+re,""];var i=/Windows NT ([0-9.]+)/i.exec(t);if(i&&i[1]){var s=rB[i[1]]||"";return/arm/i.test(t)&&(s="RT"),[rF,s]}return[rF,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?["iOS",[e[3],e[4],e[5]||"0"].join(".")]:["iOS",""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=O(e[2])?e[3]:e[2]),["watchOS",t]}],[RegExp("("+rt+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+rt+")","i"),e=>e&&e[2]?[rt,[e[2],e[3],e[4]||"0"].join(".")]:[rt,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];if(e&&e[1]){var i=[e[1],e[2],e[3]||"0"];t[1]=i.join(".")}return t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[rp,""]],[/Linux|debian/i,["Linux",""]]],rW=function(e){return rj.test(e)?rk:rH.test(e)?rS:rN.test(e)?rx:RegExp(rC,"i").test(e)?rC:RegExp("("+r$+"|WPDesktop)","i").test(e)?r$:/iPad/.test(e)?rr:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?ra:rq.test(e)?rl:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":RegExp(rP,"i").test(e)?rP:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?!new RegExp(re).test(e)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)?/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?rt:rs:rt:Reg
vendor: 12,294 bytes, line 1
1Exp("(pda|"+re+")","i").test(e)?rO:RegExp(ri,"i").test(e)&&!RegExp(ri+" pc","i").test(e)?rA:""},rY="https?://(.*)",rJ=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],rX=e$(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],rJ),rK="<masked>",rZ=["li_fat_id"];function rQ(e,t,i){if(!c)return{};var s,r=t?e$([],rJ,i||[]):[],n=r0(tX(c.URL,r,rK),e);return eF((s={},eR(rZ,function(e){var t=ii.J(e);s[e]=t||null}),s),n)}function r0(e,t){var i=rX.concat(t||[]),s={};return eR(i,function(t){var i=tJ(e,t);s[t]=i||null}),s}function r1(e){var t=e?0===e.search(rY+"google.([^/?]*)")?"google":0===e.search(rY+"bing.com")?"bing":0===e.search(rY+"yahoo.com")?"yahoo":0===e.search(rY+"duckduckgo.com")?"duckduckgo":null:null,i={};if(!L(t)){i.$search_engine=t;var s=c?tJ(c.referrer,"yahoo"!=t?"q":"p"):"";s.length&&(i.ph_keyword=s)}return i}function r2(){return navigator.language||navigator.userLanguage}function r3(){return(null==c?void 0:c.referrer)||"$direct"}function r5(e,t){var i=e?e$([],rJ,t||[]):[],s=null==u?void 0:u.href.substring(0,1e3);return{r:r3().substring(0,1e3),u:s?tX(s,i,rK):void 0}}function r6(e){var t,{r:i,u:s}=e,r={$referrer:i,$referring_domain:null==i?void 0:"$direct"==i?"$direct":null==(t=tW(i))?void 0:t.host};if(s){r.$current_url=s;var n=tW(s);r.$host=null==n?void 0:n.host,r.$pathname=null==n?void 0:n.pathname,eF(r,r0(s))}return i&&eF(r,r1(i)),r}function r4(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}var r8=eE("[FeatureFlags]"),r7="$active_feature_flags",r9="$override_feature_flags",ne="$feature_flag_payloads",nt="$override_feature_flag_payloads",ni="$feature_flag_request_id",ns=e=>{var t={};for(var[i,s]of eP(e||{}))s&&(t[i]=s);return t},nr=((n7={}).FeatureFlags="feature_flags",n7.Recordings="recordings",n7);class nn{constructor(e){this.we=!1,this.Se=!1,this.ke=!1,this.$e=!1,this.xe=!1,this.Ee=!1,this.Re=!1,this._instance=e,this.featureFlagEventHandlers=[]}Ie(){var e=this._instance.config.evaluation_environments;return null!=e&&e.length?e.filter(e=>{var t=e&&"string"==typeof e&&e.trim().length>0;return t||r8.error("Invalid evaluation environment found:",e,"Expected non-empty string"),t}):[]}Pe(){return this.Ie().length>0}flags(){if(this._instance.config.__preview_remote_config)this.Ee=!0;else{var e=!this.Te&&(this._instance.config.advanced_disable_feature_flags||this._instance.config.advanced_disable_feature_flags_on_first_load);this.Ce({disableFlags:e})}}get hasLoadedFlags(){return this.Se}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this._instance.get_property(e9),t=this._instance.get_property(r9),i=this._instance.get_property(nt);if(!i&&!t)return e||{};var s=eF({},e||{});for(var r of[...new Set([...Object.keys(i||{}),...Object.keys(t||{})])]){var n,a,o=s[r],l=null==t?void 0:t[r],c=O(l)?null!=(n=null==o?void 0:o.enabled)&&n:!!l,u=O(l)?o.variant:"string"==typeof l?l:void 0,h=null==i?void 0:i[r],d=y({},o,{enabled:c,variant:c?null!=u?u:null==o?void 0:o.variant:void 0});c!==(null==o?void 0:o.enabled)&&(d.original_enabled=null==o?void 0:o.enabled),u!==(null==o?void 0:o.variant)&&(d.original_variant=null==o?void 0:o.variant),h&&(d.metadata=y({},null==o?void 0:o.metadata,{payload:h,original_payload:null==o||null==(a=o.metadata)?void 0:a.payload})),s[r]=d}return this.we||(r8.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:i,finalDetails:s}),this.we=!0),s}getFlagVariants(){var e=this._instance.get_property(e8),t=this._instance.get_property(r9);if(!t)return e||{};for(var i=eF({},e),s=Object.keys(t),r=0;r<s.length;r++)i[s[r]]=t[s[r]];return this.we||(r8.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:i}),this.we=!0),i}getFlagPayloads(){var e=this._instance.get_property(ne),t=this._instance.get_property(nt);if(!t)return e||{};for(var i=eF({},e||{}),s=Object.keys(t),r=0;r<s.length;r++)i[s[r]]=t[s[r]];return this.we||(r8.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:i}),this.we=!0),i}reloadFeatureFlags(){this.$e||this._instance.config.advanced_disable_feature_flags||this.Te||(this.Te=setTimeout(()=>{this.Ce()},5))}Me(){clearTimeout(this.Te),this.Te=void 0}ensureFlagsLoaded(){this.Se||this.ke||this.Te||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.$e=e}Ce(e){var t;if(this.Me(),!this._instance.L())if(this.ke)this.xe=!0;else{var i={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:y({},(null==(t=this._instance.persistence)?void 0:t.get_initial_props())||{},this._instance.get_property(te)||{}),group_properties:this._instance.get_property(tt)};(null!=e&&e.disableFlags||this._instance.config.advanced_disable_feature_flags)&&(i.disable_flags=!0),this.Pe()&&(i.evaluation_environments=this.Ie());var s=this._instance.config.__preview_remote_config,r=this._instance.config.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":"",n=this._instance.requestRouter.endpointFor("api",(s?"/flags/?v=2":"/flags/?v=2&config=true")+r);s&&(i.timezone=r4()),this.ke=!0,this._instance.Oe({method:"POST",url:n,data:i,compression:this._instance.config.disable_compression?void 0:tG.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:e=>{var t,s,r,n=!0;200===e.statusCode&&(this.xe||(this.$anon_distinct_id=void 0),n=!1),this.ke=!1,this.Ee||(this.Ee=!0,this._instance.Fe(null!=(r=e.json)?r:{})),(!i.disable_flags||this.xe)&&((this.Re=!n,e.json&&null!=(s=e.json.quotaLimited)&&s.includes(nr.FeatureFlags))?r8.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."):(i.disable_flags||this.receivedFeatureFlags(null!=(t=e.json)?t:{},n),this.xe&&(this.xe=!1,this.Ce())))}})}}getFeatureFlag(e,t){if(void 0===t&&(t={}),this.Se||this.getFlags()&&this.getFlags().length>0){var i=this.getFlagVariants()[e],s=""+i,r=this._instance.get_property(ni)||void 0,n=this._instance.get_property(tr)||{};if((t.send_event||!("send_event"in t))&&(!(e in n)||!n[e].includes(s))){$(n[e])?n[e].push(s):n[e]=[s],null==(l=this._instance.persistence)||l.register({[tr]:n});var a=this.getFeatureFlagDetails(e),o={$feature_flag:e,$feature_flag_response:i,$feature_flag_payload:this.getFeatureFlagPayload(e)||null,$feature_flag_request_id:r,$feature_flag_bootstrapped_response:(null==(c=this._instance.config.bootstrap)||null==(c=c.featureFlags)?void 0:c[e])||null,$feature_flag_bootstrapped_payload:(null==(u=this._instance.config.bootstrap)||null==(u=u.featureFlagPayloads)?void 0:u[e])||null,$used_bootstrap_value:!this.Re};O(null==a||null==(h=a.metadata)?void 0:h.version)||(o.$feature_flag_version=a.metadata.version);var l,c,u,h,d,p,g,_,v,f,m=null!=(d=null==a||null==(p=a.reason)?void 0:p.description)?d:null==a||null==(g=a.reason)?void 0:g.code;m&&(o.$feature_flag_reason=m),null!=a&&null!=(_=a.metadata)&&_.id&&(o.$feature_flag_id=a.metadata.id),O(null==a?void 0:a.original_variant)&&O(null==a?void 0:a.original_enabled)||(o.$feature_flag_original_response=O(a.original_variant)?a.original_enabled:a.original_variant),null!=a&&null!=(v=a.metadata)&&v.original_payload&&(o.$feature_flag_original_payload=null==a||null==(f=a.metadata)?void 0:f.original_payload),this._instance.capture("$feature_flag_called",o)}return i}r8.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 i=this._instance.config.token,s={distinct_id:this._instance.get_distinct_id(),token:i};this.Pe()&&(s.evaluation_environments=this.Ie()),this._instance.Oe({method:"POST",url:this._instance.requestRouter.endpointFor("api","/flags/?v=2&config=true"),data:s,compression:this._instance.config.disable_compression?void 0:tG.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:i=>{var s,r=null==(s=i.json)?void 0:s.featureFlagPayloads;t((null==r?void 0:r[e])||void 0)}})}isFeatureEnabled(e,t){if(void 0===t&&(t={}),this.Se||this.getFlags()&&this.getFlags().length>0){var i=this.getFeatureFlag(e,t);return O(i)?void 0:!!i}r8.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.Se=!0;var i=this.getFlagVariants(),s=this.getFlagPayloads(),r=this.getFlagsWithDetails();!function(e,t,i,s,r){void 0===i&&(i={}),void 0===s&&(s={}),void 0===r&&(r={});var n,a=((n=e.flags)?(e.featureFlags=Object.fromEntries(Object.keys(n).map(e=>{var t;return[e,null!=(t=n[e].variant)?t:n[e].enabled]})),e.featureFlagPayloads=Object.fromEntries(Object.keys(n).filter(e=>n[e].enabled).filter(e=>{var t;return null==(t=n[e].metadata)?void 0:t.payload}).map(e=>{var t;return[e,null==(t=n[e].metadata)?void 0:t.payload]}))):r8.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e),o=a.flags,l=a.featureFlags,c=a.featureFlagPayloads;if(l){var u=e.requestId;if($(l)){r8.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var h={};if(l)for(var d=0;d<l.length;d++)h[l[d]]=!0;t&&t.register({[r7]:l,[e8]:h})}else{var p=l,g=c,_=o;e.errorsWhileComputingFlags&&(p=y({},i,p),g=y({},s,g),_=y({},r,_)),t&&t.register(y({[r7]:Object.keys(ns(p)),[e8]:p||{},[ne]:g||{},[e9]:_||{}},u?{[ni]:u}:{}))}}}(e,this._instance.persistence,i,s,r),this.Ae(t)}}override(e,t){void 0===t&&(t=!1),r8.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this._instance.persistence)return r8.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(!1===e)return this._instance.persistence.unregister(r9),this._instance.persistence.unregister(nt),void this.Ae();if(e&&"object"==typeof e&&("flags"in e||"payloads"in e)){var t;if(this.we=!!(null!=(t=e.suppressWarning)&&t),"flags"in e){if(!1===e.flags)this._instance.persistence.unregister(r9);else if(e.flags)if($(e.flags)){for(var i={},s=0;s<e.flags.length;s++)i[e.flags[s]]=!0;this._instance.persistence.register({[r9]:i})}else this._instance.persistence.register({[r9]:e.flags})}return"payloads"in e&&(!1===e.payloads?this._instance.persistence.unregister(nt):e.payloads&&this._instance.persistence.register({[nt]:e.payloads})),void this.Ae()}this.Ae()}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.Se){var{flags:t,flagVariants:i}=this.De();e(t,i)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,i){var s,r=(this._instance.get_property(e7)||[]).find(t=>t.flagKey===e),n={["$feature_enrollment/"+e]:t},a={$feature_flag:e,$feature_enrollment:t,$set:n};r&&(a.$early_access_feature_name=r.name),i&&(a.$feature_enrollment_stage=i),this._instance.capture("$feature_enrollment_update",a),this.setPersonPropertiesForFlags(n,!1);var o=y({},this.getFlagVariants(),{[e]:t});null==(s=this._instance.persistence)||s.register({[r7]:Object.keys(ns(o)),[e8]:o}),this.Ae()}getEarlyAccessFeatures(e,t,i){void 0===t&&(t=!1);var s=this._instance.get_property(e7),r=i?"&"+i.map(e=>"stage="+e).join("&"):"";if(s&&!t)return e(s);this._instance.Oe({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this._instance.config.token+r),method:"GET",callback:t=>{var i,s;if(t.json){var r=t.json.earlyAccessFeatures;return null==(i=this._instance.persistence)||i.unregister(e7),null==(s=this._instance.persistence)||s.register({[e7]:r}),e(r)}}})}De(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter(e=>t[e]),flagVariants:Object.keys(t).filter(e=>t[e]).reduce((e,i)=>(e[i]=t[i],e),{})}}Ae(e){var{flags:t,flagVariants:i}=this.De();
1this.featureFlagEventHandlers.forEach(s=>s(t,i,{errorsLoading:e}))}setPersonPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=this._instance.get_property(te)||{};this._instance.register({[te]:y({},i,e)}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(te)}setGroupPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=this._instance.get_property(tt)||{};0!==Object.keys(i).length&&Object.keys(i).forEach(t=>{i[t]=y({},i[t],e[t]),delete e[t]}),this._instance.register({[tt]:y({},i,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this._instance.get_property(tt)||{};this._instance.register({[tt]:y({},t,{[e]:{}})})}else this._instance.unregister(tt)}reset(){this.Se=!1,this.ke=!1,this.$e=!1,this.xe=!1,this.Ee=!1,this.Re=!1,this.$anon_distinct_id=void 0,this.Me(),this.we=!1}}var na=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class no{constructor(e,t){this.A=e,this.props={},this.je=!1,this.Le=(e=>{var t="";return e.token&&(t=e.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),e.persistence_name?"ph_"+e.persistence_name:"ph_"+t+"_posthog"})(e),this.it=this.Ne(e),this.load(),e.debug&&ew.info("Persistence loaded",e.persistence,y({},this.props)),this.update_config(e,e,t),this.save()}isDisabled(){return!!this.Ue}Ne(e){-1===na.indexOf(e.persistence.toLowerCase())&&(ew.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t=e.persistence.toLowerCase();return"localstorage"===t&&ir.G()?ir:"localstorage+cookie"===t&&io.G()?io:"sessionstorage"===t&&ih.G()?ih:"memory"===t?ic:"cookie"===t?ii:io.G()?io:ii}properties(){var e={};return eR(this.props,function(t,i){if(i===e8&&C(t))for(var s,r=Object.keys(t),n=0;n<r.length;n++)e["$feature/"+r[n]]=t[r[n]];else s=!1,(L(tg)?s:o&&tg.indexOf===o?-1!=tg.indexOf(i):(eR(tg,function(e){if(s||(s=e===i))return ex}),s))||(e[i]=t)}),e}load(){if(!this.Ue){var e=this.it.K(this.Le);e&&(this.props=eF({},e))}}save(){this.Ue||this.it.Y(this.Le,this.props,this.ze,this.Be,this.qe,this.A.debug)}remove(){this.it.X(this.Le,!1),this.it.X(this.Le,!0)}clear(){this.remove(),this.props={}}register_once(e,t,i){if(C(e)){O(t)&&(t="None"),this.ze=O(i)?this.He:i;var s=!1;if(eR(e,(e,i)=>{this.props.hasOwnProperty(i)&&this.props[i]!==t||(this.props[i]=e,s=!0)}),s)return this.save(),!0}return!1}register(e,t){if(C(e)){this.ze=O(t)?this.He:t;var i=!1;if(eR(e,(t,s)=>{e.hasOwnProperty(s)&&this.props[s]!==t&&(this.props[s]=t,i=!0)}),i)return this.save(),!0}return!1}unregister(e){e in this.props&&(delete this.props[e],this.save())}update_campaign_params(){if(!this.je){var e=rQ(this.A.custom_campaign_params,this.A.mask_personal_data_properties,this.A.custom_personal_data_properties);T(eO(e))||this.register(e),this.je=!0}}update_search_keyword(){var e;this.register((e=null==c?void 0:c.referrer)?r1(e):{})}update_referrer_info(){var e;this.register_once({$referrer:r3(),$referring_domain:null!=c&&c.referrer&&(null==(e=tW(c.referrer))?void 0:e.host)||"$direct"},void 0)}set_initial_person_info(){this.props[tl]||this.props[tc]||this.register_once({[tu]:r5(this.A.mask_personal_data_properties,this.A.custom_personal_data_properties)},void 0)}get_initial_props(){var e={};eR([tc,tl],t=>{var i=this.props[t];i&&eR(i,function(t,i){e["$initial_"+S(i)]=t})});var t,i,s=this.props[tu];return s&&eF(e,(t=r6(s),i={},eR(t,function(e,t){i["$initial_"+S(t)]=e}),i)),e}safe_merge(e){return eR(this.props,function(t,i){i in e||(e[i]=t)}),e}update_config(e,t,i){if(this.He=this.ze=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!i),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==t.persistence){var s=this.Ne(e),r=this.props;this.clear(),this.it=s,this.props=r,this.save()}}set_disabled(e){this.Ue=e,this.Ue?this.remove():this.save()}set_cross_subdomain(e){e!==this.Be&&(this.Be=e,this.remove(),this.save())}set_secure(e){e!==this.qe&&(this.qe=e,this.remove(),this.save())}set_event_timer(e,t){var i=this.props[eH]||{};i[e]=t,this.props[eH]=i,this.save()}remove_event_timer(e){var t=(this.props[eH]||{})[e];return O(t)||(delete this.props[eH][e],this.save()),t}get_property(e){return this.props[e]}set_property(e,t){this.props[e]=t,this.save()}}(n9={}).Button="button",n9.Tab="tab",n9.Selector="selector",(ae={}).TopLeft="top_left",ae.TopRight="top_right",ae.TopCenter="top_center",ae.MiddleLeft="middle_left",ae.MiddleRight="middle_right",ae.MiddleCenter="middle_center",ae.Left="left",ae.Center="center",ae.Right="right",ae.NextToTrigger="next_to_trigger";var nl=((at={}).Popover="popover",at.API="api",at.Widget="widget",at.ExternalSurvey="external_survey",at),nc=((ai={}).Open="open",ai.MultipleChoice="multiple_choice",ai.SingleChoice="single_choice",ai.Rating="rating",ai.Link="link",(as={}).NextQuestion="next_question",as.End="end",as.ResponseBased="response_based",as.SpecificQuestion="specific_question",(ar={}).Once="once",ar.Recurring="recurring",ar.Always="always",(an={}
1).SHOWN="survey shown",an.DISMISSED="survey dismissed",an.SENT="survey sent",an),nu=((aa={}).SURVEY_ID="$survey_id",aa.SURVEY_NAME="$survey_name",aa.SURVEY_RESPONSE="$survey_response",aa.SURVEY_ITERATION="$survey_iteration",aa.SURVEY_ITERATION_START_DATE="$survey_iteration_start_date",aa.SURVEY_PARTIALLY_COMPLETED="$survey_partially_completed",aa.SURVEY_SUBMISSION_ID="$survey_submission_id",aa.SURVEY_QUESTIONS="$survey_questions",aa.SURVEY_COMPLETED="$survey_completed",aa),nh=((ao={}).Popover="popover",ao.Inline="inline",ao);class nd{constructor(){this.We={},this.We={}}on(e,t){return this.We[e]||(this.We[e]=[]),this.We[e].push(t),()=>{this.We[e]=this.We[e].filter(e=>e!==t)}}emit(e,t){for(var i of this.We[e]||[])i(t);for(var s of this.We["*"]||[])s(e,t)}}class np{constructor(e){this.Ge=new nd,this.Ve=(e,t)=>this.Je(e,t)&&this.Ke(e,t)&&this.Ye(e,t),this.Je=(e,t)=>null==t||!t.event||(null==e?void 0:e.event)===(null==t?void 0:t.event),this._instance=e,this.Xe=new Set,this.Qe=new Set}init(){var e,t;O(null==(e=this._instance)?void 0:e.Ze)||null==(t=this._instance)||t.Ze((e,t)=>{this.on(e,t)})}register(e){var t,i;if(!O(null==(t=this._instance)?void 0:t.Ze)&&(e.forEach(e=>{var t,i;null==(t=this.Qe)||t.add(e),null==(i=e.steps)||i.forEach(e=>{var t;null==(t=this.Xe)||t.add((null==e?void 0:e.event)||"")})}),null!=(i=this._instance)&&i.autocapture)){var s,r=new Set;e.forEach(e=>{var t;null==(t=e.steps)||t.forEach(e=>{null!=e&&e.selector&&r.add(null==e?void 0:e.selector)})}),null==(s=this._instance)||s.autocapture.setElementSelectors(r)}}on(e,t){var i;null!=t&&0!=e.length&&(this.Xe.has(e)||this.Xe.has(null==t?void 0:t.event))&&this.Qe&&(null==(i=this.Qe)?void 0:i.size)>0&&this.Qe.forEach(e=>{this.tr(t,e)&&this.Ge.emit("actionCaptured",e.name)})}ir(e){this.onAction("actionCaptured",t=>e(t))}tr(e,t){if(null==(null==t?void 0:t.steps))return!1;for(var i of t.steps)if(this.Ve(e,i))return!0;return!1}onAction(e,t){return this.Ge.on(e,t)}Ke(e,t){if(null!=t&&t.url){var i,s=null==e||null==(i=e.properties)?void 0:i.$current_url;if(!s||"string"!=typeof s||!np.er(s,null==t?void 0:t.url,(null==t?void 0:t.url_matching)||"contains"))return!1}return!0}static er(e,t,i){switch(i){case"regex":return!!s&&s5(e,t);case"exact":return t===e;case"contains":return s5(e,np.rr(t).replace(/_/g,".").replace(/%/g,".*"));default:return!1}}static rr(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}Ye(e,t){if((null!=t&&t.href||null!=t&&t.tag_name||null!=t&&t.text)&&!this.sr(e).some(e=>!(null!=t&&t.href&&!np.er(e.href||"",null==t?void 0:t.href,(null==t?void 0:t.href_matching)||"exact"))&&(null==t||!t.tag_name||e.tag_name===(null==t?void 0:t.tag_name))&&!(null!=t&&t.text&&!np.er(e.text||"",null==t?void 0:t.text,(null==t?void 0:t.text_matching)||"exact")&&!np.er(e.$el_text||"",null==t?void 0:t.text,(null==t?void 0:t.text_matching)||"exact"))))return!1;if(null!=t&&t.selector){var i,s=null==e||null==(i=e.properties)?void 0:i.$element_selectors;if(!s||!s.includes(null==t?void 0:t.selector))return!1}return!0}sr(e){return null==(null==e?void 0:e.properties.$elements)?[]:null==e?void 0:e.properties.$elements}}var ng=eE("[Surveys]"),n_="seenSurvey_",nv=e=>{var t=""+n_+e.id;return e.current_iteration&&e.current_iteration>0&&(t=""+n_+e.id+"_"+e.current_iteration),t},nf=[nl.Popover,nl.Widget,nl.API],nm={ignoreConditions:!1,ignoreDelay:!1,displayType:nh.Popover};class ny{constructor(e){this._instance=e,this.nr=new Map,this.ar=new Map}register(e){var t;O(null==(t=this._instance)?void 0:t.Ze)||(this.lr(e),this.ur(e))}ur(e){var t=e.filter(e=>{var t,i;return(null==(t=e.conditions)?void 0:t.actions)&&(null==(i=e.conditions)||null==(i=i.actions)||null==(i=i.values)?void 0:i.length)>0});0!==t.length&&(null==this.hr&&(this.hr=new np(this._instance),this.hr.init(),this.hr.ir(e=>{this.onAction(e)})),t.forEach(e=>{var t,i,s,r,n;e.conditions&&null!=(t=e.conditions)&&t.actions&&null!=(i=e.conditions)&&null!=(i=i.actions)&&i.values&&(null==(s=e.conditions)||null==(s=s.actions)||null==(s=s.values)?void 0:s.length)>0&&(null==(r=this.hr)||r.register(e.conditions.actions.values),null==(n=e.conditions)||null==(n=n.actions)||null==(n=n.values)||n.forEac
1h(t=>{if(t&&t.name){var i=this.ar.get(t.name);i&&i.push(e.id),this.ar.set(t.name,i||[e.id])}}))}))}lr(e){var t;0!==e.filter(e=>{var t,i;return(null==(t=e.conditions)?void 0:t.events)&&(null==(i=e.conditions)||null==(i=i.events)||null==(i=i.values)?void 0:i.length)>0}).length&&(null==(t=this._instance)||t.Ze((e,t)=>{this.onEvent(e,t)}),e.forEach(e=>{var t;null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||t.forEach(t=>{if(t&&t.name){var i=this.nr.get(t.name);i&&i.push(e.id),this.nr.set(t.name,i||[e.id])}})}))}onEvent(e,t){var i,s,r=(null==(i=this._instance)||null==(i=i.persistence)?void 0:i.props[ts])||[];if(nc.SHOWN===e&&t&&r.length>0){ng.info("survey event matched, removing survey from activated surveys",{event:e,eventPayload:t,existingActivatedSurveys:r});var n,a=null==t||null==(n=t.properties)?void 0:n.$survey_id;if(a){var o=r.indexOf(a);o>=0&&(r.splice(o,1),this.dr(r))}}else if(this.nr.has(e)){ng.info("survey event name matched",{event:e,eventPayload:t,surveys:this.nr.get(e)});var l=[];null==(s=this._instance)||s.getSurveys(t=>{l=t.filter(t=>{var i;return null==(i=this.nr.get(e))?void 0:i.includes(t.id)})});var c=l.filter(i=>{var s,r=null==(s=i.conditions)||null==(s=s.events)||null==(s=s.values)?void 0:s.find(t=>t.name===e);return!!r&&(!r.propertyFilters||Object.entries(r.propertyFilters).every(e=>{var i,[s,r]=e,n=null==t||null==(i=t.properties)?void 0:i[s];if(O(n)||L(n))return!1;var a=[String(n)],o=s4[r.operator];return o?o(r.values,a):(ng.warn("Unknown property comparison operator: "+r.operator),!1)}))});this.dr(r.concat(c.map(e=>e.id)||[]))}}onAction(e){var t,i=(null==(t=this._instance)||null==(t=t.persistence)?void 0:t.props[ts])||[];this.ar.has(e)&&this.dr(i.concat(this.ar.get(e)||[]))}dr(e){var t;ng.info("updating activated surveys",{activatedSurveys:e}),null==(t=this._instance)||null==(t=t.persistence)||t.register({[ts]:[...new Set(e)]})}getSurveys(){var e;return(null==(e=this._instance)||null==(e=e.persistence)?void 0:e.props[ts])||[]}getEventToSurveys(){return this.nr}vr(){return this.hr}}class nb{constructor(e){this.cr=void 0,this._surveyManager=null,this.pr=!1,this.gr=!1,this._r=[],this._instance=e,this._surveyEventReceiver=null}onRemoteConfig(e){if(!this._instance.config.disable_surveys){var t=e.surveys;if(D(t))return ng.warn("Flags not loaded yet. Not loading surveys.");var i=$(t);this.cr=i?t.length>0:t,ng.info("flags response received, isSurveysEnabled: "+this.cr),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var i=localStorage.key(t);(null!=i&&i.startsWith(n_)||null!=i&&i.startsWith("inProgressSurvey_"))&&e.push(i)}e.forEach(e=>localStorage.removeItem(e))}loadIfEnabled(){if(!this._surveyManager)if(this.gr)ng.info("Already initializing surveys, skipping...");else if(this._instance.config.disable_surveys)ng.info("Disabled. Not loading surveys.");else if(this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())ng.info("Not loading surveys in cookieless mode without consent.");else{var e=null==_?void 0:_.__PosthogExtensions__;if(e){if(!O(this.cr)||this._instance.config.advanced_enable_surveys){var t=this.cr||this._instance.config.advanced_enable_surveys;this.gr=!0;try{var i=e.generateSurveys;if(i)return void this.mr(i,t);var s=e.loadExternalDependency;if(!s)return void this.yr("PostHog loadExternalDependency extension not found.");s(this._instance,"surveys",i=>{i||!e.generateSurveys?this.yr("Could not load surveys script",i):this.mr(e.generateSurveys,t)})}catch(e){throw this.yr("Error initializing surveys",e),e}finally{this.gr=!1}}}else ng.error("PostHog Extensions not found.")}}mr(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new ny(this._instance),ng.info("Surveys loaded successfully"),this.br({isLoaded:!0})}yr(e,t){ng.error(e,t),this.br({isLoaded:!1,error:e})}onSurveysLoaded(e){return this._r.push(e),this._surveyManager&&this.br({isLoaded:!0}),()=>{this._r=this._r.filter(t=>t!==e)}}getSurveys(e,t){if(void 0===t&&(t=!1),this._instance.config.disable_surveys)return ng.info("Disabled. Not loading surveys."),e([]);var i=this._instance.get_property(ti);if(i&&!t)return e(i,{isLoaded:!0});if(this.pr)return e([],{isLoaded:!1,error:"Surveys are already being loaded"});try{this.pr=!0,this._instance.Oe({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this._instance.config.token),method:"GET",timeout:this._instance.config.surveys_request_timeout_ms,callback:t=>{this.pr=!1;var i=t.statusCode;if(200!==i||!t.json){var s="Surveys API could not be loaded, status: "+i;return ng.error(s),e([],{isLoaded:!1,error:s})}var r,n,a=t.json.surveys||[],o=a.filter(e=>{var t,i;return!(!e.start_date||e.end_date)&&(!(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||!t.length)||!(null==(i=e.conditions)||null==(i=i.actions)||null==(i=i.values)||!i.length))});return o.length>0&&(null==(n=this._surveyEventReceiver)||n.register(o)),null==(r=this._instance.persistence)||r.register({[ti]:a}),e(a,{isLoaded:!0})}})}catch(e){throw this.pr=!1,e}}br(e){for(var t of this._r)try{if(!e.isLoaded)return t([],e);
1this.getSurveys(t)}catch(e){ng.error("Error in survey callback",e)}}getActiveMatchingSurveys(e,t){if(void 0===t&&(t=!1),!D(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);ng.warn("init was not called")}wr(e){var t=null;return this.getSurveys(i=>{var s;t=null!=(s=i.find(t=>t.id===e))?s:null}),t}Sr(e){if(D(this._surveyManager))return{eligible:!1,reason:"SDK is not enabled or survey functionality is not yet loaded"};var t="string"==typeof e?this.wr(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(D(this._surveyManager))return ng.warn("init was not called"),{visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"};var t=this.Sr(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return D(this._surveyManager)?(ng.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"})):new Promise(i=>{this.getSurveys(t=>{var s,r=null!=(s=t.find(t=>t.id===e))?s:null;if(r){var n=this.Sr(r);i({visible:n.eligible,disabledReason:n.reason})}else i({visible:!1,disabledReason:"Survey not found"})},t)})}renderSurvey(e,t){var i;if(D(this._surveyManager))ng.warn("init was not called");else{var s="string"==typeof e?this.wr(e):e;if(null!=s&&s.id)if(nf.includes(s.type)){var r=null==c?void 0:c.querySelector(t);if(r)return null!=(i=s.appearance)&&i.surveyPopupDelaySeconds?(ng.info("Rendering survey "+s.id+" with delay of "+s.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout(()=>{var e,t;ng.info("Rendering survey "+s.id+" with delay of "+(null==(e=s.appearance)?void 0:e.surveyPopupDelaySeconds)+" seconds"),null==(t=this._surveyManager)||t.renderSurvey(s,r),ng.info("Survey "+s.id+" rendered")},1e3*s.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(s,r);ng.warn("Survey element not found")}else ng.warn("Surveys of type "+s.type+" cannot be rendered in the app");else ng.warn("Survey not found")}}displaySurvey(e,t){var i;if(D(this._surveyManager))ng.warn("init was not called");else{var s=this.wr(e);if(s){var r=s;if(null!=(i=s.appearance)&&i.surveyPopupDelaySeconds&&t.ignoreDelay&&(r=y({},s,{appearance:y({},s.appearance,{surveyPopupDelaySeconds:0})})),!1===t.ignoreConditions){var n=this.canRenderSurvey(s);if(!n.visible)return void ng.warn("Survey is not eligible to be displayed: ",n.disabledReason)}t.displayType!==nh.Inline?this._surveyManager.handlePopoverSurvey(r):this.renderSurvey(r,t.selector)}else ng.warn("Survey not found")}}}var nw=eE("[RateLimiter]");class nE{constructor(e){var t,i;this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=e=>{var t=e.text;if(t&&t.length)try{(JSON.parse(t).quota_limited||[]).forEach(e=>{nw.info((e||"events")+" is quota limited."),this.serverLimits[e]=(new Date).getTime()+6e4})}catch(e){return void nw.warn('could not rate limit - continuing. Error: "'+(null==e?void 0:e.message)+'"',{text:t})}},this.instance=e,this.captureEventsPerSecond=(null==(t=e.config.rate_limiting)?void 0:t.events_per_second)||10,this.captureEventsBurstLimit=Math.max((null==(i=e.config.rate_limiting)?void 0:i.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond),this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}clientRateLimitContext(e){void 0===e&&(e=!1);var t,i,s,r=(new Date).getTime(),n=null!=(t=null==(i=this.instance.persistence)?void 0:i.get_property(to))?t:{tokens:this.captureEventsBurstLimit,last:r};n.tokens+=(r-n.last)/1e3*this.captureEventsPerSecond,n.last=r,n.tokens>this.captureEventsBurstLimit&&(n.tokens=this.captureEventsBurstLimit);var a=n.tokens<1;return a||e||(n.tokens=Math.max(0,n.tokens-1)),!a||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=a,null==(s=this.instance.persistence)||s.set_property(to,n),{isRateLimited:a,remainingTokens:n.tokens}}isServerRateLimited(e){var t=this.serverLimits[e||"events"]||!1;return!1!==t&&(new Date).getTime()<t}}var nk=eE("[RemoteConfig]");class nS{constructor(e){this._instance=e}get remoteConfig(){var e;return null==(e=_._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.config}kr(e){var t,i;null!=(t=_.__PosthogExtensions__)&&t.loadExternalDependency?null==(i=_.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"remote-config",()=>e(this.remoteConfig)):(nk.error("PostHog Extensions not found. Cannot load remote config."),e())}$r(e){this._instance.Oe({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 nk.info("Using preloaded remote config",this.remoteConfig),void this.Fe(this.remoteConfig);if(this._instance.L())return void nk.warn("Remote config is disabled. Falling back to local config.");this.kr(e=>{e?this.Fe(e):(nk.info("No config found after loading remote JS config. Falling back to JSON."),this.$r(e=>{this.Fe(e)}))})}catch(e){nk.error("Error loading remote config",e)}}Fe(e){e?this._instance.config.__preview_remote_config?(this._instance.Fe(e),!1!==e.hasFeatureFlags&&this._instance.featureFlags.ensureFlagsLoaded()):nk.info("__preview_remote_config is disabled. Logging config instead",e):nk.error("Failed to fetch remote config from PostHog.")}}class nx{constructor(e,t){this.Er=!0,this.Rr=[],this.Ir=V((null==t?void 0:t.flush_interval_ms)||3e3,250,5e3,ew.createLogger("flush interval"),3e3),this.Pr=e}enqueue(e){this.Rr.push(e),this.Tr||this.Cr()}unload(){this.Mr();var e=Object.values(this.Rr.length>0?this.Or():{});[...e.filter(e=>0===e.url.indexOf("/e")),...e.filter(e=>0!==e.url.indexOf("/e"))].map(e=>{this.Pr(y({},e,{transport:"sendBeacon"}))})}enable(){this.Er=!1,this.Cr()}Cr(){var e=this;this.Er||(this.Tr=setTimeout(()=>{if(this.Mr(),this.Rr.length>0){var t=this.Or();for(var i in t)!function(){var s=t[i],r=(new Date).getTime();s.data&&$(s.data)&&eR(s.data,e=>{e.offset=Math.abs(e.timestamp-r),delete e.timestamp}),e.Pr(s)}()}},this.Ir))}Mr(){clearTimeout(this.Tr),this.Tr=void 0}Or(){var e={};return eR(this.Rr,t=>{var i,s=(t?t.batchKey:null)||t.url;O(e[s])&&(e[s]=y({},t,{data:[]})),null==(i=e[s].data)||i.push(t.data)}),this.Rr=[],e}}var nI=["retriesPerformedSoFar"];class nR{constructor(e){this.Fr=!1,this.Ar=3e3,this.Rr=[],this._instance=e,this.Rr=[],this.Dr=!0,!O(s)&&"onLine"in s.navigator&&(this.Dr=s.navigator.onLine,eL(s,"online",()=>{this.Dr=!0,this.oe()}),eL(s,"offline",()=>{this.Dr=!1}))}get length(){return this.Rr.length}retriableRequest(e){var{retriesPerformedSoFar:t}=e,i=b(e,nI);N(t)&&t>0&&(i.url=s0(i.url,{retry_count:t})),this._instance.Oe(y({},i,{callback:e=>{200!==e.statusCode&&(e.statusCode<400||e.statusCode>=500)&&(null!=t?t:0)<10?this.jr(y({retriesPerformedSoFar:t},i)):null==i.callback||i.callback(e)}}))}jr(e){var t,i,s,r=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=r+1;var n=(s=(Math.random()-.5)*((i=Math.min(18e5,t=3e3*Math.pow(2,r)))-t/2),Math.ceil(i+s)),a=Date.now()+n;this.Rr.push({retryAt:a,requestOptions:e});var o="Enqueued failed request for retry in "+n;
1navigator.onLine||(o+=" (Browser is offline)"),ew.warn(o),this.Fr||(this.Fr=!0,this.Lr())}Lr(){this.Nr&&clearTimeout(this.Nr),this.Nr=setTimeout(()=>{this.Dr&&this.Rr.length>0&&this.oe(),this.Lr()},this.Ar)}oe(){var e=Date.now(),t=[],i=this.Rr.filter(i=>i.retryAt<e||(t.push(i),!1));if(this.Rr=t,i.length>0)for(var{requestOptions:s}of i)this.retriableRequest(s)}unload(){for(var{requestOptions:e}of(this.Nr&&(clearTimeout(this.Nr),this.Nr=void 0),this.Rr))try{this._instance.Oe(y({},e,{transport:"sendBeacon"}))}catch(e){ew.error(e)}this.Rr=[]}}class nF{constructor(e){this.Ur=()=>{this.zr||(this.zr={});var e,t,i,s,r=this.scrollElement(),n=this.scrollY(),a=r?Math.max(0,r.scrollHeight-r.clientHeight):0,o=n+((null==r?void 0:r.clientHeight)||0),l=(null==r?void 0:r.scrollHeight)||0;this.zr.lastScrollY=Math.ceil(n),this.zr.maxScrollY=Math.max(n,null!=(e=this.zr.maxScrollY)?e:0),this.zr.maxScrollHeight=Math.max(a,null!=(t=this.zr.maxScrollHeight)?t:0),this.zr.lastContentY=o,this.zr.maxContentY=Math.max(o,null!=(i=this.zr.maxContentY)?i:0),this.zr.maxContentHeight=Math.max(l,null!=(s=this.zr.maxContentHeight)?s:0)},this._instance=e}getContext(){return this.zr}resetContext(){var e=this.zr;return setTimeout(this.Ur,0),e}startMeasuringScrollPosition(){eL(s,"scroll",this.Ur,{capture:!0}),eL(s,"scrollend",this.Ur,{capture:!0}),eL(s,"resize",this.Ur)}scrollElement(){if(!this._instance.config.scroll_root_selector)return null==s?void 0:s.document.documentElement;for(var e of $(this._instance.config.scroll_root_selector)?this._instance.config.scroll_root_selector:[this._instance.config.scroll_root_selector]){var t=null==s?void 0:s.document.querySelector(e);if(t)return t}}scrollY(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollTop||0}return s&&(s.scrollY||s.pageYOffset||s.document.documentElement.scrollTop)||0}scrollX(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollLeft||0}return s&&(s.scrollX||s.pageXOffset||s.document.documentElement.scrollLeft)||0}}var n$=e=>r5(null==e?void 0:e.config.mask_personal_data_properties,null==e?void 0:e.config.custom_personal_data_properties);class nP{constructor(e,t,i,s){this.Br=e=>{var t=this.qr();if(!t||t.sessionId!==e){var i={sessionId:e,props:this.Hr(this._instance)};this.Wr.register({[ta]:i})}},this._instance=e,this.Gr=t,this.Wr=i,this.Hr=s||n$,this.Gr.onSessionId(this.Br)}qr(){return this.Wr.props[ta]}getSetOnceProps(){var e,t=null==(e=this.qr())?void 0:e.props;return t?"r"in t?r6(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 eR(eO(this.getSetOnceProps()),(t,i)=>{"$current_url"===i&&(i="url"),e["$session_entry_"+S(i)]=t}),e}}var nC=eE("[SessionId]");class nT{on(e,t){return this.Vr.on(e,t)}constructor(e,t,i){if(this.Jr=[],this.Vr=new nd,this.Kr=(e,t)=>
1Math.abs(e-t)>this.sessionTimeoutMs,!e.persistence)throw Error("SessionIdManager requires a PostHogPersistence instance");if("always"===e.config.cookieless_mode)throw Error('SessionIdManager cannot be used with cookieless_mode="always"');this.A=e.config,this.Wr=e.persistence,this.pi=void 0,this.Ft=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.Yr=t||t7,this.Xr=i||t7;var s,r=this.A.persistence_name||this.A.token,n=this.A.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*V(n,60,36e3,nC.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.Qr(),this.Zr="ph_"+r+"_window_id",this.ts="ph_"+r+"_primary_window_exists",this.es()){var a=ih.K(this.Zr),o=ih.K(this.ts);a&&!o?this.pi=a:ih.X(this.Zr),ih.Y(this.ts,!0)}if(null!=(s=this.A.bootstrap)&&s.sessionID)try{var l=(e=>{var t=e.replace(/-/g,"");if(32!==t.length)throw Error("Not a valid UUID");if("7"!==t[12])throw Error("Not a UUIDv7");return parseInt(t.substring(0,12),16)})(this.A.bootstrap.sessionID);this.rs(this.A.bootstrap.sessionID,(new Date).getTime(),l)}catch(e){nC.error("Invalid sessionID in bootstrap",e)}this.ss()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return O(this.Jr)&&(this.Jr=[]),this.Jr.push(e),this.Ft&&e(this.Ft,this.pi),()=>{this.Jr=this.Jr.filter(t=>t!==e)}}es(){return"memory"!==this.A.persistence&&!this.Wr.Ue&&ih.G()}ns(e){e!==this.pi&&(this.pi=e,this.es()&&ih.Y(this.Zr,e))}os(){return this.pi?this.pi:this.es()?ih.K(this.Zr):null}rs(e,t,i){e===this.Ft&&t===this._sessionActivityTimestamp&&i===this._sessionStartTimestamp||(this._sessionStartTimestamp=i,this._sessionActivityTimestamp=t,this.Ft=e,this.Wr.register({[e3]:[t,e,i]}))}ls(){if(this.Ft&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this.Ft,this._sessionStartTimestamp];var e=this.Wr.props[e3];return $(e)&&2===e.length&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.rs(null,null,null)}ss(){eL(s,"beforeunload",()=>{this.es()&&ih.X(this.ts)},{capture:!1})}checkAndGetSessionAndWindowId(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=null),"always"===this.A.cookieless_mode)throw Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var i=t||(new Date).getTime(),[s,r,n]=this.ls(),a=this.os(),o=N(n)&&n>0&&Math.abs(i-n)>864e5,l=!1,c=!r,u=!e&&this.Kr(i,s);c||u||o?(r=this.Yr(),a=this.Xr(),nC.info("new session ID generated",{sessionId:r,windowId:a,changeReason:{noSessionId:c,activityTimeout:u,sessionPastMaximumLength:o}}),n=i,l=!0):a||(a=this.Xr(),l=!0);var h=0===s||!e||o?i:s,d=0===n?(new Date).getTime():n;return this.ns(a),this.rs(r,h,d),e||this.Qr(),l&&this.Jr.forEach(e=>e(r,a,l?{noSessionId:c,activityTimeout:u,sessionPastMaximumLength:o}:void 0)),{sessionId:r,windowId:a,sessionStartTimestamp:d,changeReason:l?{noSessionId:c,activityTimeout:u,sessionPastMaximumLength:o}:void 0,lastActivityTimestamp:s}}Qr(){clearTimeout(this.us),this.us=setTimeout(()=>{var[e]=this.ls();if(this.Kr((new Date).getTime(),e)){var t=this.Ft;this.resetSessionId(),this.Vr.emit("forcedIdleReset",{idleSessionId:t})}},1.1*this.sessionTimeoutMs)}}var nO=["$set_once","$set"],nA=eE("[SiteApps]");class nM{constructor(e){this._instance=e,this.hs=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}ds(e,t){if(t){var i=this.globalsForEvent(t);this.hs.push(i),this.hs.length>1e3&&(this.hs=this.hs.slice(10))}}get siteAppLoaders(){var e;return null==(e=_._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.siteApps}init(){if(this.isEnabled){var e=this._instance.Ze(this.ds.bind(this));this.vs=()=>{e(),this.hs=[],this.vs=void 0}}}globalsForEvent(e){if(!e)throw Error("Event payload is required");var t,i,s,r,n,a,o,l={},c=this._instance.get_property("$groups")||[];for(var[u,h]of Object.entries(this._instance.get_property("$stored_group_properties")||{}))l[u]={id:c[u],type:u,properties:h};var{$set_once:d,$set:p}=e;return{event:y({},b(e,nO),{properties:y({},e.properties,p?{$set:y({},null!=(t=null==(i=e.properties)?void 0:i.$set)?t:{},p)}:{},d?{$set_once:y({},null!=(s=null==(r=e.properties)?void 0:r.$set_once)?s:{},d)}:{}),elements_chain:null!=(n=null==(a=e.properties)?void 0:a.$elements_chain)?n:"",distinct_id:null==(o=e.properties)?void 0:o.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:l}}setupSiteApp(e){var t=this.apps[e.id],i=()=>{var i;!t.errored&&this.hs.length&&(nA.info("Processing "+this.hs.length+" events for site app with id "+e.id),this.hs.forEach(e
vendor: 4,484 bytes, line 1
1=>null==t.processEvent?void 0:t.processEvent(e)),t.processedBuffer=!0),Object.values(this.apps).every(e=>e.processedBuffer||e.errored)&&(null==(i=this.vs)||i.call(this))},s=!1,r=r=>{t.errored=!r,t.loaded=!0,nA.info("Site app with id "+e.id+" "+(r?"loaded":"errored")),s&&i()};try{var{processEvent:n}=e.init({posthog:this._instance,callback:e=>{r(e)}});n&&(t.processEvent=n),s=!0}catch(t){nA.error("Error while initializing PostHog app with config id "+e.id,t),r(!1)}if(s&&t.loaded)try{i()}catch(i){nA.error("Error while processing buffered events PostHog app with config id "+e.id,i),t.errored=!0}}cs(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var i of e)this.setupSiteApp(i)}fs(e){if(0!==Object.keys(this.apps).length){var t=this.globalsForEvent(e);for(var i of Object.values(this.apps))try{null==i.processEvent||i.processEvent(t)}catch(t){nA.error("Error while processing event "+e.event+" for site app "+i.id,t)}}}onRemoteConfig(e){var t,i,s,r=this;if(null!=(t=this.siteAppLoaders)&&t.length)return this.isEnabled?(this.cs(),void this._instance.on("eventCaptured",e=>this.fs(e))):void nA.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if(null==(i=this.vs)||i.call(this),null!=(s=e.siteApps)&&s.length)if(this.isEnabled){var n=function(e){var t;_["__$$ph_site_app_"+e]=r._instance,null==(t=_.__PosthogExtensions__)||null==t.loadSiteApp||t.loadSiteApp(r._instance,o,t=>{if(t)return nA.error("Error while initializing PostHog app with config id "+e,t)})};for(var{id:a,url:o}of e.siteApps)n(a)}else nA.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}var nL=["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","hubspot","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"],nD=function(e,t){if(!e)return!1;var i=e.toLowerCase();return nL.concat(t||[]).some(e=>{var t=e.toLowerCase();return -1!==i.indexOf(t)})},nN=function(e,t){if(!e)return!1;var i=e.userAgent;if(i&&nD(i,t))return!0;try{var s=null==e?void 0:e.userAgentData;if(null!=s&&s.brands&&s.brands.some(e=>nD(null==e?void 0:e.brand,t)))return!0}catch(e){}return!!e.webdriver},nH=((al={}).US="us",al.EU="eu",al.CUSTOM="custom",al),nj="i.posthog.com";class nq{constructor(e){this.ps={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return"https://app.posthog.com"===e?"https://us.i.posthog.com":e}get uiHost(){var e,t=null==(e=this.instance.config.ui_host)?void 0:e.replace(/\/$/,"");return t||(t=this.apiHost.replace("."+nj,".posthog.com")),"https://app.posthog.com"===t?"https://us.posthog.com":t}get region(){return this.ps[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.ps[this.apiHost]=nH.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.ps[this.apiHost]=nH.EU:this.ps[this.apiHost]=nH.CUSTOM),this.ps[this.apiHost]}endpointFor(e,t){if(void 0===t&&(t=""),t&&(t="/"===t[0]?t:"/"+t),"ui"===e)return this.uiHost+t;if(this.region===nH.CUSTOM)return this.apiHost+t;var i=nj+t;switch(e){case"assets":return"https://"+this.region+"-assets."+i;case"api":return"https://"+this.region+"."+i}}}var nB={icontains:(e,t)=>!!s&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!s&&-1===t.href.toLowerCase().indexOf(e.toLowerCase()),regex:(e,t)=>!!s&&s5(t.href,e),not_regex:(e,t)=>!!s&&!s5(t.href,e),exact:(e,t)=>
1t.href===e,is_not:(e,t)=>t.href!==e};class nU{constructor(e){var t=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getWebExperiments(e=>{nU.gs("retrieved web experiments from the server"),t._s=new Map,e.forEach(e=>{if(e.feature_flag_key){t._s&&(nU.gs("setting flag key ",e.feature_flag_key," to web experiment ",e),null==(i=t._s)||i.set(e.feature_flag_key,e));var i,s=t._instance.getFeatureFlag(e.feature_flag_key);A(s)&&e.variants[s]&&t.ys(e.name,s,e.variants[s].transforms)}else if(e.variants)for(var r in e.variants){var n=e.variants[r];nU.bs(n)&&t.ys(e.name,r,n.transforms)}})},e)},this._instance=e,this._instance.onFeatureFlags(e=>{this.onFeatureFlags(e)})}onFeatureFlags(e){if(this._is_bot())nU.gs("Refusing to render web experiment since the viewer is a likely bot");else if(!this._instance.config.disable_web_experiments){if(D(this._s))return this._s=new Map,this.loadIfEnabled(),void this.previewWebExperiment();nU.gs("applying feature flags",e),e.forEach(e=>{var t;if(this._s&&null!=(t=this._s)&&t.has(e)){var i,s=this._instance.getFeatureFlag(e),r=null==(i=this._s)?void 0:i.get(e);s&&null!=r&&r.variants[s]&&this.ys(r.name,s,r.variants[s].transforms)}})}}previewWebExperiment(){var e=nU.getWindowLocation();if(null!=e&&e.search){var t=tJ(null==e?void 0:e.search,"__experiment_id"),i=tJ(null==e?void 0:e.search,"__experiment_variant");t&&i&&(nU.gs("previewing web experiments "+t+" && "+i),this.getWebExperiments(e=>{this.ws(parseInt(t),i,e)},!1,!0))}}loadIfEnabled(){this._instance.config.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,t,i){if(this._instance.config.disable_web_experiments&&!i)return e([]);var s=this._instance.get_property("$web_experiments");if(s&&!t)return e(s);this._instance.Oe({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this._instance.config.token),method:"GET",callback:t=>200===t.statusCode&&t.json?e(t.json.experiments||[]):e([])})}ws(e,t,i){var s=i.filter(t=>t.id===e);s&&s.length>0&&(nU.gs("Previewing web experiment ["+s[0].name+"] with variant ["+t+"]"),this.ys(s[0].name,t,s[0].variants[t].transforms))}static bs(e){return!D(e.conditions)&&nU.Ss(e)&&nU.ks(e)}static Ss(e){if(D(e.conditions)||D(null==(t=e.conditions)?void 0:t.url))return!0;var t,i,s,r,n=nU.getWindowLocation();return!!n&&(null==(i=e.conditions)||!i.url||nB[null!=(s=null==(r=e.conditions)?void 0:r.urlMatchType)?s:"icontains"](e.conditions.url,n))}
1static getWindowLocation(){return null==s?void 0:s.location}static ks(e){if(D(e.conditions)||D(null==(i=e.conditions)?void 0:i.utm))return!0;var t=rQ();if(t.utm_source){var i,s,r,n,a,o,l,c,u,h=null==(s=e.conditions)||null==(s=s.utm)||!s.utm_campaign||(null==(r=e.conditions)||null==(r=r.utm)?void 0:r.utm_campaign)==t.utm_campaign,d=null==(n=e.conditions)||null==(n=n.utm)||!n.utm_source||(null==(a=e.conditions)||null==(a=a.utm)?void 0:a.utm_source)==t.utm_source,p=null==(o=e.conditions)||null==(o=o.utm)||!o.utm_medium||(null==(l=e.conditions)||null==(l=l.utm)?void 0:l.utm_medium)==t.utm_medium,g=null==(c=e.conditions)||null==(c=c.utm)||!c.utm_term||(null==(u=e.conditions)||null==(u=u.utm)?void 0:u.utm_term)==t.utm_term;return h&&p&&g&&d}return!1}static gs(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];ew.info("[WebExperiments] "+e,i)}ys(e,t,i){this._is_bot()?nU.gs("Refusing to render web experiment since the viewer is a likely bot"):"control"!==t?i.forEach(i=>{if(i.selector){nU.gs("applying transform of variant "+t+" for experiment "+e+" ",i);var s,r=null==(s=document)?void 0:s.querySelectorAll(i.selector);null==r||r.forEach(e=>{i.html&&(e.innerHTML=i.html),i.css&&e.setAttribute("style",i.css)})}}):nU.gs("Control variants leave the page unmodified.")}_is_bot(){return l&&this._instance?nN(l,this._instance.config.custom_blocked_useragents):void 0}}var nz=eE("[PostHog ExternalIntegrations]"),nG={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class nV{constructor(e){this._instance=e}nt(e,t){var i;null==(i=_.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,e,e=>{if(e)return nz.error("failed to load script",e);t()})}startIfEnabledOrStop(){var e,t=this,i=function(e){var i,s,n;!r||null!=(i=_.__PosthogExtensions__)&&null!=(i=i.integrations)&&i[e]||t.nt(nG[e],()=>{var i;null==(i=_.__PosthogExtensions__)||null==(i=i.integrations)||null==(i=i[e])||i.start(t._instance)}),!r&&null!=(s=_.__PosthogExtensions__)&&null!=(s=s.integrations)&&s[e]&&(null==(n=_.__PosthogExtensions__)||null==(n=n.integrations)||null==(n=n[e])||n.stop())};for(var[s,r]of Object.entries(null!=(e=this._instance.config.integrations)?e:{}))i(s)}}var nW="[SessionRecording]",nY=eE(nW);class nJ{get started(){var e;return!(null==(e=this.$s)||!e.isStarted)}get status(){var e;return this.Kt&&!this.Bt?so:(null==(e=this.$s)?void 0:e.status)||"lazy_loading"}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.Kt=!1,this.ni=void 0,this._instance=e,!this._instance.sessionManager)throw nY.error("started without valid sessionManager"),Error(nW+" started without valid sessionManager. This is a bug.");if("always"===this._instance.config.cookieless_mode)throw Error(nW+' cannot be used with cookieless_mode="always"')}get Bt(){var e,t=!(null==(e=this._instance.get_property(eY))||!e.enabled),i=!this._instance.config.disable_session_recording,r=this._instance.config.disable_session_recording||this._instance.consent.isOptedOut();return s&&t&&i&&!r}startIfEnabledOrStop(e){var t;if(!this.Bt||null==(t=this.$s)||!t.isStarted){var i=!O(Object.assign)&&!O(Array.from);this.Bt&&i?(this.xs(e),nY.info("starting")):this.stopRecording()}}xs(e){var t,i,s;this.Bt&&(null!=_&&null!=(t=_.__PosthogExtensions__)&&null!=(t=t.rrweb)&&t.record&&null!=(i=_.__PosthogExtensions__)&&i.initSessionRecording?this.Ri(e):null==(s=_.__PosthogExtensions__)||null==s.loadExternalDependency||s.loadExternalDependency(this._instance,this.Ii,t=>{if(t)return nY.error("could not load recorder",t);this.Ri(e)}))}stopRecording(){var e;null==(e=this.$s)||e.stop()}ki(){var e;null==(e=this._instance.persistence)||e.unregister(e5)}Ei(e){if(this._instance.persistence){var t,i,s=this._instance.persistence,r=()=>{var t=!1===e.sessionRecording?void 0:e.sessionRecording,i=null==t?void 0:t.sampleRate,r=D(i)?null:parseFloat(i);D(r)&&this.ki();var n=null==t?void 0:t.minimumDurationMilliseconds;s.register({[eY]:y({enabled:!!t},t,{networkPayloadCapture:y({capturePerformance:e.capturePerformance},null==t?void 0:t.networkPayloadCapture),canvasRecording:{enabled:null==t?void 0:t.recordCanvas,fps:null==t?void 0:t.canvasFps,quality:null==t?void 0:t.canvasQuality},sampleRate:r,minimumDurationMilliseconds:O(n)?null:n,endpoint:null==t?void 0:t.endpoint,triggerMatchType:null==t?void 0:t.triggerMatchType,masking:null==t?void 0:t.masking,urlTriggers:null==t?void 0:t.urlTriggers})})};r(),null==(t=this.ni)||t.call(this),this.ni=null==(i=this._instance.sessionManager)?void 0:i.onSessionId(r)}}onRemoteConfig(e){"sessionRecording"in e?!1!==e.sessionRecording?(this.Ei(e),this.Kt=!0,this.startIfEnabledOrStop()):this.Kt=!0:nY.info("skipping remote config with no sessionRecording",e)}log(e,t){var i;void 0===t&&(t="log"),null!=(i=this.$s)&&i.log?this.$s.log(e,t):nY.warn("log called before recorder was ready")}get Ii(){var e,t,i=null==(e=this._instance)||null==(e=e.persistence)?void 0:e.get_property(eY);return(null==i||null==(t=i.scriptConfig)?void 0:t.script)||"lazy-recorder"}Ri(e){var t,i;if(null==(t=_.__PosthogExtensions__)||!t.initSessionRecording)throw Error("Called on script loaded before session recording is available");this.$s||(this.$s=null==(i=_.__PosthogExtensions__)?void 0:i.initSessionRecording(this._instance),this.$s._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),this.$s.start(e)}onRRwebEmit(e){var t;null==(t=this.$s)||null==t.onRRwebEmit||t.onRRwebEmit(e)}overrideLinkedFlag(){var e;null==(e=this.$s)||e.overrideLinkedFlag()}overrideSampling(){var e;null==(e=this.$s)||e.overrideSampling()}overrideTrigger(e){var t;null==(t=this.$s)||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return(null==(e=this.$s)?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var i;return!(null==(i=this.$s)||!i.tryAddCustomEvent(e,t))}}var nX={},nK=()=>{},nZ="posthog",nQ=!sZ&&-1===(null==g?void 0:g.indexOf("MSIE"))&&-1===(null==g?void 0:g.indexOf("Mozilla")),n0=e=>{var t;return{api_host:"https://us.i.posthog.com",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:function(e){var t=null==e?void 0:e.hostname;if(!A(t))return!1;var i=t.split(".").slice(-2).join(".");for(var s of eA)if(i===s)return!1;return!0}(null==c?void 0:c.location),persistence:"localStorage+cookie",persistence_name:"",loaded:nK,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageview:"2025-05-24"!==e||"history_change",capture_pageleave:"if_capture_pageview",defaults:null!=e?e:"unset",debug:u&&A(null==u?void 0:u.search)&&-1!==u.search.indexOf("__posthog_debug=true")||!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:"https:"===(null==s||null==(t=s.location)?void 0:t.protocol),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:e=>{var t="Bad HTTP status: "+e.statusCode+" "+e.text;ew.error(t)},get_device_id:e=>e,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:3e3},error_tracking:{},_onCapture:nK,__preview_eager_load_replay:!1}},n1=e=>{var t={};O(e.process_person)||(t.person_profiles=e.process_person),O(e.xhr_headers)||(t.request_headers=e.x
1hr_headers),O(e.cookie_name)||(t.persistence_name=e.cookie_name),O(e.disable_cookie)||(t.disable_persistence=e.disable_cookie),O(e.store_google)||(t.save_campaign_params=e.store_google),O(e.verbose)||(t.debug=e.verbose);var i=eF({},t,e);return $(e.property_blacklist)&&(O(e.property_denylist)?i.property_denylist=e.property_blacklist:$(e.property_denylist)?i.property_denylist=[...e.property_blacklist,...e.property_denylist]:ew.error("Invalid value for property_denylist config: "+e.property_denylist)),i};class n2{constructor(){this.__forceAllowLocalhost=!1}get Es(){return this.__forceAllowLocalhost}set Es(e){ew.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class n3{get decideEndpointWasHit(){var e,t;return null!=(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&e}get flagsEndpointWasHit(){var e,t;return null!=(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&e}constructor(){this.webPerformance=new n2,this.Rs=!1,this.version=v.LIB_VERSION,this.Is=new nd,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=n0(),this.SentryIntegration=sD,this.sentryIntegration=e=>{var t;return t=sL(this,e),{name:sM,processEvent:e=>t(e)}},this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Ps=!1,this.Ts=null,this.Cs=null,this.Ms=null,this.featureFlags=new nn(this),this.toolbar=new sB(this),this.scrollManager=new nF(this),this.pageViewManager=new sX(this),this.surveys=new nb(this),this.experiments=new nU(this),this.exceptions=new s9(this),this.rateLimiter=new nE(this),this.requestRouter=new nq(this),this.consent=new ip(this),this.externalIntegrations=new nV(this),this.people={set:(e,t,i)=>{var s=A(e)?{[e]:t}:e;this.setPersonProperties(s),null==i||i({})},set_once:(e,t,i)=>{var s=A(e)?{[e]:t}:e;this.setPersonProperties(void 0,s),null==i||i({})}},this.on("eventCaptured",e=>ew.info('send "'+(null==e?void 0:e.event)+'"',e))}init(e,t,i){if(i&&i!==nZ){var s,r=null!=(s=nX[i])?s:new n3;return r._init(e,t,i),nX[i]=r,nX[nZ][i]=r,r}return this._init(e,t,i)}_init(e,t,i){if(void 0===t&&(t={}),O(e)||M(e))return ew.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 ew.warn("You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},this.Os=t,this.Fs=[],t.person_profiles&&(this.Cs=t.person_profiles),this.set_config(eF({},n0(t.defaults),n1(t),{name:i,token:e})),this.config.on_xhr_error&&ew.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=t.disable_compression?void 0:tG.GZipJS;var r=this.As();this.persistence=new no(this.config,r),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new no(y({},this.config,{persistence:"sessionStorage"}),r);var n=y({},this.persistence.props),a=y({},this.sessionPersistence.props);this.register({$initialization_time:(new Date).toISOString()}),this.Ds=new nx(e=>this.js(e),this.config.request_queue_config),this.Ls=new nR(this),this.__request_queue=[];var o="always"===this.config.cookieless_mode||"on_reject"===this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut();if(o||(this.sessionManager=new nT(this),this.sessionPropsManager=new nP(this,this.sessionManager,this.persistence)),new sz(this).startIfEnabledOrStop(),this.siteApps=new nM(this),null==(l=this.siteApps)||l.init(),o||(this.config.__preview_eager_load_replay?this.sessionRecording=new sO(this):this.sessionRecording=new nJ(this),this.sessionRecording.startIfEnabledOrStop()),this.config.disable_scroll_properties||this.scrollManager.startMeasuringScrollPosition(),this.autocapture=new t0(this),this.autocapture.startIfEnabled(),this.surveys.loadIfEnabled(),this.heatmaps=new sJ(this),this.heatmaps.startIfEnabled(),this.webVitalsAutocapture=new sV(this),this.exceptionObserver=new ib(this),this.exceptionObserver.startIfEnabled(),this.deadClicksAutocapture=new im(this,iv),this.deadClicksAutocapture.startIfEnabled(),this.historyAutocapture=new iE(this),this.historyAutocapture.startIfEnabled(),v.DEBUG=v.DEBUG||this.config.debug,v.DEBUG&&ew.info("Starting in debug mode",{this:this,config:t,thisC:y({},this.config),p:n,s:a}
vendor: 5,057 bytes, line 1
1),void 0!==(null==(c=t.bootstrap)?void 0:c.distinctID)){var l,c,u,h,d=this.config.get_device_id(t7()),p=null!=(u=t.bootstrap)&&u.isIdentifiedID?d:t.bootstrap.distinctID;this.persistence.set_property(tn,null!=(h=t.bootstrap)&&h.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:t.bootstrap.distinctID,$device_id:p})}if(this.Ns()){var g,_,f=Object.keys((null==(g=t.bootstrap)?void 0:g.featureFlags)||{}).filter(e=>{var i;return!(null==(i=t.bootstrap)||null==(i=i.featureFlags)||!i[e])}).reduce((e,i)=>{var s;return e[i]=(null==(s=t.bootstrap)||null==(s=s.featureFlags)?void 0:s[i])||!1,e},{}),m=Object.keys((null==(_=t.bootstrap)?void 0:_.featureFlagPayloads)||{}).filter(e=>f[e]).reduce((e,i)=>{var s,r;return null!=(s=t.bootstrap)&&null!=(s=s.featureFlagPayloads)&&s[i]&&(e[i]=null==(r=t.bootstrap)||null==(r=r.featureFlagPayloads)?void 0:r[i]),e},{});this.featureFlags.receivedFeatureFlags({featureFlags:f,featureFlagPayloads:m})}if(o)this.register_once({distinct_id:tp,$device_id:null},"");else if(!this.get_distinct_id()){var b=this.config.get_device_id(t7());this.register_once({distinct_id:b,$device_id:b},""),this.persistence.set_property(tn,"anonymous")}return eL(s,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),this.toolbar.maybeLoadToolbar(),t.segment?function(e,t){var i=e.config.segment;if(!i)return t();!function(e,t){var i=e.config.segment;if(!i)return t();var s=i=>{var s=()=>i.anonymousId()||t7();e.config.get_device_id=s,i.id()&&(e.register({distinct_id:i.id(),$device_id:s()}),e.persistence.set_property(tn,"identified")),t()},r=i.user();"then"in r&&P(r.then)?r.then(e=>s(e)):s(r)}(e,()=>{var s;i.register((Promise&&Promise.resolve||sA.warn("This browser does not have Promise support, and can not use the segment integration"),s=(t,i)=>{if(!i)return t;t.event.userId||t.event.anonymousId===e.get_distinct_id()||(sA.info("No userId set, resetting PostHog"),e.reset()),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(sA.info("UserId set, identifying with PostHog"),e.identify(t.event.userId));var s=e.calculateEventProperties(i,t.event.properties);return t.event.properties=Object.assign({},s,t.event.properties),t},{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:e=>s(e,e.event.event),page:e=>s(e,"$pageview"),identify:e=>s(e,"$identify"),screen:e=>s(e,"$screen")})).then(()=>{t()})})}(this,()=>this.Us()):this.Us(),P(this.config._onCapture)&&this.config._onCapture!==nK&&(ew.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",e=>this.config._onCapture(e.event,e))),this.config.ip&&ew.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}Fe(e){var t,i,s,r,n,a,o,l;c&&c.body?(this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=E(e.supportedCompression,tG.GZipJS)?tG.GZipJS:E(e.supportedCompression,tG.Base64)?tG.Base64:void 0),null!=(t=e.analytics)&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.Cs?this.Cs:"identified_only"}),null==(i=this.siteApps)||i.onRemoteConfig(e),null==(s=this.sessionRecording)||s.onRemoteConfig(e),null==(r=this.autocapture)||r.onRemoteConfig(e),null==(n=this.heatmaps)||n.onRemoteConfig(e),this.surveys.onRemoteConfig(e),null==(a=this.webVitalsAutocapture)||a.onRemoteConfig(e),null==(o=this.exceptionObserver)||o.onRemoteConfig(e),this.exceptions.onRemoteConfig(e),null==(l=this.deadClicksAutocapture)||l.onRemoteConfig(e)):(ew.info("document not ready yet, trying again in 500 milliseconds..."),setTimeout(()=>{this.Fe(e)},500))}Us(){try{this.config.loaded(this)}catch(e){ew.critical("`loaded` function failed",e)}this.zs(),this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||"always"===this.config.cookieless_mode)&&this.Bs()},1),new nS(this).load(),this.featureFlags.flags()}zs(){var e;this.is_capturing()&&this.config.request_batching&&(null==(e=this.Ds)||e.enable())}_dom_loaded(){this.is_capturing()&&eI(this.__request_queue,e=>this.js(e)),this.__request_queue=[],this.zs()}_handle_unload(){var e,t;this.config.request_batching?(this.qs()&&this.capture("$pageleave"),null==(e=this.Ds)||e.unload(),null==(t=this.Ls)||t.unload()):this.qs()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}Oe(e){this.__loaded&&(nQ?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=s0(e.url,{ip:+!!this.config.ip}),e.headers=y({},this.config.request_headers),e.compression="best-available"===e.compression?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,
1(e=>{var t,i,s,r=y({},e);r.timeout=r.timeout||6e4,r.url=s0(r.url,{_:(new Date).getTime().toString(),ver:v.LIB_VERSION,compression:r.compression});var n=null!=(t=r.transport)?t:"fetch",a=s3.filter(e=>!r.disableTransport||!e.transport||!r.disableTransport.includes(e.transport)),o=null!=(i=null==(s=eM(a,e=>e.transport===n))?void 0:s.method)?i:a[0].method;if(!o)throw Error("No available transport method");o(r)})(y({},e,{callback:t=>{var i,s;this.rateLimiter.checkForLimiting(t),t.statusCode>=400&&(null==(i=(s=this.config).on_request_error)||i.call(s,t)),null==e.callback||e.callback(t)}}))))}js(e){this.Ls?this.Ls.retriableRequest(e):this.Oe(e)}_execute_array(e){var t,i=[],s=[],r=[];eI(e,e=>{e&&($(t=e[0])?r.push(e):P(e)?e.call(this):$(e)&&"alias"===t?i.push(e):$(e)&&-1!==t.indexOf("capture")&&P(this[t])?r.push(e):s.push(e))});var n=function(e,t){eI(e,function(e){if($(e[0])){var i=t;eR(e,function(e){i=i[e[0]].apply(i,e.slice(1))})}else this[e[0]].apply(this,e.slice(1))},t)};n(i,this),n(s,this),n(r,this)}Ns(){var e,t;return(null==(e=this.config.bootstrap)?void 0:e.featureFlags)&&Object.keys(null==(t=this.config.bootstrap)?void 0:t.featureFlags).length>0||!1}push(e){this._execute_array([e])}capture(e,t,i){var s;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Ds){if(this.is_capturing())if(!O(e)&&A(e)){if(this.config.opt_out_useragent_filter||!this._is_bot()){var r=null!=i&&i.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(null==r||!r.isRateLimited){null!=t&&t.$current_url&&!A(null==t?void 0:t.$current_url)&&(ew.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),null==t||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 n=new Date,a=(null==i?void 0:i.timestamp)||n,o=t7(),l={uuid:o,event:e,properties:this.calculateEventProperties(e,t||{},a,o)};r&&(l.properties.$lib_rate_limit_remaining_tokens=r.remainingTokens),(null==i?void 0:i.$set)&&(l.$set=null==i?void 0:i.$set);var c,u=this.Hs(null==i?void 0:i.$set_once);if(u&&(l.$set_once=u),(h=l,d=null!=i&&i._noTruncate?null:this.config.properties_string_max_length,p=e=>A(e)&&!L(d)?e.slice(0,d):e,g=new Set,l=function e(t,i){var s;return t!==Object(t)?p?p(t,i):t:g.has(t)?void 0:(g.add(t),$(t)?(s=[],eI(t,t=>{s.push(e(t))})):(s={},eR(t,(t,i)=>{g.has(t)||(s[i]=e(t,i))})),s)}(h)).timestamp=a,O(null==i?void 0:i.timestamp)||(l.properties.$event_time_override_provided=!0,l.properties.$event_time_override_system_time=n),e===nc.DISMISSED||e===nc.SENT){var h,d,p,g,_,v,f,m=null==t?void 0:t[nu.SURVEY_ID],b=null==t?void 0:t[nu.SURVEY_ITERATION];c={id:m,current_iteration:b},localStorage.getItem(nv(c))||localStorage.setItem(nv(c),"true"),l.$set=y({},l.$set,{[(_={id:m,current_iteration:b},f="$survey_"+(v=e===nc.SENT?"responded":"dismissed")+"/"+_.id,_.current_iteration&&_.current_iteration>0&&(f="$survey_"+v+"/"+_.id+"/"+_.current_iteration),f)]:!0})}var w=y({},l.properties.$set,l.$set);if(T(w)||this.setPersonPropertiesForFlags(w),!D(this.config.before_send)){var E=this.Ws(l);if(!E)return;l=E}this.Is.emit("eventCaptured",l);var k={method:"POST",url:null!=(s=null==i?void 0:i._url)?s:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:l,compression:"best-available",batchKey:null==i?void 0:i._batchKey};return!this.config.request_batching||i&&(null==i||!i._batchKey)||null!=i&&i.send_instantly?this.js(k):this.Ds.enqueue(k),l}ew.critical("This capture call is ignored due to client rate limiting.")}}else ew.error("No event name provided to posthog.capture")}else ew.uninitializedWarning("posthog.capture")}Ze(e){return this.on("eventCaptured",t=>e(t.event,t))}calculateEventProperties(e,t,i,r,n){if(i=i||new Date,!this.persistence||!this.sessionPersistence)return t;var a,o=n?void 0:this.persistence.remove_event_timer(e),l=y({},t);if(l.token=this.config.token,l.$config_defaults=this.config.defaults,("always"==this.config.cookieless_mode||"on_reject"==this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut())&&(l.$cookieless_mode=!0),"$snapshot"===e){var h=y({},this.persistence.properties(),this.sessionPersistence.properties());return l.distinct_id=h.distinct_id,(!A(l.distinct_id)&&!N(l.distinct_id)||M(l.distinct_id))&&ew.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),l}var d,p=function(e,t){if(!g)return{};var i,r,n=e?e$([],rJ,t||[]):[],[a,o]=function(e){for(var t=0;t<rV.length;t++){var[i,s]=rV[t],r=i.exec(e),n=r&&(P(s)?s(r,e):s);if(n)return n}return["",""]}(g);return eF(eO({$os:a,$os_version:o,$browser:rU(g,navigator.vendor),$device:rW(g),$device_type:(r=rW(g))===rr||r===rs||"Kobo"===r||"Kindle Fire"===r||r===rA?ri:r===rk||r===rx||r===rS||r===rC?"Console":r===ra?"Wearable":r?re:"Desktop",$timezone:r4(),$timezone_offset:function(){try{return(new Date).getTimezoneOffset()}catch(e){return}}()}),{$current_url:tX(null==u?void 0:u.href,n,rK),$host:null==u?void 0:u.host,$pathname:null==u?void 0:u.pathname,$raw_user_agent:g.length>1e3?g.substring(0,997)+"...":g,$browser_version:rG(g,navigator.vendor),$browser_language:r2(),$browser_language_prefix:"string"==typeof(i=r2())?i.split("-")[0]:void 0,$screen_height:null==s?void 0:s.screen.height,$screen_width:null==s?void 0:s.screen.width,$viewport_height:null==s?void 0:s.innerHeight,$viewport_width:null==s?void 0:s.innerWidth,$lib:"web",$lib_version:v.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:_,windowId:f}=this.sessionManager.checkAndGetSessionAndWindowId(n,i.getTime());l.$session_id=_,l.$window_id=f}this.sessionPropsManager&&eF(l,this.sessionPropsManager.getSessionProps());try{this.sessionRecording&&eF(l,this.sessionRecording.sdkDebugProperties),l.$sdk_debug_retry_queue_size=null==(a=this.Ls)?void 0:a.length}catch(e){l.$sdk_debug_error_capturing_properties=String(e)}if(this.requestRouter.region===nH.CUSTOM&&(l.$lib_custom_api_host=this.config.api_host),d="$pageview"!==e||n?"$pageleave"!==e||n?this.pageViewM
vendor: 9,469 bytes, line 1
1anager.doEvent():this.pageViewManager.doPageLeave(i):this.pageViewManager.doPageView(i,r),l=eF(l,d),"$pageview"===e&&c&&(l.title=c.title),!O(o)){var m=i.getTime()-o;l.$duration=parseFloat((m/1e3).toFixed(3))}g&&this.config.opt_out_useragent_filter&&(l.$browser_type=this._is_bot()?"bot":"browser"),(l=eF({},p,this.persistence.properties(),this.sessionPersistence.properties(),l)).$is_identified=this._isIdentified(),$(this.config.property_denylist)?eR(this.config.property_denylist,function(e){delete l[e]}):ew.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var b=this.config.sanitize_properties;b&&(ew.error("sanitize_properties is deprecated. Use before_send instead"),l=b(l,e));var w=this.Gs();return l.$process_person_profile=w,w&&!n&&this.Vs("_calculate_event_properties"),l}Hs(e){if(!this.persistence||!this.Gs()||this.Rs)return e;var t,i=eF({},this.persistence.get_initial_props(),(null==(t=this.sessionPropsManager)?void 0:t.getSetOnceProps())||{},e||{}),s=this.config.sanitize_properties;return s&&(ew.error("sanitize_properties is deprecated. Use before_send instead"),i=s(i,"$set_once")),this.Rs=!0,T(i)?void 0:i}register(e,t){var i;null==(i=this.persistence)||i.register(e,t)}register_once(e,t,i){var s;null==(s=this.persistence)||s.register_once(e,t,i)}register_for_session(e){var t;null==(t=this.sessionPersistence)||t.register(e)}unregister(e){var t;null==(t=this.persistence)||t.unregister(e)}unregister_for_session(e){var t;null==(t=this.sessionPersistence)||t.unregister(e)}Js(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(e){return t}}isFeatureEnabled(e,t){return this.featureFlags.isFeatureEnabled(e,t)}reloadFeatureFlags(){this.featureFlags.reloadFeatureFlags()}updateEarlyAccessFeatureEnrollment(e,t,i){this.featureFlags.updateEarlyAccessFeatureEnrollment(e,t,i)}getEarlyAccessFeatures(e,t,i){return void 0===t&&(t=!1),this.featureFlags.getEarlyAccessFeatures(e,t,i)}on(e,t){return this.Is.on(e,t)}onFeatureFlags(e){return this.featureFlags.onFeatureFlags(e)}onSurveysLoaded(e){return this.surveys.onSurveysLoaded(e)}onSessionId(e){var t,i;return null!=(t=null==(i=this.sessionManager)?void 0:i.onSessionId(e))?t:()=>{}}getSurveys(e,t){void 0===t&&(t=!1),this.surveys.getSurveys(e,t)}getActiveMatchingSurveys(e,t){void 0===t&&(t=!1),this.surveys.getActiveMatchingSurveys(e,t)}renderSurvey(e,t){this.surveys.renderSurvey(e,t)}displaySurvey(e,t){void 0===t&&(t=nm),this.surveys.displaySurvey(e,t)}canRenderSurvey(e){return this.surveys.canRenderSurvey(e)}canRenderSurveyAsync(e,t){return void 0===t&&(t=!1),this.surveys.canRenderSurveyAsync(e,t)}identify(e,t,i){if(!this.__loaded||!this.persistence)return ew.uninitializedWarning("posthog.identify");if(N(e)&&(e=e.toString(),ew.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()))ew.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!==tp){if(this.Vs("posthog.identify")){var s=this.get_distinct_id();this.register({$user_id:e}),this.get_property("$device_id")||this.register_once({$had_persisted_distinct_id:!0,$device_id:s},""),e!==s&&e!==this.get_property(eN)&&(this.unregister(eN),this.register({distinct_id:e}));var r="anonymous"===(this.persistence.get_property(tn)||"anonymous");e!==s&&r?(this.persistence.set_property(tn,"identified"),this.setPersonPropertiesForFlags(y({},i||{},t||{}),!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:s},{$set:t||{},$set_once:i||{}}),this.Ms=s6(e,t,i),this.featureFlags.setAnonymousDistinctId(s)):(t||i)&&this.setPersonProperties(t,i),e!==s&&(this.reloadFeatureFlags(),this.unregister(tr))}}else ew.critical('The string "'+tp+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.');else ew.error("Unique user id has not been set in posthog.identify")}setPersonProperties(e,t){if((e||t)&&this.Vs("posthog.setPersonProperties")){var i=s6(this.get_distinct_id(),e,t);this.Ms!==i?(this.setPersonPropertiesForFlags(y({},t||{},e||{})),this.capture("$set",{$set:e||{},$set_once:t||{}}),this.Ms=i):ew.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(e,t,i){if(e&&t){if(this.Vs("posthog.group")){var s=this.getGroups();s[e]!==t&&this.resetGroupPropertiesForFlags(e),this.register({$groups:y({},s,{[e]:t})}),i&&(this.capture("$groupidentify",{$group_type:e,$group_key:t,$group_set:i}),this.setGroupPropertiesForFlags({[e]:i})),s[e]===t||i||this.reloadFeatureFlags()}}else ew.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,t){void 0===t&&(t=!0),this.featureFlags.setPersonPropertiesForFlags(e,t)}resetPersonPropertiesForFlags(){this.featureFlags.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(e,t){void 0===t&&(t=!0),this.Vs("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(e,t)}resetGroupPropertiesForFlags(e){this.featureFlags.resetGroupPropertiesForFlags(e)}reset(e){if(ew.info("reset"),!this.__loaded)return ew.uninitializedWarning("posthog.reset");var t,i,s,r,n=this.get_property("$device_id");if(this.consent.reset(),null==(t=this.persistence)||t.clear(),null==(i=this.sessionPersistence)||i.clear(),this.surveys.reset(),this.featureFlags.reset(),null==(s=this.persistence)||s.set_property(tn,"anonymous"),null==(r=this.sessionManager)||r.resetSessionId(),this.Ms=null,"always"===this.config.cookieless_mode)this.register_once({distinct_id:tp,$device_id:null},"");else{var a=this.config.get_device_id(t7());this.register_once({distinct_id:a,$device_id:e?a:n},"")}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 null!=(e=null==(t=this.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0).sessionId)?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:t,sessionStartTimestamp:i}=this.sessionManager.checkAndGetSessionAndWindowId(!0),s=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+t);if(null!=e&&e.withTimestamp&&i){var r,n=null!=(r=e.timestampLookBack)?r:10;if(!i)return s;s+="?t="+Math.max(Math.floor(((new Date).getTime()-i)/1e3)-n,0)}return s}alias(e,t){return e===this.get_property(eD)?(ew.critical("Attempting to create alias for existing People user - aborting."),-2):this.Vs("posthog.alias")?(O(t)&&(t=this.get_distinct_id()),e!==t?(this.Js(eN,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(ew.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var t=y({},this.config);if(C(e)){eF(this.config,n1(e));var i,s,r,n,a,o=this.As();null==(i=this.persistence)||i.update_config(this.config,t,o),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new no(y({},this.config,{persistence:"sessionStorage"}),o),ir.G()&&"true"===ir.J("ph_debug")&&(this.config.debug=!0),this.config.debug&&(v.DEBUG=!0,ew.info("set_config",{config:e,oldConfig:t,newConfig:y({},this.config)})),null==(s=this.sessionRecording)||s.startIfEnabledOrStop(),null==(r=this.autocapture)||r.startIfEnabled(),null==(n=this.heatmaps)||n.startIfEnabled(),this.surveys.loadIfEnabled(),this.Ks(),null==(a=this.externalIntegrations)||a.startIfEnabledOrStop()}}startSessionRecording(e){var t,i,s,r,n,a=!0===e,o={sampling:a||!(null==e||!e.sampling),linked_flag:a||!(null==e||!e.linked_flag),url_trigger:a||!(null==e||!e.url_trigger),event_trigger:a||!(null==e||!e.event_trigger)};Object.values(o).some(Boolean)&&(null==(t=this.sessionManager)||t.checkAndGetSessionAndWindowId(),o.sampling&&(null==(i=this.sessionRecording)||i.overrideSampling()),o.linked_flag&&(null==(s=this.sessionRecording)||s.overrideLinkedFlag()),o.url_trigger&&(null==(r=this.sessionRecording)||r.overrideTrigger("url")),o.event_trigger&&(null==(n=this.sessionRecording)||n.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!(null==(e=this.sessionRecording)||!e.started)}captureException(e,t){var i=Error("PostHog syntheticException"),s=this.exceptions.buildProperties(e,{handled:!0,syntheticException:i});return this.exceptions.sendExceptionEvent(y({},s,t))}loadToolbar(e){return this.toolbar.loadToolbar(e)}get_property(e){var t;return null==(t=this.persistence)?void 0:t.props[e]}getSessionProperty(e){var t;return null==(t=this.sessionPersistence)?void 0:t.props[e]}toString(){var e,t=null!=(e=this.config.name)?e:nZ;return t!==nZ&&(t=nZ+"."+t),t}_isIdentified(){var e,t;return"identified"===(null==(e=this.persistence)?void 0:e.get_property(tn))||"identified"===(null==(t=this.sessionPersistence)?void 0:t.get_property(tn))}Gs(){var e,t;return!("never"===this.config.person_profiles||"identified_only"===this.config.person_profiles&&
1!this._isIdentified()&&T(this.getGroups())&&(null==(e=this.persistence)||null==(e=e.props)||!e[eN])&&(null==(t=this.persistence)||null==(t=t.props)||!t[th]))}qs(){return!0===this.config.capture_pageleave||"if_capture_pageview"===this.config.capture_pageleave&&(!0===this.config.capture_pageview||"history_change"===this.config.capture_pageview)}createPersonProfile(){this.Gs()||this.Vs("posthog.createPersonProfile")&&this.setPersonProperties({},{})}Vs(e){return"never"===this.config.person_profiles?(ew.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Js(th,!0),!0)}As(){if("always"===this.config.cookieless_mode)return!0;var e=this.consent.isOptedOut(),t=this.config.opt_out_persistence_by_default||"on_reject"===this.config.cookieless_mode;return this.config.disable_persistence||e&&!!t}Ks(){var e,t,i,s,r=this.As();return(null==(e=this.persistence)?void 0:e.Ue)!==r&&(null==(i=this.persistence)||i.set_disabled(r)),(null==(t=this.sessionPersistence)?void 0:t.Ue)!==r&&(null==(s=this.sessionPersistence)||s.set_disabled(r)),r}opt_in_capturing(e){if("always"!==this.config.cookieless_mode){var t;"on_reject"===this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut()&&(this.reset(!0),this.sessionManager=new nT(this),this.persistence&&(this.sessionPropsManager=new nP(this,this.sessionManager,this.persistence)),this.sessionRecording=new sO(this),this.sessionRecording.startIfEnabledOrStop()),this.consent.optInOut(!0),this.Ks(),"on_reject"==this.config.cookieless_mode&&this.surveys.loadIfEnabled(),(O(null==e?void 0:e.captureEventName)||null!=e&&e.captureEventName)&&this.capture(null!=(t=null==e?void 0:e.captureEventName)?t:"$opt_in",null==e?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Bs()}else ew.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}opt_out_capturing(){var e;"always"!==this.config.cookieless_mode?("on_reject"===this.config.cookieless_mode&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.Ks(),"on_reject"===this.config.cookieless_mode&&(this.register({distinct_id:tp,$device_id:null}),this.sessionManager=void 0,this.sessionPropsManager=void 0,null==(e=this.sessionRecording)||e.stopRecording(),this.sessionRecording=void 0,this.Bs())):ew.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===id.GRANTED?"granted":e===id.DENIED?"denied":"pending"}is_capturing(){return"always"===this.config.cookieless_mode||("on_reject"===this.config.cookieless_mode?this.consent.isExplicitlyOptedOut()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.Ks()}_is_bot(){return l?nN(l,this.config.custom_blocked_useragents):void 0}Bs(){c&&("visible"===c.visibilityState?this.Ps||(this.Ps=!0,this.capture("$pageview",{title:c.title},{send_instantly:!0}),this.Ts&&(c.removeEventListener("visibilitychange",this.Ts),this.Ts=null)):this.Ts||(this.Ts=this.Bs.bind(this),eL(c,"visibilitychange",this.Ts)))}debug(e){!1===e?(null==s||s.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(null==s||s.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,i,s,r=this.Os||{};return"advanced_disable_flags"in r?!!r.advanced_disable_flags:!1!==this.config.advanced_disable_flags?!!this.config.advanced_disable_flags:!0===this.config.advanced_disable_decide?(ew.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):(t="advanced_disable_decide",i=(e="advanced_disable_flags")in r&&!O(r[e]),s=t in r&&!O(r[t]),i?r[e]:!!s&&(ew&&ew.warn("Config field '"+t+"' is deprecated. Please use '"+e+"' instead. The old field will be removed in a future major version."),r[t]))}Ws(e){if(D(this.config.before_send))return e;var t=$(this.config.before_send)?this.config.before_send:[this.config.before_send],i=e;for(var s of t){if(D(i=s(i))){var r="Event '"+e.event+"' was rejected in beforeSend function";return j(e.event)?ew.warn(r+". This can cause unexpected behavior."):ew.info(r),null}i.properties&&!T(i.properties)||ew.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return i}getPageViewId(){var e;
1return null==(e=this.pageViewManager.pe)?void 0:e.pageViewId}captureTraceFeedback(e,t){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:t})}captureTraceMetric(e,t,i){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:t,$ai_metric_value:String(i)})}}for(var n5=["identify"],n6=0;n6<n5.length;n6++)n3.prototype[n5[n6]]=eT(n3.prototype[n5[n6]]);var n4,n8,n7,n9,ae,at,ai,as,ar,an,aa,ao,al,ac,au=(ac=nX[nZ]=new n3,function(){function e(){e.done||(e.done=!0,nQ=!1,eR(nX,function(e){e._dom_loaded()}))}null!=c&&c.addEventListener?"complete"===c.readyState?e():eL(c,"DOMContentLoaded",e,{capture:!1}):s&&ew.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),ac);e.s(["default",()=>au])}]);

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.