1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[888],{6729:function(e){"use strict";var t=Object.prototype.hasOwnProperty,i="~";function r(){}function n(e,t,i){this.fn=e,this.context=t,this.once=i||!1}function s(e,t,r,s,o){if("function"!==typeof r)throw new TypeError("The listener must be a function");var a=new n(r,s||e,o),l=i?i+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],a]:e._events[l].push(a):(e._events[l]=a,e._eventsCount++),e}function o(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(i=!1)),a.prototype.eventNames=function(){var e,r,n=[];if(0===this._eventsCount)return n;for(r in e=this._events)t.call(e,r)&&n.push(i?r.slice(1):r);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},a.prototype.listeners=function(e){var t=i?i+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,s=r.length,o=new Array(s);n<s;n++)o[n]=r[n].fn;return o},a.prototype.listenerCount=function(e){var t=i?i+e:e,r=this._events[t];return r?r.fn?1:r.length:0},a.prototype.emit=function(e,t,r,n,s,o){var a=i?i+e:e;if(!this._events[a])return!1;var l,c,u=this._events[a],h=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),h){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,n),!0;case 5:return u.fn.call(u.context,t,r,n,s),!0;case 6:return u.fn.call(u.context,t,r,n,s,o),!0}for(c=1,l=new Array(h-1);c<h;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var d,p=u.length;for(c=0;c<p;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),h){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,r);break;case 4:u[c].fn.call(u[c].context,t,r,n);break;default:if(!l)for(d=1,l=new Array(h-1);d<h;d++)l[d-1]=arguments[d];u[c].fn.apply(u[c].context,l)}}return!0},a.prototype.on=function(e,t,i){return s(this,e,t,i,!1)},a.prototype.once=function(e,t,i){return s(this,e,t,i,!0)},a.prototype.removeListener=function(e,t,r,n){var s=i?i+e:e;if(!this._events[s])return this;if(!t)return o(this,s),this;var a=this._events[s];if(a.fn)a.fn!==t||n&&!a.once||r&&a.context!==r||o(this,s);else{for(var l=0,c=[],u=a.length;l<u;l++)(a[l].fn!==t||n&&!a[l].once||r&&a[l].context!==r)&&c.push(a[l]);c.length?this._events[s]=1===c.length?c[0]:c:o(this,s)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=i?i+e:e,this._events[t]&&o(this,t)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=i,a.EventEmitter=a,e.exports=a},2734:function(e,t,i){"use strict";var r=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(n,s){function o(e){try{l(r.next(e))}catch(t){s(t)}}function a(e){try{l(r.throw(e))}catch(t){s(t)}}function l(e){e.done?n(e.value):new i((function(t){t(e.value)})).then(o,a)}l((r=r.apply(e,t||[])).next())}))},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=n(i(3931));function o(e,t="maxAge"){let i,n,o;const a=()=>r(this,void 0,void 0,(function*(){if(void 0!==i)return;const a=a=>r(this,void 0,void 0,(function*(){o=s.default();const r=a[1][t]-Date.now();return r<=0?(e.delete(a[0]),void o.resolve()):(i=a[0],n=setTimeout((()=>{e.delete(a[0]),o&&o.resolve()}),r),"function"===typeof n.unref&&n.unref(),o.promise)}));try{for(const t of e)yield a(t)}catch(l){}i=void 0})),l=e.set.bind(e);return e.set=(t,r)=>{e.has(t)&&e.delete(t);const s=l(t,r);return i&&i===t&&(i=void 0,void 0!==n&&(clearTimeout(n),n=void 0),void 0!==o&&(o.reject(void 0),o=void 0)),a(),s},a(),e}t.default=o,e.exports=o,e.exports.default=o},3454:function(e,t,i){"use strict";var r,n;e.exports=(null==(r=i.g.process)?void 0:r.env)&&"object"===typeof(null==(n=i.g.process)?void 0:n.env)?i.g.process:i(7663)},6840:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return i(8798)}])},90:function(e,t,i){"use strict";i.d(t,{hi:function(){return G},v:function(){return m},yN:function(){return C},Wx:function(){return R},SH:function(){return O},WL:function(){return b},GH:function(){return V},gr:function(){return z},WJ:function(){return $},bW:function(){return x},ho:function(){return W},IT:function(){return F},CR:function(){return T},JN:function(){return g},r8:function(){return _},eF:function(){return D},sk:function(){return H},kG:function(){return S},BP:function(){return E},tg:function(){return M},wW:function(){return A},NN:function(){return P},kX:function(){return X},px:function(){return Y},km:function(){return w},ZB:function(){return k},mo:function(){return I}});var r,n=i(4924),s=i(6042),o=i(9396),a=i(4269),l={rootNotionPageId:"6246082f40144d0698ab59e9840b298a",rootNotionSpaceId:null,name:"Jang. Inspiration",domain:"jang-inspiration.com",author:"Jang Yeong",description:"\uc7a5\uc601\uc758 \uc601\uac10\ub178\ud2b8",github:"longshiine",linkedin:"jangyeong-kim-b7924422a",instagram:"jang.inspiration",defaultPageIcon:null,defaultPageCover:null,defaultPageCoverPosition:.5,isPreviewImageSupportEnabled:!0,isRedisEnabled:!0,pageUrlOverrides:null,navigationStyle:"custom",n
1avigationLinks:[{title:"About",pageId:"3d335e41f00a45df843234a266c7566a"}]},c=i(3454);if(!l)throw new Error("Config error: invalid site.config.ts");try{c.env.NEXT_PUBLIC_SITE_CONFIG&&(r=JSON.parse(c.env.NEXT_PUBLIC_SITE_CONFIG))}catch(Z){throw console.error('Invalid config "NEXT_PUBLIC_SITE_CONFIG" failed to parse'),Z}var u=(0,s.Z)({},l,r);function h(e,t){var i=u[e];if(void 0!==i)return i;if(void 0!==t)return t;throw new Error('Config error: missing required site config value "'.concat(e,'"'))}function d(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c.env,r=i[e];if(void 0!==r)return r;if(void 0!==t)return t;throw new Error('Config error: missing required env variable "'.concat(e,'"'))}var p=i(3454),v=(0,a.q5)(h("rootNotionPageId"),{uuid:!1});if(!v)throw new Error('Config error invalid "rootNotionPageId"');(0,a.q5)(h("rootNotionSpaceId",null),{uuid:!0});var f=J(h("pageUrlOverrides",{})||{},{label:"pageUrlOverrides"}),g=(J(h("pageUrlAdditions",{})||{},{label:"pageUrlAdditions"}),function(e){return Object.keys(e).reduce((function(t,i){var r=e[i];return(0,o.Z)((0,s.Z)({},t),(0,n.Z)({},r,i))}),{})}(f)),_=!1,m=(h("name"),h("author")),y=h("domain"),b=h("description","Notion Blog"),w=(h("language","en"),h("twitter",null)),E=h("mastodon",null),x=h("github",null),k=h("youtube",null),S=h("linkedin",null),P=h("newsletter",null),I=h("zhihu",null),T=h("instagram",null),$=function(){if(!E)return null;var e=new URL(E);return"".concat(e.pathname.slice(1),"@").concat(e.hostname)},O=h("defaultPageIcon",null),C=h("defaultPageCover",null),R=h("defaultPageCoverPosition",.5),F=(h("isPreviewImageSupportEnabled",!1),h("includeNotionIdInUrls",!!_)),A=h("navigationStyle","default"),M=h("navigationLinks",null),D=h("isSearchEnabled",!0),L=d("REDIS_HOST",d("NEXT_PUBLIC_REDIS_HOST",null)),N=d("REDIS_PASSWORD",d("NEXT_PUBLIC_REDIS_PASSWORD",null)),j=d("REDIS_USER",d("NEXT_PUBLIC_REDIS_USER","default")),U=d("REDIS_URL",d("NEXT_PUBLIC_REDIS_URL",L&&N?"redis://".concat(encodeURIComponent(j),":").concat(encodeURIComponent(N),"@").concat(L,":12094"):null)),H=(d("REDIS_NAMESPACE",d("NEXT_PUBLIC_REDIS_NAMESPACE","preview-images")),(h("isRedisEnabled",!1)||"true"===d("REDIS_ENABLED",null))&&Boolean(U),!1),q=d("PORT","3000"),W=_?"http://localhost:".concat(q):"https://".concat(y),B=(_||"https://".concat(p.env.VERCEL_URL||y),"/api"),G={searchNotion:"".concat(B,"/search-notion"),getNotionPageInfo:"".concat(B,"/notion-page-info"),getSocialImage:"".concat(B,"/social-image")},z=_?null:p.env.NEXT_PUBLIC_FATHOM_ID,V=z?{excludedDomains:["localhost","localhost:3000"]}:void 0,Y="phc_gwxlxENAeNJ8H0tw22lzj97Cpa7WvOHARDyd45jKHeD",X={api_host:"https://app.posthog.com"};function J(e,t){var i=t.label;return Object.keys(e).reduce((function(t,r){var l=e[r],c=(0,a.q5)(l,{uuid:!1});if(!c)throw new Error("Invalid ".concat(i,' page id "').concat(l,'"'));if(!r)throw new Error("Missing ".concat(i,' value for page "').concat(l,'"'));if(!r.startsWith("/"))throw new Error("Invalid ".concat(i,' value for page "').concat(l,'": value "').concat(r,'" should be a relative URI that starts with "/"'));var u=r.slice(1);return(0,o.Z)((0,s.Z)({},t),(0,n.Z)({},u,c))}),{})}},8798:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return Ho}});var r=i(6042),n=i(5893),s=i(7294),o=i(1163),a=i(4298),l=i.n(a),c=e=>{window.__fathomClientQueue=window.__fathomClientQueue||[],window.__fathomClientQueue.push(e)},u=()=>{window.__fathomIsLoading=!1,window.__fathomClientQueue=window.__fathomClientQueue||[],window.__fathomClientQueue.forEach((e=>{switch(e.type){case"trackPageview":return void d(e.opts);case"trackGoal":return void p(e.code,e.cents);case"trackEvent":return void v(e.eventName,e.opts);case"enableTrackingForMe":return void g();case"blockTrackingForMe":return void f();case"setSite":return void _(e.id)}})),window.__fathomClientQueue=[]},h=e=>{const t=/(https?)(?=:|\/|$)/;e.forEach((e=>{null!==t.exec(e)&&console.warn(`The include domain ${e} might fail to work as intended as it begins with a transfer protocol (http://, https://). Consider removing the protocol portion of the string.`)}))},d=e=>{window.fathom?e?window.fathom.trackPageview(e):window.fathom.trackPageview():c({type:"trackPageview",o
vendor: 21,156 bytes, line 1
1pts:e})},p=(e,t)=>{window.fathom?window.fathom.trackGoal(e,t):c({type:"trackGoal",code:e,cents:t})},v=(e,t)=>{window.fathom?window.fathom.trackEvent(e,t):c({type:"trackEvent",eventName:e,opts:t})},f=()=>{window.fathom?window.fathom.blockTrackingForMe():c({type:"blockTrackingForMe"})},g=()=>{window.fathom?window.fathom.enableTrackingForMe():c({type:"enableTrackingForMe"})},_=e=>{window.fathom?window.fathom.setSite(e):c({type:"setSite",id:e})},m=(i(7604),"undefined"!=typeof window?window:void 0),y="undefined"!=typeof globalThis?globalThis:m;"undefined"==typeof self&&(y.self=y),"undefined"==typeof File&&(y.File=function(){});var b=Array.prototype,w=b.forEach,E=b.indexOf,x=null==y?void 0:y.navigator,k=null==y?void 0:y.document,S=null==y?void 0:y.location,P=null==y?void 0:y.fetch,I=null!=y&&y.XMLHttpRequest&&"withCredentials"in new y.XMLHttpRequest?y.XMLHttpRequest:void 0,T=null==y?void 0:y.AbortController,$=null==x?void 0:x.userAgent,O=null!=m?m:{},C={DEBUG:!1,LIB_VERSION:"1.310.1"};function R(e,t,i,r,n,s,o){try{var a=e[s](o),l=a.value}catch(e){return void i(e)}a.done?t(l):Promise.resolve(l).then(r,n)}function F(e){return function(){var t=this,i=arguments;return new Promise((function(r,n){var s=e.apply(t,i);function o(e){R(s,r,n,o,a,"next",e)}function a(e){R(s,r,n,o,a,"throw",e)}o(void 0)}))}}function A(){return A=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)({}).hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},A.apply(null,arguments)}function M(e,t){if(null==e)return{};var i={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;i[r]=e[r]}return i}var D=["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"],L=function(e,t){if(void 0===t&&(t=[]),!e)return!1;var i=e.toLowerCase();return D.concat(t).some((e=>{var t=e.toLowerCase();return-1!==i.indexOf(t)}))},N=["$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 j(e,t){return-1!==e.indexOf(t)}var U=function(e){return e.trim()},H=function(e){return e.replace(/^\$/,"")},q=Array.isArray,W=Object.prototype,B=W.hasOwnProperty,G=W.toString,z=q||function(e){return"[object Array]"===G.call(e)},V=e=>"function"==typeof e,Y=e=>e===Object(e)&&!z(e),X=e=>{if(Y(e)){for(var t in e)if(B.call(e,t))return!1;return!0}return!1},J=e=>void 0===e,Z=e=>"[object String]"==G.call(e),K=e=>Z(e)&&0===e.trim().length,Q=e=>null===e,ee=e=>J(e)||Q(e),te=e=>"[object Number]"==G.call(e),ie=e=>"[object Boolean]"===G.call(e),re=e=>j(N,e);function ne(e){return null===e||"object"!=typeof e}function se(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function oe(e){return!J(Event)&&function(e,t){try{return e instanceof t}catch(e){return!1}}(e,Event)}var ae=[!0,"true",1,"1","yes"],le=e=>j(ae,e),ce=[!1,"false",0,"0","no"];function ue(e,t,i,r,n){return t>i&&(r.warn("min cannot be greater than max."),t=i),te(e)?e>i?(r.warn(" cannot be greater than max: "+i+". Using max value instead."),i):e<t?(r.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(r.warn(" must be a number. using max or fallback. max: "+i+", fallback: "+n),ue(n||i,t,i,r))}class he{constructor(e){this.t={},this.i=e.i,this.o=ue(e.bucketSize,0,100,e.h),this.m=ue(e.refillRate,0,this.o,e.h),this.$=ue(e.refillInterval,0,864e5,e.h)}S(e,t){var i=t-e.lastAccess,r=Math.floor(i/this.$);if(r>0){var n=r*this.m;e.tokens=Math.min(e.tokens+n,this.o),e.lastAccess=e.lastAccess+r*this.$}}consumeRateLimit(e){var t,i=Date.now(),r=String(e),n=this.t[r];return n?this.S(n,i):(n={tokens:this.o,lastAccess:i},this.t[r]=n),0===n.tokens||(n.tokens--,0===n.tokens&&(null==(t=this.i)||t.call(this,e)),0===n.tokens)}stop(){this.t={}}}var de,pe,ve,fe="Mobile",ge="iOS",_e="Android",me="Tablet",ye=_e+" "+me,be="iPad",we="Apple",Ee=we+" Watch",xe="Safari",ke="BlackBerry",Se="Samsung",Pe=Se+"Browser",Ie=Se+" Internet",Te="Chrome",$e=Te+" "+ge,Oe="Internet Explorer",Ce=Oe+" "+fe,Re="Opera",Fe="Edge",Ae="Microsoft "+Fe,Me="Firefox",De=Me+" "+ge,Le="Nintendo",Ne="PlayStation",je="Xbox",Ue=_e+" "+fe,He=fe+" "+xe,qe="Windows",We=qe+" Phone",Be="Nokia",Ge="Ouya",ze="Generic",Ve=ze+" "+fe.toLowerCase(),Ye=ze+" "+me.toLowerCase(),Xe="Konqueror",Je="(\\d+(\\.\\d+)?)",Ze=new RegExp("Version/"+Je),Ke=new RegExp(je,"i"),Qe=new RegExp(Ne+" \\w+","i"),et=new RegExp(Le+" \\w+","i"),tt=new RegExp(ke+"|PlayBook|BB10","i"),it={"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"},rt=function(e,t){return t=t||"",j(e," OPR/")&&j(e,"Mini")?"Opera Mini":j(e," OPR/")?Re:tt.test(e)?ke:j(e,"IE"+fe)||j(e,"WPDesktop")?Ce:j(e,Pe)?Ie:j(e,Fe)||j(e,"Edg/")?Ae:j(e,"FBIOS")?"Facebook "+fe:j(e,"UCWEB")||j(e,"UCBrowser")?"UC Browser":j(e,"CriOS")?$e:j(e,"CrMo")||j(e,Te)?Te:j(e,_e)&&j(e,xe)?Ue:j(e,"FxiOS")?De:j(e.toLowerCase(),Xe.toLowerCase())?Xe:((e,t)=>t&&j(t,we)||function(e){return j(e,xe)&&!j(e,Te)&&!j(e,_e)}(e))(e,t)?j(e,fe)?He:xe:j(e,Me)?Me:j(e,"MSIE")||j(e,"Trident/")?Oe:j(e,"Gecko")?Me:""},nt={[Ce]:[new RegExp("rv:"+Je)],[Ae]:[new RegExp(Fe+"?\\/"+Je)],[Te]:[new RegExp("(Chrome|CrMo)\\/"+Je)],[$e]:[new RegExp("CriOS\\/"+Je)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Je)],[xe]:[Ze],[He]:[Ze],[Re]:[new RegExp("(Opera|OPR)\\/"+Je)],[Me]:[new RegExp(Me+"\\/"+Je)],[De]:[new RegExp("FxiOS\\/"+Je)],[Xe]:[new RegExp("Konqueror[:/]?"+Je,"i")],[ke]:[new RegExp(ke+" "+Je),Ze],[Ue]:[new RegExp("android\\s"+Je,"i")],[Ie]:[new RegExp(Pe+"\\/"+Je)],[Oe]:[new RegExp("(rv:|MSIE )"+Je)],Mozilla:[new RegExp("rv:"+Je)]},st=function(e,t){var i=rt(e,t),r=nt[i];if(J(r))return null;for(var n=0;n<r.length;n++){var s=r[n],o=e.match(s);if(o)return parseFloat(o[o.length-2])}return null},ot=[[new RegExp("Xbox; Xbox (.*?)[);]","i"),e=>[je,e&&e[1]||""]],[new RegExp(Le,"i"),[Le,""]],[new RegExp(Ne,"i"),[Ne,""]],[tt,[ke,""]],[new RegExp(qe,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[We,""];if(new RegExp(fe).test(t)&&!/IEMobile\b/.test(t))return[qe+" "+fe,""];var i=/Windows NT ([0-9.]+)/i.exec(t);if(i&&i[1]){var r=i[1],n=it[r]||"";return/arm/i.test(t)&&(n="RT"),[qe,n]}return[qe,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){var t=[e[3],e[4],e[5]||"0"];return[ge,t.join(".")]}return[ge,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=J(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+_e+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+_e+")","i"),e=>{if(e&&e[2]){var t=[e[2],e[3],e[4]||"0"];return[_e,t.join(".")]}return[_e,""]}],[/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/,["Chrome OS",""]],[/Linux|debian/i,["Linux",""]]],at=function(e){return et.test(e)?Le:Qe.test(e)?Ne:Ke.test(e)?je:new RegExp(Ge,"i").test(e)?Ge:new RegExp("("+We+"|WPDesktop)","i").test(e)?We:/iPad/.test(e)?be:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?Ee:tt.test(e)?ke:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(Be,"i").test(e)?Be:/(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(fe).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)?_e:ye:new RegExp("(pda|"+fe+")","i").test(e)?Ve:new RegExp(me,"i").test(e)&&!new RegExp(me+" pc","i").test(e)?Ye:""},lt=e=>e instanceof Error;function ct(e){var t=globalThis._posthogChunkIds;if(t){var i=Object.keys(t);return ve&&i.length===pe||(pe=i.length,ve=i.reduce(((i,r)=>{de||(de={});var n=de[r];if(n)i[n[0]]=n[1];else for(var s=e(r),o=s.length-1;o>=0;o--){var a=s[o],l=null==a?void 0:a.filename,c=t[r];if(l&&c){i[l]=c,de[r]=[l,c];break}}return i}),{})),ve}}class ut{constructor(e,t,i){void 0===i&&(i=[]),this.coercers=e,this.stackParser=t,this.modifiers=i}buildFromUnknown(e,t){void 0===t&&(t={});var i=t&&t.mechanism||{handled:!0,type:"generic"},r=this.buildCoercingContext(i,t,0).apply(e),n=this.buildParsingContext(),s=this.parseStacktrace(r,n);return{$exception_list:this.convertToExceptionList(s,i),$exception_level:"error"}}modifyFrames(e){var t=this;return F((function*(){for(var i of e)i.stacktrace&&i.stacktrace.frames&&z(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,r;return null!=e.cause&&(i=this.parseStacktrace(e.cause,t)),""!=e.stack&&null!=e.stack&&(r=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?1:0),t.chunkIdMap)),A({},e,{cause:i,stack:r})}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 F((function*(){var i=e;for(var r of t.modifiers)i=yield r(i);return i}))()}convertToExceptionList(e,t){var i,r,n,s={type:e.type,value:e.value,mechanism:{type:null!==(i=t.type)&&void 0!==i?i:"generic",handled:null===(r=t.handled)||void 0===r||r,synthetic:null!==(n=e.synthetic)&&void 0!==n&&n}};e.stack&&(s.stacktrace={type:"raw",frames:e.stack});var o=[s];return null!=e.cause&&o.push(...this.convertToExceptionList(e.cause,A({},t,{handled:!0}))),o}buildParsingContext(){return{chunkIdMap:ct(this.stackParser)}}buildCoercingContext(e,t,i){void 0===i&&(i=0);var r=(i,r)=>{if(r<=4){var n=this.buildCoercingContext(e,t,r);return this.applyCoercers(i,n)}};return A({},t,{syntheticException:0==i?t.syntheticException:void 0,mechanism:e,apply:e=>r(e,i),next:e=>r(e,i+1)})}}var ht="?";function dt(e,t,i,r,n){var s={platform:e,filename:t,function:"<anonymous>"===i?ht:i,in_app:!0};return J(r)||(s.lineno=r),J(n)||(s.colno=n),s}var pt=(e,t)=>{var i=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return i||r?[-1!==e.indexOf("@")?e.split("@")[0]:ht,i?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},vt=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,ft=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,gt=/\((\S*)(?::(\d+))(?::(\d+))\)/,_t=(e,t)=>{var i=vt.exec(e);if(i){var[,r,n,s]=i;return dt(t,r,ht,+n,+s)}var o=ft.exec(e);if(o){if(o[2]&&0===o[2].indexOf("eval")){var a=gt.exec(o[2]);a&&(o[2]=a[1],o[3]=a[2],o[4]=a[3])}var[l,c]=pt(o[1]||ht,o[2]);return dt(t,c,l,o[3]?+o[3]:void 0,o[4]?+o[4]:void 0)}},mt=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,yt=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,bt=(e,t)=>{var i=mt.exec(e);if(i){if(i[3]&&i[3].indexOf(" > eval")>-1){var r=yt.exec(i[3]);r&&(i[1]=i[1]||"eval",i[3]=r[1],i[4]=r[2],i[5]="")}var n=i[3],s=i[1]||ht;return[s,n]=pt(s,n),dt(t,n,s,i[4]?+i[4]:void 0,i[5]?+i[5]:void 0)}},wt=/\(error: (.*)\)/;class Et{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var i=Z(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 se(e,"DOMException")}isDOMError(e){return se(e,"DOMError")}}class xt{match(e){return(e=>e instanceof Error)(e)}coerce(e,t){return{type:this.getType(e),value:this.getMessage(e,t),stack:this.getStack(e),cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,t){var 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 kt{constructor(){}match(e){return se(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 St=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class Pt{match(e){return"string"==typeof e}coerce(e,t){var i,[r,n]=this.getInfos(e);return{type:null!=r?r:"Error",value:null!=n?n:e,stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}getInfos(e){var t="Error",i=e,r=e.match(St);return r&&(t=r[1],i=r[2]),[t,i]}}var It=["fatal","error","warning","log","info","debug"];function Tt(e,t){void 0===t&&(t=40);var i=Object.keys(e);if(i.sort(),!i.length)return"[object has no keys]";for(var r=i.length;r>0;r--){var n=i.slice(0,r).join(", ");if(!(n.length>t))return r===i.length||n.length<=t?n:n.slice(0,t)+"..."}return""}class $t{match(e){return"object"==typeof e&&null!==e}coerce(e,t){var i,r=this.getErrorPropertyFromObject(e);return r?t.apply(r):{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 oe(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: "+Tt(e)}isSeverityLevel(e){return Z(e)&&!K(e)&&It.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var i=e[t];if(lt(i))return i}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}}}class Ot{match(e){return oe(e)}coerce(e,t){var i,r=e.constructor.name;return{type:r,value:r+" captured as exception with keys: "+Tt(e),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}class Ct{match(e){return ne(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 Rt{match(e){return se(e,"PromiseRejectionEvent")}coerce(e,t){var i,r=this.getUnhandledRejectionReason(e);return ne(r)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(r),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}:t.apply(r)}getUnhandledRejectionReason(e){if(ne(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 Ft=function(e,t){var{debugEnabled:i}=void 0===t?{}:t,r={k:function(t){if(m&&(C.DEBUG||O.POSTHOG_DEBUG||i)&&!J(m.console)&&m.console){for(var r=("__rrweb_original__"in m.console[t]?m.console[t].__rrweb_original__:m.console[t]),n=arguments.length,s=new Array(n>1?n-1:0),o=1;o<n;o++)s[o-1]=arguments[o];r(e,...s)}},info:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];r.k("log",...t)},warn:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];r.k("warn",...t)},error:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];r.k("error",...t)},critical:function(){for(var t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];console.error(e,...i)},uninitializedWarning:e=>{r.error("You must initialize PostHog before calling "+e)},createLogger:(t,i)=>Ft(e+" "+t,i)};return r},At=Ft("[PostHog.js]"),Mt=At.createLogger,Dt=Mt("[ExternalScriptsLoader]"),Lt=(e,t,i)=>{if(e.config.disable_external_dependency_loading)return Dt.warn(t+" was requested but loading of external scripts is disabled."),i("Loading of external scripts is disabled");var r=null==k?void 0:k.querySelectorAll("script");if(r)for(var n,s=function(){if(r[o].src===t){var e=r[o];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})}},o=0;o<r.length;o++)if(n=s())return n.v;var a=()=>{if(!k)return i("document not found");var r=k.createElement("script");if(r.type="text/javascript",r.crossOrigin="anonymous",r.src=t,r.onload=e=>{r.__posthog_loading_callback_fired=!0,i(void 0,e)},r.onerror=e=>i(e),e.config.prepare_external_dependency_script&&(r=e.config.prepare_external_dependency_script(r)),!r)return i("prepare_external_dependency_script returned null");var n,s=k.querySelectorAll("body > script");s.length>0?null==(n=s[0].parentNode)||n.insertBefore(r,s[0]):k.body.appendChild(r)};null!=k&&k.body?a():null==k||k.addEventListener("DOMContentLoaded",a)};O.__PosthogExtensions__=O.__PosthogExtensions__||{},O.__PosthogExtensions__.loadExternalDependency=(e,t,i)=>{var r="/static/"+t+".js?v="+e.version;if("remote-config"===t&&(r="/array/"+e.config.token+"/config.js"),"toolbar"===t){var n=3e5;r=r+"&t="+Math.floor(Date.now()/n)*n}var s=e.requestRouter.endpointFor("assets",r);Lt(e,s,i)},O.__PosthogExtensions__.loadSiteApp=(e,t,i)=>{var r=e.requestRouter.endpointFor("api",t);Lt(e,r,i)};var Nt={};function jt(e,t,i){if(z(e))if(w&&e.forEach===w)e.forEach(t,i);else if("length"in e&&e.length===+e.length)for(var r=0,n=e.length;r<n;r++)if(r in e&&t.call(i,e[r],r)===Nt)return}function Ut(e,t,i){if(!ee(e)){if(z(e))return jt(e,t,i);if((e=>e instanceof FormData)(e)){for(var r of e.entries())if(t.call(i,r[1],r[0])===Nt)return}else for(var n in e)if(B.call(e,n)&&t.call(i,e[n],n)===Nt)return}}var Ht=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];return jt(i,(function(t){for(var i in t)void 0!==t[i]&&(e[i]=t[i])})),e},qt=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];return jt(i,(function(t){jt(t,(function(t){e.push(t)}))})),e};function Wt(e){for(var t=Object.keys(e),i=t.length,r=new Array(i);i--;)r[i]=[t[i],e[t[i]]];return r}var Bt=function(e){try{return e()}catch(e){return}},Gt=function(e){return function(){try{for(var t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];return e.apply(this,i)}catch(e){At.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),At.critical(e)}}},zt=function(e){var t={};return Ut(e,(function(e,i){(Z(e)&&e.length>0||te(e))&&(t[i]=e)})),t};var Vt=["herokuapp.com","vercel.app","netlify.app"];function Yt(e){var t=null==e?void 0:e.hostname;if(!Z(t))return!1;var i=t.split(".").slice(-2).join(".");for(var r of Vt)if(i===r)return!1;return!0}function Xt(e,t){for(var i=0;i<e.length;i++)if(t(e[i]))return e[i]}function Jt(e,t,i,r){var{capture:n=!1,passive:s=!0}=null!=r?r:{};null==e||e.addEventListener(t,i,{capture:n,passive:s})}var Zt="$people_distinct_id",Kt="__alias",Qt="__timers",ei="$autocapture_disabled_server_side",ti="$heatmaps_enabled_server_side",ii="$exception_capture_enabled_server_side",ri="$error_tracking_suppression_rules",ni="$error_tracking_capture_extension_exceptions",si="$web_vitals_enabled_server_side",oi="$dead_clicks_enabled_server_side",ai="$product_tours_enabled_server_side",li="$web_vitals_allowed_metrics",ci="$session_recording_remote_config",ui="$sesid",hi="$session_is_sampled",di="$enabled_feature_flags",pi="$early_access_features",vi="$feature_flag_details",fi="$stored_person_properties",gi="$stored_group_properties",_i="$surveys",mi="$flag_call_reported",yi="$user_state",bi="$client_session_props",wi="$capture_rate_limit",Ei="$initial_campaign_params",xi="$initial_referrer_info",ki="$initial_person_info",Si="$epp",Pi="__POSTHOG_TOOLBAR__",Ii="$posthog_cookieless",Ti=[Zt,Kt,"__cmpns",Qt,"$session_recording_enabled_server_side",ti,ui,di,r
1i,yi,pi,vi,gi,fi,_i,mi,bi,wi,Ei,xi,Si,ki,"$conversations_widget_session_id","$conversations_ticket_id","$conversations_widget_state","$conversations_user_traits"];function $i(e){return e instanceof Element&&(e.id===Pi||!(null==e.closest||!e.closest(".toolbar-global-fade-container")))}function Oi(e){return!!e&&1===e.nodeType}function Ci(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function Ri(e){return!!e&&3===e.nodeType}function Fi(e){return!!e&&11===e.nodeType}function Ai(e){return e?U(e).split(/\s+/):[]}function Mi(e){var t=null==m?void 0:m.location.href;return!!(t&&e&&e.some((e=>t.match(e))))}function Di(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 Ai(t)}function Li(e){return ee(e)?null:U(e).split(/(\s+)/).filter((e=>tr(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function Ni(e){var t="";return Vi(e)&&!Yi(e)&&e.childNodes&&e.childNodes.length&&Ut(e.childNodes,(function(e){var i;Ri(e)&&e.textContent&&(t+=null!==(i=Li(e.textContent))&&void 0!==i?i:"")})),U(t)}function ji(e){return J(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}var Ui=["a","button","form","input","select","textarea","label"];function Hi(e,t){if(J(t))return!0;var i,r=function(e){if(t.some((t=>e.matches(t))))return{v:!0}};for(var n of e)if(i=r(n))return i.v;return!1}function qi(e){var t=e.parentNode;return!(!t||!Oi(t))&&t}var Wi=["next","previous","prev",">","<"],Bi=[".ph-no-rageclick",".ph-no-capture"];var Gi=e=>!e||Ci(e,"html")||!Oi(e),zi=(e,t)=>{if(!m||Gi(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var i=!1,r=[e],n=e;n.parentNode&&!Ci(n,"body");)if(Fi(n.parentNode))r.push(n.parentNode.host),n=n.parentNode.host;else{var s=qi(n);if(!s)break;if(t||Ui.indexOf(s.tagName.toLowerCase())>-1)i=!0;else{var o=m.getComputedStyle(s);o&&"pointer"===o.getPropertyValue("cursor")&&(i=!0)}r.push(s),n=s}return{parentIsUsefulElement:i,targetElementList:r}};function Vi(e){for(var t=e;t.parentNode&&!Ci(t,"body");t=t.parentNode){var i=Di(t);if(j(i,"ph-sensitive")||j(i,"ph-no-capture"))return!1}if(j(Di(e),"ph-include"))return!0;var r=e.type||"";if(Z(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var n=e.name||e.id||"";return!Z(n)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(n.replace(/[^a-zA-Z0-9]/g,""))}function Yi(e){return!!(Ci(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||Ci(e,"select")||Ci(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var Xi="(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})",Ji=new RegExp("^(?:"+Xi+")$"),Zi=new RegExp(Xi),Ki="\\d{3}-?\\d{2}-?\\d{4}",Qi=new RegExp("^("+Ki+")$"),er=new RegExp("("+Ki+")");function tr(e,t){if(void 0===t&&(t=!0),ee(e))return!1;if(Z(e)){if(e=U(e),(t?Ji:Zi).test((e||"").replace(/[- ]/g,"")))return!1;if((t?Qi:er).test(e))return!1}return!0}function ir(e){var t=Ni(e);return tr(t=(t+" "+rr(e)).trim())?t:""}function rr(e){var t="";return e&&e.childNodes&&e.childNodes.length&&Ut(e.childNodes,(function(e){var i;if(e&&"span"===(null==(i=e.tagName)?void 0:i.toLowerCase()))try{var r=Ni(e);t=(t+" "+r).trim(),e.childNodes&&e.childNodes.length&&(t=(t+" "+rr(e)).trim())}catch(e){At.error("[AutoCapture]",e)}})),t}function nr(e){return function(e){var t=e.map((e=>{var t,i,r="";if(e.tag_name&&(r+=e.tag_name),e.attr_class)for(var n of(e.attr_class.sort(),e.attr_class))r+="."+n.replace(/"/g,"");var s=A({},e.text?{text:e.text}:{},{"nth-child":null!==(t=e.nth_child)&&void 0!==t?t:0,"nth-of-type":null!==(i=e.nth_of_type)&&void 0!==i?i:0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),o={};return Wt(s).sort(((e,t)=>{var[i]=e,[r]=t;return i.localeCompare(r)})).forEach((e=>{var[t,i]=e;return o[sr(t.toString())]=sr(i.toString())})),(r+=":")+Wt(o).map((e=>{var[t,i]=e;return t+'="'+i+'"'})).join("")}));return t.join(";")}(function(e){return e.map((e=>{var t,i,r={text:null==(t=e.$el_text)?void 0:t.slice(0,400),tag_name:e.tag_name,href:null==(i=e.attr__href)?void 0:i.slice(0,2048),attr_class:or(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return Wt(e).filter((e=>{var[t]=e;return 0===t.indexOf("attr__")}
vendor: 1,892 bytes, line 1
1)).forEach((e=>{var[t,i]=e;return r.attributes[t]=i})),r}))}(e))}function sr(e){return e.replace(/"|\\"/g,'\\"')}function or(e){var t=e.attr__class;return t?z(t)?t:Ai(t):void 0}class ar{constructor(e){this.disabled=!1===e;var t=Y(e)?e:{};this.thresholdPx=t.threshold_px||30,this.timeoutMs=t.timeout_ms||1e3,this.clickCount=t.click_count||3,this.clicks=[]}isRageClick(e,t,i){if(this.disabled)return!1;var r=this.clicks[this.clicks.length-1];if(r&&Math.abs(e-r.x)+Math.abs(t-r.y)<this.thresholdPx&&i-r.timestamp<this.timeoutMs){if(this.clicks.push({x:e,y:t,timestamp:i}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:t,timestamp:i}];return!1}}var lr="$copy_autocapture",cr=function(e){return e.GZipJS="gzip-js",e.Base64="base64",e}({}),ur=e=>{var t=null==k?void 0:k.createElement("a");return J(t)?null:(t.href=e,t)},hr=function(e,t){for(var i,r=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),n=0;n<r.length;n++){var s=r[n].split("=");if(s[0]===t){i=s;break}}if(!z(i)||i.length<2)return"";var o=i[1];try{o=decodeURIComponent(o)}catch(e){At.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},dr=function(e,t,i){if(!e||!t||!t.length)return e;for(var r=e.split("#"),n=r[0]||"",s=r[1],o=n.split("?"),a=o[1],l=o[0],c=(a||"").split("&"),u=[],h=0;h<c.length;h++){var d=c[h].split("=");z(d)&&(t.includes(d[0])?u.push(d[0]+"="+i):u.push(c[h]))}var p=l;return null!=a&&(p+="?"+u.join("&")),null!=s&&(p+="#"+s),p},pr=function(e,t){var i=e.match(new RegExp(t+"=([^&]*)"));return i?i[1]:null},vr=Mt("[AutoCapture]");function fr(e,t){return t.length>e?t.slice(0,e)+"...":t}function gr(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do{t=t.previousSibling}while(t&&!Oi(t));return t}function _r(e,t){for(var i,r,{e:n,maskAllElementAttributes:s,maskAllText:o,elementAttributeIgnoreList:a,elementsC
1hainAsString:l}=t,c=[e],u=e;u.parentNode&&!Ci(u,"body");)Fi(u.parentNode)?(c.push(u.parentNode.host),u=u.parentNode.host):(c.push(u.parentNode),u=u.parentNode);var h,d=[],p={},v=!1,f=!1;if(Ut(c,(e=>{var t=Vi(e);"a"===e.tagName.toLowerCase()&&(v=e.getAttribute("href"),v=t&&v&&tr(v)&&v),j(Di(e),"ph-no-capture")&&(f=!0),d.push(function(e,t,i,r){var n=e.tagName.toLowerCase(),s={tag_name:n};Ui.indexOf(n)>-1&&!i&&("a"===n.toLowerCase()||"button"===n.toLowerCase()?s.$el_text=fr(1024,ir(e)):s.$el_text=fr(1024,Ni(e)));var o=Di(e);o.length>0&&(s.classes=o.filter((function(e){return""!==e}))),Ut(e.attributes,(function(i){var n;if((!Yi(e)||-1!==["name","id","class","aria-label"].indexOf(i.name))&&(null==r||!r.includes(i.name))&&!t&&tr(i.value)&&(n=i.name,!Z(n)||"_ngcontent"!==n.substring(0,10)&&"_nghost"!==n.substring(0,7))){var o=i.value;"class"===i.name&&(o=Ai(o).join(" ")),s["attr__"+i.name]=fr(1024,o)}}));for(var a=1,l=1,c=e;c=gr(c);)a++,c.tagName===e.tagName&&l++;return s.nth_child=a,s.nth_of_type=l,s}(e,s,o,a));var i=function(e){if(!Vi(e))return{};var t={};return Ut(e.attributes,(function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var i=e.name.replace("data-ph-capture-attribute-",""),r=e.value;i&&r&&tr(r)&&(t[i]=r)}})),t}(e);Ht(p,i)})),f)return{props:{},explicitNoCapture:f};if(o||("a"===e.tagName.toLowerCase()||"button"===e.tagName.toLowerCase()?d[0].$el_text=ir(e):d[0].$el_text=Ni(e)),v){var g,_;d[0].attr__href=v;var y=null==(g=ur(v))?void 0:g.host,b=null==m||null==(_=m.location)?void 0:_.host;y&&b&&y!==b&&(h=v)}return{props:Ht({$event_type:n.type,$ce_version:1},l?{}:{$elements:d},{$elements_chain:nr(d)},null!=(i=d[0])&&i.$el_text?{$el_text:null==(r=d[0])?void 0:r.$el_text}:{},h&&"click"===n.type?{$external_click_url:h}:{},p)}}class mr{constructor(e){this.P=!1,this.T=null,this.I=!1,this.instance=e,this.rageclicks=new ar(e.config.rageclick),this.C=null}get R(){var e,t,i=Y(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}F(){if(this.isBrowserSupported()){if(m&&k){var e=e=>{e=e||(null==m?void 0:m.event);try{this.M(e)}catch(m){vr.error("Failed to capture event",m)}};if(Jt(k,"submit",e,{capture:!0}),Jt(k,"change",e,{capture:!0}),Jt(k,"click",e,{capture:!0}),this.R.capture_copied_text){var t=e=>{e=e||(null==m?void 0:m.event),this.M(e,lr)};Jt(k,"copy",t,{capture:!0}),Jt(k,"cut",t,{capture:!0})}}}else vr.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.P&&(this.F(),this.P=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.I=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[ei]:!!e.autocapture_opt_out}),this.T=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.C=e}getElementSelectors(e){var t,i=[];return null==(t=this.C)||t.forEach((t=>{var r=null==k?void 0:k.querySelectorAll(t);null==r||r.forEach((r=>{e===r&&i.push(t)}))})),i}get isEnabled(){var e,t,i=null==(e=this.instance.persistence)?void 0:e.props[ei],r=this.T;if(Q(r)&&!ie(i)&&!this.instance.O())return!1;var n=null!==(t=this.T)&&void 0!==t?t:!!i;return!!this.instance.config.autocapture&&!n}M(e,t){if(void 0===t&&(t="$autocapture"),this.isEnabled){var i,r=ji(e);Ri(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,e.timeStamp||(new Date).getTime())&&function(e,t){if(!m||Gi(e))return!1;var i,r,n;if(ie(t)?(i=!!t&&Bi,r=void 0):(i=null!==(n=null==t?void 0:t.css_selector_ignorelist)&&void 0!==n?n:Bi,r=null==t?void 0:t.content_ignorelist),!1===i)return!1;var{targetElementList:s}=zi(e,!1);return!function(e,t){if(!1===e||J(e))return!1;var i;if(!0===e)i=Wi;else{if(!z(e))return!1;if(e.length>10)return At.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;i=e.map((e=>e.toLowerCase()))}return t.some((e=>{var{safeText:t,ariaLabel:r}=e;return i.some((e=>t.includes(e)||r.includes(e)))}))}(r,s.map((e=>{var t;return{safeText:Ni(e).toLowerCase(),ariaLabel:(null==(t=e.getAttribute("aria-label"))?void 0:t.toLowerCase().trim())||""}})))&&!Hi(s,i)}(r,this.instance.config.rageclick)&&this.M(e,"$rageclick");var n=t===lr;if(r&&function(e,t,i,r,n){var s,o,a,l;if(void 0===i&&(i=void 0),!m||Gi(e))return!1;if(null!=(s=i)&&s.url_allowlist&&!Mi(i.url_allowlist))return!1;if(null!=(o=i)&&o.url_ignorelist&&Mi(i.url_ignorelist))return!1;if(null!=(a=i)&&a.dom_event_allowlist){var c=i.dom_event_allowlist;if(c&&!c.some((e=>t.type===e)))return!1}var{parentIsUsefulElement:u,targetElementList:h}=zi(e,r);if(!function(e,t){var i=null==t?void 0:t.element_allowlist;if(J(i))return!0;var r,n=function(e){if(i.some((t=>e.tagName.toLowerCase()===t)))return{v:!0}};for(var s of e)if(r=n(s))return r.v;return!1}(h,i))return!1;if(!Hi(h,null==(l=i)?void 0:l.css_selector_allowlist))return!1;var d=m.getComputedStyle(e);
vendor: 9,085 bytes, line 1
1if(d&&"pointer"===d.getPropertyValue("cursor")&&"click"===t.type)return!0;var p=e.tagName.toLowerCase();switch(p){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 u?(n||["click"]).indexOf(t.type)>=0:(n||["click"]).indexOf(t.type)>=0&&(Ui.indexOf(p)>-1||"true"===e.getAttribute("contenteditable"))}}(r,e,this.R,n,n?["copy","cut"]:void 0)){var{props:s,explicitNoCapture:o}=_r(r,{e:e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.R.element_attribute_ignorelist,elementsChainAsString:this.I});if(o)return!1;var a=this.getElementSelectors(r);if(a&&a.length>0&&(s.$element_selectors=a),t===lr){var l,c=Li(null==m||null==(l=m.getSelection())?void 0:l.toString()),u=e.type||"clipboard";if(!c)return!1;s.$selected_content=c,s.$copy_type=u}return this.instance.capture(t,s),!0}}}isBrowserSupported(){return V(null==k?void 0:k.querySelectorAll)}}Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return te(e)&&isFinite(e)&&Math.floor(e)===e});var yr="0123456789abcdef";class br{constructor(e){if(this.bytes=e,16!==e.length)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,t,i,r){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(i)||!Number.isInteger(r)||e<0||t<0||i<0||r<0||e>0xffffffffffff||t>4095||i>1073741823||r>4294967295)throw new RangeError("invalid field value");var n=new Uint8Array(16);return n[0]=e/Math.pow(2,40),n[1]=e/Math.pow(2,32),n[2]=e/Math.pow(2,24),n[3]=e/Math.pow(2,16),n[4]=e/Math.pow(2,8),n[5]=e,n[6]=112|t>>>8,n[7]=t,n[8]=128|i>>>24,n[9]=i>>>16,n[10]=i>>>8,n[11]=i,n[12]=r>>>24,n[13]=r>>>16,n[14]=r>>>8,n[15]=r,new br(n)}toString(){for(var e="",t=0;t<this.bytes.length;t++)e=e+yr.charAt(this.bytes[t]>>>4)+yr.charAt(15&this.bytes[t]),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");if(36!==e.length)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new br(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 wr{constructor(){this.A=0,this.D=0,this.j=new kr}generate(){var e=this.generateOrAbort();if(J(e)){this.A=0;var t=this.generateOrAbort();if(J(t))throw new Error("Could not generate UUID after timestamp reset");return t}return e}generateOrAbort(){var e=Date.now();if(e>this.A)this.A=e,this.L();else{if(!(e+1e4>this.A))return;this.D++,this.D>4398046511103&&(this.A++,this.L())}return br.fromFieldsV7(this.A,Math.trunc(this.D/Math.pow(2,30)),this.D&Math.pow(2,30)-1,this.j.nextUint32())}L(){this.D=1024*this.j.nextUint32()+(1023&this.j.nextUint32())}}var Er,xr=e=>{if("undefined"!=typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new 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};m&&!J(m.crypto)&&crypto.getRandomValues&&(xr=e=>crypto.getRandomValues(e));class kr{constructor(){this.N=new Uint32Array(8),this.U=1/0}nextUint32(){return this.U>=this.N.length&&(xr(this.N),this.U=0),this.N[this.U++]}}var Sr=()=>Pr().toString(),Pr=()=>(Er||(Er=new wr)).generate(),Ir="",Tr=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;var $r={H:()=>!!k,B:function(e){At.error("cookieStore error: "+e)},q:function(e){if(k){try{for(var t=e+"=",i=k.cookie.split(";").filter((e=>e.length)),r=0;r<i.length;r++){for(var n=i[r];" "==n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(t))return decodeURIComponent(n.substring(t.length,n.length))}}catch(e){}return null}},W:function(e){var t;try{t=JSON.parse($r.q(e))||{}}catch(e){}return t},G:function(e,t,i,r,n){if(k)try{var s="",o="",a=function(e,t){if(t){var i=function(e,t){if(void 0===t&&(t=k),Ir)return Ir;if(!t)return"";if(["localhost","127.0.0.1"].includes(e))return"";for(var i=e.split("."),r=Math.min(i.length,8),n="dmn_chk_"+Sr();!Ir&&r--;){var s=i.slice(r).join("."),o=n+"=1;domain=."+s+";path=/";t.cookie=o+";max-age=3",t.cookie.includes(n)&&(t.cookie=o+";max-age=0",Ir=s)}return Ir}(e);if(!i){var r=(e=>{var t=e.match(Tr);return t?t[0]:""})(e);r!==i&&At.info("Warning: cookie subdomain discovery mismatch",r,i),i=r}return i?"; domain=."+i:""}return""}(k.location.hostname,r);if(i){var l=new Date;l.setTime(l.getTime()+24*i*60*60*1e3),s="; expires="+l.toUTCString()}n&&(o="; secure");var c=e+"="+encodeURIComponent(JSON.stringify(t))+s+"; SameSite=Lax; path=/"+a+o;return c.length>3686.4&&At.warn("cookieStore warning: large cookie, len="+c.length),k.cookie=c,c}catch(e){return}},V:function(e,t){if(null!=k&&k.cookie)try{$r.G(e,"",-1,t)}catch(e){return}}},Or=null,Cr={H:function(){if(!Q(Or))return Or;var e=!0;if(J(m))e=!1;else try{var t="__mplssupport__";Cr.G(t,"xyz"),'"xyz"'!==Cr.q(t)&&(e=!1),Cr.V(t)}catch(m){e=!1}return e||At.error("localStorage unsupported; falling back to cookie store"),Or=e,e},B:function(e){At.error("localStorage error: "+e)},q:function(e){try{return null==m?void 0:m.localStorage.getItem(e)}catch(m){Cr.B(m)}return null},W:function(e){try{return JSON.parse(Cr.q(e))||{}}catch(e){}return null},G:function(e,t){try{null==m||m.localStorage.setItem(e,JSON.stringify(t))}catch(m){Cr.B(m)}},V:function(e){try{null==m||m.localStorage.removeItem(e)}catch(m){Cr.B(m)}}},Rr=["distinct_id",ui,hi,Si,ki],Fr=A({},Cr,{W:function(e){try{var t={};try{t=$r.W(e)||{}}catch(e){}var i=Ht(t,JSON.parse(Cr.q(e)||"{}"));return Cr.G(e,i),i}catch(e){}return null},G:function(e,t,i,r,n,s){try{Cr.G(e,t,void 0,void 0,s);var o={};Rr.forEach((e=>{t[e]&&(o[e]=t[e])})),Object.keys(o).length&&$r.G(e,o,i,r,n,s)}catch(e){Cr.B(e)}},V:function(e,t){try{null==m||m.localStorage.removeItem(e),$r.V(e,t)}catch(m){Cr.B(m)}}}),Ar={},Mr={H:function(){return!0},B:function(e){At.error("memoryStorage error: "+e)},q:function(e){return Ar[e]||null},W:function(e){return Ar[e]||null},G:function(e,t){Ar[e]=t},V:function(e){delete Ar[e]}},Dr=null,Lr={H:function(){if(!Q(Dr))return Dr;if(Dr=!0,J(m))Dr=!1;else try{var e="__support__";Lr.G(e,"xyz"),'"xyz"'!==Lr.q(e)&&(Dr=!1),Lr.V(e)}catch(m){Dr=!1}return Dr},B:function(e){At.error("sessionStorage error: ",e)},q:function(e){try{return null==m?void 0:m.sessionStorage.getItem(e)}catch(m){Lr.B(m)}return null},W:function(e){try{return JSON.parse(Lr.q(e))||null}catch(e){}return null},G:function(e,t){try{null==m||m.sessionStorage.setItem(e,JSON.stringify(t))}catch(m){Lr.B(m)}},V:function(e){try{null==m||m.sessionStorage.removeItem(e)}catch(m){Lr.B(m)}}},Nr=function(e){return e[e.PENDING=-1]="PENDING",e[e.DENIED=0]="DENIED",e[e.GRANTED=1]="GRANTED",e}({});class jr{constructor(e){this._instance=e}get R(){return this._instance.config}get consent(){return this.J()?Nr.DENIED:this.K}isOptedOut(){return"always"===this.R.cookieless_mode||this.consent===Nr.DENIED||this.consent===Nr.PENDING&&(this.R.opt_out_capturing_by_default||"on_reject"===this.R.cookieless_mode)}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===Nr.DENIED}optInOut(e){this.Y.G(this.X,e?1:0,this.R.cookie_expiration,this.R.cross_subdomain_cookie,this.R.secure_cookie)}reset(){this.Y.V(this.X,this.R.cross_subdomain_cookie)}get X(){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 K(){var e=this.Y.q(this.X);return le(e)?Nr.GRANTED:j(ce,e)?Nr.DENIED:Nr.PENDING}get Y(){if(!this.Z){var e=this.R.opt_out_capturing_persistence_type;this.Z="localStorage"===e?Cr:$r;var t="localStorage"===e?$r:Cr;t.q(this.X)&&(this.Z.q(this.X)||this.optInOut(le(t.q(this.X))),t.V(this.X,this.R.cross_subdomain_cookie))}return this.Z}J(){return!!this.R.respect_dnt&&!!Xt([null==x?void 0:x.doNotTrack,null==x?void 0:x.msDoNotTrack,O.doNotTrack],(e=>le(e)))}}var Ur=Mt("[Dead Clicks]"),Hr=()=>!0,qr=e=>{var t,i=!(null==(t=e.instance.persistence)||!t.get_property(oi)),r=e.instance.config.capture_dead_clicks;return ie(r)?r:!!Y(r)||i};class Wr{get lazyLoadedDeadClicksAutocapture(){return this.tt}constructor(e,t,i){this.instance=e,this.isEnabled=t,this.onCapture=i,this.startIfEnabled()}onRemoteConfig(e){this.instance.persistence&&this.instance.persistence.register({[oi]:null==e?void 0:e.captureDeadClicks}),this.startIfEnabled()}startIfEnabled(){this.isEnabled(this)&&this.it((()=>{this.et()}))}it(e){var t,i;null!=(t=O.__PosthogExtensions__)&&t.initDeadClicksAutocapture&&e(),null==(i=O.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this.instance,"dead-clicks-autocapture",(t=>{t?Ur.error("failed to load script",t):e()}))}et(){var e;if(k){if(!this.tt&&null!=(e=O.__PosthogExtensions__)&&e.initDeadClicksAutocapture){var t=Y(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};t.__onCapture=this.onCapture,this.tt=O.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this.tt.start(k),Ur.info("starting...")}}else Ur.error("`document` not found. Cannot start.")}
1stop(){this.tt&&(this.tt.stop(),this.tt=void 0,Ur.info("stopping..."))}}var Br=Mt("[ExceptionAutocapture]");class Gr{constructor(e){var t,i,r;this.rt=()=>{var e;if(m&&this.isEnabled&&null!=(e=O.__PosthogExtensions__)&&e.errorWrappingFunctions){var t=O.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,i=O.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,r=O.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.st&&this.R.capture_unhandled_errors&&(this.st=t(this.captureException.bind(this))),!this.nt&&this.R.capture_unhandled_rejections&&(this.nt=i(this.captureException.bind(this))),!this.ot&&this.R.capture_console_errors&&(this.ot=r(this.captureException.bind(this)))}catch(m){Br.error("failed to start",m),this.ut()}}},this._instance=e,this.ht=!(null==(t=this._instance.persistence)||!t.props[ii]),this.dt=new he({refillRate:null!==(i=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)&&void 0!==i?i:1,bucketSize:null!==(r=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)&&void 0!==r?r:10,refillInterval:1e4,h:Br}),this.R=this.vt(),this.startIfEnabledOrStop()}vt(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return Y(e)?t=A({},t,e):(J(e)?this.ht:e)&&(t=A({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.R.capture_console_errors||this.R.capture_unhandled_errors||this.R.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(Br.info("enabled"),this.ut(),this.it(this.rt)):this.ut()}it(e){var t,i;null!=(t=O.__PosthogExtensions__)&&t.errorWrappingFunctions&&e(),null==(i=O.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"exception-autocapture",(t=>{if(t)return Br.error("failed to load script",t);e()}))}ut(){var e,t,i;null==(e=this.st)||e.call(this),this.st=void 0,null==(t=this.nt)||t.call(this),this.nt=void 0,null==(i=this.ot)||i.call(this),this.ot=void 0}onRemoteConfig(e){var t=e.autocaptureExceptions;this.ht=!!t||!1,this._instance.persistence&&this._instance.persistence.register({[ii]:this.ht}),this.R=this.vt(),this.startIfEnabledOrStop()}onConfigChange(){this.R=this.vt()}captureException(e){var t,i,r=null!==(t=null==e||null==(i=e.$exception_list)||null==(i=i[0])?void 0:i.type)&&void 0!==t?t:"Exception";this.dt.consumeRateLimit(r)?Br.info("Skipping exception capture because of client rate limiting.",{exception:r}):this._instance.exceptions.sendExceptionEvent(e)}}function zr(e,t,i){try{if(!(t in e))return()=>{};var r=e[t],n=i(r);return V(n)&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=n,()=>{e[t]=r}}catch(e){return()=>{}}}class Vr{constructor(e){var t;this._instance=e,this.ct=(null==m||null==(t=m.location)?void 0:t.pathname)||""}get isEnabled(){return"history_change"===this._instance.config.capture_pageview}startIfEnabled(){this.isEnabled&&(At.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.ft&&this.ft(),this.ft=void 0,At.info("History API monitoring stopped")}monitorHistoryChanges(){var e,t;if(m&&m.history){var i=this;null!=(e=m.history.pushState)&&e.__posthog_wrapped__||zr(m.history,"pushState",(e=>function(t,r,n){e.call(this,t,r,n),i._t("pushState")})),null!=(t=m.history.replaceState)&&t.__posthog_wrapped__||zr(m.history,"replaceState",(e=>function(t,r,n){e.call(this,t,r,n),i._t("replaceState")})),this.bt()}}_t(e){try{var t,i=null==m||null==(t=m.location)?void 0:t.pathname;if(!i)return;i!==this.ct&&this.isEnabled&&this._instance.capture("$pageview",{navigation_type:e}),this.ct=i}catch(m){At.error("Error capturing "+e+" pageview",m)}}bt(){if(!this.ft){var e=()=>{this._t("popstate")};Jt(m,"popstate",e),this.ft=()=>{m&&m.removeEventListener("popstate",e)}}}}var Yr=Mt("[SegmentIntegration]");var Xr="posthog-js";function Jr(e,t){var{organization:i,projectId:r,prefix:n,severityAllowList:s=["error"],sendExceptionsToPostHog:o=!0}=void 0===t?{}:t;return t=>{var a,l,c,u,h;if("*"!==s&&!s.includes(t.level)||!e.__loaded)return t;t.tags||(t.tags={});var d=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/pers
1on/"+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==(a=t.exception)?void 0:a.values)||[],v=p.map((e=>A({},e,{stacktrace:e.stacktrace?A({},e.stacktrace,{type:"raw",frames:(e.stacktrace.frames||[]).map((e=>A({},e,{platform:"web:javascript"})))}):void 0}))),f={$exception_message:(null==(l=p[0])?void 0:l.value)||t.message,$exception_type:null==(c=p[0])?void 0:c.type,$exception_level:t.level,$exception_list:v,$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&&r&&(f.$sentry_url=(n||"https://sentry.io/organizations/")+i+"/issues/?project="+r+"&query="+t.event_id),o&&e.exceptions.sendExceptionEvent(f),t}}class Zr{constructor(e,t,i,r,n,s){this.name=Xr,this.setupOnce=function(o){o(Jr(e,{organization:t,projectId:i,prefix:r,severityAllowList:n,sendExceptionsToPostHog:null==s||s}))}}}var Kr=null!=m&&m.location?pr(m.location.hash,"__posthog")||pr(location.hash,"state"):null,Qr="_postHogToolbarParams",en=Mt("[Toolbar]"),tn=function(e){return e[e.UNINITIALIZED=0]="UNINITIALIZED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED",e}(tn||{});class rn{constructor(e){this.instance=e}yt(e){O.ph_toolbar_state=e}wt(){var e;return null!==(e=O.ph_toolbar_state)&&void 0!==e?e:tn.UNINITIALIZED}maybeLoadToolbar(e,t,i){if(void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===i&&(i=void 0),!m||!k)return!1;e=null!=e?e:m.location,i=null!=i?i:m.history;try{if(!t){try{m.localStorage.setItem("test","test"),m.localStorage.removeItem("test")}catch(m){return!1}t=null==m?void 0:m.localStorage}var r,n=Kr||pr(e.hash,"__posthog")||pr(e.hash,"state"),s=n?Bt((()=>JSON.parse(atob(decodeURIComponent(n)))))||Bt((()=>JSON.parse(decodeURIComponent(n)))):null;return s&&"ph_authorize"===s.action?((r=s).source="url",r&&Object.keys(r).length>0&&(s.desiredHash?e.hash=s.desiredHash:i?i.replaceState(i.state,"",e.pathname+e.search):e.hash="")):((r=JSON.parse(t.getItem(Qr)||"{}")).source="localstorage",delete r.userIntent),!(!r.token||this.instance.config.token!==r.token)&&(this.loadToolbar(r),!0)}catch(m){return!1}}xt(e){var t=O.ph_load_toolbar||O.ph_load_editor;!ee(t)&&V(t)?t(e,this.instance):en.warn("No toolbar load function found")}loadToolbar(e){var t=!(null==k||!k.getElementById(Pi));if(!m||t)return!1;var i="custom"===this.instance.requestRouter.region&&this.instance.config.advanced_disable_toolbar_metrics,r=A({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},i?{instrument:!1}:{});if(m.localStorage.setItem(Qr,JSON.stringify(A({},r,{source:void 0}))),this.wt()===tn.LOADED)this.xt(r);else if(this.wt()===tn.UNINITIALIZED){var n;this.yt(tn.LOADING),null==(n=O.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this.instance,"toolbar",(e=>{if(e)return en.error("[Toolbar] Failed to load",e),void this.yt(tn.UNINITIALIZED);this.yt(tn.LOADED),this.xt(r)})),Jt(m,"turbolinks:load",(()=>{this.yt(tn.UNINITIALIZED),this.loadToolbar(r)}))}return!0}Et(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 nn=Mt("[TracingHeaders]");class sn{constructor(e){this.$t=void 0,this.St=void 0,this.rt=()=>{var e,t;J(this.$t)&&(null==(e=O.__PosthogExtensions__)||null==(e=e.tracingHeadersPatchFns)||e._patchXHR(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager)),J(this.St)&&(null==(t=O.__PosthogExtensions__)||null==(t=t.tracingHeadersPatchFns)||t._patchFetch(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}it(e){var t,i;null!=(t=O.__PosthogExtensions__)&&t.tracingHeadersPatchFns&&e(),null==(i=O.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"tracing-headers",(t=>{if(t)return nn.error("failed to load script",t);e()}))}startIfEnabledOrStop(){var e,t;this._instance.config.__add_tracing_headers?this.it(this.rt):(null==(e=this.$t)||e.call(this),null==(t=this.St)||t.call(this),this.$t=void 0,this.St=void 0)}}var on="https?://(.*)",an=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],ln=qt(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],an),cn="<masked>",un=["li_fat_id"];function hn(e,t,i){if(!k)return{};var r,n=t?qt([],an,i||[]):[],s=dn(dr(k.URL,n,cn),e),o=(r={},Ut(un,(function(e){var t=$r.q(e);r[e]=t||null})),r);return Ht(o,s)}function dn(e,t){var i=ln.concat(t||[]),r={};return Ut(i,(function(t){var i=hr(e,t);r[t]=i||null})),r}function pn(e){var t=function(e){return e?0===e.search(on+"google.([^/?]*)")?"google":0===e.search(on+"bing.com")?"bing":0===e.search(on+"yahoo.com")?"yahoo":0===e.search(on+"duckduckgo.com")?"duckduckgo":null:null}(e),i="yahoo"!=t?"q":"p",r={};if(!Q(t)){r.$search_engine=t;var n=k?hr(k.referrer,i):"";n.length&&(r.ph_keyword=n)}return r}function vn(){return navigator.language||navigator.userLanguage}function fn(){return(null==k?void 0:k.referrer)||"$direct"}function gn(e,t){var i=e?qt([],an,t||[]):[],r=null==S?void 0:S.href.substring(0,1e3);return{r:fn().substring(0,1e3),u:r?dr(r,i,cn):void 0}}function _n(e){var t,{r:i,u:r}=e,n={$referrer:i,$referring_domain:null==i?void 0:"$direct"==i?"$direct":null==(t=ur(i))?void 0:t.host};
vendor: 13,248 bytes, line 1
1if(r){n.$current_url=r;var s=ur(r);n.$host=null==s?void 0:s.host,n.$pathname=null==s?void 0:s.pathname;var o=dn(r);Ht(n,o)}if(i){var a=pn(i);Ht(n,a)}return n}function mn(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(m){return}}function yn(){try{return(new Date).getTimezoneOffset()}catch(m){return}}function bn(e,t){if(!$)return{};var i,r,n,s=e?qt([],an,t||[]):[],[o,a]=function(e){for(var t=0;t<ot.length;t++){var[i,r]=ot[t],n=i.exec(e),s=n&&(V(r)?r(n,e):r);if(s)return s}return["",""]}($);return Ht(zt({$os:o,$os_version:a,$browser:rt($,navigator.vendor),$device:at($),$device_type:(r=$,n=at(r),n===be||n===ye||"Kobo"===n||"Kindle Fire"===n||n===Ye?me:n===Le||n===je||n===Ne||n===Ge?"Console":n===Ee?"Wearable":n?fe:"Desktop"),$timezone:mn(),$timezone_offset:yn()}),{$current_url:dr(null==S?void 0:S.href,s,cn),$host:null==S?void 0:S.host,$pathname:null==S?void 0:S.pathname,$raw_user_agent:$.length>1e3?$.substring(0,997)+"...":$,$browser_version:st($,navigator.vendor),$browser_language:vn(),$browser_language_prefix:(i=vn(),"string"==typeof i?i.split("-")[0]:void 0),$screen_height:null==m?void 0:m.screen.height,$screen_width:null==m?void 0:m.screen.width,$viewport_height:null==m?void 0:m.innerHeight,$viewport_width:null==m?void 0:m.innerWidth,$lib:"web",$lib_version:C.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}var wn=Mt("[Web Vitals]"),En=9e5;class xn{constructor(e){var t;this.kt=!1,this.P=!1,this.N={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.Pt=()=>{clearTimeout(this.Tt),0!==this.N.metrics.length&&(this._instance.capture("$web_vitals",this.N.metrics.reduce(((e,t)=>A({},e,{["$web_vitals_"+t.name+"_event"]:A({},t),["$web_vitals_"+t.name+"_value"]:t.value})),{})),this.N={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.It=e=>{var t,i=null==(t=this._instance.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0);if(J(i))wn.error("Could not read session ID. Dropping metrics!");else{this.N=this.N||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var r=this.Ct();J(r)||(ee(null==e?void 0:e.name)||ee(null==e?void 0:e.value)?wn.error("Invalid metric received",e):this.Rt&&e.value>=this.Rt?wn.error("Ignoring metric with value >= "+this.Rt,e):(this.N.url!==r&&(this.Pt(),this.Tt=setTimeout(this.Pt,this.flushToCaptureTimeoutMs)),J(this.N.url)&&(this.N.url=r),this.N.firstMetricTimestamp=J(this.N.firstMetricTimestamp)?Date.now():this.N.firstMetricTimestamp,e.attribution&&e.attribution.interactionTargetElement&&(e.attribution.interactionTargetElement=void 0),this.N.metrics.push(A({},e,{$current_url:r,$session_id:i.sessionId,$window_id:i.windowId,timestamp:Date.now()})),this.N.metrics.length===this.allowedMetrics.length&&this.Pt()))}},this.rt=()=>{var e,t,i,r,n=O.__PosthogExtensions__;J(n)||J(n.postHogWebVitalsCallbacks)||({onLCP:e,onCLS:t,onFCP:i,onINP:r}=n.postHogWebVitalsCallbacks),e&&t&&i&&r?(this.allowedMetrics.indexOf("LCP")>-1&&e(this.It.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&t(this.It.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&i(this.It.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&r(this.It.bind(this)),this.P=!0):wn.error("web vitals callbacks not loaded - not starting")},this._instance=e,this.kt=!(null==(t=this._instance.persistence)||!t.props[si]),this.startIfEnabled()}get allowedMetrics(){var e,t,i=Y(this._instance.config.capture_performance)?null==(e=this._instance.config.capture_performance)?void 0:e.web_vitals_allowed_metrics:void 0;return J(i)?(null==(t=this._instance.persistence)?void 0:t.props[li])||["CLS","FCP","INP","LCP"]:i}get flushToCaptureTimeoutMs(){return(Y(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}get Rt(){var e=Y(this._instance.config.capture_performance)&&te(this._instance.config.capture_performance.__web_vitals_max_value)?this._instance.config.capture_performance.__web_vitals_max_value:En;return 0<e&&e<=6e4?En:e}get isEnabled(){var e=null==S?void 0:S.protocol;if("http:"!==e&&"https:"!==e)return wn.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=Y(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals:ie(this._instance.config.capture_performance)?this._instance.config.capture_performance:void 0;return ie(t)?t:this.kt}startIfEnabled(){this.isEnabled&&!this.P&&(wn.info("enabled, starting..."),this.it(this.rt))}onRemoteConfig(e){var t=Y(e.capturePerformance)&&!!e.capturePerformance.web_vitals,i=Y(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[si]:t}),this._instance.persistence.register({[li]:i})),this.kt=t,this.startIfEnabled()}it(e){var t,i;null!=(t=O.__PosthogExtensions__)&&t.postHogWebVitalsCallbacks&&e(),null==(i=O.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"web-vitals",(t=>{t?wn.error("failed to load script",t):e()}))}Ct(){var e=m?m.location.href:void 0;if(e){var t=this._instance.config.mask_personal_data_properties,i=this._instance.config.custom_personal_data_properties,r=t?qt([],an,i||[]):[];return dr(e,r,cn)}wn.error("Could not determine current URL")}}var kn=Mt("[Heatmaps]");function Sn(e){return Y(e)&&"clientX"in e&&"clientY"in e&&te(e.clientX)&&te(e.clientY)}class Pn{constructor(e){var t;this.kt=!1,this.P=!1,this.Ft=null,this.instance=e,this.kt=!(null==(t=this.instance.persistence)||!t.props[ti]),this.rageclicks=new ar(e.config.rageclick)}get flushIntervalMilliseconds(){var e=5e3;return Y(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 J(this.instance.config.capture_heatmaps)?J(this.instance.config.enable_heatmaps)?this.kt:this.instance.config.enable_heatmaps:!1!==this.instance.config.capture_heatmaps}startIfEnabled(){if(this.isEnabled){if(this.P)return;kn.info("starting..."),this.Mt(),this.Ot()}else{var e;clearInterval(null!==(e=this.Ft)&&void 0!==e?e:void 0),this.At(),this.getAndClearBuffer()}}onRemoteConfig(e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[ti]:t}),this.kt=t,this.startIfEnabled()}getAndClearBuffer(){var e=this.N;return this.N=void 0,e}Dt(e){this.jt(e.originalEvent,"deadclick")}Ot(){this.Ft&&clearInterval(this.Ft),this.Ft=function(e){return"visible"===(null==e?void 0:e.visibilityState)}(k)?setInterval(this.Lt.bind(this),this.flushIntervalMilliseconds):null}Mt(){m&&k&&(this.Nt=this.Lt.bind(this),Jt(m,"beforeunload",this.Nt),this.Ut=e=>this.jt(e||(null==m?void 0:m.event)),Jt(k,"click",this.Ut,{capture:!0}),this.zt=e=>this.Ht(e||(null==m?void 0:m.event)),Jt(k,"mousemove",this.zt,{capture:!0}),this.Bt=new Wr(this.instance,Hr,this.Dt.bind(this)),this.Bt.startIfEnabled(),this.qt=this.Ot.bind(this),Jt(k,"visibilitychange",this.qt),this.P=!0)}At(){var e;m&&k&&(this.Nt&&m.removeEventListener("beforeunload",this.Nt),this.Ut&&k.removeEventListener("click",this.Ut,{capture:!0}),this.zt&&k.removeEventListener("mousemove",this.zt,{capture:!0}),this.qt&&k.removeEventListener("visibilitychange",this.qt),clearTimeout(this.Wt),null==(e=this.Bt)||e.stop(),this.P=!1)}Gt(e,t){var i=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),n=this.instance.scrollManager.scrollElement(),s=function(e,t,i){for(var r=e;r&&Oi(r)&&!Ci(r,"body");){if(r===i)return!1;if(j(t,null==m?void 0:m.getComputedStyle(r).position))return!0;r=qi(r)}return!1}(ji(e),["fixed","sticky"],n);return{x:e.clientX+(s?0:r),y:e.clientY+(s?0:i),target_fixed:s,type:t}}jt(e,t){var i;if(void 0===t&&(t="click"),!$i(e.target)&&Sn(e)){var r=this.Gt(e,t);null!=(i=this.rageclicks)&&i.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&this.Vt(A({},r,{type:"rageclick"})),this.Vt(r)}}Ht(e){!$i(e.target)&&Sn(e)&&(clearTimeout(this.Wt),this.Wt=setTimeout((()=>{this.Vt(this.Gt(e,"mousemove"))}),500))}Vt(e){if(m){var t=m.location.href,i=this.instance.config.mask_personal_data_properties,r=this.instance.config.custom_personal_data_properties,n=i?qt([],an,r||[]):[],s=dr(t,n,cn);this.N=this.N||{},this.N[s]||(this.N[s]=[]),this.N[s].push(e)}}Lt(){this.N&&!X(this.N)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}}class In{constructor(e){this._instance=e}doPageView(e,t){var i,r=this.Jt(e,t);return this.Kt={pathname:null!==(i=null==m?void 0:m.location.pathname)&&void 0!==i?i:"",pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),r}doPageLeave(e){var t;return this.Jt(e,null==(t=this.Kt)?void 0:t.pageViewId)}doEvent(){var e;return{$pageview_id:null==(e=this.Kt)?void 0:e.pageViewId}}Jt(e,t){var i=this.Kt;if(!i)return{$pageview_id:t};var r={$pageview_id:t,$prev_pageview_id:i.pageViewId},n=this._instance.scrollManager.getContext();if(n&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:s,lastScrollY:o,maxScrollY:a,maxContentHeight:l,lastContentY:c,maxContentY:u}=n;if(!(J(s)||J(o)||J(a)||J(l)||J(c)||J(u))){s=Math.ceil(s),o=Math.ceil(o),a=Math.ceil(a),l=Math.ceil(l),c=Math.ceil(c),u=Math.ceil(u);var h=s<=1?1:ue(o/s,0,1,At),d=s<=1?1:ue(a/s,0,1,At),p=l<=1?1:ue(c/l,0,1,At),v=l<=1?1:ue(u/l,0,1,At);r=Ht(r,{$prev_pageview_last_scroll:o,$prev_pageview_last_scroll_percentage:h,$prev_pageview_max_scroll:a,$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:v})}}return i.pathname&&(r.$prev_pageview_pathname=i.pathname),i.timestamp&&(r.$prev_pageview_duration=(e.getTime()-i.timestamp.getTime())/1e3),r}}var Tn=Uint8Array,$n=Uint16Array,On=Uint32Array,Cn=new Tn([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]),Rn=new Tn([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]),Fn=new Tn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),An=function(e,t){for(var i=new $n(31),r=0;r<31;++r)i[r]=t+=1<<e[r-1];var n=new On(i[30]);for(r=1;r<30;++r)for(var s=i[r];s<i[r+1];++s)n[s]=s-i[r]<<5|r;return[i,n]},Mn=An(Cn,2),Dn=Mn[0],Ln=Mn[1];Dn[28]=258,Ln[258]=28;for(var Nn=An(Rn,0)[1],jn=new $n(32768),Un=0;Un<32768;++Un){var Hn=(43690&Un)>>>1|(21845&Un)<<1;Hn=(61680&(Hn=(52428&Hn)>>>2|(13107&Hn)<<2))>>>4|(3855&Hn)<<4,jn[Un]=((65280&Hn)>>>8|(255&Hn)<<8)>>>1}var qn=function(e,t,i){for(var r=e.length,n=0,s=new $n(t);n<r;++n)++s[e[n]-1];var o,a=new $n(t);for(n=0;n<t;++n)a[n]=a[n-1]+s[n-1]<<1;if(i){o=new $n(1<<t);var l=15-t;for(n=0;n<r;++n)if(e[n])for(var c=n<<4|e[n],u=t-e[n],h=a[e[n]-1]++<<u,d=h|(1<<u)-1;h<=d;++h)o[jn[h]>>>l]=c}else for(o=new $n(r),n=0;n<r;++n)o[n]=jn[a[e[n]-1]++]>>>15-e[n];return o},Wn=new Tn(288);for(Un=0;Un<144;++Un)Wn[Un]=8;for(Un=144;Un<256;++Un)Wn[Un]=9;for(Un=256;Un<280;++Un)Wn[Un]=7;for(Un=280;Un<288;++Un)Wn[Un]=8;var Bn=new Tn(32);for(Un=0;Un<32;++Un)Bn[Un]=5;var Gn=qn(Wn,9,0),zn=qn(Bn,5,0),Vn=function(e){return(e/8>>0)+(7&e&&1)},Yn=function(e,t,i){(null==i||i>e.length)&&(i=e.length);var r=new(e instanceof $n?$n:e instanceof On?On:Tn)(i-t);return r.set(e.subarray(t,i)),r},Xn=function(e,t,i){i<<=7&t;var r=t/8>>0;e[r]|=i,e[r+1]|=i>>>8},Jn=function(e,t,i){i<<=7&t;var r=t/8>>0;e[r]|=i,e[r+1]|=i>>>8,e[r+2]|=i>>>16},Zn=function(e,t){for(var i=[],r=0;r<e.length;++r)e[r]&&i.push({s:r,f:e[r]});var n=i.length,s=i.slice();if(!n)return[new Tn(0),0];if(1==n){var o=new Tn(i[0].s+1);return o[i[0].s]=1,[o,1]}i.sort((function(e,t){return e.f-t.f})),i.push({s:-1,f:25001});var a=i[0],l=i[1],c=0,u=1,h=2;for(i[0]={s:-1,f:a.f+l.f,l:a,r:l};u!=n-1;)a=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:a.f+l.f,l:a,r:l};var d=s[0].s;for(r=1;r<n;++r)s[r].s>d&&(d=s[r].s);var p=new $n(d+1),v=Kn(i[u-1],p,0);if(v>t){r=0;var f=0,g=v-t,_=1<<g;for(s.sort((function(e,t){return p[t.s]-p[e.s]||e.f-t.f}));r<n;++r){var m=s[r].s;if(!(p[m]>t))break;f+=_-(1<<v-p[m]),p[m]=t}for(f>>>=g;f>0;){var y=s[r].s;p[y]<t?f-=1<<t-p[y]++-1:++r}for(;r>=0&&f;--r){var b=s[r].s;p[b]==t&&(--p[b],++f)}v=t}return[new Tn(p),v]},Kn=function(e,t,i){return-1==e.s?Math.max(Kn(e.l,t,i+1),Kn(e.r,t,i+1)):t[e.s]=i},Qn=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new $n(++t),r=0,n=e[0],s=1,o=function(e){i[r++]=e},a=1;a<=t;++a)if(e[a]==n&&a!=t)++s;else{if(!n&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(n),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(n);s=1,n=e[a]}return[i.subarray(0,r),t]},es=function(e,t){for(var i=0,r=0;r<t.length;++r)i+=e[r]*t[r];return i},ts=function(e,t,i){var r=i.length,n=Vn(t+2);e[n]=255&r,e[n+1]=r>>>8,e[n+2]=255^e[n],e[n+3]=255^e[n+1];for(var s=0;s<r;++s)e[n+s+4]=i[s];return 8*(n+4+r)},is=function(e,t,i,r,n,s,o,a,l,c,u){Xn(t,u++,i),++n[256];for(var h=Zn(n,15),d=h[0],p=h[1],v=Zn(s,15),f=v[0],g=v[1],_=Qn(d),m=_[0],y=_[1],b=Qn(f),w=b[0],E=b[1],x=new $n(19),k=0;k<m.length;++k)x[31&m[k]]++;for(k=0;k<w.length;++k)x[31&w[k]]++;for(var S=Zn(x,7),P=S[0],I=S[1],T=19;T>4&&!P[Fn[T-1]];--T);var $,O,C,R,F=c+5<<3,A=es(n,Wn)+es(s,Bn)+o,M=es(n,d)+es(s,f)+o+14+3*T+es(x,P)+(2*x[16]+3*x[17]+7*x[18]);if(F<=A&&F<=M)return ts(t,u,e.subarray(l,l+c));
1if(Xn(t,u,1+(M<A)),u+=2,M<A){$=qn(d,p,0),O=d,C=qn(f,g,0),R=f;var D=qn(P,I,0);for(Xn(t,u,y-257),Xn(t,u+5,E-1),Xn(t,u+10,T-4),u+=14,k=0;k<T;++k)Xn(t,u+3*k,P[Fn[k]]);u+=3*T;for(var L=[m,w],N=0;N<2;++N){var j=L[N];for(k=0;k<j.length;++k){var U=31&j[k];Xn(t,u,D[U]),u+=P[U],U>15&&(Xn(t,u,j[k]>>>5&127),u+=j[k]>>>12)}}}else $=Gn,O=Wn,C=zn,R=Bn;for(k=0;k<a;++k)if(r[k]>255){U=r[k]>>>18&31,Jn(t,u,$[U+257]),u+=O[U+257],U>7&&(Xn(t,u,r[k]>>>23&31),u+=Cn[U]);var H=31&r[k];Jn(t,u,C[H]),u+=R[H],H>3&&(Jn(t,u,r[k]>>>5&8191),u+=Rn[H])}else Jn(t,u,$[r[k]]),u+=O[r[k]];return Jn(t,u,$[256]),u+O[256]},rs=new On([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ns=function(){for(var e=new On(256),t=0;t<256;++t){for(var i=t,r=9;--r;)i=(1&i&&3988292384)^i>>>1;e[t]=i}return e}(),ss=function(e,t,i){for(;i;++t)e[t]=i,i>>>=8};function os(e,t){void 0===t&&(t={});var i=function(){var e=4294967295;return{p:function(t){for(var i=e,r=0;r<t.length;++r)i=ns[255&i^t[r]]^i>>>8;e=i},d:function(){return 4294967295^e}}}(),r=e.length;i.p(e);var n,s=function(e,t,i,r,n){return function(e,t,i,r,n,s){var o=e.length,a=new Tn(r+o+5*(1+Math.floor(o/7e3))+n),l=a.subarray(r,a.length-n),c=0;if(!t||o<8)for(var u=0;u<=o;u+=65535){var h=u+65535;h<o?c=ts(l,c,e.subarray(u,h)):(l[u]=!0,c=ts(l,c,e.subarray(u,o)))}else{for(var d=rs[t-1],p=d>>>13,v=8191&d,f=(1<<i)-1,g=new $n(32768),_=new $n(f+1),m=Math.ceil(i/3),y=2*m,b=function(t){return(e[t]^e[t+1]<<m^e[t+2]<<y)&f},w=new On(25e3),E=new $n(288),x=new $n(32),k=0,S=0,P=(u=0,0),I=0,T=0;u<o;++u){var $=b(u),O=32767&u,C=_[$];if(g[O]=C,_[$]=O,I<=u){var R=o-u;if((k>7e3||P>24576)&&R>423){c=is(e,l,0,w,E,x,S,P,T,u-T,c),P=k=S=0,T=u;for(var F=0;F<286;++F)E[F]=0;for(F=0;F<30;++F)x[F]=0}var A=2,M=0,D=v,L=O-C&32767;if(R>2&&$==b(u-L))for(var N=Math.min(p,R)-1,j=Math.min(32767,u),U=Math.min(258,R);L<=j&&--D&&O!=C;){if(e[u+A]==e[u+A-L]){for(var H=0;H<U&&e[u+H]==e[u+H-L];++H);if(H>A){if(A=H,M=L,H>N)break;var q=Math.min(L,H-2),W=0;for(F=0;F<q;++F){var B=u-L+F+32768&32767,G=B-g[B]+32768&32767;G>W&&(W=G,C=B)}}}L+=(O=C)-(C=g[O])+32768&32767}if(M){w[P++]=268435456|Ln[A]<<18|Nn[M];var z=31&Ln[A],V=31&Nn[M];S+=Cn[z]+Rn[V],++E[257+z],++x[V],I=u+A,++k}else w[P++]=e[u],++E[e[u]]}}c=is(e,l,!0,w,E,x,S,P,T,u-T,c)}return Yn(a,0,r+Vn(c)+n)}(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,i,r)}(e,t,10+((n=t).filename&&n.filename.length+1||0),8),o=s.length;return function(e,t){var i=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&ss(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),i){e[3]=8;for(var r=0;r<=i.length;++r)e[r+10]=i.charCodeAt(r)}}(s,t),ss(s,o-8,i.d()),ss(s,o-4,r),s}var as=!!I||!!P,ls="text/plain",cs=function(e,t,i){var r;void 0===i&&(i=!0);var[n,s]=e.split("?"),o=A({},t),a=null!==(r=null==s?void 0:s.split("&").map((e=>{var t,[r,n]=e.split("="),s=i&&null!==(t=o[r])&&void 0!==t?t:n;return delete o[r],r+"="+s})))&&void 0!==r?r:[],l=function(e,t){var i,r;void 0===t&&(t="&");var n=[];return Ut(e,(function(e,t){J(e)||J(t)||"undefined"===t||(i=encodeURIComponent((e=>e instanceof File)(e)?e.name:e.toString()),r=encodeURIComponent(t),n[n.length]=r+"="+i)})),n.join(t)}(o);return l&&a.push(l),n+"?"+a.join("&")},us=(e,t)=>JSON.stringify(e,((e,t)=>"bigint"==typeof t?t.toString():t),t),hs=e=>{var{data:t,compression:i}=e;if(t){if(i===cr.GZipJS){var r=os(function(e,t){var i=e.length;if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var r=new Tn(e.length+(e.length>>>1)),n=0,s=function(e){r[n++]=e},o=0;o<i;++o){if(n+5>r.length){var a=new Tn(n+8+(i-o<<1));a.set(r),r=a}var l=e.charCodeAt(o);l<128?s(l):l<2048?(s(192|l>>>6),s(128|63&l)):l>55295&&l<57344?(s(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++o))>>>18),s(128|l>>>12&63),s(128|l>>>6&63),s(128|63&l)):(s(224|l>>>12),s(128|l>>>6&63),s(128|63&l))}return Yn(r,0,n)}(us(t)),{mtime:0}),n=new Blob([r],{type:ls});return{contentType:ls,body:n,estimatedSize:n.size}}if(i===cr.Base64){var s=function(e){var t,i,r,n,s,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,l=0,c="",u=[];if(!e)return e;e=function(e){var t,i,r,n,s="";for(t=i=0,r=(e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,n=0;n<r;n++){var o=e.charCodeAt(n),a=null;o<128?i++:a=o>127&&o<2048?String.fromCharCode(o>>6|192,63&o|128):String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),Q(a)||(i>t&&(s+=e.substring(t,i)),s+=a,t=i=n+1)}return i>t&&(s+=e.substring(t,e.length)),s}(e);do{t=(s=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,i=s>>12&63,r=s>>6&63,n=63&s,u[l++]=o.charAt(t)+o.charAt(i)+o.charAt(r)+o.charAt(n)}while(a<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}(us(t)),o=(e=>"data="+encodeURIComponent("string"==typeof e?e:us(e)))(s);return{contentType:"application/x-www-form-urlencoded",body:o,estimatedSize:new Blob([o]).size}}var a=us(t);return{contentType:"application/json",body:a,estimatedSize:new Blob([a]).size}}},ds=[];P&&ds.push({transport:"fetch",method:e=>{var t,i,{contentType:r,body:n,estimatedSize:s}=null!==(t=hs(e))&&void 0!==t?t:{},o=new Headers;Ut(e.headers,(function(e,t){o.append(t,e)})),r&&o.append("Content-Type",r);var a=e.url,l=null;if(T){var c=new T;l={signal:c.signal,timeout:setTimeout((()=>c.abort()),e.timeout)}}P(a,A({method:(null==e?void 0:e.method)||"GET",headers:o,keepalive:"POST"===e.method&&(s||0)<52428.8,body:n,signal:null==(i=l)?void 0:i.signal},e.fetchOptions)).then((t=>t.text().then((i=>{var r={statusCode:t.status,text:i};if(200===t.status)try{r.json=JSON.parse(i)}catch(e){At.error(e)}null==e.callback||e.callback(r)})))).catch((t=>{At.error(t),null==e.callback||e.callback({statusCode:0,text:t})})).finally((()=>l?clearTimeout(l.timeout):null))}}),I&&ds.push({transport:"XHR",method:e=>{var t,i=new I;i.open(e.method||"GET",e.url,!0);var{contentType:r,body:n}=null!==(t=hs(e))&&void 0!==t?t:{};Ut(e.headers,(function(e,t){i.setRequestHeader(t,e)})),r&&i.setRequestHeader("Content-Type",r),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};
1if(200===i.status)try{t.json=JSON.parse(i.responseText)}catch(e){}null==e.callback||e.callback(t)}},i.send(n)}}),null!=x&&x.sendBeacon&&ds.push({transport:"sendBeacon",method:e=>{var t=cs(e.url,{beacon:"1"});try{var i,{contentType:r,body:n}=null!==(i=hs(e))&&void 0!==i?i:{},s="string"==typeof n?new Blob([n],{type:r}):n;x.sendBeacon(t,s)}catch(e){}}});var ps=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 vs(e,t,i){return us({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:i})}var fs={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=>ps(t,e))))),not_regex:(e,t)=>t.every((t=>e.every((e=>!ps(t,e))))),icontains:(e,t)=>t.map(gs).some((t=>e.map(gs).some((e=>t.includes(e))))),not_icontains:(e,t)=>t.map(gs).every((t=>e.map(gs).every((e=>!t.includes(e))))),gt:(e,t)=>t.some((t=>{var i=parseFloat(t);return!isNaN(i)&&e.some((e=>i>parseFloat(e)))})),lt:(e,t)=>t.some((t=>{var i=parseFloat(t);return!isNaN(i)&&e.some((e=>i<parseFloat(e)))}))},gs=e=>e.toLowerCase();function _s(e,t){return!e||Object.entries(e).every((e=>{var[i,r]=e,n=null==t?void 0:t[i];if(J(n)||Q(n))return!1;var s=[String(n)],o=fs[r.operator];return!!o&&o(r.values,s)}))}var ms=Mt("[Error tracking]");class ys{constructor(e){var t,i;this.Yt=[],this.Xt=new ut([new Et,new Rt,new kt,new xt,new Ot,new $t,new Pt,new Ct],function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];return function(t,r){void 0===r&&(r=0);for(var n=[],s=t.split("\n"),o=r;o<s.length;o++){var a=s[o];if(!(a.length>1024)){var l=wt.test(a)?a.replace(wt,"$1"):a;if(!l.match(/\S*Error: /)){for(var c of i){var u=c(l,e);if(u){n.push(u);break}}if(n.length>=50)break}}}return function(e){if(!e.length)return[];var t=Array.from(e);return t.reverse(),t.slice(0,50).map((e=>{return A({},e,{filename:e.filename||(i=t,i[i.length-1]||{}).filename,function:e.function||ht});var i}))}(n)}}("web:javascript",_t,bt)),this._instance=e,this.Yt=null!==(t=null==(i=this._instance.persistence)?void 0:i.get_property(ri))&&void 0!==t?t:[]}onRemoteConfig(e){var t,i,r,n=null!==(t=null==(i=e.errorTracking)?void 0:i.suppressionRules)&&void 0!==t?t:[],s=null==(r=e.errorTracking)?void 0:r.captureExtensionExceptions;this.Yt=n,this._instance.persistence&&this._instance.persistence.register({[ri]:this.Yt,[ni]:s})}get Qt(){var e,t=!!this._instance.get_property(ni),i=this._instance.config.error_tracking.captureExtensionExceptions;return null!==(e=null!=i?i:t)&&void 0!==e&&e}buildProperties(e,t){return this.Xt.buildFromUnknown(e,{syntheticException:null==t?void 0:t.syntheticException,mechanism:{handled:null==t?void 0:t.handled}})}sendExceptionEvent(e){var t=e.$exception_list;if(this.Zt(t)){if(this.ti(t))return void ms.info("Skipping exception capture because a suppression rule matched");if(!this.Qt&&this.ii(t))return void ms.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.ei(t))return void ms.info("Skipping exception capture because it was thrown by the PostHog SDK")}return this._instance.capture("$exception",e,{_noTruncate:!0,_batchKey:"exceptionEvent"})}ti(e){if(0===e.length)return!1;var t=e.reduce(((e,t)=>{var{type:i,value:r}=t;return Z(i)&&i.length>0&&e.$exception_types.push(i),Z(r)&&r.length>0&&e.$exception_values.push(r),e}),{$exception_types:[],$exception_values:[]});return this.Yt.some((e=>{var i=e.values.map((e=>{var i,r=fs[e.operator],n=z(e.value)?e.value:[e.value],s=null!==(i=t[e.key])&&void 0!==i?i:[];return n.length>0&&r(n,s)}));return"OR"===e.type?i.some(Boolean):i.every(Boolean)}))}ii(e){return e.flatMap((e=>{var t,i;return null!==(t=null==(i=e.stacktrace)?void 0:i.frames)&&void 0!==t?t:[]})).some((e=>e.filename&&e.filename.startsWith("chrome-extension://")))}ei(e){if(e.length>0){var t,i,r,n,s=null!==(t=null==(i=e[0].stacktrace)?void 0:i.frames)&&void 0!==t?t:[],o=s[s.length-1];return null!==(r=null==o||null==(n=o.filename)?void 0:n.includes("posthog.com/static"))&&void 0!==r&&r}return!1}Zt(e){return!ee(e)&&z(e)}}var bs=Mt("[FeatureFlags]"),ws=Mt("[FeatureFlags]",{debugEnabled:!0}),Es="$active_feature_flags",xs="$override_feature_flags",ks="$feature_flag_payloads",Ss="$override_feature_flag_payloads",Ps="$feature_flag_request_id",Is="$feature_flag_evaluated_at",Ts=e=>{var t={};for(var[i,r]of Wt(e||{}))r&&(t[i]=r);return t},$s=function(e){return e.FeatureFlags="feature_flags",e.Recordings="recordings",e}({});class Os{constructor(e){this.ri=!1,this.si=!1,this.ni=!1,this.oi=!1,this.ai=!1,this.li=!1,this.ui=!1,this._instance=e,this.featureFlagEventHandlers=[]}hi(){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||bs.error("Invalid evaluation environment found:",e,"Expected non-empty string"),t})):[]}di(){return this.hi().length>0}flags(){if(this._instance.config.__preview_remote_config)this.li=!0;else{var e=!this.vi&&(this._instance.config.advanced_disable_feature_flags||this._instance.config.advanced_disable_feature_flags_on_first_load);this.ci({disableFlags:e})}}get hasLoadedFlags(){return this.si}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this._instance.get_property(vi),t=this._instance.get_property(xs),i=this._instance.get_property(Ss);if(!i&&!t)return e||{};var r=Ht({},e||{}),n=[...new Set([...Object.keys(i||{}),...Object.keys(t||{})])];for(var s of n){var o,a,l=r[s],c=null==t?void 0:t[s],u=J(c)?null!==(o=null==l?void 0:l.enabled)&&void 0!==o&&o:!!c,h=J(c)?l.variant:"string"==typeof c?c:void 0,d=null==i?void 0:i[s],p=A({},l,{enabled:u,variant:u?null!=h?h:null==l?void 0:l.variant:void 0});u!==(null==l?void 0:l.enabled)&&(p.original_enabled=null==l?void 0:l.enabled),h!==(null==l?void 0:l.variant)&&(p.original_variant=null==l?void 0:l.variant),d&&(p.metadata=A({},null==l?void 0:l.metadata,{payload:d,original_payload:null==l||null==(a=l.metadata)?void 0:a.payload})),r[s]=p}return this.ri||(bs.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:i,finalDetails:r}),this.ri=!0),r}getFlagVariants(){var e=this._instance.get_property(di),t=this._instance.get_property(xs);if(!t)return e||{};for(var i=Ht({},e),r=Object.keys(t),n=0;n<r.length;n++)i[r[n]]=t[r[n]];return this.ri||(bs.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:i}),this.ri=!0),i}getFlagPayloads(){var e=this._instance.get_property(ks),t=this._instance.get_property(Ss);if(!t)return e||{};for(var i=Ht({},e||{}),r=Object.keys(t),n=0;n<r.length;n++)i[r[n]]=t[r[n]];return this.ri||(bs.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:i}),this.ri=!0),i}reloadFeatureFlags(){this.oi||this._instance.config.advanced_disable_feature_flags||this.vi||(this.vi=setTimeout((()=>{this.ci()}),5))}fi(){clearTimeout(this.vi),this.vi=void 0}ensureFlagsLoaded(){this.si||this.ni||this.vi||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.oi=e}ci(e){var t;if(this.fi(),!this._instance.O())if(this.ni)this.ai=!0;else{var i=this._instance.config.token,r=this._instance.get_property("$device_id"),n={token:i,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:A({},(null==(t=this._instance.persistence)?void 0:t.get_initial_props())||{},this._instance.get_property(fi)||{}),group_properties:this._instance.get_property(gi)};Q(r)||J(r)||(n.$device_id=r),(null!=e&&e.disableFlags||this._instance.config.advanced_disable_feature_flags)&&(n.disable_flags=!0),this.di()&&(n.evaluation_environments=this.hi());var s=this._instance.config.__preview_remote_config,o=s?"/flags/?v=2":"/flags/?v=2&config=true",a=this._instance.config.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":"",l=this._instance.requestRouter.endpointFor("flags",o+a);s&&(n.timezone=mn()),this.ni=!0,this._instance._send_request({method:"POST",url:l,data:n,compression:this._instance.config.disable_compression?void 0:cr.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:e=>{var t,i,r=!0;if(200===e.statusCode&&(this.ai||(this.$anon_distinct_id=void 0),r=!1),this.ni=!1,this.li||(this.li=!0,this._instance.pi(null!==(i=e.json)&&void 0!==i?i:{})),!n.disable_flags||this.ai)if(this.ui=!r,e.json&&null!=(t=e.json.quotaLimited)&&t.includes($s.FeatureFlags))bs.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more.");else{var s;n.disable_flags||this.receivedFeatureFlags(null!==(s=e.json)&&void 0!==s?s:{},r),this.ai&&(this.ai=!1,this.ci())}}})}}getFeatureFlag(e,t){if(void 0===t&&(t={}),this.si||this.getFlags()&&this.getFlags().length>0){var i=this.getFlagVariants()[e],r=""+i,n=this._instance.get_property(Ps)||void 0,s=this._instance.get_property(Is)||void 0,o=this._instance.get_property(m
vendor: 6,352 bytes, line 1
1i)||{};if((t.send_event||!("send_event"in t))&&(!(e in o)||!o[e].includes(r))){var a,l,c,u,h,d,p,v,f;z(o[e])?o[e].push(r):o[e]=[r],null==(a=this._instance.persistence)||a.register({[mi]:o});var g=this.getFeatureFlagDetails(e),_={$feature_flag:e,$feature_flag_response:i,$feature_flag_payload:this.getFeatureFlagPayload(e)||null,$feature_flag_request_id:n,$feature_flag_evaluated_at:s,$feature_flag_bootstrapped_response:(null==(l=this._instance.config.bootstrap)||null==(l=l.featureFlags)?void 0:l[e])||null,$feature_flag_bootstrapped_payload:(null==(c=this._instance.config.bootstrap)||null==(c=c.featureFlagPayloads)?void 0:c[e])||null,$used_bootstrap_value:!this.ui};J(null==g||null==(u=g.metadata)?void 0:u.version)||(_.$feature_flag_version=g.metadata.version);var m,y=null!==(h=null==g||null==(d=g.reason)?void 0:d.description)&&void 0!==h?h:null==g||null==(p=g.reason)?void 0:p.code;y&&(_.$feature_flag_reason=y),null!=g&&null!=(v=g.metadata)&&v.id&&(_.$feature_flag_id=g.metadata.id),J(null==g?void 0:g.original_variant)&&J(null==g?void 0:g.original_enabled)||(_.$feature_flag_original_response=J(g.original_variant)?g.original_enabled:g.original_variant),null!=g&&null!=(f=g.metadata)&&f.original_payload&&(_.$feature_flag_original_payload=null==g||null==(m=g.metadata)?void 0:m.original_payload),this._instance.capture("$feature_flag_called",_)}return i}bs.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,r={distinct_id:this._instance.get_distinct_id(),token:i};this.di()&&(r.evaluation_environments=this.hi()),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2&config=true"),data:r,compression:this._instance.config.disable_compression?void 0:cr.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:i=>{var r,n=null==(r=i.json)?void 0:r.featureFlagPayloads;t((null==n?void 0:n[e])||void 0)}})}isFeatureEnabled(e,t){if(void 0===t&&(t={}),this.si||this.getFlags()&&this.getFlags().length>0){var i=this.getFeatureFlag(e,t);return J(i)?void 0:!!i}bs.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.si=!0;var i=this.getFlagVariants(),r=this.getFlagPayloads(),n=this.getFlagsWithDetails();!function(e,t,i,r,n){void 0===i&&(i={}),void 0===r&&(r={}),void 0===n&&(n={});var s=(e=>{var t=e.flags;return t?(e.featureFlags=Object.fromEntries(Object.keys(t).map((e=>{var i;return[e,null!==(i=t[e].variant)&&void 0!==i?i:t[e].enabled]}))),e.featureFlagPayloads=Object.fromEntries(Object.keys(t).filter((e=>t[e].enabled)).filter((e=>{var i;return null==(i=t[e].metadata)?void 0:i.payload})).map((e=>{var i;return[e,null==(i=t[e].metadata)?void 0:i.payload]})))):bs.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e})(e),o=s.flags,a=s.featureFlags,l=s.featureFlagPayloads;if(a){var c=e.requestId,u=e.evaluatedAt;if(z(a)){bs.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var h={};if(a)for(var d=0;d<a.length;d++)h[a[d]]=!0;t&&t.register({[Es]:a,[di]:h})}else{var p=a,v=l,f=o;e.errorsWhileComputingFlags&&(p=A({},i,p),v=A({},r,v),f=A({},n,f)),t&&t.register(A({[Es]:Object.keys(Ts(p)),[di]:p||{},[ks]:v||{},[vi]:f||{}},c?{[Ps]:c}:{},u?{[Is]:u}:{}))}}}(e,this._instance.persistence,i,r,n),this.gi(t)}}override(e,t){void 0===t&&(t=!1),bs.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this._instance.persistence)return bs.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(!1===e)return this._instance.persistence.unregister(xs),this._instance.persistence.unregister(Ss),this.gi(),ws.info("All overrides cleared");if(e&&"object"==typeof e&&("flags"in e||"payloads"in e)){var t,i=e;if(this.ri=Boolean(null!==(t=i.suppressWarning)&&void 0!==t&&t),"flags"in i)if(!1===i.flags)this._instance.persistence.unregister(xs),ws.info("Flag overrides cleared");else if(i.flags){if(z(i.flags)){for(var r={},n=0;n<i.flags.length;n++)r[i.flags[n]]=!0;this._instance.persistence.register({[xs]:r})}else this._instance.persistence.register({[xs]:i.flags});ws.info("Flag overrides set",{flags:i.flags})}return"payloads"in i&&(!1===i.payloads?(this._instance.persistence.unregister(Ss),ws.info("Payload overrides cleared")):i.payloads&&(this._instance.persistence.register({[Ss]:i.payloads}),ws.info("Payload overrides set",{payloads:i.payloads}))),void this.gi()}this.gi()}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.si){var{flags:t,flagVariants:i}=this.mi();e(t,i)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,i){var r,n=(this._instance.get_property(pi)||[]).find((t=>t.flagKey===e)),s={["$feature_enrollment/"+e]:t},o={$feature_flag:e,$feature_enrollment:t,$set:s};n&&(o.$early_access_feature_name=n.name),i&&(o.$feature_enrollment_stage=i),this._instance.capture("$feature_enrollment_update",o),this.setPersonPropertiesForFlags(s,!1);var a=A({},this.getFlagVariants(),{[e]:t});null==(r=this._instance.persistence)||r.register({[Es]:Object.keys(Ts(a)),[di]:a}),this.gi()}getEarlyAccessFeatures(e,t,i){void 0===t&&(t=!1);var r=this._instance.get_property(pi),n=i?"&"+i.map((e=>"stage="+e)).join("&"):"";if(r&&!t)return e(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this._instance.config.token+n),method:"GET",callback:t=>{var i,r;if(t.json){var n=t.json.earlyAccessFeatures;return null==(i=this._instance.persistence)||i.unregister(pi),null==(r=this._instance.persistence)||r.register({[pi]:n}),e(n)}}})}mi(){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)),{})}}gi(e){var{flags:t,flagVariants:i}=this.mi();
1this.featureFlagEventHandlers.forEach((r=>r(t,i,{errorsLoading:e})))}setPersonPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=this._instance.get_property(fi)||{};this._instance.register({[fi]:A({},i,e)}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(fi)}setGroupPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=this._instance.get_property(gi)||{};0!==Object.keys(i).length&&Object.keys(i).forEach((t=>{i[t]=A({},i[t],e[t]),delete e[t]})),this._instance.register({[gi]:A({},i,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this._instance.get_property(gi)||{};this._instance.register({[gi]:A({},t,{[e]:{}})})}else this._instance.unregister(gi)}reset(){this.si=!1,this.ni=!1,this.oi=!1,this.ai=!1,this.li=!1,this.ui=!1,this.$anon_distinct_id=void 0,this.fi(),this.ri=!1}}var Cs=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class Rs{constructor(e,t){this.R=e,this.props={},this.bi=!1,this.yi=(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.Y=this.wi(e),this.load(),e.debug&&At.info("Persistence loaded",e.persistence,A({},this.props)),this.update_config(e,e,t),this.save()}isDisabled(){return!!this.xi}wi(e){-1===Cs.indexOf(e.persistence.toLowerCase())&&(At.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t=e.persistence.toLowerCase();return"localstorage"===t&&Cr.H()?Cr:"localstorage+cookie"===t&&Fr.H()?Fr:"sessionstorage"===t&&Lr.H()?Lr:"memory"===t?Mr:"cookie"===t?$r:Fr.H()?Fr:$r}properties(){var e={};return Ut(this.props,(function(t,i){if(i===di&&Y(t))for(var r=Object.keys(t),n=0;n<r.length;n++)e["$feature/"+r[n]]=t[r[n]];else o=i,a=!1,(Q(s=Ti)?a:E&&s.indexOf===E?-1!=s.indexOf(o):(Ut(s,(function(e){if(a||(a=e===o))return Nt})),a))||(e[i]=t);var s,o,a})),e}load(){if(!this.xi){var e=this.Y.W(this.yi);e&&(this.props=Ht({},e))}}save(){this.xi||this.Y.G(this.yi,this.props,this.Ei,this.$i,this.Si,this.R.debug)}remove(){this.Y.V(this.yi,!1),this.Y.V(this.yi,!0)}clear(){this.remove(),this.props={}}register_once(e,t,i){if(Y(e)){J(t)&&(t="None"),this.Ei=J(i)?this.ki:i;var r=!1;if(Ut(e,((e,i)=>{this.props.hasOwnProperty(i)&&this.props[i]!==t||(this.props[i]=e,r=!0)})),r)return this.save(),!0}return!1}register(e,t){if(Y(e)){this.Ei=J(t)?this.ki:t;var i=!1;if(Ut(e,((t,r)=>{e.hasOwnProperty(r)&&this.props[r]!==t&&(this.props[r]=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.bi){var e=hn(this.R.custom_campaign_params,this.R.mask_personal_data_properties,this.R.custom_personal_data_properties);X(zt(e))||this.register(e),this.bi=!0}}update_search_keyword(){var e;this.register((e=null==k?void 0:k.referrer)?pn(e):{})}update_referrer_info(){var e;this.register_once({$referrer:fn(),$referring_domain:null!=k&&k.referrer&&(null==(e=ur(k.referrer))?void 0:e.host)||"$direct"},void 0)}set_initial_person_info(){this.props[Ei]||this.props[xi]||this.register_once({[ki]:gn(this.R.mask_personal_data_properties,this.R.custom_personal_data_properties)},void 0)}get_initial_props(){var e={};Ut([xi,Ei],(t=>{var i=this.props[t];i&&Ut(i,(function(t,i){e["$initial_"+H(i)]=t}))}));var t,i,r=this.props[ki];if(r){var n=(t=_n(r),i={},Ut(t,(function(e,t){i["$initial_"+H(t)]=e})),i);Ht(e,n)}return e}safe_merge(e){return Ut(this.props,(function(t,i){i in e||(e[i]=t)})),e}update_config(e,t,i){if(this.ki=this.Ei=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 r=this.wi(e),n=this.props;this.clear(),this.Y=r,this.props=n,this.save()}}set_disabled(e){this.xi=e,this.xi?this.remove():this.save()}set_cross_subdomain(e){e!==this.$i&&(this.$i=e,this.remove(),this.save())}set_secure(e){e!==this.Si&&(this.Si=e,this.remove(),this.save())}set_event_timer(e,t){var i=this.props[Qt]||{};i[e]=t,this.props[Qt]=i,this.save()}remove_event_timer(e){var t=(this.props[Qt]||{})[e];return J(t)||(delete this.props[Qt][e],this.save()),t}get_property(e){return this.props[e]}set_property(e,t){this.props[e]=t,this.save()}}var Fs=Mt("[Product Tours]"),As="ph_product_tours";class Ms{constructor(e){this.Pi=null,this.Ti=null,this._instance=e}onRemoteConfig(e){this._instance.persistence&&this._instance.persistence.register({[ai]:!(null==e||!e.productTours)}),this.loadIfEnabled()}loadIfEnabled(){var e,t;this.Pi||(e=this._instance).config.disable_product_tours||null==(t=e.persistence)||!t.get_property(ai)||this.it((()=>this.Ii()))}it(e){var t,i;null!=(t=O.__PosthogExtensions__)&&t.generateProductTours?e():null==(i=O.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"product-tours",(t=>{t?Fs.error("Could not load product tours script",t):e()}))}Ii(){var e;!this.Pi&&null!=(e=O.__PosthogExtensions__)&&e.generateProductTours&&(this.Pi=O.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(void 0===t&&(t=!1),!z(this.Ti)||t){var i=this._instance.persistence;if(i){var r=i.props[As];if(z(r)&&!t)return this.Ti=r,void e(r,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:t=>{var r=t.statusCode;if(200!==r||!t.json){var n="Product Tours API could not be loaded, status: "+r;return Fs.error(n),void e([],{isLoaded:!1,error:n})}var s=z(t.json.product_tours)?t.json.product_tours:[];this.Ti=s,i&&i.register({[As]:s}),e(s,{isLoaded:!0})}})}else e(this.Ti,{isLoaded:!0})}getActiveProductTours(e){ee(this.Pi)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this.Pi.getActiveProductTours(e)}showProductTour(e){var t;null==(t=this.Pi)||t.showTourById(e)}previewTour(e){this.Pi?this.Pi.previewTour(e):this.it((()=>{var t;this.Ii(),null==(t=this.Pi)||t.previewTour(e)}))}dismissProductTour(){var e;null==(e=this.Pi)||e.dismissTour("user_clicked_skip")}nextStep(){var e;null==(e=this.Pi)||e.nextStep()}previousStep(){var e;null==(e=this.Pi)||e.previousStep()}clearCache(){var e;this.Ti=null,null==(e=this._instance.persistence)||e.unregister(As)}resetTour(e){var t;null==(t=this.Pi)||t.resetTour(e)}resetAllTours(){var e;null==(e=this.Pi)||e.resetAllTours()}cancelPendingTour(e){var t;null==(t=this.Pi)||t.cancelPendingTour(e)}}var Ds=function(e){return e.Activation="events",e.Cancellation="cancelEvents",e}({}),Ls=(function(e){e.Button="button",e.Tab="tab",e.Selector="selector"}({}),function(e){e.TopLeft="top_left",e.TopRight="top_right",e.TopCenter="top_center",e.MiddleLeft="middle_left",e.MiddleRight="middle_right",e.MiddleCenter="middle_center",e.Left="left",e.Center="center",e.Right="right",e.NextToTrigger="next_to_trigger"}({}),function(e){e.Top="top",e.Left="left",e.Right="right",e.Bottom="bottom"}({}),function(e){return e.Popover="popover",e.API="api",e.Widget="widget",e.ExternalSurvey="external_survey",e}({})),Ns=(function(e){e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link"}({}),function(e){e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question"}({}),function(e){e.Once="once",e.Recurring="recurring",e.Always="always"}({}),function(e){return e.SHOWN="survey shown",e.DISMISSED="survey dismissed",e.SENT="survey sent",e.ABANDONED="survey abandoned",e}({})),js=function(e){return e.SURVEY_ID="$survey_id",e.SURVEY_NAME="$survey_name",e.SURVEY_RESPONSE="$survey_response",e.SURVEY_ITERATION="$survey_iteration",e.SURVEY_ITERATION_
1START_DATE="$survey_iteration_start_date",e.SURVEY_PARTIALLY_COMPLETED="$survey_partially_completed",e.SURVEY_SUBMISSION_ID="$survey_submission_id",e.SURVEY_QUESTIONS="$survey_questions",e.SURVEY_COMPLETED="$survey_completed",e.PRODUCT_TOUR_ID="$product_tour_id",e}({}),Us=function(e){return e.Popover="popover",e.Inline="inline",e}({}),Hs=Mt("[Surveys]"),qs="seenSurvey_",Ws=(e,t)=>{var i="$survey_"+t+"/"+e.id;return e.current_iteration&&e.current_iteration>0&&(i="$survey_"+t+"/"+e.id+"/"+e.current_iteration),i},Bs=e=>((e,t)=>{var i=""+e+t.id;return t.current_iteration&&t.current_iteration>0&&(i=""+e+t.id+"_"+t.current_iteration),i})(qs,e),Gs=[Ls.Popover,Ls.Widget,Ls.API],zs={ignoreConditions:!1,ignoreDelay:!1,displayType:Us.Popover};class Vs{constructor(){this.Ci={},this.Ci={}}on(e,t){return this.Ci[e]||(this.Ci[e]=[]),this.Ci[e].push(t),()=>{this.Ci[e]=this.Ci[e].filter((e=>e!==t))}}emit(e,t){for(var i of this.Ci[e]||[])i(t);for(var r of this.Ci["*"]||[])r(e,t)}}function Ys(e,t,i){if(ee(e))return!1;switch(i){case"exact":return e===t;case"contains":var r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(r,"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch(e){return!1}default:return!1}}class Xs{constructor(e){this.Ri=new Vs,this.Fi=(e,t)=>this.Mi(e,t)&&this.Oi(e,t)&&this.Ai(e,t)&&this.Di(e,t),this.Mi=(e,t)=>null==t||!t.event||(null==e?void 0:e.event)===(null==t?void 0:t.event),this._instance=e,this.ji=new Set,this.Li=new Set}init(){var e,t;J(null==(e=this._instance)?void 0:e.Ni)||(null==(t=this._instance)||t.Ni(((e,t)=>{this.on(e,t)})))}register(e){var t,i;if(!J(null==(t=this._instance)?void 0:t.Ni)&&(e.forEach((e=>{var t,i;null==(t=this.Li)||t.add(e),null==(i=e.steps)||i.forEach((e=>{var t;null==(t=this.ji)||t.add((null==e?void 0:e.event)||"")}))})),null!=(i=this._instance)&&i.autocapture)){var r,n=new Set;e.forEach((e=>{var t;null==(t=e.steps)||t.forEach((e=>{null!=e&&e.selector&&n.add(null==e?void 0:e.selector)}))})),null==(r=this._instance)||r.autocapture.setElementSelectors(n)}}on(e,t){var i;null!=t&&0!=e.length&&(this.ji.has(e)||this.ji.has(null==t?void 0:t.event))&&this.Li&&(null==(i=this.Li)?void 0:i.size)>0&&this.Li.forEach((e=>{this.Ui(t,e)&&this.Ri.emit("actionCaptured",e.name)}))}zi(e){this.onAction("actionCaptured",(t=>e(t)))}Ui(e,t){if(null==(null==t?void 0:t.steps))return!1;for(var i of t.steps)if(this.Fi(e,i))return!0;return!1}onAction(e,t){return this.Ri.on(e,t)}Oi(e,t){if(null!=t&&t.url){var i,r=null==e||null==(i=e.properties)?void 0:i.$current_url;if(!r||"string"!=typeof r)return!1;if(!Ys(r,t.url,t.url_matching||"contains"))return!1}return!0}Ai(e,t){return!!this.Hi(e,t)&&!!this.Bi(e,t)&&!!this.qi(e,t)}Hi(e,t){var i;if(null==t||!t.href)return!0;var r=this.Wi(e);if(r.length>0)return r.some((e=>Ys(e.href,t.href,t.href_matching||"exact")));var n,s=(null==e||null==(i=e.properties)?void 0:i.$elements_chain)||"";return!!s&&Ys((n=s.match(/(?::|")href="(.*?)"/))?n[1]:"",t.href,t.href_matching||"exact")}Bi(e,t){var i;if(null==t||!t.text)return!0;var r=this.Wi(e);if(r.length>0)return r.some((e=>Ys(e.text,t.text,t.text_matching||"exact")||Ys(e.$el_text,t.text,t.text_matching||"exact")));var n,s,o,a=(null==e||null==(i=e.properties)?void 0:i.$elements_chain)||"";return!!a&&(n=function(e){for(var t,i=[],r=/(?::|")text="(.*?)"/g;!ee(t=r.exec(e));)i.includes(t[1])||i.push(t[1]);return i}(a),s=t.text,o=t.text_matching||"exact",n.some((e=>Ys(e,s,o))))}qi(e,t){var i,r;if(null==t||!t.selector)return!0;var n=null==e||null==(i=e.properties)?void 0:i.$element_selectors;if(null!=n&&n.includes(t.selector))return!0;var s=(null==e||null==(r=e.properties)?void 0:r.$elements_chain)||"";if(t.selector_regex&&s)try{return new RegExp(t.selector_regex).test(s)}catch(e){return!1}return!1}Wi(e){var t;return null==(null==e||null==(t=e.properties)?void 0:t.$elements)?[]:null==e?void 0:e.properties.$elements}Di(e,t){return null==t||!t.properties||0===t.properties.length||_s(t.properties.reduce(((e,t)=>{var i=z(t.value)?t.value.map(String):null!=t.value?[String(t.value)]:[];return e[t.key]={values:i,operator:t.operator||"exact"},e}),{}),null==e?void 0:e.properties)}}class Js extends class{constructor(e){this._instance=e,this.Gi=new Map,this.Vi=new Map,this.Ji=new Map}Ki(e,t){return!!e&&_s(e.propertyFilters,null==t?void 0:t.properties)}Yi(e,t){var i=new Map;return e.forEach((e=>{var r;null==(r=e.conditions)||null==(r=r[t])||null==(r=r.values)||r.forEach((t=>{if(null!=t&&t.name){var r=i.get(t.name)||[];r.push(e.id),i.set(t.name,r)}}))})),i}Xi(e,t,i){var r=(i===Ds.Activation?this.Gi:this.Vi).get(e),n=[];return this.Qi((e=>{n=e.filter((e=>null==r?void 0:r.includes(e.id)))})),n.filter((r=>{var n,s=null==(n=r.conditions)||null==(n=n[i])||null==(n=n.values)?void 0:n.find((t=>t.name===e));return this.Ki(s,t)}))}register(e){var t;J(null==(t=this._instance)?void 0:t.Ni)||(this.Zi(e),this.te(e))}te(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.ie&&(this.ie=new Xs(this._instance),this.ie.init(),this.ie.zi((e=>{this.onAction(e)}))),t.forEach((e=>{var t,i,r,n,s;e.conditions&&null!=(t=e.conditions)&&t.actions&&null!=(i=e.conditions)&&null!=(i=i.actions)&&i.values&&(null==(r=e.conditions)||null==(r=r.actions)||null==(r=r.values)?void 0:r.length)>0&&(null==(n=this.ie)||n.register(e.conditions.actions.values),null==(s=e.conditions)||null==(s=s.actions)||null==(s=s.values)||s.forEac
1h((t=>{if(t&&t.name){var i=this.Ji.get(t.name);i&&i.push(e.id),this.Ji.set(t.name,i||[e.id])}})))})))}Zi(e){var t,i=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})),r=e.filter((e=>{var t,i;return(null==(t=e.conditions)?void 0:t.cancelEvents)&&(null==(i=e.conditions)||null==(i=i.cancelEvents)||null==(i=i.values)?void 0:i.length)>0}));0===i.length&&0===r.length||(null==(t=this._instance)||t.Ni(((e,t)=>{this.onEvent(e,t)})),this.Gi=this.Yi(e,Ds.Activation),this.Vi=this.Yi(e,Ds.Cancellation))}onEvent(e,t){var i,r=this.ee(),n=this.re(),s=this.se(),o=(null==(i=this._instance)||null==(i=i.persistence)?void 0:i.props[n])||[];if(s===e&&t&&o.length>0){var a,l;r.info("event matched, removing item from activated items",{event:e,eventPayload:t,existingActivatedItems:o});var c=(null==t||null==(a=t.properties)?void 0:a.$survey_id)||(null==t||null==(l=t.properties)?void 0:l.$product_tour_id);if(c){var u=o.indexOf(c);u>=0&&(o.splice(u,1),this.ne(o))}}else{if(this.Vi.has(e)){var h=this.Xi(e,t,Ds.Cancellation);h.length>0&&(r.info("cancel event matched, cancelling items",{event:e,itemsToCancel:h.map((e=>e.id))}),h.forEach((e=>{var t=o.indexOf(e.id);t>=0&&o.splice(t,1),this.oe(e.id)})),this.ne(o))}if(this.Gi.has(e)){r.info("event name matched",{event:e,eventPayload:t,items:this.Gi.get(e)});var d=this.Xi(e,t,Ds.Activation);this.ne(o.concat(d.map((e=>e.id))||[]))}}}onAction(e){var t,i=this.re(),r=(null==(t=this._instance)||null==(t=t.persistence)?void 0:t.props[i])||[];this.Ji.has(e)&&this.ne(r.concat(this.Ji.get(e)||[]))}ne(e){var t,i=this.ee(),r=this.re(),n=[...new Set(e)].filter((e=>!this.ae(e)));i.info("updating activated items",{activatedItems:n}),null==(t=this._instance)||null==(t=t.persistence)||t.register({[r]:n})}getActivatedIds(){var e,t=this.re();return(null==(e=this._instance)||null==(e=e.persistence)?void 0:e.props[t])||[]}getEventToItemsMap(){return this.Gi}le(){return this.ie}}{constructor(e){super(e)}re(){return"$surveys_activated"}se(){return Ns.SHOWN}Qi(e){var t;null==(t=this._instance)||t.getSurveys(e)}oe(e){var t;null==(t=this._instance)||t.cancelPendingSurvey(e)}ee(){return Hs}ae(){return!1}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}class Zs{constructor(e){this.ue=void 0,this._surveyManager=null,this.he=!1,this.de=!1,this.ve=[],this._instance=e,this._surveyEventReceiver=null}onRemoteConfig(e){if(!this._instance.config.disable_surveys){var t=e.surveys;if(ee(t))return Hs.warn("Flags not loaded yet. Not loading surveys.");var i=z(t);this.ue=i?t.length>0:t,Hs.info("flags response received, isSurveysEnabled: "+this.ue),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var i=localStorage.key(t);(null!=i&&i.startsWith(qs)||null!=i&&i.startsWith("inProgressSurvey_"))&&e.push(i)}e.forEach((e=>localStorage.removeItem(e)))}loadIfEnabled(){if(!this._surveyManager)if(this.de)Hs.info("Already initializing surveys, skipping...");else if(this._instance.config.disable_surveys)Hs.info("Disabled. Not loading surveys.");else if(this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())Hs.info("Not loading surveys in cookieless mode without consent.");else{var e=null==O?void 0:O.__PosthogExtensions__;if(e){if(!J(this.ue)||this._instance.config.advanced_enable_surveys){var t=this.ue||this._instance.config.advanced_enable_surveys;this.de=!0;try{var i=e.generateSurveys;if(i)return void this.ce(i,t);var r=e.loadExternalDependency;if(!r)return void this.fe("PostHog loadExternalDependency extension not found.");r(this._instance,"surveys",(i=>{i||!e.generateSurveys?this.fe("Could not load surveys script",i):this.ce(e.generateSurveys,t)}))}catch(e){throw this.fe("Error initializing surveys",e),e}finally{this.de=!1}}}else Hs.error("PostHog Extensions not found.")}}ce(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new Js(this._instance),Hs.info("Surveys loaded successfully"),this.pe({isLoaded:!0})}fe(e,t){Hs.error(e,t),this.pe({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.ve.push(e),this._surveyManager&&this.pe({isLoaded:!0}),()=>{this.ve=this.ve.filter((t=>t!==e))}}getSurveys(e,t){if(void 0===t&&(t=!1),this._instance.config.disable_surveys)return Hs.info("Disabled. Not loading surveys."),e([]);var i=this._instance.get_property(_i);if(i&&!t)return e(i,{isLoaded:!0});if(this.he)return e([],{isLoaded:!1,error:"Surveys are already being loaded"});try{this.he=!0,this._instance._send_request({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=>{var i;this.he=!1;var r=t.statusCode;if(200!==r||!t.json){var n="Surveys API could not be loaded, status: "+r;return Hs.error(n),e([],{isLoaded:!1,error:n})}var s,o=t.json.surveys||[],a=o.filter((e=>function(e){return!(!e.start_date||e.end_date)}(e)&&(function(e){var t;return!(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||!t.length)}(e)||function(e){var t;return!(null==(t=e.conditions)||null==(t=t.actions)||null==(t=t.values)||!t.length)}(e))));return a.length>0&&(null==(s=this._surveyEventReceiver)||s.register(a)),null==(i=this._instance.persistence)||i.register({[_i]:o}),e(o,{isLoaded:!0})}})}catch(e){throw this.he=!1,e}}pe(e){for(var t of this.ve)try{if(!e.isLoaded)return t([],e);
1this.getSurveys(t)}catch(e){Hs.error("Error in survey callback",e)}}getActiveMatchingSurveys(e,t){if(void 0===t&&(t=!1),!ee(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);Hs.warn("init was not called")}ge(e){var t=null;return this.getSurveys((i=>{var r;t=null!==(r=i.find((t=>t.id===e)))&&void 0!==r?r:null})),t}_e(e){if(ee(this._surveyManager))return{eligible:!1,reason:"SDK is not enabled or survey functionality is not yet loaded"};var t="string"==typeof e?this.ge(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(ee(this._surveyManager))return Hs.warn("init was not called"),{visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"};var t=this._e(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return ee(this._surveyManager)?(Hs.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 r,n=null!==(r=t.find((t=>t.id===e)))&&void 0!==r?r:null;if(n){var s=this._e(n);i({visible:s.eligible,disabledReason:s.reason})}else i({visible:!1,disabledReason:"Survey not found"})}),t)}))}renderSurvey(e,t){var i;if(ee(this._surveyManager))Hs.warn("init was not called");else{var r="string"==typeof e?this.ge(e):e;if(null!=r&&r.id)if(Gs.includes(r.type)){var n=null==k?void 0:k.querySelector(t);if(n)return null!=(i=r.appearance)&&i.surveyPopupDelaySeconds?(Hs.info("Rendering survey "+r.id+" with delay of "+r.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((()=>{var e,t;Hs.info("Rendering survey "+r.id+" with delay of "+(null==(e=r.appearance)?void 0:e.surveyPopupDelaySeconds)+" seconds"),null==(t=this._surveyManager)||t.renderSurvey(r,n),Hs.info("Survey "+r.id+" rendered")}),1e3*r.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(r,n);Hs.warn("Survey element not found")}else Hs.warn("Surveys of type "+r.type+" cannot be rendered in the app");else Hs.warn("Survey not found")}}displaySurvey(e,t){var i;if(ee(this._surveyManager))Hs.warn("init was not called");else{var r=this.ge(e);if(r){var n=r;if(null!=(i=r.appearance)&&i.surveyPopupDelaySeconds&&t.ignoreDelay&&(n=A({},r,{appearance:A({},r.appearance,{surveyPopupDelaySeconds:0})})),!1===t.ignoreConditions){var s=this.canRenderSurvey(r);if(!s.visible)return void Hs.warn("Survey is not eligible to be displayed: ",s.disabledReason)}t.displayType!==Us.Inline?this._surveyManager.handlePopoverSurvey(n):this.renderSurvey(n,t.selector)}else Hs.warn("Survey not found")}}cancelPendingSurvey(e){ee(this._surveyManager)?Hs.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;null==(e=this._surveyManager)||e.handlePageUnload()}}var Ks=Mt("[Conversations]");class Qs{constructor(e){this.me=void 0,this._conversationsManager=null,this.be=!1,this.ye=null,this._instance=e}onRemoteConfig(e){if(!this._instance.config.disable_conversations){var t=e.conversations;ee(t)||(ie(t)?this.me=t:(this.me=t.enabled,this.ye=t),this.loadIfEnabled())}}reset(){var e;null==(e=this._conversationsManager)||e.reset(),this._conversationsManager=null,this.me=void 0,this.ye=null}loadIfEnabled(){if(!this._conversationsManager&&!this.be&&!(this._instance.config.disable_conversations||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=null==O?void 0:O.__PosthogExtensions__;if(e&&!J(this.me)&&this.me)if(this.ye&&this.ye.token){if(function(e){var t;if(!e||0===e.length)return!0;var i=null==m||null==(t=m.location)?void 0:t.hostname;return!i||e.some((e=>{var t=function(e){var t=e.replace(/^https?:\/\//,"");return(t=t.split("/")[0].split("?")[0].split(":")[0])||null}(e);if(!t)return!1;if(t.startsWith("*.")){var r=t.slice(2);return i.endsWith("."+r)||i===r}return i===t}))}(this.ye.domains)){this.be=!0;try{var t=e.initConversations;if(t)return this.we(t),void(this.be=!1);var i=e.loadExternalDependency;if(!i)return void this.xe("PostHog loadExternalDependency extension not found.");i(this._instance,"conversations",(t=>{t||!e.initConversations?this.xe("Could not load conversations script",t):this.we(e.initConversations),this.be=!1}))}catch(m){this.xe("Error initializing conversations",m),this.be=!1}}}else Ks.error("Conversations enabled but missing token in remote config.")}}we(e){if(this.ye)try{this._conversationsManager=e(this.ye,this._instance),Ks.info("Conversations loaded successfully")}catch(e){this.xe("Error completing conversations initialization",e)}else Ks.error("Cannot complete initialization: remote config is null")}xe(e,t){Ks.error(e,t),this._conversationsManager=null,this.be=!1}enable(){this._conversationsManager?this._conversationsManager.enable():Ks.warn("Conversations not loaded yet.")}disable(){this._conversationsManager&&this._conversationsManager.disable()}isLoaded(){return!Q(this._conversationsManager)}isEnabled(){return!0===this.me}}var eo=Mt("[RateLimiter]");class to{constructor(e){var t,i;this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=e=>{var t=e.text;
1if(t&&t.length)try{(JSON.parse(t).quota_limited||[]).forEach((e=>{eo.info((e||"events")+" is quota limited."),this.serverLimits[e]=(new Date).getTime()+6e4}))}catch(e){return void eo.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){var t,i,r;void 0===e&&(e=!1);var n=(new Date).getTime(),s=null!==(t=null==(i=this.instance.persistence)?void 0:i.get_property(wi))&&void 0!==t?t:{tokens:this.captureEventsBurstLimit,last:n};s.tokens+=(n-s.last)/1e3*this.captureEventsPerSecond,s.last=n,s.tokens>this.captureEventsBurstLimit&&(s.tokens=this.captureEventsBurstLimit);var o=s.tokens<1;return o||e||(s.tokens=Math.max(0,s.tokens-1)),!o||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=o,null==(r=this.instance.persistence)||r.set_property(wi,s),{isRateLimited:o,remainingTokens:s.tokens}}isServerRateLimited(e){var t=this.serverLimits[e||"events"]||!1;return!1!==t&&(new Date).getTime()<t}}var io=Mt("[RemoteConfig]");class ro{constructor(e){this._instance=e}get remoteConfig(){var e;return null==(e=O._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.config}Ee(e){var t,i;null!=(t=O.__PosthogExtensions__)&&t.loadExternalDependency?null==(i=O.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"remote-config",(()=>e(this.remoteConfig))):(io.error("PostHog Extensions not found. Cannot load remote config."),e())}$e(e){this._instance._send_request({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 io.info("Using preloaded remote config",this.remoteConfig),void this.pi(this.remoteConfig);if(this._instance.O())return void io.warn("Remote config is disabled. Falling back to local config.");this.Ee((e=>{if(!e)return io.info("No config found after loading remote JS config. Falling back to JSON."),void this.$e((e=>{this.pi(e)}));this.pi(e)}))}catch(m){io.error("Error loading remote config",m)}}pi(e){e?this._instance.config.__preview_remote_config?(this._instance.pi(e),!1!==e.hasFeatureFlags&&this._instance.featureFlags.ensureFlagsLoaded()):io.info("__preview_remote_config is disabled. Logging config instead",e):io.error("Failed to fetch remote config from PostHog.")}}var no=3e3;class so{constructor(e,t){this.Se=!0,this.ke=[],this.Pe=ue((null==t?void 0:t.flush_interval_ms)||no,250,5e3,At.createLogger("flush interval"),no),this.Te=e}enqueue(e){this.ke.push(e),this.Ie||this.Ce()}unload(){this.Re();var e=this.ke.length>0?this.Fe():{},t=Object.values(e);[...t.filter((e=>0===e.url.indexOf("/e"))),...t.filter((e=>0!==e.url.indexOf("/e")))].map((e=>{this.Te(A({},e,{transport:"sendBeacon"}))}))}enable(){this.Se=!1,this.Ce()}Ce(){var e=this;this.Se||(this.Ie=setTimeout((()=>{if(this.Re(),this.ke.length>0){var t=this.Fe(),i=function(){var i=t[r],n=(new Date).getTime();i.data&&z(i.data)&&Ut(i.data,(e=>{e.offset=Math.abs(e.timestamp-n),delete e.timestamp})),e.Te(i)};for(var r in t)i()}}),this.Pe))}Re(){clearTimeout(this.Ie),this.Ie=void 0}Fe(){var e={};return Ut(this.ke,(t=>{var i,r=t,n=(r?r.batchKey:null)||r.url;
1J(e[n])&&(e[n]=A({},r,{data:[]})),null==(i=e[n].data)||i.push(r.data)})),this.ke=[],e}}var oo=["retriesPerformedSoFar"];class ao{constructor(e){this.Me=!1,this.Oe=3e3,this.ke=[],this._instance=e,this.ke=[],this.Ae=!0,!J(m)&&"onLine"in m.navigator&&(this.Ae=m.navigator.onLine,this.De=()=>{this.Ae=!0,this.Lt()},this.je=()=>{this.Ae=!1},Jt(m,"online",this.De),Jt(m,"offline",this.je))}get length(){return this.ke.length}retriableRequest(e){var{retriesPerformedSoFar:t}=e,i=M(e,oo);te(t)&&t>0&&(i.url=cs(i.url,{retry_count:t})),this._instance._send_request(A({},i,{callback:e=>{200!==e.statusCode&&(e.statusCode<400||e.statusCode>=500)&&(null!=t?t:0)<10?this.Le(A({retriesPerformedSoFar:t},i)):null==i.callback||i.callback(e)}}))}Le(e){var t=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=t+1;var i=function(e){var t=3e3*Math.pow(2,e),i=t/2,r=Math.min(18e5,t),n=(Math.random()-.5)*(r-i);return Math.ceil(r+n)}(t),r=Date.now()+i;this.ke.push({retryAt:r,requestOptions:e});var n="Enqueued failed request for retry in "+i;navigator.onLine||(n+=" (Browser is offline)"),At.warn(n),this.Me||(this.Me=!0,this.Ne())}Ne(){if(this.Ue&&clearTimeout(this.Ue),0===this.ke.length)return this.Me=!1,void(this.Ue=void 0);this.Ue=setTimeout((()=>{this.Ae&&this.ke.length>0&&this.Lt(),this.Ne()}),this.Oe)}Lt(){var e=Date.now(),t=[],i=this.ke.filter((i=>i.retryAt<e||(t.push(i),!1)));if(this.ke=t,i.length>0)for(var{requestOptions:r}of i)this.retriableRequest(r)}unload(){for(var{requestOptions:e}of(this.Ue&&(clearTimeout(this.Ue),this.Ue=void 0),this.Me=!1,J(m)||(this.De&&(m.removeEventListener("online",this.De),this.De=void 0),this.je&&(m.removeEventListener("offline",this.je),this.je=void 0)),this.ke))try{this._instance._send_request(A({},e,{transport:"sendBeacon"}))}catch(m){At.error(m)}this.ke=[]}}class lo{constructor(e){this.ze=()=>{var e,t,i,r;this.He||(this.He={});var n=this.scrollElement(),s=this.scrollY(),o=n?Math.max(0,n.scrollHeight-n.clientHeight):0,a=s+((null==n?void 0:n.clientHeight)||0),l=(null==n?void 0:n.scrollHeight)||0;this.He.lastScrollY=Math.ceil(s),this.He.maxScrollY=Math.max(s,null!==(e=this.He.maxScrollY)&&void 0!==e?e:0),this.He.maxScrollHeight=Math.max(o,null!==(t=this.He.maxScrollHeight)&&void 0!==t?t:0),this.He.lastContentY=a,this.He.maxContentY=Math.max(a,null!==(i=this.He.maxContentY)&&void 0!==i?i:0),this.He.maxContentHeight=Math.max(l,null!==(r=this.He.maxContentHeight)&&void 0!==r?r:0)},this._instance=e}getContext(){return this.He}resetContext(){var e=this.He;return setTimeout(this.ze,0),e}startMeasuringScrollPosition(){Jt(m,"scroll",this.ze,{capture:!0}),Jt(m,"scrollend",this.ze,{capture:!0}),Jt(m,"resize",this.ze)}scrollElement(){if(!this._instance.config.scroll_root_selector)return null==m?void 0:m.document.documentElement;var e=z(this._instance.config.scroll_root_selector)?this._instance.config.scroll_root_selector:[this._instance.config.scroll_root_selector];for(var t of e){var i=null==m?void 0:m.document.querySelector(t);if(i)return i}}scrollY(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollTop||0}return m&&(m.scrollY||m.pageYOffset||m.document.documentElement.scrollTop)||0}scrollX(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollLeft||0}return m&&(m.scrollX||m.pageXOffset||m.document.documentElement.scrollLeft)||0}}var co=e=>gn(null==e?void 0:e.config.mask_personal_data_properties,null==e?void 0:e.config.custom_personal_data_properties);class uo{constructor(e,t,i,r){this.Be=e=>{var t=this.qe();if(!t||t.sessionId!==e){var i={sessionId:e,props:this.We(this._instance)};this.Ge.register({[bi]:i})}},this._instance=e,this.Ve=t,this.Ge=i,this.We=r||co,this.Ve.onSessionId(this.Be)}qe(){return this.Ge.props[bi]}getSetOnceProps(){var e,t=null==(e=this.qe())?void 0:e.props;return t?"r"in t?_n(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 Ut(zt(this.getSetOnceProps()),((t,i)=>{"$current_url"===i&&(i="url"),e["$session_entry_"+H(i)]=t})),e}}var ho=Mt("[SessionId]");class po{on(e,t){return this.Je.on(e,t)}constructor(e,t,i){var r;if(this.Ke=[],this.Ye=void 0,this.Je=new Vs,this.Xe=(e,t)=>Math.abs(e-t)>
vendor: 8,077 bytes, line 1
1this.sessionTimeoutMs,!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if("always"===e.config.cookieless_mode)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.R=e.config,this.Ge=e.persistence,this.Qe=void 0,this.Ze=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.tr=t||Sr,this.ir=i||Sr;var n=this.R.persistence_name||this.R.token,s=this.R.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*ue(s,60,36e3,ho.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.er(),this.rr="ph_"+n+"_window_id",this.sr="ph_"+n+"_primary_window_exists",this.nr()){var o=Lr.W(this.rr),a=Lr.W(this.sr);o&&!a?this.Qe=o:Lr.V(this.rr),Lr.G(this.sr,!0)}if(null!=(r=this.R.bootstrap)&&r.sessionID)try{var l=(e=>{var t=this.R.bootstrap.sessionID.replace(/-/g,"");if(32!==t.length)throw new Error("Not a valid UUID");if("7"!==t[12])throw new Error("Not a UUIDv7");return parseInt(t.substring(0,12),16)})();this.ar(this.R.bootstrap.sessionID,(new Date).getTime(),l)}catch(e){ho.error("Invalid sessionID in bootstrap",e)}this.lr()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return J(this.Ke)&&(this.Ke=[]),this.Ke.push(e),this.Ze&&e(this.Ze,this.Qe),()=>{this.Ke=this.Ke.filter((t=>t!==e))}}nr(){return"memory"!==this.R.persistence&&!this.Ge.xi&&Lr.H()}ur(e){e!==this.Qe&&(this.Qe=e,this.nr()&&Lr.G(this.rr,e))}hr(){return this.Qe?this.Qe:this.nr()?Lr.W(this.rr):null}ar(e,t,i){e===this.Ze&&t===this._sessionActivityTimestamp&&i===this._sessionStartTimestamp||(this._sessionStartTimestamp=i,this._sessionActivityTimestamp=t,this.Ze=e,this.Ge.register({[ui]:[t,e,i]}))}dr(){var e=this.Ge.props[ui];return z(e)&&2===e.length&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.ar(null,null,null)}destroy(){clearTimeout(this.vr),this.vr=void 0,this.Ye&&m&&(m.removeEventListener("beforeunload",this.Ye,{capture:!1}),this.Ye=void 0),this.Ke=[]}lr(){this.Ye=()=>{this.nr()&&Lr.V(this.sr)},Jt(m,"beforeunload",this.Ye,{capture:!1})}checkAndGetSessionAndWindowId(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=null),"always"===this.R.cookieless_mode)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var i=t||(new Date).getTime(),[r,n,s]=this.dr(),o=this.hr(),a=te(s)&&s>0&&Math.abs(i-s)>864e5,l=!1,c=!n,u=!c&&!e&&this.Xe(i,r);c||u||a?(n=this.tr(),o=this.ir(),ho.info("new session ID generated",{sessionId:n,windowId:o,changeReason:{noSessionId:c,activityTimeout:u,sessionPastMaximumLength:a}}),s=i,l=!0):o||(o=this.ir(),l=!0);var h=0===r||!e||a?i:r,d=0===s?(new Date).getTime():s;return this.ur(o),this.ar(n,h,d),e||this.er(),l&&this.Ke.forEach((e=>e(n,o,l?{noSessionId:c,activityTimeout:u,sessionPastMaximumLength:a}:void 0))),{sessionId:n,windowId:o,sessionStartTimestamp:d,changeReason:l?{noSessionId:c,activityTimeout:u,sessionPastMaximumLength:a}:void 0,lastActivityTimestamp:r}}er(){clearTimeout(this.vr),this.vr=setTimeout((()=>{var[e]=this.dr();if(this.Xe((new Date).getTime(),e)){var t=this.Ze;this.resetSessionId(),this.Je.emit("forcedIdleReset",{idleSessionId:t})}}),1.1*this.sessionTimeoutMs)}}var vo=["$set_once","$set"],fo=Mt("[SiteApps]");class go{constructor(e){this._instance=e,this.cr=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}pr(e,t){if(t){var i=this.globalsForEvent(t);this.cr.push(i),this.cr.length>1e3&&(this.cr=this.cr.slice(10))}}get siteAppLoaders(){var e;return null==(e=O._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.siteApps}init(){if(this.isEnabled){var e=this._instance.Ni(this.pr.bind(this));this.gr=()=>{e(),this.cr=[],this.gr=void 0}}}globalsForEvent(e){var t,i,r,n,s,o,a;if(!e)throw new Error("Event payload is required");var l={},c=this._instance.get_property("$groups")||[],u=this._instance.get_property("$stored_group_properties")||{};for(var[h,d]of Object.entries(u))l[h]={id:c[h],type:h,properties:d};var{$set_once:p,$set:v}=e;return{event:A({},M(e,vo),{properties:A({},e.properties,v?{$set:A({},null!==(t=null==(i=e.properties)?void 0:i.$set)&&void 0!==t?t:{},v)}:{},p?{$set_once:A({},null!==(r=null==(n=e.properties)?void 0:n.$set_once)&&void 0!==r?r:{},p)}:{}),elements_chain:null!==(s=null==(o=e.properties)?void 0:o.$elements_chain)&&void 0!==s?s:"",distinct_id:null==(a=e.properties)?void 0:a.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.cr.length&&(fo.info("Processing "+this.cr.length+" events for site app with id "+e.id),this.cr.forEach((e=>null==t.processEvent?void 0:t.processEvent(e))),t.processedBuffer=!0),Object.values(this.apps).every((e=>e.processedBuffer||e.errored))&&(null==(i=this.gr)||i.call(this))},r=!1,n=n=>{t.errored=!n,t.loaded=!0,fo.info("Site app with id "+e.id+" "+(n?"loaded":"errored")),r&&i()};try{var{processEvent:s}=e.init({posthog:this._instance,callback:e=>{n(e)}});s&&(t.processEvent=s),r=!0}catch(t){fo.error("Error while initializing PostHog app with config id "+e.id,t),n(!1)}if(r&&t.loaded)try{i()}catch(i){fo.error("Error while processing buffered events PostHog app with config id "+e.id,i),t.errored=!0}}_r(){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)}mr(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){fo.error("Error while processing event "+e.event+" for site app "+i.id,t)}}}onRemoteConfig(e){var t,i,r,n=this;if(null!=(t=this.siteAppLoaders)&&t.length)return this.isEnabled?(this._r(),void this._instance.on("eventCaptured",(e=>this.mr(e)))):void fo.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if(null==(i=this.gr)||i.call(this),null!=(r=e.siteApps)&&r.length)if(this.isEnabled){var s=function(e){var t;O["__$$ph_site_app_"+e]=n._instance,null==(t=O.__PosthogExtensions__)||null==t.loadSiteApp||t.loadSiteApp(n._instance,a,(t=>{if(t)return fo.error("Error while initializing PostHog app with config id "+e,t)}))};for(var{id:o,url:a}of e.siteApps)s(o)}else fo.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}var _o=function(e,t){if(!e)return!1;var i=e.userAgent;if(i&&L(i,t))return!0;try{var r=null==e?void 0:e.userAgentData;if(null!=r&&r.brands&&r.brands.some((e=>L(null==e?void 0:e.brand,t))))return!0}catch(e){}return!!e.webdriver},mo=function(e){return e.US="us",e.EU="eu",e.CUSTOM="custom",e}({}),yo="i.posthog.com";class bo{constructor(e){this.br={},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 flagsApiHost(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var e,t=null==(e=this.instance.config.ui_host)?void 0:e.replace(/\/$/,"");return t||(t=this.apiHost.replace("."+yo,".posthog.com")),"https://app.posthog.com"===t?"https://us.posthog.com":t}get region(){return this.br[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.br[this.apiHost]=mo.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.br[this.apiHost]=mo.EU:this.br[this.apiHost]=mo.CUSTOM),this.br[this.apiHost]}endpointFor(e,t){if(void 0===t&&(t=""),t&&(t="/"===t[0]?t:"/"+t),"ui"===e)return this.uiHost+t;if("flags"===e)return this.flagsApiHost+t;if(this.region===mo.CUSTOM)return this.apiHost+t;var i=yo+t;switch(e){case"assets":return"https://"+this.region+"-assets."+i;case"api":return"https://"+this.region+"."+i}}}var wo={icontains:(e,t)=>!!m&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!m&&-1===t.href.toLowerCase().indexOf(e.toLowerCase()),regex:(e,t)=>!!m&&ps(t.href,e),not_regex:(e,t)=>!!m&&!ps(t.href,e),exact:(e,t)=>
1t.href===e,is_not:(e,t)=>t.href!==e};class Eo{constructor(e){var t=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getWebExperiments((e=>{Eo.yr("retrieved web experiments from the server"),t.wr=new Map,e.forEach((e=>{if(e.feature_flag_key){var i;t.wr&&(Eo.yr("setting flag key ",e.feature_flag_key," to web experiment ",e),null==(i=t.wr)||i.set(e.feature_flag_key,e));var r=t._instance.getFeatureFlag(e.feature_flag_key);Z(r)&&e.variants[r]&&t.Er(e.name,r,e.variants[r].transforms)}else if(e.variants)for(var n in e.variants){var s=e.variants[n];Eo.$r(s)&&t.Er(e.name,n,s.transforms)}}))}),e)},this._instance=e,this._instance.onFeatureFlags((e=>{this.onFeatureFlags(e)}))}onFeatureFlags(e){if(this._is_bot())Eo.yr("Refusing to render web experiment since the viewer is a likely bot");else if(!this._instance.config.disable_web_experiments){if(ee(this.wr))return this.wr=new Map,this.loadIfEnabled(),void this.previewWebExperiment();Eo.yr("applying feature flags",e),e.forEach((e=>{var t;if(this.wr&&null!=(t=this.wr)&&t.has(e)){var i,r=this._instance.getFeatureFlag(e),n=null==(i=this.wr)?void 0:i.get(e);r&&null!=n&&n.variants[r]&&this.Er(n.name,r,n.variants[r].transforms)}}))}}previewWebExperiment(){var e=Eo.getWindowLocation();if(null!=e&&e.search){var t=hr(null==e?void 0:e.search,"__experiment_id"),i=hr(null==e?void 0:e.search,"__experiment_variant");t&&i&&(Eo.yr("previewing web experiments "+t+" && "+i),this.getWebExperiments((e=>{this.Sr(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 r=this._instance.get_property("$web_experiments");if(r&&!t)return e(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this._instance.config.token),method:"GET",callback:t=>{if(200!==t.statusCode||!t.json)return e([]);var i=t.json.experiments||[];return e(i)}})}Sr(e,t,i){var r=i.filter((t=>t.id===e));r&&r.length>0&&(Eo.yr("Previewing web experiment ["+r[0].name+"] with variant ["+t+"]"),this.Er(r[0].name,t,r[0].variants[t].transforms))}static $r(e){return!ee(e.conditions)&&Eo.kr(e)&&Eo.Pr(e)}static kr(e){var t;if(ee(e.conditions)||ee(null==(t=e.conditions)?void 0:t.url))return!0;var i,r,n,s=Eo.getWindowLocation();return!!s&&(null==(i=e.conditions)||!i.url||wo[null!==(r=null==(n=e.conditions)?void 0:n.urlMatchType)&&void 0!==r?r:"icontains"](e.conditions.url,s))}
vendor: 10,328 bytes, line 1
1static getWindowLocation(){return null==m?void 0:m.location}static Pr(e){var t;if(ee(e.conditions)||ee(null==(t=e.conditions)?void 0:t.utm))return!0;var i=hn();if(i.utm_source){var r,n,s,o,a,l,c,u,h=null==(r=e.conditions)||null==(r=r.utm)||!r.utm_campaign||(null==(n=e.conditions)||null==(n=n.utm)?void 0:n.utm_campaign)==i.utm_campaign,d=null==(s=e.conditions)||null==(s=s.utm)||!s.utm_source||(null==(o=e.conditions)||null==(o=o.utm)?void 0:o.utm_source)==i.utm_source,p=null==(a=e.conditions)||null==(a=a.utm)||!a.utm_medium||(null==(l=e.conditions)||null==(l=l.utm)?void 0:l.utm_medium)==i.utm_medium,v=null==(c=e.conditions)||null==(c=c.utm)||!c.utm_term||(null==(u=e.conditions)||null==(u=u.utm)?void 0:u.utm_term)==i.utm_term;return h&&p&&v&&d}return!1}static yr(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];At.info("[WebExperiments] "+e,i)}Er(e,t,i){this._is_bot()?Eo.yr("Refusing to render web experiment since the viewer is a likely bot"):"control"!==t?i.forEach((i=>{if(i.selector){var r;Eo.yr("applying transform of variant "+t+" for experiment "+e+" ",i);var n=null==(r=document)?void 0:r.querySelectorAll(i.selector);null==n||n.forEach((e=>{var t=e;i.html&&(t.innerHTML=i.html),i.css&&t.setAttribute("style",i.css)}))}})):Eo.yr("Control variants leave the page unmodified.")}_is_bot(){return x&&this._instance?_o(x,this._instance.config.custom_blocked_useragents):void 0}}var xo=Mt("[PostHog ExternalIntegrations]"),ko={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class So{constructor(e){this._instance=e}it(e,t){var i;null==(i=O.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,e,(e=>{if(e)return xo.error("failed to load script",e);t()}))}startIfEnabledOrStop(){var e=this,t=function(t){var i,n,s;!r||null!=(i=O.__PosthogExtensions__)&&null!=(i=i.integrations)&&i[t]||e.it(ko[t],(()=>{var i;null==(i=O.__PosthogExtensions__)||null==(i=i.integrations)||null==(i=i[t])||i.start(e._instance)})),!r&&null!=(n=O.__PosthogExtensions__)&&null!=(n=n.integrations)&&n[t]&&(null==(s=O.__PosthogExtensions__)||null==(s=s.integrations)||null==(s=s[t])||s.stop())};for(var[i,r]of Object.entries(null!==(n=this._instance.config.integrations)&&void 0!==n?n:{})){var n;t(i)}}}var Po="[SessionRecording]",Io=Mt(Po);class To{get started(){var e;return!(null==(e=this.Tr)||!e.isStarted)}get status(){return this.Tr?this.Tr.status:this.Ir&&!this.Cr?"disabled":"lazy_loading"}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.Ir=!1,this.Rr=void 0,this._instance=e,!this._instance.sessionManager)throw Io.error("started without valid sessionManager"),new Error(Po+" started without valid sessionManager. This is a bug.");if("always"===this._instance.config.cookieless_mode)throw new Error(Po+' cannot be used with cookieless_mode="always"')}get Cr(){var e,t=!(null==(e=this._instance.get_property(ci))||!e.enabled),i=!this._instance.config.disable_session_recording,r=this._instance.config.disable_session_recording||this._instance.consent.isOptedOut();return m&&t&&i&&!r}startIfEnabledOrStop(e){var t;if(!this.Cr||null==(t=this.Tr)||!t.isStarted){var i=!J(Object.assign)&&!J(Array.from);this.Cr&&i?(this.Fr(e),Io.info("starting")):this.stopRecording()}}Fr(e){var t,i,r;this.Cr&&(null!=O&&null!=(t=O.__PosthogExtensions__)&&null!=(t=t.rrweb)&&t.record&&null!=(i=O.__PosthogExtensions__)&&i.initSessionRecording?this.Mr(e):null==(r=O.__PosthogExtensions__)||null==r.loadExternalDependency||r.loadExternalDependency(this._instance,this.Or,(t=>{if(t)return Io.error("could not load recorder",t);this.Mr(e)})))}stopRecording(){var e,t;null==(e=this.Rr)||e.call(this),this.Rr=void 0,null==(t=this.Tr)||t.stop()}Ar(){var e;null==(e=this._instance.persistence)||e.unregister(hi)}Dr(e){if(this._instance.persistence){var t,i,r=this._instance.persistence,n=()=>{var t=!1===e.sessionRecording?void 0:e.sessionRecording,i=null==t?void 0:t.sampleRate,n=ee(i)?null:parseFloat(i);ee(n)&&this.Ar();var s=null==t?void 0:t.minimumDurationMilliseconds;r.register({[ci]:A({enabled:!!t},t,{networkPayloadCapture:A({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:n,minimumDurationMilliseconds:J(s)?null:s,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})})};n(),null==(t=this.Rr)||t.call(this),this.Rr=null==(i=this._instance.sessionManager)?void 0:i.onSessionId(n)}}onRemoteConfig(e){"sessionRecording"in e?!1!==e.sessionRecording?(this.Dr(e),this.Ir=!0,this.startIfEnabledOrStop()):this.Ir=!0:Io.info("skipping remote config with no sessionRecording",e)}log(e,t){var i;void 0===t&&(t="log"),null!=(i=this.Tr)&&i.log?this.Tr.log(e,t):Io.warn("log called before recorder was ready")}get Or(){var e,t,i=null==(e=this._instance)||null==(e=e.persistence)?void 0:e.get_property(ci);return(null==i||null==(t=i.scriptConfig)?void 0:t.script)||"lazy-recorder"}Mr(e){var t,i;if(null==(t=O.__PosthogExtensions__)||!t.initSessionRecording)throw Error("Called on script loaded before session recording is available");this.Tr||(this.Tr=null==(i=O.__PosthogExtensions__)?void 0:i.initSessionRecording(this._instance),this.Tr._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),this.Tr.start(e)}onRRwebEmit(e){var t;null==(t=this.Tr)||null==t.onRRwebEmit||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.Tr||null==(t=this._instance.persistence)||t.register({$replay_override_linked_flag:!0}),null==(e=this.Tr)||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.Tr||null==(t=this._instance.persistence)||t.register({$replay_override_sampling:!0}),null==(e=this.Tr)||e.overrideSampling()}overrideTrigger(e){var t,i;this.Tr||null==(i=this._instance.persistence)||i.register({["url"===e?"$replay_override_url_trigger":"$replay_override_event_trigger"]:!0}),null==(t=this.Tr)||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return(null==(e=this.Tr)?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var i;return!(null==(i=this.Tr)||!i.tryAddCustomEvent(e,t))}}var $o={},Oo=()=>{},Co="posthog",Ro=!as&&-1===(null==$?void 0:$.indexOf("MSIE"))&&-1===(null==$?void 0:$.indexOf("Mozilla")),Fo=e=>{var t;return A({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:Yt(null==k?void 0:k.location),persistence:"localStorage+cookie",persistence_name:"",loaded:Oo,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:null!=e?e:"unset",__preview_deferred_init_extensions:!1,debug:S&&Z(null==S?void 0:S.search)&&-1!==S.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_conversations:!1,disable_product_tours:!0,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:"https:"===(null==m||null==(t=m.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,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;At.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:no},error_tracking:{},_onCapture:Oo,__preview_eager_load_replay:!1},(e=>({rageclick:!(e&&e>="2025-11-30")||{content_ignorelist:!0},capture_pageview:!(e&&e>="2025-05-24")||"history_change",session_recording:e&&e>="2025-11-30"?{strictMinimumDuration:!0}:{}}))(e))},Ao=e=>{var t={};J(e.process_person)||(t.person_profiles=e.process_person),J(e.xhr_headers)||(t.request_headers=e.xhr_headers),J(e.cookie_name)||(t.persistence_name=e.cookie_name),J(e.disable_cookie)||(t.disable_persistence=e.disable_cookie),J(e.store_google)||(t.save_campaign_params=e.store_google),J(e.verbose)||(t.debug=e.verbose);var i=Ht({},t,e);return z(e.property_blacklist)&&(J(e.property_denylist)?i.property_denylist=e.property_blacklist:z(e.property_denylist)?i.property_denylist=[...e.property_blacklist,...e.property_denylist]:At.error("Invalid value for property_denylist config: "+e.property_denylist)),i};class Mo{constructor(){this.__forceAllowLocalhost=!1}get jr(){return this.__forceAllowLocalhost}set jr(e){At.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class Do{get decideEndpointWasHit(){var e,t;return null!==(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&void 0!==e&&e}get flagsEndpointWasHit(){var e,t;return null!==(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&void 0!==e&&e}constructor(){this.webPerformance=new Mo,this.Lr=!1,this.version=C.LIB_VERSION,this.Nr=new Vs,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=Fo(),this.SentryIntegration=Zr,this.sentryIntegration=e=>function(e,t){var i=Jr(e,t);return{name:Xr,processEvent:e=>i(e)}}(this,e),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Ur=!1,this.zr=null,this.Hr=null,this.Br=null,this.featureFlags=new Os(this),this.toolbar=ne
1w rn(this),this.scrollManager=new lo(this),this.pageViewManager=new In(this),this.surveys=new Zs(this),this.conversations=new Qs(this),this.experiments=new Eo(this),this.exceptions=new ys(this),this.rateLimiter=new to(this),this.requestRouter=new bo(this),this.consent=new jr(this),this.externalIntegrations=new So(this),this.people={set:(e,t,i)=>{var r=Z(e)?{[e]:t}:e;this.setPersonProperties(r),null==i||i({})},set_once:(e,t,i)=>{var r=Z(e)?{[e]:t}:e;this.setPersonProperties(void 0,r),null==i||i({})}},this.on("eventCaptured",(e=>At.info('send "'+(null==e?void 0:e.event)+'"',e)))}init(e,t,i){if(i&&i!==Co){var r,n=null!==(r=$o[i])&&void 0!==r?r:new Do;return n._init(e,t,i),$o[i]=n,$o[Co][i]=n,n}return this._init(e,t,i)}_init(e,t,i){var r;if(void 0===t&&(t={}),J(e)||K(e))return At.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 console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},t.debug=this.qr(t.debug),this.Wr=t,this.Gr=[],t.person_profiles&&(this.Hr=t.person_profiles),this.set_config(Ht({},Fo(t.defaults),Ao(t),{name:i,token:e})),this.config.on_xhr_error&&At.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=t.disable_compression?void 0:cr.GZipJS;var n=this.Vr();this.persistence=new Rs(this.config,n),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new Rs(A({},this.config,{persistence:"sessionStorage"}),n);var s=A({},this.persistence.props),o=A({},this.sessionPersistence.props);this.register({$initialization_time:(new Date).toISOString()}),this.Jr=new so((e=>this.Kr(e)),this.config.request_queue_config),this.Yr=new ao(this),this.__request_queue=[];var a="always"===this.config.cookieless_mode||"on_reject"===this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut();if(a||(this.sessionManager=new po(this),this.sessionPropsManager=new uo(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(At.info("Deferring extension initialization to improve startup performance"),setTimeout((()=>{this.Xr(a)}),0)):(At.info("Initializing extensions synchronously"),this.Xr(a)),C.DEBUG=C.DEBUG||this.config.debug,C.DEBUG&&At.info("Starting in debug mode",{this:this,config:t,thisC:A({},this.config),p:s,s:o}),void 0!==(null==(r=t.bootstrap)?void 0:r.distinctID)){var l,c,u=this.config.get_device_id(Sr()),h=null!=(l=t.bootstrap)&&l.isIdentifiedID?u:t.bootstrap.distinctID;this.persistence.set_property(yi,null!=(c=t.bootstrap)&&c.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:t.bootstrap.distinctID,$device_id:h})}if(this.Qr()){var d,p,v=Object.keys((null==(d=t.bootstrap)?void 0:d.featureFlags)||{}).filter((e=>{var i;return!(null==(i=t.bootstrap)||null==(i=i.featureFlags)||!i[e])})).reduce(((e,i)=>{var r;return e[i]=(null==(r=t.bootstrap)||null==(r=r.featureFlags)?void 0:r[i])||!1,e}),{}),f=Object.keys((null==(p=t.bootstrap)?void 0:p.featureFlagPayloads)||{}).filter((e=>v[e])).reduce(((e,i)=>{var r,n;return null!=(r=t.bootstrap)&&null!=(r=r.featureFlagPayloads)&&r[i]&&(e[i]=null==(n=t.bootstrap)||null==(n=n.featureFlagPayloads)?void 0:n[i]),e}),{});this.featureFlags.receivedFeatureFlags({featureFlags:v,featureFlagPayloads:f})}if(a)this.register_once({distinct_id:Ii,$device_id:null},"");else if(!this.get_distinct_id()){var g=this.config.get_device_id(Sr());this.register_once({distinct_id:g,$device_id:g},""),this.persistence.set_property(yi,"anonymous")}return Jt(m,"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 r=i=>{var r=()=>i.anonymousId()||Sr();e.config.get_device_id=r,i.id()&&(e.register({distinct_id:i.id(),$device_id:r()}),e.persistence.set_property(yi,"identified")),t()},n=i.user();"then"in n&&V(n.then)?n.then((e=>r(e))):r(n)}(e,(()=>{i.register((e=>{Promise&&Promise.resolve||Yr.warn("This browser does not have Promise support, and can not use the segment integration");var t=(t,i)=>{if(!i)return t;t.event.userId||t.event.anonymousId===e.get_distinct_id()||(Yr.info("No userId set, resetting PostHog"),e.reset()),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(Yr.info("UserId set, identifying with PostHog"),e.identify(t.event.userId)
1);var r=e.calculateEventProperties(i,t.event.properties);return t.event.properties=Object.assign({},r,t.event.properties),t};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:e=>t(e,e.event.event),page:e=>t(e,"$pageview"),identify:e=>t(e,"$identify"),screen:e=>t(e,"$screen")}})(e)).then((()=>{t()}))}))}(this,(()=>this.Zr())):this.Zr(),V(this.config._onCapture)&&this.config._onCapture!==Oo&&(At.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(e=>this.config._onCapture(e.event,e)))),this.config.ip&&At.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}Xr(e){var t=performance.now();this.historyAutocapture=new Vr(this),this.historyAutocapture.startIfEnabled();var i=[];i.push((()=>{new sn(this).startIfEnabledOrStop()})),i.push((()=>{var e;this.siteApps=new go(this),null==(e=this.siteApps)||e.init()})),e||i.push((()=>{this.sessionRecording=new To(this),this.sessionRecording.startIfEnabledOrStop()})),this.config.disable_scroll_properties||i.push((()=>{this.scrollManager.startMeasuringScrollPosition()})),i.push((()=>{this.autocapture=new mr(this),this.autocapture.startIfEnabled()})),i.push((()=>{this.surveys.loadIfEnabled()})),i.push((()=>{this.conversations.loadIfEnabled()})),i.push((()=>{this.productTours=new Ms(this),this.productTours.loadIfEnabled()})),i.push((()=>{this.heatmaps=new Pn(this),this.heatmaps.startIfEnabled()})),i.push((()=>{this.webVitalsAutocapture=new xn(this)})),i.push((()=>{this.exceptionObserver=new Gr(this),this.exceptionObserver.startIfEnabledOrStop()})),i.push((()=>{this.deadClicksAutocapture=new Wr(this,qr),this.deadClicksAutocapture.startIfEnabled()})),i.push((()=>{if(this.ts){var e=this.ts;this.ts=void 0,this.pi(e)}})),this.es(i,t)}es(e,t){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-t>=30&&e.length>0)return void setTimeout((()=>{this.es(e,t)}),0);var i=e.shift();if(i)try{i()}catch(e){At.error("Error initializing extension:",e)}}var r=Math.round(performance.now()-t);this.register_for_session({$sdk_debug_extensions_init_method:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",$sdk_debug_extensions_init_time_ms:r}),this.config.__preview_deferred_init_extensions&&At.info("PostHog extensions initialized ("+r+"ms)")}pi(e){var t,i,r,n,s,o,a,l,c;if(!k||!k.body)return At.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((()=>{this.pi(e)}),500);this.config.__preview_deferred_init_extensions&&(this.ts=e),this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=j(e.supportedCompression,cr.GZipJS)?cr.GZipJS:j(e.supportedCompression,cr.Base64)?cr.Base64:void 0),null!=(t=e.analytics)&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.Hr?this.Hr:"identified_only"}),null==(i=this.siteApps)||i.onRemoteConfig(e),null==(r=this.sessionRecording)||r.onRemoteConfig(e),null==(n=this.autocapture)||n.onRemoteConfig(e),null==(s=this.heatmaps)||s.onRemoteConfig(e),this.surveys.onRemoteConfig(e),this.conversations.onRemoteConfig(e),null==(o=this.productTours)||o.onRemoteConfig(e),null==(a=this.webVitalsAutocapture)||a.onRemoteConfig(e),null==(l=this.exceptionObserver)||l.onRemoteConfig(e),this.exceptions.onRemoteConfig(e),null==(c=this.deadClicksAutocapture)||c.onRemoteConfig(e)}Zr(){try{this.config.loaded(this)}catch(m){At.critical("`loaded` function failed",m)}this.rs(),this.config.capture_pageview&&setTimeout((()=>{(this.consent.isOptedIn()||"always"===this.config.cookieless_mode)&&this.ss()}),1),new ro(this).load(),this.featureFlags.flags()}rs(){var e;this.is_capturing()&&this.config.request_batching&&(null==(e=this.Jr)||e.enable())}_dom_loaded(){this.is_capturing()&&jt(this.__request_queue,(e=>this.Kr(e))),this.__request_queue=[],this.rs()}_handle_unload(){var e,t;this.surveys.handlePageUnload(),this.config.request_batching?(this.ns()&&this.capture("$pageleave"),null==(e=this.Jr)||e.unload(),null==(t=this.Yr)||t.unload()):this.ns()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}_send_request(e){this.__loaded&&(Ro?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=cs(e.url,{ip:this.config.ip?1:0}),e.headers=A({},this.config.request_headers,e.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,r,n=A({},e);n.timeout=n.timeout||6e4,n.url=cs(n.url,{_:(new Date).getTime().toString(),ver:C.LIB_VERSION,compression:n.compression});var s=null!==(t=n.transport)&&void 0!==t?t:"fetch",o=ds.filter((e=>!n.disableTransport||!e.transport||!n.disableTransport.includes(e.transport))),a=null!==(i=null==(r=Xt(o,(e=>e.transport===s)))?void 0:r.method)&&void 0!==i?i:o[0].method;if(!a)throw new Error("No available transport method");a(n)})(A({},e,{callback:t=>{var i,r;this.rateLimiter.checkForLimiting(t),t.statusCode>=400&&(null==(i=(r=this.config).on_request_error)||i.call(r,t)),null==e.callback||e.callback(t)}}))))}Kr(e){this.Yr?this.Yr.retriableRequest(e):this._send_request(e)}_execute_array(e){var t,i=[],r=[],n=[];jt(e,(e=>{e&&(t=e[0],z(t)?n.push(e):V(e)?e.call(this):z(e)&&"alias"===t?i.push(e):z(e)&&-1!==t.indexOf("capture")&&V(this[t])?n.push(e):r.push(e))}));var s=function(e,t){jt(e,(function(e){if(z(e[0])){var i=t;Ut(e,(function(e){i=i[e[0]].apply(i,e.slice(1))}))}else this[e[0]].apply(this,e.slice(1))}),t)};s(i,this),s(r,this),s(n,this)}Qr(){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 r;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Jr){if(this.is_capturing())if(!J(e)&&Z(e)){var n=!this.config.opt_out_useragent_filter&&this._is_bot();if(!n||this.config.__preview_capture_bot_pageviews){var s=null!=i&&i.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(null==s||!s.isRateLimited){null!=t&&t.$current_url&&!Z(null==t?void 0:t.$current_url)&&(At.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 o=new Date,a=(null==i?void 0:i.timestamp)||o,l=Sr(),c={uuid:l,event:e,properties:this.calculateEventProperties(e,t||{},a,l)};"$pageview"===e&&this.config.__preview_capture_bot_pageviews&&n&&(c.event="$bot_pageview",c.properties.$browser_type="bot"),s&&(c.properties.$lib_rate_limit_remaining_tokens=s.remainingTokens),(null==i?void 0:i.$set)&&(c.$set=null==i?void 0:i.$set);var u,h="$groupidentify"!==e,d=this.os(null==i?void 0:i.$set_once,h);if(d&&(c.$set_once=d),(c=function(e,t){return i=e,r=e=>Z(e)&&!Q(t)?e.slice(0,t):e,n=new Set,function e(t,i){return t!==Object(t)?r?r(t):t:n.has(t)?void 0:(n.add(t),z(t)?(s=[],jt(t,(t=>{s.push(e(t))}))):(s={},Ut(t,((t,i)=>{n.has(t)||(s[i]=e(t,i))}))),s);var s}(i);var i,r,n}(c,null!=i&&i._noTruncate?null:this.config.properties_string_max_length)).timestamp=a,J(null==i?void 0:i.timestamp)||(c.properties.$event_time_override_provided=!0,c.properties.$event_time_override_system_time=o),e===Ns.DISM
vendor: 5,757 bytes, line 1
1ISSED||e===Ns.SENT){var p=null==t?void 0:t[js.SURVEY_ID],v=null==t?void 0:t[js.SURVEY_ITERATION];u={id:p,current_iteration:v},localStorage.getItem(Bs(u))||localStorage.setItem(Bs(u),"true"),c.$set=A({},c.$set,{[Ws({id:p,current_iteration:v},e===Ns.SENT?"responded":"dismissed")]:!0})}var f=A({},c.properties.$set,c.$set);if(X(f)||this.setPersonPropertiesForFlags(f),!ee(this.config.before_send)){var g=this.ls(c);if(!g)return;c=g}this.Nr.emit("eventCaptured",c);var _={method:"POST",url:null!==(r=null==i?void 0:i._url)&&void 0!==r?r:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:c,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.Kr(_):this.Jr.enqueue(_),c}At.critical("This capture call is ignored due to client rate limiting.")}}else At.error("No event name provided to posthog.capture")}else At.uninitializedWarning("posthog.capture")}Ni(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 s=n?void 0:this.persistence.remove_event_timer(e),o=A({},t);if(o.token=this.config.token,o.$config_defaults=this.config.defaults,("always"==this.config.cookieless_mode||"on_reject"==this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut())&&(o.$cookieless_mode=!0),"$snapshot"===e){var a=A({},this.persistence.properties(),this.sessionPersistence.properties());return o.distinct_id=a.distinct_id,(!Z(o.distinct_id)&&!te(o.distinct_id)||K(o.distinct_id))&&At.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),o}var l,c=bn(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:u,windowId:h}=this.sessionManager.checkAndGetSessionAndWindowId(n,i.getTime());o.$session_id=u,o.$window_id=h}this.sessionPropsManager&&Ht(o,this.sessionPropsManager.getSessionProps());try{var d;this.sessionRecording&&Ht(o,this.sessionRecording.sdkDebugProperties),o.$sdk_debug_retry_queue_size=null==(d=this.Yr)?void 0:d.length}catch(e){o.$sdk_debug_error_capturing_properties=String(e)}if(this.requestRouter.region===mo.CUSTOM&&(o.$lib_custom_api_host=this.config.api_host),l="$pageview"!==e||n?"$pageleave"!==e||n?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(i):this.pageViewManager.doPageView(i,r),o=Ht(o,l),"$pageview"===e&&k&&(o.title=k.title),!J(s)){var p=i.getTime()-s;o.$duration=parseFloat((p/1e3).toFixed(3))}$&&this.config.opt_out_useragent_filter&&(o.$browser_type=this._is_bot()?"bot":"browser"),(o=Ht({},c,this.persistence.properties(),this.sessionPersistence.properties(),o)).$is_identified=this._isIdentified(),z(this.config.property_denylist)?Ut(this.config.property_denylist,(function(e){delete o[e]})):At.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var v=this.config.sanitize_properties;v&&(At.error("sanitize_properties is deprecated. Use before_send instead"),o=v(o,e));var f=this.us();return o.$process_person_profile=f,f&&!n&&this.hs("_calculate_event_properties"),o}os(e,t){var i;if(void 0===t&&(t=!0),!this.persistence||!this.us())return e;if(this.Lr)return e;var r=this.persistence.get_initial_props(),n=null==(i=this.sessionPropsManager)?void 0:i.getSetOnceProps(),s=Ht({},r,n||{},e||{}),o=this.config.sanitize_properties;return o&&(At.error("sanitize_properties is deprecated. Use before_send instead"),s=o(s,"$set_once")),t&&(this.Lr=!0),X(s)?void 0:s}register(e,t){var i;null==(i=this.persistence)||i.register(e,t)}register_once(e,t,i){var r;null==(r=this.persistence)||r.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)}ds(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.Nr.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))&&void 0!==t?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=zs),this.surveys.displaySurvey(e,t)}cancelPendingSurvey(e){this.surveys.cancelPendingSurvey(e)}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 At.uninitializedWarning("posthog.identify");if(te(e)&&(e=e.toString(),At.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()))At.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and n
1ot a hardcoded string.');else if(e!==Ii){if(this.hs("posthog.identify")){var r=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var n=r;this.register_once({$had_persisted_distinct_id:!0,$device_id:n},"")}e!==r&&e!==this.get_property(Kt)&&(this.unregister(Kt),this.register({distinct_id:e}));var s="anonymous"===(this.persistence.get_property(yi)||"anonymous");e!==r&&s?(this.persistence.set_property(yi,"identified"),this.setPersonPropertiesForFlags(A({},i||{},t||{}),!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:r},{$set:t||{},$set_once:i||{}}),this.Br=vs(e,t,i),this.featureFlags.setAnonymousDistinctId(r)):(t||i)&&this.setPersonProperties(t,i),e!==r&&(this.reloadFeatureFlags(),this.unregister(mi))}}else At.critical('The string "'+Ii+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.');else At.error("Unique user id has not been set in posthog.identify")}setPersonProperties(e,t){if((e||t)&&this.hs("posthog.setPersonProperties")){var i=vs(this.get_distinct_id(),e,t);this.Br!==i?(this.setPersonPropertiesForFlags(A({},t||{},e||{})),this.capture("$set",{$set:e||{},$set_once:t||{}}),this.Br=i):At.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(e,t,i){if(e&&t){var r=this.getGroups();r[e]!==t&&this.resetGroupPropertiesForFlags(e),this.register({$groups:A({},r,{[e]:t})}),i&&(this.capture("$groupidentify",{$group_type:e,$group_key:t,$group_set:i}),this.setGroupPropertiesForFlags({[e]:i})),r[e]===t||i||this.reloadFeatureFlags()}else At.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.hs("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(e,t)}resetGroupPropertiesForFlags(e){this.featureFlags.resetGroupPropertiesForFlags(e)}reset(e){var t,i,r,n;if(At.info("reset"),!this.__loaded)return At.uninitializedWarning("posthog.reset");var s=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==(r=this.persistence)||r.set_property(yi,"anonymous"),null==(n=this.sessionManager)||n.resetSessionId(),this.Br=null,"always"===this.config.cookieless_mode)this.register_once({distinct_id:Ii,$device_id:null},"");else{var o=this.config.get_device_id(Sr());this.register_once({distinct_id:o,$device_id:e?o:s},"")}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)&&void 0!==e?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:t,sessionStartTimestamp:i}=this.sessionManager.checkAndGetSessionAndWindowId(!0),r=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+t);if(null!=e&&e.withTimestamp&&i){var n,s=null!==(n=e.timestampLookBack)&&void 0!==n?n:10;if(!i)return r;r+="?t="+Math.max(Math.floor(((new Date).getTime()-i)/1e3)-s,0)}return r}alias(e,t){return e===this.get_property(Zt)?(At.critical("Attempting to create alias for existing People user - aborting."),-2):this.hs("posthog.alias")?(J(t)&&(t=this.get_distinct_id()),e!==t?(this.ds(Kt,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(At.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var t=A({},this.config);if(Y(e)){var i,r,n,s,o,a,l;Ht(this.config,Ao(e));var c=this.Vr();null==(i=this.persistence)||i.update_config(this.config,t,c),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new Rs(A({},this.config,{persistence:"sessionStorage"}
vendor: 4,333 bytes, line 1
1),c);var u=this.qr(this.config.debug);ie(u)&&(this.config.debug=u),ie(this.config.debug)&&(this.config.debug?(C.DEBUG=!0,Cr.H()&&Cr.G("ph_debug","true"),At.info("set_config",{config:e,oldConfig:t,newConfig:A({},this.config)})):(C.DEBUG=!1,Cr.H()&&Cr.V("ph_debug"))),null==(r=this.exceptionObserver)||r.onConfigChange(),null==(n=this.sessionRecording)||n.startIfEnabledOrStop(),null==(s=this.autocapture)||s.startIfEnabled(),null==(o=this.heatmaps)||o.startIfEnabled(),null==(a=this.exceptionObserver)||a.startIfEnabledOrStop(),this.surveys.loadIfEnabled(),this.vs(),null==(l=this.externalIntegrations)||l.startIfEnabledOrStop()}}startSessionRecording(e){var t,i,r,n,s,o=!0===e,a={sampling:o||!(null==e||!e.sampling),linked_flag:o||!(null==e||!e.linked_flag),url_trigger:o||!(null==e||!e.url_trigger),event_trigger:o||!(null==e||!e.event_trigger)};Object.values(a).some(Boolean)&&(null==(t=this.sessionManager)||t.checkAndGetSessionAndWindowId(),a.sampling&&(null==(i=this.sessionRecording)||i.overrideSampling()),a.linked_flag&&(null==(r=this.sessionRecording)||r.overrideLinkedFlag()),a.url_trigger&&(null==(n=this.sessionRecording)||n.overrideTrigger("url")),a.event_trigger&&(null==(s=this.sessionRecording)||s.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=new Error("PostHog syntheticException"),r=this.exceptions.buildProperties(e,{handled:!0,syntheticException:i});return this.exceptions.sendExceptionEvent(A({},r,t))}startExceptionAutocapture(e){this.set_config({capture_exceptions:null==e||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}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)&&void 0!==e?e:Co;return t!==Co&&(t=Co+"."+t),t}_isIdentified(){var e,t;return"identified"===(null==(e=this.persistence)?void 0:e.get_property(yi))||"identified"===(null==(t=this.sessionPersistence)?void 0:t.get_property(yi))}us(){var e,t;return!("never"===this.config.person_profiles||"identified_only"===this.config.person_profiles&&!this._isIdentified()&&X(this.getGroups())&&(null==(e=this.persistence)||null==(e=e.props)||!e[Kt])&&(null==(t=this.persistence)||null==(t=t.props)||!t[Si]))}ns(){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.us()||this.hs("posthog.createPersonProfile")&&this.setPersonProperties({},{})}hs(e){return"never"===this.config.person_profiles?(At.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.ds(Si,!0),!0)}Vr(){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}vs(){var e,t,i,r,n=this.Vr();return(null==(e=this.persistence)?void 0:e.xi)!==n&&(null==(i=this.persistence)||i.set_disabled(n)),(null==(t=this.sessionPersistence)?void 0:t.xi)!==n&&(null==(r=this.sessionPersistence)||r.set_disabled(n)),n}opt_in_capturing(e){var t,i,r;"always"!==this.config.cookieless_mode?("on_reject"===this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut()&&(this.reset(!0),null==(i=this.sessionManager)||i.destroy(),this.sessionManager=new po(this),this.persistence&&(this.sessionPropsManager=new uo(this,this.sessionManager,this.persistence)),this.sessionRecording=new To(this),this.sessionRecording.startIfEnabledOrStop()),this.consent.optInOut(!0),this.vs(),this.rs(),null==(t=this.sessionRecording)||t.startIfEnabledOrStop(),"on_reject"==this.config.cookieless_mode&&this.surveys.loadIfEnabled(),(J(null==e?void 0:e.captureEventName)||null!=e&&e.captureEventName)&&this.capture(null!==(r=null==e?void 0:e.captureEventName)&&void 0!==r?r:"$opt_in",null==e?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.ss()):At.warn('Consent opt in/out is not val
1id with cookieless_mode="always" and will be ignored')}opt_out_capturing(){var e,t;"always"!==this.config.cookieless_mode?("on_reject"===this.config.cookieless_mode&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.vs(),"on_reject"===this.config.cookieless_mode&&(this.register({distinct_id:Ii,$device_id:null}),null==(e=this.sessionManager)||e.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,null==(t=this.sessionRecording)||t.stopRecording(),this.sessionRecording=void 0,this.ss())):At.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===Nr.GRANTED?"granted":e===Nr.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.vs()}_is_bot(){return x?_o(x,this.config.custom_blocked_useragents):void 0}ss(){k&&("visible"===k.visibilityState?this.Ur||(this.Ur=!0,this.capture("$pageview",{title:k.title},{send_instantly:!0}),this.zr&&(k.removeEventListener("visibilitychange",this.zr),this.zr=null)):this.zr||(this.zr=this.ss.bind(this),Jt(k,"visibilitychange",this.zr)))}debug(e){!1===e?(null==m||m.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(null==m||m.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)`."),this.set_config({debug:!0}))}O(){var e,t,i,r,n,s,o=this.Wr||{};return"advanced_disable_flags"in o?!!o.advanced_disable_flags:!1!==this.config.advanced_disable_flags?!!this.config.advanced_disable_flags:!0===this.config.advanced_disable_decide?(At.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):(i="advanced_disable_decide",!1,r=At,n=(t="advanced_disable_flags")in(e=o)&&!J(e[t]),s=i in e&&!J(e[i]),n?e[t]:!!s&&(r&&r.warn("Config field '"+i+"' is deprecated. Please use '"+t+"' instead. The old field will be removed in a future major version."),e[i]))}ls(e){if(ee(this.config.before_send))return e;var t=z(this.config.before_send)?this.config.before_send:[this.config.before_send],i=e;for(var r of t){if(i=r(i),ee(i)){var n="Event '"+e.event+"' was rejected in beforeSend function";return re(e.event)?At.warn(n+". This can cause unexpected behavior."):At.info(n),null}i.properties&&!X(i.properties)||At.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return i}getPageViewId(){var e;return null==(e=this.pageViewManager.Kt)?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)})}qr(e){var t=ie(e)&&!e,i=Cr.H()&&"true"===Cr.q("ph_debug");return!t&&(!!i||e)}}!function(e,t){for(var i=0;i<t.length;i++)e.prototype[t[i]]=Gt(e.prototype[t[i]])}(Do,["identify"]);var Lo,No=(Lo=$o[Co]=new Do,function(){function e(){e.done||(e.done=!0,Ro=!1,Ut($o,(function(e){e._dom_loaded()})))}null!=k&&k.addEventListener?"complete"===k.readyState?e():Jt(k,"DOMContentLoaded",e,{capture:!1}):m&&At.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),Lo);i(1804),i(5560),i(7284),i(4722),i(6766);var jo=i(90),Uo="G-D10FT5Q9XN";function Ho(e){var t=e.Component,i=e.pageProps,a=(0,o.useRouter)();return s.useEffect((function(){var e=function(){jo.gr&&d(),jo.px&&No.capture("$pageview")};return jo.gr&&((e,t)=>{if(window.__fathomIsLoading||window.fathom)return;window.__fathomIsLoading=!0;let i=document.createElement("script"),r=document.getElementsByTagName("script")[0]||document.querySelector("body");i.id="fathom-script",i.async=!0,i.setAttribute("data-site",e),i.src=t&&t.url?t.url:"https://cdn.usefathom.com/script.js",t&&(void 0!==t.auto&&i.setAttribute("data-auto",`${t.auto}`),void 0!==t.honorDNT&&i.setAttribute("data-honor-dnt",`${t.honorDNT}`),void 0!==t.canonical&&i.setAttribute("data-canonical",`${t.canonical}`),t.includedDomains&&(h(t.includedDomains),i.setAttribute("data-included-domains",t.includedDomains.join(","))),t.excludedDomains&&(h(t.excludedDomains),i.setAttribute("data-excluded-domains",t.excludedDomains.join(","))),t.spa&&i.setAttribute("data-spa",t.spa)),i.onload=u,r.parentNode.insertBefore(i,r)})(jo.gr,jo.GH),jo.px&&No.init(jo.px,jo.kX),a.events.on("routeChangeComplete",e),function(){a.events.off("routeChangeComplete",e)}}),[a.events]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l(),{strategy:"afterInteractive",src:"https://www.googletagmanager.com/gtag/js?i
1d=".concat(Uo)}),(0,n.jsx)(l(),{id:"gtag-init",strategy:"afterInteractive",dangerouslySetInnerHTML:{__html:"\n window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag('js', new Date());\n gtag('config', '".concat(Uo,"', {\n page_path: window.location.pathname,\n });\n ")}}),(0,n.jsx)(t,(0,r.Z)({},i))]})}jo.sk||console.log("\n\n\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\n\u255a\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255d\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255d\u2588\u2588\u2551\u255a\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255d\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255d \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255d\n \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\n \u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2551\u255a\u2588\u2588\u2557\u2588\u2588\u2551\u255a\u2550\u2550\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u255a\u2588\u2588\u2557 \u2588\u2588\u2554\u255d\u2588\u2588\u2554\u2550\u2550\u255d \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u255a\u2550\u2550\u2550\u2550\u2588\u2588\u2551\n \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u255a\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u255a\u2588\u2588\u2588\u2588\u2554\u255d \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\n \u255a\u2550\u255d \u255a\u2550\u255d \u255a\u2550\u255d\u255a\u2550\u255d \u255a\u2550\u255d\u255a\u2550\u255d \u255a\u2550\u2550\u2550\u255d\u255a\u2550\u2550\u2550\u2550\u2550\u2550\u255d\u255a\u2550\u255d \u255a\u2550\u255d \u255a\u2550\u255d \u255a\u2550\u2550\u2550\u255d \u255a\u2550\u2550\u2550\u2550\u2550\u2550\u255d \u255a\u2550\u2550\u2550\u2550\u2550\u255d \u255a\u2550\u2550\u2550\u2550\u2550\u2550\u255d\n \n This site is built using Notion, Next.js, and https://github.com/NotionX/react-notion-x.\n")},7604:function(){},1804:function(){},5560:function(){},7284:function(){},4722:function(){},6766:function(){},7663:function(e){!function(){var t={229:function(e){var t,i,r=e.exports={};function n(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===n||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"===typeof setTimeout?setTimeout:n}catch(e){t=n}try{i="function"===typeof clearTimeout?clearTimeout:s}
1catch(e){i=s}}();var a,l=[],c=!1,u=-1;function h(){c&&a&&(c=!1,a.length?l=a.concat(l):u=-1,l.length&&d())}function d(){if(!c){var e=o(h);c=!0;for(var t=l.length;t;){for(a=l,l=[];++u<t;)a&&a[u].run();u=-1,t=l.length}a=null,c=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function v(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];l.push(new p(e,t)),1!==l.length||c||o(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=v,r.addListener=v,r.once=v,r.off=v,r.removeListener=v,r.removeAllListeners=v,r.emit=v,r.prependListener=v,r.prependOnceListener=v,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}}},i={};function r(e){var n=i[e];if(void 0!==n)return n.exports;var s=i[e]={exports:{}},o=!0;try{t[e](s,s.exports,r),o=!1}finally{o&&delete i[e]}return s.exports}r.ab="//";var n=r(229);e.exports=n}()},1163:function(e,t,i){e.exports=i(387)},4298:function(e,t,i){e.exports=i(699)},3931:function(e){"use strict";e.exports=()=>{const e={};return e.promise=new Promise(((t,i)=>{e.resolve=t,e.reject=i})),e}},4924:function(e,t,i){"use strict";function r(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}i.d(t,{Z:function(){return r}})},6042:function(e,t,i){"use strict";i.d(t,{Z:function(){return n}});var r=i(4924);function n(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},n=Object.keys(i);"function"===typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter((function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable})))),n.forEach((function(t){(0,r.Z)(e,t,i[t])}))}return e}},9396:function(e,t,i){"use strict";function r(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}(Object(t)).forEach((function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})),e}i.d(t,{Z:function(){return r}})},6261:function(e,t,i){"use strict";i.d(t,{Z:function(){return l}});const r=(e,t,i,r)=>{if("length"===i||"prototype"===i)return;if("arguments"===i||"caller"===i)return;const s=Object.getOwnPropertyDescriptor(e,i),o=Object.getOwnPropertyDescriptor(t,i);!n(s,o)&&r||Object.defineProperty(e,i,o)},n=function(e,t){return void 0===e||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},s=(e,t)=>`/* Wrapped ${e}*/\n${t}`,o=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),a=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name");function l(e,t,{ignoreNonConfigurable:i=!1}={}){const{name:n}=e;for(const s of Reflect.ownKeys(t))r(e,t,s,i);return((e,t)=>{const i=Object.getPrototypeOf(t);i!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,i)})(e,t),((e,t,i)=>{const r=""===i?"":`with ${i.trim()}() `,n=s.bind(null,r,t.toString());Object.defineProperty(n,"name",a),Object.defineProperty(e,"toString",{...o,value:n})})(e,t,n),e}},4269:function(e,t,i){"use strict";i.d(t,{p6:function(){return X},c8:function(){return J},c5:function(){return A},Ck:function(){return D},cj:function(){return j},Ho:function(){return M},Sp:function(){return z},Co:function(){return N},Kl:function(){return V},rp:function(){return L},Ru:function(){return H},FB:function(){return F},D5:function(){return Y},q5:function(){return B},Gw:function(){return G}});i(6729);Error;Error;new WeakMap;var r,n,s,o,a,l,c,u,h,d,p,v,f,g,_,m,y,b,w,E,x,k=function(e,t,i,r,n){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?n.call(e,i):n?n.value=i:t.set(e,i),i},S=function(e,t,i,r){if("a"===i&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?r:"a"===i?r.call(e):r?r.value:t.get(e)};
1class P extends Error{}n=new WeakMap,s=new WeakMap,o=new WeakMap,a=new WeakMap,l=new WeakMap,c=new WeakMap,u=new WeakMap,h=new WeakMap,d=new WeakMap,new WeakMap,p=new WeakMap,v=new WeakMap,f=new WeakMap,new WeakMap,r=new WeakSet,g=function(){return S(this,s,"f")||S(this,o,"f")<S(this,a,"f")},_=function(){return S(this,p,"f")<S(this,v,"f")},m=function(){S(this,r,"m",E).call(this),S(this,r,"m",w).call(this),k(this,h,void 0,"f")},y=function(){const e=Date.now();if(void 0===S(this,u,"f")){const t=S(this,c,"f")-e;if(!(t<0))return void 0===S(this,h,"f")&&k(this,h,setTimeout((()=>{S(this,r,"m",m).call(this)}),t),"f"),!0;k(this,o,S(this,n,"f")?S(this,p,"f"):0,"f")}return!1},b=function(){if(0===S(this,d,"f").size)return S(this,u,"f")&&clearInterval(S(this,u,"f")),k(this,u,void 0,"f"),this.emit("empty"),0===S(this,p,"f")&&this.emit("idle"),!1;if(!S(this,f,"f")){const e=!S(this,r,"a",y);if(S(this,r,"a",g)&&S(this,r,"a",_)){const t=S(this,d,"f").dequeue();return!!t&&(this.emit("active"),t(),e&&S(this,r,"m",w).call(this),!0)}}return!1},w=function(){S(this,s,"f")||void 0!==S(this,u,"f")||(k(this,u,setInterval((()=>{S(this,r,"m",E).call(this)}),S(this,l,"f")),"f"),k(this,c,Date.now()+S(this,l,"f"),"f"))},E=function(){0===S(this,o,"f")&&0===S(this,p,"f")&&S(this,u,"f")&&(clearInterval(S(this,u,"f")),k(this,u,void 0,"f")),k(this,o,S(this,n,"f")?S(this,p,"f"):0,"f"),S(this,r,"m",x).call(this)},x=function(){for(;S(this,r,"m",b).call(this););};var I=i(6261),T=i(2734);const $=new WeakMap;function O(e,{cacheKey:t,cache:i=new Map,maxAge:r}={}){"number"===typeof r&&T(i);const n=function(...n){const s=t?t(n):n[0],o=i.get(s);if(o)return o.data;const a=e.apply(this,n);return i.set(s,{data:a,maxAge:r?Date.now()+r:Number.POSITIVE_INFINITY}),a};return(0,I.Z)(n,e,{ignoreNonConfigurable:!0}),$.set(n,i),n}const C=(e,t)=>t.some((t=>t instanceof RegExp?t.test(e):t===e));function R(e,t){if(t={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,removeExplicitPort:!1,sortQueryParameters:!0,...t},e=e.trim(),/^data:/i.test(e))return((e,{stripHash:t})=>{const i=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(e);if(!i)throw new Error(`Invalid URL: ${e}`);let{type:r,data:n,hash:s}=i.groups;const o=r.split(";");s=t?"":s;let a=!1;"base64"===o[o.length-1]&&(o.pop(),a=!0);const l=(o.shift()||"").toLowerCase(),c=[...o.map((e=>{let[t,i=""]=e.split("=").map((e=>e.trim()));return"charset"===t&&(i=i.toLowerCase(),"us-ascii"===i)?"":`${t}${i?`=${i}`:""}`})).filter(Boolean)];return a&&c.push("base64"),(c.length>0||l&&"text/plain"!==l)&&c.unshift(l),`data:${c.join(";")},${a?n.trim():n}${s?`#${s}`:""}`})(e,t);if(/^view-source:/i.test(e))throw new Error("`view-source:` is not supported as it is a non-standard protocol");const i=e.startsWith("//");!i&&/^\.*\//.test(e)||(e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol));const r=new URL(e);if(t.forceHttp&&t.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(t.forceHttp&&"https:"===r.protocol&&(r.protocol="http:"),t.forceHttps&&"http:"===r.protocol&&(r.protocol="https:"),t.stripAuthentication&&(r.username="",r.password=""),t.stripHash?r.hash="":t.stripTextFragment&&(r.hash=r.hash.replace(/#?:~:text.*?$/i,"")),r.pathname){const e=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g;let t=0,i="";for(;;){const n=e.exec(r.pathname);if(!n)break;const s=n[0],o=n.index;i+=r.pathname.slice(t,o).replace(/\/{2,}/g,"/"),i+=s,t=o+s.length}i+=r.pathname.slice(t,r.pathname.length).replace(/\/{2,}/g,"/"),r.pathname=i}if(r.pathname)try{r.pathname=decodeURI(r.pathname)}catch{}if(!0===t.removeDirectoryIndex&&(t.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let e=r.pathname.split("/");const i=e[e.length-1];C(i,t.removeDirectoryIndex)&&(e=e.slice(0,-1),r.pathname=e.slice(1).join("/")+"/")}if(r.hostname&&(r.hostname=r.hostname.replace(/\.$/,""),t.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(r.hostname)&&(r.hostname=r.hostname.replace(/^www\./,""))),Array.isArray(t.removeQueryParameters))for(const s of[...r.searchParams.keys()])C(s,t.removeQueryParameters)&&r.searchParams.delete(s);if(Array.isArray(t.keepQueryParameters)||!0!==t.removeQueryParameters||(r.search=""),Array.isArray(t.keepQueryParameters)&&t.keepQueryParameters.length>0)for(const s of[...r.searchParams.keys()])C(s,t.keepQueryParameters)||r.searchParams.delete(s);if(t.sortQueryParameters){r.searchParams.sort();try{r.search=decodeURIComponent(r.search)}catch{}}t.removeTrailingSlash&&(r.pathname=r.pathname.replace(/\/$/,"")),t.removeExplicitPort&&r.port&&(r.port="");const n=e;return e=r.toString(),t.removeSingleSlash||"/"!==r.pathname||n.endsWith("/")||""!==r.hash||
1(e=e.replace(/\/$/,"")),(t.removeTrailingSlash||"/"===r.pathname)&&""===r.hash&&t.removeSingleSlash&&(e=e.replace(/\/$/,"")),i&&!t.normalizeProtocol&&(e=e.replace(/^http:\/\//,"//")),t.stripProtocol&&(e=e.replace(/^(?:https?:)?\/\//,"")),e}Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var F=e=>{var t;return e?Array.isArray(e)?null!=(t=null==e?void 0:e.reduce(((e,t)=>e+("\u204d"!==t[0]&&"\u2023"!==t[0]?t[0]:"")),""))?t:"":e:""};function A(e,t){var i,r,n,s,o,a,l;let c=e.collection_id||(null==(r=null==(i=e.format)?void 0:i.collection_pointer)?void 0:r.id);if(c)return c;let u=null==(n=null==e?void 0:e.view_ids)?void 0:n[0];if(u){let e=null==(o=null==(s=t.collection_view)?void 0:s[u])?void 0:o.value;if(e)return null==(l=null==(a=e.format)?void 0:a.collection_pointer)?void 0:l.id}return null}function M(e,t){var i,r;if(null!=(i=e.properties)&&i.title)return F(e.properties.title);if("collection_view_page"===e.type||"collection_view"===e.type){let i=A(e,t);if(i){let e=null==(r=t.collection[i])?void 0:r.value;if(e)return F(e.name)}}return""}function D(e,t){var i,r,n;if(null!=(i=e.format)&&i.page_icon)return null==(r=e.format)?void 0:r.page_icon;if("collection_view_page"===e.type||"collection_view"===e.type){let i=A(e,t);if(i){let e=null==(n=t.collection[i])?void 0:n.value;if(e)return e.icon}}return null}function L(e,t,i){var r;try{if(!t.properties||!Object.keys(i.collection))return null;let n=null==(r=i.collection[t.parent_id])?void 0:r.value;if(n){let i=e.toLowerCase(),r=Object.keys(n.schema).find((e=>{var t,r;return(null==(r=null==(t=n.schema[e])?void 0:t.name)?void 0:r.toLowerCase())===i}));if(!r)return null;let{type:s}=n.schema[r],o=F(t.properties[r]);switch(s){case"created_time":return t.created_time;case"multi_select":return o.split(",");case"date":{let e=t.properties[r][0][1][0][1];if("datetime"==e.type)return new Date(`${e.start_date} ${e.start_time}`).getTime();if("date"==e.type)return new Date(e.start_date).getTime();if("datetimerange"==e.type){let{start_date:t,start_time:i,end_date:r,end_time:n}=e;return[new Date(`${t} ${i}`).getTime(),new Date(`${r} ${n}`).getTime()]}return[new Date(e.start_date).getTime(),new Date(e.end_date).getTime()]}case"checkbox":return"Yes"==o;case"last_edited_time":return t.last_edited_time;default:return o}}}catch(n){}return null}var N=e=>{if(e&&Array.isArray(e)){if("d"===e[0])return e[1];for(let t of e){let e=N(t);
1if(e)return e}}return null},j=(e,t,{inclusive:i=!1}={})=>{var r,n;let s=e;for(;null!=s;){if(i&&"page"===(null==s?void 0:s.type))return s;let e=s.parent_id,o=s.parent_table;if(!e)break;if("collection"===o)s=null==(r=t.collection[e])?void 0:r.value;else if(s=null==(n=t.block[e])?void 0:n.value,"page"===(null==s?void 0:s.type))return s}return null},U={header:0,sub_header:1,sub_sub_header:2},H=(e,t)=>{var i;let r=(null!=(i=e.content)?i:[]).map((e=>{var i,r;let n=null==(i=t.block[e])?void 0:i.value;if(n){let{type:t}=n;if("header"===t||"sub_header"===t||"sub_sub_header"===t)return{id:e,type:t,text:F(null==(r=n.properties)?void 0:r.title),indentLevel:U[t]}}return null})).filter(Boolean),n=[{actual:-1,effective:-1}];for(let s of r){let{indentLevel:e}=s,t=e;for(;;){let e=n[n.length-1],{actual:i,effective:r}=e;if(t>i)s.indentLevel=r+1,n.push({actual:t,effective:s.indentLevel});else{if(t===i){s.indentLevel=r;break}n.pop()}}}return r},q=/\b([a-f0-9]{32})\b/,W=/\b([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})\b/,B=(e="",{uuid:t=!0}={})=>{if(!e)return null;let i=(e=e.split("?")[0]).match(q);if(i)return t?((e="")=>`${e.substr(0,8)}-${e.substr(8,4)}-${e.substr(12,4)}-${e.substr(16,4)}-${e.substr(20)}`)(i[1]):i[1];let r=e.match(W);return r?t?r[1]:r[1].replace(/-/g,""):null},G=e=>e.replace(/-/g,"");var z=(e,t,{uuid:i=!0}={})=>{var r;if(!e||!t)return null;let n=G(e),s=null==(r=t.block[e])?void 0:r.value;if(s){let e=L("slug",s,t)||L("Slug",s,t)||(e=>(e||"").replace(/ /g,"-").replace(/[^a-zA-Z0-9-\u4e00-\u9FFF\u3041-\u3096\u30A1-\u30FC\u3000-\u303F]/g,"").replace(/--/g,"-").replace(/-$/,"").replace(/^-/,"").trim().toLowerCase())(M(s,t));if(e)return i?`${e}-${n}`:e}return n},V=(e,t)=>{var i;let r=e.block,n=[],s=t;for(;;){let o=null==(i=r[s])?void 0:i.value;if(!o)break;let a=M(o,e),l=D(o,e);if(!a&&!l)break;n.push({block:o,active:s===t,pageId:s,title:a,icon:l});let c=j(o,e),u=null==c?void 0:c.id;if(!u)break;s=u}return n.reverse(),n},Y=O((e=>{if(!e)return"";try{if(e.startsWith("https://www.notion.so/image/")){let t=new URL(e),i=decodeURIComponent(t.pathname.substr(7)),r=Y(i);t.pathname=`/image/${encodeURIComponent(r)}`,e=t.toString()}return R(e,{stripProtocol:!0,stripWWW:!0,stripHash:!0,stripTextFragment:!0,removeQueryParameters:!0})}catch(t){return""}}));var X=(e,{month:t="short"}={})=>{let i=new Date(e);return`${i.toLocaleString("en-US",{month:t})} ${i.getUTCDate()}, ${i.getUTCFullYear()}`},J=e=>{let t=`${e.start_time||""} ${e.start_date} ${e.time_zone||""}`;return X(t)}}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[774,179],(function(){return t(6840),t(387)}));var i=e.O();_N_E=i}]);
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.