posthog-js
Advanced tools
@@ -1,2 +0,2 @@ | ||
| !function(){"use strict";var e="undefined"!=typeof window?window:void 0,r="undefined"!=typeof globalThis?globalThis:e;"undefined"==typeof self&&(r.self=r),"undefined"==typeof File&&(r.File=function(){});var n=Array.prototype.forEach,t=null==r?void 0:r.navigator,i=null==r?void 0:r.document,o=null==r?void 0:r.location;null==r||r.fetch,null!=r&&r.XMLHttpRequest&&"withCredentials"in new r.XMLHttpRequest&&r.XMLHttpRequest,null==r||r.AbortController;var a=null==t?void 0:t.userAgent,u=null!=e?e:{},s={LIB_VERSION:"1.354.1"};function l(){return l=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)({}).hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e},l.apply(null,arguments)}function c(e,r){return-1!==e.indexOf(r)}var f=Array.isArray,d=Object.prototype,v=d.hasOwnProperty,h=d.toString,p=f||function(e){return"[object Array]"===h.call(e)},g=e=>e===Object(e)&&!p(e),w=e=>{if(g(e)){for(var r in e)if(v.call(e,r))return!1;return!0}return!1},m=e=>void 0===e,_=e=>m(e)||(e=>null===e)(e),b=e=>"[object Number]"==h.call(e)&&e==e,x=e=>e instanceof FormData;function y(e,r,n,t,i){return r>n&&(t.warn("min cannot be greater than max."),r=n),b(e)?e>n?(t.warn(" cannot be greater than max: "+n+". Using max value instead."),n):e<r?(t.warn(" cannot be less than min: "+r+". Using min value instead."),r):e:(t.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+i),y(n,r,n,t))}class E{constructor(e){this.t={},this.i=e.i,this.o=y(e.bucketSize,0,100,e.u),this.l=y(e.refillRate,0,this.o,e.u),this.v=y(e.refillInterval,0,864e5,e.u)}h(e,r){var n=r-e.lastAccess,t=Math.floor(n/this.v);if(t>0){var i=t*this.l;e.tokens=Math.min(e.tokens+i,this.o),e.lastAccess=e.lastAccess+t*this.v}}consumeRateLimit(e){var r,n=Date.now(),t=String(e),i=this.t[t];return i?this.h(i,n):(i={tokens:this.o,lastAccess:n},this.t[t]=i),0===i.tokens||(i.tokens--,0===i.tokens&&(null==(r=this.i)||r.call(this,e)),0===i.tokens)}stop(){this.t={}}}var R="Mobile",S="iOS",M="Android",k="Tablet",P=M+" "+k,A="iPad",O="Apple",B=O+" Watch",I="Safari",U="BlackBerry",N="Samsung",T=N+"Browser",C=N+" Internet",D="Chrome",F=D+" OS",W=D+" "+S,j="Internet Explorer",z=j+" "+R,L="Opera",K=L+" Mini",V="Edge",G="Microsoft "+V,H="Firefox",X=H+" "+S,q="Nintendo",Y="PlayStation",J="Xbox",Q=M+" "+R,Z=R+" "+I,ee="Windows",re=ee+" Phone",ne="Nokia",te="Ouya",ie="Generic",oe=ie+" "+R.toLowerCase(),ae=ie+" "+k.toLowerCase(),ue="Konqueror",se="(\\d+(\\.\\d+)?)",le=new RegExp("Version/"+se),ce=new RegExp(J,"i"),fe=new RegExp(Y+" \\w+","i"),de=new RegExp(q+" \\w+","i"),ve=new RegExp(U+"|PlayBook|BB10","i"),he={"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"};var pe=(e,r)=>r&&c(r,O)||function(e){return c(e,I)&&!c(e,D)&&!c(e,M)}(e),ge=function(e,r){return r=r||"",c(e," OPR/")&&c(e,"Mini")?K:c(e," OPR/")?L:ve.test(e)?U:c(e,"IE"+R)||c(e,"WPDesktop")?z:c(e,T)?C:c(e,V)||c(e,"Edg/")?G:c(e,"FBIOS")?"Facebook "+R:c(e,"UCWEB")||c(e,"UCBrowser")?"UC Browser":c(e,"CriOS")?W:c(e,"CrMo")||c(e,D)?D:c(e,M)&&c(e,I)?Q:c(e,"FxiOS")?X:c(e.toLowerCase(),ue.toLowerCase())?ue:pe(e,r)?c(e,R)?Z:I:c(e,H)?H:c(e,"MSIE")||c(e,"Trident/")?j:c(e,"Gecko")?H:""},we={[z]:[new RegExp("rv:"+se)],[G]:[new RegExp(V+"?\\/"+se)],[D]:[new RegExp("("+D+"|CrMo)\\/"+se)],[W]:[new RegExp("CriOS\\/"+se)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+se)],[I]:[le],[Z]:[le],[L]:[new RegExp("(Opera|OPR)\\/"+se)],[H]:[new RegExp(H+"\\/"+se)],[X]:[new RegExp("FxiOS\\/"+se)],[ue]:[new RegExp("Konqueror[:/]?"+se,"i")],[U]:[new RegExp(U+" "+se),le],[Q]:[new RegExp("android\\s"+se,"i")],[C]:[new RegExp(T+"\\/"+se)],[j]:[new RegExp("(rv:|MSIE )"+se)],Mozilla:[new RegExp("rv:"+se)]},me=function(e,r){var n=ge(e,r),t=we[n];if(m(t))return null;for(var i=0;i<t.length;i++){var o=t[i],a=e.match(o);if(a)return parseFloat(a[a.length-2])}return null},_e=[[new RegExp(J+"; "+J+" (.*?)[);]","i"),e=>[J,e&&e[1]||""]],[new RegExp(q,"i"),[q,""]],[new RegExp(Y,"i"),[Y,""]],[ve,[U,""]],[new RegExp(ee,"i"),(e,r)=>{if(/Phone/.test(r)||/WPDesktop/.test(r))return[re,""];if(new RegExp(R).test(r)&&!/IEMobile\b/.test(r))return[ee+" "+R,""];var n=/Windows NT ([0-9.]+)/i.exec(r);if(n&&n[1]){var t=n[1],i=he[t]||"";return/arm/i.test(r)&&(i="RT"),[ee,i]}return[ee,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){var r=[e[3],e[4],e[5]||"0"];return[S,r.join(".")]}return[S,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var r="";return e&&e.length>=3&&(r=m(e[2])?e[3]:e[2]),["watchOS",r]}],[new RegExp("("+M+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+M+")","i"),e=>{if(e&&e[2]){var r=[e[2],e[3],e[4]||"0"];return[M,r.join(".")]}return[M,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var r=["Mac OS X",""];if(e&&e[1]){var n=[e[1],e[2],e[3]||"0"];r[1]=n.join(".")}return r}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[F,""]],[/Linux|debian/i,["Linux",""]]],be=function(e){return de.test(e)?q:fe.test(e)?Y:ce.test(e)?J:new RegExp(te,"i").test(e)?te:new RegExp("("+re+"|WPDesktop)","i").test(e)?re:/iPad/.test(e)?A:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?B:ve.test(e)?U:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(ne,"i").test(e)?ne:/(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(R).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)?M:P:new RegExp("(pda|"+R+")","i").test(e)?oe:new RegExp(k,"i").test(e)&&!new RegExp(k+" pc","i").test(e)?ae:""},xe=function(r,n){var{debugEnabled:t}=void 0===n?{}:n,i={p:function(n){if(e&&(u.POSTHOG_DEBUG||t)&&!m(e.console)&&e.console){for(var i=("__rrweb_original__"in e.console[n]?e.console[n].__rrweb_original__:e.console[n]),o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];i(r,...a)}},info:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];i.p("log",...r)},warn:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];i.p("warn",...r)},error:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];i.p("error",...r)},critical:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];console.error(r,...n)},uninitializedWarning:e=>{i.error("You must initialize PostHog before calling "+e)},createLogger:(e,n)=>xe(r+" "+e,n)};return i},ye=xe("[PostHog.js]"),Ee=ye.createLogger,Re={};function $e(e,r,t){if(p(e))if(n&&e.forEach===n)e.forEach(r,t);else if("length"in e&&e.length===+e.length)for(var i=0,o=e.length;i<o;i++)if(i in e&&r.call(t,e[i],i)===Re)return}function Se(e,r,n){if(!_(e)){if(p(e))return $e(e,r,n);if(x(e)){for(var t of e.entries())if(r.call(n,t[1],t[0])===Re)return}else for(var i in e)if(v.call(e,i)&&r.call(n,e[i],i)===Re)return}}var Me=function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),t=1;t<r;t++)n[t-1]=arguments[t];return $e(n,(function(r){for(var n in r)void 0!==r[n]&&(e[n]=r[n])})),e},ke=function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),t=1;t<r;t++)n[t-1]=arguments[t];return $e(n,(function(r){$e(r,(function(r){e.push(r)}))})),e},Pe=function(e){var r={};return Se(e,(function(e,n){var t;t=e,("[object String]"==h.call(t)&&e.length>0||b(e))&&(r[n]=e)})),r},Ae=e=>{var r=null==i?void 0:i.createElement("a");return m(r)?null:(r.href=e,r)},Oe=function(e,r){for(var n,t=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),i=0;i<t.length;i++){var o=t[i].split("=");if(o[0]===r){n=o;break}}if(!p(n)||n.length<2)return"";var a=n[1];try{a=decodeURIComponent(a)}catch(e){ye.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},Be=function(e,r,n){if(!e||!r||!r.length)return e;for(var t=e.split("#"),i=t[0]||"",o=t[1],a=i.split("?"),u=a[1],s=a[0],l=(u||"").split("&"),c=[],f=0;f<l.length;f++){var d=l[f].split("=");p(d)&&(r.includes(d[0])?c.push(d[0]+"="+n):c.push(l[f]))}var v=s;return null!=u&&(v+="?"+c.join("&")),null!=o&&(v+="#"+o),v};Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return b(e)&&isFinite(e)&&Math.floor(e)===e});var Ie="0123456789abcdef";class Ue{constructor(e){if(this.bytes=e,16!==e.length)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,r,n,t){if(!Number.isInteger(e)||!Number.isInteger(r)||!Number.isInteger(n)||!Number.isInteger(t)||e<0||r<0||n<0||t<0||e>0xffffffffffff||r>4095||n>1073741823||t>4294967295)throw new RangeError("invalid field value");var i=new Uint8Array(16);return i[0]=e/Math.pow(2,40),i[1]=e/Math.pow(2,32),i[2]=e/Math.pow(2,24),i[3]=e/Math.pow(2,16),i[4]=e/Math.pow(2,8),i[5]=e,i[6]=112|r>>>8,i[7]=r,i[8]=128|n>>>24,i[9]=n>>>16,i[10]=n>>>8,i[11]=n,i[12]=t>>>24,i[13]=t>>>16,i[14]=t>>>8,i[15]=t,new Ue(i)}toString(){for(var e="",r=0;r<this.bytes.length;r++)e=e+Ie.charAt(this.bytes[r]>>>4)+Ie.charAt(15&this.bytes[r]),3!==r&&5!==r&&7!==r&&9!==r||(e+="-");if(36!==e.length)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new Ue(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(var r=0;r<16;r++){var n=this.bytes[r]-e.bytes[r];if(0!==n)return Math.sign(n)}return 0}}class Ne{constructor(){this.m=0,this.R=0,this.$=new De}generate(){var e=this.generateOrAbort();if(m(e)){this.m=0;var r=this.generateOrAbort();if(m(r))throw new Error("Could not generate UUID after timestamp reset");return r}return e}generateOrAbort(){var e=Date.now();if(e>this.m)this.m=e,this.S();else{if(!(e+1e4>this.m))return;this.R++,this.R>4398046511103&&(this.m++,this.S())}return Ue.fromFieldsV7(this.m,Math.trunc(this.R/Math.pow(2,30)),this.R&Math.pow(2,30)-1,this.$.nextUint32())}S(){this.R=1024*this.$.nextUint32()+(1023&this.$.nextUint32())}}var Te,Ce=e=>{if("undefined"!=typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var r=0;r<e.length;r++)e[r]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};e&&!m(e.crypto)&&crypto.getRandomValues&&(Ce=e=>crypto.getRandomValues(e));class De{constructor(){this.M=new Uint32Array(8),this.k=1/0}nextUint32(){return this.k>=this.M.length&&(Ce(this.M),this.k=0),this.M[this.k++]}}var Fe=()=>We().toString(),We=()=>(Te||(Te=new Ne)).generate(),je="";var ze=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;function Le(e,r){if(r){var n=function(e,r){if(void 0===r&&(r=i),je)return je;if(!r)return"";if(["localhost","127.0.0.1"].includes(e))return"";for(var n=e.split("."),t=Math.min(n.length,8),o="dmn_chk_"+Fe();!je&&t--;){var a=n.slice(t).join("."),u=o+"=1;domain=."+a+";path=/";r.cookie=u+";max-age=3",r.cookie.includes(o)&&(r.cookie=u+";max-age=0",je=a)}return je}(e);if(!n){var t=(e=>{var r=e.match(ze);return r?r[0]:""})(e);t!==n&&ye.info("Warning: cookie subdomain discovery mismatch",t,n),n=t}return n?"; domain=."+n:""}return""}var Ke={P:()=>!!i,A:function(e){ye.error("cookieStore error: "+e)},O:function(e){if(i){try{for(var r=e+"=",n=i.cookie.split(";").filter((e=>e.length)),t=0;t<n.length;t++){for(var o=n[t];" "==o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(r))return decodeURIComponent(o.substring(r.length,o.length))}}catch(e){}return null}},B:function(e){var r;try{r=JSON.parse(Ke.O(e))||{}}catch(e){}return r},I:function(e,r,n,t,o){if(i)try{var a="",u="",s=Le(i.location.hostname,t);if(n){var l=new Date;l.setTime(l.getTime()+24*n*60*60*1e3),a="; expires="+l.toUTCString()}o&&(u="; secure");var c=e+"="+encodeURIComponent(JSON.stringify(r))+a+"; SameSite=Lax; path=/"+s+u;return c.length>3686.4&&ye.warn("cookieStore warning: large cookie, len="+c.length),i.cookie=c,c}catch(e){return}},U:function(e,r){if(null!=i&&i.cookie)try{Ke.I(e,"",-1,r)}catch(e){return}}},Ve=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],Ge=ke(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],Ve),He=["$app_build","$app_name","$app_namespace","$app_version","$browser","$browser_version","$device_type","$current_url","$pathname","$os","$os_name","$os_version","$referring_domain","$referrer","$screen_height","$screen_width","$viewport_height","$viewport_width","$raw_user_agent"],Xe="<masked>",qe=["li_fat_id"];function Ye(e,r,n){if(!i)return{};var t,o,a,u,s=r?ke([],Ve,n||[]):[],l=(t=Be(i.URL,s,Xe),o=e,a=Ge.concat(o||[]),u={},Se(a,(function(e){var r=Oe(t,e);u[e]=r||null})),u),c=function(){var e={};return Se(qe,(function(r){var n=Ke.O(r);e[r]=n||null})),e}();return Me(c,l)}function Je(){return navigator.language||navigator.userLanguage}function Qe(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}function Ze(){try{return(new Date).getTimezoneOffset()}catch(e){return}}function er(r,n){if(!a)return{};var t,i,u,l=r?ke([],Ve,n||[]):[],[c,f]=function(e){for(var r=0;r<_e.length;r++){var[n,t]=_e[r],i=n.exec(e),o=i&&("function"==typeof t?t(i,e):t);if(o)return o}return["",""]}(a);return Me(Pe({$os:c,$os_version:f,$browser:ge(a,navigator.vendor),$device:be(a),$device_type:(i=a,u=be(i),u===A||u===P||"Kobo"===u||"Kindle Fire"===u||u===ae?k:u===q||u===J||u===Y||u===te?"Console":u===B?"Wearable":u?R:"Desktop"),$timezone:Qe(),$timezone_offset:Ze()}),{$current_url:Be(null==o?void 0:o.href,l,Xe),$host:null==o?void 0:o.host,$pathname:null==o?void 0:o.pathname,$raw_user_agent:a.length>1e3?a.substring(0,997)+"...":a,$browser_version:me(a,navigator.vendor),$browser_language:Je(),$browser_language_prefix:(t=Je(),"string"==typeof t?t.split("-")[0]:void 0),$screen_height:null==e?void 0:e.screen.height,$screen_width:null==e?void 0:e.screen.width,$viewport_height:null==e?void 0:e.innerHeight,$viewport_width:null==e?void 0:e.innerWidth,$lib:"web",$lib_version:s.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}function rr(e,r){return[...e||[],...p(r)?r:[r]]}function nr(e,r){return(m(e)?1:e)*r}function tr(e,r){return function(e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n),r|=0;return Math.abs(r)}(e)%100<y(100*r,0,100,ye)}var ir=["type"];function or(e){var{type:r,executionTimeMs:n}=e;return""+r+(_(n)?"":" ("+n.toFixed(2)+"ms)")}var ar=Ee("[PostHog Action RateLimiting]");function ur(e,r){console.log(e,r)}function sr(e,r,n){if(void 0===n&&(n=5),"object"!=typeof e||"object"!=typeof r)return{};if(e===r)return{};if(!e&&r)return r;if(!r||!e)return{};var t={},i=new Set([...Object.keys(e),...Object.keys(r)]);for(var o of i){var a=e[o],u=r[o];if(m(a))t[o]=u;else if(m(u))t[o]=a;else if(!(a===u||_(a)&&_(u)))if(g(a)&&g(u))if(n>1){var s=sr(a,u,n-1);w(s)||(t[o]=s)}else t[o]="max depth reached, checking for changed value";else t[o]=u}return t}var lr,cr,fr,dr=(lr=null,cr=0,fr=null,{info:e=>{fr!==e&&(cr=0,fr=e),cr++,lr&&clearTimeout(lr),lr=setTimeout((()=>{var r=cr;1===r?ar.info('action "'+e+'" has been rate limited'):ar.info('action "'+e+'" has been rate limited ('+r+" times)"),cr=0,lr=null}),1e3)}});function vr(e){void 0===e&&(e={});var{maskAction:r,maskState:n,titleFunction:t=or,logger:i=ur,include:o={prevState:!0,nextState:!1,changedState:!0},rateLimiterRefillRate:a=1,rateLimiterBucketSize:u=10,__stateComparisonDepth:s}=e,l=new E({refillRate:a,bucketSize:u,refillInterval:1e3,u:ar});return e=>a=>u=>{var c=u,f=e.getState(),d=performance.now(),v=a(c),h=performance.now()-d,p=e.getState(),g=r?r(c):c;if(!g)return v;if(l.consumeRateLimit(c.type))dr.info(c.type);else try{var w=n?n(f,g):f,m=n?n(p,g):p,_=o.changedState?sr(w,m,null!=s?s:5):void 0,{type:b}=g,x={type:b,payload:function(e,r){if(null==e)return{};var n={};for(var t in e)if({}.hasOwnProperty.call(e,t)){if(-1!==r.indexOf(t))continue;n[t]=e[t]}return n}(g,ir),timestamp:Date.now(),executionTimeMs:h,prevState:o.prevState?w:void 0,nextState:o.nextState?m:void 0,changedState:o.changedState?_:void 0},y=t(x);i(y,x)}catch(e){ar.error("Error logging state:",e)}return v}}var hr=Object.freeze({__proto__:null,browserConsoleLogger:ur,posthogKeaLogger:function(e){void 0===e&&(e={});var r=vr(e);return{name:"posthog-kea-logger",events:{beforeReduxStore(e){e.middleware.push(r)}}}},posthogReduxLogger:vr,printAndDropEverything:e=>(console.log("Would have sent event:",e),null),sampleByDistinctId:function(e){return r=>r&&tr(r.properties.distinct_id,e)?l({},r,{properties:l({},r.properties,{$sample_type:["sampleByDistinctId"],$sample_threshold:e})}):null},sampleByEvent:function(e,r){return n=>{var t,i,o;return n?c(e,n.event)?100*Math.random()<y(100*r,0,100,ye)?l({},n,{properties:l({},n.properties,{$sample_type:rr(null==(t=n.properties)?void 0:t.$sample_type,"sampleByEvent"),$sample_threshold:nr(null==(i=n.properties)?void 0:i.$sample_threshold,r),$sampled_events:rr(null==(o=n.properties)?void 0:o.$sampled_events,e)})}):null:n:null}},sampleBySessionId:function(e){return r=>r&&tr(r.properties.$session_id,e)?l({},r,{properties:l({},r.properties,{$sample_type:rr(r.properties.$sample_type,"sampleBySessionId"),$sample_threshold:nr(r.properties.$sample_threshold,e)})}):null},sessionRecordingLoggerForPostHogInstance:e=>(r,n)=>{var t;null==e||null==(t=e.sessionRecording)||t.tryAddCustomEvent("app-state",{title:r,stateEvent:n})},setAllPersonProfilePropertiesAsPersonPropertiesForFlags:e=>{var r,n=Me({},er(e.config.mask_personal_data_properties,e.config.custom_personal_data_properties),Ye(e.config.custom_campaign_params,e.config.mask_personal_data_properties,e.config.custom_personal_data_properties),{$referrer:(null==i?void 0:i.referrer)||"$direct",$referring_domain:null!=i&&i.referrer&&(null==(r=Ae(i.referrer))?void 0:r.host)||"$direct"}),t={};Se(n,(function(e,r){(c(Ge,r)||c(He,r))&&(t[r]=e)})),e.setPersonPropertiesForFlags(t)}});u.posthogCustomizations=hr}(); | ||
| !function(){"use strict";var e="undefined"!=typeof window?window:void 0,r="undefined"!=typeof globalThis?globalThis:e;"undefined"==typeof self&&(r.self=r),"undefined"==typeof File&&(r.File=function(){});var n=Array.prototype.forEach,t=null==r?void 0:r.navigator,i=null==r?void 0:r.document,o=null==r?void 0:r.location;null==r||r.fetch,null!=r&&r.XMLHttpRequest&&"withCredentials"in new r.XMLHttpRequest&&r.XMLHttpRequest,null==r||r.AbortController;var a=null==t?void 0:t.userAgent,u=null!=e?e:{},s={LIB_VERSION:"1.354.2"};function l(){return l=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)({}).hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e},l.apply(null,arguments)}function c(e,r){return-1!==e.indexOf(r)}var f=Array.isArray,d=Object.prototype,v=d.hasOwnProperty,h=d.toString,p=f||function(e){return"[object Array]"===h.call(e)},g=e=>e===Object(e)&&!p(e),w=e=>{if(g(e)){for(var r in e)if(v.call(e,r))return!1;return!0}return!1},m=e=>void 0===e,_=e=>m(e)||(e=>null===e)(e),b=e=>"[object Number]"==h.call(e)&&e==e,x=e=>e instanceof FormData;function y(e,r,n,t,i){return r>n&&(t.warn("min cannot be greater than max."),r=n),b(e)?e>n?(t.warn(" cannot be greater than max: "+n+". Using max value instead."),n):e<r?(t.warn(" cannot be less than min: "+r+". Using min value instead."),r):e:(t.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+i),y(n,r,n,t))}class E{constructor(e){this.t={},this.i=e.i,this.o=y(e.bucketSize,0,100,e.u),this.l=y(e.refillRate,0,this.o,e.u),this.v=y(e.refillInterval,0,864e5,e.u)}h(e,r){var n=r-e.lastAccess,t=Math.floor(n/this.v);if(t>0){var i=t*this.l;e.tokens=Math.min(e.tokens+i,this.o),e.lastAccess=e.lastAccess+t*this.v}}consumeRateLimit(e){var r,n=Date.now(),t=String(e),i=this.t[t];return i?this.h(i,n):(i={tokens:this.o,lastAccess:n},this.t[t]=i),0===i.tokens||(i.tokens--,0===i.tokens&&(null==(r=this.i)||r.call(this,e)),0===i.tokens)}stop(){this.t={}}}var R="Mobile",S="iOS",M="Android",k="Tablet",P=M+" "+k,A="iPad",O="Apple",B=O+" Watch",I="Safari",U="BlackBerry",N="Samsung",T=N+"Browser",C=N+" Internet",D="Chrome",F=D+" OS",W=D+" "+S,j="Internet Explorer",z=j+" "+R,L="Opera",K=L+" Mini",V="Edge",G="Microsoft "+V,H="Firefox",X=H+" "+S,q="Nintendo",Y="PlayStation",J="Xbox",Q=M+" "+R,Z=R+" "+I,ee="Windows",re=ee+" Phone",ne="Nokia",te="Ouya",ie="Generic",oe=ie+" "+R.toLowerCase(),ae=ie+" "+k.toLowerCase(),ue="Konqueror",se="(\\d+(\\.\\d+)?)",le=new RegExp("Version/"+se),ce=new RegExp(J,"i"),fe=new RegExp(Y+" \\w+","i"),de=new RegExp(q+" \\w+","i"),ve=new RegExp(U+"|PlayBook|BB10","i"),he={"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"};var pe=(e,r)=>r&&c(r,O)||function(e){return c(e,I)&&!c(e,D)&&!c(e,M)}(e),ge=function(e,r){return r=r||"",c(e," OPR/")&&c(e,"Mini")?K:c(e," OPR/")?L:ve.test(e)?U:c(e,"IE"+R)||c(e,"WPDesktop")?z:c(e,T)?C:c(e,V)||c(e,"Edg/")?G:c(e,"FBIOS")?"Facebook "+R:c(e,"UCWEB")||c(e,"UCBrowser")?"UC Browser":c(e,"CriOS")?W:c(e,"CrMo")||c(e,D)?D:c(e,M)&&c(e,I)?Q:c(e,"FxiOS")?X:c(e.toLowerCase(),ue.toLowerCase())?ue:pe(e,r)?c(e,R)?Z:I:c(e,H)?H:c(e,"MSIE")||c(e,"Trident/")?j:c(e,"Gecko")?H:""},we={[z]:[new RegExp("rv:"+se)],[G]:[new RegExp(V+"?\\/"+se)],[D]:[new RegExp("("+D+"|CrMo)\\/"+se)],[W]:[new RegExp("CriOS\\/"+se)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+se)],[I]:[le],[Z]:[le],[L]:[new RegExp("(Opera|OPR)\\/"+se)],[H]:[new RegExp(H+"\\/"+se)],[X]:[new RegExp("FxiOS\\/"+se)],[ue]:[new RegExp("Konqueror[:/]?"+se,"i")],[U]:[new RegExp(U+" "+se),le],[Q]:[new RegExp("android\\s"+se,"i")],[C]:[new RegExp(T+"\\/"+se)],[j]:[new RegExp("(rv:|MSIE )"+se)],Mozilla:[new RegExp("rv:"+se)]},me=function(e,r){var n=ge(e,r),t=we[n];if(m(t))return null;for(var i=0;i<t.length;i++){var o=t[i],a=e.match(o);if(a)return parseFloat(a[a.length-2])}return null},_e=[[new RegExp(J+"; "+J+" (.*?)[);]","i"),e=>[J,e&&e[1]||""]],[new RegExp(q,"i"),[q,""]],[new RegExp(Y,"i"),[Y,""]],[ve,[U,""]],[new RegExp(ee,"i"),(e,r)=>{if(/Phone/.test(r)||/WPDesktop/.test(r))return[re,""];if(new RegExp(R).test(r)&&!/IEMobile\b/.test(r))return[ee+" "+R,""];var n=/Windows NT ([0-9.]+)/i.exec(r);if(n&&n[1]){var t=n[1],i=he[t]||"";return/arm/i.test(r)&&(i="RT"),[ee,i]}return[ee,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){var r=[e[3],e[4],e[5]||"0"];return[S,r.join(".")]}return[S,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var r="";return e&&e.length>=3&&(r=m(e[2])?e[3]:e[2]),["watchOS",r]}],[new RegExp("("+M+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+M+")","i"),e=>{if(e&&e[2]){var r=[e[2],e[3],e[4]||"0"];return[M,r.join(".")]}return[M,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var r=["Mac OS X",""];if(e&&e[1]){var n=[e[1],e[2],e[3]||"0"];r[1]=n.join(".")}return r}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[F,""]],[/Linux|debian/i,["Linux",""]]],be=function(e){return de.test(e)?q:fe.test(e)?Y:ce.test(e)?J:new RegExp(te,"i").test(e)?te:new RegExp("("+re+"|WPDesktop)","i").test(e)?re:/iPad/.test(e)?A:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?B:ve.test(e)?U:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(ne,"i").test(e)?ne:/(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(R).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)?M:P:new RegExp("(pda|"+R+")","i").test(e)?oe:new RegExp(k,"i").test(e)&&!new RegExp(k+" pc","i").test(e)?ae:""},xe=function(r,n){var{debugEnabled:t}=void 0===n?{}:n,i={p:function(n){if(e&&(u.POSTHOG_DEBUG||t)&&!m(e.console)&&e.console){for(var i=("__rrweb_original__"in e.console[n]?e.console[n].__rrweb_original__:e.console[n]),o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];i(r,...a)}},info:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];i.p("log",...r)},warn:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];i.p("warn",...r)},error:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];i.p("error",...r)},critical:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];console.error(r,...n)},uninitializedWarning:e=>{i.error("You must initialize PostHog before calling "+e)},createLogger:(e,n)=>xe(r+" "+e,n)};return i},ye=xe("[PostHog.js]"),Ee=ye.createLogger,Re={};function $e(e,r,t){if(p(e))if(n&&e.forEach===n)e.forEach(r,t);else if("length"in e&&e.length===+e.length)for(var i=0,o=e.length;i<o;i++)if(i in e&&r.call(t,e[i],i)===Re)return}function Se(e,r,n){if(!_(e)){if(p(e))return $e(e,r,n);if(x(e)){for(var t of e.entries())if(r.call(n,t[1],t[0])===Re)return}else for(var i in e)if(v.call(e,i)&&r.call(n,e[i],i)===Re)return}}var Me=function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),t=1;t<r;t++)n[t-1]=arguments[t];return $e(n,(function(r){for(var n in r)void 0!==r[n]&&(e[n]=r[n])})),e},ke=function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),t=1;t<r;t++)n[t-1]=arguments[t];return $e(n,(function(r){$e(r,(function(r){e.push(r)}))})),e},Pe=function(e){var r={};return Se(e,(function(e,n){var t;t=e,("[object String]"==h.call(t)&&e.length>0||b(e))&&(r[n]=e)})),r},Ae=e=>{var r=null==i?void 0:i.createElement("a");return m(r)?null:(r.href=e,r)},Oe=function(e,r){for(var n,t=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),i=0;i<t.length;i++){var o=t[i].split("=");if(o[0]===r){n=o;break}}if(!p(n)||n.length<2)return"";var a=n[1];try{a=decodeURIComponent(a)}catch(e){ye.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},Be=function(e,r,n){if(!e||!r||!r.length)return e;for(var t=e.split("#"),i=t[0]||"",o=t[1],a=i.split("?"),u=a[1],s=a[0],l=(u||"").split("&"),c=[],f=0;f<l.length;f++){var d=l[f].split("=");p(d)&&(r.includes(d[0])?c.push(d[0]+"="+n):c.push(l[f]))}var v=s;return null!=u&&(v+="?"+c.join("&")),null!=o&&(v+="#"+o),v};Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return b(e)&&isFinite(e)&&Math.floor(e)===e});var Ie="0123456789abcdef";class Ue{constructor(e){if(this.bytes=e,16!==e.length)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,r,n,t){if(!Number.isInteger(e)||!Number.isInteger(r)||!Number.isInteger(n)||!Number.isInteger(t)||e<0||r<0||n<0||t<0||e>0xffffffffffff||r>4095||n>1073741823||t>4294967295)throw new RangeError("invalid field value");var i=new Uint8Array(16);return i[0]=e/Math.pow(2,40),i[1]=e/Math.pow(2,32),i[2]=e/Math.pow(2,24),i[3]=e/Math.pow(2,16),i[4]=e/Math.pow(2,8),i[5]=e,i[6]=112|r>>>8,i[7]=r,i[8]=128|n>>>24,i[9]=n>>>16,i[10]=n>>>8,i[11]=n,i[12]=t>>>24,i[13]=t>>>16,i[14]=t>>>8,i[15]=t,new Ue(i)}toString(){for(var e="",r=0;r<this.bytes.length;r++)e=e+Ie.charAt(this.bytes[r]>>>4)+Ie.charAt(15&this.bytes[r]),3!==r&&5!==r&&7!==r&&9!==r||(e+="-");if(36!==e.length)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new Ue(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(var r=0;r<16;r++){var n=this.bytes[r]-e.bytes[r];if(0!==n)return Math.sign(n)}return 0}}class Ne{constructor(){this.m=0,this.R=0,this.$=new De}generate(){var e=this.generateOrAbort();if(m(e)){this.m=0;var r=this.generateOrAbort();if(m(r))throw new Error("Could not generate UUID after timestamp reset");return r}return e}generateOrAbort(){var e=Date.now();if(e>this.m)this.m=e,this.S();else{if(!(e+1e4>this.m))return;this.R++,this.R>4398046511103&&(this.m++,this.S())}return Ue.fromFieldsV7(this.m,Math.trunc(this.R/Math.pow(2,30)),this.R&Math.pow(2,30)-1,this.$.nextUint32())}S(){this.R=1024*this.$.nextUint32()+(1023&this.$.nextUint32())}}var Te,Ce=e=>{if("undefined"!=typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var r=0;r<e.length;r++)e[r]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};e&&!m(e.crypto)&&crypto.getRandomValues&&(Ce=e=>crypto.getRandomValues(e));class De{constructor(){this.M=new Uint32Array(8),this.k=1/0}nextUint32(){return this.k>=this.M.length&&(Ce(this.M),this.k=0),this.M[this.k++]}}var Fe=()=>We().toString(),We=()=>(Te||(Te=new Ne)).generate(),je="";var ze=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;function Le(e,r){if(r){var n=function(e,r){if(void 0===r&&(r=i),je)return je;if(!r)return"";if(["localhost","127.0.0.1"].includes(e))return"";for(var n=e.split("."),t=Math.min(n.length,8),o="dmn_chk_"+Fe();!je&&t--;){var a=n.slice(t).join("."),u=o+"=1;domain=."+a+";path=/";r.cookie=u+";max-age=3",r.cookie.includes(o)&&(r.cookie=u+";max-age=0",je=a)}return je}(e);if(!n){var t=(e=>{var r=e.match(ze);return r?r[0]:""})(e);t!==n&&ye.info("Warning: cookie subdomain discovery mismatch",t,n),n=t}return n?"; domain=."+n:""}return""}var Ke={P:()=>!!i,A:function(e){ye.error("cookieStore error: "+e)},O:function(e){if(i){try{for(var r=e+"=",n=i.cookie.split(";").filter((e=>e.length)),t=0;t<n.length;t++){for(var o=n[t];" "==o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(r))return decodeURIComponent(o.substring(r.length,o.length))}}catch(e){}return null}},B:function(e){var r;try{r=JSON.parse(Ke.O(e))||{}}catch(e){}return r},I:function(e,r,n,t,o){if(i)try{var a="",u="",s=Le(i.location.hostname,t);if(n){var l=new Date;l.setTime(l.getTime()+24*n*60*60*1e3),a="; expires="+l.toUTCString()}o&&(u="; secure");var c=e+"="+encodeURIComponent(JSON.stringify(r))+a+"; SameSite=Lax; path=/"+s+u;return c.length>3686.4&&ye.warn("cookieStore warning: large cookie, len="+c.length),i.cookie=c,c}catch(e){return}},U:function(e,r){if(null!=i&&i.cookie)try{Ke.I(e,"",-1,r)}catch(e){return}}},Ve=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],Ge=ke(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],Ve),He=["$app_build","$app_name","$app_namespace","$app_version","$browser","$browser_version","$device_type","$current_url","$pathname","$os","$os_name","$os_version","$referring_domain","$referrer","$screen_height","$screen_width","$viewport_height","$viewport_width","$raw_user_agent"],Xe="<masked>",qe=["li_fat_id"];function Ye(e,r,n){if(!i)return{};var t,o,a,u,s=r?ke([],Ve,n||[]):[],l=(t=Be(i.URL,s,Xe),o=e,a=Ge.concat(o||[]),u={},Se(a,(function(e){var r=Oe(t,e);u[e]=r||null})),u),c=function(){var e={};return Se(qe,(function(r){var n=Ke.O(r);e[r]=n||null})),e}();return Me(c,l)}function Je(){return navigator.language||navigator.userLanguage}function Qe(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}function Ze(){try{return(new Date).getTimezoneOffset()}catch(e){return}}function er(r,n){if(!a)return{};var t,i,u,l=r?ke([],Ve,n||[]):[],[c,f]=function(e){for(var r=0;r<_e.length;r++){var[n,t]=_e[r],i=n.exec(e),o=i&&("function"==typeof t?t(i,e):t);if(o)return o}return["",""]}(a);return Me(Pe({$os:c,$os_version:f,$browser:ge(a,navigator.vendor),$device:be(a),$device_type:(i=a,u=be(i),u===A||u===P||"Kobo"===u||"Kindle Fire"===u||u===ae?k:u===q||u===J||u===Y||u===te?"Console":u===B?"Wearable":u?R:"Desktop"),$timezone:Qe(),$timezone_offset:Ze()}),{$current_url:Be(null==o?void 0:o.href,l,Xe),$host:null==o?void 0:o.host,$pathname:null==o?void 0:o.pathname,$raw_user_agent:a.length>1e3?a.substring(0,997)+"...":a,$browser_version:me(a,navigator.vendor),$browser_language:Je(),$browser_language_prefix:(t=Je(),"string"==typeof t?t.split("-")[0]:void 0),$screen_height:null==e?void 0:e.screen.height,$screen_width:null==e?void 0:e.screen.width,$viewport_height:null==e?void 0:e.innerHeight,$viewport_width:null==e?void 0:e.innerWidth,$lib:"web",$lib_version:s.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}function rr(e,r){return[...e||[],...p(r)?r:[r]]}function nr(e,r){return(m(e)?1:e)*r}function tr(e,r){return function(e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n),r|=0;return Math.abs(r)}(e)%100<y(100*r,0,100,ye)}var ir=["type"];function or(e){var{type:r,executionTimeMs:n}=e;return""+r+(_(n)?"":" ("+n.toFixed(2)+"ms)")}var ar=Ee("[PostHog Action RateLimiting]");function ur(e,r){console.log(e,r)}function sr(e,r,n){if(void 0===n&&(n=5),"object"!=typeof e||"object"!=typeof r)return{};if(e===r)return{};if(!e&&r)return r;if(!r||!e)return{};var t={},i=new Set([...Object.keys(e),...Object.keys(r)]);for(var o of i){var a=e[o],u=r[o];if(m(a))t[o]=u;else if(m(u))t[o]=a;else if(!(a===u||_(a)&&_(u)))if(g(a)&&g(u))if(n>1){var s=sr(a,u,n-1);w(s)||(t[o]=s)}else t[o]="max depth reached, checking for changed value";else t[o]=u}return t}var lr,cr,fr,dr=(lr=null,cr=0,fr=null,{info:e=>{fr!==e&&(cr=0,fr=e),cr++,lr&&clearTimeout(lr),lr=setTimeout((()=>{var r=cr;1===r?ar.info('action "'+e+'" has been rate limited'):ar.info('action "'+e+'" has been rate limited ('+r+" times)"),cr=0,lr=null}),1e3)}});function vr(e){void 0===e&&(e={});var{maskAction:r,maskState:n,titleFunction:t=or,logger:i=ur,include:o={prevState:!0,nextState:!1,changedState:!0},rateLimiterRefillRate:a=1,rateLimiterBucketSize:u=10,__stateComparisonDepth:s}=e,l=new E({refillRate:a,bucketSize:u,refillInterval:1e3,u:ar});return e=>a=>u=>{var c=u,f=e.getState(),d=performance.now(),v=a(c),h=performance.now()-d,p=e.getState(),g=r?r(c):c;if(!g)return v;if(l.consumeRateLimit(c.type))dr.info(c.type);else try{var w=n?n(f,g):f,m=n?n(p,g):p,_=o.changedState?sr(w,m,null!=s?s:5):void 0,{type:b}=g,x={type:b,payload:function(e,r){if(null==e)return{};var n={};for(var t in e)if({}.hasOwnProperty.call(e,t)){if(-1!==r.indexOf(t))continue;n[t]=e[t]}return n}(g,ir),timestamp:Date.now(),executionTimeMs:h,prevState:o.prevState?w:void 0,nextState:o.nextState?m:void 0,changedState:o.changedState?_:void 0},y=t(x);i(y,x)}catch(e){ar.error("Error logging state:",e)}return v}}var hr=Object.freeze({__proto__:null,browserConsoleLogger:ur,posthogKeaLogger:function(e){void 0===e&&(e={});var r=vr(e);return{name:"posthog-kea-logger",events:{beforeReduxStore(e){e.middleware.push(r)}}}},posthogReduxLogger:vr,printAndDropEverything:e=>(console.log("Would have sent event:",e),null),sampleByDistinctId:function(e){return r=>r&&tr(r.properties.distinct_id,e)?l({},r,{properties:l({},r.properties,{$sample_type:["sampleByDistinctId"],$sample_threshold:e})}):null},sampleByEvent:function(e,r){return n=>{var t,i,o;return n?c(e,n.event)?100*Math.random()<y(100*r,0,100,ye)?l({},n,{properties:l({},n.properties,{$sample_type:rr(null==(t=n.properties)?void 0:t.$sample_type,"sampleByEvent"),$sample_threshold:nr(null==(i=n.properties)?void 0:i.$sample_threshold,r),$sampled_events:rr(null==(o=n.properties)?void 0:o.$sampled_events,e)})}):null:n:null}},sampleBySessionId:function(e){return r=>r&&tr(r.properties.$session_id,e)?l({},r,{properties:l({},r.properties,{$sample_type:rr(r.properties.$sample_type,"sampleBySessionId"),$sample_threshold:nr(r.properties.$sample_threshold,e)})}):null},sessionRecordingLoggerForPostHogInstance:e=>(r,n)=>{var t;null==e||null==(t=e.sessionRecording)||t.tryAddCustomEvent("app-state",{title:r,stateEvent:n})},setAllPersonProfilePropertiesAsPersonPropertiesForFlags:e=>{var r,n=Me({},er(e.config.mask_personal_data_properties,e.config.custom_personal_data_properties),Ye(e.config.custom_campaign_params,e.config.mask_personal_data_properties,e.config.custom_personal_data_properties),{$referrer:(null==i?void 0:i.referrer)||"$direct",$referring_domain:null!=i&&i.referrer&&(null==(r=Ae(i.referrer))?void 0:r.host)||"$direct"}),t={};Se(n,(function(e,r){(c(Ge,r)||c(He,r))&&(t[r]=e)})),e.setPersonPropertiesForFlags(t)}});u.posthogCustomizations=hr}(); | ||
| //# sourceMappingURL=customizations.full.js.map |
+15
-12
| { | ||
| "name": "posthog-js", | ||
| "version": "1.354.1", | ||
| "version": "1.354.2", | ||
| "description": "Posthog-js allows you to automatically capture usage and send events to PostHog.", | ||
@@ -57,25 +57,28 @@ "repository": "https://github.com/PostHog/posthog-js", | ||
| ".": { | ||
| "types": "./dist/module.d.ts", | ||
| "import": "./dist/module.js", | ||
| "require": "./dist/main.js", | ||
| "types": "./dist/module.d.ts" | ||
| "require": "./dist/main.js" | ||
| }, | ||
| "./slim": { | ||
| "import": "./dist/module.slim.js", | ||
| "types": "./dist/module.slim.d.ts" | ||
| "types": "./dist/module.slim.d.ts", | ||
| "import": "./dist/module.slim.js" | ||
| }, | ||
| "./extensions": { | ||
| "import": "./lib/src/extensions/extension-bundles.js", | ||
| "types": "./lib/src/extensions/extension-bundles.d.ts" | ||
| "types": "./lib/src/extensions/extension-bundles.d.ts", | ||
| "import": "./lib/src/extensions/extension-bundles.js" | ||
| }, | ||
| "./react": { | ||
| "types": "./react/dist/types/index.d.ts", | ||
| "import": "./react/dist/esm/index.js", | ||
| "require": "./react/dist/umd/index.js", | ||
| "types": "./react/dist/types/index.d.ts" | ||
| "require": "./react/dist/umd/index.js" | ||
| }, | ||
| "./react/*": { | ||
| "types": "./react/dist/types/*/index.d.ts", | ||
| "import": "./react/dist/esm/*/index.js", | ||
| "require": "./react/dist/umd/*/index.js", | ||
| "types": "./react/dist/types/*/index.d.ts" | ||
| "require": "./react/dist/umd/*/index.js" | ||
| }, | ||
| "./dist/*": "./dist/*", | ||
| "./dist/*.js": "./dist/*.js", | ||
| "./dist/*": "./dist/*.js", | ||
| "./lib/*.js": "./lib/*.js", | ||
| "./lib/*": "./lib/*.js", | ||
| "./package.json": "./package.json" | ||
@@ -82,0 +85,0 @@ }, |
+17
-14
| { | ||
| "name": "posthog-js", | ||
| "version": "1.354.1", | ||
| "version": "1.354.2", | ||
| "description": "Posthog-js allows you to automatically capture usage and send events to PostHog.", | ||
@@ -21,25 +21,28 @@ "repository": "https://github.com/PostHog/posthog-js", | ||
| ".": { | ||
| "types": "./dist/module.d.ts", | ||
| "import": "./dist/module.js", | ||
| "require": "./dist/main.js", | ||
| "types": "./dist/module.d.ts" | ||
| "require": "./dist/main.js" | ||
| }, | ||
| "./slim": { | ||
| "import": "./dist/module.slim.js", | ||
| "types": "./dist/module.slim.d.ts" | ||
| "types": "./dist/module.slim.d.ts", | ||
| "import": "./dist/module.slim.js" | ||
| }, | ||
| "./extensions": { | ||
| "import": "./lib/src/extensions/extension-bundles.js", | ||
| "types": "./lib/src/extensions/extension-bundles.d.ts" | ||
| "types": "./lib/src/extensions/extension-bundles.d.ts", | ||
| "import": "./lib/src/extensions/extension-bundles.js" | ||
| }, | ||
| "./react": { | ||
| "types": "./react/dist/types/index.d.ts", | ||
| "import": "./react/dist/esm/index.js", | ||
| "require": "./react/dist/umd/index.js", | ||
| "types": "./react/dist/types/index.d.ts" | ||
| "require": "./react/dist/umd/index.js" | ||
| }, | ||
| "./react/*": { | ||
| "types": "./react/dist/types/*/index.d.ts", | ||
| "import": "./react/dist/esm/*/index.js", | ||
| "require": "./react/dist/umd/*/index.js", | ||
| "types": "./react/dist/types/*/index.d.ts" | ||
| "require": "./react/dist/umd/*/index.js" | ||
| }, | ||
| "./dist/*": "./dist/*", | ||
| "./dist/*.js": "./dist/*.js", | ||
| "./dist/*": "./dist/*.js", | ||
| "./lib/*.js": "./lib/*.js", | ||
| "./lib/*": "./lib/*.js", | ||
| "./package.json": "./package.json" | ||
@@ -59,4 +62,4 @@ }, | ||
| "@opentelemetry/sdk-logs": "^0.208.0", | ||
| "@posthog/types": "1.354.1", | ||
| "@posthog/core": "1.23.1" | ||
| "@posthog/core": "1.23.1", | ||
| "@posthog/types": "1.354.2" | ||
| }, | ||
@@ -63,0 +66,0 @@ "devDependencies": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
33978269
0+ Added
- Removed
Updated